Open postcasio opened 5 years ago
While any .sgm file can be used
This gave me pause and got me to double-check the code. It turns out the game-loading code is a bit weird and double-pronged. While you are correct insofar as spherun will accept any .sgm
file on the command line and use that to establish the game's root directory:
https://github.com/fatcerberus/minisphere/blob/master/src/minisphere/game.c#L133
...when it comes time to actually load the game, it's still hard-coded to load only @/game.sgm
:
https://github.com/fatcerberus/minisphere/blob/master/src/minisphere/game.c#L196
So even if you point it at something like foobar.sgm
, it will only use its path to establish a root for @/
and then return to its regularly scheduled programming. If neither game.json
nor game.sgm
exist in the same directory, it will error.
While any
.sgm
file can be used, the check for JSON manifests hardcodesgame.json
as the filename. Callingspherun other.json
will produce no errors, and immediately exit. It should instead attempt to loadother.json
as a game manifest, and print an error if it's not valid.