Add basic controller Support

Fix more memory leaks (seeing a trend here)
This commit is contained in:
Bram Verhulst
2024-04-24 21:38:14 +02:00
parent 1b90f222a4
commit f5d352239c
14 changed files with 2267 additions and 166 deletions

View File

@@ -90,14 +90,6 @@ void Game::ProcessMouseUpEvent(const SDL_MouseButtonEvent& e) {
//}
}
void Game::ProcessMouseWheelEvent(const SDL_MouseWheelEvent& e) {
Vector2f scroll = Vector2f { 0, 0 };
if (e.y > 0) {
scroll = Vector2f { 0, 1 };
}
else if (e.y < 0) {
scroll = Vector2f { 0, -1 };
}
//camera zoom
float newScale = m_Camera.GetScale() - e.preciseY * 0.1f;
if(newScale < 0.0f) {
newScale = 0.0f;