https://github.com/NagyD/SDLPoP/blob/8d ... 06.c#L1650
The problem is if you have multiple doors the code is going to use coordinates of the last drawn door. So that clipping code should be calculating those values based on the kid's tile position instead of using those variables.
It is pretty easy to do for the right side clipping.
Code: Select all
if (get_tile(Char.room, char_col_left - 2, Char.curr_row) == tiles_16_level_door_left) {
obj_clip_right = (col_xh[tile_col + 1] << 3) + 48; // col_xh needs to be moved into the "data.h" file instead of being a constant
if (settings->tbl_level_type[current_level]) {
obj_clip_right += 8;
}
obj_clip_top = leveldoor_ybottom + 1;
}
An interesting fact is PoP2 has the same bug. You can see the lack of clipping when going up the stairs, particular in cave levels. Also it does not immobilize controls so you can use left and right buttons to make the kid go up the screen.