@@ -309,7 +309,7 @@ Trade_AnimateBallEnteringLinkCable:
309309.moveBallInsideLinkCableLoop
310310 push bc
311311 xor a
312- ld de , Trade_BallInsideLinkCableOAM
312+ ld de , Trade_BallInsideLinkCableOAMBlock
313313 call WriteOAMBlock
314314 ld a , [ wLinkCableAnimBulgeToggle ]
315315 xor $ 1
@@ -345,9 +345,11 @@ Trade_AnimateBallEnteringLinkCable:
345345 ldh [ hAutoBGTransferEnabled ], a
346346 ret
347347
348- Trade_BallInsideLinkCableOAM:
349- dbsprite 0 , 15 , 0 , 6 , $ 7e , OAM_HFLIP
350- dbsprite 8 , 15 , 0 , 6 , $ 7e , OAM_HFLIP | OAM_VFLIP
348+ Trade_BallInsideLinkCableOAMBlock:
349+ db $ 7e , 0
350+ db $ 7e , OAM_HFLIP
351+ db $ 7e , OAM_VFLIP
352+ db $ 7e , OAM_HFLIP | OAM_VFLIP
351353
352354Trade_ShowEnemyMon:
353355 ld a , TRADE_BALL_TILT_ANIM
@@ -616,7 +618,7 @@ Trade_AnimCircledMon:
616618
617619Trade_WriteCircledMonOAM:
618620 farcall WriteMonPartySpriteOAMBySpecies
619- call Trade_WriteCircleOAM
621+ call Trade_WriteCircleOAMBlock
620622
621623Trade_AddOffsetsToOAMCoords:
622624 ld hl , wShadowOAM
@@ -670,11 +672,11 @@ Trade_AnimMonMoveVertical:
670672 jr nz , . loop
671673 ret
672674
673- Trade_WriteCircleOAM :
675+ Trade_WriteCircleOAMBlock :
674676; Writes the OAM blocks for the circle around the traded mon as it passes
675677; the link cable.
676- ld hl , Trade_CircleOAMPointers
677- ld c , $ 4
678+ ld hl , Trade_CircleOAMBlocks
679+ ld c , 4
678680 xor a
679681. loop
680682 push bc
@@ -697,33 +699,41 @@ Trade_WriteCircleOAM:
697699 jr nz , . loop
698700 ret
699701
700- MACRO trade_circle_oam
702+ MACRO trade_circle_oam_block
703+ ; oam block pointer, upper-left x coord, upper-left y coord
701704 dw \ 1
702705 db \ 2 , \ 3
703706ENDM
704707
705- Trade_CircleOAMPointers:
706- ; oam pointer, upper-left x coord, upper-left y coord
707- trade_circle_oam Trade_CircleOAM0 , $ 08 , $ 08
708- trade_circle_oam Trade_CircleOAM1 , $ 18 , $ 08
709- trade_circle_oam Trade_CircleOAM2 , $ 08 , $ 18
710- trade_circle_oam Trade_CircleOAM3 , $ 18 , $ 18
711-
712- Trade_CircleOAM0:
713- dbsprite 2 , 7 , 0 , 0 , ICON_TRADEBUBBLE << 2 + 1 , OAM_OBP1
714- dbsprite 2 , 7 , 0 , 2 , ICON_TRADEBUBBLE << 2 + 3 , OAM_OBP1
715-
716- Trade_CircleOAM1:
717- dbsprite 6 , 7 , 0 , 1 , ICON_TRADEBUBBLE << 2 + 0 , OAM_OBP1 | OAM_HFLIP
718- dbsprite 6 , 7 , 0 , 3 , ICON_TRADEBUBBLE << 2 + 2 , OAM_OBP1 | OAM_HFLIP
719-
720- Trade_CircleOAM2:
721- dbsprite 10 , 7 , 0 , 2 , ICON_TRADEBUBBLE << 2 + 3 , OAM_OBP1 | OAM_VFLIP
722- dbsprite 10 , 7 , 0 , 0 , ICON_TRADEBUBBLE << 2 + 1 , OAM_OBP1 | OAM_VFLIP
723-
724- Trade_CircleOAM3:
725- dbsprite 14 , 7 , 0 , 3 , ICON_TRADEBUBBLE << 2 + 2 , OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
726- dbsprite 14 , 7 , 0 , 1 , ICON_TRADEBUBBLE << 2 + 0 , OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
708+ Trade_CircleOAMBlocks:
709+ trade_circle_oam_block .OAMBlock0 , 8 , 8
710+ trade_circle_oam_block .OAMBlock1 , 24 , 8
711+ trade_circle_oam_block .OAMBlock2 , 8 , 24
712+ trade_circle_oam_block .OAMBlock3 , 24 , 24
713+
714+ .OAMBlock0:
715+ db ICON_TRADEBUBBLE << 2 + 0 , OAM_OBP1
716+ db ICON_TRADEBUBBLE << 2 + 1 , OAM_OBP1
717+ db ICON_TRADEBUBBLE << 2 + 2 , OAM_OBP1
718+ db ICON_TRADEBUBBLE << 2 + 3 , OAM_OBP1
719+
720+ .OAMBlock1:
721+ db ICON_TRADEBUBBLE << 2 + 1 , OAM_OBP1 | OAM_HFLIP
722+ db ICON_TRADEBUBBLE << 2 + 0 , OAM_OBP1 | OAM_HFLIP
723+ db ICON_TRADEBUBBLE << 2 + 3 , OAM_OBP1 | OAM_HFLIP
724+ db ICON_TRADEBUBBLE << 2 + 2 , OAM_OBP1 | OAM_HFLIP
725+
726+ .OAMBlock2:
727+ db ICON_TRADEBUBBLE << 2 + 2 , OAM_OBP1 | OAM_VFLIP
728+ db ICON_TRADEBUBBLE << 2 + 3 , OAM_OBP1 | OAM_VFLIP
729+ db ICON_TRADEBUBBLE << 2 + 0 , OAM_OBP1 | OAM_VFLIP
730+ db ICON_TRADEBUBBLE << 2 + 1 , OAM_OBP1 | OAM_VFLIP
731+
732+ .OAMBlock3:
733+ db ICON_TRADEBUBBLE << 2 + 3 , OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
734+ db ICON_TRADEBUBBLE << 2 + 2 , OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
735+ db ICON_TRADEBUBBLE << 2 + 1 , OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
736+ db ICON_TRADEBUBBLE << 2 + 0 , OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
727737
728738; a = species
729739Trade_LoadMonSprite:
0 commit comments