User File #52354090797179302

Upload All User Files

#52354090797179302 - Gimmick! lua

Gimmick!.lua
855 downloads
Uploaded 1/5/2019 6:20 PM by TASeditor (see all 188)
function Main()

	--xOnS = memory.readbyte(0x0004)
	--yOnS = memory.readbyte(0x0002)
	
	status = memory.readbyte(0x0090)
	
	xPos = memory.readbyte(0x00B8)
	yPos = memory.readbyte(0x00A4)
	xSub = memory.readbyte(0x00AE)
	ySub = memory.readbyte(0x009A)
	
	xSpd = memory.readbytesigned(0x00CC)
	ySpd = memory.readbytesigned(0x00C2)
	
	dir = memory.readbyte(0x030A)
	
	--yHtbx = memory.readbyte(0x0314)
	

	
	--xCam = memory.readbyte(0x00FD)
	xCam = memory.readword(0x0014)
	yCam = memory.readbyte(0x0016)*256*16
	
	statusS = memory.readbytesigned(0x0091)
	xPosS = memory.readbyte(0x00B9)
	yPosS = memory.readbyte(0x00A5)
	xSubS = memory.readbyte(0x00AF)
	ySubS = memory.readbyte(0x009B)
	
	xSpdS = memory.readbytesigned(0x00CD)
	ySpdS = memory.readbytesigned(0x00C3)
	
	
	for i = 0, 10, 1 do
	
	-- 	
	--7c
	--86
		local status = memory.readbyte(0x0090+i)
		local ySub = memory.readbyte(0x009A+i)	
		local yPos = memory.readbyte(0x00A4+i)
		local xSub = memory.readbyte(0x00AE+i)
		local xPos = memory.readbyte(0x00B8+i)	
		local ySpd = memory.readbytesigned(0x00C2+i)
		local xSpd = memory.readbytesigned(0x00CC+i)
	--d6
		
		local dir = memory.readbyte(0x030A+i)
		local yHtbx = memory.readbyte(0x0314+i)
		--31e
		local xHtbx = memory.readbyte(0x0328+i)
		--33c ?
		local health = memory.readbyte(0x0346+i)
		local movement = memory.readbytesigned(0x035A+i)
		local animation = memory.readbyte(0x0382+i)
		
		local xDraw = (xPos*256+xSub-xCam)/16
		local yDraw = (yPos*256+ySub-yCam)/16
		
		--gui.text(xDraw, yDraw, ""..health)
		gui.box(xDraw, yDraw, xDraw-xHtbx/16, yDraw-yHtbx/16, "#FF000099", "#FF000099")
		
		--gui.text(100, 20+8*i, status.."   "..health.."   "..xPos+xSub.."   "..yPos+ySub)
	---	gui.text(150, 20+8*i, status)
	--	gui.text(173, 20+8*i, health)
	--	gui.text(196, 20+8*i, xPos*256+xSub)
	--	gui.text(229, 20+8*i, yPos*256+ySub)
		
	end
	--gui.text(150, 10, "s   h   x     y")
	
	gui.box(2, 10, 204, 60, "#FFFFFFA0", "#FFFFFFFF")
	gui.text(6, 14, "X Speed: "..xSpd, "#000000FF", "#FF000070")
	gui.text(6, 22, "Y Speed: "..ySpd, "#000000FF", "#00FF0070")
	gui.text(6, 32, "X Position: "..(xPos*256+xSub), "#000000FF", "#FF000070")
	gui.text(6, 40, "Y Position: "..(yPos*256+ySub), "#000000FF", "#00FF0070")
	gui.text(6, 50, "Status: "..status, "#000000FF", "#00000020")
	
	gui.text(106, 14, "X Speed: "..xSpdS, "#000000FF", "#FF000070")
	gui.text(106, 22, "Y Speed: "..ySpdS, "#000000FF", "#00FF0070")
	gui.text(106, 32, "X Position: "..(xPosS*256+xSubS), "#000000FF", "#FF000070")
	gui.text(106, 40, "Y Position: "..(yPosS*256+ySubS), "#000000FF", "#00FF0070")
	gui.text(106, 50, "Status: "..statusS, "#000000FF", "#00000020")

end

emu.registerafter(Main)