summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorentrpntr <entrpntr@gmail.com>2020-05-08 04:15:55 -0400
committerentrpntr <entrpntr@gmail.com>2020-05-08 04:15:55 -0400
commit1220198362a209647b6491cb088e1e04204208cb (patch)
tree7bb8e69b823a35e613cff4ab31cc719677d3bc2c
parent41c19e6e7c751ad16e355cc9b5b1604b4199f2e5 (diff)
Modest cleanup of wram.asm.
-rwxr-xr-xengine/events/heal_machine_anim.asm4
-rwxr-xr-xengine/gfx/cgb_layouts.asm52
-rwxr-xr-xengine/gfx/color.asm8
-rw-r--r--engine/menus/intro_menu.asm2
-rw-r--r--layout.link4
-rw-r--r--wram.asm351
6 files changed, 250 insertions, 171 deletions
diff --git a/engine/events/heal_machine_anim.asm b/engine/events/heal_machine_anim.asm
index 7d2262af..002d4ad4 100755
--- a/engine/events/heal_machine_anim.asm
+++ b/engine/events/heal_machine_anim.asm
@@ -163,7 +163,7 @@ INCBIN "gfx/overworld/heal_machine.2bpp"
.cgb
ld hl, .palettes
- ld de, wOBPal6
+ ld de, wOBPals2 palette PAL_OW_TREE
ld bc, 1 palettes
call CopyBytes
ld a, $1
@@ -194,7 +194,7 @@ INCLUDE "gfx/overworld/heal_machine.pal"
ret
.go
- ld hl, wOBPal6
+ ld hl, wOBPals2 palette PAL_OW_TREE
ld a, [hli]
ld e, a
ld a, [hli]
diff --git a/engine/gfx/cgb_layouts.asm b/engine/gfx/cgb_layouts.asm
index b1ea7644..297f27b2 100755
--- a/engine/gfx/cgb_layouts.asm
+++ b/engine/gfx/cgb_layouts.asm
@@ -67,7 +67,7 @@ Function9376: ; 9376 (2:5376)
ld c, $4
call Function9ab7
ld hl, PalPacket_a0d5 + 1
- ld de, wTempBGPal4
+ ld de, wBGPals1 palette 4
ld c, $4
call Function9ab7
ld hl, PalPacket_a0d5 + 1
@@ -77,7 +77,7 @@ Function9376: ; 9376 (2:5376)
jr asm_93e1
Function9399: ; 9399 (2:5399)
- ld de, wTempBGPal0
+ ld de, wBGPals1
call Function9ba9
push hl
call Function9adb
@@ -112,7 +112,7 @@ Function9399: ; 9399 (2:5399)
call Function9b28
asm_93e1:
ld hl, TilesetBGPalette + 7 * 8
- ld de, wTempBGPal7
+ ld de, wBGPals1 palette 7
ld bc, $8
call CopyBytes
hlcoord 0, 0, wAttrmap
@@ -144,7 +144,7 @@ asm_93e1:
ld a, $7
call ByteFill
ld hl, Palettes_9c09
- ld de, wTempOBPal2
+ ld de, wOBPals1 palette 2
ld bc, $30
call CopyBytes
call Function9b35
@@ -152,7 +152,7 @@ asm_93e1:
Function944a: ; 944a (2:544a)
ld hl, Palettes_bb6e
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld bc, $30
call CopyBytes
call Function9b28
@@ -161,7 +161,7 @@ Function944a: ; 944a (2:544a)
ret
Function945e: ; 945e (2:545e)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, [wcca1]
ld l, a
ld h, $0
@@ -177,7 +177,7 @@ Function945e: ; 945e (2:545e)
ld hl, Palettes_ad39
call Function9adb
ld hl, Palettes_94d3
- ld de, wTempBGPal3
+ ld de, wBGPals1 palette 3
ld bc, $18
call CopyBytes
call Function9b1d
@@ -247,7 +247,7 @@ Function9502: ; 9502 (2:5502)
jp Function9537
Function9513: ; 9513 (2:5513)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, $1d
call Function9ac7
call Function9ad2
@@ -268,7 +268,7 @@ Function9513: ; 9513 (2:5513)
Function9537: ; 9537 (2:5537)
call Function9b9c
ld hl, Palettes_9551
- ld de, wTempOBPal7
+ ld de, wOBPals1 palette 7
ld bc, $8
call CopyBytes
call Function9b35
@@ -290,7 +290,7 @@ Palettes_9559:
RGB 5, 12, 1
Function9561: ; 9561 (2:5561)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, $1d
call Function9ac7
call Function9ad2
@@ -453,10 +453,10 @@ Function96b7: ; 96b7 (2:56b7)
Function96c8:
ld hl, Palettes_96e1
- ld de, wTempBGPal0
+ ld de, wBGPals1
call Function9ad2
ld hl, Palettes_96e9
- ld de, wTempOBPal0
+ ld de, wOBPals1
ld bc, $10
call CopyBytes
call Function9b1d
@@ -480,7 +480,7 @@ Palettes_96e9:
RGB 3, 4, 6
Function96f9:
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, $38
call Function9ac7
call Function9ad2
@@ -537,7 +537,7 @@ Function9760: ; 9760 (2:5760)
ret
Function976d: ; 976d (2:576d)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, c
and a
jr z, .asm_977e
@@ -557,7 +557,7 @@ Function976d: ; 976d (2:576d)
call Function9bcb
call Function9adb
ld hl, Palettes_9c09
- ld de, wTempOBPal2
+ ld de, wOBPals1 palette 2
ld bc, $30
call CopyBytes
.asm_97a1
@@ -570,7 +570,7 @@ Function976d: ; 976d (2:576d)
Function97af: ; 97af (2:57af)
ld hl, Palettes_bb36
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld bc, $28
call CopyBytes
ld hl, Palettes_bb5e
@@ -598,7 +598,7 @@ Function97e1: ; 97e1 (2:57e1)
ld a, $4c
call Function9ac7
call Function9ad2
- ld hl, wTempOBPal0
+ ld hl, wOBPals1
ld a, $1f
ld [hli], a
ld a, $0
@@ -608,7 +608,7 @@ Function97e1: ; 97e1 (2:57e1)
ret
Function9802: ; 9802 (2:5802)
- ld de, wTempBGPal0
+ ld de, wBGPals1
xor a
call Function9bda
call Function9adb
@@ -843,15 +843,15 @@ Function99d9: ; 99d9 (2:59d9)
ret
Function9a03: ; 9a03 (2:5a03)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, $4e
call Function9ac7
call Function9ad2
- ld de, wTempOBPal0
+ ld de, wOBPals1
ld a, $4d
call Function9ac7
call Function9ad2
- ld de, wTempOBPal1
+ ld de, wOBPals1 palette 1
ld a, $4d
call Function9ac7
call Function9ad2
@@ -861,7 +861,7 @@ Function9a03: ; 9a03 (2:5a03)
ret
Function9a2e: ; 9a2e (2:5a2e)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
call Function9bcb
@@ -872,7 +872,7 @@ Function9a2e: ; 9a2e (2:5a2e)
ret
Function9a47: ; 9a47 (2:5a47)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, [wCurPartySpecies]
call Function9be4
call Function9adb
@@ -884,10 +884,10 @@ Function9a5a: ; 9a5a (2:5a5a)
ld hl, PalPacket_a135 + 1
call Function9ab2
ld hl, Palettes_bac6
- ld de, wTempOBPal0
+ ld de, wOBPals1
ld bc, $8
call CopyBytes
- ld de, wTempOBPal7
+ ld de, wOBPals1 palette 7
ld a, $1c
call Function9ac7
call Function9ad2
@@ -895,7 +895,7 @@ Function9a5a: ; 9a5a (2:5a5a)
ret
Function9a7b: ; 9a7b (2:5a7b)
- ld de, wTempBGPal0
+ ld de, wBGPals1
ld a, [wCurPartySpecies]
ld bc, wTempMonDVs
call Function9bd3
diff --git a/engine/gfx/color.asm b/engine/gfx/color.asm
index 92524d92..bb7b7ac0 100755
--- a/engine/gfx/color.asm
+++ b/engine/gfx/color.asm
@@ -579,7 +579,7 @@ Function9b75: ; 9b75 (2:5b75)
Function9b9c: ; 9b9c (2:5b9c)
ld hl, Palettes_bac6
- ld de, wTempOBPal0
+ ld de, wOBPals1
ld bc, $10
call CopyBytes
ret
@@ -643,7 +643,7 @@ Function9be9:
dec c
jr nz, .asm_9bf6
ld hl, Palettes_9c09
- ld de, wTempOBPal2
+ ld de, wOBPals1 palette 2
ld bc, $10
call CopyBytes
ret
@@ -1384,7 +1384,7 @@ Functionb649: ; b649 (2:7649)
ld bc, $40
ld hl, MapObjectPals
call AddNTimes
- ld de, wTempOBPal0
+ ld de, wOBPals1
ld bc, $40
call CopyBytes
ld a, [wEnvironment]
@@ -1410,7 +1410,7 @@ Functionb649: ; b649 (2:7649)
inc hl
inc hl
.asm_b6c4
- ld de, wTempBGPal6 + 2
+ ld de, wBGPals1 palette PAL_BG_ROOF color 1
ld bc, $4
call CopyBytes
ret
diff --git a/engine/menus/intro_menu.asm b/engine/menus/intro_menu.asm
index 1cd7e138..c690590e 100644
--- a/engine/menus/intro_menu.asm
+++ b/engine/menus/intro_menu.asm
@@ -1351,7 +1351,7 @@ IF DEF(_GOLD)
and $7
ret nz
ENDC
- ld hl, wc75f
+ ld hl, wLYOverrides + $5f
ld a, [hl]
dec a
ld bc, $28
diff --git a/layout.link b/layout.link
index a0df22ed..b2ec4c80 100644
--- a/layout.link
+++ b/layout.link
@@ -266,13 +266,13 @@ ROMX $7f
org $7df8
"Stadium Data"
WRAM0
- org $c000
"Audio RAM"
"WRAM"
"GBC Palettes"
"Sprites"
"Tilemap"
- "Animated Objects"
+ "Miscellaneous"
+ "Overworld Map"
"Video"
WRAMX 1
org $d000
diff --git a/wram.asm b/wram.asm
index 78c2304d..9260211f 100644
--- a/wram.asm
+++ b/wram.asm
@@ -120,25 +120,29 @@ SECTION "WRAM", WRAM0
wLZAddress:: dw ; c1c2
wLZBank:: db ; c1c4
-wc1c5:: db ; c1c5
+ ds 1
wInputType:: db ; c1c6
wAutoInputAddress:: dw ; c1c7
wAutoInputBank:: db ; c1c9
wAutoInputLength:: db ; c1ca
-wDebugFlags:: ds 1 ; c1cb
-wGameLogicPaused:: ds 1 ; c1cc
+wDebugFlags:: db
+wGameLogicPaused:: db ; c1cc
wSpriteUpdatesEnabled:: db
-wUnusedScriptByteBuffer:: db ; c1ce
-wMapTimeOfDay:: ds 1 ; c1cf
+
+wUnusedScriptByteBuffer:: db
+
+wMapTimeOfDay:: db
+
ds 3
-wPrinterConnectionOpen:: ds 1
-wPrinterOpcode:: ds 1 ; c1d4
-wc1d5:: ds 1 ; c1d5
-wDisableTextAcceleration:: ds 1 ; c1d6
-wPCItemsCursor:: db ; c1d7
-wPCItemsScrollPosition:: db ; c1d8
+
+wPrinterConnectionOpen:: db
+wPrinterOpcode:: db
+wPrevDexEntry:: db
+wDisableTextAcceleration:: db
+wPCItemsCursor:: db
+wPCItemsScrollPosition:: db
wc1d9:: ds 1 ; c1d9
wc1da:: ds 1 ; c1da
wc1db:: ds 1 ; c1db
@@ -180,21 +184,12 @@ wc1fe:: ds 1 ; c1fe
wc1ff:: ds 1 ; c1ff
SECTION "GBC Palettes", WRAM0
-palbuffer: MACRO
-\1Pal0:: ds 8
-\1Pal1:: ds 8
-\1Pal2:: ds 8
-\1Pal3:: ds 8
-\1Pal4:: ds 8
-\1Pal5:: ds 8
-\1Pal6:: ds 8
-\1Pal7:: ds 8
-ENDM
-
-wBGPals1:: palbuffer wTempBG ; c200
-wOBPals1:: palbuffer wTempOB ; c240
-wBGPals2:: palbuffer wBG ; c280
-wOBPals2:: palbuffer wOB ; c2c0
+
+; eight 4-color palettes each
+wBGPals1:: ds 8 palettes ; c200
+wOBPals1:: ds 8 palettes ; c240
+wBGPals2:: ds 8 palettes ; c280
+wOBPals2:: ds 8 palettes ; c2c0
SECTION "Sprites", WRAM0
@@ -245,11 +240,14 @@ wVirtualOAMEnd::
SECTION "Tilemap", WRAM0
wTilemap:: ; c3a0
- ds SCREEN_HEIGHT * SCREEN_WIDTH
-wTilemapEnd:: ; c508
+; 20x18 grid of 8x8 tiles
+ ds SCREEN_WIDTH * SCREEN_HEIGHT
+wTilemapEnd::
-SECTION "Animated Objects", WRAM0
+SECTION "Miscellaneous", WRAM0
+
+; This union spans 480 bytes from c508 to c6e8.
UNION ; c508
; surrounding tiles
; This buffer determines the size for the rest of the union;
@@ -391,6 +389,9 @@ ENDU ; c6e8
wUnusedMapBuffer:: ds 24
wUnusedMapBufferEnd::
+
+SECTION "Overworld Map", WRAM0
+
UNION ; c700
; overworld map blocks
wOverworldMapBlocks:: ds 1300 ; c700
@@ -521,19 +522,13 @@ wc901:: db
wc902:: db
NEXTU ; c700
-wLYOverrides:: ds 144
+; LCD expects wLYOverrides to have an alignment of $100
+wLYOverrides:: ds SCREEN_HEIGHT_PX
wLYOverridesEnd:: ds 112
-wLYOverridesBackup:: ds 144
-wLYOverridesBackupEnd::
-
-NEXTU ; c700
-
- ds $5f
-
-wc75f:: db
-
- ds $25f
+wLYOverridesBackup:: ds SCREEN_HEIGHT_PX
+wLYOverridesBackupEnd:: ds 112
+ ds 191
UNION ; c9bf
; link
@@ -548,19 +543,10 @@ wca84:: ds 100
wcae8:: dw
wLinkOTPartyMonTypes:: ds 2 * PARTY_LENGTH
ds 84
-wcb4a:: ds 22
-
-wcb60:: ds 1
-wcb61:: ds 1
-wcb62:: ds 2
-wcb64:: ds 1
-wcb65:: ds 57
-wcb9e:: ds 22
-wcbb4:: ds 1
-wcbb5:: ds 3
-wcbb8:: ds 1
-wcbb9:: ds 1
-wcbba:: ds 102
+wcb4a:: ds 71
+
+wcb91:: ds 13
+wcb9e:: ds 130
NEXTU ; c9bf
; battle
@@ -575,6 +561,7 @@ wBattleAnimOAMPointerLo:: db ; ca18
ds 207
+wBattle:
wEnemyMoveStruct:: move_struct wEnemyMoveStruct
wPlayerMoveStruct:: move_struct wPlayerMoveStruct
@@ -592,25 +579,106 @@ wcb31:: ds 1 ; cb31
wcb32:: ds 1 ; cb32
wcb33:: ds 1 ; cb33
-wOTClassName:: ds NAME_LENGTH ; cb34
+wOTClassName:: ds TRAINER_CLASS_NAME_LENGTH ; cb34
-wcb3f:: ds 1 ; cb3f
-wcb40:: ds 1 ; cb40
wCurOTMon:: ds 1 ; cb41
-wBattleParticipantsNotFainted:: db ; cb42
-wTypeModifier:: db ; cb43
-wCriticalHit:: db ; cb44
-wAttackMissed:: db ; cb45
-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
+
+wBattleParticipantsNotFainted::
+; Bit array. Bits 0 - 5 correspond to party members 1 - 6.
+; Bit set if the mon appears in battle.
+; Bit cleared if the mon faints.
+; Backed up if the enemy switches.
+; All bits cleared if the enemy faints.
+ db
+
+wTypeModifier:: ; cb43
+; >10: super-effective
+; 10: normal
+; <10: not very effective
+; bit 7: stab
+ db
+
+wCriticalHit:: ; cb44
+; 0 if not critical
+; 1 for a critical hit
+; 2 for a OHKO
+ db
+
+wAttackMissed:: ; cb45
+; nonzero for a miss
+ db
+
+wPlayerSubStatus1:: ; cb46
+; bit
+; 7 in love
+; 6 rollout
+; 5 endure
+; 4 perish song
+; 3 identified
+; 2 protect
+; 1 curse
+; 0 nightmare
+ db
+wPlayerSubStatus2:: ; cb47
+; bit
+; 7
+; 6
+; 5
+; 4
+; 3
+; 2
+; 1
+; 0 curled
+ db
+wPlayerSubStatus3:: ; cb48
+; bit
+; 7 confused
+; 6 flying
+; 5 underground
+; 4 charged
+; 3 flinched
+; 2 in loop
+; 1 rampage
+; 0 bide
+ db
+wPlayerSubStatus4:: ; cb49
+; bit
+; 7 leech seed
+; 6 rage
+; 5 recharge
+; 4 substitute
+; 3
+; 2 focus energy
+; 1 mist
+; 0 x accuracy
+ db
+wPlayerSubStatus5:: ; cb4a
+; bit
+; 7 can't run
+; 6 destiny bond
+; 5 lock-on
+; 4 encored
+; 3 transformed
+; 2
+; 1
+; 0 toxic
+ db
+
+wEnemySubStatus1:: ; cb4b
+; see wPlayerSubStatus1
+ db
+wEnemySubStatus2:: ; cb4c
+; see wPlayerSubStatus2
+ db
+wEnemySubStatus3:: ; cb4d
+; see wPlayerSubStatus3
+ db
+wEnemySubStatus4:: ; cb4e
+; see wPlayerSubStatus4
+ db
+wEnemySubStatus5:: ; cb4f
+; see wPlayerSubStatus5
+ db
wPlayerRolloutCount:: db ; cb50
wPlayerConfuseCount:: db ; cb51
@@ -638,46 +706,8 @@ wBattleAnimParam::
wKickCounter::
wPresentPower::
db ; cb67
-wBattleScriptBuffer:: db ; cb68
-wcb69:: ds 1 ; cb69
-wcb6a:: ds 1 ; cb6a
-wcb6b:: ds 1 ; cb6b
-wcb6c:: ds 1 ; cb6c
-wcb6d:: ds 1 ; cb6d
-wcb6e:: ds 1 ; cb6e
-wcb6f:: ds 1 ; cb6f
-wcb70:: ds 1 ; cb70
-wcb71:: ds 1 ; cb71
-wcb72:: ds 1 ; cb72
-wcb73:: ds 1 ; cb73
-wcb74:: ds 1 ; cb74
-wcb75:: ds 1 ; cb75
-wcb76:: ds 1 ; cb76
-wcb77:: ds 1 ; cb77
-wcb78:: ds 1 ; cb78
-wcb79:: ds 1 ; cb79
-wcb7a:: ds 1 ; cb7a
-wcb7b:: ds 1 ; cb7b
-wcb7c:: ds 1 ; cb7c
-wcb7d:: ds 1 ; cb7d
-wcb7e:: ds 1 ; cb7e
-wcb7f:: ds 1 ; cb7f
-wcb80:: ds 1 ; cb80
-wcb81:: ds 1 ; cb81
-wcb82:: ds 1 ; cb82
-wcb83:: ds 1 ; cb83
-wcb84:: ds 1 ; cb84
-wcb85:: ds 1 ; cb85
-wcb86:: ds 1 ; cb86
-wcb87:: ds 1 ; cb87
-wcb88:: ds 1 ; cb88
-wcb89:: ds 1 ; cb89
-wcb8a:: ds 1 ; cb8a
-wcb8b:: ds 1 ; cb8b
-wcb8c:: ds 1 ; cb8c
-wcb8d:: ds 1 ; cb8d
-wcb8e:: ds 1 ; cb8e
-wcb8f:: ds 1 ; cb8f
+wBattleScriptBuffer:: ds 40 ; cb68
+
wBattleScriptBufferAddress:: dw ; cb90
wTurnEnded:: db ; cb92
@@ -721,30 +751,37 @@ wEnemySDefLevel:: db ; cbb6
wEnemyAccLevel:: db ; cbb7
wEnemyEvaLevel:: db ; cbb8
ds 1
-wEnemyStatLevelsEnd::
wEnemyTurnsTaken:: db ; cbba
wPlayerTurnsTaken:: db ; cbbb
-wcbbc:: ds 1 ; cbbc
+ ds 1
+
wPlayerSubstituteHP:: db ; cbbd
wEnemySubstituteHP:: db ; cbbe
+
wUnusedPlayerLockedMove:: db ; cbbf
-wcbc0:: ds 1 ; cbc0
+ ds 1
+
wCurPlayerMove:: db ; cbc1
wCurEnemyMove:: db ; cbc2
-wLinkBattleRNCount:: db ; cbc3
+
+wLinkBattleRNCount:: ; cbc3
+; how far through the prng stream
+ db
+
wEnemyItemState:: db ; cbc4
-wcbc5:: ds 1 ; cbc5
-wcbc6:: ds 1 ; cbc6
+ ds 2
wCurEnemyMoveNum:: db ; cbc7
+
wEnemyHPAtTimeOfPlayerSwitch:: dw ; cbc8
wPayDayMoney:: ds 3 ; cbca
-wcbcd:: ds 1 ; cbcd
+wSafariMonAngerCount:: db ; cbcd
wSafariMonEating:: db ; cbce
-wcbcf:: ds 1 ; cbcf
-wEnemyBackupDVs:: dw
+ ds 1
+wEnemyBackupDVs:: dw ; cbd0
wAlreadyDisobeyed:: db ; cbd2
+
wDisabledMove:: db ; cbd3
wEnemyDisabledMove:: db ; cbd4
wWhichMonFaintedFirst:: db ; cbd5
@@ -754,29 +791,60 @@ wLastPlayerCounterMove:: db ; cbd6
wLastEnemyCounterMove:: db ; cbd7
wEnemyMinimized:: db ; cbd8
+
wAlreadyFailed:: db ; cbd9
+
wBattleParticipantsIncludingFainted:: db ; cbda
wBattleLowHealthAlarm:: db ; cbdb
wPlayerMinimized:: db ; cbdc
-wPlayerScreens:: db ; cbdd
-wEnemyScreens:: db ; cbde
+wPlayerScreens:: ; cbdd
+; bit
+; 7
+; 6
+; 5
+; 4 reflect
+; 3 light screen
+; 2 safeguard
+; 1
+; 0 spikes
+ db
+
+wEnemyScreens:: ; cbde
+; see wPlayerScreens
+ db
+
wPlayerSafeguardCount:: db ; cbdf
wPlayerLightScreenCount:: db ; cbe0
-wcbe1:: ds 1 ; cbe1
-wcbe2:: ds 1 ; cbe2
+wPlayerReflectCount:: db ; cbe1
+ ds 1
+
wEnemySafeguardCount:: db ; cbe3
wEnemyLightScreenCount:: db ; cbe4
-wcbe5:: ds 1 ; cbe5
-wcbe6:: ds 1 ; cbe6
-wcbe7:: ds 1 ; cbe7
-wBattleWeather:: db ; cbe8
-wWeatherCount:: db ; cbe9
+wEnemyReflectCount:: db ; cbe5
+ ds 2
+
+wBattleWeather:: ; cbe8
+; 00 normal
+; 01 rain
+; 02 sun
+; 03 sandstorm
+; 04 rain stopped
+; 05 sunliight faded
+; 06 sandstorm subsided
+ db
+
+wWeatherCount:: ; cbe9
+; # turns remaining
+ db
+
wLoweredStat:: db ; cbea
wEffectFailed:: db ; cbeb
wFailedMessage:: db ; cbec
wEnemyGoesFirst:: db ; cbed
+
wPlayerIsSwitching:: db ; cbee
wEnemyIsSwitching:: db ; cbef
+
wPlayerUsedMoves:: ; cbf0
; add a move that has been used once by the player
; added in order of use
@@ -789,34 +857,44 @@ wTempLevel:: db ; cbf7
wLastPlayerMon:: db ; cbf8
wLastPlayerMove:: db ; cbf9
wLastEnemyMove:: db ; cbfa
+
wPlayerFutureSightCount:: db ; cbfb
wEnemyFutureSightCount:: db ; cbfc
+
wGivingExperienceToExpShareHolders:: db ; cbfd
+
wBackupEnemyMonBaseStats:: ds 5 ; cbfe
-wcc03:: ds 1 ; cc03
-wcc04:: ds 1 ; cc04
+wBackupEnemyMonCatchRate:: db ; cc03
+wBackupEnemyMonBaseExp:: db ; cc04
+
wPlayerFutureSightDamage:: dw ; cc05
wEnemyFutureSightDamage:: dw ; cc07
wPlayerRageCounter:: db ; cc09
wEnemyRageCounter:: db ; cc0a
+
wBeatUpHitAtLeastOnce:: db ; cc0b
+
wPlayerTrappingMove:: db ; cc0c
wEnemyTrappingMove:: db ; cc0d
wPlayerWrapCount:: db ; cc0e
wEnemyWrapCount:: db ; cc0f
wPlayerCharging:: db ; cc10
wEnemyCharging:: db ; cc11
-wBattleEnded:: db ; cc12
-wWildMonMoves:: ; cc13
- ds NUM_MOVES
+wBattleEnded:: db ; cc12
+wWildMonMoves:: ds NUM_MOVES ; cc13
wWildMonPP:: ds NUM_MOVES ; cc17
wAmuletCoin:: db ; cc1b
+
wSomeoneIsRampaging:: db ; cc1c
+
wPlayerJustGotFrozen:: db ; cc1d
wEnemyJustGotFrozen:: db ; cc1e
+wBattleEnd::
+ ds 1
+
ENDU
ENDU ; cc20
@@ -1458,7 +1536,7 @@ wCurMessageScrollPosition:: db
wCurMessageIndex:: db
wMailboxCount:: db
wMailboxItems:: ds MAILBOX_CAPACITY
-wMailboxEnd:: ; d0fe
+wMailboxEnd::
ENDU ; cffc
wcffc:: ds 1 ; cffc
@@ -1977,8 +2055,9 @@ wd56f:: ds 1 ; d56f
wd570:: ds 1 ; d570
wPlayerData2End::
wPlayerData3::
-wStatusFlags:: ds 1 ; d571
-wStatusFlags2:: ds 1 ; d572
+wStatusFlags::
+ db ; d571
+wStatusFlags2:: db ; d572
wMoney:: ds 3 ; d573
wMomsMoney:: ds 3 ; d576
wMomSavingMoney:: ds 1 ; d579