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
 public void ClearData()
 {
     LP.Clear();
     SP.Clear();
     LDicDuplication.Clear();
     SDicDuplication.Clear();
     LSpecial.Clear();
     SSpecial.Clear();
     _Same.Clear();
 }
Ejemplo n.º 3
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.º 4
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.º 5
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.º 6
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.º 7
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.º 8
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.º 9
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);
    }
Ejemplo n.º 11
0
        private void CompareTable(ExcelSheetTable S, ExcelSheetTable L)
        {
            if (!CompareListString(S.Titles.Select(r => r.Text).ToList(), L.Titles.Select(r => r.Text).ToList()))
            {
                textBoxOut.Text = "两张表的表头不一致,无法比较";
                return;
            }
            ClearData();
            string        str = "", strL = "", strS = "", strLS = "";
            StringBuilder strb = new StringBuilder();
            StringBuilder strT = new StringBuilder();
            Dictionary <string, Cells> LDic = ListToDictionary(L.Names, ref strL);
            Dictionary <string, Cells> SDic = ListToDictionary(S.Names, ref strS);

            Dictionary <string, Cells> LDicSpecial = new Dictionary <string, Cells>();
            Dictionary <string, Cells> SDicSpecial = new Dictionary <string, Cells>();

            /////////////////////////////////////////////////////  Duplication
            if (checkBoxCopyDuplicationL.Checked)
            {
                LDicDuplication = FindDuplication(L.Names);
            }
            if (checkBoxCopyDuplicationS.Checked)
            {
                SDicDuplication = FindDuplication(S.Names);
            }
            if (strS != "")
            {
                str += "\r\n============小表中以下值存在重复============\r\n" + strS;
            }
            if (strL != "")
            {
                str += "\r\n============大表中以下值存在重复============\r\n" + strL;
            }

            foreach (Cells c in S.Names)
            {
                if (!LDic.ContainsKey(c.Text))
                {
                    strLS += c + "\t";
                }
            }

            ////////////////////////////////////////////////  Special
            if (checkBoxTagS.Checked || checkBoxSkipDuplicate.Checked)  //排除重复
            {
                foreach (Cells c in S.Names)
                {
                    if (!LDic.ContainsKey(c.Text) && !SDicDuplication.ContainsKey(c.Text))
                    {
                        SSpecial.Add(new Point(c.Row, c.Col));
                        if (!SDicSpecial.ContainsKey(c.Text))
                        {
                            SDicSpecial[c.Text] = c;
                        }
                    }
                }
            }
            if (checkBoxTagL.Checked || checkBoxSkipDuplicate.Checked)
            {
                foreach (Cells c in L.Names)
                {
                    if (!SDic.ContainsKey(c.Text) && !LDicDuplication.ContainsKey(c.Text))
                    {
                        LSpecial.Add(new Point(c.Row, c.Col));
                        if (!LDicSpecial.ContainsKey(c.Text))
                        {
                            LDicSpecial[c.Text] = c;
                        }
                    }
                }
            }
            if (strLS != "")
            {
                strLS = "\r\n============小表中的以下值在大表中不存在============\r\n" + strLS;
            }
            if (str != "")
            {
                textBoxOut.Text = str + strLS;
                if (!checkBoxSkipDuplicate.Checked)
                {
                    MessageBox.Show("存在重复值,没有进一步比对,可选择忽略之后,继续比对");
                    return;
                }
            }
            ///////////////////////// DIF
            SP    = new List <Point>();
            LP    = new List <Point>();
            _Same = new List <List <Cells> >();
            foreach (Cells c1 in S.Names)
            {
                if (str != "" &&
                    (SDicDuplication.ContainsKey(c1.Text) ||
                     SDicSpecial.ContainsKey(c1.Text)))
                {
                    continue;
                }
                Cells c2 = LDic[c1.Text];
                for (int col = 1; col < S.ColCount - 1; col++)
                {
                    if (S.CellValue(c1.Row, S.NameCol + col) != L.CellValue(c2.Row, L.NameCol + col))
                    {
                        SP.Add(new Point(c1.Row, S.NameCol + col));
                        LP.Add(new Point(c2.Row, L.NameCol + col));
                        strb.AppendLine(c1.Text + " " + PointTostring(new Point(c1.Row, col)) + "=" + S.CellValue(c1.Row, S.NameCol + col) + "\t"
                                        + PointTostring(new Point(c2.Row, col)) + "=" + L.CellValue(c2.Row, L.NameCol + col));
                    }
                }
                _Same.Add(new List <Cells>()
                {
                    c1, c2
                });
            }
            string str1 = strb.ToString();

            if (str1 == "")
            {
                MessageBox.Show("除忽略项外,待比较项目完全相同");
            }
            else
            {
                str1 = "\r\n============以下单元格内容两表不一致 (行号,列号)============\r\n" + str1;
            }
            textBoxOut.Text = str + strLS + str1;
        }