Refactored scripts, added a smoother for Debug Islan

I've added a simple edge-smoothing function to debug island's generator. It
doesn't handle all edge cases (pun intended), but the proof of concept is
sound. I just wish I could release this...

I've also added exception checks to region.cpp
This commit is contained in:
Kayne Ruse
2015-01-12 01:14:24 +11:00
parent cf1008f0d9
commit f13e8479e4
4 changed files with 101 additions and 30 deletions
+8 -4
View File
@@ -1,11 +1,15 @@
local Region = require("map_system").Region
local mapSaver = {}
function mapSaver.Load(region)
function mapSaver.Load(r)
--empty
print("map_saver.lua:mapSaver.Load(region)")
io.write("map_saver:Load(", Region.GetX(r), ", ", Region.GetY(r), ")\n")
end
function mapSaver.Save(region)
function mapSaver.Save(r)
--empty
print("map_saver.lua:mapSaver.Save(region)")
io.write("map_saver:Save(", Region.GetX(r), ", ", Region.GetY(r), ")\n")
end
--TODO: create a flexible saving & loading system
return mapSaver