2006-02-24 04:48:15 +00:00
|
|
|
// Emacs style mode select -*- C++ -*-
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
//
|
|
|
|
// $Id:$
|
|
|
|
//
|
|
|
|
// Copyright (C) 1993-1996 by id Software, Inc.
|
|
|
|
//
|
|
|
|
// This source is available for distribution and/or modification
|
|
|
|
// only under the terms of the DOOM Source Code License as
|
|
|
|
// published by id Software. All rights reserved.
|
|
|
|
//
|
|
|
|
// The source is distributed in the hope that it will be useful,
|
|
|
|
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the DOOM Source Code License
|
|
|
|
// for more details.
|
|
|
|
//
|
|
|
|
// $Log:$
|
|
|
|
//
|
|
|
|
// DESCRIPTION:
|
|
|
|
// Intermission screens.
|
|
|
|
//
|
|
|
|
//-----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// Enhancements by Graf Zahl
|
|
|
|
|
|
|
|
#include <ctype.h>
|
|
|
|
#include <stdio.h>
|
|
|
|
|
|
|
|
#include "m_random.h"
|
|
|
|
#include "m_swap.h"
|
|
|
|
#include "i_system.h"
|
|
|
|
#include "w_wad.h"
|
|
|
|
#include "g_game.h"
|
|
|
|
#include "g_level.h"
|
|
|
|
#include "r_local.h"
|
|
|
|
#include "s_sound.h"
|
|
|
|
#include "doomstat.h"
|
|
|
|
#include "v_video.h"
|
|
|
|
#include "i_video.h"
|
|
|
|
#include "wi_stuff.h"
|
|
|
|
#include "c_console.h"
|
|
|
|
#include "hu_stuff.h"
|
|
|
|
#include "v_palette.h"
|
|
|
|
#include "s_sndseq.h"
|
|
|
|
#include "sc_man.h"
|
|
|
|
#include "v_text.h"
|
|
|
|
#include "gi.h"
|
2007-12-26 16:06:03 +00:00
|
|
|
#include "r_translate.h"
|
2008-11-27 17:43:36 +00:00
|
|
|
#include "templates.h"
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// States for the intermission
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
NoState = -1,
|
|
|
|
StatCount,
|
|
|
|
ShowNextLoc,
|
|
|
|
LeavingIntermission
|
|
|
|
} stateenum_t;
|
|
|
|
|
|
|
|
CVAR (Bool, wi_percents, true, CVAR_ARCHIVE)
|
2006-04-11 08:36:23 +00:00
|
|
|
CVAR (Bool, wi_showtotaltime, true, CVAR_ARCHIVE)
|
2006-04-29 12:40:09 +00:00
|
|
|
CVAR (Bool, wi_noautostartmap, false, CVAR_ARCHIVE)
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
void WI_loadData ();
|
|
|
|
void WI_unloadData ();
|
|
|
|
|
|
|
|
// GLOBAL LOCATIONS
|
|
|
|
#define WI_TITLEY 2
|
|
|
|
#define WI_SPACINGY 33
|
|
|
|
|
|
|
|
// SINGPLE-PLAYER STUFF
|
|
|
|
#define SP_STATSX 50
|
|
|
|
#define SP_STATSY 50
|
|
|
|
|
|
|
|
#define SP_TIMEX 8
|
|
|
|
#define SP_TIMEY (200-32)
|
|
|
|
|
|
|
|
|
|
|
|
// NET GAME STUFF
|
|
|
|
#define NG_STATSY 50
|
|
|
|
#define NG_STATSX (32 + star->GetWidth()/2 + 32*!dofrags)
|
|
|
|
|
|
|
|
#define NG_SPACINGX 64
|
|
|
|
|
|
|
|
|
|
|
|
// DEATHMATCH STUFF
|
|
|
|
#define DM_MATRIXX 42
|
|
|
|
#define DM_MATRIXY 68
|
|
|
|
|
|
|
|
#define DM_SPACINGX 40
|
|
|
|
|
|
|
|
#define DM_TOTALSX 269
|
|
|
|
|
|
|
|
#define DM_KILLERSX 10
|
|
|
|
#define DM_KILLERSY 100
|
|
|
|
#define DM_VICTIMSX 5
|
|
|
|
#define DM_VICTIMSY 50
|
|
|
|
|
|
|
|
// These animation variables, structures, etc. are used for the
|
|
|
|
// DOOM/Ultimate DOOM intermission screen animations. This is
|
|
|
|
// totally different from any sprite or texture/flat animations
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
ANIM_ALWAYS, // determined by patch entry
|
|
|
|
ANIM_PIC, // continuous
|
|
|
|
|
|
|
|
// condition bitflags
|
|
|
|
ANIM_IFVISITED=8,
|
|
|
|
ANIM_IFNOTVISITED=16,
|
|
|
|
ANIM_IFENTERING=32,
|
|
|
|
ANIM_IFNOTENTERING=64,
|
|
|
|
ANIM_IFLEAVING=128,
|
|
|
|
ANIM_IFNOTLEAVING=256,
|
|
|
|
ANIM_IFTRAVELLING=512,
|
|
|
|
ANIM_IFNOTTRAVELLING=1024,
|
|
|
|
|
|
|
|
ANIM_TYPE=7,
|
|
|
|
ANIM_CONDITION=~7,
|
|
|
|
|
|
|
|
} animenum_t;
|
|
|
|
|
2009-03-28 11:49:44 +00:00
|
|
|
struct yahpt_t
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int x, y;
|
2009-03-28 11:49:44 +00:00
|
|
|
};
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
struct lnode_t
|
|
|
|
{
|
|
|
|
int x; // x/y coordinate pair structure
|
|
|
|
int y;
|
|
|
|
char level[9];
|
|
|
|
} ;
|
|
|
|
|
|
|
|
|
|
|
|
#define FACEBACKOFS 4
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// Animation.
|
|
|
|
// There is another anim_t used in p_spec.
|
|
|
|
// (which is why I have renamed this one!)
|
|
|
|
//
|
|
|
|
|
|
|
|
#define MAX_ANIMATION_FRAMES 20
|
2009-03-28 11:49:44 +00:00
|
|
|
struct in_anim_t
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
int type; // Made an int so I can use '|'
|
|
|
|
int period; // period in tics between animations
|
|
|
|
int nanims; // number of animation frames
|
|
|
|
yahpt_t loc; // location of animation
|
|
|
|
int data; // ALWAYS: n/a, RANDOM: period deviation (<256)
|
|
|
|
FTexture * p[MAX_ANIMATION_FRAMES]; // actual graphics for frames of animations
|
|
|
|
|
|
|
|
// following must be initialized to zero before use!
|
|
|
|
int nexttic; // next value of bcnt (used in conjunction with period)
|
|
|
|
int ctr; // next frame number to animate
|
|
|
|
int state; // used by RANDOM and LEVEL when animating
|
|
|
|
|
|
|
|
char levelname[9];
|
|
|
|
char levelname2[9];
|
2009-03-28 11:49:44 +00:00
|
|
|
};
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static TArray<lnode_t> lnodes;
|
|
|
|
static TArray<in_anim_t> anims;
|
|
|
|
|
|
|
|
|
|
|
|
//
|
|
|
|
// GENERAL DATA
|
|
|
|
//
|
|
|
|
|
|
|
|
//
|
|
|
|
// Locally used stuff.
|
|
|
|
//
|
|
|
|
|
|
|
|
|
|
|
|
// States for single-player
|
|
|
|
#define SP_KILLS 0
|
|
|
|
#define SP_ITEMS 2
|
|
|
|
#define SP_SECRET 4
|
|
|
|
#define SP_FRAGS 6
|
|
|
|
#define SP_TIME 8
|
|
|
|
#define SP_PAR ST_TIME
|
|
|
|
|
|
|
|
#define SP_PAUSE 1
|
|
|
|
|
|
|
|
#define SHOWNEXTLOCDELAY 4 // in seconds
|
|
|
|
|
|
|
|
static int acceleratestage; // used to accelerate or skip a stage
|
|
|
|
static int me; // wbs->pnum
|
|
|
|
static stateenum_t state; // specifies current state
|
|
|
|
static wbstartstruct_t *wbs; // contains information passed into intermission
|
|
|
|
static wbplayerstruct_t*plrs; // wbs->plyr[]
|
|
|
|
static int cnt; // used for general timing
|
|
|
|
static int bcnt; // used for timing of background animation
|
|
|
|
static int cnt_kills[MAXPLAYERS];
|
|
|
|
static int cnt_items[MAXPLAYERS];
|
|
|
|
static int cnt_secret[MAXPLAYERS];
|
|
|
|
static int cnt_time;
|
|
|
|
static int cnt_total_time;
|
|
|
|
static int cnt_par;
|
|
|
|
static int cnt_pause;
|
2006-04-29 12:40:09 +00:00
|
|
|
static bool noautostartmap;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
//
|
|
|
|
// GRAPHICS
|
|
|
|
//
|
|
|
|
|
|
|
|
static TArray<FTexture *> yah; // You Are Here graphic
|
|
|
|
static FTexture* splat; // splat
|
|
|
|
static FTexture* finished; // "Finished!" graphics
|
|
|
|
static FTexture* entering; // "Entering" graphic
|
|
|
|
static FTexture* sp_secret; // "secret"
|
|
|
|
static FTexture* kills; // "Kills", "Scrt", "Items", "Frags"
|
|
|
|
static FTexture* secret;
|
|
|
|
static FTexture* items;
|
|
|
|
static FTexture* frags;
|
|
|
|
static FTexture* timepic; // Time sucks.
|
|
|
|
static FTexture* par;
|
|
|
|
static FTexture* sucks;
|
|
|
|
static FTexture* killers; // "killers", "victims"
|
|
|
|
static FTexture* victims;
|
|
|
|
static FTexture* total; // "Total", your face, your dead face
|
|
|
|
static FTexture* star;
|
|
|
|
static FTexture* bstar;
|
|
|
|
static FTexture* p; // Player graphic
|
|
|
|
static FTexture* lnames[2]; // Name graphics of each level (centered)
|
|
|
|
|
|
|
|
// [RH] Info to dynamically generate the level name graphics
|
2009-02-03 19:11:43 +00:00
|
|
|
static FString lnametexts[2];
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
static FTexture *background;
|
|
|
|
|
|
|
|
//
|
|
|
|
// CODE
|
|
|
|
//
|
|
|
|
|
|
|
|
// ====================================================================
|
|
|
|
//
|
|
|
|
// Background script commands
|
|
|
|
//
|
|
|
|
// ====================================================================
|
|
|
|
|
|
|
|
static const char *WI_Cmd[]={
|
|
|
|
"Background",
|
|
|
|
"Splat",
|
|
|
|
"Pointer",
|
|
|
|
"Spots",
|
|
|
|
|
|
|
|
"IfEntering",
|
|
|
|
"IfNotEntering",
|
|
|
|
"IfVisited",
|
|
|
|
"IfNotVisited",
|
|
|
|
"IfLeaving",
|
|
|
|
"IfNotLeaving",
|
|
|
|
"IfTravelling",
|
|
|
|
"IfNotTravelling",
|
|
|
|
|
|
|
|
"Animation",
|
|
|
|
"Pic",
|
2006-04-29 12:40:09 +00:00
|
|
|
|
|
|
|
"NoAutostartMap",
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
NULL
|
|
|
|
};
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Loads the background - either from a single texture
|
|
|
|
// or an intermission lump.
|
|
|
|
// Unfortunately the texture manager is incapable of recognizing text
|
|
|
|
// files so if you use a script you have to prefix its name by '$' in
|
|
|
|
// MAPINFO.
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
static bool IsExMy(const char * name)
|
|
|
|
{
|
|
|
|
// Only check for the first 3 episodes. They are the only ones with default intermission scripts.
|
|
|
|
// Level names can be upper- and lower case so use tolower to check!
|
|
|
|
return (tolower(name[0])=='e' && name[1]>='1' && name[1]<='3' && tolower(name[2])=='m');
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_LoadBackground(bool isenterpic)
|
|
|
|
{
|
|
|
|
const char * lumpname = NULL;
|
|
|
|
char buffer[10];
|
|
|
|
in_anim_t an;
|
|
|
|
lnode_t pt;
|
2008-06-15 18:36:26 +00:00
|
|
|
FTextureID texture;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
bcnt=0;
|
|
|
|
|
2008-06-15 18:36:26 +00:00
|
|
|
texture.SetInvalid();
|
2006-02-24 04:48:15 +00:00
|
|
|
if (isenterpic)
|
|
|
|
{
|
|
|
|
level_info_t * li = FindLevelInfo(wbs->next);
|
2009-02-03 19:11:43 +00:00
|
|
|
if (li != NULL) lumpname = li->EnterPic;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2009-02-03 19:11:43 +00:00
|
|
|
lumpname = level.info->ExitPic;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// Try to get a default if nothing specified
|
|
|
|
if (lumpname == NULL || lumpname[0]==0)
|
|
|
|
{
|
|
|
|
lumpname = NULL;
|
|
|
|
switch(gameinfo.gametype)
|
|
|
|
{
|
2008-08-30 19:44:19 +00:00
|
|
|
case GAME_Chex:
|
2006-02-24 04:48:15 +00:00
|
|
|
case GAME_Doom:
|
2009-03-22 11:37:56 +00:00
|
|
|
if (!(gameinfo.flags & GI_MAPxx))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
const char *level = isenterpic ? wbs->next : wbs->current;
|
2006-02-24 04:48:15 +00:00
|
|
|
if (IsExMy(level))
|
|
|
|
{
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf(buffer, countof(buffer), "$IN_EPI%c", level[1]);
|
2006-02-24 04:48:15 +00:00
|
|
|
lumpname = buffer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!lumpname)
|
|
|
|
{
|
|
|
|
if (isenterpic)
|
|
|
|
{
|
|
|
|
// One special case needs to be handled here!
|
|
|
|
// If going from E1-E3 to E4 the default should be used, not the exit pic.
|
|
|
|
|
|
|
|
// Not if the exit pic is user defined!
|
2009-02-03 19:11:43 +00:00
|
|
|
if (level.info->ExitPic.IsNotEmpty()) return;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-04-11 08:36:23 +00:00
|
|
|
// E1-E3 need special treatment when playing Doom 1.
|
2009-03-22 11:37:56 +00:00
|
|
|
if (!(gameinfo.flags & GI_MAPxx))
|
2006-04-11 08:36:23 +00:00
|
|
|
{
|
|
|
|
// not if the last level is not from the first 3 episodes
|
|
|
|
if (!IsExMy(wbs->current)) return;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2006-04-11 08:36:23 +00:00
|
|
|
// not if the next level is one of the first 3 episodes
|
|
|
|
if (IsExMy(wbs->next)) return;
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
lumpname = "INTERPIC";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GAME_Heretic:
|
|
|
|
if (isenterpic)
|
|
|
|
{
|
|
|
|
if (IsExMy(wbs->next))
|
|
|
|
{
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
mysnprintf(buffer, countof(buffer), "$IN_HTC%c", wbs->next[1]);
|
2006-02-24 04:48:15 +00:00
|
|
|
lumpname = buffer;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (!lumpname)
|
|
|
|
{
|
|
|
|
if (isenterpic) return;
|
|
|
|
lumpname = "FLOOR16";
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GAME_Hexen:
|
|
|
|
if (isenterpic) return;
|
|
|
|
lumpname = "INTERPIC";
|
|
|
|
break;
|
|
|
|
|
|
|
|
case GAME_Strife:
|
|
|
|
default:
|
2007-01-05 22:08:57 +00:00
|
|
|
// Strife doesn't have an intermission pic so choose something neutral.
|
2006-02-24 04:48:15 +00:00
|
|
|
if (isenterpic) return;
|
|
|
|
lumpname = gameinfo.borderFlat;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (lumpname == NULL)
|
|
|
|
{
|
|
|
|
// shouldn't happen!
|
|
|
|
background = NULL;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
lnodes.Clear();
|
|
|
|
anims.Clear();
|
|
|
|
yah.Clear();
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
splat = NULL;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// a name with a starting '$' indicates an intermission script
|
|
|
|
if (*lumpname!='$')
|
|
|
|
{
|
|
|
|
texture = TexMan.CheckForTexture(lumpname, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-04-05 12:14:33 +00:00
|
|
|
int lumpnum=Wads.CheckNumForFullName(lumpname+1, true);
|
2006-02-24 04:48:15 +00:00
|
|
|
if (lumpnum>=0)
|
|
|
|
{
|
2008-04-03 03:19:21 +00:00
|
|
|
FScanner sc(lumpnum);
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
while (sc.GetString())
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
memset(&an,0,sizeof(an));
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
int caseval = sc.MustMatchString(WI_Cmd);
|
2006-02-24 04:48:15 +00:00
|
|
|
switch(caseval)
|
|
|
|
{
|
|
|
|
case 0: // Background
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetString();
|
2008-11-27 17:43:36 +00:00
|
|
|
texture = TexMan.CheckForTexture(sc.String, FTexture::TEX_MiscPatch, FTextureManager::TEXMAN_TryAny);
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 1: // Splat
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetString();
|
2008-11-27 17:43:36 +00:00
|
|
|
splat = TexMan[sc.String];
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 2: // Pointers
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
while (sc.GetString() && !sc.Crossed)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-01-26 23:20:34 +00:00
|
|
|
yah.Push(TexMan[sc.String]);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-11-27 17:43:36 +00:00
|
|
|
if (sc.Crossed)
|
|
|
|
sc.UnGet();
|
2006-02-24 04:48:15 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 3: // Spots
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetStringName("{");
|
|
|
|
while (!sc.CheckString("}"))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetString();
|
|
|
|
strncpy(pt.level, sc.String,8);
|
|
|
|
pt.level[8] = 0;
|
|
|
|
sc.MustGetNumber();
|
|
|
|
pt.x = sc.Number;
|
|
|
|
sc.MustGetNumber();
|
|
|
|
pt.y = sc.Number;
|
2006-02-24 04:48:15 +00:00
|
|
|
lnodes.Push(pt);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 4: // IfEntering
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFENTERING;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 5: // IfEntering
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFNOTENTERING;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 6: // IfVisited
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFVISITED;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 7: // IfNotVisited
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFNOTVISITED;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 8: // IfLeaving
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFLEAVING;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 9: // IfNotLeaving
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFNOTLEAVING;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 10: // IfTravelling
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFTRAVELLING;
|
|
|
|
sc.MustGetString();
|
|
|
|
strncpy(an.levelname2, sc.String, 8);
|
|
|
|
an.levelname2[8] = 0;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
|
|
|
case 11: // IfNotTravelling
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.type = ANIM_IFTRAVELLING;
|
|
|
|
sc.MustGetString();
|
|
|
|
strncpy(an.levelname2, sc.String, 8);
|
|
|
|
an.levelname2[8] = 0;
|
2006-02-24 04:48:15 +00:00
|
|
|
goto readanimation;
|
|
|
|
|
2006-05-15 15:28:46 +00:00
|
|
|
case 14: // NoAutostartMap
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
noautostartmap = true;
|
2006-05-15 15:28:46 +00:00
|
|
|
break;
|
|
|
|
|
2006-02-24 04:48:15 +00:00
|
|
|
readanimation:
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetString();
|
|
|
|
strncpy(an.levelname, sc.String, 8);
|
|
|
|
an.levelname[8] = 0;
|
|
|
|
sc.MustGetString();
|
|
|
|
caseval=sc.MustMatchString(WI_Cmd);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
default:
|
|
|
|
switch (caseval)
|
|
|
|
{
|
|
|
|
case 12: // Animation
|
|
|
|
an.type |= ANIM_ALWAYS;
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetNumber();
|
|
|
|
an.loc.x = sc.Number;
|
|
|
|
sc.MustGetNumber();
|
|
|
|
an.loc.y = sc.Number;
|
|
|
|
sc.MustGetNumber();
|
|
|
|
an.period = sc.Number;
|
|
|
|
an.nexttic = 1 + (M_Random() % an.period);
|
|
|
|
if (sc.GetString())
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
if (sc.Compare("ONCE"))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.data = 1;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.UnGet();
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
if (!sc.CheckString("{"))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetString();
|
2008-01-26 23:20:34 +00:00
|
|
|
an.p[an.nanims++] = TexMan[sc.String];
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
while (!sc.CheckString("}"))
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetString();
|
|
|
|
if (an.nanims<MAX_ANIMATION_FRAMES)
|
2008-01-26 23:20:34 +00:00
|
|
|
an.p[an.nanims++] = TexMan[sc.String];
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
an.ctr = -1;
|
2006-02-24 04:48:15 +00:00
|
|
|
anims.Push(an);
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 13: // Pic
|
|
|
|
an.type |= ANIM_PIC;
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.MustGetNumber();
|
|
|
|
an.loc.x = sc.Number;
|
|
|
|
sc.MustGetNumber();
|
|
|
|
an.loc.y = sc.Number;
|
|
|
|
sc.MustGetString();
|
2008-01-26 23:20:34 +00:00
|
|
|
an.p[0] = TexMan[sc.String];
|
2006-02-24 04:48:15 +00:00
|
|
|
anims.Push(an);
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
- Updated lempar.c to v1.31.
- Added .txt files to the list of types (wad, zip, and pk3) that can be
loaded without listing them after -file.
- Fonts that are created by the ACS setfont command to wrap a texture now
support animated textures.
- FON2 fonts can now use their full palette for CR_UNTRANSLATED when drawn
with the hardware 2D path instead of being restricted to the game palette.
- Fixed: Toggling vid_vsync would reset the displayed fullscreen gamma to 1
on a Radeon 9000.
- Added back the off-by-one palette handling, but in a much more limited
scope than before. The skipped entry is assumed to always be at 248, and
it is assumed that all Shader Model 1.4 cards suffer from this. That's
because all SM1.4 cards are based on variants of the ATI R200 core, and the
RV250 in a Radeon 9000 craps up like this. I see no reason to assume that
other flavors of the R200 are any different. (Interesting note: With the
Radeon 9000, D3DTADDRESS_CLAMP is an invalid address mode when using the
debug Direct3D 9 runtime, but it works perfectly fine with the retail
Direct3D 9 runtime.) (Insight: The R200 probably uses bytes for all its
math inside pixel shaders. That would explain perfectly why I can't use
constants greater than 1 with PS1.4 and why it can't do an exact mapping to
every entry in the color palette.
- Fixed: The software shaded drawer did not work for 2D, because its selected
"color"map was replaced with the identitymap before being used.
- Fixed: I cannot use Printf to output messages before the framebuffer was
completely setup, meaning that Shader Model 1.4 cards could not change
resolution.
- I have decided to let remap palettes specify variable alpha values for
their colors. D3DFB no longer forces them to 255.
- Updated re2c to version 0.12.3.
- Fixed: A_Wander used threshold as a timer, when it should have used
reactiontime.
- Fixed: A_CustomRailgun would not fire at all for actors without a target
when the aim parameter was disabled.
- Made the warp command work in multiplayer, again courtesy of Karate Chris.
- Fixed: Trying to spawn a bot while not in a game made for a crashing time.
(Patch courtesy of Karate Chris.)
- Removed some floating point math from hu_scores.cpp that somebody's GCC
gave warnings for (not mine, though).
- Fixed: The SBarInfo drawbar command crashed if the sprite image was
unavailable.
- Fixed: FString::operator=(const char *) did not release its old buffer when
being assigned to the null string.
- The scanner no longer has an upper limit on the length of strings it
accepts, though short strings will be faster than long ones.
- Moved all the text scanning functions into a class. Mainly, this means that
multiple script scanner states can be stored without being forced to do so
recursively. I think I might be taking advantage of that in the near
future. Possibly. Maybe.
- Removed some potential buffer overflows from the decal parser.
- Applied Blzut3's SBARINFO update #9:
* Fixed: When using even length values in drawnumber it would cap to a 98
value instead of a 99 as intended.
* The SBarInfo parser can now accept negatives for coordinates. This
doesn't allow much right now, but later I plan to add better fullscreen
hud support in which the negatives will be more useful. This also cleans
up the source a bit since all calls for (x, y) coordinates are with the
function getCoordinates().
- Added support for stencilling actors.
- Added support for non-black colors specified with DTA_ColorOverlay to the
software renderer.
- Fixed: The inverse, gold, red, and green fixed colormaps each allocated
space for 32 different colormaps, even though each only used the first one.
- Added two new blending flags to make reverse subtract blending more useful:
STYLEF_InvertSource and STYLEF_InvertOverlay. These invert the color that
gets blended with the background, since that seems like a good idea for
reverse subtraction. They also work with the other two blending operations.
- Added subtract and reverse subtract blending operations to the renderer.
Since the ERenderStyle enumeration was getting rather unwieldy, I converted
it into a new FRenderStyle structure that lets each parameter of the
blending equation be set separately. This simplified the set up for the
blend quite a bit, and it means a number of new combinations are available
by setting the parameters properly.
SVN r710 (trunk)
2008-01-25 23:57:44 +00:00
|
|
|
sc.ScriptError("Unknown token %s in intermission script", sc.String);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
Printf("Intermission script %s not found!\n", lumpname+1);
|
|
|
|
texture = TexMan.GetTexture("INTERPIC", FTexture::TEX_MiscPatch);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
background=TexMan[texture];
|
|
|
|
}
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// made this more generic and configurable through a script
|
|
|
|
// Removed all the ugly special case handling for different game modes
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
|
|
|
|
void WI_updateAnimatedBack()
|
|
|
|
{
|
2006-04-13 02:01:40 +00:00
|
|
|
unsigned int i;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
for(i=0;i<anims.Size();i++)
|
|
|
|
{
|
|
|
|
in_anim_t * a = &anims[i];
|
|
|
|
switch (a->type & ANIM_TYPE)
|
|
|
|
{
|
|
|
|
case ANIM_ALWAYS:
|
|
|
|
if (bcnt >= a->nexttic)
|
|
|
|
{
|
|
|
|
if (++a->ctr >= a->nanims)
|
|
|
|
{
|
|
|
|
if (a->data==0) a->ctr = 0;
|
|
|
|
else a->ctr--;
|
|
|
|
}
|
|
|
|
a->nexttic = bcnt + a->period;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_PIC:
|
|
|
|
a->ctr = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws the background including all animations
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
|
|
|
|
void WI_drawBackground()
|
|
|
|
{
|
2006-04-13 02:01:40 +00:00
|
|
|
unsigned int i;
|
2009-11-15 14:33:35 +00:00
|
|
|
double animwidth=320; // For a flat fill or clear background scale animations to 320x200
|
|
|
|
double animheight=200;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (background)
|
|
|
|
{
|
|
|
|
// background
|
|
|
|
if (background->UseType == FTexture::TEX_MiscPatch)
|
|
|
|
{
|
|
|
|
// scale all animations below to fit the size of the base pic
|
|
|
|
// The base pic is always scaled to fit the screen so this allows
|
|
|
|
// placing the animations precisely where they belong on the base pic
|
2009-11-15 14:33:35 +00:00
|
|
|
animwidth = background->GetScaledWidth();
|
|
|
|
animheight = background->GetScaledHeight();
|
2006-02-24 04:48:15 +00:00
|
|
|
screen->FillBorder (NULL);
|
2009-11-15 14:33:35 +00:00
|
|
|
screen->DrawTexture(background, 0, 0, DTA_Fullscreen, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
screen->FlatFill(0, 0, SCREENWIDTH, SCREENHEIGHT, background);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2007-12-22 04:52:51 +00:00
|
|
|
screen->Clear(0,0, SCREENWIDTH, SCREENHEIGHT, 0, 0);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
for(i=0;i<anims.Size();i++)
|
|
|
|
{
|
|
|
|
in_anim_t * a = &anims[i];
|
|
|
|
level_info_t * li;
|
|
|
|
|
|
|
|
switch (a->type & ANIM_CONDITION)
|
|
|
|
{
|
|
|
|
case ANIM_IFVISITED:
|
|
|
|
li = FindLevelInfo(a->levelname);
|
|
|
|
if (li == NULL || !(li->flags & LEVEL_VISITED)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_IFNOTVISITED:
|
|
|
|
li = FindLevelInfo(a->levelname);
|
|
|
|
if (li == NULL || (li->flags & LEVEL_VISITED)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
// StatCount means 'leaving' - everything else means 'entering'!
|
|
|
|
case ANIM_IFENTERING:
|
|
|
|
if (state == StatCount || strnicmp(a->levelname, wbs->next, 8)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_IFNOTENTERING:
|
|
|
|
if (state != StatCount && !strnicmp(a->levelname, wbs->next, 8)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_IFLEAVING:
|
|
|
|
if (state != StatCount || strnicmp(a->levelname, wbs->current, 8)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_IFNOTLEAVING:
|
|
|
|
if (state == StatCount && !strnicmp(a->levelname, wbs->current, 8)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_IFTRAVELLING:
|
|
|
|
if (strnicmp(a->levelname2, wbs->current, 8) || strnicmp(a->levelname, wbs->next, 8)) continue;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ANIM_IFNOTTRAVELLING:
|
|
|
|
if (!strnicmp(a->levelname2, wbs->current, 8) && !strnicmp(a->levelname, wbs->next, 8)) continue;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
if (a->ctr >= 0)
|
|
|
|
screen->DrawTexture(a->p[a->ctr], a->loc.x, a->loc.y,
|
2009-11-15 14:33:35 +00:00
|
|
|
DTA_VirtualWidthF, animwidth, DTA_VirtualHeightF, animheight, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws a single character with a shadow
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
static int WI_DrawCharPatch (FFont *font, int charcode, int x, int y, EColorRange translation=CR_UNTRANSLATED, bool nomove=false)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
int width;
|
2008-12-16 03:15:03 +00:00
|
|
|
screen->DrawTexture(font->GetChar(charcode, &width), x, y,
|
|
|
|
nomove ? DTA_CleanNoMove : DTA_Clean, true,
|
2008-11-27 17:43:36 +00:00
|
|
|
DTA_ShadowAlpha, (gameinfo.gametype & GAME_DoomChex) ? 0 : FRACUNIT/2,
|
2008-12-16 03:15:03 +00:00
|
|
|
DTA_Translation, font->GetColorTranslation(translation),
|
2008-11-27 17:43:36 +00:00
|
|
|
TAG_DONE);
|
|
|
|
return x - width;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws a level name with the big font
|
|
|
|
//
|
|
|
|
// x is no longer passed as a parameter because the text is now broken into several lines
|
|
|
|
// if it is too long
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
|
2008-11-27 18:46:09 +00:00
|
|
|
int WI_DrawName(int y, const char *levelname)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2006-12-21 04:34:43 +00:00
|
|
|
int i;
|
2006-02-24 04:48:15 +00:00
|
|
|
size_t l;
|
2008-11-27 17:43:36 +00:00
|
|
|
const char *p;
|
|
|
|
int h = 0;
|
2006-02-24 04:48:15 +00:00
|
|
|
int lumph;
|
|
|
|
|
2008-11-27 18:46:09 +00:00
|
|
|
lumph = BigFont->GetHeight() * CleanYfac;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
p = levelname;
|
2009-02-03 19:11:43 +00:00
|
|
|
if (!p) return 0;
|
2008-11-27 17:43:36 +00:00
|
|
|
l = strlen(p);
|
2006-02-24 04:48:15 +00:00
|
|
|
if (!l) return 0;
|
|
|
|
|
2008-11-27 18:46:09 +00:00
|
|
|
FBrokenLines *lines = V_BreakLines(BigFont, screen->GetWidth() / CleanXfac, p);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
if (lines)
|
|
|
|
{
|
2006-08-31 00:16:12 +00:00
|
|
|
for (i = 0; lines[i].Width >= 0; i++)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
screen->DrawText(BigFont, CR_UNTRANSLATED, (SCREENWIDTH - lines[i].Width * CleanXfac) / 2, y + h,
|
|
|
|
lines[i].Text, DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
h += lumph;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
V_FreeBrokenLines(lines);
|
|
|
|
}
|
2008-11-27 17:43:36 +00:00
|
|
|
return h + lumph/4;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws "<Levelname> Finished!"
|
|
|
|
//
|
|
|
|
// Either uses the specified patch or the big font
|
|
|
|
// A level name patch can be specified for all games now, not just Doom.
|
|
|
|
//
|
|
|
|
//====================================================================
|
2008-12-16 03:15:03 +00:00
|
|
|
int WI_drawLF ()
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
int y = WI_TITLEY * CleanYfac;
|
|
|
|
int midx = screen->GetWidth() / 2;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
FTexture *tex = wbs->LName0;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// draw <LevelName>
|
|
|
|
if (tex)
|
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
screen->DrawTexture(tex, midx - tex->GetWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
2008-11-30 01:43:00 +00:00
|
|
|
y += (tex->GetHeight() + BigFont->GetHeight()/4) * CleanYfac;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
y += WI_DrawName(y, lnametexts[0]);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// draw "Finished!"
|
2008-11-27 17:43:36 +00:00
|
|
|
FFont *font = gameinfo.gametype & GAME_Raven ? SmallFont : BigFont;
|
2008-11-30 17:57:25 +00:00
|
|
|
if (y < (NG_STATSY - font->GetHeight()*3/4) * CleanYfac)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
// don't draw 'finished' if the level name is too high!
|
2008-08-30 19:44:19 +00:00
|
|
|
if (gameinfo.gametype & GAME_DoomChex)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
screen->DrawTexture(finished, midx - finished->GetWidth()*CleanXfac/2, y, DTA_CleanNoMove, true, TAG_DONE);
|
2008-12-16 03:15:03 +00:00
|
|
|
return y + finished->GetHeight() * CleanYfac;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText(font, CR_WHITE,
|
2008-12-02 02:23:05 +00:00
|
|
|
midx - font->StringWidth("finished")*CleanXfac/2, y - 4*CleanYfac, "finished",
|
2008-11-27 18:46:09 +00:00
|
|
|
DTA_CleanNoMove, true, TAG_DONE);
|
2008-12-16 03:15:03 +00:00
|
|
|
return y + font->GetHeight() * CleanYfac;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
2008-12-16 03:15:03 +00:00
|
|
|
return y;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws "Entering <LevelName>"
|
|
|
|
//
|
|
|
|
// Either uses the specified patch or the big font
|
|
|
|
// A level name patch can be specified for all games now, not just Doom.
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
void WI_drawEL ()
|
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
int y = WI_TITLEY * CleanYfac;
|
2008-11-27 17:43:36 +00:00
|
|
|
FFont *font = gameinfo.gametype & GAME_Raven ? SmallFont : BigFont;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// draw "entering"
|
|
|
|
// be careful with the added height so that it works for oversized 'entering' patches!
|
2008-08-30 19:44:19 +00:00
|
|
|
if (gameinfo.gametype & GAME_DoomChex)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
screen->DrawTexture(entering, (SCREENWIDTH - entering->GetWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
y += (entering->GetHeight() + font->GetHeight()/4) * CleanYfac;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText(font, CR_WHITE,
|
2008-11-27 18:46:09 +00:00
|
|
|
(SCREENWIDTH - font->StringWidth("now entering:") * CleanXfac) / 2, y,
|
2006-02-24 04:48:15 +00:00
|
|
|
"now entering:", DTA_CleanNoMove, true, TAG_DONE);
|
2008-11-27 18:46:09 +00:00
|
|
|
y += font->GetHeight()*5*CleanYfac/4;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
// draw <LevelName>
|
2008-11-27 18:46:09 +00:00
|
|
|
FTexture *tex = wbs->LName1;
|
2006-02-24 04:48:15 +00:00
|
|
|
if (tex)
|
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
screen->DrawTexture(tex, (SCREENWIDTH - tex->GetWidth() * CleanXfac) / 2, y, DTA_CleanNoMove, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 18:46:09 +00:00
|
|
|
WI_DrawName(y, lnametexts[1]);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws the splats and the 'You are here' arrows
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
|
About a week's worth of changes here. As a heads-up, I wouldn't be
surprised if this doesn't build in Linux right now. The CMakeLists.txt
were checked with MinGW and NMake, but how they fair under Linux is an
unknown to me at this time.
- Converted most sprintf (and all wsprintf) calls to either mysnprintf or
FStrings, depending on the situation.
- Changed the strings in the wbstartstruct to be FStrings.
- Changed myvsnprintf() to output nothing if count is greater than INT_MAX.
This is so that I can use a series of mysnprintf() calls and advance the
pointer for each one. Once the pointer goes beyond the end of the buffer,
the count will go negative, but since it's an unsigned type it will be
seen as excessively huge instead. This should not be a problem, as there's
no reason for ZDoom to be using text buffers larger than 2 GB anywhere.
- Ripped out the disabled bit from FGameConfigFile::MigrateOldConfig().
- Changed CalcMapName() to return an FString instead of a pointer to a static
buffer.
- Changed startmap in d_main.cpp into an FString.
- Changed CheckWarpTransMap() to take an FString& as the first argument.
- Changed d_mapname in g_level.cpp into an FString.
- Changed DoSubstitution() in ct_chat.cpp to place the substitutions in an
FString.
- Fixed: The MAPINFO parser wrote into the string buffer to construct a map
name when given a Hexen map number. This was fine with the old scanner
code, but only a happy coincidence prevents it from crashing with the new
code
- Added the 'B' conversion specifier to StringFormat::VWorker() for printing
binary numbers.
- Added CMake support for building with MinGW, MSYS, and NMake. Linux support
is probably broken until I get around to booting into Linux again. Niceties
provided over the existing Makefiles they're replacing:
* All command-line builds can use the same build system, rather than having
a separate one for MinGW and another for Linux.
* Microsoft's NMake tool is supported as a target.
* Progress meters.
* Parallel makes work from a fresh checkout without needing to be primed
first with a single-threaded make.
* Porting to other architectures should be simplified, whenever that day
comes.
- Replaced the makewad tool with zipdir. This handles the dependency tracking
itself instead of generating an external makefile to do it, since I couldn't
figure out how to generate a makefile with an external tool and include it
with a CMake-generated makefile. Where makewad used a master list of files
to generate the package file, zipdir just zips the entire contents of one or
more directories.
- Added the gdtoa package from netlib's fp library so that ZDoom's printf-style
formatting can be entirely independant of the CRT.
SVN r1082 (trunk)
2008-07-23 04:57:26 +00:00
|
|
|
int WI_MapToIndex (const char *map)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2006-04-13 02:01:40 +00:00
|
|
|
unsigned int i;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
for (i = 0; i < lnodes.Size(); i++)
|
|
|
|
{
|
|
|
|
if (!strnicmp (lnodes[i].level, map, 8))
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
return i;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Draws the splats and the 'You are here' arrows
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
|
|
|
|
void WI_drawOnLnode( int n, FTexture * c[] ,int numc)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
for(i=0;i<numc;i++)
|
|
|
|
{
|
|
|
|
int left;
|
|
|
|
int top;
|
|
|
|
int right;
|
|
|
|
int bottom;
|
|
|
|
|
|
|
|
|
|
|
|
right = c[i]->GetWidth();
|
|
|
|
bottom = c[i]->GetHeight();
|
|
|
|
left = lnodes[n].x - c[i]->LeftOffset;
|
|
|
|
top = lnodes[n].y - c[i]->TopOffset;
|
|
|
|
right += left;
|
|
|
|
bottom += top;
|
|
|
|
|
|
|
|
if (left >= 0 && right < 320 && top >= 0 && bottom < 200)
|
|
|
|
{
|
|
|
|
screen->DrawTexture (c[i], lnodes[n].x, lnodes[n].y, DTA_320x200, true, TAG_DONE);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
//====================================================================
|
2006-02-24 04:48:15 +00:00
|
|
|
//
|
|
|
|
// Draws a number.
|
|
|
|
// If digits > 0, then use that many digits minimum,
|
|
|
|
// otherwise only use as many as necessary.
|
2008-11-27 17:43:36 +00:00
|
|
|
// x is the right edge of the number.
|
|
|
|
// Returns new x position, that is, the left edge of the number.
|
2006-02-24 04:48:15 +00:00
|
|
|
//
|
2008-11-27 17:43:36 +00:00
|
|
|
//====================================================================
|
2008-12-16 03:15:03 +00:00
|
|
|
int WI_drawNum (FFont *font, int x, int y, int n, int digits, bool leadingzeros=true, EColorRange translation=CR_UNTRANSLATED)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
int fontwidth = font->GetCharWidth('3');
|
2006-02-24 04:48:15 +00:00
|
|
|
char text[8];
|
2008-11-27 17:43:36 +00:00
|
|
|
int len;
|
2006-02-24 04:48:15 +00:00
|
|
|
char *text_p;
|
2008-12-16 03:15:03 +00:00
|
|
|
bool nomove = font != IntermissionFont;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
if (nomove)
|
|
|
|
{
|
|
|
|
fontwidth *= CleanXfac;
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
if (leadingzeros)
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
len = mysnprintf (text, countof(text), "%0*d", digits, n);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
len = mysnprintf (text, countof(text), "%d", n);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-11-27 17:43:36 +00:00
|
|
|
text_p = text + MIN<int>(len, countof(text)-1);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
while (--text_p >= text)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
// Digits are centered in a box the width of the '3' character.
|
|
|
|
// Other characters (specifically, '-') are right-aligned in their cell.
|
2006-02-24 04:48:15 +00:00
|
|
|
if (*text_p >= '0' && *text_p <= '9')
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
x -= fontwidth;
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_DrawCharPatch(font, *text_p, x + (fontwidth - font->GetCharWidth(*text_p)) / 2, y, translation, nomove);
|
2008-11-27 17:43:36 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_DrawCharPatch(font, *text_p, x - font->GetCharWidth(*text_p), y, translation, nomove);
|
2008-11-27 17:43:36 +00:00
|
|
|
x -= fontwidth;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-11-27 17:43:36 +00:00
|
|
|
}
|
|
|
|
if (len < digits)
|
|
|
|
{
|
|
|
|
x -= fontwidth * (digits - len);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
//====================================================================
|
2006-02-24 04:48:15 +00:00
|
|
|
//
|
|
|
|
//
|
|
|
|
//
|
2008-11-27 17:43:36 +00:00
|
|
|
//====================================================================
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
void WI_drawPercent (FFont *font, int x, int y, int p, int b, bool show_total=true, EColorRange color=CR_UNTRANSLATED)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (p < 0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
if (wi_percents)
|
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
if (font != IntermissionFont)
|
|
|
|
{
|
|
|
|
x -= font->GetCharWidth('%') * CleanXfac;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
x -= font->GetCharWidth('%');
|
|
|
|
}
|
|
|
|
screen->DrawText(font, color, x, y, "%", font != IntermissionFont ? DTA_CleanNoMove : DTA_Clean, true, TAG_DONE);
|
|
|
|
if (font != IntermissionFont)
|
|
|
|
{
|
|
|
|
x -= 2*CleanXfac;
|
|
|
|
}
|
|
|
|
WI_drawNum(font, x, y, b == 0 ? 100 : p * 100 / b, -1, false, color);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
if (show_total)
|
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
x = WI_drawNum(font, x, y, b, 2, false);
|
|
|
|
x -= font->GetCharWidth('/');
|
|
|
|
screen->DrawText (IntermissionFont, color, x, y, "/",
|
2008-11-27 17:43:36 +00:00
|
|
|
DTA_Clean, true, TAG_DONE);
|
|
|
|
}
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawNum (font, x, y, p, -1, false, color);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
//====================================================================
|
|
|
|
//
|
|
|
|
// Display level completion time and par, or "sucks" message if overflow.
|
|
|
|
//
|
|
|
|
//====================================================================
|
|
|
|
void WI_drawTime (int x, int y, int t, bool no_sucks=false)
|
|
|
|
{
|
|
|
|
bool sucky;
|
|
|
|
|
|
|
|
if (t<0)
|
|
|
|
return;
|
|
|
|
|
|
|
|
sucky = !no_sucks && t >= wbs->sucktime * 60 * 60 && wbs->sucktime > 0;
|
|
|
|
|
|
|
|
if (sucky)
|
|
|
|
{ // "sucks"
|
|
|
|
if (sucks != NULL)
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawTexture (sucks, x - sucks->GetWidth(), y - IntermissionFont->GetHeight() - 2,
|
2006-02-24 04:48:15 +00:00
|
|
|
DTA_Clean, true, TAG_DONE);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (BigFont, CR_UNTRANSLATED, x - BigFont->StringWidth("SUCKS"), y - IntermissionFont->GetHeight() - 2,
|
2006-02-24 04:48:15 +00:00
|
|
|
"SUCKS", DTA_Clean, true, TAG_DONE);
|
|
|
|
}
|
|
|
|
}
|
2008-11-27 17:43:36 +00:00
|
|
|
|
|
|
|
int hours = t / 3600;
|
|
|
|
t -= hours * 3600;
|
|
|
|
int minutes = t / 60;
|
|
|
|
t -= minutes * 60;
|
|
|
|
int seconds = t;
|
|
|
|
|
|
|
|
// Why were these offsets hard coded? Half the WADs with custom patches
|
|
|
|
// I tested screwed up miserably in this function!
|
|
|
|
int num_spacing = IntermissionFont->GetCharWidth('3');
|
|
|
|
int colon_spacing = IntermissionFont->GetCharWidth(':');
|
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
x = WI_drawNum (IntermissionFont, x, y, seconds, 2) - 1;
|
|
|
|
WI_DrawCharPatch (IntermissionFont, ':', x -= colon_spacing, y);
|
|
|
|
x = WI_drawNum (IntermissionFont, x, y, minutes, 2, hours!=0);
|
2008-11-27 17:43:36 +00:00
|
|
|
if (hours)
|
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_DrawCharPatch (IntermissionFont, ':', x -= colon_spacing, y);
|
|
|
|
WI_drawNum (IntermissionFont, x, y, hours, 2);
|
2008-11-27 17:43:36 +00:00
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
void WI_End ()
|
|
|
|
{
|
|
|
|
state = LeavingIntermission;
|
|
|
|
WI_unloadData ();
|
|
|
|
|
|
|
|
//Added by mc
|
|
|
|
if (deathmatch)
|
|
|
|
{
|
2008-03-28 00:38:17 +00:00
|
|
|
bglobal.RemoveAllBots (consoleplayer != Net_Arbitrator);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_initNoState ()
|
|
|
|
{
|
|
|
|
state = NoState;
|
|
|
|
acceleratestage = 0;
|
|
|
|
cnt = 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_updateNoState ()
|
|
|
|
{
|
|
|
|
WI_updateAnimatedBack();
|
|
|
|
|
2006-04-29 12:40:09 +00:00
|
|
|
|
|
|
|
if (!wi_noautostartmap && !noautostartmap) cnt--;
|
|
|
|
if (acceleratestage) cnt=0;
|
|
|
|
|
|
|
|
if (cnt==0)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
WI_End();
|
|
|
|
G_WorldDone();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2006-09-14 00:02:31 +00:00
|
|
|
static bool snl_pointeron = false;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
void WI_initShowNextLoc ()
|
|
|
|
{
|
|
|
|
if (wbs->next_ep == -1)
|
|
|
|
{
|
|
|
|
// Last map in episode - there is no next location!
|
|
|
|
WI_End();
|
|
|
|
G_WorldDone();
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
state = ShowNextLoc;
|
|
|
|
acceleratestage = 0;
|
|
|
|
cnt = SHOWNEXTLOCDELAY * TICRATE;
|
|
|
|
WI_LoadBackground(true);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_updateShowNextLoc ()
|
|
|
|
{
|
|
|
|
WI_updateAnimatedBack();
|
|
|
|
|
|
|
|
if (!--cnt || acceleratestage)
|
|
|
|
WI_initNoState();
|
|
|
|
else
|
|
|
|
snl_pointeron = (cnt & 31) < 20;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_drawShowNextLoc(void)
|
|
|
|
{
|
2006-04-13 02:01:40 +00:00
|
|
|
unsigned int i;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
WI_drawBackground();
|
|
|
|
|
|
|
|
if (splat)
|
|
|
|
{
|
|
|
|
for (i=0 ; i<lnodes.Size() ; i++)
|
|
|
|
{
|
|
|
|
level_info_t * li = FindLevelInfo (lnodes[i].level);
|
|
|
|
if (li && li->flags & LEVEL_VISITED) WI_drawOnLnode(i, &splat,1); // draw a splat on taken cities.
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// draw flashing ptr
|
|
|
|
if (snl_pointeron && yah.Size())
|
|
|
|
{
|
|
|
|
unsigned int v = WI_MapToIndex (wbs->next);
|
|
|
|
// Draw only if it points to a valid level on the current screen!
|
|
|
|
if (v<lnodes.Size()) WI_drawOnLnode (v, &yah[0], yah.Size());
|
|
|
|
}
|
|
|
|
|
|
|
|
// draws which level you are entering..
|
|
|
|
WI_drawEL ();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_drawNoState ()
|
|
|
|
{
|
|
|
|
snl_pointeron = true;
|
|
|
|
WI_drawShowNextLoc();
|
|
|
|
}
|
|
|
|
|
|
|
|
int WI_fragSum (int playernum)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
int frags = 0;
|
|
|
|
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i]
|
|
|
|
&& i!=playernum)
|
|
|
|
{
|
|
|
|
frags += plrs[playernum].frags[i];
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// JDC hack - negative frags.
|
|
|
|
frags -= plrs[playernum].frags[playernum];
|
|
|
|
|
|
|
|
return frags;
|
|
|
|
}
|
|
|
|
|
|
|
|
static int dm_state;
|
|
|
|
static int dm_frags[MAXPLAYERS][MAXPLAYERS];
|
|
|
|
static int dm_totals[MAXPLAYERS];
|
|
|
|
|
|
|
|
void WI_initDeathmatchStats (void)
|
|
|
|
{
|
|
|
|
|
|
|
|
int i, j;
|
|
|
|
|
|
|
|
state = StatCount;
|
|
|
|
acceleratestage = 0;
|
|
|
|
dm_state = 1;
|
|
|
|
|
|
|
|
cnt_pause = TICRATE;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
for (j=0 ; j<MAXPLAYERS ; j++)
|
|
|
|
if (playeringame[j])
|
|
|
|
dm_frags[i][j] = 0;
|
|
|
|
|
|
|
|
dm_totals[i] = 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_updateDeathmatchStats ()
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
int i, j;
|
2006-09-14 00:02:31 +00:00
|
|
|
bool stillticking;
|
2006-02-24 04:48:15 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
WI_updateAnimatedBack();
|
|
|
|
|
|
|
|
if (acceleratestage && dm_state != 4)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
acceleratestage = 0;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
for (j=0 ; j<MAXPLAYERS ; j++)
|
|
|
|
if (playeringame[j])
|
|
|
|
dm_frags[i][j] = plrs[i].frags[j];
|
|
|
|
|
|
|
|
dm_totals[i] = WI_fragSum(i);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
*/
|
|
|
|
dm_state = 4;
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (dm_state == 2)
|
|
|
|
{
|
|
|
|
/*
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
stillticking = false;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
for (j=0 ; j<MAXPLAYERS ; j++)
|
|
|
|
{
|
|
|
|
if (playeringame[j]
|
|
|
|
&& dm_frags[i][j] != plrs[i].frags[j])
|
|
|
|
{
|
|
|
|
if (plrs[i].frags[j] < 0)
|
|
|
|
dm_frags[i][j]--;
|
|
|
|
else
|
|
|
|
dm_frags[i][j]++;
|
|
|
|
|
|
|
|
if (dm_frags[i][j] > 99)
|
|
|
|
dm_frags[i][j] = 99;
|
|
|
|
|
|
|
|
if (dm_frags[i][j] < -99)
|
|
|
|
dm_frags[i][j] = -99;
|
|
|
|
|
|
|
|
stillticking = true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
dm_totals[i] = WI_fragSum(i);
|
|
|
|
|
|
|
|
if (dm_totals[i] > 99)
|
|
|
|
dm_totals[i] = 99;
|
|
|
|
|
|
|
|
if (dm_totals[i] < -99)
|
|
|
|
dm_totals[i] = -99;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
if (!stillticking)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
dm_state++;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
dm_state = 3;
|
|
|
|
}
|
|
|
|
else if (dm_state == 4)
|
|
|
|
{
|
|
|
|
if (acceleratestage)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/pastdmstats", 1, ATTN_NONE);
|
2008-09-14 23:54:38 +00:00
|
|
|
WI_initShowNextLoc();
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (dm_state & 1)
|
|
|
|
{
|
|
|
|
if (!--cnt_pause)
|
|
|
|
{
|
|
|
|
dm_state++;
|
|
|
|
cnt_pause = TICRATE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void WI_drawDeathmatchStats ()
|
|
|
|
{
|
|
|
|
|
|
|
|
// draw animated background
|
|
|
|
WI_drawBackground();
|
|
|
|
WI_drawLF();
|
|
|
|
|
|
|
|
// [RH] Draw heads-up scores display
|
|
|
|
HU_DrawScores (&players[me]);
|
|
|
|
|
|
|
|
/*
|
|
|
|
int i;
|
|
|
|
int j;
|
|
|
|
int x;
|
|
|
|
int y;
|
|
|
|
int w;
|
|
|
|
|
|
|
|
int lh; // line height
|
|
|
|
|
|
|
|
lh = WI_SPACINGY;
|
|
|
|
|
|
|
|
// draw stat titles (top line)
|
|
|
|
V_DrawPatchClean(DM_TOTALSX-LittleShort(total->width)/2,
|
|
|
|
DM_MATRIXY-WI_SPACINGY+10,
|
|
|
|
&FB,
|
|
|
|
total);
|
|
|
|
|
|
|
|
V_DrawPatchClean(DM_KILLERSX, DM_KILLERSY, &FB, killers);
|
|
|
|
V_DrawPatchClean(DM_VICTIMSX, DM_VICTIMSY, &FB, victims);
|
|
|
|
|
|
|
|
// draw P?
|
|
|
|
x = DM_MATRIXX + DM_SPACINGX;
|
|
|
|
y = DM_MATRIXY;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
V_DrawPatchClean(x-LittleShort(p[i]->width)/2,
|
|
|
|
DM_MATRIXY - WI_SPACINGY,
|
|
|
|
&FB,
|
|
|
|
p[i]);
|
|
|
|
|
|
|
|
V_DrawPatchClean(DM_MATRIXX-LittleShort(p[i]->width)/2,
|
|
|
|
y,
|
|
|
|
&FB,
|
|
|
|
p[i]);
|
|
|
|
|
|
|
|
if (i == me)
|
|
|
|
{
|
|
|
|
V_DrawPatchClean(x-LittleShort(p[i]->width)/2,
|
|
|
|
DM_MATRIXY - WI_SPACINGY,
|
|
|
|
&FB,
|
|
|
|
bstar);
|
|
|
|
|
|
|
|
V_DrawPatchClean(DM_MATRIXX-LittleShort(p[i]->width)/2,
|
|
|
|
y,
|
|
|
|
&FB,
|
|
|
|
star);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
x += DM_SPACINGX;
|
|
|
|
y += WI_SPACINGY;
|
|
|
|
}
|
|
|
|
|
|
|
|
// draw stats
|
|
|
|
y = DM_MATRIXY+10;
|
|
|
|
w = LittleShort(num[0]->width);
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
x = DM_MATRIXX + DM_SPACINGX;
|
|
|
|
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
for (j=0 ; j<MAXPLAYERS ; j++)
|
|
|
|
{
|
|
|
|
if (playeringame[j])
|
|
|
|
WI_drawNum(x+w, y, dm_frags[i][j], 2);
|
|
|
|
|
|
|
|
x += DM_SPACINGX;
|
|
|
|
}
|
|
|
|
WI_drawNum(DM_TOTALSX+w, y, dm_totals[i], 2);
|
|
|
|
}
|
|
|
|
y += WI_SPACINGY;
|
|
|
|
}
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
static int cnt_frags[MAXPLAYERS];
|
|
|
|
static int dofrags;
|
|
|
|
static int ng_state;
|
|
|
|
|
|
|
|
void WI_initNetgameStats ()
|
|
|
|
{
|
|
|
|
|
|
|
|
int i;
|
|
|
|
|
|
|
|
state = StatCount;
|
|
|
|
acceleratestage = 0;
|
|
|
|
ng_state = 1;
|
|
|
|
|
|
|
|
cnt_pause = TICRATE;
|
|
|
|
|
|
|
|
for (i = 0; i < MAXPLAYERS; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
cnt_kills[i] = cnt_items[i] = cnt_secret[i] = cnt_frags[i] = 0;
|
|
|
|
|
|
|
|
dofrags += WI_fragSum (i);
|
|
|
|
}
|
|
|
|
|
|
|
|
dofrags = !!dofrags;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_updateNetgameStats ()
|
|
|
|
{
|
|
|
|
|
|
|
|
int i;
|
|
|
|
int fsum;
|
2006-09-14 00:02:31 +00:00
|
|
|
bool stillticking;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
WI_updateAnimatedBack ();
|
|
|
|
|
|
|
|
if (acceleratestage && ng_state != 10)
|
|
|
|
{
|
|
|
|
acceleratestage = 0;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
cnt_kills[i] = plrs[i].skills;
|
|
|
|
cnt_items[i] = plrs[i].sitems;
|
|
|
|
cnt_secret[i] = plrs[i].ssecret;
|
|
|
|
|
|
|
|
if (dofrags)
|
|
|
|
cnt_frags[i] = WI_fragSum (i);
|
|
|
|
}
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
ng_state = 10;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ng_state == 2)
|
|
|
|
{
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
stillticking = false;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
cnt_kills[i] += 2;
|
|
|
|
|
|
|
|
if (cnt_kills[i] > plrs[i].skills)
|
|
|
|
cnt_kills[i] = plrs[i].skills;
|
|
|
|
else
|
|
|
|
stillticking = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!stillticking)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
ng_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ng_state == 4)
|
|
|
|
{
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
stillticking = false;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
cnt_items[i] += 2;
|
|
|
|
if (cnt_items[i] > plrs[i].sitems)
|
|
|
|
cnt_items[i] = plrs[i].sitems;
|
|
|
|
else
|
|
|
|
stillticking = true;
|
|
|
|
}
|
|
|
|
if (!stillticking)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
ng_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ng_state == 6)
|
|
|
|
{
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
stillticking = false;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
cnt_secret[i] += 2;
|
|
|
|
|
|
|
|
if (cnt_secret[i] > plrs[i].ssecret)
|
|
|
|
cnt_secret[i] = plrs[i].ssecret;
|
|
|
|
else
|
|
|
|
stillticking = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!stillticking)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
ng_state += 1 + 2*!dofrags;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ng_state == 8)
|
|
|
|
{
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
stillticking = false;
|
|
|
|
|
|
|
|
for (i=0 ; i<MAXPLAYERS ; i++)
|
|
|
|
{
|
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
|
|
|
|
|
|
|
cnt_frags[i] += 1;
|
|
|
|
|
|
|
|
if (cnt_frags[i] >= (fsum = WI_fragSum(i)))
|
|
|
|
cnt_frags[i] = fsum;
|
|
|
|
else
|
|
|
|
stillticking = true;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (!stillticking)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/cooptotal", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
ng_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ng_state == 10)
|
|
|
|
{
|
|
|
|
if (acceleratestage)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/pastcoopstats", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
WI_initShowNextLoc();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (ng_state & 1)
|
|
|
|
{
|
|
|
|
if (!--cnt_pause)
|
|
|
|
{
|
|
|
|
ng_state++;
|
|
|
|
cnt_pause = TICRATE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_drawNetgameStats ()
|
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
int i, x, y, height;
|
|
|
|
int maxnamewidth, maxscorewidth;
|
2008-11-27 17:43:36 +00:00
|
|
|
int pwidth = IntermissionFont->GetCharWidth('%');
|
2008-12-16 03:15:03 +00:00
|
|
|
int icon_x, name_x, kills_x, bonus_x, secret_x;
|
|
|
|
int bonus_len, secret_len;
|
|
|
|
int missed_kills, missed_items, missed_secrets;
|
|
|
|
EColorRange color;
|
|
|
|
const char *bonus_label;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// draw animated background
|
|
|
|
WI_drawBackground();
|
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
y = WI_drawLF();
|
|
|
|
|
|
|
|
HU_GetPlayerWidths(maxnamewidth, maxscorewidth);
|
|
|
|
height = SmallFont->GetHeight() * CleanYfac;
|
|
|
|
y += 16*CleanYfac;
|
|
|
|
|
|
|
|
bonus_label = (gameinfo.gametype & GAME_Raven) ? "BONUS" : "ITEMS";
|
|
|
|
icon_x = (SmallFont->StringWidth("COLOR") + 8) * CleanXfac;
|
|
|
|
name_x = icon_x + maxscorewidth * CleanXfac;
|
|
|
|
kills_x = name_x + (maxnamewidth + SmallFont->StringWidth("XXXXX") + 8) * CleanXfac;
|
|
|
|
bonus_x = kills_x + ((bonus_len = SmallFont->StringWidth(bonus_label)) + 8) * CleanXfac;
|
|
|
|
secret_x = bonus_x + ((secret_len = SmallFont->StringWidth("SECRET")) + 8) * CleanXfac;
|
|
|
|
|
|
|
|
x = (SCREENWIDTH - secret_x) >> 1;
|
|
|
|
icon_x += x;
|
|
|
|
name_x += x;
|
|
|
|
kills_x += x;
|
|
|
|
bonus_x += x;
|
|
|
|
secret_x += x;
|
|
|
|
|
|
|
|
color = (gameinfo.gametype & GAME_Raven) ? CR_GREEN : CR_UNTRANSLATED;
|
|
|
|
|
|
|
|
screen->DrawText(SmallFont, color, x, y, "COLOR", DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
screen->DrawText(SmallFont, color, name_x, y, "NAME", DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
screen->DrawText(SmallFont, color, kills_x - SmallFont->StringWidth("KILLS")*CleanXfac, y, "KILLS", DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
screen->DrawText(SmallFont, color, bonus_x - bonus_len*CleanXfac, y, bonus_label, DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
screen->DrawText(SmallFont, color, secret_x - secret_len*CleanXfac, y, "SECRET", DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
y += height + 6 * CleanYfac;
|
|
|
|
|
|
|
|
missed_kills = wbs->maxkills;
|
|
|
|
missed_items = wbs->maxitems;
|
|
|
|
missed_secrets = wbs->maxsecret;
|
|
|
|
|
|
|
|
// Draw lines for each player
|
|
|
|
for (i = 0; i < MAXPLAYERS; ++i)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
player_t *player;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
if (!playeringame[i])
|
|
|
|
continue;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
player = &players[i];
|
|
|
|
HU_DrawColorBar(x, y, height, i);
|
|
|
|
color = (EColorRange)HU_GetRowColor(player, i == consoleplayer);
|
|
|
|
if (player->mo->ScoreIcon.isValid())
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
FTexture *pic = TexMan[player->mo->ScoreIcon];
|
|
|
|
screen->DrawTexture(pic, icon_x, y, DTA_CleanNoMove, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-12-16 03:15:03 +00:00
|
|
|
screen->DrawText(SmallFont, color, name_x, y, player->userinfo.netname, DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
WI_drawPercent(SmallFont, kills_x, y, cnt_kills[i], wbs->maxkills, false, color);
|
|
|
|
missed_kills -= cnt_kills[i];
|
|
|
|
if (ng_state >= 4)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawPercent(SmallFont, bonus_x, y, cnt_items[i], wbs->maxitems, false, color);
|
|
|
|
missed_items -= cnt_items[i];
|
|
|
|
if (ng_state >= 6)
|
|
|
|
{
|
|
|
|
WI_drawPercent(SmallFont, secret_x, y, cnt_secret[i], wbs->maxsecret, false, color);
|
|
|
|
missed_secrets -= cnt_secret[i];
|
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-12-16 03:15:03 +00:00
|
|
|
y += height + CleanYfac;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Draw "MISSED" line
|
|
|
|
y += 5 * CleanYfac;
|
|
|
|
screen->DrawText(SmallFont, CR_DARKGRAY, name_x, y, "MISSED", DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
WI_drawPercent(SmallFont, kills_x, y, missed_kills, wbs->maxkills, false, CR_DARKGRAY);
|
|
|
|
if (ng_state >= 4)
|
|
|
|
{
|
|
|
|
WI_drawPercent(SmallFont, bonus_x, y, missed_items, wbs->maxitems, false, CR_DARKGRAY);
|
|
|
|
if (ng_state >= 6)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawPercent(SmallFont, secret_x, y, missed_secrets, wbs->maxsecret, false, CR_DARKGRAY);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2008-12-16 03:15:03 +00:00
|
|
|
}
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-12-16 03:15:03 +00:00
|
|
|
// Draw "TOTAL" line
|
|
|
|
y += height + 5 * CleanYfac;
|
|
|
|
color = (gameinfo.gametype & GAME_Raven) ? CR_GREEN : CR_UNTRANSLATED;
|
|
|
|
screen->DrawText(SmallFont, color, name_x, y, "TOTAL", DTA_CleanNoMove, true, TAG_DONE);
|
|
|
|
WI_drawNum(SmallFont, kills_x, y, wbs->maxkills, 0, false, color);
|
|
|
|
if (ng_state >= 4)
|
|
|
|
{
|
|
|
|
WI_drawNum(SmallFont, bonus_x, y, wbs->maxitems, 0, false, color);
|
|
|
|
if (ng_state >= 6)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawNum(SmallFont, secret_x, y, wbs->maxsecret, 0, false, color);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
static int sp_state;
|
|
|
|
|
|
|
|
void WI_initStats ()
|
|
|
|
{
|
|
|
|
state = StatCount;
|
|
|
|
acceleratestage = 0;
|
|
|
|
sp_state = 1;
|
|
|
|
cnt_kills[0] = cnt_items[0] = cnt_secret[0] = -1;
|
|
|
|
cnt_time = cnt_par = -1;
|
|
|
|
cnt_pause = TICRATE;
|
|
|
|
|
|
|
|
cnt_total_time = -1;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_updateStats ()
|
|
|
|
{
|
|
|
|
WI_updateAnimatedBack ();
|
|
|
|
|
2009-07-04 01:26:57 +00:00
|
|
|
if (acceleratestage && sp_state != 10)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (acceleratestage)
|
|
|
|
{
|
|
|
|
acceleratestage = 0;
|
|
|
|
sp_state = 10;
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
cnt_kills[0] = plrs[me].skills;
|
|
|
|
cnt_items[0] = plrs[me].sitems;
|
|
|
|
cnt_secret[0] = plrs[me].ssecret;
|
|
|
|
cnt_time = plrs[me].stime / TICRATE;
|
|
|
|
cnt_par = wbs->partime / TICRATE;
|
|
|
|
cnt_total_time = wbs->totaltime / TICRATE;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (sp_state == 2)
|
|
|
|
{
|
2009-04-23 22:49:38 +00:00
|
|
|
if (gameinfo.intermissioncounter)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_kills[0] += 2;
|
|
|
|
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-07-04 01:26:57 +00:00
|
|
|
if (!gameinfo.intermissioncounter || cnt_kills[0] >= plrs[me].skills)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_kills[0] = plrs[me].skills;
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
sp_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sp_state == 4)
|
|
|
|
{
|
2009-04-23 22:49:38 +00:00
|
|
|
if (gameinfo.intermissioncounter)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_items[0] += 2;
|
|
|
|
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-07-04 01:26:57 +00:00
|
|
|
if (!gameinfo.intermissioncounter || cnt_items[0] >= plrs[me].sitems)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_items[0] = plrs[me].sitems;
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
sp_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sp_state == 6)
|
|
|
|
{
|
2009-04-23 22:49:38 +00:00
|
|
|
if (gameinfo.intermissioncounter)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_secret[0] += 2;
|
|
|
|
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
2009-07-04 01:26:57 +00:00
|
|
|
if (!gameinfo.intermissioncounter || cnt_secret[0] >= plrs[me].ssecret)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_secret[0] = plrs[me].ssecret;
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
sp_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sp_state == 8)
|
|
|
|
{
|
2009-04-23 22:49:38 +00:00
|
|
|
if (gameinfo.intermissioncounter)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
if (!(bcnt&3))
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/tick", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
cnt_time += 3;
|
|
|
|
cnt_par += 3;
|
|
|
|
cnt_total_time += 3;
|
|
|
|
}
|
|
|
|
|
2009-07-04 01:26:57 +00:00
|
|
|
if (!gameinfo.intermissioncounter || cnt_time >= plrs[me].stime / TICRATE)
|
2006-02-24 04:48:15 +00:00
|
|
|
cnt_time = plrs[me].stime / TICRATE;
|
|
|
|
|
2009-07-04 01:26:57 +00:00
|
|
|
if (!gameinfo.intermissioncounter || cnt_total_time >= wbs->totaltime / TICRATE)
|
2006-02-24 04:48:15 +00:00
|
|
|
cnt_total_time = wbs->totaltime / TICRATE;
|
|
|
|
|
2009-07-04 01:26:57 +00:00
|
|
|
if (!gameinfo.intermissioncounter || cnt_par >= wbs->partime / TICRATE)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
cnt_par = wbs->partime / TICRATE;
|
|
|
|
|
|
|
|
if (cnt_time >= plrs[me].stime / TICRATE)
|
|
|
|
{
|
2006-04-11 08:36:23 +00:00
|
|
|
cnt_total_time = wbs->totaltime / TICRATE;
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/nextstage", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
sp_state++;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sp_state == 10)
|
|
|
|
{
|
|
|
|
if (acceleratestage)
|
|
|
|
{
|
2009-04-18 01:31:08 +00:00
|
|
|
S_Sound (CHAN_VOICE | CHAN_UI, "intermission/paststats", 1, ATTN_NONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
WI_initShowNextLoc();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else if (sp_state & 1)
|
|
|
|
{
|
|
|
|
if (!--cnt_pause)
|
|
|
|
{
|
|
|
|
sp_state++;
|
|
|
|
cnt_pause = TICRATE;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_drawStats (void)
|
|
|
|
{
|
|
|
|
// line height
|
|
|
|
int lh;
|
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
lh = IntermissionFont->GetHeight() * 3 / 2;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
// draw animated background
|
|
|
|
WI_drawBackground();
|
|
|
|
|
|
|
|
WI_drawLF();
|
|
|
|
|
2008-08-30 19:44:19 +00:00
|
|
|
if (gameinfo.gametype & GAME_DoomChex)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
screen->DrawTexture (kills, SP_STATSX, SP_STATSY, DTA_Clean, true, TAG_DONE);
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawPercent (IntermissionFont, 320 - SP_STATSX, SP_STATSY, cnt_kills[0], wbs->maxkills);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
screen->DrawTexture (items, SP_STATSX, SP_STATSY+lh, DTA_Clean, true, TAG_DONE);
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawPercent (IntermissionFont, 320 - SP_STATSX, SP_STATSY+lh, cnt_items[0], wbs->maxitems);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
screen->DrawTexture (sp_secret, SP_STATSX, SP_STATSY+2*lh, DTA_Clean, true, TAG_DONE);
|
2008-12-16 03:15:03 +00:00
|
|
|
WI_drawPercent (IntermissionFont, 320 - SP_STATSX, SP_STATSY+2*lh, cnt_secret[0], wbs->maxsecret);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
screen->DrawTexture (timepic, SP_TIMEX, SP_TIMEY, DTA_Clean, true, TAG_DONE);
|
|
|
|
WI_drawTime (160 - SP_TIMEX, SP_TIMEY, cnt_time);
|
2006-04-11 08:36:23 +00:00
|
|
|
if (wi_showtotaltime)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
WI_drawTime (160 - SP_TIMEX, SP_TIMEY + lh, cnt_total_time, true); // no 'sucks' for total time ever!
|
|
|
|
}
|
|
|
|
|
|
|
|
if (wbs->partime)
|
|
|
|
{
|
|
|
|
screen->DrawTexture (par, 160 + SP_TIMEX, SP_TIMEY, DTA_Clean, true, TAG_DONE);
|
|
|
|
WI_drawTime (320 - SP_TIMEX, SP_TIMEY, cnt_par);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 65, "KILLS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
|
|
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 90, "ITEMS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
|
|
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 50, 115, "SECRETS", DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2009-02-19 14:36:37 +00:00
|
|
|
int countpos = gameinfo.gametype==GAME_Strife? 285:270;
|
2006-02-24 04:48:15 +00:00
|
|
|
if (sp_state >= 2)
|
|
|
|
{
|
2009-02-19 14:36:37 +00:00
|
|
|
WI_drawPercent (IntermissionFont, countpos, 65, cnt_kills[0], wbs->maxkills);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
if (sp_state >= 4)
|
|
|
|
{
|
2009-02-19 14:36:37 +00:00
|
|
|
WI_drawPercent (IntermissionFont, countpos, 90, cnt_items[0], wbs->maxitems);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
if (sp_state >= 6)
|
|
|
|
{
|
2009-02-19 14:36:37 +00:00
|
|
|
WI_drawPercent (IntermissionFont, countpos, 115, cnt_secret[0], wbs->maxsecret);
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
if (sp_state >= 8)
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
screen->DrawText (BigFont, CR_UNTRANSLATED, 85, 160, "TIME",
|
2006-02-24 04:48:15 +00:00
|
|
|
DTA_Clean, true, DTA_Shadow, true, TAG_DONE);
|
|
|
|
WI_drawTime (249, 160, cnt_time);
|
2006-04-11 08:36:23 +00:00
|
|
|
if (wi_showtotaltime)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
WI_drawTime (249, 180, cnt_total_time);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====================================================================
|
|
|
|
// WI_checkForAccelerate
|
|
|
|
// Purpose: See if the player has hit either the attack or use key
|
|
|
|
// or mouse button. If so we set acceleratestage to 1 and
|
|
|
|
// all those display routines above jump right to the end.
|
|
|
|
// Args: none
|
|
|
|
// Returns: void
|
|
|
|
//
|
|
|
|
// ====================================================================
|
|
|
|
void WI_checkForAccelerate(void)
|
|
|
|
{
|
|
|
|
int i;
|
|
|
|
player_t *player;
|
|
|
|
|
|
|
|
// check for button presses to skip delays
|
|
|
|
for (i = 0, player = players; i < MAXPLAYERS; i++, player++)
|
|
|
|
{
|
|
|
|
if (playeringame[i])
|
|
|
|
{
|
|
|
|
if ((player->cmd.ucmd.buttons ^ player->oldbuttons) &&
|
|
|
|
((players[i].cmd.ucmd.buttons & players[i].oldbuttons)
|
2007-12-24 14:24:24 +00:00
|
|
|
== players[i].oldbuttons) && !player->isbot)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
acceleratestage = 1;
|
|
|
|
}
|
|
|
|
player->oldbuttons = player->cmd.ucmd.buttons;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ====================================================================
|
|
|
|
// WI_Ticker
|
|
|
|
// Purpose: Do various updates every gametic, for stats, animation,
|
|
|
|
// checking that intermission music is running, etc.
|
|
|
|
// Args: none
|
|
|
|
// Returns: void
|
|
|
|
//
|
|
|
|
// ====================================================================
|
|
|
|
void WI_Ticker(void)
|
|
|
|
{
|
|
|
|
// counter for general background animation
|
|
|
|
bcnt++;
|
|
|
|
|
|
|
|
if (bcnt == 1)
|
|
|
|
{
|
|
|
|
// intermission music - use the defaults if none specified
|
2009-02-03 19:11:43 +00:00
|
|
|
if (level.info->InterMusic.IsNotEmpty())
|
|
|
|
S_ChangeMusic(level.info->InterMusic, level.info->intermusicorder);
|
2006-02-24 04:48:15 +00:00
|
|
|
else
|
2009-03-22 11:37:56 +00:00
|
|
|
S_ChangeMusic (gameinfo.intermissionMusic.GetChars());
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
WI_checkForAccelerate();
|
|
|
|
|
|
|
|
switch (state)
|
|
|
|
{
|
|
|
|
case StatCount:
|
|
|
|
if (deathmatch) WI_updateDeathmatchStats();
|
|
|
|
else if (multiplayer) WI_updateNetgameStats();
|
|
|
|
else WI_updateStats();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ShowNextLoc:
|
|
|
|
WI_updateShowNextLoc();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case NoState:
|
|
|
|
WI_updateNoState();
|
|
|
|
break;
|
2006-04-12 03:03:58 +00:00
|
|
|
|
|
|
|
case LeavingIntermission:
|
|
|
|
// Hush, GCC.
|
|
|
|
break;
|
2006-02-24 04:48:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_loadData(void)
|
|
|
|
{
|
2008-08-30 19:44:19 +00:00
|
|
|
if (gameinfo.gametype & GAME_DoomChex)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
finished = TexMan["WIF"]; // "finished"
|
|
|
|
entering = TexMan["WIENTER"]; // "entering"
|
|
|
|
kills = TexMan["WIOSTK"]; // "kills"
|
|
|
|
secret = TexMan["WIOSTS"]; // "scrt"
|
|
|
|
sp_secret = TexMan["WISCRT2"]; // "secret"
|
|
|
|
items = TexMan["WIOSTI"]; // "items"
|
|
|
|
frags = TexMan["WIFRGS"]; // "frgs"
|
|
|
|
timepic = TexMan["WITIME"]; // "time"
|
|
|
|
sucks = TexMan["WISUCKS"]; // "sucks"
|
|
|
|
par = TexMan["WIPAR"]; // "par"
|
2008-11-27 17:43:36 +00:00
|
|
|
killers = TexMan["WIKILRS"]; // "killers" (vertical]
|
|
|
|
victims = TexMan["WIVCTMS"]; // "victims" (horiz]
|
2006-02-24 04:48:15 +00:00
|
|
|
total = TexMan["WIMSTT"]; // "total"
|
|
|
|
star = TexMan["STFST01"]; // your face
|
|
|
|
bstar = TexMan["STFDEAD0"]; // dead face
|
|
|
|
p = TexMan["STPBANY"];
|
|
|
|
}
|
|
|
|
else if (gameinfo.gametype & GAME_Raven)
|
|
|
|
{
|
2008-11-27 17:43:36 +00:00
|
|
|
if (gameinfo.gametype == GAME_Heretic)
|
2006-02-24 04:48:15 +00:00
|
|
|
{
|
|
|
|
star = TexMan["FACEA0"];
|
|
|
|
bstar = TexMan["FACEB0"];
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2010-02-26 05:34:30 +00:00
|
|
|
star = BigFont->GetChar('*', NULL);
|
2006-02-24 04:48:15 +00:00
|
|
|
bstar = star;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
else // Strife needs some handling, too!
|
|
|
|
{
|
2010-02-26 05:34:30 +00:00
|
|
|
star = BigFont->GetChar('*', NULL);
|
2006-02-24 04:48:15 +00:00
|
|
|
bstar = star;
|
|
|
|
}
|
|
|
|
|
2009-02-03 19:11:43 +00:00
|
|
|
// Use the local level structure which can be overridden by hubs
|
|
|
|
lnametexts[0] = level.LevelName;
|
2006-02-24 04:48:15 +00:00
|
|
|
|
2008-11-27 17:43:36 +00:00
|
|
|
level_info_t *li = FindLevelInfo(wbs->next);
|
2009-02-03 19:11:43 +00:00
|
|
|
if (li) lnametexts[1] = li->LookupLevelName();
|
|
|
|
else lnametexts[1] = "";
|
2006-02-24 04:48:15 +00:00
|
|
|
|
|
|
|
WI_LoadBackground(false);
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_unloadData ()
|
|
|
|
{
|
|
|
|
// [RH] The texture data gets unloaded at pre-map time, so there's nothing to do here
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_Drawer (void)
|
|
|
|
{
|
|
|
|
switch (state)
|
|
|
|
{
|
|
|
|
case StatCount:
|
|
|
|
if (deathmatch)
|
|
|
|
WI_drawDeathmatchStats();
|
|
|
|
else if (multiplayer)
|
|
|
|
WI_drawNetgameStats();
|
|
|
|
else
|
|
|
|
WI_drawStats();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case ShowNextLoc:
|
|
|
|
WI_drawShowNextLoc();
|
|
|
|
break;
|
|
|
|
|
|
|
|
case LeavingIntermission:
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
WI_drawNoState();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void WI_initVariables (wbstartstruct_t *wbstartstruct)
|
|
|
|
{
|
|
|
|
wbs = wbstartstruct;
|
|
|
|
acceleratestage = 0;
|
|
|
|
cnt = bcnt = 0;
|
|
|
|
me = wbs->pnum;
|
|
|
|
plrs = wbs->plyr;
|
|
|
|
}
|
|
|
|
|
|
|
|
void WI_Start (wbstartstruct_t *wbstartstruct)
|
|
|
|
{
|
2006-04-29 12:40:09 +00:00
|
|
|
noautostartmap = false;
|
2006-02-24 04:48:15 +00:00
|
|
|
V_SetBlend (0,0,0,0);
|
|
|
|
WI_initVariables (wbstartstruct);
|
|
|
|
WI_loadData ();
|
|
|
|
if (deathmatch)
|
|
|
|
WI_initDeathmatchStats();
|
|
|
|
else if (multiplayer)
|
|
|
|
WI_initNetgameStats();
|
|
|
|
else
|
|
|
|
WI_initStats();
|
|
|
|
S_StopAllChannels ();
|
|
|
|
SN_StopAllSequences ();
|
|
|
|
}
|