I hope I don't regret doing this so close before I want to do a release, since it's a pretty

major change to ACS's workings. However, I had an epiphany yesterday and just had to do this, since it seems like too big a deal to hold off until a later release:
- Dynamically generated strings returned via strparam and get(user)cvar now last as long as they
  need to. They do not disappear at the end of each tic. You can now safely store them in
  variables and hold on to them indefinitely. In addition, strings from libraries no longer
  require you to load the exact same libraries in the exact same order. You can even store a
  library's string in a world variable and retrieve it on another map that doesn't load the
  library at all, and it will still be the correct string.
- ACS library IDs now only get 12 bits instead of 16 so that each string table can hold up
  to about a million strings instead of just 65536. This shouldn't be a problem, although it
  means that save games that had strings with the larger IDs stored in variables are no
  longer compatible. Since many saves don't involve libraries at all, and even many that do 
  are not actually affected, I'm not bumping the min save version. The worst that can happen
  is that you get no text at all where some was expected.

SVN r4295 (trunk)
This commit is contained in:
Randy Heit 2013-05-30 02:22:47 +00:00
commit 0eb72156ed
4 changed files with 749 additions and 45 deletions

View file

@ -198,6 +198,9 @@ void G_ClearSnapshots (void)
{
wadlevelinfos[i].ClearSnapshot();
}
// Since strings are only locked when snapshotting a level, unlock them
// all now, since we got rid of all the snapshots that cared about them.
GlobalACSStrings.UnlockAll();
}
//==========================================================================