Fixed that crash and cleaned up more variables for some study next. I might also try out my debug macros.
This commit is contained in:
parent
7fb2d5cf26
commit
7a74877849
9 changed files with 162 additions and 92729 deletions
12
main.cpp
12
main.cpp
|
@ -3,14 +3,7 @@
|
|||
#include <chrono>
|
||||
#include <numeric>
|
||||
#include <functional>
|
||||
|
||||
#define RAY_VIEW_WIDTH 960
|
||||
#define RAY_VIEW_HEIGHT 720
|
||||
#define RAY_VIEW_X (1280 - RAY_VIEW_WIDTH)
|
||||
#define RAY_VIEW_Y 0
|
||||
|
||||
static const int SCREEN_HEIGHT=720;
|
||||
static const int SCREEN_WIDTH=1280;
|
||||
#include "constants.hpp"
|
||||
|
||||
Matrix MAP{
|
||||
{1,1,1,1,1,1,1,1,1},
|
||||
|
@ -25,7 +18,7 @@ Matrix MAP{
|
|||
};
|
||||
|
||||
void draw_gui(sf::RenderWindow &window) {
|
||||
sf::RectangleShape rect({SCREEN_WIDTH - RAY_VIEW_WIDTH, 300});
|
||||
sf::RectangleShape rect({SCREEN_WIDTH - RAY_VIEW_WIDTH, SCREEN_HEIGHT});
|
||||
rect.setPosition({0,0});
|
||||
rect.setFillColor({100, 100, 100});
|
||||
window.draw(rect);
|
||||
|
@ -54,6 +47,7 @@ int main() {
|
|||
rayview.render();
|
||||
draw_gui(window);
|
||||
window.display();
|
||||
rayview.rotate(rotSpeed, -1);
|
||||
|
||||
if(sf::Keyboard::isKeyPressed(sf::Keyboard::Key::W)) {
|
||||
rayview.run(moveSpeed, 1);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue