mirror of
https://github.com/zeldaret/ss
synced 2026-08-02 08:31:51 -04:00
d_a_obj_fence_boko ok
This commit is contained in:
@@ -93,7 +93,7 @@ bool dAcODungeonShip_c::createHeap() {
|
||||
if (!SceneflagManager::sInstance->checkBoolFlag(roomid, (params >> 0x10) & 0xFF)) {
|
||||
goto ok;
|
||||
} else {
|
||||
bool result = (BOOL)mBg.InitMapStuff(&heap_allocator);
|
||||
bool result = mBg.InitMapStuff(&heap_allocator);
|
||||
if (result == false) {
|
||||
return false;
|
||||
}
|
||||
@@ -459,9 +459,7 @@ void dAcODungeonShip_c::fn_485_1720() {
|
||||
field_0x84C = tmp2;
|
||||
}
|
||||
|
||||
bool dAcODungeonShip_c::fn_485_1830(s32 pathSegmentIndex, s32 direction, s32 *out) {
|
||||
|
||||
}
|
||||
bool dAcODungeonShip_c::fn_485_1830(s32 pathSegmentIndex, s32 direction, s32 *out) {}
|
||||
|
||||
u16 dAcODungeonShip_c::fn_485_1900() {
|
||||
s32 sign = mPath.CheckFlag(0x40000000) ? -1 : 1;
|
||||
@@ -501,13 +499,9 @@ void dAcODungeonShip_c::fn_485_1A70(mVec3_c *v) {
|
||||
v->set(0.0f, 0.0f, 0.0f);
|
||||
}
|
||||
|
||||
void dAcODungeonShip_c::fn_485_1A90() {
|
||||
|
||||
}
|
||||
void dAcODungeonShip_c::fn_485_1A90() {}
|
||||
|
||||
void dAcODungeonShip_c::fn_485_1BF0() {
|
||||
|
||||
}
|
||||
void dAcODungeonShip_c::fn_485_1BF0() {}
|
||||
|
||||
void dAcODungeonShip_c::fn_485_1DF0() {
|
||||
const dAcPy_c *link = dAcPy_c::GetLink();
|
||||
|
||||
@@ -1,3 +1,54 @@
|
||||
#include "d/a/obj/d_a_obj_fence_boko.h"
|
||||
|
||||
#include "d/col/bg/d_bg_s.h"
|
||||
#include "d/col/bg/d_bg_s_gnd_chk.h"
|
||||
#include "d/d_stage.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_FENCE_BOKO, dAcOfenceBoko_c, fProfile::OBJ_FENCE_BOKO, 0x1D7, 0, 3);
|
||||
|
||||
bool dAcOfenceBoko_c::createHeap() {
|
||||
mResFile = nw4r::g3d::ResFile(getOarcResFile("FenceBoko"));
|
||||
nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("FenceBoko");
|
||||
TRY_CREATE(mModel.create(mdl, &heap_allocator, 0x120));
|
||||
cBgD_t *dzb = (cBgD_t *)getOarcFile("FenceBoko", "dzb/FenceBoko.dzb");
|
||||
PLC *plc = (PLC *)getOarcFile("FenceBoko", "dat/FenceBoko.plc");
|
||||
updateMatrix();
|
||||
mModel.setLocalMtx(mWorldMtx);
|
||||
TRY_CREATE(!mCollision.Set(dzb, plc, cBgW::MOVE_BG_e, &mWorldMtx, &mScale));
|
||||
mCollision.Lock();
|
||||
return mCollision.InitMapStuff(&heap_allocator);
|
||||
}
|
||||
|
||||
int dAcOfenceBoko_c::create() {
|
||||
CREATE_ALLOCATOR(dAcOfenceBoko_c);
|
||||
dBgS::GetInstance()->Regist(&mCollision, this);
|
||||
dBgS::GetInstance()->RegistBg(&mCollision, this);
|
||||
mCollision.mRoomId = dStage_c::GetInstance()->getCurrRoomId();
|
||||
roomid = mCollision.mRoomId;
|
||||
mModel.setPriorityDraw(0x1C, 0x9);
|
||||
boundingBox.Set(mVec3_c(-210.0f, -10.0f, -20.0f), mVec3_c(210.0f, 340.0f, 20.0f));
|
||||
mCullingDistance = 50000.0;
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOfenceBoko_c::doDelete() {
|
||||
dBgS::GetInstance()->UnRegist(&mCollision);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOfenceBoko_c::actorExecute() {
|
||||
// Putting these in a single if fails to match ;-;
|
||||
if (!field_0x560) {
|
||||
if (dBgS_ObjGndChk::CheckPos(position + mVec3_c::Ey * 100.f)) {
|
||||
mCollision.mRoomId = dBgS_ObjGndChk::GetRoomID();
|
||||
roomid = mCollision.mRoomId;
|
||||
field_0x560 = true;
|
||||
}
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOfenceBoko_c::draw() {
|
||||
drawModelType1(&mModel);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
@@ -43,8 +43,7 @@ bool dAcOislandNusi_c::createHeap() {
|
||||
}
|
||||
TRY_CREATE(!mBgW.Set((cBgD_t *)dzb, (PLC *)plc, cBgW::MOVE_BG_e, &mWorldMtx, &mScale));
|
||||
mBgW.Lock();
|
||||
// TODO InitMapStuff bool vs BOOL
|
||||
return (BOOL)mBgW.InitMapStuff(&heap_allocator);
|
||||
return mBgW.InitMapStuff(&heap_allocator);
|
||||
}
|
||||
|
||||
int dAcOislandNusi_c::create() {
|
||||
|
||||
@@ -73,7 +73,7 @@ bool dAcOmegamiIsland_c::createHeap() {
|
||||
mBgW.OnFlag0x20();
|
||||
}
|
||||
|
||||
return (BOOL)mBgW.InitMapStuff(&heap_allocator);
|
||||
return mBgW.InitMapStuff(&heap_allocator);
|
||||
}
|
||||
|
||||
int dAcOmegamiIsland_c::create() {
|
||||
|
||||
@@ -22,9 +22,7 @@ bool dAcOutajimaLv2_c::createHeap() {
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
TRY_CREATE(!mBgW.Set((cBgD_t *)dzb, (PLC *)plc, cBgW::MOVE_BG_e, &mWorldMtx, &mScale));
|
||||
mBgW.Lock();
|
||||
// TODO InitMapStuff says it already returns a bool
|
||||
BOOL ok = mBgW.InitMapStuff(&heap_allocator);
|
||||
return ok;
|
||||
return mBgW.InitMapStuff(&heap_allocator);
|
||||
}
|
||||
|
||||
int dAcOutajimaLv2_c::create() {
|
||||
|
||||
@@ -61,7 +61,7 @@ void dBgW_Base::SetOldShapeAngleY(s16 oldShapeAngleY) {
|
||||
mOldShapeAngleY = oldShapeAngleY;
|
||||
}
|
||||
|
||||
bool dBgW_Base::InitMapStuff(mAllocator_c *pAllocator) {
|
||||
BOOL dBgW_Base::InitMapStuff(mAllocator_c *pAllocator) {
|
||||
ClearMap();
|
||||
return UpdateDraw(pAllocator) != false;
|
||||
}
|
||||
|
||||
+1
-1
@@ -248,7 +248,7 @@ bool dRoom_c::setupBg() {
|
||||
bg->Set(kcl, plc);
|
||||
bg->SetRoomId(roomid);
|
||||
bg->SetPriority(dBgW_Base::PRIORITY_0);
|
||||
bool ok = (BOOL)bg->InitMapStuff(&mAllocator);
|
||||
bool ok = bg->InitMapStuff(&mAllocator);
|
||||
if (!ok) {
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user