Skip to content
Snippets Groups Projects
Commit 43f59db2 authored by DarkGod's avatar DarkGod
Browse files

misc stuff

parent 274b43a3
No related branches found
No related tags found
No related merge requests found
......@@ -40,6 +40,7 @@ function _M:init(level, map)
self.sublevels = {}
self.sublevel_id = "__main__"
self.data = {}
self.tmpdata = {}
end
function _M:onSaving()
......@@ -163,7 +164,7 @@ end
--- Serialization
function _M:save()
return class.save(self, {entities_list=true})
return class.save(self, {entities_list=true, tmpdata=true})
end
function _M:loaded()
__level_store[self] = true
......@@ -176,6 +177,7 @@ function _M:loaded()
end
self.entities = nes
self.entities_list = {}
self.tmpdata = {}
end
--- Setup an entity list for the level, this allows the Zone to pick objects/actors/...
......
......@@ -92,6 +92,11 @@ function colors.hex1alphaunpack(hex)
return tonumber("0x"..hex:sub(1, 2)) / 255, tonumber("0x"..hex:sub(3, 4)) / 255, tonumber("0x"..hex:sub(5, 6)) / 255, tonumber("0x"..hex:sub(7, 8)) / 255
end
function colors.lerp(a, b, x)
local lerp = util.lerp
return { lerp(a.r/255, b.r/255, x), lerp(a.g/255, b.g/255, x), lerp(a.b/255, b.b/255, x) }
end
defineColor('BLACK', 0, 0, 0)
defineColor('WHITE', 0xFF, 0xFF, 0xFF)
defineColor('SLATE', 0x8C, 0x8C, 0x8C)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment