From 252c5daba7a1517f535aefac068e69b22e7b8d7f Mon Sep 17 00:00:00 2001 From: jdflyer Date: Mon, 17 Jan 2022 20:19:43 -0700 Subject: [PATCH] Formatting fixes --- Makefile | 8 ++++++++ include/DynamicLink.h | 29 +++++++++++++++-------------- include/d/map/d_map_path.h | 10 +++++----- include/d/map/d_map_path_dmap.h | 2 +- src/DynamicLink.cpp | 2 +- src/d/map/d_map_path_dmap.cpp | 2 +- 6 files changed, 31 insertions(+), 22 deletions(-) diff --git a/Makefile b/Makefile index fa8b99b94d8..5d5d377d5f6 100644 --- a/Makefile +++ b/Makefile @@ -113,8 +113,16 @@ clean: rm -f -d -r $(BUILD_DIR)/src rm -f $(ELF) rm -f $(DOL) + rm -f $(ELF_SHIFT) + rm -f $(DOL_SHIFT) rm -f $(BUILD_DIR)/*.a +clean_game: + rm -r -f -d $(TARGET)/game + +clean_assets: + rm -r -f -d game + clean_all: rm -f -d -r build diff --git a/include/DynamicLink.h b/include/DynamicLink.h index 633ba0abf8f..638eb619375 100644 --- a/include/DynamicLink.h +++ b/include/DynamicLink.h @@ -7,12 +7,13 @@ #include "JSystem/JKernel/JKRFileCache.h" struct DynamicModuleControlBase { - u16 mLinkCount; //0x0 - u16 mDoLinkCount; //0x2 - DynamicModuleControlBase* mPrev; //0x4 - DynamicModuleControlBase* mNext; //0x8 + /* 0x00 */u16 mLinkCount; + /* 0x02 */u16 mDoLinkCount; + /* 0x04 */DynamicModuleControlBase* mPrev; + /* 0x08 */DynamicModuleControlBase* mNext; - /* 802621CC */ virtual ~DynamicModuleControlBase(); //0xC + /* 0x0C */ /*vtable*/ + /* 802621CC */ virtual ~DynamicModuleControlBase(); /* 800188DC */ virtual const char* getModuleName() const; /* 80263210 */ virtual int getModuleSize() const; /* 80263200 */ virtual const char* getModuleTypeString() const; @@ -54,15 +55,15 @@ struct DynamicModuleControl : DynamicModuleControlBase { /* 8026275C */ bool initialize(); /* 80262794 */ static void* callback(void*); - OSModuleInfo* mModule; //0x10 - void* mBss; //0x14 - u32 unk_24; //0x18 - const char* mName; //0x1c - u8 mResourceType; //0x20 - u8 unk_33; //0x21 - u16 mChecksum; //0x22 - s32 mSize; //0x24 - mDoDvdThd_callback_c* mAsyncLoadCallback; //0x28 + /* 0x10 */OSModuleInfo* mModule; + /* 0x14 */void* mBss; + /* 0x18 */u32 unk_24; + /* 0x1c */const char* mName; + /* 0x20 */u8 mResourceType; + /* 0x21 */u8 unk_33; + /* 0x22 */u16 mChecksum; + /* 0x24 */s32 mSize; + /* 0x28 */mDoDvdThd_callback_c* mAsyncLoadCallback; static u32 sAllocBytes; static JKRArchive* sArchive; diff --git a/include/d/map/d_map_path.h b/include/d/map/d_map_path.h index e1efd518f8e..6aadaabc0c4 100644 --- a/include/d/map/d_map_path.h +++ b/include/d/map/d_map_path.h @@ -7,11 +7,11 @@ class dDrawPath_c : public dDlst_base_c { public: struct line_class { - /*0x0*/ u8 unk0; - /*0x1*/ u8 unk1; - /*0x2*/ u8 unk2; - /*0x3*/ u8 unk3; - /*0x4*/ u16* unk4; + /* 0x00 */ u8 unk0; + /* 0x01 */ u8 unk1; + /* 0x02 */ u8 unk2; + /* 0x03 */ u8 unk3; + /* 0x04 */ u16* unk4; }; struct poly_class {}; diff --git a/include/d/map/d_map_path_dmap.h b/include/d/map/d_map_path_dmap.h index d556a2f6721..b80b343860c 100644 --- a/include/d/map/d_map_path_dmap.h +++ b/include/d/map/d_map_path_dmap.h @@ -78,7 +78,7 @@ public: /* 8003FF14 */ virtual void preDrawPath(); /* 8003FFC4 */ virtual void postDrawPath(); /* 800402C0 */ virtual void isDrawPath(); - /* 8003FE4C */ virtual void getBackColor() const; + /* 8003FE4C */ virtual GXColor* getBackColor() const; /* 800402E0 */ virtual bool getFirstDrawLayerNo(); /* 800402E8 */ virtual void getNextDrawLayerNo(int); /* 800409E0 */ virtual void isDrawIconSingle(dTres_c::data_s const*, int, int, bool, bool, diff --git a/src/DynamicLink.cpp b/src/DynamicLink.cpp index a4ae041f7ed..8c505b9a12c 100644 --- a/src/DynamicLink.cpp +++ b/src/DynamicLink.cpp @@ -669,7 +669,7 @@ extern "C" void ModuleUnresolved() { OSReport_Error("Address: Back Chain LR Save\n"); u32 i = 0; u32* stackPtr = (u32*)OSGetStackPointer(); - while(stackPtr!=NULL&&(u32)stackPtr!=0xFFFFFFFF&&i++<0x10) { + while((stackPtr != NULL) && ((u32)stackPtr != 0xFFFFFFFF) && (i++ < 0x10)) { OSReport_Error("0x%08x: 0x%08x 0x%08x\n",stackPtr,*stackPtr,*(stackPtr+1)); stackPtr = (u32*)*stackPtr; } diff --git a/src/d/map/d_map_path_dmap.cpp b/src/d/map/d_map_path_dmap.cpp index 9ff7bf674f4..45e5aa933bd 100644 --- a/src/d/map/d_map_path_dmap.cpp +++ b/src/d/map/d_map_path_dmap.cpp @@ -635,7 +635,7 @@ SECTION_SDATA2 static u8 l_mapBaseColor[4] = { #pragma push #pragma optimization_level 0 #pragma optimizewithasm off -asm void renderingDAmap_c::getBackColor() const { +asm GXColor* renderingDAmap_c::getBackColor() const { nofralloc #include "asm/d/map/d_map_path_dmap/getBackColor__16renderingDAmap_cCFv.s" }