Game Development Community

[T2D iPhone 1.0 Beta] _LUMA_STATICSPRITE_SOURCERECT bug

by Luke Lamothe · in iTorque 2D · 09/14/2009 (8:56 am) · 1 replies

There is a bug in the code that I sent through to Mich for integration into this update in the Source Rects for Static Sprites. In t2dStaticSprite.cc around Line 308 (inside of #ifdef TORQUE_OS_IPHONE version of t2dStaticSprite::renderObject()), the texVerts[] array is build using the old "mSrcRect" values instead of the new "mSrcTexCoords" ones. So, the code that is this:

//New texCoords based on the source rects
	mSrcRect.point.x, mSrcRect.point.y,
	mSrcRect.extent.x, mSrcRect.point.y,
	mSrcRect.point.x, mSrcRect.extent.y,
	mSrcRect.extent.x, mSrcRect.extent.y,

should actually look like this:

//New texCoords based on the source rects
	mSrcTexCoords.point.x, mSrcTexCoords.point.y,
	mSrcTexCoords.extent.x, mSrcTexCoords.point.y,
	mSrcTexCoords.point.x, mSrcTexCoords.extent.y,
	mSrcTexCoords.extent.x, mSrcTexCoords.extent.y,


Sorry about that everyone!

#1
09/15/2009 (6:50 am)
nice catch, will hopefully make its official appearance in T2Di 1.0 Beta 2 :)