diff --git a/data/editor.lua b/data/editor.lua index 7f4da88..3444d41 100644 --- a/data/editor.lua +++ b/data/editor.lua @@ -91,10 +91,17 @@ editor = { sprites.hero.pos.y = ty*8-9 elseif key.press(key.F9) then editor.play() + elseif key.press(key.F11 ) then + reload_textures() end end, create_stamp=function() + if editor.layer == LAYER_FOREGROUND then + map.surf(rooms.surf_foreground) + elseif editor.layer == LAYER_BACKGROUND then + map.surf(rooms.surf_background) + end local tx1,ty1,tx2,ty2=editor.selection.x1,editor.selection.y1,editor.selection.x2,editor.selection.y2 if tx1>tx2 then tx1,tx2=tx2,tx1 end if ty1>ty2 then ty1,ty2=ty2,ty1 end diff --git a/data/main.lua b/data/main.lua index e36c3f3..ced4471 100644 --- a/data/main.lua +++ b/data/main.lua @@ -4,10 +4,17 @@ require "rooms" require "editor" require "game" -function mini.init() +function reload_textures() + if surf_sprites then surf.free(surf_sprites) end surf_sprites = surf.load("sprites.gif") + if surf_tiles then surf.free(surf_tiles) end surf_tiles = surf.load("tiles.gif") + pal.set(pal.load("tiles.gif")) +end + +function mini.init() + reload_textures() pal.trans(0) rooms.init() diff --git a/data/rooms_background.bin b/data/rooms_background.bin index 1c164d7..81d1746 100644 Binary files a/data/rooms_background.bin and b/data/rooms_background.bin differ diff --git a/data/rooms_foreground.bin b/data/rooms_foreground.bin index 364d523..64bdfa1 100644 Binary files a/data/rooms_foreground.bin and b/data/rooms_foreground.bin differ diff --git a/data/tiles.gif b/data/tiles.gif index 7c5b3c3..2bf003e 100644 Binary files a/data/tiles.gif and b/data/tiles.gif differ