experiments-pico8/games/ocean.p8
2023-04-23 03:26:42 -05:00

353 lines
30 KiB
Lua

pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
--
function _init()
start_scene("title")
end
function _update()
if _scene and _scene.update then
_scene.update()
end
end
function _draw()
if _scene and _scene.draw then
_scene.draw()
end
end
function start_scene(name)
_scene = _scenes[name]
_scene_start = time()
if _scene.start then
_scene.start()
end
end
function scene_time()
return time() - _scene_start
end
_scene = nil
_scenes = {}
_scene_start = 0
function draw_title()
cls()
print("title " .. scene_time())
end
function update_title()
if scene_time() > 0 then
start_scene("ocean")
end
end
_scenes.title = {start=nil, draw=draw_title, update=update_title}
function start_ocean()
ocean_wind_x = 0
ocean_wind_y = 0
end
function draw_ocean()
cls(12)
local ocean_anim = {[0]=0, 0, 1, 2, 3, 4, 0, 0, 0, 0, 0, 0, 0}
if ocean_wind_x ~= 0 or ocean_wind_y ~= 0 then
for x=0,15 do
for y=0,15 do
local anim = ocean_anim[(flr(time()*4) - ocean_wind_y*y - ocean_wind_x*x) % #ocean_anim]
local base = 0
if ocean_wind_y ~= 0 then base = 5 end
if anim > 0 then
spr(base+anim, 8*x, 8*y, 1, 1, ocean_wind_x < 0, ocean_wind_y < 0)
end
end
end
end
map(player_x-8, player_y-8, 0, 0, 16, 16)
-- DEBUG
print("player: "..player_x..", "..player_y.." heading: "..headings[player_heading].name)
print("wind: "..ocean_wind_x..", "..ocean_wind_y)
draw_ship(player_ship, player_heading, 64, 64)
-- hud
rectfill(0, 110, 128, 128, 15)
--pal(4, 132) -- leather
rect(0, 110, 127, 127, 4)
for x=0,128,16 do
line(x, 110, x, 127, 4)
end
palt(1, true)
-- compass
print(headings[player_heading].name, 6, 112, 4)
spr(73, 5, 118)
palt()
--spr_r(9, 4, 120, 120, 1, 1, false, false, 4, 4, headings[player_heading].angle, 1)
--function spr_r(i, j, x, y, w, h, flip_x, flip_y, pivot_x, pivot_y, angle, transparent_color)
end
function update_ocean()
if btnp(0) then
player_heading = (player_heading - 1) % 8
elseif btnp(1) then
player_heading = (player_heading + 1) % 8
end
if t() - last_move_time > 1 then
last_move_time = t()
player_x += headings[player_heading].dx
player_y += headings[player_heading].dy
end
end
_scenes.ocean = {start=start_ocean, draw=draw_ocean, update=update_ocean}
function draw_ship(ship, heading, x, y)
spr_r(ship.i, ship.j, x-ship.w*4, y-ship.h*4, ship.w, ship.h, false, false, ship.w*4, ship.h*4, headings[heading].angle, 0)
if ship.w > 1 then
spr(ship.n, x-ship.w*4+8, y-ship.h*4, 1, ship.h, true, flipy)
end
end
-- globals
headings = {
[0]={angle=0, dx=0, dy=-1, name="n"},
{angle=0.825, dx=1, dy=-1, name="ne"},
{angle=0.75, dx=1, dy=0, name="e"},
{angle=0.625, dx=1, dy=1, name="se"},
{angle=0.5, dx=0, dy=1, name="s"},
{angle=0.375, dx=-1, dy=1, name="sw"},
{angle=0.25, dx=-1, dy=0, name="w"},
{angle=0.125, dx=-1, dy=-1, name="nw"},
}
ship_type = {
small={i=0, j=4, w=1, h=1, speed=1},
medium={i=1, j=4, w=1, h=2, speed=0.6},
large={i=2, j=4, w=2, h=2, speed=0.4},
ghost={i=3, j=4, w=3, h=3}
}
player_ship = ship_type.small
player_x = 20
player_y = 20
player_heading = 0
last_move_time = 0
-- external utils
-- via https://www.lexaloffle.com/bbs/?pid=52525
function spr_r(i, j, x, y, w, h, flip_x, flip_y, pivot_x, pivot_y, angle, transparent_color)
-- precompute pixel values from tile indices: sprite source top-left, sprite size
local sx = 8 * i
local sy = 8 * j
local sw = 8 * w
local sh = 8 * h
-- precompute angle trigonometry
local sa = sin(angle)
local ca = cos(angle)
-- in the operations below, 0.5 offsets represent pixel "inside"
-- we let PICO-8 functions floor coordinates at the last moment for more symmetrical results
-- precompute "target disc": where we must draw pixels of the rotated sprite (relative to (x, y))
-- the target disc ratio is the distance between the pivot the farthest corner of the sprite rectangle
local max_dx = max(pivot_x, sw - pivot_x) - 0.5
local max_dy = max(pivot_y, sh - pivot_y) - 0.5
local max_sqr_dist = max_dx * max_dx + max_dy * max_dy
local max_dist_minus_half = ceil(sqrt(max_sqr_dist)) - 0.5
-- iterate over disc's bounding box, then check if pixel is really in disc
for dx = - max_dist_minus_half, max_dist_minus_half do
for dy = - max_dist_minus_half, max_dist_minus_half do
if dx * dx + dy * dy <= max_sqr_dist then
-- prepare flip factors
local sign_x = flip_x and -1 or 1
local sign_y = flip_y and -1 or 1
local xx = pivot_x + sign_x * ( ca * dx + sa * dy)
local yy = pivot_y + sign_y * (-sa * dx + ca * dy)
-- make sure to never draw pixels from the spritesheet
-- that are outside the source sprite
if xx >= 0 and xx < sw and yy >= 0 and yy < sh then
-- get source pixel
local c = sget(sx + xx, sy + yy)
-- ignore if transparent color
if c ~= transparent_color then
-- set target pixel color to source pixel color
pset(x + dx, y + dy, c)
end
end
end
end
end
end
__gfx__
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc7cccccccccc7ccc333333333333333333333333555555555555555555555555
ccccccccc7ccccccccc7ccccccccc7ccccccccc7ccccccccccccccccccccc7cccccccccccccccccc333333333333333333333333555555555595555555555555
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccc7cccccccccc7ccccccccccc33a3333333a3338333333383555555555555555555555555
ccccccccccccccccccccccccccccccccccccccccccccccccccccc7cccccccccccccccccccccccccc333333333333333333333333555555555559559555555555
cccccccccc7cccccccccc7ccccccccc7ccccccccccccccccc7cccccccccccccccccccccccccccccc333333333333333333333333555555555555555555559555
ccccccccccccccccccccccccccccccccccccccccccccc7cccccccccccccc7ccccccccccccccccccc33a3333333a3383333833333555555555555555555955555
ccccccccc7ccccccccc7cccccccccc7cccccccccc7ccccccccc7cccccccccccccccccccccccccccc333333333333333333333333559555555555559555559555
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc333333333333333333333333555555555555555555555555
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc67777776cccccccc33333333cccccccccccccccccccccccccccc
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc6777777776cccccc3333333333ccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc677777777776cccc333333333333ccccccccccccccccccc4444444
ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc67777777777776cc33333333333333cccccccccccccccccc4444444
cccccccffffffffffcccccccccccccc3333333333cccccccccccccc6666666666ccccccc67777777777777763333333333333333ccccccccccccccccc4444444
ccccccffffffffffffcccccccccccc333333333333cccccccccccc677777777776cccccc77777777777777773333333333333333ccccccccccccccccc4004004
cccccffffffffffffffcccccccccc33333333333333cccccccccc67777777777776ccccc77777777777777773333333333333333cccccccccccccccccccccccc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccc77777777777777773333333333333333cccccccccccccccccccccccc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccc77777777777777773333333333333333cccccccccccccccccc4444cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccc77777777777777773333333333333333cccccccccccccccccc4440cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccc77777777777777773333333333333333cccccccccccccccccc4440cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccc67777777777777763333333333333333cccccccccccccccccc4444cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776ccccc67777777777776cc33333333333333ccccccccccccccccccc4440cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccccc677777777776cccc333333333333cccccccccccccccccccc4440cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776ccccccc6777777776cccccc3333333333ccccccccccccccccccccc4444cc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccccccc67777776cccccccc33333333cccccccccccccccccccccccccccc
ccccffffffffffffffffcccccccc3333333333333333cccccccc6777777777777776cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccffffffffffffffcccccccccc33333333333333cccccccccc67777777777776ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
ccccccffffffffffffcccccccccccc333333333333cccccccccccc677777777776cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccffffffffffcccccccccccccc3333333333cccccccccccccc6666666666ccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
cccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccccc
00000000000440000000000400000005000000000000000000000000000000000000000011555511000000001111119111149111111110010000000000000000
00000000004444000000004400000055000000000000000000000000000000000000000015668651000000001111144911149111111100000000000000000000
00044000004444000000044400000556000000000000000000000000000000000000000056688665000000001111994111999911111990000000000000000000
004ff400044ff440000044ff00000566000000000000000000000000000000000000000056688665000000001114491119149191110009010000000000000000
004ff40004f44f4000004fff00005566000000000000000000000000000000000000000056677665000000001999411191149991199009110000000000000000
004ff40004f44f400077777400005566000000000000000000000000000000000000000056677665000000009669111191149119004441110000000000000000
0044440004f44f400004466700005566000000000000000000000000000000000000000015676651000000009669111119149191004941110000000000000000
000000007777777700044ff507777775000000000000000000000000000000000000000011555511000000001991111111999911104441110000000000000000
00000000077777700777777400077777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000046556400077777700055566000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000004f55f400004566500055565000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000004f44f4000044fff07777775000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000004f44f4000044fff00077777000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000044ff440000044ff00055566000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000004444000000444f00055566000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000440000000044400055566000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000077777775000000000000000011111111111111111111111111111111111111110000000000000000000000000000000000000000
0000000000000000000000000077777700000000000000000077770077777777aaaaaaaa3333333322d22dd20000000000000000000000000000000000000000
0000000000000000000000000005556600000000000000000077770099999999aa8aa8aa333333332dd22d220000000000000000000000000000000000000000
0000000000000000000000000000556600000000000000000007700077977977aaa88aaacccccccc22d22dd20000000000000000000000000000000000000000
0000000000000000000000000000556600000000000000000070070077977977aaa88aaacccccccc2dd22d220000000000000000000000000000000000000000
0000000000000000000000000000055500000000000000000007700099999999aa8aa8aa3333333322d22dd20000000000000000000000000000000000000000
0000000000000000000000000000005500000000000000000070070077777777aaaaaaaa333333332dd22d220000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000011111111111111111111111111111111111111110000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000012121212121212121212121212121212121212121200000000000000000000000012121212
12121212121212121212121212121212121212421242424212121242121212121212121212424212121212124242424200000000000000000000000000000000
00000000000000000000000000000000000000000002000000000042424242000000000000000000000000000000001200000000000000000000000000000000
00001212121212001212421212421242124212121212121212121212121212121212124212121212424242421212121200000000000000000000000000000000
00000000000000000000000000000000000000000002000000000042004200000000000000000000000000000000000000000000000000000000000000000000
00001212121212121212121212121212121242121212121212121212121212121212121212121212121242000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000004200000000000000000000000000000000000000000000000000000000000000000000
00000000121212424242424242424242424200000000000000000000000012121212000012121212121212000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000424200000000000000000000000000000000000000000000000000000000000000000000
00000000000000424242424242424242000000000000000000000000000000000012121200000012121200000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000420000000000000000000000000000000000000000000000000000000000000000000000
00000000000042424242424242424200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000424200000000000000000000000000000000000000000000000000000000000000000000
00000000000042424242424242000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000042420000000000000000000000000000000000000000000000000000000000000000
00000000000042424242420000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000000424200000000000000000000000000000000000000000000000000000000000000
00000000000042424200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000000004242424200000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000000000000004242000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000002000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000032000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000032000000000000000000007776cccc00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000007776cccc00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000032000000000000000000007776cccc00000000000000000000000000000000000000000000000000006171
71810000000000000000000000000000000000000000000000000000000000007776cccc00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000032000000000000000000007776cccc00000000000000000000000000000000000000000000000000006272
72820000000000000000000000000000000000000000000000000000000000007776cccc00000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000062000000000000000000007776cccc00000000000000000000000000000000000000000000000000006373
73830000000000000000000000000000000000000000000000000000000000007776cccc00000000000000000000000000000000000061717181000000000000
000000000000000000000000000000000000000000620000cccc6777777777777776cccc00000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000ccccc67777777777776ccccc00000000000000000000000000000000000062727282000000000000
000000000000000000000000000000000000000000620000cccccc677777777776cccccc00000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000ccccccc6666666666ccccccc00000000000000000000000000000000000063737383000000000000
000000000000000000000000000000000000000000630000cccccccccccccccccccccccc00000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000cc61717181cccccccccc618161810000000000000000617181f30000000000000000000000000000
000000000000000000000000000000000000000000000000cccccccccccccccccccccccc00000000617171810000000000617171810000000000006171718100
000000000000000000000000006171718100000000000000cc62727282cccccccccc628262820000618100000000627282f30000000000000000000000000000
00000000000000000000000000006171718100000000000000000000000000000000000000000000627272820000000000627272820000000000006272728200
00000000000000000000000000627272820000000000000000637373830000000000638363830000628200000000637383f30000000000000000000000000000
00000000000000000000000000006272728200000000000000000000000000617171810000000000637373830000000000637373830000000000006373738300
00000000000000000000000000637373830000000000000000000000000000000000000000000000628200000000000000000000000000000000000000000000
00000000000000000000000000006373738300000000006171718100000000627272820000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000628200000000000000000000000000000000000000000000
00617171810000617171810000000000000000000000006272728200000000637373830000000000000000000000000000617171810000000061717181000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000638300000000000000000000000000000000000000000000
00627272820000627272820000000000000000000000006373738300000000000000000000000000000000000000000000627272820000000062727282000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00637373830000637373830000000000000000000000000000000000000000000000000000000000000000000000000000637373830000000063737383000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
61717181000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
71717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171
71717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171717171
__map__
2727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727272727
37373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737373737292727272727272727272727272a3737373737373737373737373737373737373737373737373737373737
3f3f3f3f3f3f3f3f3f3f3f3f3f3f000000000000000000000000000016171718000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026272727272727272727272727280000000000000000000000000000000000000000000000000000000000
3f3f3f1617171717171717183f3f00000000000000000000000000002627272800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003629272727272727272727272a380000000000000000000000000000000000000000000000000000000000
3f3f3f26272727272727271a1718000000000000000000000000000036373738000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000262727272727272727272a38000000000000000000000000000000000000000000000000000000000000
3f3f3f363826272727272727272800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036292727272a373737373800000000000000000000000000000000000000000000000000000000000000
3f3f3f3f3f26272727272727271a180000000000000000001617171800000000161717180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003629272728000000000000000000000000000000000000000000000000000000000000000000000000
3f3f3f3f3f262727272727272727280000000000000000002627272800000000262727280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026272728000000000000000000000000000000000000000000000000000000000000000000000000
3f3f3f3f3f36372927272a37292a380000000000000000003637373800000000363737380000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000026272a38000000000000000000000000000000000000000000000000000000000000000000000000
3f3f3f3f3f3f3f262727283f3f3f3f0000000000000000001617171800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000036373800000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f262727283f3f3f3f0000000000000000002627272800000000001617171800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f262727283f3f3f3f0000000000000000003637373800000000002627272800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f363737383f3f3f3f0000000000000000000000000000000000003637373800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f3f3f3f3f3f3f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f3f3f3f3f3f3f0000000000000000000000000000161717180000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f3f3f3f3f3f3f0000000000000000000000001617272727280000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f3f3f3f3f3f3f0000000000000000000000002627272727272727272727000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f3f3f3f3f3f3f0000000000000016171717171927272727272727272727272700000000000000000000000000000000000000000000000000000000000000000000000000242424242424242424242424240000000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f0000000000000000000000001619272727272727272727272727272727272727272727000000000000000000000000000000000000000000000000000000000000000024242424242424242424242424242400000000000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f0000000000000000000000002627272727272727272727272727272727272727000000000000000000000000000000000000000000000000000000000000000000002424242424242424242424242424242424242400000000000000000000000000000000000000000000000000000000000000000000
0000003f3f3f3f3f3f000000000000000000003f3f2627272727272727272727272727272727272727272700000000000000000000000000000000000000000000000000000000000000002424242424242424242424242424242424242424240000000000000000000000000000000000000000000000000000000000000000
0000000000003f3f3f0000000000000000000000002627272424272724242424242424242400000000000000000000000000000000000000000000000000000000000000000000000000242424242424242424242424242424242424242424242400000000000000000000000000000000000000000000000000000000000000
0000000000003f3f3f0000000000000000000000002300242424242424240000002424002400000000000000000000000000000000000000000000000000000000000000000000000000242424242424242424242424242424242424242424242424240000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000002300002424242400242424242400002400000000000000000000000000000000000000000000000000000000000000000000000024242424242424242424242424242424242424242424242424242424240000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000002300002424242424242424242424002400002400000000000000000000000000000000000000000000000000000000000000000024242424242424242424242424242424242424242424242424242424242424242424000000000000000000000000000000000000000000
0000000000000000000000000000000000000000002300002424242424242424242424242400242400000000000000000000000000000000000000000000000000000000000000000024242424242424242424242424242424242424242424242424242424242424242424242400000000000000000000000000000000000000
0000000000000000000000000000000000000000002300000024242424242424242400002424240000000000000000000000000000000000000000000000000000000000000000002424242424242424242424242424242424242424242424242424242424242424242424242424000000000000000000000000000000000000
0000000000000000000000000000000000000000002000000000242400242424240024242400000000000000000000000000000000000000000000000000000000000000000000002121212121212121212121212121212121212424242424242424242424242424242424242424000000000000000000000000000000000000
0000000000000000000000000000000000000000002000000000242400242424002424240000000000000000000000000000000000000000000000000000000000000000212121212124242424242424242424242424242124212121212121242424242424242424242424242424000000000000000000000000000000000000
0000000000000000000000000000000000000000002000000000240024242400242400000000000000000000000000000000000000000000000000000000000000212121210021210024242424242424242424242424242424242424212424212121212424242424242424242424240000000000000000000000000000000000
0000000000000000000000000000000000000000002000000000000024242424240000000000000000000000000000000000000000000000000000000000000000210000000021212121212121212421212121242121242121242424242421242424242124212424242424242424242400000000000000000000000000000000
0000000000000000000000000000000000000000002000000000000024242424000000000000000000000000000000000000000000000000000000000000000000212100212121212121212121212121212121212121212121212121212121242121212121212121242124242424242424240000000000000000000000000000