This repository has been archived by the owner on Aug 26, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
namerater.asm
107 lines (96 loc) · 1.79 KB
/
namerater.asm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
NameRaterScript:
jp EnableAutoTextBoxDrawing
NameRaterScript_1da15:
call PrintText
call YesNoChoice
ld a, [wCurrentMenuItem]
and a
ret
NameRaterScript_1da20:
ld hl, wPartyMonOT
ld bc, NAME_LENGTH
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerName
ld c, NAME_LENGTH
call .asm_1da47
jr c, .asm_1da52
ld hl, wPartyMon1OTID
ld bc, wPartyMon2 - wPartyMon1
ld a, [wWhichPokemon]
call AddNTimes
ld de, wPlayerID
ld c, $2
.asm_1da47
ld a, [de]
cp [hl]
jr nz, .asm_1da52
inc hl
inc de
dec c
jr nz, .asm_1da47
and a
ret
.asm_1da52
scf
ret
NameRaterTextPointers:
dw NameRaterText1
NameRaterText1:
TX_ASM
call SaveScreenTilesToBuffer2
ld hl, NameRaterText_1dab3
call NameRaterScript_1da15
jr nz, .asm_1daae
ld hl, NameRaterText_1dab8
call PrintText
xor a
ld [wPartyMenuTypeOrMessageID], a
ld [wUpdateSpritesEnabled], a
ld [wMenuItemToSwap], a
call DisplayPartyMenu
push af
call GBPalWhiteOutWithDelay3
call RestoreScreenTilesAndReloadTilePatterns
call LoadGBPal
pop af
jr c, .asm_1daae
call GetPartyMonName2
call NameRaterScript_1da20
ld hl, NameRaterText_1dad1
jr c, .asm_1daa8
ld hl, NameRaterText_1dabd
call NameRaterScript_1da15
jr nz, .asm_1daae
ld hl, NameRaterText_1dac2
call PrintText
callba DisplayNameRaterScreen
jr c, .asm_1daae
ld hl, NameRaterText_1dac7
.asm_1daa8
call PrintText
jp TextScriptEnd
.asm_1daae
ld hl, NameRaterText_1dacc
jr .asm_1daa8
NameRaterText_1dab3:
TX_FAR _NameRaterText_1dab3
db "@"
NameRaterText_1dab8:
TX_FAR _NameRaterText_1dab8
db "@"
NameRaterText_1dabd:
TX_FAR _NameRaterText_1dabd
db "@"
NameRaterText_1dac2:
TX_FAR _NameRaterText_1dac2
db "@"
NameRaterText_1dac7:
TX_FAR _NameRaterText_1dac7
db "@"
NameRaterText_1dacc:
TX_FAR _NameRaterText_1dacc
db "@"
NameRaterText_1dad1:
TX_FAR _NameRaterText_1dad1
db "@"