Mario Kart 64
math_util_2.h File Reference
#include "types.h"
#include "common_structs.h"
Include dependency graph for math_util_2.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void operator_or (s32 *, s32)
 
void operator_and_not (s32 *, s32)
 
void operator_xor (s32 *, s32)
 
s32 func_80040E84 (s32 *, s32)
 
s32 func_80040EA4 (s32 *, s32)
 
s32 f32_step_up_towards_alternate (f32 *, f32, f32 *)
 
s32 f32_step_down_towards_alternate (f32 *, f32, f32 *)
 
s32 s32_step_up_towards_alternate (s32 *, s32, s32 *)
 
s32 s32_step_down_towards_alternate (s32 *, s32, s32 *)
 
s32 s16_step_up_towards_alternate (s16 *, s16, s16 *)
 
s32 s16_step_down_towards_alternate (s16 *, s16, s16 *)
 
s32 s32_step_towards (s32 *, s32, s32)
 
s32 is_within_distance_2d (f32, f32, f32, f32, f32)
 
s32 func_80041680 (f32, f32)
 
s32 func_800416AC (f32, f32)
 
void func_80041F54 (s32, s32)
 
void func_80042000 (u16)
 
void func_800420A8 (f32)
 
void func_8004214C (u16, f32)
 
void func_800421FC (s32, s32, f32)
 
void func_800423F0 (Mat4, u16, u16, u16)
 
void func_8004252C (Mat4, u16, u16)
 
void mtxf_mult_first_column (Mat4, f32)
 
void mtxf_mult_second_column (Mat4, f32)
 
void mtxf_mult_third_column (Mat4, f32)
 
void vec3f_rotate (Vec3f, Vec3f, Vec3s)
 
void rsp_set_matrix_diff_translation_scale (Vec3f, Vec3f, f32)
 
void vec3f_copy (Vec3f, Vec3f)
 
s32 f32_step_up_towards (f32 *, f32, f32)
 
s32 f32_step_down_towards (f32 *, f32, f32)
 
s32 s32_step_up_towards (s32 *, s32, s32)
 
s32 s32_step_down_towards (s32 *, s32, s32)
 
s32 s16_step_up_towards (s16 *, s16, s16)
 
s32 u16_step_up_towards (u16 *, u16, u16)
 
s32 s16_step_down_towards (s16 *, s16, s16)
 
s32 u16_step_down_towards (u16 *, s32, s32)
 
s32 s16_step_towards (s16 *, s16, s16)
 
s32 f32_step_towards (f32 *, f32, f32)
 
void func_80041480 (s16 *, s16, s16, s16 *)
 
Vec3fvec3f_set_xyz (Vec3f, f32, f32, f32)
 
Vec3fvec3f_normalize (Vec3f dest)
 
Vec3fvec3f_cross_product (Vec3f, Vec3f, Vec3f)
 
s32 func_80041658 (f32, f32)
 
f32 func_800416D8 (f32, f32, u16)
 
f32 func_80041724 (f32, f32, u16)
 
s32 func_80041770 (f32, f32, f32, f32)
 
u16 func_800417B4 (u16, u16)
 
s32 func_800418AC (f32, f32, Vec3f)
 
s32 func_800418E8 (f32, f32, Vec3f)
 
s32 func_80041924 (Collision *, Vec3f)
 
s32 func_80041980 (Vec3f, Camera *, u16)
 
void func_800419F8 (void)
 
void mtfx_translation_x_y (Mat4, s32, s32)
 
void mtxf_u16_rotate_z (Mat4, u16)
 
void mtxf_scale_x_y (Mat4, f32)
 
void mtxf_rotate_z_scale_x_y (Mat4, u16, f32)
 
void mtxf_translation_x_y_rotate_z_scale_x_y (Mat4, s32, s32, u16, f32)
 arg1 and arg2 are s32's into floats?!? More...
 
void func_80041D24 (void)
 
void func_80041D34 (void)
 
void func_80041EF4 (void)
 
void func_80042330 (s32, s32, u16, f32)
 
void mtxf_set_matrix_transformation (Mat4, Vec3f, Vec3su, f32)
 
void mtxf_set_matrix_scale_transl (Mat4, Vec3f, Vec3f, f32)
 
void mtxf_set_matrix_gObjectList (s32, Mat4)
 Tried to put the definitions in the declares. However, sp3C wants to be at the top. Something may be possible with some padding. Couldn't find a way though. So we get big mess. More...
 
void set_transform_matrix (Mat4, Vec3f, Vec3f, u16, f32)
 
void vec3f_rotate_x_y (Vec3f, Vec3f, Vec3s)
 
void rsp_set_matrix_transformation (Vec3f, Vec3su, f32)
 set the matrix to a transformation matrix More...
 
void rsp_set_matrix_transformation_inverted_x_y_orientation (Vec3f, Vec3su, f32)
 
void rsp_set_matrix_transl_rot_scale (Vec3f, Vec3f, f32)
 
void rsp_set_matrix_gObjectList (s32)
 

Variables

s8 D_801658FE
 

Function Documentation

◆ f32_step_down_towards()

s32 f32_step_down_towards ( f32 value,
f32  target,
f32  step 
)
Here is the caller graph for this function:

◆ f32_step_down_towards_alternate()

s32 f32_step_down_towards_alternate ( f32 value,
f32  target,
f32 step 
)

◆ f32_step_towards()

s32 f32_step_towards ( f32 value,
f32  target,
f32  step 
)
Here is the caller graph for this function:

◆ f32_step_up_towards()

s32 f32_step_up_towards ( f32 value,
f32  target,
f32  step 
)
Here is the caller graph for this function:

◆ f32_step_up_towards_alternate()

s32 f32_step_up_towards_alternate ( f32 value,
f32  target,
f32 step 
)

◆ func_80040E84()

s32 func_80040E84 ( s32 arg0,
s32  arg1 
)

◆ func_80040EA4()

s32 func_80040EA4 ( s32 arg0,
s32  arg1 
)

◆ func_80041480()

void func_80041480 ( s16 arg0,
s16  arg1,
s16  arg2,
s16 arg3 
)
Here is the caller graph for this function:

◆ func_80041658()

s32 func_80041658 ( f32  arg0,
f32  arg1 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041680()

s32 func_80041680 ( f32  arg0,
f32  arg1 
)
Here is the call graph for this function:

◆ func_800416AC()

s32 func_800416AC ( f32  arg0,
f32  arg1 
)
Here is the call graph for this function:

◆ func_800416D8()

f32 func_800416D8 ( f32  arg0,
f32  arg1,
u16  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041724()

f32 func_80041724 ( f32  arg0,
f32  arg1,
u16  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041770()

s32 func_80041770 ( f32  arg0,
f32  arg1,
f32  arg2,
f32  arg3 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800417B4()

u16 func_800417B4 ( u16  angle1,
u16  angle2 
)
Here is the caller graph for this function:

◆ func_800418AC()

s32 func_800418AC ( f32  arg0,
f32  arg1,
Vec3f  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800418E8()

s32 func_800418E8 ( f32  arg0,
f32  arg1,
Vec3f  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041924()

s32 func_80041924 ( Collision arg0,
Vec3f  arg1 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041980()

s32 func_80041980 ( Vec3f  arg0,
Camera arg1,
u16  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800419F8()

void func_800419F8 ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041D24()

void func_80041D24 ( void  )
Here is the caller graph for this function:

◆ func_80041D34()

void func_80041D34 ( void  )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80041EF4()

void func_80041EF4 ( void  )
Here is the caller graph for this function:

◆ func_80041F54()

void func_80041F54 ( s32  x,
s32  y 
)
Here is the call graph for this function:

◆ func_80042000()

void func_80042000 ( u16  angle_z)
Here is the call graph for this function:

◆ func_800420A8()

void func_800420A8 ( f32  scale)
Here is the call graph for this function:

◆ func_8004214C()

void func_8004214C ( u16  angle,
f32  scale 
)
Here is the call graph for this function:

◆ func_800421FC()

void func_800421FC ( s32  x,
s32  y,
f32  scale 
)
Here is the call graph for this function:

◆ func_80042330()

void func_80042330 ( s32  x,
s32  y,
u16  angle,
f32  scale 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_800423F0()

void func_800423F0 ( Mat4  arg0,
u16  arg1,
u16  arg2,
u16  arg3 
)
Here is the call graph for this function:

◆ func_8004252C()

void func_8004252C ( Mat4  arg0,
u16  arg1,
u16  arg2 
)
Here is the call graph for this function:

◆ is_within_distance_2d()

s32 is_within_distance_2d ( f32  x1,
f32  y1,
f32  x2,
f32  y2,
f32  distance 
)

◆ mtfx_translation_x_y()

void mtfx_translation_x_y ( Mat4  arg0,
s32  x,
s32  y 
)
Here is the caller graph for this function:

◆ mtxf_mult_first_column()

void mtxf_mult_first_column ( Mat4  arg0,
f32  arg1 
)

◆ mtxf_mult_second_column()

void mtxf_mult_second_column ( Mat4  arg0,
f32  arg1 
)

◆ mtxf_mult_third_column()

void mtxf_mult_third_column ( Mat4  arg0,
f32  arg1 
)

◆ mtxf_rotate_z_scale_x_y()

void mtxf_rotate_z_scale_x_y ( Mat4  dest,
u16  angle,
f32  scale 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mtxf_scale_x_y()

void mtxf_scale_x_y ( Mat4  dest,
f32  scale 
)
Here is the caller graph for this function:

◆ mtxf_set_matrix_gObjectList()

void mtxf_set_matrix_gObjectList ( s32  objectIndex,
Mat4  transformMatrix 
)

Tried to put the definitions in the declares. However, sp3C wants to be at the top. Something may be possible with some padding. Couldn't find a way though. So we get big mess.

Parameters
arg0
arg1
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mtxf_set_matrix_scale_transl()

void mtxf_set_matrix_scale_transl ( Mat4  transformMatrix,
Vec3f  vec1,
Vec3f  vec2,
f32  scale 
)
Here is the caller graph for this function:

◆ mtxf_set_matrix_transformation()

void mtxf_set_matrix_transformation ( Mat4  transformMatrix,
Vec3f  translationVector,
Vec3su  rotationVector,
f32  scalingFactor 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mtxf_translation_x_y_rotate_z_scale_x_y()

void mtxf_translation_x_y_rotate_z_scale_x_y ( Mat4  dest,
s32  x,
s32  y,
u16  angle,
f32  scale 
)

arg1 and arg2 are s32's into floats?!?

Parameters
dest
x
y
angle
scale
Here is the call graph for this function:
Here is the caller graph for this function:

◆ mtxf_u16_rotate_z()

void mtxf_u16_rotate_z ( Mat4  dest,
u16  angle 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ operator_and_not()

void operator_and_not ( s32 arg0,
s32  arg1 
)

◆ operator_or()

void operator_or ( s32 arg0,
s32  arg1 
)

◆ operator_xor()

void operator_xor ( s32 arg0,
s32  arg1 
)

◆ rsp_set_matrix_diff_translation_scale()

void rsp_set_matrix_diff_translation_scale ( Vec3f  pos1,
Vec3f  pos2,
f32  scale 
)
Here is the call graph for this function:

◆ rsp_set_matrix_gObjectList()

void rsp_set_matrix_gObjectList ( s32  transformIndex)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rsp_set_matrix_transformation()

void rsp_set_matrix_transformation ( Vec3f  translate,
Vec3su  orientation,
f32  scale 
)

set the matrix to a transformation matrix

Parameters
translateor position
orientation
scale
Here is the call graph for this function:

◆ rsp_set_matrix_transformation_inverted_x_y_orientation()

void rsp_set_matrix_transformation_inverted_x_y_orientation ( Vec3f  arg0,
Vec3su  arg1,
f32  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ rsp_set_matrix_transl_rot_scale()

void rsp_set_matrix_transl_rot_scale ( Vec3f  arg0,
Vec3f  arg1,
f32  arg2 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ s16_step_down_towards()

s32 s16_step_down_towards ( s16 value,
s16  target,
s16  step 
)
Here is the caller graph for this function:

◆ s16_step_down_towards_alternate()

s32 s16_step_down_towards_alternate ( s16 value,
s16  target,
s16 step 
)

◆ s16_step_towards()

s32 s16_step_towards ( s16 value,
s16  target,
s16  step 
)
Here is the caller graph for this function:

◆ s16_step_up_towards()

s32 s16_step_up_towards ( s16 value,
s16  target,
s16  step 
)
Here is the caller graph for this function:

◆ s16_step_up_towards_alternate()

s32 s16_step_up_towards_alternate ( s16 value,
s16  target,
s16 step 
)

◆ s32_step_down_towards()

s32 s32_step_down_towards ( s32 value,
s32  target,
s32  step 
)

◆ s32_step_down_towards_alternate()

s32 s32_step_down_towards_alternate ( s32 value,
s32  target,
s32 step 
)

◆ s32_step_towards()

s32 s32_step_towards ( s32 value,
s32  target,
s32  step 
)

◆ s32_step_up_towards()

s32 s32_step_up_towards ( s32 value,
s32  target,
s32  step 
)

◆ s32_step_up_towards_alternate()

s32 s32_step_up_towards_alternate ( s32 value,
s32  target,
s32 step 
)

◆ set_transform_matrix()

void set_transform_matrix ( Mat4  dest,
Vec3f  orientationVector,
Vec3f  positionVector,
u16  rotationAngle,
f32  scaleFactor 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ u16_step_down_towards()

s32 u16_step_down_towards ( u16 value,
s32  target,
s32  step 
)
Here is the caller graph for this function:

◆ u16_step_up_towards()

s32 u16_step_up_towards ( u16 value,
u16  target,
u16  step 
)
Here is the caller graph for this function:

◆ vec3f_copy()

void vec3f_copy ( Vec3f  dest,
Vec3f  arg1 
)
Here is the caller graph for this function:

◆ vec3f_cross_product()

Vec3f* vec3f_cross_product ( Vec3f  dest,
Vec3f  arg1,
Vec3f  arg2 
)
Here is the caller graph for this function:

◆ vec3f_normalize()

Vec3f* vec3f_normalize ( Vec3f  dest)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vec3f_rotate()

void vec3f_rotate ( Vec3f  dest,
Vec3f  pos,
Vec3s  rot 
)
Here is the call graph for this function:

◆ vec3f_rotate_x_y()

void vec3f_rotate_x_y ( Vec3f  dest,
Vec3f  pos,
Vec3s  rot 
)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ vec3f_set_xyz()

Vec3f* vec3f_set_xyz ( Vec3f  arg0,
f32  arg1,
f32  arg2,
f32  arg3 
)
Here is the caller graph for this function:

Variable Documentation

◆ D_801658FE

s8 D_801658FE
extern