|
|
|
page_flip = 0
|
|
|
|
timer = 0
|
|
|
|
|
|
|
|
function bench_update()
|
|
|
|
if btnp(0) then
|
|
|
|
animate(letters_move_to(-10-80, 8+8, -10, 8))
|
|
|
|
change_screen(screen_letters)
|
|
|
|
end
|
|
|
|
if btnp(1) then
|
|
|
|
animate(recipe_list_move_to(30+80, 8+8, 30, 8))
|
|
|
|
change_screen(screen_recipe_list)
|
|
|
|
end
|
|
|
|
if btnp(2) then
|
|
|
|
animate(inventory_slide(0, inventory_drawer_height_max))
|
|
|
|
change_screen(screen_inventory)
|
|
|
|
end
|
|
|
|
if btnp(5) then
|
|
|
|
sfx(4)
|
|
|
|
change_screen(screen_walkaround)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
|
function bench_draw()
|
|
|
|
cls()
|
|
|
|
|
|
|
|
draw_background()
|
|
|
|
|
|
|
|
current_recipe = grimoire[page_idx]
|
|
|
|
|
|
|
|
outwards_x = 80
|
|
|
|
outwards_y = outwards_x/10
|
|
|
|
draw_paper(30+outwards_x, 8+outwards_y, 128, 128)
|
|
|
|
draw_recipe_on_paper(current_recipe, 30+outwards_x, 8+outwards_y)
|
|
|
|
decorate_recipe_unfinished(current_recipe, 30+outwards_x, 8+outwards_y)
|
|
|
|
|
|
|
|
draw_paper(letters_offset_x, letters_offset_y, 128, 128)
|
|
|
|
draw_letter_on_paper(letters[letter_idx], letters_offset_x+14, letters_offset_y+4)
|
|
|
|
|
|
|
|
draw_drawer()
|
|
|
|
end
|
|
|
|
|
|
|
|
screen_workbench = {draw=bench_draw, update=bench_update}
|
|
|
|
screen_workbench = screen_conversation({
|
|
|
|
{ph_p, "this is my workbench."},
|
|
|
|
{ph_p, "if you press left or right you can see my letters or recipes"},
|
|
|
|
{ph_p, "and the drawer where i keep ingredients is up top."},
|
|
|
|
{ph_p, "you can press ❎ to back out to the workbench."},
|
|
|
|
},
|
|
|
|
function()
|
|
|
|
screen_workbench = {draw=bench_draw, update=bench_update}
|
|
|
|
change_screen(screen_workbench)
|
|
|
|
end,
|
|
|
|
screen_workbench)
|