![]() |
Optimizing Editor Loading - Printable Version +- Mirage Source (https://mirage-engine.uk/forums) +-- Forum: Mirage Source (Nostalgia) (https://mirage-engine.uk/forums/forumdisplay.php?fid=61) +--- Forum: Archive (2006-2011) (https://mirage-engine.uk/forums/forumdisplay.php?fid=18) +---- Forum: Resources (https://mirage-engine.uk/forums/forumdisplay.php?fid=49) +---- Thread: Optimizing Editor Loading (/showthread.php?tid=58) |
Optimizing Editor Loading - grimsk8ter11 - 01-06-2006 Originally posted by grimsk8ter11 Difficulty: 1/5 Full copy and paste, but it does explain stuff, int he first one so you actually get it EditorInit() - Replace the WHOLE sub with Code: Public Sub EditorInit() Well theres really nto much to explain, instead of opening another file to memory, it losds the editors images directly from the current surfaces using BitBlt to move them from the surface to the pic boxes. ItemEditorInit() - Replace the whole sub [code] Public Sub ItemEditorInit() '*********************************************************** ***** '* WHEN WHO WHAT '* ---- --- ---- '* 07/12/2005 Shannara Added gfx constant. '* 10/29/2005 Grim Now loads from Item surface '*********************************************************** ***** Dim DC As Long DC = DD_ItemSurf.GetDC Call BitBlt(frmItemEditor.picItems.hdc, 0, 0, DDSD_Item.lWidth, DDSD_Item.lHeight, DC, 0, 0, vbSrcCopy) DD_ItemSurf.ReleaseDC (DC) frmItemEditor.txtName.Text = Trim(Item(EditorIndex).Name) frmItemEditor.scrlPic.Value = Item(EditorIndex).Pic frmItemEditor.cmbType.ListIndex = Item(EditorIndex).Type If (frmItemEditor.cmbType.ListIndex >= ITEM_TYPE_WEAPON) And (frmItemEditor.cmbType.ListIndex = ITEM_TYPE_POTIONADDHP) And (frmItemEditor.cmbType.ListIndex - Misunderstood - 02-06-2006 look at the npceditorinit sub again...way to screw it up xD. can ya find the mistake? ![]() - grimsk8ter11 - 02-06-2006 fixed because mis is a picky bum. i was just testing him guys dont worry. - Krloz - 03-09-2006 What about if we are loading several tilesets.. will it copy into the mapeditor all the tilesets being used? - Obsidian - 03-09-2006 No, it'll only do whatever the tileset is that you stipulate. For the other tilesets like tileset(1) or whatever, just use that variable instead of This is the original: DC = DD_TileSurf.GetDC Call BitBlt(frmMirage.picBackSelect.hdc, 0, 0, DDSD_Tile.lWidth, DDSD_Tile.lHeight, DC, 0, 0, vbSrcCopy) DD_TileSurf.ReleaseDC (DC) Your's Should Be like this (depending on how your multiple tilesets work): DC = DD_TileSurf(0).GetDC Call BitBlt(frmMirage.picBackSelect.hdc, 0, 0, DDSD_Tile.lWidth, DDSD_Tile.lHeight, DC, 0, 0, vbSrcCopy) DD_TileSurf(0).ReleaseDC (DC) or whatever, if you still don't understand check your modDirectX and look at how it utilizes the multiple tiles. Then, you want to do the same kind of thing for the "switch" (like when you change to tileset 2) only instead of doing it when the editor loads, just do it when you click or change option or whatever. Make sense? - Krloz - 04-09-2006 Ya comming back if I get trouble - grimsk8ter11 - 04-09-2006 Dave Wrote:Why not, in the item/NPC editor, get the image directly from the DD surface and skip the picture box step all together. because originally, when i wrote this, the image wouldnt show up if i got it directly. - grimsk8ter11 - 04-09-2006 i know that xD, i did it when if rist posted this,a nd it didnt work, so i didnt post it, its like a 2 year old tut ![]() |