aboutsummaryrefslogtreecommitdiffstats
path: root/engine/movie/trade.asm
diff options
context:
space:
mode:
authorRangi <35663410+Rangi42@users.noreply.github.com>2020-07-19 23:04:16 -0400
committerGitHub <noreply@github.com>2020-07-19 23:04:16 -0400
commit0177688ad4d923c4970009fa87df48605bb43ed6 (patch)
tree4c44fbb1813e78eb00f7c1690d2c23099a49113b /engine/movie/trade.asm
parentMerge pull request #277 from Rangi42/master (diff)
parentMissingno's Pokédex weight is two bytes like the rest (diff)
downloadpokeyellow-0177688ad4d923c4970009fa87df48605bb43ed6.tar.gz
pokeyellow-0177688ad4d923c4970009fa87df48605bb43ed6.tar.xz
pokeyellow-0177688ad4d923c4970009fa87df48605bb43ed6.zip
Merge pull request #279 from Rangi42/master
Identify sprite and battle animation data
Diffstat (limited to 'engine/movie/trade.asm')
-rwxr-xr-xengine/movie/trade.asm52
1 files changed, 27 insertions, 25 deletions
diff --git a/engine/movie/trade.asm b/engine/movie/trade.asm
index fc2da9bd..fa84e01d 100755
--- a/engine/movie/trade.asm
+++ b/engine/movie/trade.asm
@@ -59,11 +59,11 @@ TradeAnimCommon:
addtradefunc: MACRO
\1TradeFunc::
dw \1
- ENDM
+ENDM
tradefunc: MACRO
db (\1TradeFunc - TradeFuncPointerTable) / 2
- ENDM
+ENDM
; The functions in the sequences below are executed in order by TradeFuncCommon.
; They are from opposite perspectives. The external clock one makes use of
@@ -86,7 +86,7 @@ InternalClockTradeFuncSequence:
tradefunc Trade_ShowEnemyMon
tradefunc Trade_Delay100
tradefunc Trade_Cleanup
- db $FF
+ db -1 ; end
ExternalClockTradeFuncSequence:
tradefunc LoadTradingGFXAndMonNames
@@ -110,7 +110,7 @@ ExternalClockTradeFuncSequence:
tradefunc Trade_ShowClearedWindow
tradefunc PrintTradeWentToText
tradefunc Trade_Cleanup
- db $FF
+ db -1 ; end
TradeFuncPointerTable:
addtradefunc LoadTradingGFXAndMonNames
@@ -282,7 +282,7 @@ Trade_DrawOpenEndOfLinkCable:
ld a, %10001011
ldh [rLCDC], a
hlcoord 6, 2
- ld b, $7 ; open end of link cable tile ID list index
+ ld b, TILEMAP_LINK_CABLE
call CopyTileIDsFromList_ZeroBaseTileID
call Trade_CopyTileMapToVRAM
ld a, SFX_HEAL_HP
@@ -346,8 +346,8 @@ Trade_AnimateBallEnteringLinkCable:
ret
Trade_BallInsideLinkCableOAM:
- db $7E,$00,$7E,$20
- db $7E,$40,$7E,$60
+ dbsprite 0, 15, 0, 6, $7e, OAM_HFLIP
+ dbsprite 8, 15, 0, 6, $7e, OAM_HFLIP | OAM_VFLIP
Trade_ShowEnemyMon:
ld a, TRADE_BALL_TILT_ANIM
@@ -474,7 +474,7 @@ Trade_DrawLeftGameboy:
; draw gameboy pic
hlcoord 5, 3
- ld b, $6
+ ld b, TILEMAP_GAME_BOY
call CopyTileIDsFromList_ZeroBaseTileID
; draw text box with player name below gameboy pic
@@ -521,7 +521,7 @@ Trade_DrawRightGameboy:
; draw gameboy pic
hlcoord 7, 8
- ld b, $6
+ ld b, TILEMAP_GAME_BOY
call CopyTileIDsFromList_ZeroBaseTileID
; draw text box with enemy name above link cable
@@ -697,31 +697,33 @@ Trade_WriteCircleOAM:
jr nz, .loop
ret
+trade_circle_oam: MACRO
+ dw \1
+ db \2, \3
+ENDM
+
Trade_CircleOAMPointers:
- dw Trade_CircleOAM0
- db $08,$08
- dw Trade_CircleOAM1
- db $18,$08
- dw Trade_CircleOAM2
- db $08,$18
- dw Trade_CircleOAM3
- db $18,$18
+ ; oam pointer, upper-left x coord, upper-left y coord
+ trade_circle_oam Trade_CircleOAM0, $08, $08
+ trade_circle_oam Trade_CircleOAM1, $18, $08
+ trade_circle_oam Trade_CircleOAM2, $08, $18
+ trade_circle_oam Trade_CircleOAM3, $18, $18
Trade_CircleOAM0:
- db $38,$10,$39,$10
- db $3A,$10,$3B,$10
+ dbsprite 2, 7, 0, 0, $39, OAM_OBP1
+ dbsprite 2, 7, 0, 2, $3b, OAM_OBP1
Trade_CircleOAM1:
- db $39,$30,$38,$30
- db $3B,$30,$3A,$30
+ dbsprite 6, 7, 0, 1, $38, OAM_OBP1 | OAM_HFLIP
+ dbsprite 6, 7, 0, 3, $3a, OAM_OBP1 | OAM_HFLIP
Trade_CircleOAM2:
- db $3A,$50,$3B,$50
- db $38,$50,$39,$50
+ dbsprite 10, 7, 0, 2, $3b, OAM_OBP1 | OAM_VFLIP
+ dbsprite 10, 7, 0, 0, $39, OAM_OBP1 | OAM_VFLIP
Trade_CircleOAM3:
- db $3B,$70,$3A,$70
- db $39,$70,$38,$70
+ dbsprite 14, 7, 0, 3, $3a, OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
+ dbsprite 14, 7, 0, 1, $38, OAM_OBP1 | OAM_HFLIP | OAM_VFLIP
; a = species
Trade_LoadMonSprite: