aboutsummaryrefslogtreecommitdiffstats
path: root/engine
diff options
context:
space:
mode:
authorSylvie <35663410+Rangi42@users.noreply.github.com>2024-09-29 11:24:35 -0400
committerGitHub <noreply@github.com>2024-09-29 10:24:35 -0500
commit7d9858fec42d0cef1f0349c3cef250003c5ed66d (patch)
tree7cf362d6e8949e098159cb7778bbcf40301ad4de /engine
parentMerge branch 'master' of https://github.com/pret/pokered (diff)
downloadpokeyellow-7d9858fec42d0cef1f0349c3cef250003c5ed66d.tar.gz
pokeyellow-7d9858fec42d0cef1f0349c3cef250003c5ed66d.tar.xz
pokeyellow-7d9858fec42d0cef1f0349c3cef250003c5ed66d.zip
Identify more bit flags (#119)
* Identify more bit flags * Bit serves dual use in debug mode
Diffstat (limited to 'engine')
-rw-r--r--engine/battle/core.asm5
-rw-r--r--engine/debug/debug_menu.asm4
-rw-r--r--engine/gfx/animated_objects.asm12
-rw-r--r--engine/menus/pokedex.asm4
4 files changed, 14 insertions, 11 deletions
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 926910fc..919de01c 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -2820,7 +2820,10 @@ SelectMenuItem_CursorDown:
jp SelectMenuItem
Func_3d4f5:
- bit 3, a
+IF DEF(_DEBUG)
+ ASSERT BIT_START == BIT_TRAINER_BATTLE
+ENDC
+ bit BIT_TRAINER_BATTLE, a
ld a, $0
jr nz, .asm_3d4fd
ld a, $1
diff --git a/engine/debug/debug_menu.asm b/engine/debug/debug_menu.asm
index ae4a328b..b2efb940 100644
--- a/engine/debug/debug_menu.asm
+++ b/engine/debug/debug_menu.asm
@@ -1558,7 +1558,7 @@ Func_ff295:
call Func_ff2f3
pop de
ld a, d
- set 7, a
+ set BIT_HAS_CHANGED_BOXES, a
ld [wCurrentBoxNum], a
push de
call Func_ff2d1
@@ -1566,7 +1566,7 @@ Func_ff295:
call Func_ff2f3
ld a, [wLetterPrintingDelayFlags]
push af
- ld a, 1
+ ld a, 1 << BIT_FAST_TEXT_DELAY
ld [wLetterPrintingDelayFlags], a
callfar SaveSAVtoSRAM
pop af
diff --git a/engine/gfx/animated_objects.asm b/engine/gfx/animated_objects.asm
index 208a2f85..0a71f59d 100644
--- a/engine/gfx/animated_objects.asm
+++ b/engine/gfx/animated_objects.asm
@@ -227,7 +227,7 @@ GetCurrentAnimatedObjectTileYCoordinate:
push hl
ld a, [hl]
ld hl, wCurAnimatedObjectOAMAttributes
- bit 6, [hl]
+ bit OAM_Y_FLIP, [hl]
jr z, .no_flip
add $8
xor $ff
@@ -240,7 +240,7 @@ GetCurrentAnimatedObjectTileXCoordinate:
push hl
ld a, [hl]
ld hl, wCurAnimatedObjectOAMAttributes
- bit 5, [hl]
+ bit OAM_X_FLIP, [hl]
jr z, .no_flip
add $8
xor $ff
@@ -254,14 +254,14 @@ SetCurrentAnimatedObjectOAMAttributes:
ld b, a
ld a, [hl]
xor b
- and $e0
+ and OAM_HFLIP | OAM_VFLIP | OAM_BEHIND_BG
ld b, a
ld a, [hl]
- and $10
+ and OAM_OBP1
or b
- bit 4, a
+ bit OAM_OBP_NUM, a
ret z
- or $4
+ or OAM_HIGH_PALS
ret
GetCurrentAnimatedObjectOAMDataPointer:
diff --git a/engine/menus/pokedex.asm b/engine/menus/pokedex.asm
index f4637cd0..88a057df 100644
--- a/engine/menus/pokedex.asm
+++ b/engine/menus/pokedex.asm
@@ -683,11 +683,11 @@ Pokedex_PrepareDexEntryForPrinting:
ld h, a
bccoord 1, 1
ldh a, [hUILayoutFlags]
- set 3, a
+ set BIT_PAGE_CHAR_IS_NEXT, a
ldh [hUILayoutFlags], a
call Pokedex_PrintFlavorTextAtBC
ldh a, [hUILayoutFlags]
- res 3, a
+ res BIT_PAGE_CHAR_IS_NEXT, a
ldh [hUILayoutFlags], a
ret