ScummVM API documentation
scene_config.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 HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_CONFIG_H
23#define HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_CONFIG_H
24
25#include "common/str.h"
26#include "common/types.h"
27
28namespace Hollywood {
29
30enum {
31 kSceneConfigNoAudioChapter = 0xff
32};
33
35 SceneResourceLayout(uint requiredChunks, uint firstArenaChunk, uint lastArenaChunk) :
36 initialRequiredChunkCount(requiredChunks),
37 arenaFirstChunk(firstArenaChunk),
38 arenaLastChunk(lastArenaChunk) {
39 }
40
41 uint initialRequiredChunkCount;
42 uint arenaFirstChunk;
43 uint arenaLastChunk;
44};
45
47 explicit SceneViewport(uint16 initialXOffset) :
48 xOffset(initialXOffset),
49 minXOffset(initialXOffset),
50 maxXOffset(initialXOffset) {
51 }
52
53 SceneViewport(uint16 initialXOffset, uint16 minimumXOffset, uint16 maximumXOffset) :
54 xOffset(initialXOffset),
55 minXOffset(minimumXOffset),
56 maxXOffset(maximumXOffset) {
57 }
58
59 uint16 xOffset;
60 uint16 minXOffset;
61 uint16 maxXOffset;
62};
63
65 SceneActorPose(int actorX, int actorY, byte actorFacing) :
66 x(actorX),
67 y(actorY),
68 facing(actorFacing) {
69 }
70
71 int x;
72 int y;
73 byte facing;
74};
75
76/*
77 * Static resource and presentation metadata for a playable scene. The scene
78 * number supplies conventional archive names, stage index, and chapter-wide
79 * defaults; scene factories only describe their layout and exceptions.
80 */
82 PlayableSceneConfig(uint16 sceneNumber, const SceneResourceLayout &resourceLayout,
83 const SceneViewport &sceneViewport, const SceneActorPose &actorPose);
84
85 void setActorResources(uint bankTableEntry, uint paletteTableEntry);
86 void setTextResources(uint rowsOffsetIndex, uint32 cueDescriptorTableOffset);
87
88 template<uint size>
89 void setActorPathStepDeltas(const byte (&table)[size]) {
90 actorPathStepDeltaTable = table;
91 actorPathStepDeltaTableSize = size;
92 }
93
94 uint16 sceneId;
95 Common::String resourceArchiveName;
96 uint initialRequiredChunkCount;
97 uint arenaFirstChunk;
98 uint arenaLastChunk;
99 uint stageIndex;
100 Common::String debugName;
101 uint16 viewportXOffset;
102 uint16 viewportMinXOffset;
103 uint16 viewportMaxXOffset;
104 SceneActorPose defaultActorPose;
105 // False when scene resource layers render the protagonist.
106 bool drawDefaultActor;
107 bool entrySequenceOwnsFirstPresentation;
108 byte inventoryOwnerIndex;
109 byte activeAudioChapterIndex;
110 uint actorBankTableEntry;
111 uint actorPaletteTableEntry;
112 uint32 inventoryActionTableExtraOffset;
113 uint inventoryRowsOffsetIndex;
114 uint32 speechCueDescriptorTableOffset;
115 const byte *actorPathStepDeltaTable;
116 uint actorPathStepDeltaTableSize;
117 byte walkablePaletteMaxRegion;
118 Common::String musicArchiveName;
119 Common::String soundBank0ArchiveName;
120 bool loadInventoryActionTables;
121 bool loadActorDepthTables;
122 bool useActorDepthTest;
123};
124
125} // End of namespace Hollywood
126
127#endif // HOLLYWOOD_MONSTERS_SCENES_PLAYABLE_SCENE_CONFIG_H
Definition: str.h:59
Definition: scene_config.h:81
Definition: scene_config.h:64
Definition: scene_config.h:34
Definition: scene_config.h:46