summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoryenatch <yenatch@gmail.com>2015-02-11 14:08:07 -0800
committeryenatch <yenatch@gmail.com>2015-02-11 14:08:07 -0800
commita31b4586df7a659f15f5c864c469d309bf60f719 (patch)
treec5a216b997c01e7423060df3d69497368a8d53c8
parentf4e0e611143cc9ee896b70ce179e9a7adf3211ab (diff)
Split out the diploma code.
-rw-r--r--engine/diploma.asm94
-rw-r--r--main.asm92
2 files changed, 95 insertions, 91 deletions
diff --git a/engine/diploma.asm b/engine/diploma.asm
new file mode 100644
index 000000000..bf6e89fa8
--- /dev/null
+++ b/engine/diploma.asm
@@ -0,0 +1,94 @@
+
+Function1dd702: ; 1dd702
+ call Function1dd709
+ call Functiona80
+ ret
+; 1dd709
+
+Function1dd709: ; 1dd709
+ call WhiteBGMap
+ call ClearTileMap
+ call ClearSprites
+ call DisableLCD
+ ld hl, LZ_1dd805
+ ld de, VTiles2
+ call Decompress
+ ld hl, Tilemap_1ddc4b
+ ld de, TileMap
+ ld bc, $0168
+ call CopyBytes
+ ld de, String_1dd760
+ hlcoord 2, 5
+ call PlaceString
+ ld de, String_1dd767
+ hlcoord 15, 5
+ call PlaceString
+ ld de, PlayerName
+ hlcoord 9, 5
+ call PlaceString
+ ld de, String_1dd768
+ hlcoord 2, 8
+ call PlaceString
+ call EnableLCD
+ call WaitBGMap
+ ld b, $8
+ call GetSGBLayout
+ call Function32f9
+ call DelayFrame
+ ret
+; 1dd760
+
+String_1dd760:
+ db "PLAYER@"
+
+String_1dd767:
+ db "@"
+
+String_1dd768:
+ db "This certifies"
+ next "that you have"
+ next "completed the"
+ next "new #DEX."
+ next "Congratulations!"
+ db "@"
+; 1dd7ae
+
+Function1dd7ae: ; 1dd7ae
+ ld hl, TileMap
+ ld bc, $0168
+ ld a, $7f
+ call ByteFill
+ ld hl, Tilemap_1dddb3
+ ld de, TileMap
+ ld bc, $0168
+ call CopyBytes
+ ld de, String_1dd7fa
+ hlcoord 8, 0
+ call PlaceString
+ ld de, String_1dd7f0
+ hlcoord 3, 15
+ call PlaceString
+ hlcoord 12, 15
+ ld de, GameTimeHours
+ ld bc, $0204
+ call PrintNum
+ ld [hl], $67
+ inc hl
+ ld de, GameTimeMinutes
+ ld bc, $8102
+ call PrintNum
+ ret
+; 1dd7f0
+
+String_1dd7f0: db "PLAY TIME@"
+String_1dd7fa: db "GAME FREAK@"
+; 1dd805
+
+LZ_1dd805: ; 1dd805
+INCBIN "gfx/unknown/1dd805.2bpp.lz"
+
+Tilemap_1ddc4b: ; 1ddc4b
+INCBIN "gfx/unknown/1ddc4b.tilemap"
+
+Tilemap_1dddb3: ; 1dddb3
+INCBIN "gfx/unknown/1dddb3.tilemap"
diff --git a/main.asm b/main.asm
index e4fd63d10..77ff826bc 100644
--- a/main.asm
+++ b/main.asm
@@ -100345,99 +100345,9 @@ String_1dd6fc: db "AM@"
String_1dd6ff: db "PM@"
; 1dd702
-Function1dd702: ; 1dd702
- call Function1dd709
- call Functiona80
- ret
-; 1dd709
-
-Function1dd709: ; 1dd709
- call WhiteBGMap
- call ClearTileMap
- call ClearSprites
- call DisableLCD
- ld hl, LZ_1dd805
- ld de, VTiles2
- call Decompress
- ld hl, Tilemap_1ddc4b
- ld de, TileMap
- ld bc, $0168
- call CopyBytes
- ld de, String_1dd760
- hlcoord 2, 5
- call PlaceString
- ld de, String_1dd767
- hlcoord 15, 5
- call PlaceString
- ld de, PlayerName
- hlcoord 9, 5
- call PlaceString
- ld de, String_1dd768
- hlcoord 2, 8
- call PlaceString
- call EnableLCD
- call WaitBGMap
- ld b, $8
- call GetSGBLayout
- call Function32f9
- call DelayFrame
- ret
-; 1dd760
-
-String_1dd760:
- db "PLAYER@"
-
-String_1dd767:
- db "@"
-
-String_1dd768:
- db "This certifies"
- next "that you have"
- next "completed the"
- next "new #DEX."
- next "Congratulations!"
- db "@"
-; 1dd7ae
-
-Function1dd7ae: ; 1dd7ae
- ld hl, TileMap
- ld bc, $0168
- ld a, $7f
- call ByteFill
- ld hl, Tilemap_1dddb3
- ld de, TileMap
- ld bc, $0168
- call CopyBytes
- ld de, String_1dd7fa
- hlcoord 8, 0
- call PlaceString
- ld de, String_1dd7f0
- hlcoord 3, 15
- call PlaceString
- hlcoord 12, 15
- ld de, GameTimeHours
- ld bc, $0204
- call PrintNum
- ld [hl], $67
- inc hl
- ld de, GameTimeMinutes
- ld bc, $8102
- call PrintNum
- ret
-; 1dd7f0
-
-String_1dd7f0: db "PLAY TIME@"
-String_1dd7fa: db "GAME FREAK@"
-; 1dd805
-
-LZ_1dd805: ; 1dd805
-INCBIN "gfx/unknown/1dd805.2bpp.lz"
-Tilemap_1ddc4b: ; 1ddc4b
-INCBIN "gfx/unknown/1ddc4b.tilemap"
+INCLUDE "engine/diploma.asm"
-Tilemap_1dddb3: ; 1dddb3
-INCBIN "gfx/unknown/1dddb3.tilemap"
Function1ddf1c: ; 1ddf1c
ld hl, LZ_1ddf33