diff options
Diffstat (limited to 'engine/battle/battle_transition.asm')
-rw-r--r-- | engine/battle/battle_transition.asm | 44 |
1 files changed, 20 insertions, 24 deletions
diff --git a/engine/battle/battle_transition.asm b/engine/battle/battle_transition.asm index ba4f9e227..17c9d0b6d 100644 --- a/engine/battle/battle_transition.asm +++ b/engine/battle/battle_transition.asm @@ -589,7 +589,7 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc) dec b jr nz, .loop - call .loadpokeballgfx ; ld a, [OtherTrainerClass] \ ld de, PokeBallTransition \ ret + call .loadpokeballgfx hlcoord 2, 1 ld b, SCREEN_WIDTH - 4 @@ -640,8 +640,8 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc) .cgb ld hl, .daypals ld a, [TimeOfDayPal] - and (1 << 2) - 1 - cp 3 + maskbits NUM_DAYTIMES +- 1 + cp DARKNESS_F jr nz, .daytime ld hl, .nightpals .daytime @@ -691,17 +691,12 @@ StartTrainerBattle_LoadPokeBallGraphics: ; 8c5dc (23:45dc) ; 8c6a1 (23:46a1) .daypals ; 8c6a1 - RGB 31, 18, 29 - RGB 31, 11, 15 - RGB 31, 05, 05 - RGB 07, 07, 07 +INCLUDE "gfx/overworld/trainer_battle_day.pal" ; 8c6a9 .nightpals ; 8c6a9 - RGB 31, 18, 29 - RGB 31, 05, 05 - RGB 31, 05, 05 - RGB 31, 05, 05 +INCLUDE "gfx/overworld/trainer_battle_nite.pal" +; 8c6b1 .loadpokeballgfx ld a, [OtherTrainerClass] @@ -754,22 +749,23 @@ WipeLYOverrides: ; 8c6d8 StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7) - and (1 << 6) - 1 - cp 1 << 5 - jr nc, .okay - call .DoSineWave +; a = d * sin(a * pi/32) + and %111111 + cp %100000 + jr nc, .negative + call .ApplySineWave ld a, h ret -.okay - and (1 << 5) - 1 - call .DoSineWave +.negative + and %011111 + call .ApplySineWave ld a, h - xor -1 ; cpl + xor $ff inc a ret -.DoSineWave: ; 8c70c (23:470c) +.ApplySineWave: ; 8c70c (23:470c) ld e, a ld a, d ld d, 0 @@ -780,15 +776,15 @@ StartTrainerBattle_DrawSineWave: ; 8c6f7 (23:46f7) inc hl ld d, [hl] ld hl, 0 -.loop +.multiply srl a - jr nc, .skip + jr nc, .even add hl, de -.skip +.even sla e rl d and a - jr nz, .loop + jr nz, .multiply ret ; 8c728 (23:4728) |