Skip to content

Commit

Permalink
Update Umbra submodule.
Browse files Browse the repository at this point in the history
This is a regression of the event lag issues until events are switched
over to SDL.
  • Loading branch information
HexDecimal committed Sep 8, 2023
1 parent 757c881 commit 38a83f3
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/screen.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
9 changes: 5 additions & 4 deletions src/screen.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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);
Expand Down

0 comments on commit 38a83f3

Please sign in to comment.