A very barebones implementation of a state based game system. The game
itself is modelled as a series of 'states', a state being an object that
contains all code and data required for a particular 'screen' the game
is in (for example, all 3D geometry data would be loaded in the 'game'
scene, while all inventory data would be contained in the 'inventory'
screen).
As everything in the original SH3 is hardcoded, this
significantly reduces the amount of code required, being that we can
just feed a scene name (e.g `mr3f) into the state and have it worry
about loading everything.
There is a lot that could be refactored here, as the code is a little
bit janky, but for now this works.
A very barebones implementation of a state based game system. The game itself is modelled as a series of 'states', a state being an object that contains all code and data required for a particular 'screen' the game is in (for example, all 3D geometry data would be loaded in the 'game' scene, while all inventory data would be contained in the 'inventory' screen).
As everything in the original SH3 is hardcoded, this significantly reduces the amount of code required, being that we can just feed a scene name (e.g `mr3f) into the state and have it worry about loading everything.
There is a lot that could be refactored here, as the code is a little bit janky, but for now this works.