mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
Use ~X instead of $ff ^ X
This commit is contained in:
parent
ab0f9c287a
commit
e706b878d9
@ -533,7 +533,7 @@ PlayDanger:
|
||||
ret z
|
||||
|
||||
; Don't do anything if SFX is being played
|
||||
and $ff ^ (1 << DANGER_ON_F)
|
||||
and ~(1 << DANGER_ON_F)
|
||||
ld d, a
|
||||
call _CheckSFX
|
||||
jr c, .increment
|
||||
|
@ -340,7 +340,7 @@ CantMove:
|
||||
ld a, BATTLE_VARS_SUBSTATUS3
|
||||
call GetBattleVarAddr
|
||||
ld a, [hl]
|
||||
and $ff ^ (1 << SUBSTATUS_BIDE | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_CHARGED)
|
||||
and ~(1 << SUBSTATUS_BIDE | 1 << SUBSTATUS_RAMPAGE | 1 << SUBSTATUS_CHARGED)
|
||||
ld [hl], a
|
||||
|
||||
call ResetFuryCutterCount
|
||||
|
@ -245,7 +245,7 @@ BattleAnim_ClearOAM:
|
||||
ld c, NUM_SPRITE_OAM_STRUCTS
|
||||
.loop
|
||||
ld a, [hl]
|
||||
and $ff ^ (PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits
|
||||
and ~(PALETTE_MASK | VRAM_BANK_1) ; zeros out the palette bits
|
||||
assert PAL_BATTLE_OB_ENEMY == 0
|
||||
ld [hli], a
|
||||
rept SPRITEOAMSTRUCT_LENGTH - 1
|
||||
|
@ -37,7 +37,7 @@ GetBattleAnimFrame:
|
||||
push af
|
||||
ld a, [hl]
|
||||
push hl
|
||||
and $ff ^ (Y_FLIP << 1 | X_FLIP << 1)
|
||||
and ~(Y_FLIP << 1 | X_FLIP << 1)
|
||||
ld hl, BATTLEANIMSTRUCT_DURATION
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
|
@ -35,7 +35,7 @@ CatchTutorial::
|
||||
ldh [hJoyPressed], a
|
||||
ld a, [wOptions]
|
||||
push af
|
||||
and $ff ^ TEXT_DELAY_MASK
|
||||
and ~TEXT_DELAY_MASK
|
||||
add TEXT_DELAY_MED
|
||||
ld [wOptions], a
|
||||
ld hl, .AutoInput
|
||||
|
@ -351,7 +351,7 @@ GetSpriteOAMAttr:
|
||||
and PRIORITY | Y_FLIP | X_FLIP
|
||||
ld b, a
|
||||
ld a, [hl]
|
||||
and $ff ^ (PRIORITY | Y_FLIP | X_FLIP)
|
||||
and ~(PRIORITY | Y_FLIP | X_FLIP)
|
||||
or b
|
||||
ret
|
||||
|
||||
@ -436,7 +436,7 @@ GetSpriteAnimFrame:
|
||||
push af
|
||||
ld a, [hl]
|
||||
push hl
|
||||
and $ff ^ (Y_FLIP << 1 | X_FLIP << 1)
|
||||
and ~(Y_FLIP << 1 | X_FLIP << 1)
|
||||
ld hl, SPRITEANIMSTRUCT_DURATIONOFFSET
|
||||
add hl, bc
|
||||
add [hl]
|
||||
|
@ -2189,7 +2189,7 @@ PokeFluteEffect:
|
||||
xor a
|
||||
ld [wPokeFluteCuredSleep], a
|
||||
|
||||
ld b, $ff ^ SLP
|
||||
ld b, ~SLP
|
||||
|
||||
ld hl, wPartyMon1Status
|
||||
call .CureSleep
|
||||
|
@ -14,7 +14,7 @@ MG_TIMED_OUT EQU 1 << MG_TIMED_OUT_F
|
||||
MG_CANCELED EQU 1 << MG_CANCELED_F
|
||||
MG_WRONG_PREFIX EQU 1 << MG_WRONG_PREFIX_F
|
||||
MG_NOT_OKAY EQU MG_WRONG_CHECKSUM | MG_TIMED_OUT | MG_CANCELED | MG_WRONG_PREFIX
|
||||
MG_OKAY EQU $ff ^ MG_NOT_OKAY
|
||||
MG_OKAY EQU ~MG_NOT_OKAY
|
||||
MG_START_END EQU %11111111
|
||||
|
||||
REGION_PREFIX EQU $96
|
||||
|
@ -472,7 +472,7 @@ SaveOptions:
|
||||
ld bc, wOptionsEnd - wOptions
|
||||
call CopyBytes
|
||||
ld a, [wOptions]
|
||||
and $ff ^ (1 << NO_TEXT_SCROLL)
|
||||
and ~(1 << NO_TEXT_SCROLL)
|
||||
ld [sOptions], a
|
||||
jp CloseSRAM
|
||||
|
||||
|
@ -532,7 +532,7 @@ TrainerCard_Page2_3_OAMUpdate:
|
||||
inc de
|
||||
|
||||
ld a, [wTrainerCardBadgeTileID]
|
||||
and $ff ^ (1 << 7)
|
||||
and ~(1 << 7)
|
||||
add [hl]
|
||||
ld [de], a ; tile id
|
||||
inc hl
|
||||
|
@ -2530,7 +2530,7 @@ _SetPlayerPalette:
|
||||
ld hl, OBJECT_PALETTE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and $ff ^ PALETTE_MASK
|
||||
and ~PALETTE_MASK
|
||||
or d
|
||||
ld [hl], a
|
||||
ret
|
||||
@ -2895,7 +2895,7 @@ InitSprites:
|
||||
ld hl, OBJECT_SPRITE_TILE
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
and $ff ^ (1 << 7)
|
||||
and ~(1 << 7)
|
||||
ldh [hCurSpriteTile], a
|
||||
xor a
|
||||
bit 7, [hl]
|
||||
|
@ -759,7 +759,7 @@ Script_musicfadeout:
|
||||
call GetScriptByte
|
||||
ld [wMusicFadeID + 1], a
|
||||
call GetScriptByte
|
||||
and $ff ^ (1 << MUSIC_FADE_IN_F)
|
||||
and ~(1 << MUSIC_FADE_IN_F)
|
||||
ld [wMusicFade], a
|
||||
ret
|
||||
|
||||
@ -1159,7 +1159,7 @@ Script_startbattle:
|
||||
call BufferScreen
|
||||
predef StartBattle
|
||||
ld a, [wBattleResult]
|
||||
and $ff ^ BATTLERESULT_BITMASK
|
||||
and ~BATTLERESULT_BITMASK
|
||||
ld [wScriptVar], a
|
||||
ret
|
||||
|
||||
@ -1175,7 +1175,7 @@ Script_reloadmapafterbattle:
|
||||
ld d, [hl]
|
||||
ld [hl], 0
|
||||
ld a, [wBattleResult]
|
||||
and $ff ^ BATTLERESULT_BITMASK
|
||||
and ~BATTLERESULT_BITMASK
|
||||
cp LOSE
|
||||
jr nz, .notblackedout
|
||||
ld b, BANK(Script_BattleWhiteout)
|
||||
|
@ -137,5 +137,5 @@ _GetVarAction::
|
||||
|
||||
.BattleResult:
|
||||
ld a, [wBattleResult]
|
||||
and $ff ^ BATTLERESULT_BITMASK
|
||||
and ~BATTLERESULT_BITMASK
|
||||
jp .loadstringbuffer2
|
||||
|
@ -65,12 +65,12 @@ StatsScreenMain:
|
||||
; ???
|
||||
ld [wStatsScreenFlags], a
|
||||
ld a, [wStatsScreenFlags]
|
||||
and $ff ^ STAT_PAGE_MASK
|
||||
and ~STAT_PAGE_MASK
|
||||
or PINK_PAGE ; first_page
|
||||
ld [wStatsScreenFlags], a
|
||||
.loop
|
||||
ld a, [wJumptableIndex]
|
||||
and $ff ^ (1 << 7)
|
||||
and ~(1 << 7)
|
||||
ld hl, StatsScreenPointerTable
|
||||
rst JumpTable
|
||||
call StatsScreen_WaitAnim
|
||||
@ -85,7 +85,7 @@ StatsScreenMobile:
|
||||
; ???
|
||||
ld [wStatsScreenFlags], a
|
||||
ld a, [wStatsScreenFlags]
|
||||
and $ff ^ STAT_PAGE_MASK
|
||||
and ~STAT_PAGE_MASK
|
||||
or PINK_PAGE ; first_page
|
||||
ld [wStatsScreenFlags], a
|
||||
.loop
|
||||
@ -394,7 +394,7 @@ StatsScreen_JoypadAction:
|
||||
|
||||
.set_page
|
||||
ld a, [wStatsScreenFlags]
|
||||
and $ff ^ STAT_PAGE_MASK
|
||||
and ~STAT_PAGE_MASK
|
||||
or c
|
||||
ld [wStatsScreenFlags], a
|
||||
ld h, 4
|
||||
|
@ -56,7 +56,7 @@ DisableLCD::
|
||||
jr nz, .wait
|
||||
|
||||
ldh a, [rLCDC]
|
||||
and $ff ^ (1 << rLCDC_ENABLE)
|
||||
and ~(1 << rLCDC_ENABLE)
|
||||
ldh [rLCDC], a
|
||||
|
||||
xor a
|
||||
|
@ -1607,7 +1607,7 @@ endr
|
||||
|
||||
Unknown_17da94:
|
||||
for x, 8
|
||||
db $ff ^ (1 << x)
|
||||
db ~(1 << x)
|
||||
endr
|
||||
|
||||
Function17da9c:
|
||||
|
Loading…
Reference in New Issue
Block a user