//BG + テキストを書くルーチン public static Size DrawBGAndText(ListBox lb, int index, Graphics g, Rectangle listbounds, bool isWithDraw) { if (index < 0 || index >= lb.Items.Count) { return(new Size(listbounds.X, listbounds.Y)); } string text = lb.Items[index].ToString(); SolidBrush brush = new SolidBrush(lb.ForeColor); Font normalFont = lb.Font; Rectangle bounds = listbounds; int textmargineY = (ListBoxEx.OWNER_DRAW_ICON_SIZE - (int)lb.Font.Height) / 2; //テキストの先頭にアイコン番号(キャラ番号が入っている. 無駄だが汎用性を考えるとほかに方法がない) uint icon = U.atoh(text); Bitmap bitmap = ImageBGForm.DrawBG(icon); U.MakeTransparent(bitmap); //アイコンを描く. 処理速度を稼ぐためにマップアイコンの方を描画 Rectangle b = bounds; b.Width = ICON_WIDTH; b.Height = ICON_HEGITH; bounds.X += U.DrawPicture(bitmap, g, isWithDraw, b); //テキストを描く. b = bounds; b.Y += textmargineY; bounds.X += U.DrawText(text, g, normalFont, brush, isWithDraw, b); brush.Dispose(); bitmap.Dispose(); bounds.Y += ICON_WIDTH; return(new Size(bounds.X, bounds.Y)); }
static void ScanSystem(List <FELint.ErrorSt> errors, List <DisassemblerTrumb.LDRPointer> ldrmap) { ROMCheck(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageBattleAnimeForm")) { return; } ImageBattleAnimeForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageBGForm")) { return; } ImageBGForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem UnitForm")) { return; } UnitForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ClassForm")) { return; } ClassForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ItemForm")) { return; } ItemForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem MoveCostForm")) { return; } MoveCostForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem PatchForm")) { return; } PatchForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageUnitMoveIconFrom")) { return; } ImageUnitMoveIconFrom.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageUnitWaitIconFrom")) { return; } ImageUnitWaitIconFrom.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ItemEffectPointerForm")) { return; } ItemEffectPointerForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageUnitPaletteForm")) { return; } ImageUnitPaletteForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageBattleScreen")) { return; } ImageBattleScreenForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImageMagic")) { return; } ImageMagicFEditorForm.MakeCheckError(errors); ImageMagicCSACreatorForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem Procs")) { return; } ProcsScriptForm.MakeCheckError(errors, ldrmap); if (InputFormRef.DoEvents(null, "ScanSystem MenuDefinition")) { return; } MenuDefinitionForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventUnit")) { return; } EventUnitForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem AIScript")) { return; } AIScriptForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SongTable")) { return; } SongTableForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ItemWeaponEffect")) { return; } ItemWeaponEffectForm.MakeCheckError(errors); if (Program.ROM.RomInfo.version() == 8) { if (InputFormRef.DoEvents(null, "ScanSystem SoundFootStepsForm")) { return; } SoundFootStepsForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem ImagePortraitForm")) { return; } ImagePortraitForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventHaikuForm")) { return; } EventHaikuForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventBattleTalkForm")) { return; } EventBattleTalkForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SupportTalkForm")) { return; } SupportTalkForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SupportUnitForm")) { return; } SupportUnitForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SoundRoomForm")) { return; } SoundRoomForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EDForm")) { return; } EDForm.MakeCheckError(errors); } else if (Program.ROM.RomInfo.version() == 7) { if (InputFormRef.DoEvents(null, "ScanSystem ImagePortraitForm")) { return; } ImagePortraitForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventHaikuFE7Form")) { return; } EventHaikuFE7Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventBattleTalkFE7Form")) { return; } EventBattleTalkFE7Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SupportTalkFE7Form")) { return; } SupportTalkFE7Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SupportUnitForm")) { return; } SupportUnitForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SoundRoomForm")) { return; } SoundRoomForm.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EDForm")) { return; } EDFE7Form.MakeCheckError(errors); } else { if (InputFormRef.DoEvents(null, "ScanSystem ImagePortraitFE6Form")) { return; } ImagePortraitFE6Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventHaikuFE6Form")) { return; } EventHaikuFE6Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EventBattleTalkFE6Form")) { return; } EventBattleTalkFE6Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem SupportTalkFE6Form")) { return; } SupportTalkFE6Form.MakeCheckError(errors); if (InputFormRef.DoEvents(null, "ScanSystem EDForm")) { return; } EDFE6Form.MakeCheckError(errors); } }
public MainSimpleMenuImageSubForm() { InitializeComponent(); ImageBGButton.BackgroundImage = MakeTransparent(Trim(ImageBGForm.DrawBG(0))); if (Program.ROM.RomInfo.version() >= 7) { BigCGButton.BackgroundImage = MakeTransparent(Trim(ImageCGForm.DrawImageByID(0))); } else { BigCGButton.Hide(); } ImagePortraitButton.BackgroundImage = MakeTransparent(ImagePortraitForm.DrawPortraitUnit(2)); ImageBattleAnimeButton.BackgroundImage = MakeTransparent(BattleZoom(ImageBattleAnimeForm.DrawBattleAnime(1, ImageBattleAnimeForm.ScaleTrim.SCALE_90))); ImageUnitWaitIconButton.BackgroundImage = MakeTransparent(ImageUnitWaitIconFrom.DrawWaitUnitIconBitmap(1, 0, false)); ImageUnitMoveIconButton.BackgroundImage = MakeTransparent(ImageUnitMoveIconFrom.DrawMoveUnitIconBitmap(3, 0, 0)); ImageIconButton.BackgroundImage = MakeTransparent(ImageItemIconForm.DrawIconWhereID(0xB)); SystemIconButton.BackgroundImage = MakeTransparent(ImageSystemIconForm.YubiYoko()); //BattleScreenButton.BackgroundImage = MakeTransparent(ImageSystemIconForm.Allows(8)); BattleScreenButton.BackgroundImage = MakeTransparent(ImageSystemIconForm.WeaponIcon(0)); ImageBattleFieldButton.BackgroundImage = MakeTransparent(ImageBattleBGForm.DrawBG(2)); ImageBattleTerrainButton.BackgroundImage = MakeTransparent((ImageBattleTerrainForm.Draw(2))); if (Program.ROM.RomInfo.version() == 8) { ImageUnitPaletteButton.BackgroundImage = MakeTransparent(BattleZoom(UnitPaletteForm.DrawSample(2, 3))); } else {//for FE6 , FE7 ImageUnitPaletteButton.BackgroundImage = MakeTransparent(BattleZoom(ImageBattleAnimeForm.DrawBattleAnime(ImageBattleAnimeForm.GetAnimeIDByClassID(UnitForm.GetClassID(2)) , ImageBattleAnimeForm.ScaleTrim.SCALE_90, UnitForm.GetPaletteLowClass(2)))); } WorldMapImageButton.BackgroundImage = MakeTransparent(WorldMapImageForm.DrawWorldMap()); if (Program.ROM.RomInfo.version() == 7 && Program.ROM.RomInfo.is_multibyte() == false) {//英語版FE7は、章タイトルをテキストで保持していて、40260c nazo fontで、描画している. ImageChapterTitleButton.Hide(); } else { ImageChapterTitleButton.BackgroundImage = MakeTransparent(ImageChapterTitleForm.DrawSample(0)); } if (ImageUtilMagic.SearchMagicSystem() != ImageUtilMagic.magic_system_enum.NO) { ImageMagicButton.BackgroundImage = MakeTransparent(ImageSystemIconForm.WeaponIcon(8 - 3)); } else { ImageMagicButton.Hide(); } if (Program.ROM.RomInfo.is_multibyte()) { OptionForm.textencoding_enum textencoding = OptionForm.textencoding(); if (textencoding == OptionForm.textencoding_enum.ZH_TBL) { // FontButton.BackgroundImage = MakeTransparent(FontZHForm.DrawFontString("字形", true)); } else { FontButton.BackgroundImage = MakeTransparent(FontForm.DrawFontString("フォント", true)); } } else { FontButton.BackgroundImage = MakeTransparent(FontForm.DrawFontString("Font", true)); } }