PocketMatrix forums

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

Custom Resources

Ok, I have a custom binary data file that I can load in eVC. However, I would LIKE to import that file as a resource since I will have many more of them. But, the traditional means of fopen-ing the file no longer seem to apply, and if I try it this way the program crashes.

So what I'm asking is, if anyone can point me in the right direction on how I can read this custom data file as a resource as I am slightly lost.

JJB
I think what you are asking is can I include binary data in a Resource Script, which you can.

Here is an example from my resource script (.rc file):

Code:

/////////////////////////////////////////////////////////////////////////////
//
// Data
//

IDR_TILE RCDATA DISCARDABLE "data\\reptile.565"

JongJungBu,

check this thread

there is some code to get a pointer to a TGA that is stored in the resource.

cryo
Thanks Cryo! I shall have to use that.
Thanks for the response too Dave, although that wasn't exactly what I was asking :). I had included the data as a resource already, I just could not access/load it from within the program. Meh!

JJB