From 4bd0c4095be65342f12856c8660259fbccca1a0b Mon Sep 17 00:00:00 2001 From: mibi88 Date: Tue, 28 Jun 2022 22:11:33 +0200 Subject: [PATCH] =?UTF-8?q?20220628=20-=20Scrolling=20en=20cours=20de=20d?= =?UTF-8?q?=C3=A9veloppement.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main.c b/src/main.c index e4f0205..8a147d3 100644 --- a/src/main.c +++ b/src/main.c @@ -38,7 +38,6 @@ void mappartdisplaying(int x, int y, unsigned short int * terrain) { case 3: dimage(px, py, &coal_tile); break; } - dupdate(); px += 8; } py += 8; @@ -50,7 +49,7 @@ int main(void) { dimage(16, TITLE_IMAGE_MARGIN, &title_img); dtext(1, TITLE_MARGIN, C_BLACK, TITLE_START); dupdate(); - int key = 0, game = 0, selected = 0, i, x, y; + int key = 0, game = 0, selected = 0, i, x = 0, y = 0; unsigned short terrain[WORLD_WIDTH*WORLD_HEIGHT]; while(key != KEY_EXIT){ key=getkey().key; @@ -108,6 +107,7 @@ int main(void) { } // dtext(1, 1, C_BLACK, "test"); mappartdisplaying(x, y, terrain); + dupdate(); } } return 1;