GOOL Executable

A GOOL Executable is a type of entry that describes the behavior or application of a particular type of game object. GOOL executables contain a header, executable compiled [GOOL] bytecode, a constant pool, a mapping of subtypes to [initial] states, a mapping of events to states/interrupts, state descriptors, and animation sequence, text, and sprite descriptors. They are Type 11 entries.

Item 4: State Map
* 0xFF is a null state

Item 6: Animation Descriptors
Animation descriptors are stored contiguously, occupying the 6th item of the GOOL executable entry. Each type of animation descriptor has a different structure; the size of an animation descriptor is entirely dependent upon its type.

Type 1 - Vertex Animation
Type 1 animation descriptors simply specify an SVTX entry that contains their representative vertex animation. This is the most frequently used type.

Type 2 - Sprite Animation
Type 2 descriptors specify a separate square for each frame of animation, each square to be transformed and rendered as a blended textured quad. Square dimensions are not specified in the descriptor but are calculated from the instanced object's scale vector.

Type 3 - Font Map

Type 3 descriptors associate with each ascii character, in lexicographic order, a separate region (location/dimensions determined by texture and color info) of a specified Texture Page. Also specified for each region are the dimensions of a textured blended quad to be rendered, with that [region of the texture page as its] texture. Type 4 descriptors, which specify a string of text, will reference a type 3 descriptor. As characters in the type 4 descriptor string are stepped through, the referenced type 3 descriptor will determine the corresponding quads to be rendered. The Type 3 descriptor may additionally specify a separate region of the texture page as [the texture for] a text backdrop [quad].

Type 4 - Text Animation
Type 4 descriptors specify a separate string of text for each frame of animation. They also specify the offset of a source font map (Type 3 descriptor) to use to render that text.

Each string ends with a null terminator character (\0) and can have up to 4 individual format specifiers (beginning with %); they are processed with a call to printf, with 4 corresponding arguments the 2nd, 3rd, 4th, and 5th words, respectively, before (or below) the top of the instanced object's stack.

These strings can also contain several types of extended format specifiers. These begin with a tilde '~' and can be specified as one of the following: * if the instanced object has bit 11 of its statusb flags set, rendering of the text will include a backdrop that spans the area occupied by the text.

Type 5 - Fragment Animation
Type 5 descriptors specify a number of rectangles that compose a miniature model for each frame of animation. These are to be transformed and rendered as multiple blended textured quads.

This type is typically used for smaller objects such as fragments of exploding TNT and sparkling specks spawned by Aku Aku and by Warp Panels.