Use trans flag colors for the chameleon

This commit is contained in:
Pyrex 2022-12-17 16:42:15 -08:00
parent 8a88131d1e
commit 047f180632

View File

@ -649,33 +649,47 @@ function player:draw()
if (invis_level>=1.0) return
--px+=sin(vanish_level*16)*max(vanish_level-0.1,0)*1
local HEAD=14--3
local BODY=12--12
local TAIL=14--14
local IRIS=7--9
local PUPIL=0--0
-- base colors
pal(13,14)
pal(15,14)
pal(5,12)
pal(4,12)
pal(2,3)
local setpal=function()
-- base colors
pal(13,TAIL)
pal(14,TAIL)
pal(15,TAIL)
pal(4,BODY)
pal(5,BODY)
pal(12,BODY)
pal(2,HEAD)
pal(3,HEAD)
pal(9,IRIS)
pal(10,PUPIL)
-- vanish colors
local vanish=split"13,15,14,5,4,12,2,3,9,10"
for i,ilc in ipairs(vanish) do
if (vanish_level>i/#vanish) pal(ilc,1)
end
-- vanish colors
local vanish=split"13,15,14,5,4,12,2,3,9,10"
for i,ilc in ipairs(vanish) do
if (vanish_level>i/#vanish) pal(ilc,1)
end
if self.fall_frame>3 then
for i=0,15 do pal(i,1) end
if self.fall_frame>3 then
for i=0,15 do pal(i,1) end
end
end
if self.orientx==-1 then
setpal()
spr(16,px+6,py-2,1,1)
if (self.rope and invis_level<=0.25) self.rope:draw()
spr(17,px+1,py,1,1)
if (self.rope and invis_level<=0.25) pal() self.rope:draw() setpal()
spr(head,px-3,py-3,1,1)
else
setpal()
spr(16,px-6,py-2,1,1,true)
if (self.rope and invis_level<=0.25) self.rope:draw()
spr(17,px-1,py,1,1,true)
if (self.rope and invis_level<=0.25) pal() self.rope:draw() setpal()
spr(head,px+3,py-3,1,1,true)
end
pal()
@ -1390,14 +1404,14 @@ end
__gfx__
000000000003000000000022000300000000000000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000000333330000003322033333000aa00aa000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000009933399000399320933333900aaaaaa000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000009a333a90033a9320933333900aaaaaa000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000002333332033333200022222000099990000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
0000000002222200000022000222220000aaaa0000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
0000000000222c0002222c0000222000000aa00000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000000000cc000000cc000000cc000044440000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000000000300000000022000030000000000000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000000033333000003322003333300aa00aa000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000000993339900399320093333390aaaaaa000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
0000000009a333a9033a9320093333390aaaaaa000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
000000000233333233333200002222200099990000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
0000000000222220000022000022222000aaaa0000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
00000000000222c002222c0000022200000aa00000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
0000000000000cc00000cc0000000cc00044440000000000000000000000000000000000000000000000000000000000dddddddd000000000000000000000000
0000ff00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111000000000000000000000000
000f00f0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111000000000000000000000000
00d0000f000000000000000000000000000000000000000000000000000000000000000000000000000000000000000011111111000000000000000000000000