Advertisement
MrCheeze

spaceworld_partydata_visualizer.lua

Jul 30th, 2018
399
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.93 KB | None | 0 0
  1. src="C:/Users/Matt/Documents/Games/smw/BizHawk/Lua/proto2.png"
  2. charset="C:/Users/Matt/Documents/Games/smw/BizHawk/Lua/charset.png"
  3.  
  4. client.SetGameExtraPadding(8,8,160,8)
  5. memory.usememorydomain("SGB WRAM")
  6. party = 0x16B2
  7.  
  8. while true do
  9.     gui.drawImage(src,0,0)
  10.    
  11.     for p=0,6 do
  12.         if p < 6 then
  13.             gui.drawRectangle(279,31+28*p,129,25,0xFF808080)
  14.         else
  15.             gui.drawRectangle(279,31+28*p,129,25,0xFFC0C0C0)
  16.         end
  17.         for i=0,0x02 do
  18.             for j=0,0x0F do
  19.                 data = memory.readbyte(0x16B2+j+i*0x10+p*0x30)
  20.                 if data ~= 0 then
  21.                     x = bit.band(data,0x0F)*8
  22.                     y = bit.rshift(data,4)*8
  23.                     gui.drawImageRegion(charset,x,y,8,8,280+8*j,32+8*i+28*p)
  24.                     if data == 0x50 and ((i*0x10+j)%6==5) and memory.readbyte(0x16B2+j+i*0x10+p*0x30 - 5) < 0x80 and memory.readbyte(0x16B2+j+i*0x10+p*0x30 - 5) >= 0x40 then
  25.                         gui.drawRectangle(239+8*j,31+8*i+28*p,48,9,0xFFFF0000)
  26.                     end
  27.                 end
  28.             end
  29.         end
  30.     end
  31.    
  32.     emu.frameadvance()
  33. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement