diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-11-30 14:23:42 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-11-30 15:23:42 -0700 |
| commit | a6e76c0841cae03cae0c0e6ac75c32f979043093 (patch) | |
| tree | 76b5f590c59c6abdf2c80d0a3d5c0ccb31ebd0fe /src/JSystem/JFramework/JFWDisplay.cpp | |
| parent | 434415337d268e405b09f6b72935a7e918e4cfe7 (diff) | |
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
Diffstat (limited to 'src/JSystem/JFramework/JFWDisplay.cpp')
| -rw-r--r-- | src/JSystem/JFramework/JFWDisplay.cpp | 46 |
1 files changed, 2 insertions, 44 deletions
diff --git a/src/JSystem/JFramework/JFWDisplay.cpp b/src/JSystem/JFramework/JFWDisplay.cpp index a42f21c60f..4d62a8f483 100644 --- a/src/JSystem/JFramework/JFWDisplay.cpp +++ b/src/JSystem/JFramework/JFWDisplay.cpp @@ -10,7 +10,6 @@ #include <dolphin/vi.h> #include "global.h" -/* 80272040-802720F8 26C980 00B8+00 1/1 0/0 0/0 .text ctor_subroutine__10JFWDisplayFb */ void JFWDisplay::ctor_subroutine(bool enableAlpha) { mEnableAlpha = enableAlpha; mClamp = GX_CLAMP_TOP | GX_CLAMP_BOTTOM; @@ -36,30 +35,24 @@ void JFWDisplay::ctor_subroutine(bool enableAlpha) { field_0x44 = 0; } -/* ############################################################################################## */ -/* 803C4020-803C4060 021140 0030+10 1/1 0/0 0/0 .data e_mtx */ -static Mtx e_mtx ALIGN_DECL(32) = { +static Mtx e_mtx ATTRIBUTE_ALIGN(32) = { {1.0f, 0.0f, 0.0f, 0.0f}, {0.0f, 1.0f, 0.0f, 0.0f}, {0.0f, 0.0f, 1.0f, 0.0f}, }; -/* 803C4060-803C40A0 021180 0040+00 1/1 0/0 0/0 .data clear_z_TX */ -static u8 clear_z_TX[64] ALIGN_DECL(32) = { +static u8 clear_z_TX[64] ATTRIBUTE_ALIGN(32) = { 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0x00, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, }; -/* 802720F8-80272160 26CA38 0068+00 1/1 0/0 0/0 .text - * __ct__10JFWDisplayFP7JKRHeapQ26JUTXfb10EXfbNumberb */ JFWDisplay::JFWDisplay(JKRHeap* p_heap, JUTXfb::EXfbNumber xfb_num, bool enableAlpha) { ctor_subroutine(enableAlpha); mXfbManager = JUTXfb::createManager(p_heap, xfb_num); } -/* 80272160-802721DC 26CAA0 007C+00 1/0 0/0 0/0 .text __dt__10JFWDisplayFv */ JFWDisplay::~JFWDisplay() { if (JUTVideo::getManager() != NULL) { waitBlanking(2); @@ -69,12 +62,8 @@ JFWDisplay::~JFWDisplay() { mXfbManager = NULL; } -/* ############################################################################################## */ -/* 804511C0-804511C4 0006C0 0004+00 2/2 40/40 1/1 .sbss sManager__10JFWDisplay */ JFWDisplay* JFWDisplay::sManager; -/* 802721DC-80272260 26CB1C 0084+00 0/0 1/1 0/0 .text - * createManager__10JFWDisplayFPC16_GXRenderModeObjP7JKRHeapQ26JUTXfb10EXfbNumberb */ JFWDisplay* JFWDisplay::createManager(_GXRenderModeObj const* p_rObj, JKRHeap* p_heap, JUTXfb::EXfbNumber xfb_num, bool enableAlpha) { if (p_rObj != NULL) { @@ -88,7 +77,6 @@ JFWDisplay* JFWDisplay::createManager(_GXRenderModeObj const* p_rObj, JKRHeap* p return sManager; } -/* 80272260-802722B8 26CBA0 0058+00 2/2 0/0 0/0 .text callDirectDraw__Fv */ static void callDirectDraw() { JUTChangeFrameBuffer(JUTXfb::getManager()->getDrawingXfb(), JUTVideo::getManager()->getEfbHeight(), @@ -96,7 +84,6 @@ static void callDirectDraw() { JUTAssertion::flushMessage(); } -/* 802722B8-802723AC 26CBF8 00F4+00 3/3 0/0 0/0 .text prepareCopyDisp__10JFWDisplayFv */ void JFWDisplay::prepareCopyDisp() { u16 width = JUTVideo::getManager()->getFbWidth(); u16 height = JUTVideo::getManager()->getEfbHeight(); @@ -119,8 +106,6 @@ void JFWDisplay::prepareCopyDisp() { } } -/* 802723AC-802723F4 26CCEC 0048+00 1/1 0/0 0/0 .text drawendXfb_single__10JFWDisplayFv - */ void JFWDisplay::drawendXfb_single() { JUTXfb* manager = JUTXfb::getManager(); if (manager->getDrawingXfbIndex() >= 0) { @@ -131,8 +116,6 @@ void JFWDisplay::drawendXfb_single() { } } -/* 802723F4-802724FC 26CD34 0108+00 1/1 0/0 0/0 .text exchangeXfb_double__10JFWDisplayFv - */ void JFWDisplay::exchangeXfb_double() { JUTXfb* xfbMng = JUTXfb::getManager(); @@ -167,8 +150,6 @@ void JFWDisplay::exchangeXfb_double() { } } -/* 802724FC-80272574 26CE3C 0078+00 1/1 0/0 0/0 .text exchangeXfb_triple__10JFWDisplayFv - */ void JFWDisplay::exchangeXfb_triple() { JUTXfb* xfbMng = JUTXfb::getManager(); @@ -187,7 +168,6 @@ void JFWDisplay::exchangeXfb_triple() { xfbMng->setDrawingXfbIndex(drawing_idx); } -/* 80272574-802725F8 26CEB4 0084+00 1/1 0/0 0/0 .text copyXfb_triple__10JFWDisplayFv */ void JFWDisplay::copyXfb_triple() { JUTXfb* xfbMng = JUTXfb::getManager(); @@ -201,7 +181,6 @@ void JFWDisplay::copyXfb_triple() { } } -/* 802725F8-8027268C 26CF38 0094+00 1/1 0/0 0/0 .text preGX__10JFWDisplayFv */ void JFWDisplay::preGX() { GXInvalidateTexAll(); GXInvalidateVtxCache(); @@ -220,7 +199,6 @@ void JFWDisplay::preGX() { } } -/* 8027268C-80272798 26CFCC 010C+00 1/1 0/0 0/0 .text endGX__10JFWDisplayFv */ void JFWDisplay::endGX() { f32 width = JUTVideo::getManager()->getFbWidth(); f32 height = JUTVideo::getManager()->getEfbHeight(); @@ -248,7 +226,6 @@ void JFWDisplay::endGX() { GXFlush(); } -/* 80272798-80272A04 26D0D8 026C+00 1/0 0/0 0/0 .text beginRender__10JFWDisplayFv */ void JFWDisplay::beginRender() { if (field_0x40) { JUTProcBar::getManager()->wholeLoopEnd(); @@ -309,7 +286,6 @@ void JFWDisplay::beginRender() { } } -/* 80272A04-80272AB0 26D344 00AC+00 1/0 0/0 0/0 .text endRender__10JFWDisplayFv */ void JFWDisplay::endRender() { endGX(); @@ -330,7 +306,6 @@ void JFWDisplay::endRender() { calcCombinationRatio(); } -/* 80272AB0-80272C60 26D3F0 01B0+00 1/0 0/0 0/0 .text endFrame__10JFWDisplayFv */ void JFWDisplay::endFrame() { JUTProcBar::getManager()->cpuEnd(); @@ -363,14 +338,12 @@ void JFWDisplay::endFrame() { } } -/* 80272C60-80272CB0 26D5A0 0050+00 1/1 1/1 0/0 .text waitBlanking__10JFWDisplayFi */ void JFWDisplay::waitBlanking(int param_0) { while (param_0-- > 0) { waitForTick(mTickRate, mFrameRate); } } -/* 80272CB0-80272DD0 26D5F0 0120+00 2/2 0/0 0/0 .text waitForTick__FUlUs */ static void waitForTick(u32 p1, u16 p2) { if (p1 != 0) { static OSTime nextTick = OSGetTime(); @@ -394,18 +367,14 @@ static void waitForTick(u32 p1, u16 p2) { } } -/* 80430FE4-80430FF0 05DD04 000C+00 4/4 0/0 0/0 .bss sList__8JFWAlarm */ JSUList<JFWAlarm> JFWAlarm::sList(false); -/* 80272DD0-80272E10 26D710 0040+00 1/1 0/0 0/0 .text JFWThreadAlarmHandler__FP7OSAlarmP9OSContext - */ static void JFWThreadAlarmHandler(OSAlarm* p_alarm, OSContext* p_ctx) { JFWAlarm* alarm = static_cast<JFWAlarm*>(p_alarm); alarm->removeLink(); OSResumeThread(alarm->getThread()); } -/* 80272E10-80272EB8 26D750 00A8+00 1/1 0/0 0/0 .text threadSleep__10JFWDisplayFx */ void JFWDisplay::threadSleep(s64 time) { JFWAlarm alarm; alarm.createAlarm(); @@ -418,23 +387,18 @@ void JFWDisplay::threadSleep(s64 time) { OSRestoreInterrupts(status); } -/* ############################################################################################## */ -/* 80430FF0-80431010 05DD10 0020+00 2/2 0/0 0/0 .bss clear_z_tobj */ static GXTexObj clear_z_tobj; -/* 80272EB8-80272F2C 26D7F8 0074+00 1/1 0/0 0/0 .text clearEfb_init__10JFWDisplayFv */ void JFWDisplay::clearEfb_init() { GXInitTexObj(&clear_z_tobj, &clear_z_TX, 4, 4, GX_TF_Z24X8, GX_REPEAT, GX_REPEAT, GX_FALSE); GXInitTexObjLOD(&clear_z_tobj, GX_NEAR, GX_NEAR, 0.0f, 0.0f, 0.0f, GX_FALSE, GX_FALSE, GX_ANISO_1); } -/* 80272F2C-80272F58 26D86C 002C+00 1/1 0/0 0/0 .text clearEfb__10JFWDisplayFv */ void JFWDisplay::clearEfb() { clearEfb(mClearColor); } -/* 80272F58-80272F9C 26D898 0044+00 3/3 0/0 0/0 .text clearEfb__10JFWDisplayF8_GXColor */ void JFWDisplay::clearEfb(GXColor color) { int width = JUTVideo::getManager()->getFbWidth(); int height = JUTVideo::getManager()->getEfbHeight(); @@ -442,7 +406,6 @@ void JFWDisplay::clearEfb(GXColor color) { clearEfb(0, 0, width, height, color); } -/* 80272F9C-8027331C 26D8DC 0380+00 1/1 0/0 0/0 .text clearEfb__10JFWDisplayFiiii8_GXColor */ void JFWDisplay::clearEfb(int param_0, int param_1, int param_2, int param_3, GXColor color) { u16 width; u16 height; @@ -509,7 +472,6 @@ void JFWDisplay::clearEfb(int param_0, int param_1, int param_2, int param_3, GX } } -/* 8027331C-802733A8 26DC5C 008C+00 1/1 0/0 0/0 .text calcCombinationRatio__10JFWDisplayFv */ void JFWDisplay::calcCombinationRatio() { u32 vidInterval = JUTVideo::getVideoInterval(); s32 unk30 = field_0x30 * 2; @@ -528,7 +490,6 @@ void JFWDisplay::calcCombinationRatio() { } } -/* 802733A8-80273484 26DCE8 00DC+00 2/2 0/0 0/0 .text JFWDrawDoneAlarm__Fv */ static void JFWDrawDoneAlarm() { JFWAlarm alarm; s32 status = OSDisableInterrupts(); @@ -541,8 +502,6 @@ static void JFWDrawDoneAlarm() { OSRestoreInterrupts(status); } -/* 80273484-802734FC 26DDC4 0078+00 1/1 0/0 0/0 .text - * JFWGXAbortAlarmHandler__FP7OSAlarmP9OSContext */ static void JFWGXAbortAlarmHandler(OSAlarm* param_0, OSContext* param_1) { diagnoseGpHang(); GXAbortFrame(); @@ -558,7 +517,6 @@ static void JFWGXAbortAlarmHandler(OSAlarm* param_0, OSContext* param_1) { GXSetDrawDone(); } -/* 802734FC-802736DC 26DE3C 01E0+00 1/1 0/0 0/0 .text diagnoseGpHang__Fv */ static void diagnoseGpHang() { u32 sp28; u32 sp24; |
