Files
jailsadventure2/data/main.lua

58 lines
1.1 KiB
Lua

function _init()
menu_option=0
sprites=loadsurf("sprites.gif")
objectes=loadsurf("objects.gif")
tiles=loadsurf("tiles.gif")
setsource(tiles)
local pal=loadpal("tiles.gif")
setpal(pal)
beat(6)
fade.init()
main_init()
end
function _update()
update()
end
function text(txt,x,y,col)
color(6)
prnt(txt,x-1,y-1)
prnt(txt,x,y-1)
prnt(txt,x+1,y-1)
prnt(txt,x-1,y)
prnt(txt,x+1,y)
prnt(txt,x-1,y+1)
prnt(txt,x,y+1)
prnt(txt,x+1,y+1)
color(col)
prnt(txt,x,y)
end
function main_init()
set_update(menu_update)
second_menu = {{"PEIV", function() end},{"TORNAR",show_main_menu}}
main_menu = { {"JUGAR", game.restart}, {"EDITOR", editor.init}, {"EIXIR", quit}, {"TEST", function() menu.show(second_menu) end } }
show_main_menu()
end
function show_main_menu()
menu.show(main_menu)
end
function set_update(new_update)
update=new_update
end
function menu_update()
cls()
color(1)
prnt("JAIL'S ADVENTURE 2",10,10)
end
function getkeyval(str)
local c1,c2=string.find(str,"=")
return string.sub(str,1,c1-1), string.sub(str,c2+1)
end