GLK: Move common/translation.h include to .cpp file

That makes release checker happy and is less error-prone.
This commit is contained in:
Eugene Sandulenko 2024-05-22 19:17:37 +02:00
parent 04749e30cb
commit 19b11a9aaf
No known key found for this signature in database
GPG Key ID: 014D387312D34F08
3 changed files with 24 additions and 14 deletions

View File

@ -8,7 +8,7 @@ engines/glk/advsys/vm.cpp
engines/glk/alan2/alan2.cpp
engines/glk/comprehend/game.cpp
engines/glk/glulx/glulx.cpp
engines/glk/magnetic/magnetic.h
engines/glk/magnetic/magnetic.cpp
engines/glk/quest/quest.cpp
engines/glk/scott/scott.cpp
engines/glk/zcode/detection.cpp

View File

@ -22,6 +22,7 @@
#include "glk/magnetic/magnetic.h"
#include "glk/magnetic/magnetic_defs.h"
#include "common/config-manager.h"
#include "common/translation.h"
namespace Glk {
namespace Magnetic {
@ -178,5 +179,25 @@ Common::Error Magnetic::writeGameData(Common::WriteStream *ws) {
return ws->write(_saveData, _saveSize) == _saveSize ? Common::kNoError : Common::kWritingFailed;
}
/**
* The Magnetic engine currently doesn't support loading savegames from the GMM
*/
bool Magnetic::canLoadGameStateCurrently(Common::U32String *msg) {
if (msg)
*msg = _("This game does not support loading from the menu. Use in-game interface");
return false;
}
/**
* The Magnetic engine currently doesn't support saving games from the GMM
*/
bool Magnetic::canSaveGameStateCurrently(Common::U32String *msg) {
if (msg)
*msg = _("This game does not support saving from the menu. Use in-game interface");
return false;
}
} // End of namespace Magnetic
} // End of namespace Glk

View File

@ -25,7 +25,6 @@
#define GLK_MAGNETIC_MAGNETIC
#include "common/scummsys.h"
#include "common/translation.h"
#include "glk/glk_api.h"
#include "glk/magnetic/magnetic_types.h"
#include "glk/magnetic/magnetic_defs.h"
@ -1386,22 +1385,12 @@ public:
/**
* The Magnetic engine currently doesn't support loading savegames from the GMM
*/
bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override {
if (msg)
*msg = _("This game does not support loading from the menu. Use in-game interface");
return false;
}
bool canLoadGameStateCurrently(Common::U32String *msg = nullptr) override;
/**
* The Magnetic engine currently doesn't support saving games from the GMM
*/
bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override {
if (msg)
*msg = _("This game does not support saving from the menu. Use in-game interface");
return false;
}
bool canSaveGameStateCurrently(Common::U32String *msg = nullptr) override;
/**
* Load a savegame from the passed Quetzal file chunk stream