2023-03-31 08:08:02 +08:00
|
|
|
#ifndef LEVEL_H
|
|
|
|
#define LEVEL_H
|
|
|
|
|
|
|
|
#include <SFML/Graphics.hpp>
|
|
|
|
|
2023-05-01 07:10:01 +08:00
|
|
|
enum level_tileSide
|
|
|
|
{
|
|
|
|
NORTH,
|
|
|
|
EAST,
|
|
|
|
SOUTH,
|
|
|
|
WEST
|
|
|
|
};
|
|
|
|
|
|
|
|
typedef struct
|
|
|
|
{
|
|
|
|
unsigned int value;
|
|
|
|
level_tileSide side;
|
2024-01-15 18:35:35 +08:00
|
|
|
float horizontalUV;
|
2023-05-01 07:10:01 +08:00
|
|
|
} TileData;
|
|
|
|
|
2023-04-16 09:17:11 +08:00
|
|
|
int level_init();
|
2023-03-31 08:08:02 +08:00
|
|
|
void level_end();
|
2023-05-01 07:10:01 +08:00
|
|
|
float level_rayCast(sf::Vector2f point, float direction, TileData* tileData);
|
2023-04-16 09:43:05 +08:00
|
|
|
void level_getDimensions(unsigned int* width, unsigned int* height);
|
2023-04-20 07:28:17 +08:00
|
|
|
unsigned int level_getGridValue(unsigned int x, unsigned int y);
|
2023-03-31 08:08:02 +08:00
|
|
|
|
|
|
|
#endif
|