mirror of https://git.sr.ht/~kikoodx/crystal-tower
gaming
This commit is contained in:
parent
7b7876cea7
commit
5a83818ff6
|
@ -33,6 +33,7 @@ set(LEVELS
|
|||
lvl/4.kble
|
||||
lvl/5.kble
|
||||
lvl/6.kble
|
||||
lvl/end.kble
|
||||
)
|
||||
|
||||
set(ASSETS
|
||||
|
|
|
@ -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,
|
||||
};
|
||||
|
|
BIN
lvl/2.kble
BIN
lvl/2.kble
Binary file not shown.
BIN
lvl/3.kble
BIN
lvl/3.kble
Binary file not shown.
BIN
lvl/5.kble
BIN
lvl/5.kble
Binary file not shown.
BIN
lvl/6.kble
BIN
lvl/6.kble
Binary file not shown.
Binary file not shown.
|
@ -9,9 +9,9 @@
|
|||
#include <stdlib.h>
|
||||
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue