2018-06-24 14:09:41 +00:00
|
|
|
IsMailEuropean:
|
2017-12-16 01:10:54 +00:00
|
|
|
; return 1 if French
|
|
|
|
; return 2 if German
|
|
|
|
; return 3 if Italian
|
|
|
|
; return 4 if Spanish
|
|
|
|
; return 0 if none of the above
|
|
|
|
ld c, $0
|
|
|
|
ld hl, sPartyMon1MailAuthorNationality - sPartyMon1Mail
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
cp "E"
|
|
|
|
ret nz
|
|
|
|
ld a, [hli]
|
|
|
|
inc c
|
|
|
|
cp "F"
|
|
|
|
ret z
|
|
|
|
inc c
|
|
|
|
cp "G"
|
|
|
|
ret z
|
|
|
|
inc c
|
|
|
|
cp "I"
|
|
|
|
ret z
|
|
|
|
inc c
|
|
|
|
cp "S"
|
|
|
|
ret z
|
|
|
|
ld c, $0
|
|
|
|
ret
|
|
|
|
|
|
|
|
; The regular font.
|
2018-06-24 14:09:41 +00:00
|
|
|
StandardEnglishFont:
|
2017-12-16 01:10:54 +00:00
|
|
|
INCBIN "gfx/font/english.1bpp"
|
|
|
|
|
|
|
|
; An extended font.
|
2018-06-24 14:09:41 +00:00
|
|
|
FrenchGermanFont:
|
2017-12-16 01:10:54 +00:00
|
|
|
INCBIN "gfx/font/french_german.1bpp"
|
|
|
|
|
|
|
|
; An even more extended font.
|
2018-06-24 14:09:41 +00:00
|
|
|
SpanishItalianFont:
|
2017-12-16 01:10:54 +00:00
|
|
|
INCBIN "gfx/font/spanish_italian.1bpp"
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
HandleFrenchGermanMail:
|
2017-12-16 01:10:54 +00:00
|
|
|
; called if mail is french or german
|
|
|
|
; fix 's 't 'v
|
|
|
|
ld b, sPartyMon1MailAuthor - sPartyMon1Mail
|
|
|
|
ld h, d
|
|
|
|
ld l, e
|
|
|
|
.loop
|
|
|
|
ld a, [hl]
|
|
|
|
cp $dc ; 's in french/german font
|
|
|
|
jr nz, .check_intermediate_chars
|
|
|
|
ld a, "'s"
|
|
|
|
jr .replace
|
|
|
|
|
|
|
|
.check_intermediate_chars
|
|
|
|
sub "'s"
|
|
|
|
jr c, .dont_replace
|
|
|
|
cp "'v" - "'s" + 1
|
|
|
|
jr nc, .dont_replace
|
|
|
|
add $cd
|
|
|
|
|
|
|
|
.replace
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.dont_replace
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
|
|
|
LireLeCourrierAnglais:
|
2018-06-24 14:09:41 +00:00
|
|
|
DeutenEnglischenPost:
|
2017-12-16 01:10:54 +00:00
|
|
|
; Cette fonction convertit certains des caractères anglais pour
|
|
|
|
; leur équivalent dans le jeu de caractères français.
|
|
|
|
; Diese Funktion wandelt bestimmte englische Zeichen, um ihre
|
|
|
|
; Entsprechung in der Deutschen-Zeichensatz.
|
|
|
|
ld b, sPartyMon1MailAuthor - sPartyMon1Mail
|
|
|
|
ld h, d
|
|
|
|
ld l, e
|
|
|
|
.loop
|
|
|
|
ld a, [hl]
|
|
|
|
cp "'s"
|
|
|
|
jr nz, .check_intermediate_chars
|
|
|
|
ld a, $dc
|
|
|
|
jr .replace
|
|
|
|
|
|
|
|
.check_intermediate_chars
|
|
|
|
sub $cd
|
|
|
|
jr c, .dont_replace
|
|
|
|
cp "'v" - "'s" + 1
|
|
|
|
jr nc, .dont_replace
|
|
|
|
add "'s"
|
|
|
|
|
|
|
|
.replace
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.dont_replace
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
HandleSpanishItalianMail:
|
2017-12-16 01:10:54 +00:00
|
|
|
LeerCorreosIngleses:
|
|
|
|
LeggiPostaInglese:
|
|
|
|
; This function converts certain characters between
|
|
|
|
; the English and Spanish/Italian character sets.
|
|
|
|
; Esta función convierte ciertos caracteres entre
|
|
|
|
; el juego de caracteres Inglés y Español.
|
|
|
|
; Questa funzione converte alcuni caratteri tra
|
|
|
|
; l'inglese e il set di caratteri italiani.
|
|
|
|
ld b, sPartyMon1MailAuthor - sPartyMon1Mail
|
|
|
|
ld h, d
|
|
|
|
ld l, e
|
|
|
|
.loop
|
|
|
|
ld a, [hl]
|
|
|
|
and $f0
|
|
|
|
cp $d0
|
|
|
|
jr nz, .dont_replace
|
|
|
|
ld a, [hl]
|
|
|
|
add $8
|
|
|
|
and $f
|
|
|
|
or $d0
|
|
|
|
ld [hl], a
|
|
|
|
|
|
|
|
.dont_replace
|
|
|
|
inc hl
|
|
|
|
dec b
|
|
|
|
jr nz, .loop
|
|
|
|
ret
|