- [FIX] Ja funciona tot be amb els gifs

This commit is contained in:
2025-11-14 18:43:30 +01:00
parent 67192623fe
commit 6db92c3df6
8 changed files with 7 additions and 8 deletions

View File

@@ -8,9 +8,8 @@ function reload_textures()
if surf_sprites then surf.free(surf_sprites) end if surf_sprites then surf.free(surf_sprites) end
surf_sprites = surf.load("sprites.gif") surf_sprites = surf.load("sprites.gif")
if surf_tiles then surf.free(surf_tiles) end if surf_tiles then surf.free(surf_tiles) end
surf_tiles = surf.load("test.gif") surf_tiles = surf.load("tiles.gif")
surf.save(surf_tiles, "data/test2.gif",pal.load("test.gif"))
sys.quit()
pal.set(pal.load("tiles.gif")) pal.set(pal.load("tiles.gif"))
end end
@@ -18,13 +17,12 @@ function mini.init()
reload_textures() reload_textures()
pal.trans(0) pal.trans(0)
--rooms.init() rooms.init()
--shader.init("lynx.glsl") shader.init("lynx.glsl")
--editor.enable() editor.enable()
end end
function mini.update() function mini.update()
app.update() app.update()
sys.quit()
end end

View File

@@ -56,7 +56,8 @@ rooms = {
end, end,
save = function() save = function()
local p = pal.load("tiles.gif") local p = {}
for i=0,255 do p[i] = {r=i,g=i,b=i} end
surf.save(rooms.surf_background, "data/rooms_background"..ROOM_FILE_EXT, p) surf.save(rooms.surf_background, "data/rooms_background"..ROOM_FILE_EXT, p)
surf.save(rooms.surf_foreground, "data/rooms_foreground"..ROOM_FILE_EXT, p) surf.save(rooms.surf_foreground, "data/rooms_foreground"..ROOM_FILE_EXT, p)
surf.save(rooms.surf_items, "data/rooms_items"..ROOM_FILE_EXT, p) surf.save(rooms.surf_items, "data/rooms_items"..ROOM_FILE_EXT, p)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 394 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 960 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 962 B

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 285 B

After

Width:  |  Height:  |  Size: 995 B