Made NpcAct100.cpp ASM-accurate
See #74. Finally, I figured out what might be causing the register differences. Considering how long this NPC's code is, it makes sense that there might be some vestigial checks.
This commit is contained in:
parent
f04872b91b
commit
a94d9a4367
1 changed files with 19 additions and 3 deletions
|
@ -1352,8 +1352,18 @@ void ActNpc117(NPCHAR *npc)
|
|||
break;
|
||||
|
||||
case 3:
|
||||
// TODO: This code is being problematic, and
|
||||
// assembling with the wrong registers.
|
||||
if (0)
|
||||
{
|
||||
// There used to be an if here that didn't do anything, but the compiler optimised it out.
|
||||
// We only know this was here because empty ifs mess with the register usage.
|
||||
// Since there's no code, we have no idea what the original condition actually was.
|
||||
}
|
||||
|
||||
if (0)
|
||||
{
|
||||
// Another empty if
|
||||
}
|
||||
|
||||
npc->act_no = 4;
|
||||
npc->ani_no = 1;
|
||||
npc->ani_wait = 0;
|
||||
|
@ -1382,9 +1392,15 @@ void ActNpc117(NPCHAR *npc)
|
|||
npc->ani_no = 5;
|
||||
SetDestroyNpChar(npc->x, npc->y, npc->view.back, 8);
|
||||
break;
|
||||
// End of wrong-reg code
|
||||
|
||||
case 6:
|
||||
if (0)
|
||||
{
|
||||
// There used to be an if here that didn't do anything, but the compiler optimised it out.
|
||||
// We only know this was here because empty ifs mess with the register usage.
|
||||
// Since there's no code, we have no idea what the original condition actually was.
|
||||
}
|
||||
|
||||
npc->ani_no = 5;
|
||||
break;
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue