Merge branch 'sonicitems' of https://git.magicalgirl.moe/KartKrew/Kart into sonicitems

This commit is contained in:
TehRealSalt 2018-07-04 19:07:46 -04:00
commit 3169540a8e
10 changed files with 75 additions and 50 deletions

View file

@ -296,15 +296,15 @@ static void D_Display(void)
{ {
// set for all later // set for all later
wipedefindex = gamestate; // wipe_xxx_toblack wipedefindex = gamestate; // wipe_xxx_toblack
if (gamestate == GS_INTERMISSION) if (gamestate == GS_TITLESCREEN && wipegamestate != GS_INTRO)
wipedefindex = wipe_multinter_toblack;
else if (gamestate == GS_INTERMISSION)
{ {
if (intertype == int_spec) // Special Stage if (intertype == int_spec) // Special Stage
wipedefindex = wipe_specinter_toblack; wipedefindex = wipe_specinter_toblack;
else //if (intertype != int_coop) // Multiplayer else //if (intertype != int_coop) // Multiplayer
wipedefindex = wipe_multinter_toblack; wipedefindex = wipe_multinter_toblack;
} }
else if (gamestate == GS_VOTING)
wipedefindex = wipe_multinter_toblack;
if (rendermode != render_none) if (rendermode != render_none)
{ {
@ -385,6 +385,8 @@ static void D_Display(void)
case GS_TITLESCREEN: case GS_TITLESCREEN:
F_TitleScreenDrawer(); F_TitleScreenDrawer();
if (wipe)
wipedefindex = wipe_titlescreen_toblack;
break; break;
case GS_WAITINGPLAYERS: case GS_WAITINGPLAYERS:

View file

@ -2241,6 +2241,9 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
emeralds = 0; emeralds = 0;
} }
if (modeattacking) // i remember moving this here in internal fixed a heisenbug so
SetPlayerSkinByNum(0, cv_chooseskin.value-1);
#ifdef HAVE_BLUA #ifdef HAVE_BLUA
LUAh_MapChange(); LUAh_MapChange();
#endif #endif
@ -2252,15 +2255,6 @@ static void Got_Mapcmd(UINT8 **cp, INT32 playernum)
if (timingdemo) if (timingdemo)
G_DoneLevelLoad(); G_DoneLevelLoad();
if (modeattacking)
{
SetPlayerSkinByNum(0, cv_chooseskin.value-1);
players[0].skincolor = cv_playercolor.value; // srb2kart
// a copy of color
if (players[0].mo)
players[0].mo->color = players[0].skincolor;
}
if (metalrecording) if (metalrecording)
G_BeginMetal(); G_BeginMetal();
if (demorecording) // Okay, level loaded, character spawned and skinned, if (demorecording) // Okay, level loaded, character spawned and skinned,

View file

@ -3182,6 +3182,14 @@ static void readwipes(MYFILE *f)
else if (fastcmp(pword, "FINAL")) else if (fastcmp(pword, "FINAL"))
wipeoffset = wipe_specinter_final; wipeoffset = wipe_specinter_final;
} }
else if (fastncmp(word, "VOTING_", 10))
{
pword = word + 10;
if (fastcmp(pword, "TOBLACK"))
wipeoffset = wipe_specinter_toblack;
else if (fastcmp(pword, "FINAL"))
wipeoffset = wipe_specinter_final;
}
else if (fastncmp(word, "MULTINTER_", 10)) else if (fastncmp(word, "MULTINTER_", 10))
{ {
pword = word + 10; pword = word + 10;

View file

@ -528,6 +528,7 @@ static const char *credits[] = {
"\"Nev3r\"", "\"Nev3r\"",
"\"Ritz\"", "\"Ritz\"",
"\"Spherallic\"", "\"Spherallic\"",
"\"DirkTheHusky\"",
"", "",
"\1Produced By", "\1Produced By",
"Kart Krew", "Kart Krew",

View file

@ -82,6 +82,7 @@ enum
wipe_level_toblack, wipe_level_toblack,
wipe_intermission_toblack, wipe_intermission_toblack,
wipe_voting_toblack,
wipe_continuing_toblack, wipe_continuing_toblack,
wipe_titlescreen_toblack, wipe_titlescreen_toblack,
wipe_timeattack_toblack, wipe_timeattack_toblack,
@ -98,6 +99,7 @@ enum
wipe_level_final, wipe_level_final,
wipe_intermission_final, wipe_intermission_final,
wipe_voting_final,
wipe_continuing_final, wipe_continuing_final,
wipe_titlescreen_final, wipe_titlescreen_final,
wipe_timeattack_final, wipe_timeattack_final,
@ -111,9 +113,10 @@ enum
wipe_specinter_final, wipe_specinter_final,
wipe_multinter_final, wipe_multinter_final,
NUMWIPEDEFS NUMWIPEDEFS,
WIPEFINALSHIFT = wipe_level_final - wipe_level_toblack
}; };
#define WIPEFINALSHIFT 13
extern UINT8 wipedefs[NUMWIPEDEFS]; extern UINT8 wipedefs[NUMWIPEDEFS];
#endif #endif

View file

@ -47,6 +47,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
0, // wipe_level_toblack 0, // wipe_level_toblack
UINT8_MAX, // wipe_intermission_toblack UINT8_MAX, // wipe_intermission_toblack
0, // wipe_voting_toblack,
UINT8_MAX, // wipe_continuing_toblack UINT8_MAX, // wipe_continuing_toblack
3, // wipe_titlescreen_toblack 3, // wipe_titlescreen_toblack
0, // wipe_timeattack_toblack 0, // wipe_timeattack_toblack
@ -62,6 +63,7 @@ UINT8 wipedefs[NUMWIPEDEFS] = {
0, // wipe_level_final 0, // wipe_level_final
0, // wipe_intermission_final 0, // wipe_intermission_final
0, // wipe_voting_final
0, // wipe_continuing_final 0, // wipe_continuing_final
3, // wipe_titlescreen_final 3, // wipe_titlescreen_final
0, // wipe_timeattack_final 0, // wipe_timeattack_final

View file

@ -138,7 +138,7 @@ const UINT8 KartColor_Opposite[MAXSKINCOLORS*2] =
SKINCOLOR_INDIGO,8, // 26 // SKINCOLOR_YELLOW SKINCOLOR_INDIGO,8, // 26 // SKINCOLOR_YELLOW
SKINCOLOR_INDIGO,8, // 27 // SKINCOLOR_CANARY SKINCOLOR_INDIGO,8, // 27 // SKINCOLOR_CANARY
SKINCOLOR_BROWN,8, // 28 // SKINCOLOR_PEACH SKINCOLOR_BROWN,8, // 28 // SKINCOLOR_PEACH
SKINCOLOR_BLUEBERRY,8, // 29 // SKINCOLOR_CREAMSICLE SKINCOLOR_BLUEBERRY,8, // 29 // SKINCOLOR_CREAMSICLE
SKINCOLOR_LAVENDER,8, // 30 // SKINCOLOR_GOLD SKINCOLOR_LAVENDER,8, // 30 // SKINCOLOR_GOLD
SKINCOLOR_BEIGE,8, // 31 // SKINCOLOR_CARAMEL SKINCOLOR_BEIGE,8, // 31 // SKINCOLOR_CARAMEL
SKINCOLOR_PURPLE,8, // 32 // SKINCOLOR_VOMIT SKINCOLOR_PURPLE,8, // 32 // SKINCOLOR_VOMIT
@ -246,7 +246,7 @@ UINT8 colortranslations[MAXSKINCOLORS][16] = {
{224, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246}, // SKINCOLOR_SAPPHIRE, removed for other colors {224, 225, 226, 228, 229, 231, 232, 234, 235, 237, 238, 240, 241, 243, 244, 246}, // SKINCOLOR_SAPPHIRE, removed for other colors
{160, 160, 160, 184, 184, 184, 185, 185, 185, 186, 187, 187, 188, 188, 189, 190}, // SKINCOLOR_JADE, removed for other colors {160, 160, 160, 184, 184, 184, 185, 185, 185, 186, 187, 187, 188, 188, 189, 190}, // SKINCOLOR_JADE, removed for other colors
{224, 225, 226, 212, 213, 213, 214, 215, 220, 221, 172, 222, 173, 223, 174, 175}, // SKINCOLOR_FROST, merged into Aqua {224, 225, 226, 212, 213, 213, 214, 215, 220, 221, 172, 222, 173, 223, 174, 175}, // SKINCOLOR_FROST, merged into Aqua
{ 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55}, // SKINCOLOR_CARAMEL, new Caramel was previously Shiny Caramel { 72, 73, 74, 75, 76, 77, 78, 79, 48, 49, 50, 51, 52, 53, 54, 55}, // SKINCOLOR_CARAMEL, new Caramel was previously Shiny Caramel
{ 1, 145, 125, 73, 83, 114, 106, 180, 187, 168, 219, 205, 236, 206, 199, 255}, // SKINCOLOR_RAINBOW, is Vomit 2.0 { 1, 145, 125, 73, 83, 114, 106, 180, 187, 168, 219, 205, 236, 206, 199, 255}, // SKINCOLOR_RAINBOW, is Vomit 2.0
*/ */
}; };
@ -851,7 +851,7 @@ static void K_KartItemRoulette(player_t *player, ticcmd_t *cmd)
if (pingame == 1 && oddsvalid[0]) // Record Attack, or just alone if (pingame == 1 && oddsvalid[0]) // Record Attack, or just alone
useodds = 0; useodds = 0;
else if (pdis <= 0) // (64*14) * 0 = 0 else if (pdis <= 0) // (64*14) * 0 = 0
useodds = disttable[0]; useodds = disttable[0];
else if (pdis > distvar * ((12 * distlen) / 14)) // (64*14) * 12 = 10752 else if (pdis > distvar * ((12 * distlen) / 14)) // (64*14) * 12 = 10752
useodds = disttable[distlen-1]; useodds = disttable[distlen-1];
else else
@ -1241,6 +1241,26 @@ void K_KartMoveAnimation(player_t *player)
} }
} }
static void K_TauntVoiceTimers(player_t *player)
{
if (!player)
return;
player->kartstuff[k_tauntvoices] = 6*TICRATE;
player->kartstuff[k_voices] = 4*TICRATE;
}
static void K_RegularVoiceTimers(player_t *player)
{
if (!player)
return;
player->kartstuff[k_voices] = 4*TICRATE;
if (player->kartstuff[k_tauntvoices] < 4*TICRATE)
player->kartstuff[k_tauntvoices] = 4*TICRATE;
}
static void K_PlayTauntSound(mobj_t *source) static void K_PlayTauntSound(mobj_t *source)
{ {
if (source->player && source->player->kartstuff[k_tauntvoices]) // Prevents taunt sounds from playing every time the button is pressed if (source->player && source->player->kartstuff[k_tauntvoices]) // Prevents taunt sounds from playing every time the button is pressed
@ -1248,11 +1268,7 @@ static void K_PlayTauntSound(mobj_t *source)
S_StartSound(source, sfx_taunt1+P_RandomKey(4)); S_StartSound(source, sfx_taunt1+P_RandomKey(4));
if (source->player) K_TauntVoiceTimers(source->player);
{
source->player->kartstuff[k_tauntvoices] = 6*TICRATE;
source->player->kartstuff[k_voices] = 3*TICRATE;
}
} }
static void K_PlayOvertakeSound(mobj_t *source) static void K_PlayOvertakeSound(mobj_t *source)
@ -1269,26 +1285,14 @@ static void K_PlayOvertakeSound(mobj_t *source)
S_StartSound(source, sfx_slow); S_StartSound(source, sfx_slow);
if (source->player) K_RegularVoiceTimers(source->player);
{
source->player->kartstuff[k_voices] = 3*TICRATE;
if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE)
source->player->kartstuff[k_tauntvoices] = 3*TICRATE;
}
} }
static void K_PlayHitEmSound(mobj_t *source) static void K_PlayHitEmSound(mobj_t *source)
{ {
S_StartSound(source, sfx_hitem); S_StartSound(source, sfx_hitem);
if (source->player) K_RegularVoiceTimers(source->player);
{
source->player->kartstuff[k_voices] = 3*TICRATE;
if (source->player->kartstuff[k_tauntvoices] < 3*TICRATE)
source->player->kartstuff[k_tauntvoices] = 3*TICRATE;
}
} }
void K_MomentumToFacing(player_t *player) void K_MomentumToFacing(player_t *player)
@ -2142,7 +2146,7 @@ static mobj_t *K_FindLastTrailMobj(player_t *player)
if (!player || !(trail = player->mo) || !player->mo->hnext || !player->mo->hnext->health) if (!player || !(trail = player->mo) || !player->mo->hnext || !player->mo->hnext->health)
return NULL; return NULL;
while (trail->hnext && !P_MobjWasRemoved(trail->hnext) && trail->hnext->health) while (trail->hnext && !P_MobjWasRemoved(trail->hnext) && trail->hnext->health)
{ {
trail = trail->hnext; trail = trail->hnext;
@ -3273,8 +3277,11 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (!player->exiting) if (!player->exiting)
{ {
if (player->kartstuff[k_oldposition] <= player->kartstuff[k_position]) // But first, if you lost a place, if (player->kartstuff[k_oldposition] < player->kartstuff[k_position]) // But first, if you lost a place,
{
player->kartstuff[k_oldposition] = player->kartstuff[k_position]; // then the other player taunts. player->kartstuff[k_oldposition] = player->kartstuff[k_position]; // then the other player taunts.
K_RegularVoiceTimers(player); // and you can't for a bit
}
else if (player->kartstuff[k_oldposition] > player->kartstuff[k_position]) // Otherwise, else if (player->kartstuff[k_oldposition] > player->kartstuff[k_position]) // Otherwise,
{ {
K_PlayOvertakeSound(player->mo); // Say "YOU'RE TOO SLOW!" K_PlayOvertakeSound(player->mo); // Say "YOU'RE TOO SLOW!"
@ -3792,7 +3799,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
// Start charging once you're given the opportunity. // Start charging once you're given the opportunity.
if (leveltime >= starttime-(2*TICRATE) && leveltime <= starttime) if (leveltime >= starttime-(2*TICRATE) && leveltime <= starttime)
{ {
if (cmd->buttons & BT_ACCELERATE) if (cmd->buttons & BT_ACCELERATE)
player->kartstuff[k_boostcharge]++; player->kartstuff[k_boostcharge]++;
else else
@ -3815,7 +3822,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
if (player->kartstuff[k_sneakertimer] >= 70) if (player->kartstuff[k_sneakertimer] >= 70)
S_StartSound(player->mo, sfx_s25f); // Special sound for the perfect start boost! S_StartSound(player->mo, sfx_s25f); // Special sound for the perfect start boost!
else if (player->kartstuff[k_sneakertimer] >= sneakertime) else if (player->kartstuff[k_sneakertimer] >= sneakertime)
S_StartSound(player->mo, sfx_cdfm01); // Sneaker boost sound for big boost S_StartSound(player->mo, sfx_cdfm01); // Sneaker boost sound for big boost
else else
S_StartSound(player->mo, sfx_s23c); // Drift boost sound for small boost S_StartSound(player->mo, sfx_s23c); // Drift boost sound for small boost
} }
@ -4499,7 +4506,7 @@ static void K_drawKartItem(void)
{ {
V_DrawScaledPatch(ITEM_X+28, ITEM_Y+41, V_HUDTRANS|splitflags, kp_itemx); V_DrawScaledPatch(ITEM_X+28, ITEM_Y+41, V_HUDTRANS|splitflags, kp_itemx);
V_DrawKartString(ITEM_X+38, ITEM_Y+36, V_HUDTRANS|splitflags, va("%d", stplyr->kartstuff[k_itemamount])); V_DrawKartString(ITEM_X+38, ITEM_Y+36, V_HUDTRANS|splitflags, va("%d", stplyr->kartstuff[k_itemamount]));
} }
} }
else else
V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch); V_DrawScaledPatch(ITEM_X, ITEM_Y, V_HUDTRANS|splitflags, localpatch);

View file

@ -241,6 +241,7 @@ menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef;
// Single Player // Single Player
//static void M_LoadGame(INT32 choice); //static void M_LoadGame(INT32 choice);
static void M_TimeAttack(INT32 choice); static void M_TimeAttack(INT32 choice);
static boolean M_QuitTimeAttackMenu(void);
//static void M_NightsAttack(INT32 choice); //static void M_NightsAttack(INT32 choice);
static void M_Statistics(INT32 choice); static void M_Statistics(INT32 choice);
static void M_HandleStaffReplay(INT32 choice); static void M_HandleStaffReplay(INT32 choice);
@ -1684,7 +1685,7 @@ static menu_t SP_TimeAttackDef =
M_DrawTimeAttackMenu, M_DrawTimeAttackMenu,
34, 40, 34, 40,
0, 0,
NULL M_QuitTimeAttackMenu
}; };
static menu_t SP_ReplayDef = static menu_t SP_ReplayDef =
{ {
@ -3784,20 +3785,21 @@ static void M_PatchSkinNameTable(void)
if (skins[j].name[0] != '\0') if (skins[j].name[0] != '\0')
{ {
skins_cons_t[j].strvalue = skins[j].name; skins_cons_t[j].strvalue = skins[j].name;
skins_cons_t[j].value = j+1; skins_cons_t[j].value = j;
} }
else else
{ {
skins_cons_t[j].strvalue = NULL; skins_cons_t[j].strvalue = NULL;
skins_cons_t[j].value = 0; skins_cons_t[j].value = 0;
break;
} }
} }
CV_SetValue(&cv_chooseskin, cv_chooseskin.value); // This causes crash sometimes?! j = R_SkinAvailable(cv_skin.string);
if (j == -1)
j = 0;
CV_SetValue(&cv_chooseskin, 1); CV_SetValue(&cv_chooseskin, j+1); // This causes crash sometimes?!
CV_AddValue(&cv_chooseskin, -1);
CV_AddValue(&cv_chooseskin, 1);
return; return;
} }
@ -3831,7 +3833,7 @@ boolean M_CanShowLevelInList(INT32 mapnum, INT32 gt)
{ {
case LLM_CREATESERVER: case LLM_CREATESERVER:
// Should the map be hidden? // Should the map be hidden?
if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU) if (mapheaderinfo[mapnum]->menuflags & LF2_HIDEINMENU && mapnum+1 != gamemap)
return false; return false;
if (M_MapLocked(mapnum+1)) if (M_MapLocked(mapnum+1))
@ -5848,6 +5850,13 @@ static void M_TimeAttack(INT32 choice)
S_ChangeMusicInternal("racent", true); S_ChangeMusicInternal("racent", true);
} }
static boolean M_QuitTimeAttackMenu(void)
{
// you know what? always putting these in the buffer won't hurt anything.
COM_BufAddText(va("skin \"%s\"\n", cv_chooseskin.string));
return true;
}
// Drawing function for Nights Attack // Drawing function for Nights Attack
/*void M_DrawNightsAttackMenu(void) /*void M_DrawNightsAttackMenu(void)
{ {

View file

@ -1 +0,0 @@
Press any key to continue . . .

View file

@ -2253,7 +2253,7 @@ void Y_VoteDrawer(void)
if (!timer && i == voteclient.ranim) if (!timer && i == voteclient.ranim)
{ {
V_DrawScaledPatch(x-18, y+9, V_SNAPTOLEFT, cursor); V_DrawScaledPatch(x-18, y+9, V_SNAPTOLEFT, cursor);
if (!(votetic % 4)) if (voteendtic != -1 && !(votetic % 4))
V_DrawFill(x-1, y-1, 42, 27, 120|V_SNAPTOLEFT); V_DrawFill(x-1, y-1, 42, 27, 120|V_SNAPTOLEFT);
else else
V_DrawFill(x-1, y-1, 42, 27, levelinfo[votes[i]].gtc|V_SNAPTOLEFT); V_DrawFill(x-1, y-1, 42, 27, levelinfo[votes[i]].gtc|V_SNAPTOLEFT);