Jump to content
  • Advertisement
Sign in to follow this  
Solokiller

Request for script builder add-on

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

Would it be possible to change CScriptBuilder::LoadScriptSection so that the fopen call is handled by a virtual function? Our game engine uses a file system where a file can be located in one of several paths, so one path could end up pointing at another one. Being able to override this code would make it much easier to handle this case.

Share this post


Link to post
Share on other sites
Advertisement

Sure. I'll consider it for a future release.

 

Feel free to customize the add-ons. :) They are just provided to give a starting point to the application developers, but they are not required to be used as-is, or even at all. 

Share this post


Link to post
Share on other sites

I know :) I'm trying to minimize the amount of changes made to the add-ons so they'll always be up-to-date without having to change things too much. I figure it would also help others.

Share this post


Link to post
Share on other sites

Come to think of it. Overloading just the fopen call is probably not so useful. 

 

The CScriptBuilder already allows you to override how files are found by setting the IncludeCallback. You can use this to determine the correct file name, or even load a section from memory in case you're using some kind of virtual file system.

 

 

I'm thinking that instead of overloading the fopen call, I'll add a new method AddSection(const char *sectionName). By default, this method will simply call the AddSectionFromFile, but if the IncludeCallback is set it will invoke that to allow custom lookup of the file.

Share this post


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

  • 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!