Page 1 of 1

Embedding graphics...

PostPosted: Feb 19, 2002 @ 12:34am
by brendan
Hello all, I've some pics that I wan't to emmbed into my game, at the moment they are .jpg, I assume it's best to convert to .tga, then gzip so I can use teh easyce stuff to decode etc. my question is how do I add them as a resource with evC, so I'm not loading them from a file off of the system, and how do I reference them with the easyce funcs. some code examples would be great etc :wink:

-thanks

using resources

PostPosted: Feb 19, 2002 @ 11:06pm
by golan trevize x
There's a bit of code in a previous on these forums for loading a TGA from resource. Even with that, it took me a while to figure it all out. But it can be done.

If you want to load a Gzipped file from resource, that's harder. Sure you can get the memory pointer, but then what? The nice gzopen, gzread functions from zlib only take file names. I fiddled around with this uncompress method for hours before giving up and sticking with separate files.

solution ?

PostPosted: Feb 19, 2002 @ 11:20pm
by brendan
What it, wait for it.... What if you write the resource to a temp file on the PDA, then use it... then delete it when the program has finished with it, shutdown..... ?

good idea or what, and don't say "or what" :)

-Brendan