diff options
author | PikalaxALT <PikalaxALT@gmail.com> | 2015-12-26 21:59:03 -0500 |
---|---|---|
committer | PikalaxALT <PikalaxALT@gmail.com> | 2015-12-26 21:59:03 -0500 |
commit | f030315b1fd797aa6765ac8cd8c35c0cd9b600a0 (patch) | |
tree | da461ae6040d2a2f0e0b3a95e837a6c5e99e2fd6 /engine/battle_start.asm | |
parent | 2bd45ca574aab251b91c24837b102c9c2a5e76a0 (diff) |
jumptable macro repurposed
Diffstat (limited to 'engine/battle_start.asm')
-rw-r--r-- | engine/battle_start.asm | 32 |
1 files changed, 10 insertions, 22 deletions
diff --git a/engine/battle_start.asm b/engine/battle_start.asm index 929ac04c1..bd8b6cc28 100644 --- a/engine/battle_start.asm +++ b/engine/battle_start.asm @@ -39,9 +39,9 @@ Predef_StartBattle: ; 8c20f call DmgToCgbBGPals call DelayFrame xor a - ld [hLCDStatCustom], a - ld [hLCDStatCustom + 1], a - ld [hLCDStatCustom + 2], a + ld [hFFC6], a + ld [hFFC7], a + ld [hFFC8], a ld [hSCY], a ld a, $1 @@ -74,9 +74,8 @@ Function8c26d: ; 8c26d ld [hBGMapMode], a ld hl, wJumptableIndex xor a -rept 2 ld [hli], a -endr + ld [hli], a ld [hl], a call WipeLYOverrides ret @@ -146,20 +145,10 @@ INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp" FlashyTransitionToBattle: ; 8c314 - ld a, [wJumptableIndex] - ld e, a - ld d, 0 - ld hl, .jumptable -rept 2 - add hl, de -endr - ld a, [hli] - ld h, [hl] - ld l, a - jp [hl] + jumptable .dw, wJumptableIndex ; 8c323 -.jumptable: ; 8c323 (23:4323) +.dw: ; 8c323 (23:4323) dw StartTrainerBattle_DetermineWhichAnimation ; 00 ; Animation 1: cave @@ -314,11 +303,11 @@ StartTrainerBattle_SetUpForWavyOutro: ; 8c3e8 (23:43e8) call StartTrainerBattle_NextScene ld a, $43 - ld [hLCDStatCustom], a + ld [hFFC6], a xor a - ld [hLCDStatCustom + 1], a + ld [hFFC7], a ld a, $90 - ld [hLCDStatCustom + 2], a + ld [hFFC8], a xor a ld [wcf64], a ld [wcf65], a @@ -784,9 +773,8 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7) ld a, d ld d, 0 ld hl, .sinewave -rept 2 add hl, de -endr + add hl, de ld e, [hl] inc hl ld d, [hl] |