mirror of
https://github.com/izzy2lost/2ship2harkinian-Android.git
synced 2026-06-19 01:20:08 -07:00
C file for Fishing, some changes to collider scripts, a few minor cleanups (#210)
* Improve match in EnFirefly_Draw * Vestigial fishing files, add enums * Improve scripts, add ColChkInfo one * Some minor actor cleanup (static etc) * C file for Fishing, remove some local vars from variables.h * Remove comma and format * Newline * Review suggestions
This commit is contained in:
@@ -320,10 +320,10 @@ void func_800A640C(EnItem00* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
Color_RGBA8 D_801ADF10 = { 0xFF, 0xFF, 0x7F, 0x00 };
|
||||
Color_RGBA8 D_801ADF14 = { 0xFF, 0xFF, 0xFF, 0x00 };
|
||||
Vec3f D_801ADF18 = { 0.0f, 0.1f, 0.0f };
|
||||
Vec3f D_801ADF24 = { 0.0f, 0.01f, 0.0f };
|
||||
static Color_RGBA8 D_801ADF10 = { 255, 255, 127, 0 };
|
||||
static Color_RGBA8 D_801ADF14 = { 255, 255, 255, 0 };
|
||||
static Vec3f D_801ADF18 = { 0.0f, 0.1f, 0.0f };
|
||||
static Vec3f D_801ADF24 = { 0.0f, 0.01f, 0.0f };
|
||||
|
||||
void func_800A6650(EnItem00* this, GlobalContext* globalCtx) {
|
||||
u32 pad;
|
||||
|
||||
@@ -24,7 +24,7 @@ const ActorInit Arms_Hook_InitVars = {
|
||||
(ActorFunc)ArmsHook_Draw,
|
||||
};
|
||||
|
||||
ColliderQuadInit D_808C1BC0 = {
|
||||
static ColliderQuadInit D_808C1BC0 = {
|
||||
{
|
||||
COLTYPE_NONE,
|
||||
AT_ON | AT_TYPE_PLAYER,
|
||||
@@ -44,13 +44,6 @@ ColliderQuadInit D_808C1BC0 = {
|
||||
{ { { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f }, { 0.0f, 0.0f, 0.0f } } },
|
||||
};
|
||||
|
||||
Vec3f D_808C1C10 = { 0.0f, 0.0f, 0.0f };
|
||||
Vec3f D_808C1C1C = { 0.0f, 0.0f, 900.0f };
|
||||
Vec3f D_808C1C28 = { 0.0f, 500.0f, -3000.0f };
|
||||
Vec3f D_808C1C34 = { 0.0f, -500.0f, -3000.0f };
|
||||
Vec3f D_808C1C40 = { 0.0f, 500.0f, 0.0f };
|
||||
Vec3f D_808C1C4C = { 0.0f, -500.0f, 0.0f };
|
||||
|
||||
extern Gfx D_0601D960[];
|
||||
|
||||
void ArmsHook_SetupAction(ArmsHook* this, ArmsHookActionFunc actionFunc) {
|
||||
@@ -285,6 +278,13 @@ void ArmsHook_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
this->unk1EC = this->unk1E0;
|
||||
}
|
||||
|
||||
static Vec3f D_808C1C10 = { 0.0f, 0.0f, 0.0f };
|
||||
static Vec3f D_808C1C1C = { 0.0f, 0.0f, 900.0f };
|
||||
static Vec3f D_808C1C28 = { 0.0f, 500.0f, -3000.0f };
|
||||
static Vec3f D_808C1C34 = { 0.0f, -500.0f, -3000.0f };
|
||||
static Vec3f D_808C1C40 = { 0.0f, 500.0f, 0.0f };
|
||||
static Vec3f D_808C1C4C = { 0.0f, -500.0f, 0.0f };
|
||||
|
||||
void ArmsHook_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ArmsHook* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
@@ -92,16 +92,18 @@ static ColliderJntSphInit sJntSphInit = {
|
||||
sJntSphElementsInit,
|
||||
};
|
||||
|
||||
Vec3f eyeSparkleSpawnPositions[][2] = { { { -215.0f, 139.0f, 50.0f }, { -193.0f, 139.0f, 50.0f } },
|
||||
static Vec3f eyeSparkleSpawnPositions[][2] = {
|
||||
{ { -215.0f, 139.0f, 50.0f }, { -193.0f, 139.0f, 50.0f } },
|
||||
|
||||
{ { -125.0f, 139.0f, 50.0f }, { -103.0f, 139.0f, 50.0f } },
|
||||
{ { -125.0f, 139.0f, 50.0f }, { -103.0f, 139.0f, 50.0f } },
|
||||
|
||||
{ { 103.0f, 139.0f, 50.0f }, { 125.0f, 139.0f, 50.0f } },
|
||||
{ { 103.0f, 139.0f, 50.0f }, { 125.0f, 139.0f, 50.0f } },
|
||||
|
||||
{ { 193.0f, 139.0f, 50.0f }, { 215.0f, 139.0f, 50.0f } } };
|
||||
{ { 193.0f, 139.0f, 50.0f }, { 215.0f, 139.0f, 50.0f } },
|
||||
};
|
||||
|
||||
Color_RGBA8 primColor = { 0xFF, 0xFF, 0xFF, 0x00 };
|
||||
Color_RGBA8 envColor = { 0x00, 128, 128, 0x00 };
|
||||
static Color_RGBA8 primColor = { 255, 255, 255, 0 };
|
||||
static Color_RGBA8 envColor = { 0, 128, 128, 0 };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 2000, ICHAIN_CONTINUE),
|
||||
|
||||
@@ -788,13 +788,13 @@ void EnFirefly_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
gSPDisplayList(gfx, &sSetupDL[150]);
|
||||
|
||||
if (this->currentType == KEESE_FIRE) {
|
||||
gDPSetEnvColor(gfx + 1, 0, 0, 0, 0);
|
||||
gDPSetEnvColor(&gfx[1], 0, 0, 0, 0);
|
||||
} else {
|
||||
gDPSetEnvColor(gfx + 1, 0, 0, 0, 255);
|
||||
gDPSetEnvColor(&gfx[1], 0, 0, 0, 255);
|
||||
}
|
||||
|
||||
gfx = SkelAnime_Draw2(globalCtx, this->skelAnime.skeleton, this->skelAnime.limbDrawTbl, EnFirefly_OverrideLimbDraw,
|
||||
EnFirefly_PostLimbDraw, &this->actor, gfx + 2);
|
||||
EnFirefly_PostLimbDraw, &this->actor, &gfx[2]);
|
||||
if (this->isInvisible) {
|
||||
POLY_XLU_DISP = gfx;
|
||||
} else {
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
ovl_En_Fishing
|
||||
z_en_fishing.c
|
||||
@@ -0,0 +1,122 @@
|
||||
/*
|
||||
* File: z_en_fishing.c
|
||||
* Overlay: ovl_En_Fishing
|
||||
* Description: Fishing
|
||||
*/
|
||||
|
||||
#include "z_en_fishing.h"
|
||||
|
||||
#define FLAGS 0x00000010
|
||||
|
||||
#define THIS ((EnFishing*)thisx)
|
||||
|
||||
void EnFishing_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFishing_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFishing_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void EnFishing_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
/*
|
||||
const ActorInit En_Fishing_InitVars = {
|
||||
ACTOR_EN_FISHING,
|
||||
ACTORCAT_NPC,
|
||||
FLAGS,
|
||||
OBJECT_FISH,
|
||||
sizeof(EnFishing),
|
||||
(ActorFunc)EnFishing_Init,
|
||||
(ActorFunc)EnFishing_Destroy,
|
||||
(ActorFunc)EnFishing_Update,
|
||||
(ActorFunc)EnFishing_Draw,
|
||||
};
|
||||
*/
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FC6C0.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FC770.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FC790.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FC8B8.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FC964.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FCABC.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FCC0C.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FCDBC.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FCF60.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FD054.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/EnFishing_Init.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/EnFishing_Destroy.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FDCDC.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FE3F8.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FEE1C.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FEF70.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FF064.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FF5E0.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FF750.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FFC44.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_808FFF3C.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80900228.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80900A04.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80901480.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_809033F0.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_809036BC.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_809038A4.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80903C60.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80903E20.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/EnFishing_Update.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80908554.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80908674.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_809086B4.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80908734.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/EnFishing_Draw.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_809089B8.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80908A64.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80908B4C.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80908E08.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80909234.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80909AD0.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_80909CC0.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_8090AB6C.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_8090C884.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_8090C8BC.asm")
|
||||
|
||||
#pragma GLOBAL_ASM("./asm/non_matchings/overlays/ovl_En_Fishing_0x808FC6C0/func_8090C96C.asm")
|
||||
@@ -0,0 +1,17 @@
|
||||
#ifndef Z_EN_FISHING_H
|
||||
#define Z_EN_FISHING_H
|
||||
|
||||
#include "global.h"
|
||||
|
||||
struct EnFishing;
|
||||
|
||||
typedef void (*EnFishingActionFunc)(struct EnFishing*, GlobalContext*);
|
||||
|
||||
typedef struct EnFishing {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x404];
|
||||
} EnFishing; // size = 0x548
|
||||
|
||||
extern const ActorInit En_Fishing_InitVars;
|
||||
|
||||
#endif // Z_EN_FISHING_H
|
||||
@@ -141,9 +141,7 @@ static ColliderJntSphInit sJntSphInit = {
|
||||
sJntSphElementsInit,
|
||||
};
|
||||
|
||||
CollisionCheckInfoInit2 sColChkInfoInit2 = {
|
||||
0, 0, 0, 0, MASS_HEAVY,
|
||||
};
|
||||
static CollisionCheckInfoInit2 sColChkInfoInit2 = { 0, 0, 0, 0, MASS_HEAVY };
|
||||
|
||||
static DamageTable sDamageTable = {
|
||||
0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
|
||||
|
||||
@@ -56,6 +56,8 @@ static DamageTable sDamageTable = {
|
||||
0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01,
|
||||
};
|
||||
|
||||
extern Gfx D_06000390[];
|
||||
|
||||
s32 EnJcMato_CheckForHit(EnJcMato* this, GlobalContext* globalCtx) {
|
||||
this->collider.dim.worldSphere.center.x = this->pos.x;
|
||||
this->collider.dim.worldSphere.center.y = this->pos.y;
|
||||
@@ -122,8 +124,7 @@ void EnJcMato_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
}
|
||||
|
||||
extern Gfx D_06000390[];
|
||||
Vec3f movement = { 0.0f, -2500.0f, 0.0f };
|
||||
static Vec3f movement = { 0.0f, -2500.0f, 0.0f };
|
||||
|
||||
void EnJcMato_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
EnJcMato* this = THIS;
|
||||
|
||||
@@ -71,7 +71,6 @@ static Gfx* sLightswitchFaceGfx[] = {
|
||||
};
|
||||
|
||||
static Color_RGBA8 sLightswitchEffectPrimColor = { 255, 255, 160, 160 };
|
||||
|
||||
static Color_RGBA8 sLightswitchEffectEnvColor = { 255, 0, 0, 0 };
|
||||
|
||||
static InitChainEntry sInitChain[] = {
|
||||
|
||||
Reference in New Issue
Block a user