summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdata/sprite_engine.asm4
-rwxr-xr-xengine/sprites.asm32
-rw-r--r--home.asm139
-rw-r--r--home/battle.asm253
-rw-r--r--main.asm11
-rw-r--r--wram.asm136
6 files changed, 281 insertions, 294 deletions
diff --git a/data/sprite_engine.asm b/data/sprite_engine.asm
index 90f183f8..e53b1c47 100755
--- a/data/sprite_engine.asm
+++ b/data/sprite_engine.asm
@@ -1,4 +1,4 @@
-SpriteAnimFrameData: ; 8dbfe
+AnimatedObjectFrameData: ; 8dbfe
dw .data_8dc6e
dw .data_8dc71
dw .data_8dc76
@@ -310,7 +310,7 @@ SpriteAnimFrameData: ; 8dbfe
db $50,$02, $5b,$02, $50,$02, $5b,$42
db $fe
-SpriteAnimOAMData: ; 8ddbc
+AnimatedObjectOAMData: ; 8ddbc
dbw $00, .data_8e16a
dbw $04, .data_8e16a
dbw $4c, .data_8ded1
diff --git a/engine/sprites.asm b/engine/sprites.asm
index 362fe827..eb9b2fd5 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -1,4 +1,4 @@
-ClearSpriteAnims: ; 8d174
+ClearAnimatedObjects: ; 8d174
ld hl, $c508 ; 23:5174
ld bc, $c1 ; 23:5177
.loop
@@ -10,12 +10,12 @@ ClearSpriteAnims: ; 8d174
jr nz, .loop ; 23:5180
ret ; 23:5182
-PlaySpriteAnimationsAndDelayFrame: ; 8d182
- call PlaySpriteAnimations ; 23:5183
+PlayAnimatedObjectationsAndDelayFrame: ; 8d182
+ call PlayAnimatedObjectations ; 23:5183
call $32e ; DelayFrame ; 23:5186
ret ; 23:5189
-PlaySpriteAnimations: ; 8d189
+PlayAnimatedObjectations: ; 8d189
push hl ; 23:518a
push de ; 23:518b
push bc ; 23:518c
@@ -101,7 +101,7 @@ DoNextFrameForFirst16Sprites: ; 8d1c9
.cancel
ret ; 23:51f6
-InitSpriteAnimStruct_:: ; 8d1f7
+InitAnimatedObjectStruct_:: ; 8d1f7
push de ; 23:51f7
push af ; 23:51f8
ld hl, $c51c ; 23:51f9
@@ -132,7 +132,7 @@ InitSpriteAnimStruct_:: ; 8d1f7
pop af ; 23:5218
ld e, a ; 23:5219
ld d, $0 ; 23:521a
- ld hl, SpriteAnimSeqData ; 23:521c
+ ld hl, AnimatedObjectSeqData ; 23:521c
add hl, de ; 23:521f
add hl, de ; 23:5220
add hl, de ; 23:5221
@@ -149,7 +149,7 @@ InitSpriteAnimStruct_:: ; 8d1f7
ld [hli], a ; 23:5230
inc de ; 23:5231
ld a, [de] ; 23:5232
- call GetSpriteAnimVTile ; 23:5233
+ call GetAnimatedObjectVTile ; 23:5233
ld [hli], a ; 23:5236
pop de ; 23:5237
ld hl, $4 ; 23:5238
@@ -185,8 +185,8 @@ DeinitializeSprite: ; 8d257
ret ; 23:525d
UpdateAnimFrame: ; 8d25e
- call InitSpriteAnimBuffer ; 23:525e
- call GetSpriteAnimFrame ; 23:5261
+ call InitAnimatedObjectBuffer ; 23:525e
+ call GetAnimatedObjectFrame ; 23:5261
cp $fd ; 23:5264
jr z, .done ; 23:5266
cp $fc ; 23:5268
@@ -299,7 +299,7 @@ GetSpriteOAMAttr: ; 8d2f0
or b ; 23:52fc
ret ; 23:52fd
-InitSpriteAnimBuffer: ; 8d2fe
+InitAnimatedObjectBuffer: ; 8d2fe
xor a ; 23:52fe
ld [$c5c0], a ; 23:52ff
ld hl, $3 ; 23:5302
@@ -316,7 +316,7 @@ InitSpriteAnimBuffer: ; 8d2fe
ld [$c5c6], a ; 23:5317
ret ; 23:531a
-GetSpriteAnimVTile: ; 8d31b
+GetAnimatedObjectVTile: ; 8d31b
push hl ; 23:531b
push bc ; 23:531c
ld hl, $c508 ; 23:531d
@@ -351,7 +351,7 @@ Function8d332: ; 8d332
ld [hl], $ff ; 23:5341
ret ; 23:5343
-GetSpriteAnimFrame: ; 8d344
+GetAnimatedObjectFrame: ; 8d344
.loop
ld hl, $8 ; 23:5344
add hl, bc ; 23:5347
@@ -420,7 +420,7 @@ GetSpriteAnimFrame: ; 8d344
add hl, bc ; 23:539e
ld e, [hl] ; 23:539f
ld d, $0 ; 23:53a0
- ld hl, SpriteAnimFrameData ; 23:53a2
+ ld hl, AnimatedObjectFrameData ; 23:53a2
add hl, de ; 23:53a5
add hl, de ; 23:53a6
ld e, [hl] ; 23:53a7
@@ -437,7 +437,7 @@ GetSpriteAnimFrame: ; 8d344
GetFrameOAMPointer: ; 8d3b4
ld e, a ; 23:53b4
ld d, $0 ; 23:53b5
- ld hl, SpriteAnimOAMData ; 23:53b7
+ ld hl, AnimatedObjectOAMData ; 23:53b7
add hl, de ; 23:53ba
add hl, de ; 23:53bb
add hl, de ; 23:53bc
@@ -464,7 +464,7 @@ BrokenGetStdGraphics: ; 8d3be
pop bc ; 23:53d4
ret ; 23:53d5
-SpriteAnimSeqData: ; 8d3d6
+AnimatedObjectSeqData: ; 8d3d6
db $01, $01, $00
db $04, $04, $00
db $05, $05, $00
@@ -623,7 +623,7 @@ EndOfExpBarGFX:
SGBEndOfExpBarGFX:
dr $8e764, $8e774
-ClearSpriteAnims2
+ClearAnimatedObjects2
push hl ; 23:6774
push de ; 23:6775
push bc ; 23:6776
diff --git a/home.asm b/home.asm
index dab571a9..2db54f6e 100644
--- a/home.asm
+++ b/home.asm
@@ -1718,7 +1718,142 @@ GetCurNick::
pop hl
ret
-PrintBCDNumber::
- dr $3ade, $3d4f
+PrintBCDNumber:: ; 3ade (0:3ade)
+ ld b, c
+ res 7, c
+ res 6, c
+ res 5, c
+ bit 5, b
+ jr z, .asm_3af0
+ bit 7, b
+ jr nz, .asm_3af0
+ ld [hl], $f0
+ inc hl
+.asm_3af0
+ ld a, [de]
+ swap a
+ call Function3b15
+ ld a, [de]
+ call Function3b15
+ inc de
+ dec c
+ jr nz, .asm_3af0
+ bit 7, b
+ jr z, .asm_3b14
+ bit 6, b
+ jr nz, .asm_3b07
+ dec hl
+.asm_3b07
+ bit 5, b
+ jr z, .asm_3b0e
+ ld [hl], $f0
+ inc hl
+.asm_3b0e
+ ld [hl], $f6
+ call Function31e2
+ inc hl
+.asm_3b14
+ ret
+
+Function3b15:: ; 3b15 (0:3b15)
+ and $f
+ and a
+ jr z, .asm_3b2f
+ bit 7, b
+ jr z, .asm_3b29
+ bit 5, b
+ jr z, .asm_3b27
+ ld [hl], $f0
+ inc hl
+ res 5, b
+.asm_3b27
+ res 7, b
+.asm_3b29
+ add $f6
+ ld [hli], a
+ jp Function31e2
+
+.asm_3b2f
+ bit 7, b
+ jr z, .asm_3b29
+ bit 6, b
+ ret nz
+ ld a, $7f
+ ld [hli], a
+ ret
+
+GetPartyParamLocation::
+ push bc
+ ld hl, wPartyMons
+ ld c, a
+ ld b, $0
+ add hl, bc
+ ld a, [wd005]
+ call GetPartyLocation
+ pop bc
+ ret
+
+GetPartyLocation:: ; 3b4a (0:3b4a)
+ ld bc, $30
+ jp AddNTimes
+
+Function3b51::
+ push hl
+ ld a, b
+ dec a
+ ld b, $0
+ add hl, bc
+ ld hl, BaseData + 0
+ ld bc, $20
+ call AddNTimes
+ pop bc
+ ld a, BANK(BaseData)
+ call GetFarHalfword
+ ld b, l
+ ld c, h
+ pop hl
+ ret
+
+INCLUDE "home/battle.asm"
+
+PushLYOverrides:: ; 3d0d
+ ld a, [hLCDCPointer]
+ and a
+ ret z
+ ld a, wLYOverridesBuffer % $100
+ ld [wRequested2bppSource], a
+ ld a, wLYOverridesBuffer / $100
+ ld [wRequested2bppSource + 1], a
+ ld a, wLYOverrides % $100
+ ld [wRequested2bppDest], a
+ ld a, wLYOverrides / $100
+ ld [wRequested2bppDest + 1], a
+ ld a, $9
+ ld [wRequested2bpp], a
+ ret
+
+InitAnimatedObjectStruct::
+ ld [wAnimatedObjectStructIDBuffer], a
+ ld a, [hROMBank]
+ push af
+ ld a, BANK(InitAnimatedObjectStruct_) ; $23
+ rst Bankswitch
+ ld a, [wAnimatedObjectStructIDBuffer]
+ call InitAnimatedObjectStruct_ ; $51f7
+ pop af
+ rst Bankswitch
+ ret
+
+ReinitAnimatedObjectFrame::
+ ld [wAnimatedObjectStructIDBuffer], a
+ ld a, [hROMBank]
+ push af
+ ld a, BANK(ReinitAnimatedObjectFrame_) ; $23
+ rst Bankswitch
+ ld a, [wAnimatedObjectStructIDBuffer]
+ call ReinitAnimatedObjectFrame_ ; $5332
+ pop af
+ rst Bankswitch
+ ret
INCLUDE "home/audio.asm"
diff --git a/home/battle.asm b/home/battle.asm
index 3fd59363..df80a1f7 100644
--- a/home/battle.asm
+++ b/home/battle.asm
@@ -1,190 +1,145 @@
-UserPartyAttr:: ; 3945
+UserPartyAttr:: ; 3b69
push af
ld a, [hBattleTurn]
and a
- jr nz, .ot
+ jr nz, .asm_3b72
pop af
jr BattlePartyAttr
-.ot
+
+.asm_3b72
pop af
jr OTPartyAttr
-; 3951
-
-OpponentPartyAttr:: ; 3951
+OpponentPartyAttr::
push af
ld a, [hBattleTurn]
and a
- jr z, .ot
+ jr z, .asm_3b7e
pop af
jr BattlePartyAttr
-.ot
+
+.asm_3b7e
pop af
jr OTPartyAttr
-; 395d
-
-BattlePartyAttr:: ; 395d
-; Get attribute a from the active BattleMon's party struct.
+BattlePartyAttr::
push bc
ld c, a
- ld b, 0
- ld hl, PartyMons
+ ld b, $0
+ ld hl, wPartyMon1Species
add hl, bc
- ld a, [CurBattleMon]
+ ld a, [wCurBattleMon]
call GetPartyLocation
pop bc
ret
-; 396d
-
-OTPartyAttr:: ; 396d
-; Get attribute a from the active EnemyMon's party struct.
+OTPartyAttr::
push bc
ld c, a
- ld b, 0
- ld hl, OTPartyMon1Species
+ ld b, $0
+ ld hl, wOTPartyMon1Species
add hl, bc
- ld a, [CurOTMon]
+ ld a, [wCurOTMon]
call GetPartyLocation
pop bc
ret
-; 397d
-
-ResetDamage:: ; 397d
+ResetDamage::
xor a
- ld [CurDamage], a
- ld [CurDamage + 1], a
+ ld [wCurDamage], a
+ ld [wCurDamage + 1], a
ret
-; 3985
-SetPlayerTurn:: ; 3985
+SetPlayerTurn::
xor a
ld [hBattleTurn], a
ret
-; 3989
-SetEnemyTurn:: ; 3989
- ld a, 1
+SetEnemyTurn::
+ ld a, $1
ld [hBattleTurn], a
ret
-; 398e
-
-UpdateOpponentInParty:: ; 398e
+UpdateOpponentInParty::
ld a, [hBattleTurn]
and a
jr z, UpdateEnemyMonInParty
jr UpdateBattleMonInParty
-; 3995
-UpdateUserInParty:: ; 3995
ld a, [hBattleTurn]
and a
jr z, UpdateBattleMonInParty
jr UpdateEnemyMonInParty
-; 399c
-
-UpdateBattleMonInParty:: ; 399c
-; Update level, status, current HP
-
- ld a, [CurBattleMon]
-UpdateBattleMon:: ; 399f
- ld hl, PartyMon1Level
+UpdateBattleMonInParty::
+ ld a, [wCurBattleMon]
+ ld hl, wPartyMon1Level
call GetPartyLocation
-
ld d, h
ld e, l
- ld hl, BattleMonLevel
- ld bc, BattleMonMaxHP - BattleMonLevel
+ ld hl, wBattleMonLevel
+ ld bc, 5
jp CopyBytes
-; 39b0
-
-UpdateEnemyMonInParty:: ; 39b0
-; Update level, status, current HP
-; No wildmons.
+UpdateEnemyMonInParty::
ld a, [wBattleMode]
dec a
ret z
-
- ld a, [CurOTMon]
- ld hl, OTPartyMon1Level
+ ld a, [wCurOTMon]
+ ld hl, wOTPartyMon1Level
call GetPartyLocation
-
ld d, h
ld e, l
- ld hl, EnemyMonLevel
- ld bc, EnemyMonMaxHP - EnemyMonLevel
+ ld hl, wEnemyMonLevel
+ ld bc, 5
jp CopyBytes
-; 39c9
-
-RefreshBattleHuds:: ; 39c9
+RefreshBattleHuds::
call UpdateBattleHuds
- ld c, 3
+ ld c, $3
call DelayFrames
jp WaitBGMap
-; 39d4
-UpdateBattleHuds:: ; 39d4
- callba UpdatePlayerHUD
- callba UpdateEnemyHUD
+UpdateBattleHuds:: ; 3bf8 (0:3bf8)
+ ld a, $f
+ ld hl, $5da9
+ rst FarCall
+ ld a, $f
+ ld hl, $5e97
+ rst FarCall
ret
-; 39e1
-
-GetBattleVar:: ; 39e1
-; Preserves hl.
+GetBattleVar::
push hl
call GetBattleVarAddr
pop hl
ret
-; 39e7
-
-GetBattleVarAddr:: ; 39e7
-; Get variable from pair a, depending on whose turn it is.
-; There are 21 variable pairs.
+GetBattleVarAddr:: ; 3c0b (0:3c0b)
push bc
-
- ld hl, .battlevarpairs
+ ld hl, .battlevarpairs ; $3c2c
ld c, a
- ld b, 0
-rept 2
+ ld b, $0
+ add hl, bc
add hl, bc
-endr
-
ld a, [hli]
ld h, [hl]
ld l, a
-
-; Enemy turn uses the second byte instead.
-; This lets battle variable calls be side-neutral.
ld a, [hBattleTurn]
and a
- jr z, .getvar
+ jr z, .asm_3c1d
inc hl
-
-.getvar
-; var id
+.asm_3c1d
ld a, [hl]
ld c, a
- ld b, 0
-
+ ld b, $0
ld hl, .vars
-rept 2
add hl, bc
-endr
-
+ add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
-
ld a, [hl]
-
pop bc
ret
@@ -218,24 +173,23 @@ endr
.lastmoveopp db ENEMY_LAST_MOVE, PLAYER_LAST_MOVE
.vars
- dw PlayerSubStatus1, EnemySubStatus1
- dw PlayerSubStatus2, EnemySubStatus2
- dw PlayerSubStatus3, EnemySubStatus3
- dw PlayerSubStatus4, EnemySubStatus4
- dw PlayerSubStatus5, EnemySubStatus5
- dw BattleMonStatus, EnemyMonStatus
+ dw wPlayerSubStatus1, wEnemySubStatus1
+ dw wPlayerSubStatus2, wEnemySubStatus2
+ dw wPlayerSubStatus3, wEnemySubStatus3
+ dw wPlayerSubStatus4, wEnemySubStatus4
+ dw wPlayerSubStatus5, wEnemySubStatus5
+ dw wBattleMonStatus, wEnemyMonStatus
dw wPlayerMoveStructAnimation, wEnemyMoveStructAnimation
dw wPlayerMoveStructEffect, wEnemyMoveStructEffect
dw wPlayerMoveStructPower, wEnemyMoveStructPower
dw wPlayerMoveStructType, wEnemyMoveStructType
- dw CurPlayerMove, CurEnemyMove
- dw LastEnemyCounterMove, LastPlayerCounterMove
- dw LastPlayerMove, LastEnemyMove
-; 3a90
+ dw wCurPlayerMove, wCurEnemyMove
+ dw wLastEnemyCounterMove, wLastPlayerCounterMove
+ dw wLastPlayerMove, wLastEnemyMove
+ db $23 ; ???
-FarCopyRadioText:: ; 3a90
- inc hl
+FarCopyRadioText::
ld a, [hROMBank]
push af
ld a, [hli]
@@ -249,113 +203,62 @@ FarCopyRadioText:: ; 3a90
ld l, a
ld a, d
ld h, a
- ld de, wRadioText
- ld bc, 2 * SCREEN_WIDTH
+ ld de, wcef7
+ ld bc, $28
call CopyBytes
pop af
ld [hROMBank], a
ld [MBC3RomBank], a
ret
-; 3ab2
-
-
-MobileTextBorder:: ; 3ab2
-
-CELL_PHONE_TOP EQU $5e
-CELL_PHONE_BOTTOM EQU $5f
-
- ; For mobile link battles only.
- ld a, [wLinkMode]
- cp LINK_MOBILE
- ret c
-
- ; Draw a cell phone icon at the
- ; top right corner of the border.
- hlcoord 19, 12
- ld [hl], CELL_PHONE_TOP
- hlcoord 19, 13
- ld [hl], CELL_PHONE_BOTTOM
- ret
-; 3ac3
-
-
-BattleTextBox:: ; 3ac3
-; Open a textbox and print text at hl.
- push hl
- call SpeechTextBox
- call MobileTextBorder
- call UpdateSprites
- call ApplyTilemap
- pop hl
- call PrintTextBoxText
- ret
-; 3ad5
-
-
-StdBattleTextBox:: ; 3ad5
-; Open a textbox and print battle text at 20:hl.
+StdBattleTextBox::
GLOBAL BattleText
-
ld a, [hROMBank]
push af
-
- ld a, BANK(BattleText)
+ ld a, BANK(BattleText) ; $40
rst Bankswitch
-
- call BattleTextBox
-
+ call PrintText
pop af
rst Bankswitch
ret
-; 3ae1
-GetBattleAnimPointer:: ; 3ae1
+GetBattleAnimPointer::
GLOBAL BattleAnimations
GLOBAL BattleAnimCommands
- ld a, BANK(BattleAnimations)
+ ld a, BANK(BattleAnimations) ; $32
rst Bankswitch
-
ld a, [hli]
- ld [BattleAnimAddress], a
+ ld [wca10], a
ld a, [hl]
- ld [BattleAnimAddress + 1], a
-
- ld a, BANK(BattleAnimCommands)
+ ld [wca11], a
+ ld a, BANK(BattleAnimCommands) ; $33
rst Bankswitch
-
ret
-; 3af0
-
-GetBattleAnimByte:: ; 3af0
+GetBattleAnimByte::
push hl
push de
-
- ld hl, BattleAnimAddress
+ ld hl, wca10
ld e, [hl]
inc hl
ld d, [hl]
- ld a, BANK(BattleAnimations)
+ ld a, BANK(BattleAnimations) ; $32
rst Bankswitch
ld a, [de]
- ld [BattleAnimByte], a
+ ld [wca17], a
inc de
- ld a, BANK(BattleAnimCommands)
+ ld a, BANK(BattleAnimCommands) ; $33
rst Bankswitch
ld [hl], d
dec hl
ld [hl], e
-
pop de
pop hl
-
- ld a, [BattleAnimByte]
+ ld a, [wca17]
ret
-; 3b0c
diff --git a/main.asm b/main.asm
index 1c92ec6c..644bc4c9 100644
--- a/main.asm
+++ b/main.asm
@@ -272,7 +272,13 @@ Function8c3ab:: ; 8c3ab
dr $8c3ab, $8c3e9
Function8c3e9:: ; 8c3e9
- dr $8c3e9, $90000
+ dr $8c3e9, $8d1f7
+
+InitAnimatedObjectStruct_:: ; 8d1f7
+ dr $8d1f7, $8d332
+
+ReinitAnimatedObjectFrame_:: ; 8d332
+ dr $8d332, $90000
SECTION "bank24", DATA, BANK[$24]
dr $90000, $94000
@@ -333,9 +339,11 @@ SECTION "bank31", DATA, BANK[$31]
dr $c4000, $c8000
SECTION "bank32", DATA, BANK[$32]
+BattleAnimations:: ; Not actually where it is, I just needed the label for BANK to work
dr $c8000, $cc000
SECTION "bank33", DATA, BANK[$33]
+BattleAnimCommands:: ; Not actually where it is, I just needed the label for BANK to work
dr $cc000, $d0000
SECTION "bank34", DATA, BANK[$34]
@@ -386,6 +394,7 @@ SECTION "bank3f", DATA, BANK[$3f]
dr $fc000, $100000
SECTION "bank40", DATA, BANK[$40]
+BattleText:: ; Not actually where it is, I just needed the label for BANK to work
dr $100000, $104000
SECTION "bank41", DATA, BANK[$41]
diff --git a/wram.asm b/wram.asm
index 31da1d8b..f7f667d7 100644
--- a/wram.asm
+++ b/wram.asm
@@ -812,6 +812,9 @@ wc7fc:: ds 1 ; c7fc
wc7fd:: ds 1 ; c7fd
wc7fe:: ds 1 ; c7fe
wc7ff:: ds 1 ; c7ff
+wLYOverridesEnd::
+
+wLYOverridesBuffer::
wc800:: ds 1 ; c800
wc801:: ds 1 ; c801
wc802:: ds 1 ; c802
@@ -1068,6 +1071,8 @@ wc8fc:: ds 1 ; c8fc
wc8fd:: ds 1 ; c8fd
wc8fe:: ds 1 ; c8fe
wc8ff:: ds 1 ; c8ff
+wLYOverridesBufferEnd::
+
wc900:: ds 1 ; c900
wc901:: ds 1 ; c901
wc902:: ds 1 ; c902
@@ -1556,56 +1561,15 @@ wcae4:: ds 1 ; cae4
wcae5:: ds 1 ; cae5
wcae6:: ds 1 ; cae6
wcae7:: ds 1 ; cae7
-wcae8:: ds 1 ; cae8
-wcae9:: ds 1 ; cae9
-wcaea:: ds 1 ; caea
-wcaeb:: ds 1 ; caeb
-wcaec:: ds 1 ; caec
-wcaed:: ds 1 ; caed
-wcaee:: ds 1 ; caee
-wcaef:: ds 1 ; caef
-wcaf0:: ds 1 ; caf0
-wcaf1:: ds 1 ; caf1
-wcaf2:: ds 1 ; caf2
-wcaf3:: ds 1 ; caf3
-wcaf4:: ds 1 ; caf4
-wcaf5:: ds 1 ; caf5
+
+wEnemyMoveStruct:: move_struct wEnemyMoveStruct
+wPlayerMoveStruct:: move_struct wPlayerMoveStruct
wEnemyMonNick:: ds PKMN_NAME_LENGTH ; caf6
wBattleMonNick:: ds PKMN_NAME_LENGTH ; cb01
-wcb0c:: ds 1 ; cb0c
-wcb0d:: ds 1 ; cb0d
-wcb0e:: ds 1 ; cb0e
-wcb0f:: ds 1 ; cb0f
-wcb10:: ds 1 ; cb10
-wcb11:: ds 1 ; cb11
-wcb12:: ds 1 ; cb12
-wcb13:: ds 1 ; cb13
-wcb14:: ds 1 ; cb14
-wcb15:: ds 1 ; cb15
-wcb16:: ds 1 ; cb16
-wcb17:: ds 1 ; cb17
-wcb18:: ds 1 ; cb18
-wcb19:: ds 1 ; cb19
-wcb1a:: ds 1 ; cb1a
-wcb1b:: ds 1 ; cb1b
-wcb1c:: ds 1 ; cb1c
-wcb1d:: ds 1 ; cb1d
-wcb1e:: ds 1 ; cb1e
-wcb1f:: ds 1 ; cb1f
-wcb20:: ds 1 ; cb20
-wcb21:: ds 1 ; cb21
-wcb22:: ds 1 ; cb22
-wcb23:: ds 1 ; cb23
-wcb24:: ds 1 ; cb24
-wcb25:: ds 1 ; cb25
-wcb26:: ds 1 ; cb26
-wcb27:: ds 1 ; cb27
-wcb28:: ds 1 ; cb28
-wcb29:: ds 1 ; cb29
-wcb2a:: ds 1 ; cb2a
-wcb2b:: ds 1 ; cb2b
+wBattleMon:: battle_struct wBattleMon ; cb0c
+
wcb2c:: ds 1 ; cb2c
wcb2d:: ds 1 ; cb2d
wcb2e:: ds 1 ; cb2e
@@ -1619,21 +1583,21 @@ wOTClassName:: ds NAME_LENGTH ; cb34
wcb3f:: ds 1 ; cb3f
wcb40:: ds 1 ; cb40
-wcb41:: ds 1 ; cb41
+wCurOTMon:: ds 1 ; cb41
wcb42:: ds 1 ; cb42
wcb43:: ds 1 ; cb43
wcb44:: ds 1 ; cb44
wcb45:: ds 1 ; cb45
-wcb46:: ds 1 ; cb46
-wcb47:: ds 1 ; cb47
-wcb48:: ds 1 ; cb48
-wcb49:: ds 1 ; cb49
-wcb4a:: ds 1 ; cb4a
-wcb4b:: ds 1 ; cb4b
-wcb4c:: ds 1 ; cb4c
-wcb4d:: ds 1 ; cb4d
-wcb4e:: ds 1 ; cb4e
-wcb4f:: ds 1 ; cb4f
+wPlayerSubStatus1:: ds 1 ; cb46
+wPlayerSubStatus2:: ds 1 ; cb47
+wPlayerSubStatus3:: ds 1 ; cb48
+wPlayerSubStatus4:: ds 1 ; cb49
+wPlayerSubStatus5:: ds 1 ; cb4a
+wEnemySubStatus1:: ds 1 ; cb4b
+wEnemySubStatus2:: ds 1 ; cb4c
+wEnemySubStatus3:: ds 1 ; cb4d
+wEnemySubStatus4:: ds 1 ; cb4e
+wEnemySubStatus5:: ds 1 ; cb4f
wcb50:: ds 1 ; cb50
wcb51:: ds 1 ; cb51
wcb52:: ds 1 ; cb52
@@ -1747,8 +1711,8 @@ wcbbd:: ds 1 ; cbbd
wcbbe:: ds 1 ; cbbe
wcbbf:: ds 1 ; cbbf
wcbc0:: ds 1 ; cbc0
-wcbc1:: ds 1 ; cbc1
-wcbc2:: ds 1 ; cbc2
+wCurPlayerMove:: ds 1 ; cbc1
+wCurEnemyMove:: ds 1 ; cbc2
wcbc3:: ds 1 ; cbc3
wcbc4:: ds 1 ; cbc4
wcbc5:: ds 1 ; cbc5
@@ -1768,8 +1732,8 @@ wcbd2:: ds 1 ; cbd2
wcbd3:: ds 1 ; cbd3
wcbd4:: ds 1 ; cbd4
wcbd5:: ds 1 ; cbd5
-wcbd6:: ds 1 ; cbd6
-wcbd7:: ds 1 ; cbd7
+wLastEnemyCounterMove:: ds 1 ; cbd6
+wLastPlayerCounterMove:: ds 1 ; cbd7
wcbd8:: ds 1 ; cbd8
wcbd9:: ds 1 ; cbd9
wcbda:: ds 1 ; cbda
@@ -1803,8 +1767,8 @@ wcbf5:: ds 1 ; cbf5
wcbf6:: ds 1 ; cbf6
wcbf7:: ds 1 ; cbf7
wcbf8:: ds 1 ; cbf8
-wcbf9:: ds 1 ; cbf9
-wcbfa:: ds 1 ; cbfa
+wLastPlayerMove:: ds 1 ; cbf9
+wLastEnemyMove:: ds 1 ; cbfa
wcbfb:: ds 1 ; cbfb
wcbfc:: ds 1 ; cbfc
wcbfd:: ds 1 ; cbfd
@@ -2357,6 +2321,12 @@ wStringBuffer3:: ds 19 ; cf91
wStringBuffer4:: ds 19 ; cfa4
wStringBuffer5:: ds 19 ; cfb7
+ ds -4
+
+wCurBattleMon:: ds 1 ; cfc6
+wcfc7:: ds 1 ; cfc7
+wcfc8:: ds 1 ; cfc8
+wcfc9:: ds 1 ; cfc9
wcfca:: ds 1 ; cfca
wcfcb:: ds 1 ; cfcb
wcfcc:: ds 1 ; cfcc
@@ -2623,38 +2593,9 @@ wd0eb:: ds 1 ; d0eb
wd0ec:: ds 1 ; d0ec
wd0ed:: ds 1 ; d0ed
wd0ee:: ds 1 ; d0ee
-wd0ef:: ds 1 ; d0ef
-wd0f0:: ds 1 ; d0f0
-wd0f1:: ds 1 ; d0f1
-wd0f2:: ds 1 ; d0f2
-wd0f3:: ds 1 ; d0f3
-wd0f4:: ds 1 ; d0f4
-wd0f5:: ds 1 ; d0f5
-wd0f6:: ds 1 ; d0f6
-wd0f7:: ds 1 ; d0f7
-wd0f8:: ds 1 ; d0f8
-wd0f9:: ds 1 ; d0f9
-wd0fa:: ds 1 ; d0fa
-wd0fb:: ds 1 ; d0fb
-wd0fc:: ds 1 ; d0fc
-wd0fd:: ds 1 ; d0fd
-wd0fe:: ds 1 ; d0fe
-wd0ff:: ds 1 ; d0ff
-wd100:: ds 1 ; d100
-wd101:: ds 1 ; d101
-wd102:: ds 1 ; d102
-wd103:: ds 1 ; d103
-wd104:: ds 1 ; d104
-wd105:: ds 1 ; d105
-wd106:: ds 1 ; d106
-wd107:: ds 1 ; d107
-wd108:: ds 1 ; d108
-wd109:: ds 1 ; d109
-wd10a:: ds 1 ; d10a
-wd10b:: ds 1 ; d10b
-wd10c:: ds 1 ; d10c
-wd10d:: ds 1 ; d10d
-wd10e:: ds 1 ; d10e
+
+wEnemyMon:: battle_struct wEnemyMon ; d0ef
+
wd10f:: ds 1 ; d10f
wd110:: ds 1 ; d110
wd111:: ds 1 ; d111
@@ -2662,7 +2603,7 @@ wd112:: ds 1 ; d112
wd113:: ds 1 ; d113
wd114:: ds 1 ; d114
wd115:: ds 1 ; d115
-wd116:: ds 1 ; d116
+wBattleMode:: ds 1 ; d116
wd117:: ds 1 ; d117
wd118:: ds 1 ; d118
wBattleType:: ds 1 ; d119
@@ -2709,8 +2650,7 @@ wd13f:: ds 1 ; d13f
wBaseDataEnd::
wd140:: ds 1 ; d140
-wd141:: ds 1 ; d141
-wd142:: ds 1 ; d142
+wCurDamage:: ds 2 ; d141
wd143:: ds 1 ; d143
wd144:: ds 1 ; d144
wd145:: ds 1 ; d145