Thanks for the help so far. I didn't find any hitbox data near the position address of an enemy in Kirby & The Amazing Mirror though... But there are some more games that I want to look into and maybe I'll get lucky with some.
I can't find the hitbox data when it's in the ROM or calculated on the fly because - as said - I'm no good at disassembling and such things..
Also, please tell me why your lua script will help find the hitbox. Isn't it just another way to search the memory? I could simply use VBA's memory search for that..
EDIT:
In fact, I went ahead and tried to make a script for Mario Land 1. But this needs a lot of improving..
I had to rely on a lot of dirty edits (/3 to hitbox, variable a, -8 to ypos) to make it work halfway..
Language: lua
while true do
for i = 0xD100, 0xD19F, 16 do
if memory.readbytesigned(i) ~= -1 then
local ypos = memory.readbyte(i+2)-8
local xpos = memory.readbyte(i+3)
local movedirection = memory.readbytesigned(i+5) -- 0:left 1:right
local hitbox1 = memory.readbyte(i+10)
local hitbox2 = hitbox1/3
local typenumber = memory.readbytesigned(i+7)
local typename = ""
local a = 0
if hitbox1 > 47 then a = 16
elseif hitbox1 > 31 then a = 8 end
gui.drawbox(xpos+a,ypos,xpos-hitbox2,ypos-hitbox2, "", "green")
gui.text(10,10,xpos .. " ".. ypos .." ".. hitbox1)
gui.drawpixel(xpos,ypos, "red")
end
end
vba.frameadvance()
end