From 0f3d65f7c9d283ecf1bca0a7409ca6a26f0d287d Mon Sep 17 00:00:00 2001 From: Ethan Roseman Date: Sat, 31 Oct 2020 15:34:10 -0400 Subject: [PATCH] cleanup --- src/world/area_sam/sam_11/D3A930.c | 6 +----- src/world/common/Set80151310.inc.c | 5 +---- src/world/common/Set80151310_0.inc.c | 6 ++++++ 3 files changed, 8 insertions(+), 9 deletions(-) create mode 100644 src/world/common/Set80151310_0.inc.c diff --git a/src/world/area_sam/sam_11/D3A930.c b/src/world/area_sam/sam_11/D3A930.c index a37071aeaf..cd04c7a33d 100644 --- a/src/world/area_sam/sam_11/D3A930.c +++ b/src/world/area_sam/sam_11/D3A930.c @@ -4,16 +4,12 @@ INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_80240360_D3A930); INCLUDE_ASM(s32, "world/area_sam/sam_11/D3A930", func_8024052C_D3AAFC); -// Almost the same as Set80151310, but we're setting it to 2 in the first func instead of 1 static ApiStatus Set80151310_2(ScriptInstance* script, s32 isInitialCall) { D_80151310 = 2; return ApiStatus_DONE2; } -static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { - D_80151310 = 0; - return ApiStatus_DONE2; -} +#include "world/common/Set80151310_0.inc.c" #include "world/common/UnsetCamera0MoveFlag1.inc.c" diff --git a/src/world/common/Set80151310.inc.c b/src/world/common/Set80151310.inc.c index 2223ab43f6..0f8f7d53a3 100644 --- a/src/world/common/Set80151310.inc.c +++ b/src/world/common/Set80151310.inc.c @@ -5,7 +5,4 @@ static ApiStatus Set80151310_1(ScriptInstance* script, s32 isInitialCall) { return ApiStatus_DONE2; } -static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { - D_80151310 = 0; - return ApiStatus_DONE2; -} +#include "world/common/Set80151310_0.inc.c" diff --git a/src/world/common/Set80151310_0.inc.c b/src/world/common/Set80151310_0.inc.c new file mode 100644 index 0000000000..953e1f4232 --- /dev/null +++ b/src/world/common/Set80151310_0.inc.c @@ -0,0 +1,6 @@ +#include "common.h" + +static ApiStatus Set80151310_0(ScriptInstance* script, s32 isInitialCall) { + D_80151310 = 0; + return ApiStatus_DONE2; +}