PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Embedding graphics...

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
golan trevize x · 19 Feb 2002, 22:06 UTC — using resources
There's a bit of code in a previous topic 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.
brendan · 19 Feb 2002, 22:20 UTC — solution ?
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