198 lines
11 KiB
Lua
198 lines
11 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()
|
|
spr(64, 10, 30, 16, 4)
|
|
print("the home video arcade game", 5, 70, 8)
|
|
end
|
|
|
|
function update_title()
|
|
if scene_time() > 6 then
|
|
start_scene("menu")
|
|
end
|
|
end
|
|
|
|
function draw_jerry(x, y, glasses_y, mouth)
|
|
spr(1, x, y, 4, 4)
|
|
spr(21, x+8, y+9-glasses_y, 2, 1)
|
|
if mouth == "talking" then
|
|
spr(5+(t()*3)%4, x+14, y+16)
|
|
elseif mouth == "shocked" then
|
|
spr(9, x+14, y+16)
|
|
else
|
|
spr(6, x+14, y+16)
|
|
end
|
|
end
|
|
|
|
function draw_bag(bag, open, x, y)
|
|
-- small
|
|
local n = 11
|
|
local h = 1
|
|
if bag == 2 then
|
|
n = 27
|
|
h = 2
|
|
elseif bag == 3 then
|
|
n = 23
|
|
h = 3
|
|
end
|
|
if not open then
|
|
n += 2
|
|
end
|
|
spr(n, x, y+8*(3-h), 2, h)
|
|
end
|
|
|
|
function jerry_say(text)
|
|
print(text, 40, 92, 7)
|
|
end
|
|
|
|
|
|
function draw_menu()
|
|
cls(1)
|
|
palt(0, false)
|
|
palt(11, true)
|
|
|
|
rectfill(0, 90, 128, 128, 2)
|
|
draw_jerry(5, 96, t()%6, "talking")
|
|
|
|
local tx = 30
|
|
local ty = 62
|
|
local b1 = 9
|
|
local b2 = 12
|
|
local b3 = 15
|
|
|
|
if scene_time() > b1 then
|
|
rectfill(0, 60, 128, 90, 0)
|
|
end
|
|
if scene_time() > b3 then
|
|
print("i can only climax\nif my pet\norangutan 'pebbles'\nis watching", tx, ty, 7)
|
|
draw_spotlight(3)
|
|
elseif scene_time() > b2 then
|
|
print("i have lube hidden\nin every room in my\nhouse", tx, ty, 7)
|
|
draw_spotlight(2)
|
|
elseif scene_time() > b1 then
|
|
print("i wet the bed", tx, ty, 7)
|
|
draw_spotlight(1)
|
|
end
|
|
draw_bag(1, scene_time() > b1, 20, 20)
|
|
draw_bag(2, scene_time() > b2, 60, 20)
|
|
draw_bag(3, scene_time() > b3, 100, 20)
|
|
local text = "welcome to baggage,\nthe game show where\ndaters reveal their\nsmall, medium,\nand large baggage\nfor a shot at love"
|
|
jerry_say(sub(text, 1, letters))
|
|
end
|
|
|
|
function draw_spotlight(position)
|
|
fillp(0b10101111101011111010.1)
|
|
local x = 18 + 40*(position-1)
|
|
rectfill(x, 0, x+20, 60, 10)
|
|
fillp()
|
|
end
|
|
|
|
function update_menu()
|
|
letters += 0.4
|
|
end
|
|
|
|
-- globals
|
|
_scenes.title = {start=nil, draw=draw_title, update=update_title}
|
|
_scenes.menu = {start=nil, draw=draw_menu, update=update_menu}
|
|
letters = 1
|
|
|
|
__gfx__
|
|
00000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb888888bb888888bb88888bbb88888bbb88888bbbbbbbbbbbbbbb66666666bbbbbbbbb666666bbbbbbbbbbbbb
|
|
00000000bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb888888bb877778bb88888bbb87778bbb80008bbbbbbbbbbbbb555555555555bbbbbb66bbbb66bbbbbbbbbbbb
|
|
00700700bbbbbbbbbbb66666666bbbbbbbbbbbbbbbbbbbbb888888bbbbbbbbbb88888bbb80008bbbbbbbbbbbbb500000000005bbbb555055550555bbbbbbbbbb
|
|
00077000bbbbbbbbb6666666666666bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb88888bbbbbbbbbbbbb500000000005bbbb555555555555bbbbbbbbbb
|
|
00077000bbbbbbbbb66666666666666bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb500000000005bbbb555555555555bbbbbbbbbb
|
|
00700700bbbbbbbb66666666fffff666bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb500000000005bbbb555555555555bbbbbbbbbb
|
|
00000000bbbbbb666666ffffffffff66bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb500000000005bbbb555555555555bbbbbbbbbb
|
|
00000000bbbbbb66666ffffffffffff6bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb5555555555bbbbb555555555555bbbbbbbbbb
|
|
00000000bbbbbbbbb6ff6666ff666ff6bbbbbbbbbbbbbbbbbbbbbbbbbbb5555555555bbbbbb5555555555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbbbbbbbf6ff6677ff7766f6fbbbbbbbcccccccccccccbbbbbb565bbbb565bbbbbb565bbbb565bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbbbbbbbf6fff700ff700ff6fbbbbbbbcbbbcbbcbcbbccccbbbb6bbbbbb6bbbbbbbb6bbbbbb6bbbbbb555555555555bbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbbbbbbbfffff700ff700ffffbbbbbbbbbbbcbbcbcbbcbbbbbbb6bbbbbb6bbbbbbbb6bbbbbb6bbbbbb566666666665bbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbbbbbbbbbfffffffffffffbbbbbbbbbbbbbccccbccccbbbbbbb6bbbbbb6bbbbbbbb6bbbbbb6bbbbb56000600600065bbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbbbbbbbbbfffffffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbbbb6bbbbbb6bbbbbbbb6bbbbbb6bbbbb55000066000055bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbbfffffffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbb555555555555bbbb555555555555bbb55000000000055bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbbfffffffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbb555555555555bbbb555555555555bbb55000000000055bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbbbfffffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55555555555555bb55000000000055bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbbbfffffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb65000000000056bb66666666666666bbbbbbbbb
|
|
00000000bbbbbbbbbbbfffffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb55000000000055bb00000600600000bbbbbbbbb
|
|
00000000bbbbbbbbbbbbfffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb55555555555555bb55005666650055bbbbbbbbb
|
|
00000000bbbbbbbbbbbbfffffffffbbbbbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb55555555555555bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbbbbbfffffffbbbbbbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb55555555555555bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbb7bbfffffffbbb7bbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb55555555555555bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbbbb77bffffffff777bbbbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bb55555555555555bb55555555555555bbbbbbbbb
|
|
00000000bbbbbbbb55777ffffffff77755bbbbbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbbb5555555777ffffff777755555bbbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bbb5555555577777ff777775555555bbbbbbbbbbbbbbbbbbb55000000000065bb55656565656555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bb55555555557777767777755555555bbbbbbbbbbbbbbbbbb55000000000065bb55555555555555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000bb555555555557777767777555555555bbbbbbbbbbbbbbbbb55555555555555bb55555555555555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000b5555555555557777767777555555555bbbbbbbbbbbbbbbbbb555555555555bbbb555555555555bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000b5555555555557777567777555555555bbbbbbbbbbbbbbbbbbb00bbbbbb00bbbbbb00bbbbbb00bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
0000000055555555555555777766777555555555bbbbbbbbbbbbbbbbbbb00bbbbbb00bbbbbb00bbbbbb00bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb
|
|
00000000000000000000000000000000000000777777777777777777777000000000000000000000000000000000000000000000000000000000000000000000
|
|
00000000000000000000000000000000000000777777777777777777777700000000000000000000000000000000000000000000000000000000000000000000
|
|
00000000000000000000000000000000000007700000000000000000000770000000000000000000000000000000000000000000000000000000000000000000
|
|
07777777777770007777777777777777777777777777777777777777777777777777777777777777777077777777000000000000000000000000000000000000
|
|
07777777777777000000000000000000000000000000000000000000000000000000000000000000000077777777000000000000000000000000000000000000
|
|
07770000000077000000000000000000000000000000000000000000000000000000000000000000000077000000000000000000000000000000000000000000
|
|
07770000000077000000777700000000777777770000077777777000000007777000000007777777700077000000000000000000000000000000000000000000
|
|
07770000000077000000777700000007777777777000777777777700000007777000000077777777770077000000000000000000000000000000000000000000
|
|
07770000000077000000770770000007700000077000770000007700000007707700000077000000770077000000000000000000000000000000000000000000
|
|
07770000000077000007770770000007700000000000770000000000000077707700000077000000000077000000000000000000000000000000000000000000
|
|
07770000000077000007700077000007700000000000770000000000000077000770000077000000000077000000000000000000000000000000000000000000
|
|
07770000000077000007700077000007700000000000770000000000000077000770000077000000000077000000000000000000000000000000000000000000
|
|
07770000000077000077700077000007700000000000770000000000000777000770000077000000000077000000000000000000000000000000000000000000
|
|
07777777777770000077000007700007700000000000770000000000000770000077000077000000000077777777000000000000000000000000000000000000
|
|
07777777777770000077000007700007700000000000770000000000000770000077000077000000000077777777000000000000000000000000000000000000
|
|
07770000000077000077000007700007700000000000770000000000000770000077000077000000000077000000000000000000000000000000000000000000
|
|
07770000000077000777777777770007700000000000770000000000007777777777700077000000000077000000000000000000000000000000000000000000
|
|
07770000000077000777777777770007700777777000770777777700007777777777700077077777770077000000000000000000000000000000000000000000
|
|
07770000000077000770000000770007707777777700770777777770007700000007700077077777777077000000000000000000000000000000000000000000
|
|
07770000000077000770000000770007700000007700770000000770007700000007700077000000077077000000000000000000000000000000000000000000
|
|
07770000000077007700000000770007700000007700770000000770077000000007700077000000077077000000000000000000000000000000000000000000
|
|
07770000000077007700000000077007700000007700770000000770077000000000770077000000077077000000000000000000000000000000000000000000
|
|
07770000000077007700000000077007700000007700770000000770077000000000770077000000077077000000000000000000000000000000000000000000
|
|
07777777777777007700000000077007777777777000777777777700077000000000770077777777770077000000000000000000000000000000000000000000
|
|
07777777777770007700000000077000777777770000077777777000077000000000770007777777700077777777000000000000000000000000000000000000
|
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000077777777000000000000000000000000000000000000
|
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
07777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777000000000000000000000000000000000000
|
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
|
|
07777777777777777777777777777777777777777777777777777777777777777777777777777777777777777777000000000000000000000000000000000000
|