Refactored the CameraLOL to be inside the rayview instead of a convolute main_ui->camera->rayview and back. Closes #16.

This commit is contained in:
Zed A. Shaw 2025-06-29 11:11:12 -04:00
parent 75c28cd764
commit ab1a415b55
7 changed files with 83 additions and 89 deletions

View file

@ -1,8 +1,6 @@
#pragma once
#include "raycaster.hpp"
struct CameraLOL {
Raycaster& rayview;
double t = 0.0;
double move_speed = 0.1;
double rot_speed = 0.06;
@ -12,16 +10,4 @@ struct CameraLOL {
double target_dir_y = 0.0;
double target_plane_x = 0.0;
double target_plane_y = 0.0;
CameraLOL(Raycaster& rv) :
rayview(rv) {}
Point plan_move(int dir, bool strafe);
void plan_rotate(int dir, float amount);
bool play_rotate();
bool play_move();
void abort_plan();
Point aimed_at();
};