levels
This commit is contained in:
parent
f334e06078
commit
ff0fc51bff
24
toomgis.p8
24
toomgis.p8
@ -197,25 +197,29 @@ end
|
||||
|
||||
levels = {
|
||||
{
|
||||
name="store aisle",
|
||||
sky=7,
|
||||
gnd=5,
|
||||
mapy=2,
|
||||
mapy=1,
|
||||
bad_item_ratio=0.12,
|
||||
unit="CM",
|
||||
time=120,
|
||||
next=2,
|
||||
},
|
||||
{
|
||||
name="city nights",
|
||||
sky=2,
|
||||
gnd=5,
|
||||
mapy=5,
|
||||
bad_item_ratio=0.16,
|
||||
unit="M",
|
||||
time=90,
|
||||
next=nil,
|
||||
next=3,
|
||||
},
|
||||
{
|
||||
sky=2,
|
||||
mapy=9,
|
||||
bad_item_ratio=0.18,
|
||||
unit="KM",
|
||||
time=60,
|
||||
next=nil,
|
||||
}
|
||||
}
|
||||
horizon = 64
|
||||
|
||||
@ -246,10 +250,6 @@ function reset_items()
|
||||
end
|
||||
|
||||
function level_draw()
|
||||
-- background
|
||||
--rectfill(0, 0, 128, horizon, lvl.sky)
|
||||
--rectfill(0, horizon, 128, 128, lvl.gnd)
|
||||
|
||||
-- each level is 4tl/32px
|
||||
cls(lvl.sky)
|
||||
--- zoom should go from 16 to 1 w/ growth
|
||||
@ -257,7 +257,7 @@ function level_draw()
|
||||
local h=32 * zoom
|
||||
for y=0,h do
|
||||
tline(0, 128-h+y, 128, 128-h+y, -- screen coordinates (entire screen scanlines)
|
||||
px/80, 1+y/(8*zoom), 1/(8*zoom), 0)
|
||||
px/80, lvl.mapy+y/(8*zoom), 1/(8*zoom), 0)
|
||||
-- don't scale x start with zoom, since position is not dependent
|
||||
end
|
||||
|
||||
@ -385,7 +385,7 @@ function level_upd()
|
||||
end
|
||||
|
||||
if btnp(⬆️) then
|
||||
add2body(rnd(12)+2)
|
||||
start_level(lvl.next)
|
||||
end
|
||||
|
||||
-- guitar
|
||||
|
Loading…
Reference in New Issue
Block a user