pokered/engine/menu/diploma.asm

114 lines
1.9 KiB
NASM
Raw Normal View History

2016-06-12 00:24:04 +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
ld hl, wd730
2014-05-22 22:13:20 +00:00
set 6, [hl]
call DisableLCD
ld hl, CircleTile
2014-05-29 08:31:46 +00:00
ld de, vChars2 + $700
2014-05-22 22:13:20 +00:00
ld bc, $0010
ld a, BANK(CircleTile)
call FarCopyData2
2015-07-18 20:52:03 +00:00
coord hl, 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
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
jr nz, .asm_56715
2015-07-18 20:52:03 +00:00
coord hl, 10, 4
ld de, wPlayerName
2014-05-22 22:13:20 +00:00
call PlaceString
2015-07-17 07:16:27 +00:00
callba DrawPlayerCharacter
; Move the player 33 pixels right and set the priority bit so he appears
; behind the background layer.
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
callba 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
2015-07-13 20:35:35 +00:00
ld [rOBP0], a
2014-05-22 22:13:20 +00:00
call WaitForTextScrollButtonPress
ld hl, wd730
2014-05-22 22:13:20 +00:00
res 6, [hl]
call GBPalWhiteOutWithDelay3
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.
ld hl, wPlayerName
2014-05-22 22:13:20 +00:00
ld bc, $ff00
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
2016-06-12 00:24:04 +00:00
DiplomaTextPointersAndCoords:
2014-05-22 22:13:20 +00:00
dw DiplomaText
dwCoord 5, 2
2014-05-22 22:13:20 +00:00
dw DiplomaPlayer
dwCoord 3, 4
2014-05-22 22:13:20 +00:00
dw DiplomaEmptyText
dwCoord 15, 4
2014-05-22 22:13:20 +00:00
dw DiplomaCongrats
dwCoord 2, 6
2014-05-22 22:13:20 +00:00
dw DiplomaGameFreak
dwCoord 9, 16
2014-05-22 22:13:20 +00:00
DiplomaText:
db $70,"Diploma",$70,"@"
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@"