Advertisement
JoeStrout

TileDisplay oddRowOffset demo

Mar 29th, 2025
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | Source Code | 0 0
  1. import "chars"
  2. import "stringUtil"
  3.  
  4. clear
  5. display(4).mode = displayMode.tile
  6. td = display(4)
  7. td.tileSet = file.loadImage("/sys/pics/Block.png")
  8. td.tileSetTileSize = [td.tileSet.width, td.tileSet.height]
  9. td.cellSize = [64,32]
  10. td.extent = [12,10]
  11. td.scrollY = -32
  12. td.clear 0
  13.  
  14. text.row = 0
  15. print "Press {left} and {right} to change the offset.".fill(chars), ""
  16.  
  17. while true
  18. text.row = 15; text.column = 10
  19. print "td.oddRowOffset: " + round(td.oddRowOffset, 2) + " "
  20. k = key.get.code
  21. if k == 27 then break
  22. if k == 17 then
  23. td.oddRowOffset -= 0.1
  24. else if k == 18 then
  25. td.oddRowOffset += 0.1
  26. end if
  27. end while
  28.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement