2018-06-24 14:09:41 +00:00
|
|
|
PrintMonTypes:
|
2018-01-23 22:39:09 +00:00
|
|
|
; Print one or both types of [wCurSpecies]
|
2014-07-09 19:50:33 +00:00
|
|
|
; on the stats screen at hl.
|
2013-09-08 03:24:22 +00:00
|
|
|
|
|
|
|
push hl
|
|
|
|
call GetBaseData
|
|
|
|
pop hl
|
|
|
|
|
|
|
|
push hl
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseType1]
|
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.
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseType1]
|
2013-09-08 03:24:22 +00:00
|
|
|
ld b, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wBaseType2]
|
2013-09-08 03:24:22 +00:00
|
|
|
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
|
|
|
|
|
2016-04-10 18:42:14 +00:00
|
|
|
.Print:
|
2013-09-08 03:24:22 +00:00
|
|
|
ld b, a
|
2018-01-16 19:30:10 +00:00
|
|
|
jr PrintType
|
2013-09-08 03:24:22 +00:00
|
|
|
|
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
|
2018-01-16 23:07:06 +00:00
|
|
|
ld bc, NAME_LENGTH_JAPANESE - 1
|
2013-09-08 03:24:22 +00:00
|
|
|
jp ByteFill
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
PrintMoveType:
|
2013-09-08 03:24:22 +00:00
|
|
|
; 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
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wStringBuffer1
|
2013-09-08 03:24:22 +00:00
|
|
|
ld a, BANK(Moves)
|
|
|
|
call FarCopyBytes
|
2018-01-23 22:39:09 +00:00
|
|
|
ld a, [wStringBuffer1 + MOVE_TYPE]
|
2013-09-08 03:24:22 +00:00
|
|
|
pop hl
|
|
|
|
|
|
|
|
ld b, a
|
2014-07-09 19:50:33 +00:00
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
PrintType:
|
2013-09-08 03:24:22 +00:00
|
|
|
; 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
|
|
|
|
|
2018-06-24 14:09:41 +00:00
|
|
|
GetTypeName:
|
2020-12-23 21:29:30 +00:00
|
|
|
; Copy the name of type [wNamedObjectIndex] to wStringBuffer1.
|
2014-07-09 19:50:33 +00:00
|
|
|
|
2020-12-23 21:29:30 +00:00
|
|
|
ld a, [wNamedObjectIndex]
|
2013-09-08 03:24:22 +00:00
|
|
|
ld hl, TypeNames
|
|
|
|
ld e, a
|
|
|
|
ld d, 0
|
|
|
|
add hl, de
|
2016-05-04 15:46:23 +00:00
|
|
|
add hl, de
|
2013-09-08 03:24:22 +00:00
|
|
|
ld a, [hli]
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
2018-01-23 22:39:09 +00:00
|
|
|
ld de, wStringBuffer1
|
2018-01-16 23:07:06 +00:00
|
|
|
ld bc, MOVE_NAME_LENGTH
|
2013-09-08 03:24:22 +00:00
|
|
|
jp CopyBytes
|
|
|
|
|
2018-01-11 06:45:27 +00:00
|
|
|
INCLUDE "data/types/names.asm"
|