diff --git a/main.lua b/main.lua index 8d38a0b..7acd2d7 100644 --- a/main.lua +++ b/main.lua @@ -24,6 +24,11 @@ function _init() local pal=loadpal("tiles.gif") setpal(pal) + actors={} + cameras={} + camera_names={[0]="GPS","Gorro","Peu de Paco","Premiere","EL_ALIEN","BatMan"} + current_camera=0 + -- ACTORS PRINCIPALS abad_init() table.insert(actors,abad) @@ -70,6 +75,7 @@ function _init() -- TRIGGERS table.insert(actors,trigger.new(10,44,32,triggers.escena_abad_inici)) table.insert(actors,trigger.new(11,16,32,triggers.escena_abad_corfes)) + table.insert(actors,trigger.new(19,32,32,triggers.escena_habitacio_batman)) score.create() cameras[0]=gps @@ -242,6 +248,13 @@ function update_game() end end +function game_exit() + mapa_restore_backup() + freesurf(tiles) + actors={} + cameras={} +end + function aabb(a, b) return (a.x+a.bb.x+a.bb.w >= b.x+b.bb.x) and (a.x+a.bb.x <= b.x+b.bb.x+b.bb.w) and (a.y+a.bb.y+a.bb.h >= b.y+b.bb.y) and (a.y+a.bb.y <= b.y+b.bb.y+b.bb.h) end \ No newline at end of file