From 4c3d4df97bb6c2a9d49fe5bfeb5b0da170bc3e2a Mon Sep 17 00:00:00 2001 From: "banjo.decomp" Date: Wed, 30 Oct 2024 19:51:58 -0500 Subject: [PATCH] rename `animctrl` to `anctrl` to match source debug string and tooie naming rename `rumbleManager` to `bamotor` --- decompressed.pal.yaml | 10 +- decompressed.us.v10.yaml | 10 +- include/core2/anctrl.h | 100 +++++++++++++ include/core2/animctrl.h | 100 ------------- include/core2/core2.h | 2 +- include/enums.h | 2 +- include/functions.h | 4 +- include/prop.h | 22 +-- src/BGS/ch/croctus.c | 8 +- src/BGS/ch/mudhut.c | 2 +- src/BGS/ch/pinkegg.c | 2 +- src/BGS/code_9750.c | 4 +- src/CCW/code_7BF0.c | 4 +- src/FP/ch/bearcub.c | 6 +- src/FP/ch/present.c | 2 +- src/FP/ch/twinkly.c | 10 +- src/FP/ch/twinklybox.c | 6 +- src/FP/ch/twinklymuncher.c | 4 +- src/FP/ch/wozza.c | 8 +- src/FP/ch/wozzasjig.c | 12 +- src/GV/ch/histup.c | 22 +-- src/GV/code_3630.c | 2 +- src/GV/code_3D90.c | 4 +- src/GV/code_4740.c | 14 +- src/GV/code_5570.c | 4 +- src/GV/code_6370.c | 6 +- src/GV/code_7060.c | 2 +- src/MM/ch/conga.c | 6 +- src/MM/ch/hut.c | 4 +- src/MMM/code_2F60.c | 4 +- src/MMM/code_DC0.c | 4 +- src/RBB/code_1570.c | 2 +- src/SM/ch/smbottles.c | 10 +- src/TTC/ch/blubber.c | 2 +- src/TTC/ch/clam.c | 16 +-- src/TTC/ch/lockup.c | 2 +- src/TTC/ch/nipper.c | 8 +- src/TTC/ch/treasure.c | 4 +- src/core1/{rumblemanager.c => bamotor.c} | 38 ++--- src/core1/code_0.c | 4 +- src/core1/code_8C50.c | 2 +- src/core2/{animctrl.c => anctrl.c} | 148 +++++++++---------- src/core2/anseq.c | 8 +- src/core2/ba/anim.c | 120 ++++++++-------- src/core2/ba/marker.c | 4 +- src/core2/bs/ant.c | 72 +++++----- src/core2/bs/bBarge.c | 30 ++-- src/core2/bs/bEggAss.c | 12 +- src/core2/bs/bEggHead.c | 18 +-- src/core2/bs/bFlap.c | 27 ++-- src/core2/bs/bFlip.c | 66 ++++----- src/core2/bs/bFly.c | 68 ++++----- src/core2/bs/bLongLeg.c | 124 ++++++++-------- src/core2/bs/bPeck.c | 34 ++--- src/core2/bs/bShock.c | 52 +++---- src/core2/bs/bSwim.c | 62 ++++---- src/core2/bs/bTrot.c | 128 ++++++++--------- src/core2/bs/bWhirl.c | 42 +++--- src/core2/bs/bbuster.c | 42 +++--- src/core2/bs/beeFly.c | 6 +- src/core2/bs/beeMain.c | 62 ++++---- src/core2/bs/carry.c | 18 +-- src/core2/bs/claw.c | 18 +-- src/core2/bs/climb.c | 2 +- src/core2/bs/croc.c | 90 ++++++------ src/core2/bs/crouch.c | 30 ++-- src/core2/bs/die.c | 30 ++-- src/core2/bs/dronegoto.c | 8 +- src/core2/bs/jig.c | 30 ++-- src/core2/bs/jump.c | 126 ++++++++-------- src/core2/bs/ow.c | 14 +- src/core2/bs/pumpkin.c | 94 ++++++------ src/core2/bs/rebound.c | 16 +-- src/core2/bs/rest.c | 30 ++-- src/core2/bs/slide.c | 10 +- src/core2/bs/splat.c | 12 +- src/core2/bs/stand.c | 126 ++++++++-------- src/core2/bs/surf.c | 10 +- src/core2/bs/swim.c | 58 ++++---- src/core2/bs/talk.c | 6 +- src/core2/bs/throw.c | 14 +- src/core2/bs/timeout.c | 14 +- src/core2/bs/turn.c | 16 +-- src/core2/bs/twirl.c | 22 +-- src/core2/bs/walk.c | 62 ++++---- src/core2/bs/walrus.c | 116 +++++++-------- src/core2/bs/washy.c | 2 +- src/core2/ch/bat.c | 6 +- src/core2/ch/beehive.c | 4 +- src/core2/ch/bigbutt.c | 20 +-- src/core2/ch/bottlesbonus.c | 4 +- src/core2/ch/bottlesbonuscursor.c | 8 +- src/core2/ch/crab.c | 6 +- src/core2/ch/gameSelect.c | 2 +- src/core2/ch/ghost.c | 2 +- src/core2/ch/gravestone.c | 14 +- src/core2/ch/icecube.c | 14 +- src/core2/ch/jigsawdance.c | 36 ++--- src/core2/ch/jinjo.c | 6 +- src/core2/ch/mole.c | 14 +- src/core2/ch/overlaynocontroller.c | 2 +- src/core2/ch/overlaypressstart.c | 2 +- src/core2/ch/shrapnel.c | 2 +- src/core2/ch/snacker.c | 4 +- src/core2/ch/snowman.c | 8 +- src/core2/ch/termite.c | 2 +- src/core2/code_13A00.c | 4 +- src/core2/code_14420.c | 28 ++-- src/core2/code_16010.c | 4 +- src/core2/code_34310.c | 4 +- src/core2/code_4A6F0.c | 2 +- src/core2/code_4C020.c | 6 +- src/core2/code_53C10.c | 14 +- src/core2/code_57C70.c | 4 +- src/core2/code_59780.c | 4 +- src/core2/code_9E370.c | 176 +++++++++++------------ src/core2/code_B9770.c | 18 +-- src/core2/code_CC1E0.c | 2 +- src/core2/code_DAAA0.c | 8 +- src/core2/fx/common3score.c | 16 +-- src/core2/gc/pauseMenu.c | 2 +- src/core2/gc/section.c | 2 +- src/core2/gc/transition.c | 44 +++--- src/core2/gc/zoombox.c | 46 +++--- src/cutscenes/code_0.c | 2 +- src/cutscenes/code_6730.c | 2 +- src/cutscenes/code_6C90.c | 2 +- src/fight/chbossjinjo.c | 10 +- src/fight/chfinalboss.c | 16 +-- src/fight/chjinjonator.c | 16 +-- src/fight/chstonejinjo.c | 4 +- src/lair/ch/cauldron.c | 2 +- src/lair/code_0.c | 2 +- src/lair/code_C1C0.c | 2 +- 134 files changed, 1588 insertions(+), 1587 deletions(-) create mode 100644 include/core2/anctrl.h delete mode 100644 include/core2/animctrl.h rename src/core1/{rumblemanager.c => bamotor.c} (73%) rename src/core2/{animctrl.c => anctrl.c} (62%) diff --git a/decompressed.pal.yaml b/decompressed.pal.yaml index aa9f4f2a..a54c3493 100644 --- a/decompressed.pal.yaml +++ b/decompressed.pal.yaml @@ -167,7 +167,7 @@ segments: - [0xF4B4C0, c, viewport] - [0xF4D3D0, c, pfsmanager] - [0xF4E490, c, code_11AC0] - - [0xF4F890, c, rumblemanager] + - [0xF4F890, c, bamotor] - [0xF50010, c, stub_13640] - [0xF50050, c, sprite] - [0xF500a0, c, overlaymanager] @@ -419,7 +419,7 @@ segments: - [0xF76A80, .rodata, viewport] - [0xF76B00, .rodata, pfsmanager] - [0xF77210, .rodata, code_11AC0] - - [0xF77220, .rodata, rumblemanager] + - [0xF77220, .rodata, bamotor] - [0xF77230, .rodata, overlaymanager] - [0xF772B0, .rodata, mlmtx] - [0xF772D0, .rodata, ml] @@ -469,7 +469,7 @@ segments: - [0xF791D0, .bss, viewport] - [0xF791D0, .bss, pfsmanager] - [0xF791D0, .bss, code_11AC0] - - [0xF791D0, .bss, rumblemanager] + - [0xF791D0, .bss, bamotor] - [0xF791D0, .bss, stub_13640] - [0xF791D0, .bss, overlaymanager] - [0xF791D0, .bss, mlmtx] @@ -503,7 +503,7 @@ segments: vram: 0x80286DB0 # via https://hack64.net/wiki/doku.php?id=player_kazooie:ram_map follows_vram: core1 subsegments: - - [0xF791D0, c, animctrl] + - [0xF791D0, c, anctrl] - [0xF79CA0, c, anim/sprite] - [0xF7A2B0, c, animcache] - [0xF7A720, c, code_1550] @@ -1121,7 +1121,7 @@ segments: # - [0x1041BB0, .data, code_DAAA0] # - [0x1041CB0, .data, code_DB010] # - [0x1042790, .data, code_DC4B0] - - [0x1066790, .rodata, animctrl] + - [0x1066790, .rodata, anctrl] - [0x10667C0, .rodata, anim/sprite] - [0x10667D0, .rodata, anseq] - [0x10667F0, .rodata, ba/anim] diff --git a/decompressed.us.v10.yaml b/decompressed.us.v10.yaml index 6050490a..888b6128 100644 --- a/decompressed.us.v10.yaml +++ b/decompressed.us.v10.yaml @@ -168,7 +168,7 @@ segments: - [0xF27D40, c, viewport] - [0xF29C50, c,pfsmanager] - [0xF2AD10, c, code_11AC0] - - [0xF2C160, c, rumblemanager] + - [0xF2C160, c, bamotor] - [0xF2C890, c, stub_13640] - [0xF2C8D0, c, sprite] - [0xF2C920, c, overlaymanager] @@ -421,7 +421,7 @@ segments: - [0xF53220, .rodata, viewport] - [0xF532A0, .rodata, pfsmanager] - [0xF539B0, .rodata, code_11AC0] - - [0xF539C0, .rodata, rumblemanager] + - [0xF539C0, .rodata, bamotor] - [0xF539D0, .rodata, overlaymanager] - [0xF53A50, .rodata, mlmtx] - [0xF53A70, .rodata, ml] @@ -470,7 +470,7 @@ segments: - [0xF55960, .bss, viewport] - [0xF55960, .bss, pfsmanager] - [0xF55960, .bss, code_11AC0] - - [0xF55960, .bss, rumblemanager] + - [0xF55960, .bss, bamotor] - [0xF55960, .bss, stub_13640] - [0xF55960, .bss, overlaymanager] - [0xF55960, .bss, mlmtx] @@ -504,7 +504,7 @@ segments: vram: 0x80286F90 # via https://hack64.net/wiki/doku.php?id=player_kazooie:ram_map follows_vram: core1 subsegments: - - [0xF55960, c, animctrl] + - [0xF55960, c, anctrl] - [0xF56430, c, anim/sprite] - [0xF56A40, c, animcache] - [0xF56EB0, c, code_1550] @@ -1120,7 +1120,7 @@ segments: - [0x1041BB0, .data, code_DAAA0] - [0x1041CB0, .data, code_DB010] - [0x1042790, .data, code_DC4B0] - - [0x10427C0, ".rodata", animctrl] + - [0x10427C0, ".rodata", anctrl] - [0x10427F0, .rodata, anim/sprite] - [0x1042800, .rodata, anseq] - [0x1042880, .rodata, ba/anim] diff --git a/include/core2/anctrl.h b/include/core2/anctrl.h new file mode 100644 index 00000000..adb352ed --- /dev/null +++ b/include/core2/anctrl.h @@ -0,0 +1,100 @@ +#ifndef __ANIM_CTRL_H__ +#define __ANIM_CTRL_H__ + +#include +#include "generic.h" + +#ifndef NONMATCHING +#define anctrl_start(this, file, line) _anctrl_start(this, file, line) +#else +#define anctrl_start(this, file, line) _anctrl_start(this, __FILE__, __LINE__) +#endif + +enum anctrl_playback_e{ + ANIMCTRL_ONCE = 1, + ANIMCTRL_LOOP = 2, + ANIMCTRL_STOPPED = 3, + ANIMCTRL_SUBRANGE_LOOP = 4 +}; + +typedef struct{ + MtxF mtx_0; + s32 size_40; + s32 capacity_44; + MtxF data[]; +}AnimMtxList; + +typedef struct animation_s{ + GenFunction_2 matrices; + s32 unk4; + u8 unk8; + u8 unk9; + s16 animcache_index[3]; + u32 index; + f32 timer; + f32 duration; + u8 reset; + u8 triple_buffer; + u8 unk1E; + u8 unk1F; +} Animation; + +typedef struct anctrl_s{ + Animation *animation; + f32 timer; + f32 subrange_start; + f32 subrange_end; + f32 animation_duration; + f32 transition_duration; + float start; + s32 index; + u8 playback_type; + u8 playback_direction; + u8 smooth_transition; + u8 unk23; + u8 unk24; + u8 default_start; + u8 pad26[2]; +} AnimCtrl; + +typedef struct actorAnimCtrl_s{ + AnimCtrl anctrl; + Animation animation; +} ActorAnimCtrl; + +AnimCtrl *anctrl_new(s32 arg0); +void anctrl_free(AnimCtrl * this); +void anctrl_update(AnimCtrl *this); +AnimCtrl *anctrl_defrag(AnimCtrl *this); +void anctrl_setIndex(AnimCtrl *this, enum asset_e index); +Animation *anctrl_getAnimPtr(AnimCtrl *this); +void func_8028746C(AnimCtrl *this, void (* arg1)(s32,s32)); +void func_8028748C(AnimCtrl *this, s32 arg1); +void anctrl_reset(AnimCtrl *this); +void __anctrl_gotoStart(AnimCtrl *this); +void _anctrl_start(AnimCtrl * this, char *file, s32 line); +void anctrl_setAnimTimer(AnimCtrl *this, f32 timer); +void anctrl_setPlaybackType(AnimCtrl *this, enum anctrl_playback_e arg1); +void anctrl_setDirection(AnimCtrl *this, s32 arg1); +void anctrl_setSmoothTransition(AnimCtrl *this, s32 arg1); +void anctrl_setDuration(AnimCtrl *this, f32 arg1); +void anctrl_setTransitionDuration(AnimCtrl *this, f32 arg1); +void anctrl_setSubRange(AnimCtrl *this, f32 start, f32 end); +void anctrl_getSubRange(AnimCtrl *this, f32 *startPtr, f32 *endPtr); +void anctrl_setStart(AnimCtrl *this, f32 arg1); +void func_80287784(AnimCtrl *this, s32 arg1); +enum asset_e anctrl_getIndex(AnimCtrl *this); +enum anctrl_playback_e anctrl_getPlaybackType(AnimCtrl *this); +s32 anctrl_isPlayedForwards(AnimCtrl *this); +s32 anctrl_isSmoothTransistion(AnimCtrl *this); +f32 anctrl_getDuration(AnimCtrl *this); +f32 anctrl_getTransistionDuration(AnimCtrl *this); +f32 anctrl_getAnimTimer(AnimCtrl *this); +f32 anctrl_getTimer(AnimCtrl *this); +void anctrl_setTimer(AnimCtrl *this, f32 arg1); +s32 anctrl_8028780C(f32 position[3], s32 arg1); +void anctrl_drawSetup(AnimCtrl *this, f32 *arg1, s32 arg2); +s32 anctrl_isStopped(AnimCtrl *this); +int anctrl_isAt(AnimCtrl *this, f32 arg1); +s32 anctrl_isContiguous(AnimCtrl *this); +#endif diff --git a/include/core2/animctrl.h b/include/core2/animctrl.h deleted file mode 100644 index e044933c..00000000 --- a/include/core2/animctrl.h +++ /dev/null @@ -1,100 +0,0 @@ -#ifndef __ANIM_CTRL_H__ -#define __ANIM_CTRL_H__ - -#include -#include "generic.h" - -#ifndef NONMATCHING -#define animctrl_start(this, file, line) _animctrl_start(this, file, line) -#else -#define animctrl_start(this, file, line) _animctrl_start(this, __FILE__, __LINE__) -#endif - -enum animctrl_playback_e{ - ANIMCTRL_ONCE = 1, - ANIMCTRL_LOOP = 2, - ANIMCTRL_STOPPED = 3, - ANIMCTRL_SUBRANGE_LOOP = 4 -}; - -typedef struct{ - MtxF mtx_0; - s32 size_40; - s32 capacity_44; - MtxF data[]; -}AnimMtxList; - -typedef struct animation_s{ - GenFunction_2 matrices; - s32 unk4; - u8 unk8; - u8 unk9; - s16 animcache_index[3]; - u32 index; - f32 timer; - f32 duration; - u8 reset; - u8 triple_buffer; - u8 unk1E; - u8 unk1F; -} Animation; - -typedef struct animctrl_s{ - Animation *animation; - f32 timer; - f32 subrange_start; - f32 subrange_end; - f32 animation_duration; - f32 transition_duration; - float start; - s32 index; - u8 playback_type; - u8 playback_direction; - u8 smooth_transition; - u8 unk23; - u8 unk24; - u8 default_start; - u8 pad26[2]; -} AnimCtrl; - -typedef struct actorAnimCtrl_s{ - AnimCtrl animctrl; - Animation animation; -} ActorAnimCtrl; - -AnimCtrl *animctrl_new(s32 arg0); -void animctrl_free(AnimCtrl * this); -void animctrl_update(AnimCtrl *this); -AnimCtrl *animctrl_defrag(AnimCtrl *this); -void animctrl_setIndex(AnimCtrl *this, enum asset_e index); -Animation *animctrl_getAnimPtr(AnimCtrl *this); -void func_8028746C(AnimCtrl *this, void (* arg1)(s32,s32)); -void func_8028748C(AnimCtrl *this, s32 arg1); -void animctrl_reset(AnimCtrl *this); -void __animctrl_gotoStart(AnimCtrl *this); -void _animctrl_start(AnimCtrl * this, char *file, s32 line); -void animctrl_setAnimTimer(AnimCtrl *this, f32 timer); -void animctrl_setPlaybackType(AnimCtrl *this, enum animctrl_playback_e arg1); -void animctrl_setDirection(AnimCtrl *this, s32 arg1); -void animctrl_setSmoothTransition(AnimCtrl *this, s32 arg1); -void animctrl_setDuration(AnimCtrl *this, f32 arg1); -void animctrl_setTransitionDuration(AnimCtrl *this, f32 arg1); -void animctrl_setSubRange(AnimCtrl *this, f32 start, f32 end); -void animctrl_getSubRange(AnimCtrl *this, f32 *startPtr, f32 *endPtr); -void animctrl_setStart(AnimCtrl *this, f32 arg1); -void func_80287784(AnimCtrl *this, s32 arg1); -enum asset_e animctrl_getIndex(AnimCtrl *this); -enum animctrl_playback_e animctrl_getPlaybackType(AnimCtrl *this); -s32 animctrl_isPlayedForwards(AnimCtrl *this); -s32 animctrl_isSmoothTransistion(AnimCtrl *this); -f32 animctrl_getDuration(AnimCtrl *this); -f32 animctrl_getTransistionDuration(AnimCtrl *this); -f32 animctrl_getAnimTimer(AnimCtrl *this); -f32 animctrl_getTimer(AnimCtrl *this); -void animctrl_setTimer(AnimCtrl *this, f32 arg1); -s32 animctrl_8028780C(f32 position[3], s32 arg1); -void animctrl_drawSetup(AnimCtrl *this, f32 *arg1, s32 arg2); -s32 animctrl_isStopped(AnimCtrl *this); -int animctrl_isAt(AnimCtrl *this, f32 arg1); -s32 animctrl_isContiguous(AnimCtrl *this); -#endif diff --git a/include/core2/core2.h b/include/core2/core2.h index d97b2744..c0954101 100644 --- a/include/core2/core2.h +++ b/include/core2/core2.h @@ -4,7 +4,7 @@ #include "core2/timedfunc.h" #include "gc/gc.h" #include "core2/code_6DA30.h" -#include "core2/animctrl.h" +#include "core2/anctrl.h" void func_80351A04(Struct68s *arg0, s32 arg1); void func_80351A14(Struct68s *arg0, Struct68DrawMethod arg1); diff --git a/include/enums.h b/include/enums.h index 65603e7d..37ae3c9b 100644 --- a/include/enums.h +++ b/include/enums.h @@ -2553,7 +2553,7 @@ enum item_e ITEM_2B_UNKNOWN = 0x2B //uses jiggy model }; -enum animctrl_direction_e +enum anctrl_direction_e { mvmt_dir_forwards = 1 }; diff --git a/include/functions.h b/include/functions.h index 6f8acaa8..5c3e73ab 100644 --- a/include/functions.h +++ b/include/functions.h @@ -214,7 +214,7 @@ void particleEmitter_setSpawnInterval(ParticleEmitter *, f32); OSContPad *func_8024F3F4(void); OSMesgQueue *pfsManager_getFrameReplyQ(void); -void rumbleManager_80250D94(f32, f32, f32); +void baMotor_80250D94(f32, f32, f32); void func_8025A6EC(enum comusic_e, s32); void comusic_playTrack(enum comusic_e); @@ -436,7 +436,7 @@ void timed_setStaticCameraToNode(f32, s32); void timed_exitStaticCamera(f32 time); int actor_animationIsAt(Actor*, f32); -void rumbleManager_80250E94(f32, f32, f32, f32, f32, f32); +void baMotor_80250E94(f32, f32, f32, f32, f32, f32); void bundle_setYaw(f32); diff --git a/include/prop.h b/include/prop.h index 27093012..7be30d1b 100644 --- a/include/prop.h +++ b/include/prop.h @@ -4,7 +4,7 @@ #include #include "structs.h" -#include "core2/animctrl.h" +#include "core2/anctrl.h" #include "core2/modelRender.h" #include "core2/skeletalanim.h" @@ -163,7 +163,7 @@ typedef struct actor_s{ u32 unk10_3:2; u32 unk10_1:1; u32 is_bundle:1; - AnimCtrl *animctrl; + AnimCtrl *anctrl; ActorAnimationInfo *unk18; TUPLE(f32, unk1C); // actor position? // used as "home" for chbat f32 actor_specific_1_f; //used in cheggs @@ -171,7 +171,7 @@ typedef struct actor_s{ u32 unk38_31:10; // hit count for jinjo base in fight u32 unk38_21:9; u32 unk38_13:9; - u32 stored_animctrl_playbackType_:3; //animctrlPlaybackType + u32 stored_anctrl_playbackType_:3; //anctrlPlaybackType u32 unk38_0:1; u32 unk3C; s32 unk40; @@ -186,8 +186,8 @@ typedef struct actor_s{ f32 unk4C; /* 0x50 */ f32 yaw; //0x50 f32 unk54; //0x54 - u32 animctrl_asset_id: 15; // animation asset id (enum asset_id) - u32 stored_animctrl_index: 14; //animctrlAnimIndex; + u32 anctrl_asset_id: 15; // animation asset id (enum asset_id) + u32 stored_anctrl_index: 14; //anctrlAnimIndex; u32 unk58_2: 1; u32 unk58_1: 1; u32 unk58_0: 1; @@ -201,8 +201,8 @@ typedef struct actor_s{ u32 unk78_31:9; u32 unk78_22:9; u32 unk78_13:12; //default_spawn_yaw? - u32 stored_animctrl_forwards:1; //animCtrlDirection - u32 stored_animctrl_smoothTransistion:1; //animCtrlSmoothTransition + u32 stored_anctrl_forwards:1; //animCtrlDirection + u32 stored_anctrl_smoothTransistion:1; //animCtrlSmoothTransition union { //DON'T DO THIS JUST DEFINE STATICLY IN ch/ FILE AND CAST FROM &Actor->local ActorLocal_BGS_6730 bgs_6730; @@ -217,8 +217,8 @@ typedef struct actor_s{ }; //u8 padAC[0x44]; - f32 stored_animctrl_timer; // animCtrlTimer - f32 stored_animctrl_duration; //animCtrlDuration + f32 stored_anctrl_timer; // animCtrlTimer + f32 stored_anctrl_duration; //animCtrlDuration u32 unkF4_31:1; u32 unkF4_30:1; // has something to do with vertices u32 unkF4_29:1; @@ -233,8 +233,8 @@ typedef struct actor_s{ u32 unkF4_8:9; /* jinjo id in final fight. * Is used to determine file progress related stuff, can also be a file_progress_e */ - f32 stored_animctrl_subrangeMin; //animCtrl_SubRangeStart - f32 stored_animctrl_subrangeMax; //animCtrl_SubRangeEnd + f32 stored_anctrl_subrangeMin; //animCtrl_SubRangeStart + f32 stored_anctrl_subrangeMax; //animCtrl_SubRangeEnd ActorMarker *unk100; // child actor marker ? ActorMarker *unk104; Struct62s *unk108; diff --git a/src/BGS/ch/croctus.c b/src/BGS/ch/croctus.c index d68623df..bfc26362 100644 --- a/src/BGS/ch/croctus.c +++ b/src/BGS/ch/croctus.c @@ -37,7 +37,7 @@ ActorInfo D_80390804 ={MARKER_FC_CROCTUS, ACTOR_1FA_CROCTUS, ASSET_425_MODEL_CRO /* .code */ void func_80387C90(Actor *arg0){ - animctrl_setDuration(arg0->animctrl, 0.4 + 0.9999999999999999 * ((f32)(5 - arg0->unkF4_8) * 0.25)); + anctrl_setDuration(arg0->anctrl, 0.4 + 0.9999999999999999 * ((f32)(5 - arg0->unkF4_8) * 0.25)); } void func_80387D18(ActorMarker * arg0, u32 arg1){ @@ -202,9 +202,9 @@ void func_80387FD4(Actor *this){ break; case 5:// L80388538 - func_80328748(this->animctrl, 0.79f, 0.97f); + func_80328748(this->anctrl, 0.79f, 0.97f); if( actor_animationIsAt(this, 0.84f) - && !animctrl_isPlayedForwards(this->animctrl) + && !anctrl_isPlayedForwards(this->anctrl) && func_802BB270() ){ func_8030E6A4(SFX_C8_CRUNCH, randf2(0.93f, 1.07f), 22000); @@ -212,7 +212,7 @@ void func_80387FD4(Actor *this){ break; case 6:// L803885B0 - func_80328748(this->animctrl, 0.79f, 0.97f); + func_80328748(this->anctrl, 0.79f, 0.97f); break; } diff --git a/src/BGS/ch/mudhut.c b/src/BGS/ch/mudhut.c index 4b4ef03c..c41488c1 100644 --- a/src/BGS/ch/mudhut.c +++ b/src/BGS/ch/mudhut.c @@ -122,7 +122,7 @@ void chmudhut_update(Actor *this){ break; case 2: this->marker->propPtr->unk8_3 = 0; - if(0.99 < animctrl_getAnimTimer(this->animctrl)){ + if(0.99 < anctrl_getAnimTimer(this->anctrl)){ this->state = 3; } break; diff --git a/src/BGS/ch/pinkegg.c b/src/BGS/ch/pinkegg.c index ed6b384c..749ba800 100644 --- a/src/BGS/ch/pinkegg.c +++ b/src/BGS/ch/pinkegg.c @@ -115,7 +115,7 @@ void chpinkegg_update(Actor *this){ } break; case 3: - if(animctrl_isStopped(this->animctrl)){ + if(anctrl_isStopped(this->anctrl)){ func_80326310(this); if(this->alpha_124_19 < 0x60){ this->depth_mode = 0x2; diff --git a/src/BGS/code_9750.c b/src/BGS/code_9750.c index 32acc1be..23c2b403 100644 --- a/src/BGS/code_9750.c +++ b/src/BGS/code_9750.c @@ -84,10 +84,10 @@ void func_8038FBF8(Actor *this){ marker_setCollisionScripts(this->marker, NULL, NULL, BGS_func_8038FB84); } if(this->state == 2){ - if(animctrl_isAt(this->animctrl, 0.65f)){ + if(anctrl_isAt(this->anctrl, 0.65f)){ func_8030E540(SFX_7C_CHEBOOF); } - if(animctrl_isStopped(this->animctrl)){ + if(anctrl_isStopped(this->anctrl)){ marker_despawn(this->marker); } } diff --git a/src/CCW/code_7BF0.c b/src/CCW/code_7BF0.c index 556f1237..ff9f4d97 100644 --- a/src/CCW/code_7BF0.c +++ b/src/CCW/code_7BF0.c @@ -61,8 +61,8 @@ void func_8038E0C8(Actor *this) { if (!this->volatile_initialized) { this->volatile_initialized = TRUE; - func_8028746C(this->animctrl, func_8038E060); - func_8028748C(this->animctrl, (s32) this->marker); + func_8028746C(this->anctrl, func_8038E060); + func_8028748C(this->anctrl, (s32) this->marker); this->marker->propPtr->unk8_3 = TRUE; this->unk1C[0] = 0.0f; this->unk38_31 = 0; diff --git a/src/FP/ch/bearcub.c b/src/FP/ch/bearcub.c index 003ba09a..fca9151b 100644 --- a/src/FP/ch/bearcub.c +++ b/src/FP/ch/bearcub.c @@ -100,19 +100,19 @@ void func_8038A384(Actor *this){ case MARKER_1FA_POLAR_BEAR_CUB_BLUE://L8038A404 this->unk1C[0] = 1.0f; this->unk1C[1] = 1.2f; - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); break; case MARKER_1FB_POLAR_BEAR_CUB_GREEN://L8038A438 this->unk1C[0] = 1.1f; this->unk1C[1] = 1.3f; - animctrl_setAnimTimer(this->animctrl, 0.4f); + anctrl_setAnimTimer(this->anctrl, 0.4f); break; case MARKER_1FC_POLAR_BEAR_CUB_RED://L8038A470 this->unk1C[0] = 1.2f; this->unk1C[1] = 1.4f; - animctrl_setAnimTimer(this->animctrl, 0.7f); + anctrl_setAnimTimer(this->anctrl, 0.7f); break; }//L8038A4A0 diff --git a/src/FP/ch/present.c b/src/FP/ch/present.c index 46cfd3e0..34cdcf69 100644 --- a/src/FP/ch/present.c +++ b/src/FP/ch/present.c @@ -50,7 +50,7 @@ void func_8038F144(Actor *this){ this->unk38_31 = FALSE; this->marker->collidable = FALSE; this->marker->propPtr->unk8_3 = TRUE; - animctrl_setAnimTimer(this->animctrl, randf()); + anctrl_setAnimTimer(this->anctrl, randf()); } } if (this) if (this); diff --git a/src/FP/ch/twinkly.c b/src/FP/ch/twinkly.c index 46e6ef85..a72a0aa7 100644 --- a/src/FP/ch/twinkly.c +++ b/src/FP/ch/twinkly.c @@ -182,7 +182,7 @@ void func_8038C428(Actor *arg0, f32 arg1[3], f32 arg2) temp_f0 = sp78; sp74 = (((arg1[1] + 40.0f) - arg0->position[1]) / temp_f0) - (((-3.2) * temp_f0) / 2.0); } - animctrl_setAnimTimer(arg0->animctrl, 0.0f);(arg0->animctrl, 0.0f); + anctrl_setAnimTimer(arg0->anctrl, 0.0f);(arg0->anctrl, 0.0f); temp_f0 = sp78; arg0->unk1C[0] = (f32) (0.99999 / temp_f0); arg0->velocity[1] = sp74; @@ -202,8 +202,8 @@ bool func_8038C718(Actor *this, f32 arg1){ this->position[0] += this->velocity[0]; this->position_y += (this->velocity_y += -3.2); this->position_z += this->velocity_z; - tmp = 0.9999 < animctrl_getAnimTimer(this->animctrl) + this->unk1C[0] ? 0.999999 : animctrl_getAnimTimer(this->animctrl) + this->unk1C[0]; - animctrl_setAnimTimer(this->animctrl, tmp); + tmp = 0.9999 < anctrl_getAnimTimer(this->anctrl) + this->unk1C[0] ? 0.999999 : anctrl_getAnimTimer(this->anctrl) + this->unk1C[0]; + anctrl_setAnimTimer(this->anctrl, tmp); if(arg1 == 0.0f) arg1 = mapModel_getFloorY(this->position); @@ -271,7 +271,7 @@ void func_8038C9A0(Actor *this){ this->velocity_y = 0.0f; this->velocity_z = 0.0f; this->unk1C[0] = 0.0f; - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); func_8038C428(this, D_8039207C, 0); return; } @@ -303,7 +303,7 @@ void func_8038C9A0(Actor *this){ func_8034DFB0(sp30, D_803920B0, D_803920A0, 0.14f); } - if(0.8 < animctrl_getAnimTimer(this->animctrl) || animctrl_getAnimTimer(this->animctrl) < 0.2){ + if(0.8 < anctrl_getAnimTimer(this->anctrl) || anctrl_getAnimTimer(this->anctrl) < 0.2){ this->unk38_31 = TRUE; } else{ diff --git a/src/FP/ch/twinklybox.c b/src/FP/ch/twinklybox.c index cb577b7e..42588153 100644 --- a/src/FP/ch/twinklybox.c +++ b/src/FP/ch/twinklybox.c @@ -330,8 +330,8 @@ void func_8038D6C8(Actor *this){ break; case 2: //L8038D91C - sp20 = animctrl_isPlayedForwards(this->animctrl); - animctrl_setDuration(this->animctrl, this->velocity[2]); + sp20 = anctrl_isPlayedForwards(this->anctrl); + anctrl_setDuration(this->anctrl, this->velocity[2]); if( ( sp20 == TRUE && actor_animationIsAt(this, 0.999f) ) || ( sp20 == FALSE && actor_animationIsAt(this, 0.001f) ) ){ @@ -406,7 +406,7 @@ void func_8038D6C8(Actor *this){ } - if(0.96 < animctrl_getAnimTimer(this->animctrl)){ + if(0.96 < anctrl_getAnimTimer(this->anctrl)){ if(this->lifetime_value <= 0.0){ __spawnQueue_add_1((GenFunction_1)func_8038D474, (s32)this->marker); this->lifetime_value = 2.9f; diff --git a/src/FP/ch/twinklymuncher.c b/src/FP/ch/twinklymuncher.c index 54bbbd2e..1d451fd2 100644 --- a/src/FP/ch/twinklymuncher.c +++ b/src/FP/ch/twinklymuncher.c @@ -106,7 +106,7 @@ void func_8038E094(Actor *this){ this->volatile_initialized = TRUE; marker_setCollisionScripts(this->marker, NULL, func_8038DEB8, NULL); this->marker->propPtr->unk8_3 = TRUE; - animctrl_setAnimTimer(this->animctrl, 0.99999f); + anctrl_setAnimTimer(this->anctrl, 0.99999f); this->lifetime_value = 0.0f; if(this->unkF4_8 == 1){ func_8038DDC8(this); @@ -147,7 +147,7 @@ void func_8038E094(Actor *this){ switch(this->state){ case 1: //L8038E2DC this->marker->propPtr->unk8_3 = FALSE; - animctrl_setAnimTimer(this->animctrl, 0.99f); + anctrl_setAnimTimer(this->anctrl, 0.99f); if(this->lifetime_value < 5.0){ this->lifetime_value += sp34; } diff --git a/src/FP/ch/wozza.c b/src/FP/ch/wozza.c index 03699977..91bd7458 100644 --- a/src/FP/ch/wozza.c +++ b/src/FP/ch/wozza.c @@ -132,7 +132,7 @@ void func_8038F598(Actor *this, f32 arg1){ bool func_8038F5D4(Actor *this, f32 arg1[3], f32 arg2, f32 arg3, s32 arg4){ f32 sp24; - sp24 = animctrl_getAnimTimer(this->animctrl); + sp24 = anctrl_getAnimTimer(this->anctrl); this->yaw_ideal = (f32) func_803297C8(this, arg1); func_80328FB0(this, arg3); if(actor_animationIsAt(this, 0.9f)){ @@ -236,7 +236,7 @@ void FP_func_8038F7AC(Actor *this){ func_8038F598(this, 1.0f); if( actor_animationIsAt(this, 0.38f) || actor_animationIsAt(this, 0.7f)){ if(randf() < 0.4) - animctrl_setDirection(this->animctrl, animctrl_isPlayedForwards(this->animctrl) ^ 1); + anctrl_setDirection(this->anctrl, anctrl_isPlayedForwards(this->anctrl) ^ 1); } break; @@ -259,7 +259,7 @@ void FP_func_8038F7AC(Actor *this){ case 5: //L8038FB50 FP_func_8038F6C4(this, local->unk18, 1.0f); - if(0.97 < animctrl_getAnimTimer(this->animctrl)){ + if(0.97 < anctrl_getAnimTimer(this->anctrl)){ subaddie_set_state_with_direction(this, 6, 0.02f, 1); actor_loopAnimation(this); } @@ -330,7 +330,7 @@ void FP_func_8038F7AC(Actor *this){ case 9: //L8038FE14 FP_func_8038F6C4(this, D_803925AC, 9.0f); - if(0.97 < animctrl_getAnimTimer(this->animctrl)){ + if(0.97 < anctrl_getAnimTimer(this->anctrl)){ subaddie_set_state_with_direction(this, 10, 0.02f, 1); actor_loopAnimation(this); } diff --git a/src/FP/ch/wozzasjig.c b/src/FP/ch/wozzasjig.c index 9a8ca293..403cca8d 100644 --- a/src/FP/ch/wozzasjig.c +++ b/src/FP/ch/wozzasjig.c @@ -55,11 +55,11 @@ void func_8038FF54(Actor *this){ actor_playAnimationOnce(this); } else{ - animctrl_setIndex(this->animctrl, animctrl_getIndex(other->animctrl)); - animctrl_setStart(this->animctrl, animctrl_getAnimTimer(other->animctrl)); - animctrl_setDuration(this->animctrl, animctrl_getDuration(other->animctrl)); - animctrl_setSmoothTransition(this->animctrl, FALSE); - animctrl_start(this->animctrl, "chwozzasjig.c", 0x87); + anctrl_setIndex(this->anctrl, anctrl_getIndex(other->anctrl)); + anctrl_setStart(this->anctrl, anctrl_getAnimTimer(other->anctrl)); + anctrl_setDuration(this->anctrl, anctrl_getDuration(other->anctrl)); + anctrl_setSmoothTransition(this->anctrl, FALSE); + anctrl_start(this->anctrl, "chwozzasjig.c", 0x87); this->position[0] = other->position[0]; this->position[1] = other->position[1]; this->position[2] = other->position[2]; @@ -69,7 +69,7 @@ void func_8038FF54(Actor *this){ }//L8039008C if(this->state == 9){ - if(0.99999 <= animctrl_getAnimTimer(this->animctrl)){ + if(0.99999 <= anctrl_getAnimTimer(this->anctrl)){ func_8034A174(this->marker->unk44, 5, sp40); sp40[0] = (f32)(s32)sp40[0]; sp40[1] = (f32)(s32)sp40[1]; diff --git a/src/GV/ch/histup.c b/src/GV/ch/histup.c index d2bf5556..12dab302 100644 --- a/src/GV/ch/histup.c +++ b/src/GV/ch/histup.c @@ -71,7 +71,7 @@ Actor *func_8038DA18(ActorMarker *this_marker, Gfx **gfx, Mtx **mtx, Vtx **vtx){ void GV_func_8038DB0C(Actor *this){ subaddie_set_state_with_direction(this, 1, 0.99f, 0); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_STOPPED); } void func_8038DB4C(s32 arg0){ @@ -113,7 +113,7 @@ void func_8038DBDC(Actor *this){ this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); subaddie_set_state_with_direction(this, 1, 0.99f, 0); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_STOPPED); GV_D_80391AB0.unk8 = 0; func_8038DB4C(0); this->unk1C[0] = 0.0f; @@ -121,8 +121,8 @@ void func_8038DBDC(Actor *this){ if(func_8038E178() != (s32)this->unk1C[0] || volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)){ if(15.0f <= this->lifetime_value){ subaddie_set_state_with_direction(this, 2, 0.01f, 1); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); - animctrl_setDuration(this->animctrl, 2.0f); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_ONCE); + anctrl_setDuration(this->anctrl, 2.0f); this->unk1C[0] = (f32)func_8038E178(); this->lifetime_value = 0.0f; } @@ -136,7 +136,7 @@ void func_8038DBDC(Actor *this){ func_8038DB88(this); if(GV_D_80391AB0.unk8){ subaddie_set_state_with_direction(this, 3, 0.99f, 0); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_STOPPED); this->unk1C[0] = 0.0f; } } @@ -159,8 +159,8 @@ void func_8038DBDC(Actor *this){ case 3: //8038DE44 if(!(this->unk38_31 < 0x21)){ subaddie_set_state_with_direction(this, 4, 0.01f, 1); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); - animctrl_setDuration(this->animctrl, 3.0f); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_ONCE); + anctrl_setDuration(this->anctrl, 3.0f); func_803865F8(); this->unk38_31 = 0; } @@ -171,8 +171,8 @@ void func_8038DBDC(Actor *this){ case 4: //8038DEBC if(actor_animationIsAt(this, 0.99f)){ subaddie_set_state_with_direction(this, 5, 0.01f, 1); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); - animctrl_setDuration(this->animctrl, 2.0f); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_LOOP); + anctrl_setDuration(this->anctrl, 2.0f); func_8038DB58(0); } else{ @@ -192,8 +192,8 @@ void func_8038DBDC(Actor *this){ case 5: //8038DFC8 if(func_8038DB64() == 0x127){ subaddie_set_state_with_direction(this, 6, 0.01f, 1); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); - animctrl_setDuration(this->animctrl, 1.6f); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_LOOP); + anctrl_setDuration(this->anctrl, 1.6f); func_80386608(); func_8038DB4C(0); GV_D_80391AB0.unk8 = FALSE; diff --git a/src/GV/code_3630.c b/src/GV/code_3630.c index 29c603dc..2cf8fb0b 100644 --- a/src/GV/code_3630.c +++ b/src/GV/code_3630.c @@ -59,7 +59,7 @@ void func_80389B1C(Actor *this){ this->initialized = TRUE; } - animctrl_setTransitionDuration(this->animctrl, 0.15f); + anctrl_setTransitionDuration(this->anctrl, 0.15f); if(this->state == 1 || this->state == 2){ if(! this->has_met_before && func_80329530(this, 250) && !func_80329530(this, 0x50)){ diff --git a/src/GV/code_3D90.c b/src/GV/code_3D90.c index 57a1ae16..8609b887 100644 --- a/src/GV/code_3D90.c +++ b/src/GV/code_3D90.c @@ -89,7 +89,7 @@ void func_8038A31C(Actor *this){ this->alpha_124_19 = 0xff; if(this->unk54 != 0.0f){ subaddie_set_state_with_direction(this, 2, 0.02f, 1); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_STOPPED); } break; case 2: //L8038A440 @@ -124,7 +124,7 @@ void func_8038A31C(Actor *this){ this->unk1C[0] = 1.0; if(45.0f <= this->velocity[0]){ subaddie_set_state_with_direction(this, 1, 0.02f, 1); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_LOOP); this->velocity[0] = 0.0f; } else{ diff --git a/src/GV/code_4740.c b/src/GV/code_4740.c index cebc4a72..b538e809 100644 --- a/src/GV/code_4740.c +++ b/src/GV/code_4740.c @@ -102,7 +102,7 @@ void func_8038ADFC(f32 pos[3], s32 cnt){ } void func_8038AF10(Actor *this){ - animctrl_setSmoothTransition(this->animctrl, TRUE); + anctrl_setSmoothTransition(this->anctrl, TRUE); subaddie_set_state_with_direction(this, 3, 0.00001f, 1); actor_loopAnimation(this); this->actor_specific_1_f = 16.0f; @@ -187,7 +187,7 @@ void func_8038B124(Actor *this){ && func_80329530(this, 0x320) && func_803292E0(this) ){ - animctrl_setSmoothTransition(this->animctrl, 0); + anctrl_setSmoothTransition(this->anctrl, 0); subaddie_set_state_with_direction(this, 2, 0.00001f, 1); actor_playAnimationOnce(this); this->yaw = (f32)func_80329784(this); @@ -201,14 +201,14 @@ void func_8038B124(Actor *this){ func_80328FB0(this, 18.0f); this->actor_specific_1_f = 18.0f; func_80329030(this, 0); - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); } break; case 2: //L8038B430 func_8030E2C4(this->unk44_31); - if(0.98 < animctrl_getAnimTimer(this->animctrl)){ + if(0.98 < anctrl_getAnimTimer(this->anctrl)){ func_8038AF10(this); } else{ @@ -267,7 +267,7 @@ void func_8038B124(Actor *this){ func_802BB3DC(0, 18.0f, 0.92f); func_8030E878(SFX_3_DULL_CANNON_SHOT, 1.0f, 32000, this->position, 2250.0f, 4500.0f); }//L8038B734 - if(0.98 < animctrl_getAnimTimer(this->animctrl)){ + if(0.98 < anctrl_getAnimTimer(this->anctrl)){ subaddie_set_state_with_direction(this, 6, 0.99f, 0); actor_playAnimationOnce(this); this->lifetime_value = 0.0f; @@ -287,13 +287,13 @@ void func_8038B124(Actor *this){ break; case 7: //L8038B7EC - if(0.98 < animctrl_getAnimTimer(this->animctrl)){ + if(0.98 < anctrl_getAnimTimer(this->anctrl)){ func_8038AF10(this); } break; case 8: //L8038B820 - if(0.98 < animctrl_getAnimTimer(this->animctrl)){ + if(0.98 < anctrl_getAnimTimer(this->anctrl)){ subaddie_set_state_with_direction(this, 1, 0.00001f, 1); this->unk1C[0] = 0.0f; this->unk1C[1] = 2.0f; diff --git a/src/GV/code_5570.c b/src/GV/code_5570.c index 1b374d10..1270de5a 100644 --- a/src/GV/code_5570.c +++ b/src/GV/code_5570.c @@ -216,7 +216,7 @@ void GV_func_8038BEA0(Actor *this){ } } else{ - if(animctrl_getAnimTimer(this->animctrl) < 0.55){ + if(anctrl_getAnimTimer(this->anctrl) < 0.55){ func_8030E2C4(this->unk44_31); if(randf() < 0.6){ func_8038BC7C(this->position, 0xA); @@ -262,7 +262,7 @@ void GV_func_8038BEA0(Actor *this){ D_80391A80 = this->state; } else{ - if(0.35 < animctrl_getAnimTimer(this->animctrl)){ + if(0.35 < anctrl_getAnimTimer(this->anctrl)){ func_8030E2C4(this->unk44_31); if(randf() < 0.6){ func_8038BC7C(this->position, 5); diff --git a/src/GV/code_6370.c b/src/GV/code_6370.c index 0894465c..3a11efbe 100644 --- a/src/GV/code_6370.c +++ b/src/GV/code_6370.c @@ -94,7 +94,7 @@ void func_8038C8A0(Actor *this, s32 next_state){ local->unk18[1] = this->position_y; local->unk18[2] = this->position_z; if(this->state == 1){ - rumbleManager_80250E94(0.0f, 0.6f, 1.0f, 0, 1.3f, 0.0f); + baMotor_80250E94(0.0f, 0.6f, 1.0f, 0, 1.3f, 0.0f); timed_playSfx(1.0f, SFX_3F6_RUBBING, 0.8f, 30000); } }//L8038CA6C @@ -125,13 +125,13 @@ void func_8038C8A0(Actor *this, s32 next_state){ local->unk18[0] = this->position_x; local->unk18[1] = this->position_y; local->unk18[2] = this->position_z; - rumbleManager_80250D94(0.7f, 0.5f, 1.3f); + baMotor_80250D94(0.7f, 0.5f, 1.3f); FUNC_8030E624(SFX_3F6_RUBBING, 0.8f, 30000); } if(next_state == 8){ if(this->state == 7){ - rumbleManager_80250D94(0.8f, 0.7f, 3.0f); + baMotor_80250D94(0.8f, 0.7f, 3.0f); func_8038C760(this, *local->unk8 + 1); } marker_despawn(this->marker); diff --git a/src/GV/code_7060.c b/src/GV/code_7060.c index 5c928be5..3ca0cb77 100644 --- a/src/GV/code_7060.c +++ b/src/GV/code_7060.c @@ -31,7 +31,7 @@ void func_8038D47C(Actor *this){ NodeProp *tmp_v0; this->marker->propPtr->unk8_3 = TRUE; actor_collisionOff(this); - func_80287784(this->animctrl, 0); + func_80287784(this->anctrl, 0); if(!this->initialized){ if(!nodeProp_findPositionFromActorId(0x331, this->spawn_position)){ this->spawn_position_x = -2569.0f; diff --git a/src/MM/ch/conga.c b/src/MM/ch/conga.c index b04cef54..88bd2b6f 100644 --- a/src/MM/ch/conga.c +++ b/src/MM/ch/conga.c @@ -268,7 +268,7 @@ void func_803876D0(Actor *this){ __chConga_playRandomNoise(); if(actor_animationIsAt(this, 0.0f) || actor_animationIsAt(this, 0.45f)){ if(randf() < 0.2){ - animctrl_setDirection(this->animctrl, animctrl_isPlayedForwards(this->animctrl)?0:1); + anctrl_setDirection(this->anctrl, anctrl_isPlayedForwards(this->anctrl)?0:1); }; }//L80387A18 if(actor_animationIsAt(this, 0.66f)){ @@ -296,12 +296,12 @@ void func_803876D0(Actor *this){ ((ActorLocal_Conga *)&this->local)->unkC = 1; actor_playAnimationOnce(this); __chConga_playRandomNoise(); - if( animctrl_isPlayedForwards(this->animctrl) == TRUE + if( anctrl_isPlayedForwards(this->anctrl) == TRUE && actor_animationIsAt(this, 0.0f) ){ subaddie_set_state_with_direction(this, 5, 0.0f, 1); } - else if( !animctrl_isPlayedForwards(this->animctrl) + else if( !anctrl_isPlayedForwards(this->anctrl) && actor_animationIsAt(this, 0.001f) ){ subaddie_set_state_with_direction(this, 1, 0.76f, 1); diff --git a/src/MM/ch/hut.c b/src/MM/ch/hut.c index 6a9dd8d4..9e0876a0 100644 --- a/src/MM/ch/hut.c +++ b/src/MM/ch/hut.c @@ -106,8 +106,8 @@ void chhut_update(Actor *this) { break; case HUT_STATE_1_DAMAGED: - if (animctrl_getAnimTimer(this->animctrl) > 0.99) { - animctrl_setTransitionDuration(this->animctrl, 0.0f); + if (anctrl_getAnimTimer(this->anctrl) > 0.99) { + anctrl_setTransitionDuration(this->anctrl, 0.0f); subaddie_set_state(this, HUT_STATE_2_DESTROYED); this->position_y -= 160.0f; } diff --git a/src/MMM/code_2F60.c b/src/MMM/code_2F60.c index cad28d33..3bf536c3 100644 --- a/src/MMM/code_2F60.c +++ b/src/MMM/code_2F60.c @@ -77,7 +77,7 @@ void chPortrait_update(Actor *this) { switch (this->state) { case PORTRAIT_STATE_1_IDLE: - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); break; case PORTRAIT_STATE_2_BROKEN: @@ -95,7 +95,7 @@ void chPortrait_break(ActorMarker *marker, f32 anim_duration) { subaddie_set_state_with_direction(this, PORTRAIT_STATE_2_BROKEN, 0.001f, 1); actor_playAnimationOnce(this); - animctrl_setDuration(this->animctrl, anim_duration); + anctrl_setDuration(this->anctrl, anim_duration); this->unk38_31 = 1; FUNC_8030E8B4(SFX_129_SWOOSH, 1.0f, 32000, this->position, 1000, 2000); } diff --git a/src/MMM/code_DC0.c b/src/MMM/code_DC0.c index 3be7ee55..dc038274 100644 --- a/src/MMM/code_DC0.c +++ b/src/MMM/code_DC0.c @@ -61,7 +61,7 @@ void chFlowerpot_update(Actor *this) { switch (this->state) { case FLOWER_POT_STATE_1_IDLE: - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_STOPPED); break; case FLOWER_POT_STATE_2_FLOWERED: @@ -82,7 +82,7 @@ bool chFlowerpot_eggCollision(ActorMarker *marker) { } subaddie_set_state(actor, FLOWER_POT_STATE_2_FLOWERED); - animctrl_setPlaybackType(actor->animctrl, ANIMCTRL_ONCE); + anctrl_setPlaybackType(actor->anctrl, ANIMCTRL_ONCE); remaining = chFlowerpot_getRemaining(); if (remaining != 0) { diff --git a/src/RBB/code_1570.c b/src/RBB/code_1570.c index 5b0d86d6..c2cf1ad9 100644 --- a/src/RBB/code_1570.c +++ b/src/RBB/code_1570.c @@ -165,7 +165,7 @@ void RBB_func_80387F18(ActorMarker *marker, s32 arg1){ } void RBB_func_80387F44(void){ - rumbleManager_80250E94(0.5f, 1.0f, 1.5f, 0.0f, 1.0f, 1.5f); + baMotor_80250E94(0.5f, 1.0f, 1.5f, 0.0f, 1.0f, 1.5f); } void func_80387F88(ActorMarker *marker){ diff --git a/src/SM/ch/smbottles.c b/src/SM/ch/smbottles.c index 7532044e..5976a41c 100644 --- a/src/SM/ch/smbottles.c +++ b/src/SM/ch/smbottles.c @@ -168,7 +168,7 @@ void __chSmBottles_setState(Actor *this, s32 next_state) { break; case SM_BOTTLES_STATE_1_UNKNOWN: - animctrl_setSmoothTransition(this->animctrl, 0); + anctrl_setSmoothTransition(this->anctrl, 0); break; case SM_BOTTLES_STATE_5_UNKNOWN: @@ -189,7 +189,7 @@ void __chSmBottles_setState(Actor *this, s32 next_state) { subaddie_set_state_with_direction(other, 2, 0.0001f, 1); } - animctrl_setSmoothTransition(this->animctrl, 1); + anctrl_setSmoothTransition(this->anctrl, 1); actor_playAnimationOnce(this); this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex(); @@ -536,7 +536,7 @@ void chSmBottles_update(Actor *this) { this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); - if (0.0 < animctrl_getAnimTimer(this->animctrl) && animctrl_getAnimTimer(this->animctrl) < 0.16) { + if (0.0 < anctrl_getAnimTimer(this->anctrl) && anctrl_getAnimTimer(this->anctrl) < 0.16) { func_8030E2C4(this->unk44_31); }//L80389EA0 @@ -571,7 +571,7 @@ void chSmBottles_update(Actor *this) { actor_animationIsAt(this, 0.66f) || actor_animationIsAt(this, 0.85f)) && randf() < 0.2 ) { - animctrl_setDirection(this->animctrl, animctrl_isPlayedForwards(this->animctrl) ^ 1); + anctrl_setDirection(this->anctrl, anctrl_isPlayedForwards(this->anctrl) ^ 1); }//L8038A088 else if (actor_animationIsAt(this, 0.25f) || actor_animationIsAt(this, 0.28f) || @@ -626,7 +626,7 @@ void chSmBottles_update(Actor *this) { break; case SM_BOTTLES_STATE_4_UNKNOWN: //L8038A31C - if (0.35 < animctrl_getAnimTimer(this->animctrl) && animctrl_getAnimTimer(this->animctrl) < 0.9) { + if (0.35 < anctrl_getAnimTimer(this->anctrl) && anctrl_getAnimTimer(this->anctrl) < 0.9) { func_8030E2C4(this->unk44_31); } else if (actor_animationIsAt(this, 0.9999f)) { //L8038A378 diff --git a/src/TTC/ch/blubber.c b/src/TTC/ch/blubber.c index 2bccad31..3bc6c00b 100644 --- a/src/TTC/ch/blubber.c +++ b/src/TTC/ch/blubber.c @@ -48,7 +48,7 @@ ActorInfo gChBlubber = { static void __chBlubber_initiliaze(Actor *this){ ActorLocal_Blubber *local = (ActorLocal_Blubber *)&this->local; - animctrl_setTransitionDuration(this->animctrl, 0.2f); + anctrl_setTransitionDuration(this->anctrl, 0.2f); this->initialized = TRUE; local->gold_bullion_throw_target_node_prop = nodeprop_findByActorIdAndActorPosition(ACTOR_2B_GOLD_BULLION_THROW_TARGET, this); if(local->gold_bullion_throw_target_node_prop){ diff --git a/src/TTC/ch/clam.c b/src/TTC/ch/clam.c index 869f5e80..aa557f30 100644 --- a/src/TTC/ch/clam.c +++ b/src/TTC/ch/clam.c @@ -36,7 +36,7 @@ static void __chClam_playSfx(enum sfx_e sfx_id, f32 volume, s32 sampleRate, f32 static void __chClam_func_80386454(Actor *this){ subaddie_set_state_with_direction(this, 1, 0.01f, 1); actor_loopAnimation(this); - animctrl_setDuration(this->animctrl, randf2(1.9f, 2.1f)); + anctrl_setDuration(this->anctrl, randf2(1.9f, 2.1f)); } static bool __chClam_updateFuncTarget(Actor *this, f32 arg1) { @@ -97,10 +97,10 @@ static bool __chClam_rotateTowardTarget(Actor *this, s32 arg1) { if(this->unk10_25 == 0) return FALSE; - animctrl_setDuration(this->animctrl, 1.0f); + anctrl_setDuration(this->anctrl, 1.0f); sp2C = (s32) ((f64) (60.0f / (f32) func_8033DD90()) * 0.5); if ((this->unk1C[0] != 0.0f) || !__chClam_updateFuncTarget(this, sp2C)) { - if (((f64) animctrl_getAnimTimer(this->animctrl) < 0.1) && ((f64) randf() < 0.5)) { + if (((f64) anctrl_getAnimTimer(this->anctrl) < 0.1) && ((f64) randf() < 0.5)) { if (this->unk1C[0] != 0.0f) { arg1 *= 2; this->actor_specific_1_f = (f32) randi2(0, 0.5*(volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE) ? 0 : 0x11)); @@ -265,7 +265,7 @@ static void __chClam_updateFunc(Actor *this){ if(!this->initialized){ this->initialized = TRUE; - animctrl_setDuration(this->animctrl, 2.0f); + anctrl_setDuration(this->anctrl, 2.0f); } if(!this->volatile_initialized){ @@ -286,7 +286,7 @@ static void __chClam_updateFunc(Actor *this){ subaddie_set_state_with_direction(this, 3, 0.01f, 1); actor_loopAnimation(this); this->velocity_x = 0.0f; - animctrl_setDuration(this->animctrl, 0.6f); + anctrl_setDuration(this->anctrl, 0.6f); marker_despawn(sp4C->marker); } } @@ -297,11 +297,11 @@ static void __chClam_updateFunc(Actor *this){ if(__chClam_rotateTowardTarget(this, 140)){ subaddie_set_state_with_direction(this, 2, 0.01f, 1); actor_playAnimationOnce(this); - animctrl_setDuration(this->animctrl, 1.0f); + anctrl_setDuration(this->anctrl, 1.0f); __chClam_playSfx(SFX_3F2_UNKNOWN, randf2(1.0f, 1.1f), 22000, this->position, 1500.0f, 2000.0f); } else{ - animctrl_setDuration(this->animctrl, 2.0f); + anctrl_setDuration(this->anctrl, 2.0f); } break; @@ -314,7 +314,7 @@ static void __chClam_updateFunc(Actor *this){ if(this->position_y <= sp48){ this->position_y = sp48; - if(actor_animationIsAt(this, 0.99f) || 0.98 < animctrl_getAnimTimer(this->animctrl)){ + if(actor_animationIsAt(this, 0.99f) || 0.98 < anctrl_getAnimTimer(this->anctrl)){ __chClam_func_80386454(this); } } diff --git a/src/TTC/ch/lockup.c b/src/TTC/ch/lockup.c index 99ff2b22..4a4ac489 100644 --- a/src/TTC/ch/lockup.c +++ b/src/TTC/ch/lockup.c @@ -127,7 +127,7 @@ static void __chLockup_updateFunc(Actor *this){ if(actor_animationIsAt(this, 0.5f)){ subaddie_set_state_with_direction(this, CH_LOCKUP_STATE_OPEN, 0.5f, 1); } - if(0.15 < animctrl_getAnimTimer(this->animctrl)){ + if(0.15 < anctrl_getAnimTimer(this->anctrl)){ this->marker->collidable = TRUE; } break; diff --git a/src/TTC/ch/nipper.c b/src/TTC/ch/nipper.c index 9a4ee99a..5b9bf95a 100644 --- a/src/TTC/ch/nipper.c +++ b/src/TTC/ch/nipper.c @@ -77,15 +77,15 @@ static void __chNipper_setAnimationDuration(Actor *this) { this->unk1C[0] = 0.0f; switch((s32)this->lifetime_value){ case 120: - animctrl_setDuration(this->animctrl, 1.2f); + anctrl_setDuration(this->anctrl, 1.2f); break; case 80: - animctrl_setDuration(this->animctrl, 1.05f); + anctrl_setDuration(this->anctrl, 1.05f); break; case 40: - animctrl_setDuration(this->animctrl, 0.9f); + anctrl_setDuration(this->anctrl, 0.9f); break; } } @@ -227,7 +227,7 @@ static void __chNipper_updateFunc(Actor *this){ switch(this->state){ case CH_NIPPER_STATE_1_UNKNOWN: if(!this->initialized){ - animctrl_setTransitionDuration(this->animctrl, 0.35f); + anctrl_setTransitionDuration(this->anctrl, 0.35f); subaddie_set_state_with_direction(this, CH_NIPPER_STATE_1_UNKNOWN, 0.01f, 1); this->lifetime_value = 120.0f; this->marker->propPtr->unk8_3 = TRUE; diff --git a/src/TTC/ch/treasure.c b/src/TTC/ch/treasure.c index aece984e..79ba60dc 100644 --- a/src/TTC/ch/treasure.c +++ b/src/TTC/ch/treasure.c @@ -73,8 +73,8 @@ static void __chTreasure_updateFunc(Actor *this){ switch(this->state){ case 1://L8038C29C - this->unk5C = animctrl_getAnimTimer(this->animctrl) *300.0; //radius of 300.0f - if(animctrl_isStopped(this->animctrl)){ + this->unk5C = anctrl_getAnimTimer(this->anctrl) *300.0; //radius of 300.0f + if(anctrl_isStopped(this->anctrl)){ actor_loopAnimation(this); subaddie_set_state_forward(this, 2); this->marker->propPtr->unk8_3 = 1; diff --git a/src/core1/rumblemanager.c b/src/core1/bamotor.c similarity index 73% rename from src/core1/rumblemanager.c rename to src/core1/bamotor.c index 34e76908..c109ab77 100644 --- a/src/core1/rumblemanager.c +++ b/src/core1/bamotor.c @@ -23,9 +23,9 @@ OSThread sRumbleThread; u8 sRumbleThreadStack[RUMBLE_THREAD_STACK_SIZE]; /* .code */ -void rumbleManager_80250D94(f32, f32, f32); +void baMotor_80250D94(f32, f32, f32); -void __rumbleManager_startRumble(void){ +void __baMotor_startRumble(void){ u32 motor_status; if(D_802823B0){ @@ -36,7 +36,7 @@ void __rumbleManager_startRumble(void){ } } -void __rumbleManager_stopRumble(void){ +void __baMotor_stopRumble(void){ u32 motor_status; if(D_802823B0){ @@ -90,27 +90,27 @@ void rumbleThread_entry(void *arg) { if (rumble_state != prev_state) { if (rumble_state) { - __rumbleManager_startRumble(); //start_motor + __baMotor_startRumble(); //start_motor } else{ - __rumbleManager_stopRumble(); //stop_motor + __baMotor_stopRumble(); //stop_motor } } }while(1); } -void __rumbleManager_80250BA4(s32 arg0, s32 arg1, s32 arg2){ +void __baMotor_80250BA4(s32 arg0, s32 arg1, s32 arg2){ f64 f0 = 524288.0; - rumbleManager_80250D94(arg0/f0, arg1/f0, arg2/f0); + baMotor_80250D94(arg0/f0, arg1/f0, arg2/f0); } -void rumbleManager_80250C08(void) { +void baMotor_80250C08(void) { if (D_802823AC != 0) { D_80282424 = MIN(D_80282420, D_80282424 + time_getDelta()); } } -void rumbleManager_init(void) { +void baMotor_init(void) { s32 pfs_status; func_8024F35C(4); @@ -130,9 +130,9 @@ void rumbleManager_init(void) { } } -void __rumbleManager_80250D8C(void){} +void __baMotor_80250D8C(void){} -void rumbleManager_80250D94(f32 arg0, f32 arg1, f32 arg2){ +void baMotor_80250D94(f32 arg0, f32 arg1, f32 arg2){ f32 f4; if(arg2 != 0.0f && D_802823AC){ if(func_802E4A08() == 0){ @@ -146,20 +146,20 @@ void rumbleManager_80250D94(f32 arg0, f32 arg1, f32 arg2){ } } -void rumbleManager_80250E6C(f32 arg0, f32 arg1){ - rumbleManager_80250D94(arg0, arg0, arg1); +void baMotor_80250E6C(f32 arg0, f32 arg1){ + baMotor_80250D94(arg0, arg0, arg1); } -void rumbleManager_80250E94(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5){ +void baMotor_80250E94(f32 arg0, f32 arg1, f32 arg2, f32 arg3, f32 arg4, f32 arg5){ if(D_802823AC){ - timedFunc_set_3(0.0f, (GenFunction_3) __rumbleManager_80250BA4, 0, (s32) (arg0 * 524288.0f), (s32) (arg2*524288.0f)); - timedFunc_set_3(arg2, (GenFunction_3) __rumbleManager_80250BA4, (s32) (arg0 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg3*524288.0f)); - timedFunc_set_3(arg2 + arg3, (GenFunction_3) __rumbleManager_80250BA4, (s32) (arg1 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg4*524288.0f)); - timedFunc_set_3(arg2 + arg3 + arg4, (GenFunction_3) __rumbleManager_80250BA4, (s32) (arg1 * 524288.0f), 0, (s32) (arg5*524288.0f)); + timedFunc_set_3(0.0f, (GenFunction_3) __baMotor_80250BA4, 0, (s32) (arg0 * 524288.0f), (s32) (arg2*524288.0f)); + timedFunc_set_3(arg2, (GenFunction_3) __baMotor_80250BA4, (s32) (arg0 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg3*524288.0f)); + timedFunc_set_3(arg2 + arg3, (GenFunction_3) __baMotor_80250BA4, (s32) (arg1 * 524288.0f), (s32) (arg1 * 524288.0f), (s32) (arg4*524288.0f)); + timedFunc_set_3(arg2 + arg3 + arg4, (GenFunction_3) __baMotor_80250BA4, (s32) (arg1 * 524288.0f), 0, (s32) (arg5*524288.0f)); } } -void rumbleManager_80250FC0(void){ +void baMotor_80250FC0(void){ int i; u32 motor_status; if(D_802823B0){ diff --git a/src/core1/code_0.c b/src/core1/code_0.c index c3dabb3d..a730a34f 100644 --- a/src/core1/code_0.c +++ b/src/core1/code_0.c @@ -111,7 +111,7 @@ void core1_init(void) { allocUnusedBlock(); assetCache_init(); pfsManager_init(); - rumbleManager_init(); + baMotor_init(); audioManager_init(); graphicsCache_init(); ml_init(); @@ -147,7 +147,7 @@ void mainLoop(void){ pfsManager_update(); sDisableInput = FALSE; - rumbleManager_80250C08(); + baMotor_80250C08(); if(!mapSpecificFlags_validateCRC1()){ eeprom_writeBlocks(0, 0, 0x80397AD0, 0x40); diff --git a/src/core1/code_8C50.c b/src/core1/code_8C50.c index 16b0a0b9..f709c6bb 100644 --- a/src/core1/code_8C50.c +++ b/src/core1/code_8C50.c @@ -428,7 +428,7 @@ void func_8024730C(void){ // if(&D_802759A8){} osViSetMode(&D_80275A48); #endif - rumbleManager_80250FC0(); //stop controller motors + baMotor_80250FC0(); //stop controller motors do{ osDpSetStatus(DPC_STATUS_FLUSH); }while(1); diff --git a/src/core2/animctrl.c b/src/core2/anctrl.c similarity index 62% rename from src/core2/animctrl.c rename to src/core2/anctrl.c index 17c2f7d9..f2d9beb4 100644 --- a/src/core2/animctrl.c +++ b/src/core2/anctrl.c @@ -2,32 +2,32 @@ #include "functions.h" #include "variables.h" -#include "core2/animctrl.h" +#include "core2/anctrl.h" #include "animation.h" /* .code */ -void animctrl_80286F90(AnimCtrl *this){ +void anctrl_80286F90(AnimCtrl *this){ Animation *anim; f32 duration; if(this->smooth_transition){ - anim = animctrl_getAnimPtr(this); + anim = anctrl_getAnimPtr(this); duration = anim_getDuration(anim); if( duration < 1.0f ){ - anim_setDuration(anim, ml_min_f(1.0f, time_getDelta()/animctrl_getTransistionDuration(this) + duration)); + anim_setDuration(anim, ml_min_f(1.0f, time_getDelta()/anctrl_getTransistionDuration(this) + duration)); } } } -static void __animctrl_update_looped(AnimCtrl *this){ +static void __anctrl_update_looped(AnimCtrl *this){ Animation *anim; f32 delta; f32 tmp; - anim = animctrl_getAnimPtr(this); - animctrl_80286F90(this); + anim = anctrl_getAnimPtr(this); + anctrl_80286F90(this); this->timer = anim_getTimer(anim); - delta = time_getDelta() / animctrl_getDuration(this); + delta = time_getDelta() / anctrl_getDuration(this); if(this->playback_direction == 0){ delta = -delta; } @@ -46,10 +46,10 @@ void func_802870E0(AnimCtrl *this){ f32 f_range; f32 f_percent; - anim = animctrl_getAnimPtr(this); - animctrl_80286F90(this); + anim = anctrl_getAnimPtr(this); + anctrl_80286F90(this); this->timer = anim_getTimer(anim);; - delta = time_getDelta() / animctrl_getDuration(this); + delta = time_getDelta() / anctrl_getDuration(this); if(this->playback_direction == 0){ delta = -delta; } @@ -68,10 +68,10 @@ void func_802871A4(AnimCtrl *this){ f32 phi_f2; - anim = animctrl_getAnimPtr(this); - animctrl_80286F90(this); + anim = anctrl_getAnimPtr(this); + anctrl_80286F90(this); this->timer = anim_getTimer(anim); - phi_f2 = time_getDelta() / animctrl_getDuration(this); + phi_f2 = time_getDelta() / anctrl_getDuration(this); if (this->playback_direction == 0) { phi_f2 = -phi_f2; } @@ -80,7 +80,7 @@ void func_802871A4(AnimCtrl *this){ if (phi_f0 < 0.0f) { phi_f0 = 0.0f; - animctrl_setPlaybackType(this, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this, ANIMCTRL_STOPPED); } else { if ((this->subrange_end < phi_f0) || (0.999999 < (f64) phi_f0)) { @@ -88,7 +88,7 @@ void func_802871A4(AnimCtrl *this){ phi_f0 = this->subrange_end; if(0.999999 < (f64) phi_f0) phi_f0 = 0.9999989867210388f; // D_80373E00 - animctrl_setPlaybackType(this, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(this, ANIMCTRL_STOPPED); } else { phi_f0 = phi_f0 - (f32) (s32) phi_f0; } @@ -96,32 +96,32 @@ void func_802871A4(AnimCtrl *this){ anim_setTimer(anim, phi_f0); } -AnimCtrl *animctrl_new(s32 arg0){ //new +AnimCtrl *anctrl_new(s32 arg0){ //new ActorAnimCtrl *this; this = (ActorAnimCtrl *)malloc( anim_getSize() + 0x28); - this->animctrl.animation = &this->animation; + this->anctrl.animation = &this->animation; anim_new(&this->animation, 1); - this->animctrl.playback_type = 0; - this->animctrl.index = 0; - this->animctrl.default_start = TRUE; - this->animctrl.timer = 0.0f; - this->animctrl.start = 0.0f; - func_80287784(&this->animctrl, func_8030C77C()); - animctrl_setSubRange(&this->animctrl, 0.0f, 1.0f); - animctrl_setDuration(&this->animctrl, 2.0f); - animctrl_setTransitionDuration(&this->animctrl, 0.2f); - animctrl_setSmoothTransition(&this->animctrl, 1); - animctrl_setDirection(&this->animctrl, mvmt_dir_forwards); - return &this->animctrl; + this->anctrl.playback_type = 0; + this->anctrl.index = 0; + this->anctrl.default_start = TRUE; + this->anctrl.timer = 0.0f; + this->anctrl.start = 0.0f; + func_80287784(&this->anctrl, func_8030C77C()); + anctrl_setSubRange(&this->anctrl, 0.0f, 1.0f); + anctrl_setDuration(&this->anctrl, 2.0f); + anctrl_setTransitionDuration(&this->anctrl, 0.2f); + anctrl_setSmoothTransition(&this->anctrl, 1); + anctrl_setDirection(&this->anctrl, mvmt_dir_forwards); + return &this->anctrl; } -void animctrl_free(AnimCtrl * this){ //free +void anctrl_free(AnimCtrl * this){ //free anim_release(this->animation); free(this); } -void animctrl_update(AnimCtrl *this){//update +void anctrl_update(AnimCtrl *this){//update switch (this->playback_type) { case 0: @@ -130,29 +130,29 @@ void animctrl_update(AnimCtrl *this){//update func_802871A4(this); break; case ANIMCTRL_LOOP: //loop - __animctrl_update_looped(this); + __anctrl_update_looped(this); break; case ANIMCTRL_SUBRANGE_LOOP: func_802870E0(this); break; case ANIMCTRL_STOPPED: //stopped - animctrl_80286F90(this); + anctrl_80286F90(this); break; } } -AnimCtrl *animctrl_defrag(AnimCtrl *this){ //realloc +AnimCtrl *anctrl_defrag(AnimCtrl *this){ //realloc ActorAnimCtrl *full_struct; full_struct = (ActorAnimCtrl *)defrag(this); - full_struct->animctrl.animation = &full_struct->animation; - return &full_struct->animctrl; + full_struct->anctrl.animation = &full_struct->animation; + return &full_struct->anctrl; } -void animctrl_setIndex(AnimCtrl *this, enum asset_e index){ +void anctrl_setIndex(AnimCtrl *this, enum asset_e index){ this->index = index; } -Animation *animctrl_getAnimPtr(AnimCtrl *this){ +Animation *anctrl_getAnimPtr(AnimCtrl *this){ return this->animation; } @@ -164,19 +164,19 @@ void func_8028748C(AnimCtrl *this, s32 arg1){ anim_80289798(this->animation, arg1); } -void animctrl_reset(AnimCtrl *this){ +void anctrl_reset(AnimCtrl *this){ this->playback_type = ANIMCTRL_LOOP; this->default_start = TRUE; this->timer = 0.0; this->start = 0.0; - animctrl_setSmoothTransition(this, 1); - animctrl_setSubRange(this, 0.0, 1.0); - animctrl_setDuration(this, 2.0); - animctrl_setTransitionDuration(this, 0.2); - animctrl_setDirection(this, mvmt_dir_forwards); + anctrl_setSmoothTransition(this, 1); + anctrl_setSubRange(this, 0.0, 1.0); + anctrl_setDuration(this, 2.0); + anctrl_setTransitionDuration(this, 0.2); + anctrl_setDirection(this, mvmt_dir_forwards); } -void __animctrl_gotoStart(AnimCtrl *this){ +void __anctrl_gotoStart(AnimCtrl *this){ if(this->default_start){ if(this->playback_direction) anim_setTimer(this->animation, 0.0f); @@ -189,59 +189,59 @@ void __animctrl_gotoStart(AnimCtrl *this){ this->timer = anim_getTimer(this->animation); } -void _animctrl_start(AnimCtrl * this, char *file, s32 line){ +void _anctrl_start(AnimCtrl * this, char *file, s32 line){ if(this->smooth_transition && anim_getIndex(this->animation) != 0){ anim_resetSmooth(this->animation); anim_setIndex(this->animation, this->index); - __animctrl_gotoStart(this); + __anctrl_gotoStart(this); anim_setDuration(this->animation, 0.0f); } else{ anim_resetNow(this->animation); anim_setIndex(this->animation, this->index); - __animctrl_gotoStart(this); + __anctrl_gotoStart(this); anim_setDuration(this->animation, 1.0f); } } -void animctrl_setAnimTimer(AnimCtrl *this, f32 timer){ +void anctrl_setAnimTimer(AnimCtrl *this, f32 timer){ anim_setTimer(this->animation, timer); } -void animctrl_setPlaybackType(AnimCtrl *this, enum animctrl_playback_e arg1){ +void anctrl_setPlaybackType(AnimCtrl *this, enum anctrl_playback_e arg1){ this->playback_type = arg1; } -void animctrl_setDirection(AnimCtrl *this, s32 arg1){ +void anctrl_setDirection(AnimCtrl *this, s32 arg1){ this->playback_direction = arg1; } -void animctrl_setSmoothTransition(AnimCtrl *this, s32 arg1){ +void anctrl_setSmoothTransition(AnimCtrl *this, s32 arg1){ this->smooth_transition = arg1; } -void animctrl_setDuration(AnimCtrl *this, f32 arg1){ +void anctrl_setDuration(AnimCtrl *this, f32 arg1){ if(IO_READ(0x238) - 0x10000003){ arg1 += 3.0f; } this->animation_duration = arg1; } -void animctrl_setTransitionDuration(AnimCtrl *this, f32 arg1){ +void anctrl_setTransitionDuration(AnimCtrl *this, f32 arg1){ this->transition_duration = arg1; } -void animctrl_setSubRange(AnimCtrl *this, f32 start, f32 end){ +void anctrl_setSubRange(AnimCtrl *this, f32 start, f32 end){ this->subrange_start = start - (f32)(s32)start; this->subrange_end = (end != 1.0)? end - (f32)(s32)end : end; } -void animctrl_getSubRange(AnimCtrl *this, f32 *startPtr, f32 *endPtr){ +void anctrl_getSubRange(AnimCtrl *this, f32 *startPtr, f32 *endPtr){ *startPtr = this->subrange_start; *endPtr = this->subrange_end; } -void animctrl_setStart(AnimCtrl *this, f32 start_position){ +void anctrl_setStart(AnimCtrl *this, f32 start_position){ if(start_position == 1.0) start_position = 0.9999989867210388f; // D_80373E18 @@ -254,47 +254,47 @@ void func_80287784(AnimCtrl *this, s32 arg1){ this->unk24 = 0; } -enum asset_e animctrl_getIndex(AnimCtrl *this){ +enum asset_e anctrl_getIndex(AnimCtrl *this){ return anim_getIndex(this->animation); } -enum animctrl_playback_e animctrl_getPlaybackType(AnimCtrl *this){ +enum anctrl_playback_e anctrl_getPlaybackType(AnimCtrl *this){ return this->playback_type; } -s32 animctrl_isPlayedForwards(AnimCtrl *this){ +s32 anctrl_isPlayedForwards(AnimCtrl *this){ return this->playback_direction; } -s32 animctrl_isSmoothTransistion(AnimCtrl *this){ +s32 anctrl_isSmoothTransistion(AnimCtrl *this){ return this->smooth_transition; } -f32 animctrl_getDuration(AnimCtrl *this){ +f32 anctrl_getDuration(AnimCtrl *this){ return this->animation_duration; } -f32 animctrl_getTransistionDuration(AnimCtrl *this){ +f32 anctrl_getTransistionDuration(AnimCtrl *this){ return this->transition_duration; } -f32 animctrl_getAnimTimer(AnimCtrl *this){ +f32 anctrl_getAnimTimer(AnimCtrl *this){ return anim_getTimer(this->animation); } -f32 animctrl_getTimer(AnimCtrl *this){ +f32 anctrl_getTimer(AnimCtrl *this){ return this->timer; } -void animctrl_setTimer(AnimCtrl *this, f32 arg1){ +void anctrl_setTimer(AnimCtrl *this, f32 arg1){ this->timer = arg1; } -s32 animctrl_8028780C(f32 position[3], s32 arg1){ +s32 anctrl_8028780C(f32 position[3], s32 arg1){ return 0; } -void animctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){ +void anctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){ s32 map; map = map_get(); if( map != MAP_1E_CS_START_NINTENDO @@ -305,7 +305,7 @@ void animctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){ ){ this->unk24 = this->unk24 -1; if(this->unk24 == 0xFF){ - this->unk24 = animctrl_8028780C(position, arg2); + this->unk24 = anctrl_8028780C(position, arg2); } else{ anim_drawSetup(this->animation); @@ -315,11 +315,11 @@ void animctrl_drawSetup(AnimCtrl *this, f32 *position, s32 arg2){ anim_update(this->animation); } -s32 animctrl_isStopped(AnimCtrl *this){ - return animctrl_getPlaybackType(this) == ANIMCTRL_STOPPED; +s32 anctrl_isStopped(AnimCtrl *this){ + return anctrl_getPlaybackType(this) == ANIMCTRL_STOPPED; } -int animctrl_isAt(AnimCtrl *this, f32 arg1){ +int anctrl_isAt(AnimCtrl *this, f32 arg1){ int retval; f32 f0 = anim_getTimer(this->animation); @@ -345,6 +345,6 @@ int animctrl_isAt(AnimCtrl *this, f32 arg1){ return retval; } -s32 animctrl_isContiguous(AnimCtrl *this){ +s32 anctrl_isContiguous(AnimCtrl *this){ return (s32)this->animation - (s32) this == 0x28; } diff --git a/src/core2/anseq.c b/src/core2/anseq.c index 27fd8412..45c20b99 100644 --- a/src/core2/anseq.c +++ b/src/core2/anseq.c @@ -2,7 +2,7 @@ #include "functions.h" #include "variables.h" -extern void rumbleManager_80250E6C(f32, f32); +extern void baMotor_80250E6C(f32, f32); extern void func_802BB360(s32, f32); extern void func_802BB378(s32, f32, f32); extern void func_802BB3AC(s32, f32); @@ -73,14 +73,14 @@ void __anSeq_func_8028B14(enum sfx_e arg0){ void __anSeq_func_80288B34(s32 arg0, s32 arg1){ f32 f12 = reinterpret_cast(f32, arg0); f32 f14 = reinterpret_cast(f32, arg1); - rumbleManager_80250E6C(f12, f14); + baMotor_80250E6C(f12, f14); } void __anSeq_func_80288B60(s32 arg0, s32 arg1, s32 arg2){ f32 f12 = reinterpret_cast(f32, arg0); f32 f14 = reinterpret_cast(f32, arg1); f32 f0 = reinterpret_cast(f32, arg2); - rumbleManager_80250D94(f12, f14, f0); + baMotor_80250D94(f12, f14, f0); } void __anSeq_updateStep(vector(AnSeqElement) **ppAnSeq, AnSeqElement *pStep){ @@ -216,7 +216,7 @@ void anSeq_setActivationFrameDelay(vector(AnSeqElement) **ppAnSeq, s32 arg1){ void anSeq_update(vector(AnSeqElement) **ppAnSeq, AnimCtrl *pAnCtl){ AnSeqElement *iPtr; for(iPtr = vector_getBegin(*ppAnSeq); iPtr != (AnSeqElement*)vector_getEnd(*ppAnSeq); iPtr++){ - if(animctrl_isAt(pAnCtl, iPtr->duration)) + if(anctrl_isAt(pAnCtl, iPtr->duration)) __anSeq_updateStep(ppAnSeq, iPtr); } } diff --git a/src/core2/ba/anim.c b/src/core2/ba/anim.c index e7b4fc21..7a7313d4 100644 --- a/src/core2/ba/anim.c +++ b/src/core2/ba/anim.c @@ -56,13 +56,13 @@ void __baanim_update_scaleToHorizontalVelocity(void) { scale = (baAnimScale.scalable_duration != 0) ? baAnimScale.duration_scale : 1.0f; baphysics_get_velocity(velocity); temp_f12 = ml_mapRange_f(gu_sqrtf(velocity[0]*velocity[0] + velocity[2] * velocity[2]), baAnimScale.velocity_min, baAnimScale.velocity_max, baAnimScale.duration_min * scale, baAnimScale.duration_max * scale); - animctrl_setDuration(playerAnimCtrl, ml_clamp_f(temp_f12, baAnimMinDuration, baAnimMaxDuration)); - animctrl_update(playerAnimCtrl); + anctrl_setDuration(playerAnimCtrl, ml_clamp_f(temp_f12, baAnimMinDuration, baAnimMaxDuration)); + anctrl_update(playerAnimCtrl); } void __baanim_update_scaleToVerticalVelocity(void) { - animctrl_setDuration(playerAnimCtrl, ml_clamp_f(ml_mapRange_f(mlAbsF(baphysics_get_vertical_velocity()), baAnimScale.velocity_min, baAnimScale.velocity_max, baAnimScale.duration_min, baAnimScale.duration_max), baAnimMinDuration, baAnimMaxDuration)); - animctrl_update(playerAnimCtrl); + anctrl_setDuration(playerAnimCtrl, ml_clamp_f(ml_mapRange_f(mlAbsF(baphysics_get_vertical_velocity()), baAnimScale.velocity_min, baAnimScale.velocity_max, baAnimScale.duration_min, baAnimScale.duration_max), baAnimMinDuration, baAnimMaxDuration)); + anctrl_update(playerAnimCtrl); } @@ -135,9 +135,9 @@ void __baanim_applyBottlesBonus(s32 arg0, s32 arg1) { } void baAnim_init(void){ - playerAnimCtrl = animctrl_new(1); + playerAnimCtrl = anctrl_new(1); func_80287784(playerAnimCtrl, 0); - animctrl_setSmoothTransition(playerAnimCtrl, FALSE); + anctrl_setSmoothTransition(playerAnimCtrl, FALSE); func_8028746C(playerAnimCtrl, __baanim_applyBottlesBonus); baAnimModifyFunction = NULL; baanim_80289F30(); @@ -150,7 +150,7 @@ void baAnim_init(void){ } void baAnim_free(void){ - animctrl_free(playerAnimCtrl); + anctrl_free(playerAnimCtrl); } void baAnim_update(void){ @@ -164,7 +164,7 @@ void baAnim_update(void){ break; case BAANIM_UPDATE_1_NORMAL: - animctrl_update(playerAnimCtrl); + anctrl_update(playerAnimCtrl); break; case BAANIM_UPDATE_0_NONE: @@ -173,7 +173,7 @@ void baAnim_update(void){ } void baAnim_defrag(void){ - playerAnimCtrl = animctrl_defrag(playerAnimCtrl); + playerAnimCtrl = anctrl_defrag(playerAnimCtrl); } enum baanim_update_type_e baanim_getUpdateType(void){ @@ -210,7 +210,7 @@ void baanim_80289F30(void){ f32 sp1C[3]; _player_getPosition(sp1C); - animctrl_drawSetup(playerAnimCtrl, sp1C, 1); + anctrl_drawSetup(playerAnimCtrl, sp1C, 1); } AnimCtrl *baanim_getAnimCtrlPtr(void){ @@ -218,90 +218,90 @@ AnimCtrl *baanim_getAnimCtrlPtr(void){ } f32 baanim_getTimer(void){ - return animctrl_getAnimTimer(playerAnimCtrl); + return anctrl_getAnimTimer(playerAnimCtrl); } bool baanim_isAnimID(enum asset_e anim_id){ - return animctrl_getIndex(playerAnimCtrl) == anim_id; + return anctrl_getIndex(playerAnimCtrl) == anim_id; } bool baanim_isStopped(void){ - return animctrl_isStopped(playerAnimCtrl); + return anctrl_isStopped(playerAnimCtrl); } bool baanim_isAt(f32 time){ - return animctrl_isAt(playerAnimCtrl, time); + return anctrl_isAt(playerAnimCtrl, time); } void baanim_playForDuration_loopSmooth(enum asset_e anim_id, f32 duration){ - animctrl_reset(playerAnimCtrl); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_LOOP); - animctrl_start(playerAnimCtrl, "baanim.c", 0x188); + anctrl_reset(playerAnimCtrl); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_LOOP); + anctrl_start(playerAnimCtrl, "baanim.c", 0x188); } void baanim_playForDuration_loop(enum asset_e anim_id, f32 duration){ - animctrl_reset(playerAnimCtrl); - animctrl_setSmoothTransition(playerAnimCtrl, FALSE); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_LOOP); - animctrl_start(playerAnimCtrl, "baanim.c", 0x193); + anctrl_reset(playerAnimCtrl); + anctrl_setSmoothTransition(playerAnimCtrl, FALSE); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_LOOP); + anctrl_start(playerAnimCtrl, "baanim.c", 0x193); } void baanim_playForDuration_loopStartingAt(enum asset_e anim_id, f32 duration, f32 start_position){ - animctrl_reset(playerAnimCtrl); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setStart(playerAnimCtrl, start_position); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_LOOP); - animctrl_start(playerAnimCtrl, "baanim.c", 0x19e); + anctrl_reset(playerAnimCtrl); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setStart(playerAnimCtrl, start_position); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_LOOP); + anctrl_start(playerAnimCtrl, "baanim.c", 0x19e); } void baanim_playForDuration_once(enum asset_e anim_id, f32 duration){ - animctrl_reset(playerAnimCtrl); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); - animctrl_start(playerAnimCtrl, "baanim.c", 0x1a8); + anctrl_reset(playerAnimCtrl); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); + anctrl_start(playerAnimCtrl, "baanim.c", 0x1a8); } void baanim_playForDuration_onceStartingAt(enum asset_e anim_id, f32 duration, f32 start_position){ - animctrl_reset(playerAnimCtrl); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setStart(playerAnimCtrl, start_position); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); - animctrl_start(playerAnimCtrl, "baanim.c", 0x1b3); + anctrl_reset(playerAnimCtrl); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setStart(playerAnimCtrl, start_position); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); + anctrl_start(playerAnimCtrl, "baanim.c", 0x1b3); } void baanim_playForDuration_onceSmooth(enum asset_e anim_id, f32 duration){ - animctrl_reset(playerAnimCtrl); - animctrl_setSmoothTransition(playerAnimCtrl, FALSE); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); - animctrl_start(playerAnimCtrl, "baanim.c", 0x1bd); + anctrl_reset(playerAnimCtrl); + anctrl_setSmoothTransition(playerAnimCtrl, FALSE); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); + anctrl_start(playerAnimCtrl, "baanim.c", 0x1bd); } void baanim_playForDuration_onceSmoothStartingAt(enum asset_e anim_id, f32 duration, f32 start_position){ - animctrl_reset(playerAnimCtrl); - animctrl_setSmoothTransition(playerAnimCtrl, FALSE); - animctrl_setIndex(playerAnimCtrl, anim_id); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setStart(playerAnimCtrl, start_position); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); - animctrl_start(playerAnimCtrl, "baanim.c", 0x1c9); + anctrl_reset(playerAnimCtrl); + anctrl_setSmoothTransition(playerAnimCtrl, FALSE); + anctrl_setIndex(playerAnimCtrl, anim_id); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setStart(playerAnimCtrl, start_position); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); + anctrl_start(playerAnimCtrl, "baanim.c", 0x1c9); } void baanim_setEnd(f32 end_position){ - animctrl_setSubRange(playerAnimCtrl, 0.0f, end_position); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(playerAnimCtrl, 0.0f, end_position); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); } void baanim_setEndAndDuration(f32 end_position, f32 duration){ - animctrl_setSubRange(playerAnimCtrl, 0.0f, end_position); - animctrl_setDuration(playerAnimCtrl, duration); - animctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(playerAnimCtrl, 0.0f, end_position); + anctrl_setDuration(playerAnimCtrl, duration); + anctrl_setPlaybackType(playerAnimCtrl, ANIMCTRL_ONCE); } diff --git a/src/core2/ba/marker.c b/src/core2/ba/marker.c index 7a3668e8..9b0fe00c 100644 --- a/src/core2/ba/marker.c +++ b/src/core2/ba/marker.c @@ -1061,13 +1061,13 @@ void baMarker_8028D7B8(s32 arg0, ActorMarker *arg1, struct5Cs *collision_flags){ sp24 = MAX(MIN(sp24, 0xb), 7); sp24 -= 7; func_8028F428(sp24 +8, arg1); - rumbleManager_80250D94(0.8f, sp24 + 0.2, 0.3f); + baMotor_80250D94(0.8f, sp24 + 0.2, 0.3f); break; case 2://L8028DA10 sp24 = MAX(MIN(sp24, 5), 1); sp24--; func_8028F55C(sp24 + 3, arg1); - rumbleManager_80250D94(1.0f, sp24 + 0.3, 0.5f); + baMotor_80250D94(1.0f, sp24 + 0.3, 0.5f); if(actor->unk16C_2 || actor->unk16C_1){ baMarker_8028D71C(); } diff --git a/src/core2/bs/ant.c b/src/core2/bs/ant.c index 2ddc38ea..14e2da10 100644 --- a/src/core2/bs/ant.c +++ b/src/core2/bs/ant.c @@ -129,10 +129,10 @@ void bsant_walk_update(void){ func_80299628(0); func_8029E48C(); - if(animctrl_isAt(aCtrl, 0.7781f)) + if(anctrl_isAt(aCtrl, 0.7781f)) func_8029E448(0); - if(animctrl_isAt(aCtrl, 0.2781f)) + if(anctrl_isAt(aCtrl, 0.2781f)) func_8029E448(1); if(func_8029B300() == 0 && baphysics_is_slower_than(1.0f)) @@ -155,14 +155,14 @@ void bsant_walk_end(void){ void bsant_jump_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); func_8029E554(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_60_ANIM_BSANT_JUMP); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setTransitionDuration(aCtrl, 0.1f); - animctrl_setStart(aCtrl, 0.2987f); - animctrl_setSubRange(aCtrl, 0.0f, 0.4423f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsant.c", 0x17c); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_60_ANIM_BSANT_JUMP); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setTransitionDuration(aCtrl, 0.1f); + anctrl_setStart(aCtrl, 0.2987f); + anctrl_setSubRange(aCtrl, 0.0f, 0.4423f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsant.c", 0x17c); func_8029C7F4(1, YAW_STATE_1_DEFAULT, 3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) yaw_setIdeal(func_8029B33C()); @@ -189,15 +189,15 @@ void bsant_jump_update(void){ switch(bsant_substate){ case 0://L8029EA88 - if(animctrl_isStopped(aCtrl)){ - animctrl_setDuration(aCtrl, 5.0f); + if(anctrl_isStopped(aCtrl)){ + anctrl_setDuration(aCtrl, 5.0f); baanim_setEnd(0.5026f); bsant_substate = 1; } break; case 1://L8029EABC if(func_8028B254(0x82)){ - animctrl_setDuration(aCtrl, 1.0f); + anctrl_setDuration(aCtrl, 1.0f); baanim_setEnd(1.0f); bsant_substate = 2; } @@ -210,7 +210,7 @@ void bsant_jump_update(void){ } break; case 3://L8029EB24 - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp2C = BS_35_ANT_IDLE; break; }//L8029EB38 @@ -235,12 +235,12 @@ void bsant_fall_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); func_8029E554(); D_8037D298 = 0; - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_60_ANIM_BSANT_JUMP); - animctrl_setDuration(aCtrl, 1.9f); - animctrl_setStart(aCtrl, 0.4423f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_start(aCtrl, "bsant.c", 0x208); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_60_ANIM_BSANT_JUMP); + anctrl_setDuration(aCtrl, 1.9f); + anctrl_setStart(aCtrl, 0.4423f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_start(aCtrl, "bsant.c", 0x208); func_8029C7F4(1, YAW_STATE_1_DEFAULT, 3, BA_PHYSICS_AIRBORN); bsant_substate = 0; } @@ -258,7 +258,7 @@ void bsant_fall_update(void){ switch(bsant_substate){ case 0: if(func_8028B254(0x5A)){ - animctrl_setDuration(aCtrl, 2.0f); + anctrl_setDuration(aCtrl, 2.0f); baanim_setEnd(1.0f); bsant_substate = 1; } @@ -286,12 +286,12 @@ static void __bsant_recoil_init(int take_damage){ f32 sp20[3]; func_8029E554(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_28_ANIM_BSANT_OW); - animctrl_setDuration(aCtrl, 1.4f); - animctrl_setSubRange(aCtrl, 0.0f, 0.4899f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsant.c", 0x272); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_28_ANIM_BSANT_OW); + anctrl_setDuration(aCtrl, 1.4f); + anctrl_setSubRange(aCtrl, 0.0f, 0.4899f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsant.c", 0x272); if(take_damage == 1) func_8030E58C(SFX_38_BANJO_AYE_1, 1.8f); else @@ -375,13 +375,13 @@ void bsant_die_init(void){ f32 sp20[3]; func_8029E554(); func_8029B930(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_29_ANIM_BSANT_DIE); - animctrl_setSubRange(aCtrl, 0.0f, 0.523f); - animctrl_setDuration(aCtrl, 1.6f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsant.c", 0x2f6); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_29_ANIM_BSANT_DIE); + anctrl_setSubRange(aCtrl, 0.0f, 0.523f); + anctrl_setDuration(aCtrl, 1.6f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsant.c", 0x2f6); func_8030E58C(SFX_36_BANJO_DOH, 1.8f); _player_getPosition(sp2C); func_80294980(sp20); @@ -421,13 +421,13 @@ void bsant_die_update(void){ } break; case 1://L8029F2C0 - if(animctrl_isAt(aCtrl, 0.72f)){ + if(anctrl_isAt(aCtrl, 0.72f)){ D_8037D290 = 0.0f; bsant_substate = 2; } break; case 2://L8029F2F0 - if(animctrl_isAt(aCtrl, 0.77f)){ + if(anctrl_isAt(aCtrl, 0.77f)){ FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 18000); FUNC_8030E624(SFX_38_BANJO_AYE_1, 1.8f, 18000); } diff --git a/src/core2/bs/bBarge.c b/src/core2/bs/bBarge.c index 9f87577c..1ae66442 100644 --- a/src/core2/bs/bBarge.c +++ b/src/core2/bs/bBarge.c @@ -60,13 +60,13 @@ void bsbarge_init(void){ AnimCtrl *plyrMvmnt; plyrMvmnt = baanim_getAnimCtrlPtr(); - animctrl_reset(plyrMvmnt); - animctrl_setSmoothTransition(plyrMvmnt, 0); - animctrl_setIndex(plyrMvmnt, ASSET_1C_ANIM_BSBBARGE); - animctrl_setDuration(plyrMvmnt, 1.0f); - animctrl_setSubRange(plyrMvmnt, 0, 0.375f); - animctrl_setPlaybackType(plyrMvmnt, ANIMCTRL_ONCE); - animctrl_start(plyrMvmnt, "bsbbarge.c", 0x98); + anctrl_reset(plyrMvmnt); + anctrl_setSmoothTransition(plyrMvmnt, 0); + anctrl_setIndex(plyrMvmnt, ASSET_1C_ANIM_BSBBARGE); + anctrl_setDuration(plyrMvmnt, 1.0f); + anctrl_setSubRange(plyrMvmnt, 0, 0.375f); + anctrl_setPlaybackType(plyrMvmnt, ANIMCTRL_ONCE); + anctrl_start(plyrMvmnt, "bsbbarge.c", 0x98); D_8037D2A4 = 0; func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION); baphysics_set_target_yaw(yaw_getIdeal()); @@ -92,10 +92,10 @@ void bsbarge_update(void){ miscFlag_set(MISC_FLAG_A); switch(D_8037D2A5){ case 0: - if(animctrl_isAt(plyrMvmnt, 0.1392f)) + if(anctrl_isAt(plyrMvmnt, 0.1392f)) func_80299BD4(); - if(!animctrl_isStopped(plyrMvmnt)) + if(!anctrl_isStopped(plyrMvmnt)) break; if(miscFlag_isFalse(MISC_FLAG_A)){ @@ -120,7 +120,7 @@ void bsbarge_update(void){ if(!batimer_isZero(1)) break; - animctrl_setDuration(plyrMvmnt, 1.0f); + anctrl_setDuration(plyrMvmnt, 1.0f); baanim_setEnd(0.565f); baphysics_set_target_horizontal_velocity(D_8037D2A0); baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity()); @@ -131,8 +131,8 @@ void bsbarge_update(void){ break; case 2: baphysics_set_target_horizontal_velocity(D_8037D2A0); - if(animctrl_isStopped(plyrMvmnt)){ - animctrl_setDuration(plyrMvmnt, 2.0f); + if(anctrl_isStopped(plyrMvmnt)){ + anctrl_setDuration(plyrMvmnt, 2.0f); baanim_setEnd(0.6f); batimer_set(0, 0.1f); D_8037D2A5 = 3; @@ -146,7 +146,7 @@ void bsbarge_update(void){ } baphysics_set_target_horizontal_velocity(D_8037D2A0); if(D_8037D2A0 < 200.0f){ - animctrl_setDuration(plyrMvmnt, 1.5f); + anctrl_setDuration(plyrMvmnt, 1.5f); baanim_setEnd(1.0f); D_8037D2A5 = 4; } @@ -155,12 +155,12 @@ void bsbarge_update(void){ case 4: if(!player_isStable()) sp24 = BS_2F_FALL; - if(animctrl_isAt(plyrMvmnt, 0.7f)){ + if(anctrl_isAt(plyrMvmnt, 0.7f)){ D_8037D2A0 = 0.0f; D_8037D2A6 = 0; } baphysics_set_target_horizontal_velocity(D_8037D2A0); - if(animctrl_isAt(plyrMvmnt, 0.9193f)) + if(anctrl_isAt(plyrMvmnt, 0.9193f)) sp24 = BS_20_LANDING; break; } diff --git a/src/core2/bs/bEggAss.c b/src/core2/bs/bEggAss.c index dc705448..7235e7ef 100644 --- a/src/core2/bs/bEggAss.c +++ b/src/core2/bs/bEggAss.c @@ -37,21 +37,21 @@ void bseggass_update(void) { func_80346C10(&sp28, -1, 0, ITEM_D_EGGS, 0); } if (has_eggs) { - if (animctrl_isAt(plyr_mvmt, 0.3837f)) { + if (anctrl_isAt(plyr_mvmt, 0.3837f)) { func_8030E760(SFX_3E_POOP_NOISE, 1.4f, 28000); func_8033E3F0(COMMON_PARTICLE_4_EGG_ASS, 1); item_dec(ITEM_D_EGGS); ability_use(7); } - if ((animctrl_isAt(plyr_mvmt, 0.4885f)) && (D_8037D2E1 < D_8037D2E0)) { - animctrl_setStart(plyr_mvmt, 0.349f); - animctrl_start(plyr_mvmt, "bsbeggass.c", 0x5E); + if ((anctrl_isAt(plyr_mvmt, 0.4885f)) && (D_8037D2E1 < D_8037D2E0)) { + anctrl_setStart(plyr_mvmt, 0.349f); + anctrl_start(plyr_mvmt, "bsbeggass.c", 0x5E); D_8037D2E1++; } } - if (animctrl_isStopped(plyr_mvmt)) { + if (anctrl_isStopped(plyr_mvmt)) { next_state = (button_held(BUTTON_Z))? BS_CROUCH : BS_1_IDLE; - } else if (0.6 < (f64) animctrl_getAnimTimer(plyr_mvmt)) { + } else if (0.6 < (f64) anctrl_getAnimTimer(plyr_mvmt)) { next_state = func_802ADCD4(0); } if (func_8028B094()) diff --git a/src/core2/bs/bEggHead.c b/src/core2/bs/bEggHead.c index ffa0dee7..ac2e5e5f 100644 --- a/src/core2/bs/bEggHead.c +++ b/src/core2/bs/bEggHead.c @@ -5,7 +5,7 @@ #include "core2/ba/physics.h" void yaw_setVelocityBounded(f32, f32); -void animctrl_start(AnimCtrl *, char*, s32); +void anctrl_start(AnimCtrl *, char*, s32); /* .bss */ u8 D_8037D2F0; @@ -40,27 +40,27 @@ void bsegghead_update(void) { func_80346C10(&sp28, -1, 0, ITEM_D_EGGS, 0); } if (has_eggs) { - if (animctrl_isAt(aCtrl, 0.1f)) + if (anctrl_isAt(aCtrl, 0.1f)) func_8030E760(SFX_46_KAZOOIE_CHOKING_UP, 1.0f, 0x7fff); - if (animctrl_isAt(aCtrl, 0.4f)) + if (anctrl_isAt(aCtrl, 0.4f)) func_8030E760(SFX_57_KAZOOIE_HEGH, 1.0f, 0x7fff); - if (animctrl_isAt(aCtrl, 0.4704f)){ + if (anctrl_isAt(aCtrl, 0.4704f)){ func_8033E3F0(COMMON_PARTICLE_1_EGG_HEAD, 1); item_dec(ITEM_D_EGGS); ability_use(7); } - if ((animctrl_isAt(aCtrl, 0.5919f)) && (D_8037D2F1 < D_8037D2F0)) { - animctrl_setStart(aCtrl, 0.3878f); - animctrl_start(aCtrl, "bsbegghead.c", 0x62); + if ((anctrl_isAt(aCtrl, 0.5919f)) && (D_8037D2F1 < D_8037D2F0)) { + anctrl_setStart(aCtrl, 0.3878f); + anctrl_start(aCtrl, "bsbegghead.c", 0x62); D_8037D2F1++; } } - if (animctrl_isStopped(aCtrl)) { + if (anctrl_isStopped(aCtrl)) { next_state = (button_held(BUTTON_Z))? BS_CROUCH : BS_1_IDLE; - } else if (0.65 < (f64) animctrl_getAnimTimer(aCtrl)) { + } else if (0.65 < (f64) anctrl_getAnimTimer(aCtrl)) { next_state = func_802ADCD4(0); } if (func_8028B094()) diff --git a/src/core2/bs/bFlap.c b/src/core2/bs/bFlap.c index 785bf0b6..2c8af21c 100644 --- a/src/core2/bs/bFlap.c +++ b/src/core2/bs/bFlap.c @@ -53,7 +53,7 @@ void func_802A2790(s32 arg0, f32 arg1, s32 arg2) { void func_802A2810(void) { AnimCtrl *plyrMvPtr; plyrMvPtr = baanim_getAnimCtrlPtr(); - if (animctrl_isAt(plyrMvPtr, 0.9f)) { + if (anctrl_isAt(plyrMvPtr, 0.9f)) { D_8037D301++; } } @@ -78,7 +78,7 @@ f32 func_802A2858(void){ void func_802A28CC(void){ AnimCtrl *sp1c = baanim_getAnimCtrlPtr(); - animctrl_setDuration(sp1c, func_802A2858()); + anctrl_setDuration(sp1c, func_802A2858()); } void func_802A2900(void){ @@ -97,7 +97,7 @@ void func_802A298C(void){ func_802A2790(0x4e, 1.24f, 0x4e20); } - if((0.7 < D_8037D308) && animctrl_isAt(sp1c, 0.5698f)){ + if((0.7 < D_8037D308) && anctrl_isAt(sp1c, 0.5698f)){ func_802A2790(0x47, 1.0f, 0x55f0); } } @@ -114,13 +114,13 @@ void bsbflap_update(void){ bafalldamage_start(); func_802A2900(); func_802A298C(); - if(animctrl_isAt(sp18, 0.9f)){ - animctrl_setSmoothTransition(sp18, 0); - animctrl_setIndex(sp18, ASSET_17_ANIM_BSBFLAP); - animctrl_setDuration(sp18, func_802A2858()); - animctrl_setPlaybackType(sp18, ANIMCTRL_LOOP); - animctrl_setStart(sp18, 0.0f); - animctrl_start(sp18, "bsbflap.c", 0xe1); + if(anctrl_isAt(sp18, 0.9f)){ + anctrl_setSmoothTransition(sp18, 0); + anctrl_setIndex(sp18, ASSET_17_ANIM_BSBFLAP); + anctrl_setDuration(sp18, func_802A2858()); + anctrl_setPlaybackType(sp18, ANIMCTRL_LOOP); + anctrl_setStart(sp18, 0.0f); + anctrl_start(sp18, "bsbflap.c", 0xe1); baphysics_set_vertical_velocity(D_80364A10); baphysics_set_gravity(D_80364A14); baphysics_set_terminal_velocity(D_80364A18); @@ -143,12 +143,13 @@ void bsbflap_update(void){ func_802A2810(); func_802A28CC(); func_802A298C(); - if(D_8037D301 == 4) + if(D_8037D301 == 4) { D_8037D300 = 3; + } if(button_released(BUTTON_A)){ baphysics_reset_gravity(); baphysics_reset_terminal_velocity(); - animctrl_setDuration(sp18, 1.0f); + anctrl_setDuration(sp18, 1.0f); D_8037D300 = 4; } break; @@ -161,7 +162,7 @@ void bsbflap_update(void){ if(button_released(BUTTON_A)){ baphysics_reset_gravity(); baphysics_reset_terminal_velocity(); - animctrl_setDuration(sp18, 1.0f); + anctrl_setDuration(sp18, 1.0f); bafalldamage_set_state(2); D_8037D300 = 4; } diff --git a/src/core2/bs/bFlip.c b/src/core2/bs/bFlip.c index ea13f0a3..2fccbf11 100644 --- a/src/core2/bs/bFlip.c +++ b/src/core2/bs/bFlip.c @@ -28,12 +28,12 @@ void _bsbflip_802A2DC0(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); f32 sp20[3]; - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_4B_ANIM_BSBFLIP_ENTER); - animctrl_setDuration(aCtrl, 2.2f); - animctrl_setStart(aCtrl, 0.8566f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbflip.c", 0x69); //nice + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_4B_ANIM_BSBFLIP_ENTER); + anctrl_setDuration(aCtrl, 2.2f); + anctrl_setStart(aCtrl, 0.8566f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbflip.c", 0x69); //nice baphysics_set_type(BA_PHYSICS_LOCKED_ROTATION); baphysics_set_target_horizontal_velocity(0.0f); ml_vec3f_clear(sp20); @@ -43,14 +43,14 @@ void _bsbflip_802A2DC0(void){ void bsbflip_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_4B_ANIM_BSBFLIP_ENTER); - animctrl_setDuration(aCtrl, 2.3f); - animctrl_setSubRange(aCtrl, 0.0f, 0.7866f); - animctrl_setStart(aCtrl, 0.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbflip.c", 0x80); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_4B_ANIM_BSBFLIP_ENTER); + anctrl_setDuration(aCtrl, 2.3f); + anctrl_setSubRange(aCtrl, 0.0f, 0.7866f); + anctrl_setStart(aCtrl, 0.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbflip.c", 0x80); func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION); func_8029B324(0, 0.03f); func_8029B324(1, 1.0f); @@ -63,16 +63,16 @@ void bsbflip_update(void){ enum bs_e sp24 = 0; AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - if( animctrl_isAt(aCtrl, 0.2394f) - && animctrl_getPlaybackType(aCtrl) != 2 - && animctrl_getIndex(aCtrl) == 0x4B + if( anctrl_isAt(aCtrl, 0.2394f) + && anctrl_getPlaybackType(aCtrl) != 2 + && anctrl_getIndex(aCtrl) == 0x4B ){ func_8030E760(SFX_2_CLAW_SWIPE, 0.558f, 22000); } switch(D_8037D310){ case 0://L802A2FD4 - if(animctrl_isAt(aCtrl, 0.1837f)){ + if(anctrl_isAt(aCtrl, 0.1837f)){ if(func_8029B2E8() != 0.0f){ yaw_setUpdateState(2); func_8029957C(3); @@ -91,20 +91,20 @@ void bsbflip_update(void){ baphysics_set_vertical_velocity(D_80364A20); baphysics_set_gravity(D_80364A24); baphysics_set_terminal_velocity(D_80364A28); - animctrl_setDuration(aCtrl, 1.9f); + anctrl_setDuration(aCtrl, 1.9f); func_8030E4E4(SFX_33_BANJO_AHOO); D_8037D310 = 1; } break; case 1://L802A30F8 _bsbflip_802A2D60(); - if(animctrl_isStopped(aCtrl)){ - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_4C_ANIM_BSBFLIP_HOLD); - animctrl_setDuration(aCtrl, 0.13f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); - animctrl_start(aCtrl, "bsbflip.c", 0xd9); + if(anctrl_isStopped(aCtrl)){ + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_4C_ANIM_BSBFLIP_HOLD); + anctrl_setDuration(aCtrl, 0.13f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); + anctrl_start(aCtrl, "bsbflip.c", 0xd9); D_8037D310 = 2; }//L802A316C if(should_beak_bust()){ @@ -115,12 +115,12 @@ void bsbflip_update(void){ if(player_isFallTumbling()) sp24 = BS_3D_FALL_TUMBLING; if(button_released(BUTTON_A)){ - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_61_ANIM_BSBFLIP_EXIT); - animctrl_setDuration(aCtrl, 0.8f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbflip.c", 0xee); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_61_ANIM_BSBFLIP_EXIT); + anctrl_setDuration(aCtrl, 0.8f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbflip.c", 0xee); baphysics_reset_terminal_velocity(); D_8037D310 = 3; }//L802A320C @@ -147,7 +147,7 @@ void bsbflip_update(void){ } break; case 4://L802A32C0 - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp24 = BS_2_WALK_SLOW; sp24 = func_8029C9C0(sp24); break; diff --git a/src/core2/bs/bFly.c b/src/core2/bs/bFly.c index d13789a7..96740874 100644 --- a/src/core2/bs/bFly.c +++ b/src/core2/bs/bFly.c @@ -157,8 +157,8 @@ void bsbfly_enter_update(void){ switch(D_8037D344){ case 0: - if(animctrl_isAt(aCtrl, 0.2416f)){ - animctrl_setDuration(aCtrl, 2.4f); + if(anctrl_isAt(aCtrl, 0.2416f)){ + anctrl_setDuration(aCtrl, 2.4f); baphysics_set_vertical_velocity(1600.0f); func_8030E58C(SFX_C_TAKING_FLIGHT_LIFTOFF, 0.7f); D_8037D344 = 1; @@ -226,7 +226,7 @@ void bsbfly_update(void){ if(sp2C || D_8037D346){ if(sp2C){ - animctrl_setDuration(aCtrl, 0.3f); + anctrl_setDuration(aCtrl, 0.3f); func_802D8BE4(0); } if(D_8037D346){ @@ -253,13 +253,13 @@ void bsbfly_update(void){ baphysics_set_vertical_velocity(sp30 * 400.0); } if(!sp30){ - animctrl_setDuration(aCtrl, 0.62f); + anctrl_setDuration(aCtrl, 0.62f); func_802A33D8(); D_8037D344 = 0; } break; }//L802A3CB8 - if(animctrl_isAt(aCtrl, 0.1358f)){ + if(anctrl_isAt(aCtrl, 0.1358f)){ func_8030EBC8(SFX_2_CLAW_SWIPE, 0.6f, 0.7f, 0x2710, 0x2ee0); } baphysics_set_gravity(-300.0f); @@ -377,11 +377,11 @@ void func_802A411C(void) { sp58 = baanim_getAnimCtrlPtr(); switch (D_8037D344) { case 0: - if (animctrl_isAt(sp58, 0.6905f)) { + if (anctrl_isAt(sp58, 0.6905f)) { baphysics_set_type(BA_PHYSICS_UNK8); func_802914CC(5); ncDynamicCam5_func_802BF590(&D_8037D338); - animctrl_setDuration(sp58, 0.05f); + anctrl_setDuration(sp58, 0.05f); func_80299CF4(SFX_50_KAZOOIE_RRRUH, 1.3f, 0x7FFF); D_8037D345 = 1; D_8037D324 = 0.0f; @@ -429,11 +429,11 @@ void func_802A411C(void) { if (sp48[0]*sp48[0] + sp48[1]*sp48[1] + sp48[2]*sp48[2] > 16000000.0f) { next_state = BS_57_BOMB_END; } - if (animctrl_isStopped(sp58) != 0) { - animctrl_setIndex(sp58, 0x47); - animctrl_setDuration(sp58, 0.3f); - animctrl_setPlaybackType(sp58, ANIMCTRL_LOOP); - animctrl_start(sp58, "bsbfly.c", 0x361); + if (anctrl_isStopped(sp58) != 0) { + anctrl_setIndex(sp58, 0x47); + anctrl_setDuration(sp58, 0.3f); + anctrl_setPlaybackType(sp58, ANIMCTRL_LOOP); + anctrl_start(sp58, "bsbfly.c", 0x361); } break; } @@ -447,15 +447,15 @@ void func_802A4404(void){ } void func_802A4430(void){ - AnimCtrl *plyr_animctrl; + AnimCtrl *plyr_anctrl; - plyr_animctrl = baanim_getAnimCtrlPtr(); - animctrl_reset(plyr_animctrl); - animctrl_setTransitionDuration(plyr_animctrl, 0.3f); - animctrl_setIndex(plyr_animctrl, ASSET_CC_ANIM_BSFLY_BEAKBOMB_END); - animctrl_setDuration(plyr_animctrl, 0.38f); - animctrl_setPlaybackType(plyr_animctrl, ANIMCTRL_LOOP); - animctrl_start(plyr_animctrl, "bsbfly.c", 0x38a); + plyr_anctrl = baanim_getAnimCtrlPtr(); + anctrl_reset(plyr_anctrl); + anctrl_setTransitionDuration(plyr_anctrl, 0.3f); + anctrl_setIndex(plyr_anctrl, ASSET_CC_ANIM_BSFLY_BEAKBOMB_END); + anctrl_setDuration(plyr_anctrl, 0.38f); + anctrl_setPlaybackType(plyr_anctrl, ANIMCTRL_LOOP); + anctrl_start(plyr_anctrl, "bsbfly.c", 0x38a); func_8029C7F4(1, 1, 3, BA_PHYSICS_LOCKED_ROTATION); func_8029E070(1); func_802A3430(); @@ -535,7 +535,7 @@ void bsbfly_beakbomb_crash_init(void) { func_8029E070(1); FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 32750); func_80299CF4(SFX_36_BANJO_DOH, 1.0f, 28000); - rumbleManager_80250D94(1.0f, 0.5f, 0.5f); + baMotor_80250D94(1.0f, 0.5f, 0.5f); item_dec(ITEM_14_HEALTH); func_802A46C8(); baMarker_collisionOff(); @@ -546,18 +546,18 @@ void func_802A47E0(void) { AnimCtrl *sp1C; sp1C = baanim_getAnimCtrlPtr(); - if (animctrl_isAt(sp1C, 0.3659f)) { + if (anctrl_isAt(sp1C, 0.3659f)) { FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 1.0f, 14000); func_80299CF4(SFX_8B_KAZOOIE_RAWW, 1.0f, 28000); } - if (animctrl_isAt(sp1C, 0.6862f)) { + if (anctrl_isAt(sp1C, 0.6862f)) { FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 18000); func_80299CF4(SFX_38_BANJO_AYE_1, 1.0f, 22000); } - if (animctrl_isAt(sp1C, 0.92f)) { + if (anctrl_isAt(sp1C, 0.92f)) { baphysics_set_target_horizontal_velocity(0.0f); } - if (animctrl_getAnimTimer(sp1C) < 0.8) { + if (anctrl_getAnimTimer(sp1C) < 0.8) { func_802929F8(); } } @@ -572,7 +572,7 @@ void func_802A48B4(void) { switch (D_8037D344) { case 0: func_802A47E0(); - if (animctrl_isAt(sp18, 0.2f) != 0) { + if (anctrl_isAt(sp18, 0.2f) != 0) { if (item_getCount(ITEM_14_HEALTH) == 0) { func_8029C984(); func_8029151C(0xD); @@ -581,19 +581,19 @@ void func_802A48B4(void) { batimer_set(0, 2.5f); D_8037D344 = 2; } - } else if (animctrl_isAt(sp18, 0.92f)) { + } else if (anctrl_isAt(sp18, 0.92f)) { baanim_playForDuration_once(ASSET_D2_ANIM_BSSPLAT, 2.25f); D_8037D344 = 1; } break; case 1: - if (animctrl_isAt(sp18, 0.219f)) { + if (anctrl_isAt(sp18, 0.219f)) { func_80299CF4(SFX_36_BANJO_DOH, 1.0f, 16000); } - if (animctrl_isAt(sp18, 0.63f)) { + if (anctrl_isAt(sp18, 0.63f)) { next_state = BS_20_LANDING; } - if (animctrl_isStopped(sp18)) { + if (anctrl_isStopped(sp18)) { next_state = BS_1_IDLE; } if (func_8028B094()) { @@ -636,7 +636,7 @@ void func_802A4A78(s32 arg0) { func_802BB3DC(2, 100.0f, 0.85f); baanim_playForDuration_onceSmooth(ASSET_D3_ANIM_BSBFLY_BEAKBOMB_REBOUND, 1.2f); func_80299BFC(1.0f); - rumbleManager_80250D94(1.0f, 0.5f, 0.5f); + baMotor_80250D94(1.0f, 0.5f, 0.5f); _player_getPosition(sp3C); func_80294980(sp30); func_80257F18(sp30, sp3C, &sp28); @@ -664,7 +664,7 @@ void func_802A4C34(s32 arg0) { s32 next_state; next_state = 0; - if (animctrl_isStopped(baanim_getAnimCtrlPtr())) { + if (anctrl_isStopped(baanim_getAnimCtrlPtr())) { next_state = BS_24_FLY; } if (player_isStable()) { @@ -743,7 +743,7 @@ void func_802A4EC8(void) { if (player_isStable()) { next_state = BS_20_LANDING; } - if (animctrl_isStopped(sp18) && (func_8028B094() || func_80294530())) { + if (anctrl_isStopped(sp18) && (func_8028B094() || func_80294530())) { D_8037D346 = 1; next_state = BS_24_FLY; } @@ -768,7 +768,7 @@ void func_802A4FC8(void) { s32 next_state; next_state = 0; - if (animctrl_isAt(baanim_getAnimCtrlPtr(), 0.1358f) != 0) { + if (anctrl_isAt(baanim_getAnimCtrlPtr(), 0.1358f) != 0) { func_8030EBC8(SFX_2_CLAW_SWIPE, 0.6f, 0.7f, 10000, 12000); } if (func_80298850() == 0) { diff --git a/src/core2/bs/bLongLeg.c b/src/core2/bs/bLongLeg.c index ac23a10b..2710a3ac 100644 --- a/src/core2/bs/bLongLeg.c +++ b/src/core2/bs/bLongLeg.c @@ -95,12 +95,12 @@ void func_802A5404(void){ void __bsblongleg_enterFromTrot(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_40_ANIM_BSLONGLEG_ENTER_FROM_BTROT); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsblongleg.c", 0xe1); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_40_ANIM_BSLONGLEG_ENTER_FROM_BTROT); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsblongleg.c", 0xe1); stateTimer_set(STATE_TIMER_2_LONGLEG, D_8037D35C); func_803219F4(2); func_8030E2C4(D_8037D361); @@ -109,12 +109,12 @@ void __bsblongleg_enterFromTrot(void){ void __bsblongleg_enter(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_16_ANIM_BSBTROT_ENTER); - animctrl_setDuration(aCtrl, 0.5f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsblongleg.c", 0xf6); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_16_ANIM_BSBTROT_ENTER); + anctrl_setDuration(aCtrl, 0.5f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsblongleg.c", 0xf6); D_8037D360 = 0; } @@ -140,11 +140,11 @@ void bsblongleg_enter_update(void){ func_80299594(1, 0.5f); switch(D_8037D360){ case 0: - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) __bsblongleg_enterFromTrot(); break; case 1: - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) next_state = BS_26_LONGLEG_IDLE; break; } @@ -200,10 +200,10 @@ void bsblongleg_stand_end(void){ void bsblongleg_walk_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_42_ANIM_BSLONGLEG_WALK); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); - animctrl_start(aCtrl, "bsblongleg.c", 0x1a1); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_42_ANIM_BSLONGLEG_WALK); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); + anctrl_start(aCtrl, "bsblongleg.c", 0x1a1); func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL); baanim_setVelocityMapRanges(D_80364A40, D_80364A44, D_80364A48, D_80364A4C); } @@ -215,10 +215,10 @@ void bsblongleg_walk_update(void){ func_80299594(1, 0.5f); func_8029AD28(0.47f, 4); func_8029AD28(0.97f, 3); - if(animctrl_isAt(aCtrl, 0.7781f)) + if(anctrl_isAt(aCtrl, 0.7781f)) func_802A5208(0); - if(animctrl_isAt(aCtrl, 0.2781f)) + if(anctrl_isAt(aCtrl, 0.2781f)) func_802A5208(1); func_802A524C(); @@ -249,25 +249,25 @@ void bsblongleg_walk_end(void){ void func_802A5AB0(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setDirection(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_40_ANIM_BSLONGLEG_ENTER_FROM_BTROT); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsblongleg.c", 0x200); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setDirection(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_40_ANIM_BSLONGLEG_ENTER_FROM_BTROT); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsblongleg.c", 0x200); D_8037D360 = 0; } void func_802A5B34(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_7_ANIM_BSBTROT_EXIT); - animctrl_setDuration(aCtrl, 0.6f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsblongleg.c", 0x210); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_7_ANIM_BSBTROT_EXIT); + anctrl_setDuration(aCtrl, 0.6f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsblongleg.c", 0x210); D_8037D360 = 1; } @@ -288,15 +288,15 @@ void bsblongleg_exit_update(void){ func_80299628(1); switch(D_8037D360){ case 0://L802A5C7C - if(animctrl_isAt(aCtrl, 0.68f)) + if(anctrl_isAt(aCtrl, 0.68f)) func_8030E2C4(D_8037D361); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) func_802A5B34(); break; case 1://L802A5CB4 - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) next_state = BS_1_IDLE; break; } @@ -316,14 +316,14 @@ void bsblongleg_exit_end(void){ void bsblongleg_jump_init(void){ AnimCtrl * aCtrl = baanim_getAnimCtrlPtr(); D_8037D350 = 0.14f; - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_3D_ANIM_BSLONGLEG_JUMP); - animctrl_setTransitionDuration(aCtrl, 0.134f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setStart(aCtrl, D_8037D350); - animctrl_setSubRange(aCtrl, 0.0f, 0.42f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsblongleg.c", 0x27F); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_3D_ANIM_BSLONGLEG_JUMP); + anctrl_setTransitionDuration(aCtrl, 0.134f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setStart(aCtrl, D_8037D350); + anctrl_setSubRange(aCtrl, 0.0f, 0.42f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsblongleg.c", 0x27F); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) yaw_setIdeal(func_8029B33C()); @@ -352,37 +352,37 @@ void bsblongleg_jump_update(void){ switch(D_8037D360){ case 0://L802A5F24 if((sp34[1] < 100.0f) || sp30 < 10.0f) - animctrl_setDuration(aCtrl, 0.4f); + anctrl_setDuration(aCtrl, 0.4f); - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.5282f); - animctrl_setDuration(aCtrl, 4.5f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.5282f); + anctrl_setDuration(aCtrl, 4.5f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D360 = 1; } break; case 1://L802A5FA8 - if((0.4 < animctrl_getAnimTimer(aCtrl)) && sp30 < 70.0f){ - D_8037D350 = animctrl_getAnimTimer(aCtrl); + if((0.4 < anctrl_getAnimTimer(aCtrl)) && sp30 < 70.0f){ + D_8037D350 = anctrl_getAnimTimer(aCtrl); D_8037D354 = sp30; - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); D_8037D360 = 2; } break; case 2://L802A6020 - animctrl_setAnimTimer(aCtrl, ml_map_f(sp30, D_8037D354, 1.0f, D_8037D350, 0.6703f)); + anctrl_setAnimTimer(aCtrl, ml_map_f(sp30, D_8037D354, 1.0f, D_8037D350, 0.6703f)); func_80299594(1, 0.5f); if(player_isStable()){ func_8029C5E8(); - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.3f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.3f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D360 = 3; } break; case 3://L802A60AC func_80299594(1, 0.5f); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp44 = BS_26_LONGLEG_IDLE; if(button_pressed(BUTTON_A)) @@ -409,11 +409,11 @@ void bsblongleg_jump_end(void){ void bsblongleg_slide_init(void){ AnimCtrl * aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_3D_ANIM_BSLONGLEG_JUMP); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_setStart(aCtrl, 0.0865f); - animctrl_start(aCtrl, "bsblongleg.c", 0x339); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_3D_ANIM_BSLONGLEG_JUMP); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_setStart(aCtrl, 0.0865f); + anctrl_start(aCtrl, "bsblongleg.c", 0x339); func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION); baphysics_set_target_yaw(yaw_getIdeal()); baphysics_set_horizontal_velocity(yaw_getIdeal(), baphysics_get_target_horizontal_velocity()); diff --git a/src/core2/bs/bPeck.c b/src/core2/bs/bPeck.c index 7de0cb00..60b1fd47 100644 --- a/src/core2/bs/bPeck.c +++ b/src/core2/bs/bPeck.c @@ -6,7 +6,7 @@ #include "core2/ba/physics.h" void baModel_80292048(s32, f32, f32, f32); -void animctrl_start(AnimCtrl *, char *, s32); +void anctrl_start(AnimCtrl *, char *, s32); /* .data */ f32 D_80364A60 = -1400.0f; @@ -83,37 +83,37 @@ void bsbpeck_update(void){ switch(D_8037D374){ case 0://L802A6770 - if(animctrl_isAt(aCtrl, 0.9126f)){ - animctrl_setIndex(aCtrl, ASSET_19_ANIM_BSBPECK_ENTER); - animctrl_setStart(aCtrl, 0.0f); - animctrl_setDuration(aCtrl, 0.35f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); - animctrl_start(aCtrl, "bsbpeck.c", 0xbd); + if(anctrl_isAt(aCtrl, 0.9126f)){ + anctrl_setIndex(aCtrl, ASSET_19_ANIM_BSBPECK_ENTER); + anctrl_setStart(aCtrl, 0.0f); + anctrl_setDuration(aCtrl, 0.35f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); + anctrl_start(aCtrl, "bsbpeck.c", 0xbd); D_8037D370 = 0.5f; D_8037D374 = 1; } break; case 1://L802A67E8 - if(animctrl_isAt(aCtrl, 0.1621f)) + if(anctrl_isAt(aCtrl, 0.1621f)) func_802A664C(); - if(animctrl_isAt(aCtrl, 0.7f)) + if(anctrl_isAt(aCtrl, 0.7f)) func_802A664C(); D_8037D370 -= time_getDelta(); if(D_8037D370 < 0.0f){ - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_1A_ANIM_BSBPECK); - animctrl_setDirection(aCtrl, 0); - animctrl_setDuration(aCtrl, 0.2f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbpeck.c", 0xd4); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_1A_ANIM_BSBPECK); + anctrl_setDirection(aCtrl, 0); + anctrl_setDuration(aCtrl, 0.2f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbpeck.c", 0xd4); D_8037D374 = 2; } break; case 2://L802A68C4 - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp24 = BS_2F_FALL; break; }//L802A68D8 diff --git a/src/core2/bs/bShock.c b/src/core2/bs/bShock.c index 8f0aa431..cce81f95 100644 --- a/src/core2/bs/bShock.c +++ b/src/core2/bs/bShock.c @@ -16,13 +16,13 @@ u8 D_8037D382; /* .code */ void bsbshock_charge_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_48_ANIM_BSBSHOCK_CHARGE); - animctrl_setTransitionDuration(aCtrl, 0.4f); - animctrl_setDuration(aCtrl, 4.2f); - animctrl_setSubRange(aCtrl, 0.0f, 0.1061f); - animctrl_setPlaybackType(aCtrl,1); - animctrl_start(aCtrl, "bsbshock.c", 0x61); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_48_ANIM_BSBSHOCK_CHARGE); + anctrl_setTransitionDuration(aCtrl, 0.4f); + anctrl_setDuration(aCtrl, 4.2f); + anctrl_setSubRange(aCtrl, 0.0f, 0.1061f); + anctrl_setPlaybackType(aCtrl,1); + anctrl_start(aCtrl, "bsbshock.c", 0x61); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) @@ -69,26 +69,26 @@ void bsbshock_charge_update(void){ sp2C = BS_3D_FALL_TUMBLING; if(func_8028B254(0x82)){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 2.8f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 2.8f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D381 = 1; } break; case 1: - if(animctrl_isAt(aCtrl, 0.11f)) + if(anctrl_isAt(aCtrl, 0.11f)) func_8030E2C4(D_8037D382); - if(animctrl_isAt(aCtrl, 0.4036f)) - animctrl_setDuration(aCtrl, 1.4f); + if(anctrl_isAt(aCtrl, 0.4036f)) + anctrl_setDuration(aCtrl, 1.4f); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp2C = BS_1_IDLE; break; }//L802A6CAC if(func_8028B254(0x3C)){ - if(animctrl_getAnimTimer(aCtrl) < 0.3637 && button_released(8)){ + if(anctrl_getAnimTimer(aCtrl) < 0.3637 && button_released(8)){ D_8037D380 = 0; }//L802A6CF4 if(player_isStable()) @@ -101,10 +101,10 @@ void bsbshock_charge_update(void){ if(should_beak_bust()) sp2C = BS_F_BBUSTER; }//L802A6D44 - if(animctrl_isAt( aCtrl, 0.3637f) && D_8037D380) + if(anctrl_isAt( aCtrl, 0.3637f) && D_8037D380) sp2C = BS_BSHOCK_JUMP; - if(animctrl_isAt(aCtrl, 0.5551f)){ + if(anctrl_isAt(aCtrl, 0.5551f)){ baphysics_set_vertical_velocity(180.0f); baModel_80292158(0.0f); func_80298528(50.0f); @@ -127,14 +127,14 @@ void bsbshock_charge_end(void){ void bsbshock_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_49_ANIM_BSBSHOCK_JUMP); - animctrl_setDuration(aCtrl, 0.8f); - animctrl_setStart(aCtrl, 0.5304f); - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setPlaybackType(aCtrl,1); - animctrl_start(aCtrl, "bsbshock.c", 0x13a); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_49_ANIM_BSBSHOCK_JUMP); + anctrl_setDuration(aCtrl, 0.8f); + anctrl_setStart(aCtrl, 0.5304f); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setPlaybackType(aCtrl,1); + anctrl_start(aCtrl, "bsbshock.c", 0x13a); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) @@ -161,7 +161,7 @@ void bsbshock_update(void){ func_802B6FA8(); baphysics_get_velocity(sp20); - if(animctrl_isAt(aCtrl, 0.7f)) + if(anctrl_isAt(aCtrl, 0.7f)) sfxsource_playHighPriority(SFX_53_BANJO_HUIII); if(button_released(BUTTON_A) && 0.0f < sp20[1]) diff --git a/src/core2/bs/bSwim.c b/src/core2/bs/bSwim.c index 499736b7..a401d20e 100644 --- a/src/core2/bs/bSwim.c +++ b/src/core2/bs/bSwim.c @@ -155,11 +155,11 @@ void func_802A7738(void) { temp_v0 = baanim_getAnimCtrlPtr(); temp_s0 = temp_v0; - animctrl_reset(temp_v0); - animctrl_setIndex(temp_s0, ASSET_3F_ANIM_BSSWIM_DIVE_MOVE); - animctrl_setStart(temp_s0, 0.4626f); - animctrl_setDuration(temp_s0, 1.0f); - animctrl_start(temp_s0, "bsbswim.c", 0x186); + anctrl_reset(temp_v0); + anctrl_setIndex(temp_s0, ASSET_3F_ANIM_BSSWIM_DIVE_MOVE); + anctrl_setStart(temp_s0, 0.4626f); + anctrl_setDuration(temp_s0, 1.0f); + anctrl_start(temp_s0, "bsbswim.c", 0x186); func_802A7140(); func_802A744C(); D_8037D390 = 0.0f; @@ -192,27 +192,27 @@ void func_802A7838(void) { func_802A77D8(); D_8037D390 = ml_max_f(D_8037D390 - 10.0f, 0.0f); } - if (animctrl_isAt(anim_ctrl, 0.1f)) { + if (anctrl_isAt(anim_ctrl, 0.1f)) { func_8030EB88(SFX_0_BLOOP, 1.2f, 1.4f); D_8037D390 = 600.0f; } - if (animctrl_isAt(anim_ctrl, 0.4626f)) { - animctrl_setDuration(anim_ctrl, 1.0f); + if (anctrl_isAt(anim_ctrl, 0.4626f)) { + anctrl_setDuration(anim_ctrl, 1.0f); } - if (animctrl_isAt(anim_ctrl, 0.2766f)) { - animctrl_setDuration(anim_ctrl, 3.0f); + if (anctrl_isAt(anim_ctrl, 0.2766f)) { + anctrl_setDuration(anim_ctrl, 3.0f); } if (!button_held(BUTTON_B)) { if (button_held(BUTTON_A)) { - temp_f2 = (f64) animctrl_getAnimTimer(anim_ctrl); + temp_f2 = (f64) anctrl_getAnimTimer(anim_ctrl); if (temp_f2 <= 0.4625 && 0.1 < temp_f2) { next_state = BS_39_DIVE_A; } - } else if (animctrl_isAt(anim_ctrl, 0.4625f)) { + } else if (anctrl_isAt(anim_ctrl, 0.4625f)) { next_state = BS_2B_DIVE_IDLE; } } - if (animctrl_isAt(anim_ctrl, 0.4625f) && !button_held(BUTTON_B)) { + if (anctrl_isAt(anim_ctrl, 0.4625f) && !button_held(BUTTON_B)) { if (button_held(BUTTON_A)) { next_state = BS_39_DIVE_A; } else { @@ -251,13 +251,13 @@ void func_802A7AB0(void) { func_802A71D8(); func_802A7304(); func_802A77D8(); - if (animctrl_isAt(anim_ctl, 0.17f)) { + if (anctrl_isAt(anim_ctl, 0.17f)) { func_8030E760(SFX_0_BLOOP, 1.9f, 10000); } - if (animctrl_isAt(anim_ctl, 0.67f)) { + if (anctrl_isAt(anim_ctl, 0.67f)) { func_8030E760(SFX_0_BLOOP, 1.7f, 10000); } - if (animctrl_isAt(anim_ctl, 0.99f)) { + if (anctrl_isAt(anim_ctl, 0.99f)) { if (!button_held(BUTTON_A)) { next_state = BS_2B_DIVE_IDLE; } @@ -315,7 +315,7 @@ void func_802A7CA8(void) { if (baanim_isAt(0.3f)) { func_80292EA4(); } - if (animctrl_isStopped(baanim_getAnimCtrlPtr())) { + if (anctrl_isStopped(baanim_getAnimCtrlPtr())) { next_state = BS_2B_DIVE_IDLE; } bs_setState(next_state); @@ -354,7 +354,7 @@ void func_802A7E2C(void) { switch (D_8037D396) { case 0: pitch_setIdeal(50.0f); - if (animctrl_isAt(sp38, 0.7247f)) { + if (anctrl_isAt(sp38, 0.7247f)) { sp34 = pitch_get(); sp30 = yaw_get(); func_80256E24(sp24, sp34, sp30, 0.0f, 0.0f, 800.0f); @@ -369,7 +369,7 @@ void func_802A7E2C(void) { } break; } - if (animctrl_isAt(sp38, 0.6f)) { + if (anctrl_isAt(sp38, 0.6f)) { func_8030E4E4(SFX_0_BLOOP); } if (!player_inWater()) { @@ -521,19 +521,19 @@ void func_802A846C(void) { sp28 = ml_max_f(sp28, 600.0f); } if (sp28 > 80.0f) { - animctrl_reset(temp_s0); - animctrl_setIndex(temp_s0, ASSET_4F_ANIM_BSTWIRL); - animctrl_setPlaybackType(temp_s0, ANIMCTRL_STOPPED); - animctrl_setDuration(temp_s0, 1.2f); - animctrl_setStart(temp_s0, 0.8204f); - animctrl_start(temp_s0, "bsbswim.c", 0x417); + anctrl_reset(temp_s0); + anctrl_setIndex(temp_s0, ASSET_4F_ANIM_BSTWIRL); + anctrl_setPlaybackType(temp_s0, ANIMCTRL_STOPPED); + anctrl_setDuration(temp_s0, 1.2f); + anctrl_setStart(temp_s0, 0.8204f); + anctrl_start(temp_s0, "bsbswim.c", 0x417); } else { - animctrl_reset(temp_s0); - animctrl_setIndex(temp_s0, ASSET_57_ANIM_BSSWIM_IDLE); - animctrl_setPlaybackType(temp_s0, ANIMCTRL_LOOP); - animctrl_setDuration(temp_s0, 1.2f); - animctrl_setStart(temp_s0, 0.6412f); - animctrl_start(temp_s0, "bsbswim.c", 0x41E); + anctrl_reset(temp_s0); + anctrl_setIndex(temp_s0, ASSET_57_ANIM_BSSWIM_IDLE); + anctrl_setPlaybackType(temp_s0, ANIMCTRL_LOOP); + anctrl_setDuration(temp_s0, 1.2f); + anctrl_setStart(temp_s0, 0.6412f); + anctrl_start(temp_s0, "bsbswim.c", 0x41E); } D_8037D398 = ml_map_f(sp28, 40.0f, 1000.0f, -300.0f, -1200.0f); baphysics_set_vertical_velocity(D_8037D398); diff --git a/src/core2/bs/bTrot.c b/src/core2/bs/bTrot.c index 30de1a3b..18e0a1ed 100644 --- a/src/core2/bs/bTrot.c +++ b/src/core2/bs/bTrot.c @@ -161,10 +161,10 @@ int func_802A8C60(void){ } void _bsbtrot_802A8C98(AnimCtrl *aCtrl, enum asset_e arg1){ - if(animctrl_getIndex(aCtrl) != arg1){ - animctrl_setIndex(aCtrl, arg1); - animctrl_setStart(aCtrl, animctrl_getAnimTimer(aCtrl)); - animctrl_start(aCtrl, "bsbtrot.c", 0x12e); + if(anctrl_getIndex(aCtrl) != arg1){ + anctrl_setIndex(aCtrl, arg1); + anctrl_setStart(aCtrl, anctrl_getAnimTimer(aCtrl)); + anctrl_start(aCtrl, "bsbtrot.c", 0x12e); } } @@ -226,10 +226,10 @@ void bsbtrot_enter_update(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); func_802952A8(0,1); func_80299628(1); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) next_state = BS_15_BTROT_IDLE; - if(0.5 < animctrl_getAnimTimer(aCtrl)) + if(0.5 < anctrl_getAnimTimer(aCtrl)) next_state = func_802A8D84(next_state); bs_setState(next_state); @@ -298,11 +298,11 @@ void bsbtrot_walk_update(void){ _bsbtrot_802A8C98(aCtrl, func_802A9030()); func_80299628(1); func_802A89D4(); - if(animctrl_isAt(aCtrl, 0.2781f)) + if(anctrl_isAt(aCtrl, 0.2781f)) func_802A880C(1); func_8029AD28(0.2781f, 4); - if(animctrl_isAt(aCtrl, 0.7781f)) + if(anctrl_isAt(aCtrl, 0.7781f)) func_802A880C(0); func_8029AD28(0.7781f, 3); @@ -310,7 +310,7 @@ void bsbtrot_walk_update(void){ func_802A87C0(); } else{ - if(animctrl_isAt(aCtrl, 0.2115f) || animctrl_isAt(aCtrl, 0.7115f)) + if(anctrl_isAt(aCtrl, 0.2115f) || anctrl_isAt(aCtrl, 0.7115f)) func_802A87C0(); } if(!func_8029B300() && baphysics_is_slower_than(1.0f)) @@ -344,14 +344,14 @@ void func_802A9320(void){} void bsbtrot_jump_init(void){ AnimCtrl * aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_27_ANIM_BSBTROR_JUMP); - animctrl_setDuration(aCtrl, 1.4f); - animctrl_setTransitionDuration(aCtrl, 0.1f); - animctrl_setStart(aCtrl, 0.2f); - animctrl_setSubRange(aCtrl, 0.0f, 0.4002f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbtrot.c", 0x272); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_27_ANIM_BSBTROR_JUMP); + anctrl_setDuration(aCtrl, 1.4f); + anctrl_setTransitionDuration(aCtrl, 0.1f); + anctrl_setStart(aCtrl, 0.2f); + anctrl_setSubRange(aCtrl, 0.0f, 0.4002f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbtrot.c", 0x272); func_802A8A40(); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(1); @@ -388,18 +388,18 @@ void bsbtrot_jump_update(void){ switch(D_8037D3A4){ case 0://L802A9530 - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.4653f); - animctrl_setDuration(aCtrl, 10.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.4653f); + anctrl_setDuration(aCtrl, 10.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 1; } break; case 1://L802A9578 if(func_8028B254(0x8C)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.7328f); - animctrl_setDuration(aCtrl, 1.4f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.7328f); + anctrl_setDuration(aCtrl, 1.4f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 2; } break; @@ -407,9 +407,9 @@ void bsbtrot_jump_update(void){ func_80299628(1); if(player_isStable()){ func_8029C5E8(); - animctrl_setSubRange(aCtrl, 0.0f, 0.8798f); - animctrl_setDuration(aCtrl, 0.9f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.8798f); + anctrl_setDuration(aCtrl, 0.9f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); func_8029957C(1); D_8037D3A4 = 3; if(220.0f < baphysics_get_target_horizontal_velocity()) @@ -422,10 +422,10 @@ void bsbtrot_jump_update(void){ func_80299AAC(); func_802A9320(); func_80299628(1); - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.8898f); - animctrl_setDuration(aCtrl, 2.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.8898f); + anctrl_setDuration(aCtrl, 2.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 4; } func_8029C22C(); @@ -436,10 +436,10 @@ void bsbtrot_jump_update(void){ func_802A9320(); func_80299628(1); - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.2f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.2f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 5; } func_8029C22C(); @@ -449,7 +449,7 @@ void bsbtrot_jump_update(void){ func_80299AAC(); func_802A9320(); func_80299628(1); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp2C = BS_15_BTROT_IDLE; break; }//LL802A97D0 @@ -487,7 +487,7 @@ void bsbtrot_exit_init(void){ void bsbtrot_exit_update(void){ enum bs_e sp1C = 0; - if(animctrl_isStopped(baanim_getAnimCtrlPtr())) + if(anctrl_isStopped(baanim_getAnimCtrlPtr())) sp1C = BS_1_IDLE; bs_setState(sp1C); @@ -499,11 +499,11 @@ void bsbtrot_exit_end(void){ void bsbtrot_slide_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_27_ANIM_BSBTROR_JUMP); - animctrl_setStart(aCtrl, 0.069f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_start(aCtrl, "bsbtrot.c", 0x382); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_27_ANIM_BSBTROR_JUMP); + anctrl_setStart(aCtrl, 0.069f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_start(aCtrl, "bsbtrot.c", 0x382); func_802A8A40(); func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION); baphysics_set_target_yaw(yaw_getIdeal()); @@ -566,12 +566,12 @@ int bsbtrot_inSet(s32 move_indx){ void bsbtrot_fall_init(void){ AnimCtrl * aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_27_ANIM_BSBTROR_JUMP); - animctrl_setDuration(aCtrl, 1.4f); - animctrl_setStart(aCtrl, 0.4653f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_start(aCtrl, "bsbtrot.c", 0x400); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_27_ANIM_BSBTROR_JUMP); + anctrl_setDuration(aCtrl, 1.4f); + anctrl_setStart(aCtrl, 0.4653f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_start(aCtrl, "bsbtrot.c", 0x400); func_802A8A40(); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); baphysics_set_target_yaw(yaw_getIdeal()); @@ -597,9 +597,9 @@ void bsbtrot_fall_update(void){ switch (D_8037D3A4){ case 0://L802A9D90 if(func_8028B254(0x8C)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.7328f); - animctrl_setDuration(aCtrl, 1.4f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.7328f); + anctrl_setDuration(aCtrl, 1.4f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 1; } break; @@ -607,9 +607,9 @@ void bsbtrot_fall_update(void){ func_80299628(1); if(player_isStable()){ func_8029C5E8(); - animctrl_setSubRange(aCtrl, 0.0f, 0.8798f); - animctrl_setDuration(aCtrl, 0.9f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.8798f); + anctrl_setDuration(aCtrl, 0.9f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); func_8029957C(1); if(220.0f < baphysics_get_target_horizontal_velocity()){ func_80299AAC(); @@ -624,10 +624,10 @@ void bsbtrot_fall_update(void){ func_802A9320(); func_80299628(1); - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.8898f); - animctrl_setDuration(aCtrl, 2.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.8898f); + anctrl_setDuration(aCtrl, 2.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 3; } func_8029C22C(); @@ -638,10 +638,10 @@ void bsbtrot_fall_update(void){ func_802A9320(); func_80299628(1); - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.2f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.2f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3A4 = 4; } func_8029C22C(); @@ -652,7 +652,7 @@ void bsbtrot_fall_update(void){ func_802A9320(); func_80299628(1); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp2C = BS_15_BTROT_IDLE; break; }//LL802A9FE8 @@ -742,7 +742,7 @@ void bsbtrot_ow_update(void){ if(player_isStable() && baanim_isStopped()) sp1C = BS_15_BTROT_IDLE; - if(animctrl_isStopped(baanim_getAnimCtrlPtr()) && player_inWater()) + if(anctrl_isStopped(baanim_getAnimCtrlPtr()) && player_inWater()) sp1C = BS_2D_SWIM_IDLE; bs_setState(sp1C); diff --git a/src/core2/bs/bWhirl.c b/src/core2/bs/bWhirl.c index cda6162c..16f5abab 100644 --- a/src/core2/bs/bWhirl.c +++ b/src/core2/bs/bWhirl.c @@ -96,7 +96,7 @@ void bsbwhirl_enter_init(void){ void bsbwhirl_enter_update(void){ enum bs_e sp1C = 0; func_802952A8(1,1); - if(animctrl_isStopped(baanim_getAnimCtrlPtr())) + if(anctrl_isStopped(baanim_getAnimCtrlPtr())) sp1C = BS_1B_WONDERWING_IDLE; bs_setState(sp1C); } @@ -172,14 +172,14 @@ void bsbwhirl_walk_end(void){ void bsbwhirl_jump_init(void){ AnimCtrl * aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_1B_ANIM_BSWHIRL_JUMP); - animctrl_setDuration(aCtrl, 0.8f); - animctrl_setTransitionDuration(aCtrl, 0.134f); - animctrl_setStart(aCtrl, 0.14f); - animctrl_setSubRange(aCtrl, 0.0f, 0.4495f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbwhirl.c", 0x181); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_1B_ANIM_BSWHIRL_JUMP); + anctrl_setDuration(aCtrl, 0.8f); + anctrl_setTransitionDuration(aCtrl, 0.134f); + anctrl_setStart(aCtrl, 0.14f); + anctrl_setSubRange(aCtrl, 0.0f, 0.4495f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbwhirl.c", 0x181); func_8029C7F4(1,1,3,BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) yaw_setIdeal(func_8029B33C()); @@ -207,9 +207,9 @@ void bsbwhirl_jump_update(void){ switch(D_8037D3B4){ case 0://L802AAB48 if(func_8028B254(0x82)){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 0.8f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 0.8f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D3B4 = 1; } break; @@ -223,7 +223,7 @@ void bsbwhirl_jump_update(void){ } break; case 2://L802AABC8 - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp2C = BS_1B_WONDERWING_IDLE; sp2C = func_802AA510(sp2C); break; @@ -243,13 +243,13 @@ void bsbwhirl_jump_end(void){ void bsbwhirl_exit_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setDirection(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_22_ANIM_BSWHIRL_EXIT); - animctrl_setDuration(aCtrl, 0.5f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbwhirl.c", 0x201); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setDirection(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_22_ANIM_BSWHIRL_EXIT); + anctrl_setDuration(aCtrl, 0.5f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbwhirl.c", 0x201); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); func_8029957C(2); baphysics_set_target_horizontal_velocity(0.0f); @@ -259,7 +259,7 @@ void bsbwhirl_exit_init(void){ void bsbwhirl_exit_update(void){ enum bs_e sp1C = 0; - if(animctrl_isStopped(baanim_getAnimCtrlPtr())) + if(anctrl_isStopped(baanim_getAnimCtrlPtr())) sp1C = BS_1_IDLE; bs_setState(sp1C); diff --git a/src/core2/bs/bbuster.c b/src/core2/bs/bbuster.c index 48d6f33b..5a5cd99d 100644 --- a/src/core2/bs/bbuster.c +++ b/src/core2/bs/bbuster.c @@ -57,13 +57,13 @@ void bsbbuster_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); f32 sp20[3]; - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_1D_ANIM_BSBBUSTER); - animctrl_setDuration(aCtrl, 1.02f); - animctrl_setSubRange(aCtrl, 0.0f, 0.35f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsbbuster.c", 0x81); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_1D_ANIM_BSBBUSTER); + anctrl_setDuration(aCtrl, 1.02f); + anctrl_setSubRange(aCtrl, 0.0f, 0.35f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsbbuster.c", 0x81); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); baphysics_set_gravity(0.0f); baphysics_set_target_horizontal_velocity(0.0f); @@ -90,13 +90,13 @@ void bsbbuster_update(void){ f32 player_position[3]; D_8037D2B8 = 0; - if(animctrl_isAt(aCtrl, 0.24f)) + if(anctrl_isAt(aCtrl, 0.24f)) func_80299BD4(); switch(D_8037D2BA){ case 0://8029FDF0 - if(animctrl_isStopped(baanim_getAnimCtrlPtr())){ - animctrl_setDuration(aCtrl, 0.4f); + if(anctrl_isStopped(baanim_getAnimCtrlPtr())){ + anctrl_setDuration(aCtrl, 0.4f); D_8037D2BA = 1; } break; @@ -121,7 +121,7 @@ void bsbbuster_update(void){ D_8037D2B4++; } if(D_8037D2B6 == 0 && func_8028B254(0x4b)){ - rumbleManager_80250D94(1.0f, 0.3f, 0.4f); + baMotor_80250D94(1.0f, 0.3f, 0.4f); D_8037D2B6++; } D_8037D2B9 = miscFlag_isTrue(MISC_FLAG_8); @@ -169,24 +169,24 @@ void bsbbuster_update(void){ baphysics_set_gravity(D_8036499C); } - animctrl_setSubRange(aCtrl, 0.0f, 0.7299f); - animctrl_setDuration(aCtrl, 1.9f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.7299f); + anctrl_setDuration(aCtrl, 1.9f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D2BA = 4; } break; case 4://802A01CC func_802B6FA8(); - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.74f); - animctrl_setDuration(aCtrl, 15.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.74f); + anctrl_setDuration(aCtrl, 15.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); } if(player_isStable()){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.9f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.9f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); sp44 = BS_20_LANDING; } break; diff --git a/src/core2/bs/beeFly.c b/src/core2/bs/beeFly.c index 4b020ea7..e03425dc 100644 --- a/src/core2/bs/beeFly.c +++ b/src/core2/bs/beeFly.c @@ -60,7 +60,7 @@ void func_802A0630(void){ mvmnt = baanim_getAnimCtrlPtr(); switch(D_8037D2C0){ case 0: - if(!animctrl_isAt(mvmnt, 0.266f)) + if(!anctrl_isAt(mvmnt, 0.266f)) break; baphysics_set_vertical_velocity(1600.0f); func_8030E58C(SFX_C_TAKING_FLIGHT_LIFTOFF, 0.7f); @@ -68,7 +68,7 @@ void func_802A0630(void){ break; case 1: func_802A04F0(); - if(animctrl_isStopped(mvmnt)) + if(anctrl_isStopped(mvmnt)) baanim_playForDuration_loopSmooth(ASSET_1DC_ANIM_BEE_FLY, 0.38f); if(baphysics_get_vertical_velocity() < 0.0f) next_state = BS_BEE_FLY; @@ -192,7 +192,7 @@ void bsbeefly_update(void){ baflap_add(1.0f); } sp44 = baflap_getCount(); - animctrl_setDuration(sp48, D_803649B0[sp44]); + anctrl_setDuration(sp48, D_803649B0[sp44]); sp24 = &D_803649C4[sp44]; sp40 = 0.9f; sp40 += *sp24; diff --git a/src/core2/bs/beeMain.c b/src/core2/bs/beeMain.c index 5fd3a032..6417a58b 100644 --- a/src/core2/bs/beeMain.c +++ b/src/core2/bs/beeMain.c @@ -133,14 +133,14 @@ void func_802A12FC(void){ s0 = baanim_getAnimCtrlPtr(); func_802A0340(); - animctrl_reset(s0); - animctrl_setSmoothTransition(s0, 0); - animctrl_setIndex(s0, ASSET_1E2_ANIM_BEE_JUMP); - animctrl_setSubRange(s0, 0, 0.34f); - animctrl_setStart(s0, 0.1f); - animctrl_setDuration(s0, 1.2f); - animctrl_setPlaybackType(s0, ANIMCTRL_ONCE); - animctrl_start(s0, "bsbeemain.c", 0x15b); + anctrl_reset(s0); + anctrl_setSmoothTransition(s0, 0); + anctrl_setIndex(s0, ASSET_1E2_ANIM_BEE_JUMP); + anctrl_setSubRange(s0, 0, 0.34f); + anctrl_setStart(s0, 0.1f); + anctrl_setDuration(s0, 1.2f); + anctrl_setPlaybackType(s0, ANIMCTRL_ONCE); + anctrl_start(s0, "bsbeemain.c", 0x15b); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f){ yaw_setIdeal(func_8029B33C()); @@ -173,7 +173,7 @@ void func_802A1438(void){ baanim_setEndAndDuration(0.715f, 0.7f); D_8037D2D4 = 2; }else{ - if(animctrl_isStopped(sp28)){ + if(anctrl_isStopped(sp28)){ baanim_setEndAndDuration(0.51f, 4.0f); D_8037D2D4 = 1; } @@ -195,7 +195,7 @@ void func_802A1438(void){ break; case 3: func_80299628(0); - if(animctrl_isStopped(sp28)){ + if(anctrl_isStopped(sp28)){ baphysics_set_target_horizontal_velocity(0.0f); sp2c = BS_85_BEE_IDLE; } @@ -228,13 +228,13 @@ void func_802A1664(void){ s0 = baanim_getAnimCtrlPtr(); func_802A0340(); - animctrl_reset(s0); - animctrl_setIndex(s0, ASSET_1E2_ANIM_BEE_JUMP); - animctrl_setStart(s0, 0.34f); - animctrl_setDuration(s0, 8.0f); - animctrl_setSubRange(s0, 0, 0.51f); - animctrl_setPlaybackType(s0, ANIMCTRL_ONCE); - animctrl_start(s0, "bsbeemain.c", 0x1e2); + anctrl_reset(s0); + anctrl_setIndex(s0, ASSET_1E2_ANIM_BEE_JUMP); + anctrl_setStart(s0, 0.34f); + anctrl_setDuration(s0, 8.0f); + anctrl_setSubRange(s0, 0, 0.51f); + anctrl_setPlaybackType(s0, ANIMCTRL_ONCE); + anctrl_start(s0, "bsbeemain.c", 0x1e2); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); D_8037D2D4 = 0; } @@ -267,7 +267,7 @@ void func_802A170C(void){ break; case 2: func_80299628(0); - if(animctrl_isStopped(sp28)){ + if(anctrl_isStopped(sp28)){ baphysics_set_target_horizontal_velocity(0.0f); sp2c = BS_85_BEE_IDLE; } @@ -307,12 +307,12 @@ void func_802A18E8(s32 arg0){ //sp40 = arg0; sp3C = baanim_getAnimCtrlPtr(); func_802A0340(); - animctrl_reset(sp3C); - animctrl_setIndex(sp3C, ASSET_1E0_ANIM_BEE_OW); - animctrl_setDuration(sp3C, 1.0f); - animctrl_setSubRange(sp3C, 0, 0.7518f); - animctrl_setPlaybackType(sp3C, ANIMCTRL_ONCE); - animctrl_start(sp3C, "bsbeemain.c", 0x269); + anctrl_reset(sp3C); + anctrl_setIndex(sp3C, ASSET_1E0_ANIM_BEE_OW); + anctrl_setDuration(sp3C, 1.0f); + anctrl_setSubRange(sp3C, 0, 0.7518f); + anctrl_setPlaybackType(sp3C, ANIMCTRL_ONCE); + anctrl_start(sp3C, "bsbeemain.c", 0x269); if(arg0 == 1){ func_8030E58C(SFX_38_BANJO_AYE_1, 1.8f); }else{ @@ -400,13 +400,13 @@ void bsbeemain_die_init(void){ sp3C = baanim_getAnimCtrlPtr(); func_8029B930(); func_802A0340(); - animctrl_reset(sp3C); - animctrl_setSmoothTransition(sp3C, 0); - animctrl_setIndex(sp3C, ASSET_1E1_ANIM_BEE_DIE); - animctrl_setSubRange(sp3C, 0, 0.3966f); - animctrl_setDuration(sp3C, 1.7f); - animctrl_setPlaybackType(sp3C, ANIMCTRL_ONCE); - animctrl_start(sp3C, "bsbeemain.c", 0x2ef); + anctrl_reset(sp3C); + anctrl_setSmoothTransition(sp3C, 0); + anctrl_setIndex(sp3C, ASSET_1E1_ANIM_BEE_DIE); + anctrl_setSubRange(sp3C, 0, 0.3966f); + anctrl_setDuration(sp3C, 1.7f); + anctrl_setPlaybackType(sp3C, ANIMCTRL_ONCE); + anctrl_start(sp3C, "bsbeemain.c", 0x2ef); func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION); _player_getPosition(sp2C); func_80294980(sp20); diff --git a/src/core2/bs/carry.c b/src/core2/bs/carry.c index b40fcaca..70f37c82 100644 --- a/src/core2/bs/carry.c +++ b/src/core2/bs/carry.c @@ -31,10 +31,10 @@ void func_802AAEE0(void){ void bscarry_idle_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_72_ANIM_BSCARRY_IDLE); - animctrl_setDuration(aCtrl, 1.2f); - animctrl_start(aCtrl, "bscarry.c", 0x6f); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_72_ANIM_BSCARRY_IDLE); + anctrl_setDuration(aCtrl, 1.2f); + anctrl_start(aCtrl, "bscarry.c", 0x6f); func_8029C7F4(1,1,1, BA_PHYSICS_NORMAL); baphysics_set_target_horizontal_velocity(0.0f); pitch_setAngVel(1000.0f, 12.0f); @@ -59,11 +59,11 @@ void bscarry_idle_end(void){ void bscarry_walk_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_73_ANIM_BSCARRY_WALK); - animctrl_setDuration(aCtrl, 0.8f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); - animctrl_start(aCtrl, "bscarry.c", 0xac); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_73_ANIM_BSCARRY_WALK); + anctrl_setDuration(aCtrl, 0.8f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); + anctrl_start(aCtrl, "bscarry.c", 0xac); func_8029C7F4(2,1,1, BA_PHYSICS_NORMAL); baanim_setVelocityMapRanges(D_80364AF0, D_80364AF4, D_80364AF8, D_80364AFC); } diff --git a/src/core2/bs/claw.c b/src/core2/bs/claw.c index 18174341..78660220 100644 --- a/src/core2/bs/claw.c +++ b/src/core2/bs/claw.c @@ -29,29 +29,29 @@ void bsclaw_update(void){ AnimCtrl * aCtrl = baanim_getAnimCtrlPtr(); f32 sp24; - sp24 = animctrl_getAnimTimer(aCtrl); - _bsclawHitboxActive = animctrl_isAt(aCtrl, 0.1488f) + sp24 = anctrl_getAnimTimer(aCtrl); + _bsclawHitboxActive = anctrl_isAt(aCtrl, 0.1488f) || (0.04879999999999998 < sp24 && sp24 < 0.2488) - || animctrl_isAt(aCtrl, 0.3288f) + || anctrl_isAt(aCtrl, 0.3288f) || (0.22879999999999998 < sp24 && sp24 < 0.42879999999999998) - || animctrl_isAt(aCtrl, 0.5788f) + || anctrl_isAt(aCtrl, 0.5788f) || (0.4788 < sp24 && sp24 < 0.6788); - if(animctrl_isAt(aCtrl, 0.5788f)) + if(anctrl_isAt(aCtrl, 0.5788f)) baphysics_set_target_horizontal_velocity(0.0f); func_8029AD28(0.08f, 3); func_8029AD28(0.34f, 4); func_8029AD28(0.53f, 3); - if(animctrl_isAt(aCtrl, 0.1188f)) + if(anctrl_isAt(aCtrl, 0.1188f)) func_8030EB00(SFX_2_CLAW_SWIPE, 0.98f, 1.0f); - if(animctrl_isAt(aCtrl, 0.2888f)) + if(anctrl_isAt(aCtrl, 0.2888f)) func_8030EB00(SFX_2_CLAW_SWIPE, 1.04f, 1.06f); - if(animctrl_isAt(aCtrl, 0.4888f)) + if(anctrl_isAt(aCtrl, 0.4888f)) func_8030EB00(SFX_2_CLAW_SWIPE, 1.1f, 1.12f); - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp2C = BS_1_IDLE; if(!player_isStable()) diff --git a/src/core2/bs/climb.c b/src/core2/bs/climb.c index a75cc573..c9117b61 100644 --- a/src/core2/bs/climb.c +++ b/src/core2/bs/climb.c @@ -101,7 +101,7 @@ void bsclimb_idle_update(void){ } break; case 1: - if(animctrl_isStopped(anim_ctrl)){ + if(anctrl_isStopped(anim_ctrl)){ baanim_playForDuration_loopSmooth(ASSET_B2_ANIM_BSCLIMB_IDLE_2, 2.64f); func_802AB750(3.0f, 4.0f); D_8037D3D0 = 0; diff --git a/src/core2/bs/croc.c b/src/core2/bs/croc.c index 692872d9..84307ed0 100644 --- a/src/core2/bs/croc.c +++ b/src/core2/bs/croc.c @@ -183,14 +183,14 @@ void bscroc_walk_end(void){ void bscroc_jump_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, FALSE); - animctrl_setIndex(aCtrl, ASSET_11C_ANIM_BSCROC_JUMP); - animctrl_setSubRange(aCtrl, 0.0f, 0.35f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setStart(aCtrl, 0.1f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bscroc.c", 0x1ac); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, FALSE); + anctrl_setIndex(aCtrl, ASSET_11C_ANIM_BSCROC_JUMP); + anctrl_setSubRange(aCtrl, 0.0f, 0.35f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setStart(aCtrl, 0.1f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bscroc.c", 0x1ac); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f){ yaw_setIdeal(func_8029B33C()); @@ -222,7 +222,7 @@ void bscroc_jump_update(void){ baanim_setEndAndDuration(0.6538f, 0.7f); D_8037D3EC = 2; } - else if(animctrl_isStopped(aCtrl)) + else if(anctrl_isStopped(aCtrl)) { baanim_setEndAndDuration(0.5036f, 3.0f); D_8037D3EC = 1; @@ -244,7 +244,7 @@ void bscroc_jump_update(void){ break; case 3: func_80299628(0); - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ baphysics_set_target_horizontal_velocity(0.0f); sp2C = BS_5E_CROC_IDLE; } @@ -273,12 +273,12 @@ void bscroc_jump_end(void){ void bscroc_fall_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_11C_ANIM_BSCROC_JUMP); - animctrl_setStart(aCtrl, 0.5036f); - animctrl_setDuration(aCtrl, 0.7f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_start(aCtrl, "bscroc.c", 0x235); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_11C_ANIM_BSCROC_JUMP); + anctrl_setStart(aCtrl, 0.5036f); + anctrl_setDuration(aCtrl, 0.7f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_start(aCtrl, "bscroc.c", 0x235); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); D_8037D3EC = 0; } @@ -312,7 +312,7 @@ void bscroc_fall_update(void){ }//L802AC850 if(player_isStable()){ - if(func_8029B300() > 0 || (D_8037D3EC == 2 && animctrl_isStopped(aCtrl))){ + if(func_8029B300() > 0 || (D_8037D3EC == 2 && anctrl_isStopped(aCtrl))){ if(miscFlag_isTrue(MISC_FLAG_19)){ next_state = badrone_transform(); }else{ @@ -334,12 +334,12 @@ static void __bscroc_recoil_init(s32 damage){ f32 player_position[3]; f32 sp20[3]; - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_11D_ANIM_BSCROC_BOUNCE); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setSubRange(aCtrl, 0.0f, 0.7518f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bscroc.c", 0x2a5); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_11D_ANIM_BSCROC_BOUNCE); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setSubRange(aCtrl, 0.0f, 0.7518f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bscroc.c", 0x2a5); if(damage == 1) func_8030E58C(SFX_38_BANJO_AYE_1, 1.8f); else @@ -422,13 +422,13 @@ void bscroc_die_init(void){ f32 sp20[3]; func_8029B930(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, FALSE); - animctrl_setIndex(aCtrl, ASSET_11E_ANIM_BSCROC_DIE); - animctrl_setSubRange(aCtrl, 0.0f, 0.3966f); - animctrl_setDuration(aCtrl, 1.7f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bscroc.c", 0x32b); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, FALSE); + anctrl_setIndex(aCtrl, ASSET_11E_ANIM_BSCROC_DIE); + anctrl_setSubRange(aCtrl, 0.0f, 0.3966f); + anctrl_setDuration(aCtrl, 1.7f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bscroc.c", 0x32b); func_8029C7F4(1,1,2, BA_PHYSICS_LOCKED_ROTATION); _player_getPosition(player_position); func_80294980(sp20); @@ -526,20 +526,20 @@ void bscroc_bite_update(void){ func_802ABE70(); func_80299628(0); - if(animctrl_isAt(aCtrl, 0.99f)){ + if(anctrl_isAt(aCtrl, 0.99f)){ switch(++D_8037D3F4){ case 1: func_802ACF58(); - animctrl_setDuration(aCtrl, 0.28f); + anctrl_setDuration(aCtrl, 0.28f); break; case 2: func_802ACF58(); - animctrl_setDuration(aCtrl, 0.32f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setDuration(aCtrl, 0.32f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); break; } } - if(animctrl_isAt(aCtrl, 0.6f)){ + if(anctrl_isAt(aCtrl, 0.6f)){ func_8030EB00(SFX_6D_CROC_BITE, 1.0f, 1.1f); } @@ -573,19 +573,19 @@ void bscroc_eat_bad_update(void){ func_802ABE70(); func_80299628(0); - if(animctrl_isAt(aCtrl, 0.3518f)){ + if(anctrl_isAt(aCtrl, 0.3518f)){ func_8030E58C(SFX_A0_COUGHING, 0.9f); } - if(animctrl_isAt(aCtrl, 0.5282f)){ + if(anctrl_isAt(aCtrl, 0.5282f)){ func_8030E58C(SFX_A0_COUGHING, 0.85f); } - if(animctrl_isAt(aCtrl, 0.6671f)){ + if(anctrl_isAt(aCtrl, 0.6671f)){ sfxsource_playHighPriority(SFX_C6_SHAKING_MOUTH); } - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ next_state = BS_5E_CROC_IDLE; } @@ -634,14 +634,14 @@ void bscroc_eat_good_update(void){ D_8037D3F0 = ml_max_f(0.1f, D_8037D3F0 - 0.05); func_80299628(0); func_802ABF54(); - if(animctrl_isAt(aCtrl, 0.99f)){ + if(anctrl_isAt(aCtrl, 0.99f)){ switch(++D_8037D3F4){ case 1: - animctrl_setDuration(aCtrl, 0.28f); + anctrl_setDuration(aCtrl, 0.28f); break; case 2: - animctrl_setDuration(aCtrl, 0.32f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setDuration(aCtrl, 0.32f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); break; case 3: if(D_8037D3F5) @@ -652,10 +652,10 @@ void bscroc_eat_good_update(void){ } }//L802AD4B0 - if(animctrl_isAt(aCtrl, 0.62f)) + if(anctrl_isAt(aCtrl, 0.62f)) func_8030EB00(SFX_4C_LIP_SMACK, 1.2f, 1.3f); - if(D_8037D3F4 == 2 && animctrl_isAt(aCtrl, 0.9)) + if(D_8037D3F4 == 2 && anctrl_isAt(aCtrl, 0.9)) func_8030EB00(SFX_AE_YUMYUM_TALKING, 1.45f, 1.55f); bs_setState(next_state); diff --git a/src/core2/bs/crouch.c b/src/core2/bs/crouch.c index 652bcf64..731d705f 100644 --- a/src/core2/bs/crouch.c +++ b/src/core2/bs/crouch.c @@ -29,7 +29,7 @@ void func_802AD728(void){ } void func_802AD768(AnimCtrl *aCtrl, f32 arg1){ - animctrl_setDuration(aCtrl, ml_map_f(arg1, 0.0f, 180.0f, 0.5, 0.2f)); + anctrl_setDuration(aCtrl, ml_map_f(arg1, 0.0f, 180.0f, 0.5, 0.2f)); } void func_802AD7B0(AnimCtrl *aCtrl){ @@ -53,12 +53,12 @@ void bscrouch_init(void){ sp24 = 0.0f; break; } - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_1_ANIM_BSCROUCH_ENTER); - animctrl_setDuration(aCtrl, 0.5f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_setStart(aCtrl, sp24); - animctrl_start(aCtrl, "bscrouch.c", 0xa0); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_1_ANIM_BSCROUCH_ENTER); + anctrl_setDuration(aCtrl, 0.5f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setStart(aCtrl, sp24); + anctrl_start(aCtrl, "bscrouch.c", 0xa0); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(3); yaw_setVelocityBounded(350.0f, 14.0f); @@ -121,7 +121,7 @@ void bscrouch_update(void){ if(temp_f2 != 0.0f){ func_802AD6D0(); }else{ - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) func_802AD728(); } break; @@ -133,12 +133,12 @@ void bscrouch_update(void){ if(temp_f2 != 0.0f) break; - if((f64)animctrl_getAnimTimer(aCtrl) <= 0.5){ - animctrl_setSubRange(aCtrl, 0.0f, 0.5f); + if((f64)anctrl_getAnimTimer(aCtrl) <= 0.5){ + anctrl_setSubRange(aCtrl, 0.0f, 0.5f); }else{ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); } - animctrl_setPlaybackType(aCtrl,1); + anctrl_setPlaybackType(aCtrl,1); D_8037D404 = 3; break; @@ -146,11 +146,11 @@ void bscrouch_update(void){ func_802AD768(aCtrl, temp_f2); func_802AD7B0(aCtrl); if(temp_f2 != 0.0f){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); D_8037D404 = 4; }else{ - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ yaw_setIdeal(yaw_get()); func_802AD728(); } diff --git a/src/core2/bs/die.c b/src/core2/bs/die.c index 11ff719b..5d09a341 100644 --- a/src/core2/bs/die.c +++ b/src/core2/bs/die.c @@ -28,13 +28,13 @@ void bsdie_init(void){ f32 sp2C[3]; f32 sp20[3]; - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_9_ANIM_BSDIE); - animctrl_setSubRange(aCtrl, 0.0f, 0.3356f); - animctrl_setDuration(aCtrl, 2.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsdie.c", 0x7e); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_9_ANIM_BSDIE); + anctrl_setSubRange(aCtrl, 0.0f, 0.3356f); + anctrl_setDuration(aCtrl, 2.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsdie.c", 0x7e); func_8029B930(); func_8030E58C(SFX_36_BANJO_DOH, 1.0f); _player_getPosition(sp2C); @@ -71,12 +71,12 @@ void bsdie_update(void){ switch(D_8037D414){ case 0://L802AE0B8 if(_bsdie_802ADE00()){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); baphysics_set_vertical_velocity(400.0f); func_80299DB8(); FUNC_8030E624(SFX_39_BANJO_AYE_2, 1.0f, 18000); - rumbleManager_80250D94(1.0f, 1.0f, 0.4f); + baMotor_80250D94(1.0f, 1.0f, 0.4f); _bsdie_802ADE20(); D_8037D414 = 1; } @@ -85,7 +85,7 @@ void bsdie_update(void){ if(_bsdie_802ADE00()){ func_80299E00(); FUNC_8030E624(SFX_38_BANJO_AYE_1, 1.0f, 18000); - rumbleManager_80250D94(1.0f, 0.5f, 0.4f); + baMotor_80250D94(1.0f, 0.5f, 0.4f); D_8037D414 = 2; } break; @@ -94,10 +94,10 @@ void bsdie_update(void){ if(140.0f < D_8037D410) func_802929F8(); - if(animctrl_isAt(aCtrl, 0.6538f)) - animctrl_setDuration(aCtrl, 4.0f); + if(anctrl_isAt(aCtrl, 0.6538f)) + anctrl_setDuration(aCtrl, 4.0f); - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ D_8037D410 = 0.0f; D_8037D414 = 3; } @@ -111,7 +111,7 @@ void bsdie_update(void){ if( batimer_get(0) != 0.0f && func_80294574() && ( D_8037D414 - || ( animctrl_isStopped(aCtrl) + || ( anctrl_isStopped(aCtrl) && ( player_getYPosition() < (func_80294500() - 150.0f)) ) ) diff --git a/src/core2/bs/dronegoto.c b/src/core2/bs/dronegoto.c index 7ed9b4dd..3b149557 100644 --- a/src/core2/bs/dronegoto.c +++ b/src/core2/bs/dronegoto.c @@ -71,11 +71,11 @@ void func_802AECE4(void){ } if( 250.0f <= gu_sqrtf(sp20[0]*sp20[0] + sp20[2]*sp20[2]) - && animctrl_getIndex(aCtrl) == ASSET_3_ANIM_BSWALK + && anctrl_getIndex(aCtrl) == ASSET_3_ANIM_BSWALK ){ - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_C_ANIM_BSWALK_RUN); - animctrl_start(aCtrl, "bsdronegoto.c", 0x9d); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_C_ANIM_BSWALK_RUN); + anctrl_start(aCtrl, "bsdronegoto.c", 0x9d); } if(baphysics_goto_done() && D_8037D441 == 0){ diff --git a/src/core2/bs/jig.c b/src/core2/bs/jig.c index 13f9d8d0..8fd846a5 100644 --- a/src/core2/bs/jig.c +++ b/src/core2/bs/jig.c @@ -23,12 +23,12 @@ void bsjig_jiggy_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); int tmp; - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, FALSE); - animctrl_setIndex(aCtrl, ASSET_2E_ANIM_BSJIG_JIGGY); - animctrl_setDuration(aCtrl, 4.3f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsjig.c", 0x7f); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, FALSE); + anctrl_setIndex(aCtrl, ASSET_2E_ANIM_BSJIG_JIGGY); + anctrl_setDuration(aCtrl, 4.3f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsjig.c", 0x7f); yaw_setIdeal(func_8029B41C()); //face camera func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL); baphysics_set_target_horizontal_velocity(0.0f); @@ -61,19 +61,19 @@ void bsjig_jiggy_update(void){ yaw_setIdeal(func_8029B41C()); - if(animctrl_isAt(aCtrl, 0.6502f)) + if(anctrl_isAt(aCtrl, 0.6502f)) func_80299BD4(); - if(animctrl_isAt(aCtrl, 0.835f)){ + if(anctrl_isAt(aCtrl, 0.835f)){ D_8037D4B0++; item_inc(ITEM_E_JIGGY); func_8030E58C(SFX_4B_GULPING, 1.3f); } - if(animctrl_isAt(aCtrl, 0.94f)) + if(anctrl_isAt(aCtrl, 0.94f)) sfxsource_playHighPriority(0x3ea); - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ if(D_8037D4B1) sp1C = BS_34_JIG_NOTEDOOR; else @@ -165,11 +165,11 @@ void bsjig_notedoor_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); D_8037D4B2 = (bs_getPrevState() == BS_44_JIG_JIGGY); miscFlag_clear(MISC_FLAG_1A); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_282_ANIM_BSJIG_NOTEDOOR); - animctrl_setDuration(aCtrl, 3.6f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsjig.c", 0x14d); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_282_ANIM_BSJIG_NOTEDOOR); + anctrl_setDuration(aCtrl, 3.6f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsjig.c", 0x14d); yaw_setIdeal(func_8029B41C()); func_8029C7F4(1,1,3, BA_PHYSICS_NORMAL); baphysics_set_target_horizontal_velocity(0.0f); diff --git a/src/core2/bs/jump.c b/src/core2/bs/jump.c index 02ab435c..003c1c5d 100644 --- a/src/core2/bs/jump.c +++ b/src/core2/bs/jump.c @@ -43,22 +43,22 @@ void bsjump_init(void){ } if(sp30 == BS_11_BPECK){ - animctrl_setSubRange(aCtrl, 0.0f, 0.6667f); - animctrl_setStart(aCtrl, 0.5042f); - animctrl_setDuration(aCtrl, 8.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.6667f); + anctrl_setStart(aCtrl, 0.5042f); + anctrl_setDuration(aCtrl, 8.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D4C0 = 1; } else { D_8037D4C1 = (sp30 == BS_2D_SWIM_IDLE) || (sp30 == BS_2E_SWIM); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_8_ANIM_BSJUMP); - animctrl_setDuration(aCtrl, 1.9f); - animctrl_setTransitionDuration(aCtrl, 0.134f); - animctrl_setStart(aCtrl, 0.3f); - animctrl_setSubRange(aCtrl, 0.0f, 0.5042f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsjump.c", 0x95); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_8_ANIM_BSJUMP); + anctrl_setDuration(aCtrl, 1.9f); + anctrl_setTransitionDuration(aCtrl, 0.134f); + anctrl_setStart(aCtrl, 0.3f); + anctrl_setSubRange(aCtrl, 0.0f, 0.5042f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsjump.c", 0x95); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f){ yaw_setIdeal(func_8029B33C()); @@ -103,16 +103,16 @@ void bsjump_update(void){ switch(D_8037D4C0){ case 0://L802B1428 - if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.6667); - animctrl_setDuration(aCtrl, 4.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.6667); + anctrl_setDuration(aCtrl, 4.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D4C0 = 1; } if(func_8028B254(0x82)){ - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.4f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.4f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D4C0 = 2; } break; @@ -125,9 +125,9 @@ void bsjump_update(void){ sp34 = BS_BSHOCK_CHARGE; } if(func_8028B254(0x5A)){ - animctrl_setSubRange(aCtrl, 0.0, 1.0f); - animctrl_setDuration(aCtrl, 2.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0, 1.0f); + anctrl_setDuration(aCtrl, 2.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D4C0 = 2; } break; @@ -177,12 +177,12 @@ void bsjump_fall_init(void){ baphysics_set_vertical_velocity(700.0f); sp20 = (bs_getPrevState() == BS_12_BFLIP)? 0 : 1; - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, sp20); - animctrl_setIndex(aCtrl, ASSET_B0_ANIM_BSJUMP_FALL); - animctrl_setTransitionDuration(aCtrl, 0.3f); - animctrl_setDuration(aCtrl, 0.38f); - animctrl_start(aCtrl, "bsjump.c", 0x188); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, sp20); + anctrl_setIndex(aCtrl, ASSET_B0_ANIM_BSJUMP_FALL); + anctrl_setTransitionDuration(aCtrl, 0.3f); + anctrl_setDuration(aCtrl, 0.38f); + anctrl_start(aCtrl, "bsjump.c", 0x188); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); D_8037D4C0 = 0; } @@ -202,12 +202,12 @@ void bsjump_fall_update(void){ switch(D_8037D4C0){ case 0://L802B17B8 if(func_8028B254(0x5a)){ - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_8_ANIM_BSJUMP); - animctrl_setStart(aCtrl, 0.6667f); - animctrl_setDuration(aCtrl, 2.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsjump.c", 0x1b5); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_8_ANIM_BSJUMP); + anctrl_setStart(aCtrl, 0.6667f); + anctrl_setDuration(aCtrl, 2.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsjump.c", 0x1b5); D_8037D4C0 = 1; } break; @@ -253,14 +253,14 @@ void func_802B1928(void) { anim_ctrl = baanim_getAnimCtrlPtr(); climbRelease(); - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_8_ANIM_BSJUMP); - animctrl_setDuration(anim_ctrl, 1.9f); - animctrl_setTransitionDuration(anim_ctrl, 0.134f); - animctrl_setStart(anim_ctrl, 0.3f); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.5042f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bsjump.c", 0x201); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_8_ANIM_BSJUMP); + anctrl_setDuration(anim_ctrl, 1.9f); + anctrl_setTransitionDuration(anim_ctrl, 0.134f); + anctrl_setStart(anim_ctrl, 0.3f); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.5042f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bsjump.c", 0x201); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(1); func_8029957C(3); @@ -288,24 +288,24 @@ void func_802B1A54(void) { } switch (D_8037D4C0) { case 0: - if (animctrl_isStopped(anim_ctrl)) { - animctrl_setSubRange(anim_ctrl, 0.0f, 0.6667f); - animctrl_setDuration(anim_ctrl, 4.0f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + if (anctrl_isStopped(anim_ctrl)) { + anctrl_setSubRange(anim_ctrl, 0.0f, 0.6667f); + anctrl_setDuration(anim_ctrl, 4.0f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4C0 = 1; } if (func_8028B254(130)) { - animctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); - animctrl_setDuration(anim_ctrl, 1.4f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); + anctrl_setDuration(anim_ctrl, 1.4f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4C0 = 2; } break; case 1: if (func_8028B254(90)) { - animctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); - animctrl_setDuration(anim_ctrl, 2.0f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); + anctrl_setDuration(anim_ctrl, 2.0f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4C0 = 2; } break; @@ -333,14 +333,14 @@ void func_802B1BF4(void) { if(bs_getPrevState() == BS_12_BFLIP){ smooth_transition = FALSE; } - animctrl_reset(anim_ctrl); - animctrl_setSmoothTransition(anim_ctrl, smooth_transition); - animctrl_setIndex(anim_ctrl, ASSET_8_ANIM_BSJUMP); - animctrl_setTransitionDuration(anim_ctrl, 0.3f); - animctrl_setDuration(anim_ctrl, 1.9f); - animctrl_setStart(anim_ctrl, 0.6667f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_STOPPED); - animctrl_start(anim_ctrl, "bsjump.c", 0x298); + anctrl_reset(anim_ctrl); + anctrl_setSmoothTransition(anim_ctrl, smooth_transition); + anctrl_setIndex(anim_ctrl, ASSET_8_ANIM_BSJUMP); + anctrl_setTransitionDuration(anim_ctrl, 0.3f); + anctrl_setDuration(anim_ctrl, 1.9f); + anctrl_setStart(anim_ctrl, 0.6667f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_STOPPED); + anctrl_start(anim_ctrl, "bsjump.c", 0x298); yaw_setIdeal(func_8029B41C()); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(1); @@ -363,9 +363,9 @@ void func_802B1CF8(void) { switch (D_8037D4C0) { case 0: if (func_8028B254(90)) { - animctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); - animctrl_setDuration(anim_ctrl, 2.0f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); + anctrl_setDuration(anim_ctrl, 2.0f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4C0 = 1; } break; diff --git a/src/core2/bs/ow.c b/src/core2/bs/ow.c index b6665e59..35749532 100644 --- a/src/core2/bs/ow.c +++ b/src/core2/bs/ow.c @@ -15,13 +15,13 @@ void bsow_init(void){ AnimCtrl *plyr_mvmnt; plyr_mvmnt = baanim_getAnimCtrlPtr(); - animctrl_reset(plyr_mvmnt); - animctrl_setSmoothTransition(plyr_mvmnt, 0); - animctrl_setSubRange(plyr_mvmnt, 0.0f, 0.534399986267f); - animctrl_setIndex(plyr_mvmnt, ASSET_4D_ANIM_BSOW); - animctrl_setDuration(plyr_mvmnt, 1.70000004768f); - animctrl_setPlaybackType(plyr_mvmnt, ANIMCTRL_ONCE); - animctrl_start(plyr_mvmnt, "bsow.c", 0x50); + anctrl_reset(plyr_mvmnt); + anctrl_setSmoothTransition(plyr_mvmnt, 0); + anctrl_setSubRange(plyr_mvmnt, 0.0f, 0.534399986267f); + anctrl_setIndex(plyr_mvmnt, ASSET_4D_ANIM_BSOW); + anctrl_setDuration(plyr_mvmnt, 1.70000004768f); + anctrl_setPlaybackType(plyr_mvmnt, ANIMCTRL_ONCE); + anctrl_start(plyr_mvmnt, "bsow.c", 0x50); func_80299BFC(1.0f); func_802B360C(); baMarker_collisionOff(); diff --git a/src/core2/bs/pumpkin.c b/src/core2/bs/pumpkin.c index 9e87ee6c..1497fe04 100644 --- a/src/core2/bs/pumpkin.c +++ b/src/core2/bs/pumpkin.c @@ -114,11 +114,11 @@ void bspumpkin_walk_init(void) { AnimCtrl *anim_ctrl; anim_ctrl = baanim_getAnimCtrlPtr(); - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_A0_ANIM_BSPUMPKIN_WALK); - animctrl_setDuration(anim_ctrl, 0.8f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bspumpkin.c", 0x11D); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_A0_ANIM_BSPUMPKIN_WALK); + anctrl_setDuration(anim_ctrl, 0.8f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bspumpkin.c", 0x11D); func_8029C7F4(2, 1, 1, BA_PHYSICS_NORMAL); baanim_setVelocityMapRanges(D_80364CF0, D_80364CF4, D_80364CF8, D_80364CFC); func_802900B4(); @@ -152,12 +152,12 @@ void bspumpkin_jump_init(void) { AnimCtrl *anim_ctrl; anim_ctrl = baanim_getAnimCtrlPtr(); - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_A1_ANIM_BSPUMPKIN_JUMP); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.3941f); - animctrl_setDuration(anim_ctrl, 1.2f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bspumpkin.c", 0x16C); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_A1_ANIM_BSPUMPKIN_JUMP); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.3941f); + anctrl_setDuration(anim_ctrl, 1.2f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bspumpkin.c", 0x16C); func_8029C7F4(1, 1, 3, BA_PHYSICS_AIRBORN); if (func_8029B2E8() != 0.0f) { yaw_setIdeal(func_8029B33C()); @@ -188,13 +188,13 @@ void bspumpkin_jump_update(void) { if (baphysics_get_vertical_velocity() < 0.0f) { if (func_8028B254(130)) { func_80292E48(); - animctrl_setDuration(anim_ctrl, 0.7f); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.8059f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setDuration(anim_ctrl, 0.7f); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.8059f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4E0 = 2; } else { - animctrl_setSubRange(anim_ctrl, 0.0f, 0.662f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.662f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4E0 = 1; } } @@ -202,22 +202,22 @@ void bspumpkin_jump_update(void) { case 1: if (func_8028B254(130)) { func_80292E48(); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.8059f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.8059f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4E0 = 2; } break; case 2: if (player_isStable()) { func_8029AE48(); - animctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); - animctrl_setDuration(anim_ctrl, 1.2f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); + anctrl_setDuration(anim_ctrl, 1.2f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4E0 = 3; } break; case 3: - if (animctrl_isStopped(anim_ctrl)) { + if (anctrl_isStopped(anim_ctrl)) { func_80292EA4(); baphysics_set_target_horizontal_velocity(0.0f); next_state = BS_48_PUMPKIN_IDLE; @@ -246,12 +246,12 @@ void bspumpkin_fall_init(void) { anim_ctrl = baanim_getAnimCtrlPtr(); D_8037D4E4 = 0; - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_A1_ANIM_BSPUMPKIN_JUMP); - animctrl_setStart(anim_ctrl, 0.662f); - animctrl_setDuration(anim_ctrl, 0.7f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_STOPPED); - animctrl_start(anim_ctrl, "bspumpkin.c", 0x1F1); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_A1_ANIM_BSPUMPKIN_JUMP); + anctrl_setStart(anim_ctrl, 0.662f); + anctrl_setDuration(anim_ctrl, 0.7f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_STOPPED); + anctrl_start(anim_ctrl, "bspumpkin.c", 0x1F1); func_8029C7F4(1, 1, 3, BA_PHYSICS_AIRBORN); D_8037D4E0 = 0; } @@ -271,8 +271,8 @@ void bspumpkin_fall_update(void) { switch (D_8037D4E0) { case 0: if (func_8028B254(130)) { - animctrl_setSubRange(anim_ctrl, 0.0f, 0.8059f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.8059f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4E0 = 1; } break; @@ -280,16 +280,16 @@ void bspumpkin_fall_update(void) { if (player_isStable()) { func_8029AE48(); baphysics_set_target_horizontal_velocity(0.0f); - animctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); - animctrl_setDuration(anim_ctrl, 1.2f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setSubRange(anim_ctrl, 0.0f, 1.0f); + anctrl_setDuration(anim_ctrl, 1.2f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); D_8037D4E0 = 2; } break; case 2: break; } - if (player_isStable() && ((func_8029B300() > 0) || (D_8037D4E0 == 2 && animctrl_isStopped(anim_ctrl)))) { + if (player_isStable() && ((func_8029B300() > 0) || (D_8037D4E0 == 2 && anctrl_isStopped(anim_ctrl)))) { if (miscFlag_isTrue(MISC_FLAG_19)) { next_state = badrone_transform(); } else { @@ -342,12 +342,12 @@ void __bspumpkin_bounce_init(s32 arg0) { f32 sp20[3]; anim_ctrl = baanim_getAnimCtrlPtr(); - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_236_ANIM_BSPUMPKIN_REBOUND); - animctrl_setDuration(anim_ctrl, 1.3f); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.45f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bspumpkin.c", 0x2AB); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_236_ANIM_BSPUMPKIN_REBOUND); + anctrl_setDuration(anim_ctrl, 1.3f); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.45f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bspumpkin.c", 0x2AB); if (arg0 == 1) { func_8030E58C(SFX_38_BANJO_AYE_1, 1.8f); } else { @@ -433,13 +433,13 @@ void bspumpkin_die_init(void) { anim_ctrl = baanim_getAnimCtrlPtr(); func_8029B930(); - animctrl_reset(anim_ctrl); - animctrl_setSmoothTransition(anim_ctrl, 0); - animctrl_setIndex(anim_ctrl, ASSET_188_ANIM_BSPUMPKIN_DIE); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.1439f); - animctrl_setDuration(anim_ctrl, 3.5f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bspumpkin.c", 0x32E); + anctrl_reset(anim_ctrl); + anctrl_setSmoothTransition(anim_ctrl, 0); + anctrl_setIndex(anim_ctrl, ASSET_188_ANIM_BSPUMPKIN_DIE); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.1439f); + anctrl_setDuration(anim_ctrl, 3.5f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bspumpkin.c", 0x32E); func_8030E58C(SFX_36_BANJO_DOH, 1.8f); _player_getPosition(plyr_pos); func_80294980(sp20); diff --git a/src/core2/bs/rebound.c b/src/core2/bs/rebound.c index 6e30f674..e0eaa7cc 100644 --- a/src/core2/bs/rebound.c +++ b/src/core2/bs/rebound.c @@ -96,13 +96,13 @@ void func_802B3868(void) { } else { sp20 = D_8037D504 + 0.5; } - animctrl_reset(anim_ctrl); - animctrl_setSmoothTransition(anim_ctrl, 0); - animctrl_setSubRange(anim_ctrl, 0.0f, 0.5823f); - animctrl_setIndex(anim_ctrl, ASSET_F_ANIM_BSREBOUND); - animctrl_setDuration(anim_ctrl, sp20); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bsrebound.c", 0xC6); + anctrl_reset(anim_ctrl); + anctrl_setSmoothTransition(anim_ctrl, 0); + anctrl_setSubRange(anim_ctrl, 0.0f, 0.5823f); + anctrl_setIndex(anim_ctrl, ASSET_F_ANIM_BSREBOUND); + anctrl_setDuration(anim_ctrl, sp20); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bsrebound.c", 0xC6); func_8030E58C(SFX_56_BANJO_HUI, 1.0f); batimer_set(0, 1.5f); baMarker_collisionOff(); @@ -125,7 +125,7 @@ void func_802B3954(void) { if (player_isFallTumbling() && D_8037D500 == 0) { next_state = BS_3D_FALL_TUMBLING; } - if (animctrl_isStopped(anim_ctrl) && func_8028B094() && (D_8037D500 == 0)) { + if (anctrl_isStopped(anim_ctrl) && func_8028B094() && (D_8037D500 == 0)) { next_state = BS_2F_FALL; } bs_setState(next_state); diff --git a/src/core2/bs/rest.c b/src/core2/bs/rest.c index a8a1e046..56e313e8 100644 --- a/src/core2/bs/rest.c +++ b/src/core2/bs/rest.c @@ -23,19 +23,19 @@ void func_802B3AAC(enum asset_e anim_id, f32 anim_duration) { anim_ctrl = baanim_getAnimCtrlPtr(); if (anim_id == ASSET_14A_ANIM_BSREST_LISTEN) { func_8029E070(1); - switch (animctrl_getIndex(baanim_getAnimCtrlPtr())) { + switch (anctrl_getIndex(baanim_getAnimCtrlPtr())) { case ASSET_14A_ANIM_BSREST_LISTEN: baanim_playForDuration_loopSmooth(anim_id, anim_duration); break; case ASSET_167_ANIM_BSREST_MOVE: - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_167_ANIM_BSREST_MOVE); - animctrl_setDuration(anim_ctrl, 0.4f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_167_ANIM_BSREST_MOVE); + anctrl_setDuration(anim_ctrl, 0.4f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); break; default: baanim_playForDuration_once(ASSET_167_ANIM_BSREST_MOVE, 0.5f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); break; } } else { @@ -54,10 +54,10 @@ bool func_802B3BB0(void) { anim_ctrl = baanim_getAnimCtrlPtr(); func_802B3A50(); sp20 = FALSE; - switch(animctrl_getIndex(anim_ctrl)){ + switch(anctrl_getIndex(anim_ctrl)){ case ASSET_167_ANIM_BSREST_MOVE: if (baanim_isStopped() != 0) { - if (animctrl_isPlayedForwards(anim_ctrl) != 0) { + if (anctrl_isPlayedForwards(anim_ctrl) != 0) { baanim_playForDuration_loopSmooth(ASSET_14A_ANIM_BSREST_LISTEN, 11.4f); } else if (func_80298850() == 0) { sp20 = TRUE; @@ -66,13 +66,13 @@ bool func_802B3BB0(void) { break; case ASSET_14A_ANIM_BSREST_LISTEN: if (func_80298850() == 0) { - animctrl_reset(anim_ctrl); - animctrl_setDirection(anim_ctrl, 0); - animctrl_setIndex(anim_ctrl, 0x167); - animctrl_setStart(anim_ctrl, 1.0f); - animctrl_setDuration(anim_ctrl, 0.5f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bsrest.c", 0xA3); + anctrl_reset(anim_ctrl); + anctrl_setDirection(anim_ctrl, 0); + anctrl_setIndex(anim_ctrl, 0x167); + anctrl_setStart(anim_ctrl, 1.0f); + anctrl_setDuration(anim_ctrl, 0.5f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bsrest.c", 0xA3); } break; default: diff --git a/src/core2/bs/slide.c b/src/core2/bs/slide.c index 96acd938..eb8ef55c 100644 --- a/src/core2/bs/slide.c +++ b/src/core2/bs/slide.c @@ -63,11 +63,11 @@ void bsslide_init(void){ } } } - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, D_8037D520); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_start(aCtrl, "bsslide.c", 0x7f); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, D_8037D520); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_start(aCtrl, "bsslide.c", 0x7f); func_8029C7F4(1,1,3, BA_PHYSICS_LOCKED_ROTATION); baphysics_set_target_yaw(yaw_getIdeal()); baphysics_set_horizontal_velocity(yaw_getIdeal() ,baphysics_get_target_horizontal_velocity()); diff --git a/src/core2/bs/splat.c b/src/core2/bs/splat.c index f8ab93c0..03e8e0a9 100644 --- a/src/core2/bs/splat.c +++ b/src/core2/bs/splat.c @@ -6,7 +6,7 @@ #include "core2/ba/physics.h" void func_80292900(f32, f32); -void rumbleManager_80250D94(f32, f32, f32); +void baMotor_80250D94(f32, f32, f32); /* .bss */ u8 D_8037D530; @@ -29,10 +29,10 @@ void bssplat_init(void){ if(func_8029CEB0() == 4){ FUNC_8030E624(SFX_116_DEAF_RUSTLING, 0.7f, 32000); FUNC_8030E624(SFX_116_DEAF_RUSTLING, 0.8f, 32000); - rumbleManager_80250D94(0.75f, 0.25f, 0.3f); + baMotor_80250D94(0.75f, 0.25f, 0.3f); }else{ FUNC_8030E624(SFX_1F_HITTING_AN_ENEMY_3, 0.8f, 32750); - rumbleManager_80250D94(1.0f, 0.5f, 0.4f); + baMotor_80250D94(1.0f, 0.5f, 0.4f); } func_80299CF4(SFX_38_BANJO_AYE_1, 1.0f, 28000); func_802B4570(); @@ -58,17 +58,17 @@ void bssplat_update(void){ if(func_8028B094()) sp1C = BS_2F_FALL; - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ baanim_playForDuration_once(ASSET_D2_ANIM_BSSPLAT, 2.25f); D_8037D530 = 1; } break; case 1://L802B47C8 - if(animctrl_isAt(aCtrl, 0.63f)) + if(anctrl_isAt(aCtrl, 0.63f)) sp1C = BS_20_LANDING; - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp1C = BS_1_IDLE; if(func_8028B094()) diff --git a/src/core2/bs/stand.c b/src/core2/bs/stand.c index 36576fe1..d99f3bb9 100644 --- a/src/core2/bs/stand.c +++ b/src/core2/bs/stand.c @@ -8,10 +8,10 @@ extern f32 func_8029B2E8(void); void yaw_setVelocityBounded(f32, f32); -void animctrl_start(AnimCtrl *, char*, s32); +void anctrl_start(AnimCtrl *, char*, s32); void func_802900B4(void); -void rumbleManager_80250D94(f32, f32, f32); +void baMotor_80250D94(f32, f32, f32); /* .data */ u8 D_80364D20[] = { @@ -100,84 +100,84 @@ void bsstand_init(void){ } void func_802B4A10(AnimCtrl *arg0){ - if(animctrl_isAt(arg0, 0.2057f)){ //(30/145) + if(anctrl_isAt(arg0, 0.2057f)){ //(30/145) FUNC_8030E624(SFX_21_EGG_BOUNCE_1, 1.8f, 16000); - rumbleManager_80250D94(0.5f, 0.25f, 0.4f); + baMotor_80250D94(0.5f, 0.25f, 0.4f); }//L802B4A54 - if(animctrl_isAt(arg0, 0.2057f)) //(30/145) + if(anctrl_isAt(arg0, 0.2057f)) //(30/145) func_80292E48(); //L802B4A78 - if(animctrl_isAt(arg0, 0.2555f)){ //(37/145) + if(anctrl_isAt(arg0, 0.2555f)){ //(37/145) FUNC_8030E624(SFX_21_EGG_BOUNCE_1, 1.8f, 16000); - rumbleManager_80250D94(0.5f, 0.25f, 0.4f); + baMotor_80250D94(0.5f, 0.25f, 0.4f); }//L802B4AB0 - if(animctrl_isAt(arg0, 0.2896f)){ //(42/145) + if(anctrl_isAt(arg0, 0.2896f)){ //(42/145) FUNC_8030E624(SFX_21_EGG_BOUNCE_1, 1.8f, 16000); - rumbleManager_80250D94(0.5f, 0.25f, 0.4f); + baMotor_80250D94(0.5f, 0.25f, 0.4f); }//L802B4AEC - if(animctrl_isAt(arg0, 0.3f)){ //(43.5/145)? + if(anctrl_isAt(arg0, 0.3f)){ //(43.5/145)? FUNC_8030E624(SFX_62_BANJO_ERGHH, 1.0f, 28000); }//L802B4B0C - if(animctrl_isAt(arg0, 0.3607f)){ + if(anctrl_isAt(arg0, 0.3607f)){ func_80292EA4(); }//L802B4B30 - if(animctrl_isAt(arg0, 0.4183f)){ + if(anctrl_isAt(arg0, 0.4183f)){ func_8030E58C(SFX_3F1_UNKNOWN, 1.6f); }//L802B4B50 - if(animctrl_isAt(arg0, 0.455f)){ + if(anctrl_isAt(arg0, 0.455f)){ func_8030E58C(SFX_3F1_UNKNOWN, 1.45f); }//L802B4B74 - if(animctrl_isAt(arg0, 0.49f)){ + if(anctrl_isAt(arg0, 0.49f)){ func_8030E58C(SFX_3F1_UNKNOWN, 1.4f); }//L802B4B98 - if(animctrl_isAt(arg0, 0.5397f)){ + if(anctrl_isAt(arg0, 0.5397f)){ func_802900D8(); }//L802B4BBC - if(animctrl_isAt(arg0, 0.6619f)){ + if(anctrl_isAt(arg0, 0.6619f)){ FUNC_8030E624(SFX_21_EGG_BOUNCE_1, 1.8f, 16000); - rumbleManager_80250D94(0.5f, 0.25f, 0.4f); + baMotor_80250D94(0.5f, 0.25f, 0.4f); }//L802B4BF4 - if(animctrl_isAt(arg0, 0.6688f)) + if(anctrl_isAt(arg0, 0.6688f)) func_80292E48(); //L802B4C18 - if(animctrl_isAt(arg0, 0.6964f)){ + if(anctrl_isAt(arg0, 0.6964f)){ FUNC_8030E624(SFX_21_EGG_BOUNCE_1, 1.8f, 16000); - rumbleManager_80250D94(0.5f, 0.25f, 0.4f); + baMotor_80250D94(0.5f, 0.25f, 0.4f); }//L802B4C50 - if(animctrl_isAt(arg0, 0.7747f)) + if(anctrl_isAt(arg0, 0.7747f)) func_80292EA4(); //L802B4C74 - if(animctrl_isAt(arg0, 0.7822f)){ + if(anctrl_isAt(arg0, 0.7822f)){ FUNC_8030E624(SFX_6F_BANJO_HEADSCRATCH, 1.0f, 14000); }//L802B4C90 - if(animctrl_isAt(arg0, 0.8322f)){ + if(anctrl_isAt(arg0, 0.8322f)){ FUNC_8030E624(SFX_6F_BANJO_HEADSCRATCH, 1.0f, 14000); }//L802B4CB0 - if(animctrl_isAt(arg0, 0.8669f)){ + if(anctrl_isAt(arg0, 0.8669f)){ FUNC_8030E624(SFX_6F_BANJO_HEADSCRATCH, 1.0f, 14000); }//L802B4CD0 - if(animctrl_isAt(arg0, 0.9048f)){ + if(anctrl_isAt(arg0, 0.9048f)){ FUNC_8030E624(SFX_6F_BANJO_HEADSCRATCH, 1.0f, 14000); }//L802B4CF0 - if(animctrl_isAt(arg0, 0.9649f)){ + if(anctrl_isAt(arg0, 0.9649f)){ func_802900D8(); }//L802B4CF0 } @@ -204,46 +204,46 @@ void bsstand_update(void) { sp18 = D_80364D20[D_8037D540]; if (sp18 & 8) { if (sp18 & 4) { - if (animctrl_isAt(anim_ctrl, 0.0909f)) func_80299BD4(); - if (animctrl_isAt(anim_ctrl, 0.0909f)) func_8029E070(1); - if (animctrl_isAt(anim_ctrl, 0.6818f)) func_8029E070(0); + if (anctrl_isAt(anim_ctrl, 0.0909f)) func_80299BD4(); + if (anctrl_isAt(anim_ctrl, 0.0909f)) func_8029E070(1); + if (anctrl_isAt(anim_ctrl, 0.6818f)) func_8029E070(0); }//L802B4E70 if (sp18 & 2) { - if (animctrl_isAt(anim_ctrl, 0.7727f)) func_8029E070(1); - if (animctrl_isAt(anim_ctrl, 0.9999f)) func_8029E070(0); + if (anctrl_isAt(anim_ctrl, 0.7727f)) func_8029E070(1); + if (anctrl_isAt(anim_ctrl, 0.9999f)) func_8029E070(0); }//L802B50E4 } else if (sp18 & 0x20) { - if (animctrl_getIndex(anim_ctrl) == ASSET_95_ANIM_BSSTAND_KAZOOIE_PECK) { + if (anctrl_getIndex(anim_ctrl) == ASSET_95_ANIM_BSSTAND_KAZOOIE_PECK) { func_802B4A10(anim_ctrl); - if (animctrl_isAt(anim_ctrl, 0.37f)) { - animctrl_reset(anim_ctrl); - animctrl_setTransitionDuration(anim_ctrl, 0.1f); - animctrl_setIndex(anim_ctrl, ASSET_F6_ANIM_BSSTAND_PULL_KAZOOIE); - animctrl_setDuration(anim_ctrl, 5.0f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); - animctrl_start(anim_ctrl, "bsstand.c", 0x170); + if (anctrl_isAt(anim_ctrl, 0.37f)) { + anctrl_reset(anim_ctrl); + anctrl_setTransitionDuration(anim_ctrl, 0.1f); + anctrl_setIndex(anim_ctrl, ASSET_F6_ANIM_BSSTAND_PULL_KAZOOIE); + anctrl_setDuration(anim_ctrl, 5.0f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_ONCE); + anctrl_start(anim_ctrl, "bsstand.c", 0x170); } } else { - if (animctrl_isAt(anim_ctrl, 0.069f)) func_80299D2C(SFX_4B_GULPING, 1.4f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.1677f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.0f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.2441f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.03f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.3141f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.06f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.3859f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.5f, 0x7D00); - if (animctrl_isAt(anim_ctrl, 0.414f)) func_80299CF4(SFX_2D_KABOING, 1.0f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.55f)) func_80299CF4(SFX_A3_BANJO_DOUBLE_COUGH, 1.0f, 0x6D60); - if (animctrl_isAt(anim_ctrl, 0.6187f)) func_80299D2C(SFX_A0_COUGHING, 1.7f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.7108f)) func_80299D2C(SFX_A0_COUGHING, 1.6f, 0x4650); - if (animctrl_isAt(anim_ctrl, 0.7927f)) func_80299D2C(SFX_A0_COUGHING, 1.5f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.069f)) func_80299D2C(SFX_4B_GULPING, 1.4f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.1677f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.0f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.2441f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.03f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.3141f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.06f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.3859f)) func_80299D2C(SFX_8B_KAZOOIE_RAWW, 1.5f, 0x7D00); + if (anctrl_isAt(anim_ctrl, 0.414f)) func_80299CF4(SFX_2D_KABOING, 1.0f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.55f)) func_80299CF4(SFX_A3_BANJO_DOUBLE_COUGH, 1.0f, 0x6D60); + if (anctrl_isAt(anim_ctrl, 0.6187f)) func_80299D2C(SFX_A0_COUGHING, 1.7f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.7108f)) func_80299D2C(SFX_A0_COUGHING, 1.6f, 0x4650); + if (anctrl_isAt(anim_ctrl, 0.7927f)) func_80299D2C(SFX_A0_COUGHING, 1.5f, 0x4650); } } else /*L802B50D4*/if ((sp18 & 0x10) != 0) { func_802B4A10(anim_ctrl); } - if (animctrl_isAt(anim_ctrl, 0.9999f) != 0) { + if (anctrl_isAt(anim_ctrl, 0.9999f) != 0) { D_8037D540 = func_802B4870(D_8037D540); sp18 = D_80364D20[D_8037D540]; if (sp18 & 0x10) { baanim_playForDuration_once(ASSET_95_ANIM_BSSTAND_KAZOOIE_PECK, 5.5f); - animctrl_start(anim_ctrl, "bsstand.c", 0x1AB); + anctrl_start(anim_ctrl, "bsstand.c", 0x1AB); func_8029E070(1); func_802900FC(); } else if (sp18 & 0x20) { @@ -251,18 +251,18 @@ void bsstand_update(void) { func_8029E070(1); func_802900FC(); } else if (sp18 & 8) { - if (animctrl_getIndex(anim_ctrl) == ASSET_6F_ANIM_BSSTAND_IDLE) { - sp1C = animctrl_getAnimTimer(anim_ctrl); + if (anctrl_getIndex(anim_ctrl) == ASSET_6F_ANIM_BSSTAND_IDLE) { + sp1C = anctrl_getAnimTimer(anim_ctrl); } else { sp1C = 0.0f; func_802900B4(); } - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_6F_ANIM_BSSTAND_IDLE); - animctrl_setDuration(anim_ctrl, 5.5f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_setStart(anim_ctrl, sp1C); - animctrl_start(anim_ctrl, "bsstand.c", 0x1C3); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_6F_ANIM_BSSTAND_IDLE); + anctrl_setDuration(anim_ctrl, 5.5f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_setStart(anim_ctrl, sp1C); + anctrl_start(anim_ctrl, "bsstand.c", 0x1C3); func_8029E070(0); } } @@ -289,18 +289,18 @@ void bsstand_landing_update(void){ s32 sp1C = 0; AnimCtrl * sp18 = baanim_getAnimCtrlPtr(); - if(animctrl_getIndex(sp18) == ASSET_D2_ANIM_BSSPLAT){ - if(animctrl_isAt(sp18, 0.8264f)){ + if(anctrl_getIndex(sp18) == ASSET_D2_ANIM_BSSPLAT){ + if(anctrl_isAt(sp18, 0.8264f)){ func_80299CF4(SFX_6F_BANJO_HEADSCRATCH, 1.0f, 0x36b0); } //L802B52F8 - if(animctrl_isAt(sp18, 0.8864f)){ + if(anctrl_isAt(sp18, 0.8864f)){ func_80299CF4(SFX_6F_BANJO_HEADSCRATCH, 1.0f, 0x36b0); } } //L802B531C - if(animctrl_isStopped(sp18)) + if(anctrl_isStopped(sp18)) sp1C = BS_1_IDLE; bs_setState(func_802B488C(sp1C)); diff --git a/src/core2/bs/surf.c b/src/core2/bs/surf.c index 2ca46a61..ada744e7 100644 --- a/src/core2/bs/surf.c +++ b/src/core2/bs/surf.c @@ -12,11 +12,11 @@ void func_802B5FD0(void) { AnimCtrl *anim_ctrl; anim_ctrl = baanim_getAnimCtrlPtr(); - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_69_ANIM_BSSURF); - animctrl_setDuration(anim_ctrl, 1.8f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bssurf.c", 0x33); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_69_ANIM_BSSURF); + anctrl_setDuration(anim_ctrl, 1.8f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bssurf.c", 0x33); func_8029C7F4(1, 1, 3, BA_PHYSICS_NORMAL); baphysics_set_target_horizontal_velocity(0.0f); D_8037D560 = 1; diff --git a/src/core2/bs/swim.c b/src/core2/bs/swim.c index d6637d5a..4f4d848f 100644 --- a/src/core2/bs/swim.c +++ b/src/core2/bs/swim.c @@ -51,10 +51,10 @@ void func_802B5538(AnimCtrl *arg0) { enum asset_e sp24; sp24 = bsSwimAnimations[bsSwimCurrentAnimation]; - if (animctrl_getIndex(arg0) != sp24) { - animctrl_setStart(arg0, animctrl_getAnimTimer(arg0)); - animctrl_setIndex(arg0, sp24); - animctrl_start(arg0, "bsswim.c", 0x79); + if (anctrl_getIndex(arg0) != sp24) { + anctrl_setStart(arg0, anctrl_getAnimTimer(arg0)); + anctrl_setIndex(arg0, sp24); + anctrl_start(arg0, "bsswim.c", 0x79); } bsSwimCurrentAnimation++; if (bsSwimCurrentAnimation >= 10) { @@ -125,19 +125,19 @@ void func_802B5774(void) { } func_80295328(4, 0.7f); } - if ((animctrl_getIndex(anim_ctrl) == ASSET_57_ANIM_BSSWIM_IDLE) && (prev_state != BS_4C_LANDING_IN_WATER)) { - animctrl_setSmoothTransition(anim_ctrl, 0); - animctrl_setIndex(anim_ctrl, ASSET_57_ANIM_BSSWIM_IDLE); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_setDuration(anim_ctrl, 1.2f); + if ((anctrl_getIndex(anim_ctrl) == ASSET_57_ANIM_BSSWIM_IDLE) && (prev_state != BS_4C_LANDING_IN_WATER)) { + anctrl_setSmoothTransition(anim_ctrl, 0); + anctrl_setIndex(anim_ctrl, ASSET_57_ANIM_BSSWIM_IDLE); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_setDuration(anim_ctrl, 1.2f); } else { - animctrl_reset(anim_ctrl); - animctrl_setTransitionDuration(anim_ctrl, transition_duration); - animctrl_setIndex(anim_ctrl, ASSET_57_ANIM_BSSWIM_IDLE); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_setStart(anim_ctrl, 0.3f); - animctrl_setDuration(anim_ctrl, 1.2f); - animctrl_start(anim_ctrl, "bsswim.c", 0xFD); + anctrl_reset(anim_ctrl); + anctrl_setTransitionDuration(anim_ctrl, transition_duration); + anctrl_setIndex(anim_ctrl, ASSET_57_ANIM_BSSWIM_IDLE); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_setStart(anim_ctrl, 0.3f); + anctrl_setDuration(anim_ctrl, 1.2f); + anctrl_start(anim_ctrl, "bsswim.c", 0xFD); } func_8029C7F4(1, 3, 3, BA_PHYSICS_NORMAL); yaw_setVelocityBounded(500.0f, 5.0f); @@ -158,10 +158,10 @@ void func_802B5950(void) { if ((globalTimer_getTimeMasked(7) == 0) && ((f64) randf() < 0.5)) { func_802B5480(); } - if (animctrl_isAt(anim_ctrl, 0.01f) != 0) { + if (anctrl_isAt(anim_ctrl, 0.01f) != 0) { func_8030EC20(SFX_DC_IDLE_PADDLING, 0.85f, 1.15f, 16000, 16000); } - if (animctrl_isAt(anim_ctrl, 0.4348f) != 0) { + if (anctrl_isAt(anim_ctrl, 0.4348f) != 0) { func_802B5538(anim_ctrl); } if (func_8029B300() == 1) { @@ -199,13 +199,13 @@ void func_802B5B18(void) { } else { anim_duration = 0.4f; } - if (animctrl_getIndex(anim_ctrl) != ASSET_39_ANIM_BSSWIM_MOVE) { - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_39_ANIM_BSSWIM_MOVE); - animctrl_setTransitionDuration(anim_ctrl, anim_duration); - animctrl_setStart(anim_ctrl, 0.8f); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bsswim.c", 0x164); + if (anctrl_getIndex(anim_ctrl) != ASSET_39_ANIM_BSSWIM_MOVE) { + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_39_ANIM_BSSWIM_MOVE); + anctrl_setTransitionDuration(anim_ctrl, anim_duration); + anctrl_setStart(anim_ctrl, 0.8f); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bsswim.c", 0x164); } baanim_setUpdateType(BAANIM_UPDATE_2_SCALE_HORZ); baanim_setDurationRange(0.3f, 1.5f); @@ -223,16 +223,16 @@ void func_802B5C40(void) { next_state = 0; anim_ctrl =baanim_getAnimCtrlPtr(); - if (animctrl_isAt(anim_ctrl, 0.38f)) { + if (anctrl_isAt(anim_ctrl, 0.38f)) { func_8029C4E4(1); } - if (animctrl_isAt(anim_ctrl, 0.88f)) { + if (anctrl_isAt(anim_ctrl, 0.88f)) { func_8029C4E4(0); } - if (animctrl_isAt(anim_ctrl, 0.2f)) { + if (anctrl_isAt(anim_ctrl, 0.2f)) { func_8030EB88(SFX_12_WATER_PADDLING_1, 0.9f, 1.1f); } - if (animctrl_isAt(anim_ctrl, 0.7f)) { + if (anctrl_isAt(anim_ctrl, 0.7f)) { func_8030EB88(SFX_12_WATER_PADDLING_1, 0.9f, 1.1f); } func_802B55DC(); diff --git a/src/core2/bs/talk.c b/src/core2/bs/talk.c index 2e052bf3..04492358 100644 --- a/src/core2/bs/talk.c +++ b/src/core2/bs/talk.c @@ -16,10 +16,10 @@ void bstalk_init(void){ f32 target_pos[3]; player_anim_ctrl = baanim_getAnimCtrlPtr(); - animctrl_reset(player_anim_ctrl); + anctrl_reset(player_anim_ctrl); func_8029C848(player_anim_ctrl); - animctrl_setPlaybackType(player_anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(player_anim_ctrl, "bstalk.c", 0x38); + anctrl_setPlaybackType(player_anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(player_anim_ctrl, "bstalk.c", 0x38); _player_getPosition(plyr_pos); get_talk_target_position(target_pos); func_80257F18(plyr_pos, target_pos, &yaw); diff --git a/src/core2/bs/throw.c b/src/core2/bs/throw.c index 48197db5..acede5dd 100644 --- a/src/core2/bs/throw.c +++ b/src/core2/bs/throw.c @@ -14,11 +14,11 @@ u8 D_8037D580; void bsthrow_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_11B_ANIM_BSTHROW); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsthrow.c", 0x2e); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_11B_ANIM_BSTHROW); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsthrow.c", 0x2e); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(1); @@ -45,12 +45,12 @@ void bsthrow_update(void){ func_80257F18(player_position, sp34, &sp24); yaw_setIdeal(sp24); - if(animctrl_isAt(aCtrl, 0.35f) && sp20){ + if(anctrl_isAt(aCtrl, 0.35f) && sp20){ D_8037D580 = 1; marker_getActor(sp20)->unk138_21 = 1; } - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) next_state = BS_1_IDLE; bs_setState(next_state); diff --git a/src/core2/bs/timeout.c b/src/core2/bs/timeout.c index 4bd5a9dc..6cfa47a4 100644 --- a/src/core2/bs/timeout.c +++ b/src/core2/bs/timeout.c @@ -25,18 +25,18 @@ void func_802B6270(void){ void func_802B6314(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - if(animctrl_isAt(aCtrl, 0.0625f)) + if(anctrl_isAt(aCtrl, 0.0625f)) func_80292E48(); - if(animctrl_isAt(aCtrl, 0.18f)) + if(anctrl_isAt(aCtrl, 0.18f)) FUNC_8030E624(SFX_3EB_UNKNOWN, 1.0f, 18000); - if(animctrl_isAt(aCtrl, 0.8421f)){ + if(anctrl_isAt(aCtrl, 0.8421f)){ func_80292E80(0, 0.3f); func_80292E80(1, 0.3f); } - if(animctrl_isAt(aCtrl, 0.84f)) + if(anctrl_isAt(aCtrl, 0.84f)) func_8029B6F0(); } @@ -48,10 +48,10 @@ void func_802B63C8(void){ void func_802B63F8(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); + anctrl_reset(aCtrl); func_8029C848(aCtrl); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); - animctrl_start(aCtrl, "bstimeout.c", 0x7e); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_LOOP); + anctrl_start(aCtrl, "bstimeout.c", 0x7e); func_8029C7F4(1,1,3,BA_PHYSICS_FREEZE); baphysics_set_target_horizontal_velocity(0.0f); func_802914CC(0xd); diff --git a/src/core2/bs/turn.c b/src/core2/bs/turn.c index 7ced62c4..29f85781 100644 --- a/src/core2/bs/turn.c +++ b/src/core2/bs/turn.c @@ -13,12 +13,12 @@ void bsturn_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); f32 sp28[3]; - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_E_ANIM_BSTURN); - animctrl_setDuration(aCtrl, 0.3f); - animctrl_setTransitionDuration(aCtrl,0.1f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bsturn.c", 0x37); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_E_ANIM_BSTURN); + anctrl_setDuration(aCtrl, 0.3f); + anctrl_setTransitionDuration(aCtrl,0.1f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bsturn.c", 0x37); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(1); func_8029957C(2); @@ -32,7 +32,7 @@ void bsturn_init(void){ void bsturn_update(void){ enum bs_e sp2C = 0; - baphysics_set_target_horizontal_velocity(ml_map_f(animctrl_getAnimTimer(baanim_getAnimCtrlPtr()), 0.18f, 1.0f, bsturn_starting_horizontal_velocity, 0.0f)); + baphysics_set_target_horizontal_velocity(ml_map_f(anctrl_getAnimTimer(baanim_getAnimCtrlPtr()), 0.18f, 1.0f, bsturn_starting_horizontal_velocity, 0.0f)); D_8037D594++; if(!(D_8037D594 < 6)) @@ -50,7 +50,7 @@ void bsturn_update(void){ break; }//L802B6978 - if(animctrl_isStopped(baanim_getAnimCtrlPtr())) + if(anctrl_isStopped(baanim_getAnimCtrlPtr())) sp2C = BS_4_WALK_FAST; if(button_held(BUTTON_Z)) diff --git a/src/core2/bs/twirl.c b/src/core2/bs/twirl.c index fac4ae5c..3c0a057e 100644 --- a/src/core2/bs/twirl.c +++ b/src/core2/bs/twirl.c @@ -17,13 +17,13 @@ int bstwirl_hitboxActive(void){ void bstwirl_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, 0); - animctrl_setIndex(aCtrl, ASSET_4F_ANIM_BSTWIRL); - animctrl_setDuration(aCtrl, 0.9f); - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bstwirl.c", 0x46); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, 0); + anctrl_setIndex(aCtrl, ASSET_4F_ANIM_BSTWIRL); + anctrl_setDuration(aCtrl, 0.9f); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bstwirl.c", 0x46); baanim_setUpdateType(BAANIM_UPDATE_1_NORMAL); yaw_setUpdateState(1); func_8029957C(3); @@ -54,15 +54,15 @@ void bstwirl_update(void){ func_8029AE74(0); batimer_set(0, 0.12f); } - if(animctrl_isAt(aCtrl, 0.8011f)){ - animctrl_setDuration(aCtrl, 2.5f); + if(anctrl_isAt(aCtrl, 0.8011f)){ + anctrl_setDuration(aCtrl, 2.5f); baphysics_set_target_horizontal_velocity(0.0f); _bstwirlHitboxActive = 0; D_8037D5A4 = 3; } //??? missing break case 3://L802B6C38 - if(animctrl_isStopped(aCtrl)) + if(anctrl_isStopped(aCtrl)) sp1C = BS_1_IDLE; break; }//L802B6C4C @@ -70,7 +70,7 @@ void bstwirl_update(void){ if(button_pressed(BUTTON_A)) sp1C = bs_getTypeOfJump(); - if(0.6 < animctrl_getAnimTimer(aCtrl) && !player_isStable()) + if(0.6 < anctrl_getAnimTimer(aCtrl) && !player_isStable()) sp1C = BS_2F_FALL; if(player_inWater()) diff --git a/src/core2/bs/walk.c b/src/core2/bs/walk.c index 60ba74f4..bda634a6 100644 --- a/src/core2/bs/walk.c +++ b/src/core2/bs/walk.c @@ -118,16 +118,16 @@ void bswalk_creep_init(void){ f32 start_position; if(bs_getPrevState() == BS_2_WALK_SLOW){ - start_position = anim_getTimer(animctrl_getAnimPtr(anim_ctrl)); + start_position = anim_getTimer(anctrl_getAnimPtr(anim_ctrl)); }else{ start_position = 0.0f; } - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_2_ANIM_BSWALK_CREEP); - animctrl_setDuration(anim_ctrl, 0.43f); - animctrl_setStart(anim_ctrl, start_position); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bswalk.c", 0xe4); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_2_ANIM_BSWALK_CREEP); + anctrl_setDuration(anim_ctrl, 0.43f); + anctrl_setStart(anim_ctrl, start_position); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bswalk.c", 0xe4); func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL); baanim_setDurationRange(0.3f, 1.5f); baanim_setVelocityMapRanges(bsWalkMinCreepVelocity, bsWalkCreepSlowWalkVelocityThreshold, bsWalkSlowestCreepDuration, bsWalkFastestCreepDuration); @@ -191,16 +191,16 @@ void bswalk_slow_init(void){ f32 start_position; if(bs_getPrevState() == 3){ - start_position = anim_getTimer(animctrl_getAnimPtr(anim_ctrl)); + start_position = anim_getTimer(anctrl_getAnimPtr(anim_ctrl)); }else{ start_position = 0.0f; } - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_3_ANIM_BSWALK); - animctrl_setDuration(anim_ctrl, 0.43f); - animctrl_setStart(anim_ctrl, start_position); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bswalk.c", 0x168); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_3_ANIM_BSWALK); + anctrl_setDuration(anim_ctrl, 0.43f); + anctrl_setStart(anim_ctrl, start_position); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bswalk.c", 0x168); func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL); baanim_setDurationRange(0.3f, 1.5f); baanim_setVelocityMapRanges(bsWalkCreepSlowWalkVelocityThreshold, bsWalkSlowWalkWalkVelocityThreshold, bsWalkSlowestSlowWalkDuration, bsWalkFastestSlowWalkDuration); @@ -269,16 +269,16 @@ void bswalk_init(void){ break; case 2://slowwalk case 4://fastwalk - start_position = anim_getTimer(animctrl_getAnimPtr(anim_ctrl)); + start_position = anim_getTimer(anctrl_getAnimPtr(anim_ctrl)); break; } - animctrl_reset(anim_ctrl); - animctrl_setIndex(anim_ctrl, ASSET_C_ANIM_BSWALK_RUN); - animctrl_setDuration(anim_ctrl, 0.66f); - animctrl_setTransitionDuration(anim_ctrl, 0.14f); - animctrl_setStart(anim_ctrl, start_position); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bswalk.c", 0x1ed); + anctrl_reset(anim_ctrl); + anctrl_setIndex(anim_ctrl, ASSET_C_ANIM_BSWALK_RUN); + anctrl_setDuration(anim_ctrl, 0.66f); + anctrl_setTransitionDuration(anim_ctrl, 0.14f); + anctrl_setStart(anim_ctrl, start_position); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bswalk.c", 0x1ed); func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL); baanim_setDurationRange(0.3f, 1.5f); baanim_setVelocityMapRanges(bsWalkSlowWalkWalkVelocityThreshold, bsWalkWalkFastWalkVelocityThreshold, bsWalkSlowestWalkDuration, bsWalkFastestWalkDuration); @@ -351,18 +351,18 @@ void bswalk_fast_init(void){ sp24 = 0; break; case 3: - sp28 = anim_getTimer(animctrl_getAnimPtr(anim_ctrl)); + sp28 = anim_getTimer(anctrl_getAnimPtr(anim_ctrl)); break; } - animctrl_reset(anim_ctrl); - animctrl_setSmoothTransition(anim_ctrl, sp24); - animctrl_setIndex(anim_ctrl, ASSET_C_ANIM_BSWALK_RUN); - animctrl_setDuration(anim_ctrl, 0.66f); - animctrl_setTransitionDuration(anim_ctrl, 0.1f); - animctrl_setStart(anim_ctrl, sp28); - animctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); - animctrl_start(anim_ctrl, "bswalk.c", 0x27d); + anctrl_reset(anim_ctrl); + anctrl_setSmoothTransition(anim_ctrl, sp24); + anctrl_setIndex(anim_ctrl, ASSET_C_ANIM_BSWALK_RUN); + anctrl_setDuration(anim_ctrl, 0.66f); + anctrl_setTransitionDuration(anim_ctrl, 0.1f); + anctrl_setStart(anim_ctrl, sp28); + anctrl_setPlaybackType(anim_ctrl, ANIMCTRL_LOOP); + anctrl_start(anim_ctrl, "bswalk.c", 0x27d); func_8029C7F4(BAANIM_UPDATE_2_SCALE_HORZ,1,1, BA_PHYSICS_NORMAL); baanim_setDurationRange(0.3f, 1.5f); baanim_setVelocityMapRanges(bsWalkWalkFastWalkVelocityThreshold, bsWalkMaxFastWalkVelocity, bsWalkSlowestFastWalkDuration, bsWalkFastestFastWalkDuration); diff --git a/src/core2/bs/walrus.c b/src/core2/bs/walrus.c index e095ea21..0d4da806 100644 --- a/src/core2/bs/walrus.c +++ b/src/core2/bs/walrus.c @@ -214,14 +214,14 @@ void bswalrus_walk_end(void){ void bswalrus_jump_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, FALSE); - animctrl_setIndex(aCtrl, ASSET_121_ANIM_BSWALRUS_JUMP); - animctrl_setSubRange(aCtrl, 0.0f, 0.514f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setStart(aCtrl, 0.1); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bswalrus.c", 0x1f8); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, FALSE); + anctrl_setIndex(aCtrl, ASSET_121_ANIM_BSWALRUS_JUMP); + anctrl_setSubRange(aCtrl, 0.0f, 0.514f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setStart(aCtrl, 0.1); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bswalrus.c", 0x1f8); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) yaw_setIdeal(func_8029B33C()); @@ -248,23 +248,23 @@ void bswalrus_jump_update(void){ switch(D_8037D5C8){ case 0://L802B86D8 if(func_8028B254(0x82)){ - animctrl_setDuration(aCtrl, 0.7f); - animctrl_setSubRange(aCtrl, 0.0f, 0.8501f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setDuration(aCtrl, 0.7f); + anctrl_setSubRange(aCtrl, 0.0f, 0.8501f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D5C8 = 2; } - else if(animctrl_isStopped(aCtrl)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.6734f); - animctrl_setDuration(aCtrl, 3.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + else if(anctrl_isStopped(aCtrl)){ + anctrl_setSubRange(aCtrl, 0.0f, 0.6734f); + anctrl_setDuration(aCtrl, 3.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D5C8 = 1; } break; case 1://L802B876C if(func_8028B254(0x82)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.8501f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.8501f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D5C8 = 2; } break; @@ -272,15 +272,15 @@ void bswalrus_jump_update(void){ func_80299628(0); if(player_isStable()){ func_8029AE48(); - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D5C8 = 3; } break; case 3://L802B880C func_80299628(0); - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ baphysics_set_target_horizontal_velocity(0.0f); next_state = BS_67_WALRUS_IDLE; } @@ -305,12 +305,12 @@ void bswalrus_jump_end(void){ void bswalrus_fall_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_121_ANIM_BSWALRUS_JUMP); - animctrl_setStart(aCtrl, 0.662f); - animctrl_setDuration(aCtrl, 0.7f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_start(aCtrl, "bswalrus.c", 0x284); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_121_ANIM_BSWALRUS_JUMP); + anctrl_setStart(aCtrl, 0.662f); + anctrl_setDuration(aCtrl, 0.7f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_start(aCtrl, "bswalrus.c", 0x284); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); func_802B8110(); D_8037D5C8 = 0; @@ -329,8 +329,8 @@ void bswalrus_fall_update(void){ { case 0://L802B89A4 if(func_8028B254(0x82)){ - animctrl_setSubRange(aCtrl, 0.0f, 0.8501f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 0.8501f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D5C8 = 1; } break; @@ -338,9 +338,9 @@ void bswalrus_fall_update(void){ if(player_isStable()){ func_8029AE48(); baphysics_set_target_horizontal_velocity(0.0f); - animctrl_setSubRange(aCtrl, 0.0f, 1.0f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_setSubRange(aCtrl, 0.0f, 1.0f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); D_8037D5C8 = 2; } break; @@ -350,7 +350,7 @@ void bswalrus_fall_update(void){ if(player_isStable()){ if( func_8029B300() > 0 - || (D_8037D5C8 == 2 && animctrl_isStopped(aCtrl)) + || (D_8037D5C8 == 2 && anctrl_isStopped(aCtrl)) ){ if(miscFlag_isTrue(MISC_FLAG_19)) next_state = badrone_transform(); @@ -443,13 +443,13 @@ void bswalrus_die_init(void){ f32 sp20[3]; func_8029B930(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, FALSE); - animctrl_setIndex(aCtrl, ASSET_19D_ANIM_BSWALRUS_DIE); - animctrl_setSubRange(aCtrl, 0.0f, 0.4454f); - animctrl_setDuration(aCtrl, 2.2f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bswalrus.c", 0x366); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, FALSE); + anctrl_setIndex(aCtrl, ASSET_19D_ANIM_BSWALRUS_DIE); + anctrl_setSubRange(aCtrl, 0.0f, 0.4454f); + anctrl_setDuration(aCtrl, 2.2f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bswalrus.c", 0x366); func_8030E58C(SFX_36_BANJO_DOH, 1.8f); _player_getPosition(sp2C); func_80294980(sp20); @@ -595,14 +595,14 @@ void bswalrus_sled_end(void){ void bswalrus_sled_jump_init(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setSmoothTransition(aCtrl, FALSE); - animctrl_setIndex(aCtrl, ASSET_19F_ANIM_BSWALRUS_SLED_JUMP); - animctrl_setSubRange(aCtrl, 0.0f, 0.4285f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setStart(aCtrl, 0.14f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); - animctrl_start(aCtrl, "bswalrus.c", 0x477); + anctrl_reset(aCtrl); + anctrl_setSmoothTransition(aCtrl, FALSE); + anctrl_setIndex(aCtrl, ASSET_19F_ANIM_BSWALRUS_SLED_JUMP); + anctrl_setSubRange(aCtrl, 0.0f, 0.4285f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setStart(aCtrl, 0.14f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_ONCE); + anctrl_start(aCtrl, "bswalrus.c", 0x477); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); if(func_8029B2E8() != 0.0f) yaw_setIdeal(func_8029B33C()); @@ -630,7 +630,7 @@ void bswalrus_sled_jump_update(void){ switch (D_8037D5C8) { case 0: - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ baanim_setEndAndDuration(0.5058f, 7.0f); D_8037D5C8 = 1; } @@ -642,7 +642,7 @@ void bswalrus_sled_jump_update(void){ } break; case 2://L802B951C - if(animctrl_isStopped(aCtrl)){ + if(anctrl_isStopped(aCtrl)){ next_state = BS_7D_WALRUS_SLED; } break; @@ -665,12 +665,12 @@ void bswalrus_sled_jump_end(void){ void func_802B95A0(void){ AnimCtrl *aCtrl = baanim_getAnimCtrlPtr(); - animctrl_reset(aCtrl); - animctrl_setIndex(aCtrl, ASSET_19F_ANIM_BSWALRUS_SLED_JUMP); - animctrl_setSubRange(aCtrl, 0.0f, 0.5058f); - animctrl_setDuration(aCtrl, 1.0f); - animctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); - animctrl_start(aCtrl, "bswalrus.c", 0x4e2); + anctrl_reset(aCtrl); + anctrl_setIndex(aCtrl, ASSET_19F_ANIM_BSWALRUS_SLED_JUMP); + anctrl_setSubRange(aCtrl, 0.0f, 0.5058f); + anctrl_setDuration(aCtrl, 1.0f); + anctrl_setPlaybackType(aCtrl, ANIMCTRL_STOPPED); + anctrl_start(aCtrl, "bswalrus.c", 0x4e2); func_8029C7F4(1,1,3, BA_PHYSICS_AIRBORN); func_802B813C(); D_8037D5C8 = 0; @@ -705,7 +705,7 @@ void func_802B963C(void){ if(player_isStable()){ if( func_8029B300() > 0 - || (D_8037D5C8 == 2 && animctrl_isStopped(aCtrl)) + || (D_8037D5C8 == 2 && anctrl_isStopped(aCtrl)) ){ next_state = BS_7D_WALRUS_SLED; } diff --git a/src/core2/bs/washy.c b/src/core2/bs/washy.c index 2d4c74b5..47e478a8 100644 --- a/src/core2/bs/washy.c +++ b/src/core2/bs/washy.c @@ -32,7 +32,7 @@ void func_802B9980(s32 arg0){ break; case 5: //L802B9A58 func_8030E58C(SFX_D0_GRIMLET_SQUEAK, 0.9f); - animctrl_setDuration(plyr_anim, 2.2f); + anctrl_setDuration(plyr_anim, 2.2f); break; case 6: //L802B9A84 batimer_set(0, 0.01f); diff --git a/src/core2/ch/bat.c b/src/core2/ch/bat.c index e014a398..3f81c9bf 100644 --- a/src/core2/ch/bat.c +++ b/src/core2/ch/bat.c @@ -418,14 +418,14 @@ void chbat_update(Actor *this){ } break; case CH_BAT_STATE_EXIT_ROOST: //L80360938 - if( 0.98 < animctrl_getAnimTimer(this->animctrl) + if( 0.98 < anctrl_getAnimTimer(this->anctrl) || !func_8035FD28(this) ){ chbat_chase(this); } break; case CH_BAT_STATE_CHASE: //L8036097C - animctrl_setDuration(this->animctrl, 1.2 - this->velocity_y); + anctrl_setDuration(this->anctrl, 1.2 - this->velocity_y); if(!chbat_nearPlayer(this)){ chbat_roam(this); } @@ -473,7 +473,7 @@ void chbat_update(Actor *this){ } break; case CH_BAT_STATE_ENTER_ROOST: - if(animctrl_getAnimTimer(this->animctrl) < 0.01){ + if(anctrl_getAnimTimer(this->anctrl) < 0.01){ chbat_roost(this); } break; diff --git a/src/core2/ch/beehive.c b/src/core2/ch/beehive.c index 64d37ceb..2fd4691d 100644 --- a/src/core2/ch/beehive.c +++ b/src/core2/ch/beehive.c @@ -77,7 +77,7 @@ void chBeehive_update(Actor *this){ func_8030E394(this->unk44_31); sfxsource_setSfxId(this->unk44_31, SFX_67_BEEHIVE_CLONK); sfxsource_setSampleRate(this->unk44_31, 12000); - sfxsource_playSfxAtVolume(this->unk44_31, (animctrl_getAnimTimer(this->animctrl) + 0.9) - 0.4); + sfxsource_playSfxAtVolume(this->unk44_31, (anctrl_getAnimTimer(this->anctrl) + 0.9) - 0.4); sfxsource_set_position(this->unk44_31, this->position); sfxsource_set_fade_distances(this->unk44_31, 300.0f, 1500.0f); func_8030DD14(this->unk44_31, 3); @@ -87,7 +87,7 @@ void chBeehive_update(Actor *this){ break; case CHBEEHIVE_STATE_2_DIE: - if(animctrl_isStopped(this->animctrl)) { + if(anctrl_isStopped(this->anctrl)) { func_80326310(this); } break; diff --git a/src/core2/ch/bigbutt.c b/src/core2/ch/bigbutt.c index 01ed1a4a..339e67f0 100644 --- a/src/core2/ch/bigbutt.c +++ b/src/core2/ch/bigbutt.c @@ -86,7 +86,7 @@ void func_802C60AC(ActorMarker *marker, ActorMarker *other_marker){ && 5.0 <= actor->actor_specific_1_f && func_803294F0(actor, 80, func_80329784(actor)) ){ - animctrl_setPlaybackType(actor->animctrl, ANIMCTRL_ONCE); + anctrl_setPlaybackType(actor->anctrl, ANIMCTRL_ONCE); subaddie_set_state(actor, 5); func_8030E58C(SFX_1E_HITTING_AN_ENEMY_2, 1.0f); } @@ -129,7 +129,7 @@ void func_802C6240(Actor *this){ switch(this->state){ case 0x1: //L802C62E4 this->unk10_12 = 3; - sp2C = func_8032863C(this->animctrl, 0.16f, 0.55f); + sp2C = func_8032863C(this->anctrl, 0.16f, 0.55f); if(!this->unk138_28){ if( actor_animationIsAt(this, 0.157f) || actor_animationIsAt(this, 0.289f) @@ -145,7 +145,7 @@ void func_802C6240(Actor *this){ func_80328A2C(this, 0.55f, 1, 0.35f); } func_802C5FF8(this); - if( func_8032863C(this->animctrl, 0.65f, 0.99f) >= 2 + if( func_8032863C(this->anctrl, 0.65f, 0.99f) >= 2 && !func_80328A2C(this, 0.0f, -1, 0.45f) && subaddie_maybe_set_state_position_direction(this, 2, 0.0f, -1, 0.58f) ){ @@ -197,7 +197,7 @@ void func_802C6240(Actor *this){ break; case 0x6: //L802C66D0 - animctrl_setDuration(this->animctrl, D_80366010[6].duration - (3 - this->unk10_12)*0.1085); + anctrl_setDuration(this->anctrl, D_80366010[6].duration - (3 - this->unk10_12)*0.1085); this->yaw_ideal = (f32)func_80329784(this); if(!func_803294B4(this, 0x21)){ subaddie_set_state(this, 8); @@ -232,7 +232,7 @@ void func_802C6240(Actor *this){ if(func_80329530(this, 320)){ if(func_80329078(this, (s32)this->yaw_ideal,200)){ - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_ONCE); subaddie_set_state(this, 4); this->actor_specific_1_f += 5.7; tmp_a0 = this->unk44_31; @@ -252,16 +252,16 @@ void func_802C6240(Actor *this){ break; case 0x4: //L802C6A14 - if(animctrl_getAnimTimer(this->animctrl) < 0.99){ + if(anctrl_getAnimTimer(this->anctrl) < 0.99){ this->yaw_ideal = (f32)func_80329784(this); func_80328FB0(this, 1.0f); } func_80329030(this, 0); func_8030E2C4(this->unk44_31); - if(0.99 <= animctrl_getAnimTimer(this->animctrl)){ + if(0.99 <= anctrl_getAnimTimer(this->anctrl)){ func_80329878(this, func_80329530(this, 250)? 0.8: 1.2); if (0.0f == this->actor_specific_1_f) { - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_LOOP); subaddie_set_state_with_direction(this, 1, 0.65f, 1); sfxsource_freeSfxsourceByIndex(this->unk44_31); this->unk44_31 = 0; @@ -272,8 +272,8 @@ void func_802C6240(Actor *this){ case 0x5: //L802C6B28 actor_playAnimationOnce(this); - tmp_f0 = animctrl_getAnimTimer(this->animctrl); - animctrl_setDuration(this->animctrl, D_80366010[5].duration + ((0.65 < tmp_f0)? (tmp_f0 - 0.65)*16.0 : 0.0)); + tmp_f0 = anctrl_getAnimTimer(this->anctrl); + anctrl_setDuration(this->anctrl, D_80366010[5].duration + ((0.65 < tmp_f0)? (tmp_f0 - 0.65)*16.0 : 0.0)); if(actor_animationIsAt(this, 0.95f)){ actor_loopAnimation(this); func_802C5F94(this); diff --git a/src/core2/ch/bottlesbonus.c b/src/core2/ch/bottlesbonus.c index 46631dcf..2c3c218c 100644 --- a/src/core2/ch/bottlesbonus.c +++ b/src/core2/ch/bottlesbonus.c @@ -469,7 +469,7 @@ void chBottlesBonus_update(Actor *this) { D_8037DEAC = func_8033F5F8(func_8033A0B0(chBottleBonusBookselfModelBin), model_getVtxList(chBottleBonusBookselfModelBin)); func_8034CF74(local, 0, D_8037DEAC, 0xF0); } - func_8028746C(this->animctrl, chBottlesBonus_func_802DD8AC); + func_8028746C(this->anctrl, chBottlesBonus_func_802DD8AC); for(phi_s0 = 0; phi_s0 < CH_BOTTLES_BONUS_PUZZLE_PIECE_COUNT; phi_s0++){ func_8034DFB0(func_8034C2C4(this->marker, phi_s0 + 0x190), D_803682B4, D_803682A4, 0.0f); } @@ -515,7 +515,7 @@ void chBottlesBonus_update(Actor *this) { } break; case 2: - if(animctrl_isStopped(this->animctrl)) { + if(anctrl_isStopped(this->anctrl)) { this->state = 3; func_8025A7DC(COMUSIC_98_BBONUS_PIECES_SHUFFLE); if (D_8037DCC7 == 0) { diff --git a/src/core2/ch/bottlesbonuscursor.c b/src/core2/ch/bottlesbonuscursor.c index b1a60543..1341fe33 100644 --- a/src/core2/ch/bottlesbonuscursor.c +++ b/src/core2/ch/bottlesbonuscursor.c @@ -365,7 +365,7 @@ void chBottlesBonusCursor_update(Actor *this) { //rotate CCW case 3://L802E0420 - if (animctrl_isStopped(this->animctrl) ) { + if (anctrl_isStopped(this->anctrl) ) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); } @@ -373,14 +373,14 @@ void chBottlesBonusCursor_update(Actor *this) { //rotate CW case 4://L802E0450 - if (animctrl_isStopped(this->animctrl) ) { + if (anctrl_isStopped(this->anctrl) ) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); } break; case 7://L802E0480 - if (animctrl_isStopped(this->animctrl) ) { + if (anctrl_isStopped(this->anctrl) ) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); } @@ -395,7 +395,7 @@ void chBottlesBonusCursor_update(Actor *this) { if (actor_animationIsAt(this, 0.5f) != 0) { FUNC_8030E624(SFX_6C_LOCKUP_CLOSING, 1.0f, 24000); } - if (animctrl_isStopped(this->animctrl) != 0) { + if (anctrl_isStopped(this->anctrl) != 0) { subaddie_set_state_with_direction(this, 1, 0.0f, 1); actor_loopAnimation(this); } diff --git a/src/core2/ch/crab.c b/src/core2/ch/crab.c index 5af2bc3c..e2ff4e04 100644 --- a/src/core2/ch/crab.c +++ b/src/core2/ch/crab.c @@ -239,7 +239,7 @@ void chCrab_update(Actor *this) { this->unk124_0 = this->unk138_31 = FALSE; this->has_met_before = FALSE; this->volatile_initialized = TRUE; - animctrl_setTransitionDuration(this->animctrl, 0.25f); + anctrl_setTransitionDuration(this->anctrl, 0.25f); if (map_get() == MAP_A_TTC_SANDCASTLE) { if (!jiggyscore_isCollected(JIGGY_10_TTC_SANDCASTLE)) { mapSpecificFlags_set(1, 0); @@ -365,7 +365,7 @@ void chCrab_update(Actor *this) { break; case 6: //L802CC18C - if (animctrl_isStopped(this->animctrl)) { + if (anctrl_isStopped(this->anctrl)) { if (this->lifetime_value == 0.0f) { func_80326310(this); } else { @@ -376,7 +376,7 @@ void chCrab_update(Actor *this) { break; case 7: //L802CC1E8 - if (animctrl_isStopped(this->animctrl)) { + if (anctrl_isStopped(this->anctrl)) { subaddie_set_state(this, 1); actor_loopAnimation(this); } diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index 91102ff5..5397def0 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -402,7 +402,7 @@ void func_802C4C14(Actor *this){ break; case 3://L802C50C8 case 4://L802C50C8 - if(animctrl_isStopped(this->animctrl)){ + if(anctrl_isStopped(this->anctrl)){ chBottlesBonus_func_802DEB80(); if(!gameFile_isNotEmpty(sp84)){ timedFunc_set_3(0.0f, (GenFunction_3)func_802E4078, MAP_85_CS_SPIRAL_MOUNTAIN_3, 0, 1); diff --git a/src/core2/ch/ghost.c b/src/core2/ch/ghost.c index df5d3eca..940cfbe9 100644 --- a/src/core2/ch/ghost.c +++ b/src/core2/ch/ghost.c @@ -211,7 +211,7 @@ void func_8035B900(Actor *this){ this->velocity_y = this->scale*2.0; this->velocity_x = this->unk1C[0]; local->unk0 = randf2(1.0f, 4.5f); - animctrl_setTransitionDuration(this->animctrl, 0.8f); + anctrl_setTransitionDuration(this->anctrl, 0.8f); }//L8035B9D4 if(0.0 < this->lifetime_value - sp2C){ diff --git a/src/core2/ch/gravestone.c b/src/core2/ch/gravestone.c index 9ef509a7..bd2c0089 100644 --- a/src/core2/ch/gravestone.c +++ b/src/core2/ch/gravestone.c @@ -172,7 +172,7 @@ void func_8035F138(Actor *this) { local = (ActorLocal_core2_D7D10 *)&this->local; sp2C = time_getDelta(); - if ((this->state == 1) && (animctrl_getAnimTimer(this->animctrl) < 0.04)) { + if ((this->state == 1) && (anctrl_getAnimTimer(this->anctrl) < 0.04)) { this->velocity[1] = 2.0f; } else { this->velocity[1] = 1.0f; @@ -196,7 +196,7 @@ void func_8035F138(Actor *this) { this->unk1C[2] = this->position[2]; this->velocity[0] = this->yaw; } - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); if (func_80329530(this, (s32) (this->scale * 650.0f)) && func_803292E0(this)) { subaddie_set_state(this, 2U); actor_playAnimationOnce(this); @@ -215,7 +215,7 @@ void func_8035F138(Actor *this) { FUNC_8030E8B4(SFX_F9_GRUNTLING_NOISE_1, 0.8f, 32000, this->position, 1750, 3500); } - if (0.99 <= animctrl_getAnimTimer(this->animctrl)) { + if (0.99 <= anctrl_getAnimTimer(this->anctrl)) { func_8035EE80(this); break; } @@ -236,9 +236,9 @@ void func_8035F138(Actor *this) { break; } - if (((this->actor_specific_1_f + 0.28) <= 18.0) && ( 0.36 <= animctrl_getDuration(this->animctrl) - 0.0056000000000000008)) { + if (((this->actor_specific_1_f + 0.28) <= 18.0) && ( 0.36 <= anctrl_getDuration(this->anctrl) - 0.0056000000000000008)) { this->actor_specific_1_f += 0.28; - animctrl_setDuration(this->animctrl, animctrl_getDuration(this->animctrl) - 0.0056000000000000008); + anctrl_setDuration(this->anctrl, anctrl_getDuration(this->anctrl) - 0.0056000000000000008); } break; @@ -273,7 +273,7 @@ void func_8035F138(Actor *this) { } sfxsource_playSfxAtVolume(this->unk44_31, this->unk1C[1]); } - if (animctrl_getAnimTimer(this->animctrl) <= 0.02) { + if (anctrl_getAnimTimer(this->anctrl) <= 0.02) { subaddie_set_state_with_direction(this, 1, 0.02f, 1); actor_playAnimationOnce(this); this->actor_specific_1_f = 0.0f; @@ -289,7 +289,7 @@ void func_8035F138(Actor *this) { if (actor_animationIsAt(this, 0.64f)) { local->unk0 = 1; } - if (0.99 <= animctrl_getAnimTimer(this->animctrl)) { + if (0.99 <= anctrl_getAnimTimer(this->anctrl)) { func_8035EEC0(this); } break; diff --git a/src/core2/ch/icecube.c b/src/core2/ch/icecube.c index 9199ed70..0b0bb106 100644 --- a/src/core2/ch/icecube.c +++ b/src/core2/ch/icecube.c @@ -237,7 +237,7 @@ void func_8035A998(Actor *this){ } void func_8035A9E0(Actor *this){ - subaddie_set_state_with_direction(this, 3, animctrl_getAnimTimer(this->animctrl), 1); + subaddie_set_state_with_direction(this, 3, anctrl_getAnimTimer(this->anctrl), 1); actor_loopAnimation(this); this->unk38_31 = 1; this->actor_specific_1_f = 0.0f; @@ -300,7 +300,7 @@ void chicecube_update(Actor *this){ } switch(this->state){ case 1: // L8035AC9C - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); if( func_80359DF4(this, 900) || (this->unkF4_8 == 2 && volatileFlag_get(VOLATILE_FLAG_C1_IN_FINAL_CHARACTER_PARADE)) ){ @@ -314,13 +314,13 @@ void chicecube_update(Actor *this){ FUNC_8030E8B4(SFX_112_TINKER_ATTENTION, 1.3f, 23000, this->position, 1500, 4500); } if( func_80359E38(this, 0xff, 0xa) - && 0.98 < animctrl_getAnimTimer(this->animctrl) + && 0.98 < anctrl_getAnimTimer(this->anctrl) ){ func_8035A9E0(this); } break; case 3: // L8035AD88 - animctrl_setAnimTimer(this->animctrl, 0.999f); + anctrl_setAnimTimer(this->anctrl, 0.999f); if (this->actor_specific_1_f + 0.28 < 18.0) { this->actor_specific_1_f = this->actor_specific_1_f + 0.28; } @@ -329,7 +329,7 @@ void chicecube_update(Actor *this){ } func_8035A694(this); if(!func_80359DF4(this, 1300)){ - subaddie_set_state_with_direction(this, 4, animctrl_getAnimTimer(this->animctrl), 1); + subaddie_set_state_with_direction(this, 4, anctrl_getAnimTimer(this->anctrl), 1); actor_loopAnimation(this); this->unk38_31 = 1; } @@ -341,7 +341,7 @@ void chicecube_update(Actor *this){ } break; case 4: // L8035AE64 - animctrl_setAnimTimer(this->animctrl, 0.999f); + anctrl_setAnimTimer(this->anctrl, 0.999f); if (this->actor_specific_1_f - 0.28 > 8.0) { this->actor_specific_1_f = this->actor_specific_1_f - 0.28; @@ -369,7 +369,7 @@ void chicecube_update(Actor *this){ if(actor_animationIsAt(this, 0.25f)){ FUNC_8030E8B4(SFX_112_TINKER_ATTENTION, 1.3f, 23000, this->position, 1500, 4500); } - if( animctrl_getAnimTimer(this->animctrl) < 0.1 + if( anctrl_getAnimTimer(this->anctrl) < 0.1 && func_80359EBC(this, 0x50, 0xA) ){ func_8035A998(this); diff --git a/src/core2/ch/jigsawdance.c b/src/core2/ch/jigsawdance.c index fe82f881..2b5f7037 100644 --- a/src/core2/ch/jigsawdance.c +++ b/src/core2/ch/jigsawdance.c @@ -49,27 +49,27 @@ void __chJigsawDance_update(Actor * this){ player_getPosition(this->position); this->yaw = player_getYaw(); plyrMvmt = player_getAnimCtrlPtr(); - animctrl_setSmoothTransition(this->animctrl, 0); - animctrl_setIndex(this->animctrl, animctrl_getIndex(plyrMvmt)); - animctrl_setStart(this->animctrl,animctrl_getAnimTimer(plyrMvmt)); - animctrl_setDuration(this->animctrl, 1000.0f); - animctrl_start(this->animctrl, "chjigsawdance.c", 0x59); + anctrl_setSmoothTransition(this->anctrl, 0); + anctrl_setIndex(this->anctrl, anctrl_getIndex(plyrMvmt)); + anctrl_setStart(this->anctrl,anctrl_getAnimTimer(plyrMvmt)); + anctrl_setDuration(this->anctrl, 1000.0f); + anctrl_start(this->anctrl, "chjigsawdance.c", 0x59); break; case 3: plyrMvmt = player_getAnimCtrlPtr(); - animctrl_setSmoothTransition(this->animctrl, 0); - animctrl_setStart(this->animctrl,animctrl_getAnimTimer(plyrMvmt)); - animctrl_setDuration(this->animctrl, 1000.0f); - animctrl_start(this->animctrl, "chjigsawdance.c", 0x62); + anctrl_setSmoothTransition(this->anctrl, 0); + anctrl_setStart(this->anctrl,anctrl_getAnimTimer(plyrMvmt)); + anctrl_setDuration(this->anctrl, 1000.0f); + anctrl_start(this->anctrl, "chjigsawdance.c", 0x62); break; case 4: player_getPosition(this->position); this->yaw = player_getYaw(); plyrMvmt = player_getAnimCtrlPtr(); - animctrl_setSmoothTransition(this->animctrl, 0); - animctrl_setStart(this->animctrl,animctrl_getAnimTimer(plyrMvmt)); - animctrl_setDuration(this->animctrl, 1000.0f); - animctrl_start(this->animctrl, "chjigsawdance.c", 0x6e); + anctrl_setSmoothTransition(this->anctrl, 0); + anctrl_setStart(this->anctrl,anctrl_getAnimTimer(plyrMvmt)); + anctrl_setDuration(this->anctrl, 1000.0f); + anctrl_start(this->anctrl, "chjigsawdance.c", 0x6e); break; case 5: this->marker->propPtr->unk8_4 = 0; @@ -82,7 +82,7 @@ void chJigsawDance_setState(Actor * this, u32 arg1){ case 3: if(this->state == 1){ subaddie_set_state(this, 2); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_ONCE); } break; case 2: @@ -94,10 +94,10 @@ void chJigsawDance_setState(Actor * this, u32 arg1){ case 4: player_getPosition(this->position); this->yaw = player_getYaw(); - animctrl_setSmoothTransition(this->animctrl, 0); - animctrl_setStart(this->animctrl, animctrl_getAnimTimer(player_getAnimCtrlPtr())); - animctrl_setDuration(this->animctrl, 1000.0f); - animctrl_start(this->animctrl, "chjigsawdance.c", 0x97); + anctrl_setSmoothTransition(this->anctrl, 0); + anctrl_setStart(this->anctrl, anctrl_getAnimTimer(player_getAnimCtrlPtr())); + anctrl_setDuration(this->anctrl, 1000.0f); + anctrl_start(this->anctrl, "chjigsawdance.c", 0x97); break; case 5: subaddie_set_state(this, 5); diff --git a/src/core2/ch/jinjo.c b/src/core2/ch/jinjo.c index 938cd45e..2a41a4e9 100644 --- a/src/core2/ch/jinjo.c +++ b/src/core2/ch/jinjo.c @@ -186,7 +186,7 @@ void chJinjo_update(Actor * this){ case 7: case 8: sp50 = this->state == 7; - if(!sp50 || 0.1 < animctrl_getAnimTimer(this->animctrl)){//L802CE158 + if(!sp50 || 0.1 < anctrl_getAnimTimer(this->anctrl)){//L802CE158 player_getVelocity(sp70); sp70[0] *= sp58*6.0f;\ sp70[1] *= sp58*6.0f;\ @@ -203,7 +203,7 @@ void chJinjo_update(Actor * this){ this->position_x = this->position_x + sp70[0]; this->position_y = this->position_y + sp70[1]; this->position_z = this->position_z + sp70[2]; - if(sp50 || animctrl_getAnimTimer(this->animctrl) < 0.8){ + if(sp50 || anctrl_getAnimTimer(this->anctrl) < 0.8){ for(i = 0; i < 4; i++){ if(randf() < 0.3){ func_8033E73C(this->marker, i + 5, func_80329904); @@ -214,7 +214,7 @@ void chJinjo_update(Actor * this){ } if(sp50){ - if(animctrl_getAnimTimer(this->animctrl) < 0.2) + if(anctrl_getAnimTimer(this->anctrl) < 0.2) __chJinjo_802CDC9C(this, sp66); if(actor_animationIsAt(this, 0.1f)){ diff --git a/src/core2/ch/mole.c b/src/core2/ch/mole.c index 65d0a6c4..f97732bb 100644 --- a/src/core2/ch/mole.c +++ b/src/core2/ch/mole.c @@ -137,7 +137,7 @@ void func_802D9530(Actor *this){ } void func_802D9600(Actor * this){ - animctrl_setSmoothTransition(this->animctrl, 0); + anctrl_setSmoothTransition(this->anctrl, 0); subaddie_set_state_with_direction(this, 1, 0.0001f, 1); this->marker->propPtr->unk8_3 = 0; } @@ -252,7 +252,7 @@ void func_802D9ADC(Actor *this){ subaddie_set_state_with_direction(other, 2, 0.0001f, 1); } this->marker->propPtr->unk8_3 = 1; - animctrl_setSmoothTransition(this->animctrl, TRUE); + anctrl_setSmoothTransition(this->anctrl, TRUE); subaddie_set_state_with_direction(this, 2, 0.0001f, 1); actor_playAnimationOnce(this); this->unk44_31 = sfxsource_createSfxsourceAndReturnIndex(); @@ -406,8 +406,8 @@ void chmole_update(Actor *this){ this->marker->propPtr->unk8_3 = TRUE; this->yaw_ideal = func_80329784(this); func_80328FB0(this, 4.0f); - if( 0.0 < animctrl_getAnimTimer(this->animctrl) - && animctrl_getAnimTimer(this->animctrl) < 0.16 + if( 0.0 < anctrl_getAnimTimer(this->anctrl) + && anctrl_getAnimTimer(this->anctrl) < 0.16 ){ func_8030E2C4(this->unk44_31); }//L802DA128 @@ -438,7 +438,7 @@ void chmole_update(Actor *this){ ) && randf() < 0.2 ){ - animctrl_setDirection(this->animctrl, 1 ^ animctrl_isPlayedForwards(this->animctrl)); + anctrl_setDirection(this->anctrl, 1 ^ anctrl_isPlayedForwards(this->anctrl)); } else if( actor_animationIsAt(this, 0.25f) @@ -459,8 +459,8 @@ void chmole_update(Actor *this){ } break; case 4://L802DA400 - if( 0.35 < animctrl_getAnimTimer(this->animctrl) - && animctrl_getAnimTimer(this->animctrl) < 0.9 + if( 0.35 < anctrl_getAnimTimer(this->anctrl) + && anctrl_getAnimTimer(this->anctrl) < 0.9 ){ func_8030E2C4(this->unk44_31); } diff --git a/src/core2/ch/overlaynocontroller.c b/src/core2/ch/overlaynocontroller.c index 15a047c2..dfc27886 100644 --- a/src/core2/ch/overlaynocontroller.c +++ b/src/core2/ch/overlaynocontroller.c @@ -68,7 +68,7 @@ void chOverlayNoController_update(Actor *this) { actor_playAnimationOnce(this); marker_setFreeMethod(this->marker, chOverlayNoController_freeMethod); } - if (animctrl_isStopped(this->animctrl) != 0) { + if (anctrl_isStopped(this->anctrl) != 0) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); } diff --git a/src/core2/ch/overlaypressstart.c b/src/core2/ch/overlaypressstart.c index 9a83be17..1df63c43 100644 --- a/src/core2/ch/overlaypressstart.c +++ b/src/core2/ch/overlaypressstart.c @@ -80,7 +80,7 @@ void chOverlayPressStart_update(Actor *this){ marker_setFreeMethod(this->marker, chOverlayPressStart_func_802DCC78); } - if(animctrl_isStopped(this->animctrl)){ + if(anctrl_isStopped(this->anctrl)){ subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); } diff --git a/src/core2/ch/shrapnel.c b/src/core2/ch/shrapnel.c index 290cfc03..7ab52892 100644 --- a/src/core2/ch/shrapnel.c +++ b/src/core2/ch/shrapnel.c @@ -185,7 +185,7 @@ void chshrapnel_update(Actor *this) { break; case 4: - if (animctrl_isStopped(this->animctrl) != 0) { + if (anctrl_isStopped(this->anctrl) != 0) { marker_despawn(this->marker); } break; diff --git a/src/core2/ch/snacker.c b/src/core2/ch/snacker.c index 837df3c3..11b3539d 100644 --- a/src/core2/ch/snacker.c +++ b/src/core2/ch/snacker.c @@ -263,7 +263,7 @@ void chsnacker_update(Actor *this) { break; case CH_SNACKER_STATE_8_HURT: //802E15BC - if (animctrl_isStopped(this->animctrl)) { + if (anctrl_isStopped(this->anctrl)) { func_802E0CD0(this); subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); @@ -271,7 +271,7 @@ void chsnacker_update(Actor *this) { break; case CH_SNACKER_STATE_9_DEAD: //802E15FC - if (animctrl_isStopped(this->animctrl)) { + if (anctrl_isStopped(this->anctrl)) { s_chSnacker_respawnDelay_s = 60.0f; D_8037E630 = 0x63; func_802E0EC8(); diff --git a/src/core2/ch/snowman.c b/src/core2/ch/snowman.c index 44d85f78..bda9ee8b 100644 --- a/src/core2/ch/snowman.c +++ b/src/core2/ch/snowman.c @@ -219,8 +219,8 @@ void chSnowman_update(Actor *this){ local->unkA = 1; local->unkB = 0; local->unk4 = 0.0f; - animctrl_setTransitionDuration(this->animctrl, 0.8f); - animctrl_setAnimTimer(this->animctrl, randf()); + anctrl_setTransitionDuration(this->anctrl, 0.8f); + anctrl_setAnimTimer(this->anctrl, randf()); func_8032BC18(this); if(map_get() == MAP_27_FP_FREEZEEZY_PEAK){ local->unk0 = actorArray_findActorFromActorId(0x336)->marker; @@ -282,7 +282,7 @@ void chSnowman_update(Actor *this){ __chSnowman_enterDeath(this); }//L802E240C else if( - 0.98 < animctrl_getAnimTimer(this->animctrl) + 0.98 < anctrl_getAnimTimer(this->anctrl) || !__chSnowman_isPlayerInAttackRange(this, 500, 2750) || player_getWaterState() == BSWATERGROUP_2_UNDERWATER || __chSnowman_CCW_playerInProtectedZone() @@ -290,7 +290,7 @@ void chSnowman_update(Actor *this){ __chSnowman_enterIdle(this); } else{ - if(animctrl_getAnimTimer(this->animctrl) < 0.45){ + if(anctrl_getAnimTimer(this->anctrl) < 0.45){ __chSnowman_setYawTarget(this, 6.0f); } if( actor_animationIsAt(this, 0.19f) diff --git a/src/core2/ch/termite.c b/src/core2/ch/termite.c index 069e8de6..c0d6699e 100644 --- a/src/core2/ch/termite.c +++ b/src/core2/ch/termite.c @@ -32,7 +32,7 @@ void __chTermite_updateAnimationSpeed(Actor *this) { this->actor_specific_1_f += (this->velocity[0] < this->actor_specific_1_f) ? -0.2 : 0.2; } - animctrl_setDuration(this->animctrl, ml_map_f(this->actor_specific_1_f, 5.0f, 12.0f, 0.54f, 0.36f)); + anctrl_setDuration(this->anctrl, ml_map_f(this->actor_specific_1_f, 5.0f, 12.0f, 0.54f, 0.36f)); } void __chTermite_updateRandomRotationSpeed(Actor *this) { diff --git a/src/core2/code_13A00.c b/src/core2/code_13A00.c index 5ced3ba1..c84adce8 100644 --- a/src/core2/code_13A00.c +++ b/src/core2/code_13A00.c @@ -121,7 +121,7 @@ void func_8029ACD4(void){ void func_8029AD28(f32 arg0, s32 arg1){ AnimCtrl *plyr_animCtrl = baanim_getAnimCtrlPtr(); - if(animctrl_isAt(plyr_animCtrl, arg0)){ + if(anctrl_isAt(plyr_animCtrl, arg0)){ func_8029AE74(arg1); } } @@ -129,7 +129,7 @@ void func_8029AD28(f32 arg0, s32 arg1){ void func_8029AD68(f32 arg0, s32 arg1){ AnimCtrl *plyr_animCtrl = baanim_getAnimCtrlPtr(); - if(animctrl_isAt(plyr_animCtrl, arg0)){ + if(anctrl_isAt(plyr_animCtrl, arg0)){ func_8029AEE4(arg1); } } diff --git a/src/core2/code_14420.c b/src/core2/code_14420.c index 3aed725a..dd7b8710 100644 --- a/src/core2/code_14420.c +++ b/src/core2/code_14420.c @@ -780,39 +780,39 @@ void func_8029C834(enum map_e map_id, s32 exit_id){ void func_8029C848(AnimCtrl *arg0) { switch(bsStoredState_getTransformation()) { case TRANSFORM_2_TERMITE: //L8029C880 - animctrl_setIndex(arg0, ASSET_5E_ANIM_BSANT_IDLE); - animctrl_setDuration(arg0, 2.0f); + anctrl_setIndex(arg0, ASSET_5E_ANIM_BSANT_IDLE); + anctrl_setDuration(arg0, 2.0f); break; case TRANSFORM_3_PUMPKIN: //L8029C8A0 - animctrl_setIndex(arg0, ASSET_A0_ANIM_BSPUMPKIN_WALK); - animctrl_setDuration(arg0, 0.8f); + anctrl_setIndex(arg0, ASSET_A0_ANIM_BSPUMPKIN_WALK); + anctrl_setDuration(arg0, 0.8f); break; case TRANSFORM_5_CROC: //L8029C8C4 - animctrl_setIndex(arg0, ASSET_E1_ANIM_BSCROC_IDLE); - animctrl_setDuration(arg0, 1.0f); + anctrl_setIndex(arg0, ASSET_E1_ANIM_BSCROC_IDLE); + anctrl_setDuration(arg0, 1.0f); break; case TRANSFORM_4_WALRUS: //L8029C8E4 - animctrl_setIndex(arg0, ASSET_11F_ANIM_BSWALRUS_IDLE); - animctrl_setDuration(arg0, 1.0f); + anctrl_setIndex(arg0, ASSET_11F_ANIM_BSWALRUS_IDLE); + anctrl_setDuration(arg0, 1.0f); break; case TRANSFORM_6_BEE: //L8029C904 - animctrl_setIndex(arg0, ASSET_1DC_ANIM_BEE_FLY); - animctrl_setDuration(arg0, 0.38f); + anctrl_setIndex(arg0, ASSET_1DC_ANIM_BEE_FLY); + anctrl_setDuration(arg0, 0.38f); break; case TRANSFORM_1_BANJO: default: if (player_inWater()) { - animctrl_setIndex(arg0, ASSET_57_ANIM_BSSWIM_IDLE); - animctrl_setDuration(arg0, 1.2f); + anctrl_setIndex(arg0, ASSET_57_ANIM_BSSWIM_IDLE); + anctrl_setDuration(arg0, 1.2f); } else{ - animctrl_setIndex(arg0, ASSET_6F_ANIM_BSSTAND_IDLE); - animctrl_setDuration(arg0, 5.5f); + anctrl_setIndex(arg0, ASSET_6F_ANIM_BSSTAND_IDLE); + anctrl_setDuration(arg0, 5.5f); } break; } diff --git a/src/core2/code_16010.c b/src/core2/code_16010.c index 7884ef05..9d02b76a 100644 --- a/src/core2/code_16010.c +++ b/src/core2/code_16010.c @@ -256,7 +256,7 @@ void func_8029D968(void){ sp18 = (temp_v0->flags & 0x4000) && player_isStable(); } if (sp1C || sp18) { - rumbleManager_80250D94(1.0f, 0.5f, 0.4f); + baMotor_80250D94(1.0f, 0.5f, 0.4f); func_8028F504(0xD); } }//L8029DA18 @@ -275,7 +275,7 @@ void func_8029D968(void){ batimer_set(4, 4.0f); if(func_8028F504(0xD)){ func_8029D230(); - rumbleManager_80250D94(1.0f, 0.5f, 0.4f); + baMotor_80250D94(1.0f, 0.5f, 0.4f); } if(item_empty(ITEM_14_HEALTH)){ bs_checkInterrupt(BS_INTR_13); diff --git a/src/core2/code_34310.c b/src/core2/code_34310.c index 0d674489..0675f3b4 100644 --- a/src/core2/code_34310.c +++ b/src/core2/code_34310.c @@ -3,7 +3,7 @@ #include "variables.h" -extern void rumbleManager_80250E6C(f32, f32); +extern void baMotor_80250E6C(f32, f32); extern void func_802BE720(void); typedef struct { @@ -124,7 +124,7 @@ void func_802BB4D8(f32 position[3], f32 rotation[3]) { D_8037D840[phi_s1].unk10 *= D_8037D840[phi_s1].unk4; } if (level_get() != LEVEL_D_CUTSCENE) { - rumbleManager_80250E6C(D_8037D840[phi_s1].unk10 * 0.25, dt); + baMotor_80250E6C(D_8037D840[phi_s1].unk10 * 0.25, dt); } func_802BB434(phi_s1, position, rotation, D_8037D840[phi_s1].unk14*D_8037D840[phi_s1].unk10); D_8037D840[phi_s1].unk14 = (f32) -D_8037D840[phi_s1].unk14; diff --git a/src/core2/code_4A6F0.c b/src/core2/code_4A6F0.c index 68ae38e6..9a1eaf99 100644 --- a/src/core2/code_4A6F0.c +++ b/src/core2/code_4A6F0.c @@ -463,7 +463,7 @@ void chMumbo_update(Actor *this) { break; } if (0.6 < randf()) { - animctrl_setDuration(this->animctrl, randf2(0.6f, 1.8f)); + anctrl_setDuration(this->anctrl, randf2(0.6f, 1.8f)); } } break; diff --git a/src/core2/code_4C020.c b/src/core2/code_4C020.c index 5de3826a..b9fbda66 100644 --- a/src/core2/code_4C020.c +++ b/src/core2/code_4C020.c @@ -529,7 +529,7 @@ void func_802D4388(Actor *this){ break; case 0x13: //L802D44B0 - if(0.66 <= animctrl_getAnimTimer(this->animctrl)){ + if(0.66 <= anctrl_getAnimTimer(this->anctrl)){ subaddie_set_state_with_direction(this, 0x14, 0.66f, 0); } break; @@ -542,7 +542,7 @@ void func_802D4388(Actor *this){ break; case 0x15: //L802D4534 - if(animctrl_getAnimTimer(this->animctrl) < 0.03){ + if(anctrl_getAnimTimer(this->anctrl) < 0.03){ subaddie_set_state_with_direction(this, 0x12, 0.0f, 1); } break; @@ -670,7 +670,7 @@ void func_802D4AC0(Actor *this, s32 arg1, enum file_progress_e arg2) { } } if( (((arg1 & 0x800000) && (fileProgressFlag_get(arg1 + 0xFF800000))) || ((arg1 & 0x400000) && (volatileFlag_get(arg1 + 0xFFC00000)))) - && (fileProgressFlag_get(arg2)) && (this->animctrl == NULL) + && (fileProgressFlag_get(arg2)) && (this->anctrl == NULL) ) { subaddie_set_state_with_direction(this, 8, 0.0f, 1); } diff --git a/src/core2/code_53C10.c b/src/core2/code_53C10.c index eb319825..8ebc0e10 100644 --- a/src/core2/code_53C10.c +++ b/src/core2/code_53C10.c @@ -114,7 +114,7 @@ bool func_802DAFBC(Actor *this) { local = (ActorLocal_core2_53C10 *)&this->local; - sp44 = animctrl_getAnimTimer(this->animctrl) + 0.0333; + sp44 = anctrl_getAnimTimer(this->anctrl) + 0.0333; if (sp44 >= 1.0) { sp44 -= 1.0; } @@ -268,7 +268,7 @@ void func_802DB5A0(Actor *this) { case 8://L802DB704 func_80328FB0(this, 6.0f); if (func_80329480(this) != 0) { - phi_f14 = animctrl_getAnimTimer(this->animctrl) + 0.0333; + phi_f14 = anctrl_getAnimTimer(this->anctrl) + 0.0333; if (phi_f14 >= 1.0) { phi_f14 -= 1.0; } @@ -323,7 +323,7 @@ void func_802DB5A0(Actor *this) { case 4://L802DB990 if (this->unk10_12 < local->unkC_31) { - animctrl_setDuration(this->animctrl, this->unk18[4].duration - ((local->unkC_31 - this->unk10_12) * 0.1)); + anctrl_setDuration(this->anctrl, this->unk18[4].duration - ((local->unkC_31 - this->unk10_12) * 0.1)); } this->yaw_ideal = (f32) func_80329784(this); if (!func_803294B4(this, 0x21)) { @@ -359,13 +359,13 @@ void func_802DB5A0(Actor *this) { break; case 5://L802DBBDC - if (animctrl_isStopped(this->animctrl)){ + if (anctrl_isStopped(this->anctrl)){ func_80326310(this); } break; case 9://L802DBBFC - if (animctrl_getAnimTimer(this->animctrl) != 0.0f) { + if (anctrl_getAnimTimer(this->anctrl) != 0.0f) { func_802DB2F8(this); } if (this->lifetime_value > 0.0f) { @@ -377,10 +377,10 @@ void func_802DB5A0(Actor *this) { break; case 10://L802DBC74 - if (animctrl_getAnimTimer(this->animctrl) != 0.0f) { + if (anctrl_getAnimTimer(this->anctrl) != 0.0f) { func_802DB354(this); } - if (animctrl_isStopped(this->animctrl)) { + if (anctrl_isStopped(this->anctrl)) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); actor_collisionOn(this); diff --git a/src/core2/code_57C70.c b/src/core2/code_57C70.c index 2cb237e0..93ca4e45 100644 --- a/src/core2/code_57C70.c +++ b/src/core2/code_57C70.c @@ -125,14 +125,14 @@ void func_802DEE1C(Actor *this) { } switch(this->state){ case 1: - if (animctrl_isStopped(this->animctrl)) { + if (anctrl_isStopped(this->anctrl)) { subaddie_set_state_with_direction(this, 2, 0.0f, 1); actor_loopAnimation(this); } break; case 3: - if(animctrl_isStopped(this->animctrl)) { + if(anctrl_isStopped(this->anctrl)) { volatileFlag_set(VOLATILE_FLAG_C3, 1); this->state = 4; } diff --git a/src/core2/code_59780.c b/src/core2/code_59780.c index 1a27e0a5..041d6692 100644 --- a/src/core2/code_59780.c +++ b/src/core2/code_59780.c @@ -141,8 +141,8 @@ void func_802E08F0(Actor *this) { f32 sp24[3]; this->marker->collidable = FALSE; - animctrl_setDuration(this->animctrl, this->unk5C); - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); + anctrl_setDuration(this->anctrl, this->unk5C); + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_ONCE); if (actor_animationIsAt(this, 0.99f) != 0) { marker_despawn(this->marker); } diff --git a/src/core2/code_9E370.c b/src/core2/code_9E370.c index a2287a2f..6a5d715a 100644 --- a/src/core2/code_9E370.c +++ b/src/core2/code_9E370.c @@ -93,8 +93,8 @@ void actor_predrawMethod(Actor *this){ sp48 = marker_loadModelBin(this->marker); func_80330534(this); - if(this->animctrl != NULL){ - animctrl_drawSetup(this->animctrl, this->position, 1); + if(this->anctrl != NULL){ + anctrl_drawSetup(this->anctrl, this->position, 1); } if(this->marker->unk20 != NULL){ @@ -103,8 +103,8 @@ void actor_predrawMethod(Actor *this){ animMtxList_setBoned(&this->marker->unk20, model_getAnimationList(sp48), skeletalAnim_getBoneTransformList(this->unk148)); sp44 = TRUE; }//L8032542C - else if(this->animctrl != NULL && model_getAnimationList(sp48)){ - anim_802897D4(&this->marker->unk20, model_getAnimationList(sp48), animctrl_getAnimPtr(this->animctrl)); + else if(this->anctrl != NULL && model_getAnimationList(sp48)){ + anim_802897D4(&this->marker->unk20, model_getAnimationList(sp48), anctrl_getAnimPtr(this->anctrl)); sp44 = TRUE; }//L80325474 @@ -369,14 +369,14 @@ void func_80325FE8(Actor *this) { marker = this->marker; marker->id = 0; - if (this->animctrl != NULL) { - animctrl_free(this->animctrl); + if (this->anctrl != NULL) { + anctrl_free(this->anctrl); } temp_v0 = this->unk44_31; if (temp_v0 != 0) { sfxsource_freeSfxsourceByIndex(temp_v0); } - this->animctrl = NULL; + this->anctrl = NULL; this->unk44_31 = 0; if (this->unk138_7 != 0) { @@ -533,7 +533,7 @@ void func_803268B4(void) { actor = &suBaddieActorArray->data[temp_v1]; actor_info = actor->actor_info; marker = actor->marker; - anim_ctrl = actor->animctrl; + anim_ctrl = actor->anctrl; temp_s1 = actor->actor_info->unk18; if (marker->propPtr->unk8_4) { if(sp54){ @@ -545,20 +545,20 @@ void func_803268B4(void) { if (marker->unk2C_2) { marker->actorUpdate2Func(actor); if (anim_ctrl != NULL) { - actor->sound_timer = animctrl_getAnimTimer(anim_ctrl); + actor->sound_timer = anctrl_getAnimTimer(anim_ctrl); } } else if (!temp_s1 || (temp_s1 && func_803296D8(actor, temp_s1))) { if ( marker->actorUpdateFunc != NULL) { marker->actorUpdateFunc(actor); if (anim_ctrl != NULL) { - actor->sound_timer = animctrl_getAnimTimer(anim_ctrl); + actor->sound_timer = anctrl_getAnimTimer(anim_ctrl); } } } actor->unk124_7 = TRUE; actor->unk138_28 = FALSE; if (anim_ctrl != NULL) { - animctrl_update(anim_ctrl); + anctrl_update(anim_ctrl); } if (marker->unk4C) { temp_v0_3 = func_80330C74(actor); @@ -817,7 +817,7 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ suLastBaddie->unk10_7 = 0; suLastBaddie->unk10_6 = 0; suLastBaddie->unk54 = 0.0f; - suLastBaddie->animctrl_asset_id = 0; + suLastBaddie->anctrl_asset_id = 0; suLastBaddie->unk5C = 0.0f; suLastBaddie->unkF4_31 = 0; suLastBaddie->unk138_30 = 0; @@ -852,22 +852,22 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ ml_vec3f_clear(suLastBaddie->unk1C); ml_vec3f_clear(suLastBaddie->velocity); ml_vec3f_clear(suLastBaddie->spawn_position); - suLastBaddie->stored_animctrl_index = 0; + suLastBaddie->stored_anctrl_index = 0; suLastBaddie->unk58_2 = 1; - suLastBaddie->stored_animctrl_playbackType_ = 0; - suLastBaddie->stored_animctrl_forwards = 0; - suLastBaddie->stored_animctrl_smoothTransistion = 0; - suLastBaddie->stored_animctrl_duration = 0.0f; - suLastBaddie->stored_animctrl_timer = 0.0f; + suLastBaddie->stored_anctrl_playbackType_ = 0; + suLastBaddie->stored_anctrl_forwards = 0; + suLastBaddie->stored_anctrl_smoothTransistion = 0; + suLastBaddie->stored_anctrl_duration = 0.0f; + suLastBaddie->stored_anctrl_timer = 0.0f; suLastBaddie->unk138_19 = 0; - suLastBaddie->stored_animctrl_subrangeMin = 0.0f; - suLastBaddie->stored_animctrl_subrangeMax = 1.0f; + suLastBaddie->stored_anctrl_subrangeMin = 0.0f; + suLastBaddie->stored_anctrl_subrangeMax = 1.0f; suLastBaddie->unkF4_22 = 0; suLastBaddie->unk58_1 = 0; suLastBaddie->unk138_29 = 0; suLastBaddie->unk18 = actorInfo->animations; - suLastBaddie->animctrl = NULL; - suLastBaddie->stored_animctrl_timer = 0.0f; + suLastBaddie->anctrl = NULL; + suLastBaddie->stored_anctrl_timer = 0.0f; suLastBaddie->unk130 = 0; suLastBaddie->unk124_5 = 0; suLastBaddie->unk124_3 = 0; @@ -892,11 +892,11 @@ Actor *actor_new(s32 position[3], s32 yaw, ActorInfo* actorInfo, u32 flags){ if( actorInfo->animations){ sp54 = &suLastBaddie->unk18[suLastBaddie->state]; if(sp54->index != 0){ - suLastBaddie->animctrl = animctrl_new(0); - animctrl_reset(suLastBaddie->animctrl); - animctrl_setIndex(suLastBaddie->animctrl, sp54->index); - animctrl_setDuration(suLastBaddie->animctrl, sp54->duration); - animctrl_start(suLastBaddie->animctrl, "subaddie.c", 0x4A5); + suLastBaddie->anctrl = anctrl_new(0); + anctrl_reset(suLastBaddie->anctrl); + anctrl_setIndex(suLastBaddie->anctrl, sp54->index); + anctrl_setDuration(suLastBaddie->anctrl, sp54->duration); + anctrl_start(suLastBaddie->anctrl, "subaddie.c", 0x4A5); } }//L80327BA8 suLastBaddie->unk124_11 = 0; @@ -1171,26 +1171,26 @@ static bool __subaddie_set_state(Actor *this, s32 state) if (1); if (index != 0){ - if (this->animctrl == NULL){ - this->animctrl = animctrl_new(0); - animctrl_reset(this->animctrl); + if (this->anctrl == NULL){ + this->anctrl = anctrl_new(0); + anctrl_reset(this->anctrl); } - animctrl_setIndex(this->animctrl, animInfo->index); - animctrl_setDuration(this->animctrl, animInfo->duration); - animctrl_setDirection(this->animctrl, mvmt_dir_forwards); + anctrl_setIndex(this->anctrl, animInfo->index); + anctrl_setDuration(this->anctrl, animInfo->duration); + anctrl_setDirection(this->anctrl, mvmt_dir_forwards); } - else if (this->animctrl) { - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_STOPPED); - animctrl_setDirection(this->animctrl, mvmt_dir_forwards); + else if (this->anctrl) { + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_STOPPED); + anctrl_setDirection(this->anctrl, mvmt_dir_forwards); } return TRUE; } void func_803285E8(Actor *this, f32 anim_start_position, int direction){ - animctrl_setStart(this->animctrl, anim_start_position); + anctrl_setStart(this->anctrl, anim_start_position); if (direction != -1) { - animctrl_setDirection(this->animctrl, direction); + anctrl_setDirection(this->anctrl, direction); } this->sound_timer = anim_start_position; @@ -1202,16 +1202,16 @@ int func_8032863C(AnimCtrl *anim_ctrl, f32 min, f32 max) { f32 timer; s32 sp18; - timer = animctrl_getAnimTimer(anim_ctrl); + timer = anctrl_getAnimTimer(anim_ctrl); if ((timer < min) || (max <= timer)) { return -1; } - sp18 = animctrl_isPlayedForwards(anim_ctrl); + sp18 = anctrl_isPlayedForwards(anim_ctrl); if( ((sp18 == 0) && (min <= timer) && (timer < (min + 0.015))) || ((sp18 == 1) && (timer < max) && ((max - 0.015) <= timer)) ) { sp18 = (sp18) ? 0 : 1; - animctrl_setDirection(anim_ctrl, sp18); + anctrl_setDirection(anim_ctrl, sp18); return sp18 + 2; } return sp18; @@ -1226,37 +1226,37 @@ s32 func_80328748(AnimCtrl *anim_ctrl, f32 min, f32 max) { if (sp24 != -1) { return sp24; } - sp20 = animctrl_getAnimTimer(anim_ctrl); - if (animctrl_isPlayedForwards(anim_ctrl) == TRUE) { + sp20 = anctrl_getAnimTimer(anim_ctrl); + if (anctrl_isPlayedForwards(anim_ctrl) == TRUE) { if (max <= sp20) { - animctrl_setAnimTimer(anim_ctrl, max); - animctrl_setDirection(anim_ctrl, 0); + anctrl_setAnimTimer(anim_ctrl, max); + anctrl_setDirection(anim_ctrl, 0); sp24 = 2; } } else if (sp20 < min) { - animctrl_setAnimTimer(anim_ctrl, min); - animctrl_setDirection(anim_ctrl, 1); + anctrl_setAnimTimer(anim_ctrl, min); + anctrl_setDirection(anim_ctrl, 1); sp24 = 3; } return sp24; } int func_8032881C(Actor *this){ - if(this->animctrl){ - if(animctrl_getPlaybackType(this->animctrl) == ANIMCTRL_ONCE){ - return animctrl_isStopped(this->animctrl); + if(this->anctrl){ + if(anctrl_getPlaybackType(this->anctrl) == ANIMCTRL_ONCE){ + return anctrl_isStopped(this->anctrl); } } return 0; } int actor_animationIsAt(Actor *this, f32 arg1){ - f32 f2 = animctrl_getAnimTimer(this->animctrl); + f32 f2 = anctrl_getAnimTimer(this->anctrl); if(f2 == this->sound_timer){ return 0; } else { - if(animctrl_isPlayedForwards(this->animctrl)){ + if(anctrl_isPlayedForwards(this->anctrl)){ if(this->sound_timer < f2){ return this->sound_timer <= arg1 && arg1 < f2; } @@ -1277,7 +1277,7 @@ int actor_animationIsAt(Actor *this, f32 arg1){ void func_803289EC(Actor *this , f32 anim_start_position, int direction){ func_803285E8(this, anim_start_position, direction); - animctrl_start(this->animctrl, "subaddie.c", 0x6b1); + anctrl_start(this->anctrl, "subaddie.c", 0x6b1); } int func_80328A2C(Actor *this, f32 arg1, s32 direction, f32 probability){ @@ -1291,8 +1291,8 @@ int func_80328A2C(Actor *this, f32 arg1, s32 direction, f32 probability){ } void subaddie_set_state(Actor * this, u32 arg1){ - if(__subaddie_set_state(this, arg1) && this->animctrl){ - animctrl_start(this->animctrl, "subaddie.c", 0X6CA); + if(__subaddie_set_state(this, arg1) && this->anctrl){ + anctrl_start(this->anctrl, "subaddie.c", 0X6CA); } } @@ -1301,8 +1301,8 @@ void subaddie_set_state_forward(Actor * this, s32 arg1){ } void subaddie_set_state_looped(Actor * this, u32 arg1){ - if(__subaddie_set_state(this, arg1) && this->animctrl){ - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); + if(__subaddie_set_state(this, arg1) && this->anctrl){ + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_LOOP); func_803289EC(this, 0.0f, 1); } } @@ -1317,16 +1317,16 @@ int subaddie_maybe_set_state(Actor *this, s32 myAnimId, f32 chance){ } void subaddie_set_state_with_direction(Actor * this, s32 myAnimId, f32 anim_start_position, s32 direction){ - if (__subaddie_set_state(this, myAnimId) && this->animctrl) { + if (__subaddie_set_state(this, myAnimId) && this->anctrl) { func_803289EC(this, anim_start_position, direction); } } bool subaddie_maybe_set_state_position_direction(Actor *this, s32 myAnimId, f32 start_position, s32 direction, f32 probability) { if (randf() < probability) { - if (__subaddie_set_state(this, myAnimId) && this->animctrl) { + if (__subaddie_set_state(this, myAnimId) && this->anctrl) { func_803285E8(this, start_position, direction); - animctrl_start(this->animctrl, "subaddie.c", 0x705); + anctrl_start(this->anctrl, "subaddie.c", 0x705); } return TRUE; } @@ -1616,13 +1616,13 @@ void func_80329878(Actor *arg0, f32 arg1){ } void actor_playAnimationOnce(Actor *this){ - if(this->animctrl) - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_ONCE); + if(this->anctrl) + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_ONCE); } void actor_loopAnimation(Actor *this){ - if(this->animctrl) - animctrl_setPlaybackType(this->animctrl, ANIMCTRL_LOOP); + if(this->anctrl) + anctrl_setPlaybackType(this->anctrl, ANIMCTRL_LOOP); } s32 func_80329904(ActorMarker *arg0, s32 arg1, f32 *arg2){ @@ -1681,25 +1681,25 @@ void func_803299B4(Actor *arg0) { } void func_80329B68(Actor *this){ - if(this->animctrl == NULL) + if(this->anctrl == NULL) return; - if(this->stored_animctrl_playbackType_){ - animctrl_setPlaybackType(this->animctrl, this->stored_animctrl_playbackType_); + if(this->stored_anctrl_playbackType_){ + anctrl_setPlaybackType(this->anctrl, this->stored_anctrl_playbackType_); } - animctrl_setIndex(this->animctrl, this->stored_animctrl_index); - animctrl_setDirection(this->animctrl, this->stored_animctrl_forwards); - animctrl_setSmoothTransition(this->animctrl, this->stored_animctrl_smoothTransistion); - animctrl_setDuration(this->animctrl, this->stored_animctrl_duration); - animctrl_setStart(this->animctrl, this->stored_animctrl_timer); - animctrl_setSubRange(this->animctrl, this->stored_animctrl_subrangeMin, this->stored_animctrl_subrangeMax); - animctrl_start(this->animctrl, "subaddie.c", 0x8fd); - animctrl_setTimer(this->animctrl, this->sound_timer); + anctrl_setIndex(this->anctrl, this->stored_anctrl_index); + anctrl_setDirection(this->anctrl, this->stored_anctrl_forwards); + anctrl_setSmoothTransition(this->anctrl, this->stored_anctrl_smoothTransistion); + anctrl_setDuration(this->anctrl, this->stored_anctrl_duration); + anctrl_setStart(this->anctrl, this->stored_anctrl_timer); + anctrl_setSubRange(this->anctrl, this->stored_anctrl_subrangeMin, this->stored_anctrl_subrangeMax); + anctrl_start(this->anctrl, "subaddie.c", 0x8fd); + anctrl_setTimer(this->anctrl, this->sound_timer); } void actor_copy(Actor *dst, Actor *src){ dst->marker = src->marker; - dst->animctrl = src->animctrl; + dst->anctrl = src->anctrl; dst->unk44_14 = src->unk44_14; dst->unk148 = src->unk148; dst->unk14C[0] = src->unk14C[0]; @@ -1762,16 +1762,16 @@ void *actors_appendToSavestate(void * begin, u32 end){ s0->unkF4_28 = s1->marker->propPtr->unk8_3; s0->unkF4_27 = s1->marker->propPtr->unk8_2; //80329F94 - if(s0->animctrl){ - s0->stored_animctrl_index = animctrl_getIndex(s0->animctrl); - s0->stored_animctrl_playbackType_ = animctrl_getPlaybackType(s0->animctrl); - s0->stored_animctrl_forwards = animctrl_isPlayedForwards(s0->animctrl); - s0->stored_animctrl_smoothTransistion = animctrl_isSmoothTransistion(s0->animctrl); - s0->stored_animctrl_duration = animctrl_getDuration(s0->animctrl); - s0->stored_animctrl_timer = animctrl_getAnimTimer(s0->animctrl); - animctrl_getSubRange(s0->animctrl, &s0->stored_animctrl_subrangeMin, &s0->stored_animctrl_subrangeMax); + if(s0->anctrl){ + s0->stored_anctrl_index = anctrl_getIndex(s0->anctrl); + s0->stored_anctrl_playbackType_ = anctrl_getPlaybackType(s0->anctrl); + s0->stored_anctrl_forwards = anctrl_isPlayedForwards(s0->anctrl); + s0->stored_anctrl_smoothTransistion = anctrl_isSmoothTransistion(s0->anctrl); + s0->stored_anctrl_duration = anctrl_getDuration(s0->anctrl); + s0->stored_anctrl_timer = anctrl_getAnimTimer(s0->anctrl); + anctrl_getSubRange(s0->anctrl, &s0->stored_anctrl_subrangeMin, &s0->stored_anctrl_subrangeMax); } - s0->animctrl = NULL; + s0->anctrl = NULL; s0->marker = NULL; s0++; } @@ -2127,8 +2127,8 @@ void actorArray_defrag(void) { i_actor->unk158[1] = partEmitMgr_defragEmitter(i_actor->unk158[1]); } - if (i_actor->animctrl != NULL) { - i_actor->animctrl = animctrl_defrag(i_actor->animctrl); + if (i_actor->anctrl != NULL) { + i_actor->anctrl = anctrl_defrag(i_actor->anctrl); } if (i_actor->marker->unk20 != NULL) { @@ -2344,7 +2344,7 @@ bool func_8032BBE8(Actor *this){ } void func_8032BC18(Actor *this){ - func_80287784(this->animctrl, 0); + func_80287784(this->anctrl, 0); } void func_8032BC3C(Actor *this, f32 arg1){ diff --git a/src/core2/code_B9770.c b/src/core2/code_B9770.c index d8e7a21a..8d66323d 100644 --- a/src/core2/code_B9770.c +++ b/src/core2/code_B9770.c @@ -883,16 +883,16 @@ s32 func_803422D4(Actor *arg0, Union_glspline *arg1, SplineList *arg2){ } if (arg1->t1.unk8.bit10){ arg0->unk5C = ((f32) arg1->t1.unk8.bit21) / 4; - arg0->animctrl_asset_id = lookup_getAnimAssetId(arg1->t1.unk8.bit31); - if (arg0->animctrl == 0) { - arg0->animctrl = animctrl_new(0); - animctrl_reset(arg0->animctrl); + arg0->anctrl_asset_id = lookup_getAnimAssetId(arg1->t1.unk8.bit31); + if (arg0->anctrl == 0) { + arg0->anctrl = anctrl_new(0); + anctrl_reset(arg0->anctrl); } - animctrl_setIndex(arg0->animctrl, arg0->animctrl_asset_id); - animctrl_setDuration(arg0->animctrl, arg0->unk5C); - animctrl_setDirection(arg0->animctrl, 1); - if (arg0->animctrl != 0) { - animctrl_start(arg0->animctrl, "glspline.c", 0x545); + anctrl_setIndex(arg0->anctrl, arg0->anctrl_asset_id); + anctrl_setDuration(arg0->anctrl, arg0->unk5C); + anctrl_setDirection(arg0->anctrl, 1); + if (arg0->anctrl != 0) { + anctrl_start(arg0->anctrl, "glspline.c", 0x545); } } switch (arg1->t1.unk4.bit6){ diff --git a/src/core2/code_CC1E0.c b/src/core2/code_CC1E0.c index 2099e1f7..5af99484 100644 --- a/src/core2/code_CC1E0.c +++ b/src/core2/code_CC1E0.c @@ -72,7 +72,7 @@ s32 func_803531C8(u8 projectile_indx, s32 arg1){ case MARKER_FC_CROCTUS: //L803532C4 other_actor = marker_getActor(other_marker); if(other_actor->unk38_31 == 0){ - temp_f2 = animctrl_getAnimTimer(other_actor->animctrl); + temp_f2 = anctrl_getAnimTimer(other_actor->anctrl); if(0.25 <= temp_f2 && temp_f2 <= 0.75){ other_actor->unk38_31 = 1; } diff --git a/src/core2/code_DAAA0.c b/src/core2/code_DAAA0.c index de831483..c344bd5e 100644 --- a/src/core2/code_DAAA0.c +++ b/src/core2/code_DAAA0.c @@ -200,7 +200,7 @@ void func_80361E10(Actor *this) { void func_80361E9C(Actor *this){ - if( this->animctrl != NULL + if( this->anctrl != NULL && this->unk134 != NULL && this->unk160 != NULL ){ @@ -214,9 +214,9 @@ void func_80361EE0(Actor *this) { Struct62s *sp24; Struct63s *sp20; - if (this->animctrl != NULL && this->unk134 != NULL) { + if (this->anctrl != NULL && this->unk134 != NULL) { sp24 = this->unk108; - sp28 = animctrl_getIndex(this->animctrl); + sp28 = anctrl_getIndex(this->anctrl); if (sp28 != this->unk10C) { this->unk10C = sp28; anSeq_clear(this->unk134); @@ -227,6 +227,6 @@ void func_80361EE0(Actor *this) { } } } - anSeq_update(this->unk134, this->animctrl); + anSeq_update(this->unk134, this->anctrl); } } diff --git a/src/core2/fx/common3score.c b/src/core2/fx/common3score.c index bf18ce56..8e0ec073 100644 --- a/src/core2/fx/common3score.c +++ b/src/core2/fx/common3score.c @@ -158,18 +158,18 @@ void fxcommon3score_update(enum item_e arg0, void *arg1) { a1->model = assetcache_get(a1->model_id); } if ((a1->anim_id != 0) && (a1->anim_ctrl == NULL)) { - a1->anim_ctrl = animctrl_new(0); - animctrl_reset(a1->anim_ctrl); - animctrl_setIndex(a1->anim_ctrl, (enum asset_e) a1->anim_id); - animctrl_setDuration(a1->anim_ctrl, a1->anim_duration); - animctrl_start(a1->anim_ctrl, "fxcommon3score.c", 0x74); + a1->anim_ctrl = anctrl_new(0); + anctrl_reset(a1->anim_ctrl); + anctrl_setIndex(a1->anim_ctrl, (enum asset_e) a1->anim_id); + anctrl_setDuration(a1->anim_ctrl, a1->anim_duration); + anctrl_start(a1->anim_ctrl, "fxcommon3score.c", 0x74); } /* fallthrough */ case 2: case 3: a1->unk68 += sp24 * sp20 * a1->unk48; if ( a1->anim_ctrl != NULL) { - animctrl_update( a1->anim_ctrl); + anctrl_update( a1->anim_ctrl); } break; case 0: @@ -211,7 +211,7 @@ void fxcommon3score_draw(enum item_e item_id, void *arg1, Gfx **gfx, Mtx **mtx, } func_80253208(gfx, a1->unk30 - a1->unk6C, sp40 - a1->unk6C, 2*a1->unk6C, 2*a1->unk6C, gFramebuffers[getActiveFramebuffer()]); if(a1->anim_ctrl != NULL){ - animctrl_drawSetup(a1->anim_ctrl, sp5C, 1); + anctrl_drawSetup(a1->anim_ctrl, sp5C, 1); } modelRender_draw(gfx, mtx, sp5C, sp68, a1->unk3C*sp3C, sp44, a1->model); }//L80300BA4 @@ -220,7 +220,7 @@ void fxcommon3score_draw(enum item_e item_id, void *arg1, Gfx **gfx, Mtx **mtx, void fxcommon3score_free(enum item_e item_id, void *arg1){ Struct_core2_79830_0 *a1 = (Struct_core2_79830_0 *)arg1; if(a1->anim_ctrl != NULL){ - animctrl_free(a1->anim_ctrl); + anctrl_free(a1->anim_ctrl); a1->anim_ctrl = NULL; } diff --git a/src/core2/gc/pauseMenu.c b/src/core2/gc/pauseMenu.c index 79f02fa0..8aad86ee 100644 --- a/src/core2/gc/pauseMenu.c +++ b/src/core2/gc/pauseMenu.c @@ -769,7 +769,7 @@ void gcpausemenu_init(void) { D_80383010.b_button_frame = D_80383010.unk3_0 = D_80383010.b_button_alpha = 0; D_80383010.page_cnt = gcpausemenu_initLargestPageIndex(); D_80383010.sns_alpha = D_80383010.sns_visible = D_80383010.unk70_31 = D_80383010.unk70_30 = 0; - rumbleManager_80250FC0(); + baMotor_80250FC0(); gcPauseMenu_setState(PAUSE_STATE_0_MENU_INIT); } diff --git a/src/core2/gc/section.c b/src/core2/gc/section.c index 006ece56..89435462 100644 --- a/src/core2/gc/section.c +++ b/src/core2/gc/section.c @@ -277,7 +277,7 @@ void func_8030AFD8(s32 arg0){ func_8033301C(); } func_8034789C(); - rumbleManager_80250FC0(); //stop controller motor + baMotor_80250FC0(); //stop controller motor gcpausemenu_80314B24(); func_80347A70(); } diff --git a/src/core2/gc/transition.c b/src/core2/gc/transition.c index 8d5db1ca..4d173578 100644 --- a/src/core2/gc/transition.c +++ b/src/core2/gc/transition.c @@ -4,7 +4,7 @@ #include "variables.h" #include "gc/gctransition.h" -void animctrl_setAnimTimer(AnimCtrl*, f32); +void anctrl_setAnimTimer(AnimCtrl*, f32); void func_8025AC20(s32, s32, s32, f32, char*, s32); typedef enum { @@ -140,7 +140,7 @@ struct{ void * model_ptr; //asset_ptr f32 rotation; f32 timer; - AnimCtrl *animctrl; + AnimCtrl *anctrl; s32 substate; //times update called? } s_current_transition; @@ -168,9 +168,9 @@ void _gctranstion_changeState(s32 state, TransitionInfo *desc){ func_8033BD20(&s_current_transition.model_ptr); } - if(s_current_transition.animctrl != NULL){ - animctrl_free(s_current_transition.animctrl); - s_current_transition.animctrl = NULL; + if(s_current_transition.anctrl != NULL){ + anctrl_free(s_current_transition.anctrl); + s_current_transition.anctrl = NULL; } s_current_transition.unk0 = 0; @@ -188,21 +188,21 @@ void _gctranstion_changeState(s32 state, TransitionInfo *desc){ //load transistion animation if(desc != NULL && desc->anim_index != NULL){ - s_current_transition.animctrl = animctrl_new(0); - animctrl_reset(s_current_transition.animctrl); - animctrl_setIndex(s_current_transition.animctrl, desc->anim_index); - animctrl_setDuration(s_current_transition.animctrl, desc->duration); - animctrl_setPlaybackType(s_current_transition.animctrl, ANIMCTRL_ONCE); + s_current_transition.anctrl = anctrl_new(0); + anctrl_reset(s_current_transition.anctrl); + anctrl_setIndex(s_current_transition.anctrl, desc->anim_index); + anctrl_setDuration(s_current_transition.anctrl, desc->duration); + anctrl_setPlaybackType(s_current_transition.anctrl, ANIMCTRL_ONCE); if(state == TRANSITION_STATE_5_FADE_OUT){ - animctrl_setDirection(s_current_transition.animctrl, 0); + anctrl_setDirection(s_current_transition.anctrl, 0); func_8028F7C8(1); //player_noControl(true) func_80335110(0); //objects_update(false) } else{ osViBlack(1); - animctrl_setAnimTimer(s_current_transition.animctrl, 0.25f); //set animation timer + anctrl_setAnimTimer(s_current_transition.anctrl, 0.25f); //set animation timer } - animctrl_start(s_current_transition.animctrl, "gctransition.c", 0x125); + anctrl_start(s_current_transition.anctrl, "gctransition.c", 0x125); } if(state == TRANSITION_STATE_4_FADE_IN){ @@ -250,7 +250,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){ return; viewport_backupState(); - if(s_current_transition.animctrl != NULL){ + if(s_current_transition.anctrl != NULL){ vp_position[0] = 0.0f; vp_position[1] = 0.0f; vp_position[2] = 350.0f; @@ -273,17 +273,17 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){ sp58[0] = 0.0f; sp58[1] = 0.0f; sp58[2] = 0.0f; - if(s_current_transition.animctrl != NULL){ + if(s_current_transition.anctrl != NULL){ gDPSetTextureFilter((*gdl)++, G_TF_POINT); gDPSetColorDither((*gdl)++, G_CD_DISABLE); - animctrl_drawSetup(s_current_transition.animctrl, sp58, 1); + anctrl_drawSetup(s_current_transition.anctrl, sp58, 1); modelRender_setDepthMode(MODEL_RENDER_DEPTH_FULL); } //complex animation (from animation bin file) if(s_current_transition.state == 1 || s_current_transition.state == 6){ modelRender_draw(gdl, mptr, sp58, vp_rotation, 1.0f, 0, s_current_transition.model_ptr); - if(s_current_transition.animctrl != NULL){ + if(s_current_transition.anctrl != NULL){ gDPSetTextureFilter((*gdl)++, G_TF_BILERP); gDPSetColorDither((*gdl)++, G_CD_MAGICSQ); } @@ -362,7 +362,7 @@ void gctransition_draw(Gfx **gdl, Mtx **mptr, Vtx **vptr){ else{ } - if(s_current_transition.animctrl != NULL){ + if(s_current_transition.anctrl != NULL){ gDPSetTextureFilter((*gdl)++, G_TF_BILERP); } viewport_restoreState(); @@ -430,8 +430,8 @@ void gctransition_update(void){ if(s_current_transition.transistion_info == NULL) return; - if(s_current_transition.animctrl != NULL){ - animctrl_update(s_current_transition.animctrl); + if(s_current_transition.anctrl != NULL){ + anctrl_update(s_current_transition.anctrl); if(s_current_transition.state == TRANSITION_STATE_4_FADE_IN){ switch(s_current_transition.substate){ case 0: @@ -475,7 +475,7 @@ void gctransition_update(void){ s_current_transition.timer += dt; } if(s_current_transition.transistion_info->duration < s_current_transition.timer - || (s_current_transition.animctrl!= NULL && animctrl_isStopped(s_current_transition.animctrl)) + || (s_current_transition.anctrl!= NULL && anctrl_isStopped(s_current_transition.anctrl)) ){ s_current_transition.timer = s_current_transition.transistion_info->duration; //update next transition rotation @@ -490,7 +490,7 @@ void gctransition_update(void){ if(s_current_transition.state == TRANSITION_STATE_4_FADE_IN) func_8030C180(); - if(s_current_transition.animctrl != NULL) + if(s_current_transition.anctrl != NULL) func_80334ECC(); } s_current_transition.substate++; diff --git a/src/core2/gc/zoombox.c b/src/core2/gc/zoombox.c index f64e2b44..851cf9b3 100644 --- a/src/core2/gc/zoombox.c +++ b/src/core2/gc/zoombox.c @@ -462,7 +462,7 @@ void func_80315300(GcZoombox *this){ this->model = NULL; } if(this->anim_ctrl != NULL){ - animctrl_free(this->anim_ctrl); + anctrl_free(this->anim_ctrl); this->anim_ctrl = NULL; } if(this->unkF8 != NULL){ @@ -519,8 +519,8 @@ void func_80315524(GcZoombox *this){ void func_8031556C(GcZoombox *this){ this->state = 5; - animctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_ONCE); - animctrl_setDirection(this->anim_ctrl, 1); + anctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_ONCE); + anctrl_setDirection(this->anim_ctrl, 1); this->unk134 = 0; this->unk1A4_16 = 1; func_80318498(this); @@ -530,8 +530,8 @@ void func_803155C8(GcZoombox *this){ int i; this->state = 6; - animctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_ONCE); - animctrl_setDirection(this->anim_ctrl, 0); + anctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_ONCE); + anctrl_setDirection(this->anim_ctrl, 0); this->unk1A4_16 = 1; this->unk1A4_23 = 0; _gczoombox_memClear(this->unk0, 0x30); @@ -833,7 +833,7 @@ void func_803163A8(GcZoombox *this, Gfx **gfx, Mtx **mtx) { func_8033A308(sp44); modelRender_setDepthMode(MODEL_RENDER_DEPTH_NONE); if (this->anim_ctrl != NULL) { - animctrl_drawSetup(this->anim_ctrl, sp50, 1); + anctrl_drawSetup(this->anim_ctrl, sp50, 1); } modelRender_draw(gfx, mtx, sp50, sp5C, this->unk198 * sp34, sp38, this->model); } @@ -1219,18 +1219,18 @@ void gczoombox_update(GcZoombox *this){ break; case 0x5: //L803177D4 if(this->unk1A4_16){ - animctrl_update(this->anim_ctrl); + anctrl_update(this->anim_ctrl); if(this->unk1A4_14){ - this->unk17C = 1.0 - animctrl_getAnimTimer(this->anim_ctrl)/this->unk194; + this->unk17C = 1.0 - anctrl_getAnimTimer(this->anim_ctrl)/this->unk194; } }//L8031782C - if(this->unk1A4_11 && animctrl_isAt(this->anim_ctrl, 0.1f)){ + if(this->unk1A4_11 && anctrl_isAt(this->anim_ctrl, 0.1f)){ func_8030E760(SFX_CC_PAUSEMENU_ENTER_SUBMENU, 1.1f, this->unk12E); }//L80317864 - if(this->unk1A4_16 && animctrl_isAt(this->anim_ctrl, this->unk194)){ - animctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_STOPPED); - animctrl_setAnimTimer(this->anim_ctrl, this->unk194); - animctrl_update(this->anim_ctrl); + if(this->unk1A4_16 && anctrl_isAt(this->anim_ctrl, this->unk194)){ + anctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_STOPPED); + anctrl_setAnimTimer(this->anim_ctrl, this->unk194); + anctrl_update(this->anim_ctrl); if(this->unk1A4_14) func_803152C4(this); this->unk1A4_14 = this->unk1A4_13 = 0; @@ -1248,15 +1248,15 @@ void gczoombox_update(GcZoombox *this){ break; case 0x6: //L80317940 if(this->unk1A4_16){ - animctrl_update(this->anim_ctrl); + anctrl_update(this->anim_ctrl); if(this->unk1A4_14){ - this->unk17C = animctrl_getAnimTimer(this->anim_ctrl)/this->unk194; + this->unk17C = anctrl_getAnimTimer(this->anim_ctrl)/this->unk194; } } - if(this->unk1A4_11 && animctrl_isAt(this->anim_ctrl, 0.9f)){ + if(this->unk1A4_11 && anctrl_isAt(this->anim_ctrl, 0.9f)){ func_8030E6A4(SFX_CD_PAUSEMENU_LEAVE_SUBMENU, 1.1f, this->unk12E); } - if(this->unk1A4_16 && animctrl_isStopped(this->anim_ctrl)){ + if(this->unk1A4_16 && anctrl_isStopped(this->anim_ctrl)){ if(this->unk1A4_14){ func_803152C4(this); } @@ -1442,10 +1442,10 @@ GcZoombox *gczoombox_new(s32 y, GcZoomboxSprite portrait_id, s32 arg2, s32 arg3, this->model = assetcache_get(0x89d); __gczoombox_load_sprite(this, portrait_id); - this->anim_ctrl = animctrl_new(0); - animctrl_reset(this->anim_ctrl); - animctrl_setIndex(this->anim_ctrl, ASSET_138_ANIM_ZOOMBOX); - animctrl_start(this->anim_ctrl, "gczoombox.c", 0x6fd); + this->anim_ctrl = anctrl_new(0); + anctrl_reset(this->anim_ctrl); + anctrl_setIndex(this->anim_ctrl, ASSET_138_ANIM_ZOOMBOX); + anctrl_start(this->anim_ctrl, "gczoombox.c", 0x6fd); gczoombox_func_803184C8(this, 15.0f, 5, 2, 0.4f, 0, 0); //gczoombox_func_803184C8(this, 15.0f, 5, 2, D_80378940, 0, 0); this->unk176 = D_8036C6C0[portrait_id].unk2; @@ -1561,7 +1561,7 @@ void gczoombox_func_803184C8(GcZoombox *this, f32 arg1, s32 arg2, s32 arg3, f32 this->unk184 = arg3; this->unk190 = 1.0 / arg1; if (this->anim_ctrl != NULL) { - animctrl_setDuration(this->anim_ctrl, animation_duration); + anctrl_setDuration(this->anim_ctrl, animation_duration); } this->unk1A4_12 = BOOL(arg5); this->unk1A4_10 = BOOL(arg6); @@ -1756,7 +1756,7 @@ void gczoombox_defrag(GcZoombox *this) { if (this != NULL) { if (this->anim_ctrl != NULL) { - this->anim_ctrl = animctrl_defrag(this->anim_ctrl); + this->anim_ctrl = anctrl_defrag(this->anim_ctrl); } } } diff --git a/src/cutscenes/code_0.c b/src/cutscenes/code_0.c index b3a71323..1c366beb 100644 --- a/src/cutscenes/code_0.c +++ b/src/cutscenes/code_0.c @@ -166,7 +166,7 @@ void cutscenes_func_80386A00(void){ void func_80386A90(s32 marker, s32 duration) { Actor * actor = marker_getActor(reinterpret_cast(ActorMarker *, marker)); f32 duration_f = reinterpret_cast(f32, duration); - animctrl_setTransitionDuration(actor->animctrl, duration_f); + anctrl_setTransitionDuration(actor->anctrl, duration_f); } void func_80386AC8(s32 arg0) { diff --git a/src/cutscenes/code_6730.c b/src/cutscenes/code_6730.c index b5959e81..3be1ba2a 100644 --- a/src/cutscenes/code_6730.c +++ b/src/cutscenes/code_6730.c @@ -74,7 +74,7 @@ void func_8038CCA8(Actor *this){ if(!this->volatile_initialized){ this->volatile_initialized = TRUE; - animctrl_setSmoothTransition(this->animctrl, 0); + anctrl_setSmoothTransition(this->anctrl, 0); this->lifetime_value = this->yaw/4; local->unk0 = partEmitMgr_newEmitter(0xA0); cutscenes_func_8038CB20(local->unk0); diff --git a/src/cutscenes/code_6C90.c b/src/cutscenes/code_6C90.c index 8ecee87a..40bfa564 100644 --- a/src/cutscenes/code_6C90.c +++ b/src/cutscenes/code_6C90.c @@ -75,7 +75,7 @@ void func_8038D218(Actor *this){ if(!this->volatile_initialized){ this->volatile_initialized = TRUE; - animctrl_setSmoothTransition(this->animctrl, 0); + anctrl_setSmoothTransition(this->anctrl, 0); this->lifetime_value = this->yaw/4; local->unk0 = partEmitMgr_newEmitter(0x100); func_8038D080(local->unk0); diff --git a/src/fight/chbossjinjo.c b/src/fight/chbossjinjo.c index 9a1881de..54ad8724 100644 --- a/src/fight/chbossjinjo.c +++ b/src/fight/chbossjinjo.c @@ -166,7 +166,7 @@ void chBossJinjo_update(Actor *this){ switch (this->state) { case BOSSJINJO_STATE_1_WAKE_UP: - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); if (this->lifetime_value < 0.0) { subaddie_set_state_with_direction(this, BOSSJINJO_STATE_2_YAWN, 0.001f, 1); @@ -191,7 +191,7 @@ void chBossJinjo_update(Actor *this){ case BOSSJINJO_STATE_4_ATTACK: inState3 = (this->state == BOSSJINJO_STATE_3_SPIN_UP); - if (!inState3 || 0.1 < animctrl_getAnimTimer(this->animctrl)) { + if (!inState3 || 0.1 < anctrl_getAnimTimer(this->anctrl)) { player_getVelocity(&velocity_player); velocity_player[0] *= time_delta * 6.0f; @@ -214,13 +214,13 @@ void chBossJinjo_update(Actor *this){ this->position_y = velocity_player[1] + this->position_y; this->position_z = velocity_player[2] + this->position_z; - if (inState3 || animctrl_getAnimTimer(this->animctrl) < 0.8) { + if (inState3 || anctrl_getAnimTimer(this->anctrl) < 0.8) { chbossjinjo_func_8038C79C(this); } } if (inState3) { - if(animctrl_getAnimTimer(this->animctrl) < 0.2) { + if(anctrl_getAnimTimer(this->anctrl) < 0.2) { chbossjinjo_rotateYaw(this, new_yaw); } @@ -264,7 +264,7 @@ void chBossJinjo_update(Actor *this){ } } else { if (actor_animationIsAt(this, 0.9f)) { - animctrl_setSmoothTransition(this->animctrl, FALSE); + anctrl_setSmoothTransition(this->anctrl, FALSE); subaddie_set_state_with_direction(this, BOSSJINJO_STATE_5_HIT, 0.001f, 1); FUNC_8030E8B4(SFX_135_CARTOONY_SPRING, 1.0f, 32000, this->position, 10000, 16000); func_80324D54(0.1f, SFX_C1_BUZZBOMB_ATTACK, 0.85f, 32000, this->position, 5000.0f, 12000.0f); diff --git a/src/fight/chfinalboss.c b/src/fight/chfinalboss.c index d3e76b8f..0bfd71b1 100644 --- a/src/fight/chfinalboss.c +++ b/src/fight/chfinalboss.c @@ -772,7 +772,7 @@ void chfinalboss_phase1_setState(Actor *this, s32 next_state) { local = (ActorLocal_FinalBoss *)&this->local; sp40 = globalTimer_getTime(); - sp3C = animctrl_getAnimTimer(this->animctrl); + sp3C = anctrl_getAnimTimer(this->anctrl); local->phase = FINALBOSS_PHASE_1_BROOMSTICK; subaddie_set_state_with_direction(this, next_state, 0.0001f, 1); actor_loopAnimation(this); @@ -811,7 +811,7 @@ void chfinalboss_phase1_setState(Actor *this, s32 next_state) { local->unk18 = 400.0f; local->unk28 = (-this->actor_specific_1_f * this->actor_specific_1_f) / (2.0 * local->unk14); chfinalboss_func_80386600(this->marker, 1); - animctrl_setAnimTimer(this->animctrl, sp3C); + anctrl_setAnimTimer(this->anctrl, sp3C); break; case 8: temp_f12 = 1150.0f; @@ -820,7 +820,7 @@ void chfinalboss_phase1_setState(Actor *this, s32 next_state) { break; case 9: actor_playAnimationOnce(this); - animctrl_setAnimTimer(this->animctrl, sp3C); + anctrl_setAnimTimer(this->anctrl, sp3C); break; case 10: func_8030E878(SFX_EA_GRUNTY_LAUGH_1, randf2(0.95f, 1.05f), 32000, this->position, 5000.0f, 12000.0f); @@ -1297,7 +1297,7 @@ void chfinalboss_phase3_update(ActorMarker *marker) { local = (ActorLocal_FinalBoss *)&this->local; sp3C = time_getDelta(); sp38 = local->hits; - sp34 = animctrl_getAnimTimer(this->animctrl); + sp34 = anctrl_getAnimTimer(this->anctrl); switch (this->state) { case 21: chfinalboss_spawnBroomstickGlowParticles(this); @@ -1398,12 +1398,12 @@ void chfinalboss_phase4_setState(Actor *this, s32 arg1) { } iter; local = (ActorLocal_FinalBoss *)&this->local; - sp48 = animctrl_getAnimTimer(this->animctrl); + sp48 = anctrl_getAnimTimer(this->anctrl); local->phase = 4; subaddie_set_state_with_direction(this, arg1, 0.0001f, 1); switch (arg1) { case 28: - animctrl_setAnimTimer(this->animctrl, sp48); + anctrl_setAnimTimer(this->anctrl, sp48); this->unk1C[0] = D_803927D0[0x10][0]; this->unk1C[1] = D_803927D0[0x10][1]; this->unk1C[2] = D_803927D0[0x10][2]; @@ -1635,7 +1635,7 @@ void chfinalboss_phase4_update(ActorMarker *marker) { break; case 34: - sp58 = animctrl_getAnimTimer(this->animctrl); + sp58 = anctrl_getAnimTimer(this->anctrl); if (actor_animationIsAt(this, 0.17f) != 0) { func_8030E6A4(SFX_1F_HITTING_AN_ENEMY_3, randf2(0.95f, 1.05f), 32000); func_8030E6A4(SFX_133_GRUNTY_OHW, randf2(0.95f, 1.05f), 32000); @@ -1767,7 +1767,7 @@ void chfinalboss_phase5_update(ActorMarker *marker) { local = (ActorLocal_FinalBoss *)&this->local; dt = time_getDelta(); sp38 = 0x14; - sp34 = animctrl_getAnimTimer(this->animctrl); + sp34 = anctrl_getAnimTimer(this->anctrl); jinjonator_marker = chfinalboss_findCollidingJinjo(this, func_8033229C(this->marker) / 3.0f); if ((jinjonator_marker != NULL) && (jinjonator_marker->id == MARKER_285_JINJONATOR)) { if (chjinjonator_8039125C(jinjonator_marker)) { diff --git a/src/fight/chjinjonator.c b/src/fight/chjinjonator.c index b0e77010..9cd74f5c 100644 --- a/src/fight/chjinjonator.c +++ b/src/fight/chjinjonator.c @@ -119,7 +119,7 @@ void chjinjonator_spawnAttackParticles(Actor *this, s32 hit_id){ } void chjinjonator_803903C4(Actor *this) { - animctrl_setSmoothTransition(this->animctrl, FALSE); + anctrl_setSmoothTransition(this->anctrl, FALSE); subaddie_set_state_with_direction(this, JINJONATOR_STATE_7_ATTACK_END, 0.001f, 1); actor_loopAnimation(this); } @@ -138,7 +138,7 @@ void chjinjonator_8039040C(Actor *this) { void chjinjonator_update(Actor *this){ ActorLocal_Jinjonator *local = (ActorLocal_Jinjonator *) &this->local; f32 time_delta = time_getDelta(); - f32 sp54 = animctrl_getDuration(this->animctrl); + f32 sp54 = anctrl_getDuration(this->anctrl); f32 sp50; s32 sp4C; f32 sp48; @@ -164,7 +164,7 @@ void chjinjonator_update(Actor *this){ switch (this->state) { case JINJONATOR_STATE_1_RELEASE: chjinjonator_8039040C(this); - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); this->lifetime_value -= time_delta; if (this->lifetime_value < 0.0) { @@ -222,7 +222,7 @@ void chjinjonator_update(Actor *this){ chjinjonator_spawnSparkleParticles(this); if (actor_animationIsAt(this, 0.998f)) { - animctrl_setSmoothTransition(this->animctrl, FALSE); + anctrl_setSmoothTransition(this->anctrl, FALSE); subaddie_set_state_with_direction(this, JINJONATOR_STATE_6_ATTACK, 0.0001f, 1); actor_loopAnimation(this); @@ -241,7 +241,7 @@ void chjinjonator_update(Actor *this){ case JINJONATOR_STATE_6_ATTACK: this->position[1] = MIN(1e+8f, this->position[1] + 80.0f * time_delta); - animctrl_setDuration(this->animctrl, MAX(0.4, sp54 - (0.5 * time_delta))); + anctrl_setDuration(this->anctrl, MAX(0.4, sp54 - (0.5 * time_delta))); chjinjonator_spawnSparkleParticles(this); if(actor_animationIsAt(this, 0.25f) || actor_animationIsAt(this, 0.75f)){ FUNC_8030E624(SFX_2_CLAW_SWIPE, local->boss_claw_sfx_volume, 26000); @@ -340,7 +340,7 @@ void chjinjonator_update(Actor *this){ func_8034A174(this->marker->unk44, 0x1f, this->position); FUNC_8030E624(SFX_17B_AIRPLANE_FALLING, 1.0f, 32000); FUNC_8030E624(SFX_147_GRUNTY_SPELL_ATTACK_2, 1.0f, 32000); - animctrl_setSmoothTransition(this->animctrl, 0); + anctrl_setSmoothTransition(this->anctrl, 0); subaddie_set_state_with_direction(this, JINJONATOR_STATE_12_FINAL_ATTACK_END, 0.001f, 1); actor_playAnimationOnce(this); this->velocity[2] = 0.0f; @@ -382,7 +382,7 @@ void chjinjonator_attack(ActorMarker *marker, s32 hit_count, bool mirrored) { } local->hit_count = hit_count; - animctrl_setSmoothTransition(actor_jinjonator->animctrl, 1); + anctrl_setSmoothTransition(actor_jinjonator->anctrl, 1); actor_playAnimationOnce(actor_jinjonator); if (&chJinjonatorHitYawValue[hit_count] >= chJinjonatorHitSounds) { @@ -391,7 +391,7 @@ void chjinjonator_attack(ActorMarker *marker, s32 hit_count, bool mirrored) { } subaddie_set_state_with_direction(actor_jinjonator, JINJONATOR_STATE_8, 0.001f, 1); - animctrl_setDuration(actor_jinjonator->animctrl, (f32) (1.75 - 0.11 * local->hit_count)); + anctrl_setDuration(actor_jinjonator->anctrl, (f32) (1.75 - 0.11 * local->hit_count)); } void chjinjonator_finalAttack(ActorMarker *marker) { diff --git a/src/fight/chstonejinjo.c b/src/fight/chstonejinjo.c index 30eff85e..c275ea25 100644 --- a/src/fight/chstonejinjo.c +++ b/src/fight/chstonejinjo.c @@ -46,7 +46,7 @@ void chstonejinjo_update(Actor *this) { switch (this->state) { case STONEJINJO_STATE_1_IDLE: - animctrl_setAnimTimer(this->animctrl, 0.0f); + anctrl_setAnimTimer(this->anctrl, 0.0f); break; case STONEJINJO_STATE_2_BREAK_OPEN: @@ -115,7 +115,7 @@ void chstonejinjo_breakOpen(ActorMarker *marker) { if (actor_stonejinjo->state != STONEJINJO_STATE_2_BREAK_OPEN) { subaddie_set_state_with_direction(actor_stonejinjo, STONEJINJO_STATE_2_BREAK_OPEN, 0.0f, 1); actor_playAnimationOnce(actor_stonejinjo); - animctrl_setDuration(actor_stonejinjo->animctrl, actor_stonejinjo->unk1C[0]); + anctrl_setDuration(actor_stonejinjo->anctrl, actor_stonejinjo->unk1C[0]); SPAWNQUEUE_ADD_1(chstonejinjo_spawnJinjo, actor_stonejinjo->marker); if (!fileProgressFlag_get(FILEPROG_D1_HAS_ACTIVATED_A_JINJO_STATUE_IN_FINAL_FIGHT) && actor_stonejinjo->unkF4_8 != BOSSJINJO_5_JINJONATOR) { diff --git a/src/lair/ch/cauldron.c b/src/lair/ch/cauldron.c index c5928e71..b714dd18 100644 --- a/src/lair/ch/cauldron.c +++ b/src/lair/ch/cauldron.c @@ -319,7 +319,7 @@ void chWarpCauldron_update(Actor *this) { break; case 2: //L8038B324 - temp_f0 = animctrl_getAnimTimer(this->animctrl); + temp_f0 = anctrl_getAnimTimer(this->anctrl); for(sp3C = 0; D_803936E4[sp3C] < temp_f0; sp3C++) ; diff --git a/src/lair/code_0.c b/src/lair/code_0.c index 9655fb19..091b75e6 100644 --- a/src/lair/code_0.c +++ b/src/lair/code_0.c @@ -1182,7 +1182,7 @@ void func_80388524(Actor *this) { fileProgressFlag_set(FILEPROG_E2_DOOR_OF_GRUNTY_OPEN, 1); func_8030E6D4(SFX_6C_LOCKUP_CLOSING); } - if (animctrl_getAnimTimer(this->animctrl) < 0.68) { + if (anctrl_getAnimTimer(this->anctrl) < 0.68) { sp2C = partEmitMgr_newEmitter(3U); particleEmitter_setSprite(sp2C, ASSET_70D_SPRITE_SMOKE_1); particleEmitter_setStartingFrameRange(sp2C, 1, 6); diff --git a/src/lair/code_C1C0.c b/src/lair/code_C1C0.c index 43049c39..3e5c328e 100644 --- a/src/lair/code_C1C0.c +++ b/src/lair/code_C1C0.c @@ -49,7 +49,7 @@ void func_80392690(ActorMarker *marker, enum asset_e text_id, s32 arg2){ subaddie_set_state_with_direction(this, 5, 0.0f, 1); actor_loopAnimation(this); this->yaw_ideal = 79.0f; - animctrl_setTransitionDuration(this->animctrl, 0.4f); + anctrl_setTransitionDuration(this->anctrl, 0.4f); } void func_80392700(Actor *this) {