[WIP] Reestructurant codi abans de posar-me en el nivell 2
[NEW] Afegit music_player [NEW] Música de fons des de l'inici
This commit is contained in:
@@ -1,21 +1,25 @@
|
||||
remote_view_wait = 0
|
||||
remote_view_hab = ""
|
||||
remote_sf_w = mapa_room_cols*arcade_config.tiles_width
|
||||
remote_sf_h = mapa_room_rows*arcade_config.tiles_height
|
||||
remote_sf_w = 0
|
||||
remote_sf_h = 0
|
||||
|
||||
function remote_view_init ()
|
||||
remote_sf_w = mapa_room_cols*arcade_config.tiles_width
|
||||
remote_sf_h = mapa_room_rows*arcade_config.tiles_height
|
||||
sf_remote=surf.new(remote_sf_w, remote_sf_h)
|
||||
end
|
||||
|
||||
function remote_view(hab)
|
||||
-- print("REMOTE_VIEW "..hab)
|
||||
remote_view_hab = hab
|
||||
remote_view_wait = 200
|
||||
end
|
||||
|
||||
function remote_view_draw()
|
||||
if remote_view_wait>0 then
|
||||
-- print("REMOTE_VIEW_DRAW "..remote_view_hab)
|
||||
local x,y = coords.room_to_coord ( remote_view_hab )
|
||||
|
||||
-- print("X,Y= "..x.." , "..y)
|
||||
local curr_source = surf.source()
|
||||
local curr_target = surf.target()
|
||||
|
||||
@@ -30,6 +34,7 @@ function remote_view_draw()
|
||||
surf.source(sf_remote)
|
||||
draw.surf(0,0,remote_sf_w,remote_sf_h,11,11,(remote_sf_w/2)-2,(remote_sf_h/2)-2)
|
||||
draw.rect(10,10,(remote_sf_w/2),(remote_sf_h/2),2)
|
||||
-- print("RSW,RSH= "..remote_sf_w.." , "..remote_sf_h)
|
||||
surf.source(curr_source)
|
||||
remote_view_wait = remote_view_wait-1
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user