Просмотр исходного кода

Merge pull request #131 from blackberry-gaming/next

Next
Sean Paul Taylor 13 лет назад
Родитель
Сommit
bf3e49cd04
3 измененных файлов с 21 добавлено и 13 удалено
  1. 8 8
      README.md
  2. 3 1
      gameplay/src/Base.h
  3. 10 4
      gameplay/src/MathUtil.inl

+ 8 - 8
README.md

@@ -1,9 +1,9 @@
-## gameplay v1.2.0
+## gameplay v1.3.0
 An open-source, cross-platform 3D native C++ game framework making it easy to learn and write mobile and desktop games. 
 
 ## Supported Mobile Platforms
-- BlackBerry PlayBook 2.0 (using BlackBerry Native SDK 2)
-- Google Android 2.3 (using Google Android NDK r7, SDK API level 9 and up)
+- BlackBerry 10 and PlayBook 2.0 (using BlackBerry Native SDK)
+- Google Android 2.3+ (using Google Android NDK r7, SDK API level 9+)
 - Apple iOS 5.1 (using Apple XCode 4.3.2)
 
 ## Supported Desktop Platforms
@@ -11,12 +11,12 @@ An open-source, cross-platform 3D native C++ game framework making it easy to le
 - Apple MacOS X (using Apple XCode 4.3.2)
 
 ## Roadmap for 'next' branch
-- Shadows
-- Lua Script Bindings
+- Gamepad support
+- Lua script bindings
+- Vehicle physics
 - Terrain
-- AI
-- Editor
-- Performance/Optimizations
+- Lightmaps
+- Shadows
 
 ## Licence
 The project is open sourced under the Apache 2.0 license.

+ 3 - 1
gameplay/src/Base.h

@@ -191,7 +191,9 @@ extern void printError(const char* format, ...);
     #define glClearDepth glClearDepthf
     #define OPENGL_ES
     #define USE_PVRTC
-	#define USE_NEON
+    #ifdef __ARM__
+        #define USE_NEON
+    #endif
 #elif __ANDROID__
 	#include <EGL/egl.h>
     #include <GLES2/gl2.h>

+ 10 - 4
gameplay/src/MathUtil.inl

@@ -140,10 +140,16 @@ inline void MathUtil::transformVectorMatrix(const float* m, float x, float y, fl
 
 inline void MathUtil::transformVectorMatrix(const float* m, const float* v, float* dst)
 {
-	dst[0] = v[0] * m[0] + v[1] * m[4] + v[2] * m[8] + v[3] * m[12];
-	dst[1] = v[0] * m[1] + v[1] * m[5] + v[2] * m[9] + v[3] * m[13];
-	dst[2] = v[0] * m[2] + v[1] * m[6] + v[2] * m[10] + v[3] * m[14];
-	dst[3] = v[0] * m[3] + v[1] * m[7] + v[2] * m[11] + v[3] * m[15];
+    // Handle case where v == dst.
+    float x = v[0] * m[0] + v[1] * m[4] + v[2] * m[8] + v[3] * m[12];
+	float y = v[0] * m[1] + v[1] * m[5] + v[2] * m[9] + v[3] * m[13];
+    float z = v[0] * m[2] + v[1] * m[6] + v[2] * m[10] + v[3] * m[14];
+    float w = v[0] * m[3] + v[1] * m[7] + v[2] * m[11] + v[3] * m[15];
+
+    dst[0] = x;
+    dst[1] = y;
+	dst[2] = z;
+	dst[3] = w;
 }
 
 inline void MathUtil::transposeMatrix(const float* m, float* dst)