コード例 #1
0
 // Token: 0x06001166 RID: 4454 RVA: 0x00098D50 File Offset: 0x00096F50
 private static void izFadeEndWaitMain(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.IZS_FADE_WORK izs_FADE_WORK = (AppMain.IZS_FADE_WORK)tcb.work;
     izs_FADE_WORK.count += 1f;
     if (izs_FADE_WORK.count > 1f)
     {
         AppMain.mtTaskClearTcb(tcb);
     }
 }
コード例 #2
0
 // Token: 0x0600115E RID: 4446 RVA: 0x000987CC File Offset: 0x000969CC
 private static bool IzFadeIsEnd()
 {
     if (AppMain.iz_fade_tcb != null)
     {
         AppMain.IZS_FADE_WORK izs_FADE_WORK = (AppMain.IZS_FADE_WORK)AppMain.iz_fade_tcb.work;
         return(izs_FADE_WORK.count >= izs_FADE_WORK.time);
     }
     return(true);
 }
コード例 #3
0
ファイル: IzFade.cs プロジェクト: uwx/Sonic4Episode1
 private static bool IzFadeIsEnd()
 {
     if (AppMain.iz_fade_tcb == null)
     {
         return(true);
     }
     AppMain.IZS_FADE_WORK work = (AppMain.IZS_FADE_WORK)AppMain.iz_fade_tcb.work;
     return((double)work.count >= (double)work.time);
 }
コード例 #4
0
 // Token: 0x0600115C RID: 4444 RVA: 0x00098774 File Offset: 0x00096974
 private static void IzFadeExit()
 {
     if (AppMain.iz_fade_tcb != null)
     {
         AppMain.IZS_FADE_WORK izs_FADE_WORK = (AppMain.IZS_FADE_WORK)AppMain.iz_fade_tcb.work;
         AppMain.mtTaskChangeTcbProcedure(AppMain.iz_fade_tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.izFadeEndWaitMain));
         izs_FADE_WORK.count = 0f;
         AppMain.iz_fade_tcb = null;
     }
 }
コード例 #5
0
ファイル: IzFade.cs プロジェクト: uwx/Sonic4Episode1
 private static void izFadeEndWaitMain(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.IZS_FADE_WORK work = (AppMain.IZS_FADE_WORK)tcb.work;
     ++work.count;
     if ((double)work.count <= 1.0)
     {
         return;
     }
     AppMain.mtTaskClearTcb(tcb);
 }
コード例 #6
0
 // Token: 0x06001160 RID: 4448 RVA: 0x0009882A File Offset: 0x00096A2A
 private static void IzFadeSetStopUpdate1Frame(AppMain.IZS_FADE_WORK fade_work)
 {
     if (fade_work == null && AppMain.iz_fade_tcb != null)
     {
         fade_work = (AppMain.IZS_FADE_WORK)AppMain.iz_fade_tcb.work;
     }
     if (fade_work != null)
     {
         fade_work.flag |= 2U;
     }
 }
コード例 #7
0
ファイル: IzFade.cs プロジェクト: uwx/Sonic4Episode1
 private static void IzFadeExit()
 {
     if (AppMain.iz_fade_tcb == null)
     {
         return;
     }
     AppMain.IZS_FADE_WORK work = (AppMain.IZS_FADE_WORK)AppMain.iz_fade_tcb.work;
     AppMain.mtTaskChangeTcbProcedure(AppMain.iz_fade_tcb, new AppMain.GSF_TASK_PROCEDURE(AppMain.izFadeEndWaitMain));
     work.count          = 0.0f;
     AppMain.iz_fade_tcb = (AppMain.MTS_TASK_TCB)null;
 }
コード例 #8
0
 // Token: 0x06001163 RID: 4451 RVA: 0x00098CB4 File Offset: 0x00096EB4
 private static void IzFadeDraw(AppMain.IZS_FADE_WORK fade_work)
 {
     fade_work.prim_param.vtxPC2D = fade_work.vtx[( int )fade_work.vtx_no];
     AppMain.amDrawPrim2D(fade_work.draw_state, fade_work.prim_param);
     if ((fade_work.flag & 1U) != 0U)
     {
         AppMain.IZS_FADE_DT_WORK izs_FADE_DT_WORK = new AppMain.IZS_FADE_DT_WORK();
         izs_FADE_DT_WORK.draw_state = fade_work.draw_state;
         izs_FADE_DT_WORK.drawflag   = 0U;
         AppMain.amDrawMakeTask(new AppMain.TaskProc(AppMain.izFadeDrawStart_DT), fade_work.dt_prio, izs_FADE_DT_WORK);
     }
 }
コード例 #9
0
ファイル: IzFade.cs プロジェクト: uwx/Sonic4Episode1
 private static void IzFadeDraw(AppMain.IZS_FADE_WORK fade_work)
 {
     fade_work.prim_param.vtxPC2D = fade_work.vtx[(int)fade_work.vtx_no];
     AppMain.amDrawPrim2D(fade_work.draw_state, fade_work.prim_param);
     if (((int)fade_work.flag & 1) == 0)
     {
         return;
     }
     AppMain.amDrawMakeTask(new AppMain.TaskProc(AppMain.izFadeDrawStart_DT), fade_work.dt_prio, (object)new AppMain.IZS_FADE_DT_WORK()
     {
         draw_state = fade_work.draw_state,
         drawflag   = 0U
     });
 }
コード例 #10
0
ファイル: GmFade.cs プロジェクト: uwx/Sonic4Episode1
 private static void GmFadeSetFade(
     AppMain.GMS_FADE_OBJ_WORK fade_obj,
     uint fade_set_type,
     byte start_col_r,
     byte start_col_g,
     byte start_col_b,
     byte start_col_a,
     byte end_col_r,
     byte end_col_g,
     byte end_col_b,
     byte end_col_a,
     float time,
     int draw_start,
     int conti_state)
 {
     AppMain.IZS_FADE_WORK fadeWork = fade_obj.fade_work;
     AppMain.IzFadeSetWork(fadeWork, fadeWork.dt_prio, fadeWork.draw_state, fade_set_type, start_col_r, start_col_g, start_col_b, start_col_a, end_col_r, end_col_g, end_col_b, end_col_a, time, draw_start != 0, conti_state != 0);
 }
コード例 #11
0
    // Token: 0x06001162 RID: 4450 RVA: 0x00098ADC File Offset: 0x00096CDC
    private static void IzFadeUpdate(AppMain.IZS_FADE_WORK fade_work)
    {
        if ((fade_work.flag & 2U) != 0U)
        {
            fade_work.flag &= 4294967293U;
        }
        else
        {
            fade_work.count += fade_work.speed;
            if (fade_work.count > fade_work.time)
            {
                fade_work.count = fade_work.time;
            }
        }
        float num = fade_work.count / fade_work.time;

        fade_work.now_col.a = fade_work.start_col.a * (1f - num) + fade_work.end_col.a * num;
        fade_work.now_col.r = fade_work.start_col.r * (1f - num) + fade_work.end_col.r * num;
        fade_work.now_col.g = fade_work.start_col.g * (1f - num) + fade_work.end_col.g * num;
        fade_work.now_col.b = fade_work.start_col.b * (1f - num) + fade_work.end_col.b * num;
        byte r = (byte)AppMain.nnRoundOff(fade_work.now_col.r + 0.5f);
        byte g = (byte)AppMain.nnRoundOff(fade_work.now_col.g + 0.5f);
        byte b = (byte)AppMain.nnRoundOff(fade_work.now_col.b + 0.5f);
        byte a = (byte)AppMain.nnRoundOff(fade_work.now_col.a + 0.5f);

        fade_work.vtx_no += 1;
        if (fade_work.vtx_no >= 2)
        {
            fade_work.vtx_no = 0;
        }
        AppMain.ArrayPointer <AppMain.NNS_PRIM2D_PC> pointer = new AppMain.ArrayPointer <AppMain.NNS_PRIM2D_PC>(fade_work.vtx[(int)fade_work.vtx_no], 0);
        int i = 0;

        while (i < 4)
        {
            (~pointer).Col = AppMain.IZM_FADE_COL_PAC(( uint )r, ( uint )g, ( uint )b, ( uint )a);
            i++;
            pointer = ++pointer;
        }
    }
コード例 #12
0
ファイル: IzFade.cs プロジェクト: uwx/Sonic4Episode1
    private static void IzFadeUpdate(AppMain.IZS_FADE_WORK fade_work)
    {
        if (((int)fade_work.flag & 2) != 0)
        {
            fade_work.flag &= 4294967293U;
        }
        else
        {
            fade_work.count += fade_work.speed;
            if ((double)fade_work.count > (double)fade_work.time)
            {
                fade_work.count = fade_work.time;
            }
        }
        float num1 = fade_work.count / fade_work.time;

        fade_work.now_col.a = (float)((double)fade_work.start_col.a * (1.0 - (double)num1) + (double)fade_work.end_col.a * (double)num1);
        fade_work.now_col.r = (float)((double)fade_work.start_col.r * (1.0 - (double)num1) + (double)fade_work.end_col.r * (double)num1);
        fade_work.now_col.g = (float)((double)fade_work.start_col.g * (1.0 - (double)num1) + (double)fade_work.end_col.g * (double)num1);
        fade_work.now_col.b = (float)((double)fade_work.start_col.b * (1.0 - (double)num1) + (double)fade_work.end_col.b * (double)num1);
        byte num2 = (byte)AppMain.nnRoundOff(fade_work.now_col.r + 0.5f);
        byte num3 = (byte)AppMain.nnRoundOff(fade_work.now_col.g + 0.5f);
        byte num4 = (byte)AppMain.nnRoundOff(fade_work.now_col.b + 0.5f);
        byte num5 = (byte)AppMain.nnRoundOff(fade_work.now_col.a + 0.5f);

        ++fade_work.vtx_no;
        if (fade_work.vtx_no >= (ushort)2)
        {
            fade_work.vtx_no = (ushort)0;
        }
        AppMain.ArrayPointer <AppMain.NNS_PRIM2D_PC> arrayPointer = new AppMain.ArrayPointer <AppMain.NNS_PRIM2D_PC>(fade_work.vtx[(int)fade_work.vtx_no], 0);
        int num6 = 0;

        while (num6 < 4)
        {
            ((AppMain.NNS_PRIM2D_PC) ~arrayPointer).Col = AppMain.IZM_FADE_COL_PAC((uint)num2, (uint)num3, (uint)num4, (uint)num5);
            ++num6;
            ++arrayPointer;
        }
    }
コード例 #13
0
 // Token: 0x06001165 RID: 4453 RVA: 0x00098D28 File Offset: 0x00096F28
 private static void izFadeMain(AppMain.MTS_TASK_TCB tcb)
 {
     AppMain.IZS_FADE_WORK fade_work = (AppMain.IZS_FADE_WORK)tcb.work;
     AppMain.IzFadeUpdate(fade_work);
     AppMain.IzFadeDraw(fade_work);
 }
コード例 #14
0
    // Token: 0x06001161 RID: 4449 RVA: 0x00098858 File Offset: 0x00096A58
    private static void IzFadeSetWork(AppMain.IZS_FADE_WORK fade_work, ushort dt_prio, uint draw_state, uint fade_set_type, byte start_col_r, byte start_col_g, byte start_col_b, byte start_col_a, byte end_col_r, byte end_col_g, byte end_col_b, byte end_col_a, float time, bool draw_start, bool conti_state)
    {
        AppMain.NNS_RGBA start_col = default(AppMain.NNS_RGBA);
        ushort           vtx_no    = 1;

        if (!conti_state)
        {
            fade_work.Clear();
            start_col.r = ( float )start_col_r;
            start_col.g = ( float )start_col_g;
            start_col.b = ( float )start_col_b;
            start_col.a = ( float )start_col_a;
        }
        else if (fade_set_type == 1U)
        {
            start_col = fade_work.now_col;
            vtx_no    = fade_work.vtx_no;
        }
        else
        {
            start_col.r = ( float )start_col_r;
            start_col.g = ( float )start_col_g;
            start_col.b = ( float )start_col_b;
            start_col.a = ( float )start_col_a;
        }
        fade_work.count      = 0f;
        fade_work.start_col  = start_col;
        fade_work.end_col.r  = ( float )end_col_r;
        fade_work.end_col.g  = ( float )end_col_g;
        fade_work.end_col.b  = ( float )end_col_b;
        fade_work.end_col.a  = ( float )end_col_a;
        fade_work.now_col    = fade_work.start_col;
        fade_work.time       = time;
        fade_work.speed      = 1f;
        fade_work.dt_prio    = dt_prio;
        fade_work.draw_state = draw_state;
        fade_work.vtx_no     = vtx_no;
        AppMain.nnMakeUnitMatrix(fade_work.mtx);
        fade_work.flag &= 4294967294U;
        if (draw_start)
        {
            fade_work.flag |= 1U;
        }
        AppMain.AMS_PARAM_DRAW_PRIMITIVE prim_param = fade_work.prim_param;
        prim_param.vtxPC2D  = fade_work.vtx[( int )fade_work.vtx_no];
        prim_param.mtx      = fade_work.mtx;
        prim_param.format2D = 1;
        prim_param.type     = 1;
        prim_param.count    = 4;
        prim_param.texlist  = null;
        prim_param.texId    = -1;
        prim_param.ablend   = 1;
        prim_param.zOffset  = -1f;
        AppMain.amDrawGetPrimBlendParam(0, prim_param);
        prim_param.aTest = 0;
        prim_param.zMask = 1;
        prim_param.zTest = 0;
        for (int i = 0; i < 2; i++)
        {
            fade_work.vtx[i][0].Pos.x = 0f;
            fade_work.vtx[i][0].Pos.y = 0f;
            fade_work.vtx[i][1].Pos.x = 0f;
            fade_work.vtx[i][1].Pos.y = AppMain.AMD_SCREEN_HEIGHT;
            fade_work.vtx[i][2].Pos.x = AppMain.AMD_SCREEN_WIDTH;
            fade_work.vtx[i][2].Pos.y = 0f;
            fade_work.vtx[i][3].Pos.x = AppMain.AMD_SCREEN_WIDTH;
            fade_work.vtx[i][3].Pos.y = AppMain.AMD_SCREEN_HEIGHT;
        }
    }