22 #ifndef HARVESTER_SCRIPT_H 23 #define HARVESTER_SCRIPT_H 25 #include "common/array.h" 26 #include "common/str.h" 27 #include "harvester/monster.h" 35 class ResourceManager;
50 int initialPanelIndex = 0;
72 int maxZScalePercent = 100;
73 float perspectiveScale = 0.0f;
74 float zVelocityStep = 1.0f;
83 bool dimmable =
false;
107 bool operatable =
false;
108 bool visible =
false;
109 bool runtimeVisible =
false;
110 bool identShown =
false;
122 bool visible =
false;
123 bool looping =
false;
124 bool backward =
false;
125 bool pingPong =
false;
127 bool runtimeActive =
false;
128 bool runtimeVisible =
false;
129 int runtimeState = -1;
142 bool deathOrMonsterfyFlag =
false;
143 bool runtimeSpawned =
false;
144 int runtimeState = -1;
146 bool visible =
false;
147 bool savedVisible =
false;
148 int deathDamageType = 0;
154 int initialValue = 0;
155 int currentValue = 0;
159 bool enabled =
false;
160 bool looping =
false;
171 int desiredFacing = -1;
176 bool startEnabled =
false;
177 bool cursorEnabled =
false;
217 enum StartupDialogueTextMode {
218 kStartupDialogueTextNone = 0,
219 kStartupDialogueTextYes = 1,
220 kStartupDialogueTextClick = 2
223 enum StartupAudioCommandType {
224 kStartupAudioCommandStartWav,
225 kStartupAudioCommandStartSingleWav,
226 kStartupAudioCommandLoadWav,
227 kStartupAudioCommandPlayWav,
228 kStartupAudioCommandDeleteWav
232 StartupAudioCommandType type = kStartupAudioCommandStartWav;
247 int roomMaxZScreenY = 0;
248 int roomMinZScreenY = 0;
249 int roomFullScaleZ = 0;
250 int roomMaxZScalePercent = 100;
251 float roomPerspectiveScale = 0.0f;
252 float roomZVelocityStep = 1.0f;
253 bool hasEntrance =
false;
254 int playerSpawnX = 0;
255 int playerSpawnY = 0;
256 int playerSpawnZ = 0;
257 int playerFacing = -1;
258 float paletteBrightness = 1.0f;
269 enum StartupRoomTransitionKind {
270 kStartupRoomTransitionNone = 0,
271 kStartupRoomTransitionChangeRoom,
272 kStartupRoomTransitionCloseup
275 enum StartupLightingCommand {
276 kStartupLightingCommandNone = 0,
277 kStartupLightingCommandDim,
278 kStartupLightingCommandNormal,
279 kStartupLightingCommandBlack,
280 kStartupLightingCommandFadeIn
300 StartupRoomTransitionKind roomTransition = kStartupRoomTransitionNone;
301 StartupLightingCommand lightingCommand = kStartupLightingCommandNone;
302 int cdChangeDisc = 0;
303 int playerDeathDamageType = 0;
306 bool requestPlayerDeath =
false;
307 bool requestPlayerGotoXZ =
false;
308 bool requestPlayerGotoZ =
false;
309 bool requestRoomRestart =
false;
311 bool requestCloseupExit =
false;
312 bool requestMainMenu =
false;
313 bool requestDemoEnding =
false;
314 bool abortRemainingCommandChain =
false;
315 bool mutatedRuntimeState =
false;
316 bool visualRuntimeStateChanged =
false;
321 static const int kDefaultPlayerHitPoints = 30;
344 bool isQuickTipsEnabled()
const {
return _quickTipsEnabled; }
345 void setQuickTipsEnabled(
bool enabled) { _quickTipsEnabled = enabled; }
347 bool isGoreEnabled()
const {
return _goreEnabled; }
348 void setGoreEnabled(
bool enabled) { _goreEnabled = enabled; }
349 StartupDialogueTextMode getDialogueTextMode()
const {
return _dialogueTextMode; }
350 void setDialogueTextMode(StartupDialogueTextMode mode) { _dialogueTextMode = mode; }
351 int getFxVolumeLevel()
const {
return _fxVolumeLevel; }
352 void setFxVolumeLevel(
int level);
353 int getMusicVolumeLevel()
const {
return _musicVolumeLevel; }
354 void setMusicVolumeLevel(
int level);
355 int getGammaLevel()
const {
return _gammaLevel; }
356 void setGammaLevel(
int level);
357 const Common::String &getParentalPassword()
const {
return _parentalPassword; }
358 void setParentalPassword(
const Common::String &password) { _parentalPassword = password; }
359 bool saveConfig()
const;
360 void resetRuntimeState();
378 bool allowTransitions =
true);
384 bool allowTransitions =
true);
386 bool isPickupBlockedByAction(
const ObjectRecord &
object,
388 bool hasObjectInteraction(
const ObjectRecord &
object)
const;
404 bool setRuntimeFlagValue(
const Common::String &flagName,
bool value);
405 bool resetRuntimeObjectToInitialState(
const Common::String &objectName);
406 bool addRuntimeObjectToInventory(
const Common::String &objectName);
407 bool syncRuntimeObjectRecord(
const ObjectRecord &
object);
410 bool setRuntimeNpcState(
const Common::String &npcName,
bool active,
bool visible);
411 bool queueRuntimeNpcDeathOrMonsterfy(
const Common::String &npcName,
int deathDamageType = 0);
412 enum { kNoMonsterfyPosZOverride = 0x7fffffff };
413 bool finalizeRuntimeNpcDeathOrMonsterfy(
const Common::String &npcName,
int deathDamageType = 0,
414 bool preserveCorpse =
false,
int corpseFrame = -1,
415 int monsterfyPosZ = kNoMonsterfyPosZOverride);
416 void pushDeferredLiveNpcDeathTransitions();
417 void popDeferredLiveNpcDeathTransitions();
418 bool isNamedNpcDeathTypeClear(
const Common::String &npcName)
const;
419 int getCurrentStoryDayIndex()
const;
420 int getPlayerCurrentHitPoints()
const {
return _playerCurrentHitPoints; }
421 int getPlayerCombatLoadout()
const {
return _playerCombatLoadout; }
422 int getPlayerCombatResourceCount(
int loadout)
const;
423 bool consumePlayerCombatResourceUnit(
int loadout);
424 bool isPlayerControlPaused()
const {
return _playerControlPaused; }
425 bool adjustPlayerCurrentHitPoints(
int delta);
426 bool setPlayerCombatLoadout(
int loadout);
427 bool setPlayerControlPaused(
bool paused);
428 bool syncRuntimeAnimState(
const Common::String &animName,
bool active,
bool visible,
int currentFrame);
430 bool syncRuntimeTimerRecord(
const TimerRecord &timer);
431 bool setRuntimeRegionEnabled(
const Common::String ®ionName,
bool enabled);
432 bool setRuntimeTimerEnabled(
const Common::String &timerName,
bool enabled);
460 void executeCommandChain(
const Common::String &initialTag,
const char *contextLabel,
464 StartupRoomTransitionKind *roomTransition,
466 bool *requestDemoEnding,
470 StartupLightingCommand *lightingCommand,
Common::String *moveEntityToPlayerZName,
471 bool *requestPlayerGotoXZ,
bool *requestPlayerGotoZ,
472 int *playerGotoX,
int *playerGotoZ,
473 bool *requestPlayerDeath,
int *playerDeathDamageType,
474 bool *mutatedRuntimeState,
bool *visualRuntimeStateChanged,
476 bool probePickupBlockingCommandChain(
const Common::String &initialTag,
478 bool hasActionableCommandChain(
const Common::String &initialTag)
const;
479 bool setPlayerCurrentHitPoints(
int hitPoints);
480 int *getPlayerCombatResourceCountPtr(
int loadout);
481 const int *getPlayerCombatResourceCountPtr(
int loadout)
const;
482 bool adjustPlayerCombatResourceCount(
int loadout,
int delta,
int maxCount,
484 void logRuntimeSaveState(
const char *operation)
const;
511 int _nailgunAmmoCount = 0;
512 int _shotgunShellCount = 0;
513 int _nineGunBulletCount = 0;
514 int _thirtyEightGunBulletCount = 0;
515 int _chainsawFuelCount = 0;
516 int _playerCurrentHitPoints = 30;
517 int _playerCombatLoadout = 0;
518 bool _playerControlPaused =
false;
519 int _fxVolumeLevel = 9;
520 int _musicVolumeLevel = 3;
522 bool _quickTipsEnabled =
true;
523 bool _goreEnabled =
true;
532 StartupDialogueTextMode _dialogueTextMode = kStartupDialogueTextYes;
533 int _deferredLiveNpcDeathTransitionDepth = 0;
538 #endif // HARVESTER_SCRIPT_H
Definition: serializer.h:80
Definition: algorithm.h:29
Definition: resources.h:32