diff --git a/include/gc/gczoombox.h b/include/gc/gczoombox.h index 964e2594..9b334c72 100644 --- a/include/gc/gczoombox.h +++ b/include/gc/gczoombox.h @@ -26,7 +26,7 @@ typedef struct { s16 unk12E; void (*unk130)(s32, s32); u8 unk134; - u8 unk135; + u8 state; u8 portrait_id; //0x136 u8 unk137; //string_cnt u8 unk138; //current_string diff --git a/src/core2/ch/gameSelect.c b/src/core2/ch/gameSelect.c index f1b7bca9..f47915c6 100644 --- a/src/core2/ch/gameSelect.c +++ b/src/core2/ch/gameSelect.c @@ -573,9 +573,9 @@ void func_802C5740(Actor * this){ }//L802C5940 if(!func_8038AAB0()){ if(D_8037DCF4) - func_80316EF4(D_8037DCF4); + gczoombox_update(D_8037DCF4); if(D_8037DCF0) - func_80316EF4(D_8037DCF0); + gczoombox_update(D_8037DCF0); } func_802C4C14(this); } diff --git a/src/core2/code_91E10.c b/src/core2/code_91E10.c index 419b91a4..dfb5ac29 100644 --- a/src/core2/code_91E10.c +++ b/src/core2/code_91E10.c @@ -476,7 +476,7 @@ void func_80319EA4(void) { func_8024E55C(0, sp58); func_8024E71C(0, sp4C); for(phi_s0 = 0; phi_s0 < 4; phi_s0++){ - func_80316EF4(D_803830E0->unk24[phi_s0]); + gczoombox_update(D_803830E0->unk24[phi_s0]); } switch (D_803830E0->unk10) { diff --git a/src/core2/gc/pauseMenu.c b/src/core2/gc/pauseMenu.c index d02d6559..9de05e22 100644 --- a/src/core2/gc/pauseMenu.c +++ b/src/core2/gc/pauseMenu.c @@ -16,7 +16,7 @@ void mlMtxApply(Mtx*); void func_80310D2C(void); s32 level_get(void); -void func_80316EF4(gczoombox_t *); +void gczoombox_update(gczoombox_t *); void func_8024E6E0(s32, void *); void func_8024E60C(s32, void *); void func_8024E71C(s32, void *); @@ -638,7 +638,7 @@ s32 func_80313380(void){ func_8024E6E0(0, sp50); func_80310D2C(); for(i = 0; i < 4; i++){ - func_80316EF4(D_80383010.zoombox[i]);//gczoombox_update; + gczoombox_update(D_80383010.zoombox[i]);//gczoombox_update; } diff --git a/src/core2/gc/zoombox.c b/src/core2/gc/zoombox.c index 7936d989..8bd4c5a2 100644 --- a/src/core2/gc/zoombox.c +++ b/src/core2/gc/zoombox.c @@ -518,18 +518,18 @@ void func_80315484(gczoombox_t *this){ void func_80315524(gczoombox_t *this){ if(this->unk1A4_26 || this->unk1A4_31){ - this->unk135 = 3; + this->state = 3; this->unk181 = this->unk182; } else{ - this->unk135 = 4; + this->state = 4; } this->unk15E = this->unk15C; this->unk1A4_23 = 0; } void func_8031556C(gczoombox_t *this){ - this->unk135 = 5; + this->state = 5; animctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_ONCE); animctrl_setDirection(this->anim_ctrl, 1); this->unk134 = 0; @@ -540,7 +540,7 @@ void func_8031556C(gczoombox_t *this){ void func_803155C8(gczoombox_t *this){ int i; - this->unk135 = 6; + this->state = 6; animctrl_setPlaybackType(this->anim_ctrl, ANIMCTRL_ONCE); animctrl_setDirection(this->anim_ctrl, 0); this->unk1A4_16 = 1; @@ -690,7 +690,7 @@ void func_80315C1C(gczoombox_t *this){ for(i = 0 ; i < 8; i++){ this->raw_str[i] = NULL; } - this->unk135 = 0; + this->state = 0; this->unk137 = this->unk1A4_20 = 0; } @@ -994,7 +994,7 @@ void gczoombox_draw(gczoombox_t *this, Gfx **gdl, Mtx ** mptr, void *vptr){ if(getGameMode() == GAME_MODE_9_BANJO_AND_KAZOOIE) func_8034A900(); //L80316BCC - if(this->unk1A4_28 && this->unk135 && this->unkF0){ + if(this->unk1A4_28 && this->state && this->unkF0){ func_803162B4(this); func_803163A8(this, gdl, mptr); if( this->unk139 == 2 @@ -1035,7 +1035,7 @@ void gczoombox_draw(gczoombox_t *this, Gfx **gdl, Mtx ** mptr, void *vptr){ } void func_80316E08(gczoombox_t *this) { - this->unk135 = 8; + this->state = 8; func_80318478(this); if (this->unk1A4_24) { this->unk170 = this->unk174 + 0x8B; @@ -1046,7 +1046,7 @@ void func_80316E08(gczoombox_t *this) { } void func_80316E60(gczoombox_t *this){ - this->unk135 = 9; + this->state = 9; func_80318488(this); } @@ -1064,7 +1064,7 @@ s32 func_80316ED4(u8 *arg0){ return strlen(arg0); } -void func_80316EF4(gczoombox_t *this){ +void gczoombox_update(gczoombox_t *this){ s32 sp58[6]; s32 sp4C[3]; s32 sp48; @@ -1085,7 +1085,7 @@ void func_80316EF4(gczoombox_t *this){ tmp_f0 = func_8033DDB8(); } - switch(this->unk135){ + switch(this->state){ case 0x1: //L80316F90 if(this->unk15D){ this->unk160 += this->unk15C + 1; @@ -1128,7 +1128,7 @@ void func_80316EF4(gczoombox_t *this){ } func_8031594C(this, this->unk60, 0, this->unk15C); - this->unk135 = 2; + this->state = 2; this->unk180 = this->unk15E = 0; //wrong reg this->unk18C = 0.0f; if(this->unk1A4_19){ @@ -1173,7 +1173,7 @@ void func_80316EF4(gczoombox_t *this){ break; case 0x3: //L80317360 if((sp58[0] && this->unk1A4_12) || this->unk181 < 0){ - this->unk135 = 4; + this->state = 4; this->unk183 = 0.5*sp48*this->unk184; }else{//L80317468 @@ -1192,7 +1192,7 @@ void func_80316EF4(gczoombox_t *this){ if(this->unk1A4_26 || this->unk1A4_31){//L80317650 if(this->unk1A4_25){ func_8031843C(this); - this->unk135 = 0xA; + this->state = 0xA; } if(!this->unk1A4_23 && !this->unk1A4_25){ this->unk1A4_17 = 1; @@ -1208,13 +1208,13 @@ void func_80316EF4(gczoombox_t *this){ this->unk16E = ((this->unk1A4_19) ? 0xf : 0xc) + this->unk16C; this->unk1A4_30 = 1; this->unk1A4_29 = 0; - this->unk135 = 1; + this->state = 1; } } } else{//L80317764 if(!this->unk1A4_23) - this->unk135 = 1; + this->state = 1; } break; case 0xa: //L8031777C @@ -1226,7 +1226,7 @@ void func_80316EF4(gczoombox_t *this){ else if(this->unk13A & 4){//L803177B4 this->unk1A4_25 = 0; this->unk134 = 0; - this->unk135 = 4; + this->state = 4; } break; case 0x5: //L803177D4 @@ -1251,7 +1251,7 @@ void func_80316EF4(gczoombox_t *this){ if(!this->unk1A4_16){ func_80316E84(this, 2); if(this->unk13A & 4){ - this->unk135 = 1; + this->state = 1; } else if(this->unk13A & 8){ func_803155C8(this); @@ -1330,7 +1330,7 @@ void func_80316EF4(gczoombox_t *this){ this->unk1A4_28 = 0; func_80316E84(this, 5); if(this->unk13A & 0x20){ - this->unk135 = 7; + this->state = 7; } else if(this->unk13A & 0x1) { func_80316E08(this); @@ -1395,7 +1395,7 @@ gczoombox_t *gczoombox_new(s32 arg0, s32 portrait_id, s32 arg2, s32 arg3, void ( this = (gczoombox_t *)malloc(sizeof(gczoombox_t)); this->unk130 = arg4; - this->unk135 = 0xB; + this->state = 0xB; this->portrait_id = portrait_id; this->unk134 = this->unk137 = this->unk138 = 0; this->unk139 = arg2; @@ -1643,7 +1643,7 @@ void func_80318774(gczoombox_t *this){ bool func_8031877C(gczoombox_t *this){ if( this == NULL - || this->unk135 == 0 || this->unk135 == 0xb || this->unk135 == 0x9 || this->unk135 == 0x6 || this->unk135 == 0x7 + || this->state == 0 || this->state == 0xb || this->state == 0x9 || this->state == 0x6 || this->state == 0x7 ){ return FALSE; } @@ -1656,8 +1656,8 @@ bool func_8031877C(gczoombox_t *this){ this->unk1A4_23 =\ this->unk15D = 0; - if( this->unk135 == 10 || this->unk135 == 0x1 || this->unk135 == 0x2 || this->unk135 == 0x3 || this->unk135 == 0x4 ){ - this->unk135 = 10; + if( this->state == 10 || this->state == 0x1 || this->state == 0x2 || this->state == 0x3 || this->state == 0x4 ){ + this->state = 10; this->unk134 = 3; } func_8031843C(this); @@ -1666,16 +1666,16 @@ bool func_8031877C(gczoombox_t *this){ bool func_803188B4(gczoombox_t *this) { - if ((this == NULL) || (this->unk135 == 0) || (this->unk135 == 7) || (this->unk135 == 9)) { + if ((this == NULL) || (this->state == 0) || (this->state == 7) || (this->state == 9)) { return FALSE; } - if ((this->unk135 == 6) && (this->unk134 == 4)) { + if ((this->state == 6) && (this->unk134 == 4)) { return FALSE; } - if (this->unk135 == 8) { + if (this->state == 8) { this->unk1A4_16 = FALSE; - this->unk135 = 6; - } else if (this->unk135 != 6) { + this->state = 6; + } else if (this->state != 6) { func_803155C8(this); } func_8031843C(this); @@ -1685,7 +1685,7 @@ bool func_803188B4(gczoombox_t *this) { bool func_80318964(gczoombox_t *this) { - if (this == NULL || this->unk135 == 0 || this->unk135 == 7 || this->unk135 == 9) { + if (this == NULL || this->state == 0 || this->state == 7 || this->state == 9) { return FALSE; } gczoombox_close(this); @@ -1697,15 +1697,15 @@ bool func_80318964(gczoombox_t *this) { bool func_803189C4(gczoombox_t *this, s32 arg1){ if( this == NULL || arg1 == this->portrait_id - || ( this->unk135 != 6 - && this->unk135 != 0xa - && this->unk135 != 0xb - && this->unk135 != 0x9 + || ( this->state != 6 + && this->state != 0xa + && this->state != 0xb + && this->state != 0x9 )){ return FALSE; } - if(this->unk135 == 0xb || this->unk135 == 0x9){ + if(this->state == 0xb || this->state == 0x9){ if(this->unkF8){ assetcache_release(this->unkF8); this->unkF8 = NULL; @@ -1757,7 +1757,7 @@ void func_80318B7C(gczoombox_t *this, s32 arg1) { } bool func_80318BEC(gczoombox_t *this){ - return this != NULL && !this->unk135; + return this != NULL && !this->state; } void func_80318C0C(gczoombox_t *this) { diff --git a/src/lair/code_5ED0.c b/src/lair/code_5ED0.c index 4582246f..8f231530 100644 --- a/src/lair/code_5ED0.c +++ b/src/lair/code_5ED0.c @@ -1004,7 +1004,7 @@ void func_8038E0B0(void) { case 3://L8038E5C8 if ((D_8037DCB8->ffQuestionType == 2) && D_80394354[D_8037DCB8->unkC].unk0 == 2){ - func_80316EF4(D_8037DCB8->unk20); + gczoombox_update(D_8037DCB8->unk20); } if ((D_8037DCB8->unk12 == 0) && func_8028EFC8() && (sp48[BUTTON_Z] == 1)) { func_80324C58(); diff --git a/symbol_addrs.core2.us.v10.txt b/symbol_addrs.core2.us.v10.txt index 3be14f6d..5c70ec54 100644 --- a/symbol_addrs.core2.us.v10.txt +++ b/symbol_addrs.core2.us.v10.txt @@ -275,6 +275,7 @@ sfxsource_setSampleRate = 0x8030DABC; gczoombox_free = 0x80315374; _gczoombox_memClear = 0x80315430; gczoombox_draw = 0x80316B8C; +gczoombox_update = 0x80316EF4; gczoombox_new = 0x80317E8C; gczoombox_open = 0x803183EC; gczoombox_close = 0x803183FC;