mirror of
https://github.com/jmarshall23/CnC_Remastered_Collection.git
synced 2026-08-12 08:00:55 +02:00
Fixed a bug were shapes that were partially off screen would get clipped.
This commit is contained in:
@@ -81,11 +81,11 @@ void GL_RenderLine(int x1, int y1, int x2, int y2, int r, int g, int b, float th
|
|||||||
void GL_RenderImage(Image_t* image, int x, int y, int width, int height, int colorRemap, int shapeId, bool ignoreOutOfScreenPixels, bool flipUV) {
|
void GL_RenderImage(Image_t* image, int x, int y, int width, int height, int colorRemap, int shapeId, bool ignoreOutOfScreenPixels, bool flipUV) {
|
||||||
if (!ignoreOutOfScreenPixels)
|
if (!ignoreOutOfScreenPixels)
|
||||||
{
|
{
|
||||||
if (x < 0 || y < 0) {
|
if (x + width < 0 || y + height < 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x >= ScreenWidth || y >= ScreenHeight) {
|
if (x - width >= ScreenWidth || y - height >= ScreenHeight) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user