BosonX/src/level.h

38 lines
571 B
C
Raw Normal View History

#ifndef __LEVEL_H__
# define __LEVEL_H__
2022-08-20 13:00:23 +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 {
2023-05-24 13:08:59 +02:00
int face;
num z;
num length;
int height;
2022-08-20 13:00:23 +02:00
platform_type_t type;
};
struct Generator;
2022-08-20 13:00:23 +02:00
2023-05-24 13:08:59 +02:00
struct level {
std::vector<struct platform> platform_buffer;
std::unique_ptr<Generator> gen;
uint16_t bgcolor;
2023-05-24 13:08:59 +02:00
};
2022-08-20 15:06:19 +02:00
2023-05-24 13:08:59 +02:00
extern void level_update(struct level *level, num z);
extern struct level level_create(int level);
2022-08-20 15:06:19 +02:00
#endif /* __LEVEL_H__ */