diff --git a/README.md b/README.md index 7d4e122..0879a54 100644 --- a/README.md +++ b/README.md @@ -7,12 +7,8 @@ allowing you to set the exit direction of the level, and allow the bottom half o get started by using morespritescore.p8 instead of evercore.p8 as a base, and open that in the editor -to change the exit type, press r to rename the level, and change the value of the second input field from 0-3 +to set a custom exit, press r to rename the level, and change the value of the direction input field to the id number of the level you want it to transition to, and if you don't want that exit to be usable, change it to nil -0 - exit from the top -1 - exit from the right -2 - exit from the left -3 - exit from the bottom **WARNING:** @@ -22,7 +18,6 @@ this is an extremely buggy patch, be careful if you decide to use the bottom tile pages for sprites, they can't be used for mapdata. place mapdata levels in the top half of the map instead. hex loaded levels are unaffected and can be placed wherever. -sprite number 256 cannot be used as the p8scii charset only has 255 characters, you will get a "attempt to concatenate a nil value" error ping me on discord (@CoolElectronics#4683) if anything breaks @@ -85,6 +80,8 @@ Go to the Releases section at the top of the page. ## rant -despite calling it base 256 this whole time, the p8scii format only has 255 characters, meaning the last sprite can't be used. if this was the only issue, it wouldn't be that big of a deal, but for some reason lua's utf8 support is weird, and the character ⬇ is not the same as the character ⬇ because reasons, the character ゜takes up 2 utf characters and only 1 normal character, and the character 🅾️ is longer than any other one +lua's utf8 support is weird, and the character ⬇ is not the same as the character ⬇ because reasons, the character ゜takes up 2 utf characters and only 1 normal character, and the character 🅾️ is longer than any other one -why does the regex do [^@]+ instead of .+ \ No newline at end of file +why does the regex do [^@]+ instead of .+ + +this project is so unstable \ No newline at end of file diff --git a/build copy/everhorn-l-linux.tar.gz b/build copy/everhorn-l-linux.tar.gz deleted file mode 100644 index 21b6d0e..0000000 Binary files a/build copy/everhorn-l-linux.tar.gz and /dev/null differ diff --git a/build copy/everhorn-l-linux/autotiles.lua b/build copy/everhorn-l-linux/autotiles.lua deleted file mode 100644 index 2523734..0000000 --- a/build copy/everhorn-l-linux/autotiles.lua +++ /dev/null @@ -1,119 +0,0 @@ --- 8 ---2 O 1 --- 4 - -autotiles = { - -- snow - [1] = { - [0] = 32, - [1] = 52, - [2] = 54, - [3] = 53, - [4] = 39, - [5] = 33, - [6] = 35, - [7] = 34, - [8] = 55, - [9] = 49, - [10] = 51, - [11] = 50, - [12] = 48, - [13] = 36, - [14] = 38, - [15] = 37, - -- indexes beyond 15 can be used to allow connecting to extra tiles - [16] = 72, - }, - -- ice - [2] = { - [0] = 117, - [1] = 114, - [2] = 116, - [3] = 115, - [4] = 69, - [5] = 66, - [6] = 68, - [7] = 67, - [8] = 101, - [9] = 98, - [10] = 100, - [11] = 99, - [12] = 85, - [13] = 82, - [14] = 84, - [15] = 83, - }, - -- bg dirt (simplistic - only corner tiles are used) - [3] = { - [0] = 40, - [1] = 40, - [2] = 40, - [3] = 40, - [4] = 40, - [5] = 58, - [6] = 57, - [7] = 40, - [8] = 40, - [9] = 42, - [10] = 41, - [11] = 40, - [12] = 40, - [13] = 40, - [14] = 40, - [15] = 40, - -- extra - [16] = 16, - [17] = 56, - [18] = 88, - [19] = 103, - [20] = 104, - }, -} - -autotilet, autotilet_strict = {}, {} --- n => autotile n belongs to, if any --- strict excludes extra autotiles (>=16) - -for k, auto in ipairs(autotiles) do - for nb, n in pairs(auto) do - autotilet[n] = k - if nb >= 0 and nb < 16 then - autotilet_strict[n] = k - end - end -end - -local function isAutotile(room, i, j, strict) - if i >= 0 and i < room.w and j >= 0 and j < room.h then - local t = strict and autotilet_strict or autotilet - return t[room.data[i][j]] - else - return 0 -- out-of-bounds is considered autotile 0, which connects to any other autotile - end -end - -local function b1(b) -- converts truthy to 1, falsy to 0 - return b and 1 or 0 -end - -local function matches(x, k) - return x == 0 and true or x == k -end - -function autotile(room, i, j, k) - if k and k == isAutotile(room, i, j, true) then - local nb = b1(matches(isAutotile(room, i + 1, j), k)) - + b1(matches(isAutotile(room, i - 1, j), k)) * 2 - + b1(matches(isAutotile(room, i, j + 1), k)) * 4 - + b1(matches(isAutotile(room, i, j - 1), k)) * 8 - room.data[i][j] = autotiles[k][nb] - end -end - -function autotileWithNeighbors(room, i, j, k) - autotile(room, i, j, k) - autotile(room, i + 1, j, k) - autotile(room, i - 1, j, k) - autotile(room, i, j + 1, k) - autotile(room, i, j - 1, k) -end diff --git a/build copy/everhorn-l-linux/checkmark.png b/build copy/everhorn-l-linux/checkmark.png deleted file mode 100644 index a587fa7..0000000 Binary files a/build copy/everhorn-l-linux/checkmark.png and /dev/null differ diff --git a/build copy/everhorn-l-linux/conf.lua b/build copy/everhorn-l-linux/conf.lua deleted file mode 100644 index 9949538..0000000 --- a/build copy/everhorn-l-linux/conf.lua +++ /dev/null @@ -1,6 +0,0 @@ -function love.conf(t) - t.window.title = "Everhorn" - t.window.width = 1280 - t.window.height = 720 - t.window.resizable = true -end diff --git a/build copy/everhorn-l-linux/filedialog.lua b/build copy/everhorn-l-linux/filedialog.lua deleted file mode 100644 index b89f330..0000000 --- a/build copy/everhorn-l-linux/filedialog.lua +++ /dev/null @@ -1,15 +0,0 @@ -local filedialog = {} - -local nfd = require 'nfd' - -function filedialog.open() - local r = nfd.open("p8") - print(r) - return r -end - -function filedialog.save() - return nfd.save("p8") -end - -return filedialog diff --git a/build copy/everhorn-l-linux/fileio.lua b/build copy/everhorn-l-linux/fileio.lua deleted file mode 100644 index ad75697..0000000 --- a/build copy/everhorn-l-linux/fileio.lua +++ /dev/null @@ -1,365 +0,0 @@ --- functions to read lines correctly for \r\n line endings - -local function cr_lines(s) - return s:gsub('\r\n?', '\n'):gmatch('(.-)\n') -end - -local function cr_file_lines(file) - local s = file:read('*a') - if s:sub(#s, #s) ~= "\n" then - s = s .. "\n" - end - return cr_lines(s) -end - --- file handling - -function loadpico8(filename) - love.graphics.setDefaultFilter("nearest", "nearest") - - local file, err = io.open(filename, "rb") - - local data = {} - - data.palette = { - {0, 0, 0, 255}, - {29, 43, 83, 255}, - {126,37, 83, 255}, - {0, 135,81, 255}, - {171,82, 54, 255}, - {95, 87, 79, 255}, - {194,195,199,255}, - {255,241,232,255}, - {255,0, 77, 255}, - {255,163,0, 255}, - {255,240,36, 255}, - {0, 231,86, 255}, - {41, 173,255,255}, - {131,118,156,255}, - {255,119,168,255}, - {255,204,170,255} - } - - local sections = {} - local cursec = nil - for line in cr_file_lines(file) do - local sec = string.match(line, "^__(%a+)__$") - if sec then - cursec = sec - sections[sec] = {} - elseif cursec then - table.insert(sections[cursec], line) - end - end - file:close() - local p8font=love.image.newImageData("pico-8_font.png") - local function toGrey(x,y,r,g,b,a) - return r*194/255,g*195/255,b*199/255,a - end - p8fontGrey=love.image.newImageData(p8font:getWidth(),p8font:getHeight(),p8font:getFormat(),p8font) - p8fontGrey:mapPixel(toGrey) - local function get_font_quad(digit) - if digit<10 then - return 8*digit,24,4,8 - else - return 8*(digit-9),48,4,8 - end - end - local spritesheet_data = love.image.newImageData(128, 128) - for j = 0, spritesheet_data:getHeight() - 1 do - local line = sections["gfx"] and sections["gfx"][j + 1] or "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - for i = 0, spritesheet_data:getWidth() - 1 do - local s = string.sub(line, 1 + i, 1 + i) - local b = fromhex(s) - local c = data.palette[b + 1] - spritesheet_data:setPixel(i, j, c[1]/255, c[2]/255, c[3]/255, 1) - end - end - - -- for j =8,15 do - -- for i = 0, 15 do - -- local id=i+16*(j-8) - -- local d1=math.floor(id/16) - -- local d2=id%16 - -- --spritesheet_data:paste(p8font,8*i,8*j,get_font_quad(d1)) - -- spritesheet_data:paste(p8fontGrey,8*i,8*j,get_font_quad(d1)) - -- spritesheet_data:paste(p8font,8*i+4,8*j,get_font_quad(d2)) - -- end - -- end - - data.spritesheet = love.graphics.newImage(spritesheet_data) - - data.quads = {} - for i = 0, 15 do - for j = 0, 15 do - data.quads[i + j*16] = love.graphics.newQuad(i*8, j*8, 8, 8, data.spritesheet:getDimensions()) - end - end - - data.map = {} - for i = 0, 127 do - data.map[i] = {} - for j = 0, 31 do - local line = sections["map"] and sections["map"][j + 1] or "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - local s = string.sub(line, 1 + 2*i, 2 + 2*i) - data.map[i][j] = fromhex(s) - end - for j = 32, 63 do - local i_ = i%64 - local j_ = i <= 63 and j*2 or j*2 + 1 - local line = sections["gfx"][j_ + 1] or "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - local s = string.sub(line, 1 + 2*i_, 2 + 2*i_) - data.map[i][j] = fromhex_swapnibbles(s) - end - end - - data.rooms = {} - data.roomBounds = {} - - -- code: look for the magic comment - local code = table.concat(sections["lua"], "\n") - local evh = string.match(code, "%-%-@begin([^@]+)%-%-@end") - local levels, mapdata - if evh then - -- cut out comments - loadstring doesn't parse them for some reason - evh = string.gsub(evh, "%-%-[^\n]*\n", "") - evh = string.gsub(evh, "//[^\n]*\n", "") - - local chunk, err = loadstring(evh) - if not err then - local env = {} - chunk = setfenv(chunk, env) - chunk() - - levels, mapdata = env.levels, env.mapdata - end - end - - mapdata = mapdata or {} - - -- flatten levels and mapdata - local lvls = {} - if levels then - for n, s in pairs(levels) do - table.insert(lvls, {n, s, mapdata[n]}) - end - end - table.sort(lvls, function(p1, p2) return p1[1] < p2[1] end) - levels, mapdata = {}, {} - for n, p in pairs(lvls) do - levels[n] = p[2] - mapdata[n] = p[3] - end - - -- load levels - if levels[1] then - for n, s in pairs(levels) do - local x, y, w, h, title = string.match(s, "^([^,]*),([^,]*),([^,]*),([^,]*),?([^,]*)$") - x, y, w, h = tonumber(x), tonumber(y), tonumber(w), tonumber(h) - if x and y and w and h then -- this confirms they're there and they're numbers - data.roomBounds[n] = {x=x*128, y=y*128, w=w*16, h=h*16, title=title} - else - print("wat", s) - end - end - else - for J = 0, 3 do - for I = 0, 7 do - local b = {x = I*128, y = J*128, w = 16, h = 16, title=""} - table.insert(data.roomBounds, b) - end - end - end - - -- load mapdata - if mapdata then - for n, levelstr in pairs(mapdata) do - local b = data.roomBounds[n] - if b then - local room = newRoom(b.x, b.y, b.w, b.h) - loadroomdata(room, levelstr) - room.title = b.title - data.rooms[n] = room - end - end - end - - -- fill rooms with no mapdata from p8 map - for n, b in ipairs(data.roomBounds) do - if not data.rooms[n] then - local room = newRoom(b.x, b.y, b.w, b.h) - room.hex=false - room.title = b.title - - for i = 0, b.w - 1 do - for j = 0, b.h - 1 do - local i1, j1 = div8(b.x) + i, div8(b.y) + j - if i1 >= 0 and i1 < 128 and j1 >= 0 and j1 < 64 then - room.data[i][j] = data.map[i1][j1] - else - room.data[i][j] = 0 - end - end - end - - data.rooms[n] = room - end - end - return data -end - -function openPico8(filename) - newProject() - - -- loads into global p8data as well, for spritesheet - p8data = loadpico8(filename) - project.rooms = p8data.rooms - - app.openFileName = filename - - return true -end - -function savePico8(filename) - local map = fill2d0s(128, 64) - - for _, room in ipairs(project.rooms) do - if not room.hex then - local i0, j0 = div8(room.x), div8(room.y) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - if map[i0+i] then - map[i0+i][j0+j] = room.data[i][j] - end - end - end - end - end - - local file = io.open(filename, "rb") - if not file and app.openFileName then - file = io.open(app.openFileName, "rb") - end - if not file then - return false - end - - local out = {} - - local ln = 1 - local gfxstart, mapstart - for line in cr_file_lines(file) do - table.insert(out, line) - ln = ln + 1 - end - file:close() - - local levels, mapdata = {}, {} - for n = 1, #project.rooms do - local room = project.rooms[n] - levels[n] = string.format("%g,%g,%g,%g,%s", room.x/128, room.y/128, room.w/16, room.h/16, room.title) - - if room.hex then - mapdata[n] = dumproomdata(room) - end - end - - -- map section - - -- start out by making sure both sections exist, and are sized to max size - - - local gfxexist, mapexist,labelstart - for k = 1, #out do - if out[k] == "__gfx__" then - gfxexist=true - elseif out[k] == "__map__" then - mapexist=true - end - end - local gfxtable = {} - - - if not gfxexist then - table.insert(out,"__gfx__") - end - if not mapexist then - table.insert(out,"__map__") - end - - for k,v in ipairs(out) do - if out[k]=="__gfx__" or out[k]=="__map__" then - local j=k+1 - while j<#out and not out[j]:match("__%a+__") do - j=j+1 - end - local emptyline="" - for i=1,out[k]=="__gfx__" and 128 or 256 do - emptyline=emptyline.."0" - end - for i=j,k+(out[k]=="__gfx__" and 128 or 32) do - table.insert(out,i,emptyline) - end - end - end - local gfxstart, mapstart - for k = 1, #out do - if out[k] == "__gfx__" then - gfxstart = k - elseif out[k] == "__map__" then - mapstart = k - elseif out[k] == "__label__" then - labelstart = k - end - end - for j = gfxstart, labelstart-1 do - gfxtable[j] = out[j] - end - if not (mapstart and gfxstart) then - error("uuuh") - end - - for j = 0, 31 do - local line = "" - for i = 0, 127 do - line = line .. tohex(map[i][j]) - end - out[mapstart+j+1] = line - end - for j = 32, 63 do - local line = "" - for i = 0, 127 do - line = line .. tohex_swapnibbles(map[i][j]) - end - out[gfxstart+(j-32)*2+65] = string.sub(line, 1, 128) - out[gfxstart+(j-32)*2+66] = string.sub(line, 129, 256) - end - - for j = gfxstart, labelstart-1 do - out[j] = gfxtable[j] - end - - local cartdata=table.concat(out, "\n") - -- write to levels table without overwriting the code - - cartdata = cartdata:gsub("(%-%-@begin.*levels%s*=%s*){.-}(.*%-%-@end)","%1"..dumplua(levels).."%2") - cartdata = cartdata:gsub("(%-%-@begin.*mapdata%s*=%s*){.-}(.*%-%-@end)","%1"..dumplua(mapdata).."%2") - - --remove playtesting inject if one already exists: - cartdata = cartdata:gsub("(%-%-@begin.*)local __init.-\n(.*%-%-@end)","%1".."%2") - if app.playtesting and app.room then - inject = "local __init = _init function _init() __init() begin_game() load_level("..app.room..") music(-1)" - if app.playtesting == 2 then - inject = inject.." max_djump=2" - end - inject = inject.." end" - cartdata=cartdata:gsub("%-%-@end",inject.."\n--@end") - end - file = io.open(filename, "wb") - file:write(cartdata) - file:close() - - app.saveFileName = filename - - return true -end diff --git a/build copy/everhorn-l-linux/keyboard.lua b/build copy/everhorn-l-linux/keyboard.lua deleted file mode 100644 index 10d3c8c..0000000 --- a/build copy/everhorn-l-linux/keyboard.lua +++ /dev/null @@ -1,267 +0,0 @@ -function love.keypressed(key, scancode, isrepeat) - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - if key == "return" then - app.enterPressed = true - end - - -- first handle actions that are allowed to repeat when holding key - - local dx, dy = 0, 0 - if key == "left" then dx = -1 end - if key == "right" then dx = 1 end - if key == "up" then dy = -1 end - if key == "down" then dy = 1 end - if project.selection then - project.selection.x = project.selection.x + dx*8 - project.selection.y = project.selection.y + dy*8 - end - - -- Ctrl+Z, Ctrl+Shift+Z - if love.keyboard.isDown("lctrl") then - if key == "z" then - if love.keyboard.isDown("lshift") then - redo() - else - undo() - end - end - end - - -- room switching / swapping - if key == "down" or key == "up" then - if app.room then - local n1 = app.room - local n2 = key == "down" and app.room + 1 or app.room - 1 - - if project.rooms[n1] and project.rooms[n2] then - if love.keyboard.isDown("lctrl") then - -- swap - local tmp = project.rooms[n1] - project.rooms[n1] = project.rooms[n2] - project.rooms[n2] = tmp - end - - app.room = n2 - end - end - end - - if isrepeat then - return - end - - -- non-repeatable global shortcuts - - if love.keyboard.isDown("lctrl") or love.keyboard.isDown("rctrl") then - -- Ctrl+O - if key == "o" then - local filename = filedialog.open() - local openOk = false - if filename then - local ext = string.match(filename, ".(%w+)$") - if ext == "ahm" then - openOk = openMap(filename) - elseif ext == "p8" then - openOk = openPico8(filename) - end - - if openOk then - app.history = {} - app.historyN = 0 - pushHistory() - end - end - if openOk then - showMessage("Opened "..string.match(filename, psep.."([^"..psep.."]*)$")) - else - showMessage("Failed to open file") - end - -- Ctrl+R - elseif key == "r" then - if app.openFileName then - local data = loadpico8(app.openFileName) - p8data.spritesheet = data.spritesheet - showMessage("Reloaded") - end - -- Ctrl+S - elseif key == "s" then - local filename - if app.saveFileName and not love.keyboard.isDown("lshift") then - filename = app.saveFileName - else - filename = filedialog.save() - end - - if filename and savePico8(filename) then - showMessage("Saved "..string.match(filename, psep.."([^"..psep.."]*)$")) - else - showMessage("Failed to save cart") - end - -- Ctrl+X - elseif key == "x" then - if love.keyboard.isDown("lshift") then - -- cut entire room - if activeRoom() then - local s = dumplua {"room", activeRoom()} - love.system.setClipboardText(s) - table.remove(project.rooms, app.room) - app.room = nil - - showMessage("Cut room") - end - else - -- cut selection - if project.selection then - local s = dumplua {"selection", project.selection} - love.system.setClipboardText(s) - project.selection = nil - - showMessage("Cut") - end - end - -- Ctrl+C - elseif key == "c" then - if love.keyboard.isDown("lshift") then - -- copy entire room - if activeRoom() then - local s = dumplua {"room", activeRoom()} - love.system.setClipboardText(s) - - showMessage("Copied room") - end - else - -- copy selection - if project.selection then - local s = dumplua {"selection", project.selection} - love.system.setClipboardText(s) - placeSelection() - - showMessage("Copied") - end - end - -- Ctrl+V - elseif key == "v" then - placeSelection() -- to clean selection first - - local t, err = loadlua(love.system.getClipboardText()) - if not err then - if type(t) == "table" then - if t[1] == "selection" then - local s = t[2] - project.selection = s - project.selection.x = roundto8(mx - s.w*4) - project.selection.y = roundto8(my - s.h*4) - app.tool = "select" - - showMessage("Pasted") - elseif t[1] == "room" then - local r = t[2] - r.x = roundto8(mx - r.w*4) - r.y = roundto8(my - r.h*4) - table.insert(project.rooms, r) - app.room = #project.rooms - else - err = true - end - else - err = true - end - end - if err then - showMessage("Failed to paste (did you paste something you're not supposed to?)") - end - elseif key == "a" then - if activeRoom() then - app.tool = "select" - select(0, 0, activeRoom().w - 1, activeRoom().h - 1) - end - elseif key=="h" then - app.showGarbageTiles=not app.showGarbageTiles - end - else -- if ctrl is not down - if key == "delete" and love.keyboard.isDown("lshift") then - if app.room then - table.remove(project.rooms, app.room) - if not activeRoom() then - app.room = #project.rooms - end - end - end - end - - -- now pass to nuklear and return if consumed - - if ui:keypressed(key, scancode, isrepeat) then - return - end - - -- another fucking hack: the shit above doesnt consume inputs when editing text for some fucking reason - if app.renameRoom then - return - end - - -- now editing things (that shouldn't happen if you have a nuklear window focused or something) - - if key == "n" then - local room = newRoom(roundto8(mx), roundto8(my), 16, 16) - - -- disabled that shit - -- generate alphabetic room title - --local n, title = 0, nil - --while true do - --title = b26(n) - --local exists = false - --for _, otherRoom in ipairs(project.rooms) do - --if otherRoom.title == title then - --exists = true - --end - --end - --if not exists then - --break - --end - --n = n + 1 - --end - --room.title = title - room.title = "" - - table.insert(project.rooms, room) - app.room = #project.rooms - app.roomAdded = true - elseif key == "space" then - app.showToolPanel = not app.showToolPanel - elseif key == "return" then - placeSelection() - elseif key == "tab" and not love.keyboard.isDown("lalt") then - if not app.playtesting then - app.playtesting = 1 - elseif app.playtesting == 1 then - app.playtesting = 2 - else - app.playtesting = false - end - end -end - -function love.keyreleased(key, scancode) - -- just save history every time a key is released lol - pushHistory() - - if ui:keyreleased(key, scancode) then - return - end - - -- this shortcut is handled on release, and can be consumed - -- so you don't input r into the field - if key == "r" and not love.keyboard.isDown("lctrl") and activeRoom() then - app.renameRoom = activeRoom() - app.renameRoomVTable = { name = {value = app.renameRoom.title}, - hex = {value = app.renameRoom.hex} - } - end -end - -function love.textinput(text) - ui:textinput(text) -end diff --git a/build copy/everhorn-l-linux/main.lua b/build copy/everhorn-l-linux/main.lua deleted file mode 100644 index 3703a85..0000000 --- a/build copy/everhorn-l-linux/main.lua +++ /dev/null @@ -1,180 +0,0 @@ -nuklear = require 'nuklear' -filedialog = require 'filedialog' -serpent = require 'serpent' - -require 'util' -require 'room' -require 'autotiles' - - - --- global constants -psep = love.system.getOS() == "Windows" and "\\" or "/" -- path separator - - --- GLOBAL VARIABLES (im dirty like that) --- and stuff that has to do with them - -function newProject() - -- this is UI things - love.graphics.setNewFont(12*global_scale) - app = { - camX = 0, - camY = 0, - camScale = 2, --based on camScaleSetting - camScaleSetting = 1, -- 0, 1, 2 is 1x, 2x, 3x etc, -1, -2, -3 is 0.5x, 0.25x, 0.125x - room = nil, - suppressMouse = false, -- disables mouse-driven editing in love.update() when a click has triggered different action, reset on release - tool = "brush", - currentTile = 0, - message = nil, - messageTimeLeft = nil, - playtesting = false, - showToolPanel = true, - showGarbageTiles=false, - - -- history (undo stack) - history = {}, - historyN = 0, - - font = love.graphics.getFont(), - - left = 0, top = 0, -- top left corner of editing area - - -- these are used in various hacks to work around nuklear being big dumb (or me idk) - anyWindowHovered = false, - enterPressed = false, - roomAdded = false, - - } - --ui:styleSetFont(love.graphics.getFont()) - ui:stylePush({['font']=app.font}) - --print(app.font:getHeight()) - -- this is what goes into history and (mostly) gets saved - project = { - rooms = {}, - selection = nil, - } - - -- basic p8data with blank spritesheet - local data = {} - local imgdata = love.image.newImageData(128, 64) - imgdata:mapPixel(function() return 0, 0, 0, 1 end) - data.spritesheet = love.graphics.newImage(imgdata) - data.quads = {} - for i = 0, 15 do - for j = 0, 15 do - data.quads[i + j*16] = love.graphics.newQuad(i*8, j*8, 8, 8, data.spritesheet:getDimensions()) - end - end - - p8data = data -end - -function toScreen(x, y) - return (app.camX + x) * app.camScale + app.left, - (app.camY + y) * app.camScale + app.top -end - -function fromScreen(x, y) - return (x - app.left)/app.camScale - app.camX, - (y - app.top)/app.camScale - app.camY -end - -function activeRoom() - return app.room and project.rooms[app.room] -end - -function mouseOverTile() - if activeRoom() then - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - local ti, tj = div8(mx - activeRoom().x), div8(my - activeRoom().y) - if ti >= 0 and ti < activeRoom().w and tj >= 0 and tj < activeRoom().h then - return ti, tj - end - end -end - -function showMessage(msg) - app.message = msg - app.messageTimeLeft = 4 -end - -function placeSelection() - if project.selection and app.room then - local sel, room = project.selection, activeRoom() - local i0, j0 = div8(sel.x - room.x), div8(sel.y - room.y) - for i = 0, sel.w - 1 do - if i0 + i >= 0 and i0 + i < room.w then - for j = 0, sel.h - 1 do - if j0 + j >= 0 and j0 + j < room.h then - room.data[i0 + i][j0 + j] = sel.data[i][j] - end - end - end - end - end - project.selection = nil -end - -function select(i1, j1, i2, j2) - local i0, j0, w, h = rectCont2Tiles(i1, j1, i2, j2) - if w > 1 or h > 1 then - local r = activeRoom() - local selection = newRoom(r.x + i0*8, r.y + j0*8, w, h) - for i = 0, w - 1 do - for j = 0, h - 1 do - selection.data[i][j] = r.data[i0 + i][j0 + j] - r.data[i0 + i][j0 + j] = 0 - end - end - project.selection = selection - end -end - -function pushHistory() - local s = dumpproject(project) - if s ~= app.history[app.historyN] then - --print("BEFORE: "..tostring(app.history[app.historyN])) - --print("AFTER: "..s) - app.historyN = app.historyN + 1 - - for i = app.historyN, #app.history do - app.history[i] = nil - end - - app.history[app.historyN] = s - end -end - -function undo() - if app.historyN >= 2 then - app.historyN = app.historyN - 1 - - local err - project, err = loadproject(app.history[app.historyN]) - if err then error(err) end - end - - if not activeRoom() then app.room = nil end -end - -function redo() - if app.historyN <= #app.history - 1 then - app.historyN = app.historyN + 1 - - local err - project, err = loadproject(app.history[app.historyN]) - if err then error(err) end - end - - if not activeRoom() then app.room = nil end -end - - - -require 'fileio' -require 'mainloop' -require 'keyboard' -require 'mouse' diff --git a/build copy/everhorn-l-linux/mainloop.lua b/build copy/everhorn-l-linux/mainloop.lua deleted file mode 100644 index 2cba359..0000000 --- a/build copy/everhorn-l-linux/mainloop.lua +++ /dev/null @@ -1,376 +0,0 @@ --- UI things - -function tileButton(n, highlight) - local x, y, w, h = ui:widgetBounds() - ui:image({p8data.spritesheet, p8data.quads[n]}) - - local hov = false - if ui:inputIsHovered(x, y, w, h) then - hov = true - end - if hov or highlight then - love.graphics.setLineWidth(1) - if hov then - love.graphics.setColor(0, 1, 0.5) - else - love.graphics.setColor(1, 1, 1) - end - x, y = x - 0.5, y - 0.5 - w, h = w + 1, h + 1 - ui:line(x, y, x + w, y) - ui:line(x, y, x, y + h) - ui:line(x + w, y, x + w, y + h) - ui:line(x, y + h, x + w, y + h) - end - if ui:inputIsMousePressed("left", x, y, w, h) then - return true - end -end - -function toolLabel(label, tool) - local hov = ui:widgetIsHovered() - local x, y, w, h = ui:widgetBounds() - - local color = "#afafaf" - if tool == app.tool then - color = "#00ff88" - end - - if hov then - local bg = "#00ff88" --"#afafaf" - ui:rectMultiColor(x, y, w + 4, h, bg, bg, bg, bg) - color = "#2d2d2d" - ui:stylePush { - window = { - background = bg, - } - } - - app.tool = tool - end - - ui:label(label, "left", color) - - if hov then ui:stylePop() end -end - -function closeToolMenu() - app.toolMenuX, app.toolMenuY = nil, nil -end - - - --- MAIN LOOP - -function love.load(args) - love.keyboard.setKeyRepeat(true) - - ui = nuklear.newUI() - - global_scale=1 -- global scale, to run nicely on hi dpi displays - tms = 4 -- tile menu scale - - for _,v in ipairs(args) do - if v=="--hidpi" then - global_scale = 2 - tms = 4*global_scale - end - end - - --p8data = loadpico8(love.filesystem.getSource().."\\celeste.p8") - - newProject() - pushHistory() - - - checkmarkIm=love.graphics.newImage("checkmark.png") - checkmarkWithBg=love.graphics.newCanvas(checkmarkIm:getWidth()*5/4,checkmarkIm:getHeight()*5/4) - love.graphics.setCanvas(checkmarkWithBg) - love.graphics.clear(0x64/0xff,0x64/0xff,0x64/0xff) - love.graphics.draw(checkmarkIm,checkmarkIm:getWidth()/8,checkmarkIm:getHeight()/8) - love.graphics.setCanvas() -end - -function love.update(dt) - app.W, app.H = love.graphics.getDimensions() - local rpw = app.W * 0.10 -- room panel width - app.left, app.top = rpw, 0 - - ui:frameBegin() - --ui:scale(2) - ui:stylePush { - window = { - spacing = {x = 1, y = 1}, - padding = {x = 1, y = 1}, - }, - selectable = { - padding = {x = 0, y = 0}, - ["normal active"] = "#000000", - ["hover active"] = "#000000", - ["pressed active"] = "#000000", - }, - checkbox = { - ["cursor normal"] = checkmarkIm, - ["cursor hover"] = checkmarkIm - } - } - - -- room panel - if ui:windowBegin("Room Panel", 0, 0, rpw, app.H, {"scrollbar"}) then - ui:layoutRow("dynamic", 25*global_scale, 1) - for n = 1, #project.rooms do - if ui:selectable("["..n.."] "..project.rooms[n].title, n == app.room) then - app.room = n - end - end - - if app.roomAdded then - ui:windowSetScroll(0, 100000) - app.roomAdded = false - end - end - ui:windowEnd() - - -- tool panel - if app.showToolPanel then - local tpw = 16*8*tms + 18 - if ui:windowBegin("Tool panel", app.W - tpw, 0, tpw, app.H) then - ui:layoutRow("static", 25*global_scale, 100*global_scale, 2) - if ui:selectable("Brush", app.tool == "brush") then app.tool = "brush" end - if ui:selectable("Rectangle", app.tool == "rectangle") then app.tool = "rectangle" end - ui:layoutRow("static", 25*global_scale, 100*global_scale, 1) - if ui:selectable("Select", app.tool == "select") then app.tool = "select" end - - for j = 0, app.showGarbageTiles and 15 or 7 do - ui:layoutRow("static", 8*tms, 8*tms, 16) - for i = 0, 15 do - local n = i + j*16 - if tileButton(n, app.currentTile == n and not app.autotile) then - app.currentTile = n - app.autotile = nil - end - end - end - - ui:layoutRow("dynamic", 25*global_scale, 1) - ui:label("Autotiles:") - ui:layoutRow("static", 8*tms, 8*tms, #autotiles) - for k, auto in ipairs(autotiles) do - if tileButton(auto[5], app.currentTile == auto[15] and app.autotile) then - app.currentTile = auto[15] - app.autotile = k - end - end - end - ui:windowEnd() - end - - if app.renameRoom then - local room = app.renameRoom - - local w, h = 200*global_scale, 125*global_scale - if ui:windowBegin("Rename room", app.W/2 - w/2, app.H/2 - h/2, w, h, {"title", "border", "closable", "movable"}) then - local x,y=div8(room.x),div8(room.y) - local fits_on_map=x>=0 and x+room.w<=128 and y>=0 and y+room.h<=64 - ui:layoutRow("dynamic",25*global_scale,1) - if not fits_on_map then - local style={} - for k,v in pairs({"text normal", "text hover", "text active"}) do - style[v]="#707070" - end - for k,v in pairs({"normal", "hover", "active"}) do - style[v]=checkmarkWithBg -- show both selected and unselected as having a check to avoid nukelear limitations - -- kinda hacky but it works decently enough - end - ui:stylePush({['checkbox']=style}) - - else - ui:stylePush({}) - end - ui:checkbox("Level Stored As Hex",fits_on_map and app.renameRoomVTable.hex or true) - ui:stylePop() - ui:layoutRow("dynamic", 25*global_scale, 1) - - local state, changed - ui:editFocus() - state, changed = ui:edit("simple", app.renameRoomVTable.name) - - if ui:button("OK") or app.enterPressed then - room.title = app.renameRoomVTable.name.value - room.hex = app.renameRoomVTable.hex.value - app.renameRoom = nil - end - else - app.renameRoom = nil - end - ui:windowEnd() - end - - app.enterPressed = false - - app.anyWindowHovered = ui:windowIsAnyHovered() - - ui:stylePop() - - local hov = ui:windowIsAnyHovered() - - ui:frameEnd() - - if app.brushing and not hov and not love.keyboard.isDown("lalt") and (love.mouse.isDown(1) or love.mouse.isDown(2)) then - if app.tool == "brush" then - local n = app.currentTile - if love.mouse.isDown(2) then - n = 0 - end - - local ti, tj = mouseOverTile() - if ti then - local room = activeRoom() - - activeRoom().data[ti][tj] = n - - if app.autotile then - autotileWithNeighbors(activeRoom(), ti, tj, app.autotile) - end - end - end - end - - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - if app.roomResizeSideX and app.room then - local room = activeRoom() - - if not room.hex then - -- if the room is stored in mapdata, it still has to fit when resizing - mx = math.min(math.max(mx, 0), 1024) - my = math.min(math.max(my, 0), 512) - end - local left, top = room.x, room.y - local right, bottom = left + room.w*8, top + room.h*8 - - local ax = app.roomResizeSideX > 0 and right or left - local ay = app.roomResizeSideY > 0 and bottom or top - - local dx = div8(math.abs(mx-ax)) * sign(mx-ax) * app.roomResizeSideX - local dy = div8(math.abs(my-ay)) * sign(my-ay) * app.roomResizeSideY - - dx = math.max(1, room.w + dx) - room.w - dy = math.max(1, room.h + dy) - room.h - - if dx ~= 0 or dy ~= 0 then - local newdata, neww, newh = {}, room.w + dx, room.h + dy - - -- copy all tiles (even if outside bounds - so they persist if you cut part of room off and then resize back) - for i, col in pairs(room.data) do - for j, n in pairs(col) do - local i_, j_ = i + (ax == left and dx or 0), j + (ay == top and dy or 0) - - if not newdata[i_] then newdata[i_] = {} end - newdata[i_][j_] = n - end - end - -- add 0 when no data is there - for i = 0, neww - 1 do - newdata[i] = newdata[i] or {} - for j = 0, newh - 1 do - newdata[i][j] = newdata[i][j] or 0 - end - end - - room.x = room.x - (ax == left and 8*(neww-room.w) or 0) - room.y = room.y - (ay == top and 8*(newh-room.h) or 0) - room.data, room.w, room.h = newdata, neww, newh - end - end - - if project.selection and app.tool ~= "select" then - placeSelection() - end - - if app.message then - app.messageTimeLeft = app.messageTimeLeft - dt - if app.messageTimeLeft < 0 then - app.message = nil - app.messageTimeLeft = nil - end - end -end - -function love.draw() - love.graphics.clear(0.25, 0.25, 0.25) - love.graphics.reset() - love.graphics.setLineStyle("rough") - - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - local ox, oy = toScreen(0, 0) - love.graphics.translate(math.floor(ox), math.floor(oy)) - love.graphics.scale(app.camScale) - - love.graphics.setColor(0.28, 0.28, 0.28) - love.graphics.setLineWidth(2) - for i = 0, 7 do - for j = 0, 3 do - love.graphics.rectangle("line", i*128, j*128, 128, 128) - end - end - - for _, room in ipairs(project.rooms) do - if room ~= activeRoom() then - drawRoom(room, p8data) - love.graphics.setColor(0.5, 0.5, 0.5, 0.4) - love.graphics.rectangle("fill", room.x, room.y, room.w*8, room.h*8) - end - end - if activeRoom() then - drawRoom(activeRoom(), p8data) - end - if project.selection then - drawRoom(project.selection, p8data, true) - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", project.selection.x + 0.5 / app.camScale, project.selection.y + 0.5 / app.camScale, project.selection.w*8, project.selection.h*8) - end - - local ti, tj = mouseOverTile() - - if app.tool == "brush" or (app.tool == "rectangle" and not app.rectangleI) then - if ti and not app.toolMenuX then - love.graphics.setColor(1, 1, 1) - love.graphics.draw(p8data.spritesheet, p8data.quads[app.currentTile], activeRoom().x + ti*8, activeRoom().y + tj*8) - - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", activeRoom().x + ti*8 + 0.5 / app.camScale, - activeRoom().y + tj*8 + 0.5 / app.camScale, 8, 8) - end - elseif (app.tool == "rectangle" and app.rectangleI) or app.tool == "select" then - local i1, j1 = app.rectangleI or app.selectTileI, app.rectangleJ or app.selectTileJ - if i1 and ti then - local i, j, w, h = rectCont2Tiles(ti, tj, i1, j1) - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", activeRoom().x + i*8 + 0.5 / app.camScale, - activeRoom().y + j*8 + 0.5 / app.camScale, - w*8, h*8) - end - end - - love.graphics.reset() - love.graphics.setColor(1, 1, 1) - love.graphics.translate(app.left, app.top) - love.graphics.setFont(app.font) - - if app.message then - love.graphics.print(app.message, 4, app.H - app.font:getHeight() - 4) - end - - if app.playtesting then - local s = app.playtesting == 1 and "[playtesting]" or "[playtesting, 2 dashes]" - love.graphics.print(s, 4, 4) - end - ui:draw() -end diff --git a/build copy/everhorn-l-linux/mouse.lua b/build copy/everhorn-l-linux/mouse.lua deleted file mode 100644 index e1dc66d..0000000 --- a/build copy/everhorn-l-linux/mouse.lua +++ /dev/null @@ -1,184 +0,0 @@ -function love.mousepressed(x, y, button, istouch, presses) - if ui:mousepressed(x, y, button, istouch, presses) then - return - end - - local mx, my = fromScreen(x, y) - if button == 1 then - if not app.toolMenuX then - local oldActiveRoom = app.room - for i, room in ipairs(project.rooms) do - if mx >= room.x and mx <= room.x + room.w*8 - and my >= room.y and my <= room.y + room.h*8 then - app.room = i - if app.room == oldActiveRoom then - break - end - end - end - if app.room ~= oldActiveRoom then - app.suppressMouse = true - end - - if love.keyboard.isDown("lalt") then - if app.room then - app.roomMoveX, app.roomMoveY = mx - activeRoom().x, my - activeRoom().y - end - return - end - - if app.tool == "brush" and not app.suppressMouse then - app.brushing = true - elseif app.tool == "select" then - local ti, tj = mouseOverTile() - if not project.selection then - if ti then - app.selectTileI, app.selectTileJ = ti, tj - end - else - project.selectionMoveX, project.selectionMoveY = mx - project.selection.x, my - project.selection.y - project.selectionStartX, project.selectionStartY = project.selection.x, project.selection.y - end - end - end - elseif button == 2 then - if love.keyboard.isDown("lalt") and app.room then - app.roomResizeSideX = sign(mx - activeRoom().x - activeRoom().w*8/2) - app.roomResizeSideY = sign(my - activeRoom().y - activeRoom().h*8/2) - return - end - - if app.tool == "brush" then - app.brushing = true - end - elseif button == 3 then - app.camMoveX, app.camMoveY = fromScreen(x, y) - end - - if button == 1 or button == 2 then - local ti, tj = mouseOverTile() - if app.tool == "rectangle" and ti then - app.rectangleI, app.rectangleJ = ti, tj - end - end -end - -function love.mousereleased(x, y, button, istouch, presses) - if ui:mousereleased(x, y, button, istouch, presses) then - return - end - - local ti, tj = mouseOverTile() - - if app.tool == "rectangle" or app.tool == "select" then - local i1, j1 = app.rectangleI or app.selectTileI, app.rectangleJ or app.selectTileJ - - if app.tool == "rectangle" and i1 and ti then - local room = activeRoom() - - local n = app.currentTile - if app.autotile then - n = autotiles[autotilet[n]][15] -- inner version - end - if button == 2 then - n = 0 - end - - local i0, j0, w, h = rectCont2Tiles(i1, j1, ti, tj) - for i = i0, i0 + w - 1 do - for j = j0, j0 + h - 1 do - room.data[i][j] = n - end - end - - if app.autotile then - for i = i0, i0 + w - 1 do - autotileWithNeighbors(room, i, j0) - autotileWithNeighbors(room, i, j0 + h - 1) - end - for j = j0 + 1, j0 + h - 2 do - autotileWithNeighbors(room, i0, j) - autotileWithNeighbors(room, i0 + w - 1, j) - end - end - elseif app.tool == "select" then - if i1 and ti then - placeSelection() - - select(ti, tj, i1, j1) - end - - if project.selection and project.selectionMoveX then - if project.selection.x == project.selectionStartX and project.selection.y == project.selectionStartY then - placeSelection() - end - end - end - end - - app.camMoveX, app.camMoveY = nil, nil - app.roomMoveX, app.roomMoveY = nil, nil - app.roomResizeSideX, app.roomResizeSideY = nil, nil - app.brushing = false - app.rectangleI, app.rectangleJ = nil, nil - app.selectTileI, app.selectTileJ = nil, nil - project.selectionMoveX, project.selectionMoveY = nil, nil - - app.suppressMouse = false - - -- just save history every time a mouse button is released lol - pushHistory() -end - -function love.mousemoved(x, y, dx, dy, istouch) - if ui:mousemoved(x, y, dx, dy, istouch) then - return - end - - local mx, my = fromScreen(x, y) - local ti, tj = div8(mx), div8(my) - if app.camMoveX then - app.camX = app.camX + mx - app.camMoveX - app.camY = app.camY + my - app.camMoveY - end - if app.roomMoveX and app.room then - local room=activeRoom() - room.x = roundto8(mx - app.roomMoveX) - room.y = roundto8(my - app.roomMoveY) - if not room.hex then - --can't move room stored in map outside of the map - room.x = math.max(0, math.min(1024 - 8*room.w, room.x)) - room.y = math.max(0, math.min(512 - 8*room.h, room.y)) - end - end - if project.selectionMoveX and project.selection then - project.selection.x = roundto8(mx - project.selectionMoveX) - project.selection.y = roundto8(my - project.selectionMoveY) - end -end - -function love.wheelmoved(x, y) - -- this is an inelegant solution to the fact that some slut decided that scrollbars scroll even if the window isn't even hovered - if app.anyWindowHovered then - if ui:wheelmoved(x, y) then - return - end - end - - if y ~= 0 then - local mx, my = love.mouse.getPosition() - rmx, rmy = fromScreen(mx, my) - - if y > 0 then - app.camScaleSetting = app.camScaleSetting + 1 - elseif y < 0 then - app.camScaleSetting = app.camScaleSetting - 1 - end - app.camScaleSetting = math.min(math.max(app.camScaleSetting, -3), 20) - app.camScale = app.camScaleSetting > 0 and (app.camScaleSetting + 1) or 2 ^ app.camScaleSetting - - nrmx, nrmy = fromScreen(mx, my) - app.camX = app.camX + nrmx - rmx - app.camY = app.camY + nrmy - rmy - end -end diff --git a/build copy/everhorn-l-linux/nfd.so b/build copy/everhorn-l-linux/nfd.so deleted file mode 100755 index 83b7f02..0000000 Binary files a/build copy/everhorn-l-linux/nfd.so and /dev/null differ diff --git a/build copy/everhorn-l-linux/nuklear.so b/build copy/everhorn-l-linux/nuklear.so deleted file mode 100755 index d910bba..0000000 Binary files a/build copy/everhorn-l-linux/nuklear.so and /dev/null differ diff --git a/build copy/everhorn-l-linux/pico-8_font.png b/build copy/everhorn-l-linux/pico-8_font.png deleted file mode 100644 index 44bbe17..0000000 Binary files a/build copy/everhorn-l-linux/pico-8_font.png and /dev/null differ diff --git a/build copy/everhorn-l-linux/room.lua b/build copy/everhorn-l-linux/room.lua deleted file mode 100644 index a8a2019..0000000 --- a/build copy/everhorn-l-linux/room.lua +++ /dev/null @@ -1,33 +0,0 @@ -function newRoom(x, y, w, h) - local room = { - x = x or 0, - y = y or 0, - w = w or 16, - h = h or 16, - hex=true, - data = {}, - title = "", - } - room.data = fill2d0s(room.w, room.h) - - return room -end - -function drawRoom(room, p8data, highlight) - love.graphics.setColor(1, 1, 1) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - local n = room.data[i][j] - if not p8data.quads[n] then print(n) end - if not highlight or n~=0 then - love.graphics.setColor(1, 1, 1) - love.graphics.draw(p8data.spritesheet, p8data.quads[n], room.x + i*8, room.y + j*8) - - if highlight then - love.graphics.setColor(0, 1, 0.5, 0.5) - love.graphics.rectangle("fill", room.x + i*8, room.y + j*8, 8, 8) - end - end - end - end -end diff --git a/build copy/everhorn-l-linux/serpent.lua b/build copy/everhorn-l-linux/serpent.lua deleted file mode 100644 index a043713..0000000 --- a/build copy/everhorn-l-linux/serpent.lua +++ /dev/null @@ -1,140 +0,0 @@ -local n, v = "serpent", "0.302" -- (C) 2012-18 Paul Kulchenko; MIT License -local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" -local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} -local badtype = {thread = true, userdata = true, cdata = true} -local getmetatable = debug and debug.getmetatable or getmetatable -local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+ -local keyword, globals, G = {}, {}, (_G or _ENV) -for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', - 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end -for k,v in pairs(G) do globals[v] = k end -- build func to name mapping -for _,g in ipairs({'coroutine', 'debug', 'io', 'math', 'string', 'table', 'os'}) do - for k,v in pairs(type(G[g]) == 'table' and G[g] or {}) do globals[v] = g..'.'..k end end - -local function s(t, opts) - local name, indent, fatal, maxnum = opts.name, opts.indent, opts.fatal, opts.maxnum - local sparse, custom, huge = opts.sparse, opts.custom, not opts.nohuge - local space, maxl = (opts.compact and '' or ' '), (opts.maxlevel or math.huge) - local maxlen, metatostring = tonumber(opts.maxlength), opts.metatostring - local iname, comm = '_'..(name or ''), opts.comment and (tonumber(opts.comment) or math.huge) - local numformat = opts.numformat or "%.17g" - local seen, sref, syms, symn = {}, {'local '..iname..'={}'}, {}, 0 - local function gensym(val) return '_'..(tostring(tostring(val)):gsub("[^%w]",""):gsub("(%d%w+)", - -- tostring(val) is needed because __tostring may return a non-string value - function(s) if not syms[s] then symn = symn+1; syms[s] = symn end return tostring(syms[s]) end)) end - local function safestr(s) return type(s) == "number" and tostring(huge and snum[tostring(s)] or numformat:format(s)) - or type(s) ~= "string" and tostring(s) -- escape NEWLINE/010 and EOF/026 - or ("%q"):format(s):gsub("\010","n"):gsub("\026","\\026") end - local function comment(s,l) return comm and (l or 0) < comm and ' --[['..select(2, pcall(tostring, s))..']]' or '' end - local function globerr(s,l) return globals[s] and globals[s]..comment(s,l) or not fatal - and safestr(select(2, pcall(tostring, s))) or error("Can't serialize "..tostring(s)) end - local function safename(path, name) -- generates foo.bar, foo[3], or foo['b a r'] - local n = name == nil and '' or name - local plain = type(n) == "string" and n:match("^[%l%u_][%w_]*$") and not keyword[n] - local safe = plain and n or '['..safestr(n)..']' - return (path or '')..(plain and path and '.' or '')..safe, safe end - local alphanumsort = type(opts.sortkeys) == 'function' and opts.sortkeys or function(k, o, n) -- k=keys, o=originaltable, n=padding - local maxn, to = tonumber(n) or 12, {number = 'a', string = 'b'} - local function padnum(d) return ("%0"..tostring(maxn).."d"):format(tonumber(d)) end - table.sort(k, function(a,b) - -- sort numeric keys first: k[key] is not nil for numerical keys - return (k[a] ~= nil and 0 or to[type(a)] or 'z')..(tostring(a):gsub("%d+",padnum)) - < (k[b] ~= nil and 0 or to[type(b)] or 'z')..(tostring(b):gsub("%d+",padnum)) end) end - local function val2str(t, name, indent, insref, path, plainindex, level) - local ttype, level, mt = type(t), (level or 0), getmetatable(t) - local spath, sname = safename(path, name) - local tag = plainindex and - ((type(name) == "number") and '' or name..space..'='..space) or - (name ~= nil and sname..space..'='..space or '') - if seen[t] then -- already seen this element - sref[#sref+1] = spath..space..'='..space..seen[t] - return tag..'nil'..comment('ref', level) end - -- protect from those cases where __tostring may fail - if type(mt) == 'table' and metatostring ~= false then - local to, tr = pcall(function() return mt.__tostring(t) end) - local so, sr = pcall(function() return mt.__serialize(t) end) - if (to or so) then -- knows how to serialize itself - seen[t] = insref or spath - t = so and sr or tr - ttype = type(t) - end -- new value falls through to be serialized - end - if ttype == "table" then - if level >= maxl then return tag..'{}'..comment('maxlvl', level) end - seen[t] = insref or spath - if next(t) == nil then return tag..'{}'..comment(t, level) end -- table empty - if maxlen and maxlen < 0 then return tag..'{}'..comment('maxlen', level) end - local maxn, o, out = math.min(#t, maxnum or #t), {}, {} - for key = 1, maxn do o[key] = key end - if not maxnum or #o < maxnum then - local n = #o -- n = n + 1; o[n] is much faster than o[#o+1] on large tables - for key in pairs(t) do if o[key] ~= key then n = n + 1; o[n] = key end end end - if maxnum and #o > maxnum then o[maxnum+1] = nil end - if opts.sortkeys and #o > maxn then alphanumsort(o, t, opts.sortkeys) end - local sparse = sparse and #o > maxn -- disable sparsness if only numeric keys (shorter output) - for n, key in ipairs(o) do - local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse - if opts.valignore and opts.valignore[value] -- skip ignored values; do nothing - or opts.keyallow and not opts.keyallow[key] - or opts.keyignore and opts.keyignore[key] - or opts.valtypeignore and opts.valtypeignore[type(value)] -- skipping ignored value types - or sparse and value == nil then -- skipping nils; do nothing - elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then - if not seen[key] and not globals[key] then - sref[#sref+1] = 'placeholder' - local sname = safename(iname, gensym(key)) -- iname is table for local variables - sref[#sref] = val2str(key,sname,indent,sname,iname,true) end - sref[#sref+1] = 'placeholder' - local path = seen[t]..'['..tostring(seen[key] or globals[key] or gensym(key))..']' - sref[#sref] = path..space..'='..space..tostring(seen[value] or val2str(value,nil,indent,path)) - else - out[#out+1] = val2str(value,key,indent,nil,seen[t],plainindex,level+1) - if maxlen then - maxlen = maxlen - #out[#out] - if maxlen < 0 then break end - end - end - end - local prefix = string.rep(indent or '', level) - local head = indent and '{\n'..prefix..indent or '{' - local body = table.concat(out, ','..(indent and '\n'..prefix..indent or space)) - local tail = indent and "\n"..prefix..'}' or '}' - return (custom and custom(tag,head,body,tail,level) or tag..head..body..tail)..comment(t, level) - elseif badtype[ttype] then - seen[t] = insref or spath - return tag..globerr(t, level) - elseif ttype == 'function' then - seen[t] = insref or spath - if opts.nocode then return tag.."function() --[[..skipped..]] end"..comment(t, level) end - local ok, res = pcall(string.dump, t) - local func = ok and "((loadstring or load)("..safestr(res)..",'@serialized'))"..comment(t, level) - return tag..(func or globerr(t, level)) - else return tag..safestr(t) end -- handle all other types - end - local sepr = indent and "\n" or ";"..space - local body = val2str(t, name, indent) -- this call also populates sref - local tail = #sref>1 and table.concat(sref, sepr)..sepr or '' - local warn = opts.comment and #sref>1 and space.."--[[incomplete output with shared/self-references skipped]]" or '' - return not name and body..warn or "do local "..body..sepr..tail.."return "..name..sepr.."end" -end - -local function deserialize(data, opts) - local env = (opts and opts.safe == false) and G - or setmetatable({}, { - __index = function(t,k) return t end, - __call = function(t,...) error("cannot call functions") end - }) - local f, res = (loadstring or load)('return '..data, nil, nil, env) - if not f then f, res = (loadstring or load)(data, nil, nil, env) end - if not f then return f, res end - if setfenv then setfenv(f, env) end - return pcall(f) -end - -local function merge(a, b) if b then for k,v in pairs(b) do a[k] = v end end; return a; end -return { _NAME = n, _COPYRIGHT = c, _DESCRIPTION = d, _VERSION = v, serialize = s, - load = deserialize, - dump = function(a, opts) return s(a, merge({name = '_', compact = true, sparse = true}, opts)) end, - line = function(a, opts) return s(a, merge({sortkeys = true, comment = true}, opts)) end, - block = function(a, opts) return s(a, merge({indent = ' ', sortkeys = true, comment = true}, opts)) end } diff --git a/build copy/everhorn-l-linux/util.lua b/build copy/everhorn-l-linux/util.lua deleted file mode 100644 index 0731db0..0000000 --- a/build copy/everhorn-l-linux/util.lua +++ /dev/null @@ -1,124 +0,0 @@ -function fromhex(s) - return tonumber(s, 16) -end - -function fromhex_swapnibbles(s) - local x = fromhex(s) - return math.floor(x/16) + 16*(x%16) -end - -local hext = { [0] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'} - -function tohex(b) - return hext[math.floor(b/16)]..hext[b%16] -end - -function tohex_swapnibbles(b) - return hext[b%16]..hext[math.floor(b/16)] -end - -function roundto8(x) - return 8*math.floor(x/8 + 1/2) -end - -function sign(x) - return x > 0 and 1 or -1 -end - -function fill2d0s(w, h) - local a = {} - for i = 0, w - 1 do - a[i] = {} - for j = 0, h - 1 do - a[i][j] = 0 - end - end - return a -end - -function rectCont2Tiles(i, j, i_, j_) - return math.min(i, i_), math.min(j, j_), math.abs(i - i_) + 1, math.abs(j - j_) + 1 -end - -function div8(x) - return math.floor(x/8) -end - -function dumplua(t) - return serpent.block(t, {comment = false}) -end - -function loadlua(s) - f, err = loadstring("return "..s) - if err then - return nil, err - else - return f() - end -end - -local alph_ = "abcdefghijklmnopqrstuvwxyz" -local alph = {[0] = " "} -for i = 1, 26 do - alph[i] = string.sub(alph_, i, i) -end - -function b26(n) - local m, n = math.floor(n / 26), n % 26 - if m > 0 then - return b26(m - 1) .. alph[n + 1] - else - return alph[n + 1] - end -end - -function loadroomdata(room, levelstr) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - local k = i + j*room.w - room.data[i][j] = fromhex(string.sub(levelstr, 1 + 2*k, 2 + 2*k)) - end - end -end - -function dumproomdata(room) - local s = "" - for j = 0, room.h - 1 do - for i = 0, room.w - 1 do - s = s .. tohex(room.data[i][j]) - end - end - return s -end - -function roomMakeStr(room) - if room then - room.str = dumproomdata(room) - end -end - -function roomMakeData(room) - if room then - room.data = fill2d0s(room.w, room.h) - loadroomdata(room, room.str) - end -end - -function loadproject(str) - local proj = loadlua(str) - for n, room in pairs(proj.rooms) do - roomMakeData(room) - end - roomMakeData(proj.selection) - - return proj -end - -function dumpproject(proj) - for n, room in pairs(proj.rooms) do - roomMakeStr(room) - end - roomMakeStr(proj.selection) - - return serpent.line(proj, {compact = true, comment = false, keyignore = {["data"] = true}}) -end diff --git a/build copy/everhorn-l-macos.tar.gz b/build copy/everhorn-l-macos.tar.gz deleted file mode 100644 index 20f99b9..0000000 Binary files a/build copy/everhorn-l-macos.tar.gz and /dev/null differ diff --git a/build copy/everhorn-l-macos/autotiles.lua b/build copy/everhorn-l-macos/autotiles.lua deleted file mode 100644 index 2523734..0000000 --- a/build copy/everhorn-l-macos/autotiles.lua +++ /dev/null @@ -1,119 +0,0 @@ --- 8 ---2 O 1 --- 4 - -autotiles = { - -- snow - [1] = { - [0] = 32, - [1] = 52, - [2] = 54, - [3] = 53, - [4] = 39, - [5] = 33, - [6] = 35, - [7] = 34, - [8] = 55, - [9] = 49, - [10] = 51, - [11] = 50, - [12] = 48, - [13] = 36, - [14] = 38, - [15] = 37, - -- indexes beyond 15 can be used to allow connecting to extra tiles - [16] = 72, - }, - -- ice - [2] = { - [0] = 117, - [1] = 114, - [2] = 116, - [3] = 115, - [4] = 69, - [5] = 66, - [6] = 68, - [7] = 67, - [8] = 101, - [9] = 98, - [10] = 100, - [11] = 99, - [12] = 85, - [13] = 82, - [14] = 84, - [15] = 83, - }, - -- bg dirt (simplistic - only corner tiles are used) - [3] = { - [0] = 40, - [1] = 40, - [2] = 40, - [3] = 40, - [4] = 40, - [5] = 58, - [6] = 57, - [7] = 40, - [8] = 40, - [9] = 42, - [10] = 41, - [11] = 40, - [12] = 40, - [13] = 40, - [14] = 40, - [15] = 40, - -- extra - [16] = 16, - [17] = 56, - [18] = 88, - [19] = 103, - [20] = 104, - }, -} - -autotilet, autotilet_strict = {}, {} --- n => autotile n belongs to, if any --- strict excludes extra autotiles (>=16) - -for k, auto in ipairs(autotiles) do - for nb, n in pairs(auto) do - autotilet[n] = k - if nb >= 0 and nb < 16 then - autotilet_strict[n] = k - end - end -end - -local function isAutotile(room, i, j, strict) - if i >= 0 and i < room.w and j >= 0 and j < room.h then - local t = strict and autotilet_strict or autotilet - return t[room.data[i][j]] - else - return 0 -- out-of-bounds is considered autotile 0, which connects to any other autotile - end -end - -local function b1(b) -- converts truthy to 1, falsy to 0 - return b and 1 or 0 -end - -local function matches(x, k) - return x == 0 and true or x == k -end - -function autotile(room, i, j, k) - if k and k == isAutotile(room, i, j, true) then - local nb = b1(matches(isAutotile(room, i + 1, j), k)) - + b1(matches(isAutotile(room, i - 1, j), k)) * 2 - + b1(matches(isAutotile(room, i, j + 1), k)) * 4 - + b1(matches(isAutotile(room, i, j - 1), k)) * 8 - room.data[i][j] = autotiles[k][nb] - end -end - -function autotileWithNeighbors(room, i, j, k) - autotile(room, i, j, k) - autotile(room, i + 1, j, k) - autotile(room, i - 1, j, k) - autotile(room, i, j + 1, k) - autotile(room, i, j - 1, k) -end diff --git a/build copy/everhorn-l-macos/checkmark.png b/build copy/everhorn-l-macos/checkmark.png deleted file mode 100644 index a587fa7..0000000 Binary files a/build copy/everhorn-l-macos/checkmark.png and /dev/null differ diff --git a/build copy/everhorn-l-macos/conf.lua b/build copy/everhorn-l-macos/conf.lua deleted file mode 100644 index 9949538..0000000 --- a/build copy/everhorn-l-macos/conf.lua +++ /dev/null @@ -1,6 +0,0 @@ -function love.conf(t) - t.window.title = "Everhorn" - t.window.width = 1280 - t.window.height = 720 - t.window.resizable = true -end diff --git a/build copy/everhorn-l-macos/filedialog.lua b/build copy/everhorn-l-macos/filedialog.lua deleted file mode 100644 index b89f330..0000000 --- a/build copy/everhorn-l-macos/filedialog.lua +++ /dev/null @@ -1,15 +0,0 @@ -local filedialog = {} - -local nfd = require 'nfd' - -function filedialog.open() - local r = nfd.open("p8") - print(r) - return r -end - -function filedialog.save() - return nfd.save("p8") -end - -return filedialog diff --git a/build copy/everhorn-l-macos/fileio.lua b/build copy/everhorn-l-macos/fileio.lua deleted file mode 100644 index 423c39c..0000000 --- a/build copy/everhorn-l-macos/fileio.lua +++ /dev/null @@ -1,364 +0,0 @@ --- functions to read lines correctly for \r\n line endings - -local function cr_lines(s) - return s:gsub('\r\n?', '\n'):gmatch('(.-)\n') -end - -local function cr_file_lines(file) - local s = file:read('*a') - if s:sub(#s, #s) ~= "\n" then - s = s .. "\n" - end - return cr_lines(s) -end - --- file handling - -function loadpico8(filename) - love.graphics.setDefaultFilter("nearest", "nearest") - - local file, err = io.open(filename, "rb") - - local data = {} - - data.palette = { - {0, 0, 0, 255}, - {29, 43, 83, 255}, - {126,37, 83, 255}, - {0, 135,81, 255}, - {171,82, 54, 255}, - {95, 87, 79, 255}, - {194,195,199,255}, - {255,241,232,255}, - {255,0, 77, 255}, - {255,163,0, 255}, - {255,240,36, 255}, - {0, 231,86, 255}, - {41, 173,255,255}, - {131,118,156,255}, - {255,119,168,255}, - {255,204,170,255} - } - - local sections = {} - local cursec = nil - for line in cr_file_lines(file) do - local sec = string.match(line, "^__(%a+)__$") - if sec then - cursec = sec - sections[sec] = {} - elseif cursec then - table.insert(sections[cursec], line) - end - end - file:close() - local p8font=love.image.newImageData("pico-8_font.png") - local function toGrey(x,y,r,g,b,a) - return r*194/255,g*195/255,b*199/255,a - end - p8fontGrey=love.image.newImageData(p8font:getWidth(),p8font:getHeight(),p8font:getFormat(),p8font) - p8fontGrey:mapPixel(toGrey) - local function get_font_quad(digit) - if digit<10 then - return 8*digit,24,4,8 - else - return 8*(digit-9),48,4,8 - end - end - local spritesheet_data = love.image.newImageData(128, 128) - for j = 0, spritesheet_data:getHeight() - 1 do - local line = sections["gfx"] and sections["gfx"][j + 1] or "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - for i = 0, spritesheet_data:getWidth() - 1 do - local s = string.sub(line, 1 + i, 1 + i) - local b = fromhex(s) - local c = data.palette[b + 1] - spritesheet_data:setPixel(i, j, c[1]/255, c[2]/255, c[3]/255, 1) - end - end - - for j =8,15 do - for i = 0, 15 do - local id=i+16*(j-8) - local d1=math.floor(id/16) - local d2=id%16 - --spritesheet_data:paste(p8font,8*i,8*j,get_font_quad(d1)) - spritesheet_data:paste(p8fontGrey,8*i,8*j,get_font_quad(d1)) - spritesheet_data:paste(p8font,8*i+4,8*j,get_font_quad(d2)) - end - end - - data.spritesheet = love.graphics.newImage(spritesheet_data) - - data.quads = {} - for i = 0, 15 do - for j = 0, 15 do - data.quads[i + j*16] = love.graphics.newQuad(i*8, j*8, 8, 8, data.spritesheet:getDimensions()) - end - end - - data.map = {} - for i = 0, 127 do - data.map[i] = {} - for j = 0, 31 do - local line = sections["map"] and sections["map"][j + 1] or "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - local s = string.sub(line, 1 + 2*i, 2 + 2*i) - data.map[i][j] = fromhex(s) - end - for j = 32, 63 do - local i_ = i%64 - local j_ = i <= 63 and j*2 or j*2 + 1 - local line = sections["gfx"][j_ + 1] or "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - local s = string.sub(line, 1 + 2*i_, 2 + 2*i_) - data.map[i][j] = fromhex_swapnibbles(s) - end - end - - data.rooms = {} - data.roomBounds = {} - - -- code: look for the magic comment - local code = table.concat(sections["lua"], "\n") - local evh = string.match(code, "%-%-@begin([^@]+)%-%-@end") - local levels, mapdata - if evh then - -- cut out comments - loadstring doesn't parse them for some reason - evh = string.gsub(evh, "%-%-[^\n]*\n", "") - evh = string.gsub(evh, "//[^\n]*\n", "") - - local chunk, err = loadstring(evh) - if not err then - local env = {} - chunk = setfenv(chunk, env) - chunk() - - levels, mapdata = env.levels, env.mapdata - end - end - - mapdata = mapdata or {} - - -- flatten levels and mapdata - local lvls = {} - if levels then - for n, s in pairs(levels) do - table.insert(lvls, {n, s, mapdata[n]}) - end - end - table.sort(lvls, function(p1, p2) return p1[1] < p2[1] end) - levels, mapdata = {}, {} - for n, p in pairs(lvls) do - levels[n] = p[2] - mapdata[n] = p[3] - end - - -- load levels - if levels[1] then - for n, s in pairs(levels) do - local x, y, w, h, title = string.match(s, "^([^,]*),([^,]*),([^,]*),([^,]*),?([^,]*)$") - x, y, w, h = tonumber(x), tonumber(y), tonumber(w), tonumber(h) - if x and y and w and h then -- this confirms they're there and they're numbers - data.roomBounds[n] = {x=x*128, y=y*128, w=w*16, h=h*16, title=title} - else - print("wat", s) - end - end - else - for J = 0, 3 do - for I = 0, 7 do - local b = {x = I*128, y = J*128, w = 16, h = 16, title=""} - table.insert(data.roomBounds, b) - end - end - end - - -- load mapdata - if mapdata then - for n, levelstr in pairs(mapdata) do - local b = data.roomBounds[n] - if b then - local room = newRoom(b.x, b.y, b.w, b.h) - loadroomdata(room, levelstr) - room.title = b.title - data.rooms[n] = room - end - end - end - - -- fill rooms with no mapdata from p8 map - for n, b in ipairs(data.roomBounds) do - if not data.rooms[n] then - local room = newRoom(b.x, b.y, b.w, b.h) - room.hex=false - room.title = b.title - - for i = 0, b.w - 1 do - for j = 0, b.h - 1 do - local i1, j1 = div8(b.x) + i, div8(b.y) + j - if i1 >= 0 and i1 < 128 and j1 >= 0 and j1 < 64 then - room.data[i][j] = data.map[i1][j1] - else - room.data[i][j] = 0 - end - end - end - - data.rooms[n] = room - end - end - return data -end - -function openPico8(filename) - newProject() - - -- loads into global p8data as well, for spritesheet - p8data = loadpico8(filename) - project.rooms = p8data.rooms - - app.openFileName = filename - - return true -end - -function savePico8(filename) - local map = fill2d0s(128, 64) - - for _, room in ipairs(project.rooms) do - if not room.hex then - local i0, j0 = div8(room.x), div8(room.y) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - if map[i0+i] then - map[i0+i][j0+j] = room.data[i][j] - end - end - end - end - end - - local file = io.open(filename, "rb") - if not file and app.openFileName then - file = io.open(app.openFileName, "rb") - end - if not file then - return false - end - - local out = {} - - local ln = 1 - local gfxstart, mapstart - for line in cr_file_lines(file) do - table.insert(out, line) - ln = ln + 1 - end - file:close() - - local levels, mapdata = {}, {} - for n = 1, #project.rooms do - local room = project.rooms[n] - levels[n] = string.format("%g,%g,%g,%g,%s", room.x/128, room.y/128, room.w/16, room.h/16, room.title) - - if room.hex then - mapdata[n] = dumproomdata(room) - end - end - - -- map section - - -- start out by making sure both sections exist, and are sized to max size - - - local gfxexist, mapexist,labelstart - for k = 1, #out do - if out[k] == "__gfx__" then - gfxexist=true - elseif out[k] == "__map__" then - mapexist=true - elseif out[k] == "__label__" then - labelstart = k - end - end - local gfxtable = {} - for j = gfxstart, labelstart-1 do - gfxtable[j] = out[j] - end - - if not gfxexist then - table.insert(out,"__gfx__") - end - if not mapexist then - table.insert(out,"__map__") - end - - for k,v in ipairs(out) do - if out[k]=="__gfx__" or out[k]=="__map__" then - local j=k+1 - while j<#out and not out[j]:match("__%a+__") do - j=j+1 - end - local emptyline="" - for i=1,out[k]=="__gfx__" and 128 or 256 do - emptyline=emptyline.."0" - end - for i=j,k+(out[k]=="__gfx__" and 128 or 32) do - table.insert(out,i,emptyline) - end - end - end - local gfxstart, mapstart - for k = 1, #out do - if out[k] == "__gfx__" then - gfxstart = k - elseif out[k] == "__map__" then - mapstart = k - end - end - if not (mapstart and gfxstart) then - error("uuuh") - end - - for j = 0, 31 do - local line = "" - for i = 0, 127 do - line = line .. tohex(map[i][j]) - end - out[mapstart+j+1] = line - end - for j = 32, 63 do - local line = "" - for i = 0, 127 do - line = line .. tohex_swapnibbles(map[i][j]) - end - out[gfxstart+(j-32)*2+65] = string.sub(line, 1, 128) - out[gfxstart+(j-32)*2+66] = string.sub(line, 129, 256) - end - - for j = gfxstart, labelstart-1 do - out[j] = gfxtable[j] - end - - local cartdata=table.concat(out, "\n") - -- write to levels table without overwriting the code - - cartdata = cartdata:gsub("(%-%-@begin.*levels%s*=%s*){.-}(.*%-%-@end)","%1"..dumplua(levels).."%2") - cartdata = cartdata:gsub("(%-%-@begin.*mapdata%s*=%s*){.-}(.*%-%-@end)","%1"..dumplua(mapdata).."%2") - - --remove playtesting inject if one already exists: - cartdata = cartdata:gsub("(%-%-@begin.*)local __init.-\n(.*%-%-@end)","%1".."%2") - if app.playtesting and app.room then - inject = "local __init = _init function _init() __init() begin_game() load_level("..app.room..") music(-1)" - if app.playtesting == 2 then - inject = inject.." max_djump=2" - end - inject = inject.." end" - cartdata=cartdata:gsub("%-%-@end",inject.."\n--@end") - end - file = io.open(filename, "wb") - file:write(cartdata) - file:close() - - app.saveFileName = filename - - return true -end diff --git a/build copy/everhorn-l-macos/keyboard.lua b/build copy/everhorn-l-macos/keyboard.lua deleted file mode 100644 index 10d3c8c..0000000 --- a/build copy/everhorn-l-macos/keyboard.lua +++ /dev/null @@ -1,267 +0,0 @@ -function love.keypressed(key, scancode, isrepeat) - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - if key == "return" then - app.enterPressed = true - end - - -- first handle actions that are allowed to repeat when holding key - - local dx, dy = 0, 0 - if key == "left" then dx = -1 end - if key == "right" then dx = 1 end - if key == "up" then dy = -1 end - if key == "down" then dy = 1 end - if project.selection then - project.selection.x = project.selection.x + dx*8 - project.selection.y = project.selection.y + dy*8 - end - - -- Ctrl+Z, Ctrl+Shift+Z - if love.keyboard.isDown("lctrl") then - if key == "z" then - if love.keyboard.isDown("lshift") then - redo() - else - undo() - end - end - end - - -- room switching / swapping - if key == "down" or key == "up" then - if app.room then - local n1 = app.room - local n2 = key == "down" and app.room + 1 or app.room - 1 - - if project.rooms[n1] and project.rooms[n2] then - if love.keyboard.isDown("lctrl") then - -- swap - local tmp = project.rooms[n1] - project.rooms[n1] = project.rooms[n2] - project.rooms[n2] = tmp - end - - app.room = n2 - end - end - end - - if isrepeat then - return - end - - -- non-repeatable global shortcuts - - if love.keyboard.isDown("lctrl") or love.keyboard.isDown("rctrl") then - -- Ctrl+O - if key == "o" then - local filename = filedialog.open() - local openOk = false - if filename then - local ext = string.match(filename, ".(%w+)$") - if ext == "ahm" then - openOk = openMap(filename) - elseif ext == "p8" then - openOk = openPico8(filename) - end - - if openOk then - app.history = {} - app.historyN = 0 - pushHistory() - end - end - if openOk then - showMessage("Opened "..string.match(filename, psep.."([^"..psep.."]*)$")) - else - showMessage("Failed to open file") - end - -- Ctrl+R - elseif key == "r" then - if app.openFileName then - local data = loadpico8(app.openFileName) - p8data.spritesheet = data.spritesheet - showMessage("Reloaded") - end - -- Ctrl+S - elseif key == "s" then - local filename - if app.saveFileName and not love.keyboard.isDown("lshift") then - filename = app.saveFileName - else - filename = filedialog.save() - end - - if filename and savePico8(filename) then - showMessage("Saved "..string.match(filename, psep.."([^"..psep.."]*)$")) - else - showMessage("Failed to save cart") - end - -- Ctrl+X - elseif key == "x" then - if love.keyboard.isDown("lshift") then - -- cut entire room - if activeRoom() then - local s = dumplua {"room", activeRoom()} - love.system.setClipboardText(s) - table.remove(project.rooms, app.room) - app.room = nil - - showMessage("Cut room") - end - else - -- cut selection - if project.selection then - local s = dumplua {"selection", project.selection} - love.system.setClipboardText(s) - project.selection = nil - - showMessage("Cut") - end - end - -- Ctrl+C - elseif key == "c" then - if love.keyboard.isDown("lshift") then - -- copy entire room - if activeRoom() then - local s = dumplua {"room", activeRoom()} - love.system.setClipboardText(s) - - showMessage("Copied room") - end - else - -- copy selection - if project.selection then - local s = dumplua {"selection", project.selection} - love.system.setClipboardText(s) - placeSelection() - - showMessage("Copied") - end - end - -- Ctrl+V - elseif key == "v" then - placeSelection() -- to clean selection first - - local t, err = loadlua(love.system.getClipboardText()) - if not err then - if type(t) == "table" then - if t[1] == "selection" then - local s = t[2] - project.selection = s - project.selection.x = roundto8(mx - s.w*4) - project.selection.y = roundto8(my - s.h*4) - app.tool = "select" - - showMessage("Pasted") - elseif t[1] == "room" then - local r = t[2] - r.x = roundto8(mx - r.w*4) - r.y = roundto8(my - r.h*4) - table.insert(project.rooms, r) - app.room = #project.rooms - else - err = true - end - else - err = true - end - end - if err then - showMessage("Failed to paste (did you paste something you're not supposed to?)") - end - elseif key == "a" then - if activeRoom() then - app.tool = "select" - select(0, 0, activeRoom().w - 1, activeRoom().h - 1) - end - elseif key=="h" then - app.showGarbageTiles=not app.showGarbageTiles - end - else -- if ctrl is not down - if key == "delete" and love.keyboard.isDown("lshift") then - if app.room then - table.remove(project.rooms, app.room) - if not activeRoom() then - app.room = #project.rooms - end - end - end - end - - -- now pass to nuklear and return if consumed - - if ui:keypressed(key, scancode, isrepeat) then - return - end - - -- another fucking hack: the shit above doesnt consume inputs when editing text for some fucking reason - if app.renameRoom then - return - end - - -- now editing things (that shouldn't happen if you have a nuklear window focused or something) - - if key == "n" then - local room = newRoom(roundto8(mx), roundto8(my), 16, 16) - - -- disabled that shit - -- generate alphabetic room title - --local n, title = 0, nil - --while true do - --title = b26(n) - --local exists = false - --for _, otherRoom in ipairs(project.rooms) do - --if otherRoom.title == title then - --exists = true - --end - --end - --if not exists then - --break - --end - --n = n + 1 - --end - --room.title = title - room.title = "" - - table.insert(project.rooms, room) - app.room = #project.rooms - app.roomAdded = true - elseif key == "space" then - app.showToolPanel = not app.showToolPanel - elseif key == "return" then - placeSelection() - elseif key == "tab" and not love.keyboard.isDown("lalt") then - if not app.playtesting then - app.playtesting = 1 - elseif app.playtesting == 1 then - app.playtesting = 2 - else - app.playtesting = false - end - end -end - -function love.keyreleased(key, scancode) - -- just save history every time a key is released lol - pushHistory() - - if ui:keyreleased(key, scancode) then - return - end - - -- this shortcut is handled on release, and can be consumed - -- so you don't input r into the field - if key == "r" and not love.keyboard.isDown("lctrl") and activeRoom() then - app.renameRoom = activeRoom() - app.renameRoomVTable = { name = {value = app.renameRoom.title}, - hex = {value = app.renameRoom.hex} - } - end -end - -function love.textinput(text) - ui:textinput(text) -end diff --git a/build copy/everhorn-l-macos/main.lua b/build copy/everhorn-l-macos/main.lua deleted file mode 100644 index 3703a85..0000000 --- a/build copy/everhorn-l-macos/main.lua +++ /dev/null @@ -1,180 +0,0 @@ -nuklear = require 'nuklear' -filedialog = require 'filedialog' -serpent = require 'serpent' - -require 'util' -require 'room' -require 'autotiles' - - - --- global constants -psep = love.system.getOS() == "Windows" and "\\" or "/" -- path separator - - --- GLOBAL VARIABLES (im dirty like that) --- and stuff that has to do with them - -function newProject() - -- this is UI things - love.graphics.setNewFont(12*global_scale) - app = { - camX = 0, - camY = 0, - camScale = 2, --based on camScaleSetting - camScaleSetting = 1, -- 0, 1, 2 is 1x, 2x, 3x etc, -1, -2, -3 is 0.5x, 0.25x, 0.125x - room = nil, - suppressMouse = false, -- disables mouse-driven editing in love.update() when a click has triggered different action, reset on release - tool = "brush", - currentTile = 0, - message = nil, - messageTimeLeft = nil, - playtesting = false, - showToolPanel = true, - showGarbageTiles=false, - - -- history (undo stack) - history = {}, - historyN = 0, - - font = love.graphics.getFont(), - - left = 0, top = 0, -- top left corner of editing area - - -- these are used in various hacks to work around nuklear being big dumb (or me idk) - anyWindowHovered = false, - enterPressed = false, - roomAdded = false, - - } - --ui:styleSetFont(love.graphics.getFont()) - ui:stylePush({['font']=app.font}) - --print(app.font:getHeight()) - -- this is what goes into history and (mostly) gets saved - project = { - rooms = {}, - selection = nil, - } - - -- basic p8data with blank spritesheet - local data = {} - local imgdata = love.image.newImageData(128, 64) - imgdata:mapPixel(function() return 0, 0, 0, 1 end) - data.spritesheet = love.graphics.newImage(imgdata) - data.quads = {} - for i = 0, 15 do - for j = 0, 15 do - data.quads[i + j*16] = love.graphics.newQuad(i*8, j*8, 8, 8, data.spritesheet:getDimensions()) - end - end - - p8data = data -end - -function toScreen(x, y) - return (app.camX + x) * app.camScale + app.left, - (app.camY + y) * app.camScale + app.top -end - -function fromScreen(x, y) - return (x - app.left)/app.camScale - app.camX, - (y - app.top)/app.camScale - app.camY -end - -function activeRoom() - return app.room and project.rooms[app.room] -end - -function mouseOverTile() - if activeRoom() then - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - local ti, tj = div8(mx - activeRoom().x), div8(my - activeRoom().y) - if ti >= 0 and ti < activeRoom().w and tj >= 0 and tj < activeRoom().h then - return ti, tj - end - end -end - -function showMessage(msg) - app.message = msg - app.messageTimeLeft = 4 -end - -function placeSelection() - if project.selection and app.room then - local sel, room = project.selection, activeRoom() - local i0, j0 = div8(sel.x - room.x), div8(sel.y - room.y) - for i = 0, sel.w - 1 do - if i0 + i >= 0 and i0 + i < room.w then - for j = 0, sel.h - 1 do - if j0 + j >= 0 and j0 + j < room.h then - room.data[i0 + i][j0 + j] = sel.data[i][j] - end - end - end - end - end - project.selection = nil -end - -function select(i1, j1, i2, j2) - local i0, j0, w, h = rectCont2Tiles(i1, j1, i2, j2) - if w > 1 or h > 1 then - local r = activeRoom() - local selection = newRoom(r.x + i0*8, r.y + j0*8, w, h) - for i = 0, w - 1 do - for j = 0, h - 1 do - selection.data[i][j] = r.data[i0 + i][j0 + j] - r.data[i0 + i][j0 + j] = 0 - end - end - project.selection = selection - end -end - -function pushHistory() - local s = dumpproject(project) - if s ~= app.history[app.historyN] then - --print("BEFORE: "..tostring(app.history[app.historyN])) - --print("AFTER: "..s) - app.historyN = app.historyN + 1 - - for i = app.historyN, #app.history do - app.history[i] = nil - end - - app.history[app.historyN] = s - end -end - -function undo() - if app.historyN >= 2 then - app.historyN = app.historyN - 1 - - local err - project, err = loadproject(app.history[app.historyN]) - if err then error(err) end - end - - if not activeRoom() then app.room = nil end -end - -function redo() - if app.historyN <= #app.history - 1 then - app.historyN = app.historyN + 1 - - local err - project, err = loadproject(app.history[app.historyN]) - if err then error(err) end - end - - if not activeRoom() then app.room = nil end -end - - - -require 'fileio' -require 'mainloop' -require 'keyboard' -require 'mouse' diff --git a/build copy/everhorn-l-macos/mainloop.lua b/build copy/everhorn-l-macos/mainloop.lua deleted file mode 100644 index 2cba359..0000000 --- a/build copy/everhorn-l-macos/mainloop.lua +++ /dev/null @@ -1,376 +0,0 @@ --- UI things - -function tileButton(n, highlight) - local x, y, w, h = ui:widgetBounds() - ui:image({p8data.spritesheet, p8data.quads[n]}) - - local hov = false - if ui:inputIsHovered(x, y, w, h) then - hov = true - end - if hov or highlight then - love.graphics.setLineWidth(1) - if hov then - love.graphics.setColor(0, 1, 0.5) - else - love.graphics.setColor(1, 1, 1) - end - x, y = x - 0.5, y - 0.5 - w, h = w + 1, h + 1 - ui:line(x, y, x + w, y) - ui:line(x, y, x, y + h) - ui:line(x + w, y, x + w, y + h) - ui:line(x, y + h, x + w, y + h) - end - if ui:inputIsMousePressed("left", x, y, w, h) then - return true - end -end - -function toolLabel(label, tool) - local hov = ui:widgetIsHovered() - local x, y, w, h = ui:widgetBounds() - - local color = "#afafaf" - if tool == app.tool then - color = "#00ff88" - end - - if hov then - local bg = "#00ff88" --"#afafaf" - ui:rectMultiColor(x, y, w + 4, h, bg, bg, bg, bg) - color = "#2d2d2d" - ui:stylePush { - window = { - background = bg, - } - } - - app.tool = tool - end - - ui:label(label, "left", color) - - if hov then ui:stylePop() end -end - -function closeToolMenu() - app.toolMenuX, app.toolMenuY = nil, nil -end - - - --- MAIN LOOP - -function love.load(args) - love.keyboard.setKeyRepeat(true) - - ui = nuklear.newUI() - - global_scale=1 -- global scale, to run nicely on hi dpi displays - tms = 4 -- tile menu scale - - for _,v in ipairs(args) do - if v=="--hidpi" then - global_scale = 2 - tms = 4*global_scale - end - end - - --p8data = loadpico8(love.filesystem.getSource().."\\celeste.p8") - - newProject() - pushHistory() - - - checkmarkIm=love.graphics.newImage("checkmark.png") - checkmarkWithBg=love.graphics.newCanvas(checkmarkIm:getWidth()*5/4,checkmarkIm:getHeight()*5/4) - love.graphics.setCanvas(checkmarkWithBg) - love.graphics.clear(0x64/0xff,0x64/0xff,0x64/0xff) - love.graphics.draw(checkmarkIm,checkmarkIm:getWidth()/8,checkmarkIm:getHeight()/8) - love.graphics.setCanvas() -end - -function love.update(dt) - app.W, app.H = love.graphics.getDimensions() - local rpw = app.W * 0.10 -- room panel width - app.left, app.top = rpw, 0 - - ui:frameBegin() - --ui:scale(2) - ui:stylePush { - window = { - spacing = {x = 1, y = 1}, - padding = {x = 1, y = 1}, - }, - selectable = { - padding = {x = 0, y = 0}, - ["normal active"] = "#000000", - ["hover active"] = "#000000", - ["pressed active"] = "#000000", - }, - checkbox = { - ["cursor normal"] = checkmarkIm, - ["cursor hover"] = checkmarkIm - } - } - - -- room panel - if ui:windowBegin("Room Panel", 0, 0, rpw, app.H, {"scrollbar"}) then - ui:layoutRow("dynamic", 25*global_scale, 1) - for n = 1, #project.rooms do - if ui:selectable("["..n.."] "..project.rooms[n].title, n == app.room) then - app.room = n - end - end - - if app.roomAdded then - ui:windowSetScroll(0, 100000) - app.roomAdded = false - end - end - ui:windowEnd() - - -- tool panel - if app.showToolPanel then - local tpw = 16*8*tms + 18 - if ui:windowBegin("Tool panel", app.W - tpw, 0, tpw, app.H) then - ui:layoutRow("static", 25*global_scale, 100*global_scale, 2) - if ui:selectable("Brush", app.tool == "brush") then app.tool = "brush" end - if ui:selectable("Rectangle", app.tool == "rectangle") then app.tool = "rectangle" end - ui:layoutRow("static", 25*global_scale, 100*global_scale, 1) - if ui:selectable("Select", app.tool == "select") then app.tool = "select" end - - for j = 0, app.showGarbageTiles and 15 or 7 do - ui:layoutRow("static", 8*tms, 8*tms, 16) - for i = 0, 15 do - local n = i + j*16 - if tileButton(n, app.currentTile == n and not app.autotile) then - app.currentTile = n - app.autotile = nil - end - end - end - - ui:layoutRow("dynamic", 25*global_scale, 1) - ui:label("Autotiles:") - ui:layoutRow("static", 8*tms, 8*tms, #autotiles) - for k, auto in ipairs(autotiles) do - if tileButton(auto[5], app.currentTile == auto[15] and app.autotile) then - app.currentTile = auto[15] - app.autotile = k - end - end - end - ui:windowEnd() - end - - if app.renameRoom then - local room = app.renameRoom - - local w, h = 200*global_scale, 125*global_scale - if ui:windowBegin("Rename room", app.W/2 - w/2, app.H/2 - h/2, w, h, {"title", "border", "closable", "movable"}) then - local x,y=div8(room.x),div8(room.y) - local fits_on_map=x>=0 and x+room.w<=128 and y>=0 and y+room.h<=64 - ui:layoutRow("dynamic",25*global_scale,1) - if not fits_on_map then - local style={} - for k,v in pairs({"text normal", "text hover", "text active"}) do - style[v]="#707070" - end - for k,v in pairs({"normal", "hover", "active"}) do - style[v]=checkmarkWithBg -- show both selected and unselected as having a check to avoid nukelear limitations - -- kinda hacky but it works decently enough - end - ui:stylePush({['checkbox']=style}) - - else - ui:stylePush({}) - end - ui:checkbox("Level Stored As Hex",fits_on_map and app.renameRoomVTable.hex or true) - ui:stylePop() - ui:layoutRow("dynamic", 25*global_scale, 1) - - local state, changed - ui:editFocus() - state, changed = ui:edit("simple", app.renameRoomVTable.name) - - if ui:button("OK") or app.enterPressed then - room.title = app.renameRoomVTable.name.value - room.hex = app.renameRoomVTable.hex.value - app.renameRoom = nil - end - else - app.renameRoom = nil - end - ui:windowEnd() - end - - app.enterPressed = false - - app.anyWindowHovered = ui:windowIsAnyHovered() - - ui:stylePop() - - local hov = ui:windowIsAnyHovered() - - ui:frameEnd() - - if app.brushing and not hov and not love.keyboard.isDown("lalt") and (love.mouse.isDown(1) or love.mouse.isDown(2)) then - if app.tool == "brush" then - local n = app.currentTile - if love.mouse.isDown(2) then - n = 0 - end - - local ti, tj = mouseOverTile() - if ti then - local room = activeRoom() - - activeRoom().data[ti][tj] = n - - if app.autotile then - autotileWithNeighbors(activeRoom(), ti, tj, app.autotile) - end - end - end - end - - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - if app.roomResizeSideX and app.room then - local room = activeRoom() - - if not room.hex then - -- if the room is stored in mapdata, it still has to fit when resizing - mx = math.min(math.max(mx, 0), 1024) - my = math.min(math.max(my, 0), 512) - end - local left, top = room.x, room.y - local right, bottom = left + room.w*8, top + room.h*8 - - local ax = app.roomResizeSideX > 0 and right or left - local ay = app.roomResizeSideY > 0 and bottom or top - - local dx = div8(math.abs(mx-ax)) * sign(mx-ax) * app.roomResizeSideX - local dy = div8(math.abs(my-ay)) * sign(my-ay) * app.roomResizeSideY - - dx = math.max(1, room.w + dx) - room.w - dy = math.max(1, room.h + dy) - room.h - - if dx ~= 0 or dy ~= 0 then - local newdata, neww, newh = {}, room.w + dx, room.h + dy - - -- copy all tiles (even if outside bounds - so they persist if you cut part of room off and then resize back) - for i, col in pairs(room.data) do - for j, n in pairs(col) do - local i_, j_ = i + (ax == left and dx or 0), j + (ay == top and dy or 0) - - if not newdata[i_] then newdata[i_] = {} end - newdata[i_][j_] = n - end - end - -- add 0 when no data is there - for i = 0, neww - 1 do - newdata[i] = newdata[i] or {} - for j = 0, newh - 1 do - newdata[i][j] = newdata[i][j] or 0 - end - end - - room.x = room.x - (ax == left and 8*(neww-room.w) or 0) - room.y = room.y - (ay == top and 8*(newh-room.h) or 0) - room.data, room.w, room.h = newdata, neww, newh - end - end - - if project.selection and app.tool ~= "select" then - placeSelection() - end - - if app.message then - app.messageTimeLeft = app.messageTimeLeft - dt - if app.messageTimeLeft < 0 then - app.message = nil - app.messageTimeLeft = nil - end - end -end - -function love.draw() - love.graphics.clear(0.25, 0.25, 0.25) - love.graphics.reset() - love.graphics.setLineStyle("rough") - - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - local ox, oy = toScreen(0, 0) - love.graphics.translate(math.floor(ox), math.floor(oy)) - love.graphics.scale(app.camScale) - - love.graphics.setColor(0.28, 0.28, 0.28) - love.graphics.setLineWidth(2) - for i = 0, 7 do - for j = 0, 3 do - love.graphics.rectangle("line", i*128, j*128, 128, 128) - end - end - - for _, room in ipairs(project.rooms) do - if room ~= activeRoom() then - drawRoom(room, p8data) - love.graphics.setColor(0.5, 0.5, 0.5, 0.4) - love.graphics.rectangle("fill", room.x, room.y, room.w*8, room.h*8) - end - end - if activeRoom() then - drawRoom(activeRoom(), p8data) - end - if project.selection then - drawRoom(project.selection, p8data, true) - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", project.selection.x + 0.5 / app.camScale, project.selection.y + 0.5 / app.camScale, project.selection.w*8, project.selection.h*8) - end - - local ti, tj = mouseOverTile() - - if app.tool == "brush" or (app.tool == "rectangle" and not app.rectangleI) then - if ti and not app.toolMenuX then - love.graphics.setColor(1, 1, 1) - love.graphics.draw(p8data.spritesheet, p8data.quads[app.currentTile], activeRoom().x + ti*8, activeRoom().y + tj*8) - - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", activeRoom().x + ti*8 + 0.5 / app.camScale, - activeRoom().y + tj*8 + 0.5 / app.camScale, 8, 8) - end - elseif (app.tool == "rectangle" and app.rectangleI) or app.tool == "select" then - local i1, j1 = app.rectangleI or app.selectTileI, app.rectangleJ or app.selectTileJ - if i1 and ti then - local i, j, w, h = rectCont2Tiles(ti, tj, i1, j1) - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", activeRoom().x + i*8 + 0.5 / app.camScale, - activeRoom().y + j*8 + 0.5 / app.camScale, - w*8, h*8) - end - end - - love.graphics.reset() - love.graphics.setColor(1, 1, 1) - love.graphics.translate(app.left, app.top) - love.graphics.setFont(app.font) - - if app.message then - love.graphics.print(app.message, 4, app.H - app.font:getHeight() - 4) - end - - if app.playtesting then - local s = app.playtesting == 1 and "[playtesting]" or "[playtesting, 2 dashes]" - love.graphics.print(s, 4, 4) - end - ui:draw() -end diff --git a/build copy/everhorn-l-macos/mouse.lua b/build copy/everhorn-l-macos/mouse.lua deleted file mode 100644 index e1dc66d..0000000 --- a/build copy/everhorn-l-macos/mouse.lua +++ /dev/null @@ -1,184 +0,0 @@ -function love.mousepressed(x, y, button, istouch, presses) - if ui:mousepressed(x, y, button, istouch, presses) then - return - end - - local mx, my = fromScreen(x, y) - if button == 1 then - if not app.toolMenuX then - local oldActiveRoom = app.room - for i, room in ipairs(project.rooms) do - if mx >= room.x and mx <= room.x + room.w*8 - and my >= room.y and my <= room.y + room.h*8 then - app.room = i - if app.room == oldActiveRoom then - break - end - end - end - if app.room ~= oldActiveRoom then - app.suppressMouse = true - end - - if love.keyboard.isDown("lalt") then - if app.room then - app.roomMoveX, app.roomMoveY = mx - activeRoom().x, my - activeRoom().y - end - return - end - - if app.tool == "brush" and not app.suppressMouse then - app.brushing = true - elseif app.tool == "select" then - local ti, tj = mouseOverTile() - if not project.selection then - if ti then - app.selectTileI, app.selectTileJ = ti, tj - end - else - project.selectionMoveX, project.selectionMoveY = mx - project.selection.x, my - project.selection.y - project.selectionStartX, project.selectionStartY = project.selection.x, project.selection.y - end - end - end - elseif button == 2 then - if love.keyboard.isDown("lalt") and app.room then - app.roomResizeSideX = sign(mx - activeRoom().x - activeRoom().w*8/2) - app.roomResizeSideY = sign(my - activeRoom().y - activeRoom().h*8/2) - return - end - - if app.tool == "brush" then - app.brushing = true - end - elseif button == 3 then - app.camMoveX, app.camMoveY = fromScreen(x, y) - end - - if button == 1 or button == 2 then - local ti, tj = mouseOverTile() - if app.tool == "rectangle" and ti then - app.rectangleI, app.rectangleJ = ti, tj - end - end -end - -function love.mousereleased(x, y, button, istouch, presses) - if ui:mousereleased(x, y, button, istouch, presses) then - return - end - - local ti, tj = mouseOverTile() - - if app.tool == "rectangle" or app.tool == "select" then - local i1, j1 = app.rectangleI or app.selectTileI, app.rectangleJ or app.selectTileJ - - if app.tool == "rectangle" and i1 and ti then - local room = activeRoom() - - local n = app.currentTile - if app.autotile then - n = autotiles[autotilet[n]][15] -- inner version - end - if button == 2 then - n = 0 - end - - local i0, j0, w, h = rectCont2Tiles(i1, j1, ti, tj) - for i = i0, i0 + w - 1 do - for j = j0, j0 + h - 1 do - room.data[i][j] = n - end - end - - if app.autotile then - for i = i0, i0 + w - 1 do - autotileWithNeighbors(room, i, j0) - autotileWithNeighbors(room, i, j0 + h - 1) - end - for j = j0 + 1, j0 + h - 2 do - autotileWithNeighbors(room, i0, j) - autotileWithNeighbors(room, i0 + w - 1, j) - end - end - elseif app.tool == "select" then - if i1 and ti then - placeSelection() - - select(ti, tj, i1, j1) - end - - if project.selection and project.selectionMoveX then - if project.selection.x == project.selectionStartX and project.selection.y == project.selectionStartY then - placeSelection() - end - end - end - end - - app.camMoveX, app.camMoveY = nil, nil - app.roomMoveX, app.roomMoveY = nil, nil - app.roomResizeSideX, app.roomResizeSideY = nil, nil - app.brushing = false - app.rectangleI, app.rectangleJ = nil, nil - app.selectTileI, app.selectTileJ = nil, nil - project.selectionMoveX, project.selectionMoveY = nil, nil - - app.suppressMouse = false - - -- just save history every time a mouse button is released lol - pushHistory() -end - -function love.mousemoved(x, y, dx, dy, istouch) - if ui:mousemoved(x, y, dx, dy, istouch) then - return - end - - local mx, my = fromScreen(x, y) - local ti, tj = div8(mx), div8(my) - if app.camMoveX then - app.camX = app.camX + mx - app.camMoveX - app.camY = app.camY + my - app.camMoveY - end - if app.roomMoveX and app.room then - local room=activeRoom() - room.x = roundto8(mx - app.roomMoveX) - room.y = roundto8(my - app.roomMoveY) - if not room.hex then - --can't move room stored in map outside of the map - room.x = math.max(0, math.min(1024 - 8*room.w, room.x)) - room.y = math.max(0, math.min(512 - 8*room.h, room.y)) - end - end - if project.selectionMoveX and project.selection then - project.selection.x = roundto8(mx - project.selectionMoveX) - project.selection.y = roundto8(my - project.selectionMoveY) - end -end - -function love.wheelmoved(x, y) - -- this is an inelegant solution to the fact that some slut decided that scrollbars scroll even if the window isn't even hovered - if app.anyWindowHovered then - if ui:wheelmoved(x, y) then - return - end - end - - if y ~= 0 then - local mx, my = love.mouse.getPosition() - rmx, rmy = fromScreen(mx, my) - - if y > 0 then - app.camScaleSetting = app.camScaleSetting + 1 - elseif y < 0 then - app.camScaleSetting = app.camScaleSetting - 1 - end - app.camScaleSetting = math.min(math.max(app.camScaleSetting, -3), 20) - app.camScale = app.camScaleSetting > 0 and (app.camScaleSetting + 1) or 2 ^ app.camScaleSetting - - nrmx, nrmy = fromScreen(mx, my) - app.camX = app.camX + nrmx - rmx - app.camY = app.camY + nrmy - rmy - end -end diff --git a/build copy/everhorn-l-macos/nfd.so b/build copy/everhorn-l-macos/nfd.so deleted file mode 100644 index 33e015a..0000000 Binary files a/build copy/everhorn-l-macos/nfd.so and /dev/null differ diff --git a/build copy/everhorn-l-macos/nuklear.so b/build copy/everhorn-l-macos/nuklear.so deleted file mode 100644 index df480a8..0000000 Binary files a/build copy/everhorn-l-macos/nuklear.so and /dev/null differ diff --git a/build copy/everhorn-l-macos/pico-8_font.png b/build copy/everhorn-l-macos/pico-8_font.png deleted file mode 100644 index 44bbe17..0000000 Binary files a/build copy/everhorn-l-macos/pico-8_font.png and /dev/null differ diff --git a/build copy/everhorn-l-macos/room.lua b/build copy/everhorn-l-macos/room.lua deleted file mode 100644 index a8a2019..0000000 --- a/build copy/everhorn-l-macos/room.lua +++ /dev/null @@ -1,33 +0,0 @@ -function newRoom(x, y, w, h) - local room = { - x = x or 0, - y = y or 0, - w = w or 16, - h = h or 16, - hex=true, - data = {}, - title = "", - } - room.data = fill2d0s(room.w, room.h) - - return room -end - -function drawRoom(room, p8data, highlight) - love.graphics.setColor(1, 1, 1) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - local n = room.data[i][j] - if not p8data.quads[n] then print(n) end - if not highlight or n~=0 then - love.graphics.setColor(1, 1, 1) - love.graphics.draw(p8data.spritesheet, p8data.quads[n], room.x + i*8, room.y + j*8) - - if highlight then - love.graphics.setColor(0, 1, 0.5, 0.5) - love.graphics.rectangle("fill", room.x + i*8, room.y + j*8, 8, 8) - end - end - end - end -end diff --git a/build copy/everhorn-l-macos/serpent.lua b/build copy/everhorn-l-macos/serpent.lua deleted file mode 100644 index a043713..0000000 --- a/build copy/everhorn-l-macos/serpent.lua +++ /dev/null @@ -1,140 +0,0 @@ -local n, v = "serpent", "0.302" -- (C) 2012-18 Paul Kulchenko; MIT License -local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" -local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} -local badtype = {thread = true, userdata = true, cdata = true} -local getmetatable = debug and debug.getmetatable or getmetatable -local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+ -local keyword, globals, G = {}, {}, (_G or _ENV) -for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', - 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end -for k,v in pairs(G) do globals[v] = k end -- build func to name mapping -for _,g in ipairs({'coroutine', 'debug', 'io', 'math', 'string', 'table', 'os'}) do - for k,v in pairs(type(G[g]) == 'table' and G[g] or {}) do globals[v] = g..'.'..k end end - -local function s(t, opts) - local name, indent, fatal, maxnum = opts.name, opts.indent, opts.fatal, opts.maxnum - local sparse, custom, huge = opts.sparse, opts.custom, not opts.nohuge - local space, maxl = (opts.compact and '' or ' '), (opts.maxlevel or math.huge) - local maxlen, metatostring = tonumber(opts.maxlength), opts.metatostring - local iname, comm = '_'..(name or ''), opts.comment and (tonumber(opts.comment) or math.huge) - local numformat = opts.numformat or "%.17g" - local seen, sref, syms, symn = {}, {'local '..iname..'={}'}, {}, 0 - local function gensym(val) return '_'..(tostring(tostring(val)):gsub("[^%w]",""):gsub("(%d%w+)", - -- tostring(val) is needed because __tostring may return a non-string value - function(s) if not syms[s] then symn = symn+1; syms[s] = symn end return tostring(syms[s]) end)) end - local function safestr(s) return type(s) == "number" and tostring(huge and snum[tostring(s)] or numformat:format(s)) - or type(s) ~= "string" and tostring(s) -- escape NEWLINE/010 and EOF/026 - or ("%q"):format(s):gsub("\010","n"):gsub("\026","\\026") end - local function comment(s,l) return comm and (l or 0) < comm and ' --[['..select(2, pcall(tostring, s))..']]' or '' end - local function globerr(s,l) return globals[s] and globals[s]..comment(s,l) or not fatal - and safestr(select(2, pcall(tostring, s))) or error("Can't serialize "..tostring(s)) end - local function safename(path, name) -- generates foo.bar, foo[3], or foo['b a r'] - local n = name == nil and '' or name - local plain = type(n) == "string" and n:match("^[%l%u_][%w_]*$") and not keyword[n] - local safe = plain and n or '['..safestr(n)..']' - return (path or '')..(plain and path and '.' or '')..safe, safe end - local alphanumsort = type(opts.sortkeys) == 'function' and opts.sortkeys or function(k, o, n) -- k=keys, o=originaltable, n=padding - local maxn, to = tonumber(n) or 12, {number = 'a', string = 'b'} - local function padnum(d) return ("%0"..tostring(maxn).."d"):format(tonumber(d)) end - table.sort(k, function(a,b) - -- sort numeric keys first: k[key] is not nil for numerical keys - return (k[a] ~= nil and 0 or to[type(a)] or 'z')..(tostring(a):gsub("%d+",padnum)) - < (k[b] ~= nil and 0 or to[type(b)] or 'z')..(tostring(b):gsub("%d+",padnum)) end) end - local function val2str(t, name, indent, insref, path, plainindex, level) - local ttype, level, mt = type(t), (level or 0), getmetatable(t) - local spath, sname = safename(path, name) - local tag = plainindex and - ((type(name) == "number") and '' or name..space..'='..space) or - (name ~= nil and sname..space..'='..space or '') - if seen[t] then -- already seen this element - sref[#sref+1] = spath..space..'='..space..seen[t] - return tag..'nil'..comment('ref', level) end - -- protect from those cases where __tostring may fail - if type(mt) == 'table' and metatostring ~= false then - local to, tr = pcall(function() return mt.__tostring(t) end) - local so, sr = pcall(function() return mt.__serialize(t) end) - if (to or so) then -- knows how to serialize itself - seen[t] = insref or spath - t = so and sr or tr - ttype = type(t) - end -- new value falls through to be serialized - end - if ttype == "table" then - if level >= maxl then return tag..'{}'..comment('maxlvl', level) end - seen[t] = insref or spath - if next(t) == nil then return tag..'{}'..comment(t, level) end -- table empty - if maxlen and maxlen < 0 then return tag..'{}'..comment('maxlen', level) end - local maxn, o, out = math.min(#t, maxnum or #t), {}, {} - for key = 1, maxn do o[key] = key end - if not maxnum or #o < maxnum then - local n = #o -- n = n + 1; o[n] is much faster than o[#o+1] on large tables - for key in pairs(t) do if o[key] ~= key then n = n + 1; o[n] = key end end end - if maxnum and #o > maxnum then o[maxnum+1] = nil end - if opts.sortkeys and #o > maxn then alphanumsort(o, t, opts.sortkeys) end - local sparse = sparse and #o > maxn -- disable sparsness if only numeric keys (shorter output) - for n, key in ipairs(o) do - local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse - if opts.valignore and opts.valignore[value] -- skip ignored values; do nothing - or opts.keyallow and not opts.keyallow[key] - or opts.keyignore and opts.keyignore[key] - or opts.valtypeignore and opts.valtypeignore[type(value)] -- skipping ignored value types - or sparse and value == nil then -- skipping nils; do nothing - elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then - if not seen[key] and not globals[key] then - sref[#sref+1] = 'placeholder' - local sname = safename(iname, gensym(key)) -- iname is table for local variables - sref[#sref] = val2str(key,sname,indent,sname,iname,true) end - sref[#sref+1] = 'placeholder' - local path = seen[t]..'['..tostring(seen[key] or globals[key] or gensym(key))..']' - sref[#sref] = path..space..'='..space..tostring(seen[value] or val2str(value,nil,indent,path)) - else - out[#out+1] = val2str(value,key,indent,nil,seen[t],plainindex,level+1) - if maxlen then - maxlen = maxlen - #out[#out] - if maxlen < 0 then break end - end - end - end - local prefix = string.rep(indent or '', level) - local head = indent and '{\n'..prefix..indent or '{' - local body = table.concat(out, ','..(indent and '\n'..prefix..indent or space)) - local tail = indent and "\n"..prefix..'}' or '}' - return (custom and custom(tag,head,body,tail,level) or tag..head..body..tail)..comment(t, level) - elseif badtype[ttype] then - seen[t] = insref or spath - return tag..globerr(t, level) - elseif ttype == 'function' then - seen[t] = insref or spath - if opts.nocode then return tag.."function() --[[..skipped..]] end"..comment(t, level) end - local ok, res = pcall(string.dump, t) - local func = ok and "((loadstring or load)("..safestr(res)..",'@serialized'))"..comment(t, level) - return tag..(func or globerr(t, level)) - else return tag..safestr(t) end -- handle all other types - end - local sepr = indent and "\n" or ";"..space - local body = val2str(t, name, indent) -- this call also populates sref - local tail = #sref>1 and table.concat(sref, sepr)..sepr or '' - local warn = opts.comment and #sref>1 and space.."--[[incomplete output with shared/self-references skipped]]" or '' - return not name and body..warn or "do local "..body..sepr..tail.."return "..name..sepr.."end" -end - -local function deserialize(data, opts) - local env = (opts and opts.safe == false) and G - or setmetatable({}, { - __index = function(t,k) return t end, - __call = function(t,...) error("cannot call functions") end - }) - local f, res = (loadstring or load)('return '..data, nil, nil, env) - if not f then f, res = (loadstring or load)(data, nil, nil, env) end - if not f then return f, res end - if setfenv then setfenv(f, env) end - return pcall(f) -end - -local function merge(a, b) if b then for k,v in pairs(b) do a[k] = v end end; return a; end -return { _NAME = n, _COPYRIGHT = c, _DESCRIPTION = d, _VERSION = v, serialize = s, - load = deserialize, - dump = function(a, opts) return s(a, merge({name = '_', compact = true, sparse = true}, opts)) end, - line = function(a, opts) return s(a, merge({sortkeys = true, comment = true}, opts)) end, - block = function(a, opts) return s(a, merge({indent = ' ', sortkeys = true, comment = true}, opts)) end } diff --git a/build copy/everhorn-l-macos/util.lua b/build copy/everhorn-l-macos/util.lua deleted file mode 100644 index 0731db0..0000000 --- a/build copy/everhorn-l-macos/util.lua +++ /dev/null @@ -1,124 +0,0 @@ -function fromhex(s) - return tonumber(s, 16) -end - -function fromhex_swapnibbles(s) - local x = fromhex(s) - return math.floor(x/16) + 16*(x%16) -end - -local hext = { [0] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'} - -function tohex(b) - return hext[math.floor(b/16)]..hext[b%16] -end - -function tohex_swapnibbles(b) - return hext[b%16]..hext[math.floor(b/16)] -end - -function roundto8(x) - return 8*math.floor(x/8 + 1/2) -end - -function sign(x) - return x > 0 and 1 or -1 -end - -function fill2d0s(w, h) - local a = {} - for i = 0, w - 1 do - a[i] = {} - for j = 0, h - 1 do - a[i][j] = 0 - end - end - return a -end - -function rectCont2Tiles(i, j, i_, j_) - return math.min(i, i_), math.min(j, j_), math.abs(i - i_) + 1, math.abs(j - j_) + 1 -end - -function div8(x) - return math.floor(x/8) -end - -function dumplua(t) - return serpent.block(t, {comment = false}) -end - -function loadlua(s) - f, err = loadstring("return "..s) - if err then - return nil, err - else - return f() - end -end - -local alph_ = "abcdefghijklmnopqrstuvwxyz" -local alph = {[0] = " "} -for i = 1, 26 do - alph[i] = string.sub(alph_, i, i) -end - -function b26(n) - local m, n = math.floor(n / 26), n % 26 - if m > 0 then - return b26(m - 1) .. alph[n + 1] - else - return alph[n + 1] - end -end - -function loadroomdata(room, levelstr) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - local k = i + j*room.w - room.data[i][j] = fromhex(string.sub(levelstr, 1 + 2*k, 2 + 2*k)) - end - end -end - -function dumproomdata(room) - local s = "" - for j = 0, room.h - 1 do - for i = 0, room.w - 1 do - s = s .. tohex(room.data[i][j]) - end - end - return s -end - -function roomMakeStr(room) - if room then - room.str = dumproomdata(room) - end -end - -function roomMakeData(room) - if room then - room.data = fill2d0s(room.w, room.h) - loadroomdata(room, room.str) - end -end - -function loadproject(str) - local proj = loadlua(str) - for n, room in pairs(proj.rooms) do - roomMakeData(room) - end - roomMakeData(proj.selection) - - return proj -end - -function dumpproject(proj) - for n, room in pairs(proj.rooms) do - roomMakeStr(room) - end - roomMakeStr(proj.selection) - - return serpent.line(proj, {compact = true, comment = false, keyignore = {["data"] = true}}) -end diff --git a/build copy/everhorn-l-windows.zip b/build copy/everhorn-l-windows.zip deleted file mode 100644 index 3b9de36..0000000 Binary files a/build copy/everhorn-l-windows.zip and /dev/null differ diff --git a/build copy/everhorn-l-windows/OpenAL32.dll b/build copy/everhorn-l-windows/OpenAL32.dll deleted file mode 100644 index 57fc48b..0000000 Binary files a/build copy/everhorn-l-windows/OpenAL32.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/SDL2.dll b/build copy/everhorn-l-windows/SDL2.dll deleted file mode 100644 index 4c08014..0000000 Binary files a/build copy/everhorn-l-windows/SDL2.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/changes.txt b/build copy/everhorn-l-windows/changes.txt deleted file mode 100644 index b5e29f0..0000000 --- a/build copy/everhorn-l-windows/changes.txt +++ /dev/null @@ -1,1350 +0,0 @@ -LOVE 11.3 [Mysterious Mysteries] --------------------------------- - -Released: 2019-10-27 - -* Added support for FLAC audio files. -* Added support for microphone recording on Android. -* Added t.audio.mic (false by default). On Android, setting it to true requests microphone recording permission from the user. -* Added Decoder:clone. -* Added Data:getFFIPointer. -* Added Joystick:getDeviceInfo. -* Added Joystick:getGamepadMappingString and love.joystick.getGamepadMappingString(guid). -* Added love.math.colorToBytes and love.math.colorFromBytes. -* Added 'usedpiscale' boolean (true by default) to love.window.setMode and love.conf. Disables automatic DPI scaling when false. -* Added love.window.getDisplayOrientation and a love.displayrotated callback. -* Added love.window.get/setVSync, to allow setting vsync without recreating the window. -* Added love.window.getSafeArea. -* Added an optional vertex count parameter to Mesh:setVertices. -* Added support for rgba4, rgb5a1, rgb565, rgb10a2, rg11b10f, r8, rg8, r16, rg16, r16f, rg16f, r32f, and rg32f formats in ImageData and Images. -* Added support for loading .dds files that contain uncompressed pixel data. - -* Changed audio file type detection, so it probes all supported backends for unrecognized extensions. - -* Fixed "bad lightuserdata" errors when running love on some arm64 devices. -* Fixed boot.lua's line numbers in stack traces to match its source code. -* Fixed the deprecation system not fully restarting when love.event.quit("restart") is used. -* Fixed love.isVersionCompatible. -* Fixed named Channels persisting across love.event.quit("restart") occurrences. -* Fixed race conditions when different love.physics Worlds are used in different threads. -* Fixed World:getJoints to return the fully resolved type of the Joint, instead of the base type. -* Fixed love.timer.sleep(0) to return control to the OS scheduler instead of being a no-op. -* Fixed love.math.randomNormal incorrectly using cached state after love.math.setRandomSeed or setRandomState. -* Fixed love.data.hash returning an incorrect hash for certain input sizes. -* Fixed love.data.newByteData to cause a Lua error instead of crashing when invalid arguments are used. -* Fixed the Data-returning variant of love.filesystem.read and File:read to return the number of bytes that were read. -* Fixed love.filesystem's require loaders to error instead of crashing when no argument is given. -* Fixed love.filesystem.mount(Data). -* Fixed a memory leak when loading files in some situations. -* Fixed t.audio.mixwithsystem. -* Fixed audio clicks immediately after playing a Source on iOS. -* Fixed Source:play + Source:stop + Source:play looping the first few ms of sound for streaming Sources on iOS. -* Fixed Source:play + Source:seek looping the first few ms of sound for streaming Sources on iOS. -* Fixed occasional pops in streaming sources on iOS. -* Fixed love.audio.play(sources) to use previously set playback positions on stopped Sources. -* Fixed Source:setEffect(name, true) and Source:getEffect(name) when the effect has no associated Filter. -* Fixed love.audio.newSource(filename, "queue") to cause a Lua error. -* Fixed Source:setPitch to error if the given pitch is <= 0, NaN, or infinity. -* Fixed video seeking and pausing in various scenarios. -* Fixed an audio Source memory leak when a Video gets garbage collected after playing it. -* Fixed video playback support on some Adreno-based Android devices. -* Fixed black fringes around text in some situations. -* Fixed extreme flickering when text moves along non-integer coordinates. -* Fixed the first character in a string sometimes not being processed during text vertex generation. -* Fixed Text:set(" ") not clearing any previously set text in a Text object. -* Fixed love.graphics.getTextureTypes to return a table with boolean values in its fields instead of number values. -* Fixed lines not rendering properly if a single line has more than 65,000 vertices. -* Fixed a pixel shader performance regression on some graphics drivers when OpenGL 3 or OpenGL ES 3 is used. -* Fixed text not showing up on Radeon HD 3000-series graphics cards on Windows. -* Fixed non-integer DPI scale values being truncated to integers in love.graphics.newCanvas. -* Fixed creating depth canvases on Windows systems when using an Intel HD 3000 GPU. -* Fixed automatic batching performance to be more consistent on all operating systems. -* Fixed gammaToLinearPrecise in shaders not being as precise as it should be. -* Fixed ImageData:paste and ImageData:setPixel to have more consistent clamping and rounding of color values when different formats are used. - -LOVE 11.2 [Mysterious Mysteries] --------------------------------- - -Released: 2018-11-25 - -* Added Source:setAirAbsorption and Source:getAirAbsorption. -* Added Body:setTransform and Body:getTransform. - -* Improved performance of love.graphics.draw slightly on iOS and Android. - -* Fixed filesystem initialization on Windows 10 update 1809. -* Fixed compatibility with Lua 5.2 and 5.3. -* Fixed the explicit format + Data argument variant of love.data.decompress. -* Fixed love.joystick.setGamepadMapping not being able to change existing mappings. -* Fixed a crash on quit on Linux if a custom cursor is active when quitting. -* Fixed a crash in the Data variant of Shader:send when it's called after love.window.setMode. -* Fixed a love.graphics.setCanvas error message to be less confusing. - -LOVE 11.1 [Mysterious Mysteries] --------------------------------- - -Released: 2018-04-15 - -* Fixed love.graphics.setCanvas failing randomly. -* Fixed love.graphics.clear(colortable) when no Canvas is active. -* Fixed stencil and depth support on older phones. -* Fixed love.event.quit causing crashes and other unexpected behaviour if a Canvas is active. -* Fixed Fixture:getShape crashing when returning a ChainShape. -* Fixed love.joystick.loadJoystickMappings outputting a deprecation warning about love.filesystem.isFile. -* Fixed Source:queue to show the correct argument name in the error message when an invalid data parameter is given. -* Fixed t.console=true causing an error on Windows if lovec.exe is used. - -LOVE 11.0 [Mysterious Mysteries] --------------------------------- - -Released: 2018-04-01 - - * Added Object:release. - * Added Data:clone. - * Added queueable audio sources. - * Added audio input support. - * Added Source filters: low gain, high gain and band pass. - * Added audio effect APIs (reverb, echo, etc.) - * Added variants of SoundData:getSample/setSample which take a channel parameter. - * Added variants of all table-with-fields-returning get* functions, the new variants take an existing table to fill in. - * Added a variant to World:update, which accepts the number of iterations to run. The defaults are now 8 and 3. - * Added Body:isTouching. - * Added RopeJoint:setMaxLength. - * Added a click count argument to love.mousepressed and love.mousereleased. - * Added variants of love.filesystem.mount which accept a Data or FileData object containing zipped data. - * Added love.filesystem.get/setCRequirePath, and use that to find c libraries for require. - * Added variants of File:read and love.filesystem.read which take an enum to determine whether they return a FileData or a string. - * Added love.data module. It includes hex/base64 encoding functions, MD5 and SHA hashing, string packing, compression APIs, and more. - * Added Channel:hasRead, which checks if a message has been read. Takes an id, which Channel:push will now return. - * Added variants of Channel:demand and Channel:supply which take a timeout argument. - * Added Transform objects to love.math. - * Added support for different ImageData formats, including RGBA8 (the default), RGBA16, RGBA16F, and RGBA32F. - * Added the ability to load Radiance HDR, OpenEXR, and 16 bit PNG images. - * Added love.graphics.getImageFormats (replaces love.graphics.getCompressedImageFormats). - * Added the ability to specify a per-object pixel density scale factor when creating Images, Canvases, Fonts, and Videos. Affects drawing. - * Added Texture:getPixelWidth/Height and love.graphics.getPixelWidth/Height. - * Added Texture:getPixelDensity, love.graphics.getPixelDensity, and Font:getPixelDensity. - * Added Texture:getMipmapCount, getFormat, getLayerCount, getDepth, and getTextureType. - * Added Array, Cubemap, and Volume texture types and corresponding Image and Canvas APIs. - * Added love.graphics.getTextureTypes, returns a table with fields indicating support for each texture type. - * Added mipmapping support to Canvases, including both auto-generated mipmaps and manually rendering to a specific mipmap level. - * Added 'stencil8', 'depth24stencil8', 'depth32fstencil8', 'depth16', 'depth24', and 'depth32f' pixel formats for Canvases. - * Added variant of love.graphics.newCanvas which accepts a table of settings. - * Added optional 'readable' boolean field to the table passed into love.graphics.newCanvas. - * Added optional 'depthstencil' field to the table passed into love.graphics.setCanvas, for using a depth/stencil Canvas. - * Added optional 'depth' and 'stencil' boolean fields to the table passed into setCanvas, for enabling depth and stencil buffers if 'depthstencil' isn't used. - * Added shadow sampler support for Canvases. - * Added love.graphics.setDepthMode for using the depth buffer for depth testing/writes. Depth values of rendered objects can only be set via shaders. - * Added love.graphics.setMeshCullMode, for culling back- or front-facing triangles when drawing a Mesh. - * Added love.graphics.setFrontFaceWinding. - * Added variant of love.graphics.getCanvasFormats which takes a 'readable' boolean. - * Added love.graphics.drawLayer and SpriteBatch:add/setLayer for easily drawing layers of Array Textures. - * Added variants of love.graphics.print and printf which take a Font argument. - * Added variants of love.graphics.clear to control how the active depth and stencil buffers are cleared. - * Added love.graphics.applyTransform and love.graphics.replaceTransform. - * Added love.graphics.transformPoint and love.graphics.inverseTransformPoint. - * Added love.graphics.getStackDepth. - * Added love.graphics.flushBatch for manually flushing automatically batched draws. - * Added SpriteBatch:setDrawRange. - * Added per-shader opt in support for the GLSL 3.30 and GLSL ES 3.00 shading languages. - * Added 'void effect()' pixel shader entry point. - * Added love.graphics.validateShader. - * Added Shader:hasUniform. - * Added support for non-square shader uniform matrices on desktop platforms and on mobile GLSL 3. - * Added Shader:send(matrixname, is_column_major, matrix, ...) which specifies how to interpret the matrix table arguments. - * Added Shader:send variants which accept a Data object. - * Added 'borderellipse' and 'borderrectangle' ParticleSystem distributions. - * Added variant of ParticleSystem:setEmissionArea which accepts an area angle and a flag for whether particle directions are relative to the center of the area. - * Added ParticleSystem:set/getAreaSpreadAngle and set/getAreaSpreadIsRelativeDirection. - * Added love.graphics.captureScreenshot (replaces love.graphics.newScreenshot). - * Added 'glsl3', 'instancing', 'fullnpot','pixelshaderhighp', and 'shaderderivatives' graphics features. - * Added 'anisotropy' graphics limit. - * Added Mesh instancing support via love.graphics.drawInstanced and Mesh:attachAttribute. - * Added a Mesh:attachAttribute variant that takes a different target attribute name. - * Added Mesh:detachAttribute. - * Added a variant of Mesh:setVertexMap which accepts a Data object. - * Added love.window.updateMode. - * Added love.window.isMinimized. - * Added love.window.restore. - * Added the ability to prevent love from creating a stencil buffer for the window. - * Added cycle detection to Variant's table serialization, cycles now cause an error, rather than a stack overflow. - * Added love.graphics.newShader File and FileData variants. - * Added a default love.threaderror callback, which raises the error in the main thread. - * Added checks for invalid constants passed to love.keyboard.isDown/isScancodeDown. - * Added deprecation warnings, on by default for non-fused games. - * Added love.filesystem.getInfo. - * Added 'drawcallsbatched' to love.graphics.getStats. - * Added support for header-less DEFLATE to love.data.compress/decompress. - - * Deprecated love.filesystem.exists / isFile / isDirectory / isSymlink / getLastModified / getSize (use getInfo instead). - * Deprecated love.math.compress / decompress (use love.data.compress / decompress instead). - - * - All renamed APIs are formally deprecated rather than completely removed. - * Renamed love.window.getPixelScale to love.window.getDPIScale. - * Renamed love.mouse.hasCursor to love.mouse.isCursorSupported. - * Renamed ParticleSystem:setAreaSpread to ParticleSystem:setEmissionArea. - * Renamed love.errhand to love.errorhandler. - * Renamed Source/SoundData/Decoder:getChannels to getChannelCount. - * Renamed PrismaticJoint/RevoluteJoint:hasLimitsEnabled to areLimitsEnabled. - * Renamed love.audio.getSourceCount to love.audio.getActiveSourceCount. - * Renamed all get[Object]List functions to get[Object]s. - - * Removed the default source type for love.audio.newSource. - * Removed variant of love.filesystem.newFileData which takes base64 data, use love.data.decode instead. - * Removed the no-argument variant of Text:set, use Text:clear instead. - * Removed love.graphics.getCompressedImageFormats, use love.graphics.getImageFormats instead. - * Removed the 'void effects(...)' pixel shader entry point. Use the new 'void effect()' instead. - * Removed Shader:getExternVariable, use Shader:hasUniform instead. - * Removed love.graphics.newScreenshot, use love.graphics.captureScreenshot instead. - * Removed deprecated enet function host:socket_get_address. - * Removed functions deprecated in LÖVE 0.10.2: - * Removed Shader:sendInt, Shader:sendBoolean, Shader:sentFloat, Shader:sendMatrix, and Shader:sendTexture (use Shader:send instead). - * Removed love.window.isCreated (use love.window.isOpen instead). - - * Improved performance when drawing textures, shapes, lines, and points by automatically batching their draw calls together when possible. - * Improved performance of Shader:send when the Shader is not active. - * Improved performance of love.math.randomNormal when LuaJIT's JIT compiler is enabled. - * Improved performance of love.filesystem.lines and File:lines, especially when reading from a file inside a zip/.love. - - * Changed all color values to be in the range 0-1, rather than 0-255. - * Changed high-dpi functionality to require much less code (often none at all) for graphics to appear at the correct sizes and positions. - * Changed love.graphics.print and friends to ignore carriage returns. - * Changed the 'multiply' blend mode to error if not used with the 'premultiplied' blend alpha mode, since the formula only works with that anyway. - * Changed some love.graphics, love.window, and love.event APIs to cause an error if a Canvas is active. - * Changed stenciling functionality with a Canvas active to require stencil=true (or a custom stencil-formatted Canvas) to be set in setCanvas. - * Changed Mesh:setDrawRange to take 'start' and 'count' parameters instead of 'min' and 'max'. - * Changed the 'vsync' field of love.window.setMode and t.window in love.conf. It's now an integer with 0 disabling vsync. - * Changed the audio playback APIs drastically. - * Changed enet to no longer set the 'enet' global, again matching luasocket. - * Changed Source seeking behaviour, all kinds of Sources now behave similarly when seeking past the boundaries. - * Changed love.timer.step, it now returns dt. - * Changed love.run and love.errhand to return a function for their main loop, which gets called until love quits. - - * Updated and improved command line argument handling. - * Updated the boot sequence to show an error instead of the no-game screen, if a nonexistant folder is passed in as the source game directory. - * Updated 'love.exe --version' on Windows to print to the parent console. - * Updated Android print rerouting and JIT compilation disabling to apply inside threads. - * Updated invalid enum value error messages to show a list of the valid enum values. - * Updated Source:seek to work if the Source isn't playing. - * Updated love.event.poll to stop allocating memory unnecessarily. - * Updated love.math.random to have improved numeric distribution. - * Updated love.graphics to support Core Profile OpenGL 3.3+ when available. - * Updated shaders to always expose derivative functions (dFdx, dFdy, fwidth) when available in OpenGL ES. - * Updated shaders to allow using VERTEX and PIXEL in shader code. - * Updated love.graphics.circle/ellipse/arc/rectangle to take transformation scale into account when determining the number of segments to use. - * Updated Font glyph generation to improve antialiasing. - * Updated Canvas:newImageData to return an ImageData with a format that matches the Canvas' as closely as possible. - * Updated love.graphics.newImage to treat file names ending with "@2x", "@3x", etc. as a pixel density scale factor if none is explicitly supplied. - * Updated the error message when bad values are given to love.graphics.line. - * Updated the maximum love.graphics transformation/state stack depth from 64 to 128. - * Updated the default error handler to allow copying the error to the clipboard when the user decides to do so. - * Updated love.filesystem.setRequirePath to support multiple template '?' characters in each path. - * Updated luasocket to version 3.0rc1. - * Updated love.joystick.loadGamepadMappings so it doesn't error when given an empty string. - * Updated love.joystick.setGamepadMapping to use the controller's name for the new mapping when possible. - - * Fixed error in default error handler when the error message contains non UTF-8 bytes. - * Fixed a memory leak when sending love objects to threads which never load that object's module. - * Fixed a memory leak in enet when peer:send fails. - * Fixed os.execute always returning -1 in Linux. - * Fixed the default reference angle for WeldJoint, PrismaticJoint, and RevoluteJoint. - * Fixed Fixture:getShape to reuse the existing internal Fixture-owned shape. - * Fixed MouseJoint:setFrequency to error instead of crashing if a frequency of 0 is set. - * Fixed love.system.set/getClipboardText to error instead of crashing, when a window hasn't been created. - * Fixed Joystick:getGamepadMapping to work with xinput controllers. - * Fixed love.joystick.setGamepadMapping's replacement code. - * Fixed baseline calculation when rendering text. - * Fixed VaryingTexCoords and love_ScreenSize in shaders to be 'highp' in OpenGL ES, when supported. - * Fixed ParticleSystem:setParticleLifetime to error if a negative value is given. - * Fixed Shader:send and Shader:sendColor ignoring the last argument for an array. - * Fixed a crash when love.graphics.pop is called after a love.window.setMode while the transformation stack was not empty. - * Fixed love.window.isMaximized. - * Fixed video playback to work with a wider range of Ogg Theora files. - * Fixed video seeking to be faster. - * Fixed BezierCurves to error instead of hanging in some situations. - * Fixed compilation of luasocket with newer luajit 2.1.0 beta versions. - -LOVE 0.10.2 [Super Toast] -------------------------- - -Released: 2016-10-31 - - * Added lovec.exe in Windows. It is the same as love.exe but built with the Console subsystem, so it always uses or provides a console. - * Added the ability to restart the game via love.event.quit("restart"). - * Added support for passing a table to love.mouse.isDown, love.keyboard.isDown, love.keyboard.isScancodeDown, Joystick:isDown, and Joystick:isGamepadDown. - * Added love.window.isMaximized. - * Added 'shaderswitches' field to the table returned by love.graphics.getStats. - * Added Quad:getTextureDimensions. - * Added 'ellipse' area distribution to ParticleSystems. - * Added support for BC4-7 compressed texture formats in KTX files. - * Added PrismaticJoint:getAxis and WheelJoint:getAxis. - * Added 2-point version of love.physics.newRevoluteJoint. - * Added table variants of Fixture:setCategory and Fixture:setMask. - * Added getNextVertex and getPreviousVertex to ChainShape and EdgeShape. - * Added optional reference angle arguments to RevoluteJoint, PrismaticJoint, and WeldJoint constructors. - * Added RevoluteJoint:getReferenceAngle, PrismaticJoint:getReferenceAngle, and WeldJoint:getReferenceAngle. - - * Deprecated undocumented Shader:sendTexture, Shader:sendMatrix, Shader:sendInt, and Shader:sendFloat functions. - - * Fixed love on iOS 6. - * Fixed os.execute always returning -1 on Linux. - * Fixed the love.lowmemory callback to call collectgarbage() after the callback has fired, instead of before. - * Fixed love.math.noise(nil) to error instead of returning nil. - * Fixed an occasional crash when a Thread ends. - * Fixed a hang at the end of video playback with some video files. - * Fixed the video decoding thread to not do any work when there are no videos to decode. - * Fixed love.graphics.newVideo(file) to no longer error if love.audio is disabled. - * Fixed a rare bug in Source:play for streaming Sources if the associated OpenAL source object was previously used for a static Source. - * Fixed corrupted Font glyphs in rare cases. - * Fixed stencils inside Canvases on some OpenGL ES 2 devices. - * Fixed an OpenGL error in OpenGL ES 3 when multiple render targets are used. - * Fixed love.window.setMode crashing when called with a Canvas active. - * Fixed love.window.maximize to update the reported window dimensions immediately. - * Fixed gamma correction of ImageFonts and BMFonts with colored images. - * Fixed the default shader improperly applying gamma correction to per-vertex colors when gamma correction is requested but not supported on OpenGL ES. - * Fixed text coloring breaking because of an empty string. - * Fixed large burst of particles when dramatically increasing the emission rate of a ParticleSystem. - * Fixed SpriteBatch:setBufferSize to keep old sprite data if it can fit. - * Fixed MouseJoint:getBodies unconditionally erroring. - * Fixed memory leak in Text:set. - * Fixed incorrect kerning caused by using kerning information for the wrong character in some fonts. - * Fixed ImageData:setPixel/getPixel/mapPixel and SoundData:setSample/getSample to properly handle non-integer coordinates. - - * Improved performance of Channel methods by roughly 2x in many cases. - * Improved performance of Shader:send when small numbers of arguments are given. - - * Updated love.filesystem.mount to accept a DroppedFile as the first parameter. - * Updated Shader:send to do type and argument checking based on the specified uniform variable's information instead of the arguments to the function. - * Updated Shader:send to accept a flat table for matrix uniforms. - - -LOVE 0.10.1 [Super Toast] -------------------------- - -Released: 2016-02-14 - - * Added a new love.conf flag t.externalstorage, which determines whether files are saved in internal or external storage on Android devices. - * Added a new variant of love.graphics.arc which can draw different types of arcs ("pie", "open", or "closed"). - * Added "lighten" and "darken" BlendModes. They can only be used with the "premultiplied" BlendAlphaMode. - * Added the "lighten" GraphicsFeature constant. - * Added the ability to avoid clearing specific Canvases when calling love.graphics.clear, if multiple Canvases are active at once via love.graphics.setCanvas. - * Added Text:getDimensions. - * Added optional "collideconnected" argument to love.physics.newMotorJoint. - - * Fixed a Lua error in the no-game screen if the window's height is too small. - * Fixed the default error handler to reset the mouse Cursor. - * Fixed love.filesystem functions crashing when called if liblove is used directly without calling love.filesystem.init. - * Fixed audio on Android to pause when the app is inactive, and resume when the app becomes active again. - * Fixed the Video decoding thread hanging after Video:seek or when a Video finishes. - * Fixed Video:isPlaying to always return false after it finishes playing. - * Fixed RandomGenerator:random crashing if a nil 'self' is used. - * Fixed loading BMFont files which have characters with 0 width or height (a space character, for example). - * Fixed love.graphics.newFont causing crashes if FileData is passed in. - * Fixed love.graphics.clear(colortable) causing crashes on OpenGL ES 2 systems when a Canvas is active. - * Fixed a driver bug on some Android devices which caused all objects to show up as black. - * Fixed a driver bug on Windows with AMD graphics cards where love.graphics.clear would not always work. - * Fixed Shader:sendColor incorrectly converting alpha values from sRGB to linear RGB when gamma-correct rendering is enabled. - * Fixed love.graphics.newMesh(vertices) double-converting colors from sRGB to linear RGB when gamma-correct rendering is enabled. - * Fixed love.graphics.new* crashing when there is no graphics context/window. - - * Updated the Windows executable to prefer the high-powered AMD graphics card on systems which have switchable Intel+AMD GPUs. - * Updated love.touch.getTouches to return the list of IDs in the relative order that the touches initially happened, instead of being in a random order. - * Updated the error messages caused by invalid or bad arguments to ImageData and SoundData methods to be more descriptive. - - -LOVE 0.10.0 [Super Toast] -------------------------- - -Released: 2015-12-22 - - * Added an iOS port. - * Added an Android port. - * Added the flag t.accelerometerjoystick to love.conf. Disables accelerometer-as-joystick functionality on mobile devices when false. - * Added the flag t.gammacorrect to love.conf (replaces t.window.srgb.) Enabling it globally enables gamma-correct rendering, when supported. - * Added video playback support for Ogg Theora videos, via love.graphics.newVideo and Video objects. - * Added love.video module. It is not used for displaying videos on-screen, only decoding them. - * Added love.touch module. Note that it has important differences from the touch implementation in the LÖVE 0.9 Android and iOS ports. - * Added love.touchpressed, love.touchreleased, and love.touchmoved. - * Added love.system.vibrate. - * Added love.filesystem.setRequirePath and love.filesystem.getRequirePath. - * Added an optional program exit argument to love.event.quit. - * Added love.filedropped and love.directorydropped event callback functions. - * Added love.lowmemory event callback function, called when the app is running out of memory on mobile operating systems. - * Added love.textedited event callback function, called when the user is compositing text (e.g. via an IME.) - * Added love.wheelmoved event callback function (replaces "wu" and "wd" constants for love.mousepressed.) - * Added love.mouse.hasCursor. - * Added a boolean argument to love.mousepressed and love.mousereleased indicating whether the button event originated from a touch press. - * Added optional x/y/width/height arguments to love.keyboard.setTextInput. They tell the system where text will show up so on-screen keyboards can avoid that area. - * Added Source:getType (replaces Source:isStatic.) - * Added Source:getDuration and Decoder:getDuration. - * Added an optional string argument containing raw pixel byte data to the width/height variant of love.image.newImageData. - * Added love.graphics.ellipse. - * Added rounded-rectangle support to love.graphics.rectangle. - * Added love.graphics.points (replaces love.graphics.point.) - * Added love.graphics.intersectScissor. - * Added an optional argument to love.graphics.setBlendMode which indicates whether to treat the colors of drawn objects as having pre-multiplied alpha. - * Added love.graphics.getSupported (replaces love.graphics.isSupported.) - * Added love.graphics.getSystemLimits (replaces love.graphics.getSystemLimit.) - * Added love.graphics.stencil and love.graphics.set/getStencilTest (replaces love.graphics.setStencil.) - * Added love.graphics.isActive. - * Added color arguments to love.graphics.clear. It no longer always uses the background color value. - * Added love.graphics.discard. - * Added love.graphics.isGammaCorrect. - * Added the "clampzero" WrapMode. - * Added the ability to specify custom mipmaps when creating an image, via love.graphics.newImage(filename, {mipmaps={mip1, mip2, ...}}) - * Added optional x/y/width/height arguments to Image:refresh and Canvas:newImageData. - * Added Image:getFlags. - * Added one- and two-channel Canvas formats: r8, rg8, r16f, rg16f, r32f, and rg32f. - * Added support for different formats in each Canvas when using multi-canvas rendering. Added the "multicanvasformats" Graphics Feature constant. - * Added support for OpenGL ES 2 and 3. - * Added support for loading ETC, EAC, PVRTC, and ASTC compressed textures on systems that support them. - * Added custom vertex attribute support for Meshes via new variants of love.graphics.newMesh. - * Added Mesh:setVertexAttribute and Mesh:getVertexAttribute. - * Added Mesh:getVertexFormat. - * Added Mesh:flush. - * Added an optional 'startvertex' argument to Mesh:setVertices. - * Added the ability for love.graphics.newMesh and Mesh:setVertices to accept a Data object. - * Added Mesh:setAttributeEnabled and Mesh:isAttributeEnabled. - * Added Mesh:attachAttribute. - * Added SpriteBatch:attachAttribute. - * Added Shader:sendColor. - * Added new shader functions: gammaCorrectColor, gammaToLinear, and linearToGamma. The functions also have 'precise' and 'fast' variants. - * Added Text objects and love.graphics.newText. - * Added per-character color support to love.graphics.print/printf and to Text objects. - * Added BMFont bitmap font file support to love.graphics.newFont and love.font. - * Added kerning support for TrueType/OpenType and BMFont Fonts. - * Added an optional font hinting argument to love.graphics.newFont when loading TrueType fonts. - * Added an optional spacing argument to love.graphics.newImageFont, which applies additional spacing to all rendered glyphs. - * Added Font:setFallbacks. - * Added love.window.maximize. - * Added love.window.close. - * Added love.window.requestAttention. - * Added love.window.setDisplaySleepEnabled and love.window.isDisplaySleepEnabled. - * Added BezierCurve:renderSegment and BezierCurve:removeControlPoint. - * Added BezierCurve:getSegment. - * Added love.math.compress and love.math.decompress. - * Added Channel:performAtomic. - - * Changed love.mousepressed, love.mousereleased, and love.mouse.isDown to use button numbers instead of named button constants. - * Changed love.keypressed to be love.keypressed(key, scancode, isrepeat). - * Changed love.keyreleased to be love.keyreleased(key, scancode). - * Changed Font:getWrap's second return value to be a table containing the text split into lines. - * Changed love.graphics.newImage's optional second argument to be a table of flags (flags are "mipmaps" and "linear".) - * Changed the arguments for the standard variants of love.graphics.newMesh to newMesh(vertices [, drawmode, usage]) and newMesh(vertexcount [, drawmode, usage]). - * Changed ImageData:encode to return a FileData object. ImageData:encode's first parameter is now the format to encode to, and the second parameter is an optional filename to write to. - - * Renamed the "normal" Fullscreen Type to "exclusive". - * Renamed the DistanceModel constants "inverse clamped", "linear clamped", and "exponent clamped" to "inverseclamped", "linearclamped", and "exponentclamped". - * Renamed the "additive", "subtractive", and "multiplicative" BlendModes to "add", "subtract", and "multiply". - * Renamed the KeyConstant and Scancode representing the spacebar from " " to "space". - * Renamed File:eof to File:isEOF. - * Renamed Canvas:getImageData to Canvas:newImageData. - * Renamed love.image's CompressedData type to CompressedImageData. - - * Removed callback variant of love.filesystem.getDirectoryItems. - * Removed the "wu" and "wd" constants for love.mousepressed (replaced by love.wheelmoved.) - * Removed the named mouse button constants (replaced by button numbers.) - * Removed Source:isStatic (replaced by Source:getType.) - * Removed image loading support for all (non-compressed texture) file formats except for PNG, JPEG, TGA, and BMP. - * Removed JPEG encoding support from ImageData:encode. - * Removed love.graphics.point (replaced by love.graphics.points.) - * Removed love.graphics.setPointStyle and love.graphics.getPointStyle. - * Removed love.graphics.isSupported (replaced by love.graphics.getSupported.) - * Removed love.graphics.getSystemLimit (replaced by love.graphics.getSystemLimits.) - * Removed love.graphics.setStencil (replaced by love.graphics.stencil and love.graphics.setStencilTest.) - * Removed the "canvas", "shader", "npot", "subtractive", and "mipmap" Graphics Feature constants (the features always have guaranteed support now.) - * Removed the "multicanvas" Graphics Feature constant (use love.graphics.getSystemLimits instead.) - * Removed the "srgb" Graphics Feature constant (use love.graphics.isGammaCorrect() or love.graphics.getCanvasFormats().srgb instead.) - * Removed the "srgb" flag in love.window.setMode and in the t.window table in love.conf (Replaced by t.gammacorrect.) - * Removed the "premultiplied" blend mode (love.graphics.setBlendMode("alpha", "premultiplied") now does the same thing.) - * Removed Canvas:getPixel (use Canvas:newImageData instead.) - * Removed Canvas:clear (use love.graphics.clear instead.) - * Removed Mesh:getVertices. - * Removed Mesh:setVertexColors and Mesh:hasVertexColors (use Mesh:setAttributeEnabled("VertexColor", enable) instead.) - * Removed functions deprecated in LOVE 0.9.1 and 0.9.2: - * Removed love.graphics.getMaxImageSize and love.graphics.getMaxPointSize (replaced by love.graphics.getSystemLimits.) - * Removed Mesh:set/getImage, SpriteBatch:set/getImage, and ParticleSystem:set/getImage (replaced by set/getTexture.) - * Removed SpriteBatch:bind/unbind. - * Removed Canvas:getFSAA and the "fsaa" flag in love.conf and love.window.setMode (replaced by Canvas:getMSAA and "msaa".) - * Removed the "dxt" and "bc5" Graphics Feature constant (replaced by love.graphics.getCompressedImageFormats.) - * Removed the "hdrcanvas" Graphics Feature constant (replaced by love.graphics.getCanvasFormats.) - * Removed love.window.getWidth/getHeight/getDimensions (use love.graphics.getWidth/getHeight/getDimensions or love.window.getMode instead.) - - * Fixed utf8.char. - * Fixed detection of fused love games. - * Fixed World:getCallbacks and World:getContactFilter when used in coroutines. - * Fixed crashes when objects which store Lua callback functions are garbage collected after being used in coroutines. - * Fixed memory leaks in love.physics if World:destroy is never called. When a World is GCed it now destroys all objects it owns. - * Fixed love.keyboard.getKeyFromScancode crashing when an invalid scancode is given. - * Fixed decoding of 8-bit WAV files. - * Fixed a crash issue when rewinding streaming ogg Sources, when certain versions of libvorbis are used. - * Fixed love.audio.stop() not rewinding streaming Sources. - * Fixed the stencil buffer in Canvases when an unsupported MSAA value is used to create the Canvas. - * Fixed Canvas:renderTo to restore the previous Canvas if an error occurs in the passed function. - * Fixed love.graphics.draw(canvas) to cause an error if that Canvas is the active one. - * Fixed Mesh:getVertexMap to return nil rather than an empty table, if no vertex map has been set. - * Fixed love.graphics.getColorMask. - * Fixed the default offset for particles when ParticleSystem:setQuads or ParticleSystem:setTexture is used. - * Fixed love.graphics.shear resetting all love.graphics transformations. - * Fixed the "add" and "subtract" blend modes to no longer modify the alpha of the Canvas / screen. - - * Improved the performance of World:rayCast and World:queryBoundingBox. - * Improved the performance of love.graphics.line and other line drawing functions, when the "smooth" LineStyle is used. - * Improved the performance of Shader:send when matrices are used. - * Improved the performance of ImageData and SoundData methods when LuaJIT's JIT compiler is enabled, by using efficient FFI code. - * Improved the performance of love.math.noise, love.math.gammaToLinear, love.math.linearToGamma, love.math.random, and RandomGenerator:random when LuaJIT's JIT compiler is enabled. - - * Updated the compatibility warning notice to use a message box and to show the version specified in love.conf. - * Updated the compatibility warning notice to display before main.lua is loaded. - * Updated the __tostring metamethod of love objects to output the pointer value, similar to tostring(table). - * Updated World:setCallbacks, World:setContactFilter, World:queryBoundingBox, and World:rayCast to have improved argument type checking. - * Updated threads to load love.filesystem automatically. - * Updated love.filesystem to enable symlinks by default. - * Updated love.math.setRandomSeed and RandomGenerator:setSeed to produce better results for the first few random() calls. - * Updated love.math.random and RandomGenerator:random to produce slightly better results in general. - * Updated Source methods that deal with spatial audio to error rather than failing silently if the Source isn't mono. - * Updated the 3D and 4D variants of love.math.noise to use Perlin noise rather than Simplex noise, to avoid patent issues. - * Updated ImageFonts to no longer treat separator pixels as spacing. - * Updated the default font to use less memory. - * Updated the behavior of text wrapping with love.graphics.printf and Font:getWrap to work better. - * Updated love.graphics.print and love.graphics.printf to no longer automatically round the x and y position arguments. - * Updated some error messages for love.graphics.newImage to be more descriptive. - * Updated love.graphics color functions to automatically apply love.math.gammaToLinear to color values when gamma-correct rendering is enabled. - * Updated the 'normal' Canvas format to internally use 'srgb' rather than 'rgba8' when gamma-correct rendering is enabled. - * Updated love.graphics.setColor to affect all drawn objects, including ParticleSystems, SpriteBatches, and Meshes. - * Updated the default fullscreen type to be "desktop" rather than "exclusive". - * Updated the minimum runtime system requirements of LOVE to require OpenGL 2.1 or OpenGL ES 2 support. - * Updated the pixel shader effect function so screen_coords.y is 0 at the top of the screen instead of the bottom. - * Updated Images to require setting the mipmaps flag to true on creation in order to use mipmaps. - * Updated Images to allow mipmaps for non-power-of-two sizes. - -LOVE 0.9.2 [Baby Inspector] ---------------------------- - - Released: 2015-02-14 - - * Added Lua 5.3's UTF-8 module (via utf8 = require("utf8")). - * Added Shader:getExternVariable. - * Added several new canvas texture formats. - * Added love.graphics.getCanvasFormats. - * Added love.graphics.getCompressedImageFormats. - * Added ParticleSystem:setQuads. - * Added ParticleSystem:setLinearDamping. - * Added SpriteBatch:flush. - * Added love.graphics.getStats. - * Added "mirroredrepeat" wrap mode. - * Added love.audio.setDopplerScale and love.audio.getDopplerScale. - * Added optional duration argument to Joystick:setVibration. - * Added love.joystick.loadGamepadMappings and love.joystick.saveGamepadMappings. - * Added Joint:setUserData and Joint:getUserData. - * Added Joint:getBodies. - * Added GearJoint:getJoints. - * Added Contact:getFixtures and Body:getContactList. - * Added Body:getWorld. - * Added Body:getJointList. - * Added Body/Contact/Fixture/Joint/World:isDestroyed. - * Added love.mousemoved event callback. - * Added love.mouse.setRelativeMode and love.mouse.getRelativeMode. - * Added Scancode enums, love.keyboard.getKeyFromScancode, and love.keyboard.getScancodeFromKey. - * Added love.window.getDisplayName. - * Added love.window.minimize. - * Added love.window.showMessageBox. - * Added 'refreshrate' field to the table returned by love.window.getMode. - * Added love.window.toPixels and love.window.fromPixels. - * Added love.window.setPosition and love.window.getPosition, and 'x' and 'y' fields to love.window.setMode and t.window in love.conf. - * Added love.filesystem.isSymlink, love.filesystem.setSymlinksEnabled, and love.filesystem.areSymlinksEnabled. - * Added love.filesystem.getRealDirectory. - - * Deprecated SpriteBatch:bind and SpriteBatch:unbind. - * Deprecated all uses of the name 'FSAA' in favor of 'MSAA'. - * Deprecated the 'hdrcanvas' graphics feature enum in favor of getCanvasFormats. - * Deprecated the 'dxt' and 'bc5' graphics feature enums in favor of getCompressedImageFormats. - - * Fixed crashes when love objects are used in multiple threads. - * Fixed love.filesystem.setIdentity breaking in some situations when called multiple times. - * Fixed the default love.filesystem identity when in Fused mode in Windows. - * Fixed love.system.openURL sometimes blocking indefinitely on Linux. - * Fixed love.joystick.setGamepadMapping. - * Fixed the order of vertices in ChainShapes. - * Fixed love.mouse.getPosition returning outdated values if love.mouse.setPosition is used in the same frame. - * Fixed love.graphics.newFont to error when given an invalid size argument. - * Fixed the filename and backtrace given when love.graphics.print errors. - * Fixed a small memory leak if love.graphics.newCanvas errors. - * Fixed shader:getWarnings returning unnecessary information. - * Fixed some cases of noncompliant shader code not properly erroring on some nvidia drivers. - * Fixed a potential crash when Shader objects are garbage collected. - * Fixed a potential small memory leak triggered when love.graphics.newShader errors. - * Fixed love.graphics.newMesh(vertexcount, ...) causing the Mesh to do instanced rendering. - * Fixed Mesh:getVertexMap. - * Fixed Image:refresh generating mipmaps multiple times if mipmap filtering is enabled. - * Fixed Image:setMipmapFilter to not keep bad state around if it errors. - * Fixed Mesh:setDrawRange when the Mesh has a vertex map set. - * Fixed internal detection of the 'position' and 'effect' shader functions. - * Fixed Texture memory leak when Meshes are garbage collected. - * Fixed the default line join mode to be 'miter' instead of an undefined value. - * Fixed the default error handler text size when highdpi mode is enabled on a Retina monitor. - * Fixed the default error handler background color when sRGB mode is enabled for the window. - * Fixed love.window.setMode to fall back to the largest available mode if a width or height greater than the largest supported is specified and fullscreen is used. - * Fixed the state of wireframe mode when love.window.setMode is called. - * Fixed Canvas:getPixel to error if the coordinates are not within the Canvas' size. - * Fixed detection of compressed textures to work regardless of the file's extension. - - * Renamed all cases of FSAA to MSAA. The FSAA names still exist for backward-compatibility. - - * Updated the Windows executable to automatically prefer the higher performance GPU on nvidia Optimus systems. - * Updated the --console command-line argument in Windows to open the console before conf.lua is loaded. - * Updated t.console and the --console command-line argument in Windows to use the existing Console window, if love was launched from one. - * Updated the love executable to verify that the love library's version matches. - * Updated the Lua wrapper code for modules to avoid crashes when the module's instance is created, deleted, and recreated. - * Updated internal code for handling garbage collection of love objects to be more efficient. - * Updated love's initialization code to trigger a Lua error if love.conf has an error in it. - * Updated the paths returned by love.filesystem.getSaveDirectory and friends to strip double-slashes from the string. - * Updated the error message when love.filesystem.write or File:open fails because the directory doesn't exist. - * Updated the error message when love.math.setRandomseed(0) is attempted. - * Updated the error message when invalid UTF-8 strings are used in love functions that expect UTF-8. - * Updated love.physics.newPolygonShape and love.physics.newChainShape to accept a table of vertices. - * Updated love.physics.newChainShape to error if the number of arguments is invalid. - * Updated love.thread.newThread to accept a literal string of code directly. - * Updated love-created threads to use names visible in external debuggers. - * Updated SpriteBatch:unbind to use less VRAM if the SpriteBatch has the static usage hint. - * Updated love.graphics.newImage, love.image.newImageData, etc. to leave less Lua-owned memory around. - * Updated love.graphics.push to accept different stack types to push. Current types are "transform" and "all". - * Updated love shaders to accept GLSL ES precision qualifiers on variables, although they do nothing. - * Updated the error message for love.graphics.newShader to be less cryptic if an invalid filename is given. - * Updated compressed texture loading code to allow BC6 and BC7 compressed textures (if the graphics driver supports them.) - -LOVE 0.9.1 [Baby Inspector] ---------------------------- - - Released: 2014-04-01 - - * Added Source:clone. - * Added blend mode "screen". - * Added ParticleSystem:clone. - * Added ParticleSystem:moveTo, has smoother emitter movement compared to setPosition. - * Added ParticleSystem:setRelativeRotation. - * Added love.graphics.setWireframe for debugging. - * Added Mesh:setDrawRange and Mesh:getDrawRange. - * Added CircleShape:getPoint and CircleShape:setPoint. - * Added Mesh/SpriteBatch/ParticleSystem:setTexture, accepts Canvases and Images. - * Added high-dpi window support for Retina displays in OS X, via the 'highdpi' window flag. - * Added love.window.getPixelScale. - * Added love.graphics.getSystemLimit. - * Added antialiasing support to Canvases. - * Added Canvas:getFSAA. - * Added 'love_ScreenSize' built-in variable in shaders. - * Added love.getVersion. - * Added support for gamma-correct rendering. - * Added love.graphics.isSupported("srgb"). - * Added love.math.gammaToLinear and love.math.linearToGamma. - * Added RandomGenerator:getState and RandomGenerator:setState. - * Added Body:setUserData and Body:getUserData. - * Added some missing obscure key constants. - * Added optional callback function argument to love.filesystem.getDirectoryItems. - * Added love.system.openURL. - - * Deprecated Mesh/SpriteBatch/ParticleSystem:setImage. - * Deprecated love.graphics.getMaxImageSize and love.graphics.getMaxPointSize. - - * Fixed love.graphics.scale with negative values causing incorrect line widths. - * Fixed Joystick:isDown using 0-based button index arguments. - * Fixed Source:setPitch to error when infinity or NaN is given. - * Fixed love.graphics.setCanvas() to restore the proper viewport and scissor rectangles. - * Fixed TrueType font glyphs which request a monochrome bitmap pixel mode. - * Fixed love.graphics.reset causing crashes when called in between love.graphics.push/pop. - * Fixed tab characters ("\t") to display properly with love.graphics.print. - * Fixed love.graphics.isCreated to return false when love.window.setMode fails completely. - * Fixed love.window.setMode to not destroy OpenGL resources before checking whether a fullsceren size is supported. - * Fixed World:getBodyList and World:getJointList causing hard crashes. - * Fixed loading BC4 compressed textures. - * Fixed SoundData objects being initialized with garbage values. - * Fixed 8-bit SoundData samples when used in love.audio Sources. - - * Updated the error text for love.filesystem’s module searchers when require fails. - * Updated the love.filesystem module searchers to be tried after package.preload instead of before. - * Updated love.graphics.newParticleSystem, newSpriteBatch, and newMesh to accept Canvases. - * Updated Canvas drawing code, texture coordinates are no longer flipped vertically. - * Updated Canvas:renderTo to work properly if a Canvas is currently active. - * Updated ParticleSystem:setEmissionRate to accept non-integer numbers. - * Updated Source:play to return a boolean indicating success. - * Updated t.console in conf.lua to create the console before modules are loaded in Windows. - * Updated Mesh vertex maps (index buffers) to use less space in VRAM. - * Updated love.graphics.newMesh and Mesh:setVertices to default the UV parameters to 0,0. - * Updated Fixture:set/getUserData to work in Coroutines. - * Updated fullscreen-desktop and resizable window modes in OS X to use Mac OS 10.7's fullscreen Spaces. - * Updated love.filesystem's C library loader to look in paths added via love.filesystem.mount, in Fused mode. - * Updated the default love.run code to make initial love.math.random calls more random. - -LOVE 0.9.0 [Baby Inspector] ---------------------------- - - Released: 2013-12-13 - - * Added better multiplayer networking support via ENet. - * Added --fused command line argument, to simulate fusing. - * Added liblove. - * Added the ability to have exit values. - * Added exit value of 1 in case of error by default. - * Added basic support for the file:// uri scheme. - * Added love.filesystem.isFused. - * Added love.filesystem.getIdentity. - * Added love.filesystem.append. - * Added love.filesystem.getSize. - * Added love.filesystem.mount and love.filesystem.unmount. - * Added optional file search order parameter to love.filesystem.setIdentity. - * Added File:isOpen and File:getMode. - * Added Fie:setBuffer, File:getBuffer, and File:flush. - * Added textinput event for unicode text input. - * Added love.keyboard.setTextInput and love.keyboard.hasTextInput. - * Added previously internal Rasterizer and GlyphData object methods. - * Added support for UTF-8 ImageFonts. - * Added Font:getAscent/getDescent/getBaseline. - * Added Font:setFilter/getFilter. - * Added Font:hasGlyphs. - * Added angle, scale, and shear parameters to love.graphics.printf. - * Added HDR canvas support. - * Added mipmapping support (has isSupported test). - * Added vertex shader support. - * Added boolean support to Shader:send. - * Added Canvas:getPixel. - * Added blend mode "replace". - * Added line join modes. - * Added Mesh objects, allowing for arbitrary textured polygons. - * Added multiple render target support to love.graphics.setCanvas. - * Added love.graphics.setColorMask. - * Added love.graphics.origin. - * Added love.graphics.getRendererInfo. - * Added love.graphics.getMaxImageSize. - * Added SpriteBatch:getCount and SpriteBatch:getBufferSize. - * Added SpriteBatch:getColor. - * Added ParticleSystem:emit. - * Added ParticleSystem:setInsertMode and ParticleSystem:getInsertMode. - * Added many ParticleSystem getter methods. - * Added DXT compressed texture support via love.image.newCompressedData. - * Added love.image.isCompressed and Image:isCompressed. - * Added Image/Canvas/ImageData:getDimensions. - * Added anisotropic filtering support for Images, Canvases, and Fonts. - * Added Image:refresh. - * Added Image:getData. - * Added SoundData:getDuration and SoundData:getSampleCount. - * Added Source:isPlaying. - * Added Source:setRelative and Source:isRelative. - * Added Source:setCone and Source:getCone. - * Added Source:getChannels. - * Added new Channels API for love.thread. - * Added limited table support to Channel:push. - * Added Thread:getError. - * Added Thread:isRunning. - * Added threaderror event. - * Added love.math module. - * Added a platform-independent (good) random implementation to love.math. - * Added RandomGenerator objects. - * Added BezierCurve objects. - * Added love.math.triangulate and love.math.isConvex. - * Added love.math.noise. - * Added love.timer.getAverageDelta. - * Added Data:getString. - * Added Contact:getChildren. - * Added love.system module. - * Added love.system.getClipboardText and love.system.setClipboardText. - * Added love.system.getOS and love.system.getProcessorCount. - * Added love.window module. - * Added love.window.isVisible. - * Added flags to love.window.setMode. - * Added monitor choosing support to love.window.setMode. - * Added support for resizable, borderless, and non-centered windows. - * Added support for "fullscreen-desktop" mode. - * Added window resize and visible events. - * Added love.window.getDimensions. - * Added love.window.getIcon. - * Added t.window.icon to love.conf. - * Added love.mousefocus and love.window.hasMouseFocus. - * Added custom hardware cursors via love.mouse.newCursor. - * Added love.mouse.setX/setY. - * Added Joystick objects. - * Added love.joystick.getJoystick. - * Added joystick connect and disconnect events. - * Added joystickaxis and joystickhat events. - * Added unified Gamepad API for joysticks which have a similar layout to the Xbox controller. - * Added joystick vibration support, works with most common gamepads. - * OPTIONAL: Added support for Game Music Emu. - - * Fixed fused mode in OS X. - * Fixed printing to the console in Windows before love.load is called. - * Fixed the default love.run to not include the time taken by love.load in the first frame's dt. - * Fixed the error screen not always appearing until the next input event. - * Fixed love.event.clear. - * Fixed love.mouse.setPosition when called in love.load. - * Fixed scaling in several love.physics functions. - * Fixed Box2D exception in World:update. - * Fixed many uncaught Box2D / love.physics exceptions for Bodies and Joints. - * Fixed ChainShape:getPoints running out of Lua stack space and crashing. - * Fixed File:read reading past end of file. - * Fixed love.filesystem.setIdentity not removing read access from old directories. - * Fixed possible memory leak in utf-8 decoder. - * Fixed spacing for the last character in an ImageFont. - * Fixed line wrapping in love.graphics.printf. - * Fixed love.graphics.printf to error if the wrap limit is negative. - * Fixed love.graphics.print truncating strings with embedded zeros. - * Fixed crashes with font drawing on some ATI cards. - * Fixed artifacts when drawing lines at huge scale. - * Fixed Fonts and Canvases ignoring default image filter. - * Fixed scissor boxes when a canvas is set after love.graphics.setScissor is called. - * Fixed love.graphics.getLineWidth returning incorrect values. - * Fixed love.graphics.getColor on some Windows systems. - * Fixed alpha blend mode. - * Fixed multiplicative blend mode. - * Fixed love.graphics.getPointStyle. - * Fixed line numbers in shader errors. - * Fixed Shader:send with Images and Canvases failing sometimes. - * Fixed Shader:send to keep a reference to sent Images and Canvases. - * Fixed crash when binding SpriteBatches multiple times. - * Fixed SpriteBatches with more than 16,384 sprites. - * Fixed particle draw order for ParticleSystems. - * Fixed ParticleSystem:setSizes resetting the size variation. - * Fixed the graphics viewport not matching the window size when using an unsupported fullscreen mode. - * Fixed getMode and friends returning wrong values when using desktop size. - * Fixed keyrepeat settings being lost after (indirect) setMode. - * Fixed the icon being reset after setMode. - * Fixed memory leak in the mp3 decoder. - * Fixed sound issues with some versions of OpenAL soft, by enabling direct channels. - * Fixed 'random' hangs in audio. - * Fixed love.sound.newDecoder not accepting FileData. - * Fixed case (in)sensitivity of sound file extension parsing. - * Fixed looping support in tracker music formats. - * Fixed skipping/looping issues when playing streaming audio Sources. - * Fixed race condition in Source:play. - * Fixed WAVE sound playback. - - * Moved love's startup to modules/love. - * Moved window-related functions from love.graphics to love.window. - - * Renamed love's boot script to 'love.boot', which can be required. - * Renamed love.filesystem.mkdir to love.filesystem.createDirectory. - * Renamed love.filesystem.enumerate to love.filesystem.getDirectoryItems. - * Renamed World:setAllowSleeping to World:setSleepingAllowed. - * Renamed ChainShape:setPrevVertex to ChainShape:setPreviousVertex. - * Renamed Joint:enableMotor to Joint:setMotorEnabled. - * Renamed Joint:enableLimit and Joint:isLimitEnabled to Joint:setLimitsEnabled and Joint:hasLimitsEnabled. - * Renamed t.screen to t.window in love.conf. - * Renamed love.graphics.setCaption to love.window.setTitle. - * Renamed PixelEffect to Shader (but now with vertex shaders). - * Renamed love.graphics.setDefaultImageFilter to love.graphics.setDefaultFilter. - * Renamed ParticleSystem:setSprite to ParticleSystem:setImage. - * Renamed ParticleSystem:setGravity to ParticleSystem:setLinearAcceleration. - * Renamed ParticleSystem:setLifetime/setParticleLife to setEmitter/ParticleLifetime. - * Renamed ParticleSystem:count and all getNum* functions to get*Count. - * Renamed Source:setDistance to Source:setAttenuationDistances. - * Renamed SoundData:getBits and Decoder:getBits to SoundData:getBitDepth and Decoder:getBitDepth. - * Renamed love.mouse.setGrab to love.mouse.setGrabbed. - - * Removed release mode. - * Removed love.keyboard.getKeyRepeat (see love.keyboard.hasKeyRepeat). - * Removed the unicode argument from love.keypressed (see love.textinput). - * Removed love.graphics.drawTest. - * Removed love.graphics.quad/triangle. - * Removed love.graphics.setColorMode. - * Removed love.graphics.newStencil. - * Removed love.graphics.setLine/setPoint. - * Removed love.graphics.drawq (functionality is merged into love.graphics.draw). - * Removed SpriteBatch:addq/setq (functionality is merged into SpriteBatch:add/set). - * Removed Quad:flip. - * Removed ParticleSystem:isFull/isEmpty. - * Removed ParticleSystem:getX/getY. - * Removed love.graphics.checkMode. - * Removed love.joystick.open and friends. - * Removed love.joystick module functions which operated on individual joysticks (see Joystick objects). - * Removed joystick ball support. - * Removed thread names. - * Removed old thread messaging API (see Channels). - * Removed love.timer.getMicroTime. - - * Updated functions which return love objects to re-use the Lua-side object instead of always recreating it. - * Updated the windows console, it now tries to re-use an active one first. - * Updated error handling, error handlers now get resolved when the error occurs. - * Updated order of sleep/present in love.run (now draws, *then* sleeps). - * Updated love.filesystem to try to create the appdata directory if it doesn't exist yet. - * Updated the default filesystem identity to omit file extension. - * Updated love.filesystem.newFile to optionally open the file. - * Updated most love.filesystem functions to return nil, error on internal failure. - * Updated love.keyboard.setKeyRepeat to take a boolean argument instead of numbers. - * Updated love.keypressed's second argument to be a boolean indicating key repeat. - * Updated keyboard key constants for some more modern keyboard keys. - * Updated window code to use adaptive vsync when available, if vsync is enabled. - * updated love.graphics.print's x and y arguments to default to 0. - * Updated the setFilter and setWrap methods, the second argument is now optional. - * Updated Font and ParticleSystem rendering code, now more performant. - * Updated SpriteBatch code, now more performant when adding/setting and (un)binding. - * Updated Canvas code to support more systems. - * Updated Canvas:getImageData and love.graphics.newScreenshot to be more efficient. - * Updated love.graphics.newScreenshot to create a fully opaque image by default. - * Updated error messages when sending bad values to Shaders. - * Updated love.graphics.newParticleSystem to have a default buffer size of 1000. - * Updated ImageData:setPixel to accept a table and default to 255 alpha. - * Updated ImageData:mapPixel, is now more efficient and accepts optional x,y,w,h arguments. - * Updated love.image memory handling, improves errors and thread-safety. - * Updated all love object constructors to optionally accept FileData if they accept a filename. - * Updated allocation for SoundData, it's more efficient and less wasteful. - * Updated SoundData:set/getSample to error for invalid samples. - * Updated Source:set* functions to default z to 0. - * Updated Source:seek to error for negative offsets. - * Updated Thread:start to accept arguments which get passed to the thread. - * Updated love.timer.getFPS to be microsecond-accurate. - * Updated love.timer.getTime to be microsecond-accurate and monotonic. - * Updated Box2D to version 2.3.0. - -LOVE 0.8.0 [Rubber Piggy] -------------------------- - - Released: 2012-04-02 - - * Added release error screen. - * Added alpha to love.graphics.setBackgroundColor. - * Added Canvas:clear(r, g, b, a). - * Added Canvas support to love.graphics.drawq. - * Added Canvas:getWidth and Canvas:getHeight. - * Added love.graphics.arc. - * Added seek and tell to Source objects. - * Added color interpolation to ParticleSystem. - * Added automatic PO2 padding for systems not supporting the OpenGL extension. - * Added UTF-8 support for fonts. - * Added Box2D error handling for some commonly failing functions. - * Added ability for fused release games to have their write dir in appdata. - * Added shear transformation to drawing functions. - * Added origin to font printing. - * Added love.graphics.getMode. - * Added per-sprite colors on SpriteBatches. - * Added PixelEffects. - * Added love.graphics.isSupported. - * Added love.graphics.getCanvas. - * Added love.event.quit. - * Added stencil masks. - * Added alternative SpriteBatch provider, it should work everywhere now. - * Added a loader for binary modules. - * Added Thread:getKeys. - * Added option of fractions for Quads. - * Added PNG, JPEG and GIF support to ImageData:encode. - * Added 64-bit support for Mac OS X. - * Added premultiplied blending mode. - * Added functions to set/get default image filter modes. - * Added SpriteBatch:set. - * Added new events system, with support for custom events and long event names. - * Added sound attenuation by distance. - * Added SpriteBatch:getImage. - * Added combine color mode. - * Added automatic random seeding to love.run. - * Added support for the subtract BlendMode on older graphics cards. - * Added love._os field, which contains the OS the game is running on. - - * Fixed wrapping for single words. - * Fixed tracebacks not showing filenames. - * Fixed love.graphics.push/pop capable of causing overflows/underflows. - * Fixed setScissor on Canvases. - * Fixed several issues with audio, e.g. clicks and pops in mp3s. - * Fixed crashes when bodies were destroyed during collisions. - * Fixed bound SpriteBatches corrupting when drawing. - * Fixed thread-safety issues with ImageData. - * Fixed memory leaks in audio sources. - * Fixed thread's set (previously send) accidentally changing the type. - * Fixed SoundData allocating the wrong number of samples. - * Fixed SpriteBatch support on Intel cards. - * Fixed love.filesystem.lines() leaking. - * Fixed most leaking on unclosed File objects. - * Fixed crashes when operating on non-existent files. - * Fixed a bug where empty files on windows would never reach eof. - * Fixed crash when SoundData runs out of memory. - * Fixed ordering of loaders, love should have priority over lua. - * Fixed several miscellaneous memory leaks. - * Fixed a few cases where strings with \0 in them would not be stored correctly. - * Fixed love's startup time being in the first dt. - * Fixed internal string conversions, they are faster now. - * Fixed (bad) performance of ImageData:paste. - * Fixed love.graphics.toggleFullscreen not maintaining graphics state. - - * Renamed SpriteBatch's lock/unlock to bind/unbind. - * Renamed Framebuffer to Canvas. - * Renamed love.thread.send/receive to set/get. - * Renamed love.graphics.setRenderTarget to setCanvas. - - * Removed canvas auto-clearing. - * Removed EncodedImageData. - * Removed old syntax for require (with extension). - * Removed love.graphics.setFont([file], [size]). - * Removed Thread:kill. - - * Updated love.joystick to be 1-indexed. - * Updated Sources to update more cleanly and control more intuitively. - * Updated font engine. - * Updated line drawing to a custom system. - * Updated love.timer.sleep to use seconds, like the rest of love. - * Updated love.timer to be more accurate. - * Updated love.graphics.circle to have max(10, r) as default for segments. - * Updated ImageData:encode to write to files directly. - * Updated version compatibility system to actually do something. - * Updated love.run's order, events are checked just before update. - * Updated Box2D to version 2.2.1. - -LOVE 0.7.2 [Game Slave] ------------------------ - - Released: 2011-05-04 - - * Added Framebuffer:get/setWrap. - * Added love.event.clear. - * Added support for any number of arguments to love.keyboard.isDown, love.mouse.isDown and love.joystick.isDown. - * Added SpriteBatch:setImage(). - - * Fixed fused games not working. - * Fixed ParticleSystem:setSize ignoring the variation argument. - * Fixed some file-opening exceptions not being caught. - * Fixed files loaded by libmodplug being too loud. - * Fixed paths with periods in them not working. - * Fixed love.graphics.getBlendMode not detecting subtractive and multiplicative blend modes. - * Fixed crash when there was no memory available for newImageData(w, h). - - * Updated PhysicsFS version to 2.0.2 on Windows - * Updated OpenAL Soft version to 1.13 on Windows - * Updated libmodplug version to 0.8.8.1 on Windows - * Updated FreeType version to 2.4.4 on Windows - * Updated libmpg123 version to 1.13.2 on Windows - * Windows binary no longer depends on VC2005 runtime. - * Windows binary no longer depends on SSE2 support. - -LOVE 0.7.1 [Game Slave] ------------------------ - - Released: 2011-02-14 - - * Added source:isPaused() - * Added error when initial window can't be created. - * Added framebuffer filter modes. - * Added love.filesystem.getLastModified. - * Added filter modes for ImageFonts. - * Added dead key support by using "unknown" key with correct unicode value. - * Added 0 width and height in love.conf. (for current desktop resolution) - * Added alpha support when encoding TGA images. - - * Fixed a lot of bugs regarding zero characters in threads. - * Fixed handling of a directory named "love" in current directory. - * Fixed a few unhandled errors in setScissor. - * Fixed a bug where old physics callbacks were never dereferenced. - * Fixed loss of mouse visibility settings on setMode. - * Fixed creation of a framebuffer unbinding current framebuffer. - * Fixed several race conditions in love.thread. - * Fixed 'love .', so it won't use lovedir/. as save dir. - * Fixed setLineHeight. - * Fixed extended ascii and ImageFonts. - * Fixed printf's line wrapping. - * Fixed crash when playing sounds. - * Fixed playback of mp3s with arbitrary sample rates. - * Fixed handling of negative indices in love.joystick. - * Fixed toggleFullscreen. - * Fixed unexpected behaviour with hash tables to love.graphics.line. - * Fixed mouse coordinates being capped after setMode. - * Fixed setFont's error handling on a non-existant file. - * Fixed issue where Windows builds would hard crash on Lua errors - - * Removed custom sample rates for Decoders. - -LOVE 0.7.0 [Game Slave] ------------------------ - - Released: 2010-12-05 - - * Added love.thread. - * Added love.font. - * Added love.graphics.Framebuffer. - * Added Source:play, Source:pause, etc. - * Added Source:isStatic(). - * Added get/setPosition, get/setVelocity, and get/setDirection to Source. - * Added get/setGroupIndex to CircleShape and PolygonShape. - * Added Font:getWrap. - * Added identity field to love.conf. - * Added love.quit callback. - * Added love.focus callback. - * Added extra meter parameter to love.physics.newWorld. - * Added love.graphics.setIcon. - * Added way to make the window desktop resolution. - * Added subtractive and multiplicative blend modes. - * Added body:getAllowSleeping. - * Added shape:getBody. - * Added love.filesystem.FileData for public usage. - * Added base64 support for love.filesystem.FileData. - * Added table support for love.graphics.setColor and love.graphics.setBackgroundColor. - * Added love.graphics.hasFocus(). - * Added ?/init.lua to the loader. - - * Fixed the debug module not being an upvalue of the error handlers. (you can now override debug) - * Fixed some cases when love.audio.pause and friends, were acting on everything, not just the passed Source. - * Fixed setFixedRotation enabling other flags. - * Fixed a bug in the loader (for require). - * Fixed ParticleSystem::setSprite not retaining the new image. - * Fixed setMode removing images settings (wrapping, filters). - * Fixed shape:getBody, it's now exposed for LÖVE usage. - * Fixed DistanceJoint:getType() returning "circle" - it now returns "distance". - * Fixed SpriteBatches being unaffected by setColor - * Fixed the audio bug. - * Fixed invalid FSAA values crashing LÖVE. - * Fixed a bunch of compiler warnings. - * Fixed OS X not properly using UTIs for .love files. - * Fixed the modplug decoder not properly handeling files that fail to load. - * Fixed a memory leak in setFont. - * Fixed bug where errors in threads wouldn't get picked up by demand. - * Fixed part of the bug with newlines when scaling text (rotating still messes up the lines). - * Fixed the bug where newImageFont would try to created ImageData out of ImageData. - * Fixed error handler not resetting the blend mode. - - * Changed fonts, they're now po2 safe. - * Changed the traceback in the error screen. - * Changed font origin to top-left. - * Changed linux save dir location to obey to Freedesktop.org's XDG specs. (~/.local/share/love by default.) - - * Removed font functions from love.graphics. - * Removed love.physics.newWorld(w, h). Use love.physics.newWorld(x1, y1, x2, y2) instead. - -LOVE 0.6.2 [Jiggly Juice] -------------------------- - - Released: 2010-03-06 - - * Fixed a bug causing ImageFonts to cut off some pixels. - * Fixed a bug where filled rectangles were too small. - * Fixed a bug in Image:setFilter where it would switch the parameters. - * Fixed a bug in ImageRasterizer where it wasn't using the data. - * Image filter and wrap modes now use string constants as well. - * Fixed double-transform bug in SpriteBatch. - * Errors are reported on stdout again. - * Another fix for the icons on ubuntu. - -LOVE 0.6.1 [Jiggly Juice] -------------------------- - - Released: 2010-02-07 - - * Added Shape:setGroupIndex and getGroupIndex. - * Added Body:setFixedRotation and Body:getFixedRotation. - * Added Body:setInertia. - * Added CircleShape:getLocalCenter and CircleShape:getWorldCenter. - * Added icons and file associations for the debs. - * Added the demos folder to the Mac OS X DMG. - * It's now possible to run a .love from Resources in Mac OS X, thanks to Steve Johnson. - * Fixed a bug with multiple Sources on the same Music. - * Fixed a bug so the mouse doesn't get crippled when the keyboard is disabled. - * Fixed a bug where love.graphics.rectangle drew a too large rectangle. - * Fixed a bug where memory wouldn't be released correctly. - * Fixed epic physics typo (getRestituion->getRestitution). - * Fixed crash on opening non-existent image. - * The error screen redraws when an event occurs. - * The default love.run() now gracefully handles disabled modules. - * The debian packages should now successfully include icons, file associations, etc, and should give the correct architecture. - * Added support for drawing polylines to love.graphics.line - the syntax is the same as love.graphics.polygon. - * Removed Music and Sound. There are now only sources. - * Improved the stability of love.audio/love.sound. - -LOVE 0.6.0 [Jiggly Juice] -------------------------- - - Released: 2009-12-24 - - * Lost track of 0.6.0 changes a long while ago. Don't trust the list below. - - * Added love.graphics.print()/printf(). - * Added unicode-translated parameter to love.keypressed(). - * Added love.event. - * Added love.filesystem.setIdentity(). - * Added OpenAL dependency. - - * Fixed love.fileystem problems with internal \0 in strings. - * Fixed love.filesystem.mkdir/remove not working when write directory not set. - * Fixed position of Window. - - * Changed parameter order of draws(). - * Changed origin for images to top-left. - * Changed love.filesystem.open to accept mode (removed from love.filesystem.newFile). - * Changed love.filesystem.read() which now returns two parameters (data, length). - * Changed love.filesystem.write() which now takes up to four parameters (file, data, length, mode). - * Changed default color mode to "modulate". - * Changed name of love.color_normal to "replace". - * Changed name of love.blend_normal to "alpha". - * Changed the conf file format. - - * Removed Color object. - * Removed Animation. - * Removed several constants. - * Removed love.graphics.draw() for strings. - * Removed love.system. - * Removed SWIG. - * Removed boost. - * Removed SDL_mixer. - - -LOVE 0.5.0 [Salted Nuts] ------------------------- - - Released: 2009-01-02 - - * Added love.joystick. - * Added network support via LuaSocket. - * Added support for loading of appended .love-file. - - * Added love.filesystem.lines(). - * Added a loader function to enable use of normal require(). - * Added love.filesystem.load(). - * Added love.filesystem.getSaveDirectory() - * Added love.filesystem.getWorkingDirectory() - - * Added optional explicit destruction of Box2D objects. - * Added shape:testSegment(). - * Added love.graphics.screenshot() (.bmp only). - * Added default size (12) to font-related functions. - * Added love.graphics.setFont( filename, size ) - * Added love.graphics.setLineStippe and related functions. - * Added love.graphics.setPointSize and related functions. - - * Changed love.filesystem.read() to accept file name. - * Changed love.filesystem.write() to accept file name. - * Changed love.graphics.triangle() to accept CCW and CW ordering. - - * Fixed love.graphics.read adding bogus characters at the end of string. - * Fixed epic swigfusion bug. - * Fixed love.graphics.getFont so it returns nil if no font is present. - * Fixed bug where love.graphics.getBlendMode() always returns blend_normal. - * Fixed bug which caused error screen to be scissored (when enabled). - * Fixed Body:setAngle to accept degrees like everything else. - - * Cleaned up love::File and love_physfs. - * Cleaned up love::Reference so it stores its reference in _G. - -LOVE 0.4.0 [Taco Beam] ----------------------- - - Released: 2008-08-29 - - * Added love.physics. (YES!) - * Added love.audio.setMode(). - * Added love.audio.setChannels(). - * Added love.graphics.polygon(). - * Added love.graphics.setScissor() and love.graphics.getScissor() to handle scissoring the graphical area. - * Fixed missing constants related to image optimization. - * Fixed memory leak related to love::File (thanks amnesiasoft!). - - -LOVE 0.3.2 [Lemony Fresh] -------------------------- - - Released: 2008-07-04 - - * Added love.graphics.rectangle() - * Added love.graphics.setLineWidth() - * Added love.graphics.setLineStyle() - * Added love.graphics.getLineWidth() - * Added love.graphics.getLineStyle() - * Added love.mouse.getPosition() - * Added love.audio_loop - * Added love.timer.getTime() - * Changed love.graphics.quad() to accept CCW and CW ordering. - * Fixed default color mode bug. - * Fixed line width being applied unnecessarily. - * Fixed line width bug related to fullscreen toggle. - * Fixed music not looping. - -LOVE 0.3.1 [Space Meat] ------------------------ - - Released: 2008-06-21 - - * Fixed segfault related to graphics. - * Fixed wait-forever bug related to audio. - * Fixed error reporting not working across modules. - * Fixed bug where games with a trailing "/" would not start. - * Fixed bug which caused love.timer.sleep to delay for (way) too long. - -LOVE 0.3.0 [Mutant Vermin] --------------------------- - - Released: 2008-06-17 - - * Added ParticleSystem. - * Added visual error reporting. - * Added love.system for game control needs. - * Added input grabbing. - * Added functions in love.graphics for display management. - * Added love.graphics.point(). - * Added functions in love.graphics for getting current color, font, etc. - * Added love.filesystem.enumerate() for getting folder contents. - * Added functions for setting the window caption. - * Added version checking. An error occurs if the game is incompatible. - * Fixed print() :) - * Removed all keyboard shortcuts. - * Save folders are now created only if required. - * On Windows, the new save location is %APPDATA%\LOVE\game - -LOVE 0.2.1 [Impending Doom] ---------------------------- - - Released: 2008-03-29 - - * Added many functions in love.filesystem. - * Added a dedicated save-folder for each game. - * Added timer.sleep. - * Added line heights to font objects. - * Added love.graphics.getWidth/getHeight. - * Added scaling and rotation for text. - * Added variable spacing to ImageFont. - * Added support for variable line quality when drawing primitives. - * Added several functions for drawing sections of images. (love.graphics.draws) - * Added image optimization function and padding function. - * Added love.graphics.getWidth/Height. - - * Split devices up into actual SWIG-modules. This means that: - - Functions are used like this: love.graphics.draw, not love.graphics:draw - - love.objects is no more. Objects are created by an appropriate device. - * How you draw primitives has been altered. - * draw(string, x, y, wrap, align) has become drawf(string, x, y, wrap, align) - - * Changed getFps to getFPS. - * Escape is no more ... enter: Alt+F4. - * love.filesystem.include has been renamed to love.filesystem.require. - * ImageFonts now consider the spacing as well as the glyph size. - * Fixed a massive ImageFont bug which resulted in float-positioning failure. - * Fixed a bug when loading fonts where the specified size doesn't represent the true size of the font. - - * Updated DevIL to version 1.6.8-rc2 (Windows) - * Updated FreeType to freetype-2.3.5-1 (Windows) - * Updated Lua to 5.1.3 (Windows) - * Updated SDL to 1.2.13 (Windows) - * Removed boost::filesystem. - -LOVE 0.2.0 [Mini-Moose] ------------------------ - - Released: 2008-02-06 - - * Added ImageFont - * Added Animation - * Added text formatting functions - * Added setCenter for Image and Animation. - * Added methods for rendering of scaled/rotated sprites. - * Added the drawing of basic shapes. - * Added default font and embedded resources. - * Added Ctrl+R for reload. - * Added blending and color modes. - * Fixed memory usage of Graphics. - * Fixed a bug where the set text color would change the color of any images rendered. - * Fixed CWD bug. - * Fixed titlebar. Game title is now displayed. - - -LOVE 0.1.1 [Santa-Power] ------------------------- - - Initial release! - Released: 2008-01-13 - - * Image loading and rendering. - * Sound loading and playing. - * Font loading and rendering. - * Lua-scriptable games. - * Config files. - * Stuff is loadable from archive files. - * Keyboard, mouse, display, timer, etc. (Basic devices). diff --git a/build copy/everhorn-l-windows/everhorn.exe b/build copy/everhorn-l-windows/everhorn.exe deleted file mode 100644 index a828dcc..0000000 Binary files a/build copy/everhorn-l-windows/everhorn.exe and /dev/null differ diff --git a/build copy/everhorn-l-windows/game.ico b/build copy/everhorn-l-windows/game.ico deleted file mode 100644 index ecc5c0d..0000000 Binary files a/build copy/everhorn-l-windows/game.ico and /dev/null differ diff --git a/build copy/everhorn-l-windows/license.txt b/build copy/everhorn-l-windows/license.txt deleted file mode 100644 index 364cb2f..0000000 --- a/build copy/everhorn-l-windows/license.txt +++ /dev/null @@ -1,1172 +0,0 @@ -Licensing information -===================== - -This distribution contains code from the following projects (full license text below): - - - LOVE - Website: https://love2d.org/ - License: zlib - Copyright (c) 2006-2019 LOVE Development Team - - - ENet - Website: http://enet.bespin.org/index.html - License: MIT/Expat - Copyright (c) 2002-2016 Lee Salzman - - - GLAD - Website: http://glad.dav1d.de/ - License: MIT/Expat - Copyright (c) 2013 David Herberth, modified by Alex Szpakowski - - - glslang - Website: https://github.com/KhronosGroup/glslang - License: 3-Clause BSD - Copyright (C) 2002-2005 3Dlabs Inc. Ltd. - Copyright (C) 2013-2016 LunarG, Inc. - - - Kepler Project's lua-compat-5.3 - Website: https://github.com/keplerproject/lua-compat-5.3 - License: MIT/Expat - Copyright (c) 2015 Kepler Project. - - - lua-enet - Website: http://leafo.net/lua-enet/ - License: MIT/Expat - Copyright (C) 2011 by Leaf Corcoran - - - LuaJIT - Website: http://luajit.org/ - License: MIT/Expat - LuaJIT is Copyright (c) 2005-2016 Mike Pall - - - Lua's UTF-8 module - Website: https://www.lua.org/ - License: MIT/Expat - Copyright (C) 1994-2015 Lua.org, PUC-Rio, 2015 LOVE Development Team. - - - LuaSocket - Website: http://w3.impa.br/~diego/software/luasocket/home.html - License: MIT/Expat - Copyright (C) 2004-2013 Diego Nehab - - - LZ4 - Website: https://lz4.github.io/lz4/ - License: 2-Clause BSD - Copyright (C) 2011-2015, Yann Collet. - You can contact the author at : - - LZ4 source repository : https://github.com/Cyan4973/lz4 - - LZ4 public forum : https://groups.google.com/forum/#!forum/lz4c - - - TinyEXR - Website: https://github.com/syoyo/tinyexr - License: 3-Clause BSD - Copyright (c) 2014 - 2016, Syoyo Fujita - - - UTF8-CPP - Website: https://github.com/nemtrif/utfcpp - License: Unknown, MIT/Expat-like (listed as UTF8-CPP) - Copyright 2006 Nemanja Trifunovic - - - xxHash - Website: https://cyan4973.github.io/xxHash/ - License: 2-Clause BSD - Copyright (C) 2012-2016, Yann Collet. - You can contact the author at : - - xxHash source repository : https://github.com/Cyan4973/xxHash - - - dr_flac - Website: https://github.com/mackron/dr_libs - Source download: https://github.com/mackron/dr_libs/blob/41bc0e8/dr_flac.h - License: MIT/Expat - Copyright 2018 David Reid - - - libmpg123 - Website: http://www.mpg123.de/ - Source download: http://sourceforge.net/projects/mpg123/files/latest/download - License: LGPL 2.1 - Copyright (c) 1995-2013 by Michael Hipp and others, free software under the terms of the LGPL v2.1 - Detailed information from the debian project: - Copyright 1995-2016 by the mpg123 project - Copyright 2009-2011 by Malcolm Boczek - Copyright 2008 Christian Weisgerber - Copyright 2006-2007 by Zuxy Meng - Copyright 2000-2002 David Olofson - Copyright 1998 Fabrice Bellard - Copyright 1997 Mikko Tommila - - - OpenAL Soft - Website: http://kcat.strangesoft.net/openal.html - Source download: http://kcat.strangesoft.net/openal.html#download - License: Mixed, licensing information obtained from the debian project - - Alc/backends/opensl.c - License: Apache 2.0 - Copyright 2011 The Android Open Source Project - - examples/alhrtf.c examples/allatency.c examples/alloopback.c examples/alreverb.c examples/alstream.c examples/altonegen.c examples/common/alhelpers.c examples/common/sdl_sound.c utils/openal-info.c - License: MIT/Expat - Copyright © 2010, 2015 Chris Robinson - - examples/alffplay.c - License: unclear, presumed LGPL 2.1 or higher - Copyright © 2003 Fabrice Bellard - Copyright © Martin Bohme - - Alc/bs2b.c OpenAL32/Include/bs2b.h - License: MIT/Expat - Copyright 2005 by Boris Mikhaylov - - cmake/FindALSA.cmake cmake/FindFFmpeg.cmake cmake/FindJACK.cmake cmake/FindSDL2.cmake - License: 3-Clause BSD - Copyright © 2006 Matthias Kretz - Copyright © 2008 Alexander Neundorf - Copyright © 2003-2011 Kitware, Inc. - Copyright © 2009-2011 Philip Lowman - Copyright © 2011 Michael Jansen - Copyright © 2012 Benjamin Eikel - - utils/makehrtf.c (not included in distribution) - License: GPL 2 or higher (2 listed below) - Copyright 2011-2014 Christopher Fitzgerald - - Everything else: - License: LGPL 2.0 or higher (2.1 listed below) - Copyright © 1999-2014 the OpenAL team - Copyright © 2008-2015 Christopher Fitzgerald - Copyright © 2009-2015 Chris Robinson - Copyright © 2013 Anis A. Hireche - Copyright © 2013 Nasca Octavian Paul - Copyright © 2013 Mike Gorchak - Copyright © 2014 Timothy Arceri - -License text -============ - -zlib license - This software is provided 'as-is', without any express or implied - warranty. In no event will the authors be held liable for any damages - arising from the use of this software. - - Permission is granted to anyone to use this software for any purpose, - including commercial applications, and to alter it and redistribute it - freely, subject to the following restrictions: - - 1. The origin of this software must not be misrepresented you must not - claim that you wrote the original software. If you use this software - in a product, an acknowledgment in the product documentation would be - appreciated but is not required. - - 2. Altered source versions must be plainly marked as such, and must not be - misrepresented as being the original software. - - 3. This notice may not be removed or altered from any source - distribution. - -MIT/Expat - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - -3-Clause BSD - All rights reserved. - - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions - are met: - - Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - - Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following - disclaimer in the documentation and/or other materials provided - with the distribution. - - Neither the name of 3Dlabs Inc. Ltd. nor the names of its - contributors may be used to endorse or promote products derived - from this software without specific prior written permission. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS - FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE - COPYRIGHT HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, - INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, - BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES - LOSS OF USE, DATA, OR PROFITS OR BUSINESS INTERRUPTION) HOWEVER - CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN - ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE - POSSIBILITY OF SUCH DAMAGE. - -2-Clause BSD - Redistribution and use in source and binary forms, with or without - modification, are permitted provided that the following conditions are - met: - - * Redistributions of source code must retain the above copyright - notice, this list of conditions and the following disclaimer. - * Redistributions in binary form must reproduce the above - copyright notice, this list of conditions and the following disclaimer - in the documentation and/or other materials provided with the - distribution. - - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS - "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT - OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT - LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES LOSS OF USE, - DATA, OR PROFITS OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY - THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT - (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE - OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -UTF8-CPP - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - -LGPL 2.1 - GNU LESSER GENERAL PUBLIC LICENSE - Version 2.1, February 1999 - - Copyright (C) 1991, 1999 Free Software Foundation, Inc. - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - [This is the first released version of the Lesser GPL. It also counts - as the successor of the GNU Library Public License, version 2, hence - the version number 2.1.] - - Preamble - - The licenses for most software are designed to take away your - freedom to share and change it. By contrast, the GNU General Public - Licenses are intended to guarantee your freedom to share and change - free software--to make sure the software is free for all its users. - - This license, the Lesser General Public License, applies to some - specially designated software packages--typically libraries--of the - Free Software Foundation and other authors who decide to use it. You - can use it too, but we suggest you first think carefully about whether - this license or the ordinary General Public License is the better - strategy to use in any particular case, based on the explanations below. - - When we speak of free software, we are referring to freedom of use, - not price. Our General Public Licenses are designed to make sure that - you have the freedom to distribute copies of free software (and charge - for this service if you wish) that you receive source code or can get - it if you want it that you can change the software and use pieces of - it in new free programs and that you are informed that you can do - these things. - - To protect your rights, we need to make restrictions that forbid - distributors to deny you these rights or to ask you to surrender these - rights. These restrictions translate to certain responsibilities for - you if you distribute copies of the library or if you modify it. - - For example, if you distribute copies of the library, whether gratis - or for a fee, you must give the recipients all the rights that we gave - you. You must make sure that they, too, receive or can get the source - code. If you link other code with the library, you must provide - complete object files to the recipients, so that they can relink them - with the library after making changes to the library and recompiling - it. And you must show them these terms so they know their rights. - - We protect your rights with a two-step method: (1) we copyright the - library, and (2) we offer you this license, which gives you legal - permission to copy, distribute and/or modify the library. - - To protect each distributor, we want to make it very clear that - there is no warranty for the free library. Also, if the library is - modified by someone else and passed on, the recipients should know - that what they have is not the original version, so that the original - author's reputation will not be affected by problems that might be - introduced by others. - - Finally, software patents pose a constant threat to the existence of - any free program. We wish to make sure that a company cannot - effectively restrict the users of a free program by obtaining a - restrictive license from a patent holder. Therefore, we insist that - any patent license obtained for a version of the library must be - consistent with the full freedom of use specified in this license. - - Most GNU software, including some libraries, is covered by the - ordinary GNU General Public License. This license, the GNU Lesser - General Public License, applies to certain designated libraries, and - is quite different from the ordinary General Public License. We use - this license for certain libraries in order to permit linking those - libraries into non-free programs. - - When a program is linked with a library, whether statically or using - a shared library, the combination of the two is legally speaking a - combined work, a derivative of the original library. The ordinary - General Public License therefore permits such linking only if the - entire combination fits its criteria of freedom. The Lesser General - Public License permits more lax criteria for linking other code with - the library. - - We call this license the "Lesser" General Public License because it - does Less to protect the user's freedom than the ordinary General - Public License. It also provides other free software developers Less - of an advantage over competing non-free programs. These disadvantages - are the reason we use the ordinary General Public License for many - libraries. However, the Lesser license provides advantages in certain - special circumstances. - - For example, on rare occasions, there may be a special need to - encourage the widest possible use of a certain library, so that it becomes - a de-facto standard. To achieve this, non-free programs must be - allowed to use the library. A more frequent case is that a free - library does the same job as widely used non-free libraries. In this - case, there is little to gain by limiting the free library to free - software only, so we use the Lesser General Public License. - - In other cases, permission to use a particular library in non-free - programs enables a greater number of people to use a large body of - free software. For example, permission to use the GNU C Library in - non-free programs enables many more people to use the whole GNU - operating system, as well as its variant, the GNU/Linux operating - system. - - Although the Lesser General Public License is Less protective of the - users' freedom, it does ensure that the user of a program that is - linked with the Library has the freedom and the wherewithal to run - that program using a modified version of the Library. - - The precise terms and conditions for copying, distribution and - modification follow. Pay close attention to the difference between a - "work based on the library" and a "work that uses the library". The - former contains code derived from the library, whereas the latter must - be combined with the library in order to run. - - GNU LESSER GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License Agreement applies to any software library or other - program which contains a notice placed by the copyright holder or - other authorized party saying it may be distributed under the terms of - this Lesser General Public License (also called "this License"). - Each licensee is addressed as "you". - - A "library" means a collection of software functions and/or data - prepared so as to be conveniently linked with application programs - (which use some of those functions and data) to form executables. - - The "Library", below, refers to any such software library or work - which has been distributed under these terms. A "work based on the - Library" means either the Library or any derivative work under - copyright law: that is to say, a work containing the Library or a - portion of it, either verbatim or with modifications and/or translated - straightforwardly into another language. (Hereinafter, translation is - included without limitation in the term "modification".) - - "Source code" for a work means the preferred form of the work for - making modifications to it. For a library, complete source code means - all the source code for all modules it contains, plus any associated - interface definition files, plus the scripts used to control compilation - and installation of the library. - - Activities other than copying, distribution and modification are not - covered by this License they are outside its scope. The act of - running a program using the Library is not restricted, and output from - such a program is covered only if its contents constitute a work based - on the Library (independent of the use of the Library in a tool for - writing it). Whether that is true depends on what the Library does - and what the program that uses the Library does. - - 1. You may copy and distribute verbatim copies of the Library's - complete source code as you receive it, in any medium, provided that - you conspicuously and appropriately publish on each copy an - appropriate copyright notice and disclaimer of warranty keep intact - all the notices that refer to this License and to the absence of any - warranty and distribute a copy of this License along with the - Library. - - You may charge a fee for the physical act of transferring a copy, - and you may at your option offer warranty protection in exchange for a - fee. - - 2. You may modify your copy or copies of the Library or any portion - of it, thus forming a work based on the Library, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a) The modified work must itself be a software library. - - b) You must cause the files modified to carry prominent notices - stating that you changed the files and the date of any change. - - c) You must cause the whole of the work to be licensed at no - charge to all third parties under the terms of this License. - - d) If a facility in the modified Library refers to a function or a - table of data to be supplied by an application program that uses - the facility, other than as an argument passed when the facility - is invoked, then you must make a good faith effort to ensure that, - in the event an application does not supply such function or - table, the facility still operates, and performs whatever part of - its purpose remains meaningful. - - (For example, a function in a library to compute square roots has - a purpose that is entirely well-defined independent of the - application. Therefore, Subsection 2d requires that any - application-supplied function or table used by this function must - be optional: if the application does not supply it, the square - root function must still compute square roots.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Library, - and can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based - on the Library, the distribution of the whole must be on the terms of - this License, whose permissions for other licensees extend to the - entire whole, and thus to each and every part regardless of who wrote - it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Library. - - In addition, mere aggregation of another work not based on the Library - with the Library (or with a work based on the Library) on a volume of - a storage or distribution medium does not bring the other work under - the scope of this License. - - 3. You may opt to apply the terms of the ordinary GNU General Public - License instead of this License to a given copy of the Library. To do - this, you must alter all the notices that refer to this License, so - that they refer to the ordinary GNU General Public License, version 2, - instead of to this License. (If a newer version than version 2 of the - ordinary GNU General Public License has appeared, then you can specify - that version instead if you wish.) Do not make any other change in - these notices. - - Once this change is made in a given copy, it is irreversible for - that copy, so the ordinary GNU General Public License applies to all - subsequent copies and derivative works made from that copy. - - This option is useful when you wish to copy part of the code of - the Library into a program that is not a library. - - 4. You may copy and distribute the Library (or a portion or - derivative of it, under Section 2) in object code or executable form - under the terms of Sections 1 and 2 above provided that you accompany - it with the complete corresponding machine-readable source code, which - must be distributed under the terms of Sections 1 and 2 above on a - medium customarily used for software interchange. - - If distribution of object code is made by offering access to copy - from a designated place, then offering equivalent access to copy the - source code from the same place satisfies the requirement to - distribute the source code, even though third parties are not - compelled to copy the source along with the object code. - - 5. A program that contains no derivative of any portion of the - Library, but is designed to work with the Library by being compiled or - linked with it, is called a "work that uses the Library". Such a - work, in isolation, is not a derivative work of the Library, and - therefore falls outside the scope of this License. - - However, linking a "work that uses the Library" with the Library - creates an executable that is a derivative of the Library (because it - contains portions of the Library), rather than a "work that uses the - library". The executable is therefore covered by this License. - Section 6 states terms for distribution of such executables. - - When a "work that uses the Library" uses material from a header file - that is part of the Library, the object code for the work may be a - derivative work of the Library even though the source code is not. - Whether this is true is especially significant if the work can be - linked without the Library, or if the work is itself a library. The - threshold for this to be true is not precisely defined by law. - - If such an object file uses only numerical parameters, data - structure layouts and accessors, and small macros and small inline - functions (ten lines or less in length), then the use of the object - file is unrestricted, regardless of whether it is legally a derivative - work. (Executables containing this object code plus portions of the - Library will still fall under Section 6.) - - Otherwise, if the work is a derivative of the Library, you may - distribute the object code for the work under the terms of Section 6. - Any executables containing that work also fall under Section 6, - whether or not they are linked directly with the Library itself. - - 6. As an exception to the Sections above, you may also combine or - link a "work that uses the Library" with the Library to produce a - work containing portions of the Library, and distribute that work - under terms of your choice, provided that the terms permit - modification of the work for the customer's own use and reverse - engineering for debugging such modifications. - - You must give prominent notice with each copy of the work that the - Library is used in it and that the Library and its use are covered by - this License. You must supply a copy of this License. If the work - during execution displays copyright notices, you must include the - copyright notice for the Library among them, as well as a reference - directing the user to the copy of this License. Also, you must do one - of these things: - - a) Accompany the work with the complete corresponding - machine-readable source code for the Library including whatever - changes were used in the work (which must be distributed under - Sections 1 and 2 above) and, if the work is an executable linked - with the Library, with the complete machine-readable "work that - uses the Library", as object code and/or source code, so that the - user can modify the Library and then relink to produce a modified - executable containing the modified Library. (It is understood - that the user who changes the contents of definitions files in the - Library will not necessarily be able to recompile the application - to use the modified definitions.) - - b) Use a suitable shared library mechanism for linking with the - Library. A suitable mechanism is one that (1) uses at run time a - copy of the library already present on the user's computer system, - rather than copying library functions into the executable, and (2) - will operate properly with a modified version of the library, if - the user installs one, as long as the modified version is - interface-compatible with the version that the work was made with. - - c) Accompany the work with a written offer, valid for at - least three years, to give the same user the materials - specified in Subsection 6a, above, for a charge no more - than the cost of performing this distribution. - - d) If distribution of the work is made by offering access to copy - from a designated place, offer equivalent access to copy the above - specified materials from the same place. - - e) Verify that the user has already received a copy of these - materials or that you have already sent this user a copy. - - For an executable, the required form of the "work that uses the - Library" must include any data and utility programs needed for - reproducing the executable from it. However, as a special exception, - the materials to be distributed need not include anything that is - normally distributed (in either source or binary form) with the major - components (compiler, kernel, and so on) of the operating system on - which the executable runs, unless that component itself accompanies - the executable. - - It may happen that this requirement contradicts the license - restrictions of other proprietary libraries that do not normally - accompany the operating system. Such a contradiction means you cannot - use both them and the Library together in an executable that you - distribute. - - 7. You may place library facilities that are a work based on the - Library side-by-side in a single library together with other library - facilities not covered by this License, and distribute such a combined - library, provided that the separate distribution of the work based on - the Library and of the other library facilities is otherwise - permitted, and provided that you do these two things: - - a) Accompany the combined library with a copy of the same work - based on the Library, uncombined with any other library - facilities. This must be distributed under the terms of the - Sections above. - - b) Give prominent notice with the combined library of the fact - that part of it is a work based on the Library, and explaining - where to find the accompanying uncombined form of the same work. - - 8. You may not copy, modify, sublicense, link with, or distribute - the Library except as expressly provided under this License. Any - attempt otherwise to copy, modify, sublicense, link with, or - distribute the Library is void, and will automatically terminate your - rights under this License. However, parties who have received copies, - or rights, from you under this License will not have their licenses - terminated so long as such parties remain in full compliance. - - 9. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Library or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Library (or any work based on the - Library), you indicate your acceptance of this License to do so, and - all its terms and conditions for copying, distributing or modifying - the Library or works based on it. - - 10. Each time you redistribute the Library (or any work based on the - Library), the recipient automatically receives a license from the - original licensor to copy, distribute, link with or modify the Library - subject to these terms and conditions. You may not impose any further - restrictions on the recipients' exercise of the rights granted herein. - You are not responsible for enforcing compliance by third parties with - this License. - - 11. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot - distribute so as to satisfy simultaneously your obligations under this - License and any other pertinent obligations, then as a consequence you - may not distribute the Library at all. For example, if a patent - license would not permit royalty-free redistribution of the Library by - all those who receive copies directly or indirectly through you, then - the only way you could satisfy both it and this License would be to - refrain entirely from distribution of the Library. - - If any portion of this section is held invalid or unenforceable under any - particular circumstance, the balance of the section is intended to apply, - and the section as a whole is intended to apply in other circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims this section has the sole purpose of protecting the - integrity of the free software distribution system which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system it is up to the author/donor to decide if he or she is willing - to distribute software through any other system and a licensee cannot - impose that choice. - - This section is intended to make thoroughly clear what is believed to - be a consequence of the rest of this License. - - 12. If the distribution and/or use of the Library is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Library under this License may add - an explicit geographical distribution limitation excluding those countries, - so that distribution is permitted only in or among countries not thus - excluded. In such case, this License incorporates the limitation as if - written in the body of this License. - - 13. The Free Software Foundation may publish revised and/or new - versions of the Lesser General Public License from time to time. - Such new versions will be similar in spirit to the present version, - but may differ in detail to address new problems or concerns. - - Each version is given a distinguishing version number. If the Library - specifies a version number of this License which applies to it and - "any later version", you have the option of following the terms and - conditions either of that version or of any later version published by - the Free Software Foundation. If the Library does not specify a - license version number, you may choose any version ever published by - the Free Software Foundation. - - 14. If you wish to incorporate parts of the Library into other free - programs whose distribution conditions are incompatible with these, - write to the author to ask for permission. For software which is - copyrighted by the Free Software Foundation, write to the Free - Software Foundation we sometimes make exceptions for this. Our - decision will be guided by the two goals of preserving the free status - of all derivatives of our free software and of promoting the sharing - and reuse of software generally. - - NO WARRANTY - - 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO - WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. - EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR - OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY - KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE - IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR - PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE - LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME - THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. - - 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN - WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY - AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU - FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR - CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE - LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING - RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A - FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF - SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH - DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Libraries - - If you develop a new library, and you want it to be of the greatest - possible use to the public, we recommend making it free software that - everyone can redistribute and change. You can do so by permitting - redistribution under these terms (or, alternatively, under the terms of the - ordinary General Public License). - - To apply these terms, attach the following notices to the library. It is - safest to attach them to the start of each source file to most effectively - convey the exclusion of warranty and each file should have at least the - "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This library is free software you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public - License as published by the Free Software Foundation either - version 2.1 of the License, or (at your option) any later version. - - This library is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public - License along with this library if not, write to the Free Software - Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - - Also add information on how to contact you by electronic and paper mail. - - You should also get your employer (if you work as a programmer) or your - school, if any, to sign a "copyright disclaimer" for the library, if - necessary. Here is a sample alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the - library `Frob' (a library for tweaking knobs) written by James Random Hacker. - - , 1 April 1990 - Ty Coon, President of Vice - - That's all there is to it! - -GPL 2 - GNU GENERAL PUBLIC LICENSE - Version 2, June 1991 - - Copyright (C) 1989, 1991 Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA - Everyone is permitted to copy and distribute verbatim copies - of this license document, but changing it is not allowed. - - Preamble - - The licenses for most software are designed to take away your - freedom to share and change it. By contrast, the GNU General Public - License is intended to guarantee your freedom to share and change free - software--to make sure the software is free for all its users. This - General Public License applies to most of the Free Software - Foundation's software and to any other program whose authors commit to - using it. (Some other Free Software Foundation software is covered by - the GNU Lesser General Public License instead.) You can apply it to - your programs, too. - - When we speak of free software, we are referring to freedom, not - price. Our General Public Licenses are designed to make sure that you - have the freedom to distribute copies of free software (and charge for - this service if you wish), that you receive source code or can get it - if you want it, that you can change the software or use pieces of it - in new free programs and that you know you can do these things. - - To protect your rights, we need to make restrictions that forbid - anyone to deny you these rights or to ask you to surrender the rights. - These restrictions translate to certain responsibilities for you if you - distribute copies of the software, or if you modify it. - - For example, if you distribute copies of such a program, whether - gratis or for a fee, you must give the recipients all the rights that - you have. You must make sure that they, too, receive or can get the - source code. And you must show them these terms so they know their - rights. - - We protect your rights with two steps: (1) copyright the software, and - (2) offer you this license which gives you legal permission to copy, - distribute and/or modify the software. - - Also, for each author's protection and ours, we want to make certain - that everyone understands that there is no warranty for this free - software. If the software is modified by someone else and passed on, we - want its recipients to know that what they have is not the original, so - that any problems introduced by others will not reflect on the original - authors' reputations. - - Finally, any free program is threatened constantly by software - patents. We wish to avoid the danger that redistributors of a free - program will individually obtain patent licenses, in effect making the - program proprietary. To prevent this, we have made it clear that any - patent must be licensed for everyone's free use or not licensed at all. - - The precise terms and conditions for copying, distribution and - modification follow. - - GNU GENERAL PUBLIC LICENSE - TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION - - 0. This License applies to any program or other work which contains - a notice placed by the copyright holder saying it may be distributed - under the terms of this General Public License. The "Program", below, - refers to any such program or work, and a "work based on the Program" - means either the Program or any derivative work under copyright law: - that is to say, a work containing the Program or a portion of it, - either verbatim or with modifications and/or translated into another - language. (Hereinafter, translation is included without limitation in - the term "modification".) Each licensee is addressed as "you". - - Activities other than copying, distribution and modification are not - covered by this License they are outside its scope. The act of - running the Program is not restricted, and the output from the Program - is covered only if its contents constitute a work based on the - Program (independent of having been made by running the Program). - Whether that is true depends on what the Program does. - - 1. You may copy and distribute verbatim copies of the Program's - source code as you receive it, in any medium, provided that you - conspicuously and appropriately publish on each copy an appropriate - copyright notice and disclaimer of warranty keep intact all the - notices that refer to this License and to the absence of any warranty - and give any other recipients of the Program a copy of this License - along with the Program. - - You may charge a fee for the physical act of transferring a copy, and - you may at your option offer warranty protection in exchange for a fee. - - 2. You may modify your copy or copies of the Program or any portion - of it, thus forming a work based on the Program, and copy and - distribute such modifications or work under the terms of Section 1 - above, provided that you also meet all of these conditions: - - a) You must cause the modified files to carry prominent notices - stating that you changed the files and the date of any change. - - b) You must cause any work that you distribute or publish, that in - whole or in part contains or is derived from the Program or any - part thereof, to be licensed as a whole at no charge to all third - parties under the terms of this License. - - c) If the modified program normally reads commands interactively - when run, you must cause it, when started running for such - interactive use in the most ordinary way, to print or display an - announcement including an appropriate copyright notice and a - notice that there is no warranty (or else, saying that you provide - a warranty) and that users may redistribute the program under - these conditions, and telling the user how to view a copy of this - License. (Exception: if the Program itself is interactive but - does not normally print such an announcement, your work based on - the Program is not required to print an announcement.) - - These requirements apply to the modified work as a whole. If - identifiable sections of that work are not derived from the Program, - and can be reasonably considered independent and separate works in - themselves, then this License, and its terms, do not apply to those - sections when you distribute them as separate works. But when you - distribute the same sections as part of a whole which is a work based - on the Program, the distribution of the whole must be on the terms of - this License, whose permissions for other licensees extend to the - entire whole, and thus to each and every part regardless of who wrote it. - - Thus, it is not the intent of this section to claim rights or contest - your rights to work written entirely by you rather, the intent is to - exercise the right to control the distribution of derivative or - collective works based on the Program. - - In addition, mere aggregation of another work not based on the Program - with the Program (or with a work based on the Program) on a volume of - a storage or distribution medium does not bring the other work under - the scope of this License. - - 3. You may copy and distribute the Program (or a work based on it, - under Section 2) in object code or executable form under the terms of - Sections 1 and 2 above provided that you also do one of the following: - - a) Accompany it with the complete corresponding machine-readable - source code, which must be distributed under the terms of Sections - 1 and 2 above on a medium customarily used for software interchange or, - - b) Accompany it with a written offer, valid for at least three - years, to give any third party, for a charge no more than your - cost of physically performing source distribution, a complete - machine-readable copy of the corresponding source code, to be - distributed under the terms of Sections 1 and 2 above on a medium - customarily used for software interchange or, - - c) Accompany it with the information you received as to the offer - to distribute corresponding source code. (This alternative is - allowed only for noncommercial distribution and only if you - received the program in object code or executable form with such - an offer, in accord with Subsection b above.) - - The source code for a work means the preferred form of the work for - making modifications to it. For an executable work, complete source - code means all the source code for all modules it contains, plus any - associated interface definition files, plus the scripts used to - control compilation and installation of the executable. However, as a - special exception, the source code distributed need not include - anything that is normally distributed (in either source or binary - form) with the major components (compiler, kernel, and so on) of the - operating system on which the executable runs, unless that component - itself accompanies the executable. - - If distribution of executable or object code is made by offering - access to copy from a designated place, then offering equivalent - access to copy the source code from the same place counts as - distribution of the source code, even though third parties are not - compelled to copy the source along with the object code. - - 4. You may not copy, modify, sublicense, or distribute the Program - except as expressly provided under this License. Any attempt - otherwise to copy, modify, sublicense or distribute the Program is - void, and will automatically terminate your rights under this License. - However, parties who have received copies, or rights, from you under - this License will not have their licenses terminated so long as such - parties remain in full compliance. - - 5. You are not required to accept this License, since you have not - signed it. However, nothing else grants you permission to modify or - distribute the Program or its derivative works. These actions are - prohibited by law if you do not accept this License. Therefore, by - modifying or distributing the Program (or any work based on the - Program), you indicate your acceptance of this License to do so, and - all its terms and conditions for copying, distributing or modifying - the Program or works based on it. - - 6. Each time you redistribute the Program (or any work based on the - Program), the recipient automatically receives a license from the - original licensor to copy, distribute or modify the Program subject to - these terms and conditions. You may not impose any further - restrictions on the recipients' exercise of the rights granted herein. - You are not responsible for enforcing compliance by third parties to - this License. - - 7. If, as a consequence of a court judgment or allegation of patent - infringement or for any other reason (not limited to patent issues), - conditions are imposed on you (whether by court order, agreement or - otherwise) that contradict the conditions of this License, they do not - excuse you from the conditions of this License. If you cannot - distribute so as to satisfy simultaneously your obligations under this - License and any other pertinent obligations, then as a consequence you - may not distribute the Program at all. For example, if a patent - license would not permit royalty-free redistribution of the Program by - all those who receive copies directly or indirectly through you, then - the only way you could satisfy both it and this License would be to - refrain entirely from distribution of the Program. - - If any portion of this section is held invalid or unenforceable under - any particular circumstance, the balance of the section is intended to - apply and the section as a whole is intended to apply in other - circumstances. - - It is not the purpose of this section to induce you to infringe any - patents or other property right claims or to contest validity of any - such claims this section has the sole purpose of protecting the - integrity of the free software distribution system, which is - implemented by public license practices. Many people have made - generous contributions to the wide range of software distributed - through that system in reliance on consistent application of that - system it is up to the author/donor to decide if he or she is willing - to distribute software through any other system and a licensee cannot - impose that choice. - - This section is intended to make thoroughly clear what is believed to - be a consequence of the rest of this License. - - 8. If the distribution and/or use of the Program is restricted in - certain countries either by patents or by copyrighted interfaces, the - original copyright holder who places the Program under this License - may add an explicit geographical distribution limitation excluding - those countries, so that distribution is permitted only in or among - countries not thus excluded. In such case, this License incorporates - the limitation as if written in the body of this License. - - 9. The Free Software Foundation may publish revised and/or new versions - of the General Public License from time to time. Such new versions will - be similar in spirit to the present version, but may differ in detail to - address new problems or concerns. - - Each version is given a distinguishing version number. If the Program - specifies a version number of this License which applies to it and "any - later version", you have the option of following the terms and conditions - either of that version or of any later version published by the Free - Software Foundation. If the Program does not specify a version number of - this License, you may choose any version ever published by the Free Software - Foundation. - - 10. If you wish to incorporate parts of the Program into other free - programs whose distribution conditions are different, write to the author - to ask for permission. For software which is copyrighted by the Free - Software Foundation, write to the Free Software Foundation we sometimes - make exceptions for this. Our decision will be guided by the two goals - of preserving the free status of all derivatives of our free software and - of promoting the sharing and reuse of software generally. - - NO WARRANTY - - 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY - FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN - OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES - PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED - OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS - TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE - PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, - REPAIR OR CORRECTION. - - 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING - WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR - REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, - INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING - OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED - TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY - YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER - PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE - POSSIBILITY OF SUCH DAMAGES. - - END OF TERMS AND CONDITIONS - - How to Apply These Terms to Your New Programs - - If you develop a new program, and you want it to be of the greatest - possible use to the public, the best way to achieve this is to make it - free software which everyone can redistribute and change under these terms. - - To do so, attach the following notices to the program. It is safest - to attach them to the start of each source file to most effectively - convey the exclusion of warranty and each file should have at least - the "copyright" line and a pointer to where the full notice is found. - - - Copyright (C) - - This program is free software you can redistribute it and/or modify - it under the terms of the GNU General Public License as published by - the Free Software Foundation either version 2 of the License, or - (at your option) any later version. - - This program is distributed in the hope that it will be useful, - but WITHOUT ANY WARRANTY without even the implied warranty of - MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - GNU General Public License for more details. - - You should have received a copy of the GNU General Public License along - with this program if not, write to the Free Software Foundation, Inc., - 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - - Also add information on how to contact you by electronic and paper mail. - - If the program is interactive, make it output a short notice like this - when it starts in an interactive mode: - - Gnomovision version 69, Copyright (C) year name of author - Gnomovision comes with ABSOLUTELY NO WARRANTY for details type `show w'. - This is free software, and you are welcome to redistribute it - under certain conditions type `show c' for details. - - The hypothetical commands `show w' and `show c' should show the appropriate - parts of the General Public License. Of course, the commands you use may - be called something other than `show w' and `show c' they could even be - mouse-clicks or menu items--whatever suits your program. - - You should also get your employer (if you work as a programmer) or your - school, if any, to sign a "copyright disclaimer" for the program, if - necessary. Here is a sample alter the names: - - Yoyodyne, Inc., hereby disclaims all copyright interest in the program - `Gnomovision' (which makes passes at compilers) written by James Hacker. - - , 1 April 1989 - Ty Coon, President of Vice - - This General Public License does not permit incorporating your program into - proprietary programs. If your program is a subroutine library, you may - consider it more useful to permit linking proprietary applications with the - library. If this is what you want to do, use the GNU Lesser General - Public License instead of this License. - -Apache 2.0 - Apache License - - Version 2.0, January 2004 - - http://www.apache.org/licenses/ - - TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION - - 1. Definitions. - - "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. - - "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. - - "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. - - "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. - - "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. - - "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. - - "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). - - "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. - - "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." - - "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. - - 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. - - 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. - - 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: - - You must give any other recipients of the Work or Derivative Works a copy of this License and - You must cause any modified files to carry prominent notices stating that You changed the files and - You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works and - If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works within the Source form or documentation, if provided along with the Derivative Works or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. - - You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. - - 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. - - 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. - - 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. - - 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. - - 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. - - END OF TERMS AND CONDITIONS - APPENDIX: How to apply the Apache License to your work - - To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. - - Copyright [yyyy] [name of copyright owner] - - Licensed under the Apache License, Version 2.0 (the "License") - you may not use this file except in compliance with the License. - You may obtain a copy of the License at - - http://www.apache.org/licenses/LICENSE-2.0 - - Unless required by applicable law or agreed to in writing, software - distributed under the License is distributed on an "AS IS" BASIS, - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - See the License for the specific language governing permissions and - limitations under the License. diff --git a/build copy/everhorn-l-windows/love.dll b/build copy/everhorn-l-windows/love.dll deleted file mode 100644 index aee80b3..0000000 Binary files a/build copy/everhorn-l-windows/love.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/love.ico b/build copy/everhorn-l-windows/love.ico deleted file mode 100644 index b703c98..0000000 Binary files a/build copy/everhorn-l-windows/love.ico and /dev/null differ diff --git a/build copy/everhorn-l-windows/lua51.dll b/build copy/everhorn-l-windows/lua51.dll deleted file mode 100644 index 14b5a97..0000000 Binary files a/build copy/everhorn-l-windows/lua51.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/mpg123.dll b/build copy/everhorn-l-windows/mpg123.dll deleted file mode 100644 index c706e10..0000000 Binary files a/build copy/everhorn-l-windows/mpg123.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/msvcp120.dll b/build copy/everhorn-l-windows/msvcp120.dll deleted file mode 100644 index a237d2d..0000000 Binary files a/build copy/everhorn-l-windows/msvcp120.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/msvcr120.dll b/build copy/everhorn-l-windows/msvcr120.dll deleted file mode 100644 index 8c36149..0000000 Binary files a/build copy/everhorn-l-windows/msvcr120.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/nfd.dll b/build copy/everhorn-l-windows/nfd.dll deleted file mode 100644 index fb620f0..0000000 Binary files a/build copy/everhorn-l-windows/nfd.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/nuklear.dll b/build copy/everhorn-l-windows/nuklear.dll deleted file mode 100644 index 079d58c..0000000 Binary files a/build copy/everhorn-l-windows/nuklear.dll and /dev/null differ diff --git a/build copy/everhorn-l-windows/readme.txt b/build copy/everhorn-l-windows/readme.txt deleted file mode 100644 index 1e7ab04..0000000 --- a/build copy/everhorn-l-windows/readme.txt +++ /dev/null @@ -1,98 +0,0 @@ -LÖVE is an *awesome* framework you can use to make 2D games in Lua. It's free, open-source, and works on Windows, Mac OS X, Linux, Android, and iOS. - -[![Build Status: Windows](https://ci.appveyor.com/api/projects/status/u1a69u5o5ej1pus4?svg=true)](https://ci.appveyor.com/project/AlexSzpakowski/love) - -Documentation -------------- - -We use our [wiki][wiki] for documentation. -If you need further help, feel free to ask on our [forums][forums], our [Discord server][discord], or our IRC channel [#love on OFTC][irc]. - -Compilation ------------ - -### Windows -Follow the instructions at the [megasource][megasource] repository page. - -### *nix -Run `platform/unix/automagic` from the repository root, then run ./configure and make. - - $ platform/unix/automagic - $ ./configure - $ make - -When using a source release, automagic has already been run, and the first step can be skipped. - -### macOS -Download the required frameworks from [here][dependencies] and place them in `/Library/Frameworks/`. - -Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-macosx` target. - -### iOS -Download the `ios-libraries` zip file corresponding to the LÖVE version being used from [here][dependencies-ios], -unzip it, and place the `include` and `libraries` subfolders into LÖVE's `platform/xcode/ios` folder. - -Then use the Xcode project found at `platform/xcode/love.xcodeproj` to build the `love-ios` target. - -See `readme-iOS.rtf` for more information. - -### Android -Visit the [Android build repository][android-repository] for build instructions. - -Repository information ----------------------- - -We use the 'default' branch for development, and therefore it should not be considered stable. -Also used is the 'minor' branch, which is used for features in the next minor version and it is -not our development target (which would be the next revision - version numbers are formatted major.minor.revision.) - -We tag all our releases (since we started using mercurial), and have binary downloads available for them. - -Experimental changes are developed in the separate [love-experiments][love-experiments] repository. - -Contributing ------------- - -The best places to contribute are through the Bitbucket issue tracker and the official Discord server or IRC channel. -For code contributions, pull requests and patches are welcome. Be sure to read the [source code style guide][codestyle]. - -Builds ------- - -Releases are found in the 'downloads' section on bitbucket, are linked on [the site][site], -and there's a ppa for ubuntu, [ppa:bartbes/love-stable][stableppa]. - -There are also unstable/nightly builds: - -- Most can be found [here][builds]. -- For ubuntu linux they are in [ppa:bartbes/love-unstable][unstableppa] -- For arch linux there's [love-hg][aur] in the AUR. - -Dependencies ------------- - -- SDL2 -- OpenGL 2.1+ / OpenGL ES 2+ -- OpenAL -- Lua / LuaJIT / LLVM-lua -- FreeType -- ModPlug -- mpg123 -- Vorbisfile -- Theora - -[site]: http://love2d.org -[wiki]: http://love2d.org/wiki -[forums]: http://love2d.org/forums -[discord]: https://discord.gg/rhUets9 -[irc]: irc://irc.oftc.net/love -[dependencies]: http://love2d.org/sdk -[dependencies-ios]: https://bitbucket.org/rude/love/downloads/ -[megasource]: https://bitbucket.org/rude/megasource -[builds]: http://love2d.org/builds -[stableppa]: https://launchpad.net/~bartbes/+archive/love-stable -[unstableppa]: https://launchpad.net/~bartbes/+archive/love-unstable -[aur]: http://aur.archlinux.org/packages/love-hg -[love-experiments]: https://bitbucket.org/bartbes/love-experiments -[codestyle]: https://love2d.org/wiki/Code_Style -[android-repository]: https://bitbucket.org/MartinFelis/love-android-sdl2 diff --git a/build copy/everhorn.love b/build copy/everhorn.love deleted file mode 100644 index a72dbd9..0000000 Binary files a/build copy/everhorn.love and /dev/null differ diff --git a/build copy/src/autotiles.lua b/build copy/src/autotiles.lua deleted file mode 100644 index 2523734..0000000 --- a/build copy/src/autotiles.lua +++ /dev/null @@ -1,119 +0,0 @@ --- 8 ---2 O 1 --- 4 - -autotiles = { - -- snow - [1] = { - [0] = 32, - [1] = 52, - [2] = 54, - [3] = 53, - [4] = 39, - [5] = 33, - [6] = 35, - [7] = 34, - [8] = 55, - [9] = 49, - [10] = 51, - [11] = 50, - [12] = 48, - [13] = 36, - [14] = 38, - [15] = 37, - -- indexes beyond 15 can be used to allow connecting to extra tiles - [16] = 72, - }, - -- ice - [2] = { - [0] = 117, - [1] = 114, - [2] = 116, - [3] = 115, - [4] = 69, - [5] = 66, - [6] = 68, - [7] = 67, - [8] = 101, - [9] = 98, - [10] = 100, - [11] = 99, - [12] = 85, - [13] = 82, - [14] = 84, - [15] = 83, - }, - -- bg dirt (simplistic - only corner tiles are used) - [3] = { - [0] = 40, - [1] = 40, - [2] = 40, - [3] = 40, - [4] = 40, - [5] = 58, - [6] = 57, - [7] = 40, - [8] = 40, - [9] = 42, - [10] = 41, - [11] = 40, - [12] = 40, - [13] = 40, - [14] = 40, - [15] = 40, - -- extra - [16] = 16, - [17] = 56, - [18] = 88, - [19] = 103, - [20] = 104, - }, -} - -autotilet, autotilet_strict = {}, {} --- n => autotile n belongs to, if any --- strict excludes extra autotiles (>=16) - -for k, auto in ipairs(autotiles) do - for nb, n in pairs(auto) do - autotilet[n] = k - if nb >= 0 and nb < 16 then - autotilet_strict[n] = k - end - end -end - -local function isAutotile(room, i, j, strict) - if i >= 0 and i < room.w and j >= 0 and j < room.h then - local t = strict and autotilet_strict or autotilet - return t[room.data[i][j]] - else - return 0 -- out-of-bounds is considered autotile 0, which connects to any other autotile - end -end - -local function b1(b) -- converts truthy to 1, falsy to 0 - return b and 1 or 0 -end - -local function matches(x, k) - return x == 0 and true or x == k -end - -function autotile(room, i, j, k) - if k and k == isAutotile(room, i, j, true) then - local nb = b1(matches(isAutotile(room, i + 1, j), k)) - + b1(matches(isAutotile(room, i - 1, j), k)) * 2 - + b1(matches(isAutotile(room, i, j + 1), k)) * 4 - + b1(matches(isAutotile(room, i, j - 1), k)) * 8 - room.data[i][j] = autotiles[k][nb] - end -end - -function autotileWithNeighbors(room, i, j, k) - autotile(room, i, j, k) - autotile(room, i + 1, j, k) - autotile(room, i - 1, j, k) - autotile(room, i, j + 1, k) - autotile(room, i, j - 1, k) -end diff --git a/build copy/src/checkmark.png b/build copy/src/checkmark.png deleted file mode 100644 index a587fa7..0000000 Binary files a/build copy/src/checkmark.png and /dev/null differ diff --git a/build copy/src/conf.lua b/build copy/src/conf.lua deleted file mode 100644 index 9949538..0000000 --- a/build copy/src/conf.lua +++ /dev/null @@ -1,6 +0,0 @@ -function love.conf(t) - t.window.title = "Everhorn" - t.window.width = 1280 - t.window.height = 720 - t.window.resizable = true -end diff --git a/build copy/src/filedialog.lua b/build copy/src/filedialog.lua deleted file mode 100644 index b89f330..0000000 --- a/build copy/src/filedialog.lua +++ /dev/null @@ -1,15 +0,0 @@ -local filedialog = {} - -local nfd = require 'nfd' - -function filedialog.open() - local r = nfd.open("p8") - print(r) - return r -end - -function filedialog.save() - return nfd.save("p8") -end - -return filedialog diff --git a/build copy/src/fileio.lua b/build copy/src/fileio.lua deleted file mode 100644 index 423c39c..0000000 --- a/build copy/src/fileio.lua +++ /dev/null @@ -1,364 +0,0 @@ --- functions to read lines correctly for \r\n line endings - -local function cr_lines(s) - return s:gsub('\r\n?', '\n'):gmatch('(.-)\n') -end - -local function cr_file_lines(file) - local s = file:read('*a') - if s:sub(#s, #s) ~= "\n" then - s = s .. "\n" - end - return cr_lines(s) -end - --- file handling - -function loadpico8(filename) - love.graphics.setDefaultFilter("nearest", "nearest") - - local file, err = io.open(filename, "rb") - - local data = {} - - data.palette = { - {0, 0, 0, 255}, - {29, 43, 83, 255}, - {126,37, 83, 255}, - {0, 135,81, 255}, - {171,82, 54, 255}, - {95, 87, 79, 255}, - {194,195,199,255}, - {255,241,232,255}, - {255,0, 77, 255}, - {255,163,0, 255}, - {255,240,36, 255}, - {0, 231,86, 255}, - {41, 173,255,255}, - {131,118,156,255}, - {255,119,168,255}, - {255,204,170,255} - } - - local sections = {} - local cursec = nil - for line in cr_file_lines(file) do - local sec = string.match(line, "^__(%a+)__$") - if sec then - cursec = sec - sections[sec] = {} - elseif cursec then - table.insert(sections[cursec], line) - end - end - file:close() - local p8font=love.image.newImageData("pico-8_font.png") - local function toGrey(x,y,r,g,b,a) - return r*194/255,g*195/255,b*199/255,a - end - p8fontGrey=love.image.newImageData(p8font:getWidth(),p8font:getHeight(),p8font:getFormat(),p8font) - p8fontGrey:mapPixel(toGrey) - local function get_font_quad(digit) - if digit<10 then - return 8*digit,24,4,8 - else - return 8*(digit-9),48,4,8 - end - end - local spritesheet_data = love.image.newImageData(128, 128) - for j = 0, spritesheet_data:getHeight() - 1 do - local line = sections["gfx"] and sections["gfx"][j + 1] or "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - for i = 0, spritesheet_data:getWidth() - 1 do - local s = string.sub(line, 1 + i, 1 + i) - local b = fromhex(s) - local c = data.palette[b + 1] - spritesheet_data:setPixel(i, j, c[1]/255, c[2]/255, c[3]/255, 1) - end - end - - for j =8,15 do - for i = 0, 15 do - local id=i+16*(j-8) - local d1=math.floor(id/16) - local d2=id%16 - --spritesheet_data:paste(p8font,8*i,8*j,get_font_quad(d1)) - spritesheet_data:paste(p8fontGrey,8*i,8*j,get_font_quad(d1)) - spritesheet_data:paste(p8font,8*i+4,8*j,get_font_quad(d2)) - end - end - - data.spritesheet = love.graphics.newImage(spritesheet_data) - - data.quads = {} - for i = 0, 15 do - for j = 0, 15 do - data.quads[i + j*16] = love.graphics.newQuad(i*8, j*8, 8, 8, data.spritesheet:getDimensions()) - end - end - - data.map = {} - for i = 0, 127 do - data.map[i] = {} - for j = 0, 31 do - local line = sections["map"] and sections["map"][j + 1] or "0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - local s = string.sub(line, 1 + 2*i, 2 + 2*i) - data.map[i][j] = fromhex(s) - end - for j = 32, 63 do - local i_ = i%64 - local j_ = i <= 63 and j*2 or j*2 + 1 - local line = sections["gfx"][j_ + 1] or "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" - local s = string.sub(line, 1 + 2*i_, 2 + 2*i_) - data.map[i][j] = fromhex_swapnibbles(s) - end - end - - data.rooms = {} - data.roomBounds = {} - - -- code: look for the magic comment - local code = table.concat(sections["lua"], "\n") - local evh = string.match(code, "%-%-@begin([^@]+)%-%-@end") - local levels, mapdata - if evh then - -- cut out comments - loadstring doesn't parse them for some reason - evh = string.gsub(evh, "%-%-[^\n]*\n", "") - evh = string.gsub(evh, "//[^\n]*\n", "") - - local chunk, err = loadstring(evh) - if not err then - local env = {} - chunk = setfenv(chunk, env) - chunk() - - levels, mapdata = env.levels, env.mapdata - end - end - - mapdata = mapdata or {} - - -- flatten levels and mapdata - local lvls = {} - if levels then - for n, s in pairs(levels) do - table.insert(lvls, {n, s, mapdata[n]}) - end - end - table.sort(lvls, function(p1, p2) return p1[1] < p2[1] end) - levels, mapdata = {}, {} - for n, p in pairs(lvls) do - levels[n] = p[2] - mapdata[n] = p[3] - end - - -- load levels - if levels[1] then - for n, s in pairs(levels) do - local x, y, w, h, title = string.match(s, "^([^,]*),([^,]*),([^,]*),([^,]*),?([^,]*)$") - x, y, w, h = tonumber(x), tonumber(y), tonumber(w), tonumber(h) - if x and y and w and h then -- this confirms they're there and they're numbers - data.roomBounds[n] = {x=x*128, y=y*128, w=w*16, h=h*16, title=title} - else - print("wat", s) - end - end - else - for J = 0, 3 do - for I = 0, 7 do - local b = {x = I*128, y = J*128, w = 16, h = 16, title=""} - table.insert(data.roomBounds, b) - end - end - end - - -- load mapdata - if mapdata then - for n, levelstr in pairs(mapdata) do - local b = data.roomBounds[n] - if b then - local room = newRoom(b.x, b.y, b.w, b.h) - loadroomdata(room, levelstr) - room.title = b.title - data.rooms[n] = room - end - end - end - - -- fill rooms with no mapdata from p8 map - for n, b in ipairs(data.roomBounds) do - if not data.rooms[n] then - local room = newRoom(b.x, b.y, b.w, b.h) - room.hex=false - room.title = b.title - - for i = 0, b.w - 1 do - for j = 0, b.h - 1 do - local i1, j1 = div8(b.x) + i, div8(b.y) + j - if i1 >= 0 and i1 < 128 and j1 >= 0 and j1 < 64 then - room.data[i][j] = data.map[i1][j1] - else - room.data[i][j] = 0 - end - end - end - - data.rooms[n] = room - end - end - return data -end - -function openPico8(filename) - newProject() - - -- loads into global p8data as well, for spritesheet - p8data = loadpico8(filename) - project.rooms = p8data.rooms - - app.openFileName = filename - - return true -end - -function savePico8(filename) - local map = fill2d0s(128, 64) - - for _, room in ipairs(project.rooms) do - if not room.hex then - local i0, j0 = div8(room.x), div8(room.y) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - if map[i0+i] then - map[i0+i][j0+j] = room.data[i][j] - end - end - end - end - end - - local file = io.open(filename, "rb") - if not file and app.openFileName then - file = io.open(app.openFileName, "rb") - end - if not file then - return false - end - - local out = {} - - local ln = 1 - local gfxstart, mapstart - for line in cr_file_lines(file) do - table.insert(out, line) - ln = ln + 1 - end - file:close() - - local levels, mapdata = {}, {} - for n = 1, #project.rooms do - local room = project.rooms[n] - levels[n] = string.format("%g,%g,%g,%g,%s", room.x/128, room.y/128, room.w/16, room.h/16, room.title) - - if room.hex then - mapdata[n] = dumproomdata(room) - end - end - - -- map section - - -- start out by making sure both sections exist, and are sized to max size - - - local gfxexist, mapexist,labelstart - for k = 1, #out do - if out[k] == "__gfx__" then - gfxexist=true - elseif out[k] == "__map__" then - mapexist=true - elseif out[k] == "__label__" then - labelstart = k - end - end - local gfxtable = {} - for j = gfxstart, labelstart-1 do - gfxtable[j] = out[j] - end - - if not gfxexist then - table.insert(out,"__gfx__") - end - if not mapexist then - table.insert(out,"__map__") - end - - for k,v in ipairs(out) do - if out[k]=="__gfx__" or out[k]=="__map__" then - local j=k+1 - while j<#out and not out[j]:match("__%a+__") do - j=j+1 - end - local emptyline="" - for i=1,out[k]=="__gfx__" and 128 or 256 do - emptyline=emptyline.."0" - end - for i=j,k+(out[k]=="__gfx__" and 128 or 32) do - table.insert(out,i,emptyline) - end - end - end - local gfxstart, mapstart - for k = 1, #out do - if out[k] == "__gfx__" then - gfxstart = k - elseif out[k] == "__map__" then - mapstart = k - end - end - if not (mapstart and gfxstart) then - error("uuuh") - end - - for j = 0, 31 do - local line = "" - for i = 0, 127 do - line = line .. tohex(map[i][j]) - end - out[mapstart+j+1] = line - end - for j = 32, 63 do - local line = "" - for i = 0, 127 do - line = line .. tohex_swapnibbles(map[i][j]) - end - out[gfxstart+(j-32)*2+65] = string.sub(line, 1, 128) - out[gfxstart+(j-32)*2+66] = string.sub(line, 129, 256) - end - - for j = gfxstart, labelstart-1 do - out[j] = gfxtable[j] - end - - local cartdata=table.concat(out, "\n") - -- write to levels table without overwriting the code - - cartdata = cartdata:gsub("(%-%-@begin.*levels%s*=%s*){.-}(.*%-%-@end)","%1"..dumplua(levels).."%2") - cartdata = cartdata:gsub("(%-%-@begin.*mapdata%s*=%s*){.-}(.*%-%-@end)","%1"..dumplua(mapdata).."%2") - - --remove playtesting inject if one already exists: - cartdata = cartdata:gsub("(%-%-@begin.*)local __init.-\n(.*%-%-@end)","%1".."%2") - if app.playtesting and app.room then - inject = "local __init = _init function _init() __init() begin_game() load_level("..app.room..") music(-1)" - if app.playtesting == 2 then - inject = inject.." max_djump=2" - end - inject = inject.." end" - cartdata=cartdata:gsub("%-%-@end",inject.."\n--@end") - end - file = io.open(filename, "wb") - file:write(cartdata) - file:close() - - app.saveFileName = filename - - return true -end diff --git a/build copy/src/keyboard.lua b/build copy/src/keyboard.lua deleted file mode 100644 index 10d3c8c..0000000 --- a/build copy/src/keyboard.lua +++ /dev/null @@ -1,267 +0,0 @@ -function love.keypressed(key, scancode, isrepeat) - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - if key == "return" then - app.enterPressed = true - end - - -- first handle actions that are allowed to repeat when holding key - - local dx, dy = 0, 0 - if key == "left" then dx = -1 end - if key == "right" then dx = 1 end - if key == "up" then dy = -1 end - if key == "down" then dy = 1 end - if project.selection then - project.selection.x = project.selection.x + dx*8 - project.selection.y = project.selection.y + dy*8 - end - - -- Ctrl+Z, Ctrl+Shift+Z - if love.keyboard.isDown("lctrl") then - if key == "z" then - if love.keyboard.isDown("lshift") then - redo() - else - undo() - end - end - end - - -- room switching / swapping - if key == "down" or key == "up" then - if app.room then - local n1 = app.room - local n2 = key == "down" and app.room + 1 or app.room - 1 - - if project.rooms[n1] and project.rooms[n2] then - if love.keyboard.isDown("lctrl") then - -- swap - local tmp = project.rooms[n1] - project.rooms[n1] = project.rooms[n2] - project.rooms[n2] = tmp - end - - app.room = n2 - end - end - end - - if isrepeat then - return - end - - -- non-repeatable global shortcuts - - if love.keyboard.isDown("lctrl") or love.keyboard.isDown("rctrl") then - -- Ctrl+O - if key == "o" then - local filename = filedialog.open() - local openOk = false - if filename then - local ext = string.match(filename, ".(%w+)$") - if ext == "ahm" then - openOk = openMap(filename) - elseif ext == "p8" then - openOk = openPico8(filename) - end - - if openOk then - app.history = {} - app.historyN = 0 - pushHistory() - end - end - if openOk then - showMessage("Opened "..string.match(filename, psep.."([^"..psep.."]*)$")) - else - showMessage("Failed to open file") - end - -- Ctrl+R - elseif key == "r" then - if app.openFileName then - local data = loadpico8(app.openFileName) - p8data.spritesheet = data.spritesheet - showMessage("Reloaded") - end - -- Ctrl+S - elseif key == "s" then - local filename - if app.saveFileName and not love.keyboard.isDown("lshift") then - filename = app.saveFileName - else - filename = filedialog.save() - end - - if filename and savePico8(filename) then - showMessage("Saved "..string.match(filename, psep.."([^"..psep.."]*)$")) - else - showMessage("Failed to save cart") - end - -- Ctrl+X - elseif key == "x" then - if love.keyboard.isDown("lshift") then - -- cut entire room - if activeRoom() then - local s = dumplua {"room", activeRoom()} - love.system.setClipboardText(s) - table.remove(project.rooms, app.room) - app.room = nil - - showMessage("Cut room") - end - else - -- cut selection - if project.selection then - local s = dumplua {"selection", project.selection} - love.system.setClipboardText(s) - project.selection = nil - - showMessage("Cut") - end - end - -- Ctrl+C - elseif key == "c" then - if love.keyboard.isDown("lshift") then - -- copy entire room - if activeRoom() then - local s = dumplua {"room", activeRoom()} - love.system.setClipboardText(s) - - showMessage("Copied room") - end - else - -- copy selection - if project.selection then - local s = dumplua {"selection", project.selection} - love.system.setClipboardText(s) - placeSelection() - - showMessage("Copied") - end - end - -- Ctrl+V - elseif key == "v" then - placeSelection() -- to clean selection first - - local t, err = loadlua(love.system.getClipboardText()) - if not err then - if type(t) == "table" then - if t[1] == "selection" then - local s = t[2] - project.selection = s - project.selection.x = roundto8(mx - s.w*4) - project.selection.y = roundto8(my - s.h*4) - app.tool = "select" - - showMessage("Pasted") - elseif t[1] == "room" then - local r = t[2] - r.x = roundto8(mx - r.w*4) - r.y = roundto8(my - r.h*4) - table.insert(project.rooms, r) - app.room = #project.rooms - else - err = true - end - else - err = true - end - end - if err then - showMessage("Failed to paste (did you paste something you're not supposed to?)") - end - elseif key == "a" then - if activeRoom() then - app.tool = "select" - select(0, 0, activeRoom().w - 1, activeRoom().h - 1) - end - elseif key=="h" then - app.showGarbageTiles=not app.showGarbageTiles - end - else -- if ctrl is not down - if key == "delete" and love.keyboard.isDown("lshift") then - if app.room then - table.remove(project.rooms, app.room) - if not activeRoom() then - app.room = #project.rooms - end - end - end - end - - -- now pass to nuklear and return if consumed - - if ui:keypressed(key, scancode, isrepeat) then - return - end - - -- another fucking hack: the shit above doesnt consume inputs when editing text for some fucking reason - if app.renameRoom then - return - end - - -- now editing things (that shouldn't happen if you have a nuklear window focused or something) - - if key == "n" then - local room = newRoom(roundto8(mx), roundto8(my), 16, 16) - - -- disabled that shit - -- generate alphabetic room title - --local n, title = 0, nil - --while true do - --title = b26(n) - --local exists = false - --for _, otherRoom in ipairs(project.rooms) do - --if otherRoom.title == title then - --exists = true - --end - --end - --if not exists then - --break - --end - --n = n + 1 - --end - --room.title = title - room.title = "" - - table.insert(project.rooms, room) - app.room = #project.rooms - app.roomAdded = true - elseif key == "space" then - app.showToolPanel = not app.showToolPanel - elseif key == "return" then - placeSelection() - elseif key == "tab" and not love.keyboard.isDown("lalt") then - if not app.playtesting then - app.playtesting = 1 - elseif app.playtesting == 1 then - app.playtesting = 2 - else - app.playtesting = false - end - end -end - -function love.keyreleased(key, scancode) - -- just save history every time a key is released lol - pushHistory() - - if ui:keyreleased(key, scancode) then - return - end - - -- this shortcut is handled on release, and can be consumed - -- so you don't input r into the field - if key == "r" and not love.keyboard.isDown("lctrl") and activeRoom() then - app.renameRoom = activeRoom() - app.renameRoomVTable = { name = {value = app.renameRoom.title}, - hex = {value = app.renameRoom.hex} - } - end -end - -function love.textinput(text) - ui:textinput(text) -end diff --git a/build copy/src/main.lua b/build copy/src/main.lua deleted file mode 100644 index 3703a85..0000000 --- a/build copy/src/main.lua +++ /dev/null @@ -1,180 +0,0 @@ -nuklear = require 'nuklear' -filedialog = require 'filedialog' -serpent = require 'serpent' - -require 'util' -require 'room' -require 'autotiles' - - - --- global constants -psep = love.system.getOS() == "Windows" and "\\" or "/" -- path separator - - --- GLOBAL VARIABLES (im dirty like that) --- and stuff that has to do with them - -function newProject() - -- this is UI things - love.graphics.setNewFont(12*global_scale) - app = { - camX = 0, - camY = 0, - camScale = 2, --based on camScaleSetting - camScaleSetting = 1, -- 0, 1, 2 is 1x, 2x, 3x etc, -1, -2, -3 is 0.5x, 0.25x, 0.125x - room = nil, - suppressMouse = false, -- disables mouse-driven editing in love.update() when a click has triggered different action, reset on release - tool = "brush", - currentTile = 0, - message = nil, - messageTimeLeft = nil, - playtesting = false, - showToolPanel = true, - showGarbageTiles=false, - - -- history (undo stack) - history = {}, - historyN = 0, - - font = love.graphics.getFont(), - - left = 0, top = 0, -- top left corner of editing area - - -- these are used in various hacks to work around nuklear being big dumb (or me idk) - anyWindowHovered = false, - enterPressed = false, - roomAdded = false, - - } - --ui:styleSetFont(love.graphics.getFont()) - ui:stylePush({['font']=app.font}) - --print(app.font:getHeight()) - -- this is what goes into history and (mostly) gets saved - project = { - rooms = {}, - selection = nil, - } - - -- basic p8data with blank spritesheet - local data = {} - local imgdata = love.image.newImageData(128, 64) - imgdata:mapPixel(function() return 0, 0, 0, 1 end) - data.spritesheet = love.graphics.newImage(imgdata) - data.quads = {} - for i = 0, 15 do - for j = 0, 15 do - data.quads[i + j*16] = love.graphics.newQuad(i*8, j*8, 8, 8, data.spritesheet:getDimensions()) - end - end - - p8data = data -end - -function toScreen(x, y) - return (app.camX + x) * app.camScale + app.left, - (app.camY + y) * app.camScale + app.top -end - -function fromScreen(x, y) - return (x - app.left)/app.camScale - app.camX, - (y - app.top)/app.camScale - app.camY -end - -function activeRoom() - return app.room and project.rooms[app.room] -end - -function mouseOverTile() - if activeRoom() then - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - local ti, tj = div8(mx - activeRoom().x), div8(my - activeRoom().y) - if ti >= 0 and ti < activeRoom().w and tj >= 0 and tj < activeRoom().h then - return ti, tj - end - end -end - -function showMessage(msg) - app.message = msg - app.messageTimeLeft = 4 -end - -function placeSelection() - if project.selection and app.room then - local sel, room = project.selection, activeRoom() - local i0, j0 = div8(sel.x - room.x), div8(sel.y - room.y) - for i = 0, sel.w - 1 do - if i0 + i >= 0 and i0 + i < room.w then - for j = 0, sel.h - 1 do - if j0 + j >= 0 and j0 + j < room.h then - room.data[i0 + i][j0 + j] = sel.data[i][j] - end - end - end - end - end - project.selection = nil -end - -function select(i1, j1, i2, j2) - local i0, j0, w, h = rectCont2Tiles(i1, j1, i2, j2) - if w > 1 or h > 1 then - local r = activeRoom() - local selection = newRoom(r.x + i0*8, r.y + j0*8, w, h) - for i = 0, w - 1 do - for j = 0, h - 1 do - selection.data[i][j] = r.data[i0 + i][j0 + j] - r.data[i0 + i][j0 + j] = 0 - end - end - project.selection = selection - end -end - -function pushHistory() - local s = dumpproject(project) - if s ~= app.history[app.historyN] then - --print("BEFORE: "..tostring(app.history[app.historyN])) - --print("AFTER: "..s) - app.historyN = app.historyN + 1 - - for i = app.historyN, #app.history do - app.history[i] = nil - end - - app.history[app.historyN] = s - end -end - -function undo() - if app.historyN >= 2 then - app.historyN = app.historyN - 1 - - local err - project, err = loadproject(app.history[app.historyN]) - if err then error(err) end - end - - if not activeRoom() then app.room = nil end -end - -function redo() - if app.historyN <= #app.history - 1 then - app.historyN = app.historyN + 1 - - local err - project, err = loadproject(app.history[app.historyN]) - if err then error(err) end - end - - if not activeRoom() then app.room = nil end -end - - - -require 'fileio' -require 'mainloop' -require 'keyboard' -require 'mouse' diff --git a/build copy/src/mainloop.lua b/build copy/src/mainloop.lua deleted file mode 100644 index 2cba359..0000000 --- a/build copy/src/mainloop.lua +++ /dev/null @@ -1,376 +0,0 @@ --- UI things - -function tileButton(n, highlight) - local x, y, w, h = ui:widgetBounds() - ui:image({p8data.spritesheet, p8data.quads[n]}) - - local hov = false - if ui:inputIsHovered(x, y, w, h) then - hov = true - end - if hov or highlight then - love.graphics.setLineWidth(1) - if hov then - love.graphics.setColor(0, 1, 0.5) - else - love.graphics.setColor(1, 1, 1) - end - x, y = x - 0.5, y - 0.5 - w, h = w + 1, h + 1 - ui:line(x, y, x + w, y) - ui:line(x, y, x, y + h) - ui:line(x + w, y, x + w, y + h) - ui:line(x, y + h, x + w, y + h) - end - if ui:inputIsMousePressed("left", x, y, w, h) then - return true - end -end - -function toolLabel(label, tool) - local hov = ui:widgetIsHovered() - local x, y, w, h = ui:widgetBounds() - - local color = "#afafaf" - if tool == app.tool then - color = "#00ff88" - end - - if hov then - local bg = "#00ff88" --"#afafaf" - ui:rectMultiColor(x, y, w + 4, h, bg, bg, bg, bg) - color = "#2d2d2d" - ui:stylePush { - window = { - background = bg, - } - } - - app.tool = tool - end - - ui:label(label, "left", color) - - if hov then ui:stylePop() end -end - -function closeToolMenu() - app.toolMenuX, app.toolMenuY = nil, nil -end - - - --- MAIN LOOP - -function love.load(args) - love.keyboard.setKeyRepeat(true) - - ui = nuklear.newUI() - - global_scale=1 -- global scale, to run nicely on hi dpi displays - tms = 4 -- tile menu scale - - for _,v in ipairs(args) do - if v=="--hidpi" then - global_scale = 2 - tms = 4*global_scale - end - end - - --p8data = loadpico8(love.filesystem.getSource().."\\celeste.p8") - - newProject() - pushHistory() - - - checkmarkIm=love.graphics.newImage("checkmark.png") - checkmarkWithBg=love.graphics.newCanvas(checkmarkIm:getWidth()*5/4,checkmarkIm:getHeight()*5/4) - love.graphics.setCanvas(checkmarkWithBg) - love.graphics.clear(0x64/0xff,0x64/0xff,0x64/0xff) - love.graphics.draw(checkmarkIm,checkmarkIm:getWidth()/8,checkmarkIm:getHeight()/8) - love.graphics.setCanvas() -end - -function love.update(dt) - app.W, app.H = love.graphics.getDimensions() - local rpw = app.W * 0.10 -- room panel width - app.left, app.top = rpw, 0 - - ui:frameBegin() - --ui:scale(2) - ui:stylePush { - window = { - spacing = {x = 1, y = 1}, - padding = {x = 1, y = 1}, - }, - selectable = { - padding = {x = 0, y = 0}, - ["normal active"] = "#000000", - ["hover active"] = "#000000", - ["pressed active"] = "#000000", - }, - checkbox = { - ["cursor normal"] = checkmarkIm, - ["cursor hover"] = checkmarkIm - } - } - - -- room panel - if ui:windowBegin("Room Panel", 0, 0, rpw, app.H, {"scrollbar"}) then - ui:layoutRow("dynamic", 25*global_scale, 1) - for n = 1, #project.rooms do - if ui:selectable("["..n.."] "..project.rooms[n].title, n == app.room) then - app.room = n - end - end - - if app.roomAdded then - ui:windowSetScroll(0, 100000) - app.roomAdded = false - end - end - ui:windowEnd() - - -- tool panel - if app.showToolPanel then - local tpw = 16*8*tms + 18 - if ui:windowBegin("Tool panel", app.W - tpw, 0, tpw, app.H) then - ui:layoutRow("static", 25*global_scale, 100*global_scale, 2) - if ui:selectable("Brush", app.tool == "brush") then app.tool = "brush" end - if ui:selectable("Rectangle", app.tool == "rectangle") then app.tool = "rectangle" end - ui:layoutRow("static", 25*global_scale, 100*global_scale, 1) - if ui:selectable("Select", app.tool == "select") then app.tool = "select" end - - for j = 0, app.showGarbageTiles and 15 or 7 do - ui:layoutRow("static", 8*tms, 8*tms, 16) - for i = 0, 15 do - local n = i + j*16 - if tileButton(n, app.currentTile == n and not app.autotile) then - app.currentTile = n - app.autotile = nil - end - end - end - - ui:layoutRow("dynamic", 25*global_scale, 1) - ui:label("Autotiles:") - ui:layoutRow("static", 8*tms, 8*tms, #autotiles) - for k, auto in ipairs(autotiles) do - if tileButton(auto[5], app.currentTile == auto[15] and app.autotile) then - app.currentTile = auto[15] - app.autotile = k - end - end - end - ui:windowEnd() - end - - if app.renameRoom then - local room = app.renameRoom - - local w, h = 200*global_scale, 125*global_scale - if ui:windowBegin("Rename room", app.W/2 - w/2, app.H/2 - h/2, w, h, {"title", "border", "closable", "movable"}) then - local x,y=div8(room.x),div8(room.y) - local fits_on_map=x>=0 and x+room.w<=128 and y>=0 and y+room.h<=64 - ui:layoutRow("dynamic",25*global_scale,1) - if not fits_on_map then - local style={} - for k,v in pairs({"text normal", "text hover", "text active"}) do - style[v]="#707070" - end - for k,v in pairs({"normal", "hover", "active"}) do - style[v]=checkmarkWithBg -- show both selected and unselected as having a check to avoid nukelear limitations - -- kinda hacky but it works decently enough - end - ui:stylePush({['checkbox']=style}) - - else - ui:stylePush({}) - end - ui:checkbox("Level Stored As Hex",fits_on_map and app.renameRoomVTable.hex or true) - ui:stylePop() - ui:layoutRow("dynamic", 25*global_scale, 1) - - local state, changed - ui:editFocus() - state, changed = ui:edit("simple", app.renameRoomVTable.name) - - if ui:button("OK") or app.enterPressed then - room.title = app.renameRoomVTable.name.value - room.hex = app.renameRoomVTable.hex.value - app.renameRoom = nil - end - else - app.renameRoom = nil - end - ui:windowEnd() - end - - app.enterPressed = false - - app.anyWindowHovered = ui:windowIsAnyHovered() - - ui:stylePop() - - local hov = ui:windowIsAnyHovered() - - ui:frameEnd() - - if app.brushing and not hov and not love.keyboard.isDown("lalt") and (love.mouse.isDown(1) or love.mouse.isDown(2)) then - if app.tool == "brush" then - local n = app.currentTile - if love.mouse.isDown(2) then - n = 0 - end - - local ti, tj = mouseOverTile() - if ti then - local room = activeRoom() - - activeRoom().data[ti][tj] = n - - if app.autotile then - autotileWithNeighbors(activeRoom(), ti, tj, app.autotile) - end - end - end - end - - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - if app.roomResizeSideX and app.room then - local room = activeRoom() - - if not room.hex then - -- if the room is stored in mapdata, it still has to fit when resizing - mx = math.min(math.max(mx, 0), 1024) - my = math.min(math.max(my, 0), 512) - end - local left, top = room.x, room.y - local right, bottom = left + room.w*8, top + room.h*8 - - local ax = app.roomResizeSideX > 0 and right or left - local ay = app.roomResizeSideY > 0 and bottom or top - - local dx = div8(math.abs(mx-ax)) * sign(mx-ax) * app.roomResizeSideX - local dy = div8(math.abs(my-ay)) * sign(my-ay) * app.roomResizeSideY - - dx = math.max(1, room.w + dx) - room.w - dy = math.max(1, room.h + dy) - room.h - - if dx ~= 0 or dy ~= 0 then - local newdata, neww, newh = {}, room.w + dx, room.h + dy - - -- copy all tiles (even if outside bounds - so they persist if you cut part of room off and then resize back) - for i, col in pairs(room.data) do - for j, n in pairs(col) do - local i_, j_ = i + (ax == left and dx or 0), j + (ay == top and dy or 0) - - if not newdata[i_] then newdata[i_] = {} end - newdata[i_][j_] = n - end - end - -- add 0 when no data is there - for i = 0, neww - 1 do - newdata[i] = newdata[i] or {} - for j = 0, newh - 1 do - newdata[i][j] = newdata[i][j] or 0 - end - end - - room.x = room.x - (ax == left and 8*(neww-room.w) or 0) - room.y = room.y - (ay == top and 8*(newh-room.h) or 0) - room.data, room.w, room.h = newdata, neww, newh - end - end - - if project.selection and app.tool ~= "select" then - placeSelection() - end - - if app.message then - app.messageTimeLeft = app.messageTimeLeft - dt - if app.messageTimeLeft < 0 then - app.message = nil - app.messageTimeLeft = nil - end - end -end - -function love.draw() - love.graphics.clear(0.25, 0.25, 0.25) - love.graphics.reset() - love.graphics.setLineStyle("rough") - - local x, y = love.mouse.getPosition() - local mx, my = fromScreen(x, y) - - local ox, oy = toScreen(0, 0) - love.graphics.translate(math.floor(ox), math.floor(oy)) - love.graphics.scale(app.camScale) - - love.graphics.setColor(0.28, 0.28, 0.28) - love.graphics.setLineWidth(2) - for i = 0, 7 do - for j = 0, 3 do - love.graphics.rectangle("line", i*128, j*128, 128, 128) - end - end - - for _, room in ipairs(project.rooms) do - if room ~= activeRoom() then - drawRoom(room, p8data) - love.graphics.setColor(0.5, 0.5, 0.5, 0.4) - love.graphics.rectangle("fill", room.x, room.y, room.w*8, room.h*8) - end - end - if activeRoom() then - drawRoom(activeRoom(), p8data) - end - if project.selection then - drawRoom(project.selection, p8data, true) - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", project.selection.x + 0.5 / app.camScale, project.selection.y + 0.5 / app.camScale, project.selection.w*8, project.selection.h*8) - end - - local ti, tj = mouseOverTile() - - if app.tool == "brush" or (app.tool == "rectangle" and not app.rectangleI) then - if ti and not app.toolMenuX then - love.graphics.setColor(1, 1, 1) - love.graphics.draw(p8data.spritesheet, p8data.quads[app.currentTile], activeRoom().x + ti*8, activeRoom().y + tj*8) - - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", activeRoom().x + ti*8 + 0.5 / app.camScale, - activeRoom().y + tj*8 + 0.5 / app.camScale, 8, 8) - end - elseif (app.tool == "rectangle" and app.rectangleI) or app.tool == "select" then - local i1, j1 = app.rectangleI or app.selectTileI, app.rectangleJ or app.selectTileJ - if i1 and ti then - local i, j, w, h = rectCont2Tiles(ti, tj, i1, j1) - love.graphics.setColor(0, 1, 0.5) - love.graphics.setLineWidth(1 / app.camScale) - love.graphics.rectangle("line", activeRoom().x + i*8 + 0.5 / app.camScale, - activeRoom().y + j*8 + 0.5 / app.camScale, - w*8, h*8) - end - end - - love.graphics.reset() - love.graphics.setColor(1, 1, 1) - love.graphics.translate(app.left, app.top) - love.graphics.setFont(app.font) - - if app.message then - love.graphics.print(app.message, 4, app.H - app.font:getHeight() - 4) - end - - if app.playtesting then - local s = app.playtesting == 1 and "[playtesting]" or "[playtesting, 2 dashes]" - love.graphics.print(s, 4, 4) - end - ui:draw() -end diff --git a/build copy/src/mouse.lua b/build copy/src/mouse.lua deleted file mode 100644 index e1dc66d..0000000 --- a/build copy/src/mouse.lua +++ /dev/null @@ -1,184 +0,0 @@ -function love.mousepressed(x, y, button, istouch, presses) - if ui:mousepressed(x, y, button, istouch, presses) then - return - end - - local mx, my = fromScreen(x, y) - if button == 1 then - if not app.toolMenuX then - local oldActiveRoom = app.room - for i, room in ipairs(project.rooms) do - if mx >= room.x and mx <= room.x + room.w*8 - and my >= room.y and my <= room.y + room.h*8 then - app.room = i - if app.room == oldActiveRoom then - break - end - end - end - if app.room ~= oldActiveRoom then - app.suppressMouse = true - end - - if love.keyboard.isDown("lalt") then - if app.room then - app.roomMoveX, app.roomMoveY = mx - activeRoom().x, my - activeRoom().y - end - return - end - - if app.tool == "brush" and not app.suppressMouse then - app.brushing = true - elseif app.tool == "select" then - local ti, tj = mouseOverTile() - if not project.selection then - if ti then - app.selectTileI, app.selectTileJ = ti, tj - end - else - project.selectionMoveX, project.selectionMoveY = mx - project.selection.x, my - project.selection.y - project.selectionStartX, project.selectionStartY = project.selection.x, project.selection.y - end - end - end - elseif button == 2 then - if love.keyboard.isDown("lalt") and app.room then - app.roomResizeSideX = sign(mx - activeRoom().x - activeRoom().w*8/2) - app.roomResizeSideY = sign(my - activeRoom().y - activeRoom().h*8/2) - return - end - - if app.tool == "brush" then - app.brushing = true - end - elseif button == 3 then - app.camMoveX, app.camMoveY = fromScreen(x, y) - end - - if button == 1 or button == 2 then - local ti, tj = mouseOverTile() - if app.tool == "rectangle" and ti then - app.rectangleI, app.rectangleJ = ti, tj - end - end -end - -function love.mousereleased(x, y, button, istouch, presses) - if ui:mousereleased(x, y, button, istouch, presses) then - return - end - - local ti, tj = mouseOverTile() - - if app.tool == "rectangle" or app.tool == "select" then - local i1, j1 = app.rectangleI or app.selectTileI, app.rectangleJ or app.selectTileJ - - if app.tool == "rectangle" and i1 and ti then - local room = activeRoom() - - local n = app.currentTile - if app.autotile then - n = autotiles[autotilet[n]][15] -- inner version - end - if button == 2 then - n = 0 - end - - local i0, j0, w, h = rectCont2Tiles(i1, j1, ti, tj) - for i = i0, i0 + w - 1 do - for j = j0, j0 + h - 1 do - room.data[i][j] = n - end - end - - if app.autotile then - for i = i0, i0 + w - 1 do - autotileWithNeighbors(room, i, j0) - autotileWithNeighbors(room, i, j0 + h - 1) - end - for j = j0 + 1, j0 + h - 2 do - autotileWithNeighbors(room, i0, j) - autotileWithNeighbors(room, i0 + w - 1, j) - end - end - elseif app.tool == "select" then - if i1 and ti then - placeSelection() - - select(ti, tj, i1, j1) - end - - if project.selection and project.selectionMoveX then - if project.selection.x == project.selectionStartX and project.selection.y == project.selectionStartY then - placeSelection() - end - end - end - end - - app.camMoveX, app.camMoveY = nil, nil - app.roomMoveX, app.roomMoveY = nil, nil - app.roomResizeSideX, app.roomResizeSideY = nil, nil - app.brushing = false - app.rectangleI, app.rectangleJ = nil, nil - app.selectTileI, app.selectTileJ = nil, nil - project.selectionMoveX, project.selectionMoveY = nil, nil - - app.suppressMouse = false - - -- just save history every time a mouse button is released lol - pushHistory() -end - -function love.mousemoved(x, y, dx, dy, istouch) - if ui:mousemoved(x, y, dx, dy, istouch) then - return - end - - local mx, my = fromScreen(x, y) - local ti, tj = div8(mx), div8(my) - if app.camMoveX then - app.camX = app.camX + mx - app.camMoveX - app.camY = app.camY + my - app.camMoveY - end - if app.roomMoveX and app.room then - local room=activeRoom() - room.x = roundto8(mx - app.roomMoveX) - room.y = roundto8(my - app.roomMoveY) - if not room.hex then - --can't move room stored in map outside of the map - room.x = math.max(0, math.min(1024 - 8*room.w, room.x)) - room.y = math.max(0, math.min(512 - 8*room.h, room.y)) - end - end - if project.selectionMoveX and project.selection then - project.selection.x = roundto8(mx - project.selectionMoveX) - project.selection.y = roundto8(my - project.selectionMoveY) - end -end - -function love.wheelmoved(x, y) - -- this is an inelegant solution to the fact that some slut decided that scrollbars scroll even if the window isn't even hovered - if app.anyWindowHovered then - if ui:wheelmoved(x, y) then - return - end - end - - if y ~= 0 then - local mx, my = love.mouse.getPosition() - rmx, rmy = fromScreen(mx, my) - - if y > 0 then - app.camScaleSetting = app.camScaleSetting + 1 - elseif y < 0 then - app.camScaleSetting = app.camScaleSetting - 1 - end - app.camScaleSetting = math.min(math.max(app.camScaleSetting, -3), 20) - app.camScale = app.camScaleSetting > 0 and (app.camScaleSetting + 1) or 2 ^ app.camScaleSetting - - nrmx, nrmy = fromScreen(mx, my) - app.camX = app.camX + nrmx - rmx - app.camY = app.camY + nrmy - rmy - end -end diff --git a/build copy/src/pico-8_font.png b/build copy/src/pico-8_font.png deleted file mode 100644 index 44bbe17..0000000 Binary files a/build copy/src/pico-8_font.png and /dev/null differ diff --git a/build copy/src/room.lua b/build copy/src/room.lua deleted file mode 100644 index a8a2019..0000000 --- a/build copy/src/room.lua +++ /dev/null @@ -1,33 +0,0 @@ -function newRoom(x, y, w, h) - local room = { - x = x or 0, - y = y or 0, - w = w or 16, - h = h or 16, - hex=true, - data = {}, - title = "", - } - room.data = fill2d0s(room.w, room.h) - - return room -end - -function drawRoom(room, p8data, highlight) - love.graphics.setColor(1, 1, 1) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - local n = room.data[i][j] - if not p8data.quads[n] then print(n) end - if not highlight or n~=0 then - love.graphics.setColor(1, 1, 1) - love.graphics.draw(p8data.spritesheet, p8data.quads[n], room.x + i*8, room.y + j*8) - - if highlight then - love.graphics.setColor(0, 1, 0.5, 0.5) - love.graphics.rectangle("fill", room.x + i*8, room.y + j*8, 8, 8) - end - end - end - end -end diff --git a/build copy/src/serpent.lua b/build copy/src/serpent.lua deleted file mode 100644 index a043713..0000000 --- a/build copy/src/serpent.lua +++ /dev/null @@ -1,140 +0,0 @@ -local n, v = "serpent", "0.302" -- (C) 2012-18 Paul Kulchenko; MIT License -local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" -local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} -local badtype = {thread = true, userdata = true, cdata = true} -local getmetatable = debug and debug.getmetatable or getmetatable -local pairs = function(t) return next, t end -- avoid using __pairs in Lua 5.2+ -local keyword, globals, G = {}, {}, (_G or _ENV) -for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', - 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end -for k,v in pairs(G) do globals[v] = k end -- build func to name mapping -for _,g in ipairs({'coroutine', 'debug', 'io', 'math', 'string', 'table', 'os'}) do - for k,v in pairs(type(G[g]) == 'table' and G[g] or {}) do globals[v] = g..'.'..k end end - -local function s(t, opts) - local name, indent, fatal, maxnum = opts.name, opts.indent, opts.fatal, opts.maxnum - local sparse, custom, huge = opts.sparse, opts.custom, not opts.nohuge - local space, maxl = (opts.compact and '' or ' '), (opts.maxlevel or math.huge) - local maxlen, metatostring = tonumber(opts.maxlength), opts.metatostring - local iname, comm = '_'..(name or ''), opts.comment and (tonumber(opts.comment) or math.huge) - local numformat = opts.numformat or "%.17g" - local seen, sref, syms, symn = {}, {'local '..iname..'={}'}, {}, 0 - local function gensym(val) return '_'..(tostring(tostring(val)):gsub("[^%w]",""):gsub("(%d%w+)", - -- tostring(val) is needed because __tostring may return a non-string value - function(s) if not syms[s] then symn = symn+1; syms[s] = symn end return tostring(syms[s]) end)) end - local function safestr(s) return type(s) == "number" and tostring(huge and snum[tostring(s)] or numformat:format(s)) - or type(s) ~= "string" and tostring(s) -- escape NEWLINE/010 and EOF/026 - or ("%q"):format(s):gsub("\010","n"):gsub("\026","\\026") end - local function comment(s,l) return comm and (l or 0) < comm and ' --[['..select(2, pcall(tostring, s))..']]' or '' end - local function globerr(s,l) return globals[s] and globals[s]..comment(s,l) or not fatal - and safestr(select(2, pcall(tostring, s))) or error("Can't serialize "..tostring(s)) end - local function safename(path, name) -- generates foo.bar, foo[3], or foo['b a r'] - local n = name == nil and '' or name - local plain = type(n) == "string" and n:match("^[%l%u_][%w_]*$") and not keyword[n] - local safe = plain and n or '['..safestr(n)..']' - return (path or '')..(plain and path and '.' or '')..safe, safe end - local alphanumsort = type(opts.sortkeys) == 'function' and opts.sortkeys or function(k, o, n) -- k=keys, o=originaltable, n=padding - local maxn, to = tonumber(n) or 12, {number = 'a', string = 'b'} - local function padnum(d) return ("%0"..tostring(maxn).."d"):format(tonumber(d)) end - table.sort(k, function(a,b) - -- sort numeric keys first: k[key] is not nil for numerical keys - return (k[a] ~= nil and 0 or to[type(a)] or 'z')..(tostring(a):gsub("%d+",padnum)) - < (k[b] ~= nil and 0 or to[type(b)] or 'z')..(tostring(b):gsub("%d+",padnum)) end) end - local function val2str(t, name, indent, insref, path, plainindex, level) - local ttype, level, mt = type(t), (level or 0), getmetatable(t) - local spath, sname = safename(path, name) - local tag = plainindex and - ((type(name) == "number") and '' or name..space..'='..space) or - (name ~= nil and sname..space..'='..space or '') - if seen[t] then -- already seen this element - sref[#sref+1] = spath..space..'='..space..seen[t] - return tag..'nil'..comment('ref', level) end - -- protect from those cases where __tostring may fail - if type(mt) == 'table' and metatostring ~= false then - local to, tr = pcall(function() return mt.__tostring(t) end) - local so, sr = pcall(function() return mt.__serialize(t) end) - if (to or so) then -- knows how to serialize itself - seen[t] = insref or spath - t = so and sr or tr - ttype = type(t) - end -- new value falls through to be serialized - end - if ttype == "table" then - if level >= maxl then return tag..'{}'..comment('maxlvl', level) end - seen[t] = insref or spath - if next(t) == nil then return tag..'{}'..comment(t, level) end -- table empty - if maxlen and maxlen < 0 then return tag..'{}'..comment('maxlen', level) end - local maxn, o, out = math.min(#t, maxnum or #t), {}, {} - for key = 1, maxn do o[key] = key end - if not maxnum or #o < maxnum then - local n = #o -- n = n + 1; o[n] is much faster than o[#o+1] on large tables - for key in pairs(t) do if o[key] ~= key then n = n + 1; o[n] = key end end end - if maxnum and #o > maxnum then o[maxnum+1] = nil end - if opts.sortkeys and #o > maxn then alphanumsort(o, t, opts.sortkeys) end - local sparse = sparse and #o > maxn -- disable sparsness if only numeric keys (shorter output) - for n, key in ipairs(o) do - local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse - if opts.valignore and opts.valignore[value] -- skip ignored values; do nothing - or opts.keyallow and not opts.keyallow[key] - or opts.keyignore and opts.keyignore[key] - or opts.valtypeignore and opts.valtypeignore[type(value)] -- skipping ignored value types - or sparse and value == nil then -- skipping nils; do nothing - elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then - if not seen[key] and not globals[key] then - sref[#sref+1] = 'placeholder' - local sname = safename(iname, gensym(key)) -- iname is table for local variables - sref[#sref] = val2str(key,sname,indent,sname,iname,true) end - sref[#sref+1] = 'placeholder' - local path = seen[t]..'['..tostring(seen[key] or globals[key] or gensym(key))..']' - sref[#sref] = path..space..'='..space..tostring(seen[value] or val2str(value,nil,indent,path)) - else - out[#out+1] = val2str(value,key,indent,nil,seen[t],plainindex,level+1) - if maxlen then - maxlen = maxlen - #out[#out] - if maxlen < 0 then break end - end - end - end - local prefix = string.rep(indent or '', level) - local head = indent and '{\n'..prefix..indent or '{' - local body = table.concat(out, ','..(indent and '\n'..prefix..indent or space)) - local tail = indent and "\n"..prefix..'}' or '}' - return (custom and custom(tag,head,body,tail,level) or tag..head..body..tail)..comment(t, level) - elseif badtype[ttype] then - seen[t] = insref or spath - return tag..globerr(t, level) - elseif ttype == 'function' then - seen[t] = insref or spath - if opts.nocode then return tag.."function() --[[..skipped..]] end"..comment(t, level) end - local ok, res = pcall(string.dump, t) - local func = ok and "((loadstring or load)("..safestr(res)..",'@serialized'))"..comment(t, level) - return tag..(func or globerr(t, level)) - else return tag..safestr(t) end -- handle all other types - end - local sepr = indent and "\n" or ";"..space - local body = val2str(t, name, indent) -- this call also populates sref - local tail = #sref>1 and table.concat(sref, sepr)..sepr or '' - local warn = opts.comment and #sref>1 and space.."--[[incomplete output with shared/self-references skipped]]" or '' - return not name and body..warn or "do local "..body..sepr..tail.."return "..name..sepr.."end" -end - -local function deserialize(data, opts) - local env = (opts and opts.safe == false) and G - or setmetatable({}, { - __index = function(t,k) return t end, - __call = function(t,...) error("cannot call functions") end - }) - local f, res = (loadstring or load)('return '..data, nil, nil, env) - if not f then f, res = (loadstring or load)(data, nil, nil, env) end - if not f then return f, res end - if setfenv then setfenv(f, env) end - return pcall(f) -end - -local function merge(a, b) if b then for k,v in pairs(b) do a[k] = v end end; return a; end -return { _NAME = n, _COPYRIGHT = c, _DESCRIPTION = d, _VERSION = v, serialize = s, - load = deserialize, - dump = function(a, opts) return s(a, merge({name = '_', compact = true, sparse = true}, opts)) end, - line = function(a, opts) return s(a, merge({sortkeys = true, comment = true}, opts)) end, - block = function(a, opts) return s(a, merge({indent = ' ', sortkeys = true, comment = true}, opts)) end } diff --git a/build copy/src/util.lua b/build copy/src/util.lua deleted file mode 100644 index 0731db0..0000000 --- a/build copy/src/util.lua +++ /dev/null @@ -1,124 +0,0 @@ -function fromhex(s) - return tonumber(s, 16) -end - -function fromhex_swapnibbles(s) - local x = fromhex(s) - return math.floor(x/16) + 16*(x%16) -end - -local hext = { [0] = 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 'a', 'b', 'c', 'd', 'e', 'f'} - -function tohex(b) - return hext[math.floor(b/16)]..hext[b%16] -end - -function tohex_swapnibbles(b) - return hext[b%16]..hext[math.floor(b/16)] -end - -function roundto8(x) - return 8*math.floor(x/8 + 1/2) -end - -function sign(x) - return x > 0 and 1 or -1 -end - -function fill2d0s(w, h) - local a = {} - for i = 0, w - 1 do - a[i] = {} - for j = 0, h - 1 do - a[i][j] = 0 - end - end - return a -end - -function rectCont2Tiles(i, j, i_, j_) - return math.min(i, i_), math.min(j, j_), math.abs(i - i_) + 1, math.abs(j - j_) + 1 -end - -function div8(x) - return math.floor(x/8) -end - -function dumplua(t) - return serpent.block(t, {comment = false}) -end - -function loadlua(s) - f, err = loadstring("return "..s) - if err then - return nil, err - else - return f() - end -end - -local alph_ = "abcdefghijklmnopqrstuvwxyz" -local alph = {[0] = " "} -for i = 1, 26 do - alph[i] = string.sub(alph_, i, i) -end - -function b26(n) - local m, n = math.floor(n / 26), n % 26 - if m > 0 then - return b26(m - 1) .. alph[n + 1] - else - return alph[n + 1] - end -end - -function loadroomdata(room, levelstr) - for i = 0, room.w - 1 do - for j = 0, room.h - 1 do - local k = i + j*room.w - room.data[i][j] = fromhex(string.sub(levelstr, 1 + 2*k, 2 + 2*k)) - end - end -end - -function dumproomdata(room) - local s = "" - for j = 0, room.h - 1 do - for i = 0, room.w - 1 do - s = s .. tohex(room.data[i][j]) - end - end - return s -end - -function roomMakeStr(room) - if room then - room.str = dumproomdata(room) - end -end - -function roomMakeData(room) - if room then - room.data = fill2d0s(room.w, room.h) - loadroomdata(room, room.str) - end -end - -function loadproject(str) - local proj = loadlua(str) - for n, room in pairs(proj.rooms) do - roomMakeData(room) - end - roomMakeData(proj.selection) - - return proj -end - -function dumpproject(proj) - for n, room in pairs(proj.rooms) do - roomMakeStr(room) - end - roomMakeStr(proj.selection) - - return serpent.line(proj, {compact = true, comment = false, keyignore = {["data"] = true}}) -end diff --git a/evercore.p8 b/evercore.p8 deleted file mode 100644 index bf54040..0000000 --- a/evercore.p8 +++ /dev/null @@ -1,1861 +0,0 @@ -pico-8 cartridge // http://www.pico-8.com -version 34 -__lua__ ---~evercore~ ---a celeste classic mod base ---v2.1.0 - ---original game by: ---maddy thorson + noel berry - ---major project contributions by ---taco360, meep, gonengazit, and akliant - --- [data structures] - -function vector(x,y) - return {x=x,y=y} -end - -function rectangle(x,y,w,h) - return {x=x,y=y,w=w,h=h} -end - --- [globals] - ---tables -objects,got_fruit={},{} ---timers -freeze,delay_restart,sfx_timer,music_timer,ui_timer=0,0,0,0,-99 ---camera values -draw_x,draw_y,cam_x,cam_y,cam_spdx,cam_spdy,cam_gain=0,0,0,0,0,0,0.25 - --- [entry point] - -function _init() - frames,start_game_flash=0,0 - music(40,0,7) - lvl_id=0 -end - -function begin_game() - max_djump=1 - deaths,frames,seconds,minutes,music_timer,time_ticking,fruit_count,bg_col,cloud_col=0,0,0,0,0,true,0,0,1 - music(0,0,7) - load_level(1) -end - -function is_title() - return lvl_id==0 -end - --- [effects] - -clouds={} -for i=0,16 do - add(clouds,{ - x=rnd"128", - y=rnd"128", - spd=1+rnd"4", - w=32+rnd"32"}) -end - -particles={} -for i=0,24 do - add(particles,{ - x=rnd"128", - y=rnd"128", - s=flr(rnd"1.25"), - spd=0.25+rnd"5", - off=rnd(), - c=6+rnd"2", - }) -end - -dead_particles={} - --- [player entity] - -player={ - layer=2, - init=function(this) - this.grace,this.jbuffer=0,0 - this.djump=max_djump - this.dash_time,this.dash_effect_time=0,0 - this.dash_target_x,this.dash_target_y=0,0 - this.dash_accel_x,this.dash_accel_y=0,0 - this.hitbox=rectangle(1,3,6,5) - this.spr_off=0 - this.collides=true - create_hair(this) - end, - update=function(this) - if pause_player then - return - end - - -- horizontal input - local h_input=btn(➡️) and 1 or btn(⬅️) and -1 or 0 - - -- spike collision / bottom death - if spikes_at(this.left(),this.top(),this.right(),this.bottom(),this.spd.x,this.spd.y) or this.y>lvl_ph then - kill_player(this) - end - - -- on ground checks - local on_ground=this.is_solid(0,1) - - -- landing smoke - if on_ground and not this.was_on_ground then - this.init_smoke(0,4) - end - - -- jump and dash input - local jump,dash=btn(🅾️) and not this.p_jump,btn(❎) and not this.p_dash - this.p_jump,this.p_dash=btn(🅾️),btn(❎) - - -- jump buffer - if jump then - this.jbuffer=4 - elseif this.jbuffer>0 then - this.jbuffer-=1 - end - - -- grace frames and dash restoration - if on_ground then - this.grace=6 - if this.djump0 then - this.grace-=1 - end - - -- dash effect timer (for dash-triggered events, e.g., berry blocks) - this.dash_effect_time-=1 - - -- dash startup period, accel toward dash target speed - if this.dash_time>0 then - this.init_smoke() - this.dash_time-=1 - this.spd=vector(appr(this.spd.x,this.dash_target_x,this.dash_accel_x),appr(this.spd.y,this.dash_target_y,this.dash_accel_y)) - else - -- x movement - local maxrun=1 - local accel=this.is_ice(0,1) and 0.05 or on_ground and 0.6 or 0.4 - local deccel=0.15 - - -- set x speed - this.spd.x=abs(this.spd.x)<=1 and - appr(this.spd.x,h_input*maxrun,accel) or - appr(this.spd.x,sign(this.spd.x)*maxrun,deccel) - - -- facing direction - if this.spd.x~=0 then - this.flip.x=this.spd.x<0 - end - - -- y movement - local maxfall=2 - - -- wall slide - if h_input~=0 and this.is_solid(h_input,0) and not this.is_ice(h_input,0) then - maxfall=0.4 - -- wall slide smoke - if rnd"10"<2 then - this.init_smoke(h_input*6) - end - end - - -- apply gravity - if not on_ground then - this.spd.y=appr(this.spd.y,maxfall,abs(this.spd.y)>0.15 and 0.21 or 0.105) - end - - -- jump - if this.jbuffer>0 then - if this.grace>0 then - -- normal jump - psfx"1" - this.jbuffer=0 - this.grace=0 - this.spd.y=-2 - this.init_smoke(0,4) - else - -- wall jump - local wall_dir=(this.is_solid(-3,0) and -1 or this.is_solid(3,0) and 1 or 0) - if wall_dir~=0 then - psfx"2" - this.jbuffer=0 - this.spd=vector(wall_dir*(-1-maxrun),-2) - if not this.is_ice(wall_dir*3,0) then - -- wall jump smoke - this.init_smoke(wall_dir*6) - end - end - end - end - - -- dash - local d_full=5 - local d_half=3.5355339059 -- 5 * sqrt(2) - - if this.djump>0 and dash then - this.init_smoke() - this.djump-=1 - this.dash_time=4 - has_dashed=true - this.dash_effect_time=10 - -- vertical input - local v_input=btn(⬆️) and -1 or btn(⬇️) and 1 or 0 - -- calculate dash speeds - this.spd=vector(h_input~=0 and - h_input*(v_input~=0 and d_half or d_full) or - (v_input~=0 and 0 or this.flip.x and -1 or 1) - ,v_input~=0 and v_input*(h_input~=0 and d_half or d_full) or 0) - -- effects - psfx"3" - freeze=2 - -- dash target speeds and accels - this.dash_target_x=2*sign(this.spd.x) - this.dash_target_y=(this.spd.y>=0 and 2 or 1.5)*sign(this.spd.y) - this.dash_accel_x=this.spd.y==0 and 1.5 or 1.06066017177 -- 1.5 * sqrt() - this.dash_accel_y=this.spd.x==0 and 1.5 or 1.06066017177 - elseif this.djump<=0 and dash then - -- failed dash smoke - psfx"9" - this.init_smoke() - end - end - - -- animation - this.spr_off+=0.25 - this.spr = not on_ground and (this.is_solid(h_input,0) and 5 or 3) or -- wall slide or mid air - btn(⬇️) and 6 or -- crouch - btn(⬆️) and 7 or -- look up - this.spd.x~=0 and h_input~=0 and 1+this.spr_off%4 or 1 -- walk or stand - - -- exit level off the top (except summit) - if this.y<-4 and levels[lvl_id+1] then - next_level() - end - - -- was on the ground - this.was_on_ground=on_ground - end, - - draw=function(this) - -- clamp in screen - local clamped=mid(this.x,-1,lvl_pw-7) - if this.x~=clamped then - this.x=clamped - this.spd.x=0 - end - -- draw player hair and sprite - set_hair_color(this.djump) - draw_hair(this) - draw_obj_sprite(this) - pal() - end -} - -function create_hair(obj) - obj.hair={} - for i=1,5 do - add(obj.hair,vector(obj.x,obj.y)) - end -end - -function set_hair_color(djump) - pal(8,djump==1 and 8 or djump==2 and 7+frames\3%2*4 or 12) -end - -function draw_hair(obj) - local last=vector(obj.x+(obj.flip.x and 6 or 2),obj.y+(btn(⬇️) and 4 or 3)) - for i,h in ipairs(obj.hair) do - h.x+=(last.x-h.x)/1.5 - h.y+=(last.y+0.5-h.y)/1.5 - circfill(h.x,h.y,mid(4-i,1,2),8) - last=h - end -end - --- [other objects] - -player_spawn={ - layer=2, - init=function(this) - sfx"4" - this.spr=3 - this.target=this.y - this.y=min(this.y+48,lvl_ph) - cam_x,cam_y=mid(this.x,64,lvl_pw-64),mid(this.y,64,lvl_ph-64) - this.spd.y=-4 - this.state=0 - this.delay=0 - create_hair(this) - this.djump=max_djump - end, - update=function(this) - -- jumping up - if this.state==0 and this.y0 then - if this.delay>0 then - -- stall at peak - this.spd.y=0 - this.delay-=1 - elseif this.y>this.target then - -- clamp at target y - this.y=this.target - this.spd=vector(0,0) - this.state=2 - this.delay=5 - this.init_smoke(0,4) - sfx"5" - end - end - -- landing and spawning player object - elseif this.state==2 then - this.delay-=1 - this.spr=6 - if this.delay<0 then - destroy_object(this) - init_object(player,this.x,this.y) - end - end - end, - draw= player.draw -} - -spring={ - init=function(this) - this.hide_in=0 - this.hide_for=0 - end, - update=function(this) - if this.hide_for>0 then - this.hide_for-=1 - if this.hide_for<=0 then - this.spr=18 - this.delay=0 - end - elseif this.spr==18 then - local hit=this.player_here() - if hit and hit.spd.y>=0 then - this.spr=19 - hit.y=this.y-4 - hit.spd.x*=0.2 - hit.spd.y=-3 - hit.djump=max_djump - this.delay=10 - this.init_smoke() - -- crumble below spring - break_fall_floor(this.check(fall_floor,0,1) or {}) - psfx"8" - end - elseif this.delay>0 then - this.delay-=1 - if this.delay<=0 then - this.spr=18 - end - end - -- begin hiding - if this.hide_in>0 then - this.hide_in-=1 - if this.hide_in<=0 then - this.hide_for=60 - this.spr=0 - end - end - end -} - -balloon={ - init=function(this) - this.offset=rnd() - this.start=this.y - this.timer=0 - this.hitbox=rectangle(-1,-1,10,10) - end, - update=function(this) - if this.spr==22 then - this.offset+=0.01 - this.y=this.start+sin(this.offset)*2 - local hit=this.player_here() - if hit and hit.djump0 then - this.timer-=1 - else - psfx"7" - this.init_smoke() - this.spr=22 - end - end, - draw=function(this) - if this.spr==22 then - for i=7,13 do - pset(this.x+4+sin(this.offset*2+i/10),this.y+i,6) - end - draw_obj_sprite(this) - end - end -} - -fall_floor={ - init=function(this) - this.solid_obj=true - this.state=0 - end, - update=function(this) - -- idling - if this.state==0 then - for i=0,2 do - if this.check(player,i-1,-(i%2)) then - break_fall_floor(this) - end - end - -- shaking - elseif this.state==1 then - this.delay-=1 - if this.delay<=0 then - this.state=2 - this.delay=60--how long it hides for - this.collideable=false - end - -- invisible, waiting to reset - elseif this.state==2 then - this.delay-=1 - if this.delay<=0 and not this.player_here() then - psfx"7" - this.state=0 - this.collideable=true - this.init_smoke() - end - end - end, - draw=function(this) - spr(this.state==1 and 26-this.delay/5 or this.state==0 and 23,this.x,this.y) --add an if statement if you use sprite 0 (other stuff also breaks if you do this i think) - end -} - -function break_fall_floor(obj) - if obj.state==0 then - psfx"15" - obj.state=1 - obj.delay=15--how long until it falls - obj.init_smoke(); - (obj.check(spring,0,-1) or {}).hide_in=15 - end -end - -smoke={ - layer=3, - init=function(this) - this.spd=vector(0.3+rnd"0.2",-0.1) - this.x+=-1+rnd"2" - this.y+=-1+rnd"2" - this.flip=vector(rnd()<0.5,rnd()<0.5) - end, - update=function(this) - this.spr+=0.2 - if this.spr>=32 then - destroy_object(this) - end - end -} - -fruit={ - check_fruit=true, - init=function(this) - this.start=this.y - this.off=0 - end, - update=function(this) - check_fruit(this) - this.off+=0.025 - this.y=this.start+sin(this.off)*2.5 - end -} - -fly_fruit={ - check_fruit=true, - init=function(this) - this.start=this.y - this.step=0.5 - this.sfx_delay=8 - end, - update=function(this) - --fly away - if has_dashed then - if this.sfx_delay>0 then - this.sfx_delay-=1 - if this.sfx_delay<=0 then - sfx_timer=20 - sfx"14" - end - end - this.spd.y=appr(this.spd.y,-3.5,0.25) - if this.y<-16 then - destroy_object(this) - end - -- wait - else - this.step+=0.05 - this.spd.y=sin(this.step)*0.5 - end - -- collect - check_fruit(this) - end, - draw=function(this) - spr(26,this.x,this.y) - for ox=-6,6,12 do - spr((has_dashed or sin(this.step)>=0) and 45 or this.y>this.start and 47 or 46,this.x+ox,this.y-2,1,1,ox==-6) - end - end -} - -function check_fruit(this) - local hit=this.player_here() - if hit then - hit.djump=max_djump - sfx_timer=20 - sfx"13" - got_fruit[this.fruit_id]=true - init_object(lifeup,this.x,this.y) - destroy_object(this) - if time_ticking then - fruit_count+=1 - end - end -end - -lifeup={ - init=function(this) - this.spd.y=-0.25 - this.duration=30 - this.flash=0 - end, - update=function(this) - this.duration-=1 - if this.duration<=0 then - destroy_object(this) - end - end, - draw=function(this) - this.flash+=0.5 - ?"1000",this.x-4,this.y-4,7+this.flash%2 - end -} - -fake_wall={ - check_fruit=true, - init=function(this) - this.solid_obj=true - this.hitbox=rectangle(0,0,16,16) - end, - update=function(this) - this.hitbox=rectangle(-1,-1,18,18) - local hit=this.player_here() - if hit and hit.dash_effect_time>0 then - hit.spd=vector(sign(hit.spd.x)*-1.5,-1.5) - hit.dash_time=-1 - for ox=0,8,8 do - for oy=0,8,8 do - this.init_smoke(ox,oy) - end - end - init_fruit(this,4,4) - end - this.hitbox=rectangle(0,0,16,16) - end, - draw=function(this) - sspr(0,32,8,16,this.x,this.y) - sspr(0,32,8,16,this.x+8,this.y,8,16,true,true) - end -} - -function init_fruit(this,ox,oy) - sfx_timer=20 - sfx"16" - init_object(fruit,this.x+ox,this.y+oy,26).fruit_id=this.fruit_id - destroy_object(this) -end - -key={ - update=function(this) - this.spr=flr(9.5+sin(frames/30)) - if frames==18 then --if spr==10 and previous spr~=10 - this.flip.x=not this.flip.x - end - if this.player_here() then - sfx"23" - sfx_timer=10 - destroy_object(this) - has_key=true - end - end -} - -chest={ - check_fruit=true, - init=function(this) - this.x-=4 - this.start=this.x - this.timer=20 - end, - update=function(this) - if has_key then - this.timer-=1 - this.x=this.start-1+rnd"3" - if this.timer<=0 then - init_fruit(this,0,-4) - end - end - end -} - -platform={ - layer=0, - init=function(this) - this.x-=4 - this.hitbox.w=16 - this.dir=this.spr==11 and -1 or 1 - this.semisolid_obj=true - end, - update=function(this) - this.spd.x=this.dir*0.65 - --screenwrap - if this.x<-16 then - this.x=lvl_pw - elseif this.x>lvl_pw then - this.x=-16 - end - end, - draw=function(this) - spr(11,this.x,this.y-1,2,1) - end -} - -message={ - layer=3, - init=function(this) - this.text="-- celeste mountain --#this memorial to those#perished on the climb" - this.hitbox.x+=4 - end, - draw=function(this) - if this.player_here() then - for i,s in ipairs(split(this.text,"#")) do - camera() - rectfill(7,7*i,120,7*i+6,7) - ?s,64-#s*2,7*i+1,0 - camera(draw_x,draw_y) - end - end - end -} - -big_chest={ - init=function(this) - this.state=max_djump>1 and 2 or 0 - this.hitbox.w=16 - end, - update=function(this) - if this.state==0 then - local hit=this.check(player,0,8) - if hit and hit.is_solid(0,1) then - music(-1,500,7) - sfx"37" - pause_player=true - hit.spd=vector(0,0) - this.state=1 - this.init_smoke() - this.init_smoke(8) - this.timer=60 - this.particles={} - end - elseif this.state==1 then - this.timer-=1 - flash_bg=true - if this.timer<=45 and #this.particles<50 then - add(this.particles,{ - x=1+rnd"14", - y=0, - h=32+rnd"32", - spd=8+rnd"8"}) - end - if this.timer<0 then - this.state=2 - this.particles={} - flash_bg,bg_col,cloud_col=false,2,14 - init_object(orb,this.x+4,this.y+4,102) - pause_player=false - end - end - end, - draw=function(this) - if this.state==0 then - draw_obj_sprite(this) - spr(96,this.x+8,this.y,1,1,true) - elseif this.state==1 then - foreach(this.particles,function(p) - p.y+=p.spd - line(this.x+p.x,this.y+8-p.y,this.x+p.x,min(this.y+8-p.y+p.h,this.y+8),7) - end) - end - spr(112,this.x,this.y+8) - spr(112,this.x+8,this.y+8,1,1,true) - end -} - -orb={ - init=function(this) - this.spd.y=-4 - end, - update=function(this) - this.spd.y=appr(this.spd.y,0,0.5) - local hit=this.player_here() - if this.spd.y==0 and hit then - music_timer=45 - sfx"51" - freeze=10 - destroy_object(this) - max_djump=2 - hit.djump=2 - end - end, - draw=function(this) - draw_obj_sprite(this) - for i=0,0.875,0.125 do - circfill(this.x+4+cos(frames/30+i)*8,this.y+4+sin(frames/30+i)*8,1,7) - end - end -} - -flag={ - init=function(this) - this.x+=5 - end, - update=function(this) - if not this.show and this.player_here() then - sfx"55" - sfx_timer,this.show,time_ticking=30,true,false - end - end, - draw=function(this) - spr(118+frames/5%3,this.x,this.y) - if this.show then - camera() - rectfill(32,2,96,31,0) - spr(26,55,6) - ?"x"..fruit_count,64,9,7 - draw_time(49,16) - ?"deaths:"..deaths,48,24,7 - camera(draw_x,draw_y) - end - end -} - -function psfx(num) - if sfx_timer<=0 then - sfx(num) - end -end - --- [tile dict] -tiles={} -foreach(split([[ -1,player_spawn -8,key -11,platform -12,platform -18,spring -20,chest -22,balloon -23,fall_floor -26,fruit -45,fly_fruit -64,fake_wall -86,message -96,big_chest -118,flag -]],"\n"),function(t) - local tile,obj=unpack(split(t)) - tiles[tile]=_ENV[obj] -end) - - --- [object functions] - -function init_object(type,x,y,tile) - --generate and check berry id - local id=x..","..y..","..lvl_id - if type.check_fruit and got_fruit[id] then - return - end - - local obj={ - type=type, - collideable=true, - --collides=false, - spr=tile, - flip=vector(),--false,false - x=x, - y=y, - hitbox=rectangle(0,0,8,8), - spd=vector(0,0), - rem=vector(0,0), - fruit_id=id, - } - - function obj.left() return obj.x+obj.hitbox.x end - function obj.right() return obj.left()+obj.hitbox.w-1 end - function obj.top() return obj.y+obj.hitbox.y end - function obj.bottom() return obj.top()+obj.hitbox.h-1 end - - function obj.is_solid(ox,oy) - for o in all(objects) do - if o!=obj and (o.solid_obj or o.semisolid_obj and not obj.objcollide(o,ox,0) and oy>0) and obj.objcollide(o,ox,oy) then - return true - end - end - return obj.is_flag(ox,oy,0) -- solid terrain - end - - function obj.is_ice(ox,oy) - return obj.is_flag(ox,oy,4) - end - - function obj.is_flag(ox,oy,flag) - for i=max(0,(obj.left()+ox)\8),min(lvl_w-1,(obj.right()+ox)/8) do - for j=max(0,(obj.top()+oy)\8),min(lvl_h-1,(obj.bottom()+oy)/8) do - if fget(tile_at(i,j),flag) then - return true - end - end - end - end - - function obj.objcollide(other,ox,oy) - return other.collideable and - other.right()>=obj.left()+ox and - other.bottom()>=obj.top()+oy and - other.left()<=obj.right()+ox and - other.top()<=obj.bottom()+oy - end - - function obj.check(type,ox,oy) - for other in all(objects) do - if other and other.type==type and other~=obj and obj.objcollide(other,ox,oy) then - return other - end - end - end - - function obj.player_here() - return obj.check(player,0,0) - end - - function obj.move(ox,oy,start) - for axis in all{"x","y"} do - obj.rem[axis]+=axis=="x" and ox or oy - local amt=round(obj.rem[axis]) - obj.rem[axis]-=amt - local upmoving=axis=="y" and amt<0 - local riding=not obj.player_here() and obj.check(player,0,upmoving and amt or -1) - local movamt - if obj.collides then - local step=sign(amt) - local d=axis=="x" and step or 0 - local p=obj[axis] - for i=start,abs(amt) do - if not obj.is_solid(d,step-d) then - obj[axis]+=step - else - obj.spd[axis],obj.rem[axis]=0,0 - break - end - end - movamt=obj[axis]-p --save how many px moved to use later for solids - else - movamt=amt - if (obj.solid_obj or obj.semisolid_obj) and upmoving and riding then - movamt+=obj.top()-riding.bottom()-1 - local hamt=round(riding.spd.y+riding.rem.y) - hamt+=sign(hamt) - if movamt0 and obj.right()+1-hit.left() or amt<0 and obj.left()-hit.right()-1) or 0, - axis=="y" and (amt>0 and obj.bottom()+1-hit.top() or amt<0 and obj.top()-hit.bottom()-1) or 0, - 1) - if obj.player_here() then - kill_player(hit) - end - elseif riding then - riding.move(axis=="x" and movamt or 0, axis=="y" and movamt or 0,1) - end - obj.collideable=true - end - end - end - - function obj.init_smoke(ox,oy) - init_object(smoke,obj.x+(ox or 0),obj.y+(oy or 0),29) - end - - add(objects,obj); - - (obj.type.init or stat)(obj) - - return obj -end - -function destroy_object(obj) - del(objects,obj) -end - -function kill_player(obj) - sfx_timer=12 - sfx"0" - deaths+=1 - destroy_object(obj) - --dead_particles={} - for dir=0,0.875,0.125 do - add(dead_particles,{ - x=obj.x+4, - y=obj.y+4, - t=2, - dx=sin(dir)*3, - dy=cos(dir)*3 - }) - end - delay_restart=15 -end - -function move_camera(obj) - cam_spdx=cam_gain*(4+obj.x-cam_x) - cam_spdy=cam_gain*(4+obj.y-cam_y) - - cam_x+=cam_spdx - cam_y+=cam_spdy - - --clamp camera to level boundaries - local clamped=mid(cam_x,64,lvl_pw-64) - if cam_x~=clamped then - cam_spdx=0 - cam_x=clamped - end - clamped=mid(cam_y,64,lvl_ph-64) - if cam_y~=clamped then - cam_spdy=0 - cam_y=clamped - end -end - --- [level functions] - -function next_level() - local next_lvl=lvl_id+1 - - --check for music trigger - if music_switches[next_lvl] then - music(music_switches[next_lvl],500,7) - end - - load_level(next_lvl) -end - -function load_level(id) - has_dashed,has_key= false--,false - - - --remove existing objects - foreach(objects,destroy_object) - - --reset camera speed - cam_spdx,cam_spdy=0,0 - - local diff_level=lvl_id~=id - - --set level index - lvl_id=id - - --set level globals - local tbl=split(levels[lvl_id]) - for i=1,4 do - _ENV[split"lvl_x,lvl_y,lvl_w,lvl_h"[i]]=tbl[i]*16 - end - lvl_title=tbl[5] - lvl_pw,lvl_ph=lvl_w*8,lvl_h*8 - - - --level title setup - ui_timer=5 - - --reload map - if diff_level then - reload() - --chcek for mapdata strings - if mapdata[lvl_id] then - replace_mapdata(lvl_x,lvl_y,lvl_w,lvl_h,mapdata[lvl_id]) - end - end - - -- entities - for tx=0,lvl_w-1 do - for ty=0,lvl_h-1 do - local tile=tile_at(tx,ty) - if tiles[tile] then - init_object(tiles[tile],tx*8,ty*8,tile) - end - end - end -end - --- [main update loop] - -function _update() - frames+=1 - if time_ticking then - seconds+=frames\30 - minutes+=seconds\60 - seconds%=60 - end - frames%=30 - - if music_timer>0 then - music_timer-=1 - if music_timer<=0 then - music(10,0,7) - end - end - - if sfx_timer>0 then - sfx_timer-=1 - end - - -- cancel if freeze - if freeze>0 then - freeze-=1 - return - end - - -- restart (soon) - if delay_restart>0 then - cam_spdx,cam_spdy=0,0 - delay_restart-=1 - if delay_restart==0 then - load_level(lvl_id) - end - end - - -- update each object - foreach(objects,function(obj) - obj.move(obj.spd.x,obj.spd.y,0); - (obj.type.update or stat)(obj) - end) - - --move camera to player - foreach(objects,function(obj) - if obj.type==player or obj.type==player_spawn then - move_camera(obj) - end - end) - - -- start game - if is_title() then - if start_game then - start_game_flash-=1 - if start_game_flash<=-30 then - begin_game() - end - elseif btn(🅾️) or btn(❎) then - music"-1" - start_game_flash,start_game=50,true - sfx"38" - end - end -end - --- [drawing functions] - -function _draw() - if freeze>0 then - return - end - - -- reset all palette values - pal() - - -- start game flash - if is_title() then - if start_game then - for i=1,15 do - pal(i, start_game_flash<=10 and ceil(max(start_game_flash)/5) or frames%10<5 and 7 or i) - end - end - - cls() - - -- credits - sspr(unpack(split"72,32,56,32,36,32")) - ?"🅾️/❎",55,80,5 - ?"maddy thorson",40,96,5 - ?"noel berry",46,102,5 - - -- particles - foreach(particles,draw_particle) - - return - end - - -- draw bg color - cls(flash_bg and frames/5 or bg_col) - - -- bg clouds effect - foreach(clouds,function(c) - c.x+=c.spd-cam_spdx - rectfill(c.x,c.y,c.x+c.w,c.y+16-c.w*0.1875,cloud_col) - if c.x>128 then - c.x=-c.w - c.y=rnd"120" - end - end) - - --set cam draw position - draw_x=round(cam_x)-64 - draw_y=round(cam_y)-64 - camera(draw_x,draw_y) - - -- draw bg terrain - map(lvl_x,lvl_y,0,0,lvl_w,lvl_h,4) - - --set draw layering - --0: background layer - --1: default layer - --2: player layer - --3: foreground layer - local layers={{},{},{}} - foreach(objects,function(o) - if o.type.layer==0 then - draw_object(o) --draw below terrain - else - add(layers[o.type.layer or 1],o) --add object to layer, default draw below player - end - end) - - -- draw terrain - map(lvl_x,lvl_y,0,0,lvl_w,lvl_h,2) - - -- draw objects - foreach(layers,function(l) - foreach(l,draw_object) - end) - - -- particles - foreach(particles,draw_particle) - - -- dead particles - foreach(dead_particles,function(p) - p.x+=p.dx - p.y+=p.dy - p.t-=0.2 - if p.t<=0 then - del(dead_particles,p) - end - rectfill(p.x-p.t,p.y-p.t,p.x+p.t,p.y+p.t,14+5*p.t%2) - end) - - -- draw level title - camera() - if ui_timer>=-30 then - if ui_timer<0 then - draw_ui() - end - ui_timer-=1 - end -end - -function draw_particle(p) - p.x+=p.spd-cam_spdx - p.y+=sin(p.off)-cam_spdy - p.off+=min(0.05,p.spd/32) - rectfill(p.x+draw_x,p.y%128+draw_y,p.x+p.s+draw_x,p.y%128+p.s+draw_y,p.c) - if p.x>132 then - p.x=-4 - p.y=rnd"128" - elseif p.x<-4 then - p.x=128 - p.y=rnd"128" - end -end - -function draw_object(obj) - (obj.type.draw or draw_obj_sprite)(obj) -end - -function draw_obj_sprite(obj) - spr(obj.spr,obj.x,obj.y,1,1,obj.flip.x,obj.flip.y) -end - -function draw_time(x,y) - rectfill(x,y,x+32,y+6,0) - ?two_digit_str(minutes\60)..":"..two_digit_str(minutes%60)..":"..two_digit_str(seconds),x+1,y+1,7 -end - -function draw_ui() - rectfill(24,58,104,70,0) - local title=lvl_title or lvl_id.."00 m" - ?title,64-#title*2,62,7 - draw_time(4,4) -end - -function two_digit_str(x) - return x<10 and "0"..x or x -end - --- [helper functions] - -function round(x) - return flr(x+0.5) -end - -function appr(val,target,amount) - return val>target and max(val-amount,target) or min(val+amount,target) -end - -function sign(v) - return v~=0 and sgn(v) or 0 -end - -function tile_at(x,y) - return mget(lvl_x+x,lvl_y+y) -end - -function spikes_at(x1,y1,x2,y2,xspd,yspd) - for i=max(0,x1\8),min(lvl_w-1,x2/8) do - for j=max(0,y1\8),min(lvl_h-1,y2/8) do - if({[17]=y2%8>=6 and yspd>=0, - [27]=y1%8<=2 and yspd<=0, - [43]=x1%8<=2 and xspd<=0, - [59]=x2%8>=6 and xspd>=0})[tile_at(i,j)] then - return true - end - end - end -end - --->8 ---[map metadata] - ---@begin ---level table ---"x,y,w,h,title" -levels={ - "0.375,0.625,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.875,0.8125,1,1,", - "0.9375,1,1,1,", - "0.875,0.5,1,1,", - "0.75,0.8125,1,1,", - "0.8125,0.5625,1,1,", - "0.8125,0.625,1,1,", - "0.75,0.75,1,1,", - "0.75,0.75,1,1,", - "1,1.5,1,1,", - "1,1.5,1,1,", - "1.0625,1.1875,1,1,", - "1.25,1.3125,1,1,", - "1.25,1.375,1,1,", - "1.1875,1.375,1,1,", - "1.0625,1.3125,1,1,", - "1.0625,1.3125,1,1," -} - ---mapdata string table ---assigned levels will load from here instead of the map -mapdata={ - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000071000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000007100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -} - ---list of music switch triggers ---assigned levels will start the tracks set here -music_switches={ - [2]=20, - [3]=30 -} - ---@end - ---replace mapdata with hex -function replace_mapdata(x,y,w,h,data) - for i=1,#data,2 do - mset(x+i\2%w,y+i\2\w,"0x"..sub(data,i,i+1)) - end -end - ---[[ - -short on tokens? -everything below this comment -is just for grabbing data -rather than loading it -and can be safely removed! - ---]] - ---copy mapdata string to clipboard -function get_mapdata(x,y,w,h) - local reserve="" - for i=0,w*h-1 do - reserve..=num2hex(mget(i%w,i\w)) - end - printh(reserve,"@clip") -end - ---convert mapdata to memory data -function num2hex(v) - return sub(tostr(v,true),5,6) -end -__gfx__ -000000000000000000000000088888800000000000000000000000000000000000aaaaa0000aaa000000a0000007707770077700000000000000000000000000 -000000000888888008888880888888880888888008888800000000000888888000a000a0000a0a000000a0000777777677777770000000000000000000000000 -000000008888888888888888888ffff888888888888888800888888088f1ff1800a909a0000a0a000000a0007766666667767777000000000000000000000000 -00000000888ffff8888ffff888f1ff18888ffff88ffff8808888888888fffff8009aaa900009a9000000a0007677766676666677000000000000000000000000 -0000000088f1ff1888f1ff1808fffff088f1ff1881ff1f80888ffff888fffff80000a0000000a0000000a0000000000000000000000000000000000000000000 -0000000008fffff008fffff00033330008fffff00fffff8088fffff8083333800099a0000009a0000000a0000000000000000000000000000000000000000000 -00000000003333000033330007000070073333000033337008f1ff10003333000009a0000000a0000000a0000000000000000000000000000000000000000000 -000000000070070000700070000000000000070000007000077333700070070000aaa0000009a0000000a0000000000000000000000000000000000000000000 -555555550000000000000000000000000000000000000000008888004999999449999994499909940300b0b06665666500000000000000000000000070000000 -55555555000000000000000000000000000000000000000008888880911111199111411991140919003b33006765676500000000007700000770070007000007 -550000550000000000000000000000000aaaaaa00000000008788880911111199111911949400419028888206770677000000000007770700777000000000000 -55000055007000700499994000000000a998888a0000000008888880911111199494041900000044089888800700070000000000077777700770000000000000 -55000055007000700050050000000000a988888a0000000008888880911111199114094994000000088889800700070000000000077777700000700000000000 -55000055067706770005500000000000aaaaaaaa0000000008888880911111199111911991400499088988800000000000000000077777700000077000000000 -55555555567656760050050000000000a980088a0000000000888800911111199114111991404119028888200000000000000000070777000007077007000070 -55555555566656660005500004999940a988888a0000000000000000499999944999999444004994002882000000000000000000000000007000000000000000 -5777777557777777777777777777777577cccccccccccccccccccc77577777755555555555555555555555555500000007777770000000000000000000000000 -77777777777777777777777777777777777cccccccccccccccccc777777777775555555555555550055555556670000077777777000777770000000000000000 -777c77777777ccccc777777ccccc7777777cccccccccccccccccc777777777775555555555555500005555556777700077777777007766700000000000000000 -77cccc77777cccccccc77cccccccc7777777cccccccccccccccc7777777cc7775555555555555000000555556660000077773377076777000000000000000000 -77cccc7777cccccccccccccccccccc777777cccccccccccccccc777777cccc775555555555550000000055555500000077773377077660000777770000000000 -777cc77777cc77ccccccccccccc7cc77777cccccccccccccccccc77777cccc775555555555500000000005556670000073773337077770000777767007700000 -7777777777cc77cccccccccccccccc77777cccccccccccccccccc77777c7cc77555555555500000000000055677770007333bb37070000000700007707777770 -5777777577cccccccccccccccccccc7777cccccccccccccccccccc7777cccc77555555555000000000000005666000000333bb30000000000000000000077777 -77cccc7777cccccccccccccccccccc77577777777777777777777775777ccc775555555550000000000000050000066603333330000000000000000000000000 -777ccc7777cccccccccccccccccccc77777777777777777777777777777cc7775055555555000000000000550007777603b333300000000000ee0ee000000000 -777ccc7777cc7cccccccccccc77ccc777777ccc7777777777ccc7777777cc77755550055555000000000055500000766033333300000000000eeeee000000030 -77ccc77777ccccccccccccccc77ccc77777ccccc7c7777ccccccc77777ccc777555500555555000000005555000000550333b33000000000000e8e00000000b0 -77ccc777777cccccccc77cccccccc777777ccccccc7777c7ccccc77777cccc7755555555555550000005555500000666003333000000b00000eeeee000000b30 -777cc7777777ccccc777777ccccc77777777ccc7777777777ccc777777cccc775505555555555500005555550007777600044000000b000000ee3ee003000b00 -777cc777777777777777777777777777777777777777777777777777777cc7775555555555555550055555550000076600044000030b00300000b00000b0b300 -77cccc77577777777777777777777775577777777777777777777775577777755555555555555555555555550000005500999900030330300000b00000303300 -5777755700000000077777777777777777777770077777700000000000000000cccccccc00000000000000000000000000000000000000000000000000000000 -7777777700000000700007770000777000007777700077770000000000000000c77ccccc00000000000000000000000000000000000000000000000000000000 -7777cc770000000070cc777cccc777ccccc7770770c777070000000000000000c77cc7cc00000000000000000000000000000000000000000000000000000000 -777ccccc0000000070c777cccc777ccccc777c0770777c070000000000000000cccccccc00000000000000000000000000006000000000000000000000000000 -77cccccc00000000707770000777000007770007777700070002eeeeeeee2000cccccccc00000000000000000000000000060600000000000000000000000000 -57cc77cc0000000077770000777000007770000777700007002eeeeeeeeee200cc7ccccc00000000000000000000000000d00060000000000000000000000000 -577c77cc000000007000000000000000000c000770000c0700eeeeeeeeeeee00ccccc7cc0000000000000000000000000d00000c000000000000000000000000 -777ccccc000000007000000000000000000000077000000700e22222e2e22e00cccccccc000000000000000000000000d000000c000000000000000000000000 -777ccccc000000007000000000000000000000077000000700eeeeeeeeeeee000000000000000000000000000000000c0000000c000600000000000000000000 -577ccccc000000007000000c000000000000000770cc000700e22e2222e22e00000000000000000000000000000000d000000000c060d0000000000000000000 -57cc7ccc0000000070000000000cc0000000000770cc000700eeeeeeeeeeee0000000000000000000000000000000c00000000000d000d000000000000000000 -77cccccc0000000070c00000000cc00000000c0770000c0700eee222e22eee0000000000000000000000000000000c0000000000000000000000000000000000 -777ccccc000000007000000000000000000000077000000700eeeeeeeeeeee005555555506666600666666006600c00066666600066666006666660066666600 -7777cc770000000070000000000000000000000770c0000700eeeeeeeeeeee00555555556666666066666660660c000066666660666666606666666066666660 -777777770000000070000000c0000000000000077000000700ee77eee7777e005555555566000660660000006600000066000000660000000066000066000000 -57777577000000007000000000000000000000077000c007077777777777777055555555dd000000dddd0000dd000000dddd0000ddddddd000dd0000dddd0000 -000000000000000070000000000000000000000770000007007777005000000000000005dd000dd0dd000000dd0000d0dd000000000000d000dd0000dd000000 -00aaaaaa00000000700000000000000000000007700c0007070000705500000000000055ddddddd0dddddd00ddddddd0dddddd00ddddddd000dd0000dddddd00 -0a99999900000000700000000000c00000000007700000077077000755500000000005550ddddd00ddddddd0ddddddd0ddddddd00ddddd0000dd0000ddddddd0 -a99aaaaa000000007000000cc0000000000000077000cc077077bb07555500000000555500000000000000000000000000000000000000000000000000000000 -a9aaaaaa000000007000000cc0000000000c00077000cc07700bbb0755555555555555550000000000000c000000000000000000000000000000c00000000000 -a99999990000000070c00000000000000000000770c00007700bbb075555555555555555000000000000c00000000000000000000000000000000c0000000000 -a999999900000000700000000000000000000007700000070700007055555555555555550000000000cc0000000000000000000000000000000000c000000000 -a99999990000000007777777777777777777777007777770007777005555555555555555000000000c000000000000000000000000000000000000c000000000 -aaaaaaaa0000000007777777777777777777777007777770004bbb00004b000000400bbb00000000c0000000000000000000000000000000000000c000000000 -a49494a10000000070007770000077700000777770007777004bbbbb004bb000004bbbbb0000000100000000000000000000000000000000000000c00c000000 -a494a4a10000000070c777ccccc777ccccc7770770c7770704200bbb042bbbbb042bbb00000000c0000000000000000000000000000000000000001010c00000 -a49444aa0000000070777ccccc777ccccc777c0770777c07040000000400bbb004000000000001000000000000000000000000000000000000000001000c0000 -a49999aa000000007777000007770000077700077777000704000000040000000400000000000100000000000000000000000000000000000000000000010000 -a49444990000000077700000777000007770000777700c0742000000420000004200000000000100000000000000000000000000000000000000000000001000 -a494a444000000007000000000000000000000077000000740000000400000004000000000000000000000000000000000000000000000000000000000000000 -a4949999000000000777777777777777777777700777777040000000400000004000000000010000000000000000000000000000000000000000000000000010 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -__label__ -cccccccccccccccccccccccccccccccccccccc775500000000000000000000000000000000070000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccc776670000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccc77ccc776777700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccc77ccc776660000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccc7cccccc6ccccccccc7775500000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccc77776670000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccc777777776777700000000000000000000000000000000000000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccccc777777756661111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc77011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccc7777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccc7777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111311b1b111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc7700000000003b330000000000000000000000000000000000000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc77000000000288882000000000000000000000000000000000000070000000000000000000000000000000000000000000 -cccccccc66cccccccccccccccccccc77000000000898888000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc66ccccccccccccccc77ccc77000000000888898000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccc77ccc77000000000889888000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccc77cccccccc777000000000288882000000000000000000000000000000000000000000000000000000000000000000000006600000000 -ccccccccccccccccc777777ccccc7777000000000028820000000000000000000000000000000000000000000000000000000000000000000000006600000000 -cccccccccccccccc7777777777777777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -6ccccccccccccccc7777777777777775111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -cccccccccccccc776665666566656665111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -ccccccccccccc7776765676567656765111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -ccccccccccccc7776771677167716771111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccc77771711171117111711111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccc77771711171117111711111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -ccccccccccccc7770000000000000011111111111111111111111111111111171111111111111111111111110000000000000001161111111111111111111111 -ccccccccccccc7770000000000000011111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccccc770000000000000011111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000 -cccccccccccccc770000000000000011111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000111111111111111111111111111111111111111111111100060000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccc77ccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccc77ccc770000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc777777750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccc77550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccc77667000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -c77ccc77677770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -c77ccc77666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000770000000000011 -ccccc777550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000770000000000011 -cccc7777667000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -77777777677770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -77777775666000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000011 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077777700000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777733770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777733770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000737733370000001111111111 -555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007333bb370000001111111111 -555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000333bb300000001111111111 -55555555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033333300000001111111111 -50555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee0ee003b333300000001111111111 -55550055555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeeee0033333300000001111111111 -555500555555000000000000000000000000000000000000000000000000000000111111111111111111111111111111111e8e111333b3300000001111111111 -55555555555550000000000000000000000000000000000000000000000000000011111111111111111111111111b11111eeeee1113333000000001111111111 -5505555555555500000000000000000000000000000000000000000000000000001111111111111111111111111b111111ee3ee1110440000000001111111111 -5555555555555550000000000000000000000000000000000000000000000000001111111117111111111111131b11311111b111110440000000000000000111 -5555555555555555000000000000000000000000000000000000000000000000001111111111111111111111131331311111b111119999000000000000000111 -55555555555555550000000000000000077777700000000000000000000000000011111111111111511111115777777777777777777777755000000000000005 -55555555555555500000000000000000777777770000000000000000000000000011111111111111551111117777777777777777777777775500000000000055 -55555555555555000000000000000000777777770000000000000000000000000011111111111111555111117777ccccc777777ccccc77775550000000000555 -5555555555555000000000000000000077773377111111111111111111111111111111111111111155551111777cccccccc77cccccccc7775555000000005555 -555555555555000000000000000000007777337711111111111111111111111111111111111111115555511177cccccccccccccccccccc775555500000055555 -555555555550000000000000000000007377333711111111111111111111111111111111111110005555550077cc77ccccccccccccc7cc775555550000555555 -555555555500000000000000000000007333bb3711111111111111111111111111111111111110005555555077cc77cccccccccccccccc775555555005555555 -555555555000000000000000000000000333bb3111111111111111111111111111111111111110005555555577cccccccccccccccccc66775555555555555555 -555555555555555555555555000000000333333111111111111111111111111111111111111110055555555577ccccccccccccccc6cc66775555555555555555 -5555555555555555555555500000000003b3333111111111111111111111111111111111111110555055555577cccccccccccccccccccc775555555550555555 -555555555555555555555500000000300333333111111111111111111111111111111111111115555555005577cc7cccccccccccc77ccc775555555555550055 -555555555555555555555000000000b00333b33111111111111111111111111111111111111155555555005577ccccccccccccccc77ccc775555555555550055 -55555555555555555555000000000b3000333311111111111111111111111111111111111115555555555555777cccccccc77cccccccc7775555555555555555 -55555555555555555550000003000b00000440000000000000000000000000000000000000555555550555557777ccccc777777ccccc77775555555555055555 -55555555555555555500000000b0b300000440000000000000000000000000000000000005555555555555557777777777777777777777775555555555555555 -55555555555555555000000000303300009999000000000000000000000000000000000055555555555555555777777777777777777777755555555555555555 -55555555555555555777777777777777777777750000000000000000000000000000000555555555555555555555555500000000555555555555555555555555 -55555555505555557777777777777777777777770000000088888880000000000000005550555555555555555555555000000000055555550555555555555555 -55555555555500557777ccccc777777ccccc77770000000888888888000000300000055555550055555555555555550000000000005555550055555555555555 -5555555555550055777cccccccc77cccccccc77700000008888ffff8000000b00000555555550055555555555555500000000000000555550005555555555555 -555555555555555577cccccccccccccccccccc770000b00888f1ff1800000b300005555555555555555555555555000000000000000055550000555555555555 -555555555505555577cc77ccccccccccccc7cc77000b000088fffff003000b000055555555055555555555555550000000000000000005550000055555555555 -555555555555555577cc77cccccccccccccccc77131b11311833331000b0b3000555555555555555555555555500000000888800000000550000005555555555 -555555555555575577cccccccccccccccccccc771313313111711710703033005555555555555555555555555000000008888880000000050000000555555555 -7777777777777777cccccccccccccccccccccccc7777777777777777777777755555555555555555555555550000000008788880000000000000000055555555 -7777777777777777cccccccccccccccccccccccc7777777777777777777777775555555555555555555555550000000008888880000000000000000055555550 -c777777cc777777cccccccccccccccccccccccccc777777cc777777ccccc77775555555555555555555555550000000008888880000000000000000055555500 -ccc77cccccc77cccccccccccccccccccccccccccccc77cccccc77cccccccc7775555555555555555555555550000000008888880000000000000000055555000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000888800000000000000000055550000 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc7cc775555555555555555555555550000000000006000000000000000000055500000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060000000000000000000055000000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060001111111111111111151111111 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060001111111111111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555550555555500000000000060001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc77ccc775500005555555500555555600000000000006001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc77ccc775500005555555000555550000000000000006001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccc77cccccccc7775500005555550000555500000000000000000001111111111111111111111111 -cccccccccccccc7cccccccccccccccccccccccccccccccccc777777ccccc77775500005555500000555000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccccc77777777777777775555555555000000550000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccccc77777777777777755555555550000000500000000000000000000000007700000000000000000000 -ccccccccccccccccccccccccccccccccccccccccc77ccc7700000000555555555555555500000000000000000000000000000000007700000000000000000000 -ccccccccccccccccccccccccccccccccccccccccc77cc77700000000055555555555555000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000005555555555550000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccc777770000000000555555555500000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000055555555000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000005555550000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000555500000000000000000000000000000000000000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000055000000000000000000000000000000000000000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000000000000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000006000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000000000000000000000000000000000000000000000000000007000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000000000000000000000000000000000000000000000000000000000000000000000 - -__gff__ -0000000000000000000000000000000004020000000000000000000200000000030303030303030304040402020000000303030303030303040404020202020200001313131302020300020202020202000013131313020204020202020202020000131313130004040202020202020200001313131300000002020202020202 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -__map__ -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -__sfx__ -0002000036370234702f3701d4702a37017470273701347023370114701e3700e4701a3600c46016350084401233005420196001960019600196003f6003f6003f6003f6003f6003f6003f6003f6003f6003f600 -0002000011070130701a0702407000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000300000d07010070160702207000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000200000642008420094200b420224402a4503c6503b6503b6503965036650326502d6502865024640216401d6401a64016630116300e6300b62007620056100361010600106000060000600006000060000600 -000400000f0701e070120702207017070260701b0602c060210503105027040360402b0303a030300203e02035010000000000000000000000000000000000000000000000000000000000000000000000000000 -000300000977009770097600975008740077300672005715357003470034700347003470034700347003570035700357003570035700347003470034700337003370033700337000070000700007000070000700 -00030000241700e1702d1701617034170201603b160281503f1402f120281101d1101011003110001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100 -00020000101101211014110161101a120201202613032140321403410000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100 -00030000070700a0700e0701007016070220702f0702f0602c0602c0502f0502f0402c0402c0302f0202f0102c000000000000000000000000000000000000000000000000000000000000000000000000000000 -0003000005110071303f6403f6403f6303f6203f6103f6153f6003f6003f600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600 -011000200177500605017750170523655017750160500605017750060501705076052365500605017750060501775017050177500605236550177501605006050177500605256050160523655256050177523655 -002000001d0401d0401d0301d020180401804018030180201b0301b02022040220461f0351f03016040160401d0401d0401d002130611803018030180021f061240502202016040130201d0401b0221804018040 -00100000070700706007050110000707007060030510f0700a0700a0600a0500a0000a0700a0600505005040030700306003000030500c0700c0601105016070160600f071050500a07005050030510a0700a060 -000400000c5501c5601057023570195702c5702157037570285703b5702c5703e560315503e540315303e530315203f520315203f520315103f510315103f510315103f510315103f50000500005000050000500 -000400002f7402b760267701d7701577015770197701c750177300170015700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700 -00030000096450e655066550a6550d6550565511655076550c655046550965511645086350d615006050060500605006050060500605006050060500605006050060500605006050060500605006050060500605 -011000001f37518375273752730027300243001d300263002a3001c30019300003000030000300003000030000300003000030000300003000030000300003000030000300003000030000300003000030000300 -011000002953429554295741d540225702256018570185701856018500185701856000500165701657216562275142753427554275741f5701f5601f500135201b55135530305602454029570295602257022560 -011000200a0700a0500f0710f0500a0600a040110701105007000070001107011050070600704000000000000a0700a0500f0700f0500a0600a0401307113050000000000013070130500f0700f0500000000000 -002000002204022030220201b0112404024030270501f0202b0402202027050220202904029030290201601022040220302b0401b030240422403227040180301d0401d0301f0521f0421f0301d0211d0401d030 -0108002001770017753f6253b6003c6003b6003f6253160023650236553c600000003f62500000017750170001770017753f6003f6003f625000003f62500000236502365500000000003f625000000000000000 -002000200a1400a1300a1201113011120111101b1401b13018152181421813213140131401313013120131100f1400f1300f12011130111201111016142161321315013140131301312013110131101311013100 -001000202e750377502e730377302e720377202e71037710227502b750227302b7301d750247501d730247301f750277501f730277301f7202772029750307502973030730297203072029710307102971030710 -000600001877035770357703576035750357403573035720357103570000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700 -001800202945035710294403571029430377102942037710224503571022440274503c710274403c710274202e450357102e440357102e430377102e420377102e410244402b45035710294503c710294403c710 -0018002005570055700557005570055700000005570075700a5700a5700a570000000a570000000a5700357005570055700557000000055700557005570000000a570075700c5700c5700f570000000a57007570 -010c00103b6352e6003b625000003b61500000000003360033640336303362033610336103f6003f6150000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000c002024450307102b4503071024440307002b44037700244203a7102b4203a71024410357102b410357101d45033710244503c7101d4403771024440337001d42035700244202e7101d4102e7102441037700 -011800200c5700c5600c550000001157011560115500c5000c5700c5600f5710f56013570135600a5700a5600c5700c5600c550000000f5700f5600f550000000a5700a5600a5500f50011570115600a5700a560 -001800200c5700c5600c55000000115701156011550000000c5700c5600f5710f56013570135600f5700f5600c5700c5700c5600c5600c5500c5300c5000c5000c5000a5000a5000a50011500115000a5000a500 -000c0020247712477024762247523a0103a010187523a0103501035010187523501018750370003700037000227712277222762227001f7711f7721f762247002277122772227620070027771277722776200700 -000c0020247712477024762247523a0103a010187503a01035010350101875035010187501870018700007001f7711f7701f7621f7521870000700187511b7002277122770227622275237012370123701237002 -000c0000247712477024772247722476224752247422473224722247120070000700007000070000700007002e0002e0002e0102e010350103501033011330102b0102b0102b0102b00030010300123001230012 -000c00200c3320c3320c3220c3220c3120c3120c3120c3020c3320c3320c3220c3220c3120c3120c3120c30207332073320732207322073120731207312073020a3320a3320a3220a3220a3120a3120a3120a302 -000c00000c3300c3300c3200c3200c3100c3100c3103a0000c3300c3300c3200c3200c3100c3100c3103f0000a3300a3201333013320073300732007310113000a3300a3200a3103c0000f3300f3200f3103a000 -00040000336251a605000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005 -000c00000c3300c3300c3300c3200c3200c3200c3100c3100c3100c31000000000000000000000000000000000000000000000000000000000000000000000000a3000a3000a3000a3000a3310a3300332103320 -001000000c3500c3400c3300c3200f3500f3400f3300f320183501834013350133401835013350163401d36022370223702236022350223402232013300133001830018300133001330016300163001d3001d300 -000c0000242752b27530275242652b26530265242552b25530255242452b24530245242352b23530235242252b22530225242152b21530215242052b20530205242052b205302053a2052e205002050020500205 -001000102f65501075010753f615010753f6152f65501075010753f615010753f6152f6553f615010753f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -0010000016270162701f2711f2701f2701f270182711827013271132701d2711d270162711627016270162701b2711b2701b2701b270000001b200000001b2000000000000000000000000000000000000000000 -00080020245753057524545305451b565275651f5752b5751f5452b5451f5352b5351f5252b5251f5152b5151b575275751b545275451b535275351d575295751d545295451d535295351f5752b5751f5452b545 -002000200c2650c2650c2550c2550c2450c2450c2350a2310f2650f2650f2550f2550f2450f2450f2351623113265132651325513255132451324513235132351322507240162701326113250132420f2600f250 -00100000072750726507255072450f2650f2550c2750c2650c2550c2450c2350c22507275072650725507245072750726507255072450c2650c25511275112651125511245132651325516275162651625516245 -000800201f5702b5701f5402b54018550245501b570275701b540275401857024570185402454018530245301b570275701b540275401d530295301d520295201f5702b5701f5402b5401f5302b5301b55027550 -00100020112751126511255112451326513255182751826518255182451d2651d2550f2651824513275162550f2750f2650f2550f2451126511255162751626516255162451b2651b255222751f2451826513235 -00100010010752f655010753f6152f6553f615010753f615010753f6152f655010752f6553f615010753f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -001000100107501075010753f6152f6553f6153f61501075010753f615010753f6152f6553f6152f6553f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -002000002904029040290302b031290242b021290142b01133044300412e0442e03030044300302b0412b0302e0442e0402e030300312e024300212e024300212b0442e0412b0342e0212b0442b0402903129022 -000800202451524515245252452524535245352454524545245552455524565245652457500505245750050524565005052456500505245550050524555005052454500505245350050524525005052451500505 -000800201f5151f5151f5251f5251f5351f5351f5451f5451f5551f5551f5651f5651f575000051f575000051f565000051f565000051f555000051f555000051f545000051f535000051f525000051f51500005 -000500000373005731077410c741137511b7612437030371275702e5712437030371275702e5712436030361275602e5612435030351275502e5512434030341275402e5412433030331275202e5212431030311 -002000200c2750c2650c2550c2450c2350a2650a2550a2450f2750f2650f2550f2450f2350c2650c2550c2450c2750c2650c2550c2450c2350a2650a2550a2450f2750f2650f2550f2450f235112651125511245 -002000001327513265132551324513235112651125511245162751626516255162451623513265132551324513275132651325513245132350f2650f2550f2450c25011231162650f24516272162520c2700c255 -000300001f3302b33022530295301f3202b32022520295201f3102b31022510295101f3002b300225002950000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000b00002935500300293453037030360303551330524300243050030013305243002430500300003002430024305003000030000300003000030000300003000030000300003000030000300003000030000300 -001000003c5753c5453c5353c5253c5153c51537555375453a5753a5553a5453a5353a5253a5253a5153a51535575355553554535545355353553535525355253551535515335753355533545335353352533515 -00100000355753555535545355353552535525355153551537555375353357533555335453353533525335253a5753a5453a5353a5253a5153a51533575335553354533545335353353533525335253351533515 -001000200c0600c0300c0500c0300c0500c0300c0100c0000c0600c0300c0500c0300c0500c0300c0100f0001106011030110501103011010110000a0600a0300a0500a0300a0500a0300a0500a0300a01000000 -001000000506005030050500503005010050000706007030070500703007010000000f0600f0300f010000000c0600c0300c0500c0300c0500c0300c0500c0300c0500c0300c010000000c0600c0300c0100c000 -0010000003625246150060503615246251b61522625036150060503615116253361522625006051d6250a61537625186152e6251d615006053761537625186152e6251d61511625036150060503615246251d615 -00100020326103261032610326103161031610306102e6102a610256101b610136100f6100d6100c6100c6100c6100c6100c6100f610146101d610246102a6102e61030610316103361033610346103461034610 -00400000302453020530235332252b23530205302253020530205302253020530205302153020530205302152b2452b2052b23527225292352b2052b2252b2052b2052b2252b2052b2052b2152b2052b2052b215 -__music__ -01 150a5644 -00 0a160c44 -00 0a160c44 -00 0a0b0c44 -00 14131244 -00 0a160c44 -00 0a160c44 -02 0a111244 -00 41424344 -00 41424344 -01 18191a44 -00 18191a44 -00 1c1b1a44 -00 1d1b1a44 -00 1f211a44 -00 1f1a2144 -00 1e1a2244 -02 201a2444 -00 41424344 -00 41424344 -01 2a272944 -00 2a272944 -00 2f2b2944 -00 2f2b2c44 -00 2f2b2944 -00 2f2b2c44 -00 2e2d3044 -00 34312744 -02 35322744 -00 41424344 -01 3d7e4344 -00 3d7e4344 -00 3d4a4344 -02 3d3e4344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -01 383a3c44 -02 393b3c44 \ No newline at end of file diff --git a/incaseitdeletes b/incaseitdeletes deleted file mode 100644 index 738b111..0000000 --- a/incaseitdeletes +++ /dev/null @@ -1,1780 +0,0 @@ -pico-8 cartridge // http://www.pico-8.com -version 35 -__lua__ ---~morespritescore~ ---a fork of a celeste classic mod base ---v2.1.0 - ---original game by: ---maddy thorson + noel berry - ---major project contributions by ---taco360, meep, gonengazit, and akliant - --- [data structures] - -function vector(x,y) - return {x=x,y=y} -end - -function rectangle(x,y,w,h) - return {x=x,y=y,w=w,h=h} -end - --- [globals] - ---tables -objects,got_fruit={},{} ---timers -freeze,delay_restart,sfx_timer,music_timer,ui_timer=0,0,0,0,-99 ---camera values -draw_x,draw_y,cam_x,cam_y,cam_spdx,cam_spdy,cam_gain=0,0,0,0,0,0,0.25 - --- [entry point] - -function _init() - frames,start_game_flash=0,0 - music(40,0,7) - lvl_id=0 -end - -function begin_game() - max_djump=1 - deaths,frames,seconds,minutes,music_timer,time_ticking,fruit_count,bg_col,cloud_col=0,0,0,0,0,true,0,0,1 - music(0,0,7) - load_level(1) -end - -function is_title() - return lvl_id==0 -end - --- [effects] - -clouds={} -for i=0,16 do - add(clouds,{ - x=rnd"128", - y=rnd"128", - spd=1+rnd"4", - w=32+rnd"32"}) -end - -particles={} -for i=0,24 do - add(particles,{ - x=rnd"128", - y=rnd"128", - s=flr(rnd"1.25"), - spd=0.25+rnd"5", - off=rnd(), - c=6+rnd"2", - }) -end - -dead_particles={} - --- [player entity] - -player={ - layer=2, - init=function(this) - this.grace,this.jbuffer=0,0 - this.djump=max_djump - this.dash_time,this.dash_effect_time=0,0 - this.dash_target_x,this.dash_target_y=0,0 - this.dash_accel_x,this.dash_accel_y=0,0 - this.hitbox=rectangle(1,3,6,5) - this.spr_off=0 - this.collides=true - create_hair(this) - end, - update=function(this) - if pause_player then - return - end - - -- horizontal input - local h_input=btn(➡️) and 1 or btn(⬅️) and -1 or 0 - - -- spike collision / bottom death - if spikes_at(this.left(),this.top(),this.right(),this.bottom(),this.spd.x,this.spd.y) then - kill_player(this) - end - - -- on ground checks - local on_ground=this.is_solid(0,1) - - -- landing smoke - if on_ground and not this.was_on_ground then - this.init_smoke(0,4) - end - - -- jump and dash input - local jump,dash=btn(🅾️) and not this.p_jump,btn(❎) and not this.p_dash - this.p_jump,this.p_dash=btn(🅾️),btn(❎) - - -- jump buffer - if jump then - this.jbuffer=4 - elseif this.jbuffer>0 then - this.jbuffer-=1 - end - - -- grace frames and dash restoration - if on_ground then - this.grace=6 - if this.djump0 then - this.grace-=1 - end - - -- dash effect timer (for dash-triggered events, e.g., berry blocks) - this.dash_effect_time-=1 - - -- dash startup period, accel toward dash target speed - if this.dash_time>0 then - this.init_smoke() - this.dash_time-=1 - this.spd=vector(appr(this.spd.x,this.dash_target_x,this.dash_accel_x),appr(this.spd.y,this.dash_target_y,this.dash_accel_y)) - else - -- x movement - local maxrun=1 - local accel=this.is_ice(0,1) and 0.05 or on_ground and 0.6 or 0.4 - local deccel=0.15 - - -- set x speed - this.spd.x=abs(this.spd.x)<=1 and - appr(this.spd.x,h_input*maxrun,accel) or - appr(this.spd.x,sign(this.spd.x)*maxrun,deccel) - - -- facing direction - if this.spd.x~=0 then - this.flip.x=this.spd.x<0 - end - - -- y movement - local maxfall=2 - - -- wall slide - if h_input~=0 and this.is_solid(h_input,0) and not this.is_ice(h_input,0) then - maxfall=0.4 - -- wall slide smoke - if rnd"10"<2 then - this.init_smoke(h_input*6) - end - end - - -- apply gravity - if not on_ground then - this.spd.y=appr(this.spd.y,maxfall,abs(this.spd.y)>0.15 and 0.21 or 0.105) - end - - -- jump - if this.jbuffer>0 then - if this.grace>0 then - -- normal jump - psfx"1" - this.jbuffer=0 - this.grace=0 - this.spd.y=-2 - this.init_smoke(0,4) - else - -- wall jump - local wall_dir=(this.is_solid(-3,0) and -1 or this.is_solid(3,0) and 1 or 0) - if wall_dir~=0 then - psfx"2" - this.jbuffer=0 - this.spd=vector(wall_dir*(-1-maxrun),-2) - if not this.is_ice(wall_dir*3,0) then - -- wall jump smoke - this.init_smoke(wall_dir*6) - end - end - end - end - - -- dash - local d_full=5 - local d_half=3.5355339059 -- 5 * sqrt(2) - - if this.djump>0 and dash then - this.init_smoke() - this.djump-=1 - this.dash_time=4 - has_dashed=true - this.dash_effect_time=10 - -- vertical input - local v_input=btn(⬆️) and -1 or btn(⬇️) and 1 or 0 - -- calculate dash speeds - this.spd=vector(h_input~=0 and - h_input*(v_input~=0 and d_half or d_full) or - (v_input~=0 and 0 or this.flip.x and -1 or 1) - ,v_input~=0 and v_input*(h_input~=0 and d_half or d_full) or 0) - -- effects - psfx"3" - freeze=2 - -- dash target speeds and accels - this.dash_target_x=2*sign(this.spd.x) - this.dash_target_y=(this.spd.y>=0 and 2 or 1.5)*sign(this.spd.y) - this.dash_accel_x=this.spd.y==0 and 1.5 or 1.06066017177 -- 1.5 * sqrt() - this.dash_accel_y=this.spd.x==0 and 1.5 or 1.06066017177 - elseif this.djump<=0 and dash then - -- failed dash smoke - psfx"9" - this.init_smoke() - end - end - - -- animation - this.spr_off+=0.25 - this.spr = not on_ground and (this.is_solid(h_input,0) and 5 or 3) or -- wall slide or mid air - btn(⬇️) and 6 or -- crouch - btn(⬆️) and 7 or -- look up - this.spd.x~=0 and h_input~=0 and 1+this.spr_off%4 or 1 -- walk or stand - - -- exit level (except summit) - if levels[lvl_id+1] then - -- top exit - if this.y<-4 and lvl_exit_type == 0 then - next_level() - end - -- right exit - if this.x > lvl_pw and lvl_exit_type == 1 then - next_level() - end - -- left exit - if this.x<-4 and lvl_exit_type == 2 then - next_level() - end - end - -- bottom exit - if this.y > lvl_ph then - if lvl_exit_type == 3 and levels[lvl_id+1] then - next_level() - else - kill_player(this) - end - end - - -- was on the ground - this.was_on_ground=on_ground - end, - - draw=function(this) - -- clamp in screen - local bound_l = -1 - local bound_r = lvl_pw-7 - local bound_t = -1 - local bound_b = lvl_ph+100 - - if lvl_exit_type == 0 then - bound_t = -100 - elseif lvl_exit_type == 1 then - bound_r = lvl_pw+100 - elseif lvl_exit_type == 2 then - bound_l = -100 - elseif lvl_exit_type == 3 then - bound_b = lvl_ph+100 - end - local clampx = mid(this.x,bound_l,bound_r) - local clampy = mid(this.y,bound_t,bound_b) - - if this.x~=clampx then - this.x=clampx - this.spd.x=0 - end - if this.y~=clampy then - this.y=clampy - this.spd.y=0 - end - -- draw player hair and sprite - set_hair_color(this.djump) - draw_hair(this) - draw_obj_sprite(this) - pal() - end -} - -function create_hair(obj) - obj.hair={} - for i=1,5 do - add(obj.hair,vector(obj.x,obj.y)) - end -end - -function set_hair_color(djump) - pal(8,djump==1 and 8 or djump==2 and 7+frames\3%2*4 or 12) -end - -function draw_hair(obj) - local last=vector(obj.x+(obj.flip.x and 6 or 2),obj.y+(btn(⬇️) and 4 or 3)) - for i,h in ipairs(obj.hair) do - h.x+=(last.x-h.x)/1.5 - h.y+=(last.y+0.5-h.y)/1.5 - circfill(h.x,h.y,mid(4-i,1,2),8) - last=h - end -end - --- [other objects] - -player_spawn={ - layer=2, - init=function(this) - sfx"4" - this.spr=3 - this.target=this.y - this.y=min(this.y+48,lvl_ph) - cam_x,cam_y=mid(this.x,64,lvl_pw-64),mid(this.y,64,lvl_ph-64) - this.spd.y=-4 - this.state=0 - this.delay=0 - create_hair(this) - this.djump=max_djump - end, - update=function(this) - -- jumping up - if this.state==0 and this.y0 then - if this.delay>0 then - -- stall at peak - this.spd.y=0 - this.delay-=1 - elseif this.y>this.target then - -- clamp at target y - this.y=this.target - this.spd=vector(0,0) - this.state=2 - this.delay=5 - this.init_smoke(0,4) - sfx"5" - end - end - -- landing and spawning player object - elseif this.state==2 then - this.delay-=1 - this.spr=6 - if this.delay<0 then - destroy_object(this) - init_object(player,this.x,this.y) - end - end - end, - draw= player.draw -} - -spring={ - init=function(this) - this.hide_in=0 - this.hide_for=0 - end, - update=function(this) - if this.hide_for>0 then - this.hide_for-=1 - if this.hide_for<=0 then - this.spr=18 - this.delay=0 - end - elseif this.spr==18 then - local hit=this.player_here() - if hit and hit.spd.y>=0 then - this.spr=19 - hit.y=this.y-4 - hit.spd.x*=0.2 - hit.spd.y=-3 - hit.djump=max_djump - this.delay=10 - this.init_smoke() - -- crumble below spring - break_fall_floor(this.check(fall_floor,0,1) or {}) - psfx"8" - end - elseif this.delay>0 then - this.delay-=1 - if this.delay<=0 then - this.spr=18 - end - end - -- begin hiding - if this.hide_in>0 then - this.hide_in-=1 - if this.hide_in<=0 then - this.hide_for=60 - this.spr=0 - end - end - end -} - -balloon={ - init=function(this) - this.offset=rnd() - this.start=this.y - this.timer=0 - this.hitbox=rectangle(-1,-1,10,10) - end, - update=function(this) - if this.spr==22 then - this.offset+=0.01 - this.y=this.start+sin(this.offset)*2 - local hit=this.player_here() - if hit and hit.djump0 then - this.timer-=1 - else - psfx"7" - this.init_smoke() - this.spr=22 - end - end, - draw=function(this) - if this.spr==22 then - for i=7,13 do - pset(this.x+4+sin(this.offset*2+i/10),this.y+i,6) - end - draw_obj_sprite(this) - end - end -} - -fall_floor={ - init=function(this) - this.solid_obj=true - this.state=0 - end, - update=function(this) - -- idling - if this.state==0 then - for i=0,2 do - if this.check(player,i-1,-(i%2)) then - break_fall_floor(this) - end - end - -- shaking - elseif this.state==1 then - this.delay-=1 - if this.delay<=0 then - this.state=2 - this.delay=60--how long it hides for - this.collideable=false - end - -- invisible, waiting to reset - elseif this.state==2 then - this.delay-=1 - if this.delay<=0 and not this.player_here() then - psfx"7" - this.state=0 - this.collideable=true - this.init_smoke() - end - end - end, - draw=function(this) - spr(this.state==1 and 26-this.delay/5 or this.state==0 and 23,this.x,this.y) --add an if statement if you use sprite 0 (other stuff also breaks if you do this i think) - end -} - -function break_fall_floor(obj) - if obj.state==0 then - psfx"15" - obj.state=1 - obj.delay=15--how long until it falls - obj.init_smoke(); - (obj.check(spring,0,-1) or {}).hide_in=15 - end -end - -smoke={ - layer=3, - init=function(this) - this.spd=vector(0.3+rnd"0.2",-0.1) - this.x+=-1+rnd"2" - this.y+=-1+rnd"2" - this.flip=vector(rnd()<0.5,rnd()<0.5) - end, - update=function(this) - this.spr+=0.2 - if this.spr>=32 then - destroy_object(this) - end - end -} - -fruit={ - check_fruit=true, - init=function(this) - this.start=this.y - this.off=0 - end, - update=function(this) - check_fruit(this) - this.off+=0.025 - this.y=this.start+sin(this.off)*2.5 - end -} - -fly_fruit={ - check_fruit=true, - init=function(this) - this.start=this.y - this.step=0.5 - this.sfx_delay=8 - end, - update=function(this) - --fly away - if has_dashed then - if this.sfx_delay>0 then - this.sfx_delay-=1 - if this.sfx_delay<=0 then - sfx_timer=20 - sfx"14" - end - end - this.spd.y=appr(this.spd.y,-3.5,0.25) - if this.y<-16 then - destroy_object(this) - end - -- wait - else - this.step+=0.05 - this.spd.y=sin(this.step)*0.5 - end - -- collect - check_fruit(this) - end, - draw=function(this) - spr(26,this.x,this.y) - for ox=-6,6,12 do - spr((has_dashed or sin(this.step)>=0) and 45 or this.y>this.start and 47 or 46,this.x+ox,this.y-2,1,1,ox==-6) - end - end -} - -function check_fruit(this) - local hit=this.player_here() - if hit then - hit.djump=max_djump - sfx_timer=20 - sfx"13" - got_fruit[this.fruit_id]=true - init_object(lifeup,this.x,this.y) - destroy_object(this) - if time_ticking then - fruit_count+=1 - end - end -end - -lifeup={ - init=function(this) - this.spd.y=-0.25 - this.duration=30 - this.flash=0 - end, - update=function(this) - this.duration-=1 - if this.duration<=0 then - destroy_object(this) - end - end, - draw=function(this) - this.flash+=0.5 - ?"1000",this.x-4,this.y-4,7+this.flash%2 - end -} - -fake_wall={ - check_fruit=true, - init=function(this) - this.solid_obj=true - this.hitbox=rectangle(0,0,16,16) - end, - update=function(this) - this.hitbox=rectangle(-1,-1,18,18) - local hit=this.player_here() - if hit and hit.dash_effect_time>0 then - hit.spd=vector(sign(hit.spd.x)*-1.5,-1.5) - hit.dash_time=-1 - for ox=0,8,8 do - for oy=0,8,8 do - this.init_smoke(ox,oy) - end - end - init_fruit(this,4,4) - end - this.hitbox=rectangle(0,0,16,16) - end, - draw=function(this) - sspr(0,32,8,16,this.x,this.y) - sspr(0,32,8,16,this.x+8,this.y,8,16,true,true) - end -} - -function init_fruit(this,ox,oy) - sfx_timer=20 - sfx"16" - init_object(fruit,this.x+ox,this.y+oy,26).fruit_id=this.fruit_id - destroy_object(this) -end - -key={ - update=function(this) - this.spr=flr(9.5+sin(frames/30)) - if frames==18 then --if spr==10 and previous spr~=10 - this.flip.x=not this.flip.x - end - if this.player_here() then - sfx"23" - sfx_timer=10 - destroy_object(this) - has_key=true - end - end -} - -chest={ - check_fruit=true, - init=function(this) - this.x-=4 - this.start=this.x - this.timer=20 - end, - update=function(this) - if has_key then - this.timer-=1 - this.x=this.start-1+rnd"3" - if this.timer<=0 then - init_fruit(this,0,-4) - end - end - end -} - -platform={ - layer=0, - init=function(this) - this.x-=4 - this.hitbox.w=16 - this.dir=this.spr==11 and -1 or 1 - this.semisolid_obj=true - end, - update=function(this) - this.spd.x=this.dir*0.65 - --screenwrap - if this.x<-16 then - this.x=lvl_pw - elseif this.x>lvl_pw then - this.x=-16 - end - end, - draw=function(this) - spr(11,this.x,this.y-1,2,1) - end -} - -message={ - layer=3, - init=function(this) - this.text="-- celeste mountain --#this memorial to those#perished on the climb" - this.hitbox.x+=4 - end, - draw=function(this) - if this.player_here() then - for i,s in ipairs(split(this.text,"#")) do - camera() - rectfill(7,7*i,120,7*i+6,7) - ?s,64-#s*2,7*i+1,0 - camera(draw_x,draw_y) - end - end - end -} - -big_chest={ - init=function(this) - this.state=max_djump>1 and 2 or 0 - this.hitbox.w=16 - end, - update=function(this) - if this.state==0 then - local hit=this.check(player,0,8) - if hit and hit.is_solid(0,1) then - music(-1,500,7) - sfx"37" - pause_player=true - hit.spd=vector(0,0) - this.state=1 - this.init_smoke() - this.init_smoke(8) - this.timer=60 - this.particles={} - end - elseif this.state==1 then - this.timer-=1 - flash_bg=true - if this.timer<=45 and #this.particles<50 then - add(this.particles,{ - x=1+rnd"14", - y=0, - h=32+rnd"32", - spd=8+rnd"8"}) - end - if this.timer<0 then - this.state=2 - this.particles={} - flash_bg,bg_col,cloud_col=false,2,14 - init_object(orb,this.x+4,this.y+4,102) - pause_player=false - end - end - end, - draw=function(this) - if this.state==0 then - draw_obj_sprite(this) - spr(96,this.x+8,this.y,1,1,true) - elseif this.state==1 then - foreach(this.particles,function(p) - p.y+=p.spd - line(this.x+p.x,this.y+8-p.y,this.x+p.x,min(this.y+8-p.y+p.h,this.y+8),7) - end) - end - spr(112,this.x,this.y+8) - spr(112,this.x+8,this.y+8,1,1,true) - end -} - -orb={ - init=function(this) - this.spd.y=-4 - end, - update=function(this) - this.spd.y=appr(this.spd.y,0,0.5) - local hit=this.player_here() - if this.spd.y==0 and hit then - music_timer=45 - sfx"51" - freeze=10 - destroy_object(this) - max_djump=2 - hit.djump=2 - end - end, - draw=function(this) - draw_obj_sprite(this) - for i=0,0.875,0.125 do - circfill(this.x+4+cos(frames/30+i)*8,this.y+4+sin(frames/30+i)*8,1,7) - end - end -} - -flag={ - init=function(this) - this.x+=5 - end, - update=function(this) - if not this.show and this.player_here() then - sfx"55" - sfx_timer,this.show,time_ticking=30,true,false - end - end, - draw=function(this) - spr(118+frames/5%3,this.x,this.y) - if this.show then - camera() - rectfill(32,2,96,31,0) - spr(26,55,6) - ?"x"..fruit_count,64,9,7 - draw_time(49,16) - ?"deaths:"..deaths,48,24,7 - camera(draw_x,draw_y) - end - end -} - -function psfx(num) - if sfx_timer<=0 then - sfx(num) - end -end - --- [tile dict] -tiles={} -foreach(split([[ -1,player_spawn -8,key -11,platform -12,platform -18,spring -20,chest -22,balloon -23,fall_floor -26,fruit -45,fly_fruit -64,fake_wall -86,message -96,big_chest -118,flag -]],"\n"),function(t) - local tile,obj=unpack(split(t)) - tiles[tile]=_ENV[obj] -end) - - --- [object functions] - -function init_object(type,x,y,tile) - --generate and check berry id - local id=x..","..y..","..lvl_id - if type.check_fruit and got_fruit[id] then - return - end - - local obj={ - type=type, - collideable=true, - --collides=false, - spr=tile, - flip=vector(),--false,false - x=x, - y=y, - hitbox=rectangle(0,0,8,8), - spd=vector(0,0), - rem=vector(0,0), - fruit_id=id, - } - - function obj.left() return obj.x+obj.hitbox.x end - function obj.right() return obj.left()+obj.hitbox.w-1 end - function obj.top() return obj.y+obj.hitbox.y end - function obj.bottom() return obj.top()+obj.hitbox.h-1 end - - function obj.is_solid(ox,oy) - for o in all(objects) do - if o!=obj and (o.solid_obj or o.semisolid_obj and not obj.objcollide(o,ox,0) and oy>0) and obj.objcollide(o,ox,oy) then - return true - end - end - return obj.is_flag(ox,oy,0) -- solid terrain - end - - function obj.is_ice(ox,oy) - return obj.is_flag(ox,oy,4) - end - - function obj.is_flag(ox,oy,flag) - for i=max(0,(obj.left()+ox)\8),min(lvl_w-1,(obj.right()+ox)/8) do - for j=max(0,(obj.top()+oy)\8),min(lvl_h-1,(obj.bottom()+oy)/8) do - if fget(tile_at(i,j),flag) then - return true - end - end - end - end - - function obj.objcollide(other,ox,oy) - return other.collideable and - other.right()>=obj.left()+ox and - other.bottom()>=obj.top()+oy and - other.left()<=obj.right()+ox and - other.top()<=obj.bottom()+oy - end - - function obj.check(type,ox,oy) - for other in all(objects) do - if other and other.type==type and other~=obj and obj.objcollide(other,ox,oy) then - return other - end - end - end - - function obj.player_here() - return obj.check(player,0,0) - end - - function obj.move(ox,oy,start) - for axis in all{"x","y"} do - obj.rem[axis]+=axis=="x" and ox or oy - local amt=round(obj.rem[axis]) - obj.rem[axis]-=amt - local upmoving=axis=="y" and amt<0 - local riding=not obj.player_here() and obj.check(player,0,upmoving and amt or -1) - local movamt - if obj.collides then - local step=sign(amt) - local d=axis=="x" and step or 0 - local p=obj[axis] - for i=start,abs(amt) do - if not obj.is_solid(d,step-d) then - obj[axis]+=step - else - obj.spd[axis],obj.rem[axis]=0,0 - break - end - end - movamt=obj[axis]-p --save how many px moved to use later for solids - else - movamt=amt - if (obj.solid_obj or obj.semisolid_obj) and upmoving and riding then - movamt+=obj.top()-riding.bottom()-1 - local hamt=round(riding.spd.y+riding.rem.y) - hamt+=sign(hamt) - if movamt0 and obj.right()+1-hit.left() or amt<0 and obj.left()-hit.right()-1) or 0, - axis=="y" and (amt>0 and obj.bottom()+1-hit.top() or amt<0 and obj.top()-hit.bottom()-1) or 0, - 1) - if obj.player_here() then - kill_player(hit) - end - elseif riding then - riding.move(axis=="x" and movamt or 0, axis=="y" and movamt or 0,1) - end - obj.collideable=true - end - end - end - - function obj.init_smoke(ox,oy) - init_object(smoke,obj.x+(ox or 0),obj.y+(oy or 0),29) - end - - add(objects,obj); - - (obj.type.init or stat)(obj) - - return obj -end - -function destroy_object(obj) - del(objects,obj) -end - -function kill_player(obj) - sfx_timer=12 - sfx"0" - deaths+=1 - destroy_object(obj) - --dead_particles={} - for dir=0,0.875,0.125 do - add(dead_particles,{ - x=obj.x+4, - y=obj.y+4, - t=2, - dx=sin(dir)*3, - dy=cos(dir)*3 - }) - end - delay_restart=15 -end - -function move_camera(obj) - cam_spdx=cam_gain*(4+obj.x-cam_x) - cam_spdy=cam_gain*(4+obj.y-cam_y) - - cam_x+=cam_spdx - cam_y+=cam_spdy - - --clamp camera to level boundaries - local clamped=mid(cam_x,64,lvl_pw-64) - if cam_x~=clamped then - cam_spdx=0 - cam_x=clamped - end - clamped=mid(cam_y,64,lvl_ph-64) - if cam_y~=clamped then - cam_spdy=0 - cam_y=clamped - end -end - --- [level functions] - -function next_level() - local next_lvl=lvl_id+1 - - --check for music trigger - if music_switches[next_lvl] then - music(music_switches[next_lvl],500,7) - end - - load_level(next_lvl) -end - -function load_level(id) - has_dashed,has_key= false--,false - - - --remove existing objects - foreach(objects,destroy_object) - - --reset camera speed - cam_spdx,cam_spdy=0,0 - - local diff_level=lvl_id~=id - - --set level index - lvl_id=id - - --set level globals - local tbl=split(levels[lvl_id]) - for i=1,4 do - _ENV[split"lvl_x,lvl_y,lvl_w,lvl_h"[i]]=tbl[i]*16 - end - lvl_title=tbl[5] - lvl_exit_type=tbl[6] - lvl_pw,lvl_ph=lvl_w*8,lvl_h*8 - - - --level title setup - ui_timer=5 - - --reload map - if diff_level then - reload() - --chcek for mapdata strings - if mapdata[lvl_id] then - replace_mapdata(lvl_x,lvl_y,lvl_w,lvl_h,mapdata[lvl_id]) - end - end - - -- entities - for tx=0,lvl_w-1 do - for ty=0,lvl_h-1 do - local tile=tile_at(tx,ty) - if tiles[tile] then - init_object(tiles[tile],tx*8,ty*8,tile) - end - end - end -end - --- [main update loop] - -function _update() - frames+=1 - if time_ticking then - seconds+=frames\30 - minutes+=seconds\60 - seconds%=60 - end - frames%=30 - - if music_timer>0 then - music_timer-=1 - if music_timer<=0 then - music(10,0,7) - end - end - - if sfx_timer>0 then - sfx_timer-=1 - end - - -- cancel if freeze - if freeze>0 then - freeze-=1 - return - end - - -- restart (soon) - if delay_restart>0 then - cam_spdx,cam_spdy=0,0 - delay_restart-=1 - if delay_restart==0 then - load_level(lvl_id) - end - end - - -- update each object - foreach(objects,function(obj) - obj.move(obj.spd.x,obj.spd.y,0); - (obj.type.update or stat)(obj) - end) - - --move camera to player - foreach(objects,function(obj) - if obj.type==player or obj.type==player_spawn then - move_camera(obj) - end - end) - - -- start game - if is_title() then - if start_game then - start_game_flash-=1 - if start_game_flash<=-30 then - begin_game() - end - elseif btn(🅾️) or btn(❎) then - music"-1" - start_game_flash,start_game=50,true - sfx"38" - end - end -end - --- [drawing functions] - -function _draw() - if freeze>0 then - return - end - - -- reset all palette values - pal() - - -- start game flash - if is_title() then - if start_game then - for i=1,15 do - pal(i, start_game_flash<=10 and ceil(max(start_game_flash)/5) or frames%10<5 and 7 or i) - end - end - - cls() - - -- credits - sspr(unpack(split"72,32,56,32,36,32")) - ?"🅾️/❎",55,80,5 - ?"maddy thorson",40,96,5 - ?"noel berry",46,102,5 - - -- particles - foreach(particles,draw_particle) - - return - end - - -- draw bg color - cls(flash_bg and frames/5 or bg_col) - - -- bg clouds effect - foreach(clouds,function(c) - c.x+=c.spd-cam_spdx - rectfill(c.x,c.y,c.x+c.w,c.y+16-c.w*0.1875,cloud_col) - if c.x>128 then - c.x=-c.w - c.y=rnd"120" - end - end) - - --set cam draw position - draw_x=round(cam_x)-64 - draw_y=round(cam_y)-64 - camera(draw_x,draw_y) - - -- draw bg terrain - map(lvl_x,lvl_y,0,0,lvl_w,lvl_h,4) - - --set draw layering - --0: background layer - --1: default layer - --2: player layer - --3: foreground layer - local layers={{},{},{}} - foreach(objects,function(o) - if o.type.layer==0 then - draw_object(o) --draw below terrain - else - add(layers[o.type.layer or 1],o) --add object to layer, default draw below player - end - end) - - -- draw terrain - map(lvl_x,lvl_y,0,0,lvl_w,lvl_h,2) - - -- draw objects - foreach(layers,function(l) - foreach(l,draw_object) - end) - - -- particles - foreach(particles,draw_particle) - - -- dead particles - foreach(dead_particles,function(p) - p.x+=p.dx - p.y+=p.dy - p.t-=0.2 - if p.t<=0 then - del(dead_particles,p) - end - rectfill(p.x-p.t,p.y-p.t,p.x+p.t,p.y+p.t,14+5*p.t%2) - end) - - -- draw level title - camera() - if ui_timer>=-30 then - if ui_timer<0 then - draw_ui() - end - ui_timer-=1 - end -end - -function draw_particle(p) - p.x+=p.spd-cam_spdx - p.y+=sin(p.off)-cam_spdy - p.off+=min(0.05,p.spd/32) - rectfill(p.x+draw_x,p.y%128+draw_y,p.x+p.s+draw_x,p.y%128+p.s+draw_y,p.c) - if p.x>132 then - p.x=-4 - p.y=rnd"128" - elseif p.x<-4 then - p.x=128 - p.y=rnd"128" - end -end - -function draw_object(obj) - (obj.type.draw or draw_obj_sprite)(obj) -end - -function draw_obj_sprite(obj) - spr(obj.spr,obj.x,obj.y,1,1,obj.flip.x,obj.flip.y) -end - -function draw_time(x,y) - rectfill(x,y,x+32,y+6,0) - ?two_digit_str(minutes\60)..":"..two_digit_str(minutes%60)..":"..two_digit_str(seconds),x+1,y+1,7 -end - -function draw_ui() - rectfill(24,58,104,70,0) - local title=lvl_title or lvl_id.."00 m" - ?title,64-#title*2,62,7 - draw_time(4,4) -end - -function two_digit_str(x) - return x<10 and "0"..x or x -end - --- [helper functions] - -function round(x) - return flr(x+0.5) -end - -function appr(val,target,amount) - return val>target and max(val-amount,target) or min(val+amount,target) -end - -function sign(v) - return v~=0 and sgn(v) or 0 -end - -function tile_at(x,y) - return mget(lvl_x+x,lvl_y+y) -end - -function spikes_at(x1,y1,x2,y2,xspd,yspd) - for i=max(0,x1\8),min(lvl_w-1,x2/8) do - for j=max(0,y1\8),min(lvl_h-1,y2/8) do - if({[17]=y2%8>=6 and yspd>=0, - [27]=y1%8<=2 and yspd<=0, - [43]=x1%8<=2 and xspd<=0, - [59]=x2%8>=6 and xspd>=0})[tile_at(i,j)] then - return true - end - end - end -end - --->8 ---[map metadata] - ---@begin ---level table ---"x,y,w,h,title" -levels={ - "0,0,1,1,lvea,0" -} - ---mapdata string table ---assigned levels will load from here instead of the map -mapdata={ - "¹²³⁴⁵⁶⁷⁸\9\nᵇᶜ\13ᵉᶠ▮■□⁙⁘‖◀▶「」¥•、。゛゜ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~○█▒🐱⬇️░✽●♥☉웃⌂⬅😐♪🅾️◆…➡️★⧗⬆️ˇ∧❎▤▥あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんっゃゅょアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンッャュョ◜◝" -} ---@end - ---list of music switch triggers ---assigned levels will start the tracks set here -music_switches={ - [2]=20, - [3]=30 -} - ---replace mapdata with base256 -function replace_mapdata(x,y,w,h,data) - -- local newdata = "" - -- legacy map loading, can be deleted - - -- local i = 1 - -- while i < #data+1 do - -- if ord(sub(data,i,i)) == 1 then - -- for j=1,ord(sub(data,i+1,i+1)) do - -- newdata = newdata..chr(0) - -- end - -- i = i + 1 - -- else - -- newdata = newdata..sub(data,i,i) - -- end - -- i = i + 1 - -- end - - for i=1,#data do - mset(x+((i-1)%w),y+(i-1)/w,ord(sub(data,i,i))-1) - end -end - ---[[ - -short on tokens? -everything below this comment -is just for grabbing data -rather than loading it -and can be safely removed! - ---]] - ---copy mapdata string to clipboard -function get_mapdata(x,y,w,h) - local reserve="" - for i=0,w*h-1 do - reserve..=num2hex(mget(i%w,i\w)) - end - printh(reserve,"@clip") -end - ---convert mapdata to memory data -function num2hex(v) - return sub(tostr(v,true),5,6) -end -__gfx__ -000000000000000000000000088888800000000000000000000000000000000000aaaaa0000aaa000000a0000007707770077700000000000000000000000000 -000000000888888008888880888888880888888008888800000000000888888000a000a0000a0a000000a0000777777677777770000000000000000000000000 -000000008888888888888888888ffff888888888888888800888888088f1ff1800a909a0000a0a000000a0007766666667767777000000000000000000000000 -00000000888ffff8888ffff888f1ff18888ffff88ffff8808888888888fffff8009aaa900009a9000000a0007677766676666677000000000000000000000000 -0000000088f1ff1888f1ff1808fffff088f1ff1881ff1f80888ffff888fffff80000a0000000a0000000a0000000000000000000000000000000000000000000 -0000000008fffff008fffff00033330008fffff00fffff8088fffff8083333800099a0000009a0000000a0000000000000000000000000000000000000000000 -00000000003333000033330007000070073333000033337008f1ff10003333000009a0000000a0000000a0000000000000000000000000000000000000000000 -000000000070070000700070000000000000070000007000077333700070070000aaa0000009a0000000a0000000000000000000000000000000000000000000 -555555550000000000000000000000000000000000000000008888004999999449999994499909940300b0b06665666500000000000000000000000070000000 -55555555000000000000000000000000000000000000000008888880911111199111411991140919003b33006765676500000000007700000770070007000007 -550000550000000000000000000000000aaaaaa00000000008788880911111199111911949400419028888206770677000000000007770700777000000000000 -55000055007000700499994000000000a998888a0000000008888880911111199494041900000044089888800700070000000000077777700770000000000000 -55000055007000700050050000000000a988888a0000000008888880911111199114094994000000088889800700070000000000077777700000700000000000 -55000055067706770005500000000000aaaaaaaa0000000008888880911111199111911991400499088988800000000000000000077777700000077000000000 -55555555567656760050050000000000a980088a0000000000888800911111199114111991404119028888200000000000000000070777000007077007000070 -55555555566656660005500004999940a988888a0000000000000000499999944999999444004994002882000000000000000000000000007000000000000000 -5777777557777777777777777777777577cccccccccccccccccccc77577777755555555555555555555555555500000007777770000000000000000000000000 -77777777777777777777777777777777777cccccccccccccccccc777777777775555555555555550055555556670000077777777000777770000000000000000 -777c77777777ccccc777777ccccc7777777cccccccccccccccccc777777777775555555555555500005555556777700077777777007766700000000000000000 -77cccc77777cccccccc77cccccccc7777777cccccccccccccccc7777777cc7775555555555555000000555556660000077773377076777000000000000000000 -77cccc7777cccccccccccccccccccc777777cccccccccccccccc777777cccc775555555555550000000055555500000077773377077660000777770000000000 -777cc77777cc77ccccccccccccc7cc77777cccccccccccccccccc77777cccc775555555555500000000005556670000073773337077770000777767007700000 -7777777777cc77cccccccccccccccc77777cccccccccccccccccc77777c7cc77555555555500000000000055677770007333bb37070000000700007707777770 -5777777577cccccccccccccccccccc7777cccccccccccccccccccc7777cccc77555555555000000000000005666000000333bb30000000000000000000077777 -77cccc7777cccccccccccccccccccc77577777777777777777777775777ccc775555555550000000000000050000066603333330000000000000000000000000 -777ccc7777cccccccccccccccccccc77777777777777777777777777777cc7775055555555000000000000550007777603b333300000000000ee0ee000000000 -777ccc7777cc7cccccccccccc77ccc777777ccc7777777777ccc7777777cc77755550055555000000000055500000766033333300000000000eeeee000000030 -77ccc77777ccccccccccccccc77ccc77777ccccc7c7777ccccccc77777ccc777555500555555000000005555000000550333b33000000000000e8e00000000b0 -77ccc777777cccccccc77cccccccc777777ccccccc7777c7ccccc77777cccc7755555555555550000005555500000666003333000000b00000eeeee000000b30 -777cc7777777ccccc777777ccccc77777777ccc7777777777ccc777777cccc775505555555555500005555550007777600044000000b000000ee3ee003000b00 -777cc777777777777777777777777777777777777777777777777777777cc7775555555555555550055555550000076600044000030b00300000b00000b0b300 -77cccc77577777777777777777777775577777777777777777777775577777755555555555555555555555550000005500999900030330300000b00000303300 -5777755700000000077777777777777777777770077777700000000000000000cccccccc00000000000000000000000000000000000000000000000000000000 -7777777700000000700007770000777000007777700077770000000000000000c77ccccc00000000000000000000000000000000000000000000000000000000 -7777cc770000000070cc777cccc777ccccc7770770c777070000000000000000c77cc7cc00000000000000000000000000000000000000000000000000000000 -777ccccc0000000070c777cccc777ccccc777c0770777c070000000000000000cccccccc00000000000000000000000000006000000000000000000000000000 -77cccccc00000000707770000777000007770007777700070002eeeeeeee2000cccccccc00000000000000000000000000060600000000000000000000000000 -57cc77cc0000000077770000777000007770000777700007002eeeeeeeeee200cc7ccccc00000000000000000000000000d00060000000000000000000000000 -577c77cc000000007000000000000000000c000770000c0700eeeeeeeeeeee00ccccc7cc0000000000000000000000000d00000c000000000000000000000000 -777ccccc000000007000000000000000000000077000000700e22222e2e22e00cccccccc000000000000000000000000d000000c000000000000000000000000 -777ccccc000000007000000000000000000000077000000700eeeeeeeeeeee000000000000000000000000000000000c0000000c000600000000000000000000 -577ccccc000000007000000c000000000000000770cc000700e22e2222e22e00000000000000000000000000000000d000000000c060d0000000000000000000 -57cc7ccc0000000070000000000cc0000000000770cc000700eeeeeeeeeeee0000000000000000000000000000000c00000000000d000d000000000000000000 -77cccccc0000000070c00000000cc00000000c0770000c0700eee222e22eee0000000000000000000000000000000c0000000000000000000000000000000000 -777ccccc000000007000000000000000000000077000000700eeeeeeeeeeee005555555506666600666666006600c00066666600066666006666660066666600 -7777cc770000000070000000000000000000000770c0000700eeeeeeeeeeee00555555556666666066666660660c000066666660666666606666666066666660 -777777770000000070000000c0000000000000077000000700ee77eee7777e005555555566000660660000006600000066000000660000000066000066000000 -57777577000000007000000000000000000000077000c007077777777777777055555555dd000000dddd0000dd000000dddd0000ddddddd000dd0000dddd0000 -000000000000000070000000000000000000000770000007007777005000000000000005dd000dd0dd000000dd0000d0dd000000000000d000dd0000dd000000 -00aaaaaa00000000700000000000000000000007700c0007070000705500000000000055ddddddd0dddddd00ddddddd0dddddd00ddddddd000dd0000dddddd00 -0a99999900000000700000000000c00000000007700000077077000755500000000005550ddddd00ddddddd0ddddddd0ddddddd00ddddd0000dd0000ddddddd0 -a99aaaaa000000007000000cc0000000000000077000cc077077bb07555500000000555500000000000000000000000000000000000000000000000000000000 -a9aaaaaa000000007000000cc0000000000c00077000cc07700bbb0755555555555555550000000000000c000000000000000000000000000000c00000000000 -a99999990000000070c00000000000000000000770c00007700bbb075555555555555555000000000000c00000000000000000000000000000000c0000000000 -a999999900000000700000000000000000000007700000070700007055555555555555550000000000cc0000000000000000000000000000000000c000000000 -a99999990000000007777777777777777777777007777770007777005555555555555555000000000c000000000000000000000000000000000000c000000000 -aaaaaaaa0000000007777777777777777777777007777770004bbb00004b000000400bbb00000000c0000000000000000000000000000000000000c000000000 -a49494a10000000070007770000077700000777770007777004bbbbb004bb000004bbbbb0000000100000000000000000000000000000000000000c00c000000 -a494a4a10000000070c777ccccc777ccccc7770770c7770704200bbb042bbbbb042bbb00000000c0000000000000000000000000000000000000001010c00000 -a49444aa0000000070777ccccc777ccccc777c0770777c07040000000400bbb004000000000001000000000000000000000000000000000000000001000c0000 -a49999aa000000007777000007770000077700077777000704000000040000000400000000000100000000000000000000000000000000000000000000010000 -a49444990000000077700000777000007770000777700c0742000000420000004200000000000100000000000000000000000000000000000000000000001000 -a494a444000000007000000000000000000000077000000740000000400000004000000000000000000000000000000000000000000000000000000000000000 -a4949999000000000777777777777777777777700777777040000000400000004000000000010000000000000000000000000000000000000000000000000010 -cc000000000000000000000ccccccccc000000000000000000000000000000000070070007007000070000700007070000007070000007000000000000000000 -c00cccccccccccccccccccc0000ccccc000000000000000000000000000000000777077700077000077707070777077707770770777070707770000000000000 -c0cccccccccccccccccccccccc000ccc000000000000000000000000000000000070070707007700070707770707070707070770700077707070000000000000 -c0cccccccccccccccccccccccccc00cc000000000000000008800000088000080070070707077700077707070777077707770700777070707070000000000000 -c0ccccccccccccccccccccccccccc0cc000000088800000088800000880880880000000000000000000000000000000000000000000000000000000000000000 -c0ccccc0ccccccccccccccccccccc00c000888880088000880080000800000880007770700700777077700070770070070077070070007770000077707077700 -c0ccccc0ccccccccccc0cccccccccc0c008000880008000800080000800008880007000007770700070700077770707077070700070007000707070707070000 -c0ccccc0ccccccccccc0cccccccccc0c008000080008000080088000080000800007770700700777070700077070777070770700070007770707077707077700 -c0ccccc0ccccccccccc0cccccccccc0c008000080008000080088000800000800007000700700007077700077070707070070700077707000077070007000700 -c0cccc00ccccccccccc0cccccccccc0c000000000000000088880000000000800000000000000777000000000000000000000000000007770000077700007700 -c0cccc0cccccccccccc0cccccccccc0c000000000000000000000000000000800000000000000000004444000000000000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c000000000000000000000000000000000000000000000000004ff440000f444000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c00000000000000000000080000000000000000066666666666ffff00000fff4000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c00000800008888000000000000008000006666666666666666ffff00000fff0000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c00000800008008008880000008008800666666666666666666ffff00000fff7700000000000000000000000000000000 -0ccccccccccccccccccccccccccccc0c00000880008888008088080008088808666666666666666666555560000fff7700000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c000000880008000080080800888888086666666666666666555555555000777770000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c000000080008000080000800080880086655555556666666555555555000777770000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c000008880008000080000800080880086655555556666666555555555007777770000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c0000000000080000800080000800880866555555556f5555555555555007777777000000000000000000000000000000 -cccccccccccccccccccc0ccccccccc0c0000000000000000000000000000000866555555556ff555555555550007777777000000000000000000000000000000 -cccccccccccccccccccc0ccccccccc0c000000000000000000000000000000006655555556666665555555550077777777000000000000000000000000000000 -ccccccccccccccccccc0cccccccccc0c000000000000000000000000000000006655555666666666555555555077777777000000000000000000000000000000 -0cccc00cccccccccccc0ccccccccc00c000000000000000088000008000000006666666666666666555555555077777777000000000000000000000000000000 -0ccccc00ccccccccc000ccccccccc0cc000000008000000888800008000000006666666666666666555555555077777777000000000000000000000000000000 -0ccccccc0000000000cccccccccc00cc000000008000000800800008000000006666666666666666555555555577777777000000000000000000000000000000 -0ccccccccccccccccccccccccccc0ccc000000008800000800800088000000006666666666666665555555555577777777000000000000000000000000000000 -00ccccccccccccccccccccccccc0cccc000000000800000800800088000000006666666666660000555555555077777777000000000000000000000000000000 -c0ccccccccccccccccccccccccc0cccc000000000800008800800008000000006666666666000000555555555077777707000000000000000000000000000000 -cc000000cccccccccccccccccc00cccc000000000800000888800000000000006666666600000000055505550077777700000000000000000000000000000000 -ccccccc000cccccccccccccccc0ccccc000000000000000000000000000000006666666000000000055005550077777700000000000000000000000000000000 -cccccccccc000ccccccccccc00cccccc000000000000000000000000000000006666000000000000005005500007777700000000000000000000000000000000 -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -__label__ -cccccccccccccccccccccccccccccccccccccc775500000000000000000000000000000000070000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccc776670000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccc77ccc776777700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccc77ccc776660000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccc7cccccc6ccccccccc7775500000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccc77776670000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccc777777776777700000000000000000000000000000000000000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccccc777777756661111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc77011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccc7777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccc7777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111311b1b111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc7700000000003b330000000000000000000000000000000000000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc77000000000288882000000000000000000000000000000000000070000000000000000000000000000000000000000000 -cccccccc66cccccccccccccccccccc77000000000898888000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc66ccccccccccccccc77ccc77000000000888898000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccc77ccc77000000000889888000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccc77cccccccc777000000000288882000000000000000000000000000000000000000000000000000000000000000000000006600000000 -ccccccccccccccccc777777ccccc7777000000000028820000000000000000000000000000000000000000000000000000000000000000000000006600000000 -cccccccccccccccc7777777777777777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -6ccccccccccccccc7777777777777775111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -cccccccccccccc776665666566656665111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -ccccccccccccc7776765676567656765111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -ccccccccccccc7776771677167716771111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccc77771711171117111711111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccc77771711171117111711111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -ccccccccccccc7770000000000000011111111111111111111111111111111171111111111111111111111110000000000000001161111111111111111111111 -ccccccccccccc7770000000000000011111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccccc770000000000000011111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000 -cccccccccccccc770000000000000011111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000111111111111111111111111111111111111111111111100060000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccc77ccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccc77ccc770000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc777777750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccc77550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccc77667000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -c77ccc77677770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -c77ccc77666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000770000000000011 -ccccc777550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000770000000000011 -cccc7777667000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -77777777677770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -77777775666000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000011 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077777700000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777733770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777733770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000737733370000001111111111 -555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007333bb370000001111111111 -555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000333bb300000001111111111 -55555555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033333300000001111111111 -50555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee0ee003b333300000001111111111 -55550055555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeeee0033333300000001111111111 -555500555555000000000000000000000000000000000000000000000000000000111111111111111111111111111111111e8e111333b3300000001111111111 -55555555555550000000000000000000000000000000000000000000000000000011111111111111111111111111b11111eeeee1113333000000001111111111 -5505555555555500000000000000000000000000000000000000000000000000001111111111111111111111111b111111ee3ee1110440000000001111111111 -5555555555555550000000000000000000000000000000000000000000000000001111111117111111111111131b11311111b111110440000000000000000111 -5555555555555555000000000000000000000000000000000000000000000000001111111111111111111111131331311111b111119999000000000000000111 -55555555555555550000000000000000077777700000000000000000000000000011111111111111511111115777777777777777777777755000000000000005 -55555555555555500000000000000000777777770000000000000000000000000011111111111111551111117777777777777777777777775500000000000055 -55555555555555000000000000000000777777770000000000000000000000000011111111111111555111117777ccccc777777ccccc77775550000000000555 -5555555555555000000000000000000077773377111111111111111111111111111111111111111155551111777cccccccc77cccccccc7775555000000005555 -555555555555000000000000000000007777337711111111111111111111111111111111111111115555511177cccccccccccccccccccc775555500000055555 -555555555550000000000000000000007377333711111111111111111111111111111111111110005555550077cc77ccccccccccccc7cc775555550000555555 -555555555500000000000000000000007333bb3711111111111111111111111111111111111110005555555077cc77cccccccccccccccc775555555005555555 -555555555000000000000000000000000333bb3111111111111111111111111111111111111110005555555577cccccccccccccccccc66775555555555555555 -555555555555555555555555000000000333333111111111111111111111111111111111111110055555555577ccccccccccccccc6cc66775555555555555555 -5555555555555555555555500000000003b3333111111111111111111111111111111111111110555055555577cccccccccccccccccccc775555555550555555 -555555555555555555555500000000300333333111111111111111111111111111111111111115555555005577cc7cccccccccccc77ccc775555555555550055 -555555555555555555555000000000b00333b33111111111111111111111111111111111111155555555005577ccccccccccccccc77ccc775555555555550055 -55555555555555555555000000000b3000333311111111111111111111111111111111111115555555555555777cccccccc77cccccccc7775555555555555555 -55555555555555555550000003000b00000440000000000000000000000000000000000000555555550555557777ccccc777777ccccc77775555555555055555 -55555555555555555500000000b0b300000440000000000000000000000000000000000005555555555555557777777777777777777777775555555555555555 -55555555555555555000000000303300009999000000000000000000000000000000000055555555555555555777777777777777777777755555555555555555 -55555555555555555777777777777777777777750000000000000000000000000000000555555555555555555555555500000000555555555555555555555555 -55555555505555557777777777777777777777770000000088888880000000000000005550555555555555555555555000000000055555550555555555555555 -55555555555500557777ccccc777777ccccc77770000000888888888000000300000055555550055555555555555550000000000005555550055555555555555 -5555555555550055777cccccccc77cccccccc77700000008888ffff8000000b00000555555550055555555555555500000000000000555550005555555555555 -555555555555555577cccccccccccccccccccc770000b00888f1ff1800000b300005555555555555555555555555000000000000000055550000555555555555 -555555555505555577cc77ccccccccccccc7cc77000b000088fffff003000b000055555555055555555555555550000000000000000005550000055555555555 -555555555555555577cc77cccccccccccccccc77131b11311833331000b0b3000555555555555555555555555500000000888800000000550000005555555555 -555555555555575577cccccccccccccccccccc771313313111711710703033005555555555555555555555555000000008888880000000050000000555555555 -7777777777777777cccccccccccccccccccccccc7777777777777777777777755555555555555555555555550000000008788880000000000000000055555555 -7777777777777777cccccccccccccccccccccccc7777777777777777777777775555555555555555555555550000000008888880000000000000000055555550 -c777777cc777777cccccccccccccccccccccccccc777777cc777777ccccc77775555555555555555555555550000000008888880000000000000000055555500 -ccc77cccccc77cccccccccccccccccccccccccccccc77cccccc77cccccccc7775555555555555555555555550000000008888880000000000000000055555000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000888800000000000000000055550000 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc7cc775555555555555555555555550000000000006000000000000000000055500000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060000000000000000000055000000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060001111111111111111151111111 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060001111111111111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555550555555500000000000060001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc77ccc775500005555555500555555600000000000006001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc77ccc775500005555555000555550000000000000006001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccc77cccccccc7775500005555550000555500000000000000000001111111111111111111111111 -cccccccccccccc7cccccccccccccccccccccccccccccccccc777777ccccc77775500005555500000555000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccccc77777777777777775555555555000000550000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccccc77777777777777755555555550000000500000000000000000000000007700000000000000000000 -ccccccccccccccccccccccccccccccccccccccccc77ccc7700000000555555555555555500000000000000000000000000000000007700000000000000000000 -ccccccccccccccccccccccccccccccccccccccccc77cc77700000000055555555555555000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000005555555555550000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccc777770000000000555555555500000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000055555555000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000005555550000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000555500000000000000000000000000000000000000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000055000000000000000000000000000000000000000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000000000000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000006000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000000000000000000000000000000000000000000000000000007000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000000000000000000000000000000000000000000000000000000000000000000000 - -__gff__ -0000000000000000000000000000000004020000000000000000000200000000030303030303030304040402020000000303030303030303040404020202020200001313131302020300020202020202000013131313020204020202020202020000131313130004040202020202020200001313131300000002020202020202 -0202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020202020200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -__map__ -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -__sfx__ -0002000036370234702f3701d4702a37017470273701347023370114701e3700e4701a3600c46016350084401233005420196001960019600196003f6003f6003f6003f6003f6003f6003f6003f6003f6003f600 -0002000011070130701a0702407000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000300000d07010070160702207000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000200000642008420094200b420224402a4503c6503b6503b6503965036650326502d6502865024640216401d6401a64016630116300e6300b62007620056100361010600106000060000600006000060000600 -000400000f0701e070120702207017070260701b0602c060210503105027040360402b0303a030300203e02035010000000000000000000000000000000000000000000000000000000000000000000000000000 -000300000977009770097600975008740077300672005715357003470034700347003470034700347003570035700357003570035700347003470034700337003370033700337000070000700007000070000700 -00030000241700e1702d1701617034170201603b160281503f1402f120281101d1101011003110001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100 -00020000101101211014110161101a120201202613032140321403410000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100 -00030000070700a0700e0701007016070220702f0702f0602c0602c0502f0502f0402c0402c0302f0202f0102c000000000000000000000000000000000000000000000000000000000000000000000000000000 -0003000005110071303f6403f6403f6303f6203f6103f6153f6003f6003f600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600 -011000200177500605017750170523655017750160500605017750060501705076052365500605017750060501775017050177500605236550177501605006050177500605256050160523655256050177523655 -002000001d0401d0401d0301d020180401804018030180201b0301b02022040220461f0351f03016040160401d0401d0401d002130611803018030180021f061240502202016040130201d0401b0221804018040 -00100000070700706007050110000707007060030510f0700a0700a0600a0500a0000a0700a0600505005040030700306003000030500c0700c0601105016070160600f071050500a07005050030510a0700a060 -000400000c5501c5601057023570195702c5702157037570285703b5702c5703e560315503e540315303e530315203f520315203f520315103f510315103f510315103f510315103f50000500005000050000500 -000400002f7402b760267701d7701577015770197701c750177300170015700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700 -00030000096450e655066550a6550d6550565511655076550c655046550965511645086350d615006050060500605006050060500605006050060500605006050060500605006050060500605006050060500605 -011000001f37518375273752730027300243001d300263002a3001c30019300003000030000300003000030000300003000030000300003000030000300003000030000300003000030000300003000030000300 -011000002953429554295741d540225702256018570185701856018500185701856000500165701657216562275142753427554275741f5701f5601f500135201b55135530305602454029570295602257022560 -011000200a0700a0500f0710f0500a0600a040110701105007000070001107011050070600704000000000000a0700a0500f0700f0500a0600a0401307113050000000000013070130500f0700f0500000000000 -002000002204022030220201b0112404024030270501f0202b0402202027050220202904029030290201601022040220302b0401b030240422403227040180301d0401d0301f0521f0421f0301d0211d0401d030 -0108002001770017753f6253b6003c6003b6003f6253160023650236553c600000003f62500000017750170001770017753f6003f6003f625000003f62500000236502365500000000003f625000000000000000 -002000200a1400a1300a1201113011120111101b1401b13018152181421813213140131401313013120131100f1400f1300f12011130111201111016142161321315013140131301312013110131101311013100 -001000202e750377502e730377302e720377202e71037710227502b750227302b7301d750247501d730247301f750277501f730277301f7202772029750307502973030730297203072029710307102971030710 -000600001877035770357703576035750357403573035720357103570000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700 -001800202945035710294403571029430377102942037710224503571022440274503c710274403c710274202e450357102e440357102e430377102e420377102e410244402b45035710294503c710294403c710 -0018002005570055700557005570055700000005570075700a5700a5700a570000000a570000000a5700357005570055700557000000055700557005570000000a570075700c5700c5700f570000000a57007570 -010c00103b6352e6003b625000003b61500000000003360033640336303362033610336103f6003f6150000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000c002024450307102b4503071024440307002b44037700244203a7102b4203a71024410357102b410357101d45033710244503c7101d4403771024440337001d42035700244202e7101d4102e7102441037700 -011800200c5700c5600c550000001157011560115500c5000c5700c5600f5710f56013570135600a5700a5600c5700c5600c550000000f5700f5600f550000000a5700a5600a5500f50011570115600a5700a560 -001800200c5700c5600c55000000115701156011550000000c5700c5600f5710f56013570135600f5700f5600c5700c5700c5600c5600c5500c5300c5000c5000c5000a5000a5000a50011500115000a5000a500 -000c0020247712477024762247523a0103a010187523a0103501035010187523501018750370003700037000227712277222762227001f7711f7721f762247002277122772227620070027771277722776200700 -000c0020247712477024762247523a0103a010187503a01035010350101875035010187501870018700007001f7711f7701f7621f7521870000700187511b7002277122770227622275237012370123701237002 -000c0000247712477024772247722476224752247422473224722247120070000700007000070000700007002e0002e0002e0102e010350103501033011330102b0102b0102b0102b00030010300123001230012 -000c00200c3320c3320c3220c3220c3120c3120c3120c3020c3320c3320c3220c3220c3120c3120c3120c30207332073320732207322073120731207312073020a3320a3320a3220a3220a3120a3120a3120a302 -000c00000c3300c3300c3200c3200c3100c3100c3103a0000c3300c3300c3200c3200c3100c3100c3103f0000a3300a3201333013320073300732007310113000a3300a3200a3103c0000f3300f3200f3103a000 -00040000336251a605000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005 -000c00000c3300c3300c3300c3200c3200c3200c3100c3100c3100c31000000000000000000000000000000000000000000000000000000000000000000000000a3000a3000a3000a3000a3310a3300332103320 -001000000c3500c3400c3300c3200f3500f3400f3300f320183501834013350133401835013350163401d36022370223702236022350223402232013300133001830018300133001330016300163001d3001d300 -000c0000242752b27530275242652b26530265242552b25530255242452b24530245242352b23530235242252b22530225242152b21530215242052b20530205242052b205302053a2052e205002050020500205 -001000102f65501075010753f615010753f6152f65501075010753f615010753f6152f6553f615010753f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -0010000016270162701f2711f2701f2701f270182711827013271132701d2711d270162711627016270162701b2711b2701b2701b270000001b200000001b2000000000000000000000000000000000000000000 -00080020245753057524545305451b565275651f5752b5751f5452b5451f5352b5351f5252b5251f5152b5151b575275751b545275451b535275351d575295751d545295451d535295351f5752b5751f5452b545 -002000200c2650c2650c2550c2550c2450c2450c2350a2310f2650f2650f2550f2550f2450f2450f2351623113265132651325513255132451324513235132351322507240162701326113250132420f2600f250 -00100000072750726507255072450f2650f2550c2750c2650c2550c2450c2350c22507275072650725507245072750726507255072450c2650c25511275112651125511245132651325516275162651625516245 -000800201f5702b5701f5402b54018550245501b570275701b540275401857024570185402454018530245301b570275701b540275401d530295301d520295201f5702b5701f5402b5401f5302b5301b55027550 -00100020112751126511255112451326513255182751826518255182451d2651d2550f2651824513275162550f2750f2650f2550f2451126511255162751626516255162451b2651b255222751f2451826513235 -00100010010752f655010753f6152f6553f615010753f615010753f6152f655010752f6553f615010753f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -001000100107501075010753f6152f6553f6153f61501075010753f615010753f6152f6553f6152f6553f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -002000002904029040290302b031290242b021290142b01133044300412e0442e03030044300302b0412b0302e0442e0402e030300312e024300212e024300212b0442e0412b0342e0212b0442b0402903129022 -000800202451524515245252452524535245352454524545245552455524565245652457500505245750050524565005052456500505245550050524555005052454500505245350050524525005052451500505 -000800201f5151f5151f5251f5251f5351f5351f5451f5451f5551f5551f5651f5651f575000051f575000051f565000051f565000051f555000051f555000051f545000051f535000051f525000051f51500005 -000500000373005731077410c741137511b7612437030371275702e5712437030371275702e5712436030361275602e5612435030351275502e5512434030341275402e5412433030331275202e5212431030311 -002000200c2750c2650c2550c2450c2350a2650a2550a2450f2750f2650f2550f2450f2350c2650c2550c2450c2750c2650c2550c2450c2350a2650a2550a2450f2750f2650f2550f2450f235112651125511245 -002000001327513265132551324513235112651125511245162751626516255162451623513265132551324513275132651325513245132350f2650f2550f2450c25011231162650f24516272162520c2700c255 -000300001f3302b33022530295301f3202b32022520295201f3102b31022510295101f3002b300225002950000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000b00002935500300293453037030360303551330524300243050030013305243002430500300003002430024305003000030000300003000030000300003000030000300003000030000300003000030000300 -001000003c5753c5453c5353c5253c5153c51537555375453a5753a5553a5453a5353a5253a5253a5153a51535575355553554535545355353553535525355253551535515335753355533545335353352533515 -00100000355753555535545355353552535525355153551537555375353357533555335453353533525335253a5753a5453a5353a5253a5153a51533575335553354533545335353353533525335253351533515 -001000200c0600c0300c0500c0300c0500c0300c0100c0000c0600c0300c0500c0300c0500c0300c0100f0001106011030110501103011010110000a0600a0300a0500a0300a0500a0300a0500a0300a01000000 -001000000506005030050500503005010050000706007030070500703007010000000f0600f0300f010000000c0600c0300c0500c0300c0500c0300c0500c0300c0500c0300c010000000c0600c0300c0100c000 -0010000003625246150060503615246251b61522625036150060503615116253361522625006051d6250a61537625186152e6251d615006053761537625186152e6251d61511625036150060503615246251d615 -00100020326103261032610326103161031610306102e6102a610256101b610136100f6100d6100c6100c6100c6100c6100c6100f610146101d610246102a6102e61030610316103361033610346103461034610 -00400000302453020530235332252b23530205302253020530205302253020530205302153020530205302152b2452b2052b23527225292352b2052b2252b2052b2052b2252b2052b2052b2152b2052b2052b215 -__music__ -01 150a5644 -00 0a160c44 -00 0a160c44 -00 0a0b0c44 -00 14131244 -00 0a160c44 -00 0a160c44 -02 0a111244 -00 41424344 -00 41424344 -01 18191a44 -00 18191a44 -00 1c1b1a44 -00 1d1b1a44 -00 1f211a44 -00 1f1a2144 -00 1e1a2244 -02 201a2444 -00 41424344 -00 41424344 -01 2a272944 -00 2a272944 -00 2f2b2944 -00 2f2b2c44 -00 2f2b2944 -00 2f2b2c44 -00 2e2d3044 -00 34312744 -02 35322744 -00 41424344 -01 3d7e4344 -00 3d7e4344 -00 3d4a4344 -02 3d3e4344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -01 383a3c44 -02 393b3c44 \ No newline at end of file diff --git a/morespritescore copy.p8 b/morespritescore copy.p8 deleted file mode 100644 index ed52885..0000000 --- a/morespritescore copy.p8 +++ /dev/null @@ -1,1810 +0,0 @@ -pico-8 cartridge // http://www.pico-8.com -version 34 -__lua__ ---~morespritescore~ ---a fork of a celeste classic mod base ---v2.1.0 - ---original game by: ---maddy thorson + noel berry - ---major project contributions by ---taco360, meep, gonengazit, and akliant - --- [data structures] - -function vector(x,y) - return {x=x,y=y} -end - -function rectangle(x,y,w,h) - return {x=x,y=y,w=w,h=h} -end - --- [globals] - ---tables -objects,got_fruit={},{} ---timers -freeze,delay_restart,sfx_timer,music_timer,ui_timer=0,0,0,0,-99 ---camera values -draw_x,draw_y,cam_x,cam_y,cam_spdx,cam_spdy,cam_gain=0,0,0,0,0,0,0.25 - --- [entry point] - -function _init() - frames,start_game_flash=0,0 - music(40,0,7) - lvl_id=0 -end - -function begin_game() - max_djump=1 - deaths,frames,seconds,minutes,music_timer,time_ticking,fruit_count,bg_col,cloud_col=0,0,0,0,0,true,0,0,1 - music(0,0,7) - load_level(1) -end - -function is_title() - return lvl_id==0 -end - --- [effects] - -clouds={} -for i=0,16 do - add(clouds,{ - x=rnd"128", - y=rnd"128", - spd=1+rnd"4", - w=32+rnd"32"}) -end - -particles={} -for i=0,24 do - add(particles,{ - x=rnd"128", - y=rnd"128", - s=flr(rnd"1.25"), - spd=0.25+rnd"5", - off=rnd(), - c=6+rnd"2", - }) -end - -dead_particles={} - --- [player entity] - -player={ - layer=2, - init=function(this) - this.grace,this.jbuffer=0,0 - this.djump=max_djump - this.dash_time,this.dash_effect_time=0,0 - this.dash_target_x,this.dash_target_y=0,0 - this.dash_accel_x,this.dash_accel_y=0,0 - this.hitbox=rectangle(1,3,6,5) - this.spr_off=0 - this.collides=true - create_hair(this) - end, - update=function(this) - if pause_player then - return - end - - -- horizontal input - local h_input=btn(➡️) and 1 or btn(⬅️) and -1 or 0 - - -- spike collision / bottom death - if spikes_at(this.left(),this.top(),this.right(),this.bottom(),this.spd.x,this.spd.y) then - kill_player(this) - end - - -- on ground checks - local on_ground=this.is_solid(0,1) - - -- landing smoke - if on_ground and not this.was_on_ground then - this.init_smoke(0,4) - end - - -- jump and dash input - local jump,dash=btn(🅾️) and not this.p_jump,btn(❎) and not this.p_dash - this.p_jump,this.p_dash=btn(🅾️),btn(❎) - - -- jump buffer - if jump then - this.jbuffer=4 - elseif this.jbuffer>0 then - this.jbuffer-=1 - end - - -- grace frames and dash restoration - if on_ground then - this.grace=6 - if this.djump0 then - this.grace-=1 - end - - -- dash effect timer (for dash-triggered events, e.g., berry blocks) - this.dash_effect_time-=1 - - -- dash startup period, accel toward dash target speed - if this.dash_time>0 then - this.init_smoke() - this.dash_time-=1 - this.spd=vector(appr(this.spd.x,this.dash_target_x,this.dash_accel_x),appr(this.spd.y,this.dash_target_y,this.dash_accel_y)) - else - -- x movement - local maxrun=1 - local accel=this.is_ice(0,1) and 0.05 or on_ground and 0.6 or 0.4 - local deccel=0.15 - - -- set x speed - this.spd.x=abs(this.spd.x)<=1 and - appr(this.spd.x,h_input*maxrun,accel) or - appr(this.spd.x,sign(this.spd.x)*maxrun,deccel) - - -- facing direction - if this.spd.x~=0 then - this.flip.x=this.spd.x<0 - end - - -- y movement - local maxfall=2 - - -- wall slide - if h_input~=0 and this.is_solid(h_input,0) and not this.is_ice(h_input,0) then - maxfall=0.4 - -- wall slide smoke - if rnd"10"<2 then - this.init_smoke(h_input*6) - end - end - - -- apply gravity - if not on_ground then - this.spd.y=appr(this.spd.y,maxfall,abs(this.spd.y)>0.15 and 0.21 or 0.105) - end - - -- jump - if this.jbuffer>0 then - if this.grace>0 then - -- normal jump - psfx"1" - this.jbuffer=0 - this.grace=0 - this.spd.y=-2 - this.init_smoke(0,4) - else - -- wall jump - local wall_dir=(this.is_solid(-3,0) and -1 or this.is_solid(3,0) and 1 or 0) - if wall_dir~=0 then - psfx"2" - this.jbuffer=0 - this.spd=vector(wall_dir*(-1-maxrun),-2) - if not this.is_ice(wall_dir*3,0) then - -- wall jump smoke - this.init_smoke(wall_dir*6) - end - end - end - end - - -- dash - local d_full=5 - local d_half=3.5355339059 -- 5 * sqrt(2) - - if this.djump>0 and dash then - this.init_smoke() - this.djump-=1 - this.dash_time=4 - has_dashed=true - this.dash_effect_time=10 - -- vertical input - local v_input=btn(⬆️) and -1 or btn(⬇️) and 1 or 0 - -- calculate dash speeds - this.spd=vector(h_input~=0 and - h_input*(v_input~=0 and d_half or d_full) or - (v_input~=0 and 0 or this.flip.x and -1 or 1) - ,v_input~=0 and v_input*(h_input~=0 and d_half or d_full) or 0) - -- effects - psfx"3" - freeze=2 - -- dash target speeds and accels - this.dash_target_x=2*sign(this.spd.x) - this.dash_target_y=(this.spd.y>=0 and 2 or 1.5)*sign(this.spd.y) - this.dash_accel_x=this.spd.y==0 and 1.5 or 1.06066017177 -- 1.5 * sqrt() - this.dash_accel_y=this.spd.x==0 and 1.5 or 1.06066017177 - elseif this.djump<=0 and dash then - -- failed dash smoke - psfx"9" - this.init_smoke() - end - end - - -- animation - this.spr_off+=0.25 - this.spr = not on_ground and (this.is_solid(h_input,0) and 5 or 3) or -- wall slide or mid air - btn(⬇️) and 6 or -- crouch - btn(⬆️) and 7 or -- look up - this.spd.x~=0 and h_input~=0 and 1+this.spr_off%4 or 1 -- walk or stand - - -- exit level (except summit) - if levels[lvl_id+1] then - -- top exit - if this.y<-4 and lvl_exit_type == 0 then - next_level() - end - -- right exit - if this.x > lvl_pw and lvl_exit_type == 1 then - next_level() - end - -- left exit - if this.x<-4 and lvl_exit_type == 2 then - next_level() - end - -- bottom exit - if this.y > lvl_ph then - if lvl_exit_type == 3 then - next_level() - else - kill_player(this) - end - end - end - - -- was on the ground - this.was_on_ground=on_ground - end, - - draw=function(this) - -- clamp in screen - local bound_l = -1 - local bound_r = lvl_pw-7 - local bound_t = -1 - local bound_b = lvl_ph+100 - - if lvl_exit_type == 0 then - bound_t = -100 - elseif lvl_exit_type == 1 then - bound_r = lvl_pw+100 - elseif lvl_exit_type == 2 then - bound_l = -100 - elseif lvl_exit_type == 3 then - bound_b = lvl_ph+100 - end - local clampx = mid(this.x,bound_l,bound_r) - local clampy = mid(this.y,bound_t,bound_b) - - if this.x~=clampx then - this.x=clampx - this.spd.x=0 - end - if this.y~=clampy then - this.y=clampy - this.spd.y=0 - end - -- draw player hair and sprite - set_hair_color(this.djump) - draw_hair(this) - draw_obj_sprite(this) - pal() - end -} - -function create_hair(obj) - obj.hair={} - for i=1,5 do - add(obj.hair,vector(obj.x,obj.y)) - end -end - -function set_hair_color(djump) - pal(8,djump==1 and 8 or djump==2 and 7+frames\3%2*4 or 12) -end - -function draw_hair(obj) - local last=vector(obj.x+(obj.flip.x and 6 or 2),obj.y+(btn(⬇️) and 4 or 3)) - for i,h in ipairs(obj.hair) do - h.x+=(last.x-h.x)/1.5 - h.y+=(last.y+0.5-h.y)/1.5 - circfill(h.x,h.y,mid(4-i,1,2),8) - last=h - end -end - --- [other objects] - -player_spawn={ - layer=2, - init=function(this) - sfx"4" - this.spr=3 - this.target=this.y - this.y=min(this.y+48,lvl_ph) - cam_x,cam_y=mid(this.x,64,lvl_pw-64),mid(this.y,64,lvl_ph-64) - this.spd.y=-4 - this.state=0 - this.delay=0 - create_hair(this) - this.djump=max_djump - end, - update=function(this) - -- jumping up - if this.state==0 and this.y0 then - if this.delay>0 then - -- stall at peak - this.spd.y=0 - this.delay-=1 - elseif this.y>this.target then - -- clamp at target y - this.y=this.target - this.spd=vector(0,0) - this.state=2 - this.delay=5 - this.init_smoke(0,4) - sfx"5" - end - end - -- landing and spawning player object - elseif this.state==2 then - this.delay-=1 - this.spr=6 - if this.delay<0 then - destroy_object(this) - init_object(player,this.x,this.y) - end - end - end, - draw= player.draw -} - -spring={ - init=function(this) - this.hide_in=0 - this.hide_for=0 - end, - update=function(this) - if this.hide_for>0 then - this.hide_for-=1 - if this.hide_for<=0 then - this.spr=18 - this.delay=0 - end - elseif this.spr==18 then - local hit=this.player_here() - if hit and hit.spd.y>=0 then - this.spr=19 - hit.y=this.y-4 - hit.spd.x*=0.2 - hit.spd.y=-3 - hit.djump=max_djump - this.delay=10 - this.init_smoke() - -- crumble below spring - break_fall_floor(this.check(fall_floor,0,1) or {}) - psfx"8" - end - elseif this.delay>0 then - this.delay-=1 - if this.delay<=0 then - this.spr=18 - end - end - -- begin hiding - if this.hide_in>0 then - this.hide_in-=1 - if this.hide_in<=0 then - this.hide_for=60 - this.spr=0 - end - end - end -} - -balloon={ - init=function(this) - this.offset=rnd() - this.start=this.y - this.timer=0 - this.hitbox=rectangle(-1,-1,10,10) - end, - update=function(this) - if this.spr==22 then - this.offset+=0.01 - this.y=this.start+sin(this.offset)*2 - local hit=this.player_here() - if hit and hit.djump0 then - this.timer-=1 - else - psfx"7" - this.init_smoke() - this.spr=22 - end - end, - draw=function(this) - if this.spr==22 then - for i=7,13 do - pset(this.x+4+sin(this.offset*2+i/10),this.y+i,6) - end - draw_obj_sprite(this) - end - end -} - -fall_floor={ - init=function(this) - this.solid_obj=true - this.state=0 - end, - update=function(this) - -- idling - if this.state==0 then - for i=0,2 do - if this.check(player,i-1,-(i%2)) then - break_fall_floor(this) - end - end - -- shaking - elseif this.state==1 then - this.delay-=1 - if this.delay<=0 then - this.state=2 - this.delay=60--how long it hides for - this.collideable=false - end - -- invisible, waiting to reset - elseif this.state==2 then - this.delay-=1 - if this.delay<=0 and not this.player_here() then - psfx"7" - this.state=0 - this.collideable=true - this.init_smoke() - end - end - end, - draw=function(this) - spr(this.state==1 and 26-this.delay/5 or this.state==0 and 23,this.x,this.y) --add an if statement if you use sprite 0 (other stuff also breaks if you do this i think) - end -} - -function break_fall_floor(obj) - if obj.state==0 then - psfx"15" - obj.state=1 - obj.delay=15--how long until it falls - obj.init_smoke(); - (obj.check(spring,0,-1) or {}).hide_in=15 - end -end - -smoke={ - layer=3, - init=function(this) - this.spd=vector(0.3+rnd"0.2",-0.1) - this.x+=-1+rnd"2" - this.y+=-1+rnd"2" - this.flip=vector(rnd()<0.5,rnd()<0.5) - end, - update=function(this) - this.spr+=0.2 - if this.spr>=32 then - destroy_object(this) - end - end -} - -fruit={ - check_fruit=true, - init=function(this) - this.start=this.y - this.off=0 - end, - update=function(this) - check_fruit(this) - this.off+=0.025 - this.y=this.start+sin(this.off)*2.5 - end -} - -fly_fruit={ - check_fruit=true, - init=function(this) - this.start=this.y - this.step=0.5 - this.sfx_delay=8 - end, - update=function(this) - --fly away - if has_dashed then - if this.sfx_delay>0 then - this.sfx_delay-=1 - if this.sfx_delay<=0 then - sfx_timer=20 - sfx"14" - end - end - this.spd.y=appr(this.spd.y,-3.5,0.25) - if this.y<-16 then - destroy_object(this) - end - -- wait - else - this.step+=0.05 - this.spd.y=sin(this.step)*0.5 - end - -- collect - check_fruit(this) - end, - draw=function(this) - spr(26,this.x,this.y) - for ox=-6,6,12 do - spr((has_dashed or sin(this.step)>=0) and 45 or this.y>this.start and 47 or 46,this.x+ox,this.y-2,1,1,ox==-6) - end - end -} - -function check_fruit(this) - local hit=this.player_here() - if hit then - hit.djump=max_djump - sfx_timer=20 - sfx"13" - got_fruit[this.fruit_id]=true - init_object(lifeup,this.x,this.y) - destroy_object(this) - if time_ticking then - fruit_count+=1 - end - end -end - -lifeup={ - init=function(this) - this.spd.y=-0.25 - this.duration=30 - this.flash=0 - end, - update=function(this) - this.duration-=1 - if this.duration<=0 then - destroy_object(this) - end - end, - draw=function(this) - this.flash+=0.5 - ?"1000",this.x-4,this.y-4,7+this.flash%2 - end -} - -fake_wall={ - check_fruit=true, - init=function(this) - this.solid_obj=true - this.hitbox=rectangle(0,0,16,16) - end, - update=function(this) - this.hitbox=rectangle(-1,-1,18,18) - local hit=this.player_here() - if hit and hit.dash_effect_time>0 then - hit.spd=vector(sign(hit.spd.x)*-1.5,-1.5) - hit.dash_time=-1 - for ox=0,8,8 do - for oy=0,8,8 do - this.init_smoke(ox,oy) - end - end - init_fruit(this,4,4) - end - this.hitbox=rectangle(0,0,16,16) - end, - draw=function(this) - sspr(0,32,8,16,this.x,this.y) - sspr(0,32,8,16,this.x+8,this.y,8,16,true,true) - end -} - -function init_fruit(this,ox,oy) - sfx_timer=20 - sfx"16" - init_object(fruit,this.x+ox,this.y+oy,26).fruit_id=this.fruit_id - destroy_object(this) -end - -key={ - update=function(this) - this.spr=flr(9.5+sin(frames/30)) - if frames==18 then --if spr==10 and previous spr~=10 - this.flip.x=not this.flip.x - end - if this.player_here() then - sfx"23" - sfx_timer=10 - destroy_object(this) - has_key=true - end - end -} - -chest={ - check_fruit=true, - init=function(this) - this.x-=4 - this.start=this.x - this.timer=20 - end, - update=function(this) - if has_key then - this.timer-=1 - this.x=this.start-1+rnd"3" - if this.timer<=0 then - init_fruit(this,0,-4) - end - end - end -} - -platform={ - layer=0, - init=function(this) - this.x-=4 - this.hitbox.w=16 - this.dir=this.spr==11 and -1 or 1 - this.semisolid_obj=true - end, - update=function(this) - this.spd.x=this.dir*0.65 - --screenwrap - if this.x<-16 then - this.x=lvl_pw - elseif this.x>lvl_pw then - this.x=-16 - end - end, - draw=function(this) - spr(11,this.x,this.y-1,2,1) - end -} - -message={ - layer=3, - init=function(this) - this.text="-- celeste mountain --#this memorial to those#perished on the climb" - this.hitbox.x+=4 - end, - draw=function(this) - if this.player_here() then - for i,s in ipairs(split(this.text,"#")) do - camera() - rectfill(7,7*i,120,7*i+6,7) - ?s,64-#s*2,7*i+1,0 - camera(draw_x,draw_y) - end - end - end -} - -big_chest={ - init=function(this) - this.state=max_djump>1 and 2 or 0 - this.hitbox.w=16 - end, - update=function(this) - if this.state==0 then - local hit=this.check(player,0,8) - if hit and hit.is_solid(0,1) then - music(-1,500,7) - sfx"37" - pause_player=true - hit.spd=vector(0,0) - this.state=1 - this.init_smoke() - this.init_smoke(8) - this.timer=60 - this.particles={} - end - elseif this.state==1 then - this.timer-=1 - flash_bg=true - if this.timer<=45 and #this.particles<50 then - add(this.particles,{ - x=1+rnd"14", - y=0, - h=32+rnd"32", - spd=8+rnd"8"}) - end - if this.timer<0 then - this.state=2 - this.particles={} - flash_bg,bg_col,cloud_col=false,2,14 - init_object(orb,this.x+4,this.y+4,102) - pause_player=false - end - end - end, - draw=function(this) - if this.state==0 then - draw_obj_sprite(this) - spr(96,this.x+8,this.y,1,1,true) - elseif this.state==1 then - foreach(this.particles,function(p) - p.y+=p.spd - line(this.x+p.x,this.y+8-p.y,this.x+p.x,min(this.y+8-p.y+p.h,this.y+8),7) - end) - end - spr(112,this.x,this.y+8) - spr(112,this.x+8,this.y+8,1,1,true) - end -} - -orb={ - init=function(this) - this.spd.y=-4 - end, - update=function(this) - this.spd.y=appr(this.spd.y,0,0.5) - local hit=this.player_here() - if this.spd.y==0 and hit then - music_timer=45 - sfx"51" - freeze=10 - destroy_object(this) - max_djump=2 - hit.djump=2 - end - end, - draw=function(this) - draw_obj_sprite(this) - for i=0,0.875,0.125 do - circfill(this.x+4+cos(frames/30+i)*8,this.y+4+sin(frames/30+i)*8,1,7) - end - end -} - -flag={ - init=function(this) - this.x+=5 - end, - update=function(this) - if not this.show and this.player_here() then - sfx"55" - sfx_timer,this.show,time_ticking=30,true,false - end - end, - draw=function(this) - spr(118+frames/5%3,this.x,this.y) - if this.show then - camera() - rectfill(32,2,96,31,0) - spr(26,55,6) - ?"x"..fruit_count,64,9,7 - draw_time(49,16) - ?"deaths:"..deaths,48,24,7 - camera(draw_x,draw_y) - end - end -} - -function psfx(num) - if sfx_timer<=0 then - sfx(num) - end -end - --- [tile dict] -tiles={} -foreach(split([[ -1,player_spawn -8,key -11,platform -12,platform -18,spring -20,chest -22,balloon -23,fall_floor -26,fruit -45,fly_fruit -64,fake_wall -86,message -96,big_chest -118,flag -]],"\n"),function(t) - local tile,obj=unpack(split(t)) - tiles[tile]=_ENV[obj] -end) - - --- [object functions] - -function init_object(type,x,y,tile) - --generate and check berry id - local id=x..","..y..","..lvl_id - if type.check_fruit and got_fruit[id] then - return - end - - local obj={ - type=type, - collideable=true, - --collides=false, - spr=tile, - flip=vector(),--false,false - x=x, - y=y, - hitbox=rectangle(0,0,8,8), - spd=vector(0,0), - rem=vector(0,0), - fruit_id=id, - } - - function obj.left() return obj.x+obj.hitbox.x end - function obj.right() return obj.left()+obj.hitbox.w-1 end - function obj.top() return obj.y+obj.hitbox.y end - function obj.bottom() return obj.top()+obj.hitbox.h-1 end - - function obj.is_solid(ox,oy) - for o in all(objects) do - if o!=obj and (o.solid_obj or o.semisolid_obj and not obj.objcollide(o,ox,0) and oy>0) and obj.objcollide(o,ox,oy) then - return true - end - end - return obj.is_flag(ox,oy,0) -- solid terrain - end - - function obj.is_ice(ox,oy) - return obj.is_flag(ox,oy,4) - end - - function obj.is_flag(ox,oy,flag) - for i=max(0,(obj.left()+ox)\8),min(lvl_w-1,(obj.right()+ox)/8) do - for j=max(0,(obj.top()+oy)\8),min(lvl_h-1,(obj.bottom()+oy)/8) do - if fget(tile_at(i,j),flag) then - return true - end - end - end - end - - function obj.objcollide(other,ox,oy) - return other.collideable and - other.right()>=obj.left()+ox and - other.bottom()>=obj.top()+oy and - other.left()<=obj.right()+ox and - other.top()<=obj.bottom()+oy - end - - function obj.check(type,ox,oy) - for other in all(objects) do - if other and other.type==type and other~=obj and obj.objcollide(other,ox,oy) then - return other - end - end - end - - function obj.player_here() - return obj.check(player,0,0) - end - - function obj.move(ox,oy,start) - for axis in all{"x","y"} do - obj.rem[axis]+=axis=="x" and ox or oy - local amt=round(obj.rem[axis]) - obj.rem[axis]-=amt - local upmoving=axis=="y" and amt<0 - local riding=not obj.player_here() and obj.check(player,0,upmoving and amt or -1) - local movamt - if obj.collides then - local step=sign(amt) - local d=axis=="x" and step or 0 - local p=obj[axis] - for i=start,abs(amt) do - if not obj.is_solid(d,step-d) then - obj[axis]+=step - else - obj.spd[axis],obj.rem[axis]=0,0 - break - end - end - movamt=obj[axis]-p --save how many px moved to use later for solids - else - movamt=amt - if (obj.solid_obj or obj.semisolid_obj) and upmoving and riding then - movamt+=obj.top()-riding.bottom()-1 - local hamt=round(riding.spd.y+riding.rem.y) - hamt+=sign(hamt) - if movamt0 and obj.right()+1-hit.left() or amt<0 and obj.left()-hit.right()-1) or 0, - axis=="y" and (amt>0 and obj.bottom()+1-hit.top() or amt<0 and obj.top()-hit.bottom()-1) or 0, - 1) - if obj.player_here() then - kill_player(hit) - end - elseif riding then - riding.move(axis=="x" and movamt or 0, axis=="y" and movamt or 0,1) - end - obj.collideable=true - end - end - end - - function obj.init_smoke(ox,oy) - init_object(smoke,obj.x+(ox or 0),obj.y+(oy or 0),29) - end - - add(objects,obj); - - (obj.type.init or stat)(obj) - - return obj -end - -function destroy_object(obj) - del(objects,obj) -end - -function kill_player(obj) - sfx_timer=12 - sfx"0" - deaths+=1 - destroy_object(obj) - --dead_particles={} - for dir=0,0.875,0.125 do - add(dead_particles,{ - x=obj.x+4, - y=obj.y+4, - t=2, - dx=sin(dir)*3, - dy=cos(dir)*3 - }) - end - delay_restart=15 -end - -function move_camera(obj) - cam_spdx=cam_gain*(4+obj.x-cam_x) - cam_spdy=cam_gain*(4+obj.y-cam_y) - - cam_x+=cam_spdx - cam_y+=cam_spdy - - --clamp camera to level boundaries - local clamped=mid(cam_x,64,lvl_pw-64) - if cam_x~=clamped then - cam_spdx=0 - cam_x=clamped - end - clamped=mid(cam_y,64,lvl_ph-64) - if cam_y~=clamped then - cam_spdy=0 - cam_y=clamped - end -end - --- [level functions] - -function next_level() - local next_lvl=lvl_id+1 - - --check for music trigger - if music_switches[next_lvl] then - music(music_switches[next_lvl],500,7) - end - - load_level(next_lvl) -end - -function load_level(id) - has_dashed,has_key= false--,false - - - --remove existing objects - foreach(objects,destroy_object) - - --reset camera speed - cam_spdx,cam_spdy=0,0 - - local diff_level=lvl_id~=id - - --set level index - lvl_id=id - - --set level globals - local tbl=split(levels[lvl_id]) - for i=1,4 do - _ENV[split"lvl_x,lvl_y,lvl_w,lvl_h"[i]]=tbl[i]*16 - end - lvl_title=tbl[5] - lvl_exit_type=tbl[6] - lvl_pw,lvl_ph=lvl_w*8,lvl_h*8 - - - --level title setup - ui_timer=5 - - --reload map - if diff_level then - reload() - --chcek for mapdata strings - if mapdata[lvl_id] then - replace_mapdata(lvl_x,lvl_y,lvl_w,lvl_h,mapdata[lvl_id]) - end - end - - -- entities - for tx=0,lvl_w-1 do - for ty=0,lvl_h-1 do - local tile=tile_at(tx,ty) - if tiles[tile] then - init_object(tiles[tile],tx*8,ty*8,tile) - end - end - end -end - --- [main update loop] - -function _update() - frames+=1 - if time_ticking then - seconds+=frames\30 - minutes+=seconds\60 - seconds%=60 - end - frames%=30 - - if music_timer>0 then - music_timer-=1 - if music_timer<=0 then - music(10,0,7) - end - end - - if sfx_timer>0 then - sfx_timer-=1 - end - - -- cancel if freeze - if freeze>0 then - freeze-=1 - return - end - - -- restart (soon) - if delay_restart>0 then - cam_spdx,cam_spdy=0,0 - delay_restart-=1 - if delay_restart==0 then - load_level(lvl_id) - end - end - - -- update each object - foreach(objects,function(obj) - obj.move(obj.spd.x,obj.spd.y,0); - (obj.type.update or stat)(obj) - end) - - --move camera to player - foreach(objects,function(obj) - if obj.type==player or obj.type==player_spawn then - move_camera(obj) - end - end) - - -- start game - if is_title() then - if start_game then - start_game_flash-=1 - if start_game_flash<=-30 then - begin_game() - end - elseif btn(🅾️) or btn(❎) then - music"-1" - start_game_flash,start_game=50,true - sfx"38" - end - end -end - --- [drawing functions] - -function _draw() - if freeze>0 then - return - end - - -- reset all palette values - pal() - - -- start game flash - if is_title() then - if start_game then - for i=1,15 do - pal(i, start_game_flash<=10 and ceil(max(start_game_flash)/5) or frames%10<5 and 7 or i) - end - end - - cls() - - -- credits - sspr(unpack(split"72,32,56,32,36,32")) - ?"🅾️/❎",55,80,5 - ?"maddy thorson",40,96,5 - ?"noel berry",46,102,5 - - -- particles - foreach(particles,draw_particle) - - return - end - - -- draw bg color - cls(flash_bg and frames/5 or bg_col) - - -- bg clouds effect - foreach(clouds,function(c) - c.x+=c.spd-cam_spdx - rectfill(c.x,c.y,c.x+c.w,c.y+16-c.w*0.1875,cloud_col) - if c.x>128 then - c.x=-c.w - c.y=rnd"120" - end - end) - - --set cam draw position - draw_x=round(cam_x)-64 - draw_y=round(cam_y)-64 - camera(draw_x,draw_y) - - -- draw bg terrain - map(lvl_x,lvl_y,0,0,lvl_w,lvl_h,4) - - --set draw layering - --0: background layer - --1: default layer - --2: player layer - --3: foreground layer - local layers={{},{},{}} - foreach(objects,function(o) - if o.type.layer==0 then - draw_object(o) --draw below terrain - else - add(layers[o.type.layer or 1],o) --add object to layer, default draw below player - end - end) - - -- draw terrain - map(lvl_x,lvl_y,0,0,lvl_w,lvl_h,2) - - -- draw objects - foreach(layers,function(l) - foreach(l,draw_object) - end) - - -- particles - foreach(particles,draw_particle) - - -- dead particles - foreach(dead_particles,function(p) - p.x+=p.dx - p.y+=p.dy - p.t-=0.2 - if p.t<=0 then - del(dead_particles,p) - end - rectfill(p.x-p.t,p.y-p.t,p.x+p.t,p.y+p.t,14+5*p.t%2) - end) - - -- draw level title - camera() - if ui_timer>=-30 then - if ui_timer<0 then - draw_ui() - end - ui_timer-=1 - end -end - -function draw_particle(p) - p.x+=p.spd-cam_spdx - p.y+=sin(p.off)-cam_spdy - p.off+=min(0.05,p.spd/32) - rectfill(p.x+draw_x,p.y%128+draw_y,p.x+p.s+draw_x,p.y%128+p.s+draw_y,p.c) - if p.x>132 then - p.x=-4 - p.y=rnd"128" - elseif p.x<-4 then - p.x=128 - p.y=rnd"128" - end -end - -function draw_object(obj) - (obj.type.draw or draw_obj_sprite)(obj) -end - -function draw_obj_sprite(obj) - spr(obj.spr,obj.x,obj.y,1,1,obj.flip.x,obj.flip.y) -end - -function draw_time(x,y) - rectfill(x,y,x+32,y+6,0) - ?two_digit_str(minutes\60)..":"..two_digit_str(minutes%60)..":"..two_digit_str(seconds),x+1,y+1,7 -end - -function draw_ui() - rectfill(24,58,104,70,0) - local title=lvl_title or lvl_id.."00 m" - ?title,64-#title*2,62,7 - draw_time(4,4) -end - -function two_digit_str(x) - return x<10 and "0"..x or x -end - --- [helper functions] - -function round(x) - return flr(x+0.5) -end - -function appr(val,target,amount) - return val>target and max(val-amount,target) or min(val+amount,target) -end - -function sign(v) - return v~=0 and sgn(v) or 0 -end - -function tile_at(x,y) - return mget(lvl_x+x,lvl_y+y) -end - -function spikes_at(x1,y1,x2,y2,xspd,yspd) - for i=max(0,x1\8),min(lvl_w-1,x2/8) do - for j=max(0,y1\8),min(lvl_h-1,y2/8) do - if({[17]=y2%8>=6 and yspd>=0, - [27]=y1%8<=2 and yspd<=0, - [43]=x1%8<=2 and xspd<=0, - [59]=x2%8>=6 and xspd>=0})[tile_at(i,j)] then - return true - end - end - end -end - --->8 ---[map metadata] - ---@begin ---level table ---"x,y,w,h,title" -levels={ - "0,0,1,1,lvea,0", - "1,0,1,1,a string,0", - "2,0,1,1,right exit,1", - "3,0,1,1,a,0", - "4,0,1,1,v,0", - "5,0,1,1,,0", - "6,0,1,1,,0", - "7,0,1,1,a,0", - "0,1,1,1,level,0", - "1,1,1,1,bottom exit,3", - "2,1,1,1,yadeleiay,1", - "3,1,1,1,a,0", - "4,1,1,1,,0", - "5,1,1,1,left exit,2", - "6,1,1,1,,0", - "7,1,1,1,,1", - "0,0,2,2,now using base levels,0", - "2,0,2,2,why are you still here,0", - "4,0,2,2,secret plans for p10x,0", - "6,0,2,2,the size of a normal celeste map now,0", - "0,2,2,2,ice blocks are typically not used and can be deleted to free space,0", - "2,2,2,2,right exitalie,1", - "4,2,2,2,who came up with shared memory anyway,0" -} - ---mapdata string table ---assigned levels will load from here instead of the map -mapdata={ - [17] = "00000000000000000000000000000000000000000000312525252525252525250000000000000000000000000000000000000000000000313232323225252525000000000000000000000000000000000000000000000000000000002425252500000000000000000000000000000000000000000000000000000000242525252222222300270000000000000000000000000000000000000000000024252525252525252225222222222222230000000000000000000000000000002425252525252525252525252525252525222222230000000000000000000000312525252525252525252525252525252525252526000000000000000000000000242525252525252532323232323232323232323300000000000000000000000024252525252525260000000000000000000000000088898a8b8c8d8e8f00000024252525252525260000000000000000000000000098999a9b9c9d9e9f000000242525252525253300000000000000000000000000a8a9aaabac000000000021252525252525260000000000000000000000000000b8b9babbbcbd00bebf212525252525252526000000000000000000000000000000002122222222222225252525252525252600000000000000000000000000002122253225252525252525252525252525260000000000000000000000000000243233003132323232323225252525252526000000000000000000000000000037000000000000000000003125252525252600000000000000000000000000000000000000000000000000002425252525260000000000000000000000000000000000270000000000000000242525252526000000000000000000000000000000002125230000000000000024252525252600000000000000000000000000000021252526000000000000002425252525252300000000000000343535223535222525253300000000000000242525252525252222222222230000000030000024252526000000000000002125252525323232322532323232352222222522222525252600000000000000242525252684858687370000000000313232323232323232330000000000000024252525339495969700000000000000000000000000000000000000000000002425252600a4a5a6a700000000000000000000000000000000000000000000002425252600a4b5b60000000000000000000000000000000000000000000000002425252600000000000000000000000000000000000000000000000000000021252525260000000000000000000000000021230000000000000000000000212525252532230000000000000000000021222525222222222222222222222225252525250024222222222222222222222525252525252525252525252525252525252525", - [18] = "00000000000000000000000000000000000000000000000000000000242525250000000000000000000000000000000000000000000000000000212225252525000000000000000000000000000000000000000000000000002125252525252500000000000000000000000000000000000000000000000021252525252525250000000000000000000000000000000000000000000000002425252525252525000000000000000000000000000000000000000000002122252525252525252500000000000000000000000000000000000000000000242525252525252525250000000000000000000000000000000000000000000024252525252525252525000000000000000000000000000000000000000000002425252525252525252500000000000000000000000000000000000000000000242525252525252525250000000000000000000000000000000000000000000024252525252525252525000000000000000000000000000000000000000000212525252525252525252500000000000000000000000000000000000000002125252525252525252525250000000000000000000000000000000000000021252525252525252525252525000000000000000000000000000000000000002425252525252525252525252500000000000000000000000000000000000021252525252525252525252525250000000000000000000000000000000000212525252525252525252525252525000000000000000000000000000027002125252525252525252525252525252500000000000000000000000000212522252525252525252525252525252525250000000000000000000000003432252525252525252525252525252525252525000000000000000000000000000024252525252525252525252525252525252500000000000000000000212222222525252525252525252525252525252525250000000000000000002125252525252525252525252525252525252525252525000000000000000021252525252525252525252525252525252525252525252501000000002123002425252525252525252525252525252525252525252525252300000021252522252525252525252525252525252525252525252525252525260000002425252525252525252525252525252525252525252525252525252526000021252525323225252525252525252525252525252525252525252525252523002425253300002425252525252525252525252525252525252525252525252522252526000000242525252525252525252525252525252525252525252525252525252522230024252525252525252525252525252525252525252525252525252525252525222525252525252525252525252525252525252525252525", - [19] = "26000000000000000000000000000000000000000000000000000000000000242523000000000000000000000000000000000000000000000000000000000024252600000000000000000000000000000000000000000000000000000000002425260000000000000000000000000000000000000000000000000000000021252525230000000000000000000000000000000000000000000000000000002425252526000000000000000000000000000000000000000000000000000000242525252523000000000000000000000000000000000000000000000000000024252525252600000000000000000000000000000000000000000000000021222525252525260000000000000000000000000000000000000000000000002425252525252525230000000000000001000000000000000000000000000021252525252525252526000000000000000000000000000000000000000000212525252525252525252523000000000000000000000000000000212222222225252525252525252525252600000000000000000000002122222225252525252525252525252525252525252300000000000000212222252525252525252525252525252525252525252525252223002122222225252525252525252525252525252525252525252525252525252522252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525252525", - [20] = "32323300000000000000000000000000000000000000000000000000000000000000003423000000000000000000000000000000000000000000000000000000000000003123010001010101000000000000000000000000000000000000000000000000003123000101010100000000000000000000000000000000000000000000000000003700010101010000000000000000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000002700000000000000000000000000000000000000000000000000000000000000312300000000000000000000000000000000000000000000000000000000000000313523000000000000000000000000000000000000000000000000000000000000003700000000000000000000000000000000000000000000000000000000000000003423000000000000000000000000000000000000000000000000000000000000003136000000000000000000000000000000000000000000000000000000000000000027000000000000000000000000000000000000000000000000000000000000003136000000000000000000000000000000000000000000000000000000000000000034360000000000000000000000000000000000000000000000000000000000000000342300000000000000000000000000000000000000000000000000000000000000313600000000000000000000000000000000000000000000000000000000000000003423000000000000000000000000000000000000000000000000000000000000003135230000000000000000000000000000000000000000000000000000000000000031352300000000000000000000000000000000000000000000000000000000000000312300000000000000000000000000000000000000000000000000000000000000313523000000000000000000000000000000000000000000000000000000000000003122000000000000000000000000000000000000000000000000000000000000003100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - [21] = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000210000000000000000000000000000000000000000000000000000000000000031000000000000000000000000000000000000000000000000000000000000272500000000000000000000000000000000000000000000000000000000000037250000000000000000000000000000000000000000000000000000000000270025000000000000000000000000000000000000000000000000000000000037002500000000000000000000000000000000000000000000000000000000000000250000000000000000000000000000000000000000000000000000000000270025000000000000000000000000000000000000000000000000000000002132232500000000000000000000000000000000000000000000000000000000300031250000000000000000000000000000000000000000000000000000000031360025000000000000000000000000000000000000000000000000000000200000002500000000000000000000000000000000000000000020000021223600000000250000000000000000000000000000000000002000000000002433003423000025000000000000000000000000000000000000000000002135260027003700272500000000000000000000000000000020000000002122260030002423002126250000000000000000000000000000000000002135252525352522253222253300000000000000000000000000002700002122260031253300313226003126000000000000000000000000000000312300243233000030000000003136003123000000000100000000343535360000242226000020002422352300000027003000000000000034360000000000003425253300000000242600313523002422330000000000200000000000002700002433002000213532252300003700242600000000002700000000003422330000300027003433000024330027000031260000000000300000000020003000002525252525252525252525252525252525252500000030002135230000312300252525252525252525252525252525252525250000002435262525252525252525252525252525252525252525252525252525252222330024252525252525252525252525252525252525252525252525252525252600003125252525252525252525252525252525252525252525252525252525250000002525252525252525252525252525252525250000000000000000", - [22] = "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000010101000000000000000000000000000000000000000000000000000000000001010100000000000000000000000000000000000000000000000000000000000101010000000000000000000000000000000000000000000000000000000000010101000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000353535353535353535353535353535353535353535353535353535353535353500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000", - [23] = "00000000000000000000000000000000000000242525252525252525252525250000000000000000000000000000000000000024252525252525252525252532000000000000000000000000000000000000003125252525252525252525260000000000000000000000000000000000000027002425252525252525252525000000000000000000000000000000000000342600242525252525252525252500000000000000000000000000000000002700243525252525252525252525250000000001000000000000000000002700313533002525252525252525252525000000002122222222222222223535330000000000252525252525252525252500002122323232323232323233000000000000000025252525252525252525250022252600000000000000000000000000000000002525252525252525252525002525252525252525252525252525252500000000252525252525252525252500252525252525252525252525252525250000000025252525252525252525250025252525252525252525252525252525000000002525252525252525252525002525252525252525252525252525252500000000252525252525252525252500252525252525252525252525252525252525252525252525252525252525250025252525252525252525252525252525252525252525252525252525252525002525252525252525252525252525252525252525252525252525252525252500252525252525252525252525252525252525252525252525252525252525250025252525252525252525252525252525252525252525252525252525252525002525252525252525252525252525252525252525252525252525252525252500252525252525252525252525252525252525252525252525252525252525250025252525252525252525252525252525252525252525252525252525252525002525252525252525252525252525252525252525252525252525252525252500252525252525252525252525252525252525252525252525252525252525250025252525252525252525252525252525252525252525252525252525252525002525252525252525252525252525252525252525252525252525252525252500252525252525252525252525252525252525252525252525252525252525250025252525252525252525252525252525252525252525252525252525252525002525252525252525252525252525252525252525252525252525252525252500252525252525252525252525252525250000000025250125252525252525250000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" -} --- ¹² - ---list of music switch triggers ---assigned levels will start the tracks set here -music_switches={ - [2]=20, - [3]=30 -} - ---@end - ---replace mapdata with base256 -function replace_mapdata(x,y,w,h,data) - local newdata = "" - -- decompress the data - - local i = 1 - while i < #data+1 do - if ord(sub(data,i,i)) == 1 then - for j=1,ord(sub(data,i+1,i+1)) do - newdata = newdata..chr(0) - end - i = i + 1 - else - newdata = newdata..sub(data,i,i) - end - i = i + 1 - end - - for i=1,#newdata do - mset(x+((i-1)%w),y+(i-1)/w,ord(sub(newdata,i,i))-1) - end -end - ---[[ - -short on tokens? -everything below this comment -is just for grabbing data -rather than loading it -and can be safely removed! - ---]] - ---copy mapdata string to clipboard -function get_mapdata(x,y,w,h) - local reserve="" - for i=0,w*h-1 do - reserve..=num2hex(mget(i%w,i\w)) - end - printh(reserve,"@clip") -end - ---convert mapdata to memory data -function num2hex(v) - return sub(tostr(v,true),5,6) -end -__gfx__ -000000000000000000000000088888800000000000000000000000000000000000aaaaa0000aaa000000a0000007707770077700000000000000000000000000 -000000000888888008888880888888880888888008888800000000000888888000a000a0000a0a000000a0000777777677777770000000000000000000000000 -000000008888888888888888888ffff888888888888888800888888088f1ff1800a909a0000a0a000000a0007766666667767777000000000000000000000000 -00000000888ffff8888ffff888f1ff18888ffff88ffff8808888888888fffff8009aaa900009a9000000a0007677766676666677000000000000000000000000 -0000000088f1ff1888f1ff1808fffff088f1ff1881ff1f80888ffff888fffff80000a0000000a0000000a0000000000000000000000000000000000000000000 -0000000008fffff008fffff00033330008fffff00fffff8088fffff8083333800099a0000009a0000000a0000000000000000000000000000000000000000000 -00000000003333000033330007000070073333000033337008f1ff10003333000009a0000000a0000000a0000000000000000000000000000000000000000000 -000000000070070000700070000000000000070000007000077333700070070000aaa0000009a0000000a0000000000000000000000000000000000000000000 -555555550000000000000000000000000000000000000000008888004999999449999994499909940300b0b06665666500000000000000000000000070000000 -55555555000000000000000000000000000000000000000008888880911111199111411991140919003b33006765676500000000007700000770070007000007 -550000550000000000000000000000000aaaaaa00000000008788880911111199111911949400419028888206770677000000000007770700777000000000000 -55000055007000700499994000000000a998888a0000000008888880911111199494041900000044089888800700070000000000077777700770000000000000 -55000055007000700050050000000000a988888a0000000008888880911111199114094994000000088889800700070000000000077777700000700000000000 -55000055067706770005500000000000aaaaaaaa0000000008888880911111199111911991400499088988800000000000000000077777700000077000000000 -55555555567656760050050000000000a980088a0000000000888800911111199114111991404119028888200000000000000000070777000007077007000070 -55555555566656660005500004999940a988888a0000000000000000499999944999999444004994002882000000000000000000000000007000000000000000 -5777777557777777777777777777777577cccccccccccccccccccc77577777755555555555555555555555555500000007777770000000000000000000000000 -77777777777777777777777777777777777cccccccccccccccccc777777777775555555555555550055555556670000077777777000777770000000000000000 -777c77777777ccccc777777ccccc7777777cccccccccccccccccc777777777775555555555555500005555556777700077777777007766700000000000000000 -77cccc77777cccccccc77cccccccc7777777cccccccccccccccc7777777cc7775555555555555000000555556660000077773377076777000000000000000000 -77cccc7777cccccccccccccccccccc777777cccccccccccccccc777777cccc775555555555550000000055555500000077773377077660000777770000000000 -777cc77777cc77ccccccccccccc7cc77777cccccccccccccccccc77777cccc775555555555500000000005556670000073773337077770000777767007700000 -7777777777cc77cccccccccccccccc77777cccccccccccccccccc77777c7cc77555555555500000000000055677770007333bb37070000000700007707777770 -5777777577cccccccccccccccccccc7777cccccccccccccccccccc7777cccc77555555555000000000000005666000000333bb30000000000000000000077777 -77cccc7777cccccccccccccccccccc77577777777777777777777775777ccc775555555550000000000000050000066603333330000000000000000000000000 -777ccc7777cccccccccccccccccccc77777777777777777777777777777cc7775055555555000000000000550007777603b333300000000000ee0ee000000000 -777ccc7777cc7cccccccccccc77ccc777777ccc7777777777ccc7777777cc77755550055555000000000055500000766033333300000000000eeeee000000030 -77ccc77777ccccccccccccccc77ccc77777ccccc7c7777ccccccc77777ccc777555500555555000000005555000000550333b33000000000000e8e00000000b0 -77ccc777777cccccccc77cccccccc777777ccccccc7777c7ccccc77777cccc7755555555555550000005555500000666003333000000b00000eeeee000000b30 -777cc7777777ccccc777777ccccc77777777ccc7777777777ccc777777cccc775505555555555500005555550007777600044000000b000000ee3ee003000b00 -777cc777777777777777777777777777777777777777777777777777777cc7775555555555555550055555550000076600044000030b00300000b00000b0b300 -77cccc77577777777777777777777775577777777777777777777775577777755555555555555555555555550000005500999900030330300000b00000303300 -5777755700000000077777777777777777777770077777700000000000000000cccccccc00000000000000000000000000000000000000000000000000000000 -7777777700000000700007770000777000007777700077770000000000000000c77ccccc00000000000000000000000000000000000000000000000000000000 -7777cc770000000070cc777cccc777ccccc7770770c777070000000000000000c77cc7cc00000000000000000000000000000000000000000000000000000000 -777ccccc0000000070c777cccc777ccccc777c0770777c070000000000000000cccccccc00000000000000000000000000006000000000000000000000000000 -77cccccc00000000707770000777000007770007777700070002eeeeeeee2000cccccccc00000000000000000000000000060600000000000000000000000000 -57cc77cc0000000077770000777000007770000777700007002eeeeeeeeee200cc7ccccc00000000000000000000000000d00060000000000000000000000000 -577c77cc000000007000000000000000000c000770000c0700eeeeeeeeeeee00ccccc7cc0000000000000000000000000d00000c000000000000000000000000 -777ccccc000000007000000000000000000000077000000700e22222e2e22e00cccccccc000000000000000000000000d000000c000000000000000000000000 -777ccccc000000007000000000000000000000077000000700eeeeeeeeeeee000000000000000000000000000000000c0000000c000600000000000000000000 -577ccccc000000007000000c000000000000000770cc000700e22e2222e22e00000000000000000000000000000000d000000000c060d0000000000000000000 -57cc7ccc0000000070000000000cc0000000000770cc000700eeeeeeeeeeee0000000000000000000000000000000c00000000000d000d000000000000000000 -77cccccc0000000070c00000000cc00000000c0770000c0700eee222e22eee0000000000000000000000000000000c0000000000000000000000000000000000 -777ccccc000000007000000000000000000000077000000700eeeeeeeeeeee005555555506666600666666006600c00066666600066666006666660066666600 -7777cc770000000070000000000000000000000770c0000700eeeeeeeeeeee00555555556666666066666660660c000066666660666666606666666066666660 -777777770000000070000000c0000000000000077000000700ee77eee7777e005555555566000660660000006600000066000000660000000066000066000000 -57777577000000007000000000000000000000077000c007077777777777777055555555dd000000dddd0000dd000000dddd0000ddddddd000dd0000dddd0000 -000000000000000070000000000000000000000770000007007777005000000000000005dd000dd0dd000000dd0000d0dd000000000000d000dd0000dd000000 -00aaaaaa00000000700000000000000000000007700c0007070000705500000000000055ddddddd0dddddd00ddddddd0dddddd00ddddddd000dd0000dddddd00 -0a99999900000000700000000000c00000000007700000077077000755500000000005550ddddd00ddddddd0ddddddd0ddddddd00ddddd0000dd0000ddddddd0 -a99aaaaa000000007000000cc0000000000000077000cc077077bb07555500000000555500000000000000000000000000000000000000000000000000000000 -a9aaaaaa000000007000000cc0000000000c00077000cc07700bbb0755555555555555550000000000000c000000000000000000000000000000c00000000000 -a99999990000000070c00000000000000000000770c00007700bbb075555555555555555000000000000c00000000000000000000000000000000c0000000000 -a999999900000000700000000000000000000007700000070700007055555555555555550000000000cc0000000000000000000000000000000000c000000000 -a99999990000000007777777777777777777777007777770007777005555555555555555000000000c000000000000000000000000000000000000c000000000 -aaaaaaaa0000000007777777777777777777777007777770004bbb00004b000000400bbb00000000c0000000000000000000000000000000000000c000000000 -a49494a10000000070007770000077700000777770007777004bbbbb004bb000004bbbbb0000000100000000000000000000000000000000000000c00c000000 -a494a4a10000000070c777ccccc777ccccc7770770c7770704200bbb042bbbbb042bbb00000000c0000000000000000000000000000000000000001010c00000 -a49444aa0000000070777ccccc777ccccc777c0770777c07040000000400bbb004000000000001000000000000000000000000000000000000000001000c0000 -a49999aa000000007777000007770000077700077777000704000000040000000400000000000100000000000000000000000000000000000000000000010000 -a49444990000000077700000777000007770000777700c0742000000420000004200000000000100000000000000000000000000000000000000000000001000 -a494a444000000007000000000000000000000077000000740000000400000004000000000000000000000000000000000000000000000000000000000000000 -a4949999000000000777777777777777777777700777777040000000400000004000000000010000000000000000000000000000000000000000000000000010 -cc000000000000000000000ccccccccc000000000000000000000000000000000070070007007000070000700007070000007070000007000000000000000000 -c00cccccccccccccccccccc0000ccccc000000000000000000000000000000000777077700077000077707070777077707770770777070707770000000000000 -c0cccccccccccccccccccccccc000ccc000000000000000000000000000000000070070707007700070707770707070707070770700077707070000000000000 -c0cccccccccccccccccccccccccc00cc000000000000000008800000088000080070070707077700077707070777077707770700777070707070000000000000 -c0ccccccccccccccccccccccccccc0cc000000088800000088800000880880880000000000000000000000000000000000000000000000000000000000000000 -c0ccccc0ccccccccccccccccccccc00c000888880088000880080000800000880007770700700777077700070770070070077070070007770000077707077700 -c0ccccc0ccccccccccc0cccccccccc0c008000880008000800080000800008880007000007770700070700077770707077070700070007000707070707070000 -c0ccccc0ccccccccccc0cccccccccc0c008000080008000080088000080000800007770700700777070700077070777070770700070007770707077707077700 -c0ccccc0ccccccccccc0cccccccccc0c008000080008000080088000800000800007000700700007077700077070707070070700077707000077070007000700 -c0cccc00ccccccccccc0cccccccccc0c000000000000000088880000000000800000000000000777000000000000000000000000000007770000077700007700 -c0cccc0cccccccccccc0cccccccccc0c000000000000000000000000000000800000000000000000004444000000000000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c000000000000000000000000000000000000000000000000004ff440000f444000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c00000000000000000000080000000000000000066666666666ffff00000fff4000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c00000800008888000000000000008000006666666666666666ffff00000fff0000000000000000000000000000000000 -0ccccc0cccccccccccc0cccccccccc0c00000800008008008880000008008800666666666666666666ffff00000fff7700000000000000000000000000000000 -0ccccccccccccccccccccccccccccc0c00000880008888008088080008088808666666666666666666555560000fff7700000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c000000880008000080080800888888086666666666666666555555555000777770000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c000000080008000080000800080880086655555556666666555555555000777770000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c000008880008000080000800080880086655555556666666555555555007777770000000000000000000000000000000 -cccccccccccccccccccccccccccccc0c0000000000080000800080000800880866555555556f5555555555555007777777000000000000000000000000000000 -cccccccccccccccccccc0ccccccccc0c0000000000000000000000000000000866555555556ff555555555550007777777000000000000000000000000000000 -cccccccccccccccccccc0ccccccccc0c000000000000000000000000000000006655555556666665555555550077777777000000000000000000000000000000 -ccccccccccccccccccc0cccccccccc0c000000000000000000000000000000006655555666666666555555555077777777000000000000000000000000000000 -0cccc00cccccccccccc0ccccccccc00c000000000000000088000008000000006666666666666666555555555077777777000000000000000000000000000000 -0ccccc00ccccccccc000ccccccccc0cc000000008000000888800008000000006666666666666666555555555077777777000000000000000000000000000000 -0ccccccc0000000000cccccccccc00cc000000008000000800800008000000006666666666666666555555555577777777000000000000000000000000000000 -0ccccccccccccccccccccccccccc0ccc000000008800000800800088000000006666666666666665555555555577777777000000000000000000000000000000 -00ccccccccccccccccccccccccc0cccc000000000800000800800088000000006666666666660000555555555077777777000000000000000000000000000000 -c0ccccccccccccccccccccccccc0cccc000000000800008800800008000000006666666666000000555555555077777707000000000000000000000000000000 -cc000000cccccccccccccccccc00cccc000000000800000888800000000000006666666600000000055505550077777700000000000000000000000000000000 -ccccccc000cccccccccccccccc0ccccc000000000000000000000000000000006666666000000000055005550077777700000000000000000000000000000000 -cccccccccc000ccccccccccc00cccccc000000000000000000000000000000006666000000000000005005500007777700000000000000000000000000000000 -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -dddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddddd -__label__ -cccccccccccccccccccccccccccccccccccccc775500000000000000000000000000000000070000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccc776670000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccc77ccc776777700000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccc77ccc776660000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccc7cccccc6ccccccccc7775500000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccc77776670000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccc777777776777700000000000000000000000000000000000000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccccc777777756661111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc77011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccc7777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccc7777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111111111111111111111111111111111111111100000000000011111111111111111111111111111111111111 -ccccccccccccccccccccccccccccc777011111111311b1b111111111111111111111111111111100000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc7700000000003b330000000000000000000000000000000000000000000011111111111111111111111111111111111111 -cccccccccccccccccccccccccccccc77000000000288882000000000000000000000000000000000000070000000000000000000000000000000000000000000 -cccccccc66cccccccccccccccccccc77000000000898888000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc66ccccccccccccccc77ccc77000000000888898000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccc77ccc77000000000889888000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccc77cccccccc777000000000288882000000000000000000000000000000000000000000000000000000000000000000000006600000000 -ccccccccccccccccc777777ccccc7777000000000028820000000000000000000000000000000000000000000000000000000000000000000000006600000000 -cccccccccccccccc7777777777777777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -6ccccccccccccccc7777777777777775111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -cccccccccccccc776665666566656665111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -ccccccccccccc7776765676567656765111111111111111111111000000000000000000000000000000000000000000000000001111111111111111111111111 -ccccccccccccc7776771677167716771111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccc77771711171117111711111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccc77771711171117111711111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -ccccccccccccc7770000000000000011111111111111111111111111111111171111111111111111111111110000000000000001161111111111111111111111 -ccccccccccccc7770000000000000011111111111111111111111111111111111111111111111111111111110000000000000001111111111111111111111111 -cccccccccccccc770000000000000011111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000 -cccccccccccccc770000000000000011111111111111111111111111111111111111111111111111111111110000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000111111111111111111111111111111111111111111111100060000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -cccccccccccccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccc77ccc770000000000000000000000000111111111111111111111111111111111111111111111100000000000000000000000000000000000000000 -ccccccccc77ccc770000000000000000000000000000000000000700000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccc7770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccc77770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc777777770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccc777777750000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccc77550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccc77667000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -c77ccc77677770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -c77ccc77666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000770000000000011 -ccccc777550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000770000000000011 -cccc7777667000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -77777777677770000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011 -77777775666000000000000000000000000000000000000000000000000000000000000000000000000070000000000000000000000000000000000000000011 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000077777700000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777777770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777733770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000777733770000000000000000 -55555555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000737733370000001111111111 -555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000007333bb370000001111111111 -555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000333bb300000001111111111 -55555555500000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000033333300000001111111111 -50555555550000000000000000000000000000000000000000000000000000000000000000000000000000000000000000ee0ee003b333300000001111111111 -55550055555000000000000000000000000000000000000000000000000000000000000000000000000000000000000000eeeee0033333300000001111111111 -555500555555000000000000000000000000000000000000000000000000000000111111111111111111111111111111111e8e111333b3300000001111111111 -55555555555550000000000000000000000000000000000000000000000000000011111111111111111111111111b11111eeeee1113333000000001111111111 -5505555555555500000000000000000000000000000000000000000000000000001111111111111111111111111b111111ee3ee1110440000000001111111111 -5555555555555550000000000000000000000000000000000000000000000000001111111117111111111111131b11311111b111110440000000000000000111 -5555555555555555000000000000000000000000000000000000000000000000001111111111111111111111131331311111b111119999000000000000000111 -55555555555555550000000000000000077777700000000000000000000000000011111111111111511111115777777777777777777777755000000000000005 -55555555555555500000000000000000777777770000000000000000000000000011111111111111551111117777777777777777777777775500000000000055 -55555555555555000000000000000000777777770000000000000000000000000011111111111111555111117777ccccc777777ccccc77775550000000000555 -5555555555555000000000000000000077773377111111111111111111111111111111111111111155551111777cccccccc77cccccccc7775555000000005555 -555555555555000000000000000000007777337711111111111111111111111111111111111111115555511177cccccccccccccccccccc775555500000055555 -555555555550000000000000000000007377333711111111111111111111111111111111111110005555550077cc77ccccccccccccc7cc775555550000555555 -555555555500000000000000000000007333bb3711111111111111111111111111111111111110005555555077cc77cccccccccccccccc775555555005555555 -555555555000000000000000000000000333bb3111111111111111111111111111111111111110005555555577cccccccccccccccccc66775555555555555555 -555555555555555555555555000000000333333111111111111111111111111111111111111110055555555577ccccccccccccccc6cc66775555555555555555 -5555555555555555555555500000000003b3333111111111111111111111111111111111111110555055555577cccccccccccccccccccc775555555550555555 -555555555555555555555500000000300333333111111111111111111111111111111111111115555555005577cc7cccccccccccc77ccc775555555555550055 -555555555555555555555000000000b00333b33111111111111111111111111111111111111155555555005577ccccccccccccccc77ccc775555555555550055 -55555555555555555555000000000b3000333311111111111111111111111111111111111115555555555555777cccccccc77cccccccc7775555555555555555 -55555555555555555550000003000b00000440000000000000000000000000000000000000555555550555557777ccccc777777ccccc77775555555555055555 -55555555555555555500000000b0b300000440000000000000000000000000000000000005555555555555557777777777777777777777775555555555555555 -55555555555555555000000000303300009999000000000000000000000000000000000055555555555555555777777777777777777777755555555555555555 -55555555555555555777777777777777777777750000000000000000000000000000000555555555555555555555555500000000555555555555555555555555 -55555555505555557777777777777777777777770000000088888880000000000000005550555555555555555555555000000000055555550555555555555555 -55555555555500557777ccccc777777ccccc77770000000888888888000000300000055555550055555555555555550000000000005555550055555555555555 -5555555555550055777cccccccc77cccccccc77700000008888ffff8000000b00000555555550055555555555555500000000000000555550005555555555555 -555555555555555577cccccccccccccccccccc770000b00888f1ff1800000b300005555555555555555555555555000000000000000055550000555555555555 -555555555505555577cc77ccccccccccccc7cc77000b000088fffff003000b000055555555055555555555555550000000000000000005550000055555555555 -555555555555555577cc77cccccccccccccccc77131b11311833331000b0b3000555555555555555555555555500000000888800000000550000005555555555 -555555555555575577cccccccccccccccccccc771313313111711710703033005555555555555555555555555000000008888880000000050000000555555555 -7777777777777777cccccccccccccccccccccccc7777777777777777777777755555555555555555555555550000000008788880000000000000000055555555 -7777777777777777cccccccccccccccccccccccc7777777777777777777777775555555555555555555555550000000008888880000000000000000055555550 -c777777cc777777cccccccccccccccccccccccccc777777cc777777ccccc77775555555555555555555555550000000008888880000000000000000055555500 -ccc77cccccc77cccccccccccccccccccccccccccccc77cccccc77cccccccc7775555555555555555555555550000000008888880000000000000000055555000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000888800000000000000000055550000 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc7cc775555555555555555555555550000000000006000000000000000000055500000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060000000000000000000055000000 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060001111111111111111151111111 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555555555555550000000000060001111111111111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc775555555555555550555555500000000000060001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc77ccc775500005555555500555555600000000000006001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc77ccc775500005555555000555550000000000000006001111111111111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccccccccc77cccccccc7775500005555550000555500000000000000000001111111111111111111111111 -cccccccccccccc7cccccccccccccccccccccccccccccccccc777777ccccc77775500005555500000555000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccccc77777777777777775555555555000000550000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccccc77777777777777755555555550000000500000000000000000000000007700000000000000000000 -ccccccccccccccccccccccccccccccccccccccccc77ccc7700000000555555555555555500000000000000000000000000000000007700000000000000000000 -ccccccccccccccccccccccccccccccccccccccccc77cc77700000000055555555555555000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000005555555555550000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccc777770000000000555555555500000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000055555555000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000005555550000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000555500000000000000000000000000000000000000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000055000000000000000000000000000000000000000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000000000000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000111111111111111 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000006000000000000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000000000000000000000000000000000000000000000000000007000111111111111111 -cccccccccccccccccccccccccccccccccccccccccccc777700000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000000000000000000 -ccccccccccccccccccccccccccccccccccccccccccccc77700000000000000000000000000000000000000000000000000000000000000000000000000000000 -cccccccccccccccccccccccccccccccccccccccccccccc7700000000000000000000000000000000000000000000000000000000000000000000000000000000 - -__gff__ -0000000000000000000000000000000004020000000000000000000200000000030303030303030304040402020000000303030303030303040404020202020200001313131302020300020202020202000013131313020204020202020202020000131313130004040202020202020200001313131300000002020202020202 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -__map__ -0000000000000000000000000000000000000000000000000000000000000000323232323232323232323232323232322600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001000000000000000000000000000000 -0000000060000000000000000000000000000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000210000000100000000000000000000000012000000000000000000000000000000 -0000000070010000000000000000000000000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000000000000000000000000000002135320000001200000000000000000000000000000000000000000000000000000000 -0000000021230000000000000000000000000000000000000000000000000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000000000000000000000000000000000213300000000000000000000000000000000000000000000000000000000000000000000 -0000000024252300000000000000000000213535360034353535352300000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000110000000000000000000000000000300027000000000000000000000000000000000000000000000000000000000000000000 -0000000024252600000000000000000000300000000000000000003123000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000000000200000000000000000000000000000242225220000000000000000000000000000000000000000000000000000000000000000 -0000002132252600000000000000000000300000000000000000000030000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000110000000000000000000000000000000000242525320000000000000000000000000000000000000000000000000000000000000000 -0000003700242600000000000000000000312300000000000000000030000000000000000000000000000000000000002600000000000000000000000000000000000000000000000000200000000000000000000000000000000021252526000000000000000000000000000000000000000000000000000000000000000000 -0000000021252600000000000000000000003136000100000000000030000000000000000000000000000000000000002600000000000000000000000000000000000000000000110000000000000000000000000100000000000024252532220000000000000000000000000000000000000000000000000000000000000000 -0000002125253300000000000000000000000000343600000000002133000000000000270000000000000000000000012601000000000000000000000000000000000000000000200000000000000000000000002123000000002125252600310000000000000000000000000000000000000000000000000000000000000000 -0000002432330000000000000000000000000000000034353535353300005f00000000313535353535353535353535352600000000000000000000000000000000000000110000000000000000000000000000002432222235223225252523000000000000000000000000000000000000000000000000000000000000000000 -0000003000002000000000000000000000000000000000000000000000006f00000000000000000000000000000000002523000000000000000000000000000000000000200000000000000000000000000000003000313300370024252525350000000000000000000000000000000000000000000000000000000000000000 -0000003123000000000000000000000000000000000000000000000000000000000000000000000000000000000000002526000000000000000000000000000001000000000000000000000000000000000000003000000027002132252526000000000000000000000000000000000000000000000000000000000000000000 -0000000024230000000000000000000000000000000000000000000000000000000000000000000000000000000000003225230000000000000000000000000022230000000000000000000000000000000000002435222225223300242525220000000000000000000000000000000000000000000000000000000000000000 -0000000031330000000000000000000000000000000000000000000000000000000000000000000000000000000000000031323535353535353535353535360032260000000000000000000000000000000000003000243225330000242525250000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000242222222300000000000000000000000000002422260030002700242525250000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000024252533000000252525253232252525252525252525250000000000000000000024260000000000000000000000000000000000000000323232252525252525252525252525250000000000000000000000000000000025252525253232323232323232252525 -0000000000000000000000000000000000000000000000000124252600000000252525330000313232323232323232320000000000000000002132330000000000000000000000000000000000000000000000313232323225252525252525250000000000000000000000000000000025323232330000000000000000313225 -0000000000000000000000000000212200000000212222222225252600000000252533000000000000000000000000000000000000000021222600000000000000000000000000000000000000000000000000000000000031323232323225250000000000000000000000000000000026000000000000000000000000000031 -0000000000000000000000000000242500000000242525252525252600000000253300000000000000000000000000000000000000003432253300000000000000000000000000000012000000000000000000000000000000000000000031250000000000000000000000000000000026000000000000000000000000000000 -0000000000000000000000000000242500000000242525252525252600000000260000000000000000000000000000000000000000270000300000000000000000000000000000000012000000000000000000000000000000000000000000240000000000000000000000000000000026000000000000000000000000000000 -0000000000000000000000000021252500000000242525252525252600000000260000000000000000000000000000000000000000370000300000000000000000000000000000000012000000000000000000000000000000000000000000240000000000000000000000000000000026000000000000000000000000000000 -0000000000000000000000002125252500000000242525252525252600000000260000000000000000000000000000000000000027000000300000000000000000000000000000000012000000000000000000808182830000000000000000242223000000000000000000001212121226000000000000000000000000000000 -0000000000000000000021222525252500000000242525252525252600000000260000000000000000000000000000000000000030000000370000000000000000000000000000001212000000000000000000909192930000000000000100242526000000000000000000002122222226000000000000000000000000000000 -0000004647000001002125252525252500000000242525252525252600000000260100000000000000000000000000000100000030000000000000000000000000000000000000001200000000000000000000a0a1a2a30000000000000000242526000000000000000000002425252526000000000000000000000000000021 -0000005657000000002425252525252500000000242525252525252600000000252300000000000000000000000000002300000030000000000000000000000000000000000000001200000000000000000000b0b1b2b30000000000000000242526000000000000000000002425252526000000000000000000000000002125 -0000002122222222222525252525252500000000242525252525252600000000252600000000000000000000000000002600000030000000000000000000000000000000000001121200000000000000000000000000000000000000000000242525230000000000000000212525252526000000000000000000000100342525 -2222222525252525252525252525252500000000313232323232253235222222252600000000000000000000000021222600000030000000000000000000000000000000000012120000000000000000000000000000000000000000000021252525260000000000000021252525252526000000000000000000002136002425 -2525252525252525252525252525252500000000000000000000370000313232252600000000000000000000000024252600000037000000000000000000000000000000000012000000000000000000000000000000000000000000002125252525260001000027002125252525252525230000000000000000212600212532 -2525252525252525252525252525252500000000000000000000000000000000253300000000000000000000212225252600213600000000000000000000000000000000000012000000000000000000000000000000000000002122222525252525252222222225222525252525252525260000000000003422252535322600 -2525252525252525252525252525252500000000000000000000000000000000260000000000000021222222252525252535330000000000000000000000000000000000000000000000000000000000000000212222222222222525252525252525252525252525252525323232323225252222222222230024252600003000 -2525252525252525252525252525252500000000000000000000000000000000252222222222222225252525252525252600000000000000000000000000000000000000000000000000000000000000222222252525252525252525252525252525252525252525252526000000000025252525252525252225252522222600 -__sfx__ -0002000036370234702f3701d4702a37017470273701347023370114701e3700e4701a3600c46016350084401233005420196001960019600196003f6003f6003f6003f6003f6003f6003f6003f6003f6003f600 -0002000011070130701a0702407000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000300000d07010070160702207000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000200000642008420094200b420224402a4503c6503b6503b6503965036650326502d6502865024640216401d6401a64016630116300e6300b62007620056100361010600106000060000600006000060000600 -000400000f0701e070120702207017070260701b0602c060210503105027040360402b0303a030300203e02035010000000000000000000000000000000000000000000000000000000000000000000000000000 -000300000977009770097600975008740077300672005715357003470034700347003470034700347003570035700357003570035700347003470034700337003370033700337000070000700007000070000700 -00030000241700e1702d1701617034170201603b160281503f1402f120281101d1101011003110001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100 -00020000101101211014110161101a120201202613032140321403410000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100001000010000100 -00030000070700a0700e0701007016070220702f0702f0602c0602c0502f0502f0402c0402c0302f0202f0102c000000000000000000000000000000000000000000000000000000000000000000000000000000 -0003000005110071303f6403f6403f6303f6203f6103f6153f6003f6003f600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600006000060000600 -011000200177500605017750170523655017750160500605017750060501705076052365500605017750060501775017050177500605236550177501605006050177500605256050160523655256050177523655 -002000001d0401d0401d0301d020180401804018030180201b0301b02022040220461f0351f03016040160401d0401d0401d002130611803018030180021f061240502202016040130201d0401b0221804018040 -00100000070700706007050110000707007060030510f0700a0700a0600a0500a0000a0700a0600505005040030700306003000030500c0700c0601105016070160600f071050500a07005050030510a0700a060 -000400000c5501c5601057023570195702c5702157037570285703b5702c5703e560315503e540315303e530315203f520315203f520315103f510315103f510315103f510315103f50000500005000050000500 -000400002f7402b760267701d7701577015770197701c750177300170015700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700 -00030000096450e655066550a6550d6550565511655076550c655046550965511645086350d615006050060500605006050060500605006050060500605006050060500605006050060500605006050060500605 -011000001f37518375273752730027300243001d300263002a3001c30019300003000030000300003000030000300003000030000300003000030000300003000030000300003000030000300003000030000300 -011000002953429554295741d540225702256018570185701856018500185701856000500165701657216562275142753427554275741f5701f5601f500135201b55135530305602454029570295602257022560 -011000200a0700a0500f0710f0500a0600a040110701105007000070001107011050070600704000000000000a0700a0500f0700f0500a0600a0401307113050000000000013070130500f0700f0500000000000 -002000002204022030220201b0112404024030270501f0202b0402202027050220202904029030290201601022040220302b0401b030240422403227040180301d0401d0301f0521f0421f0301d0211d0401d030 -0108002001770017753f6253b6003c6003b6003f6253160023650236553c600000003f62500000017750170001770017753f6003f6003f625000003f62500000236502365500000000003f625000000000000000 -002000200a1400a1300a1201113011120111101b1401b13018152181421813213140131401313013120131100f1400f1300f12011130111201111016142161321315013140131301312013110131101311013100 -001000202e750377502e730377302e720377202e71037710227502b750227302b7301d750247501d730247301f750277501f730277301f7202772029750307502973030730297203072029710307102971030710 -000600001877035770357703576035750357403573035720357103570000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700007000070000700 -001800202945035710294403571029430377102942037710224503571022440274503c710274403c710274202e450357102e440357102e430377102e420377102e410244402b45035710294503c710294403c710 -0018002005570055700557005570055700000005570075700a5700a5700a570000000a570000000a5700357005570055700557000000055700557005570000000a570075700c5700c5700f570000000a57007570 -010c00103b6352e6003b625000003b61500000000003360033640336303362033610336103f6003f6150000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000c002024450307102b4503071024440307002b44037700244203a7102b4203a71024410357102b410357101d45033710244503c7101d4403771024440337001d42035700244202e7101d4102e7102441037700 -011800200c5700c5600c550000001157011560115500c5000c5700c5600f5710f56013570135600a5700a5600c5700c5600c550000000f5700f5600f550000000a5700a5600a5500f50011570115600a5700a560 -001800200c5700c5600c55000000115701156011550000000c5700c5600f5710f56013570135600f5700f5600c5700c5700c5600c5600c5500c5300c5000c5000c5000a5000a5000a50011500115000a5000a500 -000c0020247712477024762247523a0103a010187523a0103501035010187523501018750370003700037000227712277222762227001f7711f7721f762247002277122772227620070027771277722776200700 -000c0020247712477024762247523a0103a010187503a01035010350101875035010187501870018700007001f7711f7701f7621f7521870000700187511b7002277122770227622275237012370123701237002 -000c0000247712477024772247722476224752247422473224722247120070000700007000070000700007002e0002e0002e0102e010350103501033011330102b0102b0102b0102b00030010300123001230012 -000c00200c3320c3320c3220c3220c3120c3120c3120c3020c3320c3320c3220c3220c3120c3120c3120c30207332073320732207322073120731207312073020a3320a3320a3220a3220a3120a3120a3120a302 -000c00000c3300c3300c3200c3200c3100c3100c3103a0000c3300c3300c3200c3200c3100c3100c3103f0000a3300a3201333013320073300732007310113000a3300a3200a3103c0000f3300f3200f3103a000 -00040000336251a605000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005000050000500005 -000c00000c3300c3300c3300c3200c3200c3200c3100c3100c3100c31000000000000000000000000000000000000000000000000000000000000000000000000a3000a3000a3000a3000a3310a3300332103320 -001000000c3500c3400c3300c3200f3500f3400f3300f320183501834013350133401835013350163401d36022370223702236022350223402232013300133001830018300133001330016300163001d3001d300 -000c0000242752b27530275242652b26530265242552b25530255242452b24530245242352b23530235242252b22530225242152b21530215242052b20530205242052b205302053a2052e205002050020500205 -001000102f65501075010753f615010753f6152f65501075010753f615010753f6152f6553f615010753f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -0010000016270162701f2711f2701f2701f270182711827013271132701d2711d270162711627016270162701b2711b2701b2701b270000001b200000001b2000000000000000000000000000000000000000000 -00080020245753057524545305451b565275651f5752b5751f5452b5451f5352b5351f5252b5251f5152b5151b575275751b545275451b535275351d575295751d545295451d535295351f5752b5751f5452b545 -002000200c2650c2650c2550c2550c2450c2450c2350a2310f2650f2650f2550f2550f2450f2450f2351623113265132651325513255132451324513235132351322507240162701326113250132420f2600f250 -00100000072750726507255072450f2650f2550c2750c2650c2550c2450c2350c22507275072650725507245072750726507255072450c2650c25511275112651125511245132651325516275162651625516245 -000800201f5702b5701f5402b54018550245501b570275701b540275401857024570185402454018530245301b570275701b540275401d530295301d520295201f5702b5701f5402b5401f5302b5301b55027550 -00100020112751126511255112451326513255182751826518255182451d2651d2550f2651824513275162550f2750f2650f2550f2451126511255162751626516255162451b2651b255222751f2451826513235 -00100010010752f655010753f6152f6553f615010753f615010753f6152f655010752f6553f615010753f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -001000100107501075010753f6152f6553f6153f61501075010753f615010753f6152f6553f6152f6553f61500005000050000500005000050000500005000050000500005000050000500005000050000500005 -002000002904029040290302b031290242b021290142b01133044300412e0442e03030044300302b0412b0302e0442e0402e030300312e024300212e024300212b0442e0412b0342e0212b0442b0402903129022 -000800202451524515245252452524535245352454524545245552455524565245652457500505245750050524565005052456500505245550050524555005052454500505245350050524525005052451500505 -000800201f5151f5151f5251f5251f5351f5351f5451f5451f5551f5551f5651f5651f575000051f575000051f565000051f565000051f555000051f555000051f545000051f535000051f525000051f51500005 -000500000373005731077410c741137511b7612437030371275702e5712437030371275702e5712436030361275602e5612435030351275502e5512434030341275402e5412433030331275202e5212431030311 -002000200c2750c2650c2550c2450c2350a2650a2550a2450f2750f2650f2550f2450f2350c2650c2550c2450c2750c2650c2550c2450c2350a2650a2550a2450f2750f2650f2550f2450f235112651125511245 -002000001327513265132551324513235112651125511245162751626516255162451623513265132551324513275132651325513245132350f2650f2550f2450c25011231162650f24516272162520c2700c255 -000300001f3302b33022530295301f3202b32022520295201f3102b31022510295101f3002b300225002950000000000000000000000000000000000000000000000000000000000000000000000000000000000 -000b00002935500300293453037030360303551330524300243050030013305243002430500300003002430024305003000030000300003000030000300003000030000300003000030000300003000030000300 -001000003c5753c5453c5353c5253c5153c51537555375453a5753a5553a5453a5353a5253a5253a5153a51535575355553554535545355353553535525355253551535515335753355533545335353352533515 -00100000355753555535545355353552535525355153551537555375353357533555335453353533525335253a5753a5453a5353a5253a5153a51533575335553354533545335353353533525335253351533515 -001000200c0600c0300c0500c0300c0500c0300c0100c0000c0600c0300c0500c0300c0500c0300c0100f0001106011030110501103011010110000a0600a0300a0500a0300a0500a0300a0500a0300a01000000 -001000000506005030050500503005010050000706007030070500703007010000000f0600f0300f010000000c0600c0300c0500c0300c0500c0300c0500c0300c0500c0300c010000000c0600c0300c0100c000 -0010000003625246150060503615246251b61522625036150060503615116253361522625006051d6250a61537625186152e6251d615006053761537625186152e6251d61511625036150060503615246251d615 -00100020326103261032610326103161031610306102e6102a610256101b610136100f6100d6100c6100c6100c6100c6100c6100f610146101d610246102a6102e61030610316103361033610346103461034610 -00400000302453020530235332252b23530205302253020530205302253020530205302153020530205302152b2452b2052b23527225292352b2052b2252b2052b2052b2252b2052b2052b2152b2052b2052b215 -__music__ -01 150a5644 -00 0a160c44 -00 0a160c44 -00 0a0b0c44 -00 14131244 -00 0a160c44 -00 0a160c44 -02 0a111244 -00 41424344 -00 41424344 -01 18191a44 -00 18191a44 -00 1c1b1a44 -00 1d1b1a44 -00 1f211a44 -00 1f1a2144 -00 1e1a2244 -02 201a2444 -00 41424344 -00 41424344 -01 2a272944 -00 2a272944 -00 2f2b2944 -00 2f2b2c44 -00 2f2b2944 -00 2f2b2c44 -00 2e2d3044 -00 34312744 -02 35322744 -00 41424344 -01 3d7e4344 -00 3d7e4344 -00 3d4a4344 -02 3d3e4344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -00 41424344 -01 383a3c44 -02 393b3c44 \ No newline at end of file diff --git a/morespritescore.p8 b/morespritescore.p8 index 9015a85..c1314b7 100644 --- a/morespritescore.p8 +++ b/morespritescore.p8 @@ -237,28 +237,37 @@ player={ this.spd.x~=0 and h_input~=0 and 1+this.spr_off%4 or 1 -- walk or stand -- exit level (except summit) - if levels[lvl_id+1] then + + if lvl_customexit == "true" then -- top exit - if this.y<-4 and lvl_exit_type == 0 then - next_level() + if this.y<-4 and lvl_top != "nil" then + load_level(lvl_top) end -- right exit - if this.x > lvl_pw and lvl_exit_type == 1 then - next_level() + if this.x > lvl_pw and lvl_right != "nil" then + load_level(lvl_right) end -- left exit - if this.x<-4 and lvl_exit_type == 2 then + if this.x<-4 and lvl_left != "nil" then + load_level(lvl_left) + end + else + -- normal top exit + if this.y<-4 then + if levels[lvl_id+1] then next_level() + end end - end + end -- bottom exit if this.y > lvl_ph then - if lvl_exit_type == 3 and levels[lvl_id+1] then - next_level() + if lvl_bottom != "nil" and lvl_customexit then + load_level(lvl_bottom) else kill_player(this) end end + -- fix fault 2 bug -- was on the ground this.was_on_ground=on_ground @@ -271,15 +280,16 @@ player={ local bound_t = -1 local bound_b = lvl_ph+100 - if lvl_exit_type == 0 then + if lvl_top != "nil" or lvl_customexit == "false" then bound_t = -100 - elseif lvl_exit_type == 1 then + end + if lvl_right != "nil" then bound_r = lvl_pw+100 - elseif lvl_exit_type == 2 then + end + if lvl_left != "nil" then bound_l = -100 - elseif lvl_exit_type == 3 then - bound_b = lvl_ph+100 end + local clampx = mid(this.x,bound_l,bound_r) local clampy = mid(this.y,bound_t,bound_b) @@ -1017,15 +1027,14 @@ end function next_level() local next_lvl=lvl_id+1 - --check for music trigger - if music_switches[next_lvl] then - music(music_switches[next_lvl],500,7) - end - load_level(next_lvl) end function load_level(id) + --check for music trigger + if music_switches[id] then + music(music_switches[id],500,7) + end has_dashed,has_key= false--,false @@ -1046,7 +1055,12 @@ function load_level(id) _ENV[split"lvl_x,lvl_y,lvl_w,lvl_h"[i]]=tbl[i]*16 end lvl_title=tbl[5] - lvl_exit_type=tbl[6] + lvl_customexit=tbl[6] + lvl_top=tbl[7] + lvl_right=tbl[8] + lvl_left=tbl[9] + lvl_bottom=tbl[10] + print(tbl) lvl_pw,lvl_ph=lvl_w*8,lvl_h*8 @@ -1299,7 +1313,8 @@ function spikes_at(x1,y1,x2,y2,xspd,yspd) if({[17]=y2%8>=6 and yspd>=0, [27]=y1%8<=2 and yspd<=0, [43]=x1%8<=2 and xspd<=0, - [59]=x2%8>=6 and xspd>=0})[tile_at(i,j)] then + [59]=x2%8>=6 and xspd>=0, --corner spike code + })[tile_at(i,j)] then return true end end @@ -1311,12 +1326,16 @@ end --@begin levels={ - "0,0,1,1,lvea,0", - "0,1,1,1,,0" + "0,0,1,1,lvea,true,3,1,1,2", + "0,1,1,1,sprite test,false,nil,nil,nil,nil", + "1,0,1,1,level,true,4,1,nil,2", + "1,1,1,1,,true,1,3,nil,nil" } mapdata={ - "¹²³⁴⁵⁶⁷⁸\9\nᵇᶜ\13ᵉᶠ▮■□⁙⁘‖◀▶「」¥•、。゛゜ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~○█▒🐱⬇️░✽●♥☉웃⌂⌂😐♪🅾️◆…➡️★⧗⬆️ˇ∧❎▤▥あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわをんっゃゅょアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンッャュョ◜◝\"", - "&3'¹¹¹¹¹¹¹¹¹¹¹¹¹'²1²¹¹¹¹¹¹¹¹¹¹¹¹3637¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹✽●♥☉¹¹¹¹¹¹¹¹¹¹¹¹ˇ∧❎▤¹¹¹¹¹¹¹¹¹¹¹¹しすせそ¹¹¹¹¹¹¹¹¹¹¹¹ふへほま¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹¹◝6$¹¹¹¹¹¹¹¹¹¹¹¹¹S¹266$¹¹¹¹¹¹D¹¹?S¹¹¹¹267¹F¹¹¹¹¹Cd¹¹¹¹¹¹¹¹ctDttte¹¹¹¹¹¹¹¹¹¹¹V¹¹¹¹¹" + "%%%%&\0\0\0$%%%%%%%%%%%&\0\0\0$%%%%%%%%%%%&\0\0\0$%%%%%%%%%%%&\0\0\0$%%%%%%%22223\0\0\00012222222\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0¹\0\0\0\0\0\0\0\0\0\0\0\0\"\"\"\"#\0\0\0!\"\"55555%%%%&\0\0\0$2&\0\0\0\0\0%%%%&\0\0\0000\0001#\0\0\0\0%%%%&\0\0\0000\0\0007\0\0\0\0%%%%&\0\0\0000\0\0\0'\0\0\0%%%%&\0\0\0000\0\0\0001#\0\0%%%%&\0\0\0000\0\0\0\0000\0\0%%%%&\0\0\0000\0\0\0\0$\"\"", + "\0¹²³⁴⁵⁶⁷⁸\9\nᵇᶜ\13ᵉᶠ▮■□⁙⁘‖◀▶「」¥•、。゛゜ !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~○█▒🐱⬇️░✽●♥☉웃⌂⬅️😐♪🅾️◆…➡️★⧗⬆️ˇ∧❎▤▥あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもや\0よらりるれろわをんっゃゅょアイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヲンッャュョ◜◝", + nil, + "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0#\0\0\0\0\0\0\0¹\0\0\0\0\0\0\0003\0\0\0\0\0\0\0\0\0\0\0\0\0\0¹\0'\0\0\0\0\0\0\0\0\0\0\0\0!5\0000\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0001#\0\0\0\0\0\0\0\0\0\0!3\0\0\0007\0\0\0\0\0\0\0\0\0\0000\0\0\0\0\00046\0\0\0\0\0\0\0!3\0\0\0\0\0\0\0\0\0\0\0\0\0\0000\0\0\0\0\0\0\0\0\0\0\0'\0\0\0000\0\0\0\0\0\0\0\0\0\0\0001#\0!3\0\0\0\0\0\0\0\0\0\0\0\0001\"&\0\0\0\0\0\0\0\0\0\0\0\0\0\0$&\0\0\0\0\0\0\0\0\0\0\0\0\0\0001&\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0007\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0" } --@end @@ -1347,29 +1366,10 @@ function replace_mapdata(x,y,w,h,data) -- end for i=1,#data do - mset(x+((i-1)%w),y+(i-1)/w,ord(sub(data,i,i))-1) + mset(x+((i-1)%w),y+(i-1)/w,ord(sub(data,i,i))) end end ---[[ - -short on tokens? -everything below this comment -is just for grabbing data -rather than loading it -and can be safely removed! - ---]] - ---copy mapdata string to clipboard -function get_mapdata(x,y,w,h) - local reserve="" - for i=0,w*h-1 do - reserve..=num2hex(mget(i%w,i\w)) - end - printh(reserve,"@clip") -end - --convert mapdata to memory data function num2hex(v) return sub(tostr(v,true),5,6) @@ -1747,14 +1747,14 @@ __music__ __map__ 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000002123000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000003125230000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000031260000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000242300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000312600000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000002423000001000100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000002000002000003132222236002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +0000000000000000000000000000000000000000000000000000313300000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 diff --git a/src/fileio.lua b/src/fileio.lua index b2f6899..0267b7e 100644 --- a/src/fileio.lua +++ b/src/fileio.lua @@ -1,6 +1,7 @@ -- functions to read lines correctly for \r\n line endings utf8 = require("utf8") chars = { +"\0", "¹", "²", "³", @@ -261,12 +262,6 @@ ords={} for k,v in pairs(chars) do ords[v]=k end --- fix for strange behavior with backslashes --- chars[92] = "\\\\" --- chars[34] = "\\\"" --- chars[13] = "\\\r" --- chars[10] = "\\\n" --- chars[9] = "\\\t" local function cr_lines(s) return s:gsub('\r\n?', '\n'):gmatch('(.-)\n') end @@ -282,6 +277,7 @@ end -- file handling function loadpico8(filename) + print("➡" == "➡️") love.graphics.setDefaultFilter("nearest", "nearest") local file, err = io.open(filename, "rb") @@ -530,10 +526,11 @@ function loadpico8(filename) -- load levels if levels[1] then for n, s in pairs(levels) do - local x, y, w, h, title,exit = string.match(s, "^([^,]*),([^,]*),([^,]*),([^,]*),?([^,]*),([^,]*)$") + local x, y, w, h, title,customexit,top,right,left,bottom = string.match(s, "^([^,]*),([^,]*),([^,]*),([^,]*),?([^,]*),([^,]*),([^,]*),([^,]*),([^,]*),([^,]*)$") x, y, w, h = tonumber(x), tonumber(y), tonumber(w), tonumber(h) + local customexit = customexit == "true" if x and y and w and h then -- this confirms they're there and they're numbers - data.roomBounds[n] = {x=x*128, y=y*128, w=w*16, h=h*16, title=title,exit=exit} + data.roomBounds[n] = {x=x*128, y=y*128, w=w*16, h=h*16, title=title,customexit=customexit,top=top,right=right,left=left,bottom=bottom} if not (mapdata[n] == nil) then while string.len(mapdata[n])/2 < w*16 * h*16 do print("preventing crash") @@ -547,7 +544,7 @@ function loadpico8(filename) else for J = 0, 3 do for I = 0, 7 do - local b = {x = I*128, y = J*128, w = 16, h = 16, title=""} + local b = {x = I*128, y = J*128, w = 16, h = 16, title="",customexit=false,top="nil",right="nil",left="nil",bottom="nil"} table.insert(data.roomBounds, b) end end @@ -563,7 +560,11 @@ function loadpico8(filename) local room = newRoom(b.x, b.y, b.w, b.h) loadroomdata(room, levelstr) room.title = b.title - room.exit = b.exit + room.customexit = b.customexit + room.top = b.top + room.right = b.right + room.left = b.left + room.bottom = b.bottom data.rooms[n] = room end end @@ -575,7 +576,12 @@ function loadpico8(filename) local room = newRoom(b.x, b.y, b.w, b.h) room.hex=false room.title = b.title - room.exit = b.exit + room.title = b.title + room.customexit = b.customexit + room.top = b.top + room.right = b.right + room.left = b.left + room.bottom = b.bottom for i = 0, b.w - 1 do for j = 0, b.h - 1 do @@ -597,10 +603,6 @@ end function openPico8(filename) newProject() - -- print("⬇️") - -- print(ords["⬇️"]) - -- print(chars[131]) - -- print(chars) -- loads into global p8data as well, for spritesheet p8data = loadpico8(filename) project.rooms = p8data.rooms @@ -647,7 +649,7 @@ function savePico8(filename) local levels, mapdata = {}, {} for n = 1, #project.rooms do local room = project.rooms[n] - levels[n] = string.format("%g,%g,%g,%g,%s,%s", room.x/128, room.y/128, room.w/16, room.h/16, room.title,room.exit) + levels[n] = string.format("%g,%g,%g,%g,%s,%s,%s,%s,%s,%s", room.x/128, room.y/128, room.w/16, room.h/16, room.title,room.customexit,room.top,room.right,room.left,room.bottom) if room.hex then mapdata[n] = dumproomdata(room) diff --git a/src/keyboard.lua b/src/keyboard.lua index 0b07fa5..2f5f145 100644 --- a/src/keyboard.lua +++ b/src/keyboard.lua @@ -223,7 +223,11 @@ function love.keypressed(key, scancode, isrepeat) --end --room.title = title room.title = "" - room.exit = 0 + room.customexit = false + room.top = "nil" + room.right = "nil" + room.bottom = "nil" + room.left = "nil" table.insert(project.rooms, room) app.room = #project.rooms @@ -257,7 +261,11 @@ function love.keyreleased(key, scancode) app.renameRoom = activeRoom() app.renameRoomVTable = { name = {value = app.renameRoom.title}, hex = {value = app.renameRoom.hex}, - exit = {value = app.renameRoom.exit} + customexit = {value = app.renameRoom.customexit}, + top = {value = app.renameRoom.top}, + right = {value = app.renameRoom.right}, + left = {value = app.renameRoom.left}, + bottom = {value = app.renameRoom.bottom}, } end end diff --git a/src/mainloop.lua b/src/mainloop.lua index 07b8c91..418bbdb 100644 --- a/src/mainloop.lua +++ b/src/mainloop.lua @@ -169,7 +169,7 @@ function love.update(dt) if app.renameRoom then local room = app.renameRoom - local w, h = 200*global_scale, 250*global_scale + local w, h = 200*global_scale, 400*global_scale if ui:windowBegin("Rename room", app.W/2 - w/2, app.H/2 - h/2, w, h, {"title", "border", "closable", "movable"}) then local x,y=div8(room.x),div8(room.y) local fits_on_map=x>=0 and x+room.w<=128 and y>=0 and y+room.h<=64 @@ -195,16 +195,32 @@ function love.update(dt) local state, changed -- ui:editFocus() state, changed = ui:edit("simple", app.renameRoomVTable.name) - ui:label("exit type: 0 - top, 1 - right") - ui:label("2 - left, 3 - bottom") - local state2, changed2 - -- ui:editFocus() - state2, changed2 = ui:edit("simple", app.renameRoomVTable.exit) - + -- ui:label("exit type: 0 - top, 1 - right") + -- ui:label("2 - left, 3 - bottom") + + ui:checkbox("set custom exit",app.renameRoomVTable.customexit) + + if app.renameRoomVTable.customexit.value then + -- local state2, changed2 + -- state2, changed2 = ui:edit("simple", app.renameRoomVTable.exit) + + ui:label("top") + ui:edit("simple",app.renameRoomVTable.top) + ui:label("right") + ui:edit("simple",app.renameRoomVTable.right) + ui:label("left") + ui:edit("simple",app.renameRoomVTable.left) + ui:label("bottom") + ui:edit("simple",app.renameRoomVTable.bottom) + end if ui:button("OK") or app.enterPressed then room.title = app.renameRoomVTable.name.value - room.exit = app.renameRoomVTable.exit.value + room.customexit = app.renameRoomVTable.customexit.value + room.top = app.renameRoomVTable.top.value + room.right = app.renameRoomVTable.right.value + room.left = app.renameRoomVTable.left.value + room.bottom = app.renameRoomVTable.bottom.value room.hex = app.renameRoomVTable.hex.value app.renameRoom = nil end diff --git a/table.txt b/table.txt index f58c347..f17931f 100644 --- a/table.txt +++ b/table.txt @@ -1,3 +1,4 @@ +"\0", "¹", "²", "³",