summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorEthan Roseman <ethteck@gmail.com>2020-07-22 20:15:56 -0400
committerGitHub <noreply@github.com>2020-07-22 20:15:56 -0400
commit8a309a4e19c3015530b4519ee66fe1184bae5df6 (patch)
tree87fe0db7ae286ef7d72c07dadddea0a7790ba422 /src
parent3c3cfa6751b1b57f6943a3429bd7885d23119f67 (diff)
Finished ovl_Demo_Go (#287)
* Finished ovl_Demo_Go * renaming arg
Diffstat (limited to 'src')
-rw-r--r--src/overlays/actors/ovl_Demo_Go/z_demo_go.c17
1 files changed, 6 insertions, 11 deletions
diff --git a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
index 7cdcd5f94..2a7fc90a7 100644
--- a/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
+++ b/src/overlays/actors/ovl_Demo_Go/z_demo_go.c
@@ -200,21 +200,16 @@ UNK_TYPE DemoGo_FrameUpdateMatrix(DemoGo* this) {
return SkelAnime_FrameUpdateMatrix(&this->skelAnime);
}
-#ifdef NON_MATCHING
-// return value isn't produced in the same way
-s32 func_8097CDB0(DemoGo* this, GlobalContext* globalCtx, u16 csCmdNPCAction) {
+s32 func_8097CDB0(DemoGo* this, GlobalContext* globalCtx, u16 npcAction) {
CutsceneContext* csCtx = &globalCtx->csCtx;
- CsCmdActorAction* npcAction = csCtx->npcActions[func_8097C870(this)];
- if (csCtx->state != 0) {
- if (npcAction != NULL && npcAction->action == csCmdNPCAction) {
- return 1;
- }
+ s32 actionIdx = func_8097C870(this);
+
+ if ((csCtx->state != 0) && (csCtx->npcActions[actionIdx] != NULL) &&
+ (csCtx->npcActions[actionIdx]->action == npcAction)) {
+ return 1;
}
return 0;
}
-#else
-#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Demo_Go/func_8097CDB0.s")
-#endif
void func_8097CE10(DemoGo* this, GlobalContext* globalCtx) {
this->action = 1;