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,
556 kOSEventTypeKeymappedEvent,
559 enum KeymappedEvent {
562 kKeymappedEventEscape,
564 kKeymappedEventSaveGame,
565 kKeymappedEventLoadGame,
566 kKeymappedEventSoundSettings,
568 kKeymappedEventPause,
569 kKeymappedEventMusicToggle,
570 kKeymappedEventSoundToggle,
571 kKeymappedEventMusicVolumeDown,
572 kKeymappedEventMusicVolumeUp,
573 kKeymappedEventSoundVolumeDown,
574 kKeymappedEventSoundVolumeUp,
576 kKeymappedEventSkipAnimation,
578 kKeymappedEventPutItem,
586 KeymappedEvent keymappedEvent;
639 friend class RuntimeMenuInterface;
646 kCharSetChineseTraditional,
647 kCharSetChineseSimplified,
655 void loadCursors(
const char *exeName);
656 void setDebugMode(
bool debugMode);
657 void setFastAnimationMode(
bool fastAnimationMode);
658 void setPreloadSounds(
bool preloadSounds);
659 void setLowQualityGraphicsMode(
bool lowQualityGraphicsMode);
664 void onLButtonDown(int16 x, int16 y);
665 void onLButtonUp(int16 x, int16 y);
666 void onMouseMove(int16 x, int16 y);
667 void onKeymappedEvent(KeymappedEvent evt);
669 bool canSave(
bool onCurrentScreen)
const;
670 bool canLoad()
const;
672 void recordSaveGameSnapshot();
674 void restoreSaveGameSnapshot();
680 bool bootGame(
bool newGame);
681 static void resolveCodePageForLanguage(
Common::Language lang, Common::CodePage &outCodePage, CharSet &outCharSet);
689 enum IndexParseType {
692 kIndexParseTypeRRoom,
693 kIndexParseTypeYRoom,
694 kIndexParseTypeVRoom,
695 kIndexParseTypeTRoom,
696 kIndexParseTypeCRoom,
697 kIndexParseTypeSRoom,
698 kIndexParseTypeNameRoom,
701 enum AnimDecoderState {
702 kAnimDecoderStateStopped,
703 kAnimDecoderStatePlaying,
704 kAnimDecoderStatePaused,
707 struct IndexPrefixTypePair {
709 IndexParseType parseType;
712 struct RenderSection {
721 static const uint kMaxPreviousStates = 3;
725 int32 previousStates[kMaxPreviousStates];
726 int32 requiredPreviousStates[kMaxPreviousStates];
727 uint numPreviousStates;
728 uint numPreviousStatesRequired;
743 static const uint kNumGyros = 5;
745 Gyro gyros[kNumGyros];
747 uint completeInteraction;
748 uint failureInteraction;
749 uint frameSeparation;
761 int32 dragCurrentState;
762 bool isWaitingForAnimation;
765 enum PanoramaCursorFlags {
766 kPanCursorDraggableHoriz = (1 << 0),
767 kPanCursorDraggableUp = (1 << 1),
768 kPanCursorDraggableDown = (1 << 2),
770 kPanCursorDirectionUp = (0 << 3),
771 kPanCursorDirectionLeft = (1 << 3),
772 kPanCursorDirectionRight = (2 << 3),
773 kPanCursorDirectionDown = (3 << 3),
775 kPanCursorMaxCount = (1 << 5),
779 kPanoramaStateInactive,
781 kPanoramaStatePanningUncertainDirection,
783 kPanoramaStatePanningLeft,
784 kPanoramaStatePanningRight,
785 kPanoramaStatePanningUp,
786 kPanoramaStatePanningDown,
789 enum InGameMenuState {
790 kInGameMenuStateInvisible,
791 kInGameMenuStateVisible,
792 kInGameMenuStateHoveringInactive,
793 kInGameMenuStateHoveringActive,
794 kInGameMenuStateClickingOver,
795 kInGameMenuStateClickingNotOver,
796 kInGameMenuStateClickingInactive,
799 enum SoundLoopBehavior {
800 kSoundLoopBehaviorNo,
801 kSoundLoopBehaviorYes,
802 kSoundLoopBehaviorAuto,
805 static const uint kPanLeftInteraction = 1;
806 static const uint kPanDownInteraction = 2;
807 static const uint kPanRightInteraction = 3;
808 static const uint kPanUpInteraction = 4;
810 static const uint kPanoramaLeftFlag = 1;
811 static const uint kPanoramaRightFlag = 2;
812 static const uint kPanoramaUpFlag = 4;
813 static const uint kPanoramaDownFlag = 8;
814 static const uint kPanoramaHorizFlags = (kPanoramaLeftFlag | kPanoramaRightFlag);
816 static const uint kNumInventorySlots = 6;
817 static const uint kNumInventoryPages = 8;
819 typedef int32 ScriptArg_t;
820 typedef int32 StackInt_t;
823 enum StackValueType {
840 StackValue(
const StackValue &other);
841 StackValue(StackValue &&other);
842 explicit StackValue(StackInt_t i);
847 StackValue &operator=(
const StackValue &other);
848 StackValue &operator=(StackValue &&other);
854 struct CallStackFrame {
858 uint _nextInstruction;
866 uint durationInDeciseconds;
870 struct SubtitleQueueItem {
879 bool runHorizontalPan(
bool isRight);
881 bool requireAvailableStack(uint n);
882 bool runWaitForAnimation();
883 bool runWaitForAnimationToDelay();
884 bool runWaitForFacing();
885 bool runWaitForFacingToAnim();
887 bool runGyroAnimation();
889 void continuePlayingAnimation(
bool loop,
bool useStopFrame,
bool &outEndedAnimation);
890 void drawSectionToScreen(
const RenderSection §ion,
const Common::Rect &rect);
891 void commitSectionToScreen(
const RenderSection §ion,
const Common::Rect &rect);
892 void terminateScript();
895 bool checkCompletionConditions();
897 void startTerminatingHorizontalPan(
bool isRight);
900 void queueOSEvent(
const OSEvent &evt);
902 void processUniversalKeymappedEvents(KeymappedEvent evt);
904 void loadReahSchizmIndex();
905 void loadAD2044ExecutableResources();
907 void loadConfig(
const char *cfgPath);
909 void loadDuplicateRooms();
910 void loadAllSchizmScreenNames();
915 void resolveSoundByNameOrID(
const StackValue &stackValue,
bool load, StackInt_t &outSoundID,
SoundInstance *&outWave);
917 void changeToScreen(uint roomNumber, uint screenNumber);
918 void clearIdleAnimations();
920 void changeToExamineItem();
921 void returnFromExaminingItem();
922 bool triggerPreIdleActions();
923 void returnToIdleState();
925 void refreshCursor(uint32 currentTime);
926 bool dischargeIdleMouseMove();
927 bool dischargeIdleMouseDown();
928 bool dischargeIdleClick();
933 void changeMusicTrack(
int musicID);
934 void startScoreSection();
935 void setMusicMute(
bool muted);
937 void changeAnimation(
const AnimationDef &animDef,
bool consumeFPSOverride);
938 void changeAnimation(
const AnimationDef &animDef, uint initialFrame,
bool consumeFPSOverride);
939 void changeAnimation(
const AnimationDef &animDef, uint initialFrame,
bool consumeFPSOverride,
const Fraction &defaultFrameRate);
940 void applyAnimationVolume();
943 void triggerSound(SoundLoopBehavior loopBehavior,
SoundInstance &sound, int32 volume, int32 balance,
bool is3D,
bool isSpeech);
944 void triggerSoundRamp(
SoundInstance &sound, uint durationMSec, int32 newVolume,
bool terminateOnCompletion);
947 void updateSounds(uint32 timestamp);
948 void updateSubtitles();
949 void update3DSounds();
951 void triggerAmbientSounds();
952 uint decibelsToLinear(
int db, uint baseVolume, uint maxVolume)
const;
953 int32 getSilentSoundVolume()
const;
954 int32 getDefaultSoundVolume()
const;
955 uint applyVolumeScale(int32 volume)
const;
956 int applyBalanceScale(int32 balance)
const;
959 void stopSubtitles();
961 AnimationDef stackArgsToAnimDef(
const StackInt_t *args)
const;
962 void consumeAnimChangeAndAdjustAnim(
AnimationDef &animDef);
969 void allocateRoomsUpTo(uint roomNumber);
971 void drawDebugOverlay();
975 void detectPanoramaDirections();
976 void detectPanoramaMouseMovement(uint32 timestamp);
977 void panoramaActivate();
979 bool computeFaceDirectionAnimation(uint desiredDirection,
const AnimationDef *&outAnimDef, uint &outInitialFrame, uint &outStopFrame);
981 void inventoryAddItem(uint item);
982 void inventoryRemoveItem(uint item);
986 void redrawSubtitleSection();
987 void clearSubtitleSection();
989 void drawInventory(uint slot);
991 bool isTrayVisible()
const;
992 void resetInventoryHighlights();
993 void loadInventoryFromPage();
994 void copyInventoryToPage();
996 static uint32 getLocationForScreen(uint roomNumber, uint screenNumber);
997 void updatePlacedItemCache();
998 void drawPlacedItemGraphic();
999 void clearPlacedItemGraphic();
1000 void drawActiveItemGraphic();
1001 void clearActiveItemGraphic();
1002 void drawInventoryItemGraphic(uint slot);
1003 void clearInventoryItemGraphic(uint slot);
1004 void dropActiveItem();
1005 void pickupPlacedItem();
1006 void stashActiveItemToInventory(uint slot);
1007 void pickupInventoryItem(uint slot);
1013 bool loadSubtitles(Common::CodePage codePage,
bool guessCodePage);
1015 void changeToMenuPage(
MenuPage *menuPage);
1017 void checkInGameMenuHover();
1018 void dismissInGameMenu();
1019 void dischargeInGameMenuMouseUp();
1020 void drawInGameMenuButton(uint element);
1025 void clearCircuitPuzzle();
1026 void clearCircuitHighlightRect(
const Common::Rect &rect);
1027 void drawCircuitHighlightRect(
const Common::Rect &rect);
1035 void scriptOpNumber(ScriptArg_t arg);
1036 void scriptOpRotate(ScriptArg_t arg);
1037 void scriptOpAngle(ScriptArg_t arg);
1038 void scriptOpAngleGGet(ScriptArg_t arg);
1039 void scriptOpSpeed(ScriptArg_t arg);
1040 void scriptOpSAnimL(ScriptArg_t arg);
1041 void scriptOpChangeL(ScriptArg_t arg);
1043 void scriptOpAnimR(ScriptArg_t arg);
1044 void scriptOpAnimF(ScriptArg_t arg);
1045 void scriptOpAnimN(ScriptArg_t arg);
1046 void scriptOpAnimG(ScriptArg_t arg);
1047 void scriptOpAnimS(ScriptArg_t arg);
1048 void scriptOpAnim(ScriptArg_t arg);
1050 void scriptOpStatic(ScriptArg_t arg);
1051 void scriptOpVarLoad(ScriptArg_t arg);
1052 void scriptOpVarStore(ScriptArg_t arg);
1053 void scriptOpVarAddAndStore(ScriptArg_t arg);
1054 void scriptOpVarGlobalLoad(ScriptArg_t arg);
1055 void scriptOpVarGlobalStore(ScriptArg_t arg);
1057 void scriptOpItemCheck(ScriptArg_t arg);
1058 void scriptOpItemRemove(ScriptArg_t arg);
1059 void scriptOpItemHighlightSet(ScriptArg_t arg);
1060 void scriptOpItemAdd(ScriptArg_t arg);
1061 void scriptOpItemHaveSpace(ScriptArg_t arg);
1062 void scriptOpItemClear(ScriptArg_t arg);
1064 void scriptOpSetCursor(ScriptArg_t arg);
1065 void scriptOpSetRoom(ScriptArg_t arg);
1066 void scriptOpLMB(ScriptArg_t arg);
1067 void scriptOpLMB1(ScriptArg_t arg);
1068 void scriptOpSoundS1(ScriptArg_t arg);
1069 void scriptOpSoundS2(ScriptArg_t arg);
1070 void scriptOpSoundS3(ScriptArg_t arg);
1071 void scriptOpSoundL1(ScriptArg_t arg);
1072 void scriptOpSoundL2(ScriptArg_t arg);
1073 void scriptOpSoundL3(ScriptArg_t arg);
1074 void scriptOp3DSoundS2(ScriptArg_t arg);
1075 void scriptOp3DSoundL2(ScriptArg_t arg);
1076 void scriptOp3DSoundL3(ScriptArg_t arg);
1077 void scriptOpStopAL(ScriptArg_t arg);
1078 void scriptOpRange(ScriptArg_t arg);
1079 void scriptOpAddXSound(ScriptArg_t arg);
1080 void scriptOpClrXSound(ScriptArg_t arg);
1081 void scriptOpStopSndLA(ScriptArg_t arg);
1082 void scriptOpStopSndLO(ScriptArg_t arg);
1084 void scriptOpMusic(ScriptArg_t arg);
1085 void scriptOpMusicVolRamp(ScriptArg_t arg);
1086 void scriptOpParm0(ScriptArg_t arg);
1087 void scriptOpParm1(ScriptArg_t arg);
1088 void scriptOpParm2(ScriptArg_t arg);
1089 void scriptOpParm3(ScriptArg_t arg);
1090 void scriptOpParmG(ScriptArg_t arg);
1091 void scriptOpSParmX(ScriptArg_t arg);
1092 void scriptOpSAnimX(ScriptArg_t arg);
1094 void scriptOpVolumeDn2(ScriptArg_t arg);
1095 void scriptOpVolumeDn3(ScriptArg_t arg);
1096 void scriptOpVolumeDn4(ScriptArg_t arg);
1097 void scriptOpVolumeUp3(ScriptArg_t arg);
1098 void scriptOpRandom(ScriptArg_t arg);
1099 void scriptOpDrop(ScriptArg_t arg);
1100 void scriptOpDup(ScriptArg_t arg);
1101 void scriptOpSwap(ScriptArg_t arg);
1102 void scriptOpSay1(ScriptArg_t arg);
1103 void scriptOpSay2(ScriptArg_t arg);
1104 void scriptOpSay3(ScriptArg_t arg);
1105 void scriptOpSay3Get(ScriptArg_t arg);
1106 void scriptOpSetTimer(ScriptArg_t arg);
1107 void scriptOpGetTimer(ScriptArg_t arg);
1108 void scriptOpDelay(ScriptArg_t arg);
1109 void scriptOpLoSet(ScriptArg_t arg);
1110 void scriptOpLoGet(ScriptArg_t arg);
1111 void scriptOpHiSet(ScriptArg_t arg);
1112 void scriptOpHiGet(ScriptArg_t arg);
1114 void scriptOpNot(ScriptArg_t arg);
1115 void scriptOpAnd(ScriptArg_t arg);
1116 void scriptOpOr(ScriptArg_t arg);
1117 void scriptOpAdd(ScriptArg_t arg);
1118 void scriptOpSub(ScriptArg_t arg);
1119 void scriptOpNegate(ScriptArg_t arg);
1120 void scriptOpCmpEq(ScriptArg_t arg);
1121 void scriptOpCmpLt(ScriptArg_t arg);
1122 void scriptOpCmpGt(ScriptArg_t arg);
1124 void scriptOpBitLoad(ScriptArg_t arg);
1125 void scriptOpBitSet0(ScriptArg_t arg);
1126 void scriptOpBitSet1(ScriptArg_t arg);
1128 void scriptOpDisc1(ScriptArg_t arg);
1129 void scriptOpDisc2(ScriptArg_t arg);
1130 void scriptOpDisc3(ScriptArg_t arg);
1132 void scriptOpGoto(ScriptArg_t arg);
1134 void scriptOpEscOn(ScriptArg_t arg);
1135 void scriptOpEscOff(ScriptArg_t arg);
1136 void scriptOpEscGet(ScriptArg_t arg);
1137 void scriptOpBackStart(ScriptArg_t arg);
1138 void scriptOpSaveAs(ScriptArg_t arg);
1139 void scriptOpSave0(ScriptArg_t arg);
1140 void scriptOpExit(ScriptArg_t arg);
1141 void scriptOpAllowSaves(ScriptArg_t arg);
1143 void scriptOpAnimName(ScriptArg_t arg);
1144 void scriptOpValueName(ScriptArg_t arg);
1145 void scriptOpVarName(ScriptArg_t arg);
1146 void scriptOpSoundName(ScriptArg_t arg);
1147 void scriptOpCursorName(ScriptArg_t arg);
1148 void scriptOpDubbing(ScriptArg_t arg);
1150 void scriptOpCheckValue(ScriptArg_t arg);
1151 void scriptOpJump(ScriptArg_t arg);
1153 void scriptOpVerticalPanSet(
bool *flags);
1154 void scriptOpVerticalPanGet();
1157 void scriptOpCallFunction(ScriptArg_t arg);
1159 void scriptOpMusicStop(ScriptArg_t arg);
1160 void scriptOpMusicPlayScore(ScriptArg_t arg);
1161 void scriptOpScoreAlways(ScriptArg_t arg);
1162 void scriptOpScoreNormal(ScriptArg_t arg);
1163 void scriptOpSndPlay(ScriptArg_t arg);
1164 void scriptOpSndPlayEx(ScriptArg_t arg);
1165 void scriptOpSndPlay3D(ScriptArg_t arg);
1166 void scriptOpSndPlaying(ScriptArg_t arg);
1167 void scriptOpSndWait(ScriptArg_t arg);
1168 void scriptOpSndHalt(ScriptArg_t arg);
1169 void scriptOpSndToBack(ScriptArg_t arg);
1170 void scriptOpSndStop(ScriptArg_t arg);
1171 void scriptOpSndStopAll(ScriptArg_t arg);
1172 void scriptOpSndAddRandom(ScriptArg_t arg);
1173 void scriptOpSndClearRandom(ScriptArg_t arg);
1174 void scriptOpVolumeAdd(ScriptArg_t arg);
1175 void scriptOpVolumeChange(ScriptArg_t arg);
1176 void scriptOpAnimVolume(ScriptArg_t arg);
1177 void scriptOpAnimChange(ScriptArg_t arg);
1178 void scriptOpScreenName(ScriptArg_t arg);
1179 void scriptOpExtractByte(ScriptArg_t arg);
1180 void scriptOpInsertByte(ScriptArg_t arg);
1181 void scriptOpString(ScriptArg_t arg);
1182 void scriptOpCmpNE(ScriptArg_t arg);
1183 void scriptOpCmpLE(ScriptArg_t arg);
1184 void scriptOpCmpGE(ScriptArg_t arg);
1185 void scriptOpReturn(ScriptArg_t arg);
1186 void scriptOpSpeech(ScriptArg_t arg);
1187 void scriptOpSpeechEx(ScriptArg_t arg);
1188 void scriptOpSpeechTest(ScriptArg_t arg);
1189 void scriptOpSay(ScriptArg_t arg);
1190 void scriptOpRandomInclusive(ScriptArg_t arg);
1191 void scriptOpHeroOut(ScriptArg_t arg);
1192 void scriptOpHeroGetPos(ScriptArg_t arg);
1193 void scriptOpHeroSetPos(ScriptArg_t arg);
1194 void scriptOpHeroGet(ScriptArg_t arg);
1195 void scriptOpGarbage(ScriptArg_t arg);
1196 void scriptOpGetRoom(ScriptArg_t arg);
1197 void scriptOpBitAnd(ScriptArg_t arg);
1198 void scriptOpBitOr(ScriptArg_t arg);
1199 void scriptOpAngleGet(ScriptArg_t arg);
1200 void scriptOpIsDVDVersion(ScriptArg_t arg);
1201 void scriptOpIsCDVersion(ScriptArg_t arg);
1202 void scriptOpDisc(ScriptArg_t arg);
1203 void scriptOpHidePanel(ScriptArg_t arg);
1204 void scriptOpRotateUpdate(ScriptArg_t arg);
1205 void scriptOpMul(ScriptArg_t arg);
1206 void scriptOpDiv(ScriptArg_t arg);
1207 void scriptOpMod(ScriptArg_t arg);
1208 void scriptOpGetDigit(ScriptArg_t arg);
1209 void scriptOpPuzzleInit(ScriptArg_t arg);
1210 void scriptOpPuzzleCanPress(ScriptArg_t arg);
1211 void scriptOpPuzzleDoMove1(ScriptArg_t arg);
1212 void scriptOpPuzzleDoMove2(ScriptArg_t arg);
1213 void scriptOpPuzzleDone(ScriptArg_t arg);
1214 void scriptOpPuzzleWhoWon(ScriptArg_t arg);
1215 void scriptOpFn(ScriptArg_t arg);
1216 void scriptOpItemHighlightSetTrue(ScriptArg_t arg);
1219 void scriptOpAnimAD2044(
bool isForward);
1220 void scriptOpAnimT(ScriptArg_t arg);
1221 void scriptOpAnimForward(ScriptArg_t arg);
1222 void scriptOpAnimReverse(ScriptArg_t arg);
1223 void scriptOpAnimKForward(ScriptArg_t arg);
1224 void scriptOpNoUpdate(ScriptArg_t arg);
1225 void scriptOpNoClear(ScriptArg_t arg);
1226 void scriptOpSay1_AD2044(ScriptArg_t arg);
1227 void scriptOpSay2_AD2044(ScriptArg_t arg);
1228 void scriptOpSay1Rnd(ScriptArg_t arg);
1229 void scriptOpM(ScriptArg_t arg);
1230 void scriptOpEM(ScriptArg_t arg);
1231 void scriptOpSE(ScriptArg_t arg);
1232 void scriptOpSDot(ScriptArg_t arg);
1233 void scriptOpE(ScriptArg_t arg);
1234 void scriptOpDot(ScriptArg_t arg);
1235 void scriptOpSound(ScriptArg_t arg);
1236 void scriptOpISound(ScriptArg_t arg);
1237 void scriptOpUSound(ScriptArg_t arg);
1238 void scriptOpSayCycle_AD2044(
const StackInt_t *values, uint numValues);
1239 void scriptOpSay2K(ScriptArg_t arg);
1240 void scriptOpSay3K(ScriptArg_t arg);
1241 void scriptOpRGet(ScriptArg_t arg);
1242 void scriptOpRSet(ScriptArg_t arg);
1243 void scriptOpEndRSet(ScriptArg_t arg);
1244 void scriptOpStop(ScriptArg_t arg);
1250 InventoryItem _inventoryPages[kNumInventoryPages][kNumInventorySlots];
1252 uint8 _inventoryActivePage;
1265 uint _panCursors[kPanCursorMaxCount];
1278 uint _swapOutScreen;
1279 uint _swapOutDirection;
1285 bool _haveHorizPanAnimations;
1286 bool _havePanUpFromDirection[kNumDirections];
1287 bool _havePanDownFromDirection[kNumDirections];
1290 bool _haveIdleAnimations[kNumDirections];
1291 bool _haveIdleStaticAnimation;
1292 bool _keepStaticAnimationInIdle;
1296 uint32 _delayCompletionTime;
1307 uint _panoramaDirectionFlags;
1309 uint _loadedRoomNumber;
1310 uint _activeScreenNumber;
1311 bool _havePendingScreenChange;
1312 bool _forceScreenChange;
1322 bool _havePendingPreIdleActions;
1323 bool _havePendingReturnToIdleState;
1324 bool _havePendingPostSwapScreenReset;
1326 bool _havePendingCompletionCheck;
1327 GameState _gameState;
1332 bool _havePendingPlayAmbientSounds;
1333 uint32 _ambientSoundFinishTime;
1337 bool _fastAnimationMode;
1338 bool _preloadSounds;
1339 bool _lowQualityGraphicsMode;
1341 VCruiseGameID _gameID;
1345 RoomToScreenNameToRoomMap_t _globalRoomScreenNameToScreenIDs;
1363 bool _musicMuteDisabled;
1367 uint32 _scoreSectionEndTime;
1370 uint32 _musicVolumeRampStartTime;
1371 int32 _musicVolumeRampStartVolume;
1372 int32 _musicVolumeRampRatePerMSec;
1373 int32 _musicVolumeRampEnd;
1379 AnimDecoderState _animDecoderState;
1380 bool _animTerminateAtStartOfFrame;
1381 uint _animPendingDecodeFrame;
1382 uint _animDisplayingFrame;
1383 uint _animFirstFrame;
1384 uint _animLastFrame;
1385 uint _animStopFrame;
1389 uint32 _animStartTime;
1390 uint32 _animFramesDecoded;
1391 uint _loadedAnimation;
1392 bool _loadedAnimationHasSound;
1393 bool _animPlayWhileIdle;
1407 bool _idleLockInteractions;
1408 bool _idleIsOnInteraction;
1409 bool _idleHaveClickInteraction;
1410 bool _idleHaveDragInteraction;
1411 uint _idleInteractionID;
1413 bool _idleIsOnOpenCircuitPuzzleLink;
1416 bool _idleIsCircuitPuzzleLinkDown;
1419 bool _forceAllowSaves;
1421 InGameMenuState _inGameMenuState;
1422 uint _inGameMenuActiveElement;
1423 bool _inGameMenuButtonActive[5];
1430 RenderSection _gameSection;
1431 RenderSection _gameDebugBackBuffer;
1432 RenderSection _menuSection;
1433 RenderSection _traySection;
1434 RenderSection _fullscreenMenuSection;
1435 RenderSection _subtitleSection;
1436 RenderSection _placedItemBackBufferSection;
1440 uint32 _lmbDownTime;
1441 int _lmbDragTolerance;
1444 bool _lmbReleaseWasClick;
1446 PanoramaState _panoramaState;
1465 int32 _listenerAngle;
1471 static const uint kAnimDefStackArgs = 8;
1473 static const uint kCursorArrow = 0;
1474 static const uint kCursorWait = 29;
1476 static const int kPanoramaPanningMarginX = 11;
1477 static const int kPanoramaPanningMarginY = 11;
1479 static const uint kSoundCacheSize = 16;
1481 static const uint kExamineItemInteractionID = 0xfffffff0u;
1483 static const uint kReturnInventorySlot0InteractionID = 0xfffffff1u;
1484 static const uint kReturnInventorySlot1InteractionID = 0xfffffff2u;
1485 static const uint kReturnInventorySlot2InteractionID = 0xfffffff3u;
1486 static const uint kReturnInventorySlot3InteractionID = 0xfffffff4u;
1487 static const uint kReturnInventorySlot4InteractionID = 0xfffffff5u;
1488 static const uint kReturnInventorySlot5InteractionID = 0xfffffff6u;
1490 static const uint kPickupInventorySlot0InteractionID = 0xfffffff7u;
1491 static const uint kPickupInventorySlot1InteractionID = 0xfffffff8u;
1492 static const uint kPickupInventorySlot2InteractionID = 0xfffffff9u;
1493 static const uint kPickupInventorySlot3InteractionID = 0xfffffffau;
1494 static const uint kPickupInventorySlot4InteractionID = 0xfffffffbu;
1495 static const uint kPickupInventorySlot5InteractionID = 0xfffffffcu;
1497 static const uint kObjectPickupInteractionID = 0xfffffffdu;
1498 static const uint kObjectDropInteractionID = 0xfffffffeu;
1500 static const uint kHeroChangeInteractionID = 0xffffffffu;
1503 uint _soundCacheIndex;
1512 uint _defaultLanguageIndex;
1513 uint _languageIndex;
1525 AnimSubtitleMap_t _animSubtitles;
1528 bool _isDisplayingSubtitles;
1529 bool _isSubtitleSourceAnimation;
1539 uint32 _cursorTimeBase;
1540 uint32 _cursorCycleLength;
1542 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:828
Definition: runtime.h:611
Definition: runtime.h:357
Definition: runtime.h:132
Definition: runtime.h:624
Definition: runtime.h:590
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:637
Definition: runtime.h:246
Definition: runtime.h:625
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:581
Definition: movie_decoder.h:32
Definition: runtime.h:310
Definition: runtime.h:602
Definition: runtime.h:162
Definition: runtime.h:323
Language
Definition: language.h:45