瀏覽代碼

fixed marmalade build

dmuratshin 10 年之前
父節點
當前提交
4b84e7aa47
共有 4 個文件被更改,包括 26 次插入4 次删除
  1. 9 0
      oxygine/src/Font.h
  2. 4 4
      oxygine/src/core/s3e/MyHttp.cpp
  3. 5 0
      oxygine/src/res/Resources.cpp
  4. 8 0
      oxygine/src/res/Resources.h

+ 9 - 0
oxygine/src/Font.h

@@ -2,7 +2,11 @@
 #include "oxygine_include.h"
 #include "core/Object.h"
 #include "math/Rect.h"
+#ifdef __S3E__
+#include <set>
+#else
 #include <unordered_set>
+#endif
 namespace oxygine
 {
     DECLARE_SMART(NativeTexture, spNativeTexture);
@@ -25,6 +29,7 @@ namespace oxygine
         spNativeTexture texture;
 
         bool operator == (const glyph& r) const {return ch == r.ch;}
+        bool operator < (const glyph& r) const { return ch < r.ch; }
     };
 
     struct GlyphHasher
@@ -59,7 +64,11 @@ namespace oxygine
 
         virtual bool loadGlyph(int code, glyph&) { return false; }
 
+#ifdef __S3E__
+        typedef std::set<glyph> glyphs;
+#else
         typedef std::unordered_set<glyph, GlyphHasher> glyphs;
+#endif
         glyphs _glyphs;
 
         float _scale;

+ 4 - 4
oxygine/src/core/s3e/MyHttp.cpp

@@ -87,7 +87,7 @@ void MyHttp::get(const string& url)
     _http = new CIwHTTP;
     //_http->SetRequestHeader("Content-type", "application/x-www-form-urlencoded");
 
-    if (!isNetworkAvaible())
+    if (!isNetworkAvailable())
     {
         //it is too dangerous call onError from there
         //do it at next update
@@ -116,7 +116,7 @@ void MyHttp::post(const string& url, const char* data, int size)
     _http = new CIwHTTP;
     _http->SetRequestHeader("Content-type", "application/x-www-form-urlencoded");
 
-    if (!isNetworkAvaible())
+    if (!isNetworkAvailable())
     {
         //it is too dangerous call onError from there
         //do it at next update
@@ -298,7 +298,7 @@ public:
 
 void makeSingleHttpAsyncGetRequest(const char* url)
 {
-    if (!isNetworkAvaible())
+    if (!isNetworkAvailable())
         return;
 
     SingleHttpAsyncRequest* r = new SingleHttpAsyncRequest;
@@ -307,7 +307,7 @@ void makeSingleHttpAsyncGetRequest(const char* url)
 
 void makeSingleHttpAsyncPostRequest(const char* url, const char* data, int size)
 {
-    if (!isNetworkAvaible())
+    if (!isNetworkAvailable())
         return;
 
     SingleHttpAsyncRequest* r = new SingleHttpAsyncRequest;

+ 5 - 0
oxygine/src/res/Resources.cpp

@@ -325,7 +325,12 @@ namespace oxygine
     void Resources::print() const
     {
         log::message("resources:\n");
+#ifdef __S3E__
+        for (resourcesMap::const_iterator i = _resourcesMap.begin(); i != _resourcesMap.end(); ++i)
+#else
         for (resourcesMap::const_iterator i = _resourcesMap.cbegin(); i != _resourcesMap.cend(); ++i)
+#endif
+
         {
             spResource res = i->second;
             log::message("%s\n", res->getName().c_str());

+ 8 - 0
oxygine/src/res/Resources.h

@@ -7,7 +7,11 @@
 #include "closure/closure.h"
 #include "core/Object.h"
 #include "Resource.h"
+#ifdef __S3E__
+#include <map>
+#else
 #include <unordered_map>
+#endif
 
 namespace pugi
 {
@@ -148,7 +152,11 @@ namespace oxygine
 
 
         resources _resources;
+#ifdef __S3E__
+        typedef std::map<std::string, spResource> resourcesMap;
+#else
         typedef std::unordered_map<std::string, spResource> resourcesMap;
+#endif
         resourcesMap _resourcesMap;