- [NEW] Ara cada actor pot tindre la seua propia surface.
- [WRK] Treballant en el editor de jailmojis.
This commit is contained in:
@@ -3,14 +3,22 @@ actors={
|
||||
updating=false,
|
||||
main={},
|
||||
under_cursor="",
|
||||
surface=0,
|
||||
should_free_surf=false,
|
||||
|
||||
init=function()
|
||||
for i,actor in ipairs(actors.list) do
|
||||
if actor.should_free_surf then
|
||||
surf.free(actor.surface)
|
||||
end
|
||||
end
|
||||
actors.list={}
|
||||
actors.updating=false
|
||||
end,
|
||||
|
||||
add=function(actor)
|
||||
actor.dx,actor.dy=0,0
|
||||
actor.surface=surf.load("sprites.gif")
|
||||
table.insert(actors.list, actor)
|
||||
end,
|
||||
|
||||
@@ -60,7 +68,8 @@ actors={
|
||||
actors.under_cursor=v.name
|
||||
pal.subpal(1,16,8)
|
||||
end
|
||||
|
||||
|
||||
surf.source(v.surface)
|
||||
if v.o=='u' then
|
||||
draw.surf(v.gfx.x+frame,v.gfx.y+16,16,16,x*8+v.dx*2,y*8-12+v.dy*2,16,16,v.dy>1)
|
||||
elseif v.o=='d' then
|
||||
|
||||
Reference in New Issue
Block a user