mirror of
https://github.com/zeldaret/tmc
synced 2026-08-18 13:43:31 -04:00
Match sub_0802CF8C
This commit is contained in:
+12
-9
@@ -165,23 +165,26 @@ void sub_0802CF64(Entity* this) {
|
||||
sub_0802CF8C(this);
|
||||
}
|
||||
|
||||
NONMATCH("asm/non_matching/wallMaster2/sub_0802CF8C.inc", void sub_0802CF8C(Entity* this)) {
|
||||
void sub_0802CF8C(Entity* this) {
|
||||
int iVar1;
|
||||
u32 uVar2;
|
||||
u32 dir;
|
||||
const u16* ptr;
|
||||
u16* ptr2;
|
||||
|
||||
uVar2 = (this->direction + 2) & 0x1c;
|
||||
if ((uVar2 - this->animationState * 4 + 6 > 0xc) ||
|
||||
((((this->direction + 1) & 7) > 2 && (uVar2 >> 2 != this->animationState)))) {
|
||||
this->animationState = (uVar2 >> 2);
|
||||
iVar1 = (uVar2 >> 3) * 2;
|
||||
dir = Direction8RoundUp(this->direction);
|
||||
if (dir - Direction8FromAnimationState(this->animationState) + 6 > 12) {
|
||||
this->animationState = Direction8ToAnimationState(dir);
|
||||
iVar1 = (dir >> 3) * 2;
|
||||
ptr = &gUnk_080CD730[iVar1];
|
||||
this->field_0x74.HWORD = ptr[0];
|
||||
this->field_0x76.HWORD = ptr[1];
|
||||
} else if (((this->direction + 1) & 7) > 2 && (Direction8ToAnimationState(dir) != this->animationState)) {
|
||||
this->animationState = Direction8ToAnimationState(dir);
|
||||
iVar1 = (dir >> 3) * 2;
|
||||
ptr = &gUnk_080CD730[iVar1];
|
||||
this->field_0x74.HWORD = ptr[0];
|
||||
this->field_0x76.HWORD = ptr[1];
|
||||
}
|
||||
}
|
||||
END_NONMATCH
|
||||
|
||||
void sub_0802CFD8(Entity* this) {
|
||||
u32 unk = gUnk_080CD740[(this->field_0x7a.HALF.LO++ >> 3) & 7];
|
||||
|
||||
Reference in New Issue
Block a user