You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Standardize on $ff ^ X for bitwise negating 8-bit values
This commit is contained in:
@@ -242,7 +242,7 @@ BattleAnim_ClearOAM:
|
|||||||
ld c, NUM_SPRITE_OAM_STRUCTS
|
ld c, NUM_SPRITE_OAM_STRUCTS
|
||||||
.loop
|
.loop
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and ~PALETTE_MASK & ~VRAM_BANK_1
|
and $ff ^ (PALETTE_MASK | VRAM_BANK_1)
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
rept SPRITEOAMSTRUCT_LENGTH + -1
|
rept SPRITEOAMSTRUCT_LENGTH + -1
|
||||||
inc hl
|
inc hl
|
||||||
|
@@ -171,7 +171,7 @@ BattleAnimOAMUpdate:
|
|||||||
or b
|
or b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wBattleAnimTempPalette]
|
ld a, [wBattleAnimTempPalette]
|
||||||
and (PRIORITY | Y_FLIP | X_FLIP | OBP_NUM) ^ $ff
|
and PALETTE_MASK | VRAM_BANK_1
|
||||||
or b
|
or b
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
|
@@ -37,7 +37,7 @@ GetBattleAnimFrame:
|
|||||||
push af
|
push af
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push hl
|
push hl
|
||||||
and (Y_FLIP << 1 | X_FLIP << 1) ^ $ff
|
and $ff ^ (Y_FLIP << 1 | X_FLIP << 1)
|
||||||
ld hl, BATTLEANIMSTRUCT_DURATION
|
ld hl, BATTLEANIMSTRUCT_DURATION
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
@@ -350,7 +350,7 @@ GetSpriteOAMAttr:
|
|||||||
and PRIORITY | Y_FLIP | X_FLIP
|
and PRIORITY | Y_FLIP | X_FLIP
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and (PRIORITY | Y_FLIP | X_FLIP) ^ $ff
|
and $ff ^ (PRIORITY | Y_FLIP | X_FLIP)
|
||||||
or b
|
or b
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@@ -436,7 +436,7 @@ GetSpriteAnimFrame:
|
|||||||
push af
|
push af
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push hl
|
push hl
|
||||||
and (Y_FLIP << 1 | X_FLIP << 1) ^ $ff
|
and $ff ^ (Y_FLIP << 1 | X_FLIP << 1)
|
||||||
ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET
|
ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET
|
||||||
add hl, bc
|
add hl, bc
|
||||||
add [hl]
|
add [hl]
|
||||||
|
@@ -1610,7 +1610,7 @@ endr
|
|||||||
Unknown_17da94:
|
Unknown_17da94:
|
||||||
x = 0
|
x = 0
|
||||||
rept 8
|
rept 8
|
||||||
db (1 << x) ^ $ff
|
db $ff ^ (1 << x)
|
||||||
x = x + 1
|
x = x + 1
|
||||||
endr
|
endr
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user