fix first phase of edge rendering post processing

This commit is contained in:
Lephenixnoir 2023-01-01 22:21:45 +01:00
parent a26f8e9e4a
commit a6afdef478
Signed by: Lephenixnoir
GPG Key ID: 1BBA026E13FC0495
1 changed files with 6 additions and 8 deletions

View File

@ -55,7 +55,7 @@ void Windmill::draw()
draw_objects();
// post traitement pour afficher les angles vifs
// draw_post_treatment();
draw_post_treatment();
// affiche le corps du personnage
//draw_body();
@ -212,20 +212,18 @@ void Windmill::draw_post_treatment()
if (right < MAX_DEPTH_Z_BUFFER)
{
mask = 128 >> ((x+1) & 7);
vram[address>>3] |= mask; // FIXME: Wrong VRAM offset if viewport isn't (0,0)
//ML_pixel(x+1, y, ML_BLACK);
vram[(y << 4) + ((x+1) >> 3)] |= mask;
}
if (bottom < MAX_DEPTH_Z_BUFFER)
{
dpixel(x, y+1, C_BLACK);
//ML_pixel(x, y+1, ML_BLACK);
mask = 128 >> (x & 7);
vram[(y << 4) + (x >> 3) + 16] |= mask;
}
} else {
if (right == MAX_DEPTH_Z_BUFFER or bottom == MAX_DEPTH_Z_BUFFER)
{
dpixel(x, y+1, C_BLACK);
//ML_pixel(x, y, ML_BLACK);
mask = 128 >> (x & 7);
vram[(y << 4) + (x >> 3) + 16] |= mask;
}
}
}