wave top
This commit is contained in:
parent
51522e699c
commit
8c0b369339
22
vacation.p8
22
vacation.p8
@ -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
|
||||||
@ -453,12 +457,12 @@ end
|
|||||||
-- single sprite is bigger on
|
-- single sprite is bigger on
|
||||||
-- the sprite sheet but easier
|
-- the sprite sheet but easier
|
||||||
-- to render.
|
-- to render.
|
||||||
phin_nrm_pal = {
|
game_nrm_pal = {
|
||||||
[2]=2,
|
[2]=2,
|
||||||
[7]=7,
|
[7]=7,
|
||||||
[14]=14,
|
[14]=14,
|
||||||
}
|
}
|
||||||
phin_uw_pal = {
|
game_uw_pal = {
|
||||||
[2]=130,
|
[2]=130,
|
||||||
[7]=13,
|
[7]=13,
|
||||||
[14]=141,
|
[14]=141,
|
||||||
@ -474,8 +478,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 = {
|
||||||
|
Loading…
Reference in New Issue
Block a user