| 302 | } |
| 303 | |
| 304 | void BatchRenderer::batchQuadEx( Float x, Float y, Float width, Float height, Float angle, |
| 305 | Vector2f scale, OriginPoint originPoint ) { |
| 306 | if ( mNumVertex + ( GLi->quadsSupported() ? 3 : 5 ) >= mVertexSize ) |
| 307 | return; |
| 308 | |
| 309 | if ( originPoint.OriginType == OriginPoint::OriginCenter ) { |
| 310 | originPoint.x = width * 0.5f; |
| 311 | originPoint.y = height * 0.5f; |
| 312 | } |
| 313 | |
| 314 | if ( scale != 1.0f ) { |
| 315 | x = x + originPoint.x - originPoint.x * scale.x; |
| 316 | y = y + originPoint.y - originPoint.y * scale.y; |
| 317 | width *= scale.x; |
| 318 | height *= scale.y; |
| 319 | originPoint *= scale; |
| 320 | } |
| 321 | |
| 322 | originPoint.x += x; |
| 323 | originPoint.y += y; |
| 324 | |
| 325 | setDrawMode( PRIMITIVE_QUADS, mForceBlendMode ); |
| 326 | |
| 327 | if ( GLi->quadsSupported() ) { |
| 328 | mTVertex = &mVertex[mNumVertex]; |
| 329 | mTVertex->pos.x = x; |
| 330 | mTVertex->pos.y = y; |
| 331 | mTVertex->tex = mTexCoord[0]; |
| 332 | mTVertex->color = mVerColor[0]; |
| 333 | rotate( originPoint, &mTVertex->pos, angle ); |
| 334 | |
| 335 | mTVertex = &mVertex[mNumVertex + 1]; |
| 336 | mTVertex->pos.x = x; |
| 337 | mTVertex->pos.y = y + height; |
| 338 | mTVertex->tex = mTexCoord[1]; |
| 339 | mTVertex->color = mVerColor[1]; |
| 340 | rotate( originPoint, &mTVertex->pos, angle ); |
| 341 | |
| 342 | mTVertex = &mVertex[mNumVertex + 2]; |
| 343 | mTVertex->pos.x = x + width; |
| 344 | mTVertex->pos.y = y + height; |
| 345 | mTVertex->tex = mTexCoord[2]; |
| 346 | mTVertex->color = mVerColor[2]; |
| 347 | rotate( originPoint, &mTVertex->pos, angle ); |
| 348 | |
| 349 | mTVertex = &mVertex[mNumVertex + 3]; |
| 350 | mTVertex->pos.x = x + width; |
| 351 | mTVertex->pos.y = y; |
| 352 | mTVertex->tex = mTexCoord[3]; |
| 353 | mTVertex->color = mVerColor[3]; |
| 354 | rotate( originPoint, &mTVertex->pos, angle ); |
| 355 | |
| 356 | addVertices( 4 ); |
| 357 | } else { |
| 358 | mTVertex = &mVertex[mNumVertex]; |
| 359 | mTVertex->pos.x = x; |
| 360 | mTVertex->pos.y = y + height; |
| 361 | mTVertex->tex = mTexCoord[1]; |
no outgoing calls
no test coverage detected