rename animctrl
to anctrl
to match source debug string and tooie naming
rename `rumbleManager` to `bamotor`
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
@@ -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();
|
||||
}
|
||||
|
@@ -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++;
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user