diff options
Diffstat (limited to 'engine/intro.asm')
-rwxr-xr-x | engine/intro.asm | 90 |
1 files changed, 51 insertions, 39 deletions
diff --git a/engine/intro.asm b/engine/intro.asm index 422bcf7a..4acab5a6 100755 --- a/engine/intro.asm +++ b/engine/intro.asm @@ -1,6 +1,14 @@ -MOVE_GENGAR_RIGHT EQU $00 -MOVE_GENGAR_LEFT EQU $01 -MOVE_NIDORINO_RIGHT EQU $ff +const_value = -1 + const MOVE_NIDORINO_RIGHT + const MOVE_GENGAR_RIGHT + const MOVE_GENGAR_LEFT + +ANIMATION_END EQU 80 + +const_value = 3 + const GENGAR_INTRO_TILES1 + const GENGAR_INTRO_TILES2 + const GENGAR_INTRO_TILES3 PlayIntro: xor a @@ -20,13 +28,13 @@ PlayIntro: PlayIntroScene: ld b, SET_PAL_NIDORINO_INTRO call RunPaletteCommand - ld a, %11100100 + ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE ld [rBGP], a ld [rOBP0], a ld [rOBP1], a xor a ld [hSCX], a - ld b, $3 ; Gengar tiles + ld b, GENGAR_INTRO_TILES1 call IntroCopyTiles ld a, 0 ld [wBaseCoordX], a @@ -50,7 +58,7 @@ PlayIntroScene: call PlaySound ld de, IntroNidorinoAnimation2 call AnimateIntroNidorino - ld c, $a + ld c, 10 call CheckForUserInterruption ret c @@ -64,23 +72,23 @@ PlayIntroScene: call PlaySound ld de, IntroNidorinoAnimation2 call AnimateIntroNidorino - ld c, $1e + ld c, 30 call CheckForUserInterruption ret c ; raise - ld b, $4 + ld b, GENGAR_INTRO_TILES2 call IntroCopyTiles ld a, SFX_INTRO_RAISE call PlaySound lb de, 8 / 2, MOVE_GENGAR_LEFT call IntroMoveMon - ld c, $1e + ld c, 30 call CheckForUserInterruption ret c ; slash - ld b, $5 + ld b, GENGAR_INTRO_TILES3 call IntroCopyTiles ld a, SFX_INTRO_CRASH call PlaySound @@ -89,19 +97,19 @@ PlayIntroScene: ; hip ld a, SFX_INTRO_HIP call PlaySound - ld a, $24 + ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE ld [wIntroNidorinoBaseTile], a ld de, IntroNidorinoAnimation3 call AnimateIntroNidorino - ld c, $1e + ld c, 30 call CheckForUserInterruption ret c lb de, 8 / 2, MOVE_GENGAR_LEFT call IntroMoveMon - ld b, $3 + ld b, GENGAR_INTRO_TILES1 call IntroCopyTiles - ld c, $3c + ld c, 60 call CheckForUserInterruption ret c @@ -117,29 +125,29 @@ PlayIntroScene: call PlaySound ld de, IntroNidorinoAnimation5 call AnimateIntroNidorino - ld c, $14 + ld c, 20 call CheckForUserInterruption ret c - ld a, $24 + ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE ld [wIntroNidorinoBaseTile], a ld de, IntroNidorinoAnimation6 call AnimateIntroNidorino - ld c, $1e + ld c, 30 call CheckForUserInterruption ret c ; lunge ld a, SFX_INTRO_LUNGE call PlaySound - ld a, $48 + ld a, (FightIntroFrontMon3 - FightIntroFrontMon) / BYTES_PER_TILE ld [wIntroNidorinoBaseTile], a ld de, IntroNidorinoAnimation7 jp AnimateIntroNidorino AnimateIntroNidorino: ld a, [de] - cp $50 + cp ANIMATION_END ret z ld [wBaseCoordY], a inc de @@ -189,7 +197,7 @@ InitIntroNidorinoOAM: ld [hli], a ; X ld a, d ld [hli], a ; tile - ld a, $80 + ld a, OAM_BEHIND_BG ld [hli], a ; attributes inc d dec c @@ -204,7 +212,7 @@ InitIntroNidorinoOAM: IntroClearScreen: ld hl, vBGMap1 - ld bc, $240 + ld bc, BG_MAP_WIDTH * SCREEN_HEIGHT jr IntroClearCommon IntroClearMiddleOfScreen: @@ -213,7 +221,7 @@ IntroClearMiddleOfScreen: ld bc, SCREEN_WIDTH * 10 IntroClearCommon: - ld [hl], $0 + ld [hl], 0 inc hl dec bc ld a, b @@ -222,7 +230,7 @@ IntroClearCommon: ret IntroPlaceBlackTiles: - ld a, $1 + ld a, 1 .loop ld [hli], a dec c @@ -231,11 +239,10 @@ IntroPlaceBlackTiles: IntroMoveMon: ; d = number of times to move the mon (2 pixels each time) -; e: $00 = move Gengar right, $01 = move Gengar left, $ff = move Nidorino right ld a, e - cp $ff + cp MOVE_NIDORINO_RIGHT jr z, .moveNidorinoRight - cp $1 + cp MOVE_GENGAR_LEFT jr z, .moveGengarLeft ; move Gengar right ld a, [hSCX] @@ -286,7 +293,7 @@ LoadIntroGraphics: ld a, BANK(FightIntroBackMon) call FarCopyData2 ld hl, GameFreakIntro - ld de, vChars2 + $600 + ld de, vChars2 + (FightIntroBackMonEnd - FightIntroBackMon) ld bc, GameFreakIntroEnd - GameFreakIntro ld a, BANK(GameFreakIntro) call FarCopyData2 @@ -305,7 +312,7 @@ PlayShootingStar: ld b, SET_PAL_GAME_FREAK_INTRO call RunPaletteCommand callba LoadCopyrightAndTextBoxTiles - ld a, %11100100 + ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE ld [rBGP], a ld c, 180 call DelayFrames @@ -348,10 +355,10 @@ IntroDrawBlackBars: ld c, SCREEN_WIDTH * 4 call IntroPlaceBlackTiles ld hl, vBGMap1 - ld c, $80 + ld c, BG_MAP_WIDTH * 4 call IntroPlaceBlackTiles - ld hl, vBGMap1 + $1c0 - ld c, $80 + ld hl, vBGMap1 + BG_MAP_WIDTH * 14 + ld c, BG_MAP_WIDTH * 4 jp IntroPlaceBlackTiles EmptyFunc4: @@ -359,7 +366,7 @@ EmptyFunc4: IntroNidorinoAnimation0: db 0, 0 - db $50 + db ANIMATION_END IntroNidorinoAnimation1: ; This is a sequence of pixel movements for part of the Nidorino animation. This @@ -370,7 +377,7 @@ IntroNidorinoAnimation1: db -1, 2 db 1, 2 db 2, 2 - db $50 ; list terminator + db ANIMATION_END IntroNidorinoAnimation2: ; This is a sequence of pixel movements for part of the Nidorino animation. @@ -380,7 +387,7 @@ IntroNidorinoAnimation2: db -1, -2 db 1, -2 db 2, -2 - db $50 ; list terminator + db ANIMATION_END IntroNidorinoAnimation3: ; This is a sequence of pixel movements for part of the Nidorino animation. @@ -390,7 +397,7 @@ IntroNidorinoAnimation3: db -8, 6 db 8, 6 db 12, 6 - db $50 ; list terminator + db ANIMATION_END IntroNidorinoAnimation4: ; This is a sequence of pixel movements for part of the Nidorino animation. @@ -400,7 +407,7 @@ IntroNidorinoAnimation4: db -4, -4 db 4, -4 db 8, -4 - db $50 ; list terminator + db ANIMATION_END IntroNidorinoAnimation5: ; This is a sequence of pixel movements for part of the Nidorino animation. @@ -410,7 +417,7 @@ IntroNidorinoAnimation5: db -4, 4 db 4, 4 db 8, 4 - db $50 ; list terminator + db ANIMATION_END IntroNidorinoAnimation6: ; This is a sequence of pixel movements for part of the Nidorino animation. @@ -419,7 +426,7 @@ IntroNidorinoAnimation6: db 2, 0 db 2, 0 db 0, 0 - db $50 ; list terminator + db ANIMATION_END IntroNidorinoAnimation7: ; This is a sequence of pixel movements for part of the Nidorino animation. @@ -428,7 +435,7 @@ IntroNidorinoAnimation7: db -7, -14 db -6, -12 db -4, -10 - db $50 ; list terminator + db ANIMATION_END GameFreakIntro: INCBIN "gfx/gamefreak_intro.2bpp" @@ -444,12 +451,17 @@ FightIntroFrontMon: IF DEF(_RED) INCBIN "gfx/red/intro_nido_1.2bpp" +FightIntroFrontMon2: INCBIN "gfx/red/intro_nido_2.2bpp" +FightIntroFrontMon3: INCBIN "gfx/red/intro_nido_3.2bpp" ENDC + IF DEF(_BLUE) INCBIN "gfx/blue/intro_purin_1.2bpp" +FightIntroFrontMon2: INCBIN "gfx/blue/intro_purin_2.2bpp" +FightIntroFrontMon3: INCBIN "gfx/blue/intro_purin_3.2bpp" ENDC |