summaryrefslogtreecommitdiff
path: root/engine/overworld
diff options
context:
space:
mode:
authorRangi <remy.oukaour+rangi42@gmail.com>2018-04-05 11:44:02 -0400
committerRangi <remy.oukaour+rangi42@gmail.com>2018-04-05 11:44:02 -0400
commit7307fc8dce605823fbdf8e5ec8530d7aaf675cfa (patch)
tree63a1d741812989026ac3a22806f7677525c3512c /engine/overworld
parent99df17d57173cb82abc668714727c5dada6aac73 (diff)
Use constants for bit/set/res more
Diffstat (limited to 'engine/overworld')
-rw-r--r--engine/overworld/scripting.asm10
-rw-r--r--engine/overworld/variables.asm2
2 files changed, 6 insertions, 6 deletions
diff --git a/engine/overworld/scripting.asm b/engine/overworld/scripting.asm
index f65f2f9c0..93bb3a5c0 100644
--- a/engine/overworld/scripting.asm
+++ b/engine/overworld/scripting.asm
@@ -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
diff --git a/engine/overworld/variables.asm b/engine/overworld/variables.asm
index 89026fdba..3adf6df33 100644
--- a/engine/overworld/variables.asm
+++ b/engine/overworld/variables.asm
@@ -146,6 +146,6 @@ _GetVarAction:: ; 80648 (20:4648)
.BattleResult: ; 80728
ld a, [wBattleResult]
- and $3f
+ and $ff ^ BATTLERESULT_BITMASK
jp .loadstringbuffer2
; 80730