wormy worming

This commit is contained in:
KikooDX 2021-12-18 15:50:05 +01:00
parent 74451c9350
commit c165e7b51b
5 changed files with 11 additions and 1 deletions

View File

@ -24,6 +24,7 @@ set(ASSETS
res/test.kble
res/burn.kble
res/bounce.kble
res/worm.kble
res/fonts/dina.png
)

View File

@ -2,3 +2,4 @@
int polarity(void);
void polarity_invert(void);
void polarity_reset(void);

BIN
res/worm.kble Normal file

Binary file not shown.

View File

@ -11,11 +11,12 @@
static struct Level level;
extern bopti_image_t bimg_tileset;
extern struct LevelBin kble_test, kble_burn, kble_bounce;
extern struct LevelBin kble_test, kble_burn, kble_bounce, kble_worm;
static const struct LevelBinNamed levels[] = {
{&kble_test, "gentle introduction"},
{&kble_burn, "these are rare"},
{&kble_bounce, "deceptive road"},
{&kble_worm, "under your skin"},
{NULL, NULL}};
static void level_free(void);
@ -48,6 +49,7 @@ level_load(int id)
level.visual_data = malloc(i * sizeof(struct VisualData));
while (i-- > 0)
level.data[i] = b->data[i];
polarity_reset();
level_regen_visual_data();
player_spawn(level.player);
}

View File

@ -15,3 +15,9 @@ polarity_invert(void)
pol = !pol;
level_regen_visual_data();
}
void
polarity_reset(void)
{
pol = 0;
}