Merge branch 'master' into lua-hudlib

This commit is contained in:
Latapostrophe 2018-11-03 22:25:33 +01:00
commit 4cbc270b6d
37 changed files with 5661 additions and 909 deletions

View file

@ -3,8 +3,10 @@
# MD5 generation
set(SRB2_ASSET_ALL
${CMAKE_CURRENT_SOURCE_DIR}/srb2.srb
${CMAKE_CURRENT_SOURCE_DIR}/chars.kart
${CMAKE_CURRENT_SOURCE_DIR}/patch.dta
${CMAKE_CURRENT_SOURCE_DIR}/gfx.kart
${CMAKE_CURRENT_SOURCE_DIR}/textures.kart
${CMAKE_CURRENT_SOURCE_DIR}/chars.kart
${CMAKE_CURRENT_SOURCE_DIR}/maps.kart
${CMAKE_CURRENT_SOURCE_DIR}/sounds.kart
${CMAKE_CURRENT_SOURCE_DIR}/music.dta
@ -13,10 +15,11 @@ set(SRB2_ASSET_ALL
set(SRB2_ASSET_HASHED
srb2.srb
chars.kart
patch.dta
gfx.kart
textures.kart
chars.kart
maps.kart
sounds.kart
)
foreach(SRB2_ASSET ${SRB2_ASSET_HASHED})

View file

@ -389,11 +389,6 @@ ifdef NOPOSTPROCESSING
OPTS+=-DNOPOSTPROCESSING
endif
# srb2kart, remove before release
ifdef NOFOURPLAYER
OPTS+=-DNOFOURPLAYER
endif
OPTS:=-fno-exceptions $(OPTS)
ifdef MOBJCONSISTANCY

View file

@ -11,34 +11,48 @@
#ifdef CMAKECONFIG
#define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}"
#define ASSET_HASH_PLAYER_DTA "${SRB2_ASSET_player.dta_HASH}"
#define ASSET_HASH_RINGS_DTA "${SRB2_ASSET_rings.dta_HASH}"
#define ASSET_HASH_ZONES_DTA "${SRB2_ASSET_zones.dta_HASH}"
// Base SRB2 hashes
#define ASSET_HASH_SRB2_SRB "${SRB2_ASSET_srb2.srb_HASH}"
#ifdef USE_PATCH_DTA
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
#define ASSET_HASH_PATCH_DTA "${SRB2_ASSET_patch.dta_HASH}"
#endif
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
// SRB2Kart-specific hashes
#define ASSET_HASH_GFX_KART "${SRB2_ASSET_gfx.kart_HASH}"
#define ASSET_HASH_TEXTURES_KART "${SRB2_ASSET_textures.kart_HASH}"
#define ASSET_HASH_CHARS_KART "${SRB2_ASSET_chars.kart_HASH}"
#define ASSET_HASH_MAPS_KART "${SRB2_ASSET_maps.kart_HASH}"
#ifdef USE_PATCH_KART
#define ASSET_HASH_PATCH_KART "${SRB2_ASSET_patch.kart_HASH}"
#endif
#define CMAKE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/assets"
#define SRB2_COMP_REVISION "${SRB2_COMP_REVISION}"
#define SRB2_COMP_BRANCH "${SRB2_COMP_BRANCH}"
#define SRB2_GIT_DESCRIBE "${SRB2_GIT_DESCRIBE}"
#define SRB2_GIT_BRANCH "${SRB2_GIT_BRANCH}"
#define CMAKE_ASSETS_DIR "${CMAKE_SOURCE_DIR}/assets"
#else
/* Manually defined asset hashes for non-CMake builds - Still used in SRB2kart.
/* Manually defined asset hashes for non-CMake builds
* YYYY MM DD
* Last updated 2017 / 02 / 20
*/
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7"
#define ASSET_HASH_GFX_DTA "ff653bb9c0dcb685fb7c1c5880bcaff1"
#define ASSET_HASH_CHARS_DTA "24c2641472bc187980eedc3c86691863"
#define ASSET_HASH_MAPS_DTA "13db5d4427f568f1c8f0599f2d14a7aa"
// Base SRB2 hashes
#define ASSET_HASH_SRB2_SRB "c1b9577687f8a795104aef4600720ea7"
#ifdef USE_PATCH_DTA
#define ASSET_HASH_PATCH_DTA "dbbf8bc6121618ee3be2d5b14650429b"
#define ASSET_HASH_PATCH_DTA "dbbf8bc6121618ee3be2d5b14650429b"
#endif
// SRB2Kart-specific hashes
#define ASSET_HASH_GFX_KART "00000000000000000000000000000000"
#define ASSET_HASH_TEXTURES_KART "00000000000000000000000000000000"
#define ASSET_HASH_CHARS_KART "00000000000000000000000000000000"
#define ASSET_HASH_MAPS_KART "00000000000000000000000000000000"
#ifdef USE_PATCH_KART
#define ASSET_HASH_PATCH_KART "00000000000000000000000000000000"
#endif
#endif

View file

@ -563,6 +563,8 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
for (j = 0; j < NUMKARTSTUFF; ++j)
rsp->kartstuff[j] = LONG(players[i].kartstuff[j]); // SRB2kart
rsp->frameangle = (angle_t)LONG(players[i].frameangle); // SRB2kart
// Score is resynched in the rspfirm resync packet
rsp->health = 0; // resynched with mo health
rsp->lives = players[i].lives;
@ -576,8 +578,8 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
// Just in case Lua does something like
// modify these at runtime
// SRB2kart
rsp->kartspeed = (UINT8)LONG(players[i].kartspeed);
rsp->kartweight = (UINT8)LONG(players[i].kartweight);
rsp->kartspeed = (UINT8)players[i].kartspeed;
rsp->kartweight = (UINT8)players[i].kartweight;
//
rsp->normalspeed = (fixed_t)LONG(players[i].normalspeed);
rsp->runspeed = (fixed_t)LONG(players[i].runspeed);
@ -644,6 +646,8 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
rsp->timeshit = players[i].timeshit;
rsp->onconveyor = LONG(players[i].onconveyor);
rsp->jointime = (tic_t)LONG(players[i].jointime);
rsp->hasmo = false;
//Transfer important mo information if the player has a body.
//This lets us resync players even if they are dead.
@ -654,26 +658,26 @@ static inline void resynch_write_player(resynch_pak *rsp, const size_t i)
rsp->health = LONG(players[i].mo->health);
rsp->angle = (angle_t)LONG(players[i].mo->angle);
rsp->x = LONG(players[i].mo->x);
rsp->y = LONG(players[i].mo->y);
rsp->z = LONG(players[i].mo->z);
rsp->momx = LONG(players[i].mo->momx);
rsp->momy = LONG(players[i].mo->momy);
rsp->momz = LONG(players[i].mo->momz);
rsp->friction = LONG(players[i].mo->friction);
rsp->movefactor = LONG(players[i].mo->movefactor);
rsp->x = (fixed_t)LONG(players[i].mo->x);
rsp->y = (fixed_t)LONG(players[i].mo->y);
rsp->z = (fixed_t)LONG(players[i].mo->z);
rsp->momx = (fixed_t)LONG(players[i].mo->momx);
rsp->momy = (fixed_t)LONG(players[i].mo->momy);
rsp->momz = (fixed_t)LONG(players[i].mo->momz);
rsp->friction = (fixed_t)LONG(players[i].mo->friction);
rsp->movefactor = (fixed_t)LONG(players[i].mo->movefactor);
rsp->tics = LONG(players[i].mo->tics);
rsp->statenum = (statenum_t)LONG(players[i].mo->state-states); // :(
rsp->flags = (UINT32)LONG(players[i].mo->flags);
rsp->flags2 = (UINT32)LONG(players[i].mo->flags2);
rsp->eflags = (UINT16)SHORT(players[i].mo->eflags);
rsp->flags = LONG(players[i].mo->flags);
rsp->flags2 = LONG(players[i].mo->flags2);
rsp->radius = LONG(players[i].mo->radius);
rsp->height = LONG(players[i].mo->height);
rsp->scale = LONG(players[i].mo->scale);
rsp->destscale = LONG(players[i].mo->destscale);
rsp->scalespeed = LONG(players[i].mo->scalespeed);
rsp->radius = (fixed_t)LONG(players[i].mo->radius);
rsp->height = (fixed_t)LONG(players[i].mo->height);
rsp->scale = (fixed_t)LONG(players[i].mo->scale);
rsp->destscale = (fixed_t)LONG(players[i].mo->destscale);
rsp->scalespeed = (fixed_t)LONG(players[i].mo->scalespeed);
}
static void resynch_read_player(resynch_pak *rsp)
@ -696,6 +700,8 @@ static void resynch_read_player(resynch_pak *rsp)
for (j = 0; j < NUMKARTSTUFF; ++j)
players[i].kartstuff[j] = LONG(rsp->kartstuff[j]); // SRB2kart
players[i].frameangle = (angle_t)LONG(rsp->frameangle); // SRB2kart
// Score is resynched in the rspfirm resync packet
players[i].health = rsp->health;
players[i].lives = rsp->lives;
@ -708,8 +714,8 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].skin = LONG(rsp->skin);
// Just in case Lua does something like
// modify these at runtime
players[i].kartspeed = (UINT8)LONG(rsp->kartspeed);
players[i].kartweight = (UINT8)LONG(rsp->kartweight);
players[i].kartspeed = (UINT8)rsp->kartspeed;
players[i].kartweight = (UINT8)rsp->kartweight;
players[i].normalspeed = (fixed_t)LONG(rsp->normalspeed);
players[i].runspeed = (fixed_t)LONG(rsp->runspeed);
@ -776,6 +782,8 @@ static void resynch_read_player(resynch_pak *rsp)
players[i].timeshit = rsp->timeshit;
players[i].onconveyor = LONG(rsp->onconveyor);
players[i].jointime = (tic_t)LONG(rsp->jointime);
//We get a packet for each player in game.
if (!playeringame[i])
return;
@ -794,27 +802,30 @@ static void resynch_read_player(resynch_pak *rsp)
//At this point, the player should have a body, whether they were respawned or not.
P_UnsetThingPosition(players[i].mo);
players[i].mo->angle = (angle_t)LONG(rsp->angle);
players[i].mo->eflags = (UINT16)SHORT(rsp->eflags);
players[i].mo->flags = LONG(rsp->flags);
players[i].mo->flags2 = LONG(rsp->flags2);
players[i].mo->friction = LONG(rsp->friction);
players[i].mo->health = LONG(rsp->health);
players[i].mo->momx = LONG(rsp->momx);
players[i].mo->momy = LONG(rsp->momy);
players[i].mo->momz = LONG(rsp->momz);
players[i].mo->movefactor = LONG(rsp->movefactor);
players[i].mo->angle = (angle_t)LONG(rsp->angle);
players[i].mo->x = (fixed_t)LONG(rsp->x);
players[i].mo->y = (fixed_t)LONG(rsp->y);
players[i].mo->z = (fixed_t)LONG(rsp->z);
players[i].mo->momx = (fixed_t)LONG(rsp->momx);
players[i].mo->momy = (fixed_t)LONG(rsp->momy);
players[i].mo->momz = (fixed_t)LONG(rsp->momz);
players[i].mo->friction = (fixed_t)LONG(rsp->friction);
players[i].mo->movefactor = (fixed_t)LONG(rsp->movefactor);
players[i].mo->tics = LONG(rsp->tics);
P_SetMobjStateNF(players[i].mo, LONG(rsp->statenum));
players[i].mo->x = LONG(rsp->x);
players[i].mo->y = LONG(rsp->y);
players[i].mo->z = LONG(rsp->z);
players[i].mo->radius = LONG(rsp->radius);
players[i].mo->height = LONG(rsp->height);
P_SetMobjStateNF(players[i].mo, (statenum_t)LONG(rsp->statenum));
players[i].mo->flags = (UINT32)LONG(rsp->flags);
players[i].mo->flags2 = (UINT32)LONG(rsp->flags2);
players[i].mo->eflags = (UINT16)SHORT(rsp->eflags);
players[i].mo->radius = (fixed_t)LONG(rsp->radius);
players[i].mo->height = (fixed_t)LONG(rsp->height);
// P_SetScale is redundant for this, as all related variables are already restored properly.
players[i].mo->scale = LONG(rsp->scale);
players[i].mo->destscale = LONG(rsp->destscale);
players[i].mo->scalespeed = LONG(rsp->scalespeed);
players[i].mo->scale = (fixed_t)LONG(rsp->scale);
players[i].mo->destscale = (fixed_t)LONG(rsp->destscale);
players[i].mo->scalespeed = (fixed_t)LONG(rsp->scalespeed);
// And finally, SET THE MOBJ SKIN damn it.
players[i].mo->skin = &skins[players[i].skin];
@ -939,8 +950,7 @@ static inline void resynch_write_others(resynchend_pak *rst)
{
rst->ctfteam[i] = 0;
rst->score[i] = 0;
rst->numboxes[i] = 0;
rst->totalring[i] = 0;
rst->marescore[i] = 0;
rst->realtime[i] = 0;
rst->laps[i] = 0;
continue;
@ -950,8 +960,7 @@ static inline void resynch_write_others(resynchend_pak *rst)
rst->ingame |= (1<<i);
rst->ctfteam[i] = (INT32)LONG(players[i].ctfteam);
rst->score[i] = (UINT32)LONG(players[i].score);
rst->numboxes[i] = SHORT(players[i].numboxes);
rst->totalring[i] = SHORT(players[i].totalring);
rst->marescore[i] = (UINT32)LONG(players[i].marescore);
rst->realtime[i] = (tic_t)LONG(players[i].realtime);
rst->laps[i] = players[i].laps;
}
@ -971,8 +980,7 @@ static inline void resynch_read_others(resynchend_pak *p)
players[i].spectator = !(loc_ingame & (1<<i));
players[i].ctfteam = (INT32)LONG(p->ctfteam[i]); // no, 0 does not mean spectator, at least not in Match
players[i].score = (UINT32)LONG(p->score[i]);
players[i].numboxes = SHORT(p->numboxes[i]);
players[i].totalring = SHORT(p->totalring[i]);
players[i].marescore = (UINT32)LONG(p->marescore[i]);
players[i].realtime = (tic_t)LONG(p->realtime[i]);
players[i].laps = p->laps[i];
}
@ -993,7 +1001,8 @@ static void SV_RequireResynch(INT32 node)
resynch_delay[node] = 10; // Delay before you can fail sync again
resynch_score[node] += 200; // Add score for initial desynch
resynch_status[node] = 0xFFFFFFFF; // No players assumed synched
for (i = 0; i < MAXPLAYERS; ++i)
resynch_status[node] |= (1<<i); // No players assumed synched
resynch_inprogress[node] = true; // so we know to send a PT_RESYNCHEND after sync
// Initial setup
@ -2922,7 +2931,7 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
if (otherp >= 0) \
{ \
if (otherp != pnum) \
CONS_Printf("\x82%s\x80 left the game (Joined with \x82%s\x80)\n", player_names[otherp], player_names[pnum]); \
HU_AddChatText(va("\x82*%s left the game (Joined with %s)", player_names[otherp], player_names[pnum]), false); \
buf[0] = (UINT8)otherp; \
SendNetXCmd(XD_REMOVEPLAYER, &buf, 1); \
otherp = -1; \
@ -3242,11 +3251,11 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
D_SendPlayerConfig();
addedtogame = true;
}
if (netgame)
{
{
if (server && netgame && cv_showjoinaddress.value)
{
{
const char *address;
if (I_GetNodeAddress && (address = I_GetNodeAddress(node)) != NULL)
HU_AddChatText(va("\x82*Player %d has joined the game (node %d) (%s)", newplayernum+1, node, address), false); // merge join notification + IP to avoid clogging console/chat.
@ -3254,7 +3263,7 @@ static void Got_AddPlayer(UINT8 **p, INT32 playernum)
else
HU_AddChatText(va("\x82*Player %d has joined the game (node %d)", newplayernum+1, node), false);
}
if (server && multiplayer && motd[0] != '\0')
COM_BufAddText(va("sayto %d %s\n", newplayernum, motd));
@ -4344,7 +4353,7 @@ static INT16 Consistancy(void)
{
ret += players[i].mo->x;
ret -= players[i].mo->y;
ret += players[i].powers[pw_shield];
ret += players[i].kartstuff[k_itemtype]; // powers[pw_shield]
ret *= i+1;
}
}
@ -4421,6 +4430,47 @@ static INT16 Consistancy(void)
}
else
ret ^= 0xAAAA;
// SRB2Kart: We use hnext & hprev very extensively
if (mo->hnext)
{
ret += mo->hnext->type;
ret -= mo->hnext->x;
ret += mo->hnext->y;
ret -= mo->hnext->z;
ret += mo->hnext->momx;
ret -= mo->hnext->momy;
ret += mo->hnext->momz;
ret -= mo->hnext->angle;
ret += mo->hnext->flags;
ret -= mo->hnext->flags2;
ret += mo->hnext->eflags;
ret -= mo->hnext->state - states;
ret += mo->hnext->tics;
ret -= mo->hnext->sprite;
ret += mo->hnext->frame;
}
else
ret ^= 0x5555;
if (mo->hprev)
{
ret += mo->hprev->type;
ret -= mo->hprev->x;
ret += mo->hprev->y;
ret -= mo->hprev->z;
ret += mo->hprev->momx;
ret -= mo->hprev->momy;
ret += mo->hprev->momz;
ret -= mo->hprev->angle;
ret += mo->hprev->flags;
ret -= mo->hprev->flags2;
ret += mo->hprev->eflags;
ret -= mo->hprev->state - states;
ret += mo->hprev->tics;
ret -= mo->hprev->sprite;
ret += mo->hprev->frame;
}
else
ret ^= 0xCCCC;
ret -= mo->state - states;
ret += mo->tics;
ret -= mo->sprite;

View file

@ -166,8 +166,7 @@ typedef struct
// Resynch game scores and the like all at once
UINT32 score[MAXPLAYERS]; // Everyone's score
INT16 numboxes[MAXPLAYERS];
INT16 totalring[MAXPLAYERS];
UINT32 marescore[MAXPLAYERS]; // SRB2kart: Battle score
tic_t realtime[MAXPLAYERS];
UINT8 laps[MAXPLAYERS];
} ATTRPACK resynchend_pak;
@ -186,6 +185,7 @@ typedef struct
angle_t aiming;
INT32 currentweapon;
INT32 ringweapons;
UINT16 powers[NUMPOWERS];
INT32 kartstuff[NUMKARTSTUFF]; // SRB2kart
@ -271,6 +271,8 @@ typedef struct
UINT8 timeshit;
INT32 onconveyor;
tic_t jointime;
//player->mo stuff
UINT8 hasmo; // Boolean

View file

@ -954,6 +954,7 @@ static void IdentifyVersion(void)
// SRB2kart - Add graphics (temp) // The command for md5 checks is "W_VerifyFileMD5" - looks for ASSET_HASH_SRB2_SRB in config.h.in
D_AddFile(va(pandf,srb2waddir,"gfx.kart"));
D_AddFile(va(pandf,srb2waddir,"textures.kart"));
D_AddFile(va(pandf,srb2waddir,"chars.kart"));
D_AddFile(va(pandf,srb2waddir,"maps.kart"));
//D_AddFile(va(pandf,srb2waddir,"sounds.kart"));
@ -1234,6 +1235,7 @@ void D_SRB2Main(void)
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_PATCH_DTA); // patch.dta
#endif
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_GFX_KART); // gfx.kart
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_TEXTURES_KART); // textures.kart
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_CHARS_KART); // chars.kart
mainwads++; W_VerifyFileMD5(mainwads, ASSET_HASH_MAPS_KART); // maps.kart
mainwads++; //W_VerifyFileMD5(5, ASSET_HASH_SOUNDS_KART); -- sounds.kart - doesn't trigger modifiedgame, doesn't need an MD5...?
@ -1248,9 +1250,10 @@ void D_SRB2Main(void)
#ifdef USE_PATCH_DTA
mainwads++; // patch.dta
#endif
mainwads++; // gfx.kart
mainwads++; // gfx.kart
mainwads++; // textures.kart
mainwads++; // chars.kart
mainwads++; // maps.kart
mainwads++; // maps.kart
mainwads++; // sounds.kart
#ifdef USE_PATCH_KART
mainwads++; // patch.kart

View file

@ -3234,6 +3234,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
players[playernum].playerstate = PST_REBORN;
}
players[playernum].pflags &= ~PF_WANTSTOJOIN;
//Now that we've done our error checking and killed the player
//if necessary, put the player on the correct team/status.
if (G_TagGametype())
@ -3315,10 +3317,8 @@ static void Got_Teamchange(UINT8 **cp, INT32 playernum)
else
CONS_Printf(M_GetText("%s switched to the %c%s%c.\n"), player_names[playernum], '\x84', M_GetText("Blue Team"), '\x80');
}
else if (players[playernum].pflags & PF_WANTSTOJOIN)
players[playernum].pflags &= ~PF_WANTSTOJOIN;
else
HU_AddChatText(va("\x82*%s became a spectator.", player_names[playernum]), false);
else if (NetPacket.packet.newteam == 0)
HU_AddChatText(va("\x82*%s became a spectator.", player_names[playernum]), false); // "entered the game" text was moved to P_SpectatorJoinGame
//reset view if you are changed, or viewing someone who was changed.
if (playernum == consoleplayer || displayplayer == playernum)

View file

@ -280,6 +280,7 @@ typedef enum
k_throwdir, // Held dir of controls; 1 = forward, 0 = none, -1 = backward (was "player->heldDir")
k_lapanimation, // Used to show the lap start wing logo animation
k_laphand, // Lap hand gfx to use; 0 = none, 1 = :ok_hand:, 2 = :thumbs_up:, 3 = :thumps_down:
k_cardanimation, // Used to determine the position of some full-screen Battle Mode graphics
k_voices, // Used to stop the player saying more voices than it should
k_tauntvoices, // Used to specifically stop taunt voice spam
@ -308,6 +309,7 @@ typedef enum
k_destboostcam, // Ditto
k_timeovercam, // Camera timer for leaving behind or not
k_aizdriftstrat, // Let go of your drift while boosting? Helper for the SICK STRATZ you have just unlocked
k_brakedrift, // Helper for brake-drift spark spawning
k_itemroulette, // Used for the roulette when deciding what item to give you (was "pw_kartitem")
k_roulettetype, // Used for the roulette, for deciding type (currently only used for Battle, to give you better items from Karma items)
@ -344,6 +346,7 @@ typedef enum
k_comebackpoints, // Number of times you've bombed or gave an item to someone; once it's 3 it gets set back to 0 and you're given a bumper
k_comebackmode, // 0 = bomb, 1 = item
k_wanted, // Timer for determining WANTED status, lowers when hitting people, prevents the game turning into Camp Lazlo
k_yougotem, // "You Got Em" gfx when hitting someone as a karma player via a method that gets you back in the game instantly
NUMKARTSTUFF
} kartstufftype_t;

View file

@ -1845,6 +1845,7 @@ static actionpointer_t actionpointers[] =
{{A_RoamingShadowThinker}, "A_ROAMINGSHADOWTHINKER"}, //SRB2kart
{{A_ReaperThinker}, "A_REAPERTHINKER"}, //SRB2kart
{{A_MementosTPParticles}, "A_MEMENTOSTPPARTICLES"}, //SRB2kart
{{A_FlameParticle}, "A_FLAMEPARTICLE"}, // SRB2kart
{{A_OrbitNights}, "A_ORBITNIGHTS"},
{{A_GhostMe}, "A_GHOSTME"},
{{A_SetObjectState}, "A_SETOBJECTSTATE"},
@ -5274,6 +5275,10 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_XMASPOLE",
"S_CANDYCANE",
"S_SNOWMAN",
"S_SNOWMANHAT",
"S_LAMPPOST1",
"S_LAMPPOST2",
"S_HANGSTAR",
// Botanic Serenity's loads of scenery states
"S_BSZTALLFLOWER_RED",
@ -6247,6 +6252,9 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_DRIFTSPARK_C1",
"S_DRIFTSPARK_C2",
// Brake drift sparks
"S_BRAKEDRIFT",
// Drift Smoke
"S_DRIFTDUST1",
"S_DRIFTDUST2",
@ -6327,31 +6335,31 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_ROCKETSNEAKER_RVIBRATE",
//{ Eggman Monitor
"S_FAKEITEM1",
"S_FAKEITEM2",
"S_FAKEITEM3",
"S_FAKEITEM4",
"S_FAKEITEM5",
"S_FAKEITEM6",
"S_FAKEITEM7",
"S_FAKEITEM8",
"S_FAKEITEM9",
"S_FAKEITEM10",
"S_FAKEITEM11",
"S_FAKEITEM12",
"S_FAKEITEM13",
"S_FAKEITEM14",
"S_FAKEITEM15",
"S_FAKEITEM16",
"S_FAKEITEM17",
"S_FAKEITEM18",
"S_FAKEITEM19",
"S_FAKEITEM20",
"S_FAKEITEM21",
"S_FAKEITEM22",
"S_FAKEITEM23",
"S_FAKEITEM24",
"S_DEADFAKEITEM",
"S_EGGMANITEM1",
"S_EGGMANITEM2",
"S_EGGMANITEM3",
"S_EGGMANITEM4",
"S_EGGMANITEM5",
"S_EGGMANITEM6",
"S_EGGMANITEM7",
"S_EGGMANITEM8",
"S_EGGMANITEM9",
"S_EGGMANITEM10",
"S_EGGMANITEM11",
"S_EGGMANITEM12",
"S_EGGMANITEM13",
"S_EGGMANITEM14",
"S_EGGMANITEM15",
"S_EGGMANITEM16",
"S_EGGMANITEM17",
"S_EGGMANITEM18",
"S_EGGMANITEM19",
"S_EGGMANITEM20",
"S_EGGMANITEM21",
"S_EGGMANITEM22",
"S_EGGMANITEM23",
"S_EGGMANITEM24",
"S_EGGMANITEM_DEAD",
//}
// Banana
@ -6758,6 +6766,36 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_KARMAWHEEL", // Karma player wheels
"S_BATTLEPOINT1A", // Battle point indicators
"S_BATTLEPOINT1B",
"S_BATTLEPOINT1C",
"S_BATTLEPOINT1D",
"S_BATTLEPOINT1E",
"S_BATTLEPOINT1F",
"S_BATTLEPOINT1G",
"S_BATTLEPOINT1H",
"S_BATTLEPOINT1I",
"S_BATTLEPOINT2A",
"S_BATTLEPOINT2B",
"S_BATTLEPOINT2C",
"S_BATTLEPOINT2D",
"S_BATTLEPOINT2E",
"S_BATTLEPOINT2F",
"S_BATTLEPOINT2G",
"S_BATTLEPOINT2H",
"S_BATTLEPOINT2I",
"S_BATTLEPOINT3A",
"S_BATTLEPOINT3B",
"S_BATTLEPOINT3C",
"S_BATTLEPOINT3D",
"S_BATTLEPOINT3E",
"S_BATTLEPOINT3F",
"S_BATTLEPOINT3G",
"S_BATTLEPOINT3H",
"S_BATTLEPOINT3I",
// Thunder shield use stuff;
"S_KSPARK1", // Sparkling Radius
"S_KSPARK2",
@ -6831,6 +6869,62 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_FZSLOWSMOKE4",
"S_FZSLOWSMOKE5",
// Various plants
"S_SONICBUSH",
"S_SHRUB",
"S_TALLBUSH",
"S_AZURECITYTREE",
// Marble Zone
"S_FLAMEPARTICLE",
"S_MARBLETORCH",
"S_MARBLELIGHT",
"S_MARBLEBURNER",
// CD Special Stage
"S_CDUFO",
"S_CDUFO_DIE",
// Rusty Rig
"S_RUSTYLAMP_ORANGE",
"S_RUSTYCHAIN",
// D2 Balloon Panic
"S_BALLOON",
"S_BALLOONPOP1",
"S_BALLOONPOP2",
"S_BALLOONPOP3",
// Smokin' & Vapin' (Don't try this at home, kids!)
"S_PETSMOKE0",
"S_PETSMOKE1",
"S_PETSMOKE2",
"S_PETSMOKE3",
"S_PETSMOKE4",
"S_PETSMOKE5",
"S_VVVAPING0",
"S_VVVAPING1",
"S_VVVAPING2",
"S_VVVAPING3",
"S_VVVAPING4",
"S_VVVAPING5",
"S_VVVAPE",
// Hill Top Zone
"S_HTZTREE",
"S_HTZBUSH",
// Ports of gardens
"S_SGVINE1",
"S_SGVINE2",
"S_SGVINE3",
"S_PGTREE",
"S_PGFLOWER1",
"S_PGFLOWER2",
"S_PGFLOWER3",
"S_PGBUSH",
"S_DHPILLAR",
// Midnight Channel stuff:
"S_SPOTLIGHT", // Spotlight decoration
"S_RANDOMSHADOW", // Random Shadow. They're static and don't do nothing.
@ -6863,6 +6957,141 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_CDTREEASP",
"S_CDTREEBSP",
// Daytona Speedway
"S_PINETREE",
"S_PINETREE_SIDE",
// Egg Zeppelin
"S_EZZPROPELLER",
"S_EZZPROPELLER_BLADE",
// Desert Palace
"S_DP_PALMTREE",
// Aurora Atoll
"S_AAZTREE_SEG",
"S_AAZTREE_COCONUT",
"S_AAZTREE_LEAF",
// Barren Badlands
"S_BBZDUST1", // Dust
"S_BBZDUST2",
"S_BBZDUST3",
"S_BBZDUST4",
"S_FROGGER", // Frog badniks
"S_FROGGER_ATTACK",
"S_FROGGER_JUMP",
"S_FROGTONGUE",
"S_FROGTONGUE_JOINT",
"S_ROBRA", // Black cobra badniks
"S_ROBRA_HEAD",
"S_ROBRA_JOINT",
"S_ROBRASHELL_INSIDE",
"S_ROBRASHELL_OUTSIDE",
"S_BLUEROBRA", // Blue cobra badniks
"S_BLUEROBRA_HEAD",
"S_BLUEROBRA_JOINT",
// Eerie Grove
"S_EERIEFOG1",
"S_EERIEFOG2",
"S_EERIEFOG3",
"S_EERIEFOG4",
"S_EERIEFOG5",
// SMK ports
"S_SMK_PIPE1", // Generic pipes
"S_SMK_PIPE2",
"S_SMK_MOLE", // Donut Plains Monty Moles
"S_SMK_THWOMP", // Bowser Castle Thwomps
"S_SMK_SNOWBALL", // Vanilla Lake snowballs
"S_SMK_ICEBLOCK", // Vanilla Lake breakable ice blocks
"S_SMK_ICEBLOCK2",
"S_SMK_ICEBLOCK_DEBRIS",
"S_SMK_ICEBLOCK_DEBRIS2",
// Ezo's maps
"S_BLUEFIRE1",
"S_BLUEFIRE2",
"S_BLUEFIRE3",
"S_BLUEFIRE4",
"S_GREENFIRE1",
"S_GREENFIRE2",
"S_GREENFIRE3",
"S_GREENFIRE4",
"S_REGALCHEST",
"S_CHIMERASTATUE",
"S_DRAGONSTATUE",
"S_LIZARDMANSTATUE",
"S_PEGASUSSTATUE",
"S_ZELDAFIRE1",
"S_ZELDAFIRE2",
"S_ZELDAFIRE3",
"S_ZELDAFIRE4",
"S_GANBARETHING",
"S_GANBAREDUCK",
"S_GANBARETREE",
"S_MONOIDLE",
"S_MONOCHASE1",
"S_MONOCHASE2",
"S_MONOCHASE3",
"S_MONOCHASE4",
"S_MONOPAIN",
"S_REDZELDAFIRE1",
"S_REDZELDAFIRE2",
"S_REDZELDAFIRE3",
"S_REDZELDAFIRE4",
"S_BOWLINGPIN",
"S_BOWLINGHIT1",
"S_BOWLINGHIT2",
"S_BOWLINGHIT3",
"S_BOWLINGHIT4",
"S_ARIDTOAD",
"S_TOADHIT1",
"S_TOADHIT2",
"S_TOADHIT3",
"S_TOADHIT4",
"S_EBARRELIDLE",
"S_EBARREL1",
"S_EBARREL2",
"S_EBARREL3",
"S_EBARREL4",
"S_EBARREL5",
"S_EBARREL6",
"S_EBARREL7",
"S_EBARREL8",
"S_EBARREL9",
"S_EBARREL10",
"S_EBARREL11",
"S_EBARREL12",
"S_EBARREL13",
"S_EBARREL14",
"S_EBARREL15",
"S_EBARREL16",
"S_EBARREL17",
"S_EBARREL18",
"S_MERRYHORSE",
"S_BLUEFRUIT",
"S_ORANGEFRUIT",
"S_REDFRUIT",
"S_PINKFRUIT",
"S_ADVENTURESPIKEA1",
"S_ADVENTURESPIKEA2",
"S_ADVENTURESPIKEB1",
"S_ADVENTURESPIKEB2",
"S_ADVENTURESPIKEC1",
"S_ADVENTURESPIKEC2",
"S_BOOSTPROMPT1",
"S_BOOSTPROMPT2",
"S_BOOSTOFF1",
"S_BOOSTOFF2",
"S_BOOSTON1",
"S_BOOSTON2",
"S_LIZARDMAN",
"S_LIONMAN",
"S_MOUSEMAN1",
"S_MOUSEMAN2",
#ifdef SEENAMES
"S_NAMECHECK",
#endif
@ -7149,6 +7378,10 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_XMASPOLE",
"MT_CANDYCANE",
"MT_SNOWMAN",
"MT_SNOWMANHAT",
"MT_LAMPPOST1",
"MT_LAMPPOST2",
"MT_HANGSTAR",
// Botanic Serenity
"MT_BSZTALLFLOWER_RED",
@ -7393,12 +7626,13 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_INVULNFLASH",
"MT_WIPEOUTTRAIL",
"MT_DRIFTSPARK",
"MT_BRAKEDRIFT",
"MT_DRIFTDUST",
"MT_ROCKETSNEAKER", // Rocket sneakers
"MT_FAKESHIELD",
"MT_FAKEITEM",
"MT_EGGMANITEM", // Eggman items
"MT_EGGMANITEM_SHIELD",
"MT_BANANA", // Banana Stuff
"MT_BANANA_SHIELD",
@ -7515,8 +7749,52 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_KARMAHITBOX",
"MT_KARMAWHEEL",
"MT_BATTLEPOINT",
"MT_FZEROBOOM",
// Various plants
"MT_SONICBUSH",
"MT_SHRUB",
"MT_TALLBUSH",
"MT_AZURECITYTREE",
// Marble Zone
"MT_FLAMEPARTICLE",
"MT_MARBLETORCH",
"MT_MARBLELIGHT",
"MT_MARBLEBURNER",
// CD Special Stage
"MT_CDUFO",
// Rusty Rig
"MT_RUSTYLAMP_ORANGE",
"MT_RUSTYCHAIN",
// D2 Balloon Panic
"MT_BALLOON",
// Smokin' & Vapin' (Don't try this at home, kids!)
"MT_PETSMOKER",
"MT_PETSMOKE",
"MT_VVVAPE",
// Hill Top Zone
"MT_HTZTREE",
"MT_HTZBUSH",
// Ports of gardens
"MT_SGVINE1",
"MT_SGVINE2",
"MT_SGVINE3",
"MT_PGTREE",
"MT_PGFLOWER1",
"MT_PGFLOWER2",
"MT_PGFLOWER3",
"MT_PGBUSH",
"MT_DHPILLAR",
// Midnight Channel stuff:
"MT_SPOTLIGHT", // Spotlight Object
"MT_RANDOMSHADOW", // Random static Shadows.
@ -7537,6 +7815,83 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
"MT_CDTREEA",
"MT_CDTREEB",
// Daytona Speedway
"MT_PINETREE",
"MT_PINETREE_SIDE",
// Egg Zeppelin
"MT_EZZPROPELLER",
"MT_EZZPROPELLER_BLADE",
// Desert Palace
"MT_DP_PALMTREE",
// Aurora Atoll
"MT_AAZTREE_HELPER",
"MT_AAZTREE_SEG",
"MT_AAZTREE_COCONUT",
"MT_AAZTREE_LEAF",
// Barren Badlands
"MT_BBZDUST",
"MT_FROGGER",
"MT_FROGTONGUE",
"MT_FROGTONGUE_JOINT",
"MT_ROBRA",
"MT_ROBRA_HEAD",
"MT_ROBRA_JOINT",
"MT_BLUEROBRA",
"MT_BLUEROBRA_HEAD",
"MT_BLUEROBRA_JOINT",
// Eerie Grove
"MT_EERIEFOG",
"MT_EERIEFOGGEN",
// SMK ports
"MT_SMK_PIPE",
"MT_SMK_MOLESPAWNER",
"MT_SMK_MOLE",
"MT_SMK_THWOMP",
"MT_SMK_SNOWBALL",
"MT_SMK_ICEBLOCK",
"MT_SMK_ICEBLOCK_SIDE",
"MT_SMK_ICEBLOCK_DEBRIS",
// Ezo's maps
"MT_BLUEFIRE",
"MT_GREENFIRE",
"MT_REGALCHEST",
"MT_CHIMERASTATUE",
"MT_DRAGONSTATUE",
"MT_LIZARDMANSTATUE",
"MT_PEGASUSSTATUE",
"MT_ZELDAFIRE",
"MT_GANBARETHING",
"MT_GANBAREDUCK",
"MT_GANBARETREE",
"MT_MONOKUMA",
"MT_REDZELDAFIRE",
"MT_BOWLINGPIN",
"MT_MERRYAMBIENCE",
"MT_TWINKLECARTAMBIENCE",
"MT_EXPLODINGBARREL",
"MT_MERRYHORSE",
"MT_ARIDTOAD",
"MT_BLUEFRUIT",
"MT_ORANGEFRUIT",
"MT_REDFRUIT",
"MT_PINKFRUIT",
"MT_ADVENTURESPIKEA",
"MT_ADVENTURESPIKEB",
"MT_ADVENTURESPIKEC",
"MT_BOOSTPROMPT",
"MT_BOOSTOFF",
"MT_BOOSTON",
"MT_LIZARDMAN",
"MT_LIONMAN",
"MT_MOUSEMAN",
#ifdef SEENAMES
"MT_NAMECHECK",
#endif
@ -7867,6 +8222,7 @@ static const char *const KARTSTUFF_LIST[] = {
"THROWDIR",
"LAPANIMATION",
"LAPHAND",
"CARDANIMATION",
"VOICES",
"TAUNTVOICES",
@ -7895,6 +8251,7 @@ static const char *const KARTSTUFF_LIST[] = {
"DESTBOOSTCAM",
"TIMEOVERCAM",
"AIZDRIFTSTRAT",
"BRAKEDRIFT",
"ITEMROULETTE",
"ROULETTETYPE",
@ -7927,6 +8284,7 @@ static const char *const KARTSTUFF_LIST[] = {
"COMEBACKPOINTS",
"COMEBACKMODE",
"WANTED",
"YOUGOTEM",
};
static const char *const HUDITEMS_LIST[] = {

View file

@ -142,17 +142,17 @@ extern FILE *logstream;
#define DEVELOP // Disable this for release builds to remove excessive cheat commands and enable MD5 checking and stuff, all in one go. :3
#ifdef DEVELOP
#define VERSION 104 // Game version
#define SUBVERSION 8 // more precise version number
#define VERSION 0 // Game version
#define SUBVERSION 0 // more precise version number
#define VERSIONSTRING "Development EXE"
#define VERSIONSTRINGW "v1.4.8"
#define VERSIONSTRINGW L"Development EXE"
// most interface strings are ignored in development mode.
// we use comprevision and compbranch instead.
#else
#define VERSION 104 // Game version
#define SUBVERSION 8 // more precise version number
#define VERSIONSTRING "DevEXE v1.4.8"
#define VERSIONSTRINGW L"v1.4.8"
#define VERSION 100 // Game version
#define SUBVERSION 0 // more precise version number
#define VERSIONSTRING "Kart v1.0.0"
#define VERSIONSTRINGW L"Kart v1.0.0"
// Hey! If you change this, add 1 to the MODVERSION below!
// Otherwise we can't force updates!
#endif
@ -162,7 +162,7 @@ extern FILE *logstream;
//#define USE_PATCH_DTA
// Kart has it's own, as well.
#define USE_PATCH_KART
//#define USE_PATCH_KART
// Modification options
// If you want to take advantage of the Master Server's ability to force clients to update
@ -176,7 +176,7 @@ extern FILE *logstream;
// Please change to apply to your modification (we don't want everyone asking where your mod is on SRB2.org!).
#define UPDATE_ALERT_STRING \
"A new update is available for SRB2Kart.\n"\
"Please visit the forums on SRB2.org to download it.\n"\
"Please visit mb.srb2.org to download it.\n"\
"\n"\
"You are using version: %s\n"\
"The newest version is: %s\n"\
@ -193,7 +193,7 @@ extern FILE *logstream;
// Generally less filled with newlines, since Windows gives you lots more room to work with.
#define UPDATE_ALERT_STRING_CONSOLE \
"A new update is available for SRB2Kart.\n"\
"Please visit the forums on SRB2.org to download it.\n"\
"Please visit mb.srb2.org to download it.\n"\
"\n"\
"You are using version: %s\n"\
"The newest version is: %s\n"\
@ -211,7 +211,8 @@ extern FILE *logstream;
// The Modification ID; must be obtained from Rob ( https://mb.srb2.org/private.php?do=newpm&u=546 ).
// DO NOT try to set this otherwise, or your modification will be unplayable through the Master Server.
// "12" is the default mod ID for version 2.1
#define MODID 12
// "17" is the 2.1 Kart's mod ID
#define MODID 17
// The Modification Version, starting from 1. Do not follow your version string for this,
// it's only for detection of the version the player is using so the MS can alert them of an update.
@ -545,7 +546,6 @@ extern const char *compdate, *comptime, *comprevision, *compbranch;
#define SECTORSPECIALSAFTERTHINK
/// SRB2Kart: Camera always has noclip.
/// \note Kind of problematic. If we decide to keep this on, we'll need serious map changes.
#define NOCLIPCAM
#endif // __DOOMDEF__

View file

@ -460,6 +460,7 @@ extern tic_t wantedcalcdelay;
extern tic_t indirectitemcooldown;
extern tic_t mapreset;
extern UINT8 nospectategrief;
extern boolean thwompsactive;
extern boolean legitimateexit;
extern boolean comebackshowninfo;

View file

@ -266,6 +266,7 @@ tic_t wantedcalcdelay; // Time before it recalculates WANTED
tic_t indirectitemcooldown; // Cooldown before any more Shrink, SPB, or any other item that works indirectly is awarded
tic_t mapreset; // Map reset delay when enough players have joined an empty game
UINT8 nospectategrief; // How many players need to be in-game to eliminate last; for preventing spectate griefing
boolean thwompsactive; // Thwomps activate on lap 2
// Client-sided, unsynched variables (NEVER use in anything that needs to be synced with other players)
boolean legitimateexit; // Did this client actually finish the match?
@ -4033,6 +4034,7 @@ static void M_ForceLoadGameResponse(INT32 ch)
displayplayer = consoleplayer;
multiplayer = false;
splitscreen = 0;
SplitScreen_OnChange(); // not needed?
if (setsizeneeded)
R_ExecuteSetViewSize();
@ -4122,6 +4124,7 @@ void G_LoadGame(UINT32 slot, INT16 mapoverride)
displayplayer = consoleplayer;
multiplayer = false;
splitscreen = 0;
SplitScreen_OnChange(); // not needed?
// G_DeferedInitNew(sk_medium, G_BuildMapName(1), 0, 0, 1);
if (setsizeneeded)

View file

@ -87,7 +87,6 @@ patch_t *rmatcico;
patch_t *bmatcico;
patch_t *tagico;
patch_t *tallminus;
patch_t *iconprefix[MAXSKINS]; // minimap icons
//-------------------------------------------
// coop hud
@ -2263,94 +2262,8 @@ void HU_drawPing(INT32 x, INT32 y, INT32 ping, boolean notext)
}
//
// HU_DrawTabRankings
// HU_DrawTabRankings -- moved to k_kart.c
//
void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer, INT32 hilicol)
{
INT32 i, j, rightoffset = 240;
const UINT8 *colormap;
INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2;
//this function is designed for 9 or less score lines only
//I_Assert(scorelines <= 9); -- not today bitch, kart fixed it up
V_DrawFill(1-duptweak, 26, dupadjust-2, 1, 0); // Draw a horizontal line because it looks nice!
if (scorelines > 8)
{
V_DrawFill(160, 26, 1, 154, 0); // Draw a vertical line to separate the two sides.
V_DrawFill(1, 180, 318, 1, 0); // And a horizontal line near the bottom.
rightoffset = 156;
}
for (i = 0; i < scorelines; i++)
{
char strtime[MAXPLAYERNAME+1];
if (players[tab[i].num].spectator || !players[tab[i].num].mo)
continue; //ignore them.
if (netgame) // don't draw it offline
{
if (tab[i].num != serverplayer)
HU_drawPing(x+ 253, y+2, playerpingtable[tab[i].num], false);
}
if (scorelines > 8)
strlcpy(strtime, tab[i].name, 6);
else
STRBUFCPY(strtime, tab[i].name);
V_DrawString(x + 20, y,
((tab[i].num == whiteplayer)
? hilicol|V_ALLOWLOWERCASE
: V_ALLOWLOWERCASE),
strtime);
if (players[tab[i].num].mo->color)
{
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo->color, GTC_CACHE);
if (players[tab[i].num].mo->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, players[tab[i].num].mo->color, GTC_CACHE);
else
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo->color, GTC_CACHE);
V_DrawSmallMappedPatch(x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] > 0)
{
INT32 bumperx = x-5;
for (j = 0; j < players[tab[i].num].kartstuff[k_bumper]; j++)
{
bumperx -= 3;
V_DrawSmallMappedPatch(bumperx, y+6, 0, W_CachePatchName("K_BLNICO", PU_CACHE), colormap);
}
}
}
if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] <= 0)
V_DrawSmallScaledPatch(x-2, y-4, 0, W_CachePatchName("K_NOBLNS", PU_CACHE));
if (G_RaceGametype())
{
#define timestring(time) va("%i'%02i\"%02i", G_TicsToMinutes(time, true), G_TicsToSeconds(time), G_TicsToCentiseconds(time))
if (players[tab[i].num].exiting)
V_DrawRightAlignedString(x+rightoffset, y, hilicol, timestring(players[tab[i].num].realtime));
else if (players[tab[i].num].pflags & PF_TIMEOVER)
V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "NO CONTEST.");
else if (circuitmap)
V_DrawRightAlignedString(x+rightoffset, y, 0, va("Lap %d", tab[i].count));
#undef timestring
}
else
V_DrawRightAlignedString(x+rightoffset, y, 0, va("%u", tab[i].count));
y += 16;
if (i == 7)
{
y = 32;
x += BASEVIDWIDTH/2;
}
}
}
//
// HU_DrawTeamTabRankings
@ -2412,15 +2325,15 @@ void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, I
if (players[tab[i].num].powers[pw_super])
{
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
V_DrawSmallMappedPatch (x, y-4, 0, superprefix[players[tab[i].num].skin], colormap);
V_DrawSmallMappedPatch (x, y-4, 0, facewantprefix[players[tab[i].num].skin], colormap);
}
else
{
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
if (players[tab[i].num].health <= 0)
V_DrawSmallTranslucentMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
V_DrawSmallTranslucentMappedPatch (x, y-4, 0, facerankprefix[players[tab[i].num].skin], colormap);
else
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
V_DrawSmallMappedPatch (x, y-4, 0, facerankprefix[players[tab[i].num].skin], colormap);
}
V_DrawRightAlignedThinString(x+120, y-1, ((players[tab[i].num].health > 0) ? 0 : V_TRANSLUCENT), va("%u", tab[i].count));
if (!splitscreen)
@ -2474,13 +2387,13 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
{
colormap = colormaps;
if (players[tab[i].num].powers[pw_super])
V_DrawSmallScaledPatch (x, y-4, 0, superprefix[players[tab[i].num].skin]);
V_DrawSmallScaledPatch (x, y-4, 0, facewantprefix[players[tab[i].num].skin]);
else
{
if (players[tab[i].num].health <= 0)
V_DrawSmallTranslucentPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin]);
V_DrawSmallTranslucentPatch (x, y-4, 0, facerankprefix[players[tab[i].num].skin]);
else
V_DrawSmallScaledPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin]);
V_DrawSmallScaledPatch (x, y-4, 0, facerankprefix[players[tab[i].num].skin]);
}
}
else
@ -2488,15 +2401,15 @@ void HU_DrawDualTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scoreline
if (players[tab[i].num].powers[pw_super])
{
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
V_DrawSmallMappedPatch (x, y-4, 0, superprefix[players[tab[i].num].skin], colormap);
V_DrawSmallMappedPatch (x, y-4, 0, facewantprefix[players[tab[i].num].skin], colormap);
}
else
{
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo ? players[tab[i].num].mo->color : tab[i].color, GTC_CACHE);
if (players[tab[i].num].health <= 0)
V_DrawSmallTranslucentMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
V_DrawSmallTranslucentMappedPatch (x, y-4, 0, facerankprefix[players[tab[i].num].skin], colormap);
else
V_DrawSmallMappedPatch (x, y-4, 0, faceprefix[players[tab[i].num].skin], colormap);
V_DrawSmallMappedPatch (x, y-4, 0, facerankprefix[players[tab[i].num].skin], colormap);
}
}
@ -2730,7 +2643,7 @@ static void HU_DrawRankings(void)
tab[i].name = NULL;
tab[i].count = INT32_MAX;
if (!playeringame[i] || players[i].spectator)
if (!playeringame[i] || players[i].spectator || !players[i].mo)
continue;
numplayersingame++;
@ -2741,7 +2654,7 @@ static void HU_DrawRankings(void)
UINT8 lowestposition = MAXPLAYERS;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator || completed[i])
if (completed[i] || !playeringame[i] || players[i].spectator || !players[i].mo)
continue;
if (players[i].kartstuff[k_position] >= lowestposition)
@ -2778,7 +2691,7 @@ static void HU_DrawRankings(void)
/*if (G_GametypeHasTeams())
HU_DrawTeamTabRankings(tab, whiteplayer); //separate function for Spazzo's silly request -- gotta fix this up later
else if (scorelines > 10)*/
HU_DrawTabRankings(((scorelines > 8) ? 32 : 40), 32, tab, scorelines, whiteplayer, hilicol);
HU_DrawTabRankings(((scorelines > 8) ? 32 : 40), 33, tab, scorelines, whiteplayer, hilicol);
/*else
HU_DrawDualTabRankings(32, 32, tab, scorelines, whiteplayer);*/

View file

@ -76,7 +76,6 @@ extern patch_t *rmatcico;
extern patch_t *bmatcico;
extern patch_t *tagico;
extern patch_t *tallminus;
extern patch_t *iconprefix[MAXSKINS];
#define CHAT_BUFSIZE 64 // that's enough messages, right? We'll delete the older ones when that gets out of hand.

3027
src/info.c

File diff suppressed because it is too large Load diff

View file

@ -177,6 +177,7 @@ void A_RoamingShadowThinker(); // SRB2kart: Roaming Shadow moving + attacking pl
void A_MayonakaArrow(); //SRB2kart: midnight channel arrow sign
void A_ReaperThinker(); //SRB2kart: mementos reaper
void A_MementosTPParticles(); //SRB2kart: mementos teleporter particles. Man that's a lot of actions for my shite.
void A_FlameParticle(); // SRB2kart
void A_OrbitNights();
void A_GhostMe();
void A_SetObjectState();
@ -601,6 +602,7 @@ typedef enum sprite
SPR_KINF, // Invincibility flash
SPR_WIPD, // Wipeout dust trail
SPR_DRIF, // Drift Sparks
SPR_BDRF, // Brake drift sparks
SPR_DUST, // Drift Dust
// Kart Items
@ -651,6 +653,11 @@ typedef enum sprite
SPR_WANT,
SPR_PBOM, // player bomb
SPR_HIT1, // battle points
SPR_HIT2, // battle points
SPR_HIT3, // battle points
SPR_RETI, // player reticule
SPR_AIDU,
@ -664,6 +671,35 @@ typedef enum sprite
SPR_FZBM,
SPR_FPRT,
// Various plants
SPR_SBUS,
SPR_SHRB,
SPR_TWEE,
SPR_MARB, // Marble Zone sprites
SPR_FUFO, // CD Special Stage UFO (don't ask me why it begins with an F)
SPR_RUST, // Rusty Rig sprites
SPR_BLON, // D2 Balloon Panic
SPR_VAPE, // Volcanic Valley
// Hill Top Zone
SPR_HTZA,
SPR_HTZB,
// Ports of gardens
SPR_SGVA,
SPR_SGVB,
SPR_SGVC,
SPR_PGTR,
SPR_PGF1,
SPR_PGF2,
SPR_PGF3,
SPR_PGBH,
SPR_DPLR,
// Midnight Channel stuff:
SPR_SPTL, // Spotlight
SPR_ENM1, // Shadows (Roaming and static)
@ -679,7 +715,74 @@ typedef enum sprite
SPR_CDMO,
SPR_CDBU,
SPR_VIEW, // First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw!
// Daytona Speedway
SPR_PINE,
// Egg Zeppelin
SPR_PPLR,
// Desert Palace
SPR_DPPT,
// Aurora Atoll
SPR_AATR,
SPR_COCO,
// Barren Badlands
SPR_BDST,
SPR_FROG,
SPR_CBRA,
SPR_HOLE,
SPR_BBRA,
// Eerie Grove
SPR_EGFG,
// SMK ports
SPR_SMKP,
SPR_MTYM,
SPR_THWP,
SPR_SNOB,
SPR_ICEB,
// Ezo's maps - many single-use sprites!
SPR_CNDL,
SPR_DOCH,
SPR_DUCK,
SPR_GTRE,
SPR_CHES,
SPR_CHIM,
SPR_DRGN,
SPR_LZMN,
SPR_PGSS,
SPR_ZTCH,
SPR_MKMA,
SPR_MKMP,
SPR_RTCH,
SPR_BOWL,
SPR_BOWH,
SPR_BRRL,
SPR_BRRR,
SPR_HRSE,
SPR_TOAH,
SPR_BFRT,
SPR_OFRT,
SPR_RFRT,
SPR_PFRT,
SPR_ASPK,
SPR_HBST,
SPR_HBSO,
SPR_HBSF,
SPR_WBLZ,
SPR_WBLN,
SPR_MSMF,
// Xmas-specific sprites that don't fit aboxe
SPR_XMS4,
SPR_XMS5,
// First person view sprites; this is a sprite so that it can be replaced by a specialized MD2 draw later
SPR_VIEW,
SPR_FIRSTFREESLOT,
SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1,
@ -2136,6 +2239,10 @@ typedef enum state
S_XMASPOLE,
S_CANDYCANE,
S_SNOWMAN,
S_SNOWMANHAT,
S_LAMPPOST1,
S_LAMPPOST2,
S_HANGSTAR,
// Botanic Serenity's loads of scenery states
S_BSZTALLFLOWER_RED,
@ -3109,6 +3216,9 @@ typedef enum state
S_DRIFTSPARK_C1,
S_DRIFTSPARK_C2,
// Brake drift sparks
S_BRAKEDRIFT,
// Drift Smoke
S_DRIFTDUST1,
S_DRIFTDUST2,
@ -3189,31 +3299,31 @@ typedef enum state
S_ROCKETSNEAKER_RVIBRATE,
//{ Eggman Monitor
S_FAKEITEM1,
S_FAKEITEM2,
S_FAKEITEM3,
S_FAKEITEM4,
S_FAKEITEM5,
S_FAKEITEM6,
S_FAKEITEM7,
S_FAKEITEM8,
S_FAKEITEM9,
S_FAKEITEM10,
S_FAKEITEM11,
S_FAKEITEM12,
S_FAKEITEM13,
S_FAKEITEM14,
S_FAKEITEM15,
S_FAKEITEM16,
S_FAKEITEM17,
S_FAKEITEM18,
S_FAKEITEM19,
S_FAKEITEM20,
S_FAKEITEM21,
S_FAKEITEM22,
S_FAKEITEM23,
S_FAKEITEM24,
S_DEADFAKEITEM,
S_EGGMANITEM1,
S_EGGMANITEM2,
S_EGGMANITEM3,
S_EGGMANITEM4,
S_EGGMANITEM5,
S_EGGMANITEM6,
S_EGGMANITEM7,
S_EGGMANITEM8,
S_EGGMANITEM9,
S_EGGMANITEM10,
S_EGGMANITEM11,
S_EGGMANITEM12,
S_EGGMANITEM13,
S_EGGMANITEM14,
S_EGGMANITEM15,
S_EGGMANITEM16,
S_EGGMANITEM17,
S_EGGMANITEM18,
S_EGGMANITEM19,
S_EGGMANITEM20,
S_EGGMANITEM21,
S_EGGMANITEM22,
S_EGGMANITEM23,
S_EGGMANITEM24,
S_EGGMANITEM_DEAD,
//}
// Banana
@ -3619,7 +3729,37 @@ typedef enum state
S_PLAYERFAKE,
S_KARMAWHEEL,
S_BATTLEPOINT1A, // Battle point indicators
S_BATTLEPOINT1B,
S_BATTLEPOINT1C,
S_BATTLEPOINT1D,
S_BATTLEPOINT1E,
S_BATTLEPOINT1F,
S_BATTLEPOINT1G,
S_BATTLEPOINT1H,
S_BATTLEPOINT1I,
S_BATTLEPOINT2A,
S_BATTLEPOINT2B,
S_BATTLEPOINT2C,
S_BATTLEPOINT2D,
S_BATTLEPOINT2E,
S_BATTLEPOINT2F,
S_BATTLEPOINT2G,
S_BATTLEPOINT2H,
S_BATTLEPOINT2I,
S_BATTLEPOINT3A,
S_BATTLEPOINT3B,
S_BATTLEPOINT3C,
S_BATTLEPOINT3D,
S_BATTLEPOINT3E,
S_BATTLEPOINT3F,
S_BATTLEPOINT3G,
S_BATTLEPOINT3H,
S_BATTLEPOINT3I,
// Thunder shield use stuff;
S_KSPARK1, // Sparkling Radius
S_KSPARK2,
@ -3693,6 +3833,62 @@ typedef enum state
S_FZSLOWSMOKE4,
S_FZSLOWSMOKE5,
// Various plants
S_SONICBUSH,
S_SHRUB,
S_TALLBUSH,
S_AZURECITYTREE,
// Marble Zone
S_FLAMEPARTICLE,
S_MARBLETORCH,
S_MARBLELIGHT,
S_MARBLEBURNER,
// CD Special Stage
S_CDUFO,
S_CDUFO_DIE,
// Rusty Rig
S_RUSTYLAMP_ORANGE,
S_RUSTYCHAIN,
// D2 Balloon Panic
S_BALLOON,
S_BALLOONPOP1,
S_BALLOONPOP2,
S_BALLOONPOP3,
// Smokin' & Vapin' (Don't try this at home, kids!)
S_PETSMOKE0,
S_PETSMOKE1,
S_PETSMOKE2,
S_PETSMOKE3,
S_PETSMOKE4,
S_PETSMOKE5,
S_VVVAPING0,
S_VVVAPING1,
S_VVVAPING2,
S_VVVAPING3,
S_VVVAPING4,
S_VVVAPING5,
S_VVVAPE,
// Hill Top Zone
S_HTZTREE,
S_HTZBUSH,
// Ports of gardens
S_SGVINE1,
S_SGVINE2,
S_SGVINE3,
S_PGTREE,
S_PGFLOWER1,
S_PGFLOWER2,
S_PGFLOWER3,
S_PGBUSH,
S_DHPILLAR,
// Midnight Channel stuff:
S_SPOTLIGHT, // Spotlight decoration
S_RANDOMSHADOW, // Random Shadow. They're static and don't do nothing.
@ -3725,6 +3921,157 @@ typedef enum state
S_CDTREEASP,
S_CDTREEBSP,
// Daytona Speedway
S_PINETREE,
S_PINETREE_SIDE,
// Egg Zeppelin
S_EZZPROPELLER,
S_EZZPROPELLER_BLADE,
// Desert Palace
S_DP_PALMTREE,
// Aurora Atoll
S_AAZTREE_SEG,
S_AAZTREE_COCONUT,
S_AAZTREE_LEAF,
// Barren Badlands
S_BBZDUST1, // Dust
S_BBZDUST2,
S_BBZDUST3,
S_BBZDUST4,
S_FROGGER, // Frog badniks
S_FROGGER_ATTACK,
S_FROGGER_JUMP,
S_FROGTONGUE,
S_FROGTONGUE_JOINT,
S_ROBRA, // Black cobra badniks
S_ROBRA_HEAD,
S_ROBRA_JOINT,
S_ROBRASHELL_INSIDE,
S_ROBRASHELL_OUTSIDE,
S_BLUEROBRA, // Blue cobra badniks
S_BLUEROBRA_HEAD,
S_BLUEROBRA_JOINT,
// Eerie Grove
S_EERIEFOG1,
S_EERIEFOG2,
S_EERIEFOG3,
S_EERIEFOG4,
S_EERIEFOG5,
// SMK ports
S_SMK_PIPE1, // Generic pipes
S_SMK_PIPE2,
S_SMK_MOLE, // Donut Plains Monty Moles
S_SMK_THWOMP, // Bowser Castle Thwomps
S_SMK_SNOWBALL, // Vanilla Lake snowballs
S_SMK_ICEBLOCK, // Vanilla Lake breakable ice blocks
S_SMK_ICEBLOCK2,
S_SMK_ICEBLOCK_DEBRIS,
S_SMK_ICEBLOCK_DEBRIS2,
// Ezo's maps
S_BLUEFIRE1,
S_BLUEFIRE2,
S_BLUEFIRE3,
S_BLUEFIRE4,
S_GREENFIRE1,
S_GREENFIRE2,
S_GREENFIRE3,
S_GREENFIRE4,
S_REGALCHEST,
S_CHIMERASTATUE,
S_DRAGONSTATUE,
S_LIZARDMANSTATUE,
S_PEGASUSSTATUE,
S_ZELDAFIRE1,
S_ZELDAFIRE2,
S_ZELDAFIRE3,
S_ZELDAFIRE4,
S_GANBARETHING,
S_GANBAREDUCK,
S_GANBARETREE,
S_MONOIDLE,
S_MONOCHASE1,
S_MONOCHASE2,
S_MONOCHASE3,
S_MONOCHASE4,
S_MONOPAIN,
S_REDZELDAFIRE1,
S_REDZELDAFIRE2,
S_REDZELDAFIRE3,
S_REDZELDAFIRE4,
S_BOWLINGPIN,
S_BOWLINGHIT1,
S_BOWLINGHIT2,
S_BOWLINGHIT3,
S_BOWLINGHIT4,
S_ARIDTOAD,
S_TOADHIT1,
S_TOADHIT2,
S_TOADHIT3,
S_TOADHIT4,
S_EBARRELIDLE,
S_EBARREL1,
S_EBARREL2,
S_EBARREL3,
S_EBARREL4,
S_EBARREL5,
S_EBARREL6,
S_EBARREL7,
S_EBARREL8,
S_EBARREL9,
S_EBARREL10,
S_EBARREL11,
S_EBARREL12,
S_EBARREL13,
S_EBARREL14,
S_EBARREL15,
S_EBARREL16,
S_EBARREL17,
S_EBARREL18,
S_MERRYHORSE,
S_BLUEFRUIT,
S_ORANGEFRUIT,
S_REDFRUIT,
S_PINKFRUIT,
S_ADVENTURESPIKEA1,
S_ADVENTURESPIKEA2,
S_ADVENTURESPIKEB1,
S_ADVENTURESPIKEB2,
S_ADVENTURESPIKEC1,
S_ADVENTURESPIKEC2,
S_BOOSTPROMPT1,
S_BOOSTPROMPT2,
S_BOOSTOFF1,
S_BOOSTOFF2,
S_BOOSTON1,
S_BOOSTON2,
S_LIZARDMAN,
S_LIONMAN,
S_MOUSEMAN1,
S_MOUSEMAN2,
#ifdef SEENAMES
S_NAMECHECK,
#endif
@ -4028,6 +4375,10 @@ typedef enum mobj_type
MT_XMASPOLE,
MT_CANDYCANE,
MT_SNOWMAN,
MT_SNOWMANHAT,
MT_LAMPPOST1,
MT_LAMPPOST2,
MT_HANGSTAR,
// Botanic Serenity scenery
MT_BSZTALLFLOWER_RED,
@ -4272,12 +4623,13 @@ typedef enum mobj_type
MT_INVULNFLASH,
MT_WIPEOUTTRAIL,
MT_DRIFTSPARK,
MT_BRAKEDRIFT,
MT_DRIFTDUST,
MT_ROCKETSNEAKER,
MT_FAKESHIELD,
MT_FAKEITEM,
MT_EGGMANITEM, // Eggman items
MT_EGGMANITEM_SHIELD,
MT_BANANA, // Banana Stuff
MT_BANANA_SHIELD,
@ -4394,8 +4746,52 @@ typedef enum mobj_type
MT_KARMAHITBOX,
MT_KARMAWHEEL,
MT_BATTLEPOINT,
MT_FZEROBOOM,
// Various plants
MT_SONICBUSH,
MT_SHRUB,
MT_TALLBUSH,
MT_AZURECITYTREE,
// Marble Zone
MT_FLAMEPARTICLE,
MT_MARBLETORCH,
MT_MARBLELIGHT,
MT_MARBLEBURNER,
// CD Special Stage
MT_CDUFO,
// Rusty Rig
MT_RUSTYLAMP_ORANGE,
MT_RUSTYCHAIN,
// D2 Balloon Panic
MT_BALLOON,
// Smokin' & Vapin' (Don't try this at home, kids!)
MT_PETSMOKER,
MT_PETSMOKE,
MT_VVVAPE,
// Hill Top Zone
MT_HTZTREE,
MT_HTZBUSH,
// Ports of gardens
MT_SGVINE1,
MT_SGVINE2,
MT_SGVINE3,
MT_PGTREE,
MT_PGFLOWER1,
MT_PGFLOWER2,
MT_PGFLOWER3,
MT_PGBUSH,
MT_DHPILLAR,
// Midnight Channel stuff:
MT_SPOTLIGHT, // Spotlight Object
MT_RANDOMSHADOW, // Random static Shadows.
@ -4416,6 +4812,83 @@ typedef enum mobj_type
MT_CDTREEA,
MT_CDTREEB,
// Daytona Speedway
MT_PINETREE,
MT_PINETREE_SIDE,
// Egg Zeppelin
MT_EZZPROPELLER,
MT_EZZPROPELLER_BLADE,
// Desert Palace
MT_DP_PALMTREE,
// Aurora Atoll
MT_AAZTREE_HELPER,
MT_AAZTREE_SEG,
MT_AAZTREE_COCONUT,
MT_AAZTREE_LEAF,
// Barren Badlands
MT_BBZDUST,
MT_FROGGER,
MT_FROGTONGUE,
MT_FROGTONGUE_JOINT,
MT_ROBRA,
MT_ROBRA_HEAD,
MT_ROBRA_JOINT,
MT_BLUEROBRA,
MT_BLUEROBRA_HEAD,
MT_BLUEROBRA_JOINT,
// Eerie Grove
MT_EERIEFOG,
MT_EERIEFOGGEN,
// SMK ports
MT_SMK_PIPE,
MT_SMK_MOLESPAWNER,
MT_SMK_MOLE,
MT_SMK_THWOMP,
MT_SMK_SNOWBALL,
MT_SMK_ICEBLOCK,
MT_SMK_ICEBLOCK_SIDE,
MT_SMK_ICEBLOCK_DEBRIS,
// Ezo's maps
MT_BLUEFIRE,
MT_GREENFIRE,
MT_REGALCHEST,
MT_CHIMERASTATUE,
MT_DRAGONSTATUE,
MT_LIZARDMANSTATUE,
MT_PEGASUSSTATUE,
MT_ZELDAFIRE,
MT_GANBARETHING,
MT_GANBAREDUCK,
MT_GANBARETREE,
MT_MONOKUMA,
MT_REDZELDAFIRE,
MT_BOWLINGPIN,
MT_MERRYAMBIENCE,
MT_TWINKLECARTAMBIENCE,
MT_EXPLODINGBARREL,
MT_MERRYHORSE,
MT_ARIDTOAD,
MT_BLUEFRUIT,
MT_ORANGEFRUIT,
MT_REDFRUIT,
MT_PINKFRUIT,
MT_ADVENTURESPIKEA,
MT_ADVENTURESPIKEB,
MT_ADVENTURESPIKEC,
MT_BOOSTPROMPT,
MT_BOOSTOFF,
MT_BOOSTON,
MT_LIZARDMAN,
MT_LIONMAN,
MT_MOUSEMAN,
#ifdef SEENAMES
MT_NAMECHECK,
#endif

View file

@ -488,22 +488,22 @@ static INT32 K_KartItemOddsRace[NUMKARTRESULTS][9] =
{
//P-Odds 0 1 2 3 4 5 6 7 8
/*Sneaker*/ {20, 0, 0, 4, 6, 6, 0, 0, 0 }, // Sneaker
/*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 2, 5, 5, 0 }, // Rocket Sneaker
/*Invincibility*/ { 0, 0, 0, 0, 0, 1, 4, 6,16 }, // Invincibility
/*Rocket Sneaker*/ { 0, 0, 0, 0, 0, 1, 3, 5, 3 }, // Rocket Sneaker
/*Invincibility*/ { 0, 0, 0, 0, 0, 1, 4, 6,14 }, // Invincibility
/*Banana*/ { 0, 9, 4, 2, 1, 0, 0, 0, 0 }, // Banana
/*Eggman Monitor*/ { 0, 4, 3, 2, 0, 0, 0, 0, 0 }, // Eggman Monitor
/*Orbinaut*/ { 0, 6, 5, 3, 2, 0, 0, 0, 0 }, // Orbinaut
/*Jawz*/ { 0, 0, 3, 2, 1, 1, 0, 0, 0 }, // Jawz
/*Mine*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Mine
/*Ballhog*/ { 0, 0, 1, 2, 1, 0, 0, 0, 0 }, // Ballhog
/*Mine*/ { 0, 0, 2, 2, 1, 0, 0, 0, 0 }, // Mine
/*Ballhog*/ { 0, 0, 0, 2, 1, 0, 0, 0, 0 }, // Ballhog
/*Self-Propelled Bomb*/ { 0, 0, 1, 2, 3, 4, 2, 2, 0 }, // Self-Propelled Bomb
/*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 5, 4 }, // Grow
/*Shrink*/ { 0, 0, 0, 0, 0, 0, 1, 2, 0 }, // Shrink
/*Grow*/ { 0, 0, 0, 0, 0, 1, 3, 5, 3 }, // Grow
/*Shrink*/ { 0, 0, 0, 0, 0, 0, 0, 2, 0 }, // Shrink
/*Thunder Shield*/ { 0, 1, 2, 0, 0, 0, 0, 0, 0 }, // Thunder Shield
/*Hyudoro*/ { 0, 0, 0, 0, 1, 2, 1, 0, 0 }, // Hyudoro
/*Pogo Spring*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Pogo Spring
/*Kitchen Sink*/ { 0, 0, 0, 0, 0, 0, 0, 0, 0 }, // Kitchen Sink
/*Sneaker x3*/ { 0, 0, 0, 0, 3, 6, 6, 2, 0 }, // Sneaker x3
/*Sneaker x3*/ { 0, 0, 0, 0, 3, 7, 9, 2, 0 }, // Sneaker x3
/*Banana x3*/ { 0, 0, 1, 1, 0, 0, 0, 0, 0 }, // Banana x3
/*Banana x10*/ { 0, 0, 0, 0, 1, 0, 0, 0, 0 }, // Banana x10
/*Orbinaut x3*/ { 0, 0, 0, 1, 0, 0, 0, 0, 0 }, // Orbinaut x3
@ -1331,6 +1331,23 @@ static void K_SpawnDashDustRelease(player_t *player)
}
}
static void K_SpawnBrakeDriftSparks(player_t *player) // Be sure to update the mobj thinker case too!
{
mobj_t *sparks;
I_Assert(player != NULL);
I_Assert(player->mo != NULL);
I_Assert(!P_MobjWasRemoved(player->mo));
// Position & etc are handled in its thinker, and its spawned invisible.
// This avoids needing to dupe code if we don't need it.
sparks = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_BRAKEDRIFT);
P_SetTarget(&sparks->target, player->mo);
P_SetScale(sparks, (sparks->destscale = player->mo->scale));
K_MatchGenericExtraFlags(sparks, player->mo);
sparks->flags2 |= MF2_DONTDRAW;
}
/** \brief Calculates the respawn timer and drop-boosting
\param player player object passed from K_KartPlayerThink
@ -1785,6 +1802,32 @@ void K_DoInstashield(player_t *player)
P_SetTarget(&layerb->target, player->mo);
}
void K_SpawnBattlePoints(player_t *source, player_t *victim, UINT8 amount)
{
statenum_t st;
mobj_t *pt;
if (!source || !source->mo)
return;
if (amount == 1)
st = S_BATTLEPOINT1A;
else if (amount == 2)
st = S_BATTLEPOINT2A;
else if (amount == 3)
st = S_BATTLEPOINT3A;
else
return; // NO STATE!
pt = P_SpawnMobj(source->mo->x, source->mo->y, source->mo->z, MT_BATTLEPOINT);
P_SetTarget(&pt->target, source->mo);
P_SetMobjState(pt, st);
if (victim && victim->skincolor)
pt->color = victim->skincolor;
else
pt->color = source->skincolor;
}
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem)
{
UINT8 scoremultiply = 1;
@ -1818,6 +1861,7 @@ void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem
if (source && source->player && player != source->player)
{
P_AddPlayerScore(source->player, scoremultiply);
K_SpawnBattlePoints(source->player, player, scoremultiply);
if (!trapitem)
{
source->player->kartstuff[k_wanted] -= wantedreduce;
@ -1908,6 +1952,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
if (source && source->player && player != source->player)
{
P_AddPlayerScore(source->player, scoremultiply);
K_SpawnBattlePoints(source->player, player, scoremultiply);
source->player->kartstuff[k_wanted] -= wantedreduce;
player->kartstuff[k_wanted] -= (wantedreduce/2);
}
@ -1941,7 +1986,7 @@ void K_SquishPlayer(player_t *player, mobj_t *source)
K_CheckBumpers();
}
player->kartstuff[k_squishedtimer] = 2*TICRATE;
player->kartstuff[k_squishedtimer] = TICRATE;
player->powers[pw_flashing] = K_GetKartFlashing(player);
@ -1997,6 +2042,7 @@ void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor) // A b
if (source && source->player && player != source->player)
{
P_AddPlayerScore(source->player, scoremultiply);
K_SpawnBattlePoints(source->player, player, scoremultiply);
source->player->kartstuff[k_wanted] -= wantedreduce;
player->kartstuff[k_wanted] -= (wantedreduce/2);
}
@ -3238,9 +3284,9 @@ void K_DropHnextList(player_t *player)
dropall = false;
type = MT_SSMINE;
break;
case MT_FAKESHIELD:
case MT_EGGMANITEM_SHIELD:
orbit = false;
type = MT_FAKEITEM;
type = MT_EGGMANITEM;
break;
// intentionally do nothing
case MT_SINK_SHIELD:
@ -3508,7 +3554,7 @@ static void K_MoveHeldObjects(player_t *player)
break;
case MT_BANANA_SHIELD: // Kart trailing items
case MT_SSMINE_SHIELD:
case MT_FAKESHIELD:
case MT_EGGMANITEM_SHIELD:
case MT_SINK_SHIELD:
{
mobj_t *cur = player->mo->hnext;
@ -3631,7 +3677,7 @@ static void K_MoveHeldObjects(player_t *player)
#if 1
{
angle_t input = player->mo->angle - cur->angle;
angle_t input = player->frameangle - cur->angle;
boolean invert = (input > ANGLE_180);
if (invert)
input = InvAngle(input);
@ -3643,7 +3689,7 @@ static void K_MoveHeldObjects(player_t *player)
cur->angle = cur->angle + input;
}
#else
cur->angle = player->mo->angle;
cur->angle = player->frameangle;
#endif
angoffset = ANGLE_90 + (ANGLE_180 * num);
@ -3880,6 +3926,7 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
fast->momx = 3*player->mo->momx/4;
fast->momy = 3*player->mo->momy/4;
fast->momz = 3*player->mo->momz/4;
K_MatchGenericExtraFlags(fast, player->mo);
}
if (player->playerstate == PST_DEAD || player->kartstuff[k_respawn] > 1) // Ensure these are set correctly here
@ -4068,6 +4115,9 @@ void K_KartPlayerThink(player_t *player, ticcmd_t *cmd)
if (player->kartstuff[k_lapanimation])
player->kartstuff[k_lapanimation]--;
if (player->kartstuff[k_yougotem])
player->kartstuff[k_yougotem]--;
if (G_BattleGametype() && (player->exiting || player->kartstuff[k_comebacktimer]))
{
if (player->exiting)
@ -4455,7 +4505,8 @@ static void K_KartDrift(player_t *player, boolean onground)
if (player->kartstuff[k_spinouttimer] > 0 // banana peel
|| player->speed < FixedMul(10<<16, player->mo->scale)) // you're too slow!
{
player->kartstuff[k_drift] = player->kartstuff[k_driftcharge] = player->kartstuff[k_aizdriftstrat] = 0;
player->kartstuff[k_drift] = player->kartstuff[k_driftcharge] = 0;
player->kartstuff[k_aizdriftstrat] = player->kartstuff[k_brakedrift] = 0;
}
if ((!player->kartstuff[k_sneakertimer])
@ -4469,6 +4520,18 @@ static void K_KartDrift(player_t *player, boolean onground)
}
else if (player->kartstuff[k_aizdriftstrat] && !player->kartstuff[k_drift])
K_SpawnAIZDust(player);
if (player->kartstuff[k_drift]
&& ((player->cmd.buttons & BT_BRAKE)
|| !(player->cmd.buttons & BT_ACCELERATE))
&& P_IsObjectOnGround(player->mo))
{
if (!player->kartstuff[k_brakedrift])
K_SpawnBrakeDriftSparks(player);
player->kartstuff[k_brakedrift] = 1;
}
else
player->kartstuff[k_brakedrift] = 0;
}
//
// K_KartUpdatePosition
@ -4663,7 +4726,8 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
else if (cmd->buttons & BT_ATTACK)
player->pflags |= PF_ATTACKDOWN;
if (player && player->mo && player->mo->health > 0 && !player->spectator && !(player->exiting || mapreset) && player->kartstuff[k_spinouttimer] == 0)
if (player && player->mo && player->mo->health > 0 && !player->spectator && !(player->exiting || mapreset)
&& player->kartstuff[k_spinouttimer] == 0 && player->kartstuff[k_squishedtimer] == 0 && player->kartstuff[k_respawn] == 0)
{
// First, the really specific, finicky items that function without the item being directly in your item slot.
// Karma item dropping
@ -4678,7 +4742,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
}
else
{
newitem = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_FAKEITEM);
newitem = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EGGMANITEM);
if (player->kartstuff[k_eggmanblame] >= 0
&& player->kartstuff[k_eggmanblame] < MAXPLAYERS
&& playeringame[player->kartstuff[k_eggmanblame]]
@ -4704,7 +4768,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
// Eggman Monitor throwing
else if (ATTACK_IS_DOWN && player->kartstuff[k_eggmanheld])
{
K_ThrowKartItem(player, false, MT_FAKEITEM, -1, 0);
K_ThrowKartItem(player, false, MT_EGGMANITEM, -1, 0);
K_PlayAttackTaunt(player->mo);
player->kartstuff[k_eggmanheld] = 0;
K_UpdateHnextList(player, true);
@ -4830,7 +4894,7 @@ void K_MoveKartPlayer(player_t *player, boolean onground)
player->kartstuff[k_itemamount]--;
player->kartstuff[k_eggmanheld] = 1;
S_StartSound(player->mo, sfx_s254);
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_FAKESHIELD);
mo = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z, MT_EGGMANITEM_SHIELD);
if (mo)
{
mo->flags |= MF_NOCLIPTHING;
@ -5526,13 +5590,10 @@ static patch_t *kp_racefinish[6];
static patch_t *kp_positionnum[NUMPOSNUMS][NUMPOSFRAMES];
static patch_t *kp_winnernum[NUMPOSFRAMES];
static patch_t *kp_facenull;
static patch_t *kp_facefirst;
static patch_t *kp_facesecond;
static patch_t *kp_facethird;
static patch_t *kp_facefourth;
static patch_t *kp_facenum[MAXPLAYERS+1];
static patch_t *kp_rankbumper;
static patch_t *kp_tinybumpera, *kp_tinybumperb;
static patch_t *kp_ranknobumpers;
static patch_t *kp_battlewin;
@ -5578,6 +5639,9 @@ static patch_t *kp_lapanim_lap[7];
static patch_t *kp_lapanim_final[11];
static patch_t *kp_lapanim_number[10][3];
static patch_t *kp_lapanim_emblem;
static patch_t *kp_lapanim_hand[3];
static patch_t *kp_yougotem;
void K_LoadKartHUDGraphics(void)
{
@ -5648,14 +5712,18 @@ void K_LoadKartHUDGraphics(void)
kp_winnernum[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
}
kp_facenull = W_CachePatchName("K_PFACE0", PU_HUDGFX);
kp_facefirst = W_CachePatchName("K_PFACE1", PU_HUDGFX);
kp_facesecond = W_CachePatchName("K_PFACE2", PU_HUDGFX);
kp_facethird = W_CachePatchName("K_PFACE3", PU_HUDGFX);
kp_facefourth = W_CachePatchName("K_PFACE4", PU_HUDGFX);
sprintf(buffer, "OPPRNKxx");
for (i = 0; i <= MAXPLAYERS; i++)
{
buffer[6] = '0'+(i/10);
buffer[7] = '0'+(i%10);
kp_facenum[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
}
// Extra ranking icons
kp_rankbumper = W_CachePatchName("K_BLNICO", PU_HUDGFX);
kp_tinybumpera = W_CachePatchName("K_BLNA", PU_HUDGFX);
kp_tinybumperb = W_CachePatchName("K_BLNB", PU_HUDGFX);
kp_ranknobumpers = W_CachePatchName("K_NOBLNS", PU_HUDGFX);
// Battle graphics
@ -5797,6 +5865,15 @@ void K_LoadKartHUDGraphics(void)
}
kp_lapanim_emblem = (patch_t *) W_CachePatchName("K_LAPE00", PU_HUDGFX);
sprintf(buffer, "K_LAPH0x");
for (i = 0; i < 3; i++)
{
buffer[7] = '0'+(i+1);
kp_lapanim_hand[i] = (patch_t *) W_CachePatchName(buffer, PU_HUDGFX);
}
kp_yougotem = (patch_t *) W_CachePatchName("YOUGOTEM", PU_HUDGFX);
}
// For the item toggle menu
@ -6314,7 +6391,7 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, bo
}
V_DrawRightAlignedString(workx, worky, splitflags, targettext);
workx -= 72; //69; -- good night sweet prince
workx -= 67;
V_DrawSmallScaledPatch(workx + 4, worky, splitflags, W_CachePatchName("NEEDIT", PU_CACHE));
break;
@ -6327,7 +6404,7 @@ void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, bo
splitflags = (splitflags &~ V_HUDTRANSHALF)|V_HUDTRANS;
while (curemb--)
{
workx -= 16;
workx -= 12;
V_DrawSmallMappedPatch(workx + 4, worky, splitflags, emblempic[curemb], emblemcol[curemb]);
}
}
@ -6409,12 +6486,11 @@ static boolean K_drawKartPositionFaces(void)
// FACE_Y = 72; // 72
INT32 Y = FACE_Y+9; // +9 to offset where it's being drawn if there are more than one
INT32 i, j, ranklines;
INT32 i, j, ranklines, strank = 0;
boolean completed[MAXPLAYERS];
INT32 rankplayer[MAXPLAYERS];
INT32 bumperx, numplayersingame = 0;
UINT8 *colormap;
patch_t *localpatch = kp_facenull;
ranklines = 0;
memset(completed, 0, sizeof (completed));
@ -6440,32 +6516,62 @@ static boolean K_drawKartPositionFaces(void)
for (j = 0; j < numplayersingame; j++)
{
UINT8 lowestposition = MAXPLAYERS;
for (i = 0; i < MAXPLAYERS; i++)
{
if (playeringame[i] && completed[i] == false && players[i].mo && !players[i].spectator
&& (rankplayer[ranklines] < 0 || players[i].kartstuff[k_position] < players[rankplayer[ranklines]].kartstuff[k_position]))
{
rankplayer[ranklines] = i;
}
if (completed[i] || !playeringame[i] || players[i].spectator || !players[i].mo)
continue;
if (players[i].kartstuff[k_position] >= lowestposition)
continue;
rankplayer[ranklines] = i;
lowestposition = players[i].kartstuff[k_position];
}
i = rankplayer[ranklines];
completed[i] = true;
if (ranklines == 4)
break; // Only draw the top 4 players
if (players+i == stplyr)
strank = ranklines;
//if (ranklines == 5)
//break; // Only draw the top 5 players -- we do this a different way now...
ranklines++;
}
Y -= (9*ranklines);
if (ranklines < 5)
Y -= (9*ranklines);
else
Y -= (9*5);
for (i = 0; i < ranklines; i++)
if (G_BattleGametype() || strank <= 2) // too close to the top, or playing battle?
{
if (players[rankplayer[i]].spectator) continue; // Spectators are ignored
i = 0;
if (ranklines > 5) // could be both...
ranklines = 5;
}
else if (strank+3 > ranklines) // too close to the bottom?
{
i = ranklines - 5;
if (i < 0)
i = 0;
}
else
{
i = strank-2;
ranklines = strank+3;
}
for (; i < ranklines; i++)
{
if (!playeringame[rankplayer[i]]) continue;
if (players[rankplayer[i]].spectator) continue;
if (!players[rankplayer[i]].mo) continue;
bumperx = FACE_X+18;
bumperx = FACE_X+19;
if (players[rankplayer[i]].mo->color)
{
@ -6475,31 +6581,28 @@ static boolean K_drawKartPositionFaces(void)
else
colormap = R_GetTranslationColormap(players[rankplayer[i]].skin, players[rankplayer[i]].mo->color, GTC_CACHE);
V_DrawSmallMappedPatch(FACE_X, Y, V_HUDTRANS|V_SNAPTOLEFT, faceprefix[players[rankplayer[i]].skin], colormap);
V_DrawMappedPatch(FACE_X, Y, V_HUDTRANS|V_SNAPTOLEFT, facerankprefix[players[rankplayer[i]].skin], colormap);
if (G_BattleGametype() && players[rankplayer[i]].kartstuff[k_bumper] > 0)
{
for (j = 0; j < players[rankplayer[i]].kartstuff[k_bumper]; j++)
V_DrawMappedPatch(bumperx-2, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_tinybumpera, colormap);
for (j = 1; j < players[rankplayer[i]].kartstuff[k_bumper]; j++)
{
V_DrawSmallMappedPatch(bumperx, Y+10, V_HUDTRANS|V_SNAPTOLEFT, kp_rankbumper, colormap);
bumperx += 3;
bumperx += 5;
V_DrawMappedPatch(bumperx, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_tinybumperb, colormap);
}
}
}
// Draws the little number over the face
switch (players[rankplayer[i]].kartstuff[k_position])
{
case 1: localpatch = kp_facefirst; break;
case 2: localpatch = kp_facesecond; break;
case 3: localpatch = kp_facethird; break;
case 4: localpatch = kp_facefourth; break;
default: break;
}
if (G_BattleGametype() && players[rankplayer[i]].kartstuff[k_bumper] <= 0)
V_DrawSmallScaledPatch(FACE_X-2, Y, V_HUDTRANS|V_SNAPTOLEFT, kp_ranknobumpers);
V_DrawScaledPatch(FACE_X-4, Y-3, V_HUDTRANS|V_SNAPTOLEFT, kp_ranknobumpers);
else
V_DrawSmallScaledPatch(FACE_X, Y, V_HUDTRANS|V_SNAPTOLEFT, localpatch);
{
INT32 pos = players[rankplayer[i]].kartstuff[k_position];
if (pos < 0 || pos > MAXPLAYERS)
pos = 0;
// Draws the little number over the face
V_DrawScaledPatch(FACE_X-5, Y+10, V_HUDTRANS|V_SNAPTOLEFT, kp_facenum[pos]);
}
Y += 18;
}
@ -6507,6 +6610,103 @@ static boolean K_drawKartPositionFaces(void)
return false;
}
//
// HU_DrawTabRankings -- moved here to take advantage of kart stuff!
//
void HU_DrawTabRankings(INT32 x, INT32 y, playersort_t *tab, INT32 scorelines, INT32 whiteplayer, INT32 hilicol)
{
INT32 i, rightoffset = 240;
const UINT8 *colormap;
INT32 dupadjust = (vid.width/vid.dupx), duptweak = (dupadjust - BASEVIDWIDTH)/2;
//this function is designed for 9 or less score lines only
//I_Assert(scorelines <= 9); -- not today bitch, kart fixed it up
V_DrawFill(1-duptweak, 26, dupadjust-2, 1, 0); // Draw a horizontal line because it looks nice!
if (scorelines > 8)
{
V_DrawFill(160, 26, 1, 147, 0); // Draw a vertical line to separate the two sides.
V_DrawFill(1-duptweak, 173, dupadjust-2, 1, 0); // And a horizontal line near the bottom.
rightoffset = (BASEVIDWIDTH/2) - 4 - x;
}
for (i = 0; i < scorelines; i++)
{
char strtime[MAXPLAYERNAME+1];
if (players[tab[i].num].spectator || !players[tab[i].num].mo)
continue; //ignore them.
if (netgame // don't draw it offline
&& tab[i].num != serverplayer)
HU_drawPing(x + ((i < 8) ? -19 : rightoffset + 13), y+2, playerpingtable[tab[i].num], false);
if (scorelines > 8)
strlcpy(strtime, tab[i].name, 6);
else
STRBUFCPY(strtime, tab[i].name);
V_DrawString(x + 20, y,
((tab[i].num == whiteplayer)
? hilicol|V_ALLOWLOWERCASE
: V_ALLOWLOWERCASE),
strtime);
if (players[tab[i].num].mo->color)
{
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo->color, GTC_CACHE);
if (players[tab[i].num].mo->colorized)
colormap = R_GetTranslationColormap(TC_RAINBOW, players[tab[i].num].mo->color, GTC_CACHE);
else
colormap = R_GetTranslationColormap(players[tab[i].num].skin, players[tab[i].num].mo->color, GTC_CACHE);
V_DrawMappedPatch(x, y-4, 0, facerankprefix[players[tab[i].num].skin], colormap);
/*if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] > 0) -- not enough space for this
{
INT32 bumperx = x+19;
V_DrawMappedPatch(bumperx-2, y-4, 0, kp_tinybumpera, colormap);
for (j = 1; j < players[tab[i].num].kartstuff[k_bumper]; j++)
{
bumperx += 5;
V_DrawMappedPatch(bumperx, y-4, 0, kp_tinybumperb, colormap);
}
}*/
}
if (G_BattleGametype() && players[tab[i].num].kartstuff[k_bumper] <= 0)
V_DrawScaledPatch(x-4, y-7, 0, kp_ranknobumpers);
else
{
INT32 pos = players[tab[i].num].kartstuff[k_position];
if (pos < 0 || pos > MAXPLAYERS)
pos = 0;
// Draws the little number over the face
V_DrawScaledPatch(x-5, y+6, 0, kp_facenum[pos]);
}
if (G_RaceGametype())
{
#define timestring(time) va("%i'%02i\"%02i", G_TicsToMinutes(time, true), G_TicsToSeconds(time), G_TicsToCentiseconds(time))
if (players[tab[i].num].exiting)
V_DrawRightAlignedString(x+rightoffset, y, hilicol, timestring(players[tab[i].num].realtime));
else if (players[tab[i].num].pflags & PF_TIMEOVER)
V_DrawRightAlignedThinString(x+rightoffset, y-1, 0, "NO CONTEST.");
else if (circuitmap)
V_DrawRightAlignedString(x+rightoffset, y, 0, va("Lap %d", tab[i].count));
#undef timestring
}
else
V_DrawRightAlignedString(x+rightoffset, y, 0, va("%u", tab[i].count));
y += 18;
if (i == 7)
{
y = 33;
x = (BASEVIDWIDTH/2) + 4;
}
}
}
static void K_drawKartLaps(void)
{
INT32 splitflags = K_calcSplitFlags(V_SNAPTOBOTTOM|V_SNAPTOLEFT);
@ -6645,7 +6845,7 @@ static void K_drawKartWanted(void)
for (i = 0; i < numwanted; i++)
{
INT32 x = WANT_X+7, y = WANT_Y+20;
INT32 x = WANT_X+8, y = WANT_Y+21;
fixed_t scale = FRACUNIT/2;
player_t *p = &players[battlewanted[i]];
@ -6653,24 +6853,19 @@ static void K_drawKartWanted(void)
break;
if (numwanted == 1)
{
x++; //y++;
scale = FRACUNIT;
}
else
{
if (i & 1)
x += 18;
x += 16;
if (i > 1)
y += 17;
y += 16;
}
if (players[battlewanted[i]].skincolor == 0)
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, V_HUDTRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM, faceprefix[p->skin], NULL);
else
if (players[battlewanted[i]].skincolor)
{
colormap = R_GetTranslationColormap(TC_RAINBOW, p->skincolor, GTC_CACHE);
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, scale, V_HUDTRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM, faceprefix[p->skin], colormap);
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, V_HUDTRANS|V_SNAPTORIGHT|V_SNAPTOBOTTOM, (scale == FRACUNIT ? facewantprefix[p->skin] : facerankprefix[p->skin]), colormap);
}
}
}
@ -6725,35 +6920,6 @@ static void K_drawKartPlayerCheck(void)
}
}
void K_LoadIconGraphics(char *facestr, INT32 skinnum)
{
char namelump[9];
// hack: make sure base face name is no more than 8 chars
if (strlen(facestr) > 8)
facestr[8] = '\0';
strcpy(namelump, facestr); // copy base name
iconprefix[skinnum] = W_CachePatchName(namelump, PU_HUDGFX);
iconfreed[skinnum] = false;
}
#if 0 //unused
static void K_UnLoadIconGraphics(INT32 skinnum)
{
Z_Free(iconprefix[skinnum]);
iconfreed[skinnum] = true;
}
#endif
void K_ReloadSkinIconGraphics(void)
{
INT32 i;
for (i = 0; i < numskins; i++)
K_LoadIconGraphics(skins[i].iconprefix, i);
}
static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags, patch_t *AutomapPic)
{
// amnum xpos & ypos are the icon's speed around the HUD.
@ -6820,18 +6986,18 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags, pat
if (encoremode)
amnumxpos = -amnumxpos;
amxpos = amnumxpos + ((x + AutomapPic->width/2 - (iconprefix[skin]->width/2))<<FRACBITS);
amypos = amnumypos + ((y + AutomapPic->height/2 - (iconprefix[skin]->height/2))<<FRACBITS);
amxpos = amnumxpos + ((x + AutomapPic->width/2 - (facemmapprefix[skin]->width/2))<<FRACBITS);
amypos = amnumypos + ((y + AutomapPic->height/2 - (facemmapprefix[skin]->height/2))<<FRACBITS);
// do we want this? it feels unnecessary. easier to just modify the amnumxpos?
/*if (encoremode)
{
flags |= V_FLIP;
amxpos = -amnumxpos + ((x + AutomapPic->width/2 + (iconprefix[skin]->width/2))<<FRACBITS);
amxpos = -amnumxpos + ((x + AutomapPic->width/2 + (facemmapprefix[skin]->width/2))<<FRACBITS);
}*/
if (!mo->color) // 'default' color
V_DrawSciencePatch(amxpos, amypos, flags, iconprefix[skin], FRACUNIT);
V_DrawSciencePatch(amxpos, amypos, flags, facemmapprefix[skin], FRACUNIT);
else
{
UINT8 *colormap;
@ -6839,7 +7005,7 @@ static void K_drawKartMinimapHead(mobj_t *mo, INT32 x, INT32 y, INT32 flags, pat
colormap = R_GetTranslationColormap(TC_RAINBOW, mo->color, 0);
else
colormap = R_GetTranslationColormap(skin, mo->color, 0);
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, iconprefix[skin], colormap);
V_DrawFixedPatch(amxpos, amypos, FRACUNIT, flags, facemmapprefix[skin], colormap);
}
}
@ -6980,25 +7146,30 @@ static void K_drawKartFinish(void)
if ((stplyr->kartstuff[k_cardanimation] % (2*5)) / 5) // blink
pnum = 1;
if (splitscreen > 1) // small splitscreen
pnum += 2;
else if (splitscreen == 1) // wide splitscreen
pnum += 4;
if (splitscreen > 1) // Stationary FIN
V_DrawScaledPatch(STCD_X - (SHORT(kp_racefinish[pnum]->width)/2), STCD_Y - (SHORT(kp_racefinish[pnum]->height)/2), splitflags, kp_racefinish[pnum]);
else // Scrolling FINISH
if (splitscreen > 1) // 3/4p, stationary FIN
{
INT32 scaleshift = (FRACBITS - splitscreen); // FRACUNIT or FRACUNIT/2
INT32 x = ((vid.width<<FRACBITS)/vid.dupx), xval = (SHORT(kp_racefinish[pnum]->width)<<scaleshift);
pnum += 2;
V_DrawScaledPatch(STCD_X - (SHORT(kp_racefinish[pnum]->width)/2), STCD_Y - (SHORT(kp_racefinish[pnum]->height)/2), splitflags, kp_racefinish[pnum]);
return;
}
//else -- 1/2p, scrolling FINISH
{
INT32 x, xval;
if (splitscreen) // wide splitscreen
pnum += 4;
x = ((vid.width<<FRACBITS)/vid.dupx);
xval = (SHORT(kp_racefinish[pnum]->width)<<FRACBITS);
x = ((TICRATE - stplyr->kartstuff[k_cardanimation])*(xval > x ? xval : x))/TICRATE;
if (splitscreen && stplyr == &players[secondarydisplayplayer])
x = -x;
V_DrawFixedPatch(x + (STCD_X<<FRACBITS) - (SHORT(kp_racefinish[pnum]->width)<<(scaleshift-1)),
(STCD_Y<<FRACBITS) - (SHORT(kp_racefinish[pnum]->height)<<(scaleshift-1)),
(1<<scaleshift),
V_DrawFixedPatch(x + (STCD_X<<FRACBITS) - (xval>>1),
(STCD_Y<<FRACBITS) - (SHORT(kp_racefinish[pnum]->height)<<(FRACBITS-1)),
FRACUNIT,
splitflags, kp_racefinish[pnum], NULL);
}
}
@ -7382,41 +7553,57 @@ static void K_drawLapStartAnim(void)
{
// This is an EVEN MORE insanely complicated animation.
const UINT8 progress = 80-stplyr->kartstuff[k_lapanimation];
UINT8 *colormap = R_GetTranslationColormap(TC_DEFAULT, stplyr->skincolor, 0);
V_DrawScaledPatch(BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)),
56 - (32*max(0, progress-76)),
0, kp_lapanim_emblem);
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
(48 - (32*max(0, progress-76)))*FRACUNIT,
FRACUNIT, V_HUDTRANS,
kp_lapanim_emblem, colormap);
if (stplyr->kartstuff[k_laphand] >= 1 && stplyr->kartstuff[k_laphand] <= 3)
{
V_DrawFixedPatch((BASEVIDWIDTH/2 + (32*max(0, stplyr->kartstuff[k_lapanimation]-76)))*FRACUNIT,
(48 - (32*max(0, progress-76))
+ 4 - abs((leveltime % 8) - 4))*FRACUNIT,
FRACUNIT, V_HUDTRANS,
kp_lapanim_hand[stplyr->kartstuff[k_laphand]-1], NULL);
}
if (stplyr->laps == (UINT8)(cv_numlaps.value - 1))
{
V_DrawScaledPatch(27 - (32*max(0, progress-76)),
32,
0, kp_lapanim_final[min(progress/2, 10)]);
V_DrawFixedPatch((62 - (32*max(0, progress-76)))*FRACUNIT, // 27
(-6)*FRACUNIT, // 24
FRACUNIT, V_HUDTRANS,
kp_lapanim_final[min(progress/2, 10)], NULL);
if (progress/2-12 >= 0)
{
V_DrawScaledPatch(194 + (32*max(0, progress-76)),
32,
0, kp_lapanim_lap[min(progress/2-12, 6)]);
V_DrawFixedPatch((188 + (32*max(0, progress-76)))*FRACUNIT, // 194
(-6)*FRACUNIT, // 24
FRACUNIT, V_HUDTRANS,
kp_lapanim_lap[min(progress/2-12, 6)], NULL);
}
}
else
{
V_DrawScaledPatch(61 - (32*max(0, progress-76)),
32,
0, kp_lapanim_lap[min(progress/2, 6)]);
V_DrawFixedPatch((82 - (32*max(0, progress-76)))*FRACUNIT, // 61
(-6)*FRACUNIT, // 24
FRACUNIT, V_HUDTRANS,
kp_lapanim_lap[min(progress/2, 6)], NULL);
if (progress/2-8 >= 0)
{
V_DrawScaledPatch(194 + (32*max(0, progress-76)),
32,
0, kp_lapanim_number[(((UINT32)stplyr->laps+1) / 10)][min(progress/2-8, 2)]);
V_DrawFixedPatch((188 + (32*max(0, progress-76)))*FRACUNIT, // 194
(-6)*FRACUNIT, // 24
FRACUNIT, V_HUDTRANS,
kp_lapanim_number[(((UINT32)stplyr->laps+1) / 10)][min(progress/2-8, 2)], NULL);
if (progress/2-10 >= 0)
{
V_DrawScaledPatch(221 + (32*max(0, progress-76)),
32,
0, kp_lapanim_number[(((UINT32)stplyr->laps+1) % 10)][min(progress/2-10, 2)]);
V_DrawFixedPatch((208 + (32*max(0, progress-76)))*FRACUNIT, // 221
(-6)*FRACUNIT, // 24
FRACUNIT, V_HUDTRANS,
kp_lapanim_number[(((UINT32)stplyr->laps+1) % 10)][min(progress/2-10, 2)], NULL);
}
}
}
@ -7698,6 +7885,9 @@ void K_drawKartHUD(void)
K_drawLapStartAnim();
}
if (G_BattleGametype() && !splitscreen && (stplyr->kartstuff[k_yougotem] % 2)) // * YOU GOT EM *
V_DrawScaledPatch(BASEVIDWIDTH/2 - (SHORT(kp_yougotem->width)/2), 32, V_HUDTRANS, kp_yougotem);
// Draw FREE PLAY.
if (isfreeplay && !stplyr->spectator && timeinmap > 113)
K_drawKartFreePlay(leveltime);

View file

@ -27,6 +27,7 @@ void K_KartMoveAnimation(player_t *player);
void K_KartPlayerThink(player_t *player, ticcmd_t *cmd);
void K_KartPlayerAfterThink(player_t *player);
void K_DoInstashield(player_t *player);
void K_SpawnBattlePoints(player_t *source, player_t *victim, UINT8 amount);
void K_SpinPlayer(player_t *player, mobj_t *source, INT32 type, boolean trapitem);
void K_SquishPlayer(player_t *player, mobj_t *source);
void K_ExplodePlayer(player_t *player, mobj_t *source, mobj_t *inflictor);
@ -67,8 +68,6 @@ fixed_t K_FindCheckX(fixed_t px, fixed_t py, angle_t ang, fixed_t mx, fixed_t my
void K_drawKartHUD(void);
void K_drawKartFreePlay(UINT32 flashtime);
void K_drawKartTimestamp(tic_t drawtime, INT32 TX, INT32 TY, INT16 emblemmap, boolean playing);
void K_LoadIconGraphics(char *facestr, INT32 skinnum);
void K_ReloadSkinIconGraphics(void);
// =========================================================================
#endif // __K_KART__

View file

@ -2109,6 +2109,20 @@ static int lib_kDoInstashield(lua_State *L)
return 0;
}
static int lib_kSpawnBattlePoints(lua_State *L)
{
player_t *source = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
player_t *victim = *((player_t **)luaL_checkudata(L, 2, META_PLAYER));
UINT8 amount = (UINT8)luaL_checkinteger(L, 3);
NOHUD
if (!source)
return LUA_ErrInvalid(L, "player_t");
if (!victim)
return LUA_ErrInvalid(L, "player_t");
K_SpawnBattlePoints(source, victim, amount);
return 0;
}
static int lib_kSpinPlayer(lua_State *L)
{
player_t *player = *((player_t **)luaL_checkudata(L, 1, META_PLAYER));
@ -2500,6 +2514,7 @@ static luaL_Reg lib[] = {
{"K_KartBouncing",lib_kKartBouncing},
{"K_MatchGenericExtraFlags",lib_kMatchGenericExtraFlags},
{"K_DoInstashield",lib_kDoInstashield},
{"K_SpawnBattlePoints",lib_kSpawnBattlePoints},
{"K_SpinPlayer",lib_kSpinPlayer},
{"K_SquishPlayer",lib_kSquishPlayer},
{"K_ExplodePlayer",lib_kExplodePlayer},

View file

@ -27,9 +27,9 @@ enum skin {
skin_flags,
skin_realname,
skin_hudname,
skin_charsel,
skin_face,
skin_superface,
skin_facerank,
skin_facewant,
skin_facemmap,
skin_ability,
skin_ability2,
skin_thokitem,
@ -61,9 +61,9 @@ static const char *const skin_opt[] = {
"flags",
"realname",
"hudname",
"charsel",
"face",
"superface",
"facerank",
"facewant",
"facemmap",
"ability",
"ability2",
"thokitem",
@ -121,23 +121,23 @@ static int skin_get(lua_State *L)
case skin_hudname:
lua_pushstring(L, skin->hudname);
break;
case skin_charsel:
case skin_facerank:
for (i = 0; i < 8; i++)
if (!skin->charsel[i])
if (!skin->facerank[i])
break;
lua_pushlstring(L, skin->charsel, i);
lua_pushlstring(L, skin->facerank, i);
break;
case skin_face:
case skin_facewant:
for (i = 0; i < 8; i++)
if (!skin->face[i])
if (!skin->facewant[i])
break;
lua_pushlstring(L, skin->face, i);
lua_pushlstring(L, skin->facewant, i);
break;
case skin_superface:
case skin_facemmap:
for (i = 0; i < 8; i++)
if (!skin->superface[i])
if (!skin->facemmap[i])
break;
lua_pushlstring(L, skin->superface, i);
lua_pushlstring(L, skin->facemmap, i);
break;
case skin_ability:
lua_pushinteger(L, skin->ability);

View file

@ -33,64 +33,64 @@ conditionset_t conditionSets[MAXCONDITIONSETS];
emblem_t emblemlocations[MAXEMBLEMS] =
{
// SILVER TIME TROPHIES
{ET_TIME, 0,0,0, 1, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // Green Hills Zone - Time: 1:30
{ET_TIME, 0,0,0, 2, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Pipe Speedway Zone - Time: 1:50
{ET_TIME, 0,0,0, 3, 'T', SKINCOLOR_GREY, 135*TICRATE, "", 0}, // Dark Race - 2:15
{ET_TIME, 0,0,0, 4, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Darkvile Garden Zone - 1:45
{ET_TIME, 0,0,0, 5, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Northern District Zone - 2:20
{ET_TIME, 0,0,0, 6, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Sonic Speedway Zone - 2:00
{ET_TIME, 0,0,0, 7, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Egg Zeppelin Zone - 2:00
{ET_TIME, 0,0,0, 8, 'T', SKINCOLOR_GREY, 95*TICRATE, "", 0}, // Hill Top Zone - 1:35
{ET_TIME, 0,0,0, 9, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Sunbeam Paradise Zone - 1:50
{ET_TIME, 0,0,0, 10, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Diamond Square Zone - 1:50
{ET_TIME, 0,0,0, 11, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // Misty Maze Zone - 2:30
{ET_TIME, 0,0,0, 12, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Midnight Meadow Zone - 2:00
{ET_TIME, 0,0,0, 13, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Megablock Castle Zone - 2:10
{ET_TIME, 0,0,0, 14, 'T', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // Sub-Zero Peak Zone - 2:30
{ET_TIME, 0,0,0, 15, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Sapphire Coast Zone - 1:50
{ET_TIME, 0,0,0, 16, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Silvercloud Island Zone - 2:20
{ET_TIME, 0,0,0, 17, 'T', SKINCOLOR_GREY, 135*TICRATE, "", 0}, // Petroleum Refinery Zone - 2:15
{ET_TIME, 0,0,0, 18, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Canyon Rush Zone - 2:10
{ET_TIME, 0,0,0, 19, 'T', SKINCOLOR_GREY, 160*TICRATE, "", 0}, // Blue Mountain Zone - 2:40
{ET_TIME, 0,0,0, 20, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Casino Resort Zone - 1:50
{ET_TIME, 0,0,0, 21, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Desert Palace Zone - 1:45
{ET_TIME, 0,0,0, 22, 'T', SKINCOLOR_GREY, 165*TICRATE, "", 0}, // Red Barrage Area - 2:45
{ET_TIME, 0,0,0, 23, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Vanilla Hotel Zone - 1:45
{ET_TIME, 0,0,0, 24, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Twinkle Cart - 1:50
{ET_TIME, 0,0,0, 25, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Pleasure Castle - 1:50
{ET_TIME, 0,0,0, 26, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Aurora Atoll Zone - 2:20
{ET_TIME, 0,0,0, 27, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Barren Badlands Zone - 2:10
{ET_TIME, 0,0,0, 28, 'T', SKINCOLOR_GREY, 155*TICRATE, "", 0}, // Toxic Palace Zone - 2:35
{ET_TIME, 0,0,0, 29, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Ancient Tomb Zone - 2:10
{ET_TIME, 0,0,0, 30, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Cloud Cradle Zone K - 2:00
{ET_TIME, 0,0,0, 31, 'T', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Kodachrome Void Zone - 1:50
{ET_TIME, 0,0,0, 32, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Egg Quarters - 2:20
{ET_TIME, 0,0,0, 33, 'T', SKINCOLOR_GREY, 115*TICRATE, "", 0}, // Boiling Bedrock Zone - 1:55
{ET_TIME, 0,0,0, 34, 'T', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Virtual Highway Zone - 2:20
{ET_TIME, 0,0,0, 35, 'T', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Eggman's Nightclub Zone - 2:00
{ET_TIME, 0,0,0, 36, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // KKR Ganbare Dochu 2 - 1:30
{ET_TIME, 0,0,0, 37, 'T', SKINCOLOR_GREY, 80*TICRATE, "", 0}, // CK Chao Circuit 1 - 1:20
{ET_TIME, 0,0,0, 38, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // CK Chao Circuit 2 - 2:10
{ET_TIME, 0,0,0, 39, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // CK Cloud Tops 2 - 1:40
{ET_TIME, 0,0,0, 40, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // CK Regal Raceway - 2:10
{ET_TIME, 0,0,0, 41, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // SM Dimension Heist - 2:10
{ET_TIME, 0,0,0, 42, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // SRB2 Frozen Night - 1:40
{ET_TIME, 0,0,0, 43, 'T', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // MKSC Sky Garden - 1:40
{ET_TIME, 0,0,0, 44, 'T', SKINCOLOR_GREY, 95*TICRATE, "", 0}, // MKDS Peach Gardens - 1:35
{ET_TIME, 0,0,0, 45, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // MKSC Rainbow Road - 1:45
{ET_TIME, 0,0,0, 46, 'T', SKINCOLOR_GREY, 70*TICRATE, "", 0}, // SMK Mario Circuit 1 - 1:10
{ET_TIME, 0,0,0, 47, 'T', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // SMK Donut Plains 1 - 1:30
{ET_TIME, 0,0,0, 48, 'T', SKINCOLOR_GREY, 75*TICRATE, "", 0}, // SMK Ghost Valley 2 - 1:15
{ET_TIME, 0,0,0, 49, 'T', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // SMK Mario Circuit 3 - 1:45
{ET_TIME, 0,0,0, 50, 'T', SKINCOLOR_GREY, 130*TICRATE, "", 0} // SMK Rainbow Road - 2:10
{ET_TIME, 0,0,0, 1, 'B', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // Green Hills Zone - Time: 1:30
{ET_TIME, 0,0,0, 2, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Pipe Speedway Zone - Time: 1:50
{ET_TIME, 0,0,0, 3, 'B', SKINCOLOR_GREY, 135*TICRATE, "", 0}, // Dark Race - 2:15
{ET_TIME, 0,0,0, 4, 'B', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Darkvile Garden Zone - 1:45
{ET_TIME, 0,0,0, 5, 'B', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Northern District Zone - 2:20
{ET_TIME, 0,0,0, 6, 'B', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Sonic Speedway Zone - 2:00
{ET_TIME, 0,0,0, 7, 'B', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Egg Zeppelin Zone - 2:00
{ET_TIME, 0,0,0, 8, 'B', SKINCOLOR_GREY, 95*TICRATE, "", 0}, // Hill Top Zone - 1:35
{ET_TIME, 0,0,0, 9, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Sunbeam Paradise Zone - 1:50
{ET_TIME, 0,0,0, 10, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Diamond Square Zone - 1:50
{ET_TIME, 0,0,0, 11, 'B', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // Misty Maze Zone - 2:30
{ET_TIME, 0,0,0, 12, 'B', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Midnight Meadow Zone - 2:00
{ET_TIME, 0,0,0, 13, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Megablock Castle Zone - 2:10
{ET_TIME, 0,0,0, 14, 'B', SKINCOLOR_GREY, 150*TICRATE, "", 0}, // Sub-Zero Peak Zone - 2:30
{ET_TIME, 0,0,0, 15, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Sapphire Coast Zone - 1:50
{ET_TIME, 0,0,0, 16, 'B', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Silvercloud Island Zone - 2:20
{ET_TIME, 0,0,0, 17, 'B', SKINCOLOR_GREY, 135*TICRATE, "", 0}, // Petroleum Refinery Zone - 2:15
{ET_TIME, 0,0,0, 18, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Canyon Rush Zone - 2:10
{ET_TIME, 0,0,0, 19, 'B', SKINCOLOR_GREY, 160*TICRATE, "", 0}, // Blue Mountain Zone - 2:40
{ET_TIME, 0,0,0, 20, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Casino Resort Zone - 1:50
{ET_TIME, 0,0,0, 21, 'B', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Desert Palace Zone - 1:45
{ET_TIME, 0,0,0, 22, 'B', SKINCOLOR_GREY, 165*TICRATE, "", 0}, // Red Barrage Area - 2:45
{ET_TIME, 0,0,0, 23, 'B', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // Vanilla Hotel Zone - 1:45
{ET_TIME, 0,0,0, 24, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Twinkle Cart - 1:50
{ET_TIME, 0,0,0, 25, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Pleasure Castle - 1:50
{ET_TIME, 0,0,0, 26, 'B', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Aurora Atoll Zone - 2:20
{ET_TIME, 0,0,0, 27, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Barren Badlands Zone - 2:10
{ET_TIME, 0,0,0, 28, 'B', SKINCOLOR_GREY, 155*TICRATE, "", 0}, // Toxic Palace Zone - 2:35
{ET_TIME, 0,0,0, 29, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // Ancient Tomb Zone - 2:10
{ET_TIME, 0,0,0, 30, 'B', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Cloud Cradle Zone K - 2:00
{ET_TIME, 0,0,0, 31, 'B', SKINCOLOR_GREY, 110*TICRATE, "", 0}, // Kodachrome Void Zone - 1:50
{ET_TIME, 0,0,0, 32, 'B', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Egg Quarters - 2:20
{ET_TIME, 0,0,0, 33, 'B', SKINCOLOR_GREY, 115*TICRATE, "", 0}, // Boiling Bedrock Zone - 1:55
{ET_TIME, 0,0,0, 34, 'B', SKINCOLOR_GREY, 140*TICRATE, "", 0}, // Virtual Highway Zone - 2:20
{ET_TIME, 0,0,0, 35, 'B', SKINCOLOR_GREY, 120*TICRATE, "", 0}, // Eggman's Nightclub Zone - 2:00
{ET_TIME, 0,0,0, 36, 'B', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // KKR Ganbare Dochu 2 - 1:30
{ET_TIME, 0,0,0, 37, 'B', SKINCOLOR_GREY, 80*TICRATE, "", 0}, // CK Chao Circuit 1 - 1:20
{ET_TIME, 0,0,0, 38, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // CK Chao Circuit 2 - 2:10
{ET_TIME, 0,0,0, 39, 'B', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // CK Cloud Tops 2 - 1:40
{ET_TIME, 0,0,0, 40, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // CK Regal Raceway - 2:10
{ET_TIME, 0,0,0, 41, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0}, // SM Dimension Heist - 2:10
{ET_TIME, 0,0,0, 42, 'B', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // SRB2 Frozen Night - 1:40
{ET_TIME, 0,0,0, 43, 'B', SKINCOLOR_GREY, 100*TICRATE, "", 0}, // MKSC Sky Garden - 1:40
{ET_TIME, 0,0,0, 44, 'B', SKINCOLOR_GREY, 95*TICRATE, "", 0}, // MKDS Peach Gardens - 1:35
{ET_TIME, 0,0,0, 45, 'B', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // MKSC Rainbow Road - 1:45
{ET_TIME, 0,0,0, 46, 'B', SKINCOLOR_GREY, 70*TICRATE, "", 0}, // SMK Mario Circuit 1 - 1:10
{ET_TIME, 0,0,0, 47, 'B', SKINCOLOR_GREY, 90*TICRATE, "", 0}, // SMK Donut Plains 1 - 1:30
{ET_TIME, 0,0,0, 48, 'B', SKINCOLOR_GREY, 75*TICRATE, "", 0}, // SMK Ghost Valley 2 - 1:15
{ET_TIME, 0,0,0, 49, 'B', SKINCOLOR_GREY, 105*TICRATE, "", 0}, // SMK Mario Circuit 3 - 1:45
{ET_TIME, 0,0,0, 50, 'B', SKINCOLOR_GREY, 130*TICRATE, "", 0} // SMK Rainbow Road - 2:10
// GOLD DEV TIME TROPHIES
// ...none yet!
// ...none yet! uses 'A'
};
// Default Extra Emblems
extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
{
{"Experienced Driver", "Play 100 Matches", 10, 'X', SKINCOLOR_BLUE, 0},
{"Experienced Driver", "Play 100 Matches", 10, 'C', SKINCOLOR_RED, 0},
};
// Default Unlockables

View file

@ -151,8 +151,8 @@ description_t description[32] =
{"???", "", ""},
{"???", "", ""}
};
static char *char_notes = NULL;
static fixed_t char_scroll = 0;
//static char *char_notes = NULL;
//static fixed_t char_scroll = 0;
boolean menuactive = false;
boolean fromlevelselect = false;
@ -173,7 +173,7 @@ static char joystickInfo[8][25];
static UINT32 serverlistpage;
#endif
static saveinfo_t savegameinfo[MAXSAVEGAMES]; // Extra info about the save games.
//static saveinfo_t savegameinfo[MAXSAVEGAMES]; // Extra info about the save games.
INT16 startmap; // Mario, NiGHTS, or just a plain old normal game?
@ -219,10 +219,10 @@ menu_t SPauseDef;
//static void M_CustomLevelSelect(INT32 choice);
//static void M_CustomWarp(INT32 choice);
FUNCNORETURN static ATTRNORETURN void M_UltimateCheat(INT32 choice);
static void M_LoadGameLevelSelect(INT32 choice);
//static void M_LoadGameLevelSelect(INT32 choice);
static void M_GetAllEmeralds(INT32 choice);
static void M_DestroyRobots(INT32 choice);
static void M_LevelSelectWarp(INT32 choice);
//static void M_LevelSelectWarp(INT32 choice);
static void M_Credits(INT32 choice);
static void M_PandorasBox(INT32 choice);
static void M_EmblemHints(INT32 choice);
@ -244,7 +244,7 @@ static void M_ConfirmTeamScramble(INT32 choice);
static void M_ConfirmTeamChange(INT32 choice);
static void M_ConfirmSpectateChange(INT32 choice);
//static void M_SecretsMenu(INT32 choice);
static void M_SetupChoosePlayer(INT32 choice);
//static void M_SetupChoosePlayer(INT32 choice);
static void M_QuitSRB2(INT32 choice);
menu_t SP_MainDef, MP_MainDef, OP_MainDef;
menu_t MISC_ScrambleTeamDef, MISC_ChangeTeamDef, MISC_ChangeSpectateDef;
@ -262,7 +262,7 @@ static void M_ChooseTimeAttack(INT32 choice);
static void M_ModeAttackRetry(INT32 choice);
static void M_ModeAttackEndGame(INT32 choice);
static void M_SetGuestReplay(INT32 choice);
static void M_ChoosePlayer(INT32 choice);
//static void M_ChoosePlayer(INT32 choice);
menu_t SP_LevelStatsDef;
static menu_t SP_TimeAttackDef, SP_ReplayDef, SP_GuestReplayDef, SP_GhostDef;
//static menu_t SP_NightsAttackDef, SP_NightsReplayDef, SP_NightsGuestReplayDef, SP_NightsGhostDef;
@ -342,11 +342,11 @@ static void M_DrawPauseMenu(void);
static void M_DrawLevelSelectOnly(boolean leftfade, boolean rightfade);
static void M_DrawServerMenu(void);
static void M_DrawImageDef(void);
static void M_DrawLoad(void);
//static void M_DrawLoad(void);
static void M_DrawLevelStats(void);
static void M_DrawTimeAttackMenu(void);
//static void M_DrawNightsAttackMenu(void);
static void M_DrawSetupChoosePlayerMenu(void);
//static void M_DrawSetupChoosePlayerMenu(void);
static void M_DrawControl(void);
static void M_DrawVideoMenu(void);
static void M_DrawHUDOptions(void);
@ -373,7 +373,7 @@ static boolean M_QuitMultiPlayerMenu(void);
static void M_HandleAddons(INT32 choice);
static void M_HandleSoundTest(INT32 choice);
static void M_HandleImageDef(INT32 choice);
static void M_HandleLoadSave(INT32 choice);
//static void M_HandleLoadSave(INT32 choice);
static void M_HandleLevelStats(INT32 choice);
#ifndef NONET
static void M_HandleConnectIP(INT32 choice);
@ -594,7 +594,7 @@ static menuitem_t SPauseMenu[] =
// Pandora's Box will be shifted up if both options are available
{IT_CALL | IT_STRING, NULL, "Pandora's Box...", M_PandorasBox, 16},
{IT_CALL | IT_STRING, NULL, "Emblem Hints...", M_EmblemHints, 24},
{IT_CALL | IT_STRING, NULL, "Level Select...", M_LoadGameLevelSelect, 32},
//{IT_CALL | IT_STRING, NULL, "Level Select...", M_LoadGameLevelSelect, 32},
{IT_CALL | IT_STRING, NULL, "Continue", M_SelectableClearMenus,48},
{IT_CALL | IT_STRING, NULL, "Retry", M_Retry, 56},
@ -608,7 +608,7 @@ typedef enum
{
spause_pandora = 0,
spause_hints,
spause_levelselect,
//spause_levelselect,
spause_continue,
spause_retry,
@ -726,11 +726,11 @@ static menuitem_t SR_MainMenu[] =
};
static menuitem_t SR_LevelSelectMenu[] =
/*static menuitem_t SR_LevelSelectMenu[] =
{
{IT_STRING|IT_CVAR, NULL, "Level", &cv_nextmap, 78},
{IT_WHITESTRING|IT_CALL, NULL, "Start", M_LevelSelectWarp, 130},
};
};*/
static menuitem_t SR_UnlockChecklistMenu[] =
{
@ -766,7 +766,7 @@ enum
};
// Single Player Load Game
static menuitem_t SP_LoadGameMenu[] =
/*static menuitem_t SP_LoadGameMenu[] =
{
{IT_KEYHANDLER | IT_NOTHING, NULL, "", M_HandleLoadSave, '\0'}, // dummy menuitem for the control func
};
@ -776,7 +776,7 @@ static menuitem_t SP_LevelSelectMenu[] =
{
{IT_STRING|IT_CVAR, NULL, "Level", &cv_nextmap, 78},
{IT_WHITESTRING|IT_CALL, NULL, "Start", M_LevelSelectWarp, 130},
};
};*/
// Single Player Time Attack
static menuitem_t SP_TimeAttackMenu[] =
@ -906,6 +906,7 @@ static menuitem_t SP_LevelStatsMenu[] =
// A rare case.
// External files modify this menu, so we can't call it static.
// And I'm too lazy to go through and rename it everywhere. ARRGH!
#define M_ChoosePlayer NULL
menuitem_t PlayerMenu[32] =
{
{IT_CALL, NULL, NULL, M_ChoosePlayer, 0},
@ -1679,7 +1680,7 @@ menu_t SR_MainDef =
NULL
};
menu_t SR_LevelSelectDef = MAPICONMENUSTYLE(NULL, SR_LevelSelectMenu, &SR_MainDef);
//menu_t SR_LevelSelectDef = MAPICONMENUSTYLE(NULL, SR_LevelSelectMenu, &SR_MainDef);
menu_t SR_UnlockChecklistDef =
{
@ -1706,7 +1707,7 @@ menu_t SR_EmblemHintDef =
// Single Player
menu_t SP_MainDef = CENTERMENUSTYLE(NULL, SP_MainMenu, &MainDef, 72);
menu_t SP_LoadDef =
/*menu_t SP_LoadDef =
{
"M_PICKG",
1,
@ -1717,7 +1718,7 @@ menu_t SP_LoadDef =
0,
NULL
};
menu_t SP_LevelSelectDef = MAPICONMENUSTYLE(NULL, SP_LevelSelectMenu, &SP_LoadDef);
menu_t SP_LevelSelectDef = MAPICONMENUSTYLE(NULL, SP_LevelSelectMenu, &SP_LoadDef);*/
menu_t SP_LevelStatsDef =
{
@ -1822,7 +1823,7 @@ static menu_t SP_NightsGhostDef =
};*/
menu_t SP_PlayerDef =
/*menu_t SP_PlayerDef =
{
"M_PICKP",
sizeof (PlayerMenu)/sizeof (menuitem_t),//player_end,
@ -1832,7 +1833,7 @@ menu_t SP_PlayerDef =
24, 32,
0,
NULL
};
};*/
#ifndef NONET
// Multiplayer
@ -2631,21 +2632,21 @@ boolean M_Responder(event_t *ev)
case KEY_DOWNARROW:
M_NextOpt();
S_StartSound(NULL, sfx_menu1);
if (currentMenu == &SP_PlayerDef)
/*if (currentMenu == &SP_PlayerDef)
{
Z_Free(char_notes);
char_notes = NULL;
}
}*/
return true;
case KEY_UPARROW:
M_PrevOpt();
S_StartSound(NULL, sfx_menu1);
if (currentMenu == &SP_PlayerDef)
/*if (currentMenu == &SP_PlayerDef)
{
Z_Free(char_notes);
char_notes = NULL;
}
}*/
return true;
case KEY_LEFTARROW:
@ -2803,8 +2804,8 @@ void M_Drawer(void)
else
{
#ifdef DEVELOP // Development -- show revision / branch info
V_DrawThinString(vid.dupx, vid.height - 20*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, "KART DEV EXE");
V_DrawThinString(vid.dupx, vid.height - 10*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRINGW));
V_DrawThinString(vid.dupx, vid.height - 20*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, compbranch);
V_DrawThinString(vid.dupx, vid.height - 10*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, comprevision);
#else // Regular build
V_DrawThinString(vid.dupx, vid.height - 10*vid.dupy, V_NOSCALESTART|V_TRANSLUCENT|V_ALLOWLOWERCASE, va("%s", VERSIONSTRING));
#endif
@ -2887,7 +2888,7 @@ void M_StartControlPanel(void)
}
// We can always use level select though. :33
SPauseMenu[spause_levelselect].status = (gamecomplete) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
//SPauseMenu[spause_levelselect].status = (gamecomplete) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
// And emblem hints.
SPauseMenu[spause_hints].status = (M_SecretUnlocked(SECRET_EMBLEMHINTS)) ? (IT_STRING | IT_CALL) : (IT_DISABLED);
@ -3379,7 +3380,7 @@ static void M_DrawMapEmblems(INT32 mapnum, INT32 x, INT32 y)
V_DrawSmallScaledPatch(x, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
emblem = M_GetLevelEmblems(-1);
x -= 12;
x -= 8;
}
}
@ -5057,7 +5058,7 @@ static void M_DestroyRobots(INT32 choice)
M_StartMessage(M_GetText("Do you want to destroy all\nrobots in the current level?\n\n(Press 'Y' to confirm)\n"),M_DestroyRobotsResponse,MM_YESNO);
}
static void M_LevelSelectWarp(INT32 choice)
/*static void M_LevelSelectWarp(INT32 choice)
{
boolean fromloadgame = (currentMenu == &SP_LevelSelectDef);
@ -5080,7 +5081,7 @@ static void M_LevelSelectWarp(INT32 choice)
cursaveslot = -1;
M_SetupChoosePlayer(0);
}
}
}*/
// ========
// SKY ROOM
@ -5425,7 +5426,7 @@ static void M_HandleSoundTest(INT32 choice)
// NEW GAME FUNCTIONS
// ==================
INT32 ultimate_selectable = false;
/*INT32 ultimate_selectable = false;
static void M_NewGame(void)
{
@ -5435,7 +5436,7 @@ static void M_NewGame(void)
CV_SetValue(&cv_newgametype, GT_RACE); // SRB2kart
M_SetupChoosePlayer(0);
}
}*/
/*static void M_CustomWarp(INT32 choice)
{
@ -5486,7 +5487,7 @@ static void M_SinglePlayerMenu(INT32 choice)
M_SetupNextMenu(&SP_MainDef);
}
static void M_LoadGameLevelSelect(INT32 choice)
/*static void M_LoadGameLevelSelect(INT32 choice)
{
(void)choice;
levellistmode = LLM_LEVELSELECT;
@ -5501,13 +5502,13 @@ static void M_LoadGameLevelSelect(INT32 choice)
M_PrepareLevelSelect();
M_SetupNextMenu(&SP_LevelSelectDef);
}
}*/
// ==============
// LOAD GAME MENU
// ==============
static INT32 saveSlotSelected = 0;
/*static INT32 saveSlotSelected = 0;
static short menumovedir = 0;
static void M_DrawLoadGameData(void)
@ -5906,13 +5907,13 @@ static void M_HandleLoadSave(INT32 choice)
//
// Selected from SRB2 menu
//
/*static void M_LoadGame(INT32 choice)
static void M_LoadGame(INT32 choice)
{
(void)choice;
M_ReadSaveStrings();
M_SetupNextMenu(&SP_LoadDef);
}*/
}
//
// Used by cheats to force the save menu to a specific spot.
@ -6129,11 +6130,7 @@ static void M_ChoosePlayer(INT32 choice)
G_DeferedInitNew(false, G_BuildMapName(startmap), (UINT8)skinnum, 0, fromlevelselect);
COM_BufAddText("dummyconsvar 1\n"); // G_DeferedInitNew doesn't do this
}
// ===============
// STATISTICS MENU
// ===============
}*/
// ===============
// STATISTICS MENU
@ -6202,7 +6199,7 @@ static void M_DrawStatsMaps(int location)
}
mnum = statsMapList[i];
M_DrawMapEmblems(mnum+1, 292, y);
M_DrawMapEmblems(mnum+1, 295, y);
if (mapheaderinfo[mnum]->levelflags & LF_NOZONE)
V_DrawString(20, y, 0, va("%s %s",
@ -6251,10 +6248,10 @@ static void M_DrawStatsMaps(int location)
exemblem = &extraemblems[i];
if (exemblem->collected)
V_DrawSmallMappedPatch(292, y, 0, W_CachePatchName(M_GetExtraEmblemPatch(exemblem), PU_CACHE),
V_DrawSmallMappedPatch(295, y, 0, W_CachePatchName(M_GetExtraEmblemPatch(exemblem), PU_CACHE),
R_GetTranslationColormap(TC_DEFAULT, M_GetExtraEmblemColor(exemblem), GTC_CACHE));
else
V_DrawSmallScaledPatch(292, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
V_DrawSmallScaledPatch(295, y, 0, W_CachePatchName("NEEDIT", PU_CACHE));
V_DrawString(20, y, 0, va("%s", exemblem->description));
}
@ -6313,8 +6310,8 @@ static void M_DrawLevelStats(void)
else
V_DrawRightAlignedString(BASEVIDWIDTH-16, 70, recommendedflags, "(complete)");
V_DrawString(36, 70, 0, va("x %d/%d", M_CountEmblems(), numemblems+numextraemblems));
V_DrawSmallScaledPatch(20, 70, 0, W_CachePatchName("EMBLICON", PU_STATIC));
V_DrawString(32, 70, 0, va("x %d/%d", M_CountEmblems(), numemblems+numextraemblems));
V_DrawSmallScaledPatch(20, 70, 0, W_CachePatchName("GOTITA", PU_STATIC));
M_DrawStatsMaps(statsLocation);
}
@ -6370,7 +6367,6 @@ void M_DrawTimeAttackMenu(void)
{
INT32 i, x, y, cursory = 0;
UINT16 dispstatus;
patch_t *PictureOfUrFace;
//S_ChangeMusicInternal("racent", true); // Eww, but needed for when user hits escape during demo playback
@ -6386,11 +6382,10 @@ void M_DrawTimeAttackMenu(void)
y = currentMenu->y;
// Character face!
if (W_CheckNumForName(skins[cv_chooseskin.value-1].face) != LUMPERROR)
if (W_CheckNumForName(skins[cv_chooseskin.value-1].facewant) != LUMPERROR)
{
UINT8 *colormap = R_GetTranslationColormap(cv_chooseskin.value-1, cv_playercolor.value, 0);
PictureOfUrFace = W_CachePatchName(skins[cv_chooseskin.value-1].face, PU_CACHE);
V_DrawMappedPatch(BASEVIDWIDTH-x - SHORT(PictureOfUrFace->width), y, 0, PictureOfUrFace, colormap);
V_DrawMappedPatch(BASEVIDWIDTH-x - SHORT(facewantprefix[cv_chooseskin.value-1]->width), y, 0, facewantprefix[cv_chooseskin.value-1], colormap);
}
for (i = 0; i < currentMenu->numitems; ++i)
@ -7678,7 +7673,6 @@ Update the maxplayers label...
// player arrangement width, but there's also a chance i'm a furry, shhhhhh
const INT32 paw = iconwidth + 3*incrwidth;
INT32 trans = 0;
patch_t *face;
UINT8 *colmap;
x = BASEVIDWIDTH/2 - paw/2;
y = currentMenu->y + 32;
@ -7713,15 +7707,13 @@ Update the maxplayers label...
colmap = R_GetTranslationColormap(pskin, pcol, 0);
face = W_CachePatchName(skins[pskin].face, PU_CACHE);
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, trans, face, colmap);
V_DrawFixedPatch(x<<FRACBITS, y<<FRACBITS, FRACUNIT, trans, facewantprefix[pskin], colmap);
if (itemOn == 2 && i == setupm_pselect)
{
/*V_DrawCharacter(x + 12, y-4 + (skullAnimCounter/5),
'\x1B' | highlightflags, false); // down arrow*/
face = W_CachePatchName("K_CHRCUR", PU_CACHE);
V_DrawFixedPatch((x-2)<<FRACBITS, (y-2)<<FRACBITS, FRACUNIT, 0, face, colmap);
V_DrawFixedPatch((x-2)<<FRACBITS, (y-2)<<FRACBITS, FRACUNIT, 0, W_CachePatchName("K_CHRCUR", PU_CACHE), colmap);
}
x += incrwidth;
@ -8071,20 +8063,21 @@ static void M_DrawSetupMultiPlayerMenu(void)
if (!(k++))
{
scale = FRACUNIT;
face = facewantprefix[col];
offx = 12;
offy = 0;
}
else
{
scale = FRACUNIT/2;
face = facerankprefix[col];
offx = 8;
offy = 8;
}
face = W_CachePatchName(skins[col].face, PU_CACHE);
colmap = R_GetTranslationColormap(col, setupm_fakecolor, 0);
V_DrawFixedPatch((x+offx)<<FRACBITS, (my+28+offy)<<FRACBITS, scale, 0, face, colmap);
V_DrawFixedPatch((x+offx)<<FRACBITS, (my+28+offy)<<FRACBITS, FRACUNIT, 0, face, colmap);
if (scale == FRACUNIT) // bit of a hack
V_DrawFixedPatch((x-2+offx)<<FRACBITS, (my+26+offy)<<FRACBITS, scale, 0, cursor, colmap);
V_DrawFixedPatch((x-2+offx)<<FRACBITS, (my+26+offy)<<FRACBITS, FRACUNIT, 0, cursor, colmap);
if (++col >= numskins)
col -= numskins;
x += FixedMul(iconwidth<<FRACBITS, 3*scale/2)/FRACUNIT;

View file

@ -201,6 +201,7 @@ void A_RoamingShadowThinker(mobj_t *actor); //SRB2kart
void A_MayonakaArrow(mobj_t *actor); //SRB2kart
void A_ReaperThinker(mobj_t *actor); //SRB2kart
void A_MementosTPParticles(mobj_t *actor); //SRB2kart
void A_FlameParticle(mobj_t *actor); // SRB2kart
void A_OrbitNights(mobj_t *actor);
void A_GhostMe(mobj_t *actor);
void A_SetObjectState(mobj_t *actor);
@ -8260,6 +8261,9 @@ void A_JawzChase(mobj_t *actor)
if (actor->tracer)
{
if (G_RaceGametype()) // Stop looking after first target in race
actor->extravalue1 = 1;
if (actor->tracer->health)
{
mobj_t *ret;
@ -8279,13 +8283,13 @@ void A_JawzChase(mobj_t *actor)
if (actor->extravalue1) // Disable looking by setting this
return;
if (actor->target && !P_MobjWasRemoved(actor->target)) // No source!
return;
player = K_FindJawzTarget(actor, actor->target->player);
if (player)
P_SetTarget(&actor->tracer, player->mo);
if (G_RaceGametype()) // Stop looking after first tic in race
actor->extravalue1 = 1;
return;
}
@ -8435,6 +8439,7 @@ void A_SPBChase(mobj_t *actor)
//fast->momz = 3*actor->momz/4;
fast->color = SKINCOLOR_RED;
fast->colorized = true;
K_MatchGenericExtraFlags(fast, actor);
}
return;
@ -8566,7 +8571,9 @@ void A_LightningFollowPlayer(mobj_t *actor)
if (LUA_CallAction("A_LightningFollowPlayer", actor))
return;
#endif
if (actor->target)
if (!actor->target)
return;
{
if (actor->extravalue1) // Make the radius also follow the player somewhat accuratly
{
@ -8581,7 +8588,6 @@ void A_LightningFollowPlayer(mobj_t *actor)
actor->momy = actor->target->momy;
actor->momz = actor->target->momz; // Give momentum since we don't teleport to our player literally every frame.
}
return;
}
// A_FZBoomFlash:
@ -9003,6 +9009,23 @@ void A_ReaperThinker(mobj_t *actor)
}
}
void A_FlameParticle(mobj_t *actor)
{
fixed_t rad = actor->radius>>FRACBITS, hei = actor->radius>>FRACBITS;
mobj_t *par;
#ifdef HAVE_BLUA
if (LUA_CallAction("A_FlameParticle", actor))
return;
#endif
par = P_SpawnMobj(
actor->x + (P_RandomRange(-rad, rad)<<FRACBITS),
actor->y + (P_RandomRange(-rad, rad)<<FRACBITS),
actor->z + (P_RandomRange(hei/2, hei)<<FRACBITS),
actor->info->painchance);
par->momz = actor->scale<<1;
}
//}
// Function: A_OrbitNights
@ -10318,6 +10341,8 @@ void A_SetScale(mobj_t *actor)
return;
}
locvar1 = FixedMul(locvar1, mapheaderinfo[gamemap-1]->mobj_scale); // SRB2Kart
target->destscale = locvar1; // destination scale
if (!(locvar2 & 65535))
P_SetScale(target, locvar1); // this instantly changes current scale to var1 if used, if not destscale will alter scale to var1 anyway
@ -11146,4 +11171,6 @@ void A_SpawnFreshCopy(mobj_t *actor)
if (newObject->info->seesound)
S_StartSound(newObject, newObject->info->seesound);
newObject->color = actor->color; // SRB2Kart
}

View file

@ -324,48 +324,10 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
return;
}
else if ((special->flags & MF_ENEMY) && !(special->flags & MF_MISSILE))
else if ((special->flags & MF_ENEMY) && !(special->flags & MF_MISSILE)
&& (special->type != MT_SPRINGSHELL)) // Kart: prevent random hits from these things
{
////////////////////////////////////////////////////////
/////ENEMIES!!//////////////////////////////////////////
////////////////////////////////////////////////////////
/*if (special->type == MT_GSNAPPER && !(((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|| player->powers[pw_invulnerability] || player->powers[pw_super])
&& toucher->z < special->z + special->height && toucher->z + toucher->height > special->z)
{
// Can only hit snapper from above
P_DamageMobj(toucher, special, special, 1);
}
else if (special->type == MT_SHARP
&& ((special->state == &states[special->info->xdeathstate]) || (toucher->z > special->z + special->height/2)))
{
// Cannot hit sharp from above or when red and angry
P_DamageMobj(toucher, special, special, 1);
}
else if (((player->pflags & PF_NIGHTSMODE) && (player->pflags & PF_DRILLING))
|| (player->pflags & (PF_JUMPED|PF_SPINNING|PF_GLIDING))
|| player->powers[pw_invulnerability] || player->powers[pw_super]) // Do you possess the ability to subdue the object?
{
if (P_MobjFlip(toucher)*toucher->momz < 0)
toucher->momz = -toucher->momz;
P_DamageMobj(special, toucher, toucher, 1);
}
else if (((toucher->z < special->z && !(toucher->eflags & MFE_VERTICALFLIP))
|| (toucher->z + toucher->height > special->z + special->height && (toucher->eflags & MFE_VERTICALFLIP))) // Flame is bad at logic - JTE
&& player->charability == CA_FLY
&& (player->powers[pw_tailsfly]
|| (toucher->state >= &states[S_PLAY_SPC1] && toucher->state <= &states[S_PLAY_SPC4]))) // Tails can shred stuff with his propeller.
{
if (P_MobjFlip(toucher)*toucher->momz < 0)
toucher->momz = -toucher->momz/2;
P_DamageMobj(special, toucher, toucher, 1);
}
// SRB2kart - Removed: No more fly states
else*/
P_DamageMobj(toucher, special, special, 1);
P_DamageMobj(toucher, special, special, 1);
return;
}
else if (special->flags & MF_FIRE)
@ -424,8 +386,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
P_SetTarget(&special->target, toucher);
P_KillMobj(special, toucher, toucher);
break;
case MT_FAKESHIELD: // SRB2kart
case MT_FAKEITEM:
case MT_EGGMANITEM_SHIELD: // SRB2kart
case MT_EGGMANITEM:
if ((special->target == toucher || special->target == toucher->target) && (special->threshold > 0))
return;
@ -494,6 +456,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
else
{
mobj_t *boom = P_SpawnMobj(special->target->x, special->target->y, special->target->z, MT_BOOMEXPLODE);
UINT8 ptadd = (K_IsPlayerWanted(player) ? 2 : 1);
boom->scale = special->target->scale;
boom->destscale = special->target->scale;
boom->momz = 5*FRACUNIT;
@ -516,12 +480,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
if (numingame <= 2) // If so, then an extra karma point so they are 100% certain to switch places; it's annoying to end matches with a bomb kill
special->target->player->kartstuff[k_comebackpoints]++;
ptadd++;
}
special->target->player->kartstuff[k_comebackpoints] += (K_IsPlayerWanted(player) ? 2 : 1);
special->target->player->kartstuff[k_comebackpoints] += ptadd;
if (ptadd > 1)
special->target->player->kartstuff[k_yougotem] = 2*TICRATE;
if (special->target->player->kartstuff[k_comebackpoints] >= 2)
K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
K_ExplodePlayer(player, special->target, special);
@ -545,6 +514,8 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
else if (special->target->player->kartstuff[k_comebackmode] == 2 && P_CanPickupItem(player, 2))
{
mobj_t *poof = P_SpawnMobj(special->x, special->y, special->z, MT_EXPLODE);
UINT8 ptadd = 1; // No WANTED bonus for tricking
S_StartSound(poof, special->info->seesound);
if (player->kartstuff[k_bumper] == 1) // If you have only one bumper left, and see if it's a 1v1
@ -560,14 +531,18 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
if (numingame <= 2) // If so, then an extra karma point so they are 100% certain to switch places; it's annoying to end matches with a fake kill
special->target->player->kartstuff[k_comebackpoints]++;
ptadd++;
}
special->target->player->kartstuff[k_comebackmode] = 0;
special->target->player->kartstuff[k_comebackpoints]++;
special->target->player->kartstuff[k_comebackpoints] += ptadd;
if (ptadd > 1)
special->target->player->kartstuff[k_yougotem] = 2*TICRATE;
if (special->target->player->kartstuff[k_comebackpoints] >= 2)
K_StealBumper(special->target->player, player, true);
special->target->player->kartstuff[k_comebacktimer] = comebacktime;
K_DropItems(player); //K_StripItems(player);
@ -618,8 +593,54 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
}
else
K_SpinPlayer(player, special, 0, false);
return;
/*case MT_EERIEFOG:
special->frame &= ~FF_TRANS80;
special->frame |= FF_TRANS90;
return;*/
case MT_SMK_MOLE:
if (special->target && !P_MobjWasRemoved(special->target))
return;
if (special->health <= 0 || toucher->health <= 0)
return;
if (!player->mo || player->spectator)
return;
// kill
if (player->kartstuff[k_invincibilitytimer] > 0 || player->kartstuff[k_growshrinktimer] > 0)
{
P_KillMobj(special, toucher, toucher);
return;
}
// no interaction
if (player->powers[pw_flashing] > 0 || player->kartstuff[k_hyudorotimer] > 0
|| player->kartstuff[k_squishedtimer] > 0 || player->kartstuff[k_spinouttimer] > 0)
return;
// attach to player!
P_SetTarget(&special->target, toucher);
S_StartSound(special, sfx_s1a2);
return;
case MT_CDUFO: // SRB2kart
if (special->fuse || !P_CanPickupItem(player, 1) || (G_BattleGametype() && player->kartstuff[k_bumper] <= 0))
return;
player->kartstuff[k_itemroulette] = 1;
player->kartstuff[k_roulettetype] = 1;
S_StartSound(toucher, sfx_cdfm73); // they don't make this sound in the original game but it's nice to have a "reward" for good play
//special->momx = special->momy = special->momz = 0;
special->momz = -(3*special->scale)/2;
//P_SetTarget(&special->target, toucher);
special->fuse = 2*TICRATE;
break;
case MT_BALLOON: // SRB2kart
P_SetObjectMomZ(toucher, 20<<FRACBITS, false);
break;
// ***************************************** //
// Rings, coins, spheres, weapon panels, etc //
@ -2044,7 +2065,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
&& !(target->type == MT_ORBINAUT || target->type == MT_ORBINAUT_SHIELD
|| target->type == MT_JAWZ || target->type == MT_JAWZ_DUD || target->type == MT_JAWZ_SHIELD
|| target->type == MT_BANANA || target->type == MT_BANANA_SHIELD
|| target->type == MT_FAKEITEM || target->type == MT_FAKESHIELD
|| target->type == MT_EGGMANITEM || target->type == MT_EGGMANITEM_SHIELD
|| target->type == MT_BALLHOG || target->type == MT_SPB)) // kart dead items
target->flags |= MF_NOGRAVITY; // Don't drop Tails 03-08-2000
else
@ -2068,7 +2089,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
// I wish I knew a better way to do this
if (target->target && target->target->player && target->target->player->mo)
{
if (target->target->player->kartstuff[k_eggmanheld] && target->type == MT_FAKESHIELD)
if (target->target->player->kartstuff[k_eggmanheld] && target->type == MT_EGGMANITEM_SHIELD)
target->target->player->kartstuff[k_eggmanheld] = 0;
if (target->target->player->kartstuff[k_itemheld])
@ -2414,6 +2435,21 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
else
P_PlayDeathSound(target);
break;
// SRB2Kart:
case MT_SMK_ICEBLOCK:
{
mobj_t *cur = target->hnext;
while (cur && !P_MobjWasRemoved(cur))
{
P_SetMobjState(cur, S_SMK_ICEBLOCK2);
cur = cur->hnext;
}
target->fuse = 10;
S_StartSound(target, sfx_s3k80);
}
break;
default:
break;
}
@ -2474,6 +2510,40 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source)
target->z += P_MobjFlip(target)*20*target->scale;
}
// kill tracer
if (target->type == MT_FROGGER)
{
if (target->tracer && !P_MobjWasRemoved(target->tracer))
P_KillMobj(target->tracer, inflictor, source);
}
if (target->type == MT_FROGGER || target->type == MT_ROBRA_HEAD || target->type == MT_BLUEROBRA_HEAD) // clean hnext list
{
mobj_t *cur = target->hnext;
while (cur && !P_MobjWasRemoved(cur))
{
P_KillMobj(cur, inflictor, source);
cur = cur->hnext;
}
}
// Bounce up on death
if (target->type == MT_SMK_PIPE || target->type == MT_SMK_MOLE || target->type == MT_SMK_THWOMP)
{
target->flags &= (~MF_NOGRAVITY);
if (target->eflags & MFE_VERTICALFLIP)
target->z -= target->height;
else
target->z += target->height;
S_StartSound(target, target->info->deathsound);
P_SetObjectMomZ(target, 8<<FRACBITS, false);
if (inflictor)
P_InstaThrust(target, R_PointToAngle2(inflictor->x, inflictor->y, target->x, target->y)+ANGLE_90, 16<<FRACBITS);
}
if (target->type == MT_SPIKE && inflictor && target->info->deathstate != S_NULL)
{
const fixed_t x=target->x,y=target->y,z=target->z;
@ -3250,7 +3320,7 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
{
if (inflictor && (inflictor->type == MT_ORBINAUT || inflictor->type == MT_ORBINAUT_SHIELD
|| inflictor->type == MT_JAWZ || inflictor->type == MT_JAWZ_SHIELD || inflictor->type == MT_JAWZ_DUD
|| inflictor->player))
|| inflictor->type == MT_SMK_THWOMP || inflictor->player))
{
player->kartstuff[k_sneakertimer] = 0;
K_SpinPlayer(player, source, 1, false);

View file

@ -663,10 +663,66 @@ static boolean PIT_CheckThing(mobj_t *thing)
}
}
// SRB2kart 011617 - Colission code for kart items //{
// SRB2kart 011617 - Colission[sic] code for kart items //{
if (thing->type == MT_SMK_ICEBLOCK)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
return true; // overhead
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
if (!(tmthing->flags & MF_SOLID || tmthing->flags & MF_SHOOTABLE || tmthing->flags & MF_BOUNCE))
return true;
if (!(tmthing->health))
return true;
if (tmthing->type == MT_BANANA || tmthing->type == MT_BANANA_SHIELD
|| tmthing->type == MT_EGGMANITEM || tmthing->type == MT_EGGMANITEM_SHIELD
|| tmthing->type == MT_SSMINE || tmthing->type == MT_SSMINE_SHIELD
|| tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
return false;
if (thing->health)
P_KillMobj(thing, tmthing, tmthing);
/*if (tmthing->player && (tmthing->player->kartstuff[k_invincibilitytimer] > 0
|| tmthing->player->kartstuff[k_growshrinktimer] > 0))
return true;*/
K_KartBouncing(tmthing, thing, false, true);
return false;
}
// Push fakes out of other items
if (tmthing->type == MT_EGGMANITEM && (thing->type == MT_RANDOMITEM || thing->type == MT_EGGMANITEM))
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
return true; // overhead
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
P_InstaThrust(tmthing, R_PointToAngle2(thing->x, thing->y, tmthing->x, tmthing->y), thing->radius/4);
return true;
}
else if (thing->type == MT_EGGMANITEM && (tmthing->type == MT_RANDOMITEM || tmthing->type == MT_EGGMANITEM))
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
return true; // overhead
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
P_InstaThrust(thing, R_PointToAngle2(tmthing->x, tmthing->y, thing->x, thing->y), tmthing->radius/4);
return true;
}
if (tmthing->type == MT_RANDOMITEM)
return true;
if (tmthing->type == MT_ORBINAUT || tmthing->type == MT_JAWZ || tmthing->type == MT_JAWZ_DUD
|| tmthing->type == MT_ORBINAUT_SHIELD || tmthing->type == MT_JAWZ_SHIELD)
{
@ -1386,19 +1442,17 @@ static boolean PIT_CheckThing(mobj_t *thing)
// Make sure they aren't able to damage you ANYWHERE along the Z axis, you have to be TOUCHING the person.
&& !(thing->z + thing->height < tmthing->z || thing->z > tmthing->z + tmthing->height))
{
// SRB2kart - Squish!
if (tmthing->scale > thing->scale + (FRACUNIT/8))
if (tmthing->scale > thing->scale + (FRACUNIT/8)) // SRB2kart - Handle squishes first!
K_SquishPlayer(thing->player, tmthing);
else if (thing->scale > tmthing->scale + (FRACUNIT/8))
K_SquishPlayer(tmthing->player, thing);
// SRB2kart - Invincibility!
if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer])
else if (tmthing->player->kartstuff[k_invincibilitytimer] && !thing->player->kartstuff[k_invincibilitytimer]) // SRB2kart - Then invincibility!
P_DamageMobj(thing, tmthing, tmthing, 1);
else if (thing->player->kartstuff[k_invincibilitytimer] && !tmthing->player->kartstuff[k_invincibilitytimer])
P_DamageMobj(tmthing, thing, thing, 1);
if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam))
/*if (G_BattleGametype() && (!G_GametypeHasTeams() || tmthing->player->ctfteam != thing->player->ctfteam))
{
if ((tmthing->player->powers[pw_invulnerability] || tmthing->player->powers[pw_super])
&& !thing->player->powers[pw_super])
@ -1416,7 +1470,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
P_DamageMobj(thing, tmthing, tmthing, 1);
else if ((thing->player->pflags & PF_TAGIT) && !(tmthing->player->pflags & PF_TAGIT))
P_DamageMobj(tmthing, thing, tmthing, 1);
}
}*/
}
// Force solid players in hide and seek to avoid corner stacking.
@ -1539,6 +1593,106 @@ static boolean PIT_CheckThing(mobj_t *thing)
return true;
}
else if (thing->type == MT_BLUEROBRA_HEAD || thing->type == MT_BLUEROBRA_JOINT)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
return true; // overhead
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
if (!thing->health)
return true; // dead
if (tmthing->player->kartstuff[k_invincibilitytimer] > 0
|| tmthing->player->kartstuff[k_growshrinktimer] > 0)
{
if (thing->type == MT_BLUEROBRA_JOINT)
P_KillMobj(thing->target, tmthing, tmthing);
else
P_KillMobj(thing, tmthing, tmthing);
return true;
}
else
{
K_KartBouncing(tmthing, thing, false, true);
return false;
}
}
else if (thing->type == MT_SMK_PIPE)
{
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
return true; // overhead
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
if (!thing->health)
return true; // dead
if (tmthing->player->kartstuff[k_invincibilitytimer] > 0
|| tmthing->player->kartstuff[k_growshrinktimer] > 0)
{
P_KillMobj(thing, tmthing, tmthing);
return true; // kill
}
K_KartBouncing(tmthing, thing, false, true);
return false;
}
else if (thing->type == MT_SMK_THWOMP)
{
if (!thing->health)
return true; // dead
if (!thwompsactive)
return true; // not active yet
if ((tmthing->z < thing->z) && (thing->z >= thing->movefactor-(256<<FRACBITS)))
{
thing->extravalue1 = 1; // purposely try to stomp on players early
//S_StartSound(thing, sfx_s1bb);
}
// see if it went over / under
if (tmthing->z > thing->z + thing->height)
return true; // overhead
if (tmthing->z + tmthing->height < thing->z)
return true; // underneath
// kill
if (tmthing->player->kartstuff[k_invincibilitytimer] > 0
|| tmthing->player->kartstuff[k_growshrinktimer] > 0)
{
P_KillMobj(thing, tmthing, tmthing);
return true;
}
// continue to squish
if (tmthing->player->kartstuff[k_squishedtimer])
{
tmthing->player->kartstuff[k_squishedtimer] = 2*TICRATE;
tmthing->player->powers[pw_flashing] = K_GetKartFlashing(tmthing->player);
return true;
}
// no interaction
if (tmthing->player->powers[pw_flashing] > 0 || tmthing->player->kartstuff[k_hyudorotimer] > 0
|| tmthing->player->kartstuff[k_spinouttimer] > 0) //|| tmthing->player->kartstuff[k_squishedtimer] > 0
return true;
// collide
if (tmthing->z < thing->z && thing->momz < 0)
K_SquishPlayer(tmthing->player, thing);
else
{
if (thing->flags2 & MF2_AMBUSH)
P_DamageMobj(tmthing, thing, thing, 1);
K_KartBouncing(tmthing, thing, false, true);
}
return false;
}
else if (thing->flags & MF_SOLID)
{
// see if it went over / under
@ -1552,7 +1706,7 @@ static boolean PIT_CheckThing(mobj_t *thing)
else
K_KartBouncing(tmthing, thing, false, true);
return true;
return false;
}
// Are you touching the side of the object you're interacting with?
else if (thing->z - FixedMul(FRACUNIT, thing->scale) <= tmthing->z + tmthing->height
@ -3784,6 +3938,7 @@ void P_BouncePlayerMove(mobj_t *mo)
S_StartSound(mo, sfx_s3k49);
}
mo->player->kartstuff[k_pogospring] = 0; // Cancel pogo spring effect so you aren't shoved forward back into the wall you just bounced off
P_PlayerHitBounceLine(bestslideline);
mo->eflags |= MFE_JUSTBOUNCEDWALL;

File diff suppressed because it is too large Load diff

View file

@ -3286,6 +3286,7 @@ static void P_NetArchiveMisc(void)
WRITEUINT32(save_p, indirectitemcooldown);
WRITEUINT32(save_p, mapreset);
WRITEUINT8(save_p, nospectategrief);
WRITEUINT8(save_p, thwompsactive);
// Is it paused?
if (paused)
@ -3391,6 +3392,7 @@ static inline boolean P_NetUnArchiveMisc(void)
indirectitemcooldown = READUINT32(save_p);
mapreset = READUINT32(save_p);
nospectategrief = READUINT8(save_p);
thwompsactive = (boolean)READUINT8(save_p);
// Is it paused?
if (READUINT8(save_p) == 0x2f)

View file

@ -3025,6 +3025,7 @@ boolean P_SetupLevel(boolean skipprecip)
indirectitemcooldown = 0;
mapreset = 0;
nospectategrief = 0;
thwompsactive = false;
// clear special respawning que
iquehead = iquetail = 0;
@ -3209,7 +3210,6 @@ boolean P_AddWadFile(const char *wadfilename, char **firstmapname)
HU_LoadGraphics();
ST_LoadGraphics();
ST_ReloadSkinFaceGraphics();
K_ReloadSkinIconGraphics();
//
// look for skins

View file

@ -3219,7 +3219,7 @@ void P_SetupSignExit(player_t *player)
// SRB2Kart: Set sign spinning variables
thing->movefactor = thing->z;
thing->z += (768<<FRACBITS) * P_MobjFlip(thing);
thing->z += (768*thing->scale) * P_MobjFlip(thing);
thing->movecount = 1;
++numfound;
@ -3247,7 +3247,7 @@ void P_SetupSignExit(player_t *player)
// SRB2Kart: Set sign spinning variables
thing->movefactor = thing->z;
thing->z += (768<<FRACBITS) * P_MobjFlip(thing);
thing->z += (768*thing->scale) * P_MobjFlip(thing);
thing->movecount = 1;
++numfound;
@ -3259,7 +3259,7 @@ void P_SetupSignExit(player_t *player)
// SRB2Kart: FINALLY, add in an alternative if no place is found
if (player->mo)
{
mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (768<<FRACBITS), MT_SIGN);
mobj_t *sign = P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + (768*mapheaderinfo[gamemap-1]->mobj_scale), MT_SIGN);
P_SetTarget(&sign->target, player->mo);
P_SetMobjState(sign, S_SIGN1);
@ -4196,7 +4196,34 @@ DoneSection2:
{
if (player->starpostcount >= numstarposts/2) // srb2kart: must have touched *enough* starposts (was originally "(player->starpostnum == numstarposts)")
{
UINT8 i;
UINT8 nump = 0;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator)
continue;
nump++;
}
player->laps++;
// Set up lap animation vars
if (nump > 1)
{
if (K_IsPlayerLosing(player))
player->kartstuff[k_laphand] = 3;
else
{
if (nump > 2 && player->kartstuff[k_position] == 1) // 1st place in 1v1 uses thumbs up
player->kartstuff[k_laphand] = 1;
else
player->kartstuff[k_laphand] = 2;
}
}
else
player->kartstuff[k_laphand] = 0; // No hands in FREE PLAY
player->kartstuff[k_lapanimation] = 80;
if (player->pflags & PF_NIGHTSMODE)
@ -4237,15 +4264,9 @@ DoneSection2:
// Figure out how many are playing on the last lap, to prevent spectate griefing
if (!nospectategrief && player->laps >= (UINT8)(cv_numlaps.value - 1))
{
UINT8 i;
for (i = 0; i < MAXPLAYERS; i++)
{
if (!playeringame[i] || players[i].spectator)
continue;
nospectategrief++;
}
}
nospectategrief = nump;
thwompsactive = true; // Lap 2 effects
}
else if (player->starpostnum)
{

View file

@ -846,7 +846,8 @@ void P_DoPlayerPain(player_t *player, mobj_t *source, mobj_t *inflictor)
fixed_t fallbackspeed;
if (inflictor && (inflictor->type != MT_PLAYER && inflictor->type != MT_ORBINAUT && inflictor->type != MT_ORBINAUT_SHIELD
&& inflictor->type != MT_JAWZ && inflictor->type != MT_JAWZ_DUD && inflictor->type != MT_JAWZ_SHIELD))
&& inflictor->type != MT_JAWZ && inflictor->type != MT_JAWZ_DUD && inflictor->type != MT_JAWZ_SHIELD
&& inflictor->type != MT_SMK_THWOMP))
{
if (player->mo->eflags & MFE_VERTICALFLIP)
player->mo->z--;
@ -7747,7 +7748,7 @@ void P_NukeEnemies(mobj_t *inflictor, mobj_t *source, fixed_t radius)
if (mo->type == MT_ORBINAUT || mo->type == MT_JAWZ || mo->type == MT_JAWZ_DUD
|| mo->type == MT_ORBINAUT_SHIELD || mo->type == MT_JAWZ_SHIELD
|| mo->type == MT_BANANA || mo->type == MT_BANANA_SHIELD
|| mo->type == MT_FAKEITEM || mo->type == MT_FAKESHIELD
|| mo->type == MT_EGGMANITEM || mo->type == MT_EGGMANITEM_SHIELD
|| mo->type == MT_BALLHOG || mo->type == MT_SPB)
{
if (mo->eflags & MFE_VERTICALFLIP)
@ -8135,6 +8136,10 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (!player || !player->mo)
return true;
// This can happen when joining
if (thiscam->subsector == NULL || thiscam->subsector->sector == NULL)
return true;
mo = player->mo;
#ifndef NOCLIPCAM
@ -8606,8 +8611,8 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
if (timeover == 1)
{
thiscam->momx = P_ReturnThrustX(NULL, mo->angle, 32<<FRACBITS); // Push forward
thiscam->momy = P_ReturnThrustY(NULL, mo->angle, 32<<FRACBITS);
thiscam->momx = P_ReturnThrustX(NULL, mo->angle, 32*mo->scale); // Push forward
thiscam->momy = P_ReturnThrustY(NULL, mo->angle, 32*mo->scale);
thiscam->momz = 0;
}
else if (player->exiting || timeover == 2)

View file

@ -2517,9 +2517,9 @@ static void Sk_SetDefaultValue(skin_t *skin)
strcpy(skin->realname, "Someone");
strcpy(skin->hudname, "???");
strncpy(skin->charsel, "CHRSONIC", 9);
strncpy(skin->face, "MISSING", 9);
strncpy(skin->superface, "MISSING", 9);
strncpy(skin->facerank, "PLAYRANK", 9);
strncpy(skin->facewant, "PLAYWANT", 9);
strncpy(skin->facemmap, "PLAYMMAP", 9);
skin->starttranscolor = 160;
skin->prefcolor = SKINCOLOR_GREEN;
@ -2551,7 +2551,6 @@ static void Sk_SetDefaultValue(skin_t *skin)
for (i = 0; i < sfx_skinsoundslot0; i++)
if (S_sfx[i].skinsound != -1)
skin->soundsid[S_sfx[i].skinsound] = i;
strncpy(skin->iconprefix, "SONICICN", 9);
}
//
@ -2584,17 +2583,17 @@ void R_InitSkins(void)
strcpy(skin->realname, "Sonic");
strcpy(skin->hudname, "SONIC");
strncpy(skin->charsel, "CHRSONIC", 9);
strncpy(skin->face, "LIVSONIC", 9);
strncpy(skin->superface, "LIVSUPER", 9);
strncpy(skin->facerank, "PLAYRANK", 9);
strncpy(skin->facewant, "PLAYWANT", 9);
strncpy(skin->facemmap, "PLAYMMAP", 9);
skin->prefcolor = SKINCOLOR_BLUE;
skin->ability = CA_THOK;
skin->actionspd = 60<<FRACBITS;
// SRB2kart
skin->kartspeed = 7;
skin->kartweight = 3;
skin->kartspeed = 8;
skin->kartweight = 2;
//
skin->normalspeed = 36<<FRACBITS;
@ -2605,9 +2604,7 @@ void R_InitSkins(void)
skin->spritedef.numframes = sprites[SPR_PLAY].numframes;
skin->spritedef.spriteframes = sprites[SPR_PLAY].spriteframes;
ST_LoadFaceGraphics(skin->face, skin->superface, 0);
strncpy(skin->iconprefix, "SONICICN", 9);
K_LoadIconGraphics(skin->iconprefix, 0);
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, 0);
//MD2 for sonic doesn't want to load in Linux.
#ifdef HWRENDER
@ -2763,7 +2760,7 @@ void R_AddSkins(UINT16 wadnum)
char *value;
size_t size;
skin_t *skin;
boolean hudname, realname, superface;
boolean hudname, realname;
//
// search for all skin markers in pwad
@ -2793,7 +2790,7 @@ void R_AddSkins(UINT16 wadnum)
skin = &skins[numskins];
Sk_SetDefaultValue(skin);
skin->wadnum = wadnum;
hudname = realname = superface = false;
hudname = realname = false;
// parse
stoken = strtok (buf2, "\r\n= ");
while (stoken)
@ -2878,23 +2875,20 @@ void R_AddSkins(UINT16 wadnum)
strupr(value);
strncpy(skin->sprite, value, sizeof skin->sprite);
}
else if (!stricmp(stoken, "charsel"))
else if (!stricmp(stoken, "facerank"))
{
strupr(value);
strncpy(skin->charsel, value, sizeof skin->charsel);
strncpy(skin->facerank, value, sizeof skin->facerank);
}
else if (!stricmp(stoken, "face"))
else if (!stricmp(stoken, "facewant"))
{
strupr(value);
strncpy(skin->face, value, sizeof skin->face);
if (!superface)
strncpy(skin->superface, value, sizeof skin->superface);
strncpy(skin->facewant, value, sizeof skin->facewant);
}
else if (!stricmp(stoken, "superface"))
else if (!stricmp(stoken, "facemmap"))
{
superface = true;
strupr(value);
strncpy(skin->superface, value, sizeof skin->superface);
strncpy(skin->facemmap, value, sizeof skin->facemmap);
}
#define FULLPROCESS(field) else if (!stricmp(stoken, #field)) skin->field = get_number(value);
@ -2936,11 +2930,6 @@ void R_AddSkins(UINT16 wadnum)
skin->jumpfactor = FLOAT_TO_FIXED(atof(value));
else if (!stricmp(stoken, "highresscale"))
skin->highresscale = FLOAT_TO_FIXED(atof(value));
else if (!stricmp(stoken, "faceicon"))
{
strupr(value);
strncpy(skin->iconprefix, value, sizeof skin->iconprefix);
}
else
{
INT32 found = false;
@ -3041,10 +3030,7 @@ next_token:
#endif
// add face graphics
ST_LoadFaceGraphics(skin->face, skin->superface, numskins);
// load minimap icons
K_LoadIconGraphics(skin->iconprefix, numskins);
ST_LoadFaceGraphics(skin->facerank, skin->facewant, skin->facemmap, numskins);
#ifdef HWRENDER
if (rendermode == render_opengl)

View file

@ -81,7 +81,7 @@ typedef struct
char realname[SKINNAMESIZE+1]; // Display name for level completion.
char hudname[SKINNAMESIZE+1]; // HUD name to display (officially exactly 5 characters long)
char charsel[9], face[9], superface[9]; // Arbitrarily named patch lumps
char facerank[9], facewant[9], facemmap[9]; // Arbitrarily named patch lumps
UINT8 ability; // ability definition
UINT8 ability2; // secondary ability definition
@ -113,9 +113,6 @@ typedef struct
// specific sounds per skin
sfxenum_t soundsid[NUMSKINSOUNDS]; // sound # in S_sfx table
// minimap icons
char iconprefix[9];
} skin_t;
// -----------

View file

@ -949,6 +949,21 @@ sfxinfo_t S_sfx[NUMSFX] =
{"krti11", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR},
{"krti12", false, 48, 65, -1, NULL, 0, -1, -1, LUMPERROR},
// SOC_CHAO SFX
{"mkuma", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mkpop", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bfare", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"merry", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bowlh", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"tcart", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"tppop", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"toada", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hsdoor",false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hstrn", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"aspkb", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"msmnj1",false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"msmnj2",false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// SRB2kart - Skin sounds
{"kwin", false, 64, 96, -1, NULL, 0, SKSKWIN, -1, LUMPERROR},
{"klose", false, 64, 96, -1, NULL, 0, SKSKLOSE, -1, LUMPERROR},

View file

@ -1024,6 +1024,21 @@ typedef enum
sfx_krti11,
sfx_krti12,
// SOC_CHAO hardcode
sfx_mkuma,
sfx_mkpop,
sfx_bfare,
sfx_merry,
sfx_bowlh,
sfx_tcart,
sfx_tppop,
sfx_toada,
sfx_hsdoor,
sfx_hstrn,
sfx_aspkb,
sfx_msmnj1,
sfx_msmnj2,
// And LASTLY, Kart's skin sounds.
sfx_kwin,
sfx_klose,

View file

@ -50,8 +50,9 @@ UINT16 objectsdrawn = 0;
// STATUS BAR DATA
//
patch_t *faceprefix[MAXSKINS]; // face status patches
patch_t *superprefix[MAXSKINS]; // super face status patches
patch_t *facerankprefix[MAXSKINS]; // ranking
patch_t *facewantprefix[MAXSKINS]; // wanted
patch_t *facemmapprefix[MAXSKINS]; // minimap
// ------------------------------------------
// status bar overlay
@ -356,28 +357,20 @@ void ST_LoadGraphics(void)
}
// made separate so that skins code can reload custom face graphics
void ST_LoadFaceGraphics(char *facestr, char *superstr, INT32 skinnum)
void ST_LoadFaceGraphics(char *rankstr, char *wantstr, char *mmapstr, INT32 skinnum)
{
faceprefix[skinnum] = W_CachePatchName(facestr, PU_HUDGFX);
superprefix[skinnum] = W_CachePatchName(superstr, PU_HUDGFX);
facerankprefix[skinnum] = W_CachePatchName(rankstr, PU_HUDGFX);
facewantprefix[skinnum] = W_CachePatchName(wantstr, PU_HUDGFX);
facemmapprefix[skinnum] = W_CachePatchName(mmapstr, PU_HUDGFX);
facefreed[skinnum] = false;
}
#ifdef DELFILE
void ST_UnLoadFaceGraphics(INT32 skinnum)
{
Z_Free(faceprefix[skinnum]);
Z_Free(superprefix[skinnum]);
facefreed[skinnum] = true;
}
#endif
void ST_ReloadSkinFaceGraphics(void)
{
INT32 i;
for (i = 0; i < numskins; i++)
ST_LoadFaceGraphics(skins[i].face, skins[i].superface, i);
ST_LoadFaceGraphics(skins[i].facerank, skins[i].facewant, skins[i].facemmap, i);
}
static inline void ST_InitData(void)
@ -726,9 +719,9 @@ static void ST_drawLives(void) // SRB2kart - unused.
{
// skincolor face/super
UINT8 *colormap = R_GetTranslationColormap(stplyr->skin, stplyr->mo->color, GTC_CACHE);
patch_t *face = faceprefix[stplyr->skin];
patch_t *face = facerankprefix[stplyr->skin];
if (stplyr->powers[pw_super] || stplyr->pflags & PF_NIGHTSMODE)
face = superprefix[stplyr->skin];
face = facewantprefix[stplyr->skin];
V_DrawSmallMappedPatch(hudinfo[HUD_LIVESPIC].x, hudinfo[HUD_LIVESPIC].y + (v_splitflag ? -12 : 0),
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag,face, colormap);
}
@ -737,7 +730,7 @@ static void ST_drawLives(void) // SRB2kart - unused.
// skincolor face
UINT8 *colormap = R_GetTranslationColormap(stplyr->skin, stplyr->skincolor, GTC_CACHE);
V_DrawSmallMappedPatch(hudinfo[HUD_LIVESPIC].x, hudinfo[HUD_LIVESPIC].y + (v_splitflag ? -12 : 0),
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag,faceprefix[stplyr->skin], colormap);
V_SNAPTOLEFT|V_SNAPTOBOTTOM|V_HUDTRANS|v_splitflag,facerankprefix[stplyr->skin], colormap);
}
// name
@ -1965,7 +1958,7 @@ static void ST_overlayDrawer(void)
INT32 splitflags = K_calcSplitFlags(0);
V_DrawThinString(2, (BASEVIDHEIGHT/2)-20, V_YELLOWMAP|V_HUDTRANSHALF|splitflags, M_GetText("- SPECTATING -"));
if (stplyr->powers[pw_flashing])
V_DrawString(2, (BASEVIDHEIGHT/2)-10, V_HUDTRANSHALF|splitflags, M_GetText("Item - . . ."));
V_DrawThinString(2, (BASEVIDHEIGHT/2)-10, V_HUDTRANSHALF|splitflags, M_GetText("Item - . . ."));
else if (stplyr->pflags & PF_WANTSTOJOIN)
V_DrawThinString(2, (BASEVIDHEIGHT/2)-10, V_HUDTRANSHALF|splitflags, M_GetText("Item - Cancel Join"));
/*else if (G_GametypeHasTeams())

View file

@ -42,7 +42,7 @@ void ST_UnloadGraphics(void);
void ST_LoadGraphics(void);
// face load graphics, called when skin changes
void ST_LoadFaceGraphics(char *facestr, char *superstr, INT32 playernum);
void ST_LoadFaceGraphics(char *rankstr, char *wantstr, char *mmapstr, INT32 playernum);
void ST_ReloadSkinFaceGraphics(void);
#ifdef DELFILE
void ST_UnLoadFaceGraphics(INT32 skinnum);
@ -66,8 +66,9 @@ extern patch_t *sboscore;
extern patch_t *sbotime;
extern patch_t *sbocolon;
extern patch_t *sboperiod;
extern patch_t *faceprefix[MAXSKINS]; // face status patches
extern patch_t *superprefix[MAXSKINS]; // super face status patches
extern patch_t *facerankprefix[MAXSKINS]; // ranking
extern patch_t *facewantprefix[MAXSKINS]; // wanted
extern patch_t *facemmapprefix[MAXSKINS]; // minimap
extern patch_t *livesback;
extern patch_t *ngradeletters[7];
extern boolean iconfreed[MAXPLAYERS];

View file

@ -416,7 +416,7 @@ void Y_IntermissionDrawer(void)
else*/ if (intertype == int_race || intertype == int_match)
{
#define NUMFORNEWCOLUMN 8
INT32 y = 48, gutter = ((data.match.numplayers > NUMFORNEWCOLUMN) ? 0 : (BASEVIDWIDTH/2));
INT32 y = 41, gutter = ((data.match.numplayers > NUMFORNEWCOLUMN) ? 0 : (BASEVIDWIDTH/2));
const char *timeheader;
if (data.match.rankingsmode)
@ -425,26 +425,27 @@ void Y_IntermissionDrawer(void)
timeheader = (intertype == int_race ? "TIME" : "SCORE");
// draw the level name
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20, 0, data.match.levelstring);
V_DrawFill(x, 42, 312, 1, 0);
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 12, 0, data.match.levelstring);
V_DrawFill(x, 34, 312, 1, 0);
if (data.match.encore)
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 20-8, hilicol, "ENCORE MODE");
V_DrawCenteredString(-4 + x + BASEVIDWIDTH/2, 12-8, hilicol, "ENCORE MODE");
if (!gutter)
{
V_DrawFill(x+156, 32, 1, 152, 0);
V_DrawFill(x+156, 24, 1, 158, 0);
V_DrawFill(x, 182, 312, 1, 0);
V_DrawCenteredString(x+6+(BASEVIDWIDTH/2), 32, hilicol, "#");
V_DrawString(x+36+(BASEVIDWIDTH/2), 32, hilicol, "NAME");
V_DrawCenteredString(x+6+(BASEVIDWIDTH/2), 24, hilicol, "#");
V_DrawString(x+36+(BASEVIDWIDTH/2), 24, hilicol, "NAME");
V_DrawRightAlignedString(x+152, 32, hilicol, timeheader);
V_DrawRightAlignedString(x+152, 24, hilicol, timeheader);
}
V_DrawCenteredString(x+6, 32, hilicol, "#");
V_DrawString(x+36, 32, hilicol, "NAME");
V_DrawCenteredString(x+6, 24, hilicol, "#");
V_DrawString(x+36, 24, hilicol, "NAME");
V_DrawRightAlignedString(x+(BASEVIDWIDTH/2)+152, 32, hilicol, timeheader);
V_DrawRightAlignedString(x+(BASEVIDWIDTH/2)+152, 24, hilicol, timeheader);
for (i = 0; i < data.match.numplayers; i++)
{
@ -460,12 +461,10 @@ void Y_IntermissionDrawer(void)
V_DrawCenteredString(x+6, y, 0, va("%d", data.match.pos[i]));
if (data.match.color[i] == 0)
V_DrawSmallScaledPatch(x+16, y-4, 0,faceprefix[*data.match.character[i]]);
else
if (data.match.color[i])
{
UINT8 *colormap = R_GetTranslationColormap(*data.match.character[i], *data.match.color[i], GTC_CACHE);
V_DrawSmallMappedPatch(x+16, y-4, 0,faceprefix[*data.match.character[i]], colormap);
V_DrawMappedPatch(x+16, y-4, 0,facerankprefix[*data.match.character[i]], colormap);
}
if (!gutter)
@ -520,11 +519,11 @@ void Y_IntermissionDrawer(void)
else
data.match.num[i] = MAXPLAYERS; // this should be the only field setting in this function
y += 16;
y += 18;
if (i == NUMFORNEWCOLUMN-1)
{
y = 48;
y = 41;
x += BASEVIDWIDTH/2;
}
#undef NUMFORNEWCOLUMN
@ -1148,12 +1147,10 @@ void Y_VoteDrawer(void)
V_DrawDiag(x, y, 6, V_SNAPTOLEFT|levelinfo[votes[i]].gtc);
}
if (players[i].skincolor == 0)
V_DrawSmallScaledPatch(x+24, y+9, V_SNAPTOLEFT, faceprefix[players[i].skin]);
else
if (players[i].skincolor)
{
UINT8 *colormap = R_GetTranslationColormap(players[i].skin, players[i].skincolor, GTC_CACHE);
V_DrawSmallMappedPatch(x+24, y+9, V_SNAPTOLEFT, faceprefix[players[i].skin], colormap);
V_DrawMappedPatch(x+24, y+9, V_SNAPTOLEFT, facerankprefix[players[i].skin], colormap);
}
}