mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-09-09 09:51:34 -07:00
baa0dc5a96
This is an informed attempt at reorganizing the engine/ directory by creating categorized subdirectories, in order to make it easier to navigate and find things. The directories created are as follows: * engine/game: Contains all "minigames", things like the unown puzzle and slot machine. * engine/gfx: Contains all handling of graphics. From loading palettes to playing animations. * engine/link: Contains all multiplayer functionality. * engine/menu: Contains all generic/misc. menus and menu code. Other, more specialized menus are in their own subdirectories (pokedex, pokegear, party menu, etc). * engine/overworld: Contains all handling of the overworld. From loading and connecting maps to wild encounters and the scripting engine. * engine/pokegear: In the same vein as engine/pokedex, except it could use some more splitting up. * engine/pokemon: Contains everything related to manipulating pokemon data. From the pokemon storage system to evolution and mail. * engine/printer: Contains everything related to printing things as well as the printer communication. * engine/title: Contains intro sequences, title screens and credits.
130 lines
2.2 KiB
NASM
130 lines
2.2 KiB
NASM
IsMailEuropean: ; 1de5c8
|
|
; 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.
|
|
StandardEnglishFont: ; 1de5e6
|
|
INCBIN "gfx/font/english.1bpp"
|
|
|
|
; An extended font.
|
|
FrenchGermanFont: ; 1de9e6
|
|
INCBIN "gfx/font/french_german.1bpp"
|
|
|
|
; An even more extended font.
|
|
SpanishItalianFont: ; 1dede6
|
|
INCBIN "gfx/font/spanish_italian.1bpp"
|
|
|
|
HandleFrenchGermanMail: ; 1df1e6
|
|
; 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:
|
|
DeutenEnglischenPost: ; 1df203
|
|
; 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
|
|
|
|
HandleSpanishItalianMail: ; 1df220
|
|
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
|