BREAKING: This code does NOT work, but has a segv on startup on windows due to ...magic?
This commit is contained in:
parent
8eae4b9420
commit
d230b152cf
5 changed files with 532 additions and 7 deletions
44
main.cpp
Normal file
44
main.cpp
Normal file
|
@ -0,0 +1,44 @@
|
|||
#include "raycaster.hpp"
|
||||
|
||||
static const int SCREEN_HEIGHT=960;
|
||||
static const int SCREEN_WIDTH=1280;
|
||||
|
||||
int main() {
|
||||
sf::RenderWindow window(sf::VideoMode(SCREEN_WIDTH, SCREEN_HEIGHT), "Zed's Ray Caster Game Thing");
|
||||
|
||||
Raycaster rayview(window);
|
||||
|
||||
/*
|
||||
using KB = sf::Keyboard;
|
||||
rayview.load_textures();
|
||||
|
||||
double moveSpeed = 0.1;
|
||||
double rotSpeed = 0.1;
|
||||
|
||||
while(window.isOpen()) {
|
||||
rayview.render();
|
||||
|
||||
if(KB::isKeyPressed(KB::W)) {
|
||||
rayview.move_forward(moveSpeed);
|
||||
} else if(KB::isKeyPressed(KB::S)) {
|
||||
rayview.move_backward(moveSpeed);
|
||||
}
|
||||
|
||||
if(KB::isKeyPressed(KB::D)) {
|
||||
rayview.rotate_right(rotSpeed);
|
||||
} else if(KB::isKeyPressed(KB::A)) {
|
||||
rayview.rotate_left(rotSpeed);
|
||||
}
|
||||
|
||||
sf::Event event;
|
||||
while(window.pollEvent(event)) {
|
||||
if(event.type == sf::Event::Closed) {
|
||||
window.close();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
*/
|
||||
|
||||
return 0;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue