AGI: Fix some GCC Compilation Warnings

These were associated with memset() of Mouse structure which now has
a constructor method to do this instead.
This commit is contained in:
D G Turner 2019-08-24 10:25:20 +01:00
parent 400cae33ab
commit 1a9fa34dc1
3 changed files with 2 additions and 3 deletions

View File

@ -360,10 +360,8 @@ AgiEngine::AgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) : AgiBas
DebugMan.addDebugChannel(kDebugLevelText, "Text", "Text output debugging");
DebugMan.addDebugChannel(kDebugLevelSavegame, "Savegame", "Saving & restoring game debugging");
memset(&_game, 0, sizeof(struct AgiGame));
memset(&_debug, 0, sizeof(struct AgiDebug));
memset(&_mouse, 0, sizeof(struct Mouse));
_game.mouseEnabled = true;
_game.mouseHidden = false;

View File

@ -232,6 +232,8 @@ struct gameIdList {
struct Mouse {
int button;
Common::Point pos;
Mouse() : button(0) {}
};
// Used by AGI Mouse protocol 1.0 for v27 (i.e. button pressed -variable).

View File

@ -50,7 +50,6 @@ PreAgiEngine::PreAgiEngine(OSystem *syst, const AGIGameDescription *gameDesc) :
memset(&_game, 0, sizeof(struct AgiGame));
memset(&_debug, 0, sizeof(struct AgiDebug));
memset(&_mouse, 0, sizeof(struct Mouse));
_speakerHandle = new Audio::SoundHandle();
}