Moving some stuff so I can do a camera system using the new sf::View animation stuff.
This commit is contained in:
parent
222c66a1f2
commit
8345097e10
3 changed files with 13 additions and 13 deletions
|
|
@ -30,6 +30,7 @@ namespace boss {
|
||||||
"[*(200,300)stats]"
|
"[*(200,300)stats]"
|
||||||
"[_]"
|
"[_]"
|
||||||
"[_]");
|
"[_]");
|
||||||
|
|
||||||
auto stats = $actions.entity("stats");
|
auto stats = $actions.entity("stats");
|
||||||
$actions.set<Rectangle>(stats, {});
|
$actions.set<Rectangle>(stats, {});
|
||||||
$actions.set<Text>(stats, {L"stats"});
|
$actions.set<Text>(stats, {L"stats"});
|
||||||
|
|
|
||||||
12
camera.hpp
12
camera.hpp
|
|
@ -1,13 +1 @@
|
||||||
#pragma once
|
#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;
|
|
||||||
};
|
|
||||||
|
|
|
||||||
|
|
@ -5,11 +5,22 @@
|
||||||
#include "spatialmap.hpp"
|
#include "spatialmap.hpp"
|
||||||
#include "game_level.hpp"
|
#include "game_level.hpp"
|
||||||
#include "textures.hpp"
|
#include "textures.hpp"
|
||||||
#include "camera.hpp"
|
|
||||||
|
|
||||||
using matrix::Matrix;
|
using matrix::Matrix;
|
||||||
using RGBA = uint32_t;
|
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 {
|
struct Raycaster {
|
||||||
int $pitch=0;
|
int $pitch=0;
|
||||||
sf::Clock $clock;
|
sf::Clock $clock;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue