From 38a83f3131078b24434c8ee8bc868dad2eb09621 Mon Sep 17 00:00:00 2001 From: Kyle Benesch <4b796c65+github@gmail.com> Date: Thu, 7 Sep 2023 17:31:35 -0700 Subject: [PATCH] Update Umbra submodule. This is a regression of the event lag issues until events are switched over to SDL. --- src/screen.cpp | 2 +- src/screen.hpp | 9 +++++---- umbra | 2 +- 3 files changed, 7 insertions(+), 6 deletions(-) diff --git a/src/screen.cpp b/src/screen.cpp index 46501e9..0d19c5a 100644 --- a/src/screen.cpp +++ b/src/screen.cpp @@ -138,7 +138,7 @@ bool Screen::update() { } if (fadeEnded) fadeLvl=0.0f; } - return update(elapsed, key, ms); + return update(elapsed, key_, mouse_); } void Screen::setFadeIn (int lengthInMilli, TCODColor col) { diff --git a/src/screen.hpp b/src/screen.hpp index 70d9c89..7599581 100644 --- a/src/screen.hpp +++ b/src/screen.hpp @@ -31,9 +31,10 @@ public : virtual void render() = 0; virtual bool update(float elapsed, TCOD_key_t &k,TCOD_mouse_t &mouse) = 0; virtual ~Screen() {} - void keyboard (TCOD_key_t &key) { this->key=key; } - void mouse (TCOD_mouse_t &ms) { this->ms=ms; } + void keyboard (TCOD_key_t &key) { key_ = key; } + void mouse (TCOD_mouse_t &mouse) { mouse_ = mouse; } bool update (void); + void onEvent (const SDL_Event&) override {} void setFadeIn (int lengthInMilli, TCODColor col = TCODColor::black); //set fade lengths in milliseconds void setFadeOut (int lengthInMilli, TCODColor col = TCODColor::black); //set fade lengths in milliseconds @@ -47,8 +48,8 @@ protected : TCODColor fadeOutColor; enum { FADE_UP, FADE_DOWN, FADE_OFF, FADE_NONE } fade; - TCOD_key_t key{}; - TCOD_mouse_t ms{}; + [[deprecated]] TCOD_key_t key_{}; + [[deprecated]] TCOD_mouse_t mouse_{}; void onInitialise(); void prepareImage(TCODImage *img)const; TCODImage *loadChapterPicture(bool big=false); diff --git a/umbra b/umbra index a4e4885..ef0de27 160000 --- a/umbra +++ b/umbra @@ -1 +1 @@ -Subproject commit a4e4885e007df1180e6954e6d768c5f456ed8759 +Subproject commit ef0de27a6c2496bdf6a67f806abd0a54ef16835b