zlib can be found here:
http://www.gzip.org/zlib/
They will tell you what it is and what it does. And if you want a precompiled lib file just use the one in my filepack example up above
Printable View
zlib can be found here:
http://www.gzip.org/zlib/
They will tell you what it is and what it does. And if you want a precompiled lib file just use the one in my filepack example up above
How bout takin a page from the kpd team (api-guide)
make a graphics guide lol
jus my lil suggestion :D better than reading a tutorial :p
If you want to change the bmp format so normal bmp viewers can't read it simply use another "magic number". ALL bmp files start with the number 'BMP ', so just change that to e.g. 'CMP ' and no normal image viewer will open the file.
Of course this is extremly easy to hack. You could do it in a text editor.
When i make games, i use a Main Loop, that loops once a milliesecond or something, and that loop could look like this:
VB Code:
'Inside Main Loop: MovePlayer 'Sub that moves the player MoveObjects 'Sub that moves objects like bullets. DrawObject 'Sub that draws the objects on a buffer DrawPlayer 'Sub that draws the player on a buffer FlipBuffers 'Sub that makes BackBuffer to FrontBuffer
And the MoveObject's sub could look like this:
VB Code:
'Inside MoveObject Sub: for i = 1 to UBound(GameObjects) GameObjects(i).X = GameObjects(i).X + GameObjects(i).speed next
A speed that is positive will make the object move to the right, negative will move it to the left.
I could do that, only make my file names so confusion that people won't know that file it is:) some thing like: "22034ffr4200.sndp" which would actually be a texture, although it is easy to open it if you know it's a picture file, just use the "open with" screen that comes up when you try to open a file with a strange ending, lol.Quote:
Originally posted by CornedBee
If you want to change the bmp format so normal bmp viewers can't read it simply use another "magic number". ALL bmp files start with the number 'BMP ', so just change that to e.g. 'CMP ' and no normal image viewer will open the file.
Of course this is extremly easy to hack. You could do it in a text editor.
I mean something slightly different. If you open a bmp in a text editor, the first 2 bytes will be BM, which is the so-called "magic number". Since the file ending is by no means a real information what kind of file this is, all files (or nearly all) have some signature that marks them as being what they are. If you change this to, for example, CN, no image viewer will open the file except yours, which knows what to expect.
e.g. one of the bitmaps that comes with windows begins like this:
BM¸C...
If you change this to
CN¸C...
PSP will give you this error message: "This is not a valid BMP/DIB/RLE file".
But since there is no actual information stored in these two bytes you can simply ignore them and load the file anyway.
Take a look at the filepack class up above... it will accomplish the same task as zipping a file. And its very fast... so you can pack an entire folder to a single file (0AE987C4D.bla) or whatever...
Ok, I have a picture where I changed the BM beginning to BMWX5, but I use the LoadPicture method to load in a picture, so how do I tell VB to Look for BMWX5, instead of BM?
Only alter the first two chars, all others contain information!
You can't tell LoadImage that. Unless you write your own loader (not that hard) you can only copy the file to a temporary file which has the first two bytes corrected, then load this temporary file.
If that's the case, then wouldn't it be easier to store all your pictures on a seperate form and save them to Disk when the program runs and delet them when the program ends?
Wait, I have a lot of large size pictures and that wouldn't work for me, I guess I'll have to look into writing my own load picture sub, I'm using DX7, will this make my life easier or harder?
It doesn't matter, your DX version has nothing to do with your image loader.
You could also directly alter the file to be usable and alter it back once you're done loading, but this means the file is vulnerable for a short while.
If you just want a simple hack, change the first 2 bytes of the file to something like "my" and change the extension to something like ".my"
Also, when ur program starts, change the first 2 bytes back like this:
VB Code:
Dim im As String Dim bt As String im = App.Path & "\Data\09D2.my" Open im For Binary Access Read Write Lock Write As #1 bt = "BM" Put #1, 1, bt Close #1
Of course, you can put that code in a function and call it for each file in your data folder.
Yep, thanks that works. I used the same code again when the program ends to change the picture back to "My" again. It is very simple to hack, but that's alright.
im glad someone thinks im useful.
Don't worry Momad :) I don't :D:D:D It's a nice cheap hack someone like me wouldnt've thought of! :)
Well tis best to keep it as simple as possible.
Hey guess what, i ran into a "MoMad" today and they think im the "Fake" MoMad,... check it out:
http://www.megarad.com/modules.php?n...thread&tid=229
Hehe... I know there will never be another Sastraxi... Google it, EVERYTHING on there is basically a resume of what I've done (please don't look at the sites, they all suck...)
The thing is, ive been momad far longer than that momad. So I should be the real momad... how do you know which gets to be the real one and which is the fake one? cant we just share the damn name!! LOL. Yea, sastraxi is such a unique name. lol. I used to think momad was unique untill now... lol.
Also, just wait a few years, there might be a whole groups of sastaxis (just cuz they dont have a website dont mean theyre not there) :)
Maybe I should re-name myselft to Sastraxi just to annoy Sastraxi:), lol! Thanks MoMad, you are very useful, so is everybody that gives answers:).
There is some other Zaei out there (at least the name in AIM and hotmail was taken), whom I desire to hunt down and kill =). Silly, too, since I got this name by pulling letters out of a hat =).
Z.
Well, I would be happy to write a *gulp* large (but effective) tutorial on BitBlt. I have only really just learned it, but I think the best way to learn is to try different things, and warn others about the pitfalls you had along the way :)
If you wan I can start writing one up, :)
I can give some tips too, inserted in your BitBlt tutorial, if you want. Stuff like inverse masking [colour dip], semi-transparent (err.. to a point) blitting, and other effects.
Ok, well I'll get to work! should be ready in about 2 days... :p
Ahh, I'm unique except for this:
The URL is truncated, it's something like cornedbeefandslawfishQuote:
Corned Beef and Slaw Sandwich
Corned beef and coleslaw sandwiches baked in the oven.
http://www.cookingcache.com/cornedbee...