Banner
Views: 934,035,850
Time:
10 users online: Alice3173, Francium, Hwailaluta, Infinity, Israelcv12cv, MarioFan22, Paperdomo101, Phyll, Slash-18, xyz600sp - Guests: 62 - Bots: 250 Users: 52,112 (2,123 active)
Latest: bob_ahhh123
Tip: After editing your overworld, make sure to use an EMPTY save file, as save files with progress may load Mario's position based on previous versions of the overworld. Note that altered level flags will also only take effect on new save files.
Not logged in.
$03B72B by HammerBrother
Forum Index - Valley of Bowser - Moderation Questions - ROM Map - $03B72B by HammerBrother
Pages: « 1 » Link
Address Length Type Description Submitter
$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.
HammerBrother
Detail: Input values and destroyed values
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;This subroutine checks if the two hitboxes of A and B to see if they are in contact.
;Carry is set if true, else false.
;Syntax:
; $00 = X low byte position/displacement B
; $01 = Y low byte position/displacement B
; $02 = Hitbox width (8-bit) B
; $03 = Hitbox height (8-bit) B
; $04 = X low byte position/displacement A
; $05 = Y low byte position/displacement A
; $06 = Hitbox width (8-bit) A
; $07 = Hitbox height (8-bit) A
; $08 = X high byte position/displacement B
; $09 = Y high byte position/displacement B
; $0A = X high byte position/displacement A
; $0B = Y high byte position/displacement A
;Destroyed values:
; $0C = used as part of the high byte to check if they are too far
; $0F = used as the furthest distance to check if the hitboxes are at least edge
; to edge on contact.
An update was submitted and approved.
Pages: « 1 » Link
Forum Index - Valley of Bowser - Moderation Questions - ROM Map - $03B72B by HammerBrother

The purpose of this site is not to distribute copyrighted material, but to honor one of our favourite games.

Copyright © 2005 - 2021 - SMW Central
Legal Information - Privacy Policy - Link To Us


Menu

Follow Us On

  • YouTube
  • Twitch
  • Twitter

Affiliates

  • Super Mario Bros. X Community
  • ROMhacking.net
  • Mario Fan Games Galaxy
  • sm64romhacks