shithub: pokered

Download patch

ref: 8a80f2c85223eb4f9bba9e9ee103dac348a8b107
parent: 822bb2bd21110cc5dc7875d70f8c36c15d13cbaf
author: YamaArashi <shadow962@live.com>
date: Sat Mar 14 14:29:53 EDT 2015

more trade comments/fixes

--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -13,7 +13,7 @@
 ; Externally clocked link cable trades use this.
 	ld a, [wTradedEnemyMonSpecies]
 	ld [wLeftGBMonSpecies], a
-	ld a, [wTrainerSpriteOffset]
+	ld a, [wTradedPlayerMonSpecies]
 	ld [wRightGBMonSpecies], a
 	ld de, ExternalClockTradeFuncSequence
 
@@ -259,7 +259,7 @@
 	ld a, TRADE_BALL_POOF_ANIM
 	call Trade_ShowAnimation
 	ld a, TRADE_BALL_DROP_ANIM
-	call Trade_ShowAnimation
+	call Trade_ShowAnimation ; clears mon pic
 	ld a, [wTradedPlayerMonSpecies]
 	call PlayCry
 	xor a
@@ -272,8 +272,12 @@
 	call CopyScreenTileBufferToVRAM
 	ld b, $8
 	call GoPAL_SET
+
+; This function call is pointless. It just copies blank tiles to VRAM that was
+; already filled with blank tiles.
 	ld hl, vBGMap1 + $8c
 	call Trade_CopyCableTilesOffScreen
+
 	ld a, $a0
 	ld [hSCX], a
 	call DelayFrame
@@ -754,7 +758,10 @@
 	ret
 
 Trade_SlideTextBoxOffScreen: ; 415df (10:55df)
-; Slides the window right until it's off screen.
+; Slides the window right until it's off screen. The window usually just has
+; a text box at the bottom when this is called. However, when this is called
+; after Trade_ShowEnemyMon in the external clock sequence, there is a mon pic
+; above the text box and it is also scrolled off the screen.
 	ld c, 50
 	call DelayFrames
 .loop