Move code out of data/

This commit is contained in:
Remy Oukaour 2018-01-16 18:07:06 -05:00
parent 5407d8de92
commit 01ba6bed88
4 changed files with 54 additions and 52 deletions

View File

@ -1,4 +1,4 @@
Dakutens: ; unused UnreferencedDakutens:
db "かが", "きぎ", "くぐ", "けげ", "こご" db "かが", "きぎ", "くぐ", "けげ", "こご"
db "さざ", "しじ", "すず", "せぜ", "そぞ" db "さざ", "しじ", "すず", "せぜ", "そぞ"
db "ただ", "ちぢ", "つづ", "てで", "とど" db "ただ", "ちぢ", "つづ", "てで", "とど"
@ -9,7 +9,7 @@ Dakutens: ; unused
db "ハバ", "ヒビ", "フブ", "へべ", "ホボ" db "ハバ", "ヒビ", "フブ", "へべ", "ホボ"
db -1 ; end db -1 ; end
Handakutens: ; unused UnreferencedHandakutens:
db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ" db "はぱ", "ひぴ", "ふぷ", "へぺ", "ほぽ"
db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ" db "ハパ", "ヒピ", "フプ", "へぺ", "ホポ"
db -1 ; end db -1 ; end

View File

@ -1,72 +1,52 @@
Unreferenced_GetGen1TrainerClassName: ; 50a28 Gen1TrainerClassNames: ; 50a42
ld hl, .Strings
ld a, [TrainerClass]
dec a
ld c, a
ld b, 0
add hl, bc
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
ld de, StringBuffer1
.copy
ld a, [hli]
ld [de], a
inc de
cp "@"
jr nz, .copy
ret
.Strings: ; 50a42
; Untranslated trainer class names from Red. ; Untranslated trainer class names from Red.
dw .Youngster dw .Youngster
dw .BugCatcher dw .BugCatcher
dw .Lass dw .Lass
dw OTClassName dw OTClassName ; sailor
dw .JrTrainerM dw .JrTrainerM
dw .JrTrainerF dw .JrTrainerF
dw .Pokemaniac dw .Pokemaniac
dw .SuperNerd dw .SuperNerd
dw OTClassName dw OTClassName ; hiker
dw OTClassName dw OTClassName ; biker
dw .Burglar dw .Burglar
dw .Engineer dw .Engineer
dw .Jack dw .Jack
dw OTClassName dw OTClassName ; fisher
dw .Swimmer dw .Swimmer
dw OTClassName dw OTClassName ; cue ball
dw OTClassName dw OTClassName ; gambler
dw .Beauty dw .Beauty
dw OTClassName dw OTClassName ; psychic
dw .Rocker dw .Rocker
dw .Juggler dw .Juggler
dw OTClassName dw OTClassName ; tamer
dw OTClassName dw OTClassName ; bird keeper
dw .Blackbelt dw .Blackbelt
dw OTClassName dw OTClassName ; rival1
dw .ProfOak dw .ProfOak
dw .Chief dw .Chief
dw .Scientist dw .Scientist
dw OTClassName dw OTClassName ; giovanni
dw .Rocket dw .Rocket
dw .CooltrainerM dw .CooltrainerM
dw .CooltrainerF dw .CooltrainerF
dw OTClassName dw OTClassName ; bruno
dw OTClassName dw OTClassName ; brock
dw OTClassName dw OTClassName ; misty
dw OTClassName dw OTClassName ; lt.surge
dw OTClassName dw OTClassName ; erika
dw OTClassName dw OTClassName ; koga
dw OTClassName dw OTClassName ; blaine
dw OTClassName dw OTClassName ; sabrina
dw OTClassName dw OTClassName ; gentleman
dw OTClassName dw OTClassName ; rival2
dw OTClassName dw OTClassName ; rival3
dw OTClassName dw OTClassName ; lorelei
dw OTClassName dw OTClassName ; channeler
dw OTClassName dw OTClassName ; agatha
dw OTClassName dw OTClassName ; lance
.Youngster: db "たんパン@" .Youngster: db "たんパン@"
.BugCatcher: db "むしとり@" .BugCatcher: db "むしとり@"

View File

@ -35,7 +35,7 @@ PrintMonTypes: ; 5090d
ld [hl], a ld [hl], a
inc bc inc bc
add hl, bc add hl, bc
ld bc, 5 ld bc, NAME_LENGTH_JAPANESE - 1
jp ByteFill jp ByteFill
; 5093a ; 5093a
@ -91,9 +91,32 @@ GetTypeName: ; 50964
ld h, [hl] ld h, [hl]
ld l, a ld l, a
ld de, StringBuffer1 ld de, StringBuffer1
ld bc, 13 ld bc, MOVE_NAME_LENGTH
jp CopyBytes jp CopyBytes
; 5097b ; 5097b
INCLUDE "data/types/names.asm" INCLUDE "data/types/names.asm"
Unreferenced_GetGen1TrainerClassName: ; 50a28
ld hl, Gen1TrainerClassNames
ld a, [TrainerClass]
dec a
ld c, a
ld b, 0
add hl, bc
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
ld de, StringBuffer1
.copy
ld a, [hli]
ld [de], a
inc de
cp "@"
jr nz, .copy
ret
INCLUDE "data/unused/gen_1_trainer_names.asm"

View File

@ -253,7 +253,6 @@ INCLUDE "engine/events/basement_key.asm"
INCLUDE "engine/events/sacred_ash.asm" INCLUDE "engine/events/sacred_ash.asm"
INCLUDE "engine/tempmon.asm" INCLUDE "engine/tempmon.asm"
INCLUDE "engine/types.asm" INCLUDE "engine/types.asm"
INCLUDE "data/unused/gen_1_trainer_names.asm"
INCLUDE "engine/mon_stats.asm" INCLUDE "engine/mon_stats.asm"
INCLUDE "engine/routines/initlist.asm" INCLUDE "engine/routines/initlist.asm"
INCLUDE "engine/experience.asm" INCLUDE "engine/experience.asm"