b2dGetAnimFrameAmount

Queries animation frame count (returns calculated frameCount from b2dLoadAnimImage). Takes imageHandle (image handle from b2dLoadAnimImage, positive integer). Returns frame count (positive integer, 0 if invalid or not animation).

2D Overlay

Parameters & Returns

Parameters

imageHandle Int

Returns

Int

Quick Summary

Queries animation frame count (returns calculated frameCount from b2dLoadAnimImage). Takes imageHandle (image handle from b2dLoadAnimImage, positive integer). Returns frame count (positive integer, 0 if invalid or not animation).

Technical Exegesis...

Queries animation frame count (returns calculated frameCount from b2dLoadAnimImage). Takes imageHandle (image handle from b2dLoadAnimImage, positive integer). Returns frame count (positive integer, 0 if invalid or not animation). Reads image.frameCount from g_images map (calculated as framesX x framesY during load). Use to query frame count (animation loop bounds, validate frame indices), iterate frames (loop through all frames), or check animation (determine if image is animation sheet).

Example

Example.bam
; No example implemented yet