summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfullgrowngaming <42490167+fullgrowngaming@users.noreply.github.com>2020-09-28 16:27:21 -0700
committerGitHub <noreply@github.com>2020-09-28 19:27:21 -0400
commit96d05d4e7d97dccf7fef335b708307c204e0725a (patch)
treeca65f6d79ab83064a76c7afc5d870c8d6bec9def
parent378684152cde8a3674f9d92a1a154f72b4968ae1 (diff)
en_tanron6 OK (#27)
* en_tanron6 OK * Fixed name of SetupDoNothing * Fixed initvars name * Fixed initvars name * Fixed initvars name
-rw-r--r--include/functions_overlay.h2
-rw-r--r--linker_scripts/code_script.txt5
-rw-r--r--src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c41
-rw-r--r--src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.h5
-rw-r--r--tables/functions.txt2
5 files changed, 42 insertions, 13 deletions
diff --git a/include/functions_overlay.h b/include/functions_overlay.h
index 1887813b7..e0c6911b8 100644
--- a/include/functions_overlay.h
+++ b/include/functions_overlay.h
@@ -12066,7 +12066,7 @@ void EnTanron5_Draw(void); // func_80BE5B58
void func_80BE5C10(void); // func_80BE5C10
void EnTanron6_Init(void); // func_80BE6040
void EnTanron6_Destroy(void); // func_80BE60AC
-void func_80BE60BC(void); // func_80BE60BC
+void EnTanron6_DoNothing(void); // EnTanron6_DoNothing
void func_80BE60D0(void); // func_80BE60D0
void EnTanron6_Update(void); // func_80BE60E0
void EnTanron6_Draw(void); // func_80BE6140
diff --git a/linker_scripts/code_script.txt b/linker_scripts/code_script.txt
index 0ca1557b6..225cf4d3a 100644
--- a/linker_scripts/code_script.txt
+++ b/linker_scripts/code_script.txt
@@ -7810,8 +7810,9 @@ SECTIONS
ovl_En_Tanron6 : AT(RomLocation)
{
build/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.o(.text)
- build/asm/ovl_En_Tanron6_data.o(.data)
- build/asm/ovl_En_Tanron6_rodata.o(.rodata)
+ build/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.o(.data)
+ build/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.o(.rodata)
+ build/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6_overlay.o(.ovl)
}
SegmentEnd = .;
SegmentSize = SegmentEnd - SegmentStart;
diff --git a/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c b/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c
index 49ba2d123..8bb151e9f 100644
--- a/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c
+++ b/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.c
@@ -9,7 +9,9 @@ void EnTanron6_Destroy(Actor* thisx, GlobalContext* globalCtx);
void EnTanron6_Update(Actor* thisx, GlobalContext* globalCtx);
void EnTanron6_Draw(Actor* thisx, GlobalContext* globalCtx);
-/*
+void EnTanron6_DoNothing(EnTanron6* this);
+void func_80BE60D0(EnTanron6* this, GlobalContext* globalCtx);
+
const ActorInit En_Tanron6_InitVars = {
ACTOR_EN_TANRON6,
ACTORTYPE_ENEMY,
@@ -21,16 +23,39 @@ const ActorInit En_Tanron6_InitVars = {
(ActorFunc)EnTanron6_Update,
(ActorFunc)EnTanron6_Draw
};
-*/
-GLOBAL_ASM("asm/non_matchings/ovl_En_Tanron6_0x80BE6040/EnTanron6_Init.asm")
+ActorDamageChart D_80BE6170 = { 0xF0, 0xF0, 0x00, 0xF1, 0xE1, 0xE1, 0x00, 0xE1, 0xF0, 0xF0, 0xF0,
+ 0xE1, 0xE1, 0x46, 0xF0, 0xF0, 0xE1, 0xF0, 0xF0, 0x00, 0x00, 0xF0,
+ 0xE1, 0x00, 0xF0, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0xF0 };
+
+void EnTanron6_Init(Actor* thisx, GlobalContext* globalCtx) {
+ EnTanron6* this = THIS;
+
+ this->actor.unkA0.mass = 0xA;
+ Actor_SetDrawParams(&this->actor.shape, 0, func_800B3FC0, 19.0f);
+ this->actor.unkA0.health = 1;
+ this->actor.unkA0.damageChart = &D_80BE6170;
+ this->actor.unk1F = 6;
+ EnTanron6_DoNothing(this);
+}
+
+void EnTanron6_Destroy(Actor* thisx, GlobalContext* globalCtx) {
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Tanron6_0x80BE6040/EnTanron6_Destroy.asm")
+void EnTanron6_DoNothing(EnTanron6* this) {
+ this->actionFunc = func_80BE60D0;
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Tanron6_0x80BE6040/func_80BE60BC.asm")
+void func_80BE60D0(EnTanron6* this, GlobalContext* globalCtx) {
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Tanron6_0x80BE6040/func_80BE60D0.asm")
+void EnTanron6_Update(Actor* thisx, GlobalContext* globalCtx) {
+ EnTanron6* this = THIS;
-GLOBAL_ASM("asm/non_matchings/ovl_En_Tanron6_0x80BE6040/EnTanron6_Update.asm")
+ this->actionFunc(this, globalCtx);
+ Actor_SetVelocityAndMoveYRotationAndGravity(&this->actor);
+ func_800B78B8(globalCtx, &this->actor, 10.0f, 40.0f, 40.0f, 0x1D);
+}
-GLOBAL_ASM("asm/non_matchings/ovl_En_Tanron6_0x80BE6040/EnTanron6_Draw.asm")
+void EnTanron6_Draw(Actor* thisx, GlobalContext* globalCtx) {
+}
diff --git a/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.h b/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.h
index 656f744fa..f6e16ef24 100644
--- a/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.h
+++ b/src/overlays/actors/ovl_En_Tanron6/z_en_tanron6.h
@@ -5,9 +5,12 @@
struct EnTanron6;
+typedef void (*EnTanron6ActionFunc)(struct EnTanron6*, GlobalContext*);
+
typedef struct EnTanron6 {
/* 0x000 */ Actor actor;
- /* 0x144 */ char unk_144[0xC0];
+ /* 0x144 */ char unk_144[0xBC];
+ /* 0x200 */ EnTanron6ActionFunc actionFunc;
} EnTanron6; // size = 0x204
extern const ActorInit En_Tanron6_InitVars;
diff --git a/tables/functions.txt b/tables/functions.txt
index 1ad10bf11..3cf302a0f 100644
--- a/tables/functions.txt
+++ b/tables/functions.txt
@@ -16059,7 +16059,7 @@
0x80BE5C10:("func_80BE5C10",),
0x80BE6040:("EnTanron6_Init",),
0x80BE60AC:("EnTanron6_Destroy",),
- 0x80BE60BC:("func_80BE60BC",),
+ 0x80BE60BC:("EnTanron6_DoNothing",),
0x80BE60D0:("func_80BE60D0",),
0x80BE60E0:("EnTanron6_Update",),
0x80BE6140:("EnTanron6_Draw",),