Implement basic shading and colors.

CameraRay struct now stores information about tile intersection.
This commit is contained in:
2023-05-01 00:10:01 +01:00
parent 67c41106ff
commit 22cd090f92
7 changed files with 82 additions and 16 deletions
+15 -1
View File
@@ -3,9 +3,23 @@
#include <SFML/Graphics.hpp>
enum level_tileSide
{
NORTH,
EAST,
SOUTH,
WEST
};
typedef struct
{
unsigned int value;
level_tileSide side;
} TileData;
int level_init();
void level_end();
float level_rayCastDistance(sf::Vector2f point, float direction);
float level_rayCast(sf::Vector2f point, float direction, TileData* tileData);
void level_getDimensions(unsigned int* width, unsigned int* height);
unsigned int level_getGridValue(unsigned int x, unsigned int y);