Skip to main content

Launched object kinds

ScriptLaunchKind · 1 byte, first operand of Launch an object

Scripts · Virtual machine

A script can launch a flying object, either a magic one or an item. This byte chooses between the two: one value selects magic, and every other byte throws an item.1

typedef enum ScriptLaunchKind {
SCRIPT_LAUNCH_MAGIC = 0xdf, /* Launch a magic flying object of the type given by the next operand. */
SCRIPT_LAUNCH_ITEM = 0xec /* The value the reference scripts use for the other path; any value but SCRIPT_LAUNCH_MAGIC throws a copy of a template item. */
} ScriptLaunchKind;

In the reachable scripts of the 16 reference INF files, 41 launch instructions use SCRIPT_LAUNCH_MAGIC, all with the Fireball object type, and two use SCRIPT_LAUNCH_ITEM, both throwing a dart. Both forms have the same eight-byte layout. The code does not single out SCRIPT_LAUNCH_ITEM: every value other than SCRIPT_LAUNCH_MAGIC takes the same path.

Sources​

Locations refer to the game executable reference.

Footnotes​

  1. Launch an object handler, create a magic flying object and launch an item. Comparative source: oeob_launchObject in REF-SCUMM-003. ↩