1
0
Fork 0
Toy-Raytracer/main.cpp
trotFunky f21fc6f805 Ajout de la fonction render au monde
Joueur déplaçable
début du cast de rayon
Trop fatigué pour faire de la trigo
2019-06-01 06:42:29 +02:00

30 lines
No EOL
649 B
C++

#include <iostream>
#include "SFML/Graphics.hpp"
#include "World.h"
int main()
{
std::cout << "Hello, World!" << std::endl;
World world(10,10);
world.setBlock(BlockType::AIR,1,1,8,8);
world.setBlock(BlockType::WALL,4,4,2,2);
world.player.move(2,2);
std::cout << world << std::endl;
sf::RenderWindow window(sf::VideoMode(800,600),"Da raycasting");
world.render(window);
window.display();
while (window.isOpen())
{
sf::Event event;
while (window.pollEvent(event))
{
if (event.type == sf::Event::Closed)
window.close();
}
}
return 0;
}