mirror of
https://github.com/libretro/scummvm.git
synced 2025-01-10 11:51:52 +00:00
TINSEL: Implement WhichInventoryOpen for Noir.
This commit is contained in:
parent
492651b03a
commit
58fa9fa6da
@ -57,6 +57,7 @@
|
||||
#include "tinsel/tinlib.h"
|
||||
#include "tinsel/tinsel.h" // For engine access
|
||||
#include "tinsel/token.h"
|
||||
#include "tinsel/noir/notebook.h"
|
||||
#include "tinsel/noir/sysreel.h"
|
||||
|
||||
#include "common/textconsole.h"
|
||||
@ -1182,10 +1183,14 @@ bool Dialogs::InventoryActive() {
|
||||
}
|
||||
|
||||
int Dialogs::WhichInventoryOpen() {
|
||||
if (TinselVersion == 3 && _vm->_notebook->IsOpen()) {
|
||||
return INV_NOTEBOOK;
|
||||
}
|
||||
if (_inventoryState != ACTIVE_INV)
|
||||
return 0;
|
||||
else
|
||||
else {
|
||||
return _activeInv;
|
||||
}
|
||||
}
|
||||
|
||||
/**************************************************************************/
|
||||
|
@ -64,4 +64,8 @@ void Notebook::Show(bool isOpen) {
|
||||
error("TODO: Implement Notebook::Show()");
|
||||
}
|
||||
|
||||
bool Notebook::IsOpen() const {
|
||||
return _state != BOOKSTATE::CLOSED;
|
||||
}
|
||||
|
||||
} // End of namespace Tinsel
|
||||
|
@ -64,6 +64,7 @@ public:
|
||||
void EventToNotebook(PLR_EVENT event, bool p2, bool p3);
|
||||
// Called from OPENNOTEBOOK
|
||||
void Show(bool isOpen);
|
||||
bool IsOpen() const;
|
||||
private:
|
||||
const static uint32 MAX_ENTRIES = 100;
|
||||
const static uint32 MAX_PAGES = 0x15;
|
||||
|
@ -5198,8 +5198,7 @@ NoirMapping translateNoirLibCode(int libCode, int32 *pp) {
|
||||
mapping = NoirMapping{"WHICHCD", WHICHCD, 0};
|
||||
debug(7, "%s()", mapping.name);
|
||||
break;
|
||||
case 208: // WhichInventory is implemented differently in v3, checking notebookstate
|
||||
warning("TODO: Implement WHICHINVENTORY v3");
|
||||
case 208:
|
||||
mapping = NoirMapping{"WHICHINVENTORY", WHICHINVENTORY, 0};
|
||||
debug(7, "%s()", mapping.name);
|
||||
break;
|
||||
|
Loading…
Reference in New Issue
Block a user