mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-06 06:10:21 +00:00
Bg_Spot00_Hanebasi (Drawbridge) OK (#614)
* drawbridge progress * matched cursed draw functions * drawbridge OK * fix error that made it not OK * documentation improvements * format fix * update with new actor struct * Update src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> * Update src/overlays/actors/ovl_Bg_Spot00_Hanebasi/z_bg_spot00_hanebasi.c Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com> Co-authored-by: Zelllll <elijah@DESKTOP-NMP1I89.localdomain> Co-authored-by: Roman971 <32455037+Roman971@users.noreply.github.com>
This commit is contained in:
parent
dde70e3c66
commit
9b91229422
17 changed files with 317 additions and 1244 deletions
|
@ -1,3 +1,9 @@
|
|||
/*
|
||||
* File: z_bg_spot00_hanebasi.c
|
||||
* Overlay: ovl_Bg_Spot00_Hanebasi
|
||||
* Description: Hyrule Field Drawbridge and Torches
|
||||
*/
|
||||
|
||||
#include "z_bg_spot00_hanebasi.h"
|
||||
#include "objects/gameplay_keep/gameplay_keep.h"
|
||||
|
||||
|
@ -5,17 +11,26 @@
|
|||
|
||||
#define THIS ((BgSpot00Hanebasi*)thisx)
|
||||
|
||||
typedef enum {
|
||||
/* -1 */ DT_DRAWBRIDGE = -1,
|
||||
/* 0 */ DT_CHAIN_1,
|
||||
/* 1 */ DT_CHAIN_2
|
||||
} DrawbridgeType;
|
||||
|
||||
void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgSpot00Hanebasi_Destroy(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx);
|
||||
void BgSpot00Hanebasi_Draw(Actor* thisx, GlobalContext* globalCtx);
|
||||
|
||||
extern UNK_TYPE D_060000C0;
|
||||
extern UNK_TYPE D_06000280;
|
||||
extern UNK_TYPE D_06000430;
|
||||
extern UNK_TYPE D_060005E0;
|
||||
void BgSpot00Hanebasi_DrawBridgeWait(BgSpot00Hanebasi* this, GlobalContext* globalCtx);
|
||||
void BgSpot00Hanebasi_DrawBridgeRiseAndFall(BgSpot00Hanebasi* this, GlobalContext* globalCtx);
|
||||
void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, GlobalContext* globalCtx);
|
||||
|
||||
extern Gfx D_060000C0[]; // bridge chains
|
||||
extern CollisionHeader D_06000280; // chains collision
|
||||
extern Gfx D_06000430[]; // drawbridge
|
||||
extern CollisionHeader D_060005E0; // drawbridge collision
|
||||
|
||||
/*
|
||||
const ActorInit Bg_Spot00_Hanebasi_InitVars = {
|
||||
ACTOR_BG_SPOT00_HANEBASI,
|
||||
ACTORCAT_BG,
|
||||
|
@ -27,21 +42,298 @@ const ActorInit Bg_Spot00_Hanebasi_InitVars = {
|
|||
(ActorFunc)BgSpot00Hanebasi_Update,
|
||||
(ActorFunc)BgSpot00Hanebasi_Draw,
|
||||
};
|
||||
*/
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Init.s")
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Destroy.s")
|
||||
static f32 sTorchFlameScale = 0.0f;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9BE8.s")
|
||||
static InitChainEntry sInitChain[] = {
|
||||
ICHAIN_F32(uncullZoneScale, 550, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneDownward, 2000, ICHAIN_CONTINUE),
|
||||
ICHAIN_F32(uncullZoneForward, 5000, ICHAIN_CONTINUE),
|
||||
ICHAIN_VEC3F_DIV1000(scale, 1000, ICHAIN_STOP),
|
||||
};
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D18.s")
|
||||
void BgSpot00Hanebasi_Init(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot00Hanebasi* this = THIS;
|
||||
s32 pad;
|
||||
Vec3f chainPos;
|
||||
CollisionHeader* colHeader = NULL;
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9D24.s")
|
||||
Actor_ProcessInitChain(&this->dyna.actor, sInitChain);
|
||||
DynaPolyActor_Init(&this->dyna.actor, 1);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808A9E58.s")
|
||||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
CollisionHeader_GetVirtual(&D_060005E0, &colHeader);
|
||||
} else {
|
||||
CollisionHeader_GetVirtual(&D_06000280, &colHeader);
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Update.s")
|
||||
this->dyna.bgId = DynaPoly_SetBgActor(globalCtx, &globalCtx->colCtx.dyna, &this->dyna.actor, colHeader);
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/func_808AA2B0.s")
|
||||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
if ((LINK_IS_ADULT) && (gSaveContext.sceneSetupIndex < 4)) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
return;
|
||||
}
|
||||
|
||||
#pragma GLOBAL_ASM("asm/non_matchings/overlays/actors/ovl_Bg_Spot00_Hanebasi/BgSpot00Hanebasi_Draw.s")
|
||||
if ((gSaveContext.sceneSetupIndex != 6) &&
|
||||
((gSaveContext.sceneSetupIndex == 4) || (gSaveContext.sceneSetupIndex == 5) ||
|
||||
((LINK_IS_CHILD) && (gSaveContext.nightFlag != 0)))) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
} else {
|
||||
this->dyna.actor.shape.rot.x = 0;
|
||||
}
|
||||
|
||||
if (gSaveContext.sceneSetupIndex != 6) {
|
||||
if ((CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) && (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) &&
|
||||
(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) && (!(gSaveContext.eventChkInf[8] & 1))) {
|
||||
this->dyna.actor.shape.rot.x = -0x4000;
|
||||
}
|
||||
}
|
||||
|
||||
chainPos.y =
|
||||
(10.0f * Math_CosS(this->dyna.actor.shape.rot.x)) - (Math_SinS(this->dyna.actor.shape.rot.x) * 400.0f);
|
||||
chainPos.z =
|
||||
(10.0f * Math_SinS(this->dyna.actor.shape.rot.x)) - (Math_CosS(this->dyna.actor.shape.rot.x) * 400.0f);
|
||||
chainPos.x =
|
||||
(158.0f * Math_CosS(this->dyna.actor.shape.rot.y)) + (Math_SinS(this->dyna.actor.shape.rot.y) * chainPos.z);
|
||||
chainPos.z = (-158.0f * Math_SinS(this->dyna.actor.shape.rot.y)) +
|
||||
(Math_CosS(this->dyna.actor.shape.rot.y) * chainPos.z);
|
||||
|
||||
if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_SPOT00_HANEBASI,
|
||||
this->dyna.actor.world.pos.x + chainPos.x, this->dyna.actor.world.pos.y + chainPos.y,
|
||||
this->dyna.actor.world.pos.z + chainPos.z,
|
||||
((this->dyna.actor.shape.rot.x == 0) ? 0 : 0xF020), this->dyna.actor.shape.rot.y, 0,
|
||||
DT_CHAIN_1) == NULL) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
}
|
||||
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawBridgeWait;
|
||||
this->destAngle = 40;
|
||||
} else if (this->dyna.actor.params == DT_CHAIN_1) {
|
||||
if (Actor_SpawnAsChild(&globalCtx->actorCtx, &this->dyna.actor, globalCtx, ACTOR_BG_SPOT00_HANEBASI,
|
||||
this->dyna.actor.world.pos.x - (Math_CosS(this->dyna.actor.shape.rot.y) * 316.0f),
|
||||
this->dyna.actor.world.pos.y,
|
||||
this->dyna.actor.world.pos.z + (Math_SinS(this->dyna.actor.shape.rot.y) * 316.0f),
|
||||
this->dyna.actor.shape.rot.x, this->dyna.actor.shape.rot.y, 0, DT_CHAIN_2) == NULL) {
|
||||
Actor_Kill(&this->dyna.actor);
|
||||
Actor_Kill(this->dyna.actor.parent);
|
||||
}
|
||||
|
||||
this->actionFunc = BgSpot00Hanebasi_SetTorchLightInfo;
|
||||
} else {
|
||||
this->actionFunc = BgSpot00Hanebasi_SetTorchLightInfo;
|
||||
}
|
||||
|
||||
if (this->dyna.actor.params >= DT_CHAIN_1) {
|
||||
this->lightNode = LightContext_InsertLight(globalCtx, &globalCtx->lightCtx, &this->lightInfo);
|
||||
Lights_PointGlowSetInfo(&this->lightInfo, ((this->dyna.actor.params == DT_CHAIN_1) ? 260.0f : -260.0f), 168,
|
||||
690, 255, 255, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_Destroy(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot00Hanebasi* this = THIS;
|
||||
|
||||
DynaPoly_DeleteBgActor(globalCtx, &globalCtx->colCtx.dyna, this->dyna.bgId);
|
||||
|
||||
if (this->dyna.actor.params >= DT_CHAIN_1) {
|
||||
LightContext_RemoveLight(globalCtx, &globalCtx->lightCtx, this->lightNode);
|
||||
}
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_DrawBridgeWait(BgSpot00Hanebasi* this, GlobalContext* globalCtx) {
|
||||
BgSpot00Hanebasi* child = (BgSpot00Hanebasi*)this->dyna.actor.child;
|
||||
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || (!(CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD))) ||
|
||||
(!(CHECK_QUEST_ITEM(QUEST_GORON_RUBY))) || (!(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE))) ||
|
||||
(gSaveContext.eventChkInf[8] & 1)) {
|
||||
if (this->dyna.actor.shape.rot.x != 0) {
|
||||
if (Flags_GetEnv(globalCtx, 0) || ((gSaveContext.sceneSetupIndex < 4) && (gSaveContext.nightFlag == 0))) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawBridgeRiseAndFall;
|
||||
this->destAngle = 0;
|
||||
child->destAngle = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
if (this) {} // required to match
|
||||
}
|
||||
|
||||
if ((this->dyna.actor.shape.rot.x == 0) && (gSaveContext.sceneSetupIndex < 4) && (LINK_IS_CHILD) &&
|
||||
(gSaveContext.nightFlag != 0)) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawBridgeRiseAndFall;
|
||||
this->destAngle = -0x4000;
|
||||
child->destAngle = -0xFE0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_DoNothing(BgSpot00Hanebasi* this, GlobalContext* globalCtx) {
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_DrawBridgeRiseAndFall(BgSpot00Hanebasi* this, GlobalContext* globalCtx) {
|
||||
BgSpot00Hanebasi* child;
|
||||
Actor* childsChild;
|
||||
s16 angle = 80;
|
||||
|
||||
if (Math_ScaledStepToS(&this->dyna.actor.shape, this->destAngle, 80)) {
|
||||
this->actionFunc = BgSpot00Hanebasi_DrawBridgeWait;
|
||||
}
|
||||
|
||||
if (this->dyna.actor.shape.rot.x >= -0x27D8) {
|
||||
child = this->dyna.actor.child;
|
||||
angle *= 0.4f;
|
||||
Math_ScaledStepToS(&child->dyna.actor.shape.rot.x, child->destAngle, angle);
|
||||
childsChild = child->dyna.actor.child;
|
||||
Math_ScaledStepToS(&childsChild->shape.rot.x, child->destAngle, angle);
|
||||
}
|
||||
|
||||
if (this->destAngle < 0) {
|
||||
if (this->actionFunc == BgSpot00Hanebasi_DrawBridgeWait) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE_STOP);
|
||||
} else {
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_CLOSE - SFX_FLAG);
|
||||
}
|
||||
} else {
|
||||
if (this->actionFunc == BgSpot00Hanebasi_DrawBridgeWait) {
|
||||
Audio_PlayActorSound2(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN_STOP);
|
||||
} else {
|
||||
func_8002F974(&this->dyna.actor, NA_SE_EV_BRIDGE_OPEN - SFX_FLAG);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_SetTorchLightInfo(BgSpot00Hanebasi* this, GlobalContext* globalCtx) {
|
||||
u8 lightColor = (u8)(Rand_ZeroOne() * 127.0f) + 128; // intensity of the red and green channels
|
||||
|
||||
Lights_PointGlowSetInfo(&this->lightInfo, (this->dyna.actor.params == DT_CHAIN_1) ? 260.0f : -260.0f,
|
||||
(5000.0f * sTorchFlameScale) + 128.0f, 690, lightColor, lightColor, 0,
|
||||
sTorchFlameScale * 37500.0f);
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_Update(Actor* thisx, GlobalContext* globalCtx) {
|
||||
BgSpot00Hanebasi* this = THIS;
|
||||
s32 pad;
|
||||
|
||||
this->actionFunc(this, globalCtx);
|
||||
|
||||
if (this->dyna.actor.params == DT_DRAWBRIDGE) {
|
||||
if (globalCtx->sceneNum == SCENE_SPOT00) {
|
||||
if ((CHECK_QUEST_ITEM(QUEST_KOKIRI_EMERALD)) && (CHECK_QUEST_ITEM(QUEST_GORON_RUBY)) &&
|
||||
(CHECK_QUEST_ITEM(QUEST_ZORA_SAPPHIRE)) && (!(gSaveContext.eventChkInf[8] & 1)) &&
|
||||
(gSaveContext.linkAge == 1)) {
|
||||
Player* player = PLAYER;
|
||||
|
||||
if ((player->actor.world.pos.x > -450.0f) && (player->actor.world.pos.x < 450.0f) &&
|
||||
(player->actor.world.pos.z > 1080.0f) && (player->actor.world.pos.z < 1700.0f) &&
|
||||
(!(Gameplay_InCsMode(globalCtx)))) {
|
||||
gSaveContext.eventChkInf[8] |= 1;
|
||||
Flags_SetEventChkInf(0x82);
|
||||
this->actionFunc = BgSpot00Hanebasi_DoNothing;
|
||||
func_8002DF54(globalCtx, player, 8);
|
||||
globalCtx->nextEntranceIndex = 0x00CD;
|
||||
gSaveContext.nextCutsceneIndex = 0xFFF1;
|
||||
globalCtx->sceneLoadFlag = 0x14;
|
||||
globalCtx->fadeTransition = 4;
|
||||
} else if (func_8002E12C(&this->dyna.actor, 3000.0f, 30000)) {
|
||||
globalCtx->envCtx.gloomySkyEvent = 1;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (gSaveContext.sceneSetupIndex == 5) {
|
||||
u16 dayTime;
|
||||
s32 tmp;
|
||||
|
||||
if (D_8011FB40 == 50) {
|
||||
tmp = 0xD556;
|
||||
|
||||
if (gSaveContext.dayTime >= 0xD557) {
|
||||
tmp = 0x1D556;
|
||||
}
|
||||
|
||||
D_8011FB40 = (tmp - gSaveContext.dayTime) * (1.0f / 350.0f);
|
||||
}
|
||||
|
||||
dayTime = gSaveContext.dayTime;
|
||||
|
||||
if ((dayTime >= 0x2AAC) && (dayTime < 0x3000) && (gSaveContext.sceneSetupIndex == 5)) {
|
||||
D_8011FB40 = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_DrawTorches(Actor* thisx, GlobalContext* globalCtx2) {
|
||||
GlobalContext* globalCtx = globalCtx2;
|
||||
f32 angle;
|
||||
s32 i;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 633);
|
||||
|
||||
func_80093D84(globalCtx->state.gfxCtx);
|
||||
|
||||
if (gSaveContext.sceneSetupIndex >= 4) {
|
||||
sTorchFlameScale = 0.008f;
|
||||
} else {
|
||||
sTorchFlameScale = ((thisx->shape.rot.x * -1) - 0x2000) * (1.0f / 1024000.0f);
|
||||
}
|
||||
|
||||
angle = (s16)(Camera_GetCamDirYaw(ACTIVE_CAM) + 0x8000) * (M_PI / 32768.0f);
|
||||
gDPSetPrimColor(POLY_XLU_DISP++, 128, 128, 255, 255, 0, 255);
|
||||
gDPSetEnvColor(POLY_XLU_DISP++, 255, 0, 0, 0);
|
||||
|
||||
for (i = 0; i < 2; i++) {
|
||||
gSPSegment(POLY_XLU_DISP++, 0x08,
|
||||
Gfx_TwoTexScroll(globalCtx->state.gfxCtx, 0, 0, 0, 32, 64, 1, 0,
|
||||
((globalCtx->gameplayFrames + i) * -20) & 0x1FF, 32, 128));
|
||||
|
||||
Matrix_Translate((i == 0) ? 260.0f : -260.0f, 128.0f, 690.0f, MTXMODE_NEW);
|
||||
Matrix_RotateY(angle, MTXMODE_APPLY);
|
||||
Matrix_Scale(sTorchFlameScale, sTorchFlameScale, sTorchFlameScale, MTXMODE_APPLY);
|
||||
|
||||
gSPMatrix(POLY_XLU_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 674),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
gSPDisplayList(POLY_XLU_DISP++, gEffFire1DL);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 681);
|
||||
}
|
||||
|
||||
void BgSpot00Hanebasi_Draw(Actor* thisx, GlobalContext* globalCtx) {
|
||||
Vec3f basePos = { 158.0f, 10.0f, 400.0f };
|
||||
Vec3f newPos;
|
||||
|
||||
OPEN_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 698);
|
||||
|
||||
func_80093D18(globalCtx->state.gfxCtx);
|
||||
|
||||
gSPMatrix(POLY_OPA_DISP++, Matrix_NewMtx(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 702),
|
||||
G_MTX_NOPUSH | G_MTX_LOAD | G_MTX_MODELVIEW);
|
||||
|
||||
if (thisx->params == DT_DRAWBRIDGE) {
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_06000430);
|
||||
|
||||
Matrix_MultVec3f(&basePos, &newPos);
|
||||
thisx->child->world.pos.x = newPos.x;
|
||||
thisx->child->world.pos.y = newPos.y;
|
||||
thisx->child->world.pos.z = newPos.z;
|
||||
basePos.x *= -1.0f;
|
||||
|
||||
Matrix_MultVec3f(&basePos, &newPos);
|
||||
thisx->child->child->world.pos.x = newPos.x;
|
||||
thisx->child->child->world.pos.y = newPos.y;
|
||||
thisx->child->child->world.pos.z = newPos.z;
|
||||
|
||||
if (gSaveContext.sceneSetupIndex != 12) {
|
||||
if ((gSaveContext.sceneSetupIndex >= 4) || ((LINK_IS_CHILD) && (thisx->shape.rot.x < -0x2000))) {
|
||||
BgSpot00Hanebasi_DrawTorches(thisx, globalCtx);
|
||||
} else {
|
||||
sTorchFlameScale = 0.0f;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
gSPDisplayList(POLY_OPA_DISP++, D_060000C0);
|
||||
}
|
||||
|
||||
CLOSE_DISPS(globalCtx->state.gfxCtx, "../z_bg_spot00_hanebasi.c", 733);
|
||||
}
|
||||
|
|
|
@ -6,9 +6,14 @@
|
|||
|
||||
struct BgSpot00Hanebasi;
|
||||
|
||||
typedef void (*BgSpot00HanebasiActionFunc)(struct BgSpot00Hanebasi*, GlobalContext*);
|
||||
|
||||
typedef struct BgSpot00Hanebasi {
|
||||
/* 0x0000 */ DynaPolyActor dyna;
|
||||
/* 0x0164 */ char unk_164[0x1C];
|
||||
/* 0x0164 */ BgSpot00HanebasiActionFunc actionFunc;
|
||||
/* 0x0168 */ s16 destAngle;
|
||||
/* 0x016C */ LightNode* lightNode;
|
||||
/* 0x0170 */ LightInfo lightInfo;
|
||||
} BgSpot00Hanebasi; // size = 0x0180
|
||||
|
||||
extern const ActorInit Bg_Spot00_Hanebasi_InitVars;
|
||||
|
|
|
@ -157,7 +157,7 @@ void EnDh_Init(Actor* thisx, GlobalContext* globalCtx) {
|
|||
ActorShape_Init(&this->actor.shape, 0.0f, &ActorShadow_DrawCircle, 64.0f);
|
||||
this->actor.params = ENDH_WAIT_UNDERGROUND;
|
||||
this->actor.colChkInfo.mass = MASS_HEAVY;
|
||||
this->actor.colChkInfo.health = (gSaveContext.linkAge == 0) ? 14 : 20;
|
||||
this->actor.colChkInfo.health = LINK_IS_ADULT ? 14 : 20;
|
||||
this->alpha = this->unk_258 = 255;
|
||||
this->actor.flags &= ~1;
|
||||
Collider_InitCylinder(globalCtx, &this->collider1);
|
||||
|
|
|
@ -163,7 +163,7 @@ void EnKarebaba_SetupUpright(EnKarebaba* this) {
|
|||
Actor_SetScale(&this->actor, 0.01f);
|
||||
this->bodyCollider.base.colType = COLTYPE_HIT6;
|
||||
this->bodyCollider.base.acFlags &= ~AC_HARD;
|
||||
this->bodyCollider.info.bumper.dmgFlags = gSaveContext.linkAge != 0 ? 0x07C00710 : 0x0FC00710;
|
||||
this->bodyCollider.info.bumper.dmgFlags = LINK_IS_CHILD ? 0x07C00710 : 0x0FC00710;
|
||||
this->bodyCollider.dim.radius = 15;
|
||||
this->bodyCollider.dim.height = 80;
|
||||
this->headCollider.dim.height = 80;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue