- [NEW] Adaptat a l'última versió de mini (1.5.dev)
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 2.8 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
@@ -22,7 +22,7 @@ function me.draw()
|
||||
|
||||
local sel = me.selected
|
||||
view.origin(0,me.pos_y)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
local y = me.pos_y
|
||||
draw.rrectf(1,0,8,8,1,21)
|
||||
draw.rrectf(1,-1,8,8,1,6)
|
||||
|
||||
@@ -30,7 +30,7 @@ function rooms.convert(src)
|
||||
for rx=0,7 do
|
||||
for ty=0,11 do
|
||||
for tx=0,19 do
|
||||
surf.pixel(rx*20+tx, ry*13+ty, surf.pixel(rx*20+tx, ry*12+ty))
|
||||
draw.pixel(rx*20+tx, ry*13+ty, draw.pixel(rx*20+tx, ry*12+ty))
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -51,7 +51,7 @@ function me.draw()
|
||||
end
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
draw_text()
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@ editor = {
|
||||
-- Pintar el mapa i sprites
|
||||
rooms.draw()
|
||||
|
||||
--view.origin(0,0)
|
||||
|
||||
local mx, my = mouse.pos()
|
||||
local tx, ty = (mx>>3), (my>>3)
|
||||
mx, my = tx<<3, ty<<3
|
||||
@@ -283,7 +283,7 @@ editor = {
|
||||
surf.source(0)
|
||||
surf.target(editor.tilepicker.surf_back)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
app.push(editor.tilepicker.update_tiles)
|
||||
tweening.add(104,24,0.25,easing.easeOutCubic,function(value,n,finished)editor.tilepicker.pos_y=value end)
|
||||
@@ -297,7 +297,7 @@ editor = {
|
||||
surf.source(editor.tilepicker.surf_back)
|
||||
surf.target(0)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
|
||||
view.origin(8,editor.tilepicker.pos_y)
|
||||
@@ -353,7 +353,7 @@ editor = {
|
||||
surf.source(0)
|
||||
surf.target(editor.itempicker.surf_back)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
app.push(editor.itempicker.update_items)
|
||||
tweening.add(104,24,0.25,easing.easeOutCubic,function(value,n,finished)editor.itempicker.pos_y=value end)
|
||||
@@ -367,7 +367,7 @@ editor = {
|
||||
surf.source(editor.itempicker.surf_back)
|
||||
surf.target(0)
|
||||
view.origin(0,0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
draw.surf(0,0,160,104,0,0)
|
||||
|
||||
view.origin(8,editor.itempicker.pos_y)
|
||||
@@ -376,7 +376,7 @@ editor = {
|
||||
draw.text("CHOOSE ITEM:",8,2,17)
|
||||
|
||||
view.origin(16,editor.itempicker.pos_y+8-editor.itempicker.scroll)
|
||||
view.clip(16,editor.itempicker.pos_y+8,128,64)
|
||||
surf.clip(16,editor.itempicker.pos_y+8,128,64)
|
||||
|
||||
surf.source(surf_sprites)
|
||||
local mx, my = mouse.pos()
|
||||
@@ -404,7 +404,7 @@ editor = {
|
||||
local lift_y = math.floor(((64-lift_h)*editor.itempicker.scroll)/(y-64))
|
||||
|
||||
view.origin(16,editor.itempicker.pos_y+8)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
draw.rrectf(124,0,5,64,1,17)
|
||||
draw.rrectf(124,lift_y,5,lift_h,1,2)
|
||||
|
||||
@@ -60,7 +60,7 @@ game = {
|
||||
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
surf.target(game.back_buf)
|
||||
|
||||
@@ -104,7 +104,7 @@ game = {
|
||||
--if not sys.beat() then return end
|
||||
view.origin(0,0)
|
||||
surf.target(0)
|
||||
view.clip()
|
||||
surf.clip()
|
||||
|
||||
surf.target(game.back_buf)
|
||||
--view.clip()
|
||||
@@ -148,8 +148,8 @@ game = {
|
||||
for x=0,159 do
|
||||
local water_level = math.sin(game.water_counter)*2
|
||||
for y=88+water_level,104 do
|
||||
local pixel = surf.pixel(x,y)
|
||||
surf.pixel(x,y,game.water_pal[pixel+1])
|
||||
local pixel = draw.pixel(x,y)
|
||||
draw.pixel(x,y,game.water_pal[pixel+1])
|
||||
end
|
||||
end
|
||||
end
|
||||
@@ -165,15 +165,15 @@ game = {
|
||||
for y=0,103 do
|
||||
for x=0,159 do
|
||||
surf.source(game.back_buf)
|
||||
local pixel = surf.pixel(x,y)
|
||||
local pixel = draw.pixel(x,y)
|
||||
surf.source(game.circ_buf)
|
||||
local light = surf.pixel(x,y)
|
||||
local light = draw.pixel(x,y)
|
||||
if light==0 then
|
||||
surf.pixel(x,y,1)
|
||||
draw.pixel(x,y,1)
|
||||
elseif (light&2)==2 then
|
||||
surf.pixel(x,y,pixel)
|
||||
draw.pixel(x,y,pixel)
|
||||
else
|
||||
surf.pixel(x,y,game.fade_pal[pixel+1])
|
||||
draw.pixel(x,y,game.fade_pal[pixel+1])
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -30,7 +30,7 @@ end
|
||||
function me.update()
|
||||
local top = (160-me.w)//2
|
||||
local left = (104-me.h)//2
|
||||
view.clip(top, left, me.w, me.h)
|
||||
surf.clip(top, left, me.w, me.h)
|
||||
view.origin(top, left)
|
||||
draw.rrectf(0,0,me.w, me.h,4,27)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user