mirror of
https://github.com/KartKrewDev/RingRacers.git
synced 2025-10-30 08:01:28 +00:00
Fix Dehacked loading
This commit is contained in:
parent
7f912e1558
commit
420a6ccccb
13 changed files with 1599 additions and 1873 deletions
|
|
@ -400,10 +400,6 @@ static void CON_SetupColormaps(void)
|
|||
brownmap[0] = (UINT8)224;
|
||||
tanmap[0] = (UINT8)217; // no longer nice :(
|
||||
|
||||
// Yeah just straight up invert it like a normal person
|
||||
for (i = 0x00; i <= 0x1F; i++)
|
||||
invertmap[0x1F - i] = i;
|
||||
|
||||
// Init back colormap
|
||||
CON_SetupBackColormap();
|
||||
}
|
||||
|
|
@ -1761,7 +1757,6 @@ static void CON_DrawBackpic(void)
|
|||
patch_t *con_backpic;
|
||||
lumpnum_t piclump;
|
||||
int x, w, h;
|
||||
int scale;
|
||||
|
||||
// Get the lumpnum for CONSBACK, STARTUP (Only during game startup) or fallback into MISSING.
|
||||
if (con_startup)
|
||||
|
|
|
|||
495
src/deh_soc.c
495
src/deh_soc.c
|
|
@ -48,6 +48,8 @@
|
|||
#include "deh_tables.h"
|
||||
|
||||
// SRB2Kart
|
||||
#include "filesrch.h" // refreshdirmenu
|
||||
|
||||
int freeslotusage[2][2] = {{0, 0}, {0, 0}}; // [S_, MT_][max, previous .wad's max]
|
||||
void DEH_UpdateMaxFreeslots(void)
|
||||
{
|
||||
|
|
@ -1112,15 +1114,11 @@ void readgametype(MYFILE *f, char *gtname)
|
|||
UINT32 newgttol = 0;
|
||||
INT32 newgtpointlimit = 0;
|
||||
INT32 newgttimelimit = 0;
|
||||
UINT8 newgtleftcolor = 0;
|
||||
UINT8 newgtrightcolor = 0;
|
||||
INT16 newgtrankingstype = -1;
|
||||
int newgtinttype = 0;
|
||||
char gtdescription[441];
|
||||
char gtconst[MAXLINELEN];
|
||||
|
||||
// Empty strings.
|
||||
gtdescription[0] = '\0';
|
||||
gtconst[0] = '\0';
|
||||
|
||||
do
|
||||
|
|
@ -1136,44 +1134,6 @@ void readgametype(MYFILE *f, char *gtname)
|
|||
else
|
||||
break;
|
||||
|
||||
if (fastcmp(word, "DESCRIPTION"))
|
||||
{
|
||||
char *descr = NULL;
|
||||
|
||||
for (i = 0; i < MAXLINELEN-3; i++)
|
||||
{
|
||||
if (s[i] == '=')
|
||||
{
|
||||
descr = &s[i+2];
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (descr)
|
||||
{
|
||||
strcpy(gtdescription, descr);
|
||||
strcat(gtdescription, myhashfgets(descr, sizeof (gtdescription), f));
|
||||
}
|
||||
else
|
||||
strcpy(gtdescription, "");
|
||||
|
||||
// For some reason, cutting the string did not work above. Most likely due to strcpy or strcat...
|
||||
// It works down here, though.
|
||||
{
|
||||
INT32 numline = 0;
|
||||
for (i = 0; (size_t)i < sizeof(gtdescription)-1; i++)
|
||||
{
|
||||
if (numline < 20 && gtdescription[i] == '\n')
|
||||
numline++;
|
||||
|
||||
if (numline >= 20 || gtdescription[i] == '\0' || gtdescription[i] == '#')
|
||||
break;
|
||||
}
|
||||
}
|
||||
gtdescription[strlen(gtdescription)-1] = '\0';
|
||||
gtdescription[i] = '\0';
|
||||
continue;
|
||||
}
|
||||
|
||||
word2 = strtok(NULL, " = ");
|
||||
if (word2)
|
||||
{
|
||||
|
|
@ -1206,13 +1166,6 @@ void readgametype(MYFILE *f, char *gtname)
|
|||
newgtpointlimit = (INT32)i;
|
||||
else if (fastcmp(word, "DEFAULTTIMELIMIT"))
|
||||
newgttimelimit = (INT32)i;
|
||||
// Level platter
|
||||
else if (fastcmp(word, "HEADERCOLOR") || fastcmp(word, "HEADERCOLOUR"))
|
||||
newgtleftcolor = newgtrightcolor = (UINT8)get_number(word2);
|
||||
else if (fastcmp(word, "HEADERLEFTCOLOR") || fastcmp(word, "HEADERLEFTCOLOUR"))
|
||||
newgtleftcolor = (UINT8)get_number(word2);
|
||||
else if (fastcmp(word, "HEADERRIGHTCOLOR") || fastcmp(word, "HEADERRIGHTCOLOUR"))
|
||||
newgtrightcolor = (UINT8)get_number(word2);
|
||||
// Rankings type
|
||||
else if (fastcmp(word, "RANKINGTYPE"))
|
||||
{
|
||||
|
|
@ -1280,7 +1233,6 @@ void readgametype(MYFILE *f, char *gtname)
|
|||
// Add the new gametype
|
||||
newgtidx = G_AddGametype(newgtrules);
|
||||
G_AddGametypeTOL(newgtidx, newgttol);
|
||||
G_SetGametypeDescription(newgtidx, gtdescription, newgtleftcolor, newgtrightcolor);
|
||||
|
||||
// Not covered by G_AddGametype alone.
|
||||
if (newgtrankingstype == -1)
|
||||
|
|
@ -1481,25 +1433,11 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
}
|
||||
}
|
||||
|
||||
// NiGHTS grades
|
||||
else if (fastncmp(word, "GRADES", 6))
|
||||
{
|
||||
UINT8 mare = (UINT8)atoi(word + 6);
|
||||
|
||||
if (mare <= 0 || mare > 8)
|
||||
{
|
||||
deh_warning("Level header %d: unknown word '%s'", num, word);
|
||||
continue;
|
||||
}
|
||||
|
||||
P_AddGradesForMare((INT16)(num-1), mare-1, word2);
|
||||
}
|
||||
|
||||
// Strings that can be truncated
|
||||
else if (fastcmp(word, "SELECTHEADING"))
|
||||
else if (fastcmp(word, "ZONETITLE"))
|
||||
{
|
||||
deh_strlcpy(mapheaderinfo[num-1]->selectheading, word2,
|
||||
sizeof(mapheaderinfo[num-1]->selectheading), va("Level header %d: selectheading", num));
|
||||
deh_strlcpy(mapheaderinfo[num-1]->zonttl, word2,
|
||||
sizeof(mapheaderinfo[num-1]->zonttl), va("Level header %d: zonetitle", num));
|
||||
}
|
||||
else if (fastcmp(word, "SCRIPTNAME"))
|
||||
{
|
||||
|
|
@ -1601,34 +1539,6 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
mapheaderinfo[num-1]->mustrack = ((UINT16)i - 1);
|
||||
else if (fastcmp(word, "MUSICPOS"))
|
||||
mapheaderinfo[num-1]->muspos = (UINT32)get_number(word2);
|
||||
else if (fastcmp(word, "MUSICINTERFADEOUT"))
|
||||
mapheaderinfo[num-1]->musinterfadeout = (UINT32)get_number(word2);
|
||||
else if (fastcmp(word, "MUSICINTER"))
|
||||
deh_strlcpy(mapheaderinfo[num-1]->musintername, word2,
|
||||
sizeof(mapheaderinfo[num-1]->musintername), va("Level header %d: intermission music", num));
|
||||
else if (fastcmp(word, "MUSICPOSTBOSS"))
|
||||
deh_strlcpy(mapheaderinfo[num-1]->muspostbossname, word2,
|
||||
sizeof(mapheaderinfo[num-1]->muspostbossname), va("Level header %d: post-boss music", num));
|
||||
else if (fastcmp(word, "MUSICPOSTBOSSTRACK"))
|
||||
mapheaderinfo[num-1]->muspostbosstrack = ((UINT16)i - 1);
|
||||
else if (fastcmp(word, "MUSICPOSTBOSSPOS"))
|
||||
mapheaderinfo[num-1]->muspostbosspos = (UINT32)get_number(word2);
|
||||
else if (fastcmp(word, "MUSICPOSTBOSSFADEIN"))
|
||||
mapheaderinfo[num-1]->muspostbossfadein = (UINT32)get_number(word2);
|
||||
else if (fastcmp(word, "FORCERESETMUSIC"))
|
||||
{
|
||||
// This is a weird one because "FALSE"/"NO" could either apply to "leave to default preference" (cv_resetmusic)
|
||||
// or "force off". Let's assume it means "force off", and let an unspecified value mean "default preference"
|
||||
if (fastcmp(word2, "OFF") || word2[0] == 'F' || word2[0] == 'N') i = 0;
|
||||
else if (fastcmp(word2, "ON") || word2[0] == 'T' || word2[0] == 'Y') i = 1;
|
||||
else i = -1; // (fastcmp(word2, "DEFAULT"))
|
||||
|
||||
if (i >= -1 && i <= 1) // -1 to force off, 1 to force on, 0 to honor default.
|
||||
// This behavior can be disabled with cv_resetmusicbyheader
|
||||
mapheaderinfo[num-1]->musforcereset = (SINT8)i;
|
||||
else
|
||||
deh_warning("Level header %d: invalid forceresetmusic option %d", num, i);
|
||||
}
|
||||
else if (fastcmp(word, "FORCECHARACTER"))
|
||||
{
|
||||
strlcpy(mapheaderinfo[num-1]->forcecharacter, word2, SKINNAMESIZE+1);
|
||||
|
|
@ -1636,18 +1546,17 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
}
|
||||
else if (fastcmp(word, "WEATHER"))
|
||||
mapheaderinfo[num-1]->weather = (UINT8)get_number(word2);
|
||||
else if (fastcmp(word, "SKYNUM"))
|
||||
mapheaderinfo[num-1]->skynum = (INT16)i;
|
||||
else if (fastcmp(word, "INTERSCREEN"))
|
||||
strncpy(mapheaderinfo[num-1]->interscreen, word2, 8);
|
||||
else if (fastcmp(word, "SKYTEXTURE"))
|
||||
deh_strlcpy(mapheaderinfo[num-1]->skytexture, word2,
|
||||
sizeof(mapheaderinfo[num-1]->skytexture), va("Level header %d: sky texture", num));
|
||||
else if (fastcmp(word, "PRECUTSCENENUM"))
|
||||
mapheaderinfo[num-1]->precutscenenum = (UINT8)i;
|
||||
else if (fastcmp(word, "CUTSCENENUM"))
|
||||
mapheaderinfo[num-1]->cutscenenum = (UINT8)i;
|
||||
else if (fastcmp(word, "COUNTDOWN"))
|
||||
mapheaderinfo[num-1]->countdown = (INT16)i;
|
||||
else if (fastcmp(word, "PALETTE"))
|
||||
mapheaderinfo[num-1]->palette = (UINT16)i;
|
||||
else if (fastcmp(word, "ENCOREPAL"))
|
||||
mapheaderinfo[num-1]->encorepal = (UINT16)i;
|
||||
else if (fastcmp(word, "NUMLAPS"))
|
||||
mapheaderinfo[num-1]->numlaps = (UINT8)i;
|
||||
else if (fastcmp(word, "UNLOCKABLE"))
|
||||
|
|
@ -1657,8 +1566,6 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
else
|
||||
deh_warning("Level header %d: invalid unlockable number %d", num, i);
|
||||
}
|
||||
else if (fastcmp(word, "LEVELSELECT"))
|
||||
mapheaderinfo[num-1]->levelselect = (UINT8)i;
|
||||
else if (fastcmp(word, "SKYBOXSCALE"))
|
||||
mapheaderinfo[num-1]->skybox_scalex = mapheaderinfo[num-1]->skybox_scaley = mapheaderinfo[num-1]->skybox_scalez = (INT16)i;
|
||||
else if (fastcmp(word, "SKYBOXSCALEX"))
|
||||
|
|
@ -1667,46 +1574,15 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
mapheaderinfo[num-1]->skybox_scaley = (INT16)i;
|
||||
else if (fastcmp(word, "SKYBOXSCALEZ"))
|
||||
mapheaderinfo[num-1]->skybox_scalez = (INT16)i;
|
||||
|
||||
else if (fastcmp(word, "BONUSTYPE"))
|
||||
{
|
||||
if (fastcmp(word2, "NONE")) i = -1;
|
||||
else if (fastcmp(word2, "NORMAL")) i = 0;
|
||||
else if (fastcmp(word2, "BOSS")) i = 1;
|
||||
else if (fastcmp(word2, "ERZ3")) i = 2;
|
||||
else if (fastcmp(word2, "NIGHTS")) i = 3;
|
||||
else if (fastcmp(word2, "NIGHTSLINK")) i = 4;
|
||||
|
||||
if (i >= -1 && i <= 4) // -1 for no bonus. Max is 4.
|
||||
mapheaderinfo[num-1]->bonustype = (SINT8)i;
|
||||
else
|
||||
deh_warning("Level header %d: invalid bonus type number %d", num, i);
|
||||
}
|
||||
|
||||
// Title card
|
||||
else if (fastcmp(word, "TITLECARDZIGZAG"))
|
||||
{
|
||||
deh_strlcpy(mapheaderinfo[num-1]->ltzzpatch, word2,
|
||||
sizeof(mapheaderinfo[num-1]->ltzzpatch), va("Level header %d: title card zigzag patch name", num));
|
||||
}
|
||||
else if (fastcmp(word, "TITLECARDZIGZAGTEXT"))
|
||||
{
|
||||
deh_strlcpy(mapheaderinfo[num-1]->ltzztext, word2,
|
||||
sizeof(mapheaderinfo[num-1]->ltzztext), va("Level header %d: title card zigzag text patch name", num));
|
||||
}
|
||||
else if (fastcmp(word, "TITLECARDACTDIAMOND"))
|
||||
{
|
||||
deh_strlcpy(mapheaderinfo[num-1]->ltactdiamond, word2,
|
||||
sizeof(mapheaderinfo[num-1]->ltactdiamond), va("Level header %d: title card act diamond patch name", num));
|
||||
}
|
||||
|
||||
else if (fastcmp(word, "MAXBONUSLIVES"))
|
||||
mapheaderinfo[num-1]->maxbonuslives = (SINT8)i;
|
||||
else if (fastcmp(word, "LEVELFLAGS"))
|
||||
mapheaderinfo[num-1]->levelflags = (UINT16)i;
|
||||
mapheaderinfo[num-1]->levelflags = get_number(word2);
|
||||
else if (fastcmp(word, "MENUFLAGS"))
|
||||
mapheaderinfo[num-1]->menuflags = (UINT8)i;
|
||||
|
||||
mapheaderinfo[num-1]->menuflags = get_number(word2);
|
||||
// SRB2Kart
|
||||
else if (fastcmp(word, "MOBJSCALE"))
|
||||
mapheaderinfo[num-1]->mobj_scale = get_number(word2);
|
||||
else if (fastcmp(word, "DEFAULTWAYPOINTRADIUS"))
|
||||
mapheaderinfo[num-1]->default_waypoint_radius = get_number(word2);
|
||||
// Individual triggers for level flags, for ease of use (and 2.0 compatibility)
|
||||
else if (fastcmp(word, "SCRIPTISFILE"))
|
||||
{
|
||||
|
|
@ -1715,27 +1591,6 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_SCRIPTISFILE;
|
||||
}
|
||||
else if (fastcmp(word, "SPEEDMUSIC"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_SPEEDMUSIC;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_SPEEDMUSIC;
|
||||
}
|
||||
else if (fastcmp(word, "NOSSMUSIC"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_NOSSMUSIC;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOSSMUSIC;
|
||||
}
|
||||
else if (fastcmp(word, "NORELOAD"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_NORELOAD;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NORELOAD;
|
||||
}
|
||||
else if (fastcmp(word, "NOZONE"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
|
|
@ -1743,51 +1598,19 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOZONE;
|
||||
}
|
||||
else if (fastcmp(word, "SAVEGAME"))
|
||||
else if (fastcmp(word, "SECTIONRACE"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_SAVEGAME;
|
||||
mapheaderinfo[num-1]->levelflags |= LF_SECTIONRACE;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_SAVEGAME;
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_SECTIONRACE;
|
||||
}
|
||||
else if (fastcmp(word, "MIXNIGHTSCOUNTDOWN"))
|
||||
else if (fastcmp(word, "SUBTRACTNUM"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_MIXNIGHTSCOUNTDOWN;
|
||||
mapheaderinfo[num-1]->levelflags |= LF_SUBTRACTNUM;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_MIXNIGHTSCOUNTDOWN;
|
||||
}
|
||||
else if (fastcmp(word, "WARNINGTITLE"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_WARNINGTITLE;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_WARNINGTITLE;
|
||||
}
|
||||
else if (fastcmp(word, "NOTITLECARD"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->levelflags |= LF_NOTITLECARD;
|
||||
else
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOTITLECARD;
|
||||
}
|
||||
else if (fastcmp(word, "SHOWTITLECARDFOR"))
|
||||
{
|
||||
mapheaderinfo[num-1]->levelflags |= LF_NOTITLECARD;
|
||||
tmp = strtok(word2,",");
|
||||
do {
|
||||
if (fastcmp(tmp, "FIRST"))
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOTITLECARDFIRST;
|
||||
else if (fastcmp(tmp, "RESPAWN"))
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOTITLECARDRESPAWN;
|
||||
else if (fastcmp(tmp, "RECORDATTACK"))
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOTITLECARDRECORDATTACK;
|
||||
else if (fastcmp(tmp, "ALL"))
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_NOTITLECARD;
|
||||
else if (!fastcmp(tmp, "NONE"))
|
||||
deh_warning("Level header %d: unknown titlecard show option %s\n", num, tmp);
|
||||
|
||||
} while((tmp = strtok(NULL,",")) != NULL);
|
||||
mapheaderinfo[num-1]->levelflags &= ~LF_SUBTRACTNUM;
|
||||
}
|
||||
|
||||
// Individual triggers for menu flags
|
||||
|
|
@ -1805,40 +1628,20 @@ void readlevelheader(MYFILE *f, INT32 num)
|
|||
else
|
||||
mapheaderinfo[num-1]->menuflags &= ~LF2_HIDEINSTATS;
|
||||
}
|
||||
else if (fastcmp(word, "RECORDATTACK") || fastcmp(word, "TIMEATTACK"))
|
||||
{ // TIMEATTACK is an accepted alias
|
||||
else if (fastcmp(word, "TIMEATTACK") || fastcmp(word, "RECORDATTACK"))
|
||||
{ // RECORDATTACK is an accepted alias
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->menuflags |= LF2_RECORDATTACK;
|
||||
mapheaderinfo[num-1]->menuflags |= LF2_TIMEATTACK;
|
||||
else
|
||||
mapheaderinfo[num-1]->menuflags &= ~LF2_RECORDATTACK;
|
||||
mapheaderinfo[num-1]->menuflags &= ~LF2_TIMEATTACK;
|
||||
}
|
||||
else if (fastcmp(word, "NIGHTSATTACK"))
|
||||
else if (fastcmp(word, "VISITNEEDED"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->menuflags |= LF2_NIGHTSATTACK;
|
||||
mapheaderinfo[num-1]->menuflags |= LF2_VISITNEEDED;
|
||||
else
|
||||
mapheaderinfo[num-1]->menuflags &= LF2_NIGHTSATTACK;
|
||||
mapheaderinfo[num-1]->menuflags &= ~LF2_VISITNEEDED;
|
||||
}
|
||||
else if (fastcmp(word, "NOVISITNEEDED"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->menuflags |= LF2_NOVISITNEEDED;
|
||||
else
|
||||
mapheaderinfo[num-1]->menuflags &= ~LF2_NOVISITNEEDED;
|
||||
}
|
||||
else if (fastcmp(word, "WIDEICON"))
|
||||
{
|
||||
if (i || word2[0] == 'T' || word2[0] == 'Y')
|
||||
mapheaderinfo[num-1]->menuflags |= LF2_WIDEICON;
|
||||
else
|
||||
mapheaderinfo[num-1]->menuflags &= ~LF2_WIDEICON;
|
||||
}
|
||||
else if (fastcmp(word, "STARTRINGS"))
|
||||
mapheaderinfo[num-1]->startrings = (UINT16)i;
|
||||
else if (fastcmp(word, "SPECIALSTAGETIME"))
|
||||
mapheaderinfo[num-1]->sstimer = i;
|
||||
else if (fastcmp(word, "SPECIALSTAGESPHERES"))
|
||||
mapheaderinfo[num-1]->ssspheres = i;
|
||||
else if (fastcmp(word, "GRAVITY"))
|
||||
mapheaderinfo[num-1]->gravity = FLOAT_TO_FIXED(atof(word2));
|
||||
else
|
||||
|
|
@ -2527,8 +2330,6 @@ void readmenu(MYFILE *f, INT32 num)
|
|||
{
|
||||
if (fastcmp(word2, "USER"))
|
||||
menupres[num].ttmode = TTMODE_USER;
|
||||
else if (fastcmp(word2, "ALACROIX"))
|
||||
menupres[num].ttmode = TTMODE_ALACROIX;
|
||||
else if (fastcmp(word2, "HIDE") || fastcmp(word2, "HIDDEN") || fastcmp(word2, "NONE"))
|
||||
{
|
||||
menupres[num].ttmode = TTMODE_USER;
|
||||
|
|
@ -2982,20 +2783,10 @@ void reademblemdata(MYFILE *f, INT32 num)
|
|||
{
|
||||
if (fastcmp(word2, "GLOBAL"))
|
||||
emblemlocations[num-1].type = ET_GLOBAL;
|
||||
else if (fastcmp(word2, "SKIN"))
|
||||
emblemlocations[num-1].type = ET_SKIN;
|
||||
else if (fastcmp(word2, "SCORE"))
|
||||
emblemlocations[num-1].type = ET_SCORE;
|
||||
else if (fastcmp(word2, "TIME"))
|
||||
emblemlocations[num-1].type = ET_TIME;
|
||||
else if (fastcmp(word2, "RINGS"))
|
||||
emblemlocations[num-1].type = ET_RINGS;
|
||||
else if (fastcmp(word2, "MAP"))
|
||||
emblemlocations[num-1].type = ET_MAP;
|
||||
else if (fastcmp(word2, "NGRADE"))
|
||||
emblemlocations[num-1].type = ET_NGRADE;
|
||||
else if (fastcmp(word2, "NTIME"))
|
||||
emblemlocations[num-1].type = ET_NTIME;
|
||||
else if (fastcmp(word2, "TIME"))
|
||||
emblemlocations[num-1].type = ET_TIME;
|
||||
else
|
||||
emblemlocations[num-1].type = (UINT8)value;
|
||||
}
|
||||
|
|
@ -3036,27 +2827,17 @@ void reademblemdata(MYFILE *f, INT32 num)
|
|||
// Default sprite and color definitions for lazy people like me
|
||||
if (!emblemlocations[num-1].sprite) switch (emblemlocations[num-1].type)
|
||||
{
|
||||
case ET_RINGS:
|
||||
emblemlocations[num-1].sprite = 'R'; break;
|
||||
case ET_SCORE: case ET_NGRADE:
|
||||
emblemlocations[num-1].sprite = 'S'; break;
|
||||
case ET_TIME: case ET_NTIME:
|
||||
emblemlocations[num-1].sprite = 'T'; break;
|
||||
case ET_TIME:
|
||||
emblemlocations[num-1].sprite = 'B'; break;
|
||||
default:
|
||||
emblemlocations[num-1].sprite = 'A'; break;
|
||||
}
|
||||
if (!emblemlocations[num-1].color) switch (emblemlocations[num-1].type)
|
||||
{
|
||||
case ET_RINGS:
|
||||
emblemlocations[num-1].color = SKINCOLOR_GOLD; break;
|
||||
case ET_SCORE:
|
||||
emblemlocations[num-1].color = SKINCOLOR_BROWN; break;
|
||||
case ET_NGRADE:
|
||||
emblemlocations[num-1].color = SKINCOLOR_TEAL; break;
|
||||
case ET_TIME: case ET_NTIME:
|
||||
case ET_TIME: //case ET_NTIME:
|
||||
emblemlocations[num-1].color = SKINCOLOR_GREY; break;
|
||||
default:
|
||||
emblemlocations[num-1].color = SKINCOLOR_BLUE; break;
|
||||
emblemlocations[num-1].color = SKINCOLOR_GOLD; break;
|
||||
}
|
||||
|
||||
Z_Free(s);
|
||||
|
|
@ -3137,9 +2918,9 @@ void readextraemblemdata(MYFILE *f, INT32 num)
|
|||
} while (!myfeof(f));
|
||||
|
||||
if (!extraemblems[num-1].sprite)
|
||||
extraemblems[num-1].sprite = 'X';
|
||||
extraemblems[num-1].sprite = 'C';
|
||||
if (!extraemblems[num-1].color)
|
||||
extraemblems[num-1].color = SKINCOLOR_BLUE;
|
||||
extraemblems[num-1].color = SKINCOLOR_RED;
|
||||
|
||||
Z_Free(s);
|
||||
}
|
||||
|
|
@ -3195,9 +2976,8 @@ void readunlockable(MYFILE *f, INT32 num)
|
|||
else
|
||||
{
|
||||
strupr(word2);
|
||||
if (fastcmp(word, "HEIGHT"))
|
||||
unlockables[num].height = (UINT16)i;
|
||||
else if (fastcmp(word, "CONDITIONSET"))
|
||||
|
||||
if (fastcmp(word, "CONDITIONSET"))
|
||||
unlockables[num].conditionset = (UINT8)i;
|
||||
else if (fastcmp(word, "SHOWCONDITIONSET"))
|
||||
unlockables[num].showconditionset = (UINT8)i;
|
||||
|
|
@ -3209,26 +2989,34 @@ void readunlockable(MYFILE *f, INT32 num)
|
|||
{
|
||||
if (fastcmp(word2, "NONE"))
|
||||
unlockables[num].type = SECRET_NONE;
|
||||
else if (fastcmp(word2, "HEADER"))
|
||||
unlockables[num].type = SECRET_HEADER;
|
||||
else if (fastcmp(word2, "SKIN"))
|
||||
unlockables[num].type = SECRET_SKIN;
|
||||
else if (fastcmp(word2, "WARP"))
|
||||
unlockables[num].type = SECRET_WARP;
|
||||
else if (fastcmp(word2, "LEVELSELECT"))
|
||||
unlockables[num].type = SECRET_LEVELSELECT;
|
||||
else if (fastcmp(word2, "TIMEATTACK"))
|
||||
unlockables[num].type = SECRET_TIMEATTACK;
|
||||
else if (fastcmp(word2, "BREAKTHECAPSULES"))
|
||||
unlockables[num].type = SECRET_BREAKTHECAPSULES;
|
||||
else if (fastcmp(word2, "SOUNDTEST"))
|
||||
unlockables[num].type = SECRET_SOUNDTEST;
|
||||
else if (fastcmp(word2, "CREDITS"))
|
||||
unlockables[num].type = SECRET_CREDITS;
|
||||
else if (fastcmp(word2, "ITEMFINDER"))
|
||||
unlockables[num].type = SECRET_ITEMFINDER;
|
||||
else if (fastcmp(word2, "EMBLEMHINTS"))
|
||||
unlockables[num].type = SECRET_EMBLEMHINTS;
|
||||
else if (fastcmp(word2, "ENCORE"))
|
||||
unlockables[num].type = SECRET_ENCORE;
|
||||
else if (fastcmp(word2, "HARDSPEED"))
|
||||
unlockables[num].type = SECRET_HARDSPEED;
|
||||
else if (fastcmp(word2, "HELLATTACK"))
|
||||
unlockables[num].type = SECRET_HELLATTACK;
|
||||
else if (fastcmp(word2, "PANDORA"))
|
||||
unlockables[num].type = SECRET_PANDORA;
|
||||
else if (fastcmp(word2, "CREDITS"))
|
||||
unlockables[num].type = SECRET_CREDITS;
|
||||
else if (fastcmp(word2, "RECORDATTACK"))
|
||||
unlockables[num].type = SECRET_RECORDATTACK;
|
||||
else if (fastcmp(word2, "NIGHTSMODE"))
|
||||
unlockables[num].type = SECRET_NIGHTSMODE;
|
||||
else if (fastcmp(word2, "HEADER"))
|
||||
unlockables[num].type = SECRET_HEADER;
|
||||
else if (fastcmp(word2, "LEVELSELECT"))
|
||||
unlockables[num].type = SECRET_LEVELSELECT;
|
||||
else if (fastcmp(word2, "WARP"))
|
||||
unlockables[num].type = SECRET_WARP;
|
||||
else if (fastcmp(word2, "SOUNDTEST"))
|
||||
unlockables[num].type = SECRET_SOUNDTEST;
|
||||
else
|
||||
unlockables[num].type = (INT16)i;
|
||||
}
|
||||
|
|
@ -3283,32 +3071,39 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
return;
|
||||
}
|
||||
|
||||
if (fastcmp(params[0], "PLAYTIME"))
|
||||
if (fastcmp(params[0], "PLAYTIME")
|
||||
|| (++offset && fastcmp(params[0], "MATCHESPLAYED")))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UC_PLAYTIME;
|
||||
ty = UC_PLAYTIME + offset;
|
||||
re = atoi(params[1]);
|
||||
}
|
||||
else if (fastcmp(params[0], "GAMECLEAR")
|
||||
|| (++offset && fastcmp(params[0], "ALLEMERALDS"))
|
||||
|| (++offset && fastcmp(params[0], "ULTIMATECLEAR")))
|
||||
else if (fastcmp(params[0], "POWERLEVEL"))
|
||||
{
|
||||
ty = UC_GAMECLEAR + offset;
|
||||
PARAMCHECK(2);
|
||||
ty = UC_POWERLEVEL;
|
||||
re = atoi(params[1]);
|
||||
x1 = atoi(params[2]);
|
||||
|
||||
if (x1 < 0 || x1 >= PWRLV_NUMTYPES)
|
||||
{
|
||||
deh_warning("Power level type %d out of range (0 - %d)", x1, PWRLV_NUMTYPES-1);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if (fastcmp(params[0], "GAMECLEAR"))
|
||||
{
|
||||
ty = UC_GAMECLEAR;
|
||||
re = (params[1]) ? atoi(params[1]) : 1;
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "OVERALLSCORE")
|
||||
|| (++offset && fastcmp(params[0], "OVERALLTIME"))
|
||||
|| (++offset && fastcmp(params[0], "OVERALLRINGS")))
|
||||
else if (fastcmp(params[0], "OVERALLTIME"))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UC_OVERALLSCORE + offset;
|
||||
ty = UC_OVERALLTIME;
|
||||
re = atoi(params[1]);
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "MAPVISITED")
|
||||
|| (++offset && fastcmp(params[0], "MAPBEATEN"))
|
||||
|| (++offset && fastcmp(params[0], "MAPALLEMERALDS"))
|
||||
|| (++offset && fastcmp(params[0], "MAPULTIMATE"))
|
||||
|| (++offset && fastcmp(params[0], "MAPPERFECT")))
|
||||
|| (++offset && fastcmp(params[0], "MAPBEATEN")))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
ty = UC_MAPVISITED + offset;
|
||||
|
|
@ -3325,12 +3120,10 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
return;
|
||||
}
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "MAPSCORE")
|
||||
|| (++offset && fastcmp(params[0], "MAPTIME"))
|
||||
|| (++offset && fastcmp(params[0], "MAPRINGS")))
|
||||
else if (fastcmp(params[0], "MAPTIME"))
|
||||
{
|
||||
PARAMCHECK(2);
|
||||
ty = UC_MAPSCORE + offset;
|
||||
ty = UC_MAPTIME;
|
||||
re = atoi(params[2]);
|
||||
|
||||
// Convert to map number if it appears to be one
|
||||
|
|
@ -3341,52 +3134,10 @@ static void readcondition(UINT8 set, UINT32 id, char *word2)
|
|||
|
||||
if (x1 < 0 || x1 >= NUMMAPS)
|
||||
{
|
||||
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
||||
deh_warning("Level number %d out of range (1 - %d)", x1, NUMMAPS);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else if ((offset=0) || fastcmp(params[0], "NIGHTSSCORE")
|
||||
|| (++offset && fastcmp(params[0], "NIGHTSTIME"))
|
||||
|| (++offset && fastcmp(params[0], "NIGHTSGRADE")))
|
||||
{
|
||||
PARAMCHECK(2); // one optional one
|
||||
|
||||
ty = UC_NIGHTSSCORE + offset;
|
||||
i = (params[3] ? 3 : 2);
|
||||
if (fastncmp("GRADE_",params[i],6))
|
||||
{
|
||||
char *p = params[i]+6;
|
||||
for (re = 0; NIGHTSGRADE_LIST[re]; re++)
|
||||
if (*p == NIGHTSGRADE_LIST[re])
|
||||
break;
|
||||
if (!NIGHTSGRADE_LIST[re])
|
||||
{
|
||||
deh_warning("Invalid NiGHTS grade %s\n", params[i]);
|
||||
return;
|
||||
}
|
||||
}
|
||||
else
|
||||
re = atoi(params[i]);
|
||||
|
||||
// Convert to map number if it appears to be one
|
||||
if (params[1][0] >= 'A' && params[1][0] <= 'Z')
|
||||
x1 = (INT16)M_MapNumber(params[1][0], params[1][1]);
|
||||
else
|
||||
x1 = (INT16)atoi(params[1]);
|
||||
|
||||
if (x1 < 0 || x1 >= NUMMAPS)
|
||||
{
|
||||
deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS);
|
||||
return;
|
||||
}
|
||||
|
||||
// Mare number (0 for overall)
|
||||
if (params[3]) // Only if we actually got 3 params (so the second one == mare and not requirement)
|
||||
x2 = (INT16)atoi(params[2]);
|
||||
else
|
||||
x2 = 0;
|
||||
|
||||
}
|
||||
else if (fastcmp(params[0], "TRIGGER"))
|
||||
{
|
||||
PARAMCHECK(1);
|
||||
|
|
@ -3737,8 +3488,6 @@ void readmaincfg(MYFILE *f)
|
|||
{
|
||||
if (fastcmp(word2, "USER"))
|
||||
ttmode = TTMODE_USER;
|
||||
else if (fastcmp(word2, "ALACROIX"))
|
||||
ttmode = TTMODE_ALACROIX;
|
||||
else if (fastcmp(word2, "HIDE") || fastcmp(word2, "HIDDEN") || fastcmp(word2, "NONE"))
|
||||
{
|
||||
ttmode = TTMODE_USER;
|
||||
|
|
@ -3749,32 +3498,6 @@ void readmaincfg(MYFILE *f)
|
|||
ttmode = TTMODE_OLD;
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSSCALE"))
|
||||
{
|
||||
ttscale = max(1, min(8, (UINT8)get_number(word2)));
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSSCALESAVAILABLE"))
|
||||
{
|
||||
// SPECIAL CASE for Alacroix: Comma-separated list of resolutions that are available
|
||||
// for gfx loading.
|
||||
ttavailable[0] = ttavailable[1] = ttavailable[2] = ttavailable[3] =\
|
||||
ttavailable[4] = ttavailable[5] = false;
|
||||
|
||||
if (strstr(word2, "1") != NULL)
|
||||
ttavailable[0] = true;
|
||||
if (strstr(word2, "2") != NULL)
|
||||
ttavailable[1] = true;
|
||||
if (strstr(word2, "3") != NULL)
|
||||
ttavailable[2] = true;
|
||||
if (strstr(word2, "4") != NULL)
|
||||
ttavailable[3] = true;
|
||||
if (strstr(word2, "5") != NULL)
|
||||
ttavailable[4] = true;
|
||||
if (strstr(word2, "6") != NULL)
|
||||
ttavailable[5] = true;
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "TITLEPICSNAME"))
|
||||
{
|
||||
strncpy(ttname, word2, 9);
|
||||
|
|
@ -3810,10 +3533,6 @@ void readmaincfg(MYFILE *f)
|
|||
titlescrollyspeed = get_number(word2);
|
||||
titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "DISABLESPEEDADJUST"))
|
||||
{
|
||||
disableSpeedAdjust = (value || word2[0] == 'T' || word2[0] == 'Y');
|
||||
}
|
||||
else if (fastcmp(word, "NUMDEMOS"))
|
||||
{
|
||||
numDemos = (UINT8)get_number(word2);
|
||||
|
|
@ -3855,10 +3574,12 @@ void readmaincfg(MYFILE *f)
|
|||
strlcpy(gamedatafilename, word2, sizeof (gamedatafilename));
|
||||
strlwr(gamedatafilename);
|
||||
savemoddata = true;
|
||||
majormods = false;
|
||||
|
||||
// Also save a time attack folder
|
||||
filenamelen = strlen(gamedatafilename)-4; // Strip off the extension
|
||||
strncpy(timeattackfolder, gamedatafilename, min(filenamelen, sizeof (timeattackfolder)));
|
||||
filenamelen = min(filenamelen, sizeof (timeattackfolder));
|
||||
strncpy(timeattackfolder, gamedatafilename, filenamelen);
|
||||
timeattackfolder[min(filenamelen, sizeof (timeattackfolder) - 1)] = '\0';
|
||||
|
||||
strcpy(savegamename, timeattackfolder);
|
||||
|
|
@ -3869,6 +3590,7 @@ void readmaincfg(MYFILE *f)
|
|||
strcpy(liveeventbackup, va("live%s.bkp", timeattackfolder));
|
||||
strcatbf(liveeventbackup, srb2home, PATHSEP);
|
||||
|
||||
refreshdirmenu |= REFRESHDIR_GAMEDATA;
|
||||
gamedataadded = true;
|
||||
titlechanged = true;
|
||||
}
|
||||
|
|
@ -3896,11 +3618,6 @@ void readmaincfg(MYFILE *f)
|
|||
bootmap = (INT16)value;
|
||||
//titlechanged = true;
|
||||
}
|
||||
else if (fastcmp(word, "STARTCHAR"))
|
||||
{
|
||||
startchar = (INT16)value;
|
||||
char_on = -1;
|
||||
}
|
||||
else if (fastcmp(word, "TUTORIALMAP"))
|
||||
{
|
||||
// Support using the actual map name,
|
||||
|
|
@ -3989,21 +3706,13 @@ void readwipes(MYFILE *f)
|
|||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_intermission_final;
|
||||
}
|
||||
else if (fastncmp(word, "SPECINTER_", 10))
|
||||
else if (fastncmp(word, "VOTING_", 7))
|
||||
{
|
||||
pword = word + 10;
|
||||
pword = word + 7;
|
||||
if (fastcmp(pword, "TOBLACK"))
|
||||
wipeoffset = wipe_specinter_toblack;
|
||||
wipeoffset = wipe_voting_toblack;
|
||||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_specinter_final;
|
||||
}
|
||||
else if (fastncmp(word, "MULTINTER_", 10))
|
||||
{
|
||||
pword = word + 10;
|
||||
if (fastcmp(pword, "TOBLACK"))
|
||||
wipeoffset = wipe_multinter_toblack;
|
||||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_multinter_final;
|
||||
wipeoffset = wipe_voting_final;
|
||||
}
|
||||
else if (fastncmp(word, "CONTINUING_", 11))
|
||||
{
|
||||
|
|
@ -4055,11 +3764,13 @@ void readwipes(MYFILE *f)
|
|||
else if (fastcmp(pword, "FINAL"))
|
||||
wipeoffset = wipe_gameend_final;
|
||||
}
|
||||
else if (fastncmp(word, "SPECLEVEL_", 10))
|
||||
else if (fastncmp(word, "ENCORE_", 7))
|
||||
{
|
||||
pword = word + 10;
|
||||
if (fastcmp(pword, "TOWHITE"))
|
||||
wipeoffset = wipe_speclevel_towhite;
|
||||
pword = word + 7;
|
||||
if (fastcmp(pword, "TOINVERT"))
|
||||
wipeoffset = wipe_encore_toinvert;
|
||||
else if (fastcmp(pword, "TOWHITE"))
|
||||
wipeoffset = wipe_encore_towhite;
|
||||
}
|
||||
|
||||
if (wipeoffset < 0)
|
||||
|
|
@ -4069,10 +3780,10 @@ void readwipes(MYFILE *f)
|
|||
}
|
||||
|
||||
if (value == UINT8_MAX
|
||||
&& (wipeoffset <= wipe_level_toblack || wipeoffset >= wipe_speclevel_towhite))
|
||||
&& (wipeoffset <= wipe_level_toblack || wipeoffset >= wipe_encore_toinvert))
|
||||
{
|
||||
// Cannot disable non-toblack wipes
|
||||
// (or the level toblack wipe, or the special towhite wipe)
|
||||
// (or the level toblack wipe, or the special encore wipe)
|
||||
deh_warning("Wipes: can't disable wipe of type '%s'", word);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -4527,7 +4238,7 @@ playersprite_t get_sprite2(const char *word)
|
|||
if (!spr2names[i][4] && memcmp(word,spr2names[i],4)==0)
|
||||
return i;
|
||||
deh_warning("Couldn't find sprite named 'SPR2_%s'",word);
|
||||
return SPR2_STND;
|
||||
return SPR2_STIN;
|
||||
}
|
||||
|
||||
sfxenum_t get_sfx(const char *word)
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@
|
|||
#include "v_video.h" // video flags (for lua)
|
||||
#include "i_sound.h" // musictype_t (for lua)
|
||||
#include "g_state.h" // gamestate_t (for lua)
|
||||
#include "r_data.h" // patchalphastyle
|
||||
|
||||
#include "deh_tables.h"
|
||||
|
||||
|
|
@ -73,10 +74,6 @@ actionpointer_t actionpointers[] =
|
|||
{{A_Explode}, "A_EXPLODE"},
|
||||
{{A_Pain}, "A_PAIN"},
|
||||
{{A_Fall}, "A_FALL"},
|
||||
{{A_MonitorPop}, "A_MONITORPOP"},
|
||||
{{A_GoldMonitorPop}, "A_GOLDMONITORPOP"},
|
||||
{{A_GoldMonitorRestore}, "A_GOLDMONITORRESTORE"},
|
||||
{{A_GoldMonitorSparkle}, "A_GOLDMONITORSPARKLE"},
|
||||
{{A_Look}, "A_LOOK"},
|
||||
{{A_Chase}, "A_CHASE"},
|
||||
{{A_FaceStabChase}, "A_FACESTABCHASE"},
|
||||
|
|
@ -89,7 +86,6 @@ actionpointer_t actionpointers[] =
|
|||
{{A_Scream}, "A_SCREAM"},
|
||||
{{A_BossDeath}, "A_BOSSDEATH"},
|
||||
{{A_CustomPower}, "A_CUSTOMPOWER"},
|
||||
{{A_GiveWeapon}, "A_GIVEWEAPON"},
|
||||
{{A_RingBox}, "A_RINGBOX"},
|
||||
{{A_Invincibility}, "A_INVINCIBILITY"},
|
||||
{{A_SuperSneakers}, "A_SUPERSNEAKERS"},
|
||||
|
|
@ -99,18 +95,14 @@ actionpointer_t actionpointers[] =
|
|||
{{A_BubbleRise}, "A_BUBBLERISE"},
|
||||
{{A_BubbleCheck}, "A_BUBBLECHECK"},
|
||||
{{A_AwardScore}, "A_AWARDSCORE"},
|
||||
{{A_ExtraLife}, "A_EXTRALIFE"},
|
||||
{{A_GiveShield}, "A_GIVESHIELD"},
|
||||
{{A_GravityBox}, "A_GRAVITYBOX"},
|
||||
{{A_ScoreRise}, "A_SCORERISE"},
|
||||
{{A_AttractChase}, "A_ATTRACTCHASE"},
|
||||
{{A_DropMine}, "A_DROPMINE"},
|
||||
{{A_FishJump}, "A_FISHJUMP"},
|
||||
{{A_ThrownRing}, "A_THROWNRING"},
|
||||
{{A_SetSolidSteam}, "A_SETSOLIDSTEAM"},
|
||||
{{A_UnsetSolidSteam}, "A_UNSETSOLIDSTEAM"},
|
||||
{{A_SignSpin}, "A_SIGNSPIN"},
|
||||
{{A_SignPlayer}, "A_SIGNPLAYER"},
|
||||
{{A_OverlayThink}, "A_OVERLAYTHINK"},
|
||||
{{A_JetChase}, "A_JETCHASE"},
|
||||
{{A_JetbThink}, "A_JETBTHINK"},
|
||||
|
|
@ -134,7 +126,6 @@ actionpointer_t actionpointers[] =
|
|||
{{A_RingExplode}, "A_RINGEXPLODE"},
|
||||
{{A_OldRingExplode}, "A_OLDRINGEXPLODE"},
|
||||
{{A_MixUp}, "A_MIXUP"},
|
||||
{{A_RecyclePowers}, "A_RECYCLEPOWERS"},
|
||||
{{A_Boss1Chase}, "A_BOSS1CHASE"},
|
||||
{{A_FocusTarget}, "A_FOCUSTARGET"},
|
||||
{{A_Boss2Chase}, "A_BOSS2CHASE"},
|
||||
|
|
@ -173,7 +164,6 @@ actionpointer_t actionpointers[] =
|
|||
{{A_VultureBlast}, "A_VULTUREBLAST"},
|
||||
{{A_VultureFly}, "A_VULTUREFLY"},
|
||||
{{A_SkimChase}, "A_SKIMCHASE"},
|
||||
{{A_1upThinker}, "A_1UPTHINKER"},
|
||||
{{A_SkullAttack}, "A_SKULLATTACK"},
|
||||
{{A_LobShot}, "A_LOBSHOT"},
|
||||
{{A_FireShot}, "A_FIRESHOT"},
|
||||
|
|
@ -307,7 +297,6 @@ actionpointer_t actionpointers[] =
|
|||
{{A_Boss5MakeJunk}, "A_BOSS5MAKEJUNK"},
|
||||
{{A_LookForBetter}, "A_LOOKFORBETTER"},
|
||||
{{A_Boss5BombExplode}, "A_BOSS5BOMBEXPLODE"},
|
||||
{{A_DustDevilThink}, "A_DUSTDEVILTHINK"},
|
||||
{{A_TNTExplode}, "A_TNTEXPLODE"},
|
||||
{{A_DebrisRandom}, "A_DEBRISRANDOM"},
|
||||
{{A_TrainCameo}, "A_TRAINCAMEO"},
|
||||
|
|
@ -331,6 +320,25 @@ actionpointer_t actionpointers[] =
|
|||
{{A_DragonWing}, "A_DRAGONWING"},
|
||||
{{A_DragonSegment}, "A_DRAGONSEGMENT"},
|
||||
{{A_ChangeHeight}, "A_CHANGEHEIGHT"},
|
||||
|
||||
// SRB2Kart
|
||||
{{A_ItemPop}, "A_ITEMPOP"},
|
||||
{{A_JawzChase}, "A_JAWZCHASE"},
|
||||
{{A_JawzExplode}, "A_JAWZEXPLODE"},
|
||||
{{A_SPBChase}, "A_SPBCHASE"},
|
||||
{{A_SSMineSearch}, "A_SSMINESEARCH"},
|
||||
{{A_SSMineExplode}, "A_SSMINEEXPLODE"},
|
||||
{{A_BallhogExplode}, "A_BALLHOGEXPLODE"},
|
||||
{{A_LightningFollowPlayer}, "A_LIGHTNINGFOLLOWPLAYER"},
|
||||
{{A_FZBoomFlash}, "A_FZBOOMFLASH"},
|
||||
{{A_FZBoomSmoke}, "A_FZBOOMSMOKE"},
|
||||
{{A_RandomShadowFrame}, "A_RANDOMSHADOWFRAME"},
|
||||
{{A_RoamingShadowThinker}, "A_ROAMINGSHADOWTHINKER"},
|
||||
{{A_MayonakaArrow}, "A_MAYONAKAARROW"},
|
||||
{{A_MementosTPParticles}, "A_MEMENTOSTPPARTICLES"},
|
||||
{{A_ReaperThinker}, "A_REAPERTHINKER"},
|
||||
{{A_FlameShieldPaper}, "A_FLAMESHIELDPAPER"},
|
||||
|
||||
{{NULL}, "NONE"},
|
||||
|
||||
// This NULL entry must be the last in the list
|
||||
|
|
|
|||
|
|
@ -3049,7 +3049,8 @@ void G_DoPlayDemo(char *defdemoname)
|
|||
R_ExecuteSetViewSize();
|
||||
|
||||
LUAh_MapChange(gamemap);
|
||||
displayplayer = consoleplayer = 0;
|
||||
memset(displayplayers, 0, sizeof(displayplayers));
|
||||
consoleplayer = 0;
|
||||
memset(playeringame,0,sizeof(playeringame));
|
||||
playeringame[0] = true;
|
||||
P_SetRandSeed(randseed);
|
||||
|
|
|
|||
|
|
@ -916,8 +916,7 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics, UINT8 ssplayer)
|
|||
|
||||
// why build a ticcmd if we're paused?
|
||||
// Or, for that matter, if we're being reborn.
|
||||
// Kart, don't build a ticcmd if someone is resynching or the server is stopped too so we don't fly off course in bad conditions
|
||||
if (paused || P_AutoPause() || (gamestate == GS_LEVEL && player->playerstate == PST_REBORN) || hu_resynching)
|
||||
if (paused || P_AutoPause() || (gamestate == GS_LEVEL && player->playerstate == PST_REBORN))
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2183,11 +2183,6 @@ HU_drawMiniPing (INT32 x, INT32 y, UINT32 ping, INT32 flags)
|
|||
{
|
||||
w /= 2;
|
||||
}
|
||||
else if (ping < UINT32_MAX)
|
||||
{
|
||||
numbars = 1;
|
||||
barcolor = 35;
|
||||
}
|
||||
|
||||
patch = mping[Ping_gfx_num(ping)];
|
||||
|
||||
|
|
|
|||
64
src/info.h
64
src/info.h
|
|
@ -29,10 +29,6 @@ enum actionnum
|
|||
A_EXPLODE = 0,
|
||||
A_PAIN,
|
||||
A_FALL,
|
||||
A_MONITORPOP,
|
||||
A_GOLDMONITORPOP,
|
||||
A_GOLDMONITORRESTORE,
|
||||
A_GOLDMONITORSPARKLE,
|
||||
A_LOOK,
|
||||
A_CHASE,
|
||||
A_FACESTABCHASE,
|
||||
|
|
@ -45,7 +41,6 @@ enum actionnum
|
|||
A_SCREAM,
|
||||
A_BOSSDEATH,
|
||||
A_CUSTOMPOWER,
|
||||
A_GIVEWEAPON,
|
||||
A_RINGBOX,
|
||||
A_INVINCIBILITY,
|
||||
A_SUPERSNEAKERS,
|
||||
|
|
@ -55,18 +50,14 @@ enum actionnum
|
|||
A_BUBBLERISE,
|
||||
A_BUBBLECHECK,
|
||||
A_AWARDSCORE,
|
||||
A_EXTRALIFE,
|
||||
A_GIVESHIELD,
|
||||
A_GRAVITYBOX,
|
||||
A_SCORERISE,
|
||||
A_ATTRACTCHASE,
|
||||
A_DROPMINE,
|
||||
A_FISHJUMP,
|
||||
A_THROWNRING,
|
||||
A_SETSOLIDSTEAM,
|
||||
A_UNSETSOLIDSTEAM,
|
||||
A_SIGNSPIN,
|
||||
A_SIGNPLAYER,
|
||||
A_OVERLAYTHINK,
|
||||
A_JETCHASE,
|
||||
A_JETBTHINK,
|
||||
|
|
@ -90,7 +81,6 @@ enum actionnum
|
|||
A_RINGEXPLODE,
|
||||
A_OLDRINGEXPLODE,
|
||||
A_MIXUP,
|
||||
A_RECYCLEPOWERS,
|
||||
A_BOSS1CHASE,
|
||||
A_FOCUSTARGET,
|
||||
A_BOSS2CHASE,
|
||||
|
|
@ -129,7 +119,6 @@ enum actionnum
|
|||
A_VULTUREBLAST,
|
||||
A_VULTUREFLY,
|
||||
A_SKIMCHASE,
|
||||
A_1UPTHINKER,
|
||||
A_SKULLATTACK,
|
||||
A_LOBSHOT,
|
||||
A_FIRESHOT,
|
||||
|
|
@ -263,7 +252,6 @@ enum actionnum
|
|||
A_BOSS5MAKEJUNK,
|
||||
A_LOOKFORBETTER,
|
||||
A_BOSS5BOMBEXPLODE,
|
||||
A_DUSTDEVILTHINK,
|
||||
A_TNTEXPLODE,
|
||||
A_DEBRISRANDOM,
|
||||
A_TRAINCAMEO,
|
||||
|
|
@ -287,6 +275,22 @@ enum actionnum
|
|||
A_DRAGONWING,
|
||||
A_DRAGONSEGMENT,
|
||||
A_CHANGEHEIGHT,
|
||||
A_ITEMPOP,
|
||||
A_JAWZCHASE,
|
||||
A_JAWZEXPLODE,
|
||||
A_SPBCHASE,
|
||||
A_SSMINESEARCH,
|
||||
A_SSMINEEXPLODE,
|
||||
A_BALLHOGEXPLODE,
|
||||
A_LIGHTNINGFOLLOWPLAYER,
|
||||
A_FZBOOMFLASH,
|
||||
A_FZBOOMSMOKE,
|
||||
A_RANDOMSHADOWFRAME,
|
||||
A_ROAMINGSHADOWTHINKER,
|
||||
A_MAYONAKAARROW,
|
||||
A_MEMENTOSTPPARTICLES,
|
||||
A_REAPERTHINKER,
|
||||
A_FLAMESHIELDPAPER,
|
||||
NUMACTIONS
|
||||
};
|
||||
|
||||
|
|
@ -322,7 +326,6 @@ void A_ScoreRise(); // Rise the score logo
|
|||
void A_AttractChase(); // Ring Chase
|
||||
void A_DropMine(); // Drop Mine from Skim or Jetty-Syn Bomber
|
||||
void A_FishJump(); // Fish Jump
|
||||
void A_GrenadeRing(); // SRB2kart
|
||||
void A_SetSolidSteam();
|
||||
void A_UnsetSolidSteam();
|
||||
void A_OverlayThink();
|
||||
|
|
@ -436,21 +439,6 @@ void A_RandomStateRange();
|
|||
void A_DualAction();
|
||||
void A_RemoteAction();
|
||||
void A_ToggleFlameJet();
|
||||
void A_ItemPop(); // SRB2kart
|
||||
void A_JawzChase(); // SRB2kart
|
||||
void A_JawzExplode(); // SRB2kart
|
||||
void A_SPBChase(); // SRB2kart
|
||||
void A_SSMineExplode(); // SRB2kart
|
||||
void A_BallhogExplode(); // SRB2kart
|
||||
void A_LightningFollowPlayer(); // SRB2kart: Lightning shield effect player chasing
|
||||
void A_FZBoomFlash(); // SRB2kart
|
||||
void A_FZBoomSmoke(); // SRB2kart
|
||||
void A_RandomShadowFrame(); //SRB2kart: Shadow spawner frame randomizer
|
||||
void A_RoamingShadowThinker(); // SRB2kart: Roaming Shadow moving + attacking players.
|
||||
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_FlameShieldPaper();
|
||||
void A_OrbitNights();
|
||||
void A_GhostMe();
|
||||
void A_SetObjectState();
|
||||
|
|
@ -558,6 +546,26 @@ void A_DragonWing();
|
|||
void A_DragonSegment();
|
||||
void A_ChangeHeight();
|
||||
|
||||
//
|
||||
// SRB2Kart
|
||||
//
|
||||
void A_ItemPop();
|
||||
void A_JawzChase();
|
||||
void A_JawzExplode();
|
||||
void A_SPBChase();
|
||||
void A_SSMineSearch();
|
||||
void A_SSMineExplode();
|
||||
void A_BallhogExplode();
|
||||
void A_LightningFollowPlayer();
|
||||
void A_FZBoomFlash();
|
||||
void A_FZBoomSmoke();
|
||||
void A_RandomShadowFrame();
|
||||
void A_RoamingShadowThinker();
|
||||
void A_MayonakaArrow();
|
||||
void A_ReaperThinker();
|
||||
void A_MementosTPParticles();
|
||||
void A_FlameShieldPaper();
|
||||
|
||||
extern boolean actionsoverridden[NUMACTIONS];
|
||||
|
||||
// ratio of states to sprites to mobj types is roughly 6 : 1 : 1
|
||||
|
|
|
|||
2817
src/p_enemy.c
2817
src/p_enemy.c
File diff suppressed because it is too large
Load diff
|
|
@ -6599,7 +6599,7 @@ static boolean P_MobjRegularThink(mobj_t *mobj)
|
|||
|
||||
if ((mobj->state >= &states[S_SSMINE1] && mobj->state <= &states[S_SSMINE4])
|
||||
|| (mobj->state >= &states[S_SSMINE_DEPLOY8] && mobj->state <= &states[S_SSMINE_DEPLOY13]))
|
||||
A_GrenadeRing(mobj);
|
||||
A_SSMineSearch(mobj);
|
||||
|
||||
if (mobj->threshold > 0)
|
||||
mobj->threshold--;
|
||||
|
|
@ -11717,6 +11717,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
{
|
||||
const fixed_t mobjscale =
|
||||
mapheaderinfo[gamemap-1]->default_waypoint_radius;
|
||||
mtag_t tag = Tag_FGet(&mthing->tags);
|
||||
|
||||
if (mthing->args[1] > 0)
|
||||
mobj->radius = (mthing->args[1]) * FRACUNIT;
|
||||
|
|
@ -11732,7 +11733,7 @@ static boolean P_SetupSpawnedMapThing(mapthing_t *mthing, mobj_t *mobj, boolean
|
|||
// extravalue1 is used for indicating the waypoint is disabled
|
||||
// extravalue2 is used for indicating the waypoint is the finishline
|
||||
mobj->threshold = mthing->args[0];
|
||||
mobj->movecount = mthing->tag;
|
||||
mobj->movecount = tag;
|
||||
if (mthing->options & MTF_EXTRA)
|
||||
{
|
||||
mobj->extravalue1 = 0; // The waypoint is disabled if extra is on
|
||||
|
|
|
|||
36
src/r_defs.h
36
src/r_defs.h
|
|
@ -731,28 +731,28 @@ typedef struct
|
|||
|
||||
typedef enum
|
||||
{
|
||||
RF_HORIZONTALFLIP = 0x0001, // Flip sprite horizontally
|
||||
RF_VERTICALFLIP = 0x0002, // Flip sprite vertically
|
||||
RF_ABSOLUTEOFFSETS = 0x0004, // Sprite uses the object's offsets absolutely, instead of relatively
|
||||
RF_FLIPOFFSETS = 0x0008, // Relative object offsets are flipped with the sprite
|
||||
RF_HORIZONTALFLIP = 0x00000001, // Flip sprite horizontally
|
||||
RF_VERTICALFLIP = 0x00000002, // Flip sprite vertically
|
||||
RF_ABSOLUTEOFFSETS = 0x00000004, // Sprite uses the object's offsets absolutely, instead of relatively
|
||||
RF_FLIPOFFSETS = 0x00000008, // Relative object offsets are flipped with the sprite
|
||||
|
||||
RF_SPLATMASK = 0x00F0, // --Floor sprite flags
|
||||
RF_SLOPESPLAT = 0x0010, // Rotate floor sprites by a slope
|
||||
RF_OBJECTSLOPESPLAT = 0x0020, // Rotate floor sprites by the object's standing slope
|
||||
RF_NOSPLATBILLBOARD = 0x0040, // Don't billboard floor sprites (faces forward from the view angle)
|
||||
RF_NOSPLATROLLANGLE = 0x0080, // Don't rotate floor sprites by the object's rollangle (uses rotated patches instead)
|
||||
RF_SPLATMASK = 0x000000F0, // --Floor sprite flags
|
||||
RF_SLOPESPLAT = 0x00000010, // Rotate floor sprites by a slope
|
||||
RF_OBJECTSLOPESPLAT = 0x00000020, // Rotate floor sprites by the object's standing slope
|
||||
RF_NOSPLATBILLBOARD = 0x00000040, // Don't billboard floor sprites (faces forward from the view angle)
|
||||
RF_NOSPLATROLLANGLE = 0x00000080, // Don't rotate floor sprites by the object's rollangle (uses rotated patches instead)
|
||||
|
||||
RF_BLENDMASK = 0x0F00, // --Blending modes
|
||||
RF_FULLBRIGHT = 0x0100, // Sprite is drawn at full brightness
|
||||
RF_FULLDARK = 0x0200, // Sprite is drawn completely dark
|
||||
RF_NOCOLORMAPS = 0x0400, // Sprite is not drawn with colormaps
|
||||
RF_BLENDMASK = 0x00000F00, // --Blending modes
|
||||
RF_FULLBRIGHT = 0x00000100, // Sprite is drawn at full brightness
|
||||
RF_FULLDARK = 0x00000200, // Sprite is drawn completely dark
|
||||
RF_NOCOLORMAPS = 0x00000400, // Sprite is not drawn with colormaps
|
||||
|
||||
RF_SPRITETYPEMASK = 0x7000, // ---Different sprite types
|
||||
RF_PAPERSPRITE = 0x1000, // Paper sprite
|
||||
RF_FLOORSPRITE = 0x2000, // Floor sprite
|
||||
RF_SPRITETYPEMASK = 0x00007000, // ---Different sprite types
|
||||
RF_PAPERSPRITE = 0x00001000, // Paper sprite
|
||||
RF_FLOORSPRITE = 0x00002000, // Floor sprite
|
||||
|
||||
RF_SHADOWDRAW = 0x10000, // Stretches and skews the sprite like a shadow.
|
||||
RF_SHADOWEFFECTS = 0x20000, // Scales and becomes transparent like a shadow.
|
||||
RF_SHADOWDRAW = 0x00010000, // Stretches and skews the sprite like a shadow.
|
||||
RF_SHADOWEFFECTS = 0x00020000, // Scales and becomes transparent like a shadow.
|
||||
RF_DROPSHADOW = (RF_SHADOWDRAW | RF_SHADOWEFFECTS | RF_FULLDARK),
|
||||
} renderflags_t;
|
||||
|
||||
|
|
|
|||
|
|
@ -3108,6 +3108,11 @@ boolean R_ThingIsFullBright(mobj_t *thing)
|
|||
return (thing->frame & FF_FULLBRIGHT || thing->renderflags & RF_FULLBRIGHT);
|
||||
}
|
||||
|
||||
boolean R_ThingIsSemiBright(mobj_t *thing)
|
||||
{
|
||||
return (thing->frame & FF_SEMIBRIGHT || thing->renderflags & RF_SEMIBRIGHT);
|
||||
}
|
||||
|
||||
boolean R_ThingIsFullDark(mobj_t *thing)
|
||||
{
|
||||
return (thing->renderflags & RF_FULLDARK);
|
||||
|
|
|
|||
|
|
@ -81,6 +81,7 @@ boolean R_ThingIsPaperSprite (mobj_t *thing);
|
|||
boolean R_ThingIsFloorSprite (mobj_t *thing);
|
||||
|
||||
boolean R_ThingIsFullBright (mobj_t *thing);
|
||||
boolean R_ThingIsSemiBright (mobj_t *thing);
|
||||
boolean R_ThingIsFullDark (mobj_t *thing);
|
||||
|
||||
// --------------
|
||||
|
|
|
|||
|
|
@ -464,7 +464,6 @@ void Y_IntermissionDrawer(void)
|
|||
else if (bgtile)
|
||||
V_DrawPatchFill(bgtile);
|
||||
|
||||
dontdrawbg:
|
||||
LUAh_IntermissionHUD();
|
||||
if (!LUA_HudEnabled(hud_intermissiontally))
|
||||
goto skiptallydrawer;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue