Browse Source

migrated from bitbucket

dmuratshin 10 years ago
parent
commit
1e4b87c3ad
53 changed files with 3366 additions and 27 deletions
  1. 22 27
      .gitignore
  2. 23 0
      .hgignore
  3. 19 0
      Android.mk
  4. 16 0
      CMakeLists.txt
  5. 0 0
      examples/HelloFlow/data/.empty
  6. 32 0
      examples/HelloFlow/proj.android/AndroidManifest.xml
  7. 18 0
      examples/HelloFlow/proj.android/ant.properties
  8. 1 0
      examples/HelloFlow/proj.android/ant_debug.bat
  9. 2 0
      examples/HelloFlow/proj.android/ant_debug.sh
  10. 3 0
      examples/HelloFlow/proj.android/build-run.bat
  11. 4 0
      examples/HelloFlow/proj.android/build-run.sh
  12. 1 0
      examples/HelloFlow/proj.android/build.bat
  13. 2 0
      examples/HelloFlow/proj.android/build.sh
  14. 93 0
      examples/HelloFlow/proj.android/build.xml
  15. 2 0
      examples/HelloFlow/proj.android/install.bat
  16. 3 0
      examples/HelloFlow/proj.android/install.sh
  17. 1 0
      examples/HelloFlow/proj.android/jni/Android.mk
  18. 5 0
      examples/HelloFlow/proj.android/jni/Application.mk
  19. 20 0
      examples/HelloFlow/proj.android/jni/src/Android.mk
  20. 15 0
      examples/HelloFlow/proj.android/project.properties
  21. BIN
      examples/HelloFlow/proj.android/res/drawable-hdpi/ic_launcher.png
  22. BIN
      examples/HelloFlow/proj.android/res/drawable-mdpi/ic_launcher.png
  23. BIN
      examples/HelloFlow/proj.android/res/drawable-xhdpi/ic_launcher.png
  24. BIN
      examples/HelloFlow/proj.android/res/drawable-xxhdpi/ic_launcher.png
  25. 13 0
      examples/HelloFlow/proj.android/res/layout/main.xml
  26. 4 0
      examples/HelloFlow/proj.android/res/values/strings.xml
  27. 8 0
      examples/HelloFlow/proj.android/src/org/oxygine/HelloFlow/MainActivity.java
  28. 22 0
      examples/HelloFlow/proj.cmake/CMakeLists.txt
  29. 16 0
      examples/HelloFlow/proj.cmake/run.sh
  30. 33 0
      examples/HelloFlow/proj.emscripten/CMakeLists.txt
  31. 7 0
      examples/HelloFlow/proj.emscripten/build.bat
  32. 7 0
      examples/HelloFlow/proj.emscripten/build_release.bat
  33. 53 0
      examples/HelloFlow/proj.ios/HelloFlow/HelloFlow_ios-Info.plist
  34. 68 0
      examples/HelloFlow/proj.ios/HelloFlow/Images.xcassets/AppIcon.appiconset/Contents.json
  35. 49 0
      examples/HelloFlow/proj.ios/HelloFlow/Images.xcassets/LaunchImage.launchimage/Contents.json
  36. 51 0
      examples/HelloFlow/proj.ios/HelloFlow/LaunchImage.launchimage/Contents.json
  37. 28 0
      examples/HelloFlow/proj.ios/HelloFlow/LaunchScreen.storyboard
  38. 479 0
      examples/HelloFlow/proj.ios/HelloFlow_ios.xcodeproj/project.pbxproj
  39. 58 0
      examples/HelloFlow/proj.macosx/HelloFlow/Images.xcassets/AppIcon.appiconset/Contents.json
  40. 34 0
      examples/HelloFlow/proj.macosx/HelloFlow_macosx-Info.plist
  41. 491 0
      examples/HelloFlow/proj.macosx/HelloFlow_macosx.xcodeproj/project.pbxproj
  42. 48 0
      examples/HelloFlow/proj.win32/HelloFlow.sln
  43. 128 0
      examples/HelloFlow/proj.win32/HelloFlow.vcxproj
  44. 51 0
      examples/HelloFlow/proj.win32/HelloFlow.vcxproj.filters
  45. 153 0
      examples/HelloFlow/src/entry_point.cpp
  46. 108 0
      examples/HelloFlow/src/example.cpp
  47. 27 0
      examples/HelloFlow/src/example.h
  48. 192 0
      src/Scene.cpp
  49. 153 0
      src/Scene.h
  50. 379 0
      src/Transition.cpp
  51. 103 0
      src/Transition.h
  52. 255 0
      src/flow.cpp
  53. 66 0
      src/flow.h

+ 22 - 27
.gitignore

@@ -1,28 +1,23 @@
 # Compiled Object files
-*.slo
-*.lo
-*.o
-*.obj
-
-# Precompiled Headers
-*.gch
-*.pch
-
-# Compiled Dynamic libraries
-*.so
-*.dylib
-*.dll
-
-# Fortran module files
-*.mod
-
-# Compiled Static libraries
-*.lai
-*.la
-*.a
-*.lib
-
-# Executables
-*.exe
-*.out
-*.app
+examples/example1/build_helloworld_vc10
+examples/example2/build_example2_vc10
+examples/example1/build_example1_vc10
+examples/example1/build_example1_vc11
+examples/example2/build_example2_vc11
+examples/build/
+examples/embuild/
+examples/example2/build/
+examples/example1/proj.cmake/build
+examples/example2/proj.cmake/build/
+*/proj.emscripten/build/
+data.js
+examples/HelloFlow/proj.emscripten/build_release/
+examples/HelloFlow/proj.android/bin/
+examples/HelloFlow/proj.android/gen/
+examples/HelloFlow/proj.android/obj/
+examples/HelloFlow/proj.android/libs/
+examples/HelloFlow/proj.win32/Debug_v*
+*.opensdf
+*.sdf
+examples/HelloFlow/proj.win32/Release_v*
+examples/HelloFlow/proj.cmake/build/

+ 23 - 0
.hgignore

@@ -0,0 +1,23 @@
+syntax: glob
+examples/example1/build_helloworld_vc10
+examples/example2/build_example2_vc10
+examples/example1/build_example1_vc10
+examples/example1/build_example1_vc11
+examples/example2/build_example2_vc11
+examples/build/
+examples/embuild/
+examples/example2/build/
+examples/example1/proj.cmake/build
+examples/example2/proj.cmake/build/
+*/proj.emscripten/build/
+data.js
+examples/HelloFlow/proj.emscripten/build_release/
+examples/HelloFlow/proj.android/bin/
+examples/HelloFlow/proj.android/gen/
+examples/HelloFlow/proj.android/obj/
+examples/HelloFlow/proj.android/libs/
+examples/HelloFlow/proj.win32/Debug_v*
+*.opensdf
+*.sdf
+examples/HelloFlow/proj.win32/Release_v*
+examples/HelloFlow/proj.cmake/build/

+ 19 - 0
Android.mk

@@ -0,0 +1,19 @@
+LOCAL_PATH := $(call my-dir)
+
+include $(CLEAR_VARS)
+
+LOCAL_MODULE := oxygine-flow_static
+LOCAL_MODULE_FILENAME := liboxygine-flow
+
+LOCAL_C_INCLUDES := $(LOCAL_PATH)/../oxygine-framework/oxygine/src/ \
+					$(LOCAL_PATH)/../SDL/include \
+
+
+LOCAL_SRC_FILES :=  src/flow.cpp \
+					src/Transition.cpp \
+					src/Scene.cpp \
+
+
+LOCAL_EXPORT_C_INCLUDES := $(LOCAL_PATH)/src/
+
+include $(BUILD_STATIC_LIBRARY)

+ 16 - 0
CMakeLists.txt

@@ -0,0 +1,16 @@
+cmake_minimum_required (VERSION 2.6)
+project (OXYGINE_FLOW)
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+
+set(OXYGINE_FLOW_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/src)
+add_library(oxygine-flow STATIC 
+	src/Scene.cpp 
+	src/Scene.h
+	src/flow.cpp 
+	src/flow.h
+	src/Transition.cpp 
+	src/Transition.h
+)
+
+set(OXYGINE_FLOW_INCLUDE_DIRS ${OXYGINE_FLOW_INCLUDE_DIRS} PARENT_SCOPE)

+ 0 - 0
examples/HelloFlow/data/.empty


+ 32 - 0
examples/HelloFlow/proj.android/AndroidManifest.xml

@@ -0,0 +1,32 @@
+<?xml version="1.0" encoding="utf-8"?>
+<manifest xmlns:android="http://schemas.android.com/apk/res/android"
+      package="org.oxygine.HelloFlow"
+      android:versionCode="1"
+      android:versionName="1.0"
+      android:installLocation="auto">
+
+    <application android:label="@string/app_name"
+                 android:icon="@drawable/ic_launcher"
+                 android:allowBackup="true"
+                 android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+                 android:hardwareAccelerated="true" >
+
+        <activity android:name="org.oxygine.HelloFlow.MainActivity"
+                  android:label="@string/app_name"
+                  android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
+                  android:configChanges="locale|orientation|keyboardHidden" 
+                  android:screenOrientation="landscape">
+
+            <intent-filter>
+                <action android:name="android.intent.action.MAIN" />
+                <category android:name="android.intent.category.LAUNCHER" />
+            </intent-filter>
+        </activity>
+    </application>
+
+    <uses-sdk android:minSdkVersion="10" android:targetSdkVersion="16" />
+
+    <!-- OpenGL ES 2.0 -->
+    <uses-feature android:glEsVersion="0x00020000" /> 
+
+</manifest> 

+ 18 - 0
examples/HelloFlow/proj.android/ant.properties

@@ -0,0 +1,18 @@
+# This file is used to override default values used by the Ant build system.
+#
+# This file must be checked into Version Control Systems, as it is
+# integral to the build system of your project.
+
+# This file is only used by the Ant script.
+
+# You can use this to override default values such as
+#  'source.dir' for the location of your java source folder and
+#  'out.dir' for the location of your output folder.
+
+# You can also use it define how the release builds are signed by declaring
+# the following properties:
+#  'key.store' for the location of your keystore and
+#  'key.alias' for the name of the key to use.
+# The password will be asked during the build when you use the 'release' target.
+
+asset.dir=../data

+ 1 - 0
examples/HelloFlow/proj.android/ant_debug.bat

@@ -0,0 +1 @@
+ant debug

+ 2 - 0
examples/HelloFlow/proj.android/ant_debug.sh

@@ -0,0 +1,2 @@
+#!/bin/bash
+ant debug

+ 3 - 0
examples/HelloFlow/proj.android/build-run.bat

@@ -0,0 +1,3 @@
+call build
+call ant_debug
+call install

+ 4 - 0
examples/HelloFlow/proj.android/build-run.sh

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

+ 1 - 0
examples/HelloFlow/proj.android/build.bat

@@ -0,0 +1 @@
+ndk-build NDK_MODULE_PATH=../../../../ %*

+ 2 - 0
examples/HelloFlow/proj.android/build.sh

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

+ 93 - 0
examples/HelloFlow/proj.android/build.xml

@@ -0,0 +1,93 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- This should be changed to the name of your project -->
+<project name="HelloFlow" default="help">
+
+    <!-- The local.properties file is created and updated by the 'android' tool.
+         It contains the path to the SDK. It should *NOT* be checked into
+         Version Control Systems. -->
+    <property file="local.properties" />
+
+    <!-- The ant.properties file can be created by you. It is only edited by the
+         'android' tool to add properties to it.
+         This is the place to change some Ant specific build properties.
+         Here are some properties you may want to change/update:
+
+         source.dir
+             The name of the source directory. Default is 'src'.
+         out.dir
+             The name of the output directory. Default is 'bin'.
+
+         For other overridable properties, look at the beginning of the rules
+         files in the SDK, at tools/ant/build.xml
+
+         Properties related to the SDK location or the project target should
+         be updated using the 'android' tool with the 'update' action.
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems.
+
+         -->
+    <property file="ant.properties" />
+
+    <!-- if sdk.dir was not set from one of the property file, then
+         get it from the ANDROID_HOME env var.
+         This must be done before we load project.properties since
+         the proguard config can use sdk.dir -->
+    <property environment="env" />
+    <condition property="sdk.dir" value="${env.ANDROID_HOME}">
+        <isset property="env.ANDROID_HOME" />
+    </condition>
+
+    <!-- The project.properties file is created and updated by the 'android'
+         tool, as well as ADT.
+
+         This contains project specific properties such as project target, and library
+         dependencies. Lower level build properties are stored in ant.properties
+         (or in .classpath for Eclipse projects).
+
+         This file is an integral part of the build system for your
+         application and should be checked into Version Control Systems. -->
+    <loadproperties srcFile="project.properties" />
+
+    <!-- quick check on sdk.dir -->
+    <fail
+            message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through the ANDROID_HOME environment variable."
+            unless="sdk.dir"
+    />
+
+    <!--
+        Import per project custom build rules if present at the root of the project.
+        This is the place to put custom intermediary targets such as:
+            -pre-build
+            -pre-compile
+            -post-compile (This is typically used for code obfuscation.
+                           Compiled code location: ${out.classes.absolute.dir}
+                           If this is not done in place, override ${out.dex.input.absolute.dir})
+            -post-package
+            -post-build
+            -pre-clean
+    -->
+    <import file="custom_rules.xml" optional="true" />
+
+    <!-- Import the actual build file.
+
+         To customize existing targets, there are two options:
+         - Customize only one target:
+             - copy/paste the target into this file, *before* the
+               <import> task.
+             - customize it to your needs.
+         - Customize the whole content of build.xml
+             - copy/paste the content of the rules files (minus the top node)
+               into this file, replacing the <import> task.
+             - customize to your needs.
+
+         ***********************
+         ****** IMPORTANT ******
+         ***********************
+         In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
+         in order to avoid having your file be overridden by tools such as "android update project"
+    -->
+    <!-- version-tag: 1 -->
+    <import file="${sdk.dir}/tools/ant/build.xml" />
+
+</project>

+ 2 - 0
examples/HelloFlow/proj.android/install.bat

@@ -0,0 +1,2 @@
+adb install -r bin/HelloFlow-debug.apk
+adb shell am start -n org.oxygine.HelloFlow/org.oxygine.HelloFlow.MainActivity

+ 3 - 0
examples/HelloFlow/proj.android/install.sh

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

+ 1 - 0
examples/HelloFlow/proj.android/jni/Android.mk

@@ -0,0 +1 @@
+include $(call all-subdir-makefiles)

+ 5 - 0
examples/HelloFlow/proj.android/jni/Application.mk

@@ -0,0 +1,5 @@
+APP_STL := gnustl_static
+APP_CPPFLAGS += -fexceptions
+APP_CPPFLAGS += -frtti
+APP_CPPFLAGS += -std=c++11
+APP_ABI := armeabi-v7a

+ 20 - 0
examples/HelloFlow/proj.android/jni/src/Android.mk

@@ -0,0 +1,20 @@
+LOCAL_PATH := $(call my-dir)
+include $(CLEAR_VARS)
+
+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 
+
+
+LOCAL_STATIC_LIBRARIES := oxygine-framework_static oxygine-flow_static
+LOCAL_SHARED_LIBRARIES := SDL2
+
+include $(BUILD_SHARED_LIBRARY)
+
+
+#import from NDK_MODULE_PATH defined in build.cmd
+$(call import-module, oxygine-framework)
+$(call import-module, oxygine-flow)

+ 15 - 0
examples/HelloFlow/proj.android/project.properties

@@ -0,0 +1,15 @@
+# This file is automatically generated by Android Tools.
+# Do not modify this file -- YOUR CHANGES WILL BE ERASED!
+#
+# This file must be checked in Version Control Systems.
+#
+# To customize properties used by the Ant build system edit
+# "ant.properties", and override values to adapt the script to your
+# project structure.
+#
+# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home):
+#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt
+
+# Project target.
+target=android-16
+android.library.reference.1=../../../..//oxygine-framework/oxygine/SDL/android/lib

BIN
examples/HelloFlow/proj.android/res/drawable-hdpi/ic_launcher.png


BIN
examples/HelloFlow/proj.android/res/drawable-mdpi/ic_launcher.png


BIN
examples/HelloFlow/proj.android/res/drawable-xhdpi/ic_launcher.png


BIN
examples/HelloFlow/proj.android/res/drawable-xxhdpi/ic_launcher.png


+ 13 - 0
examples/HelloFlow/proj.android/res/layout/main.xml

@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="utf-8"?>
+<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
+    android:orientation="vertical"
+    android:layout_width="fill_parent"
+    android:layout_height="fill_parent"
+    >
+<TextView  
+    android:layout_width="fill_parent" 
+    android:layout_height="wrap_content" 
+    android:text="Hello World, SDLActivity"
+    />
+</LinearLayout>
+

+ 4 - 0
examples/HelloFlow/proj.android/res/values/strings.xml

@@ -0,0 +1,4 @@
+<?xml version="1.0" encoding="utf-8"?>
+<resources>
+    <string name="app_name">HelloFlow</string>
+</resources>

+ 8 - 0
examples/HelloFlow/proj.android/src/org/oxygine/HelloFlow/MainActivity.java

@@ -0,0 +1,8 @@
+package org.oxygine.HelloFlow;
+
+import org.oxygine.lib.OxygineActivity;
+
+public class MainActivity extends OxygineActivity
+{
+
+}

+ 22 - 0
examples/HelloFlow/proj.cmake/CMakeLists.txt

@@ -0,0 +1,22 @@
+cmake_minimum_required (VERSION 2.6)
+project (HELLOFLOW)
+
+add_subdirectory(../../../../oxygine-framework oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+add_subdirectory(../../../ oxygine-flow)
+include_directories(${OXYGINE_FLOW_INCLUDE_DIRS})
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
+add_executable(HelloFlow
+	../src/entry_point.cpp
+	../src/example.h 
+	../src/example.cpp)
+
+if (WIN32) #disable console mode for VC++
+	set_target_properties(HelloFlow PROPERTIES WIN32_EXECUTABLE TRUE)
+endif(WIN32)
+
+target_link_libraries(HelloFlow ${OXYGINE_CORE_LIBS} oxygine-flow)

+ 16 - 0
examples/HelloFlow/proj.cmake/run.sh

@@ -0,0 +1,16 @@
+#!/bin/bash
+
+mkdir build
+cd build
+
+#generate cmake project in the "build" folder
+cmake ..
+
+#build it
+make
+
+#move to working data folder with resources
+cd ../../data
+
+#run executable
+./../proj.cmake/build/HelloFlow

+ 33 - 0
examples/HelloFlow/proj.emscripten/CMakeLists.txt

@@ -0,0 +1,33 @@
+cmake_minimum_required (VERSION 2.6)
+project (HelloFlow)
+
+
+add_subdirectory(../../../../oxygine-framework oxygine-framework)
+add_definitions(${OXYGINE_DEFINITIONS})
+include_directories(${OXYGINE_INCLUDE_DIRS})
+link_directories(${OXYGINE_LIBRARY_DIRS})
+
+add_subdirectory(../../../ oxygine-flow)
+include_directories(${OXYGINE_FLOW_INCLUDE_DIRS})
+
+SET(CMAKE_EXECUTABLE_SUFFIX ".html")
+
+set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11 -Wno-warn-absolute-paths")
+
+add_executable(HelloFlow
+	../src/entry_point.cpp
+	../src/example.h 
+	../src/example.cpp)
+
+if (CMAKE_BUILD_TYPE STREQUAL Debug)
+	SET(linkFlags "-g4 ")
+else() # Either MinSizeRel, RelWithDebInfo or Release, all which run with optimizations enabled.
+	SET(linkFlags "-O2 ")
+endif()
+
+set(linkFlags "${linkFlags} -s NO_EXIT_RUNTIME=1 -s FULL_ES2=1 -s WARN_ON_UNDEFINED_SYMBOLS=1 --memory-init-file 0 -Wno-warn-absolute-paths -s TOTAL_MEMORY=64435456")
+
+set_target_properties(HelloFlow PROPERTIES LINK_FLAGS "${linkFlags}")
+
+target_link_libraries(HelloFlow ${OXYGINE_CORE_LIBS} oxygine-flow)
+em_link_pre_js(HelloFlow ${CMAKE_CURRENT_SOURCE_DIR}/data.js)

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

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

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

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

+ 53 - 0
examples/HelloFlow/proj.ios/HelloFlow/HelloFlow_ios-Info.plist

@@ -0,0 +1,53 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleDisplayName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIcons</key>
+	<dict/>
+	<key>CFBundleIcons~ipad</key>
+	<dict/>
+	<key>CFBundleIdentifier</key>
+	<string>oxygine.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1.0</string>
+	<key>LSRequiresIPhoneOS</key>
+	<true/>
+	<key>UILaunchStoryboardName</key>
+	<string>LaunchScreen</string>
+	<key>UIRequiredDeviceCapabilities</key>
+	<array>
+		<string>armv7</string>
+	</array>
+	<key>UIStatusBarHidden</key>
+	<true/>
+	<key>UISupportedInterfaceOrientations</key>
+	<array>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+	</array>
+	<key>UISupportedInterfaceOrientations~ipad</key>
+	<array>
+		<string>UIInterfaceOrientationPortrait</string>
+		<string>UIInterfaceOrientationPortraitUpsideDown</string>
+		<string>UIInterfaceOrientationLandscapeLeft</string>
+		<string>UIInterfaceOrientationLandscapeRight</string>
+	</array>
+	<key>UIViewControllerBasedStatusBarAppearance</key>
+	<false/>
+</dict>
+</plist>

+ 68 - 0
examples/HelloFlow/proj.ios/HelloFlow/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,68 @@
+{
+  "images" : [
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "29x29",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "40x40",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "iphone",
+      "size" : "60x60",
+      "scale" : "3x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "29x29",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "40x40",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "ipad",
+      "size" : "76x76",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 49 - 0
examples/HelloFlow/proj.ios/HelloFlow/Images.xcassets/LaunchImage.launchimage/Contents.json

@@ -0,0 +1,49 @@
+{
+  "images" : [
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "minimum-system-version" : "7.0",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "minimum-system-version" : "7.0",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "minimum-system-version" : "7.0",
+      "extent" : "full-screen",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "minimum-system-version" : "7.0",
+      "subtype" : "retina4",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "minimum-system-version" : "7.0",
+      "extent" : "full-screen",
+      "scale" : "1x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 51 - 0
examples/HelloFlow/proj.ios/HelloFlow/LaunchImage.launchimage/Contents.json

@@ -0,0 +1,51 @@
+{
+  "images" : [
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "iphone",
+      "subtype" : "retina4",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "1x"
+    },
+    {
+      "orientation" : "portrait",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    },
+    {
+      "orientation" : "landscape",
+      "idiom" : "ipad",
+      "extent" : "full-screen",
+      "minimum-system-version" : "7.0",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 28 - 0
examples/HelloFlow/proj.ios/HelloFlow/LaunchScreen.storyboard

@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.Storyboard.XIB" version="3.0" toolsVersion="8191" systemVersion="14F27" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES" initialViewController="01J-lp-oVM">
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
+    </dependencies>
+    <scenes>
+        <!--View Controller-->
+        <scene sceneID="EHf-IW-A2E">
+            <objects>
+                <viewController id="01J-lp-oVM" sceneMemberID="viewController">
+                    <layoutGuides>
+                        <viewControllerLayoutGuide type="top" id="Llm-lL-Icb"/>
+                        <viewControllerLayoutGuide type="bottom" id="xb3-aO-Qok"/>
+                    </layoutGuides>
+                    <view key="view" contentMode="scaleToFill" id="Ze5-6b-2t3">
+                        <rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
+                        <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+                        <animations/>
+                        <color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
+                    </view>
+                </viewController>
+                <placeholder placeholderIdentifier="IBFirstResponder" id="iYj-Kq-Ea1" userLabel="First Responder" sceneMemberID="firstResponder"/>
+            </objects>
+            <point key="canvasLocation" x="53" y="375"/>
+        </scene>
+    </scenes>
+</document>

+ 479 - 0
examples/HelloFlow/proj.ios/HelloFlow_ios.xcodeproj/project.pbxproj

@@ -0,0 +1,479 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	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 */; };
+		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 */; };
+		04998EF017F8ADD4003441C3 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EED17F8ADD4003441C3 /* CoreGraphics.framework */; };
+		04998EF717F8B6F3003441C3 /* libpng.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04998EF517F8B6F3003441C3 /* libpng.a */; };
+		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 /* entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* entry_point.cpp */; };
+		920CC7E21C3F38E0005B261E /* flow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 920CC7DC1C3F38E0005B261E /* flow.cpp */; };
+		920CC7E31C3F38E0005B261E /* Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 920CC7DE1C3F38E0005B261E /* Scene.cpp */; };
+		920CC7E41C3F38E0005B261E /* Transition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 920CC7E01C3F38E0005B261E /* Transition.cpp */; };
+		9223FE7F1C2D913D000B1FDA /* GameController.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 9223FE7E1C2D913D000B1FDA /* GameController.framework */; };
+		922B9F8F1BBB2FB100B1401E /* (null) in Resources */ = {isa = PBXBuildFile; };
+		DA49ED8903C628BA578C8670 /* example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* example.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		04998D3417F8A96E003441C3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04998D2F17F8A96E003441C3 /* SDL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = FD6526630DE8FCCB002AD96B;
+			remoteInfo = libSDL;
+		};
+		04998D3717F8A982003441C3 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04998D2F17F8A96E003441C3 /* SDL.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = FD6526620DE8FCCB002AD96B;
+			remoteInfo = libSDL;
+		};
+		049B52AC1871EBBA00EF3C66 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04998D3917F8A9AA003441C3 /* oxygine_ios.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = C3E86F4C16EBC8A500052915;
+			remoteInfo = oxygine_ios;
+		};
+		049B52AF1871EBD100EF3C66 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04998D3917F8A9AA003441C3 /* oxygine_ios.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = C3E86F4B16EBC8A500052915;
+			remoteInfo = oxygine_ios;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		048AD0AD197D24AB001963EF /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = System/Library/Frameworks/CoreMotion.framework; sourceTree = SDKROOT; };
+		04998CEC17F8A933003441C3 /* HelloFlow_ios.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloFlow_ios.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		04998D2F17F8A96E003441C3 /* SDL.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = SDL.xcodeproj; path = "../../../..//SDL/Xcode-iOS/SDL/SDL.xcodeproj"; sourceTree = "<group>"; };
+		04998D3917F8A9AA003441C3 /* oxygine_ios.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = oxygine_ios.xcodeproj; path = "../../../../oxygine-framework//oxygine/SDL/ios/oxygine/oxygine_ios.xcodeproj"; sourceTree = "<group>"; };
+		04998EE117F8ADB4003441C3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+		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; };
+		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; };
+		04998EED17F8ADD4003441C3 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; };
+		04998EF517F8B6F3003441C3 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../../../../oxygine-framework//oxygine/third_party/ios/libraries/libpng.a"; sourceTree = "<group>"; };
+		04998EF617F8B6F3003441C3 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../../oxygine-framework//oxygine/third_party/ios/libraries/libjpeg.a"; sourceTree = "<group>"; };
+		04E9AD3E1876FE84006A7317 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloFlow/Images.xcassets; sourceTree = "<group>"; };
+		0BF9628FC8D38F9748F0CDEB /* example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		360377333740D8A2FD15BBE6 /* entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		920CC7DC1C3F38E0005B261E /* flow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = flow.cpp; path = ../../../src/flow.cpp; sourceTree = "<group>"; };
+		920CC7DD1C3F38E0005B261E /* flow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = flow.h; path = ../../../src/flow.h; sourceTree = "<group>"; };
+		920CC7DE1C3F38E0005B261E /* Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../../../src/Scene.cpp; sourceTree = "<group>"; };
+		920CC7DF1C3F38E0005B261E /* Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../../../src/Scene.h; sourceTree = "<group>"; };
+		920CC7E01C3F38E0005B261E /* Transition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Transition.cpp; path = ../../../src/Transition.cpp; sourceTree = "<group>"; };
+		920CC7E11C3F38E0005B261E /* Transition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Transition.h; path = ../../../src/Transition.h; sourceTree = "<group>"; };
+		9223FE7E1C2D913D000B1FDA /* GameController.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = GameController.framework; path = System/Library/Frameworks/GameController.framework; sourceTree = SDKROOT; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		04998CE917F8A933003441C3 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				9223FE7F1C2D913D000B1FDA /* GameController.framework in Frameworks */,
+				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 */,
+				04998EF817F8B6F3003441C3 /* libjpeg.a in Frameworks */,
+				04998EEE17F8ADD4003441C3 /* UIKit.framework in Frameworks */,
+				04998EE817F8ADB4003441C3 /* AudioToolbox.framework in Frameworks */,
+				04998EE717F8ADB4003441C3 /* QuartzCore.framework in Frameworks */,
+				04998EEA17F8ADB4003441C3 /* OpenGLES.framework in Frameworks */,
+				04998EF717F8B6F3003441C3 /* libpng.a in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		045D531C17F8BD5E00CC2C64 /* dependencies */ = {
+			isa = PBXGroup;
+			children = (
+				04998EE117F8ADB4003441C3 /* libz.dylib */,
+				04998EF617F8B6F3003441C3 /* libjpeg.a */,
+				04998EF517F8B6F3003441C3 /* libpng.a */,
+			);
+			name = dependencies;
+			sourceTree = "<group>";
+		};
+		04998CE317F8A933003441C3 = {
+			isa = PBXGroup;
+			children = (
+				045D531C17F8BD5E00CC2C64 /* dependencies */,
+				04998D3917F8A9AA003441C3 /* oxygine_ios.xcodeproj */,
+				04998D2F17F8A96E003441C3 /* SDL.xcodeproj */,
+				04998D4417F8A9ED003441C3 /* src */,
+				04E9AD3E1876FE84006A7317 /* Images.xcassets */,
+				04998CF617F8A933003441C3 /* Supporting Files */,
+				04998CEE17F8A933003441C3 /* Frameworks */,
+				04998CED17F8A933003441C3 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		04998CED17F8A933003441C3 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				04998CEC17F8A933003441C3 /* HelloFlow_ios.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		04998CEE17F8A933003441C3 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				9223FE7E1C2D913D000B1FDA /* GameController.framework */,
+				04998EEB17F8ADD4003441C3 /* UIKit.framework */,
+				048AD0AD197D24AB001963EF /* CoreMotion.framework */,
+				04998EEC17F8ADD4003441C3 /* Foundation.framework */,
+				04998EED17F8ADD4003441C3 /* CoreGraphics.framework */,
+				04998EE217F8ADB4003441C3 /* QuartzCore.framework */,
+				04998EE317F8ADB4003441C3 /* AudioToolbox.framework */,
+				04998EE417F8ADB4003441C3 /* CoreAudio.framework */,
+				04998EE517F8ADB4003441C3 /* OpenGLES.framework */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		04998CF617F8A933003441C3 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		04998D3017F8A96E003441C3 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				04998D3517F8A96E003441C3 /* libSDL2.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		04998D4417F8A9ED003441C3 /* src */ = {
+			isa = PBXGroup;
+			children = (
+				920CC7DB1C3F38D4005B261E /* flow */,
+				360377333740D8A2FD15BBE6 /* entry_point.cpp */,
+				0BF9628FC8D38F9748F0CDEB /* example.cpp */,
+				4DA100C319512824B7570663 /* example.h */,
+			);
+			name = src;
+			sourceTree = "<group>";
+		};
+		049B52A91871EBBA00EF3C66 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				049B52AD1871EBBA00EF3C66 /* liboxygine_ios.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		920CC7DB1C3F38D4005B261E /* flow */ = {
+			isa = PBXGroup;
+			children = (
+				920CC7DC1C3F38E0005B261E /* flow.cpp */,
+				920CC7DD1C3F38E0005B261E /* flow.h */,
+				920CC7DE1C3F38E0005B261E /* Scene.cpp */,
+				920CC7DF1C3F38E0005B261E /* Scene.h */,
+				920CC7E01C3F38E0005B261E /* Transition.cpp */,
+				920CC7E11C3F38E0005B261E /* Transition.h */,
+			);
+			name = flow;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		04998CEB17F8A933003441C3 /* HelloFlow_ios */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 04998D2117F8A933003441C3 /* Build configuration list for PBXNativeTarget "HelloFlow_ios" */;
+			buildPhases = (
+				04998CE817F8A933003441C3 /* Sources */,
+				04998CE917F8A933003441C3 /* Frameworks */,
+				04998CEA17F8A933003441C3 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				04998D3817F8A982003441C3 /* PBXTargetDependency */,
+				049B52B01871EBD100EF3C66 /* PBXTargetDependency */,
+			);
+			name = HelloFlow_ios;
+			productName = HelloFlow;
+			productReference = 04998CEC17F8A933003441C3 /* HelloFlow_ios.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		04998CE417F8A933003441C3 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0510;
+				ORGANIZATIONNAME = Mac;
+			};
+			buildConfigurationList = 04998CE717F8A933003441C3 /* Build configuration list for PBXProject "HelloFlow_ios" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 04998CE317F8A933003441C3;
+			productRefGroup = 04998CED17F8A933003441C3 /* Products */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 049B52A91871EBBA00EF3C66 /* Products */;
+					ProjectRef = 04998D3917F8A9AA003441C3 /* oxygine_ios.xcodeproj */;
+				},
+				{
+					ProductGroup = 04998D3017F8A96E003441C3 /* Products */;
+					ProjectRef = 04998D2F17F8A96E003441C3 /* SDL.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				04998CEB17F8A933003441C3 /* HelloFlow_ios */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		04998D3517F8A96E003441C3 /* libSDL2.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libSDL2.a;
+			remoteRef = 04998D3417F8A96E003441C3 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		049B52AD1871EBBA00EF3C66 /* liboxygine_ios.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = liboxygine_ios.a;
+			remoteRef = 049B52AC1871EBBA00EF3C66 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		04998CEA17F8A933003441C3 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				04E9AD3F1876FE84006A7317 /* Images.xcassets in Resources */,
+				922B9F8F1BBB2FB100B1401E /* (null) in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		04998CE817F8A933003441C3 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				920CC7E31C3F38E0005B261E /* Scene.cpp in Sources */,
+				920CC7E41C3F38E0005B261E /* Transition.cpp in Sources */,
+				2DC477AC10D6C07B3FE008F6 /* entry_point.cpp in Sources */,
+				DA49ED8903C628BA578C8670 /* example.cpp in Sources */,
+				920CC7E21C3F38E0005B261E /* flow.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		04998D3817F8A982003441C3 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = libSDL;
+			targetProxy = 04998D3717F8A982003441C3 /* PBXContainerItemProxy */;
+		};
+		049B52B01871EBD100EF3C66 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = oxygine_ios;
+			targetProxy = 049B52AF1871EBD100EF3C66 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+		04998D1F17F8A933003441C3 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COMPRESS_PNG_FILES = NO;
+				COPY_PHASE_STRIP = NO;
+				ENABLE_BITCODE = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				ONLY_ACTIVE_ARCH = NO;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				USER_HEADER_SEARCH_PATHS = "../../../../oxygine-framework//oxygine/src ../../../..//SDL/include ../../../../oxygine-flow/src";
+			};
+			name = Debug;
+		};
+		04998D2017F8A933003441C3 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_MODULES = YES;
+				CLANG_ENABLE_OBJC_ARC = YES;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				COMPRESS_PNG_FILES = NO;
+				COPY_PHASE_STRIP = YES;
+				ENABLE_BITCODE = NO;
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				IPHONEOS_DEPLOYMENT_TARGET = 7.0;
+				SDKROOT = iphoneos;
+				TARGETED_DEVICE_FAMILY = "1,2";
+				USER_HEADER_SEARCH_PATHS = "../../../../oxygine-framework//oxygine/src ../../../..//SDL/include ../../../../oxygine-flow/src";
+				VALIDATE_PRODUCT = YES;
+			};
+			name = Release;
+		};
+		04998D2217F8A933003441C3 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "HelloFlow/HelloFlow_ios-Prefix.pch";
+				GCC_WARN_UNUSED_VALUE = YES;
+				GCC_WARN_UNUSED_VARIABLE = NO;
+				INFOPLIST_FILE = "HelloFlow/HelloFlow_ios-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../../../oxygine-framework//oxygine/third_party/ios/libraries",
+				);
+				ONLY_ACTIVE_ARCH = YES;
+				PRODUCT_NAME = HelloFlow_ios;
+				PROVISIONING_PROFILE = "";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		04998D2317F8A933003441C3 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				ASSETCATALOG_COMPILER_LAUNCHIMAGE_NAME = LaunchImage;
+				CODE_SIGN_IDENTITY = "iPhone Developer";
+				"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "HelloFlow/HelloFlow_ios-Prefix.pch";
+				GCC_WARN_UNUSED_VALUE = YES;
+				GCC_WARN_UNUSED_VARIABLE = NO;
+				INFOPLIST_FILE = "HelloFlow/HelloFlow_ios-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../../../oxygine-framework//oxygine/third_party/ios/libraries",
+				);
+				ONLY_ACTIVE_ARCH = NO;
+				PRODUCT_NAME = HelloFlow_ios;
+				PROVISIONING_PROFILE = "";
+				TARGETED_DEVICE_FAMILY = "1,2";
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		04998CE717F8A933003441C3 /* Build configuration list for PBXProject "HelloFlow_ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				04998D1F17F8A933003441C3 /* Debug */,
+				04998D2017F8A933003441C3 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		04998D2117F8A933003441C3 /* Build configuration list for PBXNativeTarget "HelloFlow_ios" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				04998D2217F8A933003441C3 /* Debug */,
+				04998D2317F8A933003441C3 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 04998CE417F8A933003441C3 /* Project object */;
+}

+ 58 - 0
examples/HelloFlow/proj.macosx/HelloFlow/Images.xcassets/AppIcon.appiconset/Contents.json

@@ -0,0 +1,58 @@
+{
+  "images" : [
+    {
+      "idiom" : "mac",
+      "size" : "16x16",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "16x16",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "32x32",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "32x32",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "128x128",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "128x128",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "256x256",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "256x256",
+      "scale" : "2x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "512x512",
+      "scale" : "1x"
+    },
+    {
+      "idiom" : "mac",
+      "size" : "512x512",
+      "scale" : "2x"
+    }
+  ],
+  "info" : {
+    "version" : 1,
+    "author" : "xcode"
+  }
+}

+ 34 - 0
examples/HelloFlow/proj.macosx/HelloFlow_macosx-Info.plist

@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+	<key>CFBundleDevelopmentRegion</key>
+	<string>en</string>
+	<key>CFBundleExecutable</key>
+	<string>${EXECUTABLE_NAME}</string>
+	<key>CFBundleIconFile</key>
+	<string></string>
+	<key>CFBundleIdentifier</key>
+	<string>oxygine.${PRODUCT_NAME:rfc1034identifier}</string>
+	<key>CFBundleInfoDictionaryVersion</key>
+	<string>6.0</string>
+	<key>CFBundleName</key>
+	<string>${PRODUCT_NAME}</string>
+	<key>CFBundlePackageType</key>
+	<string>APPL</string>
+	<key>CFBundleShortVersionString</key>
+	<string>1.0</string>
+	<key>CFBundleSignature</key>
+	<string>????</string>
+	<key>CFBundleVersion</key>
+	<string>1</string>
+	<key>LSMinimumSystemVersion</key>
+	<string>${MACOSX_DEPLOYMENT_TARGET}</string>
+	<key>NSHumanReadableCopyright</key>
+	<string>Copyright © 2013 oxygine. All rights reserved.</string>
+	<key>NSMainNibFile</key>
+	<string>MainMenu</string>
+	<key>NSPrincipalClass</key>
+	<string>NSApplication</string>
+</dict>
+</plist>

+ 491 - 0
examples/HelloFlow/proj.macosx/HelloFlow_macosx.xcodeproj/project.pbxproj

@@ -0,0 +1,491 @@
+// !$*UTF8*$!
+{
+	archiveVersion = 1;
+	classes = {
+	};
+	objectVersion = 46;
+	objects = {
+
+/* Begin PBXBuildFile section */
+		04059FEA1872027500BA6557 /* SDL2.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04A57D861872012D0068B1E5 /* SDL2.framework */; };
+		04059FEB1872027B00BA6557 /* liboxygine_macosx.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04059FE41872026200BA6557 /* liboxygine_macosx.a */; };
+		04059FED187202A200BA6557 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 04059FEC187202A200BA6557 /* libz.dylib */; };
+		04059FEF187202AC00BA6557 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 04059FEE187202AC00BA6557 /* OpenGL.framework */; };
+		0405A00018720D2200BA6557 /* libjpeg.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 04059FF01872031A00BA6557 /* libjpeg.a */; };
+		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 /* entry_point.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 360377333740D8A2FD15BBE6 /* entry_point.cpp */; };
+		920CC7F31C3F3A6F005B261E /* flow.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 920CC7ED1C3F3A6F005B261E /* flow.cpp */; };
+		920CC7F41C3F3A6F005B261E /* Scene.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 920CC7EF1C3F3A6F005B261E /* Scene.cpp */; };
+		920CC7F51C3F3A6F005B261E /* Transition.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 920CC7F11C3F3A6F005B261E /* Transition.cpp */; };
+		DA49ED8903C628BA578C8670 /* example.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 0BF9628FC8D38F9748F0CDEB /* example.cpp */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+		04059FE31872026200BA6557 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = 049B52BB1871EDE900EF3C66;
+			remoteInfo = oxygine_macosx;
+		};
+		04059FE81872027200BA6557 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = 049B52BA1871EDE900EF3C66;
+			remoteInfo = oxygine_macosx;
+		};
+		04A57D851872012D0068B1E5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = BECDF66C0761BA81005FE872;
+			remoteInfo = Framework;
+		};
+		04A57D871872012D0068B1E5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = BECDF6B30761BA81005FE872;
+			remoteInfo = "Static Library";
+		};
+		04A57D891872012D0068B1E5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = DB31407717554B71006C0E22;
+			remoteInfo = "Shared Library";
+		};
+		04A57D8B1872012D0068B1E5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */;
+			proxyType = 2;
+			remoteGlobalIDString = BECDF6BE0761BA81005FE872;
+			remoteInfo = "Standard DMG";
+		};
+		04A57D8E187201EF0068B1E5 /* PBXContainerItemProxy */ = {
+			isa = PBXContainerItemProxy;
+			containerPortal = 04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */;
+			proxyType = 1;
+			remoteGlobalIDString = BECDF5FE0761BA81005FE872;
+			remoteInfo = Framework;
+		};
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXFileReference section */
+		04059FEC187202A200BA6557 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
+		04059FEE187202AC00BA6557 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; };
+		04059FF01872031A00BA6557 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../../oxygine-framework//oxygine/third_party/macosx/libraries/libjpeg.a"; sourceTree = "<group>"; };
+		04059FF11872031A00BA6557 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../../../../oxygine-framework//oxygine/third_party/macosx/libraries/libpng.a"; sourceTree = "<group>"; };
+		04059FF4187203A600BA6557 /* libjpeg.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libjpeg.a; path = "../../../../oxygine-framework//oxygine/third_party/ios/libraries/libjpeg.a"; sourceTree = "<group>"; };
+		04059FF5187203A600BA6557 /* libpng.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libpng.a; path = "../../../../oxygine-framework//oxygine/third_party/ios/libraries/libpng.a"; sourceTree = "<group>"; };
+		049B572E1871FBE900EF3C66 /* HelloFlow_macosx.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloFlow_macosx.app; sourceTree = BUILT_PRODUCTS_DIR; };
+		049B57311871FBE900EF3C66 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+		049B57341871FBE900EF3C66 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+		049B57351871FBE900EF3C66 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+		049B57361871FBE900EF3C66 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+		049B57391871FBE900EF3C66 /* HelloFlow_macosx-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "HelloFlow_macosx-Info.plist"; sourceTree = "<group>"; };
+		049B57491871FBE900EF3C66 /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Images.xcassets; path = HelloFlow/Images.xcassets; sourceTree = "<group>"; };
+		049B57501871FBE900EF3C66 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
+		04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = oxygine_macosx.xcodeproj; path = "../../../../oxygine-framework//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>"; };
+		0BF9628FC8D38F9748F0CDEB /* example.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = example.cpp; path = ../src/example.cpp; sourceTree = "<group>"; };
+		360377333740D8A2FD15BBE6 /* entry_point.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = entry_point.cpp; path = ../src/entry_point.cpp; sourceTree = "<group>"; };
+		4DA100C319512824B7570663 /* example.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = example.h; path = ../src/example.h; sourceTree = "<group>"; };
+		920CC7ED1C3F3A6F005B261E /* flow.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = flow.cpp; path = ../../../src/flow.cpp; sourceTree = "<group>"; };
+		920CC7EE1C3F3A6F005B261E /* flow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = flow.h; path = ../../../src/flow.h; sourceTree = "<group>"; };
+		920CC7EF1C3F3A6F005B261E /* Scene.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Scene.cpp; path = ../../../src/Scene.cpp; sourceTree = "<group>"; };
+		920CC7F01C3F3A6F005B261E /* Scene.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scene.h; path = ../../../src/Scene.h; sourceTree = "<group>"; };
+		920CC7F11C3F3A6F005B261E /* Transition.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Transition.cpp; path = ../../../src/Transition.cpp; sourceTree = "<group>"; };
+		920CC7F21C3F3A6F005B261E /* Transition.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Transition.h; path = ../../../src/Transition.h; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+		049B572B1871FBE900EF3C66 /* Frameworks */ = {
+			isa = PBXFrameworksBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				0405A00018720D2200BA6557 /* libjpeg.a in Frameworks */,
+				0405A00118720D2200BA6557 /* libpng.a in Frameworks */,
+				04059FEF187202AC00BA6557 /* OpenGL.framework in Frameworks */,
+				04059FED187202A200BA6557 /* libz.dylib in Frameworks */,
+				04059FEB1872027B00BA6557 /* liboxygine_macosx.a in Frameworks */,
+				04059FEA1872027500BA6557 /* SDL2.framework in Frameworks */,
+				049B57321871FBE900EF3C66 /* Cocoa.framework in Frameworks */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+		04059FE01872026200BA6557 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				04059FE41872026200BA6557 /* liboxygine_macosx.a */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		049B57251871FBE900EF3C66 = {
+			isa = PBXGroup;
+			children = (
+				049B57491871FBE900EF3C66 /* Images.xcassets */,
+				049B57381871FBE900EF3C66 /* Supporting Files */,
+				04A57D391871FF8B0068B1E5 /* src */,
+				04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */,
+				04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */,
+				049B57301871FBE900EF3C66 /* Frameworks */,
+				049B572F1871FBE900EF3C66 /* Products */,
+			);
+			sourceTree = "<group>";
+		};
+		049B572F1871FBE900EF3C66 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				049B572E1871FBE900EF3C66 /* HelloFlow_macosx.app */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		049B57301871FBE900EF3C66 /* Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				04059FF4187203A600BA6557 /* libjpeg.a */,
+				04059FF5187203A600BA6557 /* libpng.a */,
+				04059FF01872031A00BA6557 /* libjpeg.a */,
+				04059FF11872031A00BA6557 /* libpng.a */,
+				04059FEE187202AC00BA6557 /* OpenGL.framework */,
+				04059FEC187202A200BA6557 /* libz.dylib */,
+				049B57311871FBE900EF3C66 /* Cocoa.framework */,
+				049B57501871FBE900EF3C66 /* XCTest.framework */,
+				049B57331871FBE900EF3C66 /* Other Frameworks */,
+			);
+			name = Frameworks;
+			sourceTree = "<group>";
+		};
+		049B57331871FBE900EF3C66 /* Other Frameworks */ = {
+			isa = PBXGroup;
+			children = (
+				049B57341871FBE900EF3C66 /* AppKit.framework */,
+				049B57351871FBE900EF3C66 /* CoreData.framework */,
+				049B57361871FBE900EF3C66 /* Foundation.framework */,
+			);
+			name = "Other Frameworks";
+			sourceTree = "<group>";
+		};
+		049B57381871FBE900EF3C66 /* Supporting Files */ = {
+			isa = PBXGroup;
+			children = (
+				049B57391871FBE900EF3C66 /* HelloFlow_macosx-Info.plist */,
+			);
+			name = "Supporting Files";
+			sourceTree = "<group>";
+		};
+		04A57D391871FF8B0068B1E5 /* src */ = {
+			isa = PBXGroup;
+			children = (
+				920CC7E91C3F3A63005B261E /* flow */,
+				360377333740D8A2FD15BBE6 /* entry_point.cpp */,
+				0BF9628FC8D38F9748F0CDEB /* example.cpp */,
+				4DA100C319512824B7570663 /* example.h */,
+			);
+			name = src;
+			sourceTree = "<group>";
+		};
+		04A57D7F1872012A0068B1E5 /* Products */ = {
+			isa = PBXGroup;
+			children = (
+				04A57D861872012D0068B1E5 /* SDL2.framework */,
+				04A57D881872012D0068B1E5 /* libSDL2.a */,
+				04A57D8A1872012D0068B1E5 /* libSDL2.dylib */,
+				04A57D8C1872012D0068B1E5 /* Standard DMG */,
+			);
+			name = Products;
+			sourceTree = "<group>";
+		};
+		920CC7E91C3F3A63005B261E /* flow */ = {
+			isa = PBXGroup;
+			children = (
+				920CC7ED1C3F3A6F005B261E /* flow.cpp */,
+				920CC7EE1C3F3A6F005B261E /* flow.h */,
+				920CC7EF1C3F3A6F005B261E /* Scene.cpp */,
+				920CC7F01C3F3A6F005B261E /* Scene.h */,
+				920CC7F11C3F3A6F005B261E /* Transition.cpp */,
+				920CC7F21C3F3A6F005B261E /* Transition.h */,
+			);
+			name = flow;
+			sourceTree = "<group>";
+		};
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+		049B572D1871FBE900EF3C66 /* HelloFlow_macosx */ = {
+			isa = PBXNativeTarget;
+			buildConfigurationList = 049B575F1871FBE900EF3C66 /* Build configuration list for PBXNativeTarget "HelloFlow_macosx" */;
+			buildPhases = (
+				049B572A1871FBE900EF3C66 /* Sources */,
+				049B572B1871FBE900EF3C66 /* Frameworks */,
+				049B572C1871FBE900EF3C66 /* Resources */,
+			);
+			buildRules = (
+			);
+			dependencies = (
+				04059FE91872027200BA6557 /* PBXTargetDependency */,
+				04A57D8F187201EF0068B1E5 /* PBXTargetDependency */,
+			);
+			name = HelloFlow_macosx;
+			productName = HelloFlow;
+			productReference = 049B572E1871FBE900EF3C66 /* HelloFlow_macosx.app */;
+			productType = "com.apple.product-type.application";
+		};
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+		049B57261871FBE900EF3C66 /* Project object */ = {
+			isa = PBXProject;
+			attributes = {
+				LastUpgradeCheck = 0610;
+				ORGANIZATIONNAME = oxygine;
+			};
+			buildConfigurationList = 049B57291871FBE900EF3C66 /* Build configuration list for PBXProject "HelloFlow_macosx" */;
+			compatibilityVersion = "Xcode 3.2";
+			developmentRegion = English;
+			hasScannedForEncodings = 0;
+			knownRegions = (
+				en,
+				Base,
+			);
+			mainGroup = 049B57251871FBE900EF3C66;
+			productRefGroup = 049B572F1871FBE900EF3C66 /* Products */;
+			projectDirPath = "";
+			projectReferences = (
+				{
+					ProductGroup = 04059FE01872026200BA6557 /* Products */;
+					ProjectRef = 04A57D761871FFEB0068B1E5 /* oxygine_macosx.xcodeproj */;
+				},
+				{
+					ProductGroup = 04A57D7F1872012A0068B1E5 /* Products */;
+					ProjectRef = 04A57D7E1872012A0068B1E5 /* SDL.xcodeproj */;
+				},
+			);
+			projectRoot = "";
+			targets = (
+				049B572D1871FBE900EF3C66 /* HelloFlow_macosx */,
+			);
+		};
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+		04059FE41872026200BA6557 /* liboxygine_macosx.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = liboxygine_macosx.a;
+			remoteRef = 04059FE31872026200BA6557 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		04A57D861872012D0068B1E5 /* SDL2.framework */ = {
+			isa = PBXReferenceProxy;
+			fileType = wrapper.framework;
+			path = SDL2.framework;
+			remoteRef = 04A57D851872012D0068B1E5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		04A57D881872012D0068B1E5 /* libSDL2.a */ = {
+			isa = PBXReferenceProxy;
+			fileType = archive.ar;
+			path = libSDL2.a;
+			remoteRef = 04A57D871872012D0068B1E5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		04A57D8A1872012D0068B1E5 /* libSDL2.dylib */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.dylib";
+			path = libSDL2.dylib;
+			remoteRef = 04A57D891872012D0068B1E5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+		04A57D8C1872012D0068B1E5 /* Standard DMG */ = {
+			isa = PBXReferenceProxy;
+			fileType = "compiled.mach-o.executable";
+			path = "Standard DMG";
+			remoteRef = 04A57D8B1872012D0068B1E5 /* PBXContainerItemProxy */;
+			sourceTree = BUILT_PRODUCTS_DIR;
+		};
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+		049B572C1871FBE900EF3C66 /* Resources */ = {
+			isa = PBXResourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				049B574A1871FBE900EF3C66 /* Images.xcassets in Resources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+		049B572A1871FBE900EF3C66 /* Sources */ = {
+			isa = PBXSourcesBuildPhase;
+			buildActionMask = 2147483647;
+			files = (
+				920CC7F41C3F3A6F005B261E /* Scene.cpp in Sources */,
+				920CC7F51C3F3A6F005B261E /* Transition.cpp in Sources */,
+				2DC477AC10D6C07B3FE008F6 /* entry_point.cpp in Sources */,
+				DA49ED8903C628BA578C8670 /* example.cpp in Sources */,
+				920CC7F31C3F3A6F005B261E /* flow.cpp in Sources */,
+			);
+			runOnlyForDeploymentPostprocessing = 0;
+		};
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+		04059FE91872027200BA6557 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = oxygine_macosx;
+			targetProxy = 04059FE81872027200BA6557 /* PBXContainerItemProxy */;
+		};
+		04A57D8F187201EF0068B1E5 /* PBXTargetDependency */ = {
+			isa = PBXTargetDependency;
+			name = Framework;
+			targetProxy = 04A57D8E187201EF0068B1E5 /* PBXContainerItemProxy */;
+		};
+/* End PBXTargetDependency section */
+
+/* Begin XCBuildConfiguration section */
+		049B575D1871FBE900EF3C66 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_OBJC_ARC = NO;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_DYNAMIC_NO_PIC = NO;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_OPTIMIZATION_LEVEL = 0;
+				GCC_PREPROCESSOR_DEFINITIONS = (
+					"DEBUG=1",
+					"$(inherited)",
+				);
+				GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "../../../../oxygine-framework//oxygine/src ../../../..//SDL/include ../../../../oxygine-flow/src";
+				VALID_ARCHS = x86_64;
+			};
+			name = Debug;
+		};
+		049B575E1871FBE900EF3C66 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ALWAYS_SEARCH_USER_PATHS = NO;
+				CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
+				CLANG_CXX_LIBRARY = "libc++";
+				CLANG_ENABLE_OBJC_ARC = NO;
+				CLANG_WARN_BOOL_CONVERSION = YES;
+				CLANG_WARN_CONSTANT_CONVERSION = YES;
+				CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
+				CLANG_WARN_EMPTY_BODY = YES;
+				CLANG_WARN_ENUM_CONVERSION = YES;
+				CLANG_WARN_INT_CONVERSION = YES;
+				CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
+				CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
+				COPY_PHASE_STRIP = YES;
+				DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+				ENABLE_NS_ASSERTIONS = NO;
+				GCC_C_LANGUAGE_STANDARD = gnu99;
+				GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+				GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+				GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
+				GCC_WARN_UNDECLARED_SELECTOR = YES;
+				GCC_WARN_UNINITIALIZED_AUTOS = YES;
+				GCC_WARN_UNUSED_FUNCTION = YES;
+				GCC_WARN_UNUSED_VARIABLE = YES;
+				MACOSX_DEPLOYMENT_TARGET = 10.8;
+				ONLY_ACTIVE_ARCH = YES;
+				SDKROOT = macosx;
+				USER_HEADER_SEARCH_PATHS = "../../../../oxygine-framework//oxygine/src ../../../..//SDL/include ../../../../oxygine-flow/src";
+				VALID_ARCHS = x86_64;
+			};
+			name = Release;
+		};
+		049B57601871FBE900EF3C66 /* Debug */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "HelloFlow/HelloFlow_macosx-Prefix.pch";
+				INFOPLIST_FILE = "HelloFlow_macosx-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../../../oxygine-framework//oxygine/third_party/macosx/libraries",
+					"../../../../oxygine-framework//oxygine/third_party/ios/libraries",
+				);
+				PRODUCT_NAME = HelloFlow_macosx;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Debug;
+		};
+		049B57611871FBE900EF3C66 /* Release */ = {
+			isa = XCBuildConfiguration;
+			buildSettings = {
+				ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
+				COMBINE_HIDPI_IMAGES = YES;
+				GCC_PRECOMPILE_PREFIX_HEADER = YES;
+				GCC_PREFIX_HEADER = "HelloFlow/HelloFlow_macosx-Prefix.pch";
+				INFOPLIST_FILE = "HelloFlow_macosx-Info.plist";
+				LIBRARY_SEARCH_PATHS = (
+					"$(inherited)",
+					"../../../../oxygine-framework//oxygine/third_party/macosx/libraries",
+					"../../../../oxygine-framework//oxygine/third_party/ios/libraries",
+				);
+				PRODUCT_NAME = HelloFlow_macosx;
+				WRAPPER_EXTENSION = app;
+			};
+			name = Release;
+		};
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+		049B57291871FBE900EF3C66 /* Build configuration list for PBXProject "HelloFlow_macosx" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				049B575D1871FBE900EF3C66 /* Debug */,
+				049B575E1871FBE900EF3C66 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+		049B575F1871FBE900EF3C66 /* Build configuration list for PBXNativeTarget "HelloFlow_macosx" */ = {
+			isa = XCConfigurationList;
+			buildConfigurations = (
+				049B57601871FBE900EF3C66 /* Debug */,
+				049B57611871FBE900EF3C66 /* Release */,
+			);
+			defaultConfigurationIsVisible = 0;
+			defaultConfigurationName = Release;
+		};
+/* End XCConfigurationList section */
+	};
+	rootObject = 049B57261871FBE900EF3C66 /* Project object */;
+}

+ 48 - 0
examples/HelloFlow/proj.win32/HelloFlow.sln

@@ -0,0 +1,48 @@
+
+Microsoft Visual Studio Solution File, Format Version 11.00
+# Visual Studio 2010
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloFlow", "HelloFlow.vcxproj", "{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}"
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Oxygine", "../../../../oxygine-framework/\oxygine\SDL\win32\oxygine.vcxproj", "{52411305-CFE1-4FA8-9885-5729BFC816CF}"
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Debug|x64 = Debug|x64
+		Release|Win32 = Release|Win32
+		Release|x64 = Release|x64
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}.Debug|Win32.Build.0 = Debug|Win32
+		{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}.Debug|x64.ActiveCfg = Debug|Win32
+		{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}.Release|Win32.ActiveCfg = Release|Win32
+		{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}.Release|Win32.Build.0 = Release|Win32
+		{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}.Release|x64.ActiveCfg = Release|Win32
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.ActiveCfg = Debug|Win32
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|Win32.Build.0 = Debug|Win32
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.ActiveCfg = Debug|x64
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Debug|x64.Build.0 = Debug|x64
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.ActiveCfg = Release|Win32
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|Win32.Build.0 = Release|Win32
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.ActiveCfg = Release|x64
+		{81CE8DAF-EBB2-4761-8E45-B71ABCCA8C68}.Release|x64.Build.0 = Release|x64
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.ActiveCfg = Debug|Win32
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|Win32.Build.0 = Debug|Win32
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.ActiveCfg = Debug|x64
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Debug|x64.Build.0 = Debug|x64
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.ActiveCfg = Release|Win32
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|Win32.Build.0 = Release|Win32
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.ActiveCfg = Release|x64
+		{DA956FD3-E142-46F2-9DD5-C78BEBB56B7A}.Release|x64.Build.0 = Release|x64
+		{52411305-CFE1-4FA8-9885-5729BFC816CF}.Debug|Win32.ActiveCfg = Debug|Win32
+		{52411305-CFE1-4FA8-9885-5729BFC816CF}.Debug|Win32.Build.0 = Debug|Win32
+		{52411305-CFE1-4FA8-9885-5729BFC816CF}.Debug|x64.ActiveCfg = Debug|Win32
+		{52411305-CFE1-4FA8-9885-5729BFC816CF}.Release|Win32.ActiveCfg = Release|Win32
+		{52411305-CFE1-4FA8-9885-5729BFC816CF}.Release|Win32.Build.0 = Release|Win32
+		{52411305-CFE1-4FA8-9885-5729BFC816CF}.Release|x64.ActiveCfg = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal

+ 128 - 0
examples/HelloFlow/proj.win32/HelloFlow.vcxproj

@@ -0,0 +1,128 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup Label="ProjectConfigurations">
+    <ProjectConfiguration Include="Debug|Win32">
+      <Configuration>Debug</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+    <ProjectConfiguration Include="Release|Win32">
+      <Configuration>Release</Configuration>
+      <Platform>Win32</Platform>
+    </ProjectConfiguration>
+  </ItemGroup>
+  <PropertyGroup Label="Globals">
+    <ProjectGuid>{2B4D7491-A4F8-4606-B0E3-2A1FCE3C46C4}</ProjectGuid>
+    <Keyword>Win32Proj</Keyword>
+    <RootNamespace>HelloFlow</RootNamespace>
+    <ProjectName>HelloFlow</ProjectName>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>true</UseDebugLibraries>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v140_xp</PlatformToolset>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
+    <ConfigurationType>Application</ConfigurationType>
+    <UseDebugLibraries>false</UseDebugLibraries>
+    <WholeProgramOptimization>true</WholeProgramOptimization>
+    <CharacterSet>Unicode</CharacterSet>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '10.0'">v100</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0'">v110</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '11.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v110_xp</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0'">v120</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '12.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v120_xp</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0'">v140</PlatformToolset>
+    <PlatformToolset Condition="'$(VisualStudioVersion)' == '14.0' and exists('$(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A')">v140_xp</PlatformToolset>
+  </PropertyGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
+  <ImportGroup Label="ExtensionSettings">
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
+  </ImportGroup>
+  <PropertyGroup Label="UserMacros" />
+  <PropertyGroup>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(SolutionDir)$(Configuration)_$(PlatformToolset)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">$(Configuration)_$(PlatformToolset)\</IntDir>
+    <OutDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(SolutionDir)$(Configuration)_$(PlatformToolset)\</OutDir>
+    <IntDir Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">$(Configuration)_$(PlatformToolset)\</IntDir>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <LinkIncremental>false</LinkIncremental>
+  </PropertyGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
+    <ClCompile>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <WarningLevel>Level3</WarningLevel>
+      <Optimization>Disabled</Optimization>
+      <PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../../../../oxygine-framework//oxygine/src;../../../..//SDL/include;../../../../oxygine-framework//oxygine/third_party/win32/pthreads/include;../../../../oxygine-flow/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <AdditionalDependencies>libcurl_imp.lib;libjpeg.lib;libpng.lib;libzlib.lib;opengl32.lib;pthreadVCE2.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies Condition="'$(VisualStudioVersion)' == '14.0'">libcurl_imp.lib;libjpeg-2015.lib;libpng-2015.lib;libzlib.lib;opengl32.lib;pthreadVCE2.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalLibraryDirectories>../../../../oxygine-framework//oxygine/third_party/win32/libraries;../../../../oxygine-framework//libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
+    <ClCompile>
+      <WarningLevel>Level3</WarningLevel>
+      <PrecompiledHeader>
+      </PrecompiledHeader>
+      <Optimization>MaxSpeed</Optimization>
+      <FunctionLevelLinking>true</FunctionLevelLinking>
+      <IntrinsicFunctions>true</IntrinsicFunctions>
+      <PreprocessorDefinitions>WIN32;NDEBUG;_WINDOWS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <AdditionalIncludeDirectories>../../../../oxygine-framework//oxygine/src;../../../..//SDL/include;../../../../oxygine-framework//oxygine/third_party/win32/pthreads/include;../../../../oxygine-flow/src;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+    </ClCompile>
+    <Link>
+      <SubSystem>Windows</SubSystem>
+      <GenerateDebugInformation>true</GenerateDebugInformation>
+      <EnableCOMDATFolding>true</EnableCOMDATFolding>
+      <OptimizeReferences>true</OptimizeReferences>
+      <AdditionalLibraryDirectories>../../../../oxygine-framework//oxygine/third_party/win32/libraries;../../../../oxygine-framework//libs;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
+      <AdditionalDependencies>libcurl_imp.lib;libjpeg.lib;libpng.lib;libzlib.lib;opengl32.lib;pthreadVCE2.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalDependencies Condition="'$(VisualStudioVersion)' == '14.0'">libcurl_imp.lib;libjpeg-2015.lib;libpng-2015.lib;libzlib.lib;opengl32.lib;pthreadVCE2.lib;SDL2.lib;SDL2main.lib;%(AdditionalDependencies)</AdditionalDependencies>
+      <AdditionalOptions>/ignore:4099 %(AdditionalOptions)</AdditionalOptions>
+    </Link>
+  </ItemDefinitionGroup>
+  <ItemGroup>
+    <ProjectReference Include="../../../../oxygine-framework/\oxygine\SDL\win32\oxygine.vcxproj">
+      <Project>{52411305-cfe1-4fa8-9885-5729bfc816cf}</Project>
+    </ProjectReference>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="../src/entry_point.cpp" />
+    <ClCompile Include="../src/example.cpp" />
+    <ClCompile Include="..\..\..\src\flow.cpp" />
+    <ClCompile Include="..\..\..\src\Scene.cpp" />
+    <ClCompile Include="..\..\..\src\Transition.cpp" />
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="../src/example.h" />
+    <ClInclude Include="..\..\..\src\flow.h" />
+    <ClInclude Include="..\..\..\src\Scene.h" />
+    <ClInclude Include="..\..\..\src\Transition.h" />
+  </ItemGroup>
+  <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
+  <ImportGroup Label="ExtensionTargets">
+  </ImportGroup>
+</Project>

+ 51 - 0
examples/HelloFlow/proj.win32/HelloFlow.vcxproj.filters

@@ -0,0 +1,51 @@
+<?xml version="1.0" encoding="utf-8"?>
+<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
+  <ItemGroup>
+    <Filter Include="Source Files">
+      <UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
+      <Extensions>cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx</Extensions>
+    </Filter>
+    <Filter Include="Header Files">
+      <UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
+      <Extensions>h;hpp;hxx;hm;inl;inc;xsd</Extensions>
+    </Filter>
+    <Filter Include="Resource Files">
+      <UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
+      <Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
+    </Filter>
+    <Filter Include="flow">
+      <UniqueIdentifier>{39de1b84-0e14-4791-b892-7666807264c3}</UniqueIdentifier>
+    </Filter>
+  </ItemGroup>
+  <ItemGroup>
+    <ClCompile Include="../src/entry_point.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="../src/example.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\src\flow.cpp">
+      <Filter>flow</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\src\Scene.cpp">
+      <Filter>flow</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\src\Transition.cpp">
+      <Filter>flow</Filter>
+    </ClCompile>
+  </ItemGroup>
+  <ItemGroup>
+    <ClInclude Include="../src/example.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\src\flow.h">
+      <Filter>flow</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\src\Scene.h">
+      <Filter>flow</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\src\Transition.h">
+      <Filter>flow</Filter>
+    </ClInclude>
+  </ItemGroup>
+</Project>

+ 153 - 0
examples/HelloFlow/src/entry_point.cpp

@@ -0,0 +1,153 @@
+/**
+Attention!
+This file has Oxygine initialization stuff.
+If you just started you don't need to understand it exactly you could check it later.
+You could start from example.cpp and example.h it has main functions being called from there
+*/
+#include "core/oxygine.h"
+#include "Stage.h"
+#include "DebugActor.h"
+
+#include "example.h"
+
+
+using namespace oxygine;
+
+
+//called each frame
+int mainloop()
+{
+    example_update();
+    //update our stage
+    //update all actors. Actor::update would be called also for all children
+    getStage()->update();
+
+    if (core::beginRendering())
+    {
+        Color clearColor(32, 32, 32, 255);
+        Rect viewport(Point(0, 0), core::getDisplaySize());
+        //render all actors. Actor::render would be called also for all children
+        getStage()->render(clearColor, viewport);
+
+        core::swapDisplayBuffers();
+    }
+
+    //update internal components
+    //all input events would be passed to Stage::instance.handleEvent
+    //if done is true then User requests quit from app.
+    bool done = core::update();
+
+    return done ? 1 : 0;
+}
+
+//it is application entry point
+void run()
+{
+    ObjectBase::__startTracingLeaks();
+
+    //initialize Oxygine's internal stuff
+    core::init_desc desc;
+    desc.title = "Oxygine Application";
+
+#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
+    //we could setup initial window size on SDL builds
+    desc.w = 960;
+    desc.h = 640;
+    //marmalade settings could be changed from emulator's menu
+#endif
+
+
+    example_preinit();
+    core::init(&desc);
+
+
+    //create Stage. Stage is a root node
+    Stage::instance = new Stage(true);
+    Stage::instance->setScale(0.5f);
+    Point size = core::getDisplaySize();
+    getStage()->setSize(size);
+
+    //DebugActor is a helper actor node. It shows FPS, memory usage and other useful stuff
+    DebugActor::show();
+
+    //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
+
+
+    //here is main game loop
+    while (1)
+    {
+        int done = mainloop();
+        if (done)
+            break;
+    }
+    //user wants to leave application...
+
+    //lets dump all created objects into log
+    //all created and not freed resources would be displayed
+    ObjectBase::dumpCreatedObjects();
+
+    //lets cleanup everything right now and call ObjectBase::dumpObjects() again
+    //we need to free all allocated resources and delete all created actors
+    //all actors/sprites are smart pointer objects and actually you don't need it remove them by hands
+    //but now we want delete it by hands
+
+    //check example.cpp
+    example_destroy();
+
+
+    //renderer.cleanup();
+
+    /**releases all internal components and Stage*/
+    core::release();
+
+    //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;
+}
+#endif
+
+
+#ifdef OXYGINE_SDL
+
+#include "SDL_main.h"
+extern "C"
+{
+    int main(int argc, char* argv[])
+    {
+        run();
+        return 0;
+    }
+};
+#endif
+
+#ifdef EMSCRIPTEN
+#include <emscripten.h>
+
+void one() { mainloop(); }
+
+int main(int argc, char* argv[])
+{
+    run();
+    emscripten_set_main_loop(one, 0, 0);
+    return 0;
+}
+#endif

+ 108 - 0
examples/HelloFlow/src/example.cpp

@@ -0,0 +1,108 @@
+#include "oxygine-framework.h"
+#include "flow.h"
+#include "Transition.h"
+using namespace oxygine;
+
+class MyDialog : public flow::Scene
+{
+
+public:
+    MyDialog()
+    {
+        setName("MyDialog");
+
+        _dialog = true;
+
+        spBox9Sprite view = new Box9Sprite;
+        _view = view;
+        _view->setSize(400, 300);
+        _view->attachTo(_holder);
+        _view->setPosition(_holder->getSize() / 2 - _view->getSize() / 2);
+
+        spButton btn = new Button;
+        btn->setPosition(120, 200);
+        btn->attachTo(_view);
+
+        btn->addEventListener(TouchEvent::CLICK, [ = ](Event*)
+        {
+            finish();
+        });
+
+        flow::TransitionMove::assign(this);
+
+        addEventListener(EVENT_PRE_SHOWING, [ = ](Event*)
+        {
+            view->setColor(Color(rand() % 255, rand() % 255, rand() % 255, 255));
+        });
+
+        addEventListener(EVENT_POST_SHOWING, [ = ](Event*)
+        {
+            view->addTween(Sprite::TweenColor(Color::White), 300);
+        });
+
+        addEventListener(EVENT_BACK, [ = ](Event*)
+        {
+            finish();
+        });
+    }
+
+    spActor _view;
+};
+
+class MyScene : public flow::Scene
+{
+public:
+    MyScene()
+    {
+        setName("MyScene");
+
+        _view = new Box9Sprite;
+        _view->setSize(_holder->getSize());
+        _view->attachTo(_holder);
+
+        spButton btn = new Button;
+        btn->setPosition(_view->getSize() / 2 - btn->getSize() / 2);
+        btn->attachTo(_view);
+
+        btn->addEventListener(TouchEvent::CLICK, [ = ](Event*)
+        {
+            flow::show(new MyDialog, [ = ](Event*)
+            {
+                //finish();
+                log::messageln("dialog closed");
+            });
+        });
+    }
+
+    spActor _view;
+};
+
+
+void example_preinit()
+{
+
+}
+
+void example_init()
+{
+    //initialize oxygine_flow
+    flow::init();
+
+    //create scene and display it
+    flow::show(new MyScene, [](Event * event)
+    {
+        log::messageln("scene closed");
+    });
+}
+
+void example_update()
+{
+    //update oxygine-flow each frame
+    flow::update();
+}
+
+void example_destroy()
+{
+    //free oxygine-flow
+    flow::free();
+}

+ 27 - 0
examples/HelloFlow/src/example.h

@@ -0,0 +1,27 @@
+#pragma once
+#include "Scene.h"
+#include "Sprite.h"
+#include "res/Resources.h"
+#include "Button.h"
+using namespace oxygine;
+using namespace std;
+
+void example_init();
+void example_preinit();
+void example_destroy();
+void example_update();
+
+extern Resources gameResources;
+
+const int VirtualWidth = 960;
+const int VirtualHeight = 640;
+
+DECLARE_SMART(MySceneA, spMySceneA);
+DECLARE_SMART(MySceneB, spMySceneB);
+DECLARE_SMART(MyDialog, spMyDialog);
+
+extern spMySceneA SceneA;
+extern spMySceneB SceneB;
+extern spMyDialog dialogA;
+
+spButton createButton(const string& name, const string& txt);

+ 192 - 0
src/Scene.cpp

@@ -0,0 +1,192 @@
+#include "Scene.h"
+#include "blocking.h"
+#include "Transition.h"
+#include "Clock.h"
+
+#include "flow.h"
+
+#ifdef __S3E__
+#include "s3eKeyboard.h"
+#include "s3eDevice.h"
+#else
+#include "SDL.h"
+#endif
+
+#define LOGD(...) log::messageln(__VA_ARGS__)
+//#define LOGD(...) {}
+namespace oxygine
+{
+
+
+    bool checkQuit()
+    {
+        bool back = false;
+#ifdef __S3E__
+        if (s3eDeviceCheckQuitRequest() ||
+                (s3eKeyboardGetState(s3eKeyBackspace) & S3E_KEY_STATE_DOWN) ||
+                (s3eKeyboardGetState(s3eKeyAbsBSK) & S3E_KEY_STATE_DOWN))
+        {
+            back = true;
+        }
+#elif EMSCRIPTEN
+
+#else
+        const Uint8* data = SDL_GetKeyboardState(0);
+
+        if (data[SDL_GetScancodeFromKey(SDLK_BACKSPACE)] ||
+                data[SDL_GetScancodeFromKey(SDLK_ESCAPE)] ||
+                data[SDL_GetScancodeFromKey(SDLK_AC_BACK)])
+        {
+            back = true;
+        }
+
+#endif
+        return back;
+    }
+
+    namespace flow
+    {
+        extern bool _wasTouchBlocked;
+
+        Scene::Scene(): _done(false), _remove(false), _dialog(false), _inloop(false), _transitionDone(false)//, _finishEvent(0)
+        {
+            setName("Scene");
+            _holder = new Actor;
+            //if (Stage::instance)
+            _holder->setSize(Stage::instance->getSize());
+            _holder->setName("Scene::_holder");
+
+            TransitionFade::assign(this);
+        }
+
+        Scene::~Scene()
+        {
+
+        }
+
+        void Scene::setTransitionIn(spTransition t)
+        {
+            _transitionIn = t;
+        }
+
+        void Scene::setTransitionOut(spTransition t)
+        {
+            _transitionOut = t;
+        }
+
+        void Scene::finishOnClick(spActor actor)
+        {
+            actor->addClickListener(getFinish());
+        }
+
+        void Scene::addClickHandler(spActor actor, const EventCallback& cb, bool finish)
+        {
+            actor->addClickListener(cb);
+            if (finish)
+                finishOnClick(actor);
+        }
+
+        void Scene::addBackHandler(const EventCallback& cb, bool finish)
+        {
+            addEventListener(EVENT_BACK, cb);
+            if (finish)
+                addEventListener(EVENT_BACK, getFinish());
+        }
+
+        spTransition Scene::runTransition(Flow* f, spScene current, bool back)
+        {
+            _transitionDone = false;
+            return back ? _runTransitionOut(f, current) : _runTransitionIn(f, current);
+        }
+
+        spTransition Scene::_runTransitionIn(Flow* f, spScene current)
+        {
+            spTransition t = _transitionIn;
+            t->run(f, current, this, false);
+            return t;
+        }
+
+        spTransition Scene::_runTransitionOut(Flow* f, spScene current)
+        {
+            spTransition t = current->_transitionOut;
+            t->run(f, current, this, true);
+            return t;
+        }
+
+        void Scene::entering()
+        {
+            LOGD("%-20s '%s'", "Scene.entering", getName().c_str());
+            Event ev(EVENT_ENTERING);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::leaving()
+        {
+            LOGD("%-20s '%s'", "Scene.leaving", getName().c_str());
+            Event ev(EVENT_LEAVING);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::sceneShown(spScene s)
+        {
+            LOGD("%-20s '%s' - '%s'", "Scene.sceneShown on ", getName().c_str(), s->getName().c_str());
+            Event ev(EVENT_SCENE_SHOWN);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::sceneHidden(spScene s)
+        {
+            LOGD("%-20s '%s' - '%s'", "Scene.sceneHidden on ", getName().c_str(), s->getName().c_str());
+            Event ev(EVENT_SCENE_HIDDEN);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::preShowing()
+        {
+            _done = false;
+            _remove = false;
+
+            LOGD("%-20s '%s'", "Scene.preShowing", getName().c_str());
+            Event ev(EVENT_PRE_SHOWING);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::postShowing()
+        {
+            LOGD("%-20s '%s'", "Scene.postShowing", getName().c_str());
+            Event ev(EVENT_POST_SHOWING);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::preHiding()
+        {
+            LOGD("%-20s '%s'", "Scene.preHiding", getName().c_str());
+            Event ev(EVENT_PRE_HIDING);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::postHiding()
+        {
+            LOGD("%-20s '%s'", "Scene.postHiding", getName().c_str());
+            Event ev(EVENT_POST_HIDING);
+            dispatchEvent(&ev);
+        }
+
+        void Scene::finish(Event* ev)
+        {
+            _done = true;
+            if (ev)
+                static_cast<Event&>(_finishEvent) = *ev;
+            else
+                _finishEvent = SceneEvent();
+
+            //Flow::instance.checkDone();
+        }
+
+        void Scene::remove()
+        {
+            _remove = true;
+            OX_ASSERT(_dialog == false);
+        }
+    }
+}

+ 153 - 0
src/Scene.h

@@ -0,0 +1,153 @@
+#pragma once
+#include "EventDispatcher.h"
+#include "Actor.h"
+#include "Stage.h"
+#include "blocking.h"
+#include <functional>
+
+namespace oxygine
+{
+    class Action
+    {
+    public:
+        std::string id;
+    };
+
+    namespace flow
+    {
+        class SceneEvent : public Event
+        {
+        public:
+            SceneEvent(): Event(0) {}
+            std::string action;
+        };
+
+        class Flow;
+        typedef std::function< void(SceneEvent*) > resultCallback;
+
+        DECLARE_SMART(Scene, spScene);
+        DECLARE_SMART(Transition, spTransition);
+
+
+        class Scene: public EventDispatcher
+        {
+        public:
+
+            enum
+            {
+                //fired before entering to scene
+                EVENT_ENTERING =        makefourcc('S', 'E', 'n', 't'),
+
+                //fired after leaving scene
+                EVENT_LEAVING =         makefourcc('S', 'L', 'e', 'a'),
+
+                //current scene will be shown now with transition
+                EVENT_PRE_SHOWING =     makefourcc('S', 'P', 'r', 'S'),
+
+                //current scene was shown, transition is done
+                EVENT_POST_SHOWING =    makefourcc('S', 'P', 'o', 'S'),
+
+                //current scene will be hidden with transition
+                EVENT_PRE_HIDING =      makefourcc('S', 'P', 'r', 'H'),
+
+                //current scene was hidden with transition
+                EVENT_POST_HIDING =     makefourcc('S', 'P', 'o', 'H'),
+
+                //fired when other scene was shown on top of current,
+                EVENT_SCENE_SHOWN =     makefourcc('S', 'S', 'S', 'h'),
+
+                //fired when other scene was hidden on top of current and current become active
+                EVENT_SCENE_HIDDEN =    makefourcc('S', 'S', 'H', 'd'),
+
+                //back button was pressed (android)
+                EVENT_BACK =            makefourcc('S', 'B', 'a', 'c'),
+
+
+                EVENT_PRESHOWING = EVENT_PRE_SHOWING,
+                EVENT_POSTSHOWING = EVENT_POST_SHOWING,
+                EVENT_PREHIDING = EVENT_PRE_HIDING,
+                EVENT_POSTHIDING = EVENT_POST_HIDING,
+            };
+
+            Scene();
+            ~Scene();
+
+            /*closes current scene**/
+            void finish(Event* ev = 0);
+
+            /**
+            Automatically removes Scene from stack (flow).
+            Can't be used for dialogs.
+            resultCallback won't be called for such scene.
+            */
+            void remove();
+
+            void finishOnClick(spActor);
+
+            /**
+            adds TouchEvent::CLICK event listener to actor and calls callback
+            if "finish" is true scene will be finished.
+            */
+            void addClickHandler(spActor, const EventCallback& cb, bool finish = false);
+
+            /**
+            adds Back (Android) event listener calls callback
+            if "finish" is true scene will be finished.
+            */
+            void addBackHandler(const EventCallback& cb, bool finish = false);
+
+            /**returns finish method as callback for simplified usage from client code*/
+            EventCallback   getFinish() { return CLOSURE(this, &Scene::finish); }
+
+            void setTransitionIn(spTransition t);
+            void setTransitionOut(spTransition t);
+
+
+            spActor         getHolder() const { return _holder; }
+
+        protected:
+
+            friend class Flow;
+            friend class Transition;
+
+            /**dialog mode*/
+            bool _dialog;
+
+
+
+            spTransition runTransition(Flow*, spScene current, bool back);
+            virtual spTransition _runTransitionIn(Flow*, spScene current);
+            virtual spTransition _runTransitionOut(Flow*, spScene current);
+
+            spActor _holder;
+
+        private:
+
+            spTransition _transitionIn;
+            spTransition _transitionOut;
+
+            bool _remove;
+            bool _done;
+            bool _inloop;
+            bool _transitionDone;
+
+            void preShowing();
+            void postShowing();
+            void preHiding();
+            void postHiding();
+            void entering();
+            void leaving();
+
+            void sceneShown(spScene);
+            void sceneHidden(spScene);
+
+            SceneEvent _finishEvent;
+            resultCallback _resultCB;
+
+        private:
+
+        };
+    }
+
+    typedef flow::Scene Frame;
+}

+ 379 - 0
src/Transition.cpp

@@ -0,0 +1,379 @@
+#include "Transition.h"
+#include "RenderState.h"
+#include "MaskedSprite.h"
+#include "core/oxygine.h"
+#include "flow.h"
+
+#if OXYGINE_RENDERER>2
+#   include "TweenAlphaFade.h"
+#endif
+
+namespace oxygine
+{
+
+    namespace flow
+    {
+
+        Transition::Transition() : _done(false), _singleDirection(false), _flow(0)
+        {
+
+        }
+
+        void Transition::run(Flow* f, spScene current, spScene next, bool back)
+        {
+            _flow = f;
+            _current = current;
+            _next = next;
+            _done = false;
+
+            _attach(current, next, back);
+            _run(current, next, back);
+        }
+
+        void Transition::waitTween(spTween t)
+        {
+            t->setDoneCallback([ = ](Event*)
+            {
+                _done = true;
+                _clear();
+                _current = 0;
+                _next = 0;
+                _flow->phaseEnd();
+            });
+        }
+
+        void Transition::_attach(spScene current, spScene next, bool back)
+        {
+            if (current->_dialog)
+            {
+                if (!back)
+                    getStage()->insertChildAfter(next->_holder, current->_holder);
+            }
+            else
+            {
+                if (back)
+                    getStage()->insertChildBefore(next->_holder, current->_holder);
+                else
+                    getStage()->insertChildAfter(next->_holder, current->_holder);
+            }
+        }
+
+        void Transition::_run(spScene current, spScene next, bool back)
+        {
+            _done = true;
+        }
+
+        void TransitionMove::assign(Scene* scene)
+        {
+            spTransition t = new TransitionMove;
+            scene->setTransitionIn(t);
+            scene->setTransitionOut(t);
+        }
+
+        TransitionMove::TransitionMove()
+        {
+            _fade = new ColorRectSprite;
+            _fade->setPosition(-10000, -10000);
+            _fade->setSize(Vector2(30000, 30000));
+            _fade->setColor(Color(0, 0, 0, 128));
+            //_fade->setAlpha(0);
+        }
+
+        void TransitionMove::_run(spScene current, spScene next, bool back)
+        {
+            Vector2 _src = Vector2(0.0f, -(float)getStage()->getHeight() + 0);
+            Vector2 _dest = Vector2(0.0f, 0.0f);
+            int _duration = 500;
+
+
+            spScene target = back ? current : next;
+
+            spActor holder = target->getHolder();
+            if (back)
+            {
+                std::swap(_src, _dest);
+
+                spTween t = _fade->addTween(Actor::TweenAlpha(0), _duration);
+                t->setDetachActor(true);
+            }
+            else
+            {
+                _fade->setAlpha(0);
+                _fade->addTween(Actor::TweenAlpha(255), _duration);
+                holder->getParent()->insertChildBefore(_fade, holder);
+            }
+
+
+            holder->setPosition(_src);
+            spTween tween = holder->addTween(Actor::TweenPosition(_dest), _duration, 1, false, 0, Tween::ease_inOutBack);
+            waitTween(tween);
+        }
+
+        void TransitionFade::assign(Scene* scene)
+        {
+            spTransition t = new TransitionFade;
+            scene->setTransitionIn(t);
+            scene->setTransitionOut(t);
+        }
+
+        void TransitionFade::_run(spScene current, spScene next, bool back)
+        {
+            spScene target = back ? current : next;
+
+            int duration = 500;
+#if OXYGINE_RENDERER>2
+            //target->getHolder()->setAlpha(back ? 255 : 0);
+            spTween tween = target->getHolder()->addTween(
+                                TweenAlphaFade(!back, TweenAlphaFade::opt_fullscreen), duration, 1, false, 0);
+#else
+            target->getHolder()->setAlpha(back ? 255 : 0);
+            spTween tween = target->getHolder()->addTween(
+                                Actor::TweenAlpha(back ? 0 : 255), duration, 1, false, 0);
+#endif
+            waitTween(tween);
+        }
+
+        TransitionShutters::TransitionShutters()
+        {
+            left = new ColorRectSprite;
+            left->setWidth(getStage()->getWidth() / 2);
+            left->setHeight(getStage()->getHeight());
+
+            right = new ColorRectSprite;
+            right->setWidth(getStage()->getWidth() / 2);
+            right->setHeight(getStage()->getHeight());
+        }
+
+        void TransitionShutters::_attach(spScene current, spScene next, bool back)
+        {
+
+        }
+
+        void TransitionShutters::_run(spScene current, spScene next, bool back)
+        {
+            getStage()->insertChildAfter(left, current->getHolder());
+            getStage()->insertChildAfter(right, current->getHolder());
+
+            int dur = 500;
+            left->setX(-left->getWidth());
+            right->setX(getStage()->getWidth());
+
+            left->addTween(Actor::TweenX(0), dur);
+            spTween t = right->addTween(Actor::TweenX(getStage()->getWidth() / 2), dur);
+            t->setDoneCallback([ = ](Event*)
+            {
+                getStage()->insertChildAfter(next->getHolder(), current->getHolder());
+                current->getHolder()->detach();
+
+                left->addTween(Actor::TweenX(-left->getWidth()), dur);
+                spTween a = right->addTween(Actor::TweenX(getStage()->getWidth()), dur);
+                waitTween(a);
+            });
+        }
+
+        void TransitionShutters::_clear()
+        {
+            left->detach();
+            right->detach();
+        }
+
+
+        void TransitionShutters::assign(Scene* scene)
+        {
+            spTransition t = new TransitionShutters;
+            scene->setTransitionIn(t);
+            scene->setTransitionOut(t);
+        }
+
+
+
+        TransitionQuads::TransitionQuads() : _center(0, 0)
+        {
+            //_singleDirection = true;
+            getStage()->addEventListener(TouchEvent::CLICK, CLOSURE(this, &TransitionQuads::clicked));
+        }
+
+        TransitionQuads::~TransitionQuads()
+        {
+            getStage()->removeEventListeners(this);
+        }
+
+        void TransitionQuads::assign(Scene* scene)
+        {
+            spTransition t = new TransitionQuads;
+            scene->setTransitionIn(t);
+            scene->setTransitionOut(t);
+        }
+
+        void TransitionQuads::clicked(Event* ev)
+        {
+            TouchEvent* te = (TouchEvent*)ev;
+            _center = getStage()->local2global(te->localPosition);
+        }
+
+
+        void TransitionQuads::update(const UpdateState& us)
+        {
+            Color b(0, 0, 0, 0);
+
+            Point ds = core::getDisplaySize();
+            Rect vp(Point(0, 0), ds);
+
+
+            IVideoDriver::instance->setRenderTarget(_mask);
+
+#if OXYGINE_RENDERER>2
+
+            Material::setCurrent(0);
+
+            STDRenderer& r = *STDMaterial::instance->getRenderer();
+            RenderState rs;
+            rs.material = STDMaterial::instance;
+            r.initCoordinateSystem(ds.x, ds.y, true);
+            //TweenAlphaFade
+            //r.Renderer::begin(0);
+
+            {
+                _holder->setPosition(Vector2(0, 0));
+                _holder->setVisible(true);
+                _holder->render(rs);
+                //rs.material->render(_holder.get(), rs);
+                _holder->setPosition(getStage()->global2local(Vector2(0, 0)));
+                //_holder->setVisible(false);
+                //r.end();
+                rs.material->finish();
+            }
+
+#else
+
+            RenderState rs;
+            rs.renderer = &_r;
+
+            _r.begin(0);
+            {
+                _holder->setPosition(Vector2(0, 0));
+                _holder->setVisible(true);
+                _holder->render(rs);
+                _holder->setPosition(getStage()->global2local(Vector2(0, 0)));
+                _holder->setVisible(false);
+                _r.end();
+            }
+#endif
+
+            IVideoDriver::instance->setRenderTarget(0);
+
+        }
+
+        void TransitionQuads::_run(spScene current, spScene next, bool back)
+        {
+            Point ds = core::getDisplaySize();
+            spActor holder = new Actor;
+            holder->setPosition(getStage()->global2local(Vector2(0, 0)));
+            //holder->setVisible(false);
+            holder->setSize(core::getDisplaySize());
+            holder->attachTo(getStage());
+            holder->setPriority(1000);
+
+            int numX = ds.x / 40;
+            int numY = ds.y / 40;
+
+            //log::messageln("tq1");
+            Vector2 quad(holder->getWidth() / numX, holder->getHeight() / numY);
+            spTween slowestTween;
+
+            for (int y = 0; y < numY; ++y)
+            {
+                for (int x = 0; x < numX; ++x)
+                {
+                    spSprite sp = new ColorRectSprite;
+                    Vector2 pos(quad.x * x, quad.y * y);
+                    pos += quad / 2;
+                    sp->setPosition(pos);
+                    sp->setAnchor(Vector2(0.5f, 0.5f));
+                    sp->setSize(quad);
+                    sp->attachTo(holder);
+                    sp->setScale(0);
+                    sp->setColor(Color(0xffffffff));
+                    Vector2 d = pos - _center;
+                    float time = d.length() / holder->getSize().length();
+                    /*
+                    if (back)
+                    time = 1.0f - time;
+                    */
+
+                    float mp = 4.0f;
+                    //mp = 10;
+                    int tm = int(1 + time * 800 * mp);
+                    spTween nt = sp->addTween(Actor::TweenScale(1.0f), int(100 * mp), 1, false, tm);
+                    if (!slowestTween || (int)slowestTween->getDelay() < tm)
+                        slowestTween = nt;
+                }
+            }
+
+            //log::messageln("tq2");
+
+
+#if OXYGINE_RENDERER <= 2
+
+            STDRenderer r;
+            RenderState rs;
+            rs.renderer = &r;
+            rs.renderer->initCoordinateSystem(ds.x, ds.y, true);
+
+            spNativeTexture mask = IVideoDriver::instance->createTexture();
+            mask->init(ds.x, ds.y, TF_R5G5B5A1, true);
+
+            _mask = mask;
+
+
+            spSprite maskSprite = new Sprite;
+            {
+                AnimationFrame fr;
+                Diffuse df;
+                df.base = mask;
+                RectF srcRect(0, 0, (float)ds.x / mask->getWidth(), (float)ds.y / mask->getHeight());
+                RectF destRect(Vector2(0, 0), ds);
+                fr.init(0, df, srcRect, destRect, ds);
+                maskSprite->setAnimFrame(fr);
+            }
+
+            //log::messageln("tq3");
+
+            //#define BUG
+            //STDMaterial
+            spMaskedSprite bg = new MaskedSprite;
+            bg->setMask(maskSprite);
+
+            bg->attachTo(getStage());
+            bg->setPriority(100);
+
+
+            bg->addChild(next->getHolder());
+            bg->setInputEnabled(false);
+            _bg = bg;
+
+            timeMS tm = getTimeMS() + 3000;
+
+            holder->setCallbackDoUpdate(CLOSURE(this, &TransitionQuads::update));
+
+
+
+            //_r = r;
+            _holder = holder;
+            waitTween(slowestTween);
+#endif
+        }
+
+        void TransitionQuads::_clear()
+        {
+            _next->getHolder()->attachTo(getStage());
+
+            _holder->detach();
+            _bg->detach();
+            _bg->setMask(0);
+
+            _mask->release();
+            _mask = 0;
+        }
+    }
+}

+ 103 - 0
src/Transition.h

@@ -0,0 +1,103 @@
+#pragma once
+#include "core/Object.h"
+#include "Stage.h"
+#include "Scene.h"
+#include "ColorRectSprite.h"
+#include "STDRenderer.h"
+
+namespace oxygine
+{
+    DECLARE_SMART(MaskedSprite, spMaskedSprite);
+
+    namespace flow
+    {
+        class Flow;
+
+        DECLARE_SMART(Transition, spTransition);
+        class Transition : public Object
+        {
+        public:
+            Transition();
+
+            void run(Flow* f, spScene current, spScene next, bool back);
+
+            virtual void _attach(spScene current, spScene next, bool back);
+            virtual void _run(spScene current, spScene next, bool back);
+            virtual void _clear() {}
+
+            void waitTween(spTween);
+
+            Flow* _flow;
+            spScene _current;
+            spScene _next;
+            bool _done;
+            bool _singleDirection;
+        };
+
+        class TransitionMove : public Transition
+        {
+        public:
+            static void assign(Scene* scene);
+            /*
+            the same instance of TransitionMove should be assigned to transitionIn and transitionOut
+            example:
+            Scene::_transitionIn = new flow::TransitionMove;
+            Scene::_transitionOut = _transitionIn;
+            */
+            TransitionMove();
+
+        protected:
+            void _run(spScene current, spScene next, bool back) override;
+            spColorRectSprite _fade;
+        };
+
+        class TransitionFade : public Transition
+        {
+        public:
+            static void assign(Scene* scene);
+
+        protected:
+            void _run(spScene current, spScene next, bool back) override;
+        };
+
+
+        class TransitionShutters : public Transition
+        {
+        public:
+            TransitionShutters();
+
+            static void assign(Scene* scene);
+
+        protected:
+            void _run(spScene current, spScene next, bool back) override;
+            void _attach(spScene current, spScene next, bool back) override;
+            void _clear() override;
+
+            spColorRectSprite left;
+            spColorRectSprite right;
+        };
+
+        class TransitionQuads : public Transition
+        {
+        public:
+            TransitionQuads();
+            ~TransitionQuads();
+
+            static void assign(Scene* scene);
+
+        private:
+            void clicked(Event*);
+            Vector2 _center;
+
+            STDRenderer _r;
+            spNativeTexture _mask;
+            spActor _holder;
+            spMaskedSprite _bg;
+
+            void _run(spScene current, spScene next, bool back) override;
+            void _clear() override;
+
+            void update(const UpdateState& us);
+        };
+    }
+}

+ 255 - 0
src/flow.cpp

@@ -0,0 +1,255 @@
+#include "flow.h"
+#include "Scene.h"
+#include "Transition.h"
+#include "DebugActor.h"
+
+namespace oxygine
+{
+    bool checkQuit();
+
+    namespace flow
+    {
+        spActor _touchBlocker;
+
+        Vector2 _blockedTouchPosition(0, 0);
+        bool _wasTouchBlocked = false;
+        bool _wasBackBlocked = false;
+
+
+        Flow Flow::instance;
+
+
+
+
+        void init()
+        {
+            _touchBlocker = new Actor;
+            _touchBlocker->setName("Scene::_touchBlocker");
+            _touchBlocker->setPosition(-10000, -10000);
+            _touchBlocker->setSize(20000, 20000);
+            _touchBlocker->setPriority(10000);
+            _touchBlocker->setName("touchBlocker");
+
+            Flow::instance.init();
+        }
+
+        void free()
+        {
+            _touchBlocker = 0;
+        }
+
+
+        Flow::Flow()
+        {
+            _transition = false;
+            _back = false;
+        }
+
+        void Flow::init()
+        {
+            spScene first = new Scene;
+            first->_holder->attachTo(getStage());
+            scenes.push_back(first);
+        }
+
+        void Flow::show(spScene scene, const resultCallback& cb)
+        {
+			auto p = std::find(scenes.begin(), scenes.end(), scene);
+			if (p != scenes.end())			
+				log::error("you can't show scene '%s', it is already in the list", scene->getName());
+
+			OX_ASSERT(p == scenes.end());
+            scene->_resultCB = cb;
+            scenes2show.push_back(scene);
+
+            checkShow();
+        }
+
+        void Flow::blockedTouch(Event* ev)
+        {
+            TouchEvent* event = safeCast<TouchEvent*>(ev);
+            _blockedTouchPosition = event->getPointer()->getPosition();
+            _wasTouchBlocked = true;
+        }
+
+        void Flow::phaseBegin(spScene current, spScene next, bool back)
+        {
+            _back = back;
+            _current = current;
+            _next = next;
+
+            _transition = true;
+
+            _trans = next->runTransition(this, current, back);
+
+            if (next && !_back)
+                next->entering();
+
+            if (!_back || !current->_dialog)
+                next->preShowing();
+
+            if ((next->_dialog && _back) || !next->_dialog)
+                current->preHiding();
+
+            if (!back)
+                current->sceneShown(next);
+
+            getStage()->addChild(_touchBlocker);
+            _wasTouchBlocked = false;
+            _wasBackBlocked = false;
+            getStage()->addEventListener(TouchEvent::CLICK, CLOSURE(this, &Flow::blockedTouch));
+        }
+
+        void Flow::phaseEnd()
+        {
+            _transition = false;
+
+            spScene current = _current;
+            spScene next = _next;
+
+            _current = 0;
+            _next = 0;
+
+            if ((next->_dialog && _back) || !next->_dialog)
+            {
+                current->_holder->detach();
+                current->postHiding();
+            }
+
+            getStage()->insertChildBefore(_touchBlocker, next->getHolder());
+
+            if (!_back || !current->_dialog)
+                next->postShowing();
+
+            if (_back)
+                next->sceneHidden(current);
+
+            getStage()->removeEventListener(TouchEvent::CLICK, CLOSURE(this, &Flow::blockedTouch));
+
+            if (current->_done)
+            {
+                current->leaving();
+                if (current->_resultCB)
+                {
+                    current->_resultCB(&current->_finishEvent);
+                    current->_resultCB = resultCallback();
+                }
+            }
+
+            if (current->_remove)
+            {
+                OX_ASSERT(next->_dialog == false);
+                std::vector<spScene>::iterator i = std::find(scenes.begin(), scenes.end(), current);
+                OX_ASSERT(i != scenes.end());
+                scenes.erase(i);
+            }
+
+
+            if (_wasTouchBlocked)
+            {
+                log::messageln("send  blocked touch");
+                TouchEvent click(TouchEvent::CLICK, true, _blockedTouchPosition);
+                getStage()->handleEvent(&click);
+                _wasTouchBlocked = false;
+            }
+        }
+
+        void Flow::checkDone()
+        {
+            spScene current = scenes.back();
+            if (current->_done)
+            {
+                scenes.pop_back();
+                spScene prev = scenes.back();
+
+                phaseBegin(current, prev, true);
+            }
+        }
+
+        void Flow::checkShow()
+        {
+            if (scenes.back()->_done)
+                return;
+
+            if (_transition)
+                return;
+
+
+            spScene next = scenes2show.front();
+            scenes2show.erase(scenes2show.begin());
+
+            spScene current = scenes.back();
+
+            if (current->_dialog)
+            {
+                OX_ASSERT(next->_dialog && "you can't show fullscreen scene on top of dialog");
+                OX_ASSERT(!current->_remove && "you can't remove dialog from flow");
+            }
+
+            scenes.push_back(next);
+            phaseBegin(current, next, false);
+
+        }
+
+        void Flow::update()
+        {
+            if (DebugActor::instance)
+            {
+                std::string str;
+                for (size_t i = 1; i < scenes.size(); ++i)
+                {
+                    str += scenes[i]->getName();
+                    str += "->";
+                }
+                if (!str.empty())
+                {
+                    str.pop_back();
+                    str.pop_back();
+                    str += "\n";
+                    DebugActor::addDebugString(str.c_str());
+                }
+            }
+
+            if (checkQuit())
+                _wasBackBlocked = true;
+
+            if (_transition)
+            {
+                if (_current->_transitionDone || (_trans && _trans->_done))
+                    phaseEnd();
+
+                return;
+            }
+
+            checkDone();
+            if (!scenes2show.empty())
+                checkShow();
+
+            if (_transition)
+                return;
+
+            if (_wasBackBlocked && !scenes.empty())
+            {
+                _wasBackBlocked = false;
+                spScene current = scenes.back();
+
+                Event ev(Scene::EVENT_BACK);
+                current->dispatchEvent(&ev);
+                checkDone();
+            }
+        }
+
+        void update()
+        {
+            Flow::instance.update();
+        }
+
+        void show(spScene s, const resultCallback& cb, Flow* f)
+        {
+            if (!f)
+                f = &Flow::instance;
+
+            f->show(s, cb);
+        }
+    }
+}

+ 66 - 0
src/flow.h

@@ -0,0 +1,66 @@
+#pragma once
+#include "core/Object.h"
+#include <functional>
+#include "Scene.h"
+
+namespace oxygine
+{
+    class Event;
+
+    namespace flow
+    {
+        DECLARE_SMART(Scene, spScene);
+        DECLARE_SMART(Transition, spTransition);
+        class Flow;
+
+        class SceneEvent;
+        inline void doNothingEventCallback(SceneEvent*) {}
+        typedef std::function< void(SceneEvent*) > resultCallback;
+
+        /**initializing oxygine-flow subsystem*/
+        void init();
+
+        /**releasing oxygine-flow subsystem*/
+        void free();
+
+        /**update oxygine-flow. Call it each frame*/
+        void update();
+
+        /**shows next scene and call callback when it was finished*/
+        void show(spScene, const resultCallback& cb = doNothingEventCallback, Flow* = 0);
+
+
+
+
+        class Flow
+        {
+        public:
+            static Flow instance;
+
+            Flow();
+
+            void init();
+
+            void show(spScene scene, const resultCallback& cb);
+            void update();
+
+            void phaseBegin(spScene current, spScene next, bool back);
+            void phaseEnd();
+
+            void checkDone();
+            void checkShow();
+
+            void blockedTouch(Event*);
+
+            std::vector<spScene> scenes;
+            std::vector<spScene> scenes2show;
+
+            bool _transition;
+            bool _back;
+
+            spTransition _trans;
+            spScene _current;
+            spScene _next;
+        };
+    }
+}