Scumm 6 variablesA list of all engine variables I found in SCUMM 6. Some have been found by descumming the DOTT scripts, but some might still be missing. On the other hand, ScummVM wouldn't support them yet, so for now they wouldn't be very useful.
Table of contents:- Input
- Actors
- Camera, view
- Messages and charset
- Room
- Scripts
- Timers
- Sound and music
- Utils
- System info
- GUI
- VAR_GAME_DISK_MSG @ 90
- VAR_OPEN_FAILED_MSG @ 91
- VAR_READ_ERROR_MSG @ 92
- VAR_PAUSE_MSG @ 93
- VAR_RESTART_MSG @ 94, VAR_QUIT_MSG @ 95
- VAR_SAVE_BTN @ 96, VAR_LOAD_BTN @ 97, VAR_PLAY_BTN @ 98, VAR_CANCEL_BTN @ 99, VAR_QUIT_BTN @ 100, VAR_OK_BTN @ 101
- VAR_SAVE_DISK_MSG @ 102, VAR_ENTER_NAME_MSG @ 103, VAR_NOT_SAVED_MSG @ 104, VAR_NOT_LOADED_MSG @ 105
- VAR_SAVE_MSG @ 106, VAR_LOAD_MSG @ 107
- VAR_SAVE_MENU_TITLE @ 108, VAR_LOAD_MENU_TITLE @ 109, VAR_MAIN_MENU_TITLE @ 117
- VAR_GUI_COLORS @ 110
- VAR_DEBUG_PASSWORD @ 111
- What are these?
Input
VAR_KEYPRESS @ 0Not sure if this one is really used in v6.
VAR_USERPUT @ 53Set if user input is enabled.
VAR_CUTSCENEEXIT_KEY @ 24, VAR_RESTART_KEY @ 42, VAR_PAUSE_KEY @ 43, VAR_MAINMENU_KEY @ 50, VAR_TALKSTOP_KEY @ 57Sets the "special" key mappings.
VAR_VIRT_MOUSE_X @ 20, VAR_VIRT_MOUSE_Y @ 21Coordinates of the mouse pointer in virtual resolution.
VAR_MOUSE_X @ 44, VAR_MOUSE_Y @ 45Coordinates of the mouse pointer in absolute resolution.
VAR_LEFTBTN_HOLD @ 74, VAR_RIGHTBTN_HOLD @ 75
VAR_CURSORSTATE @ 52Set if the cursor is visible.
Actors
VAR_EGO @ 1All the "ego" functions use the actor found in this variable.
VAR_NUM_ACTOR @ 8The number of actor in the game ??
VAR_ACTOR_RANGE_MIN @ 15, VAR_ACTOR_RANGE_MAX @ 16
VAR_WALKTO_OBJ @ 38Set to the object the ego is walking toward during startRoomWithEgo().
Camera, view
VAR_CAMERA_POS_X @ 2X coordinate of the camera (in the virtual resolution).
VAR_CAMERA_MIN_X @ 17, VAR_CAMERA_MAX_X @ 18If the camera is outside of this range it is panned back to this range. When setting the camera position it is clamped to this range.
VAR_CAMERA_FAST_X @ 26If this is non zero the camera will just jump to its destination instead of panning.
VAR_VIDEOMODE @ 49
Messages and charset
VAR_HAVE_MSG @ 3True if a message is beeing displayed ??
VAR_TALK_ACTOR @ 25The actor who's currently talking ??
VAR_CHARINC @ 37Display time per character. Each message is displayed 60+num_char*VAR_CHARINC ticks. It defaults to 3, but can be changed by the user at run time with the subtitle speed key (- and +).
VAR_NOSUBTITLES @ 60Subtitles disabled ??
Room
VAR_ROOM @ 4The current room.
VAR_ROOM_RESOURCE @ 22The currently loaded room. Usely it's the same as VAR_ROOM. However when in a mapped room (with id >= 0x80) this variable reflect the real room, not the mapped one.
VAR_ROOM_WIDTH @ 41, VAR_ROOM_HEIGHT @ 54The room dimensions.
VAR_ROOM_FLAG @ 70Apparently this is set when a game state was loaded.
VAR_NEW_ROOM @ 72This is set to the new room right before running an exit script.
Scripts
VAR_OVERRIDE @ 5Set to 1 if inside an override block when the user has skipped a cutscene.
VAR_CAMERA_SCRIPT @ 27Script called when the camera has been moved.
VAR_PRE_ENTRY_SCRIPT @ 28, VAR_POST_ENTRY_SCRIPT @ 29Script called before/after the room entry script.
VAR_PRE_EXIT_SCRIPT @ 30, VAR_POST_EXIT_SCRIPT @ 31Script called before/after the room exit script.
VAR_VERB_SCRIPT @ 32Script to handle low level user input from the mouse, keyboard, etc.
VAR_SENTENCE_SCRIPT @ 33Script to handle sentences passed to the doSentence() instruction.
VAR_INVENTORY_SCRIPT @ 34Script handling inventory related changes.
VAR_CUTSCENE_START_SCRIPT @ 35, VAR_CUTSCENE_END_SCRIPT @ 36Script run before/after a cutscene.
VAR_GUI_ENTRY_SCRIPT @ 61, VAR_GUI_EXIT_SCRIPT @ 62Script run before showing the GUI menu and after closing it. It's not run for room 0.
VAR_GAME_LOADED @ 71Set to 201 when the game has been saved and to 203 when it's loaded. Note that this variable is reset at each frame, so it's only set for the frame right after the save/load.
Timers
VAR_TMR_1 @ 11, VAR_TMR_2 @ 12, VAR_TMR_3 @ 13, VAR_TMR_4 @ 47These variables simply track the time in units of 15ms. The scripts can reset them anytime. Their value is only increased once for each frame.
VAR_TIMER_NEXT @ 19Set the duration of a game frame in unit of 15ms. So 1 gives 66.6 fps, 2 gives 33.3 fps, etc. DOTT typically uses 6, which is 11.1 fps.
VAR_TIMER @ 45This can be used to alter the speed of the palette cycles. Normally the cycle's counters are increased by the value of VAR_TIMER_NEXT at each frame. But if VAR_TIMER is greater, then its value is used instead.
Sound and music
VAR_MUSIC_TIMER @ 14
VAR_LAST_SOUND @ 23
VAR_SOUNDCARD @ 48
VAR_SOUNDRESULT @ 56, VAR_SOUNDPARAM @ 64, VAR_SOUNDPARAM2 @ 65, VAR_SOUNDPARAM3 @ 66Probably part of the imuse interface.
Utils
VAR_RANDOM_NR @ 118Last value returned by getRandomNumber() ?
VAR_TIMEDATE_YEAR @ 119, VAR_TIMEDATE_HOUR @ 125, VAR_TIMEDATE_MINUTE @ 126, VAR_TIMEDATE_DAY @ 128, VAR_TIMEDATE_MONTH @ 129Return value of getDateTime()
VAR_GAME_VERSION @ 122This value is set in the game saves. If the value in a save file doesn't match the current one, the GUI displays "WARNING... old savegame" instead of its name, and the engine refuses to load it.
System info
VAR_MACHINE_SPEED @ 6The machine speed. It probably has no real meaning in ScummVM.
VAR_V6_SOUNDMODE @ 9Dunno what this is supposed to be, or if ScummVM uses it.
VAR_CURRENTDRIVE @ 10Probably the currently used drive on MS systems.
VAR_DEBUGMODE @ 39Set to the debug level ??
VAR_HEAPSPACE @ 40Available size of the heap ?? Probably meaningless with ScummVM.
VAR_FIXEDDISK @ 51Running from harddisk ??
VAR_MOUSEPRESENT @ 67Again one has to wonder if ScummVM implements this kind of stuff.
VAR_MEMORY_PERFORMANCE @ 68, VAR_VIDEO_PERFORMANCE @ 69Or this ??
VAR_V6_EMSSPACE @ 76Size of the EMS memory under DOS.
GUIThese are currently not used by ScummVM, sadly. Hopefully that will change. All the variables must point to an array holding a string. In ScummC these are declared as array so one just needs to assign a string to them. Note that some of the strings must contain some printf escapes.
VAR_GAME_DISK_MSG @ 90Asking for another game disk: "Insert disk %c and click."
VAR_OPEN_FAILED_MSG @ 91Failed to open a file: "Failed to open %s, (%c%d)." Dunno what the %c%d are for, probably some debug stuff.
VAR_READ_ERROR_MSG @ 92Read error: "Read error on disk %c, (%c%d)." The first %c is most probably for the DOS drive and %c%d the same as for the open failed message.
VAR_PAUSE_MSG @ 93Obviously something like: "Game paused. Press space to continue."
VAR_RESTART_MSG @ 94, VAR_QUIT_MSG @ 95Asking if the user wants to restart/quit: "Do you really want to quit ? (Y/N)Y" The GUI doesn't display the last character, it indicates the "yes" character.
VAR_SAVE_BTN @ 96, VAR_LOAD_BTN @ 97, VAR_PLAY_BTN @ 98, VAR_CANCEL_BTN @ 99, VAR_QUIT_BTN @ 100, VAR_OK_BTN @ 101Text for the GUI buttons.
VAR_SAVE_DISK_MSG @ 102, VAR_ENTER_NAME_MSG @ 103, VAR_NOT_SAVED_MSG @ 104, VAR_NOT_LOADED_MSG @ 105Various error and confirmation messages shown in the GUI: "Insert your save disk", "Enter a name", "Game NOT saved", "Game NOT loaded".
VAR_SAVE_MSG @ 106, VAR_LOAD_MSG @ 107Message shown when loading/saving: "Saving '%s'", "Loading '%s'".
VAR_SAVE_MENU_TITLE @ 108, VAR_LOAD_MENU_TITLE @ 109, VAR_MAIN_MENU_TITLE @ 117Titles of the 3 menu from the GUI: "What do you want?", "Save game", "Load game".
VAR_GUI_COLORS @ 110This is an array defining the colors used in the GUI. DOTT allocates an array of 50 elements for this. The following entries in the array are known:
- 02: menu title text
- 04: menu background
- 05: button text
- 06: clicked button text
- 07: clicked button background
- 09: arrows and filenames background
- 10: filenames text
- 11: clicked filenames text
- 12: clicked arrows and filenames background
- 13: main menu top border
- 14: main menu bottom border
- 15: main menu left border
- 16: main menu right border
- 17: buttons top border and the filenames box bottom border
- 18: buttons bottom border and the filenames box top border
- 19: buttons left border and the filenames box right border
- 20: buttons right border and the filenames box left border
- 25: message (pause, quit and restart) text
- 26: message background
- 27: message top border
- 28: message bottom border
- 29: message left border
- 30: message right border
- 31: internal error text color
- 32: internal error background
- 33: internal error top border
- 34: internal error bottom border
- 35: internal error left border
- 36: internal error right border
- 37: debug menu (room, var, boot param) text
- 38: debug menu background
- 39: debug menu top border
- 40: debug menu bottom border
- 41: debug menu left border
- 42: debug menu right border
VAR_DEBUG_PASSWORD @ 111This array defines the password to activate the debug mode. If this array is not defined, the debug mode can not be enabled. If it contains a zero length string then no password is needed. The password must be relative to 'c'; the simplest way is to do something like this:
VAR_DEBUG_PASSWORD[0] = "mypassword";
for(i = 0 ; VAR_DEBUG_PASSWORD[i] != 0 ; i++)
VAR_DEBUG_PASSWORD[i] = VAR_DEBUG_PASSWORD[i] - 'c';
What are these?
VAR_ME @ 7
VAR_FADE_DELAY @ 59
|