Beispiel #1
0
 private void Exit()
 {
     EndGameMain.Instance.endGame.FF9SFX_Play(103u);
     FF9Snd.ff9endsnd_song_vol_intpl(156, 60, 0);
     SoundLib.GetAllSoundDispatchPlayer().StopCurrentSong(60);
     SceneDirector.Replace(PersistenSingleton <SceneDirector> .Instance.LastScene, SceneTransition.FadeOutToBlack_FadeIn, true);
 }
Beispiel #2
0
	public static void FadeOutMusic()
	{
		if (FF9Snd.GetCurrentMusicId() != -1)
		{
			FF9Snd.ff9fldsnd_song_vol_intpl(FF9Snd.GetCurrentMusicId(), 30, 0);
		}
	}
Beispiel #3
0
 public static void FF9SFX_Play(Int32 id)
 {
     if (!FF9Sfx.muteSfx)
     {
         FF9Snd.ff9snd_sndeffect_play(id, 8388608, 127, 128);
     }
 }
Beispiel #4
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 #5
0
 public static void WillAutosave()
 {
     try
     {
         if (FF9Snd.HasJustChangedBetweenWorldAndField)
         {
             FF9StateSystem.Sound.auto_save_bgm_id = -1;
         }
         else
         {
             FF9StateSystem.Sound.auto_save_bgm_id = FF9Snd.GetCurrentMusicId();
         }
         FF9Snd.HasJustChangedBetweenWorldAndField = false;
     }
     catch (Exception arg)
     {
         ISharedDataLog.LogWarning("GetCurrentMusicId: Exception: " + arg);
     }
 }
Beispiel #6
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 #7
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);
    }
Beispiel #8
0
 private void CheckBlackjackKey(Control keyCode)
 {
     if (!this.isReadyToBlackjack)
     {
         return;
     }
     if (this.blackjackKeyCodeCount < this.blackjackKeyCodeList.Count)
     {
         Control control = this.blackjackKeyCodeList[this.blackjackKeyCodeCount];
         if (control == keyCode)
         {
             this.blackjackKeyCodeCount++;
             if (this.blackjackKeyCodeCount == this.blackjackKeyCodeList.Count)
             {
                 FF9Snd.ff9snd_sndeffect_play(103, 8388608, 127, 128);
                 this.isStartToBlackjack = true;
             }
         }
         else
         {
             this.blackjackKeyCodeCount = 0;
         }
     }
     if (keyCode == Control.Pause)
     {
         if (this.isStartToBlackjack)
         {
             FF9Snd.ff9snd_sndeffect_play(3096, 8388608, 127, 128);
             SceneDirector.Replace("EndGame", SceneTransition.FadeOutToBlack_FadeIn, true);
             SceneDirector.ToggleFadeAll(false);
         }
         else
         {
             SceneDirector.Replace("Title", SceneTransition.FadeOutToBlack_FadeIn, true);
         }
     }
 }
Beispiel #9
0
    public override void HonoUpdate()
    {
        base.HonoUpdate();
        if (this.isFirstFrame)
        {
            this.isFirstFrame = false;
            return;
        }
        switch (this.ff9endingState)
        {
        case EndingMain.FF9EndingState.ENDING_STATE_FMV059:
            MBG.Instance.LoadMovie(MBG.MBGDiscTable[4][18].name);
            MBG.Instance.SetModeEnding();
            MBG.Instance.SetFinishCallback(delegate
            {
                this.ff9endingState = EndingMain.FF9EndingState.ENDING_STATE_TEXT;
                MBG.Instance.Purge();
            });
            MBG.Instance.Play();
            this.ff9endingState = EndingMain.FF9EndingState.WAIT_FMV059_END;
            break;

        case EndingMain.FF9EndingState.WAIT_FMV059_END:
            if (!this.fadeblack && MBG.Instance.GetFrameCount - MBG.Instance.GetFrame < 60)
            {
                this.fadeblack = true;
                SceneDirector.InitFade(FadeMode.Sub, 0, new Color32(0, 0, 0, Byte.MaxValue));
                SceneDirector.InitFade(FadeMode.Sub, 60, new Color32(Byte.MaxValue, Byte.MaxValue, Byte.MaxValue, Byte.MaxValue));
            }
            break;

        case EndingMain.FF9EndingState.ENDING_STATE_TEXT:
            SceneDirector.InitFade(FadeMode.Sub, 1, new Color32(0, 0, 0, Byte.MaxValue));
            PersistenSingleton <UIManager> .Instance.EndingScene.endingSlideshow.PlayEndingText(delegate
            {
                this.ff9endingState = EndingMain.FF9EndingState.ENDING_STATE_FMV060;
            });

            this.ff9endingState = EndingMain.FF9EndingState.WAIT_ENDING_STATE_TEXT;
            break;

        case EndingMain.FF9EndingState.ENDING_STATE_FMV060:
            MBG.Instance.LoadMovie(MBG.MBGDiscTable[4][19].name);
            MBG.Instance.SetModeEnding();
            MBG.Instance.Play();
            MBG.Instance.SetFinishCallback(delegate
            {
                this.ff9endingState = EndingMain.FF9EndingState.ENDING_STATE_IMAGE;
            });
            this.ff9endingState = EndingMain.FF9EndingState.WAIT_FMV060_END;
            break;

        case EndingMain.FF9EndingState.ENDING_STATE_IMAGE:
            PersistenSingleton <UIManager> .Instance.EndingScene.endingSlideshow.PlayLastEndingText(delegate
            {
                this.ff9endingState = EndingMain.FF9EndingState.ENDING_STATE_END;
                PersistenSingleton <UIManager> .Instance.SetMenuControlEnable(true);
                PersistenSingleton <UIManager> .Instance.SetUIPauseEnable(true);
                PersistenSingleton <UIManager> .Instance.EndingScene.ReadyToBlackjack();
                FF9Snd.ff9endsnd_song_play(156);
                FF9Snd.ff9endsnd_song_vol_fade(156, 90, 0, 127);
                FF9StateSystem.Serializer.SetGameFinishFlagWithTrue(delegate(DataSerializerErrorCode errNo, Boolean isSuccess)
                {
                    if (errNo != DataSerializerErrorCode.Success || !isSuccess)
                    {
                    }
                });
                AchievementManager.ReportAchievement(AcheivementKey.CompleteGame, 1);
            });

            this.ff9endingState = EndingMain.FF9EndingState.WAITENDINGSTATEIMAGE;
            break;
        }
        SceneDirector.ServiceFade();
    }
Beispiel #10
0
 public static void FF9SFX_StopLoop(Int32 id)
 {
     FF9Snd.ff9snd_sndeffect_stop(id, 0);
 }
Beispiel #11
0
 public static void FF9SFX_Stop(Int32 id)
 {
     FF9Snd.ff9snd_sndeffect_stop(id, 8388608);
 }
Beispiel #12
0
 public static void ff9btlsnd_weapon_instr(Int32 _partycharno)
 {
     FF9Snd.FF9BattleSoundGetWeaponInstr(_partycharno);
 }
Beispiel #13
0
 public static Int32 ff9btlsnd_weapon_sfx(Int32 _partycharno, FF9BatteSoundWeaponSndEffectType _sfxtype)
 {
     return(FF9Snd.FF9BattleSoundGetWeaponSndEffect(_partycharno, _sfxtype));
 }
Beispiel #14
0
 public static void FF9BattleSoundArg3(Int32 _parmtype, Int32 _objno, Int32 _arg1, Int32 _arg2, Int32 _arg3)
 {
     FF9Snd.FF9BattleSoundDispatch(_parmtype, _objno, _arg1, _arg2, _arg3);
 }
Beispiel #15
0
	private void ff9InitStateFieldMap(Int32 MapNo)
	{
		FF9StateFieldMap map = this.FF9Field.loc.map;
		map.ff9ResetStateFieldMap();
		this.FF9Sys.attr &= 4294966512u;
		this.FF9Field.attr |= 4u;
		FF9StateFieldSystem ff9Field = FF9StateSystem.Field.FF9Field;
		this.FF9Field.playerID = 0;
		map.nextMapNo = (this.FF9.fldMapNo = (Int16)MapNo);
		for (Int32 i = 1; i >= 0; i--)
		{
			for (Int32 j = 3; j >= 0; j--)
			{
				FieldMap.FF9FieldAttr.ff9[i, j] = 0;
				FieldMap.FF9FieldAttr.field[i, j] = 0;
			}
		}
		String text = FF9DBAll.EventDB[MapNo];
		map.evtPtr = EventEngineUtils.loadEventData(text, EventEngineUtils.ebSubFolderField);
		AnimationFactory.LoadAnimationUseInEvent(text);
		vib.LoadVibData(text);
		map.mcfPtr = MapConfiguration.LoadMapConfigData(text);
		GameObject gameObject = GameObject.Find("FieldMap Root");
		GameObject gameObject2 = new GameObject("FieldMap");
		gameObject2.transform.parent = gameObject.transform;
		PersistenSingleton<EventEngine>.Instance.fieldmap = gameObject2.AddComponent<FieldMap>();
		GameObject gameObject3 = new GameObject("FieldMap SPS");
		gameObject3.transform.parent = gameObject.transform;
		PersistenSingleton<EventEngine>.Instance.fieldSps = gameObject3.AddComponent<FieldSPSSystem>();
		PersistenSingleton<EventEngine>.Instance.fieldSps.Init(PersistenSingleton<EventEngine>.Instance.fieldmap);
		if (MapNo >= 3000 && MapNo <= 3012)
		{
			FF9StateSystem.Settings.CallBoosterButtonFuntion(BoosterType.BattleAssistance, false);
			FF9StateSystem.Settings.CallBoosterButtonFuntion(BoosterType.HighSpeedMode, false);
			FF9StateSystem.Settings.CallBoosterButtonFuntion(BoosterType.Attack9999, false);
			FF9StateSystem.Settings.CallBoosterButtonFuntion(BoosterType.NoRandomEncounter, false);
			PersistenSingleton<UIManager>.Instance.Booster.SetBoosterHudIcon(BoosterType.BattleAssistance, false);
			PersistenSingleton<UIManager>.Instance.Booster.SetBoosterHudIcon(BoosterType.HighSpeedMode, false);
			PersistenSingleton<UIManager>.Instance.Booster.SetBoosterHudIcon(BoosterType.Attack9999, false);
			PersistenSingleton<UIManager>.Instance.Booster.SetBoosterHudIcon(BoosterType.NoRandomEncounter, false);
			PersistenSingleton<UIManager>.Instance.SetUIPauseEnable(false);
			PersistenSingleton<UIManager>.Instance.ChangeUIState(UIManager.UIState.PreEnding);
		}
		else
		{
			PersistenSingleton<UIManager>.Instance.SetUIPauseEnable(true);
		}
		AllSoundDispatchPlayer allSoundDispatchPlayer = SoundLib.GetAllSoundDispatchPlayer();
		Int32 suspendSongID = allSoundDispatchPlayer.GetSuspendSongID();
		Int32 sndEffectResSoundID = allSoundDispatchPlayer.GetSndEffectResSoundID(0);
		Int32 sndEffectResSoundID2 = allSoundDispatchPlayer.GetSndEffectResSoundID(1);
		FF9Snd.BGMFieldSongCounter = 0;
		this.ee.StartEvents(map.evtPtr);
		FF9StateSystem.Field.SetTwistAD((Int32)this.ee.GetTwistA(), (Int32)this.ee.GetTwistD());
		PersistenSingleton<EventEngine>.Instance.eTb.InitMessage();
		PersistenSingleton<EventEngine>.Instance.eTb.InitMovieHitPoint(MapNo);
		this.FF9.npcCount = (Byte)this.ee.GetNumberNPC();
		this.fieldmap = GameObject.Find("FieldMap").GetComponent<FieldMap>();
		this.ee.updateModelsToBeAdded();
		Int32 suspendSongID2 = allSoundDispatchPlayer.GetSuspendSongID();
		Int32 sndEffectResSoundID3 = allSoundDispatchPlayer.GetSndEffectResSoundID(0);
		Int32 sndEffectResSoundID4 = allSoundDispatchPlayer.GetSndEffectResSoundID(1);
		if (suspendSongID != -1 && suspendSongID2 != -1 && suspendSongID == suspendSongID2)
		{
			FF9Snd.ff9fldsnd_song_restore();
		}
		if (FF9Snd.LatestWorldPlayedSong != -1 && FF9Snd.LatestWorldPlayedSong == SoundLib.GetAllSoundDispatchPlayer().GetCurrentMusicId() && FF9Snd.BGMFieldSongCounter == 0)
		{
			SoundLib.GetAllSoundDispatchPlayer().FF9SOUND_SONG_STOPCURRENT();
		}
		FF9Snd.LatestWorldPlayedSong = -1;
		FF9Snd.BGMFieldSongCounter = 0;
		if ((sndEffectResSoundID != -1 || sndEffectResSoundID2 != -1) && (sndEffectResSoundID3 != -1 || sndEffectResSoundID4 != -1) && sndEffectResSoundID == sndEffectResSoundID3 && sndEffectResSoundID2 == sndEffectResSoundID4)
		{
			FF9Snd.ff9fieldSoundRestoreAllResidentSndEffect();
		}
	}
Beispiel #16
0
    public static void FF9FieldCharDispatch(Int32 uid, Int32 Parm, Int32 Arg1, Int32 Arg2, Int32 Arg3)
    {
        FF9FieldCharState ff9FieldCharState = FF9StateSystem.Field.FF9Field.loc.map.charStateArray[uid];
        FF9Char           ff9Char           = FF9StateSystem.Common.FF9.charArray[uid];

        switch (Parm)
        {
        case 0:
            if ((Arg1 & 255) == 255)
            {
                ff9Char.attr = (UInt32)((UInt64)ff9Char.attr & 18446744073709486079UL);
            }
            else
            {
                if (Arg1 != (Int32)ff9FieldCharState.arate)
                {
                    ff9Char.attr |= 262144u;
                }
                ff9Char.attr |= 65536u;
            }
            ff9FieldCharState.arate = (SByte)Arg1;
            break;

        case 4:
            if (Arg1 != 0)
            {
                fldchar.geoSlice(ff9Char.geo, Arg2);
                ff9Char.attr |= 1048576u;
            }
            else
            {
                ff9Char.attr = (UInt32)((UInt64)ff9Char.attr & 18446744073708503039UL);
            }
            break;

        case 8:
        case 9:
        case 10:
        case 11:
        {
            FF9FieldCharMirror ff9FieldCharMirror = ff9FieldCharState.mirror;
            FF9Char            ff9Char2;
            if (ff9FieldCharMirror == null)
            {
                ff9FieldCharMirror          = (ff9FieldCharState.mirror = new FF9FieldCharMirror());
                ff9Char2                    = (ff9FieldCharMirror.chr = ff9Char);
                ff9Char2.attr               = 0u;
                ff9FieldCharMirror.geo      = ModelFactory.CreateModel(FF9BattleDB.GEO.GetValue((Int32)ff9Char.evt.model), false);
                ff9FieldCharMirror.geo.name = ff9Char.geo.name + "_mirror";
                Shader     shader = ShadersLoader.Find("PSX/FieldMapActor");
                Renderer[] componentsInChildren = ff9FieldCharMirror.geo.GetComponentsInChildren <Renderer>();
                Renderer[] array = componentsInChildren;
                for (Int32 i = 0; i < (Int32)array.Length; i++)
                {
                    Renderer renderer = array[i];
                    renderer.material.shader = shader;
                    renderer.material.SetColor("_Color", new Color(0.5f, 0.5f, 0.5f));
                    if (FF9StateSystem.Common.FF9.fldMapNo == 2653 || FF9StateSystem.Common.FF9.fldMapNo == 2654)
                    {
                        renderer.material.renderQueue = 2000;
                    }
                }
                ff9FieldCharMirror.geo.transform.SetParent(ff9Char.geo.transform.transform.parent);
                ff9FieldCharMirror.evt = ff9Char.evt;
                ff9FieldCharMirror.geo.transform.localScale       = new Vector3(-1f, 1f, 1f);
                ff9FieldCharMirror.geo.transform.localEulerAngles = Vector3.zero;
                ff9FieldCharMirror.geo.transform.localPosition    = Vector3.zero;
                ff9FieldCharMirror.actor = ff9FieldCharMirror.geo.AddComponent <FieldMapActor>();
                ff9FieldCharMirror.actor.meshRenderer = ff9FieldCharMirror.geo.GetComponentsInChildren <Renderer>();
                ff9FieldCharMirror.parent             = ff9Char;
                ff9FieldCharMirror.point  = Vector3.zero;
                ff9FieldCharMirror.normal = Vector3.zero;
                ff9FieldCharMirror.clr[0] = 0;
            }
            ff9Char2 = ff9FieldCharMirror.chr;
            if (FF9Char.ff9charptr_attr_test(ff9FieldCharMirror.chr, 1) == 0)
            {
                ff9Char2.evt = ff9Char.evt;
                FF9Char.ff9charptr_attr_set(ff9FieldCharMirror.chr, 33554433);
            }
            switch (Parm)
            {
            case 8:
                if (Arg1 != 0)
                {
                    FF9Char.ff9charptr_attr_set(ff9FieldCharMirror.chr, 16777216);
                    ff9FieldCharMirror.geo.SetActive(true);
                }
                else
                {
                    FF9Char.ff9charptr_attr_clear(ff9FieldCharMirror.chr, 16777216);
                    ff9FieldCharMirror.geo.SetActive(false);
                }
                break;

            case 9:
                ff9FieldCharMirror.point = new Vector3((Single)Arg1, (Single)Arg2, (Single)Arg3);
                break;

            case 10:
                ff9FieldCharMirror.normal = new Vector3((Single)(Arg1 >> 12), (Single)(Arg2 >> 12), (Single)(Arg3 >> 12));
                break;

            case 11:
                ff9FieldCharMirror.clr[0] = (Byte)Arg1;
                ff9FieldCharMirror.clr[1] = (Byte)Arg2;
                ff9FieldCharMirror.clr[2] = (Byte)Arg3;
                ff9FieldCharMirror.clr[3] = 2;
                break;
            }
            break;
        }

        case 16:
        case 17:
        case 18:
        case 19:
        {
            FF9FieldCharSound ff9FieldCharSound;
            if ((ff9FieldCharSound = FF9Snd.ff9fieldSoundGetChar(ff9Char, Arg1, Arg2)) == null && Parm != 19)
            {
                ff9FieldCharSound = FF9Snd.ff9fieldSoundNewChar(ff9Char, Arg1, Arg2);
            }
            switch (Parm)
            {
            case 16:
                ff9FieldCharSound.sndEffectID[0] = (UInt16)Arg3;
                break;

            case 17:
                ff9FieldCharSound.sndEffectID[1] = (UInt16)Arg3;
                break;

            case 18:
                ff9FieldCharSound.pitchRand = (SByte)((Arg3 == 0) ? 0 : 1);
                break;

            case 19:
                FF9Snd.ff9fieldSoundDeleteChar(ff9Char, Arg1, Arg2);
                break;
            }
            break;
        }
        }
    }
Beispiel #17
0
 public static void Stop(QuadMistSoundID type)
 {
     FF9Snd.ff9minisnd_sndeffect_stop(SoundEffect.soundIdMap[type], 0);
 }
Beispiel #18
0
 public static void Play(QuadMistSoundID type)
 {
     FF9Snd.ff9minisnd_sndeffect_play(SoundEffect.soundIdMap[type], 0, 127, 128);
 }
Beispiel #19
0
 private void PlayBattleEncounterSoundEffect()
 {
     FF9Snd.ff9fldsnd_sndeffect_play(636, 0, SByte.MaxValue, 128);
     FF9Snd.ff9fldsnd_sndeffect_play(635, 0, SByte.MaxValue, 128);
     FF9Snd.ff9fldsnd_sndeffect_play(634, 0, SByte.MaxValue, 128);
 }
Beispiel #20
0
 public static Int32 FF9BattleSoundArg0(Int32 _parmtype, Int32 _objno)
 {
     return(FF9Snd.FF9BattleSoundDispatch(_parmtype, _objno, 0, 0, 0));
 }
Beispiel #21
0
    public int GetSysvar(int code)
    {
        FF9StateBattleSystem stateBattleSystem = FF9StateSystem.Battle.FF9Battle;
        int num;

        switch (code)
        {
        case 0:
            num = Comn.random8();
            break;

        case 1:
            num = this.fieldmap.GetCurrentCameraIndex();
            break;

        case 2:
            num = (int)this._context.usercontrol;
            break;

        case 3:
            num = FF9Snd.ff9fldsnd_sync();
            break;

        case 4:
            num = EventCollision.sSysAngle;
            break;

        case 5:
            Obj sender = this.getSender(this.gExec);
            num = -1;
            if (sender != null)
            {
                num = (int)sender.sid - (this.sSourceObjN - 9);
                break;
            }
            break;

        case 6:
            num = (int)this._ff9.party.gil;
            break;

        case 7:
            num = FF9StateSystem.EventState.gStepCount;
            break;

        case 8:
            num = ETb.gMesSignal;
            break;

        case 9:
            num = this.eTb.GetChoose();
            break;

        case 10:
            num = this.sMapJumpX;
            break;

        case 11:
            num = this.sMapJumpZ;
            break;

        case 12:
            num = this.sSysX;
            break;

        case 13:
            num = this.sSysY;
            break;

        case 14:
            num = fldfmv.FF9FieldFMVGetFrame();
            break;

        case 15:
            num = fldfmv.FF9FieldFMVSync();
            break;

        case 16:
            num = (int)this._ff9.frog_no;
            break;

        case 17:
            num = Convert.ToInt32(TimerUI.Time);
            break;

        case 18:
            num = QuadMistDatabase.MiniGame_GetLastBattleResult();
            break;

        case 19:
            num = FF9StateSystem.MiniGame.GetNumberOfCards();
            Debug.Log((object)("num of cards = " + (object)num));
            break;

        case 20:
            num = Convert.ToInt32(FF9StateSystem.Settings.time);
            if (num > 8388607)
            {
                num = 8388607;
                break;
            }
            break;

        case 21:
            num = !TimerUI.Enable ? 0 : 1;
            break;

        case 22:
            num = this.sSEPos;
            break;

        case 23:
            num = this.sSEVol;
            break;

        case 24:
            num = (int)this._ff9.btlMapNo;
            break;

        case 25:
            num = !btlseq.BtlSeqBusy() ? 0 : 1;
            break;

        case 26:
            num = this.gMode != 4 ? 0 : 1;
            break;

        case 27:
            num = (int)this._ff9.btl_result;
            break;

        case 28:
            num = EventEngine._btlCmdPrm >> 8 & (int)byte.MaxValue;
            break;

        case 29:
            num = EventEngine._btlCmdPrm & (int)byte.MaxValue;
            break;

        case 30:
            num = (int)stateBattleSystem.btl_phase;
            break;

        case 31:
            num = (int)stateBattleSystem.btl_scene.PatNum;
            break;

        default:
            if ((int)this.gCur.sid != 3 || this.gCur.ip != 791)
            {
                ;
            }
            num = code < 192 ? (int)btl_scrp.GetBattleData(code) : ff9.w_frameGetParameter(code);
            break;
        }
        return(num);
    }
Beispiel #22
0
 public static void FF9BattleSoundArg1(Int32 _parmtype, Int32 _objno, Int32 _arg1)
 {
     FF9Snd.FF9BattleSoundDispatch(_parmtype, _objno, _arg1, 0, 0);
 }