diff --git a/payload/include/gflib/bg.h b/payload/include/gflib/bg.h index e6bf82b..b4f0573 100644 --- a/payload/include/gflib/bg.h +++ b/payload/include/gflib/bg.h @@ -10,7 +10,7 @@ extern bool8 gBgTilemapBufferTransferScheduled[]; void ResetGpuBuffers(void); void DoGpuUpdateAndTilemapTransfers(void); void CopyToBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, const u16 * src); -void CopyFromBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, u16 * dest); +void UNUSED CopyFromBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, u16 * dest); void SetBgTilemapBufferPaletteRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, u32 paletteNum); void SetBgTilemapBufferTileAt(u32 bgNum, u32 x, u32 y, u16 tileNum); void FillBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, u16 tileNum); diff --git a/payload/include/gflib/sound.h b/payload/include/gflib/sound.h index c14d9c6..19daaf8 100644 --- a/payload/include/gflib/sound.h +++ b/payload/include/gflib/sound.h @@ -7,13 +7,13 @@ bool32 EnableSoundVSync(bool32 enable); void InitSound(void); void PauseSoundVSync(void); void PlaySE(u16 song); -void StopSE(u16 song); -void StopAllSound(void); -bool8 sub_020093AC(void); -void FadeOutSE(u16 song, u16 _speed); -void SetSEVolume(u16 song, u16 volume); -void SetSETempo(u16 song, u16 tempo); -void SetSEPitch(u16 song, s16 pitch); +void UNUSED StopSE(u16 song); +void UNUSED StopAllSound(void); +bool8 UNUSED ReturnTrue(void); +void UNUSED FadeOutSE(u16 song, u16 _speed); +void UNUSED SetSEVolume(u16 song, u16 volume); +void UNUSED SetSETempo(u16 song, u16 tempo); +void UNUSED SetSEPitch(u16 song, s16 pitch); void SoundVSyncOff(void); void SoundVSyncOn(void); diff --git a/payload/include/gflib/text.h b/payload/include/gflib/text.h index d5a8f55..b57f057 100644 --- a/payload/include/gflib/text.h +++ b/payload/include/gflib/text.h @@ -40,7 +40,7 @@ void SetTextColor(struct Window * window, u8 fg, u8 shadow); void TextWindowNextLine(struct Window * window); void TextWindowSetXY(struct Window * window, u32 x, u32 y); void TextWindowShiftXY(struct Window * window, s32 dx, s32 dy); -void TextWindowPrintSimpleString(struct Window * window, const u8 * glyphs); +void UNUSED TextWindowPrintSimpleString(struct Window * window, const u8 * glyphs); void TextWindowFillTileBufferForText(struct Window * window); #ifdef __cplusplus diff --git a/payload/include/libpmagb/berry.h b/payload/include/libpmagb/berry.h index 450a8c2..7e449b2 100644 --- a/payload/include/libpmagb/berry.h +++ b/payload/include/libpmagb/berry.h @@ -1,7 +1,7 @@ #ifndef PMAGB_BERRY_H #define PMAGB_BERRY_H -u32 GetEnigmaBerryChecksum(struct EnigmaBerry * enigmaBerry); +u32 UNUSED GetEnigmaBerryChecksum(struct EnigmaBerry * enigmaBerry); bool32 IsEnigmaBerryValid(void); const struct Berry *GetBerryInfo(u8 berry); const u8 *ItemId_GetName(u16 itemId); diff --git a/payload/src/gflib/bg.c b/payload/src/gflib/bg.c index 21e3d29..e4be7d4 100644 --- a/payload/src/gflib/bg.c +++ b/payload/src/gflib/bg.c @@ -64,7 +64,7 @@ void CopyToBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 heig } } -void CopyFromBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, u16 * dest) +void UNUSED CopyFromBgTilemapBufferRect(u32 bgNum, u32 left, u32 top, s32 width, u32 height, u16 * dest) { s32 x; u16 * ptr = (void *)(gBGTilemapBuffers + (bgNum << 12) + (top << 6) + (left << 1)); diff --git a/payload/src/gflib/init.c b/payload/src/gflib/init.c index 082ad96..8e7f203 100644 --- a/payload/src/gflib/init.c +++ b/payload/src/gflib/init.c @@ -13,9 +13,9 @@ IntrFunc gIntrTable[14u]; u32 gVBlankCounter; IntrFunc gVBlankCallback; -void InitIntr(void); -void VBlankIntr(void); -void IntrDummy(void); +static void InitIntr(void); +static void VBlankIntr(void); +static void IntrDummy(void); #define SR_KEYS (A_BUTTON | B_BUTTON | SELECT_BUTTON | START_BUTTON) @@ -49,7 +49,7 @@ void DelayFrames(u32 frames) } } -void InitIntr(void) +static void InitIntr(void) { u32 i; @@ -80,7 +80,7 @@ void SetVBlankCallback(IntrFunc cb) REG_IME = imeBak; } -void VBlankIntr(void) +static void VBlankIntr(void) { if (EnableSoundVSync(0)) m4aSoundVSync(); @@ -97,7 +97,7 @@ void VBlankIntr(void) m4aSoundMain(); } -void IntrDummy(void) +static void IntrDummy(void) { } diff --git a/payload/src/gflib/sound.c b/payload/src/gflib/sound.c index 5da2b48..2979865 100644 --- a/payload/src/gflib/sound.c +++ b/payload/src/gflib/sound.c @@ -34,7 +34,7 @@ void PlaySE(u16 song) m4aMPlayImmInit(mPlayInfo); } -void StopSE(u16 song) +void UNUSED StopSE(u16 song) { struct MusicPlayerInfo * mPlayInfo; @@ -42,17 +42,17 @@ void StopSE(u16 song) m4aMPlayStop(mPlayInfo); } -void StopAllSound(void) +void UNUSED StopAllSound(void) { m4aMPlayAllStop(); } -bool8 sub_020093AC(void) +bool8 UNUSED ReturnTrue(void) { return TRUE; } -void FadeOutSE(u16 song, u16 _speed) +void UNUSED FadeOutSE(u16 song, u16 _speed) { struct MusicPlayerInfo * mPlayInfo; u16 speed = _speed >> 4; @@ -64,7 +64,7 @@ void FadeOutSE(u16 song, u16 _speed) m4aMPlayFadeOut(mPlayInfo, speed); } -void SetSEVolume(u16 song, u16 volume) +void UNUSED SetSEVolume(u16 song, u16 volume) { struct MusicPlayerInfo * mPlayInfo; @@ -72,7 +72,7 @@ void SetSEVolume(u16 song, u16 volume) m4aMPlayVolumeControl(mPlayInfo, 0xFF, volume); } -void SetSETempo(u16 song, u16 tempo) +void UNUSED SetSETempo(u16 song, u16 tempo) { struct MusicPlayerInfo * mPlayInfo; @@ -80,7 +80,7 @@ void SetSETempo(u16 song, u16 tempo) m4aMPlayTempoControl(mPlayInfo, tempo); } -void SetSEPitch(u16 song, s16 pitch) +void UNUSED SetSEPitch(u16 song, s16 pitch) { struct MusicPlayerInfo * mPlayInfo; diff --git a/payload/src/gflib/sprite.c b/payload/src/gflib/sprite.c index 23afe10..dda5f5d 100644 --- a/payload/src/gflib/sprite.c +++ b/payload/src/gflib/sprite.c @@ -11,7 +11,7 @@ struct OamBuffer static struct OamBuffer sOamBuffer; -void InsertSprite(struct Sprite * sprite1, struct Sprite * sprite2) +static void InsertSprite(struct Sprite * sprite1, struct Sprite * sprite2) { sprite2->next = sprite1->next; sprite2->prev = sprite1 - sSprites; @@ -38,7 +38,7 @@ struct Sprite * AddSprite(s32 x, s32 y, const struct Subsprites * subsprites) return newSprite; } -void BufferSpriteOAM(struct Sprite * sprite) +static void BufferSpriteOAM(struct Sprite * sprite) { u32 numSprites; struct OamData * oam; diff --git a/payload/src/gflib/text.c b/payload/src/gflib/text.c index e391d75..981e8d9 100644 --- a/payload/src/gflib/text.c +++ b/payload/src/gflib/text.c @@ -226,7 +226,7 @@ void TextWindowShiftXY(struct Window * window, s32 dx, s32 dy) window->currentY += dy; } -void TextWindowPrintSimpleString(struct Window * window, const u8 * glyphs) +void UNUSED TextWindowPrintSimpleString(struct Window * window, const u8 * glyphs) { while (*glyphs != 0) { diff --git a/payload/src/libpmagb/agb_rom.c b/payload/src/libpmagb/agb_rom.c index 54a7117..2484f20 100644 --- a/payload/src/libpmagb/agb_rom.c +++ b/payload/src/libpmagb/agb_rom.c @@ -19,7 +19,7 @@ u16 * gVarsPtr; u8 * gGiftRibbonsPtr; struct EnigmaBerry * gEnigmaBerryPtr; -u16 SaveRandom(void); +static u16 SaveRandom(void); void * gLastSaveBlockPtr; u8 gSaveBlockLoadRegions[0xE000]; @@ -137,14 +137,14 @@ void SaveBlocksInit(void) gPcItemsPtr = gSaveBlock1Ptr + gAgbPmRomParams->pcItemsOffset; } -u16 SaveRandom(void) +static u16 SaveRandom(void) { gSaveRngValue = gSaveRngValue * 2061 + 7; return gSaveRngValue; } -void * UpdateSaveBlockPtr_(u32 size) +void * UNUSED UpdateSaveBlockPtr_(u32 size) { return UpdateSaveBlockPtr(size); } diff --git a/payload/src/libpmagb/berry.c b/payload/src/libpmagb/berry.c index cc65fe3..4e40dbe 100644 --- a/payload/src/libpmagb/berry.c +++ b/payload/src/libpmagb/berry.c @@ -25,7 +25,7 @@ struct Item u8 secondaryId; }; -u32 GetEnigmaBerryChecksum(struct EnigmaBerry * enigmaBerry) +u32 UNUSED GetEnigmaBerryChecksum(struct EnigmaBerry * enigmaBerry) { u32 i, checksum; u8 * dest; diff --git a/payload/src/libpmagb/save.c b/payload/src/libpmagb/save.c index 9194e45..b6b6cce 100644 --- a/payload/src/libpmagb/save.c +++ b/payload/src/libpmagb/save.c @@ -77,7 +77,7 @@ struct { static u8 sWipeTries; static u32 gSaveValidStatus; -bool8 WipeFailedSectors(void); +static bool8 WipeFailedSectors(void); struct SaveBlockChunk sSaveBlockChunks[] = { SAVEBLOCK_CHUNK_FALSE_SIZE(gSaveBlock2Ptr, 0, 0x0004), @@ -433,7 +433,7 @@ static inline u32 TryWriteSector(u8 sectorNum, void * data) } } -u32 HandleWriteSector(u16 sectorId, const struct SaveBlockChunk * chunks) +static u32 HandleWriteSector(u16 sectorId, const struct SaveBlockChunk * chunks) { u16 i; u16 sector; @@ -505,7 +505,7 @@ u32 WriteSaveBlockChunks(void) return WriteSaveSectorOrSlot(0xFFFF, sSaveBlockChunks); } -u8 HandleReplaceSector(u16 sectorId, const struct SaveBlockChunk * chunks) +static u8 HandleReplaceSector(u16 sectorId, const struct SaveBlockChunk * chunks) { u16 i; u16 sector; @@ -575,7 +575,7 @@ u8 HandleReplaceSector(u16 sectorId, const struct SaveBlockChunk * chunks) } } -u8 WriteSectorSignatureByte(u16 sectorId, const struct SaveBlockChunk * chunks) +static u8 WriteSectorSignatureByte(u16 sectorId, const struct SaveBlockChunk * chunks) { u16 sector = sectorId + gLastWrittenSector - 1; @@ -597,7 +597,7 @@ u8 WriteSectorSignatureByte(u16 sectorId, const struct SaveBlockChunk * chunks) } } -u8 WriteSectorSignatureByteInverse(u16 sectorId, const struct SaveBlockChunk * chunks) +static u8 WriteSectorSignatureByteInverse(u16 sectorId, const struct SaveBlockChunk * chunks) { u16 sector = sectorId + gLastWrittenSector - 1; @@ -689,7 +689,7 @@ inline u32 HandleReplaceSectorAndVerify(u16 chunk, const struct SaveBlockChunk * return status; } -bool32 FullSaveAndLoopOverFailedSectors(void) +static bool32 FullSaveAndLoopOverFailedSectors(void) { u8 status; @@ -1072,7 +1072,7 @@ static inline bool8 WipeSector_Sub(void) return FALSE; } -bool8 WipeSector(u16 sectorNum) +static bool8 WipeSector(u16 sectorNum) { u16 i; bool8 ret; @@ -1098,7 +1098,7 @@ bool8 WipeSector(u16 sectorNum) return ret; } -bool8 WipeFailedSectors(void) +static bool8 WipeFailedSectors(void) { u32 bits; u16 i;