title.lua 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. TITLE = [===[
  2. ###### # #
  3. # # # # # # ###### ##### # # ###### #### # #
  4. # # # # # # # # # # # # # # #
  5. ###### # # # # ##### # ####### ##### # ####
  6. # # # # # # # # # # # # # #
  7. # # # # # # # # # # # # # # #
  8. ###### #### ###### ###### ###### # # # ###### #### # #
  9. Press any key to start
  10. Made by eq (eq.ed1.club), florrie (florrie.ed1.club),
  11. and alex (imalex.xyz) for Ludum Dare 41
  12. ]===]
  13. HELP = [===[
  14. Move around with:
  15. y k u q w e 7 8 9 > = enter stairway
  16. h l or a d or 4 6 . = stand still (skip turn)
  17. b j n z s x 1 2 3 ? = show/hide this menu
  18. g = show graphics options
  19. ]===]
  20. function drawTitle(title, text)
  21. local x, y = 4, math.ceil(HEIGHT / 3) - 3
  22. for i = 1, #title do
  23. local c = title:sub(i, i)
  24. if c == '\n' then
  25. x = 4
  26. y = y + 1
  27. else
  28. text[y][x] = {char = c}
  29. x = x + 1
  30. end
  31. end
  32. end