hekate/nyx: gfx: add text color defines
And reduce code size when using W/EPRINTF macros
This commit is contained in:
@@ -35,7 +35,7 @@ extern hekate_config h_cfg;
|
||||
|
||||
#define EHPRINTFARGS(text, args...) \
|
||||
({ gfx_con.mute = false; \
|
||||
gfx_printf("%k"text"%k\n", 0xFFFF0000, args, 0xFFCCCCCC); })
|
||||
gfx_printf("%k"text"%k\n", TXT_CLR_ERROR, args, TXT_CLR_DEFAULT); })
|
||||
|
||||
#define PKG2_LOAD_ADDR 0xA9800000
|
||||
|
||||
@@ -145,7 +145,7 @@ const u8 package2_keyseed[SE_KEY_128_SIZE] =
|
||||
static void _hos_crit_error(const char *text)
|
||||
{
|
||||
gfx_con.mute = false;
|
||||
gfx_printf("%k%s%k\n", 0xFFFF0000, text, 0xFFCCCCCC);
|
||||
gfx_printf("%k%s%k\n", TXT_CLR_ERROR, text, TXT_CLR_DEFAULT);
|
||||
}
|
||||
|
||||
static void _se_lock(bool lock_se)
|
||||
|
||||
@@ -301,7 +301,7 @@ void pkg1_secmon_patch(void *hos_ctxt, u32 secmon_base, bool t210b01)
|
||||
return;
|
||||
|
||||
// Patch Secmon.
|
||||
gfx_printf("%kPatching Secure Monitor%k\n", 0xFFFFBA00, 0xFFCCCCCC);
|
||||
gfx_printf("%kPatching Secure Monitor%k\n", TXT_CLR_ORANGE, TXT_CLR_DEFAULT);
|
||||
for (u32 i = 0; secmon_patchset[i].off != 0xFFFFFFFF; i++)
|
||||
*(vu32 *)(secmon_base + secmon_patchset[i].off) = secmon_patchset[i].val;
|
||||
}
|
||||
@@ -324,7 +324,7 @@ void pkg1_warmboot_patch(void *hos_ctxt)
|
||||
warmboot_patchset = _warmboot_4_patchset;
|
||||
break;
|
||||
}
|
||||
gfx_printf("%kPatching Warmboot%k\n", 0xFFFFBA00, 0xFFCCCCCC);
|
||||
gfx_printf("%kPatching Warmboot%k\n", TXT_CLR_ORANGE, TXT_CLR_DEFAULT);
|
||||
for (u32 i = 0; warmboot_patchset[i].off != 0xFFFFFFFF; i++)
|
||||
*(vu32 *)(ctxt->pkg1_id->warmboot_base + warmboot_patchset[i].off) = warmboot_patchset[i].val;
|
||||
}
|
||||
|
||||
@@ -335,7 +335,7 @@ int pkg2_decompress_kip(pkg2_kip1_info_t* ki, u32 sectsToDecomp)
|
||||
if (blz_uncompress_srcdest(srcDataPtr, compSize, dstDataPtr, outputSize) == 0)
|
||||
{
|
||||
gfx_con.mute = false;
|
||||
gfx_printf("%kERROR decomping sect %d of '%s'!%k\n", 0xFFFF0000, sectIdx, (char*)hdr.name, 0xFFCCCCCC);
|
||||
gfx_printf("%kERROR decomping sect %d of '%s'!%k\n", TXT_CLR_ERROR, sectIdx, (char*)hdr.name, TXT_CLR_DEFAULT);
|
||||
free(newKip);
|
||||
|
||||
return 1;
|
||||
@@ -592,7 +592,7 @@ const char* pkg2_patch_kips(link_t *info, char* patchNames)
|
||||
if (!currPatch->length)
|
||||
{
|
||||
gfx_con.mute = false;
|
||||
gfx_printf("%kPatch empty!%k\n", 0xFFFF0000, 0xFFCCCCCC);
|
||||
gfx_printf("%kPatch empty!%k\n", TXT_CLR_ERROR, TXT_CLR_DEFAULT);
|
||||
return currPatchset->name; // MUST stop here as it's not probably intended.
|
||||
}
|
||||
|
||||
@@ -602,7 +602,7 @@ const char* pkg2_patch_kips(link_t *info, char* patchNames)
|
||||
(memcmp(&kipSectData[currOffset], currPatch->dstData, currPatch->length) != 0))
|
||||
{
|
||||
gfx_con.mute = false;
|
||||
gfx_printf("%kPatch mismatch at 0x%x!%k\n", 0xFFFF0000, currOffset, 0xFFCCCCCC);
|
||||
gfx_printf("%kPatch mismatch at 0x%x!%k\n", TXT_CLR_ERROR, currOffset, TXT_CLR_DEFAULT);
|
||||
return currPatchset->name; // MUST stop here as kip is likely corrupt.
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user