This is a major change, which allows us to read room texts directly
from RDF files in a deterministic way. The previous attempt to read
texts on the fly failed with some texts at runtime, which made it
unreliable. Additionally, the scope of all room text IDs has been
reduced to each room.
With this change, it's now possible to support text in CD and floppy
versions and support multiple game languages, without hardcoding all
of the game texts in the engine source.
This is 50% done (29 out of 55 rooms), with the following left to be
done:
- MUDD mission rooms (need to improve the text reader for these)
- TRIAL mission rooms (need to improve the text reader for these)
- SINS mission rooms (need to improve the text reader for these)
- The rest of VENG mission rooms
The DEMON, TUG, LOVE, FEATHER and part of the VENG mission rooms have
been converted.
- The screen name and map name code have been merged and simplified
- Some usage of SharedPtr has been adapted
- Duplicate code for loading the room map has been merged
- The "actions" command has been imported from the tools code
- Cleanup
The whole Demon chapter has been converted to the new logic.
The offsets for the extra room messages have been hardcoded, for now,
inside loadOtherRoomMessages(), until we figure out how they are
referenced.
Rooms DEMON0 and DEMON5 have been partially adapted to the new logic.
This isn't yet fully functional, for the following reasons:
- We only read the main text block. There are also some others which
are not handled yet. The unhandled blocks have been kept in text.cpp
- We load text in dictionaries, splitting the strings in look and talk.
However, there's a third category (look with a talker), which isn't
handled yet
- Text is loaded per-room, but there are enhancements where text and
samples are loaded from other rooms. These need to be refactored
- Disable duplicate if block
- Fix potentially uninitialized variables
- Change _activeMenu to be a regular pointer, instead of a SharedPtr - it was not
initialized correctly
- Fix struct packing in structs with pointers to complex objects
- Fix sound initialization
- Fix memory leaks (handles to files which were never deleted)