aboutsummaryrefslogtreecommitdiffstats
path: root/engine/pokemon
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-05 19:58:21 -0400
committerGitHub <noreply@github.com>2020-07-05 19:58:21 -0400
commitc57c93d2b2fb06cadafefda37c0974ba1ec9e6c0 (patch)
tree531d6b30d5a606ae963024825ed6e614843000a6 /engine/pokemon
parentMerge pull request #257 from Rangi42/master (diff)
parentdb $f6 == script_cable_club_receptionist (diff)
downloadpokeyellow-c57c93d2b2fb06cadafefda37c0974ba1ec9e6c0.tar.gz
pokeyellow-c57c93d2b2fb06cadafefda37c0974ba1ec9e6c0.tar.xz
pokeyellow-c57c93d2b2fb06cadafefda37c0974ba1ec9e6c0.zip
Merge pull request #259 from Rangi42/master
Port pokecrystal's formatting of text commands and special characters
Diffstat (limited to 'engine/pokemon')
-rw-r--r--engine/pokemon/bills_pc.asm68
-rwxr-xr-xengine/pokemon/evos_moves.asm16
-rwxr-xr-xengine/pokemon/learn_move.asm42
-rw-r--r--engine/pokemon/remove_mon.asm66
-rwxr-xr-xengine/pokemon/status_screen.asm21
5 files changed, 108 insertions, 105 deletions
diff --git a/engine/pokemon/bills_pc.asm b/engine/pokemon/bills_pc.asm
index d9a329f5..7877ada1 100644
--- a/engine/pokemon/bills_pc.asm
+++ b/engine/pokemon/bills_pc.asm
@@ -89,7 +89,7 @@ SomeonesPCText: db "SOMEONE's PC@"
BillsPCText: db "BILL's PC@"
PlayersPCText: db "'s PC@"
OaksPCText: db "PROF.OAK's PC@"
-PKMNLeaguePCText: db "<pkmn>LEAGUE@"
+PKMNLeaguePCText: db "<PKMN>LEAGUE@"
LogOffPCText: db "LOG OFF@"
BillsPC_::
@@ -339,9 +339,9 @@ DisplayMonListMenu:
ret
BillsPCMenuText:
- db "WITHDRAW <pkmn>"
- next "DEPOSIT <pkmn>"
- next "RELEASE <pkmn>"
+ db "WITHDRAW <PKMN>"
+ next "DEPOSIT <PKMN>"
+ next "RELEASE <PKMN>"
next "CHANGE BOX"
next "SEE YA!"
db "@"
@@ -453,58 +453,58 @@ StatsCancelPCText:
next "CANCEL@"
SwitchOnText:
- TX_FAR _SwitchOnText
- db "@"
+ text_far _SwitchOnText
+ text_end
WhatText:
- TX_FAR _WhatText
- db "@"
+ text_far _WhatText
+ text_end
DepositWhichMonText:
- TX_FAR _DepositWhichMonText
- db "@"
+ text_far _DepositWhichMonText
+ text_end
MonWasStoredText:
- TX_FAR _MonWasStoredText
- db "@"
+ text_far _MonWasStoredText
+ text_end
CantDepositLastMonText:
- TX_FAR _CantDepositLastMonText
- db "@"
+ text_far _CantDepositLastMonText
+ text_end
BoxFullText:
- TX_FAR _BoxFullText
- db "@"
+ text_far _BoxFullText
+ text_end
MonIsTakenOutText:
- TX_FAR _MonIsTakenOutText
- db "@"
+ text_far _MonIsTakenOutText
+ text_end
NoMonText:
- TX_FAR _NoMonText
- db "@"
+ text_far _NoMonText
+ text_end
CantTakeMonText:
- TX_FAR _CantTakeMonText
- db "@"
+ text_far _CantTakeMonText
+ text_end
ReleaseWhichMonText:
- TX_FAR _ReleaseWhichMonText
- db "@"
+ text_far _ReleaseWhichMonText
+ text_end
OnceReleasedText:
- TX_FAR _OnceReleasedText
- db "@"
+ text_far _OnceReleasedText
+ text_end
MonWasReleasedText:
- TX_FAR _MonWasReleasedText
- db "@"
+ text_far _MonWasReleasedText
+ text_end
CableClubLeftGameboy::
ld a, [hSerialConnectionStatus]
cp USING_EXTERNAL_CLOCK
ret z
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_RIGHT
ret nz
ld a, [wCurMap]
@@ -521,7 +521,7 @@ CableClubRightGameboy::
ld a, [hSerialConnectionStatus]
cp USING_INTERNAL_CLOCK
ret z
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_LEFT
ret nz
ld a, [wCurMap]
@@ -535,15 +535,15 @@ CableClubRightGameboy::
tx_pre_jump JustAMomentText
JustAMomentText::
- TX_FAR _JustAMomentText
- db "@"
+ text_far _JustAMomentText
+ text_end
- ld a, [wSpriteStateData1 + 9] ; player's sprite facing direction
+ ld a, [wSpritePlayerStateData1FacingDirection]
cp SPRITE_FACING_UP
ret nz
call EnableAutoTextBoxDrawing
tx_pre_jump OpenBillsPCText
OpenBillsPCText::
- TX_BILLS_PC
+ script_bills_pc
diff --git a/engine/pokemon/evos_moves.asm b/engine/pokemon/evos_moves.asm
index 36f135cc..469d689a 100755
--- a/engine/pokemon/evos_moves.asm
+++ b/engine/pokemon/evos_moves.asm
@@ -296,20 +296,20 @@ CancelledEvolution:
jp Evolution_PartyMonLoop
EvolvedText:
- TX_FAR _EvolvedText
- db "@"
+ text_far _EvolvedText
+ text_end
IntoText:
- TX_FAR _IntoText
- db "@"
+ text_far _IntoText
+ text_end
StoppedEvolvingText:
- TX_FAR _StoppedEvolvingText
- db "@"
+ text_far _StoppedEvolvingText
+ text_end
IsEvolvingText:
- TX_FAR _IsEvolvingText
- db "@"
+ text_far _IsEvolvingText
+ text_end
Evolution_ReloadTilesetTilePatterns:
ld a, [wLinkState]
diff --git a/engine/pokemon/learn_move.asm b/engine/pokemon/learn_move.asm
index 09413c9b..e1b1a4c7 100755
--- a/engine/pokemon/learn_move.asm
+++ b/engine/pokemon/learn_move.asm
@@ -184,43 +184,43 @@ TryingToLearn:
ret
LearnedMove1Text:
- TX_FAR _LearnedMove1Text
- TX_SFX_ITEM_1 ; plays SFX_GET_ITEM_1 in the party menu (rare candy) and plays SFX_LEVEL_UP in battle
- TX_BLINK
- db "@"
+ text_far _LearnedMove1Text
+ sound_get_item_1 ; plays SFX_GET_ITEM_1 in the party menu (rare candy) and plays SFX_LEVEL_UP in battle
+ text_promptbutton
+ text_end
WhichMoveToForgetText:
- TX_FAR _WhichMoveToForgetText
- db "@"
+ text_far _WhichMoveToForgetText
+ text_end
AbandonLearningText:
- TX_FAR _AbandonLearningText
- db "@"
+ text_far _AbandonLearningText
+ text_end
DidNotLearnText:
- TX_FAR _DidNotLearnText
- db "@"
+ text_far _DidNotLearnText
+ text_end
TryingToLearnText:
- TX_FAR _TryingToLearnText
- db "@"
+ text_far _TryingToLearnText
+ text_end
OneTwoAndText:
- TX_FAR _OneTwoAndText
- TX_DELAY
- TX_ASM
+ text_far _OneTwoAndText
+ text_pause
+ text_asm
ld a, SFX_SWAP
call PlaySoundWaitForCurrent
ld hl, PoofText
ret
PoofText:
- TX_FAR _PoofText
- TX_DELAY
+ text_far _PoofText
+ text_pause
ForgotAndText:
- TX_FAR _ForgotAndText
- db "@"
+ text_far _ForgotAndText
+ text_end
HMCantDeleteText:
- TX_FAR _HMCantDeleteText
- db "@"
+ text_far _HMCantDeleteText
+ text_end
diff --git a/engine/pokemon/remove_mon.asm b/engine/pokemon/remove_mon.asm
index 6f7e91d6..c85b96bf 100644
--- a/engine/pokemon/remove_mon.asm
+++ b/engine/pokemon/remove_mon.asm
@@ -2,9 +2,9 @@ _RemovePokemon::
ld hl, wPartyCount
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7b74
+ jr z, .usePartyCount
ld hl, wNumInBox
-.asm_7b74
+.usePartyCount
ld a, [hl]
dec a
ld [hli], a
@@ -15,28 +15,28 @@ _RemovePokemon::
ld e, l
ld d, h
inc de
-.asm_7b81
+.shiftMonSpeciesLoop
ld a, [de]
inc de
ld [hli], a
- inc a
- jr nz, .asm_7b81
+ inc a ; reached terminator?
+ jr nz, .shiftMonSpeciesLoop ; if not, continue shifting species
ld hl, wPartyMonOT
- ld d, $5
+ ld d, PARTY_LENGTH - 1 ; max number of pokemon to shift
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7b97
+ jr z, .usePartyMonOTs
ld hl, wBoxMonOT
- ld d, $13
-.asm_7b97
+ ld d, MONS_PER_BOX - 1
+.usePartyMonOTs
ld a, [wWhichPokemon]
call SkipFixedLengthTextEntries
ld a, [wWhichPokemon]
- cp d
- jr nz, .asm_7ba6
- ld [hl], $ff
+ cp d ; are we removing the last pokemon?
+ jr nz, .notRemovingLastMon ; if not, shift the pokemon below
+ ld [hl], $ff ; else, write the terminator and return
ret
-.asm_7ba6
+.notRemovingLastMon
ld d, h
ld e, l
ld bc, NAME_LENGTH
@@ -44,41 +44,41 @@ _RemovePokemon::
ld bc, wPartyMonNicks
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7bb8
+ jr z, .usePartyMonNicks
ld bc, wBoxMonNicks
-.asm_7bb8
+.usePartyMonNicks
call CopyDataUntil
ld hl, wPartyMons
ld bc, wPartyMon2 - wPartyMon1
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7bcd
+ jr z, .usePartyMonStructs
ld hl, wBoxMons
ld bc, wBoxMon2 - wBoxMon1
-.asm_7bcd
+.usePartyMonStructs
ld a, [wWhichPokemon]
- call AddNTimes
- ld d, h
+ call AddNTimes ; get address of the pokemon removed
+ ld d, h ; store in de for CopyDataUntil
ld e, l
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7be4
+ jr z, .copyUntilPartyMonOTs
ld bc, wBoxMon2 - wBoxMon1
- add hl, bc
- ld bc, wBoxMonOT
- jr .asm_7beb
-.asm_7be4
+ add hl, bc ; get address of pokemon after the pokemon removed
+ ld bc, wBoxMonOT ; address of when to stop copying
+ jr .continue
+.copyUntilPartyMonOTs
ld bc, wPartyMon2 - wPartyMon1
- add hl, bc
- ld bc, wPartyMonOT
-.asm_7beb
- call CopyDataUntil
+ add hl, bc ; get address of pokemon after the pokemon removed
+ ld bc, wPartyMonOT ; address of when to stop copying
+.continue
+ call CopyDataUntil ; shift all pokemon data after the removed mon to the removed mon's location
ld hl, wPartyMonNicks
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7bfa
+ jr z, .usePartyMonNicks2
ld hl, wBoxMonNicks
-.asm_7bfa
+.usePartyMonNicks2
ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
@@ -86,10 +86,10 @@ _RemovePokemon::
ld e, l
ld bc, NAME_LENGTH
add hl, bc
- ld bc, wPokedexOwned
+ ld bc, wPartyMonNicksEnd
ld a, [wRemoveMonFromBox]
and a
- jr z, .asm_7c15
+ jr z, .copyUntilPartyMonNicksEnd
ld bc, wBoxMonNicksEnd
-.asm_7c15
+.copyUntilPartyMonNicksEnd
jp CopyDataUntil
diff --git a/engine/pokemon/status_screen.asm b/engine/pokemon/status_screen.asm
index b262a8b7..35cc9502 100755
--- a/engine/pokemon/status_screen.asm
+++ b/engine/pokemon/status_screen.asm
@@ -110,7 +110,7 @@ StatusScreen:
call DrawLineBox ; Draws the box around name, HP and status
ld de, -6
add hl, de
- ld [hl], "⠄" ; . after No ("." is a different one)
+ ld [hl], "<DOT>"
dec hl
ld [hl], "№"
coord hl, 19, 9
@@ -205,14 +205,17 @@ NamePointers2:
dw wDayCareMonName
Type1Text:
- db "TYPE1/", $4e
-
+ db "TYPE1/"
+ next ""
+ ; fallthrough
Type2Text:
- db "TYPE2/", $4e
-
+ db "TYPE2/"
+ next ""
+ ; fallthrough
IDNoText:
- db $73, "№/", $4e
-
+ db "<ID>№/"
+ next ""
+ ; fallthrough
OTText:
db "OT/"
next "@"
@@ -328,7 +331,7 @@ StatusScreen2:
ld b, a ; Number of moves ?
coord hl, 11, 10
ld de, SCREEN_WIDTH * 2
- ld a, $72 ; special P tile id
+ ld a, "<BOLD_P>"
call StatusScreen_PrintPP ; Print "PP"
ld a, b
and a
@@ -399,7 +402,7 @@ StatusScreen2:
ld [wLoadedMonLevel], a ; Increase temporarily if not 100
.Level100
coord hl, 14, 6
- ld [hl], $70 ; 1-tile "to"
+ ld [hl], "<to>"
inc hl
inc hl
call PrintLevel