mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-14 17:01:07 +00:00
SRB2 2.1.4 release
This commit is contained in:
parent
c3e2c532ed
commit
505ea76834
31 changed files with 1383 additions and 2757 deletions
1135
src/d_clisrv.c
1135
src/d_clisrv.c
File diff suppressed because it is too large
Load diff
290
src/d_clisrv.h
290
src/d_clisrv.h
|
@ -53,6 +53,8 @@ typedef enum
|
|||
PT_REQUESTFILE, // Client requests a file transfer
|
||||
PT_ASKINFOVIAMS, // Packet from the MS requesting info be sent to new client.
|
||||
// If this ID changes, update masterserver definition.
|
||||
PT_RESYNCHEND, // Player is now resynched and is being requested to remake the gametic
|
||||
PT_RESYNCHGET, // Player got resynch packet
|
||||
|
||||
// Add non-PT_CANFAIL packet types here to avoid breaking MS compatibility.
|
||||
|
||||
|
@ -66,7 +68,8 @@ typedef enum
|
|||
PT_TEXTCMD2, // Splitscreen text commands.
|
||||
PT_CLIENTJOIN, // Client wants to join; used in start game.
|
||||
PT_NODETIMEOUT, // Packet sent to self if the connection times out.
|
||||
PT_CONSISTENCY, // Packet sent to resync players.
|
||||
PT_RESYNCHING, // Packet sent to resync players.
|
||||
// Blocks game advance until synched.
|
||||
#ifdef NEWPING
|
||||
PT_PING, // Packet sent to tell clients the other client's latency to server.
|
||||
#endif
|
||||
|
@ -110,6 +113,147 @@ typedef struct
|
|||
ticcmd_t cmds[45]; // normally [BACKUPTIC][MAXPLAYERS] but too large
|
||||
} ATTRPACK servertics_pak;
|
||||
|
||||
// sent to client when all consistency data
|
||||
// for players has been restored
|
||||
typedef struct
|
||||
{
|
||||
UINT32 randomseed;
|
||||
|
||||
//ctf flag stuff
|
||||
SINT8 flagplayer[2];
|
||||
INT32 flagloose[2];
|
||||
INT32 flagflags[2];
|
||||
fixed_t flagx[2];
|
||||
fixed_t flagy[2];
|
||||
fixed_t flagz[2];
|
||||
|
||||
UINT32 ingame; // spectator bit for each player
|
||||
UINT32 ctfteam; // if not spectator, then which team?
|
||||
|
||||
// Resynch game scores and the like all at once
|
||||
UINT32 score[MAXPLAYERS]; // Everyone's score.
|
||||
INT16 numboxes[MAXPLAYERS];
|
||||
INT16 totalring[MAXPLAYERS];
|
||||
tic_t realtime[MAXPLAYERS];
|
||||
UINT8 laps[MAXPLAYERS];
|
||||
} ATTRPACK resynchend_pak;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
//player stuff
|
||||
UINT8 playernum;
|
||||
|
||||
// Do not send anything visual related.
|
||||
// Only send data that we need to know for physics.
|
||||
UINT8 playerstate; //playerstate_t
|
||||
UINT32 pflags; //pflags_t
|
||||
UINT8 panim; //panim_t
|
||||
|
||||
angle_t aiming;
|
||||
INT32 currentweapon;
|
||||
INT32 ringweapons;
|
||||
UINT16 powers[NUMPOWERS];
|
||||
|
||||
// Score is resynched in the confirm resync packet
|
||||
INT32 health;
|
||||
SINT8 lives;
|
||||
SINT8 continues;
|
||||
UINT8 scoreadd;
|
||||
SINT8 xtralife;
|
||||
SINT8 pity;
|
||||
|
||||
UINT8 skincolor;
|
||||
INT32 skin;
|
||||
// Just in case Lua does something like
|
||||
// modify these at runtime
|
||||
fixed_t normalspeed;
|
||||
fixed_t runspeed;
|
||||
UINT8 thrustfactor;
|
||||
UINT8 accelstart;
|
||||
UINT8 acceleration;
|
||||
UINT8 charability;
|
||||
UINT8 charability2;
|
||||
UINT32 charflags;
|
||||
UINT32 thokitem; //mobjtype_t
|
||||
UINT32 spinitem; //mobjtype_t
|
||||
UINT32 revitem; //mobjtype_t
|
||||
INT32 actionspd;
|
||||
INT32 mindash;
|
||||
INT32 maxdash;
|
||||
fixed_t jumpfactor;
|
||||
|
||||
fixed_t speed;
|
||||
UINT8 jumping;
|
||||
UINT8 secondjump;
|
||||
UINT8 fly1;
|
||||
tic_t glidetime;
|
||||
UINT8 climbing;
|
||||
INT32 deadtimer;
|
||||
tic_t exiting;
|
||||
UINT8 homing;
|
||||
fixed_t cmomx;
|
||||
fixed_t cmomy;
|
||||
fixed_t rmomx;
|
||||
fixed_t rmomy;
|
||||
|
||||
INT32 weapondelay;
|
||||
INT32 tossdelay;
|
||||
|
||||
INT16 starpostx;
|
||||
INT16 starposty;
|
||||
INT16 starpostz;
|
||||
INT32 starpostnum;
|
||||
tic_t starposttime;
|
||||
angle_t starpostangle;
|
||||
|
||||
INT32 maxlink;
|
||||
fixed_t dashspeed;
|
||||
INT32 dashtime;
|
||||
angle_t angle_pos;
|
||||
angle_t old_angle_pos;
|
||||
tic_t bumpertime;
|
||||
INT32 flyangle;
|
||||
tic_t drilltimer;
|
||||
INT32 linkcount;
|
||||
tic_t linktimer;
|
||||
INT32 anotherflyangle;
|
||||
tic_t nightstime;
|
||||
INT32 drillmeter;
|
||||
UINT8 drilldelay;
|
||||
UINT8 bonustime;
|
||||
UINT8 mare;
|
||||
INT16 lastsidehit, lastlinehit;
|
||||
|
||||
tic_t losstime;
|
||||
UINT8 timeshit;
|
||||
INT32 onconveyor;
|
||||
|
||||
//player->mo stuff
|
||||
UINT8 hasmo; //boolean
|
||||
|
||||
angle_t angle;
|
||||
fixed_t x;
|
||||
fixed_t y;
|
||||
fixed_t z;
|
||||
fixed_t momx;
|
||||
fixed_t momy;
|
||||
fixed_t momz;
|
||||
fixed_t friction;
|
||||
fixed_t movefactor;
|
||||
|
||||
INT16 tics;
|
||||
statenum_t statenum;
|
||||
UINT32 flags;
|
||||
UINT32 flags2;
|
||||
UINT8 eflags;
|
||||
|
||||
fixed_t radius;
|
||||
fixed_t height;
|
||||
fixed_t scale;
|
||||
fixed_t destscale;
|
||||
fixed_t scalespeed;
|
||||
} ATTRPACK resynch_pak;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT8 version; // different versions don't work
|
||||
|
@ -194,143 +338,6 @@ typedef struct
|
|||
tic_t time; // used for ping evaluation
|
||||
} ATTRPACK msaskinfo_pak;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
UINT32 randomseed;
|
||||
|
||||
//ctf flag stuff
|
||||
UINT8 rflagloose;
|
||||
UINT8 bflagloose;
|
||||
INT32 rfuse;
|
||||
INT32 bfuse;
|
||||
INT32 rflags2;
|
||||
INT32 bflags2;
|
||||
INT16 rflagx;
|
||||
INT16 rflagy;
|
||||
INT16 rflagz;
|
||||
INT16 bflagx;
|
||||
INT16 bflagy;
|
||||
INT16 bflagz;
|
||||
|
||||
//player stuff
|
||||
UINT8 playernum;
|
||||
|
||||
UINT8 playerstate; //playerstate_t
|
||||
ticcmd_t cmd;
|
||||
fixed_t viewz;
|
||||
fixed_t viewheight;
|
||||
fixed_t deltaviewheight;
|
||||
fixed_t bob;
|
||||
angle_t aiming;
|
||||
angle_t awayviewaiming;
|
||||
INT32 phealth;
|
||||
SINT8 pity;
|
||||
INT32 currentweapon;
|
||||
INT32 ringweapons;
|
||||
UINT16 powers[NUMPOWERS];
|
||||
UINT32 pflags; //pflags_t
|
||||
UINT8 panim; //panim_t
|
||||
INT32 flashcount;
|
||||
UINT8 skincolor;
|
||||
INT32 skin;
|
||||
UINT32 score;
|
||||
INT32 maxlink;
|
||||
fixed_t dashspeed;
|
||||
INT32 dashtime;
|
||||
fixed_t normalspeed;
|
||||
fixed_t runspeed;
|
||||
UINT8 thrustfactor;
|
||||
UINT8 accelstart;
|
||||
UINT8 acceleration;
|
||||
UINT8 charability;
|
||||
UINT8 charability2;
|
||||
UINT32 charflags;
|
||||
UINT32 thokitem; //mobjtype_t
|
||||
UINT32 spinitem; //mobjtype_t
|
||||
UINT32 revitem; //mobjtype_t
|
||||
INT32 actionspd;
|
||||
INT32 mindash;
|
||||
INT32 maxdash;
|
||||
fixed_t jumpfactor;
|
||||
INT32 lives;
|
||||
INT32 continues;
|
||||
INT32 xtralife;
|
||||
fixed_t speed;
|
||||
INT32 jumping;
|
||||
UINT8 secondjump;
|
||||
UINT8 fly1;
|
||||
UINT8 scoreadd;
|
||||
tic_t glidetime;
|
||||
UINT8 climbing;
|
||||
INT32 deadtimer;
|
||||
tic_t exiting;
|
||||
UINT8 homing;
|
||||
tic_t skidtime;
|
||||
fixed_t cmomx;
|
||||
fixed_t cmomy;
|
||||
fixed_t rmomx;
|
||||
fixed_t rmomy;
|
||||
INT32 numboxes;
|
||||
INT32 totalring;
|
||||
tic_t realtime;
|
||||
UINT32 laps;
|
||||
INT32 ctfteam;
|
||||
UINT16 gotflag;
|
||||
INT32 weapondelay;
|
||||
INT32 tossdelay;
|
||||
INT16 starpostx;
|
||||
INT16 starposty;
|
||||
INT16 starpostz;
|
||||
INT32 starpostnum;
|
||||
tic_t starposttime;
|
||||
angle_t starpostangle;
|
||||
angle_t angle_pos;
|
||||
angle_t old_angle_pos;
|
||||
tic_t bumpertime;
|
||||
INT32 flyangle;
|
||||
tic_t drilltimer;
|
||||
INT32 linkcount;
|
||||
tic_t linktimer;
|
||||
INT32 anotherflyangle;
|
||||
tic_t nightstime;
|
||||
INT32 drillmeter;
|
||||
UINT8 drilldelay;
|
||||
UINT8 bonustime;
|
||||
UINT8 mare;
|
||||
INT16 lastsidehit, lastlinehit;
|
||||
tic_t losstime;
|
||||
UINT8 timeshit;
|
||||
INT32 onconveyor;
|
||||
UINT8 spectator; //boolean
|
||||
tic_t jointime;
|
||||
|
||||
//player->mo stuff
|
||||
UINT8 hasmo; //boolean
|
||||
|
||||
angle_t angle;
|
||||
fixed_t x;
|
||||
fixed_t y;
|
||||
fixed_t z;
|
||||
fixed_t momx;
|
||||
fixed_t momy;
|
||||
fixed_t momz;
|
||||
fixed_t friction;
|
||||
fixed_t movefactor;
|
||||
|
||||
INT32 tics;
|
||||
statenum_t statenum;
|
||||
UINT32 flags;
|
||||
UINT32 flags2;
|
||||
UINT8 eflags;
|
||||
INT32 health;
|
||||
|
||||
fixed_t radius;
|
||||
fixed_t height;
|
||||
fixed_t scale;
|
||||
fixed_t destscale;
|
||||
fixed_t scalespeed;
|
||||
} ATTRPACK cons_pak;
|
||||
|
||||
// Shorter player information for external use.
|
||||
typedef struct
|
||||
{
|
||||
|
@ -372,6 +379,9 @@ typedef struct
|
|||
client2cmd_pak client2pak; // 200 bytes
|
||||
servertics_pak serverpak; // 132495 bytes
|
||||
serverconfig_pak servercfg; // 773 bytes
|
||||
resynchend_pak resynchend; //
|
||||
resynch_pak resynchpak; //
|
||||
UINT8 resynchgot; //
|
||||
UINT8 textcmd[MAXTEXTCMD+1]; // 66049 bytes
|
||||
filetx_pak filetxpak; // 139 bytes
|
||||
clientconfig_pak clientcfg; // 136 bytes
|
||||
|
@ -379,7 +389,6 @@ typedef struct
|
|||
serverrefuse_pak serverrefuse; // 65025 bytes
|
||||
askinfo_pak askinfo; // 61 bytes
|
||||
msaskinfo_pak msaskinfo; // 22 bytes
|
||||
cons_pak consistency; // 544 bytes
|
||||
plrinfo playerinfo[MAXPLAYERS]; // 1152 bytes
|
||||
plrconfig playerconfig[MAXPLAYERS]; // (up to) 896 bytes
|
||||
#ifdef NEWPING
|
||||
|
@ -437,7 +446,7 @@ extern UINT32 realpingtable[MAXPLAYERS];
|
|||
extern UINT32 playerpingtable[MAXPLAYERS];
|
||||
#endif
|
||||
|
||||
extern consvar_t cv_joinnextround, cv_allownewplayer, cv_maxplayers, cv_consfailprotect, cv_blamecfail, cv_maxsend;
|
||||
extern consvar_t cv_joinnextround, cv_allownewplayer, cv_maxplayers, cv_resynchattempts, cv_blamecfail, cv_maxsend;
|
||||
|
||||
// used in d_net, the only dependence
|
||||
tic_t ExpandTics(INT32 low);
|
||||
|
@ -492,4 +501,5 @@ void D_ResetTiccmds(void);
|
|||
tic_t GetLag(INT32 node);
|
||||
UINT8 GetFreeXCmdSize(void);
|
||||
|
||||
extern UINT8 hu_resynching;
|
||||
#endif
|
||||
|
|
|
@ -401,7 +401,10 @@ static void D_Display(void)
|
|||
if (lastdraw)
|
||||
{
|
||||
if (rendermode == render_soft)
|
||||
{
|
||||
VID_BlitLinearScreen(screens[0], screens[1], vid.width*vid.bpp, vid.height, vid.width*vid.bpp, vid.rowbytes);
|
||||
usebuffer = true;
|
||||
}
|
||||
lastdraw = false;
|
||||
}
|
||||
|
||||
|
@ -1094,7 +1097,7 @@ void D_SRB2Main(void)
|
|||
W_VerifyFileMD5(1, "a894044b555dfcc71865cee16a996e88"); // zones.dta
|
||||
W_VerifyFileMD5(2, "4c410c1de6e0440cc5b2858dcca80c3e"); // player.dta
|
||||
W_VerifyFileMD5(3, "85901ad4bf94637e5753d2ac2c03ea26"); // rings.dta
|
||||
W_VerifyFileMD5(4, "12c58561edf3be16a15505f1d5eacee0"); // patch.dta
|
||||
W_VerifyFileMD5(4, "e868046d2d2da1d8c706c900edfb03f8"); // patch.dta
|
||||
|
||||
// don't check music.dta because people like to modify it, and it doesn't matter if they do
|
||||
// ...except it does if they slip maps in there, and that's what W_VerifyNMUSlumps is for.
|
||||
|
|
12
src/d_net.c
12
src/d_net.c
|
@ -784,18 +784,6 @@ static void DebugPrintpacket(const char *header)
|
|||
fprintfstring((char *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots*netbuffer->u.serverpak.numtics],(size_t)(
|
||||
&((UINT8 *)netbuffer)[doomcom->datalength] - (UINT8 *)&netbuffer->u.serverpak.cmds[netbuffer->u.serverpak.numslots*netbuffer->u.serverpak.numtics]));
|
||||
break;
|
||||
case PT_CONSISTENCY:
|
||||
fprintf(debugfile, " randomseed %d playernum %d hasmo %d\n",
|
||||
netbuffer->u.consistency.randomseed, netbuffer->u.consistency.playernum, netbuffer->u.consistency.hasmo);
|
||||
fprintf(debugfile, " x %d y %d z %d momx %d momy %d momz %d\n",
|
||||
netbuffer->u.consistency.x, netbuffer->u.consistency.y, netbuffer->u.consistency.z,
|
||||
netbuffer->u.consistency.momx, netbuffer->u.consistency.momy, netbuffer->u.consistency.momz);
|
||||
fprintf(debugfile, " angle %d health %d eflags %d flags %d flags2 %d\n",
|
||||
netbuffer->u.consistency.angle, netbuffer->u.consistency.health, netbuffer->u.consistency.eflags,
|
||||
netbuffer->u.consistency.flags, netbuffer->u.consistency.flags2);
|
||||
fprintf(debugfile, " friction %d movefactor %d tics %d statenum %d\n",
|
||||
netbuffer->u.consistency.friction, netbuffer->u.consistency.movefactor,
|
||||
netbuffer->u.consistency.tics, (INT32)netbuffer->u.consistency.statenum);
|
||||
case PT_CLIENTCMD:
|
||||
case PT_CLIENT2CMD:
|
||||
case PT_CLIENTMIS:
|
||||
|
|
|
@ -3138,10 +3138,8 @@ static void Command_Addfile(void)
|
|||
p = fn+strlen(fn);
|
||||
while(--p >= fn)
|
||||
if (*p == '\\' || *p == '/' || *p == ':')
|
||||
{
|
||||
++p;
|
||||
break;
|
||||
}
|
||||
++p;
|
||||
WRITESTRINGN(buf_p,p,240);
|
||||
|
||||
{
|
||||
|
@ -4094,8 +4092,17 @@ static void Command_Isgamemodified_f(void)
|
|||
|
||||
static void Command_Cheats_f(void)
|
||||
{
|
||||
if (COM_CheckParm("off"))
|
||||
{
|
||||
CV_ResetCheatNetVars();
|
||||
return;
|
||||
}
|
||||
|
||||
if (CV_CheatsEnabled())
|
||||
{
|
||||
CONS_Printf(M_GetText("At least one CHEAT-marked variable has been changed -- Cheats are enabled.\n"));
|
||||
CONS_Printf(M_GetText("Type CHEATS OFF to reset all cheat variables to default."));
|
||||
}
|
||||
else
|
||||
CONS_Printf(M_GetText("No CHEAT-marked variables are changed -- Cheats are disabled.\n"));
|
||||
}
|
||||
|
|
|
@ -147,7 +147,7 @@ typedef enum
|
|||
PF_TAGGED = 1<<27, // Player has been tagged and awaits the next round in hide and seek.
|
||||
PF_TAGIT = 1<<28, // The player is it! For Tag Mode
|
||||
|
||||
// free: 1<<29, 1<<31
|
||||
// free: 1<<29 through 1<<31
|
||||
} pflags_t;
|
||||
|
||||
typedef enum
|
||||
|
@ -268,10 +268,9 @@ typedef struct player_s
|
|||
// It is updated with cmd->aiming.
|
||||
angle_t aiming;
|
||||
|
||||
angle_t awayviewaiming; // Used for cut-away view
|
||||
|
||||
// This is only used between levels,
|
||||
// mo->health is used during levels.
|
||||
/// \todo Remove this. We don't need a second health definition for players.
|
||||
INT32 health;
|
||||
|
||||
SINT8 pity; // i pity the fool.
|
||||
|
@ -324,15 +323,14 @@ typedef struct player_s
|
|||
|
||||
fixed_t jumpfactor; // How high can the player jump?
|
||||
|
||||
INT32 lives;
|
||||
INT32 continues; // continues that player has acquired
|
||||
SINT8 lives;
|
||||
SINT8 continues; // continues that player has acquired
|
||||
|
||||
INT32 xtralife; // Ring Extra Life counter
|
||||
SINT8 xtralife; // Ring Extra Life counter
|
||||
UINT8 gotcontinue; // Got continue from this stage?
|
||||
|
||||
fixed_t speed; // Player's speed (distance formula of MOMX and MOMY values)
|
||||
INT32 jumping; // Jump counter
|
||||
|
||||
UINT8 jumping; // Jump counter
|
||||
UINT8 secondjump;
|
||||
|
||||
UINT8 fly1; // Tails flying
|
||||
|
@ -357,10 +355,10 @@ typedef struct player_s
|
|||
/////////////////////
|
||||
// Race Mode Stuff //
|
||||
/////////////////////
|
||||
INT32 numboxes; // Number of item boxes obtained for Race Mode
|
||||
INT32 totalring; // Total number of rings obtained for Race Mode
|
||||
INT16 numboxes; // Number of item boxes obtained for Race Mode
|
||||
INT16 totalring; // Total number of rings obtained for Race Mode
|
||||
tic_t realtime; // integer replacement for leveltime
|
||||
UINT32 laps; // Number of laps (optional)
|
||||
UINT8 laps; // Number of laps (optional)
|
||||
|
||||
////////////////////
|
||||
// CTF Mode Stuff //
|
||||
|
@ -421,6 +419,7 @@ typedef struct player_s
|
|||
|
||||
mobj_t *awayviewmobj;
|
||||
INT32 awayviewtics;
|
||||
angle_t awayviewaiming; // Used for cut-away view
|
||||
|
||||
boolean spectator;
|
||||
UINT8 bot;
|
||||
|
|
|
@ -1132,7 +1132,7 @@ static void readlevelheader(MYFILE *f, INT32 num)
|
|||
else if (fastcmp(word, "PALETTE"))
|
||||
mapheaderinfo[num-1]->palette = (UINT16)i;
|
||||
else if (fastcmp(word, "NUMLAPS"))
|
||||
mapheaderinfo[num-1]->numlaps = (UINT32)i;
|
||||
mapheaderinfo[num-1]->numlaps = (UINT8)i;
|
||||
else if (fastcmp(word, "UNLOCKABLE"))
|
||||
{
|
||||
if (i >= 0 && i <= MAXUNLOCKABLES) // 0 for no unlock required, anything else requires something
|
||||
|
@ -7325,24 +7325,29 @@ static const char *const HUDITEMS_LIST[] = {
|
|||
"LIVESPIC",
|
||||
"LIVESNUM",
|
||||
"LIVESX",
|
||||
"RINGSSPLIT",
|
||||
"RINGSNUMSPLIT",
|
||||
|
||||
"RINGS",
|
||||
"RINGSSPLIT",
|
||||
"RINGSNUM",
|
||||
"RINGSNUMSPLIT",
|
||||
|
||||
"SCORE",
|
||||
"SCORENUM",
|
||||
"TIMESPLIT",
|
||||
"SECONDSSPLIT",
|
||||
"MINUTESSPLIT",
|
||||
"TIMECOLONSPLIT",
|
||||
|
||||
"TIME",
|
||||
"TICS",
|
||||
"SECONDS",
|
||||
"TIMESPLIT",
|
||||
"MINUTES",
|
||||
"MINUTESSPLIT",
|
||||
"TIMECOLON",
|
||||
"TIMECOLONSPLIT",
|
||||
"SECONDS",
|
||||
"SECONDSSPLIT",
|
||||
"TIMETICCOLON",
|
||||
"SS_TOTALRINGS_SPLIT",
|
||||
"TICS",
|
||||
|
||||
"SS_TOTALRINGS",
|
||||
"SS_TOTALRINGS_SPLIT",
|
||||
|
||||
"GETRINGS",
|
||||
"GETRINGSNUM",
|
||||
"TIMELEFT",
|
||||
|
@ -7683,6 +7688,9 @@ struct {
|
|||
{"V_70TRANS",V_70TRANS},
|
||||
{"V_80TRANS",V_80TRANS},
|
||||
{"V_90TRANS",V_90TRANS},
|
||||
{"V_HUDTRANSHALF",V_HUDTRANSHALF},
|
||||
{"V_HUDTRANS",V_HUDTRANS},
|
||||
{"V_HUDTRANSDOUBLE",V_HUDTRANSDOUBLE},
|
||||
{"V_AUTOFADEOUT",V_AUTOFADEOUT},
|
||||
{"V_RETURN8",V_RETURN8},
|
||||
{"V_OFFSET",V_OFFSET},
|
||||
|
|
|
@ -131,6 +131,7 @@ typedef struct
|
|||
#define ML_NOSONIC 2048
|
||||
#define ML_NOTAILS 4096
|
||||
#define ML_NOKNUX 8192
|
||||
#define ML_NETONLY 14336 // all of the above
|
||||
|
||||
// Bounce off walls!
|
||||
#define ML_BOUNCY 16384
|
||||
|
|
|
@ -144,8 +144,8 @@ extern FILE *logstream;
|
|||
#define VERSIONSTRING "Trunk"
|
||||
#else
|
||||
#define VERSION 201 // Game version
|
||||
#define SUBVERSION 3 // more precise version number
|
||||
#define VERSIONSTRING "v2.1.3"
|
||||
#define SUBVERSION 4 // more precise version number
|
||||
#define VERSIONSTRING "v2.1.4"
|
||||
#endif
|
||||
|
||||
// Modification options
|
||||
|
@ -201,7 +201,7 @@ extern FILE *logstream;
|
|||
// it's only for detection of the version the player is using so the MS can alert them of an update.
|
||||
// Only set it higher, not lower, obviously.
|
||||
// Note that we use this to help keep internal testing in check; this is why v2.1.0 is not version "1".
|
||||
#define MODVERSION 7
|
||||
#define MODVERSION 9
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -227,7 +227,7 @@ typedef struct
|
|||
UINT8 cutscenenum; ///< Cutscene number to use, 0 for none.
|
||||
INT16 countdown; ///< Countdown until level end?
|
||||
UINT16 palette; ///< PAL lump to use on this map
|
||||
UINT32 numlaps; ///< Number of laps in circuit mode, unless overridden.
|
||||
UINT8 numlaps; ///< Number of laps in circuit mode, unless overridden.
|
||||
SINT8 unlockrequired; ///< Is an unlockable required to play this level? -1 if no.
|
||||
UINT8 levelselect; ///< Is this map available in the level select? If so, which map list is it available in?
|
||||
SINT8 bonustype; ///< What type of bonus does this level have? (-1 for null.)
|
||||
|
|
20
src/g_game.c
20
src/g_game.c
|
@ -1467,10 +1467,12 @@ static void Analog_OnChange(void)
|
|||
{
|
||||
if (!cv_cam_dist.string)
|
||||
return;
|
||||
|
||||
// cameras are not initialized at this point
|
||||
|
||||
if (leveltime > 1)
|
||||
CV_SetValue(&cv_cam_dist, 128);
|
||||
|
||||
if (netgame || !camera.chase)
|
||||
if (netgame)
|
||||
CV_StealthSetValue(&cv_analog, 0);
|
||||
else if (cv_analog.value || demoplayback)
|
||||
CV_SetValue(&cv_cam_dist, 192);
|
||||
|
@ -1480,9 +1482,12 @@ static void Analog2_OnChange(void)
|
|||
{
|
||||
if (!splitscreen || !cv_cam2_dist.string)
|
||||
return;
|
||||
|
||||
// cameras are not initialized at this point
|
||||
|
||||
if (leveltime > 1)
|
||||
CV_SetValue(&cv_cam2_dist, 128);
|
||||
if (netgame || !camera2.chase)
|
||||
if (netgame)
|
||||
CV_StealthSetValue(&cv_analog2, 0);
|
||||
else if (cv_analog2.value)
|
||||
CV_SetValue(&cv_cam2_dist, 192);
|
||||
|
@ -1927,7 +1932,6 @@ void G_PlayerReborn(INT32 player)
|
|||
INT32 score;
|
||||
INT32 lives;
|
||||
INT32 continues;
|
||||
INT32 xtralife;
|
||||
UINT8 charability;
|
||||
UINT8 charability2;
|
||||
fixed_t normalspeed;
|
||||
|
@ -1952,9 +1956,9 @@ void G_PlayerReborn(INT32 player)
|
|||
INT32 starpostangle;
|
||||
fixed_t jumpfactor;
|
||||
INT32 exiting;
|
||||
INT32 numboxes;
|
||||
INT32 laps;
|
||||
INT32 totalring;
|
||||
INT16 numboxes;
|
||||
INT16 totalring;
|
||||
UINT8 laps;
|
||||
UINT8 mare;
|
||||
UINT8 skincolor;
|
||||
INT32 skin;
|
||||
|
@ -1966,7 +1970,6 @@ void G_PlayerReborn(INT32 player)
|
|||
score = players[player].score;
|
||||
lives = players[player].lives;
|
||||
continues = players[player].continues;
|
||||
xtralife = players[player].xtralife;
|
||||
ctfteam = players[player].ctfteam;
|
||||
exiting = players[player].exiting;
|
||||
jointime = players[player].jointime;
|
||||
|
@ -2017,7 +2020,6 @@ void G_PlayerReborn(INT32 player)
|
|||
p->lives = lives;
|
||||
p->continues = continues;
|
||||
p->pflags = pflags;
|
||||
p->xtralife = xtralife;
|
||||
p->ctfteam = ctfteam;
|
||||
p->jointime = jointime;
|
||||
p->spectator = spectator;
|
||||
|
|
|
@ -67,6 +67,10 @@ typedef UINT8 GLRGB[3];
|
|||
|
||||
#define BLENDMODE PF_Translucent
|
||||
|
||||
static UINT8 softwaretranstogl[11] = { 0, 25, 51, 76,102,127,153,178,204,229,255};
|
||||
static UINT8 softwaretranstogl_hi[11] = { 0, 51,102,153,204,255,255,255,255,255,255};
|
||||
static UINT8 softwaretranstogl_lo[11] = { 0, 12, 24, 36, 48, 60, 71, 83, 95,111,127};
|
||||
|
||||
//
|
||||
// -----------------+
|
||||
// HWR_DrawPatch : Draw a 'tile' graphic
|
||||
|
@ -128,24 +132,16 @@ void HWR_DrawPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option)
|
|||
flags |= PF_ForceWrapY;
|
||||
|
||||
// clip it since it is used for bunny scroll in doom I
|
||||
if (option & V_TRANSLUCENT)
|
||||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
Surf.FlatColor.s.alpha = (UINT8)cv_grtranslucenthud.value;
|
||||
flags |= PF_Modulated;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
}
|
||||
else
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||
}
|
||||
|
||||
void HWR_DrawSciencePatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option, fixed_t scale)
|
||||
void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, INT32 option, const UINT8 *colormap)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FBITFIELD flags;
|
||||
float cx = FIXED_TO_FLOAT(x);
|
||||
float cy = FIXED_TO_FLOAT(y);
|
||||
UINT8 alphalevel = ((option & V_ALPHAMASK) >> V_ALPHASHIFT);
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
|
@ -153,11 +149,17 @@ void HWR_DrawSciencePatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option,
|
|||
// 0--1
|
||||
float sdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
float sdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f*FIXED_TO_FLOAT(scale);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f*FIXED_TO_FLOAT(scale);
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
|
||||
if (alphalevel >= 10 && alphalevel < 13)
|
||||
return;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
HWR_GetPatch(gpatch);
|
||||
if (!colormap)
|
||||
HWR_GetPatch(gpatch);
|
||||
else
|
||||
HWR_GetMappedPatch(gpatch, colormap);
|
||||
|
||||
switch (option & V_SCALEPATCHMASK)
|
||||
{
|
||||
|
@ -197,11 +199,14 @@ void HWR_DrawSciencePatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option,
|
|||
flags |= PF_ForceWrapY;
|
||||
|
||||
// clip it since it is used for bunny scroll in doom I
|
||||
if (option & V_TRANSLUCENT)
|
||||
if (alphalevel)
|
||||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
Surf.FlatColor.s.alpha = (UINT8)cv_grtranslucenthud.value;
|
||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[cv_translucenthud.value];
|
||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||
flags |= PF_Modulated;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
}
|
||||
|
@ -209,13 +214,13 @@ void HWR_DrawSciencePatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option,
|
|||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||
}
|
||||
|
||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, fixed_t scale, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h)
|
||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale, INT32 option, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FBITFIELD flags;
|
||||
|
||||
float cx = FIXED_TO_FLOAT(x);
|
||||
float cy = FIXED_TO_FLOAT(y);
|
||||
UINT8 alphalevel = ((option & V_ALPHAMASK) >> V_ALPHASHIFT);
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
|
@ -223,8 +228,11 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, fix
|
|||
// 0--1
|
||||
float sdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
float sdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f*FIXED_TO_FLOAT(scale);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f*FIXED_TO_FLOAT(scale);
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f*FIXED_TO_FLOAT(pscale);
|
||||
|
||||
if (alphalevel >= 10 && alphalevel < 13)
|
||||
return;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
HWR_GetPatch(gpatch);
|
||||
|
@ -247,17 +255,17 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, fix
|
|||
if (option & V_NOSCALESTART)
|
||||
sdupx = sdupy = 2.0f;
|
||||
|
||||
v[0].x = v[3].x = (cx*sdupx-gpatch->leftoffset*pdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = ((cx-sx)*sdupx+(w-gpatch->leftoffset)*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(cy*sdupy-gpatch->topoffset*pdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-((cy-sy)*sdupy+(h-gpatch->topoffset)*pdupy)/vid.height;
|
||||
v[0].x = v[3].x = (cx*sdupx - gpatch->leftoffset * pdupx) / vid.width - 1;
|
||||
v[2].x = v[1].x = (cx*sdupx + ((w-sx) - gpatch->leftoffset) * pdupx) / vid.width - 1;
|
||||
v[0].y = v[1].y = 1 - (cy*sdupy - gpatch->topoffset * pdupy) / vid.height;
|
||||
v[2].y = v[3].y = 1 - (cy*sdupy + ((h-sy) - gpatch->topoffset) * pdupy) / vid.height;
|
||||
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
v[0].sow = v[3].sow = ((float)sx/(float)gpatch->height);
|
||||
v[2].sow = v[1].sow = gpatch->max_s*((float)w/(float)gpatch->width);
|
||||
v[0].tow = v[1].tow = ((float)sy/(float)gpatch->height);
|
||||
v[2].tow = v[3].tow = gpatch->max_t*((float)h/(float)gpatch->height);
|
||||
v[0].sow = v[3].sow = ((sx)/(float)gpatch->width )*gpatch->max_s;
|
||||
v[2].sow = v[1].sow = ((w )/(float)gpatch->width )*gpatch->max_s;
|
||||
v[0].tow = v[1].tow = ((sy)/(float)gpatch->height)*gpatch->max_t;
|
||||
v[2].tow = v[3].tow = ((h )/(float)gpatch->height)*gpatch->max_t;
|
||||
|
||||
flags = BLENDMODE|PF_Clip|PF_NoZClip|PF_NoDepthTest;
|
||||
|
||||
|
@ -267,217 +275,14 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, fix
|
|||
flags |= PF_ForceWrapY;
|
||||
|
||||
// clip it since it is used for bunny scroll in doom I
|
||||
if (option & V_TRANSLUCENT)
|
||||
if (alphalevel)
|
||||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
Surf.FlatColor.s.alpha = (UINT8)cv_grtranslucenthud.value;
|
||||
flags |= PF_Modulated;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
}
|
||||
else
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||
}
|
||||
|
||||
void HWR_DrawClippedPatch (GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option)
|
||||
{
|
||||
// hardware clips the patch quite nicely anyway :)
|
||||
HWR_DrawPatch(gpatch, x, y, option); /// \todo do real cliping
|
||||
}
|
||||
|
||||
// Only supports one kind of translucent for now. Tails 06-12-2003
|
||||
// Boked
|
||||
// Alam_GBC: Why? you could not get a FSurfaceInfo to set the alpha channel?
|
||||
void HWR_DrawTranslucentPatch (GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FBITFIELD flags;
|
||||
|
||||
// 3--2
|
||||
// | /|
|
||||
// |/ |
|
||||
// 0--1
|
||||
float sdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
float sdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
FSurfaceInfo Surf;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
HWR_GetPatch (gpatch);
|
||||
|
||||
switch (option & V_SCALEPATCHMASK)
|
||||
{
|
||||
case V_NOSCALEPATCH:
|
||||
pdupx = pdupy = 2.0f;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
pdupx = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupx);
|
||||
pdupy = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupy);
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
pdupx = 2.0f * FIXED_TO_FLOAT(vid.fmeddupx);
|
||||
pdupy = 2.0f * FIXED_TO_FLOAT(vid.fmeddupy);
|
||||
break;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALESTART)
|
||||
sdupx = sdupy = 2.0f;
|
||||
|
||||
v[0].x = v[3].x = (x*sdupx-gpatch->leftoffset*pdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = (x*sdupx+(gpatch->width-gpatch->leftoffset)*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(y*sdupy-gpatch->topoffset*pdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-(y*sdupy+(gpatch->height-gpatch->topoffset)*pdupy)/vid.height;
|
||||
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
v[0].sow = v[3].sow = 0.0f;
|
||||
v[2].sow = v[1].sow = gpatch->max_s;
|
||||
v[0].tow = v[1].tow = 0.0f;
|
||||
v[2].tow = v[3].tow = gpatch->max_t;
|
||||
|
||||
flags = PF_Modulated | BLENDMODE | PF_Clip | PF_NoZClip | PF_NoDepthTest;
|
||||
|
||||
if (option & V_WRAPX)
|
||||
flags |= PF_ForceWrapX;
|
||||
if (option & V_WRAPY)
|
||||
flags |= PF_ForceWrapY;
|
||||
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
// Alam_GBC: There, you have translucent HW Draw, OK?
|
||||
if ((option & V_TRANSLUCENT) && cv_grtranslucenthud.value != 255)
|
||||
{
|
||||
Surf.FlatColor.s.alpha = (UINT8)(cv_grtranslucenthud.value/2);
|
||||
}
|
||||
else
|
||||
Surf.FlatColor.s.alpha = 127;
|
||||
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
}
|
||||
|
||||
// Draws a patch 2x as small SSNTails 06-10-2003
|
||||
void HWR_DrawSmallPatch (GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, const UINT8 *colormap)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FBITFIELD flags;
|
||||
|
||||
float sdupx = FIXED_TO_FLOAT(vid.fdupx);
|
||||
float sdupy = FIXED_TO_FLOAT(vid.fdupy);
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx);
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy);
|
||||
|
||||
// make patch ready in hardware cache
|
||||
HWR_GetMappedPatch (gpatch, colormap);
|
||||
|
||||
switch (option & V_SCALEPATCHMASK)
|
||||
{
|
||||
case V_NOSCALEPATCH:
|
||||
pdupx = pdupy = 2.0f;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
pdupx = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupx);
|
||||
pdupy = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupy);
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
pdupx = 2.0f * FIXED_TO_FLOAT(vid.fmeddupx);
|
||||
pdupy = 2.0f * FIXED_TO_FLOAT(vid.fmeddupy);
|
||||
break;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALESTART)
|
||||
sdupx = sdupy = 2.0f;
|
||||
|
||||
v[0].x = v[3].x = (x*sdupx-gpatch->leftoffset*pdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = (x*sdupx+(gpatch->width-gpatch->leftoffset)*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(y*sdupy-gpatch->topoffset*pdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-(y*sdupy+(gpatch->height-gpatch->topoffset)*pdupy)/vid.height;
|
||||
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
v[0].sow = v[3].sow = 0.0f;
|
||||
v[2].sow = v[1].sow = gpatch->max_s;
|
||||
v[0].tow = v[1].tow = 0.0f;
|
||||
v[2].tow = v[3].tow = gpatch->max_t;
|
||||
|
||||
flags = BLENDMODE | PF_Clip | PF_NoZClip | PF_NoDepthTest;
|
||||
|
||||
if (option & V_WRAPX)
|
||||
flags |= PF_ForceWrapX;
|
||||
if (option & V_WRAPY)
|
||||
flags |= PF_ForceWrapY;
|
||||
|
||||
// clip it since it is used for bunny scroll in doom I
|
||||
if (option & V_TRANSLUCENT)
|
||||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
Surf.FlatColor.s.alpha = (UINT8)cv_grtranslucenthud.value;
|
||||
flags |= PF_Modulated;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
}
|
||||
else
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, flags);
|
||||
}
|
||||
|
||||
//
|
||||
// HWR_DrawMappedPatch(): Like HWR_DrawPatch but with translated color
|
||||
//
|
||||
void HWR_DrawMappedPatch (GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, const UINT8 *colormap)
|
||||
{
|
||||
FOutVector v[4];
|
||||
FBITFIELD flags;
|
||||
|
||||
float sdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
float sdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
float pdupx = FIXED_TO_FLOAT(vid.fdupx)*2.0f;
|
||||
float pdupy = FIXED_TO_FLOAT(vid.fdupy)*2.0f;
|
||||
|
||||
// make patch ready in hardware cache
|
||||
HWR_GetMappedPatch (gpatch, colormap);
|
||||
|
||||
switch (option & V_SCALEPATCHMASK)
|
||||
{
|
||||
case V_NOSCALEPATCH:
|
||||
pdupx = pdupy = 2.0f;
|
||||
break;
|
||||
case V_SMALLSCALEPATCH:
|
||||
pdupx = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupx);
|
||||
pdupy = 2.0f * FIXED_TO_FLOAT(vid.fsmalldupy);
|
||||
break;
|
||||
case V_MEDSCALEPATCH:
|
||||
pdupx = 2.0f * FIXED_TO_FLOAT(vid.fmeddupx);
|
||||
pdupy = 2.0f * FIXED_TO_FLOAT(vid.fmeddupy);
|
||||
break;
|
||||
}
|
||||
|
||||
if (option & V_NOSCALESTART)
|
||||
sdupx = sdupy = 2.0f;
|
||||
|
||||
v[0].x = v[3].x = (x*sdupx-gpatch->leftoffset*pdupx)/vid.width - 1;
|
||||
v[2].x = v[1].x = (x*sdupx+(gpatch->width-gpatch->leftoffset)*pdupx)/vid.width - 1;
|
||||
v[0].y = v[1].y = 1-(y*sdupy-gpatch->topoffset*pdupy)/vid.height;
|
||||
v[2].y = v[3].y = 1-(y*sdupy+(gpatch->height-gpatch->topoffset)*pdupy)/vid.height;
|
||||
|
||||
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
|
||||
|
||||
v[0].sow = v[3].sow = 0.0f;
|
||||
v[2].sow = v[1].sow = gpatch->max_s;
|
||||
v[0].tow = v[1].tow = 0.0f;
|
||||
v[2].tow = v[3].tow = gpatch->max_t;
|
||||
|
||||
flags = BLENDMODE | PF_Clip | PF_NoZClip | PF_NoDepthTest;
|
||||
|
||||
if (option & V_WRAPX)
|
||||
flags |= PF_ForceWrapX;
|
||||
if (option & V_WRAPY)
|
||||
flags |= PF_ForceWrapY;
|
||||
|
||||
// clip it since it is used for bunny scroll in doom I
|
||||
if (option & V_TRANSLUCENT)
|
||||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
Surf.FlatColor.s.alpha = (UINT8)cv_grtranslucenthud.value;
|
||||
if (alphalevel == 13) Surf.FlatColor.s.alpha = softwaretranstogl_lo[cv_translucenthud.value];
|
||||
else if (alphalevel == 14) Surf.FlatColor.s.alpha = softwaretranstogl[cv_translucenthud.value];
|
||||
else if (alphalevel == 15) Surf.FlatColor.s.alpha = softwaretranstogl_hi[cv_translucenthud.value];
|
||||
else Surf.FlatColor.s.alpha = softwaretranstogl[10-alphalevel];
|
||||
flags |= PF_Modulated;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, flags);
|
||||
}
|
||||
|
@ -517,15 +322,7 @@ void HWR_DrawPic(INT32 x, INT32 y, lumpnum_t lumpnum)
|
|||
// But then, the question is: why not 0 instead of PF_Masked ?
|
||||
// or maybe PF_Environment ??? (like what I said above)
|
||||
// BP: PF_Environment don't change anything ! and 0 is undifined
|
||||
if (cv_grtranslucenthud.value != 255)
|
||||
{
|
||||
FSurfaceInfo Surf;
|
||||
Surf.FlatColor.s.red = Surf.FlatColor.s.green = Surf.FlatColor.s.blue = 0xff;
|
||||
Surf.FlatColor.s.alpha = (UINT8)cv_grtranslucenthud.value;
|
||||
HWD.pfnDrawPolygon(&Surf, v, 4, PF_Modulated | BLENDMODE | PF_NoDepthTest | PF_Clip | PF_NoZClip);
|
||||
}
|
||||
else
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, BLENDMODE | PF_NoDepthTest | PF_Clip | PF_NoZClip);
|
||||
HWD.pfnDrawPolygon(NULL, v, 4, BLENDMODE | PF_NoDepthTest | PF_Clip | PF_NoZClip);
|
||||
}
|
||||
|
||||
// ==========================================================================
|
||||
|
|
|
@ -44,12 +44,9 @@ boolean HWR_Screenshot(const char *lbmname);
|
|||
void HWR_InitTextureMapping(void);
|
||||
void HWR_SetViewSize(void);
|
||||
void HWR_DrawPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option);
|
||||
void HWR_DrawClippedPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option);
|
||||
void HWR_DrawSciencePatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option, fixed_t scale);
|
||||
void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, const UINT8 *colormap);
|
||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t scale, INT32 option, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, INT32 option, fixed_t scale, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
void HWR_DrawTranslucentPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option);
|
||||
void HWR_DrawSmallPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, const UINT8 *colormap);
|
||||
void HWR_DrawMappedPatch(GLPatch_t *gpatch, INT32 x, INT32 y, INT32 option, const UINT8 *colormap);
|
||||
void HWR_MakePatch (const patch_t *patch, GLPatch_t *grPatch, GLMipmap_t *grMipmap, boolean makebitmap);
|
||||
void HWR_CreatePlanePolygons(INT32 bspnum);
|
||||
void HWR_CreateStaticLightmaps(INT32 bspnum);
|
||||
|
|
|
@ -903,7 +903,7 @@ static inline void HU_DrawCrosshair(void)
|
|||
#endif
|
||||
y = viewwindowy + (viewheight>>1);
|
||||
|
||||
V_DrawTranslucentPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET, crosshair[i - 1]);
|
||||
V_DrawScaledPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
|
||||
static inline void HU_DrawCrosshair2(void)
|
||||
|
@ -933,7 +933,7 @@ static inline void HU_DrawCrosshair2(void)
|
|||
#endif
|
||||
y += viewheight;
|
||||
|
||||
V_DrawTranslucentPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET, crosshair[i - 1]);
|
||||
V_DrawScaledPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1086,6 +1086,10 @@ void HU_Drawer(void)
|
|||
|
||||
if (!automapactive && cv_crosshair2.value && !demoplayback && !camera2.chase && !players[secondarydisplayplayer].spectator)
|
||||
HU_DrawCrosshair2();
|
||||
|
||||
// draw desynch text
|
||||
if (hu_resynching)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, 180, V_YELLOWMAP, "Resynching...");
|
||||
}
|
||||
|
||||
//======================================================================
|
||||
|
@ -1619,7 +1623,7 @@ static void HU_DrawRankings(void)
|
|||
{
|
||||
if (circuitmap)
|
||||
{
|
||||
if (players[i].laps+1 >= tab[scorelines].count && completed[i] == false)
|
||||
if ((unsigned)players[i].laps+1 >= tab[scorelines].count && completed[i] == false)
|
||||
{
|
||||
tab[scorelines].count = players[i].laps+1;
|
||||
tab[scorelines].num = i;
|
||||
|
|
|
@ -222,21 +222,7 @@ static int libd_draw(lua_State *L)
|
|||
|
||||
flags &= ~V_PARAMMASK; // Don't let crashes happen.
|
||||
|
||||
if (colormap)
|
||||
{
|
||||
if (flags & V_ALPHAMASK)
|
||||
V_DrawTranslucentMappedPatch(x, y, flags, patch, colormap);
|
||||
else
|
||||
V_DrawMappedPatch(x, y, flags, patch, colormap);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (flags & V_ALPHAMASK)
|
||||
V_DrawTranslucentPatch(x, y, flags, patch);
|
||||
else
|
||||
V_DrawScaledPatch(x, y, flags, patch);
|
||||
}
|
||||
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, flags, patch, colormap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -245,18 +231,55 @@ static int libd_drawScaled(lua_State *L)
|
|||
fixed_t x, y, scale;
|
||||
INT32 flags;
|
||||
patch_t *patch;
|
||||
const UINT8 *colormap = NULL;
|
||||
|
||||
if (!hud_running)
|
||||
return luaL_error(L, "HUD rendering code should not be called outside of rendering hooks!");
|
||||
|
||||
x = luaL_checkinteger(L, 1);
|
||||
y = luaL_checkinteger(L, 2);
|
||||
patch = *((patch_t **)luaL_checkudata(L, 3, META_PATCH));
|
||||
scale = luaL_optinteger(L, 4, FRACUNIT);
|
||||
scale = luaL_checkinteger(L, 3);
|
||||
patch = *((patch_t **)luaL_checkudata(L, 4, META_PATCH));
|
||||
flags = luaL_optinteger(L, 5, 0);
|
||||
if (!lua_isnoneornil(L, 6))
|
||||
colormap = luaL_checkudata(L, 6, META_COLORMAP);
|
||||
|
||||
flags &= ~V_PARAMMASK; // Don't let crashes happen.
|
||||
|
||||
V_DrawFixedPatch(x, y, scale, flags, patch, colormap);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int libd_drawNum(lua_State *L)
|
||||
{
|
||||
INT32 x, y, flags, num;
|
||||
if (!hud_running)
|
||||
return luaL_error(L, "HUD rendering code should not be called outside of rendering hooks!");
|
||||
|
||||
x = luaL_checkinteger(L, 1);
|
||||
y = luaL_checkinteger(L, 2);
|
||||
num = luaL_checkinteger(L, 3);
|
||||
flags = luaL_optinteger(L, 4, 0);
|
||||
flags &= ~V_PARAMMASK; // Don't let crashes happen.
|
||||
|
||||
V_DrawTallNum(x, y, flags, num);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int libd_drawPaddedNum(lua_State *L)
|
||||
{
|
||||
INT32 x, y, flags, num, digits;
|
||||
if (!hud_running)
|
||||
return luaL_error(L, "HUD rendering code should not be called outside of rendering hooks!");
|
||||
|
||||
x = luaL_checkinteger(L, 1);
|
||||
y = luaL_checkinteger(L, 2);
|
||||
num = abs(luaL_checkinteger(L, 3));
|
||||
digits = luaL_optinteger(L, 4, 2);
|
||||
flags = luaL_optinteger(L, 5, 0);
|
||||
flags &= ~V_PARAMMASK; // Don't let crashes happen.
|
||||
|
||||
V_DrawSciencePatch(x, y, flags, patch, scale);
|
||||
V_DrawPaddedTallNum(x, y, flags, num, digits);
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -322,6 +345,8 @@ static luaL_Reg lib_draw[] = {
|
|||
{"cachePatch", libd_cachePatch},
|
||||
{"draw", libd_draw},
|
||||
{"drawScaled", libd_drawScaled},
|
||||
{"drawNum", libd_drawNum},
|
||||
{"drawPaddedNum", libd_drawPaddedNum},
|
||||
{"drawFill", libd_drawFill},
|
||||
{"drawString", libd_drawString},
|
||||
{"stringWidth", libd_stringWidth},
|
||||
|
|
|
@ -742,7 +742,7 @@ static int lib_setSfxInfo(lua_State *L)
|
|||
enum sfxinfo_write i;
|
||||
|
||||
if (lua_isnumber(L, 2))
|
||||
i = lua_tointeger(L, 2);
|
||||
i = lua_tointeger(L, 2) - 1; // lua is one based, this enum is zero based.
|
||||
else
|
||||
i = luaL_checkoption(L, 2, NULL, sfxinfo_wopt);
|
||||
|
||||
|
|
|
@ -118,8 +118,6 @@ static int player_get(lua_State *L)
|
|||
lua_pushinteger(L, plr->bob);
|
||||
else if (fastcmp(field,"aiming"))
|
||||
lua_pushinteger(L, plr->aiming);
|
||||
else if (fastcmp(field,"awayviewaiming"))
|
||||
lua_pushinteger(L, plr->awayviewaiming);
|
||||
else if (fastcmp(field,"health"))
|
||||
lua_pushinteger(L, plr->health);
|
||||
else if (fastcmp(field,"pity"))
|
||||
|
@ -187,7 +185,7 @@ static int player_get(lua_State *L)
|
|||
else if (fastcmp(field,"speed"))
|
||||
lua_pushinteger(L, plr->speed);
|
||||
else if (fastcmp(field,"jumping"))
|
||||
lua_pushinteger(L, plr->jumping);
|
||||
lua_pushboolean(L, plr->jumping);
|
||||
else if (fastcmp(field,"secondjump"))
|
||||
lua_pushinteger(L, plr->secondjump);
|
||||
else if (fastcmp(field,"fly1"))
|
||||
|
@ -306,6 +304,8 @@ static int player_get(lua_State *L)
|
|||
LUA_PushUserdata(L, plr->awayviewmobj, META_MOBJ);
|
||||
else if (fastcmp(field,"awayviewtics"))
|
||||
lua_pushinteger(L, plr->awayviewtics);
|
||||
else if (fastcmp(field,"awayviewaiming"))
|
||||
lua_pushinteger(L, plr->awayviewaiming);
|
||||
else if (fastcmp(field,"spectator"))
|
||||
lua_pushinteger(L, plr->spectator);
|
||||
else if (fastcmp(field,"bot"))
|
||||
|
@ -365,8 +365,6 @@ static int player_set(lua_State *L)
|
|||
else if (plr == &players[secondarydisplayplayer])
|
||||
localaiming2 = plr->aiming;
|
||||
}
|
||||
else if (fastcmp(field,"awayviewaiming"))
|
||||
plr->awayviewaiming = (angle_t)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"health"))
|
||||
plr->health = (INT32)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"pity"))
|
||||
|
@ -424,17 +422,17 @@ static int player_set(lua_State *L)
|
|||
else if (fastcmp(field,"jumpfactor"))
|
||||
plr->jumpfactor = (INT32)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"lives"))
|
||||
plr->lives = (INT32)luaL_checkinteger(L, 3);
|
||||
plr->lives = (SINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"continues"))
|
||||
plr->continues = (INT32)luaL_checkinteger(L, 3);
|
||||
plr->continues = (SINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"xtralife"))
|
||||
plr->xtralife = (INT32)luaL_checkinteger(L, 3);
|
||||
plr->xtralife = (SINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"gotcontinue"))
|
||||
plr->gotcontinue = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"speed"))
|
||||
plr->speed = (fixed_t)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"jumping"))
|
||||
plr->jumping = (INT32)luaL_checkinteger(L, 3);
|
||||
plr->jumping = luaL_checkboolean(L, 3);
|
||||
else if (fastcmp(field,"secondjump"))
|
||||
plr->secondjump = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"fly1"))
|
||||
|
@ -462,13 +460,13 @@ static int player_set(lua_State *L)
|
|||
else if (fastcmp(field,"rmomy"))
|
||||
plr->rmomy = (fixed_t)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"numboxes"))
|
||||
plr->numboxes = (INT32)luaL_checkinteger(L, 3);
|
||||
plr->numboxes = (INT16)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"totalring"))
|
||||
plr->totalring = (INT32)luaL_checkinteger(L, 3);
|
||||
plr->totalring = (INT16)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"realtime"))
|
||||
plr->realtime = (tic_t)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"laps"))
|
||||
plr->laps = (UINT32)luaL_checkinteger(L, 3);
|
||||
plr->laps = (UINT8)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"ctfteam"))
|
||||
plr->ctfteam = (INT32)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"gotflag"))
|
||||
|
@ -567,6 +565,8 @@ static int player_set(lua_State *L)
|
|||
if (plr->awayviewtics && !plr->awayviewmobj) // awayviewtics must ALWAYS have an awayviewmobj set!!
|
||||
P_SetTarget(&plr->awayviewmobj, plr->mo); // but since the script might set awayviewmobj immediately AFTER setting awayviewtics, use player mobj as filler for now.
|
||||
}
|
||||
else if (fastcmp(field,"awayviewaiming"))
|
||||
plr->awayviewaiming = (angle_t)luaL_checkinteger(L, 3);
|
||||
else if (fastcmp(field,"spectator"))
|
||||
plr->spectator = lua_toboolean(L, 3);
|
||||
else if (fastcmp(field,"bot"))
|
||||
|
|
|
@ -464,9 +464,9 @@ void Command_Savecheckpoint_f(void)
|
|||
// Like M_GetAllEmeralds() but for console devmode junkies.
|
||||
void Command_Getallemeralds_f(void)
|
||||
{
|
||||
REQUIRE_PANDORA;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
REQUIRE_NOULTIMATE;
|
||||
REQUIRE_PANDORA;
|
||||
|
||||
emeralds = ((EMERALD7)*2)-1;
|
||||
|
||||
|
@ -475,8 +475,8 @@ void Command_Getallemeralds_f(void)
|
|||
|
||||
void Command_Resetemeralds_f(void)
|
||||
{
|
||||
REQUIRE_PANDORA;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
REQUIRE_PANDORA;
|
||||
|
||||
emeralds = 0;
|
||||
|
||||
|
@ -511,10 +511,10 @@ void Command_Devmode_f(void)
|
|||
|
||||
void Command_Setrings_f(void)
|
||||
{
|
||||
REQUIRE_PANDORA;
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
REQUIRE_NOULTIMATE;
|
||||
REQUIRE_PANDORA;
|
||||
|
||||
if (COM_Argc() > 1)
|
||||
{
|
||||
|
@ -530,10 +530,10 @@ void Command_Setrings_f(void)
|
|||
|
||||
void Command_Setlives_f(void)
|
||||
{
|
||||
REQUIRE_PANDORA;
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
REQUIRE_NOULTIMATE;
|
||||
REQUIRE_PANDORA;
|
||||
|
||||
if (COM_Argc() > 1)
|
||||
{
|
||||
|
@ -547,10 +547,10 @@ void Command_Setlives_f(void)
|
|||
|
||||
void Command_Setcontinues_f(void)
|
||||
{
|
||||
REQUIRE_PANDORA;
|
||||
REQUIRE_INLEVEL;
|
||||
REQUIRE_SINGLEPLAYER;
|
||||
REQUIRE_NOULTIMATE;
|
||||
REQUIRE_PANDORA;
|
||||
|
||||
if (COM_Argc() > 1)
|
||||
{
|
||||
|
|
32
src/m_menu.c
32
src/m_menu.c
|
@ -1137,8 +1137,6 @@ static menuitem_t OP_OpenGLOptionsMenu[] =
|
|||
#ifdef _WINDOWS
|
||||
{IT_STRING|IT_CVAR, NULL, "Fullscreen", &cv_fullscreen, 50},
|
||||
#endif
|
||||
{IT_STRING|IT_CVAR|IT_CV_SLIDER,
|
||||
NULL, "Translucent HUD", &cv_grtranslucenthud, 60},
|
||||
#ifdef ALAM_LIGHTING
|
||||
{IT_SUBMENU|IT_STRING, NULL, "Lighting...", &OP_OpenGLLightingDef, 70},
|
||||
#endif
|
||||
|
@ -1245,17 +1243,19 @@ static menuitem_t OP_GameOptionsMenu[] =
|
|||
NULL, "Master server", &cv_masterserver, 10},
|
||||
#endif
|
||||
{IT_STRING | IT_CVAR, NULL, "Show HUD", &cv_showhud, 40},
|
||||
{IT_STRING | IT_CVAR, NULL, "Timer Display", &cv_timetic, 50},
|
||||
{IT_STRING | IT_CVAR | IT_CV_SLIDER,
|
||||
NULL, "HUD Visibility", &cv_translucenthud, 50},
|
||||
{IT_STRING | IT_CVAR, NULL, "Timer Display", &cv_timetic, 60},
|
||||
#ifdef SEENAMES
|
||||
{IT_STRING | IT_CVAR, NULL, "HUD Player Names", &cv_seenames, 60},
|
||||
{IT_STRING | IT_CVAR, NULL, "HUD Player Names", &cv_seenames, 80},
|
||||
#endif
|
||||
{IT_STRING | IT_CVAR, NULL, "Log Hazard Damage", &cv_hazardlog, 70},
|
||||
{IT_STRING | IT_CVAR, NULL, "Log Hazard Damage", &cv_hazardlog, 90},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Console Back Color", &cons_backcolor, 90},
|
||||
{IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize,100},
|
||||
{IT_STRING | IT_CVAR, NULL, "Uppercase Console", &cv_allcaps, 110},
|
||||
{IT_STRING | IT_CVAR, NULL, "Console Back Color", &cons_backcolor, 100},
|
||||
{IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize,110},
|
||||
{IT_STRING | IT_CVAR, NULL, "Uppercase Console", &cv_allcaps, 120},
|
||||
|
||||
{IT_STRING | IT_CVAR, NULL, "Title Screen Demos", &cv_rollingdemos, 130},
|
||||
{IT_STRING | IT_CVAR, NULL, "Title Screen Demos", &cv_rollingdemos, 140},
|
||||
};
|
||||
|
||||
static menuitem_t OP_ServerOptionsMenu[] =
|
||||
|
@ -1276,7 +1276,7 @@ static menuitem_t OP_ServerOptionsMenu[] =
|
|||
{IT_STRING | IT_CVAR, NULL, "Max Players", &cv_maxplayers, 110},
|
||||
{IT_STRING | IT_CVAR, NULL, "Allow players to join", &cv_allownewplayer, 120},
|
||||
{IT_STRING | IT_CVAR, NULL, "Allow WAD Downloading", &cv_downloading, 130},
|
||||
{IT_STRING | IT_CVAR, NULL, "Consistency Protection", &cv_consfailprotect, 140},
|
||||
{IT_STRING | IT_CVAR, NULL, "Attempts to Resynch", &cv_resynchattempts, 140},
|
||||
#endif
|
||||
};
|
||||
|
||||
|
@ -4681,9 +4681,9 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
|||
}
|
||||
patch = W_CachePatchName(picname, PU_CACHE);
|
||||
if (SHORT(patch->width) >= 256)
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, 0, patch, FRACUNIT/2, 0, SHORT(patch->height) - 64 + o*2, SHORT(patch->width), SHORT(patch->height));
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, FRACUNIT/2, 0, patch, 0, SHORT(patch->height) - 64 + o*2, SHORT(patch->width), SHORT(patch->height));
|
||||
else
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, 0, patch, FRACUNIT, 0, SHORT(patch->height) - 32 + o, SHORT(patch->width), SHORT(patch->height));
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, FRACUNIT, 0, patch, 0, SHORT(patch->height) - 32 + o, SHORT(patch->width), SHORT(patch->height));
|
||||
W_UnlockCachedPatch(patch);
|
||||
}
|
||||
|
||||
|
@ -4707,9 +4707,9 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
|||
}
|
||||
patch = W_CachePatchName(picname, PU_CACHE);
|
||||
if (SHORT(patch->width) >= 256)
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 168 - o)<<FRACBITS, 0, patch, FRACUNIT/2, 0, 0, SHORT(patch->width), o*2);
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 168 - o)<<FRACBITS, FRACUNIT/2, 0, patch, 0, 0, SHORT(patch->width), o*2);
|
||||
else
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 168 - o)<<FRACBITS, 0, patch, FRACUNIT, 0, 0, SHORT(patch->width), o);
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 168 - o)<<FRACBITS, FRACUNIT, 0, patch, 0, 0, SHORT(patch->width), o);
|
||||
W_UnlockCachedPatch(patch);
|
||||
}
|
||||
|
||||
|
@ -4741,9 +4741,9 @@ static void M_DrawSetupChoosePlayerMenu(void)
|
|||
else
|
||||
{
|
||||
if (SHORT(patch->width) >= 256)
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, 0, patch, FRACUNIT/2, 0, (o - 32)*2, SHORT(patch->width), SHORT(patch->height));
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, FRACUNIT/2, 0, patch, 0, (o - 32)*2, SHORT(patch->width), SHORT(patch->height));
|
||||
else
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, 0, patch, FRACUNIT, 0, o - 32, SHORT(patch->width), SHORT(patch->height));
|
||||
V_DrawCroppedPatch(8<<FRACBITS, (my + 8)<<FRACBITS, FRACUNIT, 0, patch, 0, o - 32, SHORT(patch->width), SHORT(patch->height));
|
||||
}
|
||||
W_UnlockCachedPatch(patch);
|
||||
}
|
||||
|
|
|
@ -2552,7 +2552,7 @@ static boolean PTR_SlideTraverse(intercept_t *in)
|
|||
// one-sided linedef
|
||||
if (!li->backsector)
|
||||
{
|
||||
if (P_PointOnLineSide(mapcampointer->x, mapcampointer->y, li))
|
||||
if (P_PointOnLineSide(slidemo->x, slidemo->y, li))
|
||||
return true; // don't hit the back side
|
||||
goto isblocking;
|
||||
}
|
||||
|
|
|
@ -120,6 +120,13 @@ static inline void P_NetArchivePlayers(void)
|
|||
|
||||
flags = 0;
|
||||
|
||||
// ticcmd write
|
||||
WRITESINT8(save_p, players[i].cmd.forwardmove);
|
||||
WRITESINT8(save_p, players[i].cmd.sidemove);
|
||||
WRITEINT16(save_p, players[i].cmd.angleturn);
|
||||
WRITEINT16(save_p, players[i].cmd.aiming);
|
||||
WRITEUINT16(save_p, players[i].cmd.buttons);
|
||||
|
||||
WRITESTRINGN(save_p, player_names[i], MAXPLAYERNAME);
|
||||
WRITEANGLE(save_p, players[i].aiming);
|
||||
WRITEANGLE(save_p, players[i].awayviewaiming);
|
||||
|
@ -146,12 +153,12 @@ static inline void P_NetArchivePlayers(void)
|
|||
WRITEUINT32(save_p, players[i].score);
|
||||
WRITEINT32(save_p, players[i].dashspeed);
|
||||
WRITEINT32(save_p, players[i].dashtime);
|
||||
WRITEINT32(save_p, players[i].lives);
|
||||
WRITEINT32(save_p, players[i].continues);
|
||||
WRITEINT32(save_p, players[i].xtralife);
|
||||
WRITESINT8(save_p, players[i].lives);
|
||||
WRITESINT8(save_p, players[i].continues);
|
||||
WRITESINT8(save_p, players[i].xtralife);
|
||||
WRITEUINT8(save_p, players[i].gotcontinue);
|
||||
WRITEINT32(save_p, players[i].speed);
|
||||
WRITEINT32(save_p, players[i].jumping);
|
||||
WRITEUINT8(save_p, players[i].jumping);
|
||||
WRITEUINT8(save_p, players[i].secondjump);
|
||||
WRITEUINT8(save_p, players[i].fly1);
|
||||
WRITEUINT8(save_p, players[i].scoreadd);
|
||||
|
@ -176,7 +183,7 @@ static inline void P_NetArchivePlayers(void)
|
|||
WRITEINT32(save_p, players[i].numboxes);
|
||||
WRITEINT32(save_p, players[i].totalring);
|
||||
WRITEUINT32(save_p, players[i].realtime);
|
||||
WRITEUINT32(save_p, players[i].laps);
|
||||
WRITEUINT8(save_p, players[i].laps);
|
||||
|
||||
////////////////////
|
||||
// CTF Mode Stuff //
|
||||
|
@ -282,6 +289,7 @@ static inline void P_NetUnArchivePlayers(void)
|
|||
{
|
||||
INT32 i, j;
|
||||
UINT16 flags;
|
||||
ticcmd_t tmptic;
|
||||
|
||||
if (READUINT32(save_p) != ARCHIVEBLOCK_PLAYERS)
|
||||
I_Error("Bad $$$.sav at archive block Players");
|
||||
|
@ -292,6 +300,14 @@ static inline void P_NetUnArchivePlayers(void)
|
|||
if (!playeringame[i])
|
||||
continue;
|
||||
|
||||
memset(&tmptic, 0, sizeof(ticcmd_t));
|
||||
tmptic.forwardmove = READSINT8(save_p);
|
||||
tmptic.sidemove = READSINT8(save_p);
|
||||
tmptic.angleturn = READINT16(save_p);
|
||||
tmptic.aiming = READINT16(save_p);
|
||||
tmptic.buttons = READUINT16(save_p);
|
||||
G_CopyTiccmd(&players[i].cmd, &tmptic, 1);
|
||||
|
||||
READSTRINGN(save_p, player_names[i], MAXPLAYERNAME);
|
||||
players[i].aiming = READANGLE(save_p);
|
||||
players[i].awayviewaiming = READANGLE(save_p);
|
||||
|
@ -318,12 +334,12 @@ static inline void P_NetUnArchivePlayers(void)
|
|||
players[i].score = READUINT32(save_p);
|
||||
players[i].dashspeed = READINT32(save_p); // dashing speed
|
||||
players[i].dashtime = READINT32(save_p); // dashing speed
|
||||
players[i].lives = READINT32(save_p);
|
||||
players[i].continues = READINT32(save_p); // continues that player has acquired
|
||||
players[i].xtralife = READINT32(save_p); // Ring Extra Life counter
|
||||
players[i].lives = READSINT8(save_p);
|
||||
players[i].continues = READSINT8(save_p); // continues that player has acquired
|
||||
players[i].xtralife = READSINT8(save_p); // Ring Extra Life counter
|
||||
players[i].gotcontinue = READUINT8(save_p); // got continue from stage
|
||||
players[i].speed = READINT32(save_p); // Player's speed (distance formula of MOMX and MOMY values)
|
||||
players[i].jumping = READINT32(save_p); // Jump counter
|
||||
players[i].jumping = READUINT8(save_p); // Jump counter
|
||||
players[i].secondjump = READUINT8(save_p);
|
||||
players[i].fly1 = READUINT8(save_p); // Tails flying
|
||||
players[i].scoreadd = READUINT8(save_p); // Used for multiple enemy attack bonus
|
||||
|
@ -348,7 +364,7 @@ static inline void P_NetUnArchivePlayers(void)
|
|||
players[i].numboxes = READINT32(save_p); // Number of item boxes obtained for Race Mode
|
||||
players[i].totalring = READINT32(save_p); // Total number of rings obtained for Race Mode
|
||||
players[i].realtime = READUINT32(save_p); // integer replacement for leveltime
|
||||
players[i].laps = READUINT32(save_p); // Number of laps (optional)
|
||||
players[i].laps = READUINT8(save_p); // Number of laps (optional)
|
||||
|
||||
////////////////////
|
||||
// CTF Mode Stuff //
|
||||
|
|
27
src/p_spec.c
27
src/p_spec.c
|
@ -3854,10 +3854,10 @@ DoneSection2:
|
|||
if (player->pflags & PF_NIGHTSMODE)
|
||||
player->drillmeter += 48*20;
|
||||
|
||||
if (player->laps >= (unsigned)cv_numlaps.value)
|
||||
if (player->laps >= (UINT8)cv_numlaps.value)
|
||||
CONS_Printf(M_GetText("%s has finished the race.\n"), player_names[player-players]);
|
||||
else
|
||||
CONS_Printf(M_GetText("%s started lap %d\n"), player_names[player-players],player->laps+1);
|
||||
CONS_Printf(M_GetText("%s started lap %u\n"), player_names[player-players], (UINT32)player->laps+1);
|
||||
|
||||
// Reset starposts (checkpoints) info
|
||||
player->starpostangle = player->starposttime = player->starpostnum = 0;
|
||||
|
@ -5342,10 +5342,14 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
|||
if (lines[i].special == 6)
|
||||
{
|
||||
// Ability flags can disable disable linedefs now, lol
|
||||
if ((netgame || multiplayer)
|
||||
|| (!(players[consoleplayer].charability == CA_THOK && (lines[i].flags & ML_NOSONIC))
|
||||
&& !(players[consoleplayer].charability == CA_FLY && (lines[i].flags & ML_NOTAILS))
|
||||
&& !(players[consoleplayer].charability == CA_GLIDEANDCLIMB && (lines[i].flags & ML_NOKNUX))))
|
||||
if (netgame || multiplayer)
|
||||
{
|
||||
// future: nonet flag?
|
||||
}
|
||||
else if (((lines[i].flags & ML_NETONLY) != ML_NETONLY)
|
||||
&& !(players[consoleplayer].charability == CA_THOK && (lines[i].flags & ML_NOSONIC))
|
||||
&& !(players[consoleplayer].charability == CA_FLY && (lines[i].flags & ML_NOTAILS))
|
||||
&& !(players[consoleplayer].charability == CA_GLIDEANDCLIMB && (lines[i].flags & ML_NOKNUX )))
|
||||
{
|
||||
for (j = -1; (j = P_FindLineFromLineTag(&lines[i], j)) >= 0;)
|
||||
{
|
||||
|
@ -5404,7 +5408,16 @@ void P_SpawnSpecials(INT32 fromnetsave)
|
|||
for (i = 0; i < numlines; i++)
|
||||
{
|
||||
// set line specials to 0 here too, same reason as above
|
||||
if (!(netgame || multiplayer))
|
||||
if (netgame || multiplayer)
|
||||
{
|
||||
// future: nonet flag?
|
||||
}
|
||||
else if ((lines[i].flags & ML_NETONLY) == ML_NETONLY)
|
||||
{
|
||||
lines[i].special = 0;
|
||||
continue;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (players[consoleplayer].charability == CA_THOK && (lines[i].flags & ML_NOSONIC))
|
||||
{
|
||||
|
|
18
src/p_user.c
18
src/p_user.c
|
@ -8113,19 +8113,15 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
+ ((*rover->topheight - *rover->bottomheight)/2));
|
||||
delta2 = thingtop - (*rover->bottomheight
|
||||
+ ((*rover->topheight - *rover->bottomheight)/2));
|
||||
if (*rover->topheight > tmfloorz && abs(delta1) < abs(delta2))
|
||||
{
|
||||
if (*rover->topheight > myfloorz && abs(delta1) < abs(delta2))
|
||||
myfloorz = *rover->topheight;
|
||||
}
|
||||
if (*rover->bottomheight < tmceilingz && abs(delta1) >= abs(delta2))
|
||||
{
|
||||
if (*rover->bottomheight < myceilingz && abs(delta1) >= abs(delta2))
|
||||
myceilingz = *rover->bottomheight;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef POLYOBJECTS
|
||||
// Check polyobjects and see if tmfloorz/tmceilingz need to be altered
|
||||
// Check polyobjects and see if floorz/ceilingz need to be altered
|
||||
{
|
||||
INT32 xl, xh, yl, yh, bx, by;
|
||||
validcount++;
|
||||
|
@ -8191,10 +8187,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
delta1 = midz - (polybottom + ((polytop - polybottom)/2));
|
||||
delta2 = thingtop - (polybottom + ((polytop - polybottom)/2));
|
||||
|
||||
if (polytop > tmfloorz && abs(delta1) < abs(delta2))
|
||||
if (polytop > myfloorz && abs(delta1) < abs(delta2))
|
||||
myfloorz = polytop;
|
||||
|
||||
if (polybottom < tmceilingz && abs(delta1) >= abs(delta2))
|
||||
if (polybottom < myceilingz && abs(delta1) >= abs(delta2))
|
||||
myceilingz = polybottom;
|
||||
}
|
||||
plink = (polymaplink_t *)(plink->link.next);
|
||||
|
@ -8204,7 +8200,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
#endif
|
||||
|
||||
// crushed camera
|
||||
if (myceilingz <= myfloorz && !resetcalled && !cameranoclip)
|
||||
if (myceilingz <= myfloorz + thiscam->height && !resetcalled && !cameranoclip)
|
||||
{
|
||||
P_ResetCamera(player, thiscam);
|
||||
return true;
|
||||
|
@ -8645,7 +8641,7 @@ void P_PlayerThink(player_t *player)
|
|||
if (players[i].lives <= 0)
|
||||
continue;
|
||||
|
||||
if (!players[i].exiting)
|
||||
if (!players[i].exiting || players[i].exiting > 3)
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -122,7 +122,7 @@ static CV_PossibleValue_t drawdist_cons_t[] = {
|
|||
{3072, "3072"}, {4096, "4096"}, {6144, "6144"},
|
||||
{8192, "8192"}, {0, "Infinite"}, {0, NULL}};
|
||||
static CV_PossibleValue_t precipdensity_cons_t[] = {{0, "None"}, {1, "Light"}, {2, "Moderate"}, {4, "Heavy"}, {6, "Thick"}, {8, "V.Thick"}, {0, NULL}};
|
||||
static CV_PossibleValue_t grtranslucenthud_cons_t[] = {{1, "MIN"}, {255, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t translucenthud_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t homremoval_cons_t[] = {{0, "No"}, {1, "Yes"}, {2, "Flash"}, {0, NULL}};
|
||||
|
||||
static void ChaseCam_OnChange(void);
|
||||
|
@ -141,7 +141,7 @@ consvar_t cv_skybox = {"skybox", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0
|
|||
consvar_t cv_soniccd = {"soniccd", "Off", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_allowmlook = {"allowmlook", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_showhud = {"showhud", "Yes", CV_CALL, CV_YesNo, R_SetViewSize, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_grtranslucenthud = {"gr_translucenthud", "255", CV_SAVE|CV_CALL, grtranslucenthud_cons_t, R_SetViewSize, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_translucenthud = {"translucenthud", "10", CV_SAVE, translucenthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_drawdist = {"drawdist", "Infinite", CV_SAVE, drawdist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_drawdist_nights = {"drawdist_nights", "2048", CV_SAVE, drawdist_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -1237,11 +1237,11 @@ void R_RegisterEngineStuff(void)
|
|||
CV_RegisterVar(&cv_cam2_rotspeed);
|
||||
|
||||
CV_RegisterVar(&cv_showhud);
|
||||
CV_RegisterVar(&cv_translucenthud);
|
||||
|
||||
// Default viewheight is changeable,
|
||||
// initialized to standard viewheight
|
||||
CV_RegisterVar(&cv_viewheight);
|
||||
CV_RegisterVar(&cv_grtranslucenthud);
|
||||
|
||||
#ifdef HWRENDER
|
||||
// GL-specific Commands
|
||||
|
|
|
@ -81,9 +81,8 @@ subsector_t *R_IsPointInSubsector(fixed_t x, fixed_t y);
|
|||
// REFRESH - the actual rendering functions.
|
||||
//
|
||||
|
||||
extern consvar_t cv_showhud;
|
||||
extern consvar_t cv_showhud, cv_translucenthud;
|
||||
extern consvar_t cv_homremoval;
|
||||
extern consvar_t cv_grtranslucenthud;
|
||||
extern consvar_t cv_chasecam, cv_chasecam2;
|
||||
extern consvar_t cv_flipcam, cv_flipcam2;
|
||||
extern consvar_t cv_shadow, cv_shadowoffs;
|
||||
|
|
326
src/st_stuff.c
326
src/st_stuff.c
|
@ -129,27 +129,29 @@ hudinfo_t hudinfo[NUMHUDITEMS] =
|
|||
{ 16, 176}, // HUD_LIVESPIC
|
||||
{ 74, 184}, // HUD_LIVESNUM
|
||||
{ 38, 186}, // HUD_LIVESX
|
||||
{ 220, 10}, // HUD_RINGSSPLIT
|
||||
{ 288, 10}, // HUD_RINGSNUMSPLIT
|
||||
|
||||
{ 16, 42}, // HUD_RINGS
|
||||
{ 220, 10}, // HUD_RINGSSPLIT
|
||||
{ 112, 42}, // HUD_RINGSNUM
|
||||
{ 288, 10}, // HUD_RINGSNUMSPLIT
|
||||
|
||||
{ 16, 10}, // HUD_SCORE
|
||||
{ 128, 10}, // HUD_SCORENUM
|
||||
{ 136, 10}, // HUD_TIMESPLIT
|
||||
|
||||
{ 212, 10}, // HUD_SECONDSSPLIT
|
||||
{ 188, 10}, // HUD_MINUTESSPLIT
|
||||
{ 188, 10}, // HUD_TIMECOLONSPLIT
|
||||
{ 17, 26}, // HUD_TIME
|
||||
|
||||
{ 136, 10}, // HUD_TIMESPLIT
|
||||
{ 88, 26}, // HUD_MINUTES
|
||||
{ 188, 10}, // HUD_MINUTESSPLIT
|
||||
{ 88, 26}, // HUD_TIMECOLON
|
||||
{ 188, 10}, // HUD_TIMECOLONSPLIT
|
||||
{ 112, 26}, // HUD_SECONDS
|
||||
{ 212, 10}, // HUD_SECONDSSPLIT
|
||||
{ 112, 26}, // HUD_TIMETICCOLON
|
||||
{ 136, 26}, // HUD_TICS
|
||||
|
||||
{ 112, 26}, // HUD_SECONDS
|
||||
{ 88, 26}, // HUD_MINUTES
|
||||
{ 88, 26}, // HUD_TIMECOLON
|
||||
{ 112, 26}, // HUD_TIMETICCOLON
|
||||
{ 288, 40}, // HUD_SS_TOTALRINGS_SPLIT
|
||||
{ 112, 56}, // HUD_SS_TOTALRINGS
|
||||
{ 288, 40}, // HUD_SS_TOTALRINGS_SPLIT
|
||||
|
||||
{ 110, 93}, // HUD_GETRINGS
|
||||
{ 160, 93}, // HUD_GETRINGSNUM
|
||||
{ 124, 160}, // HUD_TIMELEFT
|
||||
|
@ -160,9 +162,6 @@ hudinfo_t hudinfo[NUMHUDITEMS] =
|
|||
{ 240, 160}, // HUD_LAP
|
||||
};
|
||||
|
||||
#define ST_DrawOverlayNum(x,y,f,n) V_DrawTallNum(x, y, f|V_TRANSLUCENT, n)
|
||||
#define ST_DrawPaddedOverlayNum(x,y,n,d) V_DrawPaddedTallNum(x, y, V_NOSCALESTART|V_TRANSLUCENT, n, d)
|
||||
|
||||
//
|
||||
// STATUS BAR CODE
|
||||
//
|
||||
|
@ -463,6 +462,7 @@ static INT32 SCX(INT32 x)
|
|||
return FixedInt(FixedMul(x<<FRACBITS, vid.fdupx));
|
||||
}
|
||||
|
||||
#if 0
|
||||
static INT32 SCR(INT32 r)
|
||||
{
|
||||
fixed_t y;
|
||||
|
@ -478,40 +478,27 @@ static INT32 SCR(INT32 r)
|
|||
}
|
||||
return FixedInt(FixedDiv(y, vid.fdupy));
|
||||
}
|
||||
#endif
|
||||
|
||||
// Draw a number, scaled, over the view
|
||||
// =========================================================================
|
||||
// INTERNAL DRAWING
|
||||
// =========================================================================
|
||||
#define ST_DrawOverlayNum(x,y,n) V_DrawTallNum(x, y, V_NOSCALESTART|V_HUDTRANS, n)
|
||||
#define ST_DrawPaddedOverlayNum(x,y,n,d) V_DrawPaddedTallNum(x, y, V_NOSCALESTART|V_HUDTRANS, n, d)
|
||||
#define ST_DrawOverlayPatch(x,y,p) V_DrawScaledPatch(x, y, V_NOSCALESTART|V_HUDTRANS, p)
|
||||
#define ST_DrawMappedOverlayPatch(x,y,p,c) V_DrawMappedScaledPatch(x, y, V_NOSCALESTART|V_HUDTRANS, p, c)
|
||||
#define ST_DrawNumFromHud(h,n) V_DrawTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART|V_HUDTRANS, n)
|
||||
#define ST_DrawPadNumFromHud(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART|V_HUDTRANS, n, q)
|
||||
#define ST_DrawPatchFromHud(h,p) V_DrawScaledPatch(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART|V_HUDTRANS, p)
|
||||
#define ST_DrawNumFromHudWS(h,n) V_DrawTallNum(SCX(hudinfo[h+!!splitscreen].x), SCY(hudinfo[h+!!splitscreen].y), V_NOSCALESTART|V_HUDTRANS, n)
|
||||
#define ST_DrawPadNumFromHudWS(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h+!!splitscreen].x), SCY(hudinfo[h+!!splitscreen].y), V_NOSCALESTART|V_HUDTRANS, n, q)
|
||||
#define ST_DrawPatchFromHudWS(h,p) V_DrawScaledPatch(SCX(hudinfo[h+!!splitscreen].x), SCY(hudinfo[h+!!splitscreen].y), V_NOSCALESTART|V_HUDTRANS, p)
|
||||
|
||||
// Draw a number, scaled, over the view, maybe with set translucency
|
||||
// Always draw the number completely since it's overlay
|
||||
//
|
||||
// Supports different colors! woo!
|
||||
static void ST_DrawNightsOverlayNum(INT32 x /* right border */, INT32 y, INT32 num,
|
||||
patch_t **numpat, skincolors_t colornum)
|
||||
{
|
||||
INT32 w = SHORT(numpat[0]->width);
|
||||
const UINT8 *colormap;
|
||||
|
||||
if (colornum == 0)
|
||||
colormap = colormaps;
|
||||
else // Uses the player colors.
|
||||
colormap = R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE);
|
||||
|
||||
I_Assert(num >= 0); // this function does not draw negative numbers
|
||||
|
||||
// draw the number
|
||||
do
|
||||
{
|
||||
x -= (w * vid.dupx);
|
||||
V_DrawMappedPatch(x, y, V_NOSCALESTART|V_TRANSLUCENT, numpat[num % 10], colormap);
|
||||
num /= 10;
|
||||
} while (num);
|
||||
|
||||
// Sorry chum, this function only draws UNSIGNED values!
|
||||
}
|
||||
|
||||
// Draw a number, scaled, over the view, with set translucency
|
||||
// Always draw the number completely since it's overlay
|
||||
//
|
||||
// Supports different colors! woo!
|
||||
static void ST_DrawTranslucentNightsOverlayNum(INT32 x /* right border */, INT32 y, INT32 a,
|
||||
static void ST_DrawNightsOverlayNum(INT32 x /* right border */, INT32 y, INT32 a,
|
||||
INT32 num, patch_t **numpat, skincolors_t colornum)
|
||||
{
|
||||
INT32 w = SHORT(numpat[0]->width);
|
||||
|
@ -603,16 +590,16 @@ static void ST_drawDebugInfo(void)
|
|||
static void ST_drawScore(void)
|
||||
{
|
||||
// SCORE:
|
||||
V_DrawScaledPatch(SCX(hudinfo[HUD_SCORE].x), SCY(hudinfo[HUD_SCORE].y), V_NOSCALESTART|V_TRANSLUCENT, sboscore);
|
||||
ST_DrawPatchFromHud(HUD_SCORE, sboscore);
|
||||
if (objectplacing)
|
||||
{
|
||||
if (op_displayflags > UINT16_MAX)
|
||||
V_DrawScaledPatch(SCX(hudinfo[HUD_SCORENUM].x-tallminus->width), SCY(hudinfo[HUD_SCORENUM].y), V_NOSCALESTART, tallminus);
|
||||
ST_DrawOverlayPatch(SCX(hudinfo[HUD_SCORENUM].x-tallminus->width), SCY(hudinfo[HUD_SCORENUM].y), tallminus);
|
||||
else
|
||||
ST_DrawOverlayNum(SCX(hudinfo[HUD_SCORENUM].x), SCY(hudinfo[HUD_SCORENUM].y), V_NOSCALESTART, op_displayflags);
|
||||
ST_DrawNumFromHud(HUD_SCORENUM, op_displayflags);
|
||||
}
|
||||
else
|
||||
ST_DrawOverlayNum(SCX(hudinfo[HUD_SCORENUM].x), SCY(hudinfo[HUD_SCORENUM].y), V_NOSCALESTART, stplyr->score);
|
||||
ST_DrawNumFromHud(HUD_SCORENUM, stplyr->score);
|
||||
}
|
||||
|
||||
static void ST_drawTime(void)
|
||||
|
@ -620,8 +607,7 @@ static void ST_drawTime(void)
|
|||
INT32 seconds, minutes, tictrn, tics;
|
||||
|
||||
// TIME:
|
||||
V_DrawScaledPatch(SCX(hudinfo[(splitscreen) ? HUD_TIMESPLIT : HUD_TIME].x),
|
||||
SCY(hudinfo[(splitscreen) ? HUD_TIMESPLIT : HUD_TIME].y), V_NOSCALESTART|V_TRANSLUCENT, sbotime);
|
||||
ST_DrawPatchFromHudWS(HUD_TIME, sbotime);
|
||||
|
||||
if (objectplacing)
|
||||
{
|
||||
|
@ -633,61 +619,45 @@ static void ST_drawTime(void)
|
|||
else
|
||||
{
|
||||
tics = stplyr->realtime;
|
||||
seconds = tics/TICRATE % 60;
|
||||
minutes = tics/(60*TICRATE);
|
||||
seconds = G_TicsToSeconds(tics);
|
||||
minutes = G_TicsToMinutes(tics, true);
|
||||
tictrn = G_TicsToCentiseconds(tics);
|
||||
}
|
||||
|
||||
if (cv_timetic.value == 1) // Tics only -- how simple is this?
|
||||
ST_DrawOverlayNum(SCX(hudinfo[(splitscreen) ? HUD_SECONDSSPLIT : HUD_SECONDS].x),
|
||||
SCY(hudinfo[(splitscreen) ? HUD_SECONDSSPLIT : HUD_SECONDS].y), V_NOSCALESTART, tics);
|
||||
ST_DrawNumFromHudWS(HUD_SECONDS, tics);
|
||||
else
|
||||
{
|
||||
// Minutes
|
||||
ST_DrawOverlayNum(SCX(hudinfo[(splitscreen) ? HUD_MINUTESSPLIT : HUD_MINUTES].x),
|
||||
SCY(hudinfo[(splitscreen) ? HUD_MINUTESSPLIT : HUD_MINUTES].y), V_NOSCALESTART, minutes);
|
||||
// Colon
|
||||
V_DrawScaledPatch(SCX(hudinfo[(splitscreen) ? HUD_TIMECOLONSPLIT : HUD_TIMECOLON].x),
|
||||
SCY(hudinfo[(splitscreen) ? HUD_TIMECOLONSPLIT : HUD_TIMECOLON].y), V_NOSCALESTART|V_TRANSLUCENT, sbocolon);
|
||||
// Seconds
|
||||
ST_DrawPaddedOverlayNum(SCX(hudinfo[(splitscreen) ? HUD_SECONDSSPLIT : HUD_SECONDS].x),
|
||||
SCY(hudinfo[(splitscreen) ? HUD_SECONDSSPLIT : HUD_SECONDS].y), seconds, 2);
|
||||
ST_DrawNumFromHudWS(HUD_MINUTES, minutes); // Minutes
|
||||
ST_DrawPatchFromHudWS(HUD_TIMECOLON, sbocolon); // Colon
|
||||
ST_DrawPadNumFromHudWS(HUD_SECONDS, seconds, 2); // Seconds
|
||||
|
||||
if (!splitscreen && (cv_timetic.value == 2 || modeattacking)) // there's not enough room for tics in splitscreen, don't even bother trying!
|
||||
{
|
||||
// Colon
|
||||
V_DrawScaledPatch(SCX(hudinfo[HUD_TIMETICCOLON].x), SCY(hudinfo[HUD_TIMETICCOLON].y), V_NOSCALESTART|V_TRANSLUCENT, sbocolon);
|
||||
// Tics
|
||||
ST_DrawPaddedOverlayNum(SCX(hudinfo[HUD_TICS].x), SCY(hudinfo[HUD_TICS].y), tictrn, 2);
|
||||
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sbocolon); // Colon
|
||||
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static inline void ST_drawRings(void)
|
||||
{
|
||||
hudnum_t ringHUD = (splitscreen) ? HUD_RINGSSPLIT : HUD_RINGS;
|
||||
hudnum_t ringnumHUD = (splitscreen) ? HUD_RINGSNUMSPLIT : HUD_RINGSNUM;
|
||||
INT32 ringnum = max(stplyr->health-1, 0);
|
||||
|
||||
V_DrawScaledPatch(SCX(hudinfo[ringHUD].x), SCY(hudinfo[ringHUD].y), V_NOSCALESTART|V_TRANSLUCENT,
|
||||
(stplyr->health <= 1 && leveltime/5 & 1) ? rrings : sborings);
|
||||
ST_DrawPatchFromHudWS(HUD_RINGS, ((stplyr->health <= 1 && leveltime/5 & 1) ? rrings : sborings));
|
||||
|
||||
if (objectplacing)
|
||||
{
|
||||
ST_DrawOverlayNum(SCX(hudinfo[ringnumHUD].x), SCY(hudinfo[ringnumHUD].y), V_NOSCALESTART, op_currentdoomednum);
|
||||
}
|
||||
ringnum = op_currentdoomednum;
|
||||
else if (!useNightsSS && G_IsSpecialStage(gamemap))
|
||||
{
|
||||
INT32 ringscollected = 0; // Total # everyone has collected
|
||||
INT32 i;
|
||||
|
||||
ringnum = 0;
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
if (playeringame[i] && players[i].mo && players[i].mo->health > 1)
|
||||
ringscollected += players[i].mo->health - 1;
|
||||
|
||||
ST_DrawOverlayNum(SCX(hudinfo[ringnumHUD].x), SCY(hudinfo[ringnumHUD].y), V_NOSCALESTART, ringscollected);
|
||||
ringnum += players[i].mo->health - 1;
|
||||
}
|
||||
else
|
||||
ST_DrawOverlayNum(SCX(hudinfo[ringnumHUD].x), SCY(hudinfo[ringnumHUD].y), V_NOSCALESTART, stplyr->health > 0 ? stplyr->health-1 : 0);
|
||||
|
||||
ST_DrawNumFromHudWS(HUD_RINGSNUM, ringnum);
|
||||
}
|
||||
|
||||
static void ST_drawLives(void)
|
||||
|
@ -699,7 +669,7 @@ static void ST_drawLives(void)
|
|||
|
||||
// face background
|
||||
V_DrawSmallScaledPatch(hudinfo[HUD_LIVESPIC].x, hudinfo[HUD_LIVESPIC].y + (v_splitflag ? -12 : 0),
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT|v_splitflag, livesback);
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag, livesback);
|
||||
|
||||
// face
|
||||
if (stplyr->mo && stplyr->mo->color)
|
||||
|
@ -710,25 +680,29 @@ static void ST_drawLives(void)
|
|||
if (stplyr->powers[pw_super] || stplyr->pflags & PF_NIGHTSMODE)
|
||||
face = superprefix[stplyr->skin];
|
||||
V_DrawSmallMappedPatch(hudinfo[HUD_LIVESPIC].x, hudinfo[HUD_LIVESPIC].y + (v_splitflag ? -12 : 0),
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT|v_splitflag,face, colormap);
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag,face, colormap);
|
||||
}
|
||||
else if (stplyr->skincolor)
|
||||
{
|
||||
// skincolor face
|
||||
UINT8 *colormap = R_GetTranslationColormap(stplyr->skin, stplyr->skincolor, GTC_CACHE);
|
||||
V_DrawSmallMappedPatch(hudinfo[HUD_LIVESPIC].x, hudinfo[HUD_LIVESPIC].y + (v_splitflag ? -12 : 0),
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT|v_splitflag,faceprefix[stplyr->skin], colormap);
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag,faceprefix[stplyr->skin], colormap);
|
||||
}
|
||||
|
||||
// name
|
||||
if (strlen(skins[stplyr->skin].hudname) > 8)
|
||||
V_DrawThinString(hudinfo[HUD_LIVESNAME].x, hudinfo[HUD_LIVESNAME].y + (v_splitflag ? -12 : 0), V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_MONOSPACE|V_YELLOWMAP|v_splitflag, skins[stplyr->skin].hudname);
|
||||
V_DrawThinString(hudinfo[HUD_LIVESNAME].x, hudinfo[HUD_LIVESNAME].y + (v_splitflag ? -12 : 0),
|
||||
V_HUDTRANS|V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_MONOSPACE|V_YELLOWMAP|v_splitflag, skins[stplyr->skin].hudname);
|
||||
else
|
||||
V_DrawString(hudinfo[HUD_LIVESNAME].x, hudinfo[HUD_LIVESNAME].y + (v_splitflag ? -12 : 0), V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_MONOSPACE|V_YELLOWMAP|v_splitflag, skins[stplyr->skin].hudname);
|
||||
V_DrawString(hudinfo[HUD_LIVESNAME].x, hudinfo[HUD_LIVESNAME].y + (v_splitflag ? -12 : 0),
|
||||
V_HUDTRANS|V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_MONOSPACE|V_YELLOWMAP|v_splitflag, skins[stplyr->skin].hudname);
|
||||
// x
|
||||
V_DrawScaledPatch(hudinfo[HUD_LIVESX].x, hudinfo[HUD_LIVESX].y + (v_splitflag ? -4 : 0), V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT|v_splitflag, stlivex);
|
||||
V_DrawScaledPatch(hudinfo[HUD_LIVESX].x, hudinfo[HUD_LIVESX].y + (v_splitflag ? -4 : 0),
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag, stlivex);
|
||||
// lives
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVESNUM].x, hudinfo[HUD_LIVESNUM].y + (v_splitflag ? -4 : 0), V_SNAPTOLEFT|V_SNAPTOBOTTOM|v_splitflag, va("%d",stplyr->lives));
|
||||
V_DrawRightAlignedString(hudinfo[HUD_LIVESNUM].x, hudinfo[HUD_LIVESNUM].y + (v_splitflag ? -4 : 0),
|
||||
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag, va("%d",stplyr->lives));
|
||||
}
|
||||
|
||||
static void ST_drawLevelTitle(void)
|
||||
|
@ -820,9 +794,9 @@ static void ST_drawFirstPersonHUD(void)
|
|||
if (p)
|
||||
{
|
||||
if (splitscreen)
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24), V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, p);
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24), V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
||||
else
|
||||
V_DrawScaledPatch(304, 24, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, p);
|
||||
V_DrawScaledPatch(304, 24, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
||||
}
|
||||
|
||||
// pw_flashing just sets the icon to flash no matter what.
|
||||
|
@ -830,17 +804,17 @@ static void ST_drawFirstPersonHUD(void)
|
|||
if (invulntime > 3*TICRATE || (invulntime && leveltime & 1))
|
||||
{
|
||||
if (splitscreen)
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 14, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, invincibility);
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 14, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, invincibility);
|
||||
else
|
||||
V_DrawScaledPatch(304, 24 + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, invincibility);
|
||||
V_DrawScaledPatch(304, 24 + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, invincibility);
|
||||
}
|
||||
|
||||
if (player->powers[pw_sneakers] > 3*TICRATE || (player->powers[pw_sneakers] && leveltime & 1))
|
||||
{
|
||||
if (splitscreen)
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, sneakers);
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 28, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, sneakers);
|
||||
else
|
||||
V_DrawScaledPatch(304, 24 + 56, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, sneakers);
|
||||
V_DrawScaledPatch(304, 24 + 56, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, sneakers);
|
||||
}
|
||||
|
||||
p = NULL;
|
||||
|
@ -890,8 +864,8 @@ static void ST_drawFirstPersonHUD(void)
|
|||
}
|
||||
|
||||
if (p)
|
||||
V_DrawTranslucentPatch(SCX((BASEVIDWIDTH/2) - (SHORT(p->width)/2) + SHORT(p->leftoffset)), SCY(60 - SHORT(p->topoffset)),
|
||||
V_NOSCALESTART|V_OFFSET, p);
|
||||
V_DrawScaledPatch(SCX((BASEVIDWIDTH/2) - (SHORT(p->width)/2) + SHORT(p->leftoffset)), SCY(60 - SHORT(p->topoffset)),
|
||||
V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, p);
|
||||
}
|
||||
|
||||
// [21:42] <+Rob> Beige - Lavender - Steel Blue - Peach - Orange - Purple - Silver - Yellow - Pink - Red - Blue - Green - Cyan - Gold
|
||||
|
@ -946,11 +920,7 @@ static void ST_drawNightsRecords(void)
|
|||
V_DrawString(BASEVIDWIDTH/2 - 48, STRINGY(148), aflag, "BONUS:");
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(140), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings));
|
||||
V_DrawRightAlignedString(BASEVIDWIDTH/2 + 48, STRINGY(148), V_ORANGEMAP|aflag, va("%d", stplyr->finishedrings * 50));
|
||||
|
||||
if (aflag)
|
||||
ST_DrawTranslucentNightsOverlayNum(SCX(BASEVIDWIDTH/2 + 48), SCY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE);
|
||||
else
|
||||
ST_DrawNightsOverlayNum(SCX(BASEVIDWIDTH/2 + 48), SCY(160), stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE);
|
||||
ST_DrawNightsOverlayNum(SCX(BASEVIDWIDTH/2 + 48), SCY(160), aflag, stplyr->lastmarescore, nightsnum, SKINCOLOR_STEELBLUE);
|
||||
|
||||
// If new record, say so!
|
||||
if (!(netgame || multiplayer) && G_GetBestNightsScore(gamemap, stplyr->lastmare + 1) <= stplyr->lastmarescore)
|
||||
|
@ -1012,15 +982,13 @@ static void ST_drawNiGHTSHUD(void)
|
|||
|
||||
if (splitscreen)
|
||||
{
|
||||
ST_DrawTranslucentNightsOverlayNum(SCX(256), SCY(160), linktrans, (stplyr->linkcount-1),
|
||||
nightsnum, colornum);
|
||||
ST_DrawNightsOverlayNum(SCX(256), SCY(160), linktrans, (stplyr->linkcount-1), nightsnum, colornum);
|
||||
V_DrawTranslucentMappedPatch(SCX(264), SCY(160), V_NOSCALESTART|linktrans, nightslink,
|
||||
colornum == 0 ? colormaps : R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
ST_DrawTranslucentNightsOverlayNum(SCX(160), SCY(160), linktrans, (stplyr->linkcount-1),
|
||||
nightsnum, colornum);
|
||||
ST_DrawNightsOverlayNum(SCX(160), SCY(160), linktrans, (stplyr->linkcount-1), nightsnum, colornum);
|
||||
V_DrawTranslucentMappedPatch(SCX(168), SCY(160), V_NOSCALESTART|linktrans, nightslink,
|
||||
colornum == 0 ? colormaps : R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE));
|
||||
}
|
||||
|
@ -1032,20 +1000,20 @@ static void ST_drawNiGHTSHUD(void)
|
|||
{
|
||||
INT32 offs = 10 - (stplyr->linktimer - (2*TICRATE - 9));
|
||||
INT32 ghosttrans = offs << V_ALPHASHIFT;
|
||||
ST_DrawTranslucentNightsOverlayNum(SCX(160), SCY(160)+(offs*2), ghosttrans, (stplyr->linkcount-2),
|
||||
ST_DrawNightsOverlayNum(SCX(160), SCY(160)+(offs*2), ghosttrans, (stplyr->linkcount-2),
|
||||
nightsnum, colornum);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (splitscreen)
|
||||
{
|
||||
ST_DrawNightsOverlayNum(SCX(256), SCY(160), (stplyr->linkcount-1), nightsnum, colornum);
|
||||
ST_DrawNightsOverlayNum(SCX(256), SCY(160), 0, (stplyr->linkcount-1), nightsnum, colornum);
|
||||
V_DrawMappedPatch(SCX(264), SCY(160), V_NOSCALESTART, nightslink,
|
||||
colornum == 0 ? colormaps : R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE));
|
||||
}
|
||||
else
|
||||
{
|
||||
ST_DrawNightsOverlayNum(SCX(160), SCY(160), (stplyr->linkcount-1), nightsnum, colornum);
|
||||
ST_DrawNightsOverlayNum(SCX(160), SCY(160), 0, (stplyr->linkcount-1), nightsnum, colornum);
|
||||
V_DrawMappedPatch(SCX(168), SCY(160), V_NOSCALESTART, nightslink,
|
||||
colornum == 0 ? colormaps : R_GetTranslationColormap(TC_DEFAULT, colornum, GTC_CACHE));
|
||||
}
|
||||
|
@ -1086,32 +1054,32 @@ static void ST_drawNiGHTSHUD(void)
|
|||
|
||||
if (splitscreen)
|
||||
{ // Dirty hack because V_SNAPTOBOTTOM doesn't have a way to account for splitscreen, but better than overlapping bars.
|
||||
V_DrawScaledPatch(SCX(locx), SCY(locy), V_NOSCALESTART|V_TRANSLUCENT, drillbar);
|
||||
V_DrawScaledPatch(SCX(locx), SCY(locy), V_NOSCALESTART|V_HUDTRANS, drillbar);
|
||||
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
||||
V_DrawScaledPatch(SCX(locx + 2 + dfill), SCY(locy + 3), V_NOSCALESTART|V_TRANSLUCENT, drillfill[fillpatch]);
|
||||
V_DrawScaledPatch(SCX(locx + 2 + dfill), SCY(locy + 3), V_NOSCALESTART|V_HUDTRANS, drillfill[fillpatch]);
|
||||
}
|
||||
else if (nosshack)
|
||||
{ // Even dirtier hack-of-a-hack to draw seperate drill meters in splitscreen special stages but nothing else.
|
||||
splitscreen = true;
|
||||
V_DrawScaledPatch(SCX(locx), SCY(locy), V_NOSCALESTART|V_TRANSLUCENT, drillbar);
|
||||
V_DrawScaledPatch(SCX(locx), SCY(locy), V_NOSCALESTART|V_HUDTRANS, drillbar);
|
||||
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
||||
V_DrawScaledPatch(SCX(locx + 2 + dfill), SCY(locy + 3), V_NOSCALESTART|V_TRANSLUCENT, drillfill[fillpatch]);
|
||||
V_DrawScaledPatch(SCX(locx + 2 + dfill), SCY(locy + 3), V_NOSCALESTART|V_HUDTRANS, drillfill[fillpatch]);
|
||||
stplyr = &players[secondarydisplayplayer];
|
||||
if (stplyr->pflags & PF_DRILLING)
|
||||
fillpatch = (stplyr->drillmeter & 1) + 1;
|
||||
else
|
||||
fillpatch = 0;
|
||||
V_DrawScaledPatch(locx, locy, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT, drillbar);
|
||||
V_DrawScaledPatch(locx, locy, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS, drillbar);
|
||||
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
||||
V_DrawScaledPatch(locx + 2 + dfill, locy + 3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT, drillfill[fillpatch]);
|
||||
V_DrawScaledPatch(locx + 2 + dfill, locy + 3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS, drillfill[fillpatch]);
|
||||
stplyr = &players[displayplayer];
|
||||
splitscreen = false;
|
||||
}
|
||||
else
|
||||
{ // Draw normally. <:3
|
||||
V_DrawScaledPatch(locx, locy, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT, drillbar);
|
||||
V_DrawScaledPatch(locx, locy, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS, drillbar);
|
||||
for (dfill = 0; dfill < stplyr->drillmeter/20 && dfill < 96; ++dfill)
|
||||
V_DrawScaledPatch(locx + 2 + dfill, locy + 3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_TRANSLUCENT, drillfill[fillpatch]);
|
||||
V_DrawScaledPatch(locx + 2 + dfill, locy + 3, V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS, drillfill[fillpatch]);
|
||||
}
|
||||
|
||||
// Display actual drill amount and bumper time
|
||||
|
@ -1136,11 +1104,11 @@ static void ST_drawNiGHTSHUD(void)
|
|||
if (LUA_HudEnabled(hud_nightsrings))
|
||||
{
|
||||
#endif
|
||||
V_DrawScaledPatch(SCX(16), SCY(8), V_NOSCALESTART|V_TRANSLUCENT, nbracket);
|
||||
ST_DrawOverlayPatch(SCX(16), SCY(8), nbracket);
|
||||
if (G_IsSpecialStage(gamemap))
|
||||
V_DrawScaledPatch(SCX(24), SCY(8) + SCZ(8), V_NOSCALESTART|V_TRANSLUCENT, nsshud);
|
||||
ST_DrawOverlayPatch(SCX(24), SCY(8) + SCZ(8), nsshud);
|
||||
else
|
||||
V_DrawScaledPatch(SCX(24), SCY(8) + SCZ(8), V_NOSCALESTART|V_TRANSLUCENT, nhud[(leveltime/2)%12]);
|
||||
ST_DrawOverlayPatch(SCX(24), SCY(8) + SCZ(8), nhud[(leveltime/2)%12]);
|
||||
|
||||
if (G_IsSpecialStage(gamemap))
|
||||
{
|
||||
|
@ -1161,8 +1129,8 @@ static void ST_drawNiGHTSHUD(void)
|
|||
origamount = stplyr->capsule->spawnpoint->angle;
|
||||
I_Assert(origamount > 0); // should not happen now
|
||||
|
||||
V_DrawScaledPatch(SCX(72), SCY(8), V_NOSCALESTART|V_TRANSLUCENT, nbracket);
|
||||
V_DrawScaledPatch(SCX(74), SCY(8) + SCZ(4), V_NOSCALESTART|V_TRANSLUCENT, minicaps);
|
||||
ST_DrawOverlayPatch(SCX(72), SCY(8), nbracket);
|
||||
ST_DrawOverlayPatch(SCX(74), SCY(8) + SCZ(4), minicaps);
|
||||
|
||||
if (stplyr->capsule->reactiontime != 0)
|
||||
{
|
||||
|
@ -1171,10 +1139,10 @@ static void ST_drawNiGHTSHUD(void)
|
|||
|
||||
for (r = 0; r < 5; r++)
|
||||
{
|
||||
V_DrawScaledPatch(SCX(230 - (7*r)), SCY(144), V_NOSCALESTART|V_TRANSLUCENT, redstat);
|
||||
V_DrawScaledPatch(SCX(188 - (7*r)), SCY(144), V_NOSCALESTART|V_TRANSLUCENT, orngstat);
|
||||
V_DrawScaledPatch(SCX(146 - (7*r)), SCY(144), V_NOSCALESTART|V_TRANSLUCENT, yelstat);
|
||||
V_DrawScaledPatch(SCX(104 - (7*r)), SCY(144), V_NOSCALESTART|V_TRANSLUCENT, byelstat);
|
||||
ST_DrawOverlayPatch(SCX(230 - (7*r)), SCY(144), redstat);
|
||||
ST_DrawOverlayPatch(SCX(188 - (7*r)), SCY(144), orngstat);
|
||||
ST_DrawOverlayPatch(SCX(146 - (7*r)), SCY(144), yelstat);
|
||||
ST_DrawOverlayPatch(SCX(104 - (7*r)), SCY(144), byelstat);
|
||||
}
|
||||
|
||||
amount = (origamount - stplyr->capsule->health);
|
||||
|
@ -1193,7 +1161,7 @@ static void ST_drawNiGHTSHUD(void)
|
|||
if (r > 10) ++t;
|
||||
if (r > 5) ++t;
|
||||
|
||||
V_DrawScaledPatch(SCX(69 + (7*t)), SCY(144), V_NOSCALESTART|V_TRANSLUCENT, bluestat);
|
||||
ST_DrawOverlayPatch(SCX(69 + (7*t)), SCY(144), bluestat);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1202,27 +1170,27 @@ static void ST_drawNiGHTSHUD(void)
|
|||
INT32 cfill;
|
||||
|
||||
// Lil' white box!
|
||||
V_DrawScaledPatch(15, STRINGY(8) + 34, V_SNAPTOLEFT|V_SNAPTOTOP|V_TRANSLUCENT, capsulebar);
|
||||
V_DrawScaledPatch(15, STRINGY(8) + 34, V_SNAPTOLEFT|V_SNAPTOTOP|V_HUDTRANS, capsulebar);
|
||||
|
||||
amount = (origamount - stplyr->capsule->health);
|
||||
amount = (amount * length)/origamount;
|
||||
|
||||
for (cfill = 0; cfill < amount && cfill < 88; ++cfill)
|
||||
V_DrawScaledPatch(15 + cfill + 1, STRINGY(8) + 35, V_SNAPTOLEFT|V_SNAPTOTOP|V_TRANSLUCENT, capsulefill);
|
||||
V_DrawScaledPatch(15 + cfill + 1, STRINGY(8) + 35, V_SNAPTOLEFT|V_SNAPTOTOP|V_HUDTRANS, capsulefill);
|
||||
}
|
||||
|
||||
if (total_ringcount >= stplyr->capsule->health)
|
||||
V_DrawScaledPatch(SCX(40), SCY(8) + SCZ(5), V_NOSCALESTART|V_TRANSLUCENT, nredar[leveltime%8]);
|
||||
ST_DrawOverlayPatch(SCX(40), SCY(8) + SCZ(5), nredar[leveltime%8]);
|
||||
else
|
||||
V_DrawScaledPatch(SCX(40), SCY(8) + SCZ(5), V_NOSCALESTART|V_TRANSLUCENT, narrow[(leveltime/2)%8]);
|
||||
ST_DrawOverlayPatch(SCX(40), SCY(8) + SCZ(5), narrow[(leveltime/2)%8]);
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(SCX(40), SCY(8) + SCZ(5), V_NOSCALESTART|V_TRANSLUCENT, narrow[8]);
|
||||
ST_DrawOverlayPatch(SCX(40), SCY(8) + SCZ(5), narrow[8]);
|
||||
|
||||
if (total_ringcount >= 100)
|
||||
ST_DrawOverlayNum((total_ringcount >= 1000) ? SCX(76) : SCX(72), SCY(8) + SCZ(11), V_NOSCALESTART, total_ringcount);
|
||||
ST_DrawOverlayNum((total_ringcount >= 1000) ? SCX(76) : SCX(72), SCY(8) + SCZ(11), total_ringcount);
|
||||
else
|
||||
ST_DrawOverlayNum(SCX(68), SCY(8) + SCZ(11), V_NOSCALESTART, total_ringcount);
|
||||
ST_DrawOverlayNum(SCX(68), SCY(8) + SCZ(11), total_ringcount);
|
||||
#ifdef HAVE_BLUA
|
||||
}
|
||||
#endif
|
||||
|
@ -1233,7 +1201,7 @@ static void ST_drawNiGHTSHUD(void)
|
|||
&& LUA_HudEnabled(hud_nightsscore)
|
||||
#endif
|
||||
)
|
||||
ST_DrawNightsOverlayNum(SCX(304), SCY(16), stplyr->marescore, nightsnum, SKINCOLOR_STEELBLUE);
|
||||
ST_DrawNightsOverlayNum(SCX(304), SCY(16), 0, stplyr->marescore, nightsnum, SKINCOLOR_STEELBLUE);
|
||||
|
||||
// Ideya time remaining
|
||||
if (!stplyr->exiting && stplyr->nightstime > 0
|
||||
|
@ -1275,10 +1243,10 @@ static void ST_drawNiGHTSHUD(void)
|
|||
numbersize = SCX(48)/2;
|
||||
|
||||
if (realnightstime < 10)
|
||||
ST_DrawNightsOverlayNum(SCX(160) + numbersize, SCY(12), realnightstime,
|
||||
ST_DrawNightsOverlayNum(SCX(160) + numbersize, SCY(12), 0, realnightstime,
|
||||
nightsnum, SKINCOLOR_RED);
|
||||
else
|
||||
ST_DrawNightsOverlayNum(SCX(160) + numbersize, SCY(12), realnightstime,
|
||||
ST_DrawNightsOverlayNum(SCX(160) + numbersize, SCY(12), 0, realnightstime,
|
||||
nightsnum, SKINCOLOR_SUPER4);
|
||||
|
||||
// Show exact time in debug
|
||||
|
@ -1325,31 +1293,34 @@ static void ST_drawNiGHTSHUD(void)
|
|||
|
||||
static void ST_drawWeaponRing(powertype_t weapon, INT32 rwflag, INT32 wepflag, INT32 xoffs, patch_t *pat)
|
||||
{
|
||||
INT32 yelflag = 0;
|
||||
INT32 txtflags = 0, patflags = 0;
|
||||
|
||||
if (stplyr->powers[weapon])
|
||||
{
|
||||
if (stplyr->powers[weapon] >= rw_maximums[wepflag])
|
||||
yelflag = V_YELLOWMAP;
|
||||
txtflags |= V_YELLOWMAP;
|
||||
|
||||
if (weapon == pw_infinityring
|
||||
|| (stplyr->ringweapons & rwflag && stplyr->health > 1))
|
||||
V_DrawScaledPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT, pat);
|
||||
txtflags |= V_20TRANS;
|
||||
else
|
||||
V_DrawTranslucentPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT|V_80TRANS, pat);
|
||||
{
|
||||
txtflags |= V_TRANSLUCENT;
|
||||
patflags = V_80TRANS;
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT|patflags, pat);
|
||||
|
||||
if (stplyr->powers[weapon] > 99)
|
||||
V_DrawThinString(8 + xoffs + 1, STRINGY(162), V_TRANSLUCENT | V_SNAPTOLEFT | yelflag,
|
||||
va("%d", stplyr->powers[weapon]));
|
||||
V_DrawThinString(8 + xoffs + 1, STRINGY(162), V_SNAPTOLEFT|txtflags, va("%d", stplyr->powers[weapon]));
|
||||
else
|
||||
V_DrawString(8 + xoffs, STRINGY(162), V_TRANSLUCENT | V_SNAPTOLEFT | yelflag,
|
||||
va("%d", stplyr->powers[weapon]));
|
||||
V_DrawString(8 + xoffs, STRINGY(162), V_SNAPTOLEFT|txtflags, va("%d", stplyr->powers[weapon]));
|
||||
|
||||
if (stplyr->currentweapon == wepflag)
|
||||
V_DrawScaledPatch(6 + xoffs, STRINGY(162 - (splitscreen ? 4 : 2)), V_SNAPTOLEFT, curweapon);
|
||||
}
|
||||
else if (stplyr->ringweapons & rwflag)
|
||||
V_DrawTranslucentPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT, pat);
|
||||
V_DrawScaledPatch(8 + xoffs, STRINGY(162), V_SNAPTOLEFT|V_TRANSLUCENT, pat);
|
||||
}
|
||||
|
||||
static void ST_drawMatchHUD(void)
|
||||
|
@ -1503,15 +1474,15 @@ static void ST_drawCTFHUD(void)
|
|||
UINT16 whichflag = 0;
|
||||
|
||||
// Draw the flags
|
||||
V_DrawSmallScaledPatch(256, (splitscreen) ? STRINGY(160) : STRINGY(176), 0, rflagico);
|
||||
V_DrawSmallScaledPatch(288, (splitscreen) ? STRINGY(160) : STRINGY(176), 0, bflagico);
|
||||
V_DrawSmallScaledPatch(256, (splitscreen) ? STRINGY(160) : STRINGY(176), V_HUDTRANS, rflagico);
|
||||
V_DrawSmallScaledPatch(288, (splitscreen) ? STRINGY(160) : STRINGY(176), V_HUDTRANS, bflagico);
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (players[i].gotflag & GF_REDFLAG) // Red flag isn't at base
|
||||
V_DrawScaledPatch(256, (splitscreen) ? STRINGY(156) : STRINGY(174), 0, nonicon);
|
||||
V_DrawScaledPatch(256, (splitscreen) ? STRINGY(156) : STRINGY(174), V_HUDTRANS, nonicon);
|
||||
else if (players[i].gotflag & GF_BLUEFLAG) // Blue flag isn't at base
|
||||
V_DrawScaledPatch(288, (splitscreen) ? STRINGY(156) : STRINGY(174), 0, nonicon);
|
||||
V_DrawScaledPatch(288, (splitscreen) ? STRINGY(156) : STRINGY(174), V_HUDTRANS, nonicon);
|
||||
|
||||
whichflag |= players[i].gotflag;
|
||||
if ((whichflag & (GF_REDFLAG|GF_BLUEFLAG)) == (GF_REDFLAG|GF_BLUEFLAG))
|
||||
|
@ -1524,9 +1495,9 @@ static void ST_drawCTFHUD(void)
|
|||
patch_t *p = (stplyr->gotflag & GF_REDFLAG) ? gotrflag : gotbflag;
|
||||
|
||||
if (splitscreen)
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 42, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, p);
|
||||
V_DrawSmallScaledPatch(312, STRINGY(24) + 42, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
||||
else
|
||||
V_DrawScaledPatch(304, 24 + 84, V_SNAPTORIGHT|V_SNAPTOTOP|V_TRANSLUCENT, p);
|
||||
V_DrawScaledPatch(304, 24 + 84, V_SNAPTORIGHT|V_SNAPTOTOP|V_HUDTRANS, p);
|
||||
}
|
||||
|
||||
// Display a countdown timer showing how much time left until the flag your team dropped returns to base.
|
||||
|
@ -1535,13 +1506,13 @@ static void ST_drawCTFHUD(void)
|
|||
if (redflag && redflag->fuse > 1)
|
||||
{
|
||||
sprintf(timeleft, "%u", (redflag->fuse / TICRATE));
|
||||
V_DrawCenteredString(268, STRINGY(184), V_YELLOWMAP, timeleft);
|
||||
V_DrawCenteredString(268, STRINGY(184), V_YELLOWMAP|V_HUDTRANS, timeleft);
|
||||
}
|
||||
|
||||
if (blueflag && blueflag->fuse > 1)
|
||||
{
|
||||
sprintf(timeleft, "%u", (blueflag->fuse / TICRATE));
|
||||
V_DrawCenteredString(300, STRINGY(184), V_YELLOWMAP, timeleft);
|
||||
V_DrawCenteredString(300, STRINGY(184), V_YELLOWMAP|V_HUDTRANS, timeleft);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1550,11 +1521,11 @@ static void ST_drawCTFHUD(void)
|
|||
static inline void ST_drawTeamName(void)
|
||||
{
|
||||
if (stplyr->ctfteam == 1)
|
||||
V_DrawString(256, (splitscreen) ? STRINGY(184) : STRINGY(192), V_TRANSLUCENT, "RED TEAM");
|
||||
V_DrawString(256, (splitscreen) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "RED TEAM");
|
||||
else if (stplyr->ctfteam == 2)
|
||||
V_DrawString(248, (splitscreen) ? STRINGY(184) : STRINGY(192), V_TRANSLUCENT, "BLUE TEAM");
|
||||
V_DrawString(248, (splitscreen) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "BLUE TEAM");
|
||||
else
|
||||
V_DrawString(244, (splitscreen) ? STRINGY(184) : STRINGY(192), V_TRANSLUCENT, "SPECTATOR");
|
||||
V_DrawString(244, (splitscreen) ? STRINGY(184) : STRINGY(192), V_HUDTRANSHALF, "SPECTATOR");
|
||||
}
|
||||
|
||||
#ifdef CHAOSISNOTDEADYET
|
||||
|
@ -1562,33 +1533,28 @@ static inline void ST_drawChaosHUD(void)
|
|||
{
|
||||
char chains[33];
|
||||
sprintf(chains, "CHAINS: %u", stplyr->scoreadd);
|
||||
V_DrawString(8, STRINGY(184), V_TRANSLUCENT, chains);
|
||||
V_DrawString(8, STRINGY(184), V_HUDTRANSHALF, chains);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void ST_drawSpecialStageHUD(void)
|
||||
{
|
||||
if (totalrings > 0)
|
||||
{
|
||||
if (splitscreen)
|
||||
ST_DrawOverlayNum(hudinfo[HUD_SS_TOTALRINGS_SPLIT].x, hudinfo[HUD_SS_TOTALRINGS_SPLIT].y, V_SNAPTOTOP, totalrings);
|
||||
else
|
||||
ST_DrawOverlayNum(hudinfo[HUD_SS_TOTALRINGS].x, hudinfo[HUD_SS_TOTALRINGS].y, V_SNAPTOTOP, totalrings);
|
||||
}
|
||||
ST_DrawNumFromHudWS(HUD_SS_TOTALRINGS, totalrings);
|
||||
|
||||
if (leveltime < 5*TICRATE && totalrings > 0)
|
||||
{
|
||||
V_DrawScaledPatch(hudinfo[HUD_GETRINGS].x, SCR(hudinfo[HUD_GETRINGS].y), V_TRANSLUCENT, getall);
|
||||
ST_DrawOverlayNum(hudinfo[HUD_GETRINGSNUM].x, SCR(hudinfo[HUD_GETRINGSNUM].y), 0, totalrings);
|
||||
ST_DrawPatchFromHud(HUD_GETRINGS, getall);
|
||||
ST_DrawNumFromHud(HUD_GETRINGSNUM, totalrings);
|
||||
}
|
||||
|
||||
if (sstimer)
|
||||
{
|
||||
V_DrawString(hudinfo[HUD_TIMELEFT].x, STRINGY(hudinfo[HUD_TIMELEFT].y), 0, M_GetText("TIME LEFT"));
|
||||
ST_DrawNightsOverlayNum(SCX(hudinfo[HUD_TIMELEFTNUM].x), SCY(hudinfo[HUD_TIMELEFTNUM].y), sstimer/TICRATE, tallnum, SKINCOLOR_WHITE);
|
||||
V_DrawString(hudinfo[HUD_TIMELEFT].x, STRINGY(hudinfo[HUD_TIMELEFT].y), V_HUDTRANS, M_GetText("TIME LEFT"));
|
||||
ST_DrawNightsOverlayNum(SCX(hudinfo[HUD_TIMELEFTNUM].x), SCY(hudinfo[HUD_TIMELEFTNUM].y), V_HUDTRANS, sstimer/TICRATE, tallnum, SKINCOLOR_WHITE);
|
||||
}
|
||||
else
|
||||
V_DrawScaledPatch(hudinfo[HUD_TIMEUP].x, hudinfo[HUD_TIMEUP].y, V_TRANSLUCENT, timeup);
|
||||
ST_DrawPatchFromHud(HUD_TIMEUP, timeup);
|
||||
}
|
||||
|
||||
static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offset)
|
||||
|
@ -1627,7 +1593,7 @@ static INT32 ST_drawEmeraldHuntIcon(mobj_t *hunt, patch_t **patches, INT32 offse
|
|||
interval = 0;
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(hudinfo[HUD_HUNTPICS].x+offset, STRINGY(hudinfo[HUD_HUNTPICS].y), V_TRANSLUCENT, patches[i]);
|
||||
V_DrawScaledPatch(hudinfo[HUD_HUNTPICS].x+offset, STRINGY(hudinfo[HUD_HUNTPICS].y), V_HUDTRANS, patches[i]);
|
||||
return interval;
|
||||
}
|
||||
|
||||
|
@ -1895,9 +1861,9 @@ static void ST_overlayDrawer(void)
|
|||
{
|
||||
INT32 respawntime = cv_respawntime.value - stplyr->deadtimer/TICRATE;
|
||||
if (respawntime > 0 && !stplyr->spectator)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_TRANSLUCENT, va(M_GetText("Respawn in: %d second%s."), respawntime, respawntime == 1 ? "" : "s"));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, va(M_GetText("Respawn in: %d second%s."), respawntime, respawntime == 1 ? "" : "s"));
|
||||
else
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_TRANSLUCENT, M_GetText("Press Jump to respawn."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Jump to respawn."));
|
||||
}
|
||||
else if (stplyr->spectator
|
||||
#ifdef HAVE_BLUA
|
||||
|
@ -1905,13 +1871,13 @@ static void ST_overlayDrawer(void)
|
|||
#endif
|
||||
)
|
||||
{
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(60), V_TRANSLUCENT, M_GetText("You are a spectator."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(60), V_HUDTRANSHALF, M_GetText("You are a spectator."));
|
||||
if (G_GametypeHasTeams())
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_TRANSLUCENT, M_GetText("Press Fire to be assigned to a team."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Fire to be assigned to a team."));
|
||||
else
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_TRANSLUCENT, M_GetText("Press Fire to enter the game."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(148), V_TRANSLUCENT, M_GetText("Press F12 to watch another player."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(164), V_TRANSLUCENT, M_GetText("Press Jump to float and Spin to sink."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(132), V_HUDTRANSHALF, M_GetText("Press Fire to enter the game."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(148), V_HUDTRANSHALF, M_GetText("Press F12 to watch another player."));
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, STRINGY(164), V_HUDTRANSHALF, M_GetText("Press Jump to float and Spin to sink."));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1924,12 +1890,12 @@ void ST_Drawer(boolean refresh)
|
|||
if (cv_seenames.value && cv_allowseenames.value && displayplayer == consoleplayer && seenplayer && seenplayer->mo)
|
||||
{
|
||||
if (cv_seenames.value == 1)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_TRANSLUCENT, player_names[seenplayer-players]);
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF, player_names[seenplayer-players]);
|
||||
else if (cv_seenames.value == 2)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_TRANSLUCENT,
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF,
|
||||
va("%s%s", G_GametypeHasTeams() ? ((seenplayer->ctfteam == 1) ? "\x85" : "\x84") : "", player_names[seenplayer-players]));
|
||||
else //if (cv_seenames.value == 3)
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_TRANSLUCENT,
|
||||
V_DrawCenteredString(BASEVIDWIDTH/2, BASEVIDHEIGHT/2 + 15, V_HUDTRANSHALF,
|
||||
va("%s%s", !G_RingSlingerGametype() || (G_GametypeHasTeams() && players[consoleplayer].ctfteam == seenplayer->ctfteam)
|
||||
? "\x83" : "\x85", player_names[seenplayer-players]));
|
||||
}
|
||||
|
|
|
@ -83,24 +83,29 @@ typedef enum
|
|||
HUD_LIVESPIC,
|
||||
HUD_LIVESNUM,
|
||||
HUD_LIVESX,
|
||||
HUD_RINGSSPLIT,
|
||||
HUD_RINGSNUMSPLIT,
|
||||
|
||||
HUD_RINGS,
|
||||
HUD_RINGSSPLIT,
|
||||
HUD_RINGSNUM,
|
||||
HUD_RINGSNUMSPLIT,
|
||||
|
||||
HUD_SCORE,
|
||||
HUD_SCORENUM,
|
||||
HUD_TIMESPLIT,
|
||||
HUD_SECONDSSPLIT,
|
||||
HUD_MINUTESSPLIT,
|
||||
HUD_TIMECOLONSPLIT,
|
||||
|
||||
HUD_TIME,
|
||||
HUD_TICS,
|
||||
HUD_SECONDS,
|
||||
HUD_TIMESPLIT,
|
||||
HUD_MINUTES,
|
||||
HUD_MINUTESSPLIT,
|
||||
HUD_TIMECOLON,
|
||||
HUD_TIMECOLONSPLIT,
|
||||
HUD_SECONDS,
|
||||
HUD_SECONDSSPLIT,
|
||||
HUD_TIMETICCOLON,
|
||||
HUD_SS_TOTALRINGS_SPLIT,
|
||||
HUD_TICS,
|
||||
|
||||
HUD_SS_TOTALRINGS,
|
||||
HUD_SS_TOTALRINGS_SPLIT,
|
||||
|
||||
HUD_GETRINGS,
|
||||
HUD_GETRINGSNUM,
|
||||
HUD_TIMELEFT,
|
||||
|
|
1684
src/v_video.c
1684
src/v_video.c
File diff suppressed because it is too large
Load diff
|
@ -51,6 +51,7 @@ extern RGBA_t *pLocalPalette;
|
|||
|
||||
// flags hacked in scrn (not supported by all functions (see src))
|
||||
// patch scaling uses bits 9 and 10
|
||||
#define V_SCALEPATCHSHIFT 8
|
||||
#define V_SCALEPATCHMASK 0x00000300
|
||||
#define V_NOSCALEPATCH 0x00000100
|
||||
#define V_SMALLSCALEPATCH 0x00000200
|
||||
|
@ -84,11 +85,14 @@ extern RGBA_t *pLocalPalette;
|
|||
#define V_20TRANS 0x00020000
|
||||
#define V_30TRANS 0x00030000
|
||||
#define V_40TRANS 0x00040000
|
||||
#define V_TRANSLUCENT 0x00050000 // TRANS50
|
||||
#define V_TRANSLUCENT 0x00050000 // TRANS50
|
||||
#define V_60TRANS 0x00060000
|
||||
#define V_70TRANS 0x00070000
|
||||
#define V_80TRANS 0x00080000 // used to be V_8020TRANS
|
||||
#define V_80TRANS 0x00080000 // used to be V_8020TRANS
|
||||
#define V_90TRANS 0x00090000
|
||||
#define V_HUDTRANSHALF 0x000D0000
|
||||
#define V_HUDTRANS 0x000E0000 // draw the hud translucent
|
||||
#define V_HUDTRANSDOUBLE 0x000F0000
|
||||
|
||||
#define V_AUTOFADEOUT 0x00100000 // used by CECHOs, automatic fade out when almost over
|
||||
#define V_RETURN8 0x00200000 // 8 pixel return instead of 12
|
||||
|
@ -107,24 +111,23 @@ extern RGBA_t *pLocalPalette;
|
|||
#define V_NOSCALESTART 0x40000000 // don't scale x, y, start coords
|
||||
#define V_SPLITSCREEN 0x80000000
|
||||
|
||||
// default params: scale patch and scale start
|
||||
void V_DrawScaledPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch);
|
||||
void V_DrawMappedPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
void V_DrawTranslucentMappedPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
void V_DrawTranslucentPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch);
|
||||
void V_DrawSciencePatch(fixed_t x, fixed_t y, INT32 scrn, patch_t *patch, fixed_t science); // FOR SCIENCE!!
|
||||
void V_DrawCroppedPatch(fixed_t x, fixed_t y, INT32 scrn, patch_t *patch, fixed_t science, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
|
||||
// default params: scale patch and scale start
|
||||
void V_DrawSmallScaledPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch);
|
||||
void V_DrawSmallMappedPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
void V_DrawSmallTranslucentMappedPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
void V_DrawSmallTranslucentPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch);
|
||||
|
||||
void V_DrawTinyScaledPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch);
|
||||
void V_DrawTinyMappedPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
|
||||
void V_DrawPatch(INT32 x, INT32 y, INT32 scrn, patch_t *patch);
|
||||
// defines for old functions
|
||||
#define V_DrawPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s|V_NOSCALESTART|V_NOSCALEPATCH, p, NULL)
|
||||
#define V_DrawTranslucentMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, c)
|
||||
#define V_DrawSmallTranslucentMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, c)
|
||||
#define V_DrawTinyTranslucentMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, c)
|
||||
#define V_DrawMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, c)
|
||||
#define V_DrawSmallMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, c)
|
||||
#define V_DrawTinyMappedPatch(x,y,s,p,c) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, c)
|
||||
#define V_DrawScaledPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, NULL)
|
||||
#define V_DrawSmallScaledPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, NULL)
|
||||
#define V_DrawTinyScaledPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, NULL)
|
||||
#define V_DrawTranslucentPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s, p, NULL)
|
||||
#define V_DrawSmallTranslucentPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/2, s, p, NULL)
|
||||
#define V_DrawTinyTranslucentPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT/4, s, p, NULL)
|
||||
#define V_DrawSciencePatch(x,y,s,p,sc) V_DrawFixedPatch(x,y,sc,s,p,NULL)
|
||||
void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t *patch, const UINT8 *colormap);
|
||||
void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t *patch, fixed_t sx, fixed_t sy, fixed_t w, fixed_t h);
|
||||
|
||||
void V_DrawContinueIcon(INT32 x, INT32 y, INT32 flags, INT32 skinnum, UINT8 skincolor);
|
||||
|
||||
|
|
|
@ -138,7 +138,7 @@ static patch_t *widebgpatch = NULL; // INTERSCW
|
|||
static patch_t *bgtile = NULL; // SPECTILE/SRB2BACK
|
||||
static patch_t *interpic = NULL; // custom picture defined in map header
|
||||
static boolean usetile;
|
||||
static boolean usebuffer;
|
||||
boolean usebuffer = false;
|
||||
static boolean useinterpic;
|
||||
static INT32 timer;
|
||||
|
||||
|
@ -990,7 +990,6 @@ void Y_StartIntermission(void)
|
|||
else
|
||||
{
|
||||
useinterpic = false;
|
||||
usebuffer = true;
|
||||
}
|
||||
usetile = false;
|
||||
|
||||
|
@ -1712,6 +1711,7 @@ void Y_EndIntermission(void)
|
|||
|
||||
endtic = -1;
|
||||
intertype = int_none;
|
||||
usebuffer = false;
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
/// \file y_inter.h
|
||||
/// \brief Intermission
|
||||
|
||||
extern boolean usebuffer;
|
||||
|
||||
void Y_IntermissionDrawer(void);
|
||||
void Y_Ticker(void);
|
||||
void Y_StartIntermission(void);
|
||||
|
|
Loading…
Reference in a new issue