mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-01-30 21:20:54 +00:00
Fix MT_NIGHTSCORE color cycling, using link colors
This commit is contained in:
parent
73eb8fc358
commit
b97f0a8643
4 changed files with 20 additions and 40 deletions
|
@ -255,42 +255,19 @@ void P_DoNightsScore(player_t *player)
|
|||
player->linktimer = nightslinktics;
|
||||
}
|
||||
|
||||
if (player->linkcount < 10)
|
||||
{
|
||||
if (player->bonustime)
|
||||
{
|
||||
P_AddPlayerScore(player, player->linkcount*20);
|
||||
P_SetMobjState(dummymo, dummymo->info->xdeathstate+player->linkcount-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
P_AddPlayerScore(player, player->linkcount*10);
|
||||
P_SetMobjState(dummymo, dummymo->info->spawnstate+player->linkcount-1);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (player->bonustime)
|
||||
{
|
||||
P_AddPlayerScore(player, 200);
|
||||
P_SetMobjState(dummymo, dummymo->info->xdeathstate+9);
|
||||
}
|
||||
else
|
||||
{
|
||||
P_AddPlayerScore(player, 100);
|
||||
P_SetMobjState(dummymo, dummymo->info->spawnstate+9);
|
||||
}
|
||||
}
|
||||
// Award 10-100 score, doubled if bonus time is active
|
||||
P_AddPlayerScore(player, min(player->linkcount,10)*(player->bonustime ? 20 : 10));
|
||||
P_SetMobjState(dummymo, (player->bonustime ? dummymo->info->xdeathstate : dummymo->info->spawnstate) + min(player->linkcount,10)-1);
|
||||
|
||||
// Hoops are the only things that should add to your drill meter
|
||||
//player->drillmeter += TICRATE;
|
||||
// Make objects slowly rise & scale up
|
||||
dummymo->momz = FRACUNIT;
|
||||
dummymo->fuse = 3*TICRATE;
|
||||
|
||||
// What?! NO, don't use the camera! Scale up instead!
|
||||
//P_InstaThrust(dummymo, R_PointToAngle2(dummymo->x, dummymo->y, camera.x, camera.y), 3*FRACUNIT);
|
||||
dummymo->scalespeed = FRACUNIT/25;
|
||||
dummymo->destscale = 2*FRACUNIT;
|
||||
|
||||
// Add extra values used for color variety
|
||||
dummymo->extravalue1 = player->linkcount-1;
|
||||
dummymo->extravalue2 = ((player->linkcount-1 >= 300) ? (player->linkcount-1 >= 600) ? 2 : 1 : 0);
|
||||
}
|
||||
|
||||
//
|
||||
|
|
|
@ -9603,7 +9603,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
case MT_BOSSFLYPOINT:
|
||||
return false;
|
||||
case MT_NIGHTSCORE:
|
||||
mobj->color = (UINT16)(leveltime % SKINCOLOR_WHITE);
|
||||
mobj->color = linkColor[mobj->extravalue2][(leveltime + mobj->extravalue1) % NUMLINKCOLORS];
|
||||
break;
|
||||
case MT_JETFUME1:
|
||||
if (!P_JetFume1Think(mobj))
|
||||
|
|
|
@ -170,6 +170,14 @@ hudinfo_t hudinfo[NUMHUDITEMS] =
|
|||
static huddrawlist_h luahuddrawlist_game[2];
|
||||
static huddrawlist_h luahuddrawlist_titlecard;
|
||||
|
||||
skincolornum_t linkColor[3][NUMLINKCOLORS] = {
|
||||
{SKINCOLOR_SHAMROCK, SKINCOLOR_AQUA, SKINCOLOR_SKY, SKINCOLOR_BLUE, SKINCOLOR_PURPLE, SKINCOLOR_MAGENTA,
|
||||
SKINCOLOR_ROSY, SKINCOLOR_RED, SKINCOLOR_ORANGE, SKINCOLOR_GOLD, SKINCOLOR_YELLOW, SKINCOLOR_PERIDOT},
|
||||
{SKINCOLOR_EMERALD, SKINCOLOR_AQUAMARINE, SKINCOLOR_WAVE, SKINCOLOR_SAPPHIRE, SKINCOLOR_GALAXY, SKINCOLOR_CRYSTAL,
|
||||
SKINCOLOR_TAFFY, SKINCOLOR_RUBY, SKINCOLOR_GARNET, SKINCOLOR_TOPAZ, SKINCOLOR_LEMON, SKINCOLOR_LIME},
|
||||
{SKINCOLOR_ISLAND, SKINCOLOR_TURQUOISE, SKINCOLOR_DREAM, SKINCOLOR_DAYBREAK, SKINCOLOR_VAPOR, SKINCOLOR_FUCHSIA,
|
||||
SKINCOLOR_VIOLET, SKINCOLOR_EVENTIDE, SKINCOLOR_KETCHUP, SKINCOLOR_FOUNDATION, SKINCOLOR_HEADLIGHT, SKINCOLOR_CHARTREUSE}};
|
||||
|
||||
//
|
||||
// STATUS BAR CODE
|
||||
//
|
||||
|
@ -1752,14 +1760,6 @@ static void ST_drawNightsRecords(void)
|
|||
}
|
||||
|
||||
// NiGHTS link colors; 3 sets with increasingly fancy colors (1 to 299, 300 to 599, 600 and above)
|
||||
#define NUMLINKCOLORS 12
|
||||
static skincolornum_t linkColor[3][NUMLINKCOLORS] = {
|
||||
{SKINCOLOR_SHAMROCK, SKINCOLOR_AQUA, SKINCOLOR_SKY, SKINCOLOR_BLUE, SKINCOLOR_PURPLE, SKINCOLOR_MAGENTA,
|
||||
SKINCOLOR_ROSY, SKINCOLOR_RED, SKINCOLOR_ORANGE, SKINCOLOR_GOLD, SKINCOLOR_YELLOW, SKINCOLOR_PERIDOT},
|
||||
{SKINCOLOR_EMERALD, SKINCOLOR_AQUAMARINE, SKINCOLOR_WAVE, SKINCOLOR_SAPPHIRE, SKINCOLOR_GALAXY, SKINCOLOR_CRYSTAL,
|
||||
SKINCOLOR_TAFFY, SKINCOLOR_RUBY, SKINCOLOR_GARNET, SKINCOLOR_TOPAZ, SKINCOLOR_LEMON, SKINCOLOR_LIME},
|
||||
{SKINCOLOR_ISLAND, SKINCOLOR_TURQUOISE, SKINCOLOR_DREAM, SKINCOLOR_DAYBREAK, SKINCOLOR_VAPOR, SKINCOLOR_FUCHSIA,
|
||||
SKINCOLOR_VIOLET, SKINCOLOR_EVENTIDE, SKINCOLOR_KETCHUP, SKINCOLOR_FOUNDATION, SKINCOLOR_HEADLIGHT, SKINCOLOR_CHARTREUSE}};
|
||||
|
||||
static void ST_drawNiGHTSLink(void)
|
||||
{
|
||||
|
|
|
@ -124,4 +124,7 @@ extern hudinfo_t hudinfo[NUMHUDITEMS];
|
|||
|
||||
extern UINT16 objectsdrawn;
|
||||
|
||||
#define NUMLINKCOLORS 12
|
||||
extern skincolornum_t linkColor[3][NUMLINKCOLORS];
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in a new issue