Kaynağa Gözat

Merge branch 'master' into dev

# Conflicts:
#	.hg_archival.txt
dmuratshin 10 yıl önce
ebeveyn
işleme
5aed61b8e5
63 değiştirilmiş dosya ile 288 ekleme ve 184 silme
  1. 0 6
      .hg_archival.txt
  2. 0 57
      .hgignore
  3. 0 1
      CMakeLists.txt
  4. 168 3
      cmake/FindSDL2.cmake
  5. 1 1
      examples/Demo/prepare_res.sh
  6. 1 1
      examples/Demo/prepare_res_pvrtc.sh
  7. 1 1
      examples/Demo/prepare_res_pvrtc_high_quality.sh
  8. 2 2
      examples/Demo/proj.android/ant_debug.sh
  9. 2 2
      examples/Demo/proj.android/build-run.sh
  10. 2 2
      examples/Demo/proj.android/build.sh
  11. 2 2
      examples/Demo/proj.android/install.sh
  12. 2 2
      examples/Demo/proj.cmake/run.sh
  13. 2 2
      examples/DemoBox2D/proj.android/ant_debug.sh
  14. 2 2
      examples/DemoBox2D/proj.android/build-run.sh
  15. 2 2
      examples/DemoBox2D/proj.android/build.sh
  16. 2 2
      examples/DemoBox2D/proj.android/install.sh
  17. 2 2
      examples/DemoBox2D/proj.cmake/run.sh
  18. 2 2
      examples/Game/part1/proj.android/ant_debug.sh
  19. 2 2
      examples/Game/part1/proj.android/build-run.sh
  20. 2 2
      examples/Game/part1/proj.android/build.sh
  21. 2 2
      examples/Game/part1/proj.android/install.sh
  22. 2 2
      examples/Game/part1/proj.cmake/CMakeLists.txt
  23. 2 2
      examples/Game/part1/proj.cmake/run.sh
  24. 2 2
      examples/Game/part2/proj.android/ant_debug.sh
  25. 2 2
      examples/Game/part2/proj.android/build-run.sh
  26. 2 2
      examples/Game/part2/proj.android/build.sh
  27. 2 2
      examples/Game/part2/proj.android/install.sh
  28. 2 2
      examples/Game/part2/proj.cmake/run.sh
  29. 2 2
      examples/Game/part3/proj.android/ant_debug.sh
  30. 2 2
      examples/Game/part3/proj.android/build-run.sh
  31. 2 2
      examples/Game/part3/proj.android/build.sh
  32. 2 2
      examples/Game/part3/proj.android/install.sh
  33. 2 2
      examples/Game/part3/proj.cmake/run.sh
  34. 2 2
      examples/Game/part4/proj.android/ant_debug.sh
  35. 2 2
      examples/Game/part4/proj.android/build-run.sh
  36. 2 2
      examples/Game/part4/proj.android/build.sh
  37. 2 2
      examples/Game/part4/proj.android/install.sh
  38. 2 2
      examples/Game/part4/proj.cmake/run.sh
  39. 2 2
      examples/Game/part5/gen-atlasses-android(ETC1).sh
  40. 2 2
      examples/Game/part5/gen-atlasses-ios(PVRTC).sh
  41. 1 1
      examples/Game/part5/gen-atlasses-low-definition.sh
  42. 1 1
      examples/Game/part5/gen-atlasses.sh
  43. 2 2
      examples/Game/part5/proj.android/ant_debug.sh
  44. 2 2
      examples/Game/part5/proj.android/build-run.sh
  45. 2 2
      examples/Game/part5/proj.android/build.sh
  46. 2 2
      examples/Game/part5/proj.android/install.sh
  47. 2 2
      examples/Game/part5/proj.cmake/run.sh
  48. 2 2
      examples/HelloWorld/proj.android/ant_debug.sh
  49. 2 2
      examples/HelloWorld/proj.android/build-run.sh
  50. 2 2
      examples/HelloWorld/proj.android/build.sh
  51. 2 2
      examples/HelloWorld/proj.android/install.sh
  52. 2 2
      examples/HelloWorld/proj.cmake/run.sh
  53. 2 2
      examples/Match3/proj.android/ant_debug.sh
  54. 2 2
      examples/Match3/proj.android/build-run.sh
  55. 2 2
      examples/Match3/proj.android/build.sh
  56. 2 2
      examples/Match3/proj.android/install.sh
  57. 1 1
      examples/Match3/proj.cmake/run.sh
  58. 10 7
      readme.md
  59. 2 2
      tools/templates/proj.android/ant_debug.sh
  60. 2 2
      tools/templates/proj.android/build-run.sh
  61. 2 2
      tools/templates/proj.android/build.sh
  62. 2 2
      tools/templates/proj.android/install.sh
  63. 2 2
      tools/templates/proj.cmake/run.sh

+ 0 - 6
.hg_archival.txt

@@ -1,6 +0,0 @@
-repo: b6d71054df5712e643a0685bc3ba54b123db5729
-node: 4a9c0fc4ade726fe37918fa3c22cc7692452fa05
-branch: material
-latesttag: oldrender
-latesttagdistance: 1004
-changessincelatesttag: 1222

+ 0 - 57
.hgignore

@@ -1,57 +0,0 @@
-syntax: glob
-*/proj.android/obj/
-*/proj.android/out/
-*/proj.emscripten/build/
-*/proj.emscripten/build_release/
-*/proj.marmalade/build_*
-*/proj.win32/Debug/
-*/proj.win32/Release/
-*.pyc
-*.opensdf
-*.sdf
-oxygine/SDL/win32/Debug_*
-examples/*/data/*.dll
-oxygine/SDL/win32/Debug/
-oxygine/SDL/win32/Release/
-*.suo
-examples/*/proj.win32/Debug*
-examples/*/proj.win32/Release*
-examples/*/proj.win32/ipch/
-oxygine/SDL/win32/Release*
-oxygine/SDL/win32/Debug*
-oxygine/system_data/data/
-examples/*/proj.emscripten/data.js
-oxygine/system_data/system.zip
-examples/Game/*/proj.emscripten/data.js
-oxygine/SDL/android/lib/gen/
-.idea
-examples/*/proj.android/gen/
-examples/*/proj.android/bin/
-oxygine/SDL/android/lib/bin/
-examples/*/data-ram/
-examples/*/proj.android/libs/
-oxygine/SDL/android/lib/src/org/libsdl/app/SDLActivity.java
-oxygine-framework-with-sdl.zip
-oxygine-framework.zip
-*.orig
-xcuserdata
-contents.xcworkspacedata
-*.xcscmblueprint
-examples/Demo/data/res.xml.ox
-examples/*/proj.cmake/build/
-temp/
-examples/Game/*/proj.cmake/build/
-examples/HelloWorld/build_helloworld_*
-examples/Game/*/proj.android/bin/
-examples/Game/*/proj.android/libs/
-examples/Game/*/proj.android/gen/
-examples/Match3/build_match3_*
-libs/SDL2main.lib
-libs/SDL2.lib
-libs/SDL2.dll
-examples/Game/part2/build_game_vc12/
-oxygine/SDL/android/extension/gen/
-oxygine/SDL/android/extension/bin/
-*.exp
-*.pdb
-*/Debug_v*

+ 0 - 1
CMakeLists.txt

@@ -242,4 +242,3 @@ message(STATUS "Platform: ${PLATFORM}")
 set(CMAKE_INSTALL_PREFIX ../libs)
 install(TARGETS oxygine-framework CONFIGURATIONS Debug DESTINATION ./debug)
 install(TARGETS oxygine-framework CONFIGURATIONS Release DESTINATION ./release)
-

+ 168 - 3
cmake/FindSDL2.cmake

@@ -1,3 +1,168 @@
-SET(SDL2_FOUND TRUE)
-set(SDL2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/../sdl/include)
-set(SDL2_LIBRARIES sdl2)
+# This module defines
+# SDL2_LIBRARY, the name of the library to link against
+# SDL2_FOUND, if false, do not try to link to SDL2
+# SDL2_INCLUDE_DIR, where to find SDL.h
+#
+# This module responds to the the flag:
+# SDL2_BUILDING_LIBRARY
+# If this is defined, then no SDL2main will be linked in because
+# only applications need main().
+# Otherwise, it is assumed you are building an application and this
+# module will attempt to locate and set the the proper link flags
+# as part of the returned SDL2_LIBRARY variable.
+#
+# Don't forget to include SDLmain.h and SDLmain.m your project for the
+# OS X framework based version. (Other versions link to -lSDL2main which
+# this module will try to find on your behalf.) Also for OS X, this
+# module will automatically add the -framework Cocoa on your behalf.
+#
+#
+# Additional Note: If you see an empty SDL2_LIBRARY_TEMP in your configuration
+# and no SDL2_LIBRARY, it means CMake did not find your SDL2 library
+# (SDL2.dll, libsdl2.so, SDL2.framework, etc).
+# Set SDL2_LIBRARY_TEMP to point to your SDL2 library, and configure again.
+# Similarly, if you see an empty SDL2MAIN_LIBRARY, you should set this value
+# as appropriate. These values are used to generate the final SDL2_LIBRARY
+# variable, but when these values are unset, SDL2_LIBRARY does not get created.
+#
+#
+# $SDL2DIR is an environment variable that would
+# correspond to the ./configure --prefix=$SDL2DIR
+# used in building SDL2.
+# l.e.galup  9-20-02
+#
+# Modified by Eric Wing.
+# Added code to assist with automated building by using environmental variables
+# and providing a more controlled/consistent search behavior.
+# Added new modifications to recognize OS X frameworks and
+# additional Unix paths (FreeBSD, etc).
+# Also corrected the header search path to follow "proper" SDL guidelines.
+# Added a search for SDL2main which is needed by some platforms.
+# Added a search for threads which is needed by some platforms.
+# Added needed compile switches for MinGW.
+#
+# On OSX, this will prefer the Framework version (if found) over others.
+# People will have to manually change the cache values of
+# SDL2_LIBRARY to override this selection or set the CMake environment
+# CMAKE_INCLUDE_PATH to modify the search paths.
+#
+# Note that the header path has changed from SDL2/SDL.h to just SDL.h
+# This needed to change because "proper" SDL convention
+# is #include "SDL.h", not <SDL2/SDL.h>. This is done for portability
+# reasons because not all systems place things in SDL2/ (see FreeBSD).
+
+#=============================================================================
+# Copyright 2003-2009 Kitware, Inc.
+#
+# Distributed under the OSI-approved BSD License (the "License");
+# see accompanying file Copyright.txt for details.
+#
+# This software is distributed WITHOUT ANY WARRANTY; without even the
+# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+# See the License for more information.
+#=============================================================================
+# (To distribute this file outside of CMake, substitute the full
+#  License text for the above reference.)
+
+message("<FindSDL2.cmake>")
+
+SET(SDL2_SEARCH_PATHS
+	~/Library/Frameworks
+	/Library/Frameworks
+	/usr/local
+	/usr
+	/sw # Fink
+	/opt/local # DarwinPorts
+	/opt/csw # Blastwave
+	/opt
+	${SDL2_PATH}
+)
+
+FIND_PATH(SDL2_INCLUDE_DIR SDL.h
+	HINTS
+	$ENV{SDL2DIR}
+	PATH_SUFFIXES include/SDL2 include
+	PATHS ${SDL2_SEARCH_PATHS}
+)
+
+FIND_LIBRARY(SDL2_LIBRARY_TEMP
+	NAMES SDL2
+	HINTS
+	$ENV{SDL2DIR}
+	PATH_SUFFIXES lib64 lib
+	PATHS ${SDL2_SEARCH_PATHS}
+)
+
+IF(NOT SDL2_BUILDING_LIBRARY)
+	IF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
+		# Non-OS X framework versions expect you to also dynamically link to
+		# SDL2main. This is mainly for Windows and OS X. Other (Unix) platforms
+		# seem to provide SDL2main for compatibility even though they don't
+		# necessarily need it.
+		FIND_LIBRARY(SDL2MAIN_LIBRARY
+			NAMES SDL2main
+			HINTS
+			$ENV{SDL2DIR}
+			PATH_SUFFIXES lib64 lib
+			PATHS ${SDL2_SEARCH_PATHS}
+		)
+	ENDIF(NOT ${SDL2_INCLUDE_DIR} MATCHES ".framework")
+ENDIF(NOT SDL2_BUILDING_LIBRARY)
+
+# SDL2 may require threads on your system.
+# The Apple build may not need an explicit flag because one of the
+# frameworks may already provide it.
+# But for non-OSX systems, I will use the CMake Threads package.
+IF(NOT APPLE)
+	FIND_PACKAGE(Threads)
+ENDIF(NOT APPLE)
+
+# MinGW needs an additional library, mwindows
+# It's total link flags should look like -lmingw32 -lSDL2main -lSDL2 -lmwindows
+# (Actually on second look, I think it only needs one of the m* libraries.)
+IF(MINGW)
+	SET(MINGW32_LIBRARY mingw32 CACHE STRING "mwindows for MinGW")
+ENDIF(MINGW)
+
+IF(SDL2_LIBRARY_TEMP)
+	# For SDL2main
+	IF(NOT SDL2_BUILDING_LIBRARY)
+		IF(SDL2MAIN_LIBRARY)
+			SET(SDL2_LIBRARY_TEMP ${SDL2MAIN_LIBRARY} ${SDL2_LIBRARY_TEMP})
+		ENDIF(SDL2MAIN_LIBRARY)
+	ENDIF(NOT SDL2_BUILDING_LIBRARY)
+
+	# For OS X, SDL2 uses Cocoa as a backend so it must link to Cocoa.
+	# CMake doesn't display the -framework Cocoa string in the UI even
+	# though it actually is there if I modify a pre-used variable.
+	# I think it has something to do with the CACHE STRING.
+	# So I use a temporary variable until the end so I can set the
+	# "real" variable in one-shot.
+	IF(APPLE)
+		SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} "-framework Cocoa")
+	ENDIF(APPLE)
+
+	# For threads, as mentioned Apple doesn't need this.
+	# In fact, there seems to be a problem if I used the Threads package
+	# and try using this line, so I'm just skipping it entirely for OS X.
+	IF(NOT APPLE)
+		SET(SDL2_LIBRARY_TEMP ${SDL2_LIBRARY_TEMP} ${CMAKE_THREAD_LIBS_INIT})
+	ENDIF(NOT APPLE)
+
+	# For MinGW library
+	IF(MINGW)
+		SET(SDL2_LIBRARY_TEMP ${MINGW32_LIBRARY} ${SDL2_LIBRARY_TEMP})
+	ENDIF(MINGW)
+
+	# Set the final string here so the GUI reflects the final state.
+	SET(SDL2_LIBRARY ${SDL2_LIBRARY_TEMP} CACHE STRING "Where the SDL2 Library can be found")
+	# Set the temp variable to INTERNAL so it is not seen in the CMake GUI
+	SET(SDL2_LIBRARY_TEMP "${SDL2_LIBRARY_TEMP}" CACHE INTERNAL "")
+ENDIF(SDL2_LIBRARY_TEMP)
+
+message("</FindSDL2.cmake>")
+
+INCLUDE(FindPackageHandleStandardArgs)
+
+FIND_PACKAGE_HANDLE_STANDARD_ARGS(SDL2 REQUIRED_VARS SDL2_LIBRARY SDL2_INCLUDE_DIR)
+

+ 1 - 1
examples/Demo/prepare_res.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env sh
 python ../../tools/oxyresbuild.py -x xmls/res.xml --src_data data --dest_data data

+ 1 - 1
examples/Demo/prepare_res_pvrtc.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env sh
 python ../../tools/oxyresbuild.py -x xmls/res.xml --src_data data --dest_data data --compress pvrtc

+ 1 - 1
examples/Demo/prepare_res_pvrtc_high_quality.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env sh
 python ../../tools/oxyresbuild.py -x xmls/res.xml --src_data data --dest_data data --compress pvrtc -q best

+ 2 - 2
examples/Demo/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Demo/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Demo/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../ $@

+ 2 - 2
examples/Demo/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/Demo-debug.apk
-adb shell am start -n org.oxygine.Demo/org.oxygine.Demo.MainActivity
+adb shell am start -n org.oxygine.Demo/org.oxygine.Demo.MainActivity

+ 2 - 2
examples/Demo/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/Demo
+./../proj.cmake/build/Demo

+ 2 - 2
examples/DemoBox2D/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/DemoBox2D/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/DemoBox2D/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../ $@

+ 2 - 2
examples/DemoBox2D/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/DemoBox2D-debug.apk
-adb shell am start -n org.oxygine.DemoBox2D/org.oxygine.DemoBox2D.MainActivity
+adb shell am start -n org.oxygine.DemoBox2D/org.oxygine.DemoBox2D.MainActivity

+ 2 - 2
examples/DemoBox2D/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/DemoBox2D
+./../proj.cmake/build/DemoBox2D

+ 2 - 2
examples/Game/part1/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Game/part1/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Game/part1/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../../ $@

+ 2 - 2
examples/Game/part1/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/GamePart1-debug.apk
-adb shell am start -n org.oxygine.GamePart1/org.oxygine.GamePart1.MainActivity
+adb shell am start -n org.oxygine.GamePart1/org.oxygine.GamePart1.MainActivity

+ 2 - 2
examples/Game/part1/proj.cmake/CMakeLists.txt

@@ -6,11 +6,11 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_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 -Wswitch")
 add_executable(GamePart1 ../src/Game.cpp ../src/Joystick.cpp ../src/Player.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Game.h ../src/Joystick.h ../src/Player.h ../src/Unit.h ../src/example.h ../src/res.h )
 
 if (WIN32) #disable console mode for VC++
 	set_target_properties(GamePart1 PROPERTIES WIN32_EXECUTABLE TRUE)
 endif(WIN32)
 
-target_link_libraries(GamePart1 ${OXYGINE_CORE_LIBS})
+target_link_libraries(GamePart1 ${OXYGINE_CORE_LIBS})

+ 2 - 2
examples/Game/part1/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/GamePart1
+./../proj.cmake/build/GamePart1

+ 2 - 2
examples/Game/part2/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Game/part2/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Game/part2/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../../ $@

+ 2 - 2
examples/Game/part2/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/GamePart2-debug.apk
-adb shell am start -n org.oxygine.GamePart2/org.oxygine.GamePart2.MainActivity
+adb shell am start -n org.oxygine.GamePart2/org.oxygine.GamePart2.MainActivity

+ 2 - 2
examples/Game/part2/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/GamePart2
+./../proj.cmake/build/GamePart2

+ 2 - 2
examples/Game/part3/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Game/part3/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Game/part3/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../../ $@

+ 2 - 2
examples/Game/part3/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/GamePart3-debug.apk
-adb shell am start -n org.oxygine.GamePart3/org.oxygine.GamePart3.MainActivity
+adb shell am start -n org.oxygine.GamePart3/org.oxygine.GamePart3.MainActivity

+ 2 - 2
examples/Game/part3/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/GamePart3
+./../proj.cmake/build/GamePart3

+ 2 - 2
examples/Game/part4/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Game/part4/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Game/part4/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../../ $@

+ 2 - 2
examples/Game/part4/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/GamePart4-debug.apk
-adb shell am start -n org.oxygine.GamePart4/org.oxygine.GamePart4.MainActivity
+adb shell am start -n org.oxygine.GamePart4/org.oxygine.GamePart4.MainActivity

+ 2 - 2
examples/Game/part4/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/GamePart4
+./../proj.cmake/build/GamePart4

+ 2 - 2
examples/Game/part5/gen-atlasses-android(ETC1).sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-python ../../../tools/oxyresbuild.py -x xmls/ui.xml --src_data data --dest_data data --compress etc1
+#!/usr/bin/env sh
+python ../../../tools/oxyresbuild.py -x xmls/ui.xml --src_data data --dest_data data --compress etc1

+ 2 - 2
examples/Game/part5/gen-atlasses-ios(PVRTC).sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-python ../../../tools/oxyresbuild.py -x xmls/ui.xml --src_data data --dest_data data --compress pvrtc --quality best
+#!/usr/bin/env sh
+python ../../../tools/oxyresbuild.py -x xmls/ui.xml --src_data data --dest_data data --compress pvrtc --quality best

+ 1 - 1
examples/Game/part5/gen-atlasses-low-definition.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env sh
 python ../../../tools/oxyresbuild.py -x xmls/ui.xml --src_data data --dest_data data -s 0.5 -r

+ 1 - 1
examples/Game/part5/gen-atlasses.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
+#!/usr/bin/env sh
 python ../../../tools/oxyresbuild.py -x xmls/ui.xml --src_data data --dest_data data

+ 2 - 2
examples/Game/part5/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Game/part5/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Game/part5/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../../ $@

+ 2 - 2
examples/Game/part5/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/GamePart5-debug.apk
-adb shell am start -n org.oxygine.GamePart5/org.oxygine.GamePart5.MainActivity
+adb shell am start -n org.oxygine.GamePart5/org.oxygine.GamePart5.MainActivity

+ 2 - 2
examples/Game/part5/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/GamePart5
+./../proj.cmake/build/GamePart5

+ 2 - 2
examples/HelloWorld/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/HelloWorld/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/HelloWorld/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../ $@

+ 2 - 2
examples/HelloWorld/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/HelloWorld-debug.apk
-adb shell am start -n org.oxygine.HelloWorld/org.oxygine.HelloWorld.MainActivity
+adb shell am start -n org.oxygine.HelloWorld/org.oxygine.HelloWorld.MainActivity

+ 2 - 2
examples/HelloWorld/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/HelloWorld
+./../proj.cmake/build/HelloWorld

+ 2 - 2
examples/Match3/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
examples/Match3/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
examples/Match3/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=../../../../ $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=../../../../ $@

+ 2 - 2
examples/Match3/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/Match3-debug.apk
-adb shell am start -n org.oxygine.Match3/org.oxygine.Match3.MainActivity
+adb shell am start -n org.oxygine.Match3/org.oxygine.Match3.MainActivity

+ 1 - 1
examples/Match3/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build

+ 10 - 7
readme.md

@@ -1,8 +1,8 @@
 # BUILD AND RUN   
 See **oxygine-framework/readme/** folder. It has insructions how to build and run oxygine on different platforms.
 
-# Online documentation available at
-https://bitbucket.org/oxygine/oxygine-framework/wiki/Home
+# Wiki available at
+https://github.com/oxygine/oxygine-framework/wiki
 
 
 # Oxygine is C++ engine for 2D mobile games. 
@@ -30,18 +30,21 @@ Source code is available under MIT license (use for free anywhere).
 ```cpp
 //create sprite and display it
 spSprite sprite = new Sprite();
-sprite->setResAnim(gameResources.getResAnim("anim"));
 sprite->attachTo(getStage());
-sprite->setScale(0.5f);
 
 //run animation tween
-sprite->addTween(TweenAnim(gameResources.getResAnim("anim2")), duration, loops);
+sprite->addTween(Sprite::TweenAnim(gameResources.getResAnim("anim2")), duration, loops);
 
 //run position tween
 sprite->addTween(Sprite::TweenPosition(x, y), duration, loops);
 
-//handle events
-sprite->addEventListener(TouchEvent::CLICK, clickHandler);
+//handle click event
+sprite->addEventListener(TouchEvent::CLICK, [sprite](Event*){
+    
+    log::messageln("clicked to sprite!");
+    //change sprite color
+    sprite->setColor(Color::Gray);
+});
 ```		     
 
 ##Features:

+ 2 - 2
tools/templates/proj.android/ant_debug.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ant debug
+#!/usr/bin/env sh
+ant debug

+ 2 - 2
tools/templates/proj.android/build-run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 sh build.sh
 sh ant_debug.sh
-sh install.sh
+sh install.sh

+ 2 - 2
tools/templates/proj.android/build.sh

@@ -1,2 +1,2 @@
-#!/bin/bash
-ndk-build NDK_MODULE_PATH=${ROOT} $@
+#!/usr/bin/env sh
+ndk-build NDK_MODULE_PATH=${ROOT} $@

+ 2 - 2
tools/templates/proj.android/install.sh

@@ -1,3 +1,3 @@
-#!/bin/bash
+#!/usr/bin/env sh
 adb install -r bin/${PROJECT}-debug.apk
-adb shell am start -n org.oxygine.${PROJECT}/org.oxygine.${PROJECT}.MainActivity
+adb shell am start -n org.oxygine.${PROJECT}/org.oxygine.${PROJECT}.MainActivity

+ 2 - 2
tools/templates/proj.cmake/run.sh

@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/usr/bin/env sh
 
 mkdir build
 cd build
@@ -13,4 +13,4 @@ make
 cd ../../data
 
 #run executable
-./../proj.cmake/build/${PROJECT}
+./../proj.cmake/build/${PROJECT}