summaryrefslogtreecommitdiff
path: root/engine/trade.asm
diff options
context:
space:
mode:
authordannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
committerdannye <corrnondacqb@yahoo.com>2016-01-12 18:45:02 -0600
commit5914540ba780d7936fd6624d6fde2d67a9f7a773 (patch)
treea1ce27018f39d98f49d89468df426d0291e18560 /engine/trade.asm
parentccf4fe54a8e444aaf966fac7b38bc9452c494222 (diff)
parent8a5a7d8e68538b727e0c166488265f395603366e (diff)
Merge branch 'master' of https://github.com/pret/pokered into rgbgfxrgbgfx
Diffstat (limited to 'engine/trade.asm')
-rwxr-xr-xengine/trade.asm62
1 files changed, 31 insertions, 31 deletions
diff --git a/engine/trade.asm b/engine/trade.asm
index 1a0e5f61..1642e729 100755
--- a/engine/trade.asm
+++ b/engine/trade.asm
@@ -18,14 +18,14 @@ ExternalClockTradeAnim: ; 410f3 (10:50f3)
ld de, ExternalClockTradeFuncSequence
TradeAnimCommon: ; 41102 (10:5102)
- ld a, [W_OPTIONS]
+ ld a, [wOptions]
push af
ld a, [hSCY]
push af
ld a, [hSCX]
push af
xor a
- ld [W_OPTIONS], a
+ ld [wOptions], a
ld [hSCY], a
ld [hSCX], a
push de
@@ -53,7 +53,7 @@ TradeAnimCommon: ; 41102 (10:5102)
pop af
ld [hSCY], a
pop af
- ld [W_OPTIONS], a
+ ld [wOptions], a
ret
addtradefunc: MACRO
@@ -149,7 +149,7 @@ Trade_Delay80: ; 41191 (10:5191)
Trade_ClearTileMap: ; 41196 (10:5196)
coord hl, 0, 0
- ld bc, 20 * 18
+ ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
ld a, " "
jp FillMemory
@@ -158,12 +158,12 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
call DisableLCD
ld hl, TradingAnimationGraphics
ld de, vChars2 + $310
- ld bc, $310
+ ld bc, TradingAnimationGraphicsEnd - TradingAnimationGraphics
ld a, BANK(TradingAnimationGraphics)
call FarCopyData2
ld hl, TradingAnimationGraphics2
ld de, vSprites + $7c0
- ld bc, $40
+ ld bc, TradingAnimationGraphics2End - TradingAnimationGraphics2
ld a, BANK(TradingAnimationGraphics2)
call FarCopyData2
ld hl, vBGMap0
@@ -190,7 +190,7 @@ LoadTradingGFXAndMonNames: ; 411a1 (10:51a1)
call GetMonName
ld hl, wcd6d
ld de, wcf4b
- ld bc, $b
+ ld bc, NAME_LENGTH
call CopyData
ld a, [wTradedEnemyMonSpecies]
ld [wd11e], a
@@ -204,15 +204,15 @@ Trade_LoadMonPartySpriteGfx: ; 4120b (10:520b)
Trade_SwapNames: ; 41217 (10:5217)
ld hl, wPlayerName
ld de, wBuffer
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wLinkEnemyTrainerName
ld de, wPlayerName
- ld bc, 11
+ ld bc, NAME_LENGTH
call CopyData
ld hl, wBuffer
ld de, wLinkEnemyTrainerName
- ld bc, 11
+ ld bc, NAME_LENGTH
jp CopyData
Trade_Cleanup: ; 4123b (10:523b)
@@ -268,8 +268,8 @@ Trade_DrawOpenEndOfLinkCable: ; 41298 (10:5298)
call Trade_ClearTileMap
ld b, vBGMap0 / $100
call CopyScreenTileBufferToVRAM
- ld b, $8
- call GoPAL_SET
+ ld b, SET_PAL_GENERIC
+ call RunPaletteCommand
; This function call is pointless. It just copies blank tiles to VRAM that was
; already filled with blank tiles.
@@ -383,9 +383,9 @@ Trade_AnimLeftToRight: ; 41376 (10:5376)
ld a, $e4
ld [rOBP0], a
ld a, $54
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, $1c
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, [wLeftGBMonSpecies]
ld [wMonPartySpriteSpecies], a
call Trade_WriteCircledMonOAM
@@ -415,9 +415,9 @@ Trade_AnimRightToLeft: ; 413c6 (10:53c6)
xor a
ld [wTradedMonMovingRight], a
ld a, $64
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, $44
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld a, [wRightGBMonSpecies]
ld [wMonPartySpriteSpecies], a
call Trade_WriteCircledMonOAM
@@ -552,14 +552,14 @@ Trade_CopyCableTilesOffScreen: ; 414ae (10:54ae)
; continues when the screen is scrolled.
push hl
coord hl, 0, 4
- call CopyToScreenEdgeTiles
+ call CopyToRedrawRowOrColumnSrcTiles
pop hl
ld a, h
- ld [H_SCREENEDGEREDRAWADDR + 1], a
+ ld [hRedrawRowOrColumnDest + 1], a
ld a, l
- ld [H_SCREENEDGEREDRAWADDR], a
- ld a, REDRAWROW
- ld [H_SCREENEDGEREDRAW], a
+ ld [hRedrawRowOrColumnDest], a
+ ld a, REDRAW_ROW
+ ld [hRedrawRowOrColumnMode], a
ld c, 10
jp DelayFrames
@@ -622,10 +622,10 @@ Trade_AddOffsetsToOAMCoords: ; 41510 (10:5510)
ld hl, wOAMBuffer
ld c, $14
.loop
- ld a, [W_BASECOORDY]
+ ld a, [wBaseCoordY]
add [hl]
ld [hli], a
- ld a, [W_BASECOORDX]
+ ld a, [wBaseCoordX]
add [hl]
ld [hli], a
inc hl
@@ -657,9 +657,9 @@ Trade_AnimMonMoveVertical: ; 41525 (10:5525)
lb bc, -4, 0 ; move left
.doAnim
ld a, b
- ld [W_BASECOORDX], a
+ ld [wBaseCoordX], a
ld a, c
- ld [W_BASECOORDY], a
+ ld [wBaseCoordY], a
ld d, $4
.loop
call Trade_AddOffsetsToOAMCoords
@@ -727,10 +727,10 @@ Trade_CircleOAM3: ; 4159c (10:559c)
Trade_LoadMonSprite: ; 415a4 (10:55a4)
ld [wcf91], a
ld [wd0b5], a
- ld [wcf1d], a
- ld b, $b
- ld c, $0
- call GoPAL_SET
+ ld [wWholeScreenPaletteMonSpecies], a
+ ld b, SET_PAL_POKEMON_WHOLE_SCREEN
+ ld c, 0
+ call RunPaletteCommand
ld a, [H_AUTOBGTRANSFERENABLED]
xor $1
ld [H_AUTOBGTRANSFERENABLED], a
@@ -847,7 +847,7 @@ TradeforText: ; 41671 (10:5671)
db "@"
Trade_ShowAnimation: ; 41676 (10:5676)
- ld [W_ANIMATIONID], a
+ ld [wAnimationID], a
xor a
- ld [wcc5b], a
+ ld [wAnimationType], a
predef_jump MoveAnimation