From fb88b2ccf8f0897f95d25b82f95444ec775aa917 Mon Sep 17 00:00:00 2001 From: PikalaxALT Date: Mon, 16 Nov 2015 11:53:26 -0500 Subject: Movement constants, script stack --- engine/battle_start.asm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) (limited to 'engine/battle_start.asm') diff --git a/engine/battle_start.asm b/engine/battle_start.asm index 0897b8a4a..5bcaad99c 100644 --- a/engine/battle_start.asm +++ b/engine/battle_start.asm @@ -27,7 +27,7 @@ Predef_StartBattle: ; 8c20f ld [rSVBK], a ld hl, wMapPals - ld bc, $0040 + ld bc, 8 palettes xor a call ByteFill @@ -308,9 +308,11 @@ StartTrainerBattle_Flash: ; 8c3ab (23:43ab) StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8) callba Function5602 - ld a, $5 + ld a, $5 ; BANK(LYOverrides) ld [rSVBK], a + call StartTrainerBattle_NextScene + ld a, $43 ld [hLCDStatCustom], a xor a @@ -342,8 +344,8 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408) ld d, [hl] add [hl] ld [hl], a - ld a, $90 - ld bc, wd100 + ld a, LYOverridesEnd - LYOverrides + ld bc, LYOverrides ld e, $0 .loop @@ -364,7 +366,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408) StartTrainerBattle_SetUpForSpinOutro: ; 8c43d (23:443d) callba Function5602 - ld a, $5 + ld a, $5 ; BANK(LYOverrides) ld [rSVBK], a call StartTrainerBattle_NextScene xor a @@ -507,7 +509,7 @@ endr StartTrainerBattle_SetUpForRandomScatterOutro: ; 8c578 (23:4578) callba Function5602 - ld a, $5 + ld a, $5 ; BANK(LYOverrides) ld [rSVBK], a call StartTrainerBattle_NextScene ld a, $10 @@ -739,10 +741,12 @@ WipeLYOverrides: ; 8c6d8 push af ld a, $5 ld [rSVBK], a + ld hl, LYOverrides call .wipe ld hl, LYOverridesBackup call .wipe + pop af ld [rSVBK], a ret -- cgit v1.2.3