Example #1
0
        void ReloadMapchangeList(uint mapid)
        {
            this.ChangeComboBox.Items.Clear();
            this.ChangeComboBox.BeginUpdate();

            string name = R._("メインマップ");

            this.ChangeComboBox.Items.Add(name);

            if (!IsWorldmap(mapid))
            {
                //マップ変化リストを作成する.
                List <MapChangeForm.ChangeSt> mapchange = MapChangeForm.MakeChangeList(mapid);
                for (int i = 0; i < mapchange.Count; i++)
                {
                    name = R._("マップ変化:") + U.ToHexString(mapchange[i].no);
                    this.ChangeComboBox.Items.Add(name);
                }
            }
            this.ChangeComboBox.EndUpdate();
        }
Example #2
0
        private void ChangeComboBox_SelectedIndexChanged(object sender, EventArgs e)
        {
            uint mapid = (uint)MapSelector.SelectedIndex;

            if (IsWorldmap(mapid))
            {//ワールドマップ
                this.MapBitMap = WorldMapImageForm.DrawWorldMap();
                this.Map.Image = MapBitMap;
            }
            else
            {
                this.MapBitMap = MapSettingForm.DrawMap(mapid, this.MapAnime);
                int change = ChangeComboBox.SelectedIndex;
                if (change >= 1)
                {
                    change = change - 1;
                    List <MapChangeForm.ChangeSt> mapchange = MapChangeForm.MakeChangeList(mapid);
                    if (change < mapchange.Count)
                    {
                        Bitmap c = MapSettingForm.DrawMapChange((uint)mapid
                                                                , (int)mapchange[change].width
                                                                , (int)mapchange[change].height
                                                                , mapchange[change].addr
                                                                , this.MapAnime);
                        ImageUtil.BitBlt(this.MapBitMap
                                         , (int)(mapchange[change].x * 16)
                                         , (int)(mapchange[change].y * 16)
                                         , c.Width
                                         , c.Height
                                         , c, 0, 0);
                        c.Dispose();
                    }
                }

                this.Map.Image = MapBitMap;
            }

            ZoomComboBox_SelectedIndexChanged(null, null);
        }
Example #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);
        }
        public static void GotoEvent(FELint.Type dataType, uint addr, uint tag, uint mapid)
        {
            if (dataType == FELint.Type.EVENTSCRIPT ||
                dataType == FELint.Type.WORLDMAP_EVENT)
            {//イベント内で発生したエラー
                EventScriptForm f = (EventScriptForm)InputFormRef.JumpForm <EventScriptForm>(U.NOT_FOUND);
                f.JumpTo(addr, tag);
                return;
            }
            else if (dataType == FELint.Type.PROCS)
            {
                ProcsScriptForm f = (ProcsScriptForm)InputFormRef.JumpForm <ProcsScriptForm>(U.NOT_FOUND);
                f.JumpTo(addr, tag);
                return;
            }
            else if (dataType == FELint.Type.AISCRIPT)
            {
                AIScriptForm f = (AIScriptForm)InputFormRef.JumpForm <AIScriptForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.MAPSETTING_PLIST_OBJECT ||
                     dataType == FELint.Type.MAPSETTING_PLIST_CONFIG ||
                     dataType == FELint.Type.MAPSETTING_PLIST_MAP ||
                     dataType == FELint.Type.MAPSETTING_PLIST_PALETTE ||
                     dataType == FELint.Type.MAPSETTING_PLIST_MAPCHANGE ||
                     dataType == FELint.Type.MAPSETTING_PLIST_ANIMETION1 ||
                     dataType == FELint.Type.MAPSETTING_PLIST_ANIMETION2 ||
                     dataType == FELint.Type.MAPSETTING_WORLDMAP ||
                     dataType == FELint.Type.MAPSETTING
                     )
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <MapSettingFE6Form>(mapid);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    if (!Program.ROM.RomInfo.is_multibyte())
                    {
                        InputFormRef.JumpForm <MapSettingFE7UForm>(mapid);
                    }
                    else
                    {
                        InputFormRef.JumpForm <MapSettingFE7Form>(mapid);
                    }
                }
                else
                {
                    InputFormRef.JumpForm <MapSettingForm>(mapid);
                }
                return;
            }
            else if (dataType == FELint.Type.BATTLE_ANIME)
            {
                ImageBattleAnimeForm f = (ImageBattleAnimeForm)InputFormRef.JumpForm <ImageBattleAnimeForm>(U.NOT_FOUND);
                f.JumpToAnimeID(tag);
                return;
            }
            else if (dataType == FELint.Type.BATTLE_ANIME_CLASS)
            {
                ImageBattleAnimeForm f = (ImageBattleAnimeForm)InputFormRef.JumpForm <ImageBattleAnimeForm>(U.NOT_FOUND);
                f.JumpToClassID(tag);
                return;
            }
            else if (dataType == FELint.Type.BG)
            {
                InputFormRef.JumpForm <ImageBGForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.PORTRAIT)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <ImagePortraitFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <ImagePortraitForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.HAIKU)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <EventHaikuForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EventHaikuFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <EventHaikuFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.BATTTLE_TALK)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <EventBattleTalkForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EventBattleTalkFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <EventBattleTalkFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SUPPORT_TALK)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <SupportTalkForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <SupportTalkFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <SupportTalkFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SUPPORT_UNIT)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    SupportUnitFE6Form f = (SupportUnitFE6Form)InputFormRef.JumpForm <SupportUnitFE6Form>();
                    f.JumpToAddr(addr);
                }
                else
                {
                    SupportUnitForm f = (SupportUnitForm)InputFormRef.JumpForm <SupportUnitForm>();
                    f.JumpToAddr(addr);
                }
                return;
            }
            else if (dataType == FELint.Type.CLASS)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <ClassFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <ClassForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.ITEM)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <ItemFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <ItemForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.ITEM_WEAPON_EFFECT)
            {
                ItemWeaponEffectForm f = (ItemWeaponEffectForm)InputFormRef.JumpForm <ItemWeaponEffectForm>(U.NOT_FOUND);
                f.JumpTo(tag);
                return;
            }
            else if (dataType == FELint.Type.UNIT)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <UnitForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <UnitFE7Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <UnitFE6Form>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.MAPCHANGE)
            {
                MapChangeForm f = (MapChangeForm)InputFormRef.JumpForm <MapChangeForm>(tag);
                f.JumpToMAPIDAndAddr(mapid, tag);
                return;
            }
            else if (dataType == FELint.Type.SOUND_FOOT_STEPS)
            {
                SoundFootStepsForm f = (SoundFootStepsForm)InputFormRef.JumpForm <SoundFootStepsForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_NORMAL)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 0 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 0 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_RAIN)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 1 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 1 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_SHOW)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 2 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 2 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_AVOID)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 3 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 3 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_DEF)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 4 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 4 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.MOVECOST_RES)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    MoveCostFE6Form f = (MoveCostFE6Form)InputFormRef.JumpForm <MoveCostFE6Form>();
                    f.JumpToClassID(tag, 5 + 1);
                }
                else
                {
                    MoveCostForm f = (MoveCostForm)InputFormRef.JumpForm <MoveCostForm>();
                    f.JumpToClassID(tag, 5 + 1);
                }
                return;
            }
            else if (dataType == FELint.Type.OP_CLASS_DEMO)
            {
                if (Program.ROM.RomInfo.version() == 7 && Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoFE7Form>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 7 && !Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoFE7UForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 8 && Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoForm>(tag);
                }
                else if (Program.ROM.RomInfo.version() == 8 && !Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <OPClassDemoFE8UForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.WMAP_BASE_POINT)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <WorldMapPointForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SOUNDROOM)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <SoundRoomFE6Form>(tag);
                }
                else
                {
                    InputFormRef.JumpForm <SoundRoomForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.SENSEKI)
            {
                if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EDSensekiCommentForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.DIC)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    InputFormRef.JumpForm <TextDicForm>(U.NOT_FOUND);
                }
                return;
            }
            else if (dataType == FELint.Type.MENU)
            {
                MenuCommandForm f = (MenuCommandForm)InputFormRef.JumpForm <MenuCommandForm>();
                f.JumpToAddr(addr);
                return;
            }
            else if (dataType == FELint.Type.STATUS)
            {
                InputFormRef.JumpForm <StatusParamForm>();
                return;
            }
            else if (dataType == FELint.Type.ED)
            {
                if (Program.ROM.RomInfo.version() == 6)
                {
                    InputFormRef.JumpForm <EDFE6Form>();
                }
                else if (Program.ROM.RomInfo.version() == 7)
                {
                    InputFormRef.JumpForm <EDFE7Form>();
                }
                else
                {
                    InputFormRef.JumpForm <EDForm>();
                }
                return;
            }
            else if (dataType == FELint.Type.TERRAIN)
            {
                if (Program.ROM.RomInfo.is_multibyte())
                {
                    InputFormRef.JumpForm <MapTerrainNameForm>();
                }
                else
                {
                    InputFormRef.JumpForm <MapTerrainNameEngForm>();
                }
                return;
            }
            else if (dataType == FELint.Type.SKILL_CONFIG)
            {
                if (Program.ROM.RomInfo.version() == 8)
                {
                    PatchUtil.skill_system_enum skill = PatchUtil.SearchSkillSystem();
                    if (skill == PatchUtil.skill_system_enum.SkillSystem)
                    {
                        InputFormRef.JumpForm <SkillConfigSkillSystemForm>();
                    }
                    else if (skill == PatchUtil.skill_system_enum.FE8N ||
                             skill == PatchUtil.skill_system_enum.yugudora ||
                             skill == PatchUtil.skill_system_enum.FE8N_ver2
                             )
                    {
                        InputFormRef.JumpForm <SkillConfigFE8NSkillForm>();
                    }
                }
                return;
            }
            else if (dataType == FELint.Type.RMENU)
            {
                InputFormRef.JumpForm <StatusRMenuForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.ITEM_USAGE_POINTER)
            {
                InputFormRef.JumpForm <ItemUsagePointerForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.PATCH)
            {
                PatchForm f = (PatchForm)InputFormRef.JumpForm <PatchForm>();
                f.SelectPatchByTag(tag);
                return;
            }
            else if (dataType == FELint.Type.MAPEXIT)
            {
                InputFormRef.JumpForm <MapExitPointForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_UNIT_WAIT_ICON)
            {
                InputFormRef.JumpForm <ImageUnitWaitIconFrom>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_UNIT_MOVE_ICON)
            {
                InputFormRef.JumpForm <ImageUnitMoveIconFrom>(tag);
                return;
            }
            else if (dataType == FELint.Type.ITEM_EEFECT_POINTER)
            {
                InputFormRef.JumpForm <ItemEffectPointerForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_UNIT_PALETTE)
            {
                InputFormRef.JumpForm <ImageUnitPaletteForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.IMAGE_BATTLE_SCREEN)
            {
                InputFormRef.JumpForm <ImageBattleScreenForm>();
                return;
            }
            else if (dataType == FELint.Type.ASM)
            {
                DisASMForm f = (DisASMForm)InputFormRef.JumpForm <DisASMForm>(U.NOT_FOUND);
                f.JumpTo(DisassemblerTrumb.ProgramAddrToPlain(tag));
                return;
            }
            else if (dataType == FELint.Type.ASMDATA)
            {
                HexEditorForm f = (HexEditorForm)InputFormRef.JumpForm <HexEditorForm>();
                f.JumpTo(tag);
                return;
            }
            else if (dataType == FELint.Type.STATUS_UNITS_MENU)
            {
                InputFormRef.JumpForm <StatusUnitsMenuForm>(tag);
                return;
            }
            else if (dataType == FELint.Type.TEXTID_FOR_SYSTEM)
            {
                return;
            }
            else if (dataType == FELint.Type.TEXTID_FOR_USER)
            {
                return;
            }
            else if (dataType == FELint.Type.POINTER_TALKGROUP)
            {
                EventTalkGroupFE7Form f = (EventTalkGroupFE7Form)InputFormRef.JumpForm <EventTalkGroupFE7Form>();
                f.JumpToAddr(addr);
                return;
            }
            else if (dataType == FELint.Type.POINTER_MENUEXTENDS)
            {
                MenuExtendSplitMenuForm f = (MenuExtendSplitMenuForm)InputFormRef.JumpForm <MenuExtendSplitMenuForm>();
                f.JumpToAddr(addr);
                return;
            }
            else if (dataType == FELint.Type.POINTER_UNITSSHORTTEXT)
            {
                UnitsShortTextForm f = (UnitsShortTextForm)InputFormRef.JumpForm <UnitsShortTextForm>();
                f.JumpTo(addr);
                return;
            }
            else if (dataType == FELint.Type.MAGIC_ANIME_EXTENDS)
            {
                if (tag >= Program.ROM.RomInfo.magic_effect_original_data_count())
                {
                    tag -= Program.ROM.RomInfo.magic_effect_original_data_count();
                }
                ImageUtilMagic.magic_system_enum magic = ImageUtilMagic.SearchMagicSystem();
                if (magic == ImageUtilMagic.magic_system_enum.FEDITOR_ADV)
                {
                    InputFormRef.JumpForm <ImageMagicFEditorForm>(tag);
                }
                else if (magic == ImageUtilMagic.magic_system_enum.CSA_CREATOR)
                {
                    InputFormRef.JumpForm <ImageMagicCSACreatorForm>(tag);
                }
                return;
            }
            else if (dataType == FELint.Type.FELINT_SYSTEM_ERROR)
            {
                InputFormRef.JumpForm <ToolProblemReportForm>();
                return;
            }
            else if (dataType == FELint.Type.STATUS_GAME_OPTION)
            {
                InputFormRef.JumpForm <StatusOptionForm>(tag);
                return;
            }

            //イベント
            {
                EventCondForm f = (EventCondForm)InputFormRef.JumpForm <EventCondForm>(U.NOT_FOUND);
                f.JumpToMAPIDAndAddr(mapid, FELint.TypeToEventCond(dataType), (uint)addr);
            }
        }
Example #5
0
        void UpdateList()
        {
            this.FlagList.Clear();
            uint mapid = (uint)this.MAP_LISTBOX.SelectedIndex;

            EventCondForm.MakeFlagIDArray(mapid, this.FlagList);
            MapChangeForm.MakeFlagIDArray(mapid, this.FlagList);

            List <UseFlagID> flagListInner = new List <UseFlagID>();

            if (Program.ROM.RomInfo.version() == 8)
            {
                EventHaikuForm.MakeFlagIDArray(flagListInner);
                EventBattleTalkForm.MakeFlagIDArray(flagListInner);
            }
            else if (Program.ROM.RomInfo.version() == 7)
            {//7
                EventHaikuFE7Form.MakeFlagIDArray(flagListInner);
                EventBattleTalkFE7Form.MakeFlagIDArray(flagListInner);
            }
            else
            {//6
                EventHaikuFE6Form.MakeFlagIDArray(flagListInner);
                EventBattleTalkFE6Form.MakeFlagIDArray(flagListInner);
            }

            if (this.ShowANYCheckBox.Checked)
            {
                foreach (UseFlagID u in flagListInner)
                {
                    if (u.MapID == mapid || u.MapID == U.NOT_FOUND)
                    {
                        this.FlagList.Add(u);
                    }
                }
            }
            else
            {
                foreach (UseFlagID u in flagListInner)
                {
                    if (u.MapID == mapid)
                    {
                        this.FlagList.Add(u);
                    }
                }
            }


            this.FlagList.Sort((UseFlagID a, UseFlagID b) =>
            {
                if (a.ID == b.ID)
                {
                    if (a.MapID == b.MapID)
                    {
                        return((int)a.DataType - (int)b.DataType);
                    }
                    return((int)a.MapID - (int)b.MapID);
                }
                return((int)a.ID - (int)b.ID);
            });
        }