Browse Source

- use android-16 sdk by default
- updated PVRTexTool to latest
- added new example to demo
- updated ios project
- minor

dmuratshin 10 years ago
parent
commit
9504e4a38b
48 changed files with 242 additions and 39 deletions
  1. 3 3
      .hg_archival.txt
  2. BIN
      3rdPartyTools/PVRTexToolCL.exe
  3. BIN
      3rdPartyTools/linux/PVRTexToolCLI
  4. BIN
      3rdPartyTools/macosx/PVRTexToolCLI
  5. 1 1
      CMakeLists.txt
  6. 34 0
      examples/Demo/data/demo/num_fnt_shdr.fnt
  7. BIN
      examples/Demo/data/demo/num_fnt_shdr.png
  8. 1 0
      examples/Demo/data/xmls/res.xml
  9. 1 6
      examples/Demo/proj.android/AndroidManifest.xml
  10. 1 1
      examples/Demo/proj.android/project.properties
  11. 1 1
      examples/Demo/proj.cmake/CMakeLists.txt
  12. 7 0
      examples/Demo/proj.ios/Demo/Demo_ios-Info.plist
  13. 1 0
      examples/Demo/proj.win32/Demo.vcxproj
  14. 3 0
      examples/Demo/proj.win32/Demo.vcxproj.filters
  15. 122 0
      examples/Demo/src/TestColorFont.h
  16. 9 0
      examples/Demo/src/example.cpp
  17. 1 1
      examples/DemoBox2D/proj.android/AndroidManifest.xml
  18. 1 1
      examples/DemoBox2D/proj.android/project.properties
  19. 1 1
      examples/Game/part1/proj.android/AndroidManifest.xml
  20. 1 1
      examples/Game/part1/proj.android/project.properties
  21. 1 1
      examples/Game/part2/proj.android/AndroidManifest.xml
  22. 1 1
      examples/Game/part2/proj.android/project.properties
  23. 1 1
      examples/Game/part3/proj.android/AndroidManifest.xml
  24. 1 1
      examples/Game/part3/proj.android/project.properties
  25. 1 1
      examples/Game/part4/proj.android/AndroidManifest.xml
  26. 1 1
      examples/Game/part4/proj.android/project.properties
  27. 1 1
      examples/Game/part5/proj.android/AndroidManifest.xml
  28. 1 1
      examples/Game/part5/proj.android/project.properties
  29. 1 1
      examples/HelloWorld/proj.android/AndroidManifest.xml
  30. 1 1
      examples/HelloWorld/proj.android/project.properties
  31. 1 1
      examples/Match3/proj.android/AndroidManifest.xml
  32. 1 1
      examples/Match3/proj.android/project.properties
  33. 1 1
      oxygine/SDL/android/extension/AndroidManifest.xml
  34. 1 1
      oxygine/SDL/android/extension/project.properties
  35. 1 1
      oxygine/SDL/android/extension/src/org/oxygine/lib/extension/ActivityObservable.java
  36. 1 1
      oxygine/SDL/android/extension/src/org/oxygine/lib/extension/ActivityObserver.java
  37. 1 1
      oxygine/SDL/android/lib/project.properties
  38. 2 0
      oxygine/SDL/android/lib/src/org/oxygine/lib/OxygineActivity.java
  39. 19 0
      oxygine/src/Actor.cpp
  40. 2 0
      oxygine/src/Actor.h
  41. 2 1
      oxygine/src/Sprite.h
  42. 1 0
      oxygine/src/Tween.h
  43. 4 0
      oxygine/src/json/jsoncpp.cpp
  44. 1 1
      readme/Android.txt
  45. 1 0
      tools/others/format.bat
  46. 3 2
      tools/others/gen_templates.py
  47. 1 1
      tools/templates/proj.android/AndroidManifest.xml
  48. 1 1
      tools/templates/proj.android/project.properties

+ 3 - 3
.hg_archival.txt

@@ -1,6 +1,6 @@
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
-node: ec442a0dddaf3736e5f316213047e18bed1f8012
+node: 0129e5540c758e44ea3d4939ea9570d7fe4b63e8
 branch: default
 branch: default
 latesttag: oldrender
 latesttag: oldrender
-latesttagdistance: 945
-changessincelatesttag: 1099
+latesttagdistance: 954
+changessincelatesttag: 1112

BIN
3rdPartyTools/PVRTexToolCL.exe


BIN
3rdPartyTools/linux/PVRTexToolCLI


BIN
3rdPartyTools/macosx/PVRTexToolCLI


+ 1 - 1
CMakeLists.txt

@@ -177,7 +177,7 @@ else(EMSCRIPTEN)
 endif(EMSCRIPTEN)
 endif(EMSCRIPTEN)
 
 
 
 
-message(STATUS ${CORE_LIBS})
+#message(STATUS ${CORE_LIBS})
 
 
 #add jpeg library
 #add jpeg library
 if (OX_HAVE_LIBJPEG)
 if (OX_HAVE_LIBJPEG)

+ 34 - 0
examples/Demo/data/demo/num_fnt_shdr.fnt

@@ -0,0 +1,34 @@
+<?xml version="1.0"?>
+<font>
+  <info face="Movavi Grotesque Black" size="70" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="4" padding="0,0,0,0" spacing="1,1" outline="5"/>
+  <common lineHeight="70" base="55" scaleW="512" scaleH="68" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/>
+  <pages>
+    <page id="0" file="num_fnt_shdr.png" />
+  </pages>
+  <chars count="10">
+    <char id="48" x="0" y="0" width="49" height="62" xoffset="-3" yoffset="-2" xadvance="44" page="0" chnl="15" />
+    <char id="49" x="449" y="0" width="34" height="60" xoffset="-5" yoffset="-1" xadvance="27" page="0" chnl="15" />
+    <char id="50" x="298" y="0" width="47" height="61" xoffset="-2" yoffset="-2" xadvance="44" page="0" chnl="15" />
+    <char id="51" x="198" y="0" width="49" height="61" xoffset="-3" yoffset="-1" xadvance="44" page="0" chnl="15" />
+    <char id="52" x="346" y="0" width="53" height="60" xoffset="-5" yoffset="-1" xadvance="43" page="0" chnl="15" />
+    <char id="53" x="248" y="0" width="49" height="61" xoffset="-3" yoffset="-1" xadvance="44" page="0" chnl="15" />
+    <char id="54" x="50" y="0" width="49" height="62" xoffset="-3" yoffset="-2" xadvance="44" page="0" chnl="15" />
+    <char id="55" x="400" y="0" width="48" height="60" xoffset="-5" yoffset="-1" xadvance="39" page="0" chnl="15" />
+    <char id="56" x="150" y="0" width="47" height="62" xoffset="-3" yoffset="-2" xadvance="42" page="0" chnl="15" />
+    <char id="57" x="100" y="0" width="49" height="62" xoffset="-3" yoffset="-2" xadvance="44" page="0" chnl="15" />
+  </chars>
+  <kernings count="12">
+    <kerning first="56" second="52" amount="1" />
+    <kerning first="55" second="55" amount="2" />
+    <kerning first="55" second="53" amount="-1" />
+    <kerning first="55" second="52" amount="-2" />
+    <kerning first="55" second="49" amount="2" />
+    <kerning first="54" second="52" amount="1" />
+    <kerning first="52" second="52" amount="2" />
+    <kerning first="51" second="52" amount="1" />
+    <kerning first="49" second="55" amount="1" />
+    <kerning first="49" second="54" amount="1" />
+    <kerning first="49" second="48" amount="1" />
+    <kerning first="48" second="49" amount="1" />
+  </kernings>
+</font>

BIN
examples/Demo/data/demo/num_fnt_shdr.png


+ 1 - 0
examples/Demo/data/xmls/res.xml

@@ -1,6 +1,7 @@
 <?xml version="1.0"?>
 <?xml version="1.0"?>
 <resources>
 <resources>
 	<font file="demo/font.fnt" />
 	<font file="demo/font.fnt" />
+	<font file="demo/num_fnt_shdr.fnt" premultiplied_alpha="false"/>
 	<set path = "./../images" />
 	<set path = "./../images" />
 
 
 	<atlas id = "primary" format="8888">
 	<atlas id = "primary" format="8888">

+ 1 - 6
examples/Demo/proj.android/AndroidManifest.xml

@@ -24,12 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
-    
-    <uses-permission android:name="android.permission.INTERNET" /> <!--used for http requests demo-->    
-    <uses-permission android:name="android.permission.WAKE_LOCK" /><!--used for http requests demo (downloading files)-->
-    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/><!--used for Proxy detection, could be disabled-->    
-
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Demo/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Demo/proj.cmake/CMakeLists.txt

@@ -7,7 +7,7 @@ include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
 
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
 set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
-add_executable(Demo ../src/Counter.cpp ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp  ../src/Counter.h ../src/TestAlphaHitTest.h ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestCounter.h ../src/TestDrag.h ../src/TestHttp.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestPolygon.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweenText.h ../src/TestTweens.h ../src/TestUserShader.h ../src/TestUserShader2.h ../src/example.h ../src/test.h )
+add_executable(Demo ../src/Counter.cpp ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp  ../src/Counter.h ../src/TestAlphaHitTest.h ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestColorFont.h ../src/TestCounter.h ../src/TestDrag.h ../src/TestHttp.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestPolygon.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweenText.h ../src/TestTweens.h ../src/TestUserShader.h ../src/TestUserShader2.h ../src/example.h ../src/test.h )
 
 
 if (WIN32) #disable console mode for VC++
 if (WIN32) #disable console mode for VC++
 	set_target_properties(Demo PROPERTIES WIN32_EXECUTABLE TRUE)
 	set_target_properties(Demo PROPERTIES WIN32_EXECUTABLE TRUE)

+ 7 - 0
examples/Demo/proj.ios/Demo/Demo_ios-Info.plist

@@ -49,5 +49,12 @@
 	</array>
 	</array>
 	<key>UIViewControllerBasedStatusBarAppearance</key>
 	<key>UIViewControllerBasedStatusBarAppearance</key>
 	<false/>
 	<false/>
+
+	<key>NSAppTransportSecurity</key>
+<dict>
+    <!--Connect to anything (this is probably BAD)-->
+    <key>NSAllowsArbitraryLoads</key>
+    <true/>
+</dict>
 </dict>
 </dict>
 </plist>
 </plist>

+ 1 - 0
examples/Demo/proj.win32/Demo.vcxproj

@@ -141,6 +141,7 @@
     <ClInclude Include="../src/TestUserShader2.h" />
     <ClInclude Include="../src/TestUserShader2.h" />
     <ClInclude Include="../src/example.h" />
     <ClInclude Include="../src/example.h" />
     <ClInclude Include="../src/test.h" />
     <ClInclude Include="../src/test.h" />
+    <ClInclude Include="..\src\TestColorFont.h" />
     <ClInclude Include="..\src\TestTouches.h" />
     <ClInclude Include="..\src\TestTouches.h" />
   </ItemGroup>
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />

+ 3 - 0
examples/Demo/proj.win32/Demo.vcxproj.filters

@@ -107,5 +107,8 @@
     <ClInclude Include="..\src\TestTouches.h">
     <ClInclude Include="..\src\TestTouches.h">
       <Filter>Header Files</Filter>
       <Filter>Header Files</Filter>
     </ClInclude>
     </ClInclude>
+    <ClInclude Include="..\src\TestColorFont.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
   </ItemGroup>
   </ItemGroup>
 </Project>
 </Project>

+ 122 - 0
examples/Demo/src/TestColorFont.h

@@ -0,0 +1,122 @@
+#pragma once
+#include "test.h"
+#include "core/UberShaderProgram.h"
+
+DECLARE_SMART(ShaderTextField, spShaderTextField);
+
+class ShaderTextField : public TextField
+{
+public:
+    static UberShaderProgram* shader;
+    static void init()
+    {
+        shader = new UberShaderProgram();
+        shader->init(Renderer::uberShaderBody,
+                     "#define MODIFY_BASE\n"
+                     "#define DONT_MULT_BY_RESULT_COLOR\n"
+                     "uniform lowp vec4 _black;"
+                     "uniform lowp vec4 _white;"
+                     "lowp vec4 modify_base(lowp vec4 base)\n"
+                     "{\n"
+                     "lowp vec4 black = vec4(_black.rgb, 1.0);" "\n"
+                     "lowp vec4 white = vec4(_white.rgb, 1.0);" "\n"
+                     "return mix(_white, _black, base.r) * base.a;\n"
+                     "}\n");
+    }
+
+    static void free()
+    {
+        delete shader;
+    }
+
+    ShaderTextField() : _outer(Color::White)
+    {
+
+    }
+
+    const Color& getOuterColor() const
+    {
+        return _outer;
+    }
+
+    void setOuterColor(const Color& v)
+    {
+        _outer = v;
+    }
+
+    typedef Property<Color, const Color&, ShaderTextField, &ShaderTextField::getOuterColor, &ShaderTextField::setOuterColor>   TweenOuterColor;
+
+private:
+    Color _outer;
+    unsigned char _adata;
+
+    Vector4 tovec(const Color& c)
+    {
+        return Vector4(c.getRedF(), c.getGreenF(), c.getBlueF(), c.getAlphaF());
+    }
+
+    void setUniforms(IVideoDriver* driver, ShaderProgram* prog)
+    {
+        Color q(_adata, _adata, _adata, _adata);
+        Vector4 c;
+        c = tovec(_outer * q);
+        driver->setUniform("_black", &c, 1);
+        c = tovec(getColor() * _style.color * q);
+        driver->setUniform("_white", &c, 1);
+    }
+
+    void doRender(const RenderState& rs)
+    {
+        _adata = rs.alpha;
+        shader->setShaderUniformsCallback(CLOSURE(this, &ShaderTextField::setUniforms));
+        STDRenderer* renderer = safeCast<STDRenderer*>(rs.renderer);
+        renderer->setUberShaderProgram(shader);
+        TextField::doRender(rs);
+        renderer->setUberShaderProgram(&Renderer::uberShader);
+
+        shader->setShaderUniformsCallback(UberShaderProgram::ShaderUniformsCallback());
+    }
+};
+
+UberShaderProgram* ShaderTextField::shader = 0;
+
+
+class TestColorFont : public Test
+{
+public:
+    spTextField _txt;
+
+    TestColorFont()
+    {
+        ShaderTextField::init();
+
+        spShaderTextField txt = new ShaderTextField;
+        //spTextField txt = new TextField;
+        txt->attachTo(content);
+        _txt = txt;
+
+        TextStyle st;
+        st.font = resources.getResFont("num_fnt_shdr")->getFont();
+        st.vAlign = TextStyle::VALIGN_MIDDLE;
+        st.hAlign = TextStyle::HALIGN_MIDDLE;
+        //st.color = Color::CornflowerBlue;
+        st.multiline = true;
+        txt->setStyle(st);
+        txt->setColor(Color::CornflowerBlue);
+        txt->setText("1234567890");
+        txt->setPosition(getStage()->getSize() / 2);
+        txt->setOuterColor(Color::White);
+        txt->addTween(ShaderTextField::TweenOuterColor(Color::Black), 4000, -1, true, 2000);
+        txt->addTween(TextField::TweenColor(Color::Magenta), 5000, -1, true);
+    }
+
+    ~TestColorFont()
+    {
+        ShaderTextField::free();
+    }
+
+    void toggleClicked(string id, const toggle* data)
+    {
+
+    }
+};

+ 9 - 0
examples/Demo/src/example.cpp

@@ -24,6 +24,7 @@
 #include "TestTweenText.h"
 #include "TestTweenText.h"
 #include "TestTweenShine.h"
 #include "TestTweenShine.h"
 #include "TestTouches.h"
 #include "TestTouches.h"
+#include "TestColorFont.h"
 
 
 #ifdef __S3E__
 #ifdef __S3E__
 #include "s3eKeyboard.h"
 #include "s3eKeyboard.h"
@@ -71,6 +72,7 @@ public:
         addButton("cliprect", "ClipRect Actor");
         addButton("cliprect", "ClipRect Actor");
         addButton("usershader", "User Shader");
         addButton("usershader", "User Shader");
         addButton("usershader2", "User Shader2");
         addButton("usershader2", "User Shader2");
+        addButton("multicolorfont", "Outer Font Color");
         addButton("mask", "Mask");
         addButton("mask", "Mask");
         addButton("polygon", "Polygon");
         addButton("polygon", "Polygon");
         addButton("inputtext", "Input Text");
         addButton("inputtext", "Input Text");
@@ -218,6 +220,13 @@ public:
         {
         {
             showTest(new TestTweenShine);
             showTest(new TestTweenShine);
         }
         }
+
+        if (id == "multicolorfont")
+        {
+            showTest(new TestColorFont);
+        }
+
+
     }
     }
 };
 };
 
 

+ 1 - 1
examples/DemoBox2D/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/DemoBox2D/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Game/part1/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Game/part1/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Game/part2/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Game/part2/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Game/part3/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Game/part3/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Game/part4/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Game/part4/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Game/part5/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Game/part5/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/HelloWorld/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/HelloWorld/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
examples/Match3/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
examples/Match3/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib

+ 1 - 1
oxygine/SDL/android/extension/AndroidManifest.xml

@@ -1,6 +1,6 @@
 <?xml version="1.0" encoding="utf-8"?>
 <?xml version="1.0" encoding="utf-8"?>
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
 <manifest xmlns:android="http://schemas.android.com/apk/res/android"
-          package="org.oxygine.lib"
+          package="org.oxygine.lib.extension"
           android:versionCode="1"
           android:versionCode="1"
           android:versionName="1.0">
           android:versionName="1.0">
 </manifest> 
 </manifest> 

+ 1 - 1
oxygine/SDL/android/extension/project.properties

@@ -12,4 +12,4 @@
 
 
 android.library=true
 android.library=true
 # Project target.
 # Project target.
-target=android-10
+target=android-16

+ 1 - 1
oxygine/SDL/android/extension/src/org/oxygine/lib/ActivityObservable.java → oxygine/SDL/android/extension/src/org/oxygine/lib/extension/ActivityObservable.java

@@ -1,4 +1,4 @@
-package org.oxygine.lib;
+package org.oxygine.lib.extension;
 
 
 import android.app.Activity;
 import android.app.Activity;
 import android.content.Intent;
 import android.content.Intent;

+ 1 - 1
oxygine/SDL/android/extension/src/org/oxygine/lib/ActivityObserver.java → oxygine/SDL/android/extension/src/org/oxygine/lib/extension/ActivityObserver.java

@@ -1,4 +1,4 @@
-package org.oxygine.lib;
+package org.oxygine.lib.extension;
 
 
 import android.app.Activity;
 import android.app.Activity;
 import android.content.Intent;
 import android.content.Intent;

+ 1 - 1
oxygine/SDL/android/lib/project.properties

@@ -12,5 +12,5 @@
 
 
 android.library=true
 android.library=true
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=../extension
 android.library.reference.1=../extension

+ 2 - 0
oxygine/SDL/android/lib/src/org/oxygine/lib/OxygineActivity.java

@@ -3,6 +3,8 @@ package org.oxygine.lib;
 import android.content.Intent;
 import android.content.Intent;
 import android.os.Bundle;
 import android.os.Bundle;
 import org.libsdl.app.SDLActivity;
 import org.libsdl.app.SDLActivity;
+import org.oxygine.lib.extension.ActivityObservable;
+import org.oxygine.lib.extension.ActivityObserver;
 
 
 /**
 /**
  * OxygineActivity
  * OxygineActivity

+ 19 - 0
oxygine/src/Actor.cpp

@@ -1089,6 +1089,12 @@ namespace oxygine
         return _addTween(tween, false);
         return _addTween(tween, false);
     }
     }
 
 
+    spTween Actor::addTween2(spTween tween, const TweenOptions& opt)
+    {
+        tween->init2(opt);
+        return _addTween(tween, false);
+    }
+
     spTween Actor::getTween(const std::string& name, error_policy ep)
     spTween Actor::getTween(const std::string& name, error_policy ep)
     {
     {
         spTween tween = _tweens._first;
         spTween tween = _tweens._first;
@@ -1324,6 +1330,19 @@ namespace oxygine
         return t;
         return t;
     }
     }
 
 
+    Renderer::transform getGlobalTransform2(spActor child, Actor* parent)
+    {
+        Renderer::transform t;
+        t.identity();
+        while (child.get() != parent)
+        {
+            t = t * child->getTransform();
+            child = child->getParent();
+        }
+
+        return t;
+    }
+
     void changeParentAndSavePosition(spActor mutualParent, spActor actor, spActor newParent)
     void changeParentAndSavePosition(spActor mutualParent, spActor actor, spActor newParent)
     {
     {
         Vector2 pos = actor->getPosition();
         Vector2 pos = actor->getPosition();

+ 2 - 0
oxygine/src/Actor.h

@@ -234,6 +234,7 @@ namespace oxygine
         virtual void updateState() {}
         virtual void updateState() {}
 
 
         spTween addTween(spTween);
         spTween addTween(spTween);
+        spTween addTween2(spTween, const TweenOptions& opt);
 
 
         template<class Prop>
         template<class Prop>
         spTween addTween(const Prop& prop, timeMS duration, int loops = 1, bool twoSides = false, timeMS delay = 0, Tween::EASE ease = Tween::ease_linear)
         spTween addTween(const Prop& prop, timeMS duration, int loops = 1, bool twoSides = false, timeMS delay = 0, Tween::EASE ease = Tween::ease_linear)
@@ -379,6 +380,7 @@ namespace oxygine
 
 
 
 
     Renderer::transform getGlobalTransform(spActor child, spActor parent = 0);
     Renderer::transform getGlobalTransform(spActor child, spActor parent = 0);
+    Renderer::transform getGlobalTransform2(spActor child, Actor* parent = 0);
 
 
     void    changeParentAndSavePosition(spActor mutualParent, spActor actor, spActor newParent);
     void    changeParentAndSavePosition(spActor mutualParent, spActor actor, spActor newParent);
 
 

+ 2 - 1
oxygine/src/Sprite.h

@@ -47,6 +47,8 @@ namespace oxygine
 
 
         typedef oxygine::TweenAnim TweenAnim;
         typedef oxygine::TweenAnim TweenAnim;
         std::string dump(const dumpOptions&) const;
         std::string dump(const dumpOptions&) const;
+
+        void doRender(const RenderState& rs);
     protected:
     protected:
         enum
         enum
         {
         {
@@ -54,7 +56,6 @@ namespace oxygine
         };
         };
         virtual void changeAnimFrame(const AnimationFrame& f);
         virtual void changeAnimFrame(const AnimationFrame& f);
         virtual void animFrameChanged(const AnimationFrame& f);
         virtual void animFrameChanged(const AnimationFrame& f);
-        void doRender(const RenderState& rs);
 
 
         AnimationFrame _frame;
         AnimationFrame _frame;
     };
     };

+ 1 - 0
oxygine/src/Tween.h

@@ -132,6 +132,7 @@ namespace oxygine
         /*set Duration of tween**/
         /*set Duration of tween**/
         void setDuration(timeMS duration) { _duration = duration; }
         void setDuration(timeMS duration) { _duration = duration; }
         void setClient(Actor* client) { _client = client; }
         void setClient(Actor* client) { _client = client; }
+        void setTwoSides(bool ts) { _twoSides = ts; }
 
 
         /**delete actor from parent node when tween done*/
         /**delete actor from parent node when tween done*/
         void setDetachActor(bool detach) { _detach = detach; }
         void setDetachActor(bool detach) { _detach = detach; }

+ 4 - 0
oxygine/src/json/jsoncpp.cpp

@@ -4155,8 +4155,12 @@ namespace Json
 #elif defined(__ANDROID__)
 #elif defined(__ANDROID__)
 #define snprintf snprintf
 #define snprintf snprintf
 #elif __cplusplus >= 201103L
 #elif __cplusplus >= 201103L
+#ifdef __MINGW32__
+#define snprintf snprintf
+#else
 #define snprintf std::snprintf
 #define snprintf std::snprintf
 #endif
 #endif
+#endif
 
 
 #if defined(__BORLANDC__)
 #if defined(__BORLANDC__)
 #include <float.h>
 #include <float.h>

+ 1 - 1
readme/Android.txt

@@ -3,7 +3,7 @@
 =================================================================================================
 =================================================================================================
 How to build. Steps:
 How to build. Steps:
 - Install Android NDK (https://developer.android.com/tools/sdk/ndk/index.html) and set it up
 - Install Android NDK (https://developer.android.com/tools/sdk/ndk/index.html) and set it up
-- Install Android SDK (https://developer.android.com/sdk/index.html) - 10 and 14 (if newer need to fix some properties in example)
+- Install Android SDK (https://developer.android.com/sdk/index.html) - version 16
 - Install apache-ant (http://ant.apache.org/bindownload.cgi)
 - Install apache-ant (http://ant.apache.org/bindownload.cgi)
 - Install JDK version 6/7
 - Install JDK version 6/7
 - Configure environment variables properly:
 - Configure environment variables properly:

+ 1 - 0
tools/others/format.bat

@@ -4,6 +4,7 @@ set astyle=d:\dropbox\tools\AStyle.exe
 %astyle% d:\oxygine-framework\oxygine\src\*.cpp d:\oxygine-framework\oxygine\src\*.h %options% --exclude=winnie_alloc --exclude=pugixml --exclude=minizip --exclude=closure --exclude=Tween.cpp
 %astyle% d:\oxygine-framework\oxygine\src\*.cpp d:\oxygine-framework\oxygine\src\*.h %options% --exclude=winnie_alloc --exclude=pugixml --exclude=minizip --exclude=closure --exclude=Tween.cpp
 
 
 %astyle% d:\oxygine-sound\src\*.cpp d:\oxygine-sound\src\*.h d:\oxygine-sound\examples\*.cpp d:\oxygine-sound\examples\*.h %options%
 %astyle% d:\oxygine-sound\src\*.cpp d:\oxygine-sound\src\*.h d:\oxygine-sound\examples\*.cpp d:\oxygine-sound\examples\*.h %options%
+%astyle% d:\oxygine-flow\src\*.cpp d:\oxygine-flow\src\*.h d:\oxygine-flow\examples\*.cpp d:\oxygine-flow\examples\*.h %options%
 
 
 %astyle% d:\oxygine-magicparticles\src\*.cpp d:\oxygine-magicparticles\src\*.h %options%
 %astyle% d:\oxygine-magicparticles\src\*.cpp d:\oxygine-magicparticles\src\*.h %options%
 
 

+ 3 - 2
tools/others/gen_templates.py

@@ -12,7 +12,7 @@ def gen(path, project = ""):
 	#projs = ("macosx", )	
 	#projs = ("macosx", )	
 	#projs = ("win32", )
 	#projs = ("win32", )
 	#projs = ("cmake", )	
 	#projs = ("cmake", )	
-	#projs = ("android", )
+	projs = ("android", )
 	#projs = ("emscripten", )
 	#projs = ("emscripten", )
 
 
 	for platform in projs:
 	for platform in projs:
@@ -39,4 +39,5 @@ if 1:
 	gen("Match3")
 	gen("Match3")
 
 
 
 
-gen("Demo")
+#gen("Demo")
+#gen("HelloWorld")

+ 1 - 1
tools/templates/proj.android/AndroidManifest.xml

@@ -24,7 +24,7 @@
         </activity>
         </activity>
     </application>
     </application>
 
 
-    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="14" />
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
 
 
     <!-- OpenGL ES 2.0 -->
     <!-- OpenGL ES 2.0 -->
     <uses-feature android:glEsVersion="0x00020000" /> 
     <uses-feature android:glEsVersion="0x00020000" /> 

+ 1 - 1
tools/templates/proj.android/project.properties

@@ -11,5 +11,5 @@
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 #proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
 
 
 # Project target.
 # Project target.
-target=android-14
+target=android-16
 android.library.reference.1=${ROOT}/oxygine-framework/oxygine/SDL/android/lib
 android.library.reference.1=${ROOT}/oxygine-framework/oxygine/SDL/android/lib