aboutsummaryrefslogtreecommitdiffstats
path: root/engine/events/diploma2.asm
diff options
context:
space:
mode:
authorNarishma-gb <194818981+Narishma-gb@users.noreply.github.com>2025-09-10 06:31:11 +0200
committerGitHub <noreply@github.com>2025-09-10 00:31:11 -0400
commitd237b01cfb241f417567c964e0df0658cf921570 (patch)
tree799e92e48259443aa6cf4c553ed7adf38bd442d4 /engine/events/diploma2.asm
parentMerge branch 'master' of https://github.com/pret/pokered (diff)
downloadpokeyellow-d237b01cfb241f417567c964e0df0658cf921570.tar.gz
pokeyellow-d237b01cfb241f417567c964e0df0658cf921570.tar.xz
pokeyellow-d237b01cfb241f417567c964e0df0658cf921570.zip
Misc. naming and cleanup (#139)
* Name some printer/diploma routines * Name `wd434` * Name `NAME_LENGTH_JP` * Rename `callabd`/`calladb` to `farcall`/`callfar`
Diffstat (limited to 'engine/events/diploma2.asm')
-rw-r--r--engine/events/diploma2.asm102
1 files changed, 40 insertions, 62 deletions
diff --git a/engine/events/diploma2.asm b/engine/events/diploma2.asm
index 87a44439..0653526d 100644
--- a/engine/events/diploma2.asm
+++ b/engine/events/diploma2.asm
@@ -1,22 +1,19 @@
DEF CIRCLE_TILE_ID EQU $10
-_DisplayDiploma:
+DisplayDiplomaTop:
call GBPalWhiteOutWithDelay3
call ClearScreen
- ld de, SurfingPikachu3Graphics
+ ld de, DiplomaGraphics
ld hl, vChars2
- lb bc, BANK(SurfingPikachu3Graphics), (SurfingPikachu3GraphicsEnd - SurfingPikachu3Graphics) / $10
+ lb bc, BANK(DiplomaGraphics), (DiplomaGraphicsEnd - DiplomaGraphics) / $10
call CopyVideoData
hlcoord 0, 0
- call Func_e9bdf
-
+ call DiplomaDrawHorizontalBorder
hlcoord 0, 0
- call Func_e9beb
-
+ call DiplomaDrawVerticalBorder
hlcoord 19, 0
- call Func_e9beb
-
+ call DiplomaDrawVerticalBorder
ld a, $00
hlcoord 0, 0
ld [hl], a
@@ -67,105 +64,86 @@ DiplomaCongrats:
DiplomaGameFreak:
db "GAME FREAK@"
-Func_e9ad3:
+DisplayDiplomaBottom:
call ClearScreen
hlcoord 0, 17
- call Func_e9bdf
+ call DiplomaDrawHorizontalBorder
hlcoord 0, 0
- call Func_e9beb
+ call DiplomaDrawVerticalBorder
hlcoord 19, 0
- call Func_e9beb
+ call DiplomaDrawVerticalBorder
ld a, $00
hlcoord 0, 17
ld [hl], a
hlcoord 19, 17
ld [hl], a
- ld de, Tilemap_e9b3e
+
+ ld de, DiplomaPikachuTiles
hlcoord 6, 2
lb bc, 10, 12
call Diploma_Surfing_CopyBox
- ld de, Tilemap_e9bb6
+
+ ld de, CongratulationsTiles
hlcoord 5, 13
lb bc, 1, 11
call Diploma_Surfing_CopyBox
- ld de, String_e9bd5
+
+ ld de, DiplomaPlayTime
hlcoord 2, 15
call PlaceString
hlcoord 12, 15
ld de, wPlayTimeHours
- lb bc, $40 | 1, 3
+ lb bc, LEFT_ALIGN | 1, 3
call PrintNumber
- ld [hl], $16
+ ld [hl], $16 ; colon
inc hl
ld de, wPlayTimeMinutes
- lb bc, $80 | 1, 2
+ lb bc, LEADING_ZEROES | 1, 2
call PrintNumber
+
ld a, [wNumSetBits]
- cp 151
+ cp NUM_POKEMON
ret nz
- ld de, TileMap_e9bc1
+ ld de, DiplomaMewTiles
hlcoord 2, 0
lb bc, 4, 5
call Diploma_Surfing_CopyBox
ret
-Tilemap_e9b3e:
- db $7f, $7f, $7f, $1a, $1b, $7f, $7f, $7f, $7f, $7f
- db $7f, $7f, $7f, $7f, $7f, $1c, $1d, $1e, $1f, $20
- db $7f, $21, $22, $23, $7f, $24, $25, $26, $27, $28
- db $29, $2a, $2b, $2c, $2d, $2e, $2f, $30, $31, $32
- db $33, $34, $35, $36, $37, $38, $39, $3a, $3b, $3c
- db $7f, $3d, $3e, $3f, $40, $41, $42, $43, $29, $44
- db $45, $46, $47, $48, $49, $4a, $4b, $29, $29, $4c
- db $4d, $4e, $4f, $50, $51, $52, $53, $54, $55, $56
- db $57, $58, $59, $7f, $7f, $7f, $5a, $5b, $5c, $5d
- db $5e, $5f, $60, $61, $62, $7f, $7f, $7f, $7f, $63
- db $64, $65, $66, $67, $68, $7f, $7f, $7f, $7f, $7f
- db $7f, $69, $6a, $6b, $6c, $6d, $6e, $7f, $7f, $7f
+DiplomaPikachuTiles:
+INCBIN "gfx/diploma/diploma_pikachu.tilemap"
-Tilemap_e9bb6:
- db $05
- db $06
- db $07
- db $08
- db $09
- db $0a
- db $0b
- db $0c
- db $0d
- db $0e
- db $0f
+CongratulationsTiles:
+ db $05, $06, $07, $08, $09, $0a, $0b, $0c, $0d, $0e, $0f ; CONGRATULATIONS!
-TileMap_e9bc1:
- db $70, $71, $7f, $72, $7f
- db $73, $74, $75, $76, $77
- db $7f, $78, $11, $12, $13
- db $7f, $7f, $14, $15, $7f
+DiplomaMewTiles:
+INCBIN "gfx/diploma/diploma_mew.tilemap"
-String_e9bd5: db "PLAY TIME@"
+DiplomaPlayTime:
+ db "PLAY TIME@"
-Func_e9bdf:
- ld c, 10
-.asm_e9be1
+DiplomaDrawHorizontalBorder:
+ ld c, SCREEN_WIDTH / 2
+.loop
ld [hl], $02
inc hl
ld [hl], $01
inc hl
dec c
- jr nz, .asm_e9be1
+ jr nz, .loop
ret
-Func_e9beb:
- ld c, 9
+DiplomaDrawVerticalBorder:
+ ld c, SCREEN_HEIGHT / 2
ld de, SCREEN_WIDTH
-.asm_e9bed
+.loop
ld [hl], $04
add hl, de
ld [hl], $03
add hl, de
dec c
- jr nz, .asm_e9bed
+ jr nz, .loop
ret
-SurfingPikachu3Graphics: INCBIN "gfx/surfing_pikachu/surfing_pikachu_3.2bpp"
-SurfingPikachu3GraphicsEnd:
+DiplomaGraphics: INCBIN "gfx/diploma/diploma.2bpp"
+DiplomaGraphicsEnd: