fix some more warnings
authorkoda
Thu, 28 Apr 2011 01:01:07 +0200
changeset 5186 a05c14510c8a
parent 5185 7607a64e1853
child 5187 b01ab1ef01fb
fix some more warnings
hedgewars/GSHandlers.inc
hedgewars/VGSHandlers.inc
hedgewars/uStore.pas
--- a/hedgewars/GSHandlers.inc	Thu Apr 28 00:16:36 2011 +0200
+++ b/hedgewars/GSHandlers.inc	Thu Apr 28 01:01:07 2011 +0200
@@ -615,7 +615,7 @@
             end;
 
         inc(Health, 8);
-        if Health > vobFrameTicks then
+        if longword(Health) > vobFrameTicks then
             begin
             dec(Health, vobFrameTicks);
             inc(Timer);
--- a/hedgewars/VGSHandlers.inc	Thu Apr 28 00:16:36 2011 +0200
+++ b/hedgewars/VGSHandlers.inc	Thu Apr 28 01:01:07 2011 +0200
@@ -486,7 +486,7 @@
 
 Gear^.Hedgehog^.SpeechGear:= Gear;
 
-Gear^.Timer:= max(Length(Gear^.Text) * 150, 3000);
+Gear^.Timer:= max(LongInt(Length(Gear^.Text)) * 150, 3000);
 
 Gear^.Tex:= RenderSpeechBubbleTex(Gear^.Text, Gear^.FrameTicks, fnt16);
 
--- a/hedgewars/uStore.pas	Thu Apr 28 00:16:36 2011 +0200
+++ b/hedgewars/uStore.pas	Thu Apr 28 01:01:07 2011 +0200
@@ -510,26 +510,23 @@
 {$IFNDEF IPHONEOS}
 var vendor: shortstring;
 {$IFDEF DARWIN}
-    one: LongInt;
+const one = 1;
 {$ENDIF}
 {$ENDIF}
 begin
 
 {$IFDEF IPHONEOS}
-    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0); // no double buffering
+    SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 0);
     SDL_GL_SetAttribute(SDL_GL_RETAINED_BACKING, 1);
 {$ELSE}
     SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1);
     vendor:= LowerCase(shortstring(pchar(glGetString(GL_VENDOR))));
 {$IFNDEF SDL13}
 // this attribute is default in 1.3 and must be enabled in MacOSX
-    if (cReducedQuality and rqDesyncVBlank) <> 0 then
-        SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 0)
-    else
-        SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, 1);
+    SDL_GL_SetAttribute(SDL_GL_SWAP_CONTROL, ((cReducedQuality and rqDesyncVBlank) = 0))
+
 {$IFDEF DARWIN}
 // fixes vsync in Snow Leopard
-    one:= 1;
     CGLSetParameter(CGLGetCurrentContext(), 222, @one);
 {$ENDIF}
 {$ENDIF}