mirror of
https://git.do.srb2.org/KartKrew/Kart-Public.git
synced 2024-11-17 02:01:15 +00:00
Merge remote-tracking branch 'refs/remotes/origin/menus-cvars-unlocks'
This commit is contained in:
commit
3040c8d51d
33 changed files with 1019 additions and 1550 deletions
10
src/b_bot.c
10
src/b_bot.c
|
@ -44,8 +44,8 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
|||
if (tails->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||
{
|
||||
dist = P_AproxDistance(tails->x-sonic->x, tails->y-sonic->y);
|
||||
if (sonic->player->cmd.buttons & BT_JUMP && sonic->player->pflags & (PF_JUMPED|PF_MACESPIN|PF_ITEMHANG))
|
||||
cmd->buttons |= BT_JUMP;
|
||||
if (sonic->player->cmd.buttons & BT_DRIFT && sonic->player->pflags & (PF_JUMPED|PF_MACESPIN|PF_ITEMHANG))
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
if (sonic->player->pflags & (PF_MACESPIN|PF_ITEMHANG))
|
||||
{
|
||||
cmd->forwardmove = sonic->player->cmd.forwardmove;
|
||||
|
@ -53,7 +53,7 @@ static inline void B_BuildTailsTiccmd(mobj_t *sonic, mobj_t *tails, ticcmd_t *cm
|
|||
if (sonic->angle < tails->angle)
|
||||
cmd->angleturn = -cmd->angleturn;
|
||||
} else if (dist > FixedMul(512*FRACUNIT, tails->scale))
|
||||
cmd->buttons |= BT_JUMP;
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -116,7 +116,7 @@ void B_BuildTiccmd(player_t *player, ticcmd_t *cmd)
|
|||
if (player->playerstate == PST_DEAD)
|
||||
{
|
||||
if (B_CheckRespawn(player))
|
||||
cmd->buttons |= BT_JUMP;
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -189,7 +189,7 @@ void B_KeysToTiccmd(mobj_t *mo, ticcmd_t *cmd, boolean forward, boolean backward
|
|||
cmd->sidemove += MAXPLMOVE<<FRACBITS>>16;
|
||||
}
|
||||
if (jump)
|
||||
cmd->buttons |= BT_JUMP;
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
if (spin)
|
||||
cmd->buttons |= BT_BRAKE;
|
||||
}
|
||||
|
|
|
@ -66,8 +66,8 @@ CV_PossibleValue_t CV_Natural[] = {{1, "MIN"}, {999999999, "MAX"}, {0, NULL}};
|
|||
CV_PossibleValue_t karthud_cons_t[] = {
|
||||
{0, "Off"}, {1, "Default"}, {2, "SNES"}, {3, "MK64"},
|
||||
{0, NULL}};
|
||||
CV_PossibleValue_t kartcc_cons_t[] = {
|
||||
{50, "50cc"}, {100, "100cc"}, {150, "150cc"},
|
||||
CV_PossibleValue_t kartspeed_cons_t[] = {
|
||||
{0, "Relaxed"}, {1, "Standard"}, {2, "Turbo"},
|
||||
{0, NULL}};
|
||||
|
||||
#define COM_BUF_SIZE 8192 // command buffer size
|
||||
|
|
|
@ -128,7 +128,7 @@ extern CV_PossibleValue_t CV_Natural[];
|
|||
|
||||
// SRB2kart
|
||||
extern CV_PossibleValue_t karthud_cons_t[];
|
||||
extern CV_PossibleValue_t kartcc_cons_t[];
|
||||
extern CV_PossibleValue_t kartspeed_cons_t[];
|
||||
|
||||
// register a variable for use at the console
|
||||
void CV_RegisterVar(consvar_t *variable);
|
||||
|
|
|
@ -1230,7 +1230,7 @@ void CONS_Printf(const char *fmt, ...)
|
|||
patch_t *con_backpic;
|
||||
|
||||
if (con_backpic_lumpnum == UINT32_MAX)
|
||||
con_backpic_lumpnum = W_GetNumForName("CONSBACK");
|
||||
con_backpic_lumpnum = W_GetNumForName("KARTKREW");
|
||||
|
||||
// We load the raw lump, even in hardware mode
|
||||
con_backpic = (patch_t*)W_CacheLumpNum(con_backpic_lumpnum, PU_CACHE);
|
||||
|
@ -1475,7 +1475,7 @@ static void CON_DrawBackpic(patch_t *pic, INT32 startx, INT32 destwidth)
|
|||
{
|
||||
(void)startx;
|
||||
(void)destwidth;
|
||||
V_DrawScaledPatch(0, 0, 0, pic);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, pic, NULL);
|
||||
}
|
||||
|
||||
#if 0
|
||||
|
@ -1551,12 +1551,12 @@ static void CON_DrawConsole(void)
|
|||
patch_t *con_backpic;
|
||||
|
||||
if (con_backpic_lumpnum == UINT32_MAX)
|
||||
con_backpic_lumpnum = W_GetNumForName("CONSBACK");
|
||||
con_backpic_lumpnum = W_GetNumForName("KARTKREW");
|
||||
|
||||
con_backpic = (patch_t*)W_CachePatchNum(con_backpic_lumpnum, PU_CACHE);
|
||||
|
||||
if (rendermode != render_soft)
|
||||
V_DrawScaledPatch(0, 0, 0, con_backpic);
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, con_backpic, NULL);
|
||||
else if (rendermode != render_none)
|
||||
CON_DrawBackpic(con_backpic, 0, vid.width); // picture as background
|
||||
|
||||
|
|
|
@ -2896,7 +2896,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
|
|||
|
||||
consvar_t cv_allownewplayer = {"allowjoin", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL };
|
||||
consvar_t cv_joinnextround = {"joinnextround", "Off", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL}; /// \todo not done
|
||||
static CV_PossibleValue_t maxplayers_cons_t[] = {{2, "MIN"}, {32, "MAX"}, {0, NULL}};
|
||||
static CV_PossibleValue_t maxplayers_cons_t[] = {{2, "MIN"}, {MAXPLAYERS, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_maxplayers = {"maxplayers", "8", CV_SAVE, maxplayers_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t resynchattempts_cons_t[] = {{0, "MIN"}, {20, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_resynchattempts = {"resynchattempts", "10", 0, resynchattempts_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL };
|
||||
|
|
|
@ -638,7 +638,7 @@ void D_SRB2Loop(void)
|
|||
COM_ImmedExecute("cls;version");
|
||||
|
||||
if (rendermode == render_soft)
|
||||
V_DrawScaledPatch(0, 0, 0, (patch_t *)W_CacheLumpNum(W_GetNumForName("CONSBACK"), PU_CACHE));
|
||||
V_DrawFixedPatch(0, 0, FRACUNIT/2, 0, (patch_t *)W_CacheLumpNum(W_GetNumForName("KARTKREW"), PU_CACHE), NULL);
|
||||
I_FinishUpdate(); // page flip or blit buffer
|
||||
|
||||
for (;;)
|
||||
|
@ -1409,11 +1409,11 @@ void D_SRB2Main(void)
|
|||
return;
|
||||
}
|
||||
|
||||
if (M_CheckParm("-ultimatemode"))
|
||||
/*if (M_CheckParm("-ultimatemode"))
|
||||
{
|
||||
autostart = true;
|
||||
ultimatemode = true;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (autostart || netgame || M_CheckParm("+connect") || M_CheckParm("-connect"))
|
||||
{
|
||||
|
|
|
@ -105,6 +105,11 @@ static void Color4_OnChange(void);
|
|||
static void DummyConsvar_OnChange(void);
|
||||
static void SoundTest_OnChange(void);
|
||||
|
||||
static void KartFrantic_OnChange(void);
|
||||
static void KartSpeed_OnChange(void);
|
||||
static void KartMirror_OnChange(void);
|
||||
static void KartComeback_OnChange(void);
|
||||
|
||||
#ifdef NETGAME_DEVMODE
|
||||
static void Fishcake_OnChange(void);
|
||||
#endif
|
||||
|
@ -229,7 +234,7 @@ consvar_t cv_allowteamchange = {"allowteamchange", "Yes", CV_NETVAR, CV_YesNo, N
|
|||
consvar_t cv_startinglives = {"startinglives", "3", CV_NETVAR|CV_CHEAT, startingliveslimit_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
static CV_PossibleValue_t respawntime_cons_t[] = {{0, "MIN"}, {30, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_respawntime = {"respawndelay", "3", CV_NETVAR|CV_CHEAT, respawntime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_respawntime = {"respawndelay", "1", CV_NETVAR|CV_CHEAT, respawntime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_competitionboxes = {"competitionboxes", "Random", CV_NETVAR|CV_CHEAT, competitionboxes_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
|
@ -259,7 +264,7 @@ consvar_t cv_skipmapcheck = {"skipmapcheck", "Off", CV_SAVE, CV_OnOff, NULL, 0,
|
|||
|
||||
INT32 cv_debug;
|
||||
|
||||
consvar_t cv_usemouse = {"use_mouse", "On", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usemouse = {"use_mouse", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usemouse2 = {"use_mouse2", "Off", CV_SAVE|CV_CALL,usemouse_cons_t, I_StartupMouse2, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
#if defined (DC) || defined (_XBOX) || defined (WMINPUT) || defined (_WII) //joystick 1 and 2
|
||||
|
@ -343,15 +348,16 @@ consvar_t cv_lightning = {"lightning", "On", CV_NETVAR|CV_CHEAT, CV_OnOff,
|
|||
consvar_t cv_feather = {"feathers", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
consvar_t cv_karthud = {"karthud", "Default", CV_SAVE|CV_CALL, karthud_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcheck = {"kartcheck", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartminimap = {"kartminimap", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcheck = {"kartcheck", "Yes", CV_SAVE, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartstarsfx_cons_t[] = {{0, "Music"}, {1, "SMK"}, {0, NULL}};
|
||||
consvar_t cv_kartstarsfx = {"kartstarsfx", "SMK", CV_SAVE, kartstarsfx_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcc = {"kartcc", "100cc", CV_NETVAR, kartcc_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartspeed = {"kartspeed", "Standard", CV_NETVAR|CV_CALL|CV_NOINIT, kartspeed_cons_t, KartSpeed_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t kartballoons_cons_t[] = {{1, "MIN"}, {12, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartballoons = {"kartballoons", "3", CV_NETVAR|CV_CHEAT, kartballoons_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartfrantic = {"kartfrantic", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartFrantic_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartcomeback = {"kartcomeback", "On", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartComeback_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_kartmirror = {"kartmirror", "Off", CV_NETVAR|CV_CHEAT|CV_CALL|CV_NOINIT, CV_OnOff, KartMirror_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
static CV_PossibleValue_t speedometer_cons_t[] = {{0, "Off"}, {1, "Kilometers"}, {2, "Miles"}, {3, "Fracunits"}, {0, NULL}};
|
||||
consvar_t cv_speedometer = {"speedometer", "Kilometers", CV_SAVE, speedometer_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL}; // use tics in display
|
||||
|
||||
|
@ -399,7 +405,7 @@ consvar_t cv_timelimit = {"timelimit", "0", CV_NETVAR|CV_CALL|CV_NOINIT, timelim
|
|||
static CV_PossibleValue_t numlaps_cons_t[] = {{0, "MIN"}, {50, "MAX"}, {0, NULL}};
|
||||
consvar_t cv_numlaps = {"numlaps", "3", CV_NETVAR|CV_CALL|CV_NOINIT, numlaps_cons_t,
|
||||
NumLaps_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usemapnumlaps = {"usemaplaps", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_usemapnumlaps = {"usemaplaps", "Yes", CV_NETVAR|CV_CHEAT, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
||||
// log elemental hazards -- not a netvar, is local to current player
|
||||
consvar_t cv_hazardlog = {"hazardlog", "Yes", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -750,9 +756,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_itemfinder);
|
||||
|
||||
// time attack ghost options are also saved to config
|
||||
CV_RegisterVar(&cv_ghost_bestscore);
|
||||
CV_RegisterVar(&cv_ghost_besttime);
|
||||
//CV_RegisterVar(&cv_ghost_bestlap);
|
||||
CV_RegisterVar(&cv_ghost_bestlap);
|
||||
CV_RegisterVar(&cv_ghost_last);
|
||||
CV_RegisterVar(&cv_ghost_guest);
|
||||
CV_RegisterVar(&cv_ghost_staff);
|
||||
|
@ -770,8 +775,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_crosshair2);
|
||||
CV_RegisterVar(&cv_crosshair3);
|
||||
CV_RegisterVar(&cv_crosshair4);
|
||||
CV_RegisterVar(&cv_alwaysfreelook);
|
||||
CV_RegisterVar(&cv_alwaysfreelook2);
|
||||
//CV_RegisterVar(&cv_alwaysfreelook);
|
||||
//CV_RegisterVar(&cv_alwaysfreelook2);
|
||||
|
||||
// g_input.c
|
||||
CV_RegisterVar(&cv_sideaxis);
|
||||
|
@ -815,8 +820,8 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_mousesens2);
|
||||
CV_RegisterVar(&cv_mouseysens);
|
||||
CV_RegisterVar(&cv_mouseysens2);
|
||||
CV_RegisterVar(&cv_mousemove);
|
||||
CV_RegisterVar(&cv_mousemove2);
|
||||
//CV_RegisterVar(&cv_mousemove);
|
||||
//CV_RegisterVar(&cv_mousemove2);
|
||||
|
||||
CV_RegisterVar(&cv_usejoystick);
|
||||
CV_RegisterVar(&cv_usejoystick2);
|
||||
|
@ -832,14 +837,14 @@ void D_RegisterClientCommands(void)
|
|||
CV_RegisterVar(&cv_joyscale4);
|
||||
|
||||
// Analog Control
|
||||
CV_RegisterVar(&cv_analog);
|
||||
/*CV_RegisterVar(&cv_analog);
|
||||
CV_RegisterVar(&cv_analog2);
|
||||
CV_RegisterVar(&cv_analog3);
|
||||
CV_RegisterVar(&cv_analog4);
|
||||
CV_RegisterVar(&cv_useranalog);
|
||||
CV_RegisterVar(&cv_useranalog2);
|
||||
CV_RegisterVar(&cv_useranalog3);
|
||||
CV_RegisterVar(&cv_useranalog4);
|
||||
CV_RegisterVar(&cv_useranalog4);*/
|
||||
|
||||
// s_sound.c
|
||||
CV_RegisterVar(&cv_soundvolume);
|
||||
|
@ -5049,3 +5054,28 @@ static void Command_ShowTime_f(void)
|
|||
|
||||
CONS_Printf(M_GetText("The current time is %f.\nThe timelimit is %f\n"), (double)leveltime/TICRATE, (double)timelimitintics/TICRATE);
|
||||
}
|
||||
|
||||
// SRB2Kart: On change messages
|
||||
static void KartFrantic_OnChange(void)
|
||||
{
|
||||
if (cv_kartfrantic.value != franticitems && gamestate == GS_LEVEL)
|
||||
CONS_Printf(M_GetText("Frantic Items will be turned %s next round.\n"), cv_kartfrantic.value ? M_GetText("on") : M_GetText("off"));
|
||||
}
|
||||
|
||||
static void KartSpeed_OnChange(void)
|
||||
{
|
||||
if (cv_kartspeed.value != gamespeed && gametype == GT_RACE && gamestate == GS_LEVEL)
|
||||
CONS_Printf(M_GetText("Game speed will be changed to \"%s\" next round.\n"), cv_kartspeed.string);
|
||||
}
|
||||
|
||||
static void KartMirror_OnChange(void)
|
||||
{
|
||||
if (cv_kartmirror.value != mirrormode && gametype == GT_RACE && gamestate == GS_LEVEL)
|
||||
CONS_Printf(M_GetText("Mirror Mode will be turned %s next round.\n"), cv_kartmirror.value ? M_GetText("on") : M_GetText("off"));
|
||||
}
|
||||
|
||||
static void KartComeback_OnChange(void)
|
||||
{
|
||||
if (cv_kartcomeback.value != comeback && gametype == GT_MATCH && gamestate == GS_LEVEL)
|
||||
CONS_Printf(M_GetText("Karma Comeback will be turned %s next round.\n"), cv_kartcomeback.value ? M_GetText("on") : M_GetText("off"));
|
||||
}
|
|
@ -116,9 +116,10 @@ extern consvar_t cv_blueshell, cv_jaws, cv_fireflower, cv_tripleredshell, cv_lig
|
|||
extern consvar_t cv_feather;
|
||||
|
||||
extern consvar_t cv_karthud;
|
||||
extern consvar_t cv_kartminimap;
|
||||
extern consvar_t cv_kartcheck;
|
||||
extern consvar_t cv_kartstarsfx;
|
||||
extern consvar_t cv_kartcc;
|
||||
extern consvar_t cv_kartspeed;
|
||||
extern consvar_t cv_kartballoons;
|
||||
extern consvar_t cv_kartfrantic;
|
||||
extern consvar_t cv_kartcomeback;
|
||||
|
|
|
@ -24,23 +24,24 @@
|
|||
// Button/action code definitions.
|
||||
typedef enum
|
||||
{
|
||||
// First 4 bits are weapon change info, DO NOT USE!
|
||||
BT_WEAPONMASK = 0x0F, //our first four bits.
|
||||
BT_ACCELERATE = 1, // Accelerate
|
||||
BT_DRIFT = 1<<2, // Drift (direction is cmd->angleturn)
|
||||
BT_BRAKE = 1<<3, // Brake
|
||||
BT_ATTACK = 1<<4, // Use Item
|
||||
BT_FORWARD = 1<<5, // Aim Item Forward
|
||||
BT_BACKWARD = 1<<6, // Aim Item Backward
|
||||
//BT_SPECTATE = 1<<7, // Toggle Spectate
|
||||
|
||||
BT_DRIFTLEFT = 1<<4, // Drift Left // BT_WEAPONNEXT
|
||||
BT_DRIFTRIGHT = 1<<5, // Drift Right // BT_WEAPONPREV
|
||||
// Want more button space? Help get rid of this hack :V
|
||||
BT_DRIFTLEFT = 1<<7, // Drift left hack
|
||||
BT_DRIFTRIGHT = 1<<8, // Drift right hack
|
||||
|
||||
BT_ATTACK = 1<<6, // use kart item // SRB2kart
|
||||
BT_BRAKE = 1<<7, // brake // BT_USE
|
||||
BT_FORWARD = 1<<8, // toss item forward // BT_CAMLEFT
|
||||
BT_BACKWARD = 1<<9, // drop item behind // BT_CAMRIGHT
|
||||
BT_SPECTATE = 1<<10, // toggle spectate // BT_TOSSFLAG
|
||||
BT_JUMP = 1<<11,
|
||||
BT_ACCELERATE = 1<<12, // Accelerate // BT_FIRENORMAL
|
||||
// free: 1<<9 to 1<<12
|
||||
|
||||
BT_CUSTOM1 = 1<<13,
|
||||
BT_CUSTOM2 = 1<<14,
|
||||
BT_CUSTOM3 = 1<<15,
|
||||
// Lua garbage
|
||||
BT_CUSTOM1 = 1<<13,
|
||||
BT_CUSTOM2 = 1<<14,
|
||||
BT_CUSTOM3 = 1<<15,
|
||||
} buttoncode_t;
|
||||
|
||||
// The data sampled per tick (single player)
|
||||
|
|
|
@ -2175,16 +2175,16 @@ static void reademblemdata(MYFILE *f, INT32 num)
|
|||
emblemlocations[num-1].type = ET_GLOBAL;
|
||||
else if (fastcmp(word2, "SKIN"))
|
||||
emblemlocations[num-1].type = ET_SKIN;
|
||||
else if (fastcmp(word2, "SCORE"))
|
||||
emblemlocations[num-1].type = ET_SCORE;
|
||||
/*else if (fastcmp(word2, "SCORE"))
|
||||
emblemlocations[num-1].type = ET_SCORE;*/
|
||||
else if (fastcmp(word2, "TIME"))
|
||||
emblemlocations[num-1].type = ET_TIME;
|
||||
else if (fastcmp(word2, "RINGS"))
|
||||
/*else if (fastcmp(word2, "RINGS"))
|
||||
emblemlocations[num-1].type = ET_RINGS;
|
||||
else if (fastcmp(word2, "NGRADE"))
|
||||
emblemlocations[num-1].type = ET_NGRADE;
|
||||
else if (fastcmp(word2, "NTIME"))
|
||||
emblemlocations[num-1].type = ET_NTIME;
|
||||
emblemlocations[num-1].type = ET_NTIME;*/
|
||||
else
|
||||
emblemlocations[num-1].type = (UINT8)value;
|
||||
}
|
||||
|
@ -2229,24 +2229,24 @@ static void reademblemdata(MYFILE *f, INT32 num)
|
|||
// Default sprite and color definitions for lazy people like me
|
||||
if (!emblemlocations[num-1].sprite) switch (emblemlocations[num-1].type)
|
||||
{
|
||||
case ET_RINGS:
|
||||
/*case ET_RINGS:
|
||||
emblemlocations[num-1].sprite = 'R'; break;
|
||||
case ET_SCORE: case ET_NGRADE:
|
||||
emblemlocations[num-1].sprite = 'S'; break;
|
||||
case ET_TIME: case ET_NTIME:
|
||||
emblemlocations[num-1].sprite = 'S'; break;*/
|
||||
case ET_TIME: //case ET_NTIME:
|
||||
emblemlocations[num-1].sprite = 'T'; break;
|
||||
default:
|
||||
emblemlocations[num-1].sprite = 'A'; break;
|
||||
}
|
||||
if (!emblemlocations[num-1].color) switch (emblemlocations[num-1].type)
|
||||
{
|
||||
case ET_RINGS:
|
||||
/*case ET_RINGS:
|
||||
emblemlocations[num-1].color = SKINCOLOR_GOLD; break;
|
||||
case ET_SCORE:
|
||||
emblemlocations[num-1].color = SKINCOLOR_BROWN; break;
|
||||
case ET_NGRADE:
|
||||
emblemlocations[num-1].color = SKINCOLOR_TEAL; break;
|
||||
case ET_TIME: case ET_NTIME:
|
||||
emblemlocations[num-1].color = SKINCOLOR_TEAL; break;*/
|
||||
case ET_TIME: //case ET_NTIME:
|
||||
emblemlocations[num-1].color = SKINCOLOR_GREY; break;
|
||||
default:
|
||||
emblemlocations[num-1].color = SKINCOLOR_BLUE; break;
|
||||
|
@ -2477,32 +2477,33 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
return;
|
||||
}
|
||||
|
||||
if (fastcmp(params[0], "PLAYTIME"))
|
||||
if (fastcmp(params[0], "PLAYTIME")
|
||||
|| (++offset && fastcmp(params[0], "MATCHESPLAYED")))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UC_PLAYTIME;
|
||||
ty = UC_PLAYTIME + offset;
|
||||
re = atoi(params[1]);
|
||||
}
|
||||
else if (fastcmp(params[0], "GAMECLEAR")
|
||||
|| (++offset && fastcmp(params[0], "ALLEMERALDS"))
|
||||
|| (++offset && fastcmp(params[0], "ULTIMATECLEAR")))
|
||||
else if ((offset=0) || fastcmp(params[0], "GAMECLEAR")
|
||||
|| (++offset && fastcmp(params[0], "ALLEMERALDS")))
|
||||
//|| (++offset && fastcmp(params[0], "ULTIMATECLEAR")))
|
||||
{
|
||||
ty = UC_GAMECLEAR + offset;
|
||||
re = (params[1]) ? atoi(params[1]) : 1;
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "OVERALLSCORE")
|
||||
|| (++offset && fastcmp(params[0], "OVERALLTIME"))
|
||||
|| (++offset && fastcmp(params[0], "OVERALLRINGS")))
|
||||
else if ((offset=0) || fastcmp(params[0], "OVERALLTIME"))
|
||||
//|| (++offset && fastcmp(params[0], "OVERALLSCORE"))
|
||||
//|| (++offset && fastcmp(params[0], "OVERALLRINGS")))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UC_OVERALLSCORE + offset;
|
||||
ty = UC_OVERALLTIME + offset;
|
||||
re = atoi(params[1]);
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "MAPVISITED")
|
||||
|| (++offset && fastcmp(params[0], "MAPBEATEN"))
|
||||
|| (++offset && fastcmp(params[0], "MAPALLEMERALDS"))
|
||||
|| (++offset && fastcmp(params[0], "MAPULTIMATE"))
|
||||
|| (++offset && fastcmp(params[0], "MAPPERFECT")))
|
||||
|| (++offset && fastcmp(params[0], "MAPALLEMERALDS")))
|
||||
//|| (++offset && fastcmp(params[0], "MAPULTIMATE"))
|
||||
//|| (++offset && fastcmp(params[0], "MAPPERFECT")))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UC_MAPVISITED + offset;
|
||||
|
@ -2519,12 +2520,12 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "MAPSCORE")
|
||||
|| (++offset && fastcmp(params[0], "MAPTIME"))
|
||||
|| (++offset && fastcmp(params[0], "MAPRINGS")))
|
||||
else if ((offset=0) || fastcmp(params[0], "MAPTIME"))
|
||||
//|| (++offset && fastcmp(params[0], "MAPSCORE"))
|
||||
//|| (++offset && fastcmp(params[0], "MAPRINGS")))
|
||||
{
|
||||
PARAMCHECK(2);
|
||||
ty = UC_MAPSCORE + offset;
|
||||
ty = UC_MAPTIME + offset;
|
||||
re = atoi(params[2]);
|
||||
|
||||
// Convert to map number if it appears to be one
|
||||
|
@ -2539,7 +2540,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "NIGHTSSCORE")
|
||||
/*else if ((offset=0) || fastcmp(params[0], "NIGHTSSCORE")
|
||||
|| (++offset && fastcmp(params[0], "NIGHTSTIME"))
|
||||
|| (++offset && fastcmp(params[0], "NIGHTSGRADE")))
|
||||
{
|
||||
|
@ -2566,7 +2567,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
else
|
||||
x2 = 0;
|
||||
|
||||
}
|
||||
}*/
|
||||
else if (fastcmp(params[0], "TRIGGER"))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
|
@ -7814,16 +7815,15 @@ struct {
|
|||
{"NUMDIRS",NUMDIRS},
|
||||
|
||||
// Buttons (ticcmd_t) // SRB2kart
|
||||
{"BT_WEAPONMASK",BT_WEAPONMASK}, //our first four bits.
|
||||
{"BT_ACCELERATE",BT_ACCELERATE},
|
||||
{"BT_DRIFT",BT_DRIFT},
|
||||
{"BT_BRAKE",BT_BRAKE},
|
||||
{"BT_ATTACK",BT_ATTACK},
|
||||
{"BT_FORWARD",BT_FORWARD},
|
||||
{"BT_BACKWARD",BT_BACKWARD},
|
||||
//{"BT_SPECTATE",BT_SPECTATE},
|
||||
{"BT_DRIFTLEFT",BT_DRIFTLEFT},
|
||||
{"BT_DRIFTRIGHT",BT_DRIFTRIGHT},
|
||||
{"BT_ATTACK",BT_ATTACK}, // shoot rings
|
||||
{"BT_BRAKE",BT_BRAKE}, // brake
|
||||
{"BT_FORWARD",BT_FORWARD}, // turn camera left
|
||||
{"BT_BACKWARD",BT_BACKWARD}, // turn camera right
|
||||
{"BT_SPECTATE",BT_SPECTATE},
|
||||
{"BT_JUMP",BT_JUMP},
|
||||
{"BT_ACCELERATE",BT_ACCELERATE}, // Fire a normal ring no matter what
|
||||
{"BT_CUSTOM1",BT_CUSTOM1}, // Lua customizable
|
||||
{"BT_CUSTOM2",BT_CUSTOM2}, // Lua customizable
|
||||
{"BT_CUSTOM3",BT_CUSTOM3}, // Lua customizable
|
||||
|
|
|
@ -62,7 +62,7 @@ extern boolean metalrecording;
|
|||
|
||||
#define ATTACKING_NONE 0
|
||||
#define ATTACKING_RECORD 1
|
||||
#define ATTACKING_NIGHTS 2
|
||||
//#define ATTACKING_NIGHTS 2
|
||||
extern UINT8 modeattacking;
|
||||
|
||||
// menu demo things
|
||||
|
@ -322,6 +322,7 @@ enum GameType
|
|||
// If you alter this list, update gametype_cons_t in m_menu.c
|
||||
|
||||
extern tic_t totalplaytime;
|
||||
extern UINT32 matchesplayed;
|
||||
|
||||
extern UINT8 stagefailed;
|
||||
|
||||
|
@ -342,9 +343,10 @@ extern INT32 nummaprings, nummapboxes, numgotboxes; //keep track of spawned ring
|
|||
*/
|
||||
typedef struct
|
||||
{
|
||||
tic_t time; ///< Time in which the level was finished.
|
||||
UINT32 score; ///< Score when the level was finished.
|
||||
UINT16 rings; ///< Rings when the level was finished.
|
||||
tic_t time; ///< Time in which the level was finished.
|
||||
tic_t lap; ///< Best lap time for this level.
|
||||
//UINT32 score; ///< Score when the level was finished.
|
||||
//UINT16 rings; ///< Rings when the level was finished.
|
||||
} recorddata_t;
|
||||
|
||||
/** Setup for one NiGHTS map.
|
||||
|
@ -358,29 +360,29 @@ typedef struct
|
|||
#define GRADE_A 5
|
||||
#define GRADE_S 6
|
||||
|
||||
typedef struct
|
||||
/*typedef struct
|
||||
{
|
||||
// 8 mares, 1 overall (0)
|
||||
UINT8 nummares;
|
||||
UINT32 score[9];
|
||||
UINT8 grade[9];
|
||||
tic_t time[9];
|
||||
} nightsdata_t;
|
||||
} nightsdata_t;*/
|
||||
|
||||
extern nightsdata_t *nightsrecords[NUMMAPS];
|
||||
//extern nightsdata_t *nightsrecords[NUMMAPS];
|
||||
extern recorddata_t *mainrecords[NUMMAPS];
|
||||
|
||||
// mapvisited is now a set of flags that says what we've done in the map.
|
||||
#define MV_VISITED 1
|
||||
#define MV_BEATEN 2
|
||||
#define MV_ALLEMERALDS 4
|
||||
#define MV_ULTIMATE 8
|
||||
#define MV_PERFECT 16
|
||||
#define MV_MAX 31 // used in gamedata check
|
||||
#define MV_VISITED 1
|
||||
#define MV_BEATEN 2
|
||||
#define MV_ALLEMERALDS 4
|
||||
//#define MV_ULTIMATE 8
|
||||
//#define MV_PERFECT 16
|
||||
#define MV_MAX 7 // used in gamedata check
|
||||
extern UINT8 mapvisited[NUMMAPS];
|
||||
|
||||
// Temporary holding place for nights data for the current map
|
||||
nightsdata_t ntemprecords;
|
||||
//nightsdata_t ntemprecords;
|
||||
|
||||
extern UINT32 token; ///< Number of tokens collected in a level
|
||||
extern UINT32 tokenlist; ///< List of tokens collected
|
||||
|
@ -437,11 +439,19 @@ extern INT16 scramblecount; //for CTF team scramble
|
|||
|
||||
extern INT32 cheats;
|
||||
|
||||
// SRB2kart
|
||||
extern UINT8 gamespeed;
|
||||
extern boolean franticitems;
|
||||
extern boolean mirrormode;
|
||||
extern boolean comeback;
|
||||
extern tic_t curlap, bestlap;
|
||||
extern boolean legitimateexit;
|
||||
|
||||
extern tic_t hidetime;
|
||||
|
||||
extern UINT32 timesBeaten; // # of times the game has been beaten.
|
||||
extern UINT32 timesBeatenWithEmeralds;
|
||||
extern UINT32 timesBeatenUltimate;
|
||||
//extern UINT32 timesBeatenUltimate;
|
||||
|
||||
// ===========================
|
||||
// Internal parameters, fixed.
|
||||
|
|
|
@ -816,8 +816,8 @@ void F_GameEvaluationDrawer(void)
|
|||
if (ALL7EMERALDS(emeralds))
|
||||
++timesBeatenWithEmeralds;
|
||||
|
||||
if (ultimatemode)
|
||||
++timesBeatenUltimate;
|
||||
/*if (ultimatemode)
|
||||
++timesBeatenUltimate;*/
|
||||
|
||||
if (M_UpdateUnlockablesAndExtraEmblems())
|
||||
S_StartSound(NULL, sfx_ncitem);
|
||||
|
|
306
src/g_game.c
306
src/g_game.c
|
@ -167,16 +167,17 @@ INT32 tokenbits; // Used for setting token bits
|
|||
INT32 sstimer; // Time allotted in the special stage
|
||||
|
||||
tic_t totalplaytime;
|
||||
UINT32 matchesplayed; // SRB2Kart
|
||||
boolean gamedataloaded = false;
|
||||
|
||||
// Time attack data for levels
|
||||
// These are dynamically allocated for space reasons now
|
||||
recorddata_t *mainrecords[NUMMAPS] = {NULL};
|
||||
nightsdata_t *nightsrecords[NUMMAPS] = {NULL};
|
||||
//nightsdata_t *nightsrecords[NUMMAPS] = {NULL};
|
||||
UINT8 mapvisited[NUMMAPS];
|
||||
|
||||
// Temporary holding place for nights data for the current map
|
||||
nightsdata_t ntemprecords;
|
||||
//nightsdata_t ntemprecords;
|
||||
|
||||
UINT32 bluescore, redscore; // CTF and Team Match team scores
|
||||
|
||||
|
@ -238,12 +239,22 @@ INT16 scramblecount; //for CTF team scramble
|
|||
|
||||
INT32 cheats; //for multiplayer cheat commands
|
||||
|
||||
// SRB2Kart
|
||||
UINT8 gamespeed; // Game's current speed (or difficulty, or cc, or etc); 0-2 for relaxed, standard, & turbo
|
||||
boolean mirrormode; // Mirror Mode currently enabled?
|
||||
boolean franticitems; // Frantic items currently enabled?
|
||||
boolean comeback; // Battle Mode's karma comeback is on/off
|
||||
|
||||
boolean legitimateexit; // Did this client actually finish the match? Calculated locally
|
||||
tic_t curlap; // Current lap time, calculated locally
|
||||
tic_t bestlap; // Best lap time, locally
|
||||
|
||||
tic_t hidetime;
|
||||
|
||||
// Grading
|
||||
UINT32 timesBeaten;
|
||||
UINT32 timesBeatenWithEmeralds;
|
||||
UINT32 timesBeatenUltimate;
|
||||
//UINT32 timesBeatenUltimate;
|
||||
|
||||
static char demoname[64];
|
||||
boolean demorecording;
|
||||
|
@ -376,11 +387,11 @@ consvar_t cv_crosshair2 = {"crosshair2", "Cross", CV_SAVE, crosshair_cons_t, NUL
|
|||
consvar_t cv_crosshair3 = {"crosshair3", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_crosshair4 = {"crosshair4", "Cross", CV_SAVE, crosshair_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_invertmouse = {"invertmouse", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook = {"alwaysmlook", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook = {"alwaysmlook", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_invertmouse2 = {"invertmouse2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_alwaysfreelook2 = {"alwaysmlook2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove = {"mousemove", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove2 = {"mousemove2", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove = {"mousemove", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_mousemove2 = {"mousemove2", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog = {"analog", "Off", CV_CALL, CV_OnOff, Analog_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog2 = {"analog2", "Off", CV_CALL, CV_OnOff, Analog2_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
consvar_t cv_analog3 = {"analog3", "Off", CV_CALL, CV_OnOff, Analog3_OnChange, 0, NULL, NULL, 0, 0, NULL};
|
||||
|
@ -531,12 +542,12 @@ void G_AllocMainRecordData(INT16 i)
|
|||
memset(mainrecords[i], 0, sizeof(recorddata_t));
|
||||
}
|
||||
|
||||
void G_AllocNightsRecordData(INT16 i)
|
||||
/*void G_AllocNightsRecordData(INT16 i)
|
||||
{
|
||||
if (!nightsrecords[i])
|
||||
nightsrecords[i] = Z_Malloc(sizeof(nightsdata_t), PU_STATIC, NULL);
|
||||
memset(nightsrecords[i], 0, sizeof(nightsdata_t));
|
||||
}
|
||||
}*/
|
||||
|
||||
// MAKE SURE YOU SAVE DATA BEFORE CALLING THIS
|
||||
void G_ClearRecords(void)
|
||||
|
@ -549,22 +560,22 @@ void G_ClearRecords(void)
|
|||
Z_Free(mainrecords[i]);
|
||||
mainrecords[i] = NULL;
|
||||
}
|
||||
if (nightsrecords[i])
|
||||
/*if (nightsrecords[i])
|
||||
{
|
||||
Z_Free(nightsrecords[i]);
|
||||
nightsrecords[i] = NULL;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
}
|
||||
|
||||
// For easy retrieval of records
|
||||
UINT32 G_GetBestScore(INT16 map)
|
||||
/*UINT32 G_GetBestScore(INT16 map)
|
||||
{
|
||||
if (!mainrecords[map-1])
|
||||
return 0;
|
||||
|
||||
return mainrecords[map-1]->score;
|
||||
}
|
||||
}*/
|
||||
|
||||
tic_t G_GetBestTime(INT16 map)
|
||||
{
|
||||
|
@ -574,15 +585,25 @@ tic_t G_GetBestTime(INT16 map)
|
|||
return mainrecords[map-1]->time;
|
||||
}
|
||||
|
||||
UINT16 G_GetBestRings(INT16 map)
|
||||
// Not needed
|
||||
/*tic_t G_GetBestLap(INT16 map)
|
||||
{
|
||||
if (!mainrecords[map-1] || mainrecords[map-1]->lap <= 0)
|
||||
return (tic_t)UINT32_MAX;
|
||||
|
||||
return mainrecords[map-1]->lap;
|
||||
}*/
|
||||
|
||||
/*UINT16 G_GetBestRings(INT16 map)
|
||||
{
|
||||
if (!mainrecords[map-1])
|
||||
return 0;
|
||||
|
||||
return mainrecords[map-1]->rings;
|
||||
}
|
||||
}*/
|
||||
|
||||
UINT32 G_GetBestNightsScore(INT16 map, UINT8 mare)
|
||||
// No NiGHTS records for SRB2Kart
|
||||
/*UINT32 G_GetBestNightsScore(INT16 map, UINT8 mare)
|
||||
{
|
||||
if (!nightsrecords[map-1])
|
||||
return 0;
|
||||
|
@ -726,7 +747,7 @@ void G_SetNightsRecords(void)
|
|||
// If the mare count changed, this will update the score display
|
||||
CV_AddValue(&cv_nextmap, 1);
|
||||
CV_AddValue(&cv_nextmap, -1);
|
||||
}
|
||||
}*/
|
||||
|
||||
// for consistency among messages: this modifies the game and removes savemoddata.
|
||||
void G_SetGameModified(boolean silent)
|
||||
|
@ -1169,7 +1190,7 @@ static fixed_t angleturn[3] = {400, 800, 200}; // + slow turn
|
|||
void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
||||
{
|
||||
boolean forcestrafe = false;
|
||||
INT32 laim, th, tspeed, forward, side, axis, i;
|
||||
INT32 laim, th, tspeed, forward, side, axis; //i
|
||||
const INT32 speed = 1;
|
||||
// these ones used for multiple conditions
|
||||
boolean turnleft, turnright, invertmouse, mouseaiming, lookaxis, analog, analogjoystickmove, gamepadjoystickmove, kbl;
|
||||
|
@ -1233,7 +1254,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
switch (ssplayer)
|
||||
{
|
||||
case 2:
|
||||
mouseaiming = (PLAYER2INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook2.value;
|
||||
mouseaiming = player->spectator; //(PLAYER2INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook2.value;
|
||||
invertmouse = cv_invertmouse2.value;
|
||||
lookaxis = cv_lookaxis2.value;
|
||||
analogjoystickmove = cv_usejoystick2.value && !Joystick2.bGamepadStyle;
|
||||
|
@ -1258,7 +1279,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
break;
|
||||
case 1:
|
||||
default:
|
||||
mouseaiming = (PLAYER1INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook.value;
|
||||
mouseaiming = player->spectator; //(PLAYER1INPUTDOWN(gc_mouseaiming)) ^ cv_alwaysfreelook.value;
|
||||
invertmouse = cv_invertmouse.value;
|
||||
lookaxis = cv_lookaxis.value;
|
||||
analogjoystickmove = cv_usejoystick.value && !Joystick.bGamepadStyle;
|
||||
|
@ -1272,7 +1293,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
|
||||
axis = JoyAxis(AXISTURN, ssplayer);
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
{
|
||||
turnright ^= turnleft; // swap these using three XORs
|
||||
turnleft ^= turnright;
|
||||
|
@ -1379,53 +1400,14 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
cmd->buttons |= BT_BACKWARD;
|
||||
}
|
||||
|
||||
/*if (InputDown(gc_driftleft, ssplayer))
|
||||
cmd->buttons |= BT_WEAPONNEXT; // Next Weapon
|
||||
if (InputDown(gc_driftright, ssplayer))
|
||||
cmd->buttons |= BT_WEAPONPREV; // Previous Weapon
|
||||
*/
|
||||
|
||||
#if NUM_WEAPONS > 10
|
||||
"Add extra inputs to g_input.h/gamecontrols_e"
|
||||
#endif
|
||||
//use the four avaliable bits to determine the weapon.
|
||||
cmd->buttons &= ~BT_WEAPONMASK;
|
||||
for (i = 0; i < NUM_WEAPONS; ++i)
|
||||
if (InputDown(gc_wepslot1 + i, ssplayer))
|
||||
{
|
||||
cmd->buttons |= (UINT16)(i + 1);
|
||||
break;
|
||||
}
|
||||
|
||||
// fire with any button/key
|
||||
axis = JoyAxis(AXISFIRE, ssplayer);
|
||||
if (InputDown(gc_fire, ssplayer) || (cv_usejoystick.value && axis > 0))
|
||||
cmd->buttons |= BT_ATTACK;
|
||||
|
||||
// fire normal with any button/key
|
||||
/*
|
||||
axis = JoyAxis(ssplayer, AXISFIRENORMAL);
|
||||
if (InputDown(gc_accelerate, ssplayer) || (cv_usejoystick.value && axis > 0))
|
||||
cmd->buttons |= BT_ACCELERATE;
|
||||
*/
|
||||
|
||||
// Camera Controls
|
||||
/*
|
||||
if (cv_debug || cv_analog.value || demoplayback || objectplacing || player->pflags & PF_NIGHTSMODE)
|
||||
{
|
||||
if (InputDown(gc_aimforward, ssplayer))
|
||||
cmd->buttons |= BT_FORWARD;
|
||||
if (InputDown(gc_aimbackward, ssplayer))
|
||||
cmd->buttons |= BT_BACKWARD;
|
||||
}
|
||||
*/
|
||||
|
||||
// jump button
|
||||
if (InputDown(gc_jump, ssplayer))
|
||||
cmd->buttons |= BT_JUMP;
|
||||
|
||||
if (InputDown(gc_spectate, ssplayer))
|
||||
cmd->buttons |= BT_SPECTATE;
|
||||
// drift button
|
||||
if (InputDown(gc_drift, ssplayer))
|
||||
cmd->buttons |= BT_DRIFT;
|
||||
|
||||
// Lua scriptable buttons
|
||||
if (InputDown(gc_custom1, ssplayer))
|
||||
|
@ -1444,7 +1426,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
? -1 : 1; // set to -1 or 1 to multiply
|
||||
|
||||
// mouse look stuff (mouse look is not the same as mouse aim)
|
||||
if (mouseaiming)
|
||||
if (mouseaiming && player->spectator)
|
||||
{
|
||||
kbl = false;
|
||||
|
||||
|
@ -1453,24 +1435,28 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
}
|
||||
|
||||
axis = JoyAxis(AXISLOOK, ssplayer);
|
||||
if (analogjoystickmove && axis != 0 && lookaxis)
|
||||
if (analogjoystickmove && axis != 0 && lookaxis && player->spectator)
|
||||
laim += (axis<<16) * screen_invert;
|
||||
|
||||
// spring back if not using keyboard neither mouselookin'
|
||||
if (!kbl && !lookaxis && !mouseaiming)
|
||||
laim = 0;
|
||||
|
||||
if (InputDown(gc_lookup, ssplayer) || (gamepadjoystickmove && axis < 0))
|
||||
if (player->spectator)
|
||||
{
|
||||
laim += KB_LOOKSPEED * screen_invert;
|
||||
kbl = true;
|
||||
if (InputDown(gc_lookup, ssplayer) || (gamepadjoystickmove && axis < 0))
|
||||
{
|
||||
laim += KB_LOOKSPEED * screen_invert;
|
||||
kbl = true;
|
||||
}
|
||||
else if (InputDown(gc_lookdown, ssplayer) || (gamepadjoystickmove && axis > 0))
|
||||
{
|
||||
laim -= KB_LOOKSPEED * screen_invert;
|
||||
kbl = true;
|
||||
}
|
||||
}
|
||||
else if (InputDown(gc_lookdown, ssplayer) || (gamepadjoystickmove && axis > 0))
|
||||
{
|
||||
laim -= KB_LOOKSPEED * screen_invert;
|
||||
kbl = true;
|
||||
}
|
||||
else if (InputDown(gc_centerview, ssplayer))
|
||||
|
||||
if (InputDown(gc_centerview, ssplayer)) // No need to put a spectator limit on this one though :V
|
||||
laim = 0;
|
||||
|
||||
// accept no mlook for network games
|
||||
|
@ -1528,7 +1514,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
cmd->sidemove = (SINT8)(cmd->sidemove + side);
|
||||
}
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
cmd->sidemove = -cmd->sidemove;
|
||||
|
||||
if (ssplayer == 2 && player->bot == 1) {
|
||||
|
@ -1546,9 +1532,10 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
|
||||
//{ SRB2kart - Drift support
|
||||
axis = JoyAxis(AXISTURN, ssplayer);
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
axis = -axis;
|
||||
|
||||
// TODO: Remove this hack please :(
|
||||
if (cmd->angleturn > 0) // Drifting to the left
|
||||
cmd->buttons |= BT_DRIFTLEFT;
|
||||
else
|
||||
|
@ -1820,6 +1807,7 @@ void G_DoLoadLevel(boolean resetplayer)
|
|||
|
||||
static INT32 pausedelay = 0;
|
||||
static INT32 camtoggledelay, camtoggledelay2, camtoggledelay3, camtoggledelay4 = 0;
|
||||
static INT32 spectatedelay, spectatedelay2, spectatedelay3, spectatedelay4 = 0;
|
||||
|
||||
//
|
||||
// G_Responder
|
||||
|
@ -2026,6 +2014,43 @@ boolean G_Responder(event_t *ev)
|
|||
CV_SetValue(&cv_chasecam4, cv_chasecam4.value ? 0 : 1);
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay)
|
||||
{
|
||||
spectatedelay = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam spectator");
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrolbis[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrolbis[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay2)
|
||||
{
|
||||
spectatedelay2 = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam2 spectator");
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol3[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol3[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay3)
|
||||
{
|
||||
spectatedelay3 = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam3 spectator");
|
||||
}
|
||||
}
|
||||
if (ev->data1 == gamecontrol4[gc_spectate][0]
|
||||
|| ev->data1 == gamecontrol4[gc_spectate][1])
|
||||
{
|
||||
if (!spectatedelay4)
|
||||
{
|
||||
spectatedelay4 = NEWTICRATE / 7;
|
||||
COM_ImmedExecute("changeteam4 spectator");
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
|
||||
case ev_keyup:
|
||||
|
@ -2190,9 +2215,21 @@ void G_Ticker(boolean run)
|
|||
|
||||
if (camtoggledelay)
|
||||
camtoggledelay--;
|
||||
|
||||
if (camtoggledelay2)
|
||||
camtoggledelay2--;
|
||||
if (camtoggledelay3)
|
||||
camtoggledelay3--;
|
||||
if (camtoggledelay4)
|
||||
camtoggledelay4--;
|
||||
|
||||
if (spectatedelay)
|
||||
spectatedelay--;
|
||||
if (spectatedelay2)
|
||||
spectatedelay2--;
|
||||
if (spectatedelay3)
|
||||
spectatedelay3--;
|
||||
if (spectatedelay4)
|
||||
spectatedelay4--;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -2227,6 +2264,22 @@ static inline void G_PlayerFinishLevel(INT32 player)
|
|||
|
||||
if (rendermode == render_soft)
|
||||
V_SetPaletteLump(GetPalette()); // Reset the palette
|
||||
|
||||
// SRB2kart: Increment the "matches played" counter.
|
||||
if (player == consoleplayer)
|
||||
{
|
||||
if (legitimateexit && ((!modifiedgame || savemoddata) && !demoplayback))
|
||||
{
|
||||
matchesplayed++;
|
||||
if (M_UpdateUnlockablesAndExtraEmblems())
|
||||
{
|
||||
S_StartSound(NULL, sfx_ncitem);
|
||||
G_SaveGameData(); // only save if unlocked something
|
||||
}
|
||||
}
|
||||
|
||||
legitimateexit = false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -3315,18 +3368,20 @@ void G_LoadGameData(void)
|
|||
UINT8 rtemp;
|
||||
|
||||
//For records
|
||||
UINT32 recscore;
|
||||
tic_t rectime;
|
||||
UINT16 recrings;
|
||||
tic_t rectime;
|
||||
tic_t reclap;
|
||||
//UINT32 recscore;
|
||||
//UINT16 recrings;
|
||||
|
||||
UINT8 recmares;
|
||||
INT32 curmare;
|
||||
//UINT8 recmares;
|
||||
//INT32 curmare;
|
||||
|
||||
// Clear things so previously read gamedata doesn't transfer
|
||||
// to new gamedata
|
||||
G_ClearRecords(); // main and nights records
|
||||
M_ClearSecrets(); // emblems, unlocks, maps visited, etc
|
||||
totalplaytime = 0; // total play time (separate from all)
|
||||
matchesplayed = 0; // SRB2Kart: matches played & finished
|
||||
|
||||
if (M_CheckParm("-nodata"))
|
||||
return; // Don't load.
|
||||
|
@ -3356,6 +3411,7 @@ void G_LoadGameData(void)
|
|||
}
|
||||
|
||||
totalplaytime = READUINT32(save_p);
|
||||
matchesplayed = READUINT32(save_p);
|
||||
|
||||
modded = READUINT8(save_p);
|
||||
|
||||
|
@ -3402,29 +3458,31 @@ void G_LoadGameData(void)
|
|||
|
||||
timesBeaten = READUINT32(save_p);
|
||||
timesBeatenWithEmeralds = READUINT32(save_p);
|
||||
timesBeatenUltimate = READUINT32(save_p);
|
||||
//timesBeatenUltimate = READUINT32(save_p);
|
||||
|
||||
// Main records
|
||||
for (i = 0; i < NUMMAPS; ++i)
|
||||
{
|
||||
recscore = READUINT32(save_p);
|
||||
rectime = (tic_t)READUINT32(save_p);
|
||||
recrings = READUINT16(save_p);
|
||||
rectime = (tic_t)READUINT32(save_p);
|
||||
reclap = (tic_t)READUINT32(save_p);
|
||||
//recscore = READUINT32(save_p);
|
||||
//recrings = READUINT16(save_p);
|
||||
|
||||
if (recrings > 10000 || recscore > MAXSCORE)
|
||||
goto datacorrupt;
|
||||
/*if (recrings > 10000 || recscore > MAXSCORE)
|
||||
goto datacorrupt;*/
|
||||
|
||||
if (recscore || rectime || recrings)
|
||||
if (rectime || reclap)
|
||||
{
|
||||
G_AllocMainRecordData((INT16)i);
|
||||
mainrecords[i]->score = recscore;
|
||||
mainrecords[i]->time = rectime;
|
||||
mainrecords[i]->rings = recrings;
|
||||
mainrecords[i]->lap = reclap;
|
||||
//mainrecords[i]->score = recscore;
|
||||
//mainrecords[i]->rings = recrings;
|
||||
}
|
||||
}
|
||||
|
||||
// Nights records
|
||||
for (i = 0; i < NUMMAPS; ++i)
|
||||
/*for (i = 0; i < NUMMAPS; ++i)
|
||||
{
|
||||
if ((recmares = READUINT8(save_p)) == 0)
|
||||
continue;
|
||||
|
@ -3442,7 +3500,7 @@ void G_LoadGameData(void)
|
|||
}
|
||||
|
||||
nightsrecords[i]->nummares = recmares;
|
||||
}
|
||||
}*/
|
||||
|
||||
// done
|
||||
Z_Free(savebuffer);
|
||||
|
@ -3475,7 +3533,7 @@ void G_SaveGameData(void)
|
|||
INT32 i, j;
|
||||
UINT8 btemp;
|
||||
|
||||
INT32 curmare;
|
||||
//INT32 curmare;
|
||||
|
||||
if (!gamedataloaded)
|
||||
return; // If never loaded (-nodata), don't save
|
||||
|
@ -3498,6 +3556,7 @@ void G_SaveGameData(void)
|
|||
WRITEUINT32(save_p, 0xFCAFE211);
|
||||
|
||||
WRITEUINT32(save_p, totalplaytime);
|
||||
WRITEUINT32(save_p, matchesplayed);
|
||||
|
||||
btemp = (UINT8)(savemoddata || modifiedgame);
|
||||
WRITEUINT8(save_p, btemp);
|
||||
|
@ -3542,27 +3601,27 @@ void G_SaveGameData(void)
|
|||
|
||||
WRITEUINT32(save_p, timesBeaten);
|
||||
WRITEUINT32(save_p, timesBeatenWithEmeralds);
|
||||
WRITEUINT32(save_p, timesBeatenUltimate);
|
||||
//WRITEUINT32(save_p, timesBeatenUltimate);
|
||||
|
||||
// Main records
|
||||
for (i = 0; i < NUMMAPS; i++)
|
||||
{
|
||||
if (mainrecords[i])
|
||||
{
|
||||
WRITEUINT32(save_p, mainrecords[i]->score);
|
||||
WRITEUINT32(save_p, mainrecords[i]->time);
|
||||
WRITEUINT16(save_p, mainrecords[i]->rings);
|
||||
WRITEUINT32(save_p, mainrecords[i]->lap);
|
||||
//WRITEUINT32(save_p, mainrecords[i]->score);
|
||||
//WRITEUINT16(save_p, mainrecords[i]->rings);
|
||||
}
|
||||
else
|
||||
{
|
||||
WRITEUINT32(save_p, 0);
|
||||
WRITEUINT32(save_p, 0);
|
||||
WRITEUINT16(save_p, 0);
|
||||
}
|
||||
}
|
||||
|
||||
// NiGHTS records
|
||||
for (i = 0; i < NUMMAPS; i++)
|
||||
/*for (i = 0; i < NUMMAPS; i++)
|
||||
{
|
||||
if (!nightsrecords[i] || !nightsrecords[i]->nummares)
|
||||
{
|
||||
|
@ -3578,7 +3637,7 @@ void G_SaveGameData(void)
|
|||
WRITEUINT8(save_p, nightsrecords[i]->grade[curmare]);
|
||||
WRITEUINT32(save_p, nightsrecords[i]->time[curmare]);
|
||||
}
|
||||
}
|
||||
}*/
|
||||
|
||||
length = save_p - savebuffer;
|
||||
|
||||
|
@ -3840,6 +3899,8 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
|
|||
if (netgame || multiplayer) // Nice try, haxor.
|
||||
ultimatemode = false;
|
||||
|
||||
legitimateexit = false; // SRB2Kart
|
||||
|
||||
if (!demoplayback && !netgame) // Netgame sets random seed elsewhere, demo playback sets seed just before us!
|
||||
P_SetRandSeed(M_RandomizedSeed()); // Use a more "Random" random seed
|
||||
|
||||
|
@ -4944,12 +5005,13 @@ void G_BeginRecording(void)
|
|||
case ATTACKING_RECORD: // 1
|
||||
demotime_p = demo_p;
|
||||
WRITEUINT32(demo_p,UINT32_MAX); // time
|
||||
WRITEUINT32(demo_p,UINT32_MAX); // lap
|
||||
break;
|
||||
case ATTACKING_NIGHTS: // 2
|
||||
/*case ATTACKING_NIGHTS: // 2
|
||||
demotime_p = demo_p;
|
||||
WRITEUINT32(demo_p,UINT32_MAX); // time
|
||||
WRITEUINT32(demo_p,0); // score
|
||||
break;
|
||||
break;*/
|
||||
default: // 3
|
||||
break;
|
||||
}
|
||||
|
@ -5050,21 +5112,22 @@ void G_BeginMetal(void)
|
|||
oldmetal.angle = mo->angle;
|
||||
}
|
||||
|
||||
void G_SetDemoTime(UINT32 ptime, UINT32 pscore)
|
||||
void G_SetDemoTime(UINT32 ptime, UINT32 plap)
|
||||
{
|
||||
if (!demorecording || !demotime_p)
|
||||
return;
|
||||
if (demoflags & DF_RECORDATTACK)
|
||||
{
|
||||
WRITEUINT32(demotime_p, ptime);
|
||||
WRITEUINT32(demotime_p, plap);
|
||||
demotime_p = NULL;
|
||||
}
|
||||
else if (demoflags & DF_NIGHTSATTACK)
|
||||
/*else if (demoflags & DF_NIGHTSATTACK)
|
||||
{
|
||||
WRITEUINT32(demotime_p, ptime);
|
||||
WRITEUINT32(demotime_p, pscore);
|
||||
demotime_p = NULL;
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Returns bitfield:
|
||||
|
@ -5075,7 +5138,7 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
|
|||
{
|
||||
UINT8 *buffer,*p;
|
||||
UINT8 flags;
|
||||
UINT32 oldtime, newtime, oldscore, newscore;
|
||||
UINT32 oldtime, newtime, oldlap, newlap;
|
||||
UINT16 oldversion;
|
||||
size_t bufsize ATTRUNUSED;
|
||||
UINT8 c;
|
||||
|
@ -5109,13 +5172,13 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
|
|||
if (flags & DF_RECORDATTACK)
|
||||
{
|
||||
newtime = READUINT32(p);
|
||||
newscore = 0;
|
||||
newlap = READUINT32(p);
|
||||
}
|
||||
else if (flags & DF_NIGHTSATTACK)
|
||||
/*else if (flags & DF_NIGHTSATTACK)
|
||||
{
|
||||
newtime = READUINT32(p);
|
||||
newscore = READUINT32(p);
|
||||
}
|
||||
}*/
|
||||
else // appease compiler
|
||||
return 0;
|
||||
|
||||
|
@ -5169,13 +5232,13 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
|
|||
if (flags & DF_RECORDATTACK)
|
||||
{
|
||||
oldtime = READUINT32(p);
|
||||
oldscore = 0;
|
||||
oldlap = READUINT32(p);
|
||||
}
|
||||
else if (flags & DF_NIGHTSATTACK)
|
||||
/*else if (flags & DF_NIGHTSATTACK)
|
||||
{
|
||||
oldtime = READUINT32(p);
|
||||
oldscore = READUINT32(p);
|
||||
}
|
||||
}*/
|
||||
else // appease compiler
|
||||
return UINT8_MAX;
|
||||
|
||||
|
@ -5183,11 +5246,11 @@ UINT8 G_CmpDemoTime(char *oldname, char *newname)
|
|||
|
||||
c = 0;
|
||||
if (newtime < oldtime
|
||||
|| (newtime == oldtime && (newscore > oldscore)))
|
||||
|| (newtime == oldtime && (newlap < oldlap)))
|
||||
c |= 1; // Better time
|
||||
if (newscore > oldscore
|
||||
|| (newscore == oldscore && newtime < oldtime))
|
||||
c |= 1<<1; // Better score
|
||||
if (newlap < oldlap
|
||||
|| (newlap == oldlap && newtime < oldtime))
|
||||
c |= 1<<1; // Better lap time
|
||||
return c;
|
||||
}
|
||||
|
||||
|
@ -5305,8 +5368,8 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
modeattacking = (demoflags & DF_ATTACKMASK)>>DF_ATTACKSHIFT;
|
||||
CON_ToggleOff();
|
||||
|
||||
hu_demoscore = 0;
|
||||
hu_demotime = UINT32_MAX;
|
||||
hu_demolap = UINT32_MAX;
|
||||
|
||||
switch (modeattacking)
|
||||
{
|
||||
|
@ -5314,11 +5377,12 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
break;
|
||||
case ATTACKING_RECORD: // 1
|
||||
hu_demotime = READUINT32(demo_p);
|
||||
hu_demolap = READUINT32(demo_p);
|
||||
break;
|
||||
case ATTACKING_NIGHTS: // 2
|
||||
/*case ATTACKING_NIGHTS: // 2
|
||||
hu_demotime = READUINT32(demo_p);
|
||||
hu_demoscore = READUINT32(demo_p);
|
||||
break;
|
||||
break;*/
|
||||
default: // 3
|
||||
modeattacking = ATTACKING_NONE;
|
||||
break;
|
||||
|
@ -5534,11 +5598,11 @@ void G_AddGhost(char *defdemoname)
|
|||
case ATTACKING_NONE: // 0
|
||||
break;
|
||||
case ATTACKING_RECORD: // 1
|
||||
p += 4; // demo time
|
||||
p += 8; // demo time, lap
|
||||
break;
|
||||
case ATTACKING_NIGHTS: // 2
|
||||
/*case ATTACKING_NIGHTS: // 2
|
||||
p += 8; // demo time left, score
|
||||
break;
|
||||
break;*/
|
||||
default: // 3
|
||||
break;
|
||||
}
|
||||
|
|
21
src/g_game.h
21
src/g_game.h
|
@ -60,7 +60,7 @@ extern consvar_t cv_sideaxis,cv_turnaxis,cv_moveaxis,cv_lookaxis,cv_fireaxis,cv_
|
|||
extern consvar_t cv_sideaxis2,cv_turnaxis2,cv_moveaxis2,cv_lookaxis2,cv_fireaxis2,cv_firenaxis2;
|
||||
extern consvar_t cv_sideaxis3,cv_turnaxis3,cv_moveaxis3,cv_lookaxis3,cv_fireaxis3,cv_firenaxis3;
|
||||
extern consvar_t cv_sideaxis4,cv_turnaxis4,cv_moveaxis4,cv_lookaxis4,cv_fireaxis4,cv_firenaxis4;
|
||||
extern consvar_t cv_ghost_bestscore, cv_ghost_besttime, cv_ghost_last, cv_ghost_guest, cv_ghost_staff; //cv_ghost_bestlap
|
||||
extern consvar_t cv_ghost_besttime, cv_ghost_bestlap, cv_ghost_last, cv_ghost_guest, cv_ghost_staff;
|
||||
|
||||
// mouseaiming (looking up/down with the mouse or keyboard)
|
||||
#define KB_LOOKSPEED (1<<25)
|
||||
|
@ -122,7 +122,7 @@ void G_BeginRecording(void);
|
|||
void G_BeginMetal(void);
|
||||
|
||||
// Only called by shutdown code.
|
||||
void G_SetDemoTime(UINT32 ptime, UINT32 pscore);
|
||||
void G_SetDemoTime(UINT32 ptime, UINT32 plap);
|
||||
UINT8 G_CmpDemoTime(char *oldname, char *newname);
|
||||
|
||||
typedef enum
|
||||
|
@ -197,18 +197,19 @@ void G_SetGamestate(gamestate_t newstate);
|
|||
|
||||
// Gamedata record shit
|
||||
void G_AllocMainRecordData(INT16 i);
|
||||
void G_AllocNightsRecordData(INT16 i);
|
||||
//void G_AllocNightsRecordData(INT16 i);
|
||||
void G_ClearRecords(void);
|
||||
|
||||
UINT32 G_GetBestScore(INT16 map);
|
||||
//UINT32 G_GetBestScore(INT16 map);
|
||||
tic_t G_GetBestTime(INT16 map);
|
||||
UINT16 G_GetBestRings(INT16 map);
|
||||
UINT32 G_GetBestNightsScore(INT16 map, UINT8 mare);
|
||||
tic_t G_GetBestNightsTime(INT16 map, UINT8 mare);
|
||||
UINT8 G_GetBestNightsGrade(INT16 map, UINT8 mare);
|
||||
//tic_t G_GetBestLap(INT16 map);
|
||||
//UINT16 G_GetBestRings(INT16 map);
|
||||
//UINT32 G_GetBestNightsScore(INT16 map, UINT8 mare);
|
||||
//tic_t G_GetBestNightsTime(INT16 map, UINT8 mare);
|
||||
//UINT8 G_GetBestNightsGrade(INT16 map, UINT8 mare);
|
||||
|
||||
void G_AddTempNightsRecords(UINT32 pscore, tic_t ptime, UINT8 mare);
|
||||
void G_SetNightsRecords(void);
|
||||
//void G_AddTempNightsRecords(UINT32 pscore, tic_t ptime, UINT8 mare);
|
||||
//void G_SetNightsRecords(void);
|
||||
|
||||
FUNCMATH INT32 G_TicsToHours(tic_t tics);
|
||||
FUNCMATH INT32 G_TicsToMinutes(tic_t tics, boolean full);
|
||||
|
|
266
src/g_input.c
266
src/g_input.c
|
@ -1188,40 +1188,23 @@ static keyname_t keynames[] =
|
|||
static const char *gamecontrolname[num_gamecontrols] =
|
||||
{
|
||||
"nothing", // a key/button mapped to gc_null has no effect
|
||||
"forward",
|
||||
"backward",
|
||||
"strafeleft",
|
||||
"straferight",
|
||||
"turnleft",
|
||||
"turnright",
|
||||
"driftleft",
|
||||
"driftright",
|
||||
"weapon1",
|
||||
"weapon2",
|
||||
"weapon3",
|
||||
"weapon4",
|
||||
"weapon5",
|
||||
"weapon6",
|
||||
"weapon7",
|
||||
"weapon8",
|
||||
"weapon9",
|
||||
"weapon10",
|
||||
"fire",
|
||||
"accelerate",
|
||||
"spectate",
|
||||
"brake",
|
||||
"camtoggle",
|
||||
"aimforward",
|
||||
"aimbackward",
|
||||
"turnleft",
|
||||
"turnright",
|
||||
"accelerate",
|
||||
"drift",
|
||||
"brake",
|
||||
"fire",
|
||||
"lookback",
|
||||
"camtoggle",
|
||||
"spectate",
|
||||
"lookup",
|
||||
"lookdown",
|
||||
"centerview",
|
||||
"mouseaiming",
|
||||
"talkkey",
|
||||
"teamtalkkey",
|
||||
"scores",
|
||||
"jump",
|
||||
"console",
|
||||
"pause",
|
||||
"custom1",
|
||||
|
@ -1285,222 +1268,35 @@ INT32 G_KeyStringtoNum(const char *keystr)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#ifdef DC
|
||||
// SRB2Kart
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_HAT1+0; //Up
|
||||
gamecontrol[gc_forward ][1] = KEY_UPARROW;
|
||||
gamecontrol[gc_backward ][0] = KEY_HAT1+1; //Down
|
||||
gamecontrol[gc_backward ][1] = KEY_DOWNARROW;
|
||||
//gamecontrol[gc_straferight][0] = '[';
|
||||
//gamecontrol[gc_strafeleft ][0] = ']';
|
||||
gamecontrol[gc_turnleft ][0] = KEY_HAT1+2; //Left
|
||||
gamecontrol[gc_turnleft ][1] = KEY_LEFTARROW;
|
||||
gamecontrol[gc_turnright ][0] = KEY_HAT1+3; //Right
|
||||
gamecontrol[gc_turnright ][1] = KEY_RIGHTARROW;
|
||||
gamecontrol[gc_driftleft ][0] = ']';
|
||||
gamecontrol[gc_driftright ][0] = '[';
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+6; //X
|
||||
gamecontrol[gc_fire ][1] = KEY_RCTRL;
|
||||
gamecontrol[gc_accelerate ][0] = KEY_JOY1+5; //Y
|
||||
gamecontrol[gc_accelerate ][1] = ';';
|
||||
gamecontrol[gc_spectate ][0] = '\'';
|
||||
gamecontrol[gc_brake ][0] = KEY_JOY1+1; //B
|
||||
gamecontrol[gc_brake ][1] = '.';
|
||||
gamecontrol[gc_camtoggle ][1] = ',';
|
||||
gamecontrol[gc_aimforward ][0] = 'o';
|
||||
gamecontrol[gc_aimbackward][0] = 'p';
|
||||
gamecontrol[gc_lookback ][0] = 'c';
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_mouseaiming][0] = 's';
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; //A
|
||||
gamecontrol[gc_jump ][1] = '/';
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_console ][1] = KEY_F5;
|
||||
//gamecontrolbis
|
||||
gamecontrolbis[gc_forward ][0] = KEY_2HAT1+0;
|
||||
gamecontrolbis[gc_forward ][1] = 'w';
|
||||
gamecontrolbis[gc_backward ][0] = KEY_2HAT1+1;
|
||||
gamecontrolbis[gc_backward ][1] = 's';
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2HAT1+2;
|
||||
gamecontrolbis[gc_turnleft ][1] = 'a';
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2HAT1+3;
|
||||
gamecontrolbis[gc_turnright ][1] = 'd';
|
||||
gamecontrolbis[gc_driftleft ][0] = 't';
|
||||
gamecontrolbis[gc_driftright][0] = 'r';
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+6; //X
|
||||
gamecontrolbis[gc_accelerate][0] = KEY_2JOY1+5; //Y
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+1; //B
|
||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+2; //A
|
||||
//gamecontrolbis[gc_straferight][0] = 'x';
|
||||
//gamecontrolbis[gc_strafeleft ][0] = 'z';
|
||||
}
|
||||
#elif defined (_PSP)
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_HAT1+0; // Up
|
||||
gamecontrol[gc_backward ][0] = KEY_HAT1+1; // Down
|
||||
gamecontrol[gc_turnleft ][0] = KEY_HAT1+2; // Left
|
||||
gamecontrol[gc_turnright ][0] = KEY_HAT1+3; // Right
|
||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; // L
|
||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; // R
|
||||
gamecontrol[gc_spectate ][0] = KEY_JOY1+0; // Triangle
|
||||
gamecontrol[gc_brake ][0] = KEY_JOY1+1; // Circle
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_JOY1+6; // Select
|
||||
gamecontrol[gc_lookback ][0] = KEY_JOY1+3; // Square
|
||||
gamecontrol[gc_centerview ][0] = KEY_JOY1+9; // Hold
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+8; // Start
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; // Cross
|
||||
}
|
||||
#elif defined (GP2X)
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+0; //A
|
||||
gamecontrol[gc_forward ][0] = KEY_JOY1+1; //Y
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+2; //B
|
||||
gamecontrol[gc_brake ][0] = KEY_JOY1+3; //X
|
||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
|
||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
|
||||
gamecontrol[gc_lookup ][0] = KEY_JOY1+6; //U
|
||||
gamecontrol[gc_lookdown ][0] = KEY_JOY1+7; //D
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+8; //S
|
||||
}
|
||||
#elif defined (_NDS)
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+2; //X
|
||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+0; //A
|
||||
gamecontrol[gc_brake ][0] = KEY_JOY1+3; //Y
|
||||
gamecontrol[gc_strafeleft ][0] = KEY_JOY1+4; //L
|
||||
gamecontrol[gc_straferight][0] = KEY_JOY1+5; //R
|
||||
// Main controls
|
||||
gamecontrol[gc_aimforward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_aimbackward][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+6; //Start
|
||||
gamecontrol[gc_driftleft ][0] = KEY_JOY1+7; //Select
|
||||
}
|
||||
#else
|
||||
void G_Controldefault(void)
|
||||
{
|
||||
gamecontrol[gc_forward ][0] = KEY_UPARROW;
|
||||
gamecontrol[gc_forward ][1] = 'w';
|
||||
gamecontrol[gc_backward ][0] = KEY_DOWNARROW;
|
||||
gamecontrol[gc_backward ][1] = 's';
|
||||
gamecontrol[gc_strafeleft ][0] = 'a';
|
||||
gamecontrol[gc_straferight][0] = 'd';
|
||||
gamecontrol[gc_turnleft ][0] = KEY_LEFTARROW;
|
||||
gamecontrol[gc_turnright ][0] = KEY_RIGHTARROW;
|
||||
gamecontrol[gc_driftleft ][0] = 'e';
|
||||
gamecontrol[gc_driftright ][0] = 'q';
|
||||
gamecontrol[gc_wepslot1 ][0] = '1';
|
||||
gamecontrol[gc_wepslot2 ][0] = '2';
|
||||
gamecontrol[gc_wepslot3 ][0] = '3';
|
||||
gamecontrol[gc_wepslot4 ][0] = '4';
|
||||
gamecontrol[gc_wepslot5 ][0] = '5';
|
||||
gamecontrol[gc_wepslot6 ][0] = '6';
|
||||
gamecontrol[gc_wepslot7 ][0] = '7';
|
||||
gamecontrol[gc_wepslot8 ][0] = '8';
|
||||
gamecontrol[gc_wepslot9 ][0] = '9';
|
||||
gamecontrol[gc_wepslot10 ][0] = '0';
|
||||
gamecontrol[gc_fire ][0] = KEY_RCTRL;
|
||||
gamecontrol[gc_fire ][1] = KEY_MOUSE1+0;
|
||||
gamecontrol[gc_accelerate ][0] = 'c';
|
||||
gamecontrol[gc_spectate ][0] = '\'';
|
||||
gamecontrol[gc_brake ][0] = 'x';
|
||||
gamecontrol[gc_camtoggle ][0] = 'v';
|
||||
gamecontrol[gc_aimforward ][0] = '[';
|
||||
gamecontrol[gc_aimbackward][0] = ']';
|
||||
gamecontrol[gc_lookback ][0] = 'r';
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_jump ][0] = 'z';
|
||||
gamecontrol[gc_jump ][1] = KEY_MOUSE1+1;
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_accelerate ][0] = 'a';
|
||||
gamecontrol[gc_drift ][0] = 's';
|
||||
gamecontrol[gc_brake ][0] = 'd';
|
||||
gamecontrol[gc_fire ][0] = KEY_SPACE;
|
||||
gamecontrol[gc_lookback ][0] = KEY_LSHIFT;
|
||||
|
||||
// Extra controls
|
||||
gamecontrol[gc_camtoggle ][0] = KEY_BACKSPACE;
|
||||
gamecontrol[gc_pause ][0] = KEY_PAUSE;
|
||||
#ifdef WMINPUT
|
||||
gamecontrol[gc_forward ][0] = KEY_JOY1+02; //UP
|
||||
gamecontrol[gc_backward ][0] = KEY_JOY1+03; //DOWN
|
||||
gamecontrol[gc_turnleft ][0] = KEY_JOY1+04; //LEFT
|
||||
gamecontrol[gc_turnright ][0] = KEY_JOY1+05; //RIGHT
|
||||
gamecontrol[gc_driftleft ][0] = KEY_JOY1+10; //y
|
||||
gamecontrol[gc_driftright ][0] = KEY_JOY1+9; //x
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+12; //L
|
||||
gamecontrol[gc_accelerate ][0] = KEY_JOY1+13; //R
|
||||
gamecontrol[gc_brake ][0] = KEY_JOY1+00; //B
|
||||
gamecontrol[gc_brake ][1] = KEY_JOY1+07; //b
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+01; //A
|
||||
gamecontrol[gc_jump ][1] = KEY_JOY1+06; //a
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+18; //Home
|
||||
gamecontrolbis[gc_forward ][0] = KEY_2JOY1+02; //UP
|
||||
gamecontrolbis[gc_backward ][0] = KEY_2JOY1+03; //DOWN
|
||||
gamecontrolbis[gc_turnleft ][0] = KEY_2JOY1+04; //LEFT
|
||||
gamecontrolbis[gc_turnright ][0] = KEY_2JOY1+05; //RIGHT
|
||||
gamecontrolbis[gc_driftleft ][0] = KEY_2JOY1+10; //y
|
||||
gamecontrolbis[gc_driftright ][0] = KEY_2JOY1+9; //x
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+12; //L
|
||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+13; //R
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+00; //B
|
||||
gamecontrolbis[gc_brake ][1] = KEY_2JOY1+07; //b
|
||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+01; //A
|
||||
gamecontrolbis[gc_jump ][1] = KEY_2JOY1+06; //a
|
||||
gamecontrolbis[gc_pause ][0] = KEY_2JOY1+18; //Home
|
||||
#endif
|
||||
#ifdef _WII
|
||||
gamecontrol[gc_forward ][1] = KEY_HAT1+00; //UP
|
||||
gamecontrol[gc_backward ][1] = KEY_HAT1+01; //DOWN
|
||||
gamecontrol[gc_straferight][1] = KEY_JOY1+16; //ZR
|
||||
gamecontrol[gc_strafeleft ][1] = KEY_JOY1+15; //ZL
|
||||
gamecontrol[gc_turnleft ][1] = KEY_HAT1+02; //LEFT
|
||||
gamecontrol[gc_turnright ][1] = KEY_HAT1+03; //RIGHT
|
||||
gamecontrol[gc_driftleft ][1] = KEY_JOY1+11; //x
|
||||
gamecontrol[gc_fire ][0] = KEY_JOY1+12; //y
|
||||
gamecontrol[gc_fire ][1] = KEY_JOY1+01; //B
|
||||
gamecontrol[gc_accelerate ][0] = KEY_JOY1+13; //L
|
||||
gamecontrol[gc_accelerate ][1] = KEY_JOY1+00; //A
|
||||
gamecontrol[gc_spectate ][1] = KEY_JOY1+17; //Plus CC
|
||||
gamecontrol[gc_brake ][0] = KEY_JOY1+9; //a
|
||||
gamecontrol[gc_brake ][1] = KEY_JOY1+02; //1
|
||||
gamecontrol[gc_centerview ][1] = KEY_JOY1+14; //R
|
||||
gamecontrol[gc_scores ][0] = KEY_JOY1+04; //Minus
|
||||
gamecontrol[gc_scores ][1] = KEY_JOY1+18; //Minus
|
||||
gamecontrol[gc_jump ][0] = KEY_JOY1+10; //b
|
||||
gamecontrol[gc_jump ][1] = KEY_JOY1+3; //2
|
||||
gamecontrol[gc_pause ][0] = KEY_JOY1+06; //Home
|
||||
gamecontrol[gc_pause ][1] = KEY_JOY1+19; //Home
|
||||
gamecontrolbis[gc_forward ][1] = KEY_2HAT1+00; //UP
|
||||
gamecontrolbis[gc_backward ][1] = KEY_2HAT1+01; //DOWN
|
||||
gamecontrolbis[gc_straferight][1] = KEY_2JOY1+16; //ZR
|
||||
gamecontrolbis[gc_strafeleft ][1] = KEY_2JOY1+15; //ZL
|
||||
gamecontrolbis[gc_turnleft ][1] = KEY_2HAT1+02; //LEFT
|
||||
gamecontrolbis[gc_turnright ][1] = KEY_2HAT1+03; //RIGHT
|
||||
gamecontrolbis[gc_driftleft ][1] = KEY_2JOY1+11; //x
|
||||
gamecontrolbis[gc_fire ][0] = KEY_2JOY1+12; //y
|
||||
gamecontrolbis[gc_fire ][1] = KEY_2JOY1+01; //B
|
||||
gamecontrolbis[gc_accelerate ][0] = KEY_2JOY1+13; //L
|
||||
gamecontrolbis[gc_accelerate ][1] = KEY_2JOY1+00; //A
|
||||
gamecontrolbis[gc_spectate ][1] = KEY_2JOY1+17; //Plus CC
|
||||
gamecontrolbis[gc_brake ][0] = KEY_2JOY1+9; //a
|
||||
gamecontrolbis[gc_brake ][1] = KEY_2JOY1+02; //1
|
||||
gamecontrolbis[gc_centerview ][1] = KEY_2JOY1+14; //R
|
||||
gamecontrolbis[gc_scores ][0] = KEY_2JOY1+04; //Minus
|
||||
gamecontrolbis[gc_scores ][1] = KEY_2JOY1+18; //Minus
|
||||
gamecontrolbis[gc_jump ][0] = KEY_2JOY1+10; //b
|
||||
gamecontrolbis[gc_jump ][1] = KEY_2JOY1+3; //2
|
||||
gamecontrolbis[gc_pause ][0] = KEY_2JOY1+06; //Home
|
||||
gamecontrolbis[gc_pause ][1] = KEY_2JOY1+19; //Home
|
||||
#endif
|
||||
gamecontrol[gc_console ][0] = KEY_CONSOLE;
|
||||
gamecontrol[gc_talkkey ][0] = 't';
|
||||
gamecontrol[gc_teamkey ][0] = 'y';
|
||||
gamecontrol[gc_scores ][0] = KEY_TAB;
|
||||
gamecontrol[gc_spectate ][0] = '\'';
|
||||
|
||||
// Spectator controls
|
||||
gamecontrol[gc_lookup ][0] = KEY_PGUP;
|
||||
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
|
||||
gamecontrol[gc_centerview ][0] = KEY_END;
|
||||
}
|
||||
#endif
|
||||
//#endif
|
||||
|
||||
void G_SaveKeySetting(FILE *f)
|
||||
{
|
||||
|
|
|
@ -94,40 +94,23 @@ typedef enum
|
|||
typedef enum
|
||||
{
|
||||
gc_null = 0, // a key/button mapped to gc_null has no effect
|
||||
gc_forward,
|
||||
gc_backward,
|
||||
gc_strafeleft,
|
||||
gc_straferight,
|
||||
gc_aimforward,
|
||||
gc_aimbackward,
|
||||
gc_turnleft,
|
||||
gc_turnright,
|
||||
gc_driftleft, // gc_weaponnext
|
||||
gc_driftright, // gc_weaponprev
|
||||
gc_wepslot1,
|
||||
gc_wepslot2,
|
||||
gc_wepslot3,
|
||||
gc_wepslot4,
|
||||
gc_wepslot5,
|
||||
gc_wepslot6,
|
||||
gc_wepslot7,
|
||||
gc_wepslot8,
|
||||
gc_wepslot9,
|
||||
gc_wepslot10,
|
||||
gc_accelerate,
|
||||
gc_drift,
|
||||
gc_brake,
|
||||
gc_fire,
|
||||
gc_accelerate, // gc_firenormal
|
||||
gc_spectate, // gc_tossflag
|
||||
gc_brake, // gc_use
|
||||
gc_lookback,
|
||||
gc_camtoggle,
|
||||
gc_aimforward, // gc_camleft
|
||||
gc_aimbackward, // gc_camright
|
||||
gc_lookback, // gc_camreset
|
||||
gc_spectate,
|
||||
gc_lookup,
|
||||
gc_lookdown,
|
||||
gc_centerview,
|
||||
gc_mouseaiming, // mouse aiming is momentary (toggleable in the menu)
|
||||
gc_talkkey,
|
||||
gc_teamkey,
|
||||
gc_scores,
|
||||
gc_jump,
|
||||
gc_console,
|
||||
gc_pause,
|
||||
gc_custom1, // Lua scriptable
|
||||
|
|
119
src/hu_stuff.c
119
src/hu_stuff.c
|
@ -911,7 +911,7 @@ static void HU_DrawChat(void)
|
|||
|
||||
static inline void HU_DrawCrosshair(void)
|
||||
{
|
||||
INT32 i, y;
|
||||
INT32 i, x, y;
|
||||
|
||||
i = cv_crosshair.value & 3;
|
||||
if (!i)
|
||||
|
@ -922,17 +922,23 @@ static inline void HU_DrawCrosshair(void)
|
|||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
{
|
||||
x = (INT32)gr_basewindowcenterx;
|
||||
y = (INT32)gr_basewindowcentery;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
x = viewwindowx + (viewwidth>>1);
|
||||
y = viewwindowy + (viewheight>>1);
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
|
||||
static inline void HU_DrawCrosshair2(void)
|
||||
{
|
||||
INT32 i, y;
|
||||
INT32 i, x, y;
|
||||
|
||||
i = cv_crosshair2.value & 3;
|
||||
if (!i)
|
||||
|
@ -943,27 +949,43 @@ static inline void HU_DrawCrosshair2(void)
|
|||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
{
|
||||
x = (INT32)gr_basewindowcenterx;
|
||||
y = (INT32)gr_basewindowcentery;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
x = viewwindowx + (viewwidth>>1);
|
||||
y = viewwindowy + (viewheight>>1);
|
||||
}
|
||||
|
||||
if (splitscreen)
|
||||
{
|
||||
if (splitscreen > 1)
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
y += (INT32)gr_viewheight;
|
||||
else
|
||||
if (rendermode != render_soft)
|
||||
x += (INT32)gr_viewwidth;
|
||||
else
|
||||
#endif
|
||||
y += viewheight;
|
||||
x += viewwidth;
|
||||
else
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
y += (INT32)gr_viewheight;
|
||||
else
|
||||
#endif
|
||||
y += viewheight;
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void HU_DrawCrosshair3(void)
|
||||
{
|
||||
INT32 i, y;
|
||||
INT32 i, x, y;
|
||||
|
||||
i = cv_crosshair3.value & 3;
|
||||
if (!i)
|
||||
|
@ -974,10 +996,16 @@ static inline void HU_DrawCrosshair3(void)
|
|||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
{
|
||||
x = (INT32)gr_basewindowcenterx;
|
||||
y = (INT32)gr_basewindowcentery;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
x = viewwindowx + (viewwidth>>1);
|
||||
y = viewwindowy + (viewheight>>1);
|
||||
}
|
||||
|
||||
if (splitscreen > 1)
|
||||
{
|
||||
|
@ -988,13 +1016,13 @@ static inline void HU_DrawCrosshair3(void)
|
|||
#endif
|
||||
y += viewheight;
|
||||
|
||||
V_DrawScaledPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
static inline void HU_DrawCrosshair4(void)
|
||||
{
|
||||
INT32 i, y;
|
||||
INT32 i, x, y;
|
||||
|
||||
i = cv_crosshair4.value & 3;
|
||||
if (!i)
|
||||
|
@ -1005,21 +1033,33 @@ static inline void HU_DrawCrosshair4(void)
|
|||
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
{
|
||||
x = (INT32)gr_basewindowcenterx;
|
||||
y = (INT32)gr_basewindowcentery;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
x = viewwindowx + (viewwidth>>1);
|
||||
y = viewwindowy + (viewheight>>1);
|
||||
}
|
||||
|
||||
if (splitscreen > 2)
|
||||
{
|
||||
#ifdef HWRENDER
|
||||
if (rendermode != render_soft)
|
||||
{
|
||||
x += (INT32)gr_viewwidth;
|
||||
y += (INT32)gr_viewheight;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
x += viewwidth;
|
||||
y += viewheight;
|
||||
}
|
||||
|
||||
V_DrawScaledPatch(vid.width>>1, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
V_DrawScaledPatch(x, y, V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, crosshair[i - 1]);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1101,30 +1141,31 @@ static void HU_drawGametype(void)
|
|||
//
|
||||
// demo info stuff
|
||||
//
|
||||
UINT32 hu_demoscore;
|
||||
UINT32 hu_demotime;
|
||||
UINT32 hu_demolap;
|
||||
|
||||
static void HU_DrawDemoInfo(void)
|
||||
{
|
||||
UINT8 timeoffset = 8;
|
||||
V_DrawString(4, 188-16, V_YELLOWMAP, va(M_GetText("%s's replay"), player_names[0]));
|
||||
if (modeattacking)
|
||||
{
|
||||
if (modeattacking == ATTACKING_NIGHTS)
|
||||
{
|
||||
V_DrawString(4, 188-8, V_YELLOWMAP|V_MONOSPACE, "SCORE:");
|
||||
V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, va("%d", hu_demoscore));
|
||||
timeoffset = 0;
|
||||
}
|
||||
|
||||
V_DrawString(4, 188- timeoffset, V_YELLOWMAP|V_MONOSPACE, "TIME:");
|
||||
V_DrawString(4, 188-8, V_YELLOWMAP|V_MONOSPACE, "BEST TIME:");
|
||||
if (hu_demotime != UINT32_MAX)
|
||||
V_DrawRightAlignedString(120, 188- timeoffset, V_MONOSPACE, va("%i:%02i.%02i",
|
||||
V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, va("%i:%02i.%02i",
|
||||
G_TicsToMinutes(hu_demotime,true),
|
||||
G_TicsToSeconds(hu_demotime),
|
||||
G_TicsToCentiseconds(hu_demotime)));
|
||||
else
|
||||
V_DrawRightAlignedString(120, 188- timeoffset, V_MONOSPACE, "--:--.--");
|
||||
V_DrawRightAlignedString(120, 188-8, V_MONOSPACE, "--:--.--");
|
||||
|
||||
V_DrawString(4, 188, V_YELLOWMAP|V_MONOSPACE, "BEST LAP:");
|
||||
if (hu_demolap != UINT32_MAX)
|
||||
V_DrawRightAlignedString(120, 188, V_MONOSPACE, va("%i:%02i.%02i",
|
||||
G_TicsToMinutes(hu_demolap,true),
|
||||
G_TicsToSeconds(hu_demolap),
|
||||
G_TicsToCentiseconds(hu_demolap)));
|
||||
else
|
||||
V_DrawRightAlignedString(120, 188, V_MONOSPACE, "--:--.--");
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1171,18 +1212,20 @@ void HU_Drawer(void)
|
|||
return;
|
||||
|
||||
// draw the crosshair, not when viewing demos nor with chasecam
|
||||
// SRB2kart: not for kart though :V
|
||||
/*if (!automapactive && cv_crosshair.value && !demoplayback && !camera.chase && !players[displayplayer].spectator)
|
||||
HU_DrawCrosshair();
|
||||
if (!automapactive && !demoplayback)
|
||||
{
|
||||
if (cv_crosshair.value && !camera.chase && !players[displayplayer].spectator)
|
||||
HU_DrawCrosshair();
|
||||
|
||||
if (!automapactive && cv_crosshair2.value && !demoplayback && !camera2.chase && !players[secondarydisplayplayer].spectator)
|
||||
HU_DrawCrosshair2();
|
||||
if (cv_crosshair2.value && !camera2.chase && !players[secondarydisplayplayer].spectator)
|
||||
HU_DrawCrosshair2();
|
||||
|
||||
if (!automapactive && cv_crosshair3.value && !demoplayback && !camera3.chase && !players[thirddisplayplayer].spectator)
|
||||
HU_DrawCrosshair3();
|
||||
if (cv_crosshair3.value && !camera3.chase && !players[thirddisplayplayer].spectator)
|
||||
HU_DrawCrosshair3();
|
||||
|
||||
if (!automapactive && cv_crosshair4.value && !demoplayback && !camera4.chase && !players[fourthdisplayplayer].spectator)
|
||||
HU_DrawCrosshair4();*/
|
||||
if (cv_crosshair4.value && !camera4.chase && !players[fourthdisplayplayer].spectator)
|
||||
HU_DrawCrosshair4();
|
||||
}
|
||||
|
||||
// draw desynch text
|
||||
if (hu_resynching)
|
||||
|
@ -1448,7 +1491,7 @@ void HU_DrawTeamTabRankings(playersort_t *tab, INT32 whiteplayer)
|
|||
else
|
||||
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
|
||||
}
|
||||
V_DrawRightAlignedThinString(x+120, y, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
|
||||
V_DrawRightAlignedThinString(x+120, y-1, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1525,15 +1568,15 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
|
|||
if (circuitmap)
|
||||
{
|
||||
if (players[tab[i].num].exiting)
|
||||
V_DrawRightAlignedThinString(x+156, y, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime)));
|
||||
V_DrawRightAlignedThinString(x+156, y-1, 0, va("%i:%02i.%02i", G_TicsToMinutes(players[tab[i].num].realtime,true), G_TicsToSeconds(players[tab[i].num].realtime), G_TicsToCentiseconds(players[tab[i].num].realtime)));
|
||||
else
|
||||
V_DrawRightAlignedThinString(x+156, y, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
|
||||
V_DrawRightAlignedThinString(x+156, y-1, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
|
||||
}
|
||||
else
|
||||
V_DrawRightAlignedThinString(x+156, y, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%i:%02i.%02i", G_TicsToMinutes(tab[i].count,true), G_TicsToSeconds(tab[i].count), G_TicsToCentiseconds(tab[i].count)));
|
||||
V_DrawRightAlignedThinString(x+156, y-1, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%i:%02i.%02i", G_TicsToMinutes(tab[i].count,true), G_TicsToSeconds(tab[i].count), G_TicsToCentiseconds(tab[i].count)));
|
||||
}
|
||||
else
|
||||
V_DrawRightAlignedThinString(x+120, y, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
|
||||
V_DrawRightAlignedThinString(x+120, y-1, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
|
||||
|
||||
y += 16;
|
||||
if (y > 160)
|
||||
|
|
|
@ -118,7 +118,6 @@ void HU_SetCEchoFlags(INT32 flags);
|
|||
void HU_DoCEcho(const char *msg);
|
||||
|
||||
// Demo playback info
|
||||
extern UINT32 hu_demoscore;
|
||||
extern UINT32 hu_demotime;
|
||||
extern UINT16 hu_demorings;
|
||||
extern UINT32 hu_demolap;
|
||||
#endif
|
||||
|
|
107
src/k_kart.c
107
src/k_kart.c
|
@ -20,6 +20,13 @@
|
|||
#include "k_kart.h"
|
||||
#include "f_finale.h"
|
||||
|
||||
// SOME IMPORTANT VARIABLES DEFINED IN DOOMDEF.H:
|
||||
// gamespeed is cc (0 for easy, 1 for normal, 2 for hard)
|
||||
// franticitems is Frantic Mode items, bool
|
||||
// mirrormode is Mirror Mode (duh), bool
|
||||
// comeback is Battle Mode's karma comeback, also bool
|
||||
|
||||
|
||||
//{ SRB2kart Color Code
|
||||
|
||||
#define SKIN_RAMP_LENGTH 16
|
||||
|
@ -303,9 +310,10 @@ void K_RegisterKartStuff(void)
|
|||
CV_RegisterVar(&cv_lightning);
|
||||
CV_RegisterVar(&cv_feather);
|
||||
|
||||
CV_RegisterVar(&cv_kartminimap);
|
||||
CV_RegisterVar(&cv_kartcheck);
|
||||
CV_RegisterVar(&cv_kartstarsfx);
|
||||
CV_RegisterVar(&cv_kartcc);
|
||||
CV_RegisterVar(&cv_kartspeed);
|
||||
CV_RegisterVar(&cv_kartballoons);
|
||||
CV_RegisterVar(&cv_kartfrantic);
|
||||
CV_RegisterVar(&cv_kartcomeback);
|
||||
|
@ -318,16 +326,6 @@ void K_RegisterKartStuff(void)
|
|||
|
||||
//}
|
||||
|
||||
UINT8 K_GetKartCC(void)
|
||||
{
|
||||
if (gametype == GT_MATCH)
|
||||
return 50;
|
||||
else if (modeattacking)
|
||||
return 150;
|
||||
else
|
||||
return cv_kartcc.value;
|
||||
}
|
||||
|
||||
//{ SRB2kart Roulette Code - Position Based
|
||||
|
||||
#define NUMKARTITEMS 19
|
||||
|
@ -975,7 +973,7 @@ static INT32 K_KartGetItemOdds(INT32 pos, INT32 itemnum)
|
|||
else
|
||||
newodds = K_KartItemOddsDistance_Retro[itemnum-1][pos];
|
||||
|
||||
if ((cv_kartfrantic.value) && (itemnum == 1 || itemnum == 4 || itemnum == 5 || itemnum == 6
|
||||
if (franticitems && (itemnum == 1 || itemnum == 4 || itemnum == 5 || itemnum == 6
|
||||
|| itemnum == 7 || itemnum == 8 || itemnum == 12 || itemnum == 13 || itemnum == 14 || itemnum == 15
|
||||
|| itemnum == 16 || itemnum == 17 || itemnum == 18))
|
||||
newodds *= 2;
|
||||
|
@ -1039,7 +1037,8 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator && players[i].kartstuff[k_position] < player->kartstuff[k_position])
|
||||
if (playeringame[i] && !players[i].spectator && players[i].mo
|
||||
&& players[i].kartstuff[k_position] < player->kartstuff[k_position])
|
||||
pdis += P_AproxDistance(P_AproxDistance(players[i].mo->x - player->mo->x,
|
||||
players[i].mo->y - player->mo->y),
|
||||
players[i].mo->z - player->mo->z) / FRACUNIT
|
||||
|
@ -1059,12 +1058,8 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
else
|
||||
{
|
||||
if (cv_kartfrantic.value) // Frantic items
|
||||
{
|
||||
pdis = (13*pdis/12); // make the distances between everyone artifically higher...
|
||||
//pdis += distvar; // and set everyone back another place!
|
||||
}
|
||||
|
||||
if (franticitems) // Frantic items make the distances between everyone artifically higher :P
|
||||
pdis = (15*pdis/14);
|
||||
if (pingame == 1) useodds = 0; // Record Attack, or just alone
|
||||
else if (pdis <= distvar * 0) useodds = 1; // (64*14) * 0 = 0
|
||||
else if (pdis <= distvar * 1) useodds = 2; // (64*14) * 1 = 896
|
||||
|
@ -1085,8 +1080,8 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd)
|
|||
//{
|
||||
if (cv_magnet.value) SETITEMRESULT(useodds, 1); // Magnet
|
||||
if (cv_boo.value) SETITEMRESULT(useodds, 2); // Boo
|
||||
if (cv_mushroom.value) SETITEMRESULT(useodds, 3); // Mushroom
|
||||
if (cv_mushroom.value) SETITEMRESULT(useodds, 4); // Triple Mushroom
|
||||
if (cv_mushroom.value && !modeattacking) SETITEMRESULT(useodds, 3); // Mushroom
|
||||
if (cv_triplemushroom.value) SETITEMRESULT(useodds, 4); // Triple Mushroom
|
||||
if (cv_megashroom.value && !player->kartstuff[k_poweritemtimer]) SETITEMRESULT(useodds, 5); // Mega Mushroom
|
||||
if (cv_goldshroom.value) SETITEMRESULT(useodds, 6); // Gold Mushroom
|
||||
if (cv_star.value && !player->kartstuff[k_poweritemtimer]) SETITEMRESULT(useodds, 7); // Star
|
||||
|
@ -1099,7 +1094,7 @@ static void K_KartItemRouletteByDistance(player_t *player, ticcmd_t *cmd)
|
|||
if (cv_bobomb.value) SETITEMRESULT(useodds, 14); // Bob-omb
|
||||
if (cv_blueshell.value && pexiting == 0) SETITEMRESULT(useodds, 15); // Blue Shell
|
||||
if (cv_fireflower.value) SETITEMRESULT(useodds, 16); // Fire Flower
|
||||
if (cv_tripleredshell.value && pingame > 2) SETITEMRESULT(useodds, 17); // Triple Red Shell
|
||||
if (cv_tripleredshell.value && pingame > 2) SETITEMRESULT(useodds, 17); // Triple Red Shell
|
||||
if (cv_lightning.value && pingame > pexiting) SETITEMRESULT(useodds, 18); // Lightning
|
||||
if (cv_feather.value) SETITEMRESULT(useodds, 19); // Feather
|
||||
|
||||
|
@ -1466,7 +1461,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
|
||||
if (player->kartstuff[k_spinouttimer])
|
||||
player->kartstuff[k_spinouttimer]--;
|
||||
else if (!cv_kartcomeback.value)
|
||||
else if (!comeback)
|
||||
player->kartstuff[k_comebacktimer] = comebacktime;
|
||||
else if (player->kartstuff[k_comebacktimer])
|
||||
{
|
||||
|
@ -1577,7 +1572,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
|
|||
&& player->kartstuff[k_feather] & 2)
|
||||
player->kartstuff[k_feather] &= ~2;
|
||||
|
||||
if (cmd->buttons & BT_JUMP)
|
||||
if (cmd->buttons & BT_DRIFT)
|
||||
player->kartstuff[k_jmp] = 1;
|
||||
else
|
||||
player->kartstuff[k_jmp] = 0;
|
||||
|
@ -1701,12 +1696,12 @@ static fixed_t K_GetKartBoostPower(player_t *player, boolean speed)
|
|||
{ // Mushroom
|
||||
if (speed)
|
||||
{
|
||||
switch (K_GetKartCC())
|
||||
switch (gamespeed)
|
||||
{
|
||||
case 50:
|
||||
case 0:
|
||||
boostvalue = max(boostvalue, 53740+768);
|
||||
break;
|
||||
case 150:
|
||||
case 2:
|
||||
boostvalue = max(boostvalue, 17294+768);
|
||||
break;
|
||||
default:
|
||||
|
@ -1731,12 +1726,12 @@ fixed_t K_GetKartSpeed(player_t *player, boolean doboostpower)
|
|||
UINT8 kartspeed = player->kartspeed;
|
||||
fixed_t finalspeed;
|
||||
|
||||
switch (K_GetKartCC())
|
||||
switch (gamespeed)
|
||||
{
|
||||
case 50:
|
||||
case 0:
|
||||
g_cc = 53248 + xspd; // 50cc = 81.25 + 4.69 = 85.94%
|
||||
break;
|
||||
case 150:
|
||||
case 2:
|
||||
g_cc = 77824 + xspd; // 150cc = 118.75 + 4.69 = 123.44%
|
||||
break;
|
||||
default:
|
||||
|
@ -1946,7 +1941,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source) // A bit of a hack, we ju
|
|||
if (source->player->kartstuff[k_balloon] <= 0)
|
||||
{
|
||||
source->player->kartstuff[k_comebackpoints] += 2;
|
||||
if (netgame)
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s bombed %s!\n"), player_names[source->player-players], player_names[player-players]);
|
||||
if (source->player->kartstuff[k_comebackpoints] >= 3)
|
||||
K_StealBalloon(source->player, player, true);
|
||||
|
@ -2020,7 +2015,7 @@ void K_StealBalloon(player_t *player, player_t *victim, boolean force)
|
|||
{
|
||||
if (player->kartstuff[k_balloon] <= 0)
|
||||
CONS_Printf(M_GetText("%s is back in the game!\n"), player_names[player-players]);
|
||||
else
|
||||
else if (cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s stole a balloon from %s!\n"), player_names[player-players], player_names[victim-players]);
|
||||
}
|
||||
|
||||
|
@ -2294,12 +2289,12 @@ static mobj_t *K_ThrowKartItem(player_t *player, boolean missile, mobjtype_t map
|
|||
return NULL;
|
||||
|
||||
// Figure out projectile speed by CC
|
||||
switch (K_GetKartCC())
|
||||
switch (gamespeed)
|
||||
{
|
||||
case 50:
|
||||
case 0:
|
||||
PROJSPEED = 68*FRACUNIT; // Avg Speed is 34
|
||||
break;
|
||||
case 150:
|
||||
case 2:
|
||||
PROJSPEED = 96*FRACUNIT; // Avg Speed is 48
|
||||
break;
|
||||
default:
|
||||
|
@ -2929,17 +2924,21 @@ static void K_KartUpdatePosition(player_t *player)
|
|||
thinker_t *th;
|
||||
mobj_t *mo;
|
||||
|
||||
if (player->spectator || !player->mo)
|
||||
return;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
{
|
||||
if (!playeringame[i] || players[i].spectator || !players[i].mo)
|
||||
continue;
|
||||
|
||||
if (gametype == GT_RACE)
|
||||
{
|
||||
if (playeringame[i] && !players[i].spectator &&
|
||||
(((players[i].starpostnum) + (numstarposts + 1) * players[i].laps) >
|
||||
if ((((players[i].starpostnum) + (numstarposts + 1) * players[i].laps) >
|
||||
((player->starpostnum) + (numstarposts + 1) * player->laps)))
|
||||
position++;
|
||||
else if (playeringame[i] && !players[i].spectator
|
||||
&& (((players[i].starpostnum) + (numstarposts+1)*players[i].laps) ==
|
||||
((player->starpostnum) + (numstarposts+1)*player->laps)))
|
||||
else if (((players[i].starpostnum) + (numstarposts+1)*players[i].laps) ==
|
||||
((player->starpostnum) + (numstarposts+1)*player->laps))
|
||||
{
|
||||
ppcd = pncd = ipcd = incd = 0;
|
||||
|
||||
|
@ -3149,7 +3148,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
|
|||
else if (cmd->buttons & BT_ATTACK)
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
||||
if (player && player->health > 0 && !player->spectator && !player->exiting && player->kartstuff[k_spinouttimer] == 0)
|
||||
if (player && player->mo && player->mo->health > 0 && !player->spectator && !player->exiting && player->kartstuff[k_spinouttimer] == 0)
|
||||
{
|
||||
|
||||
// Magnet
|
||||
|
@ -4682,10 +4681,7 @@ static void K_drawKartPositionFaces(void)
|
|||
|
||||
for (j = 0; j < MAXPLAYERS; j++)
|
||||
{
|
||||
if (!playeringame[j])
|
||||
continue;
|
||||
|
||||
if (players[j].spectator)
|
||||
if (!playeringame[j] || players[j].spectator || !players[j].mo)
|
||||
continue;
|
||||
|
||||
for (i = 0; i < MAXPLAYERS; i++)
|
||||
|
@ -4708,6 +4704,7 @@ static void K_drawKartPositionFaces(void)
|
|||
for (i = 0; i < ranklines; i++)
|
||||
{
|
||||
if (players[rankplayer[i]].spectator) continue; // Spectators are ignored
|
||||
if (!players[rankplayer[i]].mo) continue;
|
||||
|
||||
balloonx = FACE_X+18;
|
||||
|
||||
|
@ -4839,7 +4836,7 @@ static void K_drawKartSpeedometer(void)
|
|||
else if (cv_speedometer.value == 3)
|
||||
{
|
||||
convSpeed = FixedDiv(stplyr->speed, mapheaderinfo[gamemap-1]->mobj_scale)/FRACUNIT;
|
||||
V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d fu/s", convSpeed));
|
||||
V_DrawKartString(SPDM_X, SPDM_Y, V_HUDTRANS|splitflags, va("%3d fu/t", convSpeed));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4885,7 +4882,7 @@ fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my
|
|||
fixed_t range = RING_DIST/3;
|
||||
angle_t diff;
|
||||
|
||||
range *= (K_GetKartCC()/50);
|
||||
range *= gamespeed+1;
|
||||
|
||||
dist = abs(R_PointToDist2(px, py, mx, my));
|
||||
if (dist > range)
|
||||
|
@ -4898,7 +4895,7 @@ fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my
|
|||
else
|
||||
x = (FixedMul(FINETANGENT(((diff+ANGLE_90)>>ANGLETOFINESHIFT) & 4095), 160<<FRACBITS) + (160<<FRACBITS))>>FRACBITS;
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
x = 320-x;
|
||||
|
||||
if (splitscreen > 1)
|
||||
|
@ -5027,7 +5024,7 @@ static void K_drawKartMinimap(void)
|
|||
if (splitscreen == 2)
|
||||
splitflags = 0;
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
V_DrawSmallScaledPatch(x+(AutomapPic->width/2), y, splitflags|V_FLIP, AutomapPic);
|
||||
else
|
||||
V_DrawSmallScaledPatch(x, y, splitflags, AutomapPic);
|
||||
|
@ -5083,7 +5080,7 @@ static void K_drawKartMinimap(void)
|
|||
amxpos = amnumxpos + ((x + AutomapPic->width/4 - (iconprefix[players[i].skin]->width/4))<<FRACBITS);
|
||||
amypos = amnumypos + ((y + AutomapPic->height/4 - (iconprefix[players[i].skin]->height/4))<<FRACBITS);
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
{
|
||||
amxpos = -amnumxpos + ((x + AutomapPic->width/4 + (iconprefix[players[i].skin]->width/4))<<FRACBITS);
|
||||
if (!players[i].skincolor) // 'default' color
|
||||
|
@ -5149,7 +5146,7 @@ static void K_drawBattleFullscreen(void)
|
|||
else if (splitscreen < 2)
|
||||
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, 0, kp_battlelose, NULL);
|
||||
}
|
||||
else if (stplyr->kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && cv_kartcomeback.value)
|
||||
else if (stplyr->kartstuff[k_balloon] <= 0 && stplyr->kartstuff[k_comebacktimer] && comeback)
|
||||
{
|
||||
INT32 t = stplyr->kartstuff[k_comebacktimer]/TICRATE;
|
||||
INT32 txoff = 0;
|
||||
|
@ -5222,7 +5219,7 @@ static void K_drawStartLakitu(void)
|
|||
else
|
||||
adjustY = 200;
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
V_DrawSmallScaledPatch(320-LAKI_X, LAKI_Y + adjustY, V_SNAPTOTOP|V_FLIP, localpatch);
|
||||
else
|
||||
V_DrawSmallScaledPatch(LAKI_X, LAKI_Y + adjustY, V_SNAPTOTOP, localpatch);
|
||||
|
@ -5295,7 +5292,7 @@ static void K_drawLapLakitu(void)
|
|||
adjustY = 200;
|
||||
}
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
V_DrawSmallScaledPatch(320-(LAKI_X+14+(swoopTimer/4)), LAKI_Y + adjustY, V_SNAPTOTOP|V_FLIP, localpatch);
|
||||
else
|
||||
V_DrawSmallScaledPatch(LAKI_X+14+(swoopTimer/4), LAKI_Y + adjustY, V_SNAPTOTOP, localpatch);
|
||||
|
@ -5312,7 +5309,7 @@ void K_drawKartHUD(void)
|
|||
&& (stplyr->exiting
|
||||
|| (stplyr->kartstuff[k_balloon] <= 0
|
||||
&& stplyr->kartstuff[k_comebacktimer]
|
||||
&& cv_kartcomeback.value
|
||||
&& comeback
|
||||
&& stplyr->playerstate == PST_LIVE)))
|
||||
{
|
||||
K_drawBattleFullscreen();
|
||||
|
@ -5335,7 +5332,7 @@ void K_drawKartHUD(void)
|
|||
K_drawKartPlayerCheck();
|
||||
}
|
||||
|
||||
if (splitscreen == 0 || splitscreen == 2)
|
||||
if ((splitscreen == 0 || splitscreen == 2) && cv_kartminimap.value)
|
||||
K_drawKartMinimap();
|
||||
|
||||
// If the item window is closing, draw it closing!
|
||||
|
|
|
@ -17,7 +17,6 @@ UINT8 K_GetKartColorByName(const char *name);
|
|||
|
||||
void K_RegisterKartStuff(void);
|
||||
|
||||
UINT8 K_GetKartCC(void);
|
||||
void K_KartBouncing(mobj_t *mobj1, mobj_t *mobj2, boolean bounce, boolean solid);
|
||||
void K_LakituChecker(player_t *player);
|
||||
void K_KartMoveAnimation(player_t *player);
|
||||
|
|
|
@ -1993,13 +1993,6 @@ static int lib_kGetKartColorByName(lua_State *L)
|
|||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kGetKartCC(lua_State *L)
|
||||
{
|
||||
//HUDSAFE
|
||||
lua_pushinteger(L, K_GetKartCC());
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int lib_kKartBouncing(lua_State *L)
|
||||
{
|
||||
mobj_t *mobj1 = *((mobj_t **)luaL_checkudata(L, 1, META_MOBJ));
|
||||
|
@ -2336,7 +2329,6 @@ static luaL_Reg lib[] = {
|
|||
|
||||
// k_kart
|
||||
{"K_GetKartColorByName",lib_kGetKartColorByName},
|
||||
{"K_GetKartCC",lib_kGetKartCC},
|
||||
{"K_KartBouncing",lib_kKartBouncing},
|
||||
{"K_SpinPlayer",lib_kSpinPlayer},
|
||||
{"K_SquishPlayer",lib_kSquishPlayer},
|
||||
|
|
|
@ -58,7 +58,7 @@ typedef struct
|
|||
// ==========================================================================
|
||||
|
||||
// Cheat responders
|
||||
static UINT8 cheatf_ultimate(void)
|
||||
/*static UINT8 cheatf_ultimate(void)
|
||||
{
|
||||
if (menuactive && (currentMenu != &MainDef && currentMenu != &SP_LoadDef))
|
||||
return 0; // Only on the main menu, or the save select!
|
||||
|
@ -70,7 +70,7 @@ static UINT8 cheatf_ultimate(void)
|
|||
if (currentMenu == &SP_LoadDef)
|
||||
M_ForceSaveSlotSelected(NOSAVESLOT);
|
||||
return 1;
|
||||
}
|
||||
}*/
|
||||
|
||||
static UINT8 cheatf_warp(void)
|
||||
{
|
||||
|
@ -84,9 +84,9 @@ static UINT8 cheatf_warp(void)
|
|||
|
||||
// Temporarily unlock stuff.
|
||||
G_SetGameModified(false);
|
||||
unlockables[2].unlocked = true; // credits
|
||||
unlockables[3].unlocked = true; // sound test
|
||||
unlockables[16].unlocked = true; // level select
|
||||
unlockables[1].unlocked = true; // credits
|
||||
unlockables[2].unlocked = true; // sound test
|
||||
//unlockables[16].unlocked = true; // level select
|
||||
|
||||
// Refresh secrets menu existing.
|
||||
M_ClearMenus(true);
|
||||
|
@ -121,17 +121,17 @@ static UINT8 cheatf_devmode(void)
|
|||
}
|
||||
#endif
|
||||
|
||||
static cheatseq_t cheat_ultimate = {
|
||||
/*static cheatseq_t cheat_ultimate = {
|
||||
0, cheatf_ultimate,
|
||||
{ SCRAMBLE('u'), SCRAMBLE('l'), SCRAMBLE('t'), SCRAMBLE('i'), SCRAMBLE('m'), SCRAMBLE('a'), SCRAMBLE('t'), SCRAMBLE('e'), 0xff }
|
||||
};
|
||||
};*/
|
||||
|
||||
static cheatseq_t cheat_ultimate_joy = {
|
||||
/*static cheatseq_t cheat_ultimate_joy = {
|
||||
0, cheatf_ultimate,
|
||||
{ SCRAMBLE(KEY_UPARROW), SCRAMBLE(KEY_UPARROW), SCRAMBLE(KEY_DOWNARROW), SCRAMBLE(KEY_DOWNARROW),
|
||||
SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_RIGHTARROW), SCRAMBLE(KEY_LEFTARROW), SCRAMBLE(KEY_RIGHTARROW),
|
||||
SCRAMBLE(KEY_ENTER), 0xff }
|
||||
};
|
||||
};*/
|
||||
|
||||
static cheatseq_t cheat_warp = {
|
||||
0, cheatf_warp,
|
||||
|
@ -235,8 +235,8 @@ boolean cht_Responder(event_t *ev)
|
|||
else
|
||||
ch = (UINT8)ev->data1;
|
||||
|
||||
ret += cht_CheckCheat(&cheat_ultimate, (char)ch);
|
||||
ret += cht_CheckCheat(&cheat_ultimate_joy, (char)ch);
|
||||
//ret += cht_CheckCheat(&cheat_ultimate, (char)ch);
|
||||
//ret += cht_CheckCheat(&cheat_ultimate_joy, (char)ch);
|
||||
ret += cht_CheckCheat(&cheat_warp, (char)ch);
|
||||
ret += cht_CheckCheat(&cheat_warp_joy, (char)ch);
|
||||
#ifdef DEVELOP
|
||||
|
@ -1010,7 +1010,7 @@ void OP_NightsObjectplace(player_t *player)
|
|||
}
|
||||
|
||||
// This places a bumper!
|
||||
if (cmd->buttons & BT_SPECTATE)
|
||||
/*if (cmd->buttons & BT_SPECTATE)
|
||||
{
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
if (!OP_HeightOkay(player, false))
|
||||
|
@ -1018,7 +1018,7 @@ void OP_NightsObjectplace(player_t *player)
|
|||
|
||||
mt = OP_CreateNewMapThing(player, (UINT16)mobjinfo[MT_NIGHTSBUMPER].doomednum, false);
|
||||
P_SpawnMapThing(mt);
|
||||
}
|
||||
}*/
|
||||
|
||||
// This places a ring!
|
||||
if (cmd->buttons & BT_BACKWARD)
|
||||
|
@ -1167,7 +1167,7 @@ void OP_ObjectplaceMovement(player_t *player)
|
|||
if (player->pflags & PF_ATTACKDOWN)
|
||||
{
|
||||
// Are ANY objectplace buttons pressed? If no, remove flag.
|
||||
if (!(cmd->buttons & (BT_ATTACK|BT_JUMP)))
|
||||
if (!(cmd->buttons & (BT_ATTACK|BT_DRIFT)))
|
||||
player->pflags &= ~PF_ATTACKDOWN;
|
||||
|
||||
// Do nothing.
|
||||
|
@ -1179,7 +1179,7 @@ void OP_ObjectplaceMovement(player_t *player)
|
|||
OP_CycleThings(-1);
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
}
|
||||
else*/ if (cmd->buttons & BT_JUMP)
|
||||
else*/ if (cmd->buttons & BT_DRIFT)
|
||||
{
|
||||
OP_CycleThings(1);
|
||||
player->pflags |= PF_ATTACKDOWN;
|
||||
|
|
746
src/m_cond.c
746
src/m_cond.c
|
@ -32,648 +32,114 @@ conditionset_t conditionSets[MAXCONDITIONSETS];
|
|||
// Default Emblem locations
|
||||
emblem_t emblemlocations[MAXEMBLEMS] =
|
||||
{
|
||||
// GREEN FLOWER 1
|
||||
// ---
|
||||
{0, 8156, 6936, 129, 1, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Go get your feet wet\n"
|
||||
"to find this, the first emblem.\n"
|
||||
"Yes, it's very deep.", 0},
|
||||
{0, 3184, 1812, 928, 1, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"There are many rings,\n"
|
||||
"but this one's not what you think.\n"
|
||||
"There lies the emblem.", 0},
|
||||
{0, 9024, 6716, 769, 1, 'C', SKINCOLOR_RED, 0,
|
||||
"Right next to a lake,\n"
|
||||
"a ledge has been constructed.\n"
|
||||
"Near there is the goal.", 0},
|
||||
{0, 2080, -384, 512, 1, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Streams come to an end\n"
|
||||
"where they can no longer fall.\n"
|
||||
"But if you went up...", 0},
|
||||
{0, -336, 2064, 195, 1, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"This one's in plain sight.\n"
|
||||
"Why haven't you claimed it?\n"
|
||||
"Surely you saw it.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 1, 'S', SKINCOLOR_BROWN, 125000, "", 0},
|
||||
{ET_TIME, 0,0,0, 1, 'T', SKINCOLOR_GREY, 20*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 1, 'R', SKINCOLOR_GOLD, 200, "", 0},
|
||||
|
||||
|
||||
// GREEN FLOWER 2
|
||||
// ---
|
||||
{0, 2624, -6816, 1332, 2, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Near the giant lake\n"
|
||||
"lies a cave with a 1-Up.\n"
|
||||
"An emblem's there, too!", 0},
|
||||
{0, -5728, -2848, 2848, 2, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Near the final lake,\n"
|
||||
"a higher lake falls on in.\n"
|
||||
"Three platforms await.", 0},
|
||||
{0, 3648, 6464, 2576, 2, 'C', SKINCOLOR_RED, 0,
|
||||
"Near the level's start,\n"
|
||||
"a bridge crosses a river.\n"
|
||||
"What's that river's source?", 0},
|
||||
{0, -2032,-10048, 986, 2, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Near the level's end,\n"
|
||||
"another bridge spans a lake.\n"
|
||||
"What could be under...?", 0},
|
||||
{0, -170, 491, 3821, 2, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"An ivied tunnel\n"
|
||||
"has a corner that's sunlit.\n"
|
||||
"Go reach for the sky!", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 2, 'S', SKINCOLOR_BROWN, 150000, "", 0},
|
||||
{ET_TIME, 0,0,0, 2, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 2, 'R', SKINCOLOR_GOLD, 200, "", 0},
|
||||
|
||||
|
||||
// GREEN FLOWER 3
|
||||
// ---
|
||||
{ET_TIME, 0,0,0, 3, 'T', SKINCOLOR_GREY, 30*TICRATE, "", 0},
|
||||
|
||||
|
||||
// TECHNO HILL 1
|
||||
// ---
|
||||
{0, -5664, -5072, 2396, 4, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Three pipes reside near\n"
|
||||
"where our heroes' paths split off.\n"
|
||||
"You'll have to look up!", 0},
|
||||
{0, -784,-13968, 2888, 4, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Climbing yields great range.\n"
|
||||
"Yet, on a path for climbers,\n"
|
||||
"flying is the key.", 0},
|
||||
{0, 4160, -5824, 3776, 4, 'C', SKINCOLOR_RED, 0,
|
||||
"That's sure lots of slime.\n"
|
||||
"Say, do you ever wonder\n"
|
||||
"what's dumping it all?", 0},
|
||||
{0, 6400, -8352, 1764, 4, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Spinning through small gaps\n"
|
||||
"can slip you into a cave.\n"
|
||||
"In that cave's first stretch...", 0},
|
||||
{0, 2848, -9088, 488, 4, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"The slime lake is deep,\n"
|
||||
"but reaching the floor takes height.\n"
|
||||
"Scream \"Geronimo!\"...", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 4, 'S', SKINCOLOR_BROWN, 75000, "", 0},
|
||||
{ET_TIME, 0,0,0, 4, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 4, 'R', SKINCOLOR_GOLD, 300, "", 0},
|
||||
|
||||
|
||||
// TECHNO HILL 2
|
||||
// ---
|
||||
{0,-19138, -2692, 688, 5, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Near the first checkpoint,\n"
|
||||
"a bridge crosses a slime pool.\n"
|
||||
"(Sensing a pattern?)", 0},
|
||||
{0,-13120, 8062, 1248, 5, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Behind the windows,\n"
|
||||
"near crushers, ever smashing\n"
|
||||
"a conveyor belt.", 0},
|
||||
{0, 580, 4552, 1344, 5, 'C', SKINCOLOR_RED, 0,
|
||||
"A pipe drops onto\n"
|
||||
"a half-outdoors conveyor.\n"
|
||||
"But is it empty?", 0},
|
||||
{0, 192, -8768, 24, 5, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"There is a hallway\n"
|
||||
"that a button floods with slime.\n"
|
||||
"Go through it again!", 0},
|
||||
{0, -2468,-12128, 1312, 5, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"Jumping on turtles\n"
|
||||
"will send you springing skyward.\n"
|
||||
"Now, do that six times...", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 5, 'S', SKINCOLOR_BROWN, 100000, "", 0},
|
||||
{ET_TIME, 0,0,0, 5, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 5, 'R', SKINCOLOR_GOLD, 600, "", 0},
|
||||
|
||||
|
||||
// TECHNO HILL 3
|
||||
// ---
|
||||
{ET_TIME, 0,0,0, 6, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0},
|
||||
|
||||
|
||||
// DEEP SEA 1
|
||||
// ---
|
||||
{0,-16224, -2880, 3530, 7, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Climb up two maze walls.\n"
|
||||
"Break the roof, then a corner.\n"
|
||||
"There, glide, but stay dry.", 0},
|
||||
{0, -8224, 896, 1056, 7, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Follow the left path.\n"
|
||||
"A square green button lurks deep.\n"
|
||||
"Weight it down, somehow.", 0},
|
||||
{0, 4992, -5072, 4136, 7, 'C', SKINCOLOR_RED, 0,
|
||||
"A certain path holds\n"
|
||||
"many gargoyle puzzles.\n"
|
||||
"Victors reach a \"V\".", 0},
|
||||
{0, 4576, 5168, 2660, 7, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"A caved-in hallway?\n"
|
||||
"The floor falls; the path goes down.\n"
|
||||
"But those rocks looked weak...", 0},
|
||||
{0, 12576, 16096, -992, 7, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"The end is quite dry.\n"
|
||||
"Some rocks dam the water in.\n"
|
||||
"Knuckles can fix that...", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 7, 'S', SKINCOLOR_BROWN, 75000, "", 0},
|
||||
{ET_TIME, 0,0,0, 7, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 7, 'R', SKINCOLOR_GOLD, 400, "", 0},
|
||||
|
||||
|
||||
// DEEP SEA 2
|
||||
// ---
|
||||
{0,-15040, 6976, 2016, 8, 'A', SKINCOLOR_BLUE, 0,
|
||||
"A waterfall lands\n"
|
||||
"near a starpost in a cave.\n"
|
||||
"It's dark up there, but...", 0},
|
||||
{0, 4288, 2912, 544, 8, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"So many blocks here!\n"
|
||||
"Take five; bathe in the fountain.\n"
|
||||
"Hmmm? A hidden path...?", 0},
|
||||
{0, -5696, 16992, 791, 8, 'C', SKINCOLOR_RED, 0,
|
||||
"An ornate dragon\n"
|
||||
"faces a secret passage.\n"
|
||||
"Knuckles! Don't get crushed!", 0},
|
||||
{0,-13344, 18688, 1034, 8, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"In the current maze\n"
|
||||
"hides a dark room of columns.\n"
|
||||
"Find it, then look up.", 0},
|
||||
{0, 3104, 16192, 2408, 8, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"That same dragon's eye\n"
|
||||
"hides another secret room.\n"
|
||||
"There, solve its riddle.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 8, 'S', SKINCOLOR_BROWN, 50000, "", 0},
|
||||
{ET_TIME, 0,0,0, 8, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 8, 'R', SKINCOLOR_GOLD, 250, "", 0},
|
||||
|
||||
|
||||
// DEEP SEA 3
|
||||
// ---
|
||||
{ET_TIME, 0,0,0, 9, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
|
||||
|
||||
|
||||
// CASTLE EGGMAN 1
|
||||
// ---
|
||||
{0, -6176, -5184, -128, 10, 'A', SKINCOLOR_BLUE, 0,
|
||||
"A drain feeds the lake.\n"
|
||||
"Water rushes quickly through.\n"
|
||||
"Go against the flow.", 0},
|
||||
{0, 3648,-15296, -992, 10, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"The left starting path\n"
|
||||
"goes atop a large wood deck.\n"
|
||||
"Checked underneath yet?", 0},
|
||||
{0, 11712, 21312, 5472, 10, 'C', SKINCOLOR_RED, 0,
|
||||
"At last, the castle!\n"
|
||||
"Hold up! Don't just barge right in!\n"
|
||||
"What's the facade hold...?", 0},
|
||||
{0, 20224, 13344, 3104, 10, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"The final approach!\n"
|
||||
"A tower holds the emblem\n"
|
||||
"near a ring arrow.", 0},
|
||||
{0, 9472, -5890, 710, 10, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"The right starting path\n"
|
||||
"hides this near a canopy,\n"
|
||||
"high, where two trees meet.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 10, 'S', SKINCOLOR_BROWN, 50000, "", 0},
|
||||
{ET_TIME, 0,0,0, 10, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 10, 'R', SKINCOLOR_GOLD, 200, "", 0},
|
||||
|
||||
|
||||
// CASTLE EGGMAN 2
|
||||
// ---
|
||||
{0, 832,-15168, 7808, 11, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Find a trick bookcase\n"
|
||||
"that hides a darkened hallway.\n"
|
||||
"There, climb a tower.", 0},
|
||||
{0,-18460,-22180, 2416, 11, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Down in the dungeon,\n"
|
||||
"a cracked wall hides secret paths.\n"
|
||||
"Echidnas only!", 0},
|
||||
{0, -6144,-11792, 3232, 11, 'C', SKINCOLOR_RED, 0,
|
||||
"A room you can flood!\n"
|
||||
"A brown grate's near its exit.\n"
|
||||
"Knuckles can break it...", 0},
|
||||
{0, 4608, -7024, 4256, 11, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Some of these bookshelves\n"
|
||||
"are not flush against the walls.\n"
|
||||
"Wonder why that is?", 0},
|
||||
{0, 12708,-13536, 4768, 11, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"The ending's towers\n"
|
||||
"are hiding a small alcove.\n"
|
||||
"Check around outside.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 11, 'S', SKINCOLOR_BROWN, 400000, "", 0},
|
||||
{ET_TIME, 0,0,0, 11, 'T', SKINCOLOR_GREY, 210*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 11, 'R', SKINCOLOR_GOLD, 600, "", 0},
|
||||
|
||||
|
||||
// CASTLE EGGMAN 3
|
||||
// ---
|
||||
{ET_TIME, 0,0,0, 12, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
|
||||
|
||||
// ARID CANYON 1
|
||||
// ---
|
||||
{0, 3488, 2208, 3072, 13, 'A', SKINCOLOR_BLUE, 0,
|
||||
"A rather large gap\n"
|
||||
"must be crossed by way of tram.\n"
|
||||
"At its end, jump left.", 0},
|
||||
{0, -7552, 10464, 4094, 13, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Crushers that go up!\n"
|
||||
"Mind your step; if they're triggered,\n"
|
||||
"they'll block this emblem.", 0},
|
||||
{0,-12093, 14575, 5752, 13, 'C', SKINCOLOR_RED, 0,
|
||||
"There's an oil lake\n"
|
||||
"that you can sink deep into.\n"
|
||||
"Drain it, and explore.", 0},
|
||||
{0, 512, -7136, 4640, 13, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Not far from the start,\n"
|
||||
"if you climb toward the sky,\n"
|
||||
"the cliffs hide something.", 0},
|
||||
{0, 12504, 6848, 3424, 13, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"Right by the exit,\n"
|
||||
"an emblem lies on a cliff.\n"
|
||||
"Ride ropes to reach it.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 13, 'S', SKINCOLOR_BROWN, 50000, "", 0},
|
||||
{ET_TIME, 0,0,0, 13, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 13, 'R', SKINCOLOR_GOLD, 300, "", 0},
|
||||
|
||||
|
||||
// RED VOLCANO 1
|
||||
// ---
|
||||
{0,-13184, 11424, 3080, 16, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Look around the room,\n"
|
||||
"just before you clear the stage;\n"
|
||||
"something's hidden there!", 0},
|
||||
{0, -2816, 3120, 3044, 16, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Ever look upwards\n"
|
||||
"when you're traversing across\n"
|
||||
"collapsing platforms?", 0},
|
||||
{0, 6720, 6784, 1452, 16, 'C', SKINCOLOR_RED, 0,
|
||||
"Check out a corner\n"
|
||||
"of a lake of magma near\n"
|
||||
"spinning jets of flame.", 0},
|
||||
{0, -5504, 9824, 800, 16, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Where once a bridge stood,\n"
|
||||
"now magma falls from above.\n"
|
||||
"The bridge dropped something...", 0},
|
||||
{0, 8287,-11043, 1328, 16, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"A lake of magma\n"
|
||||
"ebbs and flows unendingly.\n"
|
||||
"Wait for its nadir.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 16, 'S', SKINCOLOR_BROWN, 30000, "", 0},
|
||||
{ET_TIME, 0,0,0, 16, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 16, 'R', SKINCOLOR_GOLD, 100, "", 0},
|
||||
|
||||
|
||||
// EGG ROCK 1
|
||||
// ---
|
||||
{0,-10976, -7328, 1584, 22, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Vanishing platforms,\n"
|
||||
"then collapsing ones herald\n"
|
||||
"a last-second jump.", 0},
|
||||
{0, -6592,-11200, 2208, 22, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"What is this red stuff?\n"
|
||||
"You can't breathe it in, but look!\n"
|
||||
"It can't reach up there...", 0},
|
||||
{0, 6816, 832, 936, 22, 'C', SKINCOLOR_RED, 0,
|
||||
"The team's paths diverge.\n"
|
||||
"Should Tails run the crusher path?\n"
|
||||
"No! Fly outside it!", 0},
|
||||
{0, 6942, -8902, 2080, 22, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Don't jump too high here!\n"
|
||||
"No conveyor will catch you;\n"
|
||||
"you'd fall to your death.", 0},
|
||||
{0, -6432, -6192, 584, 22, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"Conveyors! Magma!\n"
|
||||
"What an intense room this is!\n"
|
||||
"But, what brought you here?", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 22, 'S', SKINCOLOR_BROWN, 25000, "", 0},
|
||||
{ET_TIME, 0,0,0, 22, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 22, 'R', SKINCOLOR_GOLD, 150, "", 0},
|
||||
|
||||
|
||||
// EGG ROCK 2
|
||||
// ---
|
||||
{0, -6672, 7792, 352, 23, 'A', SKINCOLOR_BLUE, 0,
|
||||
"Walk on the ceiling;\n"
|
||||
"resist the urge to flip back!\n"
|
||||
"Find the cyan path...", 0},
|
||||
{0,-12256, 15136, -288, 23, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"X marks the spot? Nope!\n"
|
||||
"Try standing further away\n"
|
||||
"when the timer flips.", 0},
|
||||
{0, 1536, 16224, 1144, 23, 'C', SKINCOLOR_RED, 0,
|
||||
"There is more than one\n"
|
||||
"elevator inside the\n"
|
||||
"elevator shaft...", 0},
|
||||
{0,-15968, 14192, 3152, 23, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Gears with missing teeth\n"
|
||||
"can hide a clever secret!\n"
|
||||
"Think Green Hill Zone boss.", 0},
|
||||
{0, 1920, 20608, 1064, 23, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"Just before you reach\n"
|
||||
"the defective cargo bay,\n"
|
||||
"fly under a bridge.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 23, 'S', SKINCOLOR_BROWN, 60000, "", 0},
|
||||
{ET_TIME, 0,0,0, 23, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 23, 'R', SKINCOLOR_GOLD, 250, "", 0},
|
||||
|
||||
|
||||
// EGG ROCK 3
|
||||
// ---
|
||||
/* Just in case, I'll leave these here in the source.
|
||||
{0, 848, -3584, 592, 24, 'A', SKINCOLOR_BLUE, 0,
|
||||
"[PH] Hiding at the end of the first hallway.", 0},
|
||||
{0,-10368, -2816, 144, 24, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Directions are meaningless.", 0},
|
||||
{0, -8160, -5952, 560, 24, 'C', SKINCOLOR_RED, 0,
|
||||
"[PH] In the ceiling of the conveyor belt + laser hallway.", 0},
|
||||
{0,-13728,-13728, 1552, 24, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"[PH] On top of the platform with rows of spikes in reverse gravity.", 0},
|
||||
{0,-14944, 768, 1232, 24, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"Follow the leader.", 0},
|
||||
*/
|
||||
|
||||
{ET_SCORE, 0,0,0, 24, 'S', SKINCOLOR_BROWN, 14000, "", 0},
|
||||
{ET_TIME, 0,0,0, 24, 'T', SKINCOLOR_GREY, 210*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 24, 'R', SKINCOLOR_GOLD, 100, "", 0},
|
||||
|
||||
|
||||
// EGG ROCK CORE
|
||||
// ---
|
||||
{ET_TIME, 0,0,0, 25, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0},
|
||||
|
||||
|
||||
// PIPE TOWERS
|
||||
// ---
|
||||
{0, 3182, 5040, 3008, 30, 'A', SKINCOLOR_BLUE, 0,
|
||||
"A pipe in the roof\n"
|
||||
"eternally drops water.\n"
|
||||
"Something's stuck up there.", 0},
|
||||
{0, -2400, 5984, 2752, 30, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Pushing a red switch\n"
|
||||
"raises the water level;\n"
|
||||
"from there, can't miss it.", 0},
|
||||
{0, 6112, 7008, 4032, 30, 'C', SKINCOLOR_RED, 0,
|
||||
"A high-up passage\n"
|
||||
"hides near the second checkpoint.\n"
|
||||
"Climb in; then, climb more.", 0},
|
||||
{0, 11424, -4832, 1376, 30, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"The underground room\n"
|
||||
"with platforms that fall and rise\n"
|
||||
"only LOOKS empty...", 0},
|
||||
{0 , 4960, -6112, 1312, 30, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"This one's straightforward.\n"
|
||||
"What comes to mind when I say:\n"
|
||||
"\"WELCOME TO WARP ZONE!\"?", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 30, 'S', SKINCOLOR_BROWN, 75000, "", 0},
|
||||
{ET_TIME, 0,0,0, 30, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 30, 'R', SKINCOLOR_GOLD, 300, "", 0},
|
||||
|
||||
|
||||
// AERIAL GARDEN
|
||||
// ---
|
||||
{0, 10176,-14304, 1796, 40, 'A', SKINCOLOR_BLUE, 0,
|
||||
"A central tower,\n"
|
||||
"one with many waterfalls,\n"
|
||||
"hides a secret room.", 0},
|
||||
{0, 480, 17696, 6496, 40, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"Hidden off the path\n"
|
||||
"lies a skyscraping tower.\n"
|
||||
"A lake's at the top.", 0},
|
||||
{0, -8896, 13248, 3362, 40, 'C', SKINCOLOR_RED, 0,
|
||||
"Find all four buttons\n"
|
||||
"that sink when you stand on them.\n"
|
||||
"They'll open a door...", 0},
|
||||
{0, -8896, -9952, 2480, 40, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"Much like the last one,\n"
|
||||
"you need to find some switches.\n"
|
||||
"Only two, this time.", 0},
|
||||
{0, 13184, 18880, 6672, 40, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"The inner sanctum!\n"
|
||||
"Teleport to its switches;\n"
|
||||
"then, check near the goal.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 40, 'S', SKINCOLOR_BROWN, 300000, "", 0},
|
||||
{ET_TIME, 0,0,0, 40, 'T', SKINCOLOR_GREY, 240*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 40, 'R', SKINCOLOR_GOLD, 1200, "", 0},
|
||||
|
||||
|
||||
// AZURE TEMPLE
|
||||
// ---
|
||||
{0, -2400, 7552, 1120, 41, 'A', SKINCOLOR_BLUE, 0,
|
||||
"For those who can swim,\n"
|
||||
"a long tunnel hides rewards.\n"
|
||||
"Do mind the Buzzes!", 0},
|
||||
{0, -64, 14016, 2072, 41, 'B', SKINCOLOR_LAVENDER, 0,
|
||||
"So many skylights!\n"
|
||||
"A markedly large one hides\n"
|
||||
"behind a starpost...", 0},
|
||||
{0, 2976, 13920, -32, 41, 'C', SKINCOLOR_RED, 0,
|
||||
"When you reach gauntlets\n"
|
||||
"of diagonal fire,\n"
|
||||
"check out the corners.", 0},
|
||||
{0, 2176, 22592, 1376, 41, 'D', SKINCOLOR_ORANGE, 0,
|
||||
"A room of currents;\n"
|
||||
"most of them are marked by spikes.\n"
|
||||
"This one? A corner.", 0},
|
||||
{0, -4128, 21344, 1120, 41, 'E', SKINCOLOR_NEONGREEN, 0,
|
||||
"The only way to hit\n"
|
||||
"all those gems at once is with\n"
|
||||
"a radial blast.", 0},
|
||||
|
||||
{ET_SCORE, 0,0,0, 41, 'S', SKINCOLOR_BROWN, 425000, "", 0},
|
||||
{ET_TIME, 0,0,0, 41, 'T', SKINCOLOR_GREY, 240*TICRATE, "", 0},
|
||||
{ET_RINGS, 0,0,0, 41, 'R', SKINCOLOR_GOLD, 300, "", 0},
|
||||
|
||||
|
||||
// FLORAL FIELD
|
||||
// ---
|
||||
{0, 5394, -996, 160, 50, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 50, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 40*TICRATE, "", 0},
|
||||
|
||||
|
||||
// TOXIC PLATEAU
|
||||
// ---
|
||||
{0, 780, -1664, 32, 51, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 51, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 51, 'T', SKINCOLOR_GREY, 50*TICRATE, "", 0},
|
||||
|
||||
|
||||
// FLOODED COVE
|
||||
// ---
|
||||
{0, 1824, -1888, 2448, 52, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 52, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 52, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
|
||||
|
||||
|
||||
// CAVERN FORTRESS
|
||||
// ---
|
||||
{0, -3089, -431, 1328, 53, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 53, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 53, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0},
|
||||
|
||||
|
||||
// DUSTY WASTELAND
|
||||
// ---
|
||||
{0, 957, 924, 2956, 54, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 54, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 54, 'T', SKINCOLOR_GREY, 65*TICRATE, "", 0},
|
||||
|
||||
|
||||
// MAGMA CAVES
|
||||
// ---
|
||||
{0, -2752, 3104, 1800, 55, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 55, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 55, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0},
|
||||
|
||||
|
||||
// EGG SATELLITE
|
||||
// ---
|
||||
{0, 5334, -609, 3426, 56, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 56, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 56, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0},
|
||||
|
||||
|
||||
// BLACK HOLE
|
||||
// ---
|
||||
{0, 2108, 3776, 32, 57, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 57, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 57, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
|
||||
|
||||
|
||||
// SPRING HILL
|
||||
// ---
|
||||
{0, -1840, -1024, 1644, 58, 'N', SKINCOLOR_ROSEWOOD, 0, "", 0},
|
||||
{ET_NGRADE, 0,0,0, 58, 'Q', SKINCOLOR_TEAL, GRADE_A, "", 0},
|
||||
{ET_NTIME, 0,0,0, 58, 'T', SKINCOLOR_GREY, 60*TICRATE, "", 0},
|
||||
// -- MAP01: GREEN HILLS --
|
||||
// Time: 1:30.00
|
||||
{ET_TIME, 0,0,0, 1, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0},
|
||||
// -- MAP02: NORTHERN DISTRICT --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 2, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP03: SUNBEAM PARADISE --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 3, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP04: PIPE SPEEDWAY --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 4, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP05: DARKVILE GARDEN --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 5, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP06: MEGABLOCK CASTLE --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 6, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP07: MIDNIGHT MEADOW --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 7, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP11: HILL TOP --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 11, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP13: SAPPHIRE COAST --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 13, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP15: BLUE MOUNTAIN --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 15, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP19: CASINO RESORT --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 19, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP21: SILVERCLOUD ISLAND --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 21, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP25: CANYON RUSH --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 25, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP26: CLOUD CRADLE K --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 26, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP27: TOXIC PALACE --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 27, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP30: ANCIENT TOMB --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 30, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP31: SUB-ZERO PEAK --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 31, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP32: VIRTUAL HIGHWAY --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 32, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP33: EGGMAN'S NIGHTCLUB --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 37, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP61: GBA RAINBOW ROAD --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 61, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP70: SONIC SPEEDWAY --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 70, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP72: AURORA ATOLL --
|
||||
// Time: x:xx.xx
|
||||
{ET_TIME, 0,0,0, 72, 'T', SKINCOLOR_GREY, 300*TICRATE, "", 0},
|
||||
// -- MAP79: BARREN BADLANDS --
|
||||
// Time: 2:30.00
|
||||
{ET_TIME, 0,0,0, 79, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0},
|
||||
};
|
||||
|
||||
// Default Extra Emblems
|
||||
extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
|
||||
{
|
||||
{"Game Complete", "Complete 1P Mode", 10, 'X', SKINCOLOR_BLUE, 0},
|
||||
{"All Emeralds", "Complete 1P Mode with all Emeralds", 11, 'V', SKINCOLOR_GREY, 0},
|
||||
{"Perfect Bonus", "Perfect Bonus on a non-secret stage", 30, 'P', SKINCOLOR_GOLD, 0},
|
||||
{"SRB1 Remake", "Complete SRB1 Remake", 21, 'O', SKINCOLOR_ROSEWOOD, 0},
|
||||
{"NiGHTS Mastery", "Show your mastery of NiGHTS!", 22, 'W', SKINCOLOR_TEAL, 0},
|
||||
{"Experienced Driver", "Play 50 Matches", 10, 'X', SKINCOLOR_BLUE, 0},
|
||||
};
|
||||
|
||||
// Default Unlockables
|
||||
unlockable_t unlockables[MAXUNLOCKABLES] =
|
||||
{
|
||||
// Name, Objective, Menu Height, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
|
||||
/* 01 */ {"Record Attack", "Complete Greenflower Zone, Act 1", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
|
||||
/* 02 */ {"NiGHTS Mode", "Complete Floral Field", 0, -1, SECRET_NIGHTSMODE, 0, true, true, 0},
|
||||
/* 01 */ {"SNES Cup", "Collect 5 Emblems", 0, 1, SECRET_NONE, 0, false, false, 0},
|
||||
/* 02 */ {"Chaotic Kart Cup", "Collect 15 Emblems", 0, 2, SECRET_NONE, 0, false, false, 0},
|
||||
|
||||
/* 03 */ {"Play Credits", "Complete 1P Mode", 30, 10, SECRET_CREDITS, 0, true, true, 0},
|
||||
/* 04 */ {"Sound Test", "Complete 1P Mode", 40, 10, SECRET_SOUNDTEST, 0, false, false, 0},
|
||||
|
||||
/* 05 */ {"EXTRA LEVELS", "", 60, 0, SECRET_HEADER, 0, true, true, 0},
|
||||
|
||||
/* 06 */ {"Aerial Garden Zone", "Complete 1P Mode w/ all emeralds", 70, 11, SECRET_WARP, 40, false, false, 0},
|
||||
/* 07 */ {"Azure Temple Zone", "Complete Aerial Garden Zone", 80, 20, SECRET_WARP, 41, false, false, 0},
|
||||
|
||||
/* 08 */ {"BONUS LEVELS", "", 100, 0, SECRET_HEADER, 0, true, true, 0},
|
||||
|
||||
/* 09 */ {"SRB1 Remake", "Collect 20 Emblems", 130, 40, SECRET_WARP, 101, false, false, 0},
|
||||
/* 10 */ {"Mario Koopa Blast", "Collect 60 Emblems", 110, 42, SECRET_WARP, 30, false, false, 0},
|
||||
/* 11 */ {"SRB1 Level Select", "Complete SRB1 Remake", 140, 21, SECRET_LEVELSELECT, 2, false, true, 0},
|
||||
|
||||
/* 12 */ {"Spring Hill Zone", "Collect 100 Emblems", 0, 44, SECRET_NONE, 0, false, false, 0},
|
||||
/* 13 */ {"Black Hole", "A Rank in all Special Stages", 0, 50, SECRET_NONE, 0, false, true, 0},
|
||||
|
||||
/* 14 */ {"Emblem Hints", "Collect 40 Emblems", 0, 41, SECRET_EMBLEMHINTS, 0, false, true, 0},
|
||||
/* 15 */ {"Emblem Radar", "Collect 80 Emblems", 0, 43, SECRET_ITEMFINDER, 0, false, true, 0},
|
||||
|
||||
/* 16 */ {"Pandora's Box", "Collect All Emblems", 0, 45, SECRET_PANDORA, 0, false, false, 0},
|
||||
/* 17 */ {"Level Select", "Collect All Emblems", 20, 45, SECRET_LEVELSELECT, 1, false, true, 0},
|
||||
/* 03 */ {"Record Attack", "", 0, -1, SECRET_RECORDATTACK, 0, true, true, 0},
|
||||
/* 04 */ {"Play Credits", "", 10, -1, SECRET_CREDITS, 0, true, true, 0},
|
||||
/* 05 */ {"Sound Test", "", 20, -1, SECRET_SOUNDTEST, 0, true, true, 0},
|
||||
};
|
||||
|
||||
// Default number of emblems and extra emblems
|
||||
INT32 numemblems = 155;
|
||||
INT32 numextraemblems = 5;
|
||||
INT32 numemblems = 23;
|
||||
INT32 numextraemblems = 1;
|
||||
|
||||
// DEFAULT CONDITION SETS FOR SRB2 2.1:
|
||||
// DEFAULT CONDITION SETS FOR SRB2KART:
|
||||
void M_SetupDefaultConditionSets(void)
|
||||
{
|
||||
memset(conditionSets, 0, sizeof(conditionSets));
|
||||
|
||||
// -- 1: Complete GFZ1
|
||||
M_AddRawCondition(1, 1, UC_MAPBEATEN, 1, 0, 0);
|
||||
// -- 1: Collect 5 emblems OR play 10 matches
|
||||
M_AddRawCondition(1, 1, UC_TOTALEMBLEMS, 5, 0, 0);
|
||||
M_AddRawCondition(1, 2, UC_MATCHESPLAYED, 10, 0, 0);
|
||||
|
||||
// -- 2: Complete SS1
|
||||
M_AddRawCondition(2, 1, UC_MAPBEATEN, 50, 0, 0);
|
||||
// -- 2: Collect 15 emblems OR play 30 matches
|
||||
M_AddRawCondition(2, 1, UC_TOTALEMBLEMS, 15, 0, 0);
|
||||
M_AddRawCondition(2, 2, UC_MATCHESPLAYED, 30, 0, 0);
|
||||
|
||||
// -- 10: Complete the game
|
||||
M_AddRawCondition(10, 1, UC_GAMECLEAR, 1, 0, 0);
|
||||
|
||||
// -- 11: Complete the game with all emeralds
|
||||
M_AddRawCondition(11, 1, UC_ALLEMERALDS, 1, 0, 0);
|
||||
|
||||
// -- 20: Beat AGZ
|
||||
M_AddRawCondition(20, 1, UC_MAPBEATEN, 40, 0, 0);
|
||||
|
||||
// -- 21: Beat SRB1 Remake
|
||||
M_AddRawCondition(21, 1, UC_MAPBEATEN, 132, 0, 0);
|
||||
|
||||
// -- 22: Beat Black Hole
|
||||
M_AddRawCondition(22, 1, UC_MAPBEATEN, 57, 0, 0);
|
||||
|
||||
// -- 30: Perfect Bonus
|
||||
M_AddRawCondition(30, 1, UC_MAPPERFECT, 1, 0, 0);
|
||||
M_AddRawCondition(30, 2, UC_MAPPERFECT, 2, 0, 0);
|
||||
M_AddRawCondition(30, 3, UC_MAPPERFECT, 4, 0, 0);
|
||||
M_AddRawCondition(30, 4, UC_MAPPERFECT, 5, 0, 0);
|
||||
M_AddRawCondition(30, 5, UC_MAPPERFECT, 7, 0, 0);
|
||||
M_AddRawCondition(30, 6, UC_MAPPERFECT, 8, 0, 0);
|
||||
M_AddRawCondition(30, 7, UC_MAPPERFECT, 10, 0, 0);
|
||||
M_AddRawCondition(30, 8, UC_MAPPERFECT, 11, 0, 0);
|
||||
M_AddRawCondition(30, 9, UC_MAPPERFECT, 13, 0, 0);
|
||||
M_AddRawCondition(30, 10, UC_MAPPERFECT, 16, 0, 0);
|
||||
M_AddRawCondition(30, 11, UC_MAPPERFECT, 22, 0, 0);
|
||||
M_AddRawCondition(30, 12, UC_MAPPERFECT, 23, 0, 0);
|
||||
M_AddRawCondition(30, 13, UC_MAPPERFECT, 24, 0, 0);
|
||||
M_AddRawCondition(30, 14, UC_MAPPERFECT, 40, 0, 0);
|
||||
M_AddRawCondition(30, 15, UC_MAPPERFECT, 41, 0, 0);
|
||||
|
||||
// -- 40: Find 20 emblems
|
||||
M_AddRawCondition(40, 1, UC_TOTALEMBLEMS, 20, 0, 0);
|
||||
|
||||
// -- 41: Find 40 emblems
|
||||
M_AddRawCondition(41, 1, UC_TOTALEMBLEMS, 40, 0, 0);
|
||||
|
||||
// -- 42: Find 60 emblems
|
||||
M_AddRawCondition(42, 1, UC_TOTALEMBLEMS, 60, 0, 0);
|
||||
|
||||
// -- 43: Find 80 emblems
|
||||
M_AddRawCondition(43, 1, UC_TOTALEMBLEMS, 80, 0, 0);
|
||||
|
||||
// -- 44: Find 100 emblems
|
||||
M_AddRawCondition(44, 1, UC_TOTALEMBLEMS, 100, 0, 0);
|
||||
|
||||
// -- 45: Find 160 (all) emblems
|
||||
M_AddRawCondition(45, 1, UC_TOTALEMBLEMS, 160, 0, 0);
|
||||
|
||||
// -- 50: A rank all NiGHTS special stages
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 50, 0);
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 51, 0);
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 52, 0);
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 53, 0);
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 54, 0);
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 55, 0);
|
||||
M_AddRawCondition(50, 1, UC_NIGHTSGRADE, GRADE_A, 56, 0);
|
||||
// -- 10: Play 50 matches
|
||||
M_AddRawCondition(10, 1, UC_TOTALEMBLEMS, 50, 0, 0);
|
||||
}
|
||||
|
||||
void M_AddRawCondition(UINT8 set, UINT8 id, conditiontype_t c, INT32 r, INT16 x1, INT16 x2)
|
||||
|
@ -724,7 +190,7 @@ void M_ClearSecrets(void)
|
|||
for (i = 0; i < MAXCONDITIONSETS; ++i)
|
||||
conditionSets[i].achieved = false;
|
||||
|
||||
timesBeaten = timesBeatenWithEmeralds = timesBeatenUltimate = 0;
|
||||
timesBeaten = timesBeatenWithEmeralds = 0;
|
||||
|
||||
// Re-unlock any always unlocked things
|
||||
M_SilentUpdateUnlockablesAndEmblems();
|
||||
|
@ -739,32 +205,34 @@ static UINT8 M_CheckCondition(condition_t *cn)
|
|||
{
|
||||
case UC_PLAYTIME: // Requires total playing time >= x
|
||||
return (totalplaytime >= (unsigned)cn->requirement);
|
||||
case UC_MATCHESPLAYED: // Requires any level completed >= x times
|
||||
return (matchesplayed >= (unsigned)cn->requirement);
|
||||
case UC_GAMECLEAR: // Requires game beaten >= x times
|
||||
return (timesBeaten >= (unsigned)cn->requirement);
|
||||
case UC_ALLEMERALDS: // Requires game beaten with all 7 emeralds >= x times
|
||||
return (timesBeatenWithEmeralds >= (unsigned)cn->requirement);
|
||||
case UC_ULTIMATECLEAR: // Requires game beaten on ultimate >= x times (in other words, never)
|
||||
return (timesBeatenUltimate >= (unsigned)cn->requirement);
|
||||
case UC_OVERALLSCORE: // Requires overall score >= x
|
||||
return (M_GotHighEnoughScore(cn->requirement));
|
||||
/*case UC_ULTIMATECLEAR: // Requires game beaten on ultimate >= x times (in other words, never)
|
||||
return (timesBeatenUltimate >= (unsigned)cn->requirement);*/
|
||||
case UC_OVERALLTIME: // Requires overall time <= x
|
||||
return (M_GotLowEnoughTime(cn->requirement));
|
||||
/*case UC_OVERALLSCORE: // Requires overall score >= x
|
||||
return (M_GotHighEnoughScore(cn->requirement));
|
||||
case UC_OVERALLRINGS: // Requires overall rings >= x
|
||||
return (M_GotHighEnoughRings(cn->requirement));
|
||||
return (M_GotHighEnoughRings(cn->requirement));*/
|
||||
case UC_MAPVISITED: // Requires map x to be visited
|
||||
return ((mapvisited[cn->requirement - 1] & MV_VISITED) == MV_VISITED);
|
||||
case UC_MAPBEATEN: // Requires map x to be beaten
|
||||
return ((mapvisited[cn->requirement - 1] & MV_BEATEN) == MV_BEATEN);
|
||||
case UC_MAPALLEMERALDS: // Requires map x to be beaten with all emeralds in possession
|
||||
return ((mapvisited[cn->requirement - 1] & MV_ALLEMERALDS) == MV_ALLEMERALDS);
|
||||
case UC_MAPULTIMATE: // Requires map x to be beaten on ultimate
|
||||
/*case UC_MAPULTIMATE: // Requires map x to be beaten on ultimate
|
||||
return ((mapvisited[cn->requirement - 1] & MV_ULTIMATE) == MV_ULTIMATE);
|
||||
case UC_MAPPERFECT: // Requires map x to be beaten with a perfect bonus
|
||||
return ((mapvisited[cn->requirement - 1] & MV_PERFECT) == MV_PERFECT);
|
||||
case UC_MAPSCORE: // Requires score on map >= x
|
||||
return (G_GetBestScore(cn->extrainfo1) >= (unsigned)cn->requirement);
|
||||
return ((mapvisited[cn->requirement - 1] & MV_PERFECT) == MV_PERFECT);*/
|
||||
case UC_MAPTIME: // Requires time on map <= x
|
||||
return (G_GetBestTime(cn->extrainfo1) <= (unsigned)cn->requirement);
|
||||
/*case UC_MAPSCORE: // Requires score on map >= x
|
||||
return (G_GetBestScore(cn->extrainfo1) >= (unsigned)cn->requirement);
|
||||
case UC_MAPRINGS: // Requires rings on map >= x
|
||||
return (G_GetBestRings(cn->extrainfo1) >= cn->requirement);
|
||||
case UC_NIGHTSSCORE:
|
||||
|
@ -772,7 +240,7 @@ static UINT8 M_CheckCondition(condition_t *cn)
|
|||
case UC_NIGHTSTIME:
|
||||
return (G_GetBestNightsTime(cn->extrainfo1, (UINT8)cn->extrainfo2) <= (unsigned)cn->requirement);
|
||||
case UC_NIGHTSGRADE:
|
||||
return (G_GetBestNightsGrade(cn->extrainfo1, (UINT8)cn->extrainfo2) >= cn->requirement);
|
||||
return (G_GetBestNightsGrade(cn->extrainfo1, (UINT8)cn->extrainfo2) >= cn->requirement);*/
|
||||
case UC_TRIGGER: // requires map trigger set
|
||||
return !!(unlocktriggers & (1 << cn->requirement));
|
||||
case UC_TOTALEMBLEMS: // Requires number of emblems >= x
|
||||
|
@ -941,13 +409,13 @@ UINT8 M_CheckLevelEmblems(void)
|
|||
|
||||
switch (emblemlocations[i].type)
|
||||
{
|
||||
case ET_SCORE: // Requires score on map >= x
|
||||
/*case ET_SCORE: // Requires score on map >= x
|
||||
res = (G_GetBestScore(levelnum) >= (unsigned)valToReach);
|
||||
break;
|
||||
break;*/
|
||||
case ET_TIME: // Requires time on map <= x
|
||||
res = (G_GetBestTime(levelnum) <= (unsigned)valToReach);
|
||||
break;
|
||||
case ET_RINGS: // Requires rings on map >= x
|
||||
/*case ET_RINGS: // Requires rings on map >= x
|
||||
res = (G_GetBestRings(levelnum) >= valToReach);
|
||||
break;
|
||||
case ET_NGRADE: // Requires NiGHTS grade on map >= x
|
||||
|
@ -955,7 +423,7 @@ UINT8 M_CheckLevelEmblems(void)
|
|||
break;
|
||||
case ET_NTIME: // Requires NiGHTS time on map <= x
|
||||
res = (G_GetBestNightsTime(levelnum, 0) <= (unsigned)valToReach);
|
||||
break;
|
||||
break;*/
|
||||
default: // unreachable but shuts the compiler up.
|
||||
continue;
|
||||
}
|
||||
|
@ -1039,7 +507,7 @@ UINT8 M_GotEnoughEmblems(INT32 number)
|
|||
return false;
|
||||
}
|
||||
|
||||
UINT8 M_GotHighEnoughScore(INT32 tscore)
|
||||
/*UINT8 M_GotHighEnoughScore(INT32 tscore)
|
||||
{
|
||||
INT32 mscore = 0;
|
||||
INT32 i;
|
||||
|
@ -1055,7 +523,7 @@ UINT8 M_GotHighEnoughScore(INT32 tscore)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
UINT8 M_GotLowEnoughTime(INT32 tictime)
|
||||
{
|
||||
|
@ -1075,7 +543,7 @@ UINT8 M_GotLowEnoughTime(INT32 tictime)
|
|||
return true;
|
||||
}
|
||||
|
||||
UINT8 M_GotHighEnoughRings(INT32 trings)
|
||||
/*UINT8 M_GotHighEnoughRings(INT32 trings)
|
||||
{
|
||||
INT32 mrings = 0;
|
||||
INT32 i;
|
||||
|
@ -1091,7 +559,7 @@ UINT8 M_GotHighEnoughRings(INT32 trings)
|
|||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}*/
|
||||
|
||||
// ----------------
|
||||
// Misc Emblem shit
|
||||
|
|
35
src/m_cond.h
35
src/m_cond.h
|
@ -21,23 +21,24 @@
|
|||
typedef enum
|
||||
{
|
||||
UC_PLAYTIME, // PLAYTIME [tics]
|
||||
UC_MATCHESPLAYED, // SRB2Kart: MATCHESPLAYED [x played]
|
||||
UC_GAMECLEAR, // GAMECLEAR <x times>
|
||||
UC_ALLEMERALDS, // ALLEMERALDS <x times>
|
||||
UC_ULTIMATECLEAR, // ULTIMATECLEAR <x times>
|
||||
UC_OVERALLSCORE, // OVERALLSCORE [score to beat]
|
||||
//UC_ULTIMATECLEAR, // ULTIMATECLEAR <x times>
|
||||
//UC_OVERALLSCORE, // OVERALLSCORE [score to beat]
|
||||
UC_OVERALLTIME, // OVERALLTIME [time to beat, tics]
|
||||
UC_OVERALLRINGS, // OVERALLRINGS [rings to beat]
|
||||
//UC_OVERALLRINGS, // OVERALLRINGS [rings to beat]
|
||||
UC_MAPVISITED, // MAPVISITED [map number]
|
||||
UC_MAPBEATEN, // MAPBEATEN [map number]
|
||||
UC_MAPALLEMERALDS, // MAPALLEMERALDS [map number]
|
||||
UC_MAPULTIMATE, // MAPULTIMATE [map number]
|
||||
UC_MAPPERFECT, // MAPPERFECT [map number]
|
||||
UC_MAPSCORE, // MAPSCORE [map number] [score to beat]
|
||||
//UC_MAPULTIMATE, // MAPULTIMATE [map number]
|
||||
//UC_MAPPERFECT, // MAPPERFECT [map number]
|
||||
//UC_MAPSCORE, // MAPSCORE [map number] [score to beat]
|
||||
UC_MAPTIME, // MAPTIME [map number] [time to beat, tics]
|
||||
UC_MAPRINGS, // MAPRINGS [map number] [rings to beat]
|
||||
UC_NIGHTSSCORE, // NIGHTSSCORE [map number] <mare, omit or "0" for overall> [score to beat]
|
||||
UC_NIGHTSTIME, // NIGHTSTIME [map number] <mare, omit "0" overall> [time to beat, tics]
|
||||
UC_NIGHTSGRADE, // NIGHTSGRADE [map number] <mare, omit "0" overall> [grade]
|
||||
//UC_MAPRINGS, // MAPRINGS [map number] [rings to beat]
|
||||
//UC_NIGHTSSCORE, // NIGHTSSCORE [map number] <mare, omit or "0" for overall> [score to beat]
|
||||
//UC_NIGHTSTIME, // NIGHTSTIME [map number] <mare, omit "0" overall> [time to beat, tics]
|
||||
//UC_NIGHTSGRADE, // NIGHTSGRADE [map number] <mare, omit "0" overall> [grade]
|
||||
UC_TRIGGER, // TRIGGER [trigger number]
|
||||
UC_TOTALEMBLEMS, // TOTALEMBLEMS [number of emblems]
|
||||
UC_EMBLEM, // EMBLEM [emblem number]
|
||||
|
@ -68,11 +69,11 @@ typedef struct
|
|||
// Emblem information
|
||||
#define ET_GLOBAL 0 // Global map emblem, var == color
|
||||
#define ET_SKIN 1 // Skin specific emblem, var == skin
|
||||
#define ET_SCORE 2
|
||||
#define ET_TIME 3
|
||||
#define ET_RINGS 4
|
||||
#define ET_NGRADE 5
|
||||
#define ET_NTIME 6
|
||||
//#define ET_SCORE 2
|
||||
#define ET_TIME 2
|
||||
//#define ET_RINGS 4
|
||||
//#define ET_NGRADE 5
|
||||
//#define ET_NTIME 6
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
@ -171,8 +172,8 @@ const char *M_GetExtraEmblemPatch(extraemblem_t *em);
|
|||
// They stop checking upon reaching the target number so they
|
||||
// should be (theoretically?) slightly faster.
|
||||
UINT8 M_GotEnoughEmblems(INT32 number);
|
||||
UINT8 M_GotHighEnoughScore(INT32 tscore);
|
||||
//UINT8 M_GotHighEnoughScore(INT32 tscore);
|
||||
UINT8 M_GotLowEnoughTime(INT32 tictime);
|
||||
UINT8 M_GotHighEnoughRings(INT32 trings);
|
||||
//UINT8 M_GotHighEnoughRings(INT32 trings);
|
||||
|
||||
#define M_Achieved(a) ((a) >= MAXCONDITIONSETS || conditionSets[a].achieved)
|
||||
|
|
436
src/m_menu.c
436
src/m_menu.c
File diff suppressed because it is too large
Load diff
|
@ -439,7 +439,7 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
|
|||
|
||||
special->tracer->player->kartstuff[k_comebackpoints]++;
|
||||
|
||||
if (netgame)
|
||||
if (netgame && cv_hazardlog.value)
|
||||
CONS_Printf(M_GetText("%s gave an item to %s.\n"), player_names[special->tracer->player-players], player_names[player-players]);
|
||||
|
||||
if (special->tracer->player->kartstuff[k_comebackpoints] >= 3)
|
||||
|
|
|
@ -139,6 +139,7 @@ boolean P_PlayerInPain(player_t *player);
|
|||
void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor);
|
||||
void P_ResetPlayer(player_t *player);
|
||||
boolean P_IsLocalPlayer(player_t *player);
|
||||
boolean P_SpectatorJoinGame(player_t *player);
|
||||
|
||||
boolean P_IsObjectInGoop(mobj_t *mo);
|
||||
boolean P_IsObjectOnGround(mobj_t *mo);
|
||||
|
|
19
src/p_mobj.c
19
src/p_mobj.c
|
@ -3604,7 +3604,7 @@ boolean P_CameraThinker(player_t *player, camera_t *thiscam, boolean resetcalled
|
|||
|| (thiscam == &camera4 && players[fourthdisplayplayer].mo && (players[fourthdisplayplayer].mo->flags2 & MF2_TWOD)))
|
||||
itsatwodlevel = true;
|
||||
|
||||
if (cv_kartmirror.value)
|
||||
if (mirrormode)
|
||||
postimg = postimg_mirror;
|
||||
else if (player->pflags & PF_FLIPCAM && !(player->pflags & PF_NIGHTSMODE) && player->mo->eflags & MFE_VERTICALFLIP)
|
||||
postimg = postimg_flip;
|
||||
|
@ -6782,8 +6782,9 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
break;
|
||||
case MT_PLAYERARROW:
|
||||
if (mobj->target && mobj->target->health
|
||||
&& mobj->target->player && mobj->target->player->mo
|
||||
&& mobj->target->player->health && mobj->target->player->playerstate != PST_DEAD)
|
||||
&& mobj->target->player && !mobj->target->player->spectator
|
||||
&& mobj->target->player->health && mobj->target->player->playerstate != PST_DEAD
|
||||
&& players[displayplayer].mo && !players[displayplayer].spectator)
|
||||
{
|
||||
fixed_t scale = mobj->target->scale;
|
||||
mobj->color = mobj->target->color;
|
||||
|
@ -7729,14 +7730,10 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
|
||||
P_SpawnGhostMobj(mobj);
|
||||
|
||||
if (K_GetKartCC() == 50)
|
||||
{
|
||||
if (gamespeed == 0)
|
||||
finalspeed = FixedMul(finalspeed, FRACUNIT-FRACUNIT/4);
|
||||
}
|
||||
else if (K_GetKartCC() == 150)
|
||||
{
|
||||
else if (gamespeed == 2)
|
||||
finalspeed = FixedMul(finalspeed, FRACUNIT+FRACUNIT/4);
|
||||
}
|
||||
|
||||
mobj->angle = R_PointToAngle2(mobj->x, mobj->y, mobj->x+mobj->momx, mobj->y+mobj->momy);
|
||||
if (mobj->health <= 5)
|
||||
|
@ -7780,12 +7777,12 @@ void P_MobjThinker(mobj_t *mobj)
|
|||
if (leveltime % 7 == 0)
|
||||
S_StartSound(mobj, mobj->info->activesound);
|
||||
|
||||
if (K_GetKartCC() == 50)
|
||||
if (gamespeed == 0)
|
||||
{
|
||||
topspeed = FixedMul(topspeed, FRACUNIT-FRACUNIT/4);
|
||||
distbarrier = FixedMul(distbarrier, FRACUNIT-FRACUNIT/4);
|
||||
}
|
||||
else if (K_GetKartCC() == 150)
|
||||
else if (gamespeed == 2)
|
||||
{
|
||||
topspeed = FixedMul(topspeed, FRACUNIT+FRACUNIT/4);
|
||||
distbarrier = FixedMul(distbarrier, FRACUNIT+FRACUNIT/4);
|
||||
|
|
|
@ -198,6 +198,7 @@ static void P_NetArchivePlayers(void)
|
|||
WRITEINT16(save_p, players[i].starposty);
|
||||
WRITEINT16(save_p, players[i].starpostz);
|
||||
WRITEINT32(save_p, players[i].starpostnum);
|
||||
WRITEINT32(save_p, players[i].starpostcount);
|
||||
WRITEANGLE(save_p, players[i].starpostangle);
|
||||
|
||||
WRITEANGLE(save_p, players[i].angle_pos);
|
||||
|
@ -381,6 +382,7 @@ static void P_NetUnArchivePlayers(void)
|
|||
players[i].starposty = READINT16(save_p);
|
||||
players[i].starpostz = READINT16(save_p);
|
||||
players[i].starpostnum = READINT32(save_p);
|
||||
players[i].starpostcount = READINT32(save_p);
|
||||
players[i].starpostangle = READANGLE(save_p);
|
||||
|
||||
players[i].angle_pos = READANGLE(save_p);
|
||||
|
@ -3230,6 +3232,12 @@ static void P_NetArchiveMisc(void)
|
|||
|
||||
WRITEUINT32(save_p, hidetime);
|
||||
|
||||
// SRB2kart
|
||||
WRITEUINT8(save_p, gamespeed);
|
||||
WRITEUINT8(save_p, mirrormode);
|
||||
WRITEUINT8(save_p, franticitems);
|
||||
WRITEUINT8(save_p, comeback);
|
||||
|
||||
// Is it paused?
|
||||
if (paused)
|
||||
WRITEUINT8(save_p, 0x2f);
|
||||
|
@ -3307,6 +3315,12 @@ static inline boolean P_NetUnArchiveMisc(void)
|
|||
|
||||
hidetime = READUINT32(save_p);
|
||||
|
||||
// SRB2kart
|
||||
gamespeed = READUINT8(save_p);
|
||||
mirrormode = (boolean)READUINT8(save_p);
|
||||
franticitems = (boolean)READUINT8(save_p);
|
||||
comeback = (boolean)READUINT8(save_p);
|
||||
|
||||
// Is it paused?
|
||||
if (READUINT8(save_p) == 0x2f)
|
||||
paused = true;
|
||||
|
|
|
@ -2190,7 +2190,7 @@ static void P_LevelInitStuff(void)
|
|||
// special stage
|
||||
stagefailed = false;
|
||||
// Reset temporary record data
|
||||
memset(&ntemprecords, 0, sizeof(nightsdata_t));
|
||||
//memset(&ntemprecords, 0, sizeof(nightsdata_t));
|
||||
|
||||
// earthquake camera
|
||||
memset(&quake,0,sizeof(struct quake));
|
||||
|
@ -2204,6 +2204,7 @@ static void P_LevelInitStuff(void)
|
|||
}
|
||||
|
||||
players[i].realtime = countdown = countdown2 = 0;
|
||||
curlap = bestlap = 0; // SRB2Kart
|
||||
|
||||
players[i].gotcontinue = false;
|
||||
|
||||
|
@ -2434,19 +2435,6 @@ static void P_LoadRecordGhosts(void)
|
|||
|
||||
sprintf(gpath,"%s"PATHSEP"replay"PATHSEP"%s"PATHSEP"%s", srb2home, timeattackfolder, G_BuildMapName(gamemap));
|
||||
|
||||
// Best Score ghost
|
||||
/*if (cv_ghost_bestscore.value)
|
||||
{
|
||||
for (i = 0; i < numskins; ++i)
|
||||
{
|
||||
if (cv_ghost_bestscore.value == 1 && players[consoleplayer].skin != i)
|
||||
continue;
|
||||
|
||||
if (FIL_FileExists(va("%s-%s-score-best.lmp", gpath, skins[i].name)))
|
||||
G_AddGhost(va("%s-%s-score-best.lmp", gpath, skins[i].name));
|
||||
}
|
||||
}*/
|
||||
|
||||
// Best Time ghost
|
||||
if (cv_ghost_besttime.value)
|
||||
{
|
||||
|
@ -2460,8 +2448,8 @@ static void P_LoadRecordGhosts(void)
|
|||
}
|
||||
}
|
||||
|
||||
// Best lap ghost
|
||||
/*if (cv_ghost_bestlap.value)
|
||||
// Best Lap ghost
|
||||
if (cv_ghost_bestlap.value)
|
||||
{
|
||||
for (i = 0; i < numskins; ++i)
|
||||
{
|
||||
|
@ -2471,7 +2459,7 @@ static void P_LoadRecordGhosts(void)
|
|||
if (FIL_FileExists(va("%s-%s-lap-best.lmp", gpath, skins[i].name)))
|
||||
G_AddGhost(va("%s-%s-lap-best.lmp", gpath, skins[i].name));
|
||||
}
|
||||
}*/
|
||||
}
|
||||
|
||||
// Last ghost
|
||||
if (cv_ghost_last.value)
|
||||
|
@ -2505,7 +2493,7 @@ static void P_LoadRecordGhosts(void)
|
|||
free(gpath);
|
||||
}
|
||||
|
||||
static void P_LoadNightsGhosts(void)
|
||||
/*static void P_LoadNightsGhosts(void)
|
||||
{
|
||||
const size_t glen = strlen(srb2home)+1+strlen("replay")+1+strlen(timeattackfolder)+1+strlen("MAPXX")+1;
|
||||
char *gpath = malloc(glen);
|
||||
|
@ -2544,7 +2532,7 @@ static void P_LoadNightsGhosts(void)
|
|||
}
|
||||
|
||||
free(gpath);
|
||||
}
|
||||
}*/
|
||||
|
||||
/** Loads a level from a lump or external wad.
|
||||
*
|
||||
|
@ -2843,8 +2831,8 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
|
||||
if (modeattacking == ATTACKING_RECORD && !demoplayback)
|
||||
P_LoadRecordGhosts();
|
||||
else if (modeattacking == ATTACKING_NIGHTS && !demoplayback)
|
||||
P_LoadNightsGhosts();
|
||||
/*else if (modeattacking == ATTACKING_NIGHTS && !demoplayback)
|
||||
P_LoadNightsGhosts();*/
|
||||
|
||||
if (G_TagGametype())
|
||||
{
|
||||
|
@ -2987,6 +2975,22 @@ boolean P_SetupLevel(boolean skipprecip)
|
|||
CV_SetValue(&cv_analog, false);
|
||||
}
|
||||
|
||||
// SRB2Kart: map load variables
|
||||
if (modeattacking)
|
||||
gamespeed = 2;
|
||||
else if (gametype == GT_MATCH)
|
||||
gamespeed = 0;
|
||||
else
|
||||
gamespeed = cv_kartspeed.value;
|
||||
|
||||
if (gametype == GT_MATCH)
|
||||
mirrormode = false;
|
||||
else
|
||||
mirrormode = cv_kartmirror.value;
|
||||
|
||||
franticitems = cv_kartfrantic.value;
|
||||
comeback = cv_kartcomeback.value;
|
||||
|
||||
// clear special respawning que
|
||||
iquehead = iquetail = 0;
|
||||
|
||||
|
|
|
@ -4156,6 +4156,14 @@ DoneSection2:
|
|||
CONS_Printf(M_GetText("%s started lap %u\n"), player_names[player-players], (UINT32)player->laps+1);
|
||||
}
|
||||
|
||||
// SRB2Kart: save best lap for record attack
|
||||
if (player == &players[consoleplayer])
|
||||
{
|
||||
if (curlap < bestlap || bestlap == 0)
|
||||
bestlap = curlap;
|
||||
curlap = 0;
|
||||
}
|
||||
|
||||
// Reset starposts (checkpoints) info
|
||||
// SRB2kart 200117
|
||||
player->starpostangle = player->starpostnum = 0;
|
||||
|
|
82
src/p_user.c
82
src/p_user.c
|
@ -43,6 +43,7 @@
|
|||
// Objectplace
|
||||
#include "m_cheat.h"
|
||||
// SRB2kart
|
||||
#include "m_cond.h" // M_UpdateUnlockablesAndExtraEmblems
|
||||
#include "k_kart.h"
|
||||
|
||||
#ifdef HW3SOUND
|
||||
|
@ -731,8 +732,8 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
}
|
||||
|
||||
// Add score to leaderboards now
|
||||
if (!(netgame||multiplayer) && P_IsLocalPlayer(&players[i]))
|
||||
G_AddTempNightsRecords(players[i].marescore, leveltime - player->marebegunat, players[i].mare + 1);
|
||||
/*if (!(netgame||multiplayer) && P_IsLocalPlayer(&players[i]))
|
||||
G_AddTempNightsRecords(players[i].marescore, leveltime - player->marebegunat, players[i].mare + 1);*/
|
||||
|
||||
// transfer scores anyway
|
||||
players[i].lastmarescore = players[i].marescore;
|
||||
|
@ -754,8 +755,8 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
|||
player->finishedrings = (INT16)(player->health - 1);
|
||||
|
||||
// Add score to temp leaderboards
|
||||
if (!(netgame||multiplayer) && P_IsLocalPlayer(player))
|
||||
G_AddTempNightsRecords(player->marescore, leveltime - player->marebegunat, (UINT8)(oldmare + 1));
|
||||
/*if (!(netgame||multiplayer) && P_IsLocalPlayer(player))
|
||||
G_AddTempNightsRecords(player->marescore, leveltime - player->marebegunat, (UINT8)(oldmare + 1));*/
|
||||
|
||||
// Starting a new mare, transfer scores
|
||||
player->lastmarescore = player->marescore;
|
||||
|
@ -1644,6 +1645,13 @@ void P_DoPlayerExit(player_t *player)
|
|||
if (player->exiting)
|
||||
return;
|
||||
|
||||
if ((player == &players[consoleplayer]
|
||||
|| (splitscreen && player == &players[secondarydisplayplayer])
|
||||
|| (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||
|| (splitscreen > 2 && player == &players[fourthdisplayplayer]))
|
||||
&& (!player->spectator && ((!modifiedgame || savemoddata) && !demoplayback)))
|
||||
legitimateexit = true;
|
||||
|
||||
if (gametype == GT_RACE || gametype == GT_COMPETITION) // If in Race Mode, allow
|
||||
{
|
||||
// SRB2kart 120217
|
||||
|
@ -4107,7 +4115,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
}
|
||||
}
|
||||
|
||||
if (cmd->buttons & BT_JUMP && !player->exiting && !P_PlayerInPain(player))
|
||||
if (cmd->buttons & BT_DRIFT && !player->exiting && !P_PlayerInPain(player))
|
||||
{
|
||||
#ifdef HAVE_BLUA
|
||||
if (LUAh_JumpSpecial(player))
|
||||
|
@ -4320,7 +4328,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
|
|||
*/
|
||||
}
|
||||
|
||||
if (cmd->buttons & BT_JUMP)
|
||||
if (cmd->buttons & BT_DRIFT)
|
||||
{
|
||||
player->pflags |= PF_JUMPDOWN;
|
||||
|
||||
|
@ -5758,7 +5766,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
if (player->drilldelay)
|
||||
player->drilldelay--;
|
||||
|
||||
if (!(cmd->buttons & BT_JUMP))
|
||||
if (!(cmd->buttons & BT_DRIFT))
|
||||
{
|
||||
// Always have just a TINY bit of drill power.
|
||||
if (player->drillmeter <= 0)
|
||||
|
@ -5995,7 +6003,7 @@ static void P_NiGHTSMovement(player_t *player)
|
|||
player->pflags |= PF_DRILLING;
|
||||
newangle = (INT16)player->flyangle;
|
||||
}
|
||||
else if (cmd->buttons & BT_JUMP && player->drillmeter && player->drilldelay == 0)
|
||||
else if (cmd->buttons & BT_DRIFT && player->drillmeter && player->drilldelay == 0)
|
||||
{
|
||||
if (!player->jumping)
|
||||
firstdrill = true;
|
||||
|
@ -7002,7 +7010,7 @@ static void P_MovePlayer(player_t *player)
|
|||
if (player->charability2 == CA2_MULTIABILITY)
|
||||
{
|
||||
// Adventure-style flying by just holding the button down
|
||||
if (cmd->buttons & BT_JUMP && !(player->pflags & PF_STASIS) && !player->exiting)
|
||||
if (cmd->buttons & BT_DRIFT && !(player->pflags & PF_STASIS) && !player->exiting)
|
||||
P_SetObjectMomZ(player->mo, actionspd/4, true);
|
||||
}
|
||||
else
|
||||
|
@ -8000,7 +8008,7 @@ static void P_DeathThink(player_t *player)
|
|||
// continue logic
|
||||
if (!(netgame || multiplayer) && player->lives <= 0)
|
||||
{
|
||||
if (player->deadtimer > TICRATE && (cmd->buttons & BT_BRAKE || cmd->buttons & BT_ACCELERATE || cmd->buttons & BT_JUMP) && player->continues > 0)
|
||||
if (player->deadtimer > TICRATE && (cmd->buttons & BT_BRAKE || cmd->buttons & BT_ACCELERATE || cmd->buttons & BT_DRIFT) && player->continues > 0)
|
||||
G_UseContinue();
|
||||
else if (player->deadtimer >= gameovertics)
|
||||
G_UseContinue(); // Even if we don't have one this handles ending the game
|
||||
|
@ -8021,7 +8029,7 @@ static void P_DeathThink(player_t *player)
|
|||
//player->kartstuff[k_lakitu] = 48; // See G_PlayerReborn in g_game.c
|
||||
|
||||
// SRB2kart - spawn automatically after 1 second
|
||||
if (player->deadtimer > TICRATE)
|
||||
if (player->deadtimer > cv_respawntime.value*TICRATE)
|
||||
player->playerstate = PST_REBORN;
|
||||
|
||||
// Single player auto respawn
|
||||
|
@ -8084,9 +8092,22 @@ static void P_DeathThink(player_t *player)
|
|||
if (!(countdown2 && !countdown) && !player->exiting && !(player->pflags & PF_TIMEOVER))
|
||||
{
|
||||
if (leveltime >= 4*TICRATE)
|
||||
{
|
||||
player->realtime = leveltime - 4*TICRATE;
|
||||
if (player == &players[consoleplayer])
|
||||
{
|
||||
if (player->spectator || !circuitmap)
|
||||
curlap = 0;
|
||||
else
|
||||
curlap++; // This is too complicated to sync to realtime, just sorta hope for the best :V
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player->realtime = 0;
|
||||
if (player == &players[consoleplayer])
|
||||
curlap = 0;
|
||||
}
|
||||
}
|
||||
|
||||
if ((gametype == GT_RACE || gametype == GT_COMPETITION || (gametype == GT_COOP && (multiplayer || netgame))) && (player->lives <= 0))
|
||||
|
@ -8892,7 +8913,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
|
|||
return (x == thiscam->x && y == thiscam->y && z == thiscam->z && angle == thiscam->aiming);
|
||||
}
|
||||
|
||||
static boolean P_SpectatorJoinGame(player_t *player)
|
||||
boolean P_SpectatorJoinGame(player_t *player)
|
||||
{
|
||||
if (!G_GametypeHasSpectators() && G_IsSpecialStage(gamemap) && useNightsSS) // Special Stage spectators should NEVER be allowed to rejoin the game
|
||||
{
|
||||
|
@ -9116,7 +9137,7 @@ static void P_CalcPostImg(player_t *player)
|
|||
}
|
||||
#endif
|
||||
|
||||
if (cv_kartmirror.value) // srb2kart
|
||||
if (mirrormode) // srb2kart
|
||||
*type = postimg_mirror;
|
||||
}
|
||||
|
||||
|
@ -9380,31 +9401,28 @@ void P_PlayerThink(player_t *player)
|
|||
if (!player->exiting)
|
||||
{
|
||||
if (leveltime >= 4*TICRATE)
|
||||
{
|
||||
player->realtime = leveltime - 4*TICRATE;
|
||||
if (player == &players[consoleplayer])
|
||||
{
|
||||
if (player->spectator || !circuitmap)
|
||||
curlap = 0;
|
||||
else
|
||||
curlap++; // This is too complicated to sync to realtime, just sorta hope for the best :V
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
player->realtime = 0;
|
||||
if (player == &players[consoleplayer])
|
||||
curlap = 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ((netgame || splitscreen) && !player->powers[pw_flashing])
|
||||
if ((netgame || splitscreen) && player->spectator && cmd->buttons & BT_ATTACK && !player->powers[pw_flashing])
|
||||
{
|
||||
if (player->spectator && cmd->buttons & BT_ATTACK)
|
||||
{
|
||||
if (P_SpectatorJoinGame(player))
|
||||
return; // player->mo was removed.
|
||||
}
|
||||
else if (!player->spectator && cmd->buttons & BT_SPECTATE)
|
||||
{
|
||||
if (player == &players[consoleplayer])
|
||||
COM_ImmedExecute("changeteam spectator");
|
||||
else if (splitscreen && player == &players[secondarydisplayplayer])
|
||||
COM_ImmedExecute("changeteam2 spectator");
|
||||
else if (splitscreen > 1 && player == &players[thirddisplayplayer])
|
||||
COM_ImmedExecute("changeteam3 spectator");
|
||||
else if (splitscreen > 2 && player == &players[fourthdisplayplayer])
|
||||
COM_ImmedExecute("changeteam4 spectator");
|
||||
//return;
|
||||
}
|
||||
if (P_SpectatorJoinGame(player))
|
||||
return; // player->mo was removed.
|
||||
}
|
||||
|
||||
// Even if not NiGHTS, pull in nearby objects when walking around as John Q. Elliot.
|
||||
|
|
|
@ -577,15 +577,15 @@ void Y_IntermissionDrawer(void)
|
|||
V_DrawRightAlignedString(x+160, 32, V_YELLOWMAP, "TIME");
|
||||
|
||||
// Rings
|
||||
V_DrawThinString(x+168, 32, V_YELLOWMAP, "RING");
|
||||
V_DrawThinString(x+168, 31, V_YELLOWMAP, "RING");
|
||||
|
||||
// Total rings
|
||||
V_DrawThinString(x+191, 24, V_YELLOWMAP, "TOTAL");
|
||||
V_DrawThinString(x+196, 32, V_YELLOWMAP, "RING");
|
||||
V_DrawThinString(x+191, 22, V_YELLOWMAP, "TOTAL");
|
||||
V_DrawThinString(x+196, 31, V_YELLOWMAP, "RING");
|
||||
|
||||
// Monitors
|
||||
V_DrawThinString(x+223, 24, V_YELLOWMAP, "ITEM");
|
||||
V_DrawThinString(x+229, 32, V_YELLOWMAP, "BOX");
|
||||
V_DrawThinString(x+223, 22, V_YELLOWMAP, "ITEM");
|
||||
V_DrawThinString(x+229, 31, V_YELLOWMAP, "BOX");
|
||||
|
||||
// Score
|
||||
V_DrawRightAlignedString(x+288, 32, V_YELLOWMAP, "SCORE");
|
||||
|
@ -629,15 +629,15 @@ void Y_IntermissionDrawer(void)
|
|||
|
||||
sstrtime[sizeof sstrtime - 1] = '\0';
|
||||
// Time
|
||||
V_DrawRightAlignedThinString(x+160, y, ((data.competition.times[i] & 0x80000000) ? V_YELLOWMAP : 0), sstrtime);
|
||||
V_DrawRightAlignedThinString(x+160, y-1, ((data.competition.times[i] & 0x80000000) ? V_YELLOWMAP : 0), sstrtime);
|
||||
// Rings
|
||||
V_DrawRightAlignedThinString(x+188, y, V_MONOSPACE|((data.competition.rings[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pring));
|
||||
V_DrawRightAlignedThinString(x+188, y-1, V_MONOSPACE|((data.competition.rings[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pring));
|
||||
// Total rings
|
||||
V_DrawRightAlignedThinString(x+216, y, V_MONOSPACE|((data.competition.maxrings[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pmaxring));
|
||||
V_DrawRightAlignedThinString(x+216, y-1, V_MONOSPACE|((data.competition.maxrings[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pmaxring));
|
||||
// Monitors
|
||||
V_DrawRightAlignedThinString(x+244, y, V_MONOSPACE|((data.competition.monitors[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pmonitor));
|
||||
V_DrawRightAlignedThinString(x+244, y-1, V_MONOSPACE|((data.competition.monitors[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pmonitor));
|
||||
// Score
|
||||
V_DrawRightAlignedThinString(x+288, y, V_MONOSPACE|((data.competition.scores[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pscore));
|
||||
V_DrawRightAlignedThinString(x+288, y-1, V_MONOSPACE|((data.competition.scores[i] & 0x80000000) ? V_YELLOWMAP : 0), va("%u", pscore));
|
||||
// Final Points
|
||||
V_DrawRightAlignedString(x+312, y, V_YELLOWMAP, va("%d", data.competition.points[i]));
|
||||
}
|
||||
|
@ -907,10 +907,13 @@ static void Y_UpdateRecordReplays(void)
|
|||
if ((mainrecords[gamemap-1]->time == 0) || (players[consoleplayer].realtime < mainrecords[gamemap-1]->time))
|
||||
mainrecords[gamemap-1]->time = players[consoleplayer].realtime;
|
||||
|
||||
if ((mainrecords[gamemap-1]->lap == 0) || (bestlap < mainrecords[gamemap-1]->lap))
|
||||
mainrecords[gamemap-1]->lap = bestlap;
|
||||
|
||||
// Save demo!
|
||||
bestdemo[255] = '\0';
|
||||
lastdemo[255] = '\0';
|
||||
G_SetDemoTime(players[consoleplayer].realtime, 0);
|
||||
G_SetDemoTime(players[consoleplayer].realtime, bestlap);
|
||||
G_CheckDemoStatus();
|
||||
|
||||
I_mkdir(va("%s"PATHSEP"replay", srb2home), 0755);
|
||||
|
@ -936,6 +939,15 @@ static void Y_UpdateRecordReplays(void)
|
|||
CONS_Printf("\x83%s\x80 %s '%s'\n", M_GetText("NEW RECORD TIME!"), M_GetText("Saved replay as"), bestdemo);
|
||||
}
|
||||
|
||||
snprintf(bestdemo, 255, "%s-%s-lap-best.lmp", gpath, cv_chooseskin.string);
|
||||
if (!FIL_FileExists(bestdemo) || G_CmpDemoTime(bestdemo, lastdemo) & (1<<1))
|
||||
{ // Better lap time, save this demo.
|
||||
if (FIL_FileExists(bestdemo))
|
||||
remove(bestdemo);
|
||||
FIL_WriteFile(bestdemo, buf, len);
|
||||
CONS_Printf("\x83%s\x80 %s '%s'\n", M_GetText("NEW RECORD LAP!"), M_GetText("Saved replay as"), bestdemo);
|
||||
}
|
||||
|
||||
//CONS_Printf("%s '%s'\n", M_GetText("Saved replay as"), lastdemo);
|
||||
|
||||
Z_Free(buf);
|
||||
|
@ -1033,7 +1045,7 @@ void Y_StartIntermission(void)
|
|||
{
|
||||
case int_nights:
|
||||
// Can't fail
|
||||
G_SetNightsRecords();
|
||||
//G_SetNightsRecords();
|
||||
|
||||
// Check records
|
||||
{
|
||||
|
@ -1059,10 +1071,10 @@ void Y_StartIntermission(void)
|
|||
mapvisited[gamemap-1] |= MV_BEATEN;
|
||||
if (ALL7EMERALDS(emeralds))
|
||||
mapvisited[gamemap-1] |= MV_ALLEMERALDS;
|
||||
if (ultimatemode)
|
||||
/*if (ultimatemode)
|
||||
mapvisited[gamemap-1] |= MV_ULTIMATE;
|
||||
if (data.coop.gotperfbonus)
|
||||
mapvisited[gamemap-1] |= MV_PERFECT;
|
||||
mapvisited[gamemap-1] |= MV_PERFECT;*/
|
||||
|
||||
if (modeattacking == ATTACKING_RECORD)
|
||||
Y_UpdateRecordReplays();
|
||||
|
@ -1313,10 +1325,10 @@ void Y_StartIntermission(void)
|
|||
mapvisited[gamemap-1] |= MV_BEATEN;
|
||||
if (ALL7EMERALDS(emeralds))
|
||||
mapvisited[gamemap-1] |= MV_ALLEMERALDS;
|
||||
if (ultimatemode)
|
||||
/*if (ultimatemode)
|
||||
mapvisited[gamemap-1] |= MV_ULTIMATE;
|
||||
if (data.coop.gotperfbonus)
|
||||
mapvisited[gamemap-1] |= MV_PERFECT;
|
||||
mapvisited[gamemap-1] |= MV_PERFECT;*/
|
||||
|
||||
if (modeattacking == ATTACKING_RECORD)
|
||||
Y_UpdateRecordReplays();
|
||||
|
|
Loading…
Reference in a new issue