mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-04 10:26:16 -04:00
Merge branch 'main' of https://github.com/TwilitRealm/dusk into randomizer
This commit is contained in:
Vendored
+1
-1
Submodule extern/aurora updated: 49e61d7dad...59349fb982
@@ -198,6 +198,7 @@ struct HOUSI_EFF {
|
||||
/* 0x4C */ u16 field_0x4c;
|
||||
}; // Size: 0x50
|
||||
|
||||
// Housi is the rising square particles in Twilight
|
||||
class dKankyo_housi_Packet : public J3DPacket {
|
||||
public:
|
||||
virtual void draw();
|
||||
@@ -208,7 +209,7 @@ public:
|
||||
/* 0x0020 */ HOUSI_EFF mHousiEff[300];
|
||||
/* 0x5DE0 */ u8 field_0x5de0[8];
|
||||
/* 0x5DE8 */ f32 field_0x5de8;
|
||||
/* 0x5DEC */ s16 field_0x5dec;
|
||||
/* 0x5DEC */ s16 mHousiCount;
|
||||
}; // Size: 0x5DF0
|
||||
|
||||
struct CLOUD_EFF {
|
||||
|
||||
@@ -3,6 +3,8 @@
|
||||
#include "JSystem/J2DGraph/J2DGrafContext.h"
|
||||
#include <gx.h>
|
||||
|
||||
#include <tracy/Tracy.hpp>
|
||||
|
||||
J2DGrafContext::J2DGrafContext(f32 x, f32 y, f32 width, f32 height)
|
||||
: mBounds(x, y, x + width, y + height), mScissorBounds(x, y, x + width, y + height) {
|
||||
if (x < 0.0f || y < 0.0f) {
|
||||
@@ -137,6 +139,7 @@ void J2DGrafContext::setLineWidth(u8 lineWidth) {
|
||||
}
|
||||
|
||||
void J2DGrafContext::fillBox(JGeometry::TBox2<f32> const& box) {
|
||||
ZoneScoped;
|
||||
GXSetBlendMode((GXBlendMode)mBoxPart.mType, (GXBlendFactor)mBoxPart.mSrcFactor,
|
||||
(GXBlendFactor)mBoxPart.mDstFactor, GX_LO_SET);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
@@ -155,6 +158,7 @@ void J2DGrafContext::fillBox(JGeometry::TBox2<f32> const& box) {
|
||||
}
|
||||
|
||||
void J2DGrafContext::drawFrame(JGeometry::TBox2<f32> const& box) {
|
||||
ZoneScoped;
|
||||
GXSetBlendMode((GXBlendMode)mBoxPart.mType, (GXBlendFactor)mBoxPart.mSrcFactor,
|
||||
(GXBlendFactor)mBoxPart.mDstFactor, GX_LO_SET);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
@@ -175,6 +179,7 @@ void J2DGrafContext::drawFrame(JGeometry::TBox2<f32> const& box) {
|
||||
}
|
||||
|
||||
void J2DGrafContext::line(JGeometry::TVec2<f32> start, JGeometry::TVec2<f32> end) {
|
||||
ZoneScoped;
|
||||
GXSetBlendMode((GXBlendMode)mLinePart.mType, (GXBlendFactor)mLinePart.mSrcFactor,
|
||||
(GXBlendFactor)mLinePart.mDstFactor, GX_LO_SET);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
|
||||
@@ -249,6 +249,7 @@ f32 JUTResFont::drawChar_scale(f32 pos_x, f32 pos_y, f32 scale_x, f32 scale_y, i
|
||||
f32 x2;
|
||||
f32 y1;
|
||||
|
||||
ZoneScoped;
|
||||
JUT_ASSERT(378, mValid);
|
||||
JUTFont::TWidth width;
|
||||
loadFont(str_int, GX_TEXMAP0, &width FONT_DRAW_CTX_ARG);
|
||||
|
||||
@@ -2028,6 +2028,7 @@ void daAlink_blur_c::traceBlur(cXyz const* param_0, cXyz const* param_1, s16 par
|
||||
}
|
||||
|
||||
void daAlink_blur_c::draw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
|
||||
#ifdef TARGET_PC
|
||||
|
||||
@@ -305,6 +305,7 @@ static void mant_build_anchor_frame(const cXyz& anchor_a, const cXyz& anchor_b,
|
||||
#endif
|
||||
|
||||
void daMant_packet_c::draw() {
|
||||
ZoneScoped;
|
||||
#if TARGET_PC
|
||||
void* image = l_Egnd_mantTEX;
|
||||
void* lut = l_Egnd_mantPAL;
|
||||
|
||||
@@ -105,6 +105,7 @@ int dMirror_packet_c::entryModel(J3DModel* i_model) {
|
||||
|
||||
void dMirror_packet_c::mirrorZdraw(f32* param_0, f32* param_1, f32 param_2, f32 param_3,
|
||||
f32 param_4, f32 param_5, f32 param_6, f32 param_7) {
|
||||
ZoneScoped;
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_FALSE, GX_SRC_REG, GX_SRC_REG, 0, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetNumTexGens(0);
|
||||
@@ -265,6 +266,7 @@ void dMirror_packet_c::modelDraw(J3DModel* i_model, Mtx param_1) {
|
||||
}
|
||||
|
||||
void dMirror_packet_c::mainDraw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
|
||||
cXyz sp19C[5];
|
||||
|
||||
@@ -261,6 +261,7 @@ void FlagCloth_c::execute() {
|
||||
}
|
||||
|
||||
void FlagCloth_c::draw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
dKy_setLight_again();
|
||||
|
||||
@@ -220,6 +220,7 @@ void FlagCloth2_c::initCcSphere(fopAc_ac_c*) {
|
||||
}
|
||||
|
||||
inline void FlagCloth2_c::draw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
dKy_setLight_again();
|
||||
|
||||
@@ -392,6 +392,7 @@ static const u8* l_sightDL_get() {
|
||||
#endif
|
||||
|
||||
void daPy_sightPacket_c::draw() {
|
||||
ZoneScoped;
|
||||
TGXTexObj texObj;
|
||||
|
||||
j3dSys.reinitGX();
|
||||
|
||||
@@ -598,6 +598,7 @@ dFlower_packet_c::dFlower_packet_c() {
|
||||
}
|
||||
|
||||
void dFlower_packet_c::draw() {
|
||||
ZoneScoped;
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
j3dSys.reinitGX();
|
||||
|
||||
|
||||
@@ -518,6 +518,7 @@ dGrass_packet_c::dGrass_packet_c() {
|
||||
}
|
||||
|
||||
void dGrass_packet_c::draw() {
|
||||
ZoneScoped;
|
||||
dScnKy_env_light_c* kankyo = dKy_getEnvlight();
|
||||
cXyz spB4;
|
||||
cXyz spA8;
|
||||
|
||||
@@ -188,6 +188,7 @@ void dDlst_window_c::setScissor(f32 xOrig, f32 yOrig, f32 width, f32 height) {
|
||||
}
|
||||
|
||||
void dDlst_2DTri_c::draw() {
|
||||
ZoneScoped;
|
||||
f32 f4;
|
||||
f32 f5;
|
||||
f32 f2 = cM_scos(field_0xc);
|
||||
@@ -224,6 +225,7 @@ void dDlst_2DTri_c::draw() {
|
||||
}
|
||||
|
||||
void dDlst_2DQuad_c::draw() {
|
||||
ZoneScoped;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
@@ -247,6 +249,7 @@ void dDlst_2DQuad_c::draw() {
|
||||
}
|
||||
|
||||
void dDlst_2DPoint_c::draw() {
|
||||
ZoneScoped;
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
@@ -268,6 +271,7 @@ void dDlst_2DPoint_c::draw() {
|
||||
}
|
||||
|
||||
void dDlst_2DT_c::draw() {
|
||||
ZoneScoped;
|
||||
static GXColor l_color = {0xFF, 0xFF, 0xFF, 0xE0};
|
||||
f32 var5 = field_0xe;
|
||||
f32 var6 = field_0x10;
|
||||
@@ -326,6 +330,7 @@ void dDlst_2DT_c::draw() {
|
||||
}
|
||||
|
||||
void dDlst_2DT2_c::draw() {
|
||||
ZoneScoped;
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA6, 0);
|
||||
GXClearVtxDesc();
|
||||
@@ -665,6 +670,7 @@ void dDlst_2DT2_c::init(ResTIMG* i_timg, f32 param_1, f32 param_2, f32 param_3,
|
||||
}
|
||||
|
||||
void dDlst_2DM_c::draw() {
|
||||
ZoneScoped;
|
||||
s16 r31 = field_0x22;
|
||||
s16 r30 = field_0x24;
|
||||
int r29 = field_0x22 + 256.0f;
|
||||
@@ -728,6 +734,7 @@ void dDlst_2DM_c::draw() {
|
||||
|
||||
|
||||
void dDlst_2Dm_c::draw() {
|
||||
ZoneScoped;
|
||||
s16 r31 = field_0x48;
|
||||
s16 r30 = field_0x4a;
|
||||
int r29 = field_0x48 + 256.0f;
|
||||
@@ -794,6 +801,7 @@ void dDlst_2Dm_c::draw() {
|
||||
|
||||
|
||||
void dDlst_2DMt_c::draw() {
|
||||
ZoneScoped;
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
@@ -933,6 +941,7 @@ f32 cM_rnd_c::getValue(f32 param_0, f32 param_1) {
|
||||
}
|
||||
|
||||
void dDlst_effectLine_c::draw() {
|
||||
ZoneScoped;
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
@@ -1034,6 +1043,7 @@ void dDlst_shadowPoly_c::draw() {
|
||||
return;
|
||||
#endif
|
||||
|
||||
ZoneScoped;
|
||||
dDlst_shadowTri_c* tri = getTri();
|
||||
|
||||
GXBegin(GX_TRIANGLES, GX_VTXFMT0, mCount * 3);
|
||||
@@ -1610,6 +1620,7 @@ void dDlst_shadowControl_c::imageDraw(Mtx param_0) {
|
||||
}
|
||||
|
||||
void dDlst_shadowControl_c::draw(Mtx param_0) {
|
||||
ZoneScoped;
|
||||
static GXTevColorChan l_tevColorChan[4] = {
|
||||
GX_CH_RED,
|
||||
GX_CH_GREEN,
|
||||
|
||||
+97
-27
@@ -929,7 +929,7 @@ void dKyr_housi_move() {
|
||||
if (g_env_light.mHousiCount != 0 ||
|
||||
(g_env_light.mHousiCount == 0 && housi_packet->field_0x5de8 <= 0.0f))
|
||||
{
|
||||
housi_packet->field_0x5dec = g_env_light.mHousiCount;
|
||||
housi_packet->mHousiCount = g_env_light.mHousiCount;
|
||||
}
|
||||
|
||||
if (g_env_light.mHousiCount != 0) {
|
||||
@@ -938,7 +938,7 @@ void dKyr_housi_move() {
|
||||
cLib_addCalc(&housi_packet->field_0x5de8, 0.0f, 0.2f, 0.05f, 0.01f);
|
||||
}
|
||||
|
||||
if (housi_packet->field_0x5dec == 0) {
|
||||
if (housi_packet->mHousiCount == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -977,7 +977,7 @@ void dKyr_housi_move() {
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = housi_packet->field_0x5dec - 1; i >= 0; i--) {
|
||||
for (int i = housi_packet->mHousiCount - 1; i >= 0; i--) {
|
||||
f32 var_f26 = 0.4f * housi_packet->field_0x5de8;
|
||||
effect = &housi_packet->mHousiEff[i];
|
||||
|
||||
@@ -2025,16 +2025,27 @@ void vrkumo_move() {
|
||||
}
|
||||
}
|
||||
|
||||
static void dKr_cullVtx_Set() {
|
||||
static void dKr_cullVtx_Set(IF_DUSK(bool const vtxColor = false)) {
|
||||
GXSetCullMode(GX_CULL_NONE);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA4, 8);
|
||||
#if TARGET_PC
|
||||
if (vtxColor) {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
}
|
||||
#endif
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
#if TARGET_PC
|
||||
if (vtxColor) {
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
static void dKyr_draw_rev_moon(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dKankyo_sun_Packet* sun_packet = g_env_light.mpSunPacket;
|
||||
dKankyo_sunlenz_Packet* lenz_packet = g_env_light.mpSunLenzPacket;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
@@ -2680,6 +2691,7 @@ void dKyr_drawSun(Mtx drawMtx, cXyz* ppos, GXColor& unused, u8** tex) {
|
||||
}
|
||||
|
||||
void dKyr_drawLenzflare(Mtx drawMtx, cXyz* ppos, GXColor& param_2, u8** tex) {
|
||||
ZoneScoped;
|
||||
dKankyo_sunlenz_Packet* lenz_packet = g_env_light.mpSunLenzPacket;
|
||||
dKankyo_sun_Packet* sun_packet = g_env_light.mpSunPacket;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
@@ -3378,6 +3390,7 @@ void dKyr_drawSibuki(Mtx drawMtx, u8** tex) {
|
||||
}
|
||||
|
||||
void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dKankyo_housi_Packet* housi_packet = g_env_light.mpHousiPacket;
|
||||
static f32 rot = 0.0f;
|
||||
|
||||
@@ -3389,10 +3402,10 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
Vec spC4;
|
||||
Vec spB8;
|
||||
|
||||
bool var_r28 = 0;
|
||||
if (housi_packet->field_0x5dec != 0) {
|
||||
bool isPalaceOfTwilight = 0;
|
||||
if (housi_packet->mHousiCount != 0) {
|
||||
if (strcmp(dComIfGp_getStartStageName(), "D_MN08") == 0) {
|
||||
var_r28 = 1;
|
||||
isPalaceOfTwilight = 1;
|
||||
}
|
||||
|
||||
if (strcmp(dComIfGp_getStartStageName(), "D_MN08") != 0 ||
|
||||
@@ -3419,7 +3432,7 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
color_reg1.b = 0xCA;
|
||||
color_reg1.a = 0xFF;
|
||||
|
||||
if (dKy_darkworld_check() == 1 || var_r28 == 1) {
|
||||
if (dKy_darkworld_check() == 1 || isPalaceOfTwilight == 1) {
|
||||
color_reg0.r = 0;
|
||||
color_reg0.g = 0;
|
||||
color_reg0.b = 0;
|
||||
@@ -3472,17 +3485,22 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
|
||||
for (int i = 0; i < 1; i++) {
|
||||
dKyr_set_btitex(&spDC, (ResTIMG*)*tex);
|
||||
#if TARGET_PC
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_DISABLE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_CLAMP, GX_AF_NONE);
|
||||
#else
|
||||
GXSetNumChans(0);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
#endif
|
||||
GXSetTevColor(GX_TEVREG1, color_reg1);
|
||||
GXSetNumTexGens(1);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_C1, GX_CC_C0, GX_CC_TEXC, GX_CC_ZERO);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, DUSK_IF_ELSE(GX_COLOR0A0, GX_COLOR_NULL));
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_C1, DUSK_IF_ELSE(GX_CC_RASC, GX_CC_C0), GX_CC_TEXC, GX_CC_ZERO);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE,
|
||||
GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_A0, GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, DUSK_IF_ELSE(GX_CA_RASA, GX_CA_CA), GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE,
|
||||
GX_TEVPREV);
|
||||
|
||||
@@ -3505,7 +3523,7 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
|
||||
GXSetClipMode(GX_CLIP_DISABLE);
|
||||
GXSetNumIndStages(0);
|
||||
dKr_cullVtx_Set();
|
||||
dKr_cullVtx_Set(IF_DUSK(true));
|
||||
|
||||
rot += 1.2f;
|
||||
MTXRotRad(rotMtx, 'Z', DEG_TO_RAD(rot));
|
||||
@@ -3514,7 +3532,13 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
GXLoadPosMtxImm(drawMtx, GX_PNMTX0);
|
||||
GXSetCurrentMtx(GX_PNMTX0);
|
||||
|
||||
for (int j = 0; j < housi_packet->field_0x5dec; j++) {
|
||||
#if TARGET_PC
|
||||
// Dusklight optimization: we submit a single large draw call, rather than hundreds.
|
||||
u32 vertCount = 4 * housi_packet->mHousiCount;
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, vertCount);
|
||||
#endif
|
||||
|
||||
for (int j = 0; j < housi_packet->mHousiCount; j++) {
|
||||
fopAc_ac_c* player = dComIfGp_getPlayer(0);
|
||||
|
||||
spD0.x =
|
||||
@@ -3525,6 +3549,10 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
housi_packet->mHousiEff[j].mBasePos.z + housi_packet->mHousiEff[j].mPosition.z;
|
||||
|
||||
if (i == 1 && j == 0) {
|
||||
#if TARGET_PC
|
||||
// Never gets hit I think?
|
||||
abort();
|
||||
#endif
|
||||
color_reg0.r = 0;
|
||||
color_reg0.g = 0;
|
||||
color_reg0.b = 0;
|
||||
@@ -3553,8 +3581,10 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
color_reg0.a = housi_packet->mHousiEff[j].mAlpha * var_f25;
|
||||
|
||||
block_14:
|
||||
#if !TARGET_PC // GXLoadTextObj does nothing, TEV colors replaced with vertex colors
|
||||
GXLoadTexObj(&spDC, GX_TEXMAP0);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
#endif
|
||||
|
||||
f32 var_f27 = housi_packet->mHousiEff[j].field_0x48 * 9.0f;
|
||||
if (g_env_light.field_0xea9 == 1) {
|
||||
@@ -3566,7 +3596,7 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
f32 temp_f30 =
|
||||
(var_f27 * 0.2f) * cM_fcos(housi_packet->mHousiEff[j].mScale.y * 6.0f);
|
||||
|
||||
if (dKy_darkworld_check() == 1 || var_r28 == 1) {
|
||||
if (dKy_darkworld_check() == 1 || isPalaceOfTwilight == 1) {
|
||||
cXyz sp7C[] = {
|
||||
cXyz(-1.0f, -0.5f, 0.0f),
|
||||
cXyz(-1.0f, 1.5f, 0.0f),
|
||||
@@ -3711,24 +3741,34 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
pos[3].z = spD0.z + spB8.z;
|
||||
}
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
IF_NOT_DUSK(GXBegin(GX_QUADS, GX_VTXFMT0, 4));
|
||||
|
||||
s16 var_r17 = 0x1FF;
|
||||
if (dKy_darkworld_check() == true || var_r28 == 1) {
|
||||
if (dKy_darkworld_check() == true || isPalaceOfTwilight == 1) {
|
||||
var_r17 = 0xFA;
|
||||
}
|
||||
|
||||
GXPosition3f32(pos[0].x, pos[0].y, pos[0].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0);
|
||||
GXPosition3f32(pos[1].x, pos[1].y, pos[1].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(var_r17, 0);
|
||||
GXPosition3f32(pos[2].x, pos[2].y, pos[2].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(var_r17, var_r17);
|
||||
GXPosition3f32(pos[3].x, pos[3].y, pos[3].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, var_r17);
|
||||
GXEnd();
|
||||
|
||||
|
||||
IF_NOT_DUSK(GXEnd());
|
||||
}
|
||||
}
|
||||
|
||||
#if TARGET_PC
|
||||
GXEnd();
|
||||
#endif
|
||||
}
|
||||
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
@@ -3738,6 +3778,7 @@ void dKyr_drawHousi(Mtx drawMtx, u8** tex) {
|
||||
}
|
||||
|
||||
void dKyr_drawSnow(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
dKankyo_snow_Packet* snow_packet = g_env_light.mpSnowPacket;
|
||||
|
||||
@@ -3803,23 +3844,30 @@ void dKyr_drawSnow(Mtx drawMtx, u8** tex) {
|
||||
if (tex[0] != NULL) {
|
||||
TGXTexObj spA0;
|
||||
dKyr_set_btitex(&spA0, (ResTIMG*)tex[0]);
|
||||
#if TARGET_PC
|
||||
// Dusklight optimization: enable draw call merging
|
||||
// by using vertex color instead of GX_TEVREG0
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_DISABLE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_CLAMP, GX_AF_NONE);
|
||||
#else
|
||||
GXSetNumChans(0);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
#endif
|
||||
GXSetTevColor(GX_TEVREG1, color_reg1);
|
||||
GXSetNumTexGens(1);
|
||||
GXSetTexCoordGen(GX_TEXCOORD0, GX_TG_MTX2x4, GX_TG_TEX0, GX_IDENTITY);
|
||||
GXSetNumTevStages(1);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR_NULL);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_C1, GX_CC_C0, GX_CC_TEXC, GX_CC_ZERO);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, DUSK_IF_ELSE(GX_COLOR0A0, GX_COLOR_NULL));
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_C1, DUSK_IF_ELSE(GX_CC_RASC, GX_CC_C0), GX_CC_TEXC, GX_CC_ZERO);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, GX_CA_A0, GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_ZERO, DUSK_IF_ELSE(GX_CA_RASA, GX_CA_CA), GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_ONE, GX_LO_COPY);
|
||||
GXSetAlphaCompare(GX_GREATER, 0, GX_AOP_OR, GX_GREATER, 0);
|
||||
GXSetZMode(GX_ENABLE, GX_LEQUAL, GX_DISABLE);
|
||||
GXSetClipMode(GX_CLIP_DISABLE);
|
||||
GXSetNumIndStages(0);
|
||||
dKr_cullVtx_Set();
|
||||
dKr_cullVtx_Set(IF_DUSK(true));
|
||||
|
||||
Mtx rotMtx;
|
||||
MTXRotRad(rotMtx, 'Z', DEG_TO_RAD(rot));
|
||||
@@ -3896,7 +3944,7 @@ void dKyr_drawSnow(Mtx drawMtx, u8** tex) {
|
||||
}
|
||||
}
|
||||
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
IF_NOT_DUSK(GXSetTevColor(GX_TEVREG0, color_reg0));
|
||||
f32 sp38 = 2.0f * (i / 500.0f) * snow_packet->field_0x6d80;
|
||||
f32 sp68 = sp50 * (camera->view.lookat.eye.abs(sp7C) / 1000.0f);
|
||||
if (sp68 > 1.0f) {
|
||||
@@ -3944,19 +3992,23 @@ void dKyr_drawSnow(Mtx drawMtx, u8** tex) {
|
||||
for (int k = 0; k < spC; k++) {
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3f32(pos[0].x + (temp_f31 * add_table[k].x), pos[0].y + (temp_f31 * add_table[k].y), pos[0].z + (temp_f31 * add_table[k].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0);
|
||||
GXPosition3f32(pos[1].x + (temp_f31 * add_table[k].x), pos[1].y + (temp_f31 * add_table[k].y), pos[1].z + (temp_f31 * add_table[k].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0xFF, 0);
|
||||
GXPosition3f32(pos[2].x + (temp_f31 * add_table[k].x), pos[2].y + (temp_f31 * add_table[k].y), pos[2].z + (temp_f31 * add_table[k].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0xFF, 0xFF);
|
||||
GXPosition3f32(pos[3].x + (temp_f31 * add_table[k].x), pos[3].y + (temp_f31 * add_table[k].y), pos[3].z + (temp_f31 * add_table[k].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0xFF);
|
||||
GXEnd();
|
||||
}
|
||||
|
||||
if ((g_env_light.field_0xe90 != 0 && dComIfGp_roomControl_getStayNo() == 0 && sp7C.z < 3000.0f) || dComIfGp_roomControl_getStayNo() == 3 || dComIfGp_roomControl_getStayNo() == 6 || dComIfGp_roomControl_getStayNo() == 9 || dComIfGp_roomControl_getStayNo() == 13) {
|
||||
color_reg0.a = 255.0f * ((0.4f * snow_packet->mSnowEff[i].field_0x30) + temp_f29);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
IF_NOT_DUSK(GXSetTevColor(GX_TEVREG0, color_reg0));
|
||||
|
||||
f32 sp34;
|
||||
f32 sp30;
|
||||
@@ -4012,12 +4064,16 @@ void dKyr_drawSnow(Mtx drawMtx, u8** tex) {
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
int var_r27 = 0;
|
||||
GXPosition3f32(pos[0].x + (temp_f31 * add_table[var_r27].x), pos[0].y + (temp_f31 * add_table[var_r27].y), pos[0].z + (temp_f31 * add_table[var_r27].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0);
|
||||
GXPosition3f32(pos[1].x + (temp_f31 * add_table[var_r27].x), pos[1].y + (temp_f31 * add_table[var_r27].y), pos[1].z + (temp_f31 * add_table[var_r27].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0xFF, 0);
|
||||
GXPosition3f32(pos[2].x + (temp_f31 * add_table[var_r27].x), pos[2].y + (temp_f31 * add_table[var_r27].y), pos[2].z + (temp_f31 * add_table[var_r27].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0xFF, 0xFF);
|
||||
GXPosition3f32(pos[3].x + (temp_f31 * add_table[var_r27].x), pos[3].y + (temp_f31 * add_table[var_r27].y), pos[3].z + (temp_f31 * add_table[var_r27].z));
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0xFF);
|
||||
GXEnd();
|
||||
}
|
||||
@@ -4353,6 +4409,7 @@ void dKyr_drawStar(Mtx drawMtx, u8** tex) {
|
||||
}
|
||||
|
||||
void drawCloudShadow(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dScnKy_env_light_c* envlight = dKy_getEnvlight();
|
||||
dKankyo_cloud_Packet* cloud_packet = g_env_light.mpCloudPacket;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
@@ -5341,6 +5398,7 @@ void dKyr_odour_move() {
|
||||
}
|
||||
|
||||
void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dScnKy_env_light_c* envlight = dKy_getEnvlight();
|
||||
dKankyo_odour_Packet* odour_packet = envlight->mOdourData.mpOdourPacket;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
@@ -5445,18 +5503,23 @@ void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
MTXRotRad(rotMtx, 'Z', DEG_TO_RAD(rot));
|
||||
MTXConcat(camMtx, rotMtx, camMtx);
|
||||
|
||||
// Dusklight opt: enable draw call merging
|
||||
// by using vertex color instead of GX_TEVREG0
|
||||
|
||||
GXLoadPosMtxImm(drawMtx, GX_PNMTX0);
|
||||
GXSetCurrentMtx(GX_PNMTX0);
|
||||
GXLoadTexMtxImm(spF0, GX_TEXMTX0, GX_MTX3x4);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA4, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX1, GX_CLR_RGBA, GX_RGBA4, 8);
|
||||
IF_DUSK(GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0));
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX1, GX_DIRECT);
|
||||
IF_DUSK(GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT));
|
||||
GXSetNumChans(1);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_CLAMP, GX_AF_NONE);
|
||||
GXSetChanCtrl(GX_COLOR0, GX_DISABLE, GX_SRC_REG, DUSK_IF_ELSE(GX_SRC_VTX, GX_SRC_REG), GX_LIGHT_NULL, GX_DF_CLAMP, GX_AF_NONE);
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
GXSetTevColor(GX_TEVREG1, color_reg1);
|
||||
GXSetNumTexGens(2);
|
||||
@@ -5464,14 +5527,14 @@ void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
GXSetTexCoordGen(GX_TEXCOORD1, GX_TG_MTX2x4, GX_TG_TEX1, GX_IDENTITY);
|
||||
GXSetNumTevStages(2);
|
||||
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD0, GX_TEXMAP0, GX_COLOR0A0);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_TEXC, GX_CC_C0, GX_CC_C1);
|
||||
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_ZERO, GX_CC_TEXC, DUSK_IF_ELSE(GX_CC_RASC, GX_CC_C0), GX_CC_C1);
|
||||
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_TEXA, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetTevOrder(GX_TEVSTAGE1, GX_TEXCOORD1, GX_TEXMAP1, GX_COLOR0A0);
|
||||
GXSetTevColorIn(GX_TEVSTAGE1, GX_CC_CPREV, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO);
|
||||
GXSetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE1, GX_CA_ZERO, GX_CA_A0, GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaIn(GX_TEVSTAGE1, GX_CA_ZERO, DUSK_IF_ELSE(GX_CA_RASA, GX_CA_A0), GX_CA_TEXA, GX_CA_ZERO);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_FALSE, GX_TEVPREV);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_COPY);
|
||||
GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_OR, GX_ALWAYS, 0);
|
||||
@@ -5513,7 +5576,7 @@ void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
if (effect->mStatus != 0) {
|
||||
if (!(temp_f29 <= 0.000001f)) {
|
||||
color_reg0.a = 255.0f * temp_f29;
|
||||
GXSetTevColor(GX_TEVREG0, color_reg0);
|
||||
IF_NOT_DUSK(GXSetTevColor(GX_TEVREG0, color_reg0));
|
||||
|
||||
sp70 = sp4C;
|
||||
|
||||
@@ -5551,15 +5614,19 @@ void dKyr_odour_draw(Mtx drawMtx, u8** tex) {
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition3f32(pos[0].x, pos[0].y, pos[0].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0);
|
||||
GXTexCoord2s16(0, 0);
|
||||
GXPosition3f32(pos[1].x, pos[1].y, pos[1].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0xFF, 0);
|
||||
GXTexCoord2s16(0xFF, 0);
|
||||
GXPosition3f32(pos[2].x, pos[2].y, pos[2].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0xFF, 0xFF);
|
||||
GXTexCoord2s16(0xFF, 0xFF);
|
||||
GXPosition3f32(pos[3].x, pos[3].y, pos[3].z);
|
||||
IF_DUSK(GXColor4u8(color_reg0.r, color_reg0.g, color_reg0.b, color_reg0.a));
|
||||
GXTexCoord2s16(0, 0xFF);
|
||||
GXTexCoord2s16(0, 0xFF);
|
||||
GXEnd();
|
||||
@@ -5730,6 +5797,7 @@ void dKyr_mud_move() {
|
||||
}
|
||||
|
||||
void dKyr_mud_draw(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dKankyo_mud_Packet* mud_packet = g_env_light.mpMudPacket;
|
||||
dKankyo_sun_Packet* sun_packet = g_env_light.mpSunPacket;
|
||||
|
||||
@@ -5949,6 +6017,7 @@ void dKyr_evil_move() {
|
||||
}
|
||||
|
||||
static void dKyr_evil_draw2(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dScnKy_env_light_c* envlight = dKy_getEnvlight();
|
||||
dKankyo_evil_Packet* evil_packet = envlight->mpEvilPacket;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
@@ -6187,6 +6256,7 @@ static f32 dKyr_near_bosslight_check(cXyz pos) {
|
||||
}
|
||||
|
||||
void dKyr_evil_draw(Mtx drawMtx, u8** tex) {
|
||||
ZoneScoped;
|
||||
dScnKy_env_light_c* envlight = dKy_getEnvlight();
|
||||
dKankyo_evil_Packet* evil_packet = envlight->mpEvilPacket;
|
||||
camera_class* camera = (camera_class*)dComIfGp_getCamera(0);
|
||||
|
||||
@@ -79,7 +79,7 @@ SNOW_EFF::~SNOW_EFF() {}
|
||||
SNOW_EFF::SNOW_EFF() {}
|
||||
|
||||
void dKankyo_snow_Packet::draw() {
|
||||
dKyr_drawSnow(j3dSys.getViewMtx(), &mpTex);
|
||||
GX_DEBUG_GROUP(dKyr_drawSnow, j3dSys.getViewMtx(), &mpTex);
|
||||
}
|
||||
|
||||
STAR_EFF::~STAR_EFF() {}
|
||||
@@ -103,7 +103,7 @@ HOUSI_EFF::~HOUSI_EFF() {}
|
||||
HOUSI_EFF::HOUSI_EFF() {}
|
||||
|
||||
void dKankyo_housi_Packet::draw() {
|
||||
dKyr_drawHousi(j3dSys.getViewMtx(), &mpResTex);
|
||||
GX_DEBUG_GROUP(dKyr_drawHousi, j3dSys.getViewMtx(), &mpResTex);
|
||||
}
|
||||
|
||||
VRKUMO_EFF::~VRKUMO_EFF() {}
|
||||
@@ -119,7 +119,7 @@ EF_ODOUR_EFF::~EF_ODOUR_EFF() {}
|
||||
EF_ODOUR_EFF::EF_ODOUR_EFF() {}
|
||||
|
||||
void dKankyo_odour_Packet::draw() {
|
||||
dKyr_odour_draw(j3dSys.getViewMtx(), &mpResTex);
|
||||
GX_DEBUG_GROUP(dKyr_odour_draw, j3dSys.getViewMtx(), &mpResTex);
|
||||
}
|
||||
|
||||
EF_MUD_EFF::~EF_MUD_EFF() {}
|
||||
|
||||
@@ -1359,6 +1359,7 @@ void dPa_control_c::calcMenu() {
|
||||
}
|
||||
|
||||
void dPa_control_c::draw(JPADrawInfo* param_0, u8 param_1) {
|
||||
ZoneScoped;
|
||||
if (mEmitterMng != NULL) {
|
||||
j3dSys.reinitGX();
|
||||
dKy_setLight_again();
|
||||
@@ -1957,6 +1958,7 @@ void dPa_gen_d_light8PcallBack::execute(JPABaseEmitter* i_emitter, JPABasePartic
|
||||
}
|
||||
|
||||
void dPa_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* param_2) {
|
||||
ZoneScoped;
|
||||
Mtx local_60;
|
||||
Mtx auStack_90;
|
||||
Mtx auStack_c0;
|
||||
@@ -2084,6 +2086,7 @@ void dPa_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* param_2
|
||||
}
|
||||
|
||||
void dPa_gen_b_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* param_2) {
|
||||
ZoneScoped;
|
||||
Mtx local_80;
|
||||
JGeometry::TVec3<f32> local_8c;
|
||||
JGeometry::TVec3<f32> aTStack_98;
|
||||
@@ -2172,6 +2175,7 @@ void dPa_gen_b_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* p
|
||||
}
|
||||
|
||||
void dPa_gen_d_light8PcallBack::draw(JPABaseEmitter* param_1, JPABaseParticle* param_2) {
|
||||
ZoneScoped;
|
||||
Mtx local_60;
|
||||
Mtx auStack_90;
|
||||
Mtx auStack_c0;
|
||||
|
||||
@@ -2369,6 +2369,7 @@ static u8 l_matDL[132] ATTRIBUTE_ALIGN(32) = {
|
||||
};
|
||||
|
||||
void mDoExt_3DlineMat0_c::setMaterial() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
dKy_setLight_again();
|
||||
@@ -2384,6 +2385,7 @@ void mDoExt_3DlineMat0_c::setMaterial() {
|
||||
}
|
||||
|
||||
void mDoExt_3DlineMat0_c::draw() {
|
||||
ZoneScoped;
|
||||
GXSetTevColor(GX_TEVREG2, field_0x8);
|
||||
|
||||
if (field_0xc != NULL) {
|
||||
@@ -2692,6 +2694,7 @@ static u8 l_mat1DL[141] ATTRIBUTE_ALIGN(32) = {
|
||||
};
|
||||
|
||||
void mDoExt_3DlineMat1_c::setMaterial() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
dKy_setLight_again();
|
||||
@@ -2709,6 +2712,7 @@ void mDoExt_3DlineMat1_c::setMaterial() {
|
||||
}
|
||||
|
||||
void mDoExt_3DlineMat1_c::draw() {
|
||||
ZoneScoped;
|
||||
GXLoadTexObj(&mTextureObject, GX_TEXMAP0);
|
||||
GXSetTexCoordScaleManually(GX_TEXCOORD0, 1, GXGetTexObjWidth(&mTextureObject), GXGetTexObjHeight(&mTextureObject));
|
||||
GXSetTevColor(GX_TEVREG2, mColor);
|
||||
@@ -2922,6 +2926,7 @@ void mDoExt_3DlineMat1_c::update(int param_0, f32 param_1, GXColor& param_2, u16
|
||||
#endif
|
||||
|
||||
void mDoExt_3DlineMat2_c::setMaterial() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
GXSetNumIndStages(0);
|
||||
GXClearVtxDesc();
|
||||
@@ -3119,6 +3124,7 @@ mDoExt_cube8pPacket::mDoExt_cube8pPacket(cXyz* i_points, const GXColor& i_color)
|
||||
}
|
||||
|
||||
void drawCube(MtxP mtx, cXyz* pos, const GXColor& color) {
|
||||
ZoneScoped;
|
||||
GXSETARRAY(GX_VA_POS, pos, sizeof(cXyz) * 8, sizeof(cXyz), true);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
@@ -3198,6 +3204,7 @@ mDoExt_quadPacket::mDoExt_quadPacket(cXyz* i_points, const GXColor& i_color, u8
|
||||
}
|
||||
|
||||
void mDoExt_quadPacket::draw() {
|
||||
ZoneScoped;
|
||||
GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz), true);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
@@ -3248,6 +3255,7 @@ mDoExt_trianglePacket::mDoExt_trianglePacket(cXyz* i_points, const GXColor& i_co
|
||||
}
|
||||
|
||||
void mDoExt_trianglePacket::draw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
|
||||
GXSETARRAY(GX_VA_POS, mPoints, sizeof(mPoints), sizeof(cXyz), true);
|
||||
@@ -3301,6 +3309,7 @@ mDoExt_linePacket::mDoExt_linePacket(cXyz& i_start, cXyz& i_end, const GXColor&
|
||||
}
|
||||
|
||||
void mDoExt_linePacket::draw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
@@ -3418,6 +3427,7 @@ mDoExt_pointPacket::mDoExt_pointPacket(cXyz& i_position, const GXColor& i_color,
|
||||
}
|
||||
|
||||
void mDoExt_pointPacket::draw() {
|
||||
ZoneScoped;
|
||||
j3dSys.reinitGX();
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
|
||||
Reference in New Issue
Block a user