Updated VCMI, fixed crash due to SDL_Image not supporting PCX format
This commit is contained in:
@@ -306,19 +306,12 @@ class DataDownloader extends Thread
|
||||
}
|
||||
if( FileInAssets )
|
||||
{
|
||||
System.out.println("Unpacking from assets: '" + url + "'");
|
||||
try {
|
||||
System.out.println("Unpacking from assets: '" + url + "' 1");
|
||||
stream = new CountingInputStream(Parent.getAssets().open(url), 8192);
|
||||
System.out.println("Unpacking from assets: '" + url + "' 2");
|
||||
while( stream.skip(65536) > 0 ) { };
|
||||
System.out.println("Unpacking from assets: '" + url + "' 3");
|
||||
totalLen = stream.getBytesRead();
|
||||
System.out.println("Unpacking from assets: '" + url + "' 4 totalLen = " + String.valueOf(totalLen));
|
||||
stream.close();
|
||||
System.out.println("Unpacking from assets: '" + url + "' 5");
|
||||
stream = new CountingInputStream(Parent.getAssets().open(url), 8192);
|
||||
System.out.println("Unpacking from assets: '" + url + "' 6");
|
||||
} catch( IOException e ) {
|
||||
System.out.println("Unpacking from assets '" + url + "' - error: " + e.toString());
|
||||
Status.setText( res.getString(R.string.error_dl_from, url) );
|
||||
|
||||
@@ -508,12 +508,19 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
if( entry.isDirectory() )
|
||||
{
|
||||
System.out.println("Warning '" + entry.getName() + "' is a directory");
|
||||
File outDir = new File( cacheDir.getAbsolutePath() + "/" + entry.getName() );
|
||||
if( !(outDir.exists() && outDir.isDirectory()) )
|
||||
outDir.mkdirs();
|
||||
continue;
|
||||
}
|
||||
|
||||
OutputStream out = null;
|
||||
String path = cacheDir.getAbsolutePath() + "/" + entry.getName();
|
||||
try {
|
||||
File outDir = new File( path.substring(0, path.lastIndexOf("/") ));
|
||||
if( !(outDir.exists() && outDir.isDirectory()) )
|
||||
outDir.mkdirs();
|
||||
} catch( SecurityException eeeee ) { };
|
||||
|
||||
System.out.println("Saving to file '" + path + "'");
|
||||
|
||||
@@ -589,12 +596,19 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
if( entry.isDirectory() )
|
||||
{
|
||||
System.out.println("Warning '" + entry.getName() + "' is a directory");
|
||||
File outDir = new File( cacheDir.getAbsolutePath() + "/" + entry.getName() );
|
||||
if( !(outDir.exists() && outDir.isDirectory()) )
|
||||
outDir.mkdirs();
|
||||
continue;
|
||||
}
|
||||
|
||||
OutputStream out = null;
|
||||
String path = cacheDir.getAbsolutePath() + "/" + entry.getName();
|
||||
try {
|
||||
File outDir = new File( path.substring(0, path.lastIndexOf("/") ));
|
||||
if( !(outDir.exists() && outDir.isDirectory()) )
|
||||
outDir.mkdirs();
|
||||
} catch( SecurityException eeeeeee ) { };
|
||||
|
||||
try {
|
||||
CheckedInputStream check = new CheckedInputStream( new FileInputStream(path), new CRC32() );
|
||||
@@ -608,7 +622,7 @@ public class MainActivity extends Activity {
|
||||
}
|
||||
System.out.println("File '" + path + "' exists and passed CRC check - not overwriting it");
|
||||
continue;
|
||||
} catch( Exception e ) { }
|
||||
} catch( Exception eeeeee ) { }
|
||||
|
||||
System.out.println("Saving to file '" + path + "'");
|
||||
|
||||
|
||||
@@ -17,13 +17,13 @@ fi
|
||||
NDK=`which ndk-build`
|
||||
NDK=`dirname $NDK`
|
||||
|
||||
echo NDK $NDK
|
||||
#echo NDK $NDK
|
||||
GCCPREFIX=arm-linux-androideabi
|
||||
GCCVER=4.4.3
|
||||
PLATFORMVER=android-8
|
||||
LOCAL_PATH=`dirname $0`
|
||||
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
|
||||
echo LOCAL_PATH $LOCAL_PATH
|
||||
#echo LOCAL_PATH $LOCAL_PATH
|
||||
|
||||
APP_MODULES=`grep 'APP_MODULES [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@'`
|
||||
APP_AVAILABLE_STATIC_LIBS=`grep 'APP_AVAILABLE_STATIC_LIBS [:][=]' $LOCAL_PATH/../Settings.mk | sed 's@.*[=]\(.*\)@\1@'`
|
||||
|
||||
@@ -1 +1 @@
|
||||
gemrb
|
||||
vcmi
|
||||
@@ -25,8 +25,8 @@ RedefinedKeysScreenKb="LALT RETURN KP_PLUS KP_MINUS SPACE DELETE KP_PLUS KP_MINU
|
||||
StartupMenuButtonTimeout=3000
|
||||
HiddenMenuOptions='KeyboardConfigMainMenu AudioConfig OptionalDownloadConfig'
|
||||
MultiABI=n
|
||||
AppVersionCode=08502
|
||||
AppVersionName="0.85.02"
|
||||
AppVersionCode=08503
|
||||
AppVersionName="0.85.03"
|
||||
CompiledLibraries="sdl_mixer sdl_image sdl_ttf avutil avcore avcodec avformat swscale boost_program_options boost_filesystem boost_iostreams boost_system boost_thread vcmi"
|
||||
CustomBuildScript=n
|
||||
AppCflags='-DDATA_DIR=\\\"/sdcard/app-data/eu.vcmi\\\" -DBIN_DIR=\\\"/data/data/eu.vcmi/files\\\" -DLIB_DIR=\\\"/data/data/eu.vcmi/files\\\" -DWITH_AVCODEC_DECODE_VIDEO2=1'
|
||||
|
||||
Binary file not shown.
Binary file not shown.
@@ -1,5 +1,7 @@
|
||||
|
||||
$(shell mkdir -p debug out/vcmi/lib out/vcmi/server out/vcmi/AI/StupidAI out/vcmi/AI/GeniusAI out/vcmi/client)
|
||||
$(shell mkdir -p AI debug/AI Scripting debug/Scripting \
|
||||
out/vcmi/lib out/vcmi/server out/vcmi/AI/StupidAI \
|
||||
out/vcmi/AI/GeniusAI out/vcmi/client out/vcmi/Scripting/ERM)
|
||||
|
||||
LOCAL_PATH=$(shell dirname $0)
|
||||
LOCAL_PATH=`cd $LOCAL_PATH && pwd`
|
||||
@@ -21,6 +23,9 @@ OBJS_GENIUSAI=$(patsubst %.cpp, out/%.o, $(SOURCES_GENIUSAI))
|
||||
SOURCES_CLIENT=$(wildcard vcmi/client/*.cpp vcmi/*.cpp)
|
||||
OBJS_CLIENT=$(patsubst %.cpp, out/%.o, $(SOURCES_CLIENT))
|
||||
|
||||
SOURCES_ERM=$(wildcard vcmi/Scripting/ERM/*.cpp)
|
||||
OBJS_ERM=$(patsubst %.cpp, out/%.o, $(SOURCES_ERM))
|
||||
|
||||
all: AndroidData/vcmiserver0 # libapplication.so
|
||||
|
||||
AndroidData/vcmiserver0: vcmiserver.zip
|
||||
@@ -28,11 +33,11 @@ AndroidData/vcmiserver0: vcmiserver.zip
|
||||
split -b 1048576 -d -a 1 $< AndroidData/vcmiserver
|
||||
cp -f AndroidData/vcmiserver* ../../../assets
|
||||
|
||||
vcmiserver.zip: vcmiserver GeniusAI.so StupidAI.so
|
||||
vcmiserver.zip: vcmiserver AI/libGeniusAI.so AI/libStupidAI.so Scripting/libvcmiERM.so
|
||||
rm -f $@
|
||||
zip $@ $^
|
||||
zip -r $@ $^
|
||||
|
||||
$(OBJS_SERVER) $(OBJS_LIB) $(OBJS_GENIUSAI) $(OBJS_STUPIDAI) $(OBJS_CLIENT): out/%.o: %.cpp
|
||||
$(OBJS_SERVER) $(OBJS_LIB) $(OBJS_GENIUSAI) $(OBJS_STUPIDAI) $(OBJS_CLIENT) $(OBJS_ERM): out/%.o: %.cpp
|
||||
../setEnvironment.sh sh -c \
|
||||
"$(GCC_PREFIX)-g++ \
|
||||
-c \$$CXXFLAGS -Ivcmi -Ivcmi/lib \
|
||||
@@ -64,12 +69,16 @@ LINK_LIB= \
|
||||
.PHONY: -lvcmi
|
||||
-lvcmi: libvcmi.so
|
||||
|
||||
GeniusAI.so: $(OBJS_GENIUSAI) -lvcmi
|
||||
AI/libGeniusAI.so: $(OBJS_GENIUSAI) -lvcmi
|
||||
$(LINK_LIB)
|
||||
|
||||
StupidAI.so: $(OBJS_STUPIDAI) -lvcmi
|
||||
AI/libStupidAI.so: $(OBJS_STUPIDAI) -lvcmi
|
||||
$(LINK_LIB)
|
||||
|
||||
Scripting/libvcmiERM.so: $(OBJS_ERM) -lvcmi
|
||||
$(LINK_LIB)
|
||||
|
||||
|
||||
libvcmi.so: $(OBJS_LIB)
|
||||
$(LINK_LIB)
|
||||
|
||||
|
||||
@@ -5,7 +5,7 @@ include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := sdl_image
|
||||
|
||||
LOCAL_C_INCLUDES := $(LOCAL_PATH) $(LOCAL_PATH)/../jpeg/include $(LOCAL_PATH)/../png/include $(LOCAL_PATH)/../sdl-$(SDL_VERSION)/include $(LOCAL_PATH)/include
|
||||
LOCAL_CFLAGS := -O3 -DLOAD_PNG -DLOAD_JPG -DLOAD_GIF -DLOAD_BMP
|
||||
LOCAL_CFLAGS := -O3 -DLOAD_PNG -DLOAD_JPG -DLOAD_GIF -DLOAD_BMP -DLOAD_PCX -DLOAD_LBM -DLOAD_PNM -DLOAD_TGA
|
||||
# Add -DANDROID_RGB to LOCAL_CFLAGS to make SDL_image output JPEG in native RGB565 format
|
||||
|
||||
LOCAL_CPP_EXTENSION := .cpp
|
||||
|
||||
Reference in New Issue
Block a user