2020-07-04 21:09:35 +00:00
|
|
|
CIRCLE_TILE_ID EQU $70
|
|
|
|
|
2020-06-27 19:32:24 +00:00
|
|
|
DisplayDiploma::
|
2014-05-22 22:13:20 +00:00
|
|
|
call SaveScreenTilesToBuffer2
|
|
|
|
call GBPalWhiteOutWithDelay3
|
|
|
|
call ClearScreen
|
|
|
|
xor a
|
2014-09-13 07:50:56 +00:00
|
|
|
ld [wUpdateSpritesEnabled], a
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-22 22:13:20 +00:00
|
|
|
set 6, [hl]
|
|
|
|
call DisableLCD
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, CircleTile
|
2020-07-07 19:09:54 +00:00
|
|
|
ld de, vChars2 tile CIRCLE_TILE_ID
|
2020-07-04 05:00:45 +00:00
|
|
|
ld bc, $10
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(CircleTile)
|
|
|
|
call FarCopyData2
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 0, 0
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 16, 18
|
2015-02-07 10:43:08 +00:00
|
|
|
predef Diploma_TextBoxBorder
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, DiplomaTextPointersAndCoords
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, $5
|
|
|
|
.asm_56715
|
|
|
|
push bc
|
|
|
|
ld a, [hli]
|
|
|
|
ld e, a
|
|
|
|
ld a, [hli]
|
|
|
|
ld d, a
|
|
|
|
ld a, [hli]
|
|
|
|
push hl
|
|
|
|
ld h, [hl]
|
|
|
|
ld l, a
|
|
|
|
call PlaceString
|
|
|
|
pop hl
|
|
|
|
inc hl
|
|
|
|
pop bc
|
|
|
|
dec c
|
2015-07-03 19:37:53 +00:00
|
|
|
jr nz, .asm_56715
|
2020-07-07 15:30:10 +00:00
|
|
|
hlcoord 10, 4
|
2014-06-14 11:12:40 +00:00
|
|
|
ld de, wPlayerName
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaceString
|
2020-07-07 01:18:22 +00:00
|
|
|
farcall DrawPlayerCharacter
|
2015-07-17 07:16:27 +00:00
|
|
|
|
|
|
|
; Move the player 33 pixels right and set the priority bit so he appears
|
|
|
|
; behind the background layer.
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wOAMBuffer + $01
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, $80, $28
|
2015-07-17 07:16:27 +00:00
|
|
|
.adjustPlayerGfxLoop
|
|
|
|
ld a, [hl] ; X
|
|
|
|
add 33
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
inc hl
|
|
|
|
ld a, b
|
2015-07-17 07:16:27 +00:00
|
|
|
ld [hli], a ; attributes
|
2014-05-22 22:13:20 +00:00
|
|
|
inc hl
|
|
|
|
dec c
|
2015-07-17 07:16:27 +00:00
|
|
|
jr nz, .adjustPlayerGfxLoop
|
|
|
|
|
2014-05-22 22:13:20 +00:00
|
|
|
call EnableLCD
|
2020-07-07 01:18:22 +00:00
|
|
|
farcall LoadTrainerInfoTextBoxTiles
|
2015-08-12 09:16:56 +00:00
|
|
|
ld b, SET_PAL_GENERIC
|
|
|
|
call RunPaletteCommand
|
2014-05-22 22:13:20 +00:00
|
|
|
call Delay3
|
|
|
|
call GBPalNormal
|
|
|
|
ld a, $90
|
2020-07-06 23:03:05 +00:00
|
|
|
ldh [rOBP0], a
|
2014-05-22 22:13:20 +00:00
|
|
|
call WaitForTextScrollButtonPress
|
2014-05-26 21:04:56 +00:00
|
|
|
ld hl, wd730
|
2014-05-22 22:13:20 +00:00
|
|
|
res 6, [hl]
|
|
|
|
call GBPalWhiteOutWithDelay3
|
2014-09-10 03:55:19 +00:00
|
|
|
call RestoreScreenTilesAndReloadTilePatterns
|
2014-05-22 22:13:20 +00:00
|
|
|
call Delay3
|
|
|
|
jp GBPalNormal
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
UnusedPlayerNameLengthFunc:
|
2015-07-17 07:16:27 +00:00
|
|
|
; Unused function that does a calculation involving the length of the player's
|
|
|
|
; name.
|
2014-06-14 11:12:40 +00:00
|
|
|
ld hl, wPlayerName
|
2020-07-04 02:11:35 +00:00
|
|
|
lb bc, $ff, $00
|
2015-07-17 07:16:27 +00:00
|
|
|
.loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [hli]
|
2015-07-17 07:16:27 +00:00
|
|
|
cp "@"
|
2014-05-22 22:13:20 +00:00
|
|
|
ret z
|
|
|
|
dec c
|
2015-07-17 07:16:27 +00:00
|
|
|
jr .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2020-08-31 14:23:19 +00:00
|
|
|
diploma_text: MACRO
|
|
|
|
dw \3
|
|
|
|
dwcoord \1, \2
|
|
|
|
ENDM
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
DiplomaTextPointersAndCoords:
|
2020-08-31 14:23:19 +00:00
|
|
|
; x, y, text
|
|
|
|
diploma_text 5, 2, DiplomaText
|
|
|
|
diploma_text 3, 4, DiplomaPlayer
|
|
|
|
diploma_text 15, 4, DiplomaEmptyText
|
|
|
|
diploma_text 2, 6, DiplomaCongrats
|
|
|
|
diploma_text 9, 16, DiplomaGameFreak
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
DiplomaText:
|
2020-07-04 21:09:35 +00:00
|
|
|
db CIRCLE_TILE_ID, "Diploma", CIRCLE_TILE_ID, "@"
|
2014-05-22 22:13:20 +00:00
|
|
|
|
|
|
|
DiplomaPlayer:
|
|
|
|
db "Player@"
|
|
|
|
|
|
|
|
DiplomaEmptyText:
|
|
|
|
db "@"
|
|
|
|
|
|
|
|
DiplomaCongrats:
|
|
|
|
db "Congrats! This"
|
|
|
|
next "diploma certifies"
|
|
|
|
next "that you have"
|
|
|
|
next "completed your"
|
|
|
|
next "#DEX.@"
|
|
|
|
|
|
|
|
DiplomaGameFreak:
|
|
|
|
db "GAME FREAK@"
|