From 624370950b22fc9c5806f0da0d2984c629ecc33d Mon Sep 17 00:00:00 2001 From: Eugenio Favalli Date: Sun, 26 Sep 2004 15:50:07 +0000 Subject: *** empty log message *** --- src/graphic/graphic.cpp | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) (limited to 'src/graphic/graphic.cpp') diff --git a/src/graphic/graphic.cpp b/src/graphic/graphic.cpp index 7aca9189..c104b0d2 100644 --- a/src/graphic/graphic.cpp +++ b/src/graphic/graphic.cpp @@ -137,8 +137,8 @@ void do_graphic(void) { for(int j=0;j<20;j++) for(int i=0;i<26;i++) { - draw_rle_sprite(buffer, (RLE_SPRITE *)tileset[get_tile(i+camera_x, j+camera_y, 0)].dat, i*16-offset_x, j*16-offset_y); - if(get_tile(i+camera_x, j+camera_y, 1)!=0)draw_rle_sprite(buffer, (RLE_SPRITE *)tileset[get_tile(i+camera_x, j+camera_y, 1)].dat, i*16-offset_x, j*16-offset_y); + if(get_tile(i+camera_x, j+camera_y, 0)>=0 && get_tile(i+camera_x, j+camera_y, 0)<600)draw_rle_sprite(buffer, (RLE_SPRITE *)tileset[get_tile(i+camera_x, j+camera_y, 0)].dat, i*16-offset_x, j*16-offset_y); + if(get_tile(i+camera_x, j+camera_y, 1)>0 && get_tile(i+camera_x, j+camera_y, 1)<600)draw_rle_sprite(buffer, (RLE_SPRITE *)tileset[get_tile(i+camera_x, j+camera_y, 1)].dat, i*16-offset_x, j*16-offset_y); } NODE *node = get_head(); @@ -204,15 +204,11 @@ void do_graphic(void) { for(int j=0;j<20;j++) for(int i=0;i<26;i++) { - if(get_tile(i+camera_x, j+camera_y, 2)!=0)draw_rle_sprite(buffer, (RLE_SPRITE *)tileset[get_tile(i+camera_x, j+camera_y, 2)].dat, i*16-offset_x, j*16-offset_y); + if(get_tile(i+camera_x, j+camera_y, 2)>0 && get_tile(i+camera_x, j+camera_y, 2)<600)draw_rle_sprite(buffer, (RLE_SPRITE *)tileset[get_tile(i+camera_x, j+camera_y, 2)].dat, i*16-offset_x, j*16-offset_y); } - - stretch_blit(buffer, double_buffer, 0, 0, 400, 300, 0, 0, 800, 600); - - // Draw player speech node = get_head(); while(node) { @@ -247,7 +243,7 @@ void do_graphic(void) { } - alfont_textprintf_aa(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i", fps); + alfont_textprintf_aa(double_buffer, gui_font, 0, 0, MAKECOL_WHITE, "FPS:%i %i %i", fps,get_x(player_node->coordinates),get_y(player_node->coordinates)); blit(double_buffer, screen, 0, 0, 0, 0, 800, 600); -- cgit v1.2.3-70-g09d2