The "pixelation" is just the wall behind the pillar appearing where it shouldn't.
Both the previous parts and this part of the bug is caused by the following code:
Code: Select all
restore_peels();
draw_wipes(0);
draw_table(0); // backtable
//printf("midtable_count = %d\n", midtable_count); // debug
draw_table(3); // midtable
draw_wipes(1);
draw_table(1); // foretable
When the prince is drawn, the game stores what is behind him on the screen. This is called "peel".
In the next frame, this stored image is restored to the screen (restore_peels). (The name comes from "peeling off".)
Since the peel image is made before drawing the foreground images, restoring it will erase any foreground image where it overlaps the prince.
The part of the big pillar at the top of the screen is drawn using a background wipe (black background) and a foreground image.
Peeling will erase the pillar image and restore the black background.
In my fix for the previous part I removed the wipe if the tile above the prince is the top half of a big pillar.
In this part, an additional wall image is drawn after the background wipe, but still before the prince, so the peel restores that instead.
The question is now, why does not happen only on the top of the screen and not elsewhere?
(Here is the commit: https://github.com/NagyD/SDLPoP/commit/ ... 09fde76d8c )
My idea is to move draw_tile_floorright() into the if block:
Code: Select all
#ifdef FIX_BIGPILLAR_JUMP_UP
if (curr_tile != tiles_9_bigpillar_top)
#endif
{
draw_tile_wipe(3);
draw_tile_floorright();
}