Merge remote-tracking branch 'origin/main' into z_map_

This commit is contained in:
mzxrules
2023-10-13 16:51:15 -04:00
11 changed files with 444 additions and 52 deletions
+3 -2
View File
@@ -1,6 +1,7 @@
<Root>
<!-- Ring Of Fire used during Garo's encounters -->
<File Name="object_big_fwall" Segment="6">
<Texture Name="object_big_fwall_Tex_000000" OutName="tex_000000" Format="i8" Width="32" Height="64" Offset="0x0" />
<DList Name="object_big_fwall_DL_0009A0" Offset="0x9A0" /> <!-- Original name is "big_firewall_modelT" -->
<Texture Name="gRingOfFireTex" OutName="ring_of_fire" Format="i8" Width="32" Height="64" Offset="0x0" />
<DList Name="gRingOfFireDL" Offset="0x9A0" /> <!-- Original name is "big_firewall_modelT" -->
</File>
</Root>
+5 -4
View File
@@ -1,8 +1,9 @@
<Root>
<!-- Object for Lens of Truth Platform -->
<File Name="object_visiblock" Segment="6">
<DList Name="object_visiblock_DL_000140" Offset="0x140" />
<DList Name="object_visiblock_DL_0001E8" Offset="0x1E8" />
<Texture Name="object_visiblock_Tex_0001F0" OutName="tex_0001F0" Format="rgba16" Width="32" Height="32" Offset="0x1F0" />
<Collision Name="object_visiblock_Colheader_000AD0" Offset="0xAD0" />
<DList Name="gLensOfTruthPlatformDL" Offset="0x140" />
<DList Name="gLensOfTruthPlatformEmptyDL" Offset="0x1E8" />
<Texture Name="gLensOfTruthPlatformTex" OutName="lens_of_truth_platform" Format="rgba16" Width="32" Height="32" Offset="0x1F0" />
<Collision Name="gLensOfTruthPlatformCol" Offset="0xAD0" />
</File>
</Root>
+2 -4
View File
@@ -2079,8 +2079,7 @@ beginseg
name "ovl_Door_Spiral"
compress
include "build/src/overlays/actors/ovl_Door_Spiral/z_door_spiral.o"
include "build/data/ovl_Door_Spiral/ovl_Door_Spiral.data.o"
include "build/data/ovl_Door_Spiral/ovl_Door_Spiral.reloc.o"
include "build/src/overlays/actors/ovl_Door_Spiral/ovl_Door_Spiral_reloc.o"
endseg
beginseg
@@ -2108,8 +2107,7 @@ beginseg
name "ovl_Obj_Boyo"
compress
include "build/src/overlays/actors/ovl_Obj_Boyo/z_obj_boyo.o"
include "build/data/ovl_Obj_Boyo/ovl_Obj_Boyo.data.o"
include "build/data/ovl_Obj_Boyo/ovl_Obj_Boyo.reloc.o"
include "build/src/overlays/actors/ovl_Obj_Boyo/ovl_Obj_Boyo_reloc.o"
endseg
beginseg
@@ -21,8 +21,17 @@ void DoorSpiral_Destroy(Actor* thisx, PlayState* play);
void DoorSpiral_Update(Actor* thisx, PlayState* play);
void DoorSpiral_Draw(Actor* thisx, PlayState* play);
/*
const ActorInit Door_Spiral_InitVars = {
void DoorSpiral_SetupAction(DoorSpiral* this, DoorSpiralActionFunc actionFunc);
s32 func_809A2B70(DoorSpiral* this, PlayState* play);
u8 func_809A2BF8(PlayState* play);
f32 func_809A2E08(PlayState* play, DoorSpiral* this, f32 arg2, f32 arg3, f32 arg4);
void func_809A2DB0(DoorSpiral* this, PlayState* play);
void func_809A2FF8(DoorSpiral* this, PlayState* play);
void func_809A2DB0(DoorSpiral* this, PlayState* play);
void func_809A3098(DoorSpiral* this, PlayState* play);
s32 func_809A2EA0(DoorSpiral* this, PlayState* play);
ActorInit Door_Spiral_InitVars = {
ACTOR_DOOR_SPIRAL,
ACTORCAT_DOOR,
FLAGS,
@@ -31,30 +40,223 @@ const ActorInit Door_Spiral_InitVars = {
(ActorFunc)DoorSpiral_Init,
(ActorFunc)DoorSpiral_Destroy,
(ActorFunc)DoorSpiral_Update,
(ActorFunc)DoorSpiral_Draw
(ActorFunc)DoorSpiral_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2B60.s")
typedef struct {
/* 0x0 */ Gfx* dLists[2]; // represents a staircase up or down
/* 0x8 */ u32 unk_08;
/* 0x9 */ u8 unk_09;
/* 0xA */ u8 translateZ;
/* 0xB */ u8 unk_0B;
/* 0xC */ u8 unk_0C;
} SpiralInfo; // size = 0x10
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2B70.s")
SpiralInfo sSpiralInfoTable[] = {
{ { NULL, NULL }, 0, 130, 12, 50, 15 },
{ { gameplay_dangeon_keep_DL_0219E0, gameplay_dangeon_keep_DL_01D980 }, 0, 130, 12, 50, 15 },
{ { object_numa_obj_DL_004448, object_numa_obj_DL_0007A8 }, 0, 130, 12, 50, 15 },
{ { object_numa_obj_DL_0051B8, object_numa_obj_DL_0014C8 }, 0, 130, 12, 50, 15 },
{ { object_hakugin_obj_DL_009278, object_hakugin_obj_DL_006128 }, 0, 130, 12, 50, 15 },
{ { object_ikana_obj_DL_013EA8, object_ikana_obj_DL_012B70 }, 0, 130, 12, 50, 15 },
{ { object_ikninside_obj_DL_000EA0, object_ikninside_obj_DL_000590 }, 0, 130, 12, 50, 15 },
{ { object_danpei_object_DL_002110, object_danpei_object_DL_0012C0 }, 0, 130, 12, 50, 15 },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2BF8.s")
typedef struct {
/* 0x0 */ s16 objectId;
/* 0x2 */ u8 index;
} SpiralObjectInfo; // size = 0x4
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/DoorSpiral_Init.s")
SpiralObjectInfo sSpiralObjectInfoTable[] = {
{ GAMEPLAY_KEEP, 0 }, { GAMEPLAY_DANGEON_KEEP, 1 }, { OBJECT_NUMA_OBJ, 2 }, { OBJECT_HAKUGIN_OBJ, 4 },
{ OBJECT_IKANA_OBJ, 5 }, { OBJECT_DANPEI_OBJECT, 7 }, { OBJECT_IKNINSIDE_OBJ, 6 },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/DoorSpiral_Destroy.s")
typedef struct {
/* 0x0 */ s16 sceneId;
/* 0x2 */ u8 index;
} SpiralSceneInfo; // size = 0x4
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2DB0.s")
SpiralSceneInfo sSpiralSceneInfoTable[] = {
{ SCENE_MITURIN, 2 }, { SCENE_HAKUGIN, 3 }, { SCENE_INISIE_N, 4 }, { SCENE_INISIE_R, 4 },
{ SCENE_DANPEI2TEST, 5 }, { SCENE_IKNINSIDE, 6 }, { SCENE_CASTLE, 6 },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2E08.s")
static InitChainEntry sInitChain[] = {
ICHAIN_VEC3F(scale, 1, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 400, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 400, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2EA0.s")
void DoorSpiral_SetupAction(DoorSpiral* this, DoorSpiralActionFunc actionFunc) {
this->actionFunc = actionFunc;
this->unk14A = 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A2FF8.s")
s32 func_809A2B70(DoorSpiral* this, PlayState* play) {
SpiralObjectInfo* spiralObjectInfo = &sSpiralObjectInfoTable[this->unk147];
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/func_809A3098.s")
this->unk148 = spiralObjectInfo->index;
if ((this->unk148 == 7) || ((this->unk148 == 2) && play->roomCtx.curRoom.enablePosLights)) {
if (this->unk148 == 2) {
this->unk148 = 3;
}
this->actor.flags |= ACTOR_FLAG_10000000;
}
DoorSpiral_SetupAction(this, func_809A2FF8);
return 0;
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/DoorSpiral_Update.s")
u8 func_809A2BF8(PlayState* play) {
SpiralSceneInfo* spiralSceneInfo = sSpiralSceneInfoTable;
s32 i;
u8 var_v1;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Door_Spiral/DoorSpiral_Draw.s")
for (i = 0; i < ARRAY_COUNT(sSpiralSceneInfoTable); i++) {
if (play->sceneId == spiralSceneInfo->sceneId) {
break;
}
spiralSceneInfo++;
}
if (i < ARRAY_COUNT(sSpiralSceneInfoTable)) {
var_v1 = spiralSceneInfo->index;
} else {
var_v1 = (Object_GetSlot(&play->objectCtx, GAMEPLAY_DANGEON_KEEP) > OBJECT_SLOT_NONE) ? 1 : 0;
}
return var_v1;
}
void DoorSpiral_Init(Actor* thisx, PlayState* play) {
DoorSpiral* this = THIS;
s32 transitionId = DOOR_GET_TRANSITION_ID(thisx);
s8 objectSlot;
if (this->actor.room != play->transitionActors.list[transitionId].sides[0].room) {
Actor_Kill(&this->actor);
return;
}
Actor_ProcessInitChain(&this->actor, sInitChain);
this->type = DOORSPIRAL_GET_TYPE(thisx);
this->direction = DOORSPIRAL_GET_DIRECTION(thisx);
this->unk147 = func_809A2BF8(play);
objectSlot = Object_GetSlot(&play->objectCtx, sSpiralObjectInfoTable[this->unk147].objectId);
this->objectSlot = objectSlot;
if (objectSlot <= OBJECT_SLOT_NONE) {
Actor_Kill(&this->actor);
return;
}
DoorSpiral_SetupAction(this, func_809A2DB0);
Actor_SetFocus(&this->actor, 60.0f);
}
void DoorSpiral_Destroy(Actor* thisx, PlayState* play) {
s32 transitionId = DOOR_GET_TRANSITION_ID(thisx);
play->transitionActors.list[transitionId].id = -play->transitionActors.list[transitionId].id;
}
void func_809A2DB0(DoorSpiral* this, PlayState* play) {
if (Object_IsLoaded(&play->objectCtx, this->objectSlot)) {
this->actor.objectSlot = this->objectSlot;
func_809A2B70(this, play);
}
}
f32 func_809A2E08(PlayState* play, DoorSpiral* this, f32 arg2, f32 arg3, f32 arg4) {
Player* player = GET_PLAYER(play);
Vec3f point;
Vec3f offset;
point.x = player->actor.world.pos.x;
point.y = player->actor.world.pos.y + arg2;
point.z = player->actor.world.pos.z;
Actor_OffsetOfPointInActorCoords(&this->actor, &offset, &point);
if ((arg3 < fabsf(offset.x)) || (arg4 < fabsf(offset.y))) {
return FLT_MAX;
} else {
return offset.z;
}
}
s32 func_809A2EA0(DoorSpiral* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!Player_InCsMode(play)) {
SpiralInfo* spiralInfo = &sSpiralInfoTable[this->unk148];
f32 temp_fv0 = func_809A2E08(play, this, 0.0f, spiralInfo->unk_0B, spiralInfo->unk_0C);
if (fabsf(temp_fv0) < 64.0f) {
s16 var_v0 = player->actor.shape.rot.y - this->actor.shape.rot.y;
if (temp_fv0 > 0.0f) {
var_v0 = 0x8000 - var_v0;
}
if (ABS_ALT(var_v0) < 0x3000) {
return (temp_fv0 >= 0.0f) ? 1.0f : -1.0f;
}
}
}
return 0;
}
void func_809A2FF8(DoorSpiral* this, PlayState* play) {
Player* player;
u32 transitionId;
if (this->shouldClimb) {
DoorSpiral_SetupAction(this, func_809A3098);
} else if (func_809A2EA0(this, play) != 0) {
player = GET_PLAYER(play);
player->doorType = PLAYER_DOORTYPE_STAIRCASE;
player->doorDirection = this->direction;
player->doorActor = &this->actor;
transitionId = DOOR_GET_TRANSITION_ID(&this->actor);
player->doorNext = (play->transitionActors.list[transitionId].params >> 0xA);
func_80122F28(player);
}
}
void func_809A3098(DoorSpiral* this, PlayState* play) {
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & PLAYER_STATE1_20000000)) {
DoorSpiral_SetupAction(this, func_809A2DB0);
this->shouldClimb = false;
}
}
void DoorSpiral_Update(Actor* thisx, PlayState* play) {
DoorSpiral* this = THIS;
Player* player = GET_PLAYER(play);
if (!(player->stateFlags1 & (PLAYER_STATE1_40 | PLAYER_STATE1_80 | PLAYER_STATE1_400 | PLAYER_STATE1_10000000)) ||
(this->actionFunc == func_809A2DB0)) {
this->actionFunc(this, play);
}
}
void DoorSpiral_Draw(Actor* thisx, PlayState* play) {
s32 pad;
DoorSpiral* this = THIS;
if (this->actor.objectSlot == this->objectSlot) {
SpiralInfo* spiralInfo = &sSpiralInfoTable[this->unk148];
Gfx* dList = spiralInfo->dLists[this->direction];
if (dList != NULL) {
OPEN_DISPS(play->state.gfxCtx);
Gfx_SetupDL25_Opa(play->state.gfxCtx);
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_OPA_DISP++, spiralInfo->dLists[this->direction]);
CLOSE_DISPS(play->state.gfxCtx);
}
}
}
@@ -2,13 +2,25 @@
#define Z_DOOR_SPIRAL_H
#include "global.h"
#include "z64door.h"
struct DoorSpiral;
typedef void (*DoorSpiralActionFunc)(struct DoorSpiral*, PlayState*);
#define DOORSPIRAL_GET_TYPE(thisx) (((thisx)->params >> 8) & 0x3)
#define DOORSPIRAL_GET_DIRECTION(thisx) (((thisx)->params >> 7) & 0x1)
typedef struct DoorSpiral {
/* 0x000 */ Actor actor;
/* 0x144 */ u8 shouldClimb;
/* 0x145 */ UNK_TYPE1 unk_145[0xB];
/* 0x145 */ s8 type;
/* 0x146 */ u8 direction; // represents a staircase up or down
/* 0x147 */ u8 unk147;
/* 0x148 */ u8 unk148;
/* 0x149 */ s8 objectSlot;
/* 0x14A */ s8 unk14A;
/* 0x14C */ DoorSpiralActionFunc actionFunc;
} DoorSpiral; // size = 0x150
#endif // Z_DOOR_SPIRAL_H
@@ -199,7 +199,7 @@ void EnEncount3_Draw(Actor* thisx, PlayState* play) {
Matrix_Scale(this->unk168, this->unk174, this->unk168, MTXMODE_APPLY);
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(play->state.gfxCtx), G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
gSPDisplayList(POLY_XLU_DISP++, object_big_fwall_DL_0009A0);
gSPDisplayList(POLY_XLU_DISP++, gRingOfFireDL);
Matrix_Pop();
CLOSE_DISPS(play->state.gfxCtx);
+180 -11
View File
@@ -1,4 +1,7 @@
#include "z_obj_boyo.h"
#include "overlays/actors/ovl_En_Kaizoku/z_en_kaizoku.h"
#include "overlays/actors/ovl_En_Bom/z_en_bom.h"
#include "objects/object_boyo/object_boyo.h"
#define FLAGS (ACTOR_FLAG_10)
@@ -9,7 +12,11 @@ void ObjBoyo_Destroy(Actor* thisx, PlayState* play2);
void ObjBoyo_Update(Actor* thisx, PlayState* play2);
void ObjBoyo_Draw(Actor* thisx, PlayState* play);
/*
void ObjBoyo_PushPlayer(ObjBoyo* this, Actor* actor);
void ObjBoyo_PushPirate(ObjBoyo* this, Actor* actor);
void ObjBoyo_ExplodeBomb(ObjBoyo* this, Actor* actor);
Actor* ObjBoyo_FindCollidedActor(ObjBoyo* this, PlayState* play, s32* index);
const ActorInit Obj_Boyo_InitVars = {
ACTOR_OBJ_BOYO,
ACTORCAT_PROP,
@@ -19,22 +26,184 @@ const ActorInit Obj_Boyo_InitVars = {
(ActorFunc)ObjBoyo_Init,
(ActorFunc)ObjBoyo_Destroy,
(ActorFunc)ObjBoyo_Update,
(ActorFunc)ObjBoyo_Draw
(ActorFunc)ObjBoyo_Draw,
};
*/
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/ObjBoyo_Init.s")
typedef void (*ObjBoyoCollisionHandler)(ObjBoyo* this, Actor* actor);
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/ObjBoyo_Destroy.s")
typedef struct ObjBoyoUnkStruct {
/* 0x0 */ s16 id;
/* 0x4 */ ObjBoyoCollisionHandler colHandler;
} ObjBoyoUnkStruct; // size = 0x8
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/func_809A5DC0.s")
static ColliderCylinderInit sCylinderInit = {
{
COLTYPE_NONE,
AT_NONE,
AC_TYPE_PLAYER | AC_HARD | AC_ON,
OC1_TYPE_2 | OC1_TYPE_1 | OC1_TYPE_PLAYER | OC1_ON,
OC2_TYPE_2,
COLSHAPE_CYLINDER,
},
{
ELEMTYPE_UNK0,
{ 0x00000000, 0x00, 0x00 },
{ 0x01CBFFBE, 0x00, 0x00 },
TOUCH_NONE,
BUMP_ON,
OCELEM_ON,
},
{
60,
140,
0,
{ 0, 0, 0 },
},
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/func_809A5DE0.s")
static InitChainEntry sInitChain[] = {
ICHAIN_F32(uncullZoneForward, 4000, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneScale, 300, ICHAIN_CONTINUE),
ICHAIN_F32(uncullZoneDownward, 300, ICHAIN_CONTINUE),
ICHAIN_VEC3F_DIV1000(scale, 100, ICHAIN_STOP),
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/func_809A5E14.s")
static ObjBoyoUnkStruct sCollisionHandlers[] = {
{ ACTOR_PLAYER, ObjBoyo_PushPlayer },
{ ACTOR_EN_KAIZOKU, ObjBoyo_PushPirate },
{ ACTOR_EN_BOM, ObjBoyo_ExplodeBomb },
};
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/func_809A5E24.s")
void ObjBoyo_Init(Actor* thisx, PlayState* play) {
ObjBoyo* this = THIS;
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/ObjBoyo_Update.s")
Actor_ProcessInitChain(&this->actor, sInitChain);
Collider_InitCylinder(play, &this->collider);
Collider_SetCylinder(play, &this->collider, &this->actor, &sCylinderInit);
Collider_UpdateCylinder(&this->actor, &this->collider);
this->actor.colChkInfo.mass = MASS_IMMOVABLE;
this->animatedMaterial = Lib_SegmentedToVirtual(&object_boyo_Matanimheader_000E88);
}
#pragma GLOBAL_ASM("asm/non_matchings/overlays/ovl_Obj_Boyo/ObjBoyo_Draw.s")
void ObjBoyo_Destroy(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
ObjBoyo* this = THIS;
Collider_DestroyCylinder(play, &this->collider);
}
void ObjBoyo_PushPlayer(ObjBoyo* this, Actor* actor) {
Player* player = (Player*)actor;
player->pushedSpeed = 30.0f;
player->pushedYaw = this->actor.yawTowardsPlayer;
}
void ObjBoyo_PushPirate(ObjBoyo* this, Actor* actor) {
EnKaizoku* kaizoku = (EnKaizoku*)actor;
kaizoku->unk_2F0 = 30.0f;
kaizoku->unk_2F4 = Actor_WorldYawTowardActor(&this->actor, &kaizoku->picto.actor);
}
void ObjBoyo_ExplodeBomb(ObjBoyo* this, Actor* actor) {
EnBom* bom = (EnBom*)actor;
bom->timer = 0;
}
/*
* Find the Actor we collided with.
*/
Actor* ObjBoyo_FindCollidedActor(ObjBoyo* this, PlayState* play, s32* index) {
Actor* collidedActor;
ObjBoyoUnkStruct* iter;
s32 i;
if (this->collider.base.ocFlags2 & OC2_HIT_PLAYER) {
*index = 0;
return &GET_PLAYER(play)->actor;
}
iter = sCollisionHandlers + 1;
if (this->collider.base.ocFlags1 & OC1_HIT) {
collidedActor = this->collider.base.oc;
for (i = 1; i < 3; i++) {
if (iter->id == collidedActor->id) {
*index = i;
return collidedActor;
}
iter++;
}
}
return NULL;
}
void ObjBoyo_Update(Actor* thisx, PlayState* play2) {
PlayState* play = play2;
ObjBoyo* this = THIS;
Actor* collidedActor;
s32 index;
collidedActor = ObjBoyo_FindCollidedActor(this, play, &index);
if (collidedActor != NULL) {
sCollisionHandlers[index].colHandler(this, collidedActor);
// TODO: find out what all of these are.
this->unk194 = 0x64;
this->unk196 = 3;
this->unk198 = 0.01f;
this->unk19C = 0.03f;
this->unk1A4 = 0x3F40;
this->unk1A6 = 0x7D0;
this->unk1A8 = 0;
this->unk1A0 = 0.03f;
this->unk1AA = 0x2DF7;
this->unk1AC = 0x258;
}
if (this->unk194 > 0) {
// compute new scaling
// this computation might help finding what those values are.
this->unk194 -= this->unk196;
this->unk1AA += this->unk1AC;
this->unk1A8 += this->unk1AA;
this->actor.scale.x = this->actor.scale.z =
(Math_CosS(this->unk1A8 + this->unk1A4) * (f32)this->unk194 * this->unk19C * this->unk198) + 0.1f;
this->actor.scale.y =
(Math_CosS(this->unk1A8 + this->unk1A6) * (f32)this->unk194 * this->unk1A0 * this->unk198) + 0.1f;
} else {
Actor_SetScale(&this->actor, 0.1f);
if (this->collider.base.acFlags & AC_HIT) {
// TODO: find out what all of these are.
this->unk194 = 0x1E;
this->unk196 = 2;
this->unk198 = 0.033333335f;
this->unk19C = 0.012f;
this->unk1A0 = 0.006f;
this->unk1A4 = 0x3F40;
this->unk1A6 = 0x7D0;
this->unk1A8 = 0;
this->unk1AA = 0x3A98;
this->unk1AC = 0x640;
}
}
this->collider.base.acFlags &= ~AC_HIT;
this->collider.base.ocFlags1 &= ~OC1_HIT;
this->collider.base.ocFlags2 &= ~OC2_HIT_PLAYER;
CollisionCheck_SetOC(play, &play->colChkCtx, &this->collider.base);
if (this->actor.xzDistToPlayer < 2000.0f) {
CollisionCheck_SetAC(play, &play->colChkCtx, &this->collider.base);
}
}
void ObjBoyo_Draw(Actor* thisx, PlayState* play) {
ObjBoyo* this = THIS;
AnimatedMat_Draw(play, this->animatedMaterial);
Gfx_DrawDListOpa(play, object_boyo_DL_000300);
}
+13 -3
View File
@@ -3,11 +3,21 @@
#include "global.h"
struct ObjBoyo;
typedef struct ObjBoyo {
/* 0x000 */ Actor actor;
/* 0x144 */ char unk_144[0x6C];
/* 0x144 */ ColliderCylinder collider;
/* 0x190 */ AnimatedMaterial* animatedMaterial;
/* 0x194 */ s16 unk194;
/* 0x196 */ s16 unk196;
/* 0x198 */ f32 unk198;
/* 0x19C */ f32 unk19C;
/* 0x1A0 */ f32 unk1A0;
/* 0x1A4 */ s16 unk1A4;
/* 0x1A6 */ s16 unk1A6;
/* 0x1A8 */ s16 unk1A8;
/* 0x1AA */ s16 unk1AA;
/* 0x1AC */ s16 unk1AC;
/* 0x1AE */ s16 unk1AE;
} ObjBoyo; // size = 0x1B0
#endif // Z_OBJ_BOYO_H
@@ -39,7 +39,7 @@ void ObjVisiblock_Init(Actor* thisx, PlayState* play) {
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
DynaPolyActor_Init(&this->dyna, 0);
DynaPolyActor_LoadMesh(play, &this->dyna, &object_visiblock_Colheader_000AD0);
DynaPolyActor_LoadMesh(play, &this->dyna, &gLensOfTruthPlatformCol);
}
void ObjVisiblock_Destroy(Actor* thisx, PlayState* play) {
@@ -49,5 +49,5 @@ void ObjVisiblock_Destroy(Actor* thisx, PlayState* play) {
}
void ObjVisiblock_Draw(Actor* thisx, PlayState* play) {
Gfx_DrawDListXlu(play, object_visiblock_DL_000140);
Gfx_DrawDListXlu(play, gLensOfTruthPlatformDL);
}
+4 -4
View File
@@ -8743,10 +8743,10 @@
0x809A5B50:("ObjArmos_Draw",),
0x809A5D10:("ObjBoyo_Init",),
0x809A5D94:("ObjBoyo_Destroy",),
0x809A5DC0:("func_809A5DC0",),
0x809A5DE0:("func_809A5DE0",),
0x809A5E14:("func_809A5E14",),
0x809A5E24:("func_809A5E24",),
0x809A5DC0:("ObjBoyo_PushPlayer",),
0x809A5DE0:("ObjBoyo_PushPirate",),
0x809A5E14:("ObjBoyo_ExplodeBomb",),
0x809A5E24:("ObjBoyo_FindCollidedActor",),
0x809A5E98:("ObjBoyo_Update",),
0x809A610C:("ObjBoyo_Draw",),
0x809A6280:("EnGrasshopper_Init",),
+3 -4
View File
@@ -9347,10 +9347,9 @@
0x809A5BF0:("D_809A5BF0","f32","",0x4),
0x809A5BF4:("D_809A5BF4","f32","",0x4),
0x809A6150:("Obj_Boyo_InitVars","UNK_TYPE1","",0x1),
0x809A6170:("D_809A6170","UNK_TYPE1","",0x1),
0x809A619C:("D_809A619C","UNK_TYPE1","",0x1),
0x809A61B0:("D_809A61B0","UNK_TYPE1","",0x1),
0x809A61B4:("D_809A61B4","UNK_TYPE2","",0x2),
0x809A6170:("sCylinderInit","ColliderCylinderInit","",0x1),
0x809A619C:("sInitChain","InitChainEntry","[]",0x4),
0x809A61AC:("gCollisionHandling","ObjBoyoUnkStruct","[]",0x20),
0x809A61D0:("D_809A61D0","f32","",0x4),
0x809A61D4:("D_809A61D4","f32","",0x4),
0x809A61D8:("D_809A61D8","f32","",0x4),