Add to c++ ?

Started by
2 comments, last by DonatO 22 years, 3 months ago
Hy ... how can I add to my c++ code, my files(animations,picture,etc.)?
Advertisement
Those are all external resources. You''ll need to figure out the file formats in which those resources are stored, use C/C++ to open and read in the file data and then manipulate them as desired. Fortunately for you, though, there are both archives of file format data (see wotsit.org) and libraries for loading, displaying/playing and otherwise manipulating various media formats.

Post a little more information and we''ll be happy to give you more specific instructions.

Happy Hacking!

[ GDNet Start Here | GDNet FAQ | MS RTFM | STL | Google ]
Thanks to Kylotan for the idea!
If you''re using Visual C++, You can add them as resources and they''re put into the .exe. Loading them externally is better, IMHO.


Make games, it''s fun
I''d say that it depends. If you have them in the executable, your app will take slightly longer to load--and definately longer on media such as CD''s. If you have them externally, the app loads faster, but loading individual resources into memory is a lot slower than loading one big chunk. So, you could compromise by keeping your resources in a single data file like id Software does, but for most "small" projects it''s fine to put resources in your app provided that it won''t grow beyond, say, 3 MB.

This topic is closed to new replies.

Advertisement