diff --git a/data/caco.lua b/data/caco.lua index a8a5591..5a29601 100644 --- a/data/caco.lua +++ b/data/caco.lua @@ -93,7 +93,7 @@ end function caco:update_hit() self.wait=self.wait+1 - if self.wait==6 then + if self.wait>=6 then self.wait=0 self.step=self.step+1 if self.step<40 then diff --git a/data/game.lua b/data/game.lua index f22a1b4..0285c52 100644 --- a/data/game.lua +++ b/data/game.lua @@ -23,6 +23,8 @@ local view_checking_tile = false viewp = viewport.new(arcade_config.resolucion.width, arcade_config.resolucion.height) viewp:position(0,0) +local warp_rot = 0 + actors={} function game_init(menu) @@ -223,6 +225,13 @@ function update_game() score.draw() + -- Proves de warp + surf.source(warp) + -- draw.surf(0,0,32,32,0,0) + draw.surfrot(0,0,32,32,0,0,warp_rot) + warp_rot=warp_rot+5 + if warp_rot>=360 then warp_rot=0 end + fps_print() -- viewp:print() -- msg_print(0,14,"ABAD= "..abad.x..", "..abad.y, true) diff --git a/data/main.lua b/data/main.lua index d8bab98..a395d5c 100644 --- a/data/main.lua +++ b/data/main.lua @@ -13,9 +13,6 @@ require "game" require "switches" -- require "scenes" - - - coords.set_config({ tiles_width = arcade_config.tiles_width, tiles_height = arcade_config.tiles_height, @@ -70,6 +67,16 @@ function mini.init() local paleta=pal.load("tiles.gif") pal.set(paleta) + -- Crear el warp + warp=surf.new(32,32) + surf.source(tiles) + surf.target(warp) + draw.surfrot(11*16,15*16,16,16,0,0,0) + draw.surfrot(11*16,15*16,16,16,15,0,90) + draw.surfrot(11*16,15*16,16,16,0,15,270) + draw.surfrot(11*16,15*16,16,16,15,15,180) + + logo=surf.new(arcade_config.logo_sf.width,arcade_config.logo_sf.height) back=surf.new(arcade_config.surface.width,arcade_config.surface.height) sf_mapa=surf.new(mapa_room_cols*mapa_rooms_per_piso,mapa_room_rows*mapa_pisos) diff --git a/data/tiles.gif b/data/tiles.gif index b23890d..008e9f2 100644 Binary files a/data/tiles.gif and b/data/tiles.gif differ diff --git a/data/zombie.lua b/data/zombie.lua index e47441f..76271a4 100644 --- a/data/zombie.lua +++ b/data/zombie.lua @@ -82,7 +82,7 @@ end function zombie:update_hit() self.wait=self.wait+1 - if self.wait==6 then + if self.wait>=6 then self.wait=0 self.step=self.step+1 if self.step<40 then