Commit 1692b67 1 parent c6fe6de commit 1692b67 Copy full SHA for 1692b67
File tree 1 file changed +12
-2
lines changed
1 file changed +12
-2
lines changed Original file line number Diff line number Diff line change @@ -388,10 +388,19 @@ void ff7_handle_ambient_playback()
388
388
{
389
389
struct game_mode *mode = getmode_cached ();
390
390
static char filename[64 ]{0 };
391
- static WORD last_field_id = 0 ;
391
+ static WORD last_field_id = 0 , last_battle_id = 0 ;
392
392
393
393
switch (mode->driver_mode )
394
394
{
395
+ case MODE_BATTLE:
396
+ if (last_battle_id != ff7_externals.modules_global_object ->battle_id )
397
+ {
398
+ last_battle_id = ff7_externals.modules_global_object ->battle_id ;
399
+
400
+ sprintf (filename, " bat_%d" , last_battle_id);
401
+ nxAudioEngine.playAmbient (filename);
402
+ }
403
+ break ;
395
404
case MODE_FIELD:
396
405
if (last_field_id != *ff7_externals.field_id )
397
406
{
@@ -402,10 +411,11 @@ void ff7_handle_ambient_playback()
402
411
}
403
412
break ;
404
413
default :
405
- if (last_field_id != 0 )
414
+ if (last_field_id != 0 || last_battle_id != 0 )
406
415
{
407
416
nxAudioEngine.stopAmbient ();
408
417
last_field_id = 0 ;
418
+ last_battle_id = 0 ;
409
419
}
410
420
break ;
411
421
}
You can’t perform that action at this time.
0 commit comments