#ifndef __LEVEL_H__ # define __LEVEL_H__ #include "settings.h" #include #include typedef enum { PLATFORM_EMPTY, PLATFORM_WHITE, PLATFORM_RED, PLATFORM_BLUE, PLATFORM_BLOCK } platform_type_t; struct platform { /* Face number along the level's cylinder */ int face; /* Depth and length; the platform lies at [z ... z+length). */ num z; num length; /* Platform height above the default height (cylinder quasiradius). This can be compared with player->height. */ num height; /* Platform kind. */ platform_type_t type; /* Whether the platform is currently falling. This is only used for red platforms. */ bool falling; }; struct Generator; struct level { char const *name; std::vector platform_buffer; std::unique_ptr gen; uint16_t bgcolor; }; extern void level_update(struct level *level, num z); extern struct level level_create(int level); #endif /* __LEVEL_H__ */