summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemy Oukaour <remy.oukaour@gmail.com>2017-12-15 13:21:47 -0500
committerRemy Oukaour <remy.oukaour@gmail.com>2017-12-15 13:21:47 -0500
commitdc76bf804f86f884933e9d5a8820e3122b2771ae (patch)
tree60a40a782908202f1ac598b5977ff8d7e39a3055
parentebf3bfb6b289bf684941a86cafe1286d8ce212fe (diff)
Move all misc/ and unknown/ files to meaningful directories
-rw-r--r--Makefile5
-rwxr-xr-xconstants/battle_tower_constants.asm2
-rw-r--r--data/battle_tower.asm2
-rwxr-xr-xgfx/font.asm2
-rw-r--r--gfx/font/overworld_phone_icon.png (renamed from gfx/mobile/overworld_phone_icon.png)bin82 -> 82 bytes
-rw-r--r--gfx/unknown/electro_ball.2bpp.lz.3eaf004f (renamed from gfx/unknown/egg_animated.2bpp.lz.3eaf004f)bin676 -> 676 bytes
-rw-r--r--gfx/unknown/electro_ball.png (renamed from gfx/unknown/egg_animated.png)bin692 -> 692 bytes
-rwxr-xr-xgfx/unknown/electro_ball_nonmatching.png (renamed from gfx/unknown/egg_animated_nonmatching.png)bin1422 -> 1422 bytes
-rw-r--r--macros/charmap.asm8
-rw-r--r--main.asm285
-rwxr-xr-xmobile/battle_tower_47.asm (renamed from misc/battle_tower_47.asm)0
-rwxr-xr-xmobile/battle_tower_5c.asm (renamed from misc/battle_tower_5c.asm)0
-rwxr-xr-xmobile/mobile_5c.asm2
-rw-r--r--mobile/mobile_5e.asm (renamed from misc/crystal_misc.asm)2
-rw-r--r--mobile/news/news.asm44
-rw-r--r--mobile/news/news_1.bin (renamed from unknown/1f4018.bin)bin3494 -> 3494 bytes
-rw-r--r--mobile/news/news_2.bin (renamed from unknown/1f4dd3.bin)bin4044 -> 4044 bytes
-rw-r--r--mobile/news/news_3.bin (renamed from unknown/1f5db4.bin)bin1462 -> 1462 bytes
-rw-r--r--mobile/stadium/stadium2_1.bin (renamed from misc/stadium2_1.bin)bin544 -> 544 bytes
-rw-r--r--mobile/stadium/stadium2_2.bin (renamed from misc/stadium2_2.bin)bin544 -> 544 bytes
-rw-r--r--pokecrystal.link4
-rwxr-xr-xunknown/013a47.asm229
22 files changed, 293 insertions, 292 deletions
diff --git a/Makefile b/Makefile
index 8d4aa7900..63d1177e8 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,6 @@ engine/credits.o \
data/pokemon/egg_moves.o \
data/pokemon/evos_attacks.o \
data/pokemon/dex_entries.o \
-misc/crystal_misc.o \
text/common_text.o \
gfx/pics.o
@@ -202,8 +201,8 @@ gfx/pokegear/pokegear_sprites.2bpp: tools/gfx += --trim-whitespace
gfx/unknown/ascii_font.2bpp: tools/gfx += --trim-whitespace
gfx/unknown/bold_font.1bpp: tools/gfx += --trim-whitespace
-gfx/unknown/egg_animated.2bpp: tools/gfx += --trim-whitespace
-gfx/unknown/egg_animated_nonmatching.2bpp: tools/gfx += --remove-duplicates --remove-xflip
+gfx/unknown/electro_ball.2bpp: tools/gfx += --trim-whitespace
+gfx/unknown/electro_ball_nonmatching.2bpp: tools/gfx += --remove-duplicates --remove-xflip
gfx/unknown/mobile_splash.2bpp: tools/gfx += --remove-duplicates --remove-xflip
gfx/unknown/pichu_animated.2bpp: tools/gfx += --trim-whitespace
gfx/unknown/unknown_egg.2bpp: rgbgfx += -h
diff --git a/constants/battle_tower_constants.asm b/constants/battle_tower_constants.asm
index 5ab69d752..0436e4e22 100755
--- a/constants/battle_tower_constants.asm
+++ b/constants/battle_tower_constants.asm
@@ -1,4 +1,4 @@
-; BattleTowerAction arguments (see misc/battle_tower_5c.asm)
+; BattleTowerAction arguments (see mobile/battle_tower_5c.asm)
const_def
const BATTLETOWERACTION_CHECK_EXPLANATION_READ
const BATTLETOWERACTION_SET_EXPLANATION_READ
diff --git a/data/battle_tower.asm b/data/battle_tower.asm
index 2c78ffb82..d2e07fac3 100644
--- a/data/battle_tower.asm
+++ b/data/battle_tower.asm
@@ -1,7 +1,7 @@
BattleTowerTrainers: ; 1f814e
; The trainer class is not used in Crystal 1.0 due to a bug.
; Instead, the sixth character in the trainer's name is used.
-; See misc/battle_tower_47.asm
+; See mobile/battle_tower_47.asm
db "HANSON@@@@", FISHER
db "SAWYER@@@@", POKEMANIAC
db "MASUDA@@@@", GUITARIST
diff --git a/gfx/font.asm b/gfx/font.asm
index f2efefd37..8d17722f4 100755
--- a/gfx/font.asm
+++ b/gfx/font.asm
@@ -55,7 +55,7 @@ INCBIN "gfx/font/weekday_kanji.2bpp"
; f8f24
OverworldPhoneIconGFX: ; f8f24
-INCBIN "gfx/mobile/overworld_phone_icon.2bpp"
+INCBIN "gfx/font/overworld_phone_icon.2bpp"
; f8f34
GFX_f8f34: ; unused bold letters + unown chars
diff --git a/gfx/mobile/overworld_phone_icon.png b/gfx/font/overworld_phone_icon.png
index 9e13a121b..9e13a121b 100644
--- a/gfx/mobile/overworld_phone_icon.png
+++ b/gfx/font/overworld_phone_icon.png
Binary files differ
diff --git a/gfx/unknown/egg_animated.2bpp.lz.3eaf004f b/gfx/unknown/electro_ball.2bpp.lz.3eaf004f
index b4fabff15..b4fabff15 100644
--- a/gfx/unknown/egg_animated.2bpp.lz.3eaf004f
+++ b/gfx/unknown/electro_ball.2bpp.lz.3eaf004f
Binary files differ
diff --git a/gfx/unknown/egg_animated.png b/gfx/unknown/electro_ball.png
index 3e1c0bb46..3e1c0bb46 100644
--- a/gfx/unknown/egg_animated.png
+++ b/gfx/unknown/electro_ball.png
Binary files differ
diff --git a/gfx/unknown/egg_animated_nonmatching.png b/gfx/unknown/electro_ball_nonmatching.png
index 44ea166ef..44ea166ef 100755
--- a/gfx/unknown/egg_animated_nonmatching.png
+++ b/gfx/unknown/electro_ball_nonmatching.png
Binary files differ
diff --git a/macros/charmap.asm b/macros/charmap.asm
index deb0aa2c0..fd2d371fd 100644
--- a/macros/charmap.asm
+++ b/macros/charmap.asm
@@ -32,7 +32,7 @@
charmap "<ROCKET>", $5e ; "ROCKET"
charmap "<DEXEND>", $5f
-; Actual characters (from gfx/misc/font_extra.png)
+; Actual characters (from gfx/font/font_extra.png)
charmap "<BOLD_A>", $60 ; unused
charmap "<BOLD_B>", $61 ; unused
@@ -68,7 +68,7 @@
charmap "┘", $7e
charmap " ", $7f
-; Actual characters (from gfx/misc/font_battle_extra.png)
+; Actual characters (from gfx/font/font_battle_extra.png)
charmap "<LV>", $6e
@@ -86,13 +86,13 @@
charmap "<BLACK>", $60 ; from gfx/mobile/phone_tiles.2bpp
charmap "▲", $61 ; gfx/font/up_arrow.png
- charmap "<PHONE>", $62 ; gfx/mobile/overworld_phone_icon.2bpp
+ charmap "<PHONE>", $62 ; gfx/font/overworld_phone_icon.2bpp
charmap "_", $62 ; from gfx/battle/hp_exp_bar_border.1bpp
charmap "′", $6e ; gfx/font/feet_inches.png
charmap "″", $6f ; gfx/font/feet_inches.png
-; Actual characters (from gfx/misc/font.png)
+; Actual characters (from gfx/font/font.png)
charmap "A", $80
charmap "B", $81
diff --git a/main.asm b/main.asm
index 629e34968..aecfde835 100644
--- a/main.asm
+++ b/main.asm
@@ -563,7 +563,235 @@ ApplyPokerusTick: ; 13988
INCLUDE "event/bug_contest_2.asm"
-INCLUDE "unknown/013a47.asm"
+CorrectErrorsInPlayerParty: ; unreferenced
+ ld hl, PartyCount
+ ld a, [hl]
+ and a
+ ret z
+
+ cp PARTY_LENGTH + 1
+ jr c, .party_length_okay
+ ld a, PARTY_LENGTH
+ ld [hl], a
+.party_length_okay
+ inc hl
+
+ ld b, a
+ ld c, 0
+.loop1
+ ld a, [hl]
+ and a
+ jr z, .invalid_species
+ cp NUM_POKEMON + 1
+ jr z, .invalid_species
+ cp EGG + 1
+ jr c, .next_species
+
+.invalid_species
+ ld [hl], SMEARGLE
+ push hl
+ push bc
+ ld a, c
+ ld hl, PartyMon1Species
+ call GetPartyLocation
+ ld [hl], SMEARGLE
+ pop bc
+ pop hl
+
+.next_species
+ inc hl
+ inc c
+ dec b
+ jr nz, .loop1
+ ld [hl], $ff
+
+ ld hl, PartyMon1
+ ld a, [PartyCount]
+ ld d, a
+ ld e, 0
+.loop2
+ push de
+ push hl
+ ld b, h
+ ld c, l
+ ld a, [hl]
+ and a
+ jr z, .invalid_species_2
+ cp NUM_POKEMON + 1
+ jr c, .check_level
+
+.invalid_species_2
+ ld [hl], SMEARGLE
+ push de
+ ld d, 0
+ ld hl, PartySpecies
+ add hl, de
+ pop de
+ ld a, SMEARGLE
+ ld [hl], a
+
+.check_level
+ ld [CurSpecies], a
+ call GetBaseData
+ ld hl, MON_LEVEL
+ add hl, bc
+ ld a, [hl]
+ cp MIN_LEVEL
+ ld a, MIN_LEVEL
+ jr c, .invalid_level
+ ld a, [hl]
+ cp MAX_LEVEL
+ jr c, .load_level
+ ld a, MAX_LEVEL
+.invalid_level
+ ld [hl], a
+.load_level
+ ld [CurPartyLevel], a
+
+ ld hl, MON_MAXHP
+ add hl, bc
+ ld d, h
+ ld e, l
+ ld hl, MON_STAT_EXP - 1
+ add hl, bc
+ ld b, $1
+ predef CalcPkmnStats
+ pop hl
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop de
+ inc e
+ dec d
+ jr nz, .loop2
+
+ ld de, PartyMonNicknames
+ ld a, [PartyCount]
+ ld b, a
+ ld c, 0
+.loop3
+ push bc
+ call .GetLengthOfStringWith6CharCap
+ push de
+ callba CheckStringForErrors
+ pop hl
+ pop bc
+ jr nc, .valid_nickname
+
+ push bc
+ push hl
+ ld hl, PartySpecies
+ push bc
+ ld b, 0
+ add hl, bc
+ pop bc
+ ld a, [hl]
+ cp EGG
+ ld hl, .TAMAGO
+ jr z, .got_nickname
+ ld [wd265], a
+ call GetPokemonName
+ ld hl, StringBuffer1
+.got_nickname
+ pop de
+ ld bc, PKMN_NAME_LENGTH
+ call CopyBytes
+ pop bc
+
+.valid_nickname
+ inc c
+ dec b
+ jr nz, .loop3
+
+ ld de, PartyMonOT
+ ld a, [PartyCount]
+ ld b, a
+ ld c, 0
+.loop4
+ push bc
+ call .GetLengthOfStringWith6CharCap
+ push de
+ callba CheckStringForErrors
+ pop hl
+ jr nc, .valid_ot_name
+ ld d, h
+ ld e, l
+ ld hl, PlayerName
+ ld bc, NAME_LENGTH
+ call CopyBytes
+.valid_ot_name
+ pop bc
+ inc c
+ dec b
+ jr nz, .loop4
+
+ ld hl, PartyMon1Moves
+ ld a, [PartyCount]
+ ld b, a
+.loop5
+ push hl
+ ld c, NUM_MOVES
+ ld a, [hl]
+ and a
+ jr z, .invalid_move
+ cp NUM_ATTACKS + 1
+ jr c, .moves_loop
+.invalid_move
+ ld [hl], POUND
+
+.moves_loop
+ ld a, [hl]
+ and a
+ jr z, .fill_invalid_moves
+ cp NUM_ATTACKS + 1
+ jr c, .next_move
+
+.fill_invalid_moves
+ xor a
+ ld [hli], a
+ dec c
+ jr nz, .fill_invalid_moves
+ jr .next_pokemon
+
+.next_move
+ inc hl
+ dec c
+ jr nz, .moves_loop
+
+.next_pokemon
+ pop hl
+ push bc
+ ld bc, PARTYMON_STRUCT_LENGTH
+ add hl, bc
+ pop bc
+ dec b
+ jr nz, .loop5
+ ret
+; 13b6b
+
+.TAMAGO: ; 13b6b
+ db "タマゴ@@@"
+; 13b71
+
+.GetLengthOfStringWith6CharCap: ; 13b71
+ push de
+ ld c, 1
+ ld b, NAME_LENGTH_JAPANESE
+.search_loop
+ ld a, [de]
+ cp "@"
+ jr z, .done
+ inc de
+ inc c
+ dec b
+ jr nz, .search_loop
+ dec c
+ dec de
+ ld a, "@"
+ ld [de], a
+.done
+ pop de
+ ret
+; 13b87
GetSquareRoot: ; 13b87
; Return the square root of de in b.
@@ -5139,7 +5367,7 @@ INCLUDE "mobile/mobile_46.asm"
SECTION "battle_tower_47", ROMX
-INCLUDE "misc/battle_tower_47.asm"
+INCLUDE "mobile/battle_tower_47.asm"
SECTION "bank5B", ROMX
@@ -5170,6 +5398,8 @@ _UpdateBattleHUDs:
callba FinishBattleAnim
ret
+INCLUDE "mobile/mobile_5e.asm"
+
INCLUDE "mobile/mobile_5f.asm"
@@ -5655,50 +5885,9 @@ SECTION "Battle Tower Trainer Data", ROMX
INCLUDE "data/battle_tower_2.asm"
-SECTION "bank7D", ROMX
-
- db $cc, $6b, $1e ; XXX
-
-Function1f4003: ; 1f4003
-; XXX
- ld a, $6
- call GetSRAMBank
- ld hl, .unknown_data
- ld de, $a000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
-
-.unknown_data
-INCBIN "unknown/1f4018.bin"
-
-Function1f4dbe: ; 1f4dbe
-; XXX
- ld a, $6
- call GetSRAMBank
- ld hl, .unknown_data
- ld de, $a000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
-
-.unknown_data
-INCBIN "unknown/1f4dd3.bin"
-
-Function1f5d9f: ; 1f5d9f
- ld a, $6
- call GetSRAMBank
- ld hl, .unknown_data
- ld de, $a000
- ld bc, $1000
- call CopyBytes
- call CloseSRAM
- ret
+SECTION "Mobile News Data", ROMX
-.unknown_data
-INCBIN "unknown/1f5db4.bin"
+INCLUDE "mobile/news/news.asm"
SECTION "bank7E", ROMX
@@ -5710,10 +5899,10 @@ INCLUDE "engine/odd_eggs.asm"
SECTION "bank7F", ROMX
-SECTION "stadium2", ROMX
+SECTION "Mobile Stadium 2", ROMX
IF DEF(CRYSTAL11)
-INCBIN "misc/stadium2_2.bin"
+INCBIN "mobile/stadium/stadium2_2.bin"
ELSE
-INCBIN "misc/stadium2_1.bin"
+INCBIN "mobile/stadium/stadium2_1.bin"
ENDC
diff --git a/misc/battle_tower_47.asm b/mobile/battle_tower_47.asm
index d0ca6edd8..d0ca6edd8 100755
--- a/misc/battle_tower_47.asm
+++ b/mobile/battle_tower_47.asm
diff --git a/misc/battle_tower_5c.asm b/mobile/battle_tower_5c.asm
index 462e4f75a..462e4f75a 100755
--- a/misc/battle_tower_5c.asm
+++ b/mobile/battle_tower_5c.asm
diff --git a/mobile/mobile_5c.asm b/mobile/mobile_5c.asm
index 5b7418a0f..48f9cace9 100755
--- a/mobile/mobile_5c.asm
+++ b/mobile/mobile_5c.asm
@@ -75,7 +75,7 @@ Function17005a: ; 17005a
; 1700b0
-INCLUDE "misc/battle_tower_5c.asm"
+INCLUDE "mobile/battle_tower_5c.asm"
Function170be4: ; 170be4
ld a, $5
diff --git a/misc/crystal_misc.asm b/mobile/mobile_5e.asm
index aa5c704fd..b22f714ea 100644
--- a/misc/crystal_misc.asm
+++ b/mobile/mobile_5e.asm
@@ -1,5 +1,3 @@
-INCLUDE "includes.asm"
-
SECTION "Misc Crystal", ROMX
diff --git a/mobile/news/news.asm b/mobile/news/news.asm
new file mode 100644
index 000000000..b95df06aa
--- /dev/null
+++ b/mobile/news/news.asm
@@ -0,0 +1,44 @@
+; http://forums.glitchcity.info/index.php?topic=7509.msg206449#msg206449
+
+ db $cc, $6b, $1e ; XXX
+
+Function1f4003: ; 1f4003
+; XXX
+ ld a, $6
+ call GetSRAMBank
+ ld hl, .news_data
+ ld de, $a000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.news_data
+INCBIN "mobile/news/news_1.bin"
+
+Function1f4dbe: ; 1f4dbe
+; XXX
+ ld a, $6
+ call GetSRAMBank
+ ld hl, .news_data
+ ld de, $a000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.news_data
+INCBIN "mobile/news/news_2.bin"
+
+Function1f5d9f: ; 1f5d9f
+ ld a, $6
+ call GetSRAMBank
+ ld hl, .news_data
+ ld de, $a000
+ ld bc, $1000
+ call CopyBytes
+ call CloseSRAM
+ ret
+
+.news_data
+INCBIN "mobile/news/news_3.bin"
diff --git a/unknown/1f4018.bin b/mobile/news/news_1.bin
index aa8c73e78..aa8c73e78 100644
--- a/unknown/1f4018.bin
+++ b/mobile/news/news_1.bin
Binary files differ
diff --git a/unknown/1f4dd3.bin b/mobile/news/news_2.bin
index 511d62cb7..511d62cb7 100644
--- a/unknown/1f4dd3.bin
+++ b/mobile/news/news_2.bin
Binary files differ
diff --git a/unknown/1f5db4.bin b/mobile/news/news_3.bin
index f4adbc0db..f4adbc0db 100644
--- a/unknown/1f5db4.bin
+++ b/mobile/news/news_3.bin
Binary files differ
diff --git a/misc/stadium2_1.bin b/mobile/stadium/stadium2_1.bin
index 155e8bab8..155e8bab8 100644
--- a/misc/stadium2_1.bin
+++ b/mobile/stadium/stadium2_1.bin
Binary files differ
diff --git a/misc/stadium2_2.bin b/mobile/stadium/stadium2_2.bin
index 2273d94f3..2273d94f3 100644
--- a/misc/stadium2_2.bin
+++ b/mobile/stadium/stadium2_2.bin
Binary files differ
diff --git a/pokecrystal.link b/pokecrystal.link
index 2281ba6d7..60ff314ff 100644
--- a/pokecrystal.link
+++ b/pokecrystal.link
@@ -301,13 +301,13 @@ ROMX $7b
ROMX $7c
"Battle Tower Trainer Data"
ROMX $7d
- "bank7D"
+ "Mobile News Data"
ROMX $7e
"bank7E"
ROMX $7f
"bank7F"
org $7de0
- "stadium2"
+ "Mobile Stadium 2"
WRAM0
"Stack"
"Audio RAM"
diff --git a/unknown/013a47.asm b/unknown/013a47.asm
deleted file mode 100755
index dd0d2b722..000000000
--- a/unknown/013a47.asm
+++ /dev/null
@@ -1,229 +0,0 @@
-CorrectErrorsInPlayerParty: ; unreferenced
- ld hl, PartyCount
- ld a, [hl]
- and a
- ret z
-
- cp PARTY_LENGTH + 1
- jr c, .party_length_okay
- ld a, PARTY_LENGTH
- ld [hl], a
-.party_length_okay
- inc hl
-
- ld b, a
- ld c, 0
-.loop1
- ld a, [hl]
- and a
- jr z, .invalid_species
- cp NUM_POKEMON + 1
- jr z, .invalid_species
- cp EGG + 1
- jr c, .next_species
-
-.invalid_species
- ld [hl], SMEARGLE
- push hl
- push bc
- ld a, c
- ld hl, PartyMon1Species
- call GetPartyLocation
- ld [hl], SMEARGLE
- pop bc
- pop hl
-
-.next_species
- inc hl
- inc c
- dec b
- jr nz, .loop1
- ld [hl], $ff
-
- ld hl, PartyMon1
- ld a, [PartyCount]
- ld d, a
- ld e, 0
-.loop2
- push de
- push hl
- ld b, h
- ld c, l
- ld a, [hl]
- and a
- jr z, .invalid_species_2
- cp NUM_POKEMON + 1
- jr c, .check_level
-
-.invalid_species_2
- ld [hl], SMEARGLE
- push de
- ld d, 0
- ld hl, PartySpecies
- add hl, de
- pop de
- ld a, SMEARGLE
- ld [hl], a
-
-.check_level
- ld [CurSpecies], a
- call GetBaseData
- ld hl, MON_LEVEL
- add hl, bc
- ld a, [hl]
- cp MIN_LEVEL
- ld a, MIN_LEVEL
- jr c, .invalid_level
- ld a, [hl]
- cp MAX_LEVEL
- jr c, .load_level
- ld a, MAX_LEVEL
-.invalid_level
- ld [hl], a
-.load_level
- ld [CurPartyLevel], a
-
- ld hl, MON_MAXHP
- add hl, bc
- ld d, h
- ld e, l
- ld hl, MON_STAT_EXP - 1
- add hl, bc
- ld b, $1
- predef CalcPkmnStats
- pop hl
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop de
- inc e
- dec d
- jr nz, .loop2
-
- ld de, PartyMonNicknames
- ld a, [PartyCount]
- ld b, a
- ld c, 0
-.loop3
- push bc
- call .GetLengthOfStringWith6CharCap
- push de
- callba CheckStringForErrors
- pop hl
- pop bc
- jr nc, .valid_nickname
-
- push bc
- push hl
- ld hl, PartySpecies
- push bc
- ld b, 0
- add hl, bc
- pop bc
- ld a, [hl]
- cp EGG
- ld hl, .TAMAGO
- jr z, .got_nickname
- ld [wd265], a
- call GetPokemonName
- ld hl, StringBuffer1
-.got_nickname
- pop de
- ld bc, PKMN_NAME_LENGTH
- call CopyBytes
- pop bc
-
-.valid_nickname
- inc c
- dec b
- jr nz, .loop3
-
- ld de, PartyMonOT
- ld a, [PartyCount]
- ld b, a
- ld c, 0
-.loop4
- push bc
- call .GetLengthOfStringWith6CharCap
- push de
- callba CheckStringForErrors
- pop hl
- jr nc, .valid_ot_name
- ld d, h
- ld e, l
- ld hl, PlayerName
- ld bc, NAME_LENGTH
- call CopyBytes
-.valid_ot_name
- pop bc
- inc c
- dec b
- jr nz, .loop4
-
- ld hl, PartyMon1Moves
- ld a, [PartyCount]
- ld b, a
-.loop5
- push hl
- ld c, NUM_MOVES
- ld a, [hl]
- and a
- jr z, .invalid_move
- cp NUM_ATTACKS + 1
- jr c, .moves_loop
-.invalid_move
- ld [hl], POUND
-
-.moves_loop
- ld a, [hl]
- and a
- jr z, .fill_invalid_moves
- cp NUM_ATTACKS + 1
- jr c, .next_move
-
-.fill_invalid_moves
- xor a
- ld [hli], a
- dec c
- jr nz, .fill_invalid_moves
- jr .next_pokemon
-
-.next_move
- inc hl
- dec c
- jr nz, .moves_loop
-
-.next_pokemon
- pop hl
- push bc
- ld bc, PARTYMON_STRUCT_LENGTH
- add hl, bc
- pop bc
- dec b
- jr nz, .loop5
- ret
-; 13b6b
-
-.TAMAGO: ; 13b6b
- db "タマゴ@@@"
-; 13b71
-
-.GetLengthOfStringWith6CharCap: ; 13b71
- push de
- ld c, 1
- ld b, 6
-.search_loop
- ld a, [de]
- cp "@"
- jr z, .done
- inc de
- inc c
- dec b
- jr nz, .search_loop
- dec c
- dec de
- ld a, "@"
- ld [de], a
-.done
- pop de
- ret
-; 13b87