Przeglądaj źródła

- OXYGINE_NO_SUBPIXEL_RENDERING off by default
- fixed TweenAlphaFade with ClipRect

dmuratshin 10 lat temu
rodzic
commit
d149600adb

+ 1 - 24
oxygine/src/Actor.cpp

@@ -93,11 +93,6 @@ namespace oxygine
         //printf("Actor::~Actor %s\n", getName().c_str());
         //printf("Actor::~Actor %s\n", getName().c_str());
         removeTweens();
         removeTweens();
         removeChildren();
         removeChildren();
-        if (_getStage())
-        {
-            //OX_ASSERT(_getStage()->hasEventListeners(this) == false);
-            //_getStage()->removeEventListeners(this);
-        }
     }
     }
 
 
     Stage* Actor::_getStage()
     Stage* Actor::_getStage()
@@ -269,7 +264,6 @@ namespace oxygine
         up.bubbles = false;
         up.bubbles = false;
         up.localPosition = convert_global2local(this, _getStage(), te->localPosition);
         up.localPosition = convert_global2local(this, _getStage(), te->localPosition);
         dispatchEvent(&up);
         dispatchEvent(&up);
-        //log::messageln("out %s", getName().c_str());
 
 
         updateState();
         updateState();
     }
     }
@@ -769,11 +763,6 @@ namespace oxygine
         }
         }
 
 
         actor->detach();
         actor->detach();
-        /*
-        OX_ASSERT(actor->getParent() == 0);
-        if (actor->getParent())
-            return;
-            */
 
 
         if (insertAfter)
         if (insertAfter)
             _children.insert_after(actor, insertAfter);
             _children.insert_after(actor, insertAfter);
@@ -795,13 +784,6 @@ namespace oxygine
 
 
         actor->detach();
         actor->detach();
 
 
-        /*
-        OX_ASSERT(actor->getParent() == 0);
-        if (actor->getParent())
-            return;
-            */
-
-
         if (insertBefore)
         if (insertBefore)
             _children.insert_before(actor, insertBefore);
             _children.insert_before(actor, insertBefore);
         else
         else
@@ -833,7 +815,6 @@ namespace oxygine
         OX_ASSERT(actor != this);
         OX_ASSERT(actor != this);
 
 
         actor->detach();
         actor->detach();
-        //assert(actor->_parent == 0 && "child should be removed from previous parent");
 
 
         int z = actor->getPriority();
         int z = actor->getPriority();
 
 
@@ -1271,11 +1252,7 @@ namespace oxygine
     {
     {
         if (child->getParent() && child->getParent() != parent)
         if (child->getParent() && child->getParent() != parent)
             pos = convert_global2local_(child->getParent(), parent, pos);
             pos = convert_global2local_(child->getParent(), parent, pos);
-        /*
-        Actor *p = child->getParent();
-        if (p && child != parent)
-            pos = convert_global2local(p, parent, pos);
-            */
+
         pos = child->global2local(pos);
         pos = child->global2local(pos);
         return pos;
         return pos;
     }
     }

+ 3 - 0
oxygine/src/TweenAlphaFade.h

@@ -114,6 +114,9 @@ namespace oxygine
             STDRenderer* renderer = STDMaterial::instance->getRenderer();
             STDRenderer* renderer = STDMaterial::instance->getRenderer();
             rs.material = mat;
             rs.material = mat;
 
 
+			RectF clip = vp.cast<RectF>();
+			rs.clip = &clip;
+
             renderer->initCoordinateSystem(vp.getWidth(), vp.getHeight(), true);
             renderer->initCoordinateSystem(vp.getWidth(), vp.getHeight(), true);
 
 
             if (_options & opt_fullscreen)
             if (_options & opt_fullscreen)

+ 1 - 1
oxygine/src/oxygine_include.h

@@ -11,7 +11,7 @@
 // when using textures with linearFilter="false"
 // when using textures with linearFilter="false"
 // and fractional sprite coordinates or sprite scaling.
 // and fractional sprite coordinates or sprite scaling.
 // Introduces some CPU overhead.
 // Introduces some CPU overhead.
-#define OXYGINE_NO_SUBPIXEL_RENDERING 1
+//#define OXYGINE_NO_SUBPIXEL_RENDERING 1
 
 
 //#define OXYGINE_NO_YEILD 1
 //#define OXYGINE_NO_YEILD 1