- Changed music name handling in MAPINFO so that music can be specified by

full path of a file in a Zip.
- Fixed: intermusic in MAPINFO was limited to WAD lumps and couldn't handle 
  external data.

ACS:

- Fixed: Global and World array symbols didn't initialize their array information.


SVN r182 (trunk)
This commit is contained in:
Christoph Oelckers 2006-06-09 08:19:46 +00:00
parent c808041337
commit 9655ee9843
6 changed files with 19 additions and 9 deletions

View file

@ -1,3 +1,9 @@
June 8, 2006 (Changes by Graf Zahl)
- Changed music name handling in MAPINFO so that music can be specified by
full path of a file in a Zip.
- Fixed: intermusic in MAPINFO was limited to WAD lumps and couldn't handle
external data.
June 8, 2006 June 8, 2006
- Fixed: Trying to play a 0-length song from a wad inside a zip caused a crash. - Fixed: Trying to play a 0-length song from a wad inside a zip caused a crash.

View file

@ -1545,7 +1545,7 @@ static EIWADType IdentifyVersion (const char *zdoom_wad)
#ifdef unix #ifdef unix
else if (*value == '~' && (*(value + 1) == 0 || *(value + 1) == '/')) else if (*value == '~' && (*(value + 1) == 0 || *(value + 1) == '/'))
{ {
FString homepath = GetUserFile (*(value + 1) ? value + 2 : value + 1); FString homepath = GetUserFile (*(value + 1) ? value + 2 : value + 1, true);
CheckIWAD (homepath, wads); CheckIWAD (homepath, wads);
} }
#endif #endif
@ -1691,7 +1691,7 @@ static const char *BaseFileSearch (const char *file, const char *ext, bool lookf
#ifdef unix #ifdef unix
else if (*value == '~' && (*(value + 1) == 0 || *(value + 1) == '/')) else if (*value == '~' && (*(value + 1) == 0 || *(value + 1) == '/'))
{ {
homepath = GetUserFile (*(value + 1) ? value + 2 : value + 1); homepath = GetUserFile (*(value + 1) ? value + 2 : value + 1, true);
dir = homepath; dir = homepath;
} }
#endif #endif

View file

@ -363,7 +363,7 @@ MapHandlers[] =
{ MITYPE_LUMPNAME, lioffset(exitpic), 0 }, { MITYPE_LUMPNAME, lioffset(exitpic), 0 },
{ MITYPE_LUMPNAME, lioffset(exitpic), 0 }, { MITYPE_LUMPNAME, lioffset(exitpic), 0 },
{ MITYPE_LUMPNAME, lioffset(enterpic), 0 }, { MITYPE_LUMPNAME, lioffset(enterpic), 0 },
{ MITYPE_LUMPNAME, lioffset(intermusic), 0 }, { MITYPE_MUSIC, lioffset(intermusic), lioffset(intermusicorder) },
{ MITYPE_INT, lioffset(airsupply), 0 }, { MITYPE_INT, lioffset(airsupply), 0 },
{ MITYPE_SPECIALACTION, lioffset(specialactions), 0 }, { MITYPE_SPECIALACTION, lioffset(specialactions), 0 },
{ MITYPE_SETFLAG, LEVEL_KEEPFULLINVENTORY, 0 }, { MITYPE_SETFLAG, LEVEL_KEEPFULLINVENTORY, 0 },

View file

@ -160,7 +160,8 @@ struct level_info_s
char enterpic[9]; char enterpic[9];
char exitpic[9]; char exitpic[9];
char intermusic[9]; char *intermusic;
int intermusicorder;
char soundinfo[9]; char soundinfo[9];
char sndseq[9]; char sndseq[9];

View file

@ -1506,10 +1506,13 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
if (!FileExists (musicname)) if (!FileExists (musicname))
{ {
if ((lumpnum = Wads.CheckNumForName (musicname)) == -1) if ((lumpnum = Wads.CheckNumForName (musicname)) == -1)
{
if ((lumpnum = Wads.CheckNumForFullName (musicname)) == -1)
{ {
Printf ("Music \"%s\" not found\n", musicname); Printf ("Music \"%s\" not found\n", musicname);
return false; return false;
} }
}
if (!Wads.IsUncompressedFile(lumpnum)) if (!Wads.IsUncompressedFile(lumpnum))
{ {
// We must cache the music data and use it from memory. // We must cache the music data and use it from memory.

View file

@ -1917,13 +1917,13 @@ void WI_Ticker(void)
if (bcnt == 1) if (bcnt == 1)
{ {
// intermission music - use the defaults if none specified // intermission music - use the defaults if none specified
if (level.info->intermusic[0]) if (level.info->intermusic != NULL)
S_ChangeMusic(level.info->intermusic); S_ChangeMusic(level.info->intermusic, level.info->intermusicorder);
else if (gameinfo.gametype == GAME_Heretic) else if (gameinfo.gametype == GAME_Heretic)
S_ChangeMusic ("mus_intr"); S_ChangeMusic ("mus_intr");
else if (gameinfo.gametype == GAME_Hexen) else if (gameinfo.gametype == GAME_Hexen)
S_ChangeMusic ("hub"); S_ChangeMusic ("hub");
else if (gameinfo.gametype == GAME_Strife) // Strife also needs a default! else if (gameinfo.gametype == GAME_Strife) // Strife also needs a default
S_ChangeMusic ("d_slide"); S_ChangeMusic ("d_slide");
else if (gamemode == commercial) else if (gamemode == commercial)
S_ChangeMusic ("d_dm2int"); S_ChangeMusic ("d_dm2int");