mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-06-22 15:02:54 -04:00
J2DPane (#168)
* most of J2DPane * finish j2dpane * cleanup * use J2DBlendInfo
This commit is contained in:
@@ -116,36 +116,36 @@ void J2DGrafContext::setColor(JUtility::TColor colorTL, JUtility::TColor colorTR
|
||||
mColorTR = colorTR;
|
||||
mColorBR = colorBR;
|
||||
mColorBL = colorBL;
|
||||
field_0xb0 = GX_BM_BLEND;
|
||||
field_0xb1 = GX_BL_SRC_ALPHA;
|
||||
field_0xb2 = GX_BL_INV_SRC_ALPHA;
|
||||
mLineBlendMode = GX_BM_BLEND;
|
||||
mLineSrcBlendFactor = GX_BL_SRC_ALPHA;
|
||||
mLineDstBlendFactor = GX_BL_INV_SRC_ALPHA;
|
||||
mBoxBlendMode = GX_BM_BLEND;
|
||||
mBoxSrcBlendFactor = GX_BL_SRC_ALPHA;
|
||||
mBoxDstBlendFactor = GX_BL_INV_SRC_ALPHA;
|
||||
field_0xb0.mType = GX_BM_BLEND;
|
||||
field_0xb0.mSrcFactor = GX_BL_SRC_ALPHA;
|
||||
field_0xb0.mDstFactor = GX_BL_INV_SRC_ALPHA;
|
||||
mLinePart.mType = GX_BM_BLEND;
|
||||
mLinePart.mSrcFactor = GX_BL_SRC_ALPHA;
|
||||
mLinePart.mDstFactor = GX_BL_INV_SRC_ALPHA;
|
||||
mBoxPart.mType = GX_BM_BLEND;
|
||||
mBoxPart.mSrcFactor = GX_BL_SRC_ALPHA;
|
||||
mBoxPart.mDstFactor = GX_BL_INV_SRC_ALPHA;
|
||||
if ((mColorTL & 0xFF) != 0xFF) {
|
||||
return;
|
||||
}
|
||||
field_0xb0 = GX_BM_NONE;
|
||||
field_0xb1 = GX_BL_ONE;
|
||||
field_0xb2 = GX_BL_ZERO;
|
||||
field_0xb0.mType = GX_BM_NONE;
|
||||
field_0xb0.mSrcFactor = GX_BL_ONE;
|
||||
field_0xb0.mDstFactor = GX_BL_ZERO;
|
||||
if ((mColorBR & 0xFF) != 0xFF) {
|
||||
return;
|
||||
}
|
||||
mLineBlendMode = GX_BM_NONE;
|
||||
mLineSrcBlendFactor = GX_BL_ONE;
|
||||
mLineDstBlendFactor = GX_BL_ZERO;
|
||||
mLinePart.mType = GX_BM_NONE;
|
||||
mLinePart.mSrcFactor = GX_BL_ONE;
|
||||
mLinePart.mDstFactor = GX_BL_ZERO;
|
||||
if ((mColorTR & 0xFF) != 0xFF) {
|
||||
return;
|
||||
}
|
||||
if ((mColorBL & 0xFF) != 0xFF) {
|
||||
return;
|
||||
}
|
||||
mBoxBlendMode = GX_BM_NONE;
|
||||
mBoxSrcBlendFactor = GX_BL_ONE;
|
||||
mBoxDstBlendFactor = GX_BL_ZERO;
|
||||
mBoxPart.mType = GX_BM_NONE;
|
||||
mBoxPart.mSrcFactor = GX_BL_ONE;
|
||||
mBoxPart.mDstFactor = GX_BL_ZERO;
|
||||
}
|
||||
|
||||
/* 802E9234-802E9260 2E3B74 002C+00 1/1 2/2 0/0 .text setLineWidth__14J2DGrafContextFUc
|
||||
@@ -158,8 +158,8 @@ void J2DGrafContext::setLineWidth(u8 lineWidth) {
|
||||
/* 802E9260-802E9368 2E3BA0 0108+00 0/0 2/2 0/0 .text
|
||||
* fillBox__14J2DGrafContextFRCQ29JGeometry8TBox2<f> */
|
||||
void J2DGrafContext::fillBox(JGeometry::TBox2<f32> const& box) {
|
||||
GXSetBlendMode((GXBlendMode)mBoxBlendMode, (GXBlendFactor)mBoxSrcBlendFactor,
|
||||
(GXBlendFactor)mBoxDstBlendFactor, GX_LO_SET);
|
||||
GXSetBlendMode((GXBlendMode)mBoxPart.mType, (GXBlendFactor)mBoxPart.mSrcFactor,
|
||||
(GXBlendFactor)mBoxPart.mDstFactor, GX_LO_SET);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXBegin(GX_QUADS, GX_VTXFMT0, 4);
|
||||
@@ -178,8 +178,8 @@ void J2DGrafContext::fillBox(JGeometry::TBox2<f32> const& box) {
|
||||
/* 802E9368-802E9488 2E3CA8 0120+00 0/0 1/1 0/0 .text
|
||||
* drawFrame__14J2DGrafContextFRCQ29JGeometry8TBox2<f> */
|
||||
void J2DGrafContext::drawFrame(JGeometry::TBox2<f32> const& box) {
|
||||
GXSetBlendMode((GXBlendMode)mBoxBlendMode, (GXBlendFactor)mBoxSrcBlendFactor,
|
||||
(GXBlendFactor)mBoxDstBlendFactor, GX_LO_SET);
|
||||
GXSetBlendMode((GXBlendMode)mBoxPart.mType, (GXBlendFactor)mBoxPart.mSrcFactor,
|
||||
(GXBlendFactor)mBoxPart.mDstFactor, GX_LO_SET);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXBegin(GX_LINESTRIP, GX_VTXFMT0, 5);
|
||||
@@ -200,8 +200,8 @@ void J2DGrafContext::drawFrame(JGeometry::TBox2<f32> const& box) {
|
||||
/* 802E9488-802E9564 2E3DC8 00DC+00 1/1 0/0 0/0 .text
|
||||
* line__14J2DGrafContextFQ29JGeometry8TVec2<f>Q29JGeometry8TVec2<f> */
|
||||
void J2DGrafContext::line(JGeometry::TVec2<f32> start, JGeometry::TVec2<f32> end) {
|
||||
GXSetBlendMode((GXBlendMode)mLineBlendMode, (GXBlendFactor)mLineSrcBlendFactor,
|
||||
(GXBlendFactor)mLineDstBlendFactor, GX_LO_SET);
|
||||
GXSetBlendMode((GXBlendMode)mLinePart.mType, (GXBlendFactor)mLinePart.mSrcFactor,
|
||||
(GXBlendFactor)mLinePart.mDstFactor, GX_LO_SET);
|
||||
GXLoadPosMtxImm(mPosMtx, 0);
|
||||
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_CLR_RGBA, GX_F32, 0);
|
||||
GXBegin(GX_LINES, GX_VTXFMT0, 2);
|
||||
|
||||
@@ -33,7 +33,7 @@ extern "C" void strcmp();
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J2DDataManage::get(char const* param_0) {
|
||||
asm void* J2DDataManage::get(char const* param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DManage/get__13J2DDataManageFPCc.s"
|
||||
}
|
||||
@@ -43,7 +43,7 @@ asm void J2DDataManage::get(char const* param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J2DDataManage::get(JSUInputStream* param_0) {
|
||||
asm void* J2DDataManage::get(JSUInputStream* param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DManage/get__13J2DDataManageFP14JSUInputStream.s"
|
||||
}
|
||||
|
||||
+474
-486
File diff suppressed because it is too large
Load Diff
@@ -4,6 +4,7 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JUtility/JUTResource.h"
|
||||
#include "JSystem/JKernel/JKRFileLoader.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
@@ -11,25 +12,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JSUInputStream {
|
||||
/* 802DC298 */ void read(void*, s32);
|
||||
};
|
||||
|
||||
struct JKRArchive {
|
||||
/* 802D5B38 */ void getGlbResource(u32, char const*, JKRArchive*);
|
||||
};
|
||||
|
||||
struct JUTResReference {
|
||||
/* 802DE078 */ void getResource(JSUInputStream*, u32, JKRArchive*);
|
||||
/* 802DE120 */ void getResource(void const*, u32, JKRArchive*);
|
||||
/* 802DE1BC */ void getResource(u32, JKRArchive*);
|
||||
};
|
||||
|
||||
struct JKRFileLoader {
|
||||
/* 802D4270 */ void getGlbResource(char const*, JKRFileLoader*);
|
||||
/* 802D4224 */ void getGlbResource(char const*);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -61,7 +43,7 @@ extern "C" void _restgpr_29();
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTResReference::getResource(JSUInputStream* param_0, u32 param_1, JKRArchive* param_2) {
|
||||
asm void* JUTResReference::getResource(JSUInputStream* param_0, u32 param_1, JKRArchive* param_2) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTResource/getResource__15JUTResReferenceFP14JSUInputStreamUlP10JKRArchive.s"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user