using hse data.

This commit is contained in:
Enno Rehling 2008-05-23 09:52:43 +00:00
parent f0c56346d9
commit 739dd98755

View file

@ -1,12 +1,12 @@
-- -*- coding: utf-8 -*- -- -*- coding: utf-8 -*-
function test_locales() function test_locales()
local skills = { "", "herb", "kraut", "Kräute", "Kraeut", "k", "kra", "MAGIE" } local skills = { "", "herb", "kraut", "Kräute", "Kraeut", "k", "kra", "MAGIE" }
for k,v in pairs(skills) do for k,v in pairs(skills) do
str = test.loc_skill("de", v) str = test.loc_skill("de", v)
io.stdout:write(v, "\t", tostring(str), " ", tostring(get_string("de", "skill::" .. tostring(str))), "\n") io.stdout:write(v, "\t", tostring(str), " ", tostring(get_string("de", "skill::" .. tostring(str))), "\n")
end end
return 0 return 0
end end
function loadscript(name) function loadscript(name)
@ -30,24 +30,24 @@ end
--test_locales() --test_locales()
function run_turn() function run_turn()
plan_monsters() plan_monsters()
process_orders() process_orders()
spawn_dragons() spawn_dragons()
spawn_undead() spawn_undead()
spawn_braineaters(0.25) spawn_braineaters(0.25)
autoseed(basepath .. "/newfactions", false) autoseed(basepath .. "/newfactions", false)
end end
function test_free() function test_free()
read_game("571.dat", "binary") read_game("571.dat", "binary")
read_orders("orders.571") read_orders("orders.571")
run_turn() run_turn()
free_game() free_game()
read_game("570.dat", "binary") read_game("570.dat", "binary")
read_orders("orders.570") read_orders("orders.570")
run_turn() run_turn()
free_game() free_game()
end end
loadscript("default.lua") loadscript("default.lua")
@ -55,16 +55,16 @@ run_scripts()
-- go -- go
local now = os.clock() local now = os.clock()
-- test_free() -- test_free()
read_game("571.dat", "binary") read_game("50", "text")
write_game("571.dat.1", "binary") write_game("50.dat", "binary")
write_game("50.txt.1", "text")
free_game() free_game()
read_game("570.dat", "binary") read_game("50", "test")
write_game("50.txt.2", "text")
free_game() free_game()
read_game("571.dat", "binary")
write_game("571.dat.2", "binary")
local elapsed = os.clock() - now local elapsed = os.clock() - now
print(elapsed) print(elapsed)
-- text: 50.574 -- text: 50.574
-- bin0: 19.547 -- bin0: 19.547
-- bin1: 18.953 -- bin1: 18.953
io.stdin:read("*line") -- io.stdin:read("*line")