mirror of
https://github.com/zeldaret/ss
synced 2026-05-24 07:10:53 -04:00
d_a_obj_under_cloud OK
This commit is contained in:
@@ -2,17 +2,17 @@ _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
|
||||
dAcOunderCloud_c_classInit__Fv = .text:0x00000070; // type:function size:0xA0
|
||||
fn_411_110 = .text:0x00000110; // type:function size:0xE8
|
||||
fn_411_200 = .text:0x00000200; // type:function size:0xE0
|
||||
fn_411_2E0 = .text:0x000002E0; // type:function size:0x8
|
||||
fn_411_2F0 = .text:0x000002F0; // type:function size:0x30
|
||||
fn_411_320 = .text:0x00000320; // type:function size:0x12C
|
||||
fn_411_450 = .text:0x00000450; // type:function size:0x78
|
||||
createHeap__16dAcOunderCloud_cFv = .text:0x00000110; // type:function size:0xE8
|
||||
create__16dAcOunderCloud_cFv = .text:0x00000200; // type:function size:0xE0
|
||||
doDelete__16dAcOunderCloud_cFv = .text:0x000002E0; // type:function size:0x8
|
||||
actorExecute__16dAcOunderCloud_cFv = .text:0x000002F0; // type:function size:0x30
|
||||
actorExecuteInEvent__16dAcOunderCloud_cFv = .text:0x00000320; // type:function size:0x12C
|
||||
draw__16dAcOunderCloud_cFv = .text:0x00000450; // type:function size:0x78
|
||||
__dt__16dAcOunderCloud_cFv = .text:0x000004D0; // type:function size:0x80
|
||||
_ctors = .ctors:0x00000000; // type:label scope:global
|
||||
_dtors = .dtors:0x00000000; // type:label scope:global
|
||||
lbl_411_rodata_0 = .rodata:0x00000000; // type:object size:0x14 data:float
|
||||
lbl_411_rodata_0 = .rodata:0x00000000; // type:object size:0x14 scope:local data:float
|
||||
g_profile_OBJ_UNDER_CLOUD = .data:0x00000000; // type:object size:0x10
|
||||
lbl_411_data_10 = .data:0x00000010; // type:object size:0x10
|
||||
lbl_411_data_20 = .data:0x00000020; // type:object size:0x20
|
||||
lbl_411_data_40 = .data:0x00000040; // type:object size:0x80
|
||||
lbl_411_data_10 = .data:0x00000010; // type:object size:0x10 scope:local
|
||||
lbl_411_data_20 = .data:0x00000020; // type:object size:0x20 scope:local
|
||||
__vt__16dAcOunderCloud_c = .data:0x00000040; // type:object size:0x80
|
||||
|
||||
+1
-1
@@ -2383,7 +2383,7 @@ config.libs = [
|
||||
"d_a_obj_underground_switch",
|
||||
"REL/d/a/obj/d_a_obj_underground_switch.cpp",
|
||||
),
|
||||
Rel(NonMatching, "d_a_obj_under_cloud", "REL/d/a/obj/d_a_obj_under_cloud.cpp"),
|
||||
Rel(Matching, "d_a_obj_under_cloud", "REL/d/a/obj/d_a_obj_under_cloud.cpp"),
|
||||
Rel(NonMatching, "d_a_obj_updown_lava", "REL/d/a/obj/d_a_obj_updown_lava.cpp"),
|
||||
Rel(Matching, "d_a_obj_utajima", "REL/d/a/obj/d_a_obj_utajima.cpp"),
|
||||
Rel(Matching, "d_a_obj_utajima_island", "REL/d/a/obj/d_a_obj_utajima_island.cpp"),
|
||||
|
||||
@@ -2,13 +2,28 @@
|
||||
#define D_A_OBJ_UNDER_CLOUD_H
|
||||
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "m/m3d/m_anmtexsrt.h"
|
||||
#include "m/m3d/m_smdl.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "toBeSorted/actor_event.h"
|
||||
|
||||
class dAcOunderCloud_c : public dAcObjBase_c {
|
||||
public:
|
||||
dAcOunderCloud_c() {}
|
||||
dAcOunderCloud_c() : mEvent(*this, nullptr) {}
|
||||
virtual ~dAcOunderCloud_c() {}
|
||||
|
||||
virtual bool createHeap() override;
|
||||
virtual int create() override;
|
||||
virtual int doDelete() override;
|
||||
virtual int actorExecute() override;
|
||||
virtual int actorExecuteInEvent() override;
|
||||
virtual int draw() override;
|
||||
|
||||
private:
|
||||
/* 0x330 */ nw4r::g3d::ResFile mResFile;
|
||||
/* 0x334 */ m3d::smdl_c mMdl;
|
||||
/* 0x350 */ m3d::anmTexSrt_c mAnm;
|
||||
/* 0x37C */ ActorEventRelated mEvent;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -1,3 +1,77 @@
|
||||
#include "d/a/obj/d_a_obj_under_cloud.h"
|
||||
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "d/d_light_env.h"
|
||||
#include "d/d_stage.h"
|
||||
#include "f/f_base.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_UNDER_CLOUD, dAcOunderCloud_c, fProfile::OBJ_UNDER_CLOUD, 0x202, 0, 4);
|
||||
|
||||
bool dAcOunderCloud_c::createHeap() {
|
||||
void *data = getOarcResFile("F020UnderCloud");
|
||||
mResFile = nw4r::g3d::ResFile(data);
|
||||
dStage_c::bindStageResToFile(&mResFile);
|
||||
dStage_c::bindSkyCmnToResFile(&mResFile);
|
||||
nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("F020UnderCloud");
|
||||
TRY_CREATE(mMdl.create(mdl, &heap_allocator, 0x160));
|
||||
nw4r::g3d::ResAnmTexSrt anm = mResFile.GetResAnmTexSrt("F020UnderCloud");
|
||||
TRY_CREATE(mAnm.create(mdl, anm, &heap_allocator, nullptr, 1));
|
||||
mMdl.setOption(0x30001, false);
|
||||
return true;
|
||||
}
|
||||
|
||||
int dAcOunderCloud_c::create() {
|
||||
CREATE_ALLOCATOR(dAcOunderCloud_c);
|
||||
mMdl.setAnm(mAnm);
|
||||
updateMatrix();
|
||||
mMdl.setLocalMtx(mWorldMtx);
|
||||
mMdl.setPriorityDraw(0x1C, 9);
|
||||
boundingBox.Set(mVec3_c(-550000.0f, -30000.0f, -500000.0f), mVec3_c(500000.0f, -10000.0f, 500000.0f));
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOunderCloud_c::doDelete() {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOunderCloud_c::actorExecute() {
|
||||
mAnm.play();
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOunderCloud_c::actorExecuteInEvent() {
|
||||
nw4r::g3d::ScnMdl *mdl = nw4r::g3d::ScnObj::DynamicCast<nw4r::g3d::ScnMdl>(mMdl.getG3dObject());
|
||||
nw4r::g3d::ScnMdl::CopiedVisAccess visAccess(mdl, 1);
|
||||
switch (mEvent.getCurrentEventCommand()) {
|
||||
case 'act0': {
|
||||
actorExecute();
|
||||
mEvent.advanceNext();
|
||||
break;
|
||||
};
|
||||
case 'act1': {
|
||||
actorExecute();
|
||||
visAccess.SetVisibility(false);
|
||||
break;
|
||||
};
|
||||
case '????': {
|
||||
actorExecute();
|
||||
break;
|
||||
};
|
||||
default: {
|
||||
mEvent.advanceNext();
|
||||
};
|
||||
}
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
int dAcOunderCloud_c::draw() {
|
||||
dLightEnv_c &lightEnv = dLightEnv_c::GetInstance();
|
||||
if (lightEnv.fn_80024770(6) && !lightEnv.fn_800247A0(6)) {
|
||||
return SUCCEEDED;
|
||||
}
|
||||
drawModelType1(&mMdl);
|
||||
return SUCCEEDED;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user