Compare commits

...

2 Commits

Author SHA1 Message Date
cde36e2cf9
colors for arcade mode. they're all weird 2024-02-04 18:36:02 -08:00
8c0b369339
wave top 2024-02-04 17:49:08 -08:00

View File

@ -382,8 +382,13 @@ function wave(toff)
return 2.5 * sin((t()+toff)>>1) return 2.5 * sin((t()+toff)>>1)
end end
waves={} sea = {}
mknew(waves) mknew(sea)
function sea:draw()
rectfill(0, 72+wave(), 128, 84, 1)
end
arcade_level = { arcade_level = {
score=0, score=0,
@ -393,8 +398,7 @@ mknew(arcade_level, function(x)
x.phin = toyphin.new{splasher=x} x.phin = toyphin.new{splasher=x}
-- TODO: decent looking sky and sea -- TODO: decent looking sky and sea
x.sky = bg.new{c=12} x.sky = bg.new{c=12}
x.sea = bg.new{y=72, c=1} x.sea = sea.new()
x.waves = waves.new()
-- event list includes words -- event list includes words
x.e = event_list.new() x.e = event_list.new()
-- TODO: score renderer -- TODO: score renderer
@ -442,26 +446,38 @@ function arcade_level:landing_splash(x, force, harder)
-- TODO: sfx, vfx for landing from a jump -- TODO: sfx, vfx for landing from a jump
end end
-- dolphin sprite states: -- palette use:
-- spr args -- 0: shallow sea blue (1)
-- hitbox offset; it's always -- 1: black (for sprites)
-- some fixed size (trying to -- 2: dolphin shading
-- figure out what that size is) -- 3: azure water, maybe score display? (140)
-- multiple sprites: do the -- 4, 5, 6: unassigned, layer-specific
-- entire thing as multiple -- 7: dolphin highlights
-- sprites, or only the tail? -- 8, 9: unassigned, layer specific
-- single sprite is bigger on -- 10: word primary (yellow 10?)
-- the sprite sheet but easier -- 11: word shadow (wood 132?)
-- to render. -- 12: dolphin eye
phin_nrm_pal = { -- 13: light splashy water (12), maybe sky?
[2]=2, -- 14: dolphin primary color
[7]=7, -- 15: highlight white (all layers)
[14]=14, --
-- 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
} }
phin_uw_pal = { game_uw_pal = {
[2]=130, [0]=1, 0, 130, 140, 4, 5, 6, 13, 8, 9, 10, 132, 131, 12, 141, 7
[7]=13,
[14]=141,
} }
identity = { identity = {
[0]=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 [0]=0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15
@ -474,8 +490,8 @@ function setup_arcade_pal()
memset(0x5f79,0xff,7) memset(0x5f79,0xff,7)
pal() pal()
pal(identity, 2) pal(identity, 2)
pal(phin_nrm_pal, 1) pal(game_nrm_pal, 1)
pal(phin_uw_pal, 2) pal(game_uw_pal, 2)
end end
phinstate_nrm = { phinstate_nrm = {