![]() |
Verrigans Image System - 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: Verrigans Image System (/showthread.php?tid=31) Pages:
1
2
|
Verrigans Image System - grimsk8ter11 - 01-06-2006 Difficulty: 4/5 This isnt of super difficulty, but if you need any help, the thing i will tell you to download comes with a nice help file. Btw, im only giving the code for loading one of the surfaces, you cna mod it to fit the rest. Download this: http://www.verrigan.net/bitmaputils/VWBitmapUtils.zip Now open your client, go into the reference menu (Project->References) Now for the code to load, tiles, and the breakdown In modDirectX at the top of initsurfaces() add Code: Dim DC As Long Heres the code for the tiles: Code: ' Init tiles ddsd type and load the bitmap now for a break down Code: ' Init tiles ddsd type and load the bitmap This loads the file as byte data ready for reading. GFX_EXT (modConstants i believe) will be changed later on. Code: Call BMUtil.DecryptByteData("47dn45") This decrypts the data you jsut loaded, making sure the key in the " " matches the key for the file your loading (the key is set initially in the BMUtil.exe Code: Call BMUtil.DecompressByteData Simple enough, thsi takes the decrypted data and decompresses it while its still in the memory. Code: With DDSD_Tile This gets the images height and width, and sets the surfaces height and width tot he same thing. Code: Set DD_TileSurf = DD.CreateSurface(DDSD_Tile) This makes DD_Tilesurf from DDSD_Tile, then it sets DC (our variable), to the DC of the the new surface. After this it uses the dlls Blt command to put the tiles on the surface, then release the DC so it can be used. Code: DD_TileSurf.SetColorKey DDCKEY_SRCBLT, Key this is the standard transparency key. Now you need to go back and add this for sprites, items, and NPCs Then run BMUtil.exe that you downlaoded in that package. find yoru graphics files, and convert them tot he extension fo your choice. Make sure you remember the key you type in. Go back tot he client, change all the "47dn45" to "thekeyyoutypedintotheprogramhere" and change GFX_EXT in modConstants tot he extesnion you chose. There, your done - Coke - 24-08-2006 Woah nice! How hard is it for people to break into your graphics using this method? - grimsk8ter11 - 24-08-2006 Verrigan Wrote:Just don't accidentally release your BMPs with the converted graphics files, and you should be fairly safe. *cough* mis *cough* - Misunderstood - 25-08-2006 Ha! it wasnt me! - Misunderstood - 26-08-2006 Maybe if you show part of the code(dont show your key ![]() - Misunderstood - 26-08-2006 You're blting it to the pictureboxes before the window is shown, so they will be cleared when the form is shown. You're gonna need to blt it when the form loads like before. There still might be other problems with it, I dont remember exactly how it works. I havent looked at it in a while. - Misunderstood - 26-08-2006 when you load the forms. In the form_load code, or in the init code. Where it is originaly, only you put the new blt code instead of the old blt code. If you are storing the arrows in a surface, you can load the file to the surface(only once where its normally done), then use surface.blttodc to blt to the picturebox's dc. Re: Verrigans Image System - Xlithan - 06-03-2007 grimsk8ter11 Wrote:Download this: And do what? - grimsk8ter11 - 07-03-2007 zel you've been around forever, you should know this shit. you add it as a reference. self explanatory instead of staring at the little check boxes =) - Xlithan - 07-03-2007 I see it now, I was loading the group project file and it wouldn't compile. ![]() - Xlithan - 07-03-2007 I get an invalid procedure call or argument error. Code: Set DD_SpriteSurf = DD.CreateSurface(DDSD_Sprite) Here is my code in my init sub: Code: ' Init sprite ddsd type and load the bitmap I added the reference, and the file extension is correct (That wouldn't produce this error though anyway). - Xlithan - 09-03-2007 When I hover the mouse over, they result as 0 - Xlithan - 09-03-2007 yep, definately correct, file extension is correct, i've registered and adding the dll to the references, the code is the exact code your pasted in the tutorial, i've set the variables, the files are in the right folders. - Xlithan - 09-03-2007 I used that 128 value. It lets me log on but the tiles are all screwed up. And I get an error when entering the map editor. I assume that 128 was just a test value and that'll be why these things are happening? - Xlithan - 09-03-2007 I load up that encryption software you included, I type ogf into the extension box, and 47dn45 into the password box. I don't bother with compression, it's not important for now I don't think. Then I load the .bmp files until they are all encrypted into .ogf files in the gfx folder. I've changed the GFX_EXT to .ogf in the constants module, and used the code I pasted above. If you want you can download Oasis Source from http://www.os.nevetsweb.com and try it in the source for yourself, you might find it easier to work out the problem that way, i dunno. - Xlithan - 09-03-2007 I want to use the compression, I just didn't think it was important while just testing. I've used the ZLib compression option before and still got the same error, i'll try the other one, see if it works. [edit] Ok I can log in with the NT Native compression, but I still get an invalid picture message on the map editor. - Xlithan - 09-03-2007 I'll add this to a later version of Oasis Source then. It's not insanely important, but I guess it's a nice feature my users would like to have. - Xlithan - 09-03-2007 I'll look here again after the weekend is over. I work late nights so don't get much time to do computer stuff over the weekend. - Xlithan - 12-03-2007 Ok I got the map editor working, but I'll need you to help me fix the item editor and NPC editor (And anything else that loads the gfx into a picture/image box). thanks. - grimsk8ter11 - 12-03-2007 common gameboy, you can figure it out based on the map editor - Xlithan - 12-03-2007 I tried using the source Verrigan posted in a similar manner but I still get an error. Unlike other people I actually attempt the problem at hand first before asking for code help. I've stripped down the client to include no editors what-so-ever, so what I have now will work fine. I don't think the development kit needs this, as I would expect developers would need to look at the gfx files anyway. So thanks for the help. Re: Verrigans Image System - wisefire - 17-01-2008 Allright. Im attempting to add this... I have the same problem GameBoy was getting; "Invalid Procedure Call or Arguement" On, Set DD_TileSurf = DD.CreateSurface(DDSD_Tile) Ive set the GFX_EXT, and Im sure the password is correct. I used NT Native Compression. Although I hoverd over the imagehieght and imagewidth and there 0... I read were gameboy noted when he loaded the image as NT Native, it worked. Well, It's not for me... Any Help? Re: Verrigans Image System - Dragoons Master - 17-01-2008 Some times is a problem with dll/ocx registering. Re: Verrigans Image System - wisefire - 18-01-2008 Dragoons Master Wrote:Some times is a problem with dll/ocx registering. Eh, Took it out and learned how to use resource files for images, Yet I don't understand DirectX Enough to blt from a resource file. So I added this again, and it worked. But It laggs extremley. Any reason why it would? Re: Verrigans Image System - Xlithan - 13-03-2008 wisefire Wrote:Dragoons Master Wrote:Some times is a problem with dll/ocx registering. Same here, I'm using seamless scrolling maps. Maybe that's an issue? |