fix and format

This commit is contained in:
lepelog
2021-12-04 12:27:59 +01:00
parent c839b3336e
commit d51f7bf0c6
4 changed files with 16 additions and 17 deletions
-1
View File
@@ -5,7 +5,6 @@
#include "JSystem/JUtility/JUTFont.h" #include "JSystem/JUtility/JUTFont.h"
#include "dolphin/types.h" #include "dolphin/types.h"
// TODO: fix struct // TODO: fix struct
struct unk_print { struct unk_print {
/* 0x00 */ unk_print* mNext; /* 0x00 */ unk_print* mNext;
+2 -2
View File
@@ -25,8 +25,8 @@ public:
/* 802E5144 */ static void postRetraceProc(u32); /* 802E5144 */ static void postRetraceProc(u32);
/* 802E50BC */ static void drawDoneCallback(); /* 802E50BC */ static void drawDoneCallback();
u32 getFbWidth() const { return this->mRenderObj->fb_width; } u32 getFbWidth() const { return mRenderObj->fb_width; }
u32 getEfbHeight() const { return this->mRenderObj->efb_height; } u32 getEfbHeight() const { return mRenderObj->efb_height; }
static JUTVideo* getManager() { return sManager; } static JUTVideo* getManager() { return sManager; }
GXRenderModeObj* getRenderMode() const { return mRenderObj; } GXRenderModeObj* getRenderMode() const { return mRenderObj; }
+13 -13
View File
@@ -4,22 +4,22 @@
// //
#include "JSystem/JUtility/JUTDbPrint.h" #include "JSystem/JUtility/JUTDbPrint.h"
#include "JSystem/JUtility/JUTVideo.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h"
#include "dol2asm.h" #include "dol2asm.h"
#include "dolphin/types.h" #include "dolphin/types.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/string.h"
#include "MSL_C.PPCEABI.bare.H/MSL_Common/Src/printf.h"
#include "JSystem/JUtility/JUTVideo.h"
class J2DGrafContext { class J2DGrafContext {
public: public:
virtual ~J2DGrafContext() {}; virtual ~J2DGrafContext(){};
}; };
class J2DOrthoGraph : public J2DGrafContext { class J2DOrthoGraph : public J2DGrafContext {
public: public:
char fake[0xd0]; char fake[0xd0];
J2DOrthoGraph(f32, f32, f32, f32, f32, f32); J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
virtual ~J2DOrthoGraph() {}; virtual ~J2DOrthoGraph(){};
void setPort(); void setPort();
}; };
@@ -28,7 +28,7 @@ JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) {
mFont = pFont; mFont = pFont;
mFirst = NULL; mFirst = NULL;
mHeap = pHeap != NULL ? pHeap : JKRHeap::getCurrentHeap(); mHeap = pHeap != NULL ? pHeap : JKRHeap::getCurrentHeap();
mColor.set(255,255,255,255); mColor.set(255, 255, 255, 255);
mVisible = true; mVisible = true;
} }
@@ -49,7 +49,7 @@ JUTDbPrint* JUTDbPrint::start(JUTFont* pFont, JKRHeap* pHeap) {
/* 802E0204-802E021C 2DAB44 0018+00 0/0 1/1 0/0 .text changeFont__10JUTDbPrintFP7JUTFont /* 802E0204-802E021C 2DAB44 0018+00 0/0 1/1 0/0 .text changeFont__10JUTDbPrintFP7JUTFont
*/ */
JUTFont *JUTDbPrint::changeFont(JUTFont* pFont) { JUTFont* JUTDbPrint::changeFont(JUTFont* pFont) {
JUTFont* old = mFont; JUTFont* old = mFont;
if (pFont != NULL) { if (pFont != NULL) {
mFont = pFont; mFont = pFont;
@@ -58,8 +58,7 @@ JUTFont *JUTDbPrint::changeFont(JUTFont* pFont) {
} }
/* 802E021C-802E02A4 2DAB5C 0088+00 2/2 0/0 0/0 .text enter__10JUTDbPrintFiiiPCci */ /* 802E021C-802E02A4 2DAB5C 0088+00 2/2 0/0 0/0 .text enter__10JUTDbPrintFiiiPCci */
void JUTDbPrint::enter(int param_0, int param_1, int param_2, char const* param_3, void JUTDbPrint::enter(int param_0, int param_1, int param_2, char const* param_3, int param_4) {
int param_4) {
if (param_4 > 0) { if (param_4 > 0) {
unk_print* ptr = static_cast<unk_print*>(JKRAllocFromHeap(mHeap, param_4 + 0x10, -4)); unk_print* ptr = static_cast<unk_print*>(JKRAllocFromHeap(mHeap, param_4 + 0x10, -4));
if (ptr != NULL) { if (ptr != NULL) {
@@ -68,8 +67,8 @@ void JUTDbPrint::enter(int param_0, int param_1, int param_2, char const* param_
ptr->unk_0x08 = param_2; ptr->unk_0x08 = param_2;
ptr->unk_0x0A = param_4; ptr->unk_0x0A = param_4;
strcpy(ptr->unk_0x0C, param_3); strcpy(ptr->unk_0x0C, param_3);
ptr->mNext = this->mFirst; ptr->mNext = mFirst;
this->mFirst = ptr; mFirst = ptr;
} }
} }
} }
@@ -89,7 +88,7 @@ void JUTDbPrint::flush(int param_0, int param_1, int param_2, int param_3) {
g.setPort(); g.setPort();
mFont->setGX(); mFont->setGX();
mFont->setCharColor(mColor); mFont->setCharColor(mColor);
while (cur != NULL) { while (cur != NULL) {
if (mVisible) { if (mVisible) {
this->drawString(cur->unk_0x04, cur->unk_0x06, cur->unk_0x0A, (u8*)cur->unk_0x0C); this->drawString(cur->unk_0x04, cur->unk_0x06, cur->unk_0x0A, (u8*)cur->unk_0x0C);
@@ -110,7 +109,8 @@ void JUTDbPrint::flush(int param_0, int param_1, int param_2, int param_3) {
/* 802E0440-802E0530 2DAD80 00F0+00 1/1 0/0 0/0 .text drawString__10JUTDbPrintFiiiPCUc */ /* 802E0440-802E0530 2DAD80 00F0+00 1/1 0/0 0/0 .text drawString__10JUTDbPrintFiiiPCUc */
void JUTDbPrint::drawString(int param_0, int param_1, int param_2, u8 const* param_3) { void JUTDbPrint::drawString(int param_0, int param_1, int param_2, u8 const* param_3) {
JUTFont* font = mFont; JUTFont* font = mFont;
font->drawString_size_scale(param_0, param_1, font->getWidth(), font->getHeight(), (const char*)param_3, param_2, true); font->drawString_size_scale(param_0, param_1, font->getWidth(), font->getHeight(),
(const char*)param_3, param_2, true);
} }
/* 802E0530-802E0600 2DAE70 00D0+00 0/0 2/2 2/2 .text JUTReport__FiiPCce */ /* 802E0530-802E0600 2DAE70 00D0+00 0/0 2/2 2/2 .text JUTReport__FiiPCce */
+1 -1
View File
@@ -1046,7 +1046,7 @@ def find_used_asm_files(non_matching, use_progress_bar=True):
def clang_format_impl(file): def clang_format_impl(file):
cmd = ["clang-format", "-i", str(file)] cmd = ["clang-format-10", "-i", str(file)]
cf = subprocess.run(args=cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE) cf = subprocess.run(args=cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)