Decompile printfunc.c
This commit is contained in:
parent
951c59bacc
commit
c772f715b3
4 changed files with 57 additions and 7 deletions
|
|
@ -4866,7 +4866,7 @@ jumptable_80122528 = .data:0x80122528; // type:object size:0x28 scope:local
|
||||||
lbl_80122550 = .data:0x80122550; // type:object size:0x19 data:string
|
lbl_80122550 = .data:0x80122550; // type:object size:0x19 data:string
|
||||||
lbl_80122569 = .data:0x80122569; // type:object size:0xA data:string
|
lbl_80122569 = .data:0x80122569; // type:object size:0xA data:string
|
||||||
lbl_80122573 = .data:0x80122573; // type:object size:0x2D
|
lbl_80122573 = .data:0x80122573; // type:object size:0x2D
|
||||||
refMapData0 = .data:0x801225A0; // type:object size:0xAFC0
|
refMapData0 = .data:0x801225A0; // type:object size:0xAFC0 noreloc
|
||||||
lbl_8012D560 = .data:0x8012D560; // type:object size:0x1B data:string
|
lbl_8012D560 = .data:0x8012D560; // type:object size:0x1B data:string
|
||||||
lbl_8012D57B = .data:0x8012D57B; // type:object size:0x16 data:string
|
lbl_8012D57B = .data:0x8012D57B; // type:object size:0x16 data:string
|
||||||
lbl_8012D591 = .data:0x8012D591; // type:object size:0x21 data:string
|
lbl_8012D591 = .data:0x8012D591; // type:object size:0x21 data:string
|
||||||
|
|
|
||||||
|
|
@ -113,6 +113,12 @@ static inline void GXColor1u32(const u32 v) {
|
||||||
GXWGFifo.u32 = v;
|
GXWGFifo.u32 = v;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static inline void GXColor3u8(const u8 r, const u8 g, const u8 b) {
|
||||||
|
GXWGFifo.u8 = r;
|
||||||
|
GXWGFifo.u8 = g;
|
||||||
|
GXWGFifo.u8 = b;
|
||||||
|
}
|
||||||
|
|
||||||
static inline void GXColor4u8(const u8 r, const u8 g, const u8 b, const u8 a) {
|
static inline void GXColor4u8(const u8 r, const u8 g, const u8 b, const u8 a) {
|
||||||
GXWGFifo.u8 = r;
|
GXWGFifo.u8 = r;
|
||||||
GXWGFifo.u8 = g;
|
GXWGFifo.u8 = g;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "dolphin/mtx.h"
|
#include "dolphin/mtx.h"
|
||||||
#include "dolphin/gx.h"
|
#include "dolphin/gx.h"
|
||||||
|
#include "dolphin/vi.h"
|
||||||
#include "stdio.h"
|
#include "stdio.h"
|
||||||
#include "stdarg.h"
|
#include "stdarg.h"
|
||||||
|
|
||||||
|
|
@ -22,10 +23,10 @@ struct strline_data {
|
||||||
static struct strline_data strline[256];
|
static struct strline_data strline[256];
|
||||||
static char pfStrBuf[256];
|
static char pfStrBuf[256];
|
||||||
|
|
||||||
BOOL saftyFrameF;
|
|
||||||
u16 strlinecnt;
|
|
||||||
u16 empstrline;
|
|
||||||
int fontcolor;
|
int fontcolor;
|
||||||
|
u16 empstrline;
|
||||||
|
u16 strlinecnt;
|
||||||
|
BOOL saftyFrameF;
|
||||||
|
|
||||||
static void WireDraw(void);
|
static void WireDraw(void);
|
||||||
|
|
||||||
|
|
@ -301,7 +302,51 @@ void pfDrawFonts(void)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static void WireDraw(void)
|
void WireDraw(void) //Is not private to prevent linker error due to analysis bug of refMapData0
|
||||||
{
|
{
|
||||||
|
Mtx44 proj;
|
||||||
|
Mtx modelview;
|
||||||
|
MTXOrtho(proj, 0, 480, 0, 576, 0, 10);
|
||||||
|
GXSetProjection(proj, GX_ORTHOGRAPHIC);
|
||||||
|
if(RenderMode->field_rendering) {
|
||||||
|
GXSetViewportJitter(0, 0, 640, 480, 0, 1, VIGetNextField());
|
||||||
|
} else {
|
||||||
|
GXSetViewport(0, 0, 640, 480, 0, 1);
|
||||||
|
}
|
||||||
|
GXSetScissor(0, 0, 640, 480);
|
||||||
|
GXClearVtxDesc();
|
||||||
|
GXSetVtxDesc(GX_VA_POS, GX_DIRECT);
|
||||||
|
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_POS, GX_POS_XY, GX_F32, 0);
|
||||||
|
GXSetVtxDesc(GX_VA_CLR0, GX_DIRECT);
|
||||||
|
GXSetVtxAttrFmt(GX_VTXFMT0, GX_VA_CLR0, GX_CLR_RGB, GX_RGB8, 0);
|
||||||
|
GXSetTevOrder(GX_TEVSTAGE0, GX_TEXCOORD_NULL, GX_TEXMAP_NULL, GX_COLOR0A0);
|
||||||
|
GXSetTevColorIn(GX_TEVSTAGE0, GX_CC_RASC, GX_CC_ZERO, GX_CC_ZERO, GX_CC_ZERO);
|
||||||
|
GXSetTevColorOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||||
|
GXSetTevAlphaIn(GX_TEVSTAGE0, GX_CA_KONST, GX_CA_ZERO, GX_CA_ZERO, GX_CA_ZERO);
|
||||||
|
GXSetTevAlphaOp(GX_TEVSTAGE0, GX_TEV_ADD, GX_TB_ZERO, GX_CS_SCALE_1, GX_TRUE, GX_TEVPREV);
|
||||||
|
GXSetNumTexGens(0);
|
||||||
|
GXSetNumTevStages(1);
|
||||||
|
GXSetZMode(GX_FALSE, GX_ALWAYS, GX_FALSE);
|
||||||
|
GXSetNumChans(1);
|
||||||
|
GXSetChanCtrl(GX_COLOR0A0, GX_FALSE, GX_SRC_REG, GX_SRC_VTX, GX_LIGHT_NULL, GX_DF_CLAMP, GX_AF_NONE);
|
||||||
|
MTXIdentity(modelview);
|
||||||
|
GXLoadPosMtxImm(modelview, GX_PNMTX0);
|
||||||
|
GXBegin(GX_LINES, 0, 8);
|
||||||
|
GXPosition2f32(16, 40);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(16, 440);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(16, 40);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(560, 40);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(560, 440);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(560, 40);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(560, 440);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXPosition2f32(16, 440);
|
||||||
|
GXColor3u8(255, 0, 0);
|
||||||
|
GXEnd();
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
#include "common.h"
|
#include "common.h"
|
||||||
#include "dolphin/os.h"
|
#include "dolphin/os.h"
|
||||||
#include "stdio.h"
|
|
||||||
|
|
||||||
extern int gcsetjmp(jmp_buf *jump);
|
extern int gcsetjmp(jmp_buf *jump);
|
||||||
extern void gclongjmp(jmp_buf *jump, int status);
|
extern void gclongjmp(jmp_buf *jump, int status);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue