forked from JailDoctor/cacaus
Ja se veuen be el gorro, el gps, el peu, el cacau, la fireball i el imp que eixia 'flipat'
This commit is contained in:
@@ -1,3 +1,6 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
cacau={hab=-1,x=0,y=0,wait=0,flip=false,bb={x=0,y=0,w=4,h=4}}
|
||||
|
||||
function cacau.init(_hab,_x,_y,_flip)
|
||||
@@ -9,8 +12,8 @@ function cacau.init(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function cacau.draw()
|
||||
draw.circf(cacau.x,cacau.y,2,16)
|
||||
draw.circf(cacau.x,cacau.y,1,6)
|
||||
draw.circf(cacau.x*o2aX,cacau.y*o2aX,2*o2aX,16)
|
||||
draw.circf(cacau.x*o2aX,cacau.y*o2aX,1*o2aX,6)
|
||||
end
|
||||
|
||||
function cacau.update()
|
||||
|
||||
@@ -1,3 +1,6 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
|
||||
fireball={hab=-1,x=0,y=0,wait=0,flip=false,bb={x=0,y=0,w=4,h=4}}
|
||||
|
||||
function fireball.init(_hab,_x,_y,_flip)
|
||||
@@ -9,9 +12,9 @@ function fireball.init(_hab,_x,_y,_flip)
|
||||
end
|
||||
|
||||
function fireball.draw()
|
||||
draw.circf(fireball.x,fireball.y,3,16)
|
||||
draw.circf(fireball.x,fireball.y,2,3)
|
||||
draw.circf(fireball.x,fireball.y,1,8)
|
||||
draw.circf(fireball.x*o2aX,fireball.y*o2aX,3*o2aX,16)
|
||||
draw.circf(fireball.x*o2aX,fireball.y*o2aX,2*o2aX,3)
|
||||
draw.circf(fireball.x*o2aX,fireball.y*o2aX,1*o2aX,8)
|
||||
end
|
||||
|
||||
function fireball.update()
|
||||
|
||||
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
gorro_gif_col = 6
|
||||
gorro_gif_row = 2
|
||||
|
||||
gorro={hab=5,x=48,y=24,bb={x=0,y=0,w=8,h=8}}
|
||||
|
||||
function gorro.init()
|
||||
@@ -11,6 +21,9 @@ end
|
||||
|
||||
function gorro.draw()
|
||||
draw.surf(96,32,16,16,gorro.x,gorro.y,16,16)
|
||||
local x = gorro_gif_col*cw
|
||||
local y = gorro_gif_row*ch
|
||||
draw.surf(x,y,cw,ch,gorro.x*o2aX,gorro.y*o2aX,cw,ch)
|
||||
end
|
||||
|
||||
function gorro.update()
|
||||
|
||||
15
data/gps.lua
15
data/gps.lua
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
gps_gif_col = 7
|
||||
gps_gif_row = 3
|
||||
|
||||
gps={hab=5,x=48,y=24,bb={x=0,y=0,w=8,h=8}}
|
||||
|
||||
function gps.init()
|
||||
@@ -10,7 +20,10 @@ function gps.init()
|
||||
end
|
||||
|
||||
function gps.draw()
|
||||
draw.surf(112,48,16,16,gps.x,gps.y,16,16)
|
||||
-- draw.surf(112,48,16,16,gps.x,gps.y,16,16)
|
||||
local x = gps_gif_col*cw
|
||||
local y = gps_gif_row*ch
|
||||
draw.surf(x,y,cw,ch,gps.x*o2aX,gps.y*o2aX,cw,ch)
|
||||
end
|
||||
|
||||
function gps.update()
|
||||
|
||||
@@ -52,7 +52,7 @@ end
|
||||
function imp.draw()
|
||||
if imp.enabled then
|
||||
-- draw.surf((imp.frame&7)*16,(imp.frame>>3)*16,16,16,imp.x,imp.y,16,16,imp.flip)
|
||||
draw.surf((imp.frame&7)*cw,(imp.frame>>cxr2)*ch,cw,ch,imp.x*o2aX,imp.y*o2aX,cw,ch,flip)
|
||||
draw.surf((imp.frame&7)*cw,(imp.frame>>cxr2)*ch,cw,ch,imp.x*o2aX,imp.y*o2aX,cw,ch,imp.flip)
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
13
data/peu.lua
13
data/peu.lua
@@ -1,3 +1,13 @@
|
||||
local arcade_config = require("arcade_config")
|
||||
o2aX = arcade_config.org2arc_escala
|
||||
cxr = arcade_config.character_per_row-1
|
||||
cxr2 = arcade_config.character_per_row_base2
|
||||
cw = arcade_config.character_width
|
||||
ch = arcade_config.character_height
|
||||
-- posició en el gif
|
||||
peu_gif_col = 7
|
||||
peu_gif_row = 2
|
||||
|
||||
peu={hab=5,x=48,y=24,bb={x=0,y=0,w=8,h=8}}
|
||||
|
||||
function peu.init()
|
||||
@@ -11,6 +21,9 @@ end
|
||||
|
||||
function peu.draw()
|
||||
draw.surf(112,32,16,16,peu.x,peu.y,16,16)
|
||||
local x = peu_gif_col*cw
|
||||
local y = peu_gif_row*ch
|
||||
draw.surf(x,y,cw,ch,peu.x*o2aX,peu.y*o2aX,cw,ch)
|
||||
end
|
||||
|
||||
function peu.update()
|
||||
|
||||
Reference in New Issue
Block a user