Toggle.monitor

From AGI Wiki
Jump to navigationJump to search

The toggle.monitor command switches between CGA and RGB graphics modes.

Syntax

toggle.monitor();

Remarks

This is only useful when AGI is running on a computer with a CGA graphics adapter (or AGI has been started with the -C or -R switches). When used on non-PC systems or systems not using the CGA graphics adapter, AGI ignores this command. Curiously, AGI also ignores the toggle.monitor command if reserved variable v0 (current room number) equals zero.

On CGA displays, AGI supported two different color palettes. The toggle.monitor command swaps between the two CGA color palettes. In most Sierra games, a menu item was included (which would only be shown when running on a CGA graphics adapter) that would use the toggle.monitor command to switch between the two color palettes. It does not have much practical value any more, as these modes are rarely used in fan made AGI games.

Possible Errors

None.

Example

Code:
if(machineType == PC && (monitorType == CGA || monitorType == RGB))
  {
  toggle.monitor();
  }

Technical Information

Required Interpreter Version: Available in all AGI versions.
Byte-Code Value: 140 (0x8C hex)

See Also

System Commands
Graphics Display Modes