mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-07-27 14:39:20 -04:00
Big cast cleanup (#3076)
* Big cast cleanup * fix for name conflict * rename header * rename cast macros * fix rename mistake --------- Co-authored-by: roeming <roeming@users.noreply.github.com>
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include "JSystem/JKernel/JKRAram.h"
|
||||
#include <dolphin/gx.h>
|
||||
#include <stdint.h>
|
||||
#include "angle_utils.h"
|
||||
|
||||
JUTCacheFont::JUTCacheFont(ResFONT const* p_fontRes, u32 cacheSize, JKRHeap* p_heap) {
|
||||
initialize_state();
|
||||
@@ -343,11 +344,7 @@ void JUTCacheFont::getGlyphFromAram(JUTCacheFont::TGlyphCacheInfo* param_0,
|
||||
prepend(pGylphCacheInfo);
|
||||
int iVar3 = pGylphCacheInfo->field_0x16 * pGylphCacheInfo->field_0x18;
|
||||
int iVar2 = *r30 / iVar3;
|
||||
#if PLATFORM_SHIELD
|
||||
pGylphCacheInfo->field_0x8 += (u16)(iVar2 * iVar3);
|
||||
#else
|
||||
pGylphCacheInfo->field_0x8 += iVar2 * iVar3;
|
||||
#endif
|
||||
U16_ADD_2(pGylphCacheInfo->field_0x8, iVar2 * iVar3);
|
||||
u16 local_30 = pGylphCacheInfo->field_0x8 + iVar3 - 1;
|
||||
pGylphCacheInfo->field_0xa = pGylphCacheInfo->field_0xa < local_30 ? pGylphCacheInfo->field_0xa : local_30;
|
||||
*param_3 = iVar2;
|
||||
|
||||
@@ -4,6 +4,7 @@
|
||||
#include <cstdio>
|
||||
#include <dolphin/os.h>
|
||||
#include "global.h"
|
||||
#include "angle_utils.h"
|
||||
|
||||
JUTDirectPrint* JUTDirectPrint::sDirectPrint;
|
||||
|
||||
@@ -160,11 +161,7 @@ void JUTDirectPrint::printSub(u16 position_x, u16 position_y, char const* format
|
||||
for (; 0 < buffer_length; buffer_length--, ptr++) {
|
||||
int codepoint = sAsciiTable[*ptr & 0x7f];
|
||||
if (codepoint == 0xfe) {
|
||||
#if PLATFORM_SHIELD
|
||||
position_y += (u16)7;
|
||||
#else
|
||||
position_y += 7;
|
||||
#endif
|
||||
U16_ADD_2(position_y, 7);
|
||||
position_x = x;
|
||||
} else if (codepoint == 0xfd) {
|
||||
position_x = position_x + 0x30 - ((position_x - x + 0x2f) % 0x30);
|
||||
@@ -172,11 +169,7 @@ void JUTDirectPrint::printSub(u16 position_x, u16 position_y, char const* format
|
||||
if (codepoint != 0xff) {
|
||||
drawChar(position_x, position_y, codepoint);
|
||||
}
|
||||
#if PLATFORM_SHIELD
|
||||
position_x += (u16)6;
|
||||
#else
|
||||
position_x += 6;
|
||||
#endif
|
||||
U16_ADD_2(position_x, 6);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user