2022-08-27 14:03:44 +02:00
|
|
|
#ifndef __LEVEL_H__
|
|
|
|
# define __LEVEL_H__
|
2022-08-20 13:00:23 +02:00
|
|
|
|
2022-08-27 14:03:44 +02:00
|
|
|
#include "settings.h"
|
2022-08-20 13:00:23 +02:00
|
|
|
#include <vector>
|
2022-08-20 15:06:19 +02:00
|
|
|
#include <memory>
|
2022-08-20 13:00:23 +02:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
PLATFORM_EMPTY,
|
|
|
|
PLATFORM_WHITE,
|
|
|
|
PLATFORM_RED,
|
|
|
|
PLATFORM_BLUE,
|
|
|
|
PLATFORM_BLOCK
|
|
|
|
} platform_type_t;
|
|
|
|
|
|
|
|
struct platform {
|
|
|
|
platform_type_t type;
|
|
|
|
//TODO blink ? meta...
|
|
|
|
};
|
|
|
|
|
|
|
|
struct section {
|
|
|
|
struct platform platforms[PLATFORM_COUNT];
|
|
|
|
//...
|
|
|
|
};
|
|
|
|
|
2022-08-20 16:32:37 +02:00
|
|
|
struct generator;
|
2022-08-20 13:00:23 +02:00
|
|
|
|
2022-08-20 16:32:37 +02:00
|
|
|
typedef struct level {
|
2022-08-20 15:06:19 +02:00
|
|
|
std::vector<struct section> section_buffer;
|
|
|
|
std::unique_ptr<struct generator> gen;
|
2022-08-20 16:32:37 +02:00
|
|
|
} level_t;
|
2022-08-20 15:06:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
extern void level_update(level_t *level);
|
|
|
|
extern level_t level_create(int level);
|
|
|
|
extern void level_display(level_t *level);
|
|
|
|
extern void level_advance(level_t *level);
|
|
|
|
|
2022-08-27 14:03:44 +02:00
|
|
|
#endif /* __LEVEL_H__ */
|