switch palette strategy.
more work to do - this doesn't handle undulating waves. but with dolphin physics in, the rest of the arcade screen comes tomorrow
This commit is contained in:
parent
69dab5482a
commit
1ad0e973a5
28
vacation.p8
28
vacation.p8
@ -404,6 +404,7 @@ function newtitle()
|
||||
},
|
||||
to=64,
|
||||
})
|
||||
setup_arcade_pal()
|
||||
return view.of{
|
||||
{
|
||||
update=function()
|
||||
@ -458,7 +459,6 @@ end
|
||||
|
||||
-- dolphin sprite states:
|
||||
-- spr args
|
||||
-- draw pal
|
||||
-- hitbox offset; it's always
|
||||
-- some fixed size (trying to
|
||||
-- figure out what that size is)
|
||||
@ -478,17 +478,25 @@ phin_uw_pal = {
|
||||
[7]=135,
|
||||
[12]=140,
|
||||
}
|
||||
phin_err_pal = {
|
||||
[2]=2,
|
||||
[7]=7,
|
||||
[12]=8,
|
||||
identity = {
|
||||
[0]=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
|
||||
}
|
||||
|
||||
function setup_arcade_pal()
|
||||
-- per-line color mode
|
||||
poke(0x5f5f, 0x10)
|
||||
-- rows 72 and lower: sea
|
||||
memset(0x5f79,0xff,7)
|
||||
pal()
|
||||
pal(identity, 2)
|
||||
pal(phin_nrm_pal, 1)
|
||||
pal(phin_uw_pal, 2)
|
||||
end
|
||||
|
||||
phinstate_nrm = {
|
||||
s={4, 36, 4, 9},
|
||||
ws=3,
|
||||
hs=2,
|
||||
p=phin_nrm_pal,
|
||||
idle=true,
|
||||
xo=-12,
|
||||
yo=-8,
|
||||
@ -497,7 +505,6 @@ phinstate_jump_full = {
|
||||
s={7},
|
||||
ws=2,
|
||||
hs=3,
|
||||
p=phin_nrm_pal,
|
||||
xo=-4,
|
||||
yo=-8,
|
||||
}
|
||||
@ -505,7 +512,6 @@ phinstate_jump_wane = {
|
||||
s={1},
|
||||
ws=3,
|
||||
hs=3,
|
||||
p=phin_nrm_pal,
|
||||
xo=-12,
|
||||
yo=-8,
|
||||
}
|
||||
@ -513,7 +519,6 @@ phinstate_crest = {
|
||||
s={4},
|
||||
ws=3,
|
||||
hs=2,
|
||||
p=phin_nrm_pal,
|
||||
xo=-12,
|
||||
yo=-8,
|
||||
}
|
||||
@ -523,7 +528,6 @@ phinstate_dive_full = {
|
||||
s={7},
|
||||
ws=2,
|
||||
hs=3,
|
||||
p=phin_uw_pal,
|
||||
xo=-4,
|
||||
yo=-16,
|
||||
}
|
||||
@ -531,7 +535,6 @@ phinstate_dive_wane = {
|
||||
s={1},
|
||||
ws=3,
|
||||
hs=3,
|
||||
p=phin_uw_pal,
|
||||
xo=-12,
|
||||
yo=-16,
|
||||
}
|
||||
@ -539,7 +542,6 @@ phinstate_return = {
|
||||
s={4},
|
||||
ws=3,
|
||||
hs=2,
|
||||
p=phin_uw_pal,
|
||||
xo=-12,
|
||||
yo=-8,
|
||||
}
|
||||
@ -550,7 +552,6 @@ phinstate_error = {
|
||||
s={17},
|
||||
ws=1,
|
||||
hs=2,
|
||||
p=phin_err_pal,
|
||||
}
|
||||
|
||||
-- coordinates are the notional
|
||||
@ -686,7 +687,6 @@ end
|
||||
|
||||
function toyphin:draw()
|
||||
local st, y = self.state, self.y
|
||||
pal(st.p, 1)
|
||||
if (st.idle) y += wave()
|
||||
spr(st.s[1+(((t()<<1)&0x0.FFFF*#st.s)&0x7FFF)], self.x + st.xo, y + st.yo, self.state.ws, self.state.hs)
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user