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
+2 -2
View File
@@ -7,7 +7,7 @@
#include "minimap.h"
#include "firstperson.h"
#define MINIMAP_SIZE 720
#define MINIMAP_SIZE 480
#define VIEW_SIZE MINIMAP_SIZE*2
static int handleKeyCode(sf::Keyboard::Key key);
@@ -21,7 +21,7 @@ static sf::Clock timer;
int view_init()
{
printf("view_init()\n");
if (!camera_init(&camera, sf::Vector2f(10.f/2.f, 10.f/2.f), 0.f, 128, 0.5f*PI)) return 0;
if (!camera_init(&camera, sf::Vector2f(10.f/2.f, 10.f/2.f), 0.f, 2<<7, 0.5f*PI)) return 0;
if (!minimap_init(MINIMAP_SIZE)) return 0;
if (!firstperson_init(VIEW_SIZE, MINIMAP_SIZE)) return 0;