Merge branch 'master' of http://git.magicalgirl.moe/STJr/SRB2Internal.git into skin_patch

This commit is contained in:
toasterbabe 2017-05-11 22:02:12 +01:00
commit 9445455fb1
92 changed files with 3480 additions and 1801 deletions

View File

@ -1,3 +1,3 @@
/srb2sdl.exe
/srb2win.exe
/r_opengl.dll
*.exe
*.mo
r_opengl.dll

View File

@ -1,3 +1,3 @@
/srb2sdl.exe
/srb2win.exe
/r_opengl.dll
*.exe
*.mo
r_opengl.dll

8
objs/.gitignore vendored Normal file
View File

@ -0,0 +1,8 @@
#All folders
SRB2.res
depend.dep
depend.ped
*.o
#VC9 folder only
/VC9/Win32
/VC9/x64

View File

@ -1 +1,2 @@
/depend.dep
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1 +1,2 @@
/depend.dep
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,3 +1,2 @@
/SRB2.res
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1 +1,2 @@
/depend.dep
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1 +1,2 @@
/depend.ped
# DON'T REMOVE
# This keeps the folder from disappearing

2
objs/VC/.gitignore vendored
View File

@ -0,0 +1,2 @@
# DON'T REMOVE
# This keeps the folder from disappearing

4
objs/VC9/.gitignore vendored
View File

@ -1,2 +1,2 @@
/Win32
/x64
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1 +1,2 @@
/depend.dep
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1 +1,2 @@
/depend.dep
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1 +1,2 @@
/depend.dep
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1,2 +1,2 @@
/depend.dep
/*.o
# DON'T REMOVE
# This keeps the folder from disappearing

View File

@ -1394,32 +1394,32 @@ static void CON_DrawInput(void)
if (input_sel < c)
V_DrawFill(x, y, charwidth*3, (10 * con_scalefactor), 77 | V_NOSCALESTART);
for (i = 0; i < 3; ++i, x += charwidth)
V_DrawCharacter(x, y, '.' | cv_constextsize.value | V_GRAYMAP | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y, '.' | cv_constextsize.value | V_GRAYMAP | V_NOSCALESTART, true);
}
else
V_DrawCharacter(x-charwidth, y, CON_PROMPTCHAR | cv_constextsize.value | V_GRAYMAP | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x-charwidth, y, CON_PROMPTCHAR | cv_constextsize.value | V_GRAYMAP | V_NOSCALESTART, true);
for (cend = c + clen; c < cend; ++c, x += charwidth)
{
if ((input_sel > c && input_cur <= c) || (input_sel <= c && input_cur > c))
{
V_DrawFill(x, y, charwidth, (10 * con_scalefactor), 77 | V_NOSCALESTART);
V_DrawCharacter(x, y, p[c] | cv_constextsize.value | V_YELLOWMAP | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y, p[c] | cv_constextsize.value | V_YELLOWMAP | V_NOSCALESTART, true);
}
else
V_DrawCharacter(x, y, p[c] | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y, p[c] | cv_constextsize.value | V_NOSCALESTART, true);
if (c == input_cur && con_tick >= 4)
V_DrawCharacter(x, y + (con_scalefactor*2), '_' | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y + (con_scalefactor*2), '_' | cv_constextsize.value | V_NOSCALESTART, true);
}
if (cend == input_cur && con_tick >= 4)
V_DrawCharacter(x, y + (con_scalefactor*2), '_' | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y + (con_scalefactor*2), '_' | cv_constextsize.value | V_NOSCALESTART, true);
if (rellip)
{
if (input_sel > cend)
V_DrawFill(x, y, charwidth*3, (10 * con_scalefactor), 77 | V_NOSCALESTART);
for (i = 0; i < 3; ++i, x += charwidth)
V_DrawCharacter(x, y, '.' | cv_constextsize.value | V_GRAYMAP | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y, '.' | cv_constextsize.value | V_GRAYMAP | V_NOSCALESTART, true);
}
}
@ -1465,11 +1465,11 @@ static void CON_DrawHudlines(void)
else
{
//charwidth = SHORT(hu_font['A'-HU_FONTSTART]->width) * con_scalefactor;
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
}
}
//V_DrawCharacter(x, y, (p[c]&0xff) | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
//V_DrawCharacter(x, y, (p[c]&0xff) | cv_constextsize.value | V_NOSCALESTART, true);
y += charheight;
}
@ -1607,7 +1607,7 @@ static void CON_DrawConsole(void)
charflags = (*p & 0x7f) << V_CHARCOLORSHIFT;
p++;
}
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(x, y, (INT32)(*p) | charflags | cv_constextsize.value | V_NOSCALESTART, true);
}
}

View File

@ -1563,8 +1563,6 @@ static void CL_LoadReceivedSavegame(void)
automapactive = false;
// load a base level
playerdeadview = false;
if (P_LoadNetGame())
{
const INT32 actnum = mapheaderinfo[gamemap-1]->actnum;
@ -2535,7 +2533,7 @@ static void Command_Ban(void)
return;
else
WRITEUINT8(p, pn);
if (I_Ban && !I_Ban(node))
if (server && I_Ban && !I_Ban(node)) // only the server is allowed to do this right now
{
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
WRITEUINT8(p, KICK_MSG_GO_AWAY);
@ -2543,7 +2541,8 @@ static void Command_Ban(void)
}
else
{
Ban_Add(COM_Argv(2));
if (server) // only the server is allowed to do this right now
Ban_Add(COM_Argv(2));
if (COM_Argc() == 2)
{
@ -2700,12 +2699,14 @@ static void Got_KickCmd(UINT8 **p, INT32 playernum)
// If a verified admin banned someone, the server needs to know about it.
// If the playernum isn't zero (the server) then the server needs to record the ban.
if (server && playernum && msg == KICK_MSG_BANNED)
if (server && playernum && (msg == KICK_MSG_BANNED || msg == KICK_MSG_CUSTOM_BAN))
{
if (I_Ban && !I_Ban(playernode[(INT32)pnum]))
{
CONS_Alert(CONS_WARNING, M_GetText("Too many bans! Geez, that's a lot of people you're excluding...\n"));
}
#ifndef NONET
else
Ban_Add(reason);
#endif
}
switch (msg)

View File

@ -720,7 +720,6 @@ void D_StartTitle(void)
maptol = 0;
gameaction = ga_nothing;
playerdeadview = false;
displayplayer = consoleplayer = 0;
//demosequence = -1;
gametype = GT_COOP;

View File

@ -34,7 +34,7 @@ void D_SRB2Loop(void) FUNCNORETURN;
// D_SRB2Main()
// Not a globally visible function, just included for source reference,
// calls all startup code, parses command line options.
// If not overrided by user input, calls N_AdvanceDemo.
// If not overrided by user input, calls D_AdvanceDemo.
//
void D_SRB2Main(void);
@ -51,9 +51,6 @@ const char *D_Home(void);
//
// BASE LEVEL
//
void D_PageTicker(void);
// pagename is lumpname of a 320x200 patch to fill the screen
void D_PageDrawer(const char *pagename);
void D_AdvanceDemo(void);
void D_StartTitle(void);

View File

@ -49,7 +49,9 @@ doomcom_t *doomcom = NULL;
/// \brief network packet data, points inside doomcom
doomdata_t *netbuffer = NULL;
#ifdef DEBUGFILE
FILE *debugfile = NULL; // put some net info in a file during the game
#endif
#define MAXREBOUND 8
static doomdata_t reboundstore[MAXREBOUND];

View File

@ -183,14 +183,13 @@ static CV_PossibleValue_t teamscramble_cons_t[] = {{0, "Off"}, {1, "Random"}, {2
static CV_PossibleValue_t startingliveslimit_cons_t[] = {{1, "MIN"}, {99, "MAX"}, {0, NULL}};
static CV_PossibleValue_t sleeping_cons_t[] = {{-1, "MIN"}, {1000/TICRATE, "MAX"}, {0, NULL}};
static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Teleports"},
static CV_PossibleValue_t competitionboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, //{2, "Teleports"},
{3, "None"}, {0, NULL}};
static CV_PossibleValue_t matchboxes_cons_t[] = {{0, "Normal"}, {1, "Random"}, {2, "Non-Random"},
{3, "None"}, {0, NULL}};
static CV_PossibleValue_t chances_cons_t[] = {{0, "MIN"}, {9, "MAX"}, {0, NULL}};
static CV_PossibleValue_t match_scoring_cons_t[] = {{0, "Normal"}, {1, "Classic"}, {0, NULL}};
static CV_PossibleValue_t pause_cons_t[] = {{0, "Server"}, {1, "All"}, {0, NULL}};
static CV_PossibleValue_t timetic_cons_t[] = {{0, "Normal"}, {1, "Tics"}, {2, "Centiseconds"}, {0, NULL}};
@ -305,7 +304,6 @@ consvar_t cv_friendlyfire = {"friendlyfire", "Off", CV_NETVAR, CV_OnOff, NULL, 0
consvar_t cv_itemfinder = {"itemfinder", "Off", CV_CALL, CV_OnOff, ItemFinder_OnChange, 0, NULL, NULL, 0, 0, NULL};
// Scoring type options
consvar_t cv_match_scoring = {"matchscoring", "Normal", CV_NETVAR|CV_CHEAT, match_scoring_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_overtime = {"overtime", "Yes", CV_NETVAR, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_rollingdemos = {"rollingdemos", "On", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
@ -472,7 +470,6 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_itemrespawntime);
CV_RegisterVar(&cv_itemrespawn);
CV_RegisterVar(&cv_flagtime);
CV_RegisterVar(&cv_suddendeath);
// misc
CV_RegisterVar(&cv_friendlyfire);
@ -520,7 +517,6 @@ void D_RegisterServerCommands(void)
CV_RegisterVar(&cv_startinglives);
CV_RegisterVar(&cv_countdowntime);
CV_RegisterVar(&cv_runscripts);
CV_RegisterVar(&cv_match_scoring);
CV_RegisterVar(&cv_overtime);
CV_RegisterVar(&cv_pause);
CV_RegisterVar(&cv_mute);
@ -603,6 +599,7 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_screenshot_option);
CV_RegisterVar(&cv_screenshot_folder);
CV_RegisterVar(&cv_screenshot_colorprofile);
CV_RegisterVar(&cv_moviemode);
// PNG variables
CV_RegisterVar(&cv_zlib_level);
@ -660,7 +657,29 @@ void D_RegisterClientCommands(void)
CV_RegisterVar(&cv_resetmusic);
// FIXME: not to be here.. but needs be done for config loading
CV_RegisterVar(&cv_usegamma);
CV_RegisterVar(&cv_globalgamma);
CV_RegisterVar(&cv_globalsaturation);
CV_RegisterVar(&cv_rhue);
CV_RegisterVar(&cv_yhue);
CV_RegisterVar(&cv_ghue);
CV_RegisterVar(&cv_chue);
CV_RegisterVar(&cv_bhue);
CV_RegisterVar(&cv_mhue);
CV_RegisterVar(&cv_rgamma);
CV_RegisterVar(&cv_ygamma);
CV_RegisterVar(&cv_ggamma);
CV_RegisterVar(&cv_cgamma);
CV_RegisterVar(&cv_bgamma);
CV_RegisterVar(&cv_mgamma);
CV_RegisterVar(&cv_rsaturation);
CV_RegisterVar(&cv_ysaturation);
CV_RegisterVar(&cv_gsaturation);
CV_RegisterVar(&cv_csaturation);
CV_RegisterVar(&cv_bsaturation);
CV_RegisterVar(&cv_msaturation);
// m_menu.c
CV_RegisterVar(&cv_crosshair);
@ -718,6 +737,7 @@ void D_RegisterClientCommands(void)
// s_sound.c
CV_RegisterVar(&cv_soundvolume);
CV_RegisterVar(&cv_closedcaptioning);
CV_RegisterVar(&cv_digmusicvolume);
CV_RegisterVar(&cv_midimusicvolume);
CV_RegisterVar(&cv_numChannels);
@ -2121,7 +2141,7 @@ static void Command_Teamchange_f(void)
return;
}
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
{
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
return;
@ -2218,7 +2238,7 @@ static void Command_Teamchange2_f(void)
return;
}
if (!cv_allowteamchange.value && !NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
if (!cv_allowteamchange.value && NetPacket.packet.newteam) // allow swapping to spectator even in locked teams.
{
CONS_Alert(CONS_NOTICE, M_GetText("The server is not allowing team changes at the moment.\n"));
return;
@ -2972,6 +2992,7 @@ static void Command_Addfile(void)
XBOXSTATIC char buf[256];
char *buf_p = buf;
INT32 i;
int musiconly; // W_VerifyNMUSlumps isn't boolean
if (COM_Argc() != 2)
{
@ -2986,7 +3007,9 @@ static void Command_Addfile(void)
if (!isprint(fn[i]) || fn[i] == ';')
return;
if (!W_VerifyNMUSlumps(fn))
musiconly = W_VerifyNMUSlumps(fn);
if (!musiconly)
{
// ... But only so long as they contain nothing more then music and sprites.
if (netgame && !(server || adminplayer == consoleplayer))
@ -2998,7 +3021,7 @@ static void Command_Addfile(void)
}
// Add file on your client directly if it is trivial, or you aren't in a netgame.
if (!(netgame || multiplayer) || W_VerifyNMUSlumps(fn))
if (!(netgame || multiplayer) || musiconly)
{
P_AddWadFile(fn, NULL);
return;
@ -3018,9 +3041,7 @@ static void Command_Addfile(void)
#else
FILE *fhandle;
fhandle = fopen(fn, "rb");
if (fhandle)
if ((fhandle = W_OpenWadFile(&fn, true)) != NULL)
{
tic_t t = I_GetTime();
CONS_Debug(DBG_SETUP, "Making MD5 for %s\n",fn);
@ -3028,11 +3049,8 @@ static void Command_Addfile(void)
CONS_Debug(DBG_SETUP, "MD5 calc for %s took %f second\n", fn, (float)(I_GetTime() - t)/TICRATE);
fclose(fhandle);
}
else
{
CONS_Printf(M_GetText("File %s not found.\n"), fn);
else // file not found
return;
}
#endif
WRITEMEM(buf_p, md5sum, 16);
}

View File

@ -20,6 +20,12 @@
// console vars
extern consvar_t cv_playername;
extern consvar_t cv_playercolor;
extern consvar_t cv_skin;
// secondary splitscreen player
extern consvar_t cv_playername2;
extern consvar_t cv_playercolor2;
extern consvar_t cv_skin2;
#ifdef SEENAMES
extern consvar_t cv_seenames, cv_allowseenames;
#endif
@ -32,7 +38,6 @@ extern consvar_t cv_joyport2;
#endif
extern consvar_t cv_joyscale;
extern consvar_t cv_joyscale2;
extern consvar_t cv_controlperkey;
// splitscreen with second mouse
extern consvar_t cv_mouse2port;
@ -40,25 +45,12 @@ extern consvar_t cv_usemouse2;
#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON)
extern consvar_t cv_mouse2opt;
#endif
extern consvar_t cv_invertmouse2;
extern consvar_t cv_alwaysfreelook2;
extern consvar_t cv_mousemove2;
extern consvar_t cv_mousesens2;
extern consvar_t cv_mouseysens2;
// normally in p_mobj but the .h is not read
extern consvar_t cv_itemrespawntime;
extern consvar_t cv_itemrespawn;
extern consvar_t cv_flagtime;
extern consvar_t cv_suddendeath;
extern consvar_t cv_skin;
// secondary splitscreen player
extern consvar_t cv_playername2;
extern consvar_t cv_playercolor2;
extern consvar_t cv_skin2;
extern consvar_t cv_touchtag;
extern consvar_t cv_hidetime;
@ -77,9 +69,6 @@ extern consvar_t cv_autobalance;
extern consvar_t cv_teamscramble;
extern consvar_t cv_scrambleonchange;
extern consvar_t cv_useranalog, cv_useranalog2;
extern consvar_t cv_analog, cv_analog2;
extern consvar_t cv_netstat;
#ifdef WALLSPLATS
extern consvar_t cv_splats;
@ -101,7 +90,6 @@ extern consvar_t cv_recycler;
extern consvar_t cv_itemfinder;
extern consvar_t cv_inttime, cv_advancemap, cv_playersforexit;
extern consvar_t cv_match_scoring;
extern consvar_t cv_overtime;
extern consvar_t cv_startinglives;
@ -120,17 +108,7 @@ extern consvar_t cv_maxping;
extern consvar_t cv_skipmapcheck;
extern consvar_t cv_sleep, cv_screenshot_option, cv_screenshot_folder;
extern consvar_t cv_moviemode;
extern consvar_t cv_zlib_level, cv_zlib_memory, cv_zlib_strategy;
extern consvar_t cv_zlib_window_bits, cv_zlib_levela, cv_zlib_memorya;
extern consvar_t cv_zlib_strategya, cv_zlib_window_bitsa;
extern consvar_t cv_apng_delay;
extern consvar_t cv_sleep;
typedef enum
{
@ -210,7 +188,6 @@ void Command_ExitGame_f(void);
void Command_Retry_f(void);
void D_GameTypeChanged(INT32 lastgametype); // not a real _OnChange function anymore
void D_MapChange(INT32 pmapnum, INT32 pgametype, boolean pultmode, boolean presetplayers, INT32 pdelay, boolean pskipprecutscene, boolean pfromlevelselect);
void ObjectPlace_OnChange(void);
void ItemFinder_OnChange(void);
void D_SetPassword(const char *pw);

View File

@ -1943,6 +1943,7 @@ static void readsound(MYFILE *f, INT32 num, const char *savesfxnames[])
{
char *s = Z_Malloc(MAXLINELEN, PU_STATIC, NULL);
char *word;
char *word2;
char *tmp;
INT32 value;
@ -1956,8 +1957,8 @@ static void readsound(MYFILE *f, INT32 num, const char *savesfxnames[])
tmp = strchr(s, '#');
if (tmp)
*tmp = '\0';
value = searchvalue(s);
if (s == tmp)
continue; // Skip comment lines, but don't break.
word = strtok(s, " ");
if (word)
@ -1965,6 +1966,15 @@ static void readsound(MYFILE *f, INT32 num, const char *savesfxnames[])
else
break;
word2 = strtok(NULL, " ");
if (word2)
value = atoi(word2);
else
{
deh_warning("No value for token %s", word);
continue;
}
/* if (fastcmp(word, "OFFSET"))
{
value -= 150360;
@ -1991,6 +2001,11 @@ static void readsound(MYFILE *f, INT32 num, const char *savesfxnames[])
{
S_sfx[num].pitch = value;
}
else if (fastcmp(word, "CAPTION") || fastcmp(word, "DESCRIPTION"))
{
deh_strlcpy(S_sfx[num].caption, word2,
sizeof(S_sfx[num].caption), va("Sound effect %d: caption", num));
}
else
deh_warning("Sound %d : unknown word '%s'",num,word);
}
@ -2252,6 +2267,7 @@ static void readunlockable(MYFILE *f, INT32 num)
INT32 i;
memset(&unlockables[num], 0, sizeof(unlockable_t));
unlockables[num].objective[0] = '/';
do
{
@ -3369,11 +3385,11 @@ static void DEH_LoadDehackedFile(MYFILE *f, UINT16 wad)
{
if (i == 0 && word2[0] != '0') // If word2 isn't a number
i = get_sfx(word2); // find a sound by name
if (i < NUMSFX && i >= 0)
if (i < NUMSFX && i > 0)
readsound(f, i, savesfxnames);
else
{
deh_warning("Sound %d out of range (0 - %d)", i, NUMSFX-1);
deh_warning("Sound %d out of range (1 - %d)", i, NUMSFX-1);
ignorelines(f);
}
}
@ -4861,6 +4877,7 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Deep Sea Gargoyle
"S_GARGOYLE",
"S_BIGGARGOYLE",
// DSZ Seaweed
"S_SEAWEED1",
@ -5019,7 +5036,14 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
// Xmas-specific stuff
"S_XMASPOLE",
"S_CANDYCANE",
"S_SNOWMAN",
"S_SNOWMAN", // normal
"S_SNOWMANHAT", // with hat + scarf
"S_LAMPPOST1", // normal
"S_LAMPPOST2", // with snow
"S_HANGSTAR",
// Xmas GFZ bushes
"S_XMASBERRYBUSH",
"S_XMASBUSH",
// Botanic Serenity's loads of scenery states
"S_BSZTALLFLOWER_RED",
@ -5211,10 +5235,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit
"S_PITY4",
"S_PITY5",
"S_PITY6",
"S_PITY7",
"S_PITY8",
"S_PITY9",
"S_PITY10",
"S_FIRS1",
"S_FIRS2",
@ -6233,6 +6253,7 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
// Deep Sea Scenery
"MT_GARGOYLE", // Deep Sea Gargoyle
"MT_BIGGARGOYLE", // Deep Sea Gargoyle (Big)
"MT_SEAWEED", // DSZ Seaweed
"MT_WATERDRIP", // Dripping Water source
"MT_WATERDROP", // Water drop from dripping water
@ -6301,7 +6322,14 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s
// Christmas Scenery
"MT_XMASPOLE",
"MT_CANDYCANE",
"MT_SNOWMAN",
"MT_SNOWMAN", // normal
"MT_SNOWMANHAT", // with hat + scarf
"MT_LAMPPOST1", // normal
"MT_LAMPPOST2", // with snow
"MT_HANGSTAR",
// Xmas GFZ bushes
"MT_XMASBERRYBUSH",
"MT_XMASBUSH",
// Botanic Serenity
"MT_BSZTALLFLOWER_RED",

View File

@ -90,6 +90,10 @@ static unsigned long nombre = NEWTICRATE*10;
static void I_BlitScreenVesa1(void); //see later
void I_FinishUpdate (void)
{
// draw captions if enabled
if (cv_closedcaptioning.value)
SCR_ClosedCaptions();
// draw FPS if enabled
if (cv_ticrate.value)
SCR_DisplayTicRate();

View File

@ -379,6 +379,7 @@ nightsdata_t ntemprecords;
extern UINT32 token; ///< Number of tokens collected in a level
extern UINT32 tokenlist; ///< List of tokens collected
extern boolean gottoken; ///< Did you get a token? Used for end of act
extern INT32 tokenbits; ///< Used for setting token bits
extern INT32 sstimer; ///< Time allotted in the special stage
extern UINT32 bluescore; ///< Blue Team Scores
@ -452,19 +453,17 @@ extern mapthing_t *redctfstarts[MAXPLAYERS]; // CTF
#if defined (macintosh)
#define DEBFILE(msg) I_OutputMsg(msg)
extern FILE *debugfile;
#else
#define DEBUGFILE
#ifdef DEBUGFILE
#define DEBFILE(msg) { if (debugfile) { fputs(msg, debugfile); fflush(debugfile); } }
extern FILE *debugfile;
#else
#define DEBFILE(msg) {}
extern FILE *debugfile;
#endif
#endif
#ifdef DEBUGFILE
extern FILE *debugfile;
extern INT32 debugload;
#endif

View File

@ -434,7 +434,6 @@ void F_StartIntro(void)
G_SetGamestate(GS_INTRO);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1125,7 +1124,6 @@ void F_StartCredits(void)
}
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1272,7 +1270,6 @@ void F_StartGameEvaluation(void)
G_SaveGame((UINT32)cursaveslot);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1383,7 +1380,6 @@ void F_StartGameEnd(void)
G_SetGamestate(GS_GAMEEND);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1586,7 +1582,6 @@ void F_StartContinue(void)
gameaction = ga_nothing;
keypressed = false;
playerdeadview = false;
paused = false;
CON_ToggleOff();
CON_ClearHUD();
@ -1755,7 +1750,6 @@ void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean reset
G_SetGamestate(GS_CUTSCENE);
gameaction = ga_nothing;
playerdeadview = false;
paused = false;
CON_ToggleOff();

View File

@ -86,7 +86,7 @@ INT32 lastwipetic = 0;
static UINT8 *wipe_scr_start; //screen 3
static UINT8 *wipe_scr_end; //screen 4
static UINT8 *wipe_scr; //screen 0 (main drawing)
static fixed_t paldiv;
static fixed_t paldiv = 0;
/** Create fademask_t from lump
*
@ -145,7 +145,7 @@ static fademask_t *F_GetFadeMask(UINT8 masknum, UINT8 scrnnum) {
while (lsize--)
{
// Determine pixel to use from fademask
pcolor = &pLocalPalette[*lump++];
pcolor = &pMasterPalette[*lump++];
*mask++ = FixedDiv((pcolor->s.red+1)<<FRACBITS, paldiv)>>FRACBITS;
}
@ -337,7 +337,8 @@ void F_RunWipe(UINT8 wipetype, boolean drawMenu)
UINT8 wipeframe = 0;
fademask_t *fmask;
paldiv = FixedDiv(257<<FRACBITS, 11<<FRACBITS);
if (!paldiv)
paldiv = FixedDiv(257<<FRACBITS, 11<<FRACBITS);
// Init the wipe
WipeInAction = true;

View File

@ -156,6 +156,7 @@ UINT8 stagefailed; // Used for GEMS BONUS? Also to see if you beat the stage.
UINT16 emeralds;
UINT32 token; // Number of tokens collected in a level
UINT32 tokenlist; // List of tokens collected
boolean gottoken; // Did you get a token? Used for end of act
INT32 tokenbits; // Used for setting token bits
// Old Special Stage
@ -1011,13 +1012,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
if (turnleft)
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
}
if (cv_analog.value || twodlevel
if (twodlevel
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|| (!demoplayback && (player->climbing
|| (player->powers[pw_carry] == CR_NIGHTSMODE)
|| (player->pflags & (PF_SLIDING|PF_FORCESTRAFE))))) // Analog
forcestrafe = true;
if (forcestrafe) // Analog
if (forcestrafe)
{
if (turnright)
side += sidemove[speed];
@ -1030,6 +1031,13 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
side += ((axis * sidemove[1]) >> 10);
}
}
else if (cv_analog.value) // Analog
{
if (turnright)
cmd->buttons |= BT_CAMRIGHT;
if (turnleft)
cmd->buttons |= BT_CAMLEFT;
}
else
{
if (turnright)
@ -1117,15 +1125,6 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
if (PLAYER1INPUTDOWN(gc_use))
cmd->buttons |= BT_USE;
// Camera Controls
if (cv_debug || cv_analog.value || demoplayback || objectplacing || player->powers[pw_carry] == CR_NIGHTSMODE)
{
if (PLAYER1INPUTDOWN(gc_camleft))
cmd->buttons |= BT_CAMLEFT;
if (PLAYER1INPUTDOWN(gc_camright))
cmd->buttons |= BT_CAMRIGHT;
}
if (PLAYER1INPUTDOWN(gc_camreset))
{
if (camera.chase && !resetdown)
@ -1187,10 +1186,19 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
if (!mouseaiming && cv_mousemove.value)
forward += mousey;
if (cv_analog.value ||
(!demoplayback && (player->climbing
if ((!demoplayback && (player->climbing
|| (player->pflags & PF_SLIDING)))) // Analog for mouse
side += mousex*2;
else if (cv_analog.value)
{
if (mousex)
{
if (mousex > 0)
cmd->buttons |= BT_CAMRIGHT;
else
cmd->buttons |= BT_CAMLEFT;
}
}
else
cmd->angleturn = (INT16)(cmd->angleturn - (mousex*8));
@ -1225,9 +1233,10 @@ void G_BuildTiccmd(ticcmd_t *cmd, INT32 realtics)
cmd->sidemove = (SINT8)(cmd->sidemove + side);
if (cv_analog.value) {
cmd->angleturn = (INT16)(thiscam->angle >> 16);
if (player->awayviewtics)
cmd->angleturn = (INT16)(player->awayviewmobj->angle >> 16);
else
cmd->angleturn = (INT16)(thiscam->angle >> 16);
}
else
{
@ -1301,7 +1310,7 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
if (turnleft)
cmd->angleturn = (INT16)(cmd->angleturn + angleturn[tspeed]);
}
if (cv_analog2.value || twodlevel
if (twodlevel
|| (player->mo && (player->mo->flags2 & MF2_TWOD))
|| player->climbing
|| (player->powers[pw_carry] == CR_NIGHTSMODE)
@ -1320,6 +1329,13 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
side += ((axis * sidemove[1]) >> 10);
}
}
else if (cv_analog2.value) // Analog
{
if (turnright)
cmd->buttons |= BT_CAMRIGHT;
if (turnleft)
cmd->buttons |= BT_CAMLEFT;
}
else
{
if (turnright)
@ -1404,15 +1420,6 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
if (PLAYER2INPUTDOWN(gc_use))
cmd->buttons |= BT_USE;
// Camera Controls
if (cv_debug || cv_analog2.value || player->powers[pw_carry] == CR_NIGHTSMODE)
{
if (PLAYER2INPUTDOWN(gc_camleft))
cmd->buttons |= BT_CAMLEFT;
if (PLAYER2INPUTDOWN(gc_camright))
cmd->buttons |= BT_CAMRIGHT;
}
if (PLAYER2INPUTDOWN(gc_camreset))
{
if (camera2.chase && !resetdown)
@ -1474,9 +1481,19 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
if (!mouseaiming && cv_mousemove2.value)
forward += mouse2y;
if (cv_analog2.value || player->climbing
if (player->climbing
|| (player->pflags & PF_SLIDING)) // Analog for mouse
side += mouse2x*2;
else if (cv_analog2.value)
{
if (mouse2x)
{
if (mouse2x > 0)
cmd->buttons |= BT_CAMRIGHT;
else
cmd->buttons |= BT_CAMLEFT;
}
}
else
cmd->angleturn = (INT16)(cmd->angleturn - (mouse2x*8));
@ -1524,9 +1541,10 @@ void G_BuildTiccmd2(ticcmd_t *cmd, INT32 realtics)
}
if (cv_analog2.value) {
cmd->angleturn = (INT16)(thiscam->angle >> 16);
if (player->awayviewtics)
cmd->angleturn = (INT16)(player->awayviewmobj->angle >> 16);
else
cmd->angleturn = (INT16)(thiscam->angle >> 16);
}
else
{
@ -2763,7 +2781,6 @@ static INT16 RandMap(INT16 tolflags, INT16 pprevmap)
static void G_DoCompleted(void)
{
INT32 i;
boolean gottoken = false;
tokenlist = 0; // Reset the list
@ -2849,10 +2866,9 @@ static void G_DoCompleted(void)
if (nextmap >= 1100-1 && nextmap <= 1102-1 && (gametype == GT_RACE || gametype == GT_COMPETITION))
nextmap = (INT16)(spstage_start-1);
if (gametype == GT_COOP && token)
if ((gottoken = (gametype == GT_COOP && token)))
{
token--;
gottoken = true;
if (!(emeralds & EMERALD1))
nextmap = (INT16)(sstage_start - 1); // Special Stage 1
@ -3619,7 +3635,6 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean
mapmusflags |= MUSIC_RELOADRESET;
ultimatemode = pultmode;
playerdeadview = false;
automapactive = false;
imcontinuing = false;
@ -3647,6 +3662,9 @@ char *G_BuildMapTitle(INT32 mapnum)
{
char *title = NULL;
if (!mapheaderinfo[mapnum-1])
P_AllocMapHeader(mapnum-1);
if (strcmp(mapheaderinfo[mapnum-1]->lvlttl, ""))
{
size_t len = 1;

View File

@ -56,6 +56,9 @@ extern INT16 rw_maximums[NUM_WEAPONS];
// used in game menu
extern consvar_t cv_crosshair, cv_crosshair2;
extern consvar_t cv_invertmouse, cv_alwaysfreelook, cv_mousemove;
extern consvar_t cv_invertmouse2, cv_alwaysfreelook2, cv_mousemove2;
extern consvar_t cv_useranalog, cv_useranalog2;
extern consvar_t cv_analog, cv_analog2;
extern consvar_t cv_sideaxis,cv_turnaxis,cv_moveaxis,cv_lookaxis,cv_fireaxis,cv_firenaxis;
extern consvar_t cv_sideaxis2,cv_turnaxis2,cv_moveaxis2,cv_lookaxis2,cv_fireaxis2,cv_firenaxis2;
extern consvar_t cv_ghost_bestscore, cv_ghost_besttime, cv_ghost_bestrings, cv_ghost_last, cv_ghost_guest;

View File

@ -977,8 +977,6 @@ static const char *gamecontrolname[num_gamecontrols] =
"tossflag",
"use",
"camtoggle",
"camleft",
"camright",
"camreset",
"lookup",
"lookdown",
@ -1074,8 +1072,6 @@ void G_Controldefault(void)
gamecontrol[gc_use ][0] = KEY_JOY1+1; //B
gamecontrol[gc_use ][1] = '.';
gamecontrol[gc_camtoggle ][1] = ',';
gamecontrol[gc_camleft ][0] = 'o';
gamecontrol[gc_camright ][0] = 'p';
gamecontrol[gc_camreset ][0] = 'c';
gamecontrol[gc_lookup ][0] = KEY_PGUP;
gamecontrol[gc_lookdown ][0] = KEY_PGDN;
@ -1178,8 +1174,6 @@ void G_Controldefault(void)
gamecontrol[gc_tossflag ][0] = '\'';
gamecontrol[gc_use ][0] = KEY_LSHIFT;
gamecontrol[gc_camtoggle ][0] = 'v';
gamecontrol[gc_camleft ][0] = '[';
gamecontrol[gc_camright ][0] = ']';
gamecontrol[gc_camreset ][0] = 'r';
gamecontrol[gc_lookup ][0] = KEY_UPARROW;
gamecontrol[gc_lookdown ][0] = KEY_DOWNARROW;

View File

@ -105,8 +105,6 @@ typedef enum
gc_tossflag,
gc_use,
gc_camtoggle,
gc_camleft,
gc_camright,
gc_camreset,
gc_lookup,
gc_lookdown,
@ -126,6 +124,8 @@ typedef enum
// mouse values are used once
extern consvar_t cv_mousesens, cv_mouseysens;
extern consvar_t cv_mousesens2, cv_mouseysens2;
extern consvar_t cv_controlperkey;
extern INT32 mousex, mousey;
extern INT32 mlooky; //mousey with mlookSensitivity

View File

@ -564,8 +564,6 @@ static inline void HWR_SubsecPoly(INT32 num, poly_t *poly)
subsector_t *sub;
seg_t *lseg;
sscount++;
sub = &subsectors[num];
count = sub->numlines;
lseg = &segs[sub->firstline];

View File

@ -789,7 +789,7 @@ boolean HWR_Screenshot(const char *lbmname)
HWD.pfnReadRect(0, 0, vid.width, vid.height, vid.width * 3, (void *)buf);
#ifdef USE_PNG
ret = M_SavePNG(lbmname, buf, vid.width, vid.height, NULL);
ret = M_SavePNG(lbmname, buf, vid.width, vid.height, false);
#else
ret = saveTGA(lbmname, buf, vid.width, vid.height);
#endif

View File

@ -3367,7 +3367,6 @@ static void HWR_Subsector(size_t num)
if (num < numsubsectors)
{
sscount++;
// subsector
sub = &subsectors[num];
// sector

View File

@ -91,7 +91,7 @@ patch_t *tallminus;
patch_t *emeraldpics[7];
patch_t *tinyemeraldpics[7];
static patch_t *emblemicon;
static patch_t *tokenicon;
patch_t *tokenicon;
//-------------------------------------------
// misc vars
@ -840,7 +840,7 @@ static void HU_DrawChat(void)
else
{
//charwidth = SHORT(hu_font[talk[i]-HU_FONTSTART]->width) * con_scalefactor;
V_DrawCharacter(HU_INPUTX + c, y, talk[i++] | cv_constextsize.value | V_NOSCALESTART, !cv_allcaps.value);
V_DrawCharacter(HU_INPUTX + c, y, talk[i++] | cv_constextsize.value | V_NOSCALESTART, true);
}
c += charwidth;
}
@ -857,7 +857,7 @@ static void HU_DrawChat(void)
else
{
//charwidth = SHORT(hu_font[w_chat[i]-HU_FONTSTART]->width) * con_scalefactor;
V_DrawCharacter(HU_INPUTX + c, y, w_chat[i++] | cv_constextsize.value | V_NOSCALESTART | t, !cv_allcaps.value);
V_DrawCharacter(HU_INPUTX + c, y, w_chat[i++] | cv_constextsize.value | V_NOSCALESTART | t, true);
}
c += charwidth;
@ -869,7 +869,7 @@ static void HU_DrawChat(void)
}
if (hu_tick < 4)
V_DrawCharacter(HU_INPUTX + c, y, '_' | cv_constextsize.value |V_NOSCALESTART|t, !cv_allcaps.value);
V_DrawCharacter(HU_INPUTX + c, y, '_' | cv_constextsize.value |V_NOSCALESTART|t, true);
}

View File

@ -21,7 +21,7 @@
//------------------------------------
// heads up font
//------------------------------------
#define HU_FONTSTART '\x1F' // the first font character
#define HU_FONTSTART '\x19' // the first font character
#define HU_FONTEND '~'
#define HU_FONTSIZE (HU_FONTEND - HU_FONTSTART + 1)
@ -71,6 +71,7 @@ extern patch_t *rmatcico;
extern patch_t *bmatcico;
extern patch_t *tagico;
extern patch_t *tallminus;
extern patch_t *tokenicon;
// set true when entering a chat message
extern boolean chat_on;
@ -78,9 +79,6 @@ extern boolean chat_on;
// set true whenever the tab rankings are being shown for any reason
extern boolean hu_showscores;
// P_DeathThink sets this true to show scores while dead, in multiplayer
extern boolean playerdeadview;
// init heads up data at game startup.
void HU_Init(void);

View File

@ -219,9 +219,11 @@ char sprnames[NUMSPRITES + 1][5] =
// Egg Rock Scenery
// Christmas Scenery
"XMS1",
"XMS2",
"XMS3",
"XMS1", // Christmas Pole
"XMS2", // Candy Cane
"XMS3", // Snowman
"XMS4", // Lamppost
"XMS5", // Hanging Star
// Botanic Serenity Scenery
"BSZ1", // Tall flowers
@ -924,13 +926,13 @@ state_t states[NUMSTATES] =
{SPR_EGGM, 20, 2, {NULL}, 0, 0, S_EGGMOBILE_STND}, // S_EGGMOBILE_RATK10
{SPR_EGGM, 3, 12, {NULL}, 0, 0, S_EGGMOBILE_PANIC2}, // S_EGGMOBILE_PANIC1
{SPR_EGGM, 4, 4, {A_Boss1Spikeballs}, 0, 4, S_EGGMOBILE_PANIC3}, // S_EGGMOBILE_PANIC2
{SPR_EGGM, 3, 5, {NULL}, 0, 0, S_EGGMOBILE_PANIC4}, // S_EGGMOBILE_PANIC3
{SPR_EGGM, 3, 8, {NULL}, 0, 0, S_EGGMOBILE_PANIC4}, // S_EGGMOBILE_PANIC3
{SPR_EGGM, 4, 4, {A_Boss1Spikeballs}, 1, 4, S_EGGMOBILE_PANIC5}, // S_EGGMOBILE_PANIC4
{SPR_EGGM, 3, 5, {NULL}, 0, 0, S_EGGMOBILE_PANIC6}, // S_EGGMOBILE_PANIC5
{SPR_EGGM, 3, 8, {NULL}, 0, 0, S_EGGMOBILE_PANIC6}, // S_EGGMOBILE_PANIC5
{SPR_EGGM, 4, 4, {A_Boss1Spikeballs}, 2, 4, S_EGGMOBILE_PANIC7}, // S_EGGMOBILE_PANIC6
{SPR_EGGM, 3, 5, {NULL}, 0, 0, S_EGGMOBILE_PANIC8}, // S_EGGMOBILE_PANIC7
{SPR_EGGM, 3, 8, {NULL}, 0, 0, S_EGGMOBILE_PANIC8}, // S_EGGMOBILE_PANIC7
{SPR_EGGM, 4, 4, {A_Boss1Spikeballs}, 3, 4, S_EGGMOBILE_PANIC9}, // S_EGGMOBILE_PANIC8
{SPR_EGGM, 3, 5, {NULL}, 0, 0, S_EGGMOBILE_PANIC10},// S_EGGMOBILE_PANIC9
{SPR_EGGM, 3, 8, {NULL}, 0, 0, S_EGGMOBILE_PANIC10},// S_EGGMOBILE_PANIC9
{SPR_EGGM, 0, 35, {A_SkullAttack}, 0, 0, S_EGGMOBILE_STND}, // S_EGGMOBILE_PANIC10
{SPR_EGGM, 21, 24, {A_Pain}, 0, 0, S_EGGMOBILE_PAIN2}, // S_EGGMOBILE_PAIN
{SPR_EGGM, 21, 16, {A_SkullAttack}, 1, 1, S_EGGMOBILE_STND}, // S_EGGMOBILE_PAIN2
@ -1767,6 +1769,7 @@ state_t states[NUMSTATES] =
// Deep Sea Gargoyle
{SPR_GARG, 0, -1, {NULL}, 0, 0, S_NULL}, // S_GARGOYLE
{SPR_GARG, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BIGGARGOYLE
// DSZ Seaweed
{SPR_SEWE, 0, -1, {NULL}, 0, 0, S_SEAWEED2}, // S_SEAWEED1
@ -1933,6 +1936,13 @@ state_t states[NUMSTATES] =
{SPR_XMS1, 0, -1, {NULL}, 0, 0, S_NULL}, // S_XMASPOLE
{SPR_XMS2, 0, -1, {NULL}, 0, 0, S_NULL}, // S_CANDYCANE
{SPR_XMS3, 0, -1, {NULL}, 0, 0, S_NULL}, // S_SNOWMAN
{SPR_XMS3, 1, -1, {NULL}, 0, 0, S_NULL}, // S_SNOWMANHAT
{SPR_XMS4, 0, -1, {NULL}, 0, 0, S_NULL}, // S_LAMPPOST1
{SPR_XMS4, 1, -1, {NULL}, 0, 0, S_NULL}, // S_LAMPPOST2
{SPR_XMS5, 0, -1, {NULL}, 0, 0, S_NULL}, // S_HANGSTAR
// Xmas GFZ bushes
{SPR_BUS1, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BERRYBUSH
{SPR_BUS2, 1, -1, {NULL}, 0, 0, S_NULL}, // S_BUSH
// Loads of Botanic Serenity bullshit
{SPR_BSZ1, 0, -1, {NULL}, 0, 0, S_NULL}, // S_BSZTALLFLOWER_RED
@ -2122,16 +2132,12 @@ state_t states[NUMSTATES] =
{SPR_ELEM, FF_FULLBRIGHT|20, 1, {NULL}, 0, 0, S_ELEMF10}, // S_ELEMF9
{SPR_NULL, 0, 1, {NULL}, 0, 0, S_ELEMF1 }, // S_ELEMF10
{SPR_PITY, FF_TRANS20 , 1, {NULL}, 0, 0, S_PITY2 }, // S_PITY1
{SPR_PITY, FF_TRANS20|1, 1, {NULL}, 0, 0, S_PITY3 }, // S_PITY2
{SPR_PITY, FF_TRANS20 , 1, {NULL}, 0, 0, S_PITY4 }, // S_PITY3
{SPR_PITY, FF_TRANS20|2, 1, {NULL}, 0, 0, S_PITY5 }, // S_PITY4
{SPR_PITY, FF_TRANS20 , 1, {NULL}, 0, 0, S_PITY6 }, // S_PITY5
{SPR_PITY, FF_TRANS20|3, 1, {NULL}, 0, 0, S_PITY7 }, // S_PITY6
{SPR_PITY, FF_TRANS20 , 1, {NULL}, 0, 0, S_PITY8 }, // S_PITY7
{SPR_PITY, FF_TRANS20|4, 1, {NULL}, 0, 0, S_PITY9 }, // S_PITY8
{SPR_PITY, FF_TRANS20 , 1, {NULL}, 0, 0, S_PITY10}, // S_PITY9
{SPR_PITY, FF_TRANS20|5, 1, {NULL}, 0, 0, S_PITY1 }, // S_PITY10
{SPR_PITY, FF_TRANS30 , 2, {NULL}, 0, 0, S_PITY2}, // S_PITY1
{SPR_PITY, FF_TRANS30|1, 2, {NULL}, 0, 0, S_PITY3}, // S_PITY2
{SPR_PITY, FF_TRANS30|2, 2, {NULL}, 0, 0, S_PITY4}, // S_PITY3
{SPR_PITY, FF_TRANS20|3, 2, {NULL}, 0, 0, S_PITY5}, // S_PITY4
{SPR_PITY, FF_TRANS30|4, 2, {NULL}, 0, 0, S_PITY6}, // S_PITY5
{SPR_PITY, FF_TRANS20|5, 2, {NULL}, 0, 0, S_PITY1}, // S_PITY6
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40 , 2, {NULL}, 0, 0, S_FIRS2}, // S_FIRS1
{SPR_FIRS, FF_FULLBRIGHT|FF_TRANS40|1, 2, {NULL}, 0, 0, S_FIRS3}, // S_FIRS2
@ -4091,7 +4097,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
2*FRACUNIT, // speed
4*FRACUNIT, // speed
13*FRACUNIT, // radius
26*FRACUNIT, // height
0, // display offset
@ -6447,7 +6453,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
},
{ // MT_MYSTERY_BOX
412, // doomednum
-1, //412, // doomednum
S_MYSTERY_BOX, // spawnstate
1, // spawnhealth
S_NULL, // seestate
@ -7099,7 +7105,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_PITY_ICON1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
sfx_s3k3a, // seesound
sfx_shield, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
@ -7450,7 +7456,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_SCORE1K_ICON1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
sfx_token, // seesound
sfx_chchng, // seesound
1000, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
@ -7477,7 +7483,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_SCORE10K_ICON1, // spawnstate
1, // spawnhealth
S_NULL, // seestate
sfx_token, // seesound
sfx_chchng, // seesound
10000, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
@ -8147,6 +8153,33 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_BIGGARGOYLE
1009, // doomednum
S_BIGGARGOYLE, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
12*FRACUNIT, // speed
32*FRACUNIT, // radius
80*FRACUNIT, // height
0, // display offset
100, // mass
1, // damage
sfx_statu2, // activesound
MF_SLIDEME|MF_SOLID|MF_PUSHABLE, // flags
S_NULL // raisestate
},
{ // MT_SEAWEED
1001, // doomednum
S_SEAWEED1, // spawnstate
@ -9515,7 +9548,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
sfx_None, // deathsound
25*FRACUNIT, // speed
16*FRACUNIT, // radius
40*FRACUNIT, // height
64*FRACUNIT, // height
0, // display offset
100, // mass
1, // damage
@ -9524,6 +9557,168 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_NULL // raisestate
},
{ // MT_SNOWMANHAT
1853, // doomednum
S_SNOWMANHAT, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
25*FRACUNIT, // speed
16*FRACUNIT, // radius
80*FRACUNIT, // height
0, // display offset
100, // mass
1, // damage
sfx_None, // activesound
MF_SLIDEME|MF_SOLID|MF_PUSHABLE, // flags
S_NULL // raisestate
},
{ // MT_LAMPPOST1
1854, // doomednum
S_LAMPPOST1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
8*FRACUNIT, // radius
120*FRACUNIT, // height
0, // display offset
100, // mass
1, // damage
sfx_None, // activesound
MF_SOLID, // flags
S_NULL // raisestate
},
{ // MT_LAMPPOST2
1855, // doomednum
S_LAMPPOST2, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
8*FRACUNIT, // radius
120*FRACUNIT, // height
0, // display offset
100, // mass
1, // damage
sfx_None, // activesound
MF_SOLID, // flags
S_NULL // raisestate
},
{ // MT_HANGSTAR
1856, // doomednum
S_HANGSTAR, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
4*FRACUNIT, // radius
80*FRACUNIT, // height
0, // display offset
100, // mass
1, // damage
sfx_None, // activesound
MF_NOBLOCKMAP|MF_NOCLIP|MF_SPAWNCEILING|MF_NOGRAVITY|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_XMASBERRYBUSH
1857, // doomednum
S_XMASBERRYBUSH, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
16*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
S_NULL // raisestate
},
{ // MT_XMASBUSH
1858, // doomednum
S_XMASBUSH, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_None, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_None, // painsound
S_NULL, // meleestate
S_NULL, // missilestate
S_NULL, // deathstate
S_NULL, // xdeathstate
sfx_None, // deathsound
0, // speed
16*FRACUNIT, // radius
32*FRACUNIT, // height
0, // display offset
100, // mass
0, // damage
sfx_None, // activesound
MF_NOTHINK|MF_NOBLOCKMAP|MF_NOCLIP|MF_SCENERY, // flags
S_NULL // raisestate
},
// No, I did not do all of this by hand.
// I made a script to make all of these for me.
// Ha HA. ~Inuyasha
@ -12457,7 +12652,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_RRNG1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_thok, // seesound
sfx_wepfir, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
@ -12864,7 +13059,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_THROWNINFINITY1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_thok, // seesound
sfx_wepfir, // seesound
0, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
@ -12891,7 +13086,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_THROWNAUTOMATIC1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_thok, // seesound
sfx_wepfir, // seesound
8, // reactiontime
sfx_None, // attacksound
S_NULL, // painstate
@ -12972,7 +13167,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
S_THROWNGRENADE1, // spawnstate
1000, // spawnhealth
S_NULL, // seestate
sfx_thok, // seesound
sfx_wepfir, // seesound
8, // reactiontime
sfx_gbeep, // attacksound
S_NULL, // painstate
@ -13759,7 +13954,7 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] =
sfx_None, // attacksound
S_NULL, // painstate
0, // painchance
sfx_itemup, // painsound
sfx_s3k33, // painsound
S_RING, // meleestate
S_NULL, // missilestate
S_SPRK1, // deathstate

View File

@ -425,9 +425,11 @@ typedef enum sprite
// Egg Rock Scenery
// Christmas Scenery
SPR_XMS1,
SPR_XMS2,
SPR_XMS3,
SPR_XMS1, // Christmas Pole
SPR_XMS2, // Candy Cane
SPR_XMS3, // Snowman
SPR_XMS4, // Lamppost
SPR_XMS5, // Hanging Star
// Botanic Serenity Scenery
SPR_BSZ1, // Tall flowers
@ -1975,6 +1977,7 @@ typedef enum state
// Deep Sea Gargoyle
S_GARGOYLE,
S_BIGGARGOYLE,
// DSZ Seaweed
S_SEAWEED1,
@ -2133,7 +2136,14 @@ typedef enum state
// Xmas-specific stuff
S_XMASPOLE,
S_CANDYCANE,
S_SNOWMAN,
S_SNOWMAN, // normal
S_SNOWMANHAT, // with hat + scarf
S_LAMPPOST1, // normal
S_LAMPPOST2, // with snow
S_HANGSTAR,
// Xmas GFZ bushes
S_XMASBERRYBUSH,
S_XMASBUSH,
// Botanic Serenity's loads of scenery states
S_BSZTALLFLOWER_RED,
@ -2325,10 +2335,6 @@ typedef enum state
S_PITY4,
S_PITY5,
S_PITY6,
S_PITY7,
S_PITY8,
S_PITY9,
S_PITY10,
S_FIRS1,
S_FIRS2,
@ -3366,6 +3372,7 @@ typedef enum mobj_type
// Deep Sea Scenery
MT_GARGOYLE, // Deep Sea Gargoyle
MT_BIGGARGOYLE, // Deep Sea Gargoyle (Big)
MT_SEAWEED, // DSZ Seaweed
MT_WATERDRIP, // Dripping Water source
MT_WATERDROP, // Water drop from dripping water
@ -3434,7 +3441,14 @@ typedef enum mobj_type
// Christmas Scenery
MT_XMASPOLE,
MT_CANDYCANE,
MT_SNOWMAN,
MT_SNOWMAN, // normal
MT_SNOWMANHAT, // with hat + scarf
MT_LAMPPOST1, // normal
MT_LAMPPOST2, // with snow
MT_HANGSTAR,
// Xmas GFZ bushes
MT_XMASBERRYBUSH,
MT_XMASBUSH,
// Botanic Serenity scenery
MT_BSZTALLFLOWER_RED,

View File

@ -462,7 +462,7 @@ static int lib_pSpawnLockOn(lua_State *L)
return LUA_ErrInvalid(L, "mobj_t");
if (!player)
return LUA_ErrInvalid(L, "player_t");
if (player == &players[consoleplayer] || player == &players[secondarydisplayplayer] || player == &players[displayplayer]) // Only display it on your own view.
if (P_IsLocalPlayer(player)) // Only display it on your own view.
{
mobj_t *visual = P_SpawnMobj(lockon->x, lockon->y, lockon->z, MT_LOCKON); // positioning, flip handled in P_SceneryThinker
visual->target = lockon;
@ -2181,6 +2181,31 @@ static int lib_sSoundPlaying(lua_State *L)
return 1;
}
// This doesn't really exist, but we're providing it as a handy netgame-safe wrapper for stuff that should be locally handled.
static int lib_sStartMusicCaption(lua_State *L)
{
player_t *player = NULL;
const char *caption = luaL_checkstring(L, 1);
UINT16 lifespan = (UINT16)luaL_checkinteger(L, 2);
//HUDSAFE
INLEVEL
if (!lua_isnone(L, 3) && lua_isuserdata(L, 3))
{
player = *((player_t **)luaL_checkudata(L, 3, META_PLAYER));
if (!player)
return LUA_ErrInvalid(L, "player_t");
}
if (lifespan && (!player || P_IsLocalPlayer(player)))
{
strlcpy(S_sfx[sfx_None].caption, caption, sizeof(S_sfx[sfx_None].caption));
S_StartCaption(sfx_None, -1, lifespan);
}
return 0;
}
// G_GAME
////////////
@ -2493,6 +2518,7 @@ static luaL_Reg lib[] = {
{"S_OriginPlaying",lib_sOriginPlaying},
{"S_IdPlaying",lib_sIdPlaying},
{"S_SoundPlaying",lib_sSoundPlaying},
{"S_StartMusicCaption", lib_sStartMusicCaption},
// g_game
{"G_BuildMapName",lib_gBuildMapName},

View File

@ -266,4 +266,4 @@ int LUA_BlockmapLib(lua_State *L)
return 0;
}
#endif
#endif

View File

@ -31,6 +31,7 @@ enum sfxinfo_read {
sfxinfor_singular,
sfxinfor_priority,
sfxinfor_flags, // "pitch"
sfxinfor_caption,
sfxinfor_skinsound
};
const char *const sfxinfo_ropt[] = {
@ -38,18 +39,21 @@ const char *const sfxinfo_ropt[] = {
"singular",
"priority",
"flags",
"caption",
"skinsound",
NULL};
enum sfxinfo_write {
sfxinfow_singular = 0,
sfxinfow_priority,
sfxinfow_flags // "pitch"
sfxinfow_flags, // "pitch"
sfxinfow_caption
};
const char *const sfxinfo_wopt[] = {
"singular",
"priority",
"flags",
"caption",
NULL};
//
@ -769,8 +773,8 @@ static int lib_getSfxInfo(lua_State *L)
lua_remove(L, 1);
i = luaL_checkinteger(L, 1);
if (i >= NUMSFX)
return luaL_error(L, "sfxinfo[] index %d out of range (0 - %d)", i, NUMSFX-1);
if (i == 0 || i >= NUMSFX)
return luaL_error(L, "sfxinfo[] index %d out of range (1 - %d)", i, NUMSFX-1);
LUA_PushUserdata(L, &S_sfx[i], META_SFXINFO);
return 1;
}
@ -783,9 +787,9 @@ static int lib_setSfxInfo(lua_State *L)
lua_remove(L, 1);
{
UINT32 i = luaL_checkinteger(L, 1);
if (i >= NUMSFX)
return luaL_error(L, "sfxinfo[] index %d out of range (0 - %d)", i, NUMSFX-1);
info = &S_sfx[i]; // get the mobjinfo to assign to.
if (i == 0 || i >= NUMSFX)
return luaL_error(L, "sfxinfo[] index %d out of range (1 - %d)", i, NUMSFX-1);
info = &S_sfx[i]; // get the sfxinfo to assign to.
}
luaL_checktype(L, 2, LUA_TTABLE); // check that we've been passed a table.
lua_remove(L, 1); // pop mobjtype num, don't need it any more.
@ -814,6 +818,9 @@ static int lib_setSfxInfo(lua_State *L)
case sfxinfow_flags:
info->pitch = (INT32)luaL_checkinteger(L, 3);
break;
case sfxinfow_caption:
strlcpy(info->caption, luaL_checkstring(L, 3), sizeof(info->caption));
break;
default:
break;
}
@ -851,11 +858,14 @@ static int sfxinfo_get(lua_State *L)
case sfxinfor_flags:
lua_pushinteger(L, sfx->pitch);
return 1;
case sfxinfor_caption:
lua_pushstring(L, sfx->caption);
return 1;
case sfxinfor_skinsound:
lua_pushinteger(L, sfx->skinsound);
return 1;
default:
return luaL_error(L, "impossible error");
return luaL_error(L, "Field does not exist in sfxinfo_t");
}
return 0;
}
@ -886,8 +896,11 @@ static int sfxinfo_set(lua_State *L)
case sfxinfow_flags:
sfx->pitch = luaL_checkinteger(L, 1);
break;
case sfxinfow_caption:
strlcpy(sfx->caption, luaL_checkstring(L, 1), sizeof(sfx->caption));
break;
default:
return luaL_error(L, "impossible error");
return luaL_error(L, "Field does not exist in sfxinfo_t");
}
return 0;
}

View File

@ -18,6 +18,7 @@
#include "z_zone.h"
#include "v_video.h"
#include "i_video.h"
#include "m_misc.h"
// GIFs are always little-endian
#include "byteptr.h"
@ -396,7 +397,6 @@ static void GIF_headwrite(void)
{
UINT8 *gifhead = Z_Malloc(800, PU_STATIC, NULL);
UINT8 *p = gifhead;
RGBA_t *c;
INT32 i;
UINT16 rwidth, rheight;
@ -427,12 +427,17 @@ static void GIF_headwrite(void)
WRITEUINT8(p, 0x00);
// write color table
for (i = 0; i < 256; ++i)
{
c = &pLocalPalette[i];
WRITEUINT8(p, c->s.red);
WRITEUINT8(p, c->s.green);
WRITEUINT8(p, c->s.blue);
RGBA_t *pal = ((cv_screenshot_colorprofile.value)
? pLocalPalette
: pMasterPalette);
for (i = 0; i < 256; i++)
{
WRITEUINT8(p, pal[i].s.red);
WRITEUINT8(p, pal[i].s.green);
WRITEUINT8(p, pal[i].s.blue);
}
}
// write extension block

View File

@ -968,7 +968,7 @@ void OP_NightsObjectplace(player_t *player)
if (player->pflags & PF_ATTACKDOWN)
{
// Are ANY objectplace buttons pressed? If no, remove flag.
if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_USE|BT_CAMRIGHT|BT_CAMLEFT)))
if (!(cmd->buttons & (BT_ATTACK|BT_TOSSFLAG|BT_USE|BT_WEAPONNEXT|BT_WEAPONPREV)))
player->pflags &= ~PF_ATTACKDOWN;
// Do nothing.
@ -1019,7 +1019,7 @@ void OP_NightsObjectplace(player_t *player)
}
// This places a ring!
if (cmd->buttons & BT_CAMRIGHT)
if (cmd->buttons & BT_WEAPONNEXT)
{
player->pflags |= PF_ATTACKDOWN;
if (!OP_HeightOkay(player, false))
@ -1030,7 +1030,7 @@ void OP_NightsObjectplace(player_t *player)
}
// This places a wing item!
if (cmd->buttons & BT_CAMLEFT)
if (cmd->buttons & BT_WEAPONPREV)
{
player->pflags |= PF_ATTACKDOWN;
if (!OP_HeightOkay(player, false))

View File

@ -573,31 +573,31 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] =
unlockable_t unlockables[MAXUNLOCKABLES] =
{
// Name, Objective, Menu Height, ConditionSet, Unlock Type, Variable, NoCecho, NoChecklist
/* 01 */ {"Record Attack", "Complete Greenflower Zone, Act 1", 0, 1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 02 */ {"NiGHTS Mode", "Complete Floral Field", 0, 2, SECRET_NIGHTSMODE, 0, true, true, 0},
/* 01 */ {"Record Attack", "/", 0, 1, SECRET_RECORDATTACK, 0, true, true, 0},
/* 02 */ {"NiGHTS Mode", "/", 0, 2, SECRET_NIGHTSMODE, 0, true, true, 0},
/* 03 */ {"Play Credits", "Complete 1P Mode", 30, 10, SECRET_CREDITS, 0, true, true, 0},
/* 04 */ {"Sound Test", "Complete 1P Mode", 40, 10, SECRET_SOUNDTEST, 0, false, false, 0},
/* 03 */ {"Play Credits", "/", 30, 10, SECRET_CREDITS, 0, true, true, 0},
/* 04 */ {"Sound Test", "/", 40, 10, SECRET_SOUNDTEST, 0, false, false, 0},
/* 05 */ {"EXTRA LEVELS", "", 60, 0, SECRET_HEADER, 0, true, true, 0},
/* 05 */ {"EXTRA LEVELS", "/", 58, 0, SECRET_HEADER, 0, true, true, 0},
/* 06 */ {"Aerial Garden Zone", "Complete 1P Mode w/ all emeralds", 70, 11, SECRET_WARP, 40, false, false, 0},
/* 07 */ {"Azure Temple Zone", "Complete Aerial Garden Zone", 80, 20, SECRET_WARP, 41, false, false, 0},
/* 06 */ {"Aerial Garden Zone", "/", 70, 11, SECRET_WARP, 40, false, false, 0},
/* 07 */ {"Azure Temple Zone", "/", 80, 20, SECRET_WARP, 41, false, false, 0},
/* 08 */ {"BONUS LEVELS", "", 100, 0, SECRET_HEADER, 0, true, true, 0},
/* 08 */ {"BONUS LEVELS", "/", 98, 0, SECRET_HEADER, 0, true, true, 0},
/* 09 */ {"PLACEHOLDER", "PLACEHOLDER", 0, 0, SECRET_NONE, 0, true, true, 0},
/* 10 */ {"Mario Koopa Blast", "Collect 60 Emblems", 110, 42, SECRET_WARP, 30, false, false, 0},
/* 11 */ {"PLACEHOLDER", "PLACEHOLDER", 0, 0, SECRET_NONE, 0, true, true, 0},
/* 09 */ {"PLACEHOLDER", "/", 0, 0, SECRET_NONE, 0, true, true, 0},
/* 10 */ {"Mario Koopa Blast", "/", 110, 42, SECRET_WARP, 30, false, false, 0},
/* 11 */ {"PLACEHOLDER", "/", 0, 0, SECRET_NONE, 0, true, true, 0},
/* 12 */ {"Spring Hill Zone", "Collect 100 Emblems", 0, 44, SECRET_NONE, 0, false, false, 0},
/* 13 */ {"Black Hole", "A Rank in all Special Stages", 0, 50, SECRET_NONE, 0, false, true, 0},
/* 12 */ {"Spring Hill Zone", "/", 0, 44, SECRET_NONE, 0, false, false, 0},
/* 13 */ {"Black Hole", "Get grade A in all Special Stages", 0, 50, SECRET_NONE, 0, false, true, 0},
/* 14 */ {"Emblem Hints", "Collect 40 Emblems", 0, 41, SECRET_EMBLEMHINTS, 0, false, true, 0},
/* 15 */ {"Emblem Radar", "Collect 80 Emblems", 0, 43, SECRET_ITEMFINDER, 0, false, true, 0},
/* 14 */ {"Emblem Hints", "/", 0, 41, SECRET_EMBLEMHINTS, 0, false, true, 0},
/* 15 */ {"Emblem Radar", "/", 0, 43, SECRET_ITEMFINDER, 0, false, true, 0},
/* 16 */ {"Pandora's Box", "Collect All Emblems", 0, 45, SECRET_PANDORA, 0, false, false, 0},
/* 17 */ {"Level Select", "Collect All Emblems", 20, 45, SECRET_LEVELSELECT, 1, false, true, 0},
/* 16 */ {"Pandora's Box", "/", 0, 45, SECRET_PANDORA, 0, false, false, 0},
/* 17 */ {"Level Select", "/", 20, 45, SECRET_LEVELSELECT, 1, false, true, 0},
};
// Default number of emblems and extra emblems

File diff suppressed because it is too large Load Diff

View File

@ -100,6 +100,8 @@ static CV_PossibleValue_t screenshot_cons_t[] = {{0, "Default"}, {1, "HOME"}, {2
consvar_t cv_screenshot_option = {"screenshot_option", "Default", CV_SAVE|CV_CALL, screenshot_cons_t, Screenshot_option_Onchange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_screenshot_folder = {"screenshot_folder", "", CV_SAVE, NULL, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_screenshot_colorprofile = {"screenshot_colorprofile", "Yes", CV_SAVE, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t moviemode_cons_t[] = {{MM_GIF, "GIF"}, {MM_APNG, "aPNG"}, {MM_SCREENSHOT, "Screenshots"}, {0, NULL}};
consvar_t cv_moviemode = {"moviemode_mode", "GIF", CV_SAVE|CV_CALL, moviemode_cons_t, Moviemode_mode_Onchange, 0, NULL, NULL, 0, 0, NULL};
@ -610,20 +612,25 @@ static void PNG_warn(png_structp PNG, png_const_charp pngtext)
CONS_Debug(DBG_RENDER, "libpng warning at %p: %s", PNG, pngtext);
}
static void M_PNGhdr(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_uint_32 width, PNG_CONST png_uint_32 height, PNG_CONST png_byte *palette)
static void M_PNGhdr(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png_uint_32 width, PNG_CONST png_uint_32 height, const boolean palette)
{
const png_byte png_interlace = PNG_INTERLACE_NONE; //PNG_INTERLACE_ADAM7
if (palette)
{
png_colorp png_PLTE = png_malloc(png_ptr, sizeof(png_color)*256); //palette
const png_byte *pal = palette;
png_uint_16 i;
RGBA_t *pal = ((cv_screenshot_colorprofile.value)
? pLocalPalette
: pMasterPalette);
for (i = 0; i < 256; i++)
{
png_PLTE[i].red = *pal; pal++;
png_PLTE[i].green = *pal; pal++;
png_PLTE[i].blue = *pal; pal++;
png_PLTE[i].red = pal[i].s.red;
png_PLTE[i].green = pal[i].s.green;
png_PLTE[i].blue = pal[i].s.blue;
}
png_set_IHDR(png_ptr, png_info_ptr, width, height, 8, PNG_COLOR_TYPE_PALETTE,
png_interlace, PNG_COMPRESSION_TYPE_BASE, PNG_FILTER_TYPE_BASE);
png_write_info_before_PLTE(png_ptr, png_info_ptr);
@ -924,7 +931,7 @@ static void M_PNGfix_acTL(png_structp png_ptr, png_infop png_info_ptr)
fseek(apng_FILE, oldpos, SEEK_SET);
}
static boolean M_SetupaPNG(png_const_charp filename, png_bytep pal)
static boolean M_SetupaPNG(png_const_charp filename, boolean palette)
{
apng_FILE = fopen(filename,"wb+"); // + mode for reading
if (!apng_FILE)
@ -966,7 +973,7 @@ static boolean M_SetupaPNG(png_const_charp filename, png_bytep pal)
png_set_compression_strategy(apng_ptr, cv_zlib_strategya.value);
png_set_compression_window_bits(apng_ptr, cv_zlib_window_bitsa.value);
M_PNGhdr(apng_ptr, apng_info_ptr, vid.width, vid.height, pal);
M_PNGhdr(apng_ptr, apng_info_ptr, vid.width, vid.height, palette);
M_PNGText(apng_ptr, apng_info_ptr, true);
@ -1007,9 +1014,9 @@ static inline moviemode_t M_StartMovieAPNG(const char *pathname)
}
if (rendermode == render_soft)
ret = M_SetupaPNG(va(pandf,pathname,freename), W_CacheLumpName(GetPalette(), PU_CACHE));
ret = M_SetupaPNG(va(pandf,pathname,freename), true);
else
ret = M_SetupaPNG(va(pandf,pathname,freename), NULL);
ret = M_SetupaPNG(va(pandf,pathname,freename), false);
if (!ret)
{
@ -1215,11 +1222,10 @@ void M_StopMovie(void)
* \param palette Palette of image data
* \note if palette is NULL, BGR888 format
*/
boolean M_SavePNG(const char *filename, void *data, int width, int height, const UINT8 *palette)
boolean M_SavePNG(const char *filename, void *data, int width, int height, const boolean palette)
{
png_structp png_ptr;
png_infop png_info_ptr;
PNG_CONST png_byte *PLTE = (const png_byte *)palette;
#ifdef PNG_SETJMP_SUPPORTED
#ifdef USE_FAR_KEYWORD
jmp_buf jmpbuf;
@ -1282,7 +1288,7 @@ boolean M_SavePNG(const char *filename, void *data, int width, int height, const
png_set_compression_strategy(png_ptr, cv_zlib_strategy.value);
png_set_compression_window_bits(png_ptr, cv_zlib_window_bits.value);
M_PNGhdr(png_ptr, png_info_ptr, width, height, PLTE);
M_PNGhdr(png_ptr, png_info_ptr, width, height, palette);
M_PNGText(png_ptr, png_info_ptr, false);
@ -1329,7 +1335,7 @@ typedef struct
* \param palette Palette of image data
*/
#if NUMSCREENS > 2
static boolean WritePCXfile(const char *filename, const UINT8 *data, int width, int height, const UINT8 *palette)
static boolean WritePCXfile(const char *filename, const UINT8 *data, int width, int height)
{
int i;
size_t length;
@ -1370,8 +1376,20 @@ static boolean WritePCXfile(const char *filename, const UINT8 *data, int width,
// write the palette
*pack++ = 0x0c; // palette ID byte
for (i = 0; i < 768; i++)
*pack++ = *palette++;
// write color table
{
RGBA_t *pal = ((cv_screenshot_colorprofile.value)
? pLocalPalette
: pMasterPalette);
for (i = 0; i < 256; i++)
{
*pack++ = pal[i].s.red;
*pack++ = pal[i].s.green;
*pack++ = pal[i].s.blue;
}
}
// write output file
length = pack - (UINT8 *)pcx;
@ -1445,11 +1463,9 @@ void M_DoScreenShot(void)
if (rendermode != render_none)
{
#ifdef USE_PNG
ret = M_SavePNG(va(pandf,pathname,freename), linear, vid.width, vid.height,
W_CacheLumpName(GetPalette(), PU_CACHE));
ret = M_SavePNG(va(pandf,pathname,freename), linear, vid.width, vid.height, true);
#else
ret = WritePCXfile(va(pandf,pathname,freename), linear, vid.width, vid.height,
W_CacheLumpName(GetPalette(), PU_CACHE));
ret = WritePCXfile(va(pandf,pathname,freename), linear, vid.width, vid.height);
#endif
}

View File

@ -19,6 +19,7 @@
#include "tables.h"
#include "d_event.h" // Screenshot responder
#include "command.h"
typedef enum {
MM_OFF = 0,
@ -28,6 +29,12 @@ typedef enum {
} moviemode_t;
extern moviemode_t moviemode;
extern consvar_t cv_screenshot_option, cv_screenshot_folder, cv_screenshot_colorprofile;
extern consvar_t cv_moviemode;
extern consvar_t cv_zlib_memory, cv_zlib_level, cv_zlib_strategy, cv_zlib_window_bits;
extern consvar_t cv_zlib_memorya, cv_zlib_levela, cv_zlib_strategya, cv_zlib_window_bitsa;
extern consvar_t cv_apng_delay;
void M_StartMovie(void);
void M_SaveFrame(void);
void M_StopMovie(void);
@ -57,7 +64,7 @@ void FIL_ForceExtension(char *path, const char *extension);
boolean FIL_CheckExtension(const char *in);
#ifdef HAVE_PNG
boolean M_SavePNG(const char *filename, void *data, int width, int height, const UINT8 *palette);
boolean M_SavePNG(const char *filename, void *data, int width, int height, const boolean palette);
#endif
extern boolean takescreenshot;

View File

@ -3170,6 +3170,8 @@ void A_Invincibility(mobj_t *actor)
S_StopMusic();
if (mariomode)
G_GhostAddColor(GHC_INVINCIBLE);
strlcpy(S_sfx[sfx_None].caption, "Invincibility", 14);
S_StartCaption(sfx_None, -1, player->powers[pw_invulnerability]);
S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false);
}
}
@ -3208,6 +3210,8 @@ void A_SuperSneakers(mobj_t *actor)
S_StopMusic();
S_ChangeMusicInternal("_shoes", false);
}
strlcpy(S_sfx[sfx_None].caption, "Speed shoes", 12);
S_StartCaption(sfx_None, -1, player->powers[pw_sneakers]);
}
}
@ -5602,7 +5606,10 @@ void A_MixUp(mobj_t *actor)
// No mix-up monitors in hide and seek or time only race.
// The random factor is okay for other game modes, but in these, it is cripplingly unfair.
if (gametype == GT_HIDEANDSEEK || gametype == GT_RACE)
{
S_StartSound(actor, sfx_lose);
return;
}
numplayers = 0;
memset(teleported, 0, sizeof (teleported));

View File

@ -2557,6 +2557,12 @@ void T_PlaneDisplace(planedisplace_t *pd)
direction = (control->floorheight > pd->last_height) ? 1 : -1;
diff = FixedMul(control->floorheight-pd->last_height, pd->speed);
if (pd->reverse) // reverse direction?
{
direction *= -1;
diff *= -1;
}
if (pd->type == pd_floor || pd->type == pd_both)
T_MovePlane(target, INT32_MAX/2, target->floorheight+diff, 0, 0, direction); // move floor
if (pd->type == pd_ceiling || pd->type == pd_both)
@ -2923,7 +2929,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover)
fixed_t leftx, rightx;
fixed_t topy, bottomy;
fixed_t topz, bottomz;
fixed_t widthfactor, heightfactor;
fixed_t widthfactor = FRACUNIT, heightfactor = FRACUNIT;
fixed_t a, b, c;
mobjtype_t type = MT_ROCKCRUMBLE1;
fixed_t spacing = (32<<FRACBITS);

View File

@ -257,6 +257,8 @@ void P_DoMatchSuper(player_t *player)
S_StopMusic();
if (mariomode)
G_GhostAddColor(GHC_INVINCIBLE);
strlcpy(S_sfx[sfx_None].caption, "Invincibility", 14);
S_StartCaption(sfx_None, -1, player->powers[pw_invulnerability]);
S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false);
}
@ -278,6 +280,8 @@ void P_DoMatchSuper(player_t *player)
S_StopMusic();
if (mariomode)
G_GhostAddColor(GHC_INVINCIBLE);
strlcpy(S_sfx[sfx_None].caption, "Invincibility", 14);
S_StartCaption(sfx_None, -1, player->powers[pw_invulnerability]);
S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false);
}
}
@ -571,10 +575,17 @@ void P_TouchSpecialThing(mobj_t *special, mobj_t *toucher, boolean heightcheck)
return;
tokenlist += special->health;
P_AddPlayerScore(player, 1000);
if (ALL7EMERALDS(emeralds)) // Got all 7
{
P_GivePlayerRings(player, 50);
nummaprings += 50; // no cheating towards Perfect!
if (!(netgame || multiplayer))
{
player->continues += 1;
players->gotcontinue = true;
if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_s3kac);
}
}
else
token++;
@ -2097,7 +2108,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget
{
if (metalrecording) // Ack! Metal Sonic shouldn't die! Cut the tape, end recording!
G_StopMetalRecording();
if (gametype == GT_MATCH && cv_match_scoring.value == 0 // note, no team match suicide penalty
if (gametype == GT_MATCH // note, no team match suicide penalty
&& ((target == source) || (source == NULL && inflictor == NULL) || (source && !source->player)))
{ // Suicide penalty
if (target->player->score >= 50)
@ -2887,7 +2898,7 @@ static void P_ShieldDamage(player_t *player, mobj_t *inflictor, mobj_t *source,
{
// Award no points when players shoot each other when cv_friendlyfire is on.
if (!G_GametypeHasTeams() || !(source->player->ctfteam == player->ctfteam && source != player->mo))
P_AddPlayerScore(source->player, cv_match_scoring.value == 1 ? 25 : 50);
P_AddPlayerScore(source->player, 50);
}
}
@ -3120,14 +3131,6 @@ boolean P_DamageMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, INT32 da
return false; // Don't get hurt by fire generated from friends.
}
// Sudden-Death mode
if (source && source->type == MT_PLAYER)
{
if ((gametype == GT_MATCH || gametype == GT_TEAMMATCH || gametype == GT_CTF) && cv_suddendeath.value
&& !player->powers[pw_flashing] && !player->powers[pw_invulnerability])
damagetype = DMG_INSTAKILL;
}
// Player hits another player
if (!force && source && source->player)
{

View File

@ -72,7 +72,6 @@
// both the head and tail of the thinker list
extern thinker_t thinkercap;
extern INT32 runcount;
void P_InitThinkers(void);
void P_AddThinker(thinker_t *thinker);

View File

@ -7359,6 +7359,18 @@ void P_MobjThinker(mobj_t *mobj)
}
else switch (mobj->type)
{
case MT_FALLINGROCK:
// Despawn rocks here in case zmovement code can't do so (blame slopes)
if (!mobj->momx && !mobj->momy && !mobj->momz
&& ((mobj->eflags & MFE_VERTICALFLIP) ?
mobj->z + mobj->height >= mobj->ceilingz
: mobj->z <= mobj->floorz))
{
P_RemoveMobj(mobj);
return;
}
P_MobjCheckWater(mobj);
break;
case MT_EMERALDSPAWN:
if (mobj->threshold)
{
@ -8434,6 +8446,10 @@ mobj_t *P_SpawnMobj(fixed_t x, fixed_t y, fixed_t z, mobjtype_t type)
case MT_SPIKE:
mobj->flags2 |= MF2_STANDONME;
break;
case MT_LAMPPOST1:
case MT_LAMPPOST2:
mobj->flags2 |= MF2_STANDONME;
break;
case MT_DETON:
mobj->movedir = 0;
break;
@ -8763,7 +8779,6 @@ consvar_t cv_itemrespawntime = {"respawnitemtime", "30", CV_NETVAR|CV_CHEAT, res
consvar_t cv_itemrespawn = {"respawnitem", "On", CV_NETVAR, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t flagtime_cons_t[] = {{0, "MIN"}, {300, "MAX"}, {0, NULL}};
consvar_t cv_flagtime = {"flagtime", "30", CV_NETVAR|CV_CHEAT, flagtime_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_suddendeath = {"suddendeath", "Off", CV_NETVAR|CV_CHEAT, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
void P_SpawnPrecipitation(void)
{
@ -9506,7 +9521,7 @@ void P_SpawnMapThing(mapthing_t *mthing)
// Yeah, this is a dirty hack.
if ((mobjinfo[i].flags & (MF_MONITOR|MF_GRENADEBOUNCE)) == MF_MONITOR)
{
if (gametype == GT_COMPETITION)
if (gametype == GT_COMPETITION || gametype == GT_RACE)
{
// Set powerup boxes to user settings for competition.
if (cv_competitionboxes.value == 1) // Random
@ -9579,7 +9594,8 @@ void P_SpawnMapThing(mapthing_t *mthing)
if (ultimatemode)
{
if (i == MT_PITY_BOX || i == MT_ELEMENTAL_BOX || i == MT_ATTRACT_BOX
|| i == MT_FORCE_BOX || i == MT_ARMAGEDDON_BOX || i == MT_WHIRLWIND_BOX)
|| i == MT_FORCE_BOX || i == MT_ARMAGEDDON_BOX || i == MT_WHIRLWIND_BOX
|| i == MT_FLAMEAURA_BOX || i == MT_BUBBLEWRAP_BOX || i == MT_THUNDERCOIN_BOX)
return; // No shields in Ultimate mode
if (i == MT_RING_BOX && !G_IsSpecialStage(gamemap))
@ -9701,11 +9717,10 @@ void P_SpawnMapThing(mapthing_t *mthing)
switch(mobj->type)
{
case MT_SKYBOX:
mobj->angle = 0;
if (mthing->options & MTF_OBJECTSPECIAL)
skyboxmo[1] = mobj;
skyboxcenterpnts[mthing->extrainfo] = mobj;
else
skyboxmo[0] = mobj;
skyboxviewpnts[mthing->extrainfo] = mobj;
break;
case MT_FAN:
if (mthing->options & MTF_OBJECTSPECIAL)
@ -9750,20 +9765,16 @@ void P_SpawnMapThing(mapthing_t *mthing)
mobjtype_t macetype = MT_SMALLMACE;
boolean firsttime;
mobj_t *spawnee;
size_t line;
INT32 line;
const size_t mthingi = (size_t)(mthing - mapthings);
// Why does P_FindSpecialLineFromTag not work here?!?
// Monster Iestyn: tag lists haven't been initialised yet for the map, that's why
for (line = 0; line < numlines; line++)
{
if (lines[line].special == 9 && lines[line].tag == mthing->angle)
break;
}
// Find the corresponding linedef special, using angle as tag
// P_FindSpecialLineFromTag works here now =D
line = P_FindSpecialLineFromTag(9, mthing->angle, -1);
if (line == numlines)
if (line == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Mace chain (mapthing #%s) needs tagged to a #9 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
CONS_Debug(DBG_GAMELOGIC, "Mace chain (mapthing #%s) needs to be tagged to a #9 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
return;
}
/*
@ -9861,18 +9872,15 @@ ML_NOCLIMB : Direction not controllable
fixed_t radius, speed, bottomheight, topheight;
INT32 type, numdivisions, time, anglespeed;
angle_t angledivision;
size_t line;
INT32 line;
const size_t mthingi = (size_t)(mthing - mapthings);
for (line = 0; line < numlines; line++)
{
if (lines[line].special == 15 && lines[line].tag == mthing->angle)
break;
}
// Find the corresponding linedef special, using angle as tag
line = P_FindSpecialLineFromTag(15, mthing->angle, -1);
if (line == numlines)
if (line == -1)
{
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%s) needs to be tagged to a #15 parameter line (trying to find tag %d).\n", sizeu1(mthingi), mthing->angle);
return;
}

View File

@ -2244,6 +2244,17 @@ void P_LoadThingsOnly(void)
// Search through all the thinkers.
mobj_t *mo;
thinker_t *think;
INT32 i, viewid = -1, centerid = -1; // for skyboxes
// check if these are any of the normal viewpoint/centerpoint mobjs in the level or not
if (skyboxmo[0] || skyboxmo[1])
for (i = 0; i < 16; i++)
{
if (skyboxmo[0] && skyboxmo[0] == skyboxviewpnts[i])
viewid = i; // save id just in case
if (skyboxmo[1] && skyboxmo[1] == skyboxcenterpnts[i])
centerid = i; // save id just in case
}
for (think = thinkercap.next; think != &thinkercap; think = think->next)
{
@ -2261,6 +2272,10 @@ void P_LoadThingsOnly(void)
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
P_LoadThings();
// restore skybox viewpoint/centerpoint if necessary, set them to defaults if we can't do that
skyboxmo[0] = skyboxviewpnts[(viewid >= 0) ? viewid : 0];
skyboxmo[1] = skyboxcenterpnts[(centerid >= 0) ? centerid : 0];
P_SpawnSecretItems(true);
}
@ -2542,8 +2557,7 @@ boolean P_SetupLevel(boolean skipprecip)
postimgtype = postimgtype2 = postimg_none;
if (mapheaderinfo[gamemap-1]->forcecharacter[0] != '\0'
&& atoi(mapheaderinfo[gamemap-1]->forcecharacter) != 255)
if (mapheaderinfo[gamemap-1]->forcecharacter[0] != '\0')
P_ForceCharacter(mapheaderinfo[gamemap-1]->forcecharacter);
// chasecam on in chaos, race, coop
@ -2696,15 +2710,25 @@ boolean P_SetupLevel(boolean skipprecip)
for (i = 0; i < 2; i++)
skyboxmo[i] = NULL;
for (i = 0; i < 16; i++)
skyboxviewpnts[i] = skyboxcenterpnts[i] = NULL;
P_MapStart();
P_PrepareThings(lastloadedmaplumpnum + ML_THINGS);
// init gravity, tag lists,
// anything that P_ResetDynamicSlopes/P_LoadThings needs to know
P_InitSpecials();
#ifdef ESLOPE
P_ResetDynamicSlopes();
#endif
P_LoadThings();
// skybox mobj defaults
skyboxmo[0] = skyboxviewpnts[0];
skyboxmo[1] = skyboxcenterpnts[0];
P_SpawnSecretItems(loademblems);
@ -2718,8 +2742,6 @@ boolean P_SetupLevel(boolean skipprecip)
if (loadprecip) // ugly hack for P_NetUnArchiveMisc (and P_LoadNetGame)
P_SpawnPrecipitation();
globalweather = mapheaderinfo[gamemap-1]->weather;
#ifdef HWRENDER // not win32 only 19990829 by Kin
if (rendermode != render_soft && rendermode != render_none)
{

View File

@ -103,12 +103,20 @@ static fixed_t P_InterceptVector2(divline_t *v2, divline_t *v1)
static boolean P_CrossSubsecPolyObj(polyobj_t *po, register los_t *los)
{
size_t i;
sector_t *polysec;
if (!(po->flags & POF_RENDERALL))
return true; // the polyobject isn't visible, so we can ignore it
polysec = po->lines[0]->backsector;
for (i = 0; i < po->numLines; ++i)
{
line_t *line = po->lines[i];
divline_t divl;
const vertex_t *v1,*v2;
fixed_t frac;
fixed_t topslope, bottomslope;
// already checked other side?
if (line->validcount == validcount)
@ -140,7 +148,22 @@ static boolean P_CrossSubsecPolyObj(polyobj_t *po, register los_t *los)
continue;
// stop because it is not two sided
return false;
//if (!(po->flags & POF_TESTHEIGHT))
//return false;
frac = P_InterceptVector2(&los->strace, &divl);
// get slopes of top and bottom of this polyobject line
topslope = FixedDiv(polysec->ceilingheight - los->sightzstart , frac);
bottomslope = FixedDiv(polysec->floorheight - los->sightzstart , frac);
if (topslope >= los->topslope && bottomslope <= los->bottomslope)
return false; // view completely blocked
// TODO: figure out if it's worth considering partially blocked cases or not?
// maybe to adjust los's top/bottom slopes if needed
//if (los->topslope <= los->bottomslope)
//return false;
}
return true;

View File

@ -46,7 +46,9 @@
#include <errno.h>
#endif
mobj_t *skyboxmo[2];
mobj_t *skyboxmo[2]; // current skybox mobjs: 0 = viewpoint, 1 = centerpoint
mobj_t *skyboxviewpnts[16]; // array of MT_SKYBOX viewpoint mobjs
mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs
// Amount (dx, dy) vector linedef is shifted right to get scroll amount
#define SCROLL_SHIFT 5
@ -111,7 +113,7 @@ static void P_AddFakeFloorsByLine(size_t line, ffloortype_e ffloorflags, thinker
static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec);
static void Add_Friction(INT32 friction, INT32 movefactor, INT32 affectee, INT32 referrer);
static void P_AddSpikeThinker(sector_t *sec, INT32 referrer);
static void P_AddPlaneDisplaceThinker(INT32 type, fixed_t speed, INT32 control, INT32 affectee);
static void P_AddPlaneDisplaceThinker(INT32 type, fixed_t speed, INT32 control, INT32 affectee, UINT8 reverse);
//SoM: 3/7/2000: New sturcture without limits.
@ -3159,6 +3161,47 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec)
}
break;
case 448: // Change skybox viewpoint/centerpoint
if ((mo && mo->player && P_IsLocalPlayer(mo->player)) || (line->flags & ML_NOCLIMB))
{
INT32 viewid = sides[line->sidenum[0]].textureoffset>>FRACBITS;
INT32 centerid = sides[line->sidenum[0]].rowoffset>>FRACBITS;
if ((line->flags & (ML_EFFECT4|ML_BLOCKMONSTERS)) == ML_EFFECT4) // Solid Midtexture is on but Block Enemies is off?
{
CONS_Alert(CONS_WARNING,
M_GetText("Skybox switch linedef (tag %d) doesn't have anything to do.\nConsider changing the linedef's flag configuration or removing it entirely.\n"),
line->tag);
}
else
{
// set viewpoint mobj
if (!(line->flags & ML_EFFECT4)) // Solid Midtexture turns off viewpoint setting
{
if (viewid >= 0 && viewid < 16)
skyboxmo[0] = skyboxviewpnts[viewid];
else
skyboxmo[0] = NULL;
}
// set centerpoint mobj
if (line->flags & ML_BLOCKMONSTERS) // Block Enemies turns ON centerpoint setting
{
if (centerid >= 0 && centerid < 16)
skyboxmo[1] = skyboxcenterpnts[centerid];
else
skyboxmo[1] = NULL;
}
}
CONS_Debug(DBG_GAMELOGIC, "Line type 448 Executor: viewid = %d, centerid = %d, viewpoint? = %s, centerpoint? = %s\n",
viewid,
centerid,
((line->flags & ML_EFFECT4) ? "no" : "yes"),
((line->flags & ML_BLOCKMONSTERS) ? "yes" : "no"));
}
break;
case 450: // Execute Linedef Executor - for recursion
P_LinedefExecute(line->tag, mo, NULL);
break;
@ -5176,10 +5219,11 @@ static inline void P_AddBridgeThinker(line_t *sourceline, sector_t *sec)
* \param speed Rate of movement relative to control sector
* \param control Control sector.
* \param affectee Target sector.
* \param reverse Reverse direction?
* \sa P_SpawnSpecials, T_PlaneDisplace
* \author Monster Iestyn
*/
static void P_AddPlaneDisplaceThinker(INT32 type, fixed_t speed, INT32 control, INT32 affectee)
static void P_AddPlaneDisplaceThinker(INT32 type, fixed_t speed, INT32 control, INT32 affectee, UINT8 reverse)
{
planedisplace_t *displace;
@ -5193,6 +5237,7 @@ static void P_AddPlaneDisplaceThinker(INT32 type, fixed_t speed, INT32 control,
displace->last_height = sectors[control].floorheight;
displace->speed = speed;
displace->type = type;
displace->reverse = reverse;
}
/** Adds a Mario block thinker, which changes the block's texture between blank
@ -5544,6 +5589,45 @@ static void P_RunLevelLoadExecutors(void)
}
}
/** Before things are loaded, initialises certain stuff in case they're needed
* by P_ResetDynamicSlopes or P_LoadThings. This was split off from
* P_SpawnSpecials, in case you couldn't tell.
*
* \sa P_SpawnSpecials, P_InitTagLists
* \author Monster Iestyn
*/
void P_InitSpecials(void)
{
// Set the default gravity. Custom gravity overrides this setting.
gravity = FRACUNIT/2;
// Defaults in case levels don't have them set.
sstimer = 90*TICRATE + 6;
totalrings = 1;
CheckForBustableBlocks = CheckForBouncySector = CheckForQuicksand = CheckForMarioBlocks = CheckForFloatBob = CheckForReverseGravity = false;
// Set curWeather
switch (mapheaderinfo[gamemap-1]->weather)
{
case PRECIP_SNOW: // snow
case PRECIP_RAIN: // rain
case PRECIP_STORM: // storm
case PRECIP_STORM_NORAIN: // storm w/o rain
case PRECIP_STORM_NOSTRIKES: // storm w/o lightning
curWeather = mapheaderinfo[gamemap-1]->weather;
break;
default: // blank/none
curWeather = PRECIP_NONE;
break;
}
// Set globalweather
globalweather = mapheaderinfo[gamemap-1]->weather;
P_InitTagLists(); // Create xref tables for tags
}
/** After the map has loaded, scans for specials that spawn 3Dfloors and
* thinkers.
*
@ -5565,15 +5649,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
// but currently isn't.
(void)fromnetsave;
// Set the default gravity. Custom gravity overrides this setting.
gravity = FRACUNIT/2;
// Defaults in case levels don't have them set.
sstimer = 90*TICRATE + 6;
totalrings = 1;
CheckForBustableBlocks = CheckForBouncySector = CheckForQuicksand = CheckForMarioBlocks = CheckForFloatBob = CheckForReverseGravity = false;
// Init special SECTORs.
sector = sectors;
for (i = 0; i < numsectors; i++, sector++)
@ -5622,20 +5697,6 @@ void P_SpawnSpecials(INT32 fromnetsave)
}
}
if (mapheaderinfo[gamemap-1]->weather == 2) // snow
curWeather = PRECIP_SNOW;
else if (mapheaderinfo[gamemap-1]->weather == 3) // rain
curWeather = PRECIP_RAIN;
else if (mapheaderinfo[gamemap-1]->weather == 1) // storm
curWeather = PRECIP_STORM;
else if (mapheaderinfo[gamemap-1]->weather == 5) // storm w/o rain
curWeather = PRECIP_STORM_NORAIN;
else if (mapheaderinfo[gamemap-1]->weather == 6) // storm w/o lightning
curWeather = PRECIP_STORM_NOSTRIKES;
else
curWeather = PRECIP_NONE;
P_InitTagLists(); // Create xref tables for tags
P_SearchForDisableLinedefs(); // Disable linedefs are now allowed to disable *any* line
P_SpawnScrollers(); // Add generalized scrollers
@ -5912,15 +5973,15 @@ void P_SpawnSpecials(INT32 fromnetsave)
case 66: // Displace floor by front sector
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
P_AddPlaneDisplaceThinker(pd_floor, P_AproxDistance(lines[i].dx, lines[i].dy)>>8, sides[lines[i].sidenum[0]].sector-sectors, s);
P_AddPlaneDisplaceThinker(pd_floor, P_AproxDistance(lines[i].dx, lines[i].dy)>>8, sides[lines[i].sidenum[0]].sector-sectors, s, !!(lines[i].flags & ML_NOCLIMB));
break;
case 67: // Displace ceiling by front sector
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
P_AddPlaneDisplaceThinker(pd_ceiling, P_AproxDistance(lines[i].dx, lines[i].dy)>>8, sides[lines[i].sidenum[0]].sector-sectors, s);
P_AddPlaneDisplaceThinker(pd_ceiling, P_AproxDistance(lines[i].dx, lines[i].dy)>>8, sides[lines[i].sidenum[0]].sector-sectors, s, !!(lines[i].flags & ML_NOCLIMB));
break;
case 68: // Displace both floor AND ceiling by front sector
for (s = -1; (s = P_FindSectorFromLineTag(lines + i, s)) >= 0 ;)
P_AddPlaneDisplaceThinker(pd_both, P_AproxDistance(lines[i].dx, lines[i].dy)>>8, sides[lines[i].sidenum[0]].sector-sectors, s);
P_AddPlaneDisplaceThinker(pd_both, P_AproxDistance(lines[i].dx, lines[i].dy)>>8, sides[lines[i].sidenum[0]].sector-sectors, s, !!(lines[i].flags & ML_NOCLIMB));
break;
case 100: // FOF (solid, opaque, shadows)

View File

@ -17,7 +17,9 @@
#ifndef __P_SPEC__
#define __P_SPEC__
extern mobj_t *skyboxmo[2];
extern mobj_t *skyboxmo[2]; // current skybox mobjs: 0 = viewpoint, 1 = centerpoint
extern mobj_t *skyboxviewpnts[16]; // array of MT_SKYBOX viewpoint mobjs
extern mobj_t *skyboxcenterpnts[16]; // array of MT_SKYBOX centerpoint mobjs
// GETSECSPECIAL (specialval, section)
//
@ -32,6 +34,7 @@ void P_InitPicAnims(void);
void P_SetupLevelFlatAnims(void);
// at map load
void P_InitSpecials(void);
void P_SpawnSpecials(INT32 fromnetsave);
// every tic
@ -458,6 +461,7 @@ typedef struct
INT32 control; ///< Control sector used to control plane positions.
fixed_t last_height; ///< Last known height of control sector.
fixed_t speed; ///< Plane movement speed.
UINT8 reverse; ///< Move in reverse direction to control sector?
/** Types of plane displacement effects.
*/
enum

View File

@ -1030,7 +1030,7 @@ void P_AddPlayerScore(player_t *player, UINT32 amount)
players[i].continues += 1;
players[i].gotcontinue = true;
if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_flgcap);
S_StartSound(NULL, sfx_s3kac);
} */
}
}
@ -1050,7 +1050,7 @@ void P_AddPlayerScore(player_t *player, UINT32 amount)
player->continues += 1;
player->gotcontinue = true;
if (P_IsLocalPlayer(player))
S_StartSound(NULL, sfx_flgcap);
S_StartSound(NULL, sfx_s3kac);
}
}
@ -1134,8 +1134,10 @@ void P_PlayLivesJingle(player_t *player)
else
{
if (player)
player->powers[pw_extralife] = extralifetics + 1;
player->powers[pw_extralife] = extralifetics+1;
S_StopMusic(); // otherwise it won't restart if this is done twice in a row
strlcpy(S_sfx[sfx_None].caption, "One-up", 7);
S_StartCaption(sfx_None, -1, extralifetics+1);
S_ChangeMusicInternal("_1up", false);
}
}
@ -1156,9 +1158,15 @@ void P_RestoreMusic(player_t *player)
if (player->powers[pw_super] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC))
S_ChangeMusicInternal("_super", true);
else if (player->powers[pw_invulnerability] > 1)
{
strlcpy(S_sfx[sfx_None].caption, "Invincibility", 14);
S_StartCaption(sfx_None, -1, player->powers[pw_invulnerability]);
S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false);
}
else if (player->powers[pw_sneakers] > 1 && !player->powers[pw_super])
{
strlcpy(S_sfx[sfx_None].caption, "Speed shoes", 12);
S_StartCaption(sfx_None, -1, player->powers[pw_sneakers]);
if (mapheaderinfo[gamemap-1]->levelflags & LF_SPEEDMUSIC)
{
S_SpeedMusic(1.4f);
@ -2341,7 +2349,7 @@ static void P_DoPlayerHeadSigns(player_t *player)
// If you're "IT", show a big "IT" over your head for others to see.
if (player->pflags & PF_TAGIT)
{
if (!(player == &players[consoleplayer] || player == &players[secondarydisplayplayer] || player == &players[displayplayer])) // Don't display it on your own view.
if (!P_IsLocalPlayer(player)) // Don't display it on your own view.
{
if (!(player->mo->eflags & MFE_VERTICALFLIP))
P_SpawnMobj(player->mo->x, player->mo->y, player->mo->z + player->mo->height, MT_TAG);
@ -3858,7 +3866,7 @@ static void P_DoSpinAbility(player_t *player, ticcmd_t *cmd)
mobj_t *lockon = P_LookForEnemies(player, false, true);
if (lockon)
{
if (player == &players[consoleplayer] || player == &players[secondarydisplayplayer] || player == &players[displayplayer]) // Only display it on your own view.
if (P_IsLocalPlayer(player)) // Only display it on your own view.
{
mobj_t *visual = P_SpawnMobj(lockon->x, lockon->y, lockon->z, MT_LOCKON); // positioning, flip handled in P_SceneryThinker
visual->target = lockon;
@ -4126,7 +4134,7 @@ static void P_DoJumpStuff(player_t *player, ticcmd_t *cmd)
if ((player->charability == CA_HOMINGTHOK) && !player->homing && (player->pflags & PF_JUMPED) && (!(player->pflags & PF_THOKKED) || (player->charflags & SF_MULTIABILITY)) && (lockon = P_LookForEnemies(player, true, false)))
{
if (player == &players[consoleplayer] || player == &players[secondarydisplayplayer] || player == &players[displayplayer]) // Only display it on your own view.
if (P_IsLocalPlayer(player)) // Only display it on your own view.
{
mobj_t *visual = P_SpawnMobj(lockon->x, lockon->y, lockon->z, MT_LOCKON); // positioning, flip handled in P_SceneryThinker
visual->target = lockon;
@ -7194,7 +7202,7 @@ static void P_MovePlayer(player_t *player)
{
if ((lockon = P_LookForEnemies(player, false, false)))
{
if (player == &players[consoleplayer] || player == &players[secondarydisplayplayer] || player == &players[displayplayer]) // Only display it on your own view.
if (P_IsLocalPlayer(player)) // Only display it on your own view.
{
mobj_t *visual = P_SpawnMobj(lockon->x, lockon->y, lockon->z, MT_LOCKON); // positioning, flip handled in P_SceneryThinker
visual->target = lockon;
@ -8451,46 +8459,24 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall
thiscam->angle = angle;
}
if (!objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && (player->powers[pw_carry] != CR_NIGHTSMODE) && displayplayer == consoleplayer)
if ((((thiscam == &camera) && cv_analog.value) || ((thiscam != &camera) && cv_analog2.value) || demoplayback) && !objectplacing && !(twodlevel || (mo->flags2 & MF2_TWOD)) && (player->powers[pw_carry] != CR_NIGHTSMODE) && displayplayer == consoleplayer)
{
#ifdef REDSANALOG
if ((player->cmd.buttons & (BT_CAMLEFT|BT_CAMRIGHT)) == (BT_CAMLEFT|BT_CAMRIGHT)); else
#endif
if (player->cmd.buttons & BT_CAMLEFT)
if (player->cmd.buttons & BT_CAMRIGHT)
{
if (thiscam == &camera)
{
if (cv_analog.value || demoplayback)
angle -= FixedAngle(cv_cam_rotspeed.value*FRACUNIT);
else
CV_SetValue(&cv_cam_rotate, camrotate == 0 ? 358
: camrotate - 2);
}
angle -= FixedAngle(cv_cam_rotspeed.value*FRACUNIT);
else
{
if (cv_analog2.value)
angle -= FixedAngle(cv_cam2_rotspeed.value*FRACUNIT);
else
CV_SetValue(&cv_cam2_rotate, camrotate == 0 ? 358
: camrotate - 2);
}
angle -= FixedAngle(cv_cam2_rotspeed.value*FRACUNIT);
}
else if (player->cmd.buttons & BT_CAMRIGHT)
else if (player->cmd.buttons & BT_CAMLEFT)
{
if (thiscam == &camera)
{
if (cv_analog.value || demoplayback)
angle += FixedAngle(cv_cam_rotspeed.value*FRACUNIT);
else
CV_SetValue(&cv_cam_rotate, camrotate + 2);
}
angle += FixedAngle(cv_cam_rotspeed.value*FRACUNIT);
else
{
if (cv_analog2.value)
angle += FixedAngle(cv_cam2_rotspeed.value*FRACUNIT);
else
CV_SetValue(&cv_cam2_rotate, camrotate + 2);
}
angle += FixedAngle(cv_cam2_rotspeed.value*FRACUNIT);
}
}
@ -9093,8 +9079,6 @@ void P_DoPityCheck(player_t *player)
// P_PlayerThink
//
boolean playerdeadview; // show match/chaos/tag/capture the flag rankings while in death view
void P_PlayerThink(player_t *player)
{
ticcmd_t *cmd;
@ -9290,10 +9274,6 @@ void P_PlayerThink(player_t *player)
if (player->playerstate == PST_DEAD)
{
player->mo->flags2 &= ~MF2_SHADOW;
// show the multiplayer rankings while dead
if (player == &players[displayplayer])
playerdeadview = true;
P_DeathThink(player);
return;
@ -9314,9 +9294,6 @@ void P_PlayerThink(player_t *player)
player->lives = cv_startinglives.value;
}
if (player == &players[displayplayer])
playerdeadview = false;
if ((gametype == GT_RACE || gametype == GT_COMPETITION) && leveltime < 4*TICRATE)
{
cmd->buttons &= BT_USE; // Remove all buttons except BT_USE

View File

@ -22,7 +22,7 @@
#include "w_wad.h"
#include "z_zone.h"
#include "p_setup.h" // levelflats
#include "v_video.h" // pLocalPalette
#include "v_video.h" // pMasterPalette
#include "dehacked.h"
#if defined (_WIN32) || defined (_WIN32_WCE)
@ -635,42 +635,24 @@ void R_LoadTextures(void)
}
else
{
UINT16 patchcount = 1;
//CONS_Printf("\n\"%s\" is a single patch, dimensions %d x %d",W_CheckNameForNumPwad((UINT16)w,texstart+j),patchlump->width, patchlump->height);
if (SHORT(patchlump->width) == 64
&& SHORT(patchlump->height) == 64)
{ // 64x64 patch
const column_t *column;
for (k = 0; k < SHORT(patchlump->width); k++)
{ // Find use of transparency.
column = (const column_t *)((const UINT8 *)patchlump + LONG(patchlump->columnofs[k]));
if (column->length != SHORT(patchlump->height))
break;
}
if (k == SHORT(patchlump->width))
patchcount = 2; // No transparency? 64x128 texture.
}
texture = textures[i] = Z_Calloc(sizeof(texture_t) + (sizeof(texpatch_t) * patchcount), PU_STATIC, NULL);
texture = textures[i] = Z_Calloc(sizeof(texture_t) + sizeof(texpatch_t), PU_STATIC, NULL);
// Set texture properties.
M_Memcpy(texture->name, W_CheckNameForNumPwad((UINT16)w, texstart + j), sizeof(texture->name));
texture->width = SHORT(patchlump->width);
texture->height = SHORT(patchlump->height)*patchcount;
texture->patchcount = patchcount;
texture->height = SHORT(patchlump->height);
texture->patchcount = 1;
texture->holes = false;
texture->flip = 0;
// Allocate information for the texture's patches.
for (k = 0; k < patchcount; k++)
{
patch = &texture->patches[k];
patch = &texture->patches[0];
patch->originx = 0;
patch->originy = (INT16)(k*patchlump->height);
patch->wad = (UINT16)w;
patch->lump = texstart + j;
patch->flip = 0;
}
patch->originx = patch->originy = 0;
patch->wad = (UINT16)w;
patch->lump = texstart + j;
patch->flip = 0;
Z_Unlock(patchlump);
@ -1428,9 +1410,9 @@ INT32 R_CreateColormap(char *p1, char *p2, char *p3)
{
for (i = 0; i < 256; i++)
{
r = pLocalPalette[i].s.red;
g = pLocalPalette[i].s.green;
b = pLocalPalette[i].s.blue;
r = pMasterPalette[i].s.red;
g = pMasterPalette[i].s.green;
b = pMasterPalette[i].s.blue;
cbrightness = sqrt((r*r) + (g*g) + (b*b));
map[i][0] = (cbrightness * cmaskr) + (r * othermask);
@ -1571,9 +1553,9 @@ void R_CreateColormap2(char *p1, char *p2, char *p3)
{
for (i = 0; i < 256; i++)
{
r = pLocalPalette[i].s.red;
g = pLocalPalette[i].s.green;
b = pLocalPalette[i].s.blue;
r = pMasterPalette[i].s.red;
g = pMasterPalette[i].s.green;
b = pMasterPalette[i].s.blue;
cbrightness = sqrt((r*r) + (g*g) + (b*b));
map[i][0] = (cbrightness * cmaskr) + (r * othermask);
@ -1653,9 +1635,9 @@ static UINT8 NearestColor(UINT8 r, UINT8 g, UINT8 b)
for (i = 0; i < 256; i++)
{
dr = r - pLocalPalette[i].s.red;
dg = g - pLocalPalette[i].s.green;
db = b - pLocalPalette[i].s.blue;
dr = r - pMasterPalette[i].s.red;
dg = g - pMasterPalette[i].s.green;
db = b - pMasterPalette[i].s.blue;
distortion = dr*dr + dg*dg + db*db;
if (distortion < bestdistortion)
{

View File

@ -60,7 +60,6 @@ fixed_t projectiony; // aspect ratio
// just for profiling purposes
size_t framecount;
size_t sscount;
size_t loopcount;
fixed_t viewx, viewy, viewz;
@ -491,9 +490,6 @@ static void R_InitTextureMapping(void)
// Take out the fencepost cases from viewangletox.
for (i = 0; i < FINEANGLES/2; i++)
{
t = FixedMul(FINETANGENT(i), focallength);
t = centerx - t;
if (viewangletox[i] == -1)
viewangletox[i] = 0;
else if (viewangletox[i] == viewwidth+1)
@ -802,157 +798,77 @@ void R_SkyboxFrame(player_t *player)
viewx = viewmobj->x;
viewy = viewmobj->y;
viewz = 0;
if (viewmobj->spawnpoint)
viewz = ((fixed_t)viewmobj->spawnpoint->angle)<<FRACBITS;
viewx += quake.x;
viewy += quake.y;
viewz += quake.z;
viewz = viewmobj->z; // 26/04/17: use actual Z position instead of spawnpoint angle!
if (mapheaderinfo[gamemap-1])
{
mapheader_t *mh = mapheaderinfo[gamemap-1];
if (player->awayviewtics)
{
if (skyboxmo[1])
{
fixed_t x = 0, y = 0;
if (mh->skybox_scalex > 0)
x = (player->awayviewmobj->x - skyboxmo[1]->x) / mh->skybox_scalex;
else if (mh->skybox_scalex < 0)
x = (player->awayviewmobj->x - skyboxmo[1]->x) * -mh->skybox_scalex;
vector3_t campos = {0,0,0}; // Position of player's actual view point
if (mh->skybox_scaley > 0)
y = (player->awayviewmobj->y - skyboxmo[1]->y) / mh->skybox_scaley;
else if (mh->skybox_scaley < 0)
y = (player->awayviewmobj->y - skyboxmo[1]->y) * -mh->skybox_scaley;
if (viewmobj->angle == 0)
{
viewx += x;
viewy += y;
}
else if (viewmobj->angle == ANGLE_90)
{
viewx -= y;
viewy += x;
}
else if (viewmobj->angle == ANGLE_180)
{
viewx -= x;
viewy -= y;
}
else if (viewmobj->angle == ANGLE_270)
{
viewx += y;
viewy -= x;
}
else
{
angle_t ang = viewmobj->angle>>ANGLETOFINESHIFT;
viewx += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
viewy += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
}
}
if (mh->skybox_scalez > 0)
viewz += (player->awayviewmobj->z + 20*FRACUNIT) / mh->skybox_scalez;
else if (mh->skybox_scalez < 0)
viewz += (player->awayviewmobj->z + 20*FRACUNIT) * -mh->skybox_scalez;
if (player->awayviewtics) {
campos.x = player->awayviewmobj->x;
campos.y = player->awayviewmobj->y;
campos.z = player->awayviewmobj->z + 20*FRACUNIT;
} else if (thiscam->chase) {
campos.x = thiscam->x;
campos.y = thiscam->y;
campos.z = thiscam->z + (thiscam->height>>1);
} else {
campos.x = player->mo->x;
campos.y = player->mo->y;
campos.z = player->viewz;
}
else if (thiscam->chase)
// Earthquake effects should be scaled in the skybox
// (if an axis isn't used, the skybox won't shake in that direction)
campos.x += quake.x;
campos.y += quake.y;
campos.z += quake.z;
if (skyboxmo[1]) // Is there a viewpoint?
{
if (skyboxmo[1])
fixed_t x = 0, y = 0;
if (mh->skybox_scalex > 0)
x = (campos.x - skyboxmo[1]->x) / mh->skybox_scalex;
else if (mh->skybox_scalex < 0)
x = (campos.x - skyboxmo[1]->x) * -mh->skybox_scalex;
if (mh->skybox_scaley > 0)
y = (campos.y - skyboxmo[1]->y) / mh->skybox_scaley;
else if (mh->skybox_scaley < 0)
y = (campos.y - skyboxmo[1]->y) * -mh->skybox_scaley;
if (viewmobj->angle == 0)
{
fixed_t x = 0, y = 0;
if (mh->skybox_scalex > 0)
x = (thiscam->x - skyboxmo[1]->x) / mh->skybox_scalex;
else if (mh->skybox_scalex < 0)
x = (thiscam->x - skyboxmo[1]->x) * -mh->skybox_scalex;
if (mh->skybox_scaley > 0)
y = (thiscam->y - skyboxmo[1]->y) / mh->skybox_scaley;
else if (mh->skybox_scaley < 0)
y = (thiscam->y - skyboxmo[1]->y) * -mh->skybox_scaley;
if (viewmobj->angle == 0)
{
viewx += x;
viewy += y;
}
else if (viewmobj->angle == ANGLE_90)
{
viewx -= y;
viewy += x;
}
else if (viewmobj->angle == ANGLE_180)
{
viewx -= x;
viewy -= y;
}
else if (viewmobj->angle == ANGLE_270)
{
viewx += y;
viewy -= x;
}
else
{
angle_t ang = viewmobj->angle>>ANGLETOFINESHIFT;
viewx += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
viewy += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
}
viewx += x;
viewy += y;
}
if (mh->skybox_scalez > 0)
viewz += (thiscam->z + (thiscam->height>>1)) / mh->skybox_scalez;
else if (mh->skybox_scalez < 0)
viewz += (thiscam->z + (thiscam->height>>1)) * -mh->skybox_scalez;
}
else
{
if (skyboxmo[1])
else if (viewmobj->angle == ANGLE_90)
{
fixed_t x = 0, y = 0;
if (mh->skybox_scalex > 0)
x = (player->mo->x - skyboxmo[1]->x) / mh->skybox_scalex;
else if (mh->skybox_scalex < 0)
x = (player->mo->x - skyboxmo[1]->x) * -mh->skybox_scalex;
if (mh->skybox_scaley > 0)
y = (player->mo->y - skyboxmo[1]->y) / mh->skybox_scaley;
else if (mh->skybox_scaley < 0)
y = (player->mo->y - skyboxmo[1]->y) * -mh->skybox_scaley;
if (viewmobj->angle == 0)
{
viewx += x;
viewy += y;
}
else if (viewmobj->angle == ANGLE_90)
{
viewx -= y;
viewy += x;
}
else if (viewmobj->angle == ANGLE_180)
{
viewx -= x;
viewy -= y;
}
else if (viewmobj->angle == ANGLE_270)
{
viewx += y;
viewy -= x;
}
else
{
angle_t ang = viewmobj->angle>>ANGLETOFINESHIFT;
viewx += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
viewy += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
}
viewx -= y;
viewy += x;
}
else if (viewmobj->angle == ANGLE_180)
{
viewx -= x;
viewy -= y;
}
else if (viewmobj->angle == ANGLE_270)
{
viewx += y;
viewy -= x;
}
else
{
angle_t ang = viewmobj->angle>>ANGLETOFINESHIFT;
viewx += FixedMul(x,FINECOSINE(ang)) - FixedMul(y, FINESINE(ang));
viewy += FixedMul(x, FINESINE(ang)) + FixedMul(y,FINECOSINE(ang));
}
if (mh->skybox_scalez > 0)
viewz += player->viewz / mh->skybox_scalez;
else if (mh->skybox_scalez < 0)
viewz += player->viewz * -mh->skybox_scalez;
}
if (mh->skybox_scalez > 0)
viewz += campos.z / mh->skybox_scalez;
else if (mh->skybox_scalez < 0)
viewz += campos.z * -mh->skybox_scalez;
}
if (viewmobj->subsector)
@ -963,8 +879,6 @@ void R_SkyboxFrame(player_t *player)
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
sscount = 0;
// recalc necessary stuff for mouseaiming
// slopes are already calculated for the full possible view (which is 4*viewheight).
@ -1088,8 +1002,6 @@ void R_SetupFrame(player_t *player, boolean skybox)
viewsin = FINESINE(viewangle>>ANGLETOFINESHIFT);
viewcos = FINECOSINE(viewangle>>ANGLETOFINESHIFT);
sscount = 0;
// recalc necessary stuff for mouseaiming
// slopes are already calculated for the full possible view (which is 4*viewheight).

View File

@ -108,7 +108,4 @@ extern angle_t rw_normalangle;
// angle to line origin
extern angle_t rw_angle1;
// Segs count?
extern size_t sscount;
#endif

View File

@ -2880,14 +2880,20 @@ void R_AddSkins(UINT16 wadnum)
{
STRBUFCPY(skin->realname, skin->name);
for (value = skin->realname; *value; value++)
{
if (*value == '_') *value = ' '; // turn _ into spaces.
else if (*value == '.') *value = '\x1E'; // turn . into katana dot.
}
}
if (!hudname)
{
HUDNAMEWRITE(skin->name);
strupr(skin->hudname);
for (value = skin->hudname; *value; value++)
{
if (*value == '_') *value = ' '; // turn _ into spaces.
else if (*value == '.') *value = '\x1E'; // turn . into katana dot.
}
}
}
else if (!stricmp(stoken, "realname"))
@ -2895,7 +2901,10 @@ void R_AddSkins(UINT16 wadnum)
realname = true;
STRBUFCPY(skin->realname, value);
for (value = skin->realname; *value; value++)
{
if (*value == '_') *value = ' '; // turn _ into spaces.
else if (*value == '.') *value = '\x1E'; // turn . into katana dot.
}
if (!hudname)
HUDNAMEWRITE(skin->realname);
}
@ -2904,7 +2913,10 @@ void R_AddSkins(UINT16 wadnum)
hudname = true;
HUDNAMEWRITE(value);
for (value = skin->hudname; *value; value++)
{
if (*value == '_') *value = ' '; // turn _ into spaces.
else if (*value == '.') *value = '\x1E'; // turn . into katana dot.
}
if (!realname)
STRBUFCPY(skin->realname, skin->hudname);
}

View File

@ -36,6 +36,7 @@ extern INT32 msg_id;
#include "d_main.h"
#include "r_sky.h" // skyflatnum
#include "p_local.h" // camera info
#include "fastcmp.h"
#ifdef HW3SOUND
// 3D Sound Interface
@ -81,6 +82,16 @@ static consvar_t precachesound = {"precachesound", "Off", CV_SAVE, CV_OnOff, NUL
consvar_t cv_soundvolume = {"soundvolume", "31", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_digmusicvolume = {"digmusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_midimusicvolume = {"midimusicvolume", "18", CV_SAVE, soundvolume_cons_t, NULL, 0, NULL, NULL, 0, 0, NULL};
static void Captioning_OnChange(void)
{
S_ResetCaptions();
if (cv_closedcaptioning.value)
S_StartSound(NULL, sfx_menu1);
}
consvar_t cv_closedcaptioning = {"closedcaptioning", "Off", CV_SAVE|CV_CALL, CV_OnOff, Captioning_OnChange, 0, NULL, NULL, 0, 0, NULL};
// number of channels available
#if defined (_WIN32_WCE) || defined (DC) || defined (PSP) || defined(GP2X)
consvar_t cv_numChannels = {"snd_channels", "8", CV_SAVE|CV_CALL, CV_Unsigned, SetChannelsNum, 0, NULL, NULL, 0, 0, NULL};
@ -124,23 +135,24 @@ static consvar_t surround = {"surround", "Off", CV_SAVE, CV_OnOff, NULL, 0, NULL
// percent attenuation from front to back
#define S_IFRACVOL 30
typedef struct
{
// sound information (if null, channel avail.)
sfxinfo_t *sfxinfo;
// origin of sound
const void *origin;
// handle of the sound being played
INT32 handle;
} channel_t;
// the set of channels available
static channel_t *channels = NULL;
static INT32 numofchannels = 0;
caption_t closedcaptions[NUMCAPTIONS];
void S_ResetCaptions(void)
{
UINT8 i;
for (i = 0; i < NUMCAPTIONS; i++)
{
closedcaptions[i].c = NULL;
closedcaptions[i].s = NULL;
closedcaptions[i].t = 0;
closedcaptions[i].b = 0;
}
}
//
// Internals.
//
@ -297,6 +309,8 @@ static void SetChannelsNum(void)
// Free all channels for use
for (i = 0; i < numofchannels; i++)
channels[i].sfxinfo = 0;
S_ResetCaptions();
}
@ -339,6 +353,8 @@ void S_StopSounds(void)
for (cnum = 0; cnum < numofchannels; cnum++)
if (channels[cnum].sfxinfo)
S_StopChannel(cnum);
S_ResetCaptions();
}
void S_StopSoundByID(void *origin, sfxenum_t sfx_id)
@ -387,6 +403,92 @@ void S_StopSoundByNum(sfxenum_t sfxnum)
}
}
void S_StartCaption(sfxenum_t sfx_id, INT32 cnum, UINT16 lifespan)
{
UINT8 i, set, moveup, start;
boolean same = false;
sfxinfo_t *sfx;
if (!cv_closedcaptioning.value) // no captions at all
return;
// check for bogus sound #
// I_Assert(sfx_id >= 0); -- allowing sfx_None; this shouldn't be allowed directly if S_StartCaption is ever exposed to Lua by itself
I_Assert(sfx_id < NUMSFX);
sfx = &S_sfx[sfx_id];
if (sfx->caption[0] == '/') // no caption for this one
return;
start = ((closedcaptions[0].s && (closedcaptions[0].s-S_sfx == sfx_None)) ? 1 : 0);
if (sfx_id)
{
for (i = start; i < (set = NUMCAPTIONS-1); i++)
{
same = ((sfx == closedcaptions[i].s) || (closedcaptions[i].s && fastcmp(sfx->caption, closedcaptions[i].s->caption)));
if (same)
{
set = i;
break;
}
}
}
else
{
set = 0;
same = (closedcaptions[0].s == sfx);
}
moveup = 255;
if (!same)
{
for (i = start; i < set; i++)
{
if (!(closedcaptions[i].c || closedcaptions[i].s) || (sfx->priority >= closedcaptions[i].s->priority))
{
set = i;
if (closedcaptions[i].s && (sfx->priority >= closedcaptions[i].s->priority))
moveup = i;
break;
}
}
for (i = NUMCAPTIONS-1; i > set; i--)
{
if (sfx == closedcaptions[i].s)
{
closedcaptions[i].c = NULL;
closedcaptions[i].s = NULL;
closedcaptions[i].t = 0;
closedcaptions[i].b = 0;
}
}
}
if (moveup != 255)
{
for (i = moveup; i < NUMCAPTIONS-1; i++)
{
if (!(closedcaptions[i].c || closedcaptions[i].s))
break;
}
for (; i > set; i--)
{
closedcaptions[i].c = closedcaptions[i-1].c;
closedcaptions[i].s = closedcaptions[i-1].s;
closedcaptions[i].t = closedcaptions[i-1].t;
closedcaptions[i].b = closedcaptions[i-1].b;
}
}
closedcaptions[set].c = ((cnum == -1) ? NULL : &channels[cnum]);
closedcaptions[set].s = sfx;
closedcaptions[set].t = lifespan;
closedcaptions[set].b = 2; // bob
}
void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
{
INT32 sep, pitch, priority, cnum;
@ -527,6 +629,9 @@ void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume)
sep = (~sep) & 255;
#endif
// Handle closed caption input.
S_StartCaption(sfx_id, cnum, MAXCAPTIONTICS);
// Assigns the handle to one of the channels in the
// mix/output buffer.
channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority);
@ -577,6 +682,9 @@ dontplay:
sep = (~sep) & 255;
#endif
// Handle closed caption input.
S_StartCaption(sfx_id, cnum, MAXCAPTIONTICS);
// Assigns the handle to one of the channels in the
// mix/output buffer.
channels[cnum].handle = I_StartSound(sfx_id, volume, sep, pitch, priority);
@ -598,6 +706,7 @@ void S_StartSound(const void *origin, sfxenum_t sfx_id)
// sfx_id = sfx_mario8;
// break;
case sfx_thok:
case sfx_wepfir:
sfx_id = sfx_mario7;
break;
case sfx_pop:
@ -692,6 +801,7 @@ static INT32 actualmidimusicvolume;
void S_UpdateSounds(void)
{
INT32 audible, cnum, volume, sep, pitch;
UINT8 i;
channel_t *c;
listener_t listener;
@ -719,9 +829,7 @@ void S_UpdateSounds(void)
I_UpdateMumble(NULL, listener);
#endif
// Stop cutting FMOD out. WE'RE sick of it.
I_UpdateSound();
return;
goto notinlevel;
}
if (dedicated || nosound)
@ -760,8 +868,7 @@ void S_UpdateSounds(void)
if (hws_mode != HWS_DEFAULT_MODE)
{
HW3S_UpdateSources();
I_UpdateSound();
return;
goto notinlevel;
}
#endif
@ -849,7 +956,26 @@ void S_UpdateSounds(void)
}
}
notinlevel:
I_UpdateSound();
for (i = 0; i < NUMCAPTIONS; i++) // update captions
{
if (!closedcaptions[i].s)
continue;
if (!(--closedcaptions[i].t))
{
closedcaptions[i].c = NULL;
closedcaptions[i].s = NULL;
}
else if (closedcaptions[i].c && !I_SoundIsPlaying(closedcaptions[i].c->handle))
{
closedcaptions[i].c = NULL;
if (closedcaptions[i].t > CAPTIONFADETICS)
closedcaptions[i].t = CAPTIONFADETICS;
}
}
}
void S_SetSfxVolume(INT32 volume)
@ -1305,6 +1431,12 @@ void S_StopMusic(void)
music_data = NULL;
music_name[0] = 0;
if (cv_closedcaptioning.value)
{
if (closedcaptions[0].s-S_sfx == sfx_None)
closedcaptions[0].t = CAPTIONFADETICS;
}
}
void S_SetDigMusicVolume(INT32 volume)

View File

@ -23,7 +23,7 @@
#define PICKUP_SOUND 0x8000
extern consvar_t stereoreverse;
extern consvar_t cv_soundvolume, cv_digmusicvolume, cv_midimusicvolume;
extern consvar_t cv_soundvolume, cv_closedcaptioning, cv_digmusicvolume, cv_midimusicvolume;
extern consvar_t cv_numChannels;
#ifdef SNDSERV
@ -64,6 +64,34 @@ typedef struct {
angle_t angle;
} listener_t;
typedef struct
{
// sound information (if null, channel avail.)
sfxinfo_t *sfxinfo;
// origin of sound
const void *origin;
// handle of the sound being played
INT32 handle;
} channel_t;
typedef struct {
channel_t *c;
sfxinfo_t *s;
UINT16 t;
UINT8 b;
} caption_t;
#define NUMCAPTIONS 8
#define MAXCAPTIONTICS (2*TICRATE)
#define CAPTIONFADETICS 20
extern caption_t closedcaptions[NUMCAPTIONS];
void S_StartCaption(sfxenum_t sfx_id, INT32 cnum, UINT16 lifespan);
void S_ResetCaptions(void);
// register sound vars and commands at game startup
void S_RegisterSoundStuff(void);

View File

@ -28,6 +28,9 @@
#include "d_main.h"
#include "d_clisrv.h"
#include "f_finale.h"
#include "i_sound.h" // closed captions
#include "s_sound.h" // ditto
#include "g_game.h" // ditto
#if defined (USEASM) && !defined (NORUSEASM)//&& (!defined (_MSC_VER) || (_MSC_VER <= 1200))
@ -434,3 +437,39 @@ void SCR_DisplayTicRate(void)
lasttic = ontic;
}
void SCR_ClosedCaptions(void)
{
UINT8 i;
for (i = 0; i < NUMCAPTIONS; i++)
{
INT32 flags, y;
char dot;
boolean music;
if (!closedcaptions[i].s)
continue;
if ((music = (closedcaptions[i].s-S_sfx == sfx_None)) && (closedcaptions[i].t < flashingtics) && (closedcaptions[i].t & 1))
continue;
flags = V_NOSCALESTART|V_ALLOWLOWERCASE;
y = vid.height-((i + 2)*10*vid.dupy);
dot = ' ';
if (closedcaptions[i].b)
y -= (closedcaptions[i].b--)*vid.dupy;
if (closedcaptions[i].t < CAPTIONFADETICS)
flags |= (((CAPTIONFADETICS-closedcaptions[i].t)/2)*V_10TRANS);
if (music)
dot = '\x19';
else if (closedcaptions[i].c && closedcaptions[i].c->origin)
dot = '\x1E';
V_DrawRightAlignedString(vid.width-(20*vid.dupx), y,
flags, va("%c [%s]", dot, (closedcaptions[i].s->caption[0] ? closedcaptions[i].s->caption : closedcaptions[i].s->name)));
}
}

View File

@ -180,5 +180,6 @@ FUNCMATH boolean SCR_IsAspectCorrect(INT32 width, INT32 height);
// move out to main code for consistency
void SCR_DisplayTicRate(void);
void SCR_ClosedCaptions(void);
#undef DNWH
#endif //__SCREEN_H__

View File

@ -928,6 +928,10 @@ void I_FinishUpdate(void)
if (I_SkipFrame())
return;
// draw captions if enabled
if (cv_closedcaptioning.value)
SCR_ClosedCaptions();
if (cv_ticrate.value)
SCR_DisplayTicRate();

View File

@ -1341,6 +1341,10 @@ void I_FinishUpdate(void)
if (I_SkipFrame())
return;
// draw captions if enabled
if (cv_closedcaptioning.value)
SCR_ClosedCaptions();
if (cv_ticrate.value)
SCR_DisplayTicRate();

View File

@ -32,448 +32,448 @@ sfxinfo_t S_sfx[NUMSFX] =
various flags. See soundflags_t.
*****/
// S_sfx[0] needs to be a dummy for odd reasons. (don't modify this comment)
// name, singularity, priority, pitch, volume, data, length, skinsound, usefulness, lumpnum
{"none" , false, 0, 0, -1, NULL, 0, -1, -1, LUMPERROR},
// name, singularity, priority, pitch, volume, data, length, skinsound, usefulness, lumpnum, caption
{"none" , false, 0, 0, -1, NULL, 0, -1, -1, LUMPERROR, "///////////////////////////////"}, // maximum length
// Skin Sounds
{"altdi1", false, 192, 16, -1, NULL, 0, SKSPLDET1, -1, LUMPERROR},
{"altdi2", false, 192, 16, -1, NULL, 0, SKSPLDET2, -1, LUMPERROR},
{"altdi3", false, 192, 16, -1, NULL, 0, SKSPLDET3, -1, LUMPERROR},
{"altdi4", false, 192, 16, -1, NULL, 0, SKSPLDET4, -1, LUMPERROR},
{"altow1", false, 192, 16, -1, NULL, 0, SKSPLPAN1, -1, LUMPERROR},
{"altow2", false, 192, 16, -1, NULL, 0, SKSPLPAN2, -1, LUMPERROR},
{"altow3", false, 192, 16, -1, NULL, 0, SKSPLPAN3, -1, LUMPERROR},
{"altow4", false, 192, 16, -1, NULL, 0, SKSPLPAN4, -1, LUMPERROR},
{"victr1", false, 64, 16, -1, NULL, 0, SKSPLVCT1, -1, LUMPERROR},
{"victr2", false, 64, 16, -1, NULL, 0, SKSPLVCT2, -1, LUMPERROR},
{"victr3", false, 64, 16, -1, NULL, 0, SKSPLVCT3, -1, LUMPERROR},
{"victr4", false, 64, 16, -1, NULL, 0, SKSPLVCT4, -1, LUMPERROR},
{"gasp" , false, 64, 0, -1, NULL, 0, SKSGASP, -1, LUMPERROR},
{"jump" , false, 140, 0, -1, NULL, 0, SKSJUMP, -1, LUMPERROR},
{"pudpud", false, 64, 0, -1, NULL, 0, SKSPUDPUD, -1, LUMPERROR},
{"putput", false, 64, 0, -1, NULL, 0, SKSPUTPUT, -1, LUMPERROR}, // not as high a priority
{"spin" , false, 100, 0, -1, NULL, 0, SKSSPIN, -1, LUMPERROR},
{"spndsh", false, 64, 1, -1, NULL, 0, SKSSPNDSH, -1, LUMPERROR},
{"thok" , false, 96, 0, -1, NULL, 0, SKSTHOK, -1, LUMPERROR},
{"zoom" , false, 120, 1, -1, NULL, 0, SKSZOOM, -1, LUMPERROR},
{"skid", false, 64, 32, -1, NULL, 0, SKSSKID, -1, LUMPERROR},
{"altdi1", false, 192, 16, -1, NULL, 0, SKSPLDET1, -1, LUMPERROR, "Dying"},
{"altdi2", false, 192, 16, -1, NULL, 0, SKSPLDET2, -1, LUMPERROR, "Dying"},
{"altdi3", false, 192, 16, -1, NULL, 0, SKSPLDET3, -1, LUMPERROR, "Dying"},
{"altdi4", false, 192, 16, -1, NULL, 0, SKSPLDET4, -1, LUMPERROR, "Dying"},
{"altow1", false, 192, 16, -1, NULL, 0, SKSPLPAN1, -1, LUMPERROR, "Ring loss"},
{"altow2", false, 192, 16, -1, NULL, 0, SKSPLPAN2, -1, LUMPERROR, "Ring loss"},
{"altow3", false, 192, 16, -1, NULL, 0, SKSPLPAN3, -1, LUMPERROR, "Ring loss"},
{"altow4", false, 192, 16, -1, NULL, 0, SKSPLPAN4, -1, LUMPERROR, "Ring loss"},
{"victr1", false, 64, 16, -1, NULL, 0, SKSPLVCT1, -1, LUMPERROR, "/"},
{"victr2", false, 64, 16, -1, NULL, 0, SKSPLVCT2, -1, LUMPERROR, "/"},
{"victr3", false, 64, 16, -1, NULL, 0, SKSPLVCT3, -1, LUMPERROR, "/"},
{"victr4", false, 64, 16, -1, NULL, 0, SKSPLVCT4, -1, LUMPERROR, "/"},
{"gasp" , false, 64, 0, -1, NULL, 0, SKSGASP, -1, LUMPERROR, "Bubble gasp"},
{"jump" , false, 140, 0, -1, NULL, 0, SKSJUMP, -1, LUMPERROR, "Jump"},
{"pudpud", false, 64, 0, -1, NULL, 0, SKSPUDPUD, -1, LUMPERROR, "Tired flight"},
{"putput", false, 64, 0, -1, NULL, 0, SKSPUTPUT, -1, LUMPERROR, "Flight"}, // not as high a priority
{"spin" , false, 100, 0, -1, NULL, 0, SKSSPIN, -1, LUMPERROR, "Spin"},
{"spndsh", false, 64, 1, -1, NULL, 0, SKSSPNDSH, -1, LUMPERROR, "Spindash"},
{"thok" , false, 96, 0, -1, NULL, 0, SKSTHOK, -1, LUMPERROR, "Thok"},
{"zoom" , false, 120, 1, -1, NULL, 0, SKSZOOM, -1, LUMPERROR, "Spin launch"},
{"skid", false, 64, 32, -1, NULL, 0, SKSSKID, -1, LUMPERROR, "Skid"},
// Ambience/background objects/etc
{"ambint", true, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ambint", true, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Obnoxious disco music"},
{"alarm", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"buzz1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"buzz2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"buzz3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"buzz4", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"crumbl", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Platform Crumble Tails 03-16-2001
{"fire", false, 8, 32, -1, NULL, 0, -1, -1, LUMPERROR},
{"grind", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"laser", true, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"mswing", false, 16, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"pstart", false, 100, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"pstop", false, 100, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"steam1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Tails 06-19-2001
{"steam2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Tails 06-19-2001
{"wbreak", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"alarm", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Alarm"},
{"buzz1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Electric zap"},
{"buzz2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Electric zap"},
{"buzz3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wacky worksurface"},
{"buzz4", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Buzz"},
{"crumbl", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crumbling"}, // Platform Crumble Tails 03-16-2001
{"fire", false, 8, 32, -1, NULL, 0, -1, -1, LUMPERROR, "Flamethrower"},
{"grind", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic grinding"},
{"laser", true, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Laser hum"},
{"mswing", false, 16, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Swinging mace"},
{"pstart", false, 100, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"},
{"pstop", false, 100, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crusher stomp"},
{"steam1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Steam jet"}, // Tails 06-19-2001
{"steam2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Steam jet"}, // Tails 06-19-2001
{"wbreak", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wood breaking"},
{"rainin", true, 24, 4, -1, NULL, 0, -1, -1, LUMPERROR},
{"litng1", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"litng2", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"litng3", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"litng4", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"athun1", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"athun2", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"rainin", true, 24, 4, -1, NULL, 0, -1, -1, LUMPERROR, "Rain"},
{"litng1", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"},
{"litng2", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"},
{"litng3", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"},
{"litng4", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"},
{"athun1", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"},
{"athun2", false, 16, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"},
{"amwtr1", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr2", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr3", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr4", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr5", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr6", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr7", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"amwtr8", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bubbl1", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bubbl2", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bubbl3", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bubbl4", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bubbl5", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"floush", false, 16, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"splash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"splish", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Splish Tails 12-08-2000
{"wdrip1", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip2", false, 8 , 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip3", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip4", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip5", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip6", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip7", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdrip8", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wslap", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Water Slap Tails 12-13-2000
{"amwtr1", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr2", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr3", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr4", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr5", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr6", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr7", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"amwtr8", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running water"},
{"bubbl1", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"bubbl2", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"bubbl3", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"bubbl4", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"bubbl5", false, 11, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"floush", false, 16, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"},
{"splash", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Glub"}, // labeling sfx_splash as "glub" and sfx_splish as "splash" seems wrong but isn't
{"splish", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"}, // Splish Tails 12-08-2000
{"wdrip1", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip2", false, 8 , 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip3", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip4", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip5", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip6", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip7", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wdrip8", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drip"},
{"wslap", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"}, // Water Slap Tails 12-13-2000
{"doora1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"doorb1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"doorc1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"doorc2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"doord1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"doord2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"eleva1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"eleva2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"eleva3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"elevb1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"elevb2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"elevb3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"doora1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sliding open"},
{"doorb1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sliding open"},
{"doorc1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wooden door opening"},
{"doorc2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Slamming shut"},
{"doord1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Creaking open"},
{"doord2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Slamming shut"},
{"eleva1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starting elevator"},
{"eleva2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Moving elevator"},
{"eleva3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stopping elevator"},
{"elevb1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starting elevator"},
{"elevb2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Moving elevator"},
{"elevb3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stopping elevator"},
{"ambin2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lavbub", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"rocks1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"rocks2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"rocks3", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"rocks4", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"rumbam", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"rumble", false, 64, 24, -1, NULL, 0, -1, -1, LUMPERROR},
{"ambin2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Natural vibrations"},
{"lavbub", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Bubbling lava"},
{"rocks1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"},
{"rocks2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"},
{"rocks3", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"},
{"rocks4", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"},
{"rumbam", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"},
{"rumble", false, 64, 24, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"},
// Game objects, etc
{"appear", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"bkpoof", false, 70, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"bnce1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Boing!
{"bnce2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Boing!
{"cannon", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"cgot" , true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Got Emerald! Tails 09-02-2001
{"cybdth", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"deton", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ding", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"dmpain", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"drown", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"fizzle", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"gbeep", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Grenade beep
{"gclose", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ghit" , false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"gloop", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"gspray", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"gravch", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"itemup", true, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"jet", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"jshard", true, 167, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lose" , false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"lvpass", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mindig", false, 8, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"mixup", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"monton", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"pogo" , false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"pop" , false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"rail1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"rail2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"rlaunc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"shield", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // generic GET!
{"wirlsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Whirlwind GET!
{"forcsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Force GET!
{"elemsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Elemental GET!
{"armasg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Armaggeddon GET!
{"attrsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Attract GET!
{"shldls", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // You LOSE!
{"spdpad", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"spkdth", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"spring", false, 112, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"statu1", true, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"statu2", true, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"strpst", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Starpost Sound Tails 07-04-2002
{"supert", true, 127, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"telept", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"tink" , false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"token" , true, 224, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // SS token
{"trfire", true, 60, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"trpowr", true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"turhit", false, 40, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"wdjump", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mswarp", false, 60, 16, -1, NULL, 0, -1, -1, LUMPERROR},
{"mspogo", false, 60, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"boingf", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"corkp", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"corkh", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"appear", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Appearing platform"},
{"bkpoof", false, 70, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Armageddon explosion"},
{"bnce1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bounce"}, // Boing!
{"bnce2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Scatter"}, // Boing!
{"cannon", false, 64, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Powerful shot"},
{"cgot" , true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Chaos Emerald"}, // Got Emerald! Tails 09-02-2001
{"cybdth", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Explosion"},
{"deton", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous beeping"},
{"ding", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Ding"},
{"dmpain", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Machine damage"},
{"drown", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drowning"},
{"fizzle", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Electric fizzle"},
{"gbeep", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous beeping"}, // Grenade beep
{"wepfir", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing weapon"}, // defaults to thok
{"ghit" , false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Goop splash"},
{"gloop", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"},
{"gspray", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Goop sling"},
{"gravch", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Recycler"},
{"itemup", true, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sparkle"},
{"jet", false, 8, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jet engine"},
{"jshard", true, 167, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got shard"},
{"lose" , false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Failure"},
{"lvpass", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spinning signpost"},
{"mindig", false, 8, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Tunnelling"},
{"mixup", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Teleport"},
{"monton", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Golden Monitor activated"},
{"pogo" , false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical pogo"},
{"pop" , false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pop"},
{"rail1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing rail"},
{"rail2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crashing rail"},
{"rlaunc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing"},
{"shield", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pity Shield"}, // generic GET!
{"wirlsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Whirlwind Shield"}, // Whirlwind GET!
{"forcsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Force Shield"}, // Force GET!
{"elemsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Elemental Shield"}, // Elemental GET!
{"armasg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Armageddon Shield"}, // Armaggeddon GET!
{"attrsg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Attraction Shield"}, // Attract GET!
{"shldls", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hurt"}, // You LOSE!
{"spdpad", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Speedpad"},
{"spkdth", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spiked"},
{"spring", false, 112, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spring"},
{"statu1", true, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Pushing a statue"},
{"statu2", true, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Pushing a statue"},
{"strpst", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"}, // Starpost Sound Tails 07-04-2002
{"supert", true, 127, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Transformation"},
{"telept", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Dash"},
{"tink" , false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tink"},
{"token" , true, 224, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Token"}, // SS token
{"trfire", true, 60, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Laser fired"},
{"trpowr", true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"},
{"turhit", false, 40, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Laser hit"},
{"wdjump", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Whirlwind jump"},
{"mswarp", false, 60, 16, -1, NULL, 0, -1, -1, LUMPERROR, "Spinning out"},
{"mspogo", false, 60, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Breaking through"},
{"boingf", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bouncing"},
{"corkp", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cork fired"},
{"corkh", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cork hit"},
// Menu, interface
{"chchng", false, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"dwnind", false, 212, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"emfind", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"flgcap", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"menu1", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"oneup", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ptally", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Point tally is identical to menu for now
{"radio", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"wepchg", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Weapon switch is identical to menu for now
{"wtrdng", true, 212, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // make sure you can hear the DING DING! Tails 03-08-2000
{"zelda", false, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"chchng", false, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Score"},
{"dwnind", false, 212, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Thinking about air"},
{"emfind", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Radar beep"},
{"flgcap", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flag captured"},
{"menu1", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Menu beep"},
{"oneup", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "One-up"},
{"ptally", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tally"}, // Point tally is identical to menu for now
{"radio", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Notification"},
{"wepchg", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Weapon change"}, // Weapon switch is identical to menu for now
{"wtrdng", true, 212, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aquaphobia"}, // make sure you can hear the DING DING! Tails 03-08-2000
{"zelda", false, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Discovery"},
// NiGHTS
{"ideya", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"xideya", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Xmas
{"nbmper", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"nxbump", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Xmas
{"ncitem", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"nxitem", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Xmas
{"ngdone", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"nxdone", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Xmas
{"drill1", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"drill2", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ncspec", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Tails 12-15-2003
{"nghurt", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ngskid", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hoop1", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hoop2", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hoop3", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"hidden", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"prloop", false, 104, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"timeup", true, 256, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"ideya", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Success"},
{"xideya", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Success"}, // Xmas
{"nbmper", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bumper"},
{"nxbump", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bumper"}, // Xmas
{"ncitem", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got special"},
{"nxitem", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got special"}, // Xmas
{"ngdone", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bonus time start"},
{"nxdone", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bonus time start"}, // Xmas
{"drill1", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drill start"},
{"drill2", false, 48, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drill"},
{"ncspec", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power-up"}, // Tails 12-15-2003
{"nghurt", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hurt"},
{"ngskid", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Force stop"},
{"hoop1", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hoop"},
{"hoop2", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hoop+"},
{"hoop3", false, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hoop++"},
{"hidden", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Discovery"},
{"prloop", false, 104, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Gust of wind"},
{"timeup", true, 256, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous Countdown"},
// Mario
{"koopfr" , true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario3", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario4", true, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario5", false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario6", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario7", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario8", false, 48, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"mario9", true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"marioa", true, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"thwomp", true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR},
{"koopfr" , true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"},
{"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hitting a ceiling"},
{"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Koopa shell"},
{"mario3", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power-up"},
{"mario4", true, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got coin"},
{"mario5", false, 78, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Boot"},
{"mario6", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jump"},
{"mario7", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"},
{"mario8", false, 48, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Hurt"},
{"mario9", true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Emerging"},
{"marioa", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "One-up"},
{"thwomp", true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Thwomp"},
// Black Eggman
{"bebomb", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bechrg", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"becrsh", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bedeen", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bedie1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bedie2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"beeyow", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"befall", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"befire", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"beflap", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"begoop", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"begrnd", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"behurt", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bejet1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"belnch", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"beoutb", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"beragh", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"beshot", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bestep", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bestp2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bewar1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bewar2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bewar3", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bewar4", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bexpld", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bgxpld", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"bebomb", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Big explosion"},
{"bechrg", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"},
{"becrsh", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Crash"},
{"bedeen", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic crash"},
{"bedie1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman crying"},
{"bedie2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman crying"},
{"beeyow", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Failing machinery"},
{"befall", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic slam"},
{"befire", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Firing goop"},
{"beflap", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical jump"},
{"begoop", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Powerful shot"},
{"begrnd", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic grinding"},
{"behurt", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman shocked"},
{"bejet1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Jetpack charge"},
{"belnch", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical jump"},
{"beoutb", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Failed shot"},
{"beragh", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman screaming"},
{"beshot", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Firing missile"},
{"bestep", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical stomp"},
{"bestp2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical stomp"},
{"bewar1", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"},
{"bewar2", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"},
{"bewar3", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"},
{"bewar4", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"},
{"bexpld", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Explosion"},
{"bgxpld", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Explosion"},
// Cybrakdemon
{"beelec", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"brakrl", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"brakrx", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR},
{"beelec", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Electricity"},
{"brakrl", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Rocket launch"},
{"brakrx", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Rocket explosion"},
// S3&K sounds
{"s3k33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k54", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR}, // MetalSonic shot fire
{"s3k55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k64", false, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k65", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR}, // Blue Spheres
{"s3k66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k6f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k74", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k75", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k76", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k77", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k78", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k79", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k7a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k7b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k7c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k7d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k7e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k7f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k80", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k81", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k82", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k83", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k84", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k85", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k86", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k87", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k88", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k89", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k8a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k8b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k8c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k8d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k8e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k8f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k90", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k91", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k92", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k93", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k94", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k95", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k96", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k97", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k98", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k99", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k9a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k9b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k9c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k9d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k9e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k9f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3ka9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kaa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kaf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kb9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbcs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbcl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbds", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbdl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbes", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbfs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kbfl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc0s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc0l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc1s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc1l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc2s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc2l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc3s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc3l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc4s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc4l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc5s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc8s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc8l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc9s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kc9l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcas", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kccs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kccl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcds", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcdl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kces", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcfs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kcfl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd0s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd0l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd1s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd1l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd2s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd2l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd3s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd3l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd4s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd4l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd5s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd7s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd7l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd8s", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR}, // Sharp Spin (maybe use the long/L version?)
{"s3kd8l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd9s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kd9l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdas", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR},
{"s3k33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sparkle"}, // stereo in original game, identical to latter
{"s3k34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sparkle"}, // mono in original game, identical to previous
{"s3k35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hurt"},
{"s3k36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Skid"},
{"s3k37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spiked"},
{"s3k38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bubble gasp"},
{"s3k39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"},
{"s3k3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Shield"},
{"s3k3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drowning"},
{"s3k3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spin"},
{"s3k3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pop"},
{"s3k3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flame Shield"},
{"s3k3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bubble Shield"},
{"s3k40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Attraction shot"},
{"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning Shield"},
{"s3k42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Twinspin"},
{"s3k43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flame burst"},
{"s3k44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bubble bounce"},
{"s3k45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning zap"},
{"s3k46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Transformation"},
{"s3k47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rising dust"},
{"s3k48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic clink"},
{"s3k49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rock"},
{"s3k4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Grab"},
{"s3k4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Water splash"},
{"s3k4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Heavy landing"},
{"s3k4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing bullet"},
{"s3k4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bomb explosion"},
{"s3k4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flamethrower"},
{"s3k50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Siren"},
{"s3k51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling bomb"},
{"s3k52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spike"},
{"s3k53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"},
{"s3k54", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Firing"}, // MetalSonic shot fire
{"s3k55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical movement"},
{"s3k56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Heavy landing"},
{"s3k57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"},
{"s3k58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical movement"},
{"s3k59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crumbling"},
{"s3k5a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aiming"},
{"s3k5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Menu beep"},
{"s3k5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Electric spark"},
{"s3k5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bouncing missile"},
{"s3k5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing laser"},
{"s3k5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crusher stomp"},
{"s3k60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying away"},
{"s3k61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drilling"},
{"s3k62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jump"},
{"s3k63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"},
{"s3k64", false, 64, 2, -1, NULL, 0, -1, -1, LUMPERROR, "Clatter"},
{"s3k65", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got blue sphere"}, // Blue Spheres
{"s3k66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Special stage clear"},
{"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing missile"},
{"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Unknown possibilities"},
{"s3k69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Switch click"},
{"s3k6a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Special stage clear"},
{"s3k6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3k6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Burst"},
{"s3k6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3k6e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical damage"},
{"s3k6f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"},
{"s3k70", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Burst"},
{"s3k71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Basic Shield"},
{"s3k72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Movement"},
{"s3k73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Warp"},
{"s3k74", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Gong"},
{"s3k75", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rising"},
{"s3k76", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Click"},
{"s3k77", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Balloon pop"},
{"s3k78", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Magnet"},
{"s3k79", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Electric charge"},
{"s3k7a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rising from lava"},
{"s3k7b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Organic bounce"},
{"s3k7c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Magnet"},
{"s3k7d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3k7e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Eating dirt"},
{"s3k7f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Freeze"},
{"s3k80", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ice spike burst"},
{"s3k81", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Burst"},
{"s3k82", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Burst"},
{"s3k83", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Collapsing"},
{"s3k84", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"},
{"s3k85", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Powering down"},
{"s3k86", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Alarm"},
{"s3k87", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bounce"},
{"s3k88", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic squeak"},
{"s3k89", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Advanced technology"},
{"s3k8a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Boing"},
{"s3k8b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Powerful hit"},
{"s3k8c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3k8d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3k8e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3k8f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Opening"},
{"s3k90", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Closing"},
{"s3k91", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Closed"},
{"s3k92", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ghost"},
{"s3k93", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rebuilding"},
{"s3k94", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spike"},
{"s3k95", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rising from lava"},
{"s3k96", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling object"},
{"s3k97", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wind"},
{"s3k98", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling spike"},
{"s3k99", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bounce"},
{"s3k9a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Click"},
{"s3k9b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crusher stomp"},
{"s3k9c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Super Emerald"},
{"s3k9d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Targeting"},
{"s3k9e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wham"},
{"s3k9f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Transformation"},
{"s3ka0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Launch"},
{"s3ka1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3ka2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Launch"},
{"s3ka3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Lift"},
{"s3ka4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"},
{"s3ka5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3ka6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Attraction fizzle"},
{"s3ka7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Countdown beep"},
{"s3ka8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Energy"},
{"s3ka9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aquaphobia"},
{"s3kaa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bumper"},
{"s3kab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"},
{"s3kac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Continue"},
{"s3kad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "GO!"},
{"s3kae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pinball flipper"},
{"s3kaf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "To Special Stage"},
{"s3kb0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Score"},
{"s3kb1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spring"},
{"s3kb2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Failure"},
{"s3kb3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Warp"},
{"s3kb4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Explosion"},
{"s3kb5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Clink"},
{"s3kb6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spin launch"},
{"s3kb7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tumbler"},
{"s3kb8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling signpost"},
{"s3kb9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ring loss"},
{"s3kba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flight"},
{"s3kbb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Tired flight"},
{"s3kbcs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3kbcl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // long version of previous
{"s3kbds", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying fortress"},
{"s3kbdl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying fortress"}, // ditto
{"s3kbes", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying away"},
{"s3kbel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying away"}, // ditto
{"s3kbfs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Turbine"},
{"s3kbfl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Turbine"}, // ditto
{"s3kc0s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Turbine"},
{"s3kc0l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Turbine"}, // ditto
{"s3kc1s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Fan"},
{"s3kc1l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Fan"}, // ditto
{"s3kc2s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flamethrower"},
{"s3kc2l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flamethrower"}, // ditto
{"s3kc3s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Levitation"},
{"s3kc3l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Levitation"}, // ditto
{"s3kc4s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing laser"},
{"s3kc4l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing laser"}, // ditto
{"s3kc5s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3kc5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // ditto
{"s3kc6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Orbiting"},
{"s3kc6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Orbiting"}, // ditto
{"s3kc7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aiming"},
{"s3kc8s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sliding"},
{"s3kc8l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sliding"}, // ditto
{"s3kc9s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Swinging"},
{"s3kc9l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Swinging"}, // ditto
{"s3kcas", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Energy"},
{"s3kcal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Energy"}, // ditto
{"s3kcbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"},
{"s3kcbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominuous rumbling"}, // ditto
{"s3kccs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Collapsing"},
{"s3kccl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Collapsing"}, // ditto
{"s3kcds", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"},
{"s3kcdl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"}, // ditto
{"s3kces", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wind tunnel"},
{"s3kcel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wind tunnel"}, // ditto
{"s3kcfs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3kcfl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // ditto
{"s3kd0s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rising"},
{"s3kd0l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rising"}, // ditto
{"s3kd1s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3kd1l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // ditto
{"s3kd2s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Turning"},
{"s3kd2l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Turning"}, // ditto
{"s3kd3s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3kd3l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // ditto
{"s3kd4s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Engine"},
{"s3kd4l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Engine"}, // ditto
{"s3kd5s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling lava"},
{"s3kd5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Falling lava"}, // ditto
{"s3kd6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""},
{"s3kd6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // ditto
{"s3kd7s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Movement"},
{"s3kd7l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Movement"}, // ditto
{"s3kd8s", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, "Acceleration"}, // Sharp Spin (maybe use the long/L version?)
{"s3kd8l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Acceleration"}, // ditto
{"s3kd9s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Magnetism"},
{"s3kd9l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Magnetism"}, // ditto
{"s3kdas", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Click"},
{"s3kdal", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Click"}, // ditto
{"s3kdbs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running on water"},
{"s3kdbl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Running on water"}, // ditto
// skin sounds free slots to add sounds at run time (Boris HACK!!!)
// initialized to NULL
@ -513,6 +513,8 @@ void S_InitRuntimeSounds (void)
S_sfx[i].skinsound = -1;
S_sfx[i].usefulness = -1;
S_sfx[i].lumpnum = LUMPERROR;
//strlcpy(S_sfx[i].caption, "", 1);
S_sfx[i].caption[0] = '\0';
}
}

View File

@ -84,6 +84,9 @@ struct sfxinfo_struct
// lump number of sfx
lumpnum_t lumpnum;
// closed caption info/wiki table bait
char caption[32];
};
// the complete set of sound effects
@ -210,7 +213,7 @@ typedef enum
sfx_drown,
sfx_fizzle,
sfx_gbeep,
sfx_gclose,
sfx_wepfir,
sfx_ghit,
sfx_gloop,
sfx_gspray,

View File

@ -78,12 +78,6 @@ static patch_t *race3;
static patch_t *racego;
static patch_t *ttlnum;
static patch_t *nightslink;
static patch_t *count5;
static patch_t *count4;
static patch_t *count3;
static patch_t *count2;
static patch_t *count1;
static patch_t *count0;
static patch_t *curweapon;
static patch_t *normring;
static patch_t *bouncering;
@ -137,25 +131,25 @@ hudinfo_t hudinfo[NUMHUDITEMS] =
{ 16, 42}, // HUD_RINGS
{ 220, 10}, // HUD_RINGSSPLIT
{ 112, 42}, // HUD_RINGSNUM
{ 288, 10}, // HUD_RINGSNUMSPLIT
{ 120, 42}, // HUD_RINGSNUM
{ 296, 10}, // HUD_RINGSNUMSPLIT
{ 16, 10}, // HUD_SCORE
{ 128, 10}, // HUD_SCORENUM
{ 120, 10}, // HUD_SCORENUM
{ 16, 26}, // HUD_TIME
{ 136, 10}, // HUD_TIMESPLIT
{ 88, 26}, // HUD_MINUTES
{ 128, 10}, // HUD_TIMESPLIT
{ 96, 26}, // HUD_MINUTES
{ 188, 10}, // HUD_MINUTESSPLIT
{ 88, 26}, // HUD_TIMECOLON
{ 96, 26}, // HUD_TIMECOLON
{ 188, 10}, // HUD_TIMECOLONSPLIT
{ 112, 26}, // HUD_SECONDS
{ 120, 26}, // HUD_SECONDS
{ 212, 10}, // HUD_SECONDSSPLIT
{ 112, 26}, // HUD_TIMETICCOLON
{ 136, 26}, // HUD_TICS
{ 120, 26}, // HUD_TIMETICCOLON
{ 144, 26}, // HUD_TICS
{ 112, 56}, // HUD_SS_TOTALRINGS
{ 288, 40}, // HUD_SS_TOTALRINGS_SPLIT
{ 120, 56}, // HUD_SS_TOTALRINGS
{ 296, 40}, // HUD_SS_TOTALRINGS_SPLIT
{ 110, 93}, // HUD_GETRINGS
{ 160, 93}, // HUD_GETRINGSNUM
@ -272,12 +266,6 @@ void ST_LoadGraphics(void)
race3 = W_CachePatchName("RACE3", PU_HUDGFX);
racego = W_CachePatchName("RACEGO", PU_HUDGFX);
nightslink = W_CachePatchName("NGHTLINK", PU_HUDGFX);
count5 = W_CachePatchName("DRWNF0", PU_HUDGFX);
count4 = W_CachePatchName("DRWNE0", PU_HUDGFX);
count3 = W_CachePatchName("DRWND0", PU_HUDGFX);
count2 = W_CachePatchName("DRWNC0", PU_HUDGFX);
count1 = W_CachePatchName("DRWNB0", PU_HUDGFX);
count0 = W_CachePatchName("DRWNA0", PU_HUDGFX);
for (i = 0; i < 6; ++i)
{
@ -809,8 +797,15 @@ static void ST_drawFirstPersonHUD(void)
// Graue 06-18-2004: no V_NOSCALESTART, no SCX, no SCY, snap to right
if ((player->powers[pw_shield] & SH_NOSTACK & ~SH_FORCEHP) == SH_FORCE)
{
if ((player->powers[pw_shield] & SH_FORCEHP) > 0 || leveltime & 1)
p = forceshield;
UINT8 i, max = (player->powers[pw_shield] & SH_FORCEHP);
for (i = 0; i <= max; i++)
{
INT32 flags = (V_SNAPTORIGHT|V_SNAPTOTOP)|((i == max) ? V_HUDTRANS : V_HUDTRANSHALF);
if (splitscreen)
V_DrawSmallScaledPatch(312-(3*i), STRINGY(24)+(3*i), flags, forceshield);
else
V_DrawScaledPatch(304-(3*i), 24+(3*i), flags, forceshield);
}
}
else switch (player->powers[pw_shield] & SH_NOSTACK)
{
@ -853,50 +848,48 @@ static void ST_drawFirstPersonHUD(void)
p = NULL;
// Display the countdown drown numbers!
if ((player->powers[pw_underwater] <= 11*TICRATE + 1
&& player->powers[pw_underwater] >= 10*TICRATE + 1)
|| (player->powers[pw_spacetime] <= 11*TICRATE + 1
&& player->powers[pw_spacetime] >= 10*TICRATE + 1))
{
p = count5;
}
else if ((player->powers[pw_underwater] <= 9*TICRATE + 1
&& player->powers[pw_underwater] >= 8*TICRATE + 1)
|| (player->powers[pw_spacetime] <= 9*TICRATE + 1
&& player->powers[pw_spacetime] >= 8*TICRATE + 1))
{
p = count4;
}
else if ((player->powers[pw_underwater] <= 7*TICRATE + 1
&& player->powers[pw_underwater] >= 6*TICRATE + 1)
|| (player->powers[pw_spacetime] <= 7*TICRATE + 1
&& player->powers[pw_spacetime] >= 6*TICRATE + 1))
{
p = count3;
}
else if ((player->powers[pw_underwater] <= 5*TICRATE + 1
&& player->powers[pw_underwater] >= 4*TICRATE + 1)
|| (player->powers[pw_spacetime] <= 5*TICRATE + 1
&& player->powers[pw_spacetime] >= 4*TICRATE + 1))
{
p = count2;
}
else if ((player->powers[pw_underwater] <= 3*TICRATE + 1
&& player->powers[pw_underwater] >= 2*TICRATE + 1)
|| (player->powers[pw_spacetime] <= 3*TICRATE + 1
&& player->powers[pw_spacetime] >= 2*TICRATE + 1))
{
p = count1;
}
else if ((player->powers[pw_underwater] <= 1*TICRATE + 1
&& player->powers[pw_underwater] > 1)
|| (player->powers[pw_spacetime] <= 1*TICRATE + 1
&& player->powers[pw_spacetime] > 1))
{
p = count0;
UINT32 airtime;
UINT32 frame = 0;
spriteframe_t *sprframe;
// If both air timers are active, use the air timer with the least time left
if (player->powers[pw_underwater] && player->powers[pw_spacetime])
airtime = min(player->powers[pw_underwater], player->powers[pw_spacetime]);
else // Use whichever one is active otherwise
airtime = (player->powers[pw_spacetime]) ? player->powers[pw_spacetime] : player->powers[pw_underwater];
if (!airtime)
return; // No air timers are active, nothing would be drawn anyway
airtime--; // The original code was all n*TICRATE + 1, so let's remove 1 tic for simplicity
if (airtime > 11*TICRATE)
return; // Not time to draw any drown numbers yet
// Choose which frame to use based on time left
if (airtime <= 11*TICRATE && airtime >= 10*TICRATE)
frame = 5;
else if (airtime <= 9*TICRATE && airtime >= 8*TICRATE)
frame = 4;
else if (airtime <= 7*TICRATE && airtime >= 6*TICRATE)
frame = 3;
else if (airtime <= 5*TICRATE && airtime >= 4*TICRATE)
frame = 2;
else if (airtime <= 3*TICRATE && airtime >= 2*TICRATE)
frame = 1;
else if (airtime <= 1*TICRATE && airtime > 0)
frame = 0;
else
return; // Don't draw anything between numbers
if (player->charflags & SF_MACHINE)
frame += 6; // Robots use different drown numbers
// Get the front angle patch for the frame
sprframe = &sprites[SPR_DRWN].spriteframes[frame];
p = W_CachePatchNum(sprframe->lumppat[0], PU_CACHE);
}
// Display the countdown drown numbers!
if (p)
V_DrawScaledPatch(SCX((BASEVIDWIDTH/2) - (SHORT(p->width)/2) + SHORT(p->leftoffset)), SCY(60 - SHORT(p->topoffset)),
V_NOSCALESTART|V_OFFSET|V_TRANSLUCENT, p);
@ -1479,7 +1472,7 @@ static inline void ST_drawRaceHUD(void)
{
if (leveltime >= TICRATE && leveltime < 5*TICRATE)
{
INT32 height = (BASEVIDHEIGHT/2);
INT32 height = ((3*BASEVIDHEIGHT)>>2) - 8;
INT32 bounce = (leveltime % TICRATE);
patch_t *racenum;
switch (leveltime/TICRATE)
@ -1498,7 +1491,11 @@ static inline void ST_drawRaceHUD(void)
break;
}
if (bounce < 3)
{
height -= (2 - bounce);
if (!bounce)
S_StartSound(0, ((racenum == racego) ? sfx_s3kad : sfx_s3ka7));
}
V_DrawScaledPatch(SCX((BASEVIDWIDTH - SHORT(racenum->width))/2), (INT32)(SCY(height)), V_NOSCALESTART, racenum);
}

View File

@ -38,13 +38,39 @@ UINT8 *screens[5];
// screens[3] = fade screen start
// screens[4] = fade screen end, postimage tempoarary buffer
static CV_PossibleValue_t gamma_cons_t[] = {{0, "MIN"}, {4, "MAX"}, {0, NULL}};
static void CV_usegamma_OnChange(void);
consvar_t cv_ticrate = {"showfps", "No", 0, CV_YesNo, NULL, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_usegamma = {"gamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_usegamma_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_allcaps = {"allcaps", "Off", 0, CV_OnOff, NULL, 0, NULL, NULL, 0, 0, NULL};
static void CV_palette_OnChange(void);
static CV_PossibleValue_t gamma_cons_t[] = {{-15, "MIN"}, {5, "MAX"}, {0, NULL}};
consvar_t cv_globalgamma = {"gamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t saturation_cons_t[] = {{0, "MIN"}, {10, "MAX"}, {0, NULL}};
consvar_t cv_globalsaturation = {"saturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
#define huecoloursteps 4
static CV_PossibleValue_t hue_cons_t[] = {{0, "MIN"}, {(huecoloursteps*6)-1, "MAX"}, {0, NULL}};
consvar_t cv_rhue = {"rhue", "0", CV_SAVE|CV_CALL, hue_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_yhue = {"yhue", "4", CV_SAVE|CV_CALL, hue_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ghue = {"ghue", "8", CV_SAVE|CV_CALL, hue_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_chue = {"chue", "12", CV_SAVE|CV_CALL, hue_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_bhue = {"bhue", "16", CV_SAVE|CV_CALL, hue_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_mhue = {"mhue", "20", CV_SAVE|CV_CALL, hue_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_rgamma = {"rgamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ygamma = {"ygamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ggamma = {"ggamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_cgamma = {"cgamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_bgamma = {"bgamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_mgamma = {"mgamma", "0", CV_SAVE|CV_CALL, gamma_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_rsaturation = {"rsaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_ysaturation = {"ysaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_gsaturation = {"gsaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_csaturation = {"csaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_bsaturation = {"bsaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
consvar_t cv_msaturation = {"msaturation", "10", CV_SAVE|CV_CALL, saturation_cons_t, CV_palette_OnChange, 0, NULL, NULL, 0, 0, NULL};
static CV_PossibleValue_t constextsize_cons_t[] = {
{V_NOSCALEPATCH, "Small"}, {V_SMALLSCALEPATCH, "Medium"}, {V_MEDSCALEPATCH, "Large"}, {0, "Huge"},
@ -83,8 +109,209 @@ static CV_PossibleValue_t CV_MD2[] = {{0, "Off"}, {1, "On"}, {2, "Old"}, {0, NUL
consvar_t cv_grmd2 = {"gr_md2", "Off", CV_SAVE, CV_MD2, NULL, 0, NULL, NULL, 0, 0, NULL};
#endif
const UINT8 gammatable[5][256] =
// local copy of the palette for V_GetColor()
RGBA_t *pLocalPalette = NULL;
RGBA_t *pMasterPalette = NULL;
/*
The following was an extremely helpful resource when developing my Colour Cube LUT.
http://http.developer.nvidia.com/GPUGems2/gpugems2_chapter24.html
Please check it out if you're trying to maintain this.
toast 18/04/17
*/
float Cubepal[2][2][2][3];
// returns whether to apply cube, selectively avoiding expensive operations
static boolean InitCube(void)
{
boolean apply = false;
UINT8 q;
float working[2][2][2][3] = // the initial positions of the corners of the colour cube!
{
{
{
{0.0, 0.0, 0.0}, // black corner
{0.0, 0.0, 1.0} // blue corner
},
{
{0.0, 1.0, 0.0}, // green corner
{0.0, 1.0, 1.0} // cyan corner
}
},
{
{
{1.0, 0.0, 0.0}, // red corner
{1.0, 0.0, 1.0} // magenta corner
},
{
{1.0, 1.0, 0.0}, // yellow corner
{1.0, 1.0, 1.0} // white corner
}
}
};
float desatur[3]; // grey
float globalgammamul, globalgammaoffs;
boolean doinggamma;
#define diffcons(cv) (cv.value != atoi(cv.defaultvalue))
doinggamma = diffcons(cv_globalgamma);
#define gammascale 8
globalgammamul = (cv_globalgamma.value ? ((255 - (gammascale*abs(cv_globalgamma.value)))/255.0) : 1.0);
globalgammaoffs = ((cv_globalgamma.value > 0) ? ((gammascale*cv_globalgamma.value)/255.0) : 0.0);
desatur[0] = desatur[1] = desatur[2] = globalgammaoffs + (0.33*globalgammamul);
if (doinggamma
|| diffcons(cv_rhue)
|| diffcons(cv_yhue)
|| diffcons(cv_ghue)
|| diffcons(cv_chue)
|| diffcons(cv_bhue)
|| diffcons(cv_mhue)
|| diffcons(cv_rgamma)
|| diffcons(cv_ygamma)
|| diffcons(cv_ggamma)
|| diffcons(cv_cgamma)
|| diffcons(cv_bgamma)
|| diffcons(cv_mgamma)) // set the gamma'd/hued positions (saturation is done later)
{
float mod, tempgammamul, tempgammaoffs;
apply = true;
working[0][0][0][0] = working[0][0][0][1] = working[0][0][0][2] = globalgammaoffs;
working[1][1][1][0] = working[1][1][1][1] = working[1][1][1][2] = globalgammaoffs+globalgammamul;
#define dohue(hue, gamma, loc) \
tempgammamul = (gamma ? ((255 - (gammascale*abs(gamma)))/255.0)*globalgammamul : globalgammamul);\
tempgammaoffs = ((gamma > 0) ? ((gammascale*gamma)/255.0) + globalgammaoffs : globalgammaoffs);\
mod = ((hue % huecoloursteps)*(tempgammamul)/huecoloursteps);\
switch (hue/huecoloursteps)\
{\
case 0:\
default:\
loc[0] = tempgammaoffs+tempgammamul;\
loc[1] = tempgammaoffs+mod;\
loc[2] = tempgammaoffs;\
break;\
case 1:\
loc[0] = tempgammaoffs+tempgammamul-mod;\
loc[1] = tempgammaoffs+tempgammamul;\
loc[2] = tempgammaoffs;\
break;\
case 2:\
loc[0] = tempgammaoffs;\
loc[1] = tempgammaoffs+tempgammamul;\
loc[2] = tempgammaoffs+mod;\
break;\
case 3:\
loc[0] = tempgammaoffs;\
loc[1] = tempgammaoffs+tempgammamul-mod;\
loc[2] = tempgammaoffs+tempgammamul;\
break;\
case 4:\
loc[0] = tempgammaoffs+mod;\
loc[1] = tempgammaoffs;\
loc[2] = tempgammaoffs+tempgammamul;\
break;\
case 5:\
loc[0] = tempgammaoffs+tempgammamul;\
loc[1] = tempgammaoffs;\
loc[2] = tempgammaoffs+tempgammamul-mod;\
break;\
}
dohue(cv_rhue.value, cv_rgamma.value, working[1][0][0]);
dohue(cv_yhue.value, cv_ygamma.value, working[1][1][0]);
dohue(cv_ghue.value, cv_ggamma.value, working[0][1][0]);
dohue(cv_chue.value, cv_cgamma.value, working[0][1][1]);
dohue(cv_bhue.value, cv_bgamma.value, working[0][0][1]);
dohue(cv_mhue.value, cv_mgamma.value, working[1][0][1]);
#undef dohue
}
#define dosaturation(a, e) a = ((1 - work)*e + work*a)
#define docvsat(cv_sat, hue, gamma, r, g, b) \
if diffcons(cv_sat)\
{\
float work, mod, tempgammamul, tempgammaoffs;\
apply = true;\
work = (cv_sat.value/10.0);\
mod = ((hue % huecoloursteps)*(1.0)/huecoloursteps);\
if (hue & huecoloursteps)\
mod = 2-mod;\
else\
mod += 1;\
tempgammamul = (gamma ? ((255 - (gammascale*abs(gamma)))/255.0)*globalgammamul : globalgammamul);\
tempgammaoffs = ((gamma > 0) ? ((gammascale*gamma)/255.0) + globalgammaoffs : globalgammaoffs);\
for (q = 0; q < 3; q++)\
dosaturation(working[r][g][b][q], (tempgammaoffs+(desatur[q]*mod*tempgammamul)));\
}
docvsat(cv_rsaturation, cv_rhue.value, cv_rgamma.value, 1, 0, 0);
docvsat(cv_ysaturation, cv_yhue.value, cv_ygamma.value, 1, 1, 0);
docvsat(cv_gsaturation, cv_ghue.value, cv_ggamma.value, 0, 1, 0);
docvsat(cv_csaturation, cv_chue.value, cv_cgamma.value, 0, 1, 1);
docvsat(cv_bsaturation, cv_bhue.value, cv_bgamma.value, 0, 0, 1);
docvsat(cv_msaturation, cv_mhue.value, cv_mgamma.value, 1, 0, 1);
#undef gammascale
if diffcons(cv_globalsaturation)
{
float work = (cv_globalsaturation.value/10.0);
apply = true;
for (q = 0; q < 3; q++)
{
dosaturation(working[1][0][0][q], desatur[q]);
dosaturation(working[0][1][0][q], desatur[q]);
dosaturation(working[0][0][1][q], desatur[q]);
dosaturation(working[1][1][0][q], 2*desatur[q]);
dosaturation(working[0][1][1][q], 2*desatur[q]);
dosaturation(working[1][0][1][q], 2*desatur[q]);
}
}
#undef dosaturation
#undef diffcons
if (!apply)
return false;
#define dowork(i, j, k, l) \
if (working[i][j][k][l] > 1.0)\
working[i][j][k][l] = 1.0;\
else if (working[i][j][k][l] < 0.0)\
working[i][j][k][l] = 0.0;\
Cubepal[i][j][k][l] = working[i][j][k][l]
for (q = 0; q < 3; q++)
{
dowork(0, 0, 0, q);
dowork(1, 0, 0, q);
dowork(0, 1, 0, q);
dowork(1, 1, 0, q);
dowork(0, 0, 1, q);
dowork(1, 0, 1, q);
dowork(0, 1, 1, q);
dowork(1, 1, 1, q);
}
#undef dowork
return true;
}
/*
So it turns out that the way gamma was implemented previously, the default
colour profile of the game was messed up. Since this bad decision has been
around for a long time, and the intent is to keep the base game looking the
same, I'm not gonna be the one to remove this base modification.
toast 20/04/17
*/
const UINT8 correctiontable[256] =
{1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,
17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,
33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,
@ -100,95 +327,67 @@ const UINT8 gammatable[5][256] =
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207,
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223,
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239,
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255},
{2,4,5,7,8,10,11,12,14,15,16,18,19,20,21,23,24,25,26,27,29,30,31,
32,33,34,36,37,38,39,40,41,42,44,45,46,47,48,49,50,51,52,54,55,
56,57,58,59,60,61,62,63,64,65,66,67,69,70,71,72,73,74,75,76,77,
78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,
99,100,101,102,103,104,105,106,107,108,109,110,111,112,113,114,
115,116,117,118,119,120,121,122,123,124,125,126,127,128,129,129,
130,131,132,133,134,135,136,137,138,139,140,141,142,143,144,145,
146,147,148,148,149,150,151,152,153,154,155,156,157,158,159,160,
161,162,163,163,164,165,166,167,168,169,170,171,172,173,174,175,
175,176,177,178,179,180,181,182,183,184,185,186,186,187,188,189,
190,191,192,193,194,195,196,196,197,198,199,200,201,202,203,204,
205,205,206,207,208,209,210,211,212,213,214,214,215,216,217,218,
219,220,221,222,222,223,224,225,226,227,228,229,230,230,231,232,
233,234,235,236,237,237,238,239,240,241,242,243,244,245,245,246,
247,248,249,250,251,252,252,253,254,255},
{4,7,9,11,13,15,17,19,21,22,24,26,27,29,30,32,33,35,36,38,39,40,42,
43,45,46,47,48,50,51,52,54,55,56,57,59,60,61,62,63,65,66,67,68,69,
70,72,73,74,75,76,77,78,79,80,82,83,84,85,86,87,88,89,90,91,92,93,
94,95,96,97,98,100,101,102,103,104,105,106,107,108,109,110,111,112,
113,114,114,115,116,117,118,119,120,121,122,123,124,125,126,127,128,
129,130,131,132,133,133,134,135,136,137,138,139,140,141,142,143,144,
144,145,146,147,148,149,150,151,152,153,153,154,155,156,157,158,159,
160,160,161,162,163,164,165,166,166,167,168,169,170,171,172,172,173,
174,175,176,177,178,178,179,180,181,182,183,183,184,185,186,187,188,
188,189,190,191,192,193,193,194,195,196,197,197,198,199,200,201,201,
202,203,204,205,206,206,207,208,209,210,210,211,212,213,213,214,215,
216,217,217,218,219,220,221,221,222,223,224,224,225,226,227,228,228,
229,230,231,231,232,233,234,235,235,236,237,238,238,239,240,241,241,
242,243,244,244,245,246,247,247,248,249,250,251,251,252,253,254,254,
255},
{8,12,16,19,22,24,27,29,31,34,36,38,40,41,43,45,47,49,50,52,53,55,
57,58,60,61,63,64,65,67,68,70,71,72,74,75,76,77,79,80,81,82,84,85,
86,87,88,90,91,92,93,94,95,96,98,99,100,101,102,103,104,105,106,107,
108,109,110,111,112,113,114,115,116,117,118,119,120,121,122,123,124,
125,126,127,128,129,130,131,132,133,134,135,135,136,137,138,139,140,
141,142,143,143,144,145,146,147,148,149,150,150,151,152,153,154,155,
155,156,157,158,159,160,160,161,162,163,164,165,165,166,167,168,169,
169,170,171,172,173,173,174,175,176,176,177,178,179,180,180,181,182,
183,183,184,185,186,186,187,188,189,189,190,191,192,192,193,194,195,
195,196,197,197,198,199,200,200,201,202,202,203,204,205,205,206,207,
207,208,209,210,210,211,212,212,213,214,214,215,216,216,217,218,219,
219,220,221,221,222,223,223,224,225,225,226,227,227,228,229,229,230,
231,231,232,233,233,234,235,235,236,237,237,238,238,239,240,240,241,
242,242,243,244,244,245,246,246,247,247,248,249,249,250,251,251,252,
253,253,254,254,255},
{16,23,28,32,36,39,42,45,48,50,53,55,57,60,62,64,66,68,69,71,73,75,76,
78,80,81,83,84,86,87,89,90,92,93,94,96,97,98,100,101,102,103,105,106,
107,108,109,110,112,113,114,115,116,117,118,119,120,121,122,123,124,
125,126,128,128,129,130,131,132,133,134,135,136,137,138,139,140,141,
142,143,143,144,145,146,147,148,149,150,150,151,152,153,154,155,155,
156,157,158,159,159,160,161,162,163,163,164,165,166,166,167,168,169,
169,170,171,172,172,173,174,175,175,176,177,177,178,179,180,180,181,
182,182,183,184,184,185,186,187,187,188,189,189,190,191,191,192,193,
193,194,195,195,196,196,197,198,198,199,200,200,201,202,202,203,203,
204,205,205,206,207,207,208,208,209,210,210,211,211,212,213,213,214,
214,215,216,216,217,217,218,219,219,220,220,221,221,222,223,223,224,
224,225,225,226,227,227,228,228,229,229,230,230,231,232,232,233,233,
234,234,235,235,236,236,237,237,238,239,239,240,240,241,241,242,242,
243,243,244,244,245,245,246,246,247,247,248,248,249,249,250,250,251,
251,252,252,253,254,254,255,255}
};
// local copy of the palette for V_GetColor()
RGBA_t *pLocalPalette = NULL;
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255};
// keep a copy of the palette so that we can get the RGB value for a color index at any time.
static void LoadPalette(const char *lumpname)
{
const UINT8 *usegamma = gammatable[cv_usegamma.value];
boolean cube = InitCube();
lumpnum_t lumpnum = W_GetNumForName(lumpname);
size_t i, palsize = W_LumpLength(lumpnum)/3;
UINT8 *pal;
Z_Free(pLocalPalette);
Z_Free(pMasterPalette);
pLocalPalette = Z_Malloc(sizeof (*pLocalPalette)*palsize, PU_STATIC, NULL);
pMasterPalette = Z_Malloc(sizeof (*pMasterPalette)*palsize, PU_STATIC, NULL);
pal = W_CacheLumpNum(lumpnum, PU_CACHE);
for (i = 0; i < palsize; i++)
{
pLocalPalette[i].s.red = usegamma[*pal++];
pLocalPalette[i].s.green = usegamma[*pal++];
pLocalPalette[i].s.blue = usegamma[*pal++];
pLocalPalette[i].s.alpha = 0xFF;
pMasterPalette[i].s.red = pLocalPalette[i].s.red = correctiontable[*pal++];
pMasterPalette[i].s.green = pLocalPalette[i].s.green = correctiontable[*pal++];
pMasterPalette[i].s.blue = pLocalPalette[i].s.blue = correctiontable[*pal++];
pMasterPalette[i].s.alpha = pLocalPalette[i].s.alpha = 0xFF;
// lerp of colour cubing!
if (cube)
{
float working[4][3];
float linear;
UINT8 q;
linear = (pLocalPalette[i].s.red/255.0);
#define dolerp(e1, e2) ((1 - linear)*e1 + linear*e2)
for (q = 0; q < 3; q++)
{
working[0][q] = dolerp(Cubepal[0][0][0][q], Cubepal[1][0][0][q]);
working[1][q] = dolerp(Cubepal[0][1][0][q], Cubepal[1][1][0][q]);
working[2][q] = dolerp(Cubepal[0][0][1][q], Cubepal[1][0][1][q]);
working[3][q] = dolerp(Cubepal[0][1][1][q], Cubepal[1][1][1][q]);
}
linear = (pLocalPalette[i].s.green/255.0);
for (q = 0; q < 3; q++)
{
working[0][q] = dolerp(working[0][q], working[1][q]);
working[1][q] = dolerp(working[2][q], working[3][q]);
}
linear = (pLocalPalette[i].s.blue/255.0);
for (q = 0; q < 3; q++)
{
working[0][q] = 255*dolerp(working[0][q], working[1][q]);
if (working[0][q] > 255.0)
working[0][q] = 255.0;
else if (working[0][q] < 0.0)
working[0][q] = 0.0;
}
#undef dolerp
pLocalPalette[i].s.red = (UINT8)(working[0][0]);
pLocalPalette[i].s.green = (UINT8)(working[0][1]);
pLocalPalette[i].s.blue = (UINT8)(working[0][2]);
}
}
}
@ -250,7 +449,7 @@ void V_SetPaletteLump(const char *pal)
I_SetPalette(pLocalPalette);
}
static void CV_usegamma_OnChange(void)
static void CV_palette_OnChange(void)
{
// reload palette
LoadMapPalette();
@ -649,7 +848,7 @@ void V_DrawCroppedPatch(fixed_t x, fixed_t y, fixed_t pscale, INT32 scrn, patch_
dest = desttop;
dest += FixedInt(FixedMul(topdelta<<FRACBITS,fdup))*vid.width;
for (ofs = sy<<FRACBITS; dest < deststop && (ofs>>FRACBITS) < column->length && (ofs>>FRACBITS) < h; ofs += rowfrac)
for (ofs = sy<<FRACBITS; dest < deststop && (ofs>>FRACBITS) < column->length && ((ofs>>FRACBITS) + topdelta) < h; ofs += rowfrac)
{
if (dest >= screens[scrn&V_PARAMMASK]) // don't draw off the top of the screen (CRASH PREVENTION)
*dest = source[ofs>>FRACBITS];
@ -773,79 +972,80 @@ void V_DrawFill(INT32 x, INT32 y, INT32 w, INT32 h, INT32 c)
{
UINT8 *dest;
const UINT8 *deststop;
INT32 u, v, dupx, dupy;
if (rendermode == render_none)
return;
#ifdef HWRENDER
if (rendermode != render_soft && rendermode != render_none)
if (rendermode != render_soft && !con_startup)
{
HWR_DrawFill(x, y, w, h, c);
return;
}
#endif
dupx = vid.dupx;
dupy = vid.dupy;
if (!screens[0])
return;
if (c & V_NOSCALESTART)
{
dest = screens[0] + y*vid.width + x;
deststop = screens[0] + vid.rowbytes * vid.height;
}
else
if (!(c & V_NOSCALESTART))
{
INT32 dupx = vid.dupx, dupy = vid.dupy;
if (x == 0 && y == 0 && w == BASEVIDWIDTH && h == BASEVIDHEIGHT)
{ // Clear the entire screen, from dest to deststop. Yes, this really works.
memset(screens[0], (UINT8)(c&255), vid.width * vid.height * vid.bpp);
return;
}
dest = screens[0] + y*dupy*vid.width + x*dupx;
deststop = screens[0] + vid.rowbytes * vid.height;
x *= dupx;
y *= dupy;
w *= dupx;
h *= dupy;
if (w == BASEVIDWIDTH)
w = vid.width;
else
w *= dupx;
if (h == BASEVIDHEIGHT)
h = vid.height;
else
h *= dupy;
if (x && y && x + w < vid.width && y + h < vid.height)
// Center it if necessary
if (vid.width != BASEVIDWIDTH * dupx)
{
// Center it if necessary
if (vid.width != BASEVIDWIDTH * dupx)
{
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
// so center this imaginary screen
if (c & V_SNAPTORIGHT)
dest += (vid.width - (BASEVIDWIDTH * dupx));
else if (!(c & V_SNAPTOLEFT))
dest += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
}
if (vid.height != BASEVIDHEIGHT * dupy)
{
// same thing here
if (c & V_SNAPTOBOTTOM)
dest += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width;
else if (!(c & V_SNAPTOTOP))
dest += (vid.height - (BASEVIDHEIGHT * dupy)) * vid.width / 2;
}
// dupx adjustments pretend that screen width is BASEVIDWIDTH * dupx,
// so center this imaginary screen
if (c & V_SNAPTORIGHT)
x += (vid.width - (BASEVIDWIDTH * dupx));
else if (!(c & V_SNAPTOLEFT))
x += (vid.width - (BASEVIDWIDTH * dupx)) / 2;
}
if (vid.height != BASEVIDHEIGHT * dupy)
{
// same thing here
if (c & V_SNAPTOBOTTOM)
y += (vid.height - (BASEVIDHEIGHT * dupy));
else if (!(c & V_SNAPTOTOP))
y += (vid.height - (BASEVIDHEIGHT * dupy)) / 2;
}
}
if (x >= vid.width || y >= vid.height)
return; // off the screen
if (x < 0)
{
w += x;
x = 0;
}
if (y < 0)
{
h += y;
y = 0;
}
if (w <= 0 || h <= 0)
return; // zero width/height wouldn't draw anything
if (x + w > vid.width)
w = vid.width - x;
if (y + h > vid.height)
h = vid.height - y;
dest = screens[0] + y*vid.width + x;
deststop = screens[0] + vid.rowbytes * vid.height;
c &= 255;
for (v = 0; v < h; v++, dest += vid.width)
for (u = 0; u < w; u++)
{
if (dest > deststop)
return;
dest[u] = (UINT8)c;
}
for (;(--h >= 0) && dest < deststop; dest += vid.width)
memset(dest, (UINT8)(c&255), w * vid.bpp);
}
//
@ -1783,6 +1983,9 @@ INT32 V_StringWidth(const char *string, INT32 option)
w += (charwidth ? charwidth : SHORT(hu_font[c]->width));
}
if (option & V_NOSCALESTART)
w *= vid.dupx;
return w;
}

View File

@ -27,8 +27,11 @@
extern UINT8 *screens[5];
extern const UINT8 gammatable[5][256];
extern consvar_t cv_ticrate, cv_usegamma, cv_allcaps, cv_constextsize;
extern consvar_t cv_ticrate, cv_constextsize,\
cv_globalgamma, cv_globalsaturation, \
cv_rhue, cv_yhue, cv_ghue, cv_chue, cv_bhue, cv_mhue,\
cv_rgamma, cv_ygamma, cv_ggamma, cv_cgamma, cv_bgamma, cv_mgamma, \
cv_rsaturation, cv_ysaturation, cv_gsaturation, cv_csaturation, cv_bsaturation, cv_msaturation;
// Allocates buffer screens, call before R_Init.
void V_Init(void);
@ -42,6 +45,7 @@ const char *R_GetPalname(UINT16 num);
const char *GetPalette(void);
extern RGBA_t *pLocalPalette;
extern RGBA_t *pMasterPalette;
// Retrieve the ARGB value from a palette color index
#define V_GetColor(color) (pLocalPalette[color&0xFF])

View File

@ -133,6 +133,47 @@ void W_Shutdown(void)
static char filenamebuf[MAX_WADPATH];
// W_OpenWadFile
// Helper function for opening the WAD file.
// Returns the FILE * handle for the file, or NULL if not found or could not be opened
// If "useerrors" is true then print errors in the console, else just don't bother
// "filename" may be modified to have the correct path the actual file is located in, if necessary
FILE *W_OpenWadFile(const char **filename, boolean useerrors)
{
FILE *handle;
strncpy(filenamebuf, *filename, MAX_WADPATH);
filenamebuf[MAX_WADPATH - 1] = '\0';
*filename = filenamebuf;
// open wad file
if ((handle = fopen(*filename, "rb")) == NULL)
{
// If we failed to load the file with the path as specified by
// the user, strip the directories and search for the file.
nameonly(filenamebuf);
// If findfile finds the file, the full path will be returned
// in filenamebuf == *filename.
if (findfile(filenamebuf, NULL, true))
{
if ((handle = fopen(*filename, "rb")) == NULL)
{
if (useerrors)
CONS_Alert(CONS_ERROR, M_GetText("Can't open %s\n"), *filename);
return NULL;
}
}
else
{
if (useerrors)
CONS_Alert(CONS_ERROR, M_GetText("File %s not found.\n"), *filename);
return NULL;
}
}
return handle;
}
// search for all DEHACKED lump in all wads and load it
static inline void W_LoadDehackedLumps(UINT16 wadnum)
{
@ -234,7 +275,6 @@ static void W_InvalidateLumpnumCache(void)
memset(lumpnumcache, 0, sizeof (lumpnumcache));
}
// Allocate a wadfile, setup the lumpinfo (directory) and
// lumpcache, add the wadfile to the current active wadfiles
//
@ -271,33 +311,9 @@ UINT16 W_LoadWadFile(const char *filename)
return INT16_MAX;
}
strncpy(filenamebuf, filename, MAX_WADPATH);
filenamebuf[MAX_WADPATH - 1] = '\0';
filename = filenamebuf;
// open wad file
if ((handle = fopen(filename, "rb")) == NULL)
{
// If we failed to load the file with the path as specified by
// the user, strip the directories and search for the file.
nameonly(filenamebuf);
// If findfile finds the file, the full path will be returned
// in filenamebuf == filename.
if (findfile(filenamebuf, NULL, true))
{
if ((handle = fopen(filename, "rb")) == NULL)
{
CONS_Alert(CONS_ERROR, M_GetText("Can't open %s\n"), filename);
return INT16_MAX;
}
}
else
{
CONS_Alert(CONS_ERROR, M_GetText("File %s not found.\n"), filename);
return INT16_MAX;
}
}
if ((handle = W_OpenWadFile(&filename, true)) == NULL)
return INT16_MAX;
// Check if wad files will overflow fileneededbuffer. Only the filename part
// is send in the packet; cf.
@ -1083,21 +1099,11 @@ static int W_VerifyFile(const char *filename, lumpchecklist_t *checklist,
size_t i, j;
int goodfile = false;
if (!checklist) I_Error("No checklist for %s\n", filename);
strlcpy(filenamebuf, filename, MAX_WADPATH);
filename = filenamebuf;
if (!checklist)
I_Error("No checklist for %s\n", filename);
// open wad file
if ((handle = fopen(filename, "rb")) == NULL)
{
nameonly(filenamebuf); // leave full path here
if (findfile(filenamebuf, NULL, true))
{
if ((handle = fopen(filename, "rb")) == NULL)
return -1;
}
else
return -1;
}
if ((handle = W_OpenWadFile(&filename, false)) == NULL)
return -1;
// detect dehacked file with the "soc" extension
if (stricmp(&filename[strlen(filename) - 4], ".soc") != 0

View File

@ -82,6 +82,8 @@ extern wadfile_t *wadfiles[MAX_WADFILES];
void W_Shutdown(void);
// Opens a WAD file. Returns the FILE * handle for the file, or NULL if not found or could not be opened
FILE *W_OpenWadFile(const char **filename, boolean useerrors);
// Load and add a wadfile to the active wad files, returns numbers of lumps, INT16_MAX on error
UINT16 W_LoadWadFile(const char *filename);

View File

@ -362,6 +362,10 @@ void I_FinishUpdate(void)
if (I_SkipFrame())
return;
// draw captions if enabled
if (cv_closedcaptioning.value)
SCR_ClosedCaptions();
// display a graph of ticrate
if (cv_ticrate.value)
SCR_DisplayTicRate();

View File

@ -194,6 +194,10 @@ void I_FinishUpdate(void)
if (rendermode == render_none)
return;
// draw captions if enabled
if (cv_closedcaptioning.value)
SCR_ClosedCaptions();
// display a graph of ticrate
if (cv_ticrate.value)
SCR_DisplayTicRate();

View File

@ -147,6 +147,7 @@ static boolean useinterpic;
static INT32 timer;
static INT32 intertic;
static INT32 tallydonetic = -1;
static INT32 endtic = -1;
intertype_t intertype = int_none;
@ -159,6 +160,40 @@ static void Y_CalculateMatchWinners(void);
static void Y_FollowIntermission(void);
static void Y_UnloadData(void);
static void Y_IntermissionTokenDrawer(void)
{
INT32 y;
INT32 offs = 0;
UINT32 tokencount;
INT32 lowy = BASEVIDHEIGHT - 32;
INT16 temp = SHORT(tokenicon->height)/2;
INT32 calc;
if (tallydonetic != -1)
{
offs = (intertic - tallydonetic)*2;
if (offs > 10)
offs = 8;
}
V_DrawFill(32, lowy-1, 16, 1, 31); // slot
y = (lowy + offs + 1) - (temp + (token + 1)*8);
for (tokencount = token; tokencount; tokencount--)
{
if (y >= -temp)
V_DrawSmallScaledPatch(32, y, 0, tokenicon);
y += 8;
}
y += (offs*(temp - 1)/8);
calc = (lowy - y)*2;
if (calc > 0)
V_DrawCroppedPatch(32<<FRACBITS, y<<FRACBITS, FRACUNIT/2, 0, tokenicon, 32*FRACUNIT, y<<FRACBITS, SHORT(tokenicon->width), calc);
}
//
// Y_IntermissionDrawer
//
@ -203,6 +238,9 @@ void Y_IntermissionDrawer(void)
{
INT32 bonusy;
if (gottoken) // first to be behind everything else
Y_IntermissionTokenDrawer();
// draw score
V_DrawScaledPatch(hudinfo[HUD_SCORE].x, hudinfo[HUD_SCORE].y, V_SNAPTOLEFT, sboscore);
V_DrawTallNum(hudinfo[HUD_SCORENUM].x, hudinfo[HUD_SCORENUM].y, V_SNAPTOLEFT, data.coop.score);
@ -261,6 +299,9 @@ void Y_IntermissionDrawer(void)
INT32 xoffset3 = 0; // Line 3 x offset
UINT8 drawsection = 0;
if (gottoken) // first to be behind everything else
Y_IntermissionTokenDrawer();
// draw the header
if (intertic <= TICRATE)
animatetic = 0;
@ -679,7 +720,10 @@ void Y_Ticker(void)
boolean anybonuses = false;
if (!intertic) // first time only
{
S_ChangeMusicInternal("_clear", false); // don't loop it
tallydonetic = -1;
}
if (intertic < TICRATE) // one second pause before tally begins
return;
@ -709,6 +753,7 @@ void Y_Ticker(void)
if (!anybonuses)
{
tallydonetic = intertic;
endtic = intertic + 3*TICRATE; // 3 second pause after end of tally
S_StartSound(NULL, sfx_chchng); // cha-ching!
@ -736,12 +781,11 @@ void Y_Ticker(void)
INT32 i;
UINT32 oldscore = data.spec.score;
boolean skip = false;
static INT32 tallydonetic = 0;
if (!intertic) // first time only
{
S_ChangeMusicInternal("_clear", false); // don't loop it
tallydonetic = 0;
tallydonetic = -1;
}
if (intertic < TICRATE) // one second pause before tally begins
@ -751,12 +795,12 @@ void Y_Ticker(void)
if (playeringame[i] && (players[i].cmd.buttons & BT_USE))
skip = true;
if (tallydonetic != 0)
if ((data.spec.continues & 0x80) && tallydonetic != -1)
{
if (intertic > tallydonetic)
if ((intertic - tallydonetic) > (3*TICRATE)/2)
{
endtic = intertic + 4*TICRATE; // 4 second pause after end of tally
S_StartSound(NULL, sfx_flgcap); // cha-ching!
S_StartSound(NULL, sfx_s3kac); // cha-ching!
}
return;
}
@ -772,9 +816,8 @@ void Y_Ticker(void)
if (!data.spec.bonus.points)
{
if (data.spec.continues & 0x80) // don't set endtic yet!
tallydonetic = intertic + (3*TICRATE)/2;
else // okay we're good.
tallydonetic = intertic;
if (!(data.spec.continues & 0x80)) // don't set endtic yet!
endtic = intertic + 4*TICRATE; // 4 second pause after end of tally
S_StartSound(NULL, sfx_chchng); // cha-ching!
@ -1556,8 +1599,7 @@ static void Y_SetTimeBonus(player_t *player, y_bonus_t *bstruct)
// calculate time bonus
secs = player->realtime / TICRATE;
if (secs < 30) /* :30 */ bonus = 100000;
else if (secs < 45) /* :45 */ bonus = 50000;
if (secs < 30) /* :30 */ bonus = 50000;
else if (secs < 60) /* 1:00 */ bonus = 10000;
else if (secs < 90) /* 1:30 */ bonus = 5000;
else if (secs < 120) /* 2:00 */ bonus = 4000;