Moving some stuff so I can do a camera system using the new sf::View animation stuff.

This commit is contained in:
Zed A. Shaw 2025-11-02 22:49:50 -05:00
parent 222c66a1f2
commit 8345097e10
3 changed files with 13 additions and 13 deletions

View file

@ -30,6 +30,7 @@ namespace boss {
"[*(200,300)stats]"
"[_]"
"[_]");
auto stats = $actions.entity("stats");
$actions.set<Rectangle>(stats, {});
$actions.set<Text>(stats, {L"stats"});

View file

@ -1,13 +1 @@
#pragma once
struct CameraLOL {
double t = 0.0;
double move_speed = 0.1;
double rot_speed = 0.06;
double target_x = 0.0;
double target_y = 0.0;
double target_dir_x = 0.0;
double target_dir_y = 0.0;
double target_plane_x = 0.0;
double target_plane_y = 0.0;
};

View file

@ -5,11 +5,22 @@
#include "spatialmap.hpp"
#include "game_level.hpp"
#include "textures.hpp"
#include "camera.hpp"
using matrix::Matrix;
using RGBA = uint32_t;
struct CameraLOL {
double t = 0.0;
double move_speed = 0.1;
double rot_speed = 0.06;
double target_x = 0.0;
double target_y = 0.0;
double target_dir_x = 0.0;
double target_dir_y = 0.0;
double target_plane_x = 0.0;
double target_plane_y = 0.0;
};
struct Raycaster {
int $pitch=0;
sf::Clock $clock;