Add drawlist inlines

This commit is contained in:
LagoLunatic
2024-01-04 15:57:55 -05:00
parent d19c0890a1
commit 830d3c80fe
15 changed files with 125 additions and 82 deletions
+1 -1
View File
@@ -53,7 +53,7 @@ public:
/* 0x0ED3 */ u8 m0ED3;
/* 0x0ED4 */ st_p mParts[26];
/* 0x19CC */ st_ke_s m19CC[3];
/* 0x1D50 */ mDoExt_3DlineMat_c m1D50;
/* 0x1D50 */ mDoExt_3DlineMat0_c m1D50;
/* 0x1D58 */ u8 m1D58[0x1D6C - 0x1D58];
/* 0x1D6C */ cXyz m1D6C[3];
/* 0x1D90 */ csXyz m1D90[3];
+22 -16
View File
@@ -2525,6 +2525,12 @@ inline int dComIfGd_setSimpleShadow(cXyz* pPos, f32 param_1, f32 param_2, cXyz*
int dComIfGd_setSimpleShadow2(cXyz* pPos, f32 param_1, f32 param_2, cBgS_PolyInfo& pPolyInfo,
s16 param_4, f32 param_5, GXTexObj* pTex);
inline int dComIfGd_setRealShadow(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5,
f32 param_6, dKy_tevstr_c* pTevStr) {
return g_dComIfG_gameInfo.drawlist.setRealShadow(id, param_2, pModel, pPos, param_5, param_6,
pTevStr);
}
inline int dComIfGd_setRealShadow2(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5,
f32 param_6, dKy_tevstr_c* pTevStr) {
return g_dComIfG_gameInfo.drawlist.setRealShadow2(id, param_2, pModel, pPos, param_5, param_6,
@@ -2541,6 +2547,10 @@ inline void dComIfGd_imageDrawShadow(Mtx mtx) {
int dComIfGd_setSimpleShadow2(cXyz* i_pos, f32 param_1, f32 param_2, cBgS_PolyInfo& i_floorPoly, s16 i_angle, f32 param_5, GXTexObj* i_tex);
inline void dComIfGd_set3DlineMat(mDoExt_3DlineMat_c* mat) {
g_dComIfG_gameInfo.drawlist.set3DlineMat(mat);
}
inline void dComIfGd_setAlphaModel(u8 type, Mtx mtx, u8 alpha) { g_dComIfG_gameInfo.drawlist.setAlphaModel(type, mtx, alpha); }
inline void dComIfGd_setSpotModel(u8 type, Mtx mtx, u8 alpha) { g_dComIfG_gameInfo.drawlist.setSpotModel(type, mtx, alpha); }
inline void dComIfGd_setLightModel(u8 type, Mtx mtx, u8 alpha) { g_dComIfG_gameInfo.drawlist.setLightModel(type, mtx, alpha); }
@@ -2551,26 +2561,22 @@ inline void dComIfGd_drawLightModel(Mtx mtx) { g_dComIfG_gameInfo.drawlist.drawL
inline s32 dComIfGd_getSpotModelNum() { return g_dComIfG_gameInfo.drawlist.getSpotModelNum(); }
inline s32 dComIfGd_getLightModelNum() { return g_dComIfG_gameInfo.drawlist.getLightModelNum(); }
inline void dComIfGd_setAlphaModelColor(GXColor& color) { g_dComIfG_gameInfo.drawlist.setAlphaModelColor(color); }
inline void dComIfGd_setSpotModelColor(GXColor& color) { g_dComIfG_gameInfo.drawlist.setSpotModelColor(color); }
inline void dComIfGd_setLightModelColor(GXColor& color) { g_dComIfG_gameInfo.drawlist.setLightModelColor(color); }
inline GXColor & dComIfGd_getAlphaModelColor() { return g_dComIfG_gameInfo.drawlist.getAlphaModelColor(); }
inline GXColor & dComIfGd_getLightModelColor() { return g_dComIfG_gameInfo.drawlist.getLightModelColor(); }
inline GXColor & dComIfGd_getSpotModelColor() { return g_dComIfG_gameInfo.drawlist.getSpotModelColor(); }
inline void dComIfGd_resetAlphaModel() { g_dComIfG_gameInfo.drawlist.resetAlphaModel(); }
inline void dComIfGd_resetSpotModel() { g_dComIfG_gameInfo.drawlist.resetSpotModel(); }
inline void dComIfGd_resetLightModel() { g_dComIfG_gameInfo.drawlist.resetLightModel(); }
inline J3DDrawBuffer* dComIfGd_getXluList() {
return g_dComIfG_gameInfo.drawlist.getXluList();
}
inline J3DDrawBuffer* dComIfGd_getOpaListP1() {
return g_dComIfG_gameInfo.drawlist.getOpaListP1();
}
inline J3DDrawBuffer* dComIfGd_getListFilter() {
return g_dComIfG_gameInfo.drawlist.getOpaListFilter();
}
inline J3DDrawBuffer* dComIfGd_getList2D() {
return g_dComIfG_gameInfo.drawlist.getOpaList2D();
}
inline J3DDrawBuffer* dComIfGd_getOpaListP1() { return g_dComIfG_gameInfo.drawlist.getOpaListP1(); }
inline J3DDrawBuffer* dComIfGd_getOpaListSky() { return g_dComIfG_gameInfo.drawlist.getOpaListSky(); }
inline J3DDrawBuffer* dComIfGd_getListFilter() { return g_dComIfG_gameInfo.drawlist.getOpaListFilter(); }
inline J3DDrawBuffer* dComIfGd_getList2D() { return g_dComIfG_gameInfo.drawlist.getOpaList2D(); }
inline J3DDrawBuffer* dComIfGd_getXluList() { return g_dComIfG_gameInfo.drawlist.getXluList(); }
inline J3DDrawBuffer* dComIfGd_getXluListP1() { return g_dComIfG_gameInfo.drawlist.getXluListP1(); }
inline void dComIfGd_setList() {
g_dComIfG_gameInfo.drawlist.setOpaList();
@@ -2659,7 +2665,7 @@ inline void dComIfGd_peekZ(s16 x, s16 y, u32 * data) { g_dComIfG_gameInfo.drawli
inline void dComIfGd_peekZdata() { g_dComIfG_gameInfo.drawlist.peekZdata(); }
inline void dComIfGd_setWindow(dDlst_window_c* pWindow) { g_dComIfG_gameInfo.drawlist.setWindow(pWindow); }
inline void dComIfGd_setViewPort(view_port_class* pViewPort) { g_dComIfG_gameInfo.drawlist.setViewPort(pViewPort); }
inline void dComIfGd_setViewport(view_port_class* pViewPort) { g_dComIfG_gameInfo.drawlist.setViewport(pViewPort); }
inline view_port_class* dComIfGd_getViewport() { return g_dComIfG_gameInfo.drawlist.getViewport(); }
inline void dComIfGd_setView(view_class* pView) { g_dComIfG_gameInfo.drawlist.setView(pView); }
inline view_class* dComIfGd_getView() { return g_dComIfG_gameInfo.drawlist.getView(); }
+28 -7
View File
@@ -347,6 +347,7 @@ public:
s32 getNum() { return mNum; }
void setColor(GXColor& color) { mColor = color; }
GXColor & getColor() { return mColor; }
void reset() { mNum = 0; }
public:
/* 0x00 */ GXColor mColor;
@@ -395,12 +396,16 @@ public:
void draw(dDlst_base_c**, dDlst_base_c**);
static void wipeIn(f32, GXColor&);
static void wipeIn(f32);
static void wipeOut(f32 rate) { wipeIn(-rate); }
static void wipeOut(f32 rate, GXColor& color) { wipeIn(-rate, color); }
static void calcWipe();
J3DDrawBuffer* getXluList() { return mpXluList; }
J3DDrawBuffer* getOpaListP1() { return mpOpaListP1; }
J3DDrawBuffer* getOpaListSky() { return mpOpaListSky; }
J3DDrawBuffer* getOpaListFilter() { return mpOpaListFilter; }
J3DDrawBuffer* getOpaList2D() { return mpOpaList2D; }
J3DDrawBuffer* getXluList() { return mpXluList; }
J3DDrawBuffer* getXluListP1() { return mpXluListP1; }
void setXluDrawList(J3DDrawBuffer* buffer) { j3dSys.setDrawBuffer(buffer, XLU_BUFFER); }
void setOpaDrawList(J3DDrawBuffer* buffer) { j3dSys.setDrawBuffer(buffer, OPA_BUFFER); }
@@ -464,11 +469,14 @@ public:
return mShadowControl.setSimple(param_0, param_1, param_2, param_3, param_4, param_5,
param_6);
}
int setRealShadow(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5, f32 param_6,
dKy_tevstr_c* pTevStr) {
return mShadowControl.setReal(id, param_2, pModel, pPos, param_5, param_6, pTevStr);
}
int setRealShadow2(u32 id, s8 param_2, J3DModel* pModel, cXyz* pPos, f32 param_5, f32 param_6,
dKy_tevstr_c* pTevStr) {
return mShadowControl.setReal2(id, param_2, pModel, pPos, param_5, param_6, pTevStr);
}
bool addRealShadow(u32 id, J3DModel* pModel) {
return mShadowControl.addReal(id, pModel);
}
@@ -476,6 +484,10 @@ public:
void drawShadow(Mtx mtx) { mShadowControl.draw(mtx); }
void imageDrawShadow(Mtx mtx) { mShadowControl.imageDraw(mtx); }
void set3DlineMat(mDoExt_3DlineMat_c* mat) {
m3DLineMatSortPacket[mat->getMaterialID()].setMat(mat);
}
void setAlphaModel(u8 type, Mtx mtx, u8 alpha) { mpAlphaModel->set(type, mtx, alpha); }
void setSpotModel(u8 type, Mtx mtx, u8 alpha) { mpSpotModel->set(type, mtx, alpha); }
void setLightModel(u8 type, Mtx mtx, u8 alpha) { mpLightModel->set(type, mtx, alpha); }
@@ -486,13 +498,18 @@ public:
s32 getSpotModelNum() { return mpSpotModel->getNum(); }
s32 getLightModelNum() { return mpLightModel->getNum(); }
void setAlphaModelColor(GXColor& color) { mpAlphaModel->setColor(color); }
void setSpotModelColor(GXColor& color) { mpSpotModel->setColor(color); }
void setLightModelColor(GXColor& color) { mpLightModel->setColor(color); }
GXColor& getAlphaModelColor() { return mpAlphaModel->getColor(); }
GXColor& getSpotModelColor() { return mpSpotModel->getColor(); }
GXColor& getLightModelColor() { return mpLightModel->getColor(); }
void resetAlphaModel() { mpAlphaModel->reset(); }
void resetSpotModel() { mpSpotModel->reset(); }
void resetLightModel() { mpLightModel->reset(); }
void setWindow(dDlst_window_c* pWindow) { mpWindow = pWindow; }
void setViewPort(view_port_class* pViewPort) { mpViewPort = pViewPort; }
void setViewport(view_port_class* pViewPort) { mpViewPort = pViewPort; }
view_port_class* getViewport() { return mpViewPort; }
void setView(view_class* pView) { mpCamera = (camera_class*)pView; }
view_class* getView() { return (view_class*)mpCamera; }
@@ -503,11 +520,18 @@ public:
void newPeekZdata(s16 x, s16 y, u32 * data) { mPeekZ.newData(x, y, data); }
void peekZdata() { mPeekZ.peekData(); }
static ResTIMG* getToonImage() { return mToonImage; }
static void setToonImage(ResTIMG* image) { mToonImage = image; }
static ResTIMG* getToonExImage() { return mToonExImage; }
static void setToonExImage(ResTIMG* image) { mToonExImage = image; }
static bool mWipe;
static GXColor mWipeColor;
static f32 mWipeRate;
static f32 mWipeSpeed;
static dDlst_2DT2_c mWipeDlst;
static ResTIMG * mToonImage;
static ResTIMG * mToonExImage;
/* 0x00000 */ J3DDrawBuffer* mpOpaListSky;
/* 0x00004 */ J3DDrawBuffer* mpXluListSky;
@@ -546,13 +570,10 @@ public:
/* 0x00250 */ dDlst_shadowControl_c mShadowControl;
/* 0x16078 */ mDoExt_3DlineMatSortPacket m3DLineMatSortPacket[2];
/* 0x160A0 */ dDlst_peekZ_c mPeekZ;
static ResTIMG * mToonImage;
static ResTIMG * mToonExImage;
}; // Size: 0x16234
STATIC_ASSERT(sizeof(dDlst_list_c) == 0x16234);
void dDlst_texSpecmapST(const cXyz*, const dKy_tevstr_c*, J3DModelData*, float);
void dDlst_texSpecmapST(const cXyz*, const dKy_tevstr_c*, J3DModelData*, f32);
#endif /* D_D_DRAWLIST_H */
+12
View File
@@ -1083,6 +1083,18 @@ int dStage_changeScene(int i_exitId, f32 speed, u32 mode, s8 room_no);
void dStage_restartRoom(u32 roomParam, u32 mode);
static inline u8 IkadaGetRoomNoArg0(fopAc_ac_c* i_actor) {
return (fopAcM_GetParam(i_actor) >> 4) & 0x3F;
}
static inline u8 IkadaGetLinkIdArg1(fopAc_ac_c* i_actor) {
return (fopAcM_GetParam(i_actor) >> 10) & 0xFF;
}
static inline u8 IkadaGetIkadaIdArg2(fopAc_ac_c* i_actor) {
return (fopAcM_GetParam(i_actor) >> 0x12) & 0xFF;
}
inline int IkadaGetIkadaIdArgPrm(u32 param) {
return (param >> 0x12) & 0xFF;
}
+2 -2
View File
@@ -4,8 +4,8 @@
#include "dolphin/gx/GXEnum.h"
#include "dolphin/mtx/mtx.h"
void GFLoadPosMtxImm(MtxP, GXPosNrmMtx);
void GFLoadNrmMtxImm(MtxP, GXPosNrmMtx);
void GFLoadPosMtxImm(MtxP, u32);
void GFLoadNrmMtxImm(MtxP, u32);
void GFSetCurrentMtx(u32, u32, u32, u32, u32, u32, u32, u32, u32);
#endif /* GFTRANSFORM_H */
+19 -5
View File
@@ -450,7 +450,12 @@ public:
class mDoExt_3DlineMat_c {
public:
/* 0x0 */ void* field_0x0;
virtual int getMaterialID() = 0;
virtual void setMaterial() = 0;
virtual void draw() = 0;
public:
/* 0x0 */ /* vtable */
/* 0x4 */ mDoExt_3DlineMat_c* field_0x4;
};
@@ -460,7 +465,7 @@ public:
void reset() { mp3DlineMat = NULL; }
void setMat(mDoExt_3DlineMat_c* pMat) { mp3DlineMat = pMat; }
void setMat(mDoExt_3DlineMat_c* pMat);
virtual void draw();
virtual ~mDoExt_3DlineMatSortPacket();
@@ -582,7 +587,7 @@ public:
/* 0x10 */ cXy* mTexArr[2];
};
class mDoExt_3DlineMat0_c {
class mDoExt_3DlineMat0_c : public mDoExt_3DlineMat_c {
public:
int init(u16, u16, int);
void setMaterial();
@@ -590,9 +595,19 @@ public:
void update(u16, f32, GXColor&, u16, dKy_tevstr_c*);
void update(u16, GXColor&, dKy_tevstr_c*);
int getMaterialID();
public:
/* 0x08 */ GXColor mColor;
/* 0x0C */ dKy_tevstr_c* m0C;
/* 0x10 */ s16 mNumLines;
/* 0x12 */ s16 mNumSegmentsPerLine;
/* 0x14 */ u16 m14;
/* 0x16 */ u8 m16;
/* 0x17 */ u8 m17[0x18 - 0x17];
/* 0x18 */ mDoExt_3Dline_c* mpLines;
};
class mDoExt_3DlineMat1_c {
class mDoExt_3DlineMat1_c : public mDoExt_3DlineMat_c {
public:
int init(u16, u16, ResTIMG*, int);
void setMaterial();
@@ -602,7 +617,6 @@ public:
int getMaterialID();
public:
/* 0x00 */ mDoExt_3DlineMat_c parent;
/* 0x08 */ GXTexObj mTexObj;
/* 0x28 */ GXColor mColor;
/* 0x2C */ dKy_tevstr_c* mpTevStr;
+2
View File
@@ -5,10 +5,12 @@
#include "d/actor/d_a_boko.h"
#include "dolphin/types.h"
#include "d/d_com_inf_game.h"
/* 000000EC-0000017C .text keDraw__8daBoko_cFv */
void daBoko_c::keDraw() {
/* Nonmatching */
dComIfGd_set3DlineMat(mpLineMat);
}
/* 0000017C-00000620 .text keCalc1__8daBoko_cFP6ke_c_si */
+13 -13
View File
@@ -494,14 +494,13 @@ char l_bonbori2DL[0x2a8] ALIGN_DECL(32) = {};
/* 80082838-80082E44 .text draw__22dDlst_alphaModelData_cFPA4_f */
void dDlst_alphaModelData_c::draw(Mtx viewMtx) {
/* Nonmatching - color and data order */
Mtx mtx;
MTXConcat(viewMtx, mpMtx, mtx);
GFLoadPosMtxImm(mtx, GX_PNMTX0);
GFSetCurrentMtx(GX_PNMTX0, GX_IDENTITY, GX_IDENTITY, GX_IDENTITY, GX_IDENTITY, GX_IDENTITY, GX_IDENTITY, GX_IDENTITY, GX_IDENTITY);
GXColor color = { 0, 0, 0, 0 };
color.a = mAlpha;
GXColor color;
color.a = mAlpha * 4;
GFSetChanMatColor(GX_ALPHA0, color);
if (mType == 0) {
@@ -586,7 +585,7 @@ void dDlst_alphaModelData_c::draw(Mtx viewMtx) {
GFSetArray(GX_VA_POS, l_cubePos, sizeof(*l_cubePos));
GXCallDisplayList(l_backRevZMat, 0x40);
GXCallDisplayList(l_frontZMat, 0x20);
GXCallDisplayList(l_cubeDL, 0xe0);
GXCallDisplayList(l_cubeDL, 0x40);
} else if (mType == 4) {
/* Bonbori2 */
GFSetArray(GX_VA_POS, l_bonbori2Pos, sizeof(*l_bonbori2Pos));
@@ -709,7 +708,6 @@ char l_shadowVolumeDL[] = {
/* 80083064-800832C4 .text draw__22dDlst_alphaModelPacketFv */
void dDlst_alphaModelPacket::draw() {
/* Nonmatching */
GXSetNumChans(1);
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_REG, 0, GX_DF_NONE, GX_AF_NONE);
GXSetChanMatColor(GX_COLOR0A0, mColor);
@@ -917,7 +915,6 @@ void dDlst_shadowControl_c::draw(Mtx) {
/* 800850D4-80085170 .text setReal__21dDlst_shadowControl_cFUlScP8J3DModelP4cXyzffP12dKy_tevstr_c */
int dDlst_shadowControl_c::setReal(u32 key, s8 size, J3DModel* model, cXyz* pos, f32 f0, f32 f1, dKy_tevstr_c* tevstr) {
/* Nonmatching */
if (key != 0) {
dDlst_shadowReal_c * real = &mReal[0];
for (s32 i = 0; i < (s32)ARRAY_SIZE(mReal); i++, real++) {
@@ -977,7 +974,6 @@ bool dDlst_shadowControl_c::addReal(u32 key, J3DModel* model) {
/* 80085274-800852D8 .text setSimple__21dDlst_shadowControl_cFP4cXyzffP4cXyzsfP9_GXTexObj */
int dDlst_shadowControl_c::setSimple(cXyz* pos, f32 f0, f32 f1, cXyz* floor_nrm, s16 rotY, f32 f2, GXTexObj* tex) {
/* Nonmatching */
if (floor_nrm == NULL || mSimpleNum >= ARRAY_SIZE(mSimple))
return false;
@@ -1205,12 +1201,12 @@ void dDlst_list_c::reset() {
mp2DOpaTop = &mp2DOpaTopArr[0];
mp2DOpa = &mp2DOpaArr[0];
mp2DXlu = &mp2DXluArr[0];
g_dComIfG_gameInfo.drawlist.mpAlphaModel->mNum = 0;
g_dComIfG_gameInfo.drawlist.mpSpotModel->mNum = 0;
g_dComIfG_gameInfo.drawlist.mpLightModel->mNum = 0;
dComIfGd_resetAlphaModel();
dComIfGd_resetSpotModel();
dComIfGd_resetLightModel();
mShadowControl.reset();
for (u32 i = 0; i < ARRAY_SIZE(m3DLineMatSortPacket); i++)
m3DLineMatSortPacket[i].setMat(NULL);
m3DLineMatSortPacket[i].reset();
}
/* 80086490-80086540 .text entryZSortXluDrawList__12dDlst_list_cFP13J3DDrawBufferP9J3DPacketR4cXyz */
@@ -1249,7 +1245,11 @@ void dDlst_list_c::wipeIn(f32 speed, GXColor& color) {
mWipe = true;
mWipeSpeed = speed;
mWipeColor = color;
mWipeRate = speed >= 0.0f ? 1.0f : 0.0f;
if (speed >= 0.0f) {
mWipeRate = 0.0f;
} else {
mWipeRate = 1.0f;
}
ResTIMG* texture = (ResTIMG*)JKRGetResource('TIMG', "wipe_00.bti", dComIfGp_getMenuArchive());
JUT_ASSERT(0x1637, texture != 0);
mWipeDlst.init(texture, -9.0f, -21.0f, 659.0f, 524.0f, 0, 1, 1, 2.0f, 2.436f);
@@ -1257,7 +1257,7 @@ void dDlst_list_c::wipeIn(f32 speed, GXColor& color) {
/* 800866C8-800866F0 .text wipeIn__12dDlst_list_cFf */
void dDlst_list_c::wipeIn(f32 time) {
wipeIn(-time, g_blackColor);
wipeOut(time, g_blackColor);
}
/* 800866F0-80086790 .text calcWipe__12dDlst_list_cFv */
+1 -1
View File
@@ -637,7 +637,7 @@ void dEvDtStaff_c::specialProcDirector() {
{
f32* rate = dComIfGp_evmng_getMyFloatP(staffIdx, "Rate");
JUT_ASSERT(0x384, rate);
dDlst_list_c::wipeIn(-*rate);
dDlst_list_c::wipeOut(*rate);
if (*rate > 0.0f)
mWipeDirection = 0;
else
+14 -14
View File
@@ -1776,8 +1776,8 @@ void setLightTevColorType_sub(J3DMaterial* i_material, dKy_tevstr_c* i_tevstr) {
fog_p->getFogInfo()->mStartZ = fog_p->getFogInfo()->mEndZ;
}
fog_p->getFogInfo()->mNearZ = g_dComIfG_gameInfo.drawlist.mpCamera->mNear;
fog_p->getFogInfo()->mFarZ = g_dComIfG_gameInfo.drawlist.mpCamera->mFar;
fog_p->getFogInfo()->mNearZ = dComIfGd_getView()->mNear;
fog_p->getFogInfo()->mFarZ = dComIfGd_getView()->mFar;
fog_p->getFogInfo()->mColor.r = i_tevstr->mFogColor.r;
fog_p->getFogInfo()->mColor.g = i_tevstr->mFogColor.g;
fog_p->getFogInfo()->mColor.b = i_tevstr->mFogColor.b;
@@ -3091,10 +3091,10 @@ void GxFogSet_Sub(GXColor* pFogColor) {
fogColor.b = pFogColor->b;
fogColor.a = pFogColor->a;
if (g_dComIfG_gameInfo.drawlist.mpCamera != NULL) {
if (g_dComIfG_gameInfo.drawlist.mpCamera->mNear >= 0.0f && g_dComIfG_gameInfo.drawlist.mpCamera->mFar >= 0.0f && g_dComIfG_gameInfo.drawlist.mpCamera->mNear < g_dComIfG_gameInfo.drawlist.mpCamera->mFar) {
near = g_dComIfG_gameInfo.drawlist.mpCamera->mNear;
far = g_dComIfG_gameInfo.drawlist.mpCamera->mFar;
if (dComIfGd_getView() != NULL) {
if (dComIfGd_getView()->mNear >= 0.0f && dComIfGd_getView()->mFar >= 0.0f && dComIfGd_getView()->mNear < dComIfGd_getView()->mFar) {
near = dComIfGd_getView()->mNear;
far = dComIfGd_getView()->mFar;
}
}
@@ -3141,10 +3141,10 @@ void dKy_GxFog_tevstr_set(dKy_tevstr_c* pTevStr) {
fogColor.g = pTevStr->mFogColor.g;
fogColor.b = pTevStr->mFogColor.b;
if (g_dComIfG_gameInfo.drawlist.mpCamera != NULL) {
if (g_dComIfG_gameInfo.drawlist.mpCamera->mNear >= 0.0f && g_dComIfG_gameInfo.drawlist.mpCamera->mFar >= 0.0f && g_dComIfG_gameInfo.drawlist.mpCamera->mNear < g_dComIfG_gameInfo.drawlist.mpCamera->mFar) {
near = g_dComIfG_gameInfo.drawlist.mpCamera->mNear;
far = g_dComIfG_gameInfo.drawlist.mpCamera->mFar;
if (dComIfGd_getView() != NULL) {
if (dComIfGd_getView()->mNear >= 0.0f && dComIfGd_getView()->mFar >= 0.0f && dComIfGd_getView()->mNear < dComIfGd_getView()->mFar) {
near = dComIfGd_getView()->mNear;
far = dComIfGd_getView()->mFar;
}
}
@@ -3162,10 +3162,10 @@ void dKy_GfFog_tevstr_set(dKy_tevstr_c* pTevStr) {
fogColor.g = pTevStr->mFogColor.g;
fogColor.b = pTevStr->mFogColor.b;
if (g_dComIfG_gameInfo.drawlist.mpCamera != NULL) {
if (g_dComIfG_gameInfo.drawlist.mpCamera->mNear >= 0.0f && g_dComIfG_gameInfo.drawlist.mpCamera->mFar >= 0.0f && g_dComIfG_gameInfo.drawlist.mpCamera->mNear < g_dComIfG_gameInfo.drawlist.mpCamera->mFar) {
near = g_dComIfG_gameInfo.drawlist.mpCamera->mNear;
far = g_dComIfG_gameInfo.drawlist.mpCamera->mFar;
if (dComIfGd_getView() != NULL) {
if (dComIfGd_getView()->mNear >= 0.0f && dComIfGd_getView()->mFar >= 0.0f && dComIfGd_getView()->mNear < dComIfGd_getView()->mFar) {
near = dComIfGd_getView()->mNear;
far = dComIfGd_getView()->mFar;
}
}
+4 -4
View File
@@ -76,9 +76,9 @@ static void setToonTex(J3DModelData* pModel) {
const char * pName = pTextureName->getName(i);
if (pName[0] == 'Z') {
if (pName[1] == 'A')
pTexture->setResTIMG(i, *dDlst_list_c::mToonImage);
pTexture->setResTIMG(i, *dDlst_list_c::getToonImage());
else if (pName[1] == 'B')
pTexture->setResTIMG(i, *dDlst_list_c::mToonExImage);
pTexture->setResTIMG(i, *dDlst_list_c::getToonExImage());
}
}
@@ -120,9 +120,9 @@ static void setToonTex(J3DMaterialTable* pMaterialTable) {
const char * pName = pTextureName->getName(i);
if (pName[0] == 'Z') {
if (pName[1] == 'A')
pTexture->setResTIMG(i, *dDlst_list_c::mToonImage);
pTexture->setResTIMG(i, *dDlst_list_c::getToonImage());
else if (pName[1] == 'B')
pTexture->setResTIMG(i, *dDlst_list_c::mToonExImage);
pTexture->setResTIMG(i, *dDlst_list_c::getToonExImage());
}
}
+2 -2
View File
@@ -722,11 +722,11 @@ s32 phase_1(dScnLogo_c* i_this) {
toonImage = (ResTIMG *)dComIfG_getObjectRes("System", 3);
JUT_ASSERT(VERSION_SELECT(1208, 1426, 1466), toonImage != 0);
dDlst_list_c::mToonImage = toonImage;
dDlst_list_c::setToonImage(toonImage);
toonImage = (ResTIMG *)dComIfG_getObjectRes("System", 4);
JUT_ASSERT(VERSION_SELECT(1213, 1431, 1471), toonImage != 0);
dDlst_list_c::mToonExImage = toonImage;
dDlst_list_c::setToonExImage(toonImage);
i_this->field_0x1f8 = mDoExt_getGameHeap()->alloc(0x3c8a0, 4);
return cPhs_NEXT_e;
+1 -1
View File
@@ -64,7 +64,7 @@ BOOL dScnOpen_c::execute() {
/* 80232CAC-80232D38 .text draw__10dScnOpen_cFv */
BOOL dScnOpen_c::draw() {
dComIfGd_setWindow(dComIfGp_getWindow(0));
dComIfGd_setViewPort(dComIfGp_getWindow(0)->getViewPort());
dComIfGd_setViewport(dComIfGp_getWindow(0)->getViewPort());
for (create_tag_class* pTag = fopDwIt_Begin(); pTag != NULL; pTag = fopDwIt_Next(pTag))
fpcM_Draw(pTag->mpTagData);
dComIfGd_set2DOpa(mpProc);
-12
View File
@@ -2239,18 +2239,6 @@ void dStage_roomControl_c::SetTimePass(int i_timepass) {
m_time_pass = i_timepass;
}
static inline u8 IkadaGetRoomNoArg0(fopAc_ac_c* i_actor) {
return (fopAcM_GetParam(i_actor) >> 4) & 0x3F;
}
static inline u8 IkadaGetLinkIdArg1(fopAc_ac_c* i_actor) {
return (fopAcM_GetParam(i_actor) >> 10) & 0xFF;
}
static inline u8 IkadaGetIkadaIdArg2(fopAc_ac_c* i_actor) {
return (fopAcM_GetParam(i_actor) >> 0x12) & 0xFF;
}
/* 8004360C-80043900 .text dStage_changeSceneExitId__FR13cBgS_PolyInfofUlSc */
int dStage_changeSceneExitId(cBgS_PolyInfo& i_poly, f32 i_speed, u32 i_mode, s8 i_roomNo) {
int exit_id = dComIfG_Bgsp()->GetExitId(i_poly);
+4 -4
View File
@@ -1514,10 +1514,10 @@ void mDoExt_3DlineMat1_c::update(u16, _GXColor&, dKy_tevstr_c*) {
JUT_ASSERT(5243, size_p != 0);
}
// /* 80016518-8001657C .text setMat__26mDoExt_3DlineMatSortPacketFP18mDoExt_3DlineMat_c */
// void mDoExt_3DlineMatSortPacket::setMat(mDoExt_3DlineMat_c*) {
// /* Nonmatching */
// }
/* 80016518-8001657C .text setMat__26mDoExt_3DlineMatSortPacketFP18mDoExt_3DlineMat_c */
void mDoExt_3DlineMatSortPacket::setMat(mDoExt_3DlineMat_c* pMat) {
/* Nonmatching */
}
/* 8001657C-800165E4 .text draw__26mDoExt_3DlineMatSortPacketFv */
void mDoExt_3DlineMatSortPacket::draw() {