refresh 5
This commit is contained in:
1 parent
04732af90b
commit
9273f38df1
165 files changed
+12516
-10252
No files matched your search
@@ -91,13 +91,13 @@ static void Unknown80383E44(void) // ?
|
||||
}
|
||||
}
|
||||
|
||||
static s32 beh_cmd_unhide(void) {
|
||||
static s32 beh_cmd_hide(void) {
|
||||
obj_hide();
|
||||
gBehCommand++;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_graph_clear(void) {
|
||||
static s32 beh_cmd_disable_rendering(void) {
|
||||
gCurrentObject->header.gfx.node.flags &= ~GRAPH_RENDER_ACTIVE;
|
||||
gBehCommand++;
|
||||
return BEH_CONTINUE;
|
||||
@@ -109,26 +109,26 @@ static s32 beh_cmd_billboard(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_graph_node(void) {
|
||||
s32 index = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
gCurrentObject->header.gfx.sharedChild = gLoadedGraphNodes[index];
|
||||
static s32 beh_cmd_set_model(void) {
|
||||
s32 modelID = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
gCurrentObject->header.gfx.sharedChild = gLoadedGraphNodes[modelID];
|
||||
gBehCommand++;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_load_chill(void) {
|
||||
static s32 beh_cmd_spawn_child(void) {
|
||||
u32 model = (u32) gBehCommand[1];
|
||||
const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2];
|
||||
|
||||
struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, behavior);
|
||||
struct Object *child = spawn_object_at_origin(gCurrentObject, 0, model, behavior);
|
||||
|
||||
copy_object_pos_and_angle(object, gCurrentObject);
|
||||
copy_object_pos_and_angle(child, gCurrentObject);
|
||||
|
||||
gBehCommand += 3;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_spawn(void) {
|
||||
static s32 beh_cmd_spawn_obj(void) {
|
||||
u32 model = (u32) gBehCommand[1];
|
||||
const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2];
|
||||
|
||||
@@ -142,16 +142,16 @@ static s32 beh_cmd_obj_spawn(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_load_chill_param(void) {
|
||||
static s32 beh_cmd_spawn_child_with_param(void) {
|
||||
u32 behParam = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
u32 model = (u32) gBehCommand[1];
|
||||
const BehaviorScript *behavior = (const BehaviorScript *) gBehCommand[2];
|
||||
|
||||
struct Object *object = spawn_object_at_origin(gCurrentObject, 0, model, behavior);
|
||||
struct Object *child = spawn_object_at_origin(gCurrentObject, 0, model, behavior);
|
||||
|
||||
copy_object_pos_and_angle(object, gCurrentObject);
|
||||
copy_object_pos_and_angle(child, gCurrentObject);
|
||||
|
||||
object->oBehParams2ndByte = behParam;
|
||||
child->oBehParams2ndByte = behParam;
|
||||
|
||||
gBehCommand += 3;
|
||||
return BEH_CONTINUE;
|
||||
@@ -259,7 +259,7 @@ static s32 beh_cmd_end_repeat(void) {
|
||||
return BEH_BREAK;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_end_repeat_nobreak(void) {
|
||||
static s32 beh_cmd_end_repeat_continue(void) {
|
||||
u32 count = (u32) cur_object_stack_pop();
|
||||
|
||||
count--;
|
||||
@@ -291,7 +291,7 @@ static s32 beh_cmd_end_loop(void) {
|
||||
|
||||
typedef void (*BehaviorCallProc)(void);
|
||||
|
||||
static s32 beh_cmd_callnative(void) {
|
||||
static s32 beh_cmd_call_native(void) {
|
||||
BehaviorCallProc behavior_proc = (BehaviorCallProc) gBehCommand[1];
|
||||
|
||||
behavior_proc();
|
||||
@@ -300,7 +300,7 @@ static s32 beh_cmd_callnative(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_float(void) {
|
||||
static s32 beh_cmd_set_float(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
f32 value = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
|
||||
@@ -310,7 +310,7 @@ static s32 beh_cmd_obj_set_float(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_int(void) {
|
||||
static s32 beh_cmd_set_int(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s16 value = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
|
||||
@@ -331,7 +331,7 @@ static s32 Behavior36(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_float_rand(void) {
|
||||
static s32 beh_cmd_set_random_float(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
f32 min = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
f32 max = (s16)(gBehCommand[1] >> 16);
|
||||
@@ -342,7 +342,7 @@ static s32 beh_cmd_obj_set_float_rand(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_int_rand(void) {
|
||||
static s32 beh_cmd_set_random_int(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s32 min = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
s32 max = (s16)(gBehCommand[1] >> 16);
|
||||
@@ -353,7 +353,7 @@ static s32 beh_cmd_obj_set_int_rand(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_int_rand_rshift(void) {
|
||||
static s32 beh_cmd_set_int_rand_rshift(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s32 min = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
s32 rshift = (s16)(gBehCommand[1] >> 16);
|
||||
@@ -364,7 +364,7 @@ static s32 beh_cmd_obj_set_int_rand_rshift(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_add_float_rand(void) {
|
||||
static s32 beh_cmd_add_random_float(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
f32 min = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
f32 max = (s16)(gBehCommand[1] >> 16);
|
||||
@@ -377,7 +377,7 @@ static s32 beh_cmd_obj_add_float_rand(void) {
|
||||
}
|
||||
|
||||
// unused
|
||||
static s32 beh_cmd_obj_add_int_rand_rshift(void) {
|
||||
static s32 beh_cmd_add_int_rand_rshift(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s32 min = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
s32 rshift = (s16)(gBehCommand[1] >> 16);
|
||||
@@ -389,7 +389,7 @@ static s32 beh_cmd_obj_add_int_rand_rshift(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_add_float(void) {
|
||||
static s32 beh_cmd_add_float(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
f32 value = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
|
||||
@@ -399,7 +399,7 @@ static s32 beh_cmd_obj_add_float(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_add_int(void) {
|
||||
static s32 beh_cmd_add_int(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s16 value = gBehCommand[0] & 0xFFFF;
|
||||
|
||||
@@ -409,7 +409,7 @@ static s32 beh_cmd_obj_add_int(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_or_int(void) {
|
||||
static s32 beh_cmd_or_int(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s32 value = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
|
||||
@@ -421,7 +421,7 @@ static s32 beh_cmd_obj_or_int(void) {
|
||||
}
|
||||
|
||||
// unused
|
||||
static s32 beh_cmd_obj_bit_clear_int(void) {
|
||||
static s32 beh_cmd_bit_clear_int(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s32 value = (s16)(gBehCommand[0] & 0xFFFF);
|
||||
|
||||
@@ -432,7 +432,7 @@ static s32 beh_cmd_obj_bit_clear_int(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_anims(void) {
|
||||
static s32 beh_cmd_load_animations(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
|
||||
cur_object_set_vptr(objectOffset, gBehCommand[1]);
|
||||
@@ -441,7 +441,7 @@ static s32 beh_cmd_obj_set_anims(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_animate(void) {
|
||||
static s32 beh_cmd_animate(void) {
|
||||
s32 animIndex = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
struct Animation **animations = gCurrentObject->oAnimations;
|
||||
|
||||
@@ -451,7 +451,7 @@ static s32 beh_cmd_obj_animate(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_drop_floor(void) {
|
||||
static s32 beh_cmd_drop_to_floor(void) {
|
||||
f32 x = gCurrentObject->oPosX;
|
||||
f32 y = gCurrentObject->oPosY;
|
||||
f32 z = gCurrentObject->oPosZ;
|
||||
@@ -491,7 +491,7 @@ static s32 Behavior19(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_sum_float(void) {
|
||||
static s32 beh_cmd_sum_float(void) {
|
||||
u32 objectOffsetDst = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
u32 objectOffsetSrc1 = (u8)((gBehCommand[0] >> 8) & 0xFF);
|
||||
u32 objectOffsetSrc2 = (u8)((gBehCommand[0]) & 0xFF);
|
||||
@@ -504,7 +504,7 @@ static s32 beh_cmd_obj_sum_float(void) {
|
||||
}
|
||||
|
||||
// unused
|
||||
static s32 beh_cmd_obj_sum_int(void) {
|
||||
static s32 beh_cmd_sum_int(void) {
|
||||
u32 objectOffsetDst = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
u32 objectOffsetSrc1 = (u8)((gBehCommand[0] >> 8) & 0xFF);
|
||||
u32 objectOffsetSrc2 = (u8)((gBehCommand[0]) & 0xFF);
|
||||
@@ -517,35 +517,35 @@ static s32 beh_cmd_obj_sum_int(void) {
|
||||
}
|
||||
|
||||
static s32 beh_cmd_set_hitbox(void) {
|
||||
s16 colSphereX = (s16)(gBehCommand[1] >> 16);
|
||||
s16 colSphereY = (s16)(gBehCommand[1] & 0xFFFF);
|
||||
s16 radius = (s16)(gBehCommand[1] >> 16);
|
||||
s16 height = (s16)(gBehCommand[1] & 0xFFFF);
|
||||
|
||||
gCurrentObject->hitboxRadius = colSphereX;
|
||||
gCurrentObject->hitboxHeight = colSphereY;
|
||||
gCurrentObject->hitboxRadius = radius;
|
||||
gCurrentObject->hitboxHeight = height;
|
||||
|
||||
gBehCommand += 2;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_float2(void) {
|
||||
s16 arg0 = (s16)(gBehCommand[1] >> 16);
|
||||
s16 arg1 = (s16)(gBehCommand[1] & 0xFFFF);
|
||||
static s32 beh_cmd_set_hurtbox(void) {
|
||||
s16 radius = (s16)(gBehCommand[1] >> 16);
|
||||
s16 height = (s16)(gBehCommand[1] & 0xFFFF);
|
||||
|
||||
gCurrentObject->hurtboxRadius = arg0;
|
||||
gCurrentObject->hurtboxHeight = arg1;
|
||||
gCurrentObject->hurtboxRadius = radius;
|
||||
gCurrentObject->hurtboxHeight = height;
|
||||
|
||||
gBehCommand += 2;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_collision_sphere(void) {
|
||||
s16 colSphereX = (s16)(gBehCommand[1] >> 16);
|
||||
s16 colSphereY = (s16)(gBehCommand[1] & 0xFFFF);
|
||||
s16 unknown = (s16)(gBehCommand[2] >> 16);
|
||||
static s32 beh_cmd_set_hitbox_with_offset(void) {
|
||||
s16 radius = (s16)(gBehCommand[1] >> 16);
|
||||
s16 height = (s16)(gBehCommand[1] & 0xFFFF);
|
||||
s16 downOffset = (s16)(gBehCommand[2] >> 16);
|
||||
|
||||
gCurrentObject->hitboxRadius = colSphereX;
|
||||
gCurrentObject->hitboxHeight = colSphereY;
|
||||
gCurrentObject->hitboxDownOffset = unknown;
|
||||
gCurrentObject->hitboxRadius = radius;
|
||||
gCurrentObject->hitboxHeight = height;
|
||||
gCurrentObject->hitboxDownOffset = downOffset;
|
||||
|
||||
gBehCommand += 3;
|
||||
return BEH_CONTINUE;
|
||||
@@ -588,14 +588,14 @@ static void Unknown8038556C(s32 lastIndex) {
|
||||
cur_object_set_int(objectOffset, table[(s32)(lastIndex * RandomFloat())]);
|
||||
}
|
||||
|
||||
static s32 beh_cmd_collision_data(void) {
|
||||
static s32 beh_cmd_load_collision_data(void) {
|
||||
u32 *collisionData = segmented_to_virtual((void *) gBehCommand[1]);
|
||||
gCurrentObject->collisionData = collisionData;
|
||||
gBehCommand += 2;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_pos(void) {
|
||||
static s32 beh_cmd_set_home(void) {
|
||||
gCurrentObject->oHomeX = gCurrentObject->oPosX;
|
||||
gCurrentObject->oHomeY = gCurrentObject->oPosY;
|
||||
gCurrentObject->oHomeZ = gCurrentObject->oPosZ;
|
||||
@@ -603,7 +603,7 @@ static s32 beh_cmd_obj_set_pos(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_interact_type(void) {
|
||||
static s32 beh_cmd_set_interact_type(void) {
|
||||
gCurrentObject->oInteractType = (u32) gBehCommand[1];
|
||||
|
||||
gBehCommand += 2;
|
||||
@@ -628,7 +628,7 @@ static s32 beh_cmd_scale(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_set_physics(void) {
|
||||
static s32 beh_cmd_set_obj_physics(void) {
|
||||
UNUSED f32 sp04, sp00;
|
||||
|
||||
gCurrentObject->oWallHitboxRadius = (f32)(s16)(gBehCommand[1] >> 16);
|
||||
@@ -646,7 +646,7 @@ static s32 beh_cmd_obj_set_physics(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_obj_bit_clear_int32(void) {
|
||||
static s32 beh_cmd_bit_clear_int32(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s32 flags = gBehCommand[1];
|
||||
|
||||
@@ -658,18 +658,18 @@ static s32 beh_cmd_obj_bit_clear_int32(void) {
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_spawn_addr(void) {
|
||||
static s32 beh_cmd_spawn_water_splash(void) {
|
||||
struct WaterSplashParams *arg0 = (struct WaterSplashParams *) gBehCommand[1];
|
||||
spawn_water_splash(gCurrentObject, arg0);
|
||||
gBehCommand += 2;
|
||||
return BEH_CONTINUE;
|
||||
}
|
||||
|
||||
static s32 beh_cmd_text_anim_rate(void) {
|
||||
static s32 beh_cmd_tex_anim_rate(void) {
|
||||
u8 objectOffset = (u8)((gBehCommand[0] >> 16) & 0xFF);
|
||||
s16 arg1 = (gBehCommand[0] & 0xFFFF);
|
||||
s16 rate = (gBehCommand[0] & 0xFFFF);
|
||||
|
||||
if ((gGlobalTimer % arg1) == 0) {
|
||||
if ((gGlobalTimer % rate) == 0) {
|
||||
cur_object_add_int(objectOffset, 1);
|
||||
}
|
||||
|
||||
@@ -690,55 +690,55 @@ static BehCommandProc BehaviorJumpTable[] = {
|
||||
beh_cmd_goto,
|
||||
beh_cmd_begin_repeat,
|
||||
beh_cmd_end_repeat,
|
||||
beh_cmd_end_repeat_nobreak,
|
||||
beh_cmd_end_repeat_continue,
|
||||
beh_cmd_begin_loop,
|
||||
beh_cmd_end_loop,
|
||||
beh_cmd_break,
|
||||
beh_cmd_break2,
|
||||
beh_cmd_callnative,
|
||||
beh_cmd_obj_add_float,
|
||||
beh_cmd_obj_set_float,
|
||||
beh_cmd_obj_add_int,
|
||||
beh_cmd_obj_set_int,
|
||||
beh_cmd_obj_or_int,
|
||||
beh_cmd_obj_bit_clear_int,
|
||||
beh_cmd_obj_set_int_rand_rshift,
|
||||
beh_cmd_obj_set_float_rand,
|
||||
beh_cmd_obj_set_int_rand,
|
||||
beh_cmd_obj_add_float_rand,
|
||||
beh_cmd_obj_add_int_rand_rshift,
|
||||
beh_cmd_call_native,
|
||||
beh_cmd_add_float,
|
||||
beh_cmd_set_float,
|
||||
beh_cmd_add_int,
|
||||
beh_cmd_set_int,
|
||||
beh_cmd_or_int,
|
||||
beh_cmd_bit_clear_int,
|
||||
beh_cmd_set_int_rand_rshift,
|
||||
beh_cmd_set_random_float,
|
||||
beh_cmd_set_random_int,
|
||||
beh_cmd_add_random_float,
|
||||
beh_cmd_add_int_rand_rshift,
|
||||
Behavior18,
|
||||
Behavior19,
|
||||
Behavior1A,
|
||||
beh_cmd_graph_node,
|
||||
beh_cmd_obj_load_chill,
|
||||
beh_cmd_set_model,
|
||||
beh_cmd_spawn_child,
|
||||
beh_cmd_deactivate,
|
||||
beh_cmd_obj_drop_floor,
|
||||
beh_cmd_obj_sum_float,
|
||||
beh_cmd_obj_sum_int,
|
||||
beh_cmd_drop_to_floor,
|
||||
beh_cmd_sum_float,
|
||||
beh_cmd_sum_int,
|
||||
beh_cmd_billboard,
|
||||
beh_cmd_unhide,
|
||||
beh_cmd_hide,
|
||||
beh_cmd_set_hitbox,
|
||||
Behavior24,
|
||||
beh_cmd_delay_var,
|
||||
Behavior26,
|
||||
beh_cmd_obj_set_anims,
|
||||
beh_cmd_obj_animate,
|
||||
beh_cmd_obj_load_chill_param,
|
||||
beh_cmd_collision_data,
|
||||
beh_cmd_collision_sphere,
|
||||
beh_cmd_obj_spawn,
|
||||
beh_cmd_obj_set_pos,
|
||||
beh_cmd_obj_set_float2,
|
||||
beh_cmd_interact_type,
|
||||
beh_cmd_obj_set_physics,
|
||||
beh_cmd_load_animations,
|
||||
beh_cmd_animate,
|
||||
beh_cmd_spawn_child_with_param,
|
||||
beh_cmd_load_collision_data,
|
||||
beh_cmd_set_hitbox_with_offset,
|
||||
beh_cmd_spawn_obj,
|
||||
beh_cmd_set_home,
|
||||
beh_cmd_set_hurtbox,
|
||||
beh_cmd_set_interact_type,
|
||||
beh_cmd_set_obj_physics,
|
||||
Behavior31,
|
||||
beh_cmd_scale,
|
||||
beh_cmd_obj_bit_clear_int32,
|
||||
beh_cmd_text_anim_rate,
|
||||
beh_cmd_graph_clear,
|
||||
beh_cmd_bit_clear_int32,
|
||||
beh_cmd_tex_anim_rate,
|
||||
beh_cmd_disable_rendering,
|
||||
Behavior36,
|
||||
beh_cmd_spawn_addr,
|
||||
beh_cmd_spawn_water_splash,
|
||||
};
|
||||
|
||||
void cur_object_exec_behavior(void) {
|
||||
|
||||
Reference in new issue
Block a user