Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / resource problems (please help)

Author
Message
Kawakami
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location:
Posted: 27th Mar 2008 20:49
Okay, so i know this question has been asked a LOT, but i've tried each entry for Dark GDK after searching for resource, and they all don't work.

I simply want to put my images into a resource file and then take them out later in the code so i don't have to send each image with the final program. Can someone please help me by giving me steps through creating the resource file and then getting the images out?

Thanks in advance =P

If we didn't have school, we would all be stupid. But that doesn't mean you have to like it.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 27th Mar 2008 22:58
Quote: "so i know this question has been asked a LOT"
You do? No answers were posted? Hmm.

Ok... You can't! But wait! There is hope!

1: Encrypt/decrypt the images so outside they are ...Yucky...

2: Make encrypted or otherwise MEMBLOCK files - and load them as binary - then convert to image in RAM

Otherwise - no go. I know the benefits of resources but you can't do it without delving into DirectX or Windows API.


Best of luck
Jason

Kawakami
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location:
Posted: 27th Mar 2008 23:02
wait, so you mean like open the image in notepad and then do something with that? =3

If we didn't have school, we would all be stupid. But that doesn't mean you have to like it.
jason p sage
17
Years of Service
User Offline
Joined: 10th Jun 2007
Location: Ellington, CT USA
Posted: 28th Mar 2008 00:54
Not exactly... I mean ...

Well... I guess I may have packed alot of stuff in that lil post.

Bored? If not ...you will be...

First - Encryption doesn't need to be federally regulated 256 bit double password key and challenge - duel key algorythm... blah blah blah

If I made a program that opened a bitmap file as a file of BYTE - and then opened a destination file of byte - and went through and just READ a BYTE - then "change it somehow", and then WRITE it to my new file... I probably DAMAGED that file.... UNLESS

I did the EXACT same thing in reverse... read a byte - do what I must to "change it back somehow" and write it... when I am done - in theory - I have just RESTORED the file to its original State.

This is a SLOW way to do it also... as reading a file a byte at a time - well.. there are better ways to accomplish this sort of thing.

First - the "Change it somehow" and "Change it back somehow" can EASILY be done safely with the XOR operator.



Ok - that's a $0.50 primer in encryption... but the other thing I mentioned uses DBPRO stuff that's built in to your advantage.

There are DBPRO commands to load image, make memblock from image, and save memblock.

If you do the following to PREPARE your media:

1: Load image
2: Make Memblock from image
3: Encrypt the memblock
4: Save the memblock

Then in your game you do the opposite:
1: Load Memblock (filename of your encrypted saved memblock)
2: decrypt the memblock
3: make image from memblock

You have more or less prevented the casual person from having access to your media!

I hope this helps.

Kawakami
18
Years of Service
User Offline
Joined: 20th Aug 2006
Location:
Posted: 28th Mar 2008 18:35


ill try to do something like that

If we didn't have school, we would all be stupid. But that doesn't mean you have to like it.

Login to post a reply

Server time is: 2024-09-29 15:24:40
Your offset time is: 2024-09-29 15:24:40