コード例 #1
0
ファイル: GmSound.cs プロジェクト: uwx/Sonic4Episode1
 private static void gmSoundSetBGMFade(
     AppMain.GSS_SND_SCB snd_scb,
     float start_vol,
     float end_vol,
     int frame)
 {
     if (AppMain.GsSoundIsBgmStop(AppMain.gm_sound_bgm_scb) || AppMain.GsSoundIsBgmPause(AppMain.gm_sound_bgm_scb))
     {
         return;
     }
     AppMain.gmSoundSetBGMFadeEnd(snd_scb);
     if (frame <= 0)
     {
         frame = 1;
     }
     if (AppMain.gm_sound_bgm_fade_tcb == null)
     {
         AppMain.gm_sound_bgm_fade_tcb = AppMain.MTM_TASK_MAKE_TCB(new AppMain.GSF_TASK_PROCEDURE(AppMain.gmSoundBGMFadeFunc), new AppMain.GSF_TASK_PROCEDURE(AppMain.gmSoundBGMFadeDest), 0U, (ushort)0, (uint)short.MaxValue, 5, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_SOUND_BGM_FADE_MGR_WORK()), "GM_SOUND_BFADE");
         ((AppMain.GMS_SOUND_BGM_FADE_MGR_WORK)AppMain.gm_sound_bgm_fade_tcb.work).Clear();
     }
     AppMain.gmSoundBGMFadeAttachList((AppMain.GMS_SOUND_BGM_FADE_MGR_WORK)AppMain.gm_sound_bgm_fade_tcb.work, new AppMain.GMS_SOUND_BGM_FADE_WORK()
     {
         snd_scb   = snd_scb,
         start_vol = start_vol,
         end_vol   = end_vol,
         frame     = frame,
         fade_spd  = (end_vol - start_vol) / (float)frame,
         now_vol   = start_vol
     });
 }
コード例 #2
0
 // Token: 0x06000847 RID: 2119 RVA: 0x000484E0 File Offset: 0x000466E0
 private static void gmSoundSetBGMFade(AppMain.GSS_SND_SCB snd_scb, float start_vol, float end_vol, int frame)
 {
     if (AppMain.GsSoundIsBgmStop(AppMain.gm_sound_bgm_scb))
     {
         return;
     }
     if (AppMain.GsSoundIsBgmPause(AppMain.gm_sound_bgm_scb))
     {
         return;
     }
     AppMain.gmSoundSetBGMFadeEnd(snd_scb);
     if (frame <= 0)
     {
         frame = 1;
     }
     AppMain.GMS_SOUND_BGM_FADE_MGR_WORK gms_SOUND_BGM_FADE_MGR_WORK;
     if (AppMain.gm_sound_bgm_fade_tcb == null)
     {
         AppMain.gm_sound_bgm_fade_tcb = AppMain.MTM_TASK_MAKE_TCB(new AppMain.GSF_TASK_PROCEDURE(AppMain.gmSoundBGMFadeFunc), new AppMain.GSF_TASK_PROCEDURE(AppMain.gmSoundBGMFadeDest), 0U, 0, 32767U, 5, () => new AppMain.GMS_SOUND_BGM_FADE_MGR_WORK(), "GM_SOUND_BFADE");
         gms_SOUND_BGM_FADE_MGR_WORK   = (AppMain.GMS_SOUND_BGM_FADE_MGR_WORK)AppMain.gm_sound_bgm_fade_tcb.work;
         gms_SOUND_BGM_FADE_MGR_WORK.Clear();
     }
     gms_SOUND_BGM_FADE_MGR_WORK = (AppMain.GMS_SOUND_BGM_FADE_MGR_WORK)AppMain.gm_sound_bgm_fade_tcb.work;
     AppMain.gmSoundBGMFadeAttachList(gms_SOUND_BGM_FADE_MGR_WORK, new AppMain.GMS_SOUND_BGM_FADE_WORK
     {
         snd_scb   = snd_scb,
         start_vol = start_vol,
         end_vol   = end_vol,
         frame     = frame,
         fade_spd  = (end_vol - start_vol) / ( float )frame,
         now_vol   = start_vol
     });
 }
コード例 #3
0
ファイル: GmSound.cs プロジェクト: uwx/Sonic4Episode1
    private static void gmSoundBGMWinBossFunc(AppMain.MTS_TASK_TCB tcb)
    {
        AppMain.GMS_SOUND_BGM_WIN_BOSS_MGR_WORK work = (AppMain.GMS_SOUND_BGM_WIN_BOSS_MGR_WORK)tcb.work;
        if (((int)AppMain.gm_sound_flag & 134217728) != 0)
        {
            return;
        }
        --work.timer;
        if (work.timer > 0)
        {
            return;
        }
        bool flag1 = false;
        bool flag2 = false;

        AppMain.GsSoundStopBgm(AppMain.gm_sound_bgm_sub_scb, 0);
        if (AppMain.GsSoundIsBgmPause(AppMain.gm_sound_bgm_scb))
        {
            flag1 = true;
        }
        if (((int)AppMain.gm_sound_flag & 80) != 0)
        {
            flag2 = true;
        }
        if (flag1 | flag2)
        {
            AppMain.GmSoundStopStageBGM(0);
        }
        else
        {
            AppMain.GmSoundStopStageBGM(30);
        }
        AppMain.GSS_SND_SCB gmSoundBgmScb = AppMain.gm_sound_bgm_scb;
        AppMain.gm_sound_bgm_scb     = AppMain.gm_sound_bgm_sub_scb;
        AppMain.gm_sound_bgm_sub_scb = gmSoundBgmScb;
        AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 1f);
        AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, false);
        AppMain.GsSoundPlayBgm(AppMain.gm_sound_bgm_scb, AppMain.gm_sound_bgm_win_boss_name_list[AppMain.GMM_MAIN_GET_ZONE_TYPE()], 30);
        AppMain.gm_sound_bgm_scb.flag |= 2147483648U;
        if (flag1)
        {
            AppMain.GmSoundPauseStageBGM(0);
        }
        if (flag2)
        {
            AppMain.gmSoundSetBGMFadeEnd(AppMain.gm_sound_bgm_scb);
            AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 0.0f);
            AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, true);
        }
        AppMain.mtTaskClearTcb(tcb);
    }
コード例 #4
0
 // Token: 0x06000848 RID: 2120 RVA: 0x000485CC File Offset: 0x000467CC
 private static void gmSoundSetBGMFadeEnd(AppMain.GSS_SND_SCB snd_scb)
 {
     if (AppMain.gm_sound_bgm_fade_tcb != null)
     {
         AppMain.GMS_SOUND_BGM_FADE_MGR_WORK gms_SOUND_BGM_FADE_MGR_WORK = (AppMain.GMS_SOUND_BGM_FADE_MGR_WORK)AppMain.gm_sound_bgm_fade_tcb.work;
         AppMain.GMS_SOUND_BGM_FADE_WORK     next;
         for (AppMain.GMS_SOUND_BGM_FADE_WORK gms_SOUND_BGM_FADE_WORK = gms_SOUND_BGM_FADE_MGR_WORK.head; gms_SOUND_BGM_FADE_WORK != null; gms_SOUND_BGM_FADE_WORK = next)
         {
             next = gms_SOUND_BGM_FADE_WORK.next;
             if (gms_SOUND_BGM_FADE_WORK.snd_scb == snd_scb)
             {
                 AppMain.gmSoundBGMFadeDetachList(gms_SOUND_BGM_FADE_MGR_WORK, gms_SOUND_BGM_FADE_WORK);
             }
         }
         if (gms_SOUND_BGM_FADE_MGR_WORK.num <= 0)
         {
             AppMain.mtTaskClearTcb(AppMain.gm_sound_bgm_fade_tcb);
         }
     }
 }
コード例 #5
0
ファイル: GmSound.cs プロジェクト: uwx/Sonic4Episode1
    private static void GmSoundChangeFinalBossBGM()
    {
        bool flag1 = false;
        bool flag2 = false;

        AppMain.GsSoundStopBgm(AppMain.gm_sound_bgm_sub_scb, 0);
        if (AppMain.GsSoundIsBgmPause(AppMain.gm_sound_bgm_scb))
        {
            flag1 = true;
        }
        if (((int)AppMain.gm_sound_flag & 80) != 0)
        {
            flag2 = true;
        }
        if (flag1 | flag2)
        {
            AppMain.GmSoundStopStageBGM(0);
        }
        else
        {
            AppMain.GmSoundStopStageBGM(15);
        }
        AppMain.GSS_SND_SCB gmSoundBgmScb = AppMain.gm_sound_bgm_scb;
        AppMain.gm_sound_bgm_scb     = AppMain.gm_sound_bgm_sub_scb;
        AppMain.gm_sound_bgm_sub_scb = gmSoundBgmScb;
        AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 1f);
        AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, false);
        AppMain.GsSoundPlayBgm(AppMain.gm_sound_bgm_scb, AppMain.GMD_SOUND_FINAL_BOSS_BGM_NAME, 15);
        AppMain.gm_sound_bgm_scb.flag |= 2147483648U;
        if (flag1)
        {
            AppMain.GmSoundPauseStageBGM(0);
        }
        if (!flag2)
        {
            return;
        }
        AppMain.gmSoundSetBGMFadeEnd(AppMain.gm_sound_bgm_scb);
        AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 0.0f);
        AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, true);
    }
コード例 #6
0
ファイル: GmSound.cs プロジェクト: uwx/Sonic4Episode1
    private static void GmSoundChangeSpeedupBGM()
    {
        bool flag1 = false;
        bool flag2 = false;

        AppMain.GsSoundStopBgm(AppMain.gm_sound_bgm_sub_scb, 0);
        if (AppMain.GsSoundIsBgmPause(AppMain.gm_sound_bgm_scb))
        {
            flag1 = true;
        }
        if (((int)AppMain.gm_sound_flag & 80) != 0)
        {
            flag2 = true;
        }
        if (flag1 | flag2)
        {
            AppMain.GmSoundStopStageBGM(0);
        }
        else
        {
            AppMain.GmSoundStopStageBGM(0);
        }
        if (flag1)
        {
            AppMain.GmSoundPauseStageBGM(0);
        }
        AppMain.GSS_SND_SCB gmSoundBgmScb = AppMain.gm_sound_bgm_scb;
        AppMain.gm_sound_bgm_scb     = AppMain.gm_sound_bgm_sub_scb;
        AppMain.gm_sound_bgm_sub_scb = gmSoundBgmScb;
        AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 1f);
        AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, false);
        AppMain.GsSoundPlayBgm(AppMain.gm_sound_bgm_scb, AppMain.gm_sound_speedup_bgm_name_list[(int)AppMain.g_gs_main_sys_info.stage_id], 0);
        AppMain.gm_sound_bgm_scb.flag |= 2147483648U;
        if (!flag2)
        {
            return;
        }
        AppMain.gmSoundSetBGMFadeEnd(AppMain.gm_sound_bgm_scb);
        AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 0.0f);
        AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, true);
    }
コード例 #7
0
    // Token: 0x0600082F RID: 2095 RVA: 0x00047D88 File Offset: 0x00045F88
    private static void GmSoundChangeFinalBossBGM()
    {
        bool flag  = false;
        bool flag2 = false;

        AppMain.GsSoundStopBgm(AppMain.gm_sound_bgm_sub_scb, 0);
        if (AppMain.GsSoundIsBgmPause(AppMain.gm_sound_bgm_scb))
        {
            flag = true;
        }
        if ((AppMain.gm_sound_flag & 80U) != 0U)
        {
            flag2 = true;
        }
        if (flag || flag2)
        {
            AppMain.GmSoundStopStageBGM(0);
        }
        else
        {
            AppMain.GmSoundStopStageBGM(15);
        }
        AppMain.GSS_SND_SCB gss_SND_SCB = AppMain.gm_sound_bgm_scb;
        AppMain.gm_sound_bgm_scb     = AppMain.gm_sound_bgm_sub_scb;
        AppMain.gm_sound_bgm_sub_scb = gss_SND_SCB;
        AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 1f);
        AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, false);
        AppMain.GsSoundPlayBgm(AppMain.gm_sound_bgm_scb, "snd_sng_final", 15);
        AppMain.gm_sound_bgm_scb.flag |= 2147483648U;
        if (flag)
        {
            AppMain.GmSoundPauseStageBGM(0);
        }
        if (flag2)
        {
            AppMain.gmSoundSetBGMFadeEnd(AppMain.gm_sound_bgm_scb);
            AppMain.GsSoundScbSetVolume(AppMain.gm_sound_bgm_scb, 0f);
            AppMain.GsSoundScbSetSeqMute(AppMain.gm_sound_bgm_scb, true);
        }
    }
コード例 #8
0
ファイル: GmSound.cs プロジェクト: uwx/Sonic4Episode1
 private static void gmSoundSetBGMFadeEnd(AppMain.GSS_SND_SCB snd_scb)
 {
     if (AppMain.gm_sound_bgm_fade_tcb == null)
     {
         return;
     }
     AppMain.GMS_SOUND_BGM_FADE_MGR_WORK work = (AppMain.GMS_SOUND_BGM_FADE_MGR_WORK)AppMain.gm_sound_bgm_fade_tcb.work;
     AppMain.GMS_SOUND_BGM_FADE_WORK     next;
     for (AppMain.GMS_SOUND_BGM_FADE_WORK fade_work = work.head; fade_work != null; fade_work = next)
     {
         next = fade_work.next;
         if (fade_work.snd_scb == snd_scb)
         {
             AppMain.gmSoundBGMFadeDetachList(work, fade_work);
         }
     }
     if (work.num > 0)
     {
         return;
     }
     AppMain.mtTaskClearTcb(AppMain.gm_sound_bgm_fade_tcb);
 }