2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleScreen:
|
2015-11-11 20:38:57 -08:00
|
|
|
call ClearBGPalettes
|
2020-02-13 09:30:13 -08:00
|
|
|
call ClearTilemap
|
2015-02-10 19:15:15 -08:00
|
|
|
call DisableLCD
|
2017-12-15 19:36:33 -08:00
|
|
|
|
|
|
|
; Turn BG Map update off
|
2015-02-10 19:15:15 -08:00
|
|
|
xor a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hBGMapMode], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
2017-12-15 19:36:33 -08:00
|
|
|
; Reset timing variables
|
2015-10-24 16:49:19 -07:00
|
|
|
ld hl, wJumptableIndex
|
2017-12-15 19:36:33 -08:00
|
|
|
ld [hli], a ; wJumptableIndex
|
|
|
|
ld [hli], a ; wIntroSceneFrameCounter
|
|
|
|
ld [hli], a ; wTitleScreenTimer
|
|
|
|
ld [hl], a ; wTitleScreenTimer + 1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
ld hl, UnusedTitleBG_GFX
|
2017-12-28 04:32:33 -08:00
|
|
|
ld de, vTiles2
|
|
|
|
ld bc, vBGMap0 - vTiles2
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
2017-12-15 19:36:33 -08:00
|
|
|
ld hl, UnusedTitleBG_GFX + $80 tiles
|
2017-12-28 04:32:33 -08:00
|
|
|
ld de, vTiles1
|
|
|
|
ld bc, vTiles2 - vTiles1
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
ld hl, UnusedTitleFG_GFX
|
2017-12-28 04:32:33 -08:00
|
|
|
ld de, vTiles0
|
|
|
|
ld bc, vTiles1 - vTiles0
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
ld hl, UnusedTitleBG_Tilemap
|
2015-11-20 08:47:52 -08:00
|
|
|
debgcoord 0, 0
|
2018-01-10 10:47:57 -08:00
|
|
|
ld bc, BG_MAP_WIDTH * BG_MAP_HEIGHT
|
2015-02-10 19:15:15 -08:00
|
|
|
.copy
|
|
|
|
ld a, 0
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
ld a, 1
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
ld a, [hli]
|
|
|
|
ld [de], a
|
|
|
|
inc de
|
|
|
|
dec bc
|
|
|
|
ld a, b
|
|
|
|
or c
|
|
|
|
jr nz, .copy
|
|
|
|
|
|
|
|
ld hl, UnusedTitleFG_OAM
|
2018-01-30 11:52:46 -08:00
|
|
|
ld de, wVirtualOAMSprite00
|
2018-01-10 10:47:57 -08:00
|
|
|
ld bc, SPRITEOAMSTRUCT_LENGTH * NUM_SPRITE_OAM_STRUCTS
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
call EnableLCD
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rLCDC]
|
2017-12-29 10:22:33 -08:00
|
|
|
set rLCDC_SPRITES_ENABLE, a
|
2017-12-29 09:53:21 -08:00
|
|
|
set rLCDC_SPRITE_SIZE, a
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rLCDC], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
call DelayFrame
|
|
|
|
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [rSVBK]
|
2015-02-10 19:15:15 -08:00
|
|
|
push af
|
2018-01-03 16:12:45 -08:00
|
|
|
ld a, BANK(wBGPals1)
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
2015-06-26 10:46:52 -07:00
|
|
|
ld hl, UnusedTitleBG_Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
ld de, wBGPals1
|
2017-12-15 19:36:33 -08:00
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
2015-06-26 10:46:52 -07:00
|
|
|
ld hl, UnusedTitleFG_Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
ld de, wOBPals1
|
2017-12-15 19:36:33 -08:00
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
2015-06-26 10:46:52 -07:00
|
|
|
ld hl, UnusedTitleBG_Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
ld de, wBGPals2
|
2017-12-15 19:36:33 -08:00
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
2015-06-26 10:46:52 -07:00
|
|
|
ld hl, UnusedTitleFG_Palettes
|
2018-01-01 06:08:21 -08:00
|
|
|
ld de, wOBPals2
|
2017-12-15 19:36:33 -08:00
|
|
|
ld bc, 8 palettes
|
2015-02-10 19:15:15 -08:00
|
|
|
call CopyBytes
|
|
|
|
|
|
|
|
pop af
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [rSVBK], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
ld a, $1
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh [hCGBPalUpdate], a
|
2015-02-10 19:15:15 -08:00
|
|
|
|
|
|
|
ld de, MUSIC_TITLE
|
|
|
|
call PlayMusic
|
|
|
|
|
|
|
|
ret
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleBG_GFX:
|
2015-02-10 19:15:15 -08:00
|
|
|
INCBIN "gfx/title/old_bg.2bpp"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleBG_Tilemap:
|
2018-01-09 19:44:06 -08:00
|
|
|
; 32x32 (alternating tiles and attributes)
|
|
|
|
INCBIN "gfx/title/old_bg.tilemap"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleBG_Palettes:
|
2018-01-09 20:21:32 -08:00
|
|
|
INCLUDE "gfx/title/old_bg.pal"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleFG_GFX:
|
2015-02-10 19:15:15 -08:00
|
|
|
INCBIN "gfx/title/old_fg.2bpp"
|
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleFG_Palettes:
|
2018-01-09 20:21:32 -08:00
|
|
|
INCLUDE "gfx/title/old_fg.pal"
|
2015-02-10 19:15:15 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
UnusedTitleFG_OAM:
|
2018-01-09 19:44:06 -08:00
|
|
|
dsprite 3, 0, 7, 0, $00, 1
|
|
|
|
dsprite 3, 0, 8, 0, $02, 1
|
|
|
|
dsprite 3, 0, 9, 0, $04, 1
|
|
|
|
dsprite 3, 0, 10, 0, $06, 1
|
|
|
|
dsprite 3, 0, 11, 0, $08, 1
|
|
|
|
dsprite 3, 0, 12, 0, $0a, 1
|
|
|
|
dsprite 3, 0, 13, 0, $0c, 1
|
|
|
|
dsprite 3, 0, 14, 0, $0e, 1
|
|
|
|
dsprite 5, 0, 7, 0, $10, 0
|
|
|
|
dsprite 5, 0, 8, 0, $12, 0
|
|
|
|
dsprite 5, 0, 9, 0, $14, 0
|
|
|
|
dsprite 5, 0, 10, 0, $16, 0
|
|
|
|
dsprite 5, 0, 11, 0, $18, 0
|
|
|
|
dsprite 5, 0, 12, 0, $1a, 0
|
|
|
|
dsprite 5, 0, 13, 0, $1c, 0
|
|
|
|
dsprite 5, 0, 14, 0, $1e, 0
|
|
|
|
dsprite 7, 0, 7, 0, $20, 0
|
|
|
|
dsprite 7, 0, 8, 0, $22, 0
|
|
|
|
dsprite 7, 0, 9, 0, $24, 0
|
|
|
|
dsprite 7, 0, 10, 0, $26, 0
|
|
|
|
dsprite 7, 0, 11, 0, $28, 0
|
|
|
|
dsprite 7, 0, 12, 0, $2a, 0
|
|
|
|
dsprite 7, 0, 13, 0, $2c, 0
|
|
|
|
dsprite 7, 0, 14, 0, $2e, 0
|
|
|
|
dsprite 9, 0, 7, 0, $30, 2
|
|
|
|
dsprite 9, 0, 8, 0, $32, 2
|
|
|
|
dsprite 9, 0, 9, 0, $34, 2
|
|
|
|
dsprite 9, 0, 10, 0, $36, 2
|
|
|
|
dsprite 9, 0, 11, 0, $38, 2
|
|
|
|
dsprite 9, 0, 12, 0, $3a, 2
|
|
|
|
dsprite 9, 0, 13, 0, $3c, 2
|
|
|
|
dsprite 9, 0, 14, 0, $3e, 2
|
|
|
|
dsprite 11, 0, 7, 0, $40, 1
|
|
|
|
dsprite 11, 0, 8, 0, $42, 1
|
|
|
|
dsprite 11, 0, 9, 0, $44, 1
|
|
|
|
dsprite 11, 0, 10, 0, $46, 1
|
|
|
|
dsprite 11, 0, 11, 0, $48, 1
|
|
|
|
dsprite 11, 0, 12, 0, $4a, 1
|
|
|
|
dsprite 11, 0, 13, 0, $4c, 1
|
|
|
|
dsprite 11, 0, 14, 0, $4e, 1
|
2015-02-10 19:15:15 -08:00
|
|
|
|
2018-06-24 07:09:41 -07:00
|
|
|
Function10ed51:
|
2015-02-10 19:15:15 -08:00
|
|
|
call _TitleScreen
|
|
|
|
.loop
|
2015-10-17 09:58:26 -07:00
|
|
|
call JoyTextDelay
|
2018-08-25 11:28:22 -07:00
|
|
|
ldh a, [hJoyLast]
|
2015-02-10 19:15:15 -08:00
|
|
|
ld b, a
|
|
|
|
and 1
|
|
|
|
jr nz, .done
|
2015-10-21 07:43:42 -07:00
|
|
|
call SuicuneFrameIterator
|
2015-02-10 19:15:15 -08:00
|
|
|
call DelayFrame
|
|
|
|
jr .loop
|
|
|
|
.done
|
|
|
|
ret
|