- Passat a mini v1.3.6
This commit is contained in:
@@ -132,7 +132,7 @@ function start_scene(scene,offset)
|
||||
--bkg=newsurf(128,96)
|
||||
--setdest(bkg)
|
||||
--setsource(0)
|
||||
--blit(0,0,128,96,0,0)
|
||||
--draw.surf(0,0,128,96,0,0)
|
||||
--setsource(tiles)
|
||||
--setdest(0)
|
||||
scenes.current_scene=scene
|
||||
@@ -165,34 +165,34 @@ end
|
||||
|
||||
function draw_scene()
|
||||
local txt_x = not scenes.current_scene[scenes.dnum].flip and 38 or 8
|
||||
camera(0,-scenes.offset)
|
||||
view.origin(0,scenes.offset)
|
||||
if scenes.step==0 then
|
||||
rectfill(0,16,128,17,12)
|
||||
line(0,15,128,15,16)
|
||||
line(0,18,128,18,16)
|
||||
draw.rectf(0,16,129,2,12)
|
||||
draw.line(0,15,128,15,16)
|
||||
draw.line(0,18,128,18,16)
|
||||
elseif scenes.step==1 then
|
||||
rectfill(0,8,128,26,12)
|
||||
line(0,7,128,7,16)
|
||||
line(0,27,128,27,16)
|
||||
draw.rectf(0,8,129,19,12)
|
||||
draw.line(0,7,128,7,16)
|
||||
draw.line(0,27,128,27,16)
|
||||
elseif scenes.step==2 then
|
||||
rectfill(0,0,128,34,12)
|
||||
line(0,0,128,0,16)
|
||||
line(0,34,128,34,16)
|
||||
draw.rectf(0,0,129,35,12)
|
||||
draw.line(0,0,128,0,16)
|
||||
draw.line(0,34,128,34,16)
|
||||
elseif scenes.step==3 then
|
||||
if not scenes.current_scene[scenes.dnum].flip then
|
||||
rectfill(8,12,31,23,16)
|
||||
blit(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,13,20,10)
|
||||
draw.rectf(8,12,24,12,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,13,20,10)
|
||||
else
|
||||
rectfill(97,12,120,23,16)
|
||||
blit(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,13,20,10,true)
|
||||
draw.rectf(97,12,24,12,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,13,20,10,true)
|
||||
end
|
||||
elseif scenes.step==4 then
|
||||
if not scenes.current_scene[scenes.dnum].flip then
|
||||
rectfill(8,7,31,28,16)
|
||||
blit(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,8,20,20)
|
||||
draw.rectf(8,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,8,20,20)
|
||||
else
|
||||
rectfill(97,7,120,28,16)
|
||||
blit(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,8,20,20,true)
|
||||
draw.rectf(97,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,8,20,20,true)
|
||||
end
|
||||
elseif scenes.step==5 then
|
||||
text(string.sub(scenes.current_scene[scenes.dnum].text[1],1,scenes.char),txt_x,7,2)
|
||||
@@ -222,22 +222,22 @@ function draw_scene()
|
||||
scenes.char=1
|
||||
end
|
||||
elseif scenes.step==8 then
|
||||
rectfill(0,0,128,34,12)
|
||||
line(0,0,128,0,16)
|
||||
line(0,34,128,34,16)
|
||||
draw.rectf(0,0,129,35,12)
|
||||
draw.line(0,0,128,0,16)
|
||||
draw.line(0,34,128,34,16)
|
||||
if not scenes.current_scene[scenes.dnum].flip then
|
||||
rectfill(8,7,31,28,16)
|
||||
blit(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,8,20,20)
|
||||
draw.rectf(8,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,9,8,20,20)
|
||||
else
|
||||
rectfill(97,7,120,28,16)
|
||||
blit(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,8,20,20,true)
|
||||
draw.rectf(97,7,24,22,16)
|
||||
draw.surf(scenes.current_scene[scenes.dnum].x,scenes.current_scene[scenes.dnum].y,10,10,98,8,20,20,true)
|
||||
end
|
||||
text(scenes.current_scene[scenes.dnum].text[1],txt_x,7,2)
|
||||
text(scenes.current_scene[scenes.dnum].text[2],txt_x,15,2)
|
||||
text(scenes.current_scene[scenes.dnum].text[3],txt_x,23,2)
|
||||
end
|
||||
if scenes.step<=8 then scenes.step=scenes.step+1 end
|
||||
camera(0,0)
|
||||
view.origin(0,0)
|
||||
end
|
||||
|
||||
function update_scene()
|
||||
@@ -252,7 +252,7 @@ function update_scene()
|
||||
scenes.die=scenes.die-1
|
||||
if scenes.die==0 then
|
||||
if scenes.dnum==#scenes.current_scene then
|
||||
stopmusic()
|
||||
music.stop()
|
||||
if batman.endgame then
|
||||
final_init()
|
||||
fade.fadeoutin()
|
||||
@@ -266,30 +266,30 @@ function update_scene()
|
||||
end
|
||||
end
|
||||
else
|
||||
if math.floor(time()*2)%2==0 then
|
||||
blit(104,88,7,5,118,56)
|
||||
if math.floor(sys.time()*2)%2==0 then
|
||||
draw.surf(104,88,7,5,118,56)
|
||||
else
|
||||
rectfill(118,56,125,61,12)
|
||||
draw.rectf(118,56,8,6,12)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
if (btnp(KEY_ESCAPE) or padp(btnPause)) and (scenes.current_scene~=scenes.final) then
|
||||
if (key.press(key.ESCAPE) or pad.press(btnPause)) and (scenes.current_scene~=scenes.final) then
|
||||
if scenes.current_scene[scenes.dnum].die then
|
||||
game_init(true)
|
||||
else
|
||||
pause()
|
||||
end
|
||||
elseif btnp(KEY_M) then
|
||||
elseif key.press(key.M) then
|
||||
mute = not mute
|
||||
end
|
||||
|
||||
if scenes.step>8 then
|
||||
if btnp(keyShoot) or btnp(keyDown) or btnp(keyUp) or btnp(keyLeft) or btnp(keyRight) or btnp(KEY_RETURN) or
|
||||
padp(btnShoot) or padp(btnDown) or padp(btnUp) or padp(btnLeft) or padp(btnRight) then
|
||||
if key.press(keyShoot) or key.press(keyDown) or key.press(keyUp) or key.press(keyLeft) or key.press(keyRight) or key.press(key.RETURN) or
|
||||
pad.press(btnShoot) or pad.press(btnDown) or pad.press(btnUp) or pad.press(btnLeft) or pad.press(btnRight) then
|
||||
if scenes.dnum==#scenes.current_scene then
|
||||
stopmusic()
|
||||
music.stop()
|
||||
if batman.endgame then
|
||||
final_init()
|
||||
fade.fadeoutin()
|
||||
@@ -301,7 +301,7 @@ function update_scene()
|
||||
scenes.step=2
|
||||
end
|
||||
end
|
||||
elseif btnp(keyShoot) or padp(btnShoot) then
|
||||
elseif key.press(keyShoot) or pad.press(btnShoot) then
|
||||
scenes.step=8
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user