This commit is contained in:
James Turk 2023-03-09 00:17:50 -06:00
parent 6ea7bd8af3
commit 9be34a91d6

View File

@ -37,9 +37,11 @@ function _draw()
draw_game() draw_game()
draw_snow() draw_snow()
draw_hud() draw_hud()
draw_bounds() --draw_bounds()
elseif mode == "gameover" then elseif mode == "gameover" then
draw_flag() draw_flag(true)
elseif mode == "win" then
draw_flag(false)
end end
end end
@ -113,6 +115,8 @@ function cast_dr()
print("dogs", 38, 110, 1) print("dogs", 38, 110, 1)
sled_dr() sled_dr()
print("❎ to mush", 45, 75, 1)
draw_heart(100, 80) draw_heart(100, 80)
draw_fan(100, 90) draw_fan(100, 90)
print("the fan", 90, 120) print("the fan", 90, 120)
@ -195,8 +199,8 @@ function draw_hud()
print("▒", 108, 0, 0) print("▒", 108, 0, 0)
if distance >= goal then if distance >= goal then
print("you win!", 35, 64) mode = "win"
-- if distance is near 100 -- if distance is near multiple of 1000
elseif distance%1000 < 100 then elseif distance%1000 < 100 then
local mtg = ceil((goal-distance)/1000)*100 local mtg = ceil((goal-distance)/1000)*100
print(mtg.." miles to go!", 30, 64) print(mtg.." miles to go!", 30, 64)
@ -228,7 +232,7 @@ function sled_upd()
steering = 0 steering = 0
end end
speed = 1 + (distance / 5000) speed = 2 + (distance / 3000)
if btnp(4) and t() - mush_time > 1 then if btnp(4) and t() - mush_time > 1 then
mush_time = t() mush_time = t()
@ -472,7 +476,7 @@ end
-->8 -->8
--end screens --end screens
function draw_flag() function draw_flag(loser)
cls() cls()
for x=0,128,1 do for x=0,128,1 do
@ -494,7 +498,14 @@ function draw_flag()
print("★", star.x, star.y + sin(t()+((star.x+4)/128)) * 5-10, 9) print("★", star.x, star.y + sin(t()+((star.x+4)/128)) * 5-10, 9)
end end
print("better luck next year", 20, 115, 9) if loser then
print("better luck next year", 20, 115, 9)
else
music(0)
local scale = (sin(t()) + 2)*2.5 * 8
sspr(32, 24, 8, 8, 80-scale/2, 48-scale/2, scale, scale)
print("see you again in '84!", 20, 115, 9)
end
end end
__gfx__ __gfx__