Add basic camera representation
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user