diff --git a/data/game.lua b/data/game.lua index 880ce95..99def56 100644 --- a/data/game.lua +++ b/data/game.lua @@ -9,6 +9,7 @@ game = { light_strobe_value = 0, light_strobe_dir = 1, + water_counter = 0, enable = function() if game.back_buf == 0 then @@ -21,6 +22,9 @@ game = { end, update = function() + game.water_counter = game.water_counter + 0.05 + local counter = game.water_counter + view.origin(0,0) surf.target(game.back_buf) view.clip() @@ -36,8 +40,9 @@ game = { if rooms.pos.y == 84 then surf.target(game.back_buf) surf.source(game.back_buf) - for y=96,103 do - for x=0,159 do + for x=0,159 do + local water_level = math.sin(counter)*2 + for y=96+water_level,103 do local pixel = surf.pixel(x,y) surf.pixel(x,y,game.water_pal[pixel+1]) end diff --git a/data/rooms_foreground.gif b/data/rooms_foreground.gif index 1c00359..55fcfb3 100644 Binary files a/data/rooms_foreground.gif and b/data/rooms_foreground.gif differ diff --git a/data/rooms_items.gif b/data/rooms_items.gif index e7f4cc7..d2c43c1 100644 Binary files a/data/rooms_items.gif and b/data/rooms_items.gif differ diff --git a/data/sprites.lua b/data/sprites.lua index 953d4b6..f6dd430 100644 --- a/data/sprites.lua +++ b/data/sprites.lua @@ -235,6 +235,8 @@ sprites = { else if sprites.hero.jumping > 1 then sprites.hero.pos.y = sprites.hero.pos.y - 1 end end + else + sprites.hero.jumping = 0 end sprites.hero.jumping = sprites.hero.jumping - 1 else