ScummVM API documentation
processroom.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 Labyrinth of Time code with assistance of
24 *
25 * Copyright (c) 1993 Terra Nova Development
26 * Copyright (c) 2004 The Wyrmkeep Entertainment Co.
27 *
28 */
29
30#ifndef LAB_PROCESSROOM_H
31#define LAB_PROCESSROOM_H
32
33namespace Lab {
34
35enum ActionType {
36 kActionPlaySound = 1,
37 kActionPlaySoundLooping = 2,
38 kActionShowDiff = 3,
39 kActionShowDiffLooping = 4,
40 kActionLoadDiff = 5,
41 kActionLoadBitmap = 6, // unused
42 kActionShowBitmap = 7, // unused
43 kActionTransition = 8,
44 kActionNoUpdate = 9,
45 kActionForceUpdate = 10,
46 kActionShowCurPict = 11,
47 kActionSetElement = 12,
48 kActionUnsetElement = 13,
49 kActionShowMessage = 14,
50 kActionShowMessages = 15,
51 kActionChangeRoom = 16,
52 kActionSetCloseup = 17,
53 kActionMainView = 18,
54 kActionSubInv = 19,
55 kActionAddInv = 20,
56 kActionShowDir = 21,
57 kActionWaitSecs = 22,
58 kActionStopMusic = 23,
59 kActionStartMusic = 24,
60 kActionChangeMusic = 25,
61 kActionResetMusic = 26,
62 kActionFillMusic = 27,
63 kActionWaitSound = 28,
64 kActionClearSound = 29,
65 kActionWinMusic = 30,
66 kActionWinGame = 31,
67 kActionLostGame = 32, // unused
68 kActionResetBuffer = 33,
69 kActionSpecialCmd = 34,
70 kActionCShowMessage = 35,
71 kActionPlaySoundNoWait = 36
72};
73
74enum RuleType {
75 kRuleTypeNone = 0,
76 kRuleTypeAction = 1,
77 kRuleTypeOperate = 2,
78 kRuleTypeGoForward = 3,
79 kRuleTypeConditions = 4, // unused?
80 kRuleTypeTurn = 5,
81 kRuleTypeGoMainView = 6,
82 kRuleTypeTurnFromTo = 7
83};
84
85enum RuleAction {
86 kRuleActionTake = 0,
87 kRuleActionMove = 1, // unused?
88 kRuleActionOpenDoor = 2, // unused?
89 kRuleActionCloseDoor = 3, // unused?
90 kRuleActionTakeDef = 4
91};
92
93enum Condition {
94 kCondBeltGlowing = 70,
95 kCondBridge1 = 104,
96 kCondNoNews = 135,
97 kCondBridge0 = 148,
98 kCondLampOn = 151,
99 kCondNoClean = 152,
100 kCondDirty = 175,
101 kCondUsedHelmet = 184
102};
103
104enum MapDoors {
105 kDoorLeftNorth = 1,
106 kDoorLeftEast = 2,
107 kDoorLeftSouth = 4,
108 kDoorLeftWest = 8,
109
110 kDoorMiddleNorth = 16,
111 kDoorRightNorth = 32,
112 kDoorMiddleSouth = 64,
113 kDoorRightSouth = 128,
114
115 kDoorMiddleEast = 16,
116 kDoorBottomEast = 32,
117 kDoorMiddleWest = 64,
118 kDoorBottomWest = 128
119};
120
121enum SpecialRoom {
122 kNormalRoom = 0,
123 kUpArrowRoom,
124 kDownArrowRoom,
125 kBridgeRoom,
126 kVerticalCorridor,
127 kHorizontalCorridor,
128 kMedMaze,
129 kHedgeMaze,
130 kSurMaze,
131 kMultiMazeF1,
132 kMultiMazeF2,
133 kMultiMazeF3
134};
135
136struct CloseData {
137 uint16 _x1, _y1, _x2, _y2;
138 int16 _closeUpType; // if > 0, an object. If < 0, an item
139 uint16 _depth; // Level of the closeup.
140 Common::String _graphicName;
141 Common::String _message;
142 CloseDataList _subCloseUps;
143};
144
145struct ViewData {
146 Common::Array<int16> _condition;
147 Common::String _graphicName;
148 CloseDataList _closeUps;
149};
150
151struct Action {
152 ActionType _actionType;
153 int16 _param1;
154 int16 _param2;
155 int16 _param3;
157};
158
159struct Rule {
160 RuleType _ruleType;
161 int16 _param1;
162 int16 _param2;
163 Common::Array<int16> _condition;
164 ActionList _actionList;
165};
166
167struct RoomData {
168 uint16 _doors[4];
169 byte _transitionType;
170 ViewDataList _view[4];
171 RuleList _rules;
172 Common::String _roomMsg;
173};
174
176 uint16 _quantity;
177 Common::String _name;
178 Common::String _bitmapName;
179};
180
181struct MapData {
182 uint16 _x, _y, _pageNumber;
183 SpecialRoom _specialID;
184 uint32 _mapFlags;
185};
186
187} // End of namespace Lab
188
189#endif // LAB_PROCESSROOM_H
Definition: str.h:59
Definition: processroom.h:151
Definition: processroom.h:136
Definition: processroom.h:175
Definition: processroom.h:181
Definition: processroom.h:167
Definition: processroom.h:159
Definition: processroom.h:145