Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH
authorWuzzy <Wuzzy2@mail.ru>
Mon, 03 Sep 2018 12:46:57 +0200
changeset 13752 110d6c1e817f
parent 13751 0e8db74ec585
child 13753 5985ee7a4922
Lua: Rename globals: NoPointX→NO_CURSOR, cMaxTurnTime→MAX_TURN_TIME, cMaxHogHealth→MAX_HOG_HEALTH These globals did not exist in 0.9.24, so this change is safe.
ChangeLog.txt
hedgewars/uScript.pas
share/hedgewars/Data/Maps/ClimbHome/map.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua
share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/united.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua
share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua
share/hedgewars/Data/Missions/Challenge/ClimbHome.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua
share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua
share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua
share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua
share/hedgewars/Data/Scripts/Animate.lua
share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua
share/hedgewars/Data/Scripts/Multiplayer/WxW.lua
--- a/ChangeLog.txt	Mon Sep 03 05:05:00 2018 +0200
+++ b/ChangeLog.txt	Mon Sep 03 12:46:57 2018 +0200
@@ -123,12 +123,12 @@
  + New parameter: ShowMission: 6th param. forceDisplay: Set to true to prevent this particular mission panel to be hidden manually by player
  + New Lua library: Achievements
  + Add sprite tint globals in Utilts library: U_LAND_TINT_NORMAL, U_LAND_TINT_ICE, U_LAND_TINT_INDESTRUCTIBLE and U_LAND_TINT_BOUNCY
- + Can enable infinite fly time for jetpack/Birdy by setting health to JETPACK_FUEL_INFINITE or BIRDY_ENERGY_INFINITE, respectively
+ + New globals: Infinite fly time for jetpack/Birdy by setting health to JETPACK_FUEL_INFINITE or BIRDY_ENERGY_INFINITE, respectively
  + New global game variable: MaxCaseDrops. Max. number of crats which can be in game by crate drops
- + New global: NoPointX. Value of CursorX and CursorY if cursor is inactive
+ + New global: NO_CURSOR. Value of CursorX and CursorY if cursor is inactive
  + New global: AMMO_INFINITE. Value for infinite ammo count for AddAmmo and other functions
- + New global: cMaxHogHealth. Maximum possible hedgehog health
- + New global: cMaxTurnTime. Maximum possible turn time
+ + New global: MAX_HOG_HEALTH. Maximum possible hedgehog health
+ + New global: MAX_TURN_TIME. Maximum possible turn time
  + New global: EXPLForceDraw. Flag for Explode function, forces land removal even with gfSolidLand on
  + New globals: capcolDefault, capcolSetting: Default caption colors
  * Animate library: Remove defunct follow argument for AnimVisualGear
--- a/hedgewars/uScript.pas	Mon Sep 03 05:05:00 2018 +0200
+++ b/hedgewars/uScript.pas	Mon Sep 03 12:46:57 2018 +0200
@@ -4023,9 +4023,9 @@
 ScriptSetInteger('AMMO_INFINITE', AMMO_INFINITE);
 ScriptSetInteger('JETPACK_FUEL_INFINITE', JETPACK_FUEL_INFINITE);
 ScriptSetInteger('BIRDY_ENERGY_INFINITE', BIRDY_ENERGY_INFINITE);
-ScriptSetInteger('NoPointX', NoPointX);
-ScriptSetInteger('cMaxHogHealth', cMaxHogHealth);
-ScriptSetInteger('cMaxTurnTime', cMaxTurnTime);
+ScriptSetInteger('NO_CURSOR', NoPointX);
+ScriptSetInteger('MAX_HOG_HEALTH', cMaxHogHealth);
+ScriptSetInteger('MAX_TURN_TIME', cMaxTurnTime);
 
 // register gear types
 for at:= Low(TGearType) to High(TGearType) do
--- a/share/hedgewars/Data/Maps/ClimbHome/map.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Maps/ClimbHome/map.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -86,7 +86,7 @@
 
 function onGameInit()
     -- Ensure people get same map for same theme
-    TurnTime = cMaxTurnTime
+    TurnTime = MAX_TURN_TIME
     CaseFreq = 0
     Explosives = 0
     MineDudPercent = 0
@@ -348,7 +348,7 @@
 
     if CurrentHedgehog ~= nil and TurnTimeLeft > 0 and band(GetState(CurrentHedgehog),gstHHDriven) ~= 0 then
         if MaxHeight < delayHeight and
-           TurnTimeLeft<(cMaxTurnTime-delayTime) and
+           TurnTimeLeft<(MAX_TURN_TIME-delayTime) and
             MaxHeight > 286 and WaterLine > 286 then
             if waterAccel ~= 0 then
                 SetWaterLine(WaterLine-(baseWaterSpeed+div(getActualHeight(MaxHeight)*100,waterAccel)))
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/backstab.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -587,7 +587,7 @@
   AddAmmo(speakerHog, amSwitch, 100)
   SetGearMessage(speakerHog, 0)
   SetState(speakerHog, 0)
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
   ShowMission(loc("Backstab"), loc("The food bites back"), loc("Defeat the cannibals"), 1, 4000)
   SpawnCrates()
 end
@@ -1106,7 +1106,7 @@
 function onNewTurn()
   tmpVar = 0
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     return
   end
 
@@ -1131,7 +1131,7 @@
     else
       SetGearMessage(CurrentHedgehog, 0)
       --AnimSwitchHog(natives[leaksNum])
-      SetTurnTimeLeft(cMaxTurnTime)
+      SetTurnTimeLeft(MAX_TURN_TIME)
     end
   else
     if freshDead ~= nil and GetHogTeamName(CurrentHedgehog) == loc("Natives") then
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/enemy.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -676,7 +676,7 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     return
   end
   if playersDeadFresh then
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/epil.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -484,14 +484,14 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     return
   end
   -- Don't allow player to play with traitor, except when it is the final hog left
   if CurrentHedgehog == traitor and not IsEveryoneExceptTraitorDead() then
     EndTurn(true)
   else
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
   end
 end
 
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/family.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -636,7 +636,7 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     return
   end
   if CurrentHedgehog == cyborg then
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/first_blood.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -546,7 +546,7 @@
 
 function DoCratesColled()
   RemoveEventFunc(CheckTimesUp)
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
   AddCaption(loc("As the challenge was completed, Leaks A Lot set foot on the ground..."))
 end
 
@@ -573,7 +573,7 @@
   challengeFailed = true
   deleteCrate = true
   DeleteGear(crates[1])
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
   AddCaption(loc("And so happened that Leaks A Lot failed to complete the challenge! He landed, pressured by shame ..."))
   AddEvent(CheckChallengeFailed, {}, DoChallengeFailed, {}, 0)
 end
@@ -751,7 +751,7 @@
 
 function onGameStart()
   progress = tonumber(GetCampaignVar("Progress"))
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
   FollowGear(youngh)
 	ShowMission(loc("A Classic Fairytale"), loc("First Blood"), loc("Finish your training|Hint: Animations can be skipped with the [Precise] key."), -amSkip, 0)
   HideHog(cannibal)
@@ -846,7 +846,7 @@
   end
   SwitchHog(youngh)
   FollowGear(youngh)
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
 end
 
 function onGearDamage(gear, damage)
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/journey.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -230,7 +230,7 @@
   stage = endStage
   SwitchHog(leaks)
   SetGearMessage(leaks, 0)
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   AddEvent(CheckLost, {}, DoLost, {}, 0)
   AddEvent(CheckWon, {}, DoWon, {}, 0)
@@ -242,7 +242,7 @@
   SwitchHog(leaks)
   SetGearMessage(leaks, 0)
   SetGearMessage(dense, 0)
-  SetTurnTimeLeft(cMaxTurnTime)
+  SetTurnTimeLeft(MAX_TURN_TIME)
   ShowMission(loc("The Journey Back"), loc("Collateral Damage II"), loc("Save Fell From Heaven!"), 1, 4000)
   AddEvent(CheckLost, {}, DoLost, {}, 0)
   AddEvent(CheckWon, {}, DoWon, {}, 0)
@@ -1188,13 +1188,13 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
   elseif victory then
     EndTurn(true)
   elseif stage == endStage and CurrentHedgehog ~= leaks then
     AnimSwitchHog(leaks)
     SetGearMessage(leaks, 0)
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
   elseif GetHogTeamName(CurrentHedgehog) ~= loc("Natives") then
     SetTurnTimeLeft(20000)
   else
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/queen.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -858,7 +858,7 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     return
   end
   if GetHogTeamName(CurrentHedgehog) == loc("011101001") then
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/shadow.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -1091,17 +1091,17 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
   elseif stage == cyborgStage then
     if CurrentHedgehog ~= dense then
       EndTurn(true)
     else
-      SetTurnTimeLeft(cMaxTurnTime)
+      SetTurnTimeLeft(MAX_TURN_TIME)
     end
   elseif stage == acceptedReturnStage then
     SwitchHog(dense)
     FollowGear(dense)
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
   end
 end
 
--- a/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/united.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Classic_Fairytale/united.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -532,7 +532,7 @@
 
 function onNewTurn()
   if AnimInProgress() then
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     return
   end
   if freshDead ~= nil and GetHogTeamName(CurrentHedgehog) == loc("Natives") then
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/cosmos.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -306,7 +306,7 @@
 			getReadyForRumble = false
 		else
 			if guard1.keepTurning then
-				SetTurnTimeLeft(cMaxTurnTime)
+				SetTurnTimeLeft(MAX_TURN_TIME)
 			end
 		end
 	elseif not onHeroDeath() and CurrentHedgehog == director.gear or CurrentHedgehog == doctor.gear then
@@ -468,7 +468,7 @@
 			SaveCampaignVar("HeroHealth",GetHealth(hero.gear))
 		end
 		AnimCaption(hero.gear,loc("Welcome to the moon!"))
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 		SaveCampaignVar("HeroHealth", GetHealth(hero.gear))
 		SaveCampaignVar("Planet", "moon")
 		SaveCampaignVar("UnlockedMissions", "3")
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert01.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -213,9 +213,9 @@
 	if CurrentHedgehog ~= hero.gear and not heroIsInBattle then
 		AnimSwitchHog(hero.gear)
 		getReady(hero.gear)
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 	elseif CurrentHedgehog == hero.gear and not heroIsInBattle then
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 	elseif (CurrentHedgehog == smuggler2.gear or CurrentHedgehog == smuggler3.gear) and ongoingBattle == 1 then
 		AnimSwitchHog(smuggler1.gear)
 		getReady(smuggler1.gear)
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/desert03.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -61,7 +61,7 @@
 function onGameInit()
 	GameFlags = gfOneClanMode
 	Seed = 1
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	Ready = 30000
 	CaseFreq = 0
 	MinesNum = 0
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/final.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -38,7 +38,7 @@
 function onGameInit()
 	GameFlags = gfDisableWind + gfOneClanMode
 	Seed = 1
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	CaseFreq = 0
 	MinesNum = 0
 	MinesTime = 1
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/fruit02.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -245,7 +245,7 @@
 		SetTurnTimeLeft(20000)
 		wind()
 	elseif not inBattle and CurrentHedgehog == hero.gear then
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 		wind()
 	else
 		EndTurn(true)
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/ice01.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -240,7 +240,7 @@
 	if not heroVisitedAntiFlyArea and CurrentHedgehog ~= hero.gear then
 		EndTurn(true)
 	elseif not heroVisitedAntiFlyArea and CurrentHedgehog == hero.gear then
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 	elseif not heroAtFinalStep and (CurrentHedgehog == bandit1.gear or CurrentHedgehog == bandit4.gear or CurrentHedgehog == bandit5.gear) then
 		AnimSwitchHog(hero.gear)
 		EndTurn(true)
--- a/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Campaign/A_Space_Adventure/moon01.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -245,7 +245,7 @@
 	-- rounds start if hero got his weapons or got near the enemies
 	if CurrentHedgehog == hero.gear then
 		if not weaponsAcquired and not battleZoneReached then
-			SetTurnTimeLeft(cMaxTurnTime)
+			SetTurnTimeLeft(MAX_TURN_TIME)
 		end
 	elseif CurrentHedgehog == minion1.gear or CurrentHedgehog == minion2.gear or CurrentHedgehog == minion3.gear then
 		if not battleZoneReached then
--- a/share/hedgewars/Data/Missions/Challenge/ClimbHome.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/ClimbHome.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -16,7 +16,7 @@
     -- Ensure people get same map for same theme
     Theme = themes[GetRandom(#themes)+1]
     Seed = ClimbHome
-    TurnTime = cMaxTurnTime
+    TurnTime = MAX_TURN_TIME
     EnableGameFlags(gfOneClanMode)
     DisableGameFlags(gfBottomBorder+gfBorder)
     CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_RCPlane_Challenge.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -21,7 +21,7 @@
 	GameFlags = gfInfAttack + gfInvulnerable + gfOneClanMode + gfSolidLand
 
 	-- Basically unlimited turn time
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 
 	Map = "Ropes"
 	Theme = "Eyes"
@@ -279,7 +279,7 @@
 end
 
 function onNewTurn()
-	SetTurnTimeLeft(cMaxTurnTime)
+	SetTurnTimeLeft(MAX_TURN_TIME)
 end
 
 function onGearAdd(gear)
--- a/share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Challenge/User_Mission_-_That_Sinking_Feeling.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -86,7 +86,7 @@
 
 
 function onNewTurn()
-	SetTurnTimeLeft(cMaxTurnTime)
+	SetTurnTimeLeft(MAX_TURN_TIME)
 end
 
 function onGameTick()
--- a/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Scenario/User_Mission_-_Teamwork_2.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -13,7 +13,7 @@
 function onGameInit()
 	Seed = 0
 	GameFlags = gfDisableWind
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	CaseFreq = 0
 	MinesNum = 0
 	MinesTime = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Bazooka.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -38,7 +38,7 @@
 	Seed = 0
 	Theme = "Nature"
 	MapGen = mgDrawn
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Flying_Saucer.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -365,7 +365,7 @@
 function onGameInit()
 	Seed = 1
 	GameFlags = gfInfAttack + gfOneClanMode + gfSolidLand + gfDisableWind
-	TurnTime = cMaxTurnTime --[[ This effectively hides the turn time; a turn time above 1000s is not displayed.
+	TurnTime = MAX_TURN_TIME --[[ This effectively hides the turn time; a turn time above 1000s is not displayed.
 			   	     We will also ensure this timer always stays above 999s later ]]
 	CaseFreq = 0
 	MinesNum = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Grenade.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -30,7 +30,7 @@
 	Map = "Mushrooms"
 	Seed = 0
 	Theme = "Nature"
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Movement.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -103,7 +103,7 @@
 	Seed = 0
 	Theme = "Brick"
 	MapGen = mgDrawn
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Missions/Training/Basic_Training_-_Rope.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -110,7 +110,7 @@
 	MapFeatureSize = 12
 	TemplateFilter = 0
 	TemplateNumber = 0
-	TurnTime = cMaxTurnTime
+	TurnTime = MAX_TURN_TIME
 	Explosives = 0
 	MinesNum = 0
 	CaseFreq = 0
--- a/share/hedgewars/Data/Scripts/Animate.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Animate.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -310,7 +310,7 @@
     skipping = false
     return true
   else
-    SetTurnTimeLeft(cMaxTurnTime)
+    SetTurnTimeLeft(MAX_TURN_TIME)
     if Animate(AnimList[1]) == true then
       RemoveAnim()
     end
--- a/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/HedgeEditor.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -2868,7 +2868,7 @@
 
 -- Display the X and Y coordinates of the cursor while the cursor is active
 function updateCursorCoords()
-	if band(GetState(CurrentHedgehog), gstChooseTarget) ~= 0 and CursorX ~= NoPointX then
+	if band(GetState(CurrentHedgehog), gstChooseTarget) ~= 0 and CursorX ~= NO_CURSOR then
 		local x1, y = 12, 24
 		if tagCursorX then
 			DeleteVisualGear(tagCursorX)
@@ -3785,7 +3785,7 @@
 	-- regardless of our other ammo, give stuff that is useful for editing
 	SetEditingWeps(100)
 	if GetHogLevel(CurrentHedgehog) == 0 then
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 	else
 		SkipTurn() -- skip the computer's turn
 	end
--- a/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Mon Sep 03 05:05:00 2018 +0200
+++ b/share/hedgewars/Data/Scripts/Multiplayer/WxW.lua	Mon Sep 03 12:46:57 2018 +0200
@@ -1280,7 +1280,7 @@
 		if roundN < 2 then
 			SetWeapon(amSkip)
 			AddAmmo(CurrentHedgehog, amTeleport, 0)
-			SetTurnTimeLeft(cMaxTurnTime)
+			SetTurnTimeLeft(MAX_TURN_TIME)
 			SetInputMask(0)
 		end
 		if roundN == 2 then
@@ -1337,7 +1337,7 @@
 	end
 
 	if roundN == 1 then
-		SetTurnTimeLeft(cMaxTurnTime)
+		SetTurnTimeLeft(MAX_TURN_TIME)
 		SetInputMask(0)
 		allowCrate = false
 		UpdateMenu()