Fix the rotation speed so it's calculated based on the rotation angle.

This commit is contained in:
Zed A. Shaw 2026-05-26 11:06:58 -04:00
parent 89772fd89b
commit d1d7bf8d94
4 changed files with 10 additions and 3 deletions

View file

@ -74,7 +74,9 @@ constexpr int COMBAT_UI_HEIGHT = SCREEN_HEIGHT - RAY_VIEW_HEIGHT;
constexpr int INITIAL_MAP_W = 21;
constexpr int INITIAL_MAP_H = 21;
constexpr float DEFAULT_ROTATE=0.5f;
constexpr float DEFAULT_ROTATE=0.25f;
constexpr float DEFAULT_ROTATE_SPEED=DEFAULT_ROTATE / 2.0f;
constexpr float DEFAULT_MOVE_SPEED=0.1f;
// for the panels/renderer
constexpr wchar_t BG_TILE = L'';

View file

@ -706,3 +706,7 @@ void System::init(Registry& reg) {
reg.addUpdate(System::lighting);
reg.addUpdate(System::death);
}
void System::restart() {
// TODO: implement starting a new game, duh
}

View file

@ -72,4 +72,5 @@ namespace System {
void clear_attack();
void spawn_attack(World& world, int attack_id, DinkyECS::Entity enemy);
void init(Registry& reg);
void restart();
}

View file

@ -11,8 +11,8 @@ using RGBA = uint32_t;
struct CameraLOL {
double t = 0.0;
double move_speed = 0.1;
double rot_speed = 0.06;
double move_speed = DEFAULT_MOVE_SPEED;
double rot_speed = DEFAULT_ROTATE_SPEED;
double target_x = 0.0;
double target_y = 0.0;
double target_dir_x = 0.0;