TINSEL: Stub OPENNOTEBOOK (Noir)

This commit is contained in:
Einar Johan Trøan Sømåen 2022-05-01 12:23:03 +02:00
parent 2612eeebf6
commit c101363240
No known key found for this signature in database
GPG Key ID: 0DFF2FB496CF9F93
3 changed files with 15 additions and 3 deletions

View File

@ -59,4 +59,9 @@ void Notebook::AddHyperlink(int32 id1, int32 id2) {
error("Too many hyperlinks");
}
void Notebook::Show(bool isOpen) {
error("TODO: Implement Notebook::Show()");
}
} // End of namespace Tinsel

View File

@ -62,7 +62,8 @@ public:
void Redraw();
// Called by EventToInventory
void EventToNotebook(PLR_EVENT event, bool p2, bool p3);
// Called from OPENNOTEBOOK
void Show(bool isOpen);
private:
const static uint32 MAX_ENTRIES = 100;
const static uint32 MAX_PAGES = 0x15;

View File

@ -155,7 +155,7 @@ enum MASTER_LIB_CODES {
WAITSCROLL, WAITTIME, WALK, WALKED, WALKEDPOLY, WALKEDTAG, WALKINGACTOR, WALKPOLY,
WALKTAG, WALKXPOS, WALKYPOS, WHICHCD, WHICHINVENTORY, ZZZZZZ, DEC3D, DECINVMAIN,
ADDNOTEBOOK, ADDINV3, ADDCONV, SET3DTEXTURE, FADEMUSIC, VOICEOVER, SETVIEW,
HELDOBJECTORTOPIC, BOOKADDHYPERLINK, HIGHEST_LIBCODE
HELDOBJECTORTOPIC, BOOKADDHYPERLINK, OPENNOTEBOOK, HIGHEST_LIBCODE
};
static const MASTER_LIB_CODES DW1DEMO_CODES[] = {
@ -4729,7 +4729,8 @@ NoirMapping translateNoirLibCode(int libCode, int32 *pp) {
debug(7, "%s(0x%08X, 0x%08X, 0x%08X, 0x%08X)", mapping.name, pp[0], pp[1], pp[2], pp[3]);
break;
case 103: // 0 parameters
error("Unsupported libCode %d open_notebook", libCode);
mapping = NoirMapping{"OPENNOTEBOOK", OPENNOTEBOOK, 0};
debug(7, "%s()", mapping.name);
case 104: // 1 parameter
error("Unsupported libCode %d OFFSET variant", libCode);
case 105: // 0 parameters
@ -6039,6 +6040,11 @@ int CallLibraryRoutine(CORO_PARAM, int operand, int32 *pp, const INT_CONTEXT *pi
pp[0] = OtherObject(pic->pinvo);
return 0;
case OPENNOTEBOOK:
// Noir only
_vm->_notebook->Show(0);
return 0;
case PAUSE:
// DW2 only
WaitTime(coroParam, 1, true, pic->escOn, pic->myEscape);