summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenny022p <info@henny022.de>2021-02-19 10:33:19 +0100
committerHenny022p <info@henny022.de>2021-02-19 10:33:19 +0100
commitb2a06931667217640c1df4ff71e41d4d065c66a2 (patch)
tree9a951d4127c2e0883aa338503551de129d307398
parent39f682b74db1bffe8afa72397b70482821e75215 (diff)
moved script related functions from functions.h to script.h
-rw-r--r--include/functions.h4
-rw-r--r--include/script.h3
-rw-r--r--src/npc/beedle.c1
-rw-r--r--src/npc/bigGoron.c1
-rw-r--r--src/npc/bladeBrothers.c3
-rw-r--r--src/npc/festari.c3
-rw-r--r--src/npc/forestMinish.c1
-rw-r--r--src/npc/goron.c3
-rw-r--r--src/npc/goronMerchant.c3
-rw-r--r--src/npc/librari.c3
-rw-r--r--src/npc/malon.c3
-rw-r--r--src/npc/mayorHagen.c1
-rw-r--r--src/npc/melari.c1
-rw-r--r--src/npc/mutoh.c1
-rw-r--r--src/npc/percy.c1
-rw-r--r--src/npc/rem.c1
-rw-r--r--src/npc/simon.c1
-rw-r--r--src/npc/smith.c1
-rw-r--r--src/npc/stamp.c1
-rw-r--r--src/npc/talon.c1
-rw-r--r--src/npc/teachers.c1
-rw-r--r--src/npc/townMinish.c1
-rw-r--r--src/npc/townsperson.c1
-rw-r--r--src/npc/windTribespeople.c1
-rw-r--r--src/npc/zelda.c1
-rw-r--r--src/object/houseDoorExterior.c1
-rw-r--r--src/object/windcrest.c1
27 files changed, 34 insertions, 10 deletions
diff --git a/include/functions.h b/include/functions.h
index 7015294b..f2ced8b0 100644
--- a/include/functions.h
+++ b/include/functions.h
@@ -9,7 +9,6 @@
#include "player.h"
#include "structures.h"
#include "room.h"
-#include "script.h"
// Identified - to be sorted into header files
extern u32 Random(void);
@@ -24,7 +23,6 @@ extern u32 CheckKinstoneFused(u32);
extern void ForceEquipItem(u8, u8);
extern void LoadRoomEntityList();
void CopyPosition(Entity*, Entity*);
-extern ScriptExecutionContext* StartCutscene(Entity*, u16*);
extern void ResolveEntityOnTop(Entity*, Entity*);
extern void EnemyFunctionHandler(Entity*, void (*const funcs[])(Entity*));
extern u32 GetAnimationState(Entity*);
@@ -86,13 +84,11 @@ extern void sub_0806F69C(Entity*);
extern void sub_0805E3A0(void*, u32);
extern void sub_0806D0B0(Entity*);
extern void sub_0807DD64(Entity*);
-extern void sub_0807DDAC(Entity*, void(*function)(Entity*, ScriptExecutionContext*));
extern void sub_0807DDE4(Entity*);
extern void sub_0806D02C(Entity*);
extern u32 sub_0806F5A4(u32);
extern void sub_08078784(Entity*, u32);
extern void sub_0807DD50(Entity*);
-extern void sub_0807DD94(Entity*, void(*function)(Entity*, ScriptExecutionContext*));
extern s32 sub_0806ED9C(Entity*, u32, u32);
extern void sub_0807000C(Entity*);
extern void sub_0805E47C(Entity*);
diff --git a/include/script.h b/include/script.h
index a3f29c84..93b7554c 100644
--- a/include/script.h
+++ b/include/script.h
@@ -30,4 +30,7 @@ extern void StartPlayerScript(u16*);
extern void sub_0807DEDC(Entity*, ScriptExecutionContext*, u32, u32);
+extern ScriptExecutionContext* StartCutscene(Entity*, u16*);
+extern void sub_0807DDAC(Entity*, void(*function)(Entity*, ScriptExecutionContext*));
+extern void sub_0807DD94(Entity*, void(*function)(Entity*, ScriptExecutionContext*));
#endif
diff --git a/src/npc/beedle.c b/src/npc/beedle.c
index da25ab1b..98297254 100644
--- a/src/npc/beedle.c
+++ b/src/npc/beedle.c
@@ -4,6 +4,7 @@
#include "textbox.h"
#include "player.h"
#include "room.h"
+#include "script.h"
typedef struct {
u32 unk_00;
diff --git a/src/npc/bigGoron.c b/src/npc/bigGoron.c
index 94a6e085..4b45fe41 100644
--- a/src/npc/bigGoron.c
+++ b/src/npc/bigGoron.c
@@ -3,6 +3,7 @@
#include "player.h"
#include "structures.h"
#include "functions.h"
+#include "script.h"
extern void (*gUnk_081140D4[])(Entity*);
diff --git a/src/npc/bladeBrothers.c b/src/npc/bladeBrothers.c
index f19d4990..8211ed49 100644
--- a/src/npc/bladeBrothers.c
+++ b/src/npc/bladeBrothers.c
@@ -6,6 +6,7 @@
#include "room.h"
#include "textbox.h"
#include "save.h"
+#include "script.h"
extern void (*gUnk_081115C0[])(Entity*);
extern void (*gUnk_081115D0[])(Entity*);
@@ -126,7 +127,7 @@ void FUN_08068b2c(Entity* this) {
InitAnimationForceUpdate(this, uVar1);
sub_0806F118(this);
} else {
- sub_0807DD94(this, 0);
+ sub_0807DD94(this, NULL);
}
}
diff --git a/src/npc/festari.c b/src/npc/festari.c
index 0c5c74f8..fa1dac19 100644
--- a/src/npc/festari.c
+++ b/src/npc/festari.c
@@ -3,6 +3,7 @@
#include "functions.h"
#include "npc.h"
#include "player.h"
+#include "script.h"
extern u32 sub_0801E99C(Entity*);
extern void sub_08078784(Entity*, u32);
@@ -37,7 +38,7 @@ void sub_0805FE48(Entity* this) {
InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
sub_0806F118(this);
} else {
- ExecuteScriptCommandSet(this, *(void**)&this->cutsceneBeh);
+ ExecuteScriptCommandSet(this, *(ScriptExecutionContext **)&this->cutsceneBeh);
sub_0805FF2C(this, *(void**)&this->cutsceneBeh);
uVar4 = this->field_0x80.HWORD;
if (uVar4 < 8) {
diff --git a/src/npc/forestMinish.c b/src/npc/forestMinish.c
index 71c84161..66933ef3 100644
--- a/src/npc/forestMinish.c
+++ b/src/npc/forestMinish.c
@@ -7,6 +7,7 @@
#include "structures.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern void sub_0807DD50(Entity*);
extern void sub_0806F118(Entity*);
diff --git a/src/npc/goron.c b/src/npc/goron.c
index dcc0ac33..a7d4ee54 100644
--- a/src/npc/goron.c
+++ b/src/npc/goron.c
@@ -2,6 +2,7 @@
#include "entity.h"
#include "functions.h"
#include "textbox.h"
+#include "script.h"
extern void (*gUnk_08111A80[])(Entity*);
extern void (*gUnk_08111A8C[])(Entity*);
@@ -61,7 +62,7 @@ void sub_080693C4(Entity* this) {
void sub_08069428(Entity* this, s32 offsetX, bool32 createFx65);
void sub_080693D0(Entity* this) {
- sub_0807DD94(this, 0);
+ sub_0807DD94(this, NULL);
if (this->animIndex == 8) {
u32 var0 = this->field_0x82.HWORD & 0xF;
bool32 createFx65 = BOOLCAST(var0); // = !var0
diff --git a/src/npc/goronMerchant.c b/src/npc/goronMerchant.c
index 7cfdb685..9fd402c5 100644
--- a/src/npc/goronMerchant.c
+++ b/src/npc/goronMerchant.c
@@ -5,6 +5,7 @@
#include "textbox.h"
#include "room.h"
#include "flags.h"
+#include "script.h"
extern u32 sub_080696BC(Entity*);
@@ -70,7 +71,7 @@ void sub_0806963C(Entity* this) {
}
void sub_08069654(Entity* this) {
- sub_0807DD94(this, 0);
+ sub_0807DD94(this, NULL);
}
void sub_08069660(Entity* this) {
diff --git a/src/npc/librari.c b/src/npc/librari.c
index 27b20ad8..9db202b7 100644
--- a/src/npc/librari.c
+++ b/src/npc/librari.c
@@ -4,6 +4,7 @@
#include "flags.h"
#include "textbox.h"
#include "functions.h"
+#include "script.h"
extern u16 gUnk_08112D48[];
@@ -24,7 +25,7 @@ void Librari(Entity* this) {
this->interactType = 0;
sub_0806F118(this);
} else {
- sub_0807DDAC(this, 0);
+ sub_0807DDAC(this, NULL);
sub_0807DDE4(this);
UpdateAnimationSingleFrame(this);
}
diff --git a/src/npc/malon.c b/src/npc/malon.c
index 340e9cf7..ca6d6eab 100644
--- a/src/npc/malon.c
+++ b/src/npc/malon.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "functions.h"
#include "entity.h"
+#include "script.h"
extern Entity gPlayerEntity;
@@ -44,7 +45,7 @@ void sub_080658BC(Entity* this) {
InitAnimationForceUpdate(this, sub_0806F5A4(GetFacingDirection(this, &gPlayerEntity)));
sub_0806F118(this);
} else {
- sub_0807DD94(this, 0);
+ sub_0807DD94(this, NULL);
}
}
diff --git a/src/npc/mayorHagen.c b/src/npc/mayorHagen.c
index a56ded98..df7366dd 100644
--- a/src/npc/mayorHagen.c
+++ b/src/npc/mayorHagen.c
@@ -9,6 +9,7 @@
#include "structures.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern void sub_0807DD50(Entity*);
extern u32 sub_0806F5A4(u32);
diff --git a/src/npc/melari.c b/src/npc/melari.c
index 1b09ecb6..b5101e02 100644
--- a/src/npc/melari.c
+++ b/src/npc/melari.c
@@ -3,6 +3,7 @@
#include "npc.h"
#include "textbox.h"
#include "functions.h"
+#include "script.h"
extern void sub_08068780(Entity*);
extern void sub_08078778(Entity*);
diff --git a/src/npc/mutoh.c b/src/npc/mutoh.c
index deed814f..998a54a6 100644
--- a/src/npc/mutoh.c
+++ b/src/npc/mutoh.c
@@ -7,6 +7,7 @@
#include "structures.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern void sub_0807DD50(Entity*);
extern u32 GetFacingDirection(Entity*, Entity*);
diff --git a/src/npc/percy.c b/src/npc/percy.c
index 3d18ed35..484ee13b 100644
--- a/src/npc/percy.c
+++ b/src/npc/percy.c
@@ -4,6 +4,7 @@
#include "textbox.h"
#include "functions.h"
#include "flags.h"
+#include "script.h"
extern void sub_0806B41C(Entity*);
extern void sub_0806B3CC(Entity*);
diff --git a/src/npc/rem.c b/src/npc/rem.c
index b1233acf..f81929ad 100644
--- a/src/npc/rem.c
+++ b/src/npc/rem.c
@@ -1,6 +1,7 @@
#include "global.h"
#include "functions.h"
#include "entity.h"
+#include "script.h"
extern void sub_0807DDE4(Entity*);
extern void PlaySFX(u32);
diff --git a/src/npc/simon.c b/src/npc/simon.c
index deb8d73e..ecc57f36 100644
--- a/src/npc/simon.c
+++ b/src/npc/simon.c
@@ -3,6 +3,7 @@
#include "functions.h"
#include "room.h"
#include "flags.h"
+#include "script.h"
typedef struct {
u8 filler[4];
diff --git a/src/npc/smith.c b/src/npc/smith.c
index 50772b83..d06cedfe 100644
--- a/src/npc/smith.c
+++ b/src/npc/smith.c
@@ -3,6 +3,7 @@
#include "textbox.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern u32 GetFacingDirection(Entity*, Entity*);
extern u32 sub_0806F5A4(u32);
diff --git a/src/npc/stamp.c b/src/npc/stamp.c
index 652e6710..a30d31ad 100644
--- a/src/npc/stamp.c
+++ b/src/npc/stamp.c
@@ -2,6 +2,7 @@
#include "entity.h"
#include "textbox.h"
#include "functions.h"
+#include "script.h"
extern void sub_08078778(Entity*);
extern void sub_0805E47C(Entity*);
diff --git a/src/npc/talon.c b/src/npc/talon.c
index 867ede74..24380fc9 100644
--- a/src/npc/talon.c
+++ b/src/npc/talon.c
@@ -3,6 +3,7 @@
#include "textbox.h"
#include "functions.h"
#include "player.h"
+#include "script.h"
extern void (*gUnk_0810FEC4[])(Entity* this);
extern void (*gUnk_0810FEBC[])(Entity* this);
diff --git a/src/npc/teachers.c b/src/npc/teachers.c
index b633b3d0..9a9f0509 100644
--- a/src/npc/teachers.c
+++ b/src/npc/teachers.c
@@ -3,6 +3,7 @@
#include "player.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern SpriteLoadData gUnk_08113910[];
extern void sub_0807DD50(Entity*);
diff --git a/src/npc/townMinish.c b/src/npc/townMinish.c
index 6ed67b2e..9217fdd7 100644
--- a/src/npc/townMinish.c
+++ b/src/npc/townMinish.c
@@ -5,6 +5,7 @@
#include "textbox.h"
#include "flags.h"
#include "save.h"
+#include "script.h"
extern void InitializeAnimation(Entity*, u32);
extern u32 LoadExtraSpriteData(Entity*, SpriteLoadData*);
diff --git a/src/npc/townsperson.c b/src/npc/townsperson.c
index 90e2490a..a5295f93 100644
--- a/src/npc/townsperson.c
+++ b/src/npc/townsperson.c
@@ -7,6 +7,7 @@
#include "structures.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
typedef struct {
u8 frame1;
diff --git a/src/npc/windTribespeople.c b/src/npc/windTribespeople.c
index b1499f01..05dca467 100644
--- a/src/npc/windTribespeople.c
+++ b/src/npc/windTribespeople.c
@@ -6,6 +6,7 @@
#include "structures.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern u32 LoadExtraSpriteData(Entity*, SpriteLoadData*);
extern void sub_0807DD50(Entity*);
diff --git a/src/npc/zelda.c b/src/npc/zelda.c
index ea12cf4b..00c333e6 100644
--- a/src/npc/zelda.c
+++ b/src/npc/zelda.c
@@ -3,6 +3,7 @@
#include "functions.h"
#include "room.h"
#include "flags.h"
+#include "script.h"
extern void PrependEntityToList(Entity*, u32);
extern void sub_0807DD50(Entity*);
diff --git a/src/object/houseDoorExterior.c b/src/object/houseDoorExterior.c
index 3c43e4b1..ddf5b87e 100644
--- a/src/object/houseDoorExterior.c
+++ b/src/object/houseDoorExterior.c
@@ -3,6 +3,7 @@
#include "flags.h"
#include "functions.h"
#include "room.h"
+#include "script.h"
typedef struct {
/*0x00*/ u16 unk0;
diff --git a/src/object/windcrest.c b/src/object/windcrest.c
index 4b96f901..a4c4049d 100644
--- a/src/object/windcrest.c
+++ b/src/object/windcrest.c
@@ -2,6 +2,7 @@
#include "entity.h"
#include "functions.h"
#include "save.h"
+#include "script.h"
extern void sub_0807DD64(Entity*);
extern void sub_0807DDE4(Entity*);