2018-06-23 15:37:58 +00:00
|
|
|
const_value = -1
|
|
|
|
const MOVE_NIDORINO_RIGHT
|
|
|
|
const MOVE_GENGAR_RIGHT
|
|
|
|
const MOVE_GENGAR_LEFT
|
2018-06-23 03:06:05 +00:00
|
|
|
|
2018-06-23 15:37:58 +00:00
|
|
|
ANIMATION_END EQU 80
|
2018-06-23 03:06:05 +00:00
|
|
|
|
2018-06-23 15:37:58 +00:00
|
|
|
const_value = 3
|
|
|
|
const GENGAR_INTRO_TILES1
|
|
|
|
const GENGAR_INTRO_TILES2
|
|
|
|
const GENGAR_INTRO_TILES3
|
2015-08-11 06:23:00 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
PlayIntro:
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2014-05-25 17:51:53 +00:00
|
|
|
ld [hJoyHeld], a
|
2014-05-22 22:13:20 +00:00
|
|
|
inc a
|
|
|
|
ld [H_AUTOBGTRANSFERENABLED], a
|
|
|
|
call PlayShootingStar
|
|
|
|
call PlayIntroScene
|
2014-09-13 07:50:56 +00:00
|
|
|
call GBFadeOutToWhite
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [H_AUTOBGTRANSFERENABLED], a
|
2014-05-23 22:34:35 +00:00
|
|
|
call ClearSprites
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrame
|
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
PlayIntroScene:
|
2015-08-12 09:16:56 +00:00
|
|
|
ld b, SET_PAL_NIDORINO_INTRO
|
|
|
|
call RunPaletteCommand
|
2018-06-23 03:06:05 +00:00
|
|
|
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [rBGP], a
|
|
|
|
ld [rOBP0], a
|
|
|
|
ld [rOBP1], a
|
|
|
|
xor a
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCX], a
|
2018-06-23 03:06:05 +00:00
|
|
|
ld b, GENGAR_INTRO_TILES1
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroCopyTiles
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, 0
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, 80
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordY], a
|
2015-08-05 21:20:29 +00:00
|
|
|
lb bc, 6, 6
|
2015-07-17 05:08:34 +00:00
|
|
|
call InitIntroNidorinoOAM
|
2015-08-11 06:23:00 +00:00
|
|
|
lb de, 80 / 2, MOVE_NIDORINO_RIGHT
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroMoveMon
|
2014-05-22 22:13:20 +00:00
|
|
|
ret c
|
|
|
|
|
|
|
|
; hip
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HIP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
xor a
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wIntroNidorinoBaseTile], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, IntroNidorinoAnimation1
|
|
|
|
call AnimateIntroNidorino
|
|
|
|
; hop
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HOP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
ld de, IntroNidorinoAnimation2
|
|
|
|
call AnimateIntroNidorino
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 10
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
|
|
|
; hip
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HIP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
ld de, IntroNidorinoAnimation1
|
|
|
|
call AnimateIntroNidorino
|
|
|
|
; hop
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HOP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
ld de, IntroNidorinoAnimation2
|
|
|
|
call AnimateIntroNidorino
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 30
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
|
|
|
; raise
|
2018-06-23 03:06:05 +00:00
|
|
|
ld b, GENGAR_INTRO_TILES2
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroCopyTiles
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_RAISE
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2015-08-11 06:23:00 +00:00
|
|
|
lb de, 8 / 2, MOVE_GENGAR_LEFT
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroMoveMon
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 30
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
|
|
|
; slash
|
2018-06-23 03:06:05 +00:00
|
|
|
ld b, GENGAR_INTRO_TILES3
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroCopyTiles
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_CRASH
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2015-08-11 06:23:00 +00:00
|
|
|
lb de, 16 / 2, MOVE_GENGAR_RIGHT
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroMoveMon
|
2014-05-22 22:13:20 +00:00
|
|
|
; hip
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HIP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2018-06-23 03:06:05 +00:00
|
|
|
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wIntroNidorinoBaseTile], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld de, IntroNidorinoAnimation3
|
|
|
|
call AnimateIntroNidorino
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 30
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
2015-08-11 06:23:00 +00:00
|
|
|
lb de, 8 / 2, MOVE_GENGAR_LEFT
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroMoveMon
|
2018-06-23 03:06:05 +00:00
|
|
|
ld b, GENGAR_INTRO_TILES1
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroCopyTiles
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 60
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
|
|
|
; hip
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HIP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
|
|
|
xor a
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wIntroNidorinoBaseTile], a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, IntroNidorinoAnimation4
|
2014-05-22 22:13:20 +00:00
|
|
|
call AnimateIntroNidorino
|
|
|
|
; hop
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_HOP
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, IntroNidorinoAnimation5
|
2014-05-22 22:13:20 +00:00
|
|
|
call AnimateIntroNidorino
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 20
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
2018-06-23 03:06:05 +00:00
|
|
|
ld a, (FightIntroFrontMon2 - FightIntroFrontMon) / BYTES_PER_TILE
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wIntroNidorinoBaseTile], a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, IntroNidorinoAnimation6
|
2014-05-22 22:13:20 +00:00
|
|
|
call AnimateIntroNidorino
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, 30
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
ret c
|
|
|
|
|
|
|
|
; lunge
|
2015-07-19 08:46:12 +00:00
|
|
|
ld a, SFX_INTRO_LUNGE
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2018-06-23 03:06:05 +00:00
|
|
|
ld a, (FightIntroFrontMon3 - FightIntroFrontMon) / BYTES_PER_TILE
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [wIntroNidorinoBaseTile], a
|
2015-07-03 19:37:53 +00:00
|
|
|
ld de, IntroNidorinoAnimation7
|
2014-05-22 22:13:20 +00:00
|
|
|
jp AnimateIntroNidorino
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
AnimateIntroNidorino:
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, [de]
|
2018-06-23 03:06:05 +00:00
|
|
|
cp ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
ret z
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordY], a
|
2014-05-22 22:13:20 +00:00
|
|
|
inc de
|
|
|
|
ld a, [de]
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
push de
|
2015-07-17 05:08:34 +00:00
|
|
|
ld c, 6 * 6
|
|
|
|
call UpdateIntroNidorinoOAM
|
2014-05-22 22:13:20 +00:00
|
|
|
ld c, 5
|
|
|
|
call DelayFrames
|
|
|
|
pop de
|
|
|
|
inc de
|
|
|
|
jr AnimateIntroNidorino
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
UpdateIntroNidorinoOAM:
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, wOAMBuffer
|
2015-07-24 21:39:45 +00:00
|
|
|
ld a, [wIntroNidorinoBaseTile]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld d, a
|
2015-07-17 05:08:34 +00:00
|
|
|
.loop
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wBaseCoordY]
|
2014-05-22 22:13:20 +00:00
|
|
|
add [hl]
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [hli], a ; Y
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wBaseCoordX]
|
2014-05-22 22:13:20 +00:00
|
|
|
add [hl]
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [hli], a ; X
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, d
|
2015-07-24 21:39:45 +00:00
|
|
|
ld [hli], a ; tile
|
2014-05-22 22:13:20 +00:00
|
|
|
inc hl
|
|
|
|
inc d
|
|
|
|
dec c
|
2015-07-17 05:08:34 +00:00
|
|
|
jr nz, .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
InitIntroNidorinoOAM:
|
2014-05-22 22:13:20 +00:00
|
|
|
ld hl, wOAMBuffer
|
2015-07-17 05:08:34 +00:00
|
|
|
ld d, 0
|
|
|
|
.loop
|
2014-05-22 22:13:20 +00:00
|
|
|
push bc
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wBaseCoordY]
|
2014-05-22 22:13:20 +00:00
|
|
|
ld e, a
|
2015-07-17 05:08:34 +00:00
|
|
|
.innerLoop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, e
|
2015-07-17 05:08:34 +00:00
|
|
|
add 8
|
2014-05-22 22:13:20 +00:00
|
|
|
ld e, a
|
2015-07-17 05:08:34 +00:00
|
|
|
ld [hli], a ; Y
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wBaseCoordX]
|
2015-07-17 05:08:34 +00:00
|
|
|
ld [hli], a ; X
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, d
|
2015-07-17 05:08:34 +00:00
|
|
|
ld [hli], a ; tile
|
2018-06-23 03:06:05 +00:00
|
|
|
ld a, OAM_BEHIND_BG
|
2015-07-17 05:08:34 +00:00
|
|
|
ld [hli], a ; attributes
|
2014-05-22 22:13:20 +00:00
|
|
|
inc d
|
|
|
|
dec c
|
2015-07-17 05:08:34 +00:00
|
|
|
jr nz, .innerLoop
|
2015-08-31 02:38:41 +00:00
|
|
|
ld a, [wBaseCoordX]
|
2015-07-17 05:08:34 +00:00
|
|
|
add 8
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
pop bc
|
|
|
|
dec b
|
2015-07-17 05:08:34 +00:00
|
|
|
jr nz, .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroClearScreen:
|
2014-05-29 08:31:46 +00:00
|
|
|
ld hl, vBGMap1
|
2018-06-23 03:06:05 +00:00
|
|
|
ld bc, BG_MAP_WIDTH * SCREEN_HEIGHT
|
2015-07-17 05:08:34 +00:00
|
|
|
jr IntroClearCommon
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroClearMiddleOfScreen:
|
2015-07-17 05:08:34 +00:00
|
|
|
; clear the area of the tile map between the black bars on the top and bottom
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 4
|
2015-07-17 05:08:34 +00:00
|
|
|
ld bc, SCREEN_WIDTH * 10
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroClearCommon:
|
2018-06-23 03:06:05 +00:00
|
|
|
ld [hl], 0
|
2014-05-22 22:13:20 +00:00
|
|
|
inc hl
|
|
|
|
dec bc
|
|
|
|
ld a, b
|
|
|
|
or c
|
2015-07-17 05:08:34 +00:00
|
|
|
jr nz, IntroClearCommon
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroPlaceBlackTiles:
|
2018-06-23 03:06:05 +00:00
|
|
|
ld a, 1
|
2015-07-17 05:08:34 +00:00
|
|
|
.loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ld [hli], a
|
|
|
|
dec c
|
2015-07-17 05:08:34 +00:00
|
|
|
jr nz, .loop
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroMoveMon:
|
2015-07-17 05:08:34 +00:00
|
|
|
; d = number of times to move the mon (2 pixels each time)
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, e
|
2018-06-23 15:37:58 +00:00
|
|
|
cp MOVE_NIDORINO_RIGHT
|
2015-07-17 05:08:34 +00:00
|
|
|
jr z, .moveNidorinoRight
|
2018-06-23 15:37:58 +00:00
|
|
|
cp MOVE_GENGAR_LEFT
|
2015-07-17 05:08:34 +00:00
|
|
|
jr z, .moveGengarLeft
|
|
|
|
; move Gengar right
|
2015-02-07 10:43:08 +00:00
|
|
|
ld a, [hSCX]
|
2014-05-22 22:13:20 +00:00
|
|
|
dec a
|
|
|
|
dec a
|
2015-07-17 05:08:34 +00:00
|
|
|
jr .next
|
|
|
|
.moveNidorinoRight
|
2014-05-22 22:13:20 +00:00
|
|
|
push de
|
2015-07-17 05:08:34 +00:00
|
|
|
ld a, 2
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
xor a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wBaseCoordY], a
|
2015-07-17 05:08:34 +00:00
|
|
|
ld c, 6 * 6
|
|
|
|
call UpdateIntroNidorinoOAM
|
2014-05-22 22:13:20 +00:00
|
|
|
pop de
|
2015-07-17 05:08:34 +00:00
|
|
|
.moveGengarLeft
|
2015-02-07 10:43:08 +00:00
|
|
|
ld a, [hSCX]
|
2014-05-22 22:13:20 +00:00
|
|
|
inc a
|
|
|
|
inc a
|
2015-07-17 05:08:34 +00:00
|
|
|
.next
|
2015-02-07 10:43:08 +00:00
|
|
|
ld [hSCX], a
|
2014-05-22 22:13:20 +00:00
|
|
|
push de
|
2015-07-17 05:08:34 +00:00
|
|
|
ld c, 2
|
2014-05-22 22:13:20 +00:00
|
|
|
call CheckForUserInterruption
|
|
|
|
pop de
|
|
|
|
ret c
|
|
|
|
dec d
|
2015-07-17 05:08:34 +00:00
|
|
|
jr nz, IntroMoveMon
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroCopyTiles:
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 13, 7
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
CopyTileIDsFromList_ZeroBaseTileID:
|
2015-07-17 05:08:34 +00:00
|
|
|
ld c, 0
|
2015-02-07 10:43:08 +00:00
|
|
|
predef_jump CopyTileIDsFromList
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
PlayMoveSoundB:
|
2015-07-17 05:08:34 +00:00
|
|
|
; unused
|
2015-07-03 19:37:53 +00:00
|
|
|
predef GetMoveSoundB
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, b
|
|
|
|
jp PlaySound
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
LoadIntroGraphics:
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, FightIntroBackMon
|
2014-05-29 08:31:46 +00:00
|
|
|
ld de, vChars2
|
2015-08-10 04:56:20 +00:00
|
|
|
ld bc, FightIntroBackMonEnd - FightIntroBackMon
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(FightIntroBackMon)
|
|
|
|
call FarCopyData2
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, GameFreakIntro
|
2018-06-23 03:06:05 +00:00
|
|
|
ld de, vChars2 + (FightIntroBackMonEnd - FightIntroBackMon)
|
2015-08-10 04:56:20 +00:00
|
|
|
ld bc, GameFreakIntroEnd - GameFreakIntro
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(GameFreakIntro)
|
|
|
|
call FarCopyData2
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, GameFreakIntro
|
2014-05-29 08:31:46 +00:00
|
|
|
ld de, vChars1
|
2015-08-10 04:56:20 +00:00
|
|
|
ld bc, GameFreakIntroEnd - GameFreakIntro
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(GameFreakIntro)
|
|
|
|
call FarCopyData2
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, FightIntroFrontMon
|
2014-05-29 08:31:46 +00:00
|
|
|
ld de, vChars0
|
2015-08-10 04:56:20 +00:00
|
|
|
ld bc, FightIntroFrontMonEnd - FightIntroFrontMon
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, BANK(FightIntroFrontMon)
|
|
|
|
jp FarCopyData2
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
PlayShootingStar:
|
2015-08-12 09:16:56 +00:00
|
|
|
ld b, SET_PAL_GAME_FREAK_INTRO
|
|
|
|
call RunPaletteCommand
|
2014-05-22 22:13:20 +00:00
|
|
|
callba LoadCopyrightAndTextBoxTiles
|
2018-06-23 03:06:05 +00:00
|
|
|
ldPal a, BLACK, DARK_GRAY, LIGHT_GRAY, WHITE
|
2015-07-03 19:37:53 +00:00
|
|
|
ld [rBGP], a
|
|
|
|
ld c, 180
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
|
|
|
call ClearScreen
|
|
|
|
call DisableLCD
|
|
|
|
xor a
|
2015-08-31 02:38:41 +00:00
|
|
|
ld [wCurOpponent], a
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroDrawBlackBars
|
2014-05-22 22:13:20 +00:00
|
|
|
call LoadIntroGraphics
|
|
|
|
call EnableLCD
|
2015-07-03 19:37:53 +00:00
|
|
|
ld hl, rLCDC
|
2014-05-22 22:13:20 +00:00
|
|
|
res 5, [hl]
|
|
|
|
set 3, [hl]
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 64
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
|
|
|
callba AnimateShootingStar
|
|
|
|
push af
|
|
|
|
pop af
|
2015-07-17 05:08:34 +00:00
|
|
|
jr c, .next ; skip the delay if the user interrupted the animation
|
2015-07-03 19:37:53 +00:00
|
|
|
ld c, 40
|
2014-05-22 22:13:20 +00:00
|
|
|
call DelayFrames
|
2015-07-17 05:08:34 +00:00
|
|
|
.next
|
2014-06-09 20:18:29 +00:00
|
|
|
ld a, BANK(Music_IntroBattle)
|
2015-08-09 05:32:44 +00:00
|
|
|
ld [wAudioROMBank], a
|
|
|
|
ld [wAudioSavedROMBank], a
|
2014-05-22 22:13:20 +00:00
|
|
|
ld a, MUSIC_INTRO_BATTLE
|
2015-08-09 05:32:44 +00:00
|
|
|
ld [wNewSoundID], a
|
2014-05-22 22:13:20 +00:00
|
|
|
call PlaySound
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroClearMiddleOfScreen
|
2014-05-23 22:34:35 +00:00
|
|
|
call ClearSprites
|
2014-05-22 22:13:20 +00:00
|
|
|
jp Delay3
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroDrawBlackBars:
|
2015-07-17 05:08:34 +00:00
|
|
|
; clear the screen and draw black bars on the top and bottom
|
|
|
|
call IntroClearScreen
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 0
|
2015-07-17 05:08:34 +00:00
|
|
|
ld c, SCREEN_WIDTH * 4
|
|
|
|
call IntroPlaceBlackTiles
|
2015-07-18 20:52:03 +00:00
|
|
|
coord hl, 0, 14
|
2015-07-17 05:08:34 +00:00
|
|
|
ld c, SCREEN_WIDTH * 4
|
|
|
|
call IntroPlaceBlackTiles
|
2014-05-29 08:31:46 +00:00
|
|
|
ld hl, vBGMap1
|
2018-06-23 03:06:05 +00:00
|
|
|
ld c, BG_MAP_WIDTH * 4
|
2015-07-17 05:08:34 +00:00
|
|
|
call IntroPlaceBlackTiles
|
2018-06-23 03:06:05 +00:00
|
|
|
ld hl, vBGMap1 + BG_MAP_WIDTH * 14
|
|
|
|
ld c, BG_MAP_WIDTH * 4
|
2015-07-17 05:08:34 +00:00
|
|
|
jp IntroPlaceBlackTiles
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
EmptyFunc4:
|
2014-05-22 22:13:20 +00:00
|
|
|
ret
|
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation0:
|
2014-05-22 22:13:20 +00:00
|
|
|
db 0, 0
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation1:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation. This
|
|
|
|
; list describes how Nidorino should hop.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db 0, 0
|
|
|
|
db -2, 2
|
|
|
|
db -1, 2
|
|
|
|
db 1, 2
|
|
|
|
db 2, 2
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation2:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db 0, 0
|
|
|
|
db -2, -2
|
|
|
|
db -1, -2
|
|
|
|
db 1, -2
|
|
|
|
db 2, -2
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation3:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db 0, 0
|
|
|
|
db -12, 6
|
|
|
|
db -8, 6
|
|
|
|
db 8, 6
|
|
|
|
db 12, 6
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation4:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db 0, 0
|
|
|
|
db -8, -4
|
|
|
|
db -4, -4
|
|
|
|
db 4, -4
|
|
|
|
db 8, -4
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation5:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db 0, 0
|
|
|
|
db -8, 4
|
|
|
|
db -4, 4
|
|
|
|
db 4, 4
|
|
|
|
db 8, 4
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation6:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db 0, 0
|
|
|
|
db 2, 0
|
|
|
|
db 2, 0
|
|
|
|
db 0, 0
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
IntroNidorinoAnimation7:
|
2014-05-22 22:13:20 +00:00
|
|
|
; This is a sequence of pixel movements for part of the Nidorino animation.
|
|
|
|
; First byte is y movement, second byte is x movement
|
|
|
|
db -8, -16
|
|
|
|
db -7, -14
|
|
|
|
db -6, -12
|
|
|
|
db -4, -10
|
2018-06-23 03:06:05 +00:00
|
|
|
db ANIMATION_END
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
GameFreakIntro:
|
2014-05-30 08:30:10 +00:00
|
|
|
INCBIN "gfx/gamefreak_intro.2bpp"
|
2014-05-22 22:13:20 +00:00
|
|
|
INCBIN "gfx/gamefreak_logo.2bpp"
|
2018-11-18 23:29:24 +00:00
|
|
|
rept 16
|
|
|
|
db $00 ; blank tile
|
|
|
|
endr
|
2015-08-10 04:56:20 +00:00
|
|
|
GameFreakIntroEnd:
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
FightIntroBackMon:
|
2014-05-22 22:13:20 +00:00
|
|
|
INCBIN "gfx/intro_fight.2bpp"
|
2015-08-10 04:56:20 +00:00
|
|
|
FightIntroBackMonEnd:
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2016-06-12 00:24:04 +00:00
|
|
|
FightIntroFrontMon:
|
2014-05-22 22:13:20 +00:00
|
|
|
|
2014-10-17 08:42:32 +00:00
|
|
|
IF DEF(_RED)
|
2018-03-10 23:01:54 +00:00
|
|
|
INCBIN "gfx/red/intro_nido_1.2bpp"
|
2018-06-23 03:06:05 +00:00
|
|
|
FightIntroFrontMon2:
|
2018-03-10 23:01:54 +00:00
|
|
|
INCBIN "gfx/red/intro_nido_2.2bpp"
|
2018-06-23 03:06:05 +00:00
|
|
|
FightIntroFrontMon3:
|
2018-03-10 23:01:54 +00:00
|
|
|
INCBIN "gfx/red/intro_nido_3.2bpp"
|
2014-05-22 22:13:20 +00:00
|
|
|
ENDC
|
2018-06-23 03:06:05 +00:00
|
|
|
|
2014-10-17 08:42:32 +00:00
|
|
|
IF DEF(_BLUE)
|
2018-03-10 23:01:54 +00:00
|
|
|
INCBIN "gfx/blue/intro_purin_1.2bpp"
|
2018-06-23 03:06:05 +00:00
|
|
|
FightIntroFrontMon2:
|
2018-03-10 23:01:54 +00:00
|
|
|
INCBIN "gfx/blue/intro_purin_2.2bpp"
|
2018-06-23 03:06:05 +00:00
|
|
|
FightIntroFrontMon3:
|
2018-03-10 23:01:54 +00:00
|
|
|
INCBIN "gfx/blue/intro_purin_3.2bpp"
|
2014-05-22 22:13:20 +00:00
|
|
|
ENDC
|
2015-08-10 04:56:20 +00:00
|
|
|
|
|
|
|
FightIntroFrontMonEnd:
|
|
|
|
|
|
|
|
ds $10 ; blank tile
|