diff options
author | Alec Murphy <alec@checksum.fail> | 2020-04-04 09:53:21 -0400 |
---|---|---|
committer | Alec Murphy <alec@checksum.fail> | 2020-04-04 09:53:21 -0400 |
commit | 6cdc82553f6dae873905264c00ff1766782d329a (patch) | |
tree | 81b6ca82fbff9dc80cf15add5b565d6b82a4dd4f | |
parent | 6a75c8cae4d5aefaa4f864bde11d24a5397501b2 (diff) |
Optimize draw_it() and temporary fix for bomb explosions causing Page Fault
-rw-r--r-- | Video.HC | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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++) |