1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2024-12-26 14:46:16 +00:00

Match retail logutils.c and z_locale.c (#1699)

* Match retail logutils.c and z_locale.c

* Update src/boot/logutils.c

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>

---------

Co-authored-by: engineer124 <47598039+engineer124@users.noreply.github.com>
This commit is contained in:
cadmic 2024-02-02 10:45:02 -08:00 committed by GitHub
parent a337416530
commit 8c909c5d98
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 9 additions and 10 deletions

View file

@ -33,9 +33,6 @@ void Yaz0_DecompressImpl(u8* src, u8* dst);
void Yaz0_Decompress(uintptr_t romStart, u8* dst, size_t size);
void Locale_Init(void);
void Locale_ResetRegion(void);
u32 func_80001F48(void);
u32 func_80001F8C(void);
u32 Locale_IsRegionNative(void);
#if OOT_DEBUG
void isPrintfInit(void);
#endif
@ -52,16 +49,12 @@ void StackCheck_Cleanup(StackEntry* entry);
u32 StackCheck_GetState(StackEntry* entry);
u32 StackCheck_CheckAll(void);
u32 StackCheck_Check(StackEntry* entry);
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min,
const char* maxName, f32 max);
s32 LogUtils_CheckIntRange(const char* exp, s32 line, const char* valueName, s32 value, const char* minName, s32 min,
const char* maxName, s32 max);
#if OOT_DEBUG
void LogUtils_LogHexDump(void* ptr, s32 size0);
void LogUtils_LogPointer(s32 value, u32 max, void* ptr, const char* name, const char* file, s32 line);
void LogUtils_CheckBoundary(const char* name, s32 value, s32 unk, const char* file, s32 line);
void LogUtils_CheckNullPointer(const char* exp, void* ptr, const char* file, s32 line);
void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s32 line);
void LogUtils_LogThreadId(const char* name, s32 line);
#endif
void LogUtils_HungupThread(const char* name, s32 line);
void LogUtils_ResetHungup(void);
void __osPiCreateAccessQueue(void);

View file

@ -1,6 +1,7 @@
#include "global.h"
#include "terminal.h"
#if OOT_DEBUG
f32 LogUtils_CheckFloatRange(const char* exp, s32 line, const char* valueName, f32 value, const char* minName, f32 min,
const char* maxName, f32 max) {
if (value < min || max < value) {
@ -99,9 +100,12 @@ void LogUtils_CheckValidPointer(const char* exp, void* ptr, const char* file, s3
void LogUtils_LogThreadId(const char* name, s32 line) {
PRINTF("<%d %s %d>", osGetThreadId(NULL), name, line);
}
#endif
void LogUtils_HungupThread(const char* name, s32 line) {
PRINTF("*** HungUp in thread %d, [%s:%d] ***\n", osGetThreadId(NULL), name, line);
OSId threadId = osGetThreadId(NULL);
PRINTF("*** HungUp in thread %d, [%s:%d] ***\n", threadId, name, line);
Fault_AddHungupAndCrash(name, line);
}

View file

@ -33,6 +33,7 @@ void Locale_ResetRegion(void) {
gCurrentRegion = REGION_NULL;
}
#if OOT_DEBUG
u32 func_80001F48(void) {
if (gCurrentRegion == REGION_NATIVE) {
return 0;
@ -61,3 +62,4 @@ u32 func_80001F8C(void) {
u32 Locale_IsRegionNative(void) {
return gCurrentRegion == REGION_NATIVE;
}
#endif