My initial suggestion to fix the issue was made in 163023a, which broke
the save slot selection logic. The actual save slot selection problem
was fixed in commit 2ca36ab
If the specificed savegame doesn't exist, start the game from the
beginning. Before, it would just hang. The error handling is still
quite primitive, though.
Some of the "wall broken" checks were inverse, resulting in the waterfall
sound being incorrectly heard when the wall was broken. Also,
simplified some of the "wall broken" checks
This looks to be a logic error in the constructor of module 2400, since
all the other modules do not create scenes with the global entrance
number when they are instantiated without an entrance (i.e. when
loading). With that logic error, all the code that handled Kleymen's
entrance to a scene after restoring was incorrectly skipped
SmackerPlayer now creates a surface in the constructor and deletes it in the destructor. There will be only this surface during the lifetime of the player, so there shouldn't be any issues any more when the player is reused for different Smacker files. This is imo nicer than to remove/add the surface.
I kept the several openSmacker since it wraps some code which is nice.
These are shown on each scene change, but should no longer be needed
to be enabled by default, since we can now use the debugger to check
and change the current scene
Leaving the panel in scene 1105 only worked if the panel was open.
If the panel was closed, nothing would happen on the first click,
and on the second it would crash. If I understood this correctly,
it was because trying to leave while the panel was closed would
(incorrectly) mark it as open, and then it would crash when trying
to remove the objects behind the panel from the scene.
The effect of the removed code was to bypass the potion-mixing
puzzle while shrunken. The puzzle works fine for me, so there's
no reason to keep this bypass. Also, it caused a dead code
warning, CID 1022345.
Wrapped the code in the SetUpdateHandler(), SetMessageHandler(),
SetSpriteUpdate(), SetFilterX(), SetFilterY() and NextState()
macros in "do { ... } while (0)". Otherwise you may fool yourself
because in "if (condition) macro();" the "if" will only cover the
first statement of the macro.
CID 1022340, 1022341, 1022342, 1022343
When a new Smacker is opened, the old Smacker surface is deleted
and a new one is created. Therefore, it has to be removed from the
scene and the new one has to be added.