mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
Bootstrap actors (#14)
* Bootstrap actors * Address feedback. Improve header guard. Remove ovl_Player_Actor, it will need to be handled seperately.
This commit is contained in:
@@ -177,10 +177,10 @@ build/baserom/%: baserom/%
|
||||
build/asm/%.o: asm/%.asm
|
||||
$(AS) $(ASFLAGS) $^ -o $@
|
||||
|
||||
build/src/actors/%.o: src/actors/%.c include/* $(S_FILES)
|
||||
build/src/overlays/%.o: src/overlays/%.c include/* $(S_FILES)
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
./tools/overlay.py $@ build/src/actors/$*_overlay.s
|
||||
$(AS) $(ASFLAGS) build/src/actors/$*_overlay.s -o build/src/actors/$*_overlay.o
|
||||
./tools/overlay.py $@ build/src/overlays/$*_overlay.s
|
||||
$(AS) $(ASFLAGS) build/src/overlays/$*_overlay.s -o build/src/overlays/$*_overlay.o
|
||||
|
||||
build/src/%.o: src/%.c include/* $(S_FILES)
|
||||
$(CC) -c $(CFLAGS) $(MIPS_VERSION) $(OPTFLAGS) -o $@ $<
|
||||
|
||||
+15
-15
@@ -2922,7 +2922,7 @@ void func_809200F8(void); // func_809200F8
|
||||
void ItemEtcetera_Update(void); // func_80920140
|
||||
void func_80920164(void); // func_80920164
|
||||
void func_809201BC(void); // func_809201BC
|
||||
void FireArrow_SetUpdateFunc(ActorArrowFire* this, actor_func update); // func_80920340
|
||||
void FireArrow_SetUpdateFunc(ActorArrowFire* this, ActorFunc update); // func_80920340
|
||||
void ArrowFire_Init(ActorArrowFire* this, GlobalContext* ctxt); // func_8092034C
|
||||
void ArrowFire_Destroy(ActorArrowFire* this, GlobalContext* ctxt); // func_809203F8
|
||||
void FireArrow_Update1(ActorArrowFire* pzParm1); // func_80920440
|
||||
@@ -8001,12 +8001,12 @@ void BgOpenSpot_Init(void); // func_80ACB1E0
|
||||
void BgOpenSpot_Destroy(void); // func_80ACB220
|
||||
void BgOpenSpot_Update(void); // func_80ACB230
|
||||
void func_80ACB2B0(void); // func_80ACB2B0
|
||||
void BgFuKaiten_Init(ActorBgFuKaiten* this, GlobalContext* ctxt); // func_80ACB400
|
||||
void BgFuKaiten_Destroy(ActorBgFuKaiten* this, GlobalContext* ctxt); // func_80ACB480
|
||||
void BgFuKaiten_UpdateRotation(ActorBgFuKaiten* this); // func_80ACB4B4
|
||||
void BgFuKaiten_UpdateHeight(ActorBgFuKaiten* this); // func_80ACB50C
|
||||
void BgFuKaiten_Update(ActorBgFuKaiten* this, GlobalContext* ctxt); // func_80ACB570
|
||||
void BgFuKaiten_Draw(ActorBgFuKaiten* this, GlobalContext* ctxt); // func_80ACB5A0
|
||||
void BgFuKaiten_Init(Actor* this, GlobalContext* ctxt); // func_80ACB400
|
||||
void BgFuKaiten_Destroy(Actor* this, GlobalContext* ctxt); // func_80ACB480
|
||||
void BgFuKaiten_UpdateRotation(Actor* this); // func_80ACB4B4
|
||||
void BgFuKaiten_UpdateHeight(Actor* this); // func_80ACB50C
|
||||
void BgFuKaiten_Update(Actor* this, GlobalContext* ctxt); // func_80ACB570
|
||||
void BgFuKaiten_Draw(Actor* this, GlobalContext* ctxt); // func_80ACB5A0
|
||||
void func_80ACB6A0(void); // func_80ACB6A0
|
||||
void func_80ACB7F4(void); // func_80ACB7F4
|
||||
void func_80ACB940(void); // func_80ACB940
|
||||
@@ -11748,14 +11748,14 @@ void func_80BD5118(void); // func_80BD5118
|
||||
void func_80BD5134(void); // func_80BD5134
|
||||
void BgIkanaBombwall_Update(void); // func_80BD51DC
|
||||
void BgIkanaBombwall_Draw(void); // func_80BD5200
|
||||
void BgIkanaRay_Init(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD53C0
|
||||
void BgIkanaRay_Destroy(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD546C
|
||||
void BgIkanaRay_SetDeactivated(ActorBgIkanaRay* this); // func_80BD5498
|
||||
void BgIkanaRay_UpdateCheckForActivation(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD54BC
|
||||
void BgIkanaRay_SetActivated(ActorBgIkanaRay* this); // func_80BD5500
|
||||
void BgIkanaRay_UpdateActivated(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD5530
|
||||
void BgIkanaRay_Update(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD556C
|
||||
void BgIkanaRay_Draw(ActorBgIkanaRay* this, GlobalContext* ctxt); // func_80BD5590
|
||||
void BgIkanaRay_Init(Actor* this, GlobalContext* ctxt); // func_80BD53C0
|
||||
void BgIkanaRay_Destroy(Actor* this, GlobalContext* ctxt); // func_80BD546C
|
||||
void BgIkanaRay_SetDeactivated(Actor* this); // func_80BD5498
|
||||
void BgIkanaRay_UpdateCheckForActivation(Actor* this, GlobalContext* ctxt); // func_80BD54BC
|
||||
void BgIkanaRay_SetActivated(Actor* this); // func_80BD5500
|
||||
void BgIkanaRay_UpdateActivated(Actor* this, GlobalContext* ctxt); // func_80BD5530
|
||||
void BgIkanaRay_Update(Actor* this, GlobalContext* ctxt); // func_80BD556C
|
||||
void BgIkanaRay_Draw(Actor* this, GlobalContext* ctxt); // func_80BD5590
|
||||
void func_80BD5690(void); // func_80BD5690
|
||||
void BgIkanaShutter_Init(void); // func_80BD5728
|
||||
void BgIkanaShutter_Destroy(void); // func_80BD57F4
|
||||
|
||||
@@ -9526,7 +9526,7 @@ extern UNK_TYPE1 D_80ACB3B0; // D_80ACB3B0
|
||||
extern OverlayRelocationSection bgOpenSpotOverlayInfo; // D_80ACB3C0
|
||||
extern u32 bgOpenSpotOverlayRelocations[7]; // D_80ACB3D4
|
||||
extern u32 bgOpenSpotOverlayInfoOffset; // D_80ACB3FC
|
||||
extern ActorInit bgFuKaitenInitData; // D_80ACB630
|
||||
extern ActorInit Bg_Fu_Kaiten_InitVars; // D_80ACB630
|
||||
extern f32 D_80ACB650; // D_80ACB650
|
||||
extern OverlayRelocationSection bgFuKaitenOverlayInfo; // D_80ACB660
|
||||
extern u32 bgFuKaitenOverlayRelocations[8]; // D_80ACB674
|
||||
@@ -12749,7 +12749,7 @@ extern UNK_TYPE4 D_80BD52FC; // D_80BD52FC
|
||||
extern OverlayRelocationSection bgIkanaBombwallOverlayInfo; // D_80BD5300
|
||||
extern u32 bgIkanaBombwallOverlayRelocations[39]; // D_80BD5314
|
||||
extern u32 bgIkanaBombwallOverlayInfoOffset; // D_80BD53BC
|
||||
extern ActorInit bgIkanaRayInitData; // D_80BD55D0
|
||||
extern ActorInit Bg_Ikana_Ray_InitVars; // D_80BD55D0
|
||||
extern ColCylinderInit bgIkanaRayCylinderInit; // D_80BD55F0
|
||||
extern InitChainEntry bgIkanaRayCompInit[4]; // D_80BD561C
|
||||
extern OverlayRelocationSection bgIkanaRayOverlayInfo; // D_80BD5630
|
||||
|
||||
+3
-22
@@ -992,8 +992,6 @@ typedef struct {
|
||||
/* 0x44 */ BgScenePolygonLists scenePolyLists;
|
||||
} StaticCollisionContext; // size = 0x50
|
||||
|
||||
typedef struct ActorBgFuKaiten ActorBgFuKaiten;
|
||||
|
||||
typedef struct ActorBgMbarChair ActorBgMbarChair;
|
||||
|
||||
typedef struct ActorEnBji01 ActorEnBji01;
|
||||
@@ -1671,20 +1669,13 @@ typedef struct {
|
||||
/* 0x244 */ Vec3f unk244;
|
||||
/* 0x250 */ f32 unk250;
|
||||
/* 0x254 */ f32 unk254;
|
||||
/* 0x258 */ actor_func update;
|
||||
/* 0x258 */ ActorFunc update;
|
||||
/* 0x25C */ s16 unk25C;
|
||||
/* 0x25E */ u16 unk25E;
|
||||
/* 0x260 */ u8 unk260;
|
||||
/* 0x261 */ UNK_TYPE1 pad261[0x3];
|
||||
} ActorArrowFire; // size = 0x264
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ ColCylinder collision;
|
||||
/* 0x190 */ AnimatedTexture* animatedTextures;
|
||||
/* 0x194 */ actor_func update;
|
||||
} ActorBgIkanaRay; // size = 0x198
|
||||
|
||||
struct ActorBgMbarChair {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ UNK_TYPE1 pad144[0x18];
|
||||
@@ -1751,7 +1742,7 @@ typedef struct {
|
||||
/* 0x14A */ u16 unk14A;
|
||||
/* 0x14C */ u8 unk14C;
|
||||
/* 0x14D */ UNK_TYPE1 pad14D[0x3];
|
||||
/* 0x150 */ actor_func unk150;
|
||||
/* 0x150 */ ActorFunc unk150;
|
||||
} ActorEnTest4; // size = 0x154
|
||||
|
||||
struct ActorObjBell {
|
||||
@@ -1765,22 +1756,12 @@ struct ActorObjBell {
|
||||
/* 0x214 */ s16 unk214;
|
||||
/* 0x216 */ UNK_TYPE1 pad216[0x12];
|
||||
}; // size = 0x228
|
||||
struct ActorBgFuKaiten {
|
||||
/* 0x000 */ DynaPolyActor bg;
|
||||
/* 0x15C */ UNK_TYPE1 pad15C[0x4];
|
||||
/* 0x160 */ f32 elevation;
|
||||
/* 0x164 */ f32 bouceHeight;
|
||||
/* 0x168 */ s16 rotationSpeed;
|
||||
/* 0x16A */ s16 bounceSpeed;
|
||||
/* 0x16C */ s16 bounce;
|
||||
/* 0x16E */ UNK_TYPE1 pad16E[0x2];
|
||||
}; // size = 0x170
|
||||
|
||||
struct ActorBgIknvObj {
|
||||
/* 0x000 */ DynaPolyActor bg;
|
||||
/* 0x15C */ ColCylinder collision;
|
||||
/* 0x1A8 */ u32 displayListAddr;
|
||||
/* 0x1AC */ actor_func updateFunc;
|
||||
/* 0x1AC */ ActorFunc updateFunc;
|
||||
}; // size = 0x1B0
|
||||
|
||||
typedef struct {
|
||||
|
||||
+26
-12
@@ -11,7 +11,7 @@ struct GlobalContext;
|
||||
struct LightMapper;
|
||||
struct BgPolygon;
|
||||
|
||||
typedef void(*actor_func)(struct Actor* this, struct GlobalContext* ctxt);
|
||||
typedef void(*ActorFunc)(struct Actor* this, struct GlobalContext* ctxt);
|
||||
|
||||
typedef struct {
|
||||
/* 0x00 */ Vec3f pos;
|
||||
@@ -61,14 +61,13 @@ typedef struct {
|
||||
typedef struct {
|
||||
/* 0x00 */ s16 id;
|
||||
/* 0x02 */ u8 type;
|
||||
/* 0x03 */ u8 room;
|
||||
/* 0x04 */ u32 flags;
|
||||
/* 0x08 */ s16 objectId;
|
||||
/* 0x0C */ u32 instanceSize;
|
||||
/* 0x10 */ actor_func init;
|
||||
/* 0x14 */ actor_func destroy;
|
||||
/* 0x18 */ actor_func update;
|
||||
/* 0x1C */ actor_func draw;
|
||||
/* 0x10 */ ActorFunc init;
|
||||
/* 0x14 */ ActorFunc destroy;
|
||||
/* 0x18 */ ActorFunc update;
|
||||
/* 0x1C */ ActorFunc draw;
|
||||
} ActorInit; // size = 0x20
|
||||
|
||||
typedef struct {
|
||||
@@ -152,10 +151,10 @@ typedef struct Actor {
|
||||
/* 0x124 */ struct Actor* child;
|
||||
/* 0x128 */ struct Actor* prev;
|
||||
/* 0x12C */ struct Actor* next;
|
||||
/* 0x130 */ actor_func init;
|
||||
/* 0x134 */ actor_func destroy;
|
||||
/* 0x138 */ actor_func update;
|
||||
/* 0x13C */ actor_func draw;
|
||||
/* 0x130 */ ActorFunc init;
|
||||
/* 0x134 */ ActorFunc destroy;
|
||||
/* 0x138 */ ActorFunc update;
|
||||
/* 0x13C */ ActorFunc draw;
|
||||
/* 0x140 */ ActorOverlay* overlayEntry;
|
||||
} Actor; // size = 0x144
|
||||
|
||||
@@ -212,7 +211,7 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ actor_func update;
|
||||
/* 0x144 */ ActorFunc update;
|
||||
/* 0x148 */ s16 collectibleFlagId;
|
||||
/* 0x14A */ s16 unk14A;
|
||||
/* 0x14C */ s16 unk14C;
|
||||
@@ -226,11 +225,26 @@ typedef struct {
|
||||
|
||||
typedef struct {
|
||||
/* 0x000 */ Actor base;
|
||||
/* 0x144 */ actor_func update;
|
||||
/* 0x144 */ ActorFunc update;
|
||||
/* 0x148 */ ColCylinder collision;
|
||||
/* 0x194 */ UNK_TYPE1 pad194[0x14];
|
||||
} ActorEnAObj; // size = 0x1A8
|
||||
|
||||
typedef enum {
|
||||
/* 0x00 */ ACTORTYPE_SWITCH,
|
||||
/* 0x01 */ ACTORTYPE_BG,
|
||||
/* 0x02 */ ACTORTYPE_PLAYER,
|
||||
/* 0x03 */ ACTORTYPE_EXPLOSIVES,
|
||||
/* 0x04 */ ACTORTYPE_NPC,
|
||||
/* 0x05 */ ACTORTYPE_ENEMY,
|
||||
/* 0x06 */ ACTORTYPE_PROP,
|
||||
/* 0x07 */ ACTORTYPE_ITEMACTION,
|
||||
/* 0x08 */ ACTORTYPE_MISC,
|
||||
/* 0x09 */ ACTORTYPE_BOSS,
|
||||
/* 0x0A */ ACTORTYPE_DOOR,
|
||||
/* 0x0B */ ACTORTYPE_CHEST
|
||||
} ActorType;
|
||||
|
||||
typedef enum {
|
||||
/* 0x000 */ ACTOR_PLAYER,
|
||||
/* 0x001 */ ACTOR_EN_TEST,
|
||||
|
||||
+578
-578
File diff suppressed because it is too large
Load Diff
@@ -1,67 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include <global_overlay.h>
|
||||
|
||||
ActorInit bgFuKaitenInitData = {
|
||||
ACTOR_BG_FU_KAITEN,
|
||||
1,
|
||||
0,
|
||||
0x30,
|
||||
0x01A0,
|
||||
sizeof(ActorBgFuKaiten),
|
||||
(actor_func)&BgFuKaiten_Init,
|
||||
(actor_func)&BgFuKaiten_Destroy,
|
||||
(actor_func)&BgFuKaiten_Update,
|
||||
(actor_func)&BgFuKaiten_Draw
|
||||
};
|
||||
|
||||
void BgFuKaiten_Init(ActorBgFuKaiten* this, GlobalContext* ctxt) {
|
||||
UNK_TYPE pad0;
|
||||
UNK_TYPE pad1;
|
||||
BgMeshHeader* header = 0;
|
||||
|
||||
Actor_SetScale(&this->bg.actor, 1.0);
|
||||
BcCheck3_BgActorInit(&this->bg, 3);
|
||||
BgCheck_RelocateMeshHeader(&object_fu_kaiten_002D30, &header);
|
||||
this->bg.dynaPolyId = BgCheck_AddActorMesh(ctxt, &ctxt->colCtx.dyna, &this->bg, header);
|
||||
|
||||
this->bouceHeight = 0.0;
|
||||
this->rotationSpeed = 0;
|
||||
this->bounceSpeed = 0;
|
||||
this->bounce = 0;
|
||||
}
|
||||
|
||||
void BgFuKaiten_Destroy(ActorBgFuKaiten* this, GlobalContext* ctxt) {
|
||||
BgCheck_RemoveActorMesh(ctxt, &ctxt->colCtx.dyna, this->bg.dynaPolyId);
|
||||
}
|
||||
|
||||
void BgFuKaiten_UpdateRotation(ActorBgFuKaiten* this) {
|
||||
f32 f0;
|
||||
this->bg.actor.shape.rot.y += this->rotationSpeed;
|
||||
if (this->rotationSpeed > 0)
|
||||
{
|
||||
f0 = this->rotationSpeed * .002f;
|
||||
func_8019FAD8(&this->bg.actor.unkEC, 8310, f0);
|
||||
}
|
||||
}
|
||||
|
||||
void BgFuKaiten_UpdateHeight(ActorBgFuKaiten* this) {
|
||||
this->bounce += this->bounceSpeed;
|
||||
this->bg.actor.currPosRot.pos.y = this->bg.actor.initPosRot.pos.y + this->elevation + this->bouceHeight;
|
||||
|
||||
this->bg.actor.currPosRot.pos.y -= this->bouceHeight * Math_Coss(this->bounce);
|
||||
}
|
||||
|
||||
void BgFuKaiten_Update(ActorBgFuKaiten* this, GlobalContext* ctxt) {
|
||||
BgFuKaiten_UpdateRotation(this);
|
||||
BgFuKaiten_UpdateHeight(this);
|
||||
}
|
||||
|
||||
void BgFuKaiten_Draw(ActorBgFuKaiten* this, GlobalContext* ctxt) {
|
||||
GraphicsContext* gfxCtx = ctxt->state.gfxCtx;
|
||||
UNK_TYPE pad;
|
||||
|
||||
func_8012C28C(gfxCtx);
|
||||
|
||||
gSPMatrix(gfxCtx->polyOpa.p++, SysMatrix_AppendStateToPolyOpaDisp(ctxt->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(gfxCtx->polyOpa.p++, object_fu_kaiten_0005D0);
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
#include <ultra64.h>
|
||||
#include <global_overlay.h>
|
||||
|
||||
ActorInit bgIkanaRayInitData = {
|
||||
ACTOR_BG_IKANA_RAY,
|
||||
6,
|
||||
0,
|
||||
0,
|
||||
0x0203,
|
||||
sizeof(ActorBgIkanaRay),
|
||||
(actor_func)BgIkanaRay_Init,
|
||||
(actor_func)BgIkanaRay_Destroy,
|
||||
(actor_func)BgIkanaRay_Update,
|
||||
(actor_func)BgIkanaRay_Draw
|
||||
};
|
||||
|
||||
// TODO better formatting
|
||||
ColCylinderInit bgIkanaRayCylinderInit = {
|
||||
{ 10, 33, 0, 0, 0, 1 },
|
||||
{ 0, { 0x00200000, 0, 0 }, { 0, 0, 0 }, 25, 0, 1 },
|
||||
{ 90, 420, 65116}
|
||||
};
|
||||
|
||||
// TODO macro
|
||||
InitChainEntry bgIkanaRayCompInit[] = {
|
||||
{1, 6, 0x0FC, 4000},
|
||||
{1, 6, 0x100, 1000},
|
||||
{1, 6, 0x104, 1000},
|
||||
{0, 9, 0x058, 100}
|
||||
};
|
||||
|
||||
void BgIkanaRay_Init(ActorBgIkanaRay* this, GlobalContext* ctxt) {
|
||||
ColCylinder* collision = &this->collision;
|
||||
u32 pad;
|
||||
|
||||
Actor_ProcessInitChain((Actor*)this, bgIkanaRayCompInit);
|
||||
|
||||
Collision_InitCylinderDefault(ctxt, collision);
|
||||
Collision_InitCylinderWithData(ctxt, collision, (Actor*)this, &bgIkanaRayCylinderInit);
|
||||
Collision_CylinderMoveToActor((Actor*)this, &this->collision);
|
||||
|
||||
this->animatedTextures = (AnimatedTexture*)Lib_PtrSegToVirt(object_ikana_obj_001228);
|
||||
|
||||
if (Actor_GetSwitchFlag(ctxt, this->base.params & 0x7F) != 0) {
|
||||
BgIkanaRay_SetActivated(this);
|
||||
} else {
|
||||
BgIkanaRay_SetDeactivated(this);
|
||||
}
|
||||
}
|
||||
|
||||
void BgIkanaRay_Destroy(ActorBgIkanaRay* this, GlobalContext* ctxt) {
|
||||
ColCylinder* collision = &this->collision;
|
||||
Collision_FiniCylinder(ctxt, collision);
|
||||
}
|
||||
|
||||
void BgIkanaRay_SetDeactivated(ActorBgIkanaRay* this) {
|
||||
this->base.draw = NULL;
|
||||
this->base.flags |= 0x10;
|
||||
this->update = (actor_func)BgIkanaRay_UpdateCheckForActivation;
|
||||
}
|
||||
|
||||
void BgIkanaRay_UpdateCheckForActivation(ActorBgIkanaRay* this, GlobalContext* ctxt) {
|
||||
if (Actor_GetSwitchFlag(ctxt, this->base.params & 0x7F) != 0) {
|
||||
BgIkanaRay_SetActivated(this);
|
||||
}
|
||||
}
|
||||
|
||||
void BgIkanaRay_SetActivated(ActorBgIkanaRay* this) {
|
||||
this->base.draw = (actor_func)BgIkanaRay_Draw;
|
||||
this->base.flags &= 0xFFFFFFEF;
|
||||
this->update = (actor_func)BgIkanaRay_UpdateActivated;
|
||||
}
|
||||
|
||||
void BgIkanaRay_UpdateActivated(ActorBgIkanaRay* this, GlobalContext* ctxt) {
|
||||
Collision_AddAT(ctxt, &ctxt->colCheckCtx, &this->collision.base);
|
||||
}
|
||||
|
||||
void BgIkanaRay_Update(ActorBgIkanaRay* this, GlobalContext* ctxt) {
|
||||
this->update((Actor*)this, ctxt);
|
||||
}
|
||||
|
||||
void BgIkanaRay_Draw(ActorBgIkanaRay* this, GlobalContext* ctxt) {
|
||||
SceneProc_DrawAllSceneAnimatedTextures(ctxt, this->animatedTextures);
|
||||
func_800BE03C(ctxt, object_ikana_obj_001100);
|
||||
}
|
||||
@@ -12,7 +12,7 @@ void EnAObj_Init(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
Collision_InitCylinder(ctxt, &s0->collision, (Actor*)s0, &enAObjCylinderInit);
|
||||
Collision_CylinderMoveToActor((Actor*)s0, &s0->collision);
|
||||
s0->base.unkA0.mass = 255;
|
||||
s0->update = (actor_func)EnAObj_Update1;
|
||||
s0->update = (ActorFunc)EnAObj_Update1;
|
||||
}
|
||||
|
||||
void EnAObj_Destroy(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
@@ -24,7 +24,7 @@ void EnAObj_Update1(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
s16 v0;
|
||||
s32 v1;
|
||||
if (func_800B84D0((Actor*)this, ctxt) != 0) {
|
||||
this->update = (actor_func)EnAObj_Update2;
|
||||
this->update = (ActorFunc)EnAObj_Update2;
|
||||
} else {
|
||||
v0 = this->base.rotTowardsLinkY - this->base.shape.rot.y;
|
||||
v1 = (v0 < 0)? -v0 : v0;
|
||||
@@ -36,7 +36,7 @@ void EnAObj_Update1(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
|
||||
void EnAObj_Update2(ActorEnAObj* this, GlobalContext* ctxt) {
|
||||
if (func_800B867C((Actor*)this, ctxt) != 0) {
|
||||
this->update = (actor_func)EnAObj_Update1;
|
||||
this->update = (ActorFunc)EnAObj_Update1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ovl_Arms_Hook
|
||||
z_arms_hook.c
|
||||
@@ -0,0 +1,48 @@
|
||||
#include "z_arms_hook.h"
|
||||
|
||||
#define FLAGS 0x00000030
|
||||
|
||||
#define THIS ((ArmsHook*)thisx)
|
||||
|
||||
void ArmsHook_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArmsHook_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit Arms_Hook_InitVars = {
|
||||
ACTOR_ARMS_HOOK,
|
||||
ACTORTYPE_ITEMACTION,
|
||||
FLAGS,
|
||||
GAMEPLAY_KEEP,
|
||||
sizeof(ArmsHook),
|
||||
(ActorFunc)ArmsHook_Init,
|
||||
(ActorFunc)ArmsHook_Destroy,
|
||||
(ActorFunc)ArmsHook_Update,
|
||||
(ActorFunc)ArmsHook_Draw
|
||||
};
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C1030.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/ArmsHook_Init.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/ArmsHook_Destroy.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C10F8.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C1154.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C1168.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C1198.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C11C0.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C125C.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/func_808C12A4.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/ArmsHook_Update.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arms_Hook_0x808C1030/ArmsHook_Draw.asm")
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef Z_ARMS_HOOK_H
|
||||
#define Z_ARMS_HOOK_H
|
||||
|
||||
#include <global.h>
|
||||
|
||||
struct ArmsHook;
|
||||
|
||||
typedef struct ArmsHook {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0xCC];
|
||||
} ArmsHook; // size = 0x210
|
||||
|
||||
extern const ActorInit Arms_Hook_InitVars;
|
||||
|
||||
#endif // Z_ARMS_HOOK_H
|
||||
@@ -0,0 +1,2 @@
|
||||
ovl_Arrow_Fire
|
||||
z_arrow_fire.c
|
||||
@@ -0,0 +1,44 @@
|
||||
#include "z_arrow_fire.h"
|
||||
|
||||
#define FLAGS 0x02000010
|
||||
|
||||
#define THIS ((ArrowFire*)thisx)
|
||||
|
||||
void ArrowFire_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowFire_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowFire_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowFire_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit Arrow_Fire_InitVars = {
|
||||
ACTOR_ARROW_FIRE,
|
||||
ACTORTYPE_ITEMACTION,
|
||||
FLAGS,
|
||||
GAMEPLAY_KEEP,
|
||||
sizeof(ArrowFire),
|
||||
(ActorFunc)ArrowFire_Init,
|
||||
(ActorFunc)ArrowFire_Destroy,
|
||||
(ActorFunc)ArrowFire_Update,
|
||||
(ActorFunc)ArrowFire_Draw
|
||||
};
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/FireArrow_SetUpdateFunc.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/ArrowFire_Init.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/ArrowFire_Destroy.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/FireArrow_Update1.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/FireArrow_Lerp.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/FireArrow_Update3.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/FireArrow_Update2.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/ArrowFire_Update.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/func_80920948.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Fire_0x80920340/ArrowFire_Draw.asm")
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef Z_ARROW_FIRE_H
|
||||
#define Z_ARROW_FIRE_H
|
||||
|
||||
#include <global.h>
|
||||
|
||||
struct ArrowFire;
|
||||
|
||||
typedef struct ArrowFire {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x120];
|
||||
} ArrowFire; // size = 0x264
|
||||
|
||||
extern const ActorInit Arrow_Fire_InitVars;
|
||||
|
||||
#endif // Z_ARROW_FIRE_H
|
||||
@@ -0,0 +1,2 @@
|
||||
ovl_Arrow_Ice
|
||||
z_arrow_ice.c
|
||||
@@ -0,0 +1,42 @@
|
||||
#include "z_arrow_ice.h"
|
||||
|
||||
#define FLAGS 0x02000010
|
||||
|
||||
#define THIS ((ArrowIce*)thisx)
|
||||
|
||||
void ArrowIce_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowIce_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowIce_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowIce_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit Arrow_Ice_InitVars = {
|
||||
ACTOR_ARROW_ICE,
|
||||
ACTORTYPE_ITEMACTION,
|
||||
FLAGS,
|
||||
GAMEPLAY_KEEP,
|
||||
sizeof(ArrowIce),
|
||||
(ActorFunc)ArrowIce_Init,
|
||||
(ActorFunc)ArrowIce_Destroy,
|
||||
(ActorFunc)ArrowIce_Update,
|
||||
(ActorFunc)ArrowIce_Draw
|
||||
};
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/func_80922430.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/ArrowIce_Init.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/ArrowIce_Destroy.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/func_809224DC.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/func_809225D0.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/func_80922628.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/func_809227F4.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/ArrowIce_Update.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Ice_0x80922430/ArrowIce_Draw.asm")
|
||||
@@ -0,0 +1,15 @@
|
||||
#ifndef Z_ARROW_ICE_H
|
||||
#define Z_ARROW_ICE_H
|
||||
|
||||
#include <global.h>
|
||||
|
||||
struct ArrowIce;
|
||||
|
||||
typedef struct ArrowIce {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x20];
|
||||
} ArrowIce; // size = 0x164
|
||||
|
||||
extern const ActorInit Arrow_Ice_InitVars;
|
||||
|
||||
#endif // Z_ARROW_ICE_H
|
||||
@@ -0,0 +1,2 @@
|
||||
ovl_Arrow_Light
|
||||
z_arrow_light.c
|
||||
@@ -0,0 +1,42 @@
|
||||
#include "z_arrow_light.h"
|
||||
|
||||
#define FLAGS 0x02000010
|
||||
|
||||
#define THIS ((ArrowLight*)thisx)
|
||||
|
||||
void ArrowLight_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowLight_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowLight_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ArrowLight_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit Arrow_Light_InitVars = {
|
||||
ACTOR_ARROW_LIGHT,
|
||||
ACTORTYPE_ITEMACTION,
|
||||
FLAGS,
|
||||
GAMEPLAY_KEEP,
|
||||
sizeof(ArrowLight),
|
||||
(ActorFunc)ArrowLight_Init,
|
||||
(ActorFunc)ArrowLight_Destroy,
|
||||
(ActorFunc)ArrowLight_Update,
|
||||
(ActorFunc)ArrowLight_Draw
|
||||
};
|
||||
*/
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/func_80924300.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/ArrowLight_Init.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/ArrowLight_Destroy.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/func_809243AC.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/func_809244A0.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/func_809244F8.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/func_809246C4.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/ArrowLight_Update.asm")
|
||||
|
||||
GLOBAL_ASM("asm/non_matchings/ovl_Arrow_Light_0x80924300/ArrowLight_Draw.asm")
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user