Permalink
Browse files

GLVideoDriver: Lighting in spells

  • Loading branch information...
1 parent 0927698 commit 585357f41625c015bbe8adec85520c6809948b7a @BehoIder BehoIder committed with lynxlynxlynx Feb 25, 2014
@@ -143,7 +143,7 @@ void GLTextureSprite2D::createGlTexture()
Uint8 g = (src & gMask) >> GetShiftValue(gMask);
Uint8 b = (src & bMask) >> GetShiftValue(bMask);
Uint8 a = (src & aMask) >> GetShiftValue(aMask);
- if (a == 0) a = 0xFF; //no transparency
+ if (a == 0 && aMask == 0) a = 0xFF; //no transparency
if (src == colorKeyIndex) a = 0x00; // transparent
buffer[i] = r | (g << 8) | (b << 16) | (a << 24);
}
@@ -569,7 +569,7 @@ void GLVideoDriver::BlitGameSprite(const Sprite2D* spr, int x, int y, unsigned i
}
}
- if (tint.r == tint.g == tint.b == 0)
+ if (tint.r == 0 && tint.g == 0 && tint.b == 0)
blitSprite(glSprite, tx, ty, clip, palette, flags);
else
blitSprite(glSprite, tx, ty, clip, palette, flags, &tint);
@@ -704,9 +704,9 @@ void GLVideoDriver::DrawEllipse(short cx, short cy, unsigned short xr, unsigned
}
return drawEllipse(cx, cy, xr, yr, 3, color);
}
-
+/*
void GLVideoDriver::DrawEllipseSegment(short cx, short cy, unsigned short xr, unsigned short yr, const Color& color, double anglefrom, double angleto, bool drawlines, bool clipped)
-{}
+{}*/
void GLVideoDriver::DrawCircle(short cx, short cy, unsigned short r, const Color& color, bool clipped)
{
@@ -67,7 +67,7 @@ namespace GemRB
void DrawPolyline(Gem_Polygon* poly, const Color& color, bool fill = false);
void DrawEllipse(short cx, short cy, unsigned short xr, unsigned short yr, const Color& color, bool clipped = true);
void DrawCircle(short cx, short cy, unsigned short r, const Color& color, bool clipped = true);
- void DrawEllipseSegment(short cx, short cy, unsigned short xr, unsigned short yr, const Color& color, double anglefrom, double angleto, bool drawlines = true, bool clipped = true);
+ /*void DrawEllipseSegment(short cx, short cy, unsigned short xr, unsigned short yr, const Color& color, double anglefrom, double angleto, bool drawlines = true, bool clipped = true);*/
void DestroyMovieScreen();
Sprite2D* GetScreenshot(Region r);
};

0 comments on commit 585357f

Please sign in to comment.