22 #ifndef VCRUISE_RUNTIME_H 23 #define VCRUISE_RUNTIME_H 25 #include "graphics/pixelformat.h" 27 #include "common/hashmap.h" 28 #include "common/keyboard.h" 29 #include "common/mutex.h" 30 #include "common/rect.h" 32 #include "vcruise/detection.h" 39 class MemoryReadStream;
49 class SeekableAudioStream;
50 class LoopingAudioStream;
57 struct WinCursorGroup;
78 static const uint kNumDirections = 8;
79 static const uint kNumHighPrecisionDirections = 256;
80 static const uint kHighPrecisionDirectionMultiplier = kNumHighPrecisionDirections / kNumDirections;
81 static const uint kNumStartConfigs = 3;
84 kStartConfigCheatMenu,
94 class RuntimeMenuInterface;
98 struct IScriptCompilerGlobalState;
100 struct RoomScriptSet;
101 struct SoundLoopInfo;
102 class SampleLoopAudioStream;
103 struct AD2044Graphics;
107 kGameStateWaitingForAnimation,
108 kGameStateWaitingForAnimationToDelay,
109 kGameStateWaitingForFacing,
110 kGameStateWaitingForFacingToAnim,
115 kGameStateScriptReset,
117 kGameStateGyroAnimation,
128 short fwdAnimationID;
129 short revAnimationID;
158 uint16 interactionID;
170 virtual void setRoomNumber(uint roomNumber) = 0;
172 virtual void unload() = 0;
181 uint panInteractionID;
182 uint clickInteractionID;
184 uint lastHighlightedItem;
185 uint animChangeFrameOffset;
186 uint animChangeNumFrames;
227 PlaylistMap_t playlists;
268 int32 rampStartVolume;
270 int32 rampRatePerMSec;
271 uint32 rampStartTime;
272 bool rampTerminateOnCompletion;
277 uint effectiveVolume;
278 int32 effectiveBalance;
283 bool restartWhenAudible;
284 bool tryToLoopWhenRestarted;
304 uint sceneChangesRemaining;
328 int32 volumeOrDurationInSeconds;
334 ScoreSectionMap_t sections;
351 bool lockInteractions;
363 uint32 nextStartTime;
364 uint currentAlternation;
371 uint16 areaFrameIndex;
383 uint16 frameNumberInArea;
405 Fraction(uint pNumerator, uint pDenominator);
411 enum LoadGameOutcome {
412 kLoadGameOutcomeSucceeded,
414 kLoadGameOutcomeSaveDataCorrupted,
416 kLoadGameOutcomeMissingVersion,
417 kLoadGameOutcomeInvalidVersion,
418 kLoadGameOutcomeSaveIsTooNew,
419 kLoadGameOutcomeSaveIsTooOld,
444 bool tryToLoopWhenRestarted;
462 bool havePendingPostSwapScreenReset;
464 uint loadedAnimation;
465 uint animDisplayingFrame;
466 bool haveIdleAnimationLoop;
476 bool musicMuteDisabled;
513 static const uint kSaveGameIdentifier = 0x53566372;
514 static const uint kSaveGameCurrentVersion = 10;
515 static const uint kSaveGameEarliestSupportedVersion = 2;
516 static const uint kMaxStates = 2;
524 uint swapOutDirection;
526 uint8 inventoryActiveItem;
552 kOSEventTypeMouseMove,
553 kOSEventTypeLButtonDown,
554 kOSEventTypeLButtonUp,
558 kOSEventTypeKeymappedEvent,
561 enum KeymappedEvent {
565 kKeymappedEventSaveGame,
566 kKeymappedEventLoadGame,
567 kKeymappedEventSoundSettings,
569 kKeymappedEventPause,
570 kKeymappedEventMusicToggle,
571 kKeymappedEventSoundToggle,
572 kKeymappedEventMusicVolumeDown,
573 kKeymappedEventMusicVolumeUp,
574 kKeymappedEventSoundVolumeDown,
575 kKeymappedEventSoundVolumeUp,
577 kKeymappedEventSkipAnimation,
579 kKeymappedEventPutItem,
587 Common::KeyCode keyCode;
588 KeymappedEvent keymappedEvent;
641 friend class RuntimeMenuInterface;
648 kCharSetChineseTraditional,
649 kCharSetChineseSimplified,
657 void loadCursors(
const char *exeName);
658 void setDebugMode(
bool debugMode);
659 void setFastAnimationMode(
bool fastAnimationMode);
660 void setPreloadSounds(
bool preloadSounds);
661 void setLowQualityGraphicsMode(
bool lowQualityGraphicsMode);
666 void onLButtonDown(int16 x, int16 y);
667 void onLButtonUp(int16 x, int16 y);
668 void onMouseMove(int16 x, int16 y);
669 void onKeyDown(Common::KeyCode keyCode);
670 void onKeymappedEvent(KeymappedEvent evt);
672 bool canSave(
bool onCurrentScreen)
const;
673 bool canLoad()
const;
675 void recordSaveGameSnapshot();
677 void restoreSaveGameSnapshot();
683 bool bootGame(
bool newGame);
684 static void resolveCodePageForLanguage(
Common::Language lang, Common::CodePage &outCodePage, CharSet &outCharSet);
692 enum IndexParseType {
695 kIndexParseTypeRRoom,
696 kIndexParseTypeYRoom,
697 kIndexParseTypeVRoom,
698 kIndexParseTypeTRoom,
699 kIndexParseTypeCRoom,
700 kIndexParseTypeSRoom,
701 kIndexParseTypeNameRoom,
704 enum AnimDecoderState {
705 kAnimDecoderStateStopped,
706 kAnimDecoderStatePlaying,
707 kAnimDecoderStatePaused,
710 struct IndexPrefixTypePair {
712 IndexParseType parseType;
715 struct RenderSection {
724 static const uint kMaxPreviousStates = 3;
728 int32 previousStates[kMaxPreviousStates];
729 int32 requiredPreviousStates[kMaxPreviousStates];
730 uint numPreviousStates;
731 uint numPreviousStatesRequired;
746 static const uint kNumGyros = 5;
748 Gyro gyros[kNumGyros];
750 uint completeInteraction;
751 uint failureInteraction;
752 uint frameSeparation;
764 int32 dragCurrentState;
765 bool isWaitingForAnimation;
768 enum PanoramaCursorFlags {
769 kPanCursorDraggableHoriz = (1 << 0),
770 kPanCursorDraggableUp = (1 << 1),
771 kPanCursorDraggableDown = (1 << 2),
773 kPanCursorDirectionUp = (0 << 3),
774 kPanCursorDirectionLeft = (1 << 3),
775 kPanCursorDirectionRight = (2 << 3),
776 kPanCursorDirectionDown = (3 << 3),
778 kPanCursorMaxCount = (1 << 5),
782 kPanoramaStateInactive,
784 kPanoramaStatePanningUncertainDirection,
786 kPanoramaStatePanningLeft,
787 kPanoramaStatePanningRight,
788 kPanoramaStatePanningUp,
789 kPanoramaStatePanningDown,
792 enum InGameMenuState {
793 kInGameMenuStateInvisible,
794 kInGameMenuStateVisible,
795 kInGameMenuStateHoveringInactive,
796 kInGameMenuStateHoveringActive,
797 kInGameMenuStateClickingOver,
798 kInGameMenuStateClickingNotOver,
799 kInGameMenuStateClickingInactive,
802 enum SoundLoopBehavior {
803 kSoundLoopBehaviorNo,
804 kSoundLoopBehaviorYes,
805 kSoundLoopBehaviorAuto,
808 static const uint kPanLeftInteraction = 1;
809 static const uint kPanDownInteraction = 2;
810 static const uint kPanRightInteraction = 3;
811 static const uint kPanUpInteraction = 4;
813 static const uint kPanoramaLeftFlag = 1;
814 static const uint kPanoramaRightFlag = 2;
815 static const uint kPanoramaUpFlag = 4;
816 static const uint kPanoramaDownFlag = 8;
817 static const uint kPanoramaHorizFlags = (kPanoramaLeftFlag | kPanoramaRightFlag);
819 static const uint kNumInventorySlots = 6;
820 static const uint kNumInventoryPages = 8;
822 typedef int32 ScriptArg_t;
823 typedef int32 StackInt_t;
826 enum StackValueType {
843 StackValue(
const StackValue &other);
844 StackValue(StackValue &&other);
845 explicit StackValue(StackInt_t i);
850 StackValue &operator=(
const StackValue &other);
851 StackValue &operator=(StackValue &&other);
857 struct CallStackFrame {
861 uint _nextInstruction;
869 uint durationInDeciseconds;
873 struct SubtitleQueueItem {
882 bool runHorizontalPan(
bool isRight);
884 bool requireAvailableStack(uint n);
885 bool runWaitForAnimation();
886 bool runWaitForAnimationToDelay();
887 bool runWaitForFacing();
888 bool runWaitForFacingToAnim();
890 bool runGyroAnimation();
892 void continuePlayingAnimation(
bool loop,
bool useStopFrame,
bool &outEndedAnimation);
893 void drawSectionToScreen(
const RenderSection §ion,
const Common::Rect &rect);
894 void commitSectionToScreen(
const RenderSection §ion,
const Common::Rect &rect);
895 void terminateScript();
898 bool checkCompletionConditions();
900 void startTerminatingHorizontalPan(
bool isRight);
903 void queueOSEvent(
const OSEvent &evt);
905 void processUniversalKeymappedEvents(KeymappedEvent evt);
907 void loadReahSchizmIndex();
908 void loadAD2044ExecutableResources();
910 void loadConfig(
const char *cfgPath);
912 void loadDuplicateRooms();
913 void loadAllSchizmScreenNames();
918 void resolveSoundByNameOrID(
const StackValue &stackValue,
bool load, StackInt_t &outSoundID,
SoundInstance *&outWave);
920 void changeToScreen(uint roomNumber, uint screenNumber);
921 void clearIdleAnimations();
923 void changeToExamineItem();
924 void returnFromExaminingItem();
925 bool triggerPreIdleActions();
926 void returnToIdleState();
928 void refreshCursor(uint32 currentTime);
929 bool dischargeIdleMouseMove();
930 bool dischargeIdleMouseDown();
931 bool dischargeIdleClick();
936 void changeMusicTrack(
int musicID);
937 void startScoreSection();
938 void setMusicMute(
bool muted);
940 void changeAnimation(
const AnimationDef &animDef,
bool consumeFPSOverride);
941 void changeAnimation(
const AnimationDef &animDef, uint initialFrame,
bool consumeFPSOverride);
942 void changeAnimation(
const AnimationDef &animDef, uint initialFrame,
bool consumeFPSOverride,
const Fraction &defaultFrameRate);
943 void applyAnimationVolume();
946 void triggerSound(SoundLoopBehavior loopBehavior,
SoundInstance &sound, int32 volume, int32 balance,
bool is3D,
bool isSpeech);
947 void triggerSoundRamp(
SoundInstance &sound, uint durationMSec, int32 newVolume,
bool terminateOnCompletion);
950 void updateSounds(uint32 timestamp);
951 void updateSubtitles();
952 void update3DSounds();
954 void triggerAmbientSounds();
955 uint decibelsToLinear(
int db, uint baseVolume, uint maxVolume)
const;
956 int32 getSilentSoundVolume()
const;
957 int32 getDefaultSoundVolume()
const;
958 uint applyVolumeScale(int32 volume)
const;
959 int applyBalanceScale(int32 balance)
const;
962 void stopSubtitles();
964 AnimationDef stackArgsToAnimDef(
const StackInt_t *args)
const;
965 void consumeAnimChangeAndAdjustAnim(
AnimationDef &animDef);
972 void allocateRoomsUpTo(uint roomNumber);
974 void drawDebugOverlay();
978 void detectPanoramaDirections();
979 void detectPanoramaMouseMovement(uint32 timestamp);
980 void panoramaActivate();
982 bool computeFaceDirectionAnimation(uint desiredDirection,
const AnimationDef *&outAnimDef, uint &outInitialFrame, uint &outStopFrame);
984 void inventoryAddItem(uint item);
985 void inventoryRemoveItem(uint item);
989 void redrawSubtitleSection();
990 void clearSubtitleSection();
992 void drawInventory(uint slot);
994 bool isTrayVisible()
const;
995 void resetInventoryHighlights();
996 void loadInventoryFromPage();
997 void copyInventoryToPage();
999 static uint32 getLocationForScreen(uint roomNumber, uint screenNumber);
1000 void updatePlacedItemCache();
1001 void drawPlacedItemGraphic();
1002 void clearPlacedItemGraphic();
1003 void drawActiveItemGraphic();
1004 void clearActiveItemGraphic();
1005 void drawInventoryItemGraphic(uint slot);
1006 void clearInventoryItemGraphic(uint slot);
1007 void dropActiveItem();
1008 void pickupPlacedItem();
1009 void stashActiveItemToInventory(uint slot);
1010 void pickupInventoryItem(uint slot);
1016 bool loadSubtitles(Common::CodePage codePage,
bool guessCodePage);
1018 void changeToMenuPage(
MenuPage *menuPage);
1020 void checkInGameMenuHover();
1021 void dismissInGameMenu();
1022 void dischargeInGameMenuMouseUp();
1023 void drawInGameMenuButton(uint element);
1028 void clearCircuitPuzzle();
1029 void clearCircuitHighlightRect(
const Common::Rect &rect);
1030 void drawCircuitHighlightRect(
const Common::Rect &rect);
1038 void scriptOpNumber(ScriptArg_t arg);
1039 void scriptOpRotate(ScriptArg_t arg);
1040 void scriptOpAngle(ScriptArg_t arg);
1041 void scriptOpAngleGGet(ScriptArg_t arg);
1042 void scriptOpSpeed(ScriptArg_t arg);
1043 void scriptOpSAnimL(ScriptArg_t arg);
1044 void scriptOpChangeL(ScriptArg_t arg);
1046 void scriptOpAnimR(ScriptArg_t arg);
1047 void scriptOpAnimF(ScriptArg_t arg);
1048 void scriptOpAnimN(ScriptArg_t arg);
1049 void scriptOpAnimG(ScriptArg_t arg);
1050 void scriptOpAnimS(ScriptArg_t arg);
1051 void scriptOpAnim(ScriptArg_t arg);
1053 void scriptOpStatic(ScriptArg_t arg);
1054 void scriptOpVarLoad(ScriptArg_t arg);
1055 void scriptOpVarStore(ScriptArg_t arg);
1056 void scriptOpVarAddAndStore(ScriptArg_t arg);
1057 void scriptOpVarGlobalLoad(ScriptArg_t arg);
1058 void scriptOpVarGlobalStore(ScriptArg_t arg);
1060 void scriptOpItemCheck(ScriptArg_t arg);
1061 void scriptOpItemRemove(ScriptArg_t arg);
1062 void scriptOpItemHighlightSet(ScriptArg_t arg);
1063 void scriptOpItemAdd(ScriptArg_t arg);
1064 void scriptOpItemHaveSpace(ScriptArg_t arg);
1065 void scriptOpItemClear(ScriptArg_t arg);
1067 void scriptOpSetCursor(ScriptArg_t arg);
1068 void scriptOpSetRoom(ScriptArg_t arg);
1069 void scriptOpLMB(ScriptArg_t arg);
1070 void scriptOpLMB1(ScriptArg_t arg);
1071 void scriptOpSoundS1(ScriptArg_t arg);
1072 void scriptOpSoundS2(ScriptArg_t arg);
1073 void scriptOpSoundS3(ScriptArg_t arg);
1074 void scriptOpSoundL1(ScriptArg_t arg);
1075 void scriptOpSoundL2(ScriptArg_t arg);
1076 void scriptOpSoundL3(ScriptArg_t arg);
1077 void scriptOp3DSoundS2(ScriptArg_t arg);
1078 void scriptOp3DSoundL2(ScriptArg_t arg);
1079 void scriptOp3DSoundL3(ScriptArg_t arg);
1080 void scriptOpStopAL(ScriptArg_t arg);
1081 void scriptOpRange(ScriptArg_t arg);
1082 void scriptOpAddXSound(ScriptArg_t arg);
1083 void scriptOpClrXSound(ScriptArg_t arg);
1084 void scriptOpStopSndLA(ScriptArg_t arg);
1085 void scriptOpStopSndLO(ScriptArg_t arg);
1087 void scriptOpMusic(ScriptArg_t arg);
1088 void scriptOpMusicVolRamp(ScriptArg_t arg);
1089 void scriptOpParm0(ScriptArg_t arg);
1090 void scriptOpParm1(ScriptArg_t arg);
1091 void scriptOpParm2(ScriptArg_t arg);
1092 void scriptOpParm3(ScriptArg_t arg);
1093 void scriptOpParmG(ScriptArg_t arg);
1094 void scriptOpSParmX(ScriptArg_t arg);
1095 void scriptOpSAnimX(ScriptArg_t arg);
1097 void scriptOpVolumeDn2(ScriptArg_t arg);
1098 void scriptOpVolumeDn3(ScriptArg_t arg);
1099 void scriptOpVolumeDn4(ScriptArg_t arg);
1100 void scriptOpVolumeUp3(ScriptArg_t arg);
1101 void scriptOpRandom(ScriptArg_t arg);
1102 void scriptOpDrop(ScriptArg_t arg);
1103 void scriptOpDup(ScriptArg_t arg);
1104 void scriptOpSwap(ScriptArg_t arg);
1105 void scriptOpSay1(ScriptArg_t arg);
1106 void scriptOpSay2(ScriptArg_t arg);
1107 void scriptOpSay3(ScriptArg_t arg);
1108 void scriptOpSay3Get(ScriptArg_t arg);
1109 void scriptOpSetTimer(ScriptArg_t arg);
1110 void scriptOpGetTimer(ScriptArg_t arg);
1111 void scriptOpDelay(ScriptArg_t arg);
1112 void scriptOpLoSet(ScriptArg_t arg);
1113 void scriptOpLoGet(ScriptArg_t arg);
1114 void scriptOpHiSet(ScriptArg_t arg);
1115 void scriptOpHiGet(ScriptArg_t arg);
1117 void scriptOpNot(ScriptArg_t arg);
1118 void scriptOpAnd(ScriptArg_t arg);
1119 void scriptOpOr(ScriptArg_t arg);
1120 void scriptOpAdd(ScriptArg_t arg);
1121 void scriptOpSub(ScriptArg_t arg);
1122 void scriptOpNegate(ScriptArg_t arg);
1123 void scriptOpCmpEq(ScriptArg_t arg);
1124 void scriptOpCmpLt(ScriptArg_t arg);
1125 void scriptOpCmpGt(ScriptArg_t arg);
1127 void scriptOpBitLoad(ScriptArg_t arg);
1128 void scriptOpBitSet0(ScriptArg_t arg);
1129 void scriptOpBitSet1(ScriptArg_t arg);
1131 void scriptOpDisc1(ScriptArg_t arg);
1132 void scriptOpDisc2(ScriptArg_t arg);
1133 void scriptOpDisc3(ScriptArg_t arg);
1135 void scriptOpGoto(ScriptArg_t arg);
1137 void scriptOpEscOn(ScriptArg_t arg);
1138 void scriptOpEscOff(ScriptArg_t arg);
1139 void scriptOpEscGet(ScriptArg_t arg);
1140 void scriptOpBackStart(ScriptArg_t arg);
1141 void scriptOpSaveAs(ScriptArg_t arg);
1142 void scriptOpSave0(ScriptArg_t arg);
1143 void scriptOpExit(ScriptArg_t arg);
1144 void scriptOpAllowSaves(ScriptArg_t arg);
1146 void scriptOpAnimName(ScriptArg_t arg);
1147 void scriptOpValueName(ScriptArg_t arg);
1148 void scriptOpVarName(ScriptArg_t arg);
1149 void scriptOpSoundName(ScriptArg_t arg);
1150 void scriptOpCursorName(ScriptArg_t arg);
1151 void scriptOpDubbing(ScriptArg_t arg);
1153 void scriptOpCheckValue(ScriptArg_t arg);
1154 void scriptOpJump(ScriptArg_t arg);
1156 void scriptOpVerticalPanSet(
bool *flags);
1157 void scriptOpVerticalPanGet();
1160 void scriptOpCallFunction(ScriptArg_t arg);
1162 void scriptOpMusicStop(ScriptArg_t arg);
1163 void scriptOpMusicPlayScore(ScriptArg_t arg);
1164 void scriptOpScoreAlways(ScriptArg_t arg);
1165 void scriptOpScoreNormal(ScriptArg_t arg);
1166 void scriptOpSndPlay(ScriptArg_t arg);
1167 void scriptOpSndPlayEx(ScriptArg_t arg);
1168 void scriptOpSndPlay3D(ScriptArg_t arg);
1169 void scriptOpSndPlaying(ScriptArg_t arg);
1170 void scriptOpSndWait(ScriptArg_t arg);
1171 void scriptOpSndHalt(ScriptArg_t arg);
1172 void scriptOpSndToBack(ScriptArg_t arg);
1173 void scriptOpSndStop(ScriptArg_t arg);
1174 void scriptOpSndStopAll(ScriptArg_t arg);
1175 void scriptOpSndAddRandom(ScriptArg_t arg);
1176 void scriptOpSndClearRandom(ScriptArg_t arg);
1177 void scriptOpVolumeAdd(ScriptArg_t arg);
1178 void scriptOpVolumeChange(ScriptArg_t arg);
1179 void scriptOpAnimVolume(ScriptArg_t arg);
1180 void scriptOpAnimChange(ScriptArg_t arg);
1181 void scriptOpScreenName(ScriptArg_t arg);
1182 void scriptOpExtractByte(ScriptArg_t arg);
1183 void scriptOpInsertByte(ScriptArg_t arg);
1184 void scriptOpString(ScriptArg_t arg);
1185 void scriptOpCmpNE(ScriptArg_t arg);
1186 void scriptOpCmpLE(ScriptArg_t arg);
1187 void scriptOpCmpGE(ScriptArg_t arg);
1188 void scriptOpReturn(ScriptArg_t arg);
1189 void scriptOpSpeech(ScriptArg_t arg);
1190 void scriptOpSpeechEx(ScriptArg_t arg);
1191 void scriptOpSpeechTest(ScriptArg_t arg);
1192 void scriptOpSay(ScriptArg_t arg);
1193 void scriptOpRandomInclusive(ScriptArg_t arg);
1194 void scriptOpHeroOut(ScriptArg_t arg);
1195 void scriptOpHeroGetPos(ScriptArg_t arg);
1196 void scriptOpHeroSetPos(ScriptArg_t arg);
1197 void scriptOpHeroGet(ScriptArg_t arg);
1198 void scriptOpGarbage(ScriptArg_t arg);
1199 void scriptOpGetRoom(ScriptArg_t arg);
1200 void scriptOpBitAnd(ScriptArg_t arg);
1201 void scriptOpBitOr(ScriptArg_t arg);
1202 void scriptOpAngleGet(ScriptArg_t arg);
1203 void scriptOpIsDVDVersion(ScriptArg_t arg);
1204 void scriptOpIsCDVersion(ScriptArg_t arg);
1205 void scriptOpDisc(ScriptArg_t arg);
1206 void scriptOpHidePanel(ScriptArg_t arg);
1207 void scriptOpRotateUpdate(ScriptArg_t arg);
1208 void scriptOpMul(ScriptArg_t arg);
1209 void scriptOpDiv(ScriptArg_t arg);
1210 void scriptOpMod(ScriptArg_t arg);
1211 void scriptOpGetDigit(ScriptArg_t arg);
1212 void scriptOpPuzzleInit(ScriptArg_t arg);
1213 void scriptOpPuzzleCanPress(ScriptArg_t arg);
1214 void scriptOpPuzzleDoMove1(ScriptArg_t arg);
1215 void scriptOpPuzzleDoMove2(ScriptArg_t arg);
1216 void scriptOpPuzzleDone(ScriptArg_t arg);
1217 void scriptOpPuzzleWhoWon(ScriptArg_t arg);
1218 void scriptOpFn(ScriptArg_t arg);
1219 void scriptOpItemHighlightSetTrue(ScriptArg_t arg);
1222 void scriptOpAnimAD2044(
bool isForward);
1223 void scriptOpAnimT(ScriptArg_t arg);
1224 void scriptOpAnimForward(ScriptArg_t arg);
1225 void scriptOpAnimReverse(ScriptArg_t arg);
1226 void scriptOpAnimKForward(ScriptArg_t arg);
1227 void scriptOpNoUpdate(ScriptArg_t arg);
1228 void scriptOpNoClear(ScriptArg_t arg);
1229 void scriptOpSay1_AD2044(ScriptArg_t arg);
1230 void scriptOpSay2_AD2044(ScriptArg_t arg);
1231 void scriptOpSay1Rnd(ScriptArg_t arg);
1232 void scriptOpM(ScriptArg_t arg);
1233 void scriptOpEM(ScriptArg_t arg);
1234 void scriptOpSE(ScriptArg_t arg);
1235 void scriptOpSDot(ScriptArg_t arg);
1236 void scriptOpE(ScriptArg_t arg);
1237 void scriptOpDot(ScriptArg_t arg);
1238 void scriptOpSound(ScriptArg_t arg);
1239 void scriptOpISound(ScriptArg_t arg);
1240 void scriptOpUSound(ScriptArg_t arg);
1241 void scriptOpSayCycle_AD2044(
const StackInt_t *values, uint numValues);
1242 void scriptOpSay2K(ScriptArg_t arg);
1243 void scriptOpSay3K(ScriptArg_t arg);
1244 void scriptOpRGet(ScriptArg_t arg);
1245 void scriptOpRSet(ScriptArg_t arg);
1246 void scriptOpEndRSet(ScriptArg_t arg);
1247 void scriptOpStop(ScriptArg_t arg);
1253 InventoryItem _inventoryPages[kNumInventoryPages][kNumInventorySlots];
1255 uint8 _inventoryActivePage;
1268 uint _panCursors[kPanCursorMaxCount];
1281 uint _swapOutScreen;
1282 uint _swapOutDirection;
1288 bool _haveHorizPanAnimations;
1289 bool _havePanUpFromDirection[kNumDirections];
1290 bool _havePanDownFromDirection[kNumDirections];
1293 bool _haveIdleAnimations[kNumDirections];
1294 bool _haveIdleStaticAnimation;
1295 bool _keepStaticAnimationInIdle;
1299 uint32 _delayCompletionTime;
1310 uint _panoramaDirectionFlags;
1312 uint _loadedRoomNumber;
1313 uint _activeScreenNumber;
1314 bool _havePendingScreenChange;
1315 bool _forceScreenChange;
1325 bool _havePendingPreIdleActions;
1326 bool _havePendingReturnToIdleState;
1327 bool _havePendingPostSwapScreenReset;
1329 bool _havePendingCompletionCheck;
1330 GameState _gameState;
1335 bool _havePendingPlayAmbientSounds;
1336 uint32 _ambientSoundFinishTime;
1340 bool _fastAnimationMode;
1341 bool _preloadSounds;
1342 bool _lowQualityGraphicsMode;
1344 VCruiseGameID _gameID;
1348 RoomToScreenNameToRoomMap_t _globalRoomScreenNameToScreenIDs;
1366 bool _musicMuteDisabled;
1370 uint32 _scoreSectionEndTime;
1373 uint32 _musicVolumeRampStartTime;
1374 int32 _musicVolumeRampStartVolume;
1375 int32 _musicVolumeRampRatePerMSec;
1376 int32 _musicVolumeRampEnd;
1382 AnimDecoderState _animDecoderState;
1383 bool _animTerminateAtStartOfFrame;
1384 uint _animPendingDecodeFrame;
1385 uint _animDisplayingFrame;
1386 uint _animFirstFrame;
1387 uint _animLastFrame;
1388 uint _animStopFrame;
1392 uint32 _animStartTime;
1393 uint32 _animFramesDecoded;
1394 uint _loadedAnimation;
1395 bool _loadedAnimationHasSound;
1396 bool _animPlayWhileIdle;
1410 bool _idleLockInteractions;
1411 bool _idleIsOnInteraction;
1412 bool _idleHaveClickInteraction;
1413 bool _idleHaveDragInteraction;
1414 uint _idleInteractionID;
1416 bool _idleIsOnOpenCircuitPuzzleLink;
1419 bool _idleIsCircuitPuzzleLinkDown;
1422 bool _forceAllowSaves;
1424 InGameMenuState _inGameMenuState;
1425 uint _inGameMenuActiveElement;
1426 bool _inGameMenuButtonActive[5];
1433 RenderSection _gameSection;
1434 RenderSection _gameDebugBackBuffer;
1435 RenderSection _menuSection;
1436 RenderSection _traySection;
1437 RenderSection _fullscreenMenuSection;
1438 RenderSection _subtitleSection;
1439 RenderSection _placedItemBackBufferSection;
1443 uint32 _lmbDownTime;
1444 int _lmbDragTolerance;
1447 bool _lmbReleaseWasClick;
1449 PanoramaState _panoramaState;
1468 int32 _listenerAngle;
1474 static const uint kAnimDefStackArgs = 8;
1476 static const uint kCursorArrow = 0;
1477 static const uint kCursorWait = 29;
1479 static const int kPanoramaPanningMarginX = 11;
1480 static const int kPanoramaPanningMarginY = 11;
1482 static const uint kSoundCacheSize = 16;
1484 static const uint kExamineItemInteractionID = 0xfffffff0u;
1486 static const uint kReturnInventorySlot0InteractionID = 0xfffffff1u;
1487 static const uint kReturnInventorySlot1InteractionID = 0xfffffff2u;
1488 static const uint kReturnInventorySlot2InteractionID = 0xfffffff3u;
1489 static const uint kReturnInventorySlot3InteractionID = 0xfffffff4u;
1490 static const uint kReturnInventorySlot4InteractionID = 0xfffffff5u;
1491 static const uint kReturnInventorySlot5InteractionID = 0xfffffff6u;
1493 static const uint kPickupInventorySlot0InteractionID = 0xfffffff7u;
1494 static const uint kPickupInventorySlot1InteractionID = 0xfffffff8u;
1495 static const uint kPickupInventorySlot2InteractionID = 0xfffffff9u;
1496 static const uint kPickupInventorySlot3InteractionID = 0xfffffffau;
1497 static const uint kPickupInventorySlot4InteractionID = 0xfffffffbu;
1498 static const uint kPickupInventorySlot5InteractionID = 0xfffffffcu;
1500 static const uint kObjectPickupInteractionID = 0xfffffffdu;
1501 static const uint kObjectDropInteractionID = 0xfffffffeu;
1503 static const uint kHeroChangeInteractionID = 0xffffffffu;
1506 uint _soundCacheIndex;
1515 uint _defaultLanguageIndex;
1516 uint _languageIndex;
1528 AnimSubtitleMap_t _animSubtitles;
1531 bool _isDisplayingSubtitles;
1532 bool _isSubtitleSourceAnimation;
1542 uint32 _cursorTimeBase;
1543 uint32 _cursorCycleLength;
1545 int32 _dbToVolume[49];
Definition: runtime.h:434
Definition: managed_surface.h:51
Definition: runtime.h:295
Definition: runtime.h:213
Definition: runtime.h:346
Definition: runtime.h:424
Definition: runtime.h:831
Definition: runtime.h:613
Definition: runtime.h:357
Definition: runtime.h:132
Definition: runtime.h:626
Definition: runtime.h:592
Definition: runtime.h:423
Definition: runtime.h:377
Definition: runtime.h:395
Definition: runtime.h:231
Definition: runtime.h:486
Definition: runtime.h:196
Definition: mididrv.h:309
Definition: runtime.h:403
Definition: runtime.h:125
Definition: runtime.h:259
Definition: runtime.h:166
Definition: runtime.h:337
Definition: ad2044_items.h:27
Definition: atari-cursor.h:38
Definition: runtime.h:178
Definition: runtime.h:203
Definition: runtime.h:639
Definition: runtime.h:246
Definition: runtime.h:627
Definition: algorithm.h:29
Definition: formatinfo.h:28
Definition: runtime.h:144
Definition: runtime.h:487
Definition: runtime.h:387
Definition: runtime.h:367
Definition: runtime.h:154
Definition: runtime.h:331
Definition: runtime.h:219
Definition: runtime.h:498
Definition: avi_frames.h:36
Definition: runtime.h:582
Definition: movie_decoder.h:32
Definition: runtime.h:310
Definition: runtime.h:604
Definition: runtime.h:162
Definition: runtime.h:323
Language
Definition: language.h:45