Merge branch 'pretty_stuff' into 'master'

Pretty stuff

See merge request STJr/SRB2Internal!131
This commit is contained in:
toaster 2018-04-06 17:40:52 -04:00
commit 66733d96c2
32 changed files with 2195 additions and 1418 deletions

View file

@ -226,13 +226,9 @@ static void CONS_Bind_f(void)
// Font colormap colors // Font colormap colors
// TODO: This could probably be improved somehow... // TODO: This could probably be improved somehow...
// These colormaps are 99% identical, with just a few changed bytes // These colormaps are 99% identical, with just a few changed bytes
UINT8 *yellowmap; // This could EASILY be handled by modifying a centralised colormap
UINT8 *purplemap; // for software depending on the prior state - but yknow, OpenGL...
UINT8 *lgreenmap; UINT8 *yellowmap, *magentamap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap, *purplemap, *aquamap, *peridotmap, *azuremap, *brownmap, *rosymap, *invertmap;
UINT8 *bluemap;
UINT8 *graymap;
UINT8 *redmap;
UINT8 *orangemap;
// Console BG color // Console BG color
UINT8 *consolebgmap = NULL; UINT8 *consolebgmap = NULL;
@ -280,45 +276,55 @@ static void CONS_backcolor_Change(void)
static void CON_SetupColormaps(void) static void CON_SetupColormaps(void)
{ {
INT32 i; INT32 i;
UINT8 *memorysrc = (UINT8 *)Z_Malloc((256*15), PU_STATIC, NULL);
yellowmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); magentamap = memorysrc;
graymap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); yellowmap = (magentamap+256);
purplemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); lgreenmap = (yellowmap+256);
lgreenmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); bluemap = (lgreenmap+256);
bluemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); redmap = (bluemap+256);
redmap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); graymap = (redmap+256);
orangemap = (UINT8 *)Z_Malloc(256, PU_STATIC, NULL); orangemap = (graymap+256);
skymap = (orangemap+256);
purplemap = (skymap+256);
aquamap = (purplemap+256);
peridotmap = (aquamap+256);
azuremap = (peridotmap+256);
brownmap = (azuremap+256);
rosymap = (brownmap+256);
invertmap = (rosymap+256);
// setup the other colormaps, for console text // setup the other colormaps, for console text
// these don't need to be aligned, unless you convert the // these don't need to be aligned, unless you convert the
// V_DrawMappedPatch() into optimised asm. // V_DrawMappedPatch() into optimised asm.
for (i = 0; i < 256; i++) for (i = 0; i < (256*15); i++, ++memorysrc)
{ *memorysrc = (UINT8)(i & 0xFF); // remap each color to itself...
yellowmap[i] = (UINT8)i; // remap each color to itself...
graymap[i] = (UINT8)i;
purplemap[i] = (UINT8)i;
lgreenmap[i] = (UINT8)i;
bluemap[i] = (UINT8)i;
redmap[i] = (UINT8)i;
orangemap[i] = (UINT8)i;
}
yellowmap[3] = (UINT8)73; #define colset(map, a, b, c) \
yellowmap[9] = (UINT8)66; map[1] = (UINT8)a;\
purplemap[3] = (UINT8)184; map[3] = (UINT8)b;\
purplemap[9] = (UINT8)186; map[9] = (UINT8)c
lgreenmap[3] = (UINT8)98;
lgreenmap[9] = (UINT8)106; colset(magentamap, 177, 178, 184);
bluemap[3] = (UINT8)147; colset(yellowmap, 82, 73, 66);
bluemap[9] = (UINT8)158; colset(lgreenmap, 97, 98, 106);
graymap[3] = (UINT8)10; colset(bluemap, 146, 147, 155);
graymap[9] = (UINT8)15; colset(redmap, 210, 32, 39);
redmap[3] = (UINT8)210; colset(graymap, 8, 10, 15);
redmap[9] = (UINT8)32; colset(orangemap, 51, 52, 57);
orangemap[3] = (UINT8)52; colset(skymap, 129, 130, 133);
orangemap[9] = (UINT8)57; colset(purplemap, 160, 161, 163);
colset(aquamap, 120, 121, 123);
colset(peridotmap, 88, 188, 190);
colset(azuremap, 144, 145, 170);
colset(brownmap, 219, 221, 224);
colset(rosymap, 200, 201, 203);
colset(invertmap, 27, 26, 22);
invertmap[26] = (UINT8)3;
#undef colset
// Init back colormap // Init back colormap
CON_SetupBackColormap(); CON_SetupBackColormap();

View file

@ -34,7 +34,7 @@ extern UINT32 con_scalefactor; // console text scale factor
extern consvar_t cons_backcolor; extern consvar_t cons_backcolor;
extern UINT8 *yellowmap, *purplemap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap; extern UINT8 *yellowmap, *magentamap, *lgreenmap, *bluemap, *graymap, *redmap, *orangemap, *skymap, *purplemap, *aquamap, *peridotmap, *azuremap, *brownmap, *rosymap, *invertmap;
// Console bg color (auto updated to match) // Console bg color (auto updated to match)
extern UINT8 *consolebgmap; extern UINT8 *consolebgmap;

View file

@ -1125,7 +1125,7 @@ static inline void CL_DrawConnectionStatus(void)
INT32 ccstime = I_GetTime(); INT32 ccstime = I_GetTime();
// Draw background fade // Draw background fade
V_DrawFadeScreen(); V_DrawFadeScreen(0xFF00, 16);
// Draw the bottom box. // Draw the bottom box.
M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1); M_DrawTextBox(BASEVIDWIDTH/2-128-8, BASEVIDHEIGHT-24-8, 32, 1);

View file

@ -309,9 +309,12 @@ consvar_t cv_overtime = {"overtime", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL,
consvar_t cv_rollingdemos = {"rollingdemos", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_rollingdemos = {"rollingdemos", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t timetic_cons_t[] = {{0, "Normal"}, {1, "Tics"}, {2, "Centiseconds"}, {3, "Mania"}, {0, NULL}}; static CV_PossibleValue_t timetic_cons_t[] = {{0, "Normal"}, {1, "Centiseconds"}, {2, "Mania"}, {3, "Tics"}, {0, NULL}};
consvar_t cv_timetic = {"timerres", "Normal", CV_SAVE, timetic_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display consvar_t cv_timetic = {"timerres", "Normal", CV_SAVE, timetic_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
static CV_PossibleValue_t powerupdisplay_cons_t[] = {{0, "Never"}, {1, "First-person only"}, {2, "Always"}, {0, NULL}};
consvar_t cv_powerupdisplay = {"powerupdisplay", "First-person only", CV_SAVE, powerupdisplay_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_resetmusic = {"resetmusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_resetmusic = {"resetmusic", "No", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t pointlimit_cons_t[] = {{0, "MIN"}, {999999990, "MAX"}, {0, NULL}}; static CV_PossibleValue_t pointlimit_cons_t[] = {{0, "MIN"}, {999999990, "MAX"}, {0, NULL}};
@ -670,6 +673,7 @@ void D_RegisterClientCommands(void)
// HUD // HUD
CV_RegisterVar(&cv_timetic); CV_RegisterVar(&cv_timetic);
CV_RegisterVar(&cv_powerupdisplay);
CV_RegisterVar(&cv_itemfinder); CV_RegisterVar(&cv_itemfinder);
CV_RegisterVar(&cv_showinputjoy); CV_RegisterVar(&cv_showinputjoy);

View file

@ -1584,6 +1584,10 @@ static void readhuditem(MYFILE *f, INT32 num)
{ {
hudinfo[num].y = i; hudinfo[num].y = i;
} }
else if (fastcmp(word, "F"))
{
hudinfo[num].f = i;
}
else else
deh_warning("Level header %d: unknown word '%s'", num, word); deh_warning("Level header %d: unknown word '%s'", num, word);
} }
@ -4517,6 +4521,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_BOXSPARKLE1", "S_BOXSPARKLE1",
"S_BOXSPARKLE2", "S_BOXSPARKLE2",
"S_BOXSPARKLE3", "S_BOXSPARKLE3",
"S_BOXSPARKLE4",
"S_BOX_FLICKER", "S_BOX_FLICKER",
"S_BOX_POP1", "S_BOX_POP1",
@ -5010,6 +5015,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_ARMF14", "S_ARMF14",
"S_ARMF15", "S_ARMF15",
"S_ARMF16", "S_ARMF16",
"S_ARMF17",
"S_ARMF18",
"S_ARMF19",
"S_ARMF20",
"S_ARMF21",
"S_ARMF22",
"S_ARMF23",
"S_ARMF24",
"S_ARMF25",
"S_ARMF26",
"S_ARMF27",
"S_ARMF28",
"S_ARMF29",
"S_ARMF30",
"S_ARMF31",
"S_ARMF32",
"S_ARMB1", "S_ARMB1",
"S_ARMB2", "S_ARMB2",
@ -5027,6 +5048,22 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_ARMB14", "S_ARMB14",
"S_ARMB15", "S_ARMB15",
"S_ARMB16", "S_ARMB16",
"S_ARMB17",
"S_ARMB18",
"S_ARMB19",
"S_ARMB20",
"S_ARMB21",
"S_ARMB22",
"S_ARMB23",
"S_ARMB24",
"S_ARMB25",
"S_ARMB26",
"S_ARMB27",
"S_ARMB28",
"S_ARMB29",
"S_ARMB30",
"S_ARMB31",
"S_ARMB32",
"S_WIND1", "S_WIND1",
"S_WIND2", "S_WIND2",
@ -5507,8 +5544,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Got Flag Sign // Got Flag Sign
"S_GOTFLAG", "S_GOTFLAG",
"S_GOTREDFLAG",
"S_GOTBLUEFLAG",
"S_CORK", "S_CORK",
@ -5848,6 +5883,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_XPLD_FLICKY", "S_XPLD_FLICKY",
"S_XPLD1", "S_XPLD1",
"S_XPLD2", "S_XPLD2",
"S_XPLD3",
"S_XPLD4",
"S_XPLD5",
"S_XPLD6",
"S_XPLD_EGGTRAP", "S_XPLD_EGGTRAP",
// Underwater Explosion // Underwater Explosion
@ -6788,32 +6827,22 @@ static const char *const POWERS_LIST[] = {
}; };
static const char *const HUDITEMS_LIST[] = { static const char *const HUDITEMS_LIST[] = {
"LIVESNAME", "LIVES",
"LIVESPIC",
"LIVESNUM",
"LIVESX",
"RINGS", "RINGS",
"RINGSSPLIT",
"RINGSNUM", "RINGSNUM",
"RINGSNUMSPLIT",
"SCORE", "SCORE",
"SCORENUM", "SCORENUM",
"TIME", "TIME",
"TIMESPLIT",
"MINUTES", "MINUTES",
"MINUTESSPLIT",
"TIMECOLON", "TIMECOLON",
"TIMECOLONSPLIT",
"SECONDS", "SECONDS",
"SECONDSSPLIT",
"TIMETICCOLON", "TIMETICCOLON",
"TICS", "TICS",
"SS_TOTALRINGS", "SS_TOTALRINGS",
"SS_TOTALRINGS_SPLIT",
"GETRINGS", "GETRINGS",
"GETRINGSNUM", "GETRINGSNUM",
@ -6821,7 +6850,7 @@ static const char *const HUDITEMS_LIST[] = {
"TIMELEFTNUM", "TIMELEFTNUM",
"TIMEUP", "TIMEUP",
"HUNTPICS", "HUNTPICS",
"GRAVBOOTSICO", "POWERUPS",
"LAP" "LAP"
}; };
@ -7310,13 +7339,21 @@ struct {
{"V_6WIDTHSPACE",V_6WIDTHSPACE}, {"V_6WIDTHSPACE",V_6WIDTHSPACE},
{"V_OLDSPACING",V_OLDSPACING}, {"V_OLDSPACING",V_OLDSPACING},
{"V_MONOSPACE",V_MONOSPACE}, {"V_MONOSPACE",V_MONOSPACE},
{"V_PURPLEMAP",V_PURPLEMAP}, {"V_MAGENTAMAP",V_MAGENTAMAP},
{"V_YELLOWMAP",V_YELLOWMAP}, {"V_YELLOWMAP",V_YELLOWMAP},
{"V_GREENMAP",V_GREENMAP}, {"V_GREENMAP",V_GREENMAP},
{"V_BLUEMAP",V_BLUEMAP}, {"V_BLUEMAP",V_BLUEMAP},
{"V_REDMAP",V_REDMAP}, {"V_REDMAP",V_REDMAP},
{"V_GRAYMAP",V_GRAYMAP}, {"V_GRAYMAP",V_GRAYMAP},
{"V_ORANGEMAP",V_ORANGEMAP}, {"V_ORANGEMAP",V_ORANGEMAP},
{"V_SKYMAP",V_SKYMAP},
{"V_PURPLEMAP",V_PURPLEMAP},
{"V_AQUAMAP",V_AQUAMAP},
{"V_PERIDOTMAP",V_PERIDOTMAP},
{"V_AZUREMAP",V_AZUREMAP},
{"V_BROWNMAP",V_BROWNMAP},
{"V_ROSYMAP",V_ROSYMAP},
{"V_INVERTMAP",V_INVERTMAP},
{"V_TRANSLUCENT",V_TRANSLUCENT}, {"V_TRANSLUCENT",V_TRANSLUCENT},
{"V_10TRANS",V_10TRANS}, {"V_10TRANS",V_10TRANS},
{"V_20TRANS",V_20TRANS}, {"V_20TRANS",V_20TRANS},
@ -7342,7 +7379,7 @@ struct {
{"V_WRAPX",V_WRAPX}, {"V_WRAPX",V_WRAPX},
{"V_WRAPY",V_WRAPY}, {"V_WRAPY",V_WRAPY},
{"V_NOSCALESTART",V_NOSCALESTART}, {"V_NOSCALESTART",V_NOSCALESTART},
{"V_SPLITSCREEN",V_SPLITSCREEN}, {"V_PERPLAYER",V_PERPLAYER},
{"V_PARAMMASK",V_PARAMMASK}, {"V_PARAMMASK",V_PARAMMASK},
{"V_SCALEPATCHMASK",V_SCALEPATCHMASK}, {"V_SCALEPATCHMASK",V_SCALEPATCHMASK},
@ -7492,7 +7529,7 @@ static hudnum_t get_huditem(const char *word)
if (fastcmp(word, HUDITEMS_LIST[i])) if (fastcmp(word, HUDITEMS_LIST[i]))
return i; return i;
deh_warning("Couldn't find huditem named 'HUD_%s'",word); deh_warning("Couldn't find huditem named 'HUD_%s'",word);
return HUD_LIVESNAME; return HUD_LIVES;
} }
#ifndef HAVE_BLUA #ifndef HAVE_BLUA

View file

@ -560,9 +560,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
/// Experimental attempts at preventing MF_PAPERCOLLISION objects from getting stuck in walls. /// Experimental attempts at preventing MF_PAPERCOLLISION objects from getting stuck in walls.
//#define PAPER_COLLISIONCORRECTION //#define PAPER_COLLISIONCORRECTION
/// Hudname padding.
#define SKINNAMEPADDING
/// FINALLY some real clipping that doesn't make walls dissappear AND speeds the game up /// FINALLY some real clipping that doesn't make walls dissappear AND speeds the game up
/// (that was the original comment from SRB2CB, sadly it is a lie and actually slows game down) /// (that was the original comment from SRB2CB, sadly it is a lie and actually slows game down)
/// on the bright side it fixes some weird issues with translucent walls /// on the bright side it fixes some weird issues with translucent walls

View file

@ -498,6 +498,7 @@ extern boolean singletics;
#include "d_clisrv.h" #include "d_clisrv.h"
extern consvar_t cv_timetic; // display high resolution timer extern consvar_t cv_timetic; // display high resolution timer
extern consvar_t cv_powerupdisplay; // display powerups
extern consvar_t cv_showinputjoy; // display joystick in time attack extern consvar_t cv_showinputjoy; // display joystick in time attack
extern consvar_t cv_forceskin; // force clients to use the server's skin extern consvar_t cv_forceskin; // force clients to use the server's skin
extern consvar_t cv_downloading; // allow clients to downloading WADs. extern consvar_t cv_downloading; // allow clients to downloading WADs.

View file

@ -330,7 +330,7 @@ void F_StartIntro(void)
"hovers around the planet.\xBF It suddenly\n" "hovers around the planet.\xBF It suddenly\n"
"appears from nowhere, circles around, and\n" "appears from nowhere, circles around, and\n"
"\xB6- just as mysteriously as it arrives -\xB6\n" "\xB6- just as mysteriously as it arrives -\xB6\n"
"vanishes after about two months.\xBF\n" "vanishes after about one week.\xBF\n"
"No one knows why it appears, or how.\n#"); "No one knows why it appears, or how.\n#");
introtext[5] = M_GetText( introtext[5] = M_GetText(
@ -342,11 +342,11 @@ void F_StartIntro(void)
"the screen, and just shrugged it off.\n#"); "the screen, and just shrugged it off.\n#");
introtext[6] = M_GetText( introtext[6] = M_GetText(
"It was only later\n" "It was hours later\n"
"that he had an\n" "that he had an\n"
"idea. \xBF\xA7\"The Black\n" "idea. \xBF\xA7\"The Black\n"
"Rock usually has a\n" "Rock has a large\n"
"lot of energy\n" "amount of energy\n"
"within it\xAC...\xA7\xBF\n" "within it\xAC...\xA7\xBF\n"
"If I can somehow\n" "If I can somehow\n"
"harness this,\xB8 I\n" "harness this,\xB8 I\n"
@ -364,37 +364,37 @@ void F_StartIntro(void)
"a reunion party...\n#"); "a reunion party...\n#");
introtext[8] = M_GetText( introtext[8] = M_GetText(
"\xA5\"We're\xB6 ready\xB6 to\xB4 fire\xB6 in\xB6 15\xB6 seconds!\"\xA8\xB8\n" "\xA5\"PRE-""\xB6""PARING-""\xB6""TO-""\xB4""FIRE-\xB6IN-""\xB6""15-""\xB6""SECONDS!\"\xA8\xB8\n"
"The robot said, his voice crackling a\n" "his targeting system crackled\n"
"little down the com-link. \xBF\xA7\"Good!\"\xA8\xB8\n" "robotically down the com-link. \xBF\xA7\"Good!\"\xA8\xB8\n"
"Eggman sat back in his Egg-Mobile and\n" "Eggman sat back in his eggmobile and\n"
"began to count down as he saw the\n" "began to count down as he saw the\n"
"GreenFlower city on the main monitor.\n#"); "Greenflower mountain on the monitor.\n#");
introtext[9] = M_GetText( introtext[9] = M_GetText(
"\xA5\"10...\xD2""9...\xD2""8...\"\xA8\xD2\n" "\xA5\"10...\xD2""9...\xD2""8...\"\xA8\xD2\n"
"Meanwhile, Sonic was tearing across the\n" "Meanwhile, Sonic was tearing across the\n"
"zones. Everything became a blur as he\n" "zones. Everything became a blur as he\n"
"ran around loops, skimmed over water,\n" "ran up slopes, skimmed over water,\n"
"and catapulted himself off rocks with\n" "and catapulted himself off rocks with\n"
"his phenomenal speed.\n#"); "his phenomenal speed.\n#");
introtext[10] = M_GetText( introtext[10] = M_GetText(
"\xA5\"6...\xD2""5...\xD2""4...\"\xA8\xD2\n" "\xA5\"6...\xD2""5...\xD2""4...\"\xA8\xD2\n"
"Sonic knew he was getting closer to the\n" "Sonic knew he was getting closer to the\n"
"City, and pushed himself harder.\xB4 Finally,\n" "zone, and pushed himself harder.\xB4 Finally,\n"
"the city appeared in the horizon.\xD2\xD2\n" "the mountain appeared in the horizon.\xD2\xD2\n"
"\xA5\"3...\xD2""2...\xD2""1...\xD2""Zero.\"\n#"); "\xA5\"3...\xD2""2...\xD2""1...\xD2""Zero.\"\n#");
introtext[11] = M_GetText( introtext[11] = M_GetText(
"GreenFlower City was gone.\xC4\n" "Greenflower Mountain was no more.\xC4\n"
"Sonic arrived just in time to see what\n" "Sonic arrived just in time to see what\n"
"little of the 'ruins' were left.\n" "little of the 'ruins' were left.\n"
"Everyone and everything in the city\n" "The natural beauty of the zone\n"
"had been obliterated.\n#"); "had been obliterated.\n#");
introtext[12] = M_GetText( introtext[12] = M_GetText(
"\xA7\"You're not quite as dead as we thought,\n" "\xA7\"You're not quite as gone as we thought,\n"
"huh?\xBF Are you going to tell us your plan as\n" "huh?\xBF Are you going to tell us your plan as\n"
"usual or will I \xA8\xB4'have to work it out'\xA7 or\n" "usual or will I \xA8\xB4'have to work it out'\xA7 or\n"
"something?\"\xD2\xD2\n" "something?\"\xD2\xD2\n"
@ -408,8 +408,8 @@ void F_StartIntro(void)
"leaving Sonic\n" "leaving Sonic\n"
"and Tails behind.\xB6\n" "and Tails behind.\xB6\n"
"Tails looked at\n" "Tails looked at\n"
"the ruins of the\n" "the once-perfect\n"
"Greenflower City\n" "mountainside\n"
"with a grim face\n" "with a grim face\n"
"and sighed.\xC6\n" "and sighed.\xC6\n"
"\xA7\"Now\xB6 what do we\n" "\xA7\"Now\xB6 what do we\n"

View file

@ -133,8 +133,8 @@ boolean useNightsSS = false;
UINT8 skincolor_redteam = SKINCOLOR_RED; UINT8 skincolor_redteam = SKINCOLOR_RED;
UINT8 skincolor_blueteam = SKINCOLOR_BLUE; UINT8 skincolor_blueteam = SKINCOLOR_BLUE;
UINT8 skincolor_redring = SKINCOLOR_RED; UINT8 skincolor_redring = SKINCOLOR_SALMON;
UINT8 skincolor_bluering = SKINCOLOR_AZURE; UINT8 skincolor_bluering = SKINCOLOR_CORNFLOWER;
tic_t countdowntimer = 0; tic_t countdowntimer = 0;
boolean countdowntimeup = false; boolean countdowntimeup = false;
@ -888,7 +888,9 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
// why build a ticcmd if we're paused? // why build a ticcmd if we're paused?
// Or, for that matter, if we're being reborn. // Or, for that matter, if we're being reborn.
if (paused || P_AutoPause() || (gamestate == GS_LEVEL && player->playerstate == PST_REBORN)) // ...OR if we're blindfolded. No looking into the floor.
if (paused || P_AutoPause() || (gamestate == GS_LEVEL && (player->playerstate == PST_REBORN || ((gametype == GT_TAG || gametype == GT_HIDEANDSEEK)
&& (leveltime < hidetime * TICRATE) && (player->pflags & PF_TAGIT)))))
{ {
cmd->angleturn = (INT16)(localangle >> 16); cmd->angleturn = (INT16)(localangle >> 16);
cmd->aiming = G_ClipAimingPitch(&localaiming); cmd->aiming = G_ClipAimingPitch(&localaiming);

View file

@ -33,6 +33,8 @@
#include "../z_zone.h" #include "../z_zone.h"
#include "../v_video.h" #include "../v_video.h"
#include "../st_stuff.h" #include "../st_stuff.h"
#include "../p_local.h" // stplyr
#include "../g_game.h" // players
#include <fcntl.h> #include <fcntl.h>
#include "../i_video.h" // for rendermode != render_glide #include "../i_video.h" // for rendermode != render_glide
@ -147,11 +149,11 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
// | /| // | /|
// |/ | // |/ |
// 0--1 // 0--1
float dupx, dupy, fscale, fwidth, fheight; float dupx, dupy, fscalew, fscaleh, fwidth, fheight;
if (alphalevel == 12) UINT8 perplayershuffle = 0;
alphalevel = 0;
else if (alphalevel >= 10 && alphalevel < 13) if (alphalevel >= 10 && alphalevel < 13)
return; return;
// make patch ready in hardware cache // make patch ready in hardware cache
@ -179,24 +181,89 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
} }
dupx = dupy = (dupx < dupy ? dupx : dupy); dupx = dupy = (dupx < dupy ? dupx : dupy);
fscale = FIXED_TO_FLOAT(pscale); fscalew = fscaleh = FIXED_TO_FLOAT(pscale);
if (option & V_OFFSET) if (option & V_OFFSET)
{ {
cx -= (float)gpatch->leftoffset * dupx * fscale; cx -= (float)gpatch->leftoffset * dupx * fscalew;
cy -= (float)gpatch->topoffset * dupy * fscale; cy -= (float)gpatch->topoffset * dupy * fscaleh;
} }
else else
{ {
cy -= (float)gpatch->topoffset * fscale; cy -= (float)gpatch->topoffset * fscaleh;
if (option & V_FLIP) if (option & V_FLIP)
cx -= ((float)gpatch->width - (float)gpatch->leftoffset) * fscale; cx -= ((float)gpatch->width - (float)gpatch->leftoffset) * fscalew;
else else
cx -= (float)gpatch->leftoffset * fscale; cx -= (float)gpatch->leftoffset * fscalew;
} }
if (option & V_SPLITSCREEN) if (splitscreen && (option & V_PERPLAYER))
{
float adjusty = ((option & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
fscaleh /= 2;
cy /= 2; cy /= 2;
#ifdef QUADS
if (splitscreen > 1) // 3 or 4 players
{
float adjustx = ((option & V_NOSCALESTART) ? vid.width : BASEVIDWIDTH)/2.0f;
fscalew /= 2;
cx /= 2;
if (stplyr == &players[displayplayer])
{
if (!(option & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(option & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
option &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
}
else if (stplyr == &players[secondarydisplayplayer])
{
if (!(option & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(option & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
cx += adjustx;
option &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
}
else if (stplyr == &players[thirddisplayplayer])
{
if (!(option & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(option & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
cy += adjusty;
option &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
}
else if (stplyr == &players[fourthdisplayplayer])
{
if (!(option & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(option & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
cx += adjustx;
cy += adjusty;
option &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
}
}
else
#endif
// 2 players
{
if (stplyr == &players[displayplayer])
{
if (!(option & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle = 1;
option &= ~V_SNAPTOBOTTOM;
}
else //if (stplyr == &players[secondarydisplayplayer])
{
if (!(option & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle = 2;
cy += adjusty;
option &= ~V_SNAPTOTOP;
}
}
}
if (!(option & V_NOSCALESTART)) if (!(option & V_NOSCALESTART))
{ {
@ -224,23 +291,29 @@ void HWR_DrawFixedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscale,
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
else if (!(option & V_SNAPTOLEFT)) else if (!(option & V_SNAPTOLEFT))
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2; cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/2;
if (perplayershuffle & 4)
cx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/4;
else if (perplayershuffle & 8)
cx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx))/4;
} }
if (vid.height != BASEVIDHEIGHT * vid.dupy) if (vid.height != BASEVIDHEIGHT * vid.dupy)
{ {
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM)) if (option & V_SNAPTOBOTTOM)
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
else if (option & V_SNAPTOBOTTOM)
cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy));
else if (!(option & V_SNAPTOTOP)) else if (!(option & V_SNAPTOTOP))
cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/2; cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/2;
if (perplayershuffle & 1)
cy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/4;
else if (perplayershuffle & 2)
cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/4;
} }
} }
} }
if (pscale != FRACUNIT) if (pscale != FRACUNIT || (splitscreen && option & V_PERPLAYER))
{ {
fwidth = (float)gpatch->width * fscale * dupx; fwidth = (float)gpatch->width * fscalew * dupx;
fheight = (float)gpatch->height * fscale * dupy; fheight = (float)gpatch->height * fscaleh * dupy;
} }
else else
{ {
@ -316,9 +389,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
// 0--1 // 0--1
float dupx, dupy, fscale, fwidth, fheight; float dupx, dupy, fscale, fwidth, fheight;
if (alphalevel == 12) if (alphalevel >= 10 && alphalevel < 13)
alphalevel = 0;
else if (alphalevel >= 10 && alphalevel < 13)
return; return;
// make patch ready in hardware cache // make patch ready in hardware cache
@ -345,6 +416,8 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
dupx = dupy = (dupx < dupy ? dupx : dupy); dupx = dupy = (dupx < dupy ? dupx : dupy);
fscale = FIXED_TO_FLOAT(pscale); fscale = FIXED_TO_FLOAT(pscale);
// fuck it, no GL support for croppedpatch v_perplayer right now. it's not like it's accessible to Lua or anything, and we only use it for menus...
cy -= (float)gpatch->topoffset * fscale; cy -= (float)gpatch->topoffset * fscale;
cx -= (float)gpatch->leftoffset * fscale; cx -= (float)gpatch->leftoffset * fscale;
@ -377,9 +450,7 @@ void HWR_DrawCroppedPatch(GLPatch_t *gpatch, fixed_t x, fixed_t y, fixed_t pscal
} }
if (vid.height != BASEVIDHEIGHT * vid.dupy) if (vid.height != BASEVIDHEIGHT * vid.dupy)
{ {
if ((option & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM)) if (option & V_SNAPTOBOTTOM)
cy += ((float)vid.height/2 - ((float)BASEVIDHEIGHT/2 * dupy));
else if (option & V_SNAPTOBOTTOM)
cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy));
else if (!(option & V_SNAPTOTOP)) else if (!(option & V_SNAPTOTOP))
cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/2; cy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy))/2;
@ -578,18 +649,14 @@ void HWR_DrawFlatFill (INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatlumpnum
// | /| // | /|
// |/ | // |/ |
// 0--1 // 0--1
void HWR_FadeScreenMenuBack(UINT32 color, INT32 height) void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength)
{ {
FOutVector v[4]; FOutVector v[4];
FSurfaceInfo Surf; FSurfaceInfo Surf;
// setup some neat-o translucency effect
if (!height) //cool hack 0 height is full height
height = vid.height;
v[0].x = v[3].x = -1.0f; v[0].x = v[3].x = -1.0f;
v[2].x = v[1].x = 1.0f; v[2].x = v[1].x = 1.0f;
v[0].y = v[1].y = 1.0f-((height<<1)/(float)vid.height); v[0].y = v[1].y = -1.0f;
v[2].y = v[3].y = 1.0f; v[2].y = v[3].y = 1.0f;
v[0].z = v[1].z = v[2].z = v[3].z = 1.0f; v[0].z = v[1].z = v[2].z = v[3].z = 1.0f;
@ -598,8 +665,16 @@ void HWR_FadeScreenMenuBack(UINT32 color, INT32 height)
v[0].tow = v[1].tow = 1.0f; v[0].tow = v[1].tow = 1.0f;
v[2].tow = v[3].tow = 0.0f; v[2].tow = v[3].tow = 0.0f;
Surf.FlatColor.rgba = UINT2RGBA(color); if (color & 0xFF00) // Do COLORMAP fade.
Surf.FlatColor.s.alpha = (UINT8)((0xff/2) * ((float)height / vid.height)); //calum: varies console alpha {
Surf.FlatColor.rgba = UINT2RGBA(0x01010160);
Surf.FlatColor.s.alpha = (strength*8);
}
else // Do TRANSMAP** fade.
{
Surf.FlatColor.rgba = pLocalPalette[color].rgba;
Surf.FlatColor.s.alpha = (UINT8)(strength*25.5f);
}
HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest); HWD.pfnDrawPolygon(&Surf, v, 4, PF_NoTexture|PF_Modulated|PF_Translucent|PF_NoDepthTest);
} }
@ -806,6 +881,8 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
FSurfaceInfo Surf; FSurfaceInfo Surf;
float fx, fy, fw, fh; float fx, fy, fw, fh;
UINT8 perplayershuffle = 0;
if (w < 0 || h < 0) if (w < 0 || h < 0)
return; // consistency w/ software return; // consistency w/ software
@ -814,6 +891,74 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
// |/ | // |/ |
// 0--1 // 0--1
if (splitscreen && (color & V_PERPLAYER))
{
fixed_t adjusty = ((color & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
h >>= 1;
y >>= 1;
#ifdef QUADS
if (splitscreen > 1) // 3 or 4 players
{
fixed_t adjustx = ((color & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)/2.0f;
w >>= 1;
x >>= 1;
if (stplyr == &players[displayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
color &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
}
else if (stplyr == &players[secondarydisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
color &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
}
else if (stplyr == &players[thirddisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
y += adjusty;
color &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
}
else //if (stplyr == &players[fourthdisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(color & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
y += adjusty;
color &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
}
}
else
#endif
// 2 players
{
if (stplyr == &players[displayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
color &= ~V_SNAPTOBOTTOM;
}
else //if (stplyr == &players[secondarydisplayplayer])
{
if (!(color & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
y += adjusty;
color &= ~V_SNAPTOTOP;
}
}
}
fx = (float)x; fx = (float)x;
fy = (float)y; fy = (float)y;
fw = (float)w; fw = (float)w;
@ -846,6 +991,10 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)); fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx));
else if (!(color & V_SNAPTOLEFT)) else if (!(color & V_SNAPTOLEFT))
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2; fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 2;
if (perplayershuffle & 4)
fx -= ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4;
else if (perplayershuffle & 8)
fx += ((float)vid.width - ((float)BASEVIDWIDTH * dupx)) / 4;
} }
if (vid.height != BASEVIDHEIGHT * dupy) if (vid.height != BASEVIDHEIGHT * dupy)
{ {
@ -854,6 +1003,10 @@ void HWR_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 color)
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)); fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy));
else if (!(color & V_SNAPTOTOP)) else if (!(color & V_SNAPTOTOP))
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2; fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 2;
if (perplayershuffle & 1)
fy -= ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4;
else if (perplayershuffle & 2)
fy += ((float)vid.height - ((float)BASEVIDHEIGHT * dupy)) / 4;
} }
} }

View file

@ -33,7 +33,7 @@ void HWR_Shutdown(void);
void HWR_clearAutomap(void); void HWR_clearAutomap(void);
void HWR_drawAMline(const fline_t *fl, INT32 color); void HWR_drawAMline(const fline_t *fl, INT32 color);
void HWR_FadeScreenMenuBack(UINT32 color, INT32 height); void HWR_FadeScreenMenuBack(UINT16 color, UINT8 strength);
void HWR_DrawConsoleBack(UINT32 color, INT32 height); void HWR_DrawConsoleBack(UINT32 color, INT32 height);
void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player); void HWR_RenderSkyboxView(INT32 viewnumber, player_t *player);
void HWR_RenderPlayerView(INT32 viewnumber, player_t *player); void HWR_RenderPlayerView(INT32 viewnumber, player_t *player);

View file

@ -89,8 +89,7 @@ patch_t *tallinfin;
// coop hud // coop hud
//------------------------------------------- //-------------------------------------------
patch_t *emeraldpics[7]; patch_t *emeraldpics[3][7]; // 0 = normal, 1 = tiny, 2 = coinbox
patch_t *tinyemeraldpics[7];
static patch_t *emblemicon; static patch_t *emblemicon;
patch_t *tokenicon; patch_t *tokenicon;
static patch_t *exiticon; static patch_t *exiticon;
@ -250,20 +249,29 @@ void HU_LoadGraphics(void)
tokenicon = W_CachePatchName("TOKNICON", PU_HUDGFX); tokenicon = W_CachePatchName("TOKNICON", PU_HUDGFX);
exiticon = W_CachePatchName("EXITICON", PU_HUDGFX); exiticon = W_CachePatchName("EXITICON", PU_HUDGFX);
emeraldpics[0] = W_CachePatchName("CHAOS1", PU_HUDGFX); emeraldpics[0][0] = W_CachePatchName("CHAOS1", PU_HUDGFX);
emeraldpics[1] = W_CachePatchName("CHAOS2", PU_HUDGFX); emeraldpics[0][1] = W_CachePatchName("CHAOS2", PU_HUDGFX);
emeraldpics[2] = W_CachePatchName("CHAOS3", PU_HUDGFX); emeraldpics[0][2] = W_CachePatchName("CHAOS3", PU_HUDGFX);
emeraldpics[3] = W_CachePatchName("CHAOS4", PU_HUDGFX); emeraldpics[0][3] = W_CachePatchName("CHAOS4", PU_HUDGFX);
emeraldpics[4] = W_CachePatchName("CHAOS5", PU_HUDGFX); emeraldpics[0][4] = W_CachePatchName("CHAOS5", PU_HUDGFX);
emeraldpics[5] = W_CachePatchName("CHAOS6", PU_HUDGFX); emeraldpics[0][5] = W_CachePatchName("CHAOS6", PU_HUDGFX);
emeraldpics[6] = W_CachePatchName("CHAOS7", PU_HUDGFX); emeraldpics[0][6] = W_CachePatchName("CHAOS7", PU_HUDGFX);
tinyemeraldpics[0] = W_CachePatchName("TEMER1", PU_HUDGFX);
tinyemeraldpics[1] = W_CachePatchName("TEMER2", PU_HUDGFX); emeraldpics[1][0] = W_CachePatchName("TEMER1", PU_HUDGFX);
tinyemeraldpics[2] = W_CachePatchName("TEMER3", PU_HUDGFX); emeraldpics[1][1] = W_CachePatchName("TEMER2", PU_HUDGFX);
tinyemeraldpics[3] = W_CachePatchName("TEMER4", PU_HUDGFX); emeraldpics[1][2] = W_CachePatchName("TEMER3", PU_HUDGFX);
tinyemeraldpics[4] = W_CachePatchName("TEMER5", PU_HUDGFX); emeraldpics[1][3] = W_CachePatchName("TEMER4", PU_HUDGFX);
tinyemeraldpics[5] = W_CachePatchName("TEMER6", PU_HUDGFX); emeraldpics[1][4] = W_CachePatchName("TEMER5", PU_HUDGFX);
tinyemeraldpics[6] = W_CachePatchName("TEMER7", PU_HUDGFX); emeraldpics[1][5] = W_CachePatchName("TEMER6", PU_HUDGFX);
emeraldpics[1][6] = W_CachePatchName("TEMER7", PU_HUDGFX);
emeraldpics[2][0] = W_CachePatchName("EMBOX1", PU_HUDGFX);
emeraldpics[2][1] = W_CachePatchName("EMBOX2", PU_HUDGFX);
emeraldpics[2][2] = W_CachePatchName("EMBOX3", PU_HUDGFX);
emeraldpics[2][3] = W_CachePatchName("EMBOX4", PU_HUDGFX);
emeraldpics[2][4] = W_CachePatchName("EMBOX5", PU_HUDGFX);
emeraldpics[2][5] = W_CachePatchName("EMBOX6", PU_HUDGFX);
emeraldpics[2][6] = W_CachePatchName("EMBOX7", PU_HUDGFX);
} }
// Initialise Heads up // Initialise Heads up
@ -939,7 +947,7 @@ static void HU_DrawCEcho(void)
INT32 y = (BASEVIDHEIGHT/2)-4; INT32 y = (BASEVIDHEIGHT/2)-4;
INT32 pnumlines = 0; INT32 pnumlines = 0;
UINT32 realflags = cechoflags; UINT32 realflags = cechoflags|V_PERPLAYER; // requested as part of splitscreen's stuff
INT32 realalpha = (INT32)((cechoflags & V_ALPHAMASK) >> V_ALPHASHIFT); INT32 realalpha = (INT32)((cechoflags & V_ALPHAMASK) >> V_ALPHASHIFT);
char *line; char *line;
@ -982,6 +990,12 @@ static void HU_DrawCEcho(void)
*line = '\0'; *line = '\0';
V_DrawCenteredString(BASEVIDWIDTH/2, y, realflags, echoptr); V_DrawCenteredString(BASEVIDWIDTH/2, y, realflags, echoptr);
if (splitscreen)
{
stplyr = ((stplyr == &players[displayplayer]) ? &players[secondarydisplayplayer] : &players[displayplayer]);
V_DrawCenteredString(BASEVIDWIDTH/2, y, realflags, echoptr);
stplyr = ((stplyr == &players[displayplayer]) ? &players[secondarydisplayplayer] : &players[displayplayer]);
}
y += ((realflags & V_RETURN8) ? 8 : 12); y += ((realflags & V_RETURN8) ? 8 : 12);
echoptr = line; echoptr = line;
@ -1466,25 +1480,25 @@ void HU_DrawEmeralds(INT32 x, INT32 y, INT32 pemeralds)
{ {
//Draw the emeralds, in the CORRECT order, using tiny emerald sprites. //Draw the emeralds, in the CORRECT order, using tiny emerald sprites.
if (pemeralds & EMERALD1) if (pemeralds & EMERALD1)
V_DrawSmallScaledPatch(x , y-6, 0, tinyemeraldpics[0]); V_DrawSmallScaledPatch(x , y-6, 0, emeraldpics[1][0]);
if (pemeralds & EMERALD2) if (pemeralds & EMERALD2)
V_DrawSmallScaledPatch(x+4, y-3, 0, tinyemeraldpics[1]); V_DrawSmallScaledPatch(x+4, y-3, 0, emeraldpics[1][1]);
if (pemeralds & EMERALD3) if (pemeralds & EMERALD3)
V_DrawSmallScaledPatch(x+4, y+3, 0, tinyemeraldpics[2]); V_DrawSmallScaledPatch(x+4, y+3, 0, emeraldpics[1][2]);
if (pemeralds & EMERALD4) if (pemeralds & EMERALD4)
V_DrawSmallScaledPatch(x , y+6, 0, tinyemeraldpics[3]); V_DrawSmallScaledPatch(x , y+6, 0, emeraldpics[1][3]);
if (pemeralds & EMERALD5) if (pemeralds & EMERALD5)
V_DrawSmallScaledPatch(x-4, y+3, 0, tinyemeraldpics[4]); V_DrawSmallScaledPatch(x-4, y+3, 0, emeraldpics[1][4]);
if (pemeralds & EMERALD6) if (pemeralds & EMERALD6)
V_DrawSmallScaledPatch(x-4, y-3, 0, tinyemeraldpics[5]); V_DrawSmallScaledPatch(x-4, y-3, 0, emeraldpics[1][5]);
if (pemeralds & EMERALD7) if (pemeralds & EMERALD7)
V_DrawSmallScaledPatch(x, y, 0, tinyemeraldpics[6]); V_DrawSmallScaledPatch(x, y, 0, emeraldpics[1][6]);
} }
// //
@ -1539,7 +1553,7 @@ static inline void HU_DrawSpectatorTicker(void)
templength = length; templength = length;
} }
V_DrawString(templength, height + 8, V_TRANSLUCENT, current); V_DrawString(templength, height + 8, V_TRANSLUCENT|V_ALLOWLOWERCASE, current);
} }
length += (signed)strlen(player_names[i]) * 8 + 16; length += (signed)strlen(player_names[i]) * 8 + 16;
@ -1551,7 +1565,6 @@ static inline void HU_DrawSpectatorTicker(void)
// //
static void HU_DrawRankings(void) static void HU_DrawRankings(void)
{ {
patch_t *p;
playersort_t tab[MAXPLAYERS]; playersort_t tab[MAXPLAYERS];
INT32 i, j, scorelines; INT32 i, j, scorelines;
boolean completed[MAXPLAYERS]; boolean completed[MAXPLAYERS];
@ -1560,43 +1573,12 @@ static void HU_DrawRankings(void)
// draw the current gametype in the lower right // draw the current gametype in the lower right
HU_drawGametype(); HU_drawGametype();
if (G_GametypeHasTeams())
{
if (gametype == GT_CTF)
p = bflagico;
else
p = bmatcico;
V_DrawSmallScaledPatch(128 - SHORT(p->width)/4, 4, 0, p);
V_DrawCenteredString(128, 16, 0, va("%u", bluescore));
if (gametype == GT_CTF)
p = rflagico;
else
p = rmatcico;
V_DrawSmallScaledPatch(192 - SHORT(p->width)/4, 4, 0, p);
V_DrawCenteredString(192, 16, 0, va("%u", redscore));
}
if (gametype != GT_RACE && gametype != GT_COMPETITION && gametype != GT_COOP) if (gametype != GT_RACE && gametype != GT_COMPETITION && gametype != GT_COOP)
{ {
if (cv_timelimit.value && timelimitintics > 0) if (cv_timelimit.value && timelimitintics > 0)
{ {
INT32 timeval = (timelimitintics+1-leveltime)/TICRATE; V_DrawCenteredString(64, 8, 0, "TIME");
V_DrawCenteredString(64, 16, 0, va("%i:%02i", G_TicsToMinutes(stplyr->realtime, true), G_TicsToSeconds(stplyr->realtime)));
if (leveltime <= timelimitintics)
{
V_DrawCenteredString(64, 8, 0, "TIME LEFT");
V_DrawCenteredString(64, 16, 0, va("%u", timeval));
}
// overtime
if ((leveltime > (timelimitintics + TICRATE/2)) && cv_overtime.value)
{
V_DrawCenteredString(64, 8, 0, "TIME LEFT");
V_DrawCenteredString(64, 16, 0, "OVERTIME");
}
} }
if (cv_pointlimit.value > 0) if (cv_pointlimit.value > 0)
@ -1753,19 +1735,19 @@ static void HU_DrawCoopOverlay(void)
#endif #endif
if (emeralds & EMERALD1) if (emeralds & EMERALD1)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8 , (BASEVIDHEIGHT/3)-32, 0, emeraldpics[0]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8 , (BASEVIDHEIGHT/3)-32, 0, emeraldpics[0][0]);
if (emeralds & EMERALD2) if (emeralds & EMERALD2)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8+24, (BASEVIDHEIGHT/3)-16, 0, emeraldpics[1]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8+24, (BASEVIDHEIGHT/3)-16, 0, emeraldpics[0][1]);
if (emeralds & EMERALD3) if (emeralds & EMERALD3)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8+24, (BASEVIDHEIGHT/3)+16, 0, emeraldpics[2]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8+24, (BASEVIDHEIGHT/3)+16, 0, emeraldpics[0][2]);
if (emeralds & EMERALD4) if (emeralds & EMERALD4)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8 , (BASEVIDHEIGHT/3)+32, 0, emeraldpics[3]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8 , (BASEVIDHEIGHT/3)+32, 0, emeraldpics[0][3]);
if (emeralds & EMERALD5) if (emeralds & EMERALD5)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8-24, (BASEVIDHEIGHT/3)+16, 0, emeraldpics[4]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8-24, (BASEVIDHEIGHT/3)+16, 0, emeraldpics[0][4]);
if (emeralds & EMERALD6) if (emeralds & EMERALD6)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8-24, (BASEVIDHEIGHT/3)-16, 0, emeraldpics[5]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8-24, (BASEVIDHEIGHT/3)-16, 0, emeraldpics[0][5]);
if (emeralds & EMERALD7) if (emeralds & EMERALD7)
V_DrawScaledPatch((BASEVIDWIDTH/2)-8 , (BASEVIDHEIGHT/3) , 0, emeraldpics[6]); V_DrawScaledPatch((BASEVIDWIDTH/2)-8 , (BASEVIDHEIGHT/3) , 0, emeraldpics[0][6]);
} }
static void HU_DrawNetplayCoopOverlay(void) static void HU_DrawNetplayCoopOverlay(void)
@ -1780,7 +1762,7 @@ static void HU_DrawNetplayCoopOverlay(void)
for (i = 0; i < 7; ++i) for (i = 0; i < 7; ++i)
{ {
if (emeralds & (1 << i)) if (emeralds & (1 << i))
V_DrawScaledPatch(20 + (i * 20), 6, 0, emeraldpics[i]); V_DrawScaledPatch(20 + (i * 20), 6, 0, emeraldpics[0][i]);
} }
} }

View file

@ -63,8 +63,7 @@ extern patch_t *tallnum[10];
extern patch_t *nightsnum[10]; extern patch_t *nightsnum[10];
extern patch_t *lt_font[LT_FONTSIZE]; extern patch_t *lt_font[LT_FONTSIZE];
extern patch_t *cred_font[CRED_FONTSIZE]; extern patch_t *cred_font[CRED_FONTSIZE];
extern patch_t *emeraldpics[7]; extern patch_t *emeraldpics[3][7];
extern patch_t *tinyemeraldpics[7];
extern patch_t *rflagico; extern patch_t *rflagico;
extern patch_t *bflagico; extern patch_t *bflagico;
extern patch_t *rmatcico; extern patch_t *rmatcico;

View file

@ -680,7 +680,7 @@ state_t states[NUMSTATES] =
{SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY}, //S_OBJPLACE_DUMMY {SPR_NULL, 0, -1, {NULL}, 0, 0, S_OBJPLACE_DUMMY}, //S_OBJPLACE_DUMMY
// 1-Up box sprites (uses player sprite) // 1-Up box sprites (uses player sprite)
{SPR_PLAY, SPR2_LIFE, 2, {NULL}, 0, 16, S_PLAY_BOX2}, // S_PLAY_BOX1 {SPR_PLAY, SPR2_LIFE, 2, {NULL}, 0, 18, S_PLAY_BOX2}, // S_PLAY_BOX1
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_PLAY_BOX1}, // S_PLAY_BOX2 {SPR_NULL, 0, 1, {NULL}, 0, 0, S_PLAY_BOX1}, // S_PLAY_BOX2
{SPR_PLAY, SPR2_LIFE, 4, {NULL}, 0, 4, S_PLAY_ICON2}, // S_PLAY_ICON1 {SPR_PLAY, SPR2_LIFE, 4, {NULL}, 0, 4, S_PLAY_ICON2}, // S_PLAY_ICON1
{SPR_NULL, 0, 12, {NULL}, 0, 0, S_PLAY_ICON3}, // S_PLAY_ICON2 {SPR_NULL, 0, 12, {NULL}, 0, 0, S_PLAY_ICON3}, // S_PLAY_ICON2
@ -1727,9 +1727,10 @@ state_t states[NUMSTATES] =
{SPR_NULL, 0, 2, {A_SetRandomTics}, TICRATE/2, 3*TICRATE, S_CANNONLAUNCHER1}, // S_CANNONLAUNCHER3 {SPR_NULL, 0, 2, {A_SetRandomTics}, TICRATE/2, 3*TICRATE, S_CANNONLAUNCHER1}, // S_CANNONLAUNCHER3
// Monitor Miscellany // Monitor Miscellany
{SPR_NSPK, FF_TRANS40, 20, {NULL}, 0, 0, S_BOXSPARKLE2}, // S_BOXSPARKLE1 {SPR_NSPK, 0, 16, {NULL}, 0, 0, S_BOXSPARKLE2}, // S_BOXSPARKLE1
{SPR_NSPK, FF_TRANS60, 10, {NULL}, 0, 0, S_BOXSPARKLE3}, // S_BOXSPARKLE2 {SPR_NSPK, 1, 12, {NULL}, 0, 0, S_BOXSPARKLE3}, // S_BOXSPARKLE2
{SPR_NSPK, FF_TRANS80, 5, {NULL}, 0, 0, S_NULL}, // S_BOXSPARKLE3 {SPR_NSPK, 2, 8, {NULL}, 0, 0, S_BOXSPARKLE4}, // S_BOXSPARKLE3
{SPR_NSPK, 3, 4, {NULL}, 0, 0, S_NULL}, // S_BOXSPARKLE4
{SPR_MSTV, 0, 1, {NULL}, 0, 0, S_SPAWNSTATE}, // S_BOX_FLICKER {SPR_MSTV, 0, 1, {NULL}, 0, 0, S_SPAWNSTATE}, // S_BOX_FLICKER
{SPR_MSTV, 0, 4, {A_MonitorPop}, 0, 0, S_BOX_POP2}, // S_BOX_POP1 {SPR_MSTV, 0, 4, {A_MonitorPop}, 0, 0, S_BOX_POP2}, // S_BOX_POP1
@ -2214,39 +2215,71 @@ state_t states[NUMSTATES] =
{SPR_ARMA, FF_TRANS40|14, 2, {NULL}, 0, 0, S_ARMA16}, // S_ARMA15 {SPR_ARMA, FF_TRANS40|14, 2, {NULL}, 0, 0, S_ARMA16}, // S_ARMA15
{SPR_ARMA, FF_TRANS40|15, 2, {NULL}, 0, 0, S_ARMA1 }, // S_ARMA16 {SPR_ARMA, FF_TRANS40|15, 2, {NULL}, 0, 0, S_ARMA1 }, // S_ARMA16
{SPR_ARMF, FF_FULLBRIGHT , 3, {NULL}, 0, 0, S_ARMF2 }, // S_ARMF1 {SPR_ARMF, FF_FULLBRIGHT , 2, {NULL}, 0, 0, S_ARMF2 }, // S_ARMF1
{SPR_ARMF, FF_FULLBRIGHT| 1, 3, {NULL}, 0, 0, S_ARMF3 }, // S_ARMF2 {SPR_ARMF, FF_FULLBRIGHT| 1, 2, {NULL}, 0, 0, S_ARMF3 }, // S_ARMF2
{SPR_ARMF, FF_FULLBRIGHT| 2, 3, {NULL}, 0, 0, S_ARMF4 }, // S_ARMF3 {SPR_ARMF, FF_FULLBRIGHT| 2, 2, {NULL}, 0, 0, S_ARMF4 }, // S_ARMF3
{SPR_ARMF, FF_FULLBRIGHT| 3, 3, {NULL}, 0, 0, S_ARMF5 }, // S_ARMF4 {SPR_ARMF, FF_FULLBRIGHT| 3, 2, {NULL}, 0, 0, S_ARMF5 }, // S_ARMF4
{SPR_ARMF, FF_FULLBRIGHT| 4, 3, {NULL}, 0, 0, S_ARMF6 }, // S_ARMF5 {SPR_ARMF, FF_FULLBRIGHT| 4, 2, {NULL}, 0, 0, S_ARMF6 }, // S_ARMF5
{SPR_ARMF, FF_FULLBRIGHT| 5, 3, {NULL}, 0, 0, S_ARMF7 }, // S_ARMF6 {SPR_ARMF, FF_FULLBRIGHT| 5, 2, {NULL}, 0, 0, S_ARMF7 }, // S_ARMF6
{SPR_ARMF, FF_FULLBRIGHT| 6, 3, {NULL}, 0, 0, S_ARMF8 }, // S_ARMF7 {SPR_ARMF, FF_FULLBRIGHT| 6, 2, {NULL}, 0, 0, S_ARMF8 }, // S_ARMF7
{SPR_ARMF, FF_FULLBRIGHT| 7, 3, {NULL}, 0, 0, S_ARMF9 }, // S_ARMF8 {SPR_ARMF, FF_FULLBRIGHT| 7, 2, {NULL}, 0, 0, S_ARMF9 }, // S_ARMF8
{SPR_ARMF, FF_FULLBRIGHT| 8, 3, {NULL}, 0, 0, S_ARMF10}, // S_ARMF9 {SPR_ARMF, FF_FULLBRIGHT| 8, 2, {NULL}, 0, 0, S_ARMF10}, // S_ARMF9
{SPR_ARMF, FF_FULLBRIGHT| 9, 3, {NULL}, 0, 0, S_ARMF11}, // S_ARMF10 {SPR_ARMF, FF_FULLBRIGHT| 9, 2, {NULL}, 0, 0, S_ARMF11}, // S_ARMF10
{SPR_ARMF, FF_FULLBRIGHT|10, 3, {NULL}, 0, 0, S_ARMF12}, // S_ARMF11 {SPR_ARMF, FF_FULLBRIGHT|10, 2, {NULL}, 0, 0, S_ARMF12}, // S_ARMF11
{SPR_ARMF, FF_FULLBRIGHT|11, 3, {NULL}, 0, 0, S_ARMF13}, // S_ARMF12 {SPR_ARMF, FF_FULLBRIGHT|11, 2, {NULL}, 0, 0, S_ARMF13}, // S_ARMF12
{SPR_ARMF, FF_FULLBRIGHT|12, 3, {NULL}, 0, 0, S_ARMF14}, // S_ARMF13 {SPR_ARMF, FF_FULLBRIGHT|12, 2, {NULL}, 0, 0, S_ARMF14}, // S_ARMF13
{SPR_ARMF, FF_FULLBRIGHT|13, 3, {NULL}, 0, 0, S_ARMF15}, // S_ARMF14 {SPR_ARMF, FF_FULLBRIGHT|13, 2, {NULL}, 0, 0, S_ARMF15}, // S_ARMF14
{SPR_ARMF, FF_FULLBRIGHT|14, 3, {NULL}, 0, 0, S_ARMF16}, // S_ARMF15 {SPR_ARMF, FF_FULLBRIGHT|14, 2, {NULL}, 0, 0, S_ARMF16}, // S_ARMF15
{SPR_ARMF, FF_FULLBRIGHT|15, 3, {NULL}, 0, 0, S_ARMF1 }, // S_ARMF16 {SPR_ARMF, FF_FULLBRIGHT|15, 2, {NULL}, 0, 0, S_ARMF17}, // S_ARMF16
{SPR_ARMB, FF_FULLBRIGHT , 2, {NULL}, 0, 0, S_ARMF18}, // S_ARMF17
{SPR_ARMB, FF_FULLBRIGHT| 1, 2, {NULL}, 0, 0, S_ARMF19}, // S_ARMF18
{SPR_ARMB, FF_FULLBRIGHT| 2, 2, {NULL}, 0, 0, S_ARMF20}, // S_ARMF19
{SPR_ARMB, FF_FULLBRIGHT| 3, 2, {NULL}, 0, 0, S_ARMF21}, // S_ARMF20
{SPR_ARMB, FF_FULLBRIGHT| 4, 2, {NULL}, 0, 0, S_ARMF22}, // S_ARMF21
{SPR_ARMB, FF_FULLBRIGHT| 5, 2, {NULL}, 0, 0, S_ARMF23}, // S_ARMF22
{SPR_ARMB, FF_FULLBRIGHT| 6, 2, {NULL}, 0, 0, S_ARMF24}, // S_ARMF23
{SPR_ARMB, FF_FULLBRIGHT| 7, 2, {NULL}, 0, 0, S_ARMF25}, // S_ARMF24
{SPR_ARMB, FF_FULLBRIGHT| 8, 2, {NULL}, 0, 0, S_ARMF26}, // S_ARMF25
{SPR_ARMB, FF_FULLBRIGHT| 9, 2, {NULL}, 0, 0, S_ARMF27}, // S_ARMF26
{SPR_ARMB, FF_FULLBRIGHT|10, 2, {NULL}, 0, 0, S_ARMF28}, // S_ARMF27
{SPR_ARMB, FF_FULLBRIGHT|11, 2, {NULL}, 0, 0, S_ARMF29}, // S_ARMF28
{SPR_ARMB, FF_FULLBRIGHT|12, 2, {NULL}, 0, 0, S_ARMF30}, // S_ARMF29
{SPR_ARMB, FF_FULLBRIGHT|13, 2, {NULL}, 0, 0, S_ARMF31}, // S_ARMF30
{SPR_ARMB, FF_FULLBRIGHT|14, 2, {NULL}, 0, 0, S_ARMF32}, // S_ARMF31
{SPR_ARMB, FF_FULLBRIGHT|15, 2, {NULL}, 0, 0, S_ARMF1 }, // S_ARMF32
{SPR_ARMB, FF_FULLBRIGHT| 0, 3, {NULL}, 1, 0, S_ARMB2 }, // S_ARMB1 {SPR_ARMB, FF_FULLBRIGHT , 2, {NULL}, 1, 0, S_ARMB2 }, // S_ARMB1
{SPR_ARMB, FF_FULLBRIGHT| 1, 3, {NULL}, 1, 0, S_ARMB3 }, // S_ARMB2 {SPR_ARMB, FF_FULLBRIGHT| 1, 2, {NULL}, 1, 0, S_ARMB3 }, // S_ARMB2
{SPR_ARMB, FF_FULLBRIGHT| 2, 3, {NULL}, 1, 0, S_ARMB4 }, // S_ARMB3 {SPR_ARMB, FF_FULLBRIGHT| 2, 2, {NULL}, 1, 0, S_ARMB4 }, // S_ARMB3
{SPR_ARMB, FF_FULLBRIGHT| 3, 3, {NULL}, 1, 0, S_ARMB5 }, // S_ARMB4 {SPR_ARMB, FF_FULLBRIGHT| 3, 2, {NULL}, 1, 0, S_ARMB5 }, // S_ARMB4
{SPR_ARMB, FF_FULLBRIGHT| 4, 3, {NULL}, 1, 0, S_ARMB6 }, // S_ARMB5 {SPR_ARMB, FF_FULLBRIGHT| 4, 2, {NULL}, 1, 0, S_ARMB6 }, // S_ARMB5
{SPR_ARMB, FF_FULLBRIGHT| 5, 3, {NULL}, 1, 0, S_ARMB7 }, // S_ARMB6 {SPR_ARMB, FF_FULLBRIGHT| 5, 2, {NULL}, 1, 0, S_ARMB7 }, // S_ARMB6
{SPR_ARMB, FF_FULLBRIGHT| 6, 3, {NULL}, 1, 0, S_ARMB8 }, // S_ARMB7 {SPR_ARMB, FF_FULLBRIGHT| 6, 2, {NULL}, 1, 0, S_ARMB8 }, // S_ARMB7
{SPR_ARMB, FF_FULLBRIGHT| 7, 3, {NULL}, 1, 0, S_ARMB9 }, // S_ARMB8 {SPR_ARMB, FF_FULLBRIGHT| 7, 2, {NULL}, 1, 0, S_ARMB9 }, // S_ARMB8
{SPR_ARMB, FF_FULLBRIGHT| 8, 3, {NULL}, 1, 0, S_ARMB10}, // S_ARMB9 {SPR_ARMB, FF_FULLBRIGHT| 8, 2, {NULL}, 1, 0, S_ARMB10}, // S_ARMB9
{SPR_ARMB, FF_FULLBRIGHT| 9, 3, {NULL}, 1, 0, S_ARMB11}, // S_ARMB10 {SPR_ARMB, FF_FULLBRIGHT| 9, 2, {NULL}, 1, 0, S_ARMB11}, // S_ARMB10
{SPR_ARMB, FF_FULLBRIGHT|10, 3, {NULL}, 1, 0, S_ARMB12}, // S_ARMB11 {SPR_ARMB, FF_FULLBRIGHT|10, 2, {NULL}, 1, 0, S_ARMB12}, // S_ARMB11
{SPR_ARMB, FF_FULLBRIGHT|11, 3, {NULL}, 1, 0, S_ARMB13}, // S_ARMB12 {SPR_ARMB, FF_FULLBRIGHT|11, 2, {NULL}, 1, 0, S_ARMB13}, // S_ARMB12
{SPR_ARMB, FF_FULLBRIGHT|12, 3, {NULL}, 1, 0, S_ARMB14}, // S_ARMB13 {SPR_ARMB, FF_FULLBRIGHT|12, 2, {NULL}, 1, 0, S_ARMB14}, // S_ARMB13
{SPR_ARMB, FF_FULLBRIGHT|13, 3, {NULL}, 1, 0, S_ARMB15}, // S_ARMB14 {SPR_ARMB, FF_FULLBRIGHT|13, 2, {NULL}, 1, 0, S_ARMB15}, // S_ARMB14
{SPR_ARMB, FF_FULLBRIGHT|14, 3, {NULL}, 1, 0, S_ARMB16}, // S_ARMB15 {SPR_ARMB, FF_FULLBRIGHT|14, 2, {NULL}, 1, 0, S_ARMB16}, // S_ARMB15
{SPR_ARMB, FF_FULLBRIGHT|15, 3, {NULL}, 1, 0, S_ARMB1 }, // S_ARMB16 {SPR_ARMB, FF_FULLBRIGHT|15, 2, {NULL}, 1, 0, S_ARMB17}, // S_ARMB16
{SPR_ARMF, FF_FULLBRIGHT , 2, {NULL}, 1, 0, S_ARMB18}, // S_ARMB17
{SPR_ARMF, FF_FULLBRIGHT| 1, 2, {NULL}, 1, 0, S_ARMB19}, // S_ARMB18
{SPR_ARMF, FF_FULLBRIGHT| 2, 2, {NULL}, 1, 0, S_ARMB20}, // S_ARMB19
{SPR_ARMF, FF_FULLBRIGHT| 3, 2, {NULL}, 1, 0, S_ARMB21}, // S_ARMB20
{SPR_ARMF, FF_FULLBRIGHT| 4, 2, {NULL}, 1, 0, S_ARMB22}, // S_ARMB21
{SPR_ARMF, FF_FULLBRIGHT| 5, 2, {NULL}, 1, 0, S_ARMB23}, // S_ARMB22
{SPR_ARMF, FF_FULLBRIGHT| 6, 2, {NULL}, 1, 0, S_ARMB24}, // S_ARMB23
{SPR_ARMF, FF_FULLBRIGHT| 7, 2, {NULL}, 1, 0, S_ARMB25}, // S_ARMB24
{SPR_ARMF, FF_FULLBRIGHT| 8, 2, {NULL}, 1, 0, S_ARMB26}, // S_ARMB25
{SPR_ARMF, FF_FULLBRIGHT| 9, 2, {NULL}, 1, 0, S_ARMB27}, // S_ARMB26
{SPR_ARMF, FF_FULLBRIGHT|10, 2, {NULL}, 1, 0, S_ARMB28}, // S_ARMB27
{SPR_ARMF, FF_FULLBRIGHT|11, 2, {NULL}, 1, 0, S_ARMB29}, // S_ARMB28
{SPR_ARMF, FF_FULLBRIGHT|12, 2, {NULL}, 1, 0, S_ARMB30}, // S_ARMB29
{SPR_ARMF, FF_FULLBRIGHT|13, 2, {NULL}, 1, 0, S_ARMB31}, // S_ARMB30
{SPR_ARMF, FF_FULLBRIGHT|14, 2, {NULL}, 1, 0, S_ARMB32}, // S_ARMB31
{SPR_ARMF, FF_FULLBRIGHT|15, 2, {NULL}, 1, 0, S_ARMB1 }, // S_ARMB32
{SPR_WIND, FF_TRANS70 , 2, {NULL}, 0, 0, S_WIND2}, // S_WIND1 {SPR_WIND, FF_TRANS70 , 2, {NULL}, 0, 0, S_WIND2}, // S_WIND1
{SPR_WIND, FF_TRANS70|1, 2, {NULL}, 0, 0, S_WIND3}, // S_WIND2 {SPR_WIND, FF_TRANS70|1, 2, {NULL}, 0, 0, S_WIND3}, // S_WIND2
@ -2735,8 +2768,6 @@ state_t states[NUMSTATES] =
// CTF Sign // CTF Sign
{SPR_GFLG, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_GOTFLAG {SPR_GFLG, FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_GOTFLAG
{SPR_GFLG, 1|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_GOTREDFLAG
{SPR_GFLG, 2|FF_FULLBRIGHT, 2, {NULL}, 0, 0, S_NULL}, // S_GOTBLUEFLAG
{SPR_CORK, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CORK {SPR_CORK, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CORK
@ -3121,11 +3152,15 @@ state_t states[NUMSTATES] =
{SPR_SPRK, FF_TRANS90|3, 1, {NULL}, 0, 0, S_NULL}, // S_SPRK16 {SPR_SPRK, FF_TRANS90|3, 1, {NULL}, 0, 0, S_NULL}, // S_SPRK16
// Robot Explosion // Robot Explosion
{SPR_BOM1, 0, 0, {A_FlickySpawn}, 0, 0, S_XPLD1}, // S_XPLD_FLICKY {SPR_BOM1, 0, 0, {A_FlickySpawn}, 0, 0, S_XPLD1}, // S_XPLD_FLICKY
{SPR_BOM1, 0, 1, {A_Scream}, 0, 0, S_XPLD2}, // S_XPLD1 {SPR_BOM1, 0, 2, {A_Scream}, 0, 0, S_XPLD2}, // S_XPLD1
{SPR_BOM1, FF_ANIMATE|1, 15, {NULL}, 2, 5, S_NULL}, // S_XPLD2 {SPR_BOM1, 1, 2, {NULL}, 0, 0, S_XPLD3}, // S_XPLD2
{SPR_BOM1, 2, 3, {NULL}, 0, 0, S_XPLD4}, // S_XPLD3
{SPR_BOM1, 3, 3, {NULL}, 0, 0, S_XPLD5}, // S_XPLD4
{SPR_BOM1, 4, 4, {NULL}, 0, 0, S_XPLD6}, // S_XPLD5
{SPR_BOM1, 5, 4, {NULL}, 0, 0, S_NULL}, // S_XPLD6
{SPR_BOM1, FF_ANIMATE, 20, {NULL}, 3, 5, S_INVISIBLE}, // S_XPLD_EGGTRAP {SPR_BOM1, FF_ANIMATE, 21, {NULL}, 5, 4, S_INVISIBLE}, // S_XPLD_EGGTRAP
// Underwater Explosion // Underwater Explosion
{SPR_BOM4, 0, 3, {A_Scream}, 0, 0, S_WPLD2}, // S_WPLD1 {SPR_BOM4, 0, 3, {A_Scream}, 0, 0, S_WPLD2}, // S_WPLD1
@ -6386,8 +6421,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_RING_ICON, // damage MT_RING_ICON, // damage
@ -6413,8 +6448,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_PITY_ICON, // damage MT_PITY_ICON, // damage
@ -6440,8 +6475,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_ATTRACT_ICON,// damage MT_ATTRACT_ICON,// damage
@ -6467,8 +6502,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_FORCE_ICON, // damage MT_FORCE_ICON, // damage
@ -6494,8 +6529,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_ARMAGEDDON_ICON, // damage MT_ARMAGEDDON_ICON, // damage
@ -6521,8 +6556,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_WHIRLWIND_ICON, // damage MT_WHIRLWIND_ICON, // damage
@ -6548,8 +6583,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_ELEMENTAL_ICON, // damage MT_ELEMENTAL_ICON, // damage
@ -6575,8 +6610,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_SNEAKERS_ICON, // damage MT_SNEAKERS_ICON, // damage
@ -6602,8 +6637,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_INVULN_ICON, // damage MT_INVULN_ICON, // damage
@ -6629,8 +6664,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_1UP_ICON, // damage MT_1UP_ICON, // damage
@ -6656,8 +6691,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_EGGMAN_ICON, // damage MT_EGGMAN_ICON, // damage
@ -6683,8 +6718,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_MIXUP_ICON, // damage MT_MIXUP_ICON, // damage
@ -6710,8 +6745,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_UNKNOWN, // damage MT_UNKNOWN, // damage
@ -6737,8 +6772,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_GRAVITY_ICON, // damage MT_GRAVITY_ICON, // damage
@ -6764,8 +6799,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_RECYCLER_ICON, // damage MT_RECYCLER_ICON, // damage
@ -6791,8 +6826,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_SCORE1K_ICON, // damage MT_SCORE1K_ICON, // damage
@ -6818,8 +6853,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_SCORE10K_ICON, // damage MT_SCORE10K_ICON, // damage
@ -6845,8 +6880,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_FLAMEAURA_ICON, // damage MT_FLAMEAURA_ICON, // damage
@ -6872,8 +6907,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_BUBBLEWRAP_ICON, // damage MT_BUBBLEWRAP_ICON, // damage
@ -6899,8 +6934,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
1, // speed 1, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_THUNDERCOIN_ICON, // damage MT_THUNDERCOIN_ICON, // damage
@ -6926,8 +6961,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_PITY_ICON, // damage MT_PITY_ICON, // damage
@ -6953,8 +6988,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_ATTRACT_ICON,// damage MT_ATTRACT_ICON,// damage
@ -6980,8 +7015,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_FORCE_ICON, // damage MT_FORCE_ICON, // damage
@ -7007,8 +7042,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_ARMAGEDDON_ICON, // damage MT_ARMAGEDDON_ICON, // damage
@ -7034,8 +7069,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_WHIRLWIND_ICON, // damage MT_WHIRLWIND_ICON, // damage
@ -7061,8 +7096,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_ELEMENTAL_ICON, // damage MT_ELEMENTAL_ICON, // damage
@ -7088,8 +7123,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_SNEAKERS_ICON, // damage MT_SNEAKERS_ICON, // damage
@ -7115,8 +7150,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_INVULN_ICON, // damage MT_INVULN_ICON, // damage
@ -7142,8 +7177,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_EGGMAN_ICON, // damage MT_EGGMAN_ICON, // damage
@ -7169,8 +7204,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_GRAVITY_ICON, // damage MT_GRAVITY_ICON, // damage
@ -7196,8 +7231,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_FLAMEAURA_ICON, // damage MT_FLAMEAURA_ICON, // damage
@ -7223,8 +7258,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_BUBBLEWRAP_ICON, // damage MT_BUBBLEWRAP_ICON, // damage
@ -7250,8 +7285,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 20*FRACUNIT, // radius
36*FRACUNIT, // height 44*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_THUNDERCOIN_ICON, // damage MT_THUNDERCOIN_ICON, // damage
@ -7277,8 +7312,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_RING_ICON, // damage MT_RING_ICON, // damage
@ -7304,8 +7339,8 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // xdeathstate S_NULL, // xdeathstate
sfx_pop, // deathsound sfx_pop, // deathsound
0, // speed 0, // speed
16*FRACUNIT, // radius 18*FRACUNIT, // radius
32*FRACUNIT, // height 40*FRACUNIT, // height
0, // display offset 0, // display offset
100, // mass 100, // mass
MT_RING_ICON, // damage MT_RING_ICON, // damage

View file

@ -1834,6 +1834,7 @@ typedef enum state
S_BOXSPARKLE1, S_BOXSPARKLE1,
S_BOXSPARKLE2, S_BOXSPARKLE2,
S_BOXSPARKLE3, S_BOXSPARKLE3,
S_BOXSPARKLE4,
S_BOX_FLICKER, S_BOX_FLICKER,
S_BOX_POP1, S_BOX_POP1,
@ -2329,6 +2330,22 @@ typedef enum state
S_ARMF14, S_ARMF14,
S_ARMF15, S_ARMF15,
S_ARMF16, S_ARMF16,
S_ARMF17,
S_ARMF18,
S_ARMF19,
S_ARMF20,
S_ARMF21,
S_ARMF22,
S_ARMF23,
S_ARMF24,
S_ARMF25,
S_ARMF26,
S_ARMF27,
S_ARMF28,
S_ARMF29,
S_ARMF30,
S_ARMF31,
S_ARMF32,
S_ARMB1, S_ARMB1,
S_ARMB2, S_ARMB2,
@ -2346,6 +2363,22 @@ typedef enum state
S_ARMB14, S_ARMB14,
S_ARMB15, S_ARMB15,
S_ARMB16, S_ARMB16,
S_ARMB17,
S_ARMB18,
S_ARMB19,
S_ARMB20,
S_ARMB21,
S_ARMB22,
S_ARMB23,
S_ARMB24,
S_ARMB25,
S_ARMB26,
S_ARMB27,
S_ARMB28,
S_ARMB29,
S_ARMB30,
S_ARMB31,
S_ARMB32,
S_WIND1, S_WIND1,
S_WIND2, S_WIND2,
@ -2826,8 +2859,6 @@ typedef enum state
// Got Flag Sign // Got Flag Sign
S_GOTFLAG, S_GOTFLAG,
S_GOTREDFLAG,
S_GOTBLUEFLAG,
S_CORK, S_CORK,
@ -3167,6 +3198,10 @@ typedef enum state
S_XPLD_FLICKY, S_XPLD_FLICKY,
S_XPLD1, S_XPLD1,
S_XPLD2, S_XPLD2,
S_XPLD3,
S_XPLD4,
S_XPLD5,
S_XPLD6,
S_XPLD_EGGTRAP, S_XPLD_EGGTRAP,
// Underwater Explosion // Underwater Explosion

View file

@ -214,15 +214,7 @@ static int lib_pRandomRange(lua_State *L)
return 1; return 1;
} }
// Deprecated, macros, etc. // Macros.
static int lib_pRandom(lua_State *L)
{
NOHUD
LUA_Deprecated(L, "P_Random", "P_RandomByte");
lua_pushinteger(L, P_RandomByte());
return 1;
}
static int lib_pSignedRandom(lua_State *L) static int lib_pSignedRandom(lua_State *L)
{ {
NOHUD NOHUD
@ -2481,7 +2473,6 @@ static luaL_Reg lib[] = {
{"P_RandomByte",lib_pRandomByte}, {"P_RandomByte",lib_pRandomByte},
{"P_RandomKey",lib_pRandomKey}, {"P_RandomKey",lib_pRandomKey},
{"P_RandomRange",lib_pRandomRange}, {"P_RandomRange",lib_pRandomRange},
{"P_Random",lib_pRandom}, // DEPRECATED
{"P_SignedRandom",lib_pSignedRandom}, // MACRO {"P_SignedRandom",lib_pSignedRandom}, // MACRO
{"P_RandomChance",lib_pRandomChance}, // MACRO {"P_RandomChance",lib_pRandomChance}, // MACRO

View file

@ -20,6 +20,7 @@
#include "i_video.h" // rendermode #include "i_video.h" // rendermode
#include "p_local.h" // camera_t #include "p_local.h" // camera_t
#include "screen.h" // screen width/height #include "screen.h" // screen width/height
#include "m_random.h" // m_random
#include "v_video.h" #include "v_video.h"
#include "w_wad.h" #include "w_wad.h"
#include "z_zone.h" #include "z_zone.h"
@ -63,12 +64,14 @@ static const char *const hud_disable_options[] = {
enum hudinfo { enum hudinfo {
hudinfo_x = 0, hudinfo_x = 0,
hudinfo_y hudinfo_y,
hudinfo_f
}; };
static const char *const hudinfo_opt[] = { static const char *const hudinfo_opt[] = {
"x", "x",
"y", "y",
"f",
NULL}; NULL};
enum patch { enum patch {
@ -198,6 +201,9 @@ static int hudinfo_get(lua_State *L)
case hudinfo_y: case hudinfo_y:
lua_pushinteger(L, info->y); lua_pushinteger(L, info->y);
break; break;
case hudinfo_f:
lua_pushinteger(L, info->f);
break;
} }
return 1; return 1;
} }
@ -216,6 +222,9 @@ static int hudinfo_set(lua_State *L)
case hudinfo_y: case hudinfo_y:
info->y = (INT32)luaL_checkinteger(L, 3); info->y = (INT32)luaL_checkinteger(L, 3);
break; break;
case hudinfo_f:
info->f = (INT32)luaL_checkinteger(L, 3);
break;
} }
return 0; return 0;
} }
@ -679,6 +688,30 @@ static int libd_getColormap(lua_State *L)
return 1; return 1;
} }
static int libd_fadeScreen(lua_State *L)
{
UINT16 color = luaL_checkinteger(L, 1);
UINT8 strength = luaL_checkinteger(L, 2);
const UINT8 maxstrength = ((color & 0xFF00) ? 32 : 10);
HUDONLY
if (!strength)
return 0;
if (strength > maxstrength)
return luaL_error(L, "%s fade strength %d out of range (0 - %d)", ((color & 0xFF00) ? "COLORMAP" : "TRANSMAP"), strength, maxstrength);
if (strength == maxstrength) // Allow as a shortcut for drawfill...
{
V_DrawFill(0, 0, BASEVIDWIDTH, BASEVIDHEIGHT, ((color & 0xFF00) ? 31 : color));
return 0;
}
V_DrawFadeScreen(color, strength);
return 0;
}
static int libd_width(lua_State *L) static int libd_width(lua_State *L)
{ {
HUDONLY HUDONLY
@ -720,19 +753,92 @@ static int libd_renderer(lua_State *L)
return 1; return 1;
} }
// M_RANDOM
//////////////
static int libd_RandomFixed(lua_State *L)
{
HUDONLY
lua_pushfixed(L, M_RandomFixed());
return 1;
}
static int libd_RandomByte(lua_State *L)
{
HUDONLY
lua_pushinteger(L, M_RandomByte());
return 1;
}
static int libd_RandomKey(lua_State *L)
{
INT32 a = (INT32)luaL_checkinteger(L, 1);
HUDONLY
if (a > 65536)
LUA_UsageWarning(L, "v.RandomKey: range > 65536 is undefined behavior");
lua_pushinteger(L, M_RandomKey(a));
return 1;
}
static int libd_RandomRange(lua_State *L)
{
INT32 a = (INT32)luaL_checkinteger(L, 1);
INT32 b = (INT32)luaL_checkinteger(L, 2);
HUDONLY
if (b < a) {
INT32 c = a;
a = b;
b = c;
}
if ((b-a+1) > 65536)
LUA_UsageWarning(L, "v.RandomRange: range > 65536 is undefined behavior");
lua_pushinteger(L, M_RandomRange(a, b));
return 1;
}
// Macros.
static int libd_SignedRandom(lua_State *L)
{
HUDONLY
lua_pushinteger(L, M_SignedRandom());
return 1;
}
static int libd_RandomChance(lua_State *L)
{
fixed_t p = luaL_checkfixed(L, 1);
HUDONLY
lua_pushboolean(L, M_RandomChance(p));
return 1;
}
static luaL_Reg lib_draw[] = { static luaL_Reg lib_draw[] = {
// cache
{"patchExists", libd_patchExists}, {"patchExists", libd_patchExists},
{"cachePatch", libd_cachePatch}, {"cachePatch", libd_cachePatch},
{"getSpritePatch", libd_getSpritePatch}, {"getSpritePatch", libd_getSpritePatch},
{"getSprite2Patch", libd_getSprite2Patch}, {"getSprite2Patch", libd_getSprite2Patch},
{"getColormap", libd_getColormap},
// drawing
{"draw", libd_draw}, {"draw", libd_draw},
{"drawScaled", libd_drawScaled}, {"drawScaled", libd_drawScaled},
{"drawNum", libd_drawNum}, {"drawNum", libd_drawNum},
{"drawPaddedNum", libd_drawPaddedNum}, {"drawPaddedNum", libd_drawPaddedNum},
{"drawFill", libd_drawFill}, {"drawFill", libd_drawFill},
{"drawString", libd_drawString}, {"drawString", libd_drawString},
{"fadeScreen", libd_fadeScreen},
// misc
{"stringWidth", libd_stringWidth}, {"stringWidth", libd_stringWidth},
{"getColormap", libd_getColormap}, // m_random
{"RandomFixed",libd_RandomFixed},
{"RandomByte",libd_RandomByte},
{"RandomKey",libd_RandomKey},
{"RandomRange",libd_RandomRange},
{"SignedRandom",libd_SignedRandom}, // MACRO
{"RandomChance",libd_RandomChance}, // MACRO
// properties
{"width", libd_width}, {"width", libd_width},
{"height", libd_height}, {"height", libd_height},
{"dupx", libd_dupx}, {"dupx", libd_dupx},

View file

@ -1266,7 +1266,7 @@ void Command_ObjectPlace_f(void)
if (!COM_CheckParm("-silent")) if (!COM_CheckParm("-silent"))
{ {
HU_SetCEchoFlags(V_RETURN8|V_MONOSPACE); HU_SetCEchoFlags(V_RETURN8|V_MONOSPACE|V_AUTOFADEOUT);
HU_SetCEchoDuration(10); HU_SetCEchoDuration(10);
HU_DoCEcho(va(M_GetText( HU_DoCEcho(va(M_GetText(
"\\\\\\\\\\\\\\\\\\\\\\\\\x82" "\\\\\\\\\\\\\\\\\\\\\\\\\x82"

View file

@ -1188,7 +1188,7 @@ static menuitem_t OP_VideoOptionsMenu[] =
#endif #endif
{IT_HEADER, NULL, "Color Profile", NULL, 30}, {IT_HEADER, NULL, "Color Profile", NULL, 30},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Brightness (F11)", &cv_globalgamma, 36}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Brightness (F11)", &cv_globalgamma,36},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saturation", &cv_globalsaturation, 41}, {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Saturation", &cv_globalsaturation, 41},
{IT_SUBMENU|IT_STRING, NULL, "Advanced Settings...", &OP_ColorOptionsDef, 46}, {IT_SUBMENU|IT_STRING, NULL, "Advanced Settings...", &OP_ColorOptionsDef, 46},
@ -1196,24 +1196,25 @@ static menuitem_t OP_VideoOptionsMenu[] =
{IT_STRING | IT_CVAR, NULL, "Show HUD", &cv_showhud, 61}, {IT_STRING | IT_CVAR, NULL, "Show HUD", &cv_showhud, 61},
{IT_STRING | IT_CVAR | IT_CV_SLIDER, {IT_STRING | IT_CVAR | IT_CV_SLIDER,
NULL, "HUD Transparency", &cv_translucenthud, 66}, NULL, "HUD Transparency", &cv_translucenthud, 66},
{IT_STRING | IT_CVAR, NULL, "Time Display", &cv_timetic, 71}, {IT_STRING | IT_CVAR, NULL, "Score/Time/Rings", &cv_timetic, 71},
{IT_STRING | IT_CVAR, NULL, "Show Powerups", &cv_powerupdisplay, 76},
#ifdef SEENAMES #ifdef SEENAMES
{IT_STRING | IT_CVAR, NULL, "Show player names", &cv_seenames, 76}, {IT_STRING | IT_CVAR, NULL, "Show player names", &cv_seenames, 81},
#endif #endif
{IT_HEADER, NULL, "Console", NULL, 85}, {IT_HEADER, NULL, "Console", NULL, 90},
{IT_STRING | IT_CVAR, NULL, "Background color", &cons_backcolor, 91}, {IT_STRING | IT_CVAR, NULL, "Background color", &cons_backcolor, 96},
{IT_STRING | IT_CVAR, NULL, "Text Size", &cv_constextsize, 96}, {IT_STRING | IT_CVAR, NULL, "Text Size", &cv_constextsize, 101},
{IT_HEADER, NULL, "Level", NULL, 105}, {IT_HEADER, NULL, "Level", NULL, 110},
{IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 111}, {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 116},
{IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist.", &cv_drawdist_nights, 116}, {IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist.", &cv_drawdist_nights, 121},
{IT_STRING | IT_CVAR, NULL, "Weather Draw Dist.", &cv_drawdist_precip, 121}, {IT_STRING | IT_CVAR, NULL, "Weather Draw Dist.", &cv_drawdist_precip, 126},
{IT_STRING | IT_CVAR, NULL, "Weather Density", &cv_precipdensity, 126}, {IT_STRING | IT_CVAR, NULL, "Weather Density", &cv_precipdensity, 131},
{IT_HEADER, NULL, "Diagnostic", NULL, 135}, {IT_HEADER, NULL, "Diagnostic", NULL, 140},
{IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 141}, {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 146},
{IT_STRING | IT_CVAR, NULL, "Clear Before Redraw", &cv_homremoval, 146}, {IT_STRING | IT_CVAR, NULL, "Clear Before Redraw", &cv_homremoval, 151},
}; };
static menuitem_t OP_VideoModeMenu[] = static menuitem_t OP_VideoModeMenu[] =
@ -2049,35 +2050,7 @@ static void Newgametype_OnChange(void)
P_AllocMapHeader((INT16)(cv_nextmap.value-1)); P_AllocMapHeader((INT16)(cv_nextmap.value-1));
if (!M_CanShowLevelOnPlatter(cv_nextmap.value-1, cv_newgametype.value)) if (!M_CanShowLevelOnPlatter(cv_nextmap.value-1, cv_newgametype.value))
{ CV_SetValue(&cv_nextmap, M_GetFirstLevelInList(cv_newgametype.value));
INT32 value = 0;
switch (cv_newgametype.value)
{
case GT_COOP:
value = TOL_COOP;
break;
case GT_COMPETITION:
value = TOL_COMPETITION;
break;
case GT_RACE:
value = TOL_RACE;
break;
case GT_MATCH:
case GT_TEAMMATCH:
value = TOL_MATCH;
break;
case GT_TAG:
case GT_HIDEANDSEEK:
value = TOL_TAG;
break;
case GT_CTF:
value = TOL_CTF;
break;
}
CV_SetValue(&cv_nextmap, M_GetFirstLevelInList(value));
}
} }
} }
@ -2611,7 +2584,7 @@ void M_Drawer(void)
{ {
// now that's more readable with a faded background (yeah like Quake...) // now that's more readable with a faded background (yeah like Quake...)
if (!WipeInAction) if (!WipeInAction)
V_DrawFadeScreen(); V_DrawFadeScreen(0xFF00, 16);
if (currentMenu->drawroutine) if (currentMenu->drawroutine)
currentMenu->drawroutine(); // call current menu Draw routine currentMenu->drawroutine(); // call current menu Draw routine
@ -4453,14 +4426,14 @@ static void M_DrawLevelPlatterMenu(void)
V_DrawPatchFill(W_CachePatchName("SRB2BACK", PU_CACHE)); V_DrawPatchFill(W_CachePatchName("SRB2BACK", PU_CACHE));
// finds row at top of the screen // finds row at top of the screen
while (y > 0) while (y > -8)
{ {
iter = ((iter == 0) ? levelselect.numrows-1 : iter-1); iter = ((iter == 0) ? levelselect.numrows-1 : iter-1);
y -= lsvseperation(iter); y -= lsvseperation(iter);
} }
// draw from top to bottom // draw from top to bottom
while (y < 200) while (y < (vid.height/vid.dupy))
{ {
M_DrawLevelPlatterRow(iter, y); M_DrawLevelPlatterRow(iter, y);
y += lsvseperation(iter); y += lsvseperation(iter);
@ -5710,7 +5683,7 @@ static void M_DrawChecklist(void)
beat = va("Get %d points in %s", cond[condnum].requirement, level); beat = va("Get %d points in %s", cond[condnum].requirement, level);
break; break;
case UC_MAPTIME: case UC_MAPTIME:
beat = va("Beat %s in %d:%d.%d", level, beat = va("Beat %s in %d:%02d.%02d", level,
G_TicsToMinutes(cond[condnum].requirement, true), G_TicsToMinutes(cond[condnum].requirement, true),
G_TicsToSeconds(cond[condnum].requirement), G_TicsToSeconds(cond[condnum].requirement),
G_TicsToCentiseconds(cond[condnum].requirement)); G_TicsToCentiseconds(cond[condnum].requirement));
@ -5735,7 +5708,7 @@ static void M_DrawChecklist(void)
beat = va("Get %d points over all maps", cond[condnum].requirement); beat = va("Get %d points over all maps", cond[condnum].requirement);
break; break;
case UC_OVERALLTIME: case UC_OVERALLTIME:
beat = va("Get a total time of less than %d:%d.%d", beat = va("Get a total time of less than %d:%02d.%02d",
G_TicsToMinutes(cond[condnum].requirement, true), G_TicsToMinutes(cond[condnum].requirement, true),
G_TicsToSeconds(cond[condnum].requirement), G_TicsToSeconds(cond[condnum].requirement),
G_TicsToCentiseconds(cond[condnum].requirement)); G_TicsToCentiseconds(cond[condnum].requirement));
@ -5783,12 +5756,12 @@ static void M_DrawChecklist(void)
break; break;
case UC_NIGHTSTIME: case UC_NIGHTSTIME:
if (cond[condnum].extrainfo2) if (cond[condnum].extrainfo2)
beat = va("Beat %s, mare %d in %d:%d.%d", level, cond[condnum].extrainfo2, beat = va("Beat %s, mare %d in %d:%02d.%02d", level, cond[condnum].extrainfo2,
G_TicsToMinutes(cond[condnum].requirement, true), G_TicsToMinutes(cond[condnum].requirement, true),
G_TicsToSeconds(cond[condnum].requirement), G_TicsToSeconds(cond[condnum].requirement),
G_TicsToCentiseconds(cond[condnum].requirement)); G_TicsToCentiseconds(cond[condnum].requirement));
else else
beat = va("Beat %s in %d:%d.%d", beat = va("Beat %s in %d:%02d.%02d",
level, level,
G_TicsToMinutes(cond[condnum].requirement, true), G_TicsToMinutes(cond[condnum].requirement, true),
G_TicsToSeconds(cond[condnum].requirement), G_TicsToSeconds(cond[condnum].requirement),
@ -6193,7 +6166,7 @@ static void M_DrawLoadGameData(void)
{ {
V_DrawSmallScaledPatch(x+2, y+64, 0, savselp[5]); V_DrawSmallScaledPatch(x+2, y+64, 0, savselp[5]);
} }
#ifndef PERFECTSAVE // disabled, don't touch #ifdef PERFECTSAVE // disabled on request
else if ((savegameinfo[savetodraw].skinnum == 1) else if ((savegameinfo[savetodraw].skinnum == 1)
&& (savegameinfo[savetodraw].lives == 99) && (savegameinfo[savetodraw].lives == 99)
&& (savegameinfo[savetodraw].gamemap & 8192) && (savegameinfo[savetodraw].gamemap & 8192)
@ -6281,7 +6254,7 @@ static void M_DrawLoadGameData(void)
for (j = 0; j < 7; ++j) for (j = 0; j < 7; ++j)
{ {
if (savegameinfo[savetodraw].numemeralds & (1 << j)) if (savegameinfo[savetodraw].numemeralds & (1 << j))
V_DrawScaledPatch(workx, y, 0, tinyemeraldpics[j]); V_DrawScaledPatch(workx, y, 0, emeraldpics[1][j]);
workx += 10; workx += 10;
} }
} }

View file

@ -3243,14 +3243,7 @@ void A_ExtraLife(mobj_t *actor)
return; return;
} }
// In shooter gametypes, give the player 100 rings instead of an extra life. P_GiveCoopLives(player, 1, true);
if (gametype != GT_COOP && gametype != GT_COMPETITION)
{
P_GivePlayerRings(player, 100);
P_PlayLivesJingle(player);
}
else
P_GiveCoopLives(player, 1, true);
} }
// Function: A_GiveShield // Function: A_GiveShield

View file

@ -577,25 +577,27 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
case MT_TOKEN: case MT_TOKEN:
if (player->bot) if (player->bot)
return; return;
tokenlist += special->health;
P_AddPlayerScore(player, 1000); P_AddPlayerScore(player, 1000);
if (!modeattacking) // score only there... if (gametype != GT_COOP || modeattacking) // score only?
break;
tokenlist += special->health;
if (ALL7EMERALDS(emeralds)) // Got all 7
{ {
if (ALL7EMERALDS(emeralds)) // Got all 7 if (!(netgame || multiplayer))
{ {
if (!(netgame || multiplayer)) player->continues += 1;
{ players->gotcontinue = true;
player->continues += 1; if (P_IsLocalPlayer(player))
players->gotcontinue = true; S_StartSound(NULL, sfx_s3kac);
if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_s3kac);
}
} }
else
token++;
} }
else
token++;
break; break;
// Emerald Hunt // Emerald Hunt
@ -3365,8 +3367,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
P_KillPlayer(player, source, damage); P_KillPlayer(player, source, damage);
} }
P_HitDeathMessages(player, inflictor, source, damagetype);
P_ForceFeed(player, 40, 10, TICRATE, 40 + min(damage, 100)*2); P_ForceFeed(player, 40, 10, TICRATE, 40 + min(damage, 100)*2);
} }
@ -3381,6 +3381,9 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
else else
target->health -= damage; target->health -= damage;
if (player)
P_HitDeathMessages(player, inflictor, source, damagetype);
if (source && source->player && target) if (source && source->player && target)
G_GhostAddHit(target); G_GhostAddHit(target);

View file

@ -9539,7 +9539,7 @@ void P_SpawnMapThing(mapthing_t *mthing)
// They're likely facets of the level's design and therefore required to progress. // They're likely facets of the level's design and therefore required to progress.
} }
if (i == MT_TOKEN && (gametype != GT_COOP || ultimatemode || tokenbits == 30 || tokenlist & (1 << tokenbits++))) if (i == MT_TOKEN && ((gametype != GT_COOP && gametype != GT_COMPETITION) || ultimatemode || tokenbits == 30 || tokenlist & (1 << tokenbits++)))
return; // you already got this token, or there are too many, or the gametype's not right return; // you already got this token, or there are too many, or the gametype's not right
// Objectplace landing point // Objectplace landing point

View file

@ -31,6 +31,7 @@
#include "p_polyobj.h" #include "p_polyobj.h"
#include "p_slopes.h" #include "p_slopes.h"
#include "hu_stuff.h" #include "hu_stuff.h"
#include "v_video.h" // V_AUTOFADEOUT|V_ALLOWLOWERCASE
#include "m_misc.h" #include "m_misc.h"
#include "m_cond.h" //unlock triggers #include "m_cond.h" //unlock triggers
#include "lua_hook.h" // LUAh_LinedefExecute #include "lua_hook.h" // LUAh_LinedefExecute
@ -3815,9 +3816,9 @@ DoneSection2:
if (!P_IsFlagAtBase(MT_REDFLAG)) if (!P_IsFlagAtBase(MT_REDFLAG))
break; break;
HU_SetCEchoFlags(0); HU_SetCEchoFlags(V_AUTOFADEOUT|V_ALLOWLOWERCASE);
HU_SetCEchoDuration(5); HU_SetCEchoDuration(5);
HU_DoCEcho(va(M_GetText("%s\\captured the blue flag.\\\\\\\\"), player_names[player-players])); HU_DoCEcho(va(M_GetText("%s%s%s\\CAPTURED THE %sBLUE FLAG%s.\\\\\\\\"), "\x85", player_names[player-players], "\x80", "\x84", "\x80"));
if (splitscreen || players[consoleplayer].ctfteam == 1) if (splitscreen || players[consoleplayer].ctfteam == 1)
S_StartSound(NULL, sfx_flgcap); S_StartSound(NULL, sfx_flgcap);
@ -3848,9 +3849,9 @@ DoneSection2:
if (!P_IsFlagAtBase(MT_BLUEFLAG)) if (!P_IsFlagAtBase(MT_BLUEFLAG))
break; break;
HU_SetCEchoFlags(0); HU_SetCEchoFlags(V_AUTOFADEOUT|V_ALLOWLOWERCASE);
HU_SetCEchoDuration(5); HU_SetCEchoDuration(5);
HU_DoCEcho(va(M_GetText("%s\\captured the red flag.\\\\\\\\"), player_names[player-players])); HU_DoCEcho(va(M_GetText("%s%s%s\\CAPTURED THE %sRED FLAG%s.\\\\\\\\"), "\x84", player_names[player-players], "\x80", "\x85", "\x80"));
if (splitscreen || players[consoleplayer].ctfteam == 2) if (splitscreen || players[consoleplayer].ctfteam == 2)
S_StartSound(NULL, sfx_flgcap); S_StartSound(NULL, sfx_flgcap);

View file

@ -909,8 +909,12 @@ void P_ResetPlayer(player_t *player)
// Gives rings to the player, and does any special things required. // Gives rings to the player, and does any special things required.
// Call this function when you want to increment the player's health. // Call this function when you want to increment the player's health.
// //
void P_GivePlayerRings(player_t *player, INT32 num_rings) void P_GivePlayerRings(player_t *player, INT32 num_rings)
{ {
if (!player)
return;
if (player->bot) if (player->bot)
player = &players[consoleplayer]; player = &players[consoleplayer];
@ -929,7 +933,7 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
player->rings = 0; player->rings = 0;
// Now extra life bonuses are handled here instead of in P_MovePlayer, since why not? // Now extra life bonuses are handled here instead of in P_MovePlayer, since why not?
if (!ultimatemode && !modeattacking && !G_IsSpecialStage(gamemap) && G_GametypeUsesLives()) if (!ultimatemode && !modeattacking && !G_IsSpecialStage(gamemap) && G_GametypeUsesLives() && player->lives != 0x7f)
{ {
INT32 gainlives = 0; INT32 gainlives = 0;
@ -941,7 +945,12 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
if (gainlives) if (gainlives)
{ {
P_GivePlayerLives(player, gainlives); player->lives += gainlives;
if (player->lives > 99)
player->lives = 99;
else if (player->lives < 1)
player->lives = 1;
P_PlayLivesJingle(player); P_PlayLivesJingle(player);
} }
} }
@ -955,7 +964,30 @@ void P_GivePlayerRings(player_t *player, INT32 num_rings)
// //
void P_GivePlayerLives(player_t *player, INT32 numlives) void P_GivePlayerLives(player_t *player, INT32 numlives)
{ {
if (player->lives == 0x7f) return; if (!player)
return;
if (player->bot)
player = &players[consoleplayer];
if (gamestate == GS_LEVEL)
{
if (player->lives == 0x7f || (gametype != GT_COOP && gametype != GT_COMPETITION))
{
P_GivePlayerRings(player, 100*numlives);
return;
}
if ((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0)
{
UINT8 prevlives = player->lives;
P_GivePlayerRings(player, 100*numlives);
if (player->lives - prevlives >= numlives)
return;
numlives = (numlives + prevlives - player->lives);
}
}
player->lives += numlives; player->lives += numlives;
@ -1159,11 +1191,7 @@ void P_PlayLivesJingle(player_t *player)
if (player && !P_IsLocalPlayer(player)) if (player && !P_IsLocalPlayer(player))
return; return;
if ((player && player->lives == 0x7f) if (use1upSound)
|| (!player && &players[consoleplayer] && players[consoleplayer].lives == 0x7f)
|| (gametype == GT_COOP && (netgame || multiplayer) && cv_cooplives.value == 0))
S_StartSound(NULL, sfx_lose);
else if (use1upSound)
S_StartSound(NULL, sfx_oneup); S_StartSound(NULL, sfx_oneup);
else if (mariomode) else if (mariomode)
S_StartSound(NULL, sfx_marioa); S_StartSound(NULL, sfx_marioa);
@ -1725,7 +1753,7 @@ void P_DoPlayerExit(player_t *player)
else if (gametype == GT_RACE || gametype == GT_COMPETITION) // If in Race Mode, allow else if (gametype == GT_RACE || gametype == GT_COMPETITION) // If in Race Mode, allow
{ {
if (!countdown) // a 60-second wait ala Sonic 2. if (!countdown) // a 60-second wait ala Sonic 2.
countdown = cv_countdowntime.value*TICRATE + 1; // Use cv_countdowntime countdown = (cv_countdowntime.value - 1)*TICRATE + 1; // Use cv_countdowntime
player->exiting = 3*TICRATE; player->exiting = 3*TICRATE;
@ -2336,12 +2364,17 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
{ {
tic_t timeleft = (player->powers[pw_spacetime]) ? player->powers[pw_spacetime] : player->powers[pw_underwater]; tic_t timeleft = (player->powers[pw_spacetime]) ? player->powers[pw_spacetime] : player->powers[pw_underwater];
if ((timeleft == 11*TICRATE + 1) // 5 if (player->exiting)
|| (timeleft == 9*TICRATE + 1) // 4 player->powers[pw_underwater] = player->powers[pw_spacetime] = 0;
|| (timeleft == 7*TICRATE + 1) // 3
|| (timeleft == 5*TICRATE + 1) // 2 timeleft--; // The original code was all n*TICRATE + 1, so let's remove 1 tic for simplicity
|| (timeleft == 3*TICRATE + 1) // 1
|| (timeleft == 1*TICRATE + 1) // 0 if ((timeleft == 11*TICRATE) // 5
|| (timeleft == 9*TICRATE) // 4
|| (timeleft == 7*TICRATE) // 3
|| (timeleft == 5*TICRATE) // 2
|| (timeleft == 3*TICRATE) // 1
|| (timeleft == 1*TICRATE) // 0
) { ) {
fixed_t height = (player->mo->eflags & MFE_VERTICALFLIP) fixed_t height = (player->mo->eflags & MFE_VERTICALFLIP)
? player->mo->z - FixedMul(8*FRACUNIT + mobjinfo[MT_DROWNNUMBERS].height, FixedMul(player->mo->scale, player->shieldscale)) ? player->mo->z - FixedMul(8*FRACUNIT + mobjinfo[MT_DROWNNUMBERS].height, FixedMul(player->mo->scale, player->shieldscale))
@ -2349,7 +2382,7 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
mobj_t *numbermobj = P_SpawnMobj(player->mo->x, player->mo->y, height, MT_DROWNNUMBERS); mobj_t *numbermobj = P_SpawnMobj(player->mo->x, player->mo->y, height, MT_DROWNNUMBERS);
timeleft /= (2*TICRATE); // To be strictly accurate it'd need to be (((timeleft - 1)/TICRATE) - 1)/2, but integer division rounds down for us timeleft /= (2*TICRATE); // To be strictly accurate it'd need to be ((timeleft/TICRATE) - 1)/2, but integer division rounds down for us
if (player->charflags & SF_MACHINE) if (player->charflags & SF_MACHINE)
{ {
@ -2408,14 +2441,6 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player)
S_ChangeMusicInternal("_drown", false); S_ChangeMusicInternal("_drown", false);
} }
} }
if (player->exiting)
{
if (player->powers[pw_underwater] > 1)
player->powers[pw_underwater] = 0;
player->powers[pw_spacetime] = 0;
}
} }
// //
@ -2585,13 +2610,11 @@ static void P_DoPlayerHeadSigns(player_t *player)
} }
else else
sign->z += P_GetPlayerHeight(player)+FixedMul(16*FRACUNIT, player->mo->scale); sign->z += P_GetPlayerHeight(player)+FixedMul(16*FRACUNIT, player->mo->scale);
if (leveltime & 4)
{ if (player->gotflag & GF_REDFLAG)
if (player->gotflag & GF_REDFLAG) sign->frame = 1|FF_FULLBRIGHT;
P_SetMobjStateNF(sign, S_GOTREDFLAG); else //if (player->gotflag & GF_BLUEFLAG)
} sign->frame = 2|FF_FULLBRIGHT;
else if (player->gotflag & GF_BLUEFLAG)
P_SetMobjStateNF(sign, S_GOTBLUEFLAG);
} }
} }
} }
@ -9538,7 +9561,7 @@ void P_PlayerThink(player_t *player)
if (i == MAXPLAYERS && player->exiting == 3*TICRATE) // finished if (i == MAXPLAYERS && player->exiting == 3*TICRATE) // finished
player->exiting = (14*TICRATE)/5 + 1; player->exiting = (14*TICRATE)/5 + 1;
// If 10 seconds are left on the timer, // If 11 seconds are left on the timer,
// begin the drown music for countdown! // begin the drown music for countdown!
if (countdown == 11*TICRATE - 1) if (countdown == 11*TICRATE - 1)
{ {
@ -9711,7 +9734,7 @@ void P_PlayerThink(player_t *player)
} }
} }
if (player->linktimer && (player->linktimer >= (2*TICRATE - 1) || !player->powers[pw_nights_linkfreeze])) if (player->linktimer && !player->powers[pw_nights_linkfreeze])
{ {
if (--player->linktimer <= 0) // Link timer if (--player->linktimer <= 0) // Link timer
player->linkcount = 0; player->linkcount = 0;

View file

@ -2497,11 +2497,7 @@ static void Sk_SetDefaultValue(skin_t *skin)
skin->flags = 0; skin->flags = 0;
strcpy(skin->realname, "Someone"); strcpy(skin->realname, "Someone");
#ifdef SKINNAMEPADDING
strcpy(skin->hudname, " ???");
#else
strcpy(skin->hudname, "???"); strcpy(skin->hudname, "???");
#endif
strncpy(skin->charsel, "CHRSONIC", 8); strncpy(skin->charsel, "CHRSONIC", 8);
strncpy(skin->face, "MISSING", 8); strncpy(skin->face, "MISSING", 8);
strncpy(skin->superface, "MISSING", 8); strncpy(skin->superface, "MISSING", 8);
@ -2733,11 +2729,7 @@ static UINT16 W_CheckForSkinMarkerInPwad(UINT16 wadid, UINT16 startlump)
return INT16_MAX; // not found return INT16_MAX; // not found
} }
#ifdef SKINNAMEPADDING
#define HUDNAMEWRITE(value) snprintf(skin->hudname, sizeof(skin->hudname), "%5s", value)
#else
#define HUDNAMEWRITE(value) STRBUFCPY(skin->hudname, value) #define HUDNAMEWRITE(value) STRBUFCPY(skin->hudname, value)
#endif
// turn _ into spaces and . into katana dot // turn _ into spaces and . into katana dot
#define SYMBOLCONVERT(name) for (value = name; *value; value++)\ #define SYMBOLCONVERT(name) for (value = name; *value; value++)\

View file

@ -414,7 +414,7 @@ void SCR_DisplayTicRate(void)
tic_t ontic = I_GetTime(); tic_t ontic = I_GetTime();
tic_t totaltics = 0; tic_t totaltics = 0;
INT32 ticcntcolor = 0; INT32 ticcntcolor = 0;
INT32 offs = (cv_debug ? 8 : 0); const INT32 h = vid.height-(8*vid.dupy);
for (i = lasttic + 1; i < TICRATE+lasttic && i < ontic; ++i) for (i = lasttic + 1; i < TICRATE+lasttic && i < ontic; ++i)
fpsgraph[i % TICRATE] = false; fpsgraph[i % TICRATE] = false;
@ -428,9 +428,9 @@ void SCR_DisplayTicRate(void)
if (totaltics <= TICRATE/2) ticcntcolor = V_REDMAP; if (totaltics <= TICRATE/2) ticcntcolor = V_REDMAP;
else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP; else if (totaltics == TICRATE) ticcntcolor = V_GREENMAP;
V_DrawString(vid.width-((24+(6*offs))*vid.dupx), vid.height-((16-offs)*vid.dupy), V_DrawString(vid.width-(72*vid.dupx), h,
V_YELLOWMAP|V_NOSCALESTART, "FPS"); V_YELLOWMAP|V_NOSCALESTART, "FPS:");
V_DrawString(vid.width-(40*vid.dupx), vid.height-(8*vid.dupy), V_DrawString(vid.width-(40*vid.dupx), h,
ticcntcolor|V_NOSCALESTART, va("%02d/%02u", totaltics, TICRATE)); ticcntcolor|V_NOSCALESTART, va("%02d/%02u", totaltics, TICRATE));
lasttic = ontic; lasttic = ontic;
@ -440,6 +440,18 @@ void SCR_ClosedCaptions(void)
{ {
UINT8 i; UINT8 i;
boolean gamestopped = (paused || P_AutoPause()); boolean gamestopped = (paused || P_AutoPause());
INT32 basey = BASEVIDHEIGHT;
if (gamestate == GS_LEVEL)
{
if (splitscreen)
basey -= 8;
else if (((maptol & TOL_NIGHTS) && (modeattacking == ATTACKING_NIGHTS))
|| (cv_powerupdisplay.value == 2)
|| (cv_powerupdisplay.value == 1 && ((stplyr == &players[displayplayer] && !camera.chase)
|| ((splitscreen && stplyr == &players[secondarydisplayplayer]) && !camera2.chase))))
basey -= 16;
}
for (i = 0; i < NUMCAPTIONS; i++) for (i = 0; i < NUMCAPTIONS; i++)
{ {
@ -455,9 +467,8 @@ void SCR_ClosedCaptions(void)
if (music && !gamestopped && (closedcaptions[i].t < flashingtics) && (closedcaptions[i].t & 1)) if (music && !gamestopped && (closedcaptions[i].t < flashingtics) && (closedcaptions[i].t & 1))
continue; continue;
flags = V_NOSCALESTART|V_ALLOWLOWERCASE; flags = V_SNAPTORIGHT|V_SNAPTOBOTTOM|V_ALLOWLOWERCASE;
y = vid.height-((i + 2)*10*vid.dupy); y = basey-((i + 2)*10);
dot = ' ';
if (closedcaptions[i].b) if (closedcaptions[i].b)
y -= (closedcaptions[i].b--)*vid.dupy; y -= (closedcaptions[i].b--)*vid.dupy;
@ -469,8 +480,10 @@ void SCR_ClosedCaptions(void)
dot = '\x19'; dot = '\x19';
else if (closedcaptions[i].c && closedcaptions[i].c->origin) else if (closedcaptions[i].c && closedcaptions[i].c->origin)
dot = '\x1E'; dot = '\x1E';
else
dot = ' ';
V_DrawRightAlignedString(vid.width-(20*vid.dupx), y, V_DrawRightAlignedString(BASEVIDWIDTH - 20, y, flags,
flags, va("%c [%s]", dot, (closedcaptions[i].s->caption[0] ? closedcaptions[i].s->caption : closedcaptions[i].s->name))); va("%c [%s]", dot, (closedcaptions[i].s->caption[0] ? closedcaptions[i].s->caption : closedcaptions[i].s->name)));
} }
} }

View file

@ -85,14 +85,14 @@ sfxinfo_t S_sfx[NUMSFX] =
{"athun1", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"}, {"athun1", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"},
{"athun2", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"}, {"athun2", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"},
{"amwtr1", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr1", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr2", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr2", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr3", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr3", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr4", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr4", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr5", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr5", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr6", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr6", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr7", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr7", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"amwtr8", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"}, {"amwtr8", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"},
{"bubbl1", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"}, {"bubbl1", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"bubbl2", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"}, {"bubbl2", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"bubbl3", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"}, {"bubbl3", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},

File diff suppressed because it is too large Load diff

View file

@ -72,38 +72,28 @@ extern patch_t *ngradeletters[7];
*/ */
typedef struct typedef struct
{ {
INT32 x, y; INT32 x, y, f;
} hudinfo_t; } hudinfo_t;
typedef enum typedef enum
{ {
HUD_LIVESNAME, HUD_LIVES,
HUD_LIVESPIC,
HUD_LIVESNUM,
HUD_LIVESX,
HUD_RINGS, HUD_RINGS,
HUD_RINGSSPLIT,
HUD_RINGSNUM, HUD_RINGSNUM,
HUD_RINGSNUMSPLIT,
HUD_RINGSNUMTICS, HUD_RINGSNUMTICS,
HUD_SCORE, HUD_SCORE,
HUD_SCORENUM, HUD_SCORENUM,
HUD_TIME, HUD_TIME,
HUD_TIMESPLIT,
HUD_MINUTES, HUD_MINUTES,
HUD_MINUTESSPLIT,
HUD_TIMECOLON, HUD_TIMECOLON,
HUD_TIMECOLONSPLIT,
HUD_SECONDS, HUD_SECONDS,
HUD_SECONDSSPLIT,
HUD_TIMETICCOLON, HUD_TIMETICCOLON,
HUD_TICS, HUD_TICS,
HUD_SS_TOTALRINGS, HUD_SS_TOTALRINGS,
HUD_SS_TOTALRINGS_SPLIT,
HUD_GETRINGS, HUD_GETRINGS,
HUD_GETRINGSNUM, HUD_GETRINGSNUM,
@ -111,8 +101,7 @@ typedef enum
HUD_TIMELEFTNUM, HUD_TIMELEFTNUM,
HUD_TIMEUP, HUD_TIMEUP,
HUD_HUNTPICS, HUD_HUNTPICS,
HUD_GRAVBOOTSICO, HUD_POWERUPS,
HUD_LAP,
NUMHUDITEMS NUMHUDITEMS
} hudnum_t; } hudnum_t;

View file

@ -15,6 +15,8 @@
#include "doomdef.h" #include "doomdef.h"
#include "r_local.h" #include "r_local.h"
#include "p_local.h" // stplyr
#include "g_game.h" // players
#include "v_video.h" #include "v_video.h"
#include "hu_stuff.h" #include "hu_stuff.h"
#include "r_draw.h" #include "r_draw.h"
@ -540,6 +542,8 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
fixed_t pwidth; // patch width fixed_t pwidth; // patch width
fixed_t offx = 0; // x offset fixed_t offx = 0; // x offset
UINT8 perplayershuffle = 0;
if (rendermode == render_none) if (rendermode == render_none)
return; return;
@ -624,8 +628,74 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale); x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale);
} }
if (scrn & V_SPLITSCREEN) if (splitscreen && (scrn & V_PERPLAYER))
y>>=1; {
fixed_t adjusty = ((scrn & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)<<(FRACBITS-1);
fdup >>= 1;
rowfrac <<= 1;
y >>= 1;
#ifdef QUADS
if (splitscreen > 1) // 3 or 4 players
{
fixed_t adjustx = ((scrn & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)<<(FRACBITS-1));
colfrac <<= 1;
x >>= 1;
if (stplyr == &players[displayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
}
else if (stplyr == &players[secondarydisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
}
else if (stplyr == &players[thirddisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
y += adjusty;
scrn &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
}
else //if (stplyr == &players[fourthdisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
y += adjusty;
scrn &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
}
}
else
#endif
// 2 players
{
if (stplyr == &players[displayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle = 1;
scrn &= ~V_SNAPTOBOTTOM;
}
else //if (stplyr == &players[secondarydisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle = 2;
y += adjusty;
scrn &= ~V_SNAPTOTOP;
}
}
}
desttop = screens[scrn&V_PARAMMASK]; desttop = screens[scrn&V_PARAMMASK];
@ -666,16 +736,22 @@ void V_DrawFixedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_t
x += (vid.width - (BASEVIDWIDTH * dupx)); x += (vid.width - (BASEVIDWIDTH * dupx));
else if (!(scrn & V_SNAPTOLEFT)) else if (!(scrn & V_SNAPTOLEFT))
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
if (perplayershuffle & 4)
x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4;
else if (perplayershuffle & 8)
x += (vid.width - (BASEVIDWIDTH * dupx)) / 4;
} }
if (vid.height != BASEVIDHEIGHT * dupy) if (vid.height != BASEVIDHEIGHT * dupy)
{ {
// same thing here // same thing here
if ((scrn & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM)) if (scrn & V_SNAPTOBOTTOM)
y += (vid.height/2 - (BASEVIDHEIGHT/2 * dupy));
else if (scrn & V_SNAPTOBOTTOM)
y += (vid.height - (BASEVIDHEIGHT * dupy)); y += (vid.height - (BASEVIDHEIGHT * dupy));
else if (!(scrn & V_SNAPTOTOP)) else if (!(scrn & V_SNAPTOTOP))
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
if (perplayershuffle & 1)
y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
else if (perplayershuffle & 2)
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
} }
} }
@ -750,6 +826,8 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
UINT8 *desttop, *dest; UINT8 *desttop, *dest;
const UINT8 *source, *deststop; const UINT8 *source, *deststop;
UINT8 perplayershuffle = 0;
if (rendermode == render_none) if (rendermode == render_none)
return; return;
@ -793,6 +871,84 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
y -= FixedMul(SHORT(patch->topoffset)<<FRACBITS, pscale); y -= FixedMul(SHORT(patch->topoffset)<<FRACBITS, pscale);
x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale); x -= FixedMul(SHORT(patch->leftoffset)<<FRACBITS, pscale);
if (splitscreen && (scrn & V_PERPLAYER))
{
fixed_t adjusty = ((scrn & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)<<(FRACBITS-1);
fdup >>= 1;
rowfrac <<= 1;
y >>= 1;
sy >>= 1;
h >>= 1;
#ifdef QUADS
if (splitscreen > 1) // 3 or 4 players
{
fixed_t adjustx = ((scrn & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)<<(FRACBITS-1));
colfrac <<= 1;
x >>= 1;
sx >>= 1;
w >>= 1;
if (stplyr == &players[displayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
}
else if (stplyr == &players[secondarydisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
sx += adjustx;
scrn &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
}
else if (stplyr == &players[thirddisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
y += adjusty;
sy += adjusty;
scrn &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
}
else //if (stplyr == &players[fourthdisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(scrn & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
sx += adjustx;
y += adjusty;
sy += adjusty;
scrn &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
}
}
else
#endif
// 2 players
{
if (stplyr == &players[displayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
scrn &= ~V_SNAPTOBOTTOM;
}
else //if (stplyr == &players[secondarydisplayplayer])
{
if (!(scrn & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
y += adjusty;
sy += adjusty;
scrn &= ~V_SNAPTOTOP;
}
}
}
desttop = screens[scrn&V_PARAMMASK]; desttop = screens[scrn&V_PARAMMASK];
if (!desttop) if (!desttop)
@ -831,16 +987,22 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
x += (vid.width - (BASEVIDWIDTH * dupx)); x += (vid.width - (BASEVIDWIDTH * dupx));
else if (!(scrn & V_SNAPTOLEFT)) else if (!(scrn & V_SNAPTOLEFT))
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
if (perplayershuffle & 4)
x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4;
else if (perplayershuffle & 8)
x += (vid.width - (BASEVIDWIDTH * dupx)) / 4;
} }
if (vid.height != BASEVIDHEIGHT * dupy) if (vid.height != BASEVIDHEIGHT * dupy)
{ {
// same thing here // same thing here
if ((scrn & (V_SPLITSCREEN|V_SNAPTOBOTTOM)) == (V_SPLITSCREEN|V_SNAPTOBOTTOM)) if (scrn & V_SNAPTOBOTTOM)
y += (vid.height/2 - (BASEVIDHEIGHT/2 * dupy));
else if (scrn & V_SNAPTOBOTTOM)
y += (vid.height - (BASEVIDHEIGHT * dupy)); y += (vid.height - (BASEVIDHEIGHT * dupy));
else if (!(scrn & V_SNAPTOTOP)) else if (!(scrn & V_SNAPTOTOP))
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
if (perplayershuffle & 1)
y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
else if (perplayershuffle & 2)
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
} }
} }
@ -987,6 +1149,8 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
UINT8 *dest; UINT8 *dest;
const UINT8 *deststop; const UINT8 *deststop;
UINT8 perplayershuffle = 0;
if (rendermode == render_none) if (rendermode == render_none)
return; return;
@ -998,6 +1162,74 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
} }
#endif #endif
if (splitscreen && (c & V_PERPLAYER))
{
fixed_t adjusty = ((c & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)>>1;
h >>= 1;
y >>= 1;
#ifdef QUADS
if (splitscreen > 1) // 3 or 4 players
{
fixed_t adjustx = ((c & V_NOSCALESTART) ? vid.height : BASEVIDHEIGHT)>>1;
w >>= 1;
x >>= 1;
if (stplyr == &players[displayplayer])
{
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
c &= ~V_SNAPTOBOTTOM|V_SNAPTORIGHT;
}
else if (stplyr == &players[secondarydisplayplayer])
{
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
c &= ~V_SNAPTOBOTTOM|V_SNAPTOLEFT;
}
else if (stplyr == &players[thirddisplayplayer])
{
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 4;
y += adjusty;
c &= ~V_SNAPTOTOP|V_SNAPTORIGHT;
}
else //if (stplyr == &players[fourthdisplayplayer])
{
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
if (!(c & (V_SNAPTOLEFT|V_SNAPTORIGHT)))
perplayershuffle |= 8;
x += adjustx;
y += adjusty;
c &= ~V_SNAPTOTOP|V_SNAPTOLEFT;
}
}
else
#endif
// 2 players
{
if (stplyr == &players[displayplayer])
{
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 1;
c &= ~V_SNAPTOBOTTOM;
}
else //if (stplyr == &players[secondarydisplayplayer])
{
if (!(c & (V_SNAPTOTOP|V_SNAPTOBOTTOM)))
perplayershuffle |= 2;
y += adjusty;
c &= ~V_SNAPTOTOP;
}
}
}
if (!(c & V_NOSCALESTART)) if (!(c & V_NOSCALESTART))
{ {
INT32 dupx = vid.dupx, dupy = vid.dupy; INT32 dupx = vid.dupx, dupy = vid.dupy;
@ -1022,6 +1254,10 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
x += (vid.width - (BASEVIDWIDTH * dupx)); x += (vid.width - (BASEVIDWIDTH * dupx));
else if (!(c & V_SNAPTOLEFT)) else if (!(c & V_SNAPTOLEFT))
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2; x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
if (perplayershuffle & 4)
x -= (vid.width - (BASEVIDWIDTH * dupx)) / 4;
else if (perplayershuffle & 8)
x += (vid.width - (BASEVIDWIDTH * dupx)) / 4;
} }
if (vid.height != BASEVIDHEIGHT * dupy) if (vid.height != BASEVIDHEIGHT * dupy)
{ {
@ -1030,6 +1266,10 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
y += (vid.height - (BASEVIDHEIGHT * dupy)); y += (vid.height - (BASEVIDHEIGHT * dupy));
else if (!(c & V_SNAPTOTOP)) else if (!(c & V_SNAPTOTOP))
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2; y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
if (perplayershuffle & 1)
y -= (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
else if (perplayershuffle & 2)
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 4;
} }
} }
@ -1175,25 +1415,34 @@ void V_DrawPatchFill(patch_t *pat)
// //
// Fade all the screen buffer, so that the menu is more readable, // Fade all the screen buffer, so that the menu is more readable,
// especially now that we use the small hufont in the menus... // especially now that we use the small hufont in the menus...
// If color is 0x00 to 0xFF, draw transtable (strength range 0-9).
// Else, use COLORMAP lump (strength range 0-31).
// IF YOU ARE NOT CAREFUL, THIS CAN AND WILL CRASH!
// I have kept the safety checks out of this function;
// the v.fadeScreen Lua interface handles those.
// //
void V_DrawFadeScreen(void) void V_DrawFadeScreen(UINT16 color, UINT8 strength)
{ {
const UINT8 *fadetable = (UINT8 *)colormaps + 16*256;
const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height;
UINT8 *buf = screens[0];
#ifdef HWRENDER #ifdef HWRENDER
if (rendermode != render_soft && rendermode != render_none) if (rendermode != render_soft && rendermode != render_none)
{ {
HWR_FadeScreenMenuBack(0x01010160, 0); // hack, 0 means full height HWR_FadeScreenMenuBack(color, strength);
return; return;
} }
#endif #endif
// heavily simplified -- we don't need to know x or y {
// position when we're doing a full screen fade const UINT8 *fadetable = ((color & 0xFF00) // Color is not palette index?
for (; buf < deststop; ++buf) ? ((UINT8 *)colormaps + strength*256) // Do COLORMAP fade.
*buf = fadetable[*buf]; : ((UINT8 *)transtables + ((9-strength)<<FF_TRANSSHIFT) + color*256)); // Else, do TRANSMAP** fade.
const UINT8 *deststop = screens[0] + vid.rowbytes * vid.height;
UINT8 *buf = screens[0];
// heavily simplified -- we don't need to know x or y
// position when we're doing a full screen fade
for (; buf < deststop; ++buf)
*buf = fadetable[*buf];
}
} }
// Simple translucency with one color, over a set number of lines starting from the top. // Simple translucency with one color, over a set number of lines starting from the top.
@ -1237,20 +1486,36 @@ static const UINT8 *V_GetStringColormap(INT32 colorflags)
{ {
switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT) switch ((colorflags & V_CHARCOLORMASK) >> V_CHARCOLORSHIFT)
{ {
case 1: // 0x81, purple case 1: // 0x81, magenta
return purplemap; return magentamap;
case 2: // 0x82, yellow case 2: // 0x82, yellow
return yellowmap; return yellowmap;
case 3: // 0x83, lgreen case 3: // 0x83, lgreen
return lgreenmap; return lgreenmap;
case 4: // 0x84, blue case 4: // 0x84, blue
return bluemap; return bluemap;
case 5: // 0x85, red case 5: // 0x85, red
return redmap; return redmap;
case 6: // 0x86, gray case 6: // 0x86, gray
return graymap; return graymap;
case 7: // 0x87, orange case 7: // 0x87, orange
return orangemap; return orangemap;
case 8: // 0x88, sky
return skymap;
case 9: // 0x89, purple
return purplemap;
case 10: // 0x8A, aqua
return aquamap;
case 11: // 0x8B, peridot
return peridotmap;
case 12: // 0x8C, azure
return azuremap;
case 13: // 0x8D, brown
return brownmap;
case 14: // 0x8E, rosy
return rosymap;
case 15: // 0x8F, invert
return invertmap;
default: // reset default: // reset
return NULL; return NULL;
} }

View file

@ -73,13 +73,21 @@ extern RGBA_t *pMasterPalette;
#define V_CHARCOLORSHIFT 12 #define V_CHARCOLORSHIFT 12
#define V_CHARCOLORMASK 0x0000F000 #define V_CHARCOLORMASK 0x0000F000
// for simplicity's sake, shortcuts to specific colors // for simplicity's sake, shortcuts to specific colors
#define V_PURPLEMAP 0x00001000 #define V_MAGENTAMAP 0x00001000
#define V_YELLOWMAP 0x00002000 #define V_YELLOWMAP 0x00002000
#define V_GREENMAP 0x00003000 #define V_GREENMAP 0x00003000
#define V_BLUEMAP 0x00004000 #define V_BLUEMAP 0x00004000
#define V_REDMAP 0x00005000 #define V_REDMAP 0x00005000
#define V_GRAYMAP 0x00006000 #define V_GRAYMAP 0x00006000
#define V_ORANGEMAP 0x00007000 #define V_ORANGEMAP 0x00007000
#define V_SKYMAP 0x00008000
#define V_PURPLEMAP 0x00009000
#define V_AQUAMAP 0x0000A000
#define V_PERIDOTMAP 0x0000B000
#define V_AZUREMAP 0x0000C000
#define V_BROWNMAP 0x0000D000
#define V_ROSYMAP 0x0000E000
#define V_INVERTMAP 0x0000F000
// use bits 17-20 for alpha transparency // use bits 17-20 for alpha transparency
#define V_ALPHASHIFT 16 #define V_ALPHASHIFT 16
@ -112,8 +120,8 @@ extern RGBA_t *pMasterPalette;
#define V_WRAPX 0x10000000 // Don't clamp texture on X (for HW mode) #define V_WRAPX 0x10000000 // Don't clamp texture on X (for HW mode)
#define V_WRAPY 0x20000000 // Don't clamp texture on Y (for HW mode) #define V_WRAPY 0x20000000 // Don't clamp texture on Y (for HW mode)
#define V_NOSCALESTART 0x40000000 // don't scale x, y, start coords #define V_NOSCALESTART 0x40000000 // don't scale x, y, start coords
#define V_SPLITSCREEN 0x80000000 #define V_PERPLAYER 0x80000000 // automatically adjust coordinates/scaling for splitscreen mode
// defines for old functions // 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_DrawPatch(x,y,s,p) V_DrawFixedPatch((x)<<FRACBITS, (y)<<FRACBITS, FRACUNIT, s|V_NOSCALESTART|V_NOSCALEPATCH, p, NULL)
@ -147,7 +155,7 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c);
void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum); void V_DrawFlatFill(INT32 x, INT32 y, INT32 w, INT32 h, lumpnum_t flatnum);
// fade down the screen buffer before drawing the menu over // fade down the screen buffer before drawing the menu over
void V_DrawFadeScreen(void); void V_DrawFadeScreen(UINT16 color, UINT8 strength);
void V_DrawFadeConsBack(INT32 plines); void V_DrawFadeConsBack(INT32 plines);

View file

@ -161,27 +161,25 @@ static void Y_FollowIntermission(void);
static void Y_UnloadData(void); static void Y_UnloadData(void);
// Stuff copy+pasted from st_stuff.c // Stuff copy+pasted from st_stuff.c
static INT32 SCX(INT32 x) #define ST_DrawNumFromHud(h,n) V_DrawTallNum(hudinfo[h].x, hudinfo[h].y, hudinfo[h].f, n)
{ #define ST_DrawPadNumFromHud(h,n,q) V_DrawPaddedTallNum(hudinfo[h].x, hudinfo[h].y, hudinfo[h].f, n, q)
return FixedInt(FixedMul(x<<FRACBITS, vid.fdupx)); #define ST_DrawPatchFromHud(h,p) V_DrawScaledPatch(hudinfo[h].x, hudinfo[h].y, hudinfo[h].f, p)
}
static INT32 SCY(INT32 z)
{
return FixedInt(FixedMul(z<<FRACBITS, vid.fdupy));
}
#define ST_DrawNumFromHud(h,n) V_DrawTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, n)
#define ST_DrawPadNumFromHud(h,n,q) V_DrawPaddedTallNum(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, n, q)
#define ST_DrawPatchFromHud(h,p) V_DrawScaledPatch(SCX(hudinfo[h].x), SCY(hudinfo[h].y), V_NOSCALESTART, p)
static void Y_IntermissionTokenDrawer(void) static void Y_IntermissionTokenDrawer(void)
{ {
INT32 y; INT32 y, offs, lowy, calc;
INT32 offs = 0;
UINT32 tokencount; UINT32 tokencount;
INT32 lowy = BASEVIDHEIGHT - 32; INT16 temp;
INT16 temp = SHORT(tokenicon->height)/2; UINT8 em;
INT32 calc;
offs = 0;
lowy = BASEVIDHEIGHT - 32 - 8;
temp = SHORT(tokenicon->height)/2;
em = 0;
while (emeralds & (1 << em))
if (++em == 7)
return;
if (tallydonetic != -1) if (tallydonetic != -1)
{ {
@ -190,7 +188,7 @@ static void Y_IntermissionTokenDrawer(void)
offs = 8; offs = 8;
} }
V_DrawFill(32, lowy-1, 16, 1, 31); // slot V_DrawSmallScaledPatch(32, lowy-1, 0, emeraldpics[2][em]); // coinbox
y = (lowy + offs + 1) - (temp + (token + 1)*8); y = (lowy + offs + 1) - (temp + (token + 1)*8);
@ -255,31 +253,34 @@ void Y_IntermissionDrawer(void)
if (gottoken) // first to be behind everything else if (gottoken) // first to be behind everything else
Y_IntermissionTokenDrawer(); Y_IntermissionTokenDrawer();
// draw score if (!splitscreen)
ST_DrawPatchFromHud(HUD_SCORE, sboscore);
ST_DrawNumFromHud(HUD_SCORENUM, data.coop.score);
// draw time
ST_DrawPatchFromHud(HUD_TIME, sbotime);
if (cv_timetic.value == 1)
ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics);
else
{ {
INT32 seconds, minutes, tictrn; // draw score
ST_DrawPatchFromHud(HUD_SCORE, sboscore);
ST_DrawNumFromHud(HUD_SCORENUM, data.coop.score);
seconds = G_TicsToSeconds(data.coop.tics); // draw time
minutes = G_TicsToMinutes(data.coop.tics, true); ST_DrawPatchFromHud(HUD_TIME, sbotime);
tictrn = G_TicsToCentiseconds(data.coop.tics); if (cv_timetic.value == 1)
ST_DrawNumFromHud(HUD_SECONDS, data.coop.tics);
ST_DrawNumFromHud(HUD_MINUTES, minutes); // Minutes else
ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon
ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds
// we should show centiseconds on the intermission screen too, if the conditions are right.
if (modeattacking || cv_timetic.value == 2)
{ {
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period INT32 seconds, minutes, tictrn;
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
seconds = G_TicsToSeconds(data.coop.tics);
minutes = G_TicsToMinutes(data.coop.tics, true);
tictrn = G_TicsToCentiseconds(data.coop.tics);
ST_DrawNumFromHud(HUD_MINUTES, minutes); // Minutes
ST_DrawPatchFromHud(HUD_TIMECOLON, sbocolon); // Colon
ST_DrawPadNumFromHud(HUD_SECONDS, seconds, 2); // Seconds
// we should show centiseconds on the intermission screen too, if the conditions are right.
if (modeattacking || cv_timetic.value == 2)
{
ST_DrawPatchFromHud(HUD_TIMETICCOLON, sboperiod); // Period
ST_DrawPadNumFromHud(HUD_TICS, tictrn, 2); // Tics
}
} }
} }
@ -320,7 +321,7 @@ void Y_IntermissionDrawer(void)
Y_IntermissionTokenDrawer(); Y_IntermissionTokenDrawer();
// draw the header // draw the header
if (intertic <= TICRATE) if (intertic <= 2*TICRATE)
animatetic = 0; animatetic = 0;
else if (!animatetic && data.spec.bonus.points == 0 && data.spec.passed3[0] != '\0') else if (!animatetic && data.spec.bonus.points == 0 && data.spec.passed3[0] != '\0')
animatetic = intertic; animatetic = intertic;
@ -370,14 +371,64 @@ void Y_IntermissionDrawer(void)
} }
// draw the emeralds // draw the emeralds
if (intertic & 1) //if (intertic & 1)
{ {
INT32 emeraldx = 80; INT32 emeraldx = 152 - 3*28;
INT32 em = (gamemap - sstage_start);
for (i = 0; i < 7; ++i) for (i = 0; i < 7; ++i)
{ {
if (emeralds & (1 << i)) if ((i != em) && !(intertic & 1) && (emeralds & (1 << i)))
V_DrawScaledPatch(emeraldx, 74, 0, emeraldpics[i]); V_DrawScaledPatch(emeraldx, 74, 0, emeraldpics[0][i]);
emeraldx += 24; emeraldx += 28;
}
if (em < 7)
{
static UINT8 emeraldbounces = 0;
static INT32 emeraldmomy = 20;
static INT32 emeraldy = -40;
emeraldx = 152 + (em-3)*28;
if (intertic <= 1)
{
emeraldbounces = 0;
emeraldmomy = 20;
emeraldy = -40;
}
else
{
if (emeralds & (1 << em))
{
if (emeraldbounces < 3)
{
emeraldmomy += 1;
emeraldy += emeraldmomy;
if (emeraldy > 74)
{
S_StartSound(NULL, sfx_tink); // tink
emeraldbounces++;
emeraldmomy = -(emeraldmomy/2);
emeraldy = 74;
}
}
}
else
{
emeraldmomy += 1;
emeraldy += emeraldmomy;
emeraldx += intertic - 6;
if (emeraldbounces < 1 && emeraldy > 74)
{
S_StartSound(NULL, sfx_shldls); // nope
emeraldbounces++;
emeraldmomy = -(emeraldmomy/2);
emeraldy = 74;
}
}
V_DrawScaledPatch(emeraldx, emeraldy, 0, emeraldpics[0][em]);
}
} }
} }
@ -774,7 +825,7 @@ void Y_Ticker(void)
{ {
tallydonetic = intertic; tallydonetic = intertic;
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
S_StartSound(NULL, sfx_chchng); // cha-ching! S_StartSound(NULL, (gottoken ? sfx_token : sfx_chchng)); // cha-ching!
// Update when done with tally // Update when done with tally
if ((!modifiedgame || savemoddata) && !(netgame || multiplayer) && !demoplayback) if ((!modifiedgame || savemoddata) && !(netgame || multiplayer) && !demoplayback)
@ -807,7 +858,7 @@ void Y_Ticker(void)
tallydonetic = -1; tallydonetic = -1;
} }
if (intertic < TICRATE) // one second pause before tally begins if (intertic < 2*TICRATE) // TWO second pause before tally begins, thank you mazmazz
return; return;
for (i = 0; i < MAXPLAYERS; i++) for (i = 0; i < MAXPLAYERS; i++)
@ -819,7 +870,7 @@ void Y_Ticker(void)
if ((intertic - tallydonetic) > (3*TICRATE)/2) if ((intertic - tallydonetic) > (3*TICRATE)/2)
{ {
endtic = intertic + 4*TICRATE; // 4 second pause after end of tally endtic = intertic + 4*TICRATE; // 4 second pause after end of tally
S_StartSound(NULL, sfx_s3kac); // cha-ching! S_StartSound(NULL, sfx_s3kac); // bingly-bingly-bing!
} }
return; return;
} }
@ -839,7 +890,7 @@ void Y_Ticker(void)
if (!(data.spec.continues & 0x80)) // don't set endtic yet! if (!(data.spec.continues & 0x80)) // don't set endtic yet!
endtic = intertic + 4*TICRATE; // 4 second pause after end of tally endtic = intertic + 4*TICRATE; // 4 second pause after end of tally
S_StartSound(NULL, sfx_chchng); // cha-ching! S_StartSound(NULL, (gottoken ? sfx_token : sfx_chchng)); // cha-ching!
// Update when done with tally // Update when done with tally
if ((!modifiedgame || savemoddata) && !(netgame || multiplayer) && !demoplayback) if ((!modifiedgame || savemoddata) && !(netgame || multiplayer) && !demoplayback)
@ -1771,13 +1822,13 @@ static void Y_AwardCoopBonuses(void)
players[i].score = MAXSCORE; players[i].score = MAXSCORE;
} }
ptlives = (!ultimatemode && !modeattacking) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0; ptlives = (!ultimatemode && !modeattacking && players[i].lives != 0x7f) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;
if (ptlives) if (ptlives)
P_GivePlayerLives(&players[i], ptlives); P_GivePlayerLives(&players[i], ptlives);
if (i == consoleplayer) if (i == consoleplayer)
{ {
data.coop.gotlife = ptlives; data.coop.gotlife = (((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0) ? 0 : ptlives);
M_Memcpy(&data.coop.bonuses, &localbonuses, sizeof(data.coop.bonuses)); M_Memcpy(&data.coop.bonuses, &localbonuses, sizeof(data.coop.bonuses));
} }
} }
@ -1815,16 +1866,15 @@ static void Y_AwardSpecialStageBonus(void)
players[i].score = MAXSCORE; players[i].score = MAXSCORE;
// grant extra lives right away since tally is faked // grant extra lives right away since tally is faked
ptlives = (!ultimatemode && !modeattacking) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0; ptlives = (!ultimatemode && !modeattacking && players[i].lives != 0x7f) ? max((players[i].score/50000) - (oldscore/50000), 0) : 0;
if (ptlives) if (ptlives)
P_GivePlayerLives(&players[i], ptlives); P_GivePlayerLives(&players[i], ptlives);
if (i == consoleplayer) if (i == consoleplayer)
{ {
data.spec.gotlife = (((netgame || multiplayer) && gametype == GT_COOP && cv_cooplives.value == 0) ? 0 : ptlives);
M_Memcpy(&data.spec.bonus, &localbonus, sizeof(data.spec.bonus)); M_Memcpy(&data.spec.bonus, &localbonus, sizeof(data.spec.bonus));
data.spec.gotlife = ptlives;
// Continues related // Continues related
data.spec.continues = min(players[i].continues, 8); data.spec.continues = min(players[i].continues, 8);
if (players[i].gotcontinue) if (players[i].gotcontinue)