-
Notifications
You must be signed in to change notification settings - Fork 20
Scumm 6 variables
A 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.
Not sure if this one is really used in v6.
Set if user input is enabled.
VAR_CUTSCENEEXIT_KEY @ 24, VAR_RESTART_KEY @ 42, VAR_PAUSE_KEY @ 43, VAR_MAINMENU_KEY @ 50, VAR_TALKSTOP_KEY @ 57
Sets the "special" key mappings.
Coordinates of the mouse pointer in virtual resolution.
Coordinates of the mouse pointer in absolute resolution.
Set if the cursor is visible.
All the "ego" functions use the actor found in this variable.
The number of actor in the game ??
Set to the object the ego is walking toward during startRoomWithEgo().
X coordinate of the camera (in the virtual resolution).
If 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.
If this is non zero the camera will just jump to its destination instead of panning.
True if a message is beeing displayed ??
The actor who's currently talking ??
Display 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 +).
Subtitles disabled ??
The current room.
The 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.
The room dimensions.
Apparently this is set when a game state was loaded.
This is set to the new room right before running an exit script.
Set to 1 if inside an override block when the user has skipped a cutscene.
Script called when the camera has been moved.
Script called before/after the room entry script.
Script called before/after the room exit script.
Script to handle low level user input from the mouse, keyboard, etc.
Script to handle sentences passed to the doSentence() instruction.
Script handling inventory related changes.
Script run before/after a cutscene.
Script run before showing the GUI menu and after closing it. It's not run for room 0.
Set 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.
These variables simply track the time in units of 15ms. The scripts can reset them anytime. Their value is only increased once for each frame.
Set 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.
This 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.
Probably part of the imuse interface.
Last value returned by getRandomNumber() ?
VAR_TIMEDATE_YEAR @ 119, VAR_TIMEDATE_HOUR @ 125, VAR_TIMEDATE_MINUTE @ 126, VAR_TIMEDATE_DAY @ 128, VAR_TIMEDATE_MONTH @ 129
Return value of getDateTime()
This 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.
The machine speed. It probably has no real meaning in ScummVM.
Dunno what this is supposed to be, or if ScummVM uses it.
Probably the currently used drive on MS systems.
Set to the debug level ??
Available size of the heap ?? Probably meaningless with ScummVM.
Running from harddisk ??
Again one has to wonder if ScummVM implements this kind of stuff.
Or this ??
Size of the EMS memory under DOS.
These 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.
Asking for another game disk: "Insert disk %c and click."
Failed to open a file: "Failed to open %s, (%c%d)."
Dunno what the %c%d are for, probably some debug stuff.
Read 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.
Obviously something like: "Game paused. Press space to continue."
Asking 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 @ 101
Text for the GUI buttons.
VAR_SAVE_DISK_MSG @ 102, VAR_ENTER_NAME_MSG @ 103, VAR_NOT_SAVED_MSG @ 104, VAR_NOT_LOADED_MSG @ 105
Various error and confirmation messages shown in the GUI: "Insert your save disk", "Enter a name", "Game NOT saved", "Game NOT loaded".
Message shown when loading/saving: "Saving '%s'", "Loading '%s'".
Titles of the 3 menu from the GUI: "What do you want?", "Save game", "Load game".
This 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
This 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';