• Advertisement
Sign in to follow this  

runtime resources

This topic is 2866 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

Is it possible to create run time resources like say for a map editor , if object is a resource but it means creating an ID each time to the resources.h file so how do you achieve this?

Share this post


Link to post
Share on other sites
Advertisement
Are you trying to add resources to the file, or are you trying to get a resource from the file without knowing it's ID in resource.h?

Share this post


Link to post
Share on other sites
I think trying to write each new ID to the resources.h file as your adding objects to the level, but resources.h is source code so how would you know how many ID's you need ?,

Share this post


Link to post
Share on other sites
The .h file is only processed when you compile your application, so it won't affect the running executable at all.

It's also non-trivial to update the resources of a running application; the Win32 API only provides functions to modify resources in .exe files, not in running processes.

Why not modify your code so it doesn't have to read data from resources instead?

Share this post


Link to post
Share on other sites
ok so how do level editors save the objects when the map is saved?,so the game knows about the objects even tho its not running and stored somewhere.

Share this post


Link to post
Share on other sites
They won't use resources. Resources are for static objects that never change, like cursors and icons. They're probably saving the map and the objects to a file and loading it when they start up.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement