diff --git a/Libraries/FileHandler/Audio.cpp b/Libraries/FileHandler/Audio.cpp index ff56ac2..a3bd7ae 100644 --- a/Libraries/FileHandler/Audio.cpp +++ b/Libraries/FileHandler/Audio.cpp @@ -17,10 +17,10 @@ */ #include "FileHandler.hpp" -#include "libmpg123/mpg123.h" -#include "utk/read_utk.h" #include "wav/read_wav.h" #include "xa/read_xa.h" +#include "utk/read_utk.h" +#include "libmpg123/mpg123.h" namespace File { @@ -159,7 +159,8 @@ static uint8_t * ReadUTK(Sound_t * Sound, const uint8_t * InData, size_t FileSiz } static uint8_t * ReadMP3(Sound_t * Sound, const uint8_t * InData, size_t FileSize){ - if(mpg123_init() != MPG123_OK){ + mpg123_handle *mh; + if(mpg123_init() != MPG123_OK || (mh = mpg123_new(NULL, NULL)) == NULL){ mpg123_exit(); return NULL; } @@ -170,9 +171,7 @@ static uint8_t * ReadMP3(Sound_t * Sound, const uint8_t * InData, size_t FileSiz size_t OutSize; uint8_t * OutData; - mpg123_handle *mh = mpg123_new(NULL, NULL); - if(mh == NULL || - mpg123_format_none(mh) != MPG123_OK || + if(mpg123_format_none(mh) != MPG123_OK || mpg123_format(mh, 44100, MPG123_MONO | MPG123_STEREO, MPG123_ENC_SIGNED_16) != MPG123_OK || mpg123_open_feed(mh) != MPG123_OK || mpg123_feed(mh, InData, FileSize) != MPG123_OK || diff --git a/Libraries/FileHandler/Image.cpp b/Libraries/FileHandler/Image.cpp index 25ac169..c8198b7 100644 --- a/Libraries/FileHandler/Image.cpp +++ b/Libraries/FileHandler/Image.cpp @@ -29,7 +29,7 @@ enum ImageType { FIMG_BMP, FIMG_JPEG, FIMG_PNG, - FIMG_TGA, + FIMG_TGACUR, FIMG_COUNT }; diff --git a/Libraries/FileHandler/TODO b/Libraries/FileHandler/TODO new file mode 100644 index 0000000..e69de29 diff --git a/Libraries/FileHandler/iff/spr2.c b/Libraries/FileHandler/iff/spr2.c index e69de29..4c35c04 100644 --- a/Libraries/FileHandler/iff/spr2.c +++ b/Libraries/FileHandler/iff/spr2.c @@ -0,0 +1,17 @@ +/* + FileHandler - General-purpose file handling library for Niotso + spr2.c - Copyright (c) 2012 Niotso Project + Author(s): Fatbag + + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. +*/ \ No newline at end of file diff --git a/Tools/hitutils/CMakeLists.txt b/Tools/hitutils/CMakeLists.txt index e093aba..97776ea 100644 --- a/Tools/hitutils/CMakeLists.txt +++ b/Tools/hitutils/CMakeLists.txt @@ -1,18 +1,18 @@ -cmake_minimum_required(VERSION 2.6) -project(hitutils) - -set(HITDUMP_SOURCES - hitdump.cpp -) - -set(HITASM_SOURCES - hitasm.cpp -) - -set(HITLD_SOURCES - hitld.cpp -) - -add_executable(hitdump ${HITDUMP_SOURCES}) -add_executable(hitasm ${HITASM_SOURCES}) +cmake_minimum_required(VERSION 2.6) +project(hitutils) + +set(HITDUMP_SOURCES + hitdump.cpp +) + +set(HITASM_SOURCES + hitasm.cpp +) + +set(HITLD_SOURCES + hitld.cpp +) + +add_executable(hitdump ${HITDUMP_SOURCES}) +add_executable(hitasm ${HITASM_SOURCES}) add_executable(hitld ${HITLD_SOURCES}) \ No newline at end of file