main #12

Merged
kistaro merged 20 commits from pyrex/chameleonic:main into main 2022-12-23 06:38:45 +00:00
Showing only changes of commit 672f1b3951 - Show all commits

View File

@ -864,13 +864,13 @@ function player:draw()
setpal()
spr(16,px+6,py-2,1,1)
spr(17,px+1,py,1,1)
if (self.rope and invis_level<=0.25) pal() self.rope:draw(-2,-1) setpal()
if (self.rope and invis_level<=0.25) pal() self.rope:draw(self.x*8+self.px+1,self.y*8+self.py+2) setpal()
spr(head,px-3,py-3,1,1)
else
setpal()
spr(16,px-6,py-2,1,1,true)
spr(17,px-1,py,1,1,true)
if (self.rope and invis_level<=0.25) pal() self.rope:draw(2,-1) setpal()
if (self.rope and invis_level<=0.25) pal() self.rope:draw(self.x*8+self.px+7,self.y*8+self.py+2) setpal()
spr(head,px+3,py-3,1,1,true)
end
pal()
@ -946,14 +946,14 @@ function rope:destroy()
self.state={name="destroy",frame=0}
end
function rope:draw(artificial_dx,artificial_dy)
function rope:draw(artificial_px,artificial_py)
local points,highlight=self:_tug(true)
if (self.state.name=="done") return
local perc_to_show=1.0
if (self.state.name=="cast") perc_to_show=self.state.frame/2
if (self.state.name=="destroy") perc_to_show=(1.0-self.state.frame/5)^2
points[#points]={x=points[#points].x+artificial_dx,y=points[#points].y+artificial_dy}
points[#points]={x=artificial_px,y=artificial_py}
local len=0
for i=1,#points-1 do
@ -1622,6 +1622,28 @@ function wrongbleep:adequately_warned(duration)
end
-->8
-- text
level_text={by_lvl={}}
add(real_modules,level_text)
level_text_raw={
"9`9`11`\f7\#0press 🅾️ to mlem & unmlem",
"9`33`17`\f7\#0❎ to yoink"
}
function level_text:init()
for i=0,32 do level_text.by_lvl[i]={} end
for row in all(level_text_raw) do
if row then
lvl,x,y,s=unpack(split(row,"`"))
add(level_text.by_lvl[lvl],{x,y,s})
end
end
end
function level_text:draw()
for xys in all(level_text.by_lvl[level.ix]) do
print(xys[3],xys[1],xys[2],6)
end
end
__gfx__
000030000000002200003000000cc0cc0cccccccccccccccccccccccccccccccc0bb0000000000000000000000000000dddddddd000000000005000000000000
003333300000332200333330000cc0cc0000cc0000000000000000000cc0000000bb0bb0bbbb0bbbbb0bbbbb0bbb0000dddddddd000000000000500000000000