diff --git a/CMakeLists.txt b/CMakeLists.txt index 8906e50..7925885 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -33,6 +33,7 @@ set(LEVELS lvl/4.kble lvl/5.kble lvl/6.kble + lvl/end.kble ) set(ASSETS diff --git a/inc/tile.h b/inc/tile.h index 0c273e3..bf718c5 100644 --- a/inc/tile.h +++ b/inc/tile.h @@ -5,10 +5,11 @@ enum Tile { TILE_SOLID, TILE_PLAYER, TILE_SHATTERED, - TILE_OOB, + TILE_THUNDER, TILE_SPIKE_U, TILE_SPIKE_D, TILE_SPIKE_R, TILE_SPIKE_L, TILE_NEXT, + TILE_OOB, }; diff --git a/lvl/2.kble b/lvl/2.kble index 2cab4d8..d6d281e 100644 Binary files a/lvl/2.kble and b/lvl/2.kble differ diff --git a/lvl/3.kble b/lvl/3.kble index fbfc39b..f387436 100644 Binary files a/lvl/3.kble and b/lvl/3.kble differ diff --git a/lvl/5.kble b/lvl/5.kble index e69c6a4..faaa9b9 100644 Binary files a/lvl/5.kble and b/lvl/5.kble differ diff --git a/lvl/6.kble b/lvl/6.kble index a0c4655..0ba731b 100644 Binary files a/lvl/6.kble and b/lvl/6.kble differ diff --git a/lvl/end.kble b/lvl/end.kble new file mode 100644 index 0000000..06408f3 Binary files /dev/null and b/lvl/end.kble differ diff --git a/src/level.c b/src/level.c index 88a345a..2d8117d 100644 --- a/src/level.c +++ b/src/level.c @@ -9,9 +9,9 @@ #include static struct Level self; -extern struct LevelBin lvl_0, lvl_1, lvl_2, lvl_3, lvl_4, lvl_5, lvl_6; -static const struct LevelBin *levels[] = {&lvl_0, &lvl_1, &lvl_2, &lvl_3, - &lvl_4, &lvl_5, &lvl_6, NULL}; +extern struct LevelBin lvl_0, lvl_1, lvl_2, lvl_3, lvl_4, lvl_5, lvl_6, lvl_end; +static const struct LevelBin *levels[] = { + &lvl_0, &lvl_1, &lvl_2, &lvl_3, &lvl_4, &lvl_5, &lvl_6, &lvl_end, NULL}; void level_load(int id) @@ -65,7 +65,7 @@ level_draw(void) for (i = 0; i < self.size; i++) { const int tile = self.data[i]; - if (tile && tile != TILE_OOB) { + if (tile && tile != TILE_THUNDER) { const int sx = x * TILE_SIZE + off.x; const int sy = y * TILE_SIZE + off.y; const int rx = tile % tileset_width * TILE_SIZE;