TT_000 func_80174038 matching

This commit is contained in:
Luciano Ciccariello 2023-06-18 17:05:36 +01:00
parent 0369344823
commit 036af1dacc
2 changed files with 11 additions and 14 deletions

View File

@ -32,7 +32,7 @@ segments:
- [0x4A8, .data, 4A8]
- [0x608, .data, 608]
- [0x10AC, rodata] # func_80172120 jtbl
- [0x10C4, rodata] # func_80174038 jtbl
- [0x10C4, .rodata, 10E8]
- [0x10E8, c]
- [0x48D8, sbss]
- [0xA000]

View File

@ -451,20 +451,18 @@ s32 func_80173FE8(Entity* entity, s32 x, s32 y) {
return SquareRoot12((diffX * diffX + diffY * diffY) << 12, diffX) >> 12;
}
// PSY-Q 3.5 match as in GCC a jump skips a 'nop'
// has Jumptable
#ifndef NON_MATCHING
INCLUDE_ASM("asm/us/servant/tt_000/nonmatchings/10E8", func_80174038);
#else
void func_80174038(Entity* entity) {
switch (entity->step) {
case 0:
entity->flags = 0x20000 | FLAG_UNK_04000000;
if (D_8003C704 == 0) {
if (g_api.func_80133940() != 0) {
g_api.PlaySfx(16);
entity->step++;
}
if (D_8003C704 != 0) {
D_80171090 = 99;
DestroyEntity(entity);
return;
}
if (g_api.func_80133940() != 0) {
g_api.PlaySfx(16);
entity->step++;
}
break;
@ -491,7 +489,7 @@ void func_80174038(Entity* entity) {
break;
case 5:
if ((D_8003C708 & 0x60) != 0) {
if ((*(s32*)&D_8003C708.flags & 0x60) != 0) {
D_80171090 = 99;
DestroyEntity(entity);
return;
@ -521,9 +519,8 @@ void func_80174038(Entity* entity) {
return;
}
D_80171090 = (s32)entity->step;
D_80171090 = entity->step;
}
#endif
#ifndef NON_MATCHING
INCLUDE_ASM("asm/us/servant/tt_000/nonmatchings/10E8", func_80174210);