Language…
20 users online: Aguiar Salsicha, elegist, Green, Hammerer, Heitor Porfirio, Maw, Metal-Yoshi94, playagmes169, ppp9q,  Saphros,  Sayuri, Silver_Revolver, SMW Magic, Sweetdude,  Telinc1, The_Uber_Camper, TheKazooBloccGosh, TheXander, tOaO,  yoshi3706 - Guests: 476 - Bots: 325
Users: 64,795 (2,374 active)
Latest user: mathew

SMW Memory Map

Displaying 1 out of 1 addresses.

View: moderated | waiting (13)

Filter

Link
  • Pages:
  • 1
ROM Address Length Type Description Details
$03B72B 49 bytes Sprite subroutine (JSL) “Check for contact” collision subroutine. Uses the values in scratch RAM set by $03B69F and either $03B6E5 or $03B664 (or occasionally custom values) to determine whether two sprites, or a sprite and the player, are in contact. If the carry flag is set after calling this, they are in contact.

It functions using the axis-aligned bounding box (AABB), it first checks if they are #$80 pixels apart, if they are, then the subroutine ends with carry clear, otherwise it then checks the total distance of their widths or height against their difference of their XY position, and if within range, carry is set.

Note: The XY position is the top left boundary of the box, and as the width and height increases, the box extends rightwards and downwards.
Input values and destroyed values Better, sorted format
  • Pages:
  • 1