summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--home/pokedex_flags.asm40
-rw-r--r--main.asm40
2 files changed, 41 insertions, 39 deletions
diff --git a/home/pokedex_flags.asm b/home/pokedex_flags.asm
new file mode 100644
index 000000000..bcd0f2afa
--- /dev/null
+++ b/home/pokedex_flags.asm
@@ -0,0 +1,40 @@
+SetSeenAndCaughtMon: ; 3380
+ push af
+ ld c, a
+ ld hl, PokedexCaught
+ ld b, SET_FLAG
+ call PokedexFlagAction
+ pop af
+ ; fallthrough
+; 338b
+
+SetSeenMon: ; 338b
+ ld c, a
+ ld hl, PokedexSeen
+ ld b, SET_FLAG
+ jr PokedexFlagAction
+; 3393
+
+CheckCaughtMon: ; 3393
+ ld c, a
+ ld hl, PokedexCaught
+ ld b, CHECK_FLAG
+ jr PokedexFlagAction
+; 339b
+
+CheckSeenMon: ; 339b
+ ld c, a
+ ld hl, PokedexSeen
+ ld b, CHECK_FLAG
+ ; fallthrough
+; 33a1
+
+PokedexFlagAction: ; 33a1
+ ld d, 0
+ ld a, PREDEF_FLAG
+ call Predef
+ ld a, c
+ and a
+ ret
+; 33ab
+
diff --git a/main.asm b/main.asm
index b9c2eed7a..bfda61d2e 100644
--- a/main.asm
+++ b/main.asm
@@ -1281,45 +1281,7 @@ GetWeekday: ; 3376
; 3380
-SetSeenAndCaughtMon: ; 3380
- push af
- ld c, a
- ld hl, PokedexCaught
- ld b, SET_FLAG
- call PokedexFlagAction
- pop af
- ; fallthrough
-; 338b
-
-SetSeenMon: ; 338b
- ld c, a
- ld hl, PokedexSeen
- ld b, SET_FLAG
- jr PokedexFlagAction
-; 3393
-
-CheckCaughtMon: ; 3393
- ld c, a
- ld hl, PokedexCaught
- ld b, CHECK_FLAG
- jr PokedexFlagAction
-; 339b
-
-CheckSeenMon: ; 339b
- ld c, a
- ld hl, PokedexSeen
- ld b, CHECK_FLAG
- ; fallthrough
-; 33a1
-
-PokedexFlagAction: ; 33a1
- ld d, 0
- ld a, PREDEF_FLAG
- call Predef
- ld a, c
- and a
- ret
-; 33ab
+INCLUDE "home/pokedex_flags.asm"
NamesPointerTable: ; 33ab