Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

PsycoBlade

vC++ question

This topic is 6114 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Lets take into consideration the following scenario: 1. I have a small program that inits PR and loads a PRO file of a cube with one texture, then rotates that cube (like the simple object example) 2. I add the texture file (TGA) and PRO file into my project as resources so that those files will be contained inside of the EXE when it is compiled. How do I load the PRO file? I never learned how to load stuff from resources like that, so I was hoping someone could help me out. Thanks a bunch! -Rich

Share this post


Link to post
Share on other sites
Advertisement
When you add your texture file in the VC++ project, you also define a "tag name" which is simply a define.

Look at your resource file and you should know the name of the define.

My 2 cents

Amadrias

Share this post


Link to post
Share on other sites
All you need to do is make some PR library functions that load from the resources instead of from the file.

Call PRLIB_RegisterLoadFunction and PRLIB_OpenLibrary with whatever filename . the extension you added the functions for.


To load the resources into memory you could use something like LoadResource.



Gary

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!