Ejemplo n.º 1
0
	void onSrcRectChange()
	{
		if (mirrored)
			quad.setTexRect(srcRect->toFloatRect().hFlipped());
		else
			quad.setTexRect(srcRect->toFloatRect());

		quad.setPosRect(IntRect(0, 0, srcRect->width, srcRect->height));
		recomputeBushDepth();
	}
Ejemplo n.º 2
0
	void onSrcRectChange()
	{
		if (mirrored)
			quad.setTexRect(srcRect->toFloatRect().hFlipped());
		else
			quad.setTexRect(srcRect->toFloatRect());

		quad.setPosRect(IntRect(0, 0, srcRect->width, srcRect->height));
		recomputeBushDepth();

#ifdef RGSS2
		wave.dirty = true;
#endif
	}
Ejemplo n.º 3
0
	void updateQuadSource()
	{
		FloatRect srcRect;
		srcRect.x = (sceneGeo.yOrigin + ox) / zoomX;
		srcRect.y = (sceneGeo.xOrigin + oy) / zoomY;
		srcRect.w = sceneGeo.rect.w / zoomX;
		srcRect.h = sceneGeo.rect.h / zoomY;

		quad.setTexRect(srcRect);
	}
Ejemplo n.º 4
0
	void onSrcRectChange()
	{
		FloatRect rect = srcRect->toFloatRect();
		Vec2i bmSize;

		if (!nullOrDisposed(bitmap))
			bmSize = Vec2i(bitmap->width(), bitmap->height());

		/* Clamp the rectangle so it doesn't reach outside
		 * the bitmap bounds */
		rect.w = clamp<int>(rect.w, 0, bmSize.x-rect.x);
		rect.h = clamp<int>(rect.h, 0, bmSize.y-rect.y);

		quad.setTexRect(mirrored ? rect.hFlipped() : rect);

		quad.setPosRect(FloatRect(0, 0, rect.w, rect.h));
		recomputeBushDepth();

		wave.dirty = true;
	}