forked from JailDoctor/cacaus
Modificat l'ull de l'abad a l'ajupir-se, factoritzat draw_photo() en scenes.lua, i canviat el config de game.ini
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
title=X2 Cacaus
|
title=X2 Cacaus
|
||||||
config=cacaus
|
config=x2cacaus
|
||||||
width=256
|
width=256
|
||||||
height=192
|
height=192
|
||||||
zoom=3
|
zoom=3
|
||||||
|
|||||||
@@ -14,9 +14,6 @@ avatar_premiere_x = 69*o2aX
|
|||||||
avatar_premiere_y = 20*o2aX
|
avatar_premiere_y = 20*o2aX
|
||||||
avatar_elalien_x = 3*o2aX
|
avatar_elalien_x = 3*o2aX
|
||||||
avatar_elalien_y = 16*o2aX
|
avatar_elalien_y = 16*o2aX
|
||||||
avatar_w = 10*o2aX
|
|
||||||
avatar_h = 10*o2aX
|
|
||||||
|
|
||||||
|
|
||||||
scenes={
|
scenes={
|
||||||
intro_01= {
|
intro_01= {
|
||||||
@@ -180,6 +177,37 @@ function playtext(snd)
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function draw_photo ( photo_x, photo_y, flip, step )
|
||||||
|
local photo_w = 11*o2aX
|
||||||
|
local photo_h = 10*o2aX
|
||||||
|
|
||||||
|
local bkg_x = 8*o2aX
|
||||||
|
local bkg_y = 12*o2aX
|
||||||
|
local bkg_w = photo_w*2+2
|
||||||
|
local bkg_h = photo_h*2+2
|
||||||
|
local bkg_color = 16
|
||||||
|
|
||||||
|
if flip then
|
||||||
|
bkg_x = 96*o2aX+1
|
||||||
|
end
|
||||||
|
|
||||||
|
if step==3 then
|
||||||
|
bkg_y = 12*o2aX
|
||||||
|
bkg_h = 12*o2aX
|
||||||
|
elseif step==4 or step==8 then
|
||||||
|
bkg_y = 7*o2aX
|
||||||
|
bkg_h = photo_h*2+2
|
||||||
|
end
|
||||||
|
|
||||||
|
local photo_dx = bkg_x+1
|
||||||
|
local photo_dy = bkg_y+1
|
||||||
|
local photo_dw = bkg_w-2
|
||||||
|
local photo_dh = bkg_h-2
|
||||||
|
|
||||||
|
draw.rectf(bkg_x,bkg_y,bkg_w,bkg_h,bkg_color)
|
||||||
|
draw.surf(photo_x,photo_y,photo_w,photo_h,photo_dx,photo_dy,photo_dw,photo_dh, flip)
|
||||||
|
end
|
||||||
|
|
||||||
function draw_scene()
|
function draw_scene()
|
||||||
local txt_x = not scenes.current_scene[scenes.dnum].flip and 38 or 8
|
local txt_x = not scenes.current_scene[scenes.dnum].flip and 38 or 8
|
||||||
|
|
||||||
@@ -197,21 +225,9 @@ function draw_scene()
|
|||||||
draw.line(0,0,128*o2aX,0,16)
|
draw.line(0,0,128*o2aX,0,16)
|
||||||
draw.line(0,34*o2aX+1,128*o2aX,34*o2aX+1,16)
|
draw.line(0,34*o2aX+1,128*o2aX,34*o2aX+1,16)
|
||||||
elseif scenes.step==3 then
|
elseif scenes.step==3 then
|
||||||
if not scenes.current_scene[scenes.dnum].flip then
|
draw_photo ( scenes.current_scene[scenes.dnum].x, scenes.current_scene[scenes.dnum].y, scenes.current_scene[scenes.dnum].flip, scenes.step)
|
||||||
draw.rectf(8*o2aX,12*o2aX,24*o2aX,12*o2aX,16)
|
|
||||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,9*o2aX,13*o2aX,20*o2aX,10*o2aX)
|
|
||||||
else
|
|
||||||
draw.rectf(97*o2aX,12*o2aX,24*o2aX,12*o2aX,16)
|
|
||||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,98*o2aX,13*o2aX,20*o2aX,10*o2aX,true)
|
|
||||||
end
|
|
||||||
elseif scenes.step==4 then
|
elseif scenes.step==4 then
|
||||||
if not scenes.current_scene[scenes.dnum].flip then
|
draw_photo ( scenes.current_scene[scenes.dnum].x, scenes.current_scene[scenes.dnum].y, scenes.current_scene[scenes.dnum].flip, scenes.step)
|
||||||
draw.rectf(8*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
|
||||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,9*o2aX,8*o2aX,20*o2aX,20*o2aX)
|
|
||||||
else
|
|
||||||
draw.rectf(97*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
|
||||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,98*o2aX,8*o2aX,20*o2aX,20*o2aX,true)
|
|
||||||
end
|
|
||||||
elseif scenes.step==5 then
|
elseif scenes.step==5 then
|
||||||
-- text(string.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x*o2aX,7*o2aX,2)
|
-- text(string.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x*o2aX,7*o2aX,2)
|
||||||
-- view.origin(0,scenes.offset-20) -- Ni idea de perquè 38, o es 19*o2aX?
|
-- view.origin(0,scenes.offset-20) -- Ni idea de perquè 38, o es 19*o2aX?
|
||||||
@@ -249,17 +265,17 @@ function draw_scene()
|
|||||||
draw.rectf(0,0,129*o2aX,35*o2aX,12)
|
draw.rectf(0,0,129*o2aX,35*o2aX,12)
|
||||||
draw.line(0,0,128*o2aX,0,16)
|
draw.line(0,0,128*o2aX,0,16)
|
||||||
draw.line(0,34*o2aX+1,128*o2aX,34*o2aX+1,16)
|
draw.line(0,34*o2aX+1,128*o2aX,34*o2aX+1,16)
|
||||||
if not scenes.current_scene[scenes.dnum].flip then
|
draw_photo ( scenes.current_scene[scenes.dnum].x, scenes.current_scene[scenes.dnum].y, scenes.current_scene[scenes.dnum].flip, scenes.step)
|
||||||
draw.rectf(8*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
-- if not scenes.current_scene[scenes.dnum].flip then
|
||||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,9*o2aX,8*o2aX,20*o2aX,20*o2aX)
|
-- draw.rectf(8*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
||||||
else
|
-- draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,9*o2aX,8*o2aX,20*o2aX,20*o2aX)
|
||||||
draw.rectf(97*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
-- else
|
||||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,98*o2aX,8*o2aX,20*o2aX,20*o2aX,true)
|
-- draw.rectf(97*o2aX,7*o2aX,24*o2aX,22*o2aX,16)
|
||||||
end
|
-- draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,avatar_w,avatar_h,98*o2aX,8*o2aX,20*o2aX,20*o2aX,true)
|
||||||
|
-- end
|
||||||
-- text(scenes.current_scene[scenes.dnum].text[1],txt_x*o2aX,7*o2aX,2)
|
-- text(scenes.current_scene[scenes.dnum].text[1],txt_x*o2aX,7*o2aX,2)
|
||||||
-- text(scenes.current_scene[scenes.dnum].text[2],txt_x*o2aX,15*o2aX,2)
|
-- text(scenes.current_scene[scenes.dnum].text[2],txt_x*o2aX,15*o2aX,2)
|
||||||
-- text(scenes.current_scene[scenes.dnum].text[3],txt_x*o2aX,23*o2aX,2)
|
-- text(scenes.current_scene[scenes.dnum].text[3],txt_x*o2aX,23*o2aX,2)
|
||||||
-- view.origin(0,scenes.offset-20) -- Ni idea de perquè 38, o es 19*o2aX?
|
|
||||||
arc_textB(scenes.current_scene[scenes.dnum].text[1],txt_x*o2aX,7*o2aX,2)
|
arc_textB(scenes.current_scene[scenes.dnum].text[1],txt_x*o2aX,7*o2aX,2)
|
||||||
arc_textB(scenes.current_scene[scenes.dnum].text[2],txt_x*o2aX,15*o2aX,2)
|
arc_textB(scenes.current_scene[scenes.dnum].text[2],txt_x*o2aX,15*o2aX,2)
|
||||||
arc_textB(scenes.current_scene[scenes.dnum].text[3],txt_x*o2aX,23*o2aX,2)
|
arc_textB(scenes.current_scene[scenes.dnum].text[3],txt_x*o2aX,23*o2aX,2)
|
||||||
|
|||||||
BIN
data/tiles.gif
BIN
data/tiles.gif
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 12 KiB |
Reference in New Issue
Block a user