Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = {0,0,0,0}
- local c = {0,0,0,0}
- p[2] = memory.readword(0x10c,0x10d) + memory.readbyte(0x10b)/256
- p[4] = memory.readword(0x109,0x10a) + memory.readbyte(0x108)/256
- c[2] = memory.readword(0x66,0x67) + memory.readbyte(0x65)/256
- c[4] = memory.readword(0x63,0x64) + memory.readbyte(0x62)/256
- local function objects()
- for i = 0, 4 do
- if memory.readbyte(0x50e+i*0x15) ~= 0 then
- --sub x and sub y not added.
- gui.text(memory.readword(0x517+i*0x15,0x518+i*0x15)-c[1],memory.readword(0x514+i*0x15,0x515+i*0x15)-c[3],string.format("x %3d\nsuby %3d\nsubx %3d",memory.readword(0x517+i*0x15,0x518+i*0x15)-c[1],memory.readbyte(0x513+i*0x15),memory.readbyte(0x520+i*0x15)),"#ffffff","#00000060")
- end
- end
- end
- local function Stuff()
- p[1] = memory.readword(0x10c,0x10d) + memory.readbyte(0x10b)/256
- p[3] = memory.readword(0x109,0x10a) + memory.readbyte(0x108)/256
- c[1] = memory.readword(0x66,0x67) + memory.readbyte(0x65)/256
- c[3] = memory.readword(0x63,0x64) + memory.readbyte(0x62)/256
- gui.text(2,35,string.format("CX %.2f\nCY %.2f (%.2f)\nX %.2f (%.2f)\nY %.3f (%.2f)\nJump: %2d",c[1],c[3],c[3]-c[4],p[1],p[1]-p[2],p[3],p[3]-p[4],memory.readbyte(0x102)),"#ffffff","#00000060")
- p[2] = p[1] - p[2]
- p[4] = p[3] - p[4]
- c[2] = c[1] - c[2]
- c[4] = c[3] - c[4]
- p[2] = p[1]
- p[4] = p[3]
- c[2] = c[1]
- c[4] = c[3]
- objects()
- end
- emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment