Changed the Button class so it doesn't require subclassing. Added a visible button to the Help screen. Also moved several classes' constructors to fix compilation errors.
SoundManager is now responsible for loading and storing all common sounds (sounds with their own BOOT chunk). All playSound() calls with a hardcoded channel ID now use the chunk name instead. Also fixed some sound inaccuracies when switching between states.
Added a \0 to every instance of a char buffer being loaded into a Common::String. Fixed an instance of a large buffer getting repeatedly allocated and deleted inside a for loop. Fixed an instance of a small char buffer being unnecessarily allocated on the heap. Also added a readFilename() convenience function to util.h for reading 8-character filenames found in the data.
Made all states (Scene, Credits, Help, etc.) singletons, as well as subclasses of a common State parent with a proper state switching API. Moved the OnPause virtual function from RenderObject to ActionRecord and hooked it into the state switching code. Also got rid of the NancyEngine pointer that got passed around between most classes, and replaced it with several convenience macros. As a result of these changes action records that render to the viewport no longer disappear after opening the menu, and state changes feel snappier.
Renamed all functions relating to the engine's internal state so they only mention the word State instead of GameState. This is to avoid confusion between them and functions relating to savegames, whose names already include GameState.
Fixed a lot of code formatting issues, including switch case statements being indented, some curly braces not being left hanging, if and for statements not being surrounded by newlines, some double spaces, and more.
The menu and help buttons on the sides of the frame are now functional, and the help screen is now also accessible. Also replaced the Frame class with a more general FullScreenImage that will be used across different game states.