ScummVM API documentation
menu.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22/*
23 * This code is based on original Mortville Manor DOS source code
24 * Copyright (c) 1987-1989 Lankhor
25 */
26
27#ifndef MORTEVIELLE_MENU_H
28#define MORTEVIELLE_MENU_H
29
30#include "common/rect.h"
31#include "common/str.h"
32
33namespace Mortevielle {
34class MortevielleEngine;
35
36enum {
37 MENU_NONE = 0, MENU_INVENTORY = 1, MENU_MOVE = 2, MENU_ACTION = 3,
38 MENU_SELF = 4, MENU_DISCUSS = 5, MENU_FILE = 6, MENU_SAVE = 7,
39 MENU_LOAD = 8
40};
41
42const int OPCODE_NONE = 0;
43
44struct MenuItem {
45 int _menuId;
46 int _actionId;
47};
48
49class Menu {
50private:
52
53 byte _charArr[6][24];
54 int _msg3;
55 int _msg4;
56
57 void util(Common::Point pos);
58 void invert(int indx);
59 void menuDown(int ii);
60
61public:
63
64 bool _menuActive;
65 bool _menuSelected;
66 bool _multiTitle;
67 bool _menuDisplayed;
68 Common::String _inventoryStringArray[9];
69 Common::String _moveStringArray[8];
70 Common::String _actionStringArray[22];
71 Common::String _selfStringArray[7];
72 Common::String _discussStringArray[9];
73 MenuItem _discussMenu[9];
74 MenuItem _inventoryMenu[9];
75 MenuItem _moveMenu[8];
76
77 int _opcodeAttach;
78 int _opcodeWait;
79 int _opcodeForce;
80 int _opcodeSleep;
81 int _opcodeListen;
82 int _opcodeEnter;
83 int _opcodeClose;
84 int _opcodeSearch;
85 int _opcodeKnock;
86 int _opcodeScratch;
87 int _opcodeRead;
88 int _opcodeEat;
89 int _opcodePlace;
90 int _opcodeOpen;
91 int _opcodeTake;
92 int _opcodeLook;
93 int _opcodeSmell;
94 int _opcodeSound;
95 int _opcodeLeave;
96 int _opcodeLift;
97 int _opcodeTurn;
98 int _opcodeSHide;
99 int _opcodeSSearch;
100 int _opcodeSRead;
101 int _opcodeSPut;
102 int _opcodeSLook;
103 MenuItem _actionMenu[12];
104
105 void readVerbNums(Common::File &f, int dataSize);
106 void setText(MenuItem item, Common::String name);
107 void setDestinationText(int roomId);
108 void setInventoryText();
109 void disableMenuItem(MenuItem item);
110 void enableMenuItem(MenuItem item);
111 void displayMenu();
112 void drawMenu();
113 void menuUp(int msgId);
114 void eraseMenu();
115 void updateMenu();
116 void initMenu();
117
118 void setSearchMenu();
119 void unsetSearchMenu();
120};
121
122} // End of namespace Mortevielle
123#endif
Definition: file.h:47
Definition: str.h:59
Definition: menu.h:49
Definition: mortevielle.h:156
Definition: rect.h:144
Definition: menu.h:44