diff --git a/extras/conf/SRB2-22.cfg b/extras/conf/SRB2-22.cfg index 969f645f3..a2f56880b 100644 --- a/extras/conf/SRB2-22.cfg +++ b/extras/conf/SRB2-22.cfg @@ -2481,6 +2481,7 @@ linedeftypes prefix = "(439)"; flags8text = "[3] Set delay by backside sector"; flags64text = "[6] Only existing"; + flags8192text = "[13] Use backside textures"; } 440 @@ -6949,7 +6950,7 @@ thingtypes { color = 10; // Green title = "Tutorial"; - + 799 { title = "Tutorial Plant"; diff --git a/extras/conf/udb/Includes/SRB222_linedefs.cfg b/extras/conf/udb/Includes/SRB222_linedefs.cfg index fff9edf10..1dec9ab88 100644 --- a/extras/conf/udb/Includes/SRB222_linedefs.cfg +++ b/extras/conf/udb/Includes/SRB222_linedefs.cfg @@ -2593,7 +2593,7 @@ udmf } } } - + 190 { title = "Rising"; @@ -4588,6 +4588,12 @@ udmf type = 11; enum = "yesno"; } + arg3 + { + title = "Use backside textures?"; + type = 11; + enum = "noyes"; + } } 440 diff --git a/src/Makefile b/src/Makefile index c1aa35742..9cab3e487 100644 --- a/src/Makefile +++ b/src/Makefile @@ -31,8 +31,8 @@ # MINGW=1, MINGW64=1 - Windows (MinGW toolchain) # UNIX=1 - Generic Unix like system # FREEBSD=1 -# SDL=1 - Use SDL backend. SDL is the only backend though -# and thus, always enabled. +# SDL=1 - Use SDL backend. SDL is the only implemented backend though. +# If disabled, a dummy backend will be used. # # A list of supported GCC versions can be found in # Makefile.d/detect.mk -- search 'gcc_versions'. diff --git a/src/Makefile.d/detect.mk b/src/Makefile.d/detect.mk index f458b044c..aca498721 100644 --- a/src/Makefile.d/detect.mk +++ b/src/Makefile.d/detect.mk @@ -17,7 +17,6 @@ all_systems:=\ UNIX\ LINUX\ FREEBSD\ - SDL\ # check for user specified system ifeq (,$(filter $(all_systems),$(.VARIABLES))) diff --git a/src/Makefile.d/dummy.mk b/src/Makefile.d/dummy.mk new file mode 100644 index 000000000..6908de84a --- /dev/null +++ b/src/Makefile.d/dummy.mk @@ -0,0 +1,5 @@ +makedir:=$(makedir)/Dummy + +sources+=$(call List,dummy/Sourcefile) + +NOHW=1 diff --git a/src/Makefile.d/nix.mk b/src/Makefile.d/nix.mk index 6642a6bcc..767b64c12 100644 --- a/src/Makefile.d/nix.mk +++ b/src/Makefile.d/nix.mk @@ -18,7 +18,7 @@ opts+=-I/usr/X11R6/include libs+=-L/usr/X11R6/lib endif -SDL=1 +SDL?=1 # In common usage. ifdef LINUX diff --git a/src/Makefile.d/platform.mk b/src/Makefile.d/platform.mk index fad4be191..c5ac71a20 100644 --- a/src/Makefile.d/platform.mk +++ b/src/Makefile.d/platform.mk @@ -64,6 +64,8 @@ ifdef UNIX include Makefile.d/nix.mk endif -ifdef SDL +ifeq ($(SDL), 1) include Makefile.d/sdl.mk +else +include Makefile.d/dummy.mk endif diff --git a/src/Makefile.d/win32.mk b/src/Makefile.d/win32.mk index 768133c15..0e48ed683 100644 --- a/src/Makefile.d/win32.mk +++ b/src/Makefile.d/win32.mk @@ -19,7 +19,7 @@ libs+=-ladvapi32 -lkernel32 -lmsvcrt -luser32 nasm_format:=win32 -SDL=1 +SDL?=1 ifndef NOHW opts+=-DUSE_WGL_SWAP @@ -76,6 +76,7 @@ else lib:=../libs/SDL2_mixer/$(mingw) endif +ifdef SDL mixer_opts:=-I$(lib)/include/SDL2 mixer_libs:=-L$(lib)/lib @@ -85,6 +86,7 @@ SDL_opts:=-I$(lib)/include/SDL2\ SDL_libs:=-L$(lib)/lib $(mixer_libs)\ -lmingw32 -lSDL2main -lSDL2 -mwindows $(eval $(call _set,SDL)) +endif lib:=../libs/zlib ZLIB_opts:=-I$(lib) diff --git a/src/blua/ldump.c b/src/blua/ldump.c index c9d3d4870..b69a12729 100644 --- a/src/blua/ldump.c +++ b/src/blua/ldump.c @@ -60,7 +60,7 @@ static void DumpVector(const void* b, int n, size_t size, DumpState* D) static void DumpString(const TString* s, DumpState* D) { - if (s==NULL || getstr(s)==NULL) + if (s==NULL) { size_t size=0; DumpVar(size,D); diff --git a/src/blua/ltm.c b/src/blua/ltm.c index 031a2811e..570bded69 100644 --- a/src/blua/ltm.c +++ b/src/blua/ltm.c @@ -31,9 +31,9 @@ void luaT_init (lua_State *L) { static const char *const luaT_eventname[] = { /* ORDER TM */ "__index", "__newindex", "__usedindex", - "__gc", "__mode", "__eq", + "__gc", "__mode", "__len", "__eq", "__add", "__sub", "__mul", "__div", "__mod", - "__pow", "__unm", "__len", "__lt", "__le", + "__pow", "__unm", "__lt", "__le", "__concat", "__call" ,"__strhook" ,"__and", "__or", "__xor", "__shl", "__shr", "__not" diff --git a/src/blua/ltm.h b/src/blua/ltm.h index 3d4ac8c0e..3f2aa4a45 100644 --- a/src/blua/ltm.h +++ b/src/blua/ltm.h @@ -21,6 +21,7 @@ typedef enum { TM_USEDINDEX, TM_GC, TM_MODE, + TM_LEN, TM_EQ, /* last tag method with `fast' access */ TM_ADD, TM_SUB, @@ -29,7 +30,6 @@ typedef enum { TM_MOD, TM_POW, TM_UNM, - TM_LEN, TM_LT, TM_LE, TM_CONCAT, diff --git a/src/blua/lvm.c b/src/blua/lvm.c index 46a015c1e..b74fef4ee 100644 --- a/src/blua/lvm.c +++ b/src/blua/lvm.c @@ -311,6 +311,33 @@ void luaV_concat (lua_State *L, int total, int last) { } +static void objlen (lua_State *L, StkId ra, TValue *rb) { + const TValue *tm; + switch (ttype(rb)) { + case LUA_TTABLE: { + Table *h = hvalue(rb); + tm = fasttm(L, h->metatable, TM_LEN); + if (tm) break; /* metamethod? break switch to call it */ + setnvalue(ra, cast_num(luaH_getn(h))); /* else primitive len */ + return; + } + case LUA_TSTRING: { + tm = fasttm(L, G(L)->mt[LUA_TSTRING], TM_LEN); + if (tm) break; /* metamethod? break switch to call it */ + setnvalue(ra, cast_num(tsvalue(rb)->len)); + return; + } + default: { /* try metamethod */ + tm = luaT_gettmbyobj(L, rb, TM_LEN); + if (ttisnil(tm)) /* no metamethod? */ + luaG_typeerror(L, rb, "get length of"); + break; + } + } + callTMres(L, ra, tm, rb, luaO_nilobject); +} + + static void Arith (lua_State *L, StkId ra, TValue *rb, TValue *rc, TMS op) { TValue tempb, tempc; @@ -568,23 +595,7 @@ void luaV_execute (lua_State *L, int nexeccalls) { continue; } case OP_LEN: { - TValue *rb = RB(i); - switch (ttype(rb)) { - case LUA_TTABLE: { - setnvalue(ra, cast_num(luaH_getn(hvalue(rb)))); - break; - } - case LUA_TSTRING: { - setnvalue(ra, cast_num(tsvalue(rb)->len)); - break; - } - default: { /* try metamethod */ - Protect( - if (!call_binTM(L, rb, luaO_nilobject, ra, TM_LEN)) - luaG_typeerror(L, rb, "get length of"); - ) - } - } + Protect(objlen(L, ra, RB(i))); continue; } case OP_CONCAT: { diff --git a/src/command.c b/src/command.c index 50310f112..dae4dc7b1 100644 --- a/src/command.c +++ b/src/command.c @@ -660,7 +660,7 @@ static void COM_ExecuteString(char *ptext) // check cvars // Hurdler: added at Ebola's request ;) // (don't flood the console in software mode with bad gl_xxx command) - if (!CV_Command() && con_destlines) + if (!CV_Command() && (con_destlines || dedicated)) CONS_Printf(M_GetText("Unknown command '%s'\n"), COM_Argv(0)); } diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 679e102e2..1733d3324 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -4575,7 +4575,7 @@ void Command_Retry_f(void) CONS_Printf(M_GetText("You must be in a level to use this.\n")); else if (netgame || multiplayer) CONS_Printf(M_GetText("This only works in single player.\n")); - else if (!&players[consoleplayer] || players[consoleplayer].lives <= 1) + else if (players[consoleplayer].lives <= 1) CONS_Printf(M_GetText("You can't retry without any lives remaining!\n")); else if (G_IsSpecialStage(gamemap)) CONS_Printf(M_GetText("You can't retry special stages!\n")); diff --git a/src/d_player.h b/src/d_player.h index 755926480..6df6689c5 100644 --- a/src/d_player.h +++ b/src/d_player.h @@ -245,7 +245,8 @@ typedef enum CR_MINECART, CR_ROLLOUT, CR_PTERABYTE, - CR_DUSTDEVIL + CR_DUSTDEVIL, + CR_FAN } carrytype_t; // pw_carry // Player powers. (don't edit this comment) diff --git a/src/deh_soc.c b/src/deh_soc.c index 9e3c2f242..583776ee7 100644 --- a/src/deh_soc.c +++ b/src/deh_soc.c @@ -2687,10 +2687,10 @@ void readhuditem(MYFILE *f, INT32 num) } else if (fastcmp(word, "F")) { - hudinfo[num].f = i; + hudinfo[num].f = get_number(word2); } else - deh_warning("Level header %d: unknown word '%s'", num, word); + deh_warning("HUD item %d: unknown word '%s'", num, word); } } while (!myfeof(f)); // finish when the line is empty @@ -3307,7 +3307,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2) else re = atoi(params[1]); - if (re < 0 || re >= NUMMAPS) + if (re <= 0 || re > NUMMAPS) { deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS); return; @@ -3327,7 +3327,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2) else x1 = (INT16)atoi(params[1]); - if (x1 < 0 || x1 >= NUMMAPS) + if (x1 <= 0 || x1 > NUMMAPS) { deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS); return; @@ -3362,7 +3362,7 @@ static void readcondition(UINT8 set, UINT32 id, char *word2) else x1 = (INT16)atoi(params[1]); - if (x1 < 0 || x1 >= NUMMAPS) + if (x1 <= 0 || x1 > NUMMAPS) { deh_warning("Level number %d out of range (1 - %d)", re, NUMMAPS); return; diff --git a/src/deh_tables.c b/src/deh_tables.c index 106e51785..11d8b1a01 100644 --- a/src/deh_tables.c +++ b/src/deh_tables.c @@ -5119,6 +5119,7 @@ struct int_const_s const INT_CONST[] = { {"CR_ROLLOUT",CR_ROLLOUT}, {"CR_PTERABYTE",CR_PTERABYTE}, {"CR_DUSTDEVIL",CR_DUSTDEVIL}, + {"CR_FAN",CR_FAN}, // Ring weapons (ringweapons_t) // Useful for A_GiveWeapon @@ -5326,42 +5327,81 @@ struct int_const_s const INT_CONST[] = { {"SKSJUMP",SKSJUMP}, // 3D Floor/Fake Floor/FOF/whatever flags - {"FF_EXISTS",FF_EXISTS}, ///< Always set, to check for validity. - {"FF_BLOCKPLAYER",FF_BLOCKPLAYER}, ///< Solid to player, but nothing else - {"FF_BLOCKOTHERS",FF_BLOCKOTHERS}, ///< Solid to everything but player - {"FF_SOLID",FF_SOLID}, ///< Clips things. - {"FF_RENDERSIDES",FF_RENDERSIDES}, ///< Renders the sides. - {"FF_RENDERPLANES",FF_RENDERPLANES}, ///< Renders the floor/ceiling. - {"FF_RENDERALL",FF_RENDERALL}, ///< Renders everything. - {"FF_SWIMMABLE",FF_SWIMMABLE}, ///< Is a water block. - {"FF_NOSHADE",FF_NOSHADE}, ///< Messes with the lighting? - {"FF_CUTSOLIDS",FF_CUTSOLIDS}, ///< Cuts out hidden solid pixels. - {"FF_CUTEXTRA",FF_CUTEXTRA}, ///< Cuts out hidden translucent pixels. - {"FF_CUTLEVEL",FF_CUTLEVEL}, ///< Cuts out all hidden pixels. - {"FF_CUTSPRITES",FF_CUTSPRITES}, ///< Final step in making 3D water. - {"FF_BOTHPLANES",FF_BOTHPLANES}, ///< Render inside and outside planes. - {"FF_EXTRA",FF_EXTRA}, ///< Gets cut by ::FF_CUTEXTRA. - {"FF_TRANSLUCENT",FF_TRANSLUCENT}, ///< See through! - {"FF_FOG",FF_FOG}, ///< Fog "brush." - {"FF_INVERTPLANES",FF_INVERTPLANES}, ///< Only render inside planes. - {"FF_ALLSIDES",FF_ALLSIDES}, ///< Render inside and outside sides. - {"FF_INVERTSIDES",FF_INVERTSIDES}, ///< Only render inside sides. - {"FF_DOUBLESHADOW",FF_DOUBLESHADOW}, ///< Make two lightlist entries to reset light? - {"FF_FLOATBOB",FF_FLOATBOB}, ///< Floats on water and bobs if you step on it. - {"FF_NORETURN",FF_NORETURN}, ///< Used with ::FF_CRUMBLE. Will not return to its original position after falling. - {"FF_CRUMBLE",FF_CRUMBLE}, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist). - {"FF_GOOWATER",FF_GOOWATER}, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop. - {"FF_MARIO",FF_MARIO}, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector. - {"FF_BUSTUP",FF_BUSTUP}, ///< You can spin through/punch this block and it will crumble! - {"FF_QUICKSAND",FF_QUICKSAND}, ///< Quicksand! - {"FF_PLATFORM",FF_PLATFORM}, ///< You can jump up through this to the top. - {"FF_REVERSEPLATFORM",FF_REVERSEPLATFORM}, ///< A fall-through floor in normal gravity, a platform in reverse gravity. - {"FF_INTANGIBLEFLATS",FF_INTANGIBLEFLATS}, ///< Both flats are intangible, but the sides are still solid. - {"FF_INTANGABLEFLATS",FF_INTANGIBLEFLATS}, ///< Both flats are intangable, but the sides are still solid. - {"FF_RIPPLE",FF_RIPPLE}, ///< Ripple the flats - {"FF_COLORMAPONLY",FF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel - {"FF_BOUNCY",FF_BOUNCY}, ///< Bounces players - {"FF_SPLAT",FF_SPLAT}, ///< Use splat flat renderer (treat cyan pixels as invisible) + {"FOF_EXISTS",FOF_EXISTS}, ///< Always set, to check for validity. + {"FOF_BLOCKPLAYER",FOF_BLOCKPLAYER}, ///< Solid to player, but nothing else + {"FOF_BLOCKOTHERS",FOF_BLOCKOTHERS}, ///< Solid to everything but player + {"FOF_SOLID",FOF_SOLID}, ///< Clips things. + {"FOF_RENDERSIDES",FOF_RENDERSIDES}, ///< Renders the sides. + {"FOF_RENDERPLANES",FOF_RENDERPLANES}, ///< Renders the floor/ceiling. + {"FOF_RENDERALL",FOF_RENDERALL}, ///< Renders everything. + {"FOF_SWIMMABLE",FOF_SWIMMABLE}, ///< Is a water block. + {"FOF_NOSHADE",FOF_NOSHADE}, ///< Messes with the lighting? + {"FOF_CUTSOLIDS",FOF_CUTSOLIDS}, ///< Cuts out hidden solid pixels. + {"FOF_CUTEXTRA",FOF_CUTEXTRA}, ///< Cuts out hidden translucent pixels. + {"FOF_CUTLEVEL",FOF_CUTLEVEL}, ///< Cuts out all hidden pixels. + {"FOF_CUTSPRITES",FOF_CUTSPRITES}, ///< Final step in making 3D water. + {"FOF_BOTHPLANES",FOF_BOTHPLANES}, ///< Render inside and outside planes. + {"FOF_EXTRA",FOF_EXTRA}, ///< Gets cut by ::FOF_CUTEXTRA. + {"FOF_TRANSLUCENT",FOF_TRANSLUCENT}, ///< See through! + {"FOF_FOG",FOF_FOG}, ///< Fog "brush." + {"FOF_INVERTPLANES",FOF_INVERTPLANES}, ///< Only render inside planes. + {"FOF_ALLSIDES",FOF_ALLSIDES}, ///< Render inside and outside sides. + {"FOF_INVERTSIDES",FOF_INVERTSIDES}, ///< Only render inside sides. + {"FOF_DOUBLESHADOW",FOF_DOUBLESHADOW}, ///< Make two lightlist entries to reset light? + {"FOF_FLOATBOB",FOF_FLOATBOB}, ///< Floats on water and bobs if you step on it. + {"FOF_NORETURN",FOF_NORETURN}, ///< Used with ::FOF_CRUMBLE. Will not return to its original position after falling. + {"FOF_CRUMBLE",FOF_CRUMBLE}, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist). + {"FOF_GOOWATER",FOF_GOOWATER}, ///< Used with ::FOF_SWIMMABLE. Makes thick bouncey goop. + {"FOF_MARIO",FOF_MARIO}, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector. + {"FOF_BUSTUP",FOF_BUSTUP}, ///< You can spin through/punch this block and it will crumble! + {"FOF_QUICKSAND",FOF_QUICKSAND}, ///< Quicksand! + {"FOF_PLATFORM",FOF_PLATFORM}, ///< You can jump up through this to the top. + {"FOF_REVERSEPLATFORM",FOF_REVERSEPLATFORM}, ///< A fall-through floor in normal gravity, a platform in reverse gravity. + {"FOF_INTANGIBLEFLATS",FOF_INTANGIBLEFLATS}, ///< Both flats are intangible, but the sides are still solid. + {"FOF_RIPPLE",FOF_RIPPLE}, ///< Ripple the flats + {"FOF_COLORMAPONLY",FOF_COLORMAPONLY}, ///< Only copy the colormap, not the lightlevel + {"FOF_BOUNCY",FOF_BOUNCY}, ///< Bounces players + {"FOF_SPLAT",FOF_SPLAT}, ///< Use splat flat renderer (treat cyan pixels as invisible) + + // Old FOF flags for backwards compatibility + {"FF_EXISTS",FF_OLD_EXISTS}, + {"FF_BLOCKPLAYER",FF_OLD_BLOCKPLAYER}, + {"FF_BLOCKOTHERS",FF_OLD_BLOCKOTHERS}, + {"FF_SOLID",FF_OLD_SOLID}, + {"FF_RENDERSIDES",FF_OLD_RENDERSIDES}, + {"FF_RENDERPLANES",FF_OLD_RENDERPLANES}, + {"FF_RENDERALL",FF_OLD_RENDERALL}, + {"FF_SWIMMABLE",FF_OLD_SWIMMABLE}, + {"FF_NOSHADE",FF_OLD_NOSHADE}, + {"FF_CUTSOLIDS",FF_OLD_CUTSOLIDS}, + {"FF_CUTEXTRA",FF_OLD_CUTEXTRA}, + {"FF_CUTLEVEL",FF_OLD_CUTLEVEL}, + {"FF_CUTSPRITES",FF_OLD_CUTSPRITES}, + {"FF_BOTHPLANES",FF_OLD_BOTHPLANES}, + {"FF_EXTRA",FF_OLD_EXTRA}, + {"FF_TRANSLUCENT",FF_OLD_TRANSLUCENT}, + {"FF_FOG",FF_OLD_FOG}, + {"FF_INVERTPLANES",FF_OLD_INVERTPLANES}, + {"FF_ALLSIDES",FF_OLD_ALLSIDES}, + {"FF_INVERTSIDES",FF_OLD_INVERTSIDES}, + {"FF_DOUBLESHADOW",FF_OLD_DOUBLESHADOW}, + {"FF_FLOATBOB",FF_OLD_FLOATBOB}, + {"FF_NORETURN",FF_OLD_NORETURN}, + {"FF_CRUMBLE",FF_OLD_CRUMBLE}, + {"FF_SHATTERBOTTOM",FF_OLD_SHATTERBOTTOM}, + {"FF_GOOWATER",FF_OLD_GOOWATER}, + {"FF_MARIO",FF_OLD_MARIO}, + {"FF_BUSTUP",FF_OLD_BUSTUP}, + {"FF_QUICKSAND",FF_OLD_QUICKSAND}, + {"FF_PLATFORM",FF_OLD_PLATFORM}, + {"FF_REVERSEPLATFORM",FF_OLD_REVERSEPLATFORM}, + {"FF_INTANGIBLEFLATS",FF_OLD_INTANGIBLEFLATS}, + {"FF_INTANGABLEFLATS",FF_OLD_INTANGIBLEFLATS}, + {"FF_SHATTER",FF_OLD_SHATTER}, + {"FF_SPINBUST",FF_OLD_SPINBUST}, + {"FF_STRONGBUST",FF_OLD_STRONGBUST}, + {"FF_RIPPLE",FF_OLD_RIPPLE}, + {"FF_COLORMAPONLY",FF_OLD_COLORMAPONLY}, // FOF bustable flags {"FB_PUSHABLES",FB_PUSHABLES}, diff --git a/src/doomtype.h b/src/doomtype.h index 5ddd9ae44..b8f602c64 100644 --- a/src/doomtype.h +++ b/src/doomtype.h @@ -392,8 +392,6 @@ unset_bit_array (bitarray_t * const array, const int value) array[value >> 3] &= ~(1<<(value & 7)); } -#ifdef HAVE_SDL typedef UINT64 precise_t; -#endif #endif //__DOOMTYPE__ diff --git a/src/dummy/Sourcefile b/src/dummy/Sourcefile new file mode 100644 index 000000000..2f5dd1a59 --- /dev/null +++ b/src/dummy/Sourcefile @@ -0,0 +1,5 @@ +i_net.c +i_system.c +i_main.c +i_video.c +i_sound.c diff --git a/src/dummy/i_sound.c b/src/dummy/i_sound.c index f09158e01..ba0fc6423 100644 --- a/src/dummy/i_sound.c +++ b/src/dummy/i_sound.c @@ -139,29 +139,24 @@ boolean I_LoadSong(char *data, size_t len) void I_UnloadSong(void) { - (void)handle; } boolean I_PlaySong(boolean looping) { - (void)handle; (void)looping; return false; } void I_StopSong(void) { - (void)handle; } void I_PauseSong(void) { - (void)handle; } void I_ResumeSong(void) { - (void)handle; } void I_SetMusicVolume(UINT8 volume) @@ -188,18 +183,20 @@ void I_StopFadingSong(void) { } -boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void)); +boolean I_FadeSongFromVolume(UINT8 target_volume, UINT8 source_volume, UINT32 ms, void (*callback)(void)) { (void)target_volume; (void)source_volume; (void)ms; + (void)callback; return false; } -boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void)); +boolean I_FadeSong(UINT8 target_volume, UINT32 ms, void (*callback)(void)) { (void)target_volume; (void)ms; + (void)callback; return false; } diff --git a/src/dummy/i_system.c b/src/dummy/i_system.c index 4a657ed19..a1d757204 100644 --- a/src/dummy/i_system.c +++ b/src/dummy/i_system.c @@ -1,6 +1,9 @@ #include "../doomdef.h" +#include "../doomtype.h" #include "../i_system.h" +FILE *logstream = NULL; + UINT8 graphics_started = 0; UINT8 keyboard_started = 0; @@ -16,11 +19,17 @@ tic_t I_GetTime(void) return 0; } -int I_GetTimeMicros(void) +precise_t I_GetPreciseTime(void) { return 0; } +int I_PreciseToMicros(precise_t d) +{ + (void)d; + return 0; +} + void I_Sleep(void){} void I_GetEvent(void){} @@ -96,8 +105,6 @@ void I_StartupMouse(void){} void I_StartupMouse2(void){} -void I_StartupKeyboard(void){} - INT32 I_GetKey(void) { return 0; @@ -176,12 +183,18 @@ INT32 I_ClipboardCopy(const char *data, size_t size) return -1; } -char *I_ClipboardPaste(void) +const char *I_ClipboardPaste(void) { return NULL; } void I_RegisterSysCommands(void) {} +void I_GetCursorPosition(INT32 *x, INT32 *y) +{ + (void)x; + (void)y; +} + #include "../sdl/dosstr.c" diff --git a/src/filesrch.c b/src/filesrch.c index ec095518e..3f901b695 100644 --- a/src/filesrch.c +++ b/src/filesrch.c @@ -712,9 +712,9 @@ lumpinfo_t *getdirectoryfiles(const char *path, UINT16 *nlmp, UINT16 *nfolders) // Close any open directories and return if something went wrong. if (failure) { + for (; depthleft < maxdirdepth; closedir(dirhandle[depthleft++])); free(dirpathindex); free(dirhandle); - for (; depthleft < maxdirdepth; closedir(dirhandle[depthleft++])); return NULL; } diff --git a/src/hardware/hw_glob.h b/src/hardware/hw_glob.h index 8b30a3468..2cfb43a96 100644 --- a/src/hardware/hw_glob.h +++ b/src/hardware/hw_glob.h @@ -74,6 +74,8 @@ typedef struct gl_vissprite_s float spritexscale, spriteyscale; float spritexoffset, spriteyoffset; + skincolornum_t color; + UINT32 renderflags; UINT8 rotateflags; diff --git a/src/hardware/hw_main.c b/src/hardware/hw_main.c index a6b08812b..9793a5f69 100644 --- a/src/hardware/hw_main.c +++ b/src/hardware/hw_main.c @@ -887,9 +887,9 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, if (endtop < endrealbot && top < realbot) return; - if (!(list[i].flags & FF_NOSHADE)) + if (!(list[i].flags & FOF_NOSHADE)) { - if (pfloor && (pfloor->flags & FF_FOG)) + if (pfloor && (pfloor->fofflags & FOF_FOG)) { lightnum = HWR_CalcWallLight(pfloor->master->frontsector->lightlevel, v1x, v1y, v2x, v2y); colormap = pfloor->master->frontsector->extra_colormap; @@ -903,13 +903,13 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, solid = false; - if ((sector->lightlist[i].flags & FF_CUTSOLIDS) && !(cutflag & FF_EXTRA)) + if ((sector->lightlist[i].flags & FOF_CUTSOLIDS) && !(cutflag & FOF_EXTRA)) solid = true; - else if ((sector->lightlist[i].flags & FF_CUTEXTRA) && (cutflag & FF_EXTRA)) + else if ((sector->lightlist[i].flags & FOF_CUTEXTRA) && (cutflag & FOF_EXTRA)) { - if (sector->lightlist[i].flags & FF_EXTRA) + if (sector->lightlist[i].flags & FOF_EXTRA) { - if ((sector->lightlist[i].flags & (FF_FOG|FF_SWIMMABLE)) == (cutflag & (FF_FOG|FF_SWIMMABLE))) // Only merge with your own types + if ((sector->lightlist[i].flags & (FOF_FOG|FOF_SWIMMABLE)) == (cutflag & (FOF_FOG|FOF_SWIMMABLE))) // Only merge with your own types solid = true; } else @@ -978,7 +978,7 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, wallVerts[0].y = bot; wallVerts[1].y = endbot; - if (cutflag & FF_FOG) + if (cutflag & FOF_FOG) HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap); else if (polyflags & (PF_Translucent|PF_Additive|PF_Subtractive|PF_ReverseSubtract|PF_Multiplicative|PF_Environment)) HWR_AddTransparentWall(wallVerts, Surf, texnum, polyflags, false, lightnum, colormap); @@ -1007,7 +1007,7 @@ static void HWR_SplitWall(sector_t *sector, FOutVector *wallVerts, INT32 texnum, wallVerts[0].y = bot; wallVerts[1].y = endbot; - if (cutflag & FF_FOG) + if (cutflag & FOF_FOG) HWR_AddTransparentWall(wallVerts, Surf, texnum, PF_Fog|PF_NoTexture|polyflags, true, lightnum, colormap); else if (polyflags & (PF_Translucent|PF_Additive|PF_Subtractive|PF_ReverseSubtract|PF_Multiplicative|PF_Environment)) HWR_AddTransparentWall(wallVerts, Surf, texnum, polyflags, false, lightnum, colormap); @@ -1192,7 +1192,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[1].y = FIXED_TO_FLOAT(worldhighslope); if (gl_frontsector->numlights) - HWR_SplitWall(gl_frontsector, wallVerts, gl_toptexture, &Surf, FF_CUTLEVEL, NULL, 0); + HWR_SplitWall(gl_frontsector, wallVerts, gl_toptexture, &Surf, FOF_CUTLEVEL, NULL, 0); else if (grTex->mipmap.flags & TF_TRANSPARENT) HWR_AddTransparentWall(wallVerts, &Surf, gl_toptexture, PF_Environment, false, lightnum, colormap); else @@ -1258,7 +1258,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[1].y = FIXED_TO_FLOAT(worldbottomslope); if (gl_frontsector->numlights) - HWR_SplitWall(gl_frontsector, wallVerts, gl_bottomtexture, &Surf, FF_CUTLEVEL, NULL, 0); + HWR_SplitWall(gl_frontsector, wallVerts, gl_bottomtexture, &Surf, FOF_CUTLEVEL, NULL, 0); else if (grTex->mipmap.flags & TF_TRANSPARENT) HWR_AddTransparentWall(wallVerts, &Surf, gl_bottomtexture, PF_Environment, false, lightnum, colormap); else @@ -1465,9 +1465,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if (gl_frontsector->numlights) { if (!(blendmode & PF_Masked)) - HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FF_TRANSLUCENT, NULL, blendmode); + HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_TRANSLUCENT, NULL, blendmode); else - HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FF_CUTLEVEL, NULL, blendmode); + HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_CUTLEVEL, NULL, blendmode); } else if (!(blendmode & PF_Masked)) HWR_AddTransparentWall(wallVerts, &Surf, gl_midtexture, blendmode, false, lightnum, colormap); @@ -1549,7 +1549,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom // I don't think that solid walls can use translucent linedef types... if (gl_frontsector->numlights) - HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FF_CUTLEVEL, NULL, 0); + HWR_SplitWall(gl_frontsector, wallVerts, gl_midtexture, &Surf, FOF_CUTLEVEL, NULL, 0); else { if (grTex->mipmap.flags & TF_TRANSPARENT) @@ -1613,9 +1613,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if (bothsides) continue; - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES)) continue; - if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES) + if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES) continue; SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight) @@ -1656,7 +1656,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[2].y = FIXED_TO_FLOAT(hS); wallVerts[0].y = FIXED_TO_FLOAT(l); wallVerts[1].y = FIXED_TO_FLOAT(lS); - if (rover->flags & FF_FOG) + if (rover->fofflags & FOF_FOG) { wallVerts[3].t = wallVerts[2].t = 0; wallVerts[0].t = wallVerts[1].t = 0; @@ -1715,7 +1715,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[0].s = wallVerts[3].s = cliplow * grTex->scaleX; wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX; } - if (rover->flags & FF_FOG) + if (rover->fofflags & FOF_FOG) { FBITFIELD blendmode; @@ -1727,7 +1727,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap); if (gl_frontsector->numlights) - HWR_SplitWall(gl_frontsector, wallVerts, 0, &Surf, rover->flags, rover, blendmode); + HWR_SplitWall(gl_frontsector, wallVerts, 0, &Surf, rover->fofflags, rover, blendmode); else HWR_AddTransparentWall(wallVerts, &Surf, 0, blendmode, true, lightnum, colormap); } @@ -1735,14 +1735,14 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { FBITFIELD blendmode = PF_Masked; - if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend) + if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend) { blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent; Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1; } if (gl_frontsector->numlights) - HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, rover->flags, rover, blendmode); + HWR_SplitWall(gl_frontsector, wallVerts, texnum, &Surf, rover->fofflags, rover, blendmode); else { if (blendmode != PF_Masked) @@ -1770,9 +1770,9 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom if (bothsides) continue; - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERSIDES)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERSIDES)) continue; - if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES)) + if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES)) continue; SLOPEPARAMS(*rover->t_slope, high1, highslope1, *rover->topheight) @@ -1812,7 +1812,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[2].y = FIXED_TO_FLOAT(hS); wallVerts[0].y = FIXED_TO_FLOAT(l); wallVerts[1].y = FIXED_TO_FLOAT(lS); - if (rover->flags & FF_FOG) + if (rover->fofflags & FOF_FOG) { wallVerts[3].t = wallVerts[2].t = 0; wallVerts[0].t = wallVerts[1].t = 0; @@ -1838,7 +1838,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom wallVerts[2].s = wallVerts[1].s = cliphigh * grTex->scaleX; } - if (rover->flags & FF_FOG) + if (rover->fofflags & FOF_FOG) { FBITFIELD blendmode; @@ -1850,7 +1850,7 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom Surf.PolyColor.s.alpha = HWR_FogBlockAlpha(rover->master->frontsector->lightlevel, rover->master->frontsector->extra_colormap); if (gl_backsector->numlights) - HWR_SplitWall(gl_backsector, wallVerts, 0, &Surf, rover->flags, rover, blendmode); + HWR_SplitWall(gl_backsector, wallVerts, 0, &Surf, rover->fofflags, rover, blendmode); else HWR_AddTransparentWall(wallVerts, &Surf, 0, blendmode, true, lightnum, colormap); } @@ -1858,14 +1858,14 @@ static void HWR_ProcessSeg(void) // Sort of like GLWall::Process in GZDoom { FBITFIELD blendmode = PF_Masked; - if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend) + if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend) { blendmode = rover->blend ? HWR_GetBlendModeFlag(rover->blend) : PF_Translucent; Surf.PolyColor.s.alpha = (UINT8)rover->alpha-1 > 255 ? 255 : rover->alpha-1; } if (gl_backsector->numlights) - HWR_SplitWall(gl_backsector, wallVerts, texnum, &Surf, rover->flags, rover, blendmode); + HWR_SplitWall(gl_backsector, wallVerts, texnum, &Surf, rover->fofflags, rover, blendmode); else { if (blendmode != PF_Masked) @@ -2946,7 +2946,7 @@ static FBITFIELD HWR_RippleBlend(sector_t *sector, ffloor_t *rover, boolean ceil { (void)sector; (void)ceiling; - return /*R_IsRipplePlane(sector, rover, ceiling)*/ (rover->flags & FF_RIPPLE) ? PF_Ripple : 0; + return /*R_IsRipplePlane(sector, rover, ceiling)*/ (rover->fofflags & FOF_RIPPLE) ? PF_Ripple : 0; } // -----------------+ @@ -3114,17 +3114,17 @@ static void HWR_Subsector(size_t num) cullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy); centerHeight = P_GetFFloorBottomZAt(rover, gl_frontsector->soundorg.x, gl_frontsector->soundorg.y); - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES)) continue; if (sub->validcount == validcount) continue; if (centerHeight <= locCeilingHeight && centerHeight >= locFloorHeight && - ((dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) || - (dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((dup_viewz < cullHeight && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) || + (dup_viewz > cullHeight && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { - if (rover->flags & FF_FOG) + if (rover->fofflags & FOF_FOG) { UINT8 alpha; @@ -3139,7 +3139,7 @@ static void HWR_Subsector(size_t num) alpha, rover->master->frontsector, PF_Fog|PF_NoTexture, true, rover->master->frontsector->extra_colormap); } - else if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend) // SoM: Flags are more efficient + else if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend) // SoM: Flags are more efficient { light = R_GetPlaneLight(gl_frontsector, centerHeight, dup_viewz < cullHeight ? true : false); @@ -3167,10 +3167,10 @@ static void HWR_Subsector(size_t num) if (centerHeight >= locFloorHeight && centerHeight <= locCeilingHeight && - ((dup_viewz > cullHeight && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) || - (dup_viewz < cullHeight && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((dup_viewz > cullHeight && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) || + (dup_viewz < cullHeight && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { - if (rover->flags & FF_FOG) + if (rover->fofflags & FOF_FOG) { UINT8 alpha; @@ -3185,7 +3185,7 @@ static void HWR_Subsector(size_t num) alpha, rover->master->frontsector, PF_Fog|PF_NoTexture, true, rover->master->frontsector->extra_colormap); } - else if ((rover->flags & FF_TRANSLUCENT && rover->alpha < 256) || rover->blend) + else if ((rover->fofflags & FOF_TRANSLUCENT && rover->alpha < 256) || rover->blend) { light = R_GetPlaneLight(gl_frontsector, centerHeight, dup_viewz < cullHeight ? true : false); @@ -3939,7 +3939,7 @@ static void HWR_SplitSprite(gl_vissprite_t *spr) return; // even if we aren't changing colormap or lightlevel, we still need to continue drawing down the sprite - if (!(list[i].flags & FF_NOSHADE) && (list[i].flags & FF_CUTSPRITES)) + if (!(list[i].flags & FOF_NOSHADE) && (list[i].flags & FOF_CUTSPRITES)) { if (!lightset) lightlevel = *list[i].lightlevel > 255 ? 255 : *list[i].lightlevel; @@ -5370,6 +5370,10 @@ static void HWR_ProjectSprite(mobj_t *thing) vis->gpatch = (patch_t *)W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE); vis->mobj = thing; + if ((thing->flags2 & MF2_LINKDRAW) && thing->tracer && thing->color == SKINCOLOR_NONE) + vis->color = thing->tracer->color; + else + vis->color = thing->color; //Hurdler: 25/04/2000: now support colormap in hardware mode if ((vis->mobj->flags & (MF_ENEMY|MF_BOSS)) && (vis->mobj->flags2 & MF2_FRET) && !(vis->mobj->flags & MF_GRENADEBOUNCE) && (leveltime & 1)) // Bosses "flash" @@ -5379,13 +5383,13 @@ static void HWR_ProjectSprite(mobj_t *thing) else if (vis->mobj->type == MT_METALSONIC_BATTLE) vis->colormap = R_GetTranslationColormap(TC_METALSONIC, 0, GTC_CACHE); else - vis->colormap = R_GetTranslationColormap(TC_BOSS, vis->mobj->color, GTC_CACHE); + vis->colormap = R_GetTranslationColormap(TC_BOSS, vis->color, GTC_CACHE); } - else if (thing->color) + else if (vis->color) { // New colormap stuff for skins Tails 06-07-2002 if (thing->colorized) - vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE); + vis->colormap = R_GetTranslationColormap(TC_RAINBOW, vis->color, GTC_CACHE); else if (thing->player && thing->player->dashmode >= DASHMODE_THRESHOLD && (thing->player->charflags & SF_DASHMODE) && ((leveltime/2) & 1)) @@ -5393,15 +5397,15 @@ static void HWR_ProjectSprite(mobj_t *thing) if (thing->player->charflags & SF_MACHINE) vis->colormap = R_GetTranslationColormap(TC_DASHMODE, 0, GTC_CACHE); else - vis->colormap = R_GetTranslationColormap(TC_RAINBOW, thing->color, GTC_CACHE); + vis->colormap = R_GetTranslationColormap(TC_RAINBOW, vis->color, GTC_CACHE); } else if (thing->skin && thing->sprite == SPR_PLAY) // This thing is a player! { size_t skinnum = (skin_t*)thing->skin-skins; - vis->colormap = R_GetTranslationColormap((INT32)skinnum, thing->color, GTC_CACHE); + vis->colormap = R_GetTranslationColormap((INT32)skinnum, vis->color, GTC_CACHE); } else - vis->colormap = R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color ? vis->mobj->color : SKINCOLOR_CYAN, GTC_CACHE); + vis->colormap = R_GetTranslationColormap(TC_DEFAULT, vis->color ? vis->color : SKINCOLOR_CYAN, GTC_CACHE); } else vis->colormap = NULL; @@ -5511,6 +5515,7 @@ static void HWR_ProjectPrecipitationSprite(precipmobj_t *thing) vis->gpatch = (patch_t *)W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE); vis->flip = flip; vis->mobj = (mobj_t *)thing; + vis->color = SKINCOLOR_NONE; vis->colormap = NULL; diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 0c3440426..b4565121d 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -214,6 +214,7 @@ enum ffloor_e { ffloor_tslope, ffloor_bslope, ffloor_sector, + ffloor_fofflags, ffloor_flags, ffloor_master, ffloor_target, @@ -239,6 +240,7 @@ static const char *const ffloor_opt[] = { "t_slope", "b_slope", "sector", // secnum pushed as control sector userdata + "fofflags", "flags", "master", // control linedef "target", // target sector @@ -1841,6 +1843,80 @@ static int lib_numnodes(lua_State *L) // ffloor_t // ////////////// +static INT32 P_GetOldFOFFlags(ffloor_t *fflr) +{ + INT32 result = 0; + if (fflr->fofflags & FOF_EXISTS) + result |= FF_OLD_EXISTS; + if (fflr->fofflags & FOF_BLOCKPLAYER) + result |= FF_OLD_BLOCKPLAYER; + if (fflr->fofflags & FOF_BLOCKOTHERS) + result |= FF_OLD_BLOCKOTHERS; + if (fflr->fofflags & FOF_RENDERSIDES) + result |= FF_OLD_RENDERSIDES; + if (fflr->fofflags & FOF_RENDERPLANES) + result |= FF_OLD_RENDERPLANES; + if (fflr->fofflags & FOF_SWIMMABLE) + result |= FF_OLD_SWIMMABLE; + if (fflr->fofflags & FOF_NOSHADE) + result |= FF_OLD_NOSHADE; + if (fflr->fofflags & FOF_CUTSOLIDS) + result |= FF_OLD_CUTSOLIDS; + if (fflr->fofflags & FOF_CUTEXTRA) + result |= FF_OLD_CUTEXTRA; + if (fflr->fofflags & FOF_CUTSPRITES) + result |= FF_OLD_CUTSPRITES; + if (fflr->fofflags & FOF_BOTHPLANES) + result |= FF_OLD_BOTHPLANES; + if (fflr->fofflags & FOF_EXTRA) + result |= FF_OLD_EXTRA; + if (fflr->fofflags & FOF_TRANSLUCENT) + result |= FF_OLD_TRANSLUCENT; + if (fflr->fofflags & FOF_FOG) + result |= FF_OLD_FOG; + if (fflr->fofflags & FOF_INVERTPLANES) + result |= FF_OLD_INVERTPLANES; + if (fflr->fofflags & FOF_ALLSIDES) + result |= FF_OLD_ALLSIDES; + if (fflr->fofflags & FOF_INVERTSIDES) + result |= FF_OLD_INVERTSIDES; + if (fflr->fofflags & FOF_DOUBLESHADOW) + result |= FF_OLD_DOUBLESHADOW; + if (fflr->fofflags & FOF_FLOATBOB) + result |= FF_OLD_FLOATBOB; + if (fflr->fofflags & FOF_NORETURN) + result |= FF_OLD_NORETURN; + if (fflr->fofflags & FOF_CRUMBLE) + result |= FF_OLD_CRUMBLE; + if (fflr->bustflags & FB_ONLYBOTTOM) + result |= FF_OLD_SHATTERBOTTOM; + if (fflr->fofflags & FOF_GOOWATER) + result |= FF_OLD_GOOWATER; + if (fflr->fofflags & FOF_MARIO) + result |= FF_OLD_MARIO; + if (fflr->fofflags & FOF_BUSTUP) + result |= FF_OLD_BUSTUP; + if (fflr->fofflags & FOF_QUICKSAND) + result |= FF_OLD_QUICKSAND; + if (fflr->fofflags & FOF_PLATFORM) + result |= FF_OLD_PLATFORM; + if (fflr->fofflags & FOF_REVERSEPLATFORM) + result |= FF_OLD_REVERSEPLATFORM; + if (fflr->fofflags & FOF_INTANGIBLEFLATS) + result |= FF_OLD_INTANGIBLEFLATS; + if (fflr->busttype == BT_TOUCH) + result |= FF_OLD_SHATTER; + if (fflr->busttype == BT_SPINBUST) + result |= FF_OLD_SPINBUST; + if (fflr->busttype == BT_STRONG) + result |= FF_OLD_STRONGBUST; + if (fflr->fofflags & FF_OLD_RIPPLE) + result |= FOF_RIPPLE; + if (fflr->fofflags & FF_OLD_COLORMAPONLY) + result |= FOF_COLORMAPONLY; + return result; +} + static int ffloor_get(lua_State *L) { ffloor_t *ffloor = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR)); @@ -1895,8 +1971,11 @@ static int ffloor_get(lua_State *L) case ffloor_sector: LUA_PushUserdata(L, §ors[ffloor->secnum], META_SECTOR); return 1; + case ffloor_fofflags: + lua_pushinteger(L, ffloor->fofflags); + return 1; case ffloor_flags: - lua_pushinteger(L, ffloor->flags); + lua_pushinteger(L, P_GetOldFOFFlags(ffloor)); return 1; case ffloor_master: LUA_PushUserdata(L, ffloor->master, META_LINE); @@ -1938,6 +2017,88 @@ static int ffloor_get(lua_State *L) return 0; } +static void P_SetOldFOFFlags(ffloor_t *fflr, oldffloortype_e oldflags) +{ + ffloortype_e originalflags = fflr->fofflags; + fflr->fofflags = 0; + if (oldflags & FF_OLD_EXISTS) + fflr->fofflags |= FOF_EXISTS; + if (oldflags & FF_OLD_BLOCKPLAYER) + fflr->fofflags |= FOF_BLOCKPLAYER; + if (oldflags & FF_OLD_BLOCKOTHERS) + fflr->fofflags |= FOF_BLOCKOTHERS; + if (oldflags & FF_OLD_RENDERSIDES) + fflr->fofflags |= FOF_RENDERSIDES; + if (oldflags & FF_OLD_RENDERPLANES) + fflr->fofflags |= FOF_RENDERPLANES; + if (oldflags & FF_OLD_SWIMMABLE) + fflr->fofflags |= FOF_SWIMMABLE; + if (oldflags & FF_OLD_NOSHADE) + fflr->fofflags |= FOF_NOSHADE; + if (oldflags & FF_OLD_CUTSOLIDS) + fflr->fofflags |= FOF_CUTSOLIDS; + if (oldflags & FF_OLD_CUTEXTRA) + fflr->fofflags |= FOF_CUTEXTRA; + if (oldflags & FF_OLD_CUTSPRITES) + fflr->fofflags |= FOF_CUTSPRITES; + if (oldflags & FF_OLD_BOTHPLANES) + fflr->fofflags |= FOF_BOTHPLANES; + if (oldflags & FF_OLD_EXTRA) + fflr->fofflags |= FOF_EXTRA; + if (oldflags & FF_OLD_TRANSLUCENT) + fflr->fofflags |= FOF_TRANSLUCENT; + if (oldflags & FF_OLD_FOG) + fflr->fofflags |= FOF_FOG; + if (oldflags & FF_OLD_INVERTPLANES) + fflr->fofflags |= FOF_INVERTPLANES; + if (oldflags & FF_OLD_ALLSIDES) + fflr->fofflags |= FOF_ALLSIDES; + if (oldflags & FF_OLD_INVERTSIDES) + fflr->fofflags |= FOF_INVERTSIDES; + if (oldflags & FF_OLD_DOUBLESHADOW) + fflr->fofflags |= FOF_DOUBLESHADOW; + if (oldflags & FF_OLD_FLOATBOB) + fflr->fofflags |= FOF_FLOATBOB; + if (oldflags & FF_OLD_NORETURN) + fflr->fofflags |= FOF_NORETURN; + if (oldflags & FF_OLD_CRUMBLE) + fflr->fofflags |= FOF_CRUMBLE; + if (oldflags & FF_OLD_GOOWATER) + fflr->fofflags |= FOF_GOOWATER; + if (oldflags & FF_OLD_MARIO) + fflr->fofflags |= FOF_MARIO; + if (oldflags & FF_OLD_BUSTUP) + fflr->fofflags |= FOF_BUSTUP; + if (oldflags & FF_OLD_QUICKSAND) + fflr->fofflags |= FOF_QUICKSAND; + if (oldflags & FF_OLD_PLATFORM) + fflr->fofflags |= FOF_PLATFORM; + if (oldflags & FF_OLD_REVERSEPLATFORM) + fflr->fofflags |= FOF_REVERSEPLATFORM; + if (oldflags & FF_OLD_RIPPLE) + fflr->fofflags |= FOF_RIPPLE; + if (oldflags & FF_OLD_COLORMAPONLY) + fflr->fofflags |= FOF_COLORMAPONLY; + if (originalflags & FOF_BOUNCY) + fflr->fofflags |= FOF_BOUNCY; + if (originalflags & FOF_SPLAT) + fflr->fofflags |= FOF_SPLAT; + + if (oldflags & FF_OLD_SHATTER) + fflr->busttype = BT_TOUCH; + else if (oldflags & FF_OLD_SPINBUST) + fflr->busttype = BT_SPINBUST; + else if (oldflags & FF_OLD_STRONGBUST) + fflr->busttype = BT_STRONG; + else + fflr->busttype = BT_REGULAR; + + if (oldflags & FF_OLD_SHATTERBOTTOM) + fflr->bustflags |= FB_ONLYBOTTOM; + else + fflr->bustflags &= ~FB_ONLYBOTTOM; +} + static int ffloor_set(lua_State *L) { ffloor_t *ffloor = *((ffloor_t **)luaL_checkudata(L, 1, META_FFLOOR)); @@ -2002,10 +2163,20 @@ static int ffloor_set(lua_State *L) case ffloor_bottompic: *ffloor->bottompic = P_AddLevelFlatRuntime(luaL_checkstring(L, 3)); break; + case ffloor_fofflags: { + ffloortype_e oldflags = ffloor->fofflags; // store FOF's old flags + ffloor->fofflags = luaL_checkinteger(L, 3); + if (ffloor->fofflags != oldflags) + ffloor->target->moved = true; // reset target sector's lightlist + break; + } case ffloor_flags: { - ffloortype_e oldflags = ffloor->flags; // store FOF's old flags - ffloor->flags = luaL_checkinteger(L, 3); - if (ffloor->flags != oldflags) + ffloortype_e oldflags = ffloor->fofflags; // store FOF's old flags + busttype_e oldbusttype = ffloor->busttype; + ffloorbustflags_e oldbustflags = ffloor->bustflags; + oldffloortype_e newflags = luaL_checkinteger(L, 3); + P_SetOldFOFFlags(ffloor, newflags); + if (ffloor->fofflags != oldflags || ffloor->busttype != oldbusttype || ffloor->bustflags != oldbustflags) ffloor->target->moved = true; // reset target sector's lightlist break; } diff --git a/src/lua_script.c b/src/lua_script.c index a36e5bf98..4d4071545 100644 --- a/src/lua_script.c +++ b/src/lua_script.c @@ -387,6 +387,7 @@ int LUA_PushGlobals(lua_State *L, const char *word) return 1; } else if (fastcmp(word, "stagefailed")) { lua_pushboolean(L, stagefailed); + return 1; } else if (fastcmp(word, "mouse")) { LUA_PushUserdata(L, &mouse, META_MOUSE); return 1; diff --git a/src/m_fixed.c b/src/m_fixed.c index 70b7623da..ded294b0a 100644 --- a/src/m_fixed.c +++ b/src/m_fixed.c @@ -276,6 +276,15 @@ vector3_t *FV3_Load(vector3_t *vec, fixed_t x, fixed_t y, fixed_t z) return vec; } +vector4_t *FV4_Load(vector4_t *vec, fixed_t x, fixed_t y, fixed_t z, fixed_t a) +{ + vec->x = x; + vec->y = y; + vec->z = z; + vec->a = a; + return vec; +} + vector3_t *FV3_UnLoad(vector3_t *vec, fixed_t *x, fixed_t *y, fixed_t *z) { *x = vec->x; @@ -284,11 +293,25 @@ vector3_t *FV3_UnLoad(vector3_t *vec, fixed_t *x, fixed_t *y, fixed_t *z) return vec; } +vector4_t *FV4_UnLoad(vector4_t *vec, fixed_t *x, fixed_t *y, fixed_t *z, fixed_t *a) +{ + *x = vec->x; + *y = vec->y; + *z = vec->z; + *a = vec->a; + return vec; +} + vector3_t *FV3_Copy(vector3_t *a_o, const vector3_t *a_i) { return M_Memcpy(a_o, a_i, sizeof(vector3_t)); } +vector4_t *FV4_Copy(vector4_t *a_o, const vector4_t *a_i) +{ + return M_Memcpy(a_o, a_i, sizeof(vector4_t)); +} + vector3_t *FV3_AddEx(const vector3_t *a_i, const vector3_t *a_c, vector3_t *a_o) { a_o->x = a_i->x + a_c->x; @@ -297,11 +320,25 @@ vector3_t *FV3_AddEx(const vector3_t *a_i, const vector3_t *a_c, vector3_t *a_o) return a_o; } +vector4_t *FV4_AddEx(const vector4_t *a_i, const vector4_t *a_c, vector4_t *a_o) +{ + a_o->x = a_i->x + a_c->x; + a_o->y = a_i->y + a_c->y; + a_o->z = a_i->z + a_c->z; + a_o->a = a_i->a + a_c->a; + return a_o; +} + vector3_t *FV3_Add(vector3_t *a_i, const vector3_t *a_c) { return FV3_AddEx(a_i, a_c, a_i); } +vector4_t *FV4_Add(vector4_t *a_i, const vector4_t *a_c) +{ + return FV4_AddEx(a_i, a_c, a_i); +} + vector3_t *FV3_SubEx(const vector3_t *a_i, const vector3_t *a_c, vector3_t *a_o) { a_o->x = a_i->x - a_c->x; @@ -310,11 +347,25 @@ vector3_t *FV3_SubEx(const vector3_t *a_i, const vector3_t *a_c, vector3_t *a_o) return a_o; } +vector4_t *FV4_SubEx(const vector4_t *a_i, const vector4_t *a_c, vector4_t *a_o) +{ + a_o->x = a_i->x - a_c->x; + a_o->y = a_i->y - a_c->y; + a_o->z = a_i->z - a_c->z; + a_o->a = a_i->a - a_c->a; + return a_o; +} + vector3_t *FV3_Sub(vector3_t *a_i, const vector3_t *a_c) { return FV3_SubEx(a_i, a_c, a_i); } +vector4_t *FV4_Sub(vector4_t *a_i, const vector4_t *a_c) +{ + return FV4_SubEx(a_i, a_c, a_i); +} + vector3_t *FV3_MulEx(const vector3_t *a_i, fixed_t a_c, vector3_t *a_o) { a_o->x = FixedMul(a_i->x, a_c); @@ -323,11 +374,25 @@ vector3_t *FV3_MulEx(const vector3_t *a_i, fixed_t a_c, vector3_t *a_o) return a_o; } +vector4_t *FV4_MulEx(const vector4_t *a_i, fixed_t a_c, vector4_t *a_o) +{ + a_o->x = FixedMul(a_i->x, a_c); + a_o->y = FixedMul(a_i->y, a_c); + a_o->z = FixedMul(a_i->z, a_c); + a_o->a = FixedMul(a_i->a, a_c); + return a_o; +} + vector3_t *FV3_Mul(vector3_t *a_i, fixed_t a_c) { return FV3_MulEx(a_i, a_c, a_i); } +vector4_t *FV4_Mul(vector4_t *a_i, fixed_t a_c) +{ + return FV4_MulEx(a_i, a_c, a_i); +} + vector3_t *FV3_DivideEx(const vector3_t *a_i, fixed_t a_c, vector3_t *a_o) { a_o->x = FixedDiv(a_i->x, a_c); @@ -336,11 +401,25 @@ vector3_t *FV3_DivideEx(const vector3_t *a_i, fixed_t a_c, vector3_t *a_o) return a_o; } +vector4_t *FV4_DivideEx(const vector4_t *a_i, fixed_t a_c, vector4_t *a_o) +{ + a_o->x = FixedDiv(a_i->x, a_c); + a_o->y = FixedDiv(a_i->y, a_c); + a_o->z = FixedDiv(a_i->z, a_c); + a_o->a = FixedDiv(a_i->a, a_c); + return a_o; +} + vector3_t *FV3_Divide(vector3_t *a_i, fixed_t a_c) { return FV3_DivideEx(a_i, a_c, a_i); } +vector4_t *FV4_Divide(vector4_t *a_i, fixed_t a_c) +{ + return FV4_DivideEx(a_i, a_c, a_i); +} + // Vector Complex Math vector3_t *FV3_Midpoint(const vector3_t *a_1, const vector3_t *a_2, vector3_t *a_o) { @@ -353,6 +432,19 @@ vector3_t *FV3_Midpoint(const vector3_t *a_1, const vector3_t *a_2, vector3_t *a return a_o; } +vector4_t *FV4_Midpoint(const vector4_t *a_1, const vector4_t *a_2, vector4_t *a_o) +{ + a_o->x = FixedDiv(a_2->x - a_1->x, 2 * FRACUNIT); + a_o->y = FixedDiv(a_2->y - a_1->y, 2 * FRACUNIT); + a_o->z = FixedDiv(a_2->z - a_1->z, 2 * FRACUNIT); + a_o->a = FixedDiv(a_2->a - a_1->a, 2 * FRACUNIT); + a_o->x = a_1->x + a_o->x; + a_o->y = a_1->y + a_o->y; + a_o->z = a_1->z + a_o->z; + a_o->a = a_1->z + a_o->a; + return a_o; +} + fixed_t FV3_Distance(const vector3_t *p1, const vector3_t *p2) { fixed_t xs = FixedMul(p2->x - p1->x, p2->x - p1->x); @@ -361,6 +453,15 @@ fixed_t FV3_Distance(const vector3_t *p1, const vector3_t *p2) return FixedSqrt(xs + ys + zs); } +fixed_t FV4_Distance(const vector4_t *p1, const vector4_t *p2) +{ + fixed_t xs = FixedMul(p2->x - p1->x, p2->x - p1->x); + fixed_t ys = FixedMul(p2->y - p1->y, p2->y - p1->y); + fixed_t zs = FixedMul(p2->z - p1->z, p2->z - p1->z); + fixed_t za = FixedMul(p2->a - p1->a, p2->a - p1->a); + return FixedSqrt(xs + ys + zs + za); +} + fixed_t FV3_Magnitude(const vector3_t *a_normal) { fixed_t xs = FixedMul(a_normal->x, a_normal->x); @@ -369,6 +470,15 @@ fixed_t FV3_Magnitude(const vector3_t *a_normal) return FixedSqrt(xs + ys + zs); } +fixed_t FV4_Magnitude(const vector4_t *a_normal) +{ + fixed_t xs = FixedMul(a_normal->x, a_normal->x); + fixed_t ys = FixedMul(a_normal->y, a_normal->y); + fixed_t zs = FixedMul(a_normal->z, a_normal->z); + fixed_t as = FixedMul(a_normal->a, a_normal->a); + return FixedSqrt(xs + ys + zs + as); +} + // Also returns the magnitude fixed_t FV3_NormalizeEx(const vector3_t *a_normal, vector3_t *a_o) { @@ -379,11 +489,26 @@ fixed_t FV3_NormalizeEx(const vector3_t *a_normal, vector3_t *a_o) return magnitude; } +fixed_t FV4_NormalizeEx(const vector4_t *a_normal, vector4_t *a_o) +{ + fixed_t magnitude = FV4_Magnitude(a_normal); + a_o->x = FixedDiv(a_normal->x, magnitude); + a_o->y = FixedDiv(a_normal->y, magnitude); + a_o->z = FixedDiv(a_normal->z, magnitude); + a_o->a = FixedDiv(a_normal->a, magnitude); + return magnitude; +} + fixed_t FV3_Normalize(vector3_t *a_normal) { return FV3_NormalizeEx(a_normal, a_normal); } +fixed_t FV4_Normalize(vector4_t *a_normal) +{ + return FV4_NormalizeEx(a_normal, a_normal); +} + vector3_t *FV3_NegateEx(const vector3_t *a_1, vector3_t *a_o) { a_o->x = -a_1->x; @@ -392,11 +517,25 @@ vector3_t *FV3_NegateEx(const vector3_t *a_1, vector3_t *a_o) return a_o; } +vector4_t *FV4_NegateEx(const vector4_t *a_1, vector4_t *a_o) +{ + a_o->x = -a_1->x; + a_o->y = -a_1->y; + a_o->z = -a_1->z; + a_o->a = -a_1->a; + return a_o; +} + vector3_t *FV3_Negate(vector3_t *a_1) { return FV3_NegateEx(a_1, a_1); } +vector4_t *FV4_Negate(vector4_t *a_1) +{ + return FV4_NegateEx(a_1, a_1); +} + boolean FV3_Equal(const vector3_t *a_1, const vector3_t *a_2) { fixed_t Epsilon = FRACUNIT / FRACUNIT; @@ -411,11 +550,31 @@ boolean FV3_Equal(const vector3_t *a_1, const vector3_t *a_2) return false; } +boolean FV4_Equal(const vector4_t *a_1, const vector4_t *a_2) +{ + fixed_t Epsilon = FRACUNIT / FRACUNIT; + + if ((abs(a_2->x - a_1->x) > Epsilon) || + (abs(a_2->y - a_1->y) > Epsilon) || + (abs(a_2->z - a_1->z) > Epsilon) || + (abs(a_2->a - a_1->a) > Epsilon)) + { + return true; + } + + return false; +} + fixed_t FV3_Dot(const vector3_t *a_1, const vector3_t *a_2) { return (FixedMul(a_1->x, a_2->x) + FixedMul(a_1->y, a_2->y) + FixedMul(a_1->z, a_2->z)); } +fixed_t FV4_Dot(const vector4_t *a_1, const vector4_t *a_2) +{ + return (FixedMul(a_1->x, a_2->x) + FixedMul(a_1->y, a_2->y) + FixedMul(a_1->z, a_2->z) + FixedMul(a_1->a, a_2->a)); +} + vector3_t *FV3_Cross(const vector3_t *a_1, const vector3_t *a_2, vector3_t *a_o) { a_o->x = FixedMul(a_1->y, a_2->z) - FixedMul(a_1->z, a_2->y); @@ -432,7 +591,7 @@ vector3_t *FV3_Cross(const vector3_t *a_1, const vector3_t *a_2, vector3_t *a_o) // vector3_t *FV3_ClosestPointOnLine(const vector3_t *Line, const vector3_t *p, vector3_t *out) { - // Determine t (the length of the vector from �Line[0]� to �p�) + // Determine t (the length of the vector from "Line[0]" to "p") vector3_t c, V; fixed_t t, d = 0; FV3_SubEx(p, &Line[0], &c); @@ -442,7 +601,7 @@ vector3_t *FV3_ClosestPointOnLine(const vector3_t *Line, const vector3_t *p, vec d = FV3_Distance(&Line[0], &Line[1]); t = FV3_Dot(&V, &c); - // Check to see if �t� is beyond the extents of the line segment + // Check to see if "t" is beyond the extents of the line segment if (t < 0) { return FV3_Copy(out, &Line[0]); @@ -452,7 +611,7 @@ vector3_t *FV3_ClosestPointOnLine(const vector3_t *Line, const vector3_t *p, vec return FV3_Copy(out, &Line[1]); } - // Return the point between �Line[0]� and �Line[1]� + // Return the point between "Line[0]" and "Line[1]" FV3_Mul(&V, t); return FV3_AddEx(&Line[0], &V, out); @@ -810,7 +969,7 @@ void FM_CreateObjectMatrix(matrix_t *matrix, fixed_t x, fixed_t y, fixed_t z, fi // // Multiplies a vector by the specified matrix // -void FM_MultMatrixVec3(const matrix_t *matrix, const vector3_t *vec, vector3_t *out) +const vector3_t *FM_MultMatrixVec3(const matrix_t *matrix, const vector3_t *vec, vector3_t *out) { #define M(row,col) matrix->m[col * 4 + row] out->x = FixedMul(vec->x, M(0, 0)) @@ -828,6 +987,34 @@ void FM_MultMatrixVec3(const matrix_t *matrix, const vector3_t *vec, vector3_t * + FixedMul(vec->z, M(2, 2)) + M(2, 3); #undef M + return out; +} + +const vector4_t *FM_MultMatrixVec4(const matrix_t *matrix, const vector4_t *vec, vector4_t *out) +{ +#define M(row,col) matrix->m[col * 4 + row] + out->x = FixedMul(vec->x, M(0, 0)) + + FixedMul(vec->y, M(0, 1)) + + FixedMul(vec->z, M(0, 2)) + + FixedMul(vec->a, M(0, 3)); + + out->y = FixedMul(vec->x, M(1, 0)) + + FixedMul(vec->y, M(1, 1)) + + FixedMul(vec->z, M(1, 2)) + + FixedMul(vec->a, M(1, 3)); + + out->z = FixedMul(vec->x, M(2, 0)) + + FixedMul(vec->y, M(2, 1)) + + FixedMul(vec->z, M(2, 2)) + + FixedMul(vec->a, M(2, 3)); + + + out->a = FixedMul(vec->x, M(3, 0)) + + FixedMul(vec->y, M(3, 1)) + + FixedMul(vec->z, M(3, 2)) + + FixedMul(vec->a, M(3, 3)); +#undef M + return out; } // diff --git a/src/m_fixed.h b/src/m_fixed.h index fe5efc551..73e629f44 100644 --- a/src/m_fixed.h +++ b/src/m_fixed.h @@ -395,6 +395,32 @@ vector3_t *FV3_IntersectionPoint(const vector3_t *vNormal, const vector3_t *vLin UINT8 FV3_PointOnLineSide(const vector3_t *point, const vector3_t *line); boolean FV3_PointInsideBox(const vector3_t *point, const vector3_t *box); +typedef struct +{ + fixed_t x, y, z, a; +} vector4_t; + +vector4_t *FV4_Load(vector4_t *vec, fixed_t x, fixed_t y, fixed_t z, fixed_t a); +vector4_t *FV4_UnLoad(vector4_t *vec, fixed_t *x, fixed_t *y, fixed_t *z, fixed_t *a); +vector4_t *FV4_Copy(vector4_t *a_o, const vector4_t *a_i); +vector4_t *FV4_AddEx(const vector4_t *a_i, const vector4_t *a_c, vector4_t *a_o); +vector4_t *FV4_Add(vector4_t *a_i, const vector4_t *a_c); +vector4_t *FV4_SubEx(const vector4_t *a_i, const vector4_t *a_c, vector4_t *a_o); +vector4_t *FV4_Sub(vector4_t *a_i, const vector4_t *a_c); +vector4_t *FV4_MulEx(const vector4_t *a_i, fixed_t a_c, vector4_t *a_o); +vector4_t *FV4_Mul(vector4_t *a_i, fixed_t a_c); +vector4_t *FV4_DivideEx(const vector4_t *a_i, fixed_t a_c, vector4_t *a_o); +vector4_t *FV4_Divide(vector4_t *a_i, fixed_t a_c); +vector4_t *FV4_Midpoint(const vector4_t *a_1, const vector4_t *a_2, vector4_t *a_o); +fixed_t FV4_Distance(const vector4_t *p1, const vector4_t *p2); +fixed_t FV4_Magnitude(const vector4_t *a_normal); +fixed_t FV4_NormalizeEx(const vector4_t *a_normal, vector4_t *a_o); +fixed_t FV4_Normalize(vector4_t *a_normal); +vector4_t *FV4_NegateEx(const vector4_t *a_1, vector4_t *a_o); +vector4_t *FV4_Negate(vector4_t *a_1); +boolean FV4_Equal(const vector4_t *a_1, const vector4_t *a_2); +fixed_t FV4_Dot(const vector4_t *a_1, const vector4_t *a_2); + typedef struct { fixed_t m[16]; @@ -402,7 +428,8 @@ typedef struct void FM_LoadIdentity(matrix_t* matrix); void FM_CreateObjectMatrix(matrix_t *matrix, fixed_t x, fixed_t y, fixed_t z, fixed_t anglex, fixed_t angley, fixed_t anglez, fixed_t upx, fixed_t upy, fixed_t upz, fixed_t radius); -void FM_MultMatrixVec3(const matrix_t *matrix, const vector3_t *vec, vector3_t *out); +const vector3_t *FM_MultMatrixVec3(const matrix_t *matrix, const vector3_t *vec, vector3_t *out); +const vector4_t *FM_MultMatrixVec4(const matrix_t *matrix, const vector4_t *vec, vector4_t *out); void FM_MultMatrix(matrix_t *dest, const matrix_t *multme); void FM_Translate(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z); void FM_Scale(matrix_t *dest, fixed_t x, fixed_t y, fixed_t z); diff --git a/src/m_menu.c b/src/m_menu.c index 764e1a79b..e1b0942d9 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -3686,17 +3686,12 @@ void M_StartControlPanel(void) } else { - INT32 numlives = 2; + INT32 numlives = players[consoleplayer].lives; + if (players[consoleplayer].playerstate != PST_LIVE) + ++numlives; SPauseMenu[spause_pandora].status = (M_SecretUnlocked(SECRET_PANDORA) && !marathonmode) ? (IT_STRING | IT_CALL) : (IT_DISABLED); - if (&players[consoleplayer]) - { - numlives = players[consoleplayer].lives; - if (players[consoleplayer].playerstate != PST_LIVE) - ++numlives; - } - // The list of things that can disable retrying is (was?) a little too complex // for me to want to use the short if statement syntax if (numlives <= 1 || G_IsSpecialStage(gamemap)) @@ -3754,7 +3749,7 @@ void M_StartControlPanel(void) if (G_GametypeHasTeams()) MPauseMenu[mpause_switchteam].status = IT_STRING | IT_SUBMENU; else if (G_GametypeHasSpectators()) - MPauseMenu[((&players[consoleplayer] && players[consoleplayer].spectator) ? mpause_entergame : mpause_spectate)].status = IT_STRING | IT_CALL; + MPauseMenu[players[consoleplayer].spectator ? mpause_entergame : mpause_spectate].status = IT_STRING | IT_CALL; else // in this odd case, we still want something to be on the menu even if it's useless MPauseMenu[mpause_spectate].status = IT_GRAYEDOUT; } @@ -7014,7 +7009,7 @@ static void M_RetryResponse(INT32 ch) if (ch != 'y' && ch != KEY_ENTER) return; - if (!&players[consoleplayer] || netgame || multiplayer) // Should never happen! + if (netgame || multiplayer) // Should never happen! return; M_ClearMenus(true); diff --git a/src/m_misc.c b/src/m_misc.c index f9afa4803..bb5f25687 100644 --- a/src/m_misc.c +++ b/src/m_misc.c @@ -566,10 +566,13 @@ void M_FirstLoadConfig(void) gameconfig_loaded = true; // reset to default player stuff - COM_BufAddText (va("%s \"%s\"\n",cv_skin.name,cv_defaultskin.string)); - COM_BufAddText (va("%s \"%s\"\n",cv_playercolor.name,cv_defaultplayercolor.string)); - COM_BufAddText (va("%s \"%s\"\n",cv_skin2.name,cv_defaultskin2.string)); - COM_BufAddText (va("%s \"%s\"\n",cv_playercolor2.name,cv_defaultplayercolor2.string)); + if (!dedicated) + { + COM_BufAddText (va("%s \"%s\"\n",cv_skin.name,cv_defaultskin.string)); + COM_BufAddText (va("%s \"%s\"\n",cv_playercolor.name,cv_defaultplayercolor.string)); + COM_BufAddText (va("%s \"%s\"\n",cv_skin2.name,cv_defaultskin2.string)); + COM_BufAddText (va("%s \"%s\"\n",cv_playercolor2.name,cv_defaultplayercolor2.string)); + } } /** Saves the game configuration. @@ -833,7 +836,7 @@ static void M_PNGText(png_structp png_ptr, png_infop png_info_ptr, PNG_CONST png else snprintf(lvlttltext, 48, "Unknown"); - if (gamestate == GS_LEVEL && &players[displayplayer] && players[displayplayer].mo) + if (gamestate == GS_LEVEL && players[displayplayer].mo) snprintf(locationtxt, 40, "X:%d Y:%d Z:%d A:%d", players[displayplayer].mo->x>>FRACBITS, players[displayplayer].mo->y>>FRACBITS, @@ -2161,63 +2164,6 @@ const char *GetRevisionString(void) return rev; } -// Vector/matrix math -TVector *VectorMatrixMultiply(TVector v, TMatrix m) -{ - static TVector ret; - - ret[0] = FixedMul(v[0],m[0][0]) + FixedMul(v[1],m[1][0]) + FixedMul(v[2],m[2][0]) + FixedMul(v[3],m[3][0]); - ret[1] = FixedMul(v[0],m[0][1]) + FixedMul(v[1],m[1][1]) + FixedMul(v[2],m[2][1]) + FixedMul(v[3],m[3][1]); - ret[2] = FixedMul(v[0],m[0][2]) + FixedMul(v[1],m[1][2]) + FixedMul(v[2],m[2][2]) + FixedMul(v[3],m[3][2]); - ret[3] = FixedMul(v[0],m[0][3]) + FixedMul(v[1],m[1][3]) + FixedMul(v[2],m[2][3]) + FixedMul(v[3],m[3][3]); - - return &ret; -} - -TMatrix *RotateXMatrix(angle_t rad) -{ - static TMatrix ret; - const angle_t fa = rad>>ANGLETOFINESHIFT; - const fixed_t cosrad = FINECOSINE(fa), sinrad = FINESINE(fa); - - ret[0][0] = FRACUNIT; ret[0][1] = 0; ret[0][2] = 0; ret[0][3] = 0; - ret[1][0] = 0; ret[1][1] = cosrad; ret[1][2] = sinrad; ret[1][3] = 0; - ret[2][0] = 0; ret[2][1] = -sinrad; ret[2][2] = cosrad; ret[2][3] = 0; - ret[3][0] = 0; ret[3][1] = 0; ret[3][2] = 0; ret[3][3] = FRACUNIT; - - return &ret; -} - -#if 0 -TMatrix *RotateYMatrix(angle_t rad) -{ - static TMatrix ret; - const angle_t fa = rad>>ANGLETOFINESHIFT; - const fixed_t cosrad = FINECOSINE(fa), sinrad = FINESINE(fa); - - ret[0][0] = cosrad; ret[0][1] = 0; ret[0][2] = -sinrad; ret[0][3] = 0; - ret[1][0] = 0; ret[1][1] = FRACUNIT; ret[1][2] = 0; ret[1][3] = 0; - ret[2][0] = sinrad; ret[2][1] = 0; ret[2][2] = cosrad; ret[2][3] = 0; - ret[3][0] = 0; ret[3][1] = 0; ret[3][2] = 0; ret[3][3] = FRACUNIT; - - return &ret; -} -#endif - -TMatrix *RotateZMatrix(angle_t rad) -{ - static TMatrix ret; - const angle_t fa = rad>>ANGLETOFINESHIFT; - const fixed_t cosrad = FINECOSINE(fa), sinrad = FINESINE(fa); - - ret[0][0] = cosrad; ret[0][1] = sinrad; ret[0][2] = 0; ret[0][3] = 0; - ret[1][0] = -sinrad; ret[1][1] = cosrad; ret[1][2] = 0; ret[1][3] = 0; - ret[2][0] = 0; ret[2][1] = 0; ret[2][2] = FRACUNIT; ret[2][3] = 0; - ret[3][0] = 0; ret[3][1] = 0; ret[3][2] = 0; ret[3][3] = FRACUNIT; - - return &ret; -} - /** Set of functions to take in a size_t as an argument, * put the argument in a character buffer, and return the * pointer to that buffer. diff --git a/src/m_misc.h b/src/m_misc.h index 5b79c6c8c..2959ba44e 100644 --- a/src/m_misc.h +++ b/src/m_misc.h @@ -80,17 +80,6 @@ INT32 axtoi(const char *hexStg); const char *GetRevisionString(void); -// Vector/matrix math -typedef fixed_t TVector[4]; -typedef fixed_t TMatrix[4][4]; - -TVector *VectorMatrixMultiply(TVector v, TMatrix m); -TMatrix *RotateXMatrix(angle_t rad); -#if 0 -TMatrix *RotateYMatrix(angle_t rad); -#endif -TMatrix *RotateZMatrix(angle_t rad); - // s1 = s2+s3+s1 (1024 lenghtmax) void strcatbf(char *s1, const char *s2, const char *s3); diff --git a/src/p_enemy.c b/src/p_enemy.c index cd381e712..558b8a795 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -498,7 +498,7 @@ static boolean P_WaterInSector(mobj_t *mobj, fixed_t x, fixed_t y) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE)) continue; if (*rover->topheight >= mobj->floorz && *rover->topheight <= mobj->z) @@ -1521,8 +1521,9 @@ void A_PointyThink(mobj_t *actor) INT32 i; player_t *player = NULL; mobj_t *ball; - TVector v; - TVector *res; + matrix_t m; + vector4_t v; + vector4_t res; angle_t fa; fixed_t radius = FixedMul(actor->info->radius*actor->info->reactiontime, actor->scale); boolean firsttime = true; @@ -1592,20 +1593,21 @@ void A_PointyThink(mobj_t *actor) while (ball) { fa = actor->lastlook+i; - v[0] = FixedMul(FINECOSINE(fa),radius); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa),radius); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa),radius); + v.y = 0; + v.z = FixedMul(FINESINE(fa),radius); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *RotateXMatrix(FixedAngle(actor->lastlook+i))); - M_Memcpy(&v, res, sizeof (v)); - res = VectorMatrixMultiply(v, *RotateZMatrix(actor->angle+ANGLE_180)); - M_Memcpy(&v, res, sizeof (v)); + FM_RotateX(&m, FixedAngle(actor->lastlook+i)); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); + + FM_RotateZ(&m, actor->angle+ANGLE_180); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); P_UnsetThingPosition(ball); - ball->x = actor->x + v[0]; - ball->y = actor->y + v[1]; - ball->z = actor->z + (actor->height>>1) + v[2]; + ball->x = actor->x + v.x; + ball->y = actor->y + v.y; + ball->z = actor->z + (actor->height>>1) + v.z; P_SetThingPosition(ball); ball = ball->tracer; @@ -12686,7 +12688,7 @@ void A_WhoCaresIfYourSonIsABee(mobj_t *actor) // Function: A_ParentTriesToSleep // -// Description: If extravalue1 is less than or equal to var1, go to var2. +// Description: If extravalue1 is greater than 0 go to var1 // // var1 = state to go to when extravalue1 // var2 = unused diff --git a/src/p_floor.c b/src/p_floor.c index b65435c21..d9e0ee0f2 100644 --- a/src/p_floor.c +++ b/src/p_floor.c @@ -551,7 +551,7 @@ static fixed_t P_SectorCheckWater(sector_t *analyzesector, for (rover = analyzesector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_SOLID) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_SOLID) continue; // If the sector is below the water, don't bother. @@ -757,10 +757,10 @@ void T_StartCrumble(crumble_t *crumble) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_CRUMBLE)) + if (!(rover->fofflags & FOF_CRUMBLE)) continue; - if (!(rover->flags & FF_FLOATBOB)) + if (!(rover->fofflags & FOF_FLOATBOB)) continue; if (rover->master != crumble->sourceline) @@ -769,7 +769,7 @@ void T_StartCrumble(crumble_t *crumble) rover->alpha = crumble->origalpha; if (rover->alpha == 0xff) - rover->flags &= ~FF_TRANSLUCENT; + rover->fofflags &= ~FOF_TRANSLUCENT; } } @@ -793,13 +793,13 @@ void T_StartCrumble(crumble_t *crumble) for (rover = sector->ffloors; rover; rover = rover->next) { - if (rover->flags & FF_NORETURN) + if (rover->fofflags & FOF_NORETURN) continue; - if (!(rover->flags & FF_CRUMBLE)) + if (!(rover->fofflags & FOF_CRUMBLE)) continue; - if (!(rover->flags & FF_FLOATBOB)) + if (!(rover->fofflags & FOF_FLOATBOB)) continue; if (rover->master != crumble->sourceline) @@ -807,7 +807,7 @@ void T_StartCrumble(crumble_t *crumble) if (rover->alpha == crumble->origalpha) { - rover->flags |= FF_TRANSLUCENT; + rover->fofflags |= FOF_TRANSLUCENT; rover->alpha = 0x00; } else @@ -815,7 +815,7 @@ void T_StartCrumble(crumble_t *crumble) rover->alpha = crumble->origalpha; if (rover->alpha == 0xff) - rover->flags &= ~FF_TRANSLUCENT; + rover->fofflags &= ~FOF_TRANSLUCENT; } } } @@ -1082,7 +1082,7 @@ void T_ThwompSector(thwomp_t *thwomp) if (thwomp->direction == 0) // Not going anywhere, so look for players. { - if (rover->flags & FF_EXISTS) + if (rover->fofflags & FOF_EXISTS) { UINT8 i; // scan the players to find victims! @@ -1175,7 +1175,7 @@ void T_ThwompSector(thwomp_t *thwomp) if (res == pastdest) { - if (rover->flags & FF_EXISTS) + if (rover->fofflags & FOF_EXISTS) S_StartSound((void *)&actionsector->soundorg, thwomp->sound); thwomp->direction = 1; // start heading back up @@ -1928,7 +1928,7 @@ void EV_CrumbleChain(sector_t *sec, ffloor_t *rover) } // no longer exists (can't collide with again) - rover->flags &= ~FF_EXISTS; + rover->fofflags &= ~FOF_EXISTS; rover->master->frontsector->moved = true; P_RecalcPrecipInSector(sec); } @@ -2054,8 +2054,8 @@ void EV_MarioBlock(ffloor_t *rover, sector_t *sector, mobj_t *puncher) if (roversec->floordata || roversec->ceilingdata) return; - if (!(rover->flags & FF_SOLID)) - rover->flags |= (FF_SOLID|FF_RENDERALL|FF_CUTLEVEL); + if (!(rover->fofflags & FOF_SOLID)) + rover->fofflags |= (FOF_SOLID|FOF_RENDERALL|FOF_CUTLEVEL); // Find an item to pop out! thing = SearchMarioNode(roversec->touching_thinglist); diff --git a/src/p_map.c b/src/p_map.c index aee13ae7e..2bb02503f 100644 --- a/src/p_map.c +++ b/src/p_map.c @@ -505,11 +505,12 @@ static void P_DoFanAndGasJet(mobj_t *spring, mobj_t *object) if (flipval*object->momz > FixedMul(speed, spring->scale)) object->momz = flipval*FixedMul(speed, spring->scale); - if (p && !p->powers[pw_tailsfly]) // doesn't reset anim for Tails' flight + if (p && !p->powers[pw_tailsfly] && !p->powers[pw_carry]) // doesn't reset anim for Tails' flight { P_ResetPlayer(p); - if (p->panim != PA_FALL) - P_SetPlayerMobjState(object, S_PLAY_FALL); + P_SetPlayerMobjState(object, S_PLAY_FALL); + P_SetTarget(&object->tracer, spring); + p->powers[pw_carry] = CR_FAN; } break; case MT_STEAM: // Steam @@ -2073,13 +2074,13 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; topheight = P_GetFOFTopZ(thing, newsubsec->sector, rover, x, y, NULL); bottomheight = P_GetFOFBottomZ(thing, newsubsec->sector, rover, x, y, NULL); - if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER) && !(thing->flags & MF_NOGRAVITY)) + if ((rover->fofflags & (FOF_SWIMMABLE|FOF_GOOWATER)) == (FOF_SWIMMABLE|FOF_GOOWATER) && !(thing->flags & MF_NOGRAVITY)) { // If you're inside goowater and slowing down fixed_t sinklevel = FixedMul(thing->info->height/6, thing->scale); @@ -2118,14 +2119,14 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) if (thing->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(thing->player, rover))) ; - else if (thing->type == MT_SKIM && (rover->flags & FF_SWIMMABLE)) + else if (thing->type == MT_SKIM && (rover->fofflags & FOF_SWIMMABLE)) ; - else if (!((rover->flags & FF_BLOCKPLAYER && thing->player) - || (rover->flags & FF_BLOCKOTHERS && !thing->player) - || rover->flags & FF_QUICKSAND)) + else if (!((rover->fofflags & FOF_BLOCKPLAYER && thing->player) + || (rover->fofflags & FOF_BLOCKOTHERS && !thing->player) + || rover->fofflags & FOF_QUICKSAND)) continue; - if (rover->flags & FF_QUICKSAND) + if (rover->fofflags & FOF_QUICKSAND) { if (thing->z < topheight && bottomheight < thingtop) { @@ -2145,15 +2146,15 @@ boolean P_CheckPosition(mobj_t *thing, fixed_t x, fixed_t y) + ((topheight - bottomheight)/2)); if (topheight > tmfloorz && abs(delta1) < abs(delta2) - && !(rover->flags & FF_REVERSEPLATFORM)) + && !(rover->fofflags & FOF_REVERSEPLATFORM)) { tmfloorz = tmdropoffz = topheight; tmfloorrover = rover; tmfloorslope = *rover->t_slope; } if (bottomheight < tmceilingz && abs(delta1) >= abs(delta2) - && !(rover->flags & FF_PLATFORM) - && !(thing->type == MT_SKIM && (rover->flags & FF_SWIMMABLE))) + && !(rover->fofflags & FOF_PLATFORM) + && !(thing->type == MT_SKIM && (rover->fofflags & FOF_SWIMMABLE))) { tmceilingz = tmdrpoffceilz = bottomheight; tmceilingrover = rover; @@ -2371,7 +2372,7 @@ boolean P_CheckCameraPosition(fixed_t x, fixed_t y, camera_t *thiscam) for (rover = newsubsec->sector->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) + if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) continue; topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, x, y, NULL); @@ -3024,9 +3025,9 @@ static boolean P_ThingHeightClip(mobj_t *thing) { rover = (thing->eflags & MFE_VERTICALFLIP) ? oldceilingrover : oldfloorrover; - // Match the Thing's old floorz to an FOF and check for FF_EXISTS - // If ~FF_EXISTS, don't set mobj Z. - if (!rover || ((rover->flags & FF_EXISTS) && (rover->flags & FF_SOLID))) + // Match the Thing's old floorz to an FOF and check for FOF_EXISTS + // If ~FOF_EXISTS, don't set mobj Z. + if (!rover || ((rover->fofflags & FOF_EXISTS) && (rover->fofflags & FOF_SOLID))) { hitfloor = bouncing; if (thing->eflags & MFE_VERTICALFLIP) @@ -3287,7 +3288,7 @@ static boolean P_IsClimbingValid(player_t *player, angle_t angle) for (rover = glidesector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER)) continue; topheight = P_GetFFloorTopZAt (rover, mo->x, mo->y); @@ -3403,7 +3404,7 @@ static void PTR_GlideClimbTraverse(line_t *li) { for (rover = checksector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (slidemo->player->charflags & SF_CANBUSTWALLS))) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (slidemo->player->charflags & SF_CANBUSTWALLS))) continue; topheight = P_GetFFloorTopZAt (rover, slidemo->x, slidemo->y); @@ -3631,10 +3632,10 @@ static void P_CheckLavaWall(mobj_t *mo, sector_t *sec) for (rover = sec->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_SWIMMABLE)) + if (!(rover->fofflags & FOF_SWIMMABLE)) continue; if (rover->master->frontsector->damagetype != SD_LAVA) @@ -4241,8 +4242,8 @@ static boolean PIT_ChangeSector(mobj_t *thing, boolean realcrush) for (rover = thing->subsector->sector->ffloors; rover; rover = rover->next) { - if (!(((rover->flags & FF_BLOCKPLAYER) && thing->player) - || ((rover->flags & FF_BLOCKOTHERS) && !thing->player)) || !(rover->flags & FF_EXISTS)) + if (!(((rover->fofflags & FOF_BLOCKPLAYER) && thing->player) + || ((rover->fofflags & FOF_BLOCKOTHERS) && !thing->player)) || !(rover->fofflags & FOF_EXISTS)) continue; topheight = *rover->topheight; @@ -5036,16 +5037,16 @@ fixed_t P_FloorzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height) for (rover = sec->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if ((!(rover->flags & FF_SOLID || rover->flags & FF_QUICKSAND) || (rover->flags & FF_SWIMMABLE))) + if ((!(rover->fofflags & FOF_SOLID || rover->fofflags & FOF_QUICKSAND) || (rover->fofflags & FOF_SWIMMABLE))) continue; topheight = P_GetFFloorTopZAt (rover, x, y); bottomheight = P_GetFFloorBottomZAt(rover, x, y); - if (rover->flags & FF_QUICKSAND) + if (rover->fofflags & FOF_QUICKSAND) { if (z < topheight && bottomheight < thingtop) { @@ -5080,16 +5081,16 @@ fixed_t P_CeilingzAtPos(fixed_t x, fixed_t y, fixed_t z, fixed_t height) for (rover = sec->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if ((!(rover->flags & FF_SOLID || rover->flags & FF_QUICKSAND) || (rover->flags & FF_SWIMMABLE))) + if ((!(rover->fofflags & FOF_SOLID || rover->fofflags & FOF_QUICKSAND) || (rover->fofflags & FOF_SWIMMABLE))) continue; topheight = P_GetFFloorTopZAt (rover, x, y); bottomheight = P_GetFFloorBottomZAt(rover, x, y); - if (rover->flags & FF_QUICKSAND) + if (rover->fofflags & FOF_QUICKSAND) { if (thingtop > bottomheight && topheight > z) { diff --git a/src/p_maputl.c b/src/p_maputl.c index 614db93e3..260bcc074 100644 --- a/src/p_maputl.c +++ b/src/p_maputl.c @@ -374,7 +374,7 @@ void P_CameraLineOpening(line_t *linedef) for (rover = front->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_RENDERALL) || !(rover->flags & FF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) + if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_RENDERALL) || !(rover->fofflags & FOF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) continue; topheight = P_CameraGetFOFTopZ(mapcampointer, front, rover, tmx, tmy, linedef); @@ -398,7 +398,7 @@ void P_CameraLineOpening(line_t *linedef) for (rover = back->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_RENDERALL) || !(rover->flags & FF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) + if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_RENDERALL) || !(rover->fofflags & FOF_EXISTS) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) continue; topheight = P_CameraGetFOFTopZ(mapcampointer, back, rover, tmx, tmy, linedef); @@ -594,13 +594,13 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) for (rover = front->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (mobj->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mobj->player, rover))) ; - else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player) - || (rover->flags & FF_BLOCKOTHERS && !mobj->player))) + else if (!((rover->fofflags & FOF_BLOCKPLAYER && mobj->player) + || (rover->fofflags & FOF_BLOCKOTHERS && !mobj->player))) continue; topheight = P_GetFOFTopZ(mobj, front, rover, tmx, tmy, linedef); @@ -609,7 +609,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) delta1 = abs(mobj->z - (bottomheight + ((topheight - bottomheight)/2))); delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); - if (delta1 >= delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_PLATFORM) // thing is below FOF + if (delta1 >= delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_PLATFORM) // thing is below FOF { if (bottomheight < opentop) { opentop = bottomheight; @@ -620,7 +620,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) highceiling = bottomheight; } - if (delta1 < delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_REVERSEPLATFORM) // thing is above FOF + if (delta1 < delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_REVERSEPLATFORM) // thing is above FOF { if (topheight > openbottom) { openbottom = topheight; @@ -636,13 +636,13 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) for (rover = back->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (mobj->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mobj->player, rover))) ; - else if (!((rover->flags & FF_BLOCKPLAYER && mobj->player) - || (rover->flags & FF_BLOCKOTHERS && !mobj->player))) + else if (!((rover->fofflags & FOF_BLOCKPLAYER && mobj->player) + || (rover->fofflags & FOF_BLOCKOTHERS && !mobj->player))) continue; topheight = P_GetFOFTopZ(mobj, back, rover, tmx, tmy, linedef); @@ -651,7 +651,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) delta1 = abs(mobj->z - (bottomheight + ((topheight - bottomheight)/2))); delta2 = abs(thingtop - (bottomheight + ((topheight - bottomheight)/2))); - if (delta1 >= delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_PLATFORM) // thing is below FOF + if (delta1 >= delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_PLATFORM) // thing is below FOF { if (bottomheight < opentop) { opentop = bottomheight; @@ -662,7 +662,7 @@ void P_LineOpening(line_t *linedef, mobj_t *mobj) highceiling = bottomheight; } - if (delta1 < delta2 && (rover->flags & FF_INTANGIBLEFLATS) != FF_REVERSEPLATFORM) // thing is above FOF + if (delta1 < delta2 && (rover->fofflags & FOF_INTANGIBLEFLATS) != FOF_REVERSEPLATFORM) // thing is above FOF { if (topheight > openbottom) { openbottom = topheight; diff --git a/src/p_mobj.c b/src/p_mobj.c index 36253569b..2dbfac3bd 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -955,11 +955,11 @@ void P_ExplodeMissile(mobj_t *mo) boolean P_InsideANonSolidFFloor(mobj_t *mobj, ffloor_t *rover) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) return false; - if ((((rover->flags & FF_BLOCKPLAYER) && mobj->player) - || ((rover->flags & FF_BLOCKOTHERS) && !mobj->player))) + if ((((rover->fofflags & FOF_BLOCKPLAYER) && mobj->player) + || ((rover->fofflags & FOF_BLOCKOTHERS) && !mobj->player))) return false; topheight = P_GetFFloorTopZAt (rover, mobj->x, mobj->y); @@ -1450,10 +1450,10 @@ fixed_t P_GetMobjGravity(mobj_t *mo) for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FF_EXISTS itself, but let's not always call this function + if (!(rover->fofflags & FOF_EXISTS) || !P_InsideANonSolidFFloor(mo, rover)) // P_InsideANonSolidFFloor checks for FOF_EXISTS itself, but let's not always call this function continue; - if ((rover->flags & (FF_SWIMMABLE|FF_GOOWATER)) == (FF_SWIMMABLE|FF_GOOWATER)) + if ((rover->fofflags & (FOF_SWIMMABLE|FOF_GOOWATER)) == (FOF_SWIMMABLE|FOF_GOOWATER)) goopgravity = true; gravfactor = P_GetSectorGravityFactor(rover->master->frontsector); @@ -1714,10 +1714,10 @@ static void P_PushableCheckBustables(mobj_t *mo) for (rover = node->m_sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_BUSTUP)) + if (!(rover->fofflags & FOF_BUSTUP)) continue; if (!(rover->bustflags & FB_PUSHABLES)) @@ -2168,7 +2168,7 @@ void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motype) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; topheight = P_GetFOFTopZ(mo, sector, rover, mo->x, mo->y, NULL); @@ -2176,16 +2176,16 @@ void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motype) if (mo->player && (P_CheckSolidLava(rover) || P_CanRunOnWater(mo->player, rover))) // only the player should stand on lava or run on water ; - else if (motype != 0 && rover->flags & FF_SWIMMABLE) // "scenery" only + else if (motype != 0 && rover->fofflags & FOF_SWIMMABLE) // "scenery" only continue; - else if (rover->flags & FF_QUICKSAND) // quicksand + else if (rover->fofflags & FOF_QUICKSAND) // quicksand ; else if (!( // if it's not either of the following... - (rover->flags & (FF_BLOCKPLAYER|FF_MARIO) && mo->player) // ...solid to players? (mario blocks are always solid from beneath to players) - || (rover->flags & FF_BLOCKOTHERS && !mo->player) // ...solid to others? + (rover->fofflags & (FOF_BLOCKPLAYER|FOF_MARIO) && mo->player) // ...solid to players? (mario blocks are always solid from beneath to players) + || (rover->fofflags & FOF_BLOCKOTHERS && !mo->player) // ...solid to others? )) // ...don't take it into account. continue; - if (rover->flags & FF_QUICKSAND) + if (rover->fofflags & FOF_QUICKSAND) { switch (motype) { @@ -2210,15 +2210,15 @@ void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motype) delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2)); if (topheight > mo->floorz && abs(delta1) < abs(delta2) - && (rover->flags & FF_SOLID) // Non-FF_SOLID Mario blocks are only solid from bottom - && !(rover->flags & FF_REVERSEPLATFORM) - && ((P_MobjFlip(mo)*mo->momz >= 0) || (!(rover->flags & FF_PLATFORM)))) // In reverse gravity, only clip for FOFs that are intangible from their bottom (the "top" you're falling through) if you're coming from above ("below" in your frame of reference) + && (rover->fofflags & FOF_SOLID) // Non-FOF_SOLID Mario blocks are only solid from bottom + && !(rover->fofflags & FOF_REVERSEPLATFORM) + && ((P_MobjFlip(mo)*mo->momz >= 0) || (!(rover->fofflags & FOF_PLATFORM)))) // In reverse gravity, only clip for FOFs that are intangible from their bottom (the "top" you're falling through) if you're coming from above ("below" in your frame of reference) { mo->floorz = topheight; } if (bottomheight < mo->ceilingz && abs(delta1) >= abs(delta2) - && !(rover->flags & FF_PLATFORM) - && ((P_MobjFlip(mo)*mo->momz >= 0) || ((rover->flags & FF_SOLID) && !(rover->flags & FF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below + && !(rover->fofflags & FOF_PLATFORM) + && ((P_MobjFlip(mo)*mo->momz >= 0) || ((rover->fofflags & FOF_SOLID) && !(rover->fofflags & FOF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below { mo->ceilingz = bottomheight; } @@ -2334,7 +2334,7 @@ boolean P_CheckDeathPitCollide(mobj_t *mo) boolean P_CheckSolidLava(ffloor_t *rover) { - return (rover->flags & FF_SWIMMABLE) && (rover->master->frontsector->damagetype == SD_LAVA); + return (rover->fofflags & FOF_SWIMMABLE) && (rover->master->frontsector->damagetype == SD_LAVA); } // @@ -2828,10 +2828,10 @@ static void P_CheckMarioBlocks(mobj_t *mo) for (rover = node->m_sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_MARIO)) + if (!(rover->fofflags & FOF_MARIO)) continue; if (mo->eflags & MFE_VERTICALFLIP) @@ -2840,7 +2840,7 @@ static void P_CheckMarioBlocks(mobj_t *mo) if (*rover->bottomheight != mo->ceilingz) continue; - if (rover->flags & FF_GOOWATER) // Brick block! + if (rover->fofflags & FOF_GOOWATER) // Brick block! EV_CrumbleChain(node->m_sector, rover); else // Question block! EV_MarioBlock(rover, node->m_sector, mo); @@ -3230,7 +3230,7 @@ boolean P_CanRunOnWater(player_t *player, ffloor_t *rover) if (!player->powers[pw_carry] && !player->homing && ((player->powers[pw_super] || player->charflags & SF_RUNONWATER || player->dashmode >= DASHMODE_THRESHOLD) && doifit) - && (rover->flags & FF_SWIMMABLE) && !(player->pflags & PF_SPINNING) && player->speed > FixedMul(player->runspeed, player->mo->scale) + && (rover->fofflags & FOF_SWIMMABLE) && !(player->pflags & PF_SPINNING) && player->speed > FixedMul(player->runspeed, player->mo->scale) && !(player->pflags & PF_SLIDING) && abs(playerbottom - surfaceheight) < FixedMul(30*FRACUNIT, player->mo->scale)) return true; @@ -3264,9 +3264,9 @@ void P_MobjCheckWater(mobj_t *mobj) for (rover = sector->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) - || (((rover->flags & FF_BLOCKPLAYER) && mobj->player) - || ((rover->flags & FF_BLOCKOTHERS) && !mobj->player))) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) + || (((rover->fofflags & FOF_BLOCKPLAYER) && mobj->player) + || ((rover->fofflags & FOF_BLOCKOTHERS) && !mobj->player))) continue; topheight = P_GetSpecialTopZ(mobj, sectors + rover->secnum, sector); @@ -3304,7 +3304,7 @@ void P_MobjCheckWater(mobj_t *mobj) if (rover->master->frontsector->damagetype == SD_FIRE || rover->master->frontsector->damagetype == SD_LAVA) mobj->eflags |= MFE_TOUCHLAVA; - if (rover->flags & FF_GOOWATER && !(mobj->flags & MF_NOGRAVITY)) + if (rover->fofflags & FOF_GOOWATER && !(mobj->flags & MF_NOGRAVITY)) mobj->eflags |= MFE_GOOWATER; } } @@ -3512,7 +3512,7 @@ static void P_SceneryCheckWater(mobj_t *mobj) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_BLOCKOTHERS) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_BLOCKOTHERS) continue; topheight = P_GetFFloorTopZAt (rover, mobj->x, mobj->y); @@ -3558,7 +3558,7 @@ static boolean P_CameraCheckHeat(camera_t *thiscam) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (halfheight >= P_GetFFloorTopZAt(rover, thiscam->x, thiscam->y)) @@ -3588,7 +3588,7 @@ static boolean P_CameraCheckWater(camera_t *thiscam) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_BLOCKOTHERS) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_BLOCKOTHERS) continue; if (halfheight >= P_GetFFloorTopZAt(rover, thiscam->x, thiscam->y)) @@ -3782,10 +3782,10 @@ static void P_CheckCrumblingPlatforms(mobj_t *mobj) for (rover = node->m_sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_CRUMBLE)) + if (!(rover->fofflags & FOF_CRUMBLE)) continue; if (mobj->eflags & MFE_VERTICALFLIP) @@ -3799,7 +3799,7 @@ static void P_CheckCrumblingPlatforms(mobj_t *mobj) continue; } - EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), mobj->player, rover->alpha, !(rover->flags & FF_NORETURN)); + EV_StartCrumble(rover->master->frontsector, rover, (rover->fofflags & FOF_FLOATBOB), mobj->player, rover->alpha, !(rover->fofflags & FOF_NORETURN)); } } } @@ -3817,10 +3817,10 @@ static boolean P_MobjTouchesSectorWithWater(mobj_t *mobj) for (rover = node->m_sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_SWIMMABLE)) + if (!(rover->fofflags & FOF_SWIMMABLE)) continue; return true; @@ -3851,10 +3851,10 @@ static void P_CheckFloatbobPlatforms(mobj_t *mobj) for (rover = node->m_sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_FLOATBOB)) + if (!(rover->fofflags & FOF_FLOATBOB)) continue; @@ -3984,10 +3984,10 @@ static void CalculatePrecipFloor(precipmobj_t *mobj) for (rover = mobjsecsubsec->ffloors; rover; rover = rover->next) { // If it exists, it'll get rained on. - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_BLOCKOTHERS) && !(rover->flags & FF_SWIMMABLE)) + if (!(rover->fofflags & FOF_BLOCKOTHERS) && !(rover->fofflags & FOF_SWIMMABLE)) continue; topheight = P_GetFFloorTopZAt(rover, mobj->x, mobj->y); @@ -4090,9 +4090,9 @@ static void P_KillRingsInLava(mobj_t *mo) for (rover = node->m_sector->ffloors; rover; rover = rover->next) // go through all fofs in the sector { - if (!(rover->flags & FF_EXISTS)) continue; // fof must be real + if (!(rover->fofflags & FOF_EXISTS)) continue; // fof must be real - if (!(rover->flags & FF_SWIMMABLE)) + if (!(rover->fofflags & FOF_SWIMMABLE)) continue; // fof must be water if (rover->master->frontsector->damagetype != SD_FIRE && rover->master->frontsector->damagetype != SD_LAVA) @@ -4733,14 +4733,14 @@ static void P_Boss4DestroyCage(mobj_t *mobj) { rsec = §ors[sector->attached[a]]; for (rover = rsec->ffloors; rover; rover = rover->next) - if (rover->flags & FF_EXISTS && rover->secnum == (size_t)snum) + if (rover->fofflags & FOF_EXISTS && rover->secnum == (size_t)snum) { - if (rover->flags & FF_RENDERALL) // checking for FF_RENDERANY. + if (rover->fofflags & FOF_RENDERALL) // checking for FF_RENDERANY. EV_CrumbleChain(rsec, rover); // This FOF is visible to some extent? Crumble it. else // Completely invisible FOF { // no longer exists (can't collide with again) - rover->flags &= ~FF_EXISTS; + rover->fofflags &= ~FOF_EXISTS; sector->moved = true; rsec->moved = true; } @@ -6189,8 +6189,9 @@ static void P_MoveHoop(mobj_t *mobj) { const fixed_t fuse = (mobj->fuse*mobj->extravalue2); const angle_t fa = mobj->movedir*(FINEANGLES/mobj->extravalue1); - TVector v; - TVector *res; + matrix_t m; + vector4_t v; + vector4_t res; fixed_t finalx, finaly, finalz; fixed_t x, y, z; @@ -6203,19 +6204,20 @@ static void P_MoveHoop(mobj_t *mobj) z = mobj->target->z+mobj->target->height/2; // Make the sprite travel towards the center of the hoop - v[0] = FixedMul(FINECOSINE(fa),fuse); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa),fuse); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa),fuse); + v.y = 0; + v.z = FixedMul(FINESINE(fa),fuse); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *RotateXMatrix(FixedAngle(mobj->target->movedir*FRACUNIT))); - M_Memcpy(&v, res, sizeof (v)); - res = VectorMatrixMultiply(v, *RotateZMatrix(FixedAngle(mobj->target->movecount*FRACUNIT))); - M_Memcpy(&v, res, sizeof (v)); + FM_RotateX(&m, FixedAngle(mobj->target->movedir*FRACUNIT)); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); - finalx = x + v[0]; - finaly = y + v[1]; - finalz = z + v[2]; + FM_RotateZ(&m, FixedAngle(mobj->target->movecount*FRACUNIT)); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); + + finalx = x + v.x; + finaly = y + v.y; + finalz = z + v.z; P_UnsetThingPosition(mobj); mobj->x = finalx; @@ -6228,8 +6230,9 @@ void P_SpawnHoopOfSomething(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT { mobj_t *mobj; INT32 i; - TVector v; - TVector *res; + matrix_t m; + vector4_t v; + vector4_t res; fixed_t finalx, finaly, finalz; mobj_t hoopcenter; mobj_t *axis; @@ -6271,19 +6274,20 @@ void P_SpawnHoopOfSomething(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT for (i = 0; i < number; i++) { fa = (i*degrees); - v[0] = FixedMul(FINECOSINE(fa),radius); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa),radius); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa),radius); + v.y = 0; + v.z = FixedMul(FINESINE(fa),radius); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *RotateXMatrix(rotangle)); - M_Memcpy(&v, res, sizeof (v)); - res = VectorMatrixMultiply(v, *RotateZMatrix(closestangle)); - M_Memcpy(&v, res, sizeof (v)); + FM_RotateX(&m, rotangle); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); - finalx = x + v[0]; - finaly = y + v[1]; - finalz = z + v[2]; + FM_RotateZ(&m, closestangle); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); + + finalx = x + v.x; + finaly = y + v.y; + finalz = z + v.z; mobj = P_SpawnMobj(finalx, finaly, finalz, type); mobj->z -= mobj->height/2; @@ -6294,8 +6298,9 @@ void P_SpawnParaloop(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 numb { mobj_t *mobj; INT32 i; - TVector v; - TVector *res; + matrix_t m; + vector4_t v; + vector4_t res; fixed_t finalx, finaly, finalz, dist; angle_t degrees, fa, closestangle; fixed_t mobjx, mobjy, mobjz; @@ -6310,19 +6315,20 @@ void P_SpawnParaloop(fixed_t x, fixed_t y, fixed_t z, fixed_t radius, INT32 numb for (i = 0; i < number; i++) { fa = (i*degrees); - v[0] = FixedMul(FINECOSINE(fa),radius); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa),radius); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa),radius); + v.y = 0; + v.z = FixedMul(FINESINE(fa),radius); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *RotateXMatrix(rotangle)); - M_Memcpy(&v, res, sizeof (v)); - res = VectorMatrixMultiply(v, *RotateZMatrix(closestangle)); - M_Memcpy(&v, res, sizeof (v)); + FM_RotateX(&m, rotangle); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); - finalx = x + v[0]; - finaly = y + v[1]; - finalz = z + v[2]; + FM_RotateZ(&m, closestangle); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); + + finalx = x + v.x; + finaly = y + v.y; + finalz = z + v.z; mobj = P_SpawnMobj(finalx, finaly, finalz, type); @@ -6489,9 +6495,10 @@ static void P_NightsItemChase(mobj_t *thing) // void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) { - TVector unit_lengthways, unit_sideways, pos_lengthways, pos_sideways; - TVector *res; - fixed_t radius, dist, zstore; + matrix_t m; + vector4_t unit_lengthways, unit_sideways, pos_lengthways, pos_sideways; + vector4_t res; + fixed_t radius, dist = 0, zstore; angle_t fa; boolean dosound = false; mobj_t *mobj = center->hnext, *hnext = NULL; @@ -6502,8 +6509,9 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) INT32 rot; INT32 prevrot; - dist = pos_sideways[0] = pos_sideways[1] = pos_sideways[2] = pos_sideways[3] = unit_sideways[3] =\ - pos_lengthways[0] = pos_lengthways[1] = pos_lengthways[2] = pos_lengthways[3] = 0; + FV4_Load(&pos_sideways, 0, 0, 0, 0); + FV4_Load(&unit_sideways, 0, 0, 0, 0); + FV4_Load(&pos_lengthways, 0, 0, 0, 0); while (mobj) { @@ -6521,15 +6529,15 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) rot = (baserot + mobj->threshold) & FINEMASK; prevrot = (baseprevrot + mobj->threshold) & FINEMASK; - pos_lengthways[0] = pos_lengthways[1] = pos_lengthways[2] = pos_lengthways[3] = 0; + FV4_Load(&pos_lengthways, 0, 0, 0, 0); dist = ((mobj->info->speed) ? mobj->info->speed : mobjinfo[MT_SMALLMACECHAIN].speed); dist = ((center->scale == FRACUNIT) ? dist : FixedMul(dist, center->scale)); fa = (FixedAngle(center->movefactor*FRACUNIT) >> ANGLETOFINESHIFT); radius = FixedMul(dist, FINECOSINE(fa)); - unit_lengthways[1] = -FixedMul(dist, FINESINE(fa)); - unit_lengthways[3] = FRACUNIT; + unit_lengthways.y = -FixedMul(dist, FINESINE(fa)); + unit_lengthways.a = FRACUNIT; // Swinging Chain. if (center->flags2 & MF2_STRONGBOX) @@ -6542,8 +6550,8 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) fa = ((FixedAngle(swingmag) >> ANGLETOFINESHIFT) + mobj->friction) & FINEMASK; - unit_lengthways[0] = FixedMul(FINESINE(fa), -radius); - unit_lengthways[2] = FixedMul(FINECOSINE(fa), -radius); + unit_lengthways.x = FixedMul(FINESINE(fa), -radius); + unit_lengthways.z = FixedMul(FINECOSINE(fa), -radius); } // Rotating Chain. else @@ -6554,15 +6562,16 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) if (!(prevfa > (FINEMASK/2)) && (fa > (FINEMASK/2))) // completed a full swing dosound = true; - unit_lengthways[0] = FixedMul(FINECOSINE(fa), radius); - unit_lengthways[2] = FixedMul(FINESINE(fa), radius); + unit_lengthways.x = FixedMul(FINECOSINE(fa), radius); + unit_lengthways.z = FixedMul(FINESINE(fa), radius); } // Calculate the angle matrixes for the link. - res = VectorMatrixMultiply(unit_lengthways, *RotateXMatrix(center->threshold << ANGLETOFINESHIFT)); - M_Memcpy(&unit_lengthways, res, sizeof(unit_lengthways)); - res = VectorMatrixMultiply(unit_lengthways, *RotateZMatrix(center->angle)); - M_Memcpy(&unit_lengthways, res, sizeof(unit_lengthways)); + FM_RotateX(&m, center->threshold << ANGLETOFINESHIFT); + FV4_Copy(&unit_lengthways, FM_MultMatrixVec4(&m, &unit_lengthways, &res)); + + FM_RotateZ(&m, center->angle); + FV4_Copy(&unit_lengthways, FM_MultMatrixVec4(&m, &unit_lengthways, &res)); lastthreshold = mobj->threshold; lastfriction = mobj->friction; @@ -6574,63 +6583,64 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) dosound = false; } - if (pos_sideways[3] != mobj->movefactor) + if (pos_sideways.a != mobj->movefactor) { - if (!unit_sideways[3]) + if (!unit_sideways.a) { - unit_sideways[1] = dist; - unit_sideways[0] = unit_sideways[2] = 0; - unit_sideways[3] = FRACUNIT; + unit_sideways.y = dist; + unit_sideways.x = unit_sideways.z = 0; + unit_sideways.a = FRACUNIT; - res = VectorMatrixMultiply(unit_sideways, *RotateXMatrix(center->threshold << ANGLETOFINESHIFT)); - M_Memcpy(&unit_sideways, res, sizeof(unit_sideways)); - res = VectorMatrixMultiply(unit_sideways, *RotateZMatrix(center->angle)); - M_Memcpy(&unit_sideways, res, sizeof(unit_sideways)); + FM_RotateX(&m, center->threshold << ANGLETOFINESHIFT); + FV4_Copy(&unit_sideways, FM_MultMatrixVec4(&m, &unit_sideways, &res)); + + FM_RotateZ(&m, center->angle); + FV4_Copy(&unit_sideways, FM_MultMatrixVec4(&m, &unit_sideways, &res)); } - if (pos_sideways[3] > mobj->movefactor) + if (pos_sideways.a > mobj->movefactor) { do { - pos_sideways[0] -= unit_sideways[0]; - pos_sideways[1] -= unit_sideways[1]; - pos_sideways[2] -= unit_sideways[2]; + pos_sideways.x -= unit_sideways.x; + pos_sideways.y -= unit_sideways.y; + pos_sideways.z -= unit_sideways.z; } - while ((--pos_sideways[3]) != mobj->movefactor); + while ((--pos_sideways.a) != mobj->movefactor); } else { do { - pos_sideways[0] += unit_sideways[0]; - pos_sideways[1] += unit_sideways[1]; - pos_sideways[2] += unit_sideways[2]; + pos_sideways.x += unit_sideways.x; + pos_sideways.y += unit_sideways.y; + pos_sideways.z += unit_sideways.z; } - while ((++pos_sideways[3]) != mobj->movefactor); + while ((++pos_sideways.a) != mobj->movefactor); } } hnext = mobj->hnext; // just in case the mobj is removed - if (pos_lengthways[3] > mobj->movecount) + if (pos_lengthways.a > mobj->movecount) { do { - pos_lengthways[0] -= unit_lengthways[0]; - pos_lengthways[1] -= unit_lengthways[1]; - pos_lengthways[2] -= unit_lengthways[2]; + pos_lengthways.x -= unit_lengthways.x; + pos_lengthways.y -= unit_lengthways.y; + pos_lengthways.z -= unit_lengthways.z; } - while ((--pos_lengthways[3]) != mobj->movecount); + while ((--pos_lengthways.a) != mobj->movecount); } - else if (pos_lengthways[3] < mobj->movecount) + else if (pos_lengthways.a < mobj->movecount) { do { - pos_lengthways[0] += unit_lengthways[0]; - pos_lengthways[1] += unit_lengthways[1]; - pos_lengthways[2] += unit_lengthways[2]; + pos_lengthways.x += unit_lengthways.x; + pos_lengthways.y += unit_lengthways.y; + pos_lengthways.z += unit_lengthways.z; } - while ((++pos_lengthways[3]) != mobj->movecount); + while ((++pos_lengthways.a) != mobj->movecount); } P_UnsetThingPosition(mobj); @@ -6640,17 +6650,17 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) mobj->z = center->z; // Add on the appropriate distances to the center's co-ordinates. - if (pos_lengthways[3]) + if (pos_lengthways.a) { - mobj->x += pos_lengthways[0]; - mobj->y += pos_lengthways[1]; - zstore = pos_lengthways[2] + pos_sideways[2]; + mobj->x += pos_lengthways.x; + mobj->y += pos_lengthways.y; + zstore = pos_lengthways.z + pos_sideways.z; } else - zstore = pos_sideways[2]; + zstore = pos_sideways.z; - mobj->x += pos_sideways[0]; - mobj->y += pos_sideways[1]; + mobj->x += pos_sideways.x; + mobj->y += pos_sideways.y; // Cut the height to align the link with the axis. if (mobj->type == MT_SMALLMACECHAIN || mobj->type == MT_BIGMACECHAIN || mobj->type == MT_SMALLGRABCHAIN || mobj->type == MT_BIGGRABCHAIN) @@ -6668,7 +6678,7 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) P_SetThingPosition(mobj); #if 0 // toaster's height-clipping dealie! - if (!pos_lengthways[3] || P_MobjWasRemoved(mobj) || (mobj->flags & MF_NOCLIPHEIGHT)) + if (!pos_lengthways.a || P_MobjWasRemoved(mobj) || (mobj->flags & MF_NOCLIPHEIGHT)) goto cont; if ((fa = ((center->threshold & (FINEMASK/2)) << ANGLETOFINESHIFT)) > ANGLE_45 && fa < ANGLE_135) // only move towards center when the motion is towards/away from the ground, rather than alongside it @@ -6688,8 +6698,8 @@ void P_MaceRotate(mobj_t *center, INT32 baserot, INT32 baseprevrot) P_UnsetThingPosition(mobj); - mobj->x -= FixedMul(unit_lengthways[0], zstore); - mobj->y -= FixedMul(unit_lengthways[1], zstore); + mobj->x -= FixedMul(unit_lengthways.x, zstore); + mobj->y -= FixedMul(unit_lengthways.y, zstore); P_SetThingPosition(mobj); @@ -13342,13 +13352,13 @@ void P_SpawnHoop(mapthing_t *mthing) mobj_t *mobj = NULL; mobj_t *nextmobj = NULL; mobj_t *hoopcenter; - TMatrix *pitchmatrix, *yawmatrix; + matrix_t pitchmatrix, yawmatrix; fixed_t radius = mthing->args[0] << FRACBITS; fixed_t sizefactor = 4*FRACUNIT; fixed_t hoopsize = radius/sizefactor; INT32 i; angle_t fa; - TVector v, *res; + vector4_t v, res; fixed_t x = mthing->x << FRACBITS; fixed_t y = mthing->y << FRACBITS; fixed_t z = P_GetMobjSpawnHeight(MT_HOOP, x, y, mthing->z << FRACBITS, 0, false, mthing->scale); @@ -13363,9 +13373,9 @@ void P_SpawnHoop(mapthing_t *mthing) P_SetThingPosition(hoopcenter); hoopcenter->movedir = mthing->pitch; - pitchmatrix = RotateXMatrix(FixedAngle(hoopcenter->movedir << FRACBITS)); + FM_RotateX(&pitchmatrix, FixedAngle(hoopcenter->movedir << FRACBITS)); hoopcenter->movecount = mthing->angle; - yawmatrix = RotateZMatrix(FixedAngle(hoopcenter->movecount << FRACBITS)); + FM_RotateZ(&yawmatrix, FixedAngle(hoopcenter->movecount << FRACBITS)); // For the hoop when it flies away hoopcenter->extravalue1 = hoopsize; @@ -13375,17 +13385,15 @@ void P_SpawnHoop(mapthing_t *mthing) for (i = 0; i < hoopsize; i++) { fa = i*(FINEANGLES/hoopsize); - v[0] = FixedMul(FINECOSINE(fa), radius); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa), radius); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa), radius); + v.y = 0; + v.z = FixedMul(FINESINE(fa), radius); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *pitchmatrix); - M_Memcpy(&v, res, sizeof(v)); - res = VectorMatrixMultiply(v, *yawmatrix); - M_Memcpy(&v, res, sizeof(v)); + FV4_Copy(&v, FM_MultMatrixVec4(&pitchmatrix, &v, &res)); + FV4_Copy(&v, FM_MultMatrixVec4(&yawmatrix, &v, &res)); - mobj = P_SpawnMobj(x + v[0], y + v[1], z + v[2], MT_HOOP); + mobj = P_SpawnMobj(x + v.x, y + v.y, z + v.z, MT_HOOP); mobj->z -= mobj->height/2; if (maptol & TOL_XMAS) @@ -13421,17 +13429,15 @@ void P_SpawnHoop(mapthing_t *mthing) for (i = 0; i < hoopsize; i++) { fa = i*(FINEANGLES/hoopsize); - v[0] = FixedMul(FINECOSINE(fa), radius); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa), radius); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa), radius); + v.y = 0; + v.z = FixedMul(FINESINE(fa), radius); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *pitchmatrix); - M_Memcpy(&v, res, sizeof(v)); - res = VectorMatrixMultiply(v, *yawmatrix); - M_Memcpy(&v, res, sizeof(v)); + FV4_Copy(&v, FM_MultMatrixVec4(&pitchmatrix, &v, &res)); + FV4_Copy(&v, FM_MultMatrixVec4(&yawmatrix, &v, &res)); - mobj = P_SpawnMobj(x + v[0], y + v[1], z + v[2], MT_HOOPCOLLIDE); + mobj = P_SpawnMobj(x + v.x, y + v.y, z + v.z, MT_HOOPCOLLIDE); mobj->z -= mobj->height/2; // Link all the collision sprites together. @@ -13522,7 +13528,8 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n angle_t angle = FixedAngle(mthing->angle << FRACBITS); angle_t fa; INT32 i; - TVector v, *res; + matrix_t m; + vector4_t v, res; for (i = 0; i < numitemtypes; i++) { @@ -13550,15 +13557,15 @@ static void P_SpawnItemCircle(mapthing_t *mthing, mobjtype_t *itemtypes, UINT8 n dummything.type = mobjinfo[itemtype].doomednum; fa = i*FINEANGLES/numitems; - v[0] = FixedMul(FINECOSINE(fa), size); - v[1] = 0; - v[2] = FixedMul(FINESINE(fa), size); - v[3] = FRACUNIT; + v.x = FixedMul(FINECOSINE(fa), size); + v.y = 0; + v.z = FixedMul(FINESINE(fa), size); + v.a = FRACUNIT; - res = VectorMatrixMultiply(v, *RotateZMatrix(angle)); - M_Memcpy(&v, res, sizeof(v)); + FM_RotateZ(&m, angle); + FV4_Copy(&v, FM_MultMatrixVec4(&m, &v, &res)); - mobj = P_SpawnMobjFromMapThing(&dummything, x + v[0], y + v[1], z + v[2], itemtype); + mobj = P_SpawnMobjFromMapThing(&dummything, x + v.x, y + v.y, z + v.z, itemtype); if (!mobj) continue; diff --git a/src/p_saveg.c b/src/p_saveg.c index 668ca08f0..07b3d8640 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -915,7 +915,7 @@ static boolean CheckFFloorDiff(const sector_t *ss) for (rover = ss->ffloors; rover; rover = rover->next) { - if (rover->flags != rover->spawnflags + if (rover->fofflags != rover->spawnflags || rover->alpha != rover->spawnalpha) { return true; // we found an FOF that changed! @@ -935,7 +935,7 @@ static void ArchiveFFloors(const sector_t *ss) for (rover = ss->ffloors; rover; rover = rover->next) { fflr_diff = 0; // reset diff flags - if (rover->flags != rover->spawnflags) + if (rover->fofflags != rover->spawnflags) fflr_diff |= FD_FLAGS; if (rover->alpha != rover->spawnalpha) fflr_diff |= FD_ALPHA; @@ -945,7 +945,7 @@ static void ArchiveFFloors(const sector_t *ss) WRITEUINT16(save_p, j); // save ffloor "number" WRITEUINT8(save_p, fflr_diff); if (fflr_diff & FD_FLAGS) - WRITEUINT32(save_p, rover->flags); + WRITEUINT32(save_p, rover->fofflags); if (fflr_diff & FD_ALPHA) WRITEINT16(save_p, rover->alpha); } @@ -983,7 +983,7 @@ static void UnArchiveFFloors(const sector_t *ss) fflr_diff = READUINT8(save_p); if (fflr_diff & FD_FLAGS) - rover->flags = READUINT32(save_p); + rover->fofflags = READUINT32(save_p); if (fflr_diff & FD_ALPHA) rover->alpha = READINT16(save_p); diff --git a/src/p_setup.c b/src/p_setup.c index 083b8f236..ba432c13d 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -2111,31 +2111,31 @@ static void P_WriteTextmap(void) case 1: TAG_ITER_SECTORS(Tag_FGet(&wlines[i].tags), s) { - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d applies custom gravity to sector %d. Changes to this gravity at runtime will not be reflected in the converted map. Use linedef type 469 for this.\n"), i, s); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s applies custom gravity to sector %d. Changes to this gravity at runtime will not be reflected in the converted map. Use linedef type 469 for this.\n"), sizeu1(i), s); wsectors[s].gravity = FixedDiv(lines[i].frontsector->floorheight >> FRACBITS, 1000); } break; case 2: - CONS_Alert(CONS_WARNING, M_GetText("Custom exit linedef %d detected. Changes to the next map at runtime will not be reflected in the converted map. Use linedef type 468 for this.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Custom exit linedef %s detected. Changes to the next map at runtime will not be reflected in the converted map. Use linedef type 468 for this.\n"), sizeu1(i)); wlines[i].args[0] = lines[i].frontsector->floorheight >> FRACBITS; wlines[i].args[2] = lines[i].frontsector->ceilingheight >> FRACBITS; break; case 5: case 50: case 51: - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has type %d, which is not supported in UDMF.\n"), i, wlines[i].special); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has type %d, which is not supported in UDMF.\n"), sizeu1(i), wlines[i].special); break; case 61: if (wlines[i].flags & ML_MIDSOLID) continue; if (!wlines[i].args[1]) continue; - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d with crusher type 61 rises twice as fast on spawn. This behavior is not supported in UDMF.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s with crusher type 61 rises twice as fast on spawn. This behavior is not supported in UDMF.\n"), sizeu1(i)); break; case 76: if (freetag == (mtag_t)MAXTAGS) { - CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 76 cannot be converted.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 76 cannot be converted.\n"), sizeu1(i)); break; } TAG_ITER_SECTORS(wlines[i].args[0], s) @@ -2150,10 +2150,10 @@ static void P_WriteTextmap(void) freetag = Tag_NextUnused(freetag); break; case 259: - if (wlines[i].args[3] & FF_QUICKSAND) - CONS_Alert(CONS_WARNING, M_GetText("Quicksand properties of custom FOF on linedef %d cannot be converted. Use linedef type 75 instead.\n"), i); - if (wlines[i].args[3] & FF_BUSTUP) - CONS_Alert(CONS_WARNING, M_GetText("Bustable properties of custom FOF on linedef %d cannot be converted. Use linedef type 74 instead.\n"), i); + if (wlines[i].args[3] & FOF_QUICKSAND) + CONS_Alert(CONS_WARNING, M_GetText("Quicksand properties of custom FOF on linedef %s cannot be converted. Use linedef type 75 instead.\n"), sizeu1(i)); + if (wlines[i].args[3] & FOF_BUSTUP) + CONS_Alert(CONS_WARNING, M_GetText("Bustable properties of custom FOF on linedef %s cannot be converted. Use linedef type 74 instead.\n"), sizeu1(i)); break; case 412: if ((s = Tag_Iterate_Sectors(wlines[i].args[0], 0)) < 0) @@ -2162,7 +2162,7 @@ static void P_WriteTextmap(void) break; if (freetag == (mtag_t)MAXTAGS) { - CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 412 cannot be converted.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 412 cannot be converted.\n"), sizeu1(i)); break; } Tag_Add(&specialthings[s].teleport->tags, freetag); @@ -2176,7 +2176,7 @@ static void P_WriteTextmap(void) break; if (freetag == (mtag_t)MAXTAGS) { - CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 422 cannot be converted.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 422 cannot be converted.\n"), sizeu1(i)); break; } Tag_Add(&specialthings[s].altview->tags, freetag); @@ -2185,14 +2185,14 @@ static void P_WriteTextmap(void) freetag = Tag_NextUnused(freetag); break; case 447: - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has change colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has change colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), sizeu1(i)); if (wlines[i].flags & ML_TFERLINE) - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d mixes front and back colormaps, which is not supported in UDMF. Copy one colormap to the target sector first, then mix in the second one.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s mixes front and back colormaps, which is not supported in UDMF. Copy one colormap to the target sector first, then mix in the second one.\n"), sizeu1(i)); break; case 455: - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has fade colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has fade colormap action, which cannot be converted automatically. Tag arg0 to a sector with the desired colormap.\n"), sizeu1(i)); if (wlines[i].flags & ML_TFERLINE) - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d specifies starting colormap for the fade, which is not supported in UDMF. Change the colormap with linedef type 447 instead.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s specifies starting colormap for the fade, which is not supported in UDMF. Change the colormap with linedef type 447 instead.\n"), sizeu1(i)); break; case 457: if ((s = Tag_Iterate_Sectors(wlines[i].args[0], 0)) < 0) @@ -2201,7 +2201,7 @@ static void P_WriteTextmap(void) break; if (freetag == (mtag_t)MAXTAGS) { - CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 457 cannot be converted.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 457 cannot be converted.\n"), sizeu1(i)); break; } Tag_Add(&specialthings[s].angleanchor->tags, freetag); @@ -2224,7 +2224,7 @@ static void P_WriteTextmap(void) wsectors[s].extra_colormap = wsides[wlines[i].sidenum[0]].colormap_data; if (freetag == (mtag_t)MAXTAGS) { - CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %d with type 606 cannot be converted.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("No unused tag found. Linedef %s with type 606 cannot be converted.\n"), sizeu1(i)); break; } Tag_Add(&wsectors[s].tags, freetag); @@ -2239,23 +2239,23 @@ static void P_WriteTextmap(void) } if (wlines[i].special >= 300 && wlines[i].special < 400 && wlines[i].flags & ML_WRAPMIDTEX) - CONS_Alert(CONS_WARNING, M_GetText("Linedef executor trigger linedef %d has disregard order flag, which is not supported in UDMF.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef executor trigger linedef %s has disregard order flag, which is not supported in UDMF.\n"), sizeu1(i)); } for (i = 0; i < numsectors; i++) { if (Tag_Find(&wsectors[i].tags, LE_CAPSULE0)) - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), i, LE_CAPSULE0); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), sizeu1(i), LE_CAPSULE0); if (Tag_Find(&wsectors[i].tags, LE_CAPSULE1)) - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), i, LE_CAPSULE1); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), sizeu1(i), LE_CAPSULE1); if (Tag_Find(&wsectors[i].tags, LE_CAPSULE2)) - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), i, LE_CAPSULE2); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has reserved tag %d, which is not supported in UDMF. Use arg3 of the boss mapthing instead.\n"), sizeu1(i), LE_CAPSULE2); switch (GETSECSPECIAL(wsectors[i].special, 1)) { case 9: case 10: - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has ring drainer effect, which is not supported in UDMF. Use linedef type 462 instead.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has ring drainer effect, which is not supported in UDMF. Use linedef type 462 instead.\n"), sizeu1(i)); break; default: break; @@ -2264,13 +2264,13 @@ static void P_WriteTextmap(void) switch (GETSECSPECIAL(wsectors[i].special, 2)) { case 6: - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has emerald check trigger type, which is not supported in UDMF. Use linedef types 337-339 instead.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has emerald check trigger type, which is not supported in UDMF. Use linedef types 337-339 instead.\n"), sizeu1(i)); break; case 7: - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has NiGHTS mare trigger type, which is not supported in UDMF. Use linedef types 340-342 instead.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has NiGHTS mare trigger type, which is not supported in UDMF. Use linedef types 340-342 instead.\n"), sizeu1(i)); break; case 9: - CONS_Alert(CONS_WARNING, M_GetText("Sector %d has Egg Capsule type, which is not supported in UDMF. Use linedef type 464 instead.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Sector %s has Egg Capsule type, which is not supported in UDMF. Use linedef type 464 instead.\n"), sizeu1(i)); break; default: break; @@ -2280,7 +2280,7 @@ static void P_WriteTextmap(void) fprintf(f, "namespace = \"srb2\";\n"); for (i = 0; i < nummapthings; i++) { - fprintf(f, "thing // %d\n", i); + fprintf(f, "thing // %s\n", sizeu1(i)); fprintf(f, "{\n"); firsttag = Tag_FGet(&wmapthings[i].tags); if (firsttag != 0) @@ -2313,17 +2313,17 @@ static void P_WriteTextmap(void) fprintf(f, "flip = true;\n"); for (j = 0; j < NUMMAPTHINGARGS; j++) if (wmapthings[i].args[j] != 0) - fprintf(f, "arg%d = %d;\n", j, wmapthings[i].args[j]); + fprintf(f, "arg%s = %d;\n", sizeu1(j), wmapthings[i].args[j]); for (j = 0; j < NUMMAPTHINGSTRINGARGS; j++) if (mapthings[i].stringargs[j]) - fprintf(f, "stringarg%d = \"%s\";\n", j, mapthings[i].stringargs[j]); + fprintf(f, "stringarg%s = \"%s\";\n", sizeu1(j), mapthings[i].stringargs[j]); fprintf(f, "}\n"); fprintf(f, "\n"); } for (i = 0; i < numvertexes; i++) { - fprintf(f, "vertex // %d\n", i); + fprintf(f, "vertex // %s\n", sizeu1(i)); fprintf(f, "{\n"); fprintf(f, "x = %f;\n", FIXED_TO_FLOAT(wvertexes[i].x)); fprintf(f, "y = %f;\n", FIXED_TO_FLOAT(wvertexes[i].y)); @@ -2337,10 +2337,10 @@ static void P_WriteTextmap(void) for (i = 0; i < numlines; i++) { - fprintf(f, "linedef // %d\n", i); + fprintf(f, "linedef // %s\n", sizeu1(i)); fprintf(f, "{\n"); - fprintf(f, "v1 = %d;\n", wlines[i].v1 - vertexes); - fprintf(f, "v2 = %d;\n", wlines[i].v2 - vertexes); + fprintf(f, "v1 = %s;\n", sizeu1(wlines[i].v1 - vertexes)); + fprintf(f, "v2 = %s;\n", sizeu1(wlines[i].v2 - vertexes)); fprintf(f, "sidefront = %d;\n", wlines[i].sidenum[0]); if (wlines[i].sidenum[1] != 0xffff) fprintf(f, "sideback = %d;\n", wlines[i].sidenum[1]); @@ -2362,10 +2362,10 @@ static void P_WriteTextmap(void) fprintf(f, "special = %d;\n", wlines[i].special); for (j = 0; j < NUMLINEARGS; j++) if (wlines[i].args[j] != 0) - fprintf(f, "arg%d = %d;\n", j, wlines[i].args[j]); + fprintf(f, "arg%s = %d;\n", sizeu1(j), wlines[i].args[j]); for (j = 0; j < NUMLINESTRINGARGS; j++) if (lines[i].stringargs[j]) - fprintf(f, "stringarg%d = \"%s\";\n", j, lines[i].stringargs[j]); + fprintf(f, "stringarg%s = \"%s\";\n", sizeu1(j), lines[i].stringargs[j]); if (wlines[i].alpha != FRACUNIT) fprintf(f, "alpha = %f;\n", FIXED_TO_FLOAT(wlines[i].alpha)); if (wlines[i].blendmode != AST_COPY) @@ -2393,7 +2393,7 @@ static void P_WriteTextmap(void) } if (wlines[i].executordelay != 0 && wlines[i].backsector) { - CONS_Alert(CONS_WARNING, M_GetText("Linedef %d has an executor delay. Changes to the delay at runtime will not be reflected in the converted map. Use linedef type 465 for this.\n"), i); + CONS_Alert(CONS_WARNING, M_GetText("Linedef %s has an executor delay. Changes to the delay at runtime will not be reflected in the converted map. Use linedef type 465 for this.\n"), sizeu1(i)); fprintf(f, "executordelay = %d;\n", (wlines[i].backsector->ceilingheight >> FRACBITS) + (wlines[i].backsector->floorheight >> FRACBITS)); } if (wlines[i].flags & ML_IMPASSIBLE) @@ -2432,9 +2432,9 @@ static void P_WriteTextmap(void) for (i = 0; i < numsides; i++) { - fprintf(f, "sidedef // %d\n", i); + fprintf(f, "sidedef // %s\n", sizeu1(i)); fprintf(f, "{\n"); - fprintf(f, "sector = %d;\n", wsides[i].sector - sectors); + fprintf(f, "sector = %s;\n", sizeu1(wsides[i].sector - sectors)); if (wsides[i].textureoffset != 0) fprintf(f, "offsetx = %d;\n", wsides[i].textureoffset >> FRACBITS); if (wsides[i].rowoffset != 0) @@ -2453,7 +2453,7 @@ static void P_WriteTextmap(void) for (i = 0; i < numsectors; i++) { - fprintf(f, "sector // %d\n", i); + fprintf(f, "sector // %s\n", sizeu1(i)); fprintf(f, "{\n"); fprintf(f, "heightfloor = %d;\n", wsectors[i].floorheight >> FRACBITS); fprintf(f, "heightceiling = %d;\n", wsectors[i].ceilingheight >> FRACBITS); @@ -3263,7 +3263,7 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype linenum = (nodetype == NT_XGL3) ? READUINT32((*data)) : READUINT16((*data)); if (linenum != 0xFFFF && linenum >= numlines) - I_Error("P_LoadExtendedSubsectorsAndSegs: Seg %s in subsector %d has invalid linedef %d!\n", sizeu1(k), i, linenum); + I_Error("P_LoadExtendedSubsectorsAndSegs: Seg %s in subsector %s has invalid linedef %d!\n", sizeu1(k), sizeu2(i), linenum); segs[k].glseg = (linenum == 0xFFFF); segs[k].linedef = (linenum == 0xFFFF) ? NULL : &lines[linenum]; segs[k].side = READUINT8((*data)); @@ -3272,7 +3272,7 @@ static boolean P_LoadExtendedSubsectorsAndSegs(UINT8 **data, nodetype_t nodetype { subsectors[i].firstline++; if (subsectors[i].firstline == k) - I_Error("P_LoadExtendedSubsectorsAndSegs: Subsector %d does not have any valid segs!", i); + I_Error("P_LoadExtendedSubsectorsAndSegs: Subsector %s does not have any valid segs!", sizeu1(i)); } break; @@ -3989,6 +3989,81 @@ static void P_SetBinaryFOFAlpha(line_t *line) } } +static INT32 P_GetFOFFlags(INT32 oldflags) +{ + INT32 result = 0; + if (oldflags & FF_OLD_EXISTS) + result |= FOF_EXISTS; + if (oldflags & FF_OLD_BLOCKPLAYER) + result |= FOF_BLOCKPLAYER; + if (oldflags & FF_OLD_BLOCKOTHERS) + result |= FOF_BLOCKOTHERS; + if (oldflags & FF_OLD_RENDERSIDES) + result |= FOF_RENDERSIDES; + if (oldflags & FF_OLD_RENDERPLANES) + result |= FOF_RENDERPLANES; + if (oldflags & FF_OLD_SWIMMABLE) + result |= FOF_SWIMMABLE; + if (oldflags & FF_OLD_NOSHADE) + result |= FOF_NOSHADE; + if (oldflags & FF_OLD_CUTSOLIDS) + result |= FOF_CUTSOLIDS; + if (oldflags & FF_OLD_CUTEXTRA) + result |= FOF_CUTEXTRA; + if (oldflags & FF_OLD_CUTSPRITES) + result |= FOF_CUTSPRITES; + if (oldflags & FF_OLD_BOTHPLANES) + result |= FOF_BOTHPLANES; + if (oldflags & FF_OLD_EXTRA) + result |= FOF_EXTRA; + if (oldflags & FF_OLD_TRANSLUCENT) + result |= FOF_TRANSLUCENT; + if (oldflags & FF_OLD_FOG) + result |= FOF_FOG; + if (oldflags & FF_OLD_INVERTPLANES) + result |= FOF_INVERTPLANES; + if (oldflags & FF_OLD_ALLSIDES) + result |= FOF_ALLSIDES; + if (oldflags & FF_OLD_INVERTSIDES) + result |= FOF_INVERTSIDES; + if (oldflags & FF_OLD_DOUBLESHADOW) + result |= FOF_DOUBLESHADOW; + if (oldflags & FF_OLD_FLOATBOB) + result |= FOF_FLOATBOB; + if (oldflags & FF_OLD_NORETURN) + result |= FOF_NORETURN; + if (oldflags & FF_OLD_CRUMBLE) + result |= FOF_CRUMBLE; + if (oldflags & FF_OLD_GOOWATER) + result |= FOF_GOOWATER; + if (oldflags & FF_OLD_MARIO) + result |= FOF_MARIO; + if (oldflags & FF_OLD_BUSTUP) + result |= FOF_BUSTUP; + if (oldflags & FF_OLD_QUICKSAND) + result |= FOF_QUICKSAND; + if (oldflags & FF_OLD_PLATFORM) + result |= FOF_PLATFORM; + if (oldflags & FF_OLD_REVERSEPLATFORM) + result |= FOF_REVERSEPLATFORM; + if (oldflags & FF_OLD_RIPPLE) + result |= FOF_RIPPLE; + if (oldflags & FF_OLD_COLORMAPONLY) + result |= FOF_COLORMAPONLY; + return result; +} + +static INT32 P_GetFOFBusttype(INT32 oldflags) +{ + if (oldflags & FF_OLD_SHATTER) + return TMFB_TOUCH; + if (oldflags & FF_OLD_SPINBUST) + return TMFB_SPIN; + if (oldflags & FF_OLD_STRONGBUST) + return TMFB_STRONG; + return TMFB_REGULAR; +} + static void P_ConvertBinaryLinedefTypes(void) { size_t i; @@ -4637,17 +4712,19 @@ static void P_ConvertBinaryLinedefTypes(void) I_Error("Custom FOF (tag %d) found without a linedef back side!", tag); lines[i].args[0] = tag; - lines[i].args[3] = sides[lines[i].sidenum[1]].toptexture; + lines[i].args[3] = P_GetFOFFlags(sides[lines[i].sidenum[1]].toptexture); if (lines[i].flags & ML_EFFECT6) - lines[i].args[3] |= FF_SPLAT; - lines[i].args[4] = sides[lines[i].sidenum[1]].midtexture; - if (lines[i].args[3] & FF_TRANSLUCENT) + lines[i].args[3] |= FOF_SPLAT; + lines[i].args[4] = P_GetFOFBusttype(sides[lines[i].sidenum[1]].toptexture); + if (sides[lines[i].sidenum[1]].toptexture & FF_OLD_SHATTERBOTTOM) + lines[i].args[4] |= TMFB_ONLYBOTTOM; + if (lines[i].args[3] & FOF_TRANSLUCENT) { P_SetBinaryFOFAlpha(&lines[i]); //Replicate old hack: Translucent FOFs set to full opacity cut cyan pixels if (lines[i].args[1] == 256) - lines[i].args[3] |= FF_SPLAT; + lines[i].args[3] |= FOF_SPLAT; } else lines[i].args[1] = 255; @@ -5198,6 +5275,7 @@ static void P_ConvertBinaryLinedefTypes(void) lines[i].args[0] = tag; lines[i].args[1] = TMSD_FRONTBACK; lines[i].args[2] = !!(lines[i].flags & ML_NOCLIMB); + lines[i].args[3] = !!(lines[i].flags & ML_EFFECT6); break; case 441: //Condition set trigger lines[i].args[0] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; @@ -5359,7 +5437,7 @@ static void P_ConvertBinaryLinedefTypes(void) lines[i].args[0] = tag; lines[i].args[1] = sides[lines[i].sidenum[0]].textureoffset >> FRACBITS; lines[i].args[2] = sides[lines[i].sidenum[0]].rowoffset >> FRACBITS; - lines[i].args[3] = (lines[i].sidenum[1] != 0xffff) ? sides[lines[i].sidenum[1]].rowoffset >> FRACBITS : 0; + lines[i].args[3] = (lines[i].sidenum[1] != 0xffff) ? sides[lines[i].sidenum[1]].textureoffset >> FRACBITS : 0; lines[i].args[4] = !!(lines[i].flags & ML_NOSKEW); break; case 459: //Control text prompt @@ -5846,7 +5924,7 @@ static void P_ConvertBinarySectorTypes(void) if (line->flags & ML_BLOCKMONSTERS) continue; - if (line->special == 120 || (line->special == 259 && (line->args[2] & FF_SWIMMABLE))) + if (line->special == 120 || (line->special == 259 && (line->args[2] & FOF_SWIMMABLE))) { isLava = true; break; @@ -6318,7 +6396,7 @@ static void P_ConvertBinaryThingTypes(void) if (j == -1) { - CONS_Debug(DBG_GAMELOGIC, "Particle generator (mapthing #%d) needs to be tagged to a #15 parameter line (trying to find tag %d).\n", i, mapthings[i].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(i), mapthings[i].angle); break; } mapthings[i].args[0] = mapthings[i].z; diff --git a/src/p_sight.c b/src/p_sight.c index 1aa231a6c..4023744dc 100644 --- a/src/p_sight.c +++ b/src/p_sight.c @@ -306,8 +306,8 @@ static boolean P_CrossSubsector(size_t num, register los_t *los) // check front sector's FOFs first for (rover = front->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) - || !(rover->flags & FF_RENDERSIDES) || (rover->flags & (FF_TRANSLUCENT|FF_FOG))) + if (!(rover->fofflags & FOF_EXISTS) + || !(rover->fofflags & FOF_RENDERSIDES) || (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG))) { continue; } @@ -322,8 +322,8 @@ static boolean P_CrossSubsector(size_t num, register los_t *los) // check back sector's FOFs as well for (rover = back->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) - || !(rover->flags & FF_RENDERSIDES) || (rover->flags & (FF_TRANSLUCENT|FF_FOG))) + if (!(rover->fofflags & FOF_EXISTS) + || !(rover->fofflags & FOF_RENDERSIDES) || (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG))) { continue; } @@ -451,8 +451,8 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2) // Allow sight through water, fog, etc. /// \todo Improve by checking fog density/translucency /// and setting a sight limit. - if (!(rover->flags & FF_EXISTS) - || !(rover->flags & FF_RENDERPLANES) || (rover->flags & (FF_TRANSLUCENT|FF_FOG))) + if (!(rover->fofflags & FOF_EXISTS) + || !(rover->fofflags & FOF_RENDERPLANES) || (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG))) { continue; } @@ -470,10 +470,10 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2) return false; } - if (rover->flags & FF_SOLID) + if (rover->fofflags & FOF_SOLID) continue; // shortcut since neither mobj can be inside the 3dfloor - if (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES)) + if (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES)) { if (los.sightzstart >= topz1 && t2->z + t2->height < topz2) return false; // blocked by upper outside plane @@ -482,7 +482,7 @@ boolean P_CheckSight(mobj_t *t1, mobj_t *t2) return false; // blocked by lower outside plane } - if (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES) + if (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES) { if (los.sightzstart < topz1 && t2->z >= topz2) return false; // blocked by upper inside plane diff --git a/src/p_slopes.c b/src/p_slopes.c index 7fa51452e..6048f478d 100644 --- a/src/p_slopes.c +++ b/src/p_slopes.c @@ -94,10 +94,14 @@ static void ReconfigureViaVertexes (pslope_t *slope, const vector3_t v1, const v static void ReconfigureViaConstants (pslope_t *slope, const fixed_t a, const fixed_t b, const fixed_t c, const fixed_t d) { fixed_t m; + fixed_t o = 0; vector3_t *normal = &slope->normal; + if (c) + o = abs(c) <= FRACUNIT ? -FixedMul(d, FixedDiv(FRACUNIT, c)) : -FixedDiv(d, c); + // Set origin. - FV3_Load(&slope->o, 0, 0, c ? -FixedDiv(d, c) : 0); + FV3_Load(&slope->o, 0, 0, o); // Get slope's normal. FV3_Load(normal, a, b, c); diff --git a/src/p_spec.c b/src/p_spec.c index 78878de1d..8920c6a34 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2886,7 +2886,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) case 439: // Set texture { size_t linenum; - side_t *set = &sides[line->sidenum[0]], *this; + side_t *setfront = &sides[line->sidenum[0]]; + side_t *setback = (line->args[3] && line->sidenum[1] != 0xffff) ? &sides[line->sidenum[1]] : setfront; + side_t *this; boolean always = !(line->args[2]); // If args[2] is set: Only change mid texture if mid texture already exists on tagged lines, etc. for (linenum = 0; linenum < numlines; linenum++) @@ -2901,18 +2903,18 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) if (line->args[1] != TMSD_BACK) { this = &sides[lines[linenum].sidenum[0]]; - if (always || this->toptexture) this->toptexture = set->toptexture; - if (always || this->midtexture) this->midtexture = set->midtexture; - if (always || this->bottomtexture) this->bottomtexture = set->bottomtexture; + if (always || this->toptexture) this->toptexture = setfront->toptexture; + if (always || this->midtexture) this->midtexture = setfront->midtexture; + if (always || this->bottomtexture) this->bottomtexture = setfront->bottomtexture; } // Back side if (line->args[1] != TMSD_FRONT && lines[linenum].sidenum[1] != 0xffff) { this = &sides[lines[linenum].sidenum[1]]; - if (always || this->toptexture) this->toptexture = set->toptexture; - if (always || this->midtexture) this->midtexture = set->midtexture; - if (always || this->bottomtexture) this->bottomtexture = set->bottomtexture; + if (always || this->toptexture) this->toptexture = setback->toptexture; + if (always || this->midtexture) this->midtexture = setback->midtexture; + if (always || this->bottomtexture) this->bottomtexture = setback->bottomtexture; } } } @@ -3033,16 +3035,16 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) { foundrover = true; - oldflags = rover->flags; + oldflags = rover->fofflags; // Abracadabra! if (line->args[2]) - rover->flags |= FF_EXISTS; + rover->fofflags |= FOF_EXISTS; else - rover->flags &= ~FF_EXISTS; + rover->fofflags &= ~FOF_EXISTS; // if flags changed, reset sector's light list - if (rover->flags != oldflags) + if (rover->fofflags != oldflags) { sec->moved = true; P_RecalcPrecipInSector(sec); @@ -3059,7 +3061,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) } break; - case 446: // Make block fall remotely (acts like FF_CRUMBLE) + case 446: // Make block fall remotely (acts like FOF_CRUMBLE) { INT16 sectag = (INT16)(line->args[0]); INT16 foftag = (INT16)(line->args[1]); @@ -3092,9 +3094,9 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) foundrover = true; if (line->args[2] & TMFR_CHECKFLAG) // FOF flags determine respawn ability instead? - respawn = !(rover->flags & FF_NORETURN) ^ !!(line->args[2] & TMFR_NORETURN); // TMFR_NORETURN inverts + respawn = !(rover->fofflags & FOF_NORETURN) ^ !!(line->args[2] & TMFR_NORETURN); // TMFR_NORETURN inverts - EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), player, rover->alpha, respawn); + EV_StartCrumble(rover->master->frontsector, rover, (rover->fofflags & FOF_FLOATBOB), player, rover->alpha, respawn); } } @@ -3276,10 +3278,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) // initialize its alpha to 1 // for relative alpha calc if (!(line->args[3] & TMST_DONTDOTRANSLUCENT) && // do translucent - (rover->spawnflags & FF_NOSHADE) && // do not include light blocks, which don't set FF_NOSHADE - !(rover->spawnflags & FF_RENDERSIDES) && - !(rover->spawnflags & FF_RENDERPLANES) && - !(rover->flags & FF_RENDERALL)) + (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE + !(rover->spawnflags & FOF_RENDERSIDES) && + !(rover->spawnflags & FOF_RENDERPLANES) && + !(rover->fofflags & FOF_RENDERALL)) rover->alpha = 1; P_RemoveFakeFloorFader(rover); @@ -3288,8 +3290,8 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) max(1, min(256, (line->args[3] & TMST_RELATIVE) ? rover->alpha + destvalue : destvalue)), 0, // set alpha immediately false, NULL, // tic-based logic - false, // do not handle FF_EXISTS - !(line->args[3] & TMST_DONTDOTRANSLUCENT), // handle FF_TRANSLUCENT + false, // do not handle FOF_EXISTS + !(line->args[3] & TMST_DONTDOTRANSLUCENT), // handle FOF_TRANSLUCENT false, // do not handle lighting false, // do not handle colormap false, // do not handle collision @@ -3349,8 +3351,8 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) speed, (line->args[4] & TMFT_TICBASED), // tic-based logic (line->args[4] & TMFT_RELATIVE), // Relative destvalue - !(line->args[4] & TMFT_DONTDOEXISTS), // do not handle FF_EXISTS - !(line->args[4] & TMFT_DONTDOTRANSLUCENT), // do not handle FF_TRANSLUCENT + !(line->args[4] & TMFT_DONTDOEXISTS), // do not handle FOF_EXISTS + !(line->args[4] & TMFT_DONTDOTRANSLUCENT), // do not handle FOF_TRANSLUCENT !(line->args[4] & TMFT_DONTDOLIGHTING), // do not handle lighting !(line->args[4] & TMFT_DONTDOCOLORMAP), // do not handle colormap !(line->args[4] & TMFT_IGNORECOLLISION), // do not handle collision @@ -3362,10 +3364,10 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) // initialize its alpha to 1 // for relative alpha calc if (!(line->args[4] & TMFT_DONTDOTRANSLUCENT) && // do translucent - (rover->spawnflags & FF_NOSHADE) && // do not include light blocks, which don't set FF_NOSHADE - !(rover->spawnflags & FF_RENDERSIDES) && - !(rover->spawnflags & FF_RENDERPLANES) && - !(rover->flags & FF_RENDERALL)) + (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE + !(rover->spawnflags & FOF_RENDERSIDES) && + !(rover->spawnflags & FOF_RENDERPLANES) && + !(rover->fofflags & FOF_RENDERALL)) rover->alpha = 1; P_RemoveFakeFloorFader(rover); @@ -3374,8 +3376,8 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) max(1, min(256, (line->args[4] & TMFT_RELATIVE) ? rover->alpha + destvalue : destvalue)), 0, // set alpha immediately false, NULL, // tic-based logic - !(line->args[4] & TMFT_DONTDOEXISTS), // do not handle FF_EXISTS - !(line->args[4] & TMFT_DONTDOTRANSLUCENT), // do not handle FF_TRANSLUCENT + !(line->args[4] & TMFT_DONTDOEXISTS), // do not handle FOF_EXISTS + !(line->args[4] & TMFT_DONTDOTRANSLUCENT), // do not handle FOF_TRANSLUCENT !(line->args[4] & TMFT_DONTDOLIGHTING), // do not handle lighting !(line->args[4] & TMFT_DONTDOCOLORMAP), // do not handle colormap !(line->args[4] & TMFT_IGNORECOLLISION), // do not handle collision @@ -3953,7 +3955,7 @@ boolean P_IsFlagAtBase(mobjtype_t flag) for (rover = mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!(rover->master->frontsector->specialflags & specialflag)) @@ -3987,8 +3989,8 @@ boolean P_IsMobjTouching3DFloor(mobj_t *mo, ffloor_t *ffloor, sector_t *sec) fixed_t topheight = P_GetSpecialTopZ(mo, sectors + ffloor->secnum, sec); fixed_t bottomheight = P_GetSpecialBottomZ(mo, sectors + ffloor->secnum, sec); - if (((ffloor->flags & FF_BLOCKPLAYER) && mo->player) - || ((ffloor->flags & FF_BLOCKOTHERS) && !mo->player)) + if (((ffloor->fofflags & FOF_BLOCKPLAYER) && mo->player) + || ((ffloor->fofflags & FOF_BLOCKOTHERS) && !mo->player)) { // Solid 3D floor: Mobj must touch the top or bottom return P_IsMobjTouchingPlane(mo, ffloor->master->frontsector, topheight, bottomheight); @@ -4026,7 +4028,7 @@ static sector_t *P_MobjTouching3DFloorSpecial(mobj_t *mo, sector_t *sector, INT3 if (GETSECSPECIAL(rover->master->frontsector->special, section) != number) continue; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!P_IsMobjTouching3DFloor(mo, rover, sector)) @@ -4050,7 +4052,7 @@ static sector_t *P_MobjTouching3DFloorSpecialFlag(mobj_t *mo, sector_t *sector, if (!(rover->master->frontsector->specialflags & flag)) continue; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!P_IsMobjTouching3DFloor(mo, rover, sector)) @@ -4238,7 +4240,7 @@ static sector_t *P_CheckPlayer3DFloorTrigger(player_t *player, sector_t *sector, if (rover->master->frontsector->triggerer == TO_MOBJ) continue; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!Tag_Find(&sourceline->tags, rover->master->frontsector->triggertag)) @@ -4965,9 +4967,13 @@ static void P_EvaluateSpecialFlags(player_t *player, sector_t *sector, sector_t if (player->mo->momz > mobjinfo[MT_FAN].mass) player->mo->momz = mobjinfo[MT_FAN].mass; - P_ResetPlayer(player); - if (player->panim != PA_FALL) + if (!player->powers[pw_carry]) + { + P_ResetPlayer(player); P_SetPlayerMobjState(player->mo, S_PLAY_FALL); + P_SetTarget(&player->mo->tracer, player->mo); + player->powers[pw_carry] = CR_FAN; + } } if (sector->specialflags & SSF_SUPERTRANSFORM) { @@ -5152,7 +5158,7 @@ static void P_PlayerOnSpecial3DFloor(player_t *player, sector_t *sector) if (!P_SectorHasSpecial(rover->master->frontsector)) continue; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!P_IsMobjTouching3DFloor(player->mo, rover, sector)) @@ -5259,7 +5265,7 @@ static void P_CheckMobj3DFloorTrigger(mobj_t *mo, sector_t *sec) if (rover->master->frontsector->triggerer != TO_MOBJ) continue; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!P_IsMobjTouching3DFloor(mo, rover, sec)) @@ -5525,7 +5531,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I sec2->attachedsolid = Z_Malloc(sizeof (*sec2->attachedsolid) * sec2->maxattached, PU_STATIC, NULL); sec2->attached[0] = sec - sectors; sec2->numattached = 1; - sec2->attachedsolid[0] = (flags & FF_SOLID); + sec2->attachedsolid[0] = (flags & FOF_SOLID); } else { @@ -5540,7 +5546,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I sec2->attachedsolid = Z_Realloc(sec2->attachedsolid, sizeof (*sec2->attachedsolid) * sec2->maxattached, PU_STATIC, NULL); } sec2->attached[sec2->numattached] = sec - sectors; - sec2->attachedsolid[sec2->numattached] = (flags & FF_SOLID); + sec2->attachedsolid[sec2->numattached] = (flags & FOF_SOLID); sec2->numattached++; } @@ -5570,7 +5576,7 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I if (sec2->hasslope) sec->hasslope = true; - fflr->spawnflags = fflr->flags = flags; + fflr->spawnflags = fflr->fofflags = flags; fflr->master = master; fflr->norender = INFTICS; fflr->fadingdata = NULL; @@ -5618,10 +5624,10 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I } fflr->alpha = max(0, min(0xff, alpha)); - if (fflr->alpha < 0xff || flags & FF_SPLAT) + if (fflr->alpha < 0xff || flags & FOF_SPLAT) { - fflr->flags |= FF_TRANSLUCENT; - fflr->spawnflags = fflr->flags; + fflr->fofflags |= FOF_TRANSLUCENT; + fflr->spawnflags = fflr->fofflags; } fflr->spawnalpha = fflr->alpha; // save for netgames @@ -5645,23 +5651,23 @@ static ffloor_t *P_AddFakeFloor(sector_t *sec, sector_t *sec2, line_t *master, I break; } - if (flags & FF_QUICKSAND) + if (flags & FOF_QUICKSAND) CheckForQuicksand = true; - if (flags & FF_BUSTUP) + if (flags & FOF_BUSTUP) CheckForBustableBlocks = true; - if ((flags & FF_MARIO)) + if ((flags & FOF_MARIO)) { - if (!(flags & FF_GOOWATER)) // Don't change the textures of a brick block, just a question block + if (!(flags & FOF_GOOWATER)) // Don't change the textures of a brick block, just a question block P_AddBlockThinker(sec2, master); CheckForMarioBlocks = true; } - if ((flags & FF_CRUMBLE)) + if ((flags & FOF_CRUMBLE)) sec2->crumblestate = CRUMBLE_WAIT; - if ((flags & FF_FLOATBOB)) + if ((flags & FOF_FLOATBOB)) { P_AddFloatThinker(sec2, master->args[0], master); CheckForFloatBob = true; @@ -5944,14 +5950,14 @@ void T_LaserFlash(laserthink_t *flash) if (fflr->master != flash->sourceline) continue; - if (!(fflr->flags & FF_EXISTS)) + if (!(fflr->fofflags & FOF_EXISTS)) break; if (leveltime & 2) - //fflr->flags |= FF_RENDERALL; + //fflr->flags |= FOF_RENDERALL; fflr->alpha = 0xB0; else - //fflr->flags &= ~FF_RENDERALL; + //fflr->flags &= ~FOF_RENDERALL; fflr->alpha = 0x90; top = P_GetFFloorTopZAt (fflr, sector->soundorg.x, sector->soundorg.y); @@ -6089,8 +6095,8 @@ static void P_MakeFOFBouncy(line_t *paramline, line_t *masterline) if (rover->master != masterline) continue; - rover->flags |= FF_BOUNCY; - rover->spawnflags |= FF_BOUNCY; + rover->fofflags |= FOF_BOUNCY; + rover->spawnflags |= FOF_BOUNCY; rover->bouncestrength = (paramline->args[1]<< FRACBITS)/100; CheckForBouncySector = true; break; @@ -6467,117 +6473,117 @@ void P_SpawnSpecials(boolean fromnetsave) break; case 100: // FOF (solid) - ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL; + ffloorflags = FOF_EXISTS|FOF_SOLID|FOF_RENDERALL; //Appearance settings if (lines[i].args[3] & TMFA_NOPLANES) - ffloorflags &= ~FF_RENDERPLANES; + ffloorflags &= ~FOF_RENDERPLANES; if (lines[i].args[3] & TMFA_NOSIDES) - ffloorflags &= ~FF_RENDERSIDES; + ffloorflags &= ~FOF_RENDERSIDES; if (lines[i].args[3] & TMFA_INSIDES) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_BOTHPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_ALLSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_BOTHPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_ALLSIDES; } if (lines[i].args[3] & TMFA_ONLYINSIDES) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_INVERTPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_INVERTSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_INVERTPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_INVERTSIDES; } if (lines[i].args[3] & TMFA_NOSHADE) - ffloorflags |= FF_NOSHADE; + ffloorflags |= FOF_NOSHADE; if (lines[i].args[3] & TMFA_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; //Tangibility settings if (lines[i].args[4] & TMFT_INTANGIBLETOP) - ffloorflags |= FF_REVERSEPLATFORM; + ffloorflags |= FOF_REVERSEPLATFORM; if (lines[i].args[4] & TMFT_INTANGIBLEBOTTOM) - ffloorflags |= FF_PLATFORM; + ffloorflags |= FOF_PLATFORM; if (lines[i].args[4] & TMFT_DONTBLOCKPLAYER) - ffloorflags &= ~FF_BLOCKPLAYER; + ffloorflags &= ~FOF_BLOCKPLAYER; if (lines[i].args[4] & TMFT_DONTBLOCKOTHERS) - ffloorflags &= ~FF_BLOCKOTHERS; + ffloorflags &= ~FOF_BLOCKOTHERS; //Cutting options - if (ffloorflags & FF_RENDERALL) + if (ffloorflags & FOF_RENDERALL) { //If translucent or player can enter it, cut inner walls if ((lines[i].args[1] < 255) || (lines[i].args[4] & TMFT_VISIBLEFROMINSIDE)) - ffloorflags |= FF_CUTEXTRA|FF_EXTRA; + ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; else - ffloorflags |= FF_CUTLEVEL; + ffloorflags |= FOF_CUTLEVEL; } P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); break; case 120: // FOF (water) - ffloorflags = FF_EXISTS|FF_RENDERPLANES|FF_SWIMMABLE|FF_BOTHPLANES|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES; + ffloorflags = FOF_EXISTS|FOF_RENDERPLANES|FOF_SWIMMABLE|FOF_BOTHPLANES|FOF_CUTEXTRA|FOF_EXTRA|FOF_CUTSPRITES; if (!(lines[i].args[3] & TMFW_NOSIDES)) - ffloorflags |= FF_RENDERSIDES|FF_ALLSIDES; + ffloorflags |= FOF_RENDERSIDES|FOF_ALLSIDES; if (lines[i].args[3] & TMFW_DOUBLESHADOW) - ffloorflags |= FF_DOUBLESHADOW; + ffloorflags |= FOF_DOUBLESHADOW; if (lines[i].args[3] & TMFW_COLORMAPONLY) - ffloorflags |= FF_COLORMAPONLY; + ffloorflags |= FOF_COLORMAPONLY; if (!(lines[i].args[3] & TMFW_NORIPPLE)) - ffloorflags |= FF_RIPPLE; + ffloorflags |= FOF_RIPPLE; if (lines[i].args[3] & TMFW_GOOWATER) - ffloorflags |= FF_GOOWATER; + ffloorflags |= FOF_GOOWATER; if (lines[i].args[3] & TMFW_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); break; case 150: // FOF (Air bobbing) - P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FF_EXISTS|FF_SOLID|FF_RENDERALL, secthinkers); + P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FOF_EXISTS|FOF_SOLID|FOF_RENDERALL, secthinkers); P_AddAirbob(lines[i].frontsector, lines[i].args[0], lines[i].args[1] << FRACBITS, !!(lines[i].args[2] & TMFB_REVERSE), !!(lines[i].args[2] & TMFB_SPINDASH), !!(lines[i].args[2] & TMFB_DYNAMIC)); break; case 160: // FOF (Water bobbing) - P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_FLOATBOB, secthinkers); + P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FOF_EXISTS|FOF_SOLID|FOF_RENDERALL|FOF_FLOATBOB, secthinkers); break; case 170: // FOF (Crumbling) - ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CRUMBLE; + ffloorflags = FOF_EXISTS|FOF_SOLID|FOF_RENDERALL|FOF_CRUMBLE; //Tangibility settings if (lines[i].args[3] & TMFT_INTANGIBLETOP) - ffloorflags |= FF_REVERSEPLATFORM; + ffloorflags |= FOF_REVERSEPLATFORM; if (lines[i].args[3] & TMFT_INTANGIBLEBOTTOM) - ffloorflags |= FF_PLATFORM; + ffloorflags |= FOF_PLATFORM; if (lines[i].args[3] & TMFT_DONTBLOCKPLAYER) - ffloorflags &= ~FF_BLOCKPLAYER; + ffloorflags &= ~FOF_BLOCKPLAYER; if (lines[i].args[3] & TMFT_DONTBLOCKOTHERS) - ffloorflags &= ~FF_BLOCKOTHERS; + ffloorflags &= ~FOF_BLOCKOTHERS; //Flags if (lines[i].args[4] & TMFC_NOSHADE) - ffloorflags |= FF_NOSHADE; + ffloorflags |= FOF_NOSHADE; if (lines[i].args[4] & TMFC_NORETURN) - ffloorflags |= FF_NORETURN; + ffloorflags |= FOF_NORETURN; if (lines[i].args[4] & TMFC_FLOATBOB) - ffloorflags |= FF_FLOATBOB; + ffloorflags |= FOF_FLOATBOB; if (lines[i].args[4] & TMFC_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; //If translucent or player can enter it, cut inner walls if (lines[i].args[1] < 0xff || (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE)) - ffloorflags |= FF_CUTEXTRA|FF_EXTRA; + ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; else - ffloorflags |= FF_CUTLEVEL; + ffloorflags |= FOF_CUTLEVEL; //If player can enter it, render insides if (lines[i].args[3] & TMFT_VISIBLEFROMINSIDE) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_BOTHPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_ALLSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_BOTHPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_ALLSIDES; } P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); @@ -6590,50 +6596,50 @@ void P_SpawnSpecials(boolean fromnetsave) fixed_t ceilingtop = P_FindHighestCeilingSurrounding(lines[i].frontsector); fixed_t ceilingbottom = P_FindLowestCeilingSurrounding(lines[i].frontsector); - ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL; + ffloorflags = FOF_EXISTS|FOF_SOLID|FOF_RENDERALL; //Appearance settings if (lines[i].args[3] & TMFA_NOPLANES) - ffloorflags &= ~FF_RENDERPLANES; + ffloorflags &= ~FOF_RENDERPLANES; if (lines[i].args[3] & TMFA_NOSIDES) - ffloorflags &= ~FF_RENDERSIDES; + ffloorflags &= ~FOF_RENDERSIDES; if (lines[i].args[3] & TMFA_INSIDES) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_BOTHPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_ALLSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_BOTHPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_ALLSIDES; } if (lines[i].args[3] & TMFA_ONLYINSIDES) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_INVERTPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_INVERTSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_INVERTPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_INVERTSIDES; } if (lines[i].args[3] & TMFA_NOSHADE) - ffloorflags |= FF_NOSHADE; + ffloorflags |= FOF_NOSHADE; if (lines[i].args[3] & TMFA_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; //Tangibility settings if (lines[i].args[4] & TMFT_INTANGIBLETOP) - ffloorflags |= FF_REVERSEPLATFORM; + ffloorflags |= FOF_REVERSEPLATFORM; if (lines[i].args[4] & TMFT_INTANGIBLEBOTTOM) - ffloorflags |= FF_PLATFORM; + ffloorflags |= FOF_PLATFORM; if (lines[i].args[4] & TMFT_DONTBLOCKPLAYER) - ffloorflags &= ~FF_BLOCKPLAYER; + ffloorflags &= ~FOF_BLOCKPLAYER; if (lines[i].args[4] & TMFT_DONTBLOCKOTHERS) - ffloorflags &= ~FF_BLOCKOTHERS; + ffloorflags &= ~FOF_BLOCKOTHERS; //Cutting options - if (ffloorflags & FF_RENDERALL) + if (ffloorflags & FOF_RENDERALL) { //If translucent or player can enter it, cut inner walls if ((lines[i].args[1] < 255) || (lines[i].args[4] & TMFT_VISIBLEFROMINSIDE)) - ffloorflags |= FF_CUTEXTRA|FF_EXTRA; + ffloorflags |= FOF_CUTEXTRA|FOF_EXTRA; else - ffloorflags |= FF_CUTLEVEL; + ffloorflags |= FOF_CUTLEVEL; } P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); @@ -6641,14 +6647,14 @@ void P_SpawnSpecials(boolean fromnetsave) break; } case 200: // Light block - ffloorflags = FF_EXISTS|FF_CUTSPRITES; + ffloorflags = FOF_EXISTS|FOF_CUTSPRITES; if (!lines[i].args[1]) - ffloorflags |= FF_DOUBLESHADOW; + ffloorflags |= FOF_DOUBLESHADOW; P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, ffloorflags, secthinkers); break; case 202: // Fog - ffloorflags = FF_EXISTS|FF_RENDERALL|FF_FOG|FF_INVERTPLANES|FF_INVERTSIDES|FF_CUTEXTRA|FF_EXTRA|FF_DOUBLESHADOW|FF_CUTSPRITES; + ffloorflags = FOF_EXISTS|FOF_RENDERALL|FOF_FOG|FOF_INVERTPLANES|FOF_INVERTSIDES|FOF_CUTEXTRA|FOF_EXTRA|FOF_DOUBLESHADOW|FOF_CUTSPRITES; sec = sides[*lines[i].sidenum].sector - sectors; // SoM: Because it's fog, check for an extra colormap and set the fog flag... if (sectors[sec].extra_colormap) @@ -6657,45 +6663,45 @@ void P_SpawnSpecials(boolean fromnetsave) break; case 220: //Intangible - ffloorflags = FF_EXISTS|FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_CUTSPRITES; + ffloorflags = FOF_EXISTS|FOF_RENDERALL|FOF_CUTEXTRA|FOF_EXTRA|FOF_CUTSPRITES; //Appearance settings if (lines[i].args[3] & TMFA_NOPLANES) - ffloorflags &= ~FF_RENDERPLANES; + ffloorflags &= ~FOF_RENDERPLANES; if (lines[i].args[3] & TMFA_NOSIDES) - ffloorflags &= ~FF_RENDERSIDES; + ffloorflags &= ~FOF_RENDERSIDES; if (!(lines[i].args[3] & TMFA_INSIDES)) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_BOTHPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_ALLSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_BOTHPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_ALLSIDES; } if (lines[i].args[3] & TMFA_ONLYINSIDES) { - if (ffloorflags & FF_RENDERPLANES) - ffloorflags |= FF_INVERTPLANES; - if (ffloorflags & FF_RENDERSIDES) - ffloorflags |= FF_INVERTSIDES; + if (ffloorflags & FOF_RENDERPLANES) + ffloorflags |= FOF_INVERTPLANES; + if (ffloorflags & FOF_RENDERSIDES) + ffloorflags |= FOF_INVERTSIDES; } if (lines[i].args[3] & TMFA_NOSHADE) - ffloorflags |= FF_NOSHADE; + ffloorflags |= FOF_NOSHADE; if (lines[i].args[3] & TMFA_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); break; case 223: // FOF (intangible, invisible) - for combining specials in a sector - P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FF_EXISTS|FF_NOSHADE, secthinkers); + P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FOF_EXISTS|FOF_NOSHADE, secthinkers); break; case 250: // Mario Block - ffloorflags = FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL|FF_MARIO; + ffloorflags = FOF_EXISTS|FOF_SOLID|FOF_RENDERALL|FOF_CUTLEVEL|FOF_MARIO; if (lines[i].args[1] & TMFM_BRICK) - ffloorflags |= FF_GOOWATER; + ffloorflags |= FOF_GOOWATER; if (lines[i].args[1] & TMFM_INVISIBLE) - ffloorflags &= ~(FF_SOLID|FF_RENDERALL|FF_CUTLEVEL); + ffloorflags &= ~(FOF_SOLID|FOF_RENDERALL|FOF_CUTLEVEL); P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, ffloorflags, secthinkers); break; @@ -6704,7 +6710,7 @@ void P_SpawnSpecials(boolean fromnetsave) { UINT16 sound = (lines[i].stringargs[0]) ? get_number(lines[i].stringargs[0]) : sfx_thwomp; P_AddThwompThinker(lines[i].frontsector, &lines[i], lines[i].args[1] << (FRACBITS - 3), lines[i].args[2] << (FRACBITS - 3), sound); - P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FF_EXISTS|FF_SOLID|FF_RENDERALL|FF_CUTLEVEL, secthinkers); + P_AddFakeFloorsByLine(i, 0xff, TMB_TRANSLUCENT, FOF_EXISTS|FOF_SOLID|FOF_RENDERALL|FOF_CUTLEVEL, secthinkers); break; } @@ -6713,7 +6719,7 @@ void P_SpawnSpecials(boolean fromnetsave) UINT8 busttype = BT_REGULAR; ffloorbustflags_e bustflags = 0; - ffloorflags = FF_EXISTS|FF_BLOCKOTHERS|FF_RENDERALL|FF_BUSTUP; + ffloorflags = FOF_EXISTS|FOF_BLOCKOTHERS|FOF_RENDERALL|FOF_BUSTUP; //Bustable type switch (lines[i].args[3]) @@ -6740,10 +6746,10 @@ void P_SpawnSpecials(boolean fromnetsave) if (lines[i].args[4] & TMFB_ONLYBOTTOM) bustflags |= FB_ONLYBOTTOM; if (lines[i].args[4] & TMFB_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; if (busttype != BT_TOUCH || bustflags & FB_ONLYBOTTOM) - ffloorflags |= FF_BLOCKPLAYER; + ffloorflags |= FOF_BLOCKPLAYER; TAG_ITER_SECTORS(lines[i].args[0], s) { @@ -6757,9 +6763,9 @@ void P_SpawnSpecials(boolean fromnetsave) break; } case 257: // Quicksand - ffloorflags = FF_EXISTS|FF_QUICKSAND|FF_RENDERALL|FF_ALLSIDES|FF_CUTSPRITES; + ffloorflags = FOF_EXISTS|FOF_QUICKSAND|FOF_RENDERALL|FOF_ALLSIDES|FOF_CUTSPRITES; if (!(lines[i].args[1])) - ffloorflags |= FF_RIPPLE; + ffloorflags |= FOF_RIPPLE; TAG_ITER_SECTORS(lines[i].args[0], s) { @@ -6772,10 +6778,10 @@ void P_SpawnSpecials(boolean fromnetsave) break; case 258: // Laser block - ffloorflags = FF_EXISTS|FF_RENDERALL|FF_NOSHADE|FF_EXTRA|FF_CUTEXTRA|FF_TRANSLUCENT; + ffloorflags = FOF_EXISTS|FOF_RENDERALL|FOF_NOSHADE|FOF_EXTRA|FOF_CUTEXTRA|FOF_TRANSLUCENT; P_AddLaserThinker(lines[i].args[0], lines + i, !!(lines[i].args[3] & TMFL_NOBOSSES)); if (lines[i].args[3] & TMFL_SPLAT) - ffloorflags |= FF_SPLAT; + ffloorflags |= FOF_SPLAT; P_AddFakeFloorsByLine(i, lines[i].args[1], lines[i].args[2], ffloorflags, secthinkers); break; @@ -6787,12 +6793,12 @@ void P_SpawnSpecials(boolean fromnetsave) continue; if (!udmf) // Ugly backwards compatibility stuff { - if (lines[i].args[3] & FF_QUICKSAND) + if (lines[i].args[3] & FOF_QUICKSAND) { fflr->sinkspeed = abs(lines[i].dx) >> 1; fflr->friction = abs(lines[i].dy) >> 6; } - if (lines[i].args[3] & FF_BUSTUP) + if (lines[i].args[3] & FOF_BUSTUP) { switch (lines[i].args[4] % TMFB_ONLYBOTTOM) { @@ -6835,31 +6841,31 @@ void P_SpawnSpecials(boolean fromnetsave) if (dtype == 0) dtype = 1; - ffloorflags = FF_EXISTS; + ffloorflags = FOF_EXISTS; - if (dflags2 & 1) ffloorflags |= FF_NOSHADE; // Disable light effects (Means no shadowcast) - if (dflags2 & 2) ffloorflags |= FF_DOUBLESHADOW; // Restrict light inside (Means doubleshadow) + if (dflags2 & 1) ffloorflags |= FOF_NOSHADE; // Disable light effects (Means no shadowcast) + if (dflags2 & 2) ffloorflags |= FOF_DOUBLESHADOW; // Restrict light inside (Means doubleshadow) if (dflags2 & 4) isfog = true; // Fog effect (Explicitly render like a fog block) - if (dflags1 & 4) ffloorflags |= FF_BOTHPLANES|FF_ALLSIDES; // Render-inside - if (dflags1 & 16) ffloorflags |= FF_INVERTSIDES|FF_INVERTPLANES; // Invert visibility rules + if (dflags1 & 4) ffloorflags |= FOF_BOTHPLANES|FOF_ALLSIDES; // Render-inside + if (dflags1 & 16) ffloorflags |= FOF_INVERTSIDES|FOF_INVERTPLANES; // Invert visibility rules // Fog block if (isfog) - ffloorflags |= FF_RENDERALL|FF_CUTEXTRA|FF_CUTSPRITES|FF_BOTHPLANES|FF_EXTRA|FF_FOG|FF_INVERTPLANES|FF_ALLSIDES|FF_INVERTSIDES; + ffloorflags |= FOF_RENDERALL|FOF_CUTEXTRA|FOF_CUTSPRITES|FOF_BOTHPLANES|FOF_EXTRA|FOF_FOG|FOF_INVERTPLANES|FOF_ALLSIDES|FOF_INVERTSIDES; else { - ffloorflags |= FF_RENDERALL; + ffloorflags |= FOF_RENDERALL; // Solid if (dtype == 1) - ffloorflags |= FF_SOLID|FF_CUTLEVEL; + ffloorflags |= FOF_SOLID|FOF_CUTLEVEL; // Water else if (dtype == 2) - ffloorflags |= FF_SWIMMABLE|FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA|FF_RIPPLE; + ffloorflags |= FOF_SWIMMABLE|FOF_CUTEXTRA|FOF_CUTSPRITES|FOF_EXTRA|FOF_RIPPLE; // Intangible else if (dtype == 3) - ffloorflags |= FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA; + ffloorflags |= FOF_CUTEXTRA|FOF_CUTSPRITES|FOF_EXTRA; } // Non-opaque @@ -6869,19 +6875,19 @@ void P_SpawnSpecials(boolean fromnetsave) if (dopacity == 0) { // True invisible - if (ffloorflags & FF_NOSHADE) - ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_CUTSPRITES|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL); + if (ffloorflags & FOF_NOSHADE) + ffloorflags &= ~(FOF_RENDERALL|FOF_CUTEXTRA|FOF_CUTSPRITES|FOF_EXTRA|FOF_BOTHPLANES|FOF_ALLSIDES|FOF_CUTLEVEL); // Shadow block else { - ffloorflags |= FF_CUTSPRITES; - ffloorflags &= ~(FF_RENDERALL|FF_CUTEXTRA|FF_EXTRA|FF_BOTHPLANES|FF_ALLSIDES|FF_CUTLEVEL); + ffloorflags |= FOF_CUTSPRITES; + ffloorflags &= ~(FOF_RENDERALL|FOF_CUTEXTRA|FOF_EXTRA|FOF_BOTHPLANES|FOF_ALLSIDES|FOF_CUTLEVEL); } } else { - ffloorflags |= FF_TRANSLUCENT|FF_CUTEXTRA|FF_EXTRA; - ffloorflags &= ~FF_CUTLEVEL; + ffloorflags |= FOF_TRANSLUCENT|FOF_CUTEXTRA|FOF_EXTRA; + ffloorflags &= ~FOF_CUTLEVEL; } } @@ -7073,8 +7079,8 @@ void P_SpawnSpecials(boolean fromnetsave) if (rover->master != lines + l) continue; - rover->flags |= FF_BUSTUP; - rover->spawnflags |= FF_BUSTUP; + rover->fofflags |= FOF_BUSTUP; + rover->spawnflags |= FOF_BUSTUP; rover->bustflags = bustflags; rover->busttype = busttype; rover->busttag = lines[i].args[3]; @@ -7104,8 +7110,8 @@ void P_SpawnSpecials(boolean fromnetsave) if (rover->master != lines + l) continue; - rover->flags |= FF_QUICKSAND; - rover->spawnflags |= FF_QUICKSAND; + rover->fofflags |= FOF_QUICKSAND; + rover->spawnflags |= FOF_QUICKSAND; rover->sinkspeed = abs(lines[i].args[1]) << (FRACBITS - 1); rover->friction = abs(lines[i].args[2]) << (FRACBITS - 6); CheckForQuicksand = true; @@ -7348,7 +7354,7 @@ void T_Scroll(scroll_t *s) if (!rover) // This should be impossible, but don't complain if it is the case somehow continue; - if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there + if (!(rover->fofflags & FOF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there continue; for (node = psec->touching_thinglist; node; node = node->m_thinglist_next) @@ -7423,7 +7429,7 @@ void T_Scroll(scroll_t *s) if (!rover) // This should be impossible, but don't complain if it is the case somehow continue; - if (!(rover->flags & FF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there + if (!(rover->fofflags & FOF_EXISTS)) // If the FOF does not "exist", we pretend that nobody's there continue; for (node = psec->touching_thinglist; node; node = node->m_thinglist_next) @@ -7470,6 +7476,17 @@ void T_Scroll(scroll_t *s) } // end of switch } +static boolean IsSector3DBlock(sector_t* sec) +{ + size_t i; + for (i = 0; i < sec->linecount; i++) + { + if (sec->lines[i]->special >= 100 && sec->lines[i]->special < 300) + return true; + } + return false; +} + /** Adds a generalized scroller to the thinker list. * * \param type The enumerated type of scrolling. @@ -7483,6 +7500,7 @@ void T_Scroll(scroll_t *s) */ static void Add_Scroller(INT32 type, fixed_t dx, fixed_t dy, INT32 control, INT32 affectee, INT32 accel, INT32 exclusive) { + boolean is3dblock = IsSector3DBlock(§ors[affectee]); scroll_t *s = Z_Calloc(sizeof *s, PU_LEVSPEC, NULL); s->thinker.function.acp1 = (actionf_p1)T_Scroll; s->type = type; @@ -7496,7 +7514,16 @@ static void Add_Scroller(INT32 type, fixed_t dx, fixed_t dy, INT32 control, INT3 s->last_height = sectors[control].floorheight + sectors[control].ceilingheight; s->affectee = affectee; if (type == sc_carry || type == sc_carry_ceiling) + { sectors[affectee].specialflags |= SSF_CONVEYOR; + if (is3dblock) + { + if (type == sc_carry) + sectors[affectee].flags |= MSF_FLIPSPECIAL_CEILING; + else + sectors[affectee].flags |= MSF_FLIPSPECIAL_FLOOR; + } + } P_AddThinker(THINK_MAIN, &s->thinker); } @@ -7552,11 +7579,11 @@ static void P_SpawnScrollers(void) fixed_t dy = FixedMul(FixedDiv(l->dy, length), speed) >> SCROLL_SHIFT; if (l->args[0] == 0) - P_SpawnPlaneScroller(l, dx, dy, control, (INT32)(l->frontsector - sectors), accel, l->args[4] & TMST_NONEXCLUSIVE); + P_SpawnPlaneScroller(l, dx, dy, control, (INT32)(l->frontsector - sectors), accel, !(l->args[4] & TMST_NONEXCLUSIVE)); else { TAG_ITER_SECTORS(l->args[0], s) - P_SpawnPlaneScroller(l, dx, dy, control, s, accel, l->args[4] & TMST_NONEXCLUSIVE); + P_SpawnPlaneScroller(l, dx, dy, control, s, accel, !(l->args[4] & TMST_NONEXCLUSIVE)); } break; } @@ -7640,10 +7667,10 @@ void T_Disappear(disappear_t *d) continue; if (d->exists) - rover->flags &= ~FF_EXISTS; + rover->fofflags &= ~FOF_EXISTS; else { - rover->flags |= FF_EXISTS; + rover->fofflags |= FOF_EXISTS; if (!(lines[d->sourceline].args[5])) { @@ -7728,11 +7755,11 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval // If fading an invisible FOF whose render flags we did not yet set, // initialize its alpha to 1 if (dotranslucent && - (rover->spawnflags & FF_NOSHADE) && // do not include light blocks, which don't set FF_NOSHADE - !(rover->flags & FF_FOG) && // do not include fog - !(rover->spawnflags & FF_RENDERSIDES) && - !(rover->spawnflags & FF_RENDERPLANES) && - !(rover->flags & FF_RENDERALL)) + (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE + !(rover->fofflags & FOF_FOG) && // do not include fog + !(rover->spawnflags & FOF_RENDERSIDES) && + !(rover->spawnflags & FOF_RENDERPLANES) && + !(rover->fofflags & FOF_RENDERALL)) rover->alpha = 1; if (fadingdata) @@ -7753,16 +7780,16 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval if (docollision) { - if (rover->spawnflags & FF_SOLID) - rover->flags &= ~FF_SOLID; - if (rover->spawnflags & FF_SWIMMABLE) - rover->flags &= ~FF_SWIMMABLE; - if (rover->spawnflags & FF_QUICKSAND) - rover->flags &= ~FF_QUICKSAND; - if (rover->spawnflags & FF_BUSTUP) - rover->flags &= ~FF_BUSTUP; - if (rover->spawnflags & FF_MARIO) - rover->flags &= ~FF_MARIO; + if (rover->spawnflags & FOF_SOLID) + rover->fofflags &= ~FOF_SOLID; + if (rover->spawnflags & FOF_SWIMMABLE) + rover->fofflags &= ~FOF_SWIMMABLE; + if (rover->spawnflags & FOF_QUICKSAND) + rover->fofflags &= ~FOF_QUICKSAND; + if (rover->spawnflags & FOF_BUSTUP) + rover->fofflags &= ~FOF_BUSTUP; + if (rover->spawnflags & FOF_MARIO) + rover->fofflags &= ~FOF_MARIO; } } else // continue fading out @@ -7788,16 +7815,16 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval if (docollision) { - if (rover->spawnflags & FF_SOLID) - rover->flags |= FF_SOLID; - if (rover->spawnflags & FF_SWIMMABLE) - rover->flags |= FF_SWIMMABLE; - if (rover->spawnflags & FF_QUICKSAND) - rover->flags |= FF_QUICKSAND; - if (rover->spawnflags & FF_BUSTUP) - rover->flags |= FF_BUSTUP; - if (rover->spawnflags & FF_MARIO) - rover->flags |= FF_MARIO; + if (rover->spawnflags & FOF_SOLID) + rover->fofflags |= FOF_SOLID; + if (rover->spawnflags & FOF_SWIMMABLE) + rover->fofflags |= FOF_SWIMMABLE; + if (rover->spawnflags & FOF_QUICKSAND) + rover->fofflags |= FOF_QUICKSAND; + if (rover->spawnflags & FOF_BUSTUP) + rover->fofflags |= FOF_BUSTUP; + if (rover->spawnflags & FOF_MARIO) + rover->fofflags |= FOF_MARIO; } } else // continue fading in @@ -7817,114 +7844,114 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval // routines common to both fade in and fade out if (!stillfading) { - if (doexists && !(rover->spawnflags & FF_BUSTUP)) + if (doexists && !(rover->spawnflags & FOF_BUSTUP)) { if (alpha <= 1) - rover->flags &= ~FF_EXISTS; + rover->fofflags &= ~FOF_EXISTS; else - rover->flags |= FF_EXISTS; + rover->fofflags |= FOF_EXISTS; // Re-render lighting at end of fade - if (dolighting && !(rover->spawnflags & FF_NOSHADE) && !(rover->flags & FF_EXISTS)) + if (dolighting && !(rover->spawnflags & FOF_NOSHADE) && !(rover->fofflags & FOF_EXISTS)) rover->target->moved = true; } - if (dotranslucent && !(rover->flags & FF_FOG)) + if (dotranslucent && !(rover->fofflags & FOF_FOG)) { if (alpha >= 256) { - if (!(rover->flags & FF_CUTSOLIDS) && - (rover->spawnflags & FF_CUTSOLIDS)) + if (!(rover->fofflags & FOF_CUTSOLIDS) && + (rover->spawnflags & FOF_CUTSOLIDS)) { - rover->flags |= FF_CUTSOLIDS; + rover->fofflags |= FOF_CUTSOLIDS; rover->target->moved = true; } - rover->flags &= ~FF_TRANSLUCENT; + rover->fofflags &= ~FOF_TRANSLUCENT; } else { - rover->flags |= FF_TRANSLUCENT; + rover->fofflags |= FOF_TRANSLUCENT; - if ((rover->flags & FF_CUTSOLIDS) && - (rover->spawnflags & FF_CUTSOLIDS)) + if ((rover->fofflags & FOF_CUTSOLIDS) && + (rover->spawnflags & FOF_CUTSOLIDS)) { - rover->flags &= ~FF_CUTSOLIDS; + rover->fofflags &= ~FOF_CUTSOLIDS; rover->target->moved = true; } } - if ((rover->spawnflags & FF_NOSHADE) && // do not include light blocks, which don't set FF_NOSHADE - !(rover->spawnflags & FF_RENDERSIDES) && - !(rover->spawnflags & FF_RENDERPLANES)) + if ((rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE + !(rover->spawnflags & FOF_RENDERSIDES) && + !(rover->spawnflags & FOF_RENDERPLANES)) { if (rover->alpha > 1) - rover->flags |= FF_RENDERALL; + rover->fofflags |= FOF_RENDERALL; else - rover->flags &= ~FF_RENDERALL; + rover->fofflags &= ~FOF_RENDERALL; } } } else { - if (doexists && !(rover->spawnflags & FF_BUSTUP)) + if (doexists && !(rover->spawnflags & FOF_BUSTUP)) { - // Re-render lighting if we haven't yet set FF_EXISTS (beginning of fade) - if (dolighting && !(rover->spawnflags & FF_NOSHADE) && !(rover->flags & FF_EXISTS)) + // Re-render lighting if we haven't yet set FOF_EXISTS (beginning of fade) + if (dolighting && !(rover->spawnflags & FOF_NOSHADE) && !(rover->fofflags & FOF_EXISTS)) rover->target->moved = true; - rover->flags |= FF_EXISTS; + rover->fofflags |= FOF_EXISTS; } - if (dotranslucent && !(rover->flags & FF_FOG)) + if (dotranslucent && !(rover->fofflags & FOF_FOG)) { - rover->flags |= FF_TRANSLUCENT; + rover->fofflags |= FOF_TRANSLUCENT; - if ((rover->flags & FF_CUTSOLIDS) && - (rover->spawnflags & FF_CUTSOLIDS)) + if ((rover->fofflags & FOF_CUTSOLIDS) && + (rover->spawnflags & FOF_CUTSOLIDS)) { - rover->flags &= ~FF_CUTSOLIDS; + rover->fofflags &= ~FOF_CUTSOLIDS; rover->target->moved = true; } - if ((rover->spawnflags & FF_NOSHADE) && // do not include light blocks, which don't set FF_NOSHADE - !(rover->spawnflags & FF_RENDERSIDES) && - !(rover->spawnflags & FF_RENDERPLANES)) - rover->flags |= FF_RENDERALL; + if ((rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE + !(rover->spawnflags & FOF_RENDERSIDES) && + !(rover->spawnflags & FOF_RENDERPLANES)) + rover->fofflags |= FOF_RENDERALL; } if (docollision) { if (doghostfade) // remove collision flags during fade { - if (rover->spawnflags & FF_SOLID) - rover->flags &= ~FF_SOLID; - if (rover->spawnflags & FF_SWIMMABLE) - rover->flags &= ~FF_SWIMMABLE; - if (rover->spawnflags & FF_QUICKSAND) - rover->flags &= ~FF_QUICKSAND; - if (rover->spawnflags & FF_BUSTUP) - rover->flags &= ~FF_BUSTUP; - if (rover->spawnflags & FF_MARIO) - rover->flags &= ~FF_MARIO; + if (rover->spawnflags & FOF_SOLID) + rover->fofflags &= ~FOF_SOLID; + if (rover->spawnflags & FOF_SWIMMABLE) + rover->fofflags &= ~FOF_SWIMMABLE; + if (rover->spawnflags & FOF_QUICKSAND) + rover->fofflags &= ~FOF_QUICKSAND; + if (rover->spawnflags & FOF_BUSTUP) + rover->fofflags &= ~FOF_BUSTUP; + if (rover->spawnflags & FOF_MARIO) + rover->fofflags &= ~FOF_MARIO; } else // keep collision during fade { - if (rover->spawnflags & FF_SOLID) - rover->flags |= FF_SOLID; - if (rover->spawnflags & FF_SWIMMABLE) - rover->flags |= FF_SWIMMABLE; - if (rover->spawnflags & FF_QUICKSAND) - rover->flags |= FF_QUICKSAND; - if (rover->spawnflags & FF_BUSTUP) - rover->flags |= FF_BUSTUP; - if (rover->spawnflags & FF_MARIO) - rover->flags |= FF_MARIO; + if (rover->spawnflags & FOF_SOLID) + rover->fofflags |= FOF_SOLID; + if (rover->spawnflags & FOF_SWIMMABLE) + rover->fofflags |= FOF_SWIMMABLE; + if (rover->spawnflags & FOF_QUICKSAND) + rover->fofflags |= FOF_QUICKSAND; + if (rover->spawnflags & FOF_BUSTUP) + rover->fofflags |= FOF_BUSTUP; + if (rover->spawnflags & FOF_MARIO) + rover->fofflags |= FOF_MARIO; } } } - if (!(rover->flags & FF_FOG)) // don't set FOG alpha + if (!(rover->fofflags & FOF_FOG)) // don't set FOG alpha { if (!stillfading || exactalpha) rover->alpha = alpha; @@ -7967,8 +7994,8 @@ static boolean P_FadeFakeFloor(ffloor_t *rover, INT16 sourcevalue, INT16 destval * \param speed speed to fade by * \param ticbased tic-based logic, speed = duration * \param relative Destvalue is relative to rover->alpha - * \param doexists handle FF_EXISTS - * \param dotranslucent handle FF_TRANSLUCENT + * \param doexists handle FOF_EXISTS + * \param dotranslucent handle FOF_TRANSLUCENT * \param dolighting fade FOF light * \param docollision handle interactive flags * \param doghostfade no interactive flags during fading @@ -7984,10 +8011,10 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor // If fading an invisible FOF whose render flags we did not yet set, // initialize its alpha to 1 if (dotranslucent && - (rover->spawnflags & FF_NOSHADE) && // do not include light blocks, which don't set FF_NOSHADE - !(rover->spawnflags & FF_RENDERSIDES) && - !(rover->spawnflags & FF_RENDERPLANES) && - !(rover->flags & FF_RENDERALL)) + (rover->spawnflags & FOF_NOSHADE) && // do not include light blocks, which don't set FOF_NOSHADE + !(rover->spawnflags & FOF_RENDERSIDES) && + !(rover->spawnflags & FOF_RENDERPLANES) && + !(rover->fofflags & FOF_RENDERALL)) rover->alpha = 1; // already equal, nothing to do @@ -8028,7 +8055,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor P_ResetFakeFloorFader(rover, d, false); // Set a separate thinker for shadow fading - if (dolighting && !(rover->flags & FF_NOSHADE)) + if (dolighting && !(rover->fofflags & FOF_NOSHADE)) { UINT16 lightdelta = abs(sectors[rover->secnum].spawn_lightlevel - rover->target->lightlevel); fixed_t alphapercent = min(FixedDiv(d->destvalue, rover->spawnalpha), 1*FRACUNIT); // don't make darker than spawn_lightlevel @@ -8049,7 +8076,7 @@ static void P_AddFakeFloorFader(ffloor_t *rover, size_t sectornum, size_t ffloor d->destlightlevel = -1; // Set a separate thinker for colormap fading - if (docolormap && !(rover->flags & FF_NOSHADE) && sectors[rover->secnum].spawn_extra_colormap && !sectors[rover->secnum].colormap_protected) + if (docolormap && !(rover->fofflags & FOF_NOSHADE) && sectors[rover->secnum].spawn_extra_colormap && !sectors[rover->secnum].colormap_protected) { extracolormap_t *dest_exc, *source_exc = sectors[rover->secnum].extra_colormap ? sectors[rover->secnum].extra_colormap : R_GetDefaultColormap(); @@ -8110,11 +8137,11 @@ void T_Fade(fade_t *d) d->doexists, d->dotranslucent, d->dolighting, d->docolormap, d->docollision, d->doghostfade, d->exactalpha)) { // Finalize lighting, copypasta from P_AddFakeFloorFader - if (d->dolighting && !(d->rover->flags & FF_NOSHADE) && d->destlightlevel > -1) + if (d->dolighting && !(d->rover->fofflags & FOF_NOSHADE) && d->destlightlevel > -1) sectors[d->rover->secnum].lightlevel = d->destlightlevel; // Finalize colormap - if (d->docolormap && !(d->rover->flags & FF_NOSHADE) && sectors[d->rover->secnum].spawn_extra_colormap) + if (d->docolormap && !(d->rover->fofflags & FOF_NOSHADE) && sectors[d->rover->secnum].spawn_extra_colormap) sectors[d->rover->secnum].extra_colormap = d->dest_exc; P_RemoveFakeFloorFader(d->rover); @@ -8544,7 +8571,9 @@ void T_Pusher(pusher_t *p) { if (thing->z == P_GetSpecialBottomZ(thing, sec, sec)) touching = true; - else if (p->type != p_current) + // Annoying backwards compatibility nonsense: + // In binary, horizontal currents require floor touch + else if (udmf || p->type != p_current || z_mag != 0) inFOF = true; } diff --git a/src/p_spec.h b/src/p_spec.h index 33d18d63e..69c629c47 100644 --- a/src/p_spec.h +++ b/src/p_spec.h @@ -1029,8 +1029,8 @@ typedef struct INT16 speed; ///< Speed to fade by boolean ticbased; ///< Tic-based logic toggle INT32 timer; ///< Timer for tic-based logic - boolean doexists; ///< Handle FF_EXISTS - boolean dotranslucent; ///< Handle FF_TRANSLUCENT + boolean doexists; ///< Handle FOF_EXISTS + boolean dotranslucent; ///< Handle FOF_TRANSLUCENT boolean dolighting; ///< Handle shadows and light blocks boolean docolormap; ///< Handle colormaps boolean docollision; ///< Handle interactive flags diff --git a/src/p_user.c b/src/p_user.c index cc5caedd6..2f522ad4b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1966,22 +1966,22 @@ mobj_t *P_SpawnGhostMobj(mobj_t *mobj) ghost->angle = (mobj->player ? mobj->player->drawangle : mobj->angle); ghost->rollangle = mobj->rollangle; - + ghost->sprite = mobj->sprite; ghost->sprite2 = mobj->sprite2; ghost->frame = mobj->frame; ghost->tics = -1; ghost->frame &= ~FF_TRANSMASK; ghost->frame |= tr_trans50<renderflags = mobj->renderflags; ghost->blendmode = mobj->blendmode; - + ghost->spritexscale = mobj->spritexscale; ghost->spriteyscale = mobj->spriteyscale; ghost->spritexoffset = mobj->spritexoffset; ghost->spriteyoffset = mobj->spriteyoffset; - + ghost->fuse = ghost->info->damage; ghost->skin = mobj->skin; @@ -2209,7 +2209,7 @@ boolean P_InSpaceSector(mobj_t *mo) // Returns true if you are in space for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; if (!(rover->master->frontsector->specialflags & SSF_OUTERSPACE)) @@ -2462,10 +2462,10 @@ boolean P_InQuicksand(mobj_t *mo) // Returns true if you are in quicksand for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_QUICKSAND)) + if (!(rover->fofflags & FOF_QUICKSAND)) continue; topheight = P_GetFFloorTopZAt (rover, mo->x, mo->y); @@ -2486,10 +2486,10 @@ boolean P_InQuicksand(mobj_t *mo) // Returns true if you are in quicksand static boolean P_PlayerCanBust(player_t *player, ffloor_t *rover) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) return false; - if (!(rover->flags & FF_BUSTUP)) + if (!(rover->fofflags & FOF_BUSTUP)) return false; /*if (rover->master->frontsector->crumblestate != CRUMBLE_NONE) @@ -2512,7 +2512,7 @@ static boolean P_PlayerCanBust(player_t *player, ffloor_t *rover) if ((player->pflags & PF_SPINNING) && !(player->pflags & PF_JUMPED)) return true; - // Strong abilities can break even FF_STRONGBUST. + // Passive wall breaking if (player->charflags & SF_CANBUSTWALLS) return true; @@ -2534,7 +2534,7 @@ static boolean P_PlayerCanBust(player_t *player, ffloor_t *rover) /* FALLTHRU */ case BT_STRONG: // Requires a "strong ability" - if (player->charability == CA_GLIDEANDCLIMB) + if (player->charflags & SF_CANBUSTWALLS) return true; if (player->pflags & PF_BOUNCING) @@ -2701,17 +2701,17 @@ static void P_CheckBouncySectors(player_t *player) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; // FOFs should not be bouncy if they don't even "exist" // Handle deprecated bouncy FOF sector type if (!udmf && GETSECSPECIAL(rover->master->frontsector->special, 1) == 15) { - rover->flags |= FF_BOUNCY; + rover->fofflags |= FOF_BOUNCY; rover->bouncestrength = P_AproxDistance(rover->master->dx, rover->master->dy)/100; } - if (!(rover->flags & FF_BOUNCY)) + if (!(rover->fofflags & FOF_BOUNCY)) continue; topheight = P_GetFOFTopZ(player->mo, node->m_sector, rover, player->mo->x, player->mo->y, NULL); @@ -2784,9 +2784,9 @@ static void P_CheckQuicksand(player_t *player) for (rover = player->mo->subsector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) continue; + if (!(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_QUICKSAND)) + if (!(rover->fofflags & FOF_QUICKSAND)) continue; topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y); @@ -3136,7 +3136,7 @@ static void P_DoClimbing(player_t *player) for (rover = glidesector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) continue; floorclimb = true; @@ -3177,7 +3177,7 @@ static void P_DoClimbing(player_t *player) // Is there a FOF directly below this one that we can move onto? for (roverbelow = glidesector->sector->ffloors; roverbelow; roverbelow = roverbelow->next) { - if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) + if (!(roverbelow->fofflags & FOF_EXISTS) || !(roverbelow->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) continue; if (roverbelow == rover) @@ -3222,7 +3222,7 @@ static void P_DoClimbing(player_t *player) // Is there a FOF directly below this one that we can move onto? for (roverbelow = glidesector->sector->ffloors; roverbelow; roverbelow = roverbelow->next) { - if (!(roverbelow->flags & FF_EXISTS) || !(roverbelow->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) + if (!(roverbelow->fofflags & FOF_EXISTS) || !(roverbelow->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) continue; if (roverbelow == rover) @@ -3256,8 +3256,8 @@ static void P_DoClimbing(player_t *player) if (floorclimb) { - if (rover->flags & FF_CRUMBLE && !(netgame && player->spectator)) - EV_StartCrumble(rover->master->frontsector, rover, (rover->flags & FF_FLOATBOB), player, rover->alpha, !(rover->flags & FF_NORETURN)); + if (rover->fofflags & FOF_CRUMBLE && !(netgame && player->spectator)) + EV_StartCrumble(rover->master->frontsector, rover, (rover->fofflags & FOF_FLOATBOB), player, rover->alpha, !(rover->fofflags & FOF_NORETURN)); break; } } @@ -3279,7 +3279,7 @@ static void P_DoClimbing(player_t *player) ffloor_t *rover; for (rover = glidesector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) continue; bottomheight = P_GetFFloorBottomZAt(rover, player->mo->x, player->mo->y); @@ -3319,7 +3319,7 @@ static void P_DoClimbing(player_t *player) ffloor_t *rover; for (rover = glidesector->sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_BLOCKPLAYER) || ((rover->flags & FF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_BLOCKPLAYER) || ((rover->fofflags & FOF_BUSTUP) && (player->charflags & SF_CANBUSTWALLS))) continue; topheight = P_GetFFloorTopZAt(rover, player->mo->x, player->mo->y); @@ -3693,14 +3693,14 @@ static void P_DoTeeter(player_t *player) for (rover = sec->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) continue; + if (!(rover->fofflags & FOF_EXISTS)) continue; topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y); bottomheight = P_GetFFloorBottomZAt(rover, player->mo->x, player->mo->y); if (P_CheckSolidLava(rover)) ; - else if (!(rover->flags & FF_BLOCKPLAYER || rover->flags & FF_QUICKSAND)) + else if (!(rover->fofflags & FOF_BLOCKPLAYER || rover->fofflags & FOF_QUICKSAND)) continue; // intangible 3d floor if (player->mo->eflags & MFE_VERTICALFLIP) @@ -10072,7 +10072,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall for (rover = newsubsec->sector->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if (!(rover->flags & FF_BLOCKOTHERS) || !(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) + if (!(rover->fofflags & FOF_BLOCKOTHERS) || !(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERALL) || (rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) continue; topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, midx, midy, NULL); @@ -10198,7 +10198,7 @@ boolean P_MoveChaseCamera(player_t *player, camera_t *thiscam, boolean resetcall for (rover = newsubsec->sector->ffloors; rover; rover = rover->next) { fixed_t topheight, bottomheight; - if ((rover->flags & FF_BLOCKOTHERS) && (rover->flags & FF_RENDERALL) && (rover->flags & FF_EXISTS) && !(rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) + if ((rover->fofflags & FOF_BLOCKOTHERS) && (rover->fofflags & FOF_RENDERALL) && (rover->fofflags & FOF_EXISTS) && !(rover->master->frontsector->flags & MSF_NOCLIPCAMERA)) { topheight = P_CameraGetFOFTopZ(thiscam, newsubsec->sector, rover, midx, midy, NULL); bottomheight = P_CameraGetFOFBottomZ(thiscam, newsubsec->sector, rover, midx, midy, NULL); @@ -10515,7 +10515,7 @@ static void P_CalcPostImg(player_t *player) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_EXISTS)) continue; topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y); @@ -10541,7 +10541,7 @@ static void P_CalcPostImg(player_t *player) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE) || rover->flags & FF_BLOCKPLAYER) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE) || rover->fofflags & FOF_BLOCKPLAYER) continue; topheight = P_GetFFloorTopZAt (rover, player->mo->x, player->mo->y); @@ -10604,7 +10604,7 @@ static sector_t *P_GetMinecartSector(fixed_t x, fixed_t y, fixed_t z, fixed_t *n ffloor_t *rover; for (rover = sec->ffloors; rover; rover = rover->next) { - if (!(rover->flags & (FF_EXISTS|FF_BLOCKOTHERS))) + if (!(rover->fofflags & (FOF_EXISTS|FOF_BLOCKOTHERS))) continue; *nz = P_GetFFloorTopZAt(rover, x, y); @@ -12248,7 +12248,7 @@ static boolean P_MobjAboveLava(mobj_t *mobj) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_SWIMMABLE)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_SWIMMABLE)) continue; if (rover->master->frontsector->damagetype != SD_FIRE && rover->master->frontsector->damagetype != SD_LAVA) @@ -12589,6 +12589,29 @@ void P_PlayerAfterThink(player_t *player) break; } + case CR_FAN: + { + fixed_t zdist; + mobj_t *mo = player->mo, *fan = player->mo->tracer; + + if (!(player->pflags & PF_JUMPSTASIS)) + player->pflags |= PF_JUMPSTASIS; + + if (fan->eflags & MFE_VERTICALFLIP) + zdist = (mo->z + mo->height) - (fan->z + fan->height); + else + zdist = mo->z - fan->z; + + if ((fan->type != MT_FAN && !P_PlayerTouchingSectorSpecialFlag(player, SSF_FAN)) + || (fan->type == MT_FAN && (abs(mo->x - fan->x) > fan->radius || abs(mo->y - fan->y) > fan->radius || zdist > (fan->health << FRACBITS)))) + { + P_SetTarget(&player->mo->tracer, NULL); + player->pflags &= ~PF_JUMPSTASIS; + player->powers[pw_carry] = CR_NONE; + break; + } + break; + } case CR_ROLLOUT: { mobj_t *mo = player->mo, *rock = player->mo->tracer; diff --git a/src/r_bsp.c b/src/r_bsp.c index f0a761d7b..c9591b254 100644 --- a/src/r_bsp.c +++ b/src/r_bsp.c @@ -919,7 +919,7 @@ static void R_Subsector(size_t num) for (rover = frontsector->ffloors; rover && numffloors < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES)) continue; if (frontsector->cullheight) @@ -939,8 +939,8 @@ static void R_Subsector(size_t num) planecenterz = P_GetFFloorBottomZAt(rover, frontsector->soundorg.x, frontsector->soundorg.y); if (planecenterz <= ceilingcenterz && planecenterz >= floorcenterz - && ((viewz < heightcheck && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) - || (viewz > heightcheck && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + && ((viewz < heightcheck && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) + || (viewz > heightcheck && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { light = R_GetPlaneLight(frontsector, planecenterz, viewz < heightcheck); @@ -969,8 +969,8 @@ static void R_Subsector(size_t num) planecenterz = P_GetFFloorTopZAt(rover, frontsector->soundorg.x, frontsector->soundorg.y); if (planecenterz >= floorcenterz && planecenterz <= ceilingcenterz - && ((viewz > heightcheck && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) - || (viewz < heightcheck && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + && ((viewz > heightcheck && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) + || (viewz < heightcheck && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { light = R_GetPlaneLight(frontsector, planecenterz, viewz < heightcheck); @@ -1106,11 +1106,11 @@ void R_Prep3DFloors(sector_t *sector) count = 1; for (rover = sector->ffloors; rover; rover = rover->next) { - if ((rover->flags & FF_EXISTS) && (!(rover->flags & FF_NOSHADE) - || (rover->flags & FF_CUTLEVEL) || (rover->flags & FF_CUTSPRITES))) + if ((rover->fofflags & FOF_EXISTS) && (!(rover->fofflags & FOF_NOSHADE) + || (rover->fofflags & FOF_CUTLEVEL) || (rover->fofflags & FOF_CUTSPRITES))) { count++; - if (rover->flags & FF_DOUBLESHADOW) + if (rover->fofflags & FOF_DOUBLESHADOW) count++; } } @@ -1141,8 +1141,8 @@ void R_Prep3DFloors(sector_t *sector) for (rover = sector->ffloors; rover; rover = rover->next) { rover->lastlight = 0; - if (!(rover->flags & FF_EXISTS) || (rover->flags & FF_NOSHADE - && !(rover->flags & FF_CUTLEVEL) && !(rover->flags & FF_CUTSPRITES))) + if (!(rover->fofflags & FOF_EXISTS) || (rover->fofflags & FOF_NOSHADE + && !(rover->fofflags & FOF_CUTLEVEL) && !(rover->fofflags & FOF_CUTSPRITES))) continue; heighttest = P_GetFFloorTopZAt(rover, sector->soundorg.x, sector->soundorg.y); @@ -1154,7 +1154,7 @@ void R_Prep3DFloors(sector_t *sector) bestslope = *rover->t_slope; continue; } - if (rover->flags & FF_DOUBLESHADOW) { + if (rover->fofflags & FOF_DOUBLESHADOW) { heighttest = P_GetFFloorBottomZAt(rover, sector->soundorg.x, sector->soundorg.y); if (heighttest > bestheight @@ -1175,16 +1175,16 @@ void R_Prep3DFloors(sector_t *sector) sector->lightlist[i].height = maxheight = bestheight; sector->lightlist[i].caster = best; - sector->lightlist[i].flags = best->flags; + sector->lightlist[i].flags = best->fofflags; sector->lightlist[i].slope = bestslope; sec = §ors[best->secnum]; - if (best->flags & FF_NOSHADE) + if (best->fofflags & FOF_NOSHADE) { sector->lightlist[i].lightlevel = sector->lightlist[i-1].lightlevel; sector->lightlist[i].extra_colormap = sector->lightlist[i-1].extra_colormap; } - else if (best->flags & FF_COLORMAPONLY) + else if (best->fofflags & FOF_COLORMAPONLY) { sector->lightlist[i].lightlevel = sector->lightlist[i-1].lightlevel; sector->lightlist[i].extra_colormap = &sec->extra_colormap; @@ -1195,7 +1195,7 @@ void R_Prep3DFloors(sector_t *sector) sector->lightlist[i].extra_colormap = &sec->extra_colormap; } - if (best->flags & FF_DOUBLESHADOW) + if (best->fofflags & FOF_DOUBLESHADOW) { heighttest = P_GetFFloorBottomZAt(best, sector->soundorg.x, sector->soundorg.y); if (bestheight == heighttest) ///TODO: do this in a more efficient way -Red diff --git a/src/r_defs.h b/src/r_defs.h index 9788e6b58..6c9c91ab1 100644 --- a/src/r_defs.h +++ b/src/r_defs.h @@ -115,43 +115,84 @@ typedef struct */ typedef enum { - FF_EXISTS = 0x1, ///< Always set, to check for validity. - FF_BLOCKPLAYER = 0x2, ///< Solid to player, but nothing else - FF_BLOCKOTHERS = 0x4, ///< Solid to everything but player - FF_SOLID = 0x6, ///< Clips things. - FF_RENDERSIDES = 0x8, ///< Renders the sides. - FF_RENDERPLANES = 0x10, ///< Renders the floor/ceiling. - FF_RENDERALL = 0x18, ///< Renders everything. - FF_SWIMMABLE = 0x20, ///< Is a water block. - FF_NOSHADE = 0x40, ///< Messes with the lighting? - FF_CUTSOLIDS = 0x80, ///< Cuts out hidden solid pixels. - FF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels. - FF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels. - FF_CUTSPRITES = 0x200, ///< Final step in making 3D water. - FF_BOTHPLANES = 0x400, ///< Render inside and outside planes. - FF_EXTRA = 0x800, ///< Gets cut by ::FF_CUTEXTRA. - FF_TRANSLUCENT = 0x1000, ///< See through! - FF_FOG = 0x2000, ///< Fog "brush." - FF_INVERTPLANES = 0x4000, ///< Only render inside planes. - FF_ALLSIDES = 0x8000, ///< Render inside and outside sides. - FF_INVERTSIDES = 0x10000, ///< Only render inside sides. - FF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light? - FF_FLOATBOB = 0x40000, ///< Floats on water and bobs if you step on it. - FF_NORETURN = 0x80000, ///< Used with ::FF_CRUMBLE. Will not return to its original position after falling. - FF_CRUMBLE = 0x100000, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist). - FF_GOOWATER = 0x200000, ///< Used with ::FF_SWIMMABLE. Makes thick bouncey goop. - FF_MARIO = 0x400000, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector. - FF_BUSTUP = 0x800000, ///< You can spin through/punch this block and it will crumble! - FF_QUICKSAND = 0x1000000, ///< Quicksand! - FF_PLATFORM = 0x2000000, ///< You can jump up through this to the top. - FF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity. - FF_INTANGIBLEFLATS = 0x6000000, ///< Both flats are intangible, but the sides are still solid. - FF_RIPPLE = 0x8000000, ///< Ripple the flats - FF_COLORMAPONLY = 0x10000000, ///< Only copy the colormap, not the lightlevel - FF_BOUNCY = 0x20000000, ///< Bounces players - FF_SPLAT = 0x40000000, ///< Use splat flat renderer (treat cyan pixels as invisible) + FOF_EXISTS = 0x1, ///< Always set, to check for validity. + FOF_BLOCKPLAYER = 0x2, ///< Solid to player, but nothing else + FOF_BLOCKOTHERS = 0x4, ///< Solid to everything but player + FOF_SOLID = 0x6, ///< Clips things. + FOF_RENDERSIDES = 0x8, ///< Renders the sides. + FOF_RENDERPLANES = 0x10, ///< Renders the floor/ceiling. + FOF_RENDERALL = 0x18, ///< Renders everything. + FOF_SWIMMABLE = 0x20, ///< Is a water block. + FOF_NOSHADE = 0x40, ///< Messes with the lighting? + FOF_CUTSOLIDS = 0x80, ///< Cuts out hidden solid pixels. + FOF_CUTEXTRA = 0x100, ///< Cuts out hidden translucent pixels. + FOF_CUTLEVEL = 0x180, ///< Cuts out all hidden pixels. + FOF_CUTSPRITES = 0x200, ///< Final step in making 3D water. + FOF_BOTHPLANES = 0x400, ///< Render inside and outside planes. + FOF_EXTRA = 0x800, ///< Gets cut by ::FOF_CUTEXTRA. + FOF_TRANSLUCENT = 0x1000, ///< See through! + FOF_FOG = 0x2000, ///< Fog "brush." + FOF_INVERTPLANES = 0x4000, ///< Only render inside planes. + FOF_ALLSIDES = 0x8000, ///< Render inside and outside sides. + FOF_INVERTSIDES = 0x10000, ///< Only render inside sides. + FOF_DOUBLESHADOW = 0x20000, ///< Make two lightlist entries to reset light? + FOF_FLOATBOB = 0x40000, ///< Floats on water and bobs if you step on it. + FOF_NORETURN = 0x80000, ///< Used with ::FOF_CRUMBLE. Will not return to its original position after falling. + FOF_CRUMBLE = 0x100000, ///< Falls 2 seconds after being stepped on, and randomly brings all touching crumbling 3dfloors down with it, providing their master sectors share the same tag (allows crumble platforms above or below, to also exist). + FOF_GOOWATER = 0x200000, ///< Used with ::FOF_SWIMMABLE. Makes thick bouncey goop. + FOF_MARIO = 0x400000, ///< Acts like a question block when hit from underneath. Goodie spawned at top is determined by master sector. + FOF_BUSTUP = 0x800000, ///< You can spin through/punch this block and it will crumble! + FOF_QUICKSAND = 0x1000000, ///< Quicksand! + FOF_PLATFORM = 0x2000000, ///< You can jump up through this to the top. + FOF_REVERSEPLATFORM = 0x4000000, ///< A fall-through floor in normal gravity, a platform in reverse gravity. + FOF_INTANGIBLEFLATS = 0x6000000, ///< Both flats are intangible, but the sides are still solid. + FOF_RIPPLE = 0x8000000, ///< Ripple the flats + FOF_COLORMAPONLY = 0x10000000, ///< Only copy the colormap, not the lightlevel + FOF_BOUNCY = 0x20000000, ///< Bounces players + FOF_SPLAT = 0x40000000, ///< Use splat flat renderer (treat cyan pixels as invisible) } ffloortype_e; +typedef enum +{ + FF_OLD_EXISTS = 0x1, + FF_OLD_BLOCKPLAYER = 0x2, + FF_OLD_BLOCKOTHERS = 0x4, + FF_OLD_SOLID = 0x6, + FF_OLD_RENDERSIDES = 0x8, + FF_OLD_RENDERPLANES = 0x10, + FF_OLD_RENDERALL = 0x18, + FF_OLD_SWIMMABLE = 0x20, + FF_OLD_NOSHADE = 0x40, + FF_OLD_CUTSOLIDS = 0x80, + FF_OLD_CUTEXTRA = 0x100, + FF_OLD_CUTLEVEL = 0x180, + FF_OLD_CUTSPRITES = 0x200, + FF_OLD_BOTHPLANES = 0x400, + FF_OLD_EXTRA = 0x800, + FF_OLD_TRANSLUCENT = 0x1000, + FF_OLD_FOG = 0x2000, + FF_OLD_INVERTPLANES = 0x4000, + FF_OLD_ALLSIDES = 0x8000, + FF_OLD_INVERTSIDES = 0x10000, + FF_OLD_DOUBLESHADOW = 0x20000, + FF_OLD_FLOATBOB = 0x40000, + FF_OLD_NORETURN = 0x80000, + FF_OLD_CRUMBLE = 0x100000, + FF_OLD_SHATTERBOTTOM = 0x200000, + FF_OLD_GOOWATER = 0x200000, + FF_OLD_MARIO = 0x400000, + FF_OLD_BUSTUP = 0x800000, + FF_OLD_QUICKSAND = 0x1000000, + FF_OLD_PLATFORM = 0x2000000, + FF_OLD_REVERSEPLATFORM = 0x4000000, + FF_OLD_INTANGIBLEFLATS = 0x6000000, + FF_OLD_SHATTER = 0x8000000, + FF_OLD_SPINBUST = 0x10000000, + FF_OLD_STRONGBUST = 0x20000000, + FF_OLD_RIPPLE = 0x40000000, + FF_OLD_COLORMAPONLY = 0x80000000, +} oldffloortype_e; + typedef enum { FB_PUSHABLES = 0x1, // Bustable by pushables @@ -187,7 +228,7 @@ typedef struct ffloor_s struct pslope_s **b_slope; size_t secnum; - ffloortype_e flags; + ffloortype_e fofflags; struct line_s *master; struct sector_s *target; @@ -200,16 +241,16 @@ typedef struct ffloor_s UINT8 blend; // blendmode tic_t norender; // for culling - // Only relevant for FF_BUSTUP + // Only relevant for FOF_BUSTUP ffloorbustflags_e bustflags; UINT8 busttype; INT16 busttag; - // Only relevant for FF_QUICKSAND + // Only relevant for FOF_QUICKSAND fixed_t sinkspeed; fixed_t friction; - // Only relevant for FF_BOUNCY + // Only relevant for FOF_BOUNCY fixed_t bouncestrength; // these are saved for netgames, so do not let Lua touch these! @@ -230,7 +271,7 @@ typedef struct lightlist_s extracolormap_t **extra_colormap; // pointer-to-a-pointer, so we can react to colormap changes INT32 flags; ffloor_t *caster; - struct pslope_s *slope; // FF_DOUBLESHADOW makes me have to store this pointer here. Bluh bluh. + struct pslope_s *slope; // FOF_DOUBLESHADOW makes me have to store this pointer here. Bluh bluh. } lightlist_t; diff --git a/src/r_draw8.c b/src/r_draw8.c index c9a9e9575..4504ad1bd 100644 --- a/src/r_draw8.c +++ b/src/r_draw8.c @@ -2128,7 +2128,7 @@ void R_DrawColumnShadowed_8(void) { // If the height of the light is above the column, get the colormap // anyway because the lighting of the top should be affected. - solid = dc_lightlist[i].flags & FF_CUTSOLIDS; + solid = dc_lightlist[i].flags & FOF_CUTSOLIDS; height = dc_lightlist[i].height >> LIGHTSCALESHIFT; if (solid) diff --git a/src/r_plane.c b/src/r_plane.c index 7ea10f616..5f0ed9340 100644 --- a/src/r_plane.c +++ b/src/r_plane.c @@ -836,13 +836,13 @@ void R_DrawSinglePlane(visplane_t *pl) // Don't draw planes that shouldn't be drawn. for (rover = pl->ffloor->target->ffloors; rover; rover = rover->next) { - if ((pl->ffloor->flags & FF_CUTEXTRA) && (rover->flags & FF_EXTRA)) + if ((pl->ffloor->fofflags & FOF_CUTEXTRA) && (rover->fofflags & FOF_EXTRA)) { - if (pl->ffloor->flags & FF_EXTRA) + if (pl->ffloor->fofflags & FOF_EXTRA) { // The plane is from an extra 3D floor... Check the flags so // there are no undesired cuts. - if (((pl->ffloor->flags & (FF_FOG|FF_SWIMMABLE)) == (rover->flags & (FF_FOG|FF_SWIMMABLE))) + if (((pl->ffloor->fofflags & (FOF_FOG|FOF_SWIMMABLE)) == (rover->fofflags & (FOF_FOG|FOF_SWIMMABLE))) && pl->height < *rover->topheight && pl->height > *rover->bottomheight) return; @@ -850,9 +850,9 @@ void R_DrawSinglePlane(visplane_t *pl) } } - if (pl->ffloor->flags & FF_TRANSLUCENT) + if (pl->ffloor->fofflags & FOF_TRANSLUCENT) { - spanfunctype = (pl->ffloor->flags & FF_SPLAT) ? SPANDRAWFUNC_TRANSSPLAT : SPANDRAWFUNC_TRANS; + spanfunctype = (pl->ffloor->fofflags & FOF_SPLAT) ? SPANDRAWFUNC_TRANSSPLAT : SPANDRAWFUNC_TRANS; // Hacked up support for alpha value in software mode Tails 09-24-2002 // ...unhacked by toaster 04-01-2021, re-hacked a little by sphere 19-11-2021 @@ -871,14 +871,14 @@ void R_DrawSinglePlane(visplane_t *pl) else light = LIGHTLEVELS-1; } - else if (pl->ffloor->flags & FF_FOG) + else if (pl->ffloor->fofflags & FOF_FOG) { spanfunctype = SPANDRAWFUNC_FOG; light = (pl->lightlevel >> LIGHTSEGSHIFT); } else light = (pl->lightlevel >> LIGHTSEGSHIFT); - if (pl->ffloor->flags & FF_RIPPLE) + if (pl->ffloor->fofflags & FOF_RIPPLE) { INT32 top, bottom; diff --git a/src/r_segs.c b/src/r_segs.c index c9f5f0d7b..43a7f945f 100644 --- a/src/r_segs.c +++ b/src/r_segs.c @@ -244,7 +244,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) rlight->flags = light->flags; if ((colfunc != colfuncs[COLDRAWFUNC_FUZZY]) - || (rlight->flags & FF_FOG) + || (rlight->flags & FOF_FOG) || (rlight->extra_colormap && (rlight->extra_colormap->flags & CMF_FOG))) lightnum = (rlight->lightlevel >> LIGHTSEGSHIFT); else @@ -387,7 +387,7 @@ void R_RenderMaskedSegRange(drawseg_t *ds, INT32 x1, INT32 x2) { rlight = &dc_lightlist[i]; - if ((rlight->flags & FF_NOSHADE)) + if ((rlight->flags & FOF_NOSHADE)) continue; if (rlight->lightnum < 0) @@ -547,7 +547,7 @@ static boolean R_IsFFloorTranslucent(visffloor_t *pfloor) // Polyobjects have no ffloors, and they're handled in the conditional above. if (pfloor->ffloor != NULL) - return (pfloor->ffloor->flags & (FF_TRANSLUCENT|FF_FOG)); + return (pfloor->ffloor->fofflags & (FOF_TRANSLUCENT|FOF_FOG)); return false; } @@ -602,7 +602,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) texnum = R_GetTextureNum(sides[newline->sidenum[0]].midtexture); } - if (pfloor->flags & FF_TRANSLUCENT) + if (pfloor->fofflags & FOF_TRANSLUCENT) { boolean fuzzy = true; @@ -621,7 +621,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) if (fuzzy) colfunc = colfuncs[COLDRAWFUNC_FUZZY]; } - else if (pfloor->flags & FF_FOG) + else if (pfloor->fofflags & FOF_FOG) colfunc = colfuncs[COLDRAWFUNC_FOG]; range = max(ds->x2-ds->x1, 1); @@ -684,7 +684,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) else rlight->heightstep = CLAMPMIN; rlight->heightstep = (rlight->heightstep-rlight->height)/(range); rlight->flags = light->flags; - if (light->flags & FF_CUTLEVEL) + if (light->flags & FOF_CUTLEVEL) { SLOPEPARAMS(*light->caster->b_slope, leftheight, rightheight, *light->caster->bottomheight) #undef SLOPEPARAMS @@ -708,12 +708,12 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) rlight->extra_colormap = *light->extra_colormap; // Check if the current light effects the colormap/lightlevel - if (pfloor->flags & FF_FOG) + if (pfloor->fofflags & FOF_FOG) rlight->lightnum = (pfloor->master->frontsector->lightlevel >> LIGHTSEGSHIFT); else rlight->lightnum = (rlight->lightlevel >> LIGHTSEGSHIFT); - if (pfloor->flags & FF_FOG || rlight->flags & FF_FOG || (rlight->extra_colormap && (rlight->extra_colormap->flags & CMF_FOG))) + if (pfloor->fofflags & FOF_FOG || rlight->flags & FOF_FOG || (rlight->extra_colormap && (rlight->extra_colormap->flags & CMF_FOG))) ; else if (curline->v1->y == curline->v2->y) rlight->lightnum--; @@ -730,7 +730,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) // Get correct light level! if ((frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG))) lightnum = (frontsector->lightlevel >> LIGHTSEGSHIFT); - else if (pfloor->flags & FF_FOG) + else if (pfloor->fofflags & FOF_FOG) lightnum = (pfloor->master->frontsector->lightlevel >> LIGHTSEGSHIFT); else if (colfunc == colfuncs[COLDRAWFUNC_FUZZY]) lightnum = LIGHTLEVELS-1; @@ -738,7 +738,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) lightnum = R_FakeFlat(frontsector, &tempsec, &templight, &templight, false) ->lightlevel >> LIGHTSEGSHIFT; - if (pfloor->flags & FF_FOG || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG))); + if (pfloor->fofflags & FOF_FOG || (frontsector->extra_colormap && (frontsector->extra_colormap->flags & CMF_FOG))); else if (curline->v1->y == curline->v2->y) lightnum--; else if (curline->v1->x == curline->v2->x) @@ -885,7 +885,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) { rlight = &dc_lightlist[i]; rlight->height += rlight->heightstep; - if (rlight->flags & FF_CUTLEVEL) + if (rlight->flags & FOF_CUTLEVEL) rlight->botheight += rlight->botheightstep; } } @@ -912,7 +912,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) { // Check if the current light effects the colormap/lightlevel rlight = &dc_lightlist[i]; - lighteffect = !(dc_lightlist[i].flags & FF_NOSHADE); + lighteffect = !(dc_lightlist[i].flags & FOF_NOSHADE); if (lighteffect) { lightnum = rlight->lightnum; @@ -929,7 +929,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) if (pindex >= MAXLIGHTSCALE) pindex = MAXLIGHTSCALE-1; - if (pfloor->flags & FF_FOG) + if (pfloor->fofflags & FOF_FOG) { if (pfloor->master->frontsector->extra_colormap) rlight->rcolormap = pfloor->master->frontsector->extra_colormap->colormap + (xwalllights[pindex] - colormaps); @@ -948,15 +948,15 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) solid = 0; // don't carry over solid-cutting flag from the previous light // Check if the current light can cut the current 3D floor. - if (rlight->flags & FF_CUTSOLIDS && !(pfloor->flags & FF_EXTRA)) + if (rlight->flags & FOF_CUTSOLIDS && !(pfloor->fofflags & FOF_EXTRA)) solid = 1; - else if (rlight->flags & FF_CUTEXTRA && pfloor->flags & FF_EXTRA) + else if (rlight->flags & FOF_CUTEXTRA && pfloor->fofflags & FOF_EXTRA) { - if (rlight->flags & FF_EXTRA) + if (rlight->flags & FOF_EXTRA) { // The light is from an extra 3D floor... Check the flags so // there are no undesired cuts. - if ((rlight->flags & (FF_FOG|FF_SWIMMABLE)) == (pfloor->flags & (FF_FOG|FF_SWIMMABLE))) + if ((rlight->flags & (FOF_FOG|FOF_SWIMMABLE)) == (pfloor->fofflags & (FOF_FOG|FOF_SWIMMABLE))) solid = 1; } else @@ -993,7 +993,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) { rlight = &dc_lightlist[i]; rlight->height += rlight->heightstep; - if (rlight->flags & FF_CUTLEVEL) + if (rlight->flags & FOF_CUTLEVEL) rlight->botheight += rlight->botheightstep; } continue; @@ -1024,7 +1024,7 @@ void R_RenderThickSideRange(drawseg_t *ds, INT32 x1, INT32 x2, ffloor_t *pfloor) dc_colormap = walllights[pindex]; - if (pfloor->flags & FF_FOG && pfloor->master->frontsector->extra_colormap) + if (pfloor->fofflags & FOF_FOG && pfloor->master->frontsector->extra_colormap) dc_colormap = pfloor->master->frontsector->extra_colormap->colormap + (dc_colormap - colormaps); else if (frontsector->extra_colormap) dc_colormap = frontsector->extra_colormap->colormap + (dc_colormap - colormaps); @@ -1466,7 +1466,7 @@ static void R_RenderSegLoop (void) for (i = 0; i < dc_numlights; i++) { dc_lightlist[i].height += dc_lightlist[i].heightstep; - if (dc_lightlist[i].flags & FF_CUTSOLIDS) + if (dc_lightlist[i].flags & FOF_CUTSOLIDS) dc_lightlist[i].botheight += dc_lightlist[i].botheightstep; } } @@ -2052,9 +2052,9 @@ void R_StoreWallRange(INT32 start, INT32 stop) i = 0; for (rover = backsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES) + if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES) continue; if (rover->norender == leveltime) @@ -2071,23 +2071,23 @@ void R_StoreWallRange(INT32 start, INT32 stop) if (r2->master == rover->master) // Skip if same control line. break; - if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES)) + if (!(r2->fofflags & FOF_EXISTS) || !(r2->fofflags & FOF_RENDERSIDES)) continue; if (r2->norender == leveltime) continue; - if (rover->flags & FF_EXTRA) + if (rover->fofflags & FOF_EXTRA) { - if (!(r2->flags & FF_CUTEXTRA)) + if (!(r2->fofflags & FOF_CUTEXTRA)) continue; - if (r2->flags & FF_EXTRA && (r2->flags & (FF_TRANSLUCENT|FF_FOG)) != (rover->flags & (FF_TRANSLUCENT|FF_FOG))) + if (r2->fofflags & FOF_EXTRA && (r2->fofflags & (FOF_TRANSLUCENT|FOF_FOG)) != (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG))) continue; } else { - if (!(r2->flags & FF_CUTSOLIDS)) + if (!(r2->fofflags & FOF_CUTSOLIDS)) continue; } @@ -2110,9 +2110,9 @@ void R_StoreWallRange(INT32 start, INT32 stop) for (rover = frontsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES)) + if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES)) continue; if (rover->norender == leveltime) @@ -2129,23 +2129,23 @@ void R_StoreWallRange(INT32 start, INT32 stop) if (r2->master == rover->master) // Skip if same control line. break; - if (!(r2->flags & FF_EXISTS) || !(r2->flags & FF_RENDERSIDES)) + if (!(r2->fofflags & FOF_EXISTS) || !(r2->fofflags & FOF_RENDERSIDES)) continue; if (r2->norender == leveltime) continue; - if (rover->flags & FF_EXTRA) + if (rover->fofflags & FOF_EXTRA) { - if (!(r2->flags & FF_CUTEXTRA)) + if (!(r2->fofflags & FOF_CUTEXTRA)) continue; - if (r2->flags & FF_EXTRA && (r2->flags & (FF_TRANSLUCENT|FF_FOG)) != (rover->flags & (FF_TRANSLUCENT|FF_FOG))) + if (r2->fofflags & FOF_EXTRA && (r2->fofflags & (FOF_TRANSLUCENT|FOF_FOG)) != (rover->fofflags & (FOF_TRANSLUCENT|FOF_FOG))) continue; } else { - if (!(r2->flags & FF_CUTSOLIDS)) + if (!(r2->fofflags & FOF_CUTSOLIDS)) continue; } @@ -2170,9 +2170,9 @@ void R_StoreWallRange(INT32 start, INT32 stop) { for (rover = backsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_ALLSIDES) && rover->flags & FF_INVERTSIDES) + if (!(rover->fofflags & FOF_ALLSIDES) && rover->fofflags & FOF_INVERTSIDES) continue; if (rover->norender == leveltime) continue; @@ -2192,9 +2192,9 @@ void R_StoreWallRange(INT32 start, INT32 stop) { for (rover = frontsector->ffloors, i = 0; rover && i < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_RENDERSIDES) || !(rover->flags & FF_EXISTS)) + if (!(rover->fofflags & FOF_RENDERSIDES) || !(rover->fofflags & FOF_EXISTS)) continue; - if (!(rover->flags & FF_ALLSIDES || rover->flags & FF_INVERTSIDES)) + if (!(rover->fofflags & FOF_ALLSIDES || rover->fofflags & FOF_INVERTSIDES)) continue; if (rover->norender == leveltime) continue; @@ -2416,7 +2416,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) rlight->heightstep = (rlight->heightstep-rlight->height)/(range); rlight->flags = light->flags; - if (light->caster && light->caster->flags & FF_CUTSOLIDS) + if (light->caster && light->caster->fofflags & FOF_CUTSOLIDS) { leftheight = P_GetFFloorBottomZAt(light->caster, segleft.x, segleft.y); rightheight = P_GetFFloorBottomZAt(light->caster, segright.x, segright.y); @@ -2503,7 +2503,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) { for (rover = backsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES)) continue; if (rover->norender == leveltime) continue; @@ -2518,8 +2518,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) && (roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) && - ((viewz < planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) || - (viewz > planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) || + (viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { //ffloor[i].slope = *rover->b_slope; ffloor[i].b_pos = roverleft; @@ -2541,8 +2541,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) && (roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) && - ((viewz > planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) || - (viewz < planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) || + (viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { //ffloor[i].slope = *rover->t_slope; ffloor[i].b_pos = roverleft; @@ -2560,7 +2560,7 @@ void R_StoreWallRange(INT32 start, INT32 stop) { for (rover = frontsector->ffloors; rover && i < MAXFFLOORS; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES)) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES)) continue; if (rover->norender == leveltime) continue; @@ -2575,8 +2575,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) && (roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) && - ((viewz < planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) || - (viewz > planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) || + (viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { //ffloor[i].slope = *rover->b_slope; ffloor[i].b_pos = roverleft; @@ -2598,8 +2598,8 @@ void R_StoreWallRange(INT32 start, INT32 stop) if ((roverleft>>4 <= worldhigh || roverright>>4 <= worldhighslope) && (roverleft>>4 >= worldlow || roverright>>4 >= worldlowslope) && - ((viewz > planevistest && (rover->flags & FF_BOTHPLANES || !(rover->flags & FF_INVERTPLANES))) || - (viewz < planevistest && (rover->flags & FF_BOTHPLANES || rover->flags & FF_INVERTPLANES)))) + ((viewz > planevistest && (rover->fofflags & FOF_BOTHPLANES || !(rover->fofflags & FOF_INVERTPLANES))) || + (viewz < planevistest && (rover->fofflags & FOF_BOTHPLANES || rover->fofflags & FOF_INVERTPLANES)))) { //ffloor[i].slope = *rover->t_slope; ffloor[i].b_pos = roverleft; diff --git a/src/r_things.c b/src/r_things.c index db4263a6a..e689e284a 100644 --- a/src/r_things.c +++ b/src/r_things.c @@ -754,13 +754,13 @@ UINT8 *R_GetSpriteTranslation(vissprite_t *vis) else if (vis->mobj->type == MT_METALSONIC_BATTLE) return R_GetTranslationColormap(TC_METALSONIC, 0, GTC_CACHE); else - return R_GetTranslationColormap(TC_BOSS, vis->mobj->color, GTC_CACHE); + return R_GetTranslationColormap(TC_BOSS, vis->color, GTC_CACHE); } - else if (vis->mobj->color) + else if (vis->color) { // New colormap stuff for skins Tails 06-07-2002 if (!(vis->cut & SC_PRECIP) && vis->mobj->colorized) - return R_GetTranslationColormap(TC_RAINBOW, vis->mobj->color, GTC_CACHE); + return R_GetTranslationColormap(TC_RAINBOW, vis->color, GTC_CACHE); else if (!(vis->cut & SC_PRECIP) && vis->mobj->player && vis->mobj->player->dashmode >= DASHMODE_THRESHOLD && (vis->mobj->player->charflags & SF_DASHMODE) @@ -769,15 +769,15 @@ UINT8 *R_GetSpriteTranslation(vissprite_t *vis) if (vis->mobj->player->charflags & SF_MACHINE) return R_GetTranslationColormap(TC_DASHMODE, 0, GTC_CACHE); else - return R_GetTranslationColormap(TC_RAINBOW, vis->mobj->color, GTC_CACHE); + return R_GetTranslationColormap(TC_RAINBOW, vis->color, GTC_CACHE); } else if (!(vis->cut & SC_PRECIP) && vis->mobj->skin && vis->mobj->sprite == SPR_PLAY) // This thing is a player! { size_t skinnum = (skin_t*)vis->mobj->skin-skins; - return R_GetTranslationColormap((INT32)skinnum, vis->mobj->color, GTC_CACHE); + return R_GetTranslationColormap((INT32)skinnum, vis->color, GTC_CACHE); } else // Use the defaults - return R_GetTranslationColormap(TC_DEFAULT, vis->mobj->color, GTC_CACHE); + return R_GetTranslationColormap(TC_DEFAULT, vis->color, GTC_CACHE); } else if (vis->mobj->sprite == SPR_PLAY) // Looks like a player, but doesn't have a color? Get rid of green sonic syndrome. return R_GetTranslationColormap(TC_DEFAULT, SKINCOLOR_BLUE, GTC_CACHE); @@ -822,7 +822,7 @@ static void R_DrawVisSprite(vissprite_t *vis) if (R_SpriteIsFlashing(vis)) // Bosses "flash" colfunc = colfuncs[COLDRAWFUNC_TRANS]; // translate certain pixels to white - else if (vis->mobj->color && vis->transmap) // Color mapping + else if (vis->color && vis->transmap) // Color mapping { colfunc = colfuncs[COLDRAWFUNC_TRANSTRANS]; dc_transmap = vis->transmap; @@ -832,7 +832,7 @@ static void R_DrawVisSprite(vissprite_t *vis) colfunc = colfuncs[COLDRAWFUNC_FUZZY]; dc_transmap = vis->transmap; //Fab : 29-04-98: translucency table } - else if (vis->mobj->color) // translate green skin to another color + else if (vis->color) // translate green skin to another color colfunc = colfuncs[COLDRAWFUNC_TRANS]; else if (vis->mobj->sprite == SPR_PLAY) // Looks like a player, but doesn't have a color? Get rid of green sonic syndrome. colfunc = colfuncs[COLDRAWFUNC_TRANS]; @@ -1055,7 +1055,7 @@ static void R_SplitSprite(vissprite_t *sprite) { fixed_t testheight; - if (!(sector->lightlist[i].caster->flags & FF_CUTSPRITES)) + if (!(sector->lightlist[i].caster->fofflags & FOF_CUTSPRITES)) continue; testheight = P_GetLightZAt(§or->lightlist[i], sprite->gx, sprite->gy); @@ -1096,7 +1096,7 @@ static void R_SplitSprite(vissprite_t *sprite) newsprite->szt -= 8; newsprite->cut |= SC_TOP; - if (!(sector->lightlist[i].caster->flags & FF_NOSHADE)) + if (!(sector->lightlist[i].caster->fofflags & FOF_NOSHADE)) { lightnum = (*sector->lightlist[i].lightlevel >> LIGHTSEGSHIFT); @@ -1162,7 +1162,7 @@ fixed_t R_GetShadowZ(mobj_t *thing, pslope_t **shadowslope) if (sector->ffloors) for (rover = sector->ffloors; rover; rover = rover->next) { - if (!(rover->flags & FF_EXISTS) || !(rover->flags & FF_RENDERPLANES) || (rover->alpha < 90 && !(rover->flags & FF_SWIMMABLE))) + if (!(rover->fofflags & FOF_EXISTS) || !(rover->fofflags & FOF_RENDERPLANES) || (rover->alpha < 90 && !(rover->fofflags & FOF_SWIMMABLE))) continue; z = isflipped ? P_GetFFloorBottomZAt(rover, thing->x, thing->y) : P_GetFFloorTopZAt(rover, thing->x, thing->y); @@ -1356,6 +1356,7 @@ static void R_ProjectDropShadow(mobj_t *thing, vissprite_t *vis, fixed_t scale, shadow->shear.tan = shadowskew; // repurposed variable shadow->mobj = thing; // Easy access! Tails 06-07-2002 + shadow->color = thing->color; shadow->x1 = x1 < portalclipstart ? portalclipstart : x1; shadow->x2 = x2 >= portalclipend ? portalclipend-1 : x2; @@ -2015,6 +2016,10 @@ static void R_ProjectSprite(mobj_t *thing) vis->viewpoint.angle = viewangle; vis->mobj = thing; // Easy access! Tails 06-07-2002 + if ((oldthing->flags2 & MF2_LINKDRAW) && oldthing->tracer && oldthing->color == SKINCOLOR_NONE) + vis->color = oldthing->tracer->color; + else + vis->color = oldthing->color; vis->x1 = x1 < portalclipstart ? portalclipstart : x1; vis->x2 = x2 >= portalclipend ? portalclipend-1 : x2; @@ -2268,6 +2273,7 @@ static void R_ProjectPrecipitationSprite(precipmobj_t *thing) vis->cut = SC_PRECIP; vis->extra_colormap = thing->subsector->sector->extra_colormap; vis->heightsec = thing->subsector->sector->heightsec; + vis->color = SKINCOLOR_NONE; // Fullbright vis->colormap = colormaps; diff --git a/src/r_things.h b/src/r_things.h index 857b03b24..f0a5751e8 100644 --- a/src/r_things.h +++ b/src/r_things.h @@ -207,6 +207,8 @@ typedef struct vissprite_s fixed_t shadowscale; + skincolornum_t color; + INT16 clipbot[MAXVIDWIDTH], cliptop[MAXVIDWIDTH]; INT32 dispoffset; // copy of info->dispoffset, affects ordering but not drawing diff --git a/src/s_sound.c b/src/s_sound.c index 7e61e8a55..752eb275a 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -222,7 +222,7 @@ static INT32 S_getChannel(const void *origin, sfxinfo_t *sfxinfo) } else if (origin && channels[cnum].origin == origin && channels[cnum].sfxinfo->name != sfxinfo->name - && channels[cnum].sfxinfo->pitch == SF_TOTALLYSINGLE && sfxinfo->pitch == SF_TOTALLYSINGLE) + && channels[cnum].sfxinfo->pitch & SF_TOTALLYSINGLE && sfxinfo->pitch & SF_TOTALLYSINGLE) { S_StopChannel(cnum); break; diff --git a/src/sdl/i_system.c b/src/sdl/i_system.c index 9de632734..22d6de831 100644 --- a/src/sdl/i_system.c +++ b/src/sdl/i_system.c @@ -143,21 +143,32 @@ typedef LPVOID (WINAPI *p_MapViewOfFile) (HANDLE, DWORD, DWORD, DWORD, SIZE_T); #define UNIXBACKTRACE #endif -// Locations for searching the srb2.pk3 +// Locations to directly check for srb2.pk3 in +const char *wadDefaultPaths[] = { #if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) -#define DEFAULTWADLOCATION1 "/usr/local/share/games/SRB2" -#define DEFAULTWADLOCATION2 "/usr/local/games/SRB2" -#define DEFAULTWADLOCATION3 "/usr/share/games/SRB2" -#define DEFAULTWADLOCATION4 "/usr/games/SRB2" -#define DEFAULTSEARCHPATH1 "/usr/local/games" -#define DEFAULTSEARCHPATH2 "/usr/games" -#define DEFAULTSEARCHPATH3 "/usr/local" + "/usr/local/share/games/SRB2", + "/usr/local/games/SRB2", + "/usr/share/games/SRB2", + "/usr/games/SRB2", #elif defined (_WIN32) -#define DEFAULTWADLOCATION1 "c:\\games\\srb2" -#define DEFAULTWADLOCATION2 "\\games\\srb2" -#define DEFAULTSEARCHPATH1 "c:\\games" -#define DEFAULTSEARCHPATH2 "\\games" + "c:\\games\\srb2", + "\\games\\srb2", #endif + NULL +}; + +// Folders to recurse through looking for srb2.pk3 +const char *wadSearchPaths[] = { +#if defined (__unix__) || defined(__APPLE__) || defined (UNIXCOMMON) + "/usr/local/games", + "/usr/games", + "/usr/local", +#elif defined (_WIN32) + "c:\\games", + "\\games", +#endif + NULL +}; /** \brief WAD file to look for */ @@ -2808,6 +2819,20 @@ static const char *searchWad(const char *searchDir) return NULL; } +#define CHECKWADPATH(ret) \ +do { \ + I_OutputMsg(",%s", returnWadPath); \ + if (isWadPathOk(returnWadPath)) \ + return ret; \ +} while (0) + +#define SEARCHWAD(str) \ +do { \ + WadPath = searchWad(str); \ + if (WadPath) \ + return WadPath; \ +} while (0) + /** \brief go through all possible paths and look for srb2.pk3 \return path to srb2.pk3 if any @@ -2816,6 +2841,7 @@ static const char *locateWad(void) { const char *envstr; const char *WadPath; + int i; I_OutputMsg("SRB2WADDIR"); // does SRB2WADDIR exist? @@ -2823,108 +2849,44 @@ static const char *locateWad(void) return envstr; #ifndef NOCWD - I_OutputMsg(",."); // examine current dir strcpy(returnWadPath, "."); - if (isWadPathOk(returnWadPath)) - return NULL; + CHECKWADPATH(NULL); #endif - #ifdef CMAKECONFIG #ifndef NDEBUG - I_OutputMsg(","CMAKE_ASSETS_DIR); strcpy(returnWadPath, CMAKE_ASSETS_DIR); - if (isWadPathOk(returnWadPath)) - { - return returnWadPath; - } + CHECKWADPATH(returnWadPath); #endif #endif #ifdef __APPLE__ OSX_GetResourcesPath(returnWadPath); - I_OutputMsg(",%s", returnWadPath); - if (isWadPathOk(returnWadPath)) - { - return returnWadPath; - } + CHECKWADPATH(returnWadPath); #endif // examine default dirs -#ifdef DEFAULTWADLOCATION1 - I_OutputMsg(","DEFAULTWADLOCATION1); - strcpy(returnWadPath, DEFAULTWADLOCATION1); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION2 - I_OutputMsg(","DEFAULTWADLOCATION2); - strcpy(returnWadPath, DEFAULTWADLOCATION2); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION3 - I_OutputMsg(","DEFAULTWADLOCATION3); - strcpy(returnWadPath, DEFAULTWADLOCATION3); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION4 - I_OutputMsg(","DEFAULTWADLOCATION4); - strcpy(returnWadPath, DEFAULTWADLOCATION4); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION5 - I_OutputMsg(","DEFAULTWADLOCATION5); - strcpy(returnWadPath, DEFAULTWADLOCATION5); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION6 - I_OutputMsg(","DEFAULTWADLOCATION6); - strcpy(returnWadPath, DEFAULTWADLOCATION6); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif -#ifdef DEFAULTWADLOCATION7 - I_OutputMsg(","DEFAULTWADLOCATION7); - strcpy(returnWadPath, DEFAULTWADLOCATION7); - if (isWadPathOk(returnWadPath)) - return returnWadPath; -#endif + for (i = 0; wadDefaultPaths[i]; i++) + { + strcpy(returnWadPath, wadDefaultPaths[i]); + CHECKWADPATH(returnWadPath); + } + #ifndef NOHOME // find in $HOME I_OutputMsg(",HOME"); if ((envstr = I_GetEnv("HOME")) != NULL) + SEARCHWAD(envstr); +#endif + + // search paths + for (i = 0; wadSearchPaths[i]; i++) { - WadPath = searchWad(envstr); - if (WadPath) - return WadPath; + I_OutputMsg(", in:%s", wadSearchPaths[i]); + SEARCHWAD(wadSearchPaths[i]); } -#endif -#ifdef DEFAULTSEARCHPATH1 - // find in /usr/local - I_OutputMsg(", in:"DEFAULTSEARCHPATH1); - WadPath = searchWad(DEFAULTSEARCHPATH1); - if (WadPath) - return WadPath; -#endif -#ifdef DEFAULTSEARCHPATH2 - // find in /usr/games - I_OutputMsg(", in:"DEFAULTSEARCHPATH2); - WadPath = searchWad(DEFAULTSEARCHPATH2); - if (WadPath) - return WadPath; -#endif -#ifdef DEFAULTSEARCHPATH3 - // find in ??? - I_OutputMsg(", in:"DEFAULTSEARCHPATH3); - WadPath = searchWad(DEFAULTSEARCHPATH3); - if (WadPath) - return WadPath; -#endif + // if nothing was found return NULL; } diff --git a/src/sdl/i_video.c b/src/sdl/i_video.c index a27a5ebd2..ab30cf0ca 100644 --- a/src/sdl/i_video.c +++ b/src/sdl/i_video.c @@ -1633,6 +1633,11 @@ static SDL_bool Impl_CreateWindow(SDL_bool fullscreen) #ifdef HWRENDER if (vid.glstate == VID_GL_LIBRARY_LOADED) flags |= SDL_WINDOW_OPENGL; + + // Without a 24-bit depth buffer many visuals are ruined by z-fighting. + // Some GPU drivers may give us a 16-bit depth buffer since the + // default value for SDL_GL_DEPTH_SIZE is 16. + SDL_GL_SetAttribute(SDL_GL_DEPTH_SIZE, 24); #endif // Create a window diff --git a/src/sounds.c b/src/sounds.c index f7f3ad328..43525d568 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -14,6 +14,7 @@ #include "doomtype.h" #include "i_sound.h" #include "sounds.h" +#include "s_sound.h" #include "r_defs.h" #include "r_skins.h" #include "z_zone.h" @@ -53,774 +54,774 @@ sfxinfo_t S_sfx[NUMSFX] = // Thank you! ^u^ // Skin Sounds - {"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"}, + {"altdi1", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLDET1, -1, LUMPERROR, "Dying"}, + {"altdi2", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLDET2, -1, LUMPERROR, "Dying"}, + {"altdi3", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLDET3, -1, LUMPERROR, "Dying"}, + {"altdi4", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLDET4, -1, LUMPERROR, "Dying"}, + {"altow1", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLPAN1, -1, LUMPERROR, "Ring loss"}, + {"altow2", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLPAN2, -1, LUMPERROR, "Ring loss"}, + {"altow3", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLPAN3, -1, LUMPERROR, "Ring loss"}, + {"altow4", false, 192, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLPAN4, -1, LUMPERROR, "Ring loss"}, + {"victr1", false, 64, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLVCT1, -1, LUMPERROR, "/"}, + {"victr2", false, 64, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLVCT2, -1, LUMPERROR, "/"}, + {"victr3", false, 64, SF_X8AWAYSOUND, -1, NULL, 0, SKSPLVCT3, -1, LUMPERROR, "/"}, + {"victr4", false, 64, SF_X8AWAYSOUND, -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, SF_TOTALLYSINGLE, -1, NULL, 0, SKSSPNDSH, -1, LUMPERROR, "Spindash"}, + {"thok" , false, 96, 0, -1, NULL, 0, SKSTHOK, -1, LUMPERROR, "Thok"}, + {"zoom" , false, 120, SF_TOTALLYSINGLE, -1, NULL, 0, SKSZOOM, -1, LUMPERROR, "Spin launch"}, + {"skid", false, 64, SF_NOINTERRUPT, -1, NULL, 0, SKSSKID, -1, LUMPERROR, "Skid"}, // Ambience/background objects/etc - {"ambint", true, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Obnoxious disco music"}, + {"ambint", true, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Obnoxious disco music"}, - {"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", true, 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", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wood breaking"}, - {"ambmac", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Machinery"}, - {"spsmsh", true, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Heavy impact"}, + {"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", true, 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, SF_NOINTERRUPT, -1, NULL, 0, -1, -1, LUMPERROR, "Flamethrower"}, + {"grind", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic grinding"}, + {"laser", true, 16, SF_NOMULTIPLESOUND, -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", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Wood breaking"}, + {"ambmac", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Machinery"}, + {"spsmsh", true, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Heavy impact"}, - {"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"}, + {"rainin", true, 24, SF_OUTSIDESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Rain"}, + {"litng1", false, 16, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"}, + {"litng2", false, 16, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"}, + {"litng3", false, 16, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"}, + {"litng4", false, 16, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Lightning"}, + {"athun1", false, 16, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"}, + {"athun2", false, 16, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder"}, - {"amwtr1", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr2", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr3", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr4", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr5", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr6", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr7", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"amwtr8", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, - {"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 + {"amwtr1", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr2", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr3", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr4", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr5", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr6", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr7", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"amwtr8", false, 12, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Stream"}, + {"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, "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"}, + {"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, "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"}, + {"ambin2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Natural vibrations"}, + {"lavbub", false, 64, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Bubbling lava"}, + {"rocks1", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"}, + {"rocks2", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"}, + {"rocks3", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"}, + {"rocks4", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Falling rocks"}, + {"rumbam", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"}, + {"rumble", false, 64, SF_X4AWAYSOUND|SF_X8AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Ominous rumbling"}, // Game objects, etc - {"appear", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Appearing platform"}, - {"bkpoof", false, 70, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Armageddon pow"}, - {"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 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, "Threatening 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, "Threatening 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, "Life transfer"}, // placeholder repurpose; original string was "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! - {"frcssg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Weak Force Shield"}, // Force GET...? (consider making a custom shield with this instead of a single-hit force shield!) - {"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"}, - {"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"}, - {"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"}, - {"shrpsp", true, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spincushion"}, - {"shrpgo", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Launch"}, - {"mswarp", false, 60, 16, -1, NULL, 0, -1, -1, LUMPERROR, "Spinning out"}, - {"mspogo", true, 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"}, - {"alart", false, 200, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Caught red handed!"}, - {"vwre", false, 200, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Clone fighter!"}, - {"bowl", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bowling"}, - {"chuchu", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Train horn"}, - {"bsnipe", false, 200, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Home-run smash"}, - {"sprong", false, 112, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power spring"}, - {"lvfal1", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rumble"}, - {"pscree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "SCREE!"}, - {"iceb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ice crack"}, - {"shattr", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Shattering"}, - {"antiri", true, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Depletion"}, + {"appear", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Appearing platform"}, + {"bkpoof", false, 70, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Armageddon pow"}, + {"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, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Powerful shot"}, + {"cgot" , true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got 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, "Threatening beeping"}, + {"ding", true, 127, SF_X4AWAYSOUND, -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, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Electric fizzle"}, + {"gbeep", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Threatening 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, "Life transfer"}, // placeholder repurpose; original string was "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, SF_X2AWAYSOUND, -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! + {"frcssg", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Weak Force Shield"}, // Force GET...? (consider making a custom shield with this instead of a single-hit force shield!) + {"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, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Pushing a statue"}, + {"statu2", true, 64, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Pushing a statue"}, + {"strpst", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"}, + {"supert", true, 127, SF_NOMULTIPLESOUND, -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"}, + {"trfire", true, 60, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Laser fired"}, + {"trpowr", true, 127, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"}, + {"turhit", false, 40, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Laser hit"}, + {"wdjump", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Whirlwind jump"}, + {"shrpsp", true, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spincushion"}, + {"shrpgo", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Launch"}, + {"mswarp", false, 60, SF_X8AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Spinning out"}, + {"mspogo", true, 60, SF_X4AWAYSOUND, -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"}, + {"alart", false, 200, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Caught red handed!"}, + {"vwre", false, 200, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Clone fighter!"}, + {"bowl", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bowling"}, + {"chuchu", false, 32, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Train horn"}, + {"bsnipe", false, 200, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Home-run smash"}, + {"sprong", false, 112, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power spring"}, + {"lvfal1", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Rumble"}, + {"pscree", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "SCREE!"}, + {"iceb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ice crack"}, + {"shattr", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Shattering"}, + {"antiri", true, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Depletion"}, // Menu, interface - {"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"}, - {"adderr", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Error"}, - {"notadd", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Reject"}, - {"addfil", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Accept"}, + {"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"}, + {"adderr", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Error"}, + {"notadd", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Reject"}, + {"addfil", true, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Accept"}, // NiGHTS - {"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 - {"ncchip", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got chip"}, - {"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"}, - {"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"}, - {"ngjump", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jump"}, - {"peww", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pew"}, + {"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 + {"ncchip", false, 204, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got chip"}, + {"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"}, + {"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"}, + {"ngjump", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jump"}, + {"peww", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pew"}, // Halloween - {"lntsit", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cacolantern awake"}, - {"lntdie", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cacolantern death"}, - {"pumpkn", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pumpkin smash"}, // idspispopd - {"ghosty", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Laughter"}, + {"lntsit", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cacolantern awake"}, + {"lntdie", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Cacolantern death"}, + {"pumpkn", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pumpkin smash"}, // idspispopd + {"ghosty", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Laughter"}, // Mario - {"koopfr" , true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"}, - {"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hit"}, - {"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bonk"}, - {"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-stomp"}, - {"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 power-up"}, - {"marioa", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "One-up"}, - {"thwomp", true, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Thwomp"}, + {"koopfr" , true, 127, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Fire"}, + {"mario1", false, 60, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Hit"}, + {"mario2", false, 127, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bonk"}, + {"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-stomp"}, + {"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, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Hurt"}, + {"mario9", true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Emerging power-up"}, + {"marioa", true, 192, 0, -1, NULL, 0, -1, -1, LUMPERROR, "One-up"}, + {"thwomp", true, 127, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Thwomp"}, // Black Eggman - {"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"}, + {"bebomb", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Big explosion"}, + {"bechrg", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Powering up"}, + {"becrsh", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Crash"}, + {"bedeen", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic crash"}, + {"bedie1", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman crying"}, + {"bedie2", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman crying"}, + {"beeyow", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Failing machinery"}, + {"befall", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic slam"}, + {"befire", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Firing goop"}, + {"beflap", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical jump"}, + {"begoop", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Powerful shot"}, + {"begrnd", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Metallic grinding"}, + {"behurt", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman shocked"}, + {"bejet1", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Jetpack charge"}, + {"belnch", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical jump"}, + {"beoutb", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Failed shot"}, + {"beragh", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman screaming"}, + {"beshot", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Firing missile"}, + {"bestep", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical stomp"}, + {"bestp2", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Mechanical stomp"}, + {"bewar1", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"}, + {"bewar2", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"}, + {"bewar3", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"}, + {"bewar4", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Eggman laughing"}, + {"bexpld", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Explosion"}, + {"bgxpld", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Explosion"}, // Cybrakdemon - {"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"}, + {"beelec", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Electricity"}, + {"brakrl", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Rocket launch"}, + {"brakrx", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Rocket explosion"}, // Sonic 1 sounds - {"s1a0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1a9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1aa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1ab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Chomp"}, - {"s1ac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1ad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1ae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1af", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1b9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1ba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1bb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1bc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1bd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1be", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1bf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1c9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1ca", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1cb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1cc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1cd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1ce", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s1cf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1a9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1aa", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1ab", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Chomp"}, + {"s1ac", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1ad", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1ae", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1af", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1b9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1ba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1bb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1bc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1bd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1be", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1bf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1c9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1ca", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1cb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1cc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1cd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1ce", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s1cf", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Sonic 2 sounds - {"s220", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s221", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s222", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s223", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s224", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s225", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s226", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s227", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s228", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s229", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s22a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s22b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s22c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s22d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s22e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s22f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s230", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s231", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s232", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s233", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s234", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s235", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s236", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s237", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s238", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s239", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s23a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s23b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s23c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s23d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s23e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s23f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s240", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s241", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s242", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s243", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s244", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s245", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s246", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s247", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s248", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s249", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s24a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s24b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s24c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s24d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s24e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s250", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s251", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s252", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s253", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s254", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s255", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s256", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s257", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s258", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s259", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s25a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s25b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s25c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s25d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s25e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s25f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"s260", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s220", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s221", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s222", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s223", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s224", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s225", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s226", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s227", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s228", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s229", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s22a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s22b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s22c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s22d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s22e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s22f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s230", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s231", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s232", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s233", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s234", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s235", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s236", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s237", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s238", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s239", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s23a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s23b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s23c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s23d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s23e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s23f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s240", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s241", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s242", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s243", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s244", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s245", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s246", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s247", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s248", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s249", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s24a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s24b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s24c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s24d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s24e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s24f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s250", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s251", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s252", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s253", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s254", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s255", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s256", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s257", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s258", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s259", false, 96, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s25a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s25b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s25c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s25d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s25e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s25f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"s260", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // S3&K sounds - {"s3k2b", true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Emerald"}, // Got Emerald! - {"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 blast"}, - {"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder 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, "Pulse"}, - {"s3k49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Impact"}, - {"s3k4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Grab"}, - {"s3k4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"}, - {"s3k4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Heavy hit"}, - {"s3k4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing bullet"}, - {"s3k4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Big 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"}, - {"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, "Burst"}, - {"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, "Heavy hit"}, - {"s3k5e", false, 127, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Releasing charge"}, - {"s3k5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crusher stomp"}, - {"s3k60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Accelerating"}, - {"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 sphere"}, // Blue Spheres - {"s3k66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Special stage end"}, - {"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing missile"}, - {"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Discovery"}, - {"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, "Punch"}, - {"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", true, 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, "Soft 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, "Dust"}, - {"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, 128, 8, -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 tech"}, - {"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, "Humming power"}, - {"s3k8d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, - {"s3k8e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Accelerating"}, - {"s3k8f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Opening"}, - {"s3k90", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Impact"}, - {"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, "Gas release"}, - {"s3k94", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spike"}, - {"s3k95", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Lava burst"}, - {"s3k96", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Landing"}, - {"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, "Rising charge"}, - {"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"}, - {"s3kab1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kab9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kaba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kabb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kabc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kabd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kabe", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, - {"s3kabf", 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, "Spinning 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"}, - {"s3kbel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying"}, // 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, "Revving up"}, - {"s3kc5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Revving up"}, // ditto - {"s3kc6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Orbiting"}, - {"s3kc6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Orbiting"}, // ditto - {"s3kc7s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aiming"}, - {"s3kc7l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aiming"}, // ditto - {"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, "Ominous rumbling"}, // ditto - {"s3kccs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bursting"}, - {"s3kccl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bursting"}, // 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, "Dust devil"}, // 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, "Moving chain"}, // ditto - {"s3kd3s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Digging"}, - {"s3kd3l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Digging"}, // 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 + {"s3k2b", true, 120, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got Emerald"}, // Got Emerald! + {"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 blast"}, + {"s3k41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Thunder 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, "Pulse"}, + {"s3k49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Impact"}, + {"s3k4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Grab"}, + {"s3k4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Splash"}, + {"s3k4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Heavy hit"}, + {"s3k4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing bullet"}, + {"s3k4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Big 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"}, + {"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, SF_X2AWAYSOUND, -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, "Burst"}, + {"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, "Heavy hit"}, + {"s3k5e", false, 127, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Releasing charge"}, + {"s3k5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Crusher stomp"}, + {"s3k60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Accelerating"}, + {"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, SF_NOMULTIPLESOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Clatter"}, + {"s3k65", false, 255, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Got sphere"}, // Blue Spheres + {"s3k66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Special stage end"}, + {"s3k67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Firing missile"}, + {"s3k68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Discovery"}, + {"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, "Punch"}, + {"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", true, 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, "Soft 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, "Dust"}, + {"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, 128, SF_X4AWAYSOUND, -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 tech"}, + {"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, "Humming power"}, + {"s3k8d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "/"}, + {"s3k8e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Accelerating"}, + {"s3k8f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Opening"}, + {"s3k90", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Impact"}, + {"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, "Gas release"}, + {"s3k94", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spike"}, + {"s3k95", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Lava burst"}, + {"s3k96", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Landing"}, + {"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, "Rising charge"}, + {"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"}, + {"s3kab1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kab9", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kaba", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kabb", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kabc", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kabd", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kabe", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spindash"}, + {"s3kabf", 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, "Spinning 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"}, + {"s3kbel", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Flying"}, // 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, "Revving up"}, + {"s3kc5l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Revving up"}, // ditto + {"s3kc6s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Orbiting"}, + {"s3kc6l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Orbiting"}, // ditto + {"s3kc7s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aiming"}, + {"s3kc7l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aiming"}, // ditto + {"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, "Ominous rumbling"}, // ditto + {"s3kccs", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bursting"}, + {"s3kccl", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bursting"}, // 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, "Dust devil"}, // 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, "Moving chain"}, // ditto + {"s3kd3s", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Digging"}, + {"s3kd3l", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Digging"}, // 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, SF_X2AWAYSOUND, -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 // 3D Blast sounds (the "missing" ones are direct copies of S3K's, no minor differences what-so-ever) - {"3db06", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Collection"}, - {"3db09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Peep"}, - {"3db14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Chirp"}, - {"3db16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"3db06", false, 96, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Collection"}, + {"3db09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Peep"}, + {"3db14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Chirp"}, + {"3db16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // Sonic CD sounds - {"cdfm00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Skid"}, - {"cdfm01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jump"}, - {"cdfm03", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Dying"}, - {"cdfm04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ring loss"}, - {"cdfm05", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sparkle"}, - {"cdfm06", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pop"}, - {"cdfm07", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Shield"}, - {"cdfm08", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spring"}, - {"cdfm09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm10", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm11", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm12", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm13", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm15", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm17", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm18", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm19", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm20", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm21", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm22", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm23", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm24", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm25", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm26", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm27", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm28", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm29", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bubble gasp"}, - {"cdfm30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"}, - {"cdfm31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Warp"}, - {"cdfm32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drowning"}, - {"cdfm39", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power up"}, - {"cdfm41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Extra time"}, - {"cdfm45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aquaphobia"}, - {"cdfm50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Warp"}, - {"cdfm57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Speed boost"}, - {"cdfm63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm64", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm70", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm74", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm75", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm76", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm77", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm78", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdfm79", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdpcm0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Future."}, - {"cdpcm1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Past."}, - {"cdpcm2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "All right!"}, - {"cdpcm3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "I'm outta here..."}, - {"cdpcm4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Yes!"}, - {"cdpcm5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Yeah!"}, - {"cdpcm6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Giggles"}, - {"cdpcm7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Eep!"}, - {"cdpcm8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"cdpcm9", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Bumper"}, + {"cdfm00", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Skid"}, + {"cdfm01", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm02", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Jump"}, + {"cdfm03", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Dying"}, + {"cdfm04", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ring loss"}, + {"cdfm05", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Sparkle"}, + {"cdfm06", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pop"}, + {"cdfm07", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Shield"}, + {"cdfm08", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Spring"}, + {"cdfm09", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm10", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm11", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm12", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm13", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm14", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm15", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm16", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm17", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm18", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm19", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm20", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm21", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm22", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm23", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm24", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm25", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm26", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm27", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm28", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm29", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Bubble gasp"}, + {"cdfm30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Starpost"}, + {"cdfm31", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Warp"}, + {"cdfm32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Drowning"}, + {"cdfm39", false, 128, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power up"}, + {"cdfm41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Extra time"}, + {"cdfm45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm46", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Aquaphobia"}, + {"cdfm50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm51", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Warp"}, + {"cdfm57", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm59", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Speed boost"}, + {"cdfm63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm64", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm70", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm71", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm72", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm73", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm74", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm75", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm76", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm77", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm78", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdfm79", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdpcm0", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Future."}, + {"cdpcm1", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Past."}, + {"cdpcm2", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "All right!"}, + {"cdpcm3", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "I'm outta here..."}, + {"cdpcm4", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Yes!"}, + {"cdpcm5", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Yeah!"}, + {"cdpcm6", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Giggles"}, + {"cdpcm7", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Eep!"}, + {"cdpcm8", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"cdpcm9", false, 96, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Bumper"}, // Knuckles Chaotix sounds - {"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc2b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc2c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc2d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc2e", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc2f", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc31", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Confirm"}, - {"kc43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc46", false, 96, 8, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Select"}, - {"kc49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pop-shot"}, - {"kc4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power up"}, - {"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc51", false, 64, 64, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc57", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Sheer terror"}, - {"kc58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc59", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Shrink"}, - {"kc5a", false, 128, 8, -1, NULL, 0, -1, -1, LUMPERROR, "Grow"}, - {"kc5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc64", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Terrifying rumble"}, - {"kc65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power down"}, - {"kc66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ascending"}, - {"kc6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, - {"kc6e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc2a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc2b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc2c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc2d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc2e", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc2f", false, 96, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc30", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc31", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc32", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc33", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc34", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc35", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc36", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc37", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc38", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc39", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc3a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc3b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc3c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc3d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc3e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc3f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc40", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc41", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc42", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Confirm"}, + {"kc43", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc44", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc45", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc46", false, 96, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc47", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc48", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Select"}, + {"kc49", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc4a", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc4b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc4c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Pop-shot"}, + {"kc4d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power up"}, + {"kc4e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc4f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc50", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc51", false, 64, SF_X2AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc52", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc53", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc54", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc55", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc56", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc57", false, 128, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Sheer terror"}, + {"kc58", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc59", false, 128, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Shrink"}, + {"kc5a", false, 128, SF_X4AWAYSOUND, -1, NULL, 0, -1, -1, LUMPERROR, "Grow"}, + {"kc5b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc5c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc5d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc5e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc5f", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc60", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc61", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc62", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc63", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc64", false, 96, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Terrifying rumble"}, + {"kc65", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Power down"}, + {"kc66", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc67", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc68", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc69", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc6b", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, "Ascending"}, + {"kc6c", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc6d", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, + {"kc6e", false, 64, 0, -1, NULL, 0, -1, -1, LUMPERROR, ""}, // skin sounds free slots to add sounds at run time (Boris HACK!!!) // initialized to NULL diff --git a/src/tables.c b/src/tables.c index 13949b6a7..f8b8030c9 100644 --- a/src/tables.c +++ b/src/tables.c @@ -407,9 +407,9 @@ void FV3_Rotate(vector3_t *rotVec, const vector3_t *axisVec, const angle_t angle rotVec->z = az+dz+ez; } -void FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z) -{ #define M(row,col) dest->m[row * 4 + col] +matrix_t *FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z) +{ const fixed_t sinA = FINESINE(angle>>ANGLETOFINESHIFT); const fixed_t cosA = FINECOSINE(angle>>ANGLETOFINESHIFT); const fixed_t invCosA = FRACUNIT - cosA; @@ -459,5 +459,84 @@ void FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z) M(1, 3) = 0; M(2, 3) = 0; M(3, 3) = FRACUNIT; -#undef M + + return dest; } + + +matrix_t *FM_RotateX(matrix_t *dest, angle_t rad) +{ + const angle_t fa = rad>>ANGLETOFINESHIFT; + const fixed_t cosrad = FINECOSINE(fa), sinrad = FINESINE(fa); + + M(0, 0) = FRACUNIT; + M(0, 1) = 0; + M(0, 2) = 0; + M(0, 3) = 0; + M(1, 0) = 0; + M(1, 1) = cosrad; + M(1, 2) = sinrad; + M(1, 3) = 0; + M(2, 0) = 0; + M(2, 1) = -sinrad; + M(2, 2) = cosrad; + M(2, 3) = 0; + M(3, 0) = 0; + M(3, 1) = 0; + M(3, 2) = 0; + M(3, 3) = FRACUNIT; + + return dest; +} + +matrix_t *FM_RotateY(matrix_t *dest, angle_t rad) +{ + const angle_t fa = rad>>ANGLETOFINESHIFT; + const fixed_t cosrad = FINECOSINE(fa), sinrad = FINESINE(fa); + + M(0, 0) = cosrad; + M(0, 1) = 0; + M(0, 2) = -sinrad; + M(0, 3) = 0; + M(1, 0) = 0; + M(1, 1) = FRACUNIT; + M(1, 2) = 0; + M(1, 3) = 0; + M(2, 0) = sinrad; + M(2, 1) = 0; + M(2, 2) = cosrad; + M(2, 3) = 0; + M(3, 0) = 0; + M(3, 1) = 0; + M(3, 2) = 0; + M(3, 3) = FRACUNIT; + + return dest; +} + +matrix_t *FM_RotateZ(matrix_t *dest, angle_t rad) +{ + const angle_t fa = rad>>ANGLETOFINESHIFT; + const fixed_t cosrad = FINECOSINE(fa), sinrad = FINESINE(fa); + + M(0, 0) = cosrad; + M(0, 1) = sinrad; + M(0, 2) = 0; + M(0, 3) = 0; + M(1, 0) = -sinrad; + M(1, 1) = cosrad; + M(1, 2) = 0; + M(1, 3) = 0; + M(2, 0) = 0; + M(2, 1) = 0; + M(2, 2) = FRACUNIT; + M(2, 3) = 0; + M(3, 0) = 0; + M(3, 1) = 0; + M(3, 2) = 0; + M(3, 3) = FRACUNIT; + + return dest; +} + +#undef M diff --git a/src/tables.h b/src/tables.h index c44c7d525..172ade378 100644 --- a/src/tables.h +++ b/src/tables.h @@ -107,7 +107,10 @@ boolean FV3_InsidePolygon(const vector3_t *vIntersection, const vector3_t *Poly, boolean FV3_IntersectedPolygon(const vector3_t *vPoly, const vector3_t *vLine, const INT32 vertexCount, vector3_t *collisionPoint); void FV3_Rotate(vector3_t *rotVec, const vector3_t *axisVec, const angle_t angle); /// Fixed Point Matrix functions -void FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z); +matrix_t *FM_Rotate(matrix_t *dest, angle_t angle, fixed_t x, fixed_t y, fixed_t z); +matrix_t *FM_RotateX(matrix_t *dest, angle_t rad); +matrix_t *FM_RotateY(matrix_t *dest, angle_t rad); +matrix_t *FM_RotateZ(matrix_t *dest, angle_t rad); // The table values in tables.c are calculated with this many fractional bits. #define FINE_FRACBITS 16 diff --git a/src/w_wad.c b/src/w_wad.c index 0a8f630a8..7e5f056cf 100644 --- a/src/w_wad.c +++ b/src/w_wad.c @@ -644,8 +644,6 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp) lump_p->fullname = Z_Calloc(zentry.namelen + 1, PU_STATIC, NULL); strncpy(lump_p->fullname, fullname, zentry.namelen); - free(fullname); - switch(zentry.compression) { case 0: @@ -665,6 +663,8 @@ static lumpinfo_t* ResGetLumpsZip (FILE* handle, UINT16* nlmp) break; } + free(fullname); + // skip and ignore comments/extra fields if (fseek(handle, zentry.xtralen + zentry.commlen, SEEK_CUR) != 0) { @@ -2483,6 +2483,10 @@ int W_VerifyNMUSlumps(const char *filename, boolean exit_on_error) {"STNONEX", 7}, // "X" graphic {"ULTIMATE", 8}, // Ultimate no-save + {"SLCT", 4}, // Level select "cursor" + {"LSSTATIC", 8}, // Level select static + {"BLANKLV", 7}, // "?" level images + {"CRFNT", 5}, // Sonic 1 font changes {"NTFNT", 5}, // Character Select font changes {"NTFNO", 5}, // Character Select font (outline) @@ -2494,12 +2498,23 @@ int W_VerifyNMUSlumps(const char *filename, boolean exit_on_error) {"STLIVE", 6}, // Life graphics, background and the "X" that shows under skin's HUDNAME {"CROSHAI", 7}, // First person crosshairs {"INTERSC", 7}, // Default intermission backgrounds (co-op) + {"SPECTILE", 8}, // Special stage intermission background {"STT", 3}, // Acceptable HUD changes (Score Time Rings) {"YB_", 3}, // Intermission graphics, goes with the above {"RESULT", 6}, // Used in intermission for competitive modes, above too :3 {"RACE", 4}, // Race mode graphics, 321go + {"SRB2BACK", 8}, // MP intermission background {"M_", 2}, // Menu stuff {"LT", 2}, // Titlecard changes + {"HOMING", 6}, // Emerald hunt radar + {"HOMITM", 6}, // Emblem radar + + {"CHARFG", 6}, // Character select menu + {"CHARBG", 6}, + {"RECATK", 6}, // Record Attack menu + {"RECCLOCK", 8}, + {"NTSATK", 6}, // NiGHTS Mode menu + {"NTSSONC", 7}, {"SLID", 4}, // Continue {"CONT", 4}, @@ -2523,6 +2538,7 @@ int W_VerifyNMUSlumps(const char *filename, boolean exit_on_error) {"DRILL", 5}, {"GRADE", 5}, {"MINUS5", 6}, + {"NGRTIMER", 8}, // NiGHTS Mode timer {"MUSICDEF", 8}, // Song definitions (thanks kart) {"SHADERS", 7}, // OpenGL shader definitions diff --git a/src/win32/Srb2win.rc b/src/win32/Srb2win.rc index 83948ac81..2236beca1 100644 --- a/src/win32/Srb2win.rc +++ b/src/win32/Srb2win.rc @@ -2,6 +2,7 @@ // #include "resource.h" #include "winver.h" +#include "winuser.h" #define APSTUDIO_READONLY_SYMBOLS ///////////////////////////////////////////////////////////////////////////// diff --git a/src/win32/srb2win.exe.manifest b/src/win32/srb2win.exe.manifest index d3b8355cb..f9ba6c814 100644 --- a/src/win32/srb2win.exe.manifest +++ b/src/win32/srb2win.exe.manifest @@ -1,5 +1,11 @@ + + + true/pm + PerMonitorV2 + +