User File #33060189147098527

Upload All User Files

#33060189147098527 - Level1bonkers.lua

Level1bonkers.lua
Game: Bonkers ( Genesis, see all files )
701 downloads
Uploaded 8/19/2016 8:34 PM by netwizard (see all 2)
Hitboxes for donuts and enemies. Version 0.1
function box(hex)
	y1   = memory.read_s16_be(hex)
	y2   = memory.read_s16_be(hex+28)
	x2   = memory.read_s16_be(hex-2)
	x1   = memory.read_s16_be(hex+26)
	gui.drawBox (x1-camera    ,   y1, x2-camera, y2)
	gui.text (2*(x1-camera)+10, 2*y1, string.format("%x",hex))
end
while true do
	gui.cleartext()
	gui.clearGraphics()
	camera = memory.read_s16_be(0xc5ba)
	box(0x9370)
	box(0x97a8)
	box(0x985c)
	box(0x9910)
	box(0x99c4)
	box(0x9c94)
	box(0x9d48)
	box(0x9dfc)
	box(0x9eb0)
	box(0x9f64)
	box(0xa018)
	box(0xa0cc)
	box(0xa180)
	box(0xa234)
	box(0xa2e8)
	box(0xa39c)
	box(0xa450)
	box(0xa450)
	box(0xa5b8)
	box(0xa66c)
	box(0xa720)
	box(0xa7d4)
	box(0xa888)
	box(0xa93c)
	box(0xa9f0)
	box(0xab58)
	box(0xac0c)
	box(0xacc0)
	box(0xad74)
	box(0xae28)
	box(0xaf90)
	box(0xb0f8)
	box(0xb1ac)
	box(0xb260)
	
	xpos = memory.read_s16_be(0x8b16)
	gui.text(2*(xpos-camera)+10,300,xpos)
	gui.drawLine(xpos-camera,150,xpos-camera,200)
	emu.frameadvance()
end