-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
dAcOutaDemoPedest_c, dAcOutajimaLv2_c OK (#75)
* dAcOutaDemoPedest_c OK * dAcOutajimaLv2_c OK
- Loading branch information
1 parent
be06bc0
commit e6dd20a
Showing
9 changed files
with
161 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,59 @@ | ||
#include "d/a/obj/d_a_obj_uta_demo_pedest.h" | ||
|
||
#include "d/a/obj/d_a_obj_base.h" | ||
#include "f/f_base.h" | ||
#include "m/m_vec.h" | ||
#include "nw4r/g3d/g3d_resmdl.h" | ||
#include "toBeSorted/arc_managers/current_stage_arc_manager.h" | ||
#include "toBeSorted/room_manager.h" | ||
|
||
static const char *const sMdlNames[] = { | ||
"StageF010rPedest", | ||
"StageWindF001r", | ||
}; | ||
|
||
SPECIAL_ACTOR_PROFILE(OBJ_UTA_DEMO_PEDEST, dAcOutaDemoPedest_c, fProfile::OBJ_UTA_DEMO_PEDEST, 0x212, 0, 6); | ||
|
||
bool dAcOutaDemoPedest_c::createHeap() { | ||
mModelType = getModelType(); | ||
if (mModelType == 0xF) { | ||
mModelType = 0; | ||
} | ||
if (mModelType > 1) { | ||
mModelType = 0; | ||
} | ||
|
||
mRes = CurrentStageArcManager::sInstance->getData("g3d/stage.brres"); | ||
RoomManager::bindStageResToFile(&mRes); | ||
RoomManager::bindSkyCmnToResFile(&mRes); | ||
nw4r::g3d::ResMdl mdl = mRes.GetResMdl(sMdlNames[mModelType]); | ||
TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120)); | ||
|
||
return true; | ||
} | ||
|
||
int dAcOutaDemoPedest_c::create() { | ||
CREATE_ALLOCATOR(dAcOutaDemoPedest_c); | ||
|
||
updateMatrix(); | ||
mMdl.setLocalMtx(mWorldMtx); | ||
mMdl.setPriorityDraw(0x1C, 9); | ||
mVec3_c l, u; | ||
mMdl.getBounds(&l, &u); | ||
boundingBox.Set(l, u); | ||
|
||
return SUCCEEDED; | ||
} | ||
|
||
int dAcOutaDemoPedest_c::doDelete() { | ||
return SUCCEEDED; | ||
} | ||
|
||
int dAcOutaDemoPedest_c::actorExecute() { | ||
return SUCCEEDED; | ||
} | ||
|
||
int dAcOutaDemoPedest_c::draw() { | ||
drawModelType1(&mMdl); | ||
return SUCCEEDED; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,53 @@ | ||
#include "d/a/obj/d_a_obj_utajima_lv2.h" | ||
|
||
#include "common.h" | ||
#include "d/col/bg/d_bg_s.h" | ||
#include "m/m_vec.h" | ||
#include "toBeSorted/room_manager.h" | ||
|
||
SPECIAL_ACTOR_PROFILE(OBJ_UTAJIMA_LV2, dAcOutajimaLv2_c, fProfile::OBJ_UTAJIMA_LV2, 0x1D5, 0, 3); | ||
|
||
const f32 dAcOutajimaLv2_c::someFloat = 100000.0f; | ||
|
||
bool dAcOutajimaLv2_c::createHeap() { | ||
mRes = getOarcResFile("IslCave"); | ||
RoomManager::bindStageResToFile(&mRes); | ||
RoomManager::bindSkyCmnToResFile(&mRes); | ||
nw4r::g3d::ResMdl mdl = mRes.GetResMdl("IslCave"); | ||
TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120)); | ||
|
||
void *dzb = getOarcFile("IslCave", "dzb/IslCave.dzb"); | ||
void *plc = getOarcFile("IslCave", "dat/IslCave.plc"); | ||
updateMatrix(); | ||
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; | ||
} | ||
|
||
int dAcOutajimaLv2_c::create() { | ||
CREATE_ALLOCATOR(dAcOutajimaLv2_c); | ||
|
||
dBgS::GetInstance()->Regist(&mBgW, this); | ||
dBgS::GetInstance()->RegistBg(&mBgW, this); | ||
mMdl.setPriorityDraw(0x1C, 9); | ||
boundingBox.Set(mVec3_c(-2800.0f, -4000.0f, -2600.0f), mVec3_c(2600.0f, 1900.0f, 2700.0f)); | ||
mCullingDistance = 500000.0f; | ||
return SUCCEEDED; | ||
} | ||
|
||
int dAcOutajimaLv2_c::doDelete() { | ||
dBgS::GetInstance()->UnRegist(&mBgW); | ||
return SUCCEEDED; | ||
} | ||
|
||
int dAcOutajimaLv2_c::actorExecute() { | ||
return SUCCEEDED; | ||
} | ||
|
||
int dAcOutajimaLv2_c::draw() { | ||
drawModelType1(&mMdl); | ||
return SUCCEEDED; | ||
} |