Last active
January 7, 2017 22:06
-
-
Save undergroundmonorail/2ae51ae8aa5a2bc64103abb930ae9847 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; before | |
| .ballHorizontal | |
| ld a,[BallXVector] | |
| ld b,a | |
| ld a,[BallXAddr] | |
| add b | |
| .rightWall | |
| cp $98 | |
| jr z,.xFlip | |
| .leftWall | |
| cp $10 | |
| jr nz,.ballVertical | |
| .xFlip | |
| ... | |
| .ballVertical | |
| ... | |
| ; after | |
| .ballHorizontal | |
| ld a,[BallXVector] | |
| ld b,a | |
| ld a,[BallXAddr] | |
| add b | |
| .rightWall | |
| cp $98 | |
| jr z,.xFlip | |
| jr c,.leftWall | |
| sub $99 | |
| cpl | |
| add $98 | |
| jr z,.xFlip | |
| .leftWall | |
| cp $10 | |
| jr z,.xFlip | |
| jr nc,.doneXCollision | |
| sub $10 | |
| cpl | |
| add $11 | |
| .doneXCollision | |
| ld [BallXAddr],a | |
| .xFlip | |
| ... |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment