This can be triggered by walking 1 screen left and 1 screen down from the start.
When loading a new map the game resets only onMap for all members of the _npcInfo array, but does not always check that value when iterating over the (valid and invalid) entries of the array.
The error is triggered quite easily. You can get that right at the start, walking 1 screen left, engaging multiple monsters simultaneously.
That code looks a bit suspicious per se, since it still tries to return a value of -1 after the error call. But maybe that's just to satisfy some compiler. I've replaced the error with proper handling of the return value and I've also added in-bounds-checks for all uses of the sound handles.
The griffon engine claimed to surport the kSupportsReturnToLauncher
feature, but in practice it did not work as it only checked the
EVENT_QUIT and not the EVENT_RETURN_TO_LAUNCHER.
For each engine:
- Make a new folder detection
- Move detection-related files inside the folder
- Add a new module "enginename/detection"
- Add DETECT_OBJS here
- Adjust the normal engine module to remove detect_objs
- Adjust every file for the new changes.
This also fixes a problem with the Griffin engine, which
although it was using the new type saves, was using a
target.s?? format, so wasn't listing files in the GMM
save dialog
This was a bug present in both the original FreeBASIC code and the
C port by Dmitry Smagin. So having no referemce, I am not completely
sure this is the correct way to fix it, but I have not detected any
issue playing the game after this change.
If the autosave slot doesn't yet have any file in it, when the
GMM save dialog is open, the autosave slot will show a default
'Autosave' entry which is write-only, to prevent users
accidentally making a savegame in that slot
This is primarily future-proofing. Many games either show a message
or do some other UI action like closing an open game menu, and
obviously that should only be done when a savegame created by the
user is done, rather than for regular autosaves. By making this a
flag, when engines override saveGameStream, they'll be able to
tell if it's an autosave, and only do UI changes if not