Shouldn't make a visible difference, but it is more correct this way. The actual bug I was trying to fix ("cut off" Herman's head appearing after restoring text background) is actually an animator code bug...
Currently const char * points into some random buffer with unclear
lifetime.
Instead use Common::String which ensures lifetime as long as a reference is
held.
This also removes the need of copying into existing buffers in HoF and MR.
UnkBuf* are gone as well.
Co-authored-by: athrxx <athrxx@scummvm.org>
- add support for the Sega Font and add text display methods at least for the sequence player
- finish sequence player (add all missing opcodes and other missing code portions)
- some improvement to the resource class
- some renaming and cleanup
The invalid table access takes place in several more locations. I missed the location that is actually responsible for the reported bug in my last fixing attempt (due to the fact that this bug is based on undefined behavior that results from the invalid mem access: in MSVC the bug is nonexistent, with GCC builds it seems to depend on whether they're optimized or not). The location that actually requires the fix is in KyraEngine_MR::enterNewSceneUnk2(). I have now fixed all locations where the table can be incorrectly accessed. The other locations have been marked with comments.
Reorganize all files in sub directories. The file placement isn't as intuitive as it might be for other engines, which is probably the reason why this hasn't been done before.