22 #ifndef TWINE_SCENE_SCENE_H 23 #define TWINE_SCENE_SCENE_H 25 #include "common/scummsys.h" 26 #include "twine/scene/actor.h" 27 #include "twine/shared.h" 31 #define NUM_SCENES_FLAGS 80 33 #define NUM_MAX_ACTORS 100 34 #define NUM_MAX_ZONES 100 35 #define NUM_MAX_TRACKS 200 37 enum class ScenePositionType {
46 #define ZONE_INIT_ON 1 49 #define ZONE_OBLIGATOIRE 8 57 ZoneType type = ZoneType::kCube;
119 void loadModel(
ActorStruct &actor, int32 modelIndex,
bool lba1);
123 void setActorStaticFlags(
ActorStruct *act, uint32 staticFlags);
124 void setBonusParameterFlags(
ActorStruct *act, uint16 bonusFlags);
125 bool loadSceneLBA1();
126 bool loadSceneLBA2();
129 bool loadScene(int32 index);
135 int32 _currentSceneSize = 0;
136 bool _isOutsideScene =
false;
139 int32 _timerNextAmbiance = 0;
140 int16 _sampleAmbiance[4]{0};
141 int16 _sampleRepeat[4]{0};
142 int16 _sampleRound[4]{0};
143 int16 _sampleFrequency[4]{0};
144 int16 _sampleVolume[4]{0};
145 int16 _sampleMinDelay = 0;
146 int16 _sampleMinDelayRnd = 0;
148 int16 _samplePlayed = 0;
151 int16 _cubeJingle = 0;
156 int32 _currentGameOverScene = 0;
158 uint8 *_currentScene =
nullptr;
159 void dumpSceneScripts()
const;
160 void dumpSceneScript(
const char *type,
int actorIdx,
const uint8* script,
int size)
const;
165 int32 _newCube = LBA1SceneId::Citadel_Island_Prison;
166 int32 _numCube = LBA1SceneId::Citadel_Island_Prison;
167 int32 _oldcube = LBA1SceneId::Citadel_Island_Prison;
171 int32 _numHolomapTraj = -1;
173 TextBankId _sceneTextBank = TextBankId::None;
174 int32 _alphaLight = 0;
175 int32 _betaLight = 0;
178 uint8 _shadowLevel = 0;
179 uint8 _modeLabyrinthe = 0;
180 uint8 _currentCubeX = 0;
181 uint8 _currentCubeY = 0;
186 int16 _startYFalling = 0;
189 ScenePositionType _flagChgCube = ScenePositionType::kNoPosition;
196 int16 _mecaPenguinIdx = 0;
199 int16 _numObjFollow = OWN_ACTOR_SCENE_INDEX;
201 bool _flagClimbing =
false;
202 bool _enableEnhancements =
false;
204 int16 _currentScriptValue = 0;
206 int16 _talkingActor = 0;
209 int32 _sceneNumTracks = 0;
210 IVec3 _sceneTracks[NUM_MAX_TRACKS];
212 bool _flagRenderGrid =
true;
214 uint8 _listFlagCube[NUM_SCENES_FLAGS]{0};
216 int32 _sceneNumZones = 0;
221 void playSceneMusic();
223 void reloadCurrentScene();
229 bool loadSceneCubeXY(
int sceneNum, int32 *cubeX, int32 *cubeY);
232 void processEnvironmentSound();
233 void initSceneVars();
235 bool isGameRunning()
const;
236 void stopRunningGame();
242 void checkZoneSce(int32 actorIdx);
245 inline bool Scene::isGameRunning()
const {
246 return _currentScene !=
nullptr;
int32 used
Definition: scene.h:80
Definition: achievements_tables.h:27
int32 textColor
Definition: scene.h:72