Browse Source

added emscripten support
updated ios/macosx builds
added deprecated
renamed TextActor to TextField
improved zip file system
use glBindBuffer
improved resources

Denis Muratshin 11 years ago
parent
commit
d0a624c74a
100 changed files with 1237 additions and 2882 deletions
  1. 2 2
      .hg_archival.txt
  2. 7 0
      .hgignore
  3. 19 4
      CMakeLists.txt
  4. BIN
      examples/Demo/data/demo/logo2.png
  5. 1 1
      examples/Demo/data/development.icf
  6. 1 1
      examples/Demo/proj.cmake/CMakeLists.txt
  7. 19 0
      examples/Demo/proj.emscripten/CMakeLists.txt
  8. 7 0
      examples/Demo/proj.emscripten/build.bat
  9. 7 0
      examples/Demo/proj.emscripten/build_release.bat
  10. BIN
      examples/Demo/proj.flash/AGAL.abc
  11. 0 342
      examples/Demo/proj.flash/AGAL.h
  12. BIN
      examples/Demo/proj.flash/AGAL.o
  13. 0 594
      examples/Demo/proj.flash/AGAL_internal.h
  14. BIN
      examples/Demo/proj.flash/Console.abc
  15. 0 216
      examples/Demo/proj.flash/Console.as
  16. 0 36
      examples/Demo/proj.flash/Makefile
  17. 0 29
      examples/Demo/proj.flash/Makefile.common
  18. 0 14
      examples/Demo/proj.flash/exports.txt
  19. 0 667
      examples/Demo/proj.flash/fcc_sscanf.c
  20. 0 5
      examples/Demo/proj.flash/fcc_sscanf.h
  21. 0 67
      examples/Demo/proj.flash/index.html
  22. 0 3
      examples/Demo/proj.flash/swfobject.js
  23. 39 34
      examples/Demo/proj.ios/demo_ios.xcodeproj/project.pbxproj
  24. 1 1
      examples/Demo/proj.macosx/Demo_macosx-Info.plist
  25. 34 34
      examples/Demo/proj.macosx/demo_macosx.xcodeproj/project.pbxproj
  26. 1 1
      examples/Demo/proj.win32/Demo_vs2010.vcxproj
  27. 1 1
      examples/Demo/proj.win32/Demo_vs2013.vcxproj
  28. 2 2
      examples/Demo/src/TestInputText.h
  29. 8 1
      examples/Demo/src/TestManageRes.h
  30. 1 1
      examples/Demo/src/TestMask.h
  31. 1 1
      examples/Demo/src/TestSliding.h
  32. 4 4
      examples/Demo/src/TestText.h
  33. 30 16
      examples/Demo/src/entry_point.cpp
  34. 7 7
      examples/Demo/src/test.cpp
  35. 10 0
      examples/DemoBox2D/proj.marmalade/data/app.config.txt
  36. 17 0
      examples/DemoBox2D/proj.marmalade/data/app.icf
  37. 34 16
      examples/DemoBox2D/src/entry_point.cpp
  38. 1 1
      examples/Game/part1/proj.android/jni/src/Android.mk
  39. 1 1
      examples/Game/part1/proj.cmake/CMakeLists.txt
  40. 19 0
      examples/Game/part1/proj.emscripten/CMakeLists.txt
  41. 7 0
      examples/Game/part1/proj.emscripten/build.bat
  42. 7 0
      examples/Game/part1/proj.emscripten/build_release.bat
  43. 45 40
      examples/Game/part1/proj.ios/GamePart1_ios.xcodeproj/project.pbxproj
  44. 1 1
      examples/Game/part1/proj.macosx/GamePart1_macosx-Info.plist
  45. 40 40
      examples/Game/part1/proj.macosx/GamePart1_macosx.xcodeproj/project.pbxproj
  46. 2 2
      examples/Game/part1/proj.win32/GamePart1_vs2010.vcxproj
  47. 2 2
      examples/Game/part1/proj.win32/GamePart1_vs2013.vcxproj
  48. 34 16
      examples/Game/part1/src/entry_point.cpp
  49. 1 1
      examples/Game/part2/proj.android/jni/src/Android.mk
  50. 1 1
      examples/Game/part2/proj.cmake/CMakeLists.txt
  51. 19 0
      examples/Game/part2/proj.emscripten/CMakeLists.txt
  52. 7 0
      examples/Game/part2/proj.emscripten/build.bat
  53. 7 0
      examples/Game/part2/proj.emscripten/build_release.bat
  54. 51 46
      examples/Game/part2/proj.ios/GamePart2_ios.xcodeproj/project.pbxproj
  55. 1 1
      examples/Game/part2/proj.macosx/GamePart2_macosx-Info.plist
  56. 46 46
      examples/Game/part2/proj.macosx/GamePart2_macosx.xcodeproj/project.pbxproj
  57. 2 2
      examples/Game/part2/proj.win32/GamePart2_vs2010.vcxproj
  58. 2 2
      examples/Game/part2/proj.win32/GamePart2_vs2013.vcxproj
  59. 34 16
      examples/Game/part2/src/entry_point.cpp
  60. 1 1
      examples/Game/part3/proj.android/jni/src/Android.mk
  61. 1 1
      examples/Game/part3/proj.cmake/CMakeLists.txt
  62. 19 0
      examples/Game/part3/proj.emscripten/CMakeLists.txt
  63. 7 0
      examples/Game/part3/proj.emscripten/build.bat
  64. 7 0
      examples/Game/part3/proj.emscripten/build_release.bat
  65. 75 70
      examples/Game/part3/proj.ios/GamePart3_ios.xcodeproj/project.pbxproj
  66. 1 1
      examples/Game/part3/proj.macosx/GamePart3_macosx-Info.plist
  67. 70 70
      examples/Game/part3/proj.macosx/GamePart3_macosx.xcodeproj/project.pbxproj
  68. 2 2
      examples/Game/part3/proj.win32/GamePart3_vs2010.vcxproj
  69. 2 2
      examples/Game/part3/proj.win32/GamePart3_vs2013.vcxproj
  70. 34 16
      examples/Game/part3/src/entry_point.cpp
  71. 1 1
      examples/Game/part4/proj.android/jni/src/Android.mk
  72. 1 1
      examples/Game/part4/proj.cmake/CMakeLists.txt
  73. 19 0
      examples/Game/part4/proj.emscripten/CMakeLists.txt
  74. 7 0
      examples/Game/part4/proj.emscripten/build.bat
  75. 7 0
      examples/Game/part4/proj.emscripten/build_release.bat
  76. 81 76
      examples/Game/part4/proj.ios/GamePart4_ios.xcodeproj/project.pbxproj
  77. 1 1
      examples/Game/part4/proj.macosx/GamePart4_macosx-Info.plist
  78. 76 76
      examples/Game/part4/proj.macosx/GamePart4_macosx.xcodeproj/project.pbxproj
  79. 2 2
      examples/Game/part4/proj.win32/GamePart4_vs2010.vcxproj
  80. 2 2
      examples/Game/part4/proj.win32/GamePart4_vs2013.vcxproj
  81. 3 3
      examples/Game/part4/src/GameMenu.cpp
  82. 2 2
      examples/Game/part4/src/MyButton.cpp
  83. 1 1
      examples/Game/part4/src/MyButton.h
  84. 1 1
      examples/Game/part4/src/Scene.cpp
  85. 34 16
      examples/Game/part4/src/entry_point.cpp
  86. 18 0
      examples/HelloWorld/data/data.js
  87. 0 164
      examples/HelloWorld/data/fonts/system.fnt
  88. BIN
      examples/HelloWorld/data/fonts/system_0.png
  89. 27 0
      examples/HelloWorld/data/pack.py
  90. 19 0
      examples/HelloWorld/proj.emscripten/CMakeLists.txt
  91. 7 0
      examples/HelloWorld/proj.emscripten/build.bat
  92. 7 0
      examples/HelloWorld/proj.emscripten/build_release.bat
  93. 27 18
      examples/HelloWorld/proj.ios/HelloWorld_ios.xcodeproj/project.pbxproj
  94. 1 1
      examples/HelloWorld/proj.macosx/HelloWorld_macosx-Info.plist
  95. 22 18
      examples/HelloWorld/proj.macosx/HelloWorld_macosx.xcodeproj/project.pbxproj
  96. 34 16
      examples/HelloWorld/src/entry_point.cpp
  97. 2 2
      examples/HelloWorld/src/example.cpp
  98. 19 0
      examples/Match3/proj.emscripten/CMakeLists.txt
  99. 7 0
      examples/Match3/proj.emscripten/build.bat
  100. 7 0
      examples/Match3/proj.emscripten/build_release.bat

+ 2 - 2
.hg_archival.txt

@@ -1,5 +1,5 @@
 repo: b6d71054df5712e643a0685bc3ba54b123db5729
-node: 81dbbfb32b4389cc6e447e0356fc46e4d82e83e9
+node: 096eec250df8a0971ef7250f3a92bceaa2f3ff63
 branch: default
 latesttag: oldrender
-latesttagdistance: 281
+latesttagdistance: 315

+ 7 - 0
.hgignore

@@ -122,5 +122,12 @@ examples/Demo/proj.android/local.properties
 proguard-project.txt
 examples/Demo/proj.marmalade/build_demo_
 examples/Demo/proj.marmalade/build_demo_*
+examples/DemoBox2D/data/*.dll
+examples/Game/part4/data/*.dll
+examples/HelloWorld/data/*.dll
+examples/Match3/data/*.dll
+examples/TutorialResources/data/*.dll
+examples/Demo/proj.win32/Win32/
+data.js
 syntax: regexp
 ^build/

+ 19 - 4
CMakeLists.txt

@@ -25,7 +25,12 @@ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/oxygine/greenlets/src/)
 set(OX_HAVE_LIBJPEG 1)
 set(OX_HAVE_LIBPNG 1)
 
-if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
+if (EMSCRIPTEN)
+	set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+	set(OX_HAVE_LIBJPEG 0)
+	set(OX_HAVE_LIBPNG 1)
+	set(THIRD_PARTY ${CMAKE_CURRENT_SOURCE_DIR}/oxygine/third_party/emscripten)
+elseif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
 	set(THIRD_PARTY ${CMAKE_CURRENT_SOURCE_DIR}/oxygine/third_party/linux)
 elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
 	set(THIRD_PARTY ${CMAKE_CURRENT_SOURCE_DIR}/oxygine/third_party/ios)
@@ -89,6 +94,8 @@ if (WIN32)
 		${CORE_LIBS}
 		pthreadVCE2
 		)
+elseif(EMSCRIPTEN)
+
 else(WIN32)
 	set(CORE_LIBS
 		${CORE_LIBS}
@@ -106,9 +113,17 @@ if (OX_HAVE_LIBPNG)
 endif(OX_HAVE_LIBPNG)
 
 #add z library
-set(CORE_LIBS
-	${CORE_LIBS}
-	${libprefix}z${libprefix})
+if (EMSCRIPTEN)
+	set(CORE_LIBS
+		${CORE_LIBS}
+		libz
+		libpng16
+	)
+else(EMSCRIPTEN)
+	set(CORE_LIBS
+		${CORE_LIBS}
+		${libprefix}z${libprefix})
+endif(EMSCRIPTEN)
 
 #add jpeg library
 if (OX_HAVE_LIBJPEG)

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


+ 1 - 1
examples/Demo/data/development.icf

@@ -36,7 +36,7 @@ DeviceUniqueIDInt              = Type=int, Default="01234567890", Value = "01234
 FileTotalStorageSize           = Type=int, Min=0.000000, Max=2147483648.000000, Default="67108864", Value = "67108864"
 FileUseSeparateRomRam          = Type=bool, Default="true", Value = "true"
 FileUseTotalStorageSize        = Type=bool, Default="false", Value = "false"
-GLAPI                          = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE" "GLES 2.0 ANGLE DirectX 11", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting"
+GLAPI                          = Type=string, Allowed="None" "GLES 1.0 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.1 Common-Lite Profile from Imagination POWERVR(TM)" "GLES 1.0 Common Profile from Imagination POWERVR(TM)" "GLES 1.1 Common Profile from Imagination POWERVR(TM)" "GLES 2.0 from Imagination POWERVR(TM)" "GLES 3.0 from Imagination POWERVR(TM)" "Obey [S3E] SysGlesVersion .icf setting" "GLES 1.1 Common Profile from Qualcomm Snapdragon(TM)" "GLES 2.0 from Qualcomm Snapdragon(TM)" "GLES 2.0 ANGLE" "GLES 2.0 ANGLE DirectX 11", Default="Obey [S3E] SysGlesVersion .icf setting", Value = "Obey [S3E] SysGlesVersion .icf setting"
 GLDontUseHiddenWindow          = Type=bool, Default="false", Value = "false"
 GLTerminateOnSuspend           = Type=bool, Default="false", Value = "false"
 GLUsePVRVFrame                 = Type=bool, Default="false", Value = "false"

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

@@ -6,6 +6,6 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
-add_executable(Demo ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp  ../src/example.h ../src/test.h ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestDrag.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweens.h ../src/TestUserShader.h )
+add_executable(Demo ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp  ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestDrag.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweens.h ../src/TestUserShader.h ../src/example.h ../src/test.h )
 
 target_link_libraries(Demo ${OXYGINE_CORE_LIBS})

+ 19 - 0
examples/Demo/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (Demo)
+
+add_subdirectory(../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+add_executable(Demo ../src/entry_point.cpp ../src/example.cpp ../src/test.cpp  ../src/TestBox9Sprite.h ../src/TestClipRect.h ../src/TestDrag.h ../src/TestInputText.h ../src/TestManageRes.h ../src/TestMask.h ../src/TestPerf.h ../src/TestProgressBar.h ../src/TestRender2Texture.h ../src/TestSliding.h ../src/TestTexel2Pixel.h ../src/TestText.h ../src/TestTextureFormat.h ../src/TestTweens.h ../src/TestUserShader.h ../src/example.h ../src/test.h )
+
+set_target_properties(Demo
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(Demo ${OXYGINE_CORE_LIBS})
+em_link_pre_js(Demo ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/Demo/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/Demo/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

BIN
examples/Demo/proj.flash/AGAL.abc


+ 0 - 342
examples/Demo/proj.flash/AGAL.h

@@ -1,342 +0,0 @@
-/*
-** ADOBE SYSTEMS INCORPORATED
-** Copyright 2012 Adobe Systems Incorporated. All Rights Reserved.
-**
-** NOTICE:  Adobe permits you to use, modify, and distribute this file in
-** accordance with the terms of the Adobe license agreement accompanying it.
-** If you have received this file from a source other than Adobe, then your use,
-** modification, or distribution of it requires the prior written permission of Adobe.
-*/
-
-#include <AS3/AVM2.h>
-#include <AS3/AS3.h>
-#include <AS3/AS3++.h>
-
-#ifndef AS3WIG_BOILERPLATE
-#define AS3WIG_BOILERPLATE
-
-#define AS3_GET_ID(X) (((AS3::local::internal::id_holder *)&(X))->_id)
-#define AS3_ARG_SIZE(X) ((sizeof(X) + 3) & ~3)
-static inline void *AS3_FPTR_(char c, ...) { __builtin_va_list ap; __builtin_va_start(ap, c); void *r = __builtin_va_arg(ap, void *); __builtin_va_end(ap); return r; }
-#define AS3_FPTR(X) AS3_FPTR_(-1, (X))
-
-struct AS3_DELEGATE_REQ
-{
-  void *proc;
-  void *args;
-  int size;
-  struct __avm2_retdata retdata;
-};
-
-static void *AS3_DELEGATE_THUNK(void *data)
-{
-  AS3_DELEGATE_REQ *req = (AS3_DELEGATE_REQ *)data;
-  try
-  {
-    void *ret = __avm2_apply(req->proc, req->args, req->size);
-    memcpy(&req->retdata, ret, sizeof(struct __avm2_retdata));
-  }
-  catch(AS3::ui::var &v)
-  {
-    unsigned eid = AS3_GET_ID(v);
-    AS3_GET_ID(v) = 0;
-    return (void *)eid;
-  }
-  return (void *)-1;
-}
-
-#define AS3_MAYBE_DELEGATE(X, Y) if(AS3_UI && !avm2_is_ui_worker()) { \
-  AS3_DELEGATE_REQ req = { AS3_FPTR(X), __avm2_apply_args(), (Y) }; \
-  unsigned eid = (unsigned)avm2_ui_thunk(AS3_DELEGATE_THUNK, &req);\
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  __avm2_return(&req.retdata); \
-}
-
-#define AS3_BASE_DEF(N, D) \
-  N() { _id = AS3_NS::var::internal::D; } \
-  N(const N &); \
-  N(var) __attribute__((noinline)); \
-  N &operator=(const N &) __attribute__((noinline)); \
-  N &operator=(var) __attribute__((noinline))
-
-#define AS3_IPROP_SET_DEF(T, N) \
-class iprop_##N { \
-public: \
-  iprop_##N &operator=(T) __attribute__((noinline)); \
-}
-#define AS3_IPROP_GET_DEF(T, N) \
-class iprop_##N { \
-public: \
-  operator T() __attribute__((noinline)); \
-}
-#define AS3_IPROP_SET_GET_DEF(T, N) \
-class iprop_##N { \
-public: \
-  operator T() __attribute__((noinline)); \
-  iprop_##N &operator=(T) __attribute__((noinline)); \
-}
-
-#define AS3_PROP_SET_DEF(T, N) \
-class prop_##N { \
-public: \
-  prop_##N &operator=(T) __attribute__((noinline)); \
-}
-#define AS3_PROP_GET_DEF(T, N) \
-class prop_##N { \
-public: \
-  operator T() __attribute__((noinline)); \
-}
-#define AS3_PROP_SET_GET_DEF(T, N) \
-class prop_##N { \
-public: \
-  operator T() __attribute__((noinline)); \
-  prop_##N &operator=(T) __attribute__((noinline)); \
-}
-
-#define AS3_METH_DEF(R, N, A) \
-  R N A __attribute__((noinline))
-
-#define AS3_CONSTR_DEF(N, A) static N _new A
-
-#define AS3_PROP(N) internal::prop_##N N
-#define AS3_IPROP(N) internal::iprop_##N N
-
-#define AS3_PROP_IMPL(N, NS) /* NS::internal::prop_##N NS::N */
-
-#define AS3_BASE_IMPL(NS, N, NS3, N3) \
-AS3_NS::Class NS N::internal::getClosure() { \
-  AS3_MAYBE_DELEGATE((AS3_NS::Class (*)())(&NS N::internal::getClosure), 4); \
-  unsigned eid; \
-  unsigned id; \
-  inline_as3 ("try { import " NS3 N3 "; %1 = as3_valAcquireId(" NS3 N3 "); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid), "=r"(id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  AS3_NS::Class res; \
-  ((AS3_NS::internal::id_holder *)&res)->_id = id; \
-  return res; \
-} \
-NS N::N(const NS N &val) { \
-  _id = ((AS3_NS::internal::id_holder *)&val)->_id; \
-  AS3_NS::var::internal::acquire(_id); \
-} \
-NS N::N(var val) { \
-  operator=(val); \
-} \
-NS N &NS N::operator=(const NS N &val) { \
-  unsigned id = ((AS3_NS::internal::id_holder *)&val)->_id; \
-  AS3_NS::var::internal::acquire(id); \
-  AS3_NS::var::internal::release(_id); \
-  _id = id; \
-  return *this; \
-} \
-NS N &NS N::operator=(var val) { \
-  AS3_MAYBE_DELEGATE((NS N &(NS N::*)(var))(&NS N::operator=), 8); \
-  unsigned eid; \
-  unsigned id; \
-  inline_as3 ("try { import " NS3 N3 "; var val:" N3 " = as3_id2rcv[%2].val; %1 = as3_valAcquireId(val); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid), "=r"(id) : "r"(((AS3_NS::internal::id_holder *)&val)->_id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  AS3_NS::var::internal::release(_id); \
-  _id = id; \
-  return *this; \
-}
-
-#define AS3_PROP_SET_SIMPL_(T, N, NS, N3, NS3) \
-NS::internal::prop_##N &NS::internal::prop_##N::operator=(T val) { \
-  AS3_MAYBE_DELEGATE((NS::internal::prop_##N &(NS::internal::prop_##N::*)(T))(&NS::internal::prop_##N::operator=), 4 + AS3_ARG_SIZE(T)); \
-  unsigned eid; \
-  inline_as3 ("try { import " NS3 "; " N3 " = %1; %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid) : "r"(val)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  return *this; \
-}
-#define AS3_PROP_SET_SIMPL(T, N, NS, N3, NS3) \
-AS3_PROP_SET_SIMPL_(T, N, NS, N3, NS3); \
-NS::internal::prop_##N NS::N
-#define AS3_PROP_GET_SIMPL_(T, N, NS, N3, NS3) \
-NS::internal::prop_##N::operator T() { \
-  AS3_MAYBE_DELEGATE((T (NS::internal::prop_##N::*)())(&NS::internal::prop_##N::operator T), 4); \
-  unsigned eid; \
-  T res; \
-  inline_as3 ("try { import " NS3 "; %1 = " N3 "; %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid), "=r"(res)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  return res; \
-}
-#define AS3_PROP_GET_SIMPL(T, N, NS, N3, NS3) \
-AS3_PROP_GET_SIMPL_(T, N, NS, N3, NS3); \
-NS::internal::prop_##N NS::N
-#define AS3_PROP_SET_GET_SIMPL_(T, N, NS, N3, NS3) \
-AS3_PROP_SET_SIMPL_(T, N, NS, N3, NS3); \
-AS3_PROP_GET_SIMPL_(T, N, NS, N3, NS3)
-#define AS3_PROP_SET_GET_SIMPL(T, N, NS, N3, NS3) \
-AS3_PROP_SET_GET_SIMPL_(T, N, NS, N3, NS3); \
-NS::internal::prop_##N NS::N
-
-#define AS3_PROP_SET_IMPL_(T, N, NS, N3, NS3) \
-NS::internal::prop_##N &NS::internal::prop_##N::operator=(T val) { \
-  AS3_MAYBE_DELEGATE((NS::internal::prop_##N &(NS::internal::prop_##N::*)(T))(&NS::internal::prop_##N::operator=), 8); \
-  unsigned eid; \
-  unsigned id = ((AS3_NS::internal::id_holder *)&val)->_id; \
-  inline_as3 ("try { import " NS3 "; " N3 " = as3_id2rcv[%1].val; %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid) : "r"(id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  return *this; \
-}
-#define AS3_PROP_GET_IMPL_(T, N, NS, N3, NS3) \
-NS::internal::prop_##N::operator T() { \
-  AS3_MAYBE_DELEGATE((T (NS::internal::prop_##N::*)())(&NS::internal::prop_##N::operator T), 8); \
-  unsigned eid; \
-  unsigned id; \
-  inline_as3 ("try { import " NS3 "; %1 = as3_valAcquireId(" N3 "); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid), "=r"(id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  T res; \
-  ((AS3_NS::internal::id_holder *)&res)->_id = id; \
-  return res; \
-}
-#define AS3_PROP_SET_IMPL(T, N, NS, N3, NS3) \
-AS3_PROP_SET_IMPL_(T, N, NS, N3, NS3); \
-NS::internal::prop_##N NS::N
-#define AS3_PROP_GET_IMPL(T, N, NS, N3, NS3) \
-AS3_PROP_GET_IMPL_(T, N, NS, N3, NS3); \
-NS::internal::prop_##N NS::N
-#define AS3_PROP_SET_GET_IMPL_(T, N, NS, N3, NS3) \
-AS3_PROP_SET_IMPL_(T, N, NS, N3, NS3); \
-AS3_PROP_GET_IMPL_(T, N, NS, N3, NS3)
-#define AS3_PROP_SET_GET_IMPL(T, N, NS, N3, NS3) \
-AS3_PROP_SET_GET_IMPL_(T, N, NS, N3, NS3); \
-NS::internal::prop_##N NS::N
-
-#define AS3_IMETH_IMPL(T, NS, C, N, A, I, AS) T NS C::internal::instance::N A { \
-  AS3_MAYBE_DELEGATE((T (NS C::internal::instance::*)A)(&NS C::internal::instance::N), AS); \
-I \
-}
-#define AS3_METH_IMPL(T, N, A, I, AS) T N A { \
-  AS3_MAYBE_DELEGATE((T (*)A)(&N), AS); \
-I \
-}
-#define AS3_CONSTR_IMPL(NS, N, A, I, AS) NS N NS N::_new A { \
-  AS3_MAYBE_DELEGATE((NS N (*)A)(&NS N::_new), AS); \
-I \
-}
-
-#define AS3_IPROP_TO_ID(NS, C, N) \
-  ((AS3_NS::internal::id_holder *)((char *)this - __builtin_offsetof(NS C::internal::instance, N)))->_id
-
-#define AS3_IPROP_SET_SIMPL(T, N, NS, C, N3) \
-NS C::internal::iprop_##N &NS C::internal::iprop_##N::operator=(T val) { \
-  AS3_MAYBE_DELEGATE((NS C::internal::iprop_##N &(NS C::internal::iprop_##N::*)(T))(&NS C::internal::iprop_##N::operator=), 4 + AS3_ARG_SIZE(T)); \
-  unsigned eid; \
-  unsigned _id = ((AS3_NS::internal::id_holder *)((char *)this - __builtin_offsetof(NS C::internal::instance, N)))->_id; \
-  inline_as3 ("try { as3_id2rcv[%1].val." N3 " = %2; %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid) : "r"(_id), "r"(val)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  return *this; \
-}
-#define AS3_IPROP_GET_SIMPL(T, N, NS, C, N3) \
-NS C::internal::iprop_##N::operator T() { \
-  AS3_MAYBE_DELEGATE((T (NS C::internal::iprop_##N::*)())(&NS C::internal::iprop_##N::operator T), 4); \
-  unsigned eid; \
-  unsigned _id = ((AS3_NS::internal::id_holder *)((char *)this - __builtin_offsetof(NS C::internal::instance, N)))->_id; \
-  T res; \
-  inline_as3 ("try { %1 = as3_id2rcv[%2].val." N3 "; %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid), "=r"(res) : "r"(_id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  return res; \
-}
-#define AS3_IPROP_SET_GET_SIMPL(T, N, NS, C, N3) \
-AS3_IPROP_SET_SIMPL(T, N, NS, C, N3); \
-AS3_IPROP_GET_SIMPL(T, N, NS, C, N3)
-
-#define AS3_IPROP_SET_IMPL(T, N, NS, C, N3) \
-NS C::internal::iprop_##N &NS C::internal::iprop_##N::operator=(T val) { \
-  AS3_MAYBE_DELEGATE((NS C::internal::iprop_##N &(NS C::internal::iprop_##N::*)(T))(&NS C::internal::iprop_##N::operator=), 8); \
-  unsigned eid; \
-  unsigned _id = ((AS3_NS::internal::id_holder *)((char *)this - __builtin_offsetof(NS C::internal::instance, N)))->_id; \
-  unsigned id = ((AS3_NS::internal::id_holder *)&val)->_id; \
-  inline_as3 ("try { as3_id2rcv[%1].val." N3 " = as3_id2rcv[%2].val; %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid) : "r"(_id), "r"(id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  return *this; \
-}
-#define AS3_IPROP_GET_IMPL(T, N, NS, C, N3) \
-NS C::internal::iprop_##N::operator T() { \
-  AS3_MAYBE_DELEGATE((T (NS C::internal::iprop_##N::*)())(&NS C::internal::iprop_##N::operator T), 8); \
-  unsigned eid; \
-  unsigned _id = ((AS3_NS::internal::id_holder *)((char *)this - __builtin_offsetof(NS C::internal::instance, N)))->_id; \
-  unsigned id; \
-  inline_as3 ("try { %1 = as3_valAcquireId(as3_id2rcv[%2].val." N3 "); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : \
-      "=r"(eid), "=r"(id) : "r"(_id)); \
-  if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; } \
-  T res; \
-  ((AS3_NS::internal::id_holder *)&res)->_id = id; \
-  return res; \
-}
-#define AS3_IPROP_SET_GET_IMPL(T, N, NS, C, N3) \
-AS3_IPROP_SET_IMPL(T, N, NS, C, N3); \
-AS3_IPROP_GET_IMPL(T, N, NS, C, N3)
-
-#endif
-
-#define AS3_UI 1
-#define AS3_NS AS3::ui
-
-namespace AS3 {
-namespace ui {
-#ifdef AS3_IMPL
-#define _AS3_IMPL
-#undef AS3_IMPL
-#endif
-#ifdef AS3WIG_USE_BUILTIN_DEFS
-  #include <AS3++/builtin.h>
-  #include <AS3++/playerglobal.h>
-#else
-  #include "AGAL_internal.h"
-#endif
-#ifdef _AS3_IMPL
-#define AS3_IMPL
-#undef _AS3_IMPL
-#ifdef AS3WIG_USE_BUILTIN_DEFS
-  #include <AS3++/builtin.h>
-  #include <AS3++/playerglobal.h>
-#else
-  #include "AGAL_internal.h"
-#endif
-#endif
-}
-}
-
-#undef AS3_NS
-#undef AS3_UI
-
-#define AS3_UI 0
-#define AS3_NS AS3::local
-
-namespace AS3 {
-namespace local {
-#ifdef AS3_IMPL
-#define _AS3_IMPL 
-#undef AS3_IMPL
-#endif
-#ifdef AS3WIG_USE_BUILTIN_DEFS
-  #include <AS3++/builtin.h>
-  #include <AS3++/playerglobal.h>
-#else
-  #include "AGAL_internal.h"
-#endif
-#ifdef _AS3_IMPL
-#define AS3_IMPL
-#undef _AS3_IMPL
-#ifdef AS3WIG_USE_BUILTIN_DEFS
-  #include <AS3++/builtin.h>
-  #include <AS3++/playerglobal.h>
-#else
-  #include "AGAL_internal.h"
-#endif
-#endif
-}
-}
-
-#undef AS3_NS
-#undef AS3_UI

BIN
examples/Demo/proj.flash/AGAL.o


+ 0 - 594
examples/Demo/proj.flash/AGAL_internal.h

@@ -1,594 +0,0 @@
-#ifndef AS3_IMPL // class interfaces
-#pragma GCC diagnostic ignored "-Wdiv-by-zero" push
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class VM;
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class Expression;
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class ExpressionParser;
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class AGALVar;
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class AGALPreAssembler;
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-class PerspectiveMatrix3D;
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-class AGALMiniAssembler;
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-class AGALMacroAssembler;
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class VM : public AS3_NS::Object {
-protected:
-	explicit VM(unsigned id) : AS3_NS::Object(id) {}
-public:
-	AS3_BASE_DEF(VM, kNull);
-	class internal {
-		AS3_IPROP_SET_GET_DEF(AS3_NS::Array, stack);
-		AS3_IPROP_SET_GET_DEF(AS3_NS::flash::utils::Dictionary, vars);
-	public:
-		static Class getClosure();
-		class instance : public AS3_NS::Object::internal::instance {
-		public:
-			AS3_IPROP(stack);
-			AS3_IPROP(vars);
-			AS3_METH_DEF(void, pushIf, ());
-			AS3_METH_DEF(void, popEndif, ());
-			AS3_METH_DEF(void, setIf, ( double));
-			AS3_METH_DEF(bool, ifWasTrue, ());
-			AS3_METH_DEF(bool, ifIsTrue, ());
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	AS3_CONSTR_DEF(VM, ());
-};
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class Expression : public AS3_NS::Object {
-protected:
-	explicit Expression(unsigned id) : AS3_NS::Object(id) {}
-public:
-	AS3_BASE_DEF(Expression, kNull);
-	class internal {
-	public:
-		static Class getClosure();
-		class instance : public AS3_NS::Object::internal::instance {
-		public:
-			AS3_METH_DEF(void, print, ( int));
-			AS3_METH_DEF(void, exec, ( AS3_NS::com::adobe::utils::macro::VM));
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	AS3_CONSTR_DEF(Expression, ());
-};
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class ExpressionParser : public AS3_NS::Object {
-protected:
-	explicit ExpressionParser(unsigned id) : AS3_NS::Object(id) {}
-public:
-	AS3_BASE_DEF(ExpressionParser, kNull);
-	class internal {
-	public:
-		static Class getClosure();
-		class instance : public AS3_NS::Object::internal::instance {
-		public:
-			AS3_METH_DEF(AS3_NS::com::adobe::utils::macro::Expression, parse, ( AS3_NS::var, AS3_NS::String));
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	AS3_CONSTR_DEF(ExpressionParser, ());
-};
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class AGALVar : public AS3_NS::Object {
-protected:
-	explicit AGALVar(unsigned id) : AS3_NS::Object(id) {}
-public:
-	AS3_BASE_DEF(AGALVar, kNull);
-	class internal {
-		AS3_IPROP_SET_GET_DEF(AS3_NS::String, name);
-		AS3_IPROP_SET_GET_DEF(AS3_NS::String, target);
-		AS3_IPROP_SET_GET_DEF(double, w);
-		AS3_IPROP_SET_GET_DEF(double, x);
-		AS3_IPROP_SET_GET_DEF(double, y);
-		AS3_IPROP_SET_GET_DEF(double, z);
-	public:
-		static Class getClosure();
-		class instance : public AS3_NS::Object::internal::instance {
-		public:
-			AS3_IPROP(name);
-			AS3_IPROP(target);
-			AS3_IPROP(w);
-			AS3_IPROP(x);
-			AS3_IPROP(y);
-			AS3_IPROP(z);
-			AS3_METH_DEF(bool, isConstant, ());
-			AS3_METH_DEF(AS3_NS::String, toString, ());
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	AS3_CONSTR_DEF(AGALVar, ());
-};
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-namespace macro {
-class AGALPreAssembler : public AS3_NS::Object {
-protected:
-	explicit AGALPreAssembler(unsigned id) : AS3_NS::Object(id) {}
-public:
-	AS3_BASE_DEF(AGALPreAssembler, kNull);
-	class internal {
-	public:
-		static Class getClosure();
-		AS3_PROP_GET_DEF(bool, TRACE_AST);
-		AS3_PROP_GET_DEF(bool, TRACE_PREPROC);
-		AS3_PROP_GET_DEF(bool, TRACE_VM);
-		class instance : public AS3_NS::Object::internal::instance {
-		public:
-			AS3_METH_DEF(bool, processLine, ( AS3_NS::var, AS3_NS::String));
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	static AS3_PROP(TRACE_AST);
-	static AS3_PROP(TRACE_PREPROC);
-	static AS3_PROP(TRACE_VM);
-	AS3_CONSTR_DEF(AGALPreAssembler, ());
-};
-} //macro
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-class PerspectiveMatrix3D : public AS3_NS::flash::geom::Matrix3D {
-protected:
-	explicit PerspectiveMatrix3D(unsigned id) : AS3_NS::flash::geom::Matrix3D(id) {}
-public:
-	AS3_BASE_DEF(PerspectiveMatrix3D, kNull);
-	class internal {
-	public:
-		static Class getClosure();
-		class instance : public AS3_NS::flash::geom::Matrix3D::internal::instance {
-		public:
-			AS3_METH_DEF(void, lookAtLH, ( AS3_NS::flash::geom::Vector3D, AS3_NS::flash::geom::Vector3D, AS3_NS::flash::geom::Vector3D));
-			AS3_METH_DEF(void, lookAtRH, ( AS3_NS::flash::geom::Vector3D, AS3_NS::flash::geom::Vector3D, AS3_NS::flash::geom::Vector3D));
-			AS3_METH_DEF(void, perspectiveLH, ( double, double, double, double));
-			AS3_METH_DEF(void, perspectiveRH, ( double, double, double, double));
-			AS3_METH_DEF(void, perspectiveFieldOfViewLH, ( double, double, double, double));
-			AS3_METH_DEF(void, perspectiveFieldOfViewRH, ( double, double, double, double));
-			AS3_METH_DEF(void, perspectiveOffCenterLH, ( double, double, double, double, double, double));
-			AS3_METH_DEF(void, perspectiveOffCenterRH, ( double, double, double, double, double, double));
-			AS3_METH_DEF(void, orthoLH, ( double, double, double, double));
-			AS3_METH_DEF(void, orthoRH, ( double, double, double, double));
-			AS3_METH_DEF(void, orthoOffCenterLH, ( double, double, double, double, double, double));
-			AS3_METH_DEF(void, orthoOffCenterRH, ( double, double, double, double, double, double));
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	AS3_CONSTR_DEF(PerspectiveMatrix3D, ( AS3_NS::var = *(AS3_NS::var*)&AS3_NS::internal::_null));
-};
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-class AGALMiniAssembler : public AS3_NS::Object {
-protected:
-	explicit AGALMiniAssembler(unsigned id) : AS3_NS::Object(id) {}
-public:
-	AS3_BASE_DEF(AGALMiniAssembler, kNull);
-	class internal {
-		AS3_IPROP_GET_DEF(AS3_NS::flash::utils::ByteArray, agalcode);
-		AS3_IPROP_GET_DEF(AS3_NS::String, error);
-		AS3_IPROP_SET_GET_DEF(bool, verbose);
-	public:
-		static Class getClosure();
-		class instance : public AS3_NS::Object::internal::instance {
-		public:
-			AS3_IPROP(agalcode);
-			AS3_IPROP(error);
-			AS3_IPROP(verbose);
-			AS3_METH_DEF(AS3_NS::flash::utils::ByteArray, assemble, ( AS3_NS::String, AS3_NS::String));
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	AS3_CONSTR_DEF(AGALMiniAssembler, ( bool = false));
-};
-} //utils
-} //adobe
-} //com
-namespace com {
-namespace adobe {
-namespace utils {
-class AGALMacroAssembler : public AS3_NS::com::adobe::utils::AGALMiniAssembler {
-protected:
-	explicit AGALMacroAssembler(unsigned id) : AS3_NS::com::adobe::utils::AGALMiniAssembler(id) {}
-public:
-	AS3_BASE_DEF(AGALMacroAssembler, kNull);
-	class internal {
-		AS3_IPROP_SET_GET_DEF(AS3_NS::flash::utils::Dictionary, aliases);
-		AS3_IPROP_SET_GET_DEF(AS3_NS::String, asmCode);
-		AS3_IPROP_SET_GET_DEF(bool, profile);
-		AS3_IPROP_SET_GET_DEF(AS3_NS::String, profileTrace);
-	public:
-		static Class getClosure();
-		AS3_PROP_GET_DEF(AS3_NS::RegExp, IDENTIFIER);
-		AS3_PROP_GET_DEF(AS3_NS::RegExp, NUMBER);
-		AS3_PROP_GET_DEF(AS3_NS::RegExp, OPERATOR);
-		AS3_PROP_GET_DEF(AS3_NS::RegExp, PREPROC);
-		AS3_PROP_GET_DEF(AS3_NS::RegExp, SEPERATOR);
-		AS3_PROP_GET_DEF(AS3_NS::String, STDLIB);
-		AS3_PROP_GET_DEF(AS3_NS::RegExp, TOKEN);
-		class instance : public AS3_NS::com::adobe::utils::AGALMiniAssembler::internal::instance {
-		public:
-			AS3_IPROP(aliases);
-			AS3_IPROP(asmCode);
-			AS3_IPROP(profile);
-			AS3_IPROP(profileTrace);
-			AS3_METH_DEF(AS3_NS::flash::utils::ByteArray, assemble, ( AS3_NS::String, AS3_NS::String));
-		};
-	};
-	internal::instance *operator->() { return (internal::instance *)this; }
-	static AS3_PROP(IDENTIFIER);
-	static AS3_PROP(NUMBER);
-	static AS3_PROP(OPERATOR);
-	static AS3_PROP(PREPROC);
-	static AS3_PROP(SEPERATOR);
-	static AS3_PROP(STDLIB);
-	static AS3_PROP(TOKEN);
-	static AS3_METH_DEF(AS3_NS::String, joinTokens, ( AS3_NS::var));
-	AS3_CONSTR_DEF(AGALMacroAssembler, ( bool = false));
-};
-} //utils
-} //adobe
-} //com
-#pragma GCC diagnostic ignored "-Wdiv-by-zero" pop
-#else // class implementations
-AS3_BASE_IMPL(com::adobe::utils::macro::, VM, "com.adobe.utils.macro.", "VM");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::Array, stack, com::adobe::utils::macro::, VM, "stack");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::flash::utils::Dictionary, vars, com::adobe::utils::macro::, VM, "vars");
-AS3_IMETH_IMPL(void, com::adobe::utils::macro::, VM, pushIf, (), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.macro.VM; var thiz:VM = as3_id2rcv[%1].val; try { thiz.pushIf(); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 4)
-AS3_IMETH_IMPL(void, com::adobe::utils::macro::, VM, popEndif, (), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.macro.VM; var thiz:VM = as3_id2rcv[%1].val; try { thiz.popEndif(); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 4)
-AS3_IMETH_IMPL(void, com::adobe::utils::macro::, VM, setIf, ( double arg0), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.macro.VM; var thiz:VM = as3_id2rcv[%1].val; try { thiz.setIf(%2); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 12)
-AS3_IMETH_IMPL(bool, com::adobe::utils::macro::, VM, ifWasTrue, (), {
-	unsigned eid;
-	bool res;
-	inline_as3 ("import com.adobe.utils.macro.VM; var thiz:VM = as3_id2rcv[%2].val; try { %1 = thiz.ifWasTrue(); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(res) : "r"(_id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	return res;
-}, 4)
-AS3_IMETH_IMPL(bool, com::adobe::utils::macro::, VM, ifIsTrue, (), {
-	unsigned eid;
-	bool res;
-	inline_as3 ("import com.adobe.utils.macro.VM; var thiz:VM = as3_id2rcv[%2].val; try { %1 = thiz.ifIsTrue(); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(res) : "r"(_id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	return res;
-}, 4)
-AS3_CONSTR_IMPL(com::adobe::utils::macro::, VM, (), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.VM; try { %1 = as3_valAcquireId(new VM()); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::macro::VM res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 4)
-AS3_BASE_IMPL(com::adobe::utils::macro::, Expression, "com.adobe.utils.macro.", "Expression");
-AS3_IMETH_IMPL(void, com::adobe::utils::macro::, Expression, print, ( int arg0), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.macro.Expression; var thiz:Expression = as3_id2rcv[%1].val; try { thiz.print(%2); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 8)
-AS3_IMETH_IMPL(void, com::adobe::utils::macro::, Expression, exec, ( AS3_NS::com::adobe::utils::macro::VM arg0), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.macro.Expression; var thiz:Expression = as3_id2rcv[%1].val; try { thiz.exec(as3_id2rcv[%2].val); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(AS3_GET_ID(arg0)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 8)
-AS3_CONSTR_IMPL(com::adobe::utils::macro::, Expression, (), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.Expression; try { %1 = as3_valAcquireId(new Expression()); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::macro::Expression res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 4)
-AS3_BASE_IMPL(com::adobe::utils::macro::, ExpressionParser, "com.adobe.utils.macro.", "ExpressionParser");
-AS3_IMETH_IMPL(AS3_NS::com::adobe::utils::macro::Expression, com::adobe::utils::macro::, ExpressionParser, parse, ( AS3_NS::var arg0, AS3_NS::String arg1), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.ExpressionParser; var thiz:ExpressionParser = as3_id2rcv[%2].val; try { %1 = as3_valAcquireId(thiz.parse(as3_id2rcv[%3].val, as3_id2rcv[%4].val)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(_id), "r"(AS3_GET_ID(arg0)), "r"(AS3_GET_ID(arg1)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::macro::Expression res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 16)
-AS3_CONSTR_IMPL(com::adobe::utils::macro::, ExpressionParser, (), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.ExpressionParser; try { %1 = as3_valAcquireId(new ExpressionParser()); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::macro::ExpressionParser res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 4)
-AS3_BASE_IMPL(com::adobe::utils::macro::, AGALVar, "com.adobe.utils.macro.", "AGALVar");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::String, name, com::adobe::utils::macro::, AGALVar, "name");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::String, target, com::adobe::utils::macro::, AGALVar, "target");
-AS3_IPROP_SET_GET_SIMPL(double, w, com::adobe::utils::macro::, AGALVar, "w");
-AS3_IPROP_SET_GET_SIMPL(double, x, com::adobe::utils::macro::, AGALVar, "x");
-AS3_IPROP_SET_GET_SIMPL(double, y, com::adobe::utils::macro::, AGALVar, "y");
-AS3_IPROP_SET_GET_SIMPL(double, z, com::adobe::utils::macro::, AGALVar, "z");
-AS3_IMETH_IMPL(bool, com::adobe::utils::macro::, AGALVar, isConstant, (), {
-	unsigned eid;
-	bool res;
-	inline_as3 ("import com.adobe.utils.macro.AGALVar; var thiz:AGALVar = as3_id2rcv[%2].val; try { %1 = thiz.isConstant(); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(res) : "r"(_id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	return res;
-}, 4)
-AS3_IMETH_IMPL(AS3_NS::String, com::adobe::utils::macro::, AGALVar, toString, (), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.AGALVar; var thiz:AGALVar = as3_id2rcv[%2].val; try { %1 = as3_valAcquireId(thiz.toString()); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(_id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::String res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 8)
-AS3_CONSTR_IMPL(com::adobe::utils::macro::, AGALVar, (), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.AGALVar; try { %1 = as3_valAcquireId(new AGALVar()); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::macro::AGALVar res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 4)
-AS3_BASE_IMPL(com::adobe::utils::macro::, AGALPreAssembler, "com.adobe.utils.macro.", "AGALPreAssembler");
-AS3_PROP_GET_SIMPL(bool, TRACE_AST, com::adobe::utils::macro::AGALPreAssembler, "com.adobe.utils.macro.AGALPreAssembler.TRACE_AST", "com.adobe.utils.macro.AGALPreAssembler");
-AS3_PROP_GET_SIMPL(bool, TRACE_PREPROC, com::adobe::utils::macro::AGALPreAssembler, "com.adobe.utils.macro.AGALPreAssembler.TRACE_PREPROC", "com.adobe.utils.macro.AGALPreAssembler");
-AS3_PROP_GET_SIMPL(bool, TRACE_VM, com::adobe::utils::macro::AGALPreAssembler, "com.adobe.utils.macro.AGALPreAssembler.TRACE_VM", "com.adobe.utils.macro.AGALPreAssembler");
-AS3_IMETH_IMPL(bool, com::adobe::utils::macro::, AGALPreAssembler, processLine, ( AS3_NS::var arg0, AS3_NS::String arg1), {
-	unsigned eid;
-	bool res;
-	inline_as3 ("import com.adobe.utils.macro.AGALPreAssembler; var thiz:AGALPreAssembler = as3_id2rcv[%2].val; try { %1 = thiz.processLine(as3_id2rcv[%3].val, as3_id2rcv[%4].val); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(res) : "r"(_id), "r"(AS3_GET_ID(arg0)), "r"(AS3_GET_ID(arg1)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	return res;
-}, 12)
-AS3_CONSTR_IMPL(com::adobe::utils::macro::, AGALPreAssembler, (), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.macro.AGALPreAssembler; try { %1 = as3_valAcquireId(new AGALPreAssembler()); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::macro::AGALPreAssembler res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 4)
-AS3_BASE_IMPL(com::adobe::utils::, PerspectiveMatrix3D, "com.adobe.utils.", "PerspectiveMatrix3D");
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, lookAtLH, ( AS3_NS::flash::geom::Vector3D arg0, AS3_NS::flash::geom::Vector3D arg1, AS3_NS::flash::geom::Vector3D arg2), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.lookAtLH(as3_id2rcv[%2].val, as3_id2rcv[%3].val, as3_id2rcv[%4].val); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(AS3_GET_ID(arg0)), "r"(AS3_GET_ID(arg1)), "r"(AS3_GET_ID(arg2)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 16)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, lookAtRH, ( AS3_NS::flash::geom::Vector3D arg0, AS3_NS::flash::geom::Vector3D arg1, AS3_NS::flash::geom::Vector3D arg2), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.lookAtRH(as3_id2rcv[%2].val, as3_id2rcv[%3].val, as3_id2rcv[%4].val); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(AS3_GET_ID(arg0)), "r"(AS3_GET_ID(arg1)), "r"(AS3_GET_ID(arg2)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 16)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, perspectiveLH, ( double arg0, double arg1, double arg2, double arg3), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.perspectiveLH(%2, %3, %4, %5); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 36)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, perspectiveRH, ( double arg0, double arg1, double arg2, double arg3), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.perspectiveRH(%2, %3, %4, %5); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 36)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, perspectiveFieldOfViewLH, ( double arg0, double arg1, double arg2, double arg3), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.perspectiveFieldOfViewLH(%2, %3, %4, %5); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 36)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, perspectiveFieldOfViewRH, ( double arg0, double arg1, double arg2, double arg3), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.perspectiveFieldOfViewRH(%2, %3, %4, %5); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 36)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, perspectiveOffCenterLH, ( double arg0, double arg1, double arg2, double arg3, double arg4, double arg5), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.perspectiveOffCenterLH(%2, %3, %4, %5, %6, %7); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 52)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, perspectiveOffCenterRH, ( double arg0, double arg1, double arg2, double arg3, double arg4, double arg5), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.perspectiveOffCenterRH(%2, %3, %4, %5, %6, %7); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 52)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, orthoLH, ( double arg0, double arg1, double arg2, double arg3), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.orthoLH(%2, %3, %4, %5); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 36)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, orthoRH, ( double arg0, double arg1, double arg2, double arg3), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.orthoRH(%2, %3, %4, %5); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 36)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, orthoOffCenterLH, ( double arg0, double arg1, double arg2, double arg3, double arg4, double arg5), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.orthoOffCenterLH(%2, %3, %4, %5, %6, %7); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 52)
-AS3_IMETH_IMPL(void, com::adobe::utils::, PerspectiveMatrix3D, orthoOffCenterRH, ( double arg0, double arg1, double arg2, double arg3, double arg4, double arg5), {
-	unsigned eid;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; var thiz:PerspectiveMatrix3D = as3_id2rcv[%1].val; try { thiz.orthoOffCenterRH(%2, %3, %4, %5, %6, %7); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid) : "r"(_id), "r"(arg0), "r"(arg1), "r"(arg2), "r"(arg3), "r"(arg4), "r"(arg5));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-}, 52)
-AS3_CONSTR_IMPL(com::adobe::utils::, PerspectiveMatrix3D, ( AS3_NS::var arg0), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.PerspectiveMatrix3D; try { %1 = as3_valAcquireId(new PerspectiveMatrix3D(as3_id2rcv[%2].val)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(AS3_GET_ID(arg0)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::PerspectiveMatrix3D res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 8)
-AS3_BASE_IMPL(com::adobe::utils::, AGALMiniAssembler, "com.adobe.utils.", "AGALMiniAssembler");
-AS3_IPROP_GET_IMPL(AS3_NS::flash::utils::ByteArray, agalcode, com::adobe::utils::, AGALMiniAssembler, "agalcode");
-AS3_IPROP_GET_IMPL(AS3_NS::String, error, com::adobe::utils::, AGALMiniAssembler, "error");
-AS3_IPROP_SET_GET_SIMPL(bool, verbose, com::adobe::utils::, AGALMiniAssembler, "verbose");
-AS3_IMETH_IMPL(AS3_NS::flash::utils::ByteArray, com::adobe::utils::, AGALMiniAssembler, assemble, ( AS3_NS::String arg0, AS3_NS::String arg1), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.AGALMiniAssembler; var thiz:AGALMiniAssembler = as3_id2rcv[%2].val; try { %1 = as3_valAcquireId(thiz.assemble(as3_id2rcv[%3].val, as3_id2rcv[%4].val)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(_id), "r"(AS3_GET_ID(arg0)), "r"(AS3_GET_ID(arg1)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::flash::utils::ByteArray res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 16)
-AS3_CONSTR_IMPL(com::adobe::utils::, AGALMiniAssembler, ( bool arg0), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.AGALMiniAssembler; try { %1 = as3_valAcquireId(new AGALMiniAssembler(%2)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(arg0));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::AGALMiniAssembler res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 8)
-AS3_BASE_IMPL(com::adobe::utils::, AGALMacroAssembler, "com.adobe.utils.", "AGALMacroAssembler");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::flash::utils::Dictionary, aliases, com::adobe::utils::, AGALMacroAssembler, "aliases");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::String, asmCode, com::adobe::utils::, AGALMacroAssembler, "asmCode");
-AS3_IPROP_SET_GET_SIMPL(bool, profile, com::adobe::utils::, AGALMacroAssembler, "profile");
-AS3_IPROP_SET_GET_IMPL(AS3_NS::String, profileTrace, com::adobe::utils::, AGALMacroAssembler, "profileTrace");
-AS3_PROP_GET_IMPL(AS3_NS::RegExp, IDENTIFIER, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.IDENTIFIER", "com.adobe.utils.AGALMacroAssembler");
-AS3_PROP_GET_IMPL(AS3_NS::RegExp, NUMBER, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.NUMBER", "com.adobe.utils.AGALMacroAssembler");
-AS3_PROP_GET_IMPL(AS3_NS::RegExp, OPERATOR, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.OPERATOR", "com.adobe.utils.AGALMacroAssembler");
-AS3_PROP_GET_IMPL(AS3_NS::RegExp, PREPROC, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.PREPROC", "com.adobe.utils.AGALMacroAssembler");
-AS3_PROP_GET_IMPL(AS3_NS::RegExp, SEPERATOR, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.SEPERATOR", "com.adobe.utils.AGALMacroAssembler");
-AS3_PROP_GET_IMPL(AS3_NS::String, STDLIB, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.STDLIB", "com.adobe.utils.AGALMacroAssembler");
-AS3_PROP_GET_IMPL(AS3_NS::RegExp, TOKEN, com::adobe::utils::AGALMacroAssembler, "com.adobe.utils.AGALMacroAssembler.TOKEN", "com.adobe.utils.AGALMacroAssembler");
-AS3_IMETH_IMPL(AS3_NS::flash::utils::ByteArray, com::adobe::utils::, AGALMacroAssembler, assemble, ( AS3_NS::String arg0, AS3_NS::String arg1), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.AGALMacroAssembler; var thiz:AGALMacroAssembler = as3_id2rcv[%2].val; try { %1 = as3_valAcquireId(thiz.assemble(as3_id2rcv[%3].val, as3_id2rcv[%4].val)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(_id), "r"(AS3_GET_ID(arg0)), "r"(AS3_GET_ID(arg1)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::flash::utils::ByteArray res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 16)
-AS3_METH_IMPL(AS3_NS::String, com::adobe::utils::AGALMacroAssembler::joinTokens, ( AS3_NS::var arg0), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.AGALMacroAssembler; try { %1 = as3_valAcquireId(AGALMacroAssembler.joinTokens(as3_id2rcv[%2].val)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(AS3_GET_ID(arg0)));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::String res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 8)
-AS3_CONSTR_IMPL(com::adobe::utils::, AGALMacroAssembler, ( bool arg0), {
-	unsigned eid;
-	unsigned id;
-	inline_as3 ("import com.adobe.utils.AGALMacroAssembler; try { %1 = as3_valAcquireId(new AGALMacroAssembler(%2)); %0 = -1 } catch(e:*) { %0 = as3_valAcquireId(e) }" : "=r"(eid), "=r"(id) : "r"(arg0));
-	if(eid != -1U) { var e; AS3_GET_ID(e) = eid; throw e; }
-	AS3_NS::com::adobe::utils::AGALMacroAssembler res;
-	AS3_GET_ID(res) = id;
-	return res;
-}, 8)
-#endif // classes 
-#ifndef AS3_IMPL // function interfaces
-#else // function implementations
-#endif // functions
-#ifndef AS3_IMPL // property interfaces
-#else // property implementations
-#endif // properties

BIN
examples/Demo/proj.flash/Console.abc


+ 0 - 216
examples/Demo/proj.flash/Console.as

@@ -1,216 +0,0 @@
-/*
-** ADOBE SYSTEMS INCORPORATED
-** Copyright 2012 Adobe Systems Incorporated. All Rights Reserved.
-**
-** NOTICE:  Adobe permits you to use, modify, and distribute this file in
-** accordance with the terms of the Adobe license agreement accompanying it.
-** If you have received this file from a source other than Adobe, then your use,
-** modification, or distribution of it requires the prior written permission of Adobe.
-*/
-
-package com.adobe.flascc
-{
-  import flash.display.DisplayObjectContainer; 
-  import flash.display.Sprite;
-  import flash.display.StageScaleMode;
-  import flash.events.Event;
-  import flash.net.LocalConnection;
-  import flash.net.URLRequest;
-  import flash.text.TextField;
-  import flash.utils.ByteArray;
-
-  import com.adobe.flascc.vfs.ISpecialFile;
-  import com.adobe.flascc.vfs.RootFSBackingStore;
-
-  /**
-  * A basic implementation of a console for FlasCC apps.
-  * The PlayerKernel class delegates to this for things like read/write,
-  * so that console output can be displayed in a TextField on the Stage.
-  */
-  public class Console extends Sprite implements ISpecialFile
-  {
-    private var enableConsole:Boolean = true
-    private var _tf:TextField
-    private var inputContainer:DisplayObjectContainer
-
-    /**
-    * To Support the preloader case you might want to have the Console
-    * act as a child of some other DisplayObjectContainer.
-    */
-    public function Console(container:DisplayObjectContainer = null)
-    {
-      CModule.rootSprite = container ? container.root : this
-
-      if(CModule.runningAsWorker()) {
-        return;
-      }
-
-      if(container) {
-        container.addChild(this)
-        init(null)
-      } else {
-        addEventListener(Event.ADDED_TO_STAGE, init)
-      }
-    }
-
-    /**
-    * All of the real FlasCC init happens in this method,
-    * which is either run on startup or once the SWF has
-    * been added to the stage.
-    */
-    protected function init(e:Event):void
-    {
-      inputContainer = new Sprite()
-      addChild(inputContainer)
-
-      addEventListener(Event.ENTER_FRAME, enterFrame)
-
-      stage.frameRate = 60
-      stage.scaleMode = StageScaleMode.NO_SCALE
-
-      if(enableConsole) {
-        _tf = new TextField
-        _tf.multiline = true
-        _tf.width = stage.stageWidth
-        _tf.height = stage.stageHeight 
-        inputContainer.addChild(_tf)
-      }
-
-      try
-      {
-        // change to false to prevent running main in the background
-        // when Workers are supported
-        const runMainBg:Boolean = true
-
-        // PlayerKernel will delegate read/write requests to the "/dev/tty"
-        // file to the object specified with this API.
-        CModule.vfs.console = this
-
-        CModule.vfs.addBackingStore(new RootFSBackingStore(), null)
-
-        // By default we run "main" on a background worker so that
-        // console updates show up in real time. Otherwise "startAsync"
-        // causes main to run on the UI worker
-        if(runMainBg && CModule.canUseWorkers) // start in bg if we have workers 
-        {
-          consoleWrite("startBackground\n")
-          CModule.startBackground(this, new <String>[], new <String>[])
-        }
-        else
-        {
-          consoleWrite("startAsync\n")
-          CModule.startAsync(this)
-        }
-      }
-      catch(e:*)
-      {
-        // If main gives any exceptions make sure we get a full stack trace
-        // in our console
-        consoleWrite(e.toString() + "\n" + e.getStackTrace().toString())
-        throw e
-      }
-    }
-
-    /**
-    * The callback to call when FlasCC code calls the <code>posix exit()</code> function. Leave null to exit silently.
-    * @private
-    */
-    public var exitHook:Function;
-
-    /**
-    * The PlayerKernel implementation will use this function to handle
-    * C process exit requests
-    */
-    public function exit(code:int):Boolean
-    {
-      // default to unhandled
-      if (exitHook)
-        return exitHook(code)
-      else
-        throw new Error("exit() called.")
-    }
-
-    /**
-    * The PlayerKernel implementation uses this function to handle
-    * C IO write requests to the file "/dev/tty" (for example, output from
-    * printf will pass through this function). See the ISpecialFile
-    * documentation for more information about the arguments and return value.
-    */
-    public function write(fd:int, bufPtr:int, nbyte:int, errnoPtr:int):int
-    {
-      var str:String = CModule.readString(bufPtr, nbyte)
-      consoleWrite(str)
-      return nbyte
-    }
-
-    /**
-    * The PlayerKernel implementation uses this function to handle
-    * C IO read requests to the file "/dev/tty" (for example, reads from stdin
-    * will expect this function to provide the data). See the ISpecialFile
-    * documentation for more information about the arguments and return value.
-    */
-    public function read(fd:int, bufPtr:int, nbyte:int, errnoPtr:int):int
-    {
-      return 0
-    }
-
-    /**
-    * The PlayerKernel implementation uses this function to handle
-    * C fcntl requests to the file "/dev/tty." 
-    * See the ISpecialFile documentation for more information about the
-    * arguments and return value.
-    */
-    public function fcntl(fd:int, com:int, data:int, errnoPtr:int):int
-    {
-      return 0
-    }
-
-    /**
-    * The PlayerKernel implementation uses this function to handle
-    * C ioctl requests to the file "/dev/tty." 
-    * See the ISpecialFile documentation for more information about the
-    * arguments and return value.
-    */
-    public function ioctl(fd:int, com:int, data:int, errnoPtr:int):int
-    {
-      return 0;// CModule.callI(CModule.getPublicSymbol("vglttyioctl"), new <int>[fd, com, data, errnoPtr]);
-    }
-
-    /**
-    * Helper function that traces to the flashlog text file and also
-    * displays output in the on-screen textfield console.
-    */
-    protected function consoleWrite(s:String):void
-    {
-      trace(s)
-      if(enableConsole) {
-        _tf.appendText(s)
-        //_tf.text = s
-        _tf.scrollV = _tf.maxScrollV
-      }
-    }
-
-    /**
-    * The enterFrame callback is run once every frame. UI thunk requests should be handled
-    * here by calling <code>CModule.serviceUIRequests()</code> (see CModule ASdocs for more information on the UI thunking functionality).
-    */
-    protected function enterFrame(e:Event):void
-    {
-      CModule.serviceUIRequests()
-    }
-
-    /**
-    * Provide a way to get the TextField's text.
-    */
-    public function get consoleText():String
-    {
-        var txt:String = null;
-
-        if(_tf != null){
-            txt = _tf.text;
-        }
-        
-        return txt;
-    }
-  }
-}

+ 0 - 36
examples/Demo/proj.flash/Makefile

@@ -1,36 +0,0 @@
-T07: check
-	@echo "-------- Sample 7 --------"
-
-	"$(FLASCC)/usr/bin/genfs" ../data vfs
-	#cp "$(FLASCC)/usr/share/HTTPBackingStore.as" .
-	#cp "$(FLASCC)/usr/share/LSOBackingStore.as" .
-	#"$(FLASCC)/usr/bin/genfs" --type=http webvfs testwebvfs
-	#mv testwebvfs_manifest.as manifest.as
-
-	$(AS3COMPILERARGS)	-import $(call nativepath,$(FLASCC)/usr/lib/builtin.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/playerglobal.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/BinaryData.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/ISpecialFile.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/IBackingStore.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/IVFS.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/InMemoryBackingStore.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/PlayerKernel.abc) \
-				vfsRootFSBackingStore.as -outdir . -out VFS
-
-	$(AS3COMPILERARGS)	-import $(call nativepath,$(FLASCC)/usr/lib/builtin.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/playerglobal.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/BinaryData.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/ISpecialFile.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/IBackingStore.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/IVFS.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/InMemoryBackingStore.abc) \
-				-import $(call nativepath,$(FLASCC)/usr/lib/PlayerKernel.abc) \
-				-import VFS.abc \
-				Console.as -outdir . -out Console
-
-	#"$(FLASCC)/usr/bin/g++" $(BASE_CFLAGS) -O3 vfstest.cpp VFS.abc $(FLASCC)/usr/lib/AlcVFSZip.abc -symbol-abc=Console.abc -emit-swf -swf-version=17 -swf-size=800x600 -o vfstest.swf
-
-include ./Makefile.common
-
-clean:
-	rm -f *.swf *.bc *.abc testvfs* HTTPBackingStore.as LSOBackingStore.as testwebvfs*

+ 0 - 29
examples/Demo/proj.flash/Makefile.common

@@ -1,29 +0,0 @@
-FLASCC:=/cygdrive/d/flash/flascc/sdk
-FLEX:=/cygdrive/d/flash/flex_sdk
-AS3COMPILER:=asc2.jar
-BASE_CFLAGS:=-Werror -Wno-write-strings -Wno-trigraphs
-
-$?UNAME=$(shell uname -s)
-ifneq (,$(findstring CYGWIN,$(UNAME)))
-	$?nativepath=$(shell cygpath -at mixed $(1))
-	$?unixpath=$(shell cygpath -at unix $(1))
-else
-	$?nativepath=$(abspath $(1))
-	$?unixpath=$(abspath $(1))
-endif
-
-ifneq (,$(findstring "asc2.jar","$(AS3COMPILER)"))
-	$?AS3COMPILERARGS=java $(JVMARGS) -jar $(call nativepath,$(FLASCC)/usr/lib/$(AS3COMPILER)) -merge -md 
-else
-	echo "ASC is no longer supported" ; exit 1 ;
-endif
-
-check:
-	@if [ -d $(FLASCC)/usr/bin ] ; then true ; \
-	else echo "Couldn't locate FLASCC sdk directory, please invoke make with \"make FLASCC=/path/to/FLASCC/sdk ...\"" ; exit 1 ; \
-	fi
-
-	@if [ -d "$(FLEX)/bin" ] ; then true ; \
-	else echo "Couldn't locate Flex sdk directory, please invoke make with \"make FLEX=/path/to/flex  ...\"" ; exit 1 ; \
-	fi
-

+ 0 - 14
examples/Demo/proj.flash/exports.txt

@@ -1,14 +0,0 @@
-# built in symbols that must always be preserved
-_start1
-malloc
-free
-memcpy
-memmove
-flascc_uiTickProc
-_sync_synchronize
-
-# symbols for C++ exception handling
-_Unwind_SjLj_Register
-_Unwind_SjLj_Resume
-_Unwind_SjLj_Unregister
-_Unwind_SjLj_RaiseException

+ 0 - 667
examples/Demo/proj.flash/fcc_sscanf.c

@@ -1,667 +0,0 @@
-/*
- * Copyright (c) 2004 Apple Computer, Inc. All rights reserved.
- *
- * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
- * 
- * This file contains Original Code and/or Modifications of Original Code
- * as defined in and that are subject to the Apple Public Source License
- * Version 2.0 (the 'License'). You may not use this file except in
- * compliance with the License. The rights granted to you under the License
- * may not be used to create, or enable the creation or redistribution of,
- * unlawful or unlicensed copies of an Apple operating system, or to
- * circumvent, violate, or enable the circumvention or violation of, any
- * terms of an Apple operating system software license agreement.
- * 
- * Please obtain a copy of the License at
- * http://www.opensource.apple.com/apsl/ and read it before using this file.
- * 
- * The Original Code and all software distributed under the License are
- * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
- * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
- * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
- * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
- * Please see the License for the specific language governing rights and
- * limitations under the License.
- * 
- * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
- */
-/*-
- * Copyright (c) 1990, 1993
- *	The Regents of the University of California.  All rights reserved.
- *
- * This code is derived from software contributed to Berkeley by
- * Chris Torek.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- *    notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- *    notice, this list of conditions and the following disclaimer in the
- *    documentation and/or other materials provided with the distribution.
- * 3. All advertising materials mentioning features or use of this software
- *    must display the following acknowledgement:
- *	This product includes software developed by the University of
- *	California, Berkeley and its contributors.
- * 4. Neither the name of the University nor the names of its contributors
- *    may be used to endorse or promote products derived from this software
- *    without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
- * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
- * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
- * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
- * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
- * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
- * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-
-#include <sys/cdefs.h>
-
-#if 0 /* XXX coming soon */
-#include <ctype.h>
-#else
- 
-static inline int
-fcc_isspace(char c)
-{
-	return (c == ' ' || c == '\t' || c == '\n' || c == '\12');
-}
-
-#endif
-#include <stdarg.h>
-#include <string.h>
-#include <sys/param.h>
-//#include <sys/systm.h>
-
-#define	BUF		32 	/* Maximum length of numeric string. */
-
-/*
- * Flags used during conversion.
- */
-#define	LONG		0x01	/* l: long or double */
-#define	SHORT		0x04	/* h: short */
-#define	SUPPRESS	0x08	/* *: suppress assignment */
-#define	POINTER		0x10	/* p: void * (as hex) */
-#define	NOSKIP		0x20	/* [ or c: do not skip blanks */
-#define	LONGLONG	0x400	/* ll: long long (+ deprecated q: quad) */
-#define	SHORTSHORT	0x4000	/* hh: char */
-#define	UNSIGNED	0x8000	/* %[oupxX] conversions */
-
-/*
- * The following are used in numeric conversions only:
- * SIGNOK, NDIGITS, DPTOK, and EXPOK are for floating point;
- * SIGNOK, NDIGITS, PFXOK, and NZDIGITS are for integral.
- */
-#define	SIGNOK		0x40	/* +/- is (still) legal */
-#define	NDIGITS		0x80	/* no digits detected */
-
-#define	DPTOK		0x100	/* (float) decimal point is still legal */
-#define	EXPOK		0x200	/* (float) exponent (e+3, etc) still legal */
-
-#define	PFXOK		0x100	/* 0x prefix is (still) legal */
-#define	NZDIGITS	0x200	/* no zero digits detected */
-
-/*
- * Conversion types.
- */
-#define	CT_CHAR		0	/* %c conversion */
-#define	CT_CCL		1	/* %[...] conversion */
-#define	CT_STRING	2	/* %s conversion */
-#define	CT_INT		3	/* %[dioupxX] conversion */
-
-static const u_char *fcc___sccl(char *, const u_char *);
-
-int
-fcc_sscanf(const char *ibuf, const char *fmt, ...)
-{
-	va_list ap;
-	int ret;
-	
-	va_start(ap, fmt);
-	ret = fcc_vsscanf(ibuf, fmt, ap);
-	va_end(ap);
-	return(ret);
-}
-
-int
-fcc_vsscanf(const char *inp, char const *fmt0, va_list ap)
-{
-	int inr;
-	const u_char *fmt = (const u_char *)fmt0;
-	int c;			/* character from format, or conversion */
-	size_t width;		/* field width, or 0 */
-	char *p;		/* points into all kinds of strings */
-	int n;			/* handy integer */
-	int flags;		/* flags as defined above */
-	char *p0;		/* saves original value of p when necessary */
-	int nassigned;		/* number of fields assigned */
-	int nconversions;	/* number of conversions */
-	int nread;		/* number of characters consumed from fp */
-	int base;		/* base argument to conversion function */
-	char ccltab[256];	/* character class table for %[...] */
-	char buf[BUF];		/* buffer for numeric conversions */
-
-	/* `basefix' is used to avoid `if' tests in the integer scanner */
-	static short basefix[17] =
-		{ 10, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16 };
-
-	inr = strlen(inp);
-	
-	nassigned = 0;
-	nconversions = 0;
-	nread = 0;
-	base = 0;		/* XXX just to keep gcc happy */
-	for (;;) {
-		c = *fmt++;
-		if (c == 0)
-			return (nassigned);
-		if (fcc_isspace(c)) {
-			while (inr > 0 && fcc_isspace(*inp))
-				nread++, inr--, inp++;
-			continue;
-		}
-		if (c != '%')
-			goto literal;
-		width = 0;
-		flags = 0;
-		/*
-		 * switch on the format.  continue if done;
-		 * break once format type is derived.
-		 */
-again:		c = *fmt++;
-		switch (c) {
-		case '%':
-literal:
-			if (inr <= 0)
-				goto input_failure;
-			if (*inp != c)
-				goto match_failure;
-			inr--, inp++;
-			nread++;
-			continue;
-
-		case '*':
-			flags |= SUPPRESS;
-			goto again;
-		case 'l':
-			if (flags & LONG) {
-				flags &= ~LONG;
-				flags |= LONGLONG;
-			} else
-				flags |= LONG;
-			goto again;
-		case 'q':
-			flags |= LONGLONG;	/* not quite */
-			goto again;
-		case 'h':
-			if (flags & SHORT) {
-				flags &= ~SHORT;
-				flags |= SHORTSHORT;
-			} else
-				flags |= SHORT;
-			goto again;
-
-		case '0': case '1': case '2': case '3': case '4':
-		case '5': case '6': case '7': case '8': case '9':
-			width = width * 10 + c - '0';
-			goto again;
-
-		/*
-		 * Conversions.
-		 */
-		case 'd':
-			c = CT_INT;
-			base = 10;
-			break;
-
-		case 'i':
-			c = CT_INT;
-			base = 0;
-			break;
-
-		case 'o':
-			c = CT_INT;
-			flags |= UNSIGNED;
-			base = 8;
-			break;
-
-		case 'u':
-			c = CT_INT;
-			flags |= UNSIGNED;
-			base = 10;
-			break;
-
-		case 'X':
-		case 'x':
-			flags |= PFXOK;	/* enable 0x prefixing */
-			c = CT_INT;
-			flags |= UNSIGNED;
-			base = 16;
-			break;
-
-		case 's':
-			c = CT_STRING;
-			break;
-
-		case '[':
-			fmt = fcc___sccl(ccltab, fmt);
-			flags |= NOSKIP;
-			c = CT_CCL;
-			break;
-
-		case 'c':
-			flags |= NOSKIP;
-			c = CT_CHAR;
-			break;
-
-		case 'p':	/* pointer format is like hex */
-			flags |= POINTER | PFXOK;
-			c = CT_INT;
-			flags |= UNSIGNED;
-			base = 16;
-			break;
-
-		case 'n':
-			nconversions++;
-			if (flags & SUPPRESS)	/* ??? */
-				continue;
-			if (flags & SHORTSHORT)
-				*va_arg(ap, char *) = nread;
-			else if (flags & SHORT)
-				*va_arg(ap, short *) = nread;
-			else if (flags & LONG)
-				*va_arg(ap, long *) = nread;
-			else if (flags & LONGLONG)
-				*va_arg(ap, long long *) = nread;
-			else
-				*va_arg(ap, int *) = nread;
-			continue;
-		}
-
-		/*
-		 * We have a conversion that requires input.
-		 */
-		if (inr <= 0)
-			goto input_failure;
-
-		/*
-		 * Consume leading white space, except for formats
-		 * that suppress this.
-		 */
-		if ((flags & NOSKIP) == 0) {
-			while (fcc_isspace(*inp)) {
-				nread++;
-				if (--inr > 0)
-					inp++;
-				else 
-					goto input_failure;
-			}
-			/*
-			 * Note that there is at least one character in
-			 * the buffer, so conversions that do not set NOSKIP
-			 * can no longer result in an input failure.
-			 */
-		}
-
-		/*
-		 * Do the conversion.
-		 */
-		switch (c) {
-
-		case CT_CHAR:
-			/* scan arbitrary characters (sets NOSKIP) */
-			if (width == 0)
-				width = 1;
-			if (flags & SUPPRESS) {
-				size_t sum = 0;
-				for (;;) {
-					if ((n = inr) < (int)width) {
-						sum += n;
-						width -= n;
-						inp += n;
-						if (sum == 0)
-							goto input_failure;
-						break;
-					} else {
-						sum += width;
-						inr -= width;
-						inp += width;
-						break;
-					}
-				}
-				nread += sum;
-			} else {
-				bcopy(inp, va_arg(ap, char *), width);
-				inr -= width;
-				inp += width;
-				nread += width;
-				nassigned++;
-			}
-			nconversions++;
-			break;
-
-		case CT_CCL:
-			/* scan a (nonempty) character class (sets NOSKIP) */
-			if (width == 0)
-				width = (size_t)~0;	/* `infinity' */
-			/* take only those things in the class */
-			if (flags & SUPPRESS) {
-				n = 0;
-				while (ccltab[(unsigned char)*inp]) {
-					n++, inr--, inp++;
-					if (--width == 0)
-						break;
-					if (inr <= 0) {
-						if (n == 0)
-							goto input_failure;
-						break;
-					}
-				}
-				if (n == 0)
-					goto match_failure;
-			} else {
-				p0 = p = va_arg(ap, char *);
-				while (ccltab[(unsigned char)*inp]) {
-					inr--;
-					*p++ = *inp++;
-					if (--width == 0)
-						break;
-					if (inr <= 0) {
-						if (p == p0)
-							goto input_failure;
-						break;
-					}
-				}
-				n = p - p0;
-				if (n == 0)
-					goto match_failure;
-				*p = 0;
-				nassigned++;
-			}
-			nread += n;
-			nconversions++;
-			break;
-
-		case CT_STRING:
-			/* like CCL, but zero-length string OK, & no NOSKIP */
-			if (width == 0)
-				width = (size_t)~0;
-			if (flags & SUPPRESS) {
-				n = 0;
-				while (!fcc_isspace(*inp)) {
-					n++, inr--, inp++;
-					if (--width == 0)
-						break;
-					if (inr <= 0)
-						break;
-				}
-				nread += n;
-			} else {
-				p0 = p = va_arg(ap, char *);
-				while (!fcc_isspace(*inp)) {
-					inr--;
-					*p++ = *inp++;
-					if (--width == 0)
-						break;
-					if (inr <= 0)
-						break;
-				}
-				*p = 0;
-				nread += p - p0;
-				nassigned++;
-			}
-			nconversions++;
-			continue;
-
-		case CT_INT:
-			/* scan an integer as if by the conversion function */
-#ifdef hardway
-			if (width == 0 || width > sizeof(buf) - 1)
-				width = sizeof(buf) - 1;
-#else
-			/* size_t is unsigned, hence this optimisation */
-			if (--width > sizeof(buf) - 2)
-				width = sizeof(buf) - 2;
-			width++;
-#endif
-			flags |= SIGNOK | NDIGITS | NZDIGITS;
-			for (p = buf; width; width--) {
-				c = *inp;
-				/*
-				 * Switch on the character; `goto ok'
-				 * if we accept it as a part of number.
-				 */
-				switch (c) {
-
-				/*
-				 * The digit 0 is always legal, but is
-				 * special.  For %i conversions, if no
-				 * digits (zero or nonzero) have been
-				 * scanned (only signs), we will have
-				 * base==0.  In that case, we should set
-				 * it to 8 and enable 0x prefixing.
-				 * Also, if we have not scanned zero digits
-				 * before this, do not turn off prefixing
-				 * (someone else will turn it off if we
-				 * have scanned any nonzero digits).
-				 */
-				case '0':
-					if (base == 0) {
-						base = 8;
-						flags |= PFXOK;
-					}
-					if (flags & NZDIGITS)
-					    flags &= ~(SIGNOK|NZDIGITS|NDIGITS);
-					else
-					    flags &= ~(SIGNOK|PFXOK|NDIGITS);
-					goto ok;
-
-				/* 1 through 7 always legal */
-				case '1': case '2': case '3':
-				case '4': case '5': case '6': case '7':
-					base = basefix[base];
-					flags &= ~(SIGNOK | PFXOK | NDIGITS);
-					goto ok;
-
-				/* digits 8 and 9 ok iff decimal or hex */
-				case '8': case '9':
-					base = basefix[base];
-					if (base <= 8)
-						break;	/* not legal here */
-					flags &= ~(SIGNOK | PFXOK | NDIGITS);
-					goto ok;
-
-				/* letters ok iff hex */
-				case 'A': case 'B': case 'C':
-				case 'D': case 'E': case 'F':
-				case 'a': case 'b': case 'c':
-				case 'd': case 'e': case 'f':
-					/* no need to fix base here */
-					if (base <= 10)
-						break;	/* not legal here */
-					flags &= ~(SIGNOK | PFXOK | NDIGITS);
-					goto ok;
-
-				/* sign ok only as first character */
-				case '+': case '-':
-					if (flags & SIGNOK) {
-						flags &= ~SIGNOK;
-						goto ok;
-					}
-					break;
-
-				/* x ok iff flag still set & 2nd char */
-				case 'x': case 'X':
-					if (flags & PFXOK && p == buf + 1) {
-						base = 16;	/* if %i */
-						flags &= ~PFXOK;
-						goto ok;
-					}
-					break;
-				}
-
-				/*
-				 * If we got here, c is not a legal character
-				 * for a number.  Stop accumulating digits.
-				 */
-				break;
-		ok:
-				/*
-				 * c is legal: store it and look at the next.
-				 */
-				*p++ = c;
-				if (--inr > 0)
-					inp++;
-				else 
-					break;		/* end of input */
-			}
-			/*
-			 * If we had only a sign, it is no good; push
-			 * back the sign.  If the number ends in `x',
-			 * it was [sign] '0' 'x', so push back the x
-			 * and treat it as [sign] '0'.
-			 */
-			if (flags & NDIGITS) {
-				if (p > buf) {
-					inp--;
-					inr++;
-				}
-				goto match_failure;
-			}
-			c = ((u_char *)p)[-1];
-			if (c == 'x' || c == 'X') {
-				--p;
-				inp--;
-				inr++;
-			}
-			if ((flags & SUPPRESS) == 0) {
-				u_quad_t res;
-
-				*p = 0;
-				if ((flags & UNSIGNED) == 0)
-				    res = strtoq(buf, (char **)NULL, base);
-				else
-				    res = strtouq(buf, (char **)NULL, base);
-				if (flags & POINTER)
-					*va_arg(ap, void **) =
-						(void *)(uintptr_t)res;
-				else if (flags & SHORTSHORT)
-					*va_arg(ap, char *) = res;
-				else if (flags & SHORT)
-					*va_arg(ap, short *) = res;
-				else if (flags & LONG)
-					*va_arg(ap, long *) = res;
-				else if (flags & LONGLONG)
-					*va_arg(ap, long long *) = res;
-				else
-					*va_arg(ap, int *) = res;
-				nassigned++;
-			}
-			nread += p - buf;
-			nconversions++;
-			break;
-
-		}
-	}
-input_failure:
-	return (nconversions != 0 ? nassigned : -1);
-match_failure:
-	return (nassigned);
-}
-
-/*
- * Fill in the given table from the scanset at the given format
- * (just after `[').  Return a pointer to the character past the
- * closing `]'.  The table has a 1 wherever characters should be
- * considered part of the scanset.
- */
-static const u_char *
-fcc___sccl(char *tab, const u_char *fmt)
-{
-	int c, n, v;
-
-	/* first `clear' the whole table */
-	c = *fmt++;		/* first char hat => negated scanset */
-	if (c == '^') {
-		v = 1;		/* default => accept */
-		c = *fmt++;	/* get new first char */
-	} else
-		v = 0;		/* default => reject */
-
-	/* XXX: Will not work if sizeof(tab*) > sizeof(char) */
-	(void) memset(tab, v, 256);
-
-	if (c == 0)
-		return (fmt - 1);/* format ended before closing ] */
-
-	/*
-	 * Now set the entries corresponding to the actual scanset
-	 * to the opposite of the above.
-	 *
-	 * The first character may be ']' (or '-') without being special;
-	 * the last character may be '-'.
-	 */
-	v = 1 - v;
-	for (;;) {
-		tab[c] = v;		/* take character c */
-doswitch:
-		n = *fmt++;		/* and examine the next */
-		switch (n) {
-
-		case 0:			/* format ended too soon */
-			return (fmt - 1);
-
-		case '-':
-			/*
-			 * A scanset of the form
-			 *	[01+-]
-			 * is defined as `the digit 0, the digit 1,
-			 * the character +, the character -', but
-			 * the effect of a scanset such as
-			 *	[a-zA-Z0-9]
-			 * is implementation defined.  The V7 Unix
-			 * scanf treats `a-z' as `the letters a through
-			 * z', but treats `a-a' as `the letter a, the
-			 * character -, and the letter a'.
-			 *
-			 * For compatibility, the `-' is not considerd
-			 * to define a range if the character following
-			 * it is either a close bracket (required by ANSI)
-			 * or is not numerically greater than the character
-			 * we just stored in the table (c).
-			 */
-			n = *fmt;
-			if (n == ']' || n < c) {
-				c = '-';
-				break;	/* resume the for(;;) */
-			}
-			fmt++;
-			/* fill in the range */
-			do {
-			    tab[++c] = v;
-			} while (c < n);
-			c = n;
-			/*
-			 * Alas, the V7 Unix scanf also treats formats
-			 * such as [a-c-e] as `the letters a through e'.
-			 * This too is permitted by the standard....
-			 */
-			goto doswitch;
-			break;
-
-		case ']':		/* end of scanset */
-			return (fmt);
-
-		default:		/* just another character */
-			c = n;
-			break;
-		}
-	}
-	/* NOTREACHED */
-}

+ 0 - 5
examples/Demo/proj.flash/fcc_sscanf.h

@@ -1,5 +0,0 @@
-#pragma once
-extern "C"
-{
-	int fcc_sscanf(const char *ibuf, const char *fmt, ...);
-}

+ 0 - 67
examples/Demo/proj.flash/index.html

@@ -1,67 +0,0 @@
-<!DOCTYPE html>
-<html lang="en">
-  <head>
-    <meta charset="utf-8">
-    <title>Oxygine Demo</title>
-    <meta name="viewport" content="width=device-width, initial-scale=1.0">
-    <meta name="description" content="">
-    <meta name="author" content="">
-
-    <!-- Le HTML5 shim, for IE6-8 support of HTML elements -->
-    <!--[if lt IE 9]>
-      <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
-    <![endif]-->
-
-    <!-- Le styles -->
-    <link href="bootstrap/css/bootstrap.css" rel="stylesheet">
-    <link href="bootstrap/css/bootstrap-responsive.css" rel="stylesheet">
-    <link href="bootstrap/css/docs.css" rel="stylesheet">
-    <link href="bootstrap/js/google-code-prettify/prettify.css" rel="stylesheet">
-
-    <script type="text/javascript" src="swfobject.js"></script>
-    <script type="text/javascript">
-    swfobject.registerObject("stage3dswf", "11.3.0", "expressInstall.swf");
-    swfobject.registerObject("spacetriangleswf", "11.3.0", "expressInstall.swf");
- </script>
-</head>
-  <body data-spy="scroll" data-target=".subnav" data-offset="50">
-    <div class="container">
-      <section id="content">
-        <div class="page-header">
-          <h1>Oxygine Demo</h1>
-        </div>
-        <div>
-          <table><tr><td>
-            <object id="stage3dswf" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="800" height="600">
-              <param name="movie" value="../fccbuild/demo.exe" />
-              <!--[if !IE]>-->
-              <object type="application/x-shockwave-flash" data="../fccbuild/demo.exe" width="800" height="600">
-              <!--<![endif]-->
-                <param name="wmode" value="direct" />
-                <param name="allowScriptAccess" value="sameDomain" />
-                <param name="bgcolor" value="CCCCCC" /> 
-                <div>
-                  <h1>You need to update flash:</h1>
-                  <p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
-                </div>
-              <!--[if !IE]>-->
-              </object>
-              <!--<![endif]-->
-            </object>
-          </td><td>
-            
-          </td></tr></table>
-        </div>
-      </section>
-    </div>
-
-    <!-- Le javascript
-    ================================================== -->
-    <!-- Placed at the end of the document so the pages load faster -->
-    <script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
-    <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
-    <script src="bootstrap/js/bootstrap.min.js"></script>
-    <script src="assets/js/bootstrap-tab.js"></script>
-        
-  </body>
-</html>

File diff suppressed because it is too large
+ 0 - 3
examples/Demo/proj.flash/swfobject.js


+ 39 - 34
examples/Demo/proj.ios/demo_ios.xcodeproj/project.pbxproj

@@ -7,11 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048AD0AD197D24AB001963EF /* CoreMotion.framework */; };
 		04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998D3517F8A96E003441C3 /* libSDL2.a */; };
 		04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE117F8ADB4003441C3 /* libz.dylib */; };
 		04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE217F8ADB4003441C3 /* QuartzCore.framework */; };
 		04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE317F8ADB4003441C3 /* AudioToolbox.framework */; };
 		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
+		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
 		04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE517F8ADB4003441C3 /* OpenGLES.framework */; };
 		04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEB17F8ADD4003441C3 /* UIKit.framework */; };
 		04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEC17F8ADD4003441C3 /* Foundation.framework */; };
@@ -70,6 +72,7 @@
 		04998EE217F8ADB4003441C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		04998EE317F8ADB4003441C3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		04998EE417F8ADB4003441C3 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		04998EE517F8ADB4003441C3 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		04998EEB17F8ADD4003441C3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		04998EEC17F8ADD4003441C3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -80,23 +83,23 @@
 		360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
 		0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
 		4DA100C319512824B7570663 /* ../src/test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = test.cpp; path = ../src/test.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = test.h; path = ../src/test.h; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/TestInputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestInputText.h; path = ../src/TestInputText.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/TestInputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestInputText.h; path = ../src/TestInputText.h; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = test.h; path = ../src/test.h; sourceTree = "<group>"; };
 		04FE4D4FB640E0DF92DFB865 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
 		7F3B12E3C9D554D9FE28101D /* ../data/demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = demo; path = ../data/demo; sourceTree = "<group>"; };
 		F6123B1E6FE4471A00F49751 /* ../data/ext */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = ext; path = ../data/ext; sourceTree = "<group>"; };
@@ -113,6 +116,7 @@
 				049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */,
 				04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */,
 				04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */,
+				048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */,
 				04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */,
 				04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */,
 				04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */,
@@ -164,6 +168,7 @@
 			isa = PBXGroup;
 			children = (
 				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
 				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
 				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
 				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
@@ -202,23 +207,23 @@
 				360377333740D8A2FD15BBE6 /* entry_point.cpp */, 
 				0BF9628FC8D38F9748F0CDEB /* example.cpp */, 
 				4DA100C319512824B7570663 /* test.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* example.h */, 
-				F196143B0370A9D348494ACC /* test.h */, 
-				7746CA7A63049ED8F7D6BF42 /* TestBox9Sprite.h */, 
-				D954BD82D7708B65A08FB6B9 /* TestClipRect.h */, 
-				BD0E956CC3A2F7EB94822B5C /* TestDrag.h */, 
-				7623D793B59EF0CD569E6EC2 /* TestInputText.h */, 
-				AFA30E959880563E6ABBBC4F /* TestManageRes.h */, 
-				B52CCD463855CF91A7FBDB8E /* TestMask.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* TestPerf.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* TestProgressBar.h */, 
-				8F2AFB956EEAEED67C5B7571 /* TestRender2Texture.h */, 
-				047F6BD19F885FF186A1447C /* TestSliding.h */, 
-				C570FAEF487CD34B62389F89 /* TestTexel2Pixel.h */, 
-				2418B9A339E6004913AF5980 /* TestText.h */, 
-				CAD9D6A98986EA8082368448 /* TestTextureFormat.h */, 
-				67194AC90FEA68E7C96E6907 /* TestTweens.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* TestUserShader.h */, 
+				2CE4BD5BB9DEF92439C0AB58 /* TestBox9Sprite.h */, 
+				F196143B0370A9D348494ACC /* TestClipRect.h */, 
+				7746CA7A63049ED8F7D6BF42 /* TestDrag.h */, 
+				D954BD82D7708B65A08FB6B9 /* TestInputText.h */, 
+				BD0E956CC3A2F7EB94822B5C /* TestManageRes.h */, 
+				7623D793B59EF0CD569E6EC2 /* TestMask.h */, 
+				AFA30E959880563E6ABBBC4F /* TestPerf.h */, 
+				B52CCD463855CF91A7FBDB8E /* TestProgressBar.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* TestRender2Texture.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* TestSliding.h */, 
+				8F2AFB956EEAEED67C5B7571 /* TestTexel2Pixel.h */, 
+				047F6BD19F885FF186A1447C /* TestText.h */, 
+				C570FAEF487CD34B62389F89 /* TestTextureFormat.h */, 
+				2418B9A339E6004913AF5980 /* TestTweens.h */, 
+				CAD9D6A98986EA8082368448 /* TestUserShader.h */, 
+				67194AC90FEA68E7C96E6907 /* example.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* test.h */, 
 
 			);
 			name = src;

+ 1 - 1
examples/Demo/proj.macosx/Demo_macosx-Info.plist

@@ -25,7 +25,7 @@
 	<key>LSMinimumSystemVersion</key>
 	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>

+ 34 - 34
examples/Demo/proj.macosx/demo_macosx.xcodeproj/project.pbxproj

@@ -97,23 +97,23 @@
 		360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
 		0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
 		4DA100C319512824B7570663 /* ../src/test.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = test.cpp; path = ../src/test.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = test.h; path = ../src/test.h; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/TestInputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestInputText.h; path = ../src/TestInputText.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/TestBox9Sprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestBox9Sprite.h; path = ../src/TestBox9Sprite.h; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/TestClipRect.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestClipRect.h; path = ../src/TestClipRect.h; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/TestDrag.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestDrag.h; path = ../src/TestDrag.h; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/TestInputText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestInputText.h; path = ../src/TestInputText.h; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/TestManageRes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestManageRes.h; path = ../src/TestManageRes.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/TestMask.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestMask.h; path = ../src/TestMask.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/TestPerf.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestPerf.h; path = ../src/TestPerf.h; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/TestProgressBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestProgressBar.h; path = ../src/TestProgressBar.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/TestRender2Texture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestRender2Texture.h; path = ../src/TestRender2Texture.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/TestSliding.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestSliding.h; path = ../src/TestSliding.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/TestTexel2Pixel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTexel2Pixel.h; path = ../src/TestTexel2Pixel.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/TestText.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestText.h; path = ../src/TestText.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/TestTextureFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTextureFormat.h; path = ../src/TestTextureFormat.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/TestTweens.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestTweens.h; path = ../src/TestTweens.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/TestUserShader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = TestUserShader.h; path = ../src/TestUserShader.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/test.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = test.h; path = ../src/test.h; sourceTree = "<group>"; };
 		04FE4D4FB640E0DF92DFB865 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
 		7F3B12E3C9D554D9FE28101D /* ../data/demo */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = demo; path = ../data/demo; sourceTree = "<group>"; };
 		F6123B1E6FE4471A00F49751 /* ../data/ext */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = ext; path = ../data/ext; sourceTree = "<group>"; };
@@ -224,23 +224,23 @@
 				360377333740D8A2FD15BBE6 /* entry_point.cpp */, 
 				0BF9628FC8D38F9748F0CDEB /* example.cpp */, 
 				4DA100C319512824B7570663 /* test.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* example.h */, 
-				F196143B0370A9D348494ACC /* test.h */, 
-				7746CA7A63049ED8F7D6BF42 /* TestBox9Sprite.h */, 
-				D954BD82D7708B65A08FB6B9 /* TestClipRect.h */, 
-				BD0E956CC3A2F7EB94822B5C /* TestDrag.h */, 
-				7623D793B59EF0CD569E6EC2 /* TestInputText.h */, 
-				AFA30E959880563E6ABBBC4F /* TestManageRes.h */, 
-				B52CCD463855CF91A7FBDB8E /* TestMask.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* TestPerf.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* TestProgressBar.h */, 
-				8F2AFB956EEAEED67C5B7571 /* TestRender2Texture.h */, 
-				047F6BD19F885FF186A1447C /* TestSliding.h */, 
-				C570FAEF487CD34B62389F89 /* TestTexel2Pixel.h */, 
-				2418B9A339E6004913AF5980 /* TestText.h */, 
-				CAD9D6A98986EA8082368448 /* TestTextureFormat.h */, 
-				67194AC90FEA68E7C96E6907 /* TestTweens.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* TestUserShader.h */, 
+				2CE4BD5BB9DEF92439C0AB58 /* TestBox9Sprite.h */, 
+				F196143B0370A9D348494ACC /* TestClipRect.h */, 
+				7746CA7A63049ED8F7D6BF42 /* TestDrag.h */, 
+				D954BD82D7708B65A08FB6B9 /* TestInputText.h */, 
+				BD0E956CC3A2F7EB94822B5C /* TestManageRes.h */, 
+				7623D793B59EF0CD569E6EC2 /* TestMask.h */, 
+				AFA30E959880563E6ABBBC4F /* TestPerf.h */, 
+				B52CCD463855CF91A7FBDB8E /* TestProgressBar.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* TestRender2Texture.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* TestSliding.h */, 
+				8F2AFB956EEAEED67C5B7571 /* TestTexel2Pixel.h */, 
+				047F6BD19F885FF186A1447C /* TestText.h */, 
+				C570FAEF487CD34B62389F89 /* TestTextureFormat.h */, 
+				2418B9A339E6004913AF5980 /* TestTweens.h */, 
+				CAD9D6A98986EA8082368448 /* TestUserShader.h */, 
+				67194AC90FEA68E7C96E6907 /* example.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* test.h */, 
 
 			);
 			name = src;

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

@@ -95,7 +95,7 @@
     <ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/test.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/example.h" /><ClInclude Include="../src/test.h" /><ClInclude Include="../src/TestBox9Sprite.h" /><ClInclude Include="../src/TestClipRect.h" /><ClInclude Include="../src/TestDrag.h" /><ClInclude Include="../src/TestInputText.h" /><ClInclude Include="../src/TestManageRes.h" /><ClInclude Include="../src/TestMask.h" /><ClInclude Include="../src/TestPerf.h" /><ClInclude Include="../src/TestProgressBar.h" /><ClInclude Include="../src/TestRender2Texture.h" /><ClInclude Include="../src/TestSliding.h" /><ClInclude Include="../src/TestTexel2Pixel.h" /><ClInclude Include="../src/TestText.h" /><ClInclude Include="../src/TestTextureFormat.h" /><ClInclude Include="../src/TestTweens.h" /><ClInclude Include="../src/TestUserShader.h" />
+    <ClInclude Include="../src/TestBox9Sprite.h" /><ClInclude Include="../src/TestClipRect.h" /><ClInclude Include="../src/TestDrag.h" /><ClInclude Include="../src/TestInputText.h" /><ClInclude Include="../src/TestManageRes.h" /><ClInclude Include="../src/TestMask.h" /><ClInclude Include="../src/TestPerf.h" /><ClInclude Include="../src/TestProgressBar.h" /><ClInclude Include="../src/TestRender2Texture.h" /><ClInclude Include="../src/TestSliding.h" /><ClInclude Include="../src/TestTexel2Pixel.h" /><ClInclude Include="../src/TestText.h" /><ClInclude Include="../src/TestTextureFormat.h" /><ClInclude Include="../src/TestTweens.h" /><ClInclude Include="../src/TestUserShader.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/test.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

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

@@ -97,7 +97,7 @@
     <ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/test.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/example.h" /><ClInclude Include="../src/test.h" /><ClInclude Include="../src/TestBox9Sprite.h" /><ClInclude Include="../src/TestClipRect.h" /><ClInclude Include="../src/TestDrag.h" /><ClInclude Include="../src/TestInputText.h" /><ClInclude Include="../src/TestManageRes.h" /><ClInclude Include="../src/TestMask.h" /><ClInclude Include="../src/TestPerf.h" /><ClInclude Include="../src/TestProgressBar.h" /><ClInclude Include="../src/TestRender2Texture.h" /><ClInclude Include="../src/TestSliding.h" /><ClInclude Include="../src/TestTexel2Pixel.h" /><ClInclude Include="../src/TestText.h" /><ClInclude Include="../src/TestTextureFormat.h" /><ClInclude Include="../src/TestTweens.h" /><ClInclude Include="../src/TestUserShader.h" />
+    <ClInclude Include="../src/TestBox9Sprite.h" /><ClInclude Include="../src/TestClipRect.h" /><ClInclude Include="../src/TestDrag.h" /><ClInclude Include="../src/TestInputText.h" /><ClInclude Include="../src/TestManageRes.h" /><ClInclude Include="../src/TestMask.h" /><ClInclude Include="../src/TestPerf.h" /><ClInclude Include="../src/TestProgressBar.h" /><ClInclude Include="../src/TestRender2Texture.h" /><ClInclude Include="../src/TestSliding.h" /><ClInclude Include="../src/TestTexel2Pixel.h" /><ClInclude Include="../src/TestText.h" /><ClInclude Include="../src/TestTextureFormat.h" /><ClInclude Include="../src/TestTweens.h" /><ClInclude Include="../src/TestUserShader.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/test.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 2 - 2
examples/Demo/src/TestInputText.h

@@ -11,7 +11,7 @@ class TextWithBackground: public ColorRectSprite
 public:
 	TextWithBackground(const string &defText)
 	{
-		text = new TextActor;
+		text = new TextField;
 		//text won't handle any touch event
 		text->setInputEnabled(false);
 
@@ -27,7 +27,7 @@ public:
 		addChild(text);		
 	}
 
-	spTextActor text;
+	spTextField text;
 
 	void sizeChanged(const Vector2 &size)
 	{

+ 8 - 1
examples/Demo/src/TestManageRes.h

@@ -1,6 +1,10 @@
 #pragma once
 #include "test.h"
 #include "Multithreading.h"
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+#endif
+
 class ManageResTest: public Test
 {
 public:
@@ -8,8 +12,11 @@ public:
 	{
 		toggle sw[] = {toggle("unload resources", 1), toggle("load resources", 0)};
 		addToggle("switch", sw, 2);
+#ifdef EMSCRIPTEN
+#else
 		addButton("mt", "Multithreading loading");
 		addButton("mt_slow", "MT loading (slow demo)");
+#endif
 
 
 		for (int i = 0; i < resources.getCount(); ++i)
@@ -36,7 +43,7 @@ public:
 			}
 		}
 
-		spTextActor text = new TextActor;
+		spTextField text = new TextField;
 		text->attachTo(content);
 
 		text->setSize(300, 200);

+ 1 - 1
examples/Demo/src/TestMask.h

@@ -44,7 +44,7 @@ public:
 		style.hAlign = TextStyle::HALIGN_CENTER;
 		style.multiline = true;
 
-		spTextActor text = initActor(new TextActor(), 
+		spTextField text = initActor(new TextField(), 
 			arg_attachTo = _masked,
 			arg_pos = content->getSize()/2,
 			arg_scale = 1.5f,

+ 1 - 1
examples/Demo/src/TestSliding.h

@@ -41,7 +41,7 @@ public:
 			button->addEventListener(TouchEvent::CLICK, CLOSURE(this, &TestSliding::testClick));
 		}
 
-		spTextActor title = initActor(new TextActor, 
+		spTextField title = initActor(new TextField, 
 			arg_text = "Sliding demo", 
 			arg_w = content->getWidth(),
 			arg_vAlign = TextStyle::VALIGN_TOP,

+ 4 - 4
examples/Demo/src/TestText.h

@@ -32,9 +32,9 @@ public:
 
 	spColorRectSprite bg;
 	spColorRectSprite spriteTextRect;
-	spTextActor text;
+	spTextField text;
 
-	spTextActor textDetails;
+	spTextField textDetails;
 
 	TestText()
 	{
@@ -43,7 +43,7 @@ public:
 		addButton("next", "Next Test");
 		addButton("prev", "Prev Test");		
 
-		textDetails = new TextActor;
+		textDetails = new TextField;
 		textDetails->attachTo(ui);
 		textDetails->setSize(Vector2(300, 0));
 		textDetails->setPosition(200.0f, getRoot()->getHeight() - 10);
@@ -68,7 +68,7 @@ public:
 		spriteTextRect->attachTo(bg);
 		spriteTextRect->setColor(Color(Color::Red, 80));
 
-		text = new TextActor;
+		text = new TextField;
 		text->attachTo(bg);
 
 		Vector2 size(420, 300);

+ 30 - 16
examples/Demo/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -77,16 +78,17 @@ void run()
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -120,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -160,8 +170,8 @@ void run()
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -169,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -188,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

+ 7 - 7
examples/Demo/src/test.cpp

@@ -14,9 +14,9 @@ public:
 	vector<Test::toggle> _items;
 };
 
-spTextActor createText(string txt)
+spTextField createText(string txt)
 {
-	spTextActor text = new TextActor();
+	spTextField text = new TextField();
 
 	TextStyle style;
 	style.font = resourcesUI.getResFont("main")->getFont();
@@ -39,7 +39,7 @@ spButton createButtonHelper(spButton button, string txt, EventCallback cb)
 	button->addEventListener(TouchEvent::CLICK, cb);
 
 	//create Actor with Text and it to button as child
-	spTextActor text = createText(txt);
+	spTextField text = createText(txt);
 	text->setSize(button->getSize());
 	text->attachTo(button);
 
@@ -121,7 +121,7 @@ void Test::updateText(string id, string txt)
 	if (!child)
 		return;
 
-	spTextActor t = safeSpCast<TextActor>(child->getFirstChild());
+	spTextField t = safeSpCast<TextField>(child->getFirstChild());
 	if (!t)
 		return;
 	t->setText(txt);
@@ -140,7 +140,7 @@ void Test::_toggleClicked(Event *event)
 	toggleClicked(event->currentTarget->getName(), &t->_items[t->_current]);
 
 	t->_current = (t->_current + 1) % t->_items.size();
-	spTextActor ta = safeSpCast<TextActor>(t->getFirstChild());
+	spTextField ta = safeSpCast<TextField>(t->getFirstChild());
 	const toggle *data = &t->_items[t->_current];
 	ta->setText(data->text);
 }
@@ -181,13 +181,13 @@ void Test::notify(string txt, int time)
 	tq->add(Actor::TweenAlpha(255), 300, 1, false, 0, Tween::ease_inExpo);
 	tq->add(Actor::TweenAlpha(0), 300, 1, false, 1200);
 	tq->setDetachActor(true);
-	tq->setDoneCallback(CLOSURE(this, &Test::notifyDone));
+	tq->addDoneCallback(CLOSURE(this, &Test::notifyDone));
 
 	sprite->addTween(tq);
 	sprite->attachTo(ui);
 	sprite->setPosition(2.0f, getHeight() - 100.0f - N * sprite->getHeight() * 1.1f);
 
-	spTextActor text = createText(txt);
+	spTextField text = createText(txt);
 	text->attachTo(sprite);
 	text->setColor(Color::Black);
 	text->setPosition(sprite->getSize()/2);

+ 10 - 0
examples/DemoBox2D/proj.marmalade/data/app.config.txt

@@ -0,0 +1,10 @@
+# This .config.txt file documents configuration settings for your
+# application
+# The syntax is similar to that in .icf files:
+#
+# [GroupName]
+# Setting     Documentation for setting
+#
+# e.g.
+# [MyApplicationGroup]
+# MySetting   Description of what MySetting is for, its default values, etc

+ 17 - 0
examples/DemoBox2D/proj.marmalade/data/app.icf

@@ -0,0 +1,17 @@
+# This file is for configuration settings for your
+# application.
+#
+# The syntax is similar to windows .ini files ie
+#
+# [GroupName]
+# Setting = Value
+#
+# Which can be read by your application using
+#  e.g s3eConfigGetString("GroupName", "Setting", string)
+#
+# All settings must be documented in .config.txt files.
+# New settings specific to this application should be
+# documented in app.config.txt
+#
+# Some conditional operations are also permitted, see the
+# S3E documentation for details.

+ 34 - 16
examples/DemoBox2D/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -72,19 +73,22 @@ int mainloop()
 //it is application entry point
 void run()
 {
+	ObjectBase::__startTracingLeaks();
+
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -118,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -150,14 +162,16 @@ void run()
 	//dump list should be empty now
 	//we deleted everything and could be sure that there aren't any memory leaks
 	ObjectBase::dumpCreatedObjects();
+
+	ObjectBase::__stopTracingLeaks();
 	//end
 }
 
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -165,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -184,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

+ 1 - 1
examples/Game/part1/proj.android/jni/src/Android.mk

@@ -6,7 +6,7 @@ LOCAL_MODULE := main
 #SDK_ROOT points to folder with SDL and oxygine-framework
 LOCAL_SRC_FILES := ../../../../../../..//SDL/src/main/android/SDL_android_main.c
 
-LOCAL_SRC_FILES += ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/Game.cpp ../../../src/Joystick.cpp ../../../src/Player.cpp ../../../src/res.cpp ../../../src/Unit.cpp 
+LOCAL_SRC_FILES += ../../../src/Game.cpp ../../../src/Joystick.cpp ../../../src/Player.cpp ../../../src/Unit.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/res.cpp 
 
 
 LOCAL_STATIC_LIBRARIES := oxygine-framework_static

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

@@ -6,6 +6,6 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
-add_executable(GamePart1 ../src/entry_point.cpp ../src/example.cpp ../src/Game.cpp ../src/Joystick.cpp ../src/Player.cpp ../src/res.cpp ../src/Unit.cpp  ../src/example.h ../src/Game.h ../src/Joystick.h ../src/Player.h ../src/res.h ../src/Unit.h )
+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 )
 
 target_link_libraries(GamePart1 ${OXYGINE_CORE_LIBS})

+ 19 - 0
examples/Game/part1/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (GamePart1)
+
+add_subdirectory(../../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+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 )
+
+set_target_properties(GamePart1
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(GamePart1 ${OXYGINE_CORE_LIBS})
+em_link_pre_js(GamePart1 ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/Game/part1/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/Game/part1/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 45 - 40
examples/Game/part1/proj.ios/GamePart1_ios.xcodeproj/project.pbxproj

@@ -7,11 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048AD0AD197D24AB001963EF /* CoreMotion.framework */; };
 		04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998D3517F8A96E003441C3 /* libSDL2.a */; };
 		04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE117F8ADB4003441C3 /* libz.dylib */; };
 		04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE217F8ADB4003441C3 /* QuartzCore.framework */; };
 		04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE317F8ADB4003441C3 /* AudioToolbox.framework */; };
 		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
+		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
 		04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE517F8ADB4003441C3 /* OpenGLES.framework */; };
 		04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEB17F8ADD4003441C3 /* UIKit.framework */; };
 		04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEC17F8ADD4003441C3 /* Foundation.framework */; };
@@ -20,13 +22,13 @@
 		04998EF817F8B6F3003441C3 /* libjpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EF617F8B6F3003441C3 /* libjpeg.a */; };
 		049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B52AD1871EBBA00EF3C66 /* liboxygine_ios.a */; };
 		04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04E9AD3E1876FE84006A7317 /* Images.xcassets */; };
-		2DC477AC10D6C07B3FE008F6 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */; };
-		C8860D93875589970329DCCD /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/Game.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Player.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/res.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/Unit.cpp */; };
+		2DC477AC10D6C07B3FE008F6 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Game.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Joystick.cpp */; };
+		C8860D93875589970329DCCD /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/Player.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Unit.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/entry_point.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/example.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/res.cpp */; };
 		F2CFD518E4E2E05ECEDBB262 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../data/images */; };
 		693088A7AB377368EE4A018E /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../data/xmls */; };
 
@@ -71,6 +73,7 @@
 		04998EE217F8ADB4003441C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		04998EE317F8ADB4003441C3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		04998EE417F8ADB4003441C3 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		04998EE517F8ADB4003441C3 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		04998EEB17F8ADD4003441C3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		04998EEC17F8ADD4003441C3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -78,19 +81,19 @@
 		04998EF517F8B6F3003441C3 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../../../..//oxygine/third_party/ios/libraries/libpng.a"; sourceTree = "<group>"; };
 		04998EF617F8B6F3003441C3 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../..//oxygine/third_party/ios/libraries/libjpeg.a"; sourceTree = "<group>"; };
 		04E9AD3E1876FE84006A7317 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name =Images.xcassets; path = GamePart1/Images.xcassets; sourceTree = "<group>"; };
-		360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		360377333740D8A2FD15BBE6 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		BA41FC88D76540A6905224D6 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		2CE4BD5BB9DEF92439C0AB58 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
@@ -104,6 +107,7 @@
 				049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */,
 				04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */,
 				04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */,
+				048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */,
 				04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */,
 				04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */,
 				04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */,
@@ -155,6 +159,7 @@
 			isa = PBXGroup;
 			children = (
 				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
 				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
 				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
 				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
@@ -187,19 +192,19 @@
 		04998D4417F8A9ED003441C3 /* src */ = {
 			isa = PBXGroup;
 			children = (
-				360377333740D8A2FD15BBE6 /* entry_point.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* example.cpp */, 
-				4DA100C319512824B7570663 /* Game.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Joystick.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* Player.cpp */, 
-				F6123B1E6FE4471A00F49751 /* res.cpp */, 
-				5DE458993031811A4C7D28C1 /* Unit.cpp */, 
-				F196143B0370A9D348494ACC /* example.h */, 
-				7746CA7A63049ED8F7D6BF42 /* Game.h */, 
-				D954BD82D7708B65A08FB6B9 /* Joystick.h */, 
-				BD0E956CC3A2F7EB94822B5C /* Player.h */, 
-				7623D793B59EF0CD569E6EC2 /* res.h */, 
-				AFA30E959880563E6ABBBC4F /* Unit.h */, 
+				360377333740D8A2FD15BBE6 /* Game.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Joystick.cpp */, 
+				4DA100C319512824B7570663 /* Player.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* Unit.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* entry_point.cpp */, 
+				F6123B1E6FE4471A00F49751 /* example.cpp */, 
+				5DE458993031811A4C7D28C1 /* res.cpp */, 
+				F196143B0370A9D348494ACC /* Game.h */, 
+				7746CA7A63049ED8F7D6BF42 /* Joystick.h */, 
+				D954BD82D7708B65A08FB6B9 /* Player.h */, 
+				BD0E956CC3A2F7EB94822B5C /* Unit.h */, 
+				7623D793B59EF0CD569E6EC2 /* example.h */, 
+				AFA30E959880563E6ABBBC4F /* res.h */, 
 
 			);
 			name = src;
@@ -308,13 +313,13 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				2DC477AC10D6C07B3FE008F6 /* entry_point.cpp */, 
-				DA49ED8903C628BA578C8670 /* example.cpp */, 
-				C8860D93875589970329DCCD /* Game.cpp */, 
-				1E839D002B2BA83FC83A695A /* Joystick.cpp */, 
-				3A631A475DE035FC53ADE5EA /* Player.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* res.cpp */, 
-				EFF139F8BA484314F7AAF645 /* Unit.cpp */, 
+				2DC477AC10D6C07B3FE008F6 /* Game.cpp */, 
+				DA49ED8903C628BA578C8670 /* Joystick.cpp */, 
+				C8860D93875589970329DCCD /* Player.cpp */, 
+				1E839D002B2BA83FC83A695A /* Unit.cpp */, 
+				3A631A475DE035FC53ADE5EA /* entry_point.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* example.cpp */, 
+				EFF139F8BA484314F7AAF645 /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
examples/Game/part1/proj.macosx/GamePart1_macosx-Info.plist

@@ -25,7 +25,7 @@
 	<key>LSMinimumSystemVersion</key>
 	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>

+ 40 - 40
examples/Game/part1/proj.macosx/GamePart1_macosx.xcodeproj/project.pbxproj

@@ -15,13 +15,13 @@
 		0405A00118720D2200BA6557 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04059FF11872031A00BA6557 /* libpng.a */; };
 		049B57321871FBE900EF3C66 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B57311871FBE900EF3C66 /* Cocoa.framework */; };
 		049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 049B57491871FBE900EF3C66 /* Images.xcassets */; };
-		2DC477AC10D6C07B3FE008F6 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */; };
-		C8860D93875589970329DCCD /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/Game.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Player.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/res.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/Unit.cpp */; };
+		2DC477AC10D6C07B3FE008F6 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Game.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Joystick.cpp */; };
+		C8860D93875589970329DCCD /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/Player.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Unit.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/entry_point.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/example.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/res.cpp */; };
 		F2CFD518E4E2E05ECEDBB262 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../data/images */; };
 		693088A7AB377368EE4A018E /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../data/xmls */; };
 
@@ -95,19 +95,19 @@
 		049B57391871FBE900EF3C66 /* demo_macosx-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "GamePart1_macosx-Info.plist"; sourceTree = "<group>"; };
 		049B57491871FBE900EF3C66 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GamePart1/Images.xcassets; sourceTree = "<group>"; };
 		049B57501871FBE900EF3C66 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
-		360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		360377333740D8A2FD15BBE6 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		BA41FC88D76540A6905224D6 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		2CE4BD5BB9DEF92439C0AB58 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
@@ -209,19 +209,19 @@
 		04A57D391871FF8B0068B1E5 /* src */ = {
 			isa = PBXGroup;
 			children = (
-				360377333740D8A2FD15BBE6 /* entry_point.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* example.cpp */, 
-				4DA100C319512824B7570663 /* Game.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Joystick.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* Player.cpp */, 
-				F6123B1E6FE4471A00F49751 /* res.cpp */, 
-				5DE458993031811A4C7D28C1 /* Unit.cpp */, 
-				F196143B0370A9D348494ACC /* example.h */, 
-				7746CA7A63049ED8F7D6BF42 /* Game.h */, 
-				D954BD82D7708B65A08FB6B9 /* Joystick.h */, 
-				BD0E956CC3A2F7EB94822B5C /* Player.h */, 
-				7623D793B59EF0CD569E6EC2 /* res.h */, 
-				AFA30E959880563E6ABBBC4F /* Unit.h */, 
+				360377333740D8A2FD15BBE6 /* Game.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Joystick.cpp */, 
+				4DA100C319512824B7570663 /* Player.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* Unit.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* entry_point.cpp */, 
+				F6123B1E6FE4471A00F49751 /* example.cpp */, 
+				5DE458993031811A4C7D28C1 /* res.cpp */, 
+				F196143B0370A9D348494ACC /* Game.h */, 
+				7746CA7A63049ED8F7D6BF42 /* Joystick.h */, 
+				D954BD82D7708B65A08FB6B9 /* Player.h */, 
+				BD0E956CC3A2F7EB94822B5C /* Unit.h */, 
+				7623D793B59EF0CD569E6EC2 /* example.h */, 
+				AFA30E959880563E6ABBBC4F /* res.h */, 
 
 			);
 			name = src;
@@ -354,13 +354,13 @@
 			isa = PBXSourcesBuildPhase;
 			buildActionMask = 2147483647;
 			files = (
-				2DC477AC10D6C07B3FE008F6 /* entry_point.cpp */, 
-				DA49ED8903C628BA578C8670 /* example.cpp */, 
-				C8860D93875589970329DCCD /* Game.cpp */, 
-				1E839D002B2BA83FC83A695A /* Joystick.cpp */, 
-				3A631A475DE035FC53ADE5EA /* Player.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* res.cpp */, 
-				EFF139F8BA484314F7AAF645 /* Unit.cpp */, 
+				2DC477AC10D6C07B3FE008F6 /* Game.cpp */, 
+				DA49ED8903C628BA578C8670 /* Joystick.cpp */, 
+				C8860D93875589970329DCCD /* Player.cpp */, 
+				1E839D002B2BA83FC83A695A /* Unit.cpp */, 
+				3A631A475DE035FC53ADE5EA /* entry_point.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* example.cpp */, 
+				EFF139F8BA484314F7AAF645 /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 2 - 2
examples/Game/part1/proj.win32/GamePart1_vs2010.vcxproj

@@ -92,10 +92,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 2 - 2
examples/Game/part1/proj.win32/GamePart1_vs2013.vcxproj

@@ -94,10 +94,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 34 - 16
examples/Game/part1/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -72,19 +73,22 @@ int mainloop()
 //it is application entry point
 void run()
 {
+	ObjectBase::__startTracingLeaks();
+
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -118,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -150,14 +162,16 @@ void run()
 	//dump list should be empty now
 	//we deleted everything and could be sure that there aren't any memory leaks
 	ObjectBase::dumpCreatedObjects();
+
+	ObjectBase::__stopTracingLeaks();
 	//end
 }
 
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -165,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -184,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

+ 1 - 1
examples/Game/part2/proj.android/jni/src/Android.mk

@@ -6,7 +6,7 @@ LOCAL_MODULE := main
 #SDK_ROOT points to folder with SDL and oxygine-framework
 LOCAL_SRC_FILES := ../../../../../../..//SDL/src/main/android/SDL_android_main.c
 
-LOCAL_SRC_FILES += ../../../src/Enemy.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/Game.cpp ../../../src/Joystick.cpp ../../../src/Player.cpp ../../../src/res.cpp ../../../src/Rocket.cpp ../../../src/Unit.cpp 
+LOCAL_SRC_FILES += ../../../src/Enemy.cpp ../../../src/Game.cpp ../../../src/Joystick.cpp ../../../src/Player.cpp ../../../src/Rocket.cpp ../../../src/Unit.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/res.cpp 
 
 
 LOCAL_STATIC_LIBRARIES := oxygine-framework_static

+ 1 - 1
examples/Game/part2/proj.cmake/CMakeLists.txt

@@ -6,6 +6,6 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
-add_executable(GamePart2 ../src/Enemy.cpp ../src/entry_point.cpp ../src/example.cpp ../src/Game.cpp ../src/Joystick.cpp ../src/Player.cpp ../src/res.cpp ../src/Rocket.cpp ../src/Unit.cpp  ../src/Enemy.h ../src/example.h ../src/Game.h ../src/Joystick.h ../src/Player.h ../src/res.h ../src/Rocket.h ../src/Unit.h )
+add_executable(GamePart2 ../src/Enemy.cpp ../src/Game.cpp ../src/Joystick.cpp ../src/Player.cpp ../src/Rocket.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Enemy.h ../src/Game.h ../src/Joystick.h ../src/Player.h ../src/Rocket.h ../src/Unit.h ../src/example.h ../src/res.h )
 
 target_link_libraries(GamePart2 ${OXYGINE_CORE_LIBS})

+ 19 - 0
examples/Game/part2/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (GamePart2)
+
+add_subdirectory(../../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+add_executable(GamePart2 ../src/Enemy.cpp ../src/Game.cpp ../src/Joystick.cpp ../src/Player.cpp ../src/Rocket.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Enemy.h ../src/Game.h ../src/Joystick.h ../src/Player.h ../src/Rocket.h ../src/Unit.h ../src/example.h ../src/res.h )
+
+set_target_properties(GamePart2
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(GamePart2 ${OXYGINE_CORE_LIBS})
+em_link_pre_js(GamePart2 ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/Game/part2/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/Game/part2/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 51 - 46
examples/Game/part2/proj.ios/GamePart2_ios.xcodeproj/project.pbxproj

@@ -7,11 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048AD0AD197D24AB001963EF /* CoreMotion.framework */; };
 		04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998D3517F8A96E003441C3 /* libSDL2.a */; };
 		04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE117F8ADB4003441C3 /* libz.dylib */; };
 		04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE217F8ADB4003441C3 /* QuartzCore.framework */; };
 		04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE317F8ADB4003441C3 /* AudioToolbox.framework */; };
 		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
+		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
 		04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE517F8ADB4003441C3 /* OpenGLES.framework */; };
 		04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEB17F8ADD4003441C3 /* UIKit.framework */; };
 		04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEC17F8ADD4003441C3 /* Foundation.framework */; };
@@ -21,14 +23,14 @@
 		049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B52AD1871EBBA00EF3C66 /* liboxygine_ios.a */; };
 		04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04E9AD3E1876FE84006A7317 /* Images.xcassets */; };
 		2DC477AC10D6C07B3FE008F6 /* ../src/Enemy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */; };
-		C8860D93875589970329DCCD /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/example.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/Player.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/res.cpp */; };
-		F2CFD518E4E2E05ECEDBB262 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */; };
-		693088A7AB377368EE4A018E /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Unit.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */; };
+		C8860D93875589970329DCCD /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/Joystick.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Player.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Rocket.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/Unit.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/entry_point.cpp */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/example.cpp */; };
+		693088A7AB377368EE4A018E /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/res.cpp */; };
 		2B0FCA4EF2CDAB7EF6C6252E /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../data/images */; };
 		F87DC9641C1B8FCF28948580 /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../data/xmls */; };
 
@@ -73,6 +75,7 @@
 		04998EE217F8ADB4003441C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		04998EE317F8ADB4003441C3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		04998EE417F8ADB4003441C3 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		04998EE517F8ADB4003441C3 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		04998EEB17F8ADD4003441C3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		04998EEC17F8ADD4003441C3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -81,22 +84,22 @@
 		04998EF617F8B6F3003441C3 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../..//oxygine/third_party/ios/libraries/libjpeg.a"; sourceTree = "<group>"; };
 		04E9AD3E1876FE84006A7317 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name =Images.xcassets; path = GamePart2/Images.xcassets; sourceTree = "<group>"; };
 		360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemy.cpp; path = ../src/Enemy.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		F196143B0370A9D348494ACC /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		7746CA7A63049ED8F7D6BF42 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
@@ -110,6 +113,7 @@
 				049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */,
 				04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */,
 				04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */,
+				048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */,
 				04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */,
 				04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */,
 				04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */,
@@ -161,6 +165,7 @@
 			isa = PBXGroup;
 			children = (
 				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
 				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
 				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
 				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
@@ -194,22 +199,22 @@
 			isa = PBXGroup;
 			children = (
 				360377333740D8A2FD15BBE6 /* Enemy.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* entry_point.cpp */, 
-				4DA100C319512824B7570663 /* example.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Game.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* Joystick.cpp */, 
-				F6123B1E6FE4471A00F49751 /* Player.cpp */, 
-				5DE458993031811A4C7D28C1 /* res.cpp */, 
-				BA41FC88D76540A6905224D6 /* Rocket.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* Unit.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Game.cpp */, 
+				4DA100C319512824B7570663 /* Joystick.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* Player.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* Rocket.cpp */, 
+				F6123B1E6FE4471A00F49751 /* Unit.cpp */, 
+				5DE458993031811A4C7D28C1 /* entry_point.cpp */, 
+				BA41FC88D76540A6905224D6 /* example.cpp */, 
+				2CE4BD5BB9DEF92439C0AB58 /* res.cpp */, 
 				D954BD82D7708B65A08FB6B9 /* Enemy.h */, 
-				BD0E956CC3A2F7EB94822B5C /* example.h */, 
-				7623D793B59EF0CD569E6EC2 /* Game.h */, 
-				AFA30E959880563E6ABBBC4F /* Joystick.h */, 
-				B52CCD463855CF91A7FBDB8E /* Player.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* res.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* Rocket.h */, 
-				8F2AFB956EEAEED67C5B7571 /* Unit.h */, 
+				BD0E956CC3A2F7EB94822B5C /* Game.h */, 
+				7623D793B59EF0CD569E6EC2 /* Joystick.h */, 
+				AFA30E959880563E6ABBBC4F /* Player.h */, 
+				B52CCD463855CF91A7FBDB8E /* Rocket.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* Unit.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* example.h */, 
+				8F2AFB956EEAEED67C5B7571 /* res.h */, 
 
 			);
 			name = src;
@@ -319,14 +324,14 @@
 			buildActionMask = 2147483647;
 			files = (
 				2DC477AC10D6C07B3FE008F6 /* Enemy.cpp */, 
-				DA49ED8903C628BA578C8670 /* entry_point.cpp */, 
-				C8860D93875589970329DCCD /* example.cpp */, 
-				1E839D002B2BA83FC83A695A /* Game.cpp */, 
-				3A631A475DE035FC53ADE5EA /* Joystick.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* Player.cpp */, 
-				EFF139F8BA484314F7AAF645 /* res.cpp */, 
-				F2CFD518E4E2E05ECEDBB262 /* Rocket.cpp */, 
-				693088A7AB377368EE4A018E /* Unit.cpp */, 
+				DA49ED8903C628BA578C8670 /* Game.cpp */, 
+				C8860D93875589970329DCCD /* Joystick.cpp */, 
+				1E839D002B2BA83FC83A695A /* Player.cpp */, 
+				3A631A475DE035FC53ADE5EA /* Rocket.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* Unit.cpp */, 
+				EFF139F8BA484314F7AAF645 /* entry_point.cpp */, 
+				F2CFD518E4E2E05ECEDBB262 /* example.cpp */, 
+				693088A7AB377368EE4A018E /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
examples/Game/part2/proj.macosx/GamePart2_macosx-Info.plist

@@ -25,7 +25,7 @@
 	<key>LSMinimumSystemVersion</key>
 	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>

+ 46 - 46
examples/Game/part2/proj.macosx/GamePart2_macosx.xcodeproj/project.pbxproj

@@ -16,14 +16,14 @@
 		049B57321871FBE900EF3C66 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B57311871FBE900EF3C66 /* Cocoa.framework */; };
 		049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 049B57491871FBE900EF3C66 /* Images.xcassets */; };
 		2DC477AC10D6C07B3FE008F6 /* ../src/Enemy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */; };
-		C8860D93875589970329DCCD /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/example.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/Player.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/res.cpp */; };
-		F2CFD518E4E2E05ECEDBB262 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */; };
-		693088A7AB377368EE4A018E /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Unit.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */; };
+		C8860D93875589970329DCCD /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/Joystick.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Player.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Rocket.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/Unit.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/entry_point.cpp */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/example.cpp */; };
+		693088A7AB377368EE4A018E /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/res.cpp */; };
 		2B0FCA4EF2CDAB7EF6C6252E /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../data/images */; };
 		F87DC9641C1B8FCF28948580 /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../data/xmls */; };
 
@@ -98,22 +98,22 @@
 		049B57491871FBE900EF3C66 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GamePart2/Images.xcassets; sourceTree = "<group>"; };
 		049B57501871FBE900EF3C66 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
 		360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemy.cpp; path = ../src/Enemy.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
 		D954BD82D7708B65A08FB6B9 /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		AFA30E959880563E6ABBBC4F /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		B52CCD463855CF91A7FBDB8E /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		AFA30E959880563E6ABBBC4F /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		B52CCD463855CF91A7FBDB8E /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		F196143B0370A9D348494ACC /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		7746CA7A63049ED8F7D6BF42 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
@@ -216,22 +216,22 @@
 			isa = PBXGroup;
 			children = (
 				360377333740D8A2FD15BBE6 /* Enemy.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* entry_point.cpp */, 
-				4DA100C319512824B7570663 /* example.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Game.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* Joystick.cpp */, 
-				F6123B1E6FE4471A00F49751 /* Player.cpp */, 
-				5DE458993031811A4C7D28C1 /* res.cpp */, 
-				BA41FC88D76540A6905224D6 /* Rocket.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* Unit.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Game.cpp */, 
+				4DA100C319512824B7570663 /* Joystick.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* Player.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* Rocket.cpp */, 
+				F6123B1E6FE4471A00F49751 /* Unit.cpp */, 
+				5DE458993031811A4C7D28C1 /* entry_point.cpp */, 
+				BA41FC88D76540A6905224D6 /* example.cpp */, 
+				2CE4BD5BB9DEF92439C0AB58 /* res.cpp */, 
 				D954BD82D7708B65A08FB6B9 /* Enemy.h */, 
-				BD0E956CC3A2F7EB94822B5C /* example.h */, 
-				7623D793B59EF0CD569E6EC2 /* Game.h */, 
-				AFA30E959880563E6ABBBC4F /* Joystick.h */, 
-				B52CCD463855CF91A7FBDB8E /* Player.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* res.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* Rocket.h */, 
-				8F2AFB956EEAEED67C5B7571 /* Unit.h */, 
+				BD0E956CC3A2F7EB94822B5C /* Game.h */, 
+				7623D793B59EF0CD569E6EC2 /* Joystick.h */, 
+				AFA30E959880563E6ABBBC4F /* Player.h */, 
+				B52CCD463855CF91A7FBDB8E /* Rocket.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* Unit.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* example.h */, 
+				8F2AFB956EEAEED67C5B7571 /* res.h */, 
 
 			);
 			name = src;
@@ -365,14 +365,14 @@
 			buildActionMask = 2147483647;
 			files = (
 				2DC477AC10D6C07B3FE008F6 /* Enemy.cpp */, 
-				DA49ED8903C628BA578C8670 /* entry_point.cpp */, 
-				C8860D93875589970329DCCD /* example.cpp */, 
-				1E839D002B2BA83FC83A695A /* Game.cpp */, 
-				3A631A475DE035FC53ADE5EA /* Joystick.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* Player.cpp */, 
-				EFF139F8BA484314F7AAF645 /* res.cpp */, 
-				F2CFD518E4E2E05ECEDBB262 /* Rocket.cpp */, 
-				693088A7AB377368EE4A018E /* Unit.cpp */, 
+				DA49ED8903C628BA578C8670 /* Game.cpp */, 
+				C8860D93875589970329DCCD /* Joystick.cpp */, 
+				1E839D002B2BA83FC83A695A /* Player.cpp */, 
+				3A631A475DE035FC53ADE5EA /* Rocket.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* Unit.cpp */, 
+				EFF139F8BA484314F7AAF645 /* entry_point.cpp */, 
+				F2CFD518E4E2E05ECEDBB262 /* example.cpp */, 
+				693088A7AB377368EE4A018E /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 2 - 2
examples/Game/part2/proj.win32/GamePart2_vs2010.vcxproj

@@ -92,10 +92,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 2 - 2
examples/Game/part2/proj.win32/GamePart2_vs2013.vcxproj

@@ -94,10 +94,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 34 - 16
examples/Game/part2/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -72,19 +73,22 @@ int mainloop()
 //it is application entry point
 void run()
 {
+	ObjectBase::__startTracingLeaks();
+
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -118,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -150,14 +162,16 @@ void run()
 	//dump list should be empty now
 	//we deleted everything and could be sure that there aren't any memory leaks
 	ObjectBase::dumpCreatedObjects();
+
+	ObjectBase::__stopTracingLeaks();
 	//end
 }
 
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -165,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -184,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

+ 1 - 1
examples/Game/part3/proj.android/jni/src/Android.mk

@@ -6,7 +6,7 @@ LOCAL_MODULE := main
 #SDK_ROOT points to folder with SDL and oxygine-framework
 LOCAL_SRC_FILES := ../../../../../../..//SDL/src/main/android/SDL_android_main.c
 
-LOCAL_SRC_FILES += ../../../src/Enemy.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/Game.cpp ../../../src/GameScene.cpp ../../../src/Joystick.cpp ../../../src/MainMenuScene.cpp ../../../src/MyButton.cpp ../../../src/Player.cpp ../../../src/res.cpp ../../../src/Rocket.cpp ../../../src/Scene.cpp ../../../src/Unit.cpp 
+LOCAL_SRC_FILES += ../../../src/Enemy.cpp ../../../src/Game.cpp ../../../src/GameScene.cpp ../../../src/Joystick.cpp ../../../src/MainMenuScene.cpp ../../../src/MyButton.cpp ../../../src/Player.cpp ../../../src/Rocket.cpp ../../../src/Scene.cpp ../../../src/Unit.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/res.cpp 
 
 
 LOCAL_STATIC_LIBRARIES := oxygine-framework_static

+ 1 - 1
examples/Game/part3/proj.cmake/CMakeLists.txt

@@ -6,6 +6,6 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
-add_executable(GamePart3 ../src/Enemy.cpp ../src/entry_point.cpp ../src/example.cpp ../src/Game.cpp ../src/GameScene.cpp ../src/Joystick.cpp ../src/MainMenuScene.cpp ../src/MyButton.cpp ../src/Player.cpp ../src/res.cpp ../src/Rocket.cpp ../src/Scene.cpp ../src/Unit.cpp  ../src/Enemy.h ../src/example.h ../src/Game.h ../src/GameScene.h ../src/Joystick.h ../src/MainMenuScene.h ../src/MyButton.h ../src/Player.h ../src/res.h ../src/Rocket.h ../src/Scene.h ../src/Unit.h )
+add_executable(GamePart3 ../src/Enemy.cpp ../src/Game.cpp ../src/GameScene.cpp ../src/Joystick.cpp ../src/MainMenuScene.cpp ../src/MyButton.cpp ../src/Player.cpp ../src/Rocket.cpp ../src/Scene.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Enemy.h ../src/Game.h ../src/GameScene.h ../src/Joystick.h ../src/MainMenuScene.h ../src/MyButton.h ../src/Player.h ../src/Rocket.h ../src/Scene.h ../src/Unit.h ../src/example.h ../src/res.h )
 
 target_link_libraries(GamePart3 ${OXYGINE_CORE_LIBS})

+ 19 - 0
examples/Game/part3/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (GamePart3)
+
+add_subdirectory(../../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+add_executable(GamePart3 ../src/Enemy.cpp ../src/Game.cpp ../src/GameScene.cpp ../src/Joystick.cpp ../src/MainMenuScene.cpp ../src/MyButton.cpp ../src/Player.cpp ../src/Rocket.cpp ../src/Scene.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Enemy.h ../src/Game.h ../src/GameScene.h ../src/Joystick.h ../src/MainMenuScene.h ../src/MyButton.h ../src/Player.h ../src/Rocket.h ../src/Scene.h ../src/Unit.h ../src/example.h ../src/res.h )
+
+set_target_properties(GamePart3
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(GamePart3 ${OXYGINE_CORE_LIBS})
+em_link_pre_js(GamePart3 ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/Game/part3/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/Game/part3/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 75 - 70
examples/Game/part3/proj.ios/GamePart3_ios.xcodeproj/project.pbxproj

@@ -7,11 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048AD0AD197D24AB001963EF /* CoreMotion.framework */; };
 		04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998D3517F8A96E003441C3 /* libSDL2.a */; };
 		04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE117F8ADB4003441C3 /* libz.dylib */; };
 		04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE217F8ADB4003441C3 /* QuartzCore.framework */; };
 		04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE317F8ADB4003441C3 /* AudioToolbox.framework */; };
 		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
+		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
 		04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE517F8ADB4003441C3 /* OpenGLES.framework */; };
 		04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEB17F8ADD4003441C3 /* UIKit.framework */; };
 		04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEC17F8ADD4003441C3 /* Foundation.framework */; };
@@ -21,18 +23,18 @@
 		049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B52AD1871EBBA00EF3C66 /* liboxygine_ios.a */; };
 		04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04E9AD3E1876FE84006A7317 /* Images.xcassets */; };
 		2DC477AC10D6C07B3FE008F6 /* ../src/Enemy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */; };
-		C8860D93875589970329DCCD /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/example.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/GameScene.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/Joystick.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/MainMenuScene.cpp */; };
-		F2CFD518E4E2E05ECEDBB262 /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/MyButton.cpp */; };
-		693088A7AB377368EE4A018E /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Player.cpp */; };
-		2B0FCA4EF2CDAB7EF6C6252E /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/res.cpp */; };
-		F87DC9641C1B8FCF28948580 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */; };
-		9850666D9BEB7BAAA6AAECDC /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */; };
-		33E41D858B2ABD49382CD53F /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */; };
+		C8860D93875589970329DCCD /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/GameScene.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/MainMenuScene.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/MyButton.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/Player.cpp */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */; };
+		693088A7AB377368EE4A018E /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Scene.cpp */; };
+		2B0FCA4EF2CDAB7EF6C6252E /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/Unit.cpp */; };
+		F87DC9641C1B8FCF28948580 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/entry_point.cpp */; };
+		9850666D9BEB7BAAA6AAECDC /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/example.cpp */; };
+		33E41D858B2ABD49382CD53F /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/res.cpp */; };
 		3BB41671209E30BDF95D1B16 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../data/images */; };
 		E02A0627DE00D04110ABADA6 /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/xmls */; };
 
@@ -77,6 +79,7 @@
 		04998EE217F8ADB4003441C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		04998EE317F8ADB4003441C3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		04998EE417F8ADB4003441C3 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		04998EE517F8ADB4003441C3 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		04998EEB17F8ADD4003441C3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		04998EEC17F8ADD4003441C3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -85,30 +88,30 @@
 		04998EF617F8B6F3003441C3 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../..//oxygine/third_party/ios/libraries/libjpeg.a"; sourceTree = "<group>"; };
 		04E9AD3E1876FE84006A7317 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name =Images.xcassets; path = GamePart3/Images.xcassets; sourceTree = "<group>"; };
 		360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemy.cpp; path = ../src/Enemy.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
 		B52CCD463855CF91A7FBDB8E /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		12CAC42FDF06ABE860CFEA53 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
-		0F4469FB587862663D529DC9 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		12CAC42FDF06ABE860CFEA53 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		0F4469FB587862663D529DC9 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		7623D793B59EF0CD569E6EC2 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		AFA30E959880563E6ABBBC4F /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
@@ -122,6 +125,7 @@
 				049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */,
 				04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */,
 				04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */,
+				048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */,
 				04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */,
 				04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */,
 				04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */,
@@ -173,6 +177,7 @@
 			isa = PBXGroup;
 			children = (
 				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
 				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
 				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
 				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
@@ -206,30 +211,30 @@
 			isa = PBXGroup;
 			children = (
 				360377333740D8A2FD15BBE6 /* Enemy.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* entry_point.cpp */, 
-				4DA100C319512824B7570663 /* example.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Game.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* GameScene.cpp */, 
-				F6123B1E6FE4471A00F49751 /* Joystick.cpp */, 
-				5DE458993031811A4C7D28C1 /* MainMenuScene.cpp */, 
-				BA41FC88D76540A6905224D6 /* MyButton.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* Player.cpp */, 
-				F196143B0370A9D348494ACC /* res.cpp */, 
-				7746CA7A63049ED8F7D6BF42 /* Rocket.cpp */, 
-				D954BD82D7708B65A08FB6B9 /* Scene.cpp */, 
-				BD0E956CC3A2F7EB94822B5C /* Unit.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Game.cpp */, 
+				4DA100C319512824B7570663 /* GameScene.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* Joystick.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* MainMenuScene.cpp */, 
+				F6123B1E6FE4471A00F49751 /* MyButton.cpp */, 
+				5DE458993031811A4C7D28C1 /* Player.cpp */, 
+				BA41FC88D76540A6905224D6 /* Rocket.cpp */, 
+				2CE4BD5BB9DEF92439C0AB58 /* Scene.cpp */, 
+				F196143B0370A9D348494ACC /* Unit.cpp */, 
+				7746CA7A63049ED8F7D6BF42 /* entry_point.cpp */, 
+				D954BD82D7708B65A08FB6B9 /* example.cpp */, 
+				BD0E956CC3A2F7EB94822B5C /* res.cpp */, 
 				B52CCD463855CF91A7FBDB8E /* Enemy.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* example.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* Game.h */, 
-				8F2AFB956EEAEED67C5B7571 /* GameScene.h */, 
-				047F6BD19F885FF186A1447C /* Joystick.h */, 
-				C570FAEF487CD34B62389F89 /* MainMenuScene.h */, 
-				2418B9A339E6004913AF5980 /* MyButton.h */, 
-				CAD9D6A98986EA8082368448 /* Player.h */, 
-				67194AC90FEA68E7C96E6907 /* res.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* Rocket.h */, 
-				12CAC42FDF06ABE860CFEA53 /* Scene.h */, 
-				0F4469FB587862663D529DC9 /* Unit.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* Game.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* GameScene.h */, 
+				8F2AFB956EEAEED67C5B7571 /* Joystick.h */, 
+				047F6BD19F885FF186A1447C /* MainMenuScene.h */, 
+				C570FAEF487CD34B62389F89 /* MyButton.h */, 
+				2418B9A339E6004913AF5980 /* Player.h */, 
+				CAD9D6A98986EA8082368448 /* Rocket.h */, 
+				67194AC90FEA68E7C96E6907 /* Scene.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* Unit.h */, 
+				12CAC42FDF06ABE860CFEA53 /* example.h */, 
+				0F4469FB587862663D529DC9 /* res.h */, 
 
 			);
 			name = src;
@@ -339,18 +344,18 @@
 			buildActionMask = 2147483647;
 			files = (
 				2DC477AC10D6C07B3FE008F6 /* Enemy.cpp */, 
-				DA49ED8903C628BA578C8670 /* entry_point.cpp */, 
-				C8860D93875589970329DCCD /* example.cpp */, 
-				1E839D002B2BA83FC83A695A /* Game.cpp */, 
-				3A631A475DE035FC53ADE5EA /* GameScene.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* Joystick.cpp */, 
-				EFF139F8BA484314F7AAF645 /* MainMenuScene.cpp */, 
-				F2CFD518E4E2E05ECEDBB262 /* MyButton.cpp */, 
-				693088A7AB377368EE4A018E /* Player.cpp */, 
-				2B0FCA4EF2CDAB7EF6C6252E /* res.cpp */, 
-				F87DC9641C1B8FCF28948580 /* Rocket.cpp */, 
-				9850666D9BEB7BAAA6AAECDC /* Scene.cpp */, 
-				33E41D858B2ABD49382CD53F /* Unit.cpp */, 
+				DA49ED8903C628BA578C8670 /* Game.cpp */, 
+				C8860D93875589970329DCCD /* GameScene.cpp */, 
+				1E839D002B2BA83FC83A695A /* Joystick.cpp */, 
+				3A631A475DE035FC53ADE5EA /* MainMenuScene.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* MyButton.cpp */, 
+				EFF139F8BA484314F7AAF645 /* Player.cpp */, 
+				F2CFD518E4E2E05ECEDBB262 /* Rocket.cpp */, 
+				693088A7AB377368EE4A018E /* Scene.cpp */, 
+				2B0FCA4EF2CDAB7EF6C6252E /* Unit.cpp */, 
+				F87DC9641C1B8FCF28948580 /* entry_point.cpp */, 
+				9850666D9BEB7BAAA6AAECDC /* example.cpp */, 
+				33E41D858B2ABD49382CD53F /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
examples/Game/part3/proj.macosx/GamePart3_macosx-Info.plist

@@ -25,7 +25,7 @@
 	<key>LSMinimumSystemVersion</key>
 	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>

+ 70 - 70
examples/Game/part3/proj.macosx/GamePart3_macosx.xcodeproj/project.pbxproj

@@ -16,18 +16,18 @@
 		049B57321871FBE900EF3C66 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B57311871FBE900EF3C66 /* Cocoa.framework */; };
 		049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 049B57491871FBE900EF3C66 /* Images.xcassets */; };
 		2DC477AC10D6C07B3FE008F6 /* ../src/Enemy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */; };
-		C8860D93875589970329DCCD /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/example.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/GameScene.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/Joystick.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/MainMenuScene.cpp */; };
-		F2CFD518E4E2E05ECEDBB262 /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/MyButton.cpp */; };
-		693088A7AB377368EE4A018E /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Player.cpp */; };
-		2B0FCA4EF2CDAB7EF6C6252E /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/res.cpp */; };
-		F87DC9641C1B8FCF28948580 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */; };
-		9850666D9BEB7BAAA6AAECDC /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */; };
-		33E41D858B2ABD49382CD53F /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */; };
+		C8860D93875589970329DCCD /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/GameScene.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/MainMenuScene.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/MyButton.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/Player.cpp */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */; };
+		693088A7AB377368EE4A018E /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Scene.cpp */; };
+		2B0FCA4EF2CDAB7EF6C6252E /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/Unit.cpp */; };
+		F87DC9641C1B8FCF28948580 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/entry_point.cpp */; };
+		9850666D9BEB7BAAA6AAECDC /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/example.cpp */; };
+		33E41D858B2ABD49382CD53F /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/res.cpp */; };
 		3BB41671209E30BDF95D1B16 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../data/images */; };
 		E02A0627DE00D04110ABADA6 /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/xmls */; };
 
@@ -102,30 +102,30 @@
 		049B57491871FBE900EF3C66 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GamePart3/Images.xcassets; sourceTree = "<group>"; };
 		049B57501871FBE900EF3C66 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
 		360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemy.cpp; path = ../src/Enemy.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
 		B52CCD463855CF91A7FBDB8E /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		7EEFDEEC289FCBB5FA67F822 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		4E9DE6A8FCBDF43BC876EC90 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		12CAC42FDF06ABE860CFEA53 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
-		0F4469FB587862663D529DC9 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		7EEFDEEC289FCBB5FA67F822 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		4E9DE6A8FCBDF43BC876EC90 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		12CAC42FDF06ABE860CFEA53 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		0F4469FB587862663D529DC9 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		7623D793B59EF0CD569E6EC2 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		AFA30E959880563E6ABBBC4F /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
 
@@ -228,30 +228,30 @@
 			isa = PBXGroup;
 			children = (
 				360377333740D8A2FD15BBE6 /* Enemy.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* entry_point.cpp */, 
-				4DA100C319512824B7570663 /* example.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Game.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* GameScene.cpp */, 
-				F6123B1E6FE4471A00F49751 /* Joystick.cpp */, 
-				5DE458993031811A4C7D28C1 /* MainMenuScene.cpp */, 
-				BA41FC88D76540A6905224D6 /* MyButton.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* Player.cpp */, 
-				F196143B0370A9D348494ACC /* res.cpp */, 
-				7746CA7A63049ED8F7D6BF42 /* Rocket.cpp */, 
-				D954BD82D7708B65A08FB6B9 /* Scene.cpp */, 
-				BD0E956CC3A2F7EB94822B5C /* Unit.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Game.cpp */, 
+				4DA100C319512824B7570663 /* GameScene.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* Joystick.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* MainMenuScene.cpp */, 
+				F6123B1E6FE4471A00F49751 /* MyButton.cpp */, 
+				5DE458993031811A4C7D28C1 /* Player.cpp */, 
+				BA41FC88D76540A6905224D6 /* Rocket.cpp */, 
+				2CE4BD5BB9DEF92439C0AB58 /* Scene.cpp */, 
+				F196143B0370A9D348494ACC /* Unit.cpp */, 
+				7746CA7A63049ED8F7D6BF42 /* entry_point.cpp */, 
+				D954BD82D7708B65A08FB6B9 /* example.cpp */, 
+				BD0E956CC3A2F7EB94822B5C /* res.cpp */, 
 				B52CCD463855CF91A7FBDB8E /* Enemy.h */, 
-				7EEFDEEC289FCBB5FA67F822 /* example.h */, 
-				4E9DE6A8FCBDF43BC876EC90 /* Game.h */, 
-				8F2AFB956EEAEED67C5B7571 /* GameScene.h */, 
-				047F6BD19F885FF186A1447C /* Joystick.h */, 
-				C570FAEF487CD34B62389F89 /* MainMenuScene.h */, 
-				2418B9A339E6004913AF5980 /* MyButton.h */, 
-				CAD9D6A98986EA8082368448 /* Player.h */, 
-				67194AC90FEA68E7C96E6907 /* res.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* Rocket.h */, 
-				12CAC42FDF06ABE860CFEA53 /* Scene.h */, 
-				0F4469FB587862663D529DC9 /* Unit.h */, 
+				7EEFDEEC289FCBB5FA67F822 /* Game.h */, 
+				4E9DE6A8FCBDF43BC876EC90 /* GameScene.h */, 
+				8F2AFB956EEAEED67C5B7571 /* Joystick.h */, 
+				047F6BD19F885FF186A1447C /* MainMenuScene.h */, 
+				C570FAEF487CD34B62389F89 /* MyButton.h */, 
+				2418B9A339E6004913AF5980 /* Player.h */, 
+				CAD9D6A98986EA8082368448 /* Rocket.h */, 
+				67194AC90FEA68E7C96E6907 /* Scene.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* Unit.h */, 
+				12CAC42FDF06ABE860CFEA53 /* example.h */, 
+				0F4469FB587862663D529DC9 /* res.h */, 
 
 			);
 			name = src;
@@ -385,18 +385,18 @@
 			buildActionMask = 2147483647;
 			files = (
 				2DC477AC10D6C07B3FE008F6 /* Enemy.cpp */, 
-				DA49ED8903C628BA578C8670 /* entry_point.cpp */, 
-				C8860D93875589970329DCCD /* example.cpp */, 
-				1E839D002B2BA83FC83A695A /* Game.cpp */, 
-				3A631A475DE035FC53ADE5EA /* GameScene.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* Joystick.cpp */, 
-				EFF139F8BA484314F7AAF645 /* MainMenuScene.cpp */, 
-				F2CFD518E4E2E05ECEDBB262 /* MyButton.cpp */, 
-				693088A7AB377368EE4A018E /* Player.cpp */, 
-				2B0FCA4EF2CDAB7EF6C6252E /* res.cpp */, 
-				F87DC9641C1B8FCF28948580 /* Rocket.cpp */, 
-				9850666D9BEB7BAAA6AAECDC /* Scene.cpp */, 
-				33E41D858B2ABD49382CD53F /* Unit.cpp */, 
+				DA49ED8903C628BA578C8670 /* Game.cpp */, 
+				C8860D93875589970329DCCD /* GameScene.cpp */, 
+				1E839D002B2BA83FC83A695A /* Joystick.cpp */, 
+				3A631A475DE035FC53ADE5EA /* MainMenuScene.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* MyButton.cpp */, 
+				EFF139F8BA484314F7AAF645 /* Player.cpp */, 
+				F2CFD518E4E2E05ECEDBB262 /* Rocket.cpp */, 
+				693088A7AB377368EE4A018E /* Scene.cpp */, 
+				2B0FCA4EF2CDAB7EF6C6252E /* Unit.cpp */, 
+				F87DC9641C1B8FCF28948580 /* entry_point.cpp */, 
+				9850666D9BEB7BAAA6AAECDC /* example.cpp */, 
+				33E41D858B2ABD49382CD53F /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 2 - 2
examples/Game/part3/proj.win32/GamePart3_vs2010.vcxproj

@@ -92,10 +92,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 2 - 2
examples/Game/part3/proj.win32/GamePart3_vs2013.vcxproj

@@ -94,10 +94,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 34 - 16
examples/Game/part3/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -72,19 +73,22 @@ int mainloop()
 //it is application entry point
 void run()
 {
+	ObjectBase::__startTracingLeaks();
+
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -118,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -150,14 +162,16 @@ void run()
 	//dump list should be empty now
 	//we deleted everything and could be sure that there aren't any memory leaks
 	ObjectBase::dumpCreatedObjects();
+
+	ObjectBase::__stopTracingLeaks();
 	//end
 }
 
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -165,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -184,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

+ 1 - 1
examples/Game/part4/proj.android/jni/src/Android.mk

@@ -6,7 +6,7 @@ LOCAL_MODULE := main
 #SDK_ROOT points to folder with SDL and oxygine-framework
 LOCAL_SRC_FILES := ../../../../../../..//SDL/src/main/android/SDL_android_main.c
 
-LOCAL_SRC_FILES += ../../../src/Enemy.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/Game.cpp ../../../src/GameMenu.cpp ../../../src/GameScene.cpp ../../../src/Joystick.cpp ../../../src/MainMenuScene.cpp ../../../src/MyButton.cpp ../../../src/Player.cpp ../../../src/res.cpp ../../../src/Rocket.cpp ../../../src/Scene.cpp ../../../src/Unit.cpp 
+LOCAL_SRC_FILES += ../../../src/Enemy.cpp ../../../src/Game.cpp ../../../src/GameMenu.cpp ../../../src/GameScene.cpp ../../../src/Joystick.cpp ../../../src/MainMenuScene.cpp ../../../src/MyButton.cpp ../../../src/Player.cpp ../../../src/Rocket.cpp ../../../src/Scene.cpp ../../../src/Unit.cpp ../../../src/entry_point.cpp ../../../src/example.cpp ../../../src/res.cpp 
 
 
 LOCAL_STATIC_LIBRARIES := oxygine-framework_static

+ 1 - 1
examples/Game/part4/proj.cmake/CMakeLists.txt

@@ -6,6 +6,6 @@ add_definitions(${OXYGINE_DEFINITIONS})
 include_directories(${OXYGINE_INCLUDE_DIRS})
 link_directories(${OXYGINE_LIBRARY_DIRS})
 
-add_executable(GamePart4 ../src/Enemy.cpp ../src/entry_point.cpp ../src/example.cpp ../src/Game.cpp ../src/GameMenu.cpp ../src/GameScene.cpp ../src/Joystick.cpp ../src/MainMenuScene.cpp ../src/MyButton.cpp ../src/Player.cpp ../src/res.cpp ../src/Rocket.cpp ../src/Scene.cpp ../src/Unit.cpp  ../src/Enemy.h ../src/example.h ../src/Game.h ../src/GameMenu.h ../src/GameScene.h ../src/Joystick.h ../src/MainMenuScene.h ../src/MyButton.h ../src/Player.h ../src/res.h ../src/Rocket.h ../src/Scene.h ../src/Unit.h )
+add_executable(GamePart4 ../src/Enemy.cpp ../src/Game.cpp ../src/GameMenu.cpp ../src/GameScene.cpp ../src/Joystick.cpp ../src/MainMenuScene.cpp ../src/MyButton.cpp ../src/Player.cpp ../src/Rocket.cpp ../src/Scene.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Enemy.h ../src/Game.h ../src/GameMenu.h ../src/GameScene.h ../src/Joystick.h ../src/MainMenuScene.h ../src/MyButton.h ../src/Player.h ../src/Rocket.h ../src/Scene.h ../src/Unit.h ../src/example.h ../src/res.h )
 
 target_link_libraries(GamePart4 ${OXYGINE_CORE_LIBS})

+ 19 - 0
examples/Game/part4/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (GamePart4)
+
+add_subdirectory(../../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+add_executable(GamePart4 ../src/Enemy.cpp ../src/Game.cpp ../src/GameMenu.cpp ../src/GameScene.cpp ../src/Joystick.cpp ../src/MainMenuScene.cpp ../src/MyButton.cpp ../src/Player.cpp ../src/Rocket.cpp ../src/Scene.cpp ../src/Unit.cpp ../src/entry_point.cpp ../src/example.cpp ../src/res.cpp  ../src/Enemy.h ../src/Game.h ../src/GameMenu.h ../src/GameScene.h ../src/Joystick.h ../src/MainMenuScene.h ../src/MyButton.h ../src/Player.h ../src/Rocket.h ../src/Scene.h ../src/Unit.h ../src/example.h ../src/res.h )
+
+set_target_properties(GamePart4
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(GamePart4 ${OXYGINE_CORE_LIBS})
+em_link_pre_js(GamePart4 ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/Game/part4/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/Game/part4/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 81 - 76
examples/Game/part4/proj.ios/GamePart4_ios.xcodeproj/project.pbxproj

@@ -7,11 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048AD0AD197D24AB001963EF /* CoreMotion.framework */; };
 		04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998D3517F8A96E003441C3 /* libSDL2.a */; };
 		04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE117F8ADB4003441C3 /* libz.dylib */; };
 		04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE217F8ADB4003441C3 /* QuartzCore.framework */; };
 		04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE317F8ADB4003441C3 /* AudioToolbox.framework */; };
 		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
+		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
 		04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE517F8ADB4003441C3 /* OpenGLES.framework */; };
 		04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEB17F8ADD4003441C3 /* UIKit.framework */; };
 		04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEC17F8ADD4003441C3 /* Foundation.framework */; };
@@ -21,19 +23,19 @@
 		049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B52AD1871EBBA00EF3C66 /* liboxygine_ios.a */; };
 		04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 04E9AD3E1876FE84006A7317 /* Images.xcassets */; };
 		2DC477AC10D6C07B3FE008F6 /* ../src/Enemy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */; };
-		C8860D93875589970329DCCD /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/example.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/GameMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/GameMenu.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/GameScene.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/Joystick.cpp */; };
-		F2CFD518E4E2E05ECEDBB262 /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/MainMenuScene.cpp */; };
-		693088A7AB377368EE4A018E /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/MyButton.cpp */; };
-		2B0FCA4EF2CDAB7EF6C6252E /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/Player.cpp */; };
-		F87DC9641C1B8FCF28948580 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/res.cpp */; };
-		9850666D9BEB7BAAA6AAECDC /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Rocket.cpp */; };
-		33E41D858B2ABD49382CD53F /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Scene.cpp */; };
-		3BB41671209E30BDF95D1B16 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../src/Unit.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */; };
+		C8860D93875589970329DCCD /* ../src/GameMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/GameMenu.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/GameScene.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/MainMenuScene.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/MyButton.cpp */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/Player.cpp */; };
+		693088A7AB377368EE4A018E /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Rocket.cpp */; };
+		2B0FCA4EF2CDAB7EF6C6252E /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/Scene.cpp */; };
+		F87DC9641C1B8FCF28948580 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Unit.cpp */; };
+		9850666D9BEB7BAAA6AAECDC /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/entry_point.cpp */; };
+		33E41D858B2ABD49382CD53F /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/example.cpp */; };
+		3BB41671209E30BDF95D1B16 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../src/res.cpp */; };
 		E02A0627DE00D04110ABADA6 /* ../data/fonts in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/fonts */; };
 		2EDD01D75F08726BE081C106 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = B52CCD463855CF91A7FBDB8E /* ../data/images */; };
 		D42581590DA5455B882E551F /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 7EEFDEEC289FCBB5FA67F822 /* ../data/xmls */; };
@@ -79,6 +81,7 @@
 		04998EE217F8ADB4003441C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		04998EE317F8ADB4003441C3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		04998EE417F8ADB4003441C3 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		04998EE517F8ADB4003441C3 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		04998EEB17F8ADD4003441C3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		04998EEC17F8ADD4003441C3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -87,32 +90,32 @@
 		04998EF617F8B6F3003441C3 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../..//oxygine/third_party/ios/libraries/libjpeg.a"; sourceTree = "<group>"; };
 		04E9AD3E1876FE84006A7317 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name =Images.xcassets; path = GamePart4/Images.xcassets; sourceTree = "<group>"; };
 		360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemy.cpp; path = ../src/Enemy.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/GameMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameMenu.cpp; path = ../src/GameMenu.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/GameMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameMenu.cpp; path = ../src/GameMenu.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
 		4E9DE6A8FCBDF43BC876EC90 /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/GameMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameMenu.h; path = ../src/GameMenu.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
-		12CAC42FDF06ABE860CFEA53 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		0F4469FB587862663D529DC9 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		B6A9281364AF5D3B581D374C /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		4013C6794AAE8DFC641D2870 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
-		22E408FD6FCDA6E7E8E76952 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/GameMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameMenu.h; path = ../src/GameMenu.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		12CAC42FDF06ABE860CFEA53 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		0F4469FB587862663D529DC9 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
+		B6A9281364AF5D3B581D374C /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		4013C6794AAE8DFC641D2870 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		22E408FD6FCDA6E7E8E76952 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		AFA30E959880563E6ABBBC4F /* ../data/fonts */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = fonts; path = ../data/fonts; sourceTree = "<group>"; };
 		B52CCD463855CF91A7FBDB8E /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		7EEFDEEC289FCBB5FA67F822 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
@@ -127,6 +130,7 @@
 				049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */,
 				04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */,
 				04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */,
+				048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */,
 				04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */,
 				04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */,
 				04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */,
@@ -178,6 +182,7 @@
 			isa = PBXGroup;
 			children = (
 				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
 				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
 				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
 				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
@@ -212,32 +217,32 @@
 			isa = PBXGroup;
 			children = (
 				360377333740D8A2FD15BBE6 /* Enemy.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* entry_point.cpp */, 
-				4DA100C319512824B7570663 /* example.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Game.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* GameMenu.cpp */, 
-				F6123B1E6FE4471A00F49751 /* GameScene.cpp */, 
-				5DE458993031811A4C7D28C1 /* Joystick.cpp */, 
-				BA41FC88D76540A6905224D6 /* MainMenuScene.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* MyButton.cpp */, 
-				F196143B0370A9D348494ACC /* Player.cpp */, 
-				7746CA7A63049ED8F7D6BF42 /* res.cpp */, 
-				D954BD82D7708B65A08FB6B9 /* Rocket.cpp */, 
-				BD0E956CC3A2F7EB94822B5C /* Scene.cpp */, 
-				7623D793B59EF0CD569E6EC2 /* Unit.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Game.cpp */, 
+				4DA100C319512824B7570663 /* GameMenu.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* GameScene.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* Joystick.cpp */, 
+				F6123B1E6FE4471A00F49751 /* MainMenuScene.cpp */, 
+				5DE458993031811A4C7D28C1 /* MyButton.cpp */, 
+				BA41FC88D76540A6905224D6 /* Player.cpp */, 
+				2CE4BD5BB9DEF92439C0AB58 /* Rocket.cpp */, 
+				F196143B0370A9D348494ACC /* Scene.cpp */, 
+				7746CA7A63049ED8F7D6BF42 /* Unit.cpp */, 
+				D954BD82D7708B65A08FB6B9 /* entry_point.cpp */, 
+				BD0E956CC3A2F7EB94822B5C /* example.cpp */, 
+				7623D793B59EF0CD569E6EC2 /* res.cpp */, 
 				4E9DE6A8FCBDF43BC876EC90 /* Enemy.h */, 
-				8F2AFB956EEAEED67C5B7571 /* example.h */, 
-				047F6BD19F885FF186A1447C /* Game.h */, 
-				C570FAEF487CD34B62389F89 /* GameMenu.h */, 
-				2418B9A339E6004913AF5980 /* GameScene.h */, 
-				CAD9D6A98986EA8082368448 /* Joystick.h */, 
-				67194AC90FEA68E7C96E6907 /* MainMenuScene.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* MyButton.h */, 
-				12CAC42FDF06ABE860CFEA53 /* Player.h */, 
-				0F4469FB587862663D529DC9 /* res.h */, 
-				B6A9281364AF5D3B581D374C /* Rocket.h */, 
-				4013C6794AAE8DFC641D2870 /* Scene.h */, 
-				22E408FD6FCDA6E7E8E76952 /* Unit.h */, 
+				8F2AFB956EEAEED67C5B7571 /* Game.h */, 
+				047F6BD19F885FF186A1447C /* GameMenu.h */, 
+				C570FAEF487CD34B62389F89 /* GameScene.h */, 
+				2418B9A339E6004913AF5980 /* Joystick.h */, 
+				CAD9D6A98986EA8082368448 /* MainMenuScene.h */, 
+				67194AC90FEA68E7C96E6907 /* MyButton.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* Player.h */, 
+				12CAC42FDF06ABE860CFEA53 /* Rocket.h */, 
+				0F4469FB587862663D529DC9 /* Scene.h */, 
+				B6A9281364AF5D3B581D374C /* Unit.h */, 
+				4013C6794AAE8DFC641D2870 /* example.h */, 
+				22E408FD6FCDA6E7E8E76952 /* res.h */, 
 
 			);
 			name = src;
@@ -348,19 +353,19 @@
 			buildActionMask = 2147483647;
 			files = (
 				2DC477AC10D6C07B3FE008F6 /* Enemy.cpp */, 
-				DA49ED8903C628BA578C8670 /* entry_point.cpp */, 
-				C8860D93875589970329DCCD /* example.cpp */, 
-				1E839D002B2BA83FC83A695A /* Game.cpp */, 
-				3A631A475DE035FC53ADE5EA /* GameMenu.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* GameScene.cpp */, 
-				EFF139F8BA484314F7AAF645 /* Joystick.cpp */, 
-				F2CFD518E4E2E05ECEDBB262 /* MainMenuScene.cpp */, 
-				693088A7AB377368EE4A018E /* MyButton.cpp */, 
-				2B0FCA4EF2CDAB7EF6C6252E /* Player.cpp */, 
-				F87DC9641C1B8FCF28948580 /* res.cpp */, 
-				9850666D9BEB7BAAA6AAECDC /* Rocket.cpp */, 
-				33E41D858B2ABD49382CD53F /* Scene.cpp */, 
-				3BB41671209E30BDF95D1B16 /* Unit.cpp */, 
+				DA49ED8903C628BA578C8670 /* Game.cpp */, 
+				C8860D93875589970329DCCD /* GameMenu.cpp */, 
+				1E839D002B2BA83FC83A695A /* GameScene.cpp */, 
+				3A631A475DE035FC53ADE5EA /* Joystick.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* MainMenuScene.cpp */, 
+				EFF139F8BA484314F7AAF645 /* MyButton.cpp */, 
+				F2CFD518E4E2E05ECEDBB262 /* Player.cpp */, 
+				693088A7AB377368EE4A018E /* Rocket.cpp */, 
+				2B0FCA4EF2CDAB7EF6C6252E /* Scene.cpp */, 
+				F87DC9641C1B8FCF28948580 /* Unit.cpp */, 
+				9850666D9BEB7BAAA6AAECDC /* entry_point.cpp */, 
+				33E41D858B2ABD49382CD53F /* example.cpp */, 
+				3BB41671209E30BDF95D1B16 /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
examples/Game/part4/proj.macosx/GamePart4_macosx-Info.plist

@@ -25,7 +25,7 @@
 	<key>LSMinimumSystemVersion</key>
 	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>

+ 76 - 76
examples/Game/part4/proj.macosx/GamePart4_macosx.xcodeproj/project.pbxproj

@@ -16,19 +16,19 @@
 		049B57321871FBE900EF3C66 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 049B57311871FBE900EF3C66 /* Cocoa.framework */; };
 		049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 049B57491871FBE900EF3C66 /* Images.xcassets */; };
 		2DC477AC10D6C07B3FE008F6 /* ../src/Enemy.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */; };
-		DA49ED8903C628BA578C8670 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */; };
-		C8860D93875589970329DCCD /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/example.cpp */; };
-		1E839D002B2BA83FC83A695A /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */; };
-		3A631A475DE035FC53ADE5EA /* ../src/GameMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/GameMenu.cpp */; };
-		CD59C69314E9E74CD0A11E03 /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/GameScene.cpp */; };
-		EFF139F8BA484314F7AAF645 /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/Joystick.cpp */; };
-		F2CFD518E4E2E05ECEDBB262 /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/MainMenuScene.cpp */; };
-		693088A7AB377368EE4A018E /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/MyButton.cpp */; };
-		2B0FCA4EF2CDAB7EF6C6252E /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/Player.cpp */; };
-		F87DC9641C1B8FCF28948580 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/res.cpp */; };
-		9850666D9BEB7BAAA6AAECDC /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/Rocket.cpp */; };
-		33E41D858B2ABD49382CD53F /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/Scene.cpp */; };
-		3BB41671209E30BDF95D1B16 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../src/Unit.cpp */; };
+		DA49ED8903C628BA578C8670 /* ../src/Game.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */; };
+		C8860D93875589970329DCCD /* ../src/GameMenu.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../src/GameMenu.cpp */; };
+		1E839D002B2BA83FC83A695A /* ../src/GameScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../src/GameScene.cpp */; };
+		3A631A475DE035FC53ADE5EA /* ../src/Joystick.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */; };
+		CD59C69314E9E74CD0A11E03 /* ../src/MainMenuScene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../src/MainMenuScene.cpp */; };
+		EFF139F8BA484314F7AAF645 /* ../src/MyButton.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../src/MyButton.cpp */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../src/Player.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../src/Player.cpp */; };
+		693088A7AB377368EE4A018E /* ../src/Rocket.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 2CE4BD5BB9DEF92439C0AB58 /* ../src/Rocket.cpp */; };
+		2B0FCA4EF2CDAB7EF6C6252E /* ../src/Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F196143B0370A9D348494ACC /* ../src/Scene.cpp */; };
+		F87DC9641C1B8FCF28948580 /* ../src/Unit.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7746CA7A63049ED8F7D6BF42 /* ../src/Unit.cpp */; };
+		9850666D9BEB7BAAA6AAECDC /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D954BD82D7708B65A08FB6B9 /* ../src/entry_point.cpp */; };
+		33E41D858B2ABD49382CD53F /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = BD0E956CC3A2F7EB94822B5C /* ../src/example.cpp */; };
+		3BB41671209E30BDF95D1B16 /* ../src/res.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 7623D793B59EF0CD569E6EC2 /* ../src/res.cpp */; };
 		E02A0627DE00D04110ABADA6 /* ../data/fonts in Sources */ = {isa = PBXBuildFile; fileRef = AFA30E959880563E6ABBBC4F /* ../data/fonts */; };
 		2EDD01D75F08726BE081C106 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = B52CCD463855CF91A7FBDB8E /* ../data/images */; };
 		D42581590DA5455B882E551F /* ../data/xmls in Sources */ = {isa = PBXBuildFile; fileRef = 7EEFDEEC289FCBB5FA67F822 /* ../data/xmls */; };
@@ -104,32 +104,32 @@
 		049B57491871FBE900EF3C66 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = GamePart4/Images.xcassets; sourceTree = "<group>"; };
 		049B57501871FBE900EF3C66 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
 		360377333740D8A2FD15BBE6 /* ../src/Enemy.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Enemy.cpp; path = ../src/Enemy.cpp; sourceTree = "<group>"; };
-		0BF9628FC8D38F9748F0CDEB /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
-		4DA100C319512824B7570663 /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../src/GameMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameMenu.cpp; path = ../src/GameMenu.cpp; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
-		2CE4BD5BB9DEF92439C0AB58 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
-		F196143B0370A9D348494ACC /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
-		7746CA7A63049ED8F7D6BF42 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
-		D954BD82D7708B65A08FB6B9 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
-		BD0E956CC3A2F7EB94822B5C /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
-		7623D793B59EF0CD569E6EC2 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* ../src/Game.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Game.cpp; path = ../src/Game.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* ../src/GameMenu.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameMenu.cpp; path = ../src/GameMenu.cpp; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../src/GameScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = GameScene.cpp; path = ../src/GameScene.cpp; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../src/Joystick.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Joystick.cpp; path = ../src/Joystick.cpp; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../src/MainMenuScene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MainMenuScene.cpp; path = ../src/MainMenuScene.cpp; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../src/MyButton.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MyButton.cpp; path = ../src/MyButton.cpp; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../src/Player.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Player.cpp; path = ../src/Player.cpp; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/Rocket.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Rocket.cpp; path = ../src/Rocket.cpp; sourceTree = "<group>"; };
+		F196143B0370A9D348494ACC /* ../src/Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../src/Scene.cpp; sourceTree = "<group>"; };
+		7746CA7A63049ED8F7D6BF42 /* ../src/Unit.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Unit.cpp; path = ../src/Unit.cpp; sourceTree = "<group>"; };
+		D954BD82D7708B65A08FB6B9 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		BD0E956CC3A2F7EB94822B5C /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		7623D793B59EF0CD569E6EC2 /* ../src/res.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = res.cpp; path = ../src/res.cpp; sourceTree = "<group>"; };
 		4E9DE6A8FCBDF43BC876EC90 /* ../src/Enemy.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Enemy.h; path = ../src/Enemy.h; sourceTree = "<group>"; };
-		8F2AFB956EEAEED67C5B7571 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
-		047F6BD19F885FF186A1447C /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
-		C570FAEF487CD34B62389F89 /* ../src/GameMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameMenu.h; path = ../src/GameMenu.h; sourceTree = "<group>"; };
-		2418B9A339E6004913AF5980 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
-		CAD9D6A98986EA8082368448 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
-		67194AC90FEA68E7C96E6907 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
-		5AFC0664D7BA80AE2A75BF0E /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
-		12CAC42FDF06ABE860CFEA53 /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
-		0F4469FB587862663D529DC9 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
-		B6A9281364AF5D3B581D374C /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
-		4013C6794AAE8DFC641D2870 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
-		22E408FD6FCDA6E7E8E76952 /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		8F2AFB956EEAEED67C5B7571 /* ../src/Game.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Game.h; path = ../src/Game.h; sourceTree = "<group>"; };
+		047F6BD19F885FF186A1447C /* ../src/GameMenu.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameMenu.h; path = ../src/GameMenu.h; sourceTree = "<group>"; };
+		C570FAEF487CD34B62389F89 /* ../src/GameScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = GameScene.h; path = ../src/GameScene.h; sourceTree = "<group>"; };
+		2418B9A339E6004913AF5980 /* ../src/Joystick.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Joystick.h; path = ../src/Joystick.h; sourceTree = "<group>"; };
+		CAD9D6A98986EA8082368448 /* ../src/MainMenuScene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MainMenuScene.h; path = ../src/MainMenuScene.h; sourceTree = "<group>"; };
+		67194AC90FEA68E7C96E6907 /* ../src/MyButton.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MyButton.h; path = ../src/MyButton.h; sourceTree = "<group>"; };
+		5AFC0664D7BA80AE2A75BF0E /* ../src/Player.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Player.h; path = ../src/Player.h; sourceTree = "<group>"; };
+		12CAC42FDF06ABE860CFEA53 /* ../src/Rocket.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Rocket.h; path = ../src/Rocket.h; sourceTree = "<group>"; };
+		0F4469FB587862663D529DC9 /* ../src/Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../src/Scene.h; sourceTree = "<group>"; };
+		B6A9281364AF5D3B581D374C /* ../src/Unit.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Unit.h; path = ../src/Unit.h; sourceTree = "<group>"; };
+		4013C6794AAE8DFC641D2870 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		22E408FD6FCDA6E7E8E76952 /* ../src/res.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = res.h; path = ../src/res.h; sourceTree = "<group>"; };
 		AFA30E959880563E6ABBBC4F /* ../data/fonts */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = fonts; path = ../data/fonts; sourceTree = "<group>"; };
 		B52CCD463855CF91A7FBDB8E /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
 		7EEFDEEC289FCBB5FA67F822 /* ../data/xmls */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xmls; path = ../data/xmls; sourceTree = "<group>"; };
@@ -234,32 +234,32 @@
 			isa = PBXGroup;
 			children = (
 				360377333740D8A2FD15BBE6 /* Enemy.cpp */, 
-				0BF9628FC8D38F9748F0CDEB /* entry_point.cpp */, 
-				4DA100C319512824B7570663 /* example.cpp */, 
-				04FE4D4FB640E0DF92DFB865 /* Game.cpp */, 
-				7F3B12E3C9D554D9FE28101D /* GameMenu.cpp */, 
-				F6123B1E6FE4471A00F49751 /* GameScene.cpp */, 
-				5DE458993031811A4C7D28C1 /* Joystick.cpp */, 
-				BA41FC88D76540A6905224D6 /* MainMenuScene.cpp */, 
-				2CE4BD5BB9DEF92439C0AB58 /* MyButton.cpp */, 
-				F196143B0370A9D348494ACC /* Player.cpp */, 
-				7746CA7A63049ED8F7D6BF42 /* res.cpp */, 
-				D954BD82D7708B65A08FB6B9 /* Rocket.cpp */, 
-				BD0E956CC3A2F7EB94822B5C /* Scene.cpp */, 
-				7623D793B59EF0CD569E6EC2 /* Unit.cpp */, 
+				0BF9628FC8D38F9748F0CDEB /* Game.cpp */, 
+				4DA100C319512824B7570663 /* GameMenu.cpp */, 
+				04FE4D4FB640E0DF92DFB865 /* GameScene.cpp */, 
+				7F3B12E3C9D554D9FE28101D /* Joystick.cpp */, 
+				F6123B1E6FE4471A00F49751 /* MainMenuScene.cpp */, 
+				5DE458993031811A4C7D28C1 /* MyButton.cpp */, 
+				BA41FC88D76540A6905224D6 /* Player.cpp */, 
+				2CE4BD5BB9DEF92439C0AB58 /* Rocket.cpp */, 
+				F196143B0370A9D348494ACC /* Scene.cpp */, 
+				7746CA7A63049ED8F7D6BF42 /* Unit.cpp */, 
+				D954BD82D7708B65A08FB6B9 /* entry_point.cpp */, 
+				BD0E956CC3A2F7EB94822B5C /* example.cpp */, 
+				7623D793B59EF0CD569E6EC2 /* res.cpp */, 
 				4E9DE6A8FCBDF43BC876EC90 /* Enemy.h */, 
-				8F2AFB956EEAEED67C5B7571 /* example.h */, 
-				047F6BD19F885FF186A1447C /* Game.h */, 
-				C570FAEF487CD34B62389F89 /* GameMenu.h */, 
-				2418B9A339E6004913AF5980 /* GameScene.h */, 
-				CAD9D6A98986EA8082368448 /* Joystick.h */, 
-				67194AC90FEA68E7C96E6907 /* MainMenuScene.h */, 
-				5AFC0664D7BA80AE2A75BF0E /* MyButton.h */, 
-				12CAC42FDF06ABE860CFEA53 /* Player.h */, 
-				0F4469FB587862663D529DC9 /* res.h */, 
-				B6A9281364AF5D3B581D374C /* Rocket.h */, 
-				4013C6794AAE8DFC641D2870 /* Scene.h */, 
-				22E408FD6FCDA6E7E8E76952 /* Unit.h */, 
+				8F2AFB956EEAEED67C5B7571 /* Game.h */, 
+				047F6BD19F885FF186A1447C /* GameMenu.h */, 
+				C570FAEF487CD34B62389F89 /* GameScene.h */, 
+				2418B9A339E6004913AF5980 /* Joystick.h */, 
+				CAD9D6A98986EA8082368448 /* MainMenuScene.h */, 
+				67194AC90FEA68E7C96E6907 /* MyButton.h */, 
+				5AFC0664D7BA80AE2A75BF0E /* Player.h */, 
+				12CAC42FDF06ABE860CFEA53 /* Rocket.h */, 
+				0F4469FB587862663D529DC9 /* Scene.h */, 
+				B6A9281364AF5D3B581D374C /* Unit.h */, 
+				4013C6794AAE8DFC641D2870 /* example.h */, 
+				22E408FD6FCDA6E7E8E76952 /* res.h */, 
 
 			);
 			name = src;
@@ -394,19 +394,19 @@
 			buildActionMask = 2147483647;
 			files = (
 				2DC477AC10D6C07B3FE008F6 /* Enemy.cpp */, 
-				DA49ED8903C628BA578C8670 /* entry_point.cpp */, 
-				C8860D93875589970329DCCD /* example.cpp */, 
-				1E839D002B2BA83FC83A695A /* Game.cpp */, 
-				3A631A475DE035FC53ADE5EA /* GameMenu.cpp */, 
-				CD59C69314E9E74CD0A11E03 /* GameScene.cpp */, 
-				EFF139F8BA484314F7AAF645 /* Joystick.cpp */, 
-				F2CFD518E4E2E05ECEDBB262 /* MainMenuScene.cpp */, 
-				693088A7AB377368EE4A018E /* MyButton.cpp */, 
-				2B0FCA4EF2CDAB7EF6C6252E /* Player.cpp */, 
-				F87DC9641C1B8FCF28948580 /* res.cpp */, 
-				9850666D9BEB7BAAA6AAECDC /* Rocket.cpp */, 
-				33E41D858B2ABD49382CD53F /* Scene.cpp */, 
-				3BB41671209E30BDF95D1B16 /* Unit.cpp */, 
+				DA49ED8903C628BA578C8670 /* Game.cpp */, 
+				C8860D93875589970329DCCD /* GameMenu.cpp */, 
+				1E839D002B2BA83FC83A695A /* GameScene.cpp */, 
+				3A631A475DE035FC53ADE5EA /* Joystick.cpp */, 
+				CD59C69314E9E74CD0A11E03 /* MainMenuScene.cpp */, 
+				EFF139F8BA484314F7AAF645 /* MyButton.cpp */, 
+				F2CFD518E4E2E05ECEDBB262 /* Player.cpp */, 
+				693088A7AB377368EE4A018E /* Rocket.cpp */, 
+				2B0FCA4EF2CDAB7EF6C6252E /* Scene.cpp */, 
+				F87DC9641C1B8FCF28948580 /* Unit.cpp */, 
+				9850666D9BEB7BAAA6AAECDC /* entry_point.cpp */, 
+				33E41D858B2ABD49382CD53F /* example.cpp */, 
+				3BB41671209E30BDF95D1B16 /* res.cpp */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 2 - 2
examples/Game/part4/proj.win32/GamePart4_vs2010.vcxproj

@@ -92,10 +92,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameMenu.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameMenu.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameMenu.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameMenu.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 2 - 2
examples/Game/part4/proj.win32/GamePart4_vs2013.vcxproj

@@ -94,10 +94,10 @@
     </ProjectReference>
   </ItemGroup>
   <ItemGroup>
-    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameMenu.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/res.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" />
+    <ClCompile Include="../src/Enemy.cpp" /><ClCompile Include="../src/Game.cpp" /><ClCompile Include="../src/GameMenu.cpp" /><ClCompile Include="../src/GameScene.cpp" /><ClCompile Include="../src/Joystick.cpp" /><ClCompile Include="../src/MainMenuScene.cpp" /><ClCompile Include="../src/MyButton.cpp" /><ClCompile Include="../src/Player.cpp" /><ClCompile Include="../src/Rocket.cpp" /><ClCompile Include="../src/Scene.cpp" /><ClCompile Include="../src/Unit.cpp" /><ClCompile Include="../src/entry_point.cpp" /><ClCompile Include="../src/example.cpp" /><ClCompile Include="../src/res.cpp" />
   </ItemGroup>
   <ItemGroup>
-    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameMenu.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/res.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" />
+    <ClInclude Include="../src/Enemy.h" /><ClInclude Include="../src/Game.h" /><ClInclude Include="../src/GameMenu.h" /><ClInclude Include="../src/GameScene.h" /><ClInclude Include="../src/Joystick.h" /><ClInclude Include="../src/MainMenuScene.h" /><ClInclude Include="../src/MyButton.h" /><ClInclude Include="../src/Player.h" /><ClInclude Include="../src/Rocket.h" /><ClInclude Include="../src/Scene.h" /><ClInclude Include="../src/Unit.h" /><ClInclude Include="../src/example.h" /><ClInclude Include="../src/res.h" />
   </ItemGroup>
   <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
   <ImportGroup Label="ExtensionTargets">

+ 3 - 3
examples/Game/part4/src/GameMenu.cpp

@@ -22,7 +22,7 @@ GameMenu::GameMenu()
 
 	float y = _view->getHeight()/2 - 80;
 
-	//initialize TextStyle for TextActor
+	//initialize TextStyle for TextField
 	//TextStyle is plain struct with "setting" for Text
 	TextStyle style;
 	style.font = res::ui.getResFont("big")->getFont();
@@ -31,7 +31,7 @@ GameMenu::GameMenu()
 	//horizontal align
 	style.hAlign = TextStyle::HALIGN_CENTER;
 
-	spTextActor paused = initActor(new TextActor,
+	spTextField paused = initActor(new TextField,
 		arg_style = style,
 		//colored text by "html" tags
 		arg_htmlText = "Paused<div c='00FF00'>!</div>",
@@ -90,7 +90,7 @@ void GameMenu::_show()
 	tq->add(Actor::TweenHeight(300), 500);
 	tq->add(Actor::TweenWidth(300), 500);
 	//and show buttons when done
-	tq->setDoneCallback(CLOSURE(this, &GameMenu::showButtons));
+	tq->addDoneCallback(CLOSURE(this, &GameMenu::showButtons));
 	_bg->addTween(tq);
 }
 

+ 2 - 2
examples/Game/part4/src/MyButton.cpp

@@ -30,7 +30,7 @@ void MyButton::setText(const string &txt)
 {
 	if (!_text)
 	{		
-		//create TextActor if it wasn't created yet
+		//create TextField if it wasn't created yet
 		TextStyle style;
 		style.font = res::ui.getResFont("normal")->getFont();
 		style.vAlign = TextStyle::VALIGN_MIDDLE;
@@ -38,7 +38,7 @@ void MyButton::setText(const string &txt)
 
 		//attach it to MyButton and set the same size as button
 		//text would be centered
-		_text = initActor(new TextActor,
+		_text = initActor(new TextField,
 			arg_style = style,
 			arg_size = getSize(),
 			arg_attachTo = this);

+ 1 - 1
examples/Game/part4/src/MyButton.h

@@ -13,5 +13,5 @@ public:
 private:
 	void onEvent(Event *);
 
-	spTextActor _text;
+	spTextField _text;
 };

+ 1 - 1
examples/Game/part4/src/Scene.cpp

@@ -33,7 +33,7 @@ void Scene::hide()
 	//detach when done
 	tween->setDetachActor(true);
 	//and call Scene::hidden	
-	tween->setDoneCallback(CLOSURE(this, &Scene::hidden));
+	tween->addDoneCallback(CLOSURE(this, &Scene::hidden));
 }
 
 void Scene::hidden(Event *ev)

+ 34 - 16
examples/Game/part4/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -72,19 +73,22 @@ int mainloop()
 //it is application entry point
 void run()
 {
+	ObjectBase::__startTracingLeaks();
+
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -118,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -150,14 +162,16 @@ void run()
 	//dump list should be empty now
 	//we deleted everything and could be sure that there aren't any memory leaks
 	ObjectBase::dumpCreatedObjects();
+
+	ObjectBase::__stopTracingLeaks();
 	//end
 }
 
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -165,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -184,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

File diff suppressed because it is too large
+ 18 - 0
examples/HelloWorld/data/data.js


+ 0 - 164
examples/HelloWorld/data/fonts/system.fnt

@@ -1,164 +0,0 @@
-<?xml version="1.0"?>
-<font>
-  <info face="Arial" size="-12" bold="0" italic="0" charset="" unicode="1" stretchH="100" smooth="1" aa="1" padding="0,0,0,0" spacing="1,1" outline="0"/>
-  <common lineHeight="15" base="12" scaleW="128" scaleH="64" pages="1" packed="0" alphaChnl="1" redChnl="0" greenChnl="0" blueChnl="0"/>
-  <pages>
-    <page id="0" file="system_0.png" />
-  </pages>
-  <chars count="95">
-    <char id="32" x="53" y="39" width="1" height="1" xoffset="0" yoffset="12" xadvance="3" page="0" chnl="15" />
-    <char id="33" x="23" y="32" width="1" height="9" xoffset="1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="34" x="32" y="40" width="3" height="3" xoffset="0" yoffset="3" xadvance="4" page="0" chnl="15" />
-    <char id="35" x="0" y="13" width="7" height="9" xoffset="0" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="36" x="48" y="0" width="5" height="10" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="37" x="70" y="0" width="9" height="9" xoffset="1" yoffset="3" xadvance="11" page="0" chnl="15" />
-    <char id="38" x="8" y="13" width="7" height="9" xoffset="1" yoffset="3" xadvance="8" page="0" chnl="15" />
-    <char id="39" x="36" y="40" width="1" height="3" xoffset="1" yoffset="3" xadvance="2" page="0" chnl="15" />
-    <char id="40" x="12" y="0" width="3" height="11" xoffset="1" yoffset="3" xadvance="4" page="0" chnl="15" />
-    <char id="41" x="16" y="0" width="3" height="11" xoffset="0" yoffset="3" xadvance="4" page="0" chnl="15" />
-    <char id="42" x="26" y="42" width="5" height="4" xoffset="0" yoffset="3" xadvance="5" page="0" chnl="15" />
-    <char id="43" x="120" y="30" width="5" height="5" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="44" x="126" y="30" width="1" height="3" xoffset="1" yoffset="11" xadvance="3" page="0" chnl="15" />
-    <char id="45" x="49" y="39" width="3" height="1" xoffset="0" yoffset="8" xadvance="4" page="0" chnl="15" />
-    <char id="46" x="55" y="39" width="1" height="1" xoffset="1" yoffset="11" xadvance="3" page="0" chnl="15" />
-    <char id="47" x="15" y="33" width="3" height="9" xoffset="0" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="48" x="0" y="33" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="49" x="11" y="33" width="3" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="50" x="20" y="22" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="51" x="26" y="22" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="52" x="32" y="22" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="53" x="38" y="22" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="54" x="110" y="20" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="55" x="44" y="21" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="56" x="50" y="21" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="57" x="62" y="21" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="58" x="112" y="30" width="1" height="7" xoffset="1" yoffset="5" xadvance="3" page="0" chnl="15" />
-    <char id="59" x="125" y="0" width="1" height="9" xoffset="1" yoffset="5" xadvance="3" page="0" chnl="15" />
-    <char id="60" x="6" y="43" width="5" height="5" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="61" x="12" y="43" width="6" height="4" xoffset="0" yoffset="6" xadvance="7" page="0" chnl="15" />
-    <char id="62" x="0" y="43" width="5" height="5" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="63" x="80" y="20" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="64" x="0" y="0" width="11" height="12" xoffset="1" yoffset="3" xadvance="12" page="0" chnl="15" />
-    <char id="65" x="80" y="0" width="9" height="9" xoffset="-1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="66" x="104" y="10" width="6" height="9" xoffset="1" yoffset="3" xadvance="8" page="0" chnl="15" />
-    <char id="67" x="40" y="11" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="68" x="88" y="10" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="69" x="0" y="23" width="6" height="9" xoffset="1" yoffset="3" xadvance="8" page="0" chnl="15" />
-    <char id="70" x="122" y="20" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="71" x="109" y="0" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="72" x="56" y="11" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="73" x="25" y="32" width="1" height="9" xoffset="1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="74" x="14" y="23" width="5" height="9" xoffset="0" yoffset="3" xadvance="6" page="0" chnl="15" />
-    <char id="75" x="64" y="10" width="7" height="9" xoffset="1" yoffset="3" xadvance="8" page="0" chnl="15" />
-    <char id="76" x="118" y="10" width="6" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="77" x="72" y="10" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="78" x="80" y="10" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="79" x="32" y="12" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="80" x="111" y="10" width="6" height="9" xoffset="1" yoffset="3" xadvance="8" page="0" chnl="15" />
-    <char id="81" x="40" y="0" width="7" height="10" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="82" x="100" y="0" width="8" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="83" x="7" y="23" width="6" height="9" xoffset="1" yoffset="3" xadvance="8" page="0" chnl="15" />
-    <char id="84" x="48" y="11" width="7" height="9" xoffset="0" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="85" x="96" y="10" width="7" height="9" xoffset="1" yoffset="3" xadvance="9" page="0" chnl="15" />
-    <char id="86" x="90" y="0" width="9" height="9" xoffset="-1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="87" x="58" y="0" width="11" height="9" xoffset="0" yoffset="3" xadvance="11" page="0" chnl="15" />
-    <char id="88" x="24" y="12" width="7" height="9" xoffset="0" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="89" x="16" y="12" width="7" height="9" xoffset="0" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="90" x="117" y="0" width="7" height="9" xoffset="0" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="91" x="35" y="0" width="2" height="11" xoffset="1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="92" x="19" y="33" width="3" height="9" xoffset="0" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="93" x="32" y="0" width="2" height="11" xoffset="0" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="94" x="114" y="30" width="5" height="5" xoffset="0" yoffset="3" xadvance="5" page="0" chnl="15" />
-    <char id="95" x="41" y="40" width="7" height="1" xoffset="0" yoffset="13" xadvance="7" page="0" chnl="15" />
-    <char id="96" x="38" y="40" width="2" height="2" xoffset="1" yoffset="3" xadvance="4" page="0" chnl="15" />
-    <char id="97" x="97" y="30" width="5" height="7" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="98" x="56" y="21" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="99" x="103" y="30" width="4" height="7" xoffset="1" yoffset="5" xadvance="6" page="0" chnl="15" />
-    <char id="100" x="92" y="20" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="101" x="85" y="30" width="5" height="7" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="102" x="6" y="33" width="4" height="9" xoffset="0" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="103" x="68" y="20" width="5" height="9" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="104" x="74" y="20" width="5" height="9" xoffset="1" yoffset="3" xadvance="7" page="0" chnl="15" />
-    <char id="105" x="27" y="32" width="1" height="9" xoffset="1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="106" x="24" y="0" width="3" height="11" xoffset="-1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="107" x="86" y="20" width="5" height="9" xoffset="1" yoffset="3" xadvance="6" page="0" chnl="15" />
-    <char id="108" x="125" y="10" width="1" height="9" xoffset="1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="109" x="39" y="32" width="9" height="7" xoffset="1" yoffset="5" xadvance="11" page="0" chnl="15" />
-    <char id="110" x="61" y="31" width="5" height="7" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="111" x="73" y="30" width="5" height="7" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="112" x="98" y="20" width="5" height="9" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="113" x="104" y="20" width="5" height="9" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="114" x="108" y="30" width="3" height="7" xoffset="1" yoffset="5" xadvance="4" page="0" chnl="15" />
-    <char id="115" x="91" y="30" width="5" height="7" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="116" x="54" y="0" width="3" height="10" xoffset="0" yoffset="2" xadvance="3" page="0" chnl="15" />
-    <char id="117" x="49" y="31" width="5" height="7" xoffset="1" yoffset="5" xadvance="7" page="0" chnl="15" />
-    <char id="118" x="55" y="31" width="5" height="7" xoffset="0" yoffset="5" xadvance="5" page="0" chnl="15" />
-    <char id="119" x="29" y="32" width="9" height="7" xoffset="0" yoffset="5" xadvance="9" page="0" chnl="15" />
-    <char id="120" x="67" y="31" width="5" height="7" xoffset="0" yoffset="5" xadvance="5" page="0" chnl="15" />
-    <char id="121" x="116" y="20" width="5" height="9" xoffset="0" yoffset="5" xadvance="5" page="0" chnl="15" />
-    <char id="122" x="79" y="30" width="5" height="7" xoffset="0" yoffset="5" xadvance="5" page="0" chnl="15" />
-    <char id="123" x="20" y="0" width="3" height="11" xoffset="0" yoffset="3" xadvance="4" page="0" chnl="15" />
-    <char id="124" x="38" y="0" width="1" height="11" xoffset="1" yoffset="3" xadvance="3" page="0" chnl="15" />
-    <char id="125" x="28" y="0" width="3" height="11" xoffset="1" yoffset="3" xadvance="4" page="0" chnl="15" />
-    <char id="126" x="19" y="43" width="6" height="4" xoffset="1" yoffset="6" xadvance="7" page="0" chnl="15" />
-  </chars>
-  <kernings count="57">
-    <kerning first="32" second="65" amount="-1" />
-    <kerning first="121" second="46" amount="-1" />
-    <kerning first="121" second="44" amount="-1" />
-    <kerning first="119" second="46" amount="-1" />
-    <kerning first="119" second="44" amount="-1" />
-    <kerning first="118" second="46" amount="-1" />
-    <kerning first="118" second="44" amount="-1" />
-    <kerning first="114" second="46" amount="-1" />
-    <kerning first="114" second="44" amount="-1" />
-    <kerning first="89" second="118" amount="-1" />
-    <kerning first="49" second="49" amount="-1" />
-    <kerning first="65" second="32" amount="-1" />
-    <kerning first="65" second="84" amount="-1" />
-    <kerning first="65" second="86" amount="-1" />
-    <kerning first="89" second="117" amount="-1" />
-    <kerning first="65" second="89" amount="-1" />
-    <kerning first="89" second="113" amount="-1" />
-    <kerning first="89" second="112" amount="-1" />
-    <kerning first="89" second="111" amount="-1" />
-    <kerning first="89" second="101" amount="-1" />
-    <kerning first="70" second="44" amount="-1" />
-    <kerning first="70" second="46" amount="-1" />
-    <kerning first="70" second="65" amount="-1" />
-    <kerning first="89" second="97" amount="-1" />
-    <kerning first="76" second="84" amount="-1" />
-    <kerning first="76" second="86" amount="-1" />
-    <kerning first="76" second="87" amount="-1" />
-    <kerning first="76" second="89" amount="-1" />
-    <kerning first="89" second="65" amount="-1" />
-    <kerning first="89" second="58" amount="-1" />
-    <kerning first="89" second="46" amount="-2" />
-    <kerning first="80" second="44" amount="-2" />
-    <kerning first="80" second="46" amount="-2" />
-    <kerning first="80" second="65" amount="-1" />
-    <kerning first="89" second="45" amount="-1" />
-    <kerning first="89" second="44" amount="-2" />
-    <kerning first="87" second="46" amount="-1" />
-    <kerning first="87" second="44" amount="-1" />
-    <kerning first="86" second="111" amount="-1" />
-    <kerning first="84" second="44" amount="-1" />
-    <kerning first="84" second="45" amount="-1" />
-    <kerning first="84" second="46" amount="-1" />
-    <kerning first="84" second="58" amount="-1" />
-    <kerning first="86" second="101" amount="-1" />
-    <kerning first="84" second="65" amount="-1" />
-    <kerning first="86" second="97" amount="-1" />
-    <kerning first="84" second="97" amount="-1" />
-    <kerning first="84" second="99" amount="-1" />
-    <kerning first="84" second="101" amount="-1" />
-    <kerning first="86" second="65" amount="-1" />
-    <kerning first="84" second="111" amount="-1" />
-    <kerning first="86" second="46" amount="-1" />
-    <kerning first="84" second="115" amount="-1" />
-    <kerning first="86" second="45" amount="-1" />
-    <kerning first="84" second="119" amount="-1" />
-    <kerning first="84" second="121" amount="-1" />
-    <kerning first="86" second="44" amount="-1" />
-  </kernings>
-</font>

BIN
examples/HelloWorld/data/fonts/system_0.png


+ 27 - 0
examples/HelloWorld/data/pack.py

@@ -0,0 +1,27 @@
+import os
+
+def listdir(path, data):
+    for f in os.listdir(path):
+        if path != ".":        
+            full = path + "/" + f
+        else:
+            full = f
+            
+        if os.path.isdir(full):
+            listdir(full, data)
+        else:
+            ext = os.path.splitext(f)[1]
+            if ext not in (".dll", ".py", ".icf", ".py", ".js"):
+                data.append(full)
+
+files = []
+
+listdir(".", files)
+print files
+s = ""
+for f in files:
+    s = s + " --embed " + f
+    
+cmd = "file_packager.py test --js-output=data.js " + s
+print cmd
+os.system(cmd)

+ 19 - 0
examples/HelloWorld/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (HelloWorld)
+
+add_subdirectory(../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+add_executable(HelloWorld ../src/entry_point.cpp ../src/example.cpp  ../src/example.h )
+
+set_target_properties(HelloWorld
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(HelloWorld ${OXYGINE_CORE_LIBS})
+em_link_pre_js(HelloWorld ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/HelloWorld/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/HelloWorld/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 27 - 18
examples/HelloWorld/proj.ios/HelloWorld_ios.xcodeproj/project.pbxproj

@@ -7,11 +7,13 @@
 	objects = {
 
 /* Begin PBXBuildFile section */
+		048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 048AD0AD197D24AB001963EF /* CoreMotion.framework */; };
 		04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998D3517F8A96E003441C3 /* libSDL2.a */; };
 		04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE117F8ADB4003441C3 /* libz.dylib */; };
 		04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE217F8ADB4003441C3 /* QuartzCore.framework */; };
 		04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE317F8ADB4003441C3 /* AudioToolbox.framework */; };
 		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
+		04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE417F8ADB4003441C3 /* CoreAudio.framework */; };
 		04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EE517F8ADB4003441C3 /* OpenGLES.framework */; };
 		04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEB17F8ADD4003441C3 /* UIKit.framework */; };
 		04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EEC17F8ADD4003441C3 /* Foundation.framework */; };
@@ -23,10 +25,11 @@
 		2DC477AC10D6C07B3FE008F6 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */; };
 		DA49ED8903C628BA578C8670 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */; };
 		C8860D93875589970329DCCD /* ../data/app.config.txt in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../data/app.config.txt */; };
-		1E839D002B2BA83FC83A695A /* ../data/fonts in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../data/fonts */; };
-		3A631A475DE035FC53ADE5EA /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../data/images */; };
-		CD59C69314E9E74CD0A11E03 /* ../data/res.xml in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../data/res.xml */; };
-		EFF139F8BA484314F7AAF645 /* ../data/xml in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../data/xml */; };
+		1E839D002B2BA83FC83A695A /* ../data/data.js in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../data/data.js */; };
+		3A631A475DE035FC53ADE5EA /* ../data/fonts in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../data/fonts */; };
+		CD59C69314E9E74CD0A11E03 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../data/images */; };
+		EFF139F8BA484314F7AAF645 /* ../data/pack.py in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../data/pack.py */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../data/res.xml in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../data/res.xml */; };
 
 /* End PBXBuildFile section */
 
@@ -69,6 +72,7 @@
 		04998EE217F8ADB4003441C3 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
 		04998EE317F8ADB4003441C3 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; };
 		04998EE417F8ADB4003441C3 /* CoreAudio.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreAudio.framework; path = System/Library/Frameworks/CoreAudio.framework; sourceTree = SDKROOT; };
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
 		04998EE517F8ADB4003441C3 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; };
 		04998EEB17F8ADD4003441C3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; };
 		04998EEC17F8ADD4003441C3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
@@ -78,12 +82,13 @@
 		04E9AD3E1876FE84006A7317 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name =Images.xcassets; path = HelloWorld/Images.xcassets; sourceTree = "<group>"; };
 		360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
 		0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
 		4DA100C319512824B7570663 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../data/fonts */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = fonts; path = ../data/fonts; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../data/res.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = res.xml; path = ../data/res.xml; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../data/xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xml; path = ../data/xml; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../data/data.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = data.js; path = ../data/data.js; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../data/fonts */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = fonts; path = ../data/fonts; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../data/pack.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = pack.py; path = ../data/pack.py; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../data/res.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = res.xml; path = ../data/res.xml; sourceTree = "<group>"; };
 
 /* End PBXFileReference section */
 
@@ -95,6 +100,7 @@
 				049B52B11871EBFA00EF3C66 /* liboxygine_ios.a in Frameworks */,
 				04998D3617F8A97D003441C3 /* libSDL2.a in Frameworks */,
 				04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */,
+				048AD0AE197D24AB001963EF /* CoreMotion.framework in Frameworks */,
 				04998EEF17F8ADD4003441C3 /* Foundation.framework in Frameworks */,
 				04998EE617F8ADB4003441C3 /* libz.dylib in Frameworks */,
 				04998EE917F8ADB4003441C3 /* CoreAudio.framework in Frameworks */,
@@ -146,6 +152,7 @@
 			isa = PBXGroup;
 			children = (
 				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
 				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
 				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
 				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
@@ -161,10 +168,11 @@
 			isa = PBXGroup;
 			children = (
 				4DA100C319512824B7570663 /* app.config.txt */, 
-				04FE4D4FB640E0DF92DFB865 /* fonts */, 
-				7F3B12E3C9D554D9FE28101D /* images */, 
-				F6123B1E6FE4471A00F49751 /* res.xml */, 
-				5DE458993031811A4C7D28C1 /* xml */, 
+				04FE4D4FB640E0DF92DFB865 /* data.js */, 
+				7F3B12E3C9D554D9FE28101D /* fonts */, 
+				F6123B1E6FE4471A00F49751 /* images */, 
+				5DE458993031811A4C7D28C1 /* pack.py */, 
+				BA41FC88D76540A6905224D6 /* res.xml */, 
 
 			);
 			name = "Supporting Files";
@@ -183,7 +191,7 @@
 			children = (
 				360377333740D8A2FD15BBE6 /* entry_point.cpp */, 
 				0BF9628FC8D38F9748F0CDEB /* example.cpp */, 
-				BA41FC88D76540A6905224D6 /* example.h */, 
+				2CE4BD5BB9DEF92439C0AB58 /* example.h */, 
 
 			);
 			name = src;
@@ -280,10 +288,11 @@
 			files = (
 				04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */,
 				C8860D93875589970329DCCD /* app.config.txt */, 
-				1E839D002B2BA83FC83A695A /* fonts */, 
-				3A631A475DE035FC53ADE5EA /* images */, 
-				CD59C69314E9E74CD0A11E03 /* res.xml */, 
-				EFF139F8BA484314F7AAF645 /* xml */, 
+				1E839D002B2BA83FC83A695A /* data.js */, 
+				3A631A475DE035FC53ADE5EA /* fonts */, 
+				CD59C69314E9E74CD0A11E03 /* images */, 
+				EFF139F8BA484314F7AAF645 /* pack.py */, 
+				F2CFD518E4E2E05ECEDBB262 /* res.xml */, 
 
 			);
 			runOnlyForDeploymentPostprocessing = 0;

+ 1 - 1
examples/HelloWorld/proj.macosx/HelloWorld_macosx-Info.plist

@@ -25,7 +25,7 @@
 	<key>LSMinimumSystemVersion</key>
 	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
 	<key>NSHumanReadableCopyright</key>
-	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
 	<key>NSMainNibFile</key>
 	<string>MainMenu</string>
 	<key>NSPrincipalClass</key>

+ 22 - 18
examples/HelloWorld/proj.macosx/HelloWorld_macosx.xcodeproj/project.pbxproj

@@ -18,10 +18,11 @@
 		2DC477AC10D6C07B3FE008F6 /* ../src/entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */; };
 		DA49ED8903C628BA578C8670 /* ../src/example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */; };
 		C8860D93875589970329DCCD /* ../data/app.config.txt in Sources */ = {isa = PBXBuildFile; fileRef = 4DA100C319512824B7570663 /* ../data/app.config.txt */; };
-		1E839D002B2BA83FC83A695A /* ../data/fonts in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../data/fonts */; };
-		3A631A475DE035FC53ADE5EA /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../data/images */; };
-		CD59C69314E9E74CD0A11E03 /* ../data/res.xml in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../data/res.xml */; };
-		EFF139F8BA484314F7AAF645 /* ../data/xml in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../data/xml */; };
+		1E839D002B2BA83FC83A695A /* ../data/data.js in Sources */ = {isa = PBXBuildFile; fileRef = 04FE4D4FB640E0DF92DFB865 /* ../data/data.js */; };
+		3A631A475DE035FC53ADE5EA /* ../data/fonts in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B12E3C9D554D9FE28101D /* ../data/fonts */; };
+		CD59C69314E9E74CD0A11E03 /* ../data/images in Sources */ = {isa = PBXBuildFile; fileRef = F6123B1E6FE4471A00F49751 /* ../data/images */; };
+		EFF139F8BA484314F7AAF645 /* ../data/pack.py in Sources */ = {isa = PBXBuildFile; fileRef = 5DE458993031811A4C7D28C1 /* ../data/pack.py */; };
+		F2CFD518E4E2E05ECEDBB262 /* ../data/res.xml in Sources */ = {isa = PBXBuildFile; fileRef = BA41FC88D76540A6905224D6 /* ../data/res.xml */; };
 
 		
 /* End PBXBuildFile section */
@@ -95,12 +96,13 @@
 		049B57501871FBE900EF3C66 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
 		360377333740D8A2FD15BBE6 /* ../src/entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
 		0BF9628FC8D38F9748F0CDEB /* ../src/example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
-		BA41FC88D76540A6905224D6 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		2CE4BD5BB9DEF92439C0AB58 /* ../src/example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
 		4DA100C319512824B7570663 /* ../data/app.config.txt */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = app.config.txt; path = ../data/app.config.txt; sourceTree = "<group>"; };
-		04FE4D4FB640E0DF92DFB865 /* ../data/fonts */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = fonts; path = ../data/fonts; sourceTree = "<group>"; };
-		7F3B12E3C9D554D9FE28101D /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
-		F6123B1E6FE4471A00F49751 /* ../data/res.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = res.xml; path = ../data/res.xml; sourceTree = "<group>"; };
-		5DE458993031811A4C7D28C1 /* ../data/xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = xml; path = ../data/xml; sourceTree = "<group>"; };
+		04FE4D4FB640E0DF92DFB865 /* ../data/data.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = data.js; path = ../data/data.js; sourceTree = "<group>"; };
+		7F3B12E3C9D554D9FE28101D /* ../data/fonts */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = fonts; path = ../data/fonts; sourceTree = "<group>"; };
+		F6123B1E6FE4471A00F49751 /* ../data/images */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = folder; name = images; path = ../data/images; sourceTree = "<group>"; };
+		5DE458993031811A4C7D28C1 /* ../data/pack.py */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = pack.py; path = ../data/pack.py; sourceTree = "<group>"; };
+		BA41FC88D76540A6905224D6 /* ../data/res.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = wtf; name = res.xml; path = ../data/res.xml; sourceTree = "<group>"; };
 
 		04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = oxygine_macosx.xcodeproj; path = ../../..//oxygine/SDL/macosx/oxygine_macosx/oxygine_macosx.xcodeproj; sourceTree = "<group>"; };
 		04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = ../../../..//SDL/Xcode/SDL/SDL.xcodeproj; sourceTree = "<group>"; };
@@ -190,10 +192,11 @@
 			isa = PBXGroup;
 			children = (
 				4DA100C319512824B7570663 /* app.config.txt */, 
-				04FE4D4FB640E0DF92DFB865 /* fonts */, 
-				7F3B12E3C9D554D9FE28101D /* images */, 
-				F6123B1E6FE4471A00F49751 /* res.xml */, 
-				5DE458993031811A4C7D28C1 /* xml */, 
+				04FE4D4FB640E0DF92DFB865 /* data.js */, 
+				7F3B12E3C9D554D9FE28101D /* fonts */, 
+				F6123B1E6FE4471A00F49751 /* images */, 
+				5DE458993031811A4C7D28C1 /* pack.py */, 
+				BA41FC88D76540A6905224D6 /* res.xml */, 
 
 				049B57391871FBE900EF3C66 /* HelloWorld_macosx-Info.plist */,
 			);
@@ -205,7 +208,7 @@
 			children = (
 				360377333740D8A2FD15BBE6 /* entry_point.cpp */, 
 				0BF9628FC8D38F9748F0CDEB /* example.cpp */, 
-				BA41FC88D76540A6905224D6 /* example.h */, 
+				2CE4BD5BB9DEF92439C0AB58 /* example.h */, 
 
 			);
 			name = src;
@@ -325,10 +328,11 @@
 			buildActionMask = 2147483647;
 			files = (
 				C8860D93875589970329DCCD /* app.config.txt */, 
-				1E839D002B2BA83FC83A695A /* fonts */, 
-				3A631A475DE035FC53ADE5EA /* images */, 
-				CD59C69314E9E74CD0A11E03 /* res.xml */, 
-				EFF139F8BA484314F7AAF645 /* xml */, 
+				1E839D002B2BA83FC83A695A /* data.js */, 
+				3A631A475DE035FC53ADE5EA /* fonts */, 
+				CD59C69314E9E74CD0A11E03 /* images */, 
+				EFF139F8BA484314F7AAF645 /* pack.py */, 
+				F2CFD518E4E2E05ECEDBB262 /* res.xml */, 
 
 				049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */,
 			);

+ 34 - 16
examples/HelloWorld/src/entry_point.cpp

@@ -12,13 +12,14 @@ You could start from example.cpp and example.h it has main functions being calle
 #include "example.h"
 
 
+
 using namespace oxygine;
 
 Renderer renderer;
 Rect viewport;
 
 
-class ExampleRootActor: public RootActor
+class ExampleRootActor : public RootActor
 {
 public:
 	ExampleRootActor()
@@ -72,19 +73,22 @@ int mainloop()
 //it is application entry point
 void run()
 {
+	ObjectBase::__startTracingLeaks();
+
 	//initialize oxygine's internal stuff
 	core::init_desc desc;
 
-#if OXYGINE_SDL
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
 	//we could setup initial window size on SDL builds
-	//desc.w = 960;
-	//desc.h = 660;
+	desc.w = 960;
+	desc.h = 640;
 	//marmalade settings could be changed from emulator's menu
 #endif
 
+
 	example_preinit();
 	core::init(&desc);
-	
+
 
 	//create RootActor. RootActor is a root node
 	RootActor::instance = new ExampleRootActor();
@@ -118,15 +122,23 @@ void run()
 	//initialize this example stuff. see example.cpp
 	example_init();
 
+#ifdef EMSCRIPTEN
+	/*
+	if you build for Emscripten mainloop would be called automatically outside. 
+	see emscripten_set_main_loop below
+	*/	
+	return;
+#endif
+
 	bool done = false;
 
 	//here is main game loop
-    while (1)
-    {
+	while (1)
+	{
 		int done = mainloop();
 		if (done)
 			break;
-    }
+	}
 	//so user want to leave application...
 
 	//lets dump all created objects into log
@@ -150,14 +162,16 @@ void run()
 	//dump list should be empty now
 	//we deleted everything and could be sure that there aren't any memory leaks
 	ObjectBase::dumpCreatedObjects();
+
+	ObjectBase::__stopTracingLeaks();
 	//end
 }
 
 #ifdef __S3E__
 int main(int argc, char* argv[])
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #endif
 
@@ -165,11 +179,11 @@ int main(int argc, char* argv[])
 #ifdef OXYGINE_SDL
 #ifdef __MINGW32__
 int WinMain(HINSTANCE hInstance,
-                     HINSTANCE hPrevInstance,
-                     LPSTR lpCmdLine,int nCmdShow)
+	HINSTANCE hPrevInstance,
+	LPSTR lpCmdLine, int nCmdShow)
 {
-    run();
-    return 0;
+	run();
+	return 0;
 }
 #else
 #include "SDL_main.h"
@@ -184,11 +198,15 @@ extern "C"
 #endif
 #endif
 
-#ifdef __FLASHPLAYER__
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one(){ mainloop(); }
+
 int main(int argc, char* argv[])
 {
-	printf("test\n");
 	run();
+	emscripten_set_main_loop(one, 0, 0);
 	return 0;
 }
 #endif

+ 2 - 2
examples/HelloWorld/src/example.cpp

@@ -12,7 +12,7 @@ DECLARE_SMART(MainActor, spMainActor);
 class MainActor: public Actor
 {
 public:
-	spTextActor _text;
+	spTextField _text;
 
 	MainActor()
 	{	
@@ -36,7 +36,7 @@ public:
 		//second part
 
 		//create Actor with Text and it to button as child
-		spTextActor text = new TextActor();
+		spTextField text = new TextField();
 		text->attachTo(button);
 		//centered in button
 		text->setPosition(button->getSize()/2);

+ 19 - 0
examples/Match3/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,19 @@
+cmake_minimum_required (VERSION 2.6)
+project (Match3)
+
+add_subdirectory(../../../ oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+set(CMAKE_CXX_FLAGS ${CMAKE_CXX_FLAGS} "-Wno-warn-absolute-paths")
+
+add_executable(Match3 ../src/entry_point.cpp ../src/example.cpp ../src/gameframe.cpp ../src/jewels.cpp ../src/shared.cpp  ../src/example.h ../src/gameframe.h ../src/jewels.h ../src/shared.h )
+
+set_target_properties(Match3
+    PROPERTIES 
+    LINK_FLAGS "-s WARN_ON_UNDEFINED_SYMBOLS=1 -s -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+target_link_libraries(Match3 ${OXYGINE_CORE_LIBS})
+em_link_pre_js(Match3 ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

+ 7 - 0
examples/Match3/proj.emscripten/build.bat

@@ -0,0 +1,7 @@
+python ../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

+ 7 - 0
examples/Match3/proj.emscripten/build_release.bat

@@ -0,0 +1,7 @@
+python ../../..//tools/others/embed_folder_js.py -s ../data
+
+mkdir build
+cd build
+cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=%EMSCRIPTEN%/cmake/platform/emscripten.cmake -G"Unix Makefiles" .. 
+make
+cd ..

Some files were not shown because too many files changed in this diff