summaryrefslogtreecommitdiff
path: root/engine/intro.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/intro.asm')
-rwxr-xr-xengine/intro.asm68
1 files changed, 38 insertions, 30 deletions
diff --git a/engine/intro.asm b/engine/intro.asm
index 9f17e05c..7ddbe240 100755
--- a/engine/intro.asm
+++ b/engine/intro.asm
@@ -1,3 +1,7 @@
+MOVE_GENGAR_RIGHT EQU $00
+MOVE_GENGAR_LEFT EQU $01
+MOVE_NIDORINO_RIGHT EQU $ff
+
PlayIntro: ; 41682 (10:5682)
xor a
ld [hJoyHeld], a
@@ -14,8 +18,8 @@ PlayIntro: ; 41682 (10:5682)
ret
PlayIntroScene: ; 4169d (10:569d)
- ld b, $7
- call GoPAL_SET
+ ld b, SET_PAL_NIDORINO_INTRO
+ call RunPaletteCommand
ld a, %11100100
ld [rBGP], a
ld [rOBP0], a
@@ -25,12 +29,12 @@ PlayIntroScene: ; 4169d (10:569d)
ld b, $3 ; Gengar tiles
call IntroCopyTiles
ld a, 0
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, 80
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
lb bc, 6, 6
call InitIntroNidorinoOAM
- ld de, $28ff ; move Nidorino right by 80 pixels
+ lb de, 80 / 2, MOVE_NIDORINO_RIGHT
call IntroMoveMon
ret c
@@ -69,7 +73,7 @@ PlayIntroScene: ; 4169d (10:569d)
call IntroCopyTiles
ld a, SFX_INTRO_RAISE
call PlaySound
- ld de, $401 ; move Gengar left by 8 pixels
+ lb de, 8 / 2, MOVE_GENGAR_LEFT
call IntroMoveMon
ld c, $1e
call CheckForUserInterruption
@@ -80,7 +84,7 @@ PlayIntroScene: ; 4169d (10:569d)
call IntroCopyTiles
ld a, SFX_INTRO_CRASH
call PlaySound
- ld de, $800 ; move Gengar right by 16 pixels
+ lb de, 16 / 2, MOVE_GENGAR_RIGHT
call IntroMoveMon
; hip
ld a, SFX_INTRO_HIP
@@ -93,7 +97,7 @@ PlayIntroScene: ; 4169d (10:569d)
call CheckForUserInterruption
ret c
- ld de, $401 ; move Gengar left by 8 pixels
+ lb de, 8 / 2, MOVE_GENGAR_LEFT
call IntroMoveMon
ld b, $3
call IntroCopyTiles
@@ -137,10 +141,10 @@ AnimateIntroNidorino: ; 41793 (10:5793)
ld a, [de]
cp $50
ret z
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
inc de
ld a, [de]
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
push de
ld c, 6 * 6
call UpdateIntroNidorinoOAM
@@ -155,10 +159,10 @@ UpdateIntroNidorinoOAM: ; 417ae (10:57ae)
ld a, [wIntroNidorinoBaseTile]
ld d, a
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
add [hl]
ld [hli], a ; Y
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add [hl]
ld [hli], a ; X
ld a, d
@@ -174,14 +178,14 @@ InitIntroNidorinoOAM: ; 417c7 (10:57c7)
ld d, 0
.loop
push bc
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
ld e, a
.innerLoop
ld a, e
add 8
ld e, a
ld [hli], a ; Y
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
ld [hli], a ; X
ld a, d
ld [hli], a ; tile
@@ -190,9 +194,9 @@ InitIntroNidorinoOAM: ; 417c7 (10:57c7)
inc d
dec c
jr nz, .innerLoop
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add 8
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
pop bc
dec b
jr nz, .loop
@@ -241,9 +245,9 @@ IntroMoveMon: ; 4180e (10:580e)
.moveNidorinoRight
push de
ld a, 2
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
xor a
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld c, 6 * 6
call UpdateIntroNidorinoOAM
pop de
@@ -278,28 +282,28 @@ PlayMoveSoundB: ; 41849 (10:5849)
LoadIntroGraphics: ; 41852 (10:5852)
ld hl, FightIntroBackMon
ld de, vChars2
- ld bc, $600
+ ld bc, FightIntroBackMonEnd - FightIntroBackMon
ld a, BANK(FightIntroBackMon)
call FarCopyData2
ld hl, GameFreakIntro
ld de, vChars2 + $600
- ld bc, $140
+ ld bc, GameFreakIntroEnd - GameFreakIntro
ld a, BANK(GameFreakIntro)
call FarCopyData2
ld hl, GameFreakIntro
ld de, vChars1
- ld bc, $140
+ ld bc, GameFreakIntroEnd - GameFreakIntro
ld a, BANK(GameFreakIntro)
call FarCopyData2
ld hl, FightIntroFrontMon
ld de, vChars0
- ld bc, $6c0
+ ld bc, FightIntroFrontMonEnd - FightIntroFrontMon
ld a, BANK(FightIntroFrontMon)
jp FarCopyData2
PlayShootingStar: ; 4188a (10:588a)
- ld b, $c
- call GoPAL_SET
+ ld b, SET_PAL_GAME_FREAK_INTRO
+ call RunPaletteCommand
callba LoadCopyrightAndTextBoxTiles
ld a, $e4
ld [rBGP], a
@@ -308,7 +312,7 @@ PlayShootingStar: ; 4188a (10:588a)
call ClearScreen
call DisableLCD
xor a
- ld [W_CUROPPONENT], a
+ ld [wCurOpponent], a
call IntroDrawBlackBars
call LoadIntroGraphics
call EnableLCD
@@ -325,10 +329,10 @@ PlayShootingStar: ; 4188a (10:588a)
call DelayFrames
.next
ld a, BANK(Music_IntroBattle)
- ld [wc0ef], a
- ld [wc0f0], a
+ ld [wAudioROMBank], a
+ ld [wAudioSavedROMBank], a
ld a, MUSIC_INTRO_BATTLE
- ld [wc0ee], a
+ ld [wNewSoundID], a
call PlaySound
call IntroClearMiddleOfScreen
call ClearSprites
@@ -430,9 +434,11 @@ GameFreakIntro: ; 41959 (10:5959)
INCBIN "gfx/gamefreak_intro.2bpp"
INCBIN "gfx/gamefreak_logo.2bpp"
ds $10 ; blank tile
+GameFreakIntroEnd:
FightIntroBackMon: ; 41a99 (10:5a99)
INCBIN "gfx/intro_fight.2bpp"
+FightIntroBackMonEnd:
FightIntroFrontMon: ; 42099 (10:6099)
@@ -440,11 +446,13 @@ IF DEF(_RED)
INCBIN "gfx/red/intro_nido_1.2bpp"
INCBIN "gfx/red/intro_nido_2.2bpp"
INCBIN "gfx/red/intro_nido_3.2bpp"
- ds $10 ; blank tile
ENDC
IF DEF(_BLUE)
INCBIN "gfx/blue/intro_purin_1.2bpp"
INCBIN "gfx/blue/intro_purin_2.2bpp"
INCBIN "gfx/blue/intro_purin_3.2bpp"
- ds $10 ; blank tile
ENDC
+
+FightIntroFrontMonEnd:
+
+ ds $10 ; blank tile