AGIWiki/Special variables
From ScummVM :: Wiki
< AGIWiki
Jump to navigation
Jump to search
Some variables have special meaning to the interpreter:
Var |
Name in defines.txt |
Description |
---|---|---|
v0 | room_no
|
Number of the current room |
v1 | prev_room_no
|
Number of the previous room |
v2 | ego_edge_code
|
Which edge of the screen ego is touching
|
v3 | score
|
Current score |
v4 | object_touching_edge
|
Number of an object other than ego that is touching the edge |
v5 | object_edge_code
|
See ego_edge_code
|
v6 | ego_dir
|
Direction of ego's motion (see Moving objects for a list of directions) |
v7 | max_score
|
Maximum score |
v8 | free_memory
|
The number of 256-byte lots of free memory available for resources |
v9 | unknown_word_no
|
If the player has entered an unknown word, this is set to the number of that word (i.e., 2 if it's the second word entered). Otherwise, this is 0. |
v10 | cycle_delay
|
Delay between interpreter cycles, in 1/20 second increments. |
v11 | clock_seconds
|
Number of seconds on the interpreter's clock (the clock is reset when the game starts) |
v12 | clock_minutes
|
Number of minutes on the interpreter's clock |
v13 | clock_hours
|
Number of hours on the interpreter's clock |
v14 | clock_days
|
Number of days on the interpreter's clock |
v15 | joystick_sensitivity
|
Sensitivity of the joystick |
v16 | ego_view_no
|
Number of the view assigned to ego |
v17 | error_code
|
What type of error has occurred |
v18 | error_information
|
Extra information about the error |
v19 | key_pressed
|
The ASCII code of the key that has just been pressed, if any |
v20 | computer_type
|
Type of computer (0 = PC) |
v21 | window_close_time
|
Number of half-seconds to wait before closing a window (if 0, the window remains on screen until the user presses a key) |
v22 | sound_type
|
Number of sound channels (PC = 1, Tandy = 3) |
v23 | sound_volume
|
Volume of the sound (0 = loudest, 15 = quietest) |
v24 | input_line_character_max
|
Specifies the maximum number of characters that the player may enter on the input line. Defaults to 41. |
v25 | selected_inventory_item
|
If the player has selected an inventory item from the inventory screen, this is set to the number of that item (or 255 if ESC was pressed) |
v26 | video_mode
|
Video mode:
Note: In real CGA with composite monitor, the game displays 160x200 with 16 color but the texts are weird. It's more like playing an agi game on apple2. On CGA with color monitor, the game displays black and white. On EGA and more recent graphic card, CGA displays black-cyan-magenta-white CGA palette. |
See also
Sources
- AGI Studio help file