private void ExportWMAPEvent2EAButton_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, true);
            }
            else if (Program.ROM.RomInfo.version() == 7)
            {
                return;
            }
            else
            {//6
                return;
            }
            if (!U.isSafetyOffset(addr))
            {
                return;
            }
            if (addr == U.NOT_FOUND)
            {
                return;
            }
            SaveAS(addr, "ToEnd", "none", "WorldMapSelect");
        }
Exemplo n.º 2
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);
        }