diff options
author | Rangi <remy.oukaour+rangi@gmail.com> | 2020-09-20 13:58:03 -0400 |
---|---|---|
committer | Rangi <remy.oukaour+rangi@gmail.com> | 2020-09-20 13:58:03 -0400 |
commit | fac958b280056922a1828b71a04d84a36e1e807a (patch) | |
tree | c094adc59182b253a61defb5fb85de7a9d77b7cc /engine/title.asm | |
parent | bfb981f1885d21cc59d2656e84c87bb8d64a089c (diff) |
- Remove trailing whitespace
- Indent with single tabs, not spaces
- Colons after labels
- Capitalize BANK, HIGH, and LOW
- dbw BANK(X), X -> dba X
Diffstat (limited to 'engine/title.asm')
-rw-r--r-- | engine/title.asm | 218 |
1 files changed, 109 insertions, 109 deletions
diff --git a/engine/title.asm b/engine/title.asm index 4b63412..11f80a0 100644 --- a/engine/title.asm +++ b/engine/title.asm @@ -3,34 +3,34 @@ INCLUDE "constants.asm" SECTION "engine/title.asm@Title screen", ROMX IntroSequence:: - callab GameFreakIntro ; Bank $39 + callab GameFreakIntro ; Bank $39 jr c, TitleSequenceStart ld a, [wTitleSequenceOpeningType] and a jr z, .opening_sequence - + .pikachu_minigame - callab PikachuMiniGame ; Bank $38 + callab PikachuMiniGame ; Bank $38 jr TitleSequenceStart .opening_sequence - callab OpeningCutscene ; Bank $39 + callab OpeningCutscene ; Bank $39 TitleSequenceStart:: call TitleSequenceInit - callab SetTitleBGDecorationBorder ; Bank $02 - + callab SetTitleBGDecorationBorder ; Bank $02 + .loop - call TitleScreenMain + call TitleScreenMain jr nc, .loop - + call ClearBGPalettes call ClearSprites ld a, $01 ldh [hBGMapMode], a call ClearTileMap call UpdateTimePals - + ld a, [wJumptableIndex + 1] ld e, a ld d, 0 @@ -40,31 +40,31 @@ TitleSequenceStart:: ld a, [hli] ld h, [hl] ld l, a - + jp hl TitleScreenJumpTable:: dw MainMenu - dw DebugMenu + dw DebugMenu dw SRAMClearMenu dw IntroSequence TitleSequenceInit:: call ClearPalettes - + xor a ldh [hMapAnims], a ldh [hSCY], a ldh [hSCX], a - - ld de, MUSIC_NONE ; Stop the music. + + ld de, MUSIC_NONE ; Stop the music. call PlayMusic - + call ClearTileMap call DisableLCD call ClearSprites - - callba InitEffectObject ; Bank $23 + + callba InitEffectObject ; Bank $23 ld hl, vChars0 ld bc, vBGMap0 - vChars0 @@ -81,70 +81,70 @@ TitleSequenceInit:: ld bc, 13 tiles ld a, BANK(TitleScreenGFX) call FarCopyData - + ld hl, TitleScreenVersionGFX ld de, vChars2 + 96 tiles ld bc, 24 tiles ld a, BANK(TitleScreenVersionGFX) call FarCopyData - + ld hl, TitleScreenHoOhGFX ld de, vChars2 ld bc, 49 tiles ld a, BANK(TitleScreenHoOhGFX) call FarCopyData - + ld hl, TitleScreenLogoGFX ld de, vChars1 ld bc, 58 tiles ld a, BANK(TitleScreenLogoGFX) call FarCopyData - + ld hl, TitleScreenGoldLogoGFX ld de, vChars0 + 186 tiles ld bc, 20 tiles ld a, BANK(TitleScreenGoldLogoGFX) call FarCopyData - + call SetTitleGfx ld hl, wTileMapBackup ld a, $24 ld [hli], a ld a, $00 ld [hli], a - + ld hl, vBGMap0 ld bc, 128 tiles ld a, " " call ByteFill - + ld b, $06 call GetSGBLayout call EnableLCD - ld a, $01 + ld a, $01 ldh [hBGMapMode], a call WaitBGMap xor a ldh [hBGMapMode], a ld hl, wJumptableIndex - ld [hli], a ; (Possibly wJumptableIndex from Crystal) - ld [hli], a ; (Possibly wIntroSceneFrameCounter from Crystal) - ld [hli], a ; (Possibly wTitleScreenTimer from Crystal) - ld [hl], a ; (Possibly wTitleScreenTimer + 1 from Crystal) - + ld [hli], a ; (Possibly wJumptableIndex from Crystal) + ld [hli], a ; (Possibly wIntroSceneFrameCounter from Crystal) + ld [hli], a ; (Possibly wTitleScreenTimer from Crystal) + ld [hl], a ; (Possibly wTitleScreenTimer + 1 from Crystal) + call .load_position_table - - + + ld a, %00011010 ldh [rBGP], a ld a, %11100100 ldh [rOBP0], a ret - + .load_position_table: ld hl, FirePositionTable - ld c, 6 ; Load 6 flying objects on the screen. - + ld c, 6 ; Load 6 flying objects on the screen. + .set_fire_note_loop push bc ld e, [hl] @@ -152,7 +152,7 @@ TitleSequenceInit:: ld d, [hl] inc hl push hl - ld a, $2E ; Title fire/note object effect type? + ld a, $2E ; Title fire/note object effect type? call InitSpriteAnimStruct pop hl pop bc @@ -168,15 +168,15 @@ FirePositionTable:: dw $7CB0 dw $8800 -TitleFireGFX:: INCBIN "gfx/title/fire.2bpp" ; 5EB8-5F37 -TitleNotesGFX:: INCBIN "gfx/title/notes.2bpp" ; 5F38=5FB7 +TitleFireGFX:: INCBIN "gfx/title/fire.2bpp" ; 5EB8-5F37 +TitleNotesGFX:: INCBIN "gfx/title/notes.2bpp" ; 5F38=5FB7 TitleScreenMain:: ld a, [wJumptableIndex] bit 7, a jr nz, .exit call TitleScreenSequence - callba EffectObjectJumpNoDelay ; Bank $23 + callba EffectObjectJumpNoDelay ; Bank $23 call DelayFrame and a ret @@ -195,47 +195,47 @@ TitleScreenSequence:: ld h, [hl] ld l, a jp hl - + TitleScreenSequenceTable:: - dw TitleSeq_Start - dw TitleSeq_LoadPokemonLogo - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_MoveTitle - dw TitleSeq_MoveTitleEnd - dw TitleSeq_InitFlashTitle + dw TitleSeq_Start + dw TitleSeq_LoadPokemonLogo + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_MoveTitle + dw TitleSeq_MoveTitleEnd + dw TitleSeq_InitFlashTitle dw TitleSeq_FlashTitle - dw TitleSeq_PMJapaneseChara - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_WaitForNextSequence - dw TitleSeq_PMSubtitle - dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_PMJapaneseChara + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_WaitForNextSequence + dw TitleSeq_PMSubtitle + dw TitleSeq_IncreaseJumpTableIndex dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_WaitForNextSequence - dw TitleSeq_Version - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_WaitForNextSequence + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_WaitForNextSequence + dw TitleSeq_Version + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_WaitForNextSequence dw TitleSeq_CopyRight - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_WaitForNextSequence - dw TitleSeq_HoOh - dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_WaitForNextSequence + dw TitleSeq_HoOh + dw TitleSeq_IncreaseJumpTableIndex + dw TitleSeq_IncreaseJumpTableIndex dw TitleSeq_IncreaseJumpTableIndex - dw TitleSeq_WaitForNextSequence - dw TitleSeq_PressButtonInit - dw TitleSeq_TitleScreenInputAndTimeout + dw TitleSeq_WaitForNextSequence + dw TitleSeq_PressButtonInit + dw TitleSeq_TitleScreenInputAndTimeout dw TitleSeq_FadeMusicOut TitleSeq_IncreaseJumpTableIndex:: @@ -262,13 +262,13 @@ TitleSeq_LoadPokemonLogo:: call TitleSeq_IncreaseJumpTableIndex ld a, $01 ldh [hBGMapMode], a - ret - -TitleSeq_Start:: + ret + +TitleSeq_Start:: call TitleSeq_IncreaseJumpTableIndex push de ld de, $002D - call PlaySFX ; Play "Swish" sound + call PlaySFX ; Play "Swish" sound pop de ld a, $80 ld [wJumptableIndex + 2], a @@ -277,7 +277,7 @@ TitleSeq_Start:: ldh [hLCDCPointer], a ret -TitleSeq_MoveTitle:: +TitleSeq_MoveTitle:: xor a ldh [hBGMapMode], a ld hl, wJumptableIndex + 2 @@ -297,14 +297,14 @@ TitleSeq_MoveTitle:: .nextseq call TitleSeq_IncreaseJumpTableIndex - ret - + ret + TitleSeq_MoveTitleEnd:: xor a ldh [hLCDCPointer], a call TitleSeq_IncreaseJumpTableIndex ld de, MUSIC_TITLE - call PlayMusic ; Play "Title Theme" + call PlayMusic ; Play "Title Theme" ret TitleSeq_InitFlashTitle:: @@ -315,7 +315,7 @@ TitleSeq_InitFlashTitle:: ld [wJumptableIndex + 3], a ret -TitleSeq_FlashTitle:: +TitleSeq_FlashTitle:: ld hl, wJumptableIndex + 3 ld a, [hl] and a @@ -362,7 +362,7 @@ TitleSeq_Version:: ldh [hBGMapMode], a ret -TitleSeq_CopyRight:: +TitleSeq_CopyRight:: call PrintCopyRight ld a, $10 ld [wJumptableIndex + 2], a @@ -384,12 +384,12 @@ TitleSeq_PressButtonInit:: ld hl, wJumptableIndex inc [hl] ld hl, wJumptableIndex + 2 - ld de, DecodeNybble0Table - 3 ; DecodeNybble0Table - 3 = $0C00 + ld de, DecodeNybble0Table - 3 ; DecodeNybble0Table - 3 = $0C00 ld [hl], e inc hl ld [hl], d - ret - + ret + TitleSeq_TitleScreenInputAndTimeout:: ld hl, wJumptableIndex + 2 ld e, [hl] @@ -403,29 +403,29 @@ TitleSeq_TitleScreenInputAndTimeout:: dec hl ld [hl], e call GetJoypad - ld hl, hJoyState + ld hl, hJoyState ld a, [hl] - and D_UP | B_BUTTON | SELECT ; UP + B + SELECT brings you to the SRAM clear screen. + and D_UP | B_BUTTON | SELECT ; UP + B + SELECT brings you to the SRAM clear screen. cp D_UP | B_BUTTON | SELECT jr z, .psbtn_sramclear ld a, [hl] - and SELECT ; SELECT will bring you to the debug menu. + and SELECT ; SELECT will bring you to the debug menu. jr nz, .psbtn_gotodebug ld a, [hl] and $09 ret z - + .psbtn_play - ld a, $00 ; MainMenu + ld a, $00 ; MainMenu jr .psbtn_nextseq .psbtn_gotodebug - ld a, $01 ; DebugMenu + ld a, $01 ; DebugMenu jr .psbtn_nextseq .psbtn_sramclear ld a, $02 - + .psbtn_nextseq ld [wJumptableIndex + 1], a ld hl, wJumptableIndex @@ -436,12 +436,12 @@ TitleSeq_TitleScreenInputAndTimeout:: ld hl, wJumptableIndex inc [hl] xor a - ld [wMusicFadeID], a + ld [wMusicFadeID], a ld [wMusicFadeID + 1], a ld hl, wMusicFade ld [hl], 8 - ret - + ret + TitleSeq_FadeMusicOut:: ld a, [wMusicFade] and a @@ -450,7 +450,7 @@ TitleSeq_FadeMusicOut:: ld [wJumptableIndex + 1], a ld hl, wJumptableIndex set 7, [hl] - ret + ret SetLYOverrides:: ld hl, wLYOverrides @@ -471,7 +471,7 @@ PrintVersion:: coord hl, 4, 1 ld b, $09 ld a, $60 - + LoadPrintArea:: ld [hli], a inc a @@ -493,12 +493,12 @@ PrintPokemonLogo:: coord hl, 1, 2 ld a, $80 ld bc, $0E04 - + PrintBoxArea:: ld de, SCREEN_WIDTH push bc push hl - + .xloop ld [hli], a inc a @@ -510,19 +510,19 @@ PrintBoxArea:: dec c jr nz, PrintBoxArea ret - + PrintCopyRight:: coord hl, 3, 17 ld a, $41 ld b, $0D - + .loop ld [hli], a inc a dec b jr nz, .loop ret - + SRAMClearMenu:: call ClearTileMap call GetMemSGBLayout @@ -549,7 +549,7 @@ SRAMClear_WinPOS:: db 0 db 7,14,11,19 dw SRAMClear_TextChoice ; menu data - db 1 ; default option + db 1 ; default option SRAMClear_TextChoice:: db %11000000 @@ -570,9 +570,9 @@ IntroCopyRightInfo:: jp PlaceString IntroCopyRightInfo_Text:: - db $60, $61, $62, $63, $6D, $6E, $6F, $70, $71, $72, $4E ; "(C)1997 Nintendo\n" - db $60, $61, $62, $63, $73, $74, $75, $76, $77, $78, $6B, $6C, $4E ; "(C)1997 Creatures Inc.\n" - db $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $6A, $6B, $6C, $50 ; "(C)1997 GAME FREAK Inc.{EOL}" + db $60, $61, $62, $63, $6D, $6E, $6F, $70, $71, $72, $4E ; "(C)1997 Nintendo\n" + db $60, $61, $62, $63, $73, $74, $75, $76, $77, $78, $6B, $6C, $4E ; "(C)1997 Creatures Inc.\n" + db $60, $61, $62, $63, $64, $65, $66, $67, $68, $69, $6A, $6B, $6C, $50 ; "(C)1997 GAME FREAK Inc.{EOL}" Set_HoOh:: coord hl, 7, 9 @@ -591,7 +591,7 @@ Set_HoOh:: jr nz, .loop ret -; Unused code, looks like it sets the font type for the logo? +; Unused code, looks like it sets the font type for the logo? SetTitleFont:: ld de, vChars1 ld hl, TitleScreenLogoGFX @@ -599,15 +599,15 @@ SetTitleFont:: ld a, $04 jp FarCopyDataDouble -; Sets the type of art that will be displayed on the title screen -; depending on wTitleSequenceOpeningType. +; Sets the type of art that will be displayed on the title screen +; depending on wTitleSequenceOpeningType. SetTitleGfx:: ld hl, wTitleSequenceOpeningType ld a, [hl] xor $01 ld [hl], a jr nz, .flame - + .note ld hl, TitleNotesGFX jr SetTitleGfxNext |