$80:B1EC: Difference between revisions
Content deleted Content added
Piranhaplant (talk | contribs) Created page with "{{Infobox ROM address|length=0x32|type=Code|name=getDirectionToTargetPosition|description=Gets the direction from the given sprite to the given target position. (Bugged, see notes)|args=A = [pointer16] sprite<br/>X = [int16] target X position<br/>Y = [int16] target Y position<br/>Returns A = [direction] direction to target|ret_type=RTL}} Note: This subroutine is bugged to not consider the Y components, so will only return left, right, or none. The bug happens due to a T..." |
Piranhaplant (talk | contribs) No edit summary |
||
Line 2: | Line 2: | ||
Note: This subroutine is bugged to not consider the Y components, so will only return left, right, or none. The bug happens due to a TXA instruction at $80:B208 that should have been a TAX instruction. |
Note: This subroutine is bugged to not consider the Y components, so will only return left, right, or none. The bug happens due to a TXA instruction at $80:B208 that should have been a TAX instruction. |
||
[[Category:Bug]] |
Latest revision as of 20:30, 14 July 2024
ROM address data | |
---|---|
Length | 0x32 |
Type | Code |
Name | getDirectionToTargetPosition |
Description | Gets the direction from the given sprite to the given target position. (Bugged, see notes) |
Arguments/Return value | A = [pointer16] sprite X = [int16] target X position Y = [int16] target Y position Returns A = [direction] direction to target |
Return type | RTL |
Note: This subroutine is bugged to not consider the Y components, so will only return left, right, or none. The bug happens due to a TXA instruction at $80:B208 that should have been a TAX instruction.