Mario Kart 64
Loading...
Searching...
No Matches
animation.h File Reference
#include <common_structs.h>
Include dependency graph for animation.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  Armature
 The armature is associated with an AnimationLimbVector which is equal to the number of RENDER_MODEL_OR_ADD_POS in the armature. More...
 
struct  AnimationCycleSpec
 
struct  Animation
 

Macros

#define SIMPLE_ANIMATION_INSTRUCTION(x)   x, 0x00000002
 
#define ANIMATION_DISABLE_AUTOMATIC_POP   SIMPLE_ANIMATION_INSTRUCTION(DISABLE_AUTOMATIC_POP_MATRIX)
 
#define ANIMATION_POP_MATRIX   SIMPLE_ANIMATION_INSTRUCTION(POP_MATRIX)
 
#define ANIMATION_STOP   SIMPLE_ANIMATION_INSTRUCTION(STOP_ANIMATION)
 
#define ANIMATION_RENDER_MODEL_AT(model, x, y, z)   RENDER_MODEL_OR_ADD_POS, 0x00000007, 0x00000000, (u32) model, x, y, z
 the pos is relative to the previous RENDER_MODEL_OR_ADD_POS if ANIMATION_DISABLE_AUTOMATIC_POP is used
 
#define ANIMATION_RENDER_MODEL(model)   ANIMATION_RENDER_MODEL_AT(model, 0x00000000, 0x00000000, 0x00000000)
 use RENDER_MODEL_OR_ADD_POS
 
#define ANIMATION_ADD_POS(x, y, z)   ANIMATION_RENDER_MODEL_AT((u32) NULL, x, y, z)
 use RENDER_MODEL_OR_ADD_POS
 

Typedefs

typedef AnimationCycleSpec AnimationLimbVector[3]
 

Enumerations

enum  animation_type { RENDER_MODEL_OR_ADD_POS , DISABLE_AUTOMATIC_POP_MATRIX , POP_MATRIX , STOP_ANIMATION }
 

Functions

void convert_to_fixed_point_matrix_animation (Mtx *dest, Mat4 src)
 
void mtxf_translate_rotate2 (Mat4 dest, Vec3f pos, Vec3s angle)
 
s16 get_animation_length (Animation **, s16)
 
void render_limb_or_add_mtx (Armature *, s16 *, AnimationLimbVector, s32)
 
void render_armature (Armature *, Animation *, s16)
 
s16 render_animated_model (Armature *, Animation **, s16, s16)
 

Macro Definition Documentation

◆ ANIMATION_ADD_POS

#define ANIMATION_ADD_POS ( x,
y,
z )   ANIMATION_RENDER_MODEL_AT((u32) NULL, x, y, z)

use RENDER_MODEL_OR_ADD_POS

◆ ANIMATION_DISABLE_AUTOMATIC_POP

#define ANIMATION_DISABLE_AUTOMATIC_POP   SIMPLE_ANIMATION_INSTRUCTION(DISABLE_AUTOMATIC_POP_MATRIX)

◆ ANIMATION_POP_MATRIX

#define ANIMATION_POP_MATRIX   SIMPLE_ANIMATION_INSTRUCTION(POP_MATRIX)

◆ ANIMATION_RENDER_MODEL

#define ANIMATION_RENDER_MODEL ( model)    ANIMATION_RENDER_MODEL_AT(model, 0x00000000, 0x00000000, 0x00000000)

use RENDER_MODEL_OR_ADD_POS

◆ ANIMATION_RENDER_MODEL_AT

#define ANIMATION_RENDER_MODEL_AT ( model,
x,
y,
z )   RENDER_MODEL_OR_ADD_POS, 0x00000007, 0x00000000, (u32) model, x, y, z

the pos is relative to the previous RENDER_MODEL_OR_ADD_POS if ANIMATION_DISABLE_AUTOMATIC_POP is used

◆ ANIMATION_STOP

#define ANIMATION_STOP   SIMPLE_ANIMATION_INSTRUCTION(STOP_ANIMATION)

◆ SIMPLE_ANIMATION_INSTRUCTION

#define SIMPLE_ANIMATION_INSTRUCTION ( x)    x, 0x00000002

Typedef Documentation

◆ AnimationLimbVector

typedef AnimationCycleSpec AnimationLimbVector[3]

the first are the original position and other are animation specification for each "limb" who correspond to each RENDER_MODEL_OR_ADD_POS so ANIMATION_RENDER_MODEL and ANIMATION_ADD_POS

Enumeration Type Documentation

◆ animation_type

Enumerator
RENDER_MODEL_OR_ADD_POS 
DISABLE_AUTOMATIC_POP_MATRIX 
POP_MATRIX 
STOP_ANIMATION 

Function Documentation

◆ convert_to_fixed_point_matrix_animation()

void convert_to_fixed_point_matrix_animation ( Mtx * dest,
Mat4 src )

float-to-integer conversion responsible for PU crashes

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get_animation_length()

s16 get_animation_length ( Animation ** addr,
s16 offset )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mtxf_translate_rotate2()

void mtxf_translate_rotate2 ( Mat4 dest,
Vec3f pos,
Vec3s angle )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_animated_model()

s16 render_animated_model ( Armature * virtualArmature,
Animation ** virtualListAnimation,
s16 animationIndex,
s16 timeCycle )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_armature()

void render_armature ( Armature * animation,
Animation * arg1,
s16 timeCycle )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_limb_or_add_mtx()

void render_limb_or_add_mtx ( Armature * arg0,
s16 * arg1,
AnimationLimbVector arg2,
s32 timeCycle )
Here is the call graph for this function:
Here is the caller graph for this function: