PrintPage1:
	hlcoord 0, 0
	ld de, wPrinterTilemap
	ld bc, 17 * SCREEN_WIDTH
	rst CopyBytes
	hlcoord 17, 1, wPrinterTilemap
	ld a, $62
	ld [hli], a
	inc a
	ld [hl], a
	hlcoord 17, 2, wPrinterTilemap
	ld a, $64
	ld [hli], a
	inc a
	ld [hl], a
	hlcoord 1, 9, wPrinterTilemap
	ld a, " "
	ld [hli], a
	ld [hl], a
	hlcoord 1, 10, wPrinterTilemap
	ld a, $61
	ld [hli], a
	ld [hl], a
	hlcoord 2, 11, wPrinterTilemap
	lb bc, 5, 18
	call ClearBox
	ld a, [wd265]
	dec a
	call CheckCaughtMon
	push af
	ld a, [wd265]
	ld b, a
	ld c, 1 ; get page 1
	callba GetDexEntryPagePointer
	pop af
	ld a, b
	hlcoord 1, 11, wPrinterTilemap
	call nz, FarText
	hlcoord 19, 0, wPrinterTilemap
	ld [hl], $35
	ld de, SCREEN_WIDTH
	add hl, de
	ld b, $f
.column_loop
	ld [hl], $37
	add hl, de
	dec b
	jr nz, .column_loop
	ld [hl], $3a
	ret

PrintPage2:
	hlcoord 0, 0, wPrinterTilemap
	push hl
	ld bc, SCREEN_WIDTH * 8
	ld a, " "
	call ByteFill
	pop hl
	ld a, $36
	ld b, $6
	call .FillColumn
	hlcoord 19, 0, wPrinterTilemap
	ld a, $37
	ld b, $6
	call .FillColumn
	hlcoord 0, 6, wPrinterTilemap
	ld a, $38
	ld [hli], a
	inc a
	ld bc, SCREEN_WIDTH - 2
	call ByteFill
	ld a, $3a
	ld [hli], a
	ld bc, SCREEN_WIDTH
	ld a, $32
	call ByteFill
	ld a, [wd265]
	dec a
	call CheckCaughtMon
	push af
	ld a, [wd265]
	ld b, a
	ld c, 2 ; get page 2
	callba GetDexEntryPagePointer
	pop af
	hlcoord 1, 1, wPrinterTilemap
	ld a, b
	jp nz, FarText
	ret

.FillColumn
	push de
	ld de, SCREEN_WIDTH
.column_loop
	ld [hl], a
	add hl, de
	dec b
	jr nz, .column_loop
	pop de
	ret

GBPrinterStrings:
String_Printer_CheckingLink:
	text ""
	next " CHECKING LINK..."
String_Printer_Blank:
	done
String_Printer_Transmitting:
	db TX_COMPRESSED
	db $a7, $85, $21, $4e, $4a, $c1, $ea, $05, $5d, $14, $53, $a0, $7b, $0b, $de
	db $f5, $34
String_Printer_Printing:
	db TX_COMPRESSED
	db $a7, $85, $24, $9c, $2e, $47, $40, $f2, $9d, $03, $d8, $5e, $f7
	db $a9, $a0
String_Printer_Error1:
	start_asm
	ld a, 1
	jr StringPrinterError
String_Printer_Error2:
	start_asm
	ld a, 2
	jr StringPrinterError
String_Printer_Error3:
	start_asm
	ld a, 3
	jr StringPrinterError
String_Printer_Error4:
	start_asm
	ld a, 4
StringPrinterError:
	ld [wTempNumber], a
	ld hl, .text
	ret
.text
	db TX_COMPRESSED, $9c, $2b, $19, $2c, $d7, $05, $cb, $58, $57, $1c, $c0
	deciram wTempNumber, 1, 1
	db TX_COMPRESSED
	db $a7
	db $85, $4f, $09, $b5, $26, $ca, $94, $b4, $9c, $61, $6b, $e7, $04, $82
	db $0a, $9e, $17, $0a, $c6, $4b, $35, $c1, $5d, $23, $5b, $df
	db $53, $40

Function1dc381:
	call ClearBGPalettes
	call ClearTileMap
	call ClearSprites
	xor a
	ld [hBGMapMode], a
	call LoadFontsBattleExtra

	ld de, PrinterHPIcon
	ld hl, vBGTiles tile $71
	lb bc, BANK(PrinterHPIcon), 1
	call Request1bpp

	ld de, PrinterLvIcon
	ld hl, vBGTiles tile $6e
	lb bc, BANK(PrinterLvIcon), 1
	call Request1bpp

	ld de, ShinyIcon
	ld hl, vBGTiles tile $3f
	lb bc, BANK(ShinyIcon), 1
	call Get2bpp

	xor a
	ld [wMonType], a
	callba CopyPkmnToTempMon
	hlcoord 0, 7
	lb bc, 9, 18
	call TextBox
	hlcoord 8, 2
	ld a, [TempMonLevel]
	call PrintFullLevel
	hlcoord 12, 2
	ld [hl], "◀" ; Filled left triangle
	inc hl
	ld de, TempMonMaxHP
	lb bc, 2, 3
	call PrintNum
	ld a, [wCurPartySpecies]
	ld [wd265], a
	ld [wCurSpecies], a
	ld hl, wPartyMonNicknames
	call Function1dc50e
	hlcoord 8, 4
	call PlaceString
	hlcoord 9, 6
	ld [hl], "/"
	call GetPokemonName
	hlcoord 10, 6
	call PlaceString
	hlcoord 8, 0
	ld [hl], "№"
	inc hl
	ld [hl], "."
	inc hl
	ld de, wd265
	lb bc, PRINTNUM_LEADINGZEROS | 1, 3
	call PrintNum
	hlcoord 1, 9
	ld de, .OT_string
	call PlaceString
	ld hl, wPartyMonOT
	call Function1dc50e
	hlcoord 4, 9
	call PlaceString
	hlcoord 1, 11
	ld de, .id_no_string
	call PlaceString
	hlcoord 4, 11
	ld de, TempMonID
	lb bc, PRINTNUM_LEADINGZEROS | 2, 5
	call PrintNum
	hlcoord 1, 14
	ld de, .move_string
	call PlaceString
	hlcoord 7, 14
	ld a, [TempMonMoves + 0]
	call PrintMoveName
	call PrintMonGenderShininess
	ld hl, wBoxAlignment
	xor a
	ld [hl], a
	ld a, [wCurPartySpecies]
	inc [hl]
	hlcoord 0, 0
	call _PrepMonFrontpic
	call ApplyTilemapInVBlank
	ld b, SCGB_STATS_SCREEN_HP_PALS
	predef GetSGBLayout
	jp SetPalettes

.OT_string
	db "OT/@"

.move_string
	db "Move@"

.id_no_string
	db "<ID>№.@"

Function1dc47b:
	call ClearBGPalettes
	call ClearTileMap
	call ClearSprites
	xor a
	ld [hBGMapMode], a
	call LoadFontsBattleExtra
	xor a
	ld [wMonType], a
	callba CopyPkmnToTempMon
	hlcoord 0, 0
	lb bc, 15, 18
	call TextBox
	ld bc, SCREEN_WIDTH
	decoord 0, 0
	hlcoord 0, 1
	rst CopyBytes
	hlcoord 7, 0
	ld a, [TempMonMoves + 1]
	call PrintMoveName
	hlcoord 7, 2
	ld a, [TempMonMoves + 2]
	call PrintMoveName
	hlcoord 7, 4
	ld a, [TempMonMoves + 3]
	call PrintMoveName
	hlcoord 7, 7
	ld de, .stat_names
	call PlaceText
	hlcoord 16, 7
	ld de, TempMonAttack
	call .PrintTempMonStats
	hlcoord 16, 9
	ld de, TempMonDefense
	call .PrintTempMonStats
	hlcoord 16, 11
	ld de, TempMonSpclAtk
	call .PrintTempMonStats
	hlcoord 16, 13
	ld de, TempMonSpclDef
	call .PrintTempMonStats
	hlcoord 16, 15
	ld de, TempMonSpeed
	call .PrintTempMonStats
	call ApplyTilemapInVBlank
	ld b, SCGB_STATS_SCREEN_HP_PALS
	predef GetSGBLayout
	jp SetPalettes

.PrintTempMonStats
	lb bc, 2, 3
	jp PrintNum

.stat_names
	db TX_COMPRESSED, $ae, $ef, $59, $52
	db $a7, $85, $c0, $78, $19, $10
	db $74, $f0, $94, $08, $67, $be, $ae, $d4
	db $a9, $e1, $28, $10, $cf, $7d, $c0, $78
	db $53, $c2, $50, $20, $cf
	db $34, $d0

Function1dc50e:
	ld bc, NAME_LENGTH
	ld a, [wCurPartyMon]
	rst AddNTimes
	ld e, l
	ld d, h
	ret

PrintMoveName:
	and a
	jr z, .no_move
	ld [wd265], a
	call GetMoveName
	jr .got_string
.no_move
	ld de, .no_move_string
.got_string
	jp PlaceString
.no_move_string
	db "------------@"

PrintMonGenderShininess:
	callba GetGender
	ld a, " "
	jr c, .got_gender
	ld a, "♂"
	jr nz, .got_gender
	ld a, "♀"

.got_gender
	hlcoord 17, 2
	ld [hl], a
	ld bc, TempMonDVs
	callba CheckShininess
	ret nc
	hlcoord 18, 2
	ld [hl], "<SHINY>"
	ret

