Mass function rename from Star Rod + a couple funcs (#298)

* .

* yaml update

* git subrepo pull --force tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "cd690f725d"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "cd690f725d"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* separate main bss syms

* renames and one match

* SR symbol rename

* fix symbol_addrs

* git subrepo pull tools/splat

subrepo:
  subdir:   "tools/splat"
  merged:   "5fa8aa24ca"
upstream:
  origin:   "https://github.com/ethteck/splat.git"
  branch:   "master"
  commit:   "5fa8aa24ca"
git-subrepo:
  version:  "0.4.3"
  origin:   "https://github.com/ingydotnet/git-subrepo"
  commit:   "2f68596"

* remove old artifacts
This commit is contained in:
Ethan Roseman 2021-06-30 11:27:12 +09:00 committed by GitHub
parent 8c690d23d1
commit 647db26552
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2844 changed files with 13760 additions and 14456 deletions

View File

@ -545,7 +545,7 @@ typedef struct Camera {
/* 0x05C */ f32 unk_5C; /* 0x05C */ f32 unk_5C;
/* 0x060 */ Vec3f targetPos; /* 0x060 */ Vec3f targetPos;
/* 0x06C */ f32 currentYaw; /* 0x06C */ f32 currentYaw;
/* 0x070 */ char unk_70[4]; /* 0x070 */ f32 unk_70;
/* 0x074 */ f32 currentBoomYaw; /* 0x074 */ f32 currentBoomYaw;
/* 0x078 */ f32 currentBoomLength; /* 0x078 */ f32 currentBoomLength;
/* 0x07C */ f32 currentYOffset; /* 0x07C */ f32 currentYOffset;
@ -553,7 +553,8 @@ typedef struct Camera {
/* 0x084 */ f32 trueRotation[3]; /* 0x084 */ f32 trueRotation[3];
/* 0x090 */ f32 currentBlendedYawNegated; /* 0x090 */ f32 currentBlendedYawNegated;
/* 0x094 */ f32 currentPitch; /* 0x094 */ f32 currentPitch;
/* 0x098 */ char unk_98[8]; /* 0x098 */ s32 unk_98;
/* 0x09C */ s32 unk_9C;
/* 0x0A0 */ Vp viewport; /* 0x0A0 */ Vp viewport;
/* 0x0B0 */ char unk_B0[0x24]; /* 0x0B0 */ char unk_B0[0x24];
/* 0x0D4 */ Matrix4f perspectiveMatrix; /* 0x0D4 */ Matrix4f perspectiveMatrix;
@ -956,9 +957,9 @@ typedef struct {
f32 unk_38[4]; f32 unk_38[4];
} EffectUnkStruct1; } EffectUnkStruct1;
// TODO figure out what this actually is // TODO figure out what this actually is
// func_800715D0 invokes gEffectTable[78]'s entryPoint function // playFX_4E invokes gEffectTable[78]'s entryPoint function
// func_80072230 invokes gEffectTable[111]'s entryPoint function // playFX_6F invokes gEffectTable[111]'s entryPoint function
// func_800729B0 invokes gEffectTable[131]'s entryPoint function // playFX_83 invokes gEffectTable[131]'s entryPoint function
// These functions are currently typed to return void // These functions are currently typed to return void
// Assume they return an Effect*, and this struct is accessed at unk_0C, // Assume they return an Effect*, and this struct is accessed at unk_0C,
// but this struct differs from EffectInstanceData // but this struct differs from EffectInstanceData
@ -2076,4 +2077,13 @@ typedef struct VirtualEntity {
typedef VirtualEntity* VirtualEntityList[0x40]; typedef VirtualEntity* VirtualEntityList[0x40];
typedef struct TempSetZoneEnabled {
/* 0x00 */ s32 flags;
/* 0x04 */ s16 id1;
/* 0x06 */ s16 id2;
/* 0x08 */ char unk_08[0x8];
/* 0x10 */ s32 unk_10;
/* 0x14 */ char unk_14[0x8];
} TempSetZoneEnabled; // size = 0x1C
#endif #endif

View File

@ -17,8 +17,8 @@ void boot_main(void);
void osCleanupThread(void); void osCleanupThread(void);
void func_80070A90(s32, f32, f32, f32); void playFX_30(s32, f32, f32, f32);
void func_80070AF0(s32, f32, f32, f32); void playFX_31(s32, f32, f32, f32);
f32 signF(f32 val); f32 signF(f32 val);
void* heap_malloc(s32 size); void* heap_malloc(s32 size);
@ -42,14 +42,14 @@ void _render_transition_stencil(s32, f32, s32);
u32 get_entity_type(s32 arg0); u32 get_entity_type(s32 arg0);
Entity* get_entity_by_index(s32 index); Entity* get_entity_by_index(s32 index);
s32 create_entity(StaticEntityData*, s32, s32, s32, s32, s32); s32 create_entity(StaticEntityData*, s32, s32, s32, s32, s32);
void func_80070550(s32, f32, f32, f32, f32, f32, s32, s32); void playFX_22(s32, f32, f32, f32, f32, f32, s32, s32);
void func_802E263C(Entity* entity); void entity_shattering_idle(Entity* entity);
void func_802666E4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, s16); void func_802666E4(Actor* actor, f32 arg1, f32 arg2, f32 arg3, s16);
void step_game_loop(void); void step_game_loop(void);
s32 resume_all_group(s32 groupFlags); s32 resume_all_group(s32 groupFlags);
f32 length2D(f32 x, f32 y); f32 length2D(f32 x, f32 y);
void input_to_move_vector(f32* angle, f32* magnitude); void player_input_to_move_vector(f32* angle, f32* magnitude);
void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3); void exec_ShakeCamX(s32 arg0, s32 arg1, s32 arg2, f32 arg3);
f32 func_800E5348(void); f32 func_800E5348(void);
@ -64,45 +64,45 @@ void exec_entity_model_commandlist(s32 idx);
s32 load_entity_model(s32* cmdList); s32 load_entity_model(s32* cmdList);
f32 func_800E34D8(void); f32 func_800E34D8(void);
f32 func_800E3514(f32, s32* colliderID); f32 player_check_collision_below(f32, s32* colliderID);
s32 func_800E26C4(void); s32 can_trigger_loading_zone(void);
void func_802667F0(s32, Actor*, f32, f32, f32); void func_802667F0(s32, Actor*, f32, f32, f32);
void create_shadow_callback(Shadow* entity); void entity_Shadow_init(Shadow* entity);
void func_802E10F4(Entity* entity); void entity_SaveBlock_idle(Entity* entity);
void func_802E114C(void); void entity_SaveBlock_pause_game(void);
void func_802E117C(void); void entity_SaveBlock_resume_game(void);
void save_game_at_player_position(void); void entity_SaveBlock_save_data(void);
void func_802E1204(Entity* entity); void entity_SaveBlock_show_tutorial_message(Entity* entity);
void func_802E1270(Entity* entity); void entity_SaveBlock_wait_for_close_tutorial(Entity* entity);
void func_802E1298(void); void entity_SaveBlock_show_choice_message(void);
void func_802E12F8(void); void entity_SaveBlock_show_result_message(void);
void func_802E1328(Entity* entity); void entity_SaveBlock_wait_for_close_result(Entity* entity);
void func_802E1350(Entity* entity); void entity_SaveBlock_wait_for_close_choice(Entity* entity);
void func_802E13B8(Entity* entity); void entity_SaveBlock_init(Entity* entity);
void func_802E1400(Entity* entity); void entity_GreenStompSwitch_idle(Entity* entity);
void func_802E1460(Entity* entity); void entity_GreenStompSwitch_retract(Entity* entity);
void func_802E14D8(Entity* entity); void entity_GreenStompSwitch_extend(Entity* entity);
void func_802E1614(Entity* entity); void entity_HugeBlueSwitch_idle(Entity* entity);
void func_802E1660(Entity* entity); void entity_small_switch_idle(Entity* entity);
void func_802E1740(Entity* entity); void entity_RedSwitch_wait_and_reset(Entity* entity);
void func_802E176C(Entity* entity); void entity_base_switch_anim_init(Entity* entity);
s32 func_802E17A8(Entity* entity); s32 entity_RedSwitch_animate_scale(Entity* entity);
void func_802E1EA8(Entity* entity); void entity_base_switch_start_bound_script(Entity* entity);
void func_802E1EDC(Entity* entity); void entity_base_switch_animate_scale(Entity* entity);
void func_802E234C(Entity* entity); void entity_base_switch_init(Entity* entity);
f32 func_802E31EC(Entity* entity); f32 entity_block_hit_init_scale(Entity* entity);
void func_802E328C(Entity* entity); void entity_block_hit_animate_scale(Entity* entity);
s32 func_802E3BA4(Entity* entity); s32 entity_block_handle_collision(Entity* entity);
void entity_init_BlueSwitch(Entity* entity); void entity_BlueSwitch_init(Entity* entity);
void entity_init_HugeBlueSwitch(Entity* entity); void entity_HugeBlueSwitch_init(Entity* entity);
UNK_TYPE func_80072230(s32, f32, f32, f32, f32, s32); UNK_TYPE playFX_6F(s32, f32, f32, f32, f32, s32);
UNK_TYPE func_80072350(s32, f32, f32, f32, f32, f32, f32, s32, s32); UNK_TYPE playFX_72(s32, f32, f32, f32, f32, f32, f32, s32, s32);
void func_800706D0(s32, f32, f32, f32); void playFX_26(s32, f32, f32, f32);
// Text // Text
PrintContext* load_string(s32 stringID, s32* a1); PrintContext* msg_get_printer_for_string(s32 stringID, s32* a1);
void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ); void get_screen_coords(Cam camID, f32 x, f32 y, f32 z, s32* screenX, s32* screenY, s32* screenZ);
@ -110,12 +110,12 @@ void parent_collider_to_model(s32 colliderID, s16 modelIndex);
void clone_model(u16 srcModelID, u16 newModelID); void clone_model(u16 srcModelID, u16 newModelID);
Model* get_model_from_list_index(s32 listIndex); Model* get_model_from_list_index(s32 listIndex);
s32 get_model_list_index_from_tree_index(s32 treeIndex); s32 get_model_list_index_from_tree_index(s32 treeIndex);
s32 func_8011B090(s32); s32 get_transform_group_index(s32);
void get_model_center_and_size(u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY, void get_model_center_and_size(u16 modelID, f32* centerX, f32* centerY, f32* centerZ, f32* sizeX, f32* sizeY,
f32* sizeZ); f32* sizeZ);
s32 collision_main_above(void); s32 collision_main_above(void);
s32 do_lateral_collision(s32, PlayerStatus*, f32*, f32*, f32*, f32, f32); s32 player_test_lateral_overlap(s32, PlayerStatus*, f32*, f32*, f32*, f32, f32);
Npc* make_disguise_npc(s32 peachDisguise); Npc* peach_make_disguise_npc(s32 peachDisguise);
s32 partner_player_can_pause(void); s32 partner_player_can_pause(void);
s32 disable_player_static_collisions(void); s32 disable_player_static_collisions(void);
@ -128,8 +128,8 @@ s32 get_map_IDs_by_name(const char* mapName, s16* areaID, s16* mapID);
void get_dpad_input_radial(f32* angle, f32* magnitude); void get_dpad_input_radial(f32* angle, f32* magnitude);
void transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outS); void transform_point(Matrix4f mtx, f32 inX, f32 inY, f32 inZ, f32 inS, f32* outX, f32* outY, f32* outZ, f32* outS);
void func_800F4E40(void*); void btl_create_popup_menu(void*);
s32 func_800DDCEC(s32, f32*, f32*, f32*, f32, f32, f32, f32); s32 npc_test_move_simple_without_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
void update_collider_transform(s16 colliderID); void update_collider_transform(s16 colliderID);
void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z); void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z);
@ -143,9 +143,9 @@ Actor* get_actor(ActorID actorID);
ActorPart* get_actor_part(Actor* actor, s32 partIndex); ActorPart* get_actor_part(Actor* actor, s32 partIndex);
s32 add_coins(s32 amt); s32 add_coins(s32 amt);
void func_800494C0(Npc* npc, s32 arg1, s32 arg2); void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2);
s32 func_800DF15C(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*); s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*);
s32 get_variable(ScriptInstance* script, Bytecode var); s32 get_variable(ScriptInstance* script, Bytecode var);
s32 set_variable(ScriptInstance* script, Bytecode var, s32 value); s32 set_variable(ScriptInstance* script, Bytecode var, s32 value);
@ -165,23 +165,28 @@ s32 func_80055464(s32, s32);
void func_800561A4(s32); void func_800561A4(s32);
s32 osGetId(); s32 osGetId();
s32 battle_heap_create(void);
void filemenu_init(s32);
s32 test_ray_zones(f32, f32, f32, f32*, f32*, f32*, f32*, f32*, f32*, f32*);
void mem_clear(s8* data, s32 numBytes); void mem_clear(s8* data, s32 numBytes);
HudElement* create_icon(s32* iconIndex); HudElement* create_hud_element(s32* iconIndex);
void set_icon_render_pos(s32 iconIndex, s32 posX, s32 posY); void set_hud_element_render_pos(s32 iconIndex, s32 posX, s32 posY);
void intro_logos_set_fade_color(s16 color); void intro_logos_set_fade_color(s16 color);
void intro_logos_set_fade_alpha(s16 alpha); void intro_logos_set_fade_alpha(s16 alpha);
void set_game_mode(s16 idx); void set_game_mode(s16 idx);
void fx_walk_normal(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); void fx_walk(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
void fx_emote(s32, Npc*, f32, f32, f32, f32, f32, s32, s32*); void fx_emote(s32, Npc*, f32, f32, f32, f32, f32, s32, s32*);
f32 func_800E0088(f32, f32); f32 get_xz_dist_to_player(f32, f32);
void func_800E06C0(s32); void func_800E06C0(s32);
void close_status_menu(void); void close_status_menu(void);
void func_800EB168(s32); void btl_state_update_switch_to_partner(s32);
Shadow* create_shadow_type(s32 type, f32 x, f32 y, f32 z); Shadow* create_shadow_type(s32 type, f32 x, f32 y, f32 z);
s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 centerY, f32 sizeX, f32 sizeZ); s32 is_point_within_region(s32 shape, f32 pointX, f32 pointY, f32 centerX, f32 centerY, f32 sizeX, f32 sizeZ);
@ -191,28 +196,28 @@ PlayerData* get_player_data(void);
s32 pause_interp_vertical_scroll(s32 deltaBefore); s32 pause_interp_vertical_scroll(s32 deltaBefore);
void pause_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileDescriptor, s32 uls, s32 ult, s32 dsdx, s32 dtdy); void pause_draw_rect(s32 ulx, s32 uly, s32 lrx, s32 lry, s32 tileDescriptor, s32 uls, s32 ult, s32 dsdx, s32 dtdy);
s32 func_800DC778(s32, f32*, f32*, f32*, f32*, f32, f32); s32 npc_raycast_down_ahead(s32, f32*, f32*, f32*, f32*, f32, f32);
s32 func_800DCB7C(s32, f32*, f32*, f32*, f32*); s32 npc_raycast_down_sides(s32, f32*, f32*, f32*, f32*);
s32 func_800DDAE4(s32, f32*, f32*, f32*, f32, f32, f32, f32); s32 npc_test_move_taller_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
s32 func_800DDC44(s32, f32*, f32*, f32*, f32, f32, f32, f32); s32 npc_test_move_simple_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
s32 func_800DDD94(s32, f32*, f32*, f32*, f32, f32, f32, f32); s32 npc_test_move_complex_with_slipping(s32, f32*, f32*, f32*, f32, f32, f32, f32);
Npc* get_npc_by_index(s32 listIndex); Npc* get_npc_by_index(s32 listIndex);
// Partner // Partner
void func_800EBA3C(Npc* partner); void partner_walking_update_player_tracking(Npc* partner);
void func_800EBB40(Npc* partner); void partner_walking_update_motion(Npc* partner);
void enable_partner_ai(void); void enable_partner_ai(void);
void enable_partner_walking(Npc* partner, s32 val); void partner_walking_enable(Npc* partner, s32 val);
void enable_partner_flying(Npc* partner, s32 val); void partner_flying_enable(Npc* partner, s32 val);
void update_player_move_history(Npc* partner); void partner_flying_update_player_tracking(Npc* partner);
s32 is_current_partner_flying(void); s32 partner_is_flying(void);
void func_800ED5D0(Npc* partner); void partner_flying_update_motion(Npc* partner);
void clear_partner_move_history(Npc* partner); void partner_clear_player_tracking(Npc* partner);
void set_background_color_blend(u8 r, u8 g, u8 b, u8 a); void set_background_color_blend(u8 r, u8 g, u8 b, u8 a);
void set_partner_tether_distance(f32); void partner_set_tether_distance(f32);
s32 does_script_exist(s32 id); s32 does_script_exist(s32 id);
s32 does_script_exist_by_ref(ScriptInstance* script); s32 does_script_exist_by_ref(ScriptInstance* script);
ScriptInstance* start_script(Script* source, s32 priority, s32 initialState); ScriptInstance* start_script(Script* source, s32 priority, s32 initialState);
@ -220,13 +225,13 @@ ScriptInstance* start_script_in_group(Script* source, u8 priority, u8 initialSta
void set_animation_rate(ActorID actorID, s32 partIndex, f32 rate); void set_animation_rate(ActorID actorID, s32 partIndex, f32 rate);
void func_8011B7C0(u16, s32, s32); void func_8011B7C0(u16, s32, s32);
AnimatedMesh* get_anim_mesh(s32 arg0); AnimatedMesh* get_animator_by_index(s32 arg0);
void set_transition_stencil_zoom_0(u8, f32); void set_screen_overlay_params_front(u8, f32);
void set_transition_stencil_zoom_1(s32, f32); void set_screen_overlay_params_back(s32, f32);
void set_transition_stencil_alpha(s32, f32); void set_screen_overlay_alpha(s32, f32);
void func_80137DC0(s32, f32*, f32*); void get_screen_overlay_params(s32, f32*, f32*);
s32 set_transition_stencil_color(s32, u8, u8, u8); s32 set_screen_overlay_color(s32, u8, u8, u8);
void set_transition_stencil_center(s32, s32, s32, s32); void set_screen_overlay_center(s32, s32, s32, s32);
s32 rand_int(s32); s32 rand_int(s32);
void sort_items(void); void sort_items(void);
s32 is_ability_active(s32 arg0); s32 is_ability_active(s32 arg0);
@ -237,7 +242,7 @@ void enable_world_fog(void);
void set_world_fog_dist(s32 start, s32 end); void set_world_fog_dist(s32 start, s32 end);
void set_world_fog_color(s32 r, s32 g, s32 b, s32 a); void set_world_fog_color(s32 r, s32 g, s32 b, s32 a);
ModelTransformGroup* func_8011B1C0(s32 index); ModelTransformGroup* get_transform_group(s32 index);
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign,
s32 pickupVar); s32 pickupVar);
@ -247,8 +252,8 @@ ItemEntity* get_item_entity(s32 itemEntityIndex);
s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode itemSpawnMode, s32 pickupVar); s32 make_item_entity_nodelay(s32 itemID, f32 x, f32 y, f32 z, ItemSpawnMode itemSpawnMode, s32 pickupVar);
void set_item_entity_flags(s32 itemEntityIndex, s32 flag); void set_item_entity_flags(s32 itemEntityIndex, s32 flag);
s32 create_dynamic_entity_frontUI(void (*updateFunc)(void), void (*drawFunc)(void)); s32 create_generic_entity_frontUI(void (*updateFunc)(void), void (*drawFunc)(void));
DynamicEntity* get_dynamic_entity(s32 idx); DynamicEntity* get_generic_entity(s32 idx);
void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height); void set_cam_viewport(s16 id, s16 x, s16 y, s16 width, s16 height);
@ -289,7 +294,7 @@ void add_actor_decoration(Actor* actor, s32 decorationIndex, DecorationID decora
void remove_part_decoration(ActorPart* part, s32 decorationIndex); void remove_part_decoration(ActorPart* part, s32 decorationIndex);
void remove_actor_decoration(Actor* actor, s32 decorationIndex); void remove_actor_decoration(Actor* actor, s32 decorationIndex);
s32 heroes_is_ability_active(Actor* actor, Ability ability); s32 player_team_is_ability_active(Actor* actor, Ability ability);
void create_part_shadow(ActorID actorID, s32 partIndex); void create_part_shadow(ActorID actorID, s32 partIndex);
void remove_part_shadow(ActorID actorID, s32 partIndex); void remove_part_shadow(ActorID actorID, s32 partIndex);
@ -299,13 +304,13 @@ ScriptInstance* get_script_by_index(s32 index);
void set_action_state(s32 actionState); void set_action_state(s32 actionState);
s32 get_collider_type_by_id(s32 colliderID); s32 get_collider_type_by_id(s32 colliderID);
void func_800DFF78(s32 arg0); void suggest_player_anim_setUnkFlag(s32 arg0);
void subtract_hp(s32 amt); void subtract_hp(s32 amt);
void open_status_menu_long(void); void open_status_menu_long(void);
void suspend_all_group(s32 groupFlags); void suspend_all_group(s32 groupFlags);
void kill_script(ScriptInstance* instanceToKill); void kill_script(ScriptInstance* instanceToKill);
void exec_entity_updatecmd(Entity* entity); void exec_entity_commandlist(Entity* entity);
void sfx_reset_door_sounds(void); void sfx_reset_door_sounds(void);
@ -313,42 +318,42 @@ void func_802D7460(f32 x, f32 y, f32 z, s32 arg3);
void func_802D74C0(f32 x, f32 y, f32 z, s32 arg3); void func_802D74C0(f32 x, f32 y, f32 z, s32 arg3);
void show_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32); void show_damage_popup(f32 x, f32 y, f32 z, s32 damageAmount, s32);
void func_80070B50(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4); void playFX_32(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
void func_800718D0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void playFX_56(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void func_80070BB0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void playFX_33(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void func_80071FF0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void playFX_69(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void func_80070970(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); void playFX_2D(s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
void func_800709D0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void playFX_2E(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void func_80070130(s32 arg0, f32 arg1, f32 arg2, f32 arg3); void playFX_17(s32 arg0, f32 arg1, f32 arg2, f32 arg3);
void func_800701F0(s32 arg0, f32 arg1, f32 arg2, f32 arg3); void playFX_19(s32 arg0, f32 arg1, f32 arg2, f32 arg3);
void func_80070370(s32, f32, f32, f32, f32, s32, s32, s32); void playFX_1D(s32, f32, f32, f32, f32, s32, s32, s32);
void fx_sweat(s32, f32, f32, f32, f32, f32, s32); void fx_sweat(s32, f32, f32, f32, f32, f32, s32);
void func_80070A30(s32, f32, f32, f32, f32, s32, EffectInstanceData**); void playFX_2F(s32, f32, f32, f32, f32, s32, EffectInstanceData**);
void func_80070EB0(s32, f32, f32, f32, f32, EffectInstanceData**); void playFX_3B(s32, f32, f32, f32, f32, EffectInstanceData**);
void add_xz_vec3f(Vec3f* vector, f32 speed, f32 angleDeg); void add_xz_vec3f(Vec3f* vector, f32 speed, f32 angleDeg);
void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg); void play_movement_dust_effects(s32 var0, f32 xPos, f32 yPos, f32 zPos, f32 angleDeg);
void fx_walk_large(s32, f32, f32, f32, f32); void fx_land(s32, f32, f32, f32, f32);
void func_80138D88(s32, s32, s32, s32, f32); void func_80138D88(s32, s32, s32, s32, f32);
// Effect funcs // Effect funcs
void func_8006F8F0(f32, f32, f32); void playFX_01(f32, f32, f32);
void func_8006FEF0(s32, f32, f32, f32, f32); void playFX_11(s32, f32, f32, f32, f32);
void func_80070190(s32, f32, f32, f32, s32, f32, s32, s32); void playFX_18(s32, f32, f32, f32, s32, f32, s32, s32);
void func_80070F70(s32 var1, f32 var2, f32 var3, f32 var4, f32 var5, f32 var6, f32 var7, s32 var8, s32* unk); void playFX_3D(s32 var1, f32 var2, f32 var3, f32 var4, f32 var5, f32 var6, f32 var7, s32 var8, s32* unk);
void func_80071090(s32, f32, f32, f32, s32); void playFX_40(s32, f32, f32, f32, s32);
EffectInstance* func_80071750(s32, f32, f32, f32, f32, s32); EffectInstance* playFX_52(s32, f32, f32, f32, f32, s32);
EffectInstance* func_800720B0(s32, f32, f32, f32, f32, s32); EffectInstance* playFX_6B(s32, f32, f32, f32, f32, s32);
//EffectInstance* func_80072950(s32, f32, f32, f32, f32, s32 time); //EffectInstance* playFX_82(s32, f32, f32, f32, f32, s32 time);
EffectInstance* func_800715D0(s32, f32, f32, f32); EffectInstance* playFX_4E(s32, f32, f32, f32);
EffectInstance* func_80071810(s32, f32, f32, f32); EffectInstance* playFX_54(s32, f32, f32, f32);
EffectInstance* func_80072890(s32, f32, f32, f32, f32, s32); EffectInstance* playFX_80(s32, f32, f32, f32, f32, s32);
EffectInstance* func_800716F0(s32, f32, f32, f32, f32, s32); EffectInstance* playFX_51(s32, f32, f32, f32, f32, s32);
void func_80071690(s32, f32, f32, f32); void playFX_50(s32, f32, f32, f32);
EffectInstance* func_80071030(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); EffectInstance* playFX_3F(s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
void func_80070CD0(s32, f32, f32, f32, f32, f32); void playFX_36(s32, f32, f32, f32, f32, f32);
void* func_800729B0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void* playFX_83(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void* func_800726B0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); void* playFX_7B(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
void func_802B2078(void); void func_802B2078(void);
extern f32 gCurtainScale; extern f32 gCurtainScale;
@ -356,7 +361,7 @@ extern f32 gCurtainScaleGoal;
extern f32 gCurtainFade; extern f32 gCurtainFade;
extern f32 gCurtainFadeGoal; extern f32 gCurtainFadeGoal;
extern UNK_FUN_PTR(gCurtainDrawCallback); extern UNK_FUN_PTR(gCurtainDrawCallback);
void func_802DDA8C(s32, s32, f32); void spr_update_player_sprite(s32, s32, f32);
void initialize_curtains(void); void initialize_curtains(void);
void update_curtains(void); void update_curtains(void);
@ -372,7 +377,7 @@ Npc* func_8003E4BC(NpcID npcId); // get_npc_safe
Npc* func_8003E534(NpcID npcId); // get_npc_safe Npc* func_8003E534(NpcID npcId); // get_npc_safe
void func_80077BD0(s32, s32, s32, s32, s32, s32); void func_80077BD0(s32, s32, s32, s32, s32, s32);
void dead_func_8006FEF0(s32, f32, f32, f32, f32); void dead_playFX_11(s32, f32, f32, f32, f32);
s32 dead_get_variable(ScriptInstance* script, Bytecode var); s32 dead_get_variable(ScriptInstance* script, Bytecode var);
f32 dead_get_float_variable(ScriptInstance* script, Bytecode var); f32 dead_get_float_variable(ScriptInstance* script, Bytecode var);
s32 dead_set_variable(ScriptInstance* script, Bytecode var, s32 value); s32 dead_set_variable(ScriptInstance* script, Bytecode var, s32 value);
@ -381,23 +386,23 @@ f32 dead_set_float_variable(ScriptInstance* script, Bytecode var, f32 value);
f32 dead_cos_rad(f32 x); f32 dead_cos_rad(f32 x);
f32 dead_atan2(f32 startX, f32 startZ, f32 endX, f32 endZ); f32 dead_atan2(f32 startX, f32 startZ, f32 endX, f32 endZ);
s32 create_dynamic_entity_world(void (*updateFunc)(void), void (*drawFunc)(void)); s32 create_generic_entity_world(void (*updateFunc)(void), void (*drawFunc)(void));
EntityModel* get_entity_model(s32 idx); EntityModel* get_entity_model(s32 idx);
f32 func_800E5938(s32 lag, s32* x, s32* y, s32* z); f32 phys_get_spin_history(s32 lag, s32* x, s32* y, s32* z);
void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5); void sfx_get_spatialized_sound_params(f32 arg0, f32 arg1, f32 arg2, s16* arg3, s16* arg4, s32 arg5);
void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3); void sfx_play_sound_with_params(s32 arg0, u8 arg1, u8 arg2, s16 arg3);
void func_8004A784(Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5); void func_8004A784(Npc* npc, f32 arg1, f32* arg2, s32* arg3, s32* arg4, s32* arg5);
void base_UnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory); void base_UnkNpcAIFunc1(ScriptInstance* script, NpcAISettings* aiSettings, EnemyTerritoryThing* territory);
s32* func_802DEA40(u16 arg0); s32* spr_get_npc_palettes(u16 arg0);
void render_sprite(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4); void spr_draw_player_sprite(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s32 arg4);
void func_802DE3D8(s32 arg0, s32 arg1, s32 arg2, s32 arg3, Matrix4f* arg4); void spr_draw_npc_sprite(s32 arg0, s32 arg1, s32 arg2, s32 arg3, Matrix4f* arg4);
void guRotateAnglesF(float mf[4][4], f32 x, f32 y, f32 z); void guRotateRPYF(float mf[4][4], f32 x, f32 y, f32 z);
s32 spr_update_sprite(s32 arg0, s32 arg1, f32 arg2); s32 spr_update_sprite(s32 arg0, s32 arg1, f32 arg2);
s32 func_800DC778(s32, f32*, f32*, f32*, f32*, f32, f32); s32 npc_raycast_down_ahead(s32, f32*, f32*, f32*, f32*, f32, f32);
void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta); void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta);
void func_8006FB90(f32 arg0, f32 arg1, f32 arg2, f32 arg3); void playFX_08(f32 arg0, f32 arg1, f32 arg2, f32 arg3);
void func_8006FBF0(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); void playFX_09(s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
#endif #endif

View File

@ -8,7 +8,7 @@
ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall); ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall);
ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall); ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall);
ApiStatus UseCamPreset(ScriptInstance* script, s32 isInitialCall); ApiStatus UseBattleCamPreset(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetBattleCamTarget(ScriptInstance* script, s32 isInitialCall); ApiStatus SetBattleCamTarget(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall); ApiStatus SetBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall);
ApiStatus AddBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall); ApiStatus AddBattleCamOffsetZ(ScriptInstance* script, s32 isInitialCall);
@ -256,7 +256,7 @@ ApiStatus PartnerPowerBounceEnemy(ScriptInstance* script, s32 isInitialCall);
ApiStatus PartnerTestEnemy(ScriptInstance* script, s32 isInitialCall); ApiStatus PartnerTestEnemy(ScriptInstance* script, s32 isInitialCall);
ApiStatus DeletePartner(ScriptInstance* script, s32 isInitialCall); ApiStatus DeletePartner(ScriptInstance* script, s32 isInitialCall);
ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall); ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall);
ApiStatus ActorAddMovePos(ScriptInstance* script, s32 isInitialCall); ApiStatus AddEffectOffset(ScriptInstance* script, s32 isInitialCall);
ApiStatus LoadStarPowerScript(ScriptInstance* script, s32 isInitialCall); ApiStatus LoadStarPowerScript(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_80248DD0(ScriptInstance* script, s32 isInitialCall); ApiStatus func_80248DD0(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_80248DE4(ScriptInstance* script, s32 isInitialCall); ApiStatus func_80248DE4(ScriptInstance* script, s32 isInitialCall);
@ -273,8 +273,8 @@ ApiStatus func_8024C944(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_8024CB68(ScriptInstance* script, s32 isInitialCall); ApiStatus func_8024CB68(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_8024E9B0(ScriptInstance* script, s32 isInitialCall); ApiStatus func_8024E9B0(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_8024E748(ScriptInstance* script, s32 isInitialCall); ApiStatus func_8024E748(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D3398(ScriptInstance* script, s32 isInitialCall); ApiStatus InitVirtualEntityList(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CCCB0(ScriptInstance* script, s32 isInitialCall); ApiStatus InitAnimatedModels(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_8024CE9C(ScriptInstance* script, s32 isInitialCall); ApiStatus func_8024CE9C(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CABE8(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CABE8(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CAE50(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CAE50(ScriptInstance* script, s32 isInitialCall);

View File

@ -59,7 +59,7 @@ ApiStatus CloneModel(ScriptInstance* script, s32 isInitialCall);
ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall); ApiStatus GetModelIndex(ScriptInstance* script, s32 isInitialCall);
ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall); ApiStatus GetModelCenter(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall); ApiStatus SetTexPanner(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetModelFlag10(ScriptInstance* script, s32 isInitialCall); ApiStatus SetCustomGfxEnabled(ScriptInstance* script, s32 isInitialCall);
ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall); ApiStatus EnableTexPanning(ScriptInstance* script, s32 isInitialCall);
ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall); ApiStatus EnableModel(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall); ApiStatus SetGroupEnabled(ScriptInstance* script, s32 isInitialCall);
@ -113,9 +113,9 @@ ApiStatus WaitForCam(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetCamProperties(ScriptInstance* script, s32 isInitialCall); ApiStatus SetCamProperties(ScriptInstance* script, s32 isInitialCall);
ApiStatus AdjustCam(ScriptInstance* script, s32 isInitialCall); ApiStatus AdjustCam(ScriptInstance* script, s32 isInitialCall);
ApiStatus ResetCam(ScriptInstance* script, s32 isInitialCall); ApiStatus ResetCam(ScriptInstance* script, s32 isInitialCall);
ApiStatus LoadModelAnimation(ScriptInstance* script, s32 isInitialCall); ApiStatus LoadAnimatedModel(ScriptInstance* script, s32 isInitialCall);
ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall); ApiStatus PlayModelAnimation(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetAnimModelPosition(ScriptInstance* script, s32 isInitialCall); ApiStatus SetAnimatedModelRootPosition(ScriptInstance* script, s32 isInitialCall);
ApiStatus ChangeModelAnimation(ScriptInstance* script, s32 isInitialCall); ApiStatus ChangeModelAnimation(ScriptInstance* script, s32 isInitialCall);
ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall); ApiStatus DeleteNpc(ScriptInstance* script, s32 isInitialCall);
ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall); ApiStatus GetNpcPointer(ScriptInstance* script, s32 isInitialCall);
@ -148,7 +148,7 @@ ApiStatus BringPartnerOut(ScriptInstance* script, s32 isInitialCall);
ApiStatus PutPartnerAway(ScriptInstance* script, s32 isInitialCall); ApiStatus PutPartnerAway(ScriptInstance* script, s32 isInitialCall);
ApiStatus GetCurrentPartnerID(ScriptInstance* script, s32 isInitialCall); ApiStatus GetCurrentPartnerID(ScriptInstance* script, s32 isInitialCall);
ApiStatus IsCurrentPartnerFlying(ScriptInstance* script, s32 isInitialCall); ApiStatus IsCurrentPartnerFlying(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetNpcEffect(ScriptInstance* script, s32 isInitialCall); ApiStatus SetNpcDecoration(ScriptInstance* script, s32 isInitialCall);
ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall); ApiStatus PlaySoundAtNpc(ScriptInstance* script, s32 isInitialCall);
ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall); ApiStatus SpeakToPlayer(ScriptInstance* script, s32 isInitialCall);
ApiStatus EndSpeech(ScriptInstance* script, s32 isInitialCall); ApiStatus EndSpeech(ScriptInstance* script, s32 isInitialCall);
@ -265,42 +265,42 @@ ApiStatus IsPlayerOnValidFloor(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CFE2C(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CFD30(ScriptInstance* script, s32 isInitialCall);
ApiStatus IsStartingConversation(ScriptInstance* script, s32 isInitialCall); ApiStatus IsStartingConversation(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D5830(ScriptInstance* script, s32 isInitialCall); ApiStatus SetTimeFreezeMode(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D3474(ScriptInstance* script, s32 isInitialCall); ApiStatus CreateVirtualEntity(ScriptInstance* script, s32 isInitialCall);
ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall); ApiStatus SetNpcSprite(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D3624(ScriptInstance* script, s32 isInitialCall); ApiStatus DeleteVirtualEntity(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D36E0(ScriptInstance* script, s32 isInitialCall); ApiStatus SetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D38EC(ScriptInstance* script, s32 isInitialCall); ApiStatus SetVirtualEntityScale(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D3840(ScriptInstance* script, s32 isInitialCall); ApiStatus SetVirtualEntityRotation(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D39FC(ScriptInstance* script, s32 isInitialCall); ApiStatus SetVirtualEntityJumpGravity(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D3C58(ScriptInstance* script, s32 isInitialCall); ApiStatus VirtualEntityJumpTo(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D2884(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D2884(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D2C14(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D2C14(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D7B10(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D663C(ScriptInstance* script, s32 isInitialCall); ApiStatus ShowConsumableChoicePopup(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_80045900(ScriptInstance* script, s32 isInitialCall); ApiStatus func_80045900(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D6420(ScriptInstance* script, s32 isInitialCall); ApiStatus ShowKeyChoicePopup(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D6954(ScriptInstance* script, s32 isInitialCall); ApiStatus CloseChoicePopup(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D2B6C(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D2B6C(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall); ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D585C(ScriptInstance* script, s32 isInitialCall); ApiStatus ModifyGlobalOverrideFlags(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CF56C(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CF56C(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CA988(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802CDE68(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D8248(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D8248(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D286C(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D286C(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D2520(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D2520(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D5FF8(ScriptInstance* script, s32 isInitialCall); ApiStatus PushSong(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D5FD8(ScriptInstance* script, s32 isInitialCall); ApiStatus PopSong(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D62E4(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D62E4(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_80044238(ScriptInstance* script, s32 isInitialCall); ApiStatus func_80044238(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802C9C70(ScriptInstance* script, s32 isInitialCall); ApiStatus MakeLocalVertexCopy(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802C94A0(ScriptInstance* script, s32 isInitialCall); ApiStatus SetCustomGfxBuilders(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802C90FC(ScriptInstance* script, s32 isInitialCall); ApiStatus SetModelCustomGfx(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CFE80(ScriptInstance* script, s32 isInitialCall); ApiStatus SetNpcPaletteSwapMode(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802CFFC0(ScriptInstance* script, s32 isInitialCall); ApiStatus SetNpcPaletteSwapping(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802C971C(ScriptInstance* script, s32 isInitialCall); ApiStatus MakeTransformGroup(ScriptInstance* script, s32 isInitialCall);
extern Script EnemyNpcHit; extern Script EnemyNpcHit;
extern Script EnemyNpcDefeat; extern Script EnemyNpcDefeat;

View File

@ -102,6 +102,8 @@ extern s32 D_8015C7D0[3]; // not size 3
extern f32 D_800F7B70[4]; extern f32 D_800F7B70[4];
extern TempSetZoneEnabled* D_800D91D4;
extern UNK_TYPE D_0A0031E0; extern UNK_TYPE D_0A0031E0;
extern UNK_TYPE D_0A001508; extern UNK_TYPE D_0A001508;
extern UNK_TYPE D_0A0031B0; extern UNK_TYPE D_0A0031B0;

View File

@ -1,16 +1,16 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DEAA0); INCLUDE_ASM(s32, "101b90_len_8f0", spr_swizzle_anim_offsets);
INCLUDE_ASM(s32, "101b90_len_8f0", load_sprite); INCLUDE_ASM(s32, "101b90_len_8f0", spr_load_sprite);
// spr_init_player_raster_cache // spr_init_player_raster_cache
INCLUDE_ASM(void, "101b90_len_8f0", func_802DED60, s32 cacheSize, s32 maxRasterSize); INCLUDE_ASM(void, "101b90_len_8f0", spr_init_player_raster_cache, s32 cacheSize, s32 maxRasterSize);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DEEA0); INCLUDE_ASM(s32, "101b90_len_8f0", spr_get_player_raster);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DEFB4); INCLUDE_ASM(s32, "101b90_len_8f0", spr_update_player_raster_cache);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DF00C); INCLUDE_ASM(s32, "101b90_len_8f0", spr_load_npc_extra_anims);
INCLUDE_ASM(s32, "101b90_len_8f0", func_802DF2D8); INCLUDE_ASM(s32, "101b90_len_8f0", spr_allocate_components);

View File

@ -5,99 +5,99 @@ typedef struct struct802E10F4 {
s16 angle; s16 angle;
} struct802E10F4; } struct802E10F4;
void create_shadow_callback(Shadow* shadow) { void entity_Shadow_init(Shadow* shadow) {
shadow->scale.x = 0.1f; shadow->scale.x = 0.1f;
shadow->scale.y = 0.1f; shadow->scale.y = 0.1f;
shadow->scale.z = 0.1f; shadow->scale.z = 0.1f;
} }
//TODO: make sure this is the right struct for this. //TODO: make sure this is the right struct for this.
s32 func_802E0DB0(Shadow* shadow) { s32 entity_can_collide_with_jumping_player(Shadow* shadow) {
if ((shadow->unk_06 & 4) && (gPlayerStatus.flags & 2)) { if ((shadow->unk_06 & 4) && (gPlayerStatus.flags & 2)) {
return TRUE; return TRUE;
} }
return FALSE; return FALSE;
} }
INCLUDE_ASM(s32, "102610_len_2330", func_802E0DE0); INCLUDE_ASM(s32, "102610_len_2330", entity_SaveBlock_setupGfx);
void func_802E10F4(Entity* entity) { void entity_SaveBlock_idle(Entity* entity) {
struct802E10F4* temp; struct802E10F4* temp;
temp = (struct802E10F4*)entity->dataBuf; temp = (struct802E10F4*)entity->dataBuf;
temp->angle = clamp_angle(temp->angle + 6); temp->angle = clamp_angle(temp->angle + 6);
func_802E3650(entity); entity_base_block_idle(entity);
} }
void func_802E114C(void) { void entity_SaveBlock_pause_game(void) {
set_time_freeze_mode(1); set_time_freeze_mode(1);
disable_player_input(); disable_player_input();
gPlayerStatusPtr->currentSpeed = 0.0f; gPlayerStatusPtr->currentSpeed = 0.0f;
} }
void func_802E117C(void) { void entity_SaveBlock_resume_game(void) {
set_time_freeze_mode(0); set_time_freeze_mode(0);
enable_player_input(); enable_player_input();
} }
void save_game_at_player_position(void) { void entity_SaveBlock_save_data(void) {
gGameStatusPtr->savedPos.x = gPlayerStatusPtr->position.x; gGameStatusPtr->savedPos.x = gPlayerStatusPtr->position.x;
gGameStatusPtr->savedPos.y = gPlayerStatusPtr->position.y; gGameStatusPtr->savedPos.y = gPlayerStatusPtr->position.y;
gGameStatusPtr->savedPos.z = gPlayerStatusPtr->position.z; gGameStatusPtr->savedPos.z = gPlayerStatusPtr->position.z;
fio_save_game(gGameStatusPtr->saveSlot); fio_save_game(gGameStatusPtr->saveSlot);
} }
void func_802E1204(Entity* entity) { void entity_SaveBlock_show_tutorial_message(Entity* entity) {
if (!get_global_flag(SI_SAVE_FLAG(95))) { if (!get_global_flag(SI_SAVE_FLAG(95))) {
D_802EB390 = FALSE; D_802EB390 = FALSE;
load_string(0x1D0000, &D_802EB390); msg_get_printer_for_string(0x1D0000, &D_802EB390);
set_global_flag(SI_SAVE_FLAG(95)); set_global_flag(SI_SAVE_FLAG(95));
return; return;
} }
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
void func_802E1270(Entity* entity) { void entity_SaveBlock_wait_for_close_tutorial(Entity* entity) {
if (D_802EB390) { if (D_802EB390) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E1298(void) { void entity_SaveBlock_show_choice_message(void) {
D_802EB390 = FALSE; D_802EB390 = FALSE;
D_802EB394 = FALSE; D_802EB394 = FALSE;
D_802EB39C = load_string(0x1D0004, &D_802EB394); D_802EB39C = msg_get_printer_for_string(0x1D0004, &D_802EB394);
D_802EB398 = load_string(0x1E000A, &D_802EB390); D_802EB398 = msg_get_printer_for_string(0x1E000A, &D_802EB390);
} }
void func_802E12F8(void) { void entity_SaveBlock_show_result_message(void) {
load_message_to_printer(0x1D0005, D_802EB39C); msg_printer_load_string(0x1D0005, D_802EB39C);
sfx_play_sound(0x10); sfx_play_sound(0x10);
} }
void func_802E1328(Entity* entity) { void entity_SaveBlock_wait_for_close_result(Entity* entity) {
if (D_802EB394) { if (D_802EB394) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E1350(Entity* entity) { void entity_SaveBlock_wait_for_close_choice(Entity* entity) {
if (D_802EB390) { if (D_802EB390) {
if (D_802EB398->currentOption == 1) { if (D_802EB398->currentOption == 1) {
set_entity_commandlist(entity, &D_802E99DC); set_entity_commandlist(entity, &D_802E99DC);
} else { } else {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
close_message(D_802EB39C); close_message(D_802EB39C);
} }
} }
void func_802E13B8(Entity* entity) { void entity_SaveBlock_init(Entity* entity) {
struct802E3650* temp = entity->dataBuf; struct802E3650* temp = entity->dataBuf;
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
entity->renderSetupFunc = func_802E0DE0; entity->renderSetupFunc = entity_SaveBlock_setupGfx;
temp->unk_04 = 8; temp->unk_04 = 8;
} }

View File

@ -1,21 +1,21 @@
#include "common.h" #include "common.h"
void func_802E246C(Entity* entity, void* arg1, void* arg2); void entity_shattering_init_pieces(Entity* entity, void* arg1, void* arg2);
void func_802E1400(Entity* entity) { void entity_GreenStompSwitch_idle(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
if (entity->collisionFlags & 1) { if (entity->collisionFlags & 1) {
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) { || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
temp->unk_22 = 8; temp->unk_22 = 8;
} }
} }
} }
void func_802E1460(Entity* entity) { void entity_GreenStompSwitch_retract(Entity* entity) {
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
u16 temp2 = temp->unk_22--; u16 temp2 = temp->unk_22--;
@ -23,12 +23,12 @@ void func_802E1460(Entity* entity) {
entity->position.y -= 1.8625; entity->position.y -= 1.8625;
return; return;
} }
func_80110678(entity); entity_start_script(entity);
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
temp->unk_22 = 8; temp->unk_22 = 8;
} }
void func_802E14D8(Entity* entity) { void entity_GreenStompSwitch_extend(Entity* entity) {
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
u16 temp2 = temp->unk_22--; u16 temp2 = temp->unk_22--;
@ -36,13 +36,13 @@ void func_802E14D8(Entity* entity) {
entity->position.y += 1.8625; entity->position.y += 1.8625;
return; return;
} }
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
temp->unk_22 = 8; temp->unk_22 = 8;
} }
void func_801125E8(f32*, f32*, f32*, f32*, f32*, f32*); void entity_raycast_down(f32*, f32*, f32*, f32*, f32*, f32*);
void func_802E153C(Entity* entity) { void entity_switch_fall_down(Entity* entity) {
struct802E1400* temp_s1 = entity->dataBuf; struct802E1400* temp_s1 = entity->dataBuf;
f32 hitDepth = 10.0f; f32 hitDepth = 10.0f;
f32 x = entity->position.x; f32 x = entity->position.x;
@ -51,7 +51,7 @@ void func_802E153C(Entity* entity) {
f32 hitYaw; f32 hitYaw;
f32 hitPitch; f32 hitPitch;
func_801125E8(&x, &y, &z, &hitYaw, &hitPitch, &hitDepth); entity_raycast_down(&x, &y, &z, &hitYaw, &hitPitch, &hitDepth);
if ((entity->position.y != y) && (entity->position.y > y)) { if ((entity->position.y != y) && (entity->position.y > y)) {
f32 var = temp_s1->unk_00.x; f32 var = temp_s1->unk_00.x;
@ -64,36 +64,36 @@ void func_802E153C(Entity* entity) {
} }
} }
void func_802E1614(Entity* entity) { void entity_HugeBlueSwitch_idle(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (entity->collisionFlags & 1) { if (entity->collisionFlags & 1) {
if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND) if ((playerStatus->actionState == ACTION_STATE_GROUND_POUND)
|| (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) { || (playerStatus->actionState == ACTION_STATE_ULTRA_POUND)) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
} }
void func_802E1660(Entity* entity) { void entity_small_switch_idle(Entity* entity) {
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Temp8010EBB0* temp2 = &D_8010EBB0; Temp8010EBB0* temp2 = &D_8010EBB0;
func_802E153C(entity); entity_switch_fall_down(entity);
if (entity->collisionFlags & 0x40) { if (entity->collisionFlags & 0x40) {
if (playerStatus->actionState == ACTION_STATE_HAMMER) { if (playerStatus->actionState == ACTION_STATE_HAMMER) {
if (gPlayerData.hammerLevel < 0) { if (gPlayerData.hammerLevel < 0) {
return; return;
} }
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
if (temp->attachedEntity == NULL) { if (temp->attachedEntity == NULL) {
return; return;
} }
exec_entity_updatecmd(temp->attachedEntity); exec_entity_commandlist(temp->attachedEntity);
return; return;
} }
} }
@ -112,22 +112,22 @@ void func_802E1660(Entity* entity) {
} }
} }
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
if (temp->attachedEntity == NULL) { if (temp->attachedEntity == NULL) {
return; return;
} }
exec_entity_updatecmd(temp->attachedEntity); exec_entity_commandlist(temp->attachedEntity);
} }
void func_802E1740(Entity* entity) { void entity_RedSwitch_wait_and_reset(Entity* entity) {
if (!(entity->collisionFlags & 1)) { if (!(entity->collisionFlags & 1)) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E176C(Entity* entity) { void entity_base_switch_anim_init(Entity* entity) {
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
temp->unk_00.x = 1.0f; temp->unk_00.x = 1.0f;
@ -139,7 +139,7 @@ void func_802E176C(Entity* entity) {
#ifdef NON_MATCHING #ifdef NON_MATCHING
// needs rodata support // needs rodata support
s32 func_802E17A8(Entity* entity) { s32 entity_RedSwitch_animate_scale(Entity* entity) {
f32 temp_f0; f32 temp_f0;
f32 temp_f2; f32 temp_f2;
f32 temp_f4; f32 temp_f4;
@ -303,26 +303,26 @@ s32 func_802E17A8(Entity* entity) {
break; break;
} }
func_802E153C(entity); entity_switch_fall_down(entity);
if (phi_s2 == 2) { if (phi_s2 == 2) {
temp_s0->unk_10 = 0; temp_s0->unk_10 = 0;
temp_s0->unk_11 = 0; temp_s0->unk_11 = 0;
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
#else #else
INCLUDE_ASM(s32, "102C80", func_802E17A8, Entity* entity); INCLUDE_ASM(s32, "102C80", entity_RedSwitch_animate_scale, Entity* entity);
#endif #endif
void func_802E1EA8(Entity* entity) { void entity_base_switch_start_bound_script(Entity* entity) {
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
set_area_flag(temp->unk_20); set_area_flag(temp->unk_20);
func_80110678(entity); entity_start_script(entity);
} }
#ifdef NON_MATCHING #ifdef NON_MATCHING
// needs rodata support // needs rodata support
void func_802E1EDC(Entity* entity) { void entity_base_switch_animate_scale(Entity* entity) {
f32 temp_f0; f32 temp_f0;
f32 temp_f4; f32 temp_f4;
f32 temp_f6; f32 temp_f6;
@ -449,23 +449,23 @@ void func_802E1EDC(Entity* entity) {
break; break;
} }
func_802E153C(entity); entity_switch_fall_down(entity);
if (phi_s2 == 2) { if (phi_s2 == 2) {
temp_s0->unk_10 = 0; temp_s0->unk_10 = 0;
temp_s0->unk_11 = 0; temp_s0->unk_11 = 0;
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
temp_s0->unk_24++; temp_s0->unk_24++;
if ((temp_s0->unk_24 == 10) && (temp_s0->attachedEntity == NULL)) { if ((temp_s0->unk_24 == 10) && (temp_s0->attachedEntity == NULL)) {
func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); playFX_6F(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C);
} }
} }
#else #else
INCLUDE_ASM(void, "102C80", func_802E1EDC, Entity* entity); INCLUDE_ASM(void, "102C80", entity_base_switch_animate_scale, Entity* entity);
#endif #endif
void func_802E234C(Entity* entity) { void entity_base_switch_init(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
@ -475,11 +475,11 @@ void func_802E234C(Entity* entity) {
temp->unk_14.z = 1.0f; temp->unk_14.z = 1.0f;
} }
void entity_init_BlueSwitch(Entity* entity) { void entity_BlueSwitch_init(Entity* entity) {
Entity* temp_v0_2; Entity* temp_v0_2;
struct802E1400* temp = entity->dataBuf; struct802E1400* temp = entity->dataBuf;
func_802E234C(entity); entity_base_switch_init(entity);
if (D_8015C7D0[0] == 2) { if (D_8015C7D0[0] == 2) {
D_802EB3A0 = entity; D_802EB3A0 = entity;
return; return;
@ -496,10 +496,10 @@ void entity_init_BlueSwitch(Entity* entity) {
} }
} }
void entity_init_HugeBlueSwitch(Entity* entity) { void entity_HugeBlueSwitch_init(Entity* entity) {
struct802E1400* temp; struct802E1400* temp;
func_802E234C(entity); entity_base_switch_init(entity);
temp = entity->dataBuf; temp = entity->dataBuf;
entity->scale.x = 3.0f; entity->scale.x = 3.0f;
entity->scale.y = 3.0f; entity->scale.y = 3.0f;
@ -509,18 +509,18 @@ void entity_init_HugeBlueSwitch(Entity* entity) {
temp->unk_14.z = 3.0f; temp->unk_14.z = 3.0f;
} }
void func_802E2450(Entity* entity) { void entity_BrickBlock_idle(Entity* entity) {
func_802E3650(entity); entity_base_block_idle(entity);
} }
INCLUDE_ASM(void, "102C80", func_802E246C, Entity* entity, void* arg1, void* arg2); INCLUDE_ASM(void, "102C80", entity_shattering_init_pieces, Entity* entity, void* arg1, void* arg2);
INCLUDE_ASM(void, "102C80", func_802E263C, Entity* entity); INCLUDE_ASM(void, "102C80", entity_shattering_idle, Entity* entity);
#ifdef NON_MATCHING #ifdef NON_MATCHING
// display list issues // display list issues
void func_802E2BA4(s32 entityIndex) { void entity_shattering_setupGfx(s32 entityIndex) {
Gfx* temp_s2; Gfx* temp_s2;
struct802E1400* temp_s4; struct802E1400* temp_s4;
struct802E2BA4* phi_fp; struct802E2BA4* phi_fp;
@ -570,5 +570,5 @@ void func_802E2BA4(s32 entityIndex) {
gMasterGfxPos = temp_s2; gMasterGfxPos = temp_s2;
} }
#else #else
INCLUDE_ASM(s32, "102C80", func_802E2BA4); INCLUDE_ASM(s32, "102C80", entity_shattering_setupGfx);
#endif #endif

View File

@ -1,11 +1,33 @@
#include "common.h" #include "common.h"
#include "ld_addrs.h"
#include "nu/nusys.h"
// todo remove here and from undefined_syms
extern Addr _163400_BSS_START;
extern Addr _163400_BSS_END;
s32 D_80077980[] = { 0x8038F800, 0x803B5000, &D_803DA800, };
NUPiOverlaySegment D_8007798C = {
.romStart = _163400_ROM_START,
.romEnd = _163400_ROM_END,
.ramStart = _163400_VRAM,
.textStart = _163400_VRAM,
.textEnd = _16A3E0_data__s,
.dataStart = _16A3E0_data__s,
.dataEnd = _163400_BSS_START,
.bssStart = _163400_BSS_START,
.bssEnd = _163400_BSS_END,
};
u8 D_800779B0 = 0;
void state_init_language_select(void) { void state_init_language_select(void) {
D_800A0931 = 0; D_800A0931 = 0;
D_800A0932[0] = 0; D_800A0932[0] = 0;
disable_player_input(); disable_player_input();
set_time_freeze_mode(2); set_time_freeze_mode(2);
set_transition_stencil_zoom_0(0, D_800A0932[0]); set_screen_overlay_params_front(0, D_800A0932[0]);
} }
void state_init_file_select(void) { void state_init_file_select(void) {
@ -14,8 +36,8 @@ void state_init_file_select(void) {
disable_player_input(); disable_player_input();
set_time_freeze_mode(2); set_time_freeze_mode(2);
general_heap_create(); general_heap_create();
func_801452E8(0, 0); set_hud_element_nonworld_cache(0, 0);
func_80141100(); clear_hud_element_cache();
load_model_textures(0, 0, 0); load_model_textures(0, 0, 0);
gCameras[0].mode = 6; gCameras[0].mode = 6;
gCameras[0].unk_06 = 1; gCameras[0].unk_06 = 1;
@ -46,7 +68,36 @@ void state_init_file_select(void) {
INCLUDE_ASM(s32, "10400_len_d30", state_step_language_select); INCLUDE_ASM(s32, "10400_len_d30", state_step_language_select);
INCLUDE_ASM(s32, "10400_len_d30", func_800354EC); void state_step_file_select(void) {
s32 temp = D_800A0931; // needed to match
switch (D_800A0931) {
case 1:
set_windows_visible(3);
D_800A0930 = temp;
D_800A0931 = 2;
break;
case 0:
D_800A0931 = 1;
break;
case 2:
if (D_800A0930 >= 0) {
D_800A0930--;
temp = D_800A0930;
if (temp == 0) {
D_800A0930 = -1;
battle_heap_create();
nuPiReadRomOverlay(&D_8007798C);
filemenu_init(0);
}
}
if (D_800A0930 < 0) {
filemenu_update();
}
break;
}
}
void state_drawUI_language_select(void) { void state_drawUI_language_select(void) {
} }
@ -54,19 +105,19 @@ void state_drawUI_language_select(void) {
void state_drawUI_file_select(void) { void state_drawUI_file_select(void) {
} }
void func_800355D4(void) { void state_init_exit_language_select(void) {
if (D_800A0932[0] > 0) { if (D_800A0932[0] > 0) {
D_800A0931 = 0; D_800A0931 = 0;
set_transition_stencil_zoom_0(0, D_800A0932[0]); set_screen_overlay_params_front(0, D_800A0932[0]);
} else { } else {
D_800A0931 = 1; D_800A0931 = 1;
set_transition_stencil_zoom_0(0, D_800A0932[0]); set_screen_overlay_params_front(0, D_800A0932[0]);
} }
D_800A0930 = 1; D_800A0930 = 1;
gOverrideFlags &= ~0x40; gOverrideFlags &= ~0x40;
} }
void func_80035660(void) { void state_init_exit_file_select(void) {
D_800A0931 = 0; D_800A0931 = 0;
D_800A0932[0] = 0; D_800A0932[0] = 0;
D_800A0930 = 0; D_800A0930 = 0;
@ -81,12 +132,12 @@ void func_80035660(void) {
gOverrideFlags &= ~0x40; gOverrideFlags &= ~0x40;
} }
INCLUDE_ASM(s32, "10400_len_d30", func_80035704); INCLUDE_ASM(s32, "10400_len_d30", state_step_exit_language_select);
INCLUDE_ASM(s32, "10400_len_d30", func_80035B40); INCLUDE_ASM(s32, "10400_len_d30", state_step_exit_file_select);
void func_80035D18(void) { void state_drawUI_exit_language_select(void) {
} }
void func_80035D20(void) { void state_drawUI_exit_file_select(void) {
} }

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
void func_802E2EB0(Entity* entity); void entity_shattering_block_init(Entity* entity);
extern UNK_TYPE D_802E9170; extern UNK_TYPE D_802E9170;
extern UNK_TYPE D_802E91F0; extern UNK_TYPE D_802E91F0;
@ -103,19 +103,19 @@ s32 D_802E9898[9] = {
}; };
s32 D_802E98BC[8] = { s32 D_802E98BC[8] = {
0x00200000, (s32) &D_802E9850, 0x00000000, (s32)create_shadow_callback, 0x00200000, (s32) &D_802E9850, 0x00000000, (s32)entity_Shadow_init,
0x00000000, 0x00000000, 0x00000000, 0x00000000 0x00000000, 0x00000000, 0x00000000, 0x00000000
}; };
s32 D_802E98DC[9] = { s32 D_802E98DC[9] = {
0x01190A19, 0x00200000, (s32) &D_802E9874, 0x00000000, 0x01190A19, 0x00200000, (s32) &D_802E9874, 0x00000000,
(s32)create_shadow_callback, 0x00000000, 0x00000000, 0x00000000, (s32)entity_Shadow_init, 0x00000000, 0x00000000, 0x00000000,
0x00000000 0x00000000
}; };
s32 D_802E9900[9] = { s32 D_802E9900[9] = {
0x01190A19, 0x00200000, (s32) &D_802E9898, 0x00000000, 0x01190A19, 0x00200000, (s32) &D_802E9898, 0x00000000,
(s32)create_shadow_callback, 0x00000000, 0x00000000, 0x00000000, (s32)entity_Shadow_init, 0x00000000, 0x00000000, 0x00000000,
0x00000000, 0x00000000,
}; };
@ -124,18 +124,18 @@ s32 D_802E9924[3] = {
}; };
s32 D_802E9930[51] = { s32 D_802E9930[51] = {
0x00000003, 0x00000000, (s32)func_802E10F4, 0x00000009, 0x00000003, 0x00000000, (s32)entity_SaveBlock_idle, 0x00000009,
0x0000014E, 0x00000002, (s32)func_802E114C, 0x00000002, 0x0000014E, 0x00000002, (s32)entity_SaveBlock_pause_game, 0x00000002,
(s32)func_802E31EC, 0x00000003, 0x00000006, (s32)func_802E328C, (s32)entity_block_hit_init_scale, 0x00000003, 0x00000006, (s32)entity_block_hit_animate_scale,
0x00000003, 0x00000002, 0x00000000, 0x00000002, 0x00000003, 0x00000002, 0x00000000, 0x00000002,
(s32)func_802E1204, 0x00000003, 0x00000000, (s32)func_802E1270, (s32)entity_SaveBlock_show_tutorial_message, 0x00000003, 0x00000000, (s32)entity_SaveBlock_wait_for_close_tutorial,
0x00000003, 0x0000000E, 0x00000000, 0x00000002, 0x00000003, 0x0000000E, 0x00000000, 0x00000002,
(s32)func_802E1298, 0x00000003, 0x00000000, (s32)func_802E1350, (s32)entity_SaveBlock_show_choice_message, 0x00000003, 0x00000000, (s32)entity_SaveBlock_wait_for_close_choice,
0x00000002, (s32)save_game_at_player_position, 0x00000002, (s32)func_802E12F8, 0x00000002, (s32)entity_SaveBlock_save_data, 0x00000002, (s32)entity_SaveBlock_show_result_message,
0x00000003, 0x00000000, (s32)func_802E1328, 0x00000002, 0x00000003, 0x00000000, (s32)entity_SaveBlock_wait_for_close_result, 0x00000002,
(s32)func_802E117C, 0x00000003, 0x0000000C, 0x00000000, (s32)entity_SaveBlock_resume_game, 0x00000003, 0x0000000C, 0x00000000,
0x00000004, 0x00000000, 0x00000000, 0x00000002, 0x00000004, 0x00000000, 0x00000000, 0x00000002,
(s32)func_802E117C, 0x00000003, 0x00000002, 0x00000000, (s32)entity_SaveBlock_resume_game, 0x00000003, 0x00000002, 0x00000000,
0x00000001, (s32)D_802E9930, 0x00000000, 0x00000001, (s32)D_802E9930, 0x00000000,
}; };
@ -145,7 +145,7 @@ s32 D_802E99FC[7] = {
&D_0A003508, 0x00000002, 0x00000000, &D_0A003508, 0x00000002, 0x00000000,
}; };
StaticEntityData D_802E9A18 = { 0x4200, 0x0020, &D_802E99FC, {0, 0, 0, 0}, func_802E13B8, &D_802E9930, func_802E3BA4, &D_00E4B2E0, &D_00E4E7F0, 32, {0x19, 0x19, 0x19}}; StaticEntityData D_802E9A18 = { 0x4200, 0x0020, &D_802E99FC, {0, 0, 0, 0}, entity_SaveBlock_init, &D_802E9930, entity_block_handle_collision, &D_00E4B2E0, &D_00E4E7F0, 32, {0x19, 0x19, 0x19}};
// potential file split(?) // potential file split(?)
s32 D_802E9A3C[1] = { s32 D_802E9A3C[1] = {
@ -153,32 +153,32 @@ s32 D_802E9A3C[1] = {
}; };
s32 D_802E9A40[18] = { s32 D_802E9A40[18] = {
0x00000003, 0x00000000, (s32)func_802E1660, 0x00000009, 0x00000003, 0x00000000, (s32)entity_small_switch_idle, 0x00000009,
0x00000152, 0x00000002, (s32)func_802E1EA8, 0x00000002, 0x00000152, 0x00000002, (s32)entity_base_switch_start_bound_script, 0x00000002,
(s32)func_802E176C, 0x00000003, 0x00000000, (s32)func_802E17A8, (s32)entity_base_switch_anim_init, 0x00000003, 0x00000000, (s32)entity_RedSwitch_animate_scale,
0x00000003, 0x00000000, (s32)func_802E1740, 0x00000004, 0x00000003, 0x00000000, (s32)entity_RedSwitch_wait_and_reset, 0x00000004,
0x00000000, 0x00000000, 0x00000000, 0x00000000,
}; };
s32 D_802E9A88[15] = { s32 D_802E9A88[15] = {
0x00000003, 0x00000000, (s32)func_802E1614, 0x00000009, 0x00000003, 0x00000000, (s32)entity_HugeBlueSwitch_idle, 0x00000009,
0x00000152, 0x00000002, (s32)func_802E1EA8, 0x00000002, 0x00000152, 0x00000002, (s32)entity_base_switch_start_bound_script, 0x00000002,
(s32)func_802E176C, 0x00000003, 0x00000000, (s32)func_802E1EDC, (s32)entity_base_switch_anim_init, 0x00000003, 0x00000000, (s32)entity_base_switch_animate_scale,
0x00000007, 0x20000000, 0x00000000 0x00000007, 0x20000000, 0x00000000
}; };
s32 D_802E9AC4[15] = { s32 D_802E9AC4[15] = {
0x00000003, 0x00000000, (s32)func_802E1660, 0x00000009, 0x00000003, 0x00000000, (s32)entity_small_switch_idle, 0x00000009,
0x00000152, 0x00000002, (s32)func_802E1EA8, 0x00000002, 0x00000152, 0x00000002, (s32)entity_base_switch_start_bound_script, 0x00000002,
(s32)func_802E176C, 0x00000003, 0x00000000, (s32)func_802E1EDC, (s32)entity_base_switch_anim_init, 0x00000003, 0x00000000, (s32)entity_base_switch_animate_scale,
0x00000007, 0x20000000, 0x00000000 0x00000007, 0x20000000, 0x00000000
}; };
s32 D_802E9B00[16] = { s32 D_802E9B00[16] = {
0x00000003, 0x00000000, (s32)func_802E1400, 0x00000003, 0x00000003, 0x00000000, (s32)entity_GreenStompSwitch_idle, 0x00000003,
0x00000000, (s32)func_802E1460, 0x00000009, 0x00000152, 0x00000000, (s32)entity_GreenStompSwitch_retract, 0x00000009, 0x00000152,
0x00000003, 0x00000080, 0x00000000, 0x00000003, 0x00000003, 0x00000080, 0x00000000, 0x00000003,
0x00000000, (s32)func_802E14D8, 0x00000004, 0x00000000, 0x00000000, (s32)entity_GreenStompSwitch_extend, 0x00000004, 0x00000000,
}; };
s32 D_802E9B40[7] = { s32 D_802E9B40[7] = {
@ -201,14 +201,14 @@ s32 D_802E9B94[7] = {
(s32) &D_0A000740, 0x00000002, 0x00000000, (s32) &D_0A000740, 0x00000002, 0x00000000,
}; };
StaticEntityData D_802E9BB0 = { 0xA000, 0x002C, &D_802E9B78, {0, 0, 0, 0}, func_802E234C, &D_802E9A40, NULL, &D_00E62AC0, &D_00E639C0, 8, {0x16, 0x17, 0x16} }; StaticEntityData D_802E9BB0 = { 0xA000, 0x002C, &D_802E9B78, {0, 0, 0, 0}, entity_base_switch_init, &D_802E9A40, NULL, &D_00E62AC0, &D_00E639C0, 8, {0x16, 0x17, 0x16} };
StaticEntityData D_802E9BD4 = { 0xAA04, 0x002C, &D_802E9B40, {0, 0, 0, 0}, entity_init_BlueSwitch, &D_802E9AC4, NULL, &D_00E639C0, &D_00E648D0, 7, {0x16, 0x17, 0x16} }; StaticEntityData D_802E9BD4 = { 0xAA04, 0x002C, &D_802E9B40, {0, 0, 0, 0}, entity_BlueSwitch_init, &D_802E9AC4, NULL, &D_00E639C0, &D_00E648D0, 7, {0x16, 0x17, 0x16} };
StaticEntityData D_802E9BF8 = { 0xAA04, 0x002C, &D_802E9B5C, {0, 0, 0, 0}, entity_init_HugeBlueSwitch, &D_802E9A88, NULL, &D_00E639C0, &D_00E648D0, 9, {0x42, 0x4B, 0x42} }; StaticEntityData D_802E9BF8 = { 0xAA04, 0x002C, &D_802E9B5C, {0, 0, 0, 0}, entity_HugeBlueSwitch_init, &D_802E9A88, NULL, &D_00E639C0, &D_00E648D0, 9, {0x42, 0x4B, 0x42} };
StaticEntityData D_802E9C1C = { 0xC000, 0x002C, &D_802E9B94, {0, 0, 0, 0}, func_802E234C, &D_802E9B00, NULL, &D_00E62370, &D_00E62AC0, 10, {0x32, 0x0F, 0x32} }; StaticEntityData D_802E9C1C = { 0xC000, 0x002C, &D_802E9B94, {0, 0, 0, 0}, entity_base_switch_init, &D_802E9B00, NULL, &D_00E62370, &D_00E62AC0, 10, {0x32, 0x0F, 0x32} };
s32 D_802E9C40[12] = { s32 D_802E9C40[12] = {
0x00000007, 0x00000020, 0x00000003, 0x00000000, 0x00000007, 0x00000020, 0x00000003, 0x00000000,
func_802E263C, 0x00000007, 0x00000001, 0x00000007, entity_shattering_idle, 0x00000007, 0x00000001, 0x00000007,
0x20000000, 0x00000000, 0x00000000, 0x00000000 0x20000000, 0x00000000, 0x00000000, 0x00000000
}; };
@ -224,15 +224,15 @@ extern UNK_TYPE D_00E3B870;
extern UNK_TYPE D_00E3E260; extern UNK_TYPE D_00E3E260;
extern UNK_TYPE D_00E42240; extern UNK_TYPE D_00E42240;
StaticEntityData D_802E9C8C = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E32420, &D_00E35670, 21, {0x10, 0x10, 0x10}}; StaticEntityData D_802E9C8C = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E32420, &D_00E35670, 21, {0x10, 0x10, 0x10}};
StaticEntityData D_802E9CB0 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E35670, &D_00E38890, 22, {0x10, 0x10, 0x10}}; StaticEntityData D_802E9CB0 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E35670, &D_00E38890, 22, {0x10, 0x10, 0x10}};
StaticEntityData D_802E9CD4 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E38890, &D_00E3B870, 23, {0x10, 0x10, 0x10}}; StaticEntityData D_802E9CD4 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E38890, &D_00E3B870, 23, {0x10, 0x10, 0x10}};
StaticEntityData D_802E9CF8 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E32420, &D_00E35670, 24, {0x08, 0x08, 0x08}}; StaticEntityData D_802E9CF8 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E32420, &D_00E35670, 24, {0x08, 0x08, 0x08}};
StaticEntityData D_802E9D1C = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E35670, &D_00E38890, 25, {0x08, 0x08, 0x08}}; StaticEntityData D_802E9D1C = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E35670, &D_00E38890, 25, {0x08, 0x08, 0x08}};
StaticEntityData D_802E9D40 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E38890, &D_00E3B870, 26, {0x08, 0x08, 0x08}}; StaticEntityData D_802E9D40 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E38890, &D_00E3B870, 26, {0x08, 0x08, 0x08}};
StaticEntityData D_802E9D64 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, func_802E2EB0, &D_802E9C40, NULL, &D_00E3E260, &D_00E42240, 13, {0x08, 0x08, 0x08}}; StaticEntityData D_802E9D64 = { 0x0000, 0x0250, &D_802E9C70, {0, 0, 0, 0}, entity_shattering_block_init, &D_802E9C40, NULL, &D_00E3E260, &D_00E42240, 13, {0x08, 0x08, 0x08}};
void func_802E2EB0(Entity* entity) { void entity_shattering_block_init(Entity* entity) {
u32 type; u32 type;
void* a2 = NULL; void* a2 = NULL;
void* a1 = NULL; void* a1 = NULL;
@ -280,10 +280,10 @@ void func_802E2EB0(Entity* entity) {
return; return;
} }
func_802E246C(entity, a1, a2); entity_shattering_init_pieces(entity, a1, a2);
} }
void func_802E2FD0(Entity* entity) { void entity_breakable_block_create_shattering_entity(Entity* entity) {
u32 type; u32 type;
StaticEntityData* addr = NULL; StaticEntityData* addr = NULL;

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
void func_802E30C0(s32 entityIndex) { void entity_base_block_setupGfx(s32 entityIndex) {
Gfx* gfx = gMasterGfxPos; Gfx* gfx = gMasterGfxPos;
Entity* entity = get_entity_by_index(entityIndex); Entity* entity = get_entity_by_index(entityIndex);
@ -18,11 +18,11 @@ void func_802E30C0(s32 entityIndex) {
gMasterGfxPos = gfx; gMasterGfxPos = gfx;
} }
void func_802E31B0(Entity* entity) { void entity_base_block_play_vanish_effect(Entity* entity) {
func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); playFX_6F(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C);
} }
f32 func_802E31EC(Entity* entity) { f32 entity_block_hit_init_scale(Entity* entity) {
if ((get_entity_type(entity->listIndex) - 24) < 3) { if ((get_entity_type(entity->listIndex) - 24) < 3) {
entity->scale.y = 0.23f; entity->scale.y = 0.23f;
entity->scale.x = 1.04f; entity->scale.x = 1.04f;
@ -36,7 +36,7 @@ f32 func_802E31EC(Entity* entity) {
} }
} }
void func_802E328C(Entity* entity) { void entity_block_hit_animate_scale(Entity* entity) {
if ((get_entity_type(entity->listIndex) - 24) < 3) { if ((get_entity_type(entity->listIndex) - 24) < 3) {
entity->scale.x -= 0.09; entity->scale.x -= 0.09;
entity->scale.z -= 0.09; entity->scale.z -= 0.09;
@ -48,19 +48,19 @@ void func_802E328C(Entity* entity) {
entity->scale.y += 0.09; entity->scale.y += 0.09;
entity->position.y -= 3.0f; entity->position.y -= 3.0f;
} }
func_802E3650(entity); entity_base_block_idle(entity);
} }
INCLUDE_ASM(s32, "104940_len_dc0", func_802E3370); INCLUDE_ASM(s32, "104940_len_dc0", entity_base_block_update_slow_sinking);
s32 func_802E3650(Entity* entity) { s32 entity_base_block_idle(Entity* entity) {
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
s32 ret = 0; s32 ret = 0;
if (func_80112B20() != 0) { if (is_block_on_ground() != 0) {
if (entity->flags & 0x200000) { if (entity->flags & 0x200000) {
ret = 1; ret = 1;
func_802E3370(entity); entity_base_block_update_slow_sinking(entity);
if (temp->unk_10 != -1) { if (temp->unk_10 != -1) {
ItemEntity* itemEntity = get_item_entity(temp->unk_10); ItemEntity* itemEntity = get_item_entity(temp->unk_10);
itemEntity->position.y = entity->position.y + 4.0f; itemEntity->position.y = entity->position.y + 4.0f;
@ -71,7 +71,7 @@ s32 func_802E3650(Entity* entity) {
return ret; return ret;
} }
void entity_init_Hammer23Block_normal(Entity* entity) { void entity_base_block_init(Entity* entity) {
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
f32 posY; f32 posY;
@ -81,45 +81,45 @@ void entity_init_Hammer23Block_normal(Entity* entity) {
entity->flags &= ~0x200000; entity->flags &= ~0x200000;
} }
void func_802E3714(Entity* entity) { void entity_inactive_block_hit_init(Entity* entity) {
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
temp->unk_18 = 90.0f; temp->unk_18 = 90.0f;
} }
void func_802E3728(Entity* entity) { void entity_inactive_block_hit_anim(Entity* entity) {
f64 temp_f20; f64 temp_f20;
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
func_802E3A00(entity); entity_MulticoinBlock_update_timer(entity);
temp_f20 = entity->position.y; temp_f20 = entity->position.y;
entity->position.y = temp_f20 + ((f64)sin_rad((temp->unk_18 * 6.28318f) / 360.0f) * 2); entity->position.y = temp_f20 + ((f64)sin_rad((temp->unk_18 * 6.28318f) / 360.0f) * 2);
temp->unk_18 += 60.0f; temp->unk_18 += 60.0f;
if (temp->unk_18 > 450.0f) { if (temp->unk_18 > 450.0f) {
temp->unk_18 = clamp_angle(temp->unk_18); temp->unk_18 = clamp_angle(temp->unk_18);
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E37E4(Entity* entity) { void entity_inactive_block_recoil_anim(Entity* entity) {
f64 temp_f20; f64 temp_f20;
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
func_802E3A00(entity); entity_MulticoinBlock_update_timer(entity);
temp_f20 = entity->position.y; temp_f20 = entity->position.y;
entity->position.y = temp_f20 + ((f64)sin_rad((temp->unk_18 * 6.28318f) / 360.0f)); entity->position.y = temp_f20 + ((f64)sin_rad((temp->unk_18 * 6.28318f) / 360.0f));
temp->unk_18 += 60.0f; temp->unk_18 += 60.0f;
if (temp->unk_18 >= 360.0f) { if (temp->unk_18 >= 360.0f) {
temp->unk_18 = 0.0f; temp->unk_18 = 0.0f;
entity->position.y = temp->unk_14; entity->position.y = temp->unk_14;
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E3898(Entity* entity) { void entity_MulticoinBlock_init(Entity* entity) {
struct802E3650* temp; struct802E3650* temp;
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
temp = (struct802E3650*)entity->dataBuf; temp = (struct802E3650*)entity->dataBuf;
temp->unk_04 = 0xA; temp->unk_04 = 0xA;
temp->unk_06 = 0x7B; temp->unk_06 = 0x7B;
@ -129,7 +129,7 @@ void func_802E3898(Entity* entity) {
extern s32 D_802E9E54; extern s32 D_802E9E54;
extern StaticEntityData D_802EA07C; extern StaticEntityData D_802EA07C;
void func_802E38D8(Entity* entity) { void entity_MulticoinBlock_spawn_coin(Entity* entity) {
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
s32 phi_v1; s32 phi_v1;
s32 phi_v0; s32 phi_v0;
@ -155,7 +155,7 @@ void func_802E38D8(Entity* entity) {
} }
} }
void func_802E3A00(Entity* entity) { void entity_MulticoinBlock_update_timer(Entity* entity) {
u16 temp_v0; u16 temp_v0;
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
s16 phi_return; s16 phi_return;
@ -171,23 +171,23 @@ void func_802E3A00(Entity* entity) {
} }
} }
void func_802E3A48(Entity* entity) { void entity_MulticoinBlock_idle(Entity* entity) {
s32 temp_v0; s32 temp_v0;
struct802E3650* temp = (struct802E3650*)entity->dataBuf; struct802E3650* temp = (struct802E3650*)entity->dataBuf;
if ((entity->collisionFlags & 0x80) != 0) { if ((entity->collisionFlags & 0x80) != 0) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
return; return;
} }
func_802E3A00(entity); entity_MulticoinBlock_update_timer(entity);
func_802E3650(entity); entity_base_block_idle(entity);
if (temp->unk_03 != 0) { if (temp->unk_03 != 0) {
create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); create_entity(&D_802EA07C, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000);
entity->flags |= 0x20000020; entity->flags |= 0x20000020;
} }
} }
void func_802E3B08(Entity* entity) { void entity_MulticoinBlock_check_if_inactive(Entity* entity) {
s32 temp_v0; s32 temp_v0;
u16 temp_v1; u16 temp_v1;
struct802E3650* temp = entity->dataBuf; struct802E3650* temp = entity->dataBuf;
@ -204,7 +204,7 @@ extern s32 D_802E9E80;
#ifdef NON_MATCHING #ifdef NON_MATCHING
// tail merge + rodata // tail merge + rodata
s32 func_802E3BA4(Entity* entity) { s32 entity_block_handle_collision(Entity* entity) {
u8 bVar1; u8 bVar1;
s32 bVar2; s32 bVar2;
s32 iVar3; s32 iVar3;
@ -233,11 +233,11 @@ s32 func_802E3BA4(Entity* entity) {
if (!(playerStatus->flags & 2)) { if (!(playerStatus->flags & 2)) {
return 1; return 1;
} }
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
return 1; return 1;
} }
if (bVar1 & 0x80) { if (bVar1 & 0x80) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
return 1; return 1;
} }
@ -309,22 +309,22 @@ s32 func_802E3BA4(Entity* entity) {
case 0x1d: case 0x1d:
case 0x1e: case 0x1e:
case 0x1f: case 0x1f:
func_80110678(entity); entity_start_script(entity);
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
return 1; return 1;
case 0xb: case 0xb:
func_80110678(entity); entity_start_script(entity);
break; break;
} }
return 1; return 1;
} }
#else #else
INCLUDE_ASM(s32, "104940_len_dc0", func_802E3BA4, Entity* entity); INCLUDE_ASM(s32, "104940_len_dc0", entity_block_handle_collision, Entity* entity);
#endif #endif
void entity_init_Hammer1Block_normal(Entity* entity) { void entity_init_Hammer1Block_normal(Entity* entity) {
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
entity->renderSetupFunc = func_802E30C0; entity->renderSetupFunc = entity_base_block_setupGfx;
} }
s32 entity_init_HammerBlock_small(Entity* entity) { s32 entity_init_HammerBlock_small(Entity* entity) {

View File

@ -8,11 +8,11 @@ typedef struct struct802E3F0C {
/* 0x12 */ s16 unk_12; /* 0x12 */ s16 unk_12;
} struct802E3F0C; } struct802E3F0C;
void func_802E3E80(Entity* entity) { void entity_ItemBlock_idle(Entity* entity) {
func_802E3650(entity); entity_base_block_idle(entity);
} }
void func_802E3E9C(Entity* entity) { void entity_HiddenItemBlock_idle(Entity* entity) {
s32 alpha = entity->alpha; s32 alpha = entity->alpha;
if (gPlayerStatus.animFlags & 1) { if (gPlayerStatus.animFlags & 1) {
@ -30,19 +30,19 @@ void func_802E3E9C(Entity* entity) {
} }
} }
INCLUDE_ASM(s32, "105700_len_2130", func_802E3EE0); INCLUDE_ASM(s32, "105700_len_2130", entity_HitItemBlock_appear);
INCLUDE_ASM(void, "105700_len_2130", func_802E3F0C, Entity* entity); INCLUDE_ASM(void, "105700_len_2130", entity_ItemBlock_spawn_item, Entity* entity);
void func_802E4040(Entity* entity) { void entity_TriggerBlock_start_bound_script_2(Entity* entity) {
func_80110678(entity); entity_start_script(entity);
} }
void func_802E405C(Entity* entity) { void entity_TriggerBlock_play_vanish_effect(Entity* entity) {
D_802EB3B0 = func_80072230(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C); D_802EB3B0 = playFX_6F(0, entity->position.x, entity->position.y, entity->position.z, 1.0f, 0x3C);
} }
void func_802E40A0(Entity* entity) { void entity_HitItemBlock_play_anim(Entity* entity) {
s32 entityType = get_entity_type(entity->listIndex); s32 entityType = get_entity_type(entity->listIndex);
if (entityType == 0x12 || entityType == 0x14) { if (entityType == 0x12 || entityType == 0x14) {
@ -52,7 +52,7 @@ void func_802E40A0(Entity* entity) {
} }
} }
void func_802E4108(Entity* entity) { void entity_HitItemBlock_show_inactive(Entity* entity) {
Entity* someEntity; // TODO: better var name Entity* someEntity; // TODO: better var name
Shadow* someShadow; // TODO: better var name Shadow* someShadow; // TODO: better var name
struct802E3F0C* temp = entity->dataBuf; struct802E3F0C* temp = entity->dataBuf;
@ -63,7 +63,7 @@ void func_802E4108(Entity* entity) {
someShadow->flags &= ~1; someShadow->flags &= ~1;
} }
void func_802E4154(Entity* entity) { void entity_ItemBlock_check_if_inactive(Entity* entity) {
struct802E3F0C* temp = entity->dataBuf; struct802E3F0C* temp = entity->dataBuf;
if ((temp->unk_A != 0xFFFF) && get_global_flag(temp->unk_A)) { if ((temp->unk_A != 0xFFFF) && get_global_flag(temp->unk_A)) {
@ -77,11 +77,11 @@ void func_802E4154(Entity* entity) {
create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000); create_entity(phi_a0, entity->position.x, entity->position.y, entity->position.z, entity->rotation.y, 0x80000000);
set_entity_commandlist(entity, &D_802EA310); set_entity_commandlist(entity, &D_802EA310);
} else { } else {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E421C(Entity* entity) { void entity_ItemBlock_replace_with_inactive(Entity* entity) {
s32 entityType = get_entity_type(entity->listIndex); s32 entityType = get_entity_type(entity->listIndex);
UNK_PTR entityData = &D_802EA07C; UNK_PTR entityData = &D_802EA07C;
s32 entityIndex; s32 entityIndex;
@ -113,7 +113,7 @@ void func_802E421C(Entity* entity) {
shadow = get_shadow_by_index(entityTemp->shadowIndex); shadow = get_shadow_by_index(entityTemp->shadowIndex);
shadow->flags |= 0x400001; shadow->flags |= 0x400001;
temp_s0 = func_80112B20(entity); temp_s0 = is_block_on_ground(entity);
entityType2 = get_entity_type(entity->listIndex); entityType2 = get_entity_type(entity->listIndex);
if (entityType2 == 0x12 || entityType2 == 0x14) { if (entityType2 == 0x12 || entityType2 == 0x14) {
@ -148,13 +148,13 @@ void func_802E421C(Entity* entity) {
shadow->flags |= 0x400000; shadow->flags |= 0x400000;
} }
void func_802E4484(Entity* entity) { void entity_HitItemBlock_hide(Entity* entity) {
entity->flags |= 1; entity->flags |= 1;
entity->flags &= ~0x100; entity->flags &= ~0x100;
get_shadow_by_index(entity->shadowIndex)->flags |= 0x10000001; get_shadow_by_index(entity->shadowIndex)->flags |= 0x10000001;
} }
s32 func_802E44CC(Entity* entity) { s32 entity_TriggerBlock_start_bound_script(Entity* entity) {
if (entity->boundScriptBytecode != NULL) { if (entity->boundScriptBytecode != NULL) {
entity->flags |= 0x1000000; entity->flags |= 0x1000000;
return TRUE; return TRUE;
@ -163,19 +163,19 @@ s32 func_802E44CC(Entity* entity) {
} }
// TODO: new file here? // TODO: new file here?
void func_802E44F8(void) { void entity_TriggerBlock_disable_player_input(void) {
disable_player_input(); disable_player_input();
gPlayerStatus.currentSpeed = 0.0f; gPlayerStatus.currentSpeed = 0.0f;
gPlayerStatus.flags |= 0x800000; gPlayerStatus.flags |= 0x800000;
set_action_state(8); set_action_state(8);
gravity_use_fall_params(); gravity_use_fall_parms();
} }
void func_802E4540(void) { void entity_TriggerBlock_enable_player_input(void) {
enable_player_input(); enable_player_input();
} }
void func_802E455C(s32 entityIndex) { void entity_ItemBlock_setupGfx(s32 entityIndex) {
Gfx* gfx = gMasterGfxPos; Gfx* gfx = gMasterGfxPos;
Entity* entity = get_entity_by_index(entityIndex); Entity* entity = get_entity_by_index(entityIndex);
@ -193,27 +193,27 @@ void func_802E455C(s32 entityIndex) {
gMasterGfxPos = gfx; gMasterGfxPos = gfx;
} }
void func_802E464C(Entity* entity) { void entity_ItemBlock_init(Entity* entity) {
struct802E3650* temp; struct802E3650* temp;
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
temp = entity->dataBuf; temp = entity->dataBuf;
temp->unk_10 = D_8015C7D2; temp->unk_10 = D_8015C7D2;
temp->unk_0A = 0xFFFF; temp->unk_0A = 0xFFFF;
entity->renderSetupFunc = func_802E455C; entity->renderSetupFunc = entity_ItemBlock_setupGfx;
} }
void func_802E4694(Entity* entity) { void entity_HiddenItemBlock_init(Entity* entity) {
func_802E464C(entity); entity_ItemBlock_init(entity);
entity->alpha = 0; entity->alpha = 0;
} }
void func_802E46BC(Entity* entity) { void entity_ItemlessBlock_init(Entity* entity) {
AnimatedMesh* animMesh; AnimatedMesh* animMesh;
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
entity->renderSetupFunc = func_802E455C; entity->renderSetupFunc = entity_ItemBlock_setupGfx;
animMesh = get_anim_mesh(entity->virtualModelIndex); animMesh = get_animator_by_index(entity->virtualModelIndex);
animMesh->renderMode = 0x11; animMesh->renderMode = 0x11;
animMesh->flags |= 0x10000; animMesh->flags |= 0x10000;
} }

View File

@ -5,15 +5,15 @@ extern u32* D_802EA760;
extern StaticEntityData D_802EA7BC; extern StaticEntityData D_802EA7BC;
extern UNK_TYPE D_802EB3C0; extern UNK_TYPE D_802EB3C0;
INCLUDE_ASM(s32, "105F90", func_802E4710); INCLUDE_ASM(s32, "105F90", entity_HeartBlockContent_get_previous_yaw);
INCLUDE_ASM(s32, "105F90", func_802E4730); INCLUDE_ASM(s32, "105F90", entity_HeartBlockContent__setupGfx);
void func_802E4AEC(s32 entityIndex) { void entity_HeartBlockContent_setupGfx(s32 entityIndex) {
func_802E4730(entityIndex, &D_0A000808); entity_HeartBlockContent__setupGfx(entityIndex, &D_0A000808);
} }
void func_802E4B10(Entity* entity) { void entity_HeartBlockContent_set_initial_pos(Entity* entity) {
struct802E4B10* temp = entity->dataBuf; struct802E4B10* temp = entity->dataBuf;
Entity* entityTemp = get_entity_by_index(temp->unk_00); Entity* entityTemp = get_entity_by_index(temp->unk_00);
@ -22,11 +22,11 @@ void func_802E4B10(Entity* entity) {
entity->position.z = entityTemp->position.z; entity->position.z = entityTemp->position.z;
} }
void func_802E4B60(Entity* entity) { void entity_HeartBlockContent__reset(Entity* entity) {
struct802E4B10* temp_s0; struct802E4B10* temp_s0;
Entity* someEntity; Entity* someEntity;
entity->renderSetupFunc = func_802E4AEC; entity->renderSetupFunc = entity_HeartBlockContent_setupGfx;
entity->alpha = 255; entity->alpha = 255;
temp_s0 = entity->dataBuf; temp_s0 = entity->dataBuf;
entity->flags |= 0x2000; entity->flags |= 0x2000;
@ -49,10 +49,10 @@ void func_802E4B60(Entity* entity) {
entity->scale.y = entity->scale.x; entity->scale.y = entity->scale.x;
entity->scale.z = entity->scale.x; entity->scale.z = entity->scale.x;
func_802E4B10(entity); entity_HeartBlockContent_set_initial_pos(entity);
} }
INCLUDE_ASM(s32, "105F90", func_802E4C10); INCLUDE_ASM(s32, "105F90", entity_HeartBlockContent_anim_idle);
void func_802E4DE0(Entity* entity) { void func_802E4DE0(Entity* entity) {
struct802E4B10* temp = entity->dataBuf; struct802E4B10* temp = entity->dataBuf;
@ -64,65 +64,65 @@ void func_802E4DE0(Entity* entity) {
entity->rotation.z = 0.0f; entity->rotation.z = 0.0f;
} }
INCLUDE_ASM(s32, "105F90", func_802E4E04); INCLUDE_ASM(s32, "105F90", entity_HeartBlockContent__anim_heal);
void func_802E5308(Entity* entity) { void entity_HeartBlock_idle(Entity* entity) {
func_802E3650(entity); entity_base_block_idle(entity);
} }
INCLUDE_ASM(s32, "105F90", func_802E5324); INCLUDE_ASM(s32, "105F90", entity_HeartBlockContent_anim_beating);
void func_802E540C(Entity* entity) { void entity_HeartBlockContent_init(Entity* entity) {
func_802E4B10(entity); entity_HeartBlockContent_set_initial_pos(entity);
} }
void func_802E5428(Entity* entity) { void entity_HeartBlockContent_reset(Entity* entity) {
func_802E4B60(entity); entity_HeartBlockContent__reset(entity);
func_80110BCC(entity, &D_802EA728); entity_set_render_script(entity, &D_802EA728);
} }
void func_802E545C(Entity* entity) { void entity_HeartBlockContent_idle(Entity* entity) {
func_802E4C10(entity, 0); entity_HeartBlockContent_anim_idle(entity, 0);
func_802E5324(entity); entity_HeartBlockContent_anim_beating(entity);
} }
void func_802E548C(Entity* entity) { void entity_HeartBlockContent_anim_heal(Entity* entity) {
func_802E4E04(entity, 0); entity_HeartBlockContent__anim_heal(entity, 0);
} }
void func_802E54A8(Entity* entity) { void entity_HeartBlock_change_render_script(Entity* entity) {
func_80110BCC(entity, &D_802EA760); entity_set_render_script(entity, &D_802EA760);
} }
void func_802E54CC(Entity* entity) { void entity_HeartBlock_show_tutorial_message(Entity* entity) {
if ((!gPlayerData.partners[1].enabled) && get_global_flag(SI_SAVE_FLAG(96)) == 0) { if ((!gPlayerData.partners[1].enabled) && get_global_flag(SI_SAVE_FLAG(96)) == 0) {
UNK_TYPE* ptr = &D_802EB3C0; UNK_TYPE* ptr = &D_802EB3C0;
*ptr = 0; *ptr = 0;
load_string(0x1D0001, ptr); msg_get_printer_for_string(0x1D0001, ptr);
set_time_freeze_mode(1); set_time_freeze_mode(1);
gOverrideFlags |= 0x40; gOverrideFlags |= 0x40;
disable_player_input(); disable_player_input();
set_global_flag(SI_SAVE_FLAG(96)); set_global_flag(SI_SAVE_FLAG(96));
return; return;
} }
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
void func_802E555C(Entity* entity) { void entity_HeartBlock_wait_for_close_tutorial(Entity* entity) {
if (D_802EB3C0) { if (D_802EB3C0) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
set_time_freeze_mode(0); set_time_freeze_mode(0);
gOverrideFlags &= ~0x40; gOverrideFlags &= ~0x40;
enable_player_input(); enable_player_input();
} }
} }
s8 func_802E55A8(Entity* entity, StaticEntityData* data) { s8 entity_HeartBlock_create_child_entity(Entity* entity, StaticEntityData* data) {
s32 temp_s2 = D_8015C7D0[0]; s32 temp_s2 = D_8015C7D0[0];
Entity* someEntity; Entity* someEntity;
struct802E4B10* temp_v1; struct802E4B10* temp_v1;
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f, someEntity = get_entity_by_index(create_entity(data, entity->position.x, entity->position.y, entity->position.z, 0.0f,
0x80000000)); 0x80000000));
temp_v1 = someEntity->dataBuf; temp_v1 = someEntity->dataBuf;
@ -135,6 +135,6 @@ s8 func_802E55A8(Entity* entity, StaticEntityData* data) {
} }
} }
void func_802E5648(Entity* entity) { void entity_HeartBlock_init(Entity* entity) {
func_802E55A8(entity, &D_802EA7BC); entity_HeartBlock_create_child_entity(entity, &D_802EA7BC);
} }

View File

@ -2,7 +2,7 @@
extern StaticEntityData D_802EA934; extern StaticEntityData D_802EA934;
f32 func_802E5670(struct802E4B10* arg0, s32 arg1) { f32 entity_SuperBlockContent_get_previous_yaw(struct802E4B10* arg0, s32 arg1) {
s32 idx = arg0->unk_D0 - arg1; s32 idx = arg0->unk_D0 - arg1;
if (idx < 0) { if (idx < 0) {
@ -11,7 +11,7 @@ f32 func_802E5670(struct802E4B10* arg0, s32 arg1) {
return arg0->unk_D4[idx]; return arg0->unk_D4[idx];
} }
void func_802E5690(s32 entityIndex) { void entity_upgrade_block_hide_content(s32 entityIndex) {
Entity* someEntity = get_entity_by_index(entityIndex); Entity* someEntity = get_entity_by_index(entityIndex);
struct802E3650* temp = someEntity->dataBuf; struct802E3650* temp = someEntity->dataBuf;
@ -22,11 +22,11 @@ void func_802E5690(s32 entityIndex) {
} }
} }
s32 func_802E56D0(Entity* entity) { s32 entity_upgrade_block_idle(Entity* entity) {
return func_802E3650(entity); return entity_base_block_idle(entity);
} }
void func_802E56EC(Entity* entity) { void entity_upgrade_block_check_if_inactive(Entity* entity) {
struct802E3650* temp_s0 = entity->dataBuf; struct802E3650* temp_s0 = entity->dataBuf;
if (temp_s0->unk_0A != 0xFFFF && !get_global_flag(temp_s0->unk_0A)) { if (temp_s0->unk_0A != 0xFFFF && !get_global_flag(temp_s0->unk_0A)) {
@ -41,24 +41,24 @@ void func_802E56EC(Entity* entity) {
} }
} }
void func_802E578C(Entity* entity) { void entity_upgrade_block_init(Entity* entity) {
struct802E3650* temp_s1 = entity->dataBuf; struct802E3650* temp_s1 = entity->dataBuf;
entity_init_Hammer23Block_normal(entity); entity_base_block_init(entity);
entity->rotation.y += 180.0f; entity->rotation.y += 180.0f;
temp_s1->unk_0A = 0xFFFF; temp_s1->unk_0A = 0xFFFF;
temp_s1->unk_12 = -1; temp_s1->unk_12 = -1;
} }
void func_802E57E4(Entity* entity) { void entity_SuperBlock_init(Entity* entity) {
func_802E578C(entity); entity_upgrade_block_init(entity);
} }
void func_802E5800(Entity* entity) { void entity_UltraBlock_init(Entity* entity) {
func_802E578C(entity); entity_upgrade_block_init(entity);
} }
void func_802E581C(Entity* entity) { void entity_SuperBlock_HitEffect_attach_to_parent(Entity* entity) {
struct802E3650* temp = entity->dataBuf; struct802E3650* temp = entity->dataBuf;
Entity* temp_v0 = get_entity_by_index(temp->unk_00); Entity* temp_v0 = get_entity_by_index(temp->unk_00);
@ -68,12 +68,12 @@ void func_802E581C(Entity* entity) {
} }
// display list func // display list func
INCLUDE_ASM(s32, "106EF0", func_802E586C); INCLUDE_ASM(s32, "106EF0", entity_SuperBlock_HitEffect_setupGfx);
void func_802E5E50(Entity* entity) { void entity_SuperBlock_HitEffect_idle(Entity* entity) {
struct802E4B10* temp_s0 = entity->dataBuf; struct802E4B10* temp_s0 = entity->dataBuf;
func_802E581C(entity); entity_SuperBlock_HitEffect_attach_to_parent(entity);
if (temp_s0->unk_0A != 0) { if (temp_s0->unk_0A != 0) {
entity->renderSetupFunc = NULL; entity->renderSetupFunc = NULL;
} }
@ -89,23 +89,23 @@ void func_802E5E50(Entity* entity) {
if (temp_s0->unk_0A == 0 && gOverrideFlags == 0) { if (temp_s0->unk_0A == 0 && gOverrideFlags == 0) {
if (--temp_s0->unk_02 <= 0) { if (--temp_s0->unk_02 <= 0) {
temp_s0->unk_02 = 50; temp_s0->unk_02 = 50;
func_80070550(3, entity->position.x, entity->position.y, entity->position.z, 22.0f, 8.0f, 4, 20); playFX_22(3, entity->position.x, entity->position.y, entity->position.z, 22.0f, 8.0f, 4, 20);
} }
} }
} }
void func_802E5F50(Entity* entity) { void entity_init_SuperBlock_HitEffect1(Entity* entity) {
struct802E3650* temp = entity->dataBuf; struct802E3650* temp = entity->dataBuf;
temp->unk_128 = &D_0A000328; temp->unk_128 = &D_0A000328;
temp->unk_12C = &D_0A000380; temp->unk_12C = &D_0A000380;
entity->renderSetupFunc = func_802E586C; entity->renderSetupFunc = entity_SuperBlock_HitEffect_setupGfx;
} }
void func_802E5F7C(Entity* entity) { void entity_init_SuperBlock_HitEffect2(Entity* entity) {
struct802E3650* temp = entity->dataBuf; struct802E3650* temp = entity->dataBuf;
temp->unk_128 = &D_0A000800; temp->unk_128 = &D_0A000800;
temp->unk_12C = &D_0A000750; temp->unk_12C = &D_0A000750;
entity->renderSetupFunc = func_802E586C; entity->renderSetupFunc = entity_SuperBlock_HitEffect_setupGfx;
} }

View File

@ -1,28 +1,28 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "107830_len_e70", func_802E5FB0); INCLUDE_ASM(s32, "107830_len_e70", entity_ScriptSpring_idle);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6064); INCLUDE_ASM(s32, "107830_len_e70", entity_SimpleSpring_idle);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6118); INCLUDE_ASM(s32, "107830_len_e70", entity_SimpleSpring_set_jump_params);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6178); INCLUDE_ASM(s32, "107830_len_e70", entity_SimpleSpring_enable_player_input);
void func_802E6194(void) { void entity_ScriptSpring_init(void) {
} }
INCLUDE_ASM(s32, "107830_len_e70", func_802E619C); INCLUDE_ASM(s32, "107830_len_e70", entity_SimpleSpring_init);
INCLUDE_ASM(s32, "107830_len_e70", func_802E61B0); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_setupGfx);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6338); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_set_ispy_notification);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6390); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_hide);
INCLUDE_ASM(s32, "107830_len_e70", func_802E63A8); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_idle);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6574); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_flip_over);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6B6C); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_is_item_on_top);
INCLUDE_ASM(s32, "107830_len_e70", func_802E6C24); INCLUDE_ASM(s32, "107830_len_e70", entity_HiddenPanel_init);

View File

@ -1,37 +1,37 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E6E20); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_adjust_camera);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E6E90); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_reset_camera);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E6ED8); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_setupGfx);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7034); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_check_opened);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E70B0); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_idle);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E71F8); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_begin_opening);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7230); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_open);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E742C); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_close);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E75C0); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_GiantChest_hide_effect);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E75E4); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_GiantChest_open);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7AE4); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_GiantChest_give_equipment);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7C70); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_start_bound_script);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7C8C); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_enable_player_input);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7CB8); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_GiantChest_await_got_item);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7D28); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_clear_item_id);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7D38); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_readargs);
INCLUDE_ASM(s32, "1086a0_len_fc0", func_802E7D54); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_GiantChest_init);
INCLUDE_ASM(s32, "1086a0_len_fc0", entity_init_Chest); INCLUDE_ASM(s32, "1086a0_len_fc0", entity_Chest_init);

View File

@ -18,7 +18,7 @@ typedef struct struct802E7DE0 {
/* 0x304 */ f32 unk_304[36]; /* 0x304 */ f32 unk_304[36];
} struct802E7DE0; } struct802E7DE0;
INCLUDE_ASM(s32, "109660_len_1270", func_802E7DE0); INCLUDE_ASM(s32, "109660_len_1270", entity_WoodenCrate_init_fragments);
typedef struct struct802E7F40 { typedef struct struct802E7F40 {
/* 0x00 */ s32 unk_00; /* 0x00 */ s32 unk_00;
@ -29,7 +29,7 @@ typedef struct struct802E7F40 {
/* 0x14 */ s32 unk_14; /* 0x14 */ s32 unk_14;
} struct802E7F40; } struct802E7F40;
void func_802E7F40(Entity* entity) { void entity_WoodenCrate_init(Entity* entity) {
struct802E7F40* temp = entity->dataBuf; struct802E7F40* temp = entity->dataBuf;
entity->scale.y = 0.85714287f; entity->scale.y = 0.85714287f;
@ -37,18 +37,18 @@ void func_802E7F40(Entity* entity) {
temp->unk_04 = 0xFFFF; temp->unk_04 = 0xFFFF;
} }
void func_802E7F6C(Entity* entity) { void entity_WoodenCrate_reset_fragments(Entity* entity) {
struct802E7F40* temp = entity->dataBuf; struct802E7F40* temp = entity->dataBuf;
temp->unk_0C = entity->position.y; temp->unk_0C = entity->position.y;
func_802E7DE0(entity, &D_0A004350, &D_0A0026F0); entity_WoodenCrate_init_fragments(entity, &D_0A004350, &D_0A0026F0);
} }
INCLUDE_ASM(s32, "109660_len_1270", func_802E7FA0); INCLUDE_ASM(s32, "109660_len_1270", entity_WoodenCrate_update_fragments);
INCLUDE_ASM(s32, "109660_len_1270", func_802E854C); INCLUDE_ASM(s32, "109660_len_1270", entity_WoodenCrate_setupGfx);
s32 func_802E8858(Entity* entity) { s32 entity_WoodenCrate_idle(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32 phi_a0 = FALSE; s32 phi_a0 = FALSE;
@ -61,17 +61,17 @@ s32 func_802E8858(Entity* entity) {
} }
if (phi_a0) { if (phi_a0) {
func_802E7F6C(entity); entity_WoodenCrate_reset_fragments(entity);
func_80110BCC(entity, &D_802EAE7C); entity_set_render_script(entity, &D_802EAE7C);
func_80110678(entity); entity_start_script(entity);
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
sfx_play_sound(0x20AE); sfx_play_sound(0x20AE);
} }
} }
f32 func_800E546C(void); f32 player_get_camera_facing_angle(void);
void func_802E88EC(Entity* entity, f32 arg1) { void entity_WoodenCrate_shatter(Entity* entity, f32 arg1) {
struct802E7F40* temp = entity->dataBuf; struct802E7F40* temp = entity->dataBuf;
if (temp->unk_00 != -1) { if (temp->unk_00 != -1) {
@ -86,7 +86,7 @@ void func_802E88EC(Entity* entity, f32 arg1) {
if (flag) { if (flag) {
make_item_entity(temp->unk_00, entity->position.x, entity->position.y + 33.0, entity->position.z, 0xA, 0, make_item_entity(temp->unk_00, entity->position.x, entity->position.y + 33.0, entity->position.z, 0xA, 0,
func_800E546C(), temp->unk_04); player_get_camera_facing_angle(), temp->unk_04);
} }
} }
} }

View File

@ -11,17 +11,17 @@ typedef struct struct802E89B0 {
/* 0x18 */ f32 unk_18; /* 0x18 */ f32 unk_18;
} struct802E89B0; } struct802E89B0;
void func_802E89B0(Entity* entity) { void entity_BlueWarpPipe_check_if_active(Entity* entity) {
struct802E89B0* temp_s0; struct802E89B0* temp_s0;
temp_s0 = entity->dataBuf; temp_s0 = entity->dataBuf;
if (get_global_flag(temp_s0->unk_14)) { if (get_global_flag(temp_s0->unk_14)) {
temp_s0->unk_04 = 0x10; temp_s0->unk_04 = 0x10;
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E89F8(Entity* entity) { void entity_BlueWarpPipe_rise_up(Entity* entity) {
struct802E89B0* temp = entity->dataBuf; struct802E89B0* temp = entity->dataBuf;
temp->unk_04--; temp->unk_04--;
@ -29,11 +29,11 @@ void func_802E89F8(Entity* entity) {
entity->position.y += 2.3125; entity->position.y += 2.3125;
} else { } else {
temp->unk_04 = 0; temp->unk_04 = 0;
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E8A58(Entity* entity) { void entity_BlueWarpPipe_wait_for_player_to_get_off(Entity* entity) {
struct802E89B0* temp = entity->dataBuf; struct802E89B0* temp = entity->dataBuf;
if (temp->unk_0C == gGameStatusPtr->entryID) { if (temp->unk_0C == gGameStatusPtr->entryID) {
@ -49,15 +49,15 @@ void func_802E8A58(Entity* entity) {
} }
break; break;
default: default:
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
break; break;
} }
} else { } else {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E8ADC(Entity* entity) { void entity_BlueWarpPipe_idle(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if ((entity->collisionFlags & 1) != 0) { if ((entity->collisionFlags & 1) != 0) {
@ -69,7 +69,7 @@ void func_802E8ADC(Entity* entity) {
if ((stickAxis0 != 0) || (stickAxis1 != 0)) { if ((stickAxis0 != 0) || (stickAxis1 != 0)) {
if (atan2(0.0f, 0.0f, stickAxis0, stickAxis1) < 60.0f) { if (atan2(0.0f, 0.0f, stickAxis0, stickAxis1) < 60.0f) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
} }
@ -78,7 +78,7 @@ void func_802E8ADC(Entity* entity) {
} }
} }
void func_802E8BC0(Entity* entity) { void entity_BlueWarpPipe_set_player_move_to_center(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
struct802E89B0* temp = entity->dataBuf; struct802E89B0* temp = entity->dataBuf;
MapConfig* mapConfig = get_current_map_header(); MapConfig* mapConfig = get_current_map_header();
@ -88,7 +88,7 @@ void func_802E8BC0(Entity* entity) {
entryX = (*mapConfig->entryList)[temp->unk_0C].x; entryX = (*mapConfig->entryList)[temp->unk_0C].x;
entryZ = (*mapConfig->entryList)[temp->unk_0C].z; entryZ = (*mapConfig->entryList)[temp->unk_0C].z;
temp->unk_04 = func_800E0088(entryX, entryZ) / playerStatus->runSpeed; temp->unk_04 = get_xz_dist_to_player(entryX, entryZ) / playerStatus->runSpeed;
if (temp->unk_04 == 0) { if (temp->unk_04 == 0) {
temp->unk_04 = 1; temp->unk_04 = 1;
} }
@ -101,15 +101,15 @@ void func_802E8BC0(Entity* entity) {
move_player(temp->unk_04, temp_f20, playerStatus->runSpeed); move_player(temp->unk_04, temp_f20, playerStatus->runSpeed);
} }
void func_802E8C94(Entity* entity) { void entity_BlueWarpPipe_wait_player_move_to_center(Entity* entity) {
Trigger* trigger = (Trigger*)entity->dataBuf; // TODO: is Trigger correct? Trigger* trigger = (Trigger*)entity->dataBuf; // TODO: is Trigger correct?
if (--trigger->params1 == -1) { if (--trigger->params1 == -1) {
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void player_enter_blue_pipe(Entity* bluePipe) { void entity_BlueWarpPipe_enter_pipe_init(Entity* bluePipe) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Trigger* pipeTrigger = (Trigger*)bluePipe->dataBuf; // TODO: is Trigger correct? Trigger* pipeTrigger = (Trigger*)bluePipe->dataBuf; // TODO: is Trigger correct?
@ -122,7 +122,7 @@ void player_enter_blue_pipe(Entity* bluePipe) {
disable_player_shadow(); disable_player_shadow();
} }
void func_802E8D74(Entity* entity) { void entity_BlueWarpPipe_enter_pipe_update(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
Trigger* entityTrigger = (Trigger*)entity->dataBuf; // TODO: is Trigger correct? Trigger* entityTrigger = (Trigger*)entity->dataBuf; // TODO: is Trigger correct?
@ -133,21 +133,21 @@ void func_802E8D74(Entity* entity) {
playerStatus->renderMode = 0xD; playerStatus->renderMode = 0xD;
playerStatus->position.y -= 50.0f; playerStatus->position.y -= 50.0f;
func_802DDFF8(0x10002, 0, 0, 0, 0, 0, 0); func_802DDFF8(0x10002, 0, 0, 0, 0, 0, 0);
exec_entity_updatecmd(entity); exec_entity_commandlist(entity);
} }
} }
void func_802E8E10(Entity* entity) { void entity_BlueWarpPipe_start_bound_script(Entity* entity) {
Bytecode* triggerScriptStart = ((Trigger*)entity->dataBuf)->scriptSource; Bytecode* triggerScriptStart = ((Trigger*)entity->dataBuf)->scriptSource;
gOverrideFlags &= ~0x40; gOverrideFlags &= ~0x40;
entity->boundScriptBytecode = triggerScriptStart; entity->boundScriptBytecode = triggerScriptStart;
func_80110678(entity); entity_start_script(entity);
} }
INCLUDE_ASM(s32, "10A230", push_entity_matrix); INCLUDE_ASM(s32, "10A230", entity_BlueWarpPipe_setupGfx);
f32 func_802E8F94(Entity* entity) { f32 entity_init_BlueWarpPipe(Entity* entity) {
struct802E89B0* temp_s0; struct802E89B0* temp_s0;
s32* temp = &D_8015C7D0; s32* temp = &D_8015C7D0;
s32 temp2; s32 temp2;
@ -158,7 +158,7 @@ f32 func_802E8F94(Entity* entity) {
temp2 = temp[0]; temp2 = temp[0];
temp3 = temp[1]; temp3 = temp[1];
temp4 = temp[2]; temp4 = temp[2];
entity->renderSetupFunc = &push_entity_matrix; entity->renderSetupFunc = &entity_BlueWarpPipe_setupGfx;
temp_s0 = entity->dataBuf; temp_s0 = entity->dataBuf;
temp5 = &entity->position.y; // required... wtf temp5 = &entity->position.y; // required... wtf
temp_s0->unk_0C = temp2; temp_s0->unk_0C = temp2;

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
void func_802E9050(Entity* entity) { void entity_Signpost_idle(Entity* entity) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32 val = fabsf(clamp_angle(180.0f - entity->rotation.y) - clamp_angle(atan2(entity->position.x, entity->position.z, f32 val = fabsf(clamp_angle(180.0f - entity->rotation.y) - clamp_angle(atan2(entity->position.x, entity->position.z,
playerStatus->position.x, playerStatus->position.z))); playerStatus->position.x, playerStatus->position.z)));
@ -8,7 +8,7 @@ void func_802E9050(Entity* entity) {
if (!(playerStatus->animFlags & 1) && !(entity->collisionFlags & 1) && (val <= 40.0f || val >= 320.0f)) { if (!(playerStatus->animFlags & 1) && !(entity->collisionFlags & 1) && (val <= 40.0f || val >= 320.0f)) {
entity->flags |= 0x1000; entity->flags |= 0x1000;
if ((playerStatus->animFlags & PLAYER_ANIM_FLAG_INTERACT_PROMPT) && (entity->collisionFlags & 8)) { if ((playerStatus->animFlags & PLAYER_ANIM_FLAG_INTERACT_PROMPT) && (entity->collisionFlags & 8)) {
func_80110678(entity); entity_start_script(entity);
} }
} else { } else {
entity->flags &= ~0x1000; entity->flags &= ~0x1000;

View File

@ -1,12 +1,12 @@
void func_80035DCC(void); void state_world_draw_aux_ui(void);
void begin_state_world(void) { void state_init_world(void) {
func_80112D84(0, func_80035DCC); game_mode_set_fpDrawAuxUI(0, state_world_draw_aux_ui);
} }
void step_world(void) { void state_step_world(void) {
update_counters(); update_encounters();
npc_list_update(); update_npcs();
update_player(); update_player();
update_item_entities(); update_item_entities();
update_effects(); update_effects();
@ -14,12 +14,12 @@ void step_world(void) {
update_cameras(); update_cameras();
} }
void func_80035DA0(void) { void state_drawUI_world(void) {
draw_status_ui(); draw_status_ui();
draw_encounter_ui(); draw_encounter_ui();
func_8013A6E8(); func_8013A6E8();
} }
void func_80035DCC(void) { void state_world_draw_aux_ui(void) {
draw_first_strike_ui(); draw_first_strike_ui();
} }

View File

@ -1,30 +1,30 @@
#include "common.h" #include "common.h"
#include "nu/nusys.h" #include "nu/nusys.h"
void func_80035E54(void); void init_enter_world_shared(void);
void func_80035DF0(s16 arg0) { void func_80035DF0(s16 arg0) {
D_800A0942 = arg0; D_800A0942 = arg0;
} }
void func_80035E00(void) { void state_init_enter_demo(void) {
D_800A0948 = 0; D_800A0948 = 0;
func_80035E54(); init_enter_world_shared();
} }
void func_80035E24(void) { void state_init_enter_world(void) {
D_800A0948 = 1; D_800A0948 = 1;
set_map_transition_effect(8); set_map_transition_effect(8);
func_80035E54(); init_enter_world_shared();
} }
void func_80035E54(void) { void init_enter_world_shared(void) {
D_800A0944 = 0; D_800A0944 = 0;
D_800A0946 = 4; D_800A0946 = 4;
gGameStatusPtr->exitTangent = 0.0f; gGameStatusPtr->exitTangent = 0.0f;
gMapTransitionAlpha = 0xFF; gMapTransitionAlpha = 0xFF;
nuContRmbForceStopEnd(); nuContRmbForceStopEnd();
func_801382AC(&gMapTransitionAlpha); update_exit_map_screen_overlay(&gMapTransitionAlpha);
gOverrideFlags |= 0x8; gOverrideFlags |= 0x8;
@ -32,15 +32,15 @@ void func_80035E54(void) {
timeFreezeMode = 0; timeFreezeMode = 0;
} }
INCLUDE_ASM(s32, "111f0_len_860", func_80035EEC); INCLUDE_ASM(s32, "111f0_len_860", state_step_enter_world);
void func_800360FC(void) { void state_drawUI_enter_world(void) {
if (gGameStatusPtr->loadMenuState == 2) { if (gGameStatusPtr->loadMenuState == 2) {
draw_status_ui(); draw_status_ui();
} }
} }
void func_80036130(void) { void state_init_change_map(void) {
gMapTransitionAlpha = 0x00; gMapTransitionAlpha = 0x00;
D_800A0942 = 0x14; D_800A0942 = 0x14;
D_800A0944 = 0x00; D_800A0944 = 0x00;
@ -53,9 +53,9 @@ void func_80036130(void) {
} }
} }
INCLUDE_ASM(s32, "111f0_len_860", func_8003617C); INCLUDE_ASM(s32, "111f0_len_860", state_step_change_map);
void func_800363FC(void) { void state_drawUI_change_map(void) {
if (D_800A0944 == 4 || D_800A0944 == 0) { if (D_800A0944 == 4 || D_800A0944 == 0) {
draw_status_ui(); draw_status_ui();
} }

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
void begin_state_intro(void) { void state_init_intro(void) {
s8 unk_A8; s8 unk_A8;
gGameStatusPtr->loadMenuState = 0; gGameStatusPtr->loadMenuState = 0;
@ -62,13 +62,13 @@ void begin_state_intro(void) {
break; break;
} }
set_transition_stencil_zoom_1(D_800A0963, D_800A0954); set_screen_overlay_params_back(D_800A0963, D_800A0954);
set_transition_stencil_color(1, D_800A095B, D_800A095D, D_800A095F); set_screen_overlay_color(1, D_800A095B, D_800A095D, D_800A095F);
intro_logos_update_fade(); intro_logos_update_fade();
} }
INCLUDE_ASM(s32, "11a50_len_7a0", step_intro); INCLUDE_ASM(s32, "11a50_len_7a0", state_step_intro);
void func_80036DE0(void) { void state_drawUI_intro(void) {
} }

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
void title_draw_copyright(f32); void title_screen_draw_copyright(f32);
s16 D_800779C0[] = {0, 0}; s16 D_800779C0[] = {0, 0};
s32 D_800779C4 = 0; s32 D_800779C4 = 0;
@ -47,46 +47,46 @@ extern s32* D_800A0978;
extern s32* D_800A097C; extern s32* D_800A097C;
extern s32 D_800A0980; extern s32 D_800A0980;
INCLUDE_ASM(s32, "121f0_len_1290", begin_state_title_screen); INCLUDE_ASM(s32, "121f0_len_1290", state_init_title_screen);
INCLUDE_ASM(s32, "121f0_len_1290", step_title_screen); INCLUDE_ASM(s32, "121f0_len_1290", state_step_title_screen);
void func_800375A4(void) { void state_drawUI_title_screen(void) {
switch (gGameStatusPtr->loadMenuState) { switch (gGameStatusPtr->loadMenuState) {
case 0: case 0:
D_80077A28 = 0; D_80077A28 = 0;
D_80077A2C = 0; D_80077A2C = 0;
D_80077A30 = 0; D_80077A30 = 0;
func_80037960(); draw_title_screen_NOP();
break; break;
case 2: case 2:
func_80037960(); draw_title_screen_NOP();
if (gGameStatusPtr->contBitPattern & 1) { if (gGameStatusPtr->contBitPattern & 1) {
title_draw_press_start(); title_screen_draw_press_start();
} }
default: default:
break; break;
case 1: case 1:
case 4: case 4:
case 5: case 5:
func_80037960(); draw_title_screen_NOP();
break; break;
} }
} }
INCLUDE_ASM(s32, "121f0_len_1290", title_append_gfx); INCLUDE_ASM(s32, "121f0_len_1290", appendGfx_title_screen);
void func_80037960(void) { void draw_title_screen_NOP(void) {
} }
void title_draw_images(f32 arg0, f32 arg1) { void title_screen_draw_images(f32 arg0, f32 arg1) {
title_draw_logo(); title_screen_draw_logo();
title_draw_copyright(arg1); title_screen_draw_copyright(arg1);
} }
INCLUDE_ASM(void, "121f0_len_1290", title_draw_logo); INCLUDE_ASM(void, "121f0_len_1290", title_screen_draw_logo);
void title_draw_press_start(void) { void title_screen_draw_press_start(void) {
switch (D_80077A2C) { switch (D_80077A2C) {
case 0: case 0:
D_80077A28 -= 128; D_80077A28 -= 128;
@ -130,7 +130,7 @@ void title_draw_press_start(void) {
gDPPipeSync(gMasterGfxPos++); gDPPipeSync(gMasterGfxPos++);
} }
void title_draw_copyright(f32 arg0) { void title_screen_draw_copyright(f32 arg0) {
s32 alpha; s32 alpha;
s32 i; s32 i;

View File

@ -1,6 +1,6 @@
#include "common.h" #include "common.h"
void init_demo_data(void) { void state_init_demo(void) {
if (gGameStatusPtr->demoState == 0) { if (gGameStatusPtr->demoState == 0) {
gGameStatusPtr->nextDemoScene = 0; gGameStatusPtr->nextDemoScene = 0;
gGameStatusPtr->demoState = 1; gGameStatusPtr->demoState = 1;
@ -12,13 +12,13 @@ void init_demo_data(void) {
func_80056228(); func_80056228();
set_map_transition_effect(2); set_map_transition_effect(2);
set_transition_stencil_zoom_0(0, 255.0f); set_screen_overlay_params_front(0, 255.0f);
clear_saved_variables(); clear_saved_variables();
clear_script_list(); clear_script_list();
} }
INCLUDE_ASM(s32, "13480_len_3f0", next_demo_scene); INCLUDE_ASM(s32, "13480_len_3f0", state_step_demo);
void func_8003845C(void) { void state_drawUI_demo(void) {
} }

View File

@ -32,7 +32,7 @@ void boot_main(void) {
nuGfxDisplayOff(); nuGfxDisplayOff();
crash_create_monitor(); crash_create_monitor();
func_80025C60(); func_80025C60();
nuGfxInitEX2(); nuGfxInit();
gGameStatusPtr->contBitPattern = nuContInit(); gGameStatusPtr->contBitPattern = nuContInit();
func_8002D160(); func_8002D160();
func_802B2000(); func_802B2000();

View File

@ -1,59 +1,59 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "163400", func_80242BA0); INCLUDE_ASM(s32, "163400", mainmenu_draw_rect);
INCLUDE_ASM(s32, "163400", func_80242D94); INCLUDE_ASM(s32, "163400", filemenu_set_selected);
INCLUDE_ASM(s32, "163400", func_80242DEC); INCLUDE_ASM(s32, "163400", filemenu_set_cursor_alpha);
INCLUDE_ASM(s32, "163400", func_80242E00); INCLUDE_ASM(s32, "163400", filemenu_set_cursor_goal_pos);
INCLUDE_ASM(s32, "163400", func_80242F68); INCLUDE_ASM(s32, "163400", filemenu_update_cursor);
INCLUDE_ASM(s32, "163400", func_802431A0); INCLUDE_ASM(s32, "163400", filemenu_update);
INCLUDE_ASM(s32, "163400", func_8024330C); INCLUDE_ASM(s32, "163400", func_8024330C);
INCLUDE_ASM(s32, "163400", func_80243380); INCLUDE_ASM(s32, "163400", filemenu_update_show_name_input);
INCLUDE_ASM(s32, "163400", func_802433F4); INCLUDE_ASM(s32, "163400", filemenu_update_show_options_left);
INCLUDE_ASM(s32, "163400", func_80243468); INCLUDE_ASM(s32, "163400", filemenu_update_show_options_right);
INCLUDE_ASM(s32, "163400", func_802434DC); INCLUDE_ASM(s32, "163400", filemenu_update_show_options_bottom);
INCLUDE_ASM(s32, "163400", func_80243550); INCLUDE_ASM(s32, "163400", filemenu_update_show_title);
INCLUDE_ASM(s32, "163400", func_802435C4); INCLUDE_ASM(s32, "163400", func_802435C4);
INCLUDE_ASM(s32, "163400", func_80243628); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_name_input);
INCLUDE_ASM(s32, "163400", func_8024368C); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_options_left);
INCLUDE_ASM(s32, "163400", func_802436F0); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_options_right);
INCLUDE_ASM(s32, "163400", func_80243754); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_title);
INCLUDE_ASM(s32, "163400", func_802437B8); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_options_bottom);
INCLUDE_ASM(s32, "163400", func_8024381C); INCLUDE_ASM(s32, "163400", filemenu_update_show_with_rotation);
INCLUDE_ASM(s32, "163400", func_80243898); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_with_rotation);
INCLUDE_ASM(s32, "163400", func_80243908); INCLUDE_ASM(s32, "163400", filemenu_update_select_file);
INCLUDE_ASM(s32, "163400", func_80243B10); INCLUDE_ASM(s32, "163400", filemenu_update_deselect_file);
INCLUDE_ASM(s32, "163400", func_80243CCC); INCLUDE_ASM(s32, "163400", filemenu_update_show_name_confirm);
INCLUDE_ASM(s32, "163400", func_80243EEC); INCLUDE_ASM(s32, "163400", filemenu_update_hidden_name_confirm);
INCLUDE_ASM(s32, "163400", func_80244030); INCLUDE_ASM(s32, "163400", filemenu_draw_cursor);
INCLUDE_ASM(s32, "163400", func_802440BC); INCLUDE_ASM(s32, "163400", filemenu_draw_contents_copy_arrow);
INCLUDE_ASM(s32, "163400", func_802448E0); INCLUDE_ASM(void, "163400", filemenu_init, s32 arg0);
INCLUDE_ASM(s32, "163400", func_80244B00); INCLUDE_ASM(s32, "163400", filemenu_cleanup);
INCLUDE_ASM(s32, "163400", func_80244BC4); INCLUDE_ASM(s32, "163400", func_80244BC4);

View File

@ -1,41 +1,41 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "165490", func_80244C30); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_title);
INCLUDE_ASM(s32, "165490", func_80244CEC); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_stereo);
INCLUDE_ASM(s32, "165490", func_80244D60); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_mono);
INCLUDE_ASM(s32, "165490", func_80244DD0); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_option_left);
INCLUDE_ASM(s32, "165490", func_80244E54); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_option_center);
INCLUDE_ASM(s32, "165490", func_80244F44); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_option_right);
INCLUDE_ASM(s32, "165490", func_80244FD4); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_info);
INCLUDE_ASM(s32, "165490", func_8024544C); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_title);
INCLUDE_ASM(s32, "165490", func_80245588); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_0_info);
INCLUDE_ASM(s32, "165490", func_802455D8); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_1_info);
INCLUDE_ASM(s32, "165490", func_80245628); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_2_info);
INCLUDE_ASM(s32, "165490", func_80245678); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_3_info);
INCLUDE_ASM(s32, "165490", func_802456C8); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_0_title);
INCLUDE_ASM(s32, "165490", func_80245718); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_1_title);
INCLUDE_ASM(s32, "165490", func_80245768); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_2_title);
INCLUDE_ASM(s32, "165490", func_802457B8); INCLUDE_ASM(s32, "165490", filemenu_draw_contents_file_3_title);
INCLUDE_ASM(s32, "165490", func_80245808); INCLUDE_ASM(s32, "165490", filemenu_main_init);
INCLUDE_ASM(s32, "165490", func_80245A40); INCLUDE_ASM(s32, "165490", filemenu_main_handle_input);
INCLUDE_ASM(s32, "165490", func_80246B2C); INCLUDE_ASM(s32, "165490", filemenu_main_update);
INCLUDE_ASM(s32, "165490", func_80246CBC); INCLUDE_ASM(s32, "165490", filemenu_main_cleanup);

View File

@ -1,15 +1,15 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "167570", func_80246D10); INCLUDE_ASM(s32, "167570", filemenu_yesno_draw_options_contents);
INCLUDE_ASM(s32, "167570", func_80246E24); INCLUDE_ASM(s32, "167570", filemenu_yesno_draw_prompt_contents);
INCLUDE_ASM(s32, "167570", func_80247198); INCLUDE_ASM(s32, "167570", filemenu_yesno_init);
INCLUDE_ASM(s32, "167570", func_802471EC); INCLUDE_ASM(s32, "167570", filemenu_yesno_handle_input);
void func_80247D14(void) { void filemenu_yesno_update(void) {
} }
void func_80247D1C(void) { void filemenu_yesno_cleanup(void) {
} }

View File

@ -1,15 +1,15 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "168590", func_80247D30); INCLUDE_ASM(s32, "168590", filemenu_info_draw_message_contents);
INCLUDE_ASM(s32, "168590", func_80247FD0); INCLUDE_ASM(s32, "168590", filemenu_info_init);
INCLUDE_ASM(s32, "168590", func_80248024); INCLUDE_ASM(s32, "168590", filemenu_info_handle_input);
void func_80248160(void) { void filemenu_info_update(void) {
} }
void func_80248168(void) { void filemenu_info_cleanup(void) {
} }
void func_80248170(s32 arg0) { void func_80248170(s32 arg0) {
@ -21,15 +21,15 @@ void func_80248170(s32 arg0) {
} }
} }
INCLUDE_ASM(s32, "168590", func_802481B8); INCLUDE_ASM(s32, "168590", filemenu_draw_contents_file_create_header);
INCLUDE_ASM(s32, "168590", func_8024830C); INCLUDE_ASM(s32, "168590", filemenu_draw_contents_choose_name);
INCLUDE_ASM(s32, "168590", func_80248A80); INCLUDE_ASM(s32, "168590", filemenu_choose_name_init);
INCLUDE_ASM(s32, "168590", func_80248BF4); INCLUDE_ASM(s32, "168590", filemenu_choose_name_handle_input);
void func_80249324(void) { void filemenu_choose_name_update(void) {
} }
INCLUDE_ASM(s32, "168590", func_8024932C); INCLUDE_ASM(s32, "168590", filemenu_choose_name_cleanup);

View File

@ -1,9 +1,9 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "169BE0", func_80249380); INCLUDE_ASM(s32, "169BE0", filemenu_draw_char);
INCLUDE_ASM(s32, "169BE0", func_8024997C); INCLUDE_ASM(s32, "169BE0", filemenu_draw_message);
INCLUDE_ASM(s32, "169BE0", func_80249AA4); INCLUDE_ASM(s32, "169BE0", filemenu_get_menu_message);
INCLUDE_ASM(s32, "169BE0", func_80249AB8); INCLUDE_ASM(s32, "169BE0", filemenu_draw_file_name);

View File

@ -5,11 +5,11 @@ extern s16 D_802809F6;
extern s32 D_80280A30; extern s32 D_80280A30;
extern s32 D_8029F254; extern s32 D_8029F254;
INCLUDE_ASM(s32, "16F740", func_80240E60); INCLUDE_ASM(s32, "16F740", btl_merlee_on_start_turn);
INCLUDE_ASM(s32, "16F740", func_80240FDC); INCLUDE_ASM(s32, "16F740", btl_merlee_on_first_strike);
void func_80241190(s32 battleState) { void btl_set_state(s32 battleState) {
s32 flags = gBattleStatus.flags2; s32 flags = gBattleStatus.flags2;
if (0) { do { } while (1); } if (0) { do { } while (1); }
gBattleState = battleState; gBattleState = battleState;
@ -38,41 +38,41 @@ void func_80241190(s32 battleState) {
} }
} }
INCLUDE_ASM(s32, "16F740", begin_battle); INCLUDE_ASM(s32, "16F740", btl_state_update_normal_start);
void func_80241AB8(void) { void btl_state_draw_normal_start(void) {
set_transition_stencil_color(0, 0, 0, 0); set_screen_overlay_color(0, 0, 0, 0);
if (D_80280A30 > 255) { if (D_80280A30 > 255) {
set_transition_stencil_zoom_0(0, 255.0f); set_screen_overlay_params_front(0, 255.0f);
} else { } else {
set_transition_stencil_zoom_0(0, D_80280A30); set_screen_overlay_params_front(0, D_80280A30);
} }
} }
INCLUDE_ASM(s32, "16F740", func_80241B14); INCLUDE_ASM(s32, "16F740", btl_state_update_begin_turn);
void func_8024201C(void) { void btl_state_draw_begin_turn(void) {
} }
INCLUDE_ASM(s32, "16F740", update_heroes_start_turn); INCLUDE_ASM(s32, "16F740", btl_state_update_begin_player_turn);
void func_80242AC0(void) { void btl_state_draw_begin_player_turn(void) {
} }
INCLUDE_ASM(s32, "16F740", switch_to_player); INCLUDE_ASM(s32, "16F740", btl_state_update_switch_to_player);
void func_80242BA8(void) { void btl_state_draw_switch_to_player(void) {
} }
INCLUDE_ASM(s32, "16F740", update_end_player_turn); INCLUDE_ASM(s32, "16F740", btl_state_update_begin_partner_turn);
void func_80242EF8(void) { void btl_state_draw_begin_partner_turn(void) {
} }
INCLUDE_ASM(s32, "16F740", switch_to_partner); INCLUDE_ASM(void, "16F740", btl_state_update_switch_to_partner, s32);
void func_80242FD8(void) { void btl_state_draw_switch_to_partner(void) {
} }
INCLUDE_ASM(s32, "16F740", func_80242FE0); INCLUDE_ASM(s32, "16F740", func_80242FE0);
@ -81,7 +81,7 @@ void func_80243910(void) {
} }
#ifdef NON_MATCHING #ifdef NON_MATCHING
void switch_order(void) { void btl_state_update_prepare_menu(void) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
battleStatus->unk_4D = -1; battleStatus->unk_4D = -1;
@ -101,61 +101,61 @@ void switch_order(void) {
// if (0) { s32 new_var; do { } while (new_var); } // if (0) { s32 new_var; do { } while (new_var); }
if (battleStatus->flags1 & 0x80000) { if (battleStatus->flags1 & 0x80000) {
func_80241190(14); btl_set_state(14);
} else if (battleStatus->battleState == 70) { } else if (battleStatus->battleState == 70) {
func_80241190(13); btl_set_state(13);
battleStatus->battleState = 70; battleStatus->battleState = 70;
} else { } else {
func_80241190(13); btl_set_state(13);
} }
} }
#else #else
INCLUDE_ASM(s32, "16F740", switch_order); INCLUDE_ASM(s32, "16F740", btl_state_update_prepare_menu);
#endif #endif
void func_802439D0(void) { void btl_state_draw_prepare_menu(void) {
} }
INCLUDE_ASM(s32, "16F740", func_802439D8); INCLUDE_ASM(s32, "16F740", btl_state_update_end_turn);
void func_80243FD4(void) { void btl_state_draw_end_turn(void) {
} }
void func_80243FDC(void) { void btl_state_update_1C(void) {
func_8024E40C(2); func_8024E40C(2);
func_80241190(12); btl_set_state(12);
} }
void func_80244000(void) { void btl_state_draw_1C(void) {
} }
INCLUDE_ASM(s32, "16F740", func_80244008); INCLUDE_ASM(s32, "16F740", btl_state_update_victory);
void func_80244708(void) { void btl_state_draw_victory(void) {
} }
INCLUDE_ASM(s32, "16F740", func_80244710); INCLUDE_ASM(s32, "16F740", btl_state_update_end_training_battle);
void func_80244A48(void) { void btl_state_draw_end_training_battle(void) {
} }
INCLUDE_ASM(s32, "16F740", end_battle); INCLUDE_ASM(s32, "16F740", btl_state_update_end_battle);
INCLUDE_ASM(s32, "16F740", func_80244D90); INCLUDE_ASM(s32, "16F740", btl_state_draw_end_battle);
INCLUDE_ASM(s32, "16F740", func_80244E38); INCLUDE_ASM(s32, "16F740", btl_state_update_defend);
void func_80244EF8(void) { void btl_state_draw_defend(void) {
} }
INCLUDE_ASM(s32, "16F740", update_run_away); INCLUDE_ASM(s32, "16F740", btl_state_update_run_away);
void func_80245438(void) { void btl_state_draw_run_away(void) {
} }
INCLUDE_ASM(s32, "16F740", func_80245440); INCLUDE_ASM(s32, "16F740", btl_state_update_defeat);
void func_802456B0(void) { void btl_state_draw_defeat(void) {
} }
ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall) { ApiStatus EnablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
@ -168,30 +168,30 @@ ApiStatus DisablePartnerBlur(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "16F740", update_swap_partner); INCLUDE_ASM(s32, "16F740", btl_state_update_change_partner);
void func_80245AC8(void) { void btl_state_draw_change_partner(void) {
} }
INCLUDE_ASM(s32, "16F740", update_player_action); INCLUDE_ASM(s32, "16F740", btl_state_update_player_move);
void func_80246448(void) { void btl_state_draw_player_move(void) {
} }
INCLUDE_ASM(s32, "16F740", update_player_change_turn); INCLUDE_ASM(s32, "16F740", btl_state_update_end_player_turn);
void func_80246B2C_code(void) { void filemenu_main_update_code(void) {
} }
INCLUDE_ASM(s32, "16F740", update_partner_action); INCLUDE_ASM(s32, "16F740", btl_state_update_partner_move);
void func_80247214(void) { void btl_state_draw_partner_move(void) {
} }
// Something weird with using battleStatus twice but in specific ways // Something weird with using battleStatus twice but in specific ways
#ifdef NON_MATCHING #ifdef NON_MATCHING
s32 func_80263434(void); s32 btl_check_enemies_defeated(void);
void func_8024721C(void) { void btl_state_update_end_partner_turn(void) {
BattleStatus* battleStatus; BattleStatus* battleStatus;
s32 battleState = gBattleStatus.battleState; s32 battleState = gBattleStatus.battleState;
@ -200,80 +200,80 @@ void func_8024721C(void) {
if (battleState == 0) { if (battleState == 0) {
battleStatus->flags2 |= 0x4; battleStatus->flags2 |= 0x4;
if (!func_80263434()) { if (!btl_check_enemies_defeated()) {
battleStatus->flags1 &= ~0x80000; battleStatus->flags1 &= ~0x80000;
battleStatus->flags2 &= ~0x10; battleStatus->flags2 &= ~0x10;
if (battleStatus->unk_94 < 0) { if (battleStatus->unk_94 < 0) {
battleStatus->unk_94 = 0; battleStatus->unk_94 = 0;
func_80241190(6); btl_set_state(6);
} else { } else {
func_80241190(9); btl_set_state(9);
} }
} }
} }
} }
#else #else
INCLUDE_ASM(s32, "16F740", func_8024721C); INCLUDE_ASM(s32, "16F740", btl_state_update_end_partner_turn);
#endif #endif
void func_802472A4(void) { void btl_state_draw_end_partner_turn(void) {
} }
INCLUDE_ASM(s32, "16F740", update_enemy_change_turn); INCLUDE_ASM(s32, "16F740", btl_state_update_next_enemy);
void func_80247568(void) { void btl_state_draw_next_enemy(void) {
} }
INCLUDE_ASM(s32, "16F740", update_enemy_action); INCLUDE_ASM(s32, "16F740", btl_state_update_enemy_move);
void func_80247AFC(void) { void btl_state_draw_enemy_move(void) {
} }
INCLUDE_ASM(s32, "16F740", func_80247B04); INCLUDE_ASM(s32, "16F740", btl_state_update_first_strike);
INCLUDE_ASM(s32, "16F740", func_802480F0); INCLUDE_ASM(s32, "16F740", btl_state_draw_first_stike);
INCLUDE_ASM(s32, "16F740", func_80248190); INCLUDE_ASM(s32, "16F740", btl_state_update_partner_striking_first);
void func_802485FC(void) { void btl_state_draw_partner_striking_first(void) {
if (D_8029F254 != 0) { if (D_8029F254 != 0) {
if (D_80280A30 == 0) { if (D_80280A30 == 0) {
set_transition_stencil_zoom_0(255, -1.0f); set_screen_overlay_params_front(255, -1.0f);
} else { } else {
D_80280A30 -= 20; D_80280A30 -= 20;
if (D_80280A30 < 0) { if (D_80280A30 < 0) {
D_80280A30 = 0; D_80280A30 = 0;
} }
set_transition_stencil_zoom_0(0, D_80280A30); set_screen_overlay_params_front(0, D_80280A30);
} }
} }
} }
INCLUDE_ASM(s32, "16F740", func_80248660); INCLUDE_ASM(s32, "16F740", btl_state_update_enemy_striking_first);
void func_80248AA4(void) { void btl_state_draw_enemy_striking_first(void) {
if (D_8029F254 != 0) { if (D_8029F254 != 0) {
if (D_80280A30 == 0) { if (D_80280A30 == 0) {
set_transition_stencil_zoom_0(255, -1.0f); set_screen_overlay_params_front(255, -1.0f);
} else { } else {
D_80280A30 -= 20; D_80280A30 -= 20;
if (D_80280A30 < 0) { if (D_80280A30 < 0) {
D_80280A30 = 0; D_80280A30 = 0;
} }
set_transition_stencil_zoom_0(0, D_80280A30); set_screen_overlay_params_front(0, D_80280A30);
} }
} }
} }
INCLUDE_ASM(s32, "16F740", func_80248B08); INCLUDE_ASM(s32, "16F740", btl_state_update_end_demo_battle);
void func_80248D78(void) { void btl_state_draw_end_demo_battle(void) {
if (D_802809F6 == -1) { if (D_802809F6 == -1) {
set_transition_stencil_color(0, 0, 0, 0); set_screen_overlay_color(0, 0, 0, 0);
set_transition_stencil_zoom_0(0, D_80280A30); set_screen_overlay_params_front(0, D_80280A30);
} }
} }

View File

@ -60,59 +60,59 @@ Script BtlBringPartnerOut = SCRIPT({
s8 D_80280CE0[] = { 0, 0, 0, 0 }; s8 D_80280CE0[] = { 0, 0, 0, 0 };
s32 D_80280CE4 = -1; s32 D_80280CE4 = -1;
Script D_80280CE8 = SCRIPT({ Script CamPreset_B = SCRIPT({
func_80248DD0(); func_80248DD0();
}); });
Script D_80280D04 = SCRIPT({ Script CamPreset_F = SCRIPT({
func_80248DE4(); func_80248DE4();
}); });
Script D_80280D20 = SCRIPT({ Script CamPreset_M = SCRIPT({
func_80249804(); func_80249804();
}); });
Script D_80280D3C = SCRIPT({ Script CamPreset_G = SCRIPT({
func_8024A214(); func_8024A214();
}); });
Script D_80280D58 = SCRIPT({ Script CamPreset_I = SCRIPT({
func_8024A990(); func_8024A990();
}); });
Script D_80280D74 = SCRIPT({ Script CamPreset_H = SCRIPT({
func_8024AFE4(); func_8024AFE4();
}); });
Script D_80280D90 = SCRIPT({ Script CamPreset_N = SCRIPT({
func_8024B5FC(); func_8024B5FC();
}); });
Script D_80280DAC = SCRIPT({ Script CamPreset_C = SCRIPT({
func_8024B9A0(); func_8024B9A0();
}); });
Script D_80280DC8 = SCRIPT({ Script CamPreset_D = SCRIPT({
func_8024BDA4(); func_8024BDA4();
}); });
Script D_80280DE4 = SCRIPT({ Script CamPreset_E = SCRIPT({
func_8024C180(); func_8024C180();
}); });
Script D_80280E00 = SCRIPT({ Script CamPreset_J = SCRIPT({
func_8024C570(); func_8024C570();
}); });
Script D_80280E1C = SCRIPT({ Script CamPreset_K = SCRIPT({
func_8024C944(); func_8024C944();
}); });
Script D_80280E38 = SCRIPT({ Script CamPreset_L = SCRIPT({
func_8024CB68(); func_8024CB68();
}); });
Script D_80280E54 = SCRIPT({ Script CamPreset_A = SCRIPT({
func_8024E9B0(0, 15, 0); func_8024E9B0(0, 15, 0);
func_8024E748(2, 550); func_8024E748(2, 550);
func_8024E748(3, 100); func_8024E748(3, 100);
@ -125,8 +125,8 @@ Script D_80280EB8 = SCRIPT({
SetCamBGColor(CAM_BATTLE, 0, 0, 0); SetCamBGColor(CAM_BATTLE, 0, 0, 0);
SetCamEnabled(CAM_BATTLE, TRUE); SetCamEnabled(CAM_BATTLE, TRUE);
sleep 1; sleep 1;
func_802D3398(); InitVirtualEntityList();
func_802CCCB0(); InitAnimatedModels();
func_802CABE8(CAM_BATTLE, 0, 240, 100, 8); func_802CABE8(CAM_BATTLE, 0, 240, 100, 8);
func_802CAE50(CAM_BATTLE, -75, 35, 0); func_802CAE50(CAM_BATTLE, -75, 35, 0);
BattleCamTargetActor(ACTOR_PLAYER); BattleCamTargetActor(ACTOR_PLAYER);
@ -193,9 +193,9 @@ void update_actor_shadows(void) {
} }
} }
INCLUDE_ASM(s32, "16c8e0", update_battle_state); INCLUDE_ASM(s32, "16c8e0", btl_update);
INCLUDE_ASM(s32, "16c8e0", draw_main_battle_ui); INCLUDE_ASM(s32, "16c8e0", btl_draw_ui);
INCLUDE_ASM(s32, "16c8e0", func_8023ED5C); INCLUDE_ASM(s32, "16c8e0", func_8023ED5C);
@ -204,18 +204,18 @@ INCLUDE_ASM(s32, "16c8e0", func_8023F060);
INCLUDE_ASM(s32, "16c8e0", func_8023F088); INCLUDE_ASM(s32, "16c8e0", func_8023F088);
void func_8023FF84(void) { void func_8023FF84(void) {
show_foreground_models_unsafe(); show_foreground_models_unchecked();
} }
INCLUDE_ASM(s32, "16c8e0", draw_enemy_health_bars); INCLUDE_ASM(s32, "16c8e0", btl_draw_enemy_health_bars);
INCLUDE_ASM(s32, "16c8e0", update_starpoints_display); INCLUDE_ASM(s32, "16c8e0", btl_update_starpoints_display);
INCLUDE_ASM(s32, "16c8e0", func_802409F4); INCLUDE_ASM(s32, "16c8e0", btl_save_world_cameras);
INCLUDE_ASM(s32, "16c8e0", func_80240AA8); INCLUDE_ASM(s32, "16c8e0", btl_restore_world_cameras);
void delete_actor(Actor* actor) { void btl_delete_actor(Actor* actor) {
ActorPart* partsTable; ActorPart* partsTable;
ActorPart* actorPartTemp; ActorPart* actorPartTemp;
BattleStatus* battleStatus; BattleStatus* battleStatus;
@ -240,13 +240,13 @@ void delete_actor(Actor* actor) {
while (partsTable != NULL) { while (partsTable != NULL) {
if (!(partsTable->flags & 0x4)) { if (!(partsTable->flags & 0x4)) {
func_80112328(partsTable->shadow); delete_shadow(partsTable->shadow);
} }
if (partsTable->idleAnimations != NULL) { if (partsTable->idleAnimations != NULL) {
func_802DE894(partsTable->unk_84, 0, 0, 0, 0, 0, 0); func_802DE894(partsTable->unk_84, 0, 0, 0, 0, 0, 0);
ASSERT(func_802DE5E8(partsTable->unk_84) == 0); ASSERT(spr_free_sprite(partsTable->unk_84) == 0);
if (!(partsTable->flags & 0x80000000)) { if (!(partsTable->flags & 0x80000000)) {
heap_free(partsTable->movement); heap_free(partsTable->movement);
@ -261,8 +261,8 @@ void delete_actor(Actor* actor) {
partsTable = actorPartTemp; partsTable = actorPartTemp;
} }
func_80112328(actor->shadow); delete_shadow(actor->shadow);
func_800476F4(actor->unk_436); remove_all_status_icons(actor->unk_436);
remove_effect(actor->ptrDefuffIcon); remove_effect(actor->ptrDefuffIcon);
if (actor->unk_200 != NULL) { if (actor->unk_200 != NULL) {
@ -280,7 +280,7 @@ void delete_actor(Actor* actor) {
heap_free(actor); heap_free(actor);
} }
void delete_player_actor(Actor* player) { void btl_delete_player_actor(Actor* player) {
struct ActorPart* partsTable; struct ActorPart* partsTable;
struct ActorPartMovement* movement; struct ActorPartMovement* movement;
struct DecorationTable* decorationTable; struct DecorationTable* decorationTable;
@ -304,8 +304,8 @@ void delete_player_actor(Actor* player) {
decorationTable = partsTable->decorationTable; decorationTable = partsTable->decorationTable;
movement = partsTable->movement; movement = partsTable->movement;
func_80112328(player->shadow); delete_shadow(player->shadow);
func_800476F4(player->unk_436); remove_all_status_icons(player->unk_436);
remove_effect(player->ptrDefuffIcon); remove_effect(player->ptrDefuffIcon);
if (player->unk_200 != NULL) { if (player->unk_200 != NULL) {

View File

@ -28,37 +28,37 @@ INCLUDE_ASM(s32, "1776B0", func_8024CB68);
INCLUDE_ASM(s32, "1776B0", func_8024CE9C); INCLUDE_ASM(s32, "1776B0", func_8024CE9C);
INCLUDE_ASM(s32, "1776B0", use_cam_preset); INCLUDE_ASM(s32, "1776B0", btl_cam_use_preset);
INCLUDE_ASM(s32, "1776B0", func_8024E3D8); INCLUDE_ASM(s32, "1776B0", func_8024E3D8);
INCLUDE_ASM(s32, "1776B0", func_8024E40C); INCLUDE_ASM(s32, "1776B0", func_8024E40C);
INCLUDE_ASM(s32, "1776B0", cam_target_actor); INCLUDE_ASM(s32, "1776B0", btl_cam_target_actor);
INCLUDE_ASM(s32, "1776B0", func_8024E45C); INCLUDE_ASM(s32, "1776B0", func_8024E45C);
INCLUDE_ASM(s32, "1776B0", func_8024E484); INCLUDE_ASM(s32, "1776B0", func_8024E484);
INCLUDE_ASM(s32, "1776B0", move_cam_over); INCLUDE_ASM(s32, "1776B0", btl_cam_move);
INCLUDE_ASM(s32, "1776B0", set_cam_target_pos); INCLUDE_ASM(s32, "1776B0", btl_cam_set_target_pos);
INCLUDE_ASM(s32, "1776B0", func_8024E554); INCLUDE_ASM(s32, "1776B0", func_8024E554);
INCLUDE_ASM(s32, "1776B0", func_8024E584); INCLUDE_ASM(s32, "1776B0", func_8024E584);
INCLUDE_ASM(s32, "1776B0", set_cam_zoom); INCLUDE_ASM(s32, "1776B0", btl_cam_set_zoom);
INCLUDE_ASM(s32, "1776B0", add_cam_zoom); INCLUDE_ASM(s32, "1776B0", btl_cam_add_zoom);
INCLUDE_ASM(s32, "1776B0", set_cam_zoffset); INCLUDE_ASM(s32, "1776B0", btl_cam_set_zoffset);
INCLUDE_ASM(s32, "1776B0", unfreeze_cam); INCLUDE_ASM(s32, "1776B0", btl_cam_unfreeze);
INCLUDE_ASM(s32, "1776B0", func_8024E60C); INCLUDE_ASM(s32, "1776B0", func_8024E60C);
INCLUDE_ASM(s32, "1776B0", UseCamPreset); INCLUDE_ASM(s32, "1776B0", UseBattleCamPreset);
INCLUDE_ASM(s32, "1776B0", func_8024E664); INCLUDE_ASM(s32, "1776B0", func_8024E664);

View File

@ -8,9 +8,9 @@ INCLUDE_ASM(s32, "17D6A0", func_8024EE48);
INCLUDE_ASM(s32, "17D6A0", func_8024EEA8); INCLUDE_ASM(s32, "17D6A0", func_8024EEA8);
INCLUDE_ASM(s32, "17D6A0", func_8024EF08); INCLUDE_ASM(s32, "17D6A0", btl_draw_popup_messages);
INCLUDE_ASM(s32, "17D6A0", create_popup); INCLUDE_ASM(s32, "17D6A0", btl_create_popup);
INCLUDE_ASM(s32, "17D6A0", func_8024EFA4); INCLUDE_ASM(s32, "17D6A0", func_8024EFA4);
@ -28,13 +28,13 @@ INCLUDE_ASM(s32, "17D6A0", func_8024F84C);
INCLUDE_ASM(s32, "17D6A0", func_8024F940); INCLUDE_ASM(s32, "17D6A0", func_8024F940);
INCLUDE_ASM(s32, "17D6A0", show_battle_message); INCLUDE_ASM(s32, "17D6A0", btl_show_battle_message);
INCLUDE_ASM(s32, "17D6A0", show_variable_battle_message); INCLUDE_ASM(s32, "17D6A0", btl_show_variable_battle_message);
INCLUDE_ASM(s32, "17D6A0", is_popup_displayed); INCLUDE_ASM(s32, "17D6A0", btl_is_popup_displayed);
INCLUDE_ASM(s32, "17D6A0", set_popup_duration); INCLUDE_ASM(s32, "17D6A0", btl_set_popup_duration);
INCLUDE_ASM(s32, "17D6A0", func_8024FAE8); INCLUDE_ASM(s32, "17D6A0", func_8024FAE8);
@ -46,7 +46,7 @@ INCLUDE_ASM(s32, "17D6A0", func_8024FB3C);
INCLUDE_ASM(s32, "17D6A0", func_80250818); INCLUDE_ASM(s32, "17D6A0", func_80250818);
INCLUDE_ASM(s32, "17D6A0", show_message_popup); INCLUDE_ASM(s32, "17D6A0", btl_show_message_popup);
INCLUDE_ASM(s32, "17D6A0", ShowMessageBox); INCLUDE_ASM(s32, "17D6A0", ShowMessageBox);
@ -56,12 +56,12 @@ ApiStatus IsMessageBoxDisplayed(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
s32 outVar = *args++; s32 outVar = *args++;
set_variable(script, outVar, is_popup_displayed()); set_variable(script, outVar, btl_is_popup_displayed());
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus WaitForMessageBoxDone(ScriptInstance* script, s32 isInitialCall) { ApiStatus WaitForMessageBoxDone(ScriptInstance* script, s32 isInitialCall) {
return !is_popup_displayed() * ApiStatus_DONE2; return !btl_is_popup_displayed() * ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "17D6A0", ForceCloseMessageBox); INCLUDE_ASM(s32, "17D6A0", ForceCloseMessageBox);

View File

@ -8,7 +8,7 @@ extern s32 gSpeakingActorIdleAnim;
extern Actor* gSpeakingActor; extern Actor* gSpeakingActor;
extern ActorPart* gSpeakingActorPart; extern ActorPart* gSpeakingActorPart;
void clamp_printer_coords(PrintContext* printer, s32 x, s32 y); void msg_printer_set_origin_pos(PrintContext* printer, s32 x, s32 y);
ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) { ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
@ -54,9 +54,9 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
{ {
s32* isPrintDone = &gSpeakingActorPrintIsDone; s32* isPrintDone = &gSpeakingActorPrintIsDone;
*isPrintDone = FALSE; *isPrintDone = FALSE;
gSpeakingActorPrintCtx = load_string(stringID2, isPrintDone); gSpeakingActorPrintCtx = msg_get_printer_for_string(stringID2, isPrintDone);
} }
clamp_printer_coords(gSpeakingActorPrintCtx, screenX, screenY); msg_printer_set_origin_pos(gSpeakingActorPrintCtx, screenX, screenY);
script->functionTemp[0].s = 0; script->functionTemp[0].s = 0;
gOverrideFlags |= 0x10; gOverrideFlags |= 0x10;
@ -81,7 +81,7 @@ ApiStatus ActorSpeak(ScriptInstance* script, s32 isInitialCall) {
get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ); get_screen_coords(CAM_BATTLE, headX, headY, headZ, &screenX, &screenY, &screenZ);
printContext = &gSpeakingActorPrintCtx; printContext = &gSpeakingActorPrintCtx;
clamp_printer_coords(*printContext, screenX, screenY); msg_printer_set_origin_pos(*printContext, screenX, screenY);
if ((*printContext)->stateFlags & 0x40) { if ((*printContext)->stateFlags & 0x40) {
decrement_status_menu_disabled(); decrement_status_menu_disabled();
@ -117,7 +117,7 @@ ApiStatus ShowBattleChoice(ScriptInstance* script, s32 isInitialCall) {
s32 stringID = get_variable(script, *args); s32 stringID = get_variable(script, *args);
script->functionTemp[1].s = 0; script->functionTemp[1].s = 0;
D_8029FA64 = load_string(stringID, &script->functionTemp[1].s); D_8029FA64 = msg_get_printer_for_string(stringID, &script->functionTemp[1].s);
} }
if (script->functionTemp[1].s == 1) { if (script->functionTemp[1].s == 1) {
@ -194,7 +194,7 @@ ApiStatus func_802537C0(ScriptInstance* script, s32 isInitialCall) {
s32 t3; s32 t3;
// While loop may not be necessary in the future // While loop may not be necessary in the future
do { func_80137DC0(1, &t1, &t2); } while (0); do { get_screen_overlay_params(1, &t1, &t2); } while (0);
if (t2 < 128.0f) { if (t2 < 128.0f) {
t3 = 0; t3 = 0;
@ -280,11 +280,11 @@ ApiStatus StopLoopingSoundAtActor(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus SetForegroundModelsVisibleUnsafe(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetForegroundModelsVisibleUnchecked(ScriptInstance* script, s32 isInitialCall) {
if (get_variable(script, *script->ptrReadPos)) { if (get_variable(script, *script->ptrReadPos)) {
show_foreground_models_unsafe(); show_foreground_models_unchecked();
} else { } else {
hide_foreground_models_unsafe(); hide_foreground_models_unchecked();
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -352,7 +352,7 @@ INCLUDE_ASM(s32, "181810", load_tattle_flags);
ApiStatus func_80253FB0(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80253FB0(ScriptInstance* script, s32 isInitialCall) {
gCurrentEncounter.battleOutcome = 3; gCurrentEncounter.battleOutcome = 3;
func_80241190(0x20); btl_set_state(0x20);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -12,11 +12,11 @@ INCLUDE_ASM(s32, "18C790", func_8025E108);
INCLUDE_ASM(s32, "18C790", func_8025E14C); INCLUDE_ASM(s32, "18C790", func_8025E14C);
INCLUDE_ASM(s32, "18C790", func_8025E190); INCLUDE_ASM(s32, "18C790", btl_state_update_celebration);
INCLUDE_ASM(s32, "18C790", func_8025FF8C); INCLUDE_ASM(s32, "18C790", btl_draw_upgrade_windows);
INCLUDE_ASM(s32, "18C790", func_802601BC); INCLUDE_ASM(s32, "18C790", btl_state_draw_celebration);
INCLUDE_ASM(s32, "18C790", func_80260948); INCLUDE_ASM(s32, "18C790", func_80260948);

View File

@ -91,7 +91,7 @@ ApiStatus func_80260DD8(ScriptInstance* script, s32 isInitialCall) {
} }
ApiStatus func_80260E38(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80260E38(ScriptInstance* script, s32 isInitialCall) {
show_battle_message(0x31, 60); btl_show_battle_message(0x31, 60);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -112,7 +112,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -133,8 +133,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_8029FBA0 = create_icon(&D_80108A64); D_8029FBA0 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_8029FBA0, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -145,8 +145,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) { ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
s32 sellValue = gItemTable[gBattleStatus.selectedItemID].sellValue; s32 sellValue = gItemTable[gBattleStatus.selectedItemID].sellValue;
if (heroes_is_ability_active(gBattleStatus.playerActor, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(gBattleStatus.playerActor, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_8029FBA0); free_hud_element(D_8029FBA0);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -154,7 +154,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_802610CC(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802610CC(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
func_8011D82C(1); mdl_set_all_fog_mode(1);
*D_801512F0 = 1; *D_801512F0 = 1;
set_background_color_blend(0, 0, 0, 0); set_background_color_blend(0, 0, 0, 0);
script->functionTemp[0].s = 20; script->functionTemp[0].s = 20;
@ -170,7 +170,7 @@ ApiStatus func_802610CC(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_80261164(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80261164(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[0].s = 20; script->functionTemp[0].s = 20;
unfreeze_cam(); btl_cam_unfreeze();
} }
set_background_color_blend(0, 0, 0, (script->functionTemp[0].s * 12) & 0xFC); set_background_color_blend(0, 0, 0, (script->functionTemp[0].s * 12) & 0xFC);
@ -184,7 +184,7 @@ ApiStatus func_80261164(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_BLOCK; return ApiStatus_BLOCK;
} }
ApiStatus func_802611E8(ScriptInstance *script, s32 isInitialCall) { ApiStatus ConsumeLifeShroom(ScriptInstance *script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
StaticItem* item = &gItemTable[0x95]; StaticItem* item = &gItemTable[0x95];
@ -201,7 +201,7 @@ ApiStatus func_802611E8(ScriptInstance *script, s32 isInitialCall) {
// TODO something wrong with the struct breakdown for BattleStatus // TODO something wrong with the struct breakdown for BattleStatus
#ifdef NON_MATCHING #ifdef NON_MATCHING
ApiStatus func_8026127C(ScriptInstance* script, s32 isInitialCall) { ApiStatus RestorePreDefeatState(ScriptInstance* script, s32 isInitialCall) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -224,7 +224,7 @@ ApiStatus func_8026127C(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
#else #else
INCLUDE_ASM(s32, "18F340", func_8026127C); INCLUDE_ASM(s32, "18F340", RestorePreDefeatState);
#endif #endif
ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80261388(ScriptInstance* script, s32 isInitialCall) {
@ -248,7 +248,7 @@ ApiStatus func_802613BC(ScriptInstance* script, s32 isInitialCall) {
s32 var2 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++);
s32 var3 = get_variable(script, *args++); s32 var3 = get_variable(script, *args++);
func_800720B0(6, var1, var2 + 15, var3, 1.2f, 30); playFX_6B(6, var1, var2 + 15, var3, 1.2f, 30);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -258,13 +258,13 @@ ApiStatus func_80261478(ScriptInstance* script, s32 isInitialCall) {
s32 var2 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++);
s32 var3 = get_variable(script, *args++); s32 var3 = get_variable(script, *args++);
func_80071750(9, var1, var2 + 15, var3, 5.0f, 15); playFX_52(9, var1, var2 + 15, var3, 5.0f, 15);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80261530(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80261530(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
func_8011D82C(1); mdl_set_all_fog_mode(1);
*D_801512F0 = 1; *D_801512F0 = 1;
set_background_color_blend(0, 0, 0, 0); set_background_color_blend(0, 0, 0, 0);
script->functionTemp[0].s = 25; script->functionTemp[0].s = 25;
@ -329,8 +329,8 @@ ApiStatus func_802616F4(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[1].s = 0; script->functionTemp[1].s = 0;
D_8029FB94 = merlee->pos.y; D_8029FB94 = merlee->pos.y;
D_8029FB98 = func_80071750(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0); D_8029FB98 = playFX_52(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0);
D_8029FB9C = func_80071750(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0); D_8029FB9C = playFX_52(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0);
D_8029FBA4 = 0; D_8029FBA4 = 0;
D_8029FB90 = 12; D_8029FB90 = 12;
sfx_play_sound(0x2074); sfx_play_sound(0x2074);
@ -408,24 +408,24 @@ ApiStatus func_802619E8(ScriptInstance* script, s32 isInitialCall) {
screenY -= 19; screenY -= 19;
if (script->varTable[10] > 0) { if (script->varTable[10] > 0) {
D_8029FBAC = create_icon(&D_80108AD4); D_8029FBAC = create_hud_element(&D_80108AD4);
set_icon_render_pos(D_8029FBAC, screenX, screenY); set_hud_element_render_pos(D_8029FBAC, screenX, screenY);
screenY += 9; screenY += 9;
} }
if (script->varTable[11] > 0 || script->varTable[12] > 0) { if (script->varTable[11] > 0 || script->varTable[12] > 0) {
D_8029FBA8 = create_icon(&D_80108AAC); D_8029FBA8 = create_hud_element(&D_80108AAC);
set_icon_render_pos(D_8029FBA8, screenX, screenY); set_hud_element_render_pos(D_8029FBA8, screenX, screenY);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80261B40(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80261B40(ScriptInstance* script, s32 isInitialCall) {
if (script->varTable[10] > 0) { if (script->varTable[10] > 0) {
free_icon(D_8029FBAC); free_hud_element(D_8029FBAC);
} }
if (script->varTable[11] > 0 || script->varTable[12] > 0) { if (script->varTable[11] > 0 || script->varTable[12] > 0) {
free_icon(D_8029FBA8); free_hud_element(D_8029FBA8);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -437,7 +437,7 @@ ApiStatus FXRecoverHP(ScriptInstance* script, s32 isInitialCall) {
s32 var3 = get_variable(script, *args++); s32 var3 = get_variable(script, *args++);
s32 var4 = get_variable(script, *args++); s32 var4 = get_variable(script, *args++);
func_80071090(0, var1, var2, var3, var4); playFX_40(0, var1, var2, var3, var4);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -448,7 +448,7 @@ ApiStatus FXRecoverFP(ScriptInstance* script, s32 isInitialCall) {
s32 var3 = get_variable(script, *args++); s32 var3 = get_variable(script, *args++);
s32 var4 = get_variable(script, *args++); s32 var4 = get_variable(script, *args++);
func_80071090(1, var1, var2, var3, var4); playFX_40(1, var1, var2, var3, var4);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -474,7 +474,7 @@ ApiStatus IncrementPlayerFP(ScriptInstance* script, s32 isInitialCall) {
ApiStatus func_80261D98(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80261D98(ScriptInstance* script, s32 isInitialCall) {
inflict_status_set_duration(get_actor(script->owner1.actorID), 4, 0, 1); inflict_status_set_duration(get_actor(script->owner1.actorID), 4, 0, 1);
func_8026777C(); btl_update_ko_status();
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -1072,11 +1072,11 @@ INCLUDE_ASM(s32, "190B20", func_80263268);
INCLUDE_ASM(s32, "190B20", func_80263300); INCLUDE_ASM(s32, "190B20", func_80263300);
INCLUDE_ASM(s32, "190B20", func_802633E8); INCLUDE_ASM(s32, "190B20", btl_are_all_enemies_defeated);
INCLUDE_ASM(s32, "190B20", func_80263434); INCLUDE_ASM(s32, "190B20", btl_check_enemies_defeated);
INCLUDE_ASM(s32, "190B20", func_80263464); INCLUDE_ASM(s32, "190B20", btl_check_player_defeated);
INCLUDE_ASM(s32, "190B20", func_802634B8); INCLUDE_ASM(s32, "190B20", func_802634B8);
@ -1088,7 +1088,7 @@ INCLUDE_ASM(s32, "190B20", count_power_plus);
INCLUDE_ASM(s32, "190B20", deduct_current_move_fp); INCLUDE_ASM(s32, "190B20", deduct_current_move_fp);
INCLUDE_ASM(s32, "190B20", func_80263C60); INCLUDE_ASM(s32, "190B20", reset_actor_turn_info);
INCLUDE_ASM(s32, "190B20", func_80263CC4); INCLUDE_ASM(s32, "190B20", func_80263CC4);
@ -1362,7 +1362,7 @@ void remove_actor_decoration(Actor* actor, s32 decorationIndex) {
} }
} }
s32 heroes_is_ability_active(Actor* actor, Ability ability) { s32 player_team_is_ability_active(Actor* actor, Ability ability) {
s32 actorGenus = actor->actorID & 0x700; s32 actorGenus = actor->actorID & 0x700;
s32 hasAbility = FALSE; s32 hasAbility = FALSE;
@ -1392,7 +1392,7 @@ void remove_part_shadow(ActorID actorID, s32 partIndex) {
ActorPart* part = get_actor_part(get_actor(actorID), partIndex); ActorPart* part = get_actor_part(get_actor(actorID), partIndex);
part->flags |= 4; part->flags |= 4;
func_80112328(part->shadow); delete_shadow(part->shadow);
} }
void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part) { void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part) {
@ -1401,8 +1401,8 @@ void create_part_shadow_by_ref(UNK_TYPE arg0, ActorPart* part) {
part->shadowScale = part->size[0] / 24.0; part->shadowScale = part->size[0] / 24.0;
} }
void func_80071A50(s32, f32 x, f32 y, f32 z, f32 scale /* maybe */, s32); void playFX_5A(s32, f32 x, f32 y, f32 z, f32 scale /* maybe */, s32);
void func_80071C30(s32, f32 x, f32 y, f32 z, f32 scale /* maybe */, s32); void playFX_5F(s32, f32 x, f32 y, f32 z, f32 scale /* maybe */, s32);
void remove_player_buffs(PlayerBuff buffs) { void remove_player_buffs(PlayerBuff buffs) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
@ -1429,23 +1429,23 @@ void remove_player_buffs(PlayerBuff buffs) {
if ((buffs & 0x20) && (player->staticStatus != 0)) { if ((buffs & 0x20) && (player->staticStatus != 0)) {
player->staticDuration = 0; player->staticDuration = 0;
player->staticStatus = 0; player->staticStatus = 0;
func_800479A0(player->unk_436); remove_status_2(player->unk_436);
} }
if ((buffs & 0x40) && (player->transStatus != 0)) { if ((buffs & 0x40) && (player->transStatus != 0)) {
player->transDuration = 0; player->transDuration = 0;
player->transStatus = 0; player->transStatus = 0;
playerPartsTable->flags &= ~0x100; playerPartsTable->flags &= ~0x100;
func_80047AA8(player->unk_436); remove_status_3(player->unk_436);
} }
if ((buffs & 0x200) && (battleStatus->waterBlockTurnsLeft != 0)) { if ((buffs & 0x200) && (battleStatus->waterBlockTurnsLeft != 0)) {
battleStatus->waterBlockTurnsLeft = 0; battleStatus->waterBlockTurnsLeft = 0;
battleStatus->unk_43C->unk_0C->unk_10 = 0; battleStatus->unk_43C->unk_0C->unk_10 = 0;
battleStatus->unk_A0[0] |= 0x10; battleStatus->unk_A0[0] |= 0x10;
func_80071A50(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 0xA); playFX_5A(1, player->currentPos.x, player->currentPos.y + 18.0f, player->currentPos.z + 5.0f, 1.5f, 0xA);
func_80071C30(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 0x18); playFX_5F(0, player->currentPos.x - 10.0f, player->currentPos.y + 5.0f, player->currentPos.z + 5.0f, 1.0f, 0x18);
func_80071C30(0, player->currentPos.x - 15.0f, player->currentPos.y + 32.0f, player->currentPos.z + 5.0f, 1.0f, 0x18); playFX_5F(0, player->currentPos.x - 15.0f, player->currentPos.y + 32.0f, player->currentPos.z + 5.0f, 1.0f, 0x18);
func_80071C30(1, player->currentPos.x + 15.0f, player->currentPos.y + 22.0f, player->currentPos.z + 5.0f, 1.0f, 0x18); playFX_5F(1, player->currentPos.x + 15.0f, player->currentPos.y + 22.0f, player->currentPos.z + 5.0f, 1.0f, 0x18);
battleStatus->unk_A0 = NULL; battleStatus->unk_A0 = NULL;
sfx_play_sound(0x299); sfx_play_sound(0x299);
@ -1469,12 +1469,12 @@ void remove_player_buffs(PlayerBuff buffs) {
} }
} }
INCLUDE_ASM(s32, "190B20", func_8026777C); INCLUDE_ASM(s32, "190B20", btl_update_ko_status);
INCLUDE_ASM(s32, "190B20", func_8026787C); INCLUDE_ASM(s32, "190B20", btl_appendGfx_prim_quad);
// extern s32 D_80293970; // extern s32 D_80293970;
// void func_8026787C(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7) { // void btl_appendGfx_prim_quad(s32 arg0, s32 arg1, s32 arg2, s32 arg3, s16 arg4, s16 arg5, s16 arg6, s16 arg7) {
// gDPPipeSync(gMasterGfxPos++); // gDPPipeSync(gMasterGfxPos++);
// gSPDisplayList(gMasterGfxPos++, &D_80293970); // gSPDisplayList(gMasterGfxPos++, &D_80293970);
@ -1494,11 +1494,11 @@ INCLUDE_ASM(s32, "190B20", func_8026787C);
// gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA); // gDPSetCombineMode(gMasterGfxPos++, G_CC_DECALRGBA, G_CC_DECALRGBA);
// } // }
INCLUDE_ASM(s32, "190B20", func_80267A3C); INCLUDE_ASM(s32, "190B20", btl_draw_prim_quad);
INCLUDE_ASM(s32, "190B20", reset_all_actor_sounds); INCLUDE_ASM(s32, "190B20", reset_all_actor_sounds);
void hide_foreground_models_unsafe(void) { void hide_foreground_models_unchecked(void) {
FGModelData* data = gBattleStatus.foregroundModelData; FGModelData* data = gBattleStatus.foregroundModelData;
if (data != NULL && data->idList != NULL) { if (data != NULL && data->idList != NULL) {
@ -1513,7 +1513,7 @@ void hide_foreground_models_unsafe(void) {
} }
} }
void show_foreground_models_unsafe(void) { void show_foreground_models_unchecked(void) {
FGModelData* data = gBattleStatus.foregroundModelData; FGModelData* data = gBattleStatus.foregroundModelData;
if (data != NULL && data->idList != NULL) { if (data != NULL && data->idList != NULL) {

View File

@ -39,7 +39,7 @@ ApiStatus func_8026919C(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "196AA0", func_802691C8); INCLUDE_ASM(s32, "196AA0", SetupMashMeter);
ApiStatus GetActionSuccess(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetActionSuccess(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess); set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
@ -51,21 +51,21 @@ ApiStatus SetActionSuccess(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802692EC(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetActionCommandMode(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.unk_83 = get_variable(script, *script->ptrReadPos); gBattleStatus.unk_83 = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80269318(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetActionCommandMode(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.unk_83); set_variable(script, *script->ptrReadPos, gBattleStatus.unk_83);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "196AA0", func_80269344); INCLUDE_ASM(s32, "196AA0", func_80269344);
INCLUDE_ASM(s32, "196AA0", func_80269370); INCLUDE_ASM(s32, "196AA0", SetCommandAutoSuccess);
INCLUDE_ASM(s32, "196AA0", func_8026939C); INCLUDE_ASM(s32, "196AA0", GetCommandAutoSuccess);
ApiStatus func_802693F0(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_802693F0(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.flags1 &= ~0x4000; gBattleStatus.flags1 &= ~0x4000;
@ -98,12 +98,12 @@ ApiStatus GetBlockResult(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802695A8(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetActionResult(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.unk_84); set_variable(script, *script->ptrReadPos, gBattleStatus.unk_84);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802695D4(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetActionResult(ScriptInstance* script, s32 isInitialCall) {
gBattleStatus.unk_84 = get_variable(script, *script->ptrReadPos); gBattleStatus.unk_84 = get_variable(script, *script->ptrReadPos);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -2048,14 +2048,14 @@ ApiStatus GetBattleState(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_8026E16C(ScriptInstance* script, s32 isInitialCall) { ApiStatus SetBattleState(ScriptInstance* script, s32 isInitialCall) {
func_80241190(get_variable(script, *script->ptrReadPos)); btl_set_state(get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
INCLUDE_ASM(s32, "197F40", func_8026E198); INCLUDE_ASM(s32, "197F40", WaitForState);
INCLUDE_ASM(s32, "197F40", func_8026E208); INCLUDE_ASM(s32, "197F40", CancelEnemyTurn);
INCLUDE_ASM(s32, "197F40", func_8026E260); INCLUDE_ASM(s32, "197F40", func_8026E260);
@ -2107,7 +2107,7 @@ INCLUDE_ASM(s32, "197F40", GetOwnerTarget);
INCLUDE_ASM(s32, "197F40", func_8026E914); INCLUDE_ASM(s32, "197F40", func_8026E914);
ApiStatus GetAttackerActorID(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetPlayerActorID(ScriptInstance* script, s32 isInitialCall) {
set_variable(script, *script->ptrReadPos, gBattleStatus.attackerActorID); set_variable(script, *script->ptrReadPos, gBattleStatus.attackerActorID);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -3,12 +3,12 @@
#include "script_api/battle.h" #include "script_api/battle.h"
ApiStatus func_80271210(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80271210(ScriptInstance* script, s32 isInitialCall) {
func_80070AF0(0, script->varTable[0], script->varTable[1], script->varTable[2]); playFX_31(0, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80271258(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_80271258(ScriptInstance* script, s32 isInitialCall) {
func_80070AF0(1, script->varTable[0], script->varTable[1], script->varTable[2]); playFX_31(1, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -22,7 +22,7 @@ ApiStatus func_802713B0(ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(ApiStatus, "19FAF0", func_802713B0, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(ApiStatus, "19FAF0", func_802713B0, ScriptInstance* script, s32 isInitialCall);
ApiStatus func_8027143C(ScriptInstance* script, s32 isInitialCall) { ApiStatus func_8027143C(ScriptInstance* script, s32 isInitialCall) {
func_80070A90(0, script->varTable[0], script->varTable[1], script->varTable[2]); playFX_30(0, script->varTable[0], script->varTable[1], script->varTable[2]);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -245,7 +245,7 @@ ApiStatus func_80276EFC(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_80276F1C(ScriptInstance* script, s32 isInitialCall) { ApiStatus DispatchEventPlayer(ScriptInstance* script, s32 isInitialCall) {
dispatch_event_player(get_variable(script, *script->ptrReadPos)); dispatch_event_player(get_variable(script, *script->ptrReadPos));
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -3,7 +3,7 @@
void dispatch_event_actor(Actor* actor, Event event); void dispatch_event_actor(Actor* actor, Event event);
s32 func_80276F50(Actor* actor) { s32 has_enchanted_part(Actor* actor) {
ActorPart* partIt = actor->partsTable; ActorPart* partIt = actor->partsTable;
s32 ret = FALSE; s32 ret = FALSE;
@ -833,19 +833,19 @@ ApiStatus ClearStatusEffects(ScriptInstance* script, s32 isInitialCall) {
if (actor->debuff != STATUS_END) { if (actor->debuff != STATUS_END) {
actor->debuffDuration = 0; actor->debuffDuration = 0;
actor->debuff = STATUS_END; actor->debuff = STATUS_END;
func_80047898(actor->unk_436); remove_status_1(actor->unk_436);
} }
if (actor->staticStatus != 0) { if (actor->staticStatus != 0) {
actor->staticDuration = 0; actor->staticDuration = 0;
actor->staticStatus = 0; actor->staticStatus = 0;
func_800479A0(actor->unk_436); remove_status_2(actor->unk_436);
} }
if (actor->transStatus != 0) { if (actor->transStatus != 0) {
actor->transDuration = 0; actor->transDuration = 0;
actor->transStatus = 0; actor->transStatus = 0;
func_80047AA8(actor->unk_436); remove_status_3(actor->unk_436);
} }
if (actor->stoneStatus != 0) { if (actor->stoneStatus != 0) {

View File

@ -221,11 +221,11 @@ ApiStatus func_8028070C(ScriptInstance* script, s32 isInitialCall) {
ApiStatus DeletePartner(ScriptInstance* script, s32 isInitialCall) { ApiStatus DeletePartner(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
delete_actor(battleStatus->partnerActor); btl_delete_actor(battleStatus->partnerActor);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
ApiStatus func_802807D0(ScriptInstance* script, s32 isInitialCall) { ApiStatus GetActionCommandResult(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 var = *script->ptrReadPos; s32 var = *script->ptrReadPos;
s32 actionSuccess = battleStatus->actionSuccess; s32 actionSuccess = battleStatus->actionSuccess;

View File

@ -14,7 +14,7 @@ ApiStatus GetDamageIntensity(ScriptInstance* script, s32 isInitialCall) {
} }
// TODO: Rename to AddEffectOffset // TODO: Rename to AddEffectOffset
ApiStatus ActorAddMovePos(ScriptInstance* script, s32 isInitialCall) { ApiStatus AddEffectOffset(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
EffectInstance* effect = get_variable(script, *args++); EffectInstance* effect = get_variable(script, *args++);

View File

@ -35,21 +35,21 @@ void set_defeated(s32 mapID, s32 encounterID) {
ApiStatus ShowMerleeCoinMessage(ScriptInstance* script, s32 isInitialCall) { ApiStatus ShowMerleeCoinMessage(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
func_80045D00(0, 60); show_merlee_message(0, 60);
} }
return (is_merlee_message_done() == 0) * ApiStatus_DONE2; return (is_merlee_message_done() == 0) * ApiStatus_DONE2;
} }
ApiStatus ShowMerleeRanOutMessage(ScriptInstance* script, s32 isInitialCall) { ApiStatus ShowMerleeRanOutMessage(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
func_80045D00(1, 60); show_merlee_message(1, 60);
} }
return (is_merlee_message_done() == 0) * ApiStatus_DONE2; return (is_merlee_message_done() == 0) * ApiStatus_DONE2;
} }
ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall) { ApiStatus FadeBackgroundToBlack(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
func_8011D82C(1); mdl_set_all_fog_mode(1);
*D_801512F0 = 1; *D_801512F0 = 1;
set_background_color_blend(0, 0, 0, 0); set_background_color_blend(0, 0, 0, 0);
script->functionTemp[0].s = 25; script->functionTemp[0].s = 25;
@ -114,8 +114,8 @@ ApiStatus MerleeUpdateFX(ScriptInstance* script, s32 isInitialCall) {
if (isInitialCall) { if (isInitialCall) {
script->functionTemp[1].s = 0; script->functionTemp[1].s = 0;
D_800A0BA4 = merlee->pos.y; D_800A0BA4 = merlee->pos.y;
D_800A0BA8 = func_80071750(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0); D_800A0BA8 = playFX_52(0, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.4f, 0);
D_800A0BAC = func_80071750(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0); D_800A0BAC = playFX_52(3, merlee->pos.x, merlee->pos.y, merlee->pos.z, 0.00001f, 0);
D_800A0BB8 = 0; D_800A0BB8 = 0;
D_800A0BA0 = 12; D_800A0BA0 = 12;
sfx_play_sound(0x2074); sfx_play_sound(0x2074);
@ -192,7 +192,7 @@ ApiStatus PlayMerleeGatherFX(ScriptInstance* script, s32 isInitialCall) {
s32 var1 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++);
s32 var2 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++);
func_800720B0(6, var0, var1, var2, 1.2f, 30); playFX_6B(6, var0, var1, var2, 1.2f, 30);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -202,7 +202,7 @@ ApiStatus PlayMerleeOrbFX(ScriptInstance* script, s32 isInitialCall) {
s32 var1 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++);
s32 var2 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++);
func_80071750(9, var0, var1, var2, 5.0f, 15); playFX_52(9, var0, var1, var2, 5.0f, 15);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -224,12 +224,12 @@ ApiStatus OnDefeatEnemy(ScriptInstance* script, s32 isInitialCall) {
if (script->functionTemp[1].s == 15) { if (script->functionTemp[1].s == 15) {
sfx_play_sound(SOUND_DEATH); sfx_play_sound(SOUND_DEATH);
func_80070190(1, npc->pos.x, npc->pos.y + (npc->collisionHeight / 2), npc->pos.z, 0, -1.0f, 0, 10); playFX_18(1, npc->pos.x, npc->pos.y + (npc->collisionHeight / 2), npc->pos.z, 0, -1.0f, 0, 10);
} }
temp1 = script->functionTemp[1].s; temp1 = script->functionTemp[1].s;
if (script->functionTemp[1].s == 10) { if (script->functionTemp[1].s == 10) {
func_8006F8F0(npc->pos.x, npc->pos.y + 10.0f, npc->pos.z + 10.0f); playFX_01(npc->pos.x, npc->pos.y + 10.0f, npc->pos.z + 10.0f);
if (script->functionTemp[1].s == temp1) { // what? (never can be false, seemingly) if (script->functionTemp[1].s == temp1) { // what? (never can be false, seemingly)
spawn_drops(enemy); spawn_drops(enemy);
} }
@ -314,20 +314,20 @@ void draw_encounters_pre_battle(void) {
} }
if (gGameStatusPtr->demoState == 2) { if (gGameStatusPtr->demoState == 2) {
set_transition_stencil_zoom_1(10, encounter->fadeOutAmount); set_screen_overlay_params_back(10, encounter->fadeOutAmount);
set_transition_stencil_alpha(1, 255.0f); set_screen_overlay_alpha(1, 255.0f);
set_transition_stencil_color(1, 0, 0, 0); set_screen_overlay_color(1, 0, 0, 0);
get_screen_coords(gCurrentCameraID, playerX, playerY + 20.0f, playerZ, &pScreenX, &pScreenY, &pScreenZ); get_screen_coords(gCurrentCameraID, playerX, playerY + 20.0f, playerZ, &pScreenX, &pScreenY, &pScreenZ);
get_screen_coords(gCurrentCameraID, otherX, otherY + 15.0f, otherZ, &oScreenX, &oScreenY, &oScreenZ); get_screen_coords(gCurrentCameraID, otherX, otherY + 15.0f, otherZ, &oScreenX, &oScreenY, &oScreenZ);
set_transition_stencil_center(1, 0, (pScreenX - oScreenX) / 2 + oScreenX, set_screen_overlay_center(1, 0, (pScreenX - oScreenX) / 2 + oScreenX,
(pScreenY - oScreenY) / 2 + oScreenY); (pScreenY - oScreenY) / 2 + oScreenY);
} else { } else {
set_transition_stencil_zoom_0(10, encounter->fadeOutAmount); set_screen_overlay_params_front(10, encounter->fadeOutAmount);
set_transition_stencil_alpha(0, 255.0f); set_screen_overlay_alpha(0, 255.0f);
set_transition_stencil_color(0, 0, 0, 0); set_screen_overlay_color(0, 0, 0, 0);
get_screen_coords(gCurrentCameraID, playerX, playerY + 20.0f, playerZ, &pScreenX, &pScreenY, &pScreenZ); get_screen_coords(gCurrentCameraID, playerX, playerY + 20.0f, playerZ, &pScreenX, &pScreenY, &pScreenZ);
get_screen_coords(gCurrentCameraID, otherX, otherY + 15.0f, otherZ, &oScreenX, &oScreenY, &oScreenZ); get_screen_coords(gCurrentCameraID, otherX, otherY + 15.0f, otherZ, &oScreenX, &oScreenY, &oScreenZ);
set_transition_stencil_center(0, 0, (pScreenX - oScreenX) / 2 + oScreenX, set_screen_overlay_center(0, 0, (pScreenX - oScreenX) / 2 + oScreenX,
(pScreenY - oScreenY) / 2 + oScreenY); (pScreenY - oScreenY) / 2 + oScreenY);
} }
} }
@ -345,8 +345,8 @@ s32 draw_encounters_post_battle(void) {
s32 ret = currentEncounter->fadeOutAccel; s32 ret = currentEncounter->fadeOutAccel;
if (ret != 0) { if (ret != 0) {
set_transition_stencil_zoom_0(0, currentEncounter->fadeOutAmount); set_screen_overlay_params_front(0, currentEncounter->fadeOutAmount);
ret = set_transition_stencil_color(0, 0, 0, 0); ret = set_screen_overlay_color(0, 0, 0, 0);
} }
return ret; return ret;
@ -392,7 +392,7 @@ void update_encounters_conversation(void) {
} }
enable_player_input(); enable_player_input();
func_800EF600(); partner_enable_input();
if (playerStatus->actionState == ACTION_STATE_TALK) { if (playerStatus->actionState == ACTION_STATE_TALK) {
set_action_state(ACTION_STATE_IDLE); set_action_state(ACTION_STATE_IDLE);

View File

@ -69,11 +69,11 @@ void step_game_loop(void) {
func_8011BAE8(); func_8011BAE8();
npc_iter_no_op(); npc_iter_no_op();
update_dynamic_entities(); update_generic_entities();
update_triggers(); update_triggers();
update_scripts(); update_scripts();
update_messages(); update_messages();
update_menu_icons(); update_hud_elements();
step_current_game_mode(); step_current_game_mode();
update_entities(); update_entities();
func_80138198(); func_80138198();
@ -170,19 +170,19 @@ void gfx_draw_frame(void) {
gSPMatrix(gMasterGfxPos++, D_800741A8, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW); gSPMatrix(gMasterGfxPos++, D_800741A8, G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
func_802DDA60(gDisplayContext, &gMasterGfxPos); spr_render_init(gDisplayContext, &gMasterGfxPos);
if (!(gOverrideFlags & 2)) { if (!(gOverrideFlags & 2)) {
render_frame(0); render_frame(0);
} }
func_800E0260(); player_render_interact_prompts();
func_802C3EE4(); func_802C3EE4();
render_transition_stencil_lower(); render_screen_overlay_backUI();
render_dynamic_entities_backUI(); render_generic_entities_backUI();
func_80142210(); render_hud_elements_backUI();
func_80059F94(); render_effects_UI();
render_ui(); state_render_backUI();
if (!(gOverrideFlags & 0x10000)) { if (!(gOverrideFlags & 0x10000)) {
render_window_root(); render_window_root();
@ -195,9 +195,9 @@ void gfx_draw_frame(void) {
render_messages(); render_messages();
} }
render_dynamic_entities_frontUI(); render_generic_entities_frontUI();
func_8014271C(); render_hud_elements_frontUI();
render_transition_stencil_upper(); render_screen_overlay_frontUI();
if ((gOverrideFlags & 0x100010) == 0x10) { if ((gOverrideFlags & 0x100010) == 0x10) {
render_messages(); render_messages();
@ -212,7 +212,7 @@ void gfx_draw_frame(void) {
render_window_root(); render_window_root();
} }
func_80112FC4(); state_render_frontUI();
if (gOverrideFlags & 0x20) { if (gOverrideFlags & 0x20) {
switch (D_800741A2) { switch (D_800741A2) {
@ -261,27 +261,27 @@ void load_engine_data(void) {
fio_init_flash(); fio_init_flash();
func_80028838(); func_80028838();
general_heap_create(); general_heap_create();
func_8011D890(); clear_render_tasks();
clear_dynamic_entity_list(); clear_generic_entity_list();
clear_script_list(); clear_script_list();
create_cameras_a(); create_cameras_a();
clear_player_status(); clear_player_status();
spr_init_sprites(0); spr_init_sprites(0);
clear_entity_models(); clear_entity_models();
func_8011E224(); clear_animator_list();
clear_model_data(); clear_model_data();
func_80148040(); clear_sprite_shading_data();
use_default_background_settings(); reset_background_settings();
clear_character_set(); clear_character_set();
clear_printers(); clear_printers();
func_80112B98(); clear_game_modes();
npc_list_clear(); clear_npcs();
func_80141100(); clear_hud_element_cache();
clear_trigger_data(); clear_trigger_data();
clear_entity_data(0); clear_entity_data(0);
clear_player_data(); clear_player_data();
func_8003E338(); init_encounter_status();
clear_transition_stencil(); clear_screen_overlays();
clear_effect_data(); clear_effect_data();
clear_saved_variables(); clear_saved_variables();
clear_item_entity_data(); clear_item_entity_data();

View File

@ -508,7 +508,7 @@ ApiStatus func_80045838(ScriptInstance* script, s32 isInitialCall) {
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
func_800494C0(npc, var2, var3); ai_enemy_play_sound(npc, var2, var3);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -541,7 +541,7 @@ ApiStatus func_80045900(ScriptInstance* script, s32 isInitialCall) {
f32 z = npc->pos.z; f32 z = npc->pos.z;
f32 a = 100.0f; f32 a = 100.0f;
if (func_800DCB7C(npc->unk_80, &x, &y, &z, &a) != 0) { if (npc_raycast_down_sides(npc->unk_80, &x, &y, &z, &a) != 0) {
npc->pos.y = y; npc->pos.y = y;
} }
npc->flags &= ~0x800; npc->flags &= ~0x800;

View File

@ -13,13 +13,13 @@ INCLUDE_ASM(s32, "20ec0_len_5040", func_80045BC8);
INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_messages); INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_messages);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045C88); INCLUDE_ASM(s32, "20ec0_len_5040", get_current_merlee_message);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045CC4); INCLUDE_ASM(s32, "20ec0_len_5040", dispose_merlee_message);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045D00); INCLUDE_ASM(s32, "20ec0_len_5040", show_merlee_message);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80045D7C); INCLUDE_ASM(s32, "20ec0_len_5040", update_merlee_message);
INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_message_string); INCLUDE_ASM(s32, "20ec0_len_5040", draw_merlee_message_string);
@ -33,72 +33,72 @@ INCLUDE_ASM(s32, "20ec0_len_5040", func_80045FB4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80046030); INCLUDE_ASM(s32, "20ec0_len_5040", func_80046030);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800465E0); INCLUDE_ASM(s32, "20ec0_len_5040", draw_all_status_icons);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047608); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_set);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800476F4); INCLUDE_ASM(s32, "20ec0_len_5040", remove_all_status_icons);
INCLUDE_ASM(s32, "20ec0_len_5040", func_8004778C); INCLUDE_ASM(s32, "20ec0_len_5040", set_status_icons_properties);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800477F4); INCLUDE_ASM(s32, "20ec0_len_5040", func_800477F4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047820); INCLUDE_ASM(s32, "20ec0_len_5040", func_80047820);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047898); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_1);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800478F8); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_1);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047928); INCLUDE_ASM(s32, "20ec0_len_5040", func_80047928);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800479A0); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_2);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047A00); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_2);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047A30); INCLUDE_ASM(s32, "20ec0_len_5040", func_80047A30);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047AA8); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_3);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B08); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_3);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B38); INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B38);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047B84); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047BE4); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_4);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047C14); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_boost_jump);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047CA4); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_icon_boost_jump);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047D00); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_icon_boost_jump);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047D30); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_boost_hammer);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047DC0); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_icon_boost_hammer);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047E1C); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_icon_boost_hammer);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047E4C); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_boost_partner);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047EDC); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_icon_boost_partner);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047F28); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_icon_boost_partner);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047F58); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_surprise);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80047FE8); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_icon_surprise);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048034); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_icon_surprise);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048064); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_peril);
INCLUDE_ASM(s32, "20ec0_len_5040", func_800480F4); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_icon_peril);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048140); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_icon_peril);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048170); INCLUDE_ASM(s32, "20ec0_len_5040", create_status_icon_danger);
INCLUDE_ASM(s32, "20ec0_len_5040", func_80048200); INCLUDE_ASM(s32, "20ec0_len_5040", remove_status_icon_danger);
INCLUDE_ASM(s32, "20ec0_len_5040", func_8004824C); INCLUDE_ASM(s32, "20ec0_len_5040", enable_status_icon_danger);

View File

@ -128,7 +128,7 @@ s32 func_800493EC(Enemy* enemy, s32 arg1, f32 arg2, f32 arg3) {
return 0; return 0;
} }
void func_800494C0(Npc* npc, s32 arg1, s32 arg2) { void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2) {
Enemy* enemy = get_enemy(npc->npcID); Enemy* enemy = get_enemy(npc->npcID);
s32 value2 = (arg2 & 0xFFFF0000) | 2; s32 value2 = (arg2 & 0xFFFF0000) | 2;
@ -165,7 +165,7 @@ void func_80049E3C(ScriptInstance* script) {
Enemy* enemy = script->owner1.enemy; Enemy* enemy = script->owner1.enemy;
Npc* npc = get_npc_unsafe(enemy->npcID); Npc* npc = get_npc_unsafe(enemy->npcID);
func_800494C0(npc, 0x3E1, 0); ai_enemy_play_sound(npc, 0x3E1, 0);
npc->currentAnim.w = enemy->animList[4]; npc->currentAnim.w = enemy->animList[4];
npc->jumpVelocity = 10.0f; npc->jumpVelocity = 10.0f;
npc->jumpScale = 2.5f; npc->jumpScale = 2.5f;

View File

@ -58,7 +58,7 @@ void func_8004B440(SoundManager* manager, u8 arg1, u8 arg2, UnkAl19E0* arg3, u8
manager->unk_168 = 0; manager->unk_168 = 0;
func_8004BA54(manager, 0); func_8004BA54(manager, 0);
snd_clear_sfx_queue(manager); snd_clear_sfx_queue(manager);
snd_initialize_fade(&manager->unk_40, 0, 0x7FFF, 0x7FFF); snd_initialize_bgm_fade(&manager->unk_40, 0, 0x7FFF, 0x7FFF);
func_80053A98(manager->unk_BE, manager->unk_40.unk_00.u16, manager->unk_5C); func_80053A98(manager->unk_BE, manager->unk_40.unk_00.u16, manager->unk_5C);
manager->unk_8C = 0xFF; manager->unk_8C = 0xFF;
@ -177,64 +177,64 @@ INCLUDE_ASM(s16, "26840_len_20d0", func_8004C444, SoundManager* manager);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C578); INCLUDE_ASM(s32, "26840_len_20d0", func_8004C578);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C844); INCLUDE_ASM(s32, "26840_len_20d0", snd_get_scaled_volume);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004C884); INCLUDE_ASM(s32, "26840_len_20d0", func_8004C884);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CD94); INCLUDE_ASM(s32, "26840_len_20d0", snd_set_voice_volume);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CDF8); INCLUDE_ASM(s32, "26840_len_20d0", func_8004CDF8);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CE70); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_00_SetVolume);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CEA4); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_01_SetPan);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CEC4); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_02_SetInstrument);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CF0C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_03_SetReverb);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004CF3C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_04);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D00C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_05);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D038); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_06);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D050); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_07);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D07C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_08);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D114); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_09_StartLoop);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D130); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_0A_EndLoop);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D15C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_0B);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D180); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_0C);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D1B4); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_0D);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D23C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_0E);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D2B0); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_0F);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D2E4); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_10_Jump);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D310); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_11_Restart);
void func_8004D31C(void) { void snd_SEFCmd_12_NOP(void) {
} }
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D324); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_13);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D33C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_14);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D354); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_15);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D36C); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_16);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D3A0); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_17);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D3F8); INCLUDE_ASM(s32, "26840_len_20d0", snd_SEFCmd_18);
INCLUDE_ASM(s32, "26840_len_20d0", func_8004D428); INCLUDE_ASM(s32, "26840_len_20d0", func_8004D428);

View File

@ -20,7 +20,7 @@ BGMPlayer* snd_get_player_with_song_name(s32 songString) {
INCLUDE_ASM(BGMPlayer*, "28910_len_5090", snd_get_player_with_song_name, s32 songString); INCLUDE_ASM(BGMPlayer*, "28910_len_5090", snd_get_player_with_song_name, s32 songString);
#endif #endif
INCLUDE_ASM(s32, "28910_len_5090", func_8004D7E0); INCLUDE_ASM(s32, "28910_len_5090", snd_dispatch_bgm_player_event);
s32 func_8004DA0C(s32 songName) { s32 func_8004DA0C(s32 songName) {
s32 ret = 0; s32 ret = 0;
@ -55,11 +55,11 @@ void func_8004DAA8(BGMPlayer* player) {
player->unk_221 = 4; player->unk_221 = 4;
player->unk_10 = 1; player->unk_10 = 1;
player->unkFrequency = 1; player->unkFrequency = 1;
func_80053A18(&player->fadeInfo); snd_clear_bgm_fade(&player->fadeInfo);
} }
} }
s32 func_8004DAE0(s32 songName) { s32 snd_is_song_playing(s32 songName) {
if (songName != 0) { if (songName != 0) {
BGMPlayer* player = snd_get_player_with_song_name(songName); BGMPlayer* player = snd_get_player_with_song_name(songName);

View File

@ -352,9 +352,9 @@ void func_800538C4(UnkAl48* arg0, s32 arg1) { // type may be wrong but it seems
func_800576EC(arg1, 0, 0xB8); func_800576EC(arg1, 0, 0xB8);
} }
INCLUDE_ASM(s32, "2e230_len_2190", func_800538F8); INCLUDE_ASM(s32, "2e230_len_2190", snd_tune_param_to_timescale);
void snd_initialize_fade(Fade* fade, s32 time, s32 startValue, s16 endValue) { void snd_initialize_bgm_fade(Fade* fade, s32 time, s32 startValue, s16 endValue) {
fade->currentVolume.s32 = startValue * 0x10000; fade->currentVolume.s32 = startValue * 0x10000;
fade->endVolume = endValue; fade->endVolume = endValue;
@ -369,7 +369,7 @@ void snd_initialize_fade(Fade* fade, s32 time, s32 startValue, s16 endValue) {
fade->fpFadeCallback = NULL; fade->fpFadeCallback = NULL;
} }
void func_80053A18(Fade* fade) { void snd_clear_bgm_fade(Fade* fade) {
fade->fadeTime = 0; fade->fadeTime = 0;
fade->fadeStep = 0; fade->fadeStep = 0;
fade->fpFadeCallback = NULL; fade->fpFadeCallback = NULL;

View File

@ -37,7 +37,7 @@ void func_80055068(u32 arg0) {
s32 filename = snd_load_song((arg0 >> 4) & 0xFF, 0); s32 filename = snd_load_song((arg0 >> 4) & 0xFF, 0);
if (filename > ASCII_TO_U32('0', ' ', ' ', '\0')) { if (filename > ASCII_TO_U32('0', ' ', ' ', '\0')) {
func_80055970(filename, (arg0 >> 0xC) & 3); snd_start_song_variation(filename, (arg0 >> 0xC) & 3);
} }
} }
break; break;
@ -354,9 +354,9 @@ s32 snd_load_song(s32 songID, s32 playerIndex) {
} }
} }
INCLUDE_ASM(s32, "30450", func_8005591C); INCLUDE_ASM(s32, "30450", snd_start_song);
INCLUDE_ASM(s32, "30450", func_80055970); INCLUDE_ASM(s32, "30450", snd_start_song_variation);
s32 func_800559C4(UNK_TYPE arg0) { s32 func_800559C4(UNK_TYPE arg0) {
return func_8004DA0C(arg0); return func_8004DA0C(arg0);
@ -367,14 +367,14 @@ void func_800559E0(void) {
} }
void func_800559FC(void) { void func_800559FC(void) {
func_8004DAE0(); snd_is_song_playing();
} }
INCLUDE_ASM(s32, "30450", func_80055A18); INCLUDE_ASM(s32, "30450", snd_set_song_variation_fade);
INCLUDE_ASM(s32, "30450", func_80055A6C); INCLUDE_ASM(s32, "30450", snd_set_song_fade);
INCLUDE_ASM(s32, "30450", func_80055ABC); INCLUDE_ASM(s32, "30450", snd_set_song_variation_fade_time);
INCLUDE_ASM(s32, "30450", func_80055AF0); INCLUDE_ASM(s32, "30450", func_80055AF0);

View File

@ -6,7 +6,7 @@ ApiStatus func_802BD100_3251D0(ScriptInstance* script, s32 isInitialCall) {
s32 b = get_variable(script, *args++); s32 b = get_variable(script, *args++);
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
func_8006FEF0(0, a, b, c, 60.0f); playFX_11(0, a, b, c, 60.0f);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -17,7 +17,7 @@ ApiStatus func_802BD1AC_32527C(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(0, a, b, c, d); playFX_40(0, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -28,7 +28,7 @@ ApiStatus func_802BD26C(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(1, a, b, c, d); playFX_40(1, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -65,7 +65,7 @@ void func_80059D48(void) {
INCLUDE_ASM(s32, "341d0", update_effects); INCLUDE_ASM(s32, "341d0", update_effects);
s32 render_effects(void) { s32 render_effects_world(void) {
s32 i; s32 i;
for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) { for (i = 0; i < ARRAY_COUNT(D_800B4398); i++) {
@ -81,7 +81,7 @@ s32 render_effects(void) {
} }
} }
INCLUDE_ASM(s32, "341d0", func_80059F94); INCLUDE_ASM(s32, "341d0", render_effects_UI);
EffectInstance* func_8005A2BC(EffectBlueprint* effectBp) { EffectInstance* func_8005A2BC(EffectBlueprint* effectBp) {
EffectInstance* newEffectInst; EffectInstance* newEffectInst;

View File

@ -68,7 +68,7 @@ INCLUDE_ASM(s32, "362a0_len_2f70", test_up_ray_triangle);
INCLUDE_ASM(s32, "362a0_len_2f70", test_ray_colliders); INCLUDE_ASM(s32, "362a0_len_2f70", test_ray_colliders);
INCLUDE_ASM(s32, "362a0_len_2f70", test_ray_zones); INCLUDE_ASM(s32, "362a0_len_2f70", test_ray_zones, f32 arg0, f32 arg1, f32 arg2, f32* arg3, f32* arg4, f32* arg5, f32* arg6, f32* arg7, f32* arg8, f32* arg9);
INCLUDE_ASM(s32, "362a0_len_2f70", test_up_ray_collider); INCLUDE_ASM(s32, "362a0_len_2f70", test_up_ray_collider);

View File

@ -160,23 +160,23 @@ void func_802A10B8(void) {
s32* icons1 = &D_802AD010; s32* icons1 = &D_802AD010;
s32* icons2 = &D_802AD028; s32* icons2 = &D_802AD028;
free_icon(icons1[i]); free_hud_element(icons1[i]);
free_icon(icons2[i]); free_hud_element(icons2[i]);
} }
free_icon(D_802AD040); free_hud_element(D_802AD040);
free_icon(D_802AD044); free_hud_element(D_802AD044);
free_icon(D_802AD048); free_hud_element(D_802AD048);
free_icon(D_802AD04C); free_hud_element(D_802AD04C);
free_icon(D_802AD05C); free_hud_element(D_802AD05C);
free_icon(D_802AD050); free_hud_element(D_802AD050);
free_icon(D_802AD054); free_hud_element(D_802AD054);
free_icon(D_802AD058); free_hud_element(D_802AD058);
} }
INCLUDE_ASM(s32, "415D90", func_802A11B0); INCLUDE_ASM(s32, "415D90", func_802A11B0);
INCLUDE_ASM(s32, "415D90", draw_battle_wheel); INCLUDE_ASM(s32, "415D90", btl_draw_menu_wheel);
INCLUDE_ASM(s32, "415D90", func_802A2684); INCLUDE_ASM(s32, "415D90", func_802A2684);
@ -194,21 +194,21 @@ void func_802A2910(void) {
moveOptionIconIDs = &battle_menu_moveOptionIconIDs; moveOptionIconIDs = &battle_menu_moveOptionIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255);
} }
icon_set_tint(battle_menu_moveCursorIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveCursorIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveUpArrowIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveDownArrowIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveTitleIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255);
moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs; moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
} }
set_menu_icon_script(battle_menu_moveCursorIcon, &D_80104A28); set_hud_element_script(battle_menu_moveCursorIcon, &D_80104A28);
set_window_update(1, 5); set_window_update(1, 5);
if (!battle_menu_hasSpiritsMenu) { if (!battle_menu_hasSpiritsMenu) {
@ -245,21 +245,21 @@ void func_802A2AB8(void) {
moveOptionIconIDs = &battle_menu_moveOptionIconIDs; moveOptionIconIDs = &battle_menu_moveOptionIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionIconIDs[i], 255, 255, 255);
} }
icon_set_tint(battle_menu_moveCursorIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveCursorIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveUpArrowIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveUpArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveDownArrowIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveDownArrowIcon, 255, 255, 255);
icon_set_tint(battle_menu_moveTitleIcon, 255, 255, 255); set_hud_element_tint(battle_menu_moveTitleIcon, 255, 255, 255);
moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs; moveOptionCostUnitIconIDs = &battle_menu_moveOptionCostUnitIconIDs;
for (i = 0; i < battle_menu_moveOptionCount; i++) { for (i = 0; i < battle_menu_moveOptionCount; i++) {
icon_set_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255); set_hud_element_tint(moveOptionCostUnitIconIDs[i], 255, 255, 255);
} }
set_menu_icon_script(battle_menu_moveCursorIcon, &D_80104A28); set_hud_element_script(battle_menu_moveCursorIcon, &D_80104A28);
battle_menu_moveTextColor = 10; battle_menu_moveTextColor = 10;
D_802AD10F = 1; D_802AD10F = 1;
battle_menu_moveState = 20; battle_menu_moveState = 20;
@ -294,15 +294,15 @@ void func_802A43DC(s32 arg0, s32 arg1, s32 arg2) {
phi_a3 = battle_menu_moveTextOpacity; phi_a3 = battle_menu_moveTextOpacity;
phi_v0 = 0x31; phi_v0 = 0x31;
} }
draw_msg(phi_a0, phi_a1, phi_a2, phi_a3, phi_v0, 1); draw_string(phi_a0, phi_a1, phi_a2, phi_a3, phi_v0, 1);
} }
void func_802A4448(s32 arg0, s32 arg1, s32 arg2) { void func_802A4448(s32 arg0, s32 arg1, s32 arg2) {
s32 icon = battle_menu_moveTitleIcon; s32 icon = battle_menu_moveTitleIcon;
set_icon_render_pos(icon, arg1 + 0x10, arg2 + 0xF); set_hud_element_render_pos(icon, arg1 + 0x10, arg2 + 0xF);
icon_set_opacity(icon, battle_menu_moveTextOpacity); set_hud_element_alpha(icon, battle_menu_moveTextOpacity);
draw_icon_0(icon); draw_hud_element_clipped(icon);
} }
INCLUDE_ASM(s32, "415D90", func_802A4494); INCLUDE_ASM(s32, "415D90", func_802A4494);
@ -322,7 +322,7 @@ void func_802A4534(s32 arg0, s32 arg1, s32 arg2) {
} else { } else {
phi_s0 = 0x1D00A0; phi_s0 = 0x1D00A0;
} }
draw_msg(phi_s0, temp1, temp2 + D_802AB344[get_msg_lines(phi_s0) - 1], 255, 0xF, 0); draw_string(phi_s0, temp1, temp2 + D_802AB344[get_string_lines(phi_s0) - 1], 255, 0xF, 0);
} }
INCLUDE_ASM(s32, "415D90", func_802A45D8); INCLUDE_ASM(s32, "415D90", func_802A45D8);
@ -342,12 +342,12 @@ void func_802A472C(void) {
set_window_update(8, 2); set_window_update(8, 2);
for (i = 0; i < D_802AD66C; i++) { for (i = 0; i < D_802AD66C; i++) {
free_icon(temp[i]); free_hud_element(temp[i]);
} }
free_icon(D_802AD618); free_hud_element(D_802AD618);
free_icon(D_802AD61C); free_hud_element(D_802AD61C);
free_icon(D_802AD620); free_hud_element(D_802AD620);
} }
INCLUDE_ASM(s32, "415D90", func_802A47E0); INCLUDE_ASM(s32, "415D90", func_802A47E0);
@ -366,7 +366,7 @@ INCLUDE_ASM(s32, "415D90", func_802A4A54);
INCLUDE_ASM(s32, "415D90", func_802A5290); INCLUDE_ASM(s32, "415D90", func_802A5290);
void func_802A56F8(s32 arg0, s32 arg1, s32 arg2) { void func_802A56F8(s32 arg0, s32 arg1, s32 arg2) {
draw_msg(0x1D0043, arg1 + 0xF, arg2 + 2, D_802AD624, 0x33, 1); draw_string(0x1D0043, arg1 + 0xF, arg2 + 2, D_802AD624, 0x33, 1);
} }
#ifdef NON_MATCHING #ifdef NON_MATCHING
@ -380,7 +380,7 @@ void func_802A5738(s32 arg0, s32 arg1, s32 arg2) {
case 20: case 20:
case 30: case 30:
if (D_802AD60B != 0) { if (D_802AD60B != 0) {
draw_msg(D_802AD6C0[D_802AD605], arg1 + 8, arg2, D_802AD624, D_802AD614, 0); draw_string(D_802AD6C0[D_802AD605], arg1 + 8, arg2, D_802AD624, D_802AD614, 0);
} }
break; break;
} }
@ -391,7 +391,7 @@ INCLUDE_ASM(s32, "415D90", func_802A5738);
INCLUDE_ASM(s32, "415D90", func_802A57C8); INCLUDE_ASM(s32, "415D90", func_802A57C8);
s32 can_switch_to_player(void) { s32 can_btl_state_update_switch_to_player(void) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
@ -475,37 +475,37 @@ s32 func_802A58D0(void) {
return !ret; return !ret;
} }
INCLUDE_ASM(s32, "415D90", update_player_menu); INCLUDE_ASM(s32, "415D90", btl_state_update_player_menu);
INCLUDE_ASM(s32, "415D90", func_802A8180); INCLUDE_ASM(s32, "415D90", btl_state_draw_player_menu);
INCLUDE_ASM(s32, "415D90", update_partner_menu); INCLUDE_ASM(s32, "415D90", btl_state_update_partner_menu);
INCLUDE_ASM(s32, "415D90", func_802A9AE8); INCLUDE_ASM(s32, "415D90", btl_state_draw_partner_menu);
s32 func_802A9B30(void) { s32 func_802A9B30(void) {
return (gBattleStatus.flags2 & 4) <= 0; return (gBattleStatus.flags2 & 4) <= 0;
} }
INCLUDE_ASM(s32, "415D90", func_802A9B44); INCLUDE_ASM(s32, "415D90", btl_state_update_peach_menu);
INCLUDE_ASM(s32, "415D90", func_802AA05C); INCLUDE_ASM(s32, "415D90", btl_state_draw_peach_menu);
// void func_802AA05C(void) { // void btl_state_draw_peach_menu(void) {
// switch (gBattleStatus.battleState) { // switch (gBattleStatus.battleState) {
// case 1: // case 1:
// draw_battle_wheel(); // btl_draw_menu_wheel();
// break; // break;
// case 2: // case 2:
// draw_battle_wheel(); // btl_draw_menu_wheel();
// break; // break;
// case 3: // case 3:
// draw_battle_wheel(); // btl_draw_menu_wheel();
// break; // break;
// case 4: // case 4:
// draw_battle_wheel(); // btl_draw_menu_wheel();
// break; // break;
// case 5: // case 5:
// draw_battle_wheel(); // btl_draw_menu_wheel();
// break; // break;
// case 6: // case 6:
// case 7: // case 7:
@ -519,24 +519,24 @@ s32 func_802AA0A4(void) {
return (gBattleStatus.flags2 & 2) <= 0; return (gBattleStatus.flags2 & 2) <= 0;
} }
INCLUDE_ASM(s32, "415D90", func_802AA0B8); // look into m2c bug INCLUDE_ASM(s32, "415D90", btl_state_update_twink_menu); // look into m2c bug
void func_802AA640(void) { void btl_state_draw_twink_menu(void) {
switch (gBattleStatus.battleState) { switch (gBattleStatus.battleState) {
case 1: case 1:
draw_battle_wheel(); btl_draw_menu_wheel();
break; break;
case 2: case 2:
draw_battle_wheel(); btl_draw_menu_wheel();
break; break;
case 3: case 3:
draw_battle_wheel(); btl_draw_menu_wheel();
break; break;
case 4: case 4:
draw_battle_wheel(); btl_draw_menu_wheel();
break; break;
case 5: case 5:
draw_battle_wheel(); btl_draw_menu_wheel();
break; break;
case 6: case 6:
case 7: case 7:
@ -546,12 +546,12 @@ void func_802AA640(void) {
} }
} }
INCLUDE_ASM(s32, "415D90", update_targeting_enemies); INCLUDE_ASM(s32, "415D90", btl_state_update_select_target);
INCLUDE_ASM(s32, "415D90", func_802AACD8); INCLUDE_ASM(s32, "415D90", btl_state_draw_select_target);
void func_802AB330(void) { void btl_state_update_22(void) {
} }
void func_802AB338(void) { void btl_state_draw_22(void) {
} }

View File

@ -50,7 +50,7 @@ Gfx D_80074580[] = {
}; };
void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta); void sin_cos_rad(f32 rad, f32* outSinTheta, f32* outCosTheta);
void func_80029860(s32 romStart, s32 vramDest, s32 length); void dma_write_block(s32 romStart, s32 vramDest, s32 length);
#define ROM_CHUNK_SIZE 0x2000 #define ROM_CHUNK_SIZE 0x2000
@ -195,22 +195,22 @@ s32 dma_copy(Addr romStart, Addr romEnd, void* vramDest) {
return length; return length;
} }
s32 func_800297D4(s32 romStart, s32 romEnd, void* vramDest) { s32 dma_write(s32 romStart, s32 romEnd, void* vramDest) {
u32 length = romEnd - romStart; u32 length = romEnd - romStart;
s32 i; s32 i;
for (i = 0; i + ROM_CHUNK_SIZE < length; i += ROM_CHUNK_SIZE) { for (i = 0; i + ROM_CHUNK_SIZE < length; i += ROM_CHUNK_SIZE) {
func_80029860(romStart + i, vramDest + i, ROM_CHUNK_SIZE); dma_write_block(romStart + i, vramDest + i, ROM_CHUNK_SIZE);
} }
if (i != length) { if (i != length) {
func_80029860(romStart + i, vramDest + i, length - i); dma_write_block(romStart + i, vramDest + i, length - i);
} }
return length; return length;
} }
void func_80029860(s32 dramAddr, s32 devAddr, s32 size) { void dma_write_block(s32 dramAddr, s32 devAddr, s32 size) {
OSIoMesg osIoMesg; OSIoMesg osIoMesg;
OSMesg osMesg; OSMesg osMesg;
OSMesgQueue osMesgQueue; OSMesgQueue osMesgQueue;
@ -228,7 +228,7 @@ void func_80029860(s32 dramAddr, s32 devAddr, s32 size) {
osRecvMesg(&osMesgQueue, &osMesg, 1); osRecvMesg(&osMesgQueue, &osMesg, 1);
} }
s32 _advance_rng(void) { s32 advance_rng(void) {
gRandSeed *= 0x5D588B65; gRandSeed *= 0x5D588B65;
gRandSeed++; gRandSeed++;
@ -237,8 +237,8 @@ s32 _advance_rng(void) {
return gRandSeed; return gRandSeed;
} }
f32 func_80029934(void) { f32 rand_float(void) {
s32 temp_v0 = _advance_rng() & 0x7FFF; s32 temp_v0 = advance_rng() & 0x7FFF;
f64 temp_f2 = temp_v0; f64 temp_f2 = temp_v0;
if (temp_v0 < 0) { if (temp_v0 < 0) {
@ -259,7 +259,7 @@ s32 func_80029994(s32 arg0) {
} }
do { do {
result = _advance_rng() / div; result = advance_rng() / div;
} while (result >= plusOne); } while (result >= plusOne);
return result; return result;
@ -515,7 +515,7 @@ f32 update_lerp(s32 easing, f32 start, f32 end, s32 elapsed, s32 duration) {
return 0.0f; return 0.0f;
} }
void func_8002A904(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) { void appendGfx_startup_prim_rect(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bottom) {
gDPPipeSync(gMasterGfxPos++); gDPPipeSync(gMasterGfxPos++);
gSPDisplayList(gMasterGfxPos++, D_80074580); gSPDisplayList(gMasterGfxPos++, D_80074580);
@ -536,7 +536,7 @@ void func_8002A904(u8 r, u8 g, u8 b, u8 a, u16 left, u16 top, u16 right, u16 bot
} }
void func_8002AAC4(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a) { void startup_draw_prim_rect_COPY(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a) {
u16 temp; u16 temp;
if (right < left) { if (right < left) {
@ -551,10 +551,10 @@ void func_8002AAC4(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b
top = temp; top = temp;
} }
func_8002A904(r, g, b, a, left, top, right, bottom); appendGfx_startup_prim_rect(r, g, b, a, left, top, right, bottom);
} }
void func_8002AB5C(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a) { void startup_draw_prim_rect(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b, u16 a) {
u16 temp; u16 temp;
if (right < left) { if (right < left) {
@ -569,5 +569,5 @@ void func_8002AB5C(s16 left, s16 top, s16 right, s16 bottom, u16 r, u16 g, u16 b
top = temp; top = temp;
} }
func_8002A904(r, g, b, a, left, top, right, bottom); appendGfx_startup_prim_rect(r, g, b, a, left, top, right, bottom);
} }

View File

@ -4,10 +4,10 @@
extern s32 D_800DC060; extern s32 D_800DC060;
extern Stage* D_800DC064; extern Stage* D_800DC064;
INCLUDE_ASM(s32, "4DF30", func_80072B30); INCLUDE_ASM(s32, "4DF30", reset_battle_status);
void func_80072BB0(void) { void ALT_reset_battle_status(void) {
func_80072B30(); reset_battle_status();
} }
void func_80072BCC(s32 arg0) { void func_80072BCC(s32 arg0) {
@ -31,7 +31,7 @@ void load_battle_section(void) {
D_800DC064 = &(*battleArea->stages)[gBattleStatus.unk_47C]; D_800DC064 = &(*battleArea->stages)[gBattleStatus.unk_47C];
} }
func_80241190(1); btl_set_state(1);
gBattleStatus.unk_460 = 0; gBattleStatus.unk_460 = 0;
} }
#else #else
@ -44,7 +44,7 @@ void set_battle_stage(s32 arg0) {
gBattleStatus.unk_47C = arg0; gBattleStatus.unk_47C = arg0;
} }
void func_80072CDC(s32 arg0) { void set_battle_formation(s32 arg0) {
gBattleStatus.unk_484 = arg0; gBattleStatus.unk_484 = arg0;
} }

View File

@ -2,279 +2,279 @@
extern EffectTableEntry gEffectTable[135]; extern EffectTableEntry gEffectTable[135];
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006F890); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_00);
INCLUDE_ASM(void, "4ac90_len_3910", func_8006F8F0, f32 arg0, f32 arg1, f32 arg2); INCLUDE_ASM(void, "4ac90_len_3910", playFX_01, f32 arg0, f32 arg1, f32 arg2);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006F950); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_02);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006F9B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_03);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FA10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_04);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FA70); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_05);
INCLUDE_ASM(void, "4ac90_len_3910", fx_walk_large, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4); INCLUDE_ASM(void, "4ac90_len_3910", fx_land, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
INCLUDE_ASM(void, "4ac90_len_3910", fx_walk_normal, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", fx_walk, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
INCLUDE_ASM(void, "4ac90_len_3910", func_8006FB90, f32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_08, f32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "4ac90_len_3910", func_8006FBF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_09, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FC50); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_0A);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FCB0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_0B);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FD10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_0C);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FD70); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_0D);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FDD0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_0E);
INCLUDE_ASM(void, "4ac90_len_3910", func_8006FE30, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, INCLUDE_ASM(void, "4ac90_len_3910", playFX_0F, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
f32 arg6, f32 arg7); f32 arg6, f32 arg7);
INCLUDE_ASM(void, "4ac90_len_3910", fx_emote, s32 arg0, Npc* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, INCLUDE_ASM(void, "4ac90_len_3910", fx_emote, s32 arg0, Npc* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
f32 arg6, s32 arg7, s32* arg8); f32 arg6, s32 arg7, s32* arg8);
INCLUDE_ASM(void, "4ac90_len_3910", func_8006FEF0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4); INCLUDE_ASM(void, "4ac90_len_3910", playFX_11, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FF50); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_12);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_8006FFB0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_13);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070010); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_14);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070070); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_15);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800700D0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_16);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070130, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_17, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070190, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5, INCLUDE_ASM(void, "4ac90_len_3910", playFX_18, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, f32 arg5,
s32 arg6, s32 arg7); s32 arg6, s32 arg7);
INCLUDE_ASM(void, "4ac90_len_3910", func_800701F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_19, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070250); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_1A);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800702B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_1B);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070310); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_1C);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070370, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5, s32 arg6, s32 arg7); INCLUDE_ASM(void, "4ac90_len_3910", playFX_1D, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5, s32 arg6, s32 arg7);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800703D0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_1E);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070430); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_1F);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070490); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_20);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800704F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_21);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070550, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, INCLUDE_ASM(void, "4ac90_len_3910", playFX_22, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5,
s32 arg6, s32 arg7); s32 arg6, s32 arg7);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800705B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_23);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070610); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_24);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070670); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_25);
INCLUDE_ASM(void, "4ac90_len_3910", func_800706D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_26, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070730); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_27);
INCLUDE_ASM(void, "4ac90_len_3910", fx_sweat, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, s32 arg6); INCLUDE_ASM(void, "4ac90_len_3910", fx_sweat, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, s32 arg6);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", fx_sleep_bubble); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", fx_sleep_bubble);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070850); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_2A);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800708B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_2B);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070910); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_2C);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070970, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_2D, s32 arg0, f32 arg1, f32 arg2, f32 arg3, s32 arg4, s32 arg5);
INCLUDE_ASM(void, "4ac90_len_3910", func_800709D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_2E, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070A30, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5, EffectInstanceData** arg6); INCLUDE_ASM(void, "4ac90_len_3910", playFX_2F, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5, EffectInstanceData** arg6);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070A90, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_30, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070AF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_31, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070B50, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4); INCLUDE_ASM(void, "4ac90_len_3910", playFX_32, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070BB0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_33, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070C10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_34);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070C70); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_35);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070CD0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_36, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070D30); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_37);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070D90); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_38);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070DF0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_39);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070E50); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_3A);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070EB0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstanceData** arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_3B, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, EffectInstanceData** arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070F10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_3C);
INCLUDE_ASM(void, "4ac90_len_3910", func_80070F70, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6, INCLUDE_ASM(void, "4ac90_len_3910", playFX_3D, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5, f32 arg6,
s32 arg7, s32* arg8); s32 arg7, s32* arg8);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80070FD0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_3E);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071030, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_3F, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
INCLUDE_ASM(void, "4ac90_len_3910", func_80071090, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4); INCLUDE_ASM(void, "4ac90_len_3910", playFX_40, s32 a0, f32 a1, f32 a2, f32 a3, s32 a4);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800710F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_41);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071150); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_42);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800711B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_43);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071210); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_44);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071270); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_45);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800712D0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_46_whirlwind);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071330); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_47);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071390); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_48);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800713F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_49);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071450); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_4A);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800714B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_4B);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071510); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_4C);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071570); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_4D);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800715D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_4E, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071630); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_4F);
INCLUDE_ASM(void, "4ac90_len_3910", func_80071690, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(void, "4ac90_len_3910", playFX_50, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800716F0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_51, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071750, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_52, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800717B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_53);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071810, s32 arg0, f32 arg1, f32 arg2, f32 arg3); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_54, s32 arg0, f32 arg1, f32 arg2, f32 arg3);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071870); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_55);
INCLUDE_ASM(void, "4ac90_len_3910", func_800718D0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_56, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071930); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_57);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071990); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_58);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800719F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_59);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071A50); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_5A);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071AB0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_5B);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071B10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_5C);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071B70); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_5D);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071BD0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_5E);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071C30); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_5F);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071C90); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_60);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071CF0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_61);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071D50); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_62);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071DB0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_63);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071E10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_64);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071E70); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_65);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071ED0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_66);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071F30); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_67);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80071F90); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_68);
INCLUDE_ASM(void, "4ac90_len_3910", func_80071FF0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(void, "4ac90_len_3910", playFX_69, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072050); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_6A);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800720B0, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_6B, s32 a0, f32 a1, f32 a2, f32 a3, f32 a4, s32 a5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072110); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_6C);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072170); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_6D);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800721D0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_6E);
INCLUDE_ASM(UNK_TYPE, "4ac90_len_3910", func_80072230, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, INCLUDE_ASM(UNK_TYPE, "4ac90_len_3910", playFX_6F, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
s32 arg5); s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072290); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_70);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800722F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_71);
INCLUDE_ASM(UNK_TYPE, "4ac90_len_3910", func_80072350, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, INCLUDE_ASM(UNK_TYPE, "4ac90_len_3910", playFX_72, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4,
f32 arg5, f32 arg6, s32 arg7, s32 arg8); f32 arg5, f32 arg6, s32 arg7, s32 arg8);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800723B0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_73);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072410); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_74);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072470); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_75);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800724D0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_76);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072530); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_77);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072590); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_78);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800725F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_79);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072650); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_7A);
INCLUDE_ASM(void*, "4ac90_len_3910", func_800726B0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(void*, "4ac90_len_3910", playFX_7B, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072710); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_7C);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072770); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_7D);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800727D0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_7E);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072830); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_7F);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072890, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_80, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_800728F0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_81);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072950, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_82, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 time);
INCLUDE_ASM(void*, "4ac90_len_3910", func_800729B0, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5); INCLUDE_ASM(void*, "4ac90_len_3910", playFX_83, s32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, s32 arg5);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072A10); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_84);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072A70); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_85);
INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", func_80072AD0); INCLUDE_ASM(EffectInstance*, "4ac90_len_3910", playFX_86);

View File

@ -2,36 +2,36 @@
PlayerStatus* gPlayerStatusPtr = &gPlayerStatus; // maybe wPlayerStatus PlayerStatus* gPlayerStatusPtr = &gPlayerStatus; // maybe wPlayerStatus
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DC500); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_down);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DC778); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_down_ahead);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DCB7C, s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_down_sides, s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32* arg4);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DCE70); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_up);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DD04C); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_up_corner);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DD228); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_up_corners);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DD44C); INCLUDE_ASM(s32, "759b0_len_61b0", npc_raycast_general);
void func_800DD5B4(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { void npc_get_slip_vector(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
f32 temp = (arg2 * arg4) + (arg3 * arg5); f32 temp = (arg2 * arg4) + (arg3 * arg5);
*arg0 = (arg2 - (temp * arg4)) * 0.5f; *arg0 = (arg2 - (temp * arg4)) * 0.5f;
*arg1 = (arg3 - (temp * arg5)) * 0.5f; *arg1 = (arg3 - (temp * arg5)) * 0.5f;
} }
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DD618); INCLUDE_ASM(s32, "759b0_len_61b0", npc_test_move_with_slipping);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DD8FC); INCLUDE_ASM(s32, "759b0_len_61b0", npc_test_move_without_slipping);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DDAE4); INCLUDE_ASM(s32, "759b0_len_61b0", npc_test_move_taller_with_slipping);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DDC44, s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32 arg4, f32 arg5, INCLUDE_ASM(s32, "759b0_len_61b0", npc_test_move_simple_with_slipping, s32 arg0, f32* arg1, f32* arg2, f32* arg3, f32 arg4, f32 arg5,
f32 arg6, f32 arg7); f32 arg6, f32 arg7);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DDCEC); INCLUDE_ASM(s32, "759b0_len_61b0", npc_test_move_simple_without_slipping);
INCLUDE_ASM(s32, "759b0_len_61b0", func_800DDD94); INCLUDE_ASM(s32, "759b0_len_61b0", npc_test_move_complex_with_slipping);

View File

@ -13,32 +13,32 @@ void func_802B72C0_E22870();
void func_800E0514(void); void func_800E0514(void);
INCLUDE_ASM(s32, "77480", test_below_player); INCLUDE_ASM(s32, "77480", player_raycast_below);
INCLUDE_ASM(s32, "77480", func_800DE46C); INCLUDE_ASM(s32, "77480", player_raycast_below_cam_relative);
INCLUDE_ASM(s32, "77480", trace_below_player); INCLUDE_ASM(s32, "77480", player_raycast_down);
INCLUDE_ASM(s32, "77480", collision_check_above); INCLUDE_ASM(s32, "77480", player_raycast_up_corners);
INCLUDE_ASM(s32, "77480", trace_above_player); INCLUDE_ASM(s32, "77480", player_raycast_up_corner);
INCLUDE_ASM(s32, "77480", do_lateral_collision, s32 arg0, PlayerStatus* arg1, f32* arg2, f32* arg3, f32* arg4, INCLUDE_ASM(s32, "77480", player_test_lateral_overlap, s32 arg0, PlayerStatus* arg1, f32* arg2, f32* arg3, f32* arg4,
f32 arg5, f32 arg6); f32 arg5, f32 arg6);
INCLUDE_ASM(s32, "77480", func_800DEE5C); INCLUDE_ASM(s32, "77480", player_raycast_general);
INCLUDE_ASM(s32, "77480", func_800DF15C, PlayerStatus* arg0, f32* arg1, f32* arg2, f32* arg3, s32 arg4, f32 arg5, INCLUDE_ASM(s32, "77480", player_test_move_without_slipping, PlayerStatus* arg0, f32* arg1, f32* arg2, f32* arg3, s32 arg4, f32 arg5,
s32* arg6); s32* arg6);
void func_800DF3FC(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) { void player_get_slip_vector(f32* arg0, f32* arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5) {
f32 temp = (arg2 * arg4) + (arg3 * arg5); f32 temp = (arg2 * arg4) + (arg3 * arg5);
*arg0 = (arg2 - (temp * arg4)) * 0.5f; *arg0 = (arg2 - (temp * arg4)) * 0.5f;
*arg1 = (arg3 - (temp * arg5)) * 0.5f; *arg1 = (arg3 - (temp * arg5)) * 0.5f;
} }
INCLUDE_ASM(s32, "77480", test_player_lateral); INCLUDE_ASM(s32, "77480", player_test_move_with_slipping);
void update_player(void) { void update_player(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -76,17 +76,17 @@ void update_player(void) {
update_player_input(); update_player_input();
playerStatus->flags &= ~0x400; playerStatus->flags &= ~0x400;
func_800DFFCC(); update_player_blink();
if (playerStatus->flags & 0x1000) { if (playerStatus->flags & 0x1000) {
func_800E5A2C(); phys_update_action_state();
if (func_800E0208() == 0) { if (func_800E0208() == 0) {
collision_main_lateral(); collision_main_lateral();
} }
} else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) { } else if (playerStatus->actionState != ACTION_STATE_HIT_LAVA) {
func_800DFAAC(); phys_update_standard();
} else { } else {
func_800DFBE8(); phys_update_lava_reset();
} }
if (playerStatus->flags & 0x4000) { if (playerStatus->flags & 0x4000) {
@ -116,7 +116,7 @@ void update_player(void) {
update_player_shadow(); update_player_shadow();
check_for_interactables(); check_for_interactables();
check_for_conversation(); check_for_conversation_prompt();
check_for_pulse_stone(); check_for_pulse_stone();
check_for_ispy(); check_for_ispy();
@ -147,22 +147,22 @@ void check_input_use_partner(void) {
} }
} }
void func_800DFAAC(void) { void phys_update_standard(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32 flags; s32 flags;
check_input_use_partner(); check_input_use_partner();
func_800E5A2C(); phys_update_action_state();
if (!(playerStatus->flags & 8)) { if (!(playerStatus->flags & 8)) {
if (playerStatus->flags & 2) { if (playerStatus->flags & 2) {
update_fall_state(); phys_update_jump();
} }
} }
if (playerStatus->flags & 4) { if (playerStatus->flags & 4) {
if (!(playerStatus->flags & 8)) { if (!(playerStatus->flags & 8)) {
func_800E3100(); phys_update_falling();
} }
} }
@ -170,7 +170,7 @@ void func_800DFAAC(void) {
if (playerStatus->actionState != ACTION_STATE_SLIDE) { if (playerStatus->actionState != ACTION_STATE_SLIDE) {
collision_main_lateral(); collision_main_lateral();
func_800E4508(); collision_check_player_overlaps();
if ( if (
collision_main_above() < 0 && collision_main_above() < 0 &&
@ -182,7 +182,7 @@ void func_800DFAAC(void) {
if ((playerStatus->actionState != ACTION_STATE_ENEMY_FIRST_STRIKE) if ((playerStatus->actionState != ACTION_STATE_ENEMY_FIRST_STRIKE)
&& (playerStatus->actionState != ACTION_STATE_STEP_UP)) { && (playerStatus->actionState != ACTION_STATE_STEP_UP)) {
func_800E4744(); phys_main_collision_below();
} }
} }
@ -197,10 +197,10 @@ void func_800DFAAC(void) {
} }
} }
void func_800DFBE8(void) { void phys_update_lava_reset(void) {
func_800E5A2C(); phys_update_action_state();
collision_main_lateral(); collision_main_lateral();
func_800E4BB8(); collision_lava_reset_check_additional_overlaps();
if (!(gPlayerStatusPtr->flags & 0x4000000)) { if (!(gPlayerStatusPtr->flags & 0x4000000)) {
Camera* camera = &gCameras[0]; Camera* camera = &gCameras[0];
@ -215,12 +215,12 @@ void clear_player_status(void) {
mem_clear(&gPlayerStatus, sizeof(gPlayerStatus)); mem_clear(&gPlayerStatus, sizeof(gPlayerStatus));
} }
void func_800DFC74(void) { void player_reset_data(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
mem_clear(playerStatus, sizeof(PlayerStatus)); mem_clear(playerStatus, sizeof(PlayerStatus));
playerStatus->flags = 1; playerStatus->flags = 1;
func_800E205C(); reset_player_status();
playerStatus->shadowID = create_shadow_type(0, playerStatus->position.x, playerStatus->position.y, playerStatus->shadowID = create_shadow_type(0, playerStatus->position.x, playerStatus->position.y,
playerStatus->position.z); playerStatus->position.z);
func_800E6B68(); func_800E6B68();
@ -240,11 +240,11 @@ s32 func_800DFCF4(void) {
return 1; return 1;
} }
INCLUDE_ASM(s32, "77480", func_800DFD48); INCLUDE_ASM(s32, "77480", get_overriding_player_anim);
void func_800DFEFC(s32 arg0) { void suggest_player_anim_clearUnkFlag(s32 arg0) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32 temp_v0 = func_800DFD48(arg0); s32 temp_v0 = get_overriding_player_anim(arg0);
if (temp_v0 != -1) { if (temp_v0 != -1) {
playerStatus->anim = temp_v0; playerStatus->anim = temp_v0;
@ -253,7 +253,7 @@ void func_800DFEFC(s32 arg0) {
} }
} }
void func_800DFF50(s32 arg0) { void force_player_anim(s32 arg0) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->anim = arg0; playerStatus->anim = arg0;
@ -261,9 +261,9 @@ void func_800DFF50(s32 arg0) {
playerStatus->flags &= ~0x10000000; playerStatus->flags &= ~0x10000000;
} }
void func_800DFF78(s32 arg0) { void suggest_player_anim_setUnkFlag(s32 arg0) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32 temp_v0 = func_800DFD48(arg0); s32 temp_v0 = get_overriding_player_anim(arg0);
if (temp_v0 != -1) { if (temp_v0 != -1) {
playerStatus->anim = temp_v0; playerStatus->anim = temp_v0;
@ -272,10 +272,10 @@ void func_800DFF78(s32 arg0) {
} }
} }
INCLUDE_ASM(s32, "77480", func_800DFFCC); INCLUDE_ASM(s32, "77480", update_player_blink);
// dist_to_player2D // dist_to_player2D
f32 func_800E0088(f32 x, f32 z) { f32 get_xz_dist_to_player(f32 x, f32 z) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
return dist2D(x, z, playerStatus->position.x, playerStatus->position.z); return dist2D(x, z, playerStatus->position.x, playerStatus->position.z);
@ -345,7 +345,7 @@ s32 func_800E0208(void) {
return ret; return ret;
} }
void func_800E0260(void) { void player_render_interact_prompts(void) {
func_800E0658(); func_800E0658();
func_800E0AD0(); func_800E0AD0();
func_800E04D0(); func_800E04D0();
@ -404,7 +404,7 @@ void func_800E0514(void) {
gPlayerStatusPtr->animFlags &= ~0x40; gPlayerStatusPtr->animFlags &= ~0x40;
} }
s32 func_800E0538(void) { s32 has_valid_conversation_npc(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32* unk_C8 = playerStatus->unk_C8; s32* unk_C8 = playerStatus->unk_C8;
s32 ret = 0; s32 ret = 0;
@ -417,7 +417,7 @@ s32 func_800E0538(void) {
return ret; return ret;
} }
INCLUDE_ASM(s32, "77480", check_for_conversation); INCLUDE_ASM(s32, "77480", check_for_conversation_prompt);
void func_800E0658(void) { void func_800E0658(void) {
if ((gPlayerStatusPtr->animFlags & 0x20) && (D_8010C940 != 0)) { if ((gPlayerStatusPtr->animFlags & 0x20) && (D_8010C940 != 0)) {

View File

@ -37,7 +37,7 @@ void update_player_input(void) {
} }
#ifdef NON_MATCHING #ifdef NON_MATCHING
void func_800E205C(void) { void reset_player_status(void) {
s32* temp8010C92C = &D_8010C92C; s32* temp8010C92C = &D_8010C92C;
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
MapConfig* mapConfig; MapConfig* mapConfig;
@ -119,20 +119,20 @@ void func_800E205C(void) {
gCameras->targetPos.y = playerStatus->position.y; gCameras->targetPos.y = playerStatus->position.y;
gCameras->targetPos.z = playerStatus->position.z; gCameras->targetPos.z = playerStatus->position.z;
func_800E59A0(mapConfig); phys_reset_spin_history(mapConfig);
mem_clear(&D_8010F250, sizeof(Temp8010F250)); mem_clear(&D_8010F250, sizeof(Temp8010F250));
} }
#else #else
INCLUDE_ASM(s32, "7B440", func_800E205C); INCLUDE_ASM(s32, "7B440", reset_player_status);
#endif #endif
void func_800E22E4(s32* arg0) { void get_packed_buttons(s32* arg0) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
*arg0 = (u16)playerStatus->currentButtons | (playerStatus->pressedButtons << 16); *arg0 = (u16)playerStatus->currentButtons | (playerStatus->pressedButtons << 16);
} }
void input_to_move_vector(f32* angle, f32* magnitude) { void player_input_to_move_vector(f32* angle, f32* magnitude) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32 stickAxisX; f32 stickAxisX;
f32 stickAxisY; f32 stickAxisY;
@ -157,7 +157,7 @@ void input_to_move_vector(f32* angle, f32* magnitude) {
*magnitude = mag; *magnitude = mag;
} }
void func_800E23FC(f32* arg0, f32* arg1) { void game_input_to_move_vector(f32* arg0, f32* arg1) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32 stickX = gGameStatusPtr->stickX; f32 stickX = gGameStatusPtr->stickX;
f32 stickY = -gGameStatusPtr->stickY; f32 stickY = -gGameStatusPtr->stickY;

View File

@ -4,11 +4,11 @@
extern s32 D_8010C96C; // npc list index extern s32 D_8010C96C; // npc list index
extern s16 D_8010C9B0; extern s16 D_8010C9B0;
void func_800E26B0(void) { void record_jump_apex(void) {
gPlayerStatus.jumpApexHeight = gPlayerStatus.position.y; gPlayerStatus.jumpApexHeight = gPlayerStatus.position.y;
} }
s32 func_800E26C4(void) { s32 can_trigger_loading_zone(void) {
PlayerData* playerData = &gPlayerData; PlayerData* playerData = &gPlayerData;
s32 actionState = gPlayerStatusPtr->actionState; s32 actionState = gPlayerStatusPtr->actionState;
Temp8010EBB0* temp_8010EBB0 = &D_8010EBB0; Temp8010EBB0* temp_8010EBB0 = &D_8010EBB0;
@ -62,12 +62,12 @@ INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E29C8);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E2BB0); INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E2BB0);
INCLUDE_ASM(s32, "7bb60_len_41b0", update_fall_state); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_update_jump);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E2F60); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_init_integrator_for_current_state);
#ifdef NON_MATCHING #ifdef NON_MATCHING
// void gravity_use_fall_params(void) { // void gravity_use_fall_parms(void) {
// f32* floats = D_800F7B60; // f32* floats = D_800F7B60;
// do { } while (0); // do { } while (0);
// if (gPlayerStatus.flags & 0x40000) { // if (gPlayerStatus.flags & 0x40000) {
@ -82,7 +82,7 @@ INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E2F60);
// gPlayerStatus.gravityIntegrator[3] = *floats++; // gPlayerStatus.gravityIntegrator[3] = *floats++;
// } // }
// } // }
void gravity_use_fall_params(void) { void gravity_use_fall_parms(void) {
PlayerStatus* playerStatus; PlayerStatus* playerStatus;
f32* floats = D_800F7B60; f32* floats = D_800F7B60;
do {} while (0); do {} while (0);
@ -100,14 +100,14 @@ void gravity_use_fall_params(void) {
} }
} }
#else #else
INCLUDE_ASM(s32, "7bb60_len_41b0", gravity_use_fall_params); INCLUDE_ASM(s32, "7bb60_len_41b0", gravity_use_fall_parms);
#endif #endif
void func_800E3100(void) { void phys_update_falling(void) {
if (gPlayerStatus.actionState != ACTION_STATE_LAND_ON_SWITCH && gPlayerStatus.actionState != ACTION_STATE_BOUNCE) { if (gPlayerStatus.actionState != ACTION_STATE_LAND_ON_SWITCH && gPlayerStatus.actionState != ACTION_STATE_BOUNCE) {
s32* colliderID; s32* colliderID;
gPlayerStatus.position.y = func_800E3514(func_800E34D8(), &colliderID); gPlayerStatus.position.y = player_check_collision_below(func_800E34D8(), &colliderID);
func_800E315C(colliderID); func_800E315C(colliderID);
} }
@ -141,7 +141,7 @@ f32 func_800E34D8(void) {
return ret; return ret;
} }
INCLUDE_ASM(f32, "7bb60_len_41b0", func_800E3514, f32 arg0, s32* colliderID); INCLUDE_ASM(f32, "7bb60_len_41b0", player_check_collision_below, f32 arg0, s32* colliderID);
INCLUDE_ASM(s32, "7bb60_len_41b0", collision_main_lateral); INCLUDE_ASM(s32, "7bb60_len_41b0", collision_main_lateral);
@ -156,7 +156,7 @@ s32 collision_check_player_intersecting_world(s32 arg0, s32 arg1, f32 arg2) {
f32 x = gPlayerStatusPtr->position.x; f32 x = gPlayerStatusPtr->position.x;
f32 y = gPlayerStatusPtr->position.y + arg1; f32 y = gPlayerStatusPtr->position.y + arg1;
f32 z = gPlayerStatusPtr->position.z; f32 z = gPlayerStatusPtr->position.z;
s32 hitID = do_lateral_collision(arg0, gPlayerStatusPtr, &x, &y, &z, 0, angle); s32 hitID = player_test_lateral_overlap(arg0, gPlayerStatusPtr, &x, &y, &z, 0, angle);
if (hitID >= 0) { if (hitID >= 0) {
ret = hitID; ret = hitID;
@ -182,7 +182,7 @@ s32 func_800E4404(s32 arg0, s32 arg1, f32 arg2, f32* outX, f32* outY, f32* outZ)
f32 x = *outX; f32 x = *outX;
f32 y = *outY + arg1; f32 y = *outY + arg1;
f32 z = *outZ; f32 z = *outZ;
s32 hitID = do_lateral_collision(arg0, gPlayerStatusPtr, &x, &y, &z, 0, angle); s32 hitID = player_test_lateral_overlap(arg0, gPlayerStatusPtr, &x, &y, &z, 0, angle);
if (hitID >= 0) { if (hitID >= 0) {
ret = hitID; ret = hitID;
@ -196,7 +196,7 @@ s32 func_800E4404(s32 arg0, s32 arg1, f32 arg2, f32* outX, f32* outY, f32* outZ)
return ret; return ret;
} }
void func_800E4508(void) { void collision_check_player_overlaps(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
f32 temp_64 = playerStatus->unk_64; f32 temp_64 = playerStatus->unk_64;
@ -205,7 +205,7 @@ void func_800E4508(void) {
f32 y = playerStatus->position.y; f32 y = playerStatus->position.y;
f32 z = playerStatus->position.z; f32 z = playerStatus->position.z;
do_lateral_collision(0, &gPlayerStatus, &x, &y, &z, temp_64, playerStatus->unk_88); player_test_lateral_overlap(0, &gPlayerStatus, &x, &y, &z, temp_64, playerStatus->unk_88);
temp_64 -= playerStatus->runSpeed / 10.0f; temp_64 -= playerStatus->runSpeed / 10.0f;
playerStatus->position.x = x; playerStatus->position.x = x;
@ -220,11 +220,11 @@ void func_800E4508(void) {
} }
} }
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E45E0); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_should_player_be_sliding);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E46C8); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_is_on_sloped_ground);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E4744); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_main_collision_below);
void func_800E4AD8(s32 arg0) { void func_800E4AD8(s32 arg0) {
Camera* currentCamera = &gCameras[gCurrentCameraID]; Camera* currentCamera = &gCameras[gCurrentCameraID];
@ -238,7 +238,7 @@ void func_800E4B40(s32 arg0, f32* arg1, f32* arg2, f32* arg3) {
func_800E4404(arg0, 0, gPlayerStatus.spriteFacingAngle - 90.0f + currentCamera->currentYaw, arg1, arg2, arg3); func_800E4404(arg0, 0, gPlayerStatus.spriteFacingAngle - 90.0f + currentCamera->currentYaw, arg1, arg2, arg3);
} }
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E4BB8); INCLUDE_ASM(s32, "7bb60_len_41b0", collision_lava_reset_check_additional_overlaps);
void func_800E4F10(void) { void func_800E4F10(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -247,7 +247,7 @@ void func_800E4F10(void) {
f32 x = playerStatus->position.x; f32 x = playerStatus->position.x;
f32 y = playerStatus->position.y; f32 y = playerStatus->position.y;
f32 z = playerStatus->position.z; f32 z = playerStatus->position.z;
s32 temp = func_800DF15C(&gPlayerStatus, &x, &y, &z, 0, yaw, &tempB); s32 temp = player_test_move_without_slipping(&gPlayerStatus, &x, &y, &z, 0, yaw, &tempB);
playerStatus->position.x = x; playerStatus->position.x = x;
playerStatus->position.z = z; playerStatus->position.z = z;
@ -283,7 +283,7 @@ PartnerID get_current_partner_id(void) {
return gPlayerData.currentPartner; return gPlayerData.currentPartner;
} }
void func_800E5098(s32 arg0) { void try_player_footstep_sounds(s32 arg0) {
if ((gGameStatusPtr->frameCounter % arg0) == 0) { if ((gGameStatusPtr->frameCounter % arg0) == 0) {
u8 colliderType = get_collider_type_by_id(gCollisionStatus.currentFloor); u8 colliderType = get_collider_type_by_id(gCollisionStatus.currentFloor);
s32 soundID; s32 soundID;
@ -306,17 +306,17 @@ void func_800E5098(s32 arg0) {
} }
} }
void func_800E5150(void) { void phys_update_interact_collider(void) {
gCollisionStatus.unk_0A = func_800E5174(); gCollisionStatus.unk_0A = phys_check_interactable_collision();
} }
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E5174); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_check_interactable_collision);
INCLUDE_ASM(s32, "7bb60_len_41b0", can_player_interact); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_can_player_interact);
INCLUDE_ASM(f32, "7bb60_len_41b0", func_800E5348, void); INCLUDE_ASM(f32, "7bb60_len_41b0", func_800E5348, void);
void func_800E546C(void) { void player_get_camera_facing_angle(void) {
f32 angle = 0.0f; f32 angle = 0.0f;
if (gPlayerStatus.spriteFacingAngle >= 90.0f && gPlayerStatus.spriteFacingAngle < 270.0f) { if (gPlayerStatus.spriteFacingAngle >= 90.0f && gPlayerStatus.spriteFacingAngle < 270.0f) {
@ -328,7 +328,7 @@ void func_800E546C(void) {
clamp_angle(angle); clamp_angle(angle);
} }
void save_ground_pos(void) { void phys_save_ground_pos(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
playerStatus->lastGoodPosition.x = playerStatus->position.x; playerStatus->lastGoodPosition.x = playerStatus->position.x;
@ -340,17 +340,17 @@ void func_800E5520(void) {
D_8010C9B0 = 0; D_8010C9B0 = 0;
} }
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E5530); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_adjust_cam_on_landing);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E58F0); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_clear_spin_history);
INCLUDE_ASM(f32, "7bb60_len_41b0", func_800E5938, s32 lag, s32* x, s32* y, s32* z); INCLUDE_ASM(f32, "7bb60_len_41b0", phys_get_spin_history, s32 lag, s32* x, s32* y, s32* z);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E59A0); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_reset_spin_history);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E5A2C); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_update_action_state);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E5C78); INCLUDE_ASM(s32, "7bb60_len_41b0", phys_peach_update);
void set_action_state(s32 actionState) { void set_action_state(s32 actionState) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
@ -531,7 +531,7 @@ void check_input_spin(void) {
} }
} }
void func_800E636C(s32 arg0) { void peach_set_disguise_anim(s32 arg0) {
s32 listIndex = D_8010C96C; s32 listIndex = D_8010C96C;
if (listIndex >= 0) { if (listIndex >= 0) {
@ -548,14 +548,14 @@ void func_800E63A4(s32 arg0) {
playerStatus->animFlags &= ~PLAYER_ANIM_FLAG_IN_DISGUISE; playerStatus->animFlags &= ~PLAYER_ANIM_FLAG_IN_DISGUISE;
gGameStatusPtr->peachFlags &= ~0x2; gGameStatusPtr->peachFlags &= ~0x2;
playerStatus->peachDisguise = 0; playerStatus->peachDisguise = 0;
npc_free_by_index(D_8010C96C); free_npc_by_index(D_8010C96C);
set_action_state(ACTION_STATE_IDLE); set_action_state(ACTION_STATE_IDLE);
playerStatus->colliderHeight = 55; playerStatus->colliderHeight = 55;
playerStatus->colliderDiameter = 38; playerStatus->colliderDiameter = 38;
} }
} }
void func_800E6428(void) { void peach_check_for_parasol_input(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
s32 actionState = playerStatus->actionState; s32 actionState = playerStatus->actionState;
Npc* disguiseNpc; Npc* disguiseNpc;
@ -568,7 +568,7 @@ void func_800E6428(void) {
playerStatus->animFlags |= PLAYER_ANIM_FLAG_IN_DISGUISE; playerStatus->animFlags |= PLAYER_ANIM_FLAG_IN_DISGUISE;
gGameStatusPtr->peachFlags |= 2; gGameStatusPtr->peachFlags |= 2;
disguiseNpc = make_disguise_npc(gGameStatusPtr->peachDisguise); disguiseNpc = peach_make_disguise_npc(gGameStatusPtr->peachDisguise);
if (disguiseNpc != NULL) { if (disguiseNpc != NULL) {
disguiseNpc->flags &= ~NPC_FLAG_40000; disguiseNpc->flags &= ~NPC_FLAG_40000;
} }
@ -580,7 +580,7 @@ void func_800E6428(void) {
} }
} }
void func_800E6500(void) { void peach_sync_disguise_npc(void) {
PlayerStatus* playerStatus = &gPlayerStatus; PlayerStatus* playerStatus = &gPlayerStatus;
if (D_8010C96C >= 0) { if (D_8010C96C >= 0) {
@ -598,7 +598,7 @@ void func_800E6500(void) {
} }
} }
INCLUDE_ASM(Npc*, "7bb60_len_41b0", make_disguise_npc, s32 peachDisguise); INCLUDE_ASM(Npc*, "7bb60_len_41b0", peach_make_disguise_npc, s32 peachDisguise);
INCLUDE_ASM(s32, "7bb60_len_41b0", func_800E66C4); INCLUDE_ASM(s32, "7bb60_len_41b0", peach_disguise_check_overlaps);

View File

@ -316,71 +316,71 @@ void initialize_status_menu(void) {
close_status_menu(); close_status_menu();
iconIndex = create_icon(&D_80108248); iconIndex = create_hud_element(&D_80108248);
uiStatus->hpIconIndexes[0] = iconIndex; uiStatus->hpIconIndexes[0] = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108518); iconIndex = create_hud_element(&D_80108518);
uiStatus->hpIconIndexes[1] = iconIndex; uiStatus->hpIconIndexes[1] = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108270); iconIndex = create_hud_element(&D_80108270);
uiStatus->fpIconIndexes[0] = iconIndex; uiStatus->fpIconIndexes[0] = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108538); iconIndex = create_hud_element(&D_80108538);
uiStatus->fpIconIndexes[1] = iconIndex; uiStatus->fpIconIndexes[1] = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108558); iconIndex = create_hud_element(&D_80108558);
uiStatus->coinIconIndex = iconIndex; uiStatus->coinIconIndex = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80080FC4); iconIndex = create_hud_element(&D_80080FC4);
uiStatus->coinIconIndex2 = iconIndex; uiStatus->coinIconIndex2 = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_801086AC); iconIndex = create_hud_element(&D_801086AC);
uiStatus->starpointsIconIndex = iconIndex; uiStatus->starpointsIconIndex = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80104BEC); iconIndex = create_hud_element(&D_80104BEC);
uiStatus->starpointsIconIndex2 = iconIndex; uiStatus->starpointsIconIndex2 = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
newVar = create_icon(&D_80108068); newVar = create_hud_element(&D_80108068);
iconIndex = newVar; iconIndex = newVar;
uiStatus->iconIndex8 = iconIndex; uiStatus->iconIndex8 = iconIndex;
set_icon_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108068); iconIndex = create_hud_element(&D_80108068);
uiStatus->iconIndex9 = iconIndex; uiStatus->iconIndex9 = iconIndex;
set_icon_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108068); iconIndex = create_hud_element(&D_80108068);
uiStatus->iconIndexA = iconIndex; uiStatus->iconIndexA = iconIndex;
set_icon_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_80108068); iconIndex = create_hud_element(&D_80108068);
uiStatus->iconIndexB = iconIndex; uiStatus->iconIndexB = iconIndex;
set_icon_flags(iconIndex, 0x82); set_hud_element_flags(iconIndex, 0x82);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
iconIndex = create_icon(&D_801083D8); iconIndex = create_hud_element(&D_801083D8);
uiStatus->iconIndexC = iconIndex; uiStatus->iconIndexC = iconIndex;
set_icon_flags(iconIndex, 0x80); set_hud_element_flags(iconIndex, 0x80);
clear_icon_flags(iconIndex, 0x8000); clear_hud_element_flags(iconIndex, 0x8000);
func_800F0D5C(); func_800F0D5C();
} }
@ -400,12 +400,12 @@ void coin_counter_draw_content(UNK_TYPE arg0, s32 posX, s32 posY) {
} }
iconIndex = uiStatus->iconIndex10; iconIndex = uiStatus->iconIndex10;
set_icon_render_pos(iconIndex, posX + 27, posY + 11); set_hud_element_render_pos(iconIndex, posX + 27, posY + 11);
draw_icon_0(iconIndex); draw_hud_element_clipped(iconIndex);
iconIndex = uiStatus->iconIndex11; iconIndex = uiStatus->iconIndex11;
set_icon_render_pos(iconIndex, posX + 15, posY + 11); set_hud_element_render_pos(iconIndex, posX + 15, posY + 11);
draw_icon_0(iconIndex); draw_hud_element_clipped(iconIndex);
draw_number(uiStatus->displayCoins, posX + 58, posY + 4, 1, 10, 255, 3); draw_number(uiStatus->displayCoins, posX + 58, posY + 4, 1, 10, 255, 3);
} }
@ -419,8 +419,8 @@ void update_coin_counter(void) {
if (uiStatus->unk_6C[1] != 0) { if (uiStatus->unk_6C[1] != 0) {
uiStatus->unk_6C[1] -= 1; uiStatus->unk_6C[1] -= 1;
if (((uiStatus->unk_6C[1] << 24) == 0) && (uiStatus->iconIndex12 >= 0)) { if (((uiStatus->unk_6C[1] << 24) == 0) && (uiStatus->iconIndex12 >= 0)) {
free_icon(uiStatus->iconIndex12); free_hud_element(uiStatus->iconIndex12);
free_icon(uiStatus->iconIndex13); free_hud_element(uiStatus->iconIndex13);
uiStatus->iconIndex12 = -1; uiStatus->iconIndex12 = -1;
} }
D_8010CD12 = 0; D_8010CD12 = 0;
@ -457,8 +457,8 @@ void show_coin_counter(void) {
if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) { if ((D_8010CD10 != 0) || (D_8010CD12 != 0)) {
set_window_update(0x14, 2); set_window_update(0x14, 2);
if (uiStatus->iconIndex12 > -1) { if (uiStatus->iconIndex12 > -1) {
free_icon(uiStatus->iconIndex10); free_hud_element(uiStatus->iconIndex10);
free_icon(uiStatus->iconIndex11); free_hud_element(uiStatus->iconIndex11);
uiStatus->iconIndex12 = -1; uiStatus->iconIndex12 = -1;
} }
uiStatus->unk_6C[0] = 0; uiStatus->unk_6C[0] = 0;
@ -470,14 +470,14 @@ void show_coin_counter(void) {
if (uiStatus->unk_6C[0] == 0) { if (uiStatus->unk_6C[0] == 0) {
set_window_properties(0x14, 0x20, 0xa4, 0x40, 0x14, 0x15, coin_counter_draw_content, 0, -1); set_window_properties(0x14, 0x20, 0xa4, 0x40, 0x14, 0x15, coin_counter_draw_content, 0, -1);
set_window_update(0x14, basic_window_update); set_window_update(0x14, basic_window_update);
index = create_icon(&D_80109270); index = create_hud_element(&D_80109270);
uiStatus->iconIndex10 = index; uiStatus->iconIndex10 = index;
set_icon_flags(index, 0x80); set_hud_element_flags(index, 0x80);
icon_set_tint(index, 0xff, 0xff, 0xff); set_hud_element_tint(index, 0xff, 0xff, 0xff);
index = create_icon(&D_80108558); index = create_hud_element(&D_80108558);
uiStatus->iconIndex11 = index; uiStatus->iconIndex11 = index;
set_icon_flags(index, 0x80); set_hud_element_flags(index, 0x80);
icon_set_tint(index, 0xff, 0xff, 0xff); set_hud_element_tint(index, 0xff, 0xff, 0xff);
uiStatus->unk_6C[0] = 0; uiStatus->unk_6C[0] = 0;
if (uiStatus->unk_6C[2] < 0) { if (uiStatus->unk_6C[2] < 0) {
@ -804,22 +804,22 @@ void reset_status_menu(void) {
uiStatus->unk_3B[1] = 0; uiStatus->unk_3B[1] = 0;
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
func_801452B4(uiStatus->hpIconIndexes[i], uiStatus->hpIconIndexes[i]); copy_world_hud_element_ref_to_battle(uiStatus->hpIconIndexes[i], uiStatus->hpIconIndexes[i]);
} }
for (i = 0; i < 2; i++) { for (i = 0; i < 2; i++) {
func_801452B4(uiStatus->fpIconIndexes[i], uiStatus->fpIconIndexes[i]); copy_world_hud_element_ref_to_battle(uiStatus->fpIconIndexes[i], uiStatus->fpIconIndexes[i]);
} }
func_801452B4(uiStatus->coinIconIndex, uiStatus->coinIconIndex); copy_world_hud_element_ref_to_battle(uiStatus->coinIconIndex, uiStatus->coinIconIndex);
func_801452B4(uiStatus->coinIconIndex2, uiStatus->coinIconIndex2); copy_world_hud_element_ref_to_battle(uiStatus->coinIconIndex2, uiStatus->coinIconIndex2);
func_801452B4(uiStatus->starpointsIconIndex, uiStatus->starpointsIconIndex); copy_world_hud_element_ref_to_battle(uiStatus->starpointsIconIndex, uiStatus->starpointsIconIndex);
func_801452B4(uiStatus->starpointsIconIndex2, uiStatus->starpointsIconIndex2); copy_world_hud_element_ref_to_battle(uiStatus->starpointsIconIndex2, uiStatus->starpointsIconIndex2);
func_801452B4(uiStatus->iconIndex8, uiStatus->iconIndex8); copy_world_hud_element_ref_to_battle(uiStatus->iconIndex8, uiStatus->iconIndex8);
func_801452B4(uiStatus->iconIndex9, uiStatus->iconIndex9); copy_world_hud_element_ref_to_battle(uiStatus->iconIndex9, uiStatus->iconIndex9);
func_801452B4(uiStatus->iconIndexA, uiStatus->iconIndexA); copy_world_hud_element_ref_to_battle(uiStatus->iconIndexA, uiStatus->iconIndexA);
func_801452B4(uiStatus->iconIndexB, uiStatus->iconIndexB); copy_world_hud_element_ref_to_battle(uiStatus->iconIndexB, uiStatus->iconIndexB);
func_801452B4(uiStatus->iconIndexC, uiStatus->iconIndexC); copy_world_hud_element_ref_to_battle(uiStatus->iconIndexC, uiStatus->iconIndexC);
} }
#ifdef NON_MATCHING #ifdef NON_MATCHING

View File

@ -1,16 +1,16 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F13B0); INCLUDE_ASM(s32, "8a860_len_3f30", hide_popup_menu);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F1538); INCLUDE_ASM(s32, "8a860_len_3f30", destroy_popup_menu);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F16CC); INCLUDE_ASM(s32, "8a860_len_3f30", func_800F16CC);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F1A10); INCLUDE_ASM(s32, "8a860_len_3f30", popup_menu_update);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F3680); INCLUDE_ASM(s32, "8a860_len_3f30", popup_menu_draw_menu_contents);
INCLUDE_ASM(s32, "8a860_len_3f30", draw_submenu_title); INCLUDE_ASM(s32, "8a860_len_3f30", popup_menu_draw_title_contents);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F48F4); INCLUDE_ASM(s32, "8a860_len_3f30", func_800F48F4);
@ -24,12 +24,12 @@ INCLUDE_ASM(s32, "8a860_len_3f30", func_800F4CF0);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F4D28); INCLUDE_ASM(s32, "8a860_len_3f30", func_800F4D28);
INCLUDE_ASM(void, "8a860_len_3f30", func_800F4E40, void* arg0); INCLUDE_ASM(void, "8a860_len_3f30", create_popup_menu, void* arg0);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F4FC4); INCLUDE_ASM(s32, "8a860_len_3f30", func_800F4FC4);
INCLUDE_ASM(s32, "8a860_len_3f30", func_800F513C); INCLUDE_ASM(s32, "8a860_len_3f30", func_800F513C);
void func_800F52BC(void) { void func_800F52BC(void) {
func_800F1A10(); popup_menu_update();
} }

View File

@ -1,15 +1,18 @@
#include "common.h" #include "common.h"
#include "camera.h" #include "camera.h"
void do_camera_type_0(Camera*); void update_camera_mode_0(Camera*);
void update_camera_mode_1(Camera*);
void update_camera_mode_2(Camera*);
void update_camera_mode_4(Camera*);
INCLUDE_ASM(void, "9d10_len_1080", do_camera_type_4, Camera* camera); INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_4, Camera* camera);
INCLUDE_ASM(void, "9d10_len_1080", do_camera_type_2, Camera* camera); INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_2, Camera* camera);
INCLUDE_ASM(void, "9d10_len_1080", do_camera_type_1, Camera* camera); INCLUDE_ASM(void, "9d10_len_1080", update_camera_mode_1, Camera* camera);
void do_camera_type_0(Camera* camera) { void update_camera_mode_0(Camera* camera) {
f32 xTemp; f32 xTemp;
f32 yTemp; f32 yTemp;
f32 zTemp; f32 zTemp;

View File

@ -1,8 +1,8 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "B0E0", do_camera_type_unused); INCLUDE_ASM(s32, "B0E0", update_camera_mode_unused);
INCLUDE_ASM(s32, "B0E0", do_camera_type_5); INCLUDE_ASM(s32, "B0E0", update_camera_mode_5);
INCLUDE_ASM(s32, "B0E0", func_80030210); INCLUDE_ASM(s32, "B0E0", func_80030210);
@ -13,6 +13,6 @@ void func_80030450(void) {
INCLUDE_ASM(s32, "B0E0", test_ray_zone_aabb); INCLUDE_ASM(s32, "B0E0", test_ray_zone_aabb);
INCLUDE_ASM(s32, "B0E0", update_camera_from_zone); INCLUDE_ASM(s32, "B0E0", update_camera_from_controller);
INCLUDE_ASM(s32, "B0E0", do_camera_type_3); INCLUDE_ASM(s32, "B0E0", update_camera_zone_interp);

View File

@ -1,66 +1,66 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "B4580", func_8011DE80); INCLUDE_ASM(s32, "B4580", animator_copy_vertices_to_buffer);
INCLUDE_ASM(s32, "B4580", func_8011DFD0); INCLUDE_ASM(s32, "B4580", animator_make_mirrorZ);
INCLUDE_ASM(s32, "B4580", func_8011E014); INCLUDE_ASM(s32, "B4580", animator_make_mirrorY);
INCLUDE_ASM(s32, "B4580", func_8011E058); INCLUDE_ASM(s32, "B4580", animator_make_mirrorX);
INCLUDE_ASM(s32, "B4580", func_8011E09C); INCLUDE_ASM(s32, "B4580", animator_make_identity);
INCLUDE_ASM(s32, "B4580", func_8011E0DC); INCLUDE_ASM(s32, "B4580", get_animator_child_with_id);
INCLUDE_ASM(s32, "B4580", func_8011E150); INCLUDE_ASM(s32, "B4580", get_animator_child_for_model);
INCLUDE_ASM(s32, "B4580", func_8011E1C4); INCLUDE_ASM(s32, "B4580", free_animator_nodes);
INCLUDE_ASM(s32, "B4580", func_8011E224); INCLUDE_ASM(s32, "B4580", clear_animator_list);
INCLUDE_ASM(s32, "B4580", func_8011E310); INCLUDE_ASM(s32, "B4580", reset_animator_list);
INCLUDE_ASM(s32, "B4580", func_8011E398); INCLUDE_ASM(s32, "B4580", delete_model_animator_node);
INCLUDE_ASM(s32, "B4580", func_8011E400); INCLUDE_ASM(s32, "B4580", delete_model_animator_nodes);
INCLUDE_ASM(s32, "B4580", func_8011E438); INCLUDE_ASM(s32, "B4580", delete_model_animator);
INCLUDE_ASM(s32, "B4580", func_8011E4B8); INCLUDE_ASM(s32, "B4580", create_model_animator);
INCLUDE_ASM(s32, "B4580", func_8011E5E0); INCLUDE_ASM(s32, "B4580", create_mesh_animator);
INCLUDE_ASM(s32, "B4580", func_8011E718); INCLUDE_ASM(s32, "B4580", add_anim_node);
INCLUDE_ASM(s32, "B4580", func_8011E8BC); INCLUDE_ASM(s32, "B4580", update_model_animator);
INCLUDE_ASM(s32, "B4580", func_8011EA54); INCLUDE_ASM(s32, "B4580", func_8011EA54);
INCLUDE_ASM(s32, "B4580", func_8011EBF0); INCLUDE_ASM(s32, "B4580", step_model_animator);
INCLUDE_ASM(s32, "B4580", func_8011F058); INCLUDE_ASM(s32, "B4580", animator_update_model_transforms);
INCLUDE_ASM(s32, "B4580", func_8011F118); INCLUDE_ASM(s32, "B4580", animator_node_update_model_transform);
INCLUDE_ASM(s32, "B4580", func_8011F304); INCLUDE_ASM(s32, "B4580", render_animated_model);
INCLUDE_ASM(s32, "B4580", func_8011F3E8); INCLUDE_ASM(s32, "B4580", render_animated_model_with_vertices);
INCLUDE_ASM(s32, "B4580", func_8011F4D4); INCLUDE_ASM(s32, "B4580", appendGfx_animator);
INCLUDE_ASM(s32, "B4580", func_8011FA54); INCLUDE_ASM(s32, "B4580", appendGfx_animator_node);
INCLUDE_ASM(s32, "B4580", func_8011FF74); INCLUDE_ASM(s32, "B4580", get_animator_node_for_tree_index);
INCLUDE_ASM(s32, "B4580", func_8011FF98); INCLUDE_ASM(s32, "B4580", get_animator_node_with_id);
INCLUDE_ASM(s32, "B4580", func_8011FFB4); INCLUDE_ASM(s32, "B4580", set_animator_tree_to_node_map);
AnimatedMesh* get_anim_mesh(s32 animModelID) { AnimatedMesh* get_animator_by_index(s32 animModelID) {
return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800]; return (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
} }
AnimatedMesh* func_80120000(s32 animModelID, s32 arg1, s32 arg2) { AnimatedMesh* set_animator_render_callback(s32 animModelID, s32 arg1, s32 arg2) {
AnimatedMesh* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800]; AnimatedMesh* ret = (*gCurrentAnimMeshListPtr)[animModelID & ~0x800];
ret->unk_2D4 = arg2; ret->unk_2D4 = arg2;
@ -68,38 +68,38 @@ AnimatedMesh* func_80120000(s32 animModelID, s32 arg1, s32 arg2) {
return ret; return ret;
} }
INCLUDE_ASM(s32, "B4580", func_80120028); INCLUDE_ASM(s32, "B4580", enable_anim_model_fog);
INCLUDE_ASM(s32, "B4580", func_8012003C); INCLUDE_ASM(s32, "B4580", disable_anim_model_fog);
INCLUDE_ASM(s32, "B4580", func_8012004C); INCLUDE_ASM(s32, "B4580", set_anim_model_fog_dist);
INCLUDE_ASM(s32, "B4580", func_80120064); INCLUDE_ASM(s32, "B4580", set_anim_model_fog_color);
INCLUDE_ASM(s32, "B4580", func_8012008C); INCLUDE_ASM(s32, "B4580", is_anim_model_fog_enabled);
INCLUDE_ASM(s32, "B4580", func_8012009C); INCLUDE_ASM(s32, "B4580", get_anim_model_fog_distance);
INCLUDE_ASM(s32, "B4580", func_801200B8); INCLUDE_ASM(s32, "B4580", get_anim_model_fog_color);
INCLUDE_ASM(s32, "B4580", func_801200EC); INCLUDE_ASM(s32, "B4580", set_animator_flags);
INCLUDE_ASM(s32, "B4580", func_80120118); INCLUDE_ASM(s32, "B4580", clear_animator_flags);
INCLUDE_ASM(s32, "B4580", play_model_animation); INCLUDE_ASM(s32, "B4580", play_model_animation);
INCLUDE_ASM(s32, "B4580", func_80120198); INCLUDE_ASM(s32, "B4580", play_model_animation_starting_from);
INCLUDE_ASM(s32, "B4580", func_80120234); INCLUDE_ASM(s32, "B4580", load_model_animator_node);
INCLUDE_ASM(s32, "B4580", func_801203AC); INCLUDE_ASM(s32, "B4580", load_model_animator_tree);
INCLUDE_ASM(s32, "B4580", func_80120420); INCLUDE_ASM(s32, "B4580", load_mesh_animator_node);
INCLUDE_ASM(s32, "B4580", func_80120474); INCLUDE_ASM(s32, "B4580", load_mesh_animator_tree);
INCLUDE_ASM(s32, "B4580", func_80120530); INCLUDE_ASM(s32, "B4580", reload_mesh_animator_node);
INCLUDE_ASM(s32, "B4580", func_80120678); INCLUDE_ASM(s32, "B4580", reload_mesh_animator_tree);
INCLUDE_ASM(s32, "B4580", func_801206F8); INCLUDE_ASM(s32, "B4580", step_mesh_animator);

View File

@ -20,9 +20,9 @@ INCLUDE_ASM(s32, "B9D60", _update_message);
INCLUDE_ASM(s32, "B9D60", render_messages); INCLUDE_ASM(s32, "B9D60", render_messages);
INCLUDE_ASM(s32, "B9D60", func_80124434); INCLUDE_ASM(s32, "B9D60", msg_play_speech_sound);
INCLUDE_ASM(s32, "B9D60", func_80124570); INCLUDE_ASM(s32, "B9D60", msg_copy_to_print_buffer);
INCLUDE_ASM(s32, "B9D60", initialize_printer); INCLUDE_ASM(s32, "B9D60", initialize_printer);
@ -30,15 +30,15 @@ INCLUDE_ASM(s32, "B9D60", dma_load_string);
INCLUDE_ASM(s32, "B9D60", load_message_to_buffer); INCLUDE_ASM(s32, "B9D60", load_message_to_buffer);
PrintContext* load_string(s32 stringID, s32* a1) { PrintContext* msg_get_printer_for_string(s32 stringID, s32* a1) {
return _load_string(stringID, a1, 0); return _msg_get_printer_for_string(stringID, a1, 0);
} }
INCLUDE_ASM(s32, "B9D60", _load_string); INCLUDE_ASM(s32, "B9D60", _get_printer_for_string);
INCLUDE_ASM(s32, "B9D60", load_message_to_printer); INCLUDE_ASM(s32, "B9D60", msg_printer_load_string);
INCLUDE_ASM(s32, "B9D60", clamp_printer_coords); INCLUDE_ASM(s32, "B9D60", msg_printer_set_origin_pos);
s32 cancel_message(PrintContext* printContext) { s32 cancel_message(PrintContext* printContext) {
if ((printContext->stateFlags & 2) == 0) { if ((printContext->stateFlags & 2) == 0) {
@ -61,52 +61,52 @@ void close_message(PrintContext* printContext) {
printContext->stateFlags &= ~0x40; printContext->stateFlags &= ~0x40;
} }
INCLUDE_ASM(s32, "B9D60", func_80125C84); INCLUDE_ASM(s32, "B9D60", msg_get_print_char_width);
INCLUDE_ASM(s32, "B9D60", get_char_width); INCLUDE_ASM(s32, "B9D60", msg_get_draw_char_width);
INCLUDE_ASM(s32, "B9D60", get_string_properties); INCLUDE_ASM(s32, "B9D60", get_string_properties);
INCLUDE_ASM(s32, "B9D60", get_string_width); INCLUDE_ASM(s32, "B9D60", get_string_width);
INCLUDE_ASM(s32, "B9D60", get_msg_lines); INCLUDE_ASM(s32, "B9D60", get_string_lines);
INCLUDE_ASM(s32, "B9D60", draw_msg); INCLUDE_ASM(s32, "B9D60", draw_string);
INCLUDE_ASM(s32, "B9D60", func_80126790); INCLUDE_ASM(s32, "B9D60", msg_update_rewind_arrow);
INCLUDE_ASM(s32, "B9D60", func_80126EAC); INCLUDE_ASM(s32, "B9D60", msg_draw_rewind_arrow);
INCLUDE_ASM(s32, "B9D60", func_80126F78); INCLUDE_ASM(s32, "B9D60", msg_draw_choice_pointer);
INCLUDE_ASM(s32, "B9D60", draw_digit); INCLUDE_ASM(s32, "B9D60", draw_digit);
INCLUDE_ASM(void, "B9D60", draw_number, s32 value, s32 x, s32 y, s32 arg3, s32 palette, s32 opacity, s32 style); INCLUDE_ASM(void, "B9D60", draw_number, s32 value, s32 x, s32 y, s32 arg3, s32 palette, s32 opacity, s32 style);
void func_80127B70(s32 arg0) { void drawbox_message_delegate(s32 arg0) {
func_80127D90(arg0, 0, 0, 0, 0, 4, 0); appendGfx_message(arg0, 0, 0, 0, 0, 4, 0);
} }
INCLUDE_ASM(s32, "B9D60", func_80127BA4); INCLUDE_ASM(s32, "B9D60", draw_message_window);
INCLUDE_ASM(s32, "B9D60", func_80127D90); INCLUDE_ASM(s32, "B9D60", appendGfx_message);
void func_8012C2E0(void) { void msg_reset_gfx_state(void) {
gDPPipeSync(gMasterGfxPos++); gDPPipeSync(gMasterGfxPos++);
gSPDisplayList(gMasterGfxPos++, D_8014C500); gSPDisplayList(gMasterGfxPos++, D_8014C500);
} }
INCLUDE_ASM(s32, "B9D60", func_8012C324); INCLUDE_ASM(s32, "B9D60", msg_draw_char);
INCLUDE_ASM(s32, "B9D60", func_8012C9A8); INCLUDE_ASM(s32, "B9D60", msg_draw_prim_rect);
INCLUDE_ASM(s32, "B9D60", func_8012CA08); INCLUDE_ASM(s32, "B9D60", appendGfx_msg_prim_rect);
INCLUDE_ASM(s32, "B9D60", _draw_message_box); INCLUDE_ASM(s32, "B9D60", msg_draw_speech_bubble);
INCLUDE_ASM(s32, "B9D60", func_8012D3DC); INCLUDE_ASM(s32, "B9D60", msg_draw_speech_arrow);
INCLUDE_ASM(s32, "B9D60", func_8012DB58); INCLUDE_ASM(s32, "B9D60", msg_draw_frame);
INCLUDE_ASM(s32, "B9D60", func_8012E8E0); INCLUDE_ASM(s32, "B9D60", msg_get_glyph);

View File

@ -9,19 +9,19 @@ ItemEntity** D_801565A0; // item entity list
extern s16 D_801565A4; extern s16 D_801565A4;
extern s16 D_801565A8; extern s16 D_801565A8;
INCLUDE_ASM(s32, "C50A0", func_8012E9A0); INCLUDE_ASM(s32, "C50A0", draw_ci_image_with_clipping);
INCLUDE_ASM(s32, "C50A0", func_8012EC94); INCLUDE_ASM(s32, "C50A0", draw_image_with_clipping);
INCLUDE_ASM(s32, "C50A0", func_8012F500); INCLUDE_ASM(s32, "C50A0", draw_tiled_image);
INCLUDE_ASM(s32, "C50A0", func_8012FE10); INCLUDE_ASM(s32, "C50A0", integer_log);
INCLUDE_ASM(s32, "C50A0", func_8012FE78); INCLUDE_ASM(s32, "C50A0", draw_adjustable_tiled_image);
INCLUDE_ASM(s32, "C50A0", func_801309F0); INCLUDE_ASM(s32, "C50A0", sparkle_script_init);
s32 next_sequence_step(ItemEntity* itemEntity) { s32 sparkle_script_step(ItemEntity* itemEntity) {
s32* currentState = itemEntity->currentState; s32* currentState = itemEntity->currentState;
switch (*currentState++) { switch (*currentState++) {
@ -60,10 +60,10 @@ s32 next_sequence_step(ItemEntity* itemEntity) {
return 0; return 0;
} }
void do_animation(ItemEntity* itemEntity) { void sparkle_script_update(ItemEntity* itemEntity) {
itemEntity->framesLeft--; itemEntity->framesLeft--;
if (itemEntity->framesLeft <= 0) { if (itemEntity->framesLeft <= 0) {
while (next_sequence_step(itemEntity) != 0) { while (sparkle_script_step(itemEntity) != 0) {
} }
} }
@ -75,9 +75,9 @@ ItemEntity* get_item_entity(s32 itemEntityIndex) {
return D_801565A0[itemEntityIndex]; return D_801565A0[itemEntityIndex];
} }
INCLUDE_ASM(s32, "C50A0", func_80130F70); INCLUDE_ASM(s32, "C50A0", item_entity_disable_shadow);
INCLUDE_ASM(s32, "C50A0", func_80130FAC); INCLUDE_ASM(s32, "C50A0", item_entity_enable_shadow);
INCLUDE_ASM(s32, "C50A0", clear_item_entity_data); INCLUDE_ASM(s32, "C50A0", clear_item_entity_data);
@ -94,7 +94,7 @@ void init_item_entity_list(void) {
D_80155D84 = 0; D_80155D84 = 0;
} }
INCLUDE_ASM(s32, "C50A0", func_80131128); INCLUDE_ASM(s32, "C50A0", item_entity_load);
s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign, s32 make_item_entity(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode, s32 pickupDelay, s32 facingAngleSign,
s32 pickupVar); s32 pickupVar);
@ -111,7 +111,7 @@ s32 make_item_entity_delayed(s32 itemID, f32 x, f32 y, f32 z, s32 itemSpawnMode,
INCLUDE_ASM(s32, "C50A0", init_got_item); INCLUDE_ASM(s32, "C50A0", init_got_item);
INCLUDE_ASM(s32, "C50A0", func_80131DD4); INCLUDE_ASM(s32, "C50A0", item_entity_update);
INCLUDE_ASM(s32, "C50A0", update_item_entities); INCLUDE_ASM(s32, "C50A0", update_item_entities);
@ -131,7 +131,7 @@ INCLUDE_ASM(s32, "C50A0", func_80133A94);
INCLUDE_ASM(s32, "C50A0", test_item_player_collision); INCLUDE_ASM(s32, "C50A0", test_item_player_collision);
INCLUDE_ASM(s32, "C50A0", func_80133FC8); INCLUDE_ASM(s32, "C50A0", test_item_entity_position);
void set_item_entity_flags(s32 index, s32 flags) { void set_item_entity_flags(s32 index, s32 flags) {
ItemEntity* itemEntity = D_801565A0[index]; ItemEntity* itemEntity = D_801565A0[index];

View File

@ -78,7 +78,7 @@ void sfx_reset_door_sounds(void) {
INCLUDE_ASM(void, "DF950", sfx_clear_sounds); INCLUDE_ASM(void, "DF950", sfx_clear_sounds);
INCLUDE_ASM(s32, "DF950", func_80149670); INCLUDE_ASM(s32, "DF950", sfx_clear_env_sounds);
INCLUDE_ASM(void, "DF950", sfx_update_looping_sound_params); INCLUDE_ASM(void, "DF950", sfx_update_looping_sound_params);

View File

@ -23,5 +23,5 @@ void func_802B79C8_E20AD8(void) {
gPlayerStatusPtr->unk_C8 = NULL; gPlayerStatusPtr->unk_C8 = NULL;
gPlayerStatusPtr->animFlags &= ~0x10; gPlayerStatusPtr->animFlags &= ~0x10;
func_800EF3D4(0); func_800EF3D4(0);
reset_partner_tether_distance(); repartner_set_tether_distance();
} }

View File

@ -24,7 +24,7 @@ typedef struct GameMode {
/* 0x08 */ void (*step)(struct GameMode*); /* 0x08 */ void (*step)(struct GameMode*);
/* 0x0C */ UNK_FUN_PTR(unk_0C); /* 0x0C */ UNK_FUN_PTR(unk_0C);
/* 0x10 */ void (*render)(void); /* 0x10 */ void (*render)(void);
/* 0x14 */ void (*renderAux)(void); ///< @see func_80112FC4 /* 0x14 */ void (*renderAux)(void); ///< @see state_render_frontUI
} GameMode; // size = 0x18 } GameMode; // size = 0x18
extern s32 D_8014B7F8[]; extern s32 D_8014B7F8[];
@ -312,10 +312,10 @@ void update_shadow_transform_matrix(Shadow* shadow);
void update_entity_inverse_rotation_matrix(Entity* entity); void update_entity_inverse_rotation_matrix(Entity* entity);
void delete_entity(s32 entityIndex); void delete_entity(s32 entityIndex);
void delete_entity_and_unload_data(s32 entityIndex); void delete_entity_and_unload_data(s32 entityIndex);
void func_8011085C(s32 shadowIndex); void _delete_shadow(s32 shadowIndex);
s32 entity_get_collision_flags(Entity* entity); s32 entity_get_collision_flags(Entity* entity);
void func_801117DC(StaticEntityData* data); void entity_free_static_data(StaticEntityData* data);
void func_80112344(Entity* entity); void update_entity_shadow_position(Entity* entity);
void update_entities(void) { void update_entities(void) {
s32 i; s32 i;
@ -342,7 +342,7 @@ void update_entities(void) {
if (entity->flags & 0x2000000) { if (entity->flags & 0x2000000) {
if (does_script_exist(entity->boundScript->id)) { if (does_script_exist(entity->boundScript->id)) {
if (entity->flags & 8) { if (entity->flags & 8) {
func_8011E8BC(entity->virtualModelIndex); update_model_animator(entity->virtualModelIndex);
} else { } else {
exec_entity_model_commandlist(entity->virtualModelIndex); exec_entity_model_commandlist(entity->virtualModelIndex);
} }
@ -414,13 +414,13 @@ void update_entities(void) {
} }
if (entity->flags & 8) { if (entity->flags & 8) {
func_8011E8BC(entity->virtualModelIndex); update_model_animator(entity->virtualModelIndex);
} else { } else {
exec_entity_model_commandlist(entity->virtualModelIndex); exec_entity_model_commandlist(entity->virtualModelIndex);
} }
if (entity->shadowIndex >= 0) { if (entity->shadowIndex >= 0) {
func_80112344(entity); update_entity_shadow_position(entity);
} }
if (entity->flags & 0x20000000) { if (entity->flags & 0x20000000) {
@ -457,24 +457,28 @@ void update_shadows(void) {
update_shadow_transform_matrix(shadow); update_shadow_transform_matrix(shadow);
if (shadow->flags & 8) { if (shadow->flags & 8) {
func_8011E8BC(shadow->entityModelID); update_model_animator(shadow->entityModelID);
} else { } else {
exec_entity_model_commandlist(shadow->entityModelID); exec_entity_model_commandlist(shadow->entityModelID);
} }
if (shadow->flags & 0x20000000) { if (shadow->flags & 0x20000000) {
func_8011085C(shadow->listIndex); _delete_shadow(shadow->listIndex);
} }
} }
} }
} }
} }
INCLUDE_ASM(void, "a5dd0_len_114e0", set_entity_commandlist, Entity* entity, s32* entityScript); void set_entity_commandlist(Entity* entity, s32* entityScript) {
entity->scriptReadPos = entityScript;
entity->hasEntityScript = TRUE;
entity->savedReadPos = entity->scriptReadPos;
}
INCLUDE_ASM(s32, "a5dd0_len_114e0", step_entity_commandlist, Entity* entity); INCLUDE_ASM(s32, "a5dd0_len_114e0", step_entity_commandlist, Entity* entity);
void exec_entity_updatecmd(Entity* entity) { void exec_entity_commandlist(Entity* entity) {
while (step_entity_commandlist(entity) != 0); while (step_entity_commandlist(entity) != 0);
} }
@ -531,16 +535,16 @@ void render_entities(void) {
if (entity->flags & 8) { if (entity->flags & 8) {
if (D_8014AFB0 == 0xFF) { if (D_8014AFB0 == 0xFF) {
if (entity->renderSetupFunc != NULL) { if (entity->renderSetupFunc != NULL) {
func_80120000(entity->virtualModelIndex, entity->listIndex, entity->renderSetupFunc); set_animator_render_callback(entity->virtualModelIndex, entity->listIndex, entity->renderSetupFunc);
} }
} else { } else {
func_80120000(entity->virtualModelIndex, entity->listIndex, func_8010FE44); set_animator_render_callback(entity->virtualModelIndex, entity->listIndex, func_8010FE44);
} }
if (entity->vertexData == NULL) { if (entity->vertexData == NULL) {
func_8011F304(entity->virtualModelIndex, &entity->transformMatrix); render_animated_model(entity->virtualModelIndex, &entity->transformMatrix);
} else { } else {
func_8011F3E8(entity->virtualModelIndex, render_animated_model_with_vertices(entity->virtualModelIndex,
&entity->transformMatrix, &entity->transformMatrix,
entity->vertexSegment, entity->vertexSegment,
entity->vertexData); entity->vertexData);
@ -559,9 +563,9 @@ void render_entities(void) {
} }
if (entity->vertexData == NULL) { if (entity->vertexData == NULL) {
draw_entity_model_shadow(entity->virtualModelIndex, &entity->transformMatrix); draw_entity_model_A(entity->virtualModelIndex, &entity->transformMatrix);
} else { } else {
draw_entity_model_main(entity->virtualModelIndex, draw_entity_model_B(entity->virtualModelIndex,
&entity->transformMatrix, &entity->transformMatrix,
entity->vertexSegment, entity->vertexSegment,
entity->vertexData); entity->vertexData);
@ -590,9 +594,9 @@ void render_shadows(void) {
} }
} else if (shadow->flags & 8) { } else if (shadow->flags & 8) {
if (shadow->vertexArray == NULL) { if (shadow->vertexArray == NULL) {
func_8011F304(shadow->entityModelID, &shadow->transformMatrix); render_animated_model(shadow->entityModelID, &shadow->transformMatrix);
} else { } else {
func_8011F3E8(shadow->entityModelID, render_animated_model_with_vertices(shadow->entityModelID,
&shadow->transformMatrix, &shadow->transformMatrix,
shadow->vertexSegment, shadow->vertexSegment,
shadow->vertexArray); shadow->vertexArray);
@ -608,9 +612,9 @@ void render_shadows(void) {
bind_entity_model_setupGfx(shadow->entityModelID, shadow->unk_05, entity_model_set_shadow_color); bind_entity_model_setupGfx(shadow->entityModelID, shadow->unk_05, entity_model_set_shadow_color);
if (shadow->vertexArray == NULL) { if (shadow->vertexArray == NULL) {
draw_entity_model_shadow(shadow->entityModelID, &shadow->transformMatrix); draw_entity_model_A(shadow->entityModelID, &shadow->transformMatrix);
} else { } else {
draw_entity_model_main(shadow->entityModelID, draw_entity_model_B(shadow->entityModelID,
&shadow->transformMatrix, &shadow->transformMatrix,
shadow->vertexSegment, shadow->vertexSegment,
shadow->vertexArray); shadow->vertexArray);
@ -656,7 +660,7 @@ ShadowList* get_shadow_list(void) {
return ret; return ret;
} }
s32 func_80110678(Npc* npc) { s32 entity_start_script(Npc* npc) {
if (npc->currentAnim.w != 0) { if (npc->currentAnim.w != 0) {
npc->flags |= 0x1000000; npc->flags |= 0x1000000;
return 1; return 1;
@ -684,7 +688,7 @@ void delete_entity(s32 entityIndex) {
if (!(entity->flags & 8)) { if (!(entity->flags & 8)) {
free_entity_model_by_index(entity->virtualModelIndex); free_entity_model_by_index(entity->virtualModelIndex);
} else { } else {
func_8011E438(get_anim_mesh(entity->virtualModelIndex)); delete_model_animator(get_animator_by_index(entity->virtualModelIndex));
} }
if (entity->shadowIndex >= 0) { if (entity->shadowIndex >= 0) {
@ -707,10 +711,10 @@ void delete_entity_and_unload_data(s32 entityIndex) {
if (!(entity->flags & 8)) { if (!(entity->flags & 8)) {
free_entity_model_by_index(entity->virtualModelIndex); free_entity_model_by_index(entity->virtualModelIndex);
} else { } else {
func_8011E438(get_anim_mesh(entity->virtualModelIndex)); delete_model_animator(get_animator_by_index(entity->virtualModelIndex));
} }
func_801117DC(entity->staticData); entity_free_static_data(entity->staticData);
if (entity->shadowIndex >= 0) { if (entity->shadowIndex >= 0) {
Shadow* shadow = get_shadow_by_index(entity->shadowIndex); Shadow* shadow = get_shadow_by_index(entity->shadowIndex);
@ -722,7 +726,7 @@ void delete_entity_and_unload_data(s32 entityIndex) {
(*gCurrentEntityListPtr)[entityIndex] = NULL; (*gCurrentEntityListPtr)[entityIndex] = NULL;
} }
void func_8011085C(s32 shadowIndex) { void _delete_shadow(s32 shadowIndex) {
Shadow* shadow = get_shadow_by_index(shadowIndex); Shadow* shadow = get_shadow_by_index(shadowIndex);
free_entity_model_by_index(shadow->entityModelID); free_entity_model_by_index(shadow->entityModelID);
@ -773,7 +777,7 @@ s32 entity_get_collision_flags(Entity* entity) {
return ret; return ret;
} }
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801109DC); INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_interacts_with_current_partner);
// float bs // float bs
#ifdef NON_MATCHING #ifdef NON_MATCHING
@ -802,7 +806,7 @@ s32 is_player_action_state(ActionState actionState) {
return actionState == gPlayerActionState; return actionState == gPlayerActionState;
} }
void func_80110BCC(Entity* entity, u32* commandList) { void entity_set_render_script(Entity* entity, u32* commandList) {
if (!(entity->flags & 8)) { if (!(entity->flags & 8)) {
set_entity_model_render_command_list(entity->virtualModelIndex, commandList); set_entity_model_render_command_list(entity->virtualModelIndex, commandList);
} }
@ -839,7 +843,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80110E58);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80110F10); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80110F10);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801110B4); INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_anim_make_vertex_pointers);
INCLUDE_ASM(s32, "a5dd0_len_114e0", is_entity_data_loaded); INCLUDE_ASM(s32, "a5dd0_len_114e0", is_entity_data_loaded);
@ -849,7 +853,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", load_split_entity_data);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80111790); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80111790);
INCLUDE_ASM(void, "a5dd0_len_114e0", func_801117DC, StaticEntityData* data); INCLUDE_ASM(void, "a5dd0_len_114e0", entity_free_static_data, StaticEntityData* data);
INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4, INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity, StaticEntityData* data, s32 x, s32 y, s32 z, s32 arg4,
s32 flags); s32 flags);
@ -859,7 +863,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", create_shadow_from_data);
INCLUDE_ASM(s32, "a5dd0_len_114e0", MakeEntity, ScriptInstance* script, s32 isInitialCall); INCLUDE_ASM(s32, "a5dd0_len_114e0", MakeEntity, ScriptInstance* script, s32 isInitialCall);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80111E9C); INCLUDE_ASM(s32, "a5dd0_len_114e0", SetEntityCullMode);
INCLUDE_ASM(s32, "a5dd0_len_114e0", UseDynamicShadow); INCLUDE_ASM(s32, "a5dd0_len_114e0", UseDynamicShadow);
@ -901,13 +905,13 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", create_entity_shadow);
INCLUDE_ASM(Shadow*, "a5dd0_len_114e0", create_shadow_type, s32 type, f32 x, f32 y, f32 z); INCLUDE_ASM(Shadow*, "a5dd0_len_114e0", create_shadow_type, s32 type, f32 x, f32 y, f32 z);
void func_80112328(s32 shadowIndex) { void delete_shadow(s32 shadowIndex) {
func_8011085C(shadowIndex); _delete_shadow(shadowIndex);
} }
INCLUDE_ASM(void, "a5dd0_len_114e0", func_80112344, Entity* entity); INCLUDE_ASM(void, "a5dd0_len_114e0", update_entity_shadow_position, Entity* entity);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801125E8); INCLUDE_ASM(s32, "a5dd0_len_114e0", entity_raycast_down);
INCLUDE_ASM(s32, "a5dd0_len_114e0", set_standard_shadow_scale); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_standard_shadow_scale);
@ -915,14 +919,14 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", set_npc_shadow_scale);
INCLUDE_ASM(s32, "a5dd0_len_114e0", set_peach_shadow_scale); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_peach_shadow_scale);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112B20); INCLUDE_ASM(s32, "a5dd0_len_114e0", is_block_on_ground);
void NOP_state(void) { void state_delegate_NOP(void) {
} }
// ordering // ordering
#ifdef NON_MATCHING #ifdef NON_MATCHING
void func_80112B98(void) { void clear_game_modes(void) {
s32 i; s32 i;
for (i = 0; i < ARRAY_COUNT(gMainGameState); i++) { for (i = 0; i < ARRAY_COUNT(gMainGameState); i++) {
@ -930,7 +934,7 @@ void func_80112B98(void) {
} }
} }
#else #else
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112B98); INCLUDE_ASM(s32, "a5dd0_len_114e0", clear_game_modes);
#endif #endif
// regalloc? // regalloc?
@ -955,12 +959,12 @@ GameMode* set_next_game_mode(GameMode* arg0) {
gameMode->unk_08 = arg0->unk_08; gameMode->unk_08 = arg0->unk_08;
gameMode->render = arg0->render; gameMode->render = arg0->render;
gameMode->unk_0C = NULL; gameMode->unk_0C = NULL;
if (gameMode->init == NULL) gameMode->init = NOP_state; if (gameMode->init == NULL) gameMode->init = state_delegate_NOP;
if (gameMode->step == NULL) gameMode->step = NOP_state; if (gameMode->step == NULL) gameMode->step = state_delegate_NOP;
if (gameMode->unk_0C == NULL) gameMode->unk_0C = NOP_state; if (gameMode->unk_0C == NULL) gameMode->unk_0C = state_delegate_NOP;
if (gameMode->render == NULL) gameMode->render = NOP_state; if (gameMode->render == NULL) gameMode->render = state_delegate_NOP;
gameMode->renderAux = NOP_state; gameMode->renderAux = state_delegate_NOP;
gameMode->init(); gameMode->init();
return gameMode; return gameMode;
@ -977,18 +981,18 @@ GameMode* set_game_mode_slot(s32 i, GameMode* arg0) {
gameMode->step = arg0->step; gameMode->step = arg0->step;
gameMode->render = arg0->render; gameMode->render = arg0->render;
gameMode->unk_0C = NULL; gameMode->unk_0C = NULL;
if (gameMode->init == NULL) gameMode->init = NOP_state; if (gameMode->init == NULL) gameMode->init = state_delegate_NOP;
if (gameMode->step == NULL) gameMode->step = NOP_state; if (gameMode->step == NULL) gameMode->step = state_delegate_NOP;
if (gameMode->unk_0C == NULL) gameMode->unk_0C = NOP_state; if (gameMode->unk_0C == NULL) gameMode->unk_0C = state_delegate_NOP;
if (gameMode->render == NULL) gameMode->render = NOP_state; if (gameMode->render == NULL) gameMode->render = state_delegate_NOP;
gameMode->renderAux = NOP_state; gameMode->renderAux = state_delegate_NOP;
gameMode->init(); gameMode->init();
return gameMode; return gameMode;
} }
void func_80112D84(s32 i, void (*fn)(void)) { void game_mode_set_fpDrawAuxUI(s32 i, void (*fn)(void)) {
GameMode* gameMode = &gMainGameState[i]; GameMode* gameMode = &gMainGameState[i];
ASSERT(i < ARRAY_COUNT(gMainGameState)); ASSERT(i < ARRAY_COUNT(gMainGameState));
@ -997,7 +1001,7 @@ void func_80112D84(s32 i, void (*fn)(void)) {
gameMode->flags |= 0x20; gameMode->flags |= 0x20;
if (fn == NULL) { if (fn == NULL) {
gameMode->renderAux = NOP_state; gameMode->renderAux = state_delegate_NOP;
} }
} }
@ -1038,13 +1042,13 @@ void step_current_game_mode(void) {
#endif #endif
// similar to step_current_game_mode, but calls unk_0C // similar to step_current_game_mode, but calls unk_0C
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112EEC); INCLUDE_ASM(s32, "a5dd0_len_114e0", state_do_unk);
// similar to step_current_game_mode, but calls render // similar to step_current_game_mode, but calls render
INCLUDE_ASM(s32, "a5dd0_len_114e0", render_ui); INCLUDE_ASM(s32, "a5dd0_len_114e0", state_render_backUI);
// calls renderAux and render // calls renderAux and render
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80112FC4); INCLUDE_ASM(s32, "a5dd0_len_114e0", state_render_frontUI);
INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model, Model*); INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model, Model*);
@ -1078,7 +1082,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", render_models);
void appendGfx_model_group(Model*); void appendGfx_model_group(Model*);
void appendGfx_model(Model*); void appendGfx_model(Model*);
void func_8011800C(Model*); void render_transform_group(Model*);
// void render_models(void) { // void render_models(void) {
// Camera* camera = &gCameras[gCurrentCameraID]; // Camera* camera = &gCameras[gCurrentCameraID];
@ -1359,7 +1363,7 @@ void func_8011800C(Model*);
// distance = (row2 / row3) * 10000.0f; // distance = (row2 / row3) * 10000.0f;
// if (!(modelTransformGroup->flags & 2)) { // if (!(modelTransformGroup->flags & 2)) {
// renderTaskPtr->appendGfx = func_8011800C; // renderTaskPtr->appendGfx = render_transform_group;
// renderTaskPtr->appendGfxArg = modelTransformGroup; // renderTaskPtr->appendGfxArg = modelTransformGroup;
// renderTaskPtr->distance = -distance; // renderTaskPtr->distance = -distance;
// renderTaskPtr->renderMode = modelTransformGroup->renderMode; // renderTaskPtr->renderMode = modelTransformGroup->renderMode;
@ -1373,9 +1377,9 @@ INCLUDE_ASM(void, "a5dd0_len_114e0", appendGfx_model_group, Model*);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80117D00); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80117D00);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_80117E74); INCLUDE_ASM(s32, "a5dd0_len_114e0", render_transform_group_node);
INCLUDE_ASM(void, "a5dd0_len_114e0", func_8011800C, Model*); INCLUDE_ASM(void, "a5dd0_len_114e0", render_transform_group, Model*);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801180E8); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_801180E8);
@ -1389,22 +1393,22 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", load_model_transforms);
INCLUDE_ASM(s32, "a5dd0_len_114e0", get_model_list_index_from_tree_index, s32 treeIndex); INCLUDE_ASM(s32, "a5dd0_len_114e0", get_model_list_index_from_tree_index, s32 treeIndex);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B090, s32 arg0); INCLUDE_ASM(s32, "a5dd0_len_114e0", get_transform_group_index, s32 arg0);
INCLUDE_ASM(void, "a5dd0_len_114e0", get_model_center_and_size, u16 modelID, f32* centerX, f32* centerY, INCLUDE_ASM(void, "a5dd0_len_114e0", get_model_center_and_size, u16 modelID, f32* centerX, f32* centerY,
f32* centerZ, f32* sizeX, f32* sizeY, f32* sizeZ); f32* centerZ, f32* sizeX, f32* sizeY, f32* sizeZ);
ModelTransformGroup* func_8011B1C0(s32 index) { ModelTransformGroup* get_transform_group(s32 index) {
return (*gCurrentTransformGroups)[index]; return (*gCurrentTransformGroups)[index];
} }
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B1D8); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B1D8);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B37C); INCLUDE_ASM(s32, "a5dd0_len_114e0", make_transform_group);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B5D0); INCLUDE_ASM(s32, "a5dd0_len_114e0", enable_transform_group);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011B660); INCLUDE_ASM(s32, "a5dd0_len_114e0", disable_transform_group);
void clone_model(u16 srcModelID, u16 newModelID) { void clone_model(u16 srcModelID, u16 newModelID) {
Model* srcModel = get_model_from_list_index(get_model_list_index_from_tree_index(srcModelID)); Model* srcModel = get_model_from_list_index(get_model_list_index_from_tree_index(srcModelID));
@ -1502,13 +1506,13 @@ void set_aux_pan_v(s32 texPannerID, s32 value) {
texPannerAuxV[texPannerID] = value; texPannerAuxV[texPannerID] = value;
} }
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BC7C); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_mdl_custom_gfx_set);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BCB4); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_custom_gfx);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BCD0); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_custom_gfx_builders);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BCEC); INCLUDE_ASM(s32, "a5dd0_len_114e0", build_custom_gfx);
/// @returns TRUE if mtx is NULL or identity. /// @returns TRUE if mtx is NULL or identity.
INCLUDE_ASM(s32, "a5dd0_len_114e0", is_identity_fixed_mtx); INCLUDE_ASM(s32, "a5dd0_len_114e0", is_identity_fixed_mtx);
@ -1527,33 +1531,33 @@ void get_background_color_blend(u8* r, u8* g, u8* b, u8* a) {
*a = D_8014B74C; *a = D_8014B74C;
} }
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BEB4); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_model_fog_color_parameters);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BF14); INCLUDE_ASM(s32, "a5dd0_len_114e0", get_model_fog_color_parameters);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BF98); INCLUDE_ASM(s32, "a5dd0_len_114e0", set_model_env_color_parameters);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011BFD4); INCLUDE_ASM(s32, "a5dd0_len_114e0", get_model_env_color_parameters);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C028); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_get_vertex_count);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C0DC); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_local_gfx_update_vtx_pointers);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C130); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_local_gfx_copy_vertices);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C164); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_make_local_vertex_copy);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C2B0); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_get_copied_vertices);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C2EC); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_get_copied_gfx);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C32C); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_project_tex_coords);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C80C); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011C80C);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011CFBC); INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011CFBC);
void func_8011D72C(Gfx** arg0, u16 treeIndex) { void mdl_draw_hidden_panel_surface(Gfx** arg0, u16 treeIndex) {
Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex)); Model* model = get_model_from_list_index(get_model_list_index_from_tree_index(treeIndex));
Model copied = *model; Model copied = *model;
Gfx* oldGfxPos; Gfx* oldGfxPos;
@ -1576,13 +1580,13 @@ void func_8011D72C(Gfx** arg0, u16 treeIndex) {
} }
} }
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011D7E4); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_get_next_texture_address);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011D82C); INCLUDE_ASM(s32, "a5dd0_len_114e0", mdl_set_all_fog_mode);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011D890); INCLUDE_ASM(s32, "a5dd0_len_114e0", clear_render_tasks);
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011D8D0); INCLUDE_ASM(s32, "a5dd0_len_114e0", clear_render_tasks_alt);
RenderTaskEntry* queue_render_task(RenderTask* task) { RenderTaskEntry* queue_render_task(RenderTask* task) {
RenderTaskEntry* entry = D_801533A0[D_801533AC]; RenderTaskEntry* entry = D_801533A0[D_801533AC];
@ -1603,4 +1607,4 @@ RenderTaskEntry* queue_render_task(RenderTask* task) {
return entry; return entry;
} }
INCLUDE_ASM(s32, "a5dd0_len_114e0", func_8011D9B8); INCLUDE_ASM(s32, "a5dd0_len_114e0", execute_render_tasks);

View File

@ -1,3 +1,3 @@
#include "common.h" #include "common.h"
INCLUDE_ASM(s32, "ad90_len_2880", do_camera_type_6); INCLUDE_ASM(s32, "ad90_len_2880", update_camera_mode_6);

View File

@ -613,8 +613,8 @@ void snd_reset_instrument(Instrument*);
void func_80053370(UnkAlC*); void func_80053370(UnkAlC*);
void func_800533A8(InstrumentCFG*); void func_800533A8(InstrumentCFG*);
void func_80053654(UnkAl19E0*); void func_80053654(UnkAl19E0*);
//void snd_initialize_fade(Fade*, s32, s32, s16); //void snd_initialize_bgm_fade(Fade*, s32, s32, s16);
void func_80053A18(Fade*); void snd_clear_bgm_fade(Fade*);
void func_80053A28(UnkAl1*); void func_80053A28(UnkAl1*);
void func_80053A98(u8, u16, s32); void func_80053A98(u8, u16, s32);
void func_80053AEC(UnkAl1*, s16); void func_80053AEC(UnkAl1*, s16);

View File

@ -311,7 +311,7 @@ Script goomba_turn = SCRIPT({
UseIdleAnimation(ACTOR_SELF, 0); UseIdleAnimation(ACTOR_SELF, 0);
EnableIdleScript(ACTOR_SELF, 0); EnableIdleScript(ACTOR_SELF, 0);
SetTargetActor(ACTOR_SELF, 0); SetTargetActor(ACTOR_SELF, 0);
UseCamPreset(63); UseBattleCamPreset(63);
BattleCamTargetActor(ACTOR_SELF); BattleCamTargetActor(ACTOR_SELF);
0x8024ECF8(-1, 1, 0); 0x8024ECF8(-1, 1, 0);
SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, run));
@ -391,7 +391,7 @@ Script goomba_turn = SCRIPT({
JumpToGoal(ACTOR_SELF, 15, 0, 1, 0); JumpToGoal(ACTOR_SELF, 15, 0, 1, 0);
SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, dizzy)); SetAnimation(ACTOR_SELF, 1, NPC_ANIM(goomba, normal, dizzy));
sleep 5; sleep 5;
UseCamPreset(2); UseBattleCamPreset(2);
YieldTurn(); YieldTurn();
SetActorYaw(ACTOR_SELF, 180); SetActorYaw(ACTOR_SELF, 180);
AddActorDecoration(ACTOR_SELF, 1, 0, 2); AddActorDecoration(ACTOR_SELF, 1, 0, 2);
@ -440,7 +440,7 @@ Script goomba_turn = SCRIPT({
EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), 0, 0, 0, 1, 32); EnemyDamageTarget(ACTOR_SELF, SI_VAR(0), 0, 0, 0, 1, 32);
match SI_VAR(0) { match SI_VAR(0) {
0, 2 { 0, 2 {
UseCamPreset(2); UseBattleCamPreset(2);
SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0); SetActorScale(ACTOR_SELF, 1.1, 0.8, 1.0);
sleep 1; sleep 1;
SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0); SetActorScale(ACTOR_SELF, 1.0, 1.0, 1.0);

View File

@ -27,6 +27,6 @@ ApiStatus func_80218A60_43A4F0(ScriptInstance* script, s32 isInitialCall) {
s32 var1 = get_variable(script, *args++); s32 var1 = get_variable(script, *args++);
s32 var2 = get_variable(script, *args++); s32 var2 = get_variable(script, *args++);
fx_walk_large(2, var1, var2, get_variable(script, *args++), 0); fx_land(2, var1, var2, get_variable(script, *args++), 0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }

View File

@ -12,11 +12,11 @@ ApiStatus func_802189DC_447E1C(ScriptInstance* script, s32 isInitialCall) {
Bytecode* args = script->ptrReadPos; Bytecode* args = script->ptrReadPos;
f32 posX = get_float_variable(script, *args++); f32 posX = get_float_variable(script, *args++);
f32 posY = get_float_variable(script, *args++); f32 posY = get_float_variable(script, *args++);
HudElement* icon = create_icon(&D_80104A28); HudElement* icon = create_hud_element(&D_80104A28);
set_icon_render_pos(icon, posX, posY); set_hud_element_render_pos(icon, posX, posY);
set_hud_element_scale(icon, 1.5f); set_hud_element_scale(icon, 1.5f);
clear_icon_flags(icon, 0x200002); clear_hud_element_flags(icon, 0x200002);
set_variable(script, *args++, icon); set_variable(script, *args++, icon);
load_tattle_flags(0x8B); load_tattle_flags(0x8B);
return ApiStatus_DONE2; return ApiStatus_DONE2;

View File

@ -41,18 +41,18 @@ Script N(main) = SCRIPT({
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SOUND_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); CreateVirtualEntity(SI_VAR(10), N(modelCommandList));
$x = 1.0; $x = 1.0;
MultiplyByActorScale($x); MultiplyByActorScale($x);
func_802D38EC(SI_VAR(10), $x, $x, $x); SetVirtualEntityScale(SI_VAR(10), $x, $x, $x);
GetActorPos(ACTOR_PLAYER, $x, $y, $z); GetActorPos(ACTOR_PLAYER, $x, $y, $z);
SI_VAR(3) = 20; SI_VAR(3) = 20;
@ -62,7 +62,7 @@ Script N(main) = SCRIPT({
$x += SI_VAR(3); $x += SI_VAR(3);
$y += SI_VAR(4); $y += SI_VAR(4);
$z += SI_VAR(5); $z += SI_VAR(5);
func_802D36E0(SI_VAR(10), $x, $y, $z); SetVirtualEntityPosition(SI_VAR(10), $x, $y, $z);
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ACTOR_SELF); SetGoalToTarget(ACTOR_SELF);
@ -72,14 +72,14 @@ Script N(main) = SCRIPT({
$x = 0; $x = 0;
loop 18 { loop 18 {
$x += -60; $x += -60;
func_802D3840(SI_VAR(10), 0, 0, $x); SetVirtualEntityRotation(SI_VAR(10), 0, 0, $x);
sleep 1; sleep 1;
} }
} }
func_802D39FC(SI_VAR(10), 0.8); SetVirtualEntityJumpGravity(SI_VAR(10), 0.8);
$z += 5; $z += 5;
func_802D3C58(SI_VAR(10), $x, $y, $z, 18); VirtualEntityJumpTo(SI_VAR(10), $x, $y, $z, 18);
GetItemPower(ITEM_COCONUT, $damage, SI_VAR(4)); GetItemPower(ITEM_COCONUT, $damage, SI_VAR(4));
ApplyShrinkFromOwner($damage); ApplyShrinkFromOwner($damage);
@ -88,9 +88,9 @@ Script N(main) = SCRIPT({
// Bounce off // Bounce off
$x += 60; $x += 60;
$y += 0; $y += 0;
func_802D3C58(SI_VAR(10), $x, $y, $z, 16); VirtualEntityJumpTo(SI_VAR(10), $x, $y, $z, 16);
func_802D3624(SI_VAR(10)); DeleteVirtualEntity(SI_VAR(10));
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -13,7 +13,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 facingAngleSign = 0.0f; f32 facingAngleSign = 0.0f;
s32 sleepTime = 0; s32 sleepTime = 0;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 iconX; s32 iconX;
s32 iconY; s32 iconY;
s32 iconZ; s32 iconZ;
@ -39,8 +39,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconX, &iconY, &iconZ);
D_802A1E80 = create_icon(&D_80108A64); D_802A1E80 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1E80, iconX + 36, iconY - 63); set_hud_element_render_pos(D_802A1E80, iconX + 36, iconY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -52,8 +52,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
BattleStatus* battleStatus = &gBattleStatus; BattleStatus* battleStatus = &gBattleStatus;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(battleStatus->playerActor, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(battleStatus->playerActor, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E80); free_hud_element(D_802A1E80);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -62,7 +62,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
/// Provide arg `TRUE` on `SI_VAR(1)` to disable refunding. /// Provide arg `TRUE` on `SI_VAR(1)` to disable refunding.
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); // Nice UseBattleCamPreset(69); // Nice
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -110,7 +110,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -3,7 +3,7 @@
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = (const) ITEM_DIZZY_DIAL; SI_VAR(10) = (const) ITEM_DIZZY_DIAL;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(2); UseBattleCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
sleep 10; sleep 10;
spawn { spawn {
@ -26,7 +26,7 @@ Script N(main) = SCRIPT({
ShakeCam(1, 0, 2, 1.0); ShakeCam(1, 0, 2, 1.0);
ShakeCam(1, 0, 2, 0.5); ShakeCam(1, 0, 2, 0.5);
sleep 10; sleep 10;
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(10); MoveBattleCamOver(10);
func_8024ECF8(0, 0, 0); func_8024ECF8(0, 0, 0);
} }

View File

@ -12,7 +12,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -33,8 +33,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1CD4 = create_icon(&D_80108A64); D_802A1CD4 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1CD4, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1CD4, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -47,8 +47,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1CD4); free_hud_element(D_802A1CD4);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -72,7 +72,7 @@ ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall) {
script->functionTemp[2].s = 0; script->functionTemp[2].s = 0;
sfx_play_sound(0x2033); sfx_play_sound(0x2033);
camera->unk_1C = 0; camera->unk_1C = 0;
D_802A1CD0 = create_dynamic_entity_frontUI(NULL, func_802A123C_727B4C); D_802A1CD0 = create_generic_entity_frontUI(NULL, func_802A123C_727B4C);
script->functionTemp[0].s = 1; script->functionTemp[0].s = 1;
case 1: case 1:
camera->flags |= 8; camera->flags |= 8;
@ -85,7 +85,7 @@ ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall) {
} }
camera->unk_1C = 0; camera->unk_1C = 0;
camera->flags &= ~8; camera->flags &= ~8;
free_dynamic_entity(D_802A1CD0); free_generic_entity(D_802A1CD0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -94,7 +94,7 @@ ApiStatus N(func_802A1270_727B80)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -140,7 +140,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1A90 = create_icon(&D_80108A64); D_802A1A90 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1A90, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1A90, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1A90); free_hud_element(D_802A1A90);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -60,7 +60,7 @@ ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(0, a, b, c, d); playFX_40(0, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -77,7 +77,7 @@ ApiStatus N(func_802A12FC_71CFDC)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -123,7 +123,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -38,15 +38,15 @@ s32 N(modelCommandList)[] = {
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = (const) 0x86; SI_VAR(10) = (const) 0x86;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SOUND_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); CreateVirtualEntity(SI_VAR(10), N(modelCommandList));
SI_VAR(0) = 1.0; SI_VAR(0) = 1.0;
MultiplyByActorScale(SI_VAR(0)); MultiplyByActorScale(SI_VAR(0));
func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); SetVirtualEntityScale(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0));
GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20; SI_VAR(3) = 20;
SI_VAR(4) = 42; SI_VAR(4) = 42;
@ -55,7 +55,7 @@ Script N(main) = SCRIPT({
SI_VAR(0) += SI_VAR(3); SI_VAR(0) += SI_VAR(3);
SI_VAR(1) += SI_VAR(4); SI_VAR(1) += SI_VAR(4);
SI_VAR(2) += SI_VAR(5); SI_VAR(2) += SI_VAR(5);
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ACTOR_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
@ -63,19 +63,19 @@ Script N(main) = SCRIPT({
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
SI_VAR(0) += 0xFFFFFFC4; SI_VAR(0) += 0xFFFFFFC4;
func_802D3840(SI_VAR(10), 0, 0, SI_VAR(0)); SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0));
sleep 1; sleep 1;
} }
} }
func_802D39FC(SI_VAR(10), 0.80078125); SetVirtualEntityJumpGravity(SI_VAR(10), 0.80078125);
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
GetItemPower(ITEM_DUSTY_HAMMER, SI_VAR(3), SI_VAR(4)); GetItemPower(ITEM_DUSTY_HAMMER, SI_VAR(3), SI_VAR(4));
ApplyShrinkFromOwner(SI_VAR(3)); ApplyShrinkFromOwner(SI_VAR(3));
ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32); ItemDamageEnemy(SI_VAR(9), 0x18000000, 0, SI_VAR(3), 32);
SI_VAR(0) += 40; SI_VAR(0) += 40;
SI_VAR(1) += 10; SI_VAR(1) += 10;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 10); VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 10);
func_802D3624(SI_VAR(10)); DeleteVirtualEntity(SI_VAR(10));
await N(PlayerGoHome); await N(PlayerGoHome);
}); });

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1E80 = create_icon(&D_80108A64); D_802A1E80 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1E80, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1E80, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E80); free_hud_element(D_802A1E80);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -55,7 +55,7 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -101,7 +101,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -114,17 +114,17 @@ s32 N(modelCommandList)[] = {
Script N(main) = SCRIPT({ Script N(main) = SCRIPT({
SI_VAR(10) = (const) ITEM_EGG_MISSILE; SI_VAR(10) = (const) ITEM_EGG_MISSILE;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SOUND_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); CreateVirtualEntity(SI_VAR(10), N(modelCommandList));
GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 20; SI_VAR(0) += 20;
SI_VAR(1) += 42; SI_VAR(1) += 42;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ACTOR_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
@ -132,14 +132,14 @@ Script N(main) = SCRIPT({
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
SI_VAR(0) += 60; SI_VAR(0) += 60;
func_802D3840(SI_VAR(10), 0, 0, SI_VAR(0)); SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0));
sleep 1; sleep 1;
} }
} }
func_802D39FC(SI_VAR(10), 1.0); SetVirtualEntityJumpGravity(SI_VAR(10), 1.0);
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
func_802D3624(SI_VAR(10)); DeleteVirtualEntity(SI_VAR(10));
PlaySound(SOUND_UNKNOWN_2010); PlaySound(SOUND_UNKNOWN_2010);
N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A123C_71CF1C)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
spawn { spawn {

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A2890 = create_icon(&D_80108A64); D_802A2890 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A2890, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A2890, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A2890); free_hud_element(D_802A2890);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -59,15 +59,15 @@ ApiStatus N(func_802A123C_71CF1C)(ScriptInstance* script, s32 isInitialCall) {
s32 b = get_variable(script, *args++); s32 b = get_variable(script, *args++);
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
func_80070130(0, a, b, c); playFX_17(0, a, b, c);
func_800701F0(0, a, b + 20, c); playFX_19(0, a, b + 20, c);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -113,7 +113,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1D60 = create_icon(&D_80108A64); D_802A1D60 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1D60, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1D60, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1D60); free_hud_element(D_802A1D60);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -69,7 +69,7 @@ ApiStatus N(func_802A127C_73081C)(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(0, a, b, c, d); playFX_40(0, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -81,7 +81,7 @@ ApiStatus N(func_802A133C_7308DC)(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(1, a, b, c, d); playFX_40(1, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -134,7 +134,7 @@ ApiStatus N(func_802A14F0_730A90)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -180,7 +180,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -11,7 +11,7 @@ Script N(main) = SCRIPT({
SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
sleep 35; sleep 35;
UseCamPreset(2); UseBattleCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
sleep 10; sleep 10;
GetActorPos(ACTOR_PLAYER, SI_VAR(3), SI_VAR(4), SI_VAR(5)); GetActorPos(ACTOR_PLAYER, SI_VAR(3), SI_VAR(4), SI_VAR(5));
@ -39,7 +39,7 @@ Script N(main) = SCRIPT({
} }
} }
sleep 80; sleep 80;
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1D70 = create_icon(&D_80108A64); D_802A1D70 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1D70, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1D70, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1D70); free_hud_element(D_802A1D70);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -59,7 +59,7 @@ ApiStatus N(func_802A123C_716E9C)(ScriptInstance* script, s32 isInitialCall) {
s32 b = get_variable(script, *args++); s32 b = get_variable(script, *args++);
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
func_80071030(0, a, b, c, 0); playFX_3F(0, a, b, c, 0);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -84,7 +84,7 @@ ApiStatus N(func_802A1378_716FD8)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -130,7 +130,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -21,20 +21,20 @@ Script N(script6) = SCRIPT({
sleep 20; sleep 20;
SetAnimation(ACTOR_PLAYER, 0, ANIM_10002); SetAnimation(ACTOR_PLAYER, 0, ANIM_10002);
} }
func_802D3474(SI_VAR(10), 0x80283EE8); CreateVirtualEntity(SI_VAR(10), 0x80283EE8);
GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(0) += 0; SI_VAR(0) += 0;
SI_VAR(1) += 30; SI_VAR(1) += 30;
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
func_802D3F74(SI_VAR(10), 32); SetVirtualEntityFlags(SI_VAR(10), 32);
spawn { spawn {
GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 45; SI_VAR(1) += 45;
MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0); MakeItemEntity(SI_VAR(14), SI_VAR(0), SI_VAR(1), SI_VAR(2), 1, 0);
SI_VAR(14) = SI_VAR(0); SI_VAR(14) = SI_VAR(0);
loop 25 { loop 25 {
func_802D378C(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
N(func_802A123C_73330C)(SI_VAR(0), SI_VAR(1), SI_VAR(2)); N(func_802A123C_73330C)(SI_VAR(0), SI_VAR(1), SI_VAR(2));
sleep 1; sleep 1;
} }
@ -47,9 +47,9 @@ Script N(script6) = SCRIPT({
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);
MoveBattleCamOver(25); MoveBattleCamOver(25);
func_802D39FC(SI_VAR(10), 0.400390625); SetVirtualEntityJumpGravity(SI_VAR(10), 0.400390625);
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25); VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 25);
AddBattleCamZoom(100); AddBattleCamZoom(100);
MoveBattleCamOver(30); MoveBattleCamOver(30);
GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PARTNER, SI_VAR(0), SI_VAR(1), SI_VAR(2));

View File

@ -7,8 +7,8 @@
#undef NAMESPACE #undef NAMESPACE
#define NAMESPACE battle_item_food #define NAMESPACE battle_item_food
ApiStatus func_802D3F74(ScriptInstance* script, s32 isInitialCall); ApiStatus SetVirtualEntityFlags(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D378C(ScriptInstance* script, s32 isInitialCall); ApiStatus GetVirtualEntityPosition(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D7520(ScriptInstance* script, s32 isInitialCall);
ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall); ApiStatus func_802D75D8(ScriptInstance* script, s32 isInitialCall);

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A24D0 = create_icon(&D_80108A64); D_802A24D0 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A24D0, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A24D0, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A24D0); free_hud_element(D_802A24D0);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -98,7 +98,7 @@ ApiStatus N(func_802A1378_733448)(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(0, a, b, c, d); playFX_40(0, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -110,7 +110,7 @@ ApiStatus N(func_802A1438_733508)(ScriptInstance* script, s32 isInitialCall) {
s32 c = get_variable(script, *args++); s32 c = get_variable(script, *args++);
s32 d = get_variable(script, *args++); s32 d = get_variable(script, *args++);
func_80071090(1, a, b, c, d); playFX_40(1, a, b, c, d);
return ApiStatus_DONE2; return ApiStatus_DONE2;
} }
@ -145,7 +145,7 @@ ApiStatus N(func_802A15A0_733670)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -191,7 +191,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -6,7 +6,7 @@ Script N(main) = SCRIPT({
N(FadeBackgroundToBlack)(); N(FadeBackgroundToBlack)();
spawn { spawn {
sleep 5; sleep 5;
UseCamPreset(2); UseBattleCamPreset(2);
MoveBattleCamOver(50); MoveBattleCamOver(50);
} }
SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH); SetAnimation(ACTOR_PLAYER, 0, ANIM_CROUCH);
@ -31,7 +31,7 @@ Script N(main) = SCRIPT({
MoveBattleCamOver(2); MoveBattleCamOver(2);
sleep 2; sleep 2;
} }
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(20); MoveBattleCamOver(20);
InitTargetIterator(); InitTargetIterator();
0: 0:

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1CA0 = create_icon(&D_80108A64); D_802A1CA0 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1CA0, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1CA0, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1CA0); free_hud_element(D_802A1CA0);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -73,7 +73,7 @@ ApiStatus N(func_802A12D4_72BBE4)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -119,7 +119,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -12,7 +12,7 @@ Script N(main) = SCRIPT({
N(func_802A123C_72619C)(); N(func_802A123C_72619C)();
GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(1) += 20; SI_VAR(1) += 20;
UseCamPreset(13); UseBattleCamPreset(13);
BattleCamTargetActor(ACTOR_SELF); BattleCamTargetActor(ACTOR_SELF);
MoveBattleCamOver(20); MoveBattleCamOver(20);
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_369); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_369);
@ -72,7 +72,7 @@ Script N(main) = SCRIPT({
} }
sleep 10; sleep 10;
SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING); SetAnimation(ACTOR_PLAYER, 0, ANIM_RUNNING);
UseCamPreset(2); UseBattleCamPreset(2);
MoveBattleCamOver(20); MoveBattleCamOver(20);
sleep 20; sleep 20;
await N(PlayerGoHome); await N(PlayerGoHome);

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A1E70 = create_icon(&D_80108A64); D_802A1E70 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A1E70, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A1E70, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A1E70); free_hud_element(D_802A1E70);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -60,12 +60,12 @@ ApiStatus N(func_802A123C_72619C)(ScriptInstance* script, s32 isInitialCall) {
if (player->debuff != 0) { if (player->debuff != 0) {
player->debuffDuration = 0; player->debuffDuration = 0;
player->debuff = 0; player->debuff = 0;
func_80047898(player->unk_436); remove_status_1(player->unk_436);
} }
if (player->staticStatus != 0) { if (player->staticStatus != 0) {
player->staticDuration = 0; player->staticDuration = 0;
player->staticStatus = 0; player->staticStatus = 0;
func_800479A0(player->unk_436); remove_status_2(player->unk_436);
} }
if (player->stoneStatus != 0) { if (player->stoneStatus != 0) {
player->stoneDuration = 0; player->stoneDuration = 0;
@ -87,7 +87,7 @@ ApiStatus N(func_802A12C4_726224)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -133,7 +133,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

View File

@ -38,15 +38,15 @@ s32 N(modelCommandList)[] = {
Script script = SCRIPT({ Script script = SCRIPT({
SI_VAR(10) = (const) ITEM_INSECTICIDE_HERB; SI_VAR(10) = (const) ITEM_INSECTICIDE_HERB;
await N(UseItemWithEffect); await N(UseItemWithEffect);
UseCamPreset(3); UseBattleCamPreset(3);
MoveBattleCamOver(15); MoveBattleCamOver(15);
SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW); SetAnimation(ACTOR_PLAYER, 0, ANIM_THROW);
PlaySound(SOUND_THROW); PlaySound(SOUND_THROW);
sleep 3; sleep 3;
func_802D3474(SI_VAR(10), N(modelCommandList)); CreateVirtualEntity(SI_VAR(10), N(modelCommandList));
SI_VAR(0) = 1.0; SI_VAR(0) = 1.0;
MultiplyByActorScale(SI_VAR(0)); MultiplyByActorScale(SI_VAR(0));
func_802D38EC(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0)); SetVirtualEntityScale(SI_VAR(10), SI_VAR(0), SI_VAR(0), SI_VAR(0));
GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetActorPos(ACTOR_PLAYER, SI_VAR(0), SI_VAR(1), SI_VAR(2));
SI_VAR(3) = 20; SI_VAR(3) = 20;
SI_VAR(4) = 42; SI_VAR(4) = 42;
@ -55,7 +55,7 @@ Script script = SCRIPT({
SI_VAR(0) += SI_VAR(3); SI_VAR(0) += SI_VAR(3);
SI_VAR(1) += SI_VAR(4); SI_VAR(1) += SI_VAR(4);
SI_VAR(2) += SI_VAR(5); SI_VAR(2) += SI_VAR(5);
func_802D36E0(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2)); SetVirtualEntityPosition(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2));
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ACTOR_SELF); SetGoalToTarget(ACTOR_SELF);
GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2)); GetGoalPos(ACTOR_SELF, SI_VAR(0), SI_VAR(1), SI_VAR(2));
@ -63,13 +63,13 @@ Script script = SCRIPT({
SI_VAR(0) = 0; SI_VAR(0) = 0;
loop 18 { loop 18 {
SI_VAR(0) += 0xFFFFFFC4; SI_VAR(0) += 0xFFFFFFC4;
func_802D3840(SI_VAR(10), 0, 0, SI_VAR(0)); SetVirtualEntityRotation(SI_VAR(10), 0, 0, SI_VAR(0));
sleep 1; sleep 1;
} }
} }
func_802D39FC(SI_VAR(10), 0.80078125); SetVirtualEntityJumpGravity(SI_VAR(10), 0.80078125);
SI_VAR(2) += 5; SI_VAR(2) += 5;
func_802D3C58(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18); VirtualEntityJumpTo(SI_VAR(10), SI_VAR(0), SI_VAR(1), SI_VAR(2), 18);
PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
SI_VAR(0) -= 10; SI_VAR(0) -= 10;
PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0); PlayEffect(0x7, 3, SI_VAR(0), SI_VAR(1), SI_VAR(2), 0, 0, 0, 0, 0, 0, 0, 0, 0);
@ -85,7 +85,7 @@ Script script = SCRIPT({
InitTargetIterator(); InitTargetIterator();
SetGoalToTarget(ACTOR_SELF); SetGoalToTarget(ACTOR_SELF);
N(func_802A123C_72A98C)(); N(func_802A123C_72A98C)();
func_802D3624(SI_VAR(10)); DeleteVirtualEntity(SI_VAR(10));
if (SI_VAR(9) == 0) { if (SI_VAR(9) == 0) {
ItemDamageEnemy(SI_VAR(0), 0, 0, 0, 32); ItemDamageEnemy(SI_VAR(0), 0, 0, 0, 32);
} else { } else {

View File

@ -11,7 +11,7 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
f32 posX, posY, posZ; f32 posX, posY, posZ;
posY = player->currentPos.y + player->size.y; posY = player->currentPos.y + player->size.y;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
s32 i; s32 i;
s32 iconPosX, iconPosY, iconPosZ; s32 iconPosX, iconPosY, iconPosZ;
@ -32,8 +32,8 @@ ApiStatus N(GiveRefund)(ScriptInstance* script, s32 isInitialCall) {
posY = player->currentPos.y; posY = player->currentPos.y;
posZ = player->currentPos.z; posZ = player->currentPos.z;
get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ); get_screen_coords(gCurrentCameraID, posX, posY, posZ, &iconPosX, &iconPosY, &iconPosZ);
D_802A21C0 = create_icon(&D_80108A64); D_802A21C0 = create_hud_element(&D_80108A64);
set_icon_render_pos(D_802A21C0, iconPosX + 36, iconPosY - 63); set_hud_element_render_pos(D_802A21C0, iconPosX + 36, iconPosY - 63);
} }
script->varTable[0] = sleepTime; script->varTable[0] = sleepTime;
@ -46,8 +46,8 @@ ApiStatus N(GiveRefundCleanup)(ScriptInstance* script, s32 isInitialCall) {
Actor* player = battleStatus->playerActor; Actor* player = battleStatus->playerActor;
s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue; s32 sellValue = gItemTable[battleStatus->selectedItemID].sellValue;
if (heroes_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) { if (player_team_is_ability_active(player, ABILITY_REFUND) && sellValue > 0) {
free_icon(D_802A21C0); free_hud_element(D_802A21C0);
} }
return ApiStatus_DONE2; return ApiStatus_DONE2;
@ -89,7 +89,7 @@ ApiStatus N(func_802A12E0_72AA30)(ScriptInstance* script, s32 isInitialCall) {
a += rand_int(20) - 10; a += rand_int(20) - 10;
b += rand_int(10) - 5; b += rand_int(10) - 5;
effect = (struct N(temp)*)func_80072230(0, a, b, c, 1.0f, 30); effect = (struct N(temp)*)playFX_6F(0, a, b, c, 1.0f, 30);
effect->unk_0C->unk_18 = 0xF4; effect->unk_0C->unk_18 = 0xF4;
effect->unk_0C->unk_1C = 0xF4; effect->unk_0C->unk_1C = 0xF4;
@ -103,7 +103,7 @@ ApiStatus N(func_802A12E0_72AA30)(ScriptInstance* script, s32 isInitialCall) {
Script N(UseItemWithEffect) = SCRIPT({ Script N(UseItemWithEffect) = SCRIPT({
if (SI_VAR(1) == 0) { if (SI_VAR(1) == 0) {
UseCamPreset(69); UseBattleCamPreset(69);
sleep 10; sleep 10;
PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D); PlaySoundAtActor(ACTOR_PLAYER, SOUND_UNKNOWN_208D);
@ -149,7 +149,7 @@ Script N(UseItemWithEffect) = SCRIPT({
}); });
Script N(UseItem) = SCRIPT({ Script N(UseItem) = SCRIPT({
UseCamPreset(19); UseBattleCamPreset(19);
SetBattleCamTarget(-85, 1, 0); SetBattleCamTarget(-85, 1, 0);
SetBattleCamOffsetZ(41); SetBattleCamOffsetZ(41);
SetBattleCamZoom(248); SetBattleCamZoom(248);

Some files were not shown because too many files have changed in this diff Show More