- 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
- 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
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);
}
#endif
@ -1691,7 +1691,7 @@ static const char *BaseFileSearch (const char *file, const char *ext, bool lookf
#ifdef unix
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;
}
#endif

View file

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

View file

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

View file

@ -1507,8 +1507,11 @@ bool S_ChangeMusic (const char *musicname, int order, bool looping, bool force)
{
if ((lumpnum = Wads.CheckNumForName (musicname)) == -1)
{
Printf ("Music \"%s\" not found\n", musicname);
return false;
if ((lumpnum = Wads.CheckNumForFullName (musicname)) == -1)
{
Printf ("Music \"%s\" not found\n", musicname);
return false;
}
}
if (!Wads.IsUncompressedFile(lumpnum))
{

View file

@ -1917,13 +1917,13 @@ void WI_Ticker(void)
if (bcnt == 1)
{
// intermission music - use the defaults if none specified
if (level.info->intermusic[0])
S_ChangeMusic(level.info->intermusic);
if (level.info->intermusic != NULL)
S_ChangeMusic(level.info->intermusic, level.info->intermusicorder);
else if (gameinfo.gametype == GAME_Heretic)
S_ChangeMusic ("mus_intr");
else if (gameinfo.gametype == GAME_Hexen)
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");
else if (gamemode == commercial)
S_ChangeMusic ("d_dm2int");