aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlec Murphy <alec@checksum.fail>2020-04-04 09:53:21 -0400
committerAlec Murphy <alec@checksum.fail>2020-04-04 09:53:21 -0400
commit6cdc82553f6dae873905264c00ff1766782d329a (patch)
tree81b6ca82fbff9dc80cf15add5b565d6b82a4dd4f
parent6a75c8cae4d5aefaa4f864bde11d24a5397501b2 (diff)
Optimize draw_it() and temporary fix for bomb explosions causing Page Fault
-rw-r--r--Video.HC4
1 files changed, 2 insertions, 2 deletions
diff --git a/Video.HC b/Video.HC
index f3ad205..2bea2d4 100644
--- a/Video.HC
+++ b/Video.HC
@@ -19,8 +19,7 @@ U0 video_draw_it(CDC *)
gr.dc->color = BLACK;
GrRect(gr.dc, 0, 8, 640, 32);
GrRect(gr.dc, 0, 480-40, 640, 40);
- GrBlot(gr.dc, (gr.dc->width/2) - (game_dc->width/2),
- (gr.dc->height/2) - (game_dc->height/2), game_dc);
+ MemCpy(gr.dc->body + (GR_WIDTH*40), game_dc->body, 640*400);
}
@@ -64,6 +63,7 @@ U0 video_draw_tile(Tile *tile, uint16 x, uint16 y)
uint8 *pixel = game_surface->body + x + (y * SCREEN_WIDTH);
uint8 *tile_pixel = tile->pixels;
I64 i, j;
+ if (tile > mem_mapped_space) return; //FIXME: Workaround to stop bombs from causing Page Fault
if(tile->type == SOLID)
{
for(i=0;i<TILE_HEIGHT;i++)