From a0eeec21b20edd4b5077dc6d84ee3464ae9a9056 Mon Sep 17 00:00:00 2001 From: kts Date: Tue, 24 Feb 2015 16:55:11 -0800 Subject: [PATCH] Much added. Basic asset access functions using fopen() techniques. Currently the system attempts to load from the CWD on most platforms, but on Android it attempts to load from the assets archive. Once updated, it will likely attempt to load from at least 3 locations before falling back to the built-in application assets (external device, user directory, application data directory). Creation/Loading of RtB is now managed by a Core class. This class is, to some extent, a service locator combined with larger engine functionality. A global instance of the class is provided as 'core'. It is responsible for updating the yet-to-be-added States, the base rendering, and the management of assets and much more. --- build/android/AndroidManifest.xml | 3 +- build/android/assets/data | 1 + build/android/build.properties | 2 +- build/android/build.xml | 15 +- build/android/jni/Application.mk | 3 +- build/android/jni/src/Android.mk | 10 +- build/android/src/com/polymathic/RtB/RtB.java | 13 ++ .../Roll them Bones.xcodeproj/project.pbxproj | 111 +++++++++ .../Roll them Bones.xcodeproj/project.pbxproj | 50 +++++ data/shaders/default_fs.100.glsl | 11 + data/shaders/default_fs.glsl | 1 - data/shaders/default_vs.100.glsl | 16 ++ data/shaders/default_vs.glsl | 2 +- data/shaders/fb_fs.100.glsl | 13 ++ data/shaders/fb_fs.glsl | 1 - data/shaders/fb_vs.100.glsl | 11 + src/Core.cpp | 210 ++++++++++++++++++ src/Core.hpp | 37 +++ src/Log.cpp | 10 +- src/Mesh.cpp | 9 +- src/Program.cpp | 13 +- src/RenderScene.cpp | 8 +- src/RenderView.cpp | 8 + src/RenderView.hpp | 4 + src/checksum.cpp | 40 ++++ src/checksum.hpp | 12 + src/fio.cpp | 87 ++++++++ src/fio.hpp | 25 +++ src/main.cpp | 159 ++----------- 29 files changed, 715 insertions(+), 170 deletions(-) create mode 120000 build/android/assets/data create mode 100644 data/shaders/default_fs.100.glsl create mode 100644 data/shaders/default_vs.100.glsl create mode 100644 data/shaders/fb_fs.100.glsl create mode 100644 data/shaders/fb_vs.100.glsl create mode 100644 src/Core.cpp create mode 100644 src/Core.hpp create mode 100644 src/checksum.cpp create mode 100644 src/checksum.hpp create mode 100644 src/fio.cpp create mode 100644 src/fio.hpp diff --git a/build/android/AndroidManifest.xml b/build/android/AndroidManifest.xml index ee390d4..e39bd68 100755 --- a/build/android/AndroidManifest.xml +++ b/build/android/AndroidManifest.xml @@ -40,5 +40,6 @@ - + + diff --git a/build/android/assets/data b/build/android/assets/data new file mode 120000 index 0000000..a4ced2f --- /dev/null +++ b/build/android/assets/data @@ -0,0 +1 @@ +../../../data \ No newline at end of file diff --git a/build/android/build.properties b/build/android/build.properties index edc7f23..58438e3 100755 --- a/build/android/build.properties +++ b/build/android/build.properties @@ -14,4 +14,4 @@ # 'key.store' for the location of your keystore and # 'key.alias' for the name of the key to use. # The password will be asked during the build when you use the 'release' target. - +assets.dir=${base.dir}/assets diff --git a/build/android/build.xml b/build/android/build.xml index 112c1ac..a934003 100755 --- a/build/android/build.xml +++ b/build/android/build.xml @@ -28,7 +28,9 @@ --> - + + + +