diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-02-10 11:20:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-02-10 21:20:42 +0200 |
| commit | 2453c0e3333157090e839eeab768d19b6a2b0ba1 (patch) | |
| tree | f51d7bcca7a8227966fc05ee7ef25cd508075a4c /src/JSystem/J3DGraphBase | |
| parent | 6c24ff192933300faf555f1411e03432c751afe5 (diff) | |
copy dolsdk2004 to tp / b_bh + e_mb done (#2299)
* move dolsdk2004 over
* cleanup some temp work
* finish and cleanup gf
* b_bh done
* d_a_e_mb done
Diffstat (limited to 'src/JSystem/J3DGraphBase')
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DGD.cpp | 90 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DMatBlock.cpp | 179 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DPacket.cpp | 7 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DShape.cpp | 48 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DShapeDraw.cpp | 2 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DShapeMtx.cpp | 4 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DStruct.cpp | 4 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DSys.cpp | 18 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DTevs.cpp | 3 | ||||
| -rw-r--r-- | src/JSystem/J3DGraphBase/J3DVertex.cpp | 5 |
10 files changed, 182 insertions, 178 deletions
diff --git a/src/JSystem/J3DGraphBase/J3DGD.cpp b/src/JSystem/J3DGraphBase/J3DGD.cpp index 9f247100e2..2bb4e24c82 100644 --- a/src/JSystem/J3DGraphBase/J3DGD.cpp +++ b/src/JSystem/J3DGraphBase/J3DGD.cpp @@ -96,89 +96,89 @@ void J3DGDSetVtxAttrFmtv(GXVtxFmt fmt, GXVtxAttrFmtList const* fmtList, bool par u32 tex7_cnt = GX_TEX_ST; u32 tex7_type = GX_F32; u32 tex7_shift = 0; - for (; fmtList->mAttrib != GX_VA_NULL; fmtList++) { - switch (fmtList->mAttrib) { + for (; fmtList->attr != GX_VA_NULL; fmtList++) { + switch (fmtList->attr) { case GX_VA_POS: - pos_cnt = fmtList->mCompCnt; - pos_type = fmtList->mCompType; - pos_shift = fmtList->mCompShift; + pos_cnt = fmtList->cnt; + pos_type = fmtList->type; + pos_shift = fmtList->frac; break; case GX_VA_NRM: case GX_VA_NBT: - nrm_type = fmtList->mCompType; - if (fmtList->mCompCnt == GX_NRM_NBT3) { + nrm_type = fmtList->type; + if (fmtList->cnt == GX_NRM_NBT3) { nrm_cnt = GX_NRM_NBT; local_34 = 1; } else { if (param_2) { nrm_cnt = GX_NRM_NBT; } else { - nrm_cnt = fmtList->mCompCnt; + nrm_cnt = fmtList->cnt; } local_34 = 0; } break; case GX_VA_CLR0: - clr0_cnt = fmtList->mCompCnt; - clr0_type = fmtList->mCompType; + clr0_cnt = fmtList->cnt; + clr0_type = fmtList->type; break; case GX_VA_CLR1: - clr1_cnt = fmtList->mCompCnt; - clr1_type = fmtList->mCompType; + clr1_cnt = fmtList->cnt; + clr1_type = fmtList->type; break; case GX_VA_TEX0: - tex0_cnt = fmtList->mCompCnt; - tex0_type = fmtList->mCompType; - tex0_shift = fmtList->mCompShift; + tex0_cnt = fmtList->cnt; + tex0_type = fmtList->type; + tex0_shift = fmtList->frac; break; case GX_VA_TEX1: - tex1_cnt = fmtList->mCompCnt; - tex1_type = fmtList->mCompType; - tex1_shift = fmtList->mCompShift; + tex1_cnt = fmtList->cnt; + tex1_type = fmtList->type; + tex1_shift = fmtList->frac; break; case GX_VA_TEX2: - tex2_cnt = fmtList->mCompCnt; - tex2_type = fmtList->mCompType; - tex2_shift = fmtList->mCompShift; + tex2_cnt = fmtList->cnt; + tex2_type = fmtList->type; + tex2_shift = fmtList->frac; break; case GX_VA_TEX3: - tex3_cnt = fmtList->mCompCnt; - tex3_type = fmtList->mCompType; - tex3_shift = fmtList->mCompShift; + tex3_cnt = fmtList->cnt; + tex3_type = fmtList->type; + tex3_shift = fmtList->frac; break; case GX_VA_TEX4: - tex4_cnt = fmtList->mCompCnt; - tex4_type = fmtList->mCompType; - tex4_shift = fmtList->mCompShift; + tex4_cnt = fmtList->cnt; + tex4_type = fmtList->type; + tex4_shift = fmtList->frac; break; case GX_VA_TEX5: - tex5_cnt = fmtList->mCompCnt; - tex5_type = fmtList->mCompType; - tex5_shift = fmtList->mCompShift; + tex5_cnt = fmtList->cnt; + tex5_type = fmtList->type; + tex5_shift = fmtList->frac; break; case GX_VA_TEX6: - tex6_cnt = fmtList->mCompCnt; - tex6_type = fmtList->mCompType; - tex6_shift = fmtList->mCompShift; + tex6_cnt = fmtList->cnt; + tex6_type = fmtList->type; + tex6_shift = fmtList->frac; break; case GX_VA_TEX7: - tex7_cnt = fmtList->mCompCnt; - tex7_type = fmtList->mCompType; - tex7_shift = fmtList->mCompShift; + tex7_cnt = fmtList->cnt; + tex7_type = fmtList->type; + tex7_shift = fmtList->frac; break; } } GDOverflowCheck(0x12); - J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP0 + fmt, + J3DGDWriteCPCmd(CP_REG_VAT_GRP0_ID + fmt, pos_cnt | pos_type << 1 | pos_shift << 4 | nrm_cnt << 9 | nrm_type << 0xa | clr0_cnt << 0xd | clr0_type << 0xe | clr1_cnt << 0x11 | clr1_type << 0x12 | tex0_cnt << 0x15 | tex0_type << 0x16 | tex0_shift << 0x19 | 0x40000000 | local_34 << 0x1f); - J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP1 + fmt, + J3DGDWriteCPCmd(CP_REG_VAT_GRP1_ID + fmt, tex1_cnt | tex1_type << 1 | tex1_shift << 4 | tex2_cnt << 9 | tex2_type << 0xa | tex2_shift << 0xd | tex3_cnt << 0x12 | tex3_type << 0x13 | tex3_shift << 0x16 | tex4_cnt << 0x1b | tex4_type << 0x1c | 0x80000000); - J3DGDWriteCPCmd(GX_CP_REG_VAT_GRP2 + fmt, + J3DGDWriteCPCmd(CP_REG_VAT_GRP2_ID + fmt, tex4_shift | tex5_cnt << 5 | tex5_type << 6 | tex5_shift << 9 | tex6_cnt << 0xe | tex6_type << 0xf | tex6_shift << 0x12 | tex7_cnt << 0x17 | tex7_type << 0x18 | tex7_shift << 0x1b); @@ -482,14 +482,14 @@ void J3DGDSetIndTexOrder(u32 count, GXTexCoordID coord0, GXTexMapID map0, GXTexC void J3DGDSetTevOrder(GXTevStageID stage, GXTexCoordID coord0, GXTexMapID map0, GXChannelID channel0, GXTexCoordID coord1, GXTexMapID map1, GXChannelID channel1) { - coord0 = coord0 >= GX_MAXCOORD ? GX_TEXCOORD0 : coord0; - coord1 = coord1 >= GX_MAXCOORD ? GX_TEXCOORD0 : coord1; + coord0 = coord0 >= GX_MAX_TEXCOORD ? GX_TEXCOORD0 : coord0; + coord1 = coord1 >= GX_MAX_TEXCOORD ? GX_TEXCOORD0 : coord1; GDOverflowCheck(5); static u8 c2r[] = {0, 1, 0, 1, 0, 1, 7, 5, 6, 0, 0, 0, 0, 0, 0, 7}; J3DGDWriteBPCmd((map0 & 7) | coord0 << 3 | - (map0 != GX_TEXMAP_NULL && !(map0 & GX_TEXMAP_DISABLE)) << 6 | + (map0 != GX_TEXMAP_NULL && !(map0 & GX_TEX_DISABLE)) << 6 | c2r[channel0 & 0xf] << 7 | (map1 & 7) << 0xc | coord1 << 0xf | - (map1 != GX_TEXMAP_NULL && !(map1 & GX_TEXMAP_DISABLE)) << 0x12 | + (map1 != GX_TEXMAP_NULL && !(map1 & GX_TEX_DISABLE)) << 0x12 | c2r[channel1 & 0xf] << 0x13 | (stage / 2 + GX_BP_REG_RAS1_TREF0) << 0x18); } @@ -552,8 +552,8 @@ void J3DGDSetFog(GXFogType fogType, f32 param_1, f32 param_2, f32 nearZ, f32 far void J3DGDSetFogRangeAdj(u8 param_0, u16 param_1, GXFogAdjTable* table) { if (param_0 != 0) { for (int i = 0; i < 0xa; i += 2) { - J3DGDWriteBPCmd((i / 2 + GX_BP_REG_FOGRANGEK0) << 0x18 | table->fogVals[i + 1] << 0xc | - table->fogVals[i]); + J3DGDWriteBPCmd((i / 2 + GX_BP_REG_FOGRANGEK0) << 0x18 | table->r[i + 1] << 0xc | + table->r[i]); } } u32 cmd = GX_BP_REG_FOGRANGE << 0x18 | (param_1 + 0x156) | param_0 << 0xa; diff --git a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp index dcf815323c..6af9f074db 100644 --- a/src/JSystem/J3DGraphBase/J3DMatBlock.cpp +++ b/src/JSystem/J3DGraphBase/J3DMatBlock.cpp @@ -10,6 +10,7 @@ #include "dol2asm.h" #include "dolphin/os.h" #include "string.h" +#include "global.h" inline void loadMatColors(const J3DGXColor* color) { J3DGDWriteXFCmdHdr(0x100C, 2); @@ -408,25 +409,25 @@ void J3DColorBlockLightOff::patch() { /* 80318F00-803190AC 313840 01AC+00 2/0 0/0 0/0 .text patchMatColor__21J3DColorBlockLightOffFv */ void J3DColorBlockLightOff::patchMatColor() { GDSetCurrOffset(mMatColorOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); GDOverflowCheck(SizeOfLoadMatColors); loadMatColors(mMatColor); - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 803190AC-803194E8 3139EC 043C+00 2/0 0/0 0/0 .text patchLight__21J3DColorBlockLightOffFv */ void J3DColorBlockLightOff::patchLight() { GDSetCurrOffset(mColorChanOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); GDOverflowCheck(SizeOfLoadColorChans); J3DGDWriteXFCmdHdr(0x100e, 4); mColorChan[0].load(); mColorChan[1].load(); mColorChan[2].load(); mColorChan[3].load(); - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 803194E8-80319534 313E28 004C+00 1/0 0/0 0/0 .text patch__20J3DColorBlockLightOnFv */ @@ -438,17 +439,17 @@ void J3DColorBlockLightOn::patch() { /* 80319534-803196E0 313E74 01AC+00 1/0 0/0 0/0 .text patchMatColor__20J3DColorBlockLightOnFv */ void J3DColorBlockLightOn::patchMatColor() { GDSetCurrOffset(mMatColorOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); GDOverflowCheck(SizeOfLoadMatColors); loadMatColors(mMatColor); - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 803196E0-80319B4C 314020 046C+00 1/0 0/0 0/0 .text patchLight__20J3DColorBlockLightOnFv */ void J3DColorBlockLightOn::patchLight() { GDSetCurrOffset(mColorChanOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); GDOverflowCheck(SizeOfLoadColorChans); J3DGDWriteXFCmdHdr(0x100e, 4); mColorChan[0].load(); @@ -460,8 +461,8 @@ void J3DColorBlockLightOn::patchLight() { mLight[i]->load(i); } } - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 80319B4C-80319BB4 31448C 0068+00 2/0 0/0 0/0 .text diff__21J3DColorBlockLightOffFUl */ @@ -563,40 +564,40 @@ void J3DTexGenBlockBasic::load() { /* 8031AA88-8031AB18 3153C8 0090+00 1/0 0/0 0/0 .text patch__21J3DTexGenBlockPatchedFv */ void J3DTexGenBlockPatched::patch() { GDSetCurrOffset(mTexMtxOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 8; i++) { if (mTexMtx[i]) { mTexMtx[i]->load(i); } } - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031AB18-8031ABC0 315458 00A8+00 1/0 0/0 0/0 .text patch__15J3DTexGenBlock4Fv */ void J3DTexGenBlock4::patch() { GDSetCurrOffset(mTexMtxOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 4; i++) { if (mTexMtx[i] && mTexCoord[i].getTexGenMtx() != GX_IDENTITY) { mTexMtx[i]->load(i); } } - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031ABC0-8031AC68 315500 00A8+00 1/0 0/0 0/0 .text patch__19J3DTexGenBlockBasicFv */ void J3DTexGenBlockBasic::patch() { GDSetCurrOffset(mTexMtxOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 8; i++) { if (mTexMtx[i] && mTexCoord[i].getTexGenMtx() != GX_IDENTITY) { mTexMtx[i]->load(i); } } - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031AC68-8031ACD0 3155A8 0068+00 3/0 0/0 0/0 .text diff__21J3DTexGenBlockPatchedFUl */ @@ -693,8 +694,8 @@ void J3DTevBlock2::load() { GXTevKAlphaSel(mTevKAlphaSel[0]), GXTevKColorSel(mTevKColorSel[1]), GXTevKAlphaSel(mTevKAlphaSel[1]), - GXTevColor(mTevSwapModeTable[i / 4].getR()), - GXTevColor(mTevSwapModeTable[i / 4].getG()) + GXTevColorChan(mTevSwapModeTable[i / 4].getR()), + GXTevColorChan(mTevSwapModeTable[i / 4].getG()) ); J3DGDSetTevKonstantSel_SwapModeTable( GXTevStageID(i + 2), @@ -702,8 +703,8 @@ void J3DTevBlock2::load() { GXTevKAlphaSel(mTevKAlphaSel[0]), GXTevKColorSel(mTevKColorSel[1]), GXTevKAlphaSel(mTevKAlphaSel[1]), - GXTevColor(mTevSwapModeTable[i / 4].getB()), - GXTevColor(mTevSwapModeTable[i / 4].getA()) + GXTevColorChan(mTevSwapModeTable[i / 4].getB()), + GXTevColorChan(mTevSwapModeTable[i / 4].getA()) ); } } @@ -754,8 +755,8 @@ void J3DTevBlock4::load() { GXTevKAlphaSel(mTevKAlphaSel[0]), GXTevKColorSel(mTevKColorSel[1]), GXTevKAlphaSel(mTevKAlphaSel[1]), - GXTevColor(mTevSwapModeTable[i / 4].getR()), - GXTevColor(mTevSwapModeTable[i / 4].getG()) + GXTevColorChan(mTevSwapModeTable[i / 4].getR()), + GXTevColorChan(mTevSwapModeTable[i / 4].getG()) ); J3DGDSetTevKonstantSel_SwapModeTable( GXTevStageID(i + 2), @@ -763,8 +764,8 @@ void J3DTevBlock4::load() { GXTevKAlphaSel(mTevKAlphaSel[2]), GXTevKColorSel(mTevKColorSel[3]), GXTevKAlphaSel(mTevKAlphaSel[3]), - GXTevColor(mTevSwapModeTable[i / 4].getB()), - GXTevColor(mTevSwapModeTable[i / 4].getA()) + GXTevColorChan(mTevSwapModeTable[i / 4].getB()), + GXTevColorChan(mTevSwapModeTable[i / 4].getA()) ); } } @@ -815,8 +816,8 @@ void J3DTevBlock16::load() { GXTevKAlphaSel(mTevKAlphaSel[i]), GXTevKColorSel(mTevKColorSel[i + 1]), GXTevKAlphaSel(mTevKAlphaSel[i + 1]), - GXTevColor(mTevSwapModeTable[i / 4].getR()), - GXTevColor(mTevSwapModeTable[i / 4].getG()) + GXTevColorChan(mTevSwapModeTable[i / 4].getR()), + GXTevColorChan(mTevSwapModeTable[i / 4].getG()) ); J3DGDSetTevKonstantSel_SwapModeTable( GXTevStageID(i + 2), @@ -824,8 +825,8 @@ void J3DTevBlock16::load() { GXTevKAlphaSel(mTevKAlphaSel[i + 2]), GXTevKColorSel(mTevKColorSel[i + 3]), GXTevKAlphaSel(mTevKAlphaSel[i + 3]), - GXTevColor(mTevSwapModeTable[i / 4].getB()), - GXTevColor(mTevSwapModeTable[i / 4].getA()) + GXTevColorChan(mTevSwapModeTable[i / 4].getB()), + GXTevColorChan(mTevSwapModeTable[i / 4].getA()) ); } } @@ -835,7 +836,7 @@ void J3DTevBlock16::load() { */ void J3DTevBlockPatched::patchTexNo() { GDSetCurrOffset(mTexNoOffset); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 8; i++) { if (mTexNo[i] != 0xffff) { @@ -843,15 +844,15 @@ void J3DTevBlockPatched::patchTexNo() { } } - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031BFE0-8031C0AC 316920 00CC+00 1/0 0/0 0/0 .text patchTevReg__18J3DTevBlockPatchedFv */ void J3DTevBlockPatched::patchTevReg() { GDSetCurrOffset(mTevRegOffset); - u8 *pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < ARRAY_SIZE(mTevColor) - 1; i++) { J3DGDSetTevColorS10((GXTevRegID)(i + 1), mTevColor[i]); @@ -860,15 +861,15 @@ void J3DTevBlockPatched::patchTevReg() { J3DGDSetTevKColor((GXTevKColorID)i, mTevKColor[i]); } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C0AC-8031C228 3169EC 017C+00 1/0 0/0 0/0 .text * patchTexNoAndTexCoordScale__18J3DTevBlockPatchedFv */ void J3DTevBlockPatched::patchTexNoAndTexCoordScale() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); u8 tevStageNum = mTevStageNum; for (u32 i = 0; i < 8; i++) { @@ -897,8 +898,8 @@ void J3DTevBlockPatched::patchTexNoAndTexCoordScale() { ); } - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C228-8031C274 316B68 004C+00 1/0 0/0 0/0 .text patch__18J3DTevBlockPatchedFv */ @@ -910,14 +911,14 @@ void J3DTevBlockPatched::patch() { /* 8031C274-8031C2E4 316BB4 0070+00 1/0 0/0 0/0 .text patchTexNo__12J3DTevBlock1Fv */ void J3DTevBlock1::patchTexNo() { GDSetCurrOffset(mTexNoOffset); - u8 *pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); if (mTexNo[0] != 0xFFFF) { loadTexNo(0, mTexNo[0]); } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C2E4-8031C2E8 316C24 0004+00 1/0 0/0 0/0 .text patchTevReg__12J3DTevBlock1Fv */ @@ -928,7 +929,7 @@ void J3DTevBlock1::patchTevReg() { */ void J3DTevBlock1::patchTexNoAndTexCoordScale() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); if (mTexNo[0] != 0xffff) { loadTexNo(0, mTexNo[0]); @@ -948,8 +949,8 @@ void J3DTevBlock1::patchTexNoAndTexCoordScale() { J3DSys::sTexCoordScaleTable[mTevOrder[0].getTevOrderInfo().mTexMap & 7] ); - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C3CC-8031C3F8 316D0C 002C+00 1/0 0/0 0/0 .text patch__12J3DTevBlock1Fv */ @@ -960,7 +961,7 @@ void J3DTevBlock1::patch() { /* 8031C3F8-8031C48C 316D38 0094+00 1/0 0/0 0/0 .text patchTexNo__12J3DTevBlock2Fv */ void J3DTevBlock2::patchTexNo() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 2; i++) { if (mTexNo[i] != 0xffff) { @@ -968,14 +969,14 @@ void J3DTevBlock2::patchTexNo() { } } - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C48C-8031C558 316DCC 00CC+00 1/0 0/0 0/0 .text patchTevReg__12J3DTevBlock2Fv */ void J3DTevBlock2::patchTevReg() { GDSetCurrOffset(mTevRegOffset); - u8 *pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < ARRAY_SIZE(mTevColor) - 1; i++) { J3DGDSetTevColorS10((GXTevRegID)(i + 1), mTevColor[i]); @@ -984,15 +985,15 @@ void J3DTevBlock2::patchTevReg() { J3DGDSetTevKColor((GXTevKColorID)i, mTevKColor[i]); } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C558-8031C6A8 316E98 0150+00 1/0 0/0 0/0 .text patchTexNoAndTexCoordScale__12J3DTevBlock2Fv */ void J3DTevBlock2::patchTexNoAndTexCoordScale() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 2; i++) { if (mTexNo[i] != 0xffff) { @@ -1018,8 +1019,8 @@ void J3DTevBlock2::patchTexNoAndTexCoordScale() { J3DSys::sTexCoordScaleTable[mTevOrder[1].getTevOrderInfo().mTexMap & 7] ); - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C6A8-8031C6F4 316FE8 004C+00 1/0 0/0 0/0 .text patch__12J3DTevBlock2Fv */ @@ -1031,7 +1032,7 @@ void J3DTevBlock2::patch() { /* 8031C6F4-8031C788 317034 0094+00 1/0 0/0 0/0 .text patchTexNo__12J3DTevBlock4Fv */ void J3DTevBlock4::patchTexNo() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 4; i++) { if (mTexNo[i] != 0xffff) { @@ -1039,14 +1040,14 @@ void J3DTevBlock4::patchTexNo() { } } - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C788-8031C854 3170C8 00CC+00 1/0 0/0 0/0 .text patchTevReg__12J3DTevBlock4Fv */ void J3DTevBlock4::patchTevReg() { GDSetCurrOffset(mTevRegOffset); - u8 *pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < ARRAY_SIZE(mTevColor) - 1; i++) { J3DGDSetTevColorS10((GXTevRegID)(i + 1), mTevColor[i]); @@ -1055,15 +1056,15 @@ void J3DTevBlock4::patchTevReg() { J3DGDSetTevKColor((GXTevKColorID)i, mTevKColor[i]); } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C854-8031C9D0 317194 017C+00 1/0 0/0 0/0 .text patchTexNoAndTexCoordScale__12J3DTevBlock4Fv */ void J3DTevBlock4::patchTexNoAndTexCoordScale() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); u8 tevStageNum = mTevStageNum; for (u32 i = 0; i < 4; i++) { @@ -1092,8 +1093,8 @@ void J3DTevBlock4::patchTexNoAndTexCoordScale() { ); } - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031C9D0-8031CA1C 317310 004C+00 1/0 0/0 0/0 .text patch__12J3DTevBlock4Fv */ void J3DTevBlock4::patch() { @@ -1104,7 +1105,7 @@ void J3DTevBlock4::patch() { /* 8031CA1C-8031CAB0 31735C 0094+00 1/0 0/0 0/0 .text patchTexNo__13J3DTevBlock16Fv */ void J3DTevBlock16::patchTexNo() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < 8; i++) { if (mTexNo[i] != 0xffff) { @@ -1112,14 +1113,14 @@ void J3DTevBlock16::patchTexNo() { } } - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031CAB0-8031CB7C 3173F0 00CC+00 1/0 0/0 0/0 .text patchTevReg__13J3DTevBlock16Fv */ void J3DTevBlock16::patchTevReg() { GDSetCurrOffset(mTevRegOffset); - u8 *pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; i < ARRAY_SIZE(mTevColor) - 1; i++) { J3DGDSetTevColorS10((GXTevRegID)(i + 1), mTevColor[i]); @@ -1128,15 +1129,15 @@ void J3DTevBlock16::patchTevReg() { J3DGDSetTevKColor((GXTevKColorID)i, mTevKColor[i]); } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031CB7C-8031CCF8 3174BC 017C+00 1/0 0/0 0/0 .text * patchTexNoAndTexCoordScale__13J3DTevBlock16Fv */ void J3DTevBlock16::patchTexNoAndTexCoordScale() { GDSetCurrOffset(mTexNoOffset); - u8 *start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); u8 tevStageNum = mTevStageNum; for (u32 i = 0; i < 8; i++) { @@ -1165,8 +1166,8 @@ void J3DTevBlock16::patchTexNoAndTexCoordScale() { ); } - u8 *end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } @@ -1428,7 +1429,7 @@ void J3DTevBlock16::diffTexCoordScale() { /* 8031DED0-8031DFB4 318810 00E4+00 1/0 0/0 0/0 .text ptrToIndex__13J3DTevBlock16Fv */ void J3DTevBlock16::ptrToIndex() { GDSetCurrOffset(mTexNoOffset); - u8* pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); u32 offs = 0; for (u32 i = 0; i < 8; i++) { @@ -1442,15 +1443,15 @@ void J3DTevBlock16::ptrToIndex() { } } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031DFB4-8031E098 3188F4 00E4+00 1/0 0/0 0/0 .text ptrToIndex__18J3DTevBlockPatchedFv */ void J3DTevBlockPatched::ptrToIndex() { GDSetCurrOffset(mTexNoOffset); - u8* pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); u32 offs = 0; for (u32 i = 0; i < 8; i++) { @@ -1464,17 +1465,17 @@ void J3DTevBlockPatched::ptrToIndex() { } } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031E098-8031E12C 3189D8 0094+00 5/5 1/1 0/0 .text indexToPtr_private__11J3DTevBlockFUl */ void J3DTevBlock::indexToPtr_private(u32 offs) { GDSetCurrOffset(offs); - u8* pStart = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); for (u32 i = 0; ; i++) { - u8* pDL = GDGetCurrPointer(); + void* pDL = GDGetCurrPointer(); if (!isTexNoReg(pDL)) { break; } @@ -1483,8 +1484,8 @@ void J3DTevBlock::indexToPtr_private(u32 offs) { loadTexNo(i, texNoReg); } - u8 *pEnd = GDGetCurrPointer(); - DCStoreRange(pStart, pEnd - pStart); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031E12C-8031E328 318A6C 01FC+00 1/0 0/0 0/0 .text load__15J3DIndBlockFullFv */ @@ -1570,7 +1571,7 @@ void J3DPEBlockTexEdge::load() { void J3DPEBlockXlu::load() { GDOverflowCheck(0x1e); J3DGDSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_AND,GX_ALWAYS, 0); - J3DGDSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_COPY); + J3DGDSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_COPY); J3DGDSetZMode(1, GX_LEQUAL, 0); J3DGDSetZCompLoc(1); } @@ -1611,10 +1612,10 @@ void J3DPEBlockFull::load() { void J3DPEBlockFull::patch() { GDSetCurrOffset(mFogOffset); GDOverflowCheck(0x37); - u8* start = GDGetCurrPointer(); + void* start = GDGetCurrPointer(); mFog.load(); - u8* end = GDGetCurrPointer(); - DCStoreRange(start, end - start); + void* end = GDGetCurrPointer(); + DCStoreRange(start, (u32)end - (u32)start); } /* 8031F940-8031F9B8 31A280 0078+00 1/0 0/0 0/0 .text diffFog__14J3DPEBlockFullFv */ diff --git a/src/JSystem/J3DGraphBase/J3DPacket.cpp b/src/JSystem/J3DGraphBase/J3DPacket.cpp index c43cce816c..424dbda40a 100644 --- a/src/JSystem/J3DGraphBase/J3DPacket.cpp +++ b/src/JSystem/J3DGraphBase/J3DPacket.cpp @@ -3,9 +3,10 @@ #include "JSystem/J3DGraphBase/J3DDrawBuffer.h" #include "JSystem/J3DGraphBase/J3DMaterial.h" #include "JSystem/JKernel/JKRHeap.h" -#include "dolphin/os/OSCache.h" -#include "dolphin/os/OSInterrupt.h" +#include <dolphin/os.h> +#include <dolphin/os.h> #include "string.h" +#include "global.h" J3DError J3DDisplayListObj::newDisplayList(u32 capacity) { mCapacity = ALIGN_NEXT(capacity, 0x20); @@ -400,4 +401,4 @@ void J3DPacket::draw() {} int J3DMatPacket::entry(J3DDrawBuffer* i_buffer) { sortFunc func = J3DDrawBuffer::sortFuncTable[i_buffer->mSortType]; return (i_buffer->*func)(this); -}
\ No newline at end of file +} diff --git a/src/JSystem/J3DGraphBase/J3DShape.cpp b/src/JSystem/J3DGraphBase/J3DShape.cpp index 17dab88daf..c3351a6824 100644 --- a/src/JSystem/J3DGraphBase/J3DShape.cpp +++ b/src/JSystem/J3DGraphBase/J3DShape.cpp @@ -119,7 +119,7 @@ u32 J3DShape::countBumpMtxNum() const { /* 80314E98-80314EB0 30F7D8 0018+00 1/1 0/0 0/0 .text J3DLoadCPCmd__FUcUl */ void J3DLoadCPCmd(u8 cmd, u32 param) { - GXWGFifo.u8 = GX_CMD_LOAD_CP_REG; + GXWGFifo.u8 = GX_LOAD_CP_REG; GXWGFifo.u8 = cmd; GXWGFifo.u32 = param; } @@ -160,31 +160,31 @@ void J3DShape::makeVtxArrayCmd() { array[i] = 0; } - for (; vtxAttr->mAttrib != GX_VA_NULL; vtxAttr++) { - switch (vtxAttr->mAttrib) { + for (; vtxAttr->attr != GX_VA_NULL; vtxAttr++) { + switch (vtxAttr->attr) { case GX_VA_POS: { - if (vtxAttr->mCompType == GX_F32) - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x0C; + if (vtxAttr->type == GX_F32) + stride[vtxAttr->attr - GX_VA_POS] = 0x0C; else - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x06; - array[vtxAttr->mAttrib - GX_VA_POS] = mVertexData->getVtxPosArray(); - mVertexData->setVtxPosFrac(vtxAttr->mCompShift); - mVertexData->setVtxPosType((GXCompType)vtxAttr->mCompType); + stride[vtxAttr->attr - GX_VA_POS] = 0x06; + array[vtxAttr->attr - GX_VA_POS] = mVertexData->getVtxPosArray(); + mVertexData->setVtxPosFrac(vtxAttr->frac); + mVertexData->setVtxPosType((GXCompType)vtxAttr->type); } break; case GX_VA_NRM: { - if (vtxAttr->mCompType == GX_F32) - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x0C; + if (vtxAttr->type == GX_F32) + stride[vtxAttr->attr - GX_VA_POS] = 0x0C; else - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x06; - array[vtxAttr->mAttrib - GX_VA_POS] = mVertexData->getVtxNrmArray(); - mVertexData->setVtxNrmFrac(vtxAttr->mCompShift); - mVertexData->setVtxNrmType((GXCompType)vtxAttr->mCompType); + stride[vtxAttr->attr - GX_VA_POS] = 0x06; + array[vtxAttr->attr - GX_VA_POS] = mVertexData->getVtxNrmArray(); + mVertexData->setVtxNrmFrac(vtxAttr->frac); + mVertexData->setVtxNrmType((GXCompType)vtxAttr->type); } break; case GX_VA_CLR0: case GX_VA_CLR1: { - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x04; - array[vtxAttr->mAttrib - GX_VA_POS] = - mVertexData->getVtxColorArray(vtxAttr->mAttrib - GX_VA_CLR0); + stride[vtxAttr->attr - GX_VA_POS] = 0x04; + array[vtxAttr->attr - GX_VA_POS] = + mVertexData->getVtxColorArray(vtxAttr->attr - GX_VA_CLR0); } break; case GX_VA_TEX0: case GX_VA_TEX1: @@ -194,12 +194,12 @@ void J3DShape::makeVtxArrayCmd() { case GX_VA_TEX5: case GX_VA_TEX6: case GX_VA_TEX7: { - if (vtxAttr->mCompType == GX_F32) - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x08; + if (vtxAttr->type == GX_F32) + stride[vtxAttr->attr - GX_VA_POS] = 0x08; else - stride[vtxAttr->mAttrib - GX_VA_POS] = 0x04; - array[vtxAttr->mAttrib - GX_VA_POS] = - mVertexData->getVtxTexCoordArray(vtxAttr->mAttrib - GX_VA_TEX0); + stride[vtxAttr->attr - GX_VA_POS] = 0x04; + array[vtxAttr->attr - GX_VA_POS] = + mVertexData->getVtxTexCoordArray(vtxAttr->attr - GX_VA_TEX0); } break; default: break; @@ -351,4 +351,4 @@ void J3DShape::simpleDrawCache() const { for (u16 n = getMtxGroupNum(), i = 0; i < n; i++) if (getShapeDraw(i) != NULL) getShapeDraw(i)->draw(); -}
\ No newline at end of file +} diff --git a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp index 6fe5766970..fae878e601 100644 --- a/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp +++ b/src/JSystem/J3DGraphBase/J3DShapeDraw.cpp @@ -7,7 +7,7 @@ #include "JSystem/JKernel/JKRHeap.h" #include "string.h" #include "dolphin/gx.h" -#include "dolphin/os/OSCache.h" +#include <dolphin/os.h> #include "global.h" // diff --git a/src/JSystem/J3DGraphBase/J3DShapeMtx.cpp b/src/JSystem/J3DGraphBase/J3DShapeMtx.cpp index ad453ab3d5..65caadad4b 100644 --- a/src/JSystem/J3DGraphBase/J3DShapeMtx.cpp +++ b/src/JSystem/J3DGraphBase/J3DShapeMtx.cpp @@ -31,9 +31,9 @@ void J3DShapeMtx::resetMtxLoadCache() { /* 803130E4-80313128 30DA24 0044+00 1/0 0/0 0/0 .text loadMtxIndx_PNGP__11J3DShapeMtxCFiUs */ void J3DShapeMtx::loadMtxIndx_PNGP(int slot, u16 indx) const { // inlined J3DFifoLoadPosMtxIndx - J3DFifoLoadIndx(GX_CMD_LOAD_INDX_A, indx, 0xB000 | ((u16)(slot * 0x0C))); + J3DFifoLoadIndx(GX_LOAD_INDX_A, indx, 0xB000 | ((u16)(slot * 0x0C))); // inlined J3DFifoLoadNrmMtxIndx3x3 - J3DFifoLoadIndx(GX_CMD_LOAD_INDX_B, indx, 0x8000 | ((u16)((slot * 0x09) + 0x400))); + J3DFifoLoadIndx(GX_LOAD_INDX_B, indx, 0x8000 | ((u16)((slot * 0x09) + 0x400))); } /* 80313128-80313188 30DA68 0060+00 1/0 0/0 0/0 .text loadMtxIndx_PCPU__11J3DShapeMtxCFiUs */ diff --git a/src/JSystem/J3DGraphBase/J3DStruct.cpp b/src/JSystem/J3DGraphBase/J3DStruct.cpp index 8ee47fc799..2e488b989a 100644 --- a/src/JSystem/J3DGraphBase/J3DStruct.cpp +++ b/src/JSystem/J3DGraphBase/J3DStruct.cpp @@ -61,7 +61,7 @@ J3DFogInfo& J3DFogInfo::operator=(J3DFogInfo const& param_0) { mFarZ = param_0.mFarZ; mColor = param_0.mColor; for (int i = 0; i < 10; i++) { - mFogAdjTable.fogVals[i] = param_0.mFogAdjTable.fogVals[i]; + mFogAdjTable.r[i] = param_0.mFogAdjTable.r[i]; } return *this; } @@ -72,4 +72,4 @@ J3DNBTScaleInfo& J3DNBTScaleInfo::operator=(J3DNBTScaleInfo const& param_0) { mbHasScale = param_0.mbHasScale; mScale = param_0.mScale; return *this; -}
\ No newline at end of file +} diff --git a/src/JSystem/J3DGraphBase/J3DSys.cpp b/src/JSystem/J3DGraphBase/J3DSys.cpp index 8f48ba181b..ff92ce2e8b 100644 --- a/src/JSystem/J3DGraphBase/J3DSys.cpp +++ b/src/JSystem/J3DGraphBase/J3DSys.cpp @@ -6,7 +6,7 @@ #include "JSystem/J3DGraphBase/J3DSys.h" #include "dol2asm.h" -#include "dolphin/gx/GXPixel.h" +#include <dolphin/gx.h> #include "dolphin/os.h" #include "dolphin/types.h" #include "global.h" @@ -84,12 +84,12 @@ J3DSys::J3DSys() { /* 8030FEC0-8030FEE4 30A800 0024+00 0/0 1/1 0/0 .text loadPosMtxIndx__6J3DSysCFiUs */ void J3DSys::loadPosMtxIndx(int addr, u16 indx) const { - J3DFifoLoadIndx(GX_CMD_LOAD_INDX_A, indx, 0xB000 | ((u16)(addr * 0x0C))); + J3DFifoLoadIndx(GX_LOAD_INDX_A, indx, 0xB000 | ((u16)(addr * 0x0C))); } /* 8030FEE4-8030FF0C 30A824 0028+00 0/0 1/1 0/0 .text loadNrmMtxIndx__6J3DSysCFiUs */ void J3DSys::loadNrmMtxIndx(int addr, u16 indx) const { - J3DFifoLoadIndx(GX_CMD_LOAD_INDX_B, indx, 0x8000 | ((u16)((addr * 0x09) + 0x400))); + J3DFifoLoadIndx(GX_LOAD_INDX_B, indx, 0x8000 | ((u16)((addr * 0x09) + 0x400))); } /* 8030FF0C-803100BC 30A84C 01B0+00 1/1 0/0 0/0 .text setTexCacheRegion__6J3DSysF15_GXTexCacheSize @@ -149,7 +149,7 @@ void J3DSys::drawInit() { GXSetClipMode(GX_CLIP_ENABLE); GXSetColorUpdate(GX_TRUE); GXSetDither(GX_TRUE); - GXSetBlendMode(GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_NOOP); + GXSetBlendMode(GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP); GXSetAlphaCompare(GX_ALWAYS, 0, GX_AOP_AND, GX_ALWAYS, 0); GXSetZMode(GX_TRUE, GX_LEQUAL, GX_TRUE); GXSetZCompLoc(GX_TRUE); @@ -196,7 +196,7 @@ void J3DSys::drawInit() { u8 i; for (i = 0; i < 3; i++) - GXSetIndTexMtx((GXIndTexMtxID)(GX_ITM_0 + i), (f32*)indTexMtx, 1); + GXSetIndTexMtx((GXIndTexMtxID)(GX_ITM_0 + i), indTexMtx, 1); GXSetChanMatColor(GX_COLOR0A0, j3dDefaultColInfo); GXSetChanMatColor(GX_COLOR1A1, j3dDefaultColInfo); @@ -378,14 +378,14 @@ void J3DSys::reinitIndStages() { GXSetIndTexCoordScale(GX_INDTEXSTAGE1, GX_ITS_1, GX_ITS_1); GXSetIndTexCoordScale(GX_INDTEXSTAGE2, GX_ITS_1, GX_ITS_1); GXSetIndTexCoordScale(GX_INDTEXSTAGE3, GX_ITS_1, GX_ITS_1); - GXSetIndTexMtx(GX_ITM_0, (f32*)IndMtx, 1); - GXSetIndTexMtx(GX_ITM_1, (f32*)IndMtx, 1); - GXSetIndTexMtx(GX_ITM_2, (f32*)IndMtx, 1); + GXSetIndTexMtx(GX_ITM_0, IndMtx, 1); + GXSetIndTexMtx(GX_ITM_1, IndMtx, 1); + GXSetIndTexMtx(GX_ITM_2, IndMtx, 1); } /* 80310E3C-80310ED0 30B77C 0094+00 1/1 0/0 0/0 .text reinitPixelProc__6J3DSysFv */ void J3DSys::reinitPixelProc() { - GXSetBlendMode(GX_BM_NONE, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_CLEAR); + GXSetBlendMode(GX_BM_NONE, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_CLEAR); GXSetColorUpdate(GX_TRUE); GXSetAlphaUpdate(GX_FALSE); GXSetDither(GX_TRUE); diff --git a/src/JSystem/J3DGraphBase/J3DTevs.cpp b/src/JSystem/J3DGraphBase/J3DTevs.cpp index 36c740f6a3..da4bdc4b44 100644 --- a/src/JSystem/J3DGraphBase/J3DTevs.cpp +++ b/src/JSystem/J3DGraphBase/J3DTevs.cpp @@ -7,6 +7,7 @@ #include "JSystem/J3DGraphBase/J3DMatBlock.h" #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/J3DGraphBase/J3DTransform.h" +#include "global.h" static void J3DGDLoadTexMtxImm(f32 (*)[4], u32, _GXTexMtxType); static void J3DGDLoadPostTexMtxImm(f32 (*)[4], u32); @@ -548,7 +549,7 @@ extern J3DTevSwapModeInfo const j3dDefaultTevSwapMode = { extern const J3DTevSwapModeTableInfo j3dDefaultTevSwapModeTable = {0x00, 0x01, 0x02, 0x03}; /* 804563EC-804563F0 0049EC 0004+00 0/0 3/3 0/0 .sdata2 j3dDefaultBlendInfo */ -extern const J3DBlendInfo j3dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRC_ALPHA, GX_BL_INV_SRC_ALPHA, GX_LO_NOOP}; +extern const J3DBlendInfo j3dDefaultBlendInfo = {GX_BM_BLEND, GX_BL_SRCALPHA, GX_BL_INVSRCALPHA, GX_LO_NOOP}; /* 804563F0-804563F8 0049F0 0008+00 0/0 3/3 0/0 .sdata2 j3dDefaultColorChanInfo */ extern const J3DColorChanInfo j3dDefaultColorChanInfo = { diff --git a/src/JSystem/J3DGraphBase/J3DVertex.cpp b/src/JSystem/J3DGraphBase/J3DVertex.cpp index 96f42dedb9..dfdfc48e73 100644 --- a/src/JSystem/J3DGraphBase/J3DVertex.cpp +++ b/src/JSystem/J3DGraphBase/J3DVertex.cpp @@ -8,7 +8,8 @@ #include "JSystem/J3DGraphBase/J3DSys.h" #include "JSystem/JKernel/JKRHeap.h" #include "string.h" -#include "dolphin/os/OSCache.h" +#include <dolphin/os.h> +#include "global.h" /* 80310EF8-80310F78 30B838 0080+00 0/0 1/1 0/0 .text __ct__13J3DVertexDataFv */ J3DVertexData::J3DVertexData() { @@ -241,4 +242,4 @@ J3DDrawMtxData::J3DDrawMtxData() { } /* 803115F4-80311630 30BF34 003C+00 0/0 2/2 0/0 .text __dt__14J3DDrawMtxDataFv */ -J3DDrawMtxData::~J3DDrawMtxData() {}
\ No newline at end of file +J3DDrawMtxData::~J3DDrawMtxData() {} |
