- [NEW] Minimapa en el editor

- [NEW] Diferent marcador
- [NEW] Més habitacions
This commit is contained in:
Raimon @ quifisraimon committed 2026-10-01 12:44:07 +02:00
1 parent a86011ba37
commit 8a770de885
12 files changed
+359 -24

No files matched your search

+10 -10
View File
@@ -1,11 +1,11 @@
bitmap=gfx/score_font.gif
48: 0 0 8 8 0 # 0
49: 8 0 8 8 0 # 1
50: 16 0 8 8 0 # 2
51: 24 0 8 8 0 # 3
52: 32 0 8 8 0 # 4
53: 40 0 8 8 0 # 5
54: 48 0 8 8 0 # 6
55: 56 0 8 8 0 # 7
56: 64 0 8 8 0 # 8
57: 72 0 8 8 0 # 9
48: 0 0 7 8 0 # 0
49: 7 0 7 8 0 # 1
50: 14 0 7 8 0 # 2
51: 21 0 7 8 0 # 3
52: 28 0 7 8 0 # 4
53: 35 0 7 8 0 # 5
54: 42 0 7 8 0 # 6
55: 49 0 7 8 0 # 7
56: 56 0 7 8 0 # 8
57: 63 0 7 8 0 # 9
Binary file not shown.

Before

Width:  |  Height:  |  Size: 133 B

After

Width:  |  Height:  |  Size: 136 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

After

Width:  |  Height:  |  Size: 4.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 944 B

+12 -12
View File
@@ -1,6 +1,6 @@
score = {
points = 0,
color = 21,
color = 28,
ypos = 3,
surf = nil,
font = nil
@@ -17,16 +17,16 @@ local function draw_text()
font.current(me.font)
font.spacing(0)
local txt = string.format("%03d", me.points)
draw.text(txt,2,me.ypos-1,27)
draw.text(txt,3,me.ypos-1,27)
draw.text(txt,4,me.ypos-1,27)
draw.text(txt,2,me.ypos,27)
draw.text(txt,4,me.ypos,27)
draw.text(txt,2,me.ypos+1,27)
draw.text(txt,4,me.ypos+1,27)
draw.text(txt,2,me.ypos+2,27)
draw.text(txt,3,me.ypos+2,27)
draw.text(txt,4,me.ypos+2,27)
-- draw.text(txt,2,me.ypos-1,27)
-- draw.text(txt,3,me.ypos-1,27)
-- draw.text(txt,4,me.ypos-1,27)
-- draw.text(txt,2,me.ypos,27)
-- draw.text(txt,4,me.ypos,27)
-- draw.text(txt,2,me.ypos+1,27)
-- draw.text(txt,4,me.ypos+1,27)
-- draw.text(txt,2,me.ypos+2,27)
-- draw.text(txt,3,me.ypos+2,27)
-- draw.text(txt,4,me.ypos+2,27)
draw.text(txt,3,me.ypos+1,1)
draw.text(txt,3,me.ypos,me.color)
font.current(font.DEFAULT)
@@ -64,6 +64,6 @@ end
function me.inc(value)
me.points = me.points + value
tweening.add(8, 0, 0.5, easing.linear, function(val,progress,finished) me.color = (math.floor(val)&1) == 0 and 21 or 14 end)
tweening.add(8, 0, 0.5, easing.linear, function(val,progress,finished) me.color = (math.floor(val)&1) == 0 and 28 or 14 end)
tweening.add(5, 3, 0.5, easing.easeOutElastic, function(val,progress,finished) me.ypos = math.floor(val) end)
end
+52
View File
@@ -1,6 +1,7 @@
require ":modules.menu"
require ":utils.msgbox"
require ":modules.items"
require ":utils.palfade"
editor = {
@@ -148,6 +149,8 @@ editor = {
else
editor.itempicker.show()
end
elseif key.press(key.GRAVE) then
editor.mapviewer.show()
elseif key.press(key.P) then
sprites.hero.pos.x = tx*8-4
sprites.hero.pos.y = ty*8-9
@@ -343,6 +346,55 @@ editor = {
end
},
mapviewer = {
surf = nil,
pal = nil,
show = function()
if editor.mapviewer.surf == nil then editor.mapviewer.surf = surf.new(160,104) end
local background = surf.load("maps/rooms_background.gif")
local foreground = surf.load("maps/rooms_foreground.gif")
surf.target(surf.SCREEN)
surf.cls(0)
surf.target(editor.mapviewer.surf)
surf.source(background)
view.origin(0,0)
surf.clip()
draw.surf(0,0,160,104,0,0)
surf.source(foreground)
draw.surf(0,0,160,104,0,0)
if editor.mapviewer.pal == nil then editor.mapviewer.pal = pal.load("maps/tiles_palette.gif") end
pal.set(editor.mapviewer.pal)
app.push(editor.mapviewer.update)
end,
close = function()
surf.target(surf.SCREEN)
surf.cls(0)
pal.set(palfade.original)
app.pop()
end,
update = function()
surf.source(editor.mapviewer.surf)
surf.target(surf.SCREEN)
draw.surf(0,0,160,104,0,0)
local x = (rooms.pos.x//20)*20
local y = (rooms.pos.y//13)*13
draw.rect(x, y, 20, 13, 68)
if not key.down(key.GRAVE) then
editor.mapviewer.close()
end
end
},
itempicker = {
surf_back = nil,
pos_y = 24,
+2 -2
View File
@@ -74,7 +74,7 @@ game = {
score.draw()
view.origin(0,0)
draw.text("safe: "..sprites.last_safe_room,1,96,28)
--draw.text("safe: "..sprites.last_safe_room,1,96,28)
--draw.text(sprites.hero.pos.x ..","..sprites.hero.pos.y,14,89,28)
if key.press(key.ESCAPE) or key.press(key.F9) then
@@ -86,7 +86,7 @@ game = {
console.enable()
end
draw.text(sys.fps(),2,20,8)
--draw.text(sys.fps(),2,20,8)
end,
change_room = function(x,y)