diff --git a/data/editor.lua b/data/editor.lua index 67f3486..f95ba55 100644 --- a/data/editor.lua +++ b/data/editor.lua @@ -169,6 +169,12 @@ editor = { editor.modified = true end end + if editor.item_hovered and key.press(key.DELETE) then + local sprite = sprites.list[editor.item_hovered] + map.surf(rooms.surf_items) + map.tile(sprite.pos.x//8,sprite.pos.y//8,0) + sprites.remove(sprite) + end end end, diff --git a/data/rooms_background.gif b/data/rooms_background.gif index 9031773..59833d2 100644 Binary files a/data/rooms_background.gif and b/data/rooms_background.gif differ diff --git a/data/rooms_foreground.gif b/data/rooms_foreground.gif index 2684d08..cd40a12 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 41feab0..30ece8e 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 903f924..4b085a9 100644 --- a/data/sprites.lua +++ b/data/sprites.lua @@ -159,7 +159,7 @@ sprites = { end, update_bullet = function(spr) - local tx, ty = (spr.pos.x+2)>>3, (spr.pos.y+1)>>3 + local tx, ty, ty2 = (spr.pos.x+2)>>3, (spr.pos.y+1)>>3, (spr.pos.y+2)>>3 if rooms.is_outside(tx,ty) then sprites.remove(spr) return end @@ -175,7 +175,7 @@ sprites = { end end - if map.tile(tx,ty) < 16 then + if map.tile(tx,ty) < 16 or map.tile(tx,ty2) < 16 then if spr.flipped then spr.pos.x = spr.pos.x - 8 else @@ -296,7 +296,7 @@ sprites = { elseif key.down(key.X) or pad.down(pad.B) then sprites.hero.shooting = true local x = sprites.hero.flipped and sprites.hero.pos.x+8 or sprites.hero.pos.x-8 - local bullet = templates.create("bullet", {pos={x=sprites.hero.pos.x, y=sprites.hero.pos.y+8}, flipped=sprites.hero.flipped}) + local bullet = templates.create("bullet", {pos={x=sprites.hero.pos.x, y=sprites.hero.pos.y+7}, flipped=sprites.hero.flipped}) table.insert(sprites.list, bullet) if sprites.hero.flipped then sprites.hero.pos.x=sprites.hero.pos.x-8 end anim = "hero_shoot" diff --git a/data/tiles.gif b/data/tiles.gif index 2bf003e..9b055f0 100644 Binary files a/data/tiles.gif and b/data/tiles.gif differ