Replace hardware_constants.asm with the community-standard hardware.inc 5.0 (#1186)

This commit is contained in:
Rangi
2025-06-23 09:11:33 -04:00
committed by GitHub
parent ae7ee67d21
commit 4c540aa43b
149 changed files with 3444 additions and 3103 deletions

View File

@@ -318,7 +318,7 @@ AddOrSubtractY:
push hl
ld a, [hl]
ld hl, wCurSpriteOAMFlags
bit OAM_Y_FLIP, [hl]
bit B_OAM_YFLIP, [hl]
jr z, .ok
; -8 - a
add 8
@@ -333,7 +333,7 @@ AddOrSubtractX:
push hl
ld a, [hl]
ld hl, wCurSpriteOAMFlags
bit OAM_X_FLIP, [hl]
bit B_OAM_XFLIP, [hl]
jr z, .ok
; -8 - a
add 8
@@ -349,10 +349,10 @@ GetSpriteOAMAttr:
ld b, a
ld a, [hl]
xor b
and PRIORITY | Y_FLIP | X_FLIP
and OAM_PRIO | OAM_YFLIP | OAM_XFLIP
ld b, a
ld a, [hl]
and ~(PRIORITY | Y_FLIP | X_FLIP)
and ~(OAM_PRIO | OAM_YFLIP | OAM_XFLIP)
or b
ret
@@ -437,7 +437,7 @@ GetSpriteAnimFrame:
push af
ld a, [hl]
push hl
and ~(Y_FLIP << 1 | X_FLIP << 1)
and ~(OAM_YFLIP << 1 | OAM_XFLIP << 1)
ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET
add hl, bc
add [hl]
@@ -447,7 +447,7 @@ GetSpriteAnimFrame:
pop hl
.okay
ld a, [hl]
and Y_FLIP << 1 | X_FLIP << 1 ; The << 1 is compensated in the "oamframe" macro
and OAM_YFLIP << 1 | OAM_XFLIP << 1 ; The << 1 is compensated in the "oamframe" macro
srl a
ld [wCurSpriteOAMFlags], a
pop af