Beispiel #1
0
    private static void gmMainPre(AppMain.MTS_TASK_TCB tcb)
    {
        AppMain.gmMainUpdateSuspendedPause();
        AppMain.GMS_MAIN_SYSTEM gGmMainSystem = AppMain.g_gm_main_system;
        if (((int)gGmMainSystem.game_flag & 134217728) != 0)
        {
            AppMain.g_gm_main_system.game_flag &= 4160749567U;
            if (AppMain.g_gs_main_sys_info.stage_id != (ushort)28 && ((int)AppMain.g_gm_main_system.game_flag & 524288) == 0)
            {
                AppMain.GmSoundPlayStageBGM(0);
            }
        }
        CPadVirtualPad.CreateInstance().Update();
        AppMain.CPadPolarHandle instance = AppMain.CPadPolarHandle.CreateInstance();
        instance.Update();
        int polarNow = gGmMainSystem.polar_now;

        gGmMainSystem.polar_now  = instance.GetAngle32Value();
        gGmMainSystem.polar_diff = gGmMainSystem.polar_now - polarNow;
        if (!AppMain.gmMainIsUseWaitUpCamera())
        {
            return;
        }
        if (AppMain.GmPlayerIsStateWait(gGmMainSystem.ply_work[0]))
        {
            if (gGmMainSystem.camscale_state == AppMain.GME_MAIN_CAMSCALE_STATE.GMD_MAIN_CAMSCALE_STATE_NON)
            {
                gGmMainSystem.camscale_state = AppMain.GME_MAIN_CAMSCALE_STATE.GMD_MAIN_CAMSCALE_STATE_ZOOM;
            }
        }
        else
        {
            gGmMainSystem.camscale_state = AppMain.GME_MAIN_CAMSCALE_STATE.GMD_MAIN_CAMSCALE_STATE_NON;
            gGmMainSystem.camera_scale   = 0.6743833f;
        }
        if (gGmMainSystem.camscale_state == AppMain.GME_MAIN_CAMSCALE_STATE.GMD_MAIN_CAMSCALE_STATE_ZOOM)
        {
            gGmMainSystem.camera_scale -= 0.01f;
            if ((double)gGmMainSystem.camera_scale < 0.337191671133041)
            {
                gGmMainSystem.camera_scale   = 0.3371917f;
                gGmMainSystem.camscale_state = AppMain.GME_MAIN_CAMSCALE_STATE.GMD_MAIN_CAMSCALE_STATE_UP;
            }
        }
        for (int cam_id = 0; cam_id < 7; ++cam_id)
        {
            AppMain.OBS_CAMERA obsCamera = AppMain.ObjCameraGet(cam_id);
            if (obsCamera != null)
            {
                obsCamera.scale = gGmMainSystem.camera_scale;
            }
        }
    }
Beispiel #2
0
    private static void gmMainGameStart()
    {
        bool flag = false;

        if (SaveState.shouldResume())
        {
            SaveState.resumePlayerState();
            SaveState.resumeMapData();
        }
        AppMain.amIPhoneTouchCanceled();
        CPadVirtualPad.CreateInstance().Create(new float[4]
        {
            -120f,
            166f,
            232f,
            318f
        });
        AppMain.CPadPolarHandle instance = AppMain.CPadPolarHandle.CreateInstance();
        if (AppMain.g_gs_main_sys_info.stage_id == (ushort)9)
        {
            instance.Create(0.0f, 0.0f, (float)((double)AppMain.AMD_SCREEN_2D_WIDTH * 4.0 / 5.0), AppMain.AMD_SCREEN_2D_HEIGHT);
        }
        else
        {
            instance.Create();
        }
        instance.SetValue(0.0f);
        AppMain.g_gm_main_system.polar_now  = 0;
        AppMain.g_gm_main_system.polar_diff = 0;
        if (((int)AppMain.GsGetMainSysInfo().game_flag & 1) == 0)
        {
            AppMain.GsMainSysSetSleepFlag(false);
            AppMain.GsMainSysSetAccelFlag(true);
        }
        else if (((int)AppMain.GsGetMainSysInfo().game_flag & 512) == 0 && (AppMain.GsGetMainSysInfo().stage_id == (ushort)9 || AppMain.GSM_MAIN_STAGE_IS_SPSTAGE()))
        {
            AppMain.GsMainSysSetSleepFlag(false);
            AppMain.GsMainSysSetAccelFlag(true);
        }
        else
        {
            AppMain.GsMainSysSetSleepFlag(true);
            AppMain.GsMainSysSetAccelFlag(false);
        }
        AppMain.GmPadVibInit();
        if (((int)AppMain.g_gm_main_system.game_flag & 512) != 0)
        {
            AppMain.g_gm_main_system.game_time = 0U;
            flag = true;
        }
        AppMain.g_gm_main_system.game_flag          &= 4187479041U;
        AppMain.g_gm_main_system.die_event_wait_time = 0;
        AppMain.g_gm_main_system.pseudofall_dir      = (ushort)0;
        AppMain.g_gm_main_system.boss_load_no        = -1;
        AppMain.g_gm_main_system.pre_tcb             = AppMain.MTM_TASK_MAKE_TCB(new AppMain.GSF_TASK_PROCEDURE(AppMain.gmMainPre), (AppMain.GSF_TASK_PROCEDURE)null, 0U, (ushort)0, 4096U, 5, (AppMain.TaskWorkFactoryDelegate)null, "GM_MAIN_PRE");
        AppMain.g_gm_main_system.post_tcb            = AppMain.MTM_TASK_MAKE_TCB(new AppMain.GSF_TASK_PROCEDURE(AppMain.gmMainPost), (AppMain.GSF_TASK_PROCEDURE)null, 0U, (ushort)0, 32768U, 5, (AppMain.TaskWorkFactoryDelegate)null, "GM_MAIN_POST");
        AppMain.g_obj.flag             = 4194408U;
        AppMain.g_obj.ppPre            = new AppMain.OBJECT_Delegate(AppMain.GmObjPreFunc);
        AppMain.g_obj.ppPost           = (AppMain.OBJECT_Delegate)null;
        AppMain.g_obj.ppCollision      = new AppMain.OBJECT_WORK_Delegate(AppMain.GmObjCollision);
        AppMain.g_obj.ppObjPre         = new AppMain.OBJECT_WORK_Delegate(AppMain.GmObjObjPreFunc);
        AppMain.g_obj.ppObjPost        = new AppMain.OBJECT_WORK_Delegate(AppMain.GmObjObjPostFunc);
        AppMain.g_obj.ppRegRecAuto     = new AppMain.OBJECT_WORK_Delegate(AppMain.GmObjRegistRectAuto);
        AppMain.g_obj.draw_scale.x     = AppMain.g_obj.draw_scale.y = AppMain.g_obj.draw_scale.z = 13107;
        AppMain.g_obj.inv_draw_scale.x = AppMain.g_obj.inv_draw_scale.y = AppMain.g_obj.inv_draw_scale.z = AppMain.FX_Div(4096, AppMain.g_obj.draw_scale.x);
        AppMain.g_obj.depth            = 128;
        AppMain.ObjDebugRectActionInit();
        AppMain.gmMainInitLight();
        if (((int)AppMain.g_gs_main_sys_info.game_flag & 4) != 0)
        {
            AppMain.g_gm_main_system.game_time = AppMain.g_gm_main_system.time_save;
            if (AppMain.g_gm_main_system.marker_pri == 0U)
            {
                AppMain.g_gm_main_system.ply_dmg_count = 0U;
                AppMain.g_gm_main_system.game_flag    &= 4227858431U;
            }
            else
            {
                AppMain.g_gm_main_system.game_flag |= 67108864U;
                if (flag)
                {
                    AppMain.g_gs_main_sys_info.game_flag |= 256U;
                }
            }
        }
        AppMain.GmMapInit();
        AppMain.GmTvxInit();
        AppMain.GmMapFarInit();
        AppMain.GmDecoInit();
        AppMain.GmWaterSurfaceInit();
        AppMain.GmPlyEfctTrailSysInit();
        AppMain.GmFixInit();
        AppMain.GmCameraInit();
        AppMain.GmSoundInit();
        AppMain.GmRingInit();
        AppMain.GmEventMgrInit();
        AppMain.GmEventMgrStart();
        for (int index = 0; index < 1; ++index)
        {
            if (AppMain.g_gs_main_sys_info.char_id[index] != (int)short.MaxValue)
            {
                AppMain.g_gm_main_system.ply_work[index] = AppMain.GmPlayerInit(AppMain.g_gs_main_sys_info.char_id[index], (ushort)0, (ushort)index, (ushort)0);
            }
        }
        AppMain.GmEveMgrCreateStateEvent();
        if (((int)AppMain.g_gs_main_sys_info.game_flag & 4) != 0 && AppMain.g_gm_main_system.marker_pri > 0U)
        {
            SaveState.saveCurrentState(0);
        }
        if (AppMain.g_gs_main_sys_info.stage_id != (ushort)28)
        {
            AppMain.g_gm_main_system.game_flag |= 268435456U;
            AppMain.g_gm_main_system.game_flag &= 4160749567U;
        }
        AppMain.g_gm_main_system.game_flag &= 4294964223U;
        AppMain.g_gm_main_system.game_flag |= 2048U;
        if (AppMain.GSM_MAIN_STAGE_IS_SPSTAGE())
        {
            AppMain.GmSplStageStart();
        }
        else if (AppMain.g_gs_main_sys_info.game_mode == 2)
        {
            AppMain.GmEndingStart();
        }
        else
        {
            AppMain.GmStartDemoStart();
        }
    }