diff --git a/vacation.p8 b/vacation.p8 index 47c8029..0a73e93 100644 --- a/vacation.p8 +++ b/vacation.p8 @@ -382,8 +382,13 @@ function wave(toff) return 2.5 * sin((t()+toff)>>1) end -waves={} -mknew(waves) +sea = {} +mknew(sea) + +function sea:draw() + rectfill(0, 72+wave(), 128, 84, 1) + +end arcade_level = { score=0, @@ -393,8 +398,7 @@ mknew(arcade_level, function(x) x.phin = toyphin.new{splasher=x} -- TODO: decent looking sky and sea x.sky = bg.new{c=12} - x.sea = bg.new{y=72, c=1} - x.waves = waves.new() + x.sea = sea.new() -- event list includes words x.e = event_list.new() -- TODO: score renderer @@ -453,12 +457,12 @@ end -- single sprite is bigger on -- the sprite sheet but easier -- to render. -phin_nrm_pal = { +game_nrm_pal = { [2]=2, - [7]=7, + [7]=7, [14]=14, } -phin_uw_pal = { +game_uw_pal = { [2]=130, [7]=13, [14]=141, @@ -474,8 +478,8 @@ function setup_arcade_pal() memset(0x5f79,0xff,7) pal() pal(identity, 2) - pal(phin_nrm_pal, 1) - pal(phin_uw_pal, 2) + pal(game_nrm_pal, 1) + pal(game_uw_pal, 2) end phinstate_nrm = {