From 57f3daf213242f2455957967861d9daf69bb18a5 Mon Sep 17 00:00:00 2001 From: dbalatoni13 <40299962+dbalatoni13@users.noreply.github.com> Date: Wed, 16 Apr 2025 03:27:26 +0200 Subject: [PATCH] Minor tweaks --- src/game/sprput.c | 7 ++++++- src/game/window.c | 3 --- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/game/sprput.c b/src/game/sprput.c index 8fb011d4..0bd57167 100644 --- a/src/game/sprput.c +++ b/src/game/sprput.c @@ -202,12 +202,18 @@ void HuSprTexLoad(AnimData *anim, short bmp, short slot, GXTexWrapMode wrap_s, G case ANIM_BMP_C8: GXInitTlutObj(&tlut_obj, bmp_ptr->palData, GX_TL_RGB5A3, bmp_ptr->palNum); GXLoadTlut(&tlut_obj, slot); +#ifdef TARGET_PC + GXDestroyTlutObj(&tlut_obj); +#endif GXInitTexObjCI(&tex_obj,bmp_ptr->data, sizeX, sizeY, GX_TF_C8, wrap_s, wrap_t, GX_FALSE, slot); break; case ANIM_BMP_C4: GXInitTlutObj(&tlut_obj, bmp_ptr->palData, GX_TL_RGB5A3, bmp_ptr->palNum); GXLoadTlut(&tlut_obj, slot); +#ifdef TARGET_PC + GXDestroyTlutObj(&tlut_obj); +#endif GXInitTexObjCI(&tex_obj,bmp_ptr->data, sizeX, sizeY, GX_TF_C4, wrap_s, wrap_t, GX_FALSE, slot); break; @@ -242,7 +248,6 @@ void HuSprTexLoad(AnimData *anim, short bmp, short slot, GXTexWrapMode wrap_s, G GXLoadTexObj(&tex_obj, slot); #ifdef TARGET_PC GXDestroyTexObj(&tex_obj); - GXDestroyTlutObj(&tlut_obj); #endif } diff --git a/src/game/window.c b/src/game/window.c index 136b0bfa..848327db 100644 --- a/src/game/window.c +++ b/src/game/window.c @@ -1845,8 +1845,6 @@ s16 HuWinKeyWaitNumGet(u32 mess) { s16 wait_num; u8 *mess_data; -#ifdef __MWERKS__ - // TODO PC if (mess > 0x80000000) { mess_data = (u8 *)mess; @@ -1859,7 +1857,6 @@ s16 HuWinKeyWaitNumGet(u32 mess) wait_num++; } } -#endif return wait_num; }