Example #1
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);
        }