diff options
| author | TakaRikka <38417346+TakaRikka@users.noreply.github.com> | 2025-09-04 07:56:59 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-09-04 17:56:59 +0300 |
| commit | b45a089e15d79821b07be020db628e01a49b1fd2 (patch) | |
| tree | 948057548cc19b19d644bd4f300ca6434e6bff11 /src/JSystem/JUtility/JUTException.cpp | |
| parent | ee8b843996f4d888903f8c125b95ec1af376877e (diff) | |
some J3D/misc cleanup (#2628)
* some j3d cleanup
* begin using uintptr_t
* j3dgraphbase cleanup
* j3dgraphanimator cleanup
Diffstat (limited to 'src/JSystem/JUtility/JUTException.cpp')
| -rw-r--r-- | src/JSystem/JUtility/JUTException.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/src/JSystem/JUtility/JUTException.cpp b/src/JSystem/JUtility/JUTException.cpp index 7ea4a54e22..754b8277c4 100644 --- a/src/JSystem/JUtility/JUTException.cpp +++ b/src/JSystem/JUtility/JUTException.cpp @@ -11,6 +11,7 @@ #include <stdio.h> #include <stdlib.h> #include <dolphin.h> +#include <stdint.h> /* 803CC620-803CC640 029740 0020+00 3/3 0/0 0/0 .data sMessageQueue__12JUTException */ OSMessageQueue JUTException::sMessageQueue = {0}; @@ -191,7 +192,7 @@ void JUTException::panic_f_va(char const* file, int line, char const* format, va OSContext* current_context = OSGetCurrentContext(); memcpy(&context, current_context, sizeof(OSContext)); - sErrorManager->mStackPointer = (u32)OSGetStackPointer(); + sErrorManager->mStackPointer = (uintptr_t)OSGetStackPointer(); exCallbackObject.callback = sPreUserCallback; exCallbackObject.error = 0xFF; @@ -468,10 +469,10 @@ bool JUTException::showMapInfo_subroutine(u32 address, bool begin_with_newline) if (result == true) { result = queryMapAddress((char*)name_part, section_offset, section_id, &out_addr, &out_size, - out_line, ARRAY_SIZE(out_line), true, begin_with_newline); + out_line, ARRAY_SIZEU(out_line), true, begin_with_newline); } else { result = queryMapAddress(NULL, address, -1, &out_addr, &out_size, out_line, - ARRAY_SIZE(out_line), true, begin_with_newline); + ARRAY_SIZEU(out_line), true, begin_with_newline); } if (result == true) { @@ -826,7 +827,7 @@ void JUTException::createFB() { u32 pixel_count = width * height; u32 size = pixel_count * 2; - void* begin = (void*)ALIGN_PREV((u32)end - size, 32); + void* begin = (void*)ALIGN_PREV((uintptr_t)end - size, 32); void* object = (void*)ALIGN_PREV((s32)begin - sizeof(JUTExternalFB), 32); new (object) JUTExternalFB(renderMode, GX_GM_1_7, begin, size); @@ -934,7 +935,7 @@ bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 sectio char* src; char* dst; - if (file.fgets(buffer, ARRAY_SIZE(buffer)) < 0) + if (file.fgets(buffer, ARRAY_SIZEU(buffer)) < 0) break; if (buffer[0] != '.') continue; @@ -968,7 +969,7 @@ bool JUTException::queryMapAddress_single(char* mapPath, u32 address, s32 sectio int length; while (true) { - if ((length = file.fgets(buffer, ARRAY_SIZE(buffer))) <= 4) + if ((length = file.fgets(buffer, ARRAY_SIZEU(buffer))) <= 4) break; if ((length < 28)) continue; |
