diff options
Diffstat (limited to 'engines/mortevielle/menu.h')
-rw-r--r-- | engines/mortevielle/menu.h | 77 |
1 files changed, 45 insertions, 32 deletions
diff --git a/engines/mortevielle/menu.h b/engines/mortevielle/menu.h index 2428d8917b..debf5b09b6 100644 --- a/engines/mortevielle/menu.h +++ b/engines/mortevielle/menu.h @@ -40,45 +40,28 @@ enum { MENU_LOAD = 8 }; -enum verbs {OPCODE_NONE = 0, OPCODE_ATTACH = 0x301, OPCODE_WAIT = 0x302, OPCODE_FORCE = 0x303, OPCODE_SLEEP = 0x304, OPCODE_LISTEN = 0x305, -OPCODE_ENTER = 0x306, OPCODE_CLOSE = 0x307, OPCODE_SEARCH = 0x308, OPCODE_KNOCK = 0x309, OPCODE_SCRATCH = 0x30a, -OPCODE_READ = 0x30b, OPCODE_EAT = 0x30c, OPCODE_PLACE = 0x30d, OPCODE_OPEN = 0x30e, OPCODE_TAKE = 0x30f, -OPCODE_LOOK = 0x310, OPCODE_SMELL = 0x311, OPCODE_SOUND = 0x312, OPCODE_LEAVE = 0x313, OPCODE_LIFT = 0x314, -OPCODE_TURN = 0x315, OPCODE_SHIDE = 0x401, OPCODE_SSEARCH = 0x402, OPCODE_SREAD = 0x403, OPCODE_SPUT = 0x404, -OPCODE_SLOOK = 0x405}; - -struct menuItem { +const int OPCODE_NONE = 0; + +struct MenuItem { int _menuId; int _actionId; }; -static const menuItem _actionMenu[12] = { - {OPCODE_NONE >> 8, OPCODE_NONE & 0xFF}, - {OPCODE_SHIDE >> 8, OPCODE_SHIDE & 0xFF}, - {OPCODE_ATTACH >> 8, OPCODE_ATTACH & 0xFF}, - {OPCODE_FORCE >> 8, OPCODE_FORCE & 0xFF}, - {OPCODE_SLEEP >> 8, OPCODE_SLEEP & 0xFF}, - {OPCODE_ENTER >> 8, OPCODE_ENTER & 0xFF}, - {OPCODE_CLOSE >> 8, OPCODE_CLOSE & 0xFF}, - {OPCODE_KNOCK >> 8, OPCODE_KNOCK & 0xFF}, - {OPCODE_EAT >> 8, OPCODE_EAT & 0xFF}, - {OPCODE_PLACE >> 8, OPCODE_PLACE & 0xFF}, - {OPCODE_OPEN >> 8, OPCODE_OPEN & 0xFF}, - {OPCODE_LEAVE >> 8, OPCODE_LEAVE & 0xFF} -}; - class Menu { private: MortevielleEngine *_vm; - byte _charArr[7][24]; + byte _charArr[6][24]; int _msg3; int _msg4; void util(Common::Point pos); void invert(int indx); void menuDown(int ii); + public: + Menu(); + bool _menuActive; bool _menuSelected; bool _multiTitle; @@ -88,21 +71,51 @@ public: Common::String _actionStringArray[22]; Common::String _selfStringArray[7]; Common::String _discussStringArray[9]; - menuItem _discussMenu[9]; - menuItem _inventoryMenu[9]; - menuItem _moveMenu[8]; - - void setText(int menuId, int actionId, Common::String name); + MenuItem _discussMenu[9]; + MenuItem _inventoryMenu[9]; + MenuItem _moveMenu[8]; + + int _opcodeAttach; + int _opcodeWait; + int _opcodeForce; + int _opcodeSleep; + int _opcodeListen; + int _opcodeEnter; + int _opcodeClose; + int _opcodeSearch; + int _opcodeKnock; + int _opcodeScratch; + int _opcodeRead; + int _opcodeEat; + int _opcodePlace; + int _opcodeOpen; + int _opcodeTake; + int _opcodeLook; + int _opcodeSmell; + int _opcodeSound; + int _opcodeLeave; + int _opcodeLift; + int _opcodeTurn; + int _opcodeSHide; + int _opcodeSSearch; + int _opcodeSRead; + int _opcodeSPut; + int _opcodeSLook; + MenuItem _actionMenu[12]; + + void setParent(MortevielleEngine *vm); + void readVerbNums(Common::File &f, int dataSize); + void setText(MenuItem item, Common::String name); void setDestinationText(int roomId); void setInventoryText(); - void disableMenuItem(int menuId, int actionId); - void enableMenuItem(int menuId, int actionId); + void disableMenuItem(MenuItem item); + void enableMenuItem(MenuItem item); void displayMenu(); void drawMenu(); void menuUp(int msgId); void eraseMenu(); void updateMenu(); - void initMenu(MortevielleEngine *vm); + void initMenu(); void setSearchMenu(); void unsetSearchMenu(); |