|
AnimaEngine
1.0.0
Nintendo DS Pokemon Black, White, Black 2, and White 2 sprite extraction and preview toolchain
|
Implementations of NDS OAM, NCER cell, and NANR animation compositor and affine renderer. More...
Macros | |
| #define | M_PI 3.14159265358979323846 |
| #define | MAX_GLOBAL_OAMS 2048 |
| #define | COMPOSITE_MARGIN 8 |
Functions | |
| static double | NanrScaleToDouble (int scale) |
| Converts a NANR fixed-point scale factor to double precision. More... | |
| static void | Composer_SetParentTransform (GlobalOam *goam, const ComposerTransform *parent_transform) |
| Applies parent affine transform context variables to a global OAM sprite definition. More... | |
| static void | ParentTransformPoint (const GlobalOam *goam, double child_x, double child_y, double *out_x, double *out_y) |
| Transforms a local point using the parent layout's scale, rotation, and translation. More... | |
| static void | ParentInverseTransformPoint (const GlobalOam *goam, double world_x, double world_y, double *out_child_x, double *out_child_y) |
| Inverts a world coordinate to its corresponding local coordinate relative to the parent transform. More... | |
| static int | RoundDoubleToInt (double value) |
| Rounds a double precision float value to the nearest integer. More... | |
| static void | GlobalOamTransformPoint (const GlobalOam *goam, double local_x, double local_y, double *out_x, double *out_y) |
| Transforms a local OAM source coordinate to screen/world space by applying local and parent transformations. More... | |
| static void | GlobalOamInverseTransformPoint (const GlobalOam *goam, double world_x, double world_y, double *out_local_x, double *out_local_y) |
| Inverse-transforms a screen/world coordinate back to local OAM texture space. More... | |
| static void | GlobalOamTransformedBounds (const GlobalOam *goam, double *out_min_x, double *out_min_y, double *out_max_x, double *out_max_y) |
| Computes bounds of a global OAM by transforming all four corners into world space. More... | |
| static void | ApplyType3CoordOffset (const NmcrRecord *record, const NanrFrame *frame, const NcerCell *cell, const CoordFile *coords, int *translate_x, int *translate_y) |
| Applies coordinate offset constraints specific to type-3 cells. More... | |
| static int | BuildGlobalOamsForFrame (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, int tick, const char *label, GlobalOam *global_oams, int max_global_oams, const CoordFile *coords, const ComposerTransform *parent_transform) |
| Constructs the list of global OAM definitions representing a specific frame. More... | |
| static void | SortGlobalOams (GlobalOam *global_oams, int global_oam_count) |
| Sorts global OAM sprites by priority (depth layering) and original definition index. More... | |
| static int | SampleGlobalOamColorIndex (const NcgrImage *image, const NclrPalette *palette, const GlobalOam *goam, int src_x, int src_y, int tile_stride) |
| Samples a single pixel from the NCGR tile image for a given OAM layout. More... | |
| static void | BlitGlobalOamToRgbaCanvas (const NcgrImage *image, const NclrPalette *palette, RgbaColor *canvas, int canvas_width, int canvas_height, int world_origin_x, int world_origin_y, const GlobalOam *goam, int tile_stride) |
| Blits a transformed OAM to an RGBA destination canvas. More... | |
| static void | BlitGlobalOamToIndexedCanvas (const NcgrImage *image, const NclrPalette *palette, u8 *canvas, int canvas_width, int canvas_height, int world_origin_x, int world_origin_y, const GlobalOam *goam, int tile_stride) |
| Blits a transformed OAM to an indexed 8-bit destination palette index canvas. More... | |
| void | Composer_ClearPixels (RgbaColor *pixels, int width, int height) |
| Fills the RGBA canvas with transparent pixels. More... | |
| void | Composer_ComputeBoundsWithTransform (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, int tick, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y, const CoordFile *coords, const ComposerTransform *parent_transform) |
| Bounding box calculator with parent timeline transformations. More... | |
| void | Composer_ComputeBounds (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, int tick, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y, const CoordFile *coords) |
| Calculates the extreme bounding box coordinates for a specific animation frame tick. More... | |
| void | Composer_ComputeBoundsRange (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, int start_frame, int frame_count, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y, const CoordFile *coords, int delay_cs) |
| Calculates bounding box encapsulating a full range of animation frames. More... | |
| int | Composer_RenderFrameIndexedWithTransform (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, const NcgrImage *ncgr, const NclrPalette *palette, int tick, int tile_stride, int min_x, int min_y, int width, int height, int margin, u8 *out_indices, const CoordFile *coords, const ComposerTransform *parent_transform) |
| Composites a transformed frame into an 8bpp color-indexed layout canvas. More... | |
| int | Composer_RenderFrameIndexed (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, const NcgrImage *ncgr, const NclrPalette *palette, int tick, int tile_stride, int min_x, int min_y, int width, int height, int margin, u8 *out_indices, const CoordFile *coords) |
| Composites a frame into an indexed 8-bit color-indexed layout canvas. More... | |
| int | Composer_RenderFrameRgba (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map, const NcgrImage *ncgr, const NclrPalette *palette, int tick, int tile_stride, const char *label, RgbaColor **out_pixels, int *out_width, int *out_height, const CoordFile *coords) |
| Renders a composite frame directly into a 32-bit RGBA pixel array. More... | |
| int | Composer_CropIndexedFrames (const u8 *frames, int frame_count, int width, int height, u8 **out_frames, int *out_width, int *out_height) |
| Crops transparent margins from index-compiled spritesheet animation loops. More... | |
| void | Composer_ComputeUnionBounds (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *map_a, int map_a_frame_count, const NmcrMap *map_b, int map_b_frame_count, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y, const CoordFile *coords, int delay_cs) |
| Computes combined bounding box that fits two animation sets sharing a unified canvas space. More... | |
| static int | Composer_NmarAnimationIsUsable (const NmarFile *nmar, const NmcrFile *nmcr, int animation_index) |
| static int | Composer_NmarFrameCount (const NmarFile *nmar, const NmcrFile *nmcr, const NanrFile *nanr, int animation_index, int delay_cs) |
| static void | Composer_TransformFromNmarFrame (const NmarFrame *frame, ComposerTransform *out_transform) |
| static int | Composer_ComputeTimelineOrMapBounds (const NcerFile *ncer, const NanrFile *nanr, const NmcrFile *nmcr, const NmarFile *nmar, const NmcrMap *fallback_map, int animation_index, int use_timeline, int frame_count, int delay_cs, int *out_min_x, int *out_min_y, int *out_max_x, int *out_max_y, const CoordFile *coords) |
| static int | Composer_RenderTimelineOrMapFrame (const NcerFile *ncer, const NanrFile *nanr, const NmcrFile *nmcr, const NmarFile *nmar, const NmcrMap *fallback_map, int animation_index, int use_timeline, const NcgrImage *ncgr, const NclrPalette *palette, int frame_index, int delay_cs, int tile_stride, int min_x, int min_y, int width, int height, int margin, u8 *out_indices, const CoordFile *coords) |
| int | Composer_RenderComposedAnimation (const NcerFile *ncer, const NanrFile *nanr, const NmcrMap *idle_map, const NmcrMap *break_map, const NcgrImage *ncgr, const NclrPalette *palette, int idle_repetitions, int tile_stride, int margin, u8 **out_frames, int *out_frame_count, int *out_width, int *out_height, const CoordFile *coords, int delay_cs) |
| Renders a complete loop merging a base idle animation and a break sequence. More... | |
| int | Composer_RenderComposedAnimationTimeline (const NcerFile *ncer, const NanrFile *nanr, const NmcrFile *nmcr, const NmarFile *nmar, const NmcrMap *idle_map, const NmcrMap *break_map, int idle_animation_index, int break_animation_index, const NcgrImage *ncgr, const NclrPalette *palette, int idle_repetitions, int tile_stride, int margin, u8 **out_frames, int *out_frame_count, int *out_width, int *out_height, const CoordFile *coords, int delay_cs) |
| Timeline-driven composed loop renderer that applies full parent translation transforms. More... | |
| int | Composer_ComputeIdleRepetitions (const NanrFile *nanr, const NmcrMap *idle_map) |
| Computes optimal number of idle loops before transition so loop length is ~3 seconds. More... | |
| int | Composer_ComputeNmarIdleRepetitions (const NmarFile *nmar, int animation_index) |
| Timeline-driven optimal idle loops counter before playing break sequence. More... | |
Implementations of NDS OAM, NCER cell, and NANR animation compositor and affine renderer.
| #define COMPOSITE_MARGIN 8 |
| #define M_PI 3.14159265358979323846 |
| #define MAX_GLOBAL_OAMS 2048 |
|
static |
Applies coordinate offset constraints specific to type-3 cells.
| record | Layout map record. |
| frame | Active anim timeline frame. |
| cell | Active sprite cell metadata. |
| coords | Coordinate catalog data. |
| translate_x | Pointer to X translation accumulator. |
| translate_y | Pointer to Y translation accumulator. |
|
static |
Blits a transformed OAM to an indexed 8-bit destination palette index canvas.
| image | NCGR tile data. |
| palette | NCLR palette data. |
| canvas | Destination index buffer. |
| canvas_width | Canvas width. |
| canvas_height | Canvas height. |
| world_origin_x | World space origin X. |
| world_origin_y | World space origin Y. |
| goam | Source transformed OAM context. |
| tile_stride | NCGR stride width in tiles. |
|
static |
Blits a transformed OAM to an RGBA destination canvas.
| image | NCGR tile data. |
| palette | NCLR palette data. |
| canvas | Destination buffer of RGBA pixels. |
| canvas_width | Canvas width in pixels. |
| canvas_height | Canvas height in pixels. |
| world_origin_x | World space origin offset X. |
| world_origin_y | World space origin offset Y. |
| goam | Source transformed OAM context. |
| tile_stride | NCGR stride width in tiles. |
|
static |
Constructs the list of global OAM definitions representing a specific frame.
| ncer | NCER cell resource. |
| nanr | NANR animation resource. |
| map | NMCR mapping layout. |
| tick | Active timeline animation tick. |
| label | Optional debug print prefix. |
| global_oams | Destination global OAM array. |
| max_global_oams | Max capacity of OAM array. |
| coords | Coordinate file database. |
| parent_transform | Optional parent transform attributes. |
| void Composer_ClearPixels | ( | RgbaColor * | pixels, |
| int | width, | ||
| int | height | ||
| ) |
Fills the RGBA canvas with transparent pixels.
| pixels | Target pixel buffer. |
| width | Canvas width. |
| height | Canvas height. |
| void Composer_ComputeBounds | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map, | ||
| int | tick, | ||
| int * | out_min_x, | ||
| int * | out_min_y, | ||
| int * | out_max_x, | ||
| int * | out_max_y, | ||
| const CoordFile * | coords | ||
| ) |
Calculates the extreme bounding box coordinates for a specific animation frame tick.
| ncer | Parsed Cell file. |
| nanr | Parsed Animation sequence. |
| map | Screen layout composite map. |
| tick | Current animation frame index/tick. |
| out_min_x | Output for minimum horizontal bound. |
| out_min_y | Output for minimum vertical bound. |
| out_max_x | Output for maximum horizontal bound. |
| out_max_y | Output for maximum vertical bound. |
| coords | Battle coordinates offset configuration (unused in placement checks). |
| void Composer_ComputeBoundsRange | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map, | ||
| int | start_frame, | ||
| int | frame_count, | ||
| int * | out_min_x, | ||
| int * | out_min_y, | ||
| int * | out_max_x, | ||
| int * | out_max_y, | ||
| const CoordFile * | coords, | ||
| int | delay_cs | ||
| ) |
Calculates bounding box encapsulating a full range of animation frames.
| ncer | Cell metadata. |
| nanr | Animation sequence. |
| map | Map layout. |
| start_frame | Beginning index. |
| frame_count | Amount of frames to scan. |
| out_min_x | Output minimum horizontal coordinate. |
| out_min_y | Output minimum vertical coordinate. |
| out_max_x | Output maximum horizontal coordinate. |
| out_max_y | Output maximum vertical coordinate. |
| coords | Coordinate metadata anchors. |
| delay_cs | Base frame duration delay in centiseconds. |
| void Composer_ComputeBoundsWithTransform | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map, | ||
| int | tick, | ||
| int * | out_min_x, | ||
| int * | out_min_y, | ||
| int * | out_max_x, | ||
| int * | out_max_y, | ||
| const CoordFile * | coords, | ||
| const ComposerTransform * | parent_transform | ||
| ) |
Bounding box calculator with parent timeline transformations.
| ncer | Cell details. |
| nanr | Animation details. |
| map | Map layout. |
| tick | Animation frame tick. |
| out_min_x | Minimum X coordinate bound output. |
| out_min_y | Minimum Y coordinate bound output. |
| out_max_x | Maximum X coordinate bound output. |
| out_max_y | Maximum Y coordinate bound output. |
| coords | Battle coordinates. |
| parent_transform | Active parent scaling and rotation matrices. |
Computes optimal number of idle loops before transition so loop length is ~3 seconds.
| nanr | Animation frames sequence. |
| idle_map | Default battle idle map. |
| int Composer_ComputeNmarIdleRepetitions | ( | const NmarFile * | nmar, |
| int | animation_index | ||
| ) |
Timeline-driven optimal idle loops counter before playing break sequence.
| nmar | Timeline track details. |
| animation_index | Labeled idle animation timeline track index. |
|
static |
| void Composer_ComputeUnionBounds | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map_a, | ||
| int | map_a_frame_count, | ||
| const NmcrMap * | map_b, | ||
| int | map_b_frame_count, | ||
| int * | out_min_x, | ||
| int * | out_min_y, | ||
| int * | out_max_x, | ||
| int * | out_max_y, | ||
| const CoordFile * | coords, | ||
| int | delay_cs | ||
| ) |
Computes combined bounding box that fits two animation sets sharing a unified canvas space.
| ncer | Cell details. |
| nanr | Animation details. |
| map_a | First map configuration. |
| map_a_frame_count | Frame count of map A. |
| map_b | Second map configuration. |
| map_b_frame_count | Frame count of map B. |
| out_min_x | Output minimum X bound. |
| out_min_y | Output minimum Y bound. |
| out_max_x | Output maximum X bound. |
| out_max_y | Output maximum Y bound. |
| coords | Coordinate metadata anchors. |
| delay_cs | Base timeline centisecond step. |
| int Composer_CropIndexedFrames | ( | const u8 * | frames, |
| int | frame_count, | ||
| int | width, | ||
| int | height, | ||
| u8 ** | out_frames, | ||
| int * | out_width, | ||
| int * | out_height | ||
| ) |
Crops transparent margins from index-compiled spritesheet animation loops.
| frames | Multi-frame sequential 8bpp color buffer. |
| frame_count | Number of frames inside the buffer. |
| width | Raw source canvas width. |
| height | Raw source canvas height. |
| out_frames | Newly allocated cropped multi-frame indexed buffer output. |
| out_width | Width of the cropped bounding box. |
| out_height | Height of the cropped bounding box. |
|
static |
|
static |
| int Composer_RenderComposedAnimation | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | idle_map, | ||
| const NmcrMap * | break_map, | ||
| const NcgrImage * | ncgr, | ||
| const NclrPalette * | palette, | ||
| int | idle_repetitions, | ||
| int | tile_stride, | ||
| int | margin, | ||
| u8 ** | out_frames, | ||
| int * | out_frame_count, | ||
| int * | out_width, | ||
| int * | out_height, | ||
| const CoordFile * | coords, | ||
| int | delay_cs | ||
| ) |
Renders a complete loop merging a base idle animation and a break sequence.
| ncer | Cell tables. |
| nanr | Animation sequences. |
| idle_map | Battle idle composite map. |
| break_map | Battle break candidate map. |
| ncgr | Tile pixels. |
| palette | Palette data. |
| idle_repetitions | Pre-calculated iterations of the idle loop before playing break. |
| tile_stride | Target tile stride. |
| margin | Safety boundary padding. |
| out_frames | Newly allocated cropped multi-frame indexed index buffer. |
| out_frame_count | Frame count of generated loop. |
| out_width | Bounded canvas width. |
| out_height | Bounded canvas height. |
| coords | Coordinates anchors. |
| delay_cs | Centisecond duration. |
| int Composer_RenderComposedAnimationTimeline | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrFile * | nmcr, | ||
| const NmarFile * | nmar, | ||
| const NmcrMap * | idle_map, | ||
| const NmcrMap * | break_map, | ||
| int | idle_animation_index, | ||
| int | break_animation_index, | ||
| const NcgrImage * | ncgr, | ||
| const NclrPalette * | palette, | ||
| int | idle_repetitions, | ||
| int | tile_stride, | ||
| int | margin, | ||
| u8 ** | out_frames, | ||
| int * | out_frame_count, | ||
| int * | out_width, | ||
| int * | out_height, | ||
| const CoordFile * | coords, | ||
| int | delay_cs | ||
| ) |
Timeline-driven composed loop renderer that applies full parent translation transforms.
| ncer | Cell layouts. |
| nanr | Animation sequences. |
| nmcr | Direct layouts map file. |
| nmar | High-level animation timeline tracks. |
| idle_map | Default idle map. |
| break_map | Labeled break map. |
| idle_animation_index | Labeled idle NMAR index. |
| break_animation_index | Labeled break NMAR index. |
| ncgr | Indexed tile sheet. |
| palette | Color palettes. |
| idle_repetitions | Desired loops of idle sequence. |
| tile_stride | NCGR stride. |
| margin | Bounding padding. |
| out_frames | Pointer to cropped multi-frame index buffer output. |
| out_frame_count | Frame count of compiled timeline loop. |
| out_width | Width of bounding canvas. |
| out_height | Height of bounding canvas. |
| coords | Coordinates anchors. |
| delay_cs | Timeline time step. |
| int Composer_RenderFrameIndexed | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map, | ||
| const NcgrImage * | ncgr, | ||
| const NclrPalette * | palette, | ||
| int | tick, | ||
| int | tile_stride, | ||
| int | min_x, | ||
| int | min_y, | ||
| int | width, | ||
| int | height, | ||
| int | margin, | ||
| u8 * | out_indices, | ||
| const CoordFile * | coords | ||
| ) |
Composites a frame into an indexed 8-bit color-indexed layout canvas.
| ncer | Cells file. |
| nanr | Animations sequence. |
| map | Layout mapping. |
| ncgr | Character tile image data. |
| palette | Palettes array. |
| tick | Active frame tick. |
| tile_stride | Target tile stride (e.g. 32). |
| min_x | Minimum horizontal coordinate anchor. |
| min_y | Minimum vertical coordinate anchor. |
| width | Target canvas rendering width. |
| height | Target canvas rendering height. |
| margin | Pixel safety margin size. |
| out_indices | Preallocated output buffer to receive color index bytes. |
| coords | Coordinate metadata. |
| int Composer_RenderFrameIndexedWithTransform | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map, | ||
| const NcgrImage * | ncgr, | ||
| const NclrPalette * | palette, | ||
| int | tick, | ||
| int | tile_stride, | ||
| int | min_x, | ||
| int | min_y, | ||
| int | width, | ||
| int | height, | ||
| int | margin, | ||
| u8 * | out_indices, | ||
| const CoordFile * | coords, | ||
| const ComposerTransform * | parent_transform | ||
| ) |
Composites a transformed frame into an 8bpp color-indexed layout canvas.
| ncer | Cells file. |
| nanr | Animations file. |
| map | Map layout. |
| ncgr | Tile pixels. |
| palette | Palettes bank. |
| tick | Active tick. |
| tile_stride | NCGR stride. |
| min_x | Horizontal canvas rendering offset. |
| min_y | Vertical canvas rendering offset. |
| width | Canvas width. |
| height | Canvas height. |
| margin | Canvas safety padding. |
| out_indices | Output destination buffer for indexed color mapping. |
| coords | Coordinates anchors. |
| parent_transform | Active timeline transforms. |
| int Composer_RenderFrameRgba | ( | const NcerFile * | ncer, |
| const NanrFile * | nanr, | ||
| const NmcrMap * | map, | ||
| const NcgrImage * | ncgr, | ||
| const NclrPalette * | palette, | ||
| int | tick, | ||
| int | tile_stride, | ||
| const char * | label, | ||
| RgbaColor ** | out_pixels, | ||
| int * | out_width, | ||
| int * | out_height, | ||
| const CoordFile * | coords | ||
| ) |
Renders a composite frame directly into a 32-bit RGBA pixel array.
| ncer | Cell details. |
| nanr | Animation frames. |
| map | Map configurations. |
| ncgr | Tile pixels. |
| palette | Palette registers. |
| tick | Frame tick index. |
| tile_stride | NCGR tile width stride. |
| label | Debug output identifier. |
| out_pixels | Pointer filled with newly allocated RGBA pixel buffer on success. |
| out_width | Width of generated RGBA frame. |
| out_height | Height of generated RGBA frame. |
| coords | Coordinate metadata anchors. |
|
static |
|
static |
Applies parent affine transform context variables to a global OAM sprite definition.
| goam | Target global OAM struct. |
| parent_transform | Parent transform context to inherit. |
|
static |
|
static |
Inverse-transforms a screen/world coordinate back to local OAM texture space.
| goam | OAM instance parameters. |
| world_x | World X coordinate. |
| world_y | World Y coordinate. |
| out_local_x | Destination local texture X coordinate. |
| out_local_y | Destination local texture Y coordinate. |
|
static |
Computes bounds of a global OAM by transforming all four corners into world space.
| goam | OAM instance. |
| out_min_x | Output minimum X world coordinate. |
| out_min_y | Output minimum Y world coordinate. |
| out_max_x | Output maximum X world coordinate. |
| out_max_y | Output maximum Y world coordinate. |
|
static |
Transforms a local OAM source coordinate to screen/world space by applying local and parent transformations.
| goam | OAM instance parameters. |
| local_x | Local coordinate relative to OAM corner. |
| local_y | Local coordinate relative to OAM corner. |
| out_x | Destination world X coord. |
| out_y | Destination world Y coord. |
|
static |
Converts a NANR fixed-point scale factor to double precision.
| scale | Fixed-point scale factor. |
|
static |
Inverts a world coordinate to its corresponding local coordinate relative to the parent transform.
| goam | OAM instance parameters. |
| world_x | World X coordinate. |
| world_y | World Y coordinate. |
| out_child_x | Pointer to child X-coordinate. |
| out_child_y | Pointer to child Y-coordinate. |
|
static |
Transforms a local point using the parent layout's scale, rotation, and translation.
| goam | OAM instance parameters containing parent transform attributes. |
| child_x | X-coordinate in child space. |
| child_y | Y-coordinate in child space. |
| out_x | Pointer to destination transformed X world coordinate. |
| out_y | Pointer to destination transformed Y world coordinate. |
|
static |
Rounds a double precision float value to the nearest integer.
| value | Float value. |
|
static |
Samples a single pixel from the NCGR tile image for a given OAM layout.
| image | NCGR source tile sheet image. |
| palette | NCLR source color palette. |
| goam | Active OAM layout properties. |
| src_x | Target pixel coordinate X relative to OAM. |
| src_y | Target pixel coordinate Y relative to OAM. |
| tile_stride | Stride width of NCGR in tiles. |
|
static |
Sorts global OAM sprites by priority (depth layering) and original definition index.
| global_oams | Array of global OAM definitions. |
| global_oam_count | Array length. |