You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Document constants with comments, actual names, and more thorough usage
This commit is contained in:
@@ -38,9 +38,9 @@ FlagAction:: ; 0x2e76
|
||||
|
||||
; inputs:
|
||||
; b: function
|
||||
; 0 clear bit
|
||||
; 1 set bit
|
||||
; 2 check bit
|
||||
; 0 RESET_FLAG clear bit
|
||||
; 1 SET_FLAG set bit
|
||||
; 2 CHECK_FLAG check bit
|
||||
; de: bit number
|
||||
; hl: index within bit table
|
||||
|
||||
@@ -75,9 +75,9 @@ FlagAction:: ; 0x2e76
|
||||
|
||||
; check b's value: 0, 1, 2
|
||||
ld a, b
|
||||
cp 1
|
||||
jr c, .clearbit ; 0
|
||||
jr z, .setbit ; 1
|
||||
cp SET_FLAG
|
||||
jr c, .clearbit ; RESET_FLAG
|
||||
jr z, .setbit ; SET_FLAG
|
||||
|
||||
; check bit
|
||||
ld a, [hl]
|
||||
|
||||
@@ -2284,8 +2284,6 @@ GetWorldMapLocation:: ; 0x2caf
|
||||
; 0x2cbd
|
||||
|
||||
GetMapHeaderMusic:: ; 2cbd
|
||||
RADIO_TOWER_MUSIC EQU 7
|
||||
|
||||
push hl
|
||||
push bc
|
||||
ld de, 6 ; music
|
||||
|
||||
@@ -485,7 +485,7 @@ GetSpriteMovementFunction:: ; 1a2f
|
||||
ld e, a
|
||||
ld d, 0
|
||||
rept SPRITEMOVEDATA_FIELDS
|
||||
add hl,de
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hl]
|
||||
ret
|
||||
@@ -498,7 +498,7 @@ GetInitialFacing:: ; 1a47
|
||||
ld d, 0
|
||||
ld hl, SpriteMovementData + 1 ; init facing
|
||||
rept SPRITEMOVEDATA_FIELDS
|
||||
add hl,de
|
||||
add hl, de
|
||||
endr
|
||||
ld a, BANK(SpriteMovementData)
|
||||
call GetFarByte
|
||||
|
||||
Reference in New Issue
Block a user