Fix the rotation speed so it's calculated based on the rotation angle.
This commit is contained in:
parent
89772fd89b
commit
d1d7bf8d94
4 changed files with 10 additions and 3 deletions
|
|
@ -74,7 +74,9 @@ constexpr int COMBAT_UI_HEIGHT = SCREEN_HEIGHT - RAY_VIEW_HEIGHT;
|
||||||
constexpr int INITIAL_MAP_W = 21;
|
constexpr int INITIAL_MAP_W = 21;
|
||||||
constexpr int INITIAL_MAP_H = 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
|
// for the panels/renderer
|
||||||
constexpr wchar_t BG_TILE = L'█';
|
constexpr wchar_t BG_TILE = L'█';
|
||||||
|
|
|
||||||
|
|
@ -706,3 +706,7 @@ void System::init(Registry& reg) {
|
||||||
reg.addUpdate(System::lighting);
|
reg.addUpdate(System::lighting);
|
||||||
reg.addUpdate(System::death);
|
reg.addUpdate(System::death);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void System::restart() {
|
||||||
|
// TODO: implement starting a new game, duh
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -72,4 +72,5 @@ namespace System {
|
||||||
void clear_attack();
|
void clear_attack();
|
||||||
void spawn_attack(World& world, int attack_id, DinkyECS::Entity enemy);
|
void spawn_attack(World& world, int attack_id, DinkyECS::Entity enemy);
|
||||||
void init(Registry& reg);
|
void init(Registry& reg);
|
||||||
|
void restart();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -11,8 +11,8 @@ using RGBA = uint32_t;
|
||||||
|
|
||||||
struct CameraLOL {
|
struct CameraLOL {
|
||||||
double t = 0.0;
|
double t = 0.0;
|
||||||
double move_speed = 0.1;
|
double move_speed = DEFAULT_MOVE_SPEED;
|
||||||
double rot_speed = 0.06;
|
double rot_speed = DEFAULT_ROTATE_SPEED;
|
||||||
double target_x = 0.0;
|
double target_x = 0.0;
|
||||||
double target_y = 0.0;
|
double target_y = 0.0;
|
||||||
double target_dir_x = 0.0;
|
double target_dir_x = 0.0;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue