When you're creating a sprite (e.g. with Sprite* Sprite::create(filename))
There's no way to test the file before, without getting "a unsupport image format!" thrown.
Gets filename extension is a suffix (separated from the base filename by
a dot) in lower case.
More code need get filename extension, everyone does it differently.
use check UPPER and lower case, use . and no(example ".csb", ".CSB",
"csb" )
And bag in AudioEngineImpl: find point from left( ext =
strchr(filePath.c_str(), '.'); )
If file path contains point. always unsupported media type
win32 fopen only ansi encoding.
if filePath contains utf8 characters fopen fail.
AudioCache FileFormat::OGG bag, can't open file, if filePath contains
utf8.
Need make all filename for fopen correct encoding.
Only Win32 FileUtils::getSuitableFOpen return
StringUtf8ToAnsi(filename),
other platform return filename
all fopen use FileUtils::getSuitableFOpen
Wrong log message DDS and KTX check image format(other format no log
message).
isS3TC and isATITC protected, no use dev code.
Log message if format unknown
Without this wrapper I get errors below.
Mac Os X 10.9.3 Xcode 6 beta(the same problem also exists in Xcode 5)
I found a solution at http://stackoverflow.com/questions/8732393/code-coverage-with-xcode-4-2-missing-files and added one more wrapping function.
Undefined symbols for architecture i386:
"_fwrite$UNIX2003", referenced from:
_unixErrorHandler in libcocos2dx iOS.a(tif_unix.o)
_unixWarningHandler in libcocos2dx iOS.a(tif_unix.o)
_empty_output_buffer in libcocos2dx iOS.a(jdatadst.o)
_term_destination in libcocos2dx iOS.a(jdatadst.o)
_Fax3PrintDir in libcocos2dx iOS.a(tif_fax3.o)
_PredictorPrintDir in libcocos2dx iOS.a(tif_predict.o)
"_strerror$UNIX2003", referenced from:
_TIFFOpen in libcocos2dx iOS.a(tif_unix.o)
ld: symbol(s) not found for architecture i386
clang: error: linker command failed with exit code 1 (use -v to see invocation)