--- a/hedgewars/uStore.pas Mon Mar 02 17:33:49 2009 +0000
+++ b/hedgewars/uStore.pas Mon Mar 02 21:13:07 2009 +0000
@@ -35,7 +35,7 @@
procedure DrawRotatedTex(Tex: PTexture; hw, hh, X, Y, Dir: LongInt; Angle: real);
procedure DrawCentered(X, Top: LongInt; Source: PTexture);
procedure DrawFromRect(X, Y: LongInt; r: PSDL_Rect; SourceTexture: PTexture);
-procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
+procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real; Invulnerable: boolean);
procedure DrawFillRect(r: TSDL_Rect);
function RenderStringTex(s: string; Color: Longword; font: THWFont): PTexture;
procedure RenderHealth(var Hedgehog: THedgehog);
@@ -496,7 +496,7 @@
DrawTexture(X - Source^.w div 2, Top, Source)
end;
-procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real);
+procedure DrawHedgehog(X, Y: LongInt; Dir: LongInt; Pos, Step: LongWord; Angle: real; Invulnerable: boolean);
var l, r, t, b: real;
begin
@@ -522,6 +522,9 @@
glBegin(GL_QUADS);
+if Invulnerable then // twiddling the channels a bit. perhaps a pixmap or something would be better.
+ glColor4ub($CC, $FF, $0, $C0);
+
glTexCoord2f(l, t);
glVertex2i(-16, -16);
@@ -534,7 +537,9 @@
glTexCoord2f(l, b);
glVertex2i(-16, 16);
+
glEnd();
+glColor4f(1,1,1,1);
glPopMatrix
end;