summaryrefslogtreecommitdiff
path: root/engine
diff options
context:
space:
mode:
Diffstat (limited to 'engine')
-rwxr-xr-xengine/battle/ai/redundant.asm6
-rw-r--r--engine/battle/ai/scoring.asm4
-rw-r--r--engine/battle/core.asm66
-rw-r--r--engine/battle/effect_commands.asm26
-rw-r--r--engine/battle/effect_commands/sandstorm.asm4
-rw-r--r--engine/battle/misc.asm2
-rw-r--r--engine/battle/start_battle.asm2
-rw-r--r--engine/battle_anims/anim_commands.asm6
-rwxr-xr-xengine/battle_anims/core.asm2
-rwxr-xr-xengine/card_flip.asm22
-rwxr-xr-xengine/debug.asm2
-rwxr-xr-xengine/decorations.asm58
-rwxr-xr-xengine/evolution_animation.asm2
-rwxr-xr-xengine/intro_menu.asm8
-rw-r--r--engine/item_effects.asm8
-rw-r--r--engine/map_objects.asm4
-rw-r--r--engine/menu_2.asm4
-rwxr-xr-xengine/money.asm6
-rwxr-xr-xengine/pokegear.asm12
-rw-r--r--engine/routines/loadpushoam.asm2
-rw-r--r--engine/scripting.asm2
-rwxr-xr-xengine/slot_machine.asm10
-rw-r--r--engine/specials.asm2
-rwxr-xr-xengine/sprites.asm10
-rwxr-xr-xengine/variables.asm2
25 files changed, 136 insertions, 136 deletions
diff --git a/engine/battle/ai/redundant.asm b/engine/battle/ai/redundant.asm
index 2e8f7c6df..68d7b0203 100755
--- a/engine/battle/ai/redundant.asm
+++ b/engine/battle/ai/redundant.asm
@@ -135,7 +135,7 @@ AI_Redundant: ; 2c41a
ret
.Sandstorm: ; 2c4f5
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SANDSTORM
jr z, .Redundant
jr .NotRedundant
@@ -153,13 +153,13 @@ AI_Redundant: ; 2c41a
ret
.RainDance: ; 2c512
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_RAIN
jr z, .Redundant
jr .NotRedundant
.SunnyDay: ; 2c51b
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SUN
jr z, .Redundant
jr .NotRedundant
diff --git a/engine/battle/ai/scoring.asm b/engine/battle/ai/scoring.asm
index 73284435a..2ea87cc82 100644
--- a/engine/battle/ai/scoring.asm
+++ b/engine/battle/ai/scoring.asm
@@ -2842,7 +2842,7 @@ AI_Smart_Solarbeam: ; 3920b
; 80% chance to encourage this move when it's sunny.
; 90% chance to discourage this move when it's raining.
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SUN
jr z, .asm_3921e
@@ -2870,7 +2870,7 @@ AI_Smart_Solarbeam: ; 3920b
AI_Smart_Thunder: ; 39225
; 90% chance to discourage this move when it's sunny.
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SUN
ret nz
diff --git a/engine/battle/core.asm b/engine/battle/core.asm
index 1a58b3df5..e8eec9894 100644
--- a/engine/battle/core.asm
+++ b/engine/battle/core.asm
@@ -4,7 +4,7 @@ DoBattle: ; 3c000
xor a
ld [wBattleParticipantsNotFainted], a
ld [wBattleParticipantsIncludingFainted], a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ld [BattleEnded], a
inc a
ld [wBattleHasJustStarted], a
@@ -455,7 +455,7 @@ DetermineMoveOrder: ; 3c314
jr z, .use_move
sub BATTLEACTION_SWITCH1
jr c, .use_move
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
cp $2
jr nz, .switch
ld a, [hSerialConnectionStatus]
@@ -480,7 +480,7 @@ DetermineMoveOrder: ; 3c314
jp .enemy_first
.use_move
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
and a
jp nz, .player_first
call CompareMovePriority
@@ -623,7 +623,7 @@ ParsePlayerAction: ; 3c434
jr .encored
.not_encored
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
cp $2
jr z, .reset_rage
and a
@@ -920,7 +920,7 @@ Battle_EnemyFirst: ; 3c5fe
jp z, HandlePlayerMonFaint
call RefreshBattleHuds
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ret
; 3c664
@@ -970,7 +970,7 @@ Battle_PlayerFirst: ; 3c664
jp z, HandleEnemyMonFaint
call RefreshBattleHuds
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ret
; 3c6cf
@@ -1716,7 +1716,7 @@ HandleScreens: ; 3cb36
; 3cb9e
HandleWeather: ; 3cb9e
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_NONE
ret z
@@ -1727,7 +1727,7 @@ HandleWeather: ; 3cb9e
ld hl, .WeatherMessages
call .PrintWeatherMessage
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SANDSTORM
ret nz
@@ -1790,11 +1790,11 @@ HandleWeather: ; 3cb9e
ld hl, .WeatherEndedMessages
call .PrintWeatherMessage
xor a
- ld [Weather], a
+ ld [wBattleWeather], a
ret
.PrintWeatherMessage:
- ld a, [Weather]
+ ld a, [wBattleWeather]
dec a
ld c, a
ld b, 0
@@ -2099,18 +2099,18 @@ HandleEnemyMonFaint: ; 3cd55
jp c, WildFled_EnemyFled_LinkBattleCanceled
ld a, $1
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call HandleEnemySwitch
jp z, WildFled_EnemyFled_LinkBattleCanceled
jr DoubleSwitch
.player_mon_not_fainted
ld a, $1
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call HandleEnemySwitch
jp z, WildFled_EnemyFled_LinkBattleCanceled
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ret
; 3cdca
@@ -2140,7 +2140,7 @@ DoubleSwitch: ; 3cdca
.done
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ret
; 3ce01
@@ -2173,7 +2173,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
.wild2
call StopDangerSound
ld a, $1
- ld [wDanger], a
+ ld [wBattleLowHealthAlarm], a
.trainer
ld hl, BattleMonHP
@@ -2293,7 +2293,7 @@ IsAnyMonHoldingExpShare: ; 3ceaa
StopDangerSound: ; 3ceec
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
ret
; 3cef1
@@ -2394,7 +2394,7 @@ EnemyPartyMonEntrance: ; 3cf78
call SpikesDamage
xor a
ld [wEnemyMoveStruct + MOVE_ANIM], a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
inc a
ret
; 3cfa4
@@ -2403,7 +2403,7 @@ WinTrainerBattle: ; 3cfa4
; Player won the battle
call StopDangerSound
ld a, $1
- ld [wDanger], a
+ ld [wBattleLowHealthAlarm], a
ld [BattleEnded], a
ld a, [wLinkMode]
and a
@@ -2705,7 +2705,7 @@ HandlePlayerMonFaint: ; 3d14e
and a
ret nz
ld a, $1
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call HandleEnemySwitch
jp z, WildFled_EnemyFled_LinkBattleCanceled
jp DoubleSwitch
@@ -2720,7 +2720,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
ld hl, EnemySubStatus3
res SUBSTATUS_IN_LOOP, [hl]
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
ld hl, PlayerDamageTaken
ld [hli], a
ld [hl], a
@@ -2788,12 +2788,12 @@ ForcePlayerMonChoice: ; 3d227
and a
jr z, .skip_link
ld a, $1
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call LinkBattleSendReceiveAction
.skip_link
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call CheckMobileBattleError
jr c, .enemy_fainted_mobile_error
ld hl, EnemyMonHP
@@ -3229,7 +3229,7 @@ EnemySwitch: ; 3d4e1
xor a
ld [wBattleParticipantsNotFainted], a
ld [wBattleParticipantsIncludingFainted], a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
inc a
ld [wEnemyIsSwitching], a
call LoadTileMapToTempTileMap
@@ -3883,7 +3883,7 @@ TryToRunAwayFromBattle: ; 3d8b3
cp b
jr nc, .can_escape
ld a, $1
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ld hl, BattleText_CantEscape2
jr .print_inescapable_text
@@ -3909,7 +3909,7 @@ TryToRunAwayFromBattle: ; 3d8b3
jr z, .fled
call LoadTileMapToTempTileMap
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ld a, $f
ld [CurMoveNum], a
xor a
@@ -4769,7 +4769,7 @@ CheckDanger: ; 3df9e
ld a, [hli]
or [hl]
jr z, .no_danger
- ld a, [wDanger]
+ ld a, [wBattleLowHealthAlarm]
and a
jr nz, .done
ld a, [PlayerHPPal]
@@ -4777,12 +4777,12 @@ CheckDanger: ; 3df9e
jr z, .danger
.no_danger
- ld hl, Danger
+ ld hl, wLowHealthAlarm
res DANGER_ON_F, [hl]
jr .done
.danger
- ld hl, Danger
+ ld hl, wLowHealthAlarm
set DANGER_ON_F, [hl]
.done
@@ -5116,7 +5116,7 @@ BattleMenu_Pack: ; 3e1c7
jr z, .contest
farcall BattlePack
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
and a
jr z, .didnt_use_item
jr .got_item
@@ -5329,7 +5329,7 @@ TryPlayerSwitch: ; 3e358
ld a, [CurBattleMon]
ld [LastPlayerMon], a
ld a, $2
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call ClearPalettes
call DelayFrame
call ClearSprites
@@ -5464,7 +5464,7 @@ BattleMenu_Run: ; 3e489
ld a, $0
ld [wFailedToFlee], a
ret c
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
and a
ret nz
jp BattleMenu
@@ -5955,7 +5955,7 @@ ParseEnemyAction: ; 3e7c1
jr z, .not_linked
call EmptyBattleTextBox
call LoadTileMapToTempTileMap
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
and a
call z, LinkBattleSendReceiveAction
call Call_LoadTempTileMapToTileMap
@@ -8560,7 +8560,7 @@ ExitBattle: ; 3f69e
CleanUpBattleRAM: ; 3f6d0
call BattleEnd_HandleRoamMons
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
ld [wBattleMode], a
ld [BattleType], a
ld [AttackMissed], a
diff --git a/engine/battle/effect_commands.asm b/engine/battle/effect_commands.asm
index c1bc3752a..b07f9df21 100644
--- a/engine/battle/effect_commands.asm
+++ b/engine/battle/effect_commands.asm
@@ -1,7 +1,7 @@
DoPlayerTurn: ; 34000
call SetPlayerTurn
- ld a, [wPlayerAction]
+ ld a, [wBattlePlayerAction]
and a
ret nz
@@ -1908,7 +1908,7 @@ BattleCommand_CheckHit: ; 34d32
cp EFFECT_THUNDER
ret nz
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_RAIN
ret
@@ -5394,7 +5394,7 @@ BattleCommand_FreezeTarget: ; 36102
ld a, [TypeModifier]
and $7f
ret z
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SUN
ret z
call CheckMoveTypeMatchesTarget ; Don't freeze an Ice-type
@@ -9046,7 +9046,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
ret z
ld a, 1
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
call LoadStandardMenuDataHeader
ld hl, LinkBattleSendReceiveAction
@@ -9054,7 +9054,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
call CloseWindow
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ret
; 37a82
@@ -9310,15 +9310,15 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
; Don't factor in time of day in link battles.
ld a, [wLinkMode]
and a
- jr nz, .Weather
+ jr nz, .checkWeather
ld a, [TimeOfDay]
cp b
- jr z, .Weather
+ jr z, .checkWeather
dec c ; double
-.Weather:
- ld a, [Weather]
+.checkWeather:
+ ld a, [wBattleWeather]
and a
jr z, .Heal
@@ -9384,7 +9384,7 @@ BattleCommand_HiddenPower: ; 37be8
BattleCommand_StartRain: ; 37bf4
; startrain
ld a, WEATHER_RAIN
- ld [Weather], a
+ ld [wBattleWeather], a
ld a, 5
ld [WeatherCount], a
call AnimateCurrentMove
@@ -9397,7 +9397,7 @@ BattleCommand_StartRain: ; 37bf4
BattleCommand_StartSun: ; 37c07
; startsun
ld a, WEATHER_SUN
- ld [Weather], a
+ ld [wBattleWeather], a
ld a, 5
ld [WeatherCount], a
call AnimateCurrentMove
@@ -9588,7 +9588,7 @@ BattleCommand_DoubleMinimizeDamage: ; 37ce6
BattleCommand_SkipSunCharge: ; 37d02
; mimicsuncharge
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SUN
ret nz
ld b, charge_command
@@ -9690,7 +9690,7 @@ BattleCommand_ThunderAccuracy: ; 37d94
ld a, BATTLE_VARS_MOVE_TYPE
call GetBattleVarAddr
inc hl
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_RAIN
jr z, .rain
cp WEATHER_SUN
diff --git a/engine/battle/effect_commands/sandstorm.asm b/engine/battle/effect_commands/sandstorm.asm
index 27b8e8e2c..7bd653420 100644
--- a/engine/battle/effect_commands/sandstorm.asm
+++ b/engine/battle/effect_commands/sandstorm.asm
@@ -1,12 +1,12 @@
BattleCommand_StartSandstorm: ; 376f8
; startsandstorm
- ld a, [Weather]
+ ld a, [wBattleWeather]
cp WEATHER_SANDSTORM
jr z, .failed
ld a, WEATHER_SANDSTORM
- ld [Weather], a
+ ld [wBattleWeather], a
ld a, 5
ld [WeatherCount], a
call AnimateCurrentMove
diff --git a/engine/battle/misc.asm b/engine/battle/misc.asm
index a41d31d9a..d7b5584c7 100644
--- a/engine/battle/misc.asm
+++ b/engine/battle/misc.asm
@@ -53,7 +53,7 @@ GetPlayerBackpicCoords: ; fbd9d (3e:7d9d)
DoWeatherModifiers: ; fbda4
ld de, .WeatherTypeModifiers
- ld a, [Weather]
+ ld a, [wBattleWeather]
ld b, a
ld a, [wd265] ; move type
ld c, a
diff --git a/engine/battle/start_battle.asm b/engine/battle/start_battle.asm
index e1377eec0..98a32c0dd 100644
--- a/engine/battle/start_battle.asm
+++ b/engine/battle/start_battle.asm
@@ -150,7 +150,7 @@ PlayBattleMusic: ; 2ee6c
ClearBattleRAM: ; 2ef18
xor a
- ld [wPlayerAction], a
+ ld [wBattlePlayerAction], a
ld [wBattleResult], a
ld hl, wPartyMenuCursor
diff --git a/engine/battle_anims/anim_commands.asm b/engine/battle_anims/anim_commands.asm
index 0bbedf909..a25e4a98e 100644
--- a/engine/battle_anims/anim_commands.asm
+++ b/engine/battle_anims/anim_commands.asm
@@ -271,8 +271,8 @@ endr
ret
.delete
- ld hl, Sprites
- ld c, SpritesEnd - Sprites
+ ld hl, wVirtualOAM
+ ld c, SpritesEnd - wVirtualOAM
xor a
.loop2
ld [hli], a
@@ -1499,7 +1499,7 @@ BattleAnim_UpdateOAM_All: ; cc96e
jr nz, .loop
ld a, [wBattleAnimOAMPointerLo]
ld l, a
- ld h, HIGH(Sprites)
+ ld h, HIGH(wVirtualOAM)
.loop2
ld a, l
cp LOW(SpritesEnd)
diff --git a/engine/battle_anims/core.asm b/engine/battle_anims/core.asm
index 55adeae8c..2b0dcad34 100755
--- a/engine/battle_anims/core.asm
+++ b/engine/battle_anims/core.asm
@@ -106,7 +106,7 @@ BattleAnimOAMUpdate: ; cca09
ld l, a
ld a, [wBattleAnimOAMPointerLo]
ld e, a
- ld d, HIGH(Sprites)
+ ld d, HIGH(wVirtualOAM)
.loop
ld a, [wBattleAnimTempYCoord]
ld b, a
diff --git a/engine/card_flip.asm b/engine/card_flip.asm
index ae90b124a..d7d24cba1 100755
--- a/engine/card_flip.asm
+++ b/engine/card_flip.asm
@@ -126,9 +126,9 @@ _CardFlip: ; e00ee (38:40ee)
; 0xe01d2
.DeductCoins: ; e01d2
- ld a, [Coins]
+ ld a, [wCoins]
ld h, a
- ld a, [Coins + 1]
+ ld a, [wCoins + 1]
ld l, a
ld a, h
and a
@@ -146,9 +146,9 @@ _CardFlip: ; e00ee (38:40ee)
ld de, -3
add hl, de
ld a, h
- ld [Coins], a
+ ld [wCoins], a
ld a, l
- ld [Coins + 1], a
+ ld [wCoins + 1], a
ld de, SFX_TRANSACTION
call PlaySFX
xor a
@@ -535,7 +535,7 @@ CardFlip_PrintCoinBalance: ; e049c
ld de, .CoinStr
call PlaceString
hlcoord 15, 16
- ld de, Coins
+ ld de, wCoins
lb bc, PRINTNUM_LEADINGZEROS | 2, 4
call PrintNum
ret
@@ -1174,29 +1174,29 @@ CardFlip_CheckWinCondition: ; e0637
; 0xe081b
.AddCoinPlaySFX: ; e081b
- ld a, [Coins]
+ ld a, [wCoins]
ld h, a
- ld a, [Coins + 1]
+ ld a, [wCoins + 1]
ld l, a
inc hl
ld a, h
- ld [Coins], a
+ ld [wCoins], a
ld a, l
- ld [Coins + 1], a
+ ld [wCoins + 1], a
ld de, SFX_PAY_DAY
call PlaySFX
ret
; e0833
.IsCoinCaseFull: ; e0833
- ld a, [Coins]
+ ld a, [wCoins]
cp HIGH(MAX_COINS)
jr c, .less
jr z, .check_low
jr .more
.check_low
- ld a, [Coins + 1]
+ ld a, [wCoins + 1]
cp LOW(MAX_COINS)
jr c, .less
diff --git a/engine/debug.asm b/engine/debug.asm
index c15481926..dce32afda 100755
--- a/engine/debug.asm
+++ b/engine/debug.asm
@@ -1029,7 +1029,7 @@ Function81f5e: ; 81f5e
ld [hl], $ed
ld b, $70
ld c, $5
- ld hl, Sprites
+ ld hl, wVirtualOAM
ld de, wc608 + 10
call .asm_81fb7
ld de, wc608 + 11
diff --git a/engine/decorations.asm b/engine/decorations.asm
index 413a049a2..912966a73 100755
--- a/engine/decorations.asm
+++ b/engine/decorations.asm
@@ -1,8 +1,8 @@
InitDecorations: ; 26751 (9:6751)
ld a, DECO_FEATHERY_BED
- ld [Bed], a
+ ld [wDecoBed], a
ld a, DECO_TOWN_MAP
- ld [Poster], a
+ ld [wDecoPoster], a
ret
_KrisDecorationMenu: ; 0x2675c
@@ -645,62 +645,62 @@ DecoAction_nothing: ; 26ce3
; 26ce5
DecoAction_setupbed: ; 26ce5
- ld hl, Bed
+ ld hl, wDecoBed
jp DecoAction_TrySetItUp
; 26ceb
DecoAction_putawaybed: ; 26ceb
- ld hl, Bed
+ ld hl, wDecoBed
jp DecoAction_TryPutItAway
; 26cf1
DecoAction_setupcarpet: ; 26cf1
- ld hl, Carpet
+ ld hl, wDecoCarpet
jp DecoAction_TrySetItUp
; 26cf7
DecoAction_putawaycarpet: ; 26cf7
- ld hl, Carpet
+ ld hl, wDecoCarpet
jp DecoAction_TryPutItAway
; 26cfd
DecoAction_setupplant: ; 26cfd
- ld hl, Plant
+ ld hl, wDecoPlant
jp DecoAction_TrySetItUp
; 26d03
DecoAction_putawayplant: ; 26d03
- ld hl, Plant
+ ld hl, wDecoPlant
jp DecoAction_TryPutItAway
; 26d09
DecoAction_setupposter: ; 26d09
- ld hl, Poster
+ ld hl, wDecoPoster
jp DecoAction_TrySetItUp
; 26d0f
DecoAction_putawayposter: ; 26d0f
- ld hl, Poster
+ ld hl, wDecoPoster
jp DecoAction_TryPutItAway
; 26d15
DecoAction_setupconsole: ; 26d15
- ld hl, Console
+ ld hl, wDecoConsole
jp DecoAction_TrySetItUp
; 26d1b
DecoAction_putawayconsole: ; 26d1b
- ld hl, Console
+ ld hl, wDecoConsole
jp DecoAction_TryPutItAway
; 26d21
DecoAction_setupbigdoll: ; 26d21
- ld hl, BigDoll
+ ld hl, wDecoBigDoll
jp DecoAction_TrySetItUp
; 26d27
DecoAction_putawaybigdoll: ; 26d27
- ld hl, BigDoll
+ ld hl, wDecoBigDoll
jp DecoAction_TryPutItAway
; 26d2d
@@ -935,8 +935,8 @@ DecoAction_AskWhichSide: ; 26e70
; 26e9a
QueryWhichSide: ; 26e9a
- ld hl, RightOrnament
- ld de, LeftOrnament
+ ld hl, wDecoRightOrnament
+ ld de, wDecoLeftOrnament
ld a, [Buffer2]
cp 1
ret z
@@ -1072,7 +1072,7 @@ DescribeDecoration:: ; 26f59
; 26f69
DecorationDesc_Poster: ; 26f69
- ld a, [Poster]
+ ld a, [wDecoPoster]
ld hl, DecorationDesc_PosterPointers
ld de, 3
call IsInArray
@@ -1148,15 +1148,15 @@ DecorationDesc_NullPoster: ; 26fb8
; 26fb9
DecorationDesc_LeftOrnament: ; 26fb9
- ld a, [LeftOrnament]
+ ld a, [wDecoLeftOrnament]
jr DecorationDesc_OrnamentOrConsole
DecorationDesc_RightOrnament: ; 26fbe
- ld a, [RightOrnament]
+ ld a, [wDecoRightOrnament]
jr DecorationDesc_OrnamentOrConsole
DecorationDesc_Console: ; 26fc3
- ld a, [Console]
+ ld a, [wDecoConsole]
jr DecorationDesc_OrnamentOrConsole
DecorationDesc_OrnamentOrConsole: ; 26fc8
@@ -1196,18 +1196,18 @@ DecorationDesc_GiantOrnament: ; 26fdd
Special_ToggleMaptileDecorations: ; 26feb
lb de, 0, 4
- ld a, [Bed]
+ ld a, [wDecoBed]
call SetDecorationTile
lb de, 7, 4
- ld a, [Plant]
+ ld a, [wDecoPlant]
call SetDecorationTile
lb de, 6, 0
- ld a, [Poster]
+ ld a, [wDecoPoster]
call SetDecorationTile
call SetPosterVisibility
lb de, 0, 0
call PadCoords_de
- ld a, [Carpet]
+ ld a, [wDecoCarpet]
and a
ret z
call _GetDecorationSprite
@@ -1227,7 +1227,7 @@ Special_ToggleMaptileDecorations: ; 26feb
SetPosterVisibility: ; 27027
ld b, SET_FLAG
- ld a, [Poster]
+ ld a, [wDecoPoster]
and a
jr nz, .ok
ld b, RESET_FLAG
@@ -1251,19 +1251,19 @@ SetDecorationTile: ; 27037
Special_ToggleDecorationsVisibility: ; 27043
ld de, EVENT_KRISS_HOUSE_2F_CONSOLE
ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS
- ld a, [Console]
+ ld a, [wDecoConsole]
call ToggleDecorationVisibility
ld de, EVENT_KRISS_HOUSE_2F_DOLL_1
ld hl, VariableSprites + SPRITE_DOLL_1 - SPRITE_VARS
- ld a, [LeftOrnament]
+ ld a, [wDecoLeftOrnament]
call ToggleDecorationVisibility
ld de, EVENT_KRISS_HOUSE_2F_DOLL_2
ld hl, VariableSprites + SPRITE_DOLL_2 - SPRITE_VARS
- ld a, [RightOrnament]
+ ld a, [wDecoRightOrnament]
call ToggleDecorationVisibility
ld de, EVENT_KRISS_HOUSE_2F_BIG_DOLL
ld hl, VariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS
- ld a, [BigDoll]
+ ld a, [wDecoBigDoll]
call ToggleDecorationVisibility
ret
; 27074
diff --git a/engine/evolution_animation.asm b/engine/evolution_animation.asm
index 2e6e82e25..fe5cec38f 100755
--- a/engine/evolution_animation.asm
+++ b/engine/evolution_animation.asm
@@ -44,7 +44,7 @@ EvolutionAnimation: ; 4e5e1
call Request2bpp
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
call WaitBGMap
xor a
ld [hBGMapMode], a
diff --git a/engine/intro_menu.asm b/engine/intro_menu.asm
index a26ac1f81..59aebd4d5 100755
--- a/engine/intro_menu.asm
+++ b/engine/intro_menu.asm
@@ -106,8 +106,8 @@ ResetWRAM: ; 5ba7
_ResetWRAM: ; 5bae
- ld hl, Sprites
- ld bc, Options - Sprites
+ ld hl, wVirtualOAM
+ ld bc, Options - wVirtualOAM
xor a
call ByteFill
@@ -196,8 +196,8 @@ _ResetWRAM: ; 5bae
ld [wJohtoBadges], a
ld [wKantoBadges], a
- ld [Coins], a
- ld [Coins + 1], a
+ ld [wCoins], a
+ ld [wCoins + 1], a
if START_MONEY >= $10000
ld a, HIGH(START_MONEY >> 8)
diff --git a/engine/item_effects.asm b/engine/item_effects.asm
index c2bdd1f61..72b1f4d27 100644
--- a/engine/item_effects.asm
+++ b/engine/item_effects.asm
@@ -1658,7 +1658,7 @@ RevivePokemon: ; f0d6
.skip_to_revive
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
ld a, [CurItem]
cp REVIVE
jr z, .revive_half_hp
@@ -1701,7 +1701,7 @@ FullRestore: ; f128
.FullRestore: ; f144
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
call ReviveFullHP
ld a, MON_STATUS
call GetPartyParamLocation
@@ -1798,7 +1798,7 @@ ItemRestoreHP: ; f1a9 (3:71a9)
ret nc
xor a
- ld [Danger], a
+ ld [wLowHealthAlarm], a
call GetHealingItemAmount
call RestoreHealth
call BattlemonRestoreHealth
@@ -2357,7 +2357,7 @@ PokeFlute: ; f50c
ld hl, .PlayedTheFlute
call PrintText
- ld a, [Danger]
+ ld a, [wLowHealthAlarm]
and 1 << DANGER_ON_F
jr nz, .dummy2
.dummy2
diff --git a/engine/map_objects.asm b/engine/map_objects.asm
index 00ce599e3..0dbdf5e70 100644
--- a/engine/map_objects.asm
+++ b/engine/map_objects.asm
@@ -2829,7 +2829,7 @@ _UpdateSprites:: ; 5920
cp b
ret nc
ld l, a
- ld h, HIGH(Sprites)
+ ld h, HIGH(wVirtualOAM)
ld de, SPRITEOAMSTRUCT_LENGTH
ld a, b
ld c, SCREEN_HEIGHT_PX + 2 * TILE_WIDTH
@@ -3043,7 +3043,7 @@ InitSprites: ; 5991
ld l, a
ld a, [hUsedSpriteIndex]
ld c, a
- ld b, HIGH(Sprites)
+ ld b, HIGH(wVirtualOAM)
ld a, [hli]
ld [hUsedSpriteTile], a
add c
diff --git a/engine/menu_2.asm b/engine/menu_2.asm
index c8c4ebf5d..293d72e2c 100644
--- a/engine/menu_2.asm
+++ b/engine/menu_2.asm
@@ -76,7 +76,7 @@ Special_DisplayCoinCaseBalance: ; 24b25
hlcoord 17, 1
ld de, ShowMoney_TerminatorString
call PlaceString
- ld de, Coins
+ ld de, wCoins
lb bc, 2, 4
hlcoord 13, 1
call PrintNum
@@ -98,7 +98,7 @@ Special_DisplayMoneyAndCoinBalance: ; 24b4e
ld de, CoinString
call PlaceString
hlcoord 15, 3
- ld de, Coins
+ ld de, wCoins
lb bc, 2, 4
call PrintNum
ret
diff --git a/engine/money.asm b/engine/money.asm
index 60de97568..585c85618 100755
--- a/engine/money.asm
+++ b/engine/money.asm
@@ -171,7 +171,7 @@ AddFunds: ; 16055
GiveCoins:: ; 1606f
ld a, 2
- ld de, Coins
+ ld de, wCoins
call AddFunds
ld a, 2
ld bc, .maxcoins
@@ -198,7 +198,7 @@ GiveCoins:: ; 1606f
TakeCoins:: ; 1608f
ld a, 2
- ld de, Coins
+ ld de, wCoins
call SubtractFunds
jr nc, .okay
; leave with 0 coins
@@ -216,6 +216,6 @@ TakeCoins:: ; 1608f
CheckCoins:: ; 160a1
ld a, 2
- ld de, Coins
+ ld de, wCoins
jp CompareFunds
; 160a9
diff --git a/engine/pokegear.asm b/engine/pokegear.asm
index f65f394be..8bea44671 100755
--- a/engine/pokegear.asm
+++ b/engine/pokegear.asm
@@ -2588,8 +2588,8 @@ Pokedex_GetArea: ; 91d11
.copy_sprites
hlcoord 0, 0
- ld de, Sprites
- ld bc, SpritesEnd - Sprites
+ ld de, wVirtualOAM
+ ld bc, SpritesEnd - wVirtualOAM
call CopyBytes
ret
@@ -2654,9 +2654,9 @@ Pokedex_GetArea: ; 91d11
jr .nestloop
.done_nest
- ld hl, Sprites
+ ld hl, wVirtualOAM
decoord 0, 0
- ld bc, SpritesEnd - Sprites
+ ld bc, SpritesEnd - wVirtualOAM
call CopyBytes
ret
@@ -2741,8 +2741,8 @@ Pokedex_GetArea: ; 91d11
ret
.clear
- ld hl, Sprites
- ld bc, SpritesEnd - Sprites
+ ld hl, wVirtualOAM
+ ld bc, SpritesEnd - wVirtualOAM
xor a
call ByteFill
scf
diff --git a/engine/routines/loadpushoam.asm b/engine/routines/loadpushoam.asm
index c07c06d0f..635152358 100644
--- a/engine/routines/loadpushoam.asm
+++ b/engine/routines/loadpushoam.asm
@@ -11,7 +11,7 @@ LoadPushOAM:: ; 4031
ret
.PushOAM: ; 403f
- ld a, HIGH(Sprites)
+ ld a, HIGH(wVirtualOAM)
ld [rDMA], a
ld a, NUM_SPRITE_OAM_STRUCTS
.pushoam_loop
diff --git a/engine/scripting.asm b/engine/scripting.asm
index 84590f3c0..acbf1190c 100644
--- a/engine/scripting.asm
+++ b/engine/scripting.asm
@@ -1993,7 +1993,7 @@ Script_readcoins:
call ResetStringBuffer1
ld hl, StringBuffer1
- ld de, Coins
+ ld de, wCoins
lb bc, PRINTNUM_RIGHTALIGN | 2, 6
call PrintNum
ld de, StringBuffer1
diff --git a/engine/slot_machine.asm b/engine/slot_machine.asm
index cfec11091..f960abd1c 100755
--- a/engine/slot_machine.asm
+++ b/engine/slot_machine.asm
@@ -223,7 +223,7 @@ SlotsLoop: ; 927af (24:67af)
.PrintCoinsAndPayout: ; 927f8 (24:67f8)
hlcoord 5, 1
- ld de, Coins
+ ld de, wCoins
lb bc, PRINTNUM_LEADINGZEROS | 2, 4
call PrintNum
hlcoord 11, 1
@@ -480,7 +480,7 @@ SlotsAction_PayoutAnim: ; 929a4 (24:69a4)
ld [hl], e
dec hl
ld [hl], d
- ld hl, Coins
+ ld hl, wCoins
ld d, [hl]
inc hl
ld e, [hl]
@@ -1819,7 +1819,7 @@ Slots_AskBet: ; 9307c (24:707c)
ld a, 4
sub b
ld [wSlotBet], a
- ld hl, Coins
+ ld hl, wCoins
ld c, a
ld a, [hli]
and a
@@ -1832,7 +1832,7 @@ Slots_AskBet: ; 9307c (24:707c)
jr .loop
.Start:
- ld hl, Coins + 1
+ ld hl, wCoins + 1
ld a, [hl]
sub c
ld [hld], a
@@ -1883,7 +1883,7 @@ Slots_AskBet: ; 9307c (24:707c)
; 0x930e9
Slots_AskPlayAgain: ; 930e9 (24:70e9)
- ld hl, Coins
+ ld hl, wCoins
ld a, [hli]
or [hl]
jr nz, .you_have_coins
diff --git a/engine/specials.asm b/engine/specials.asm
index 965e3d58b..587a8160c 100644
--- a/engine/specials.asm
+++ b/engine/specials.asm
@@ -253,7 +253,7 @@ Special_StartGameCornerGame: ; c39a
; c3ae
Special_CheckCoins: ; c3ae
- ld hl, Coins
+ ld hl, wCoins
ld a, [hli]
or [hl]
jr z, .no_coins
diff --git a/engine/sprites.asm b/engine/sprites.asm
index 7928fe1f0..6816e4133 100755
--- a/engine/sprites.asm
+++ b/engine/sprites.asm
@@ -23,7 +23,7 @@ PlaySpriteAnimations: ; 8cf69
push bc
push af
- ld a, LOW(Sprites)
+ ld a, LOW(wVirtualOAM)
ld [wCurrSpriteOAMAddr], a
call DoNextFrameForAllSprites
@@ -60,9 +60,9 @@ DoNextFrameForAllSprites: ; 8cf7a
ld a, [wCurrSpriteOAMAddr]
ld l, a
- ld h, HIGH(Sprites)
+ ld h, HIGH(wVirtualOAM)
-.loop2 ; Clear (Sprites + [wCurrSpriteOAMAddr] --> SpritesEnd)
+.loop2 ; Clear (wVirtualOAM + [wCurrSpriteOAMAddr] --> SpritesEnd)
ld a, l
cp LOW(SpritesEnd)
jr nc, .done
@@ -102,7 +102,7 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
ld l, a
ld h, HIGH(Sprite17)
-.loop2 ; Clear (Sprites + [wCurrSpriteOAMAddr] --> Sprites + $40)
+.loop2 ; Clear (wVirtualOAM + [wCurrSpriteOAMAddr] --> Sprites + $40)
ld a, l
cp LOW(Sprite17)
jr nc, .done
@@ -253,7 +253,7 @@ UpdateAnimFrame: ; 8d04c
push bc
ld a, [wCurrSpriteOAMAddr]
ld e, a
- ld d, HIGH(Sprites)
+ ld d, HIGH(wVirtualOAM)
ld a, [hli]
ld c, a ; number of objects
.loop
diff --git a/engine/variables.asm b/engine/variables.asm
index 56c49f085..1d174443e 100755
--- a/engine/variables.asm
+++ b/engine/variables.asm
@@ -89,7 +89,7 @@ _GetVarAction:: ; 80648 (20:4648)
.CountBadges: ; 806e1
; Number of owned badges.
- ld hl, Badges
+ ld hl, wBadges
ld b, 2
call CountSetBits
ld a, [wd265]