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

Merge branch 'dev' into apply-font-global-scale

dmuratshin 9 лет назад
Родитель
Сommit
538a3c536f

+ 0 - 8
oxygine/SDL/ios/oxygine/oxygine_ios.xcodeproj/project.pbxproj

@@ -127,8 +127,6 @@
 		C3E8700D16EBC8EB00052915 /* closure_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = C3E86F6516EBC8EB00052915 /* closure_impl.h */; };
 		C3E8700E16EBC8EB00052915 /* ColorRectSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3E86F6616EBC8EB00052915 /* ColorRectSprite.cpp */; };
 		C3E8700F16EBC8EB00052915 /* ColorRectSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = C3E86F6716EBC8EB00052915 /* ColorRectSprite.h */; };
-		C3E8701016EBC8EB00052915 /* coroutines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3E86F6A16EBC8EB00052915 /* coroutines.cpp */; };
-		C3E8701116EBC8EB00052915 /* coroutines.h in Headers */ = {isa = PBXBuildFile; fileRef = C3E86F6B16EBC8EB00052915 /* coroutines.h */; };
 		C3E8701416EBC8EB00052915 /* ImageData.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3E86F6E16EBC8EB00052915 /* ImageData.cpp */; };
 		C3E8701516EBC8EB00052915 /* ImageData.h in Headers */ = {isa = PBXBuildFile; fileRef = C3E86F6F16EBC8EB00052915 /* ImageData.h */; };
 		C3E8701616EBC8EB00052915 /* ImageDataOperations.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C3E86F7016EBC8EB00052915 /* ImageDataOperations.cpp */; };
@@ -367,8 +365,6 @@
 		C3E86F6516EBC8EB00052915 /* closure_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = closure_impl.h; sourceTree = "<group>"; };
 		C3E86F6616EBC8EB00052915 /* ColorRectSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorRectSprite.cpp; path = ../../../src/ColorRectSprite.cpp; sourceTree = "<group>"; };
 		C3E86F6716EBC8EB00052915 /* ColorRectSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColorRectSprite.h; path = ../../../src/ColorRectSprite.h; sourceTree = "<group>"; };
-		C3E86F6A16EBC8EB00052915 /* coroutines.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coroutines.cpp; sourceTree = "<group>"; };
-		C3E86F6B16EBC8EB00052915 /* coroutines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coroutines.h; sourceTree = "<group>"; };
 		C3E86F6E16EBC8EB00052915 /* ImageData.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageData.cpp; sourceTree = "<group>"; };
 		C3E86F6F16EBC8EB00052915 /* ImageData.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ImageData.h; sourceTree = "<group>"; };
 		C3E86F7016EBC8EB00052915 /* ImageDataOperations.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ImageDataOperations.cpp; sourceTree = "<group>"; };
@@ -719,8 +715,6 @@
 				0472E35517F8A1A80016A832 /* ZipFileSystem.cpp */,
 				0472E35617F8A1A80016A832 /* ZipFileSystem.h */,
 				C3EE215017BECD6100715678 /* gl */,
-				C3E86F6A16EBC8EB00052915 /* coroutines.cpp */,
-				C3E86F6B16EBC8EB00052915 /* coroutines.h */,
 				C3E86F6E16EBC8EB00052915 /* ImageData.cpp */,
 				C3E86F6F16EBC8EB00052915 /* ImageData.h */,
 				C3E86F7016EBC8EB00052915 /* ImageDataOperations.cpp */,
@@ -900,7 +894,6 @@
 				C3E8700D16EBC8EB00052915 /* closure_impl.h in Headers */,
 				9240B40A1ADFB856005F9C5B /* TweenAnim.h in Headers */,
 				C3E8700F16EBC8EB00052915 /* ColorRectSprite.h in Headers */,
-				C3E8701116EBC8EB00052915 /* coroutines.h in Headers */,
 				0472E35A17F8A1A80016A832 /* FileSystem.h in Headers */,
 				0472E36517F8A1A80016A832 /* ZipFileSystem.h in Headers */,
 				0472E36317F8A1A80016A832 /* VertexDeclaration.h in Headers */,
@@ -1078,7 +1071,6 @@
 				9264E5BF1B8358D80049F91F /* jsoncpp.cpp in Sources */,
 				C3E8700A16EBC8EB00052915 /* Clock.cpp in Sources */,
 				C3E8700E16EBC8EB00052915 /* ColorRectSprite.cpp in Sources */,
-				C3E8701016EBC8EB00052915 /* coroutines.cpp in Sources */,
 				C3E8701416EBC8EB00052915 /* ImageData.cpp in Sources */,
 				CEC2D00A1C47288E00450163 /* STDMaterial.cpp in Sources */,
 				0472E36417F8A1A80016A832 /* ZipFileSystem.cpp in Sources */,

+ 0 - 8
oxygine/SDL/macosx/oxygine_macosx/oxygine_macosx.xcodeproj/project.pbxproj

@@ -29,8 +29,6 @@
 		049B56741871F21E00EF3C66 /* closure_impl.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B55A11871F21D00EF3C66 /* closure_impl.h */; };
 		049B56751871F21E00EF3C66 /* ColorRectSprite.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 049B55A21871F21D00EF3C66 /* ColorRectSprite.cpp */; };
 		049B56761871F21E00EF3C66 /* ColorRectSprite.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B55A31871F21D00EF3C66 /* ColorRectSprite.h */; };
-		049B56771871F21E00EF3C66 /* coroutines.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 049B55A61871F21D00EF3C66 /* coroutines.cpp */; };
-		049B56781871F21E00EF3C66 /* coroutines.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B55A71871F21D00EF3C66 /* coroutines.h */; };
 		049B56791871F21E00EF3C66 /* file.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 049B55A81871F21D00EF3C66 /* file.cpp */; };
 		049B567A1871F21E00EF3C66 /* file.h in Headers */ = {isa = PBXBuildFile; fileRef = 049B55A91871F21D00EF3C66 /* file.h */; };
 		049B567C1871F21E00EF3C66 /* FileSystem.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 049B55AB1871F21D00EF3C66 /* FileSystem.cpp */; };
@@ -268,8 +266,6 @@
 		049B55A11871F21D00EF3C66 /* closure_impl.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = closure_impl.h; sourceTree = "<group>"; };
 		049B55A21871F21D00EF3C66 /* ColorRectSprite.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ColorRectSprite.cpp; path = ../../../src/ColorRectSprite.cpp; sourceTree = "<group>"; };
 		049B55A31871F21D00EF3C66 /* ColorRectSprite.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ColorRectSprite.h; path = ../../../src/ColorRectSprite.h; sourceTree = "<group>"; };
-		049B55A61871F21D00EF3C66 /* coroutines.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = coroutines.cpp; sourceTree = "<group>"; };
-		049B55A71871F21D00EF3C66 /* coroutines.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = coroutines.h; sourceTree = "<group>"; };
 		049B55A81871F21D00EF3C66 /* file.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = file.cpp; sourceTree = "<group>"; };
 		049B55A91871F21D00EF3C66 /* file.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = file.h; sourceTree = "<group>"; };
 		049B55AB1871F21D00EF3C66 /* FileSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FileSystem.cpp; sourceTree = "<group>"; };
@@ -645,8 +641,6 @@
 				92F3F3471CA3BD7B00425D52 /* ThreadDispatcher.h */,
 				92F3F3481CA3BD7B00425D52 /* ThreadMessages.h */,
 				92CE26661A58AADB003901D6 /* ios */,
-				049B55A61871F21D00EF3C66 /* coroutines.cpp */,
-				049B55A71871F21D00EF3C66 /* coroutines.h */,
 				049B55A81871F21D00EF3C66 /* file.cpp */,
 				049B55A91871F21D00EF3C66 /* file.h */,
 				049B55AB1871F21D00EF3C66 /* FileSystem.cpp */,
@@ -950,7 +944,6 @@
 				049B570A1871F21E00EF3C66 /* Sprite.h in Headers */,
 				CEC2CFF91C47274C00450163 /* STDMaterial.h in Headers */,
 				049B56E61871F21E00EF3C66 /* unzip.h in Headers */,
-				049B56781871F21E00EF3C66 /* coroutines.h in Headers */,
 				049B571A1871F21E00EF3C66 /* ImageUtils.h in Headers */,
 				049B57021871F21E00EF3C66 /* Resources.h in Headers */,
 				049B56921871F21E00EF3C66 /* log.h in Headers */,
@@ -1162,7 +1155,6 @@
 				049B56CD1871F21E00EF3C66 /* EventDispatcher.cpp in Sources */,
 				92F3F3421CA3BD5400425D52 /* PostProcess.cpp in Sources */,
 				049B56C01871F21E00EF3C66 /* TexturesInspector.cpp in Sources */,
-				049B56771871F21E00EF3C66 /* coroutines.cpp in Sources */,
 				049B56F91871F21E00EF3C66 /* ResBuffer.cpp in Sources */,
 				049B568E1871F21E00EF3C66 /* ImageDataOperations.cpp in Sources */,
 				049B56821871F21E00EF3C66 /* ShaderProgramGL.cpp in Sources */,

+ 0 - 2
oxygine/SDL/win32/oxygine.vcxproj

@@ -120,7 +120,6 @@
     <ClCompile Include="..\..\src\ClipRectActor.cpp" />
     <ClCompile Include="..\..\src\Clock.cpp" />
     <ClCompile Include="..\..\src\ColorRectSprite.cpp" />
-    <ClCompile Include="..\..\src\core\coroutines.cpp" />
     <ClCompile Include="..\..\src\core\curl\HttpRequestCurlTask.cpp" />
     <ClCompile Include="..\..\src\core\file.cpp" />
     <ClCompile Include="..\..\src\core\FileSystem.cpp" />
@@ -223,7 +222,6 @@
     <ClInclude Include="..\..\src\ClipRectActor.h" />
     <ClInclude Include="..\..\src\Clock.h" />
     <ClInclude Include="..\..\src\ColorRectSprite.h" />
-    <ClInclude Include="..\..\src\core\coroutines.h" />
     <ClInclude Include="..\..\src\core\curl\HttpRequestCurlTask.h" />
     <ClInclude Include="..\..\src\core\file.h" />
     <ClInclude Include="..\..\src\core\FileSystem.h" />

+ 0 - 6
oxygine/SDL/win32/oxygine.vcxproj.filters

@@ -135,9 +135,6 @@
     <ClCompile Include="..\..\src\core\gl\VideoDriverGL.cpp">
       <Filter>src\gl</Filter>
     </ClCompile>
-    <ClCompile Include="..\..\src\core\coroutines.cpp">
-      <Filter>src\core</Filter>
-    </ClCompile>
     <ClCompile Include="..\..\src\core\file.cpp">
       <Filter>src\core</Filter>
     </ClCompile>
@@ -479,9 +476,6 @@
     <ClInclude Include="..\..\src\core\gl\VideoDriverGL.h">
       <Filter>src\gl</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\src\core\coroutines.h">
-      <Filter>src\core</Filter>
-    </ClInclude>
     <ClInclude Include="..\..\src\core\file.h">
       <Filter>src\core</Filter>
     </ClInclude>

+ 2 - 2
oxygine/src/DebugActor.cpp

@@ -42,7 +42,7 @@
 #include "SDL_video.h"
 #endif
 
-#ifdef __WIN32__
+#ifdef _WIN32
 #pragma comment(lib, "psapi.lib") // Added to support GetProcessMemoryInfo()
 #include <windows.h>
 #include <Psapi.h>
@@ -366,7 +366,7 @@ namespace oxygine
         s << "memory=" << mem / 1024 << "kb ";
 #endif
 
-#ifdef __WIN32__
+#ifdef _WIN32
         PROCESS_MEMORY_COUNTERS_EX pmc;
         GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*) &pmc, sizeof(pmc));
         s << "memory=" << pmc.PrivateUsage / 1024 << "kb ";

+ 0 - 110
oxygine/src/core/coroutines.cpp

@@ -1,110 +0,0 @@
-#include "coroutines.h"
-
-#if __S3E__
-#define OXYGINE_COROUTINES
-#include "IwFibre.h"
-#elif OXYGINE_EDITOR
-#elif OXYGINE_SDL
-#ifndef __APPLE__
-//#include "greenlet.h"
-#else
-#endif
-#else
-#endif
-
-#define GREENLETS 0
-
-namespace oxygine
-{
-    namespace coroutine
-    {
-        int fiberPassData = 0;
-
-        void init()
-        {
-#if __S3E__
-#elif GREENLETS
-            greenlets_init();
-#else
-#endif
-        }
-
-        handle current()
-        {
-#if __S3E__
-            handle f = (handle)IwFibreGetCurrent();
-            return f;
-#elif GREENLETS
-            handle f = (handle)greenlet_getcurrent();
-            return f;
-#else
-            OX_ASSERT(!"not implemented");
-            return 0;
-#endif
-        }
-
-        handle create(fiberFunc func, int stackSize, void* param)
-        {
-#if __S3E__
-            handle f = (handle)IwFibreCreate(func, stackSize, param, 0);
-            return f;
-#elif GREENLETS
-            handle f = (handle)greenlet_create((gr_callback)func);
-            return f;
-#else
-
-#endif
-            return 0;
-        }
-
-        void terminate(handle fiber, int data)
-        {
-#if __S3E__
-            if (data)
-                resume(fiber, data);
-            IwFibreJoin((IwFibre*)fiber);
-            IwFibreDelete((IwFibre*)fiber);
-#elif GREENLETS
-            greenlet_kill((greenlet*)fiber);
-#else
-            //assert(0);
-#endif
-        }
-
-        int resume(handle fiber, int data)
-        {
-            fiberPassData = data;
-            int r = 0;
-#if __S3E__
-            IwFibreYield((IwFibre*)fiber);
-#elif GREENLETS
-            if (!fiber)
-                fiber = greenlet_getparent();
-            r = greenlet_switch((greenlet*)fiber, data);
-#else
-
-#endif
-
-            if (fiber == 0)
-            {
-                if (fiberPassData == 1)
-                {
-                    throw FiberExit();
-                }
-            }
-
-            return r;
-        }
-
-        bool isdead(handle fiber)
-        {
-#if __S3E__
-            return !IwFibreIsRunning((IwFibre*) fiber);
-#elif GREENLETS
-            return greenlet_isdead((greenlet*) fiber) != 0;
-#else
-            return false;
-#endif
-        }
-    }
-}

+ 0 - 26
oxygine/src/core/coroutines.h

@@ -1,26 +0,0 @@
-#pragma once
-#include "oxygine-include.h"
-
-namespace oxygine
-{
-    namespace coroutine
-    {
-        class FiberExit
-        {
-        public:
-
-        };
-
-        typedef void* handle;
-
-        typedef void* (*fiberFunc)(void* param);
-
-        void init();
-        handle create(fiberFunc func, int stackSize, void* param);
-        handle current();
-
-        void terminate(handle fiber, int data = 0);
-        int resume(handle fiber = 0, int data = 0);
-        bool isdead(handle fiber);
-    }
-}

+ 0 - 2
oxygine/src/core/oxygine.cpp

@@ -56,8 +56,6 @@
 #endif
 
 #ifdef OXYGINE_SDL
-#include "coroutines.h"
-
 extern "C"
 {
 #include "SDL.h"

+ 0 - 1
oxygine/src/oxygine-framework.h

@@ -49,7 +49,6 @@
 //#include "closure/closure_impl.h"
 
 //core/
-#include "core/coroutines.h"
 #include "core/file.h"
 #include "core/ImageData.h"
 #include "core/ImageDataOperations.h"