Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local p = { 0,memory.readword(0x481,0x482) + memory.readbyte(0x480)/256,
- 0,memory.readword(0x487,0x488) + memory.readbyte(0x486)/256}
- local c = { 0,memory.readword(0x41,0x42),
- 0,memory.readword(0x52,0x53)}
- local function PlayerHUD()
- gui.text(p[1]-c[1],p[3]-c[3],string.format("x pos %.2f",p[1]-c[1]),"#ffffff","#00000060")
- end
- local function objects()
- for i = 0, 15 do
- gui.text(200,1+i*8,string.format("%3d %3d",memory.readbyte(0x4d0+i),memory.readbyte(0x4e0+i)),"#ffffff","#00000060")
- end
- end
- local function cutscene()
- if memory.readbyte(0x388) ~= 0 then
- gui.text(80,2,string.format("State: %d\nDelay timer: %d\nCharacters printed: %d\n",
- memory.readbyte(0x388),memory.readbyte(0x38b),memory.readbyte(0x3a7)),"#ffffff","#00000060")
- end
- end
- local function Stuff()
- p[1] = memory.readword(0x481,0x482) + memory.readbyte(0x480)/256
- p[3] = memory.readword(0x487,0x488) + memory.readbyte(0x486)/256
- c[1] = memory.readword(0x41,0x42)
- c[3] = memory.readword(0x52,0x53)
- gui.text(2,10,string.format("Boss hp: %d",memory.readbyte(0x8e)),"#ffffff","#00000060")
- gui.text(2,35,string.format("CX %.2f\nCY %.2f (%.2f)\nX %.2f (%.2f)\nY %.3f (%.2f)",c[1],c[3],c[3]-c[4],p[1],p[1]-p[2],p[3],p[3]-p[4]),"#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]
- cutscene()
- objects()
- PlayerHUD()
- end
- emu.registerafter(Stuff)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement