diff options
author | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-09 17:09:50 +0100 |
---|---|---|
committer | WBoerenkamps <wrj.boerenkamps@student.avans.nl> | 2024-12-09 17:09:50 +0100 |
commit | 29bbe891d758d7cf51917b01937d9503aa13619d (patch) | |
tree | ff1f77cbd055d45000fffd87642da11b6e196356 | |
parent | 1ab941a37e16c9b16a06f6012b798bfb44120b79 (diff) | |
parent | 4d74c80d9c3c9fdca9b07d960a1f9fd3e38cdfad (diff) |
Merge branch 'master' of https://github.com/lonkaars/crepe into wouter/gameloop
-rw-r--r-- | src/crepe/api/LoopManager.cpp | 1 | ||||
-rw-r--r-- | src/crepe/facade/SDLContext.cpp | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/src/crepe/api/LoopManager.cpp b/src/crepe/api/LoopManager.cpp index f588d7f..4f08bab 100644 --- a/src/crepe/api/LoopManager.cpp +++ b/src/crepe/api/LoopManager.cpp @@ -64,6 +64,7 @@ void LoopManager::setup() { this->game_running = true; this->loop_timer.start(); this->scene_manager.load_next_scene(); + timer.start(); } void LoopManager::render() { diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp index 4cc2206..6becf60 100644 --- a/src/crepe/facade/SDLContext.cpp +++ b/src/crepe/facade/SDLContext.cpp @@ -234,7 +234,7 @@ SDL_FRect SDLContext::get_dst_rect(const DestinationRectangleData & ctx) const { const Sprite::Data & data = ctx.sprite.data; - vec2 size; + vec2 size = data.size; if (data.size.x == 0 && data.size.y != 0) { size.x = data.size.y * ctx.sprite.aspect_ratio; } |