mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2025-03-11 03:42:43 +00:00
Add MUSICPOSTBOSSFADEIN
This commit is contained in:
parent
b0be27a54e
commit
dabd7f99e6
5 changed files with 9 additions and 2 deletions
|
@ -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);
|
||||
|
|
|
@ -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.)
|
||||
|
|
|
@ -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"))
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue