mirror of
https://github.com/zeldaret/ss
synced 2026-08-19 22:02:02 -04:00
g3d initial pullover (#115)
* g3d Headers * initial g3d source files -- NOT YET FIXED * change ResFile static_cast to explicit ctor
This commit is contained in:
@@ -3,6 +3,7 @@
|
||||
#include "c/c_math.h"
|
||||
#include "d/a/d_a_player.h"
|
||||
#include "d/col/c/c_cc_d.h"
|
||||
#include "nw4r/types_nw4r.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(ARROW, dAcArrow_c, fProfile::ARROW, 0x126, 0, 0x80);
|
||||
|
||||
@@ -44,7 +45,7 @@ bool hitCallback(dAcObjBase_c *i_actorA, cCcD_Obj *i_objInfA, dAcObjBase_c *i_ac
|
||||
}
|
||||
|
||||
bool dAcArrow_c::createHeap() {
|
||||
mResFile = getOarcResFile("Alink");
|
||||
mResFile = nw4r::g3d::ResFile(getOarcResFile("Alink"));
|
||||
nw4r::g3d::ResMdl mdl(nullptr);
|
||||
if ((mSubType & 0x10) != 0) {
|
||||
mdl = mResFile.GetResMdl("EquipPachinkoBullet");
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#include "d/col/bg/d_bg_s.h"
|
||||
#include "d/col/bg/d_bg_w.h"
|
||||
#include "d/flag/sceneflag_manager.h"
|
||||
#include "nw4r/g3d/g3d_resfile.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "s/s_Math.h"
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_SW, dAcOsw_c, fProfile::OBJ_SW, 0x12B, 0, 0x1002);
|
||||
@@ -63,12 +63,12 @@ void dAcOsw_c::rideCallback(dBgW *unknown, dAcObjBase_c *actor, dAcObjBase_c *in
|
||||
}
|
||||
|
||||
bool dAcOsw_c::createHeap() {
|
||||
nw4r::g3d::ResFile resFile = getOarcResFile(SWITCH_TYPES[mSwitchType]);
|
||||
nw4r::g3d::ResMdl resMdl = resFile.GetResMdl(SWITCH_TYPES[mSwitchType]);
|
||||
nw4r::g3d::ResFile resFile(getOarcResFile(SWITCH_TYPES[mSwitchType]));
|
||||
nw4r::g3d::ResMdl resMdl(resFile.GetResMdl(SWITCH_TYPES[mSwitchType]));
|
||||
TRY_CREATE(mModel.create(resMdl, &heap_allocator, 0x20, 1, nullptr));
|
||||
|
||||
field_0x5E8 = mScale.x * (resMdl.GetResNode("base").mNode.ref().VEC3_0x50.x -
|
||||
resMdl.GetResNode("base").mNode.ref().VEC3_0x44.x);
|
||||
field_0x5E8 =
|
||||
mScale.x * (resMdl.GetResNode("base").ref().volume_max.x - resMdl.GetResNode("base").ref().volume_min.x);
|
||||
cBgD_t *dbzData = (cBgD_t *)getOarcDZB(SWITCH_TYPES[mSwitchType], SWITCH_TYPES[mSwitchType]);
|
||||
PLC *plcData = (PLC *)getOarcPLC(SWITCH_TYPES[mSwitchType], SWITCH_TYPES[mSwitchType]);
|
||||
mScale.set(1.0f, 0.8f, 1.0f);
|
||||
|
||||
@@ -18,11 +18,11 @@
|
||||
#include "m/m3d/m_scnleaf.h"
|
||||
#include "m/m_mtx.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/g3d_resanmchr.h"
|
||||
#include "nw4r/g3d/g3d_resanmtexpat.h"
|
||||
#include "nw4r/g3d/g3d_resanmtexsrt.h"
|
||||
#include "nw4r/g3d/g3d_resfile.h"
|
||||
#include "nw4r/g3d/g3d_resmdl.h"
|
||||
#include "nw4r/g3d/res/g3d_resanmchr.h"
|
||||
#include "nw4r/g3d/res/g3d_resanmtexpat.h"
|
||||
#include "nw4r/g3d/res/g3d_resanmtexsrt.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
#include "rvl/MTX/mtxvec.h"
|
||||
#include "s/s_Math.h"
|
||||
#include "toBeSorted/arc_managers/oarc_manager.h"
|
||||
@@ -811,8 +811,12 @@ bool dAcTbox_c::isBelowGroundAtPos(f32 height, const mVec3_c &pos) {
|
||||
}
|
||||
|
||||
dAcTbox_c::dAcTbox_c()
|
||||
: mStateMgr(*this, sStateID::null), mScnCallback(this), mEvent(*this, nullptr), mTboxListNode(this),
|
||||
mDowsingTarget(this, DowsingTarget::SLOT_NONE), mGoddessDowsingTarget(this, DowsingTarget::SLOT_NONE) {
|
||||
: mStateMgr(*this, sStateID::null),
|
||||
mScnCallback(this),
|
||||
mEvent(*this, nullptr),
|
||||
mTboxListNode(this),
|
||||
mDowsingTarget(this, DowsingTarget::SLOT_NONE),
|
||||
mGoddessDowsingTarget(this, DowsingTarget::SLOT_NONE) {
|
||||
field_0x120B = 0;
|
||||
field_0x120E = 0;
|
||||
mDoObstructedCheck = false;
|
||||
@@ -842,8 +846,8 @@ bool dAcTbox_c::createHeap() {
|
||||
}
|
||||
|
||||
if (mVariant == GODDESS) {
|
||||
nw4r::g3d::ResFile res = data;
|
||||
if (!res.mFile.IsValid()) {
|
||||
nw4r::g3d::ResFile res(data);
|
||||
if (!res.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
nw4r::g3d::ResMdl mdl = mMdl1.getModel().getResMdl();
|
||||
@@ -851,7 +855,7 @@ bool dAcTbox_c::createHeap() {
|
||||
return false;
|
||||
}
|
||||
nw4r::g3d::ResAnmTexPat anmTexPat = res.GetResAnmTexPat("GoddessTBox");
|
||||
if (!anmTexPat.mAnmTexPat.IsValid()) {
|
||||
if (!anmTexPat.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
if (!mAnmGoddessPat.create(mdl, anmTexPat, &heap_allocator, nullptr, 1)) {
|
||||
@@ -861,7 +865,7 @@ bool dAcTbox_c::createHeap() {
|
||||
u16 goddessTBoxActive = getParams2Lower();
|
||||
if (StoryflagManager::sInstance->getCounterOrFlag(goddessTBoxActive) && !mHasBeenOpened) {
|
||||
nw4r::g3d::ResAnmTexSrt anmTexSrt = res.GetResAnmTexSrt("GoddessTBox");
|
||||
if (!anmTexSrt.mAnmTexSrt.IsValid()) {
|
||||
if (!anmTexSrt.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
if (!mAnmGoddessTexSrt.create(mdl, anmTexSrt, &heap_allocator, nullptr, 1)) {
|
||||
@@ -870,12 +874,12 @@ bool dAcTbox_c::createHeap() {
|
||||
mMdl1.getModel().setAnm(mAnmGoddessTexSrt);
|
||||
}
|
||||
} else if (mVariant == NORMAL) {
|
||||
nw4r::g3d::ResFile res = data;
|
||||
if (!res.mFile.IsValid()) {
|
||||
nw4r::g3d::ResFile res(data);
|
||||
if (!res.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
nw4r::g3d::ResAnmClr anmClr = res.GetResAnmClr("TBoxNormalTAppear");
|
||||
if (!anmClr.mAnmClr.IsValid()) {
|
||||
if (!anmClr.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
nw4r::g3d::ResMdl mdl = mMdl1.getModel().getResMdl();
|
||||
@@ -894,8 +898,8 @@ bool dAcTbox_c::createHeap() {
|
||||
if (fxData == nullptr) {
|
||||
return false;
|
||||
}
|
||||
nw4r::g3d::ResFile fxRes = fxData;
|
||||
if (!fxRes.mFile.IsValid()) {
|
||||
nw4r::g3d::ResFile fxRes(fxData);
|
||||
if (!fxRes.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -909,7 +913,7 @@ bool dAcTbox_c::createHeap() {
|
||||
mOpenFxMdl.setPriorityDraw(0x7F, 0x86);
|
||||
|
||||
nw4r::g3d::ResAnmChr openAnm = fxRes.GetResAnmChr(sOpenAnmChrName);
|
||||
if (!openAnm.mAnmChr.IsValid()) {
|
||||
if (!openAnm.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
if (!mAnmChr.create(openMdl, openAnm, &heap_allocator, nullptr)) {
|
||||
@@ -918,7 +922,7 @@ bool dAcTbox_c::createHeap() {
|
||||
mOpenFxMdl.setAnm(mAnmChr);
|
||||
|
||||
nw4r::g3d::ResAnmTexSrt anmTexSrt = fxRes.GetResAnmTexSrt(sOpenAnmTexSrtName);
|
||||
if (!anmTexSrt.mAnmTexSrt.IsValid()) {
|
||||
if (!anmTexSrt.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
if (!mAnmTexSrt1.create(openMdl, anmTexSrt, &heap_allocator, nullptr, 1)) {
|
||||
@@ -927,7 +931,7 @@ bool dAcTbox_c::createHeap() {
|
||||
mOpenFxMdl.setAnm(mAnmTexSrt1);
|
||||
|
||||
nw4r::g3d::ResAnmClr anmClr = fxRes.GetResAnmClr(sOpenAnmClrName);
|
||||
if (!anmClr.mAnmClr.IsValid()) {
|
||||
if (!anmClr.IsValid()) {
|
||||
return false;
|
||||
}
|
||||
if (!mAnmMatClr2.create(openMdl, anmClr, &heap_allocator, nullptr, 1)) {
|
||||
|
||||
@@ -4,19 +4,19 @@
|
||||
#include "d/a/obj/d_a_obj_base.h"
|
||||
#include "m/m3d/m_fanm.h"
|
||||
#include "m/m_vec.h"
|
||||
#include "nw4r/g3d/g3d_resanmclr.h"
|
||||
#include "nw4r/g3d/g3d_resanmtexsrt.h"
|
||||
#include "nw4r/g3d/g3d_resmdl.h"
|
||||
#include "nw4r/g3d/res/g3d_resanmclr.h"
|
||||
#include "nw4r/g3d/res/g3d_resanmtexsrt.h"
|
||||
#include "nw4r/g3d/res/g3d_resfile.h"
|
||||
#include "nw4r/g3d/res/g3d_resmdl.h"
|
||||
#include "s/s_State.hpp"
|
||||
|
||||
|
||||
SPECIAL_ACTOR_PROFILE(OBJ_WATER_SPOUT, dAcOwaterSpout_c, fProfile::OBJ_WATER_SPOUT, 0x1DA, 0, 6);
|
||||
|
||||
STATE_DEFINE(dAcOwaterSpout_c, Wait);
|
||||
|
||||
bool dAcOwaterSpout_c::createHeap() {
|
||||
void *data = getOarcResFile("FX_WaterColumn");
|
||||
mResFile = data;
|
||||
mResFile = nw4r::g3d::ResFile(data);
|
||||
nw4r::g3d::ResMdl mdl = mResFile.GetResMdl("FX_WaterColumn");
|
||||
TRY_CREATE(mMdl.create(data, "FX_WaterColumn", "FX_WaterColumn", &heap_allocator, 0x32C));
|
||||
nw4r::g3d::ResAnmTexSrt anmSrt = mResFile.GetResAnmTexSrt("FX_WaterColumn");
|
||||
|
||||
Reference in New Issue
Block a user