Esempio n. 1
0
        //全データの取得
        public static void MakeAllDataLength(List <Address> list)
        {
            InputFormRef InputFormRef = Init(null);

            FEBuilderGBA.Address.AddAddress(list, InputFormRef, "MapExit", new uint[] { 0 });

            uint mapmax = MapSettingForm.GetDataCount();

            for (uint mapid = 0; mapid < mapmax; mapid++)
            {
                uint exit_addr = InputFormRef.IDToAddr(mapid);
                if (exit_addr == U.NOT_FOUND)
                {
                    continue;
                }

                {
                    uint a = Program.ROM.p32(exit_addr);
                    if (a == U.NOT_FOUND)
                    {
                        continue;
                    }

                    InputFormRef N_InputFormRef = N_Init(null);
                    N_InputFormRef.ReInitPointer(exit_addr);

                    string name = "MapExit map:" + U.To0xHexString(mapid);
                    FEBuilderGBA.Address.AddAddress(list, N_InputFormRef, name, new uint[] {  });
                }
            }

            //NPC離脱
            InputFormRef.ReInit(
                Program.ROM.p32(Program.ROM.RomInfo.map_exit_point_pointer) + (4 * Program.ROM.RomInfo.map_exit_point_npc_blockadd));
            FEBuilderGBA.Address.AddAddressButIgnorePointer(list, InputFormRef, "MapExit NPC", new uint[] { 0 });

            mapmax = MapSettingForm.GetDataCount();
            for (uint mapid = 0; mapid < mapmax; mapid++)
            {
                uint exit_addr = InputFormRef.IDToAddr(mapid);
                if (exit_addr == U.NOT_FOUND)
                {
                    continue;
                }

                {
                    uint a = Program.ROM.p32(exit_addr);
                    if (a == U.NOT_FOUND)
                    {
                        continue;
                    }

                    InputFormRef N_InputFormRef = N_Init(null);
                    N_InputFormRef.ReInitPointer(exit_addr);

                    string name = "MapExit map:" + U.To0xHexString(mapid) + " NPC";
                    FEBuilderGBA.Address.AddAddress(list, N_InputFormRef, name, new uint[] {  });
                }
            }
        }
Esempio n. 2
0
        //FELintスキャン(スレッドで実行する)
        void ScanFELintByThread(List <DisassemblerTrumb.LDRPointer> ldrmap)
        {
            Dictionary <uint, List <FELint.ErrorSt> > newFELintCache = new Dictionary <uint, List <FELint.ErrorSt> >();
            //システム全体の問題
            {
                List <FELint.ErrorSt> errorList = FELint.ScanMAP(FELint.SYSTEM_MAP_ID, ldrmap);
                errorList = FELint.HiddenErrorFilter(errorList);
                newFELintCache[FELint.SYSTEM_MAP_ID] = errorList;
            }

            uint mapCount = MapSettingForm.GetDataCount();

            for (int i = 0; i < mapCount; i++)
            {
                if (IsStopFlag)
                {
                    return;
                }

                uint mapid = (uint)i;

                //このマップのエラースキャン
                List <FELint.ErrorSt> errorList = FELint.ScanMAP(mapid, ldrmap);
                errorList             = FELint.HiddenErrorFilter(errorList);
                newFELintCache[mapid] = errorList;
            }
            UpdateFELintCache(newFELintCache);
        }
        static List <U.AddrResult> MakeTileAnimation2()
        {
            Dictionary <uint, bool> alreadFound = new Dictionary <uint, bool>();
            List <U.AddrResult>     ret_list    = new List <U.AddrResult>();
            uint mapmax = MapSettingForm.GetDataCount();

            for (uint i = 0; i < mapmax; i++)
            {
                MapSettingForm.PLists plist = MapSettingForm.GetMapPListsWhereMapID(i);
                if (plist.anime2_plist == 0)
                {
                    continue;
                }
                if (alreadFound.ContainsKey(plist.anime2_plist))
                {
                    continue;
                }

                uint   addr = MapPointerForm.PlistToOffsetAddr(MapPointerForm.PLIST_TYPE.ANIMATION2, plist.anime2_plist);
                string name = R._("タイルアニメーション2 パレットアニメ:{0}", U.ToHexString(plist.anime2_plist));
                if (addr == U.NOT_FOUND)
                {
                    name += R._("(破損)");
                }
                U.AddrResult ar = new U.AddrResult(addr, name, plist.anime2_plist);
                ret_list.Add(ar);

                alreadFound[plist.anime2_plist] = true;
            }
            return(ret_list);
        }
        private void FilterComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            if (this.InputFormRef == null)
            {
                return;
            }

            U.AddrResult ar = InputFormRef.SelectToAddrResult(FilterComboBox, FilterComboBox.SelectedIndex);
            if (ar.isNULL())
            {
                return;
            }
            //サンプルのマップを表示します.
            uint mapmax = MapSettingForm.GetDataCount();

            for (uint i = 0; i < mapmax; i++)
            {
                MapSettingForm.PLists plist = MapSettingForm.GetMapPListsWhereMapID(i);
                if (plist.anime2_plist == ar.tag)
                {
                    this.MapPictureBox.LoadMap(i);
                    break;
                }
            }

            this.InputFormRef.ReInit(ar.addr);
        }
Esempio n. 5
0
        AsmMapFile MakeBaseSymbol()
        {
            AsmMapFile map = new AsmMapFile(Program.ROM);

            if (Program.ROM.RomInfo.version == 0)
            {
                return(map);
            }

            {
                List <Address> list     = new List <Address>(50000);
                uint           maxcount = MapSettingForm.GetDataCount();
                for (uint mapid = 0; mapid < maxcount; mapid++)
                {
                    //イベント命令 一覧の取得(開始イベントと終了イベントのみ)
                    List <U.AddrResult> eventlist = EventCondForm.MakeEventScriptPointerStartAndEndEventOnly(mapid);
                    for (int i = 0; i < eventlist.Count; i++)
                    {
                        if (!U.isSafetyOffset(eventlist[i].addr))
                        {
                            continue;
                        }

                        Address.AddAddress(list
                                           , eventlist[i].addr
                                           , 4
                                           , U.NOT_FOUND
                                           , eventlist[i].name
                                           , Address.DataTypeEnum.EVENTSCRIPT);
                    }
                }
                map.AppendMAP(list, "EVENT");
            }
            //イベント命令にあるASM命令
            {
                List <Address> list = new List <Address>(0x40);
                EventScript.MakeEventASMMAPList(list, false, "", true);
                map.AppendMAP(list);
            }
            //イベント命令にあるEVENT命令
            {
                List <Address> list = new List <Address>(0x40);
                EventScript.MakeEventASMMAPList(list, true, "", true);
                map.AppendMAP(list, "EVENT");
            }
            map.MakeNearSearchSortedList();

            return(map);
        }
Esempio n. 6
0
        private void MapPictureBox_Load(object sender, EventArgs e)
        {
            if (this.DesignMode)
            {
                return;
            }

            this.ZoomComboBox.Text             = "100%";
            this.StopDrawMarkupMarkNotUnionTab = "";

            U.ConvertComboBox(MapSettingForm.MakeMapIDList(), ref this.MapSelector);
            //最後にワールドマップを追加.
            this.MapSelector.Items.Add(R._("ワールドマップ"));

            this.ConstWorldMapID = MapSettingForm.GetDataCount();

            this.DefualtIcon = ImageSystemIconForm.YubiTate();
            U.MakeTransparent(this.DefualtIcon);
        }
Esempio n. 7
0
        //全データの取得
        public static void MakeAllDataLength(List <Address> list)
        {
            InputFormRef N_InputFormRef = N_Init(null);

            uint mapmax = MapSettingForm.GetDataCount();

            for (uint mapid = 0; mapid < mapmax; mapid++)
            {
                uint pointer;
                uint change_addr = MapSettingForm.GetMapChangeAddrWhereMapID(mapid, out pointer);
                if (change_addr == U.NOT_FOUND)
                {
                    continue;
                }

                //N_InputFormRef.ReInit(change_addr);
                N_InputFormRef.ReInitPointer(pointer);

                string name = "MapChange map:" + U.To0xHexString(mapid);
                FEBuilderGBA.Address.AddAddress(list, N_InputFormRef, name, new uint[] { 8 });

                List <U.AddrResult> arlist = N_InputFormRef.MakeList();
                for (int n = 0; n < arlist.Count; n++)
                {
                    uint addr       = arlist[n].addr;
                    uint w          = Program.ROM.u8((uint)addr + 3);  //サイズw
                    uint h          = Program.ROM.u8((uint)addr + 4);  //サイズh
                    uint change_mar = Program.ROM.p32((uint)addr + 8); //変化ポインタ
                    if (!U.isSafetyOffset(change_mar))
                    {
                        continue;
                    }
                    name = "MapChange map:" + U.To0xHexString(mapid) + " n:" + U.To0xHexString(n);
                    FEBuilderGBA.Address.AddAddress(list, change_mar
                                                    , w * h * 2
                                                    , addr + 8
                                                    , name
                                                    , Address.DataTypeEnum.BIN);
                }
            }
        }
Esempio n. 8
0
        private void MapLoadFunctionForm_Load(object sender, EventArgs e)
        {
            bool enable = PatchUtil.IsSwitch1Enable(Program.ROM.RomInfo.map_load_function_switch1_address());

            if (!enable)
            {
                this.ERROR_NOT_FOUND.Show();
                this.WriteButton.Hide();
            }

            //章拡張を表示するかどうか
            uint map_count = MapSettingForm.GetDataCount();

            if (MapSettingForm.IsShowChapterExetdns((int)map_count))
            {
                AddressListExpandsButton_255.Show();
            }
            else
            {
                this.AddressList.Height += AddressListExpandsButton_255.Height;
                AddressListExpandsButton_255.Hide();
            }
        }
Esempio n. 9
0
        //全データの取得
        public static void MakeAllDataLength(List <Address> list)
        {
            List <uint> tracelist = new List <uint>();
            uint        mapmax    = MapSettingForm.GetDataCount();

            for (uint mapid = 0; mapid < mapmax; mapid++)
            {
                uint wmapid = MapSettingForm.GetWorldMapEventIDWhereMapID(mapid);
                if (wmapid == 0)
                {//存在しない
                    continue;
                }
                //FE6はPLISTが格納されている.
                uint p;
                uint event_addr = MapPointerForm.PlistToOffsetAddrFast(MapPointerForm.PLIST_TYPE.WORLDMAP_FE6ONLY, wmapid, out p);
                if (event_addr == U.NOT_FOUND)
                {
                    continue;
                }

                string name = "WorldMapEvent " + U.To0xHexString(mapid) + " ";
                EventScriptForm.ScanScript(list, p, true, true, name, tracelist);
            }
        }