Exemplo n.º 1
0
 private static void gmFixTimerPartProcDispMain(AppMain.GMS_FIX_PART_WORK part_work)
 {
     AppMain.GMS_FIX_PART_TIMER part_timer = (AppMain.GMS_FIX_PART_TIMER)part_work;
     if (((int)part_work.flag & 4) != 0)
     {
         AppMain.gmFixTimerPartSetDigitsRed(part_timer, true);
         if (AppMain.gmFixUpdateBlink(part_work))
         {
             part_work.flag &= 4294967287U;
         }
         else
         {
             part_work.flag |= 8U;
         }
     }
     else
     {
         AppMain.gmFixTimerPartSetDigitsRed(part_timer, false);
         part_work.flag &= 4294967287U;
     }
     if (((int)part_work.flag & 8) != 0)
     {
         AppMain.gmFixTimerPartSetDispDigits(part_timer, false);
     }
     else
     {
         AppMain.gmFixTimerPartSetDispDigits(part_timer, true);
     }
     AppMain.gmFixTimerPartUpdateActionDigitsType(part_timer);
 }
Exemplo n.º 2
0
 private static void gmFixTimerPartInitFlashAction(AppMain.GMS_FIX_PART_TIMER part_timer)
 {
     part_timer.flag           |= 2U;
     part_timer.fade_ratio      = 0.0f;
     part_timer.scale_ratio     = 0.0f;
     part_timer.flash_act_phase = 0U;
 }
Exemplo n.º 3
0
 private static void gmFixTimerSSPartInit(AppMain.GMS_FIX_MGR_WORK mgr_work)
 {
     AppMain.GMS_FIX_PART_WORK  partTimer1 = (AppMain.GMS_FIX_PART_WORK)mgr_work.part_timer;
     AppMain.GMS_FIX_PART_TIMER partTimer2 = mgr_work.part_timer;
     AppMain.gmFixRegisterPart(mgr_work, partTimer1, 2);
     partTimer1.proc_update = new AppMain.MPP_VOID_GMS_FIX_PART_WORK(AppMain.gmFixTimerPartProcUpdateMain);
     partTimer1.proc_disp   = new AppMain.MPP_VOID_GMS_FIX_PART_WORK(AppMain.gmFixTimerPartProcDispMain);
     partTimer2.flag       |= 1U;
     for (int index1 = 0; index1 < 8; ++index1)
     {
         AppMain.OBS_OBJECT_WORK     work             = AppMain.GMM_COCKPIT_CREATE_WORK((AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_COCKPIT_2D_WORK()), (AppMain.OBS_OBJECT_WORK)null, (ushort)0, "FIX_TIMER_SS");
         AppMain.GMS_COCKPIT_2D_WORK gmsCockpit2DWork = (AppMain.GMS_COCKPIT_2D_WORK)work;
         int index2;
         int index3;
         if (index1 == 0)
         {
             index2 = 2;
             index3 = 2;
         }
         else
         {
             index2 = 1;
             index3 = 1;
         }
         work.ppOut = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmFixSubpartOutFunc);
         AppMain.ObjObjectAction2dAMALoadSetTexlist(work, gmsCockpit2DWork.obj_2d, (AppMain.OBS_DATA_WORK)null, (string)null, AppMain.gm_fix_ama_amb_idx_tbl[AppMain.GsEnvGetLanguage()][index2], AppMain.GmGameDatGetCockpitData(), AppMain.AoTexGetTexList(AppMain.gm_fix_textures[index3]), (uint)AppMain.gm_fix_timer_ss_act_id_tbl[AppMain.GsEnvGetLanguage()][index1], 0);
         AppMain.gmFixSetFrameStatic(work, 0.0f);
         ((AppMain.GMS_FIX_PART_TIMER)partTimer1).sub_parts[index1] = (AppMain.GMS_COCKPIT_2D_WORK)work;
     }
 }
Exemplo n.º 4
0
 private static void gmFixTimerPartSetDigitsRed(AppMain.GMS_FIX_PART_TIMER part_timer, bool enable)
 {
     if (((int)part_timer.flag & 1) != 0)
     {
         AppMain.gmFixTimerPartSetTexRedDigits(part_timer, enable);
     }
     else
     {
         AppMain.gmFixTimerPartSetColorRedDigits(part_timer, enable);
     }
 }
Exemplo n.º 5
0
 private static void gmFixTimerPartUpdateActionDigitsType(AppMain.GMS_FIX_PART_TIMER part_timer)
 {
     for (int index = 0; index < 5; ++index)
     {
         AppMain.gmFixSetFrameStatic((AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[AppMain.gm_fix_part_timer_digit_subpart_idx_tbl[index]], AppMain.gm_fix_part_common_digit_type_frame_tbl[part_timer.digit_list[index]] + part_timer.digit_frame_ofst);
     }
     for (int index = 0; index < 2; ++index)
     {
         AppMain.gmFixSetFrameStatic((AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[AppMain.gm_fix_part_timer_deco_char_subpart_idx_tbl[index]], 0.0f + part_timer.deco_char_frame_ofst);
     }
 }
Exemplo n.º 6
0
 private static void gmFixTimerPartSetColorRedDigits(
     AppMain.GMS_FIX_PART_TIMER part_timer,
     bool enable)
 {
     for (int index = 0; index < 8; ++index)
     {
         AppMain.OBS_OBJECT_WORK subPart = (AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[index];
         if (index != 0)
         {
             subPart.obj_2d.color.c = !enable ? uint.MaxValue : 4278190335U;
         }
     }
 }
Exemplo n.º 7
0
 private static void gmFixTimerPartSetTexRedDigits(
     AppMain.GMS_FIX_PART_TIMER part_timer,
     bool enable)
 {
     if (enable)
     {
         part_timer.digit_frame_ofst     = 10f;
         part_timer.deco_char_frame_ofst = 1f;
     }
     else
     {
         part_timer.digit_frame_ofst     = 0.0f;
         part_timer.deco_char_frame_ofst = 0.0f;
     }
 }
Exemplo n.º 8
0
    private static void gmFixTimerPartUpdateDigitList(AppMain.GMS_FIX_PART_TIMER part_timer)
    {
        ushort msec = 0;
        ushort sec  = 0;
        ushort min  = 0;

        AppMain.AkUtilFrame60ToTime(AppMain.gmFixGetGameTime(), ref min, ref sec, ref msec);
        int _offset1 = 0;

        AppMain.AkUtilNumValueToDigits((int)msec, new AppMain.ArrayPointer <int>(part_timer.digit_list, _offset1), AppMain.digit_num_listgmFixTimerPartUpdateDigitList[0]);
        int _offset2 = _offset1 + AppMain.digit_num_listgmFixTimerPartUpdateDigitList[0];

        AppMain.AkUtilNumValueToDigits((int)sec, new AppMain.ArrayPointer <int>(part_timer.digit_list, _offset2), AppMain.digit_num_listgmFixTimerPartUpdateDigitList[1]);
        int _offset3 = _offset2 + AppMain.digit_num_listgmFixTimerPartUpdateDigitList[1];

        AppMain.AkUtilNumValueToDigits((int)min, new AppMain.ArrayPointer <int>(part_timer.digit_list, _offset3), AppMain.digit_num_listgmFixTimerPartUpdateDigitList[2]);
        int num = _offset3 + AppMain.digit_num_listgmFixTimerPartUpdateDigitList[2];
    }
Exemplo n.º 9
0
 private static void gmFixTimerPartSetDispDigits(
     AppMain.GMS_FIX_PART_TIMER part_timer,
     bool enable)
 {
     for (int index = 0; index < 8; ++index)
     {
         if (index != 0)
         {
             if (enable)
             {
                 ((AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[index]).disp_flag &= 4294967263U;
             }
             else
             {
                 ((AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[index]).disp_flag |= 32U;
             }
         }
     }
 }
Exemplo n.º 10
0
 private static void gmFixTimerPartProcUpdateMain(AppMain.GMS_FIX_PART_WORK part_work)
 {
     AppMain.GMS_FIX_PART_TIMER part_timer = (AppMain.GMS_FIX_PART_TIMER)part_work;
     AppMain.gmFixTimerPartUpdateDigitList(part_timer);
     if (AppMain.gmFixProcessRequest(part_work.parent_mgr, 1U))
     {
         AppMain.gmFixTimerPartInitFlashAction(part_timer);
     }
     else
     {
         AppMain.gmFixTimerPartUpdateFlashAction(part_timer);
     }
     if (AppMain.gmFixTimerPartIsTimeRunningOut(part_work.parent_mgr))
     {
         ushort?sec       = new ushort?((ushort)0);
         ushort?nullable1 = new ushort?();
         AppMain.AkUtilFrame60ToTime(AppMain.gmFixGetGameTime(), ref nullable1, ref sec, ref nullable1);
         if (((int)part_work.flag & 4) == 0)
         {
             part_work.flag |= 4U;
             AppMain.gmFixInitBlink(part_work, 10U, 10U);
             AppMain.GMS_FIX_PART_TIMER gmsFixPartTimer = part_timer;
             ushort?nullable2 = sec;
             int    num       = (int)(ushort)(nullable2.HasValue ? new int?((int)nullable2.GetValueOrDefault() - 1) : new int?()).Value;
             gmsFixPartTimer.cur_sec = (ushort)num;
         }
         int    curSec    = (int)part_timer.cur_sec;
         ushort?nullable3 = sec;
         if ((curSec != (int)nullable3.GetValueOrDefault() ? 1 : (!nullable3.HasValue ? 1 : 0)) == 0)
         {
             return;
         }
         part_timer.cur_sec = sec.Value;
         AppMain.GmSoundPlaySE("Countdown");
     }
     else
     {
         part_work.flag &= 4294967291U;
     }
 }
Exemplo n.º 11
0
 private static void gmFixTimerPartInit(AppMain.GMS_FIX_MGR_WORK mgr_work)
 {
     AppMain.GMS_FIX_PART_WORK  partTimer1 = (AppMain.GMS_FIX_PART_WORK)mgr_work.part_timer;
     AppMain.GMS_FIX_PART_TIMER partTimer2 = mgr_work.part_timer;
     AppMain.gmFixRegisterPart(mgr_work, partTimer1, 2);
     partTimer1.proc_update = new AppMain.MPP_VOID_GMS_FIX_PART_WORK(AppMain.gmFixTimerPartProcUpdateMain);
     partTimer1.proc_disp   = new AppMain.MPP_VOID_GMS_FIX_PART_WORK(AppMain.gmFixTimerPartProcDispMain);
     if (AppMain.gmFixIsTimeAttack())
     {
         AppMain.act_id_tblgmFixTimerPartInit = AppMain.gm_fix_timer_timeattack_act_id_tbl;
         partTimer2.flag |= 1U;
     }
     else
     {
         AppMain.act_id_tblgmFixTimerPartInit = AppMain.gm_fix_timer_act_id_tbl;
     }
     for (int index = 0; index < 8; ++index)
     {
         AppMain.OBS_OBJECT_WORK     work             = AppMain.GMM_COCKPIT_CREATE_WORK((AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_COCKPIT_2D_WORK()), (AppMain.OBS_OBJECT_WORK)null, (ushort)0, "FIX_TIMER");
         AppMain.GMS_COCKPIT_2D_WORK gmsCockpit2DWork = (AppMain.GMS_COCKPIT_2D_WORK)work;
         work.ppOut = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmFixSubpartOutFunc);
         AppMain.ObjObjectAction2dAMALoadSetTexlist(work, gmsCockpit2DWork.obj_2d, (AppMain.OBS_DATA_WORK)null, (string)null, AppMain.gm_fix_ama_amb_idx_tbl[AppMain.GsEnvGetLanguage()][0], AppMain.GmGameDatGetCockpitData(), AppMain.AoTexGetTexList(AppMain.gm_fix_textures[0]), (uint)AppMain.act_id_tblgmFixTimerPartInit[index], 0);
         AppMain.gmFixSetFrameStatic(work, 0.0f);
         if (AppMain.gmFixIsTimeAttack())
         {
             work.pos.x += AppMain.FX_F32_TO_FX32(-98f);
             if (index != 0)
             {
                 work.pos.y += AppMain.FX_F32_TO_FX32(5f);
             }
         }
         else if (index != 0)
         {
             work.pos.y += AppMain.FX_F32_TO_FX32(5f);
         }
         ((AppMain.GMS_FIX_PART_TIMER)partTimer1).sub_parts[index] = (AppMain.GMS_COCKPIT_2D_WORK)work;
     }
 }
Exemplo n.º 12
0
    private static void gmFixTimerPartUpdateFlashAction(AppMain.GMS_FIX_PART_TIMER part_timer)
    {
        bool flag = false;

        if (((int)part_timer.flag & 2) == 0)
        {
            return;
        }
        switch (part_timer.flash_act_phase)
        {
        case 0:
            part_timer.fade_ratio  += 0.5f;
            part_timer.scale_ratio += 0.25f;
            part_timer.fade_ratio   = AppMain.MTM_MATH_CLIP(part_timer.fade_ratio, 0.0f, 1f);
            part_timer.scale_ratio  = AppMain.MTM_MATH_CLIP(part_timer.fade_ratio, 0.0f, 1f);
            if ((double)part_timer.scale_ratio >= 1.0)
            {
                ++part_timer.flash_act_phase;
                break;
            }
            break;

        case 1:
            part_timer.fade_ratio  -= 0.02f;
            part_timer.scale_ratio -= 0.05f;
            part_timer.fade_ratio   = AppMain.MTM_MATH_CLIP(part_timer.fade_ratio, 0.0f, 1f);
            part_timer.scale_ratio  = AppMain.MTM_MATH_CLIP(part_timer.scale_ratio, 0.0f, 1f);
            if ((double)part_timer.fade_ratio <= 0.0)
            {
                ++part_timer.flash_act_phase;
                break;
            }
            break;

        default:
            flag = true;
            break;
        }
        uint[] numArray = new uint[7]
        {
            1U,
            2U,
            3U,
            4U,
            5U,
            6U,
            7U
        };
        uint length = (uint)numArray.Length;

        if (!flag)
        {
            int  num1 = 4096 + (int)((double)part_timer.scale_ratio * 2048.0);
            byte num2 = (byte)AppMain.MTM_MATH_CLIP((float)byte.MaxValue * part_timer.fade_ratio, 0.0f, (float)byte.MaxValue);
            for (uint index = 0; index < length; ++index)
            {
                AppMain.OBS_OBJECT_WORK subPart = (AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[(int)numArray[(int)index]];
                subPart.scale.x       = subPart.scale.y = num1;
                subPart.obj_2d.fade.b = subPart.obj_2d.fade.g = subPart.obj_2d.fade.r = byte.MaxValue;
                subPart.obj_2d.fade.a = num2;
            }
        }
        else
        {
            part_timer.fade_ratio      = 0.0f;
            part_timer.scale_ratio     = 0.0f;
            part_timer.flash_act_phase = 0U;
            for (uint index = 0; index < length; ++index)
            {
                AppMain.OBS_OBJECT_WORK subPart = (AppMain.OBS_OBJECT_WORK)part_timer.sub_parts[(int)numArray[(int)index]];
                subPart.scale.x       = subPart.scale.y = 4096;
                subPart.obj_2d.fade.a = subPart.obj_2d.fade.b = subPart.obj_2d.fade.g = subPart.obj_2d.fade.r = (byte)0;
            }
            part_timer.flag &= 4294967293U;
        }
    }