mirror of
https://github.com/zeldaret/tww.git
synced 2026-05-25 07:22:55 -04:00
GX Vertex Format Fixes (#938)
* Update vertex attribute formats in `d_a_hookshot.cpp` for improved correctness. * Fix texture coordinate formats in `J3DSys.cpp` to use `GX_TEX_ST` for improved semantics. * Update vertex attribute formats in `JFWDisplay.cpp` for improved semantics. * Update texture coordinate vertex format in `J2DWindow.cpp` to use `GX_TEX_ST` for improved semantics. * Refactor `J2DWindow.cpp` for improved readability: update constructor initialization style, inline function arguments, and add spacing for clarity in GX rendering logic. * Update vertex attribute formats in `JUTResFont.cpp` for improved correctness and semantic clarity. * Update vertex attribute format in `d_kankyo_rain.cpp` to use `GX_POS_XYZ` for improved correctness. * Update texture coordinate formats in `d_ovlp_fade2.cpp` to use `GX_TEX_ST` for improved semantics. * Update texture coordinate format in `d_ovlp_fade4.cpp` to use `GX_TEX_ST` for improved semantics * Format vertex attribute and texture coordinate initialization in `d_a_goal_flag.cpp` for improved consistency and semantics. * Update vertex attribute and texture coordinate formats in `d_a_majuu_flag.cpp` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_a_pirate_flag.cpp` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_a_sail.cpp` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_a_player_particle.inc` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_a_player_particle.inc` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_a_sea.cpp` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_wood.cpp` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `m_Do_ext.cpp` for improved correctness and semantics. * Undid formatting of `halftofull` array in `JUTResFont.cpp` * Update vertex attribute and texture coordinate formats in `d_tree.cpp` for improved correctness and semantics. * Update vertex attribute and texture coordinate formats in `d_a_bwdg.cpp` for improved correctness and semantics.
This commit is contained in:
@@ -14,7 +14,13 @@
|
||||
#include "dolphin/gx/GX.h"
|
||||
|
||||
/* 802D12E0-802D1820 .text __ct__9J2DWindowFP7J2DPaneP20JSURandomInputStream */
|
||||
J2DWindow::J2DWindow(J2DPane* param_0, JSURandomInputStream* param_1) : mpFrameTexture1(NULL), mpFrameTexture2(NULL), mpFrameTexture3(NULL), mpFrameTexture4(NULL), mpContentsTexture(NULL), mpPalette(NULL) {
|
||||
J2DWindow::J2DWindow(J2DPane* param_0, JSURandomInputStream* param_1)
|
||||
: mpFrameTexture1(NULL),
|
||||
mpFrameTexture2(NULL),
|
||||
mpFrameTexture3(NULL),
|
||||
mpFrameTexture4(NULL),
|
||||
mpContentsTexture(NULL),
|
||||
mpPalette(NULL) {
|
||||
s32 local_188 = param_1->getPosition();
|
||||
u32 header[2];
|
||||
param_1->read(header, 8);
|
||||
@@ -129,13 +135,9 @@ void J2DWindow::draw_private(const JGeometry::TBox2<f32>& frameBox, const JGeome
|
||||
f32 bottom = y + mpFrameTexture1->getHeight();
|
||||
u16 s0, s1, t0, t1;
|
||||
|
||||
drawFrameTexture(mpFrameTexture1, x, y,
|
||||
(field_0x110 >> 7) & 1,
|
||||
(field_0x110 >> 6) & 1, true);
|
||||
drawFrameTexture(mpFrameTexture1, x, y, (field_0x110 >> 7) & 1, (field_0x110 >> 6) & 1, true);
|
||||
bool r7 = (field_0x111 & 1) ? true : false;
|
||||
drawFrameTexture(mpFrameTexture2, right, 0.0f,
|
||||
(field_0x110 >> 5) & 1,
|
||||
(field_0x110 >> 4) & 1, r7);
|
||||
drawFrameTexture(mpFrameTexture2, right, 0.0f, (field_0x110 >> 5) & 1, (field_0x110 >> 4) & 1, r7);
|
||||
|
||||
s0 = ((field_0x110 >> 5) & 1) ? (u16)0x8000 : (u16)0;
|
||||
t0 = ((field_0x110 >> 4) & 1) ? (u16)0 : (u16)0x8000;
|
||||
@@ -143,9 +145,7 @@ void J2DWindow::draw_private(const JGeometry::TBox2<f32>& frameBox, const JGeome
|
||||
drawFrameTexture(mpFrameTexture2, left, 0.0f, right - left, (f32)mpFrameTexture2->getHeight(), s0, t0, s0, t1, false);
|
||||
|
||||
r7 = (field_0x111 & 2) ? true : false;
|
||||
drawFrameTexture(mpFrameTexture4, right, top,
|
||||
(field_0x110 >> 1) & 1,
|
||||
(field_0x110 >> 0) & 1, r7);
|
||||
drawFrameTexture(mpFrameTexture4, right, top, (field_0x110 >> 1) & 1, (field_0x110 >> 0) & 1, r7);
|
||||
|
||||
s0 = ((field_0x110 >> 1) & 1) ? (u16)0x8000 : (u16)0;
|
||||
t0 = ((field_0x110 >> 0) & 1) ? (u16)0 : (u16)0x8000;
|
||||
@@ -158,9 +158,7 @@ void J2DWindow::draw_private(const JGeometry::TBox2<f32>& frameBox, const JGeome
|
||||
drawFrameTexture(mpFrameTexture4, right, bottom, (f32)mpFrameTexture4->getWidth(), top - bottom, s0, t0, s1, t0, false);
|
||||
|
||||
r7 = (field_0x111 & 4) ? true : false;
|
||||
drawFrameTexture(mpFrameTexture3, 0.0f, top,
|
||||
(field_0x110 >> 3) & 1,
|
||||
(field_0x110 >> 2) & 1, r7);
|
||||
drawFrameTexture(mpFrameTexture3, 0.0f, top, (field_0x110 >> 3) & 1, (field_0x110 >> 2) & 1, r7);
|
||||
|
||||
s0 = ((field_0x110 >> 3) & 1) ? (u16)0 : (u16)0x8000;
|
||||
s1 = (u16)(s0 ^ 0x8000);
|
||||
@@ -206,7 +204,7 @@ void J2DWindow::drawSelf(f32 x, f32 y) {
|
||||
}
|
||||
|
||||
/* 802D2190-802D2288 .text drawSelf__9J2DWindowFffPA3_A4_f */
|
||||
void J2DWindow::drawSelf(f32 x, f32 y, Mtx *pMtx) {
|
||||
void J2DWindow::drawSelf(f32 x, f32 y, Mtx* pMtx) {
|
||||
JGeometry::TBox2<f32> globalBounds = mGlobalBounds;
|
||||
globalBounds.addPos(JGeometry::TVec2<f32>(x, y));
|
||||
|
||||
@@ -250,15 +248,23 @@ void J2DWindow::drawContents(const JGeometry::TBox2<f32>& contentsBox) {
|
||||
}
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
|
||||
GXPosition3f32(contentsBox.i.x, contentsBox.i.y, 0.0f);
|
||||
GXColor1u32(drawColorTL);
|
||||
|
||||
GXPosition3f32(contentsBox.f.x, contentsBox.i.y, 0.0f);
|
||||
GXColor1u32(drawColorTR);
|
||||
|
||||
GXPosition3f32(contentsBox.f.x, contentsBox.f.y, 0.0f);
|
||||
GXColor1u32(drawColorBR);
|
||||
|
||||
GXPosition3f32(contentsBox.i.x, contentsBox.f.y, 0.0f);
|
||||
GXColor1u32(drawColorBL);
|
||||
|
||||
GXEnd();
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
|
||||
if (mpContentsTexture != NULL) {
|
||||
@@ -285,6 +291,7 @@ void J2DWindow::drawFrameTexture(JUTTexture* pTexture, f32 x0, f32 y0, f32 w, f3
|
||||
JUtility::TColor vtxColor(mDrawAlpha | 0xFFFFFF00);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
|
||||
GXPosition3f32(x0, y0, 0.0f);
|
||||
@@ -304,17 +311,24 @@ void J2DWindow::drawFrameTexture(JUTTexture* pTexture, f32 x0, f32 y0, f32 w, f3
|
||||
GXTexCoord2s16(s1, t0);
|
||||
|
||||
GXEnd();
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
}
|
||||
|
||||
/* 802D26E4-802D2784 .text drawFrameTexture__9J2DWindowFP10JUTTextureffbbb */
|
||||
void J2DWindow::drawFrameTexture(JUTTexture* pTexture, f32 x, f32 y, bool flipS, bool flipT, bool bSetupTev) {
|
||||
drawFrameTexture(pTexture, x, y, pTexture->getWidth(), pTexture->getHeight(),
|
||||
drawFrameTexture(
|
||||
pTexture,
|
||||
x,
|
||||
y,
|
||||
pTexture->getWidth(),
|
||||
pTexture->getHeight(),
|
||||
flipS ? (u16)0 : (u16)0x8000,
|
||||
flipT ? (u16)0 : (u16)0x8000,
|
||||
flipS ? (u16)0x8000 : (u16)0,
|
||||
flipT ? (u16)0x8000 : (u16)0,
|
||||
bSetupTev);
|
||||
bSetupTev
|
||||
);
|
||||
}
|
||||
|
||||
/* 802D2784-802D29F4 .text drawContentsTexture__9J2DWindowFffff */
|
||||
@@ -331,8 +345,10 @@ void J2DWindow::drawContentsTexture(f32 x0, f32 y0, f32 w, f32 h) {
|
||||
|
||||
mpContentsTexture->load(GX_TEXMAP0);
|
||||
setTevMode(mpContentsTexture, 0x00000000, 0xFFFFFFFF);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA6, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
|
||||
GXPosition3f32(x0, y0, 0.0f);
|
||||
|
||||
@@ -164,14 +164,14 @@ void J3DSys::drawInit() {
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR1, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX1, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX2, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX3, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX4, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX5, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX6, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX7, GX_CLR_RGBA, GX_RGBA4, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX1, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX2, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX3, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX4, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX5, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX6, GX_TEX_ST, GX_S16, 7);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX7, GX_TEX_ST, GX_S16, 7);
|
||||
|
||||
GXSetNumIndStages(0);
|
||||
reinitTexture();
|
||||
|
||||
@@ -414,8 +414,8 @@ void JFWDisplay::clearEfb(int param_0, int param_1, int param_2, int param_3, GX
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGB, GX_RGBX8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGB565, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_U16, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_U8, 0);
|
||||
GXSetNumChans(0);
|
||||
GXSetChanCtrl(GX_COLOR0A0, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetChanCtrl(GX_COLOR1A1, GX_DISABLE, GX_SRC_REG, GX_SRC_REG, GX_LIGHT_NULL, GX_DF_NONE, GX_AF_NONE);
|
||||
|
||||
@@ -178,9 +178,11 @@ void JUTResFont::setGX() {
|
||||
GXSetChanCtrl(GX_COLOR0A0, false, GX_SRC_REG, GX_SRC_VTX, 0, GX_DF_NONE, GX_AF_NONE);
|
||||
GXSetTevOp(GX_TEVSTAGE0, GX_MODULATE);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_SET);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBX8, 0xf);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_U16, 0xf);
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
@@ -209,9 +211,11 @@ void JUTResFont::setGX(JUtility::TColor col1, JUtility::TColor col2) {
|
||||
GXSetTevColorOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, true, GX_TEVPREV);
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE1, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, true, GX_TEVPREV);
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_SET);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_RGBA4, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_RGBX8, 15);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_U16, 0xf);
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||
@@ -256,6 +260,7 @@ f32 JUTResFont::drawChar_scale(f32 posX, f32 posY, f32 scaleX, f32 scaleY, int c
|
||||
s32 v2 = ((mHeight + mpGlyphBlocks[field_0x66]->cellHeight) * 0x8000) / mpGlyphBlocks[field_0x66]->textureHeight;
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
|
||||
// Bottom Left
|
||||
@@ -278,6 +283,8 @@ f32 JUTResFont::drawChar_scale(f32 posX, f32 posY, f32 scaleX, f32 scaleY, int c
|
||||
GXColor1u32(mColor3);
|
||||
GXTexCoord2s16(u1, v2);
|
||||
|
||||
GXEnd();
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S16, 0);
|
||||
|
||||
return retval;
|
||||
@@ -361,7 +368,7 @@ int JUTResFont::getFontCode(int chr) const {
|
||||
ret = chr - map->startCode;
|
||||
break;
|
||||
} else if (map->mappingMethod == 2) {
|
||||
ret = *(&mpMapBlocks[i]->mLeading + ((chr - mpMapBlocks[i]->startCode)));
|
||||
ret = *(&mpMapBlocks[i]->mLeading + (chr - mpMapBlocks[i]->startCode));
|
||||
break;
|
||||
} else if (map->mappingMethod == 3) {
|
||||
u16* leading_temp = &map->mLeading;
|
||||
@@ -420,9 +427,16 @@ void JUTResFont::loadImage(int code, GXTexMapID id) {
|
||||
mHeight = cellRow * mpGlyphBlocks[i]->cellHeight;
|
||||
|
||||
if (pageIdx != mTexPageIdx || i != field_0x66) {
|
||||
GXInitTexObj(&mTexObj, &mpGlyphBlocks[i]->data[pageIdx * mpGlyphBlocks[i]->textureSize],
|
||||
mpGlyphBlocks[i]->textureWidth, mpGlyphBlocks[i]->textureHeight,
|
||||
(GXTexFmt)mpGlyphBlocks[i]->textureFormat, GX_CLAMP, GX_CLAMP, 0);
|
||||
GXInitTexObj(
|
||||
&mTexObj,
|
||||
&mpGlyphBlocks[i]->data[pageIdx * mpGlyphBlocks[i]->textureSize],
|
||||
mpGlyphBlocks[i]->textureWidth,
|
||||
mpGlyphBlocks[i]->textureHeight,
|
||||
(GXTexFmt)mpGlyphBlocks[i]->textureFormat,
|
||||
GX_CLAMP,
|
||||
GX_CLAMP,
|
||||
0
|
||||
);
|
||||
|
||||
GXInitTexObjLOD(&mTexObj, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, 0U, 0U, GX_ANISO_1);
|
||||
mTexPageIdx = pageIdx;
|
||||
|
||||
@@ -39,8 +39,8 @@ void daBwdg_packet_c::draw() {
|
||||
};
|
||||
static GXVtxAttrFmtList l_vtxAttrFmtList[] = {
|
||||
{GX_VA_POS, GX_POS_XYZ, GX_F32, 0x00},
|
||||
{GX_VA_NRM, GX_POS_XY, GX_F32, 0x00},
|
||||
{GX_VA_TEX0, GX_POS_XYZ, GX_F32, 0x00},
|
||||
{GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0x00},
|
||||
{GX_VA_TEX0, GX_TEX_ST, GX_F32, 0x00},
|
||||
{GX_VA_NULL, GX_POS_XYZ, GX_F32, 0x00},
|
||||
};
|
||||
j3dSys.reinitGX();
|
||||
|
||||
+187
-183
@@ -22,99 +22,99 @@
|
||||
#include "m_Do/m_Do_controller_pad.h"
|
||||
|
||||
static Vec l_pos[] = {
|
||||
{ -1000.0f, 0.0f, 0.0f },
|
||||
{ -750.0f, 0.0f, 0.0f },
|
||||
{ -500.0f, 0.0f, 0.0f },
|
||||
{ -250.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 250.0f, 0.0f, 0.0f },
|
||||
{ 500.0f, 0.0f, 0.0f },
|
||||
{ 750.0f, 0.0f, 0.0f },
|
||||
{ 1000.0f, 0.0f, 0.0f },
|
||||
{ -1000.0f, -100.0f, 0.0f },
|
||||
{ -750.0f, -100.0f, 0.0f },
|
||||
{ -500.0f, -100.0f, 0.0f },
|
||||
{ -250.0f, -100.0f, 0.0f },
|
||||
{ 0.0f, -100.0f, 0.0f },
|
||||
{ 250.0f, -100.0f, 0.0f },
|
||||
{ 500.0f, -100.0f, 0.0f },
|
||||
{ 750.0f, -100.0f, 0.0f },
|
||||
{ 1000.0f, -100.0f, 0.0f },
|
||||
{ -1000.0f, -200.0f, 0.0f },
|
||||
{ -750.0f, -200.0f, 0.0f },
|
||||
{ -500.0f, -200.0f, 0.0f },
|
||||
{ -250.0f, -200.0f, 0.0f },
|
||||
{ 0.0f, -200.0f, 0.0f },
|
||||
{ 250.0f, -200.0f, 0.0f },
|
||||
{ 500.0f, -200.0f, 0.0f },
|
||||
{ 750.0f, -200.0f, 0.0f },
|
||||
{ 1000.0f, -200.0f, 0.0f },
|
||||
{ -1000.0f, -300.0f, 0.0f },
|
||||
{ -750.0f, -300.0f, 0.0f },
|
||||
{ -500.0f, -300.0f, 0.0f },
|
||||
{ -250.0f, -300.0f, 0.0f },
|
||||
{ 0.0f, -300.0f, 0.0f },
|
||||
{ 250.0f, -300.0f, 0.0f },
|
||||
{ 500.0f, -300.0f, 0.0f },
|
||||
{ 750.0f, -300.0f, 0.0f },
|
||||
{ 1000.0f, -300.0f, 0.0f },
|
||||
{ -1000.0f, -400.0f, 0.0f },
|
||||
{ -750.0f, -400.0f, 0.0f },
|
||||
{ -500.0f, -400.0f, 0.0f },
|
||||
{ -250.0f, -400.0f, 0.0f },
|
||||
{ 0.0f, -400.0f, 0.0f },
|
||||
{ 250.0f, -400.0f, 0.0f },
|
||||
{ 500.0f, -400.0f, 0.0f },
|
||||
{ 750.0f, -400.0f, 0.0f },
|
||||
{ 1000.0f, -400.0f, 0.0f }
|
||||
{ -1000.0f, 0.0f, 0.0f },
|
||||
{ -750.0f, 0.0f, 0.0f },
|
||||
{ -500.0f, 0.0f, 0.0f },
|
||||
{ -250.0f, 0.0f, 0.0f },
|
||||
{ 0.0f, 0.0f, 0.0f },
|
||||
{ 250.0f, 0.0f, 0.0f },
|
||||
{ 500.0f, 0.0f, 0.0f },
|
||||
{ 750.0f, 0.0f, 0.0f },
|
||||
{ 1000.0f, 0.0f, 0.0f },
|
||||
{ -1000.0f, -100.0f, 0.0f },
|
||||
{ -750.0f, -100.0f, 0.0f },
|
||||
{ -500.0f, -100.0f, 0.0f },
|
||||
{ -250.0f, -100.0f, 0.0f },
|
||||
{ 0.0f, -100.0f, 0.0f },
|
||||
{ 250.0f, -100.0f, 0.0f },
|
||||
{ 500.0f, -100.0f, 0.0f },
|
||||
{ 750.0f, -100.0f, 0.0f },
|
||||
{ 1000.0f, -100.0f, 0.0f },
|
||||
{ -1000.0f, -200.0f, 0.0f },
|
||||
{ -750.0f, -200.0f, 0.0f },
|
||||
{ -500.0f, -200.0f, 0.0f },
|
||||
{ -250.0f, -200.0f, 0.0f },
|
||||
{ 0.0f, -200.0f, 0.0f },
|
||||
{ 250.0f, -200.0f, 0.0f },
|
||||
{ 500.0f, -200.0f, 0.0f },
|
||||
{ 750.0f, -200.0f, 0.0f },
|
||||
{ 1000.0f, -200.0f, 0.0f },
|
||||
{ -1000.0f, -300.0f, 0.0f },
|
||||
{ -750.0f, -300.0f, 0.0f },
|
||||
{ -500.0f, -300.0f, 0.0f },
|
||||
{ -250.0f, -300.0f, 0.0f },
|
||||
{ 0.0f, -300.0f, 0.0f },
|
||||
{ 250.0f, -300.0f, 0.0f },
|
||||
{ 500.0f, -300.0f, 0.0f },
|
||||
{ 750.0f, -300.0f, 0.0f },
|
||||
{ 1000.0f, -300.0f, 0.0f },
|
||||
{ -1000.0f, -400.0f, 0.0f },
|
||||
{ -750.0f, -400.0f, 0.0f },
|
||||
{ -500.0f, -400.0f, 0.0f },
|
||||
{ -250.0f, -400.0f, 0.0f },
|
||||
{ 0.0f, -400.0f, 0.0f },
|
||||
{ 250.0f, -400.0f, 0.0f },
|
||||
{ 500.0f, -400.0f, 0.0f },
|
||||
{ 750.0f, -400.0f, 0.0f },
|
||||
{ 1000.0f, -400.0f, 0.0f }
|
||||
};
|
||||
|
||||
static cXy l_texCoord[] = {
|
||||
{ 1.0f, 0.0f },
|
||||
{ 0.875f, 0.0f },
|
||||
{ 0.75f, 0.0f },
|
||||
{ 0.625f, 0.0f },
|
||||
{ 0.5f, 0.0f },
|
||||
{ 0.375f, 0.0f },
|
||||
{ 0.25f, 0.0f },
|
||||
{ 0.125f, 0.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 1.0f, 0.25f },
|
||||
{ 0.875f, 0.25f },
|
||||
{ 0.75f, 0.25f },
|
||||
{ 0.625f, 0.25f },
|
||||
{ 0.5f, 0.25f },
|
||||
{ 0.375f, 0.25f },
|
||||
{ 0.25f, 0.25f },
|
||||
{ 0.125f, 0.25f },
|
||||
{ 0.0f, 0.25f },
|
||||
{ 1.0f, 0.5f },
|
||||
{ 0.875f, 0.5f },
|
||||
{ 0.75f, 0.5f },
|
||||
{ 0.625f, 0.5f },
|
||||
{ 0.5f, 0.5f },
|
||||
{ 0.375f, 0.5f },
|
||||
{ 0.25f, 0.5f },
|
||||
{ 0.125f, 0.5f },
|
||||
{ 0.0f, 0.5f },
|
||||
{ 1.0f, 0.75f },
|
||||
{ 0.875f, 0.75f },
|
||||
{ 0.75f, 0.75f },
|
||||
{ 0.625f, 0.75f },
|
||||
{ 0.5f, 0.75f },
|
||||
{ 0.375f, 0.75f },
|
||||
{ 0.25f, 0.75f },
|
||||
{ 0.125f, 0.75f },
|
||||
{ 0.0f, 0.75f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 0.875f, 1.0f },
|
||||
{ 0.75f, 1.0f },
|
||||
{ 0.625f, 1.0f },
|
||||
{ 0.5f, 1.0f },
|
||||
{ 0.375f, 1.0f },
|
||||
{ 0.25f, 1.0f },
|
||||
{ 0.125f, 1.0f },
|
||||
{ 0.0f, 1.0f }
|
||||
{ 1.0f, 0.0f },
|
||||
{ 0.875f, 0.0f },
|
||||
{ 0.75f, 0.0f },
|
||||
{ 0.625f, 0.0f },
|
||||
{ 0.5f, 0.0f },
|
||||
{ 0.375f, 0.0f },
|
||||
{ 0.25f, 0.0f },
|
||||
{ 0.125f, 0.0f },
|
||||
{ 0.0f, 0.0f },
|
||||
{ 1.0f, 0.25f },
|
||||
{ 0.875f, 0.25f },
|
||||
{ 0.75f, 0.25f },
|
||||
{ 0.625f, 0.25f },
|
||||
{ 0.5f, 0.25f },
|
||||
{ 0.375f, 0.25f },
|
||||
{ 0.25f, 0.25f },
|
||||
{ 0.125f, 0.25f },
|
||||
{ 0.0f, 0.25f },
|
||||
{ 1.0f, 0.5f },
|
||||
{ 0.875f, 0.5f },
|
||||
{ 0.75f, 0.5f },
|
||||
{ 0.625f, 0.5f },
|
||||
{ 0.5f, 0.5f },
|
||||
{ 0.375f, 0.5f },
|
||||
{ 0.25f, 0.5f },
|
||||
{ 0.125f, 0.5f },
|
||||
{ 0.0f, 0.5f },
|
||||
{ 1.0f, 0.75f },
|
||||
{ 0.875f, 0.75f },
|
||||
{ 0.75f, 0.75f },
|
||||
{ 0.625f, 0.75f },
|
||||
{ 0.5f, 0.75f },
|
||||
{ 0.375f, 0.75f },
|
||||
{ 0.25f, 0.75f },
|
||||
{ 0.125f, 0.75f },
|
||||
{ 0.0f, 0.75f },
|
||||
{ 1.0f, 1.0f },
|
||||
{ 0.875f, 1.0f },
|
||||
{ 0.75f, 1.0f },
|
||||
{ 0.625f, 1.0f },
|
||||
{ 0.5f, 1.0f },
|
||||
{ 0.375f, 1.0f },
|
||||
{ 0.25f, 1.0f },
|
||||
{ 0.125f, 1.0f },
|
||||
{ 0.0f, 1.0f }
|
||||
};
|
||||
|
||||
#include "assets/l_goal_flag_DL.h"
|
||||
@@ -143,17 +143,17 @@ void daGFlag_packet_c::setTexObj(u8 i_arcIdx) {
|
||||
GFLAG_BTI_B_FRAGGAIKOT,
|
||||
TGFLAG_BTI_B_FRAGTORI
|
||||
};
|
||||
// index_tbl likely existed in this function but passing
|
||||
// index_tbl likely existed in this function but passing
|
||||
// an element of it into getObjectRes breaks the match
|
||||
ResTIMG* tex_info_p = (ResTIMG*) dComIfG_getObjectRes(arc_name_tbl[i_arcIdx], 3);
|
||||
GXBool mipmap_cnt_over_one = GXBool(tex_info_p->mipmapCount > 1);
|
||||
GXInitTexObj(
|
||||
&mTexObj,
|
||||
(u8*)tex_info_p + tex_info_p->imageOffset,
|
||||
tex_info_p->width,
|
||||
tex_info_p->height,
|
||||
GXTexFmt(tex_info_p->format),
|
||||
GXTexWrapMode(tex_info_p->wrapS),
|
||||
&mTexObj,
|
||||
(u8*)tex_info_p + tex_info_p->imageOffset,
|
||||
tex_info_p->width,
|
||||
tex_info_p->height,
|
||||
GXTexFmt(tex_info_p->format),
|
||||
GXTexWrapMode(tex_info_p->wrapS),
|
||||
GXTexWrapMode(tex_info_p->wrapT),
|
||||
mipmap_cnt_over_one
|
||||
);
|
||||
@@ -175,12 +175,12 @@ void daGFlag_packet_c::setToonTexObj() {
|
||||
ResTIMG* tex_info_p = (ResTIMG*) dComIfG_getObjectRes("Cloth", CLOTH_BTI_CLOTHTOON);
|
||||
GXBool mipmap_cnt_over_one = GXBool(tex_info_p->mipmapCount > 1);
|
||||
GXInitTexObj(
|
||||
&mToonTexObj,
|
||||
(u8*)tex_info_p + tex_info_p->imageOffset,
|
||||
tex_info_p->width,
|
||||
tex_info_p->height,
|
||||
GXTexFmt(tex_info_p->format),
|
||||
GXTexWrapMode(tex_info_p->wrapS),
|
||||
&mToonTexObj,
|
||||
(u8*)tex_info_p + tex_info_p->imageOffset,
|
||||
tex_info_p->width,
|
||||
tex_info_p->height,
|
||||
GXTexFmt(tex_info_p->format),
|
||||
GXTexWrapMode(tex_info_p->wrapS),
|
||||
GXTexWrapMode(tex_info_p->wrapT),
|
||||
mipmap_cnt_over_one
|
||||
);
|
||||
@@ -205,16 +205,20 @@ void daGFlag_packet_c::draw() {
|
||||
#endif
|
||||
dKy_GxFog_tevstr_set(mpTevStr);
|
||||
dKy_setLight_mine(mpTevStr);
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
|
||||
GXSetArray(GX_VA_POS, &mDPos[mCurrArr], sizeof(cXyz));
|
||||
GXSetArray(GX_VA_NRM, &mNrm[mCurrArr], sizeof(cXyz));
|
||||
GXSetArray(GX_VA_TEX0, l_texCoord, sizeof(cXy));
|
||||
|
||||
GXLoadTexObj(getTexObjP(), GX_TEXMAP0);
|
||||
GXLoadTexObj(getToonTexObjP(), GX_TEXMAP1);
|
||||
GXSetNumChans(1);
|
||||
@@ -305,7 +309,7 @@ void daGFlag_packet_c::setBackNrm() {
|
||||
nrm_arr++;
|
||||
back_nrm_arr++;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* 00000A04-00000E78 .text setNrmVtx__16daGFlag_packet_cFP4cXyzii */
|
||||
void daGFlag_packet_c::setNrmVtx(cXyz* o_nrm, int i_col, int i_row) {
|
||||
@@ -331,7 +335,7 @@ void daGFlag_packet_c::setNrmVtx(cXyz* o_nrm, int i_col, int i_row) {
|
||||
tri_normal = tri_normal.normZP();
|
||||
averaged_normal += tri_normal;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (i_col != 8) {
|
||||
horizontal_edge = dpos_arr[(i_col + 1) + i_row * 9] - center_vertex;
|
||||
if (i_row != 0) {
|
||||
@@ -350,19 +354,19 @@ void daGFlag_packet_c::setNrmVtx(cXyz* o_nrm, int i_col, int i_row) {
|
||||
averaged_normal = averaged_normal.normZC();
|
||||
|
||||
MtxPush();
|
||||
cMtx_YrotM(*calc_mtx,
|
||||
cMtx_YrotM(*calc_mtx,
|
||||
DEMO_SELECT(REG10_S(2) + 0x200, 512.0f) *
|
||||
cM_ssin(
|
||||
mNormalFlutterPhase +
|
||||
(i_col * (DEMO_SELECT(REG10_S(3), 0) + -0x400) +
|
||||
mNormalFlutterPhase +
|
||||
(i_col * (DEMO_SELECT(REG10_S(3), 0) + -0x400) +
|
||||
i_row * (DEMO_SELECT(REG10_S(4), 0) + 0x100))
|
||||
)
|
||||
);
|
||||
cMtx_XrotM(*calc_mtx,
|
||||
DEMO_SELECT(REG10_S(5) + 0x200, 512.0f) *
|
||||
cMtx_XrotM(*calc_mtx,
|
||||
DEMO_SELECT(REG10_S(5) + 0x200, 512.0f) *
|
||||
cM_scos(
|
||||
mNormalFlutterPhase +
|
||||
(i_col * (DEMO_SELECT(REG10_S(6), 0) + -0x400) +
|
||||
mNormalFlutterPhase +
|
||||
(i_col * (DEMO_SELECT(REG10_S(6), 0) + -0x400) +
|
||||
i_row * (DEMO_SELECT(REG10_S(7), 0) + 0x100))
|
||||
)
|
||||
);
|
||||
@@ -378,10 +382,10 @@ BOOL daGoal_Flag_c::getRacePath(u8 i_pathId) {
|
||||
if (!mpRopePaths[i]) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
||||
mNumRopeBuoys[i] = mpRopePaths[i]->m_num;
|
||||
u8 next_path_id = mpRopePaths[i]->m_nextID;
|
||||
for (i++; i < ARRAY_SSIZE(mpRopePaths) && next_path_id != 0xFFU; i++) {
|
||||
for (i++; i < ARRAY_SSIZE(mpRopePaths) && next_path_id != 0xFFU; i++) {
|
||||
mpRopePaths[i] = dPath_GetRoomPath(next_path_id, fopAcM_GetRoomNo(this));
|
||||
mNumRopeBuoys[i] = mpRopePaths[i]->m_num;
|
||||
next_path_id = mpRopePaths[i]->m_nextID;
|
||||
@@ -432,15 +436,15 @@ BOOL daGoal_Flag_c::CreateBuoyRaces() {
|
||||
rope_points_p->m_position.z
|
||||
);
|
||||
fopAcM_createChild(
|
||||
PROC_Obj_Buoyrace,
|
||||
fopAcM_GetID(this),
|
||||
j | (i << 8), &rope_point_pos,
|
||||
fopAcM_GetRoomNo(this),
|
||||
PROC_Obj_Buoyrace,
|
||||
fopAcM_GetID(this),
|
||||
j | (i << 8), &rope_point_pos,
|
||||
fopAcM_GetRoomNo(this),
|
||||
NULL
|
||||
);
|
||||
segment->set(
|
||||
rope_points_p->m_position.x,
|
||||
rope_points_p->m_position.y + 250.0f,
|
||||
rope_points_p->m_position.x,
|
||||
rope_points_p->m_position.y + 250.0f,
|
||||
rope_points_p->m_position.z
|
||||
);
|
||||
}
|
||||
@@ -463,7 +467,7 @@ int daGoal_Flag_c::goal_check() {
|
||||
|
||||
f32 finish_line_len = (mGoalFlagPolePos[1] - mGoalFlagPolePos[0]).absXZ();
|
||||
f32 player_along_line = finish_line_dir.getDotProduct(player_from_line_start);
|
||||
|
||||
|
||||
cXyz finish_line_normal;
|
||||
finish_line_normal.set(finish_line_dir.z, 0.0f, -finish_line_dir.x);
|
||||
|
||||
@@ -519,10 +523,10 @@ void daGoal_Flag_c::flag_move() {
|
||||
index = i + j * 9;
|
||||
curr_pos_arr[index].set(prev_pos_arr[index]);
|
||||
cloth_anim_factor = get_cloth_anim_factor(
|
||||
prev_pos_arr,
|
||||
prev_nrm_arr,
|
||||
&wind_vector,
|
||||
i,
|
||||
prev_pos_arr,
|
||||
prev_nrm_arr,
|
||||
&wind_vector,
|
||||
i,
|
||||
j
|
||||
);
|
||||
velocity_arr[index] += cloth_anim_factor;
|
||||
@@ -537,12 +541,12 @@ void daGoal_Flag_c::flag_move() {
|
||||
index = k + l * 9;
|
||||
curr_dpos_arr[index] = curr_pos_arr[index];
|
||||
f32 center_to_edge_falloff = ((20.25f - std::abs(4.5f - (f32)k) * std::abs(4.5f - (f32)k)) / 20.25f);
|
||||
curr_dpos_arr[index].z += (
|
||||
DEMO_SELECT(40.0f + REG10_F(10), 40.0f) *
|
||||
center_to_edge_falloff *
|
||||
curr_dpos_arr[index].z += (
|
||||
DEMO_SELECT(40.0f + REG10_F(10), 40.0f) *
|
||||
center_to_edge_falloff *
|
||||
cM_ssin(k * 0x4000 + l * 0x2000 + mFlagPacket.mFlagWavePhase)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
cXyz* curr_nrm_p = mFlagPacket.getNrm();
|
||||
@@ -599,8 +603,8 @@ cPhs_State daGoal_Flag_c::_create() {
|
||||
#else
|
||||
if (cloth_resload_state == cPhs_ERROR_e || flag_resload_state == cPhs_ERROR_e) {
|
||||
return cPhs_ERROR_e;
|
||||
}
|
||||
if (cloth_resload_state != cPhs_COMPLEATE_e) {
|
||||
}
|
||||
if (cloth_resload_state != cPhs_COMPLEATE_e) {
|
||||
return cloth_resload_state;
|
||||
}
|
||||
if (flag_resload_state != cPhs_COMPLEATE_e) {
|
||||
@@ -608,7 +612,7 @@ cPhs_State daGoal_Flag_c::_create() {
|
||||
}
|
||||
|
||||
int dummy_int = 4;
|
||||
if (dummy_int == 4)
|
||||
if (dummy_int == 4)
|
||||
#endif
|
||||
{
|
||||
u8 path_id = fopAcM_GetParam(this) >> 16u;
|
||||
@@ -658,29 +662,29 @@ cPhs_State daGoal_Flag_c::_create() {
|
||||
u16 time_limit_modifier = (u16)dComIfGs_getEventReg(dSv_event_flag_c::UNK_AAFF) * 10;
|
||||
time_limit -= time_limit_modifier;
|
||||
mTimerProcID = fopMsgM_Timer_create(
|
||||
PROC_TIMER,
|
||||
2,
|
||||
time_limit,
|
||||
3,
|
||||
0,
|
||||
221.0f,
|
||||
439.0f,
|
||||
32.0f,
|
||||
419.0f,
|
||||
PROC_TIMER,
|
||||
2,
|
||||
time_limit,
|
||||
3,
|
||||
0,
|
||||
221.0f,
|
||||
439.0f,
|
||||
32.0f,
|
||||
419.0f,
|
||||
NULL
|
||||
);
|
||||
|
||||
|
||||
mMgameStartProcID = fopMsgM_MiniGameStarter_create(
|
||||
PROC_MINIGAME_STARTER,
|
||||
0,
|
||||
0x200,
|
||||
PROC_MINIGAME_STARTER,
|
||||
0,
|
||||
0x200,
|
||||
NULL
|
||||
);
|
||||
|
||||
dComIfGp_startMiniGame(1);
|
||||
dComIfGp_setMiniGameRupee(0);
|
||||
|
||||
setAction(&daGoal_Flag_c::RaceStart);
|
||||
setAction(&daGoal_Flag_c::RaceStart);
|
||||
mRaceStartState = 0;
|
||||
}
|
||||
|
||||
@@ -709,7 +713,7 @@ cPhs_State daGoal_Flag_c::_create() {
|
||||
void get_cloth_anim_sub_factor(cXyz* i_posP, cXyz* i_otherP, cXyz* o_dst, f32 i_idealDist) {
|
||||
cXyz vec_to_neighbor = *i_otherP - *i_posP;
|
||||
cXyz correction_dir = vec_to_neighbor.normZP();
|
||||
|
||||
|
||||
f32 diff_from_ideal = (vec_to_neighbor.abs() - i_idealDist);
|
||||
diff_from_ideal *= l_HIO.mClothStiffness;
|
||||
|
||||
@@ -729,58 +733,58 @@ cXyz daGoal_Flag_c::get_cloth_anim_factor(cXyz* i_posArr, cXyz* i_nrmArr, cXyz*
|
||||
anim_factor.y += l_HIO.mFlagSagFactor * ((float)i_row * 0.25f);
|
||||
if (i_col != 0) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col - 1) + (i_row * 9)],
|
||||
&anim_factor, 250.0f);
|
||||
&pos, &i_posArr[(i_col - 1) + (i_row * 9)],
|
||||
&anim_factor, 250.0f);
|
||||
if (i_row != 0) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[i_col + (i_row - 1) * 9],
|
||||
&anim_factor, 120.0f);
|
||||
&pos, &i_posArr[i_col + (i_row - 1) * 9],
|
||||
&anim_factor, 120.0f);
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col - 1) + (i_row - 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
&pos, &i_posArr[(i_col - 1) + (i_row - 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
}
|
||||
if (i_row != 4) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[i_col + (i_row + 1) * 9],
|
||||
&anim_factor, 120.0f);
|
||||
&pos, &i_posArr[i_col + (i_row + 1) * 9],
|
||||
&anim_factor, 120.0f);
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col - 1) + (i_row + 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
&pos, &i_posArr[(i_col - 1) + (i_row + 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
}
|
||||
if (i_col != 8) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col + 1) + i_row * 9],
|
||||
&pos, &i_posArr[(i_col + 1) + i_row * 9],
|
||||
&anim_factor, 250.0f);
|
||||
if (i_row != 0) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row - 1) * 9],
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row - 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
}
|
||||
if (i_row != 4) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row + 1) * 9],
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row + 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
}
|
||||
}
|
||||
return anim_factor;
|
||||
} else {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row * 9)],
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row * 9)],
|
||||
&anim_factor, 250.0f);
|
||||
if (i_row != 0) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[i_col + (i_row - 1) * 9],
|
||||
&pos, &i_posArr[i_col + (i_row - 1) * 9],
|
||||
&anim_factor, 120.0f);
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row - 1) * 9],
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row - 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
}
|
||||
if (i_row != 4) {
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[i_col + (i_row + 1) * 9],
|
||||
&pos, &i_posArr[i_col + (i_row + 1) * 9],
|
||||
&anim_factor, 120.0f);
|
||||
get_cloth_anim_sub_factor(
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row + 1) * 9],
|
||||
&pos, &i_posArr[(i_col + 1) + (i_row + 1) * 9],
|
||||
&anim_factor, 277.3085f);
|
||||
}
|
||||
return anim_factor;
|
||||
@@ -824,12 +828,12 @@ bool daGoal_Flag_c::_delete() {
|
||||
|
||||
/* 00001D74-00001DB4 .text getDemoAction__13daGoal_Flag_cFi */
|
||||
int daGoal_Flag_c::getDemoAction(int param_1) {
|
||||
static char* ActionNames[] = {
|
||||
static char* ActionNames[] = {
|
||||
"00_dummy",
|
||||
"01_dummy",
|
||||
"02_dummy",
|
||||
"03_dummy",
|
||||
"04_dummy"
|
||||
"04_dummy"
|
||||
};
|
||||
return dComIfGp_evmng_getMyActIdx(param_1, ActionNames, ARRAY_SIZE(ActionNames), FALSE, 0);
|
||||
}
|
||||
@@ -844,7 +848,7 @@ BOOL daGoal_Flag_c::RaceStart() {
|
||||
dComIfGp_evmng_cutEnd(staff_idx);
|
||||
} else {
|
||||
return TRUE;
|
||||
}
|
||||
}
|
||||
mRaceStartState++;
|
||||
} else {
|
||||
dTimer_c* timer_p = (dTimer_c*) fopMsgM_SearchByID(mTimerProcID);
|
||||
@@ -933,11 +937,11 @@ BOOL daGoal_Flag_c::TimerExecute() {
|
||||
rupees_collected = dComIfGp_getMiniGameRupee();
|
||||
remaining_time = timer_p->getRestTimeMs() / 10;
|
||||
mMgameTermProcID = fopMsgM_MiniGameTerminater_create(
|
||||
PROC_MINIGAME_TERMINATER,
|
||||
0,
|
||||
finish_type,
|
||||
remaining_time,
|
||||
rupees_collected,
|
||||
PROC_MINIGAME_TERMINATER,
|
||||
0,
|
||||
finish_type,
|
||||
remaining_time,
|
||||
rupees_collected,
|
||||
NULL
|
||||
);
|
||||
fopMsgM_SearchByID(mMgameTermProcID); // Unused return
|
||||
@@ -966,10 +970,10 @@ BOOL daGoal_Flag_c::RaceEnd() {
|
||||
};
|
||||
|
||||
mCamFramesPassed++;
|
||||
|
||||
|
||||
dTimer_c* timer_p;
|
||||
if (
|
||||
mTimerProcID != -1 &&
|
||||
mTimerProcID != -1 &&
|
||||
(timer_p = (dTimer_c*)fopMsgM_SearchByID(mTimerProcID)) &&
|
||||
timer_p->deleteCheck()
|
||||
) {
|
||||
@@ -978,14 +982,14 @@ BOOL daGoal_Flag_c::RaceEnd() {
|
||||
}
|
||||
|
||||
int staff_idx = dComIfGp_evmng_getMyStaffId("Gflag");
|
||||
|
||||
|
||||
if (staff_idx != -1) {
|
||||
dComIfGp_evmng_cutEnd(staff_idx);
|
||||
}
|
||||
}
|
||||
|
||||
BOOL end_chk = dComIfGp_evmng_endCheck(event_name_tbl[mRaceEndState != 3 ? 1 : 0]);
|
||||
|
||||
if (end_chk || (mCamFramesPassed > l_HIO.mEndCamEarlyFrame &&
|
||||
|
||||
if (end_chk || (mCamFramesPassed > l_HIO.mEndCamEarlyFrame &&
|
||||
(CPad_CHECK_TRIG_A(0) || CPad_CHECK_TRIG_B(0) || CPad_CHECK_TRIG_START(0)) )) {
|
||||
dComIfGp_setNextStage("sea", 1, 0x30);
|
||||
}
|
||||
@@ -1010,7 +1014,7 @@ bool daGoal_Flag_c::_execute() {
|
||||
flag_move();
|
||||
RopeMove();
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
/* 00002AAC-00002B14 .text daGoal_FlagExecute__FPv */
|
||||
static BOOL daGoal_FlagExecute(void* i_this) {
|
||||
|
||||
@@ -68,8 +68,8 @@ void daHookshot_shape::draw() {
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
GXSetArray(GX_VA_POS, &l_pos, sizeof(l_pos[0]));
|
||||
GXSetArray(GX_VA_TEX0, &l_texCoord, sizeof(l_texCoord[0]));
|
||||
dKy_GxFog_set();
|
||||
|
||||
@@ -478,15 +478,19 @@ void daMajuu_Flag_packet_c::draw() {
|
||||
dKy_GxFog_tevstr_set(mpTevStr);
|
||||
dKy_setLight_mine(mpTevStr);
|
||||
GXClearVtxDesc();
|
||||
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
|
||||
GXSetArray(GX_VA_POS, getPos(), sizeof(cXyz) * 1);
|
||||
GXSetArray(GX_VA_NRM, getNrm(), sizeof(cXyz) * 1);
|
||||
GXSetArray(GX_VA_TEX0, l_texCoord, sizeof(l_texCoord[0]));
|
||||
|
||||
GXLoadTexObj(getImageTexObj(), GX_TEXMAP0);
|
||||
GXLoadTexObj(getToonTexObj(), GX_TEXMAP1);
|
||||
GXSetNumChans(1);
|
||||
|
||||
@@ -227,16 +227,20 @@ void daPirate_Flag_packet_c::draw() {
|
||||
|
||||
dKy_GxFog_tevstr_set(mTevStr);
|
||||
dKy_setLight_mine(mTevStr);
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_POS_XY, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
|
||||
GXSetArray(GX_VA_POS, mPos[m87E], sizeof(cXyz));
|
||||
GXSetArray(GX_VA_NRM, mNrm[m87E], sizeof(cXyz));
|
||||
GXSetArray(GX_VA_TEX0, l_texCoord, sizeof(*l_texCoord));
|
||||
|
||||
GXTexObj texObj;
|
||||
ResTIMG* timg = static_cast<ResTIMG*>(dComIfG_getObjectRes("Kaizokusen", KAIZOKUSEN_INDEX_BTI_TXA_KAIZOKU_HATA));
|
||||
GXInitTexObj(&texObj, (char*)timg + timg->imageOffset, timg->width, timg->height,
|
||||
|
||||
@@ -124,8 +124,9 @@ void daPy_sightPacket_c::draw() {
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_S8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_U8, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_S8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_U8, 0);
|
||||
|
||||
GXTexObj texObj;
|
||||
GXColor color;
|
||||
@@ -279,11 +280,13 @@ void daPy_swBlur_c::draw() {
|
||||
GXInitTexObjLOD(&texObj, GX_LINEAR, GX_LINEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1);
|
||||
GXLoadTexObj(&texObj, GX_TEXMAP0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_S16, 8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_S16, 8);
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
|
||||
GXSetNumChans(0);
|
||||
|
||||
if (mBlurColorType == NORMAL_SLASH_BLUR) {
|
||||
@@ -318,6 +321,7 @@ void daPy_swBlur_c::draw() {
|
||||
int r30 = 0xFF / ((field_0x014 >> 1) + 1);
|
||||
s16 r29 = r30;
|
||||
s16 r28 = 0x00;
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4 + field_0x014*4);
|
||||
for (int i = field_0x014; i >= 0; i--) {
|
||||
GXPosition3f32(field_0x034[i+0].x, field_0x034[i+0].y, field_0x034[i+0].z);
|
||||
@@ -331,6 +335,7 @@ void daPy_swBlur_c::draw() {
|
||||
r28 = r29;
|
||||
r29 += r30;
|
||||
}
|
||||
GXEnd();
|
||||
|
||||
#if VERSION > VERSION_JPN
|
||||
J3DShape::resetVcdVatCache();
|
||||
|
||||
@@ -388,9 +388,10 @@ void daSail_packet_c::draw() {
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX8);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_POS_XY, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
|
||||
GXSetArray(GX_VA_POS, mPos[m1C3A], sizeof(cXyz));
|
||||
GXSetArray(GX_VA_NRM, mNrm[m1C3A], sizeof(cXyz));
|
||||
|
||||
@@ -833,11 +833,14 @@ void daSea_packet_c::draw() {
|
||||
|
||||
GXLoadPosMtxImm(j3dSys.getViewMtx(), 0);
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS,GX_INDEX16);
|
||||
GXSetVtxDesc(GX_VA_TEX0,GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0,GX_VA_POS,GX_CLR_RGBA,GX_F32,0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0,GX_VA_TEX0,GX_CLR_RGBA,GX_F32,0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0,GX_VA_POS,GX_POS_XYZ,GX_F32,0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0,GX_VA_TEX0,GX_TEX_ST,GX_F32,0);
|
||||
|
||||
GXSetArray(GX_VA_POS, this->m_draw_vtx, sizeof(cXyz));
|
||||
|
||||
// TODO: Remove magic numbers
|
||||
|
||||
@@ -2313,7 +2313,7 @@ void dKyr_drawLenzflare(Mtx drawMtx, cXyz* pPos, GXColor& color, u8** pImg) {
|
||||
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||
GXSetClipMode(GX_CLIP_ENABLE);
|
||||
GXSetNumIndStages(0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXLoadPosMtxImm(drawMtx, GX_PNMTX0);
|
||||
@@ -3132,7 +3132,7 @@ void dKyr_drawStar(Mtx drawMtx, u8** pImg) {
|
||||
GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_CLEAR);
|
||||
GXSetAlphaCompare(GX_GREATER, 0, GX_AOP_OR, GX_GREATER, 0);
|
||||
GXSetNumIndStages(0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
|
||||
|
||||
@@ -85,20 +85,20 @@ void dOvlpFd2_dlst_c::draw() {
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_S16, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_POS_XYZ, GX_S8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_S8, 0);
|
||||
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
GXPosition2s16(-320, 240);
|
||||
GXTexCoord2u8(0, 0);
|
||||
GXTexCoord2s8(0, 0);
|
||||
|
||||
GXPosition2s16(320, 240);
|
||||
GXTexCoord2u8(1, 0);
|
||||
GXTexCoord2s8(1, 0);
|
||||
|
||||
GXPosition2s16(320, -240);
|
||||
GXTexCoord2u8(1, 1);
|
||||
GXTexCoord2s8(1, 1);
|
||||
|
||||
GXPosition2s16(-320, -240);
|
||||
GXTexCoord2u8(0, 1);
|
||||
GXTexCoord2s8(0, 1);
|
||||
GXEnd();
|
||||
|
||||
J2DOrthoGraph* graf = dComIfGp_getCurrentGrafPort();
|
||||
|
||||
@@ -110,7 +110,7 @@ void cnvAddress(f32 x1, f32 y1, f32* x2, f32* y2) {
|
||||
void dDlst_2Dt_Sp_c::draw() {
|
||||
dDlst_setResTimgObj(mDoGph_gInf_c::getFrameBufferTimg(), &mTexObj, mImagePtr, mImageWidth, mImageHeight);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_POS_XYZ, GX_U8, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_U8, 0);
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
|
||||
+3
-3
@@ -230,7 +230,7 @@ void dTree_packet_c::draw() {
|
||||
};
|
||||
static GXVtxAttrFmtList l_shadowVtxAttrFmtList[] = {
|
||||
{GX_VA_POS, GX_POS_XYZ, GX_S8, 0x00},
|
||||
{GX_VA_TEX0, GX_POS_XYZ, GX_S8, 0x00},
|
||||
{GX_VA_TEX0, GX_TEX_ST, GX_S8, 0x00},
|
||||
{GX_VA_NULL, GX_POS_XYZ, GX_S8, 0x00},
|
||||
};
|
||||
static GXVtxDescList l_vtxDescList[] = {
|
||||
@@ -241,8 +241,8 @@ void dTree_packet_c::draw() {
|
||||
};
|
||||
static GXVtxAttrFmtList l_vtxAttrFmtList[] = {
|
||||
{GX_VA_POS, GX_POS_XYZ, GX_F32, 0x00},
|
||||
{GX_VA_CLR0, GX_POS_XYZ, GX_RGBA8, 0x00},
|
||||
{GX_VA_TEX0, GX_POS_XYZ, GX_F32, 0x00},
|
||||
{GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0x00},
|
||||
{GX_VA_TEX0, GX_TEX_ST, GX_F32, 0x00},
|
||||
{GX_VA_NULL, GX_POS_XYZ, GX_S8, 0x00},
|
||||
};
|
||||
static struct {
|
||||
|
||||
+4
-4
@@ -956,8 +956,8 @@ void dWood::Packet_c::draw() {
|
||||
{GX_VA_NULL, GX_NONE},
|
||||
};
|
||||
static GXVtxAttrFmtList l_shadowVtxAttrFmtList[] = {
|
||||
{GX_VA_POS, GX_CLR_RGBA, GX_RGB8, 0x00},
|
||||
{GX_VA_TEX0, GX_CLR_RGBA, GX_RGB8, 0x00},
|
||||
{GX_VA_POS, GX_POS_XYZ, GX_S8, 0x00},
|
||||
{GX_VA_TEX0, GX_TEX_ST, GX_S8, 0x00},
|
||||
{GX_VA_NULL, GX_CLR_RGBA, GX_RGB8, 0x00},
|
||||
};
|
||||
static GXVtxDescList l_vtxDescList[] = {
|
||||
@@ -967,9 +967,9 @@ void dWood::Packet_c::draw() {
|
||||
{GX_VA_NULL, GX_NONE},
|
||||
};
|
||||
static GXVtxAttrFmtList l_vtxAttrFmtList[] = {
|
||||
{GX_VA_POS, GX_CLR_RGBA, GX_F32, 0x00},
|
||||
{GX_VA_POS, GX_POS_XYZ, GX_F32, 0x00},
|
||||
{GX_VA_CLR0, GX_CLR_RGBA, GX_RGBA8, 0x00},
|
||||
{GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0x00},
|
||||
{GX_VA_TEX0, GX_TEX_ST, GX_F32, 0x00},
|
||||
{GX_VA_NULL, GX_CLR_RGBA, GX_RGB8, 0x00},
|
||||
};
|
||||
static GXColor l_shadowColor = {0x00, 0x00, 0x00, 0x64};
|
||||
|
||||
+15
-5
@@ -1958,12 +1958,16 @@ void mDoExt_3DlineMat0_c::setMaterial() {
|
||||
GXSetNumIndStages(0);
|
||||
#endif
|
||||
dKy_setLight_again();
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX8);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_RGB8, 6);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_S8, 6);
|
||||
|
||||
GXSetArray(GX_VA_NRM, l_normal, sizeof(*l_normal));
|
||||
|
||||
if (mpTevStr) {
|
||||
dKy_GxFog_tevstr_set(mpTevStr);
|
||||
GXCallDisplayList(l_toonMatDL, 0x80);
|
||||
@@ -1971,6 +1975,7 @@ void mDoExt_3DlineMat0_c::setMaterial() {
|
||||
dKy_GxFog_set();
|
||||
GXCallDisplayList(l_matDL, 0x80);
|
||||
}
|
||||
|
||||
GXLoadPosMtxImm(j3dSys.getViewMtx(), GX_PNMTX0);
|
||||
GXLoadNrmMtxImm(cMtx_getIdentity(), GX_PNMTX0);
|
||||
}
|
||||
@@ -2219,14 +2224,18 @@ void mDoExt_3DlineMat1_c::setMaterial() {
|
||||
GXSetNumIndStages(0);
|
||||
#endif
|
||||
dKy_setLight_again();
|
||||
|
||||
GXClearVtxDesc();
|
||||
GXSetVtxDesc(GX_VA_POS, GX_INDEX16);
|
||||
GXSetVtxDesc(GX_VA_NRM, GX_INDEX8);
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_INDEX16);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_CLR_RGB, GX_RGB8, 6);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_CLR_RGBA, GX_F32, 0);
|
||||
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XYZ, GX_F32, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_NRM, GX_NRM_XYZ, GX_S8, 6);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_TEX0, GX_TEX_ST, GX_F32, 0);
|
||||
|
||||
GXSetArray(GX_VA_NRM, l_normal, sizeof(*l_normal));
|
||||
|
||||
if (mpTevStr) {
|
||||
dKy_GxFog_tevstr_set(mpTevStr);
|
||||
GXCallDisplayList(l_toonMat1DL, 0xA0);
|
||||
@@ -2234,6 +2243,7 @@ void mDoExt_3DlineMat1_c::setMaterial() {
|
||||
dKy_GxFog_set();
|
||||
GXCallDisplayList(l_mat1DL, 0x80);
|
||||
}
|
||||
|
||||
GXLoadPosMtxImm(j3dSys.getViewMtx(), GX_PNMTX0);
|
||||
GXLoadNrmMtxImm(cMtx_getIdentity(), GX_PNMTX0);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user