From a91ffaaa41705f5db86f114817df88389b197c6f Mon Sep 17 00:00:00 2001 From: DizzyEggg Date: Sat, 2 Sep 2017 20:08:08 +0200 Subject: [PATCH] clean up decompress header --- include/decompress.h | 12 ++++++++++++ src/decompress.c | 6 +++--- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/include/decompress.h b/include/decompress.h index 407866667..6c925f730 100644 --- a/include/decompress.h +++ b/include/decompress.h @@ -5,12 +5,24 @@ void LZDecompressWram(const void *src, void *dest); void LZDecompressVram(const void *src, void *dest); + u16 LoadCompressedObjectPic(const struct CompressedSpriteSheet *src); void LoadCompressedObjectPicOverrideBuffer(const struct CompressedSpriteSheet *src, void *buffer); +bool8 LoadCompressedObjectPicUsingHeap(struct CompressedSpriteSheet* src); + void LoadCompressedObjectPalette(const struct CompressedSpritePalette *src); void LoadCompressedObjectPaletteOverrideBuffer(const struct CompressedSpritePalette *a, void *buffer); +bool8 LoadCompressedObjectPaletteUsingHeap(const struct CompressedSpritePalette *src); + void DecompressPicFromTable(const struct CompressedSpriteSheet *src, void* buffer, s32 species); +void DecompressPicFromTable_2(const struct CompressedSpriteSheet *src, void* buffer, s32 species); +void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species); + void HandleLoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); +void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); +void HandleLoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality); + +void LoadSpecialPokePic(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); void LoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic); diff --git a/src/decompress.c b/src/decompress.c index 4a5c7a297..befdbaba2 100644 --- a/src/decompress.c +++ b/src/decompress.c @@ -545,7 +545,7 @@ void HandleLoadSpecialPokePic_2(const struct CompressedSpriteSheet *src, void *d LoadSpecialPokePic_2(src, dest, species, personality, isFrontPic); } -void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species) // a copy of DecompressPicFromTable +void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void* buffer, s32 species) { if (species > SPECIES_EGG) LZ77UnCompWram(gMonFrontPicTable[0].data, buffer); @@ -553,7 +553,7 @@ void DecompressPicFromTable_DontHandleDeoxys(const struct CompressedSpriteSheet LZ77UnCompWram(src->data, buffer); } -void HandleLoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality) // a copy of HandleLoadSpecialPokePic +void HandleLoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality) { bool8 isFrontPic; @@ -565,7 +565,7 @@ void HandleLoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteShee LoadSpecialPokePic_DontHandleDeoxys(src, dest, species, personality, isFrontPic); } -void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic) // a copy of LoadSpecialPokePic +void LoadSpecialPokePic_DontHandleDeoxys(const struct CompressedSpriteSheet *src, void *dest, s32 species, u32 personality, bool8 isFrontPic) { if (species == SPECIES_UNOWN) {