Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local types = {
- [0] = "+5",
- [1] = "Invinc.",
- [2] = "Key",
- [3] = "+2",
- [4] = "Shoes",
- [5] = "W3",
- [6] = "W1",
- [7] = "-2",
- [9] = "W2"
- }
- emu.addEventCallback(function ()
- local x = (emu.read(0x333, emu.memType.cpuDebug)*0x100) + ((emu.read(0x332, emu.memType.cpuDebug)-0x20)*8) + (emu.read(0x334, emu.memType.cpuDebug)%8)
- if (x>=0) then
- emu.drawRectangle(-1,33,(x/15)-2,5,0x50A0FF,0x50A0FF)
- for i=0,63 do
- local p = 0xB9e0+i*4
- local px = (emu.read(p,emu.memType.cpuDebug)*16) + math.floor(emu.read(p+1, emu.memType.cpuDebug)/16)
- local py = emu.read(p+1,emu.memType.cpuDebug)%16
- local pt = emu.read(p+2,emu.memType.cpuDebug)
- if (px>=256) then break end
- emu.drawRectangle(px*16-x,py*16+40,15,25,0)
- if (types[pt]) then
- emu.drawString(px*16-x+1,py*16+41,types[pt])
- else
- emu.drawString(px*16-x+1,py*16+41,pt)
- end
- end
- end
- end, emu.eventType.nmi)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement