mirror of
https://github.com/zeldaret/tww.git
synced 2026-07-07 05:14:58 -04:00
Remove some unnecessary version ifdefs
This commit is contained in:
+2
-13
@@ -22,7 +22,7 @@ public:
|
||||
mDoExt_baseAnm() { mFrameCtrl = NULL; }
|
||||
virtual ~mDoExt_baseAnm() {}
|
||||
|
||||
int initPlay(s16 i_frameMax, int i_attribute, f32 i_rate, s16 i_startF, s16 i_endF, bool);
|
||||
int initPlay(s16 i_frameMax, int i_attribute, f32 i_rate, s16 i_startF, s16 i_endF, bool i_modify);
|
||||
BOOL play();
|
||||
|
||||
J3DFrameCtrl* getFrameCtrl() { return mFrameCtrl; }
|
||||
@@ -146,17 +146,6 @@ private:
|
||||
/* 0x10 */ u16 mUpdateMaterialNum;
|
||||
}; // size = 0x14
|
||||
|
||||
class mDoExt_blkAnm : public mDoExt_baseAnm {
|
||||
public:
|
||||
int init(J3DDeformData* i_deformData, J3DAnmCluster* i_blk, BOOL i_anmPlay,
|
||||
int i_attribute, f32 i_rate, s16 i_start, s16 param_6);
|
||||
|
||||
J3DAnmCluster* getBlkAnm() { return mpAnm; }
|
||||
|
||||
private:
|
||||
/* 0x14 */ J3DAnmCluster* mpAnm;
|
||||
};
|
||||
|
||||
class mDoExt_bpkAnm : public mDoExt_baseAnm {
|
||||
public:
|
||||
mDoExt_bpkAnm() { field_0xc = NULL; }
|
||||
@@ -332,7 +321,7 @@ class mDoExt_McaMorf : public J3DMtxCalcMaya {
|
||||
public:
|
||||
mDoExt_McaMorf(J3DModelData* modelData, mDoExt_McaMorfCallBack1_c* callback1,
|
||||
mDoExt_McaMorfCallBack2_c* callback2, J3DAnmTransform* anmTransform,
|
||||
int loopMode, f32 param_5, int param_6, int param_7, int param_8,
|
||||
int loopMode, f32 playSpeed, int startFrame, int endFrame, BOOL param_8,
|
||||
void* basAnm, u32 modelFlag, u32 differedDlistFlag);
|
||||
|
||||
void calc();
|
||||
|
||||
@@ -363,6 +363,7 @@ static actor_method_class l_daKamome2_Method = {
|
||||
(process_method_func)daKamome2_Draw,
|
||||
};
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
actor_process_profile_definition g_profile_KAMOME2 = {
|
||||
/* LayerID */ fpcLy_CURRENT_e,
|
||||
/* ListID */ 0x0007,
|
||||
@@ -379,3 +380,4 @@ actor_process_profile_definition g_profile_KAMOME2 = {
|
||||
/* Group */ fopAc_ACTOR_e,
|
||||
/* CullType */ fopAc_CULLBOX_0_e,
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -79,7 +79,7 @@ static BOOL daKN_Draw(kn_class* i_this) {
|
||||
void anm_init(kn_class* i_this, int anmResIdx, float morf, unsigned char loopMode, float speed, int soundResIdx) {
|
||||
if (soundResIdx >= 0) {
|
||||
i_this->mpMorf->setAnm(
|
||||
(J3DAnmTransform*)dComIfG_getObjectRes("KN", anmResIdx), loopMode, morf, speed, 0.0f, -1.0f, (void*)dComIfG_getObjectRes("KN", soundResIdx)
|
||||
(J3DAnmTransform*)dComIfG_getObjectRes("KN", anmResIdx), loopMode, morf, speed, 0.0f, -1.0f, dComIfG_getObjectRes("KN", soundResIdx)
|
||||
);
|
||||
} else {
|
||||
i_this->mpMorf->setAnm((J3DAnmTransform*)dComIfG_getObjectRes("KN", anmResIdx), loopMode, morf, speed, 0.0f, -1.0f, NULL);
|
||||
|
||||
+9
-12
@@ -280,15 +280,16 @@ static BOOL useHeapInit(fopAc_ac_c* a_this) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
i_this->mpMorf2 = new mDoExt_McaMorf(
|
||||
(J3DModelData*)dComIfG_getObjectRes("Ssk", SSK_BDL_KTANA_00), NULL, NULL, NULL, J3DFrameCtrl::EMode_LOOP, 1.0f, 0, -1, 0, NULL, 0x0, 0x11020203
|
||||
(J3DModelData*)dComIfG_getObjectRes("Ssk", SSK_BDL_KTANA_00),
|
||||
NULL, NULL, NULL,
|
||||
DEMO_SELECT(J3DFrameCtrl::EMode_LOOP, J3DFrameCtrl::EMode_NULL),
|
||||
1.0f, 0, -1,
|
||||
DEMO_SELECT(0, 1),
|
||||
NULL,
|
||||
DEMO_SELECT(0x0, 0x80000),
|
||||
DEMO_SELECT(0x11020203, 0x11000022)
|
||||
);
|
||||
#else
|
||||
i_this->mpMorf2 = new mDoExt_McaMorf(
|
||||
(J3DModelData*)dComIfG_getObjectRes("Ssk", SSK_BDL_KTANA_00), NULL, NULL, NULL, ~J3DFrameCtrl::EMode_NONE, 1.0f, 0, -1, 1, NULL, 0x80000, 0x11000022
|
||||
);
|
||||
#endif
|
||||
if (i_this->mpMorf2 == NULL || i_this->mpMorf2->getModel() == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
@@ -391,11 +392,7 @@ static cPhs_State daSsk_Create(fopAc_ac_c* a_this) {
|
||||
i_this->m2C0 = 400.0f;
|
||||
}
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
u32 heapSize = 0x13C0;
|
||||
#else
|
||||
u32 heapSize = 0x1300;
|
||||
#endif
|
||||
u32 heapSize = DEMO_SELECT(0x13C0, 0x1300);
|
||||
if (!fopAcM_entrySolidHeap(a_this, useHeapInit, heapSize)) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
|
||||
@@ -17,9 +17,7 @@ dCloth_packet_c::dCloth_packet_c(
|
||||
) {
|
||||
JUT_ASSERT(43, i_toonimage != NULL);
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
GXBool mipmap = i_toonimage->mipmapCount > 1;
|
||||
#endif
|
||||
|
||||
GXInitTexObj(
|
||||
getToonTexObjP(),
|
||||
@@ -29,11 +27,7 @@ dCloth_packet_c::dCloth_packet_c(
|
||||
(GXTexFmt)i_toonimage->format,
|
||||
(GXTexWrapMode)i_toonimage->wrapS,
|
||||
(GXTexWrapMode)i_toonimage->wrapT,
|
||||
#if VERSION == VERSION_DEMO
|
||||
mipmap
|
||||
#else
|
||||
i_toonimage->mipmapCount > 1
|
||||
#endif
|
||||
);
|
||||
GXInitTexObjLOD(
|
||||
getTexObjP(),
|
||||
@@ -54,12 +48,7 @@ dCloth_packet_c::dCloth_packet_c(
|
||||
mpTevstr = tevstr;
|
||||
mCurArr = 0;
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
const MtxP mtx = mDoMtx_getIdentity();
|
||||
setMtx(mtx);
|
||||
#else
|
||||
setMtx(g_mDoMtx_identity);
|
||||
#endif
|
||||
setMtx(cMtx_getIdentity());
|
||||
|
||||
if (posArr == NULL) {
|
||||
mpPosArr[0] = new cXyz[mFlyGridSize * mHoistGridSize];
|
||||
@@ -192,17 +181,8 @@ void dCloth_packet_c::draw() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
|
||||
#if VERSION == VERSION_DEMO
|
||||
{
|
||||
cXyz* pos = getPosP();
|
||||
GXSetArray(GX_VA_POS, pos, sizeof(cXyz));
|
||||
cXyz* nrm = getNrmP();
|
||||
GXSetArray(GX_VA_NRM, nrm, sizeof(cXyz));
|
||||
}
|
||||
#else
|
||||
GXSetArray(GX_VA_POS, getPosP(), sizeof(cXyz));
|
||||
GXSetArray(GX_VA_NRM, getNrmP(), sizeof(cXyz));
|
||||
#endif
|
||||
|
||||
TexObjLoad();
|
||||
GXLoadTexObj(getToonTexObjP(), GX_TEXMAP1);
|
||||
@@ -211,14 +191,7 @@ void dCloth_packet_c::draw() {
|
||||
mDoMtx_stack_c::copy(mMtx);
|
||||
mDoMtx_stack_c::scaleM(mScale);
|
||||
Mtx mtx;
|
||||
#if VERSION == VERSION_DEMO
|
||||
{
|
||||
MtxP calc_mtx = mDoMtx_stack_c::get();
|
||||
MTXConcat(j3dSys.getViewMtx(), calc_mtx, mtx);
|
||||
}
|
||||
#else
|
||||
MTXConcat(j3dSys.getViewMtx(), mDoMtx_stack_c::get(), mtx);
|
||||
#endif
|
||||
cMtx_concat(j3dSys.getViewMtx(), mDoMtx_stack_c::get(), mtx);
|
||||
GXLoadPosMtxImm(mtx, GX_PNMTX0);
|
||||
GXLoadNrmMtxImm(mtx, GX_PNMTX0);
|
||||
|
||||
@@ -228,14 +201,7 @@ void dCloth_packet_c::draw() {
|
||||
|
||||
// Draw back
|
||||
GXSetCullMode(GX_CULL_FRONT);
|
||||
#if VERSION == VERSION_DEMO
|
||||
{
|
||||
cXyz* backNrm = getBackNrmP();
|
||||
GXSetArray(GX_VA_NRM, backNrm, sizeof(cXyz));
|
||||
}
|
||||
#else
|
||||
GXSetArray(GX_VA_NRM, getBackNrmP(), sizeof(cXyz));
|
||||
#endif
|
||||
|
||||
plot();
|
||||
|
||||
@@ -396,9 +362,7 @@ void dCloth_packet_c::cloth_draw() {
|
||||
|
||||
/* 80064330-8006441C .text TexObjInit__15dCloth_packet_cFP7ResTIMG */
|
||||
void dCloth_packet_c::TexObjInit(ResTIMG* i_img) {
|
||||
#if VERSION == VERSION_DEMO
|
||||
GXBool mipmap = i_img->mipmapCount > 1;
|
||||
#endif
|
||||
|
||||
GXInitTexObj(
|
||||
getTexObjP(),
|
||||
@@ -408,11 +372,7 @@ void dCloth_packet_c::TexObjInit(ResTIMG* i_img) {
|
||||
GXTexFmt(i_img->format),
|
||||
GXTexWrapMode(i_img->wrapS),
|
||||
GXTexWrapMode(i_img->wrapT),
|
||||
#if VERSION == VERSION_DEMO
|
||||
mipmap
|
||||
#else
|
||||
i_img->mipmapCount > 1
|
||||
#endif
|
||||
);
|
||||
GXInitTexObjLOD(
|
||||
getTexObjP(),
|
||||
@@ -656,9 +616,7 @@ void dClothVobj03_c::cloth_move() {
|
||||
/* 8006515C-80065268 .text TexObjInit__14dClothVobj03_cFP7ResTIMG */
|
||||
void dClothVobj03_c::TexObjInit(ResTIMG* timg) {
|
||||
GXInitTlutObj(&mTlutObj, (u8*)&timg->format + timg->paletteOffset, GXTlutFmt(timg->colorFormat), timg->numColors);
|
||||
#if VERSION == VERSION_DEMO
|
||||
const GXBool mipmap = timg->mipmapCount > 1;
|
||||
#endif
|
||||
GXBool mipmap = timg->mipmapCount > 1;
|
||||
|
||||
GXInitTexObjCI(
|
||||
getTexObjP(),
|
||||
@@ -668,11 +626,7 @@ void dClothVobj03_c::TexObjInit(ResTIMG* timg) {
|
||||
GXCITexFmt(timg->format),
|
||||
GXTexWrapMode(timg->wrapS),
|
||||
GXTexWrapMode(timg->wrapT),
|
||||
#if VERSION == VERSION_DEMO
|
||||
mipmap,
|
||||
#else
|
||||
timg->mipmapCount > 1,
|
||||
#endif
|
||||
0
|
||||
);
|
||||
|
||||
@@ -763,9 +717,7 @@ void dClothVobj04_c::cloth_move() {
|
||||
/* 80065700-8006580C .text TexObjInit__14dClothVobj04_cFP7ResTIMG */
|
||||
void dClothVobj04_c::TexObjInit(ResTIMG* timg) {
|
||||
GXInitTlutObj(&mTlutObj, (u8*)&timg->format + timg->paletteOffset, GXTlutFmt(timg->colorFormat), timg->numColors);
|
||||
#if VERSION == VERSION_DEMO
|
||||
const GXBool mipmap = timg->mipmapCount > 1;
|
||||
#endif
|
||||
GXBool mipmap = timg->mipmapCount > 1;
|
||||
|
||||
GXInitTexObjCI(
|
||||
getTexObjP(),
|
||||
@@ -775,11 +727,7 @@ void dClothVobj04_c::TexObjInit(ResTIMG* timg) {
|
||||
GXCITexFmt(timg->format),
|
||||
GXTexWrapMode(timg->wrapS),
|
||||
GXTexWrapMode(timg->wrapT),
|
||||
#if VERSION == VERSION_DEMO
|
||||
mipmap,
|
||||
#else
|
||||
timg->mipmapCount > 1,
|
||||
#endif
|
||||
0
|
||||
);
|
||||
|
||||
@@ -870,9 +818,7 @@ void dClothVobj05_c::cloth_move() {
|
||||
/* 80065CA0-80065DAC .text TexObjInit__14dClothVobj05_cFP7ResTIMG */
|
||||
void dClothVobj05_c::TexObjInit(ResTIMG* timg) {
|
||||
GXInitTlutObj(&mTlutObj, (u8*)&timg->format + timg->paletteOffset, GXTlutFmt(timg->colorFormat), timg->numColors);
|
||||
#if VERSION == VERSION_DEMO
|
||||
const GXBool mipmap = timg->mipmapCount > 1;
|
||||
#endif
|
||||
GXBool mipmap = timg->mipmapCount > 1;
|
||||
|
||||
GXInitTexObjCI(
|
||||
getTexObjP(),
|
||||
@@ -882,11 +828,7 @@ void dClothVobj05_c::TexObjInit(ResTIMG* timg) {
|
||||
GXCITexFmt(timg->format),
|
||||
GXTexWrapMode(timg->wrapS),
|
||||
GXTexWrapMode(timg->wrapT),
|
||||
#if VERSION == VERSION_DEMO
|
||||
mipmap,
|
||||
#else
|
||||
timg->mipmapCount > 1,
|
||||
#endif
|
||||
0
|
||||
);
|
||||
|
||||
@@ -983,9 +925,7 @@ void dClothVobj07_0_c::cloth_move() {
|
||||
/* 8006625C-80066368 .text TexObjInit__16dClothVobj07_0_cFP7ResTIMG */
|
||||
void dClothVobj07_0_c::TexObjInit(ResTIMG* timg) {
|
||||
GXInitTlutObj(&mTlutObj, (u8*)&timg->format + timg->paletteOffset, GXTlutFmt(timg->colorFormat), timg->numColors);
|
||||
#if VERSION == VERSION_DEMO
|
||||
const GXBool mipmap = timg->mipmapCount > 1;
|
||||
#endif
|
||||
GXBool mipmap = timg->mipmapCount > 1;
|
||||
|
||||
GXInitTexObjCI(
|
||||
getTexObjP(),
|
||||
@@ -995,11 +935,7 @@ void dClothVobj07_0_c::TexObjInit(ResTIMG* timg) {
|
||||
GXCITexFmt(timg->format),
|
||||
GXTexWrapMode(timg->wrapS),
|
||||
GXTexWrapMode(timg->wrapT),
|
||||
#if VERSION == VERSION_DEMO
|
||||
mipmap,
|
||||
#else
|
||||
timg->mipmapCount > 1,
|
||||
#endif
|
||||
0
|
||||
);
|
||||
|
||||
|
||||
@@ -1266,7 +1266,7 @@ void mDoExt_MtxCalcOldFrame::decOldFrameMorfCounter() {
|
||||
/* 80012650-800129E4 .text __ct__14mDoExt_McaMorfFP12J3DModelDataP25mDoExt_McaMorfCallBack1_cP25mDoExt_McaMorfCallBack2_cP15J3DAnmTransformifiiiPvUlUl */
|
||||
mDoExt_McaMorf::mDoExt_McaMorf(J3DModelData* modelData, mDoExt_McaMorfCallBack1_c* callback1,
|
||||
mDoExt_McaMorfCallBack2_c* callback2, J3DAnmTransform* anmTransform,
|
||||
int loopMode, f32 param_5, int param_6, int param_7, int param_8,
|
||||
int loopMode, f32 playSpeed, int startFrame, int endFrame, BOOL param_8,
|
||||
void* basAnm, u32 modelFlag, u32 differedDlistFlag) {
|
||||
mpModel = NULL;
|
||||
mpSound = NULL;
|
||||
@@ -1292,7 +1292,7 @@ mDoExt_McaMorf::mDoExt_McaMorf(J3DModelData* modelData, mDoExt_McaMorfCallBack1_
|
||||
if (basAnm == NULL && anmTransform) {
|
||||
basAnm = ((mDoExt_transAnmBas*)anmTransform)->getBas();
|
||||
if (basAnm) {
|
||||
param_8 = 1;
|
||||
param_8 = TRUE;
|
||||
}
|
||||
}
|
||||
if (param_8) {
|
||||
@@ -1301,7 +1301,7 @@ mDoExt_McaMorf::mDoExt_McaMorf(J3DModelData* modelData, mDoExt_McaMorfCallBack1_
|
||||
goto ERROR_EXIT;
|
||||
}
|
||||
}
|
||||
setAnm(anmTransform, loopMode, 0.0f, param_5, param_6, param_7, basAnm);
|
||||
setAnm(anmTransform, loopMode, 0.0f, playSpeed, startFrame, endFrame, basAnm);
|
||||
mPrevMorf = -1.0f;
|
||||
mpTransformInfo = new J3DTransformInfo[modelData->getJointNum()];
|
||||
if (!mpTransformInfo) {
|
||||
|
||||
Reference in New Issue
Block a user