mirror of https://github.com/zeldaret/mm.git
Obj_Tokei_Turret OK (#820)
* actor fully matched
* named collision parameters]
* fixed spec reloc.o
* Addressing Review Comments!
* Addressing Additional Review Comments
* fixing enum names
Co-authored-by: MrPolymorph <{ID}+{username}@users.noreply.github.com>
This commit is contained in:
parent
b3104f898b
commit
e3c0c5c3fa
|
|
@ -1,17 +1,18 @@
|
|||
<Root>
|
||||
<!-- Object for the turret in South Clock Town that the carpenters build during the 3 day period. -->
|
||||
<File Name="object_tokei_turret" Segment="6">
|
||||
<Texture Name="object_tokei_turret_TLUT_000000" OutName="tlut_000000" Format="rgba16" Width="4" Height="4" Offset="0x0" />
|
||||
<Texture Name="object_tokei_turret_Tex_000020" OutName="tex_000020" Format="ci4" Width="64" Height="64" Offset="0x20" />
|
||||
<Texture Name="object_tokei_turret_Tex_000820" OutName="tex_000820" Format="rgba16" Width="32" Height="32" Offset="0x820" />
|
||||
<Texture Name="object_tokei_turret_Tex_001020" OutName="tex_001020" Format="rgba16" Width="16" Height="32" Offset="0x1020" />
|
||||
<Texture Name="object_tokei_turret_Tex_001420" OutName="tex_001420" Format="rgba16" Width="128" Height="16" Offset="0x1420" />
|
||||
<DList Name="object_tokei_turret_DL_002500" Offset="0x2500" />
|
||||
<DList Name="object_tokei_turret_DL_002508" Offset="0x2508" />
|
||||
<Collision Name="object_tokei_turret_Colheader_0026A0" Offset="0x26A0" />
|
||||
<DList Name="object_tokei_turret_DL_002A80" Offset="0x2A80" />
|
||||
<DList Name="object_tokei_turret_DL_002A88" Offset="0x2A88" />
|
||||
<Collision Name="object_tokei_turret_Colheader_002D80" Offset="0x2D80" />
|
||||
<DList Name="object_tokei_turret_DL_003030" Offset="0x3030" />
|
||||
<DList Name="object_tokei_turret_DL_003038" Offset="0x3038" />
|
||||
<Texture Name="gClockTownTurretTLUT" OutName="clock_town_turret_tlut" Format="rgba16" Width="4" Height="4" Offset="0x0" />
|
||||
<Texture Name="gClockTownTurretTextTex" OutName="clock_town_turret_text" Format="ci4" Width="64" Height="64" Offset="0x20" />
|
||||
<Texture Name="gClockTownTurretFabricTex" OutName="clock_town_turret_fabric" Format="rgba16" Width="32" Height="32" Offset="0x820" />
|
||||
<Texture Name="gClockTownTurretWoodTex" OutName="clock_town_turret_wood" Format="rgba16" Width="16" Height="32" Offset="0x1020" />
|
||||
<Texture Name="gClockTownFlagsTex" OutName="clock_town_flags" Format="rgba16" Width="128" Height="16" Offset="0x1420" />
|
||||
<DList Name="gClockTownTurretEmpty0DL" Offset="0x2500" />
|
||||
<DList Name="gClockTownTurretPlatformBaseDL" Offset="0x2508" />
|
||||
<Collision Name="gClockTownTurretBaseCol" Offset="0x26A0" />
|
||||
<DList Name="gClockTownTurretEmpty1DL" Offset="0x2A80" />
|
||||
<DList Name="gClockTownTurretPlatformTopDL" Offset="0x2A88" />
|
||||
<Collision Name="gClockTownTurretPlatformCol" Offset="0x2D80" />
|
||||
<DList Name="gClockTownTurretEmpty2DL" Offset="0x3030" />
|
||||
<DList Name="gClockTownFlagsDL" Offset="0x3038" />
|
||||
</File>
|
||||
</Root>
|
||||
|
|
|
|||
3
spec
3
spec
|
|
@ -4211,8 +4211,7 @@ beginseg
|
|||
name "ovl_Obj_Tokei_Turret"
|
||||
compress
|
||||
include "build/src/overlays/actors/ovl_Obj_Tokei_Turret/z_obj_tokei_turret.o"
|
||||
include "build/data/ovl_Obj_Tokei_Turret/ovl_Obj_Tokei_Turret.data.o"
|
||||
include "build/data/ovl_Obj_Tokei_Turret/ovl_Obj_Tokei_Turret.reloc.o"
|
||||
include "build/src/overlays/actors/ovl_Obj_Tokei_Turret/ovl_Obj_Tokei_Turret_reloc.o"
|
||||
endseg
|
||||
|
||||
beginseg
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include "z_obj_tokei_turret.h"
|
||||
#include "objects/object_tokei_turret/object_tokei_turret.h"
|
||||
|
||||
#define FLAGS 0x00000000
|
||||
|
||||
|
|
@ -15,7 +16,6 @@ void ObjTokeiTurret_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
|||
void ObjTokeiTurret_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void ObjTokeiTurret_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
#if 0
|
||||
const ActorInit Obj_Tokei_Turret_InitVars = {
|
||||
ACTOR_OBJ_TOKEI_TURRET,
|
||||
ACTORCAT_BG,
|
||||
|
|
@ -28,23 +28,59 @@ const ActorInit Obj_Tokei_Turret_InitVars = {
|
|||
(ActorFunc)ObjTokeiTurret_Draw,
|
||||
};
|
||||
|
||||
// static InitChainEntry sInitChain[] = {
|
||||
static InitChainEntry D_80B91EC0[] = {
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneForward, 1200, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#endif
|
||||
void ObjTokeiTurret_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
s32 pad;
|
||||
ObjTokeiTurret* this = THIS;
|
||||
s32 tier;
|
||||
|
||||
extern InitChainEntry D_80B91EC0[];
|
||||
tier = OBJ_TOKEI_TURRET_TIER_TYPE(thisx);
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna, 0);
|
||||
|
||||
extern UNK_TYPE D_060026A0;
|
||||
extern UNK_TYPE D_06002A88;
|
||||
if ((tier == TURRET_TIER_BASE) || (tier == TURRET_TIER_TOP)) {
|
||||
this->dyna.actor.uncullZoneDownward = this->dyna.actor.uncullZoneScale = 240.0f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Tokei_Turret/ObjTokeiTurret_Init.s")
|
||||
if (tier == TURRET_TIER_BASE) {
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &gClockTownTurretBaseCol);
|
||||
} else {
|
||||
DynaPolyActor_LoadMesh(globalCtx, &this->dyna, &gClockTownTurretPlatformCol);
|
||||
}
|
||||
} else {
|
||||
this->dyna.actor.uncullZoneDownward = this->dyna.actor.uncullZoneScale = 1300.0;
|
||||
}
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Tokei_Turret/ObjTokeiTurret_Destroy.s")
|
||||
void ObjTokeiTurret_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjTokeiTurret* this = THIS;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Tokei_Turret/ObjTokeiTurret_Update.s")
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Tokei_Turret/ObjTokeiTurret_Draw.s")
|
||||
void ObjTokeiTurret_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void ObjTokeiTurret_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
ObjTokeiTurret* this = THIS;
|
||||
Gfx* gfx;
|
||||
|
||||
if (OBJ_TOKEI_TURRET_TIER_TYPE(thisx) == TURRET_TIER_TOP) {
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx);
|
||||
|
||||
gfx = POLY_OPA_DISP;
|
||||
gSPDisplayList(gfx++, &sSetupDL[6 * 25]);
|
||||
gSPMatrix(gfx++, Matrix_NewMtx(globalCtx->state.gfxCtx), G_MTX_MODELVIEW | G_MTX_LOAD);
|
||||
gSPDisplayList(gfx++, gClockTownTurretPlatformTopDL);
|
||||
POLY_OPA_DISP = gfx;
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx);
|
||||
} else if (OBJ_TOKEI_TURRET_TIER_TYPE(thisx) == TURRET_TIER_BASE) {
|
||||
Gfx_DrawDListOpa(globalCtx, gClockTownTurretPlatformBaseDL);
|
||||
} else {
|
||||
Gfx_DrawDListOpa(globalCtx, gClockTownFlagsDL);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,11 +3,17 @@
|
|||
|
||||
#include "global.h"
|
||||
|
||||
#define OBJ_TOKEI_TURRET_TIER_TYPE(thisx) ((thisx)->params & 3)
|
||||
|
||||
typedef enum {
|
||||
/* 0 */ TURRET_TIER_BASE,
|
||||
/* 1 */ TURRET_TIER_TOP,
|
||||
} TurretTierType;
|
||||
|
||||
struct ObjTokeiTurret;
|
||||
|
||||
typedef struct ObjTokeiTurret {
|
||||
/* 0x000 */ Actor actor;
|
||||
/* 0x144 */ char unk_144[0x18];
|
||||
/* 0x000 */ DynaPolyActor dyna;
|
||||
} ObjTokeiTurret; // size = 0x15C
|
||||
|
||||
extern const ActorInit Obj_Tokei_Turret_InitVars;
|
||||
|
|
|
|||
|
|
@ -1627,14 +1627,6 @@ D_06001CB0 = 0x06001CB0;
|
|||
|
||||
D_06001400 = 0x06001400;
|
||||
|
||||
// ovl_Obj_Tokei_Turret
|
||||
|
||||
D_06002508 = 0x06002508;
|
||||
D_060026A0 = 0x060026A0;
|
||||
D_06002A88 = 0x06002A88;
|
||||
D_06002D80 = 0x06002D80;
|
||||
D_06003038 = 0x06003038;
|
||||
|
||||
// ovl_Obj_Toudai
|
||||
|
||||
D_060023B0 = 0x060023B0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue