From 80b9c23d0af9cdde79fa2cd6a539f7e1a144d96d Mon Sep 17 00:00:00 2001 From: Raymond Dodge Date: Sun, 6 Jul 2025 13:49:47 -0400 Subject: [PATCH] Fix RL compressed data alignment `RLUnComp`, like `LZ77UnComp`, expects the source data to be word-aligned. So, to mirror how lz-compressed data is defined as `u32[]` to enforce word-alignment, this changes rl-compressed data to be defined as `u32[]` to enforce word-alignment. --- include/gba/syscall.h | 4 ++-- src/contest_painting.c | 26 +++++++++++++------------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/include/gba/syscall.h b/include/gba/syscall.h index c922084d5f..50f5781988 100644 --- a/include/gba/syscall.h +++ b/include/gba/syscall.h @@ -61,9 +61,9 @@ void LZ77UnCompWram(const u32 *src, void *dest); void LZ77UnCompVram(const u32 *src, void *dest); -void RLUnCompWram(const void *src, void *dest); +void RLUnCompWram(const u32 *src, void *dest); -void RLUnCompVram(const void *src, void *dest); +void RLUnCompVram(const u32 *src, void *dest); int MultiBoot(struct MultiBootParam *mp); diff --git a/src/contest_painting.c b/src/contest_painting.c index c72d0dc6af..e12fa4c4d7 100644 --- a/src/contest_painting.c +++ b/src/contest_painting.c @@ -69,19 +69,19 @@ extern const u8 gContestPaintingTough1[]; extern const u8 gContestPaintingTough2[]; extern const u8 gContestPaintingTough3[]; -static const u16 sPictureFramePalettes[] = INCBIN_U16("graphics/picture_frame/bg.gbapal"); -static const u8 sPictureFrameTiles_Cool[] = INCBIN_U8("graphics/picture_frame/cool.4bpp.rl"); -static const u8 sPictureFrameTiles_Beauty[] = INCBIN_U8("graphics/picture_frame/beauty.4bpp.rl"); -static const u8 sPictureFrameTiles_Cute[] = INCBIN_U8("graphics/picture_frame/cute.4bpp.rl"); -static const u8 sPictureFrameTiles_Smart[] = INCBIN_U8("graphics/picture_frame/smart.4bpp.rl"); -static const u8 sPictureFrameTiles_Tough[] = INCBIN_U8("graphics/picture_frame/tough.4bpp.rl"); -static const u8 sPictureFrameTiles_HallLobby[] = INCBIN_U8("graphics/picture_frame/lobby.4bpp.rl"); -static const u8 sPictureFrameTilemap_Cool[] = INCBIN_U8("graphics/picture_frame/cool_map.bin.rl"); -static const u8 sPictureFrameTilemap_Beauty[] = INCBIN_U8("graphics/picture_frame/beauty_map.bin.rl"); -static const u8 sPictureFrameTilemap_Cute[] = INCBIN_U8("graphics/picture_frame/cute_map.bin.rl"); -static const u8 sPictureFrameTilemap_Smart[] = INCBIN_U8("graphics/picture_frame/smart_map.bin.rl"); -static const u8 sPictureFrameTilemap_Tough[] = INCBIN_U8("graphics/picture_frame/tough_map.bin.rl"); -static const u8 sPictureFrameTilemap_HallLobby[] = INCBIN_U8("graphics/picture_frame/lobby_map.bin.rl"); +static const u16 sPictureFramePalettes[] = INCBIN_U16("graphics/picture_frame/bg.gbapal"); +static const u32 sPictureFrameTiles_Cool[] = INCBIN_U32("graphics/picture_frame/cool.4bpp.rl"); +static const u32 sPictureFrameTiles_Beauty[] = INCBIN_U32("graphics/picture_frame/beauty.4bpp.rl"); +static const u32 sPictureFrameTiles_Cute[] = INCBIN_U32("graphics/picture_frame/cute.4bpp.rl"); +static const u32 sPictureFrameTiles_Smart[] = INCBIN_U32("graphics/picture_frame/smart.4bpp.rl"); +static const u32 sPictureFrameTiles_Tough[] = INCBIN_U32("graphics/picture_frame/tough.4bpp.rl"); +static const u32 sPictureFrameTiles_HallLobby[] = INCBIN_U32("graphics/picture_frame/lobby.4bpp.rl"); +static const u32 sPictureFrameTilemap_Cool[] = INCBIN_U32("graphics/picture_frame/cool_map.bin.rl"); +static const u32 sPictureFrameTilemap_Beauty[] = INCBIN_U32("graphics/picture_frame/beauty_map.bin.rl"); +static const u32 sPictureFrameTilemap_Cute[] = INCBIN_U32("graphics/picture_frame/cute_map.bin.rl"); +static const u32 sPictureFrameTilemap_Smart[] = INCBIN_U32("graphics/picture_frame/smart_map.bin.rl"); +static const u32 sPictureFrameTilemap_Tough[] = INCBIN_U32("graphics/picture_frame/tough_map.bin.rl"); +static const u32 sPictureFrameTilemap_HallLobby[] = INCBIN_U32("graphics/picture_frame/lobby_map.bin.rl"); static const u8 *const sContestCategoryNames_Unused[] = {