diff --git a/src/d_main.c b/src/d_main.c index 16962320..0100db38 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -125,11 +125,11 @@ INT32 postimgparam3; postimg_t postimgtype4 = postimg_none; INT32 postimgparam4; #ifdef _XBOX -boolean nomidimusic = false; +//boolean nomidimusic = false; boolean nosound = true; boolean nodigimusic = true; #else -boolean nomidimusic = false; +//boolean nomidimusic = false; boolean nosound = false; boolean nodigimusic = false; // No fmod-based music #endif @@ -137,7 +137,7 @@ boolean nodigimusic = false; // No fmod-based music // These variables are only true if // the respective sound system is initialized // and active, but no sounds/music should play. -boolean music_disabled = false; +//boolean music_disabled = false; boolean sound_disabled = false; boolean digital_disabled = false; @@ -318,7 +318,10 @@ static void D_Display(void) F_WipeEndScreen(); F_RunWipe(wipedefs[wipedefindex], gamestate != GS_TIMEATTACK); if (wipegamestate == GS_LEVEL && rendermode != render_none) + { V_SetPaletteLump("PLAYPAL"); // Reset the palette + R_ReInitColormaps(0, LUMPERROR); + } } F_WipeStartScreen(); diff --git a/src/d_netcmd.c b/src/d_netcmd.c index a504453e..c157f21c 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -780,7 +780,6 @@ void D_RegisterClientCommands(void) CV_RegisterVar(&cv_usegamma); // m_menu.c - CV_RegisterVar(&cv_compactscoreboard); CV_RegisterVar(&cv_chatheight); CV_RegisterVar(&cv_chatwidth); CV_RegisterVar(&cv_chattime); diff --git a/src/d_player.h b/src/d_player.h index baa03f3e..371b315f 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -258,6 +258,7 @@ typedef enum KRITEM_TRIPLEBANANA, KRITEM_TENFOLDBANANA, KRITEM_TRIPLEORBINAUT, + KRITEM_QUADORBINAUT, KRITEM_DUALJAWZ, NUMKARTRESULTS @@ -277,7 +278,7 @@ typedef enum k_respawn, // Timer for the DEZ laser respawn effect k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir") - //k_lapanimation, // Used to make a swoopy lap lakitu, maybe other effects in the future + k_lapanimation, // Used to show the lap start wing logo animation k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics k_voices, // Used to stop the player saying more voices than it should k_tauntvoices, // Used to specifically stop taunt voice spam diff --git a/src/dehacked.c b/src/dehacked.c index 15586934..5ef770d3 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -7658,7 +7658,7 @@ static const char *const KARTSTUFF_LIST[] = { "RESPAWN", "THROWDIR", - //"LAPANIMATION", + "LAPANIMATION", "CARDANIMATION", "VOICES", "TAUNTVOICES", diff --git a/src/doomstat.h b/src/doomstat.h index 0f2657b0..dbe9fa34 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -86,10 +86,12 @@ extern boolean forceresetplayers; // Internal parameters for sound rendering. // ======================================== -extern boolean nomidimusic; // defined in d_main.c +//extern boolean nomidimusic; // defined in d_main.c +#define nomidimusic true extern boolean nosound; extern boolean nodigimusic; -extern boolean music_disabled; +//extern boolean music_disabled; +#define music_disabled false extern boolean sound_disabled; extern boolean digital_disabled; diff --git a/src/g_game.c b/src/g_game.c index 44df9f13..48ba8724 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -400,9 +400,6 @@ static CV_PossibleValue_t joyaxis_cons_t[] = {{0, "None"}, // don't mind me putting these here, I was lazy to figure out where else I could put those without blowing up the compiler. -// it automatically becomes compact with 20+ players, but if you like it, I guess you can turn that on! -consvar_t cv_compactscoreboard= {"compactscoreboard", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; - // chat timer thingy static CV_PossibleValue_t chattime_cons_t[] = {{5, "MIN"}, {999, "MAX"}, {0, NULL}}; consvar_t cv_chattime = {"chattime", "8", CV_SAVE, chattime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -425,8 +422,8 @@ consvar_t cv_chatspamprotection = {"chatspamprotection", "On", CV_SAVE, CV_OnOff consvar_t cv_chatbacktint = {"chatbacktint", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; // old shit console chat. (mostly exists for stuff like terminal, not because I cared if anyone liked the old chat.) -//static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Box"}, {1, "Console"}, {0, NULL}}; -- for menu, but menu disabled... -consvar_t cv_consolechat = {"consolechat", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; +static CV_PossibleValue_t consolechat_cons_t[] = {{0, "Window"}, {1, "Console"}, {0, NULL}}; +consvar_t cv_consolechat = {"chatmode", "Window", CV_SAVE, consolechat_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_crosshair = {"crosshair", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; @@ -3306,7 +3303,7 @@ static void G_DoCompleted(void) } // play some generic music if there's no win/cool/lose music going on (for exitlevel commands) - if (G_RaceGametype() && j == splitscreen+1) + if (G_RaceGametype() && j == splitscreen+1 && (cv_inttime.value > 0)) S_ChangeMusicInternal("racent", true); if (automapactive) @@ -3464,30 +3461,25 @@ void G_AfterIntermission(void) // void G_NextLevel(void) { - boolean dovote = false; - - if ((cv_advancemap.value == 3 && gamestate != GS_VOTING) - && !modeattacking && !skipstats && (multiplayer || netgame)) + if (gamestate != GS_VOTING) { - UINT8 i; - for (i = 0; i < MAXPLAYERS; i++) + if ((cv_advancemap.value == 3) && !modeattacking && !skipstats && (multiplayer || netgame)) { - if (playeringame[i] && !players[i].spectator) + UINT8 i; + for (i = 0; i < MAXPLAYERS; i++) { - dovote = true; - break; + if (playeringame[i] && !players[i].spectator) + { + gameaction = ga_startvote; + return; + } } } + + forceresetplayers = false; } - if (dovote) - gameaction = ga_startvote; - else - { - if (gamestate != GS_VOTING) - forceresetplayers = false; - gameaction = ga_worlddone; - } + gameaction = ga_worlddone; } static void G_DoWorldDone(void) diff --git a/src/g_game.h b/src/g_game.h index 53c970d2..ad099bf2 100644 --- a/src/g_game.h +++ b/src/g_game.h @@ -54,7 +54,7 @@ extern tic_t timeinmap; // Ticker for time spent in level (used for levelcard di extern INT16 rw_maximums[NUM_WEAPONS]; // used in game menu -extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatspamprotection, cv_compactscoreboard, cv_chatbacktint; +extern consvar_t cv_chatwidth, cv_chatnotifications, cv_chatheight, cv_chattime, cv_consolechat, cv_chatspamprotection, cv_chatbacktint; extern consvar_t cv_crosshair, cv_crosshair2, cv_crosshair3, cv_crosshair4; extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove; extern consvar_t cv_turnaxis,cv_moveaxis,cv_brakeaxis,cv_aimaxis,cv_lookaxis,cv_fireaxis,cv_driftaxis; diff --git a/src/k_kart.c b/src/k_kart.c index 8f03934c..26e1b80f 100644 --- a/src/k_kart.c +++ b/src/k_kart.c @@ -464,7 +464,7 @@ boolean K_IsPlayerWanted(player_t *player) static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] = { //P-Odds 0 1 2 3 4 5 6 7 8 - /*Sneaker*/ {20, 0, 0, 3, 5, 5, 0, 0, 0 }, // Sneaker + /*Sneaker*/ {20, 0, 0, 3, 6, 6, 0, 0, 0 }, // Sneaker /*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 2, 5, 4, 0 }, // Rocket Sneaker /*Invincibility*/ { 0, 0, 0, 0, 0, 1, 5, 6,16 }, // Invincibility /*Banana*/ { 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana @@ -474,7 +474,7 @@ static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] = /*Mine*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Mine /*Ballhog*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Ballhog /*Self-Propelled Bomb*/ { 0, 0, 1, 1, 1, 2, 2, 3, 2 }, // Self-Propelled Bomb - /*Grow*/ { 0, 0, 0, 0, 1, 2, 4, 6, 4 }, // Grow + /*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 6, 4 }, // Grow /*Shrink*/ { 0, 0, 0, 0, 0, 0, 0, 1, 0 }, // Shrink /*Thunder Shield*/ { 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Thunder Shield /*Hyudoro*/ { 0, 0, 0, 0, 1, 2, 1, 0, 0 }, // Hyudoro @@ -483,14 +483,15 @@ static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] = /*Sneaker x3*/ { 0, 0, 0, 0, 3, 6, 5, 3, 0 }, // Sneaker x3 /*Banana x3*/ { 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Banana x3 /*Banana x10*/ { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // Banana x10 - /*Orbinaut x3*/ { 0, 0, 0, 1, 1, 1, 0, 0, 0 }, // Orbinaut x3 + /*Orbinaut x3*/ { 0, 0, 0, 1, 1, 0, 0, 0, 0 }, // Orbinaut x3 + /*Orbinaut x4*/ { 0, 0, 0, 0, 0, 1, 1, 0, 0 }, // Orbinaut x4 /*Jawz x2*/ { 0, 0, 0, 1, 1, 0, 0, 0, 0 } // Jawz x2 }; static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][6] = { //P-Odds 0 1 2 3 - /*Sneaker*/ { 3, 2, 2, 2 }, // Sneaker + /*Sneaker*/ { 2, 2, 2, 2 }, // Sneaker /*Rocket Sneaker*/ { 0, 0, 0, 0 }, // Rocket Sneaker /*Invincibility*/ { 4, 2, 1, 2 }, // Invincibility /*Banana*/ { 0, 0, 2, 0 }, // Banana @@ -509,7 +510,8 @@ static INT32 K_KartItemOddsBattle[NUMKARTRESULTS][6] = /*Sneaker x3*/ { 2, 0, 0, 2 }, // Sneaker x3 /*Banana x3*/ { 0, 1, 1, 1 }, // Banana x3 /*Banana x10*/ { 1, 0, 0, 1 }, // Banana x10 - /*Orbinaut x3*/ { 0, 2, 1, 2 }, // Orbinaut x3 + /*Orbinaut x3*/ { 0, 1, 1, 1 }, // Orbinaut x3 + /*Orbinaut x4*/ { 1, 1, 0, 1 }, // Orbinaut x4 /*Jawz x2*/ { 3, 2, 0, 2 } // Jawz x2 }; @@ -541,6 +543,10 @@ static void K_KartGetItemResult(player_t *player, SINT8 getitem) player->kartstuff[k_itemtype] = KITEM_ORBINAUT; player->kartstuff[k_itemamount] = 3; break; + case KRITEM_QUADORBINAUT: // Orbinaut x4 + player->kartstuff[k_itemtype] = KITEM_ORBINAUT; + player->kartstuff[k_itemamount] = 4; + break; case KRITEM_DUALJAWZ: // Jawz x2 player->kartstuff[k_itemtype] = KITEM_JAWZ; player->kartstuff[k_itemamount] = 2; @@ -709,6 +715,10 @@ static INT32 K_KartGetItemOdds(UINT8 pos, SINT8 item, fixed_t mashed) POWERITEMODDS(newodds); if (!cv_tripleorbinaut.value) newodds = 0; break; + case KRITEM_QUADORBINAUT: + POWERITEMODDS(newodds); + if (!cv_tripleorbinaut.value) newodds = 0; + break; case KRITEM_DUALJAWZ: POWERITEMODDS(newodds); if (!cv_dualjawz.value) newodds = 0; @@ -907,6 +917,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd) SETITEMRESULT(useodds, KRITEM_TRIPLEBANANA); // Banana x3 SETITEMRESULT(useodds, KRITEM_TENFOLDBANANA); // Banana x10 SETITEMRESULT(useodds, KRITEM_TRIPLEORBINAUT); // Orbinaut x3 + SETITEMRESULT(useodds, KRITEM_QUADORBINAUT); // Orbinaut x4 SETITEMRESULT(useodds, KRITEM_DUALJAWZ); // Jawz x2 #undef SETITEMRESULT @@ -1029,7 +1040,7 @@ void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid) nobumpx = mobj1->momx; nobumpy = mobj1->momy; }*/ - + distx = (mobj1->x + mobj2->momx) - (mobj2->x + mobj1->momx); disty = (mobj1->y + mobj2->momy) - (mobj2->y + mobj1->momy); @@ -2234,8 +2245,8 @@ void K_SpawnSparkleTrail(mobj_t *mo) sparkle = P_SpawnMobj(newx, newy, newz, MT_SPARKLETRAIL); - if (i == 0) - P_SetMobjState(sparkle, S_KARTINVULN_LARGE1); + //if (i == 0) + //P_SetMobjState(sparkle, S_KARTINVULN_LARGE1); P_SetTarget(&sparkle->target, mo); sparkle->destscale = mo->destscale; @@ -2244,6 +2255,8 @@ void K_SpawnSparkleTrail(mobj_t *mo) sparkle->color = mo->color; //sparkle->colorized = mo->colorized; } + + P_SetMobjState(sparkle, S_KARTINVULN_LARGE1); } void K_SpawnWipeoutTrail(mobj_t *mo, boolean translucent) @@ -3101,8 +3114,8 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd) player->kartstuff[k_deathsentence]--; } - /*if (player->kartstuff[k_lapanimation]) - player->kartstuff[k_lapanimation]--;*/ + if (player->kartstuff[k_lapanimation]) + player->kartstuff[k_lapanimation]--; if (G_BattleGametype() && (player->exiting || player->kartstuff[k_comebacktimer])) { @@ -4331,7 +4344,7 @@ void K_CheckBumpers(void) void K_CheckSpectateStatus(void) { - UINT8 respawnlist[MAXPLAYERS]; + UINT8 respawnlist[MAXPLAYERS]; UINT8 i, numingame = 0, numjoiners = 0; // Get the number of players in game, and the players to be de-spectated. @@ -4348,7 +4361,7 @@ void K_CheckSpectateStatus(void) if (players[i].exiting) // DON'T allow if anyone's exiting return; if (numingame < 2 || leveltime < starttime || mapreset) // Allow if the match hasn't started yet - continue; + continue; if (G_RaceGametype() && players[i].laps) // DON'T allow if the race is at 2 laps return; continue; @@ -4428,7 +4441,7 @@ static patch_t *kp_rocketsneaker[2]; static patch_t *kp_invincibility[13]; static patch_t *kp_banana[2]; static patch_t *kp_eggman[2]; -static patch_t *kp_orbinaut[2]; +static patch_t *kp_orbinaut[5]; static patch_t *kp_jawz[2]; static patch_t *kp_mine[2]; static patch_t *kp_ballhog[2]; @@ -4450,6 +4463,11 @@ static patch_t *kp_inputwheel[5]; static patch_t *kp_challenger[25]; +static patch_t *kp_lapanim_lap[7]; +static patch_t *kp_lapanim_final[11]; +static patch_t *kp_lapanim_number[10][3]; +static patch_t *kp_lapanim_emblem; + void K_LoadKartHUDGraphics(void) { INT32 i, j; @@ -4538,7 +4556,12 @@ void K_LoadKartHUDGraphics(void) } kp_banana[0] = W_CachePatchName("K_ITBANA", PU_HUDGFX); kp_eggman[0] = W_CachePatchName("K_ITEGGM", PU_HUDGFX); - kp_orbinaut[0] = W_CachePatchName("K_ITORBN", PU_HUDGFX); + sprintf(buffer, "K_ITORBx"); + for (i = 0; i < 4; i++) + { + buffer[7] = '1'+i; + kp_orbinaut[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); + } kp_jawz[0] = W_CachePatchName("K_ITJAWZ", PU_HUDGFX); kp_mine[0] = W_CachePatchName("K_ITMINE", PU_HUDGFX); kp_ballhog[0] = W_CachePatchName("K_ITBHOG", PU_HUDGFX); @@ -4566,7 +4589,7 @@ void K_LoadKartHUDGraphics(void) } kp_banana[1] = W_CachePatchName("K_ISBANA", PU_HUDGFX); kp_eggman[1] = W_CachePatchName("K_ISEGGM", PU_HUDGFX); - kp_orbinaut[1] = W_CachePatchName("K_ISORBN", PU_HUDGFX); + kp_orbinaut[4] = W_CachePatchName("K_ISORBN", PU_HUDGFX); kp_jawz[1] = W_CachePatchName("K_ISJAWZ", PU_HUDGFX); kp_mine[1] = W_CachePatchName("K_ISMINE", PU_HUDGFX); kp_ballhog[1] = W_CachePatchName("K_ISBHOG", PU_HUDGFX); @@ -4612,6 +4635,35 @@ void K_LoadKartHUDGraphics(void) buffer[7] = '0'+((i+1)%10); kp_challenger[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); } + + // Lap start animation + sprintf(buffer, "K_LAP0x"); + for (i = 0; i < 7; i++) + { + buffer[6] = '0'+(i+1); + kp_lapanim_lap[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); + } + + sprintf(buffer, "K_LAPFxx"); + for (i = 0; i < 11; i++) + { + buffer[6] = '0'+((i+1)/10); + buffer[7] = '0'+((i+1)%10); + kp_lapanim_final[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); + } + + sprintf(buffer, "K_LAPNxx"); + for (i = 0; i < 10; i++) + { + buffer[6] = '0'+i; + for (j = 0; j < 3; j++) + { + buffer[7] = '0'+(j+1); + kp_lapanim_number[i][j] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX); + } + } + + kp_lapanim_emblem = (patch_t *) W_CachePatchName("K_LAPE00", PU_HUDGFX); } //} @@ -4807,22 +4859,22 @@ static void K_drawKartItem(void) switch((stplyr->kartstuff[k_itemroulette] % (13*3)) / 3) { // Each case is handled in threes, to give three frames of in-game time to see the item on the roulette - case 0: localpatch = kp_sneaker[offset]; break; // Sneaker - case 1: localpatch = kp_banana[offset]; break; // Banana - case 2: localpatch = kp_orbinaut[offset]; break; // Orbinaut - case 3: localpatch = kp_mine[offset]; break; // Mine - case 4: localpatch = kp_grow[offset]; break; // Grow - case 5: localpatch = kp_hyudoro[offset]; break; // Hyudoro - case 6: localpatch = kp_rocketsneaker[offset]; break; // Rocket Sneaker - case 7: localpatch = kp_jawz[offset]; break; // Jawz - case 8: localpatch = kp_selfpropelledbomb[offset]; break; // Self-Propelled Bomb - case 9: localpatch = kp_shrink[offset]; break; // Shrink - case 10: localpatch = localinv; break; // Invincibility - case 11: localpatch = kp_eggman[offset]; break; // Eggman Monitor - case 12: localpatch = kp_ballhog[offset]; break; // Ballhog - case 13: localpatch = kp_thundershield[offset]; break; // Thunder Shield - //case 14: localpatch = kp_pogospring[offset]; break; // Pogo Spring - //case 15: localpatch = kp_kitchensink[offset]; break; // Kitchen Sink + case 0: localpatch = kp_sneaker[offset]; break; // Sneaker + case 1: localpatch = kp_banana[offset]; break; // Banana + case 2: localpatch = kp_orbinaut[3+offset]; break; // Orbinaut + case 3: localpatch = kp_mine[offset]; break; // Mine + case 4: localpatch = kp_grow[offset]; break; // Grow + case 5: localpatch = kp_hyudoro[offset]; break; // Hyudoro + case 6: localpatch = kp_rocketsneaker[offset]; break; // Rocket Sneaker + case 7: localpatch = kp_jawz[offset]; break; // Jawz + case 8: localpatch = kp_selfpropelledbomb[offset]; break; // Self-Propelled Bomb + case 9: localpatch = kp_shrink[offset]; break; // Shrink + case 10: localpatch = localinv; break; // Invincibility + case 11: localpatch = kp_eggman[offset]; break; // Eggman Monitor + case 12: localpatch = kp_ballhog[offset]; break; // Ballhog + case 13: localpatch = kp_thundershield[offset]; break; // Thunder Shield + //case 14: localpatch = kp_pogospring[offset]; break; // Pogo Spring + //case 15: localpatch = kp_kitchensink[offset]; break; // Kitchen Sink default: break; } } @@ -4876,7 +4928,10 @@ static void K_drawKartItem(void) case KITEM_INVINCIBILITY: localpatch = localinv; localbg = kp_itembg[offset+1]; break; case KITEM_BANANA: localpatch = kp_banana[offset]; break; case KITEM_EGGMAN: localpatch = kp_eggman[offset]; break; - case KITEM_ORBINAUT: localpatch = kp_orbinaut[offset]; break; + case KITEM_ORBINAUT: + localpatch = kp_orbinaut[(splitscreen ? 4 + : min(stplyr->kartstuff[k_itemamount]-1, 3))]; + break; case KITEM_JAWZ: localpatch = kp_jawz[offset]; break; case KITEM_MINE: localpatch = kp_mine[offset]; break; case KITEM_BALLHOG: localpatch = kp_ballhog[offset]; break; @@ -5058,7 +5113,7 @@ static void K_DrawKartPositionNum(INT32 num) INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTORIGHT); if (stplyr->kartstuff[k_positiondelay] || stplyr->exiting) - scale = FixedMul(scale, 3*FRACUNIT/2); + scale *= 2; if (splitscreen) scale /= 2; @@ -6032,6 +6087,9 @@ static void K_drawInput(void) #undef drawbutt +#undef BUTTW +#undef BUTTH + y -= 1; if (!cmd->driftturn) // no turn @@ -6091,13 +6149,48 @@ static void K_drawChallengerScreen(void) V_DrawScaledPatch(0, 0, 0, kp_challenger[anim[offset]]); } -static void K_drawCheckpointDebugger(void) +static void K_drawLapStartAnim(void) { - if ((numstarposts/2 + stplyr->starpostnum) >= numstarposts) - V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts)); + // This is an EVEN MORE insanely complicated animation. + const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation]; + + V_DrawScaledPatch(BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)), + 64 - (32*max(0, progress-76)), + 0, kp_lapanim_emblem); + + if (stplyr->laps == (UINT8)(cv_numlaps.value - 1)) + { + V_DrawScaledPatch(27 - (32*max(0, progress-76)), + 40, + 0, kp_lapanim_final[min(progress/2, 10)]); + + if (progress/2-12 >= 0) + { + V_DrawScaledPatch(194 + (32*max(0, progress-76)), + 40, + 0, kp_lapanim_lap[min(progress/2-12, 6)]); + } + } else - V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Skip: %d)", stplyr->starpostnum, numstarposts, (numstarposts/2 + stplyr->starpostnum))); - V_DrawString(8, 192, 0, va("Waypoint dist: Prev %d, Next %d", stplyr->kartstuff[k_prevcheck], stplyr->kartstuff[k_nextcheck])); + { + V_DrawScaledPatch(61 - (32*max(0, progress-76)), + 40, + 0, kp_lapanim_lap[min(progress/2, 6)]); + + if (progress/2-8 >= 0) + { + V_DrawScaledPatch(194 + (32*max(0, progress-76)), + 40, + 0, kp_lapanim_number[(((UINT32)stplyr->laps+1) / 10)][min(progress/2-8, 2)]); + + if (progress/2-10 >= 0) + { + V_DrawScaledPatch(221 + (32*max(0, progress-76)), + 40, + 0, kp_lapanim_number[(((UINT32)stplyr->laps+1) % 10)][min(progress/2-10, 2)]); + } + } + } } void K_drawKartFreePlay(UINT32 flashtime) @@ -6111,6 +6204,15 @@ void K_drawKartFreePlay(UINT32 flashtime) LAPS_Y+3, V_SNAPTOBOTTOM|V_SNAPTORIGHT, "FREE PLAY"); } +static void K_drawCheckpointDebugger(void) +{ + if ((numstarposts/2 + stplyr->starpostnum) >= numstarposts) + V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Can finish)", stplyr->starpostnum, numstarposts)); + else + V_DrawString(8, 184, 0, va("Checkpoint: %d / %d (Skip: %d)", stplyr->starpostnum, numstarposts, (numstarposts/2 + stplyr->starpostnum))); + V_DrawString(8, 192, 0, va("Waypoint dist: Prev %d, Next %d", stplyr->kartstuff[k_prevcheck], stplyr->kartstuff[k_nextcheck])); +} + void K_drawKartHUD(void) { boolean isfreeplay = false; @@ -6237,15 +6339,21 @@ void K_drawKartHUD(void) } } - if (stplyr->exiting && G_RaceGametype()) - K_drawKartFinish(); - - if (cv_kartdebugcheckpoint.value) - K_drawCheckpointDebugger(); + // Race overlays + if (G_RaceGametype()) + { + if (stplyr->exiting) + K_drawKartFinish(); + else if (stplyr->kartstuff[k_lapanimation] && !splitscreen) + K_drawLapStartAnim(); + } // Draw FREE PLAY. if (isfreeplay && !stplyr->spectator && timeinmap > 113) K_drawKartFreePlay(leveltime); + + if (cv_kartdebugcheckpoint.value) + K_drawCheckpointDebugger(); } //} diff --git a/src/m_menu.c b/src/m_menu.c index 07a2a9c3..b23f28a5 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -314,7 +314,7 @@ static void M_RestartAudio(void); //Misc menu_t /*OP_DataOptionsDef,*/ OP_ScreenshotOptionsDef, OP_EraseDataDef; -menu_t OP_HUDOptionsDef; +menu_t OP_HUDOptionsDef, OP_ChatOptionsDef; menu_t OP_GameOptionsDef, OP_ServerOptionsDef; //menu_t OP_NetgameOptionsDef, OP_GametypeOptionsDef; menu_t OP_MonitorToggleDef; @@ -338,6 +338,7 @@ static void M_DrawTimeAttackMenu(void); static void M_DrawSetupChoosePlayerMenu(void); static void M_DrawControl(void); static void M_DrawVideoMenu(void); +static void M_DrawHUDOptions(void); static void M_DrawVideoMode(void); //static void M_DrawMonitorToggles(void); #ifdef HWRENDER @@ -1251,22 +1252,17 @@ static menuitem_t OP_VideoOptionsMenu[] = {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "Gamma", &cv_usegamma, 30}, - {IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 45}, - // highlight info - (GOOD HIGHLIGHT, WARNING HIGHLIGHT) - 55 (see M_DrawVideoMenu) + {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 45}, + //{IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist", &cv_drawdist_nights, 55}, + {IT_STRING | IT_CVAR, NULL, "Weather Draw Distance",&cv_drawdist_precip, 55}, + {IT_STRING | IT_CVAR, NULL, "Weather Density", &cv_precipdensity, 65}, + {IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 75}, - {IT_STRING | IT_CVAR, NULL, "Draw Distance", &cv_drawdist, 70}, - //{IT_STRING | IT_CVAR, NULL, "NiGHTS Draw Dist", &cv_drawdist_nights, 80}, - {IT_STRING | IT_CVAR, NULL, "Weather Draw Distance",&cv_drawdist_precip, 80}, - {IT_STRING | IT_CVAR, NULL, "Weather Density", &cv_precipdensity, 90}, - {IT_STRING | IT_CVAR, NULL, "Skyboxes", &cv_skybox, 100}, - - {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 115}, - {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 125}, - - {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 140}, + {IT_STRING | IT_CVAR, NULL, "Show FPS", &cv_ticrate, 90}, + {IT_STRING | IT_CVAR, NULL, "Vertical Sync", &cv_vidwait, 100}, #ifdef HWRENDER - {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 155}, + {IT_SUBMENU|IT_STRING, NULL, "OpenGL Options...", &OP_OpenGLOptionsDef, 115}, #endif }; @@ -1277,14 +1273,12 @@ enum op_video_fullscreen, #endif op_video_gamma, - op_video_hili, op_video_dd, op_video_wdd, op_video_wd, op_video_skybox, op_video_fps, op_video_vsync, - op_video_consoletext, #ifdef HWRENDER op_video_ogl, #endif @@ -1423,19 +1417,30 @@ static menuitem_t OP_HUDOptionsMenu[] = {IT_STRING | IT_CVAR | IT_CV_SLIDER, NULL, "HUD Visibility", &cv_translucenthud, 20}, - {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Minimap Visibility", &cv_kartminimap, 35}, - {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 45}, - {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 55}, + {IT_STRING | IT_SUBMENU, NULL, "Online chat options...",&OP_ChatOptionsDef, 35}, + {IT_STRING | IT_CVAR, NULL, "Background Glass", &cons_backcolor, 45}, - //{IT_STRING | IT_CVAR, NULL, "Chat mode", &cv_consolechat, 70}, -- will ANYONE who doesn't know how to use the console want to touch this {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Chat box width", &cv_chatwidth, 70}, + NULL, "Minimap Visibility", &cv_kartminimap, 60}, + {IT_STRING | IT_CVAR, NULL, "Speedometer Display", &cv_kartspeedometer, 70}, + {IT_STRING | IT_CVAR, NULL, "Show \"CHECK\"", &cv_kartcheck, 80}, + + {IT_STRING | IT_CVAR, NULL, "Menu Highlights", &cons_menuhighlight, 95}, + // highlight info - (GOOD HIGHLIGHT, WARNING HIGHLIGHT) - 105 (see M_DrawHUDOptions) + + {IT_STRING | IT_CVAR, NULL, "Console Text Size", &cv_constextsize, 120}, +}; + +static menuitem_t OP_ChatOptionsMenu[] = +{ + // will ANYONE who doesn't know how to use the console want to touch this one? + {IT_STRING | IT_CVAR, NULL, "Chat mode", &cv_consolechat, 10}, // nonetheless... {IT_STRING | IT_CVAR | IT_CV_SLIDER, - NULL, "Chat box height", &cv_chatheight, 80}, - {IT_STRING | IT_CVAR, NULL, "Chat fadeout time", &cv_chattime, 90}, - {IT_STRING | IT_CVAR, NULL, "Show tint behind messages",&cv_chatbacktint, 100}, - {IT_STRING | IT_CVAR, NULL, "Background Color", &cons_backcolor, 110}, + NULL, "Window width", &cv_chatwidth, 25}, + {IT_STRING | IT_CVAR | IT_CV_SLIDER, + NULL, "Window height", &cv_chatheight, 35}, + {IT_STRING | IT_CVAR, NULL, "Message fadeout time", &cv_chattime, 50}, + {IT_STRING | IT_CVAR, NULL, "Show tint behind messages",&cv_chatbacktint, 60}, }; static menuitem_t OP_GameOptionsMenu[] = @@ -1941,12 +1946,14 @@ menu_t OP_HUDOptionsDef = sizeof (OP_HUDOptionsMenu)/sizeof (menuitem_t), &OP_MainDef, OP_HUDOptionsMenu, - M_DrawGenericMenu, //M_DrawHUDOptions, + M_DrawHUDOptions, 30, 30, 0, NULL }; +menu_t OP_ChatOptionsDef = DEFAULTMENUSTYLE("M_HUD", OP_ChatOptionsMenu, &OP_HUDOptionsDef, 30, 30); + menu_t OP_GameOptionsDef = DEFAULTMENUSTYLE("M_GAME", OP_GameOptionsMenu, &OP_MainDef, 30, 30); menu_t OP_ServerOptionsDef = DEFAULTMENUSTYLE("M_SERVER", OP_ServerOptionsMenu, &OP_MainDef, 24, 30); @@ -8239,12 +8246,21 @@ static void M_VideoModeMenu(INT32 choice) } static void M_DrawVideoMenu(void) +{ + M_DrawGenericMenu(); + + V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x, currentMenu->y + OP_VideoOptionsMenu[0].alphaKey, + (SCR_IsAspectCorrect(vid.width, vid.height) ? recommendedflags : highlightflags), + va("%dx%d", vid.width, vid.height)); +} + +static void M_DrawHUDOptions(void) { const char *str0 = ")"; const char *str1 = " Warning highlight"; const char *str2 = ","; const char *str3 = "Good highlight"; - INT32 x = BASEVIDWIDTH - currentMenu->x + 2, y = currentMenu->y + 55; + INT32 x = BASEVIDWIDTH - currentMenu->x + 2, y = currentMenu->y + 105; INT32 w0 = V_StringWidth(str0, 0), w1 = V_StringWidth(str1, 0), w2 = V_StringWidth(str2, 0), w3 = V_StringWidth(str3, 0); M_DrawGenericMenu(); @@ -8258,10 +8274,6 @@ static void M_DrawVideoMenu(void) x -= w3; V_DrawString(x, y, recommendedflags, str3); V_DrawRightAlignedString(x, y, highlightflags, "("); - - V_DrawRightAlignedString(BASEVIDWIDTH - currentMenu->x, currentMenu->y + OP_VideoOptionsMenu[0].alphaKey, - (SCR_IsAspectCorrect(vid.width, vid.height) ? recommendedflags : highlightflags), - va("%dx%d", vid.width, vid.height)); } // Draw the video modes list, a-la-Quake diff --git a/src/p_spec.c b/src/p_spec.c index 4b186e9d..02d94d90 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -4174,7 +4174,7 @@ DoneSection2: if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)") { player->laps++; - //player->kartstuff[k_lapanimation] = 80; + player->kartstuff[k_lapanimation] = 80; if (player->pflags & PF_NIGHTSMODE) player->drillmeter += 48*20; diff --git a/src/p_user.c b/src/p_user.c index 771161b3..aaea6a21 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -8369,7 +8369,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall } else if (P_AnalogMove(player)) // Analog angle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y); - else if (demoplayback) + else if (demoplayback && leveltime > starttime) { angle = focusangle; focusangle = R_PointToAngle2(thiscam->x, thiscam->y, mo->x, mo->y); @@ -8384,7 +8384,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall else angle = focusangle + FixedAngle(camrotate*FRACUNIT); - if (!resetcalled && (cv_analog.value || demoplayback) + if (!resetcalled && (leveltime > starttime) && (cv_analog.value || demoplayback) && ((thiscam == &camera && t_cam_rotate != -42) || (thiscam == &camera2 && t_cam2_rotate != -42) || (thiscam == &camera3 && t_cam3_rotate != -42) diff --git a/src/st_stuff.c b/src/st_stuff.c index 5c2c1c03..ac3391de 100644 --- a/src/st_stuff.c +++ b/src/st_stuff.c @@ -797,24 +797,16 @@ static void ST_drawLevelTitle(void) } { - const char *subttlstr; - dupcalc = (dupcalc - BASEVIDWIDTH)>>1; V_DrawFill(sub - dupcalc, bary+9, ttlnumxpos+dupcalc + 1, 2, 31); V_DrawDiag(sub + ttlnumxpos + 1, bary, 11, 31); V_DrawFill(sub - dupcalc, bary, ttlnumxpos+dupcalc, 10, gtc); V_DrawDiag(sub + ttlnumxpos, bary, 10, gtc); - if (encoremode) - subttlstr = "Encore Mode"; - else if (subttl[0]) - subttlstr = subttl; - else if (mapheaderinfo[gamemap-1]->menuflags & LF2_HIDEINMENU) - subttlstr = "MAP HELL"; - else - subttlstr = va("%s Mode", gametype_cons_t[gametype].strvalue); - - V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, subttlstr); + if (subttl[0]) + V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, subttl); + //else + //V_DrawRightAlignedString(sub + zonexpos - 8, bary+1, V_ALLOWLOWERCASE, va("%s Mode", gametype_cons_t[gametype].strvalue)); } ttlnumxpos += sub; diff --git a/src/y_inter.c b/src/y_inter.c index 831adeac..14421ad7 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -759,7 +759,8 @@ void Y_StartIntermission(void) { // Calculate who won Y_CalculateMatchData(false, Y_CompareBattle); - S_ChangeMusicInternal("racent", true); // loop it + if (cv_inttime.value > 0) + S_ChangeMusicInternal("racent", true); // loop it break; } case int_race: // (time-only race) @@ -1180,18 +1181,15 @@ void Y_VoteTicker(void) { INT32 i; - if (paused || P_AutoPause()) + if (paused || P_AutoPause() || !voteclient.loaded) return; votetic++; if (votetic == voteendtic) { - if (voteclient.loaded) - { - Y_EndVote(); - Y_FollowIntermission(); - } + Y_EndVote(); + Y_FollowIntermission(); return; } @@ -1232,17 +1230,14 @@ void Y_VoteTicker(void) if (numvotes < 1) // Whoops! Get outta here. { - if (voteclient.loaded) - { - Y_EndVote(); - Y_FollowIntermission(); - } + Y_EndVote(); + Y_FollowIntermission(); return; } voteclient.rtics--; - if (voteclient.rtics <= 0 && voteclient.loaded) + if (voteclient.rtics <= 0) { voteclient.roffset++; voteclient.rtics = min(20, (3*voteclient.roffset/4)+5);