sea rendering: palette now matches wave position
This commit is contained in:
parent
cde36e2cf9
commit
03de542e3a
99
vacation.p8
99
vacation.p8
@ -372,6 +372,50 @@ end
|
||||
-->8
|
||||
-- arcade mode
|
||||
|
||||
-- palette use:
|
||||
-- 0: shallow sea blue (1)
|
||||
-- 1: black (for sprites)
|
||||
-- 2: dolphin shading
|
||||
-- 3: azure water, maybe score display? (140)
|
||||
-- 4, 5, 6: unassigned, layer-specific
|
||||
-- 7: dolphin highlights
|
||||
-- 8, 9: unassigned, layer specific
|
||||
-- 10: word primary (yellow 10?)
|
||||
-- 11: word shadow (wood 132?)
|
||||
-- 12: dolphin eye
|
||||
-- 13: light splashy water (12), maybe sky?
|
||||
-- 14: dolphin primary color
|
||||
-- 15: highlight white (all layers)
|
||||
--
|
||||
-- dolphin colors are different
|
||||
-- between zones; correlated.
|
||||
-- wave, text, and black colors
|
||||
-- are the same between zones.
|
||||
-- other colors are for
|
||||
-- elements that only ever
|
||||
-- appear in one zone.
|
||||
--
|
||||
-- TODO: consider changing sky
|
||||
-- colors in different stages;
|
||||
-- document what colors those
|
||||
-- are (nrm_pal) if so.
|
||||
game_nrm_pal = {
|
||||
[0] = 1, 0, 2, 140, 4, 5, 6, 7, 8, 9, 10, 132, 12, 12, 14, 7
|
||||
}
|
||||
game_uw_pal = {
|
||||
[0]=1, 0, 130, 140, 4, 5, 6, 13, 8, 9, 10, 132, 131, 12, 141, 7
|
||||
}
|
||||
|
||||
function setup_arcade_pal()
|
||||
-- per-line color mode
|
||||
poke(0x5f5f, 0x10)
|
||||
-- rows 72 and lower: sea
|
||||
memset(0x5f79,0xff,7)
|
||||
pal()
|
||||
pal(game_nrm_pal, 1)
|
||||
pal(game_uw_pal, 2)
|
||||
end
|
||||
|
||||
-- global wave amplitude clock
|
||||
-- wave per 2 seconds
|
||||
-- optional toff: offset. at
|
||||
@ -386,8 +430,11 @@ sea = {}
|
||||
mknew(sea)
|
||||
|
||||
function sea:draw()
|
||||
rectfill(0, 72+wave(), 128, 84, 1)
|
||||
|
||||
rectfill(0, 72+wave(), 128, 84, 0)
|
||||
local pokeme = 0xFC00 + ((0x3E0 << flr(wave()+3)) & 0x3E0)
|
||||
poke2(0x5f78, pokeme)
|
||||
print(tostr(pokeme, true), 0, 0, 15)
|
||||
rectfill(64, 0, 80, 128, 7)
|
||||
end
|
||||
|
||||
arcade_level = {
|
||||
@ -397,7 +444,7 @@ arcade_level = {
|
||||
mknew(arcade_level, function(x)
|
||||
x.phin = toyphin.new{splasher=x}
|
||||
-- TODO: decent looking sky and sea
|
||||
x.sky = bg.new{c=12}
|
||||
x.sky = bg.new{c=13}
|
||||
x.sea = sea.new()
|
||||
-- event list includes words
|
||||
x.e = event_list.new()
|
||||
@ -446,53 +493,7 @@ function arcade_level:landing_splash(x, force, harder)
|
||||
-- TODO: sfx, vfx for landing from a jump
|
||||
end
|
||||
|
||||
-- palette use:
|
||||
-- 0: shallow sea blue (1)
|
||||
-- 1: black (for sprites)
|
||||
-- 2: dolphin shading
|
||||
-- 3: azure water, maybe score display? (140)
|
||||
-- 4, 5, 6: unassigned, layer-specific
|
||||
-- 7: dolphin highlights
|
||||
-- 8, 9: unassigned, layer specific
|
||||
-- 10: word primary (yellow 10?)
|
||||
-- 11: word shadow (wood 132?)
|
||||
-- 12: dolphin eye
|
||||
-- 13: light splashy water (12), maybe sky?
|
||||
-- 14: dolphin primary color
|
||||
-- 15: highlight white (all layers)
|
||||
--
|
||||
-- dolphin colors are different
|
||||
-- between zones; correlated.
|
||||
-- wave, text, and black colors
|
||||
-- are the same between zones.
|
||||
-- other colors are for
|
||||
-- elements that only ever
|
||||
-- appear in one zone.
|
||||
--
|
||||
-- TODO: consider changing sky
|
||||
-- colors in different stages;
|
||||
-- document what colors those
|
||||
-- are (nrm_pal) if so.
|
||||
game_nrm_pal = {
|
||||
[0] = 1, 0, 2, 140, 4, 5, 6, 7, 8, 9, 10, 132, 12, 12, 14, 7
|
||||
}
|
||||
game_uw_pal = {
|
||||
[0]=1, 0, 130, 140, 4, 5, 6, 13, 8, 9, 10, 132, 131, 12, 141, 7
|
||||
}
|
||||
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(game_nrm_pal, 1)
|
||||
pal(game_uw_pal, 2)
|
||||
end
|
||||
|
||||
phinstate_nrm = {
|
||||
s={4, 36, 4, 9},
|
||||
|
Loading…
Reference in New Issue
Block a user