diff options
author | kdx <kdx@42l.fr> | 2023-02-18 09:29:22 +0100 |
---|---|---|
committer | kdx <kdx@42l.fr> | 2023-02-18 09:29:22 +0100 |
commit | 249dc3167339a58fd8a59e80e82b4da6bbb0de8d (patch) | |
tree | f90f13dbe25dce3549f3a50a7674527ba0f882f0 | |
parent | 3fe36da6daa688a8527c4e6b39d24db6afa7693c (diff) | |
download | bozojam-main.tar.gz |
-rw-r--r-- | level.c | 26 | ||||
-rw-r--r-- | level.h | 4 |
2 files changed, 10 insertions, 20 deletions
@@ -4,22 +4,12 @@ #include <stdlib.h> static const char level[LEVEL_HEIGHT * LEVEL_WIDTH] = { - "000000000000" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "0..........0" - "000000000000" + "0....." + "......" + "......" + "......" + "......" + ".....0" }; void level_draw() @@ -27,8 +17,8 @@ void level_draw() LZR_DrawSetColor(1, 1, 1, 1); for (int y = 0; y < LEVEL_HEIGHT; y++) for (int x = 0; x < LEVEL_WIDTH; x++) { - const int dx = (x + 3) * CFG_TSIZE; - const int dy = y * CFG_TSIZE; + const int dx = (x + 6) * CFG_TSIZE; + const int dy = (y + 5) * CFG_TSIZE; if (level_get(x, y) == '0' && ((rand() & 3) == 3 || LZR_GetTick() & 1)) LZR_DrawRectangle(true, dx, dy, CFG_TSIZE, CFG_TSIZE); @@ -1,8 +1,8 @@ #pragma once enum { - LEVEL_WIDTH = 12, - LEVEL_HEIGHT = 16 + LEVEL_WIDTH = 6, + LEVEL_HEIGHT = 6 }; void level_draw(void); |