modelRender.c replace obsolete asm ref
This commit is contained in:
@@ -246,8 +246,7 @@ Actor *chvile_draw(ActorMarker *marker, Gfx **gfx, Mtx** mtx, Vtx **vtx){
|
||||
return this;
|
||||
}
|
||||
|
||||
//chvile_get_position
|
||||
f32 *func_8038C284(ActorMarker *marker){
|
||||
f32 *chVile_getPostion(ActorMarker *marker){
|
||||
Actor *this;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
@@ -255,15 +254,15 @@ f32 *func_8038C284(ActorMarker *marker){
|
||||
}
|
||||
|
||||
bool func_8038C2A8(ActorMarker *marker) {
|
||||
f32 sp24[3];
|
||||
f32 player_position[3];
|
||||
Actor *this;
|
||||
ActorLocal_MrVile *local;
|
||||
|
||||
this = marker_getActor(marker);
|
||||
local = (ActorLocal_MrVile *)&this->local;
|
||||
player_getPosition(&sp24);
|
||||
player_getPosition(player_position);
|
||||
if (this->state == 6) {
|
||||
return ml_vec3f_distance(this->position, &sp24) < 150.0f;
|
||||
return ml_vec3f_distance(this->position, player_position) < 150.0f;
|
||||
}
|
||||
return local->unk0 == 1;
|
||||
}
|
||||
|
@@ -4,7 +4,7 @@
|
||||
|
||||
extern f32 func_80256AB4(f32, f32, f32, f32);
|
||||
extern f32 func_8025715C(f32, f32);
|
||||
extern f32 *func_8038C284(ActorMarker *);
|
||||
extern f32 *chVile_getPostion(ActorMarker *);
|
||||
extern void func_802C8F7C(f32);
|
||||
extern void func_802FDCB8(s32);
|
||||
|
||||
@@ -159,7 +159,7 @@ void func_80389C58(ActorMarker *marker) {
|
||||
this = marker_getActor(marker);
|
||||
local = (ActorLocal_BGS_3420 *)&this->local;
|
||||
BGS_func_80389850(this, 0);
|
||||
func_80311480(D_80390984[local->unkC], 0xF, func_8038C284(local->vile_marker), this->marker, func_80389BF8, NULL);
|
||||
func_80311480(D_80390984[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389BF8, NULL);
|
||||
}
|
||||
|
||||
void BGS_func_80389CD8(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
||||
@@ -179,9 +179,9 @@ void func_80389D20(ActorMarker *marker) {
|
||||
local = (ActorLocal_BGS_3420 *)&this->local;
|
||||
BGS_func_80389850(this, 0);
|
||||
if (local->unkC == local->unkD) {
|
||||
func_80311480(D_803909A4[local->unkC], 0xF, func_8038C284(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
|
||||
func_80311480(D_803909A4[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
|
||||
} else {
|
||||
func_80311480(D_803909C0[local->unkC], 0xF, func_8038C284(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
|
||||
func_80311480(D_803909C0[local->unkC], 0xF, chVile_getPostion(local->vile_marker), this->marker, BGS_func_80389CD8, NULL);
|
||||
}
|
||||
func_80347A14(0);
|
||||
}
|
||||
@@ -203,7 +203,7 @@ void func_80389E40(ActorMarker *marker) {
|
||||
local = (ActorLocal_BGS_3420 *)&this->local;
|
||||
|
||||
BGS_func_80389850(this, 1);
|
||||
func_80311480(0xC6B, 0xF, func_8038C284(local->vile_marker), this->marker, func_80389DF8, NULL);
|
||||
func_80311480(0xC6B, 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389DF8, NULL);
|
||||
}
|
||||
|
||||
void func_80389EAC(ActorMarker *marker, enum asset_e text_id, s32 arg2){
|
||||
@@ -243,7 +243,7 @@ void func_80389F08(ActorMarker *marker) {
|
||||
item_inc(ITEM_16_LIFE);
|
||||
}
|
||||
}
|
||||
func_80311480(0xC98, 0xF, func_8038C284(local->vile_marker), this->marker, func_80389EAC, NULL);
|
||||
func_80311480(0xC98, 0xF, chVile_getPostion(local->vile_marker), this->marker, func_80389EAC, NULL);
|
||||
}
|
||||
|
||||
|
||||
@@ -265,22 +265,22 @@ void func_8038A068(Actor *this, s32 next_state) {
|
||||
func_8038C3B0(local->vile_marker);
|
||||
if (local->unkC == 3) {
|
||||
if (local->unkD >= 4) {
|
||||
func_80311480(0xC91, 0xE, func_8038C284(local->vile_marker), this->marker, func_80389B48, NULL);
|
||||
func_80311480(0xC91, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
|
||||
} else {
|
||||
func_80311480((local->unkC == local->unkD) ? 0xC8D : 0xC90, 0xE, func_8038C284(local->vile_marker), this->marker, func_80389B48, NULL);
|
||||
func_80311480((local->unkC == local->unkD) ? 0xC8D : 0xC90, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
|
||||
}
|
||||
} else {
|
||||
func_80311480((local->unkC == local->unkD) ? 0xC63 : 0xC6C, 0xE, func_8038C284(local->vile_marker), this->marker, func_80389B48, NULL);
|
||||
func_80311480((local->unkC == local->unkD) ? 0xC63 : 0xC6C, 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389B48, NULL);
|
||||
}
|
||||
}
|
||||
if (next_state == 3) {
|
||||
func_80311480(D_803909DC[local->unkC], 4, func_8038C284(local->vile_marker), this->marker, func_80389B98, NULL);
|
||||
func_80311480(D_803909DC[local->unkC], 4, chVile_getPostion(local->vile_marker), this->marker, func_80389B98, NULL);
|
||||
}
|
||||
if (next_state == 4) {
|
||||
if (local->unkC == local->unkD) {
|
||||
func_80311480(BGS_D_803909F8[local->unkC], 0xE | ((BGS_D_803909F8[local->unkC] == 0xC8E) ? 1 : 0) | 0xE, func_8038C284(local->vile_marker), this->marker, func_80389BC8, NULL);
|
||||
func_80311480(BGS_D_803909F8[local->unkC], 0xE | ((BGS_D_803909F8[local->unkC] == 0xC8E) ? 1 : 0) | 0xE, chVile_getPostion(local->vile_marker), this->marker, func_80389BC8, NULL);
|
||||
} else {
|
||||
func_80311480(D_80390A18[local->unkC], 0xF , func_8038C284(local->vile_marker), this->marker, func_80389BC8, NULL);
|
||||
func_80311480(D_80390A18[local->unkC], 0xF , chVile_getPostion(local->vile_marker), this->marker, func_80389BC8, NULL);
|
||||
}
|
||||
func_80347A14(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user