Beispiel #1
0
	private void ff9ShutdownStateFieldMap()
	{
		FF9StateFieldMap map = FF9StateSystem.Field.FF9Field.loc.map;
		FF9Snd.ff9fieldsound_stopall_mapsndeffect((Int32)this.FF9.fldMapNo);
		EBin eBin = this.ee.eBin;
		Int32 varManually = eBin.getVarManually(6357);
		switch (map.nextMode)
		{
		case 1:
			this.FF9.fldMapNo = map.nextMapNo;
			break;
		case 2:
			this.FF9.btlMapNo = map.nextMapNo;
			FF9StateSystem.Battle.battleMapIndex = (Int32)this.FF9.btlMapNo;
			this.FF9Sys.mode = 2;
			this.FF9Sys.prevMode = 1;
			break;
		case 3:
			this.FF9.wldMapNo = map.nextMapNo;
			this.FF9.wldLocNo = (Int16)EventEngineUtils.eventIDToMESID[(Int32)this.FF9.wldMapNo];
			this.FF9Sys.mode = 3;
			this.FF9Sys.prevMode = 1;
			break;
		case 4:
		{
			AllSoundDispatchPlayer allSoundDispatchPlayer = SoundLib.GetAllSoundDispatchPlayer();
			allSoundDispatchPlayer.FF9SOUND_SNDEFFECT_STOP_ALL(null);
			allSoundDispatchPlayer.FF9SOUND_SNDEFFECTRES_STOPCURRENT();
			allSoundDispatchPlayer.FF9SOUND_STREAM_STOP();
			break;
		}
		case 7:
		{
			AllSoundDispatchPlayer allSoundDispatchPlayer2 = SoundLib.GetAllSoundDispatchPlayer();
			allSoundDispatchPlayer2.FF9SOUND_SNDEFFECT_STOP_ALL(null);
			allSoundDispatchPlayer2.FF9SOUND_SNDEFFECTRES_STOPCURRENT();
			allSoundDispatchPlayer2.FF9SOUND_STREAM_STOP();
			this.FF9Sys.mode = 7;
			this.FF9Sys.prevMode = 1;
			break;
		}
		case 9:
		{
			Int32 currentMusicId = FF9Snd.GetCurrentMusicId();
			if (currentMusicId != -1)
			{
				FF9Snd.ff9fldsnd_song_suspend(currentMusicId);
			}
			FF9Snd.ff9fieldSoundSuspendAllResidentSndEffect();
			AllSoundDispatchPlayer allSoundDispatchPlayer3 = SoundLib.GetAllSoundDispatchPlayer();
			allSoundDispatchPlayer3.FF9SOUND_STREAM_STOP();
			break;
		}
		}
	}
Beispiel #2
0
    private void RequestPlayBattleEncounterSongForField()
    {
        AllSoundDispatchPlayer soundDispatchPlayer = SoundLib.GetAllSoundDispatchPlayer();

        FF9Snd.ff9fieldSoundSuspendAllResidentSndEffect();
        AllSoundDispatchPlayer.PlayingSfx[] residentSndEffectSlot1 = soundDispatchPlayer.GetResidentSndEffectSlot();
        Int32 num1 = residentSndEffectSlot1[0]?.SndEffectVol ?? 0;
        Int32 num2 = residentSndEffectSlot1[1]?.SndEffectVol ?? 0;

        soundDispatchPlayer.FF9SOUND_SNDEFFECTRES_VOL_INTPLALL(15, 0);
        AllSoundDispatchPlayer.PlayingSfx[] residentSndEffectSlot2 = soundDispatchPlayer.GetResidentSndEffectSlot();
        if (residentSndEffectSlot2[0] != null)
        {
            residentSndEffectSlot2[0].SndEffectVol = num1;
        }
        if (residentSndEffectSlot2[1] != null)
        {
            residentSndEffectSlot2[1].SndEffectVol = num2;
        }

        Int32                     index            = FF9StateSystem.Common.FF9.fldMapNo;
        FF9StateFieldMap          ff9StateFieldMap = FF9StateSystem.Field.FF9Field.loc.map;
        Dictionary <Int32, Int32> dictionary       = FF9SndMetaData.BtlBgmMapperForFieldMap[index];
        Int32                     currentMusicId   = FF9Snd.GetCurrentMusicId();

        FF9StateSystem.Battle.IsPlayFieldBGMInCurrentBattle = true;
        if (dictionary.Count == 0 || !dictionary.ContainsKey(ff9StateFieldMap.nextMapNo))
        {
            return;
        }

        Int32 songid = dictionary[ff9StateFieldMap.nextMapNo];

        if (songid == currentMusicId)
        {
            return;
        }

        FF9Snd.ff9fldsnd_song_suspend(currentMusicId);
        btlsnd.ff9btlsnd_song_play(songid);
        FF9StateSystem.Battle.IsPlayFieldBGMInCurrentBattle = false;
    }
Beispiel #3
0
    private void RequestPlayBattleEncounterSongForWorld()
    {
        Int32                     index            = FF9StateSystem.Common.FF9.wldMapNo;
        FF9StateWorldMap          ff9StateWorldMap = FF9StateSystem.World.FF9World.map;
        Dictionary <Int32, Int32> dictionary       = FF9SndMetaData.BtlBgmMapperForWorldMap[index];
        Int32                     currentMusicId   = FF9Snd.GetCurrentMusicId();

        if (dictionary.Count == 0 || !dictionary.ContainsKey(ff9StateWorldMap.nextMapNo))
        {
            return;
        }

        Int32 songid = dictionary[(Int32)ff9StateWorldMap.nextMapNo];

        if (songid == currentMusicId)
        {
            return;
        }

        FF9Snd.ff9fldsnd_song_suspend(currentMusicId);
        btlsnd.ff9btlsnd_song_play(songid);
    }