From: Randy McShandy Date: Wed, 1 Apr 2026 03:41:00 +0000 (-0500) Subject: Teleportation and necessary camera work done. X-Git-Url: http://git.mcshandy.xyz/gitweb.cgi?a=commitdiff_plain;h=d085025a98f06180d8685bb3d497a0bedf126921;p=sumeriangame Teleportation and necessary camera work done. --- diff --git a/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png b/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png index 0036d2b..8dc9150 100644 Binary files a/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png and b/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_ba_packed.png differ diff --git a/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_bw_packed.png b/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_bw_packed.png index 86ec7cd..7a8542c 100644 Binary files a/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_bw_packed.png and b/main/assets/tilesets/kenney_1_bit/Tilesheet/monochrome_bw_packed.png differ diff --git a/main/control.lua b/main/control.lua index 722a2d3..a49173a 100644 --- a/main/control.lua +++ b/main/control.lua @@ -1,6 +1,5 @@ -- control.lua -local player_module = require('player') local assets = require('assets') local render = require('render') diff --git a/main/handlers.lua b/main/handlers.lua index 23a7cbf..49f0ecf 100644 --- a/main/handlers.lua +++ b/main/handlers.lua @@ -5,6 +5,7 @@ local control = require('control') local message = require('message') +local player_module = require('player') local render = require('render') function love.handlers.map_changed(new_map_name) @@ -29,6 +30,7 @@ end function love.handlers.ui_control(key, value) message.ui_control(key, value) + player_module.ui_control(key, value) end function love.handlers.collision(focus, pos) diff --git a/main/message.lua b/main/message.lua index 8a423c7..594ca26 100644 --- a/main/message.lua +++ b/main/message.lua @@ -61,7 +61,6 @@ end function message.ui_control(key, value) if (value.type == control.UIEvent.Interact) then - print('interact') message.active_message = nil end end diff --git a/main/player.lua b/main/player.lua index 84f1c19..5bbecbb 100644 --- a/main/player.lua +++ b/main/player.lua @@ -1,6 +1,7 @@ -- player.lua local conf = require('conf') +local control = require('control') local vector = require('vector') local collision = require('collision') local render = require('render') @@ -42,4 +43,23 @@ function player_module.draw(player_obj) end end +function player_module.ui_control(key, value) + local player = render.map.active_map.player + if value.type == control.UIEvent.Interact then + for k,object in pairs(render.map.active_map.objects) do + if vector.eq_xy({ x = object.x, y = object.y }, player.vec) then + if object.type == 'teleporter_tx' then + receiver = render.map.active_map.teleporters[object.properties.target] + rx_focus = render.map.active_map[receiver.properties.camera] + if receiver and rx_focus then + player.vec.x = receiver.x + player.vec.y = receiver.y + render.map.active_map.topleft = vector.scale_xy(rx_focus.vec, -1) + end + end + end + end + end +end + return player_module diff --git a/main/render.lua b/main/render.lua index 900e403..ecfd2c7 100644 --- a/main/render.lua +++ b/main/render.lua @@ -3,6 +3,7 @@ assets = require('assets') conf = require('conf') utils = require('utils') +vector = require('vector') render = {} @@ -25,7 +26,7 @@ render.color = {} -- wrapping a function that returns multiple values in {} packs -- them into a single struct render.color.really_dark = { love.math.colorFromBytes(2, 2, 2, 255) } -render.color.dark = { love.math.colorFromBytes(54, 54, 54, 255) } +render.color.dark = { love.math.colorFromBytes(51, 51, 51, 255) } render.color.light = { love.math.colorFromBytes(229, 229, 229, 255) } render.color.dark_trans60 = utils.shallow_copy(render.color.dark) @@ -52,6 +53,7 @@ render.viewport = function render.activate_map(new_map_name) local success = false local new_map = assets.get_map(new_map_name) + local player = assets.get_object('Player') if new_map then success = true @@ -59,6 +61,7 @@ function render.activate_map(new_map_name) render.map.scale = new_map.args.scale render.active_viewclass = render.ViewClassData[new_map.properties.viewclass] render.viewport = render.update_viewport() + love.graphics.setBackgroundColor(render.color.dark) -- Find all stored objects in the map we're switching to, and update their positional -- info with the unique copy stored in each map. @@ -67,12 +70,20 @@ function render.activate_map(new_map_name) if object_in_map then object.vec = object_in_map.vec if object_in_map.name == 'Player' then + render.map.active_map.player = object_in_map render.map.active_map.first_loop = (render.map.active_map.topleft == nil) render.map.active_map.topleft = render.map.active_camera(object) end end end + render.map.active_map.teleporters = {} + for k,object in pairs(render.map.active_map.objects) do + if object.type == 'teleporter_tx' or object.type == 'teleporter_rx' then + render.map.active_map.teleporters[object.name] = object + end + end + love.event.push('map_changed', new_map_name) end @@ -111,6 +122,7 @@ render.CameraClass = { -- Player free roam, transitioning the entire map screen at boundaries, -- akin to some retro styles NESFreeRoam = 2, + SingleScreenFreeRoam = 3, } render.map.cameras = {} @@ -167,9 +179,31 @@ function(focus) elseif ((focus.vec.heading == utils.Headings.North) and (((focus.vec.y * render.map.scale) - cf.y) % render.viewport.ey) == (render.viewport.ey - tile.h)) then new_topleft.y = new_topleft.y + (render.viewport.ey / render.map.scale) end + + return new_topleft +end + +render.map.cameras[render.CameraClass.SingleScreenFreeRoam] = +function(focus) + local tile = { + w = render.map.active_map.tilewidth * render.map.scale, + h = render.map.active_map.tileheight * render.map.scale, + } + + if render.map.active_map.first_loop then + render.map.active_map.first_loop = false + return + { + x = -render.map.active_map['CameraFocus'].vec.x + (tile.w / render.map.scale), + y = -render.map.active_map['CameraFocus'].vec.y + (tile.h / render.map.scale), + } + end + + local new_topleft = utils.shallow_copy(render.map.active_map.topleft) + return new_topleft end -render.map.active_camera = render.map.cameras[render.CameraClass.NESFreeRoam] +render.map.active_camera = render.map.cameras[render.CameraClass.SingleScreenFreeRoam] return render diff --git a/main/tiled/tablet_iv.lua b/main/tiled/tablet_iv.lua index a22a42a..70d899b 100644 --- a/main/tiled/tablet_iv.lua +++ b/main/tiled/tablet_iv.lua @@ -1,16 +1,16 @@ return { version = "1.10", luaversion = "5.1", - tiledversion = "1.11.2", + tiledversion = "1.12.0", class = "", orientation = "orthogonal", renderorder = "left-down", - width = 30, - height = 20, + width = 60, + height = 30, tilewidth = 16, tileheight = 16, - nextlayerid = 4, - nextobjectid = 16, + nextlayerid = 5, + nextobjectid = 54, properties = { ["viewclass"] = "topdown" }, @@ -43,7 +43,20 @@ return { properties = {}, wangsets = {}, tilecount = 1078, - tiles = {} + tiles = { + { + id = 253, + properties = { + ["wall"] = true + } + }, + { + id = 254, + properties = { + ["wall"] = true + } + } + } }, { name = "monochrome_bw_packed", @@ -72,7 +85,14 @@ return { properties = {}, wangsets = {}, tilecount = 1078, - tiles = {} + tiles = { + { + id = 254, + properties = { + ["wall"] = true + } + } + } } }, layers = { @@ -80,10 +100,10 @@ return { type = "tilelayer", x = 0, y = 0, - width = 30, - height = 20, + width = 60, + height = 30, id = 1, - name = "Tile Layer 1", + name = "Ground", class = "", visible = true, opacity = 0.9, @@ -94,26 +114,86 @@ return { properties = {}, encoding = "lua", data = { - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1079, 1080, 1079, 1079, 1177, 1079, 1, 1, 1, 1, 1079, 1079, 1583, 1177, 1177, 1079, 1, 1, 1, 1, 1079, 1079, 1177, 1177, 1177, 1183, 1, 1, - 1, 1, 1079, 1080, 1079, 1079, 1079, 1079, 1, 1, 1, 1, 1079, 1079, 1079, 1079, 1177, 1079, 1, 1, 1, 1, 1177, 1080, 1079, 1080, 1177, 1177, 1, 1, - 1, 1, 1079, 1079, 1079, 1177, 1079, 1177, 1, 1, 1, 1, 1079, 1079, 1079, 1177, 1080, 1080, 1, 1, 1, 1, 1079, 1079, 1079, 1177, 1079, 1079, 1, 1, - 1, 1, 1079, 1177, 1079, 1079, 1079, 1079, 1, 1, 1, 1, 1079, 1079, 1177, 1079, 1079, 1177, 1, 1, 1, 1, 1079, 1080, 1079, 1079, 1177, 1583, 1, 1, - 1, 1, 1079, 1080, 1177, 1177, 1079, 1079, 1, 1, 1, 1, 1177, 1079, 1079, 1079, 1079, 1079, 1, 1, 1, 1, 1079, 1183, 1080, 1079, 1079, 1177, 1, 1, - 1, 1, 1079, 1079, 1079, 1079, 1080, 1079, 1, 1, 1, 1, 1079, 1079, 1079, 1177, 1080, 1079, 1, 1, 1, 1, 1177, 1079, 1177, 1079, 1079, 1079, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1177, 1177, 1080, 1177, 1183, 1080, 1, 1, 1, 1, 1183, 1079, 1079, 1177, 1183, 1080, 1, 1, 1, 1, 1084, 1084, 1084, 1084, 1128, 1180, 1, 1, - 1, 1, 1079, 1183, 1079, 1177, 1079, 1080, 1, 1, 1, 1, 1079, 1079, 1177, 1079, 1080, 1183, 1, 1, 1, 1, 1084, 1086, 1177, 1128, 1128, 1128, 1, 1, - 1, 1, 1080, 1177, 1583, 1177, 1177, 1079, 1, 1, 1, 1, 1583, 1079, 1079, 1079, 1079, 1079, 1, 1, 1, 1, 1079, 1079, 1079, 1079, 1128, 1128, 1, 1, - 1, 1, 1183, 1080, 1079, 1177, 1177, 1177, 1, 1, 1, 1, 1177, 1177, 1177, 1079, 1177, 1177, 1, 1, 1, 1, 1084, 1177, 1128, 1128, 1128, 1180, 1, 1, - 1, 1, 1177, 1079, 1177, 1080, 1079, 1079, 1, 1, 1, 1, 1177, 1080, 1079, 1079, 1177, 1080, 1, 1, 1, 1, 1177, 1177, 1128, 1180, 1180, 1128, 1, 1, - 1, 1, 1079, 1177, 1177, 1079, 1079, 1079, 1, 1, 1, 1, 1183, 1079, 1080, 1080, 1177, 1183, 1, 1, 1, 1, 1080, 1177, 1080, 1128, 1180, 1128, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, - 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 1332, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 1332, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 1332, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1610614069, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 3221226805, 1079, 1079, 1079, 1079, 1079, 1079, 1333, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 1332, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 2684355893, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 1332, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, + 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254, 254 + } + }, + { + type = "tilelayer", + x = 0, + y = 0, + width = 60, + height = 30, + id = 4, + name = "Decoration", + class = "", + visible = true, + opacity = 1, + offsetx = 0, + offsety = 0, + parallaxx = 1, + parallaxy = 1, + properties = {}, + encoding = "lua", + data = { + 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 1, 99, 1, 106, 105, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 100, 100, 1, 1, 99, 99, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 105, 99, 99, 105, 100, 105, 0, 0, 0, 0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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, 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, 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, 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, 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, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 } }, { @@ -130,192 +210,317 @@ return { parallaxy = 1, properties = {}, objects = { - { - id = 1, - name = "Player", - type = "", - shape = "rectangle", - x = 32, - y = 48, - width = 16, - height = 16, - rotation = 0, - gid = 1593, - visible = true, - properties = {} - }, { id = 2, name = "CameraFocus", - type = "Meta", + type = "", shape = "point", x = 0, y = 16, width = 0, height = 0, rotation = 0, + opacity = 1, visible = true, properties = {} }, { - id = 3, + id = 17, name = "teleporter_tx_a", - type = "", - shape = "rectangle", + type = "teleporter_tx", + shape = "point", x = 96, - y = 112, - width = 16, - height = 16, + y = 96, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { ["target"] = "teleporter_rx_a" } }, { - id = 7, - name = "teleporter_rx_a", - type = "", - shape = "rectangle", - x = 208, - y = 48, - width = 16, - height = 16, + id = 20, + name = "teleporter_tx_d", + type = "teleporter_tx", + shape = "point", + x = 32, + y = 224, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = { + ["target"] = "teleporter_rx_d" + } + }, + { + id = 24, + name = "teleporter_rx_c", + type = "teleporter_rx", + shape = "point", + x = 64, + y = 272, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { + ["camera"] = "CameraFocus_c", ["target"] = "none" } }, { - id = 8, + id = 30, + name = "teleporter_tx_b2", + type = "teleporter_tx", + shape = "point", + x = 48, + y = 272, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = { + ["target"] = "teleporter_rx_b" + } + }, + { + id = 39, name = "teleporter_tx_b", - type = "", - shape = "rectangle", - x = 240, - y = 80, - width = 16, - height = 16, + type = "teleporter_tx", + shape = "point", + x = 352, + y = 96, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { ["target"] = "teleporter_rx_b" } }, { - id = 9, + id = 40, name = "teleporter_tx_c", - type = "", - shape = "rectangle", - x = 384, - y = 128, - width = 16, - height = 16, + type = "teleporter_tx", + shape = "point", + x = 704, + y = 112, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { ["target"] = "teleporter_rx_c" } }, { - id = 10, - name = "teleporter_rx_b", - type = "", - shape = "rectangle", + id = 41, + name = "teleporter_tx_e", + type = "teleporter_tx", + shape = "point", x = 432, - y = 96, - width = 16, - height = 16, + y = 256, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { - ["target"] = "none" + ["target"] = "teleporter_rx_e" } }, { - id = 11, - name = "teleporter_tx_d", - type = "", - shape = "rectangle", - x = 32, - y = 208, - width = 16, - height = 16, + id = 42, + name = "teleporter_rx_a", + type = "teleporter_rx", + shape = "point", + x = 400, + y = 64, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { - ["target"] = "teleporter_rx_d" + ["camera"] = "CameraFocus_a", + ["target"] = "none" } }, { - id = 12, - name = "teleporter_rx_c", - type = "", - shape = "rectangle", - x = 64, - y = 240, - width = 16, - height = 16, + id = 43, + name = "teleporter_rx_b", + type = "teleporter_rx", + shape = "point", + x = 720, + y = 64, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { + ["camera"] = "CameraFocus_b", ["target"] = "none" } }, { - id = 13, - name = "teleporter_tx_e", - type = "", - shape = "rectangle", - x = 272, - y = 240, - width = 16, - height = 16, + id = 44, + name = "teleporter_rx_d", + type = "teleporter_rx", + shape = "point", + x = 400, + y = 272, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { - ["target"] = "teleporter_rx_e" + ["camera"] = "CameraFocus_d", + ["target"] = "none" } }, { - id = 14, - name = "teleporter_rx_d", - type = "", - shape = "rectangle", - x = 192, + id = 45, + name = "teleporter_rx_e", + type = "teleporter_rx", + shape = "point", + x = 672, y = 240, - width = 16, - height = 16, + width = 0, + height = 0, rotation = 0, - gid = 673, + opacity = 1, visible = true, properties = { + ["camera"] = "CameraFocus_e", ["target"] = "none" } }, { - id = 15, - name = "teleporter_rx_e", + id = 46, + name = "teleporter_tx_a2", + type = "teleporter_tx", + shape = "point", + x = 688, + y = 48, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = { + ["target"] = "teleporter_rx_a" + } + }, + { + id = 47, + name = "teleporter_tx_c2", + type = "teleporter_tx", + shape = "point", + x = 352, + y = 304, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = { + ["target"] = "teleporter_rx_c" + } + }, + { + id = 48, + name = "Player", type = "", shape = "rectangle", - x = 352, - y = 240, + x = 64, + y = 48, width = 16, height = 16, rotation = 0, - gid = 673, + opacity = 1, + gid = 1593, visible = true, - properties = { - ["target"] = "none" - } + properties = {} + }, + { + id = 49, + name = "CameraFocus_a", + type = "", + shape = "point", + x = 304, + y = 0, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = {} + }, + { + id = 50, + name = "CameraFocus_b", + type = "", + shape = "point", + x = 624, + y = 0, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = {} + }, + { + id = 51, + name = "CameraFocus_c", + type = "", + shape = "point", + x = -16, + y = 192, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = {} + }, + { + id = 52, + name = "CameraFocus_d", + type = "", + shape = "point", + x = 304, + y = 192, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = {} + }, + { + id = 53, + name = "CameraFocus_e", + type = "", + shape = "point", + x = 624, + y = 192, + width = 0, + height = 0, + rotation = 0, + opacity = 1, + visible = true, + properties = {} } } } diff --git a/main/tiled/tablet_iv.tmx b/main/tiled/tablet_iv.tmx index c19fa4e..3904486 100644 --- a/main/tiled/tablet_iv.tmx +++ b/main/tiled/tablet_iv.tmx @@ -1,5 +1,5 @@ - + @@ -8,88 +8,195 @@ + + + + + + + + + + + + + + + - + -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1079,1080,1079,1079,1177,1079,1,1,1,1,1079,1079,1583,1177,1177,1079,1,1,1,1,1079,1079,1177,1177,1177,1183,1,1, -1,1,1079,1080,1079,1079,1079,1079,1,1,1,1,1079,1079,1079,1079,1177,1079,1,1,1,1,1177,1080,1079,1080,1177,1177,1,1, -1,1,1079,1079,1079,1177,1079,1177,1,1,1,1,1079,1079,1079,1177,1080,1080,1,1,1,1,1079,1079,1079,1177,1079,1079,1,1, -1,1,1079,1177,1079,1079,1079,1079,1,1,1,1,1079,1079,1177,1079,1079,1177,1,1,1,1,1079,1080,1079,1079,1177,1583,1,1, -1,1,1079,1080,1177,1177,1079,1079,1,1,1,1,1177,1079,1079,1079,1079,1079,1,1,1,1,1079,1183,1080,1079,1079,1177,1,1, -1,1,1079,1079,1079,1079,1080,1079,1,1,1,1,1079,1079,1079,1177,1080,1079,1,1,1,1,1177,1079,1177,1079,1079,1079,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1177,1177,1080,1177,1183,1080,1,1,1,1,1183,1079,1079,1177,1183,1080,1,1,1,1,1084,1084,1084,1084,1128,1180,1,1, -1,1,1079,1183,1079,1177,1079,1080,1,1,1,1,1079,1079,1177,1079,1080,1183,1,1,1,1,1084,1086,1177,1128,1128,1128,1,1, -1,1,1080,1177,1583,1177,1177,1079,1,1,1,1,1583,1079,1079,1079,1079,1079,1,1,1,1,1079,1079,1079,1079,1128,1128,1,1, -1,1,1183,1080,1079,1177,1177,1177,1,1,1,1,1177,1177,1177,1079,1177,1177,1,1,1,1,1084,1177,1128,1128,1128,1180,1,1, -1,1,1177,1079,1177,1080,1079,1079,1,1,1,1,1177,1080,1079,1079,1177,1080,1,1,1,1,1177,1177,1128,1180,1180,1128,1,1, -1,1,1079,1177,1177,1079,1079,1079,1,1,1,1,1183,1079,1080,1080,1177,1183,1,1,1,1,1080,1177,1080,1128,1180,1128,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1, -1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1 +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254, +254,1332,1610614069,1610614069,1610614069,1610614069,1610614069,1610614069,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1610614069,1610614069,1610614069,1610614069,1610614069,1610614069,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1610614069,1610614069,1610614069,1610614069,1610614069,1610614069,1332,1332,254,254,254,254,254,254,254,254,254,254, +254,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +254,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +254,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +254,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +254,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +254,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +254,1332,2684355893,2684355893,2684355893,2684355893,2684355893,2684355893,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,2684355893,2684355893,2684355893,2684355893,2684355893,2684355893,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,2684355893,2684355893,2684355893,2684355893,2684355893,2684355893,1332,1332,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254, +1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254, +1332,1332,1610614069,1610614069,1610614069,1610614069,1610614069,1610614069,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1610614069,1610614069,1610614069,1610614069,1610614069,1610614069,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1610614069,1610614069,1610614069,1610614069,1610614069,1610614069,1332,1332,254,254,254,254,254,254,254,254,254,254, +1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,254,254,254,254,254,254,254,254,254,254,1332,1332,3221226805,1079,1079,1079,1079,1079,1079,1333,1332,254,254,254,254,254,254,254,254,254,254, +1332,1332,2684355893,2684355893,2684355893,2684355893,2684355893,2684355893,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,2684355893,2684355893,2684355893,2684355893,2684355893,2684355893,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,2684355893,2684355893,2684355893,2684355893,2684355893,2684355893,1332,1332,254,254,254,254,254,254,254,254,254,254, +1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,1332,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254, +254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254,254 + + + + +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,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,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1,99,1,106,105,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,100,100,1,1,99,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,99,99,105,100,105,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,100,99,1,106,106,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,505,106,105,1,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,105,1,105,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,106,106,1,99,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,1,1,99,1,1,0,0,0,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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,0,0,0,0,0,0,0,0,0,0,0, +0,0,99,99,99,99,1,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,1,99,99,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,105,102,50,50,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1,1,1,505,105,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,99,99,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,99,50,50,50,102,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,99,1,1,99,105,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,99,1,1,1,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,505,2684354623,2684354623,2684354623,102,50,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,99,1,1,105,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,1,99,1,99,99,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,105,50,50,102,50,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,1,1,1,105,105,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,105,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,6,50,102,50,50,0,0,0,0,0,0,0,0,0,0,0,0, +0,0,0,105,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,105,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,99,105,6,50,50,50,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,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,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0,0,0,0,0,0,0,0,0,0 - - + - + + + + + + + + - + + + - + + - + - + + - + - + + - + - + + - + + + - + - + + + - + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/main/vector.lua b/main/vector.lua index 3a0eb80..47e06f2 100644 --- a/main/vector.lua +++ b/main/vector.lua @@ -43,4 +43,15 @@ vector.add_xy = function(left, right) return new_vec end +vector.scale_xy = function(left, scale) + local new_vec = vector.new_xy() + new_vec.x = left.x * scale + new_vec.y = left.y * scale + return new_vec +end + +vector.eq_xy = function(left, right) + return ((left.x == right.x) and (left.y == right.y)) +end + return vector