Create basic level grid representation.

This commit is contained in:
2023-03-31 01:08:02 +01:00
parent b9470696f6
commit fe02b79946
5 changed files with 104 additions and 7 deletions
+14 -5
View File
@@ -1,13 +1,16 @@
#include <SFML/Graphics.hpp>
#include "view.h"
#include <SFML/Graphics.hpp>
#include <stdio.h>
#include "level.h"
static sf::Uint32 style = sf::Style::Titlebar;
static sf::RenderWindow window(sf::VideoMode(1600, 900), "SFML works!", style);
static sf::CircleShape shape(450.f);
static sf::RenderWindow window(sf::VideoMode(500, 500), "Raycasting", style);
int view_init()
{
shape.setFillColor(sf::Color::Green);
printf("view_init()\n");
level_init(&window);
return 1;
}
@@ -24,9 +27,15 @@ int view_update()
}
window.clear();
window.draw(shape);
if (!level_update()) return 0;
window.display();
return 1;
}
void view_end()
{
printf("view_end()\n");
level_end();
return;
}