Super Mario 64 Source
A Super Mario 64 decompilation, brought to you by a bunch of clever folks.
Typedefs | Functions | Variables
behavior_script.c File Reference
#include <ultra64.h>
#include "sm64.h"
#include "behavior_script.h"
#include "game/memory.h"
#include "graph_node.h"
#include "surface_collision.h"
#include "game/object_helpers.h"
#include "game/object_helpers2.h"
#include "game/mario.h"
#include "game/display.h"
#include "game/obj_behaviors_2.h"
#include "behavior_data.h"
#include "game/object_list_processor.h"

Typedefs

typedef void(* BehaviorCallProc) (void)
 
typedef s32(* BehCommandProc) (void)
 

Functions

static void func_80383B70 (u32 segptr)
 
u16 RandomU16 (void)
 
f32 RandomFloat (void)
 
s32 RandomSign (void)
 
void func_80383D68 (struct Object *object)
 
static void cur_object_stack_push (u32 value)
 
static u32 cur_object_stack_pop (void)
 
static void Unknown80383E44 (void)
 
static s32 beh_cmd_unhide (void)
 
static s32 beh_cmd_graph_clear (void)
 
static s32 beh_cmd_billboard (void)
 
static s32 beh_cmd_graph_node (void)
 
static s32 beh_cmd_obj_load_chill (void)
 
static s32 beh_cmd_obj_spawn (void)
 
static s32 beh_cmd_obj_load_chill_param (void)
 
static s32 beh_cmd_deactivate (void)
 
static s32 beh_cmd_break (void)
 
static s32 beh_cmd_break2 (void)
 
static s32 beh_cmd_call (void)
 
static s32 beh_cmd_return (void)
 
static s32 beh_cmd_delay (void)
 
static s32 beh_cmd_delay_var (void)
 
static s32 beh_cmd_goto (void)
 
static s32 Behavior26 (void)
 
static s32 beh_cmd_begin_repeat (void)
 
static s32 beh_cmd_end_repeat (void)
 
static s32 beh_cmd_end_repeat_nobreak (void)
 
static s32 beh_cmd_begin_loop (void)
 
static s32 beh_cmd_end_loop (void)
 
static s32 beh_cmd_callnative (void)
 
static s32 beh_cmd_obj_set_float (void)
 
static s32 beh_cmd_obj_set_int (void)
 
static s32 Behavior36 (void)
 
static s32 beh_cmd_obj_set_float_rand (void)
 
static s32 beh_cmd_obj_set_int_rand (void)
 
static s32 beh_cmd_obj_set_int_rand_rshift (void)
 
static s32 beh_cmd_obj_add_float_rand (void)
 
static s32 beh_cmd_obj_add_int_rand_rshift (void)
 
static s32 beh_cmd_obj_add_float (void)
 
static s32 beh_cmd_obj_add_int (void)
 
static s32 beh_cmd_obj_or_int (void)
 
static s32 beh_cmd_obj_bit_clear_int (void)
 
static s32 beh_cmd_obj_set_int32 (void)
 
static s32 beh_cmd_obj_animate (void)
 
static s32 beh_cmd_obj_drop_floor (void)
 
static s32 Behavior18 (void)
 
static s32 Behavior1A (void)
 
static s32 Behavior19 (void)
 
static s32 beh_cmd_obj_sum_float (void)
 
static s32 beh_cmd_obj_sum_int (void)
 
static s32 beh_cmd_set_hitbox (void)
 
static s32 beh_cmd_obj_set_float2 (void)
 
static s32 beh_cmd_collision_sphere (void)
 
static s32 Behavior24 (void)
 
static s32 beh_cmd_begin (void)
 
static void Unknown8038556C (s32 lastIndex)
 
static s32 beh_cmd_collision_data (void)
 
static s32 beh_cmd_obj_set_pos (void)
 
static s32 beh_cmd_interact_type (void)
 
static s32 Behavior31 (void)
 
static s32 beh_cmd_scale (void)
 
static s32 beh_cmd_obj_set_gravity (void)
 
static s32 beh_cmd_obj_bit_clear_int32 (void)
 
static s32 beh_cmd_spawn_addr (void)
 
static s32 beh_cmd_text_anim_rate (void)
 
void stub_80385BF0 (void)
 
void cur_object_exec_behavior (void)
 

Variables

static u16 gRandomSeed16
 
static BehCommandProc BehaviorJumpTable []
 

Typedef Documentation

◆ BehaviorCallProc

typedef void(* BehaviorCallProc) (void)

◆ BehCommandProc

typedef s32(* BehCommandProc) (void)

Function Documentation

◆ beh_cmd_begin()

static s32 beh_cmd_begin ( void  )
static

◆ beh_cmd_begin_loop()

static s32 beh_cmd_begin_loop ( void  )
static

◆ beh_cmd_begin_repeat()

static s32 beh_cmd_begin_repeat ( void  )
static

◆ beh_cmd_billboard()

static s32 beh_cmd_billboard ( void  )
static

◆ beh_cmd_break()

static s32 beh_cmd_break ( void  )
static

◆ beh_cmd_break2()

static s32 beh_cmd_break2 ( void  )
static

◆ beh_cmd_call()

static s32 beh_cmd_call ( void  )
static

◆ beh_cmd_callnative()

static s32 beh_cmd_callnative ( void  )
static

◆ beh_cmd_collision_data()

static s32 beh_cmd_collision_data ( void  )
static

◆ beh_cmd_collision_sphere()

static s32 beh_cmd_collision_sphere ( void  )
static

◆ beh_cmd_deactivate()

static s32 beh_cmd_deactivate ( void  )
static

◆ beh_cmd_delay()

static s32 beh_cmd_delay ( void  )
static

◆ beh_cmd_delay_var()

static s32 beh_cmd_delay_var ( void  )
static

◆ beh_cmd_end_loop()

static s32 beh_cmd_end_loop ( void  )
static

◆ beh_cmd_end_repeat()

static s32 beh_cmd_end_repeat ( void  )
static

◆ beh_cmd_end_repeat_nobreak()

static s32 beh_cmd_end_repeat_nobreak ( void  )
static

◆ beh_cmd_goto()

static s32 beh_cmd_goto ( void  )
static

◆ beh_cmd_graph_clear()

static s32 beh_cmd_graph_clear ( void  )
static

◆ beh_cmd_graph_node()

static s32 beh_cmd_graph_node ( void  )
static

◆ beh_cmd_interact_type()

static s32 beh_cmd_interact_type ( void  )
static

◆ beh_cmd_obj_add_float()

static s32 beh_cmd_obj_add_float ( void  )
static

◆ beh_cmd_obj_add_float_rand()

static s32 beh_cmd_obj_add_float_rand ( void  )
static

◆ beh_cmd_obj_add_int()

static s32 beh_cmd_obj_add_int ( void  )
static

◆ beh_cmd_obj_add_int_rand_rshift()

static s32 beh_cmd_obj_add_int_rand_rshift ( void  )
static

◆ beh_cmd_obj_animate()

static s32 beh_cmd_obj_animate ( void  )
static

◆ beh_cmd_obj_bit_clear_int()

static s32 beh_cmd_obj_bit_clear_int ( void  )
static

◆ beh_cmd_obj_bit_clear_int32()

static s32 beh_cmd_obj_bit_clear_int32 ( void  )
static

◆ beh_cmd_obj_drop_floor()

static s32 beh_cmd_obj_drop_floor ( void  )
static

◆ beh_cmd_obj_load_chill()

static s32 beh_cmd_obj_load_chill ( void  )
static

◆ beh_cmd_obj_load_chill_param()

static s32 beh_cmd_obj_load_chill_param ( void  )
static

◆ beh_cmd_obj_or_int()

static s32 beh_cmd_obj_or_int ( void  )
static

◆ beh_cmd_obj_set_float()

static s32 beh_cmd_obj_set_float ( void  )
static

◆ beh_cmd_obj_set_float2()

static s32 beh_cmd_obj_set_float2 ( void  )
static

◆ beh_cmd_obj_set_float_rand()

static s32 beh_cmd_obj_set_float_rand ( void  )
static

◆ beh_cmd_obj_set_gravity()

static s32 beh_cmd_obj_set_gravity ( void  )
static

◆ beh_cmd_obj_set_int()

static s32 beh_cmd_obj_set_int ( void  )
static

◆ beh_cmd_obj_set_int32()

static s32 beh_cmd_obj_set_int32 ( void  )
static

◆ beh_cmd_obj_set_int_rand()

static s32 beh_cmd_obj_set_int_rand ( void  )
static

◆ beh_cmd_obj_set_int_rand_rshift()

static s32 beh_cmd_obj_set_int_rand_rshift ( void  )
static

◆ beh_cmd_obj_set_pos()

static s32 beh_cmd_obj_set_pos ( void  )
static

◆ beh_cmd_obj_spawn()

static s32 beh_cmd_obj_spawn ( void  )
static

◆ beh_cmd_obj_sum_float()

static s32 beh_cmd_obj_sum_float ( void  )
static

◆ beh_cmd_obj_sum_int()

static s32 beh_cmd_obj_sum_int ( void  )
static

◆ beh_cmd_return()

static s32 beh_cmd_return ( void  )
static

◆ beh_cmd_scale()

static s32 beh_cmd_scale ( void  )
static

◆ beh_cmd_set_hitbox()

static s32 beh_cmd_set_hitbox ( void  )
static

◆ beh_cmd_spawn_addr()

static s32 beh_cmd_spawn_addr ( void  )
static

◆ beh_cmd_text_anim_rate()

static s32 beh_cmd_text_anim_rate ( void  )
static

◆ beh_cmd_unhide()

static s32 beh_cmd_unhide ( void  )
static

◆ Behavior18()

static s32 Behavior18 ( void  )
static

◆ Behavior19()

static s32 Behavior19 ( void  )
static

◆ Behavior1A()

static s32 Behavior1A ( void  )
static

◆ Behavior24()

static s32 Behavior24 ( void  )
static

◆ Behavior26()

static s32 Behavior26 ( void  )
static

◆ Behavior31()

static s32 Behavior31 ( void  )
static

◆ Behavior36()

static s32 Behavior36 ( void  )
static

◆ cur_object_exec_behavior()

void cur_object_exec_behavior ( void  )

◆ cur_object_stack_pop()

static u32 cur_object_stack_pop ( void  )
static

◆ cur_object_stack_push()

static void cur_object_stack_push ( u32  value)
static

◆ func_80383B70()

static void func_80383B70 ( u32  segptr)
static

◆ func_80383D68()

void func_80383D68 ( struct Object object)

◆ RandomFloat()

f32 RandomFloat ( void  )

◆ RandomSign()

s32 RandomSign ( void  )

◆ RandomU16()

u16 RandomU16 ( void  )

◆ stub_80385BF0()

void stub_80385BF0 ( void  )

◆ Unknown80383E44()

static void Unknown80383E44 ( void  )
static

◆ Unknown8038556C()

static void Unknown8038556C ( s32  lastIndex)
static

Variable Documentation

◆ BehaviorJumpTable

BehCommandProc BehaviorJumpTable[]
static

◆ gRandomSeed16

u16 gRandomSeed16
static