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

Go to the source code of this file.

Macros

#define SOME_TEXTURE_POINTER_MATH   0x800
 

Functions

void func_8001F980 (s32 *, s32 *)
 
void func_8001F9E4 (Player *, Camera *, s8)
 
u16 check_player_camera_collision (Player *, Camera *, f32, f32)
 
u16 func_8001FD78 (Player *, f32, f32, f32)
 
void init_render_player (Player *, Camera *, s8, s8)
 one of his function is to put the frame to load in to a list to load it to be only applied for the next frame
 
void load_kart_texture_and_render_kart_particle_on_screen_one (void)
 
void load_kart_texture_and_render_kart_particle_on_screen_two (void)
 
void load_kart_texture_and_render_kart_particle_on_screen_three (void)
 
void load_kart_texture_and_render_kart_particle_on_screen_four (void)
 
void try_rendering_player (Player *, s8, s8)
 
void render_players_on_screen_one (void)
 
void render_players_on_screen_two (void)
 
void render_players_on_screen_three (void)
 
void render_players_on_screen_four (void)
 
void func_80021B0C (void)
 
void func_80021C78 (void)
 
void func_80021D40 (void)
 
void func_80021DA8 (void)
 
void mtxf_translate_rotate (Mat4, Vec3f, Vec3s)
 
void func_80021F50 (Mat4, Vec3f)
 
void failed_fixed_point_matrix_conversion (Mtx *, Mat4)
 
void convert_to_fixed_point_matrix (Mtx *, Mat4)
 
bool adjust_angle (s16 *, s16, s16)
 
void move_s32_towards (s32 *, s32, f32)
 
void move_f32_towards (f32 *, f32, f32)
 
void move_s16_towards (s16 *, s16, f32)
 
void move_u16_towards (u16 *, s16, f32)
 
void func_80022744 (void)
 
void func_8002276C (void)
 
void func_80022A98 (Player *, s8)
 
void func_80022B50 (Player *, s8)
 
void func_80022BC4 (Player *, s8)
 
void func_80022CA8 (Player *, s8, s8, s8)
 
void func_80022D60 (Player *, s8, s8, s8)
 
void func_80022DB4 (Player *, s8)
 
void func_80022E84 (Player *, s8, s8, s8)
 
void change_player_color_effect_rgb (Player *, s8, s32, f32)
 
void change_player_color_effect_cmy (Player *, s8, s32, f32)
 
bool is_player_under_light_luigi_raceway (Player *, s8)
 
void render_light_environment_on_player (Player *, s8)
 
void func_800235AC (Player *, s8)
 
void func_80023BF0 (Player *, s8, s8, s8)
 
void render_player_shadow (Player *, s8, s8)
 
void render_player_shadow_credits (Player *, s8, s8)
 
void render_kart (Player *, s8, s8, s8)
 
void render_ghost (Player *, s8, s8, s8)
 
void func_80025DE8 (Player *, s8, s8, s8)
 
void render_player_ice_reflection (Player *, s8, s8, s8)
 
void render_player (Player *, s8, s8)
 
void func_80026A48 (Player *, s8)
 
void update_wheel_palette (Player *, s8, s8, s8)
 
void update_player_kart_hop (Player *)
 
void func_8002701C (void)
 
void func_80027024 (s32, s32, s32)
 

Variables

struct_D_802F1F80gPlayerPalette
 
s32 D_80164A28
 
s16 gPlayersToRenderPlayerId []
 
s16 D_80164ABE []
 
s16 gPlayersToRenderScreenId []
 
PlayergPlayersToRenderPlayer []
 
s16 gMatrixEffectCount
 
u16 gPlayerRedEffect []
 
u16 gPlayerGreenEffect []
 
u16 gPlayerBlueEffect []
 
u16 gPlayerCyanEffect []
 
u16 gPlayerMagentaEffect []
 
u16 gPlayerYellowEffect []
 
s32 D_80164B80 []
 
s32 gPlayerStarEffectStartTime []
 
s32 gPlayersToRenderCount
 
void * D_800DDB5C []
 
Vtx * gPlayerVtx []
 
f32 gCharacterSize []
 
s32 D_800DDE74 []
 
Vtx D_800E51D0 []
 
Vtx D_800E5210 []
 
f64 D_800ED680
 
f64 D_800ED688
 
f32 D_800ED6A8
 
Vtx gPlayerOneVtx []
 
Vtx gPlayerTwoVtx []
 
Vtx gPlayerThreeVtx []
 
Vtx gPlayerFourVtx []
 
Vtx gPlayerFiveVtx []
 
Vtx gPlayerSixVtx []
 
Vtx gPlayerSevenVtx []
 
Vtx gPlayerEightVtx []
 
u32 gKartMarioWheels0 []
 
u32 gKartMarioWheels1 []
 
u32 gKartLuigiWheels0 []
 
u32 gKartLuigiWheels1 []
 
u32 gKartBowserWheels0 []
 
u32 gKartBowserWheels1 []
 
u32 gKartToadWheels0 []
 
u32 gKartToadWheels1 []
 
u32 gKartYoshiWheels0 []
 
u32 gKartYoshiWheels1 []
 
u32 gKartDKWheels0 []
 
u32 gKartDKWheels1 []
 
u32 gKartPeachWheels0 []
 
u32 gKartPeachWheels1 []
 
u32 gKartWarioWheels0 []
 
u32 gKartWarioWheels1 []
 
s16 D_80165020 [40]
 
Vec3f gPlayerLastVelocity [8]
 
s16 gLastAnimFrameSelector [4][8]
 
s16 gLastAnimGroupSelector [4][8]
 
s16 D_80165150 [4][8]
 
s16 D_80165190 [4][8]
 
s16 D_801651D0 [4][8]
 

Macro Definition Documentation

◆ SOME_TEXTURE_POINTER_MATH

#define SOME_TEXTURE_POINTER_MATH   0x800

Function Documentation

◆ adjust_angle()

bool adjust_angle ( s16 * angle,
s16 targetAngle,
s16 step )
Here is the caller graph for this function:

◆ change_player_color_effect_cmy()

void change_player_color_effect_cmy ( Player * ,
s8 ,
s32 ,
f32  )

◆ change_player_color_effect_rgb()

void change_player_color_effect_rgb ( Player * ,
s8 ,
s32 ,
f32  )

◆ check_player_camera_collision()

u16 check_player_camera_collision ( Player * player,
Camera * camera,
f32 arg2,
f32 arg3 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ convert_to_fixed_point_matrix()

void convert_to_fixed_point_matrix ( Mtx * dest,
Mat4 src )

Takes a floating-point matrix and converts it to an s15.16 internal matrix. Each Mtx entry is a size of s32 that holds two values. The first 16 entries hold only the integer values and the second 16 entries hold only the decimal (fractional) parts. In simpler words, the integer and decimal gets split up and stored in their own section. Mtx is setup this way due to hardware restrictions of the n64 or as an optimization.

Parameters
MtxA new internal fixed-point matrix.
Mat4An array of f32 Mat4 to Mtx explanation: https://blarg.ca/2020/10/11/fixed-point-math.
Here is the call graph for this function:
Here is the caller graph for this function:

◆ failed_fixed_point_matrix_conversion()

void failed_fixed_point_matrix_conversion ( Mtx * dest,
Mat4 src )

This function writes a fixed-point value to each Mtx entry. This is not how the Mtx struct works. The first half of Mtx only holds s16 whole numbers and the second half holds the s16 decimal (fractional) parts. See convert_to_fixed_point_matrix() for correct calculations. Note that each Mtx entry is the size of s32. This means each Mtx entry holds two s16 values. The first sixteen entries contain only the integer parts and the second sixteen entries hold only the decimal (fractional) parts.

◆ func_8001F980()

void func_8001F980 ( s32 * arg0,
s32 * arg1 )
Here is the caller graph for this function:

◆ func_8001F9E4()

void func_8001F9E4 ( Player * player,
Camera * camera,
s8 screenId )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_8001FD78()

u16 func_8001FD78 ( Player * ,
f32 ,
f32 ,
f32  )

◆ func_80021B0C()

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

◆ func_80021C78()

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

◆ func_80021D40()

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

◆ func_80021DA8()

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

◆ func_80021F50()

void func_80021F50 ( Mat4 arg0,
Vec3f arg1 )

◆ func_80022744()

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

◆ func_8002276C()

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

◆ func_80022A98()

void func_80022A98 ( Player * player,
s8 arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80022B50()

void func_80022B50 ( Player * ,
s8  )

◆ func_80022BC4()

void func_80022BC4 ( Player * ,
s8  )

◆ func_80022CA8()

void func_80022CA8 ( Player * ,
s8 ,
s8 ,
s8  )

◆ func_80022D60()

void func_80022D60 ( Player * ,
s8 ,
s8 ,
s8  )

◆ func_80022DB4()

void func_80022DB4 ( Player * ,
s8  )

◆ func_80022E84()

void func_80022E84 ( Player * ,
s8 ,
s8 ,
s8  )

◆ func_800235AC()

void func_800235AC ( Player * player,
s8 arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80023BF0()

void func_80023BF0 ( Player * player,
s8 playerId,
s8 screenId,
s8 arg3 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80025DE8()

void func_80025DE8 ( Player * player,
s8 playerId,
s8 screenId,
s8 flipOffset )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80026A48()

void func_80026A48 ( Player * player,
s8 arg1 )
Warning
This condition prevents an array overflow.
Here is the caller graph for this function:

◆ func_8002701C()

void func_8002701C ( void )

◆ func_80027024()

void func_80027024 ( s32 ,
s32 ,
s32  )

◆ init_render_player()

void init_render_player ( Player * player,
Camera * camera,
s8 playerId,
s8 screenId )

one of his function is to put the frame to load in to a list to load it to be only applied for the next frame

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

◆ is_player_under_light_luigi_raceway()

bool is_player_under_light_luigi_raceway ( Player * player,
s8 arg1 )

Activates in the tunnel to shade the player a bit darker Sort of an atmospheric effect.

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

◆ load_kart_texture_and_render_kart_particle_on_screen_four()

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

◆ load_kart_texture_and_render_kart_particle_on_screen_one()

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

◆ load_kart_texture_and_render_kart_particle_on_screen_three()

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

◆ load_kart_texture_and_render_kart_particle_on_screen_two()

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

◆ move_f32_towards()

void move_f32_towards ( f32 * startingValue,
f32 targetValue,
f32 somePercent )

Function: move_f32_towards

Parameters: f32 *startingValue - Pointer to the float that will be modified f32 targetValue - Float value to move startingValue towards f32 somePercent - The percent of the difference between startingValue and targetValue to actually move

Moves a given startingValue the given somePercent towards the targetValue

f32 *thing = 2500; move_f32_towards(thing, 500, 0.75f); thing now has a value of 1000

If after the move startingValue is inside of the range [-0.001, 0.001], force it to exactly 0.0f

This is probably a precision thing. The scaling with somePercent likely can't hit exactly 0 with any reliability, so they force it to 0 if you're in a small range around it. Why they only do this for 0 is anyone's guess though

Here is the caller graph for this function:

◆ move_s16_towards()

void move_s16_towards ( s16 * startingValue,
s16 targetValue,
f32 somePercent )
Here is the caller graph for this function:

◆ move_s32_towards()

void move_s32_towards ( s32 * startingValue,
s32 targetValue,
f32 somePercent )
Here is the caller graph for this function:

◆ move_u16_towards()

void move_u16_towards ( u16 * startingValue,
s16 targetValue,
f32 somePercent )
Here is the caller graph for this function:

◆ mtxf_translate_rotate()

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

◆ render_ghost()

void render_ghost ( Player * player,
s8 playerId,
s8 screenId,
s8 flipOffset )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_kart()

void render_kart ( Player * player,
s8 playerId,
s8 screenId,
s8 flipOffset )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_light_environment_on_player()

void render_light_environment_on_player ( Player * player,
s8 arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_player()

void render_player ( Player * player,
s8 playerId,
s8 screenId )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_player_ice_reflection()

void render_player_ice_reflection ( Player * player,
s8 playerId,
s8 screenId,
s8 flipOffset )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_player_shadow()

void render_player_shadow ( Player * player,
s8 playerId,
s8 screenId )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_player_shadow_credits()

void render_player_shadow_credits ( Player * player,
s8 playerId,
s8 arg2 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_players_on_screen_four()

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

◆ render_players_on_screen_one()

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

◆ render_players_on_screen_three()

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

◆ render_players_on_screen_two()

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

◆ try_rendering_player()

void try_rendering_player ( Player * player,
s8 playerId,
s8 arg2 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_player_kart_hop()

void update_player_kart_hop ( Player * player)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_wheel_palette()

void update_wheel_palette ( Player * player,
s8 playerId,
s8 screenId,
s8 arg3 )
Here is the call graph for this function:
Here is the caller graph for this function:

Variable Documentation

◆ D_800DDB5C

void* D_800DDB5C[]
extern

◆ D_800DDE74

s32 D_800DDE74[]
extern

◆ D_800E51D0

Vtx D_800E51D0[]
extern

◆ D_800E5210

Vtx D_800E5210[]
extern

◆ D_800ED680

f64 D_800ED680
extern

◆ D_800ED688

f64 D_800ED688
extern

◆ D_800ED6A8

f32 D_800ED6A8
extern

◆ D_80164A28

s32 D_80164A28
extern

◆ D_80164ABE

s16 D_80164ABE[]
extern

◆ D_80164B80

s32 D_80164B80[]
extern

◆ D_80165020

s16 D_80165020[40]
extern

◆ D_80165150

s16 D_80165150[4][8]
extern

◆ D_80165190

s16 D_80165190[4][8]
extern

◆ D_801651D0

s16 D_801651D0[4][8]
extern

◆ gCharacterSize

f32 gCharacterSize[]
extern

◆ gKartBowserWheels0

u32 gKartBowserWheels0[]
extern

◆ gKartBowserWheels1

u32 gKartBowserWheels1[]
extern

◆ gKartDKWheels0

u32 gKartDKWheels0[]
extern

◆ gKartDKWheels1

u32 gKartDKWheels1[]
extern

◆ gKartLuigiWheels0

u32 gKartLuigiWheels0[]
extern

◆ gKartLuigiWheels1

u32 gKartLuigiWheels1[]
extern

◆ gKartMarioWheels0

u32 gKartMarioWheels0[]
extern

◆ gKartMarioWheels1

u32 gKartMarioWheels1[]
extern

◆ gKartPeachWheels0

u32 gKartPeachWheels0[]
extern

◆ gKartPeachWheels1

u32 gKartPeachWheels1[]
extern

◆ gKartToadWheels0

u32 gKartToadWheels0[]
extern

◆ gKartToadWheels1

u32 gKartToadWheels1[]
extern

◆ gKartWarioWheels0

u32 gKartWarioWheels0[]
extern

◆ gKartWarioWheels1

u32 gKartWarioWheels1[]
extern

◆ gKartYoshiWheels0

u32 gKartYoshiWheels0[]
extern

◆ gKartYoshiWheels1

u32 gKartYoshiWheels1[]
extern

◆ gLastAnimFrameSelector

s16 gLastAnimFrameSelector[4][8]
extern

◆ gLastAnimGroupSelector

s16 gLastAnimGroupSelector[4][8]
extern

◆ gMatrixEffectCount

s16 gMatrixEffectCount
extern

◆ gPlayerBlueEffect

u16 gPlayerBlueEffect[]
extern

◆ gPlayerCyanEffect

u16 gPlayerCyanEffect[]
extern

◆ gPlayerEightVtx

Vtx gPlayerEightVtx[]
extern

◆ gPlayerFiveVtx

Vtx gPlayerFiveVtx[]
extern

◆ gPlayerFourVtx

Vtx gPlayerFourVtx[]
extern

◆ gPlayerGreenEffect

u16 gPlayerGreenEffect[]
extern

◆ gPlayerLastVelocity

Vec3f gPlayerLastVelocity[8]
extern

◆ gPlayerMagentaEffect

u16 gPlayerMagentaEffect[]
extern

◆ gPlayerOneVtx

Vtx gPlayerOneVtx[]
extern

◆ gPlayerPalette

struct_D_802F1F80* gPlayerPalette
extern

◆ gPlayerRedEffect

u16 gPlayerRedEffect[]
extern

◆ gPlayerSevenVtx

Vtx gPlayerSevenVtx[]
extern

◆ gPlayerSixVtx

Vtx gPlayerSixVtx[]
extern

◆ gPlayerStarEffectStartTime

s32 gPlayerStarEffectStartTime[]
extern

◆ gPlayersToRenderCount

s32 gPlayersToRenderCount
extern

◆ gPlayersToRenderPlayer

Player* gPlayersToRenderPlayer[]
extern

◆ gPlayersToRenderPlayerId

s16 gPlayersToRenderPlayerId[]
extern

◆ gPlayersToRenderScreenId

s16 gPlayersToRenderScreenId[]
extern

◆ gPlayerThreeVtx

Vtx gPlayerThreeVtx[]
extern

◆ gPlayerTwoVtx

Vtx gPlayerTwoVtx[]
extern

◆ gPlayerVtx

Vtx* gPlayerVtx[]
extern

◆ gPlayerYellowEffect

u16 gPlayerYellowEffect[]
extern