diff options
Diffstat (limited to 'engine')
| -rw-r--r-- | engine/slop_intro.asm | 55 |
1 files changed, 39 insertions, 16 deletions
diff --git a/engine/slop_intro.asm b/engine/slop_intro.asm index 84bbc53f..b3bcaaa6 100644 --- a/engine/slop_intro.asm +++ b/engine/slop_intro.asm @@ -1,27 +1,50 @@ -; Brief custom boot splash shown on the fastboot path (before the save is -; loaded). Reuses the same display setup as the menu/text system. +; Brief custom boot splash shown on the fastboot path. Loads a real 2bpp +; graphic (gfx/slop/intro.png -> tiles+tilemap via rgbgfx) into VRAM and holds +; it, then MainMenu's autoload continues into the game. + +DEF SLOP_INTRO_NUM_TILES EQU 164 SECTION "Slop Intro", ROMX SlopSplash:: call ClearScreen - call LoadFontTilePatterns - call RunDefaultPaletteCommand - hlcoord 6, 7 - ld de, .line1 - call PlaceString - hlcoord 4, 9 - ld de, .line2 - call PlaceString - ld b, HIGH(vBGMap1) +; load the custom tiles into the 0x8000 block (unsigned addressing) + ld hl, vChars0 + ld de, SlopIntroTiles + ld b, BANK(SlopIntroTiles) + ld c, SLOP_INTRO_NUM_TILES + call CopyVideoData + ldh a, [rLCDC] + or LCDC_BLOCK01 ; BG/window tile data at 0x8000 + ldh [rLCDC], a +; blit the 20x18 tilemap through wTileMap so the 20->32 row stride is handled. +; Use the BG map (vBGMap0): the map load on continue overwrites it, so nothing +; is left corrupting the overworld (unlike the window map vBGMap1). + ld hl, SlopIntroTilemap + ld de, wTileMap + ld bc, SlopIntroTilemapEnd - SlopIntroTilemap + call CopyData + ld b, HIGH(vBGMap0) call CopyScreenTileBufferToVRAM xor a - ldh [hWY], a - ld a, $01 - ldh [hAutoBGTransferEnabled], a + ldh [hSCX], a + ldh [hSCY], a + ld a, LCDC_ON | LCDC_BLOCK01 | LCDC_BG_9800 | LCDC_BG_ON ; BG only, tiles @0x8000 + ldh [rLCDC], a + call GBPalNormal ld c, 120 ; ~2 seconds call DelayFrames + call GBFadeOutToWhite +; restore the default LCDC so the overworld renders correctly: signed tile data +; (BLOCK21) for the BG *and* OBJ back on so entity sprites reappear + ld a, LCDC_DEFAULT + ldh [rLCDC], a ret -.line1: db "POKéMON@" -.line2: db "SL0P EDITION@" +SlopIntroTiles: + INCBIN "gfx/slop/intro.2bpp" +SlopIntroTilesEnd: + +SlopIntroTilemap: + INCBIN "gfx/slop/intro.tilemap" +SlopIntroTilemapEnd: |
