Norbert wrote: ↑April 22nd, 2018, 2:34 pm
It's not clear to me what is the relevance - if any? - of the closed gate.
Maybe I overlooked something in your post.
The kid bumps into the gate only if it's closed.
But it does not have to be a gate, it could also be a wall, or a gate top.
The mod uses an initially open gate because it forces the player to find the close button.
Norbert wrote: ↑April 22nd, 2018, 2:34 pm
Why won't this work?
Because of this:
https://github.com/NagyD/SDLPoP/blob/ma ... 02.c#L1139
(In that code, Char=shadow, Opp=prince.)
The shadow regenerates the kid's HP only while the shadow is made "stuck" offscreen by being initialized in every frame.
The game keeps the shadow "stuck" while the prince's x coordinate is at least 150.
That place is near the middle of the fourth tile from the right.
This is so that the shadow won't appear until you run over the loose floors on the original level 12.
Once the prince is left from that place (in any room!), shadow_initialized becomes true (1), and do_init_shad() is never called again (until you re-enter the shadow's room), and the shadow falls into the room.
In your video, you enter a room from the left, that is when x becomes less than 150.