ref: d9f764e923946de0f59f9ab0af6c017b17eaa460
parent: 99fcdc90f60a133d760a6a3413c60205a2eda33c
author: IIMarckus <iimarckus@gmail.com>
date: Tue Jan 10 13:16:18 EST 2012
$CD3D seems to be used only for trades, so document it as such. hg-commit-id: 3207c2aa47df
--- a/constants.asm
+++ b/constants.asm
@@ -80,6 +80,8 @@
; wram locations
W_AICOUNT EQU $CCDF ; number of times remaining that AI action can occur
+W_WHICHTRADE EQU $CD3D ; which entry from TradeMons to select
+
W_OPPONENTHP EQU $CFE6 ; active opponent's hp (16 bits)
W_OPPONENTNUMBER EQU $CFE8 ; active opponent's position in team (0 to 5)
W_OPPONENTSTATUS EQU $CFE9 ; active opponent's status condition
--- a/pokered.asm
+++ b/pokered.asm
@@ -6591,7 +6591,7 @@
VermilionHouse3Text1: ; 0x19c17
db $08 ; asm
ld a, $4
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp $24d7
@@ -7747,7 +7747,7 @@
CeruleanHouse2Text2: ; 0x1d702
db $08 ; asm
ld a, $6
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp $24d7
@@ -8372,7 +8372,7 @@
Route2HouseText2: ; 0x1def9
db $08 ; asm
ld a, $1
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp $24d7
@@ -18543,7 +18543,7 @@
call GivePokemon
jr nc, .asm_38361 ; 0x49324
xor a
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld [$cd3f], a
ld a, $5
ld [$cd3e], a
@@ -18689,7 +18689,7 @@
Route11GateUpstairsText1: ; 0x4945f
db $08 ; asm
xor a
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp $24d7
@@ -19050,7 +19050,7 @@
Route18GateHeaderText1: ; 0x4997e
db $08 ; asm
ld a, $5
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp $24d7
@@ -24983,7 +24983,7 @@
UndergroundTunnelEntranceRoute5Text1: ; 0x5d6b2
db $08 ; asm
ld a, $9
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
ld hl, $56af
@@ -28453,13 +28453,13 @@
Lab2Text2: ; 0x75c2f
db $8
ld a, $7
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
jr asm_78552 ; 0x75c35 $6
Lab2Text3:
db $8
ld a, $8
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
asm_78552: ; 0x75c3d
ld a, $54
call Predef
@@ -28569,7 +28569,7 @@
Lab4Text2: ; 0x75dda
db $08 ; asm
ld a, $3
- ld [$cd3d], a
+ ld [W_WHICHTRADE], a
ld a, $54
call Predef
jp $24d7