Amaraticando

lsnes - Lua script that causes the screenshot issue

May 21st, 2017
154
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.51 KB | None | 0 0
  1. function on_paint(flag)
  2.   -- Those cause the screenshot issue
  3.   gui.solidrectangle(0, 0, 512, 448, 0xb0000000)
  4.   gui.rectangle(-120, -120, 700, 700)
  5.  
  6.   -- Display Mario location for reference
  7.   local x = memory.readsword("WRAM", 0x94)
  8.   local y = memory.readsword("WRAM", 0x96)
  9.   local camx = memory.readsword("WRAM", 0x1462)
  10.   local camy = memory.readsword("WRAM", 0x1464)
  11.   gui.rectangle(2*(x - camx), 2*(y - camy), 32, 48)
  12. end
  13.  
  14. function on_post_load(name, was_savestate)
  15.   gui.repaint()
  16. end
  17.  
  18. gui.repaint()
Advertisement
Add Comment
Please, Sign In to add comment