fix encoding and stupid file host behaviour
authornemo
Sun, 31 Oct 2010 20:24:39 -0400
changeset 4071 20df9c487482
parent 4070 adeaefdcbd64
child 4072 6bc2b8982c7b
fix encoding and stupid file host behaviour
share/hedgewars/Data/Maps/ShoppaKing/map.cfg
share/hedgewars/Data/Maps/Sticks/map.cfg
share/hedgewars/Data/Maps/TrophyRace/map.cfg
share/hedgewars/Data/Maps/TrophyRace/map.lua
share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua
share/hedgewars/Data/Themes/Jungle/theme.cfg
--- a/share/hedgewars/Data/Maps/ShoppaKing/map.cfg	Sun Oct 31 20:19:31 2010 -0400
+++ b/share/hedgewars/Data/Maps/ShoppaKing/map.cfg	Sun Oct 31 20:24:39 2010 -0400
@@ -1,2 +1,2 @@
-Castle
+Castle
 48
\ No newline at end of file
--- a/share/hedgewars/Data/Maps/Sticks/map.cfg	Sun Oct 31 20:19:31 2010 -0400
+++ b/share/hedgewars/Data/Maps/Sticks/map.cfg	Sun Oct 31 20:24:39 2010 -0400
@@ -1,2 +1,2 @@
-Bamboo
+Bamboo
 24
\ No newline at end of file
--- a/share/hedgewars/Data/Maps/TrophyRace/map.cfg	Sun Oct 31 20:19:31 2010 -0400
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.cfg	Sun Oct 31 20:24:39 2010 -0400
@@ -1,2 +1,2 @@
-Olympics
+Olympics
 48
\ No newline at end of file
--- a/share/hedgewars/Data/Maps/TrophyRace/map.lua	Sun Oct 31 20:19:31 2010 -0400
+++ b/share/hedgewars/Data/Maps/TrophyRace/map.lua	Sun Oct 31 20:24:39 2010 -0400
@@ -1,202 +1,202 @@
--- Hedgewars - Roperace for 2+ Players
-
-local caption = {
-	["en"] = "ShoppaKing Map Three: TrophyRace",
-	}
-
-local subcaption = {
-	["en"] = "Made by Wolfmarc and Dragonfly",
-	}
-
-local goal = {
-	["en"] = "Use your rope to get from start to finish as fast as you can!",
-	}
-
-local done = {
-	["en"] = "You've reached the goal!| |Time: ",
-	}
-local eliminated = {
-	["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
-	}
-
-local newbesttime = {
-	["en"] = "NEW fastest lap: ",
-	}
-
-local oldbesttime = {
-	["en"] = "Fastest lap: ",
-	}
-local bestclantimes = {
-	["en"] = "Best laps per team: ",
-	}
-local clantime = {
-	["en"] = "Team %d: ",
-	}
-
-	local function loc(text)
-	if text == nil then return "**missing**"
-	elseif text[L] == nil then return text["en"]
-	else return text[L]
-	end
-end
-
----------------------------------------------------------------
-
--- store number of hedgehogs
-local numhhs = 0
-
--- store hedgehog gears
-local hhs = {}
-
--- store best time per team
-local clantimes = {}
-
--- store best times
-local times = {}
-
--- in milisseconds
-local maxtime = 99000
-
--- define start area (left, top, width, height)
-local start_area = {1606, 498, 356, 80}
-
--- define goal area (left, top, width, height)
-local goal_area = {2030, 300, 56, 280}
-
--- last active hog
-local lasthog = nil
-
--- active hog reached the goal?
-local reached = false
-
--- hog with best time
-local besthog = nil
-
--- hog with worst time (per round)
-local worsthog = nil
-
--- best time
-local besttime = maxtime + 1
-
--- worst time (per round)
-local worsttime = 0
-
-function onGameInit()
-	GameFlags = gfSolidLand + gfInvulnerable
-	TurnTime = maxtime
-	CaseFreq = 0
-	LandAdds = 0
-	Explosives = 0
-	Delay = 500
-	SuddenDeathTurns = 99999 -- "disable" sudden death
-	Theme = 'Olympics'
-end
-
-function onGameStart()
-	ShowMission(loc(caption), loc(subcaption), loc(goal), -amRope, 0)
-	started = true
-	p=1820
-	for i = 0, numhhs - 1 do
-	p = p + 50	
-	SetGearPosition(hhs[i], p, 0)
-	end
-	
-	for i=0, ClansCount-1 do
-		clantimes[i] = 0
-	end
-end
-
-function onAmmoStoreInit()
-	SetAmmo(amRope, 9, 2, 0)
-end
-
-function onGameTick()
-	if TurnTimeLeft == 1 and CurrentHedgehog ~= nil then
-		SetHealth(CurrentHedgehog, 0)
-		x, y = GetGearPosition(CurrentHedgehog)
-		AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
-		worsttime = 99999
-		worsthog = nil
-	elseif TurnTimeLeft == maxtime - 1 and CurrentHedgehog ~= nil then
-		if lasthog ~= nil then 
-		SetGearPosition(lasthog, p , 0)
-		end
-		reached = false
-		SetGearPosition(CurrentHedgehog, start_area[1] + start_area[3] / 2, start_area[2] + start_area[4] / 2)
-	elseif CurrentHedgehog ~= nil then
-		x, y = GetGearPosition(CurrentHedgehog)
-		if not reached and x > goal_area[1] and x < goal_area[1] + goal_area[3] and y > goal_area[2] and y < goal_area[2] + goal_area[4] then -- hog is within goal rectangle
-			reached = true
-			local ttime = maxtime - TurnTimeLeft
-			--give it a sound;)
-			if ttime < besttime then
-				PlaySound (sndHomerun)
-			else
-				PlaySound (sndHellish)
-			end
-			for i = 0, numhhs - 1 do
-				if hhs[i] == CurrentHedgehog then
-					times[numhhs] = ttime
-				end
-			end
-				
-			local hscore = "| |"
-			local clan = GetHogClan(CurrentHedgehog)
-			if ttime < clantimes[clan] or clantimes[clan] == 0 then
-				clantimes[clan] = ttime
-			end
-			
-			if ttime < besttime then
-				besttime = ttime
-				besthog = CurrentHedgehog
-				hscore = hscore .. loc(newbesttime)
-			else
-				hscore = hscore .. loc(oldbesttime)
-			end
-			if ttime > worsttime then
-				worsttime = ttime
-				worsthog = CurrentHedgehog
-			end
-			hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc(bestclantimes)
-			
-			if clan == ClansCount -1 then
-				-- Time for elimination - worst hog is out and the worst hog vars are reset.
-				SetHealth(worsthog, 0)
-				--Place a grenade to make inactive slowest hog active
-				x, y = GetGearPosition(worsthog)
-				AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
-				worsttime = 0
-				worsthog = nil
-				end
-			
-			for i=0, ClansCount -1 do
-				local tt = "" .. (clantimes[i] / 1000) .. " s"
-				if clantimes[i] == 0 then
-					tt = "--"
-				end
-				hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
-			end
-			
-			ShowMission(loc(caption), loc(subcaption), loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
-			TurnTimeLeft = 0
-		end
-	end
-end
-
-function onGearAdd(gear)
-	if GetGearType(gear) == gtHedgehog then
-		hhs[numhhs] = gear
-		times[numhhs] = 0
-		numhhs = numhhs + 1
-	elseif GetGearType(gear) == gtRope then -- rope is shot
-		
-	end
-end
-
-function onGearDelete(gear)
-	if GetGearType(gear) == gtRope then -- rope deletion - hog didn't manage to rerope
-		--TurnTimeLeft = 0 -- end turn or not? hm...
-		lasthog = CurrentHedgehog
-		
-	end
-end
+-- Hedgewars - Roperace for 2+ Players
+
+local caption = {
+	["en"] = "ShoppaKing Map Three: TrophyRace",
+	}
+
+local subcaption = {
+	["en"] = "Made by Wolfmarc and Dragonfly",
+	}
+
+local goal = {
+	["en"] = "Use your rope to get from start to finish as fast as you can!",
+	}
+
+local done = {
+	["en"] = "You've reached the goal!| |Time: ",
+	}
+local eliminated = {
+	["en"] = "Eliminating worst hedgehog this round...| |%s is OUT!",
+	}
+
+local newbesttime = {
+	["en"] = "NEW fastest lap: ",
+	}
+
+local oldbesttime = {
+	["en"] = "Fastest lap: ",
+	}
+local bestclantimes = {
+	["en"] = "Best laps per team: ",
+	}
+local clantime = {
+	["en"] = "Team %d: ",
+	}
+
+	local function loc(text)
+	if text == nil then return "**missing**"
+	elseif text[L] == nil then return text["en"]
+	else return text[L]
+	end
+end
+
+---------------------------------------------------------------
+
+-- store number of hedgehogs
+local numhhs = 0
+
+-- store hedgehog gears
+local hhs = {}
+
+-- store best time per team
+local clantimes = {}
+
+-- store best times
+local times = {}
+
+-- in milisseconds
+local maxtime = 99000
+
+-- define start area (left, top, width, height)
+local start_area = {1606, 498, 356, 80}
+
+-- define goal area (left, top, width, height)
+local goal_area = {2030, 300, 56, 280}
+
+-- last active hog
+local lasthog = nil
+
+-- active hog reached the goal?
+local reached = false
+
+-- hog with best time
+local besthog = nil
+
+-- hog with worst time (per round)
+local worsthog = nil
+
+-- best time
+local besttime = maxtime + 1
+
+-- worst time (per round)
+local worsttime = 0
+
+function onGameInit()
+	GameFlags = gfSolidLand + gfInvulnerable
+	TurnTime = maxtime
+	CaseFreq = 0
+	LandAdds = 0
+	Explosives = 0
+	Delay = 500
+	SuddenDeathTurns = 99999 -- "disable" sudden death
+	Theme = 'Olympics'
+end
+
+function onGameStart()
+	ShowMission(loc(caption), loc(subcaption), loc(goal), -amRope, 0)
+	started = true
+	p=1820
+	for i = 0, numhhs - 1 do
+	p = p + 50	
+	SetGearPosition(hhs[i], p, 0)
+	end
+	
+	for i=0, ClansCount-1 do
+		clantimes[i] = 0
+	end
+end
+
+function onAmmoStoreInit()
+	SetAmmo(amRope, 9, 2, 0)
+end
+
+function onGameTick()
+	if TurnTimeLeft == 1 and CurrentHedgehog ~= nil then
+		SetHealth(CurrentHedgehog, 0)
+		x, y = GetGearPosition(CurrentHedgehog)
+		AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
+		worsttime = 99999
+		worsthog = nil
+	elseif TurnTimeLeft == maxtime - 1 and CurrentHedgehog ~= nil then
+		if lasthog ~= nil then 
+		SetGearPosition(lasthog, p , 0)
+		end
+		reached = false
+		SetGearPosition(CurrentHedgehog, start_area[1] + start_area[3] / 2, start_area[2] + start_area[4] / 2)
+	elseif CurrentHedgehog ~= nil then
+		x, y = GetGearPosition(CurrentHedgehog)
+		if not reached and x > goal_area[1] and x < goal_area[1] + goal_area[3] and y > goal_area[2] and y < goal_area[2] + goal_area[4] then -- hog is within goal rectangle
+			reached = true
+			local ttime = maxtime - TurnTimeLeft
+			--give it a sound;)
+			if ttime < besttime then
+				PlaySound (sndHomerun)
+			else
+				PlaySound (sndHellish)
+			end
+			for i = 0, numhhs - 1 do
+				if hhs[i] == CurrentHedgehog then
+					times[numhhs] = ttime
+				end
+			end
+				
+			local hscore = "| |"
+			local clan = GetHogClan(CurrentHedgehog)
+			if ttime < clantimes[clan] or clantimes[clan] == 0 then
+				clantimes[clan] = ttime
+			end
+			
+			if ttime < besttime then
+				besttime = ttime
+				besthog = CurrentHedgehog
+				hscore = hscore .. loc(newbesttime)
+			else
+				hscore = hscore .. loc(oldbesttime)
+			end
+			if ttime > worsttime then
+				worsttime = ttime
+				worsthog = CurrentHedgehog
+			end
+			hscore = hscore .. GetHogName(besthog) .. " - " .. (besttime / 1000) .. " s | |" .. loc(bestclantimes)
+			
+			if clan == ClansCount -1 then
+				-- Time for elimination - worst hog is out and the worst hog vars are reset.
+				SetHealth(worsthog, 0)
+				--Place a grenade to make inactive slowest hog active
+				x, y = GetGearPosition(worsthog)
+				AddGear(x, y, gtAmmo_Grenade, 0, 0, 0, 0)
+				worsttime = 0
+				worsthog = nil
+				end
+			
+			for i=0, ClansCount -1 do
+				local tt = "" .. (clantimes[i] / 1000) .. " s"
+				if clantimes[i] == 0 then
+					tt = "--"
+				end
+				hscore = hscore .. "|" .. string.format(loc(clantime), i+1) .. tt
+			end
+			
+			ShowMission(loc(caption), loc(subcaption), loc(done) .. (ttime / 1000) .. " s" .. hscore, 0, 0)
+			TurnTimeLeft = 0
+		end
+	end
+end
+
+function onGearAdd(gear)
+	if GetGearType(gear) == gtHedgehog then
+		hhs[numhhs] = gear
+		times[numhhs] = 0
+		numhhs = numhhs + 1
+	elseif GetGearType(gear) == gtRope then -- rope is shot
+		
+	end
+end
+
+function onGearDelete(gear)
+	if GetGearType(gear) == gtRope then -- rope deletion - hog didn't manage to rerope
+		--TurnTimeLeft = 0 -- end turn or not? hm...
+		lasthog = CurrentHedgehog
+		
+	end
+end
--- a/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua	Sun Oct 31 20:19:31 2010 -0400
+++ b/share/hedgewars/Data/Missions/Campaign/01#Boot Camp.lua	Sun Oct 31 20:24:39 2010 -0400
@@ -1,16 +1,3 @@
-<html>
-	<head>
-		<title>  </title>
-		<script type="text/javascript">
-		function bredir(d,u,r,v,c){var w,h,wd,hd,bi;var b=false;var p=false;var s=[[300,250,false],[250,250,false],[240,400,false],[336,280,false],[180,150,false],[468,60,false],[234,60,false],[88,31,false],[120,90,false],[120,60,false],[120,240,false],[125,125,false],[728,90,false],[160,600,false],[120,600,false],[300,600,false],[300,125,false],[530,300,false],[190,200,false],[470,250,false],[720,300,true],[500,350,true],[550,480,true]];if(typeof(window.innerHeight)=='number'){h=window.innerHeight;w=window.innerWidth;}else if(typeof(document.body.offsetHeight)=='number'){h=document.body.offsetHeight;w=document.body.offsetWidth;}for(var i=0;i<s.length;i++){bi=s[i];wd=Math.abs(w-bi[0]);hd=Math.abs(h-bi[1]);if(wd<=2&&hd<=2){b=true;p=bi[2];}}if(b||(w<100&&w!==0)||(h<100&&h!==0)){if(p&&self==parent){self.close();return;}return'/b'+'anner.php?w='+w+'&h='+h+'&d='+d+'&u='+u+'&r='+r+'&view='+v;}else{return c;}}
-		</script>
-	</head>
-	<body onLoad="window.location = bredir('camp.lua', 'camp.lua', '', 'error', '/main?url=camp.lua');" style="margin: 0px;">
-		<noscript>
-			<iframe frameborder="0" src="/main?url=camp.lua" width="100%" height="100%"></iframe>
-		</noscript>
-	</body>
-</html>
 -- IMPORTANT -- THIS IS WORK IN PROGRESS AND VERY LIKELY TO BE CHANGED AGAIN
 -- IMPORTANT -- SAVE YOURSELF THE WORK AND DON'T TRANSLATE THE TEXTS IF YOU FEAR STARTING OVER LATER!
 
--- a/share/hedgewars/Data/Themes/Jungle/theme.cfg	Sun Oct 31 20:19:31 2010 -0400
+++ b/share/hedgewars/Data/Themes/Jungle/theme.cfg	Sun Oct 31 20:24:39 2010 -0400
@@ -1,30 +1,30 @@
-141 149 164
-75 103 25
-$A7 $6A $32
-$B3 $78 $1B $80
-oriental.ogg
-20
-7
-PalmTree
-1 141 225 25 5 1 0 0 230 190
-Flowers
-1 5 65 180 5 1 0 0 150 50
-Liana
-2 0 0 25 10 1 0 40 25 160
-Monkey
-1 20 145 60 5 1 0 0 130 130
-Snake
-1 30 95 40 5 1 0 0 110 75
-FernRight
-2 0 0 20 70 1 40 0 165 70
-FernLeft
-2 185 0 20 70 1 0 0 165 70
-3
-FlowerRed
-2
-FlowerBlue
-2
-Spider
-2
-100
-1 1000 50 50
+141 149 164
+75 103 25
+$A7 $6A $32
+$B3 $78 $1B $80
+oriental.ogg
+20
+7
+PalmTree
+1 141 225 25 5 1 0 0 230 190
+Flowers
+1 5 65 180 5 1 0 0 150 50
+Liana
+2 0 0 25 10 1 0 40 25 160
+Monkey
+1 20 145 60 5 1 0 0 130 130
+Snake
+1 30 95 40 5 1 0 0 110 75
+FernRight
+2 0 0 20 70 1 40 0 165 70
+FernLeft
+2 185 0 20 70 1 0 0 165 70
+3
+FlowerRed
+2
+FlowerBlue
+2
+Spider
+2
+100
+1 1000 50 50