mirror of
https://github.com/zeldaret/ss
synced 2026-06-13 22:05:28 -04:00
d_a_obj_island_LOD
This commit is contained in:
@@ -2,11 +2,11 @@ _prolog = .text:0x00000000; // type:function size:0x2C scope:global
|
||||
_epilog = .text:0x00000030; // type:function size:0x2C scope:global
|
||||
_unresolved = .text:0x00000060; // type:function size:0x4 scope:global
|
||||
dAcOislandLOD_c_classInit__Fv = .text:0x00000070; // type:function size:0x5C
|
||||
fn_426_D0 = .text:0x000000D0; // type:function size:0xAC
|
||||
fn_426_180 = .text:0x00000180; // type:function size:0xB0
|
||||
fn_426_230 = .text:0x00000230; // type:function size:0x8
|
||||
fn_426_240 = .text:0x00000240; // type:function size:0x8
|
||||
fn_426_250 = .text:0x00000250; // type:function size:0x78
|
||||
createHeap__15dAcOislandLOD_cFv = .text:0x000000D0; // type:function size:0xAC
|
||||
create__15dAcOislandLOD_cFv = .text:0x00000180; // type:function size:0xB0
|
||||
doDelete__15dAcOislandLOD_cFv = .text:0x00000230; // type:function size:0x8
|
||||
actorExecute__15dAcOislandLOD_cFv = .text:0x00000240; // type:function size:0x8
|
||||
draw__15dAcOislandLOD_cFv = .text:0x00000250; // type:function size:0x78
|
||||
__dt__15dAcOislandLOD_cFv = .text:0x000002D0; // type:function size:0x68
|
||||
_ctors = .ctors:0x00000000; // type:label scope:global
|
||||
_dtors = .dtors:0x00000000; // type:label scope:global
|
||||
|
||||
@@ -852,8 +852,8 @@ fn_80024590 = .text:0x80024590; // type:function size:0xE4
|
||||
__ct__3SffFv = .text:0x80024680; // type:function size:0x48
|
||||
__dt__3SffFv = .text:0x800246D0; // type:function size:0x64
|
||||
fn_80024740 = .text:0x80024740; // type:function size:0x24
|
||||
fn_80024770 = .text:0x80024770; // type:function size:0x24
|
||||
fn_800247A0 = .text:0x800247A0; // type:function size:0x30
|
||||
fn_80024770__21BlurAndPaletteManagerFi = .text:0x80024770; // type:function size:0x24
|
||||
fn_800247A0__21BlurAndPaletteManagerFi = .text:0x800247A0; // type:function size:0x30
|
||||
fn_800247D0__21BlurAndPaletteManagerF7mVec3_cf = .text:0x800247D0; // type:function size:0x20
|
||||
__ct__21BlurAndPaletteManagerFv = .text:0x800247F0; // type:function size:0xBB0
|
||||
__ct__7mVec3_cFfff = .text:0x800253A0; // type:function size:0x10
|
||||
|
||||
@@ -8,7 +8,19 @@ public:
|
||||
dAcOislandLOD_c() {}
|
||||
virtual ~dAcOislandLOD_c() {}
|
||||
|
||||
virtual bool createHeap() override;
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int actorExecute() override;
|
||||
virtual int draw() override;
|
||||
|
||||
private:
|
||||
static const char* const resFilenames[5];
|
||||
static const char* const resMdlNames[5];
|
||||
|
||||
/* 0x330 */ nw4r::g3d::ResFile resFile;
|
||||
/* 0x334 */ m3d::smdl_c mMdl;
|
||||
/* 0x350 */ u8 lodModelIndex;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -268,6 +268,8 @@ public:
|
||||
void fn_800226E0(LightParams *);
|
||||
// light pillar related
|
||||
void fn_80024240(s16, s16, s16);
|
||||
bool fn_80024770(int);
|
||||
bool fn_800247A0(int);
|
||||
|
||||
u8 get0x2DE8() const {
|
||||
return field_0x2DE0[8];
|
||||
|
||||
@@ -1,3 +1,62 @@
|
||||
#include "d/a/obj/d_a_obj_island_LOD.h"
|
||||
#include "common.h"
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "f/f_base.h"
|
||||
#include "toBeSorted/blur_and_palette_manager.h"
|
||||
|
||||
const char* const dAcOislandLOD_c::resFilenames[5] = {
|
||||
"IslLODA",
|
||||
"IslLODB",
|
||||
"IslLODC",
|
||||
"IslLODD",
|
||||
"IslLODE",
|
||||
};
|
||||
|
||||
const char* const dAcOislandLOD_c::resMdlNames[5] = {
|
||||
"IslLODA",
|
||||
"IslLODB",
|
||||
"IslLODC",
|
||||
"IslLODD",
|
||||
"IslLODE",
|
||||
};
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_ISLAND_LOD, dAcOislandLOD_c, fProfile::OBJ_ISLAND_LOD, 0x211, 0, 3);
|
||||
|
||||
bool dAcOislandLOD_c::createHeap() {
|
||||
lodModelIndex = params & 0xf;
|
||||
void* data = getOarcResFile(dAcOislandLOD_c::resFilenames[lodModelIndex]);
|
||||
resFile = nw4r::g3d::ResFile(data);
|
||||
dStage_c::bindStageResToFile(&resFile);
|
||||
dStage_c::bindSkyCmnToResFile(&resFile);
|
||||
nw4r::g3d::ResMdl mdl = resFile.GetResMdl(dAcOislandLOD_c::resMdlNames[lodModelIndex]);
|
||||
TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x120, 1, nullptr));
|
||||
return true;
|
||||
}
|
||||
|
||||
int dAcOislandLOD_c::create() {
|
||||
CREATE_ALLOCATOR(dAcOislandLOD_c);
|
||||
updateMatrix();
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mVec3_c min, max;
|
||||
mMdl.getBounds(&min, &max);
|
||||
boundingBox.Set(min, max);
|
||||
mCullingDistance = 500000.0;
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOislandLOD_c::doDelete() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
int dAcOislandLOD_c::actorExecute() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOislandLOD_c::draw() {
|
||||
BlurAndPaletteManager& blurAndPaletteManager = BlurAndPaletteManager::GetInstance();
|
||||
if (blurAndPaletteManager.fn_80024770(7) && !blurAndPaletteManager.fn_800247A0(7)) {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
drawModelType1(&mMdl);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user