mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-25 04:01:03 +00:00
GLK: COMPREHEND: Skeleton for savegames within ScummVM
This commit is contained in:
parent
17454429e4
commit
13b4698c83
@ -128,5 +128,19 @@ void Comprehend::readLine(char *buffer, size_t maxLen) {
|
||||
buffer[ev.val1] = 0;
|
||||
}
|
||||
|
||||
Common::Error Comprehend::readSaveData(Common::SeekableReadStream *rs) {
|
||||
// TODO
|
||||
|
||||
_game->_updateFlags = UPDATE_ALL;
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
Common::Error Comprehend::writeGameData(Common::WriteStream *ws) {
|
||||
// TODO
|
||||
|
||||
return Common::kNoError;
|
||||
}
|
||||
|
||||
|
||||
} // namespace Comprehend
|
||||
} // namespace Glk
|
||||
|
@ -103,17 +103,13 @@ public:
|
||||
/**
|
||||
* Load a savegame from the passed Quetzal file chunk stream
|
||||
*/
|
||||
Common::Error readSaveData(Common::SeekableReadStream *rs) override {
|
||||
return Common::kReadingFailed;
|
||||
}
|
||||
Common::Error readSaveData(Common::SeekableReadStream *rs) override;
|
||||
|
||||
/**
|
||||
* Save the game. The passed write stream represents access to the UMem chunk
|
||||
* in the Quetzal save file that will be created
|
||||
*/
|
||||
Common::Error writeGameData(Common::WriteStream *ws) override {
|
||||
return Common::kWritingFailed;
|
||||
}
|
||||
Common::Error writeGameData(Common::WriteStream *ws) override;
|
||||
|
||||
/**
|
||||
* Print string to the buffer window
|
||||
|
@ -30,6 +30,7 @@
|
||||
#include "glk/comprehend/strings.h"
|
||||
#include "glk/comprehend/util.h"
|
||||
#include "common/debug-channels.h"
|
||||
#include "common/translation.h"
|
||||
|
||||
namespace Glk {
|
||||
namespace Comprehend {
|
||||
@ -42,7 +43,6 @@ struct Sentence {
|
||||
ComprehendGame::ComprehendGame() : _gameName(nullptr),
|
||||
_shortName(nullptr),
|
||||
_gameDataFile(nullptr),
|
||||
_savegameFileFormat(nullptr),
|
||||
_colorTable(0),
|
||||
_gameStrings(nullptr) {
|
||||
}
|
||||
@ -163,7 +163,6 @@ Item *get_item(ComprehendGame *game, uint16 index) {
|
||||
}
|
||||
|
||||
void game_save(ComprehendGame *game) {
|
||||
char filename[32];
|
||||
int c;
|
||||
|
||||
console_println(game, game->_strings.strings[STRING_SAVE_GAME]);
|
||||
@ -178,12 +177,10 @@ void game_save(ComprehendGame *game) {
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(filename, sizeof(filename), game->_savegameFileFormat, c - '0');
|
||||
comprehend_save_game(game, filename);
|
||||
g_comprehend->saveGameState(c - '0', _("Savegame"));
|
||||
}
|
||||
|
||||
void game_restore(ComprehendGame *game) {
|
||||
char filename[32];
|
||||
int c;
|
||||
|
||||
console_println(game, game->_strings.strings[STRING_RESTORE_GAME]);
|
||||
@ -198,10 +195,7 @@ void game_restore(ComprehendGame *game) {
|
||||
return;
|
||||
}
|
||||
|
||||
snprintf(filename, sizeof(filename), game->_savegameFileFormat, c - '0');
|
||||
comprehend_restore_game(game, filename);
|
||||
|
||||
game->_updateFlags = UPDATE_ALL;
|
||||
(void)g_comprehend->loadGameState(c - '0');
|
||||
}
|
||||
|
||||
void game_restart(ComprehendGame *game) {
|
||||
|
@ -43,7 +43,6 @@ public:
|
||||
Common::Array<StringFile> _stringFiles;
|
||||
Common::Array<const char *> _locationGraphicFiles;
|
||||
Common::Array<const char *> _itemGraphicFiles;
|
||||
const char *_savegameFileFormat;
|
||||
unsigned _colorTable;
|
||||
|
||||
struct GameStrings *_gameStrings;
|
||||
|
@ -50,7 +50,6 @@ CrimsonCrownGame::CrimsonCrownGame() : ComprehendGame() {
|
||||
_itemGraphicFiles.push_back("OA.MS1");
|
||||
_itemGraphicFiles.push_back("OB.MS1");
|
||||
|
||||
_savegameFileFormat = "G%d.MS0";
|
||||
_gameStrings = &cc1_strings;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,6 @@ OOToposGame::OOToposGame() : ComprehendGame() {
|
||||
_itemGraphicFiles.push_back("OC");
|
||||
_itemGraphicFiles.push_back("OD");
|
||||
|
||||
_savegameFileFormat = "G%d";
|
||||
_colorTable = 1;
|
||||
}
|
||||
|
||||
|
@ -60,7 +60,6 @@ TransylvaniaGame::TransylvaniaGame() : ComprehendGame() {
|
||||
_itemGraphicFiles.push_back("OB.MS1");
|
||||
_itemGraphicFiles.push_back("OC.MS1");
|
||||
|
||||
_savegameFileFormat = "G%d.MS0";
|
||||
_gameStrings = &tr_strings;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user