Replace multiple pal calls with a single pal-table call, or some pokes.
This commit is contained in:
parent
a0da322c3d
commit
5e3ca803b7
@ -663,16 +663,18 @@ function player:draw()
|
|||||||
|
|
||||||
local setpal=function()
|
local setpal=function()
|
||||||
-- base colors
|
-- base colors
|
||||||
pal(13,TAIL)
|
pal{
|
||||||
pal(14,TAIL)
|
[2]=HEAD,
|
||||||
pal(15,TAIL)
|
[3]=HEAD,
|
||||||
pal(4,BODY)
|
[4]=BODY,
|
||||||
pal(5,BODY)
|
[5]=BODY,
|
||||||
pal(12,BODY)
|
[9]=IRIS,
|
||||||
pal(2,HEAD)
|
[10]=PUPIL,
|
||||||
pal(3,HEAD)
|
[12]=BODY,
|
||||||
pal(9,IRIS)
|
[13]=TAIL,
|
||||||
pal(10,PUPIL)
|
[14]=TAIL,
|
||||||
|
[15]=TAIL,
|
||||||
|
}
|
||||||
|
|
||||||
-- 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"
|
||||||
@ -681,7 +683,9 @@ function player:draw()
|
|||||||
end
|
end
|
||||||
|
|
||||||
if self.fall_frame>3 then
|
if self.fall_frame>3 then
|
||||||
for i=0,15 do pal(i,1) end
|
local zc=@0x5f00&0xf0
|
||||||
|
for i=0x5f00,0x5f0c,4 do poke4(i,0x0101.0101) end
|
||||||
|
poke(0x5f00,zc|0x01)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user