mirror of
https://github.com/zeldaret/tww.git
synced 2026-09-09 19:51:20 -04:00
Add drawlist inlines
This commit is contained in:
@@ -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
@@ -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 */
|
||||
|
||||
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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);
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user