mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-03 08:23:08 -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: JUTResFont
|
||||
//
|
||||
|
||||
#include "JSystem/JSystem.h" // IWYU pragma: keep
|
||||
|
||||
#include "JSystem/JUtility/JUTResFont.h"
|
||||
@@ -12,20 +7,17 @@
|
||||
#include "JSystem/JUtility/JUTConsole.h"
|
||||
#include "dolphin/gx.h"
|
||||
|
||||
/* 802DEF48-802DEF94 2D9888 004C+00 0/0 1/1 0/0 .text __ct__10JUTResFontFv */
|
||||
JUTResFont::JUTResFont() {
|
||||
initialize_state();
|
||||
JUTFont::initialize_state();
|
||||
}
|
||||
|
||||
/* 802DEF94-802DF000 2D98D4 006C+00 0/0 10/10 0/0 .text __ct__10JUTResFontFPC7ResFONTP7JKRHeap */
|
||||
JUTResFont::JUTResFont(const ResFONT* pFont, JKRHeap* pHeap) {
|
||||
initialize_state();
|
||||
JUTFont::initialize_state();
|
||||
initiate(pFont, pHeap);
|
||||
}
|
||||
|
||||
/* 802DF000-802DF08C 2D9940 008C+00 1/0 2/2 0/0 .text __dt__10JUTResFontFv */
|
||||
JUTResFont::~JUTResFont() {
|
||||
if (mValid) {
|
||||
deleteMemBlocks_ResFont();
|
||||
@@ -34,12 +26,10 @@ JUTResFont::~JUTResFont() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802DF08C-802DF0B0 2D99CC 0024+00 3/3 3/3 0/0 .text deleteMemBlocks_ResFont__10JUTResFontFv */
|
||||
void JUTResFont::deleteMemBlocks_ResFont() {
|
||||
delete[] mMemBlocks;
|
||||
}
|
||||
|
||||
/* 802DF0B0-802DF0DC 2D99F0 002C+00 5/5 3/3 0/0 .text initialize_state__10JUTResFontFv */
|
||||
void JUTResFont::initialize_state() {
|
||||
mResFont = NULL;
|
||||
mMemBlocks = NULL;
|
||||
@@ -51,8 +41,6 @@ void JUTResFont::initialize_state() {
|
||||
mTexPageIdx = -1;
|
||||
}
|
||||
|
||||
/* 802DF0DC-802DF13C 2D9A1C 0060+00 1/1 0/0 0/0 .text initiate__10JUTResFontFPC7ResFONTP7JKRHeap
|
||||
*/
|
||||
bool JUTResFont::initiate(const ResFONT* pFont, JKRHeap* pHeap) {
|
||||
if (!protected_initiate(pFont, pHeap)) {
|
||||
deleteMemBlocks_ResFont();
|
||||
@@ -64,8 +52,6 @@ bool JUTResFont::initiate(const ResFONT* pFont, JKRHeap* pHeap) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/* 802DF13C-802DF248 2D9A7C 010C+00 1/1 0/0 0/0 .text
|
||||
* protected_initiate__10JUTResFontFPC7ResFONTP7JKRHeap */
|
||||
bool JUTResFont::protected_initiate(const ResFONT* pFont, JKRHeap* pHeap) {
|
||||
void** p;
|
||||
delete_and_initialize();
|
||||
@@ -100,7 +86,6 @@ bool JUTResFont::protected_initiate(const ResFONT* pFont, JKRHeap* pHeap) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802DF248-802DF344 2D9B88 00FC+00 1/1 0/0 0/0 .text countBlock__10JUTResFontFv */
|
||||
void JUTResFont::countBlock() {
|
||||
mWid1BlockNum = 0;
|
||||
mGly1BlockNum = 0;
|
||||
@@ -127,15 +112,12 @@ void JUTResFont::countBlock() {
|
||||
}
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8039D390-8039D39C -00001 000C+00 1/1 1/1 0/0 .rodata saoAboutEncoding___10JUTResFont */
|
||||
IsLeadByte_func const JUTResFont::saoAboutEncoding_[3] = {
|
||||
JUTFont::isLeadByte_1Byte,
|
||||
JUTFont::isLeadByte_2Byte,
|
||||
JUTFont::isLeadByte_ShiftJIS,
|
||||
};
|
||||
|
||||
/* 802DF344-802DF48C 2D9C84 0148+00 1/0 0/0 0/0 .text setBlock__10JUTResFontFv */
|
||||
void JUTResFont::setBlock() {
|
||||
s32 widthNum, glyphNum, mapNum;
|
||||
widthNum = 0;
|
||||
@@ -178,7 +160,6 @@ void JUTResFont::setBlock() {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802DF48C-802DF584 2D9DCC 00F8+00 1/0 1/0 0/0 .text setGX__10JUTResFontFv */
|
||||
void JUTResFont::setGX() {
|
||||
GXSetNumChans(1);
|
||||
GXSetNumTevStages(1);
|
||||
@@ -197,8 +178,6 @@ void JUTResFont::setGX() {
|
||||
GXSetVtxDesc(GX_VA_TEX0, GX_DIRECT);
|
||||
}
|
||||
|
||||
/* 802DF584-802DF7C4 2D9EC4 0240+00 1/0 1/0 0/0 .text
|
||||
* setGX__10JUTResFontFQ28JUtility6TColorQ28JUtility6TColor */
|
||||
void JUTResFont::setGX(JUtility::TColor col1, JUtility::TColor col2) {
|
||||
if (col1 == 0 && col2 == -1) {
|
||||
setGX();
|
||||
@@ -231,8 +210,6 @@ void JUTResFont::setGX(JUtility::TColor col1, JUtility::TColor col2) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802DF7C4-802DFBE8 2DA104 0424+00 1/0 1/0 0/0 .text drawChar_scale__10JUTResFontFffffib
|
||||
*/
|
||||
f32 JUTResFont::drawChar_scale(f32 pos_x, f32 pos_y, f32 scale_x, f32 scale_y, int str_int,
|
||||
bool flag) {
|
||||
f32 x1;
|
||||
@@ -296,8 +273,6 @@ f32 JUTResFont::drawChar_scale(f32 pos_x, f32 pos_y, f32 scale_x, f32 scale_y, i
|
||||
return retval;
|
||||
}
|
||||
|
||||
/* 802DFBE8-802DFC64 2DA528 007C+00 1/1 0/0 0/0 .text
|
||||
* loadFont__10JUTResFontFi11_GXTexMapIDPQ27JUTFont6TWidth */
|
||||
void JUTResFont::loadFont(int code, GXTexMapID texMapID, JUTFont::TWidth* pDstWidth) {
|
||||
if (pDstWidth != 0) {
|
||||
getWidthEntry(code, pDstWidth);
|
||||
@@ -307,8 +282,6 @@ void JUTResFont::loadFont(int code, GXTexMapID texMapID, JUTFont::TWidth* pDstWi
|
||||
loadImage(fontCode, texMapID);
|
||||
}
|
||||
|
||||
/* 802DFC64-802DFD0C 2DA5A4 00A8+00 1/0 1/0 0/0 .text
|
||||
* getWidthEntry__10JUTResFontCFiPQ27JUTFont6TWidth */
|
||||
void JUTResFont::getWidthEntry(int code, JUTFont::TWidth* i_width) const {
|
||||
int fontCode = getFontCode(code);
|
||||
i_width->field_0x0 = 0;
|
||||
@@ -324,7 +297,6 @@ void JUTResFont::getWidthEntry(int code, JUTFont::TWidth* i_width) const {
|
||||
}
|
||||
}
|
||||
|
||||
/* 802DFD0C-802DFD58 2DA64C 004C+00 1/0 1/0 0/0 .text getCellWidth__10JUTResFontCFv */
|
||||
s32 JUTResFont::getCellWidth() const {
|
||||
if (mpGlyphBlocks) {
|
||||
ResFONT::GLY1* glyphBlock = *mpGlyphBlocks;
|
||||
@@ -336,7 +308,6 @@ s32 JUTResFont::getCellWidth() const {
|
||||
return getWidth();
|
||||
}
|
||||
|
||||
/* 802DFD58-802DFDA4 2DA698 004C+00 1/0 1/0 0/0 .text getCellHeight__10JUTResFontCFv */
|
||||
s32 JUTResFont::getCellHeight() const {
|
||||
if (mpGlyphBlocks) {
|
||||
ResFONT::GLY1* glyphBlock = *mpGlyphBlocks;
|
||||
@@ -348,13 +319,10 @@ s32 JUTResFont::getCellHeight() const {
|
||||
return getHeight();
|
||||
}
|
||||
|
||||
/* 802DFDA4-802DFDD8 2DA6E4 0034+00 1/0 1/0 0/0 .text isLeadByte__10JUTResFontCFi */
|
||||
bool JUTResFont::isLeadByte(int chr) const {
|
||||
return (*mIsLeadByte)(chr);
|
||||
}
|
||||
|
||||
/* ############################################################################################## */
|
||||
/* 8039D39C-8039D45C 0299FC 00BE+02 1/1 0/0 0/0 .rodata halftofull$726 */
|
||||
static const u16 halftofull[95] = {
|
||||
0x8140, 0x8149, 0x8168, 0x8194, 0x8190, 0x8193, 0x8195, 0x8166, 0x8169, 0x816A, 0x8196, 0x817B,
|
||||
0x8143, 0x817C, 0x8144, 0x815E, 0x824F, 0x8250, 0x8251, 0x8252, 0x8253, 0x8254, 0x8255, 0x8256,
|
||||
@@ -366,7 +334,6 @@ static const u16 halftofull[95] = {
|
||||
0x8294, 0x8295, 0x8296, 0x8297, 0x8298, 0x8299, 0x829A, 0x816F, 0x8162, 0x8170, 0x8160,
|
||||
};
|
||||
|
||||
/* 802DFDD8-802DFF60 2DA718 0188+00 2/2 0/0 0/0 .text getFontCode__10JUTResFontCFi */
|
||||
int JUTResFont::getFontCode(int chr) const {
|
||||
int ret = mInf1Ptr->defaultCode;
|
||||
if ((getFontType() == 2) && (mMaxCode >= 0x8000U) && (chr >= 0x20) && (chr < 0x7FU)) {
|
||||
@@ -415,7 +382,6 @@ int JUTResFont::getFontCode(int chr) const {
|
||||
return ret;
|
||||
}
|
||||
|
||||
/* 802DFF60-802E00C4 2DA8A0 0164+00 1/0 0/0 0/0 .text loadImage__10JUTResFontFi11_GXTexMapID */
|
||||
void JUTResFont::loadImage(int code, GXTexMapID id){
|
||||
int i = 0;
|
||||
for (; i < mGly1BlockNum; i++)
|
||||
@@ -451,7 +417,6 @@ void JUTResFont::loadImage(int code, GXTexMapID id){
|
||||
GXLoadTexObj(&mTexObj, id);
|
||||
}
|
||||
|
||||
/* 802E00C4-802E0108 2DAA04 0044+00 1/1 0/0 0/0 .text convertSjis__10JUTResFontCFiPUs */
|
||||
int JUTResFont::convertSjis(int inChr, u16* inLead) const {
|
||||
int tmp = JSUHiByte(inChr);
|
||||
int tmp2 = JSULoByte(inChr) - 0x40;
|
||||
|
||||
Reference in New Issue
Block a user