2013-09-08 03:24:22 +00:00
|
|
|
PrintMonTypes: ; 5090d
|
2014-07-09 19:50:33 +00:00
|
|
|
; Print one or both types of [CurSpecies]
|
|
|
|
; on the stats screen at hl.
|
2013-09-08 03:24:22 +00:00
|
|
|
|
|
|
|
push hl
|
|
|
|
call GetBaseData
|
|
|
|
pop hl
|
|
|
|
|
|
|
|
push hl
|
|
|
|
ld a, [BaseType1]
|
2014-07-09 19:50:33 +00:00
|
|
|
call .Print
|
2013-09-08 03:24:22 +00:00
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
; Single-typed monsters really
|
|
|
|
; have two of the same type.
|
2013-09-08 03:24:22 +00:00
|
|
|
ld a, [BaseType1]
|
|
|
|
ld b, a
|
|
|
|
ld a, [BaseType2]
|
|
|
|
cp b
|
|
|
|
pop hl
|
2014-07-09 19:50:33 +00:00
|
|
|
jr z, .hide_type_2
|
2013-09-08 03:24:22 +00:00
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
ld bc, SCREEN_WIDTH
|
2013-09-08 03:24:22 +00:00
|
|
|
add hl, bc
|
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
.Print
|
2013-09-08 03:24:22 +00:00
|
|
|
ld b, a
|
|
|
|
jr PrintType
|
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
.hide_type_2
|
|
|
|
; Erase any type name that was here before.
|
|
|
|
; Seems to be pointless in localized versions.
|
2013-09-08 03:24:22 +00:00
|
|
|
ld a, " "
|
2014-07-09 19:50:33 +00:00
|
|
|
ld bc, SCREEN_WIDTH - 3
|
2013-09-08 03:24:22 +00:00
|
|
|
add hl, bc
|
|
|
|
ld [hl], a
|
|
|
|
inc bc
|
|
|
|
add hl, bc
|
|
|
|
ld bc, 5
|
|
|
|
jp ByteFill
|
|
|
|
; 5093a
|
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
|
2013-09-08 03:24:22 +00:00
|
|
|
PrintMoveType: ; 5093a
|
|
|
|
; Print the type of move b at hl.
|
|
|
|
|
|
|
|
push hl
|
|
|
|
ld a, b
|
|
|
|
dec a
|
2014-06-11 06:23:55 +00:00
|
|
|
ld bc, MOVE_LENGTH
|
2013-09-08 03:24:22 +00:00
|
|
|
ld hl, Moves
|
|
|
|
call AddNTimes
|
|
|
|
ld de, StringBuffer1
|
|
|
|
ld a, BANK(Moves)
|
|
|
|
call FarCopyBytes
|
2014-06-11 06:23:55 +00:00
|
|
|
ld a, [StringBuffer1 + MOVE_TYPE]
|
2013-09-08 03:24:22 +00:00
|
|
|
pop hl
|
|
|
|
|
|
|
|
ld b, a
|
2014-07-09 19:50:33 +00:00
|
|
|
|
2013-09-08 03:24:22 +00:00
|
|
|
|
|
|
|
PrintType: ; 50953
|
|
|
|
; Print type b at hl.
|
2014-07-09 19:50:33 +00:00
|
|
|
|
2013-09-08 03:24:22 +00:00
|
|
|
ld a, b
|
|
|
|
|
|
|
|
push hl
|
|
|
|
add a
|
|
|
|
ld hl, TypeNames
|
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
|
|
|
add hl, de
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld d, [hl]
|
|
|
|
pop hl
|
|
|
|
|
|
|
|
jp PlaceString
|
|
|
|
; 50964
|
|
|
|
|
|
|
|
|
|
|
|
GetTypeName: ; 50964
|
2015-02-10 23:32:30 +00:00
|
|
|
; Copy the name of type [wd265] to StringBuffer1.
|
2014-07-09 19:50:33 +00:00
|
|
|
|
2015-02-10 23:32:30 +00:00
|
|
|
ld a, [wd265]
|
2013-09-08 03:24:22 +00:00
|
|
|
ld hl, TypeNames
|
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
2015-07-21 02:18:18 +00:00
|
|
|
rept 2
|
2013-09-08 03:24:22 +00:00
|
|
|
add hl, de
|
2015-07-21 02:18:18 +00:00
|
|
|
endr
|
2013-09-08 03:24:22 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
ld de, StringBuffer1
|
2014-07-09 19:50:33 +00:00
|
|
|
ld bc, 13
|
2013-09-08 03:24:22 +00:00
|
|
|
jp CopyBytes
|
|
|
|
; 5097b
|
|
|
|
|
|
|
|
|
|
|
|
TypeNames: ; 5097b
|
|
|
|
dw Normal
|
|
|
|
dw Fighting
|
|
|
|
dw Flying
|
|
|
|
dw Poison
|
|
|
|
dw Ground
|
|
|
|
dw Rock
|
|
|
|
dw Bird
|
|
|
|
dw Bug
|
|
|
|
dw Ghost
|
|
|
|
dw Steel
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
|
|
|
dw Normal
|
2014-07-09 19:50:33 +00:00
|
|
|
dw CurseType
|
2013-09-08 03:24:22 +00:00
|
|
|
dw Fire
|
|
|
|
dw Water
|
|
|
|
dw Grass
|
|
|
|
dw Electric
|
|
|
|
dw Psychic
|
|
|
|
dw Ice
|
|
|
|
dw Dragon
|
|
|
|
dw Dark
|
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
Normal: db "NORMAL@"
|
|
|
|
Fighting: db "FIGHTING@"
|
|
|
|
Flying: db "FLYING@"
|
|
|
|
Poison: db "POISON@"
|
|
|
|
CurseType: db "???@"
|
|
|
|
Fire: db "FIRE@"
|
|
|
|
Water: db "WATER@"
|
|
|
|
Grass: db "GRASS@"
|
|
|
|
Electric: db "ELECTRIC@"
|
|
|
|
Psychic: db "PSYCHIC@"
|
|
|
|
Ice: db "ICE@"
|
|
|
|
Ground: db "GROUND@"
|
|
|
|
Rock: db "ROCK@"
|
|
|
|
Bird: db "BIRD@"
|
|
|
|
Bug: db "BUG@"
|
|
|
|
Ghost: db "GHOST@"
|
|
|
|
Steel: db "STEEL@"
|
|
|
|
Dragon: db "DRAGON@"
|
|
|
|
Dark: db "DARK@"
|
2013-09-08 03:24:22 +00:00
|
|
|
|
2014-07-09 19:50:33 +00:00
|
|
|
; 50a28
|