Skip to content

Commit

Permalink
Improve C++ checking.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alberth289346 committed Oct 1, 2023
1 parent 22f932e commit 7bd165e
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions CorsixTH/Src/th_gfx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1451,6 +1451,7 @@ void animation::depersist(lua_persist_reader* pReader) {
// 3 should be the morph set, but the actual morph target is
// missing, so settle for a graphical bug rather than a segfault
// by reverting to the normal function set.
[[fallthrough]];
case 1:
break;
case 2:
Expand Down
14 changes: 8 additions & 6 deletions CorsixTH/Src/th_gfx.h
Original file line number Diff line number Diff line change
Expand Up @@ -581,9 +581,10 @@ class animation : public animation_base {
void set_morph_target(animation* pMorphTarget, int iDurationFactor = 1);
void set_frame(size_t iFrame);

virtual void draw_fn(render_target* pCanvas, int iDestX, int iDestY);
virtual bool hit_test_fn(int iDestX, int iDestY, int iTestX, int iTestY);
virtual bool is_multiple_frame_animation_fn();
virtual void draw_fn(render_target* pCanvas, int iDestX, int iDestY) override;
virtual bool hit_test_fn(int iDestX, int iDestY, int iTestX,
int iTestY) override;
virtual bool is_multiple_frame_animation_fn() override;
void set_function_set(int value);

void set_speed(int iX, int iY) { speed.dx = iX, speed.dy = iY; }
Expand Down Expand Up @@ -636,9 +637,10 @@ class sprite_render_list : public animation_base {
void persist(lua_persist_writer* pWriter) const;
void depersist(lua_persist_reader* pReader);

virtual void draw_fn(render_target* pCanvas, int iDestX, int iDestY);
virtual bool hit_test_fn(int iDestX, int iDestY, int iTestX, int iTestY);
virtual bool is_multiple_frame_animation_fn();
virtual void draw_fn(render_target* pCanvas, int iDestX, int iDestY) override;
virtual bool hit_test_fn(int iDestX, int iDestY, int iTestX,
int iTestY) override;
virtual bool is_multiple_frame_animation_fn() override;

private:
struct sprite {
Expand Down

0 comments on commit 7bd165e

Please sign in to comment.