forked from Rangi42/polishedcrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpokecenter_check.txt
47 lines (45 loc) · 1.16 KB
/
pokecenter_check.txt
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
PokecenterCheck:
set #1, MAP_GROUP_OFFSET
call GetGameDataPointer
seek #result
getfilehalfword #result
set #address, .pokecenters
.loop
gethalfwordinc #temp, #address
jumpz #temp, .not_in_pokecenter
ifne #temp, #result, .loop
return
.not_in_pokecenter
print .not_in_pokecenter_string
menu #result, YesNoMenu
retz #result
exit #result
.not_in_pokecenter_string
string "You are not currently inside a Pokémon Center. Remember that, in order to ensure patching is successful, you should be inside a Pokémon Center when patching your savefile and exit it immediately when you continue the game. Do you want to continue patching anyway?"
.pokecenters
; map group, map number
db 1, 1 ;Olivine
db 2, 3 ;Mahogany
db 4, 3 ;Ecruteak
db 5, 6 ;Blackthorn
db 6, 1 ;Cinnabar
db 7, 4 ;Cerulean
db 7, 8 ;Route 10
db 8, 1 ;Azalea
db 10, 8 ;Violet
db 10, 11 ;Route 32
db 11, 24 ;Goldenrod
db 12, 5 ;Vermilion
db 14, 3 ;Route 3
db 14, 8 ;Pewter
db 16, 3 ;Indigo
db 17, 12 ;Fuchsia
db 18, 6 ;Lavender
db 19, 3 ;Silver
db 21, 20 ;Celadon
db 22, 6 ;Cianwood
db 23, 10 ;Viridian
db 25, 4 ;Saffron
db 26, 6 ;Cherrygrove
db 31, 8 ;Shamouti
dh 0