From 976ecfa2f8ba4483b2f3c5174e3d345424a9e435 Mon Sep 17 00:00:00 2001 From: Alexander Batalov Date: Sat, 18 Jun 2022 15:39:21 +0300 Subject: [PATCH] Cleanup audio_file.h See #42 --- src/audio_file.cc | 13 ++++++++----- src/audio_file.h | 7 ------- 2 files changed, 8 insertions(+), 12 deletions(-) diff --git a/src/audio_file.cc b/src/audio_file.cc index 43d35d8..0e6fd37 100644 --- a/src/audio_file.cc +++ b/src/audio_file.cc @@ -9,17 +9,20 @@ #include #include +static bool _defaultCompressionFunc__(char* filePath); +static int audioFileSoundDecoderReadHandler(int fileHandle, void* buffer, unsigned int size); + // 0x5108C0 -AudioFileIsCompressedProc* _queryCompressedFunc_2 = _defaultCompressionFunc__; +static AudioFileIsCompressedProc* _queryCompressedFunc_2 = _defaultCompressionFunc__; // 0x56CB10 -AudioFile* gAudioFileList; +static AudioFile* gAudioFileList; // 0x56CB14 -int gAudioFileListLength; +static int gAudioFileListLength; // 0x41A850 -bool _defaultCompressionFunc__(char* filePath) +static bool _defaultCompressionFunc__(char* filePath) { char* pch = strrchr(filePath, '.'); if (pch != NULL) { @@ -30,7 +33,7 @@ bool _defaultCompressionFunc__(char* filePath) } // 0x41A870 -int audioFileSoundDecoderReadHandler(int fileHandle, void* buffer, unsigned int size) +static int audioFileSoundDecoderReadHandler(int fileHandle, void* buffer, unsigned int size) { return fread(buffer, 1, size, (FILE*)fileHandle); } diff --git a/src/audio_file.h b/src/audio_file.h index fa10b08..ab60602 100644 --- a/src/audio_file.h +++ b/src/audio_file.h @@ -20,13 +20,6 @@ typedef struct AudioFile { typedef bool(AudioFileIsCompressedProc)(char* filePath); -extern AudioFileIsCompressedProc* _queryCompressedFunc_2; - -extern AudioFile* gAudioFileList; -extern int gAudioFileListLength; - -bool _defaultCompressionFunc__(char* filePath); -int audioFileSoundDecoderReadHandler(int fileHandle, void* buffer, unsigned int size); int audioFileOpen(const char* fname, int flags, ...); int audioFileClose(int a1); int audioFileRead(int a1, void* buf, unsigned int size);