From 5061d7f6a19699489ed4a3c2c95fe142994bed96 Mon Sep 17 00:00:00 2001 From: James Turk Date: Wed, 3 May 2023 00:23:59 -0500 Subject: [PATCH] shorter guys --- games/against.p8 | 43 +++++++++++++++++++++++-------------------- 1 file changed, 23 insertions(+), 20 deletions(-) diff --git a/games/against.p8 b/games/against.p8 index d98f5b6..8d82d36 100644 --- a/games/against.p8 +++ b/games/against.p8 @@ -64,6 +64,8 @@ function start_level() walls[70]={{0,10}, {20,30}, {44,55}} walls[80]={{5,15}, {20,25}, {40,50}} walls[90]={{0,10}, {25,30}, {38,44}} + the_line = 64 + spr_frame = 1 end function draw_side(right) @@ -80,18 +82,27 @@ end function draw_level() --palt(0, false) - spr_frame = 1 cls(0) draw_side(false) - spr(spr_frame, 56, 100, 1, 2, false) - rectfill(64, 0, 128, 128, LIGHT) + spr(spr_frame, the_line-8, 120, 1, 1, false) + rectfill(the_line, 0, 128, 128, LIGHT) draw_side(true) pal({[LIGHT]=DARK}) - spr(spr_frame, 64, 100, 1, 2, true) + spr(spr_frame, the_line, 120, 1, 1, true) pal() end function update_level() + spr_frame += .1 + if spr_frame >= 4 then + spr_frame = 1 + end + if btn(0) then + the_line -= 1 + end + if btn(1) then + the_line += 1 + end end LIGHT = 6 @@ -102,19 +113,11 @@ _scenes.level = {start=start_level, draw=draw_level, update=update_level} __gfx__ -00000000666660006666600006666600066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000666660006666600006666600066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00700700666660006666600006666600066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00077000666660006666600006666600066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00077000666660006666600006666600066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00700700060000060600000600060000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000060000060600000600060000000600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066666660666666606066660066666600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066000000660000000666000000660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066000000660000000066000000660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066000000660000000066000000660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066000000660000000066000000660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066000000660000000066000000660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000066000000660000000066000000660000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000606600006606000000660600006606000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 -00000000600600006006000000600600006006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000060000000600000006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000666000006660000066600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000060060000600600006006000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000666660006666600066666000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00077000000666000006660000066600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00700700000666000006660000066600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000606000006060000060600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 +00000000000600600006060000600600000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000