summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlepelog <25211966+lepelog@users.noreply.github.com>2021-12-04 12:27:59 +0100
committerlepelog <25211966+lepelog@users.noreply.github.com>2021-12-04 12:27:59 +0100
commitd51f7bf0c6ddf533eee7e8d1ea4feedc7572142b (patch)
treef2c130b0e671ba8b68c431346e574d0e206784d2
parentc839b3336e5e1e15a0af621861d5da25b8bffbde (diff)
fix and format
-rw-r--r--include/JSystem/JUtility/JUTDbPrint.h1
-rw-r--r--include/JSystem/JUtility/JUTVideo.h4
-rw-r--r--libs/JSystem/JUtility/JUTDbPrint.cpp26
-rw-r--r--tools/tp.py2
4 files changed, 16 insertions, 17 deletions
diff --git a/include/JSystem/JUtility/JUTDbPrint.h b/include/JSystem/JUtility/JUTDbPrint.h
index 72b73c9ae4..18f951784a 100644
--- a/include/JSystem/JUtility/JUTDbPrint.h
+++ b/include/JSystem/JUtility/JUTDbPrint.h
@@ -5,7 +5,6 @@
#include "JSystem/JUtility/JUTFont.h"
#include "dolphin/types.h"
-
// TODO: fix struct
struct unk_print {
/* 0x00 */ unk_print* mNext;
diff --git a/include/JSystem/JUtility/JUTVideo.h b/include/JSystem/JUtility/JUTVideo.h
index 2cf6206801..537ee1dcf6 100644
--- a/include/JSystem/JUtility/JUTVideo.h
+++ b/include/JSystem/JUtility/JUTVideo.h
@@ -25,8 +25,8 @@ public:
/* 802E5144 */ static void postRetraceProc(u32);
/* 802E50BC */ static void drawDoneCallback();
- u32 getFbWidth() const { return this->mRenderObj->fb_width; }
- u32 getEfbHeight() const { return this->mRenderObj->efb_height; }
+ u32 getFbWidth() const { return mRenderObj->fb_width; }
+ u32 getEfbHeight() const { return mRenderObj->efb_height; }
static JUTVideo* getManager() { return sManager; }
GXRenderModeObj* getRenderMode() const { return mRenderObj; }
diff --git a/libs/JSystem/JUtility/JUTDbPrint.cpp b/libs/JSystem/JUtility/JUTDbPrint.cpp
index e8063ab699..c56bbc357f 100644
--- a/libs/JSystem/JUtility/JUTDbPrint.cpp
+++ b/libs/JSystem/JUtility/JUTDbPrint.cpp
@@ -4,22 +4,22 @@
//
#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 "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 {
public:
- virtual ~J2DGrafContext() {};
+ virtual ~J2DGrafContext(){};
};
class J2DOrthoGraph : public J2DGrafContext {
public:
char fake[0xd0];
J2DOrthoGraph(f32, f32, f32, f32, f32, f32);
- virtual ~J2DOrthoGraph() {};
+ virtual ~J2DOrthoGraph(){};
void setPort();
};
@@ -28,7 +28,7 @@ JUTDbPrint::JUTDbPrint(JUTFont* pFont, JKRHeap* pHeap) {
mFont = pFont;
mFirst = NULL;
mHeap = pHeap != NULL ? pHeap : JKRHeap::getCurrentHeap();
- mColor.set(255,255,255,255);
+ mColor.set(255, 255, 255, 255);
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
*/
-JUTFont *JUTDbPrint::changeFont(JUTFont* pFont) {
+JUTFont* JUTDbPrint::changeFont(JUTFont* pFont) {
JUTFont* old = mFont;
if (pFont != NULL) {
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 */
-void JUTDbPrint::enter(int param_0, int param_1, int param_2, char const* param_3,
- int param_4) {
+void JUTDbPrint::enter(int param_0, int param_1, int param_2, char const* param_3, int param_4) {
if (param_4 > 0) {
unk_print* ptr = static_cast<unk_print*>(JKRAllocFromHeap(mHeap, param_4 + 0x10, -4));
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_0x0A = param_4;
strcpy(ptr->unk_0x0C, param_3);
- ptr->mNext = this->mFirst;
- this->mFirst = ptr;
+ ptr->mNext = mFirst;
+ mFirst = ptr;
}
}
}
@@ -89,7 +88,7 @@ void JUTDbPrint::flush(int param_0, int param_1, int param_2, int param_3) {
g.setPort();
mFont->setGX();
mFont->setCharColor(mColor);
-
+
while (cur != NULL) {
if (mVisible) {
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 */
void JUTDbPrint::drawString(int param_0, int param_1, int param_2, u8 const* param_3) {
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 */
diff --git a/tools/tp.py b/tools/tp.py
index ce9d0bdab3..bc94d11ea2 100644
--- a/tools/tp.py
+++ b/tools/tp.py
@@ -1046,7 +1046,7 @@ def find_used_asm_files(non_matching, use_progress_bar=True):
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)