mirror of https://github.com/zeldaret/tmc.git
Merge pull request #658 from tonyjih/match_sub_08039B28
Match sub_08039B28
This commit is contained in:
commit
50b8efb7d9
|
@ -453,24 +453,23 @@ u32 sub_08039B28(StalfosEntity* this) {
|
||||||
const u16* ptr;
|
const u16* ptr;
|
||||||
const s8* ptr2;
|
const s8* ptr2;
|
||||||
|
|
||||||
if (super->child == NULL) {
|
if (super->child != NULL) {
|
||||||
ptr2 = &gUnk_080CF930[super->animationState * 2];
|
return (u16)-1;
|
||||||
pos = COORD_TO_TILE_OFFSET(super, -ptr2[0], -ptr2[1]);
|
|
||||||
|
|
||||||
tileType = GetTileType(pos, (u32)super->collisionLayer);
|
|
||||||
ptr = gUnk_080CF938;
|
|
||||||
do {
|
|
||||||
if (ptr[0] != tileType) {
|
|
||||||
ptr += 2;
|
|
||||||
} else {
|
|
||||||
goto found;
|
|
||||||
}
|
|
||||||
} while (ptr[0] != 0);
|
|
||||||
}
|
}
|
||||||
return 0xffff;
|
ptr2 = &gUnk_080CF930[super->animationState * 2];
|
||||||
found:
|
pos = COORD_TO_TILE_OFFSET(super, -ptr2[0], -ptr2[1]);
|
||||||
super->type2 = ptr[1];
|
tileType = GetTileType(pos, (u32)super->collisionLayer);
|
||||||
return pos;
|
ptr = gUnk_080CF938;
|
||||||
|
|
||||||
|
do {
|
||||||
|
if (ptr[0] == tileType) {
|
||||||
|
super->type2 = ptr[1];
|
||||||
|
return pos;
|
||||||
|
}
|
||||||
|
ptr += 2;
|
||||||
|
} while (ptr[0] != 0);
|
||||||
|
|
||||||
|
return (u16)-1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void (*const Stalfos_Functions[])(StalfosEntity*) = {
|
void (*const Stalfos_Functions[])(StalfosEntity*) = {
|
||||||
|
|
Loading…
Reference in New Issue