Community

SCI Programming => SCI Syntax Help => Topic started by: Doan Sephim on December 01, 2013, 11:18:12 AM

Title: preload text
Post by: Doan Sephim on December 01, 2013, 11:18:12 AM
I was looking through the old tutorials and came across a function called "preload text" which loads the text resource into memory for easier access.

I have to questions: Does this load it into heap space (that would nullify the best part about using text resources)? And with computers as fast as today and the programs being so tiny, is it really even necessary to do this?
Title: Re: preload text
Post by: Collector on December 01, 2013, 11:41:05 AM
Perhaps Gumby would know where it loads it, but heap would still be a concern. We are still using the same interpreter and in DOSBox, the same environment. I am pretty sure that ScummVM/FreeSCI do nothing to extend heap at all.

Perhaps the intent was to load a string that would be used repeatedly, but it would still be desirable to unload it from heap when done with the resource.
Title: Re: preload text
Post by: gumby on December 03, 2013, 05:15:48 PM
I've never used the preload function.  Digging in the Studio help file indicates this:

Quote
The preload text block tells the interpreter to load the complementary text resource to the script. When loaded, you can use text resources to store your text rather than having them built into the script. These are mainly used for making multilingual games.

I honestly don't know what this command will do with regard to heap.  I'll do some tests and report back.