Skip to content

Commit

Permalink
Fixed segmentation fault on some SIF TEXBs
Browse files Browse the repository at this point in the history
* The vertex and the image size sometimes mismatched

* Image always starts fetch at 0,0 to Width,Height. SIF sometimes starts fetch image from specific Vertex to specific Vertex location

* UVs sometimes bigger than 1.0 and that cause segmentation fault

Makefile now allows NDK build (all architecture). Just set `NDK_BUILD`=`<path to NDK build script>`
  • Loading branch information
MikuAuahDark committed Feb 1, 2016
1 parent ec9b778 commit 78d1f72
Show file tree
Hide file tree
Showing 5 changed files with 297 additions and 95 deletions.
28 changes: 25 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,36 @@

WHERE_ZLIB?=./zlib-1.2.8
WHERE_LODEPNG?=./lodepng
WHERE_TCLAP?=./tclap-1.2.1
CFLAGS?=
NDK_BUILD ?= ndk-build

all: gcc

gcc:
g++ -O3 -I$(WHERE_ZLIB) -I$(WHERE_LODEPNG) $(CFLAGS) -c lodepng/lodepng.cpp src/*.cpp
gcc -O3 -I$(WHERE_ZLIB) -I$(WHERE_LODEPNG) $(CFLAGS) -c zlib-1.2.8/*.c
g++ -O3 -I$(WHERE_ZLIB) -I$(WHERE_LODEPNG) $(CFLAGS) -o test *.o -lws2_32
g++ -O3 -I$(WHERE_ZLIB) -I$(WHERE_LODEPNG) -I$(WHERE_TCLAP) $(CFLAGS) -c lodepng/lodepng.cpp src/*.cpp
gcc -O3 -I$(WHERE_ZLIB) -I$(WHERE_LODEPNG) -I$(WHERE_TCLAP) $(CFLAGS) -c zlib-1.2.8/*.c
g++ -O3 -I$(WHERE_ZLIB) -I$(WHERE_LODEPNG) -I$(WHERE_TCLAP) $(CFLAGS) -o Itsudemo *.o -lws2_32
-rm *.o

ndk:
$(NDK_BUILD) APP_BUILD_SCRIPT=./Android.mk NDK_APPLICATION_MK=./Application.mk NDK_PROJECT_PATH=.
-mkdir -p bin/jni/{arm64-v8a,armeabi{,-v7a},mips{,64},x86{,_64}}{,/stripped}
-cp obj/local/arm64-v8a/Itsudemo bin/jni/arm64-v8a/
-cp obj/local/armeabi/Itsudemo bin/jni/armeabi/
-cp obj/local/armeabi-v7a/Itsudemo bin/jni/armeabi-v7a/
-cp obj/local/mips/Itsudemo bin/jni/mips/
-cp obj/local/mips64/Itsudemo bin/jni/mips64/
-cp obj/local/x86/Itsudemo bin/jni/x86/
-cp obj/local/x86_64/Itsudemo bin/jni/x86_64/
rm -R obj
-cp libs/arm64-v8a/Itsudemo bin/jni/arm64-v8a/stripped/
-cp libs/armeabi/Itsudemo bin/jni/armeabi/stripped/
-cp libs/armeabi-v7a/Itsudemo bin/jni/armeabi-v7a/stripped/
-cp libs/mips/Itsudemo bin/jni/mips/stripped/
-cp libs/mips64/Itsudemo bin/jni/mips64/stripped/
-cp libs/x86/Itsudemo bin/jni/x86/stripped/
-cp libs/x86_64/Itsudemo bin/jni/x86_64/stripped/
rm -R libs

.PHONY: all
Loading

0 comments on commit 78d1f72

Please sign in to comment.