Add MUSICPOSTBOSSFADEIN

This commit is contained in:
mazmazz 2018-09-01 13:10:50 -04:00
parent b0be27a54e
commit dabd7f99e6
5 changed files with 9 additions and 2 deletions

View file

@ -1160,6 +1160,8 @@ static void readlevelheader(MYFILE *f, INT32 num)
mapheaderinfo[num-1]->muspostbosstrack = ((UINT16)i - 1);
else if (fastcmp(word, "MUSICPOSTBOSSPOS"))
mapheaderinfo[num-1]->muspostbosspos = (UINT32)get_number(word2);
else if (fastcmp(word, "MUSICPOSTBOSSFADEIN"))
mapheaderinfo[num-1]->muspostbossfadein = (UINT32)get_number(word2);
else if (fastcmp(word, "FORCECHARACTER"))
{
strlcpy(mapheaderinfo[num-1]->forcecharacter, word2, SKINNAMESIZE+1);

View file

@ -262,7 +262,8 @@ typedef struct
// Music stuff.
char muspostbossname[7]; ///< Post-bossdeath music.
UINT16 muspostbosstrack; ///< Post-bossdeath track.
UINT32 muspostbosspos; ///< Post-bossdeath position
UINT32 muspostbosspos; ///< Post-bossdeath position
UINT32 muspostbossfadein; ///< Post-bossdeath fade-in milliseconds.
// Lua stuff.
// (This is not ifdeffed so the map header structure can stay identical, just in case.)

View file

@ -1768,6 +1768,8 @@ static int mapheaderinfo_get(lua_State *L)
lua_pushinteger(L, header->muspostbosstrack);
else if (fastcmp(field,"muspostbosspos"))
lua_pushinteger(L, header->muspostbosspos);
else if (fastcmp(field,"muspostbossfadein"))
lua_pushinteger(L, header->muspostbossfadein);
else if (fastcmp(field,"forcecharacter"))
lua_pushstring(L, header->forcecharacter);
else if (fastcmp(field,"weather"))

View file

@ -3544,7 +3544,8 @@ void A_BossDeath(mobj_t *mo)
// don't change if we're in another tune
// but in case we're in jingle, use our parked mapmus variables so the correct track restores
if (!changed)
S_ChangeMusicAdvanced(mapmusname, mapmusflags, true, mapmusposition, (1*MUSICRATE)+(MUSICRATE/2), 0);
S_ChangeMusicAdvanced(mapmusname, mapmusflags, true, mapmusposition, (1*MUSICRATE)+(MUSICRATE/2),
mapheaderinfo[gamemap-1]->muspostbossfadein);
}
}

View file

@ -212,6 +212,7 @@ static void P_ClearSingleMapHeaderInfo(INT16 i)
mapheaderinfo[num]->muspostbossname[6] = 0;
mapheaderinfo[num]->muspostbosstrack = 0;
mapheaderinfo[num]->muspostbosspos = 0;
mapheaderinfo[num]->muspostbossfadein = 0;
mapheaderinfo[num]->forcecharacter[0] = '\0';
mapheaderinfo[num]->weather = 0;
mapheaderinfo[num]->skynum = 1;