summaryrefslogtreecommitdiff
path: root/src/graphic/graphic.cpp
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2004-09-26 15:50:07 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2004-09-26 15:50:07 +0000
commit624370950b22fc9c5806f0da0d2984c629ecc33d (patch)
treea044ca196b4fb84db09705ac6fa5df8fa90a2fd8 /src/graphic/graphic.cpp
parentfd2e46bffbc5b4f17ab413dc339e5864db1dbb48 (diff)
downloadmana-client-624370950b22fc9c5806f0da0d2984c629ecc33d.tar.gz
mana-client-624370950b22fc9c5806f0da0d2984c629ecc33d.tar.bz2
mana-client-624370950b22fc9c5806f0da0d2984c629ecc33d.tar.xz
mana-client-624370950b22fc9c5806f0da0d2984c629ecc33d.zip
*** empty log message ***
Diffstat (limited to 'src/graphic/graphic.cpp')
-rw-r--r--src/graphic/graphic.cpp12
1 files changed, 4 insertions, 8 deletions
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);