Use constants for bit/set/res more

This commit is contained in:
Rangi
2018-04-05 11:44:02 -04:00
parent 99df17d571
commit 7307fc8dce
21 changed files with 140 additions and 97 deletions

View File

@@ -1372,7 +1372,7 @@ Script_startbattle:
call BufferScreen
predef StartBattle
ld a, [wBattleResult]
and $3f
and $ff ^ BATTLERESULT_BITMASK
ld [wScriptVar], a
ret
@@ -1391,10 +1391,10 @@ Script_reloadmapafterbattle:
ld hl, wBattleScriptFlags
ld d, [hl]
ld [hl], $0
ld [hl], 0
ld a, [wBattleResult]
and $3f
cp $1
and $ff ^ BATTLERESULT_BITMASK
cp LOSE
jr nz, .notblackedout
ld b, BANK(Script_BattleWhiteout)
ld hl, Script_BattleWhiteout
@@ -1408,7 +1408,7 @@ Script_reloadmapafterbattle:
.was_wild
ld a, [wBattleResult]
bit 7, a
bit BATTLERESULT_BOX_FULL, a
jr z, .done
ld b, BANK(Script_SpecialBillCall)
ld de, Script_SpecialBillCall