True up with local changes

This commit is contained in:
Pyrex 2023-06-03 16:27:22 -07:00
parent e54a764ae2
commit 4599197d65

View File

@ -7,13 +7,14 @@ real_modules={}
function _init() function _init()
-- printh("restarting") -- printh("restarting")
_doall("init") _doall"init"
end end
function _update60() function _update60()
_doall("update") end _doall"update" end
function _draw() function _draw()
_doall("draw") end _doall"draw"
end
function music_on() function music_on()
if (stat(54) ~= 0) music(0) if (stat(54) ~= 0) music(0)
@ -252,9 +253,9 @@ end
title={} title={}
add(modules,title) add(modules,title)
lvlshimmer = {4,9,10,10,9} lvlshimmer = split"4,9,10,10,9"
function title:draw() function title:draw()
cls(0) cls"0"
-- this is right for 72x32 -- this is right for 72x32
spr(96,28,56,9,2) spr(96,28,56,9,2)
print("pyrex",32,73,7) print("pyrex",32,73,7)
@ -276,7 +277,7 @@ end
function title:update() function title:update()
if (btnp"0") start_level-=1 if (btnp"0") start_level-=1
if (btnp"1") start_level+=1 if (btnp"1") start_level+=1
start_level%=(max_level+1) start_level%=max_level+1
if btn"3" and not wiped then if btn"3" and not wiped then
wrongbleep:bleep() wrongbleep:bleep()
if (wrongbleep:adequately_warned()) then if (wrongbleep:adequately_warned()) then
@ -323,10 +324,25 @@ function level:advance()
end end
normpal = {[1]=0,[8]=0,[14]=0} normpal = {[1]=0,[8]=0,[14]=0}
ixes=split"5,3,15,10,13,4,9"
easy=split"1,131,6,129,6,141,12"
moderate=split"3,139,15,5,6,4,9"
hard=split"134,135,142,134,6,142,140"
brutal=split"8,137,9,130,6,13,138"
function level:draw3()
local p=easy
if (self.ix>=6) p=moderate
if (self.ix>=13) p=hard
if (self.ix>=24) p=brutal
for i=1,7 do
pal(ixes[i],p[i],1)
end
end
function level:draw() function level:draw()
cls(5)
fillp()
pal(normpal) pal(normpal)
cls"10"
map( map(
self.bigx*16,self.bigy*16, self.bigx*16,self.bigy*16,
0,0,16,16, 0,0,16,16,
@ -668,6 +684,47 @@ function level_tug_crate(t)
self._crates[_mix{mx1,my1}]=existing self._crates[_mix{mx1,my1}]=existing
end end
-->8
-- particles
particles={}
add(real_modules,particles)
function particles:init()
self.a={}
end
function particles:update()
local a2={}
for i in all(particles.a) do
i.t+=1
i[1]+=i.dx
i[2]+=i.dy
i.dy+=i.ddy
if (i.t<i.mt) add(a2,i)
end
particles.a=a2
end
function particles:move(x,y,dx,dy)
for i=0,1,0.25 do
local px=(x+dx*i)*8+2
local py=(y+dy*i)*8+4
px+=rnd"4"
py+=rnd"6"
add(self.a,{
px,py,6,
dx=rnd()-0.5,
dy=-rnd(0.5),
ddy=0.02,
t=-rnd"4",
mt=4+rnd"4"
})
end
end
function particles:draw()
for i in all(particles.a) do
if (i.t>0) pset(unpack(i))
end
end
-->8 -->8
--player handling --player handling
player={} player={}
@ -737,6 +794,7 @@ function player:update()
local t=f[#f] local t=f[#f]
t.x=x+dx t.x=x+dx
t.y=y+dy t.y=y+dy
particles:move(x,y,dx,dy)
return return
end end
wrongbleep:bleep() wrongbleep:bleep()
@ -859,7 +917,7 @@ function player:draw()
-- vanish colors -- vanish colors
local vanish=split"13,15,14,5,4,12,2,3,9,10" local vanish=split"13,15,14,5,4,12,2,3,9,10"
for i,ilc in ipairs(vanish) do for i,ilc in ipairs(vanish) do
if (vanish_level>i/#vanish) pal(ilc,5) if (vanish_level>i/#vanish) pal(ilc,10)
end end
if (self.fall_frame>3) local zc=@0x5f00&0xf0 for i=0x5f00,0x5f0c,4 do poke4(i,0x0505.0505) end poke(0x5f00,zc|0x01) if (self.fall_frame>3) local zc=@0x5f00&0xf0 for i=0x5f00,0x5f0c,4 do poke4(i,0x0505.0505) end poke(0x5f00,zc|0x01)
@ -1892,14 +1950,14 @@ __gfx__
002222200000220000222220efe33eeeeeeeeeeeeee33efeeee33eeeeee33eeeff1111ffff111111ff1ff1ff111111ffdddddddd111111110cccccc033333333 002222200000220000222220efe33eeeeeeeeeeeeee33efeeee33eeeeee33eeeff1111ffff111111ff1ff1ff111111ffdddddddd111111110cccccc033333333
000222c002222c0000022200efeeee555e555e55e5eeeefee5eeeeffffeeee5effffffffffffffffff1ff1ffffffffffdddddddd111111110cc00cc033300333 000222c002222c0000022200efeeee555e555e55e5eeeefee5eeeeffffeeee5effffffffffffffffff1ff1ffffffffffdddddddd111111110cc00cc033300333
00000cc00000cc0000000cc0efe33e5eeeeeeeeee5e33efee5e33efeefe33e5e1ffffff11fffffffff1ff1fffffffff1dddddddd111111110000000033300333 00000cc00000cc0000000cc0efe33e5eeeeeeeeee5e33efee5e33efeefe33e5e1ffffff11fffffffff1ff1fffffffff1dddddddd111111110000000033300333
0000ff000000000000000000efe33e5e11111111e5e33efee5e33efeefe33e5eff1ff1ffffffffffffffffffffffffff88888888555555555555555588888888 0000ff000000000000000000efe33e5e11111111e5e33efee5e33efeefe33e5eff1ff1ffffffffffffffffffffffffff88888888aaaaaaaaaaaaaaaa88888888
000f00f0000000000aa00aa0efe33eee11ffff11eee33efeeee33effffe33e5eff1ff1ffffffffffffffffffffffffff88888888558855885588558888888888 000f00f0000000000aa00aa0efe33eee11ffff11eee33efeeee33effffe33e5eff1ff1ffffffffffffffffffffffffff88888888aa88aa88aa88aa8888888888
00d0000f000000000aaaaaa0efe33e5e1ff11ff1e5e33efee5e33eeeeee33eeeff1ff1fffff11111ffffffff11111fff88888888888888888888888888888888 00d0000f000000000aaaaaa0efe33e5e1ff11ff1e5e33efee5e33eeeeee33eeeff1ff1fffff11111ffffffff11111fff88888888888888888888888888888888
00d0d00f00c040500aaaaaa0efeeee5e1f1111f1e5eeeefee5e333e333333e5eff1ff1fffff1ffffff1111ffffff1fff88888888888888888888888888888888 00d0d00f00c040500aaaaaa0efeeee5e1f1111f1e5eeeefee5e333e333333e5eff1ff1fffff1ffffff1111ffffff1fff88888888888888888888888888888888
00dd00ee00c4455000999900efe33e5e1f1111f1e5e33efee5e333e333333e5eff1111fffff1ffffff1ff1ffffff1fff88888888888888888888888888888888 00dd00ee00c4455000999900efe33e5e1f1111f1e5e33efee5e333e333333e5eff1111fffff1ffffff1ff1ffffff1fff88888888888888888888888888888888
00000ee00c44455500aaaa00efe33eee1ff11ff1eee33efeeeeeeeeeeeeeee5efffffffffff11111ff1ff1ff11111fff88888888888888888888888888888888 00000ee00c44455500aaaa00efe33eee1ff11ff1eee33efeeeeeeeeeeeeeee5efffffffffff11111ff1ff1ff11111fff88888888888888888888888888888888
00eeee000c004005000aa000efe33e5e11ffff11e5e33efee5555e555e555e5effffffffffffffffff1ff1ffffffffff88888888888888888855885588558855 00eeee000c004005000aa000efe33e5e11ffff11e5e33efee5555e555e555e5effffffffffffffffff1ff1ffffffffff888888888888888888aa88aa88aa88aa
eeee0000cc04405500444400efeeee5e11111111e5eeeefeeeeeeeeeeeeeeeeeffffffffffffffffff1ff1ffffffffff88888888888888885555555555555555 eeee0000cc04405500444400efeeee5e11111111e5eeeefeeeeeeeeeeeeeeeeeffffffffffffffffff1ff1ffffffffff8888888888888888aaaaaaaaaaaaaaaa
00000000000a900000000000efe33eeeeeeeeeeeeee33efeff1ff1ffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000000000a900000000000efe33eeeeeeeeeeeeee33efeff1ff1ffffffffffffffffff00000000000000000000000000000000000000000000000000000000
00000aaaaaaa910000000000efe33e5555e555e555e33efeff1ff1ffffffffffffffffff00000000000000000000000000000000000000000000000000000000 00000aaaaaaa910000000000efe33e5555e555e555e33efeff1ff1ffffffffffffffffff00000000000000000000000000000000000000000000000000000000
0000aaaaaa1a911000a00200efe33eeeeeeeeeeeeee33efeff1ff1ff11111111ff1111ff00000000000000000000000000000000000000000000000000000000 0000aaaaaa1a911000a00200efe33eeeeeeeeeeeeee33efeff1ff1ff11111111ff1111ff00000000000000000000000000000000000000000000000000000000
@ -1949,37 +2007,37 @@ eeee0000cc04405500444400efeeee5e11111111e5eeeefeeeeeeeeeeeeeeeeeffffffffffffffff
00880888880880888880880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00880888880880888880880000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000888888800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c010c0c0c0c0c0c0c0c0d0d0d0d0d0d030404050d0d0d0d0d0d0 00000000000000000000000000000000c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d010d0d0d0d0d0d0d0d0d0d0d0d0d0d030404050d0d0d0d0d0d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c000c0c0c0c0c0c0c0c0304040404050316400510041d0d0d0d0 00000000000000000000000000000000c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0410041d0d0d0d0d0d0d0304040404050316400510041d0d0d0d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c000c0c0c0c0c0c0c0c03174000000f3000000000030404050d0 00000000000000000000000000000000c0c0c0c000000000c0c0c0c0c0c0c0c0d0d0d0d0d0d0410041d0d0d0d0d0d0d0317400000051000000000030404050d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c000c0c0c0c0c0c0c0c0310000e1e1000042e1520000000051d0 00000000000000000000000000000000c0c0c0c000c0c000c0c0c0c0c0c0c0c0d0d0d030405030003040404050d0d0d0310000e1e1000042e1520000000051d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c000c0c0c0c0c0c0c0c0100000000451304000500031000051d0 00000000000000000000000000000000c0c0c0c000c0c000c0c0c0c0c0c0c0c0d0d0d031005131000000000051d0d0d0100000000451304000500031000051d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c00000000000c0c0c0c0c0c031000400000000000051003242d152d0 00000000000000000000000000000000c0c0c0c000000000f1c0c0c0c0c0c0c0d0d0d03100d1d100d1d1820051d0d0d031000400000000000051003242d152d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c000c1c1c000c0c0c0c0c0c031000000005131000051003040f14050 00000000000000000000000000000000100000000000040000e3000000c0c0c0d0d0d0d300f1f10014c1f30051d0d0d031000000005131000051003040f14050
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0d300c10014c1f300c0c0c0c0c0c032424242425232424252000000000051 00000000000000000000000000000000c0c0c0c0c00000000000000000c0c0c0d0d0d0310051310082f1820051d0d0d032424242425232424252000000000051
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c000c000c1c1c000c0c0c0c0c0c030404040503040404050003100000051 00000000000000000000000000000000c0c0c000c1000000d100000400c0c0c0d0d0d031005131000000000051d0d0d030404040503040404050003100000051
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c000c000c0c1c000c0c0c0c0c0c03100000051d300000051003242d14252 00000000000000000000000000000000c0c0c000c0c1c100c100c1c100c0c0c0d0d0d032005232424200d14252d0d0d03100000051d300000051003242d14252
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c000c00000000000c0c0c0c0c0c031000000d1d100440051003040f150d0 00000000000000000000000000000000c0c0c000c000c100c100c100c0c0c0c0d0d0d030005030404000c140504141d031000000d1d100440051003040f150d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c000c0c0c000c0c0c0c0c0c0c0c031000000f1f1001400510000000051d0 00000000000000000000000000000000c0c0c000c000c100c100c100c0c0c0c0d0d0d0310000000000a4f1000000002131000000f1f1001400510000000051d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c00000000084c0c0c0c0c0c0c0c0310000005131000000510031000051d0 00000000000000000000000000000000c0c0c000c000f1e1f1e1f100c0c0c0c0d0d0d0324252324242424242524141d0310000005131000000510031000051d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c000c0c0c0c0c0c0c0c0324242005232e14200521432424252d0 00000000000000000000000000000000c0c0c000c000000000000000c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0324242005232e14200521432424252d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c000c0c0c0c0c0c0c0c0d0d0d0000000004100000041d0d0d0d0 00000000000000000000000000000000c0c0c000c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0000000004100000041d0d0d0d0
00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
0000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c021c0c0c0c0c0c0c0c0d0d0d0d0d0d021d0d0d0d0d0d0d0d0d0 00000000000000000000000000000000c0c0c021c0c0c0c0c0c0c0c0c0c0c0c0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d0d021d0d0d0d0d0d0d0d0d0
d0d0d0d0d0d0d0d0e3d0d0d0d0d0d0d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d0d0d0d0d0d0d0e3d0d0d0d0d0d0d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0 000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0c0
d0d0d0d0d0d04100000041d0d0d0d0d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 d0d0d0d0d0d04100000041d0d0d0d0d0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000