From 025ca413a2a01a8ec7c104748c2f510e350aa457 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 7 Jan 2016 19:48:20 -0800 Subject: [PATCH 01/15] The concept of "music slots" doesn't exist anymore. Use whatever names you want for your music. So long as you prefix the lumps with O_ or D_, it doesn't matter anymore. DISCLAIMER: Linedef type 413 (change music) and Lua scripting is not tested. --- src/d_netcmd.c | 47 +- src/dehacked.c | 97 ++-- src/doomstat.h | 22 +- src/f_finale.c | 22 +- src/g_game.c | 17 +- src/lua_baselib.c | 7 +- src/lua_maplib.c | 8 +- src/m_menu.c | 16 +- src/p_enemy.c | 8 +- src/p_inter.c | 4 +- src/p_saveg.c | 2 +- src/p_setup.c | 31 +- src/p_spec.c | 17 +- src/p_user.c | 26 +- src/s_sound.c | 562 ++++++++++----------- src/s_sound.h | 16 +- src/sdl/mixer_sound.c | 1 + src/sounds.c | 1061 ---------------------------------------- src/sounds.h | 1086 ----------------------------------------- src/y_inter.c | 8 +- 20 files changed, 431 insertions(+), 2627 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 557715064..85b7ece67 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -1854,10 +1854,10 @@ static void Got_Pause(UINT8 **cp, INT32 playernum) if (paused) { if (!menuactive || netgame) - S_PauseSound(); + S_PauseAudio(); } else - S_ResumeSound(); + S_ResumeAudio(); } } @@ -3757,46 +3757,53 @@ static void Command_Displayplayer_f(void) static void Command_Tunes_f(void) { const char *tunearg; - UINT16 tune, track = 0; + UINT16 tunenum, track = 0; const size_t argc = COM_Argc(); if (argc < 2) //tunes slot ... { - CONS_Printf("tunes :\n"); + CONS_Printf("tunes :\n"); CONS_Printf(M_GetText("Play a music slot at a set speed (\"1\" being normal speed).\n")); CONS_Printf(M_GetText("If the format supports multiple songs, you can specify which one to play.\n")); - CONS_Printf(M_GetText("The current tune is: %d\nThe current track is: %d\n"), - (mapmusic & MUSIC_SONGMASK), ((mapmusic & MUSIC_TRACKMASK) >> MUSIC_TRACKSHIFT)); + CONS_Printf(M_GetText("The current tune is: %s\nThe current track is: %d\n"), + mapmusname, (mapmusflags & MUSIC_TRACKMASK)); return; } tunearg = COM_Argv(1); - tune = (UINT16)atoi(tunearg); + tunenum = (UINT16)atoi(tunearg); track = 0; - if (!strcasecmp(tunearg, "default")) + if (!strcasecmp(tunearg, "none")) { - tune = mapheaderinfo[gamemap-1]->musicslot; - track = mapheaderinfo[gamemap-1]->musicslottrack; + S_StopMusic(); + return; } - else if (toupper(tunearg[0]) >= 'A' && toupper(tunearg[0]) <= 'Z') - tune = (UINT16)M_MapNumber(tunearg[0], tunearg[1]); - - if (tune >= NUMMUSIC) + else if (!strcasecmp(tunearg, "default")) { - CONS_Alert(CONS_NOTICE, M_GetText("Valid slots are 1 to %d, or 0 to stop music\n"), NUMMUSIC - 1); + tunearg = mapheaderinfo[gamemap-1]->musname; + track = mapheaderinfo[gamemap-1]->mustrack; + } + else if (tunearg[3] == 0 && toupper(tunearg[0]) >= 'A' && toupper(tunearg[0]) <= 'Z') + tunenum = (UINT16)M_MapNumber(tunearg[0], tunearg[1]); + + if (tunenum && tunenum >= 1036) + { + CONS_Alert(CONS_NOTICE, M_GetText("Valid music slots are 1 to 1035.\n")); return; } if (argc > 3) track = (UINT16)atoi(COM_Argv(3))-1; - mapmusic = tune | (track << MUSIC_TRACKSHIFT); - - if (tune == mus_None) - S_StopMusic(); + if (tunenum) + snprintf(mapmusname, 7, "%sM", G_BuildMapName(tunenum)); else - S_ChangeMusic(mapmusic, true); + strncpy(mapmusname, tunearg, 7); + mapmusname[6] = 0; + mapmusflags = (track & MUSIC_TRACKMASK); + + S_ChangeMusic(mapmusname, mapmusflags, true); if (argc > 2) { diff --git a/src/dehacked.c b/src/dehacked.c index 795157264..a9a04fecb 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -65,7 +65,6 @@ static mobjtype_t get_mobjtype(const char *word); static statenum_t get_state(const char *word); static spritenum_t get_sprite(const char *word); static sfxenum_t get_sfx(const char *word); -static UINT16 get_mus(const char *word); static hudnum_t get_huditem(const char *word); #ifndef HAVE_BLUA static powertype_t get_power(const char *word); @@ -1164,19 +1163,34 @@ static void readlevelheader(MYFILE *f, INT32 num) mapheaderinfo[num-1]->typeoflevel = tol; } } - else if (fastcmp(word, "MUSICSLOT")) + else if (fastcmp(word, "MUSIC")) { + if (fastcmp(word2, "NONE")) + mapheaderinfo[num-1]->musname[0] = 0; // becomes empty string + else + { + deh_strlcpy(mapheaderinfo[num-1]->musname, word2, + sizeof(mapheaderinfo[num-1]->musname), va("Level header %d: music", num)); + } + } + else if (fastcmp(word, "MUSICSLOT")) + { // Backwards compatibility? // Convert to map number if (word2[0] >= 'A' && word2[0] <= 'Z' && word2[2] == '\0') i = M_MapNumber(word2[0], word2[1]); - if (i) // it's just a number - mapheaderinfo[num-1]->musicslot = (UINT16)i; - else // No? Okay, now we'll get technical. - mapheaderinfo[num-1]->musicslot = get_mus(word2); // accepts all of O_CHRSEL, mus_chrsel, or just plain ChrSel + if (!i) + mapheaderinfo[num-1]->musname[0] = 0; // becomes empty string + else if (i > 1035) + deh_warning("Level header %d: musicslot out of range (0 - 1035)\n", num); + else // it's just a number + { + snprintf(mapheaderinfo[num-1]->musname, 7, va("%sM", G_BuildMapName(i))); + mapheaderinfo[num-1]->musname[6] = 0; + } } - else if (fastcmp(word, "MUSICSLOTTRACK")) - mapheaderinfo[num-1]->musicslottrack = ((UINT16)i - 1); + else if (fastcmp(word, "MUSICTRACK")) + mapheaderinfo[num-1]->mustrack = ((UINT16)i - 1); else if (fastcmp(word, "FORCECHARACTER")) { strlcpy(mapheaderinfo[num-1]->forcecharacter, word2, SKINNAMESIZE+1); @@ -1443,10 +1457,16 @@ static void readcutscenescene(MYFILE *f, INT32 num, INT32 scenenum) else deh_warning("CutSceneScene %d: unknown word '%s'", num, word); } - else if (fastcmp(word, "MUSICSLOT")) + else if (fastcmp(word, "MUSIC")) { - DEH_WriteUndoline(word, va("%u", cutscenes[num]->scene[scenenum].musicslot), UNDO_NONE); - cutscenes[num]->scene[scenenum].musicslot = get_mus(word2); // accepts all of O_MAP01M, mus_map01m, or just plain MAP01M + DEH_WriteUndoline(word, cutscenes[num]->scene[scenenum].musswitch, UNDO_NONE); + strncpy(cutscenes[num]->scene[scenenum].musswitch, word2, 7); + cutscenes[num]->scene[scenenum].musswitch[6] = 0; + } + else if (fastcmp(word, "MUSICTRACK")) + { + DEH_WriteUndoline(word, va("%u", cutscenes[num]->scene[scenenum].musswitchflags), UNDO_NONE); + cutscenes[num]->scene[scenenum].musswitchflags = ((UINT16)i) & MUSIC_TRACKMASK; } else if (fastcmp(word, "MUSICLOOP")) { @@ -7958,22 +7978,6 @@ static sfxenum_t get_sfx(const char *word) return sfx_None; } -static UINT16 get_mus(const char *word) -{ // Returns the value of SFX_ enumerations - UINT16 i; - if (*word >= '0' && *word <= '9') - return atoi(word); - if (fastncmp("MUS_",word,4)) - word += 4; // take off the MUS_ - else if (fastncmp("O_",word,2) || fastncmp("D_",word,2)) - word += 2; // take off the O_ or D_ - for (i = 0; i < NUMMUSIC; i++) - if (S_music[i].name && fasticmp(word, S_music[i].name)) - return i; - deh_warning("Couldn't find music named 'MUS_%s'",word); - return mus_None; -} - static hudnum_t get_huditem(const char *word) { // Returns the value of HUD_ enumerations hudnum_t i; @@ -8172,11 +8176,6 @@ static fixed_t find_const(const char **rword) free(word); return r; } - else if (fastncmp("MUS_",word,4) || fastncmp("O_",word,2)) { - r = get_mus(word); - free(word); - return r; - } else if (fastncmp("PW_",word,3)) { r = get_power(word); free(word); @@ -8567,33 +8566,6 @@ static inline int lib_getenum(lua_State *L) if (mathlib) return luaL_error(L, "sfx '%s' could not be found.\n", word); return 0; } - else if (!mathlib && fastncmp("mus_",word,4)) { - p = word+4; - for (i = 0; i < NUMMUSIC; i++) - if (S_music[i].name && fastcmp(p, S_music[i].name)) { - lua_pushinteger(L, i); - return 1; - } - return 0; - } - else if (mathlib && fastncmp("MUS_",word,4)) { // SOCs are ALL CAPS! - p = word+4; - for (i = 0; i < NUMMUSIC; i++) - if (S_music[i].name && fasticmp(p, S_music[i].name)) { - lua_pushinteger(L, i); - return 1; - } - return luaL_error(L, "music '%s' could not be found.\n", word); - } - else if (mathlib && (fastncmp("O_",word,2) || fastncmp("D_",word,2))) { - p = word+2; - for (i = 0; i < NUMMUSIC; i++) - if (S_music[i].name && fasticmp(p, S_music[i].name)) { - lua_pushinteger(L, i); - return 1; - } - return luaL_error(L, "music '%s' could not be found.\n", word); - } else if (!mathlib && fastncmp("pw_",word,3)) { p = word+3; for (i = 0; i < NUMPOWERS; i++) @@ -8745,8 +8717,11 @@ static inline int lib_getenum(lua_State *L) } else if (fastcmp(word,"globallevelskynum")) { lua_pushinteger(L, globallevelskynum); return 1; - } else if (fastcmp(word,"mapmusic")) { - lua_pushinteger(L, mapmusic); + } else if (fastcmp(word,"mapmusname")) { + lua_pushstring(L, mapmusname); + return 1; + } else if (fastcmp(word,"mapmusflags")) { + lua_pushinteger(L, mapmusflags); return 1; } else if (fastcmp(word,"server")) { if ((!multiplayer || !netgame) && !playeringame[serverplayer]) diff --git a/src/doomstat.h b/src/doomstat.h index 44cf6feaa..ffdbcaecd 100644 --- a/src/doomstat.h +++ b/src/doomstat.h @@ -31,15 +31,11 @@ // Selected by user. extern INT16 gamemap; - -// ----------------xxxxxxxxxxxxxxxx = music slot -// -xxxxxxxxxxxxxxx---------------- = track slot -// x------------------------------- = reset music bit -extern UINT32 mapmusic; -#define MUSIC_TRACKSHIFT 16 -#define MUSIC_SONGMASK 0x0000FFFF -#define MUSIC_TRACKMASK 0x7FFF0000 -#define MUSIC_RELOADRESET 0x80000000 +extern char mapmusname[7]; +extern UINT16 mapmusflags; +#define MUSIC_TRACKMASK 0x0FFF // ----************ +#define MUSIC_RELOADRESET 0x8000 // *--------------- +// Use other bits if necessary. extern INT16 maptol; extern UINT8 globalweather; @@ -146,11 +142,13 @@ typedef struct UINT16 xcoord[8]; UINT16 ycoord[8]; UINT16 picduration[8]; - UINT16 musicslot; UINT8 musicloop; UINT16 textxpos; UINT16 textypos; + char musswitch[7]; + UINT16 musswitchflags; + UINT8 fadecolor; // Color number for fade, 0 means don't do the first fade UINT8 fadeinid; // ID of the first fade, to a color -- ignored if fadecolor is 0 UINT8 fadeoutid; // ID of the second fade, to the new screen @@ -218,8 +216,8 @@ typedef struct UINT8 actnum; ///< Act number or 0 for none. UINT16 typeoflevel; ///< Combination of typeoflevel flags. INT16 nextlevel; ///< Map number of next level, or 1100-1102 to end. - UINT16 musicslot; ///< Music slot number to play. 0 for no music. - UINT16 musicslottrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore. + char musname[7]; ///< Music track to play. "" for no music. + UINT16 mustrack; ///< Subsong to play. Only really relevant for music modules and specific formats supported by GME. 0 to ignore. char forcecharacter[17]; ///< (SKINNAMESIZE+1) Skin to switch to or "" to disable. UINT8 weather; ///< 0 = sunny day, 1 = storm, 2 = snow, 3 = rain, 4 = blank, 5 = thunder w/o rain, 6 = rain w/o lightning, 7 = heat wave. INT16 skynum; ///< Sky number to use. diff --git a/src/f_finale.c b/src/f_finale.c index a85fd11cb..efe39f294 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -559,7 +559,7 @@ static void F_IntroDrawScene(void) if (finalecount < 4) S_StopMusic(); if (finalecount == 4) - S_ChangeMusic(mus_stjr, false); + S_ChangeMusicInternal("stjr", false); x = (BASEVIDWIDTH<scene[scenenum].xcoord[picnum]; picypos = cutscenes[cutnum]->scene[scenenum].ycoord[picnum]; - if (cutscenes[cutnum]->scene[scenenum].musicslot != 0) - S_ChangeMusic(cutscenes[cutnum]->scene[scenenum].musicslot, cutscenes[cutnum]->scene[scenenum].musicloop); + if (cutscenes[cutnum]->scene[scenenum].musswitch[0]) + S_ChangeMusic(cutscenes[cutnum]->scene[scenenum].musswitch, + cutscenes[cutnum]->scene[scenenum].musswitchflags, + cutscenes[cutnum]->scene[scenenum].musicloop); // Fade to the next dofadenow = true; @@ -1774,8 +1776,10 @@ void F_StartCustomCutscene(INT32 cutscenenum, boolean precutscene, boolean reset animtimer = cutscenes[cutnum]->scene[0].picduration[0]; // Picture duration stoptimer = 0; - if (cutscenes[cutnum]->scene[scenenum].musicslot != 0) - S_ChangeMusic(cutscenes[cutnum]->scene[scenenum].musicslot, cutscenes[cutnum]->scene[scenenum].musicloop); + if (cutscenes[cutnum]->scene[0].musswitch[0]) + S_ChangeMusic(cutscenes[cutnum]->scene[0].musswitch, + cutscenes[cutnum]->scene[0].musswitchflags, + cutscenes[cutnum]->scene[0].musicloop); else S_StopMusic(); } diff --git a/src/g_game.c b/src/g_game.c index 643ec8c93..76d6035f5 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -69,8 +69,10 @@ static void G_DoStartContinue(void); static void G_DoContinued(void); static void G_DoWorldDone(void); +char mapmusname[7]; // Music name +UINT16 mapmusflags; // Track and reset bit + INT16 gamemap = 1; -UINT32 mapmusic; // music, track, and reset bit INT16 maptol; UINT8 globalweather = 0; INT32 curWeather = PRECIP_NONE; @@ -2185,12 +2187,13 @@ void G_PlayerReborn(INT32 player) if (p-players == consoleplayer) { - if (mapmusic & MUSIC_RELOADRESET) // TODO: Might not need this here + if (mapmusflags & MUSIC_RELOADRESET) { - mapmusic = mapheaderinfo[gamemap-1]->musicslot - | (mapheaderinfo[gamemap-1]->musicslottrack << MUSIC_TRACKSHIFT); + strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7); + mapmusname[6] = 0; + mapmusflags = mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK; } - S_ChangeMusic(mapmusic, true); + S_ChangeMusic(mapmusname, mapmusflags, true); } if (gametype == GT_COOP) @@ -3524,7 +3527,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean if (paused) { paused = false; - S_ResumeSound(); + S_ResumeAudio(); } if (netgame || multiplayer) // Nice try, haxor. @@ -3598,7 +3601,7 @@ void G_InitNew(UINT8 pultmode, const char *mapname, boolean resetplayer, boolean globalweather = mapheaderinfo[gamemap-1]->weather; // Don't carry over custom music change to another map. - mapmusic |= MUSIC_RELOADRESET; + mapmusflags |= MUSIC_RELOADRESET; ultimatemode = pultmode; playerdeadview = false; diff --git a/src/lua_baselib.c b/src/lua_baselib.c index 4be103106..a7ab28949 100644 --- a/src/lua_baselib.c +++ b/src/lua_baselib.c @@ -1640,9 +1640,10 @@ static int lib_sStopSound(lua_State *L) static int lib_sChangeMusic(lua_State *L) { - UINT32 music_num = (UINT32)luaL_checkinteger(L, 1); + const char *music_name = luaL_checkstring(L, 1); boolean looping = (boolean)lua_opttrueboolean(L, 2); player_t *player = NULL; + UINT16 music_flags = 0; NOHUD if (!lua_isnone(L, 3) && lua_isuserdata(L, 3)) { @@ -1650,8 +1651,10 @@ static int lib_sChangeMusic(lua_State *L) if (!player) return LUA_ErrInvalid(L, "player_t"); } + music_flags = (UINT16)luaL_optinteger(L, 4, 0); + if (!player || P_IsLocalPlayer(player)) - S_ChangeMusic(music_num, looping); + S_ChangeMusic(music_name, music_flags, looping); return 0; } diff --git a/src/lua_maplib.c b/src/lua_maplib.c index 0a12478ca..1da0c0c1c 100644 --- a/src/lua_maplib.c +++ b/src/lua_maplib.c @@ -1171,10 +1171,10 @@ static int mapheaderinfo_get(lua_State *L) lua_pushinteger(L, header->typeoflevel); else if (fastcmp(field,"nextlevel")) lua_pushinteger(L, header->nextlevel); - else if (fastcmp(field,"musicslot")) - lua_pushinteger(L, header->musicslot); - else if (fastcmp(field,"musicslottrack")) - lua_pushinteger(L, header->musicslottrack); + else if (fastcmp(field,"musname")) + lua_pushlstring(L, header->musname, 6); + else if (fastcmp(field,"mustrack")) + lua_pushinteger(L, header->mustrack); else if (fastcmp(field,"forcecharacter")) lua_pushlstring(L, header->forcecharacter, 16); else if (fastcmp(field,"weather")) diff --git a/src/m_menu.c b/src/m_menu.c index 9901055e3..4ef719205 100644 --- a/src/m_menu.c +++ b/src/m_menu.c @@ -4748,7 +4748,7 @@ static void M_SetupChoosePlayer(INT32 choice) if (Playing() == false) { S_StopMusic(); - S_ChangeMusic(mus_chrsel, true); + S_ChangeMusicInternal("chrsel", true); } SP_PlayerDef.prevMenu = currentMenu; @@ -5199,7 +5199,7 @@ void M_DrawTimeAttackMenu(void) lumpnum_t lumpnum; char beststr[40]; - S_ChangeMusic(mus_racent, true); // Eww, but needed for when user hits escape during demo playback + S_ChangeMusicInternal("racent", true); // Eww, but needed for when user hits escape during demo playback V_DrawPatchFill(W_CachePatchName("SRB2BACK", PU_CACHE)); @@ -5362,7 +5362,7 @@ static void M_TimeAttack(INT32 choice) itemOn = tastart; // "Start" is selected. G_SetGamestate(GS_TIMEATTACK); - S_ChangeMusic(mus_racent, true); + S_ChangeMusicInternal("racent", true); } // Drawing function for Nights Attack @@ -5372,7 +5372,7 @@ void M_DrawNightsAttackMenu(void) lumpnum_t lumpnum; char beststr[40]; - S_ChangeMusic(mus_racent, true); // Eww, but needed for when user hits escape during demo playback + S_ChangeMusicInternal("racent", true); // Eww, but needed for when user hits escape during demo playback V_DrawPatchFill(W_CachePatchName("SRB2BACK", PU_CACHE)); @@ -5495,7 +5495,7 @@ static void M_NightsAttack(INT32 choice) itemOn = nastart; // "Start" is selected. G_SetGamestate(GS_TIMEATTACK); - S_ChangeMusic(mus_racent, true); + S_ChangeMusicInternal("racent", true); } // Player has selected the "START" from the nights attack screen @@ -5729,7 +5729,7 @@ static void M_ModeAttackEndGame(INT32 choice) itemOn = currentMenu->lastOn; G_SetGamestate(GS_TIMEATTACK); modeattacking = ATTACKING_NONE; - S_ChangeMusic(mus_racent, true); + S_ChangeMusicInternal("racent", true); // Update replay availability. CV_AddValue(&cv_nextmap, 1); CV_AddValue(&cv_nextmap, -1); @@ -6935,7 +6935,7 @@ static void M_ToggleDigital(void) if (nodigimusic) return; S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value); S_StopMusic(); - S_ChangeMusic(mus_lclear, false); + S_ChangeMusicInternal("lclear", false); M_StartMessage(M_GetText("Digital Music Enabled\n"), NULL, MM_NOTHING); } else @@ -6962,7 +6962,7 @@ static void M_ToggleMIDI(void) I_InitMIDIMusic(); if (nomidimusic) return; S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value); - S_ChangeMusic(mus_lclear, false); + S_ChangeMusicInternal("lclear", false); M_StartMessage(M_GetText("MIDI Music Enabled\n"), NULL, MM_NOTHING); } else diff --git a/src/p_enemy.c b/src/p_enemy.c index 09274b5a8..177acf862 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3063,12 +3063,8 @@ void A_Invincibility(mobj_t *actor) { S_StopMusic(); if (mariomode) - { - S_ChangeMusic(mus_minvnc, false); G_GhostAddColor(GHC_INVINCIBLE); - } - else - S_ChangeMusic(mus_invinc, false); + S_ChangeMusicInternal((mariomode) ? "minvnc" : "invinc", false); } } @@ -3104,7 +3100,7 @@ void A_SuperSneakers(mobj_t *actor) else { S_StopMusic(); - S_ChangeMusic(mus_shoes, false); + S_ChangeMusicInternal("shoes", false); } } } diff --git a/src/p_inter.c b/src/p_inter.c index f9dc3c342..d23585605 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -1966,7 +1966,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget if (P_IsLocalPlayer(target->player) && target->player == &players[consoleplayer]) { S_StopMusic(); // Stop the Music! Tails 03-14-2000 - S_ChangeMusic(mus_gmover, false); // Yousa dead now, Okieday? Tails 03-14-2000 + S_ChangeMusicInternal("gmover", false); // Yousa dead now, Okieday? Tails 03-14-2000 } } } @@ -2363,7 +2363,7 @@ static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source) && player->nightstime < 10*TICRATE) { //S_StartSound(NULL, sfx_timeup); // that creepy "out of time" music from NiGHTS. Dummied out, as some on the dev team thought it wasn't Sonic-y enough (Mystic, notably). Uncomment to restore. -SH - S_ChangeMusic(mus_drown,false); + S_ChangeMusicInternal("drown",false); } } } diff --git a/src/p_saveg.c b/src/p_saveg.c index 07e7b3564..a36f9c6f7 100644 --- a/src/p_saveg.c +++ b/src/p_saveg.c @@ -3203,7 +3203,7 @@ static inline boolean P_NetUnArchiveMisc(void) // tell the sound code to reset the music since we're skipping what // normally sets this flag - mapmusic |= MUSIC_RELOADRESET; + mapmusflags |= MUSIC_RELOADRESET; G_SetGamestate(READINT16(save_p)); diff --git a/src/p_setup.c b/src/p_setup.c index 3491669c7..3a51d90b3 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -180,10 +180,11 @@ static void P_ClearSingleMapHeaderInfo(INT16 i) mapheaderinfo[num]->typeoflevel = 0; DEH_WriteUndoline("NEXTLEVEL", va("%d", mapheaderinfo[num]->nextlevel), UNDO_NONE); mapheaderinfo[num]->nextlevel = (INT16)(i + 1); - DEH_WriteUndoline("MUSICSLOT", va("%d", mapheaderinfo[num]->musicslot), UNDO_NONE); - mapheaderinfo[num]->musicslot = mus_map01m + num; - DEH_WriteUndoline("MUSICSLOTTRACK", va("%d", mapheaderinfo[num]->musicslottrack), UNDO_NONE); - mapheaderinfo[num]->musicslottrack = 0; + DEH_WriteUndoline("MUSIC", mapheaderinfo[num]->musname, UNDO_NONE); + snprintf(mapheaderinfo[num]->musname, 7, va("%sM", G_BuildMapName(i))); + mapheaderinfo[num]->musname[6] = 0; + DEH_WriteUndoline("MUSICTRACK", va("%d", mapheaderinfo[num]->mustrack), UNDO_NONE); + mapheaderinfo[num]->mustrack = 0; DEH_WriteUndoline("FORCECHARACTER", va("%d", mapheaderinfo[num]->forcecharacter), UNDO_NONE); mapheaderinfo[num]->forcecharacter[0] = '\0'; DEH_WriteUndoline("WEATHER", va("%d", mapheaderinfo[num]->weather), UNDO_NONE); @@ -1439,6 +1440,21 @@ static void P_LoadSideDefs2(lumpnum_t lumpnum) #endif case 413: // Change music + { + char process[8+1]; + + sd->toptexture = sd->midtexture = sd->bottomtexture = 0; + if (msd->bottomtexture[0] != '-' || msd->bottomtexture[1] != '\0') + { + M_Memcpy(process,msd->bottomtexture,8); + process[8] = '\0'; + sd->bottomtexture = get_number(process)-1; + } + M_Memcpy(process,msd->toptexture,8); + sd->text = Z_Malloc(strlen(process)+1, PU_LEVEL, NULL); + M_Memcpy(sd->text, process, strlen(process)+1); + break; + } case 414: // Play SFX { sd->toptexture = sd->midtexture = sd->bottomtexture = 0; @@ -1449,13 +1465,6 @@ static void P_LoadSideDefs2(lumpnum_t lumpnum) process[8] = '\0'; sd->toptexture = get_number(process); } - if (sd->special == 413 && (msd->bottomtexture[0] != '-' || msd->bottomtexture[1] != '\0')) - { - char process[8+1]; - M_Memcpy(process,msd->bottomtexture,8); - process[8] = '\0'; - sd->bottomtexture = get_number(process)-1; - } break; } diff --git a/src/p_spec.c b/src/p_spec.c index 0d786c695..beeb2e5a7 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2390,20 +2390,19 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) // console player only unless NOCLIMB is set if ((line->flags & ML_NOCLIMB) || (mo && mo->player && P_IsLocalPlayer(mo->player))) { - UINT16 musicnum = (UINT16)sides[line->sidenum[0]].toptexture; //P_AproxDistance(line->dx, line->dy)>>FRACBITS; UINT16 tracknum = (UINT16)sides[line->sidenum[0]].bottomtexture; - mapmusic = musicnum | (tracknum << MUSIC_TRACKSHIFT); - if (!(line->flags & ML_BLOCKMONSTERS)) - mapmusic |= MUSIC_RELOADRESET; + strncpy(mapmusname, line->text, 7); + mapmusname[6] = 0; - if (musicnum >= NUMMUSIC || musicnum == mus_None) - S_StopMusic(); - else - S_ChangeMusic(mapmusic, !(line->flags & ML_EFFECT4)); + mapmusflags = tracknum & MUSIC_TRACKMASK; + if (!(line->flags & ML_BLOCKMONSTERS)) + mapmusflags |= MUSIC_RELOADRESET; + + S_ChangeMusic(mapmusname, mapmusflags, !(line->flags & ML_EFFECT4)); // Except, you can use the ML_BLOCKMONSTERS flag to change this behavior. - // if (mapmusic & MUSIC_RELOADRESET) then it will reset the music in G_PlayerReborn. + // if (mapmusflags & MUSIC_RELOADRESET) then it will reset the music in G_PlayerReborn. } break; diff --git a/src/p_user.c b/src/p_user.c index 51318f674..f91e7937d 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -965,7 +965,7 @@ void P_DoSuperTransformation(player_t *player, boolean giverings) if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC) && P_IsLocalPlayer(player)) { S_StopMusic(); - S_ChangeMusic(mus_supers, true); + S_ChangeMusicInternal("supers", true); } S_StartSound(NULL, sfx_supert); //let all players hear it -mattw_cfi @@ -1101,7 +1101,7 @@ void P_PlayLivesJingle(player_t *player) if (player) player->powers[pw_extralife] = extralifetics + 1; S_StopMusic(); // otherwise it won't restart if this is done twice in a row - S_ChangeMusic(mus_xtlife, false); + S_ChangeMusicInternal("xtlife", false); } } @@ -1119,21 +1119,21 @@ void P_RestoreMusic(player_t *player) return; S_SpeedMusic(1.0f); if (player->powers[pw_super] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC)) - S_ChangeMusic(mus_supers, true); + S_ChangeMusicInternal("supers", true); else if (player->powers[pw_invulnerability] > 1) - S_ChangeMusic((mariomode) ? mus_minvnc : mus_invinc, false); + S_ChangeMusicInternal((mariomode) ? "minvnc" : "invinc", false); else if (player->powers[pw_sneakers] > 1 && !player->powers[pw_super]) { if (mapheaderinfo[gamemap-1]->levelflags & LF_SPEEDMUSIC) { S_SpeedMusic(1.4f); - S_ChangeMusic(mapmusic, true); + S_ChangeMusic(mapmusname, mapmusflags, true); } else - S_ChangeMusic(mus_shoes, true); + S_ChangeMusicInternal("shoes", true); } else - S_ChangeMusic(mapmusic, true); + S_ChangeMusic(mapmusname, mapmusflags, true); } // @@ -2041,13 +2041,13 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player) else if (player->powers[pw_underwater] == 1) { if ((netgame || multiplayer) && P_IsLocalPlayer(player)) - S_ChangeMusic(mapmusic, true); + S_ChangeMusic(mapmusname, mapmusflags, true); P_DamageMobj(player->mo, NULL, NULL, 1, DMG_DROWNED); } else if (player->powers[pw_spacetime] == 1) { if ((netgame || multiplayer) && P_IsLocalPlayer(player)) - S_ChangeMusic(mapmusic, true); + S_ChangeMusic(mapmusname, mapmusflags, true); P_DamageMobj(player->mo, NULL, NULL, 1, DMG_SPACEDROWN); } @@ -2081,7 +2081,7 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player) && player == &players[consoleplayer]) { S_StopMusic(); - S_ChangeMusic(mus_drown, false); + S_ChangeMusicInternal("drown", false); } if (player->powers[pw_underwater] == 25*TICRATE + 1) @@ -5617,7 +5617,7 @@ static void P_NiGHTSMovement(player_t *player) } else if (P_IsLocalPlayer(player) && player->nightstime == 10*TICRATE) // S_StartSound(NULL, sfx_timeup); // that creepy "out of time" music from NiGHTS. Dummied out, as some on the dev team thought it wasn't Sonic-y enough (Mystic, notably). Uncomment to restore. -SH - S_ChangeMusic(mus_drown,false); + S_ChangeMusicInternal("drown",false); if (player->mo->z < player->mo->floorz) @@ -7760,7 +7760,7 @@ static void P_DeathThink(player_t *player) // Return to level music if (netgame && player->deadtimer == gameovertics && P_IsLocalPlayer(player)) - S_ChangeMusic(mapmusic, true); + S_ChangeMusic(mapmusname, mapmusflags, true); } if (!player->mo) @@ -8746,7 +8746,7 @@ void P_PlayerThink(player_t *player) if (countdown == 11*TICRATE - 1) { if (P_IsLocalPlayer(player)) - S_ChangeMusic(mus_drown, false); + S_ChangeMusicInternal("drown", false); } // If you've hit the countdown and you haven't made diff --git a/src/s_sound.c b/src/s_sound.c index 14a8cc425..1e5f79aa0 100644 --- a/src/s_sound.c +++ b/src/s_sound.c @@ -141,14 +141,6 @@ typedef struct static channel_t *channels = NULL; static INT32 numofchannels = 0; -// whether songs are mus_paused -static boolean mus_paused = 0; - -// music currently being played -musicinfo_t *mus_playing = 0; - -static INT32 nextcleanup; - // // Internals. // @@ -307,47 +299,6 @@ static void SetChannelsNum(void) channels[i].sfxinfo = 0; } -// -// Initializes sound stuff, including volume -// Sets channels, SFX and music volume, -// allocates channel buffer, sets S_sfx lookup. -// -void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume) -{ - INT32 i; - - if (dedicated) - return; - - S_SetSfxVolume(sfxVolume); - S_SetDigMusicVolume(digMusicVolume); - S_SetMIDIMusicVolume(midiMusicVolume); - - SetChannelsNum(); - - // no sounds are playing, and they are not mus_paused - mus_paused = 0; - - // Note that sounds have not been cached (yet). - for (i = 1; i < NUMSFX; i++) - { - S_sfx[i].usefulness = -1; // for I_GetSfx() - S_sfx[i].lumpnum = LUMPERROR; - } - - // precache sounds if requested by cmdline, or precachesound var true - if (!nosound && (M_CheckParm("-precachesound") || precachesound.value)) - { - // Initialize external data (all sounds) at start, keep static. - CONS_Printf(M_GetText("Loading sounds... ")); - - for (i = 1; i < NUMSFX; i++) - if (S_sfx[i].name) - S_sfx[i].data = I_GetSfx(&S_sfx[i]); - - CONS_Printf(M_GetText(" pre-cached all sound data\n")); - } -} // Retrieve the lump number of sfx // @@ -371,12 +322,6 @@ lumpnum_t S_GetSfxLumpNum(sfxinfo_t *sfx) return W_GetNumForName("dsthok"); } -// -// Per level startup code. -// Kills playing sounds at start of level, -// determines music if any, changes music. -// - // Stop all sounds, load level info, THEN start sounds. void S_StopSounds(void) { @@ -442,22 +387,6 @@ void S_StopSoundByNum(sfxenum_t sfxnum) } } -void S_Start(void) -{ - if (mapmusic & MUSIC_RELOADRESET) - { - mapmusic = mapheaderinfo[gamemap-1]->musicslot - | (mapheaderinfo[gamemap-1]->musicslottrack << MUSIC_TRACKSHIFT); - } - - mus_paused = 0; - - if (cv_resetmusic.value) - S_StopMusic(); - S_ChangeMusic(mapmusic, true); - nextcleanup = 15; -} - void S_StartSoundAtVolume(const void *origin_p, sfxenum_t sfx_id, INT32 volume) { INT32 sep, pitch, priority, cnum; @@ -745,43 +674,6 @@ void S_StopSound(void *origin) } } -// -// Stop and resume music, during game PAUSE. -// -void S_PauseSound(void) -{ - if (!nodigimusic) - I_PauseSong(0); - - if (mus_playing && !mus_paused) - { - I_PauseSong(mus_playing->handle); - mus_paused = true; - } - - // pause cd music -#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) - I_PauseCD(); -#else - I_StopCD(); -#endif -} - -void S_ResumeSound(void) -{ - if (!nodigimusic) - I_ResumeSong(0); - else - if (mus_playing && mus_paused) - { - I_ResumeSong(mus_playing->handle); - mus_paused = false; - } - - // resume cd music - I_ResumeCD(); -} - // // Updates music & sounds // @@ -883,38 +775,6 @@ void S_UpdateSounds(void) } } - // Clean up unused data. -#if 0 - { - static tic_t nextcleanup = 0; - size_t i; - sfxinfo_t *sfx; - - if (!gametic) nextcleanup = 0; - if (gametic > nextcleanup) - { - for (i = 1; i < NUMSFX; i++) - { - if (S_sfx[i].usefulness == 0) - { - S_sfx[i].usefulness--; - - // don't forget to unlock it !!! - // __dmpi_unlock_.... - //Z_ChangeTag(S_sfx[i].data, PU_CACHE); - I_FreeSfx(S_sfx+i); - //S_sfx[i].data = 0; - - CONS_Debug(DBG_GAMELOGIC, "flushed sfx %.6s\n", S_sfx[i].name); - } - } - nextcleanup = gametic + 15; - } - } -#endif - - // FIXTHIS: nextcleanup is probably unused - for (cnum = 0; cnum < numofchannels; cnum++) { c = &channels[cnum]; @@ -984,37 +844,6 @@ void S_UpdateSounds(void) I_UpdateSound(); } -void S_SetDigMusicVolume(INT32 volume) -{ - if (volume < 0 || volume > 31) - CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n"); - - CV_SetValue(&cv_digmusicvolume, volume&31); - actualdigmusicvolume = cv_digmusicvolume.value; //check for change of var - -#ifdef DJGPPDOS - I_SetDigMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this. -#endif - - if (!nodigimusic) - I_SetDigMusicVolume(volume&31); -} - -void S_SetMIDIMusicVolume(INT32 volume) -{ - if (volume < 0 || volume > 31) - CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n"); - - CV_SetValue(&cv_midimusicvolume, volume&0x1f); - actualmidimusicvolume = cv_midimusicvolume.value; //check for change of var - -#ifdef DJGPPDOS - I_SetMIDIMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this. -#endif - - I_SetMIDIMusicVolume(volume&0x1f); -} - void S_SetSfxVolume(INT32 volume) { if (volume < 0 || volume > 31) @@ -1031,137 +860,6 @@ void S_SetSfxVolume(INT32 volume) #endif } -static boolean S_MIDIMusic(musicinfo_t *music, boolean looping) -{ - if (nomidimusic) - return true; // no error - - if (music_disabled) - return true; // no error - - // get lumpnum if neccessary - if (!music->lumpnum) - { - if (W_CheckNumForName(va("d_%s", music->name)) == LUMPERROR) - return false; - music->lumpnum = W_GetNumForName(va("d_%s", music->name)); - } - - // load & register it - music->data = W_CacheLumpNum(music->lumpnum, PU_MUSIC); -#if defined (macintosh) && !defined (HAVE_SDL) - music->handle = I_RegisterSong(music_num); -#else - music->handle = I_RegisterSong(music->data, W_LumpLength(music->lumpnum)); -#endif - -#ifdef MUSSERV - if (msg_id != -1) - { - struct musmsg msg_buffer; - - msg_buffer.msg_type = 6; - memset(msg_buffer.msg_text, 0, sizeof (msg_buffer.msg_text)); - sprintf(msg_buffer.msg_text, "d_%s", music->name); - msgsnd(msg_id, (struct msgbuf*)&msg_buffer, sizeof (msg_buffer.msg_text), IPC_NOWAIT); - } -#endif - - // play it - if (!I_PlaySong(music->handle, looping)) - return false; - - mus_playing = music; - return true; -} - -static boolean S_DigMusic(musicinfo_t *music, boolean looping) -{ - if (nodigimusic) - return false; // try midi - - if (digital_disabled) - return false; // try midi - - if (!I_StartDigSong(music->name, looping)) - return false; - - mus_playing = music; - return true; -} - -void S_ChangeMusic(UINT32 mslotnum, boolean looping) -{ - musicinfo_t *music; - musicenum_t music_num = (signed)(mslotnum & MUSIC_SONGMASK); - INT32 track_num = (mslotnum & MUSIC_TRACKMASK) >> MUSIC_TRACKSHIFT; - -#if defined (DC) || defined (_WIN32_WCE) || defined (PSP) || defined(GP2X) - S_ClearSfx(); -#endif - - if (nomidimusic && nodigimusic) - return; - - if (music_disabled && digital_disabled) - return; - - // No Music - if (music_num == mus_None) - { - S_StopMusic(); - return; - } - - if (music_num >= NUMMUSIC) - { - CONS_Alert(CONS_ERROR, "Bad music number %d\n", music_num); - return; - } - else - music = &S_music[music_num]; - - if (mus_playing != music) - { - S_StopMusic(); // shutdown old music - if (!S_DigMusic(music, looping) && !S_MIDIMusic(music, looping)) - { - CONS_Alert(CONS_ERROR, M_GetText("Music lump %.6s not found!\n"), music->name); - return; - } - } - I_SetSongTrack(track_num); -} - -boolean S_SpeedMusic(float speed) -{ - return I_SetSongSpeed(speed); -} - -void S_StopMusic(void) -{ - if (!mus_playing) - return; - - if (mus_paused) - I_ResumeSong(mus_playing->handle); - - if (!nodigimusic) - I_StopDigSong(); - - S_SpeedMusic(1.0f); - I_StopSong(mus_playing->handle); - I_UnRegisterSong(mus_playing->handle); - -#ifndef HAVE_SDL //SDL uses RWOPS - Z_ChangeTag(mus_playing->data, PU_CACHE); -#endif - - mus_playing->data = NULL; - mus_playing = NULL; - -} - void S_ClearSfx(void) { #ifndef DJGPPDOS @@ -1452,3 +1150,263 @@ void S_StartSoundName(void *mo, const char *soundname) S_StartSound(mo, soundnum); } + +/// ------------------------ +/// Music +/// ------------------------ + +#define music_playing (music_name[0]) // String is empty if no music is playing + +static char music_name[7]; // up to 6-character name +static lumpnum_t music_lumpnum; // lump number of music (used??) +static void *music_data; // music raw data +static INT32 music_handle; // once registered, the handle for the music + +static boolean mus_paused = 0; // whether songs are mus_paused + +static boolean S_MIDIMusic(const char *mname, boolean looping) +{ + lumpnum_t mlumpnum; + void *mdata; + INT32 mhandle; + + if (nomidimusic || music_disabled) + return false; // didn't search. + + if (W_CheckNumForName(va("d_%s", mname)) == LUMPERROR) + return false; + mlumpnum = W_GetNumForName(va("d_%s", mname)); + + // load & register it + mdata = W_CacheLumpNum(mlumpnum, PU_MUSIC); + mhandle = I_RegisterSong(mdata, W_LumpLength(mlumpnum)); + +#ifdef MUSSERV + if (msg_id != -1) + { + struct musmsg msg_buffer; + + msg_buffer.msg_type = 6; + memset(msg_buffer.msg_text, 0, sizeof (msg_buffer.msg_text)); + sprintf(msg_buffer.msg_text, "d_%s", mname); + msgsnd(msg_id, (struct msgbuf*)&msg_buffer, sizeof (msg_buffer.msg_text), IPC_NOWAIT); + } +#endif + + // play it + if (!I_PlaySong(mhandle, looping)) + return false; + + strncpy(music_name, mname, 7); + music_name[6] = 0; + music_lumpnum = mlumpnum; + music_data = mdata; + music_handle = mhandle; + return true; +} + +static boolean S_DigMusic(const char *mname, boolean looping) +{ + if (nodigimusic || digital_disabled) + return false; // try midi + + if (!I_StartDigSong(mname, looping)) + return false; + + strncpy(music_name, mname, 7); + music_name[6] = 0; + music_lumpnum = LUMPERROR; + music_data = NULL; + music_handle = 0; + return true; +} + +void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping) +{ +#if defined (DC) || defined (_WIN32_WCE) || defined (PSP) || defined(GP2X) + S_ClearSfx(); +#endif + + if ((nomidimusic || music_disabled) && (nodigimusic || digital_disabled)) + return; + + // No Music (empty string) + if (mmusic[0] == 0) + { + S_StopMusic(); + return; + } + + if (strncmp(music_name, mmusic, 6)) + { + S_StopMusic(); // shutdown old music + if (!S_DigMusic(mmusic, looping) && !S_MIDIMusic(mmusic, looping)) + { + CONS_Alert(CONS_ERROR, M_GetText("Music lump %.6s not found!\n"), mmusic); + return; + } + } + I_SetSongTrack(mflags & MUSIC_TRACKMASK); +} + +boolean S_SpeedMusic(float speed) +{ + return I_SetSongSpeed(speed); +} + +void S_StopMusic(void) +{ + if (!music_playing) + return; + + if (mus_paused) + I_ResumeSong(music_handle); + + if (!nodigimusic) + I_StopDigSong(); + + S_SpeedMusic(1.0f); + I_StopSong(music_handle); + I_UnRegisterSong(music_handle); + +#ifndef HAVE_SDL //SDL uses RWOPS + Z_ChangeTag(music_data, PU_CACHE); +#endif + + music_data = NULL; + music_name[0] = 0; +} + +void S_SetDigMusicVolume(INT32 volume) +{ + if (volume < 0 || volume > 31) + CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n"); + + CV_SetValue(&cv_digmusicvolume, volume&31); + actualdigmusicvolume = cv_digmusicvolume.value; //check for change of var + +#ifdef DJGPPDOS + I_SetDigMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this. +#endif + if (!nodigimusic) + I_SetDigMusicVolume(volume&31); +} + +void S_SetMIDIMusicVolume(INT32 volume) +{ + if (volume < 0 || volume > 31) + CONS_Alert(CONS_WARNING, "musicvolume should be between 0-31\n"); + + CV_SetValue(&cv_midimusicvolume, volume&0x1f); + actualmidimusicvolume = cv_midimusicvolume.value; //check for change of var + +#ifdef DJGPPDOS + I_SetMIDIMusicVolume(31); // Trick for buggy dos drivers. Win32 doesn't need this. +#endif + I_SetMIDIMusicVolume(volume&0x1f); +} + +/// ------------------------ +/// Init & Others +/// ------------------------ + +// +// Initializes sound stuff, including volume +// Sets channels, SFX and music volume, +// allocates channel buffer, sets S_sfx lookup. +// +void S_Init(INT32 sfxVolume, INT32 digMusicVolume, INT32 midiMusicVolume) +{ + INT32 i; + + if (dedicated) + return; + + S_SetSfxVolume(sfxVolume); + S_SetDigMusicVolume(digMusicVolume); + S_SetMIDIMusicVolume(midiMusicVolume); + + SetChannelsNum(); + + // no sounds are playing, and they are not mus_paused + mus_paused = 0; + + // Note that sounds have not been cached (yet). + for (i = 1; i < NUMSFX; i++) + { + S_sfx[i].usefulness = -1; // for I_GetSfx() + S_sfx[i].lumpnum = LUMPERROR; + } + + // precache sounds if requested by cmdline, or precachesound var true + if (!nosound && (M_CheckParm("-precachesound") || precachesound.value)) + { + // Initialize external data (all sounds) at start, keep static. + CONS_Printf(M_GetText("Loading sounds... ")); + + for (i = 1; i < NUMSFX; i++) + if (S_sfx[i].name) + S_sfx[i].data = I_GetSfx(&S_sfx[i]); + + CONS_Printf(M_GetText(" pre-cached all sound data\n")); + } +} + + +// +// Per level startup code. +// Kills playing sounds at start of level, +// determines music if any, changes music. +// +void S_Start(void) +{ + if (mapmusflags & MUSIC_RELOADRESET) + { + strncpy(mapmusname, mapheaderinfo[gamemap-1]->musname, 7); + mapmusname[6] = 0; + mapmusflags = (mapheaderinfo[gamemap-1]->mustrack & MUSIC_TRACKMASK); + } + + mus_paused = 0; + + if (cv_resetmusic.value) + S_StopMusic(); + S_ChangeMusic(mapmusname, mapmusflags, true); +} + +// +// Stop and resume music, during game PAUSE. +// +void S_PauseAudio(void) +{ + if (!nodigimusic) + I_PauseSong(0); + + if (music_playing && !mus_paused) + { + I_PauseSong(music_handle); + mus_paused = true; + } + + // pause cd music +#if (defined (__unix__) && !defined (MSDOS)) || defined (UNIXCOMMON) || defined (HAVE_SDL) + I_PauseCD(); +#else + I_StopCD(); +#endif +} + +void S_ResumeAudio(void) +{ + if (!nodigimusic) + I_ResumeSong(0); + else + if (music_playing && mus_paused) + { + I_ResumeSong(music_handle); + mus_paused = false; + } + + // resume cd music + I_ResumeCD(); +} diff --git a/src/s_sound.h b/src/s_sound.h index 6589ca598..12787536b 100644 --- a/src/s_sound.h +++ b/src/s_sound.h @@ -48,9 +48,6 @@ typedef enum extern consvar_t play_mode; #endif -//in case you're wondering why: I need to define this as extern so P_RestoreMusic can get to it so we don't do stupid song/speed changes -extern musicinfo_t *mus_playing; - typedef enum { SF_TOTALLYSINGLE = 1, // Only play one of these sounds at a time...GLOBALLY @@ -100,11 +97,12 @@ void S_StartSoundAtVolume(const void *origin, sfxenum_t sound_id, INT32 volume); // Stop sound for thing at void S_StopSound(void *origin); -// Start music using from sounds.h, and set whether looping -// note: music slot is first 16 bits for songnum, -// next 15 bits for tracknum (gme, other formats with more than one track) +// Start music track, arbitrary, given its name, and set whether looping +// note: music flags 12 bits for tracknum (gme, other formats with more than one track) +// 13-15 aren't used yet // and the last bit we ignore (internal game flag for resetting music on reload) -void S_ChangeMusic(UINT32 mslotnum, boolean looping); +#define S_ChangeMusicInternal(a,b) S_ChangeMusic(a,0,b) +void S_ChangeMusic(const char *mmusic, UINT16 mflags, boolean looping); // Set Speed of Music boolean S_SpeedMusic(float speed); @@ -113,8 +111,8 @@ boolean S_SpeedMusic(float speed); void S_StopMusic(void); // Stop and resume music, during game PAUSE. -void S_PauseSound(void); -void S_ResumeSound(void); +void S_PauseAudio(void); +void S_ResumeAudio(void); // // Updates music & sounds diff --git a/src/sdl/mixer_sound.c b/src/sdl/mixer_sound.c index 71969209c..2ce546153 100644 --- a/src/sdl/mixer_sound.c +++ b/src/sdl/mixer_sound.c @@ -374,6 +374,7 @@ void I_FreeSfx(sfxinfo_t *sfx) if (sfx->data) Mix_FreeChunk(sfx->data); sfx->data = NULL; + sfx->lumpnum = LUMPERROR; } INT32 I_StartSound(sfxenum_t id, UINT8 vol, UINT8 sep, UINT8 pitch, UINT8 priority) diff --git a/src/sounds.c b/src/sounds.c index 1ec86e7bc..97bdf23ec 100644 --- a/src/sounds.c +++ b/src/sounds.c @@ -20,1067 +20,6 @@ #include "w_wad.h" #include "lua_script.h" -// -// Information about all the music -// - -musicinfo_t S_music[NUMMUSIC] = -{ - {NULL, 0, NULL, -1}, - {"map01m", 0, NULL, -1}, - {"map02m", 0, NULL, -1}, - {"map03m", 0, NULL, -1}, - {"map04m", 0, NULL, -1}, - {"map05m", 0, NULL, -1}, - {"map06m", 0, NULL, -1}, - {"map07m", 0, NULL, -1}, - {"map08m", 0, NULL, -1}, - {"map09m", 0, NULL, -1}, - {"map10m", 0, NULL, -1}, - {"map11m", 0, NULL, -1}, - {"map12m", 0, NULL, -1}, - {"map13m", 0, NULL, -1}, - {"map14m", 0, NULL, -1}, - {"map15m", 0, NULL, -1}, - {"map16m", 0, NULL, -1}, - {"map17m", 0, NULL, -1}, - {"map18m", 0, NULL, -1}, - {"map19m", 0, NULL, -1}, - {"map20m", 0, NULL, -1}, - {"map21m", 0, NULL, -1}, - {"map22m", 0, NULL, -1}, - {"map23m", 0, NULL, -1}, - {"map24m", 0, NULL, -1}, - {"map25m", 0, NULL, -1}, - {"map26m", 0, NULL, -1}, - {"map27m", 0, NULL, -1}, - {"map28m", 0, NULL, -1}, - {"map29m", 0, NULL, -1}, - {"map30m", 0, NULL, -1}, - {"map31m", 0, NULL, -1}, - {"map32m", 0, NULL, -1}, - {"map33m", 0, NULL, -1}, - {"map34m", 0, NULL, -1}, - {"map35m", 0, NULL, -1}, - {"map36m", 0, NULL, -1}, - {"map37m", 0, NULL, -1}, - {"map38m", 0, NULL, -1}, - {"map39m", 0, NULL, -1}, - {"map40m", 0, NULL, -1}, - {"map41m", 0, NULL, -1}, - {"map42m", 0, NULL, -1}, - {"map43m", 0, NULL, -1}, - {"map44m", 0, NULL, -1}, - {"map45m", 0, NULL, -1}, - {"map46m", 0, NULL, -1}, - {"map47m", 0, NULL, -1}, - {"map48m", 0, NULL, -1}, - {"map49m", 0, NULL, -1}, - {"map50m", 0, NULL, -1}, - {"map51m", 0, NULL, -1}, - {"map52m", 0, NULL, -1}, - {"map53m", 0, NULL, -1}, - {"map54m", 0, NULL, -1}, - {"map55m", 0, NULL, -1}, - {"map56m", 0, NULL, -1}, - {"map57m", 0, NULL, -1}, - {"map58m", 0, NULL, -1}, - {"map59m", 0, NULL, -1}, - {"map60m", 0, NULL, -1}, - {"map61m", 0, NULL, -1}, - {"map62m", 0, NULL, -1}, - {"map63m", 0, NULL, -1}, - {"map64m", 0, NULL, -1}, - {"map65m", 0, NULL, -1}, - {"map66m", 0, NULL, -1}, - {"map67m", 0, NULL, -1}, - {"map68m", 0, NULL, -1}, - {"map69m", 0, NULL, -1}, - {"map70m", 0, NULL, -1}, - {"map71m", 0, NULL, -1}, - {"map72m", 0, NULL, -1}, - {"map73m", 0, NULL, -1}, - {"map74m", 0, NULL, -1}, - {"map75m", 0, NULL, -1}, - {"map76m", 0, NULL, -1}, - {"map77m", 0, NULL, -1}, - {"map78m", 0, NULL, -1}, - {"map79m", 0, NULL, -1}, - {"map80m", 0, NULL, -1}, - {"map81m", 0, NULL, -1}, - {"map82m", 0, NULL, -1}, - {"map83m", 0, NULL, -1}, - {"map84m", 0, NULL, -1}, - {"map85m", 0, NULL, -1}, - {"map86m", 0, NULL, -1}, - {"map87m", 0, NULL, -1}, - {"map88m", 0, NULL, -1}, - {"map89m", 0, NULL, -1}, - {"map90m", 0, NULL, -1}, - {"map91m", 0, NULL, -1}, - {"map92m", 0, NULL, -1}, - {"map93m", 0, NULL, -1}, - {"map94m", 0, NULL, -1}, - {"map95m", 0, NULL, -1}, - {"map96m", 0, NULL, -1}, - {"map97m", 0, NULL, -1}, - {"map98m", 0, NULL, -1}, - {"map99m", 0, NULL, -1}, - {"mapa0m", 0, NULL, -1}, - {"mapa1m", 0, NULL, -1}, - {"mapa2m", 0, NULL, -1}, - {"mapa3m", 0, NULL, -1}, - {"mapa4m", 0, NULL, -1}, - {"mapa5m", 0, NULL, -1}, - {"mapa6m", 0, NULL, -1}, - {"mapa7m", 0, NULL, -1}, - {"mapa8m", 0, NULL, -1}, - {"mapa9m", 0, NULL, -1}, - {"mapaam", 0, NULL, -1}, - {"mapabm", 0, NULL, -1}, - {"mapacm", 0, NULL, -1}, - {"mapadm", 0, NULL, -1}, - {"mapaem", 0, NULL, -1}, - {"mapafm", 0, NULL, -1}, - {"mapagm", 0, NULL, -1}, - {"mapahm", 0, NULL, -1}, - {"mapaim", 0, NULL, -1}, - {"mapajm", 0, NULL, -1}, - {"mapakm", 0, NULL, -1}, - {"mapalm", 0, NULL, -1}, - {"mapamm", 0, NULL, -1}, - {"mapanm", 0, NULL, -1}, - {"mapaom", 0, NULL, -1}, - {"mapapm", 0, NULL, -1}, - {"mapaqm", 0, NULL, -1}, - {"maparm", 0, NULL, -1}, - {"mapasm", 0, NULL, -1}, - {"mapatm", 0, NULL, -1}, - {"mapaum", 0, NULL, -1}, - {"mapavm", 0, NULL, -1}, - {"mapawm", 0, NULL, -1}, - {"mapaxm", 0, NULL, -1}, - {"mapaym", 0, NULL, -1}, - {"mapazm", 0, NULL, -1}, - {"mapb0m", 0, NULL, -1}, - {"mapb1m", 0, NULL, -1}, - {"mapb2m", 0, NULL, -1}, - {"mapb3m", 0, NULL, -1}, - {"mapb4m", 0, NULL, -1}, - {"mapb5m", 0, NULL, -1}, - {"mapb6m", 0, NULL, -1}, - {"mapb7m", 0, NULL, -1}, - {"mapb8m", 0, NULL, -1}, - {"mapb9m", 0, NULL, -1}, - {"mapbam", 0, NULL, -1}, - {"mapbbm", 0, NULL, -1}, - {"mapbcm", 0, NULL, -1}, - {"mapbdm", 0, NULL, -1}, - {"mapbem", 0, NULL, -1}, - {"mapbfm", 0, NULL, -1}, - {"mapbgm", 0, NULL, -1}, - {"mapbhm", 0, NULL, -1}, - {"mapbim", 0, NULL, -1}, - {"mapbjm", 0, NULL, -1}, - {"mapbkm", 0, NULL, -1}, - {"mapblm", 0, NULL, -1}, - {"mapbmm", 0, NULL, -1}, - {"mapbnm", 0, NULL, -1}, - {"mapbom", 0, NULL, -1}, - {"mapbpm", 0, NULL, -1}, - {"mapbqm", 0, NULL, -1}, - {"mapbrm", 0, NULL, -1}, - {"mapbsm", 0, NULL, -1}, - {"mapbtm", 0, NULL, -1}, - {"mapbum", 0, NULL, -1}, - {"mapbvm", 0, NULL, -1}, - {"mapbwm", 0, NULL, -1}, - {"mapbxm", 0, NULL, -1}, - {"mapbym", 0, NULL, -1}, - {"mapbzm", 0, NULL, -1}, - {"mapc0m", 0, NULL, -1}, - {"mapc1m", 0, NULL, -1}, - {"mapc2m", 0, NULL, -1}, - {"mapc3m", 0, NULL, -1}, - {"mapc4m", 0, NULL, -1}, - {"mapc5m", 0, NULL, -1}, - {"mapc6m", 0, NULL, -1}, - {"mapc7m", 0, NULL, -1}, - {"mapc8m", 0, NULL, -1}, - {"mapc9m", 0, NULL, -1}, - {"mapcam", 0, NULL, -1}, - {"mapcbm", 0, NULL, -1}, - {"mapccm", 0, NULL, -1}, - {"mapcdm", 0, NULL, -1}, - {"mapcem", 0, NULL, -1}, - {"mapcfm", 0, NULL, -1}, - {"mapcgm", 0, NULL, -1}, - {"mapchm", 0, NULL, -1}, - {"mapcim", 0, NULL, -1}, - {"mapcjm", 0, NULL, -1}, - {"mapckm", 0, NULL, -1}, - {"mapclm", 0, NULL, -1}, - {"mapcmm", 0, NULL, -1}, - {"mapcnm", 0, NULL, -1}, - {"mapcom", 0, NULL, -1}, - {"mapcpm", 0, NULL, -1}, - {"mapcqm", 0, NULL, -1}, - {"mapcrm", 0, NULL, -1}, - {"mapcsm", 0, NULL, -1}, - {"mapctm", 0, NULL, -1}, - {"mapcum", 0, NULL, -1}, - {"mapcvm", 0, NULL, -1}, - {"mapcwm", 0, NULL, -1}, - {"mapcxm", 0, NULL, -1}, - {"mapcym", 0, NULL, -1}, - {"mapczm", 0, NULL, -1}, - {"mapd0m", 0, NULL, -1}, - {"mapd1m", 0, NULL, -1}, - {"mapd2m", 0, NULL, -1}, - {"mapd3m", 0, NULL, -1}, - {"mapd4m", 0, NULL, -1}, - {"mapd5m", 0, NULL, -1}, - {"mapd6m", 0, NULL, -1}, - {"mapd7m", 0, NULL, -1}, - {"mapd8m", 0, NULL, -1}, - {"mapd9m", 0, NULL, -1}, - {"mapdam", 0, NULL, -1}, - {"mapdbm", 0, NULL, -1}, - {"mapdcm", 0, NULL, -1}, - {"mapddm", 0, NULL, -1}, - {"mapdem", 0, NULL, -1}, - {"mapdfm", 0, NULL, -1}, - {"mapdgm", 0, NULL, -1}, - {"mapdhm", 0, NULL, -1}, - {"mapdim", 0, NULL, -1}, - {"mapdjm", 0, NULL, -1}, - {"mapdkm", 0, NULL, -1}, - {"mapdlm", 0, NULL, -1}, - {"mapdmm", 0, NULL, -1}, - {"mapdnm", 0, NULL, -1}, - {"mapdom", 0, NULL, -1}, - {"mapdpm", 0, NULL, -1}, - {"mapdqm", 0, NULL, -1}, - {"mapdrm", 0, NULL, -1}, - {"mapdsm", 0, NULL, -1}, - {"mapdtm", 0, NULL, -1}, - {"mapdum", 0, NULL, -1}, - {"mapdvm", 0, NULL, -1}, - {"mapdwm", 0, NULL, -1}, - {"mapdxm", 0, NULL, -1}, - {"mapdym", 0, NULL, -1}, - {"mapdzm", 0, NULL, -1}, - {"mape0m", 0, NULL, -1}, - {"mape1m", 0, NULL, -1}, - {"mape2m", 0, NULL, -1}, - {"mape3m", 0, NULL, -1}, - {"mape4m", 0, NULL, -1}, - {"mape5m", 0, NULL, -1}, - {"mape6m", 0, NULL, -1}, - {"mape7m", 0, NULL, -1}, - {"mape8m", 0, NULL, -1}, - {"mape9m", 0, NULL, -1}, - {"mapeam", 0, NULL, -1}, - {"mapebm", 0, NULL, -1}, - {"mapecm", 0, NULL, -1}, - {"mapedm", 0, NULL, -1}, - {"mapeem", 0, NULL, -1}, - {"mapefm", 0, NULL, -1}, - {"mapegm", 0, NULL, -1}, - {"mapehm", 0, NULL, -1}, - {"mapeim", 0, NULL, -1}, - {"mapejm", 0, NULL, -1}, - {"mapekm", 0, NULL, -1}, - {"mapelm", 0, NULL, -1}, - {"mapemm", 0, NULL, -1}, - {"mapenm", 0, NULL, -1}, - {"mapeom", 0, NULL, -1}, - {"mapepm", 0, NULL, -1}, - {"mapeqm", 0, NULL, -1}, - {"maperm", 0, NULL, -1}, - {"mapesm", 0, NULL, -1}, - {"mapetm", 0, NULL, -1}, - {"mapeum", 0, NULL, -1}, - {"mapevm", 0, NULL, -1}, - {"mapewm", 0, NULL, -1}, - {"mapexm", 0, NULL, -1}, - {"mapeym", 0, NULL, -1}, - {"mapezm", 0, NULL, -1}, - {"mapf0m", 0, NULL, -1}, - {"mapf1m", 0, NULL, -1}, - {"mapf2m", 0, NULL, -1}, - {"mapf3m", 0, NULL, -1}, - {"mapf4m", 0, NULL, -1}, - {"mapf5m", 0, NULL, -1}, - {"mapf6m", 0, NULL, -1}, - {"mapf7m", 0, NULL, -1}, - {"mapf8m", 0, NULL, -1}, - {"mapf9m", 0, NULL, -1}, - {"mapfam", 0, NULL, -1}, - {"mapfbm", 0, NULL, -1}, - {"mapfcm", 0, NULL, -1}, - {"mapfdm", 0, NULL, -1}, - {"mapfem", 0, NULL, -1}, - {"mapffm", 0, NULL, -1}, - {"mapfgm", 0, NULL, -1}, - {"mapfhm", 0, NULL, -1}, - {"mapfim", 0, NULL, -1}, - {"mapfjm", 0, NULL, -1}, - {"mapfkm", 0, NULL, -1}, - {"mapflm", 0, NULL, -1}, - {"mapfmm", 0, NULL, -1}, - {"mapfnm", 0, NULL, -1}, - {"mapfom", 0, NULL, -1}, - {"mapfpm", 0, NULL, -1}, - {"mapfqm", 0, NULL, -1}, - {"mapfrm", 0, NULL, -1}, - {"mapfsm", 0, NULL, -1}, - {"mapftm", 0, NULL, -1}, - {"mapfum", 0, NULL, -1}, - {"mapfvm", 0, NULL, -1}, - {"mapfwm", 0, NULL, -1}, - {"mapfxm", 0, NULL, -1}, - {"mapfym", 0, NULL, -1}, - {"mapfzm", 0, NULL, -1}, - {"mapg0m", 0, NULL, -1}, - {"mapg1m", 0, NULL, -1}, - {"mapg2m", 0, NULL, -1}, - {"mapg3m", 0, NULL, -1}, - {"mapg4m", 0, NULL, -1}, - {"mapg5m", 0, NULL, -1}, - {"mapg6m", 0, NULL, -1}, - {"mapg7m", 0, NULL, -1}, - {"mapg8m", 0, NULL, -1}, - {"mapg9m", 0, NULL, -1}, - {"mapgam", 0, NULL, -1}, - {"mapgbm", 0, NULL, -1}, - {"mapgcm", 0, NULL, -1}, - {"mapgdm", 0, NULL, -1}, - {"mapgem", 0, NULL, -1}, - {"mapgfm", 0, NULL, -1}, - {"mapggm", 0, NULL, -1}, - {"mapghm", 0, NULL, -1}, - {"mapgim", 0, NULL, -1}, - {"mapgjm", 0, NULL, -1}, - {"mapgkm", 0, NULL, -1}, - {"mapglm", 0, NULL, -1}, - {"mapgmm", 0, NULL, -1}, - {"mapgnm", 0, NULL, -1}, - {"mapgom", 0, NULL, -1}, - {"mapgpm", 0, NULL, -1}, - {"mapgqm", 0, NULL, -1}, - {"mapgrm", 0, NULL, -1}, - {"mapgsm", 0, NULL, -1}, - {"mapgtm", 0, NULL, -1}, - {"mapgum", 0, NULL, -1}, - {"mapgvm", 0, NULL, -1}, - {"mapgwm", 0, NULL, -1}, - {"mapgxm", 0, NULL, -1}, - {"mapgym", 0, NULL, -1}, - {"mapgzm", 0, NULL, -1}, - {"maph0m", 0, NULL, -1}, - {"maph1m", 0, NULL, -1}, - {"maph2m", 0, NULL, -1}, - {"maph3m", 0, NULL, -1}, - {"maph4m", 0, NULL, -1}, - {"maph5m", 0, NULL, -1}, - {"maph6m", 0, NULL, -1}, - {"maph7m", 0, NULL, -1}, - {"maph8m", 0, NULL, -1}, - {"maph9m", 0, NULL, -1}, - {"mapham", 0, NULL, -1}, - {"maphbm", 0, NULL, -1}, - {"maphcm", 0, NULL, -1}, - {"maphdm", 0, NULL, -1}, - {"maphem", 0, NULL, -1}, - {"maphfm", 0, NULL, -1}, - {"maphgm", 0, NULL, -1}, - {"maphhm", 0, NULL, -1}, - {"maphim", 0, NULL, -1}, - {"maphjm", 0, NULL, -1}, - {"maphkm", 0, NULL, -1}, - {"maphlm", 0, NULL, -1}, - {"maphmm", 0, NULL, -1}, - {"maphnm", 0, NULL, -1}, - {"maphom", 0, NULL, -1}, - {"maphpm", 0, NULL, -1}, - {"maphqm", 0, NULL, -1}, - {"maphrm", 0, NULL, -1}, - {"maphsm", 0, NULL, -1}, - {"maphtm", 0, NULL, -1}, - {"maphum", 0, NULL, -1}, - {"maphvm", 0, NULL, -1}, - {"maphwm", 0, NULL, -1}, - {"maphxm", 0, NULL, -1}, - {"maphym", 0, NULL, -1}, - {"maphzm", 0, NULL, -1}, - {"mapi0m", 0, NULL, -1}, - {"mapi1m", 0, NULL, -1}, - {"mapi2m", 0, NULL, -1}, - {"mapi3m", 0, NULL, -1}, - {"mapi4m", 0, NULL, -1}, - {"mapi5m", 0, NULL, -1}, - {"mapi6m", 0, NULL, -1}, - {"mapi7m", 0, NULL, -1}, - {"mapi8m", 0, NULL, -1}, - {"mapi9m", 0, NULL, -1}, - {"mapiam", 0, NULL, -1}, - {"mapibm", 0, NULL, -1}, - {"mapicm", 0, NULL, -1}, - {"mapidm", 0, NULL, -1}, - {"mapiem", 0, NULL, -1}, - {"mapifm", 0, NULL, -1}, - {"mapigm", 0, NULL, -1}, - {"mapihm", 0, NULL, -1}, - {"mapiim", 0, NULL, -1}, - {"mapijm", 0, NULL, -1}, - {"mapikm", 0, NULL, -1}, - {"mapilm", 0, NULL, -1}, - {"mapimm", 0, NULL, -1}, - {"mapinm", 0, NULL, -1}, - {"mapiom", 0, NULL, -1}, - {"mapipm", 0, NULL, -1}, - {"mapiqm", 0, NULL, -1}, - {"mapirm", 0, NULL, -1}, - {"mapism", 0, NULL, -1}, - {"mapitm", 0, NULL, -1}, - {"mapium", 0, NULL, -1}, - {"mapivm", 0, NULL, -1}, - {"mapiwm", 0, NULL, -1}, - {"mapixm", 0, NULL, -1}, - {"mapiym", 0, NULL, -1}, - {"mapizm", 0, NULL, -1}, - {"mapj0m", 0, NULL, -1}, - {"mapj1m", 0, NULL, -1}, - {"mapj2m", 0, NULL, -1}, - {"mapj3m", 0, NULL, -1}, - {"mapj4m", 0, NULL, -1}, - {"mapj5m", 0, NULL, -1}, - {"mapj6m", 0, NULL, -1}, - {"mapj7m", 0, NULL, -1}, - {"mapj8m", 0, NULL, -1}, - {"mapj9m", 0, NULL, -1}, - {"mapjam", 0, NULL, -1}, - {"mapjbm", 0, NULL, -1}, - {"mapjcm", 0, NULL, -1}, - {"mapjdm", 0, NULL, -1}, - {"mapjem", 0, NULL, -1}, - {"mapjfm", 0, NULL, -1}, - {"mapjgm", 0, NULL, -1}, - {"mapjhm", 0, NULL, -1}, - {"mapjim", 0, NULL, -1}, - {"mapjjm", 0, NULL, -1}, - {"mapjkm", 0, NULL, -1}, - {"mapjlm", 0, NULL, -1}, - {"mapjmm", 0, NULL, -1}, - {"mapjnm", 0, NULL, -1}, - {"mapjom", 0, NULL, -1}, - {"mapjpm", 0, NULL, -1}, - {"mapjqm", 0, NULL, -1}, - {"mapjrm", 0, NULL, -1}, - {"mapjsm", 0, NULL, -1}, - {"mapjtm", 0, NULL, -1}, - {"mapjum", 0, NULL, -1}, - {"mapjvm", 0, NULL, -1}, - {"mapjwm", 0, NULL, -1}, - {"mapjxm", 0, NULL, -1}, - {"mapjym", 0, NULL, -1}, - {"mapjzm", 0, NULL, -1}, - {"mapk0m", 0, NULL, -1}, - {"mapk1m", 0, NULL, -1}, - {"mapk2m", 0, NULL, -1}, - {"mapk3m", 0, NULL, -1}, - {"mapk4m", 0, NULL, -1}, - {"mapk5m", 0, NULL, -1}, - {"mapk6m", 0, NULL, -1}, - {"mapk7m", 0, NULL, -1}, - {"mapk8m", 0, NULL, -1}, - {"mapk9m", 0, NULL, -1}, - {"mapkam", 0, NULL, -1}, - {"mapkbm", 0, NULL, -1}, - {"mapkcm", 0, NULL, -1}, - {"mapkdm", 0, NULL, -1}, - {"mapkem", 0, NULL, -1}, - {"mapkfm", 0, NULL, -1}, - {"mapkgm", 0, NULL, -1}, - {"mapkhm", 0, NULL, -1}, - {"mapkim", 0, NULL, -1}, - {"mapkjm", 0, NULL, -1}, - {"mapkkm", 0, NULL, -1}, - {"mapklm", 0, NULL, -1}, - {"mapkmm", 0, NULL, -1}, - {"mapknm", 0, NULL, -1}, - {"mapkom", 0, NULL, -1}, - {"mapkpm", 0, NULL, -1}, - {"mapkqm", 0, NULL, -1}, - {"mapkrm", 0, NULL, -1}, - {"mapksm", 0, NULL, -1}, - {"mapktm", 0, NULL, -1}, - {"mapkum", 0, NULL, -1}, - {"mapkvm", 0, NULL, -1}, - {"mapkwm", 0, NULL, -1}, - {"mapkxm", 0, NULL, -1}, - {"mapkym", 0, NULL, -1}, - {"mapkzm", 0, NULL, -1}, - {"mapl0m", 0, NULL, -1}, - {"mapl1m", 0, NULL, -1}, - {"mapl2m", 0, NULL, -1}, - {"mapl3m", 0, NULL, -1}, - {"mapl4m", 0, NULL, -1}, - {"mapl5m", 0, NULL, -1}, - {"mapl6m", 0, NULL, -1}, - {"mapl7m", 0, NULL, -1}, - {"mapl8m", 0, NULL, -1}, - {"mapl9m", 0, NULL, -1}, - {"maplam", 0, NULL, -1}, - {"maplbm", 0, NULL, -1}, - {"maplcm", 0, NULL, -1}, - {"mapldm", 0, NULL, -1}, - {"maplem", 0, NULL, -1}, - {"maplfm", 0, NULL, -1}, - {"maplgm", 0, NULL, -1}, - {"maplhm", 0, NULL, -1}, - {"maplim", 0, NULL, -1}, - {"mapljm", 0, NULL, -1}, - {"maplkm", 0, NULL, -1}, - {"mapllm", 0, NULL, -1}, - {"maplmm", 0, NULL, -1}, - {"maplnm", 0, NULL, -1}, - {"maplom", 0, NULL, -1}, - {"maplpm", 0, NULL, -1}, - {"maplqm", 0, NULL, -1}, - {"maplrm", 0, NULL, -1}, - {"maplsm", 0, NULL, -1}, - {"mapltm", 0, NULL, -1}, - {"maplum", 0, NULL, -1}, - {"maplvm", 0, NULL, -1}, - {"maplwm", 0, NULL, -1}, - {"maplxm", 0, NULL, -1}, - {"maplym", 0, NULL, -1}, - {"maplzm", 0, NULL, -1}, - {"mapm0m", 0, NULL, -1}, - {"mapm1m", 0, NULL, -1}, - {"mapm2m", 0, NULL, -1}, - {"mapm3m", 0, NULL, -1}, - {"mapm4m", 0, NULL, -1}, - {"mapm5m", 0, NULL, -1}, - {"mapm6m", 0, NULL, -1}, - {"mapm7m", 0, NULL, -1}, - {"mapm8m", 0, NULL, -1}, - {"mapm9m", 0, NULL, -1}, - {"mapmam", 0, NULL, -1}, - {"mapmbm", 0, NULL, -1}, - {"mapmcm", 0, NULL, -1}, - {"mapmdm", 0, NULL, -1}, - {"mapmem", 0, NULL, -1}, - {"mapmfm", 0, NULL, -1}, - {"mapmgm", 0, NULL, -1}, - {"mapmhm", 0, NULL, -1}, - {"mapmim", 0, NULL, -1}, - {"mapmjm", 0, NULL, -1}, - {"mapmkm", 0, NULL, -1}, - {"mapmlm", 0, NULL, -1}, - {"mapmmm", 0, NULL, -1}, - {"mapmnm", 0, NULL, -1}, - {"mapmom", 0, NULL, -1}, - {"mapmpm", 0, NULL, -1}, - {"mapmqm", 0, NULL, -1}, - {"mapmrm", 0, NULL, -1}, - {"mapmsm", 0, NULL, -1}, - {"mapmtm", 0, NULL, -1}, - {"mapmum", 0, NULL, -1}, - {"mapmvm", 0, NULL, -1}, - {"mapmwm", 0, NULL, -1}, - {"mapmxm", 0, NULL, -1}, - {"mapmym", 0, NULL, -1}, - {"mapmzm", 0, NULL, -1}, - {"mapn0m", 0, NULL, -1}, - {"mapn1m", 0, NULL, -1}, - {"mapn2m", 0, NULL, -1}, - {"mapn3m", 0, NULL, -1}, - {"mapn4m", 0, NULL, -1}, - {"mapn5m", 0, NULL, -1}, - {"mapn6m", 0, NULL, -1}, - {"mapn7m", 0, NULL, -1}, - {"mapn8m", 0, NULL, -1}, - {"mapn9m", 0, NULL, -1}, - {"mapnam", 0, NULL, -1}, - {"mapnbm", 0, NULL, -1}, - {"mapncm", 0, NULL, -1}, - {"mapndm", 0, NULL, -1}, - {"mapnem", 0, NULL, -1}, - {"mapnfm", 0, NULL, -1}, - {"mapngm", 0, NULL, -1}, - {"mapnhm", 0, NULL, -1}, - {"mapnim", 0, NULL, -1}, - {"mapnjm", 0, NULL, -1}, - {"mapnkm", 0, NULL, -1}, - {"mapnlm", 0, NULL, -1}, - {"mapnmm", 0, NULL, -1}, - {"mapnnm", 0, NULL, -1}, - {"mapnom", 0, NULL, -1}, - {"mapnpm", 0, NULL, -1}, - {"mapnqm", 0, NULL, -1}, - {"mapnrm", 0, NULL, -1}, - {"mapnsm", 0, NULL, -1}, - {"mapntm", 0, NULL, -1}, - {"mapnum", 0, NULL, -1}, - {"mapnvm", 0, NULL, -1}, - {"mapnwm", 0, NULL, -1}, - {"mapnxm", 0, NULL, -1}, - {"mapnym", 0, NULL, -1}, - {"mapnzm", 0, NULL, -1}, - {"mapo0m", 0, NULL, -1}, - {"mapo1m", 0, NULL, -1}, - {"mapo2m", 0, NULL, -1}, - {"mapo3m", 0, NULL, -1}, - {"mapo4m", 0, NULL, -1}, - {"mapo5m", 0, NULL, -1}, - {"mapo6m", 0, NULL, -1}, - {"mapo7m", 0, NULL, -1}, - {"mapo8m", 0, NULL, -1}, - {"mapo9m", 0, NULL, -1}, - {"mapoam", 0, NULL, -1}, - {"mapobm", 0, NULL, -1}, - {"mapocm", 0, NULL, -1}, - {"mapodm", 0, NULL, -1}, - {"mapoem", 0, NULL, -1}, - {"mapofm", 0, NULL, -1}, - {"mapogm", 0, NULL, -1}, - {"mapohm", 0, NULL, -1}, - {"mapoim", 0, NULL, -1}, - {"mapojm", 0, NULL, -1}, - {"mapokm", 0, NULL, -1}, - {"mapolm", 0, NULL, -1}, - {"mapomm", 0, NULL, -1}, - {"maponm", 0, NULL, -1}, - {"mapoom", 0, NULL, -1}, - {"mapopm", 0, NULL, -1}, - {"mapoqm", 0, NULL, -1}, - {"maporm", 0, NULL, -1}, - {"maposm", 0, NULL, -1}, - {"mapotm", 0, NULL, -1}, - {"mapoum", 0, NULL, -1}, - {"mapovm", 0, NULL, -1}, - {"mapowm", 0, NULL, -1}, - {"mapoxm", 0, NULL, -1}, - {"mapoym", 0, NULL, -1}, - {"mapozm", 0, NULL, -1}, - {"mapp0m", 0, NULL, -1}, - {"mapp1m", 0, NULL, -1}, - {"mapp2m", 0, NULL, -1}, - {"mapp3m", 0, NULL, -1}, - {"mapp4m", 0, NULL, -1}, - {"mapp5m", 0, NULL, -1}, - {"mapp6m", 0, NULL, -1}, - {"mapp7m", 0, NULL, -1}, - {"mapp8m", 0, NULL, -1}, - {"mapp9m", 0, NULL, -1}, - {"mappam", 0, NULL, -1}, - {"mappbm", 0, NULL, -1}, - {"mappcm", 0, NULL, -1}, - {"mappdm", 0, NULL, -1}, - {"mappem", 0, NULL, -1}, - {"mappfm", 0, NULL, -1}, - {"mappgm", 0, NULL, -1}, - {"mapphm", 0, NULL, -1}, - {"mappim", 0, NULL, -1}, - {"mappjm", 0, NULL, -1}, - {"mappkm", 0, NULL, -1}, - {"mapplm", 0, NULL, -1}, - {"mappmm", 0, NULL, -1}, - {"mappnm", 0, NULL, -1}, - {"mappom", 0, NULL, -1}, - {"mapppm", 0, NULL, -1}, - {"mappqm", 0, NULL, -1}, - {"mapprm", 0, NULL, -1}, - {"mappsm", 0, NULL, -1}, - {"mapptm", 0, NULL, -1}, - {"mappum", 0, NULL, -1}, - {"mappvm", 0, NULL, -1}, - {"mappwm", 0, NULL, -1}, - {"mappxm", 0, NULL, -1}, - {"mappym", 0, NULL, -1}, - {"mappzm", 0, NULL, -1}, - {"mapq0m", 0, NULL, -1}, - {"mapq1m", 0, NULL, -1}, - {"mapq2m", 0, NULL, -1}, - {"mapq3m", 0, NULL, -1}, - {"mapq4m", 0, NULL, -1}, - {"mapq5m", 0, NULL, -1}, - {"mapq6m", 0, NULL, -1}, - {"mapq7m", 0, NULL, -1}, - {"mapq8m", 0, NULL, -1}, - {"mapq9m", 0, NULL, -1}, - {"mapqam", 0, NULL, -1}, - {"mapqbm", 0, NULL, -1}, - {"mapqcm", 0, NULL, -1}, - {"mapqdm", 0, NULL, -1}, - {"mapqem", 0, NULL, -1}, - {"mapqfm", 0, NULL, -1}, - {"mapqgm", 0, NULL, -1}, - {"mapqhm", 0, NULL, -1}, - {"mapqim", 0, NULL, -1}, - {"mapqjm", 0, NULL, -1}, - {"mapqkm", 0, NULL, -1}, - {"mapqlm", 0, NULL, -1}, - {"mapqmm", 0, NULL, -1}, - {"mapqnm", 0, NULL, -1}, - {"mapqom", 0, NULL, -1}, - {"mapqpm", 0, NULL, -1}, - {"mapqqm", 0, NULL, -1}, - {"mapqrm", 0, NULL, -1}, - {"mapqsm", 0, NULL, -1}, - {"mapqtm", 0, NULL, -1}, - {"mapqum", 0, NULL, -1}, - {"mapqvm", 0, NULL, -1}, - {"mapqwm", 0, NULL, -1}, - {"mapqxm", 0, NULL, -1}, - {"mapqym", 0, NULL, -1}, - {"mapqzm", 0, NULL, -1}, - {"mapr0m", 0, NULL, -1}, - {"mapr1m", 0, NULL, -1}, - {"mapr2m", 0, NULL, -1}, - {"mapr3m", 0, NULL, -1}, - {"mapr4m", 0, NULL, -1}, - {"mapr5m", 0, NULL, -1}, - {"mapr6m", 0, NULL, -1}, - {"mapr7m", 0, NULL, -1}, - {"mapr8m", 0, NULL, -1}, - {"mapr9m", 0, NULL, -1}, - {"mapram", 0, NULL, -1}, - {"maprbm", 0, NULL, -1}, - {"maprcm", 0, NULL, -1}, - {"maprdm", 0, NULL, -1}, - {"maprem", 0, NULL, -1}, - {"maprfm", 0, NULL, -1}, - {"maprgm", 0, NULL, -1}, - {"maprhm", 0, NULL, -1}, - {"maprim", 0, NULL, -1}, - {"maprjm", 0, NULL, -1}, - {"maprkm", 0, NULL, -1}, - {"maprlm", 0, NULL, -1}, - {"maprmm", 0, NULL, -1}, - {"maprnm", 0, NULL, -1}, - {"maprom", 0, NULL, -1}, - {"maprpm", 0, NULL, -1}, - {"maprqm", 0, NULL, -1}, - {"maprrm", 0, NULL, -1}, - {"maprsm", 0, NULL, -1}, - {"maprtm", 0, NULL, -1}, - {"maprum", 0, NULL, -1}, - {"maprvm", 0, NULL, -1}, - {"maprwm", 0, NULL, -1}, - {"maprxm", 0, NULL, -1}, - {"maprym", 0, NULL, -1}, - {"maprzm", 0, NULL, -1}, - {"maps0m", 0, NULL, -1}, - {"maps1m", 0, NULL, -1}, - {"maps2m", 0, NULL, -1}, - {"maps3m", 0, NULL, -1}, - {"maps4m", 0, NULL, -1}, - {"maps5m", 0, NULL, -1}, - {"maps6m", 0, NULL, -1}, - {"maps7m", 0, NULL, -1}, - {"maps8m", 0, NULL, -1}, - {"maps9m", 0, NULL, -1}, - {"mapsam", 0, NULL, -1}, - {"mapsbm", 0, NULL, -1}, - {"mapscm", 0, NULL, -1}, - {"mapsdm", 0, NULL, -1}, - {"mapsem", 0, NULL, -1}, - {"mapsfm", 0, NULL, -1}, - {"mapsgm", 0, NULL, -1}, - {"mapshm", 0, NULL, -1}, - {"mapsim", 0, NULL, -1}, - {"mapsjm", 0, NULL, -1}, - {"mapskm", 0, NULL, -1}, - {"mapslm", 0, NULL, -1}, - {"mapsmm", 0, NULL, -1}, - {"mapsnm", 0, NULL, -1}, - {"mapsom", 0, NULL, -1}, - {"mapspm", 0, NULL, -1}, - {"mapsqm", 0, NULL, -1}, - {"mapsrm", 0, NULL, -1}, - {"mapssm", 0, NULL, -1}, - {"mapstm", 0, NULL, -1}, - {"mapsum", 0, NULL, -1}, - {"mapsvm", 0, NULL, -1}, - {"mapswm", 0, NULL, -1}, - {"mapsxm", 0, NULL, -1}, - {"mapsym", 0, NULL, -1}, - {"mapszm", 0, NULL, -1}, - {"mapt0m", 0, NULL, -1}, - {"mapt1m", 0, NULL, -1}, - {"mapt2m", 0, NULL, -1}, - {"mapt3m", 0, NULL, -1}, - {"mapt4m", 0, NULL, -1}, - {"mapt5m", 0, NULL, -1}, - {"mapt6m", 0, NULL, -1}, - {"mapt7m", 0, NULL, -1}, - {"mapt8m", 0, NULL, -1}, - {"mapt9m", 0, NULL, -1}, - {"maptam", 0, NULL, -1}, - {"maptbm", 0, NULL, -1}, - {"maptcm", 0, NULL, -1}, - {"maptdm", 0, NULL, -1}, - {"maptem", 0, NULL, -1}, - {"maptfm", 0, NULL, -1}, - {"maptgm", 0, NULL, -1}, - {"mapthm", 0, NULL, -1}, - {"maptim", 0, NULL, -1}, - {"maptjm", 0, NULL, -1}, - {"maptkm", 0, NULL, -1}, - {"maptlm", 0, NULL, -1}, - {"maptmm", 0, NULL, -1}, - {"maptnm", 0, NULL, -1}, - {"maptom", 0, NULL, -1}, - {"maptpm", 0, NULL, -1}, - {"maptqm", 0, NULL, -1}, - {"maptrm", 0, NULL, -1}, - {"maptsm", 0, NULL, -1}, - {"mapttm", 0, NULL, -1}, - {"maptum", 0, NULL, -1}, - {"maptvm", 0, NULL, -1}, - {"maptwm", 0, NULL, -1}, - {"maptxm", 0, NULL, -1}, - {"maptym", 0, NULL, -1}, - {"maptzm", 0, NULL, -1}, - {"mapu0m", 0, NULL, -1}, - {"mapu1m", 0, NULL, -1}, - {"mapu2m", 0, NULL, -1}, - {"mapu3m", 0, NULL, -1}, - {"mapu4m", 0, NULL, -1}, - {"mapu5m", 0, NULL, -1}, - {"mapu6m", 0, NULL, -1}, - {"mapu7m", 0, NULL, -1}, - {"mapu8m", 0, NULL, -1}, - {"mapu9m", 0, NULL, -1}, - {"mapuam", 0, NULL, -1}, - {"mapubm", 0, NULL, -1}, - {"mapucm", 0, NULL, -1}, - {"mapudm", 0, NULL, -1}, - {"mapuem", 0, NULL, -1}, - {"mapufm", 0, NULL, -1}, - {"mapugm", 0, NULL, -1}, - {"mapuhm", 0, NULL, -1}, - {"mapuim", 0, NULL, -1}, - {"mapujm", 0, NULL, -1}, - {"mapukm", 0, NULL, -1}, - {"mapulm", 0, NULL, -1}, - {"mapumm", 0, NULL, -1}, - {"mapunm", 0, NULL, -1}, - {"mapuom", 0, NULL, -1}, - {"mapupm", 0, NULL, -1}, - {"mapuqm", 0, NULL, -1}, - {"mapurm", 0, NULL, -1}, - {"mapusm", 0, NULL, -1}, - {"maputm", 0, NULL, -1}, - {"mapuum", 0, NULL, -1}, - {"mapuvm", 0, NULL, -1}, - {"mapuwm", 0, NULL, -1}, - {"mapuxm", 0, NULL, -1}, - {"mapuym", 0, NULL, -1}, - {"mapuzm", 0, NULL, -1}, - {"mapv0m", 0, NULL, -1}, - {"mapv1m", 0, NULL, -1}, - {"mapv2m", 0, NULL, -1}, - {"mapv3m", 0, NULL, -1}, - {"mapv4m", 0, NULL, -1}, - {"mapv5m", 0, NULL, -1}, - {"mapv6m", 0, NULL, -1}, - {"mapv7m", 0, NULL, -1}, - {"mapv8m", 0, NULL, -1}, - {"mapv9m", 0, NULL, -1}, - {"mapvam", 0, NULL, -1}, - {"mapvbm", 0, NULL, -1}, - {"mapvcm", 0, NULL, -1}, - {"mapvdm", 0, NULL, -1}, - {"mapvem", 0, NULL, -1}, - {"mapvfm", 0, NULL, -1}, - {"mapvgm", 0, NULL, -1}, - {"mapvhm", 0, NULL, -1}, - {"mapvim", 0, NULL, -1}, - {"mapvjm", 0, NULL, -1}, - {"mapvkm", 0, NULL, -1}, - {"mapvlm", 0, NULL, -1}, - {"mapvmm", 0, NULL, -1}, - {"mapvnm", 0, NULL, -1}, - {"mapvom", 0, NULL, -1}, - {"mapvpm", 0, NULL, -1}, - {"mapvqm", 0, NULL, -1}, - {"mapvrm", 0, NULL, -1}, - {"mapvsm", 0, NULL, -1}, - {"mapvtm", 0, NULL, -1}, - {"mapvum", 0, NULL, -1}, - {"mapvvm", 0, NULL, -1}, - {"mapvwm", 0, NULL, -1}, - {"mapvxm", 0, NULL, -1}, - {"mapvym", 0, NULL, -1}, - {"mapvzm", 0, NULL, -1}, - {"mapw0m", 0, NULL, -1}, - {"mapw1m", 0, NULL, -1}, - {"mapw2m", 0, NULL, -1}, - {"mapw3m", 0, NULL, -1}, - {"mapw4m", 0, NULL, -1}, - {"mapw5m", 0, NULL, -1}, - {"mapw6m", 0, NULL, -1}, - {"mapw7m", 0, NULL, -1}, - {"mapw8m", 0, NULL, -1}, - {"mapw9m", 0, NULL, -1}, - {"mapwam", 0, NULL, -1}, - {"mapwbm", 0, NULL, -1}, - {"mapwcm", 0, NULL, -1}, - {"mapwdm", 0, NULL, -1}, - {"mapwem", 0, NULL, -1}, - {"mapwfm", 0, NULL, -1}, - {"mapwgm", 0, NULL, -1}, - {"mapwhm", 0, NULL, -1}, - {"mapwim", 0, NULL, -1}, - {"mapwjm", 0, NULL, -1}, - {"mapwkm", 0, NULL, -1}, - {"mapwlm", 0, NULL, -1}, - {"mapwmm", 0, NULL, -1}, - {"mapwnm", 0, NULL, -1}, - {"mapwom", 0, NULL, -1}, - {"mapwpm", 0, NULL, -1}, - {"mapwqm", 0, NULL, -1}, - {"mapwrm", 0, NULL, -1}, - {"mapwsm", 0, NULL, -1}, - {"mapwtm", 0, NULL, -1}, - {"mapwum", 0, NULL, -1}, - {"mapwvm", 0, NULL, -1}, - {"mapwwm", 0, NULL, -1}, - {"mapwxm", 0, NULL, -1}, - {"mapwym", 0, NULL, -1}, - {"mapwzm", 0, NULL, -1}, - {"mapx0m", 0, NULL, -1}, - {"mapx1m", 0, NULL, -1}, - {"mapx2m", 0, NULL, -1}, - {"mapx3m", 0, NULL, -1}, - {"mapx4m", 0, NULL, -1}, - {"mapx5m", 0, NULL, -1}, - {"mapx6m", 0, NULL, -1}, - {"mapx7m", 0, NULL, -1}, - {"mapx8m", 0, NULL, -1}, - {"mapx9m", 0, NULL, -1}, - {"mapxam", 0, NULL, -1}, - {"mapxbm", 0, NULL, -1}, - {"mapxcm", 0, NULL, -1}, - {"mapxdm", 0, NULL, -1}, - {"mapxem", 0, NULL, -1}, - {"mapxfm", 0, NULL, -1}, - {"mapxgm", 0, NULL, -1}, - {"mapxhm", 0, NULL, -1}, - {"mapxim", 0, NULL, -1}, - {"mapxjm", 0, NULL, -1}, - {"mapxkm", 0, NULL, -1}, - {"mapxlm", 0, NULL, -1}, - {"mapxmm", 0, NULL, -1}, - {"mapxnm", 0, NULL, -1}, - {"mapxom", 0, NULL, -1}, - {"mapxpm", 0, NULL, -1}, - {"mapxqm", 0, NULL, -1}, - {"mapxrm", 0, NULL, -1}, - {"mapxsm", 0, NULL, -1}, - {"mapxtm", 0, NULL, -1}, - {"mapxum", 0, NULL, -1}, - {"mapxvm", 0, NULL, -1}, - {"mapxwm", 0, NULL, -1}, - {"mapxxm", 0, NULL, -1}, - {"mapxym", 0, NULL, -1}, - {"mapxzm", 0, NULL, -1}, - {"mapy0m", 0, NULL, -1}, - {"mapy1m", 0, NULL, -1}, - {"mapy2m", 0, NULL, -1}, - {"mapy3m", 0, NULL, -1}, - {"mapy4m", 0, NULL, -1}, - {"mapy5m", 0, NULL, -1}, - {"mapy6m", 0, NULL, -1}, - {"mapy7m", 0, NULL, -1}, - {"mapy8m", 0, NULL, -1}, - {"mapy9m", 0, NULL, -1}, - {"mapyam", 0, NULL, -1}, - {"mapybm", 0, NULL, -1}, - {"mapycm", 0, NULL, -1}, - {"mapydm", 0, NULL, -1}, - {"mapyem", 0, NULL, -1}, - {"mapyfm", 0, NULL, -1}, - {"mapygm", 0, NULL, -1}, - {"mapyhm", 0, NULL, -1}, - {"mapyim", 0, NULL, -1}, - {"mapyjm", 0, NULL, -1}, - {"mapykm", 0, NULL, -1}, - {"mapylm", 0, NULL, -1}, - {"mapymm", 0, NULL, -1}, - {"mapynm", 0, NULL, -1}, - {"mapyom", 0, NULL, -1}, - {"mapypm", 0, NULL, -1}, - {"mapyqm", 0, NULL, -1}, - {"mapyrm", 0, NULL, -1}, - {"mapysm", 0, NULL, -1}, - {"mapytm", 0, NULL, -1}, - {"mapyum", 0, NULL, -1}, - {"mapyvm", 0, NULL, -1}, - {"mapywm", 0, NULL, -1}, - {"mapyxm", 0, NULL, -1}, - {"mapyym", 0, NULL, -1}, - {"mapyzm", 0, NULL, -1}, - {"mapz0m", 0, NULL, -1}, - {"mapz1m", 0, NULL, -1}, - {"mapz2m", 0, NULL, -1}, - {"mapz3m", 0, NULL, -1}, - {"mapz4m", 0, NULL, -1}, - {"mapz5m", 0, NULL, -1}, - {"mapz6m", 0, NULL, -1}, - {"mapz7m", 0, NULL, -1}, - {"mapz8m", 0, NULL, -1}, - {"mapz9m", 0, NULL, -1}, - {"mapzam", 0, NULL, -1}, - {"mapzbm", 0, NULL, -1}, - {"mapzcm", 0, NULL, -1}, - {"mapzdm", 0, NULL, -1}, - {"mapzem", 0, NULL, -1}, - {"mapzfm", 0, NULL, -1}, - {"mapzgm", 0, NULL, -1}, - {"mapzhm", 0, NULL, -1}, - {"mapzim", 0, NULL, -1}, - {"mapzjm", 0, NULL, -1}, - {"mapzkm", 0, NULL, -1}, - {"mapzlm", 0, NULL, -1}, - {"mapzmm", 0, NULL, -1}, - {"mapznm", 0, NULL, -1}, - {"mapzom", 0, NULL, -1}, - {"mapzpm", 0, NULL, -1}, - {"mapzqm", 0, NULL, -1}, - {"mapzrm", 0, NULL, -1}, - {"mapzsm", 0, NULL, -1}, - {"mapztm", 0, NULL, -1}, - {"mapzum", 0, NULL, -1}, - {"mapzvm", 0, NULL, -1}, - {"mapzwm", 0, NULL, -1}, - {"mapzxm", 0, NULL, -1}, - {"mapzym", 0, NULL, -1}, - {"mapzzm", 0, NULL, -1}, - - {"titles", 0, NULL, -1}, // Title screen - {"read_m", 0, NULL, -1}, // Intro - {"lclear", 0, NULL, -1}, // Level clear - {"invinc", 0, NULL, -1}, // Invincibility - {"shoes", 0, NULL, -1}, // Super sneakers - {"minvnc", 0, NULL, -1}, // Mario invincibility - {"drown", 0, NULL, -1}, // Drowning - {"gmover", 0, NULL, -1}, // Game over - {"xtlife", 0, NULL, -1}, // Extra life - {"contsc", 0, NULL, -1}, // Continue screen - {"supers", 0, NULL, -1}, // Super Sonic - {"chrsel", 0, NULL, -1}, // Character select - {"credit", 0, NULL, -1}, // Credits - {"racent", 0, NULL, -1}, // Race Results - {"stjr", 0, NULL, -1}, // Sonic Team Jr. Presents -}; - - // // Information about all the sfx // diff --git a/src/sounds.h b/src/sounds.h index c5851a346..4388d02cf 100644 --- a/src/sounds.h +++ b/src/sounds.h @@ -86,1095 +86,9 @@ struct sfxinfo_struct lumpnum_t lumpnum; }; -// -// MusicInfo struct. -// -typedef struct -{ - // up to 6-character name - const char *name; - - // lump number of music - lumpnum_t lumpnum; - - // music data - void *data; - - // music handle once registered - INT32 handle; -} musicinfo_t; - // the complete set of sound effects extern sfxinfo_t S_sfx[]; -// the complete set of music -extern musicinfo_t S_music[]; - -// -// Identifiers for all music in game. -// - -// Music list (don't edit this comment!) -typedef enum -{ - mus_None, - mus_map01m, - mus_map02m, - mus_map03m, - mus_map04m, - mus_map05m, - mus_map06m, - mus_map07m, - mus_map08m, - mus_map09m, - mus_map10m, - mus_map11m, - mus_map12m, - mus_map13m, - mus_map14m, - mus_map15m, - mus_map16m, - mus_map17m, - mus_map18m, - mus_map19m, - mus_map20m, - mus_map21m, - mus_map22m, - mus_map23m, - mus_map24m, - mus_map25m, - mus_map26m, - mus_map27m, - mus_map28m, - mus_map29m, - mus_map30m, - mus_map31m, - mus_map32m, - mus_map33m, - mus_map34m, - mus_map35m, - mus_map36m, - mus_map37m, - mus_map38m, - mus_map39m, - mus_map40m, - mus_map41m, - mus_map42m, - mus_map43m, - mus_map44m, - mus_map45m, - mus_map46m, - mus_map47m, - mus_map48m, - mus_map49m, - mus_map50m, - mus_map51m, - mus_map52m, - mus_map53m, - mus_map54m, - mus_map55m, - mus_map56m, - mus_map57m, - mus_map58m, - mus_map59m, - mus_map60m, - mus_map61m, - mus_map62m, - mus_map63m, - mus_map64m, - mus_map65m, - mus_map66m, - mus_map67m, - mus_map68m, - mus_map69m, - mus_map70m, - mus_map71m, - mus_map72m, - mus_map73m, - mus_map74m, - mus_map75m, - mus_map76m, - mus_map77m, - mus_map78m, - mus_map79m, - mus_map80m, - mus_map81m, - mus_map82m, - mus_map83m, - mus_map84m, - mus_map85m, - mus_map86m, - mus_map87m, - mus_map88m, - mus_map89m, - mus_map90m, - mus_map91m, - mus_map92m, - mus_map93m, - mus_map94m, - mus_map95m, - mus_map96m, - mus_map97m, - mus_map98m, - mus_map99m, - mus_mapa0m, - mus_mapa1m, - mus_mapa2m, - mus_mapa3m, - mus_mapa4m, - mus_mapa5m, - mus_mapa6m, - mus_mapa7m, - mus_mapa8m, - mus_mapa9m, - mus_mapaam, - mus_mapabm, - mus_mapacm, - mus_mapadm, - mus_mapaem, - mus_mapafm, - mus_mapagm, - mus_mapahm, - mus_mapaim, - mus_mapajm, - mus_mapakm, - mus_mapalm, - mus_mapamm, - mus_mapanm, - mus_mapaom, - mus_mapapm, - mus_mapaqm, - mus_maparm, - mus_mapasm, - mus_mapatm, - mus_mapaum, - mus_mapavm, - mus_mapawm, - mus_mapaxm, - mus_mapaym, - mus_mapazm, - mus_mapb0m, - mus_mapb1m, - mus_mapb2m, - mus_mapb3m, - mus_mapb4m, - mus_mapb5m, - mus_mapb6m, - mus_mapb7m, - mus_mapb8m, - mus_mapb9m, - mus_mapbam, - mus_mapbbm, - mus_mapbcm, - mus_mapbdm, - mus_mapbem, - mus_mapbfm, - mus_mapbgm, - mus_mapbhm, - mus_mapbim, - mus_mapbjm, - mus_mapbkm, - mus_mapblm, - mus_mapbmm, - mus_mapbnm, - mus_mapbom, - mus_mapbpm, - mus_mapbqm, - mus_mapbrm, - mus_mapbsm, - mus_mapbtm, - mus_mapbum, - mus_mapbvm, - mus_mapbwm, - mus_mapbxm, - mus_mapbym, - mus_mapbzm, - mus_mapc0m, - mus_mapc1m, - mus_mapc2m, - mus_mapc3m, - mus_mapc4m, - mus_mapc5m, - mus_mapc6m, - mus_mapc7m, - mus_mapc8m, - mus_mapc9m, - mus_mapcam, - mus_mapcbm, - mus_mapccm, - mus_mapcdm, - mus_mapcem, - mus_mapcfm, - mus_mapcgm, - mus_mapchm, - mus_mapcim, - mus_mapcjm, - mus_mapckm, - mus_mapclm, - mus_mapcmm, - mus_mapcnm, - mus_mapcom, - mus_mapcpm, - mus_mapcqm, - mus_mapcrm, - mus_mapcsm, - mus_mapctm, - mus_mapcum, - mus_mapcvm, - mus_mapcwm, - mus_mapcxm, - mus_mapcym, - mus_mapczm, - mus_mapd0m, - mus_mapd1m, - mus_mapd2m, - mus_mapd3m, - mus_mapd4m, - mus_mapd5m, - mus_mapd6m, - mus_mapd7m, - mus_mapd8m, - mus_mapd9m, - mus_mapdam, - mus_mapdbm, - mus_mapdcm, - mus_mapddm, - mus_mapdem, - mus_mapdfm, - mus_mapdgm, - mus_mapdhm, - mus_mapdim, - mus_mapdjm, - mus_mapdkm, - mus_mapdlm, - mus_mapdmm, - mus_mapdnm, - mus_mapdom, - mus_mapdpm, - mus_mapdqm, - mus_mapdrm, - mus_mapdsm, - mus_mapdtm, - mus_mapdum, - mus_mapdvm, - mus_mapdwm, - mus_mapdxm, - mus_mapdym, - mus_mapdzm, - mus_mape0m, - mus_mape1m, - mus_mape2m, - mus_mape3m, - mus_mape4m, - mus_mape5m, - mus_mape6m, - mus_mape7m, - mus_mape8m, - mus_mape9m, - mus_mapeam, - mus_mapebm, - mus_mapecm, - mus_mapedm, - mus_mapeem, - mus_mapefm, - mus_mapegm, - mus_mapehm, - mus_mapeim, - mus_mapejm, - mus_mapekm, - mus_mapelm, - mus_mapemm, - mus_mapenm, - mus_mapeom, - mus_mapepm, - mus_mapeqm, - mus_maperm, - mus_mapesm, - mus_mapetm, - mus_mapeum, - mus_mapevm, - mus_mapewm, - mus_mapexm, - mus_mapeym, - mus_mapezm, - mus_mapf0m, - mus_mapf1m, - mus_mapf2m, - mus_mapf3m, - mus_mapf4m, - mus_mapf5m, - mus_mapf6m, - mus_mapf7m, - mus_mapf8m, - mus_mapf9m, - mus_mapfam, - mus_mapfbm, - mus_mapfcm, - mus_mapfdm, - mus_mapfem, - mus_mapffm, - mus_mapfgm, - mus_mapfhm, - mus_mapfim, - mus_mapfjm, - mus_mapfkm, - mus_mapflm, - mus_mapfmm, - mus_mapfnm, - mus_mapfom, - mus_mapfpm, - mus_mapfqm, - mus_mapfrm, - mus_mapfsm, - mus_mapftm, - mus_mapfum, - mus_mapfvm, - mus_mapfwm, - mus_mapfxm, - mus_mapfym, - mus_mapfzm, - mus_mapg0m, - mus_mapg1m, - mus_mapg2m, - mus_mapg3m, - mus_mapg4m, - mus_mapg5m, - mus_mapg6m, - mus_mapg7m, - mus_mapg8m, - mus_mapg9m, - mus_mapgam, - mus_mapgbm, - mus_mapgcm, - mus_mapgdm, - mus_mapgem, - mus_mapgfm, - mus_mapggm, - mus_mapghm, - mus_mapgim, - mus_mapgjm, - mus_mapgkm, - mus_mapglm, - mus_mapgmm, - mus_mapgnm, - mus_mapgom, - mus_mapgpm, - mus_mapgqm, - mus_mapgrm, - mus_mapgsm, - mus_mapgtm, - mus_mapgum, - mus_mapgvm, - mus_mapgwm, - mus_mapgxm, - mus_mapgym, - mus_mapgzm, - mus_maph0m, - mus_maph1m, - mus_maph2m, - mus_maph3m, - mus_maph4m, - mus_maph5m, - mus_maph6m, - mus_maph7m, - mus_maph8m, - mus_maph9m, - mus_mapham, - mus_maphbm, - mus_maphcm, - mus_maphdm, - mus_maphem, - mus_maphfm, - mus_maphgm, - mus_maphhm, - mus_maphim, - mus_maphjm, - mus_maphkm, - mus_maphlm, - mus_maphmm, - mus_maphnm, - mus_maphom, - mus_maphpm, - mus_maphqm, - mus_maphrm, - mus_maphsm, - mus_maphtm, - mus_maphum, - mus_maphvm, - mus_maphwm, - mus_maphxm, - mus_maphym, - mus_maphzm, - mus_mapi0m, - mus_mapi1m, - mus_mapi2m, - mus_mapi3m, - mus_mapi4m, - mus_mapi5m, - mus_mapi6m, - mus_mapi7m, - mus_mapi8m, - mus_mapi9m, - mus_mapiam, - mus_mapibm, - mus_mapicm, - mus_mapidm, - mus_mapiem, - mus_mapifm, - mus_mapigm, - mus_mapihm, - mus_mapiim, - mus_mapijm, - mus_mapikm, - mus_mapilm, - mus_mapimm, - mus_mapinm, - mus_mapiom, - mus_mapipm, - mus_mapiqm, - mus_mapirm, - mus_mapism, - mus_mapitm, - mus_mapium, - mus_mapivm, - mus_mapiwm, - mus_mapixm, - mus_mapiym, - mus_mapizm, - mus_mapj0m, - mus_mapj1m, - mus_mapj2m, - mus_mapj3m, - mus_mapj4m, - mus_mapj5m, - mus_mapj6m, - mus_mapj7m, - mus_mapj8m, - mus_mapj9m, - mus_mapjam, - mus_mapjbm, - mus_mapjcm, - mus_mapjdm, - mus_mapjem, - mus_mapjfm, - mus_mapjgm, - mus_mapjhm, - mus_mapjim, - mus_mapjjm, - mus_mapjkm, - mus_mapjlm, - mus_mapjmm, - mus_mapjnm, - mus_mapjom, - mus_mapjpm, - mus_mapjqm, - mus_mapjrm, - mus_mapjsm, - mus_mapjtm, - mus_mapjum, - mus_mapjvm, - mus_mapjwm, - mus_mapjxm, - mus_mapjym, - mus_mapjzm, - mus_mapk0m, - mus_mapk1m, - mus_mapk2m, - mus_mapk3m, - mus_mapk4m, - mus_mapk5m, - mus_mapk6m, - mus_mapk7m, - mus_mapk8m, - mus_mapk9m, - mus_mapkam, - mus_mapkbm, - mus_mapkcm, - mus_mapkdm, - mus_mapkem, - mus_mapkfm, - mus_mapkgm, - mus_mapkhm, - mus_mapkim, - mus_mapkjm, - mus_mapkkm, - mus_mapklm, - mus_mapkmm, - mus_mapknm, - mus_mapkom, - mus_mapkpm, - mus_mapkqm, - mus_mapkrm, - mus_mapksm, - mus_mapktm, - mus_mapkum, - mus_mapkvm, - mus_mapkwm, - mus_mapkxm, - mus_mapkym, - mus_mapkzm, - mus_mapl0m, - mus_mapl1m, - mus_mapl2m, - mus_mapl3m, - mus_mapl4m, - mus_mapl5m, - mus_mapl6m, - mus_mapl7m, - mus_mapl8m, - mus_mapl9m, - mus_maplam, - mus_maplbm, - mus_maplcm, - mus_mapldm, - mus_maplem, - mus_maplfm, - mus_maplgm, - mus_maplhm, - mus_maplim, - mus_mapljm, - mus_maplkm, - mus_mapllm, - mus_maplmm, - mus_maplnm, - mus_maplom, - mus_maplpm, - mus_maplqm, - mus_maplrm, - mus_maplsm, - mus_mapltm, - mus_maplum, - mus_maplvm, - mus_maplwm, - mus_maplxm, - mus_maplym, - mus_maplzm, - mus_mapm0m, - mus_mapm1m, - mus_mapm2m, - mus_mapm3m, - mus_mapm4m, - mus_mapm5m, - mus_mapm6m, - mus_mapm7m, - mus_mapm8m, - mus_mapm9m, - mus_mapmam, - mus_mapmbm, - mus_mapmcm, - mus_mapmdm, - mus_mapmem, - mus_mapmfm, - mus_mapmgm, - mus_mapmhm, - mus_mapmim, - mus_mapmjm, - mus_mapmkm, - mus_mapmlm, - mus_mapmmm, - mus_mapmnm, - mus_mapmom, - mus_mapmpm, - mus_mapmqm, - mus_mapmrm, - mus_mapmsm, - mus_mapmtm, - mus_mapmum, - mus_mapmvm, - mus_mapmwm, - mus_mapmxm, - mus_mapmym, - mus_mapmzm, - mus_mapn0m, - mus_mapn1m, - mus_mapn2m, - mus_mapn3m, - mus_mapn4m, - mus_mapn5m, - mus_mapn6m, - mus_mapn7m, - mus_mapn8m, - mus_mapn9m, - mus_mapnam, - mus_mapnbm, - mus_mapncm, - mus_mapndm, - mus_mapnem, - mus_mapnfm, - mus_mapngm, - mus_mapnhm, - mus_mapnim, - mus_mapnjm, - mus_mapnkm, - mus_mapnlm, - mus_mapnmm, - mus_mapnnm, - mus_mapnom, - mus_mapnpm, - mus_mapnqm, - mus_mapnrm, - mus_mapnsm, - mus_mapntm, - mus_mapnum, - mus_mapnvm, - mus_mapnwm, - mus_mapnxm, - mus_mapnym, - mus_mapnzm, - mus_mapo0m, - mus_mapo1m, - mus_mapo2m, - mus_mapo3m, - mus_mapo4m, - mus_mapo5m, - mus_mapo6m, - mus_mapo7m, - mus_mapo8m, - mus_mapo9m, - mus_mapoam, - mus_mapobm, - mus_mapocm, - mus_mapodm, - mus_mapoem, - mus_mapofm, - mus_mapogm, - mus_mapohm, - mus_mapoim, - mus_mapojm, - mus_mapokm, - mus_mapolm, - mus_mapomm, - mus_maponm, - mus_mapoom, - mus_mapopm, - mus_mapoqm, - mus_maporm, - mus_maposm, - mus_mapotm, - mus_mapoum, - mus_mapovm, - mus_mapowm, - mus_mapoxm, - mus_mapoym, - mus_mapozm, - mus_mapp0m, - mus_mapp1m, - mus_mapp2m, - mus_mapp3m, - mus_mapp4m, - mus_mapp5m, - mus_mapp6m, - mus_mapp7m, - mus_mapp8m, - mus_mapp9m, - mus_mappam, - mus_mappbm, - mus_mappcm, - mus_mappdm, - mus_mappem, - mus_mappfm, - mus_mappgm, - mus_mapphm, - mus_mappim, - mus_mappjm, - mus_mappkm, - mus_mapplm, - mus_mappmm, - mus_mappnm, - mus_mappom, - mus_mapppm, - mus_mappqm, - mus_mapprm, - mus_mappsm, - mus_mapptm, - mus_mappum, - mus_mappvm, - mus_mappwm, - mus_mappxm, - mus_mappym, - mus_mappzm, - mus_mapq0m, - mus_mapq1m, - mus_mapq2m, - mus_mapq3m, - mus_mapq4m, - mus_mapq5m, - mus_mapq6m, - mus_mapq7m, - mus_mapq8m, - mus_mapq9m, - mus_mapqam, - mus_mapqbm, - mus_mapqcm, - mus_mapqdm, - mus_mapqem, - mus_mapqfm, - mus_mapqgm, - mus_mapqhm, - mus_mapqim, - mus_mapqjm, - mus_mapqkm, - mus_mapqlm, - mus_mapqmm, - mus_mapqnm, - mus_mapqom, - mus_mapqpm, - mus_mapqqm, - mus_mapqrm, - mus_mapqsm, - mus_mapqtm, - mus_mapqum, - mus_mapqvm, - mus_mapqwm, - mus_mapqxm, - mus_mapqym, - mus_mapqzm, - mus_mapr0m, - mus_mapr1m, - mus_mapr2m, - mus_mapr3m, - mus_mapr4m, - mus_mapr5m, - mus_mapr6m, - mus_mapr7m, - mus_mapr8m, - mus_mapr9m, - mus_mapram, - mus_maprbm, - mus_maprcm, - mus_maprdm, - mus_maprem, - mus_maprfm, - mus_maprgm, - mus_maprhm, - mus_maprim, - mus_maprjm, - mus_maprkm, - mus_maprlm, - mus_maprmm, - mus_maprnm, - mus_maprom, - mus_maprpm, - mus_maprqm, - mus_maprrm, - mus_maprsm, - mus_maprtm, - mus_maprum, - mus_maprvm, - mus_maprwm, - mus_maprxm, - mus_maprym, - mus_maprzm, - mus_maps0m, - mus_maps1m, - mus_maps2m, - mus_maps3m, - mus_maps4m, - mus_maps5m, - mus_maps6m, - mus_maps7m, - mus_maps8m, - mus_maps9m, - mus_mapsam, - mus_mapsbm, - mus_mapscm, - mus_mapsdm, - mus_mapsem, - mus_mapsfm, - mus_mapsgm, - mus_mapshm, - mus_mapsim, - mus_mapsjm, - mus_mapskm, - mus_mapslm, - mus_mapsmm, - mus_mapsnm, - mus_mapsom, - mus_mapspm, - mus_mapsqm, - mus_mapsrm, - mus_mapssm, - mus_mapstm, - mus_mapsum, - mus_mapsvm, - mus_mapswm, - mus_mapsxm, - mus_mapsym, - mus_mapszm, - mus_mapt0m, - mus_mapt1m, - mus_mapt2m, - mus_mapt3m, - mus_mapt4m, - mus_mapt5m, - mus_mapt6m, - mus_mapt7m, - mus_mapt8m, - mus_mapt9m, - mus_maptam, - mus_maptbm, - mus_maptcm, - mus_maptdm, - mus_maptem, - mus_maptfm, - mus_maptgm, - mus_mapthm, - mus_maptim, - mus_maptjm, - mus_maptkm, - mus_maptlm, - mus_maptmm, - mus_maptnm, - mus_maptom, - mus_maptpm, - mus_maptqm, - mus_maptrm, - mus_maptsm, - mus_mapttm, - mus_maptum, - mus_maptvm, - mus_maptwm, - mus_maptxm, - mus_maptym, - mus_maptzm, - mus_mapu0m, - mus_mapu1m, - mus_mapu2m, - mus_mapu3m, - mus_mapu4m, - mus_mapu5m, - mus_mapu6m, - mus_mapu7m, - mus_mapu8m, - mus_mapu9m, - mus_mapuam, - mus_mapubm, - mus_mapucm, - mus_mapudm, - mus_mapuem, - mus_mapufm, - mus_mapugm, - mus_mapuhm, - mus_mapuim, - mus_mapujm, - mus_mapukm, - mus_mapulm, - mus_mapumm, - mus_mapunm, - mus_mapuom, - mus_mapupm, - mus_mapuqm, - mus_mapurm, - mus_mapusm, - mus_maputm, - mus_mapuum, - mus_mapuvm, - mus_mapuwm, - mus_mapuxm, - mus_mapuym, - mus_mapuzm, - mus_mapv0m, - mus_mapv1m, - mus_mapv2m, - mus_mapv3m, - mus_mapv4m, - mus_mapv5m, - mus_mapv6m, - mus_mapv7m, - mus_mapv8m, - mus_mapv9m, - mus_mapvam, - mus_mapvbm, - mus_mapvcm, - mus_mapvdm, - mus_mapvem, - mus_mapvfm, - mus_mapvgm, - mus_mapvhm, - mus_mapvim, - mus_mapvjm, - mus_mapvkm, - mus_mapvlm, - mus_mapvmm, - mus_mapvnm, - mus_mapvom, - mus_mapvpm, - mus_mapvqm, - mus_mapvrm, - mus_mapvsm, - mus_mapvtm, - mus_mapvum, - mus_mapvvm, - mus_mapvwm, - mus_mapvxm, - mus_mapvym, - mus_mapvzm, - mus_mapw0m, - mus_mapw1m, - mus_mapw2m, - mus_mapw3m, - mus_mapw4m, - mus_mapw5m, - mus_mapw6m, - mus_mapw7m, - mus_mapw8m, - mus_mapw9m, - mus_mapwam, - mus_mapwbm, - mus_mapwcm, - mus_mapwdm, - mus_mapwem, - mus_mapwfm, - mus_mapwgm, - mus_mapwhm, - mus_mapwim, - mus_mapwjm, - mus_mapwkm, - mus_mapwlm, - mus_mapwmm, - mus_mapwnm, - mus_mapwom, - mus_mapwpm, - mus_mapwqm, - mus_mapwrm, - mus_mapwsm, - mus_mapwtm, - mus_mapwum, - mus_mapwvm, - mus_mapwwm, - mus_mapwxm, - mus_mapwym, - mus_mapwzm, - mus_mapx0m, - mus_mapx1m, - mus_mapx2m, - mus_mapx3m, - mus_mapx4m, - mus_mapx5m, - mus_mapx6m, - mus_mapx7m, - mus_mapx8m, - mus_mapx9m, - mus_mapxam, - mus_mapxbm, - mus_mapxcm, - mus_mapxdm, - mus_mapxem, - mus_mapxfm, - mus_mapxgm, - mus_mapxhm, - mus_mapxim, - mus_mapxjm, - mus_mapxkm, - mus_mapxlm, - mus_mapxmm, - mus_mapxnm, - mus_mapxom, - mus_mapxpm, - mus_mapxqm, - mus_mapxrm, - mus_mapxsm, - mus_mapxtm, - mus_mapxum, - mus_mapxvm, - mus_mapxwm, - mus_mapxxm, - mus_mapxym, - mus_mapxzm, - mus_mapy0m, - mus_mapy1m, - mus_mapy2m, - mus_mapy3m, - mus_mapy4m, - mus_mapy5m, - mus_mapy6m, - mus_mapy7m, - mus_mapy8m, - mus_mapy9m, - mus_mapyam, - mus_mapybm, - mus_mapycm, - mus_mapydm, - mus_mapyem, - mus_mapyfm, - mus_mapygm, - mus_mapyhm, - mus_mapyim, - mus_mapyjm, - mus_mapykm, - mus_mapylm, - mus_mapymm, - mus_mapynm, - mus_mapyom, - mus_mapypm, - mus_mapyqm, - mus_mapyrm, - mus_mapysm, - mus_mapytm, - mus_mapyum, - mus_mapyvm, - mus_mapywm, - mus_mapyxm, - mus_mapyym, - mus_mapyzm, - mus_mapz0m, - mus_mapz1m, - mus_mapz2m, - mus_mapz3m, - mus_mapz4m, - mus_mapz5m, - mus_mapz6m, - mus_mapz7m, - mus_mapz8m, - mus_mapz9m, - mus_mapzam, - mus_mapzbm, - mus_mapzcm, - mus_mapzdm, - mus_mapzem, - mus_mapzfm, - mus_mapzgm, - mus_mapzhm, - mus_mapzim, - mus_mapzjm, - mus_mapzkm, - mus_mapzlm, - mus_mapzmm, - mus_mapznm, - mus_mapzom, - mus_mapzpm, - mus_mapzqm, - mus_mapzrm, - mus_mapzsm, - mus_mapztm, - mus_mapzum, - mus_mapzvm, - mus_mapzwm, - mus_mapzxm, - mus_mapzym, - mus_mapzzm, - - mus_titles, // title screen - mus_read_m, // intro - mus_lclear, // level clear - mus_invinc, // invincibility - mus_shoes, // super sneakers - mus_minvnc, // Mario invincibility - mus_drown, // drowning - mus_gmover, // game over - mus_xtlife, // extra life - mus_contsc, // continue screen - mus_supers, // Super Sonic - mus_chrsel, // character select - mus_credit, // credits - mus_racent, // Race Results - mus_stjr, // Sonic Team Jr. Presents - - NUMMUSIC -} musicenum_t; -// Note: song number should be a UINT16, as mapmusic only uses 16 bits for music slot number. -// (the rest is track number and an internal reload flag) - // // Identifiers for all sfx in game. // diff --git a/src/y_inter.c b/src/y_inter.c index 2f2edf7ca..104c1004d 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -632,7 +632,7 @@ void Y_Ticker(void) boolean anybonuses = false; if (!intertic) // first time only - S_ChangeMusic(mus_lclear, false); // don't loop it + S_ChangeMusicInternal("lclear", false); // don't loop it if (intertic < TICRATE) // one second pause before tally begins return; @@ -693,7 +693,7 @@ void Y_Ticker(void) if (!intertic) // first time only { - S_ChangeMusic(mus_lclear, false); // don't loop it + S_ChangeMusicInternal("lclear", false); // don't loop it tallydonetic = 0; } @@ -754,7 +754,7 @@ void Y_Ticker(void) else if (intertype == int_match || intertype == int_ctf || intertype == int_teammatch) // match { if (!intertic) // first time only - S_ChangeMusic(mus_racent, true); // loop it + S_ChangeMusicInternal("racent", true); // loop it // If a player has left or joined, recalculate scores. if (data.match.numplayers != D_NumPlayers()) @@ -763,7 +763,7 @@ void Y_Ticker(void) else if (intertype == int_race || intertype == int_classicrace) // race { if (!intertic) // first time only - S_ChangeMusic(mus_racent, true); // loop it + S_ChangeMusicInternal("racent", true); // loop it // Don't bother recalcing for race. It doesn't make as much sense. } From 1e4c2f8aad3d2d48eb408f400fde8e259b40fe18 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 7 Jan 2016 20:41:58 -0800 Subject: [PATCH 02/15] Fixed LD413 --- src/p_setup.c | 12 ++++++++++-- src/p_spec.c | 2 +- 2 files changed, 11 insertions(+), 3 deletions(-) diff --git a/src/p_setup.c b/src/p_setup.c index 3a51d90b3..000a3a65c 100644 --- a/src/p_setup.c +++ b/src/p_setup.c @@ -1451,8 +1451,16 @@ static void P_LoadSideDefs2(lumpnum_t lumpnum) sd->bottomtexture = get_number(process)-1; } M_Memcpy(process,msd->toptexture,8); - sd->text = Z_Malloc(strlen(process)+1, PU_LEVEL, NULL); - M_Memcpy(sd->text, process, strlen(process)+1); + process[8] = '\0'; + sd->text = Z_Malloc(7, PU_LEVEL, NULL); + + // If they type in O_ or D_ and their music name, just shrug, + // then copy the rest instead. + if ((process[0] == 'O' || process[0] == 'D') && process[7]) + M_Memcpy(sd->text, process+2, 6); + else // Assume it's a proper music name. + M_Memcpy(sd->text, process, 6); + sd->text[6] = 0; break; } case 414: // Play SFX diff --git a/src/p_spec.c b/src/p_spec.c index beeb2e5a7..d59f76780 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -2392,7 +2392,7 @@ static void P_ProcessLineSpecial(line_t *line, mobj_t *mo, sector_t *callsec) { UINT16 tracknum = (UINT16)sides[line->sidenum[0]].bottomtexture; - strncpy(mapmusname, line->text, 7); + strncpy(mapmusname, sides[line->sidenum[0]].text, 7); mapmusname[6] = 0; mapmusflags = tracknum & MUSIC_TRACKMASK; From e1f9a012297d5220dcdd9395265467621a170e32 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 7 Jan 2016 23:48:19 -0800 Subject: [PATCH 03/15] Fix crash on game clear (No, game, you can't allocate a map header for the credits, why were you doing that before and how did it not break anything??) --- src/g_game.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/g_game.c b/src/g_game.c index 76d6035f5..f6d7adee3 100644 --- a/src/g_game.c +++ b/src/g_game.c @@ -2877,7 +2877,8 @@ static void G_DoCompleted(void) // We are committed to this map now. // We may as well allocate its header if it doesn't exist - if(!mapheaderinfo[nextmap]) + // (That is, if it's a real map) + if (nextmap < NUMMAPS && !mapheaderinfo[nextmap]) P_AllocMapHeader(nextmap); if (skipstats) From a4d05350f711db76676e9b48c36d88bd7dbec274 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Fri, 8 Jan 2016 03:23:05 -0800 Subject: [PATCH 04/15] Fixed some oddities with TUNES. --- src/d_netcmd.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index 85b7ece67..0836170fc 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3784,7 +3784,7 @@ static void Command_Tunes_f(void) tunearg = mapheaderinfo[gamemap-1]->musname; track = mapheaderinfo[gamemap-1]->mustrack; } - else if (tunearg[3] == 0 && toupper(tunearg[0]) >= 'A' && toupper(tunearg[0]) <= 'Z') + else if (!tunearg[2] && toupper(tunearg[0]) >= 'A' && toupper(tunearg[0]) <= 'Z') tunenum = (UINT16)M_MapNumber(tunearg[0], tunearg[1]); if (tunenum && tunenum >= 1036) From 577afbc6937586b6cd73c3ca857124434facd66d Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 4 Feb 2016 01:17:27 -0800 Subject: [PATCH 05/15] All internal music changes use new lump names ... that all start with _ for reasons specified in the music topic --- src/f_finale.c | 10 +++++----- src/m_menu.c | 16 ++++++++-------- src/p_enemy.c | 4 ++-- src/p_inter.c | 4 ++-- src/p_user.c | 16 ++++++++-------- src/y_inter.c | 8 ++++---- 6 files changed, 29 insertions(+), 29 deletions(-) diff --git a/src/f_finale.c b/src/f_finale.c index efe39f294..864e55265 100644 --- a/src/f_finale.c +++ b/src/f_finale.c @@ -559,7 +559,7 @@ static void F_IntroDrawScene(void) if (finalecount < 4) S_StopMusic(); if (finalecount == 4) - S_ChangeMusicInternal("stjr", false); + S_ChangeMusicInternal("_stjr", false); x = (BASEVIDWIDTH<lastOn; G_SetGamestate(GS_TIMEATTACK); modeattacking = ATTACKING_NONE; - S_ChangeMusicInternal("racent", true); + S_ChangeMusicInternal("_inter", true); // Update replay availability. CV_AddValue(&cv_nextmap, 1); CV_AddValue(&cv_nextmap, -1); @@ -6938,7 +6938,7 @@ static void M_ToggleDigital(void) if (nodigimusic) return; S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value); S_StopMusic(); - S_ChangeMusicInternal("lclear", false); + S_ChangeMusicInternal("_clear", false); M_StartMessage(M_GetText("Digital Music Enabled\n"), NULL, MM_NOTHING); } else @@ -6965,7 +6965,7 @@ static void M_ToggleMIDI(void) I_InitMIDIMusic(); if (nomidimusic) return; S_Init(cv_soundvolume.value, cv_digmusicvolume.value, cv_midimusicvolume.value); - S_ChangeMusicInternal("lclear", false); + S_ChangeMusicInternal("_clear", false); M_StartMessage(M_GetText("MIDI Music Enabled\n"), NULL, MM_NOTHING); } else diff --git a/src/p_enemy.c b/src/p_enemy.c index 177acf862..cd5069435 100644 --- a/src/p_enemy.c +++ b/src/p_enemy.c @@ -3064,7 +3064,7 @@ void A_Invincibility(mobj_t *actor) S_StopMusic(); if (mariomode) G_GhostAddColor(GHC_INVINCIBLE); - S_ChangeMusicInternal((mariomode) ? "minvnc" : "invinc", false); + S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false); } } @@ -3100,7 +3100,7 @@ void A_SuperSneakers(mobj_t *actor) else { S_StopMusic(); - S_ChangeMusicInternal("shoes", false); + S_ChangeMusicInternal("_shoes", false); } } } diff --git a/src/p_inter.c b/src/p_inter.c index 669eacbdc..c42a5eee7 100644 --- a/src/p_inter.c +++ b/src/p_inter.c @@ -2081,7 +2081,7 @@ void P_KillMobj(mobj_t *target, mobj_t *inflictor, mobj_t *source, UINT8 damaget if (P_IsLocalPlayer(target->player) && target->player == &players[consoleplayer]) { S_StopMusic(); // Stop the Music! Tails 03-14-2000 - S_ChangeMusicInternal("gmover", false); // Yousa dead now, Okieday? Tails 03-14-2000 + S_ChangeMusicInternal("_gover", false); // Yousa dead now, Okieday? Tails 03-14-2000 } } } @@ -2478,7 +2478,7 @@ static inline void P_NiGHTSDamage(mobj_t *target, mobj_t *source) && player->nightstime < 10*TICRATE) { //S_StartSound(NULL, sfx_timeup); // that creepy "out of time" music from NiGHTS. Dummied out, as some on the dev team thought it wasn't Sonic-y enough (Mystic, notably). Uncomment to restore. -SH - S_ChangeMusicInternal("drown",false); + S_ChangeMusicInternal("_drown",false); } } } diff --git a/src/p_user.c b/src/p_user.c index a01262e5c..c09695a6c 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -965,7 +965,7 @@ void P_DoSuperTransformation(player_t *player, boolean giverings) if (!(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC) && P_IsLocalPlayer(player)) { S_StopMusic(); - S_ChangeMusicInternal("supers", true); + S_ChangeMusicInternal("_super", true); } S_StartSound(NULL, sfx_supert); //let all players hear it -mattw_cfi @@ -1101,7 +1101,7 @@ void P_PlayLivesJingle(player_t *player) if (player) player->powers[pw_extralife] = extralifetics + 1; S_StopMusic(); // otherwise it won't restart if this is done twice in a row - S_ChangeMusicInternal("xtlife", false); + S_ChangeMusicInternal("_1up", false); } } @@ -1119,9 +1119,9 @@ void P_RestoreMusic(player_t *player) return; S_SpeedMusic(1.0f); if (player->powers[pw_super] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC)) - S_ChangeMusicInternal("supers", true); + S_ChangeMusicInternal("_1up", true); else if (player->powers[pw_invulnerability] > 1) - S_ChangeMusicInternal((mariomode) ? "minvnc" : "invinc", false); + S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false); else if (player->powers[pw_sneakers] > 1 && !player->powers[pw_super]) { if (mapheaderinfo[gamemap-1]->levelflags & LF_SPEEDMUSIC) @@ -1130,7 +1130,7 @@ void P_RestoreMusic(player_t *player) S_ChangeMusic(mapmusname, mapmusflags, true); } else - S_ChangeMusicInternal("shoes", true); + S_ChangeMusicInternal("_shoes", true); } else S_ChangeMusic(mapmusname, mapmusflags, true); @@ -2081,7 +2081,7 @@ static void P_CheckUnderwaterAndSpaceTimer(player_t *player) && player == &players[consoleplayer]) { S_StopMusic(); - S_ChangeMusicInternal("drown", false); + S_ChangeMusicInternal("_drown", false); } if (player->powers[pw_underwater] == 25*TICRATE + 1) @@ -5618,7 +5618,7 @@ static void P_NiGHTSMovement(player_t *player) } else if (P_IsLocalPlayer(player) && player->nightstime == 10*TICRATE) // S_StartSound(NULL, sfx_timeup); // that creepy "out of time" music from NiGHTS. Dummied out, as some on the dev team thought it wasn't Sonic-y enough (Mystic, notably). Uncomment to restore. -SH - S_ChangeMusicInternal("drown",false); + S_ChangeMusicInternal("_drown",false); if (player->mo->z < player->mo->floorz) @@ -8747,7 +8747,7 @@ void P_PlayerThink(player_t *player) if (countdown == 11*TICRATE - 1) { if (P_IsLocalPlayer(player)) - S_ChangeMusicInternal("drown", false); + S_ChangeMusicInternal("_drown", false); } // If you've hit the countdown and you haven't made diff --git a/src/y_inter.c b/src/y_inter.c index 104c1004d..b0b0e087b 100644 --- a/src/y_inter.c +++ b/src/y_inter.c @@ -632,7 +632,7 @@ void Y_Ticker(void) boolean anybonuses = false; if (!intertic) // first time only - S_ChangeMusicInternal("lclear", false); // don't loop it + S_ChangeMusicInternal("_clear", false); // don't loop it if (intertic < TICRATE) // one second pause before tally begins return; @@ -693,7 +693,7 @@ void Y_Ticker(void) if (!intertic) // first time only { - S_ChangeMusicInternal("lclear", false); // don't loop it + S_ChangeMusicInternal("_clear", false); // don't loop it tallydonetic = 0; } @@ -754,7 +754,7 @@ void Y_Ticker(void) else if (intertype == int_match || intertype == int_ctf || intertype == int_teammatch) // match { if (!intertic) // first time only - S_ChangeMusicInternal("racent", true); // loop it + S_ChangeMusicInternal("_inter", true); // loop it // If a player has left or joined, recalculate scores. if (data.match.numplayers != D_NumPlayers()) @@ -763,7 +763,7 @@ void Y_Ticker(void) else if (intertype == int_race || intertype == int_classicrace) // race { if (!intertic) // first time only - S_ChangeMusicInternal("racent", true); // loop it + S_ChangeMusicInternal("_inter", true); // loop it // Don't bother recalcing for race. It doesn't make as much sense. } From 42fb7ed5aa697a13a62be64fe609da581d07993d Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 4 Feb 2016 02:37:40 -0800 Subject: [PATCH 06/15] clearly I don't care about Super forms much :v --- src/p_user.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_user.c b/src/p_user.c index c09695a6c..96788798b 100644 --- a/src/p_user.c +++ b/src/p_user.c @@ -1119,7 +1119,7 @@ void P_RestoreMusic(player_t *player) return; S_SpeedMusic(1.0f); if (player->powers[pw_super] && !(mapheaderinfo[gamemap-1]->levelflags & LF_NOSSMUSIC)) - S_ChangeMusicInternal("_1up", true); + S_ChangeMusicInternal("_super", true); else if (player->powers[pw_invulnerability] > 1) S_ChangeMusicInternal((mariomode) ? "_minv" : "_inv", false); else if (player->powers[pw_sneakers] > 1 && !player->powers[pw_super]) From 63a9c66317c263124567234897ed6240b5e34f9e Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 4 Feb 2016 17:27:55 -0800 Subject: [PATCH 07/15] Just a few more changes to TUNES, nothing special --- src/d_netcmd.c | 31 ++++++++++++++++++++----------- 1 file changed, 20 insertions(+), 11 deletions(-) diff --git a/src/d_netcmd.c b/src/d_netcmd.c index e6a9f74a9..68245408a 100644 --- a/src/d_netcmd.c +++ b/src/d_netcmd.c @@ -3766,11 +3766,12 @@ static void Command_Tunes_f(void) if (argc < 2) //tunes slot ... { - CONS_Printf("tunes :\n"); - CONS_Printf(M_GetText("Play a music slot at a set speed (\"1\" being normal speed).\n")); - CONS_Printf(M_GetText("If the format supports multiple songs, you can specify which one to play.\n")); - CONS_Printf(M_GetText("The current tune is: %s\nThe current track is: %d\n"), - mapmusname, (mapmusflags & MUSIC_TRACKMASK)); + CONS_Printf("tunes [track] [speed] / <-show> / <-default> / <-none>:\n"); + CONS_Printf(M_GetText("Play an arbitrary music lump. If a map number is used, 'MAP##M' is played.\n")); + CONS_Printf(M_GetText("If the format supports multiple songs, you can specify which one to play.\n\n")); + CONS_Printf(M_GetText("* With \"-show\", shows the currently playing tune and track.\n")); + CONS_Printf(M_GetText("* With \"-default\", returns to the default music for the map.\n")); + CONS_Printf(M_GetText("* With \"-none\", any music playing will be stopped.\n")); return; } @@ -3778,12 +3779,18 @@ static void Command_Tunes_f(void) tunenum = (UINT16)atoi(tunearg); track = 0; - if (!strcasecmp(tunearg, "none")) + if (!strcasecmp(tunearg, "-show")) + { + CONS_Printf(M_GetText("The current tune is: %s [track %d]\n"), + mapmusname, (mapmusflags & MUSIC_TRACKMASK)); + return; + } + if (!strcasecmp(tunearg, "-none")) { S_StopMusic(); return; } - else if (!strcasecmp(tunearg, "default")) + else if (!strcasecmp(tunearg, "-default")) { tunearg = mapheaderinfo[gamemap-1]->musname; track = mapheaderinfo[gamemap-1]->mustrack; @@ -3796,9 +3803,11 @@ static void Command_Tunes_f(void) CONS_Alert(CONS_NOTICE, M_GetText("Valid music slots are 1 to 1035.\n")); return; } + if (!tunenum && strlen(tunearg) > 6) // This is automatic -- just show the error just in case + CONS_Alert(CONS_NOTICE, M_GetText("Music name too long - truncated to six characters.\n")); - if (argc > 3) - track = (UINT16)atoi(COM_Argv(3))-1; + if (argc > 2) + track = (UINT16)atoi(COM_Argv(2))-1; if (tunenum) snprintf(mapmusname, 7, "%sM", G_BuildMapName(tunenum)); @@ -3809,9 +3818,9 @@ static void Command_Tunes_f(void) S_ChangeMusic(mapmusname, mapmusflags, true); - if (argc > 2) + if (argc > 3) { - float speed = (float)atof(COM_Argv(2)); + float speed = (float)atof(COM_Argv(3)); if (speed > 0.0f) S_SpeedMusic(speed); } From 8c23168061b76635ed87952b6d63f800995cbf7c Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Thu, 3 Mar 2016 22:12:31 -0800 Subject: [PATCH 08/15] Remove stray comment from merge --- src/dehacked.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dehacked.c b/src/dehacked.c index 298179e9f..a02c68010 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -1178,7 +1178,7 @@ static void readlevelheader(MYFILE *f, INT32 num) } #ifdef MUSICSLOT_COMPATIBILITY else if (fastcmp(word, "MUSICSLOT")) - { // Backwards compatibility? + { i = get_mus(word2, true); if (i && i <= 1035) snprintf(mapheaderinfo[num-1]->musname, 7, "%sM", G_BuildMapName(i)); From 1ee01063e318db04bdb47d6d6dedd7cb5db196bc Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Wed, 9 Mar 2016 02:54:09 -0800 Subject: [PATCH 09/15] All SRB1 objects, states, and sprites removed. --- src/dehacked.c | 80 ------- src/hardware/hw_light.c | 17 -- src/info.c | 498 +--------------------------------------- src/info.h | 97 -------- src/m_cond.c | 9 +- 5 files changed, 4 insertions(+), 697 deletions(-) diff --git a/src/dehacked.c b/src/dehacked.c index 6747f2c59..4413968f6 100644 --- a/src/dehacked.c +++ b/src/dehacked.c @@ -6056,70 +6056,6 @@ static const char *const STATE_LIST[] = { // array length left dynamic for sanit "S_ROCKCRUMBLEO", "S_ROCKCRUMBLEP", - "S_SRB1_CRAWLA1", - "S_SRB1_CRAWLA2", - "S_SRB1_CRAWLA3", - "S_SRB1_CRAWLA4", - - "S_SRB1_BAT1", - "S_SRB1_BAT2", - "S_SRB1_BAT3", - "S_SRB1_BAT4", - - "S_SRB1_ROBOFISH1", - "S_SRB1_ROBOFISH2", - "S_SRB1_ROBOFISH3", - - "S_SRB1_VOLCANOGUY1", - "S_SRB1_VOLCANOGUY2", - - "S_SRB1_HOPPY1", - "S_SRB1_HOPPY2", - - "S_SRB1_HOPPYWATER1", - "S_SRB1_HOPPYWATER2", - - "S_SRB1_HOPPYSKYLAB1", - - "S_SRB1_MMZFLYING1", - "S_SRB1_MMZFLYING2", - "S_SRB1_MMZFLYING3", - "S_SRB1_MMZFLYING4", - "S_SRB1_MMZFLYING5", - - "S_SRB1_UFO1", - "S_SRB1_UFO2", - - "S_SRB1_GRAYBOT1", - "S_SRB1_GRAYBOT2", - "S_SRB1_GRAYBOT3", - "S_SRB1_GRAYBOT4", - "S_SRB1_GRAYBOT5", - "S_SRB1_GRAYBOT6", - - "S_SRB1_ROBOTOPOLIS1", - "S_SRB1_ROBOTOPOLIS2", - - "S_SRB1_RBZBUZZ1", - "S_SRB1_RBZBUZZ2", - - "S_SRB1_RBZSPIKES1", - "S_SRB1_RBZSPIKES2", - - "S_SRB1_METALSONIC1", - "S_SRB1_METALSONIC2", - "S_SRB1_METALSONIC3", - - "S_SRB1_GOLDBOT1", - "S_SRB1_GOLDBOT2", - "S_SRB1_GOLDBOT3", - "S_SRB1_GOLDBOT4", - "S_SRB1_GOLDBOT5", - "S_SRB1_GOLDBOT6", - - "S_SRB1_GENREX1", - "S_SRB1_GENREX2", - #ifdef SEENAMES "S_NAMECHECK", #endif @@ -6613,22 +6549,6 @@ static const char *const MOBJTYPE_LIST[] = { // array length left dynamic for s "MT_ROCKCRUMBLE15", "MT_ROCKCRUMBLE16", - "MT_SRB1_CRAWLA", - "MT_SRB1_BAT", - "MT_SRB1_ROBOFISH", - "MT_SRB1_VOLCANOGUY", - "MT_SRB1_HOPPY", - "MT_SRB1_HOPPYWATER", - "MT_SRB1_HOPPYSKYLAB", - "MT_SRB1_MMZFLYING", - "MT_SRB1_UFO", - "MT_SRB1_GRAYBOT", - "MT_SRB1_ROBOTOPOLIS", - "MT_SRB1_RBZBUZZ", - "MT_SRB1_RBZSPIKES", - "MT_SRB1_METALSONIC", - "MT_SRB1_GOLDBOT", - "MT_SRB1_GENREX", #ifdef SEENAMES "MT_NAMECHECK", #endif diff --git a/src/hardware/hw_light.c b/src/hardware/hw_light.c index fb369387f..3db164b76 100644 --- a/src/hardware/hw_light.c +++ b/src/hardware/hw_light.c @@ -480,23 +480,6 @@ light_t *t_lspr[NUMSPRITES] = &lspr[NOLIGHT], // SPR_GWLG &lspr[NOLIGHT], // SPR_GWLR - // SRB1 Sprites - &lspr[NOLIGHT], // SPR_SRBA - &lspr[NOLIGHT], // SPR_SRBB - &lspr[NOLIGHT], // SPR_SRBC - &lspr[NOLIGHT], // SPR_SRBD - &lspr[NOLIGHT], // SPR_SRBE - &lspr[NOLIGHT], // SPR_SRBF - &lspr[NOLIGHT], // SPR_SRBG - &lspr[NOLIGHT], // SPR_SRBH - &lspr[NOLIGHT], // SPR_SRBI - &lspr[NOLIGHT], // SPR_SRBJ - &lspr[NOLIGHT], // SPR_SRBK - &lspr[NOLIGHT], // SPR_SRBL - &lspr[NOLIGHT], // SPR_SRBM - &lspr[NOLIGHT], // SPR_SRBN - &lspr[NOLIGHT], // SPR_SRBO - // Free slots &lspr[NOLIGHT], &lspr[NOLIGHT], diff --git a/src/info.c b/src/info.c index 04746848b..b78f2a14e 100644 --- a/src/info.c +++ b/src/info.c @@ -52,8 +52,7 @@ char sprnames[NUMSPRITES + 1][5] = "NSPK","NBMP","HOOP","NSCR","NPRU","CAPS","SUPT","SPRK","BOM1","BOM2", "BOM3","BOM4","ROIA","ROIB","ROIC","ROID","ROIE","ROIF","ROIG","ROIH", "ROII","ROIJ","ROIK","ROIL","ROIM","ROIN","ROIO","ROIP","BBAL","GWLG", - "GWLR","SRBA","SRBB","SRBC","SRBD","SRBE","SRBF","SRBG","SRBH","SRBI", - "SRBJ","SRBK","SRBL","SRBM","SRBN","SRBO", + "GWLR", }; char spr2names[NUMPLAYERSPRITES][5] = @@ -2462,69 +2461,6 @@ state_t states[NUMSTATES] = {SPR_ROIO, FF_ANIMATE, -1, {NULL}, 4, 2, S_ROCKCRUMBLEO}, // S_ROCKCRUMBLEO {SPR_ROIP, FF_ANIMATE, -1, {NULL}, 4, 2, S_ROCKCRUMBLEP}, // S_ROCKCRUMBLEP - {SPR_SRBA, 0, 5, {A_Look}, 0, 0, S_SRB1_CRAWLA1}, // S_SRB1_CRAWLA1 - {SPR_SRBA, 0, 3, {A_Chase}, 0, 0, S_SRB1_CRAWLA3}, // S_SRB1_CRAWLA2 - {SPR_SRBA, 1, 3, {A_Chase}, 0, 0, S_SRB1_CRAWLA4}, // S_SRB1_CRAWLA3 - {SPR_SRBA, 2, 3, {A_Chase}, 0, 0, S_SRB1_CRAWLA2}, // S_SRB1_CRAWLA4 - - {SPR_SRBB, 0, 2, {A_Look}, 0, 0, S_SRB1_BAT2}, // S_SRB1_BAT1 - {SPR_SRBB, 1, 2, {A_Look}, 0, 0, S_SRB1_BAT1}, // S_SRB1_BAT2 - {SPR_SRBB, 0, 2, {A_BuzzFly}, 0, 0, S_SRB1_BAT4}, // S_SRB1_BAT3 - {SPR_SRBB, 1, 2, {A_BuzzFly}, 0, 0, S_SRB1_BAT3}, // S_SRB1_BAT4 - - {SPR_SRBC, 0, 2, {A_Look}, 0, 0, S_SRB1_ROBOFISH1}, // S_SRB1_ROBOFISH1 - {SPR_SRBC, 1, 2, {A_BuzzFly}, 0, 0, S_SRB1_ROBOFISH3}, // S_SRB1_ROBOFISH2 - {SPR_SRBC, 0, 2, {A_BuzzFly}, 0, 0, S_SRB1_ROBOFISH2}, // S_SRB1_ROBOFISH3 - - {SPR_SRBD, 0, 2, {A_Look}, 0, 0, S_SRB1_VOLCANOGUY1}, // S_SRB1_VOLCANOGUY1 - {SPR_SRBD, 0, 2, {A_BuzzFly}, 0, 0, S_SRB1_VOLCANOGUY2}, // S_SRB1_VOLCANOGUY2 - - {SPR_SRBE, 0, 2, {A_BunnyHop}, 7, 2, S_SRB1_HOPPY2}, // S_SRB1_HOPPY1 - {SPR_SRBE, 1, 2, {A_BunnyHop}, 7, -2, S_SRB1_HOPPY1}, // S_SRB1_HOPPY2 - - {SPR_SRBE, 0, 2, {A_BunnyHop}, 4, 2, S_SRB1_HOPPYWATER2}, // S_SRB1_HOPPYWATER1 - {SPR_SRBE, 1, 2, {A_BunnyHop}, 4, -2, S_SRB1_HOPPYWATER1}, // S_SRB1_HOPPYWATER2 - - {SPR_SRBF, 0, 2, {A_BunnyHop}, 7, 0, S_SRB1_HOPPYSKYLAB1}, // S_SRB1_HOPPYSKYLAB1 - - {SPR_SRBG, 0, 16, {A_MoveAbsolute}, 0, 5, S_SRB1_MMZFLYING2}, // S_SRB1_MMZFLYING1 - {SPR_SRBG, 0, 16, {A_MoveAbsolute}, 180, 5, S_SRB1_MMZFLYING3}, // S_SRB1_MMZFLYING2 - {SPR_SRBG, 0, 1, {A_MoveAbsolute}, 0, 5, S_SRB1_MMZFLYING4}, // S_SRB1_MMZFLYING3 - {SPR_SRBG, 0, 7, {A_MoveAbsolute}, 0, 5, S_SRB1_MMZFLYING5}, // S_SRB1_MMZFLYING4 - {SPR_SRBG, 0, 8, {A_MoveAbsolute}, 180, 5, S_SRB1_MMZFLYING1}, // S_SRB1_MMZFLYING5 - - {SPR_SRBH, 0, 16, {A_MoveAbsolute}, 180, 5, S_SRB1_UFO2}, // S_SRB1_UFO1 - {SPR_SRBH, 0, 16, {A_MoveAbsolute}, 0, 5, S_SRB1_UFO1}, // S_SRB1_UFO2 - - {SPR_SRBI, 0, 4, {A_MoveAbsolute}, 0, 7, S_SRB1_GRAYBOT2}, // S_SRB1_GRAYBOT1 - {SPR_SRBI, 1, 4, {A_MoveAbsolute}, 0, 7, S_SRB1_GRAYBOT3}, // S_SRB1_GRAYBOT2 - {SPR_SRBI, 0, 4, {A_MoveAbsolute}, 0, 7, S_SRB1_GRAYBOT4}, // S_SRB1_GRAYBOT3 - {SPR_SRBI, 1, 4, {A_MoveAbsolute}, 180, 7, S_SRB1_GRAYBOT5}, // S_SRB1_GRAYBOT4 - {SPR_SRBI, 0, 4, {A_MoveAbsolute}, 180, 7, S_SRB1_GRAYBOT6}, // S_SRB1_GRAYBOT5 - {SPR_SRBI, 1, 4, {A_MoveAbsolute}, 180, 7, S_SRB1_GRAYBOT1}, // S_SRB1_GRAYBOT6 - - {SPR_SRBJ, 0, 8, {A_MoveAbsolute}, 0, 5, S_SRB1_ROBOTOPOLIS2}, // S_SRB1_ROBOTOPOLIS1 - {SPR_SRBJ, 1, 8, {A_MoveAbsolute}, 0, -5, S_SRB1_ROBOTOPOLIS1}, // S_SRB1_ROBOTOPOLIS2 - - {SPR_SRBK, 0, 8, {A_MoveAbsolute}, 0, 5, S_SRB1_RBZBUZZ2}, // S_SRB1_RBZBUZZ1 - {SPR_SRBK, 1, 8, {A_MoveAbsolute}, 0, -5, S_SRB1_RBZBUZZ1}, // S_SRB1_RBZBUZZ2 - - {SPR_SRBL, 0, 35, {A_ZThrust}, 4, (1<<16)+1, S_SRB1_RBZSPIKES2}, // S_SRB1_RBZSPIKES1 - {SPR_SRBL, 0, 35, {A_ZThrust}, -4, (1<<16)+1, S_SRB1_RBZSPIKES1}, // S_SRB1_RBZSPIKES2 - - {SPR_SRBM, 0, 4, {NULL}, 0, 0, S_SRB1_METALSONIC2}, // S_SRB1_METALSONIC1 - {SPR_SRBM, 1, 4, {NULL}, 0, 0, S_SRB1_METALSONIC3}, // S_SRB1_METALSONIC2 - {SPR_SRBM, 2, 4, {NULL}, 0, 0, S_SRB1_METALSONIC1}, // S_SRB1_METALSONIC3 - - {SPR_SRBN, 0, 2, {A_MoveAbsolute}, 0, 7, S_SRB1_GOLDBOT2}, // S_SRB1_GOLDBOT1 - {SPR_SRBN, 1, 2, {A_MoveAbsolute}, 0, 7, S_SRB1_GOLDBOT3}, // S_SRB1_GOLDBOT2 - {SPR_SRBN, 0, 2, {A_MoveAbsolute}, 0, 7, S_SRB1_GOLDBOT4}, // S_SRB1_GOLDBOT3 - {SPR_SRBN, 1, 2, {A_MoveAbsolute}, 180, 7, S_SRB1_GOLDBOT5}, // S_SRB1_GOLDBOT4 - {SPR_SRBN, 0, 2, {A_MoveAbsolute}, 180, 7, S_SRB1_GOLDBOT6}, // S_SRB1_GOLDBOT5 - {SPR_SRBN, 1, 2, {A_MoveAbsolute}, 180, 7, S_SRB1_GOLDBOT1}, // S_SRB1_GOLDBOT6 - - {SPR_SRBO, 0, 2, {A_Look}, 0, 0, S_SRB1_GENREX1}, // S_SRB1_GENREX1 - {SPR_SRBO, 0, 2, {A_BuzzFly}, 0, 0, S_SRB1_GENREX2}, // S_SRB1_GENREX2 #ifdef SEENAMES {SPR_NULL, 0, 1, {NULL}, 0, 0, S_NULL}, // S_NAMECHECK #endif @@ -13347,438 +13283,6 @@ mobjinfo_t mobjinfo[NUMMOBJTYPES] = S_NULL // raisestate }, - { // MT_SRB1_CRAWLA - 4000, // doomednum - S_SRB1_CRAWLA1, // spawnstate - 1, // spawnhealth - S_SRB1_CRAWLA2, // seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 20*FRACUNIT, // radius - 40*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_BAT - 4001, // doomednum - S_SRB1_BAT1, // spawnstate - 1, // spawnhealth - S_SRB1_BAT3, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 4*FRACUNIT, // speed - 17*FRACUNIT, // radius - 40*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_SLIDEME, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_ROBOFISH - 4002, // doomednum - S_SRB1_ROBOFISH1, // spawnstate - 1, // spawnhealth - S_SRB1_ROBOFISH2, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 4*FRACUNIT, // speed - 22*FRACUNIT, // radius - 32*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_SLIDEME, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_VOLCANOGUY - 4003, // doomednum - S_SRB1_VOLCANOGUY1, // spawnstate - 1, // spawnhealth - S_SRB1_VOLCANOGUY2, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 4*FRACUNIT, // speed - 20*FRACUNIT, // radius - 40*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_SLIDEME, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_HOPPY - 4004, // doomednum - S_SRB1_HOPPY1, // spawnstate - 1, // spawnhealth - S_SRB1_HOPPY1, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - FRACUNIT, // speed - 20*FRACUNIT, // radius - 32*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_HOPPYWATER - 4005, // doomednum - S_SRB1_HOPPYWATER1, // spawnstate - 1, // spawnhealth - S_SRB1_HOPPYWATER1, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - FRACUNIT, // speed - 20*FRACUNIT, // radius - 32*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_HOPPYSKYLAB - 4006, // doomednum - S_SRB1_HOPPYSKYLAB1, // spawnstate - 1, // spawnhealth - S_SRB1_HOPPYSKYLAB1, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - FRACUNIT, // speed - 10*FRACUNIT, // radius - 34*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_MMZFLYING - 4007, // doomednum - S_SRB1_MMZFLYING1, // spawnstate - 1, // spawnhealth - S_SRB1_MMZFLYING1, // seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - FRACUNIT, // speed - 24*FRACUNIT, // radius - 32*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_UFO - 4008, // doomednum - S_SRB1_UFO1, // spawnstate - 1, // spawnhealth - S_SRB1_UFO1, // seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 24*FRACUNIT, // radius - 32*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT|MF_SPAWNCEILING, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_GRAYBOT - 4009, // doomednum - S_SRB1_GRAYBOT1,// spawnstate - 1, // spawnhealth - S_SRB1_GRAYBOT1,// seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 21*FRACUNIT, // radius - 69*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_ROBOTOPOLIS - 4010, // doomednum - S_SRB1_ROBOTOPOLIS1, // spawnstate - 1, // spawnhealth - S_SRB1_ROBOTOPOLIS1, // seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 36*FRACUNIT, // radius - 62*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_RBZBUZZ - 4011, // doomednum - S_SRB1_RBZBUZZ1,// spawnstate - 1, // spawnhealth - S_SRB1_RBZBUZZ1,// seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 44*FRACUNIT, // radius - 45*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_RBZSPIKES - 4012, // doomednum - S_SRB1_RBZSPIKES1, // spawnstate - 1, // spawnhealth - S_SRB1_RBZSPIKES1, // seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 10*FRACUNIT, // radius - 53*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SOLID|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_METALSONIC - 4013, // doomednum - S_SRB1_METALSONIC1, // spawnstate - 1000, // spawnhealth - S_NULL, // seestate - sfx_None, // seesound - 8, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 0, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_NULL, // deathstate - S_NULL, // xdeathstate - sfx_None, // deathsound - 21*FRACUNIT, // speed - 16*FRACUNIT, // radius - 40*FRACUNIT, // height - 0, // display offset - 100, // mass - 1, // damage - sfx_None, // activesound - MF_SLIDEME|MF_SOLID|MF_PUSHABLE, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_GOLDBOT - 4014, // doomednum - S_SRB1_GOLDBOT1,// spawnstate - 1, // spawnhealth - S_SRB1_GOLDBOT1,// seestate - sfx_None, // seesound - 32, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 200, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 3, // speed - 21*FRACUNIT, // radius - 69*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_FLOAT, // flags - S_NULL // raisestate - }, - - { // MT_SRB1_GENREX - 4015, // doomednum - S_SRB1_GENREX1, // spawnstate - 1, // spawnhealth - S_SRB1_GENREX2, // seestate - sfx_None, // seesound - 2, // reactiontime - sfx_None, // attacksound - S_NULL, // painstate - 3072, // painchance - sfx_None, // painsound - S_NULL, // meleestate - S_NULL, // missilestate - S_XPLD1, // deathstate - S_NULL, // xdeathstate - sfx_pop, // deathsound - 4*FRACUNIT, // speed - 17*FRACUNIT, // radius - 40*FRACUNIT, // height - 0, // display offset - 100, // mass - 0, // damage - sfx_None, // activesound - MF_SPECIAL|MF_SHOOTABLE|MF_ENEMY|MF_NOGRAVITY|MF_SLIDEME, // flags - S_NULL // raisestate - }, - #ifdef SEENAMES { // MT_NAMECHECK -1, // doomednum diff --git a/src/info.h b/src/info.h index 13580a81c..dafa7282d 100644 --- a/src/info.h +++ b/src/info.h @@ -553,23 +553,6 @@ typedef enum sprite SPR_GWLG, SPR_GWLR, - // SRB1 Sprites - SPR_SRBA, - SPR_SRBB, - SPR_SRBC, - SPR_SRBD, - SPR_SRBE, - SPR_SRBF, - SPR_SRBG, - SPR_SRBH, - SPR_SRBI, - SPR_SRBJ, - SPR_SRBK, - SPR_SRBL, - SPR_SRBM, - SPR_SRBN, - SPR_SRBO, - SPR_FIRSTFREESLOT, SPR_LASTFREESLOT = SPR_FIRSTFREESLOT + NUMSPRITEFREESLOTS - 1, NUMSPRITES @@ -2907,70 +2890,6 @@ typedef enum state S_ROCKCRUMBLEO, S_ROCKCRUMBLEP, - S_SRB1_CRAWLA1, - S_SRB1_CRAWLA2, - S_SRB1_CRAWLA3, - S_SRB1_CRAWLA4, - - S_SRB1_BAT1, - S_SRB1_BAT2, - S_SRB1_BAT3, - S_SRB1_BAT4, - - S_SRB1_ROBOFISH1, - S_SRB1_ROBOFISH2, - S_SRB1_ROBOFISH3, - - S_SRB1_VOLCANOGUY1, - S_SRB1_VOLCANOGUY2, - - S_SRB1_HOPPY1, - S_SRB1_HOPPY2, - - S_SRB1_HOPPYWATER1, - S_SRB1_HOPPYWATER2, - - S_SRB1_HOPPYSKYLAB1, - - S_SRB1_MMZFLYING1, - S_SRB1_MMZFLYING2, - S_SRB1_MMZFLYING3, - S_SRB1_MMZFLYING4, - S_SRB1_MMZFLYING5, - - S_SRB1_UFO1, - S_SRB1_UFO2, - - S_SRB1_GRAYBOT1, - S_SRB1_GRAYBOT2, - S_SRB1_GRAYBOT3, - S_SRB1_GRAYBOT4, - S_SRB1_GRAYBOT5, - S_SRB1_GRAYBOT6, - - S_SRB1_ROBOTOPOLIS1, - S_SRB1_ROBOTOPOLIS2, - - S_SRB1_RBZBUZZ1, - S_SRB1_RBZBUZZ2, - - S_SRB1_RBZSPIKES1, - S_SRB1_RBZSPIKES2, - - S_SRB1_METALSONIC1, - S_SRB1_METALSONIC2, - S_SRB1_METALSONIC3, - - S_SRB1_GOLDBOT1, - S_SRB1_GOLDBOT2, - S_SRB1_GOLDBOT3, - S_SRB1_GOLDBOT4, - S_SRB1_GOLDBOT5, - S_SRB1_GOLDBOT6, - - S_SRB1_GENREX1, - S_SRB1_GENREX2, - #ifdef SEENAMES S_NAMECHECK, #endif @@ -3482,22 +3401,6 @@ typedef enum mobj_type MT_ROCKCRUMBLE15, MT_ROCKCRUMBLE16, - MT_SRB1_CRAWLA, - MT_SRB1_BAT, - MT_SRB1_ROBOFISH, - MT_SRB1_VOLCANOGUY, - MT_SRB1_HOPPY, - MT_SRB1_HOPPYWATER, - MT_SRB1_HOPPYSKYLAB, - MT_SRB1_MMZFLYING, - MT_SRB1_UFO, - MT_SRB1_GRAYBOT, - MT_SRB1_ROBOTOPOLIS, - MT_SRB1_RBZBUZZ, - MT_SRB1_RBZSPIKES, - MT_SRB1_METALSONIC, - MT_SRB1_GOLDBOT, - MT_SRB1_GENREX, #ifdef SEENAMES MT_NAMECHECK, #endif diff --git a/src/m_cond.c b/src/m_cond.c index 7ef192f7b..63df35cf2 100644 --- a/src/m_cond.c +++ b/src/m_cond.c @@ -565,7 +565,7 @@ extraemblem_t extraemblems[MAXEXTRAEMBLEMS] = {"Game Complete", "Complete 1P Mode", 10, 'X', SKINCOLOR_BLUE, 0}, {"All Emeralds", "Complete 1P Mode with all Emeralds", 11, 'V', SKINCOLOR_GREY, 0}, {"Perfect Bonus", "Perfect Bonus on a non-secret stage", 30, 'P', SKINCOLOR_GOLD, 0}, - {"SRB1 Remake", "Complete SRB1 Remake", 21, 'O', SKINCOLOR_RUST, 0}, + {"PLACEHOLDER", "PLACEHOLDER", 0, 'O', SKINCOLOR_RUST, 0}, {"NiGHTS Mastery", "Show your mastery of NiGHTS!", 22, 'W', SKINCOLOR_TEAL, 0}, }; @@ -586,9 +586,9 @@ unlockable_t unlockables[MAXUNLOCKABLES] = /* 08 */ {"BONUS LEVELS", "", 100, 0, SECRET_HEADER, 0, true, true, 0}, - /* 09 */ {"SRB1 Remake", "Collect 20 Emblems", 130, 40, SECRET_WARP, 101, false, false, 0}, + /* 09 */ {"PLACEHOLDER", "PLACEHOLDER", 0, 0, SECRET_NONE, 0, true, true, 0}, /* 10 */ {"Mario Koopa Blast", "Collect 60 Emblems", 110, 42, SECRET_WARP, 30, false, false, 0}, - /* 11 */ {"SRB1 Level Select", "Complete SRB1 Remake", 140, 21, SECRET_LEVELSELECT, 2, false, true, 0}, + /* 11 */ {"PLACEHOLDER", "PLACEHOLDER", 0, 0, SECRET_NONE, 0, true, true, 0}, /* 12 */ {"Spring Hill Zone", "Collect 100 Emblems", 0, 44, SECRET_NONE, 0, false, false, 0}, /* 13 */ {"Black Hole", "A Rank in all Special Stages", 0, 50, SECRET_NONE, 0, false, true, 0}, @@ -624,9 +624,6 @@ void M_SetupDefaultConditionSets(void) // -- 20: Beat AGZ M_AddRawCondition(20, 1, UC_MAPBEATEN, 40, 0, 0); - // -- 21: Beat SRB1 Remake - M_AddRawCondition(21, 1, UC_MAPBEATEN, 132, 0, 0); - // -- 22: Beat Black Hole M_AddRawCondition(22, 1, UC_MAPBEATEN, 57, 0, 0); From df9ad4a0e67b18968e1592ce08e1bf8daa81b66e Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 16 Aug 2016 17:15:39 +0100 Subject: [PATCH 10/15] wall-scroll-by-linedef specials now use just linedef dx/dy to determine scrolling direction, rather than the complex system that was in place before If there's any reason to bring the old system back we could make it togglable by one of the linedef flags I suppose. Not that many people would actually use it though, most likely --- src/p_spec.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index a3d6cecfa..4573a9cd4 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6719,6 +6719,7 @@ static void Add_Scroller(INT32 type, fixed_t dx, fixed_t dy, INT32 control, INT3 P_AddThinker(&s->thinker); } +#if 0 /** Adds a wall scroller. * Scroll amount is rotated with respect to wall's linedef first, so that * scrolling towards the wall in a perpendicular direction is translated into @@ -6743,6 +6744,7 @@ static void Add_WallScroller(fixed_t dx, fixed_t dy, const line_t *l, INT32 cont y = -FixedDiv(FixedMul(dx, l->dy) - FixedMul(dy, l->dx), d); Add_Scroller(sc_side, x, y, control, *l->sidenum, accel, 0); } +#endif /** Initializes the scrollers. * @@ -6826,7 +6828,7 @@ static void P_SpawnScrollers(void) case 502: for (s = -1; (s = P_FindLineFromLineTag(l, s)) >= 0 ;) if (s != (INT32)i) - Add_WallScroller(dx, dy, lines+s, control, accel); + Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0); //Add_WallScroller(dx, dy, lines+s, control, accel); break; case 505: From 9f87841936a957c4c7552089654cfdd2bd22cc15 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Thu, 8 Sep 2016 22:55:11 +0100 Subject: [PATCH 11/15] Fix bottom of FOF with a pusher special not accounting for slopes --- src/p_spec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/p_spec.c b/src/p_spec.c index 30b08ebb1..92f62af4d 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -7428,7 +7428,7 @@ void T_Pusher(pusher_t *p) } else { - if (top < thing->z || referrer->floorheight > (thing->z + (thing->height >> 1))) + if (top < thing->z || bottom > (thing->z + (thing->height >> 1))) continue; if (thing->z + thing->height > top) touching = true; From 394ed30f4436dd3d9a2a8bd118a60175f350527b Mon Sep 17 00:00:00 2001 From: toasterbabe Date: Thu, 22 Sep 2016 21:08:36 +0100 Subject: [PATCH 12/15] Fixed the problem with the reverseplatform_clipping branch that caused springs to fall through platforms, as tested by Wolfs in TD. --- src/p_mobj.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/p_mobj.c b/src/p_mobj.c index 5e5961d41..82326f04c 100644 --- a/src/p_mobj.c +++ b/src/p_mobj.c @@ -2017,13 +2017,13 @@ static void P_AdjustMobjFloorZ_FFloors(mobj_t *mo, sector_t *sector, UINT8 motyp delta2 = thingtop - (bottomheight + ((topheight - bottomheight)/2)); if (topheight > mo->floorz && abs(delta1) < abs(delta2) && !(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) + && ((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) { mo->floorz = topheight; } if (bottomheight < mo->ceilingz && abs(delta1) >= abs(delta2) && !(rover->flags & FF_PLATFORM) - && ((P_MobjFlip(mo)*mo->momz > 0) || (!(rover->flags & FF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below + && ((P_MobjFlip(mo)*mo->momz >= 0) || (!(rover->flags & FF_REVERSEPLATFORM)))) // In normal gravity, only clip for FOFs that are intangible from the top if you're coming from below { mo->ceilingz = bottomheight; } From c558900c6153e7cfc422e176f3c36e1220762d41 Mon Sep 17 00:00:00 2001 From: Nevur Date: Fri, 7 Oct 2016 18:56:10 +0200 Subject: [PATCH 13/15] Deleted the Add_WallScroller function entirely from code. Removed commented out instance using the function. --- src/p_spec.c | 29 +---------------------------- 1 file changed, 1 insertion(+), 28 deletions(-) diff --git a/src/p_spec.c b/src/p_spec.c index 4573a9cd4..178980333 100644 --- a/src/p_spec.c +++ b/src/p_spec.c @@ -6719,33 +6719,6 @@ static void Add_Scroller(INT32 type, fixed_t dx, fixed_t dy, INT32 control, INT3 P_AddThinker(&s->thinker); } -#if 0 -/** Adds a wall scroller. - * Scroll amount is rotated with respect to wall's linedef first, so that - * scrolling towards the wall in a perpendicular direction is translated into - * vertical motion, while scrolling along the wall in a parallel direction is - * translated into horizontal motion. - * - * \param dx x speed of scrolling or its acceleration. - * \param dy y speed of scrolling or its acceleration. - * \param l Line whose front side will scroll. - * \param control Sector whose heights control this scroller's effect - * remotely, or -1 if there is no control sector. - * \param accel Nonzero for an accelerative effect. - * \sa Add_Scroller, P_SpawnScrollers - */ -static void Add_WallScroller(fixed_t dx, fixed_t dy, const line_t *l, INT32 control, INT32 accel) -{ - fixed_t x = abs(l->dx), y = abs(l->dy), d; - if (y > x) - d = x, x = y, y = d; - d = FixedDiv(x, FINESINE((tantoangle[FixedDiv(y, x) >> DBITS] + ANGLE_90) >> ANGLETOFINESHIFT)); - x = -FixedDiv(FixedMul(dy, l->dy) + FixedMul(dx, l->dx), d); - y = -FixedDiv(FixedMul(dx, l->dy) - FixedMul(dy, l->dx), d); - Add_Scroller(sc_side, x, y, control, *l->sidenum, accel, 0); -} -#endif - /** Initializes the scrollers. * * \todo Get rid of all the magic numbers. @@ -6828,7 +6801,7 @@ static void P_SpawnScrollers(void) case 502: for (s = -1; (s = P_FindLineFromLineTag(l, s)) >= 0 ;) if (s != (INT32)i) - Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0); //Add_WallScroller(dx, dy, lines+s, control, accel); + Add_Scroller(sc_side, dx, dy, control, lines[s].sidenum[0], accel, 0); break; case 505: From e1baf02b7a3f2dd27ccf8bcf6089c5d765dfe756 Mon Sep 17 00:00:00 2001 From: Monster Iestyn Date: Tue, 18 Oct 2016 22:07:20 +0100 Subject: [PATCH 14/15] Lua now errors if negative scales are used with v.drawScaled --- src/lua_hudlib.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lua_hudlib.c b/src/lua_hudlib.c index 7aadd9c0e..60cbbe501 100644 --- a/src/lua_hudlib.c +++ b/src/lua_hudlib.c @@ -369,6 +369,8 @@ static int libd_drawScaled(lua_State *L) x = luaL_checkinteger(L, 1); y = luaL_checkinteger(L, 2); scale = luaL_checkinteger(L, 3); + if (scale < 0) + return luaL_error(L, "negative scale"); patch = *((patch_t **)luaL_checkudata(L, 4, META_PATCH)); flags = luaL_optinteger(L, 5, 0); if (!lua_isnoneornil(L, 6)) From 9d5e0b314b83c1ae1698ce3266b003e09c6ea2d4 Mon Sep 17 00:00:00 2001 From: Inuyasha Date: Sun, 23 Oct 2016 03:44:51 -0700 Subject: [PATCH 15/15] Autoload music_new.dta if it exists Same no non-music lump requirement as music.dta, and is ignored with no error if music_new.dta doesn't exist (should hopefully make playing around with music easier) --- src/d_main.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/d_main.c b/src/d_main.c index c5f0d0b39..0dfaceab8 100644 --- a/src/d_main.c +++ b/src/d_main.c @@ -859,6 +859,18 @@ static void IdentifyVersion(void) I_Error("File %s has been modified with non-music lumps",musicfile); } #endif + +#if 1 // This section can be deleted when music_new is merged with music.dta + { + const char *musicfile = "music_new.dta"; + const char *musicpath = va(pandf,srb2waddir,musicfile); + int ms = W_VerifyNMUSlumps(musicpath); // Don't forget the music! + if (ms == 1) + D_AddFile(musicpath); + else if (ms == 0) + I_Error("File %s has been modified with non-music lumps",musicfile); + } +#endif } /* ======================================================================== */