Bitmap Encryption
I was curious as to how one goes about encrypting bitmaps. Some call it "offseting" the bitmap. I do not understand how this is done, and I''de also like to know how one goes about storing everything into one datafile and accessing it instead of having a crap load of files in seperate directories.
This includes:
Maps, Sounds, Music, Objects, Npcs.. basically everything.
If anyone has a good online tutorial I could read it would be greatly appreciated.
There was an article here, on gamedev, about the resource files. Look it up.
Besides the resource file tutorial, I would *guess* (I haven''t done it) offsetting a bitmap means you''d add an offset to the beggining of the file so no program could open it. So to "encrypt" your bitmap''s simply write some string or a couple bytes to the beggining of the file. Then when you go to load the bitmap make sure you offset you memory code by that number of bytes.
You could also make your own file format if you want to.
Hope this helps!
See ya,
Ben
You could also make your own file format if you want to.
Hope this helps!
See ya,
Ben
__________________________Mencken's Law:"For every human problem, there is a neat, simple solution; and it's always wrong."
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
"Computers in the future may weigh no more than 1.5 tons."- Popular Mechanics, forecasting the relentless march of science in 1949
At my web page I have an example of creating your own graphics format and an example of combining several bitmaps and sound files into one animation file.
I never bothered to finish the animation example. Although most of the code for the sound part is there, I never bothered to finish it. These two examples may give you some ideas.
After a quick look at the zip file I noticed that I left out the compiled exe. No big deal, just build the project. I also left out all of the image files. For this reason it might not run. None the less, the code should be of some use.
To make things better you should probably incorperate some sort of directory structer. I don''t believe it would be that hard to accomplish; simply list the directorys at the beginning of your resource file (maybe in a header) and how far into the file that directory is offset.
I never bothered to finish the animation example. Although most of the code for the sound part is there, I never bothered to finish it. These two examples may give you some ideas.
After a quick look at the zip file I noticed that I left out the compiled exe. No big deal, just build the project. I also left out all of the image files. For this reason it might not run. None the less, the code should be of some use.
To make things better you should probably incorperate some sort of directory structer. I don''t believe it would be that hard to accomplish; simply list the directorys at the beginning of your resource file (maybe in a header) and how far into the file that directory is offset.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement