Load a tga from a custom resource

Started by
3 comments, last by vash999 15 years, 6 months ago
Hello i`m new to the forum, and i have been following the lessons from nehe, and i have problem, i want to load a tga image compressed or uncompressed from a resource file; how to make a custom resource file is explained in: http://gpwiki.org/index.php/C:Custom_Resource_Files so what i want is a mix between the custom resource file and the tga load, so i can load tga files in the way that nehe explained from the custom resource files. sorry for my english i speak spanish.
Advertisement
it's pretty simple, the hardest part is finding the starting point for the file as when you have a resource file each file does not start at 0 but rather any arbitrary number well defined in whatever resource file you have.

Once you got that immediately after you open the file use fseek to shift forward to that file beginning.
Now you can load the tga normally
ok i will try that, thanks!
i can´t make it work, can someone please show me an example.

i want to load 32 bits tga compressed.
well after several try and test i figured it out.

thanks lc_overlord for the hint. ;)

This topic is closed to new replies.

Advertisement