mirror of
https://github.com/encounter/tp.git
synced 2026-07-11 06:18:46 -07:00
m_Do cleanup, d_resource, drawlist stuff (#145)
* d_resource / some d_stage * setup dDlst_list_c / d_select_icon OK * JUTXfb / some JUTVideo + various * some J2D classes / JUTVideo/Fader attempts * bunch of m_Do cleanup + matches / f_ap_game OK * mDoLib_clipper::setup OK * most of d_meter_HIO OK * pane_class / kantera_icon_meter
This commit is contained in:
@@ -34,7 +34,6 @@ extern "C" void setLookat__14J2DGrafContextFv();
|
||||
//
|
||||
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void PSMTXIdentity();
|
||||
extern "C" void GXSetVtxDesc();
|
||||
extern "C" void GXClearVtxDesc();
|
||||
extern "C" void GXSetVtxAttrFmt();
|
||||
@@ -57,7 +56,7 @@ extern "C" void GXSetZCompLoc();
|
||||
extern "C" void GXLoadPosMtxImm();
|
||||
extern "C" void GXSetCurrentMtx();
|
||||
extern "C" void GXLoadTexMtxImm();
|
||||
extern "C" void GXSetViewport();
|
||||
extern "C" void GXSetViewport(f32, f32, f32, f32, f32, f32);
|
||||
extern "C" void GXSetScissor();
|
||||
extern "C" void __cvt_fp2unsigned();
|
||||
extern "C" void _savegpr_29();
|
||||
@@ -84,6 +83,17 @@ SECTION_DATA extern void* __vt__14J2DGrafContext[10] = {
|
||||
};
|
||||
|
||||
/* 802E8B08-802E8BB4 2E3448 00AC+00 0/0 2/2 0/0 .text __ct__14J2DGrafContextFffff */
|
||||
// reversed stack
|
||||
#ifdef NONMATCHING
|
||||
J2DGrafContext::J2DGrafContext(f32 left, f32 top, f32 right, f32 bottom)
|
||||
: mBounds(left, top, left + right, top + bottom),
|
||||
mScissorBounds(left, top, left + right, top + bottom), field_0x24(-1), field_0x28(-1),
|
||||
field_0x2c(-1), field_0x30(-1) {
|
||||
JUtility::TColor color(-1);
|
||||
setColor(color, color, color, color);
|
||||
setLineWidth(6);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -92,6 +102,7 @@ asm J2DGrafContext::J2DGrafContext(f32 param_0, f32 param_1, f32 param_2, f32 pa
|
||||
#include "asm/JSystem/J2DGraph/J2DGrafContext/__ct__14J2DGrafContextFffff.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80456148-8045614C 004748 0004+00 5/5 0/0 0/0 .sdata2 @627 */
|
||||
@@ -106,6 +117,26 @@ SECTION_SDATA2 static u8 lit_627[4] = {
|
||||
SECTION_SDATA2 static f32 lit_628 = 1.0f;
|
||||
|
||||
/* 802E8BB4-802E8C44 2E34F4 0090+00 1/0 1/1 0/0 .text setPort__14J2DGrafContextFv */
|
||||
// matches with literal
|
||||
#ifdef NONMATCHING
|
||||
void J2DGrafContext::setPort() {
|
||||
setScissor();
|
||||
setup2D();
|
||||
|
||||
f32 x_origin = mBounds.i.x;
|
||||
f32 y_origin = mBounds.i.y;
|
||||
f32 width = mBounds.f.x;
|
||||
f32 height = mBounds.f.y;
|
||||
|
||||
if (x_origin < 0.0f) {
|
||||
x_origin = 0.0f;
|
||||
}
|
||||
if (y_origin < 0.0f) {
|
||||
y_origin = 0.0f;
|
||||
}
|
||||
GXSetViewport(x_origin, y_origin, width - x_origin, height - y_origin, 0.0f, 1.0f);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -114,6 +145,7 @@ asm void J2DGrafContext::setPort() {
|
||||
#include "asm/JSystem/J2DGraph/J2DGrafContext/setPort__14J2DGrafContextFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E8C44-802E8E20 2E3584 01DC+00 1/0 1/0 0/0 .text setup2D__14J2DGrafContextFv */
|
||||
#pragma push
|
||||
|
||||
@@ -7,52 +7,6 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JGeometry {
|
||||
template <typename A1>
|
||||
struct TBox2 {};
|
||||
/* TBox2<f32> */
|
||||
struct TBox2__template0 {};
|
||||
|
||||
template <typename A1>
|
||||
struct TVec2 {};
|
||||
/* TVec2<f32> */
|
||||
struct TVec2__template1 {};
|
||||
};
|
||||
|
||||
struct J2DOrthoGraph {
|
||||
/* 8000B118 */ ~J2DOrthoGraph();
|
||||
/* 802E9670 */ J2DOrthoGraph();
|
||||
/* 802E96D0 */ J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
|
||||
/* 802E97B4 */ void setPort();
|
||||
/* 802E980C */ void setOrtho(JGeometry::TBox2<f32> const&, f32, f32);
|
||||
/* 802E9840 */ void setLookat();
|
||||
/* 802E987C */ void scissorBounds(JGeometry::TBox2<f32>*, JGeometry::TBox2<f32> const*);
|
||||
/* 802E9C88 */ bool getGrafType() const;
|
||||
};
|
||||
|
||||
struct J2DGrafContext {
|
||||
/* 802E8B08 */ J2DGrafContext(f32, f32, f32, f32);
|
||||
/* 802E8BB4 */ void setPort();
|
||||
/* 802E8C44 */ void setup2D();
|
||||
/* 802E8E20 */ void setScissor();
|
||||
/* 802E90E4 */ void place(JGeometry::TBox2<f32> const&);
|
||||
/* 802E961C */ void place(f32, f32, f32, f32);
|
||||
/* 802E9118 */ void setColor(JUtility::TColor, JUtility::TColor, JUtility::TColor,
|
||||
JUtility::TColor);
|
||||
/* 802E9234 */ void setLineWidth(u8);
|
||||
/* 802E9260 */ void fillBox(JGeometry::TBox2<f32> const&);
|
||||
/* 802E9368 */ void drawFrame(JGeometry::TBox2<f32> const&);
|
||||
/* 802E9564 */ void lineTo(JGeometry::TVec2<f32>);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -87,7 +41,6 @@ extern "C" void func_802E9260();
|
||||
extern "C" void func_802E9368();
|
||||
extern "C" void func_802E9564();
|
||||
extern "C" void place__14J2DGrafContextFffff();
|
||||
extern "C" void PSMTXIdentity();
|
||||
extern "C" void C_MTXOrtho();
|
||||
extern "C" void GXSetProjection();
|
||||
extern "C" void GXLoadPosMtxImm();
|
||||
|
||||
@@ -515,14 +515,14 @@ asm void J2DPane::clip(JGeometry::TBox2<f32> const& param_0) {
|
||||
#pragma pop
|
||||
|
||||
/* 802F72E0-802F7388 2F1C20 00A8+00 1/0 7/1 0/0 .text search__7J2DPaneFUx */
|
||||
const J2DPane* J2DPane::search(u64 tag) {
|
||||
J2DPane* J2DPane::search(u64 tag) {
|
||||
if (tag == mInfoTag) {
|
||||
return this;
|
||||
}
|
||||
|
||||
JSUTreeIterator<J2DPane> iter;
|
||||
for (iter = mPaneTree.getFirstChild(); iter != mPaneTree.getEndChild(); ++iter) {
|
||||
if (const J2DPane* result = iter.getObject()->search(tag)) {
|
||||
if (J2DPane* result = iter.getObject()->search(tag)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -530,14 +530,14 @@ const J2DPane* J2DPane::search(u64 tag) {
|
||||
}
|
||||
|
||||
/* 802F7388-802F7430 2F1CC8 00A8+00 1/0 7/1 0/0 .text searchUserInfo__7J2DPaneFUx */
|
||||
const J2DPane* J2DPane::searchUserInfo(u64 tag) {
|
||||
J2DPane* J2DPane::searchUserInfo(u64 tag) {
|
||||
if (tag == mUserInfoTag) {
|
||||
return this;
|
||||
}
|
||||
|
||||
JSUTreeIterator<J2DPane> iter;
|
||||
for (iter = mPaneTree.getFirstChild(); iter != mPaneTree.getEndChild(); ++iter) {
|
||||
if (const J2DPane* result = iter.getObject()->searchUserInfo(tag)) {
|
||||
if (J2DPane* result = iter.getObject()->searchUserInfo(tag)) {
|
||||
return result;
|
||||
}
|
||||
}
|
||||
@@ -653,7 +653,7 @@ const J2DPane* J2DPane::getFirstChildPane() {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm const J2DPane* J2DPane::getFirstChildPane() {
|
||||
asm J2DPane* J2DPane::getFirstChildPane() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DPane/getFirstChildPane__7J2DPaneFv.s"
|
||||
}
|
||||
@@ -661,7 +661,7 @@ asm const J2DPane* J2DPane::getFirstChildPane() {
|
||||
#endif
|
||||
|
||||
/* 802F7AC4-802F7AFC 2F2404 0038+00 1/1 8/8 0/0 .text getNextChildPane__7J2DPaneFv */
|
||||
const J2DPane* J2DPane::getNextChildPane() {
|
||||
J2DPane* J2DPane::getNextChildPane() {
|
||||
if (getPaneTree()->getNextChild() == NULL)
|
||||
return NULL;
|
||||
|
||||
@@ -669,7 +669,7 @@ const J2DPane* J2DPane::getNextChildPane() {
|
||||
}
|
||||
|
||||
/* 802F7AFC-802F7B18 2F243C 001C+00 6/6 11/11 0/0 .text getParentPane__7J2DPaneFv */
|
||||
const J2DPane* J2DPane::getParentPane() {
|
||||
J2DPane* J2DPane::getParentPane() {
|
||||
if (getPaneTree()->getParent() == NULL)
|
||||
return NULL;
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@ asm void J2DScreen::draw(f32 param_0, f32 param_1, J2DGrafContext const* param_2
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm const J2DPane* J2DScreen::search(u64 param_0) {
|
||||
asm J2DPane* J2DScreen::search(u64 param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DScreen/search__9J2DScreenFUx.s"
|
||||
}
|
||||
@@ -417,7 +417,7 @@ asm const J2DPane* J2DScreen::search(u64 param_0) {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm const J2DPane* J2DScreen::searchUserInfo(u64 param_0) {
|
||||
asm J2DPane* J2DScreen::searchUserInfo(u64 param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DScreen/searchUserInfo__9J2DScreenFUx.s"
|
||||
}
|
||||
|
||||
@@ -7,150 +7,6 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct _GXTlut {};
|
||||
|
||||
struct _GXTexMapID {};
|
||||
|
||||
struct _GXCullMode {};
|
||||
|
||||
struct ResTLUT {};
|
||||
|
||||
struct ResTIMG {};
|
||||
|
||||
struct ResFONT {};
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTTexture {
|
||||
/* 802DE234 */ ~JUTTexture();
|
||||
/* 802DE2A8 */ void storeTIMG(ResTIMG const*, u8);
|
||||
/* 802DE840 */ void load(_GXTexMapID);
|
||||
};
|
||||
|
||||
struct JUTPalette {
|
||||
/* 802DE890 */ void storeTLUT(_GXTlut, ResTLUT*);
|
||||
};
|
||||
|
||||
struct JSUStreamSeekFrom {};
|
||||
|
||||
struct JSURandomInputStream {
|
||||
/* 802DC458 */ void peek(void*, s32);
|
||||
/* 802DC4DC */ void seek(s32, JSUStreamSeekFrom);
|
||||
};
|
||||
|
||||
struct JSUInputStream {
|
||||
/* 802DC298 */ void read(void*, s32);
|
||||
};
|
||||
|
||||
struct JKRArchive {};
|
||||
|
||||
struct JGeometry {
|
||||
template <typename A1>
|
||||
struct TBox2 {};
|
||||
/* TBox2<f32> */
|
||||
struct TBox2__template0 {};
|
||||
};
|
||||
|
||||
struct J2DAnmTexPattern {};
|
||||
|
||||
struct J2DAnmVisibilityFull {};
|
||||
|
||||
struct J2DAnmBase {};
|
||||
|
||||
struct J2DAnmColor {};
|
||||
|
||||
struct J2DAnmTevRegKey {};
|
||||
|
||||
struct J2DAnmTextureSRTKey {};
|
||||
|
||||
struct J2DAnmTransform {};
|
||||
|
||||
struct J2DAnmVtxColor {};
|
||||
|
||||
struct J2DPane {
|
||||
/* 80053BC0 */ void calcMtx();
|
||||
/* 80053C00 */ void makeMatrix(f32, f32);
|
||||
/* 802F7540 */ void makeMatrix(f32, f32, f32, f32);
|
||||
/* 80256018 */ void setAnimation(J2DAnmVtxColor*);
|
||||
/* 8025601C */ void setAnimation(J2DAnmVisibilityFull*);
|
||||
/* 80256020 */ void setAnimation(J2DAnmTexPattern*);
|
||||
/* 8018BF28 */ void setAnimation(J2DAnmTextureSRTKey*);
|
||||
/* 80126350 */ void setAnimation(J2DAnmTevRegKey*);
|
||||
/* 80126354 */ void setAnimation(J2DAnmColor*);
|
||||
/* 802F7EF4 */ void setAnimation(J2DAnmBase*);
|
||||
/* 802F5BF8 */ J2DPane();
|
||||
/* 802F60C4 */ void makePaneStream(J2DPane*, JSURandomInputStream*);
|
||||
/* 802F658C */ ~J2DPane();
|
||||
/* 802F6F60 */ void move(f32, f32);
|
||||
/* 802F6FB4 */ void add(f32, f32);
|
||||
/* 802F6FF8 */ void resize(f32, f32);
|
||||
/* 802F7264 */ void clip(JGeometry::TBox2<f32> const&);
|
||||
/* 802F72E0 */ void search(u64);
|
||||
/* 802F7388 */ void searchUserInfo(u64);
|
||||
/* 802F7430 */ void isUsed(ResTIMG const*);
|
||||
/* 802F74B8 */ void isUsed(ResFONT const*);
|
||||
/* 802F7680 */ void setCullBack(_GXCullMode);
|
||||
/* 802F8428 */ void setCullBack(bool);
|
||||
/* 802F7B18 */ void makePaneExStream(J2DPane*, JSURandomInputStream*);
|
||||
/* 802F7DB8 */ void getPointer(JSURandomInputStream*, u32, JKRArchive*);
|
||||
/* 802F8004 */ void clearAnmTransform();
|
||||
/* 802F8080 */ void animationTransform(J2DAnmTransform const*);
|
||||
/* 802F8118 */ void setVisibileAnimation(J2DAnmVisibilityFull*);
|
||||
/* 802F81A0 */ void setVtxColorAnimation(J2DAnmVtxColor*);
|
||||
/* 802F8228 */ void animationPane(J2DAnmTransform const*);
|
||||
/* 802F83D0 */ void setAnimationVF(J2DAnmVisibilityFull*);
|
||||
/* 802F83FC */ void setAnimationVC(J2DAnmVtxColor*);
|
||||
/* 802F8464 */ void setConnectParent(bool);
|
||||
/* 802F8474 */ void update();
|
||||
};
|
||||
|
||||
struct J2DMaterial {};
|
||||
|
||||
struct J2DWindow {
|
||||
struct TMaterial {};
|
||||
|
||||
/* 80254000 */ void getBlack() const;
|
||||
/* 8025400C */ void getWhite() const;
|
||||
/* 802543E0 */ void setWhite(JUtility::TColor);
|
||||
/* 80254430 */ void setBlack(JUtility::TColor);
|
||||
/* 80254568 */ void setBlackWhite(JUtility::TColor, JUtility::TColor);
|
||||
/* 802F9C10 */ J2DWindow(J2DPane*, JSURandomInputStream*, J2DMaterial*);
|
||||
/* 802F9B74 */ J2DWindow(J2DPane*, JSURandomInputStream*, JKRArchive*);
|
||||
/* 802F9A7C */ J2DWindow();
|
||||
/* 802FA118 */ void private_readStream(J2DPane*, JSURandomInputStream*, JKRArchive*);
|
||||
/* 802FA604 */ void initinfo2();
|
||||
/* 802FA880 */ ~J2DWindow();
|
||||
/* 802FBFA0 */ void draw(f32, f32, f32, f32);
|
||||
/* 802FA928 */ void draw(JGeometry::TBox2<f32> const&);
|
||||
/* 802FAED0 */ void draw(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
|
||||
/* 802FAA5C */ void draw_private(JGeometry::TBox2<f32> const&, JGeometry::TBox2<f32> const&);
|
||||
/* 802FB000 */ void resize(f32, f32);
|
||||
/* 802FB12C */ void setContentsColor(JUtility::TColor, JUtility::TColor, JUtility::TColor,
|
||||
JUtility::TColor);
|
||||
/* 802FB240 */ void drawSelf(f32, f32, f32 (*)[3][4]);
|
||||
/* 802FB1D8 */ void drawSelf(f32, f32);
|
||||
/* 802FB338 */ void drawContents(JGeometry::TBox2<f32> const&);
|
||||
/* 802FB634 */ void drawFrameTexture(JUTTexture*, f32, f32, f32, f32, u16, u16, u16, u16, bool);
|
||||
/* 802FB7C8 */ void drawFrameTexture(JUTTexture*, f32, f32, bool, bool, bool);
|
||||
/* 802FB868 */ void drawContentsTexture(f32, f32, f32, f32);
|
||||
/* 802FBB90 */ void setTevMode(JUTTexture*, JUtility::TColor, JUtility::TColor);
|
||||
/* 802FBE60 */ void getFrameTexture(u8, u8) const;
|
||||
/* 802FC02C */ void isUsed(ResFONT const*);
|
||||
/* 802FBEDC */ void isUsed(ResTIMG const*);
|
||||
/* 802FBF98 */ s32 getTypeID() const;
|
||||
/* 802FBFE8 */ void getContentsTexture(u8) const;
|
||||
/* 802FC000 */ void getMaterial(J2DWindow::TMaterial&) const;
|
||||
/* 802FC01C */ bool getFrameMaterial(u8) const;
|
||||
/* 802FC024 */ bool getContentsMaterial() const;
|
||||
/* 802FC04C */ void rewriteAlpha();
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -239,27 +95,10 @@ extern "C" void setAnimationVC__7J2DPaneFP14J2DAnmVtxColor();
|
||||
extern "C" void setCullBack__7J2DPaneFb();
|
||||
extern "C" void setConnectParent__7J2DPaneFb();
|
||||
extern "C" void update__7J2DPaneFv();
|
||||
extern "C" void PSMTXIdentity();
|
||||
extern "C" void PSMTXConcat();
|
||||
extern "C" void GXSetVtxDesc();
|
||||
extern "C" void GXClearVtxDesc();
|
||||
extern "C" void GXSetVtxAttrFmt();
|
||||
extern "C" void GXSetTexCoordGen2();
|
||||
extern "C" void GXSetNumTexGens();
|
||||
extern "C" void GXBegin();
|
||||
extern "C" void GXSetNumChans();
|
||||
extern "C" void GXSetChanCtrl();
|
||||
extern "C" void GXSetNumIndStages();
|
||||
extern "C" void GXSetTevDirect();
|
||||
extern "C" void GXSetTevOp();
|
||||
extern "C" void GXSetTevColorIn();
|
||||
extern "C" void GXSetTevAlphaIn();
|
||||
extern "C" void GXSetTevColorOp();
|
||||
extern "C" void GXSetTevAlphaOp();
|
||||
extern "C" void GXSetTevColor();
|
||||
extern "C" void GXSetTevOrder();
|
||||
extern "C" void GXSetNumTevStages();
|
||||
extern "C" void GXSetBlendMode();
|
||||
extern "C" void GXLoadPosMtxImm();
|
||||
extern "C" void GXSetCurrentMtx();
|
||||
extern "C" void _savegpr_25();
|
||||
@@ -624,7 +463,7 @@ COMPILER_STRIP_GATE(0x803A1C40, &lit_3037);
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J2DWindow::isUsed(ResTIMG const* param_0) {
|
||||
asm bool J2DWindow::isUsed(ResTIMG const* param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DWindow/isUsed__9J2DWindowFPC7ResTIMG.s"
|
||||
}
|
||||
@@ -682,7 +521,7 @@ bool J2DWindow::getContentsMaterial() const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void J2DWindow::isUsed(ResFONT const* param_0) {
|
||||
asm bool J2DWindow::isUsed(ResFONT const* param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/J2DGraph/J2DWindow/isUsed__9J2DWindowFPC7ResFONT.s"
|
||||
}
|
||||
|
||||
@@ -11,47 +11,8 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct _GXVtxFmt {};
|
||||
|
||||
struct _GXVtxAttrFmtList {};
|
||||
|
||||
struct _GXAttr {};
|
||||
|
||||
struct Vec {};
|
||||
|
||||
struct J3DShapeMtx {
|
||||
/* 803130A8 */ void resetMtxLoadCache();
|
||||
|
||||
static u8 sCurrentPipeline[4];
|
||||
static u8 sCurrentScaleFlag[4];
|
||||
static u8 sTexMtxLoadType[4];
|
||||
};
|
||||
|
||||
struct J3DShapeDraw {
|
||||
/* 80314974 */ void addTexMtxIndexInDL(u32, u32, u32);
|
||||
/* 80314AD4 */ void draw() const;
|
||||
};
|
||||
|
||||
struct J3DShape {
|
||||
/* 80314B48 */ void initialize();
|
||||
/* 80314BB8 */ void addTexMtxIndexInDL(_GXAttr, u32);
|
||||
/* 80314CBC */ void addTexMtxIndexInVcd(_GXAttr);
|
||||
/* 80314DA8 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
|
||||
/* 80314E28 */ void countBumpMtxNum() const;
|
||||
/* 80314EEC */ void loadVtxArray() const;
|
||||
/* 80314F5C */ void isSameVcdVatCmd(J3DShape*);
|
||||
/* 80314F98 */ void makeVtxArrayCmd();
|
||||
/* 80315260 */ void makeVcdVatCmd();
|
||||
/* 80315300 */ void loadPreDrawSetting() const;
|
||||
/* 80315398 */ void setArrayAndBindPipeline() const;
|
||||
/* 8031544C */ void drawFast() const;
|
||||
/* 803155E0 */ void draw() const;
|
||||
/* 80315628 */ void simpleDraw() const;
|
||||
/* 803156AC */ void simpleDrawCache() const;
|
||||
|
||||
static u8 sOldVcdVatCmd[4];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -92,7 +53,6 @@ extern "C" void OSRestoreInterrupts();
|
||||
extern "C" void OSDisableScheduler();
|
||||
extern "C" void OSEnableScheduler();
|
||||
extern "C" void GXSetArray();
|
||||
extern "C" void GXCallDisplayList();
|
||||
extern "C" void GDInitGDLObj();
|
||||
extern "C" void GDFlushCurrToMem();
|
||||
extern "C" void GDPadCurr32();
|
||||
@@ -252,7 +212,7 @@ asm void J3DShape::makeVcdVatCmd() {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804515D0-804515D4 000AD0 0004+00 5/5 25/25 9/9 .sbss sOldVcdVatCmd__8J3DShape */
|
||||
u8 J3DShape::sOldVcdVatCmd[4];
|
||||
void* J3DShape::sOldVcdVatCmd;
|
||||
|
||||
/* 80315300-80315398 30FC40 0098+00 2/2 6/6 3/3 .text loadPreDrawSetting__8J3DShapeCFv */
|
||||
#pragma push
|
||||
|
||||
@@ -7,18 +7,6 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct J3DShapeDraw {
|
||||
/* 80314924 */ void countVertex(u32);
|
||||
/* 80314974 */ void addTexMtxIndexInDL(u32, u32, u32);
|
||||
/* 80314ABC */ J3DShapeDraw(u8 const*, u32);
|
||||
/* 80314AD4 */ void draw() const;
|
||||
/* 80314B00 */ ~J3DShapeDraw();
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
@@ -11,8 +11,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct Vec {};
|
||||
|
||||
struct J3DTextureSRTInfo {};
|
||||
|
||||
struct J3DSys {
|
||||
@@ -68,26 +66,6 @@ struct J3DShapeMtxBBoardConcatView {
|
||||
/* 80314610 */ void getType() const;
|
||||
};
|
||||
|
||||
struct J3DShapeMtx {
|
||||
/* 80273E08 */ bool getUseMtxNum() const;
|
||||
/* 803130A8 */ void resetMtxLoadCache();
|
||||
/* 803130E4 */ void loadMtxIndx_PNGP(int, u16) const;
|
||||
/* 80313128 */ void loadMtxIndx_PCPU(int, u16) const;
|
||||
/* 80313188 */ void loadMtxIndx_NCPU(int, u16) const;
|
||||
/* 803131D4 */ void loadMtxIndx_PNCPU(int, u16) const;
|
||||
/* 80313B94 */ void load() const;
|
||||
/* 80313BF0 */ void calcNBTScale(Vec const&, f32 (*)[3][3], f32 (*)[3][3]);
|
||||
/* 8031459C */ void getUseMtxIndex(u16) const;
|
||||
/* 80314798 */ ~J3DShapeMtx();
|
||||
/* 803147E0 */ void getType() const;
|
||||
|
||||
static u8 sMtxLoadPipeline[48];
|
||||
static u8 sMtxLoadCache[20 + 4 /* padding */];
|
||||
static u8 sCurrentPipeline[4];
|
||||
static u8 sCurrentScaleFlag[4];
|
||||
static u8 sTexMtxLoadType[4];
|
||||
};
|
||||
|
||||
struct J3DDifferedTexMtx {
|
||||
/* 8031322C */ void loadExecute(f32 const (*)[4]);
|
||||
|
||||
@@ -174,9 +152,6 @@ extern "C" void J3DGetTextureMtxMayaOld__FRC17J3DTextureSRTInfoPA4_f();
|
||||
extern "C" void J3DScaleNrmMtx__FPA4_fRC3Vec();
|
||||
extern "C" void J3DScaleNrmMtx33__FPA3_fRC3Vec();
|
||||
extern "C" void J3DMtxProjConcat__FPA4_fPA4_fPA4_f();
|
||||
extern "C" void PSMTXCopy();
|
||||
extern "C" void PSMTXConcat();
|
||||
extern "C" void PSMTXInverse();
|
||||
extern "C" void GXSetArray();
|
||||
extern "C" void GXLoadTexMtxImm();
|
||||
extern "C" void __ptmf_scall();
|
||||
|
||||
@@ -111,7 +111,7 @@ extern "C" extern u32 j3dDefaultTevKColor;
|
||||
J3DSys j3dSys;
|
||||
|
||||
/* 80434BE4-80434C14 061904 0030+00 0/0 17/17 154/154 .bss mCurrentMtx__6J3DSys */
|
||||
u8 J3DSys::mCurrentMtx[48];
|
||||
Mtx J3DSys::mCurrentMtx;
|
||||
|
||||
/* 80434C14-80434C20 061934 000C+00 0/0 6/6 0/0 .bss mCurrentS__6J3DSys */
|
||||
f32 J3DSys::mCurrentS[3];
|
||||
@@ -120,7 +120,7 @@ f32 J3DSys::mCurrentS[3];
|
||||
f32 J3DSys::mParentS[3];
|
||||
|
||||
/* 80434C2C-80434C70 06194C 0040+04 1/1 17/17 0/0 .bss sTexCoordScaleTable__6J3DSys */
|
||||
u8 J3DSys::sTexCoordScaleTable[64 + 4 /* padding */];
|
||||
u16 J3DSys::sTexCoordScaleTable[34];
|
||||
|
||||
/* 8030FDE8-8030FEC0 30A728 00D8+00 1/1 0/0 0/0 .text __ct__6J3DSysFv */
|
||||
#pragma push
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct _GXRenderModeObj {};
|
||||
|
||||
struct ResFONT {};
|
||||
|
||||
struct OSThread {};
|
||||
|
||||
struct JUTVideo {
|
||||
@@ -37,8 +33,6 @@ struct JUTGamePad {
|
||||
/* 802E0898 */ void init();
|
||||
};
|
||||
|
||||
struct JUTFont {};
|
||||
|
||||
struct JUTDirectPrint {
|
||||
/* 802E4240 */ void start();
|
||||
};
|
||||
@@ -57,10 +51,6 @@ struct JUTConsoleManager {
|
||||
/* 802E81F4 */ void createManager(JKRHeap*);
|
||||
};
|
||||
|
||||
struct JUTConsole {
|
||||
/* 802E7354 */ void create(unsigned int, unsigned int, JKRHeap*);
|
||||
};
|
||||
|
||||
struct JUTAssertion {
|
||||
/* 802E495C */ void create();
|
||||
};
|
||||
@@ -78,33 +68,6 @@ struct JKRAram {
|
||||
/* 802D1FA4 */ void create(u32, u32, s32, s32, s32);
|
||||
};
|
||||
|
||||
struct JFWSystem {
|
||||
struct CSetUpParam {
|
||||
static u32 maxStdHeaps;
|
||||
static u32 sysHeapSize;
|
||||
static u32 fifoBufSize;
|
||||
static u32 aramAudioBufSize;
|
||||
static u32 aramGraphBufSize;
|
||||
static u32 streamPriority;
|
||||
static u32 decompPriority;
|
||||
static u32 aPiecePriority;
|
||||
static void* systemFontRes;
|
||||
static void* renderMode;
|
||||
static u32 exConsoleBufferSize[1 + 1 /* padding */];
|
||||
};
|
||||
|
||||
/* 80271CD0 */ void firstInit();
|
||||
/* 80271D18 */ void init();
|
||||
|
||||
static u8 rootHeap[4];
|
||||
static u8 systemHeap[4];
|
||||
static u8 mainThread[4];
|
||||
static u8 debugPrint[4];
|
||||
static u8 systemFont[4];
|
||||
static u8 systemConsoleManager[4];
|
||||
static u8 systemConsole[4];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -238,7 +201,7 @@ u8 JFWSystem::systemFont[4];
|
||||
u8 JFWSystem::systemConsoleManager[4];
|
||||
|
||||
/* 804511B8-804511BC 0006B8 0004+00 1/1 7/7 0/0 .sbss systemConsole__9JFWSystem */
|
||||
u8 JFWSystem::systemConsole[4];
|
||||
JUTConsole* JFWSystem::systemConsole;
|
||||
|
||||
/* 804511BC-804511C0 0006BC 0004+00 1/1 0/0 0/0 .sbss None */
|
||||
static u8 data_804511BC[4];
|
||||
|
||||
@@ -7,28 +7,6 @@
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
namespace JGadget {
|
||||
struct TLinkListNode {};
|
||||
|
||||
struct TNodeLinkList {
|
||||
struct iterator {};
|
||||
|
||||
/* 802DCA1C */ ~TNodeLinkList();
|
||||
/* 802DCAA0 */ void erase(JGadget::TNodeLinkList::iterator, JGadget::TNodeLinkList::iterator);
|
||||
/* 802DCA58 */ void erase(JGadget::TNodeLinkList::iterator);
|
||||
/* 802DCB08 */ void splice(JGadget::TNodeLinkList::iterator, JGadget::TNodeLinkList&,
|
||||
JGadget::TNodeLinkList::iterator);
|
||||
/* 802DCBA8 */ void Insert(JGadget::TNodeLinkList::iterator, JGadget::TLinkListNode*);
|
||||
/* 802DCBD4 */ void Erase(JGadget::TLinkListNode*);
|
||||
/* 802DCBF8 */ void Remove(JGadget::TLinkListNode*);
|
||||
};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
|
||||
@@ -68,7 +68,7 @@ void JUTAssertion::create() {
|
||||
/* ############################################################################################## */
|
||||
/* 80451530-80451538 000A30 0004+04 2/2 0/0 0/0 .sbss
|
||||
* sMessageLife__Q212JUTAssertion23@unnamed@JUTAssert_cpp@ */
|
||||
static u8 data_80451530[4 + 4 /* padding */];
|
||||
static s32 data_80451530;
|
||||
|
||||
/* 802E4960-802E499C 2DF2A0 003C+00 2/2 0/0 0/0 .text flush_subroutine__12JUTAssertionFv
|
||||
*/
|
||||
|
||||
@@ -11,19 +11,10 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTVideo {
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
struct JUTFont {
|
||||
/* 802DED70 */ void setCharColor(JUtility::TColor);
|
||||
/* 802DEE28 */ void drawString_size_scale(f32, f32, f32, f32, char const*, u32, bool);
|
||||
};
|
||||
|
||||
struct JUTDirectPrint {
|
||||
/* 802E4288 */ void erase(int, int, int, int);
|
||||
/* 802E46D8 */ void drawString(u16, u16, char*);
|
||||
@@ -38,25 +29,6 @@ struct JKRHeap {
|
||||
static u8 sCurrentHeap[4];
|
||||
};
|
||||
|
||||
struct JUTConsole {
|
||||
struct EConsoleType {};
|
||||
|
||||
/* 802E73E4 */ void create(unsigned int, void*, u32);
|
||||
/* 802E7354 */ void create(unsigned int, unsigned int, JKRHeap*);
|
||||
/* 802E746C */ JUTConsole(unsigned int, unsigned int, bool);
|
||||
/* 802E755C */ ~JUTConsole();
|
||||
/* 802E75CC */ void getObjectSizeFromBufferSize(unsigned int, unsigned int);
|
||||
/* 802E75DC */ void getLineFromObjectSize(u32, unsigned int);
|
||||
/* 802E75EC */ void clear();
|
||||
/* 802E7648 */ void doDraw(JUTConsole::EConsoleType) const;
|
||||
/* 802E7BB8 */ void print_f(char const*, ...);
|
||||
/* 802E7C38 */ void print(char const*);
|
||||
/* 802E7F7C */ void dumpToTerminal(unsigned int);
|
||||
/* 802E80A8 */ void scroll(int);
|
||||
/* 802E8184 */ void getUsedLine() const;
|
||||
/* 802E81A8 */ void getLineOffset() const;
|
||||
};
|
||||
|
||||
struct JUTConsoleManager {
|
||||
/* 802E81CC */ JUTConsoleManager();
|
||||
/* 802E81F4 */ void createManager(JKRHeap*);
|
||||
@@ -69,23 +41,6 @@ struct JUTConsoleManager {
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
struct JKRDisposer {
|
||||
/* 802D147C */ JKRDisposer();
|
||||
/* 802D14E4 */ ~JKRDisposer();
|
||||
};
|
||||
|
||||
namespace JGadget {
|
||||
struct TLinkListNode {};
|
||||
|
||||
struct TNodeLinkList {
|
||||
struct iterator {};
|
||||
|
||||
/* 802DCBA8 */ void Insert(JGadget::TNodeLinkList::iterator, JGadget::TLinkListNode*);
|
||||
/* 802DCBF8 */ void Remove(JGadget::TLinkListNode*);
|
||||
};
|
||||
|
||||
}; // namespace JGadget
|
||||
|
||||
struct J2DOrthoGraph {
|
||||
/* 802E96D0 */ J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
|
||||
/* 802E97B4 */ void setPort();
|
||||
@@ -379,7 +334,7 @@ asm void JUTConsole::getUsedLine() const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTConsole::getLineOffset() const {
|
||||
asm int JUTConsole::getLineOffset() const {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTConsole/getLineOffset__10JUTConsoleCFv.s"
|
||||
}
|
||||
|
||||
@@ -11,38 +11,10 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTVideo {
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
struct JUTFont {
|
||||
/* 802DED70 */ void setCharColor(JUtility::TColor);
|
||||
/* 802DEE28 */ void drawString_size_scale(f32, f32, f32, f32, char const*, u32, bool);
|
||||
};
|
||||
|
||||
struct JKRHeap {
|
||||
/* 802CE474 */ void alloc(u32, int, JKRHeap*);
|
||||
/* 802CE500 */ void free(void*, JKRHeap*);
|
||||
|
||||
static u8 sCurrentHeap[4];
|
||||
};
|
||||
|
||||
struct JUTDbPrint {
|
||||
/* 802E0148 */ JUTDbPrint(JUTFont*, JKRHeap*);
|
||||
/* 802E0190 */ void start(JUTFont*, JKRHeap*);
|
||||
/* 802E0204 */ void changeFont(JUTFont*);
|
||||
/* 802E021C */ void enter(int, int, int, char const*, int);
|
||||
/* 802E02DC */ void flush(int, int, int, int);
|
||||
/* 802E02A4 */ void flush();
|
||||
/* 802E0440 */ void drawString(int, int, int, u8 const*);
|
||||
|
||||
static u8 sDebugPrint[4 + 4 /* padding */];
|
||||
};
|
||||
|
||||
struct J2DOrthoGraph {
|
||||
/* 802E96D0 */ J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
|
||||
/* 802E97B4 */ void setPort();
|
||||
@@ -105,7 +77,7 @@ asm JUTDbPrint::JUTDbPrint(JUTFont* param_0, JKRHeap* param_1) {
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 804514C8-804514D0 0009C8 0004+04 3/3 6/6 0/0 .sbss sDebugPrint__10JUTDbPrint */
|
||||
u8 JUTDbPrint::sDebugPrint[4 + 4 /* padding */];
|
||||
JUTDbPrint* JUTDbPrint::sDebugPrint;
|
||||
|
||||
/* 802E0190-802E0204 2DAAD0 0074+00 0/0 2/2 0/0 .text start__10JUTDbPrintFP7JUTFontP7JKRHeap */
|
||||
#pragma push
|
||||
|
||||
@@ -11,15 +11,6 @@
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUTGamePad {
|
||||
struct EPadPort {};
|
||||
|
||||
/* 802E06DC */ JUTGamePad(JUTGamePad::EPadPort);
|
||||
/* 802E07B0 */ ~JUTGamePad();
|
||||
/* 802E08E4 */ void read();
|
||||
/* 802E0C6C */ void checkResetCallback(s64);
|
||||
};
|
||||
|
||||
struct JUTDirectFile {
|
||||
/* 802E87F8 */ JUTDirectFile();
|
||||
/* 802E881C */ ~JUTDirectFile();
|
||||
@@ -45,28 +36,6 @@ struct JUTConsoleManager {
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
struct JSUPtrLink {
|
||||
/* 802DBDFC */ JSUPtrLink(void*);
|
||||
};
|
||||
|
||||
struct JSUPtrList {
|
||||
/* 802DBE74 */ JSUPtrList(bool);
|
||||
/* 802DBEAC */ ~JSUPtrList();
|
||||
/* 802DBF4C */ void append(JSUPtrLink*);
|
||||
};
|
||||
|
||||
template <typename A0>
|
||||
struct JSUList {};
|
||||
/* JSUList<JUTException::JUTExMapFile> */
|
||||
struct JSUList__template13 {
|
||||
/* 802E4194 */ void func_802E4194(void* _this);
|
||||
};
|
||||
|
||||
struct JKRThread {
|
||||
/* 802D1568 */ JKRThread(u32, int, int);
|
||||
/* 802D1758 */ ~JKRThread();
|
||||
};
|
||||
|
||||
struct JKRHeap {
|
||||
static u8 sSystemHeap[4];
|
||||
};
|
||||
@@ -265,7 +234,7 @@ SECTION_DATA extern void* __vt__12JUTException[4 + 1 /* padding */] = {
|
||||
};
|
||||
|
||||
/* 80451508-8045150C 000A08 0004+00 4/4 3/3 0/0 .sbss sErrorManager__12JUTException */
|
||||
u8 JUTException::sErrorManager[4];
|
||||
JUTException* JUTException::sErrorManager;
|
||||
|
||||
/* 8045150C-80451510 000A0C 0004+00 4/4 0/0 0/0 .sbss sPreUserCallback__12JUTException */
|
||||
u8 JUTException::sPreUserCallback[4];
|
||||
@@ -641,7 +610,7 @@ asm void JUTException::isEnablePad() const {
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTException::readPad(u32* param_0, u32* param_1) {
|
||||
asm bool JUTException::readPad(u32* param_0, u32* param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTException/readPad__12JUTExceptionFPUlPUl.s"
|
||||
}
|
||||
|
||||
@@ -4,46 +4,10 @@
|
||||
//
|
||||
|
||||
#include "JSystem/JUtility/JUTFader.h"
|
||||
#include "JSystem/J2DGraph/J2DOrthoGraph.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct JUtility {
|
||||
struct TColor {};
|
||||
};
|
||||
|
||||
struct JUTFader {
|
||||
struct EStatus {};
|
||||
|
||||
/* 802E5530 */ JUTFader(int, int, int, int, JUtility::TColor);
|
||||
/* 802E55DC */ void control();
|
||||
/* 802E56DC */ void draw();
|
||||
/* 802E576C */ void startFadeIn(int);
|
||||
/* 802E579C */ void startFadeOut(int);
|
||||
/* 802E57D0 */ void setStatus(JUTFader::EStatus, int);
|
||||
/* 802E5840 */ ~JUTFader();
|
||||
};
|
||||
|
||||
struct JGeometry {
|
||||
template <typename A1>
|
||||
struct TBox2 {};
|
||||
/* TBox2<f32> */
|
||||
struct TBox2__template0 {};
|
||||
};
|
||||
|
||||
struct J2DOrthoGraph {
|
||||
/* 802E9670 */ J2DOrthoGraph();
|
||||
};
|
||||
|
||||
struct J2DGrafContext {
|
||||
/* 802E9118 */ void setColor(JUtility::TColor, JUtility::TColor, JUtility::TColor,
|
||||
JUtility::TColor);
|
||||
/* 802E9260 */ void fillBox(JGeometry::TBox2<f32> const&);
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -72,29 +36,50 @@ extern "C" extern void* __vt__13J2DOrthoGraph[10];
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CC990-803CC9A8 029AB0 0018+00 2/2 0/0 0/0 .data __vt__8JUTFader */
|
||||
SECTION_DATA extern void* __vt__8JUTFader[6] = {
|
||||
(void*)NULL /* RTTI */, (void*)NULL,
|
||||
(void*)__dt__8JUTFaderFv, (void*)startFadeIn__8JUTFaderFi,
|
||||
(void*)startFadeOut__8JUTFaderFi, (void*)draw__8JUTFaderFv,
|
||||
};
|
||||
|
||||
/* 804560D0-804560D8 0046D0 0008+00 1/1 0/0 0/0 .sdata2 @2196 */
|
||||
SECTION_SDATA2 static f64 lit_2196 = 4503601774854144.0 /* cast s32 to float */;
|
||||
|
||||
/* 802E5530-802E55DC 2DFE70 00AC+00 0/0 1/1 0/0 .text __ct__8JUTFaderFiiiiQ28JUtility6TColor */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUTFader::JUTFader(int param_0, int param_1, int param_2, int param_3,
|
||||
JUtility::TColor param_4) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/__ct__8JUTFaderFiiiiQ28JUtility6TColor.s"
|
||||
JUTFader::JUTFader(int x, int y, int width, int height, JUtility::TColor pColor)
|
||||
: mColor(pColor), mBox(x, y, x + width, y + height) {
|
||||
mStatus = 0;
|
||||
field_0x8 = 0;
|
||||
field_0xa = 0;
|
||||
field_0x24 = 0;
|
||||
mEStatus = UNKSTATUS_M1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E55DC-802E56DC 2DFF1C 0100+00 0/0 1/1 0/0 .text control__8JUTFaderFv */
|
||||
#ifdef NONMATCHING
|
||||
void JUTFader::control() {
|
||||
s32 tmp = mEStatus;
|
||||
if (mEStatus >= 0) {
|
||||
mEStatus--;
|
||||
if (tmp == 0) {
|
||||
mStatus = field_0x24;
|
||||
}
|
||||
}
|
||||
switch (mStatus) {
|
||||
case 0:
|
||||
mColor.a = -1;
|
||||
case 1:
|
||||
break;
|
||||
case 2:
|
||||
field_0xa++;
|
||||
mColor.a = (255 - (255 / field_0x8));
|
||||
if (field_0xa >= field_0x8) {
|
||||
mStatus = 1;
|
||||
}
|
||||
break;
|
||||
case 3:
|
||||
field_0xa++;
|
||||
mColor.a = (255 / field_0x8);
|
||||
if (field_0xa >= field_0x8) {
|
||||
mStatus = 0;
|
||||
}
|
||||
default:
|
||||
draw();
|
||||
break;
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -103,8 +88,19 @@ asm void JUTFader::control() {
|
||||
#include "asm/JSystem/JUtility/JUTFader/control__8JUTFaderFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E56DC-802E576C 2E001C 0090+00 1/0 0/0 0/0 .text draw__8JUTFaderFv */
|
||||
#ifdef NONMATCHING
|
||||
void JUTFader::draw() {
|
||||
if (mColor.a != 0) {
|
||||
J2DOrthoGraph ortho;
|
||||
JUtility::TColor tmp = mColor;
|
||||
ortho.setColor(tmp, tmp, tmp, tmp);
|
||||
ortho.fillBox(mBox);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -113,26 +109,29 @@ asm void JUTFader::draw() {
|
||||
#include "asm/JSystem/JUtility/JUTFader/draw__8JUTFaderFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E576C-802E579C 2E00AC 0030+00 1/0 0/0 0/0 .text startFadeIn__8JUTFaderFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTFader::startFadeIn(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/startFadeIn__8JUTFaderFi.s"
|
||||
bool JUTFader::startFadeIn(int param_0) {
|
||||
bool statusCheck = mStatus == 0;
|
||||
if (statusCheck) {
|
||||
mStatus = 2;
|
||||
field_0xa = 0;
|
||||
field_0x8 = param_0;
|
||||
}
|
||||
return statusCheck;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E579C-802E57D0 2E00DC 0034+00 1/0 0/0 0/0 .text startFadeOut__8JUTFaderFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTFader::startFadeOut(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/startFadeOut__8JUTFaderFi.s"
|
||||
bool JUTFader::startFadeOut(int param_0) {
|
||||
bool statusCheck = mStatus == 1;
|
||||
if (statusCheck) {
|
||||
mStatus = 3;
|
||||
field_0xa = 0;
|
||||
field_0x8 = param_0;
|
||||
}
|
||||
return statusCheck;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E57D0-802E5840 2E0110 0070+00 0/0 1/1 0/0 .text setStatus__8JUTFaderFQ28JUTFader7EStatusi */
|
||||
#pragma push
|
||||
@@ -145,11 +144,4 @@ asm void JUTFader::setStatus(JUTFader::EStatus param_0, int param_1) {
|
||||
#pragma pop
|
||||
|
||||
/* 802E5840-802E5888 2E0180 0048+00 1/0 0/0 0/0 .text __dt__8JUTFaderFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUTFader::~JUTFader() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTFader/__dt__8JUTFaderFv.s"
|
||||
}
|
||||
#pragma pop
|
||||
JUTFader::~JUTFader() {}
|
||||
|
||||
@@ -11,10 +11,6 @@
|
||||
// remove this once __sinit is decompiled
|
||||
#define mPadListHack (*(JSUList<JUTGamePad>*)&mPadList)
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -122,9 +118,7 @@ SECTION_DATA PADMask JUTGamePad::CRumble::sChannelMask[4] = {
|
||||
};
|
||||
|
||||
/* 803CC600-803CC610 029720 0010+00 2/2 0/0 0/0 .data channel_mask */
|
||||
SECTION_DATA static u8 channel_mask[16] = {
|
||||
0x80, 0x00, 0x00, 0x00, 0x40, 0x00, 0x00, 0x00, 0x20, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00,
|
||||
};
|
||||
SECTION_DATA static u32 channel_mask[4] = {0x80000000, 0x40000000, 0x20000000, 0x10000000};
|
||||
|
||||
/* 803CC610-803CC620 029730 000C+04 2/2 0/0 0/0 .data __vt__10JUTGamePad */
|
||||
SECTION_DATA extern void* __vt__10JUTGamePad[3 + 1 /* padding */] = {
|
||||
@@ -204,8 +198,8 @@ s32 JUTGamePad::init() {
|
||||
|
||||
/* 802E08D0-802E08E4 2DB210 0014+00 1/1 0/0 0/0 .text clear__10JUTGamePadFv */
|
||||
void JUTGamePad::clear() {
|
||||
this->field_0x98 = 0;
|
||||
this->field_0xa8 = 1;
|
||||
mButtonReset.mReset = false;
|
||||
field_0xa8 = 1;
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
@@ -255,7 +249,7 @@ void JUTGamePad::assign() {
|
||||
for (s32 i = 4; i > 0; i--) {
|
||||
if ((/* mPadStatus */ lbl_804343F0[iVar3].error == 0) &&
|
||||
(/* *puVar2 */ lbl_804514D4[iVar3] == 0)) {
|
||||
this->pad_port = iVar3;
|
||||
mPortNum = iVar3;
|
||||
/* JUTGamePad::mPadAssign[iVar3] */ /* *puVar2 */ lbl_804514D4[iVar3] = 1;
|
||||
/* JUTGamePad::mPadButton */ lbl_80434420[iVar3].setRepeat(
|
||||
this->buttons.field_0x24, this->buttons.field_0x28, this->buttons.field_0x2c);
|
||||
@@ -298,7 +292,6 @@ OSTime JUTGamePad::C3ButtonReset::sThreshold;
|
||||
/* 80451500-80451504 -00001 0004+00 3/3 6/6 0/0 .sbss None */
|
||||
/* 80451500 0001+00 data_80451500 None */
|
||||
/* 80451501 0003+00 data_80451501 None */
|
||||
extern bool struct_80451500;
|
||||
bool struct_80451500;
|
||||
bool struct_80451501;
|
||||
|
||||
@@ -313,10 +306,9 @@ void JUTGamePad::checkResetCallback(OSTime unk) {
|
||||
return;
|
||||
|
||||
struct_80451501 = true;
|
||||
JUTGamePad::C3ButtonReset::sResetOccurredPort = this->pad_port;
|
||||
JUTGamePad::C3ButtonReset::sResetOccurredPort = mPortNum;
|
||||
if (JUTGamePad::C3ButtonReset::sCallback != NULL) {
|
||||
JUTGamePad::C3ButtonReset::sCallback(this->pad_port,
|
||||
JUTGamePad::C3ButtonReset::sCallbackArg);
|
||||
JUTGamePad::C3ButtonReset::sCallback(mPortNum, JUTGamePad::C3ButtonReset::sCallbackArg);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -30,7 +30,6 @@ extern "C" void __dl__FPv();
|
||||
extern "C" void __dla__FPv();
|
||||
extern "C" void storeTLUT__10JUTPaletteF7_GXTlut10_GXTlutFmt15JUTTransparencyUsPv();
|
||||
extern "C" void load__10JUTPaletteFv();
|
||||
extern "C" void GXInitTexObjCI();
|
||||
extern "C" void _savegpr_29();
|
||||
extern "C" void _restgpr_29();
|
||||
|
||||
|
||||
@@ -47,16 +47,16 @@ extern "C" u8 sVideoInterval__8JUTVideo[4];
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void changeFrameBuffer__14JUTDirectPrintFPvUsUs();
|
||||
extern "C" void VISetPreRetraceCallback();
|
||||
extern "C" void VISetPostRetraceCallback();
|
||||
extern "C" void VISetPreRetraceCallback(VIRetraceCallback);
|
||||
extern "C" void VISetPostRetraceCallback(VIRetraceCallback);
|
||||
extern "C" void VIInit();
|
||||
extern "C" void VIWaitForRetrace();
|
||||
extern "C" void VIConfigure();
|
||||
extern "C" void VIConfigure(_GXRenderModeObj*);
|
||||
extern "C" void VIFlush();
|
||||
extern "C" void VISetNextFrameBuffer();
|
||||
extern "C" void VIGetNextFrameBuffer();
|
||||
extern "C" void VISetBlack();
|
||||
extern "C" void VIGetRetraceCount();
|
||||
extern "C" void VISetBlack(s32);
|
||||
extern "C" u32 VIGetRetraceCount();
|
||||
extern "C" void GXSetDrawDone();
|
||||
extern "C" void GXCopyDisp();
|
||||
extern "C" u8 sDirectPrint__14JUTDirectPrint[4 + 4 /* padding */];
|
||||
@@ -72,24 +72,20 @@ JUTVideo* JUTVideo::sManager;
|
||||
|
||||
/* 802E4C54-802E4CAC 2DF594 0058+00 0/0 1/1 0/0 .text
|
||||
* createManager__8JUTVideoFPC16_GXRenderModeObj */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTVideo::createManager(_GXRenderModeObj const* param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTVideo/createManager__8JUTVideoFPC16_GXRenderModeObj.s"
|
||||
JUTVideo* JUTVideo::createManager(_GXRenderModeObj const* param_0) {
|
||||
if (sManager == NULL) {
|
||||
sManager = new JUTVideo(param_0);
|
||||
}
|
||||
return sManager;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E4CAC-802E4CF4 2DF5EC 0048+00 0/0 2/2 0/0 .text destroyManager__8JUTVideoFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTVideo::destroyManager() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTVideo/destroyManager__8JUTVideoFv.s"
|
||||
void JUTVideo::destroyManager() {
|
||||
if (sManager != NULL) {
|
||||
delete sManager;
|
||||
sManager = NULL;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CC980-803CC990 029AA0 000C+04 2/2 0/0 0/0 .data __vt__8JUTVideo */
|
||||
@@ -102,12 +98,35 @@ SECTION_DATA extern void* __vt__8JUTVideo[3 + 1 /* padding */] = {
|
||||
};
|
||||
|
||||
/* 8045153C-80451540 000A3C 0004+00 2/2 1/1 0/0 .sbss sVideoLastTick__8JUTVideo */
|
||||
u8 JUTVideo::sVideoLastTick[4];
|
||||
u32 JUTVideo::sVideoLastTick;
|
||||
|
||||
/* 80451540-80451544 000A40 0004+00 2/2 1/1 0/0 .sbss sVideoInterval__8JUTVideo */
|
||||
u8 JUTVideo::sVideoInterval[4];
|
||||
u32 JUTVideo::sVideoInterval;
|
||||
|
||||
/* 802E4CF4-802E4DE8 2DF634 00F4+00 1/1 0/0 0/0 .text __ct__8JUTVideoFPC16_GXRenderModeObj */
|
||||
#ifdef NONMATCHING
|
||||
JUTVideo::JUTVideo(_GXRenderModeObj const* param_0) {
|
||||
mRenderObj = NULL;
|
||||
VIInit();
|
||||
mSetBlack = true;
|
||||
mSetBlackFrameCount = 2;
|
||||
setRenderMode(param_0);
|
||||
VISetBlack(1);
|
||||
VIFlush();
|
||||
field_0x8 = 0;
|
||||
mRetraceCount = VIGetRetraceCount();
|
||||
field_0x10 = 1;
|
||||
field_0x18 = 0;
|
||||
sVideoLastTick = OSGetTick();
|
||||
sVideoInterval = 670000;
|
||||
mPreRetraceCallback = VISetPreRetraceCallback(preRetraceProc);
|
||||
mPostRetraceCallback = VISetPreRetraceCallback(postRetraceProc);
|
||||
unknown_callback_1 = NULL;
|
||||
unknown_callback_2 = NULL;
|
||||
OSInitMessageQueue(mMessageQueue, mMessage, 1);
|
||||
GXSetDrawDoneCallback(drawDoneCallback);
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -116,23 +135,20 @@ asm JUTVideo::JUTVideo(_GXRenderModeObj const* param_0) {
|
||||
#include "asm/JSystem/JUtility/JUTVideo/__ct__8JUTVideoFPC16_GXRenderModeObj.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E4DE8-802E4E50 2DF728 0068+00 1/0 0/0 0/0 .text __dt__8JUTVideoFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUTVideo::~JUTVideo() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTVideo/__dt__8JUTVideoFv.s"
|
||||
JUTVideo::~JUTVideo() {
|
||||
VISetPreRetraceCallback(mPreRetraceCallback);
|
||||
VISetPostRetraceCallback(mPostRetraceCallback);
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80451544-80451548 000A44 0004+00 4/4 0/0 0/0 .sbss None */
|
||||
static u8 data_80451544[4];
|
||||
|
||||
/* 80451548-8045154C 000A48 0004+00 1/1 0/0 0/0 .sbss frameBuffer$2222 */
|
||||
static u8 frameBuffer[4];
|
||||
static void* frameBuffer;
|
||||
|
||||
/* 8045154C-80451550 000A4C 0004+00 1/1 0/0 0/0 .sbss None */
|
||||
static u8 data_8045154C[4];
|
||||
@@ -148,24 +164,15 @@ asm void JUTVideo::preRetraceProc(u32 param_0) {
|
||||
#pragma pop
|
||||
|
||||
/* 802E5088-802E50B0 2DF9C8 0028+00 0/0 1/1 0/0 .text drawDoneStart__8JUTVideoFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTVideo::drawDoneStart() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTVideo/drawDoneStart__8JUTVideoFv.s"
|
||||
void JUTVideo::drawDoneStart() {
|
||||
data_80451544[0] = 1;
|
||||
GXSetDrawDone();
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E50B0-802E50BC 2DF9F0 000C+00 0/0 1/1 0/0 .text dummyNoDrawWait__8JUTVideoFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTVideo::dummyNoDrawWait() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTVideo/dummyNoDrawWait__8JUTVideoFv.s"
|
||||
void JUTVideo::dummyNoDrawWait() {
|
||||
data_80451544[0] = 0;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E50BC-802E5144 2DF9FC 0088+00 1/1 0/0 0/0 .text drawDoneCallback__8JUTVideoFv */
|
||||
#pragma push
|
||||
@@ -178,6 +185,18 @@ asm void JUTVideo::drawDoneCallback() {
|
||||
#pragma pop
|
||||
|
||||
/* 802E5144-802E5198 2DFA84 0054+00 1/1 0/0 0/0 .text postRetraceProc__8JUTVideoFUl */
|
||||
#ifdef NONMATCHING
|
||||
void JUTVideo::postRetraceProc(u32 param_0) {
|
||||
void* message;
|
||||
if (sManager != NULL) {
|
||||
if (sManager->unknown_callback_2 != NULL) {
|
||||
sManager->unknown_callback_2();
|
||||
}
|
||||
message = (void*)VIGetRetraceCount();
|
||||
OSSendMessage(&sManager->mMessageQueue, message, OS_MESSAGE_NON_BLOCKING);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -186,17 +205,24 @@ asm void JUTVideo::postRetraceProc(u32 param_0) {
|
||||
#include "asm/JSystem/JUtility/JUTVideo/postRetraceProc__8JUTVideoFUl.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* 802E5198-802E5210 2DFAD8 0078+00 1/1 2/2 0/0 .text
|
||||
* setRenderMode__8JUTVideoFPC16_GXRenderModeObj */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTVideo::setRenderMode(_GXRenderModeObj const* param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTVideo/setRenderMode__8JUTVideoFPC16_GXRenderModeObj.s"
|
||||
void JUTVideo::setRenderMode(_GXRenderModeObj const* pObj) {
|
||||
if (mRenderObj != NULL && pObj->vi_tv_mode != mRenderObj->vi_tv_mode) {
|
||||
mSetBlack = true;
|
||||
mSetBlackFrameCount = 4;
|
||||
}
|
||||
mRenderObj = (_GXRenderModeObj*)pObj;
|
||||
VIConfigure(mRenderObj);
|
||||
VIFlush();
|
||||
|
||||
if (mSetBlack) {
|
||||
VIWaitForRetrace();
|
||||
VIWaitForRetrace();
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5210-802E5214 2DFB50 0004+00 0/0 1/1 0/0 .text waitRetraceIfNeed__8JUTVideoFv */
|
||||
void JUTVideo::waitRetraceIfNeed() {
|
||||
|
||||
@@ -5,37 +5,9 @@
|
||||
|
||||
#include "JSystem/JUtility/JUTXfb.h"
|
||||
#include "dol2asm.h"
|
||||
#include "dolphin/gx/GX.h"
|
||||
#include "dolphin/types.h"
|
||||
|
||||
//
|
||||
// Types:
|
||||
//
|
||||
|
||||
struct _GXRenderModeObj {};
|
||||
|
||||
struct JKRHeap {
|
||||
static u8 sSystemHeap[4];
|
||||
};
|
||||
|
||||
struct JUTXfb {
|
||||
struct EXfbNumber {};
|
||||
|
||||
/* 802E5214 */ void clearIndex();
|
||||
/* 802E5228 */ void common_init(int);
|
||||
/* 802E5260 */ JUTXfb(_GXRenderModeObj const*, JKRHeap*, JUTXfb::EXfbNumber);
|
||||
/* 802E5308 */ ~JUTXfb();
|
||||
/* 802E5378 */ void delXfb(int);
|
||||
/* 802E53B8 */ void createManager(JKRHeap*, JUTXfb::EXfbNumber);
|
||||
/* 802E5424 */ void destroyManager();
|
||||
/* 802E5454 */ void initiate(u16, u16, JKRHeap*, JUTXfb::EXfbNumber);
|
||||
|
||||
static u8 sManager[4 + 4 /* padding */];
|
||||
};
|
||||
|
||||
struct JUTVideo {
|
||||
static u8 sManager[4];
|
||||
};
|
||||
|
||||
//
|
||||
// Forward References:
|
||||
//
|
||||
@@ -57,8 +29,6 @@ extern "C" u8 sManager__6JUTXfb[4 + 4 /* padding */];
|
||||
extern "C" void* __nw__FUl();
|
||||
extern "C" void* __nwa__FUlP7JKRHeapi();
|
||||
extern "C" void __dl__FPv();
|
||||
extern "C" void GXGetNumXfbLines();
|
||||
extern "C" void GXGetYScaleFactor();
|
||||
extern "C" void _savegpr_27();
|
||||
extern "C" void _savegpr_28();
|
||||
extern "C" void _savegpr_29();
|
||||
@@ -72,28 +42,37 @@ extern "C" u8 sManager__8JUTVideo[4];
|
||||
// Declarations:
|
||||
//
|
||||
|
||||
/* 802E5214-802E5228 2DFB54 0014+00 1/1 1/1 0/0 .text clearIndex__6JUTXfbFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTXfb::clearIndex() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/clearIndex__6JUTXfbFv.s"
|
||||
void JUTXfb::clearIndex() {
|
||||
mDrawingXfbIndex = -1;
|
||||
mDrawnXfbIndex = -1;
|
||||
mDisplayingXfbIndex = -1;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5228-802E5260 2DFB68 0038+00 1/1 0/0 0/0 .text common_init__6JUTXfbFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTXfb::common_init(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/common_init__6JUTXfbFi.s"
|
||||
void JUTXfb::common_init(int bufNum) {
|
||||
mBufferNum = bufNum;
|
||||
clearIndex();
|
||||
mSDrawingFlag = 99;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5260-802E5308 2DFBA0 00A8+00 1/1 0/0 0/0 .text
|
||||
* __ct__6JUTXfbFPC16_GXRenderModeObjP7JKRHeapQ26JUTXfb10EXfbNumber */
|
||||
#ifdef NONMATCHING
|
||||
JUTXfb::JUTXfb(_GXRenderModeObj const* pObj, JKRHeap* pHeap, JUTXfb::EXfbNumber xfbNum) {
|
||||
common_init(xfbNum);
|
||||
|
||||
if (pObj) {
|
||||
initiate(pObj->fb_width, pObj->xfb_height, pHeap, xfbNum);
|
||||
} else {
|
||||
//_GXRenderModeObj* renderObj = JUTVideo::getManager()->getRenderMode();
|
||||
u16 fb_width = JUTVideo::getManager()->getRenderMode()->fb_width;
|
||||
u16 efb_height = JUTVideo::getManager()->getRenderMode()->efb_height;
|
||||
u16 xfb_height = JUTVideo::getManager()->getRenderMode()->xfb_height;
|
||||
f32 scale_factor = GXGetYScaleFactor(efb_height, xfb_height);
|
||||
|
||||
initiate(fb_width, GXGetNumXfbLines(efb_height, scale_factor), pHeap, xfbNum);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
@@ -102,59 +81,61 @@ asm JUTXfb::JUTXfb(_GXRenderModeObj const* param_0, JKRHeap* param_1, JUTXfb::EX
|
||||
#include "asm/JSystem/JUtility/JUTXfb/__ct__6JUTXfbFPC16_GXRenderModeObjP7JKRHeapQ26JUTXfb10EXfbNumber.s"
|
||||
}
|
||||
#pragma pop
|
||||
#endif
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 80451550-80451558 000A50 0004+04 3/3 13/13 0/0 .sbss sManager__6JUTXfb */
|
||||
u8 JUTXfb::sManager[4 + 4 /* padding */];
|
||||
JUTXfb* JUTXfb::sManager;
|
||||
|
||||
/* 802E5308-802E5378 2DFC48 0070+00 1/1 0/0 0/0 .text __dt__6JUTXfbFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm JUTXfb::~JUTXfb() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/__dt__6JUTXfbFv.s"
|
||||
JUTXfb::~JUTXfb() {
|
||||
for (int i = 0; i < 3; i++) {
|
||||
delXfb(i);
|
||||
}
|
||||
sManager = NULL;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5378-802E53B8 2DFCB8 0040+00 1/1 0/0 0/0 .text delXfb__6JUTXfbFi */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTXfb::delXfb(int param_0) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/delXfb__6JUTXfbFi.s"
|
||||
void JUTXfb::delXfb(int xfbIdx) {
|
||||
if (mXfbAllocated[xfbIdx] && mBuffer[xfbIdx]) {
|
||||
delete mBuffer[xfbIdx];
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E53B8-802E5424 2DFCF8 006C+00 0/0 1/1 0/0 .text
|
||||
* createManager__6JUTXfbFP7JKRHeapQ26JUTXfb10EXfbNumber */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTXfb::createManager(JKRHeap* param_0, JUTXfb::EXfbNumber param_1) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/createManager__6JUTXfbFP7JKRHeapQ26JUTXfb10EXfbNumber.s"
|
||||
JUTXfb* JUTXfb::createManager(JKRHeap* pHeap, JUTXfb::EXfbNumber xfbNum) {
|
||||
if (sManager == NULL) {
|
||||
sManager = new JUTXfb(NULL, pHeap, xfbNum);
|
||||
}
|
||||
return sManager;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5424-802E5454 2DFD64 0030+00 0/0 1/1 0/0 .text destroyManager__6JUTXfbFv */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTXfb::destroyManager() {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/destroyManager__6JUTXfbFv.s"
|
||||
void JUTXfb::destroyManager() {
|
||||
delete sManager;
|
||||
sManager = NULL;
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
/* 802E5454-802E5530 2DFD94 00DC+00 1/1 0/0 0/0 .text
|
||||
* initiate__6JUTXfbFUsUsP7JKRHeapQ26JUTXfb10EXfbNumber */
|
||||
#pragma push
|
||||
#pragma optimization_level 0
|
||||
#pragma optimizewithasm off
|
||||
asm void JUTXfb::initiate(u16 param_0, u16 param_1, JKRHeap* param_2, JUTXfb::EXfbNumber param_3) {
|
||||
nofralloc
|
||||
#include "asm/JSystem/JUtility/JUTXfb/initiate__6JUTXfbFUsUsP7JKRHeapQ26JUTXfb10EXfbNumber.s"
|
||||
void JUTXfb::initiate(u16 width, u16 height, JKRHeap* pHeap, JUTXfb::EXfbNumber xfbNum) {
|
||||
if (pHeap == NULL) {
|
||||
pHeap = JKRHeap::getSystemHeap();
|
||||
}
|
||||
|
||||
int size = ((u32)width + 0xf & 0xfff0) * (u32)height * 2;
|
||||
|
||||
void* buf = ::operator new[](size, pHeap, 0x20);
|
||||
mBuffer[0] = buf;
|
||||
mXfbAllocated[0] = true;
|
||||
|
||||
if (xfbNum >= 2) {
|
||||
buf = ::operator new[](size, pHeap, 0x20);
|
||||
mBuffer[1] = buf;
|
||||
mXfbAllocated[1] = true;
|
||||
} else {
|
||||
mBuffer[1] = NULL;
|
||||
mXfbAllocated[1] = false;
|
||||
}
|
||||
|
||||
if (xfbNum >= 3) {
|
||||
buf = ::operator new[](size, pHeap, 0x20);
|
||||
mBuffer[2] = buf;
|
||||
mXfbAllocated[2] = true;
|
||||
} else {
|
||||
mBuffer[2] = NULL;
|
||||
mXfbAllocated[2] = false;
|
||||
}
|
||||
}
|
||||
#pragma pop
|
||||
|
||||
Reference in New Issue
Block a user