summaryrefslogtreecommitdiff
path: root/engine/intro.asm
diff options
context:
space:
mode:
authorPokeglitch <pokeglitchx@gmail.com>2018-06-22 23:06:05 -0400
committerPokeglitch <pokeglitchx@gmail.com>2018-06-22 23:06:05 -0400
commit01fe449837bef1c289d37477745774555d22786e (patch)
treeb89147f4adc0c7bf8aaf8e95a5db648db0b06a2b /engine/intro.asm
parent98f09b6d26b1f83bdf1779cfe63a73b8a4265aef (diff)
Updated the intro
Diffstat (limited to 'engine/intro.asm')
-rwxr-xr-xengine/intro.asm89
1 files changed, 50 insertions, 39 deletions
diff --git a/engine/intro.asm b/engine/intro.asm
index 422bcf7a..f69a0020 100755
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -1,6 +1,12 @@
-MOVE_GENGAR_RIGHT EQU $00
-MOVE_GENGAR_LEFT EQU $01
-MOVE_NIDORINO_RIGHT EQU $ff
+MOVE_GENGAR_RIGHT EQU 0
+MOVE_GENGAR_LEFT EQU 1
+MOVE_NIDORINO_RIGHT EQU -1
+
+ANIMATION_END EQU 80
+
+GENGAR_INTRO_TILES1 EQU 3
+GENGAR_INTRO_TILES2 EQU 4
+GENGAR_INTRO_TILES3 EQU 5
PlayIntro:
xor a
@@ -20,13 +26,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 +56,7 @@ PlayIntroScene:
call PlaySound
ld de, IntroNidorinoAnimation2
call AnimateIntroNidorino
- ld c, $a
+ ld c, 10
call CheckForUserInterruption
ret c
@@ -64,23 +70,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 +95,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 +123,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 +195,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 +210,7 @@ InitIntroNidorinoOAM:
IntroClearScreen:
ld hl, vBGMap1
- ld bc, $240
+ ld bc, BG_MAP_WIDTH * SCREEN_HEIGHT
jr IntroClearCommon
IntroClearMiddleOfScreen:
@@ -213,7 +219,7 @@ IntroClearMiddleOfScreen:
ld bc, SCREEN_WIDTH * 10
IntroClearCommon:
- ld [hl], $0
+ ld [hl], 0
inc hl
dec bc
ld a, b
@@ -222,7 +228,7 @@ IntroClearCommon:
ret
IntroPlaceBlackTiles:
- ld a, $1
+ ld a, 1
.loop
ld [hli], a
dec c
@@ -231,11 +237,11 @@ 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
+; e: 0 = move Gengar right, 1 = move Gengar left, -1 = move Nidorino right
ld a, e
- cp $ff
+ cp -1
jr z, .moveNidorinoRight
- cp $1
+ cp 1
jr z, .moveGengarLeft
; move Gengar right
ld a, [hSCX]
@@ -286,7 +292,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 +311,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 +354,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 +365,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 +376,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 +386,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 +396,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 +406,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 +416,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 +425,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 +434,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 +450,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