コード例 #1
0
        private void ExportWMAPEventEAButton_Click(object sender, EventArgs e)
        {
            uint mapid = (uint)MAP_LISTBOX.SelectedIndex;

            if (mapid == U.NOT_FOUND)
            {
                return;
            }
            uint addr;

            if (Program.ROM.RomInfo.version() == 8)
            {
                addr = WorldMapEventPointerForm.GetEventByMapID(mapid, false);
            }
            else if (Program.ROM.RomInfo.version() == 7)
            {
                addr = WorldMapEventPointerFE7Form.GetEventByMapID(mapid);
            }
            else
            {//6
                addr = WorldMapEventPointerFE6Form.GetEventByMapID(mapid);
            }
            if (!U.isSafetyOffset(addr))
            {
                return;
            }
            if (addr == U.NOT_FOUND)
            {
                return;
            }
            SaveAS(addr, "ToEnd", "none", "WorldMap");
        }
コード例 #2
0
        public static bool isWorldMapEvent(uint addr)
        {
            if (Program.ROM.RomInfo.version() == 7)
            {
                return(WorldMapEventPointerFE7Form.isWorldMapEvent(addr));
            }
            else if (Program.ROM.RomInfo.version() == 6)
            {
                return(WorldMapEventPointerFE6Form.isWorldMapEvent(addr));
            }

            addr = U.toOffset(addr);
            {
                InputFormRef InputFormRef = Init(null);
                for (int i = 0; i < InputFormRef.DataCount; i++)
                {
                    uint p         = InputFormRef.BaseAddress + (uint)i * InputFormRef.BlockSize;
                    uint eventAddr = Program.ROM.p32(p);
                    if (addr == eventAddr)
                    {
                        return(true);
                    }
                }
            }
            {
                InputFormRef InputFormRef = N_Init(null);
                for (int i = 0; i < InputFormRef.DataCount; i++)
                {
                    uint p         = InputFormRef.BaseAddress + (uint)i * InputFormRef.BlockSize;
                    uint eventAddr = Program.ROM.p32(p);
                    if (addr == eventAddr)
                    {
                        return(true);
                    }
                }
            }
            return(false);
        }
コード例 #3
0
        static List <FELint.ErrorSt> ScanMAPLow(uint mapid, List <DisassemblerTrumb.LDRPointer> ldrmap)
        {
            List <FELint.ErrorSt> errors = new List <ErrorSt>();

            if (mapid == SYSTEM_MAP_ID)
            {
                ScanSystem(errors, ldrmap);
                return(errors);
            }

            if (InputFormRef.DoEvents(null, "Scan Map " + U.ToHexString(mapid)))
            {
                return(errors);
            }
            EventCondForm.MakeCheckErrors(mapid, errors);

            if (InputFormRef.DoEvents(null, null))
            {
                return(errors);
            }
            MapSettingForm.MakeCheckErrors(mapid, errors);

            if (InputFormRef.DoEvents(null, null))
            {
                return(errors);
            }
            MapChangeForm.MakeCheckError(mapid, errors);

            if (InputFormRef.DoEvents(null, null))
            {
                return(errors);
            }
            MapExitPointForm.MakeCheckError(mapid, errors);

            if (Program.ROM.RomInfo.version() == 8)
            {
                if (InputFormRef.DoEvents(null, null))
                {
                    return(errors);
                }
                WorldMapEventPointerForm.MakeCheckErrors(mapid, errors);

                if (mapid == 0)
                {
                    if (InputFormRef.DoEvents(null, null))
                    {
                        return(errors);
                    }
                    //FELint.CheckPrologeEventPointer(0, errors);
                }
            }
            else if (Program.ROM.RomInfo.version() == 7)
            {
                if (InputFormRef.DoEvents(null, null))
                {
                    return(errors);
                }
                WorldMapEventPointerFE7Form.MakeCheckErrors(mapid, errors);

                if (mapid == 0)
                {
                    if (InputFormRef.DoEvents(null, null))
                    {
                        return(errors);
                    }
                    //FELint.CheckPrologeEventPointer(0, errors);
                }
            }
            else
            {//ver6
                if (InputFormRef.DoEvents(null, null))
                {
                    return(errors);
                }
                WorldMapEventPointerFE6Form.MakeCheckErrors(mapid, errors);

                if (mapid == 1)
                {
                    if (InputFormRef.DoEvents(null, null))
                    {
                        return(errors);
                    }
                    //FELint.CheckPrologeEventPointer(1, errors);
                }
            }

            return(errors);
        }