aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStrangerke2014-08-27 08:13:54 +0200
committerStrangerke2014-08-27 08:13:54 +0200
commitff05b42e021ba12ce9ca86d118868cfa32d911eb (patch)
treeab33a5c326ca0b419e78a3bec4c552ec1d6e623c
parent610644c4a1fd386d6fde2c4c52b5aa9c1bdacc48 (diff)
downloadscummvm-rg350-ff05b42e021ba12ce9ca86d118868cfa32d911eb.tar.gz
scummvm-rg350-ff05b42e021ba12ce9ca86d118868cfa32d911eb.tar.bz2
scummvm-rg350-ff05b42e021ba12ce9ca86d118868cfa32d911eb.zip
ACCESS: Implement updateSummary
-rw-r--r--engines/access/amazon/amazon_game.cpp43
-rw-r--r--engines/access/amazon/amazon_game.h7
-rw-r--r--engines/access/amazon/amazon_room.cpp5
3 files changed, 50 insertions, 5 deletions
diff --git a/engines/access/amazon/amazon_game.cpp b/engines/access/amazon/amazon_game.cpp
index 608db5d573..f7f3611440 100644
--- a/engines/access/amazon/amazon_game.cpp
+++ b/engines/access/amazon/amazon_game.cpp
@@ -45,6 +45,7 @@ AmazonEngine::AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc)
_saveRiver = 0;
_hitSafe = 0;
_oldTitleChap = _chapter = 0;
+ _updateChapter = -1;
_topList = 0;
_botList = 0;
_riverIndex = 0;
@@ -279,7 +280,7 @@ const char *const _tileFiles[] = {
"LTBROWN.BLK", "DKBROWN.BLK", "VIOLET.BLK", "OLIVE.BLK"
};
-void AmazonEngine::tileScreen(Common::String filename) {
+void AmazonEngine::tileScreen() {
if (!_screen->_vesaMode)
return;
@@ -308,6 +309,46 @@ void AmazonEngine::tileScreen(Common::String filename) {
}
+void AmazonEngine::updateSummary(int chap) {
+ if (!_screen->_vesaMode)
+ return;
+
+ int chapter = chap;
+ if (chapter > 16)
+ chapter = 16;
+
+ if (!_clearSummaryFlag && (chapter == _updateChapter))
+ return;
+
+ _clearSummaryFlag = false;
+ int celSubFile = 0;
+ _updateChapter = chapter;
+ Common::Array<CellIdent> summaryCells;
+ loadCells(summaryCells);
+
+ for (int i = celSubFile; i < 16; ++i) {
+ if (i > 7)
+ warning("TODO: DRAWOBJECT");
+ else
+ warning("TODO: DRAWOBJECT");
+ }
+
+ delete _objectsTable[93];
+ _objectsTable[93] = nullptr;
+
+ for (int i = 1; i <= _updateChapter; ++i) {
+ celSubFile = i;
+ loadCells(summaryCells);
+ if (i > 8)
+ warning("TODO: DRAWOBJECT");
+ else
+ warning("TODO: DRAWOBJECT");
+
+ delete _objectsTable[93];
+ _objectsTable[93] = nullptr;
+ }
+}
+
void AmazonEngine::drawHelp() {
error("TODO: drawHelp");
}
diff --git a/engines/access/amazon/amazon_game.h b/engines/access/amazon/amazon_game.h
index 5192e208d7..59511c4546 100644
--- a/engines/access/amazon/amazon_game.h
+++ b/engines/access/amazon/amazon_game.h
@@ -40,7 +40,6 @@ private:
int _saveRiver;
int _hitSafe;
int _oldTitleChap;
- int _chapter;
int _topList;
int _botList;
int _riverIndex;
@@ -103,6 +102,9 @@ public:
// Other game specific fields
int _hintLevel;
+
+ int _chapter;
+ int _updateChapter;
public:
AmazonEngine(OSystem *syst, const AccessGameDescription *gameDesc);
@@ -112,7 +114,8 @@ public:
virtual void establish(int esatabIndex, int sub);
- void tileScreen(Common::String filename);
+ void tileScreen();
+ void updateSummary(int chap);
};
} // End of namespace Amazon
diff --git a/engines/access/amazon/amazon_room.cpp b/engines/access/amazon/amazon_room.cpp
index f8c8bc45a8..f64264f7d7 100644
--- a/engines/access/amazon/amazon_room.cpp
+++ b/engines/access/amazon/amazon_room.cpp
@@ -180,9 +180,10 @@ void AmazonRoom::init4Quads() {
if (!_vm->_screen->_vesaMode)
return;
- _game->tileScreen(Common::String("TILE.BLK"));
+ // CHECKME: in the original, this call of tileScreen uses an useless parameter, "TILES.BLK"
+ _game->tileScreen();
_vm->_inventory->refreshInventory();
- warning("TODO: UPDATESUMMARY(chapter)");
+ _game->updateSummary(_game->_chapter);
_vm->_screen->setPanel(0);
_vm->_screen->clearScreen();