Example #1
0
        static InputFormRef N_Init(Form self)
        {
            return(new InputFormRef(self
                                    , "N_"
                                    , Program.ROM.RomInfo.map_setting_pointer()
                                    , Program.ROM.RomInfo.map_setting_datasize()
                                    , (int i, uint addr) =>
            {
                //0 がポインタであればデータがあると考える.
                uint a = Program.ROM.u32(addr + 0);
                //                    return U.isPointer(a) || a == 0;
                return U.isPointer(a);
            }
                                    , (int i, uint addr) =>
            {
                U.AddrResult r = new U.AddrResult();

                uint worldmapEventPlist = MapSettingForm.GetWorldMapEventIDWhereAddr(addr);
                if (worldmapEventPlist <= 0)
                {
                    return r;
                }

                r.name = U.ToHexString(i) + MapSettingForm.GetMapNameWhereAddr(addr);
                r.addr = Program.ROM.p32(Program.ROM.RomInfo.map_map_pointer_pointer()) + (worldmapEventPlist * 4);
                return r;
            }
                                    ));
        }
Example #2
0
        //分割していない場合
        static string GetPListNameNotSplite(uint plist, List <U.AddrResult> mapSetting)
        {
            if (plist == 0)
            {//0番はnull
                return("NULL");
            }

            for (int mapid = 0; mapid < mapSetting.Count; mapid++)
            {
                uint addr = mapSetting[mapid].addr;
                MapSettingForm.PLists plists = MapSettingForm.GetMapPListsWhereAddr(addr);
                if (plists.anime1_plist == plist)
                {
                    return("ANIME1 " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.anime2_plist == plist)
                {
                    return("ANIME2 " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.config_plist == plist)
                {
                    return("CONFIG " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.event_plist == plist)
                {
                    return("EVENT " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.mapchange_plist == plist)
                {
                    return("MAPCHANGE " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.mappointer_plist == plist)
                {
                    return("MAP " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.palette_plist == plist)
                {
                    return("PAL " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                uint obj_plist_low  = (plists.obj_plist & 0xFF);
                uint obj_plist_high = ((plists.obj_plist >> 8) & 0xFF);
                if (obj_plist_low == plist)
                {
                    return("OBJ " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (obj_plist_high == plist)
                {
                    return("OBJ " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (Program.ROM.RomInfo.version() == 6)
                {
                    uint wmapevent_plist = MapSettingForm.GetWorldMapEventIDWhereAddr(addr);
                    if (wmapevent_plist == 0)
                    {
                        return("WMEVENT " + MapSettingForm.GetMapNameWhereAddr(addr));
                    }
                }
            }
            return("UNK");
        }
Example #3
0
 static InputFormRef Init(MapSettingFE6Form self)
 {
     return(new InputFormRef(self
                             , ""
                             , Program.ROM.RomInfo.map_setting_pointer()
                             , Program.ROM.RomInfo.map_setting_datasize()
                             , (int i, uint addr) =>
     {
         return IsMapSettingEnd(addr);
     }
                             , (int i, uint addr) =>
     {
         return U.ToHexString(i) + MapSettingForm.GetMapNameWhereAddr(addr);
     }
                             ));
 }
Example #4
0
        static string GetPListNameSplited(uint plist, uint baseaddr, List <U.AddrResult> mapSetting)
        {
            //分割している場合
            if (plist == 0)
            {//0番はnull
                return("NULL");
            }

            MapPointerForm.PLIST_TYPE type = ConvertBaseAddrToType(baseaddr);
            for (int mapid = 0; mapid < mapSetting.Count; mapid++)
            {
                uint addr = mapSetting[mapid].addr;
                MapSettingForm.PLists plists = MapSettingForm.GetMapPListsWhereAddr(addr);
                if (plists.anime1_plist == plist && type == PLIST_TYPE.ANIMATION)
                {
                    return("ANIME1 " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.anime2_plist == plist && type == PLIST_TYPE.ANIMATION)
                {//ANIME2はANIMEと共有
                    return("ANIME2 " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.config_plist == plist && type == PLIST_TYPE.CONFIG)
                {
                    return("CONFIG " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.event_plist == plist && type == PLIST_TYPE.EVENT)
                {
                    return("EVENT " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.mapchange_plist == plist && type == PLIST_TYPE.CHANGE)
                {
                    return("MAPCHANGE " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.mappointer_plist == plist && type == PLIST_TYPE.MAP)
                {
                    return("MAP " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.palette_plist == plist && type == PLIST_TYPE.OBJECT)
                {//OBJECTとPALは共有
                    return("PAL " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (plists.palette2_plist == plist && type == PLIST_TYPE.OBJECT)
                {//OBJECTとPALは共有
                    return("PAL2 " + MapSettingForm.GetMapNameWhereAddr(addr));
                }

                uint obj_plist_low  = (plists.obj_plist & 0xFF);
                uint obj_plist_high = ((plists.obj_plist >> 8) & 0xFF);
                if (obj_plist_low == plist && type == PLIST_TYPE.OBJECT)
                {
                    return("OBJ " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (obj_plist_high == plist && type == PLIST_TYPE.OBJECT)
                {
                    return("OBJ " + MapSettingForm.GetMapNameWhereAddr(addr));
                }
                if (Program.ROM.RomInfo.version == 6)
                {
                    uint wmapevent_plist = MapSettingForm.GetWorldMapEventIDWhereAddr(addr);
                    if (wmapevent_plist == 0 && type == PLIST_TYPE.WORLDMAP_FE6ONLY)
                    {
                        return("WMEVENT " + MapSettingForm.GetMapNameWhereAddr(addr));
                    }
                }
            }
            return("-EMPTY-");
        }