From be8a59666894364c04b127b7b97bfd6efdd08b35 Mon Sep 17 00:00:00 2001 From: Matthew Hoops Date: Fri, 25 Jun 2010 18:20:31 +0000 Subject: Add support for the third inventory case in Riven: you have the two journals but not the trap book (happens at the end of the game). svn-id: r50280 --- engines/mohawk/graphics.cpp | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) (limited to 'engines/mohawk/graphics.cpp') diff --git a/engines/mohawk/graphics.cpp b/engines/mohawk/graphics.cpp index 2ddfb47575..00de6dba11 100644 --- a/engines/mohawk/graphics.cpp +++ b/engines/mohawk/graphics.cpp @@ -607,19 +607,23 @@ void RivenGraphics::showInventory() { if (_vm->getFeatures() & GF_DEMO || _vm->getCurStack() == aspit) return; - // There are three books and three vars. However, there's only - // a possible two combinations. Either you have only Atrus' - // journal or you have all three books. - // bool hasAtrusBook = *_vm->matchVarToString("aatrusbook") != 0; + // There are three books and three vars. We have three different + // combinations. At the start you have just Atrus' journal. Later, + // you get Catherine's journal and the trap book. Near the end, + // you lose the trap book and have just the two journals. + bool hasCathBook = *_vm->matchVarToString("acathbook") != 0; - // bool hasTrapBook = *_vm->matchVarToString("atrapbook") != 0; + bool hasTrapBook = *_vm->matchVarToString("atrapbook") != 0; if (!hasCathBook) { - drawInventoryImage(101, g_atrusJournalRectSolo); + drawInventoryImage(101, g_atrusJournalRect1); + } else if (!hasTrapBook) { + drawInventoryImage(101, g_atrusJournalRect2); + drawInventoryImage(102, g_cathJournalRect2); } else { - drawInventoryImage(101, g_atrusJournalRect); - drawInventoryImage(102, g_cathJournalRect); - drawInventoryImage(100, g_trapBookRect); + drawInventoryImage(101, g_atrusJournalRect3); + drawInventoryImage(102, g_cathJournalRect3); + drawInventoryImage(100, g_trapBookRect3); } _vm->_system->updateScreen(); -- cgit v1.2.3