There is a bug in original code where the hash for random object animations is precalculated. Instead of reading the map width with Map_width(a0)
, it just directly uses Map_width
as a value which is an offset and has value 4. See:
https://github.com/jhorneman/ambermoon/blob/52e36804e1f211330d884a79ecc5559138c4974d/src/MAP/3D_MAP.S#L2500