[NEW] Switchs i triggers dependents enllaçats

[NEW] Visió remota al obrir-se una porta
This commit is contained in:
2026-04-05 16:17:24 +02:00
parent 679e22f7fd
commit 4c2c8dc84f
5 changed files with 104 additions and 20 deletions

View File

@@ -17,6 +17,7 @@ require "trigger"
require "imp"
require "stage1"
require "remote_view"
local DEBUG = true
@@ -106,16 +107,17 @@ function game_init(menu)
table.insert(actors,abad)
score.create()
-- game_update=update_game
flow:next()
end
function render_map( sf_map, sf_tiles, x, y )
function render_map( sf_map, sf_tiles, x, y, target )
target = target or 0
map.surf(sf_map)
map.cell(16, 16)
surf.source(sf_tiles)
surf.target(0)
surf.target(target)
view.origin(-x,-y)
map.draw()
view.origin(0,0)
@@ -196,6 +198,8 @@ function world_draw()
end
cacau:draw()
remote_view_draw()
end
function update_game()
@@ -314,9 +318,16 @@ function special_keys()
mapa_restore_backup()
viewp:free_move()
end
if key.press(key.N8) then
-- abad go to room
local abad_x, abad_y = coords.room_to_world ( 31, 8, 3 )
print(abad_x..", "..abad_y)
abad:move(abad_x, abad_y)
local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
end
if key.press(key.N0) then
-- abad go to room
local abad_x, abad_y = coords.room_to_world ( 54, 6, 3 )
local abad_x, abad_y = coords.room_to_world ( 34, 3, 3 )
print(abad_x..", "..abad_y)
abad:move(abad_x, abad_y)
local scr_ax, scr_ay = viewp:screen_coords(abad_x, abad_y)
@@ -324,6 +335,7 @@ function special_keys()
end
function debug_info()
if true then return end
font.current(font_default)
viewp:print()
msg_print(0,14,"ABAD= "..abad.x..", "..abad.y, true)