public ImageUnitPaletteForm() { InitializeComponent(); SetExplain(); this.UNITCLASS_LIST.OwnerDraw(ListBoxEx.DrawUnitAndClassAndText, DrawMode.OwnerDrawFixed); if (Program.ROM.RomInfo.version() == 8) { this.UNITCLASS_LIST.ItemListToJumpForm("UNITPALETTEFE8", new string[] { "UID" }); } else { this.UNITCLASS_LIST.ItemListToJumpForm("UNIT"); } this.InputFormRef = Init(this); this.InputFormRef.AddressListExpandsEvent += AddressListExpandsEventNoCopyP12; this.InputFormRef.MakeGeneralAddressListContextMenu(true); this.PaletteZoomComboBox.SelectedIndex = 0; this.PaletteIndexComboBox.SelectedIndex = 0; PaletteFormRef.MakePaletteUI(this, OnChangeColor, GetSampleBitmap); U.SetIcon(ExportButton, Properties.Resources.icon_arrow); U.SetIcon(ImportButton, Properties.Resources.icon_upload); }
private void MapStyleEditorForm_Load(object sender, EventArgs e) { IsInit = true; //マップIDリストを作る. List <U.AddrResult> maplist = MapSettingForm.MakeMapIDList(); //マップスタイルリストを作る this.MapEditConf = MapEditorForm.MakeMapStyleList(maplist); //マップスタイルリストを作る MakeMapStyleCombo(); U.SelectedIndexSafety(this.MapStyle, 0); List <U.AddrResult> terrainList = MapTerrainNameForm.MakeList(); U.ConvertComboBox(terrainList, ref this.ConfigTerrain); //マップオブジェクト this.MAP.SetChipSize(8); Bitmap black = ImageUtil.BlankDummy(); U.MakeTransparent(black); this.MAP.SetDefualtIcon(black); //パレット PaletteFormRef.MakePaletteUI(this, OnChangeColor, GetSampleBitmap); U.SelectedIndexSafety(this.PaletteCombo, 0); //TSA変更のイベント適応. List <Control> controls = InputFormRef.GetAllControls(this); InputFormRef.MakeLinkEvent("Config_", controls); //最大化禁止 //C#のバグである Anchorを四隅にすると、スクロールバーが消えるというバグに対処するために、 //フォームを固定化しないとおかしなことになる。 //クレームは microsoft あたりまでどうぞ. this.MaximizeBox = false; IsInit = false; U.AllowDropFilename(this, ImageFormRef.IMAGE_FILE_FILTER, (string filename) => { using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename)) { ObjImportButton_Click(null, null); } }); U.AllowDropFilename(this, new string[] { ".MAPCHIP_CONFIG" }, (string filename) => { using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename)) { MapChipImportButton_Click(null, null); } }); }
public ImageBattleAnimePalletForm() { InitializeComponent(); this.PaletteZoomComboBox.SelectedIndex = 0; this.PaletteIndexComboBox.SelectedIndex = 0; this.Is32ColorMode = false; PaletteFormRef.MakePaletteUI(this, OnChangeColor, GetSampleBitmap); SetExpain(); }
private void BattleScreenForm_Load(object sender, EventArgs e) { ClearUndoBuffer(); uint palette = Program.ROM.p32(Program.ROM.RomInfo.battle_screen_palette_pointer()); U.ForceUpdate(PALETTE_ADDRESS, palette); PaletteFormRef.MakePaletteUI(this, OnChangeColor, GetSampleBitmap); this.PaletteIndexComboBox.SelectedIndex = 0; InitLoadChipsetInfo(); LoadChipsetInfo(); //チップセット関係の読込 LoadBattleScreen(); //ROM TSAをメモリに読み込んで // MakeBattleScreen(); //TSA描画 Zoom.SelectedIndex = 1; //2倍拡大 }
public ImagePalletForm() { InitializeComponent(); this.PaletteZoomComboBox.SelectedIndex = 0; PaletteFormRef.MakePaletteUI(this, OnChangeColor, GetSampleBitmap); U.SetIcon(ExportButton, Properties.Resources.icon_arrow); U.SetIcon(ImportButton, Properties.Resources.icon_upload); U.AllowDropFilename(this, ImageFormRef.IMAGE_FILE_FILTER, (string filename) => { using (ImageFormRef.AutoDrag ad = new ImageFormRef.AutoDrag(filename)) { ImportButton_Click(null, null); } }); }
public void Init(uint width8, uint height8, uint zimgPointer, bool isHeaderTSA, bool isLZ77TSA, uint tsaPointer, uint palettePointer, uint paletteAddress, int paletteCount) { ClearUndoBuffer(); this.ZImgPointer = zimgPointer; this.IsHeaderTSA = isHeaderTSA; this.IsLZ77TSA = isLZ77TSA; this.TSAPointer = tsaPointer; this.PalettePointer = palettePointer; this.PaletteAddress = paletteAddress; this.Width8 = width8; this.Height8 = height8; this.PaletteCount = paletteCount; if (this.IsHeaderTSA) { this.Width8 = Math.Max(256 / 8, this.Width8); this.Height8 = Math.Max(160 / 8, this.Height8); } if (this.PalettePointer == U.NOT_FOUND) { PALETTE_ADDRESS.Value = U.toOffset(this.PaletteAddress); } else { PALETTE_ADDRESS.Value = Program.ROM.p32(this.PalettePointer); } PaletteFormRef.MakePaletteUI(this, OnChangeColor, GetSampleBitmap); this.PaletteIndexComboBox.SelectedIndex = 0; InitLoadChipsetInfo(); LoadChipsetInfo(); //チップセット関係の読込 LoadBattleScreen(); //ROM TSAをメモリに読み込んで //MakeBattleScreen(); //TSA描画 Zoom.SelectedIndex = 1; //2倍拡大 EraseSurplusPalette(); //余剰パレットの削除. ShowTSAInfo(); }