At mikade's request, expose screenheight/screenwidth and allow setting tag zoom level
authornemo
Tue, 16 Aug 2011 21:37:10 -0400
changeset 5583 63b274a4fb01
parent 5582 48ced03a9949
child 5584 e0b9722bd653
At mikade's request, expose screenheight/screenwidth and allow setting tag zoom level
hedgewars/uScript.pas
hedgewars/uVisualGears.pas
--- a/hedgewars/uScript.pas	Tue Aug 16 21:57:58 2011 +0400
+++ b/hedgewars/uScript.pas	Tue Aug 16 21:37:10 2011 -0400
@@ -1539,6 +1539,8 @@
 // push game variables so they may be modified by the script
 ScriptSetInteger('GameFlags', GameFlags);
 ScriptSetString('Seed', cSeed);
+ScriptSetInteger('ScreenHeight', cScreenHeight);
+ScriptSetInteger('ScreenWidth', cScreenWidth);
 ScriptSetInteger('TurnTime', cHedgehogTurnTime);
 ScriptSetInteger('CaseFreq', cCaseFactor);
 ScriptSetInteger('HealthCaseProb', cHealthCaseProb);
--- a/hedgewars/uVisualGears.pas	Tue Aug 16 21:57:58 2011 +0400
+++ b/hedgewars/uVisualGears.pas	Tue Aug 16 21:37:10 2011 -0400
@@ -484,8 +484,9 @@
                             if Gear^.Frame = 0 then 
                                 DrawCentered(round(Gear^.X) + WorldDx, round(Gear^.Y) + WorldDy, Gear^.Tex)
                             else
-                                begin 
-                                SetScale(cDefaultZoomLevel); 
+                                begin
+                                if Gear^.Angle <> 0 then SetScale(Gear^.Angle)
+                                else SetScale(cDefaultZoomLevel); 
                                 DrawTexture(round(Gear^.X), round(Gear^.Y), Gear^.Tex); 
                                 SetScale(zoom)
                                 end