Add basic camera representation

This commit is contained in:
2023-04-01 00:16:14 +01:00
parent 35ba580398
commit 73412b27f8
3 changed files with 52 additions and 0 deletions
+4
View File
@@ -3,12 +3,15 @@
#include <stdio.h>
#include "level.h"
#include "camera.h"
static int handleKeyCode(sf::Keyboard::Key key);
static sf::Uint32 style = sf::Style::Titlebar;
static sf::RenderWindow window(sf::VideoMode(500, 500), "Raycasting", style);
static Camera camera = { sf::Vector2f(300.f, 250.f), 0.f, 1.f, 70.f };
int view_init()
{
printf("view_init()\n");
@@ -35,6 +38,7 @@ int view_update()
window.clear();
if (!level_update()) return 0;
camera_update(&camera, &window);
window.display();
return 1;