- Bugfix: Externalized Music (Music.lua) (by Jazz)

o Added missing:
6 - creature start battle  (CREATURE_BATTLE_xxx.wav or CREATURE_BATTLE_xxx.ogg)
7 - creepy music  (CREEPY_xxx.wav or CREEPY_xxx.ogg)

git-svn-id: https://ja2svn.mooo.com/source/ja2/trunk/GameSource/ja2_v1.13/Build@6296 3b4a5df2-a311-0410-b5c6-a8a6f20db521
This commit is contained in:
Wanne
2013-08-20 08:33:32 +00:00
parent ab02106512
commit 643612540d
12 changed files with 133 additions and 3 deletions
+40
View File
@@ -5283,6 +5283,16 @@ static int l_SetMusicID (lua_State *L)
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SetMusicModeID( MUSIC_TACTICAL_DEATH, MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalDeath[z] );
}
else if ( MusicType == 6 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SetMusicModeID( MUSIC_TACTICAL_BATTLE, MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalBattleCreature[z] );
}
else if ( MusicType == 7 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SetMusicModeID( MUSIC_TACTICAL_BATTLE, MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalBattleCreepy[z] );
}
}
return 0;
@@ -5320,6 +5330,21 @@ INT32 SoundID = -1;
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SoundID = MusicSoundValues[SECTOR( x, y )].SoundTacticalVictory[z];
}
else if ( MusicType == 5 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SoundID = MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalDeath[z];
}
else if ( MusicType == 6 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SoundID = MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalBattleCreature[z];
}
else if ( MusicType == 7 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
SoundID = MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalBattleCreepy[z];
}
}
lua_pushinteger(L, SoundID);
@@ -5364,6 +5389,21 @@ static int l_gAddMusic(lua_State *L)
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
MusicSoundValues[SECTOR( x, y )].SoundTacticalVictory[z] = SoundId;
}
else if ( MusicType == 5 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalDeath[z] = SoundId;
}
else if ( MusicType == 6 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalBattleCreature[z] = SoundId;
}
else if ( MusicType == 7 )
{
if ((x>=1 || x<=16) && (y>=1 || y<=16) && (z>=0 || z<=3) )
MusicSoundValues[ SECTOR( x, y ) ].SoundTacticalBattleCreepy[z] = SoundId;
}
}
return 0;