ScummVM API documentation
scene_op.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#ifndef DGDS_SCENE_OP_H
23#define DGDS_SCENE_OP_H
24
25#include "common/types.h"
26#include "common/array.h"
27
28#include "dgds/scene_condition.h"
29
30namespace Dgds {
31
32enum SceneOpCode {
33 kSceneOpNone = 0,
34 kSceneOpChangeScene = 1, // args: scene num
35 kSceneOpNoop = 2, // args: none. Maybe should close dialogue?
36 kSceneOpGlobal = 3, // args: array of uints
37 kSceneOpSegmentStateOps = 4, // args: array of uint pairs [op seg, op seg], term with 0,0 that modify segment states
38 kSceneOpSetItemAttr = 5, // args: [item num, item param 0x28, item param 0x2c]. set item attrs?
39 kSceneOpSetDragItem = 6, // args: item num. give item?
40 kSceneOpOpenInventory = 7, // args: none.
41 kSceneOpShowDlg = 8, // args: dialogue number.
42 kSceneOpShowInvButton = 9, // args: none.
43 kSceneOpHideInvButton = 10, // args: none.
44 kSceneOpEnableTrigger = 11, // args: trigger num
45 kSceneOpChangeSceneToStored = 12, // args: none. Change scene to stored number
46 kSceneOpAddFlagToDragItem = 13, // args: none.
47 kSceneOpOpenInventoryZoom = 14, // args: none.
48 kSceneOpMoveItemsBetweenScenes = 15, // args: none.
49 kSceneOpShowClock = 16, // args: none. set clock script-visible.
50 kSceneOpHideClock = 17, // args: none. set clock script-hidden.
51 kSceneOpShowMouse = 18, // args: none.
52 kSceneOpHideMouse = 19, // args: none.
53 // Op 20 onward are common, but not in dragon
54
55 kSceneOpLoadTalkDataAndSetFlags = 20, // args: tdsnum to load, headnum
56 kSceneOpClearVisibleTalkHeads = 21, // args: none
57 kSceneOpLoadTalkData = 22, // args: tds num to load
58 kSceneOpLoadDDSData = 24, // args: dds num to load
59 kSceneOpFreeDDSData = 25, // args: dds num to free
60 kSceneOpFreeTalkData = 26, // args: tds num to free
61
62 // Dragon-specific opcodes
63 kSceneOpPasscode = 100, // args: none.
64 kSceneOpMeanwhile = 101, // args: none. Clears screen and displays "meanwhile".
65 kSceneOpOpenGameOverMenu = 102, // args: none.
66 kSceneOpTiredDialog = 103, // args: none. Something about "boy am I tired"?
67 kSceneOpArcadeTick = 104, // args: none. Called in arcade post-tick.
68 kSceneOpDrawDragonCountdown1 = 105, // args: none. Draw special countdown number at 141, 56
69 kSceneOpDrawDragonCountdown2 = 106, // args: none. Draw some number at 250, 42
70 kSceneOpOpenPlaySkipIntroMenu = 107, // args: none. DRAGON: Show menu 50, the "Play Introduction" / "Skip Introduction" menu.
71 kSceneOpOpenBetterSaveGameMenu = 108, // args: none. DRAGON: Show menu 46, the "Before arcade maybe you better save your game" menu.
72
73 // China-specific opcodes
74 kSceneOpChinaTankInit = 100,
75 kSceneOpChinaTankEnd = 101,
76 kSceneOpChinaTankTick = 102,
77 kSceneOpChinaSetLanding = 103,
78 kSceneOpChinaScrollIntro = 104,
79 kSceneOpChinaScrollLeft = 105,
80 kSceneOpChinaScrollRight = 107,
81 kSceneOpShellGameInit = 108,
82 kSceneOpShellGameEnd = 109,
83 kSceneOpShellGameTick = 110,
84 kSceneOpChinaTrainInit = 111,
85 kSceneOpChinaTrainEnd = 112,
86 kSceneOpChinaTrainTick = 113,
87 kSceneOpChinaOpenGameOverMenu = 114, // args: none.
88 kSceneOpChinaOpenSkipCreditsMenu = 115, // args: none.
89 kSceneOpChinaOnIntroTick = 116, // args: none.
90 kSceneOpChinaOnIntroInit = 117, // args: none.
91 kSceneOpChinaOnIntroEnd = 118, // args: none.
92
93 // Beamish-specific opcodes
94 kSceneOpOpenBeamishGameOverMenu = 100,
95 kSceneOpOpenBeamishOpenSkipCreditsMenu = 101,
96
97 kSceneOpMaxCode = 255, // for checking file load
98
99 kSceneOpHasConditionalOpsFlag = 0x8000,
100};
101
102class SceneOp {
103public:
104 Common::Array<SceneConditions> _conditionList;
106 SceneOpCode _opCode;
107
108 Common::String dump(const Common::String &indent) const;
109 bool runOp() const;
110
111private:
112 bool runCommonOp() const;
113 bool runDragonOp() const;
114 bool runChinaOp() const;
115 bool runBeamishOp() const;
116};
117
119public:
120 SceneOpCode _opCode;
121 Common::Array<SceneConditions> _conditionList;
123
124 Common::String dump(const Common::String &indent) const;
125};
126
127
128} // end namespace Dgds
129
130#endif // DGDS_SCENE_OP_H
Definition: array.h:52
Definition: str.h:59
Definition: scene_op.h:118
Definition: scene_op.h:102