mirror of
https://github.com/zeldaret/tp
synced 2026-06-30 11:51:41 -04:00
project cleanup (#2895)
* some wii OS fixes * remove old dol2asm comments * remove dol2asm.h * remove function address comments * normalize ATTRIBUTE_ALIGN usage * DECL_WEAK macro * fix gcc attribute weak macro * wrap more mwcc specific things in ifdefs * fixes * fix revo sdk version flags * fixes
This commit is contained in:
@@ -1,8 +1,3 @@
|
||||
//
|
||||
// Generated By: dol2asm
|
||||
// Translation Unit: JUTDirectPrint
|
||||
//
|
||||
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JUtility/JUTDirectPrint.h"
|
||||
@@ -10,16 +5,13 @@
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
|
||||
/* 80451528-80451530 000A28 0004+04 1/1 4/4 0/0 .sbss sDirectPrint__14JUTDirectPrint */
|
||||
JUTDirectPrint* JUTDirectPrint::sDirectPrint;
|
||||
|
||||
/* 802E41E8-802E4240 2DEB28 0058+00 1/1 0/0 0/0 .text __ct__14JUTDirectPrintFv */
|
||||
JUTDirectPrint::JUTDirectPrint() {
|
||||
changeFrameBuffer(NULL, 0, 0);
|
||||
setCharColor(0xff, 0xff, 0xff);
|
||||
}
|
||||
|
||||
/* 802E4240-802E4288 2DEB80 0048+00 0/0 1/1 0/0 .text start__14JUTDirectPrintFv */
|
||||
JUTDirectPrint* JUTDirectPrint::start() {
|
||||
if (!sDirectPrint) {
|
||||
sDirectPrint = new JUTDirectPrint();
|
||||
@@ -28,7 +20,6 @@ JUTDirectPrint* JUTDirectPrint::start() {
|
||||
return sDirectPrint;
|
||||
}
|
||||
|
||||
/* 802E4288-802E431C 2DEBC8 0094+00 1/1 1/1 0/0 .text erase__14JUTDirectPrintFiiii */
|
||||
void JUTDirectPrint::erase(int x, int y, int width, int height) {
|
||||
if (!this->field_0x00) {
|
||||
return;
|
||||
@@ -55,8 +46,6 @@ void JUTDirectPrint::erase(int x, int y, int width, int height) {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 803CC6B8-803CC738 0297D8 0080+00 2/2 0/0 0/0 .data sAsciiTable__14JUTDirectPrint */
|
||||
u8 JUTDirectPrint::sAsciiTable[128] = {
|
||||
0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A, 0xFD, 0xFE, 0x7A, 0x7A, 0x7A, 0x7A, 0x7A,
|
||||
0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF,
|
||||
@@ -68,7 +57,6 @@ u8 JUTDirectPrint::sAsciiTable[128] = {
|
||||
0x8C, 0x8D, 0x8E, 0x8F, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x76, 0x77, 0x78, 0x79, 0x7A,
|
||||
};
|
||||
|
||||
/* 803CC738-803CC838 -00001 0100+00 0/1 0/0 0/0 .data sFontData__14JUTDirectPrint */
|
||||
u32 JUTDirectPrint::sFontData[64] = {
|
||||
0x70871C30, 0x8988A250, 0x88808290, 0x88830C90, 0x888402F8, 0x88882210, 0x71CF9C10, 0xF9CF9C70,
|
||||
0x8208A288, 0xF200A288, 0x0BC11C78, 0x0A222208, 0x8A222208, 0x71C21C70, 0x23C738F8, 0x5228A480,
|
||||
@@ -80,7 +68,6 @@ u32 JUTDirectPrint::sFontData[64] = {
|
||||
0x70800000, 0x88822200, 0x08820400, 0x108F8800, 0x20821000, 0x00022200, 0x20800020, 0x00000000,
|
||||
};
|
||||
|
||||
/* 803CC838-803CC96C -00001 0134+00 0/1 0/0 0/0 .data sFontData2__14JUTDirectPrint */
|
||||
u32 JUTDirectPrint::sFontData2[77] = {
|
||||
0x51421820, 0x53E7A420, 0x014A2C40, 0x01471000, 0x0142AA00, 0x03EAA400, 0x01471A78, 0x00000000,
|
||||
0x50008010, 0x20010820, 0xF8020040, 0x20420820, 0x50441010, 0x00880000, 0x00070E00, 0x01088840,
|
||||
@@ -94,7 +81,6 @@ u32 JUTDirectPrint::sFontData2[77] = {
|
||||
0xF8000000, 0x10000000, 0x20000000, 0x40000000, 0xF8000000,
|
||||
};
|
||||
|
||||
/* 803CC96C-803CC980 029A8C 0010+04 0/1 0/0 0/0 .data twiceBit$371 */
|
||||
static u32 twiceBit[4] = {
|
||||
0,
|
||||
3,
|
||||
@@ -102,7 +88,6 @@ static u32 twiceBit[4] = {
|
||||
15,
|
||||
};
|
||||
|
||||
/* 802E431C-802E456C 2DEC5C 0250+00 1/1 0/0 0/0 .text drawChar__14JUTDirectPrintFiii */
|
||||
void JUTDirectPrint::drawChar(int position_x, int position_y, int ch) {
|
||||
int codepoint = (100 <= ch) ? ch - 100 : ch;
|
||||
int col_index = (codepoint % 5) * 6;
|
||||
@@ -160,8 +145,6 @@ void JUTDirectPrint::drawChar(int position_x, int position_y, int ch) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802E456C-802E45A4 2DEEAC 0038+00 1/1 4/4 0/0 .text changeFrameBuffer__14JUTDirectPrintFPvUsUs
|
||||
*/
|
||||
void JUTDirectPrint::changeFrameBuffer(void* frameBuffer, u16 width, u16 height) {
|
||||
this->field_0x00 = frameBuffer;
|
||||
mFrameBuffer = (u16*)frameBuffer;
|
||||
@@ -171,8 +154,6 @@ void JUTDirectPrint::changeFrameBuffer(void* frameBuffer, u16 width, u16 height)
|
||||
mFrameBufferSize = (u32)mStride * (u32)mFrameBufferHeight * 2;
|
||||
}
|
||||
|
||||
/* 802E45A4-802E46D8 2DEEE4 0134+00 1/1 0/0 0/0 .text
|
||||
* printSub__14JUTDirectPrintFUsUsPCcP16__va_list_structb */
|
||||
void JUTDirectPrint::printSub(u16 position_x, u16 position_y, char const* format, va_list args,
|
||||
bool clear) {
|
||||
char buffer[256];
|
||||
@@ -218,13 +199,10 @@ void JUTDirectPrint::print(u16 position_x, u16 position_y, char const* format, .
|
||||
}
|
||||
}
|
||||
|
||||
/* 802E46D8-802E4708 2DF018 0030+00 0/0 2/2 0/0 .text drawString__14JUTDirectPrintFUsUsPc
|
||||
*/
|
||||
void JUTDirectPrint::drawString(u16 position_x, u16 position_y, char* text) {
|
||||
drawString_f(position_x, position_y, "%s", text);
|
||||
}
|
||||
|
||||
/* 802E4708-802E4798 2DF048 0090+00 1/1 0/0 0/0 .text drawString_f__14JUTDirectPrintFUsUsPCce */
|
||||
void JUTDirectPrint::drawString_f(u16 position_x, u16 position_y, char const* format, ...) {
|
||||
if (mFrameBuffer) {
|
||||
va_list args;
|
||||
@@ -234,13 +212,10 @@ void JUTDirectPrint::drawString_f(u16 position_x, u16 position_y, char const* fo
|
||||
}
|
||||
}
|
||||
|
||||
/* 802E4798-802E47C8 2DF0D8 0030+00 0/0 2/2 0/0 .text
|
||||
* setCharColor__14JUTDirectPrintFQ28JUtility6TColor */
|
||||
void JUTDirectPrint::setCharColor(JUtility::TColor color) {
|
||||
setCharColor(color.r, color.g, color.b);
|
||||
}
|
||||
|
||||
/* 802E47C8-802E495C 2DF108 0194+00 2/2 0/0 0/0 .text setCharColor__14JUTDirectPrintFUcUcUc */
|
||||
void JUTDirectPrint::setCharColor(u8 r, u8 g, u8 b) {
|
||||
mCharColor.set(r, g, b, 0xFF);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user