Ejemplo n.º 1
0
 // Token: 0x06000D20 RID: 3360 RVA: 0x00074E00 File Offset: 0x00073000
 private static bool GsMainSysIsStageTimeUploadOnce(int stage_id)
 {
     if (stage_id >= 21)
     {
         uint     index    = (uint)(stage_id - 21);
         SSpecial sspecial = SSpecial.CreateInstance();
         if (sspecial[(int)index].IsTimeUploadedOnce())
         {
             return(true);
         }
     }
     else
     {
         SStage sstage = SStage.CreateInstance();
         uint   index;
         if (stage_id >= 16)
         {
             index = 16U;
         }
         else
         {
             index = (uint)stage_id;
         }
         if (sstage[(int)index].IsTimeUploadedOnce())
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 2
0
    // Token: 0x06001AFB RID: 6907 RVA: 0x000F5504 File Offset: 0x000F3704
    private static OBS_OBJECT_WORK GmGmkSsEmeraldInit(AppMain.GMS_EVE_RECORD_EVENT eve_rec, int pos_x, int pos_y,
                                                      byte type)
    {
        bool            flag            = false;
        OBS_OBJECT_WORK obs_OBJECT_WORK = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y,
                                                                        () => new AppMain.GMS_ENEMY_3D_WORK(), "GMK_SS_EMERALD");

        AppMain.GMS_ENEMY_3D_WORK gms_ENEMY_3D_WORK = (AppMain.GMS_ENEMY_3D_WORK)obs_OBJECT_WORK;
        obs_OBJECT_WORK.view_out_ofst -= 128;
        ushort   num      = (ushort)(AppMain.g_gs_main_sys_info.stage_id - 21);
        SSpecial sspecial = SSpecial.CreateInstance();

        if (sspecial[(int)num].IsGetEmerald())
        {
            flag = true;
            AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_ss_1up_obj_3d_list[0],
                                                 gms_ENEMY_3D_WORK.obj_3d);
        }
        else
        {
            AppMain.ObjObjectCopyAction3dNNModel(obs_OBJECT_WORK, AppMain.gm_gmk_ss_emerald_obj_3d_list[(int)num],
                                                 gms_ENEMY_3D_WORK.obj_3d);
            AppMain.ObjObjectAction3dNNMotionLoad(obs_OBJECT_WORK, 0, false, AppMain.ObjDataGet(912), null, 0, null);
            AppMain.ObjDrawObjectActionSet(obs_OBJECT_WORK, (int)num);
        }

        obs_OBJECT_WORK.pos.z                        = -131072;
        obs_OBJECT_WORK.move_flag                   |= 8448U;
        obs_OBJECT_WORK.disp_flag                   |= 4194308U;
        obs_OBJECT_WORK.obj_3d.use_light_flag       &= 4294967294U;
        obs_OBJECT_WORK.obj_3d.use_light_flag       |= 2U;
        obs_OBJECT_WORK.ppFunc                       = AppMain.gmGmkSsEmeraldMain;
        gms_ENEMY_3D_WORK.ene_com.rect_work[0].flag &= 4294967291U;
        AppMain.OBS_RECT_WORK obs_RECT_WORK = gms_ENEMY_3D_WORK.ene_com.rect_work[2];
        obs_RECT_WORK.ppDef = AppMain.gmGmkSsEmeraldDefFunc;
        AppMain.ObjRectDefSet(obs_RECT_WORK, 65534, 0);
        AppMain.ObjRectWorkSet(obs_RECT_WORK, -4, -4, 4, 4);
        int efct_zone_idx;

        if (flag)
        {
            efct_zone_idx = 0;
        }
        else
        {
            efct_zone_idx = (int)(1 + num);
        }

        AppMain.gm_gmk_ss_emerald_effct = AppMain.GmEfctZoneEsCreate(obs_OBJECT_WORK, 5, efct_zone_idx);
        return(obs_OBJECT_WORK);
    }
Ejemplo n.º 3
0
    // Token: 0x06000D21 RID: 3361 RVA: 0x00074E54 File Offset: 0x00073054
    private static bool GsMainSysIsSpecialStageClearedAct(int stage_id)
    {
        SSpecial sspecial = SSpecial.CreateInstance();

        for (int i = 0; i < 7; i++)
        {
            int num = (int)AppMain.gs_main_eme_get_act_no_tbl[(int)sspecial[i].GetEmeraldStage()];
            if (stage_id == num)
            {
                return(true);
            }
        }
        return(false);
    }
Ejemplo n.º 4
0
    private static bool GsMainSysIsSpecialStageClearedAct(int stage_id)
    {
        SSpecial instance = SSpecial.CreateInstance();

        for (int index = 0; index < 7; ++index)
        {
            int num = (int)AppMain.gs_main_eme_get_act_no_tbl[(int)instance[index].GetEmeraldStage()];
            if (stage_id == num)
            {
                return(true);
            }
        }
        return(false);
    }
Ejemplo n.º 5
0
 private static bool GsMainSysIsStageTimeUploadOnce(int stage_id)
 {
     if (stage_id >= 21)
     {
         if (SSpecial.CreateInstance()[stage_id - 21].IsTimeUploadedOnce())
         {
             return(true);
         }
     }
     else if (SStage.CreateInstance()[stage_id < 16 ? stage_id : 16].IsTimeUploadedOnce())
     {
         return(true);
     }
     return(false);
 }
Ejemplo n.º 6
0
 // Token: 0x06000D1C RID: 3356 RVA: 0x00074C54 File Offset: 0x00072E54
 private static bool GsMainSysIsStageSonicClear(int stage_id)
 {
     if (stage_id >= 21)
     {
         uint     index    = (uint)(stage_id - 21);
         SSpecial sspecial = SSpecial.CreateInstance();
         if (sspecial[(int)index].GetHighScore() != 1000000000U && sspecial[(int)index].IsGetEmerald())
         {
             return(true);
         }
         if (sspecial[(int)index].GetFastTime() != 36000U)
         {
             return(true);
         }
     }
     else
     {
         SStage sstage = SStage.CreateInstance();
         uint   index;
         if (stage_id >= 16)
         {
             index = 16U;
         }
         else
         {
             index = (uint)stage_id;
         }
         if (sstage[(int)index].GetHighScore(false) != 1000000000U)
         {
             return(true);
         }
         if (sstage[(int)index].GetHighScore(true) != 1000000000U)
         {
             return(true);
         }
         if (sstage[(int)index].GetFastTime(false) != 36000U)
         {
             return(true);
         }
         if (sstage[(int)index].GetFastTime(true) != 36000U)
         {
             return(true);
         }
     }
     return(false);
 }
Ejemplo n.º 7
0
    private static AppMain.OBS_OBJECT_WORK GmGmkSsEmeraldInit(
        AppMain.GMS_EVE_RECORD_EVENT eve_rec,
        int pos_x,
        int pos_y,
        byte type)
    {
        bool flag = false;

        AppMain.OBS_OBJECT_WORK   work           = AppMain.GMM_ENEMY_CREATE_WORK(eve_rec, pos_x, pos_y, (AppMain.TaskWorkFactoryDelegate)(() => (object)new AppMain.GMS_ENEMY_3D_WORK()), "GMK_SS_EMERALD");
        AppMain.GMS_ENEMY_3D_WORK gmsEnemy3DWork = (AppMain.GMS_ENEMY_3D_WORK)work;
        work.view_out_ofst -= (short)128;
        ushort num = (ushort)((uint)AppMain.g_gs_main_sys_info.stage_id - 21U);

        if (SSpecial.CreateInstance()[(int)num].IsGetEmerald())
        {
            flag = true;
            AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_gmk_ss_1up_obj_3d_list[0], gmsEnemy3DWork.obj_3d);
        }
        else
        {
            AppMain.ObjObjectCopyAction3dNNModel(work, AppMain.gm_gmk_ss_emerald_obj_3d_list[(int)num], gmsEnemy3DWork.obj_3d);
            AppMain.ObjObjectAction3dNNMotionLoad(work, 0, false, AppMain.ObjDataGet(912), (string)null, 0, (AppMain.AMS_AMB_HEADER)null);
            AppMain.ObjDrawObjectActionSet(work, (int)num);
        }
        work.pos.z                  = -131072;
        work.move_flag             |= 8448U;
        work.disp_flag             |= 4194308U;
        work.obj_3d.use_light_flag &= 4294967294U;
        work.obj_3d.use_light_flag |= 2U;
        work.ppFunc                 = new AppMain.MPP_VOID_OBS_OBJECT_WORK(AppMain.gmGmkSsEmeraldMain);
        gmsEnemy3DWork.ene_com.rect_work[0].flag &= 4294967291U;
        AppMain.OBS_RECT_WORK pRec = gmsEnemy3DWork.ene_com.rect_work[2];
        pRec.ppDef = new AppMain.OBS_RECT_WORK_Delegate1(AppMain.gmGmkSsEmeraldDefFunc);
        AppMain.ObjRectDefSet(pRec, (ushort)65534, (short)0);
        AppMain.ObjRectWorkSet(pRec, (short)-4, (short)-4, (short)4, (short)4);
        int efct_zone_idx = !flag ? 1 + (int)num : 0;

        AppMain.gm_gmk_ss_emerald_effct = AppMain.GmEfctZoneEsCreate(work, 5, efct_zone_idx);
        return(work);
    }
Ejemplo n.º 8
0
 private static bool GsMainSysIsStageClear(int stage_id)
 {
     if (stage_id >= 21)
     {
         uint     num      = (uint)(stage_id - 21);
         SSpecial instance = SSpecial.CreateInstance();
         if (instance[(int)num].GetHighScore() != 0 && instance[(int)num].IsGetEmerald() || instance[(int)num].GetFastTime() != 0)
         {
             return(true);
         }
     }
     else
     {
         SStage instance = SStage.CreateInstance();
         uint   num      = stage_id < 16 ? (uint)stage_id : 16U;
         if (instance[(int)num].GetHighScore(false) != 0 || instance[(int)num].GetHighScore(true) != 0 || (instance[(int)num].GetFastTime(false) != 0 || instance[(int)num].GetFastTime(true) != 0))
         {
             return(true);
         }
     }
     return(false);
 }
    // Token: 0x060009DA RID: 2522 RVA: 0x000579E8 File Offset: 0x00055BE8
    private static bool dmCmnBackupMathCompare()
    {
        AppMain.GSS_MAIN_SYS_INFO gss_MAIN_SYS_INFO = AppMain.GsGetMainSysInfo();
        if (gss_MAIN_SYS_INFO.is_save_run == 0U)
        {
            return(true);
        }
        SSystem  ssystem  = SSystem.CreateInstance();
        SStage   sstage   = SStage.CreateInstance();
        SSpecial sspecial = SSpecial.CreateInstance();
        SOption  soption  = SOption.CreateInstance();
        SSystem  system   = gss_MAIN_SYS_INFO.cmp_backup.GetSystem();
        SStage   sstage2  = gss_MAIN_SYS_INFO.cmp_backup.GetStage();
        SSpecial special  = gss_MAIN_SYS_INFO.cmp_backup.GetSpecial();
        SOption  option   = gss_MAIN_SYS_INFO.cmp_backup.GetOption();

        if (ssystem.GetPlayerStock() != system.GetPlayerStock())
        {
            return(false);
        }
        if (ssystem.GetKilled() != system.GetKilled())
        {
            return(false);
        }
        if (ssystem.GetClearCount() != system.GetClearCount())
        {
            return(false);
        }
        for (int i = 0; i < 7; i++)
        {
            SSystem.EAnnounce index = (SSystem.EAnnounce)i;
            if (ssystem.IsAnnounce(index) != system.IsAnnounce(index))
            {
                return(false);
            }
        }
        return(AppMain.memcmp(sstage2.getData(), sstage.getData()) == 0 && AppMain.memcmp(special.getData(), sspecial.getData()) == 0 && AppMain.memcmp(option.getData(), soption.getData()) == 0);
    }