Mario Kart 64
Loading...
Searching...
No Matches
actors.c File Reference
#include <ultra64.h>
#include <macros.h>
#include <PR/os.h>
#include <mk64.h>
#include <sounds.h>
#include <common_structs.h>
#include <actor_types.h>
#include <defines.h>
#include <PR/gbi.h>
#include "code_800029B0.h"
#include "main.h"
#include "math_util.h"
#include "memory.h"
#include "actors_extended.h"
#include "actors.h"
#include "waypoints.h"
#include "code_80005FD0.h"
#include "update_objects.h"
#include "effects.h"
#include "collision.h"
#include "audio/external.h"
#include <assets/common_data.h>
#include "courses/all_course_data.h"
#include "data/other_textures.h"
#include "actors/cow/render.inc.c"
#include "actors/yoshi_egg/update.inc.c"
#include "actors/kiwano_fruit/update.inc.c"
#include "actors/paddle_boat/update.inc.c"
#include "actors/train/update.inc.c"
#include "actors/piranha_plant/update.inc.c"
#include "actors/piranha_plant/render.inc.c"
#include "actors/trees/render.inc.c"
#include "actors/kiwano_fruit/render.inc.c"
#include "actors/green_shell/render.inc.c"
#include "actors/blue_and_red_shells/render.inc.c"
#include "actors/banana/render.inc.c"
#include "actors/wario_sign/update.inc.c"
#include "actors/railroad_crossing/update.inc.c"
#include "actors/mario_sign/update.inc.c"
#include "actors/paddle_boat/render.inc.c"
#include "actors/box_truck/render.inc.c"
#include "actors/school_bus/render.inc.c"
#include "actors/car/render.inc.c"
#include "actors/tanker_truck/render.inc.c"
#include "actors/train/render.inc.c"
#include "actors/falling_rock/render.inc.c"
#include "actors/falling_rock/update.inc.c"
#include "actors/fake_item_box/update.inc.c"
#include "actors/item_box/update.inc.c"
#include "actors/fake_item_box/render.inc.c"
#include "actors/item_box/render.inc.c"
#include "actors/wario_sign/render.inc.c"
#include "actors/yoshi_egg/render.inc.c"
#include "actors/mario_sign/render.inc.c"
#include "actors/railroad_crossing/render.inc.c"
#include "actors/palm_tree/render.inc.c"

Data Structures

struct  test
 

Functions

void cleanup_red_and_green_shells (struct ShellActor *shell)
 
void actor_init (struct Actor *actor, Vec3f startingPos, Vec3s startingRot, Vec3f startingVelocity, s16 actorType)
 
void actor_not_rendered (Camera *arg0, struct Actor *arg1)
 
void actor_rendered (Camera *arg0, struct Actor *arg1)
 
void func_80297340 (Camera *arg0)
 
UNUSED void func_80297524 (uintptr_t addr, s32 width, s32 height)
 
void func_802976D8 (Vec3s arg0)
 
void func_802976EC (Collision *arg0, Vec3s arg1)
 
void func_80297760 (struct Actor *arg0, Vec3f arg1)
 
void func_802977B0 (Player *arg0)
 
void func_802977E4 (Player *arg0)
 
void init_red_shell_texture (void)
 
UNUSED void func_80297944 (void)
 
void func_8029794C (Vec3f pos, Vec3s rot, f32 scale)
 
void func_802979F8 (struct Actor *arg0, UNUSED f32 arg1)
 
void update_actor_static_plant (struct Actor *arg0)
 
void render_cows (Camera *camera, Mat4 arg1, UNUSED struct Actor *actor)
 
void evaluate_collision_player_palm_trees (Player *player)
 
void evaluate_collision_players_palm_trees (void)
 
void func_80298D10 (void)
 
void render_palm_trees (Camera *camera, Mat4 arg1, UNUSED struct Actor *actor)
 
void render_actor_shell (Camera *camera, Mat4 matrix, struct ShellActor *shell)
 
UNUSED void func_8029ABD4 (f32 *pos, s16 state)
 
void func_8029AC18 (Camera *camera, Mat4 arg1, struct Actor *arg2)
 
UNUSED void func_8029AE14 ()
 
void spawn_piranha_plants (struct ActorSpawnData *spawnData)
 
void spawn_palm_trees (struct ActorSpawnData *spawnData)
 
void spawn_foliage (struct ActorSpawnData *arg0)
 
void spawn_all_item_boxes (struct ActorSpawnData *spawnData)
 
void init_kiwano_fruit (void)
 
void destroy_all_actors (void)
 
void spawn_course_actors (void)
 
void init_actors_and_load_textures (void)
 Loads actor textures, course specific actor textures. Calls to spawn_course_vehicles and place_course_actors.
 
void play_sound_before_despawn (struct Actor *actor)
 
void destroy_actor (struct Actor *actor)
 
s16 try_remove_destructable_item (Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType)
 
s16 add_actor_to_empty_slot (Vec3f pos, Vec3s rot, Vec3f velocity, s16 actorType)
 
UNUSED s16 spawn_actor_at_pos (Vec3f pos, s16 actorType)
 
UNUSED void prototype_actor_spawn_data (Player *player, uintptr_t arg1)
 
bool query_and_resolve_collision_player_actor (Player *player, Vec3f pos, f32 minDist, f32 dist, f32 arg4)
 
bool collision_mario_sign (Player *player, struct Actor *marioRacewaySign)
 
bool collision_piranha_plant (Player *player, struct PiranhaPlant *plant)
 
bool collision_yoshi_egg (Player *player, struct YoshiValleyEgg *egg)
 
bool collision_tree (Player *player, struct Actor *actor)
 
bool query_collision_player_vs_actor_item (Player *arg0, struct Actor *arg1)
 
bool query_collision_actor_vs_actor (struct Actor *arg0, struct Actor *arg1)
 
void destroy_destructable_actor (struct Actor *actor)
 
void play_sound_on_destructible_actor_collision (struct Actor *arg0, struct Actor *arg1)
 
void evaluate_actor_collision_between_two_destructible_actors (struct Actor *actor1, struct Actor *actor2)
 
void evaluate_collision_between_player_actor (Player *player, struct Actor *actor)
 
void evaluate_collision_for_players_and_actors (void)
 
void evaluate_collision_for_destructible_actors (void)
 
void func_802A1064 (struct FakeItemBox *fake_item_box)
 
void init_actor_hot_air_balloon_item_box (f32 x, f32 y, f32 z)
 
void render_item_boxes (struct UnkStruct_800DC5EC *arg0)
 
void render_course_actors (struct UnkStruct_800DC5EC *arg0)
 
void update_course_actors (void)
 

Variables

u8D_802BA050
 
u8D_802BA054
 
u8D_802BA058
 
struct ActorgActorHotAirBalloonItemBox
 
s8 gTLUTRedShell [512]
 
u16 D_802BA260
 
UNUSED s16 D_802B8808 [] = { 0x0014, 0x0028, 0x0000, 0x0000 }
 
UNUSED s16 D_802B8810 []
 

Function Documentation

◆ actor_init()

void actor_init ( struct Actor * actor,
Vec3f startingPos,
Vec3s startingRot,
Vec3f startingVelocity,
s16 actorType )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ actor_not_rendered()

void actor_not_rendered ( Camera * arg0,
struct Actor * arg1 )
Here is the caller graph for this function:

◆ actor_rendered()

void actor_rendered ( Camera * arg0,
struct Actor * arg1 )
Here is the caller graph for this function:

◆ add_actor_to_empty_slot()

s16 add_actor_to_empty_slot ( Vec3f pos,
Vec3s rot,
Vec3f velocity,
s16 actorType )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ cleanup_red_and_green_shells()

void cleanup_red_and_green_shells ( struct ShellActor * shell)

Once the amount of spawned player red and green shell count has reached 21 or higher the game will cleanup any dead red or green shells by deleting their actors.

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

◆ collision_mario_sign()

bool collision_mario_sign ( Player * player,
struct Actor * marioRacewaySign )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collision_piranha_plant()

bool collision_piranha_plant ( Player * player,
struct PiranhaPlant * plant )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collision_tree()

bool collision_tree ( Player * player,
struct Actor * actor )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ collision_yoshi_egg()

bool collision_yoshi_egg ( Player * player,
struct YoshiValleyEgg * egg )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy_actor()

void destroy_actor ( struct Actor * actor)

This func likely plays an audio track based on flag Next, it destroys the actor via zeroing its flags and type. Note that the data from its other members still exist. Actors are expected to set members such as pos and rot data if used. Not doing so could result in the use of expired data.

This method does not require modification to gActorList directly. No popping members of gActorList. The list is always the size of ACTOR_LIST_SIZE. Actors are members of gActorList by definition.

Parameters
Actorto destroy
Here is the call graph for this function:
Here is the caller graph for this function:

◆ destroy_all_actors()

void destroy_all_actors ( void )

Destroys actors via zeroing some of the member data Key word some. When spawning a new actor, members such as pos and rot should be set to prevent using expired data

Here is the caller graph for this function:

◆ destroy_destructable_actor()

void destroy_destructable_actor ( struct Actor * actor)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate_actor_collision_between_two_destructible_actors()

void evaluate_actor_collision_between_two_destructible_actors ( struct Actor * actor1,
struct Actor * actor2 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate_collision_between_player_actor()

void evaluate_collision_between_player_actor ( Player * player,
struct Actor * actor )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ evaluate_collision_for_destructible_actors()

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

◆ evaluate_collision_for_players_and_actors()

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

◆ evaluate_collision_player_palm_trees()

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

◆ evaluate_collision_players_palm_trees()

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

◆ func_80297340()

void func_80297340 ( Camera * arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80297524()

UNUSED void func_80297524 ( uintptr_t addr,
s32 width,
s32 height )

◆ func_802976D8()

void func_802976D8 ( Vec3s arg0)
Here is the caller graph for this function:

◆ func_802976EC()

void func_802976EC ( Collision * arg0,
Vec3s arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80297760()

void func_80297760 ( struct Actor * arg0,
Vec3f arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802977B0()

void func_802977B0 ( Player * arg0)
Here is the caller graph for this function:

◆ func_802977E4()

void func_802977E4 ( Player * arg0)
Here is the caller graph for this function:

◆ func_80297944()

UNUSED void func_80297944 ( void )

◆ func_8029794C()

void func_8029794C ( Vec3f pos,
Vec3s rot,
f32 scale )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_802979F8()

void func_802979F8 ( struct Actor * arg0,
UNUSED f32 arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_80298D10()

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

◆ func_8029ABD4()

UNUSED void func_8029ABD4 ( f32 * pos,
s16 state )
Here is the call graph for this function:

◆ func_8029AC18()

void func_8029AC18 ( Camera * camera,
Mat4 arg1,
struct Actor * arg2 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ func_8029AE14()

UNUSED void func_8029AE14 ( )

◆ func_802A1064()

void func_802A1064 ( struct FakeItemBox * fake_item_box)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_actor_hot_air_balloon_item_box()

void init_actor_hot_air_balloon_item_box ( f32 x,
f32 y,
f32 z )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ init_actors_and_load_textures()

void init_actors_and_load_textures ( void )

Loads actor textures, course specific actor textures. Calls to spawn_course_vehicles and place_course_actors.

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

◆ init_kiwano_fruit()

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

◆ init_red_shell_texture()

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

◆ play_sound_before_despawn()

void play_sound_before_despawn ( struct Actor * actor)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ play_sound_on_destructible_actor_collision()

void play_sound_on_destructible_actor_collision ( struct Actor * arg0,
struct Actor * arg1 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ prototype_actor_spawn_data()

UNUSED void prototype_actor_spawn_data ( Player * player,
uintptr_t arg1 )
Here is the call graph for this function:

◆ query_and_resolve_collision_player_actor()

bool query_and_resolve_collision_player_actor ( Player * player,
Vec3f pos,
f32 minDist,
f32 dist,
f32 arg4 )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ query_collision_actor_vs_actor()

bool query_collision_actor_vs_actor ( struct Actor * arg0,
struct Actor * arg1 )
Here is the caller graph for this function:

◆ query_collision_player_vs_actor_item()

bool query_collision_player_vs_actor_item ( Player * arg0,
struct Actor * arg1 )
Here is the caller graph for this function:

◆ render_actor_shell()

void render_actor_shell ( Camera * camera,
Mat4 matrix,
struct ShellActor * shell )
Todo
Is this making the shell spin?
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_course_actors()

void render_course_actors ( struct UnkStruct_800DC5EC * arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_cows()

void render_cows ( Camera * camera,
Mat4 arg1,
UNUSED struct Actor * actor )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_item_boxes()

void render_item_boxes ( struct UnkStruct_800DC5EC * arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ render_palm_trees()

void render_palm_trees ( Camera * camera,
Mat4 arg1,
UNUSED struct Actor * actor )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn_actor_at_pos()

UNUSED s16 spawn_actor_at_pos ( Vec3f pos,
s16 actorType )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn_all_item_boxes()

void spawn_all_item_boxes ( struct ActorSpawnData * spawnData)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn_course_actors()

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

◆ spawn_foliage()

void spawn_foliage ( struct ActorSpawnData * arg0)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn_palm_trees()

void spawn_palm_trees ( struct ActorSpawnData * spawnData)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ spawn_piranha_plants()

void spawn_piranha_plants ( struct ActorSpawnData * spawnData)
Here is the call graph for this function:
Here is the caller graph for this function:

◆ try_remove_destructable_item()

s16 try_remove_destructable_item ( Vec3f pos,
Vec3s rot,
Vec3f velocity,
s16 actorType )
Here is the call graph for this function:
Here is the caller graph for this function:

◆ update_actor_static_plant()

void update_actor_static_plant ( struct Actor * arg0)
Here is the caller graph for this function:

◆ update_course_actors()

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

Variable Documentation

◆ D_802B8808

UNUSED s16 D_802B8808[] = { 0x0014, 0x0028, 0x0000, 0x0000 }

◆ D_802B8810

UNUSED s16 D_802B8810[]
Initial value:
= { 0x0fc0, 0x0000, 0xffff, 0xffff, 0x0014, 0x0000, 0x0000, 0x0000, 0x0fc0, 0x0fc0,
0xffff, 0xffff, 0xffec, 0x0000, 0x0000, 0x0000, 0x0000, 0x0fc0, 0xffff, 0xffff,
0xffec, 0x0028, 0x0000, 0x0000, 0x0000, 0x0000, 0xffff, 0xffff }

◆ D_802BA050

u8* D_802BA050

◆ D_802BA054

u8* D_802BA054

◆ D_802BA058

u8* D_802BA058

◆ D_802BA260

u16 D_802BA260

◆ gActorHotAirBalloonItemBox

struct Actor* gActorHotAirBalloonItemBox

◆ gTLUTRedShell

s8 gTLUTRedShell[512]