Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

GLVideoDriver: Lighting in spells

  • Loading branch information...
commit 585357f41625c015bbe8adec85520c6809948b7a 1 parent 0927698
@BehoIder BehoIder authored lynxlynxlynx committed
View
2  gemrb/plugins/SDLVideo/GLTextureSprite2D.cpp
@@ -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);
}
View
6 gemrb/plugins/SDLVideo/SDL20GLVideo.cpp
@@ -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)
{
View
2  gemrb/plugins/SDLVideo/SDL20GLVideo.h
@@ -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);
};
Please sign in to comment.
Something went wrong with that request. Please try again.