Prefix wram labels with w, part 1.

Handle edge cases first.
This commit is contained in:
luckytyphlosion 2018-01-23 16:45:34 -05:00
parent c60f1331fe
commit f2ae74079f
41 changed files with 452 additions and 452 deletions

File diff suppressed because it is too large Load Diff

View File

@ -66,23 +66,23 @@ NUM_CHANNELS EQU const_value
const NOTE_REST ; 5
const NOTE_VIBRATO_OVERRIDE ; 6
; Volume:
; wVolume
VOLUME_SO1_F EQU 3
VOLUME_SO2_F EQU 7
VOLUME_SO1_LEVEL EQU %00000111
VOLUME_SO2_LEVEL EQU %01110000
MAX_VOLUME EQU $77
; SoundInput:
; SoundInput
SOUND_INPUT_CH1_F EQU 0
SOUND_INPUT_CH2_F EQU 1
SOUND_INPUT_CH3_F EQU 2
SOUND_INPUT_CH4_F EQU 3
SOUND_INPUT_GLOBAL_F EQU 7
; Danger:
; wLowHealthAlarm
DANGER_PITCH_F EQU 4
DANGER_ON_F EQU 7
; MusicFade:
; MusicFade
MUSIC_FADE_IN_F EQU 7

View File

@ -214,7 +214,7 @@ SUBSTATUS_CURLED EQU 0
enum SCREENS_UNUSED
enum SCREENS_SPIKES
; Weather values
; values in wBattleWeather
const_def
const WEATHER_NONE
const WEATHER_RAIN

View File

@ -28,4 +28,4 @@ EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
const SPRITEOAMSTRUCT_TILE_ID ; 2
const SPRITEOAMSTRUCT_ATTRIBUTES ; 3
SPRITEOAMSTRUCT_LENGTH EQU const_value
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see Sprites
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wVirtualOAM

View File

@ -1288,7 +1288,7 @@ UnknownText_0x1c5c5e::
UnknownText_0x1c5c7b::
text "Coins:"
line "@"
deciram Coins, 2, 4
deciram wCoins, 2, 4
db "@@"
Text_RaiseThePPOfWhichMove::

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -150,7 +150,7 @@ PlayBattleMusic: ; 2ee6c
ClearBattleRAM: ; 2ef18
xor a
ld [wPlayerAction], a
ld [wBattlePlayerAction], a
ld [wBattleResult], a
ld hl, wPartyMenuCursor

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -44,7 +44,7 @@ EvolutionAnimation: ; 4e5e1
call Request2bpp
xor a
ld [Danger], a
ld [wLowHealthAlarm], a
call WaitBGMap
xor a
ld [hBGMapMode], a

View File

@ -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)

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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

View File

@ -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]

View File

@ -169,8 +169,8 @@ INCLUDE "home/double_speed.asm"
ClearSprites:: ; 300b
; Erase OAM data
ld hl, Sprites
ld b, SpritesEnd - Sprites
ld hl, wVirtualOAM
ld b, SpritesEnd - wVirtualOAM
xor a
.loop
ld [hli], a

View File

@ -296,19 +296,19 @@ IsSFXPlaying:: ; 3c74
MaxVolume:: ; 3c97
ld a, MAX_VOLUME
ld [Volume], a
ld [wVolume], a
ret
; 3c9d
LowVolume:: ; 3c9d
ld a, $33 ; 40%
ld [Volume], a
ld [wVolume], a
ret
; 3ca3
VolumeOff:: ; 3ca3
xor a
ld [Volume], a
ld [wVolume], a
ret
; 3ca8

View File

@ -129,7 +129,7 @@ map_connection_struct: MACRO
ENDM
channel_struct: MACRO
; Addreses are Channel1 (c101).
; Addreses are wChannel1 (c101).
\1MusicID:: dw
\1MusicBank:: db
\1Flags:: db ; 0:on/off 1:subroutine 3:sfx 4:noise 5:rest

View File

@ -40,7 +40,7 @@ Doll1:
Doll2:
describedecoration DECODESC_RIGHT_DOLL
BigDoll:
wDecoBigDoll:
describedecoration DECODESC_BIG_DOLL
GameConsole:
@ -138,4 +138,4 @@ KrissHouse2F_MapEvents:
object_event 4, 2, SPRITE_CONSOLE, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, GameConsole, EVENT_KRISS_HOUSE_2F_CONSOLE
object_event 4, 4, SPRITE_DOLL_1, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Doll1, EVENT_KRISS_HOUSE_2F_DOLL_1
object_event 5, 4, SPRITE_DOLL_2, SPRITEMOVEDATA_ITEM_TREE, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, Doll2, EVENT_KRISS_HOUSE_2F_DOLL_2
object_event 0, 1, SPRITE_BIG_DOLL, SPRITEMOVEDATA_BIGDOLL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, BigDoll, EVENT_KRISS_HOUSE_2F_BIG_DOLL
object_event 0, 1, SPRITE_BIG_DOLL, SPRITEMOVEDATA_BIGDOLL, 0, 0, -1, -1, 0, OBJECTTYPE_SCRIPT, 0, wDecoBigDoll, EVENT_KRISS_HOUSE_2F_BIG_DOLL

View File

@ -568,9 +568,9 @@ Function8942b: ; 8942b (22:542b)
ret
Function89448: ; 89448 (22:5448)
; Clears the Sprites array
; Clears the sprite array
push af
ld hl, Sprites
ld hl, wVirtualOAM
ld d, 24 * SPRITEOAMSTRUCT_LENGTH
xor a
.loop
@ -2550,7 +2550,7 @@ Function89f77: ; 89f77 (22:5f77)
Function89f9a: ; 89f9a (22:5f9a)
dec a
ld hl, Sprites
ld hl, wVirtualOAM
and a
ret z
.asm_89fa0
@ -3293,7 +3293,7 @@ asm_8a529: ; 8a529 (22:6529)
ld [hli], a
ld a, $ff
ld [hli], a
ld hl, Sprites
ld hl, wVirtualOAM
xor a
ld bc, 8 * SPRITEOAMSTRUCT_LENGTH
call ByteFill

View File

@ -1646,7 +1646,7 @@ _LinkBattleSendReceiveAction: ; 100a09
; 100a2e
.StageForSend: ; 100a2e
ld a, [wPlayerAction]
ld a, [wBattlePlayerAction]
and a
jr nz, .switch
ld a, [CurPlayerMove]
@ -7143,7 +7143,7 @@ Function10306e: ; 10306e
ld a, $01
ld [hOAMUpdate], a
call ClearSprites
ld de, Sprites
ld de, wVirtualOAM
call Function1030cd
xor a
ld [hOAMUpdate], a

View File

@ -650,7 +650,7 @@ Function1144d1: ; 1144d1
ld a, [de]
ld [hl], a
xor a
ld [BigDoll], a
ld [wDecoBigDoll], a
ld [$dc17], a
ld a, $2
ld [$dc0e], a
@ -691,7 +691,7 @@ Function1144d1: ; 1144d1
ld a, [$dc0d]
ld [de], a
ld b, $0
ld a, [BigDoll]
ld a, [wDecoBigDoll]
and a
jr z, .asm_114537
ld b, $1
@ -753,7 +753,7 @@ Function114561: ; 114561
Function114576: ; 114576
xor a
ld [Bed], a
ld [wDecoBed], a
ld b, $7
call Function1143f3
cp $2
@ -802,7 +802,7 @@ Function114576: ; 114576
.asm_1145bf
ld a, $1
ld [Bed], a
ld [wDecoBed], a
ret
; 1145c5
@ -924,7 +924,7 @@ Function11463c: ; 11463c
cp $d
jr nz, .asm_11468a
xor a
ld [Carpet], a
ld [wDecoCarpet], a
.asm_114662
inc e
call z, Function11469b
@ -947,7 +947,7 @@ Function11463c: ; 11463c
inc e
call z, Function11469b
ld a, $1
ld [Carpet], a
ld [wDecoCarpet], a
ld a, [de]
cp $d
jr z, .asm_114662
@ -959,7 +959,7 @@ Function11463c: ; 11463c
ld [hFF8C], a
ld [MBC3SRamBank], a
xor a
ld [Carpet], a
ld [wDecoCarpet], a
ld a, $1
ret
@ -1021,7 +1021,7 @@ Function1146a4: ; 1146a4
and a
jr z, .asm_1146f5
ld a, $1
ld [BigDoll], a
ld [wDecoBigDoll], a
jr .asm_1146da
.asm_1146f5
@ -1057,7 +1057,7 @@ Function1146fa: ; 1146fa
ld [hFF8C], a
ld [MBC3SRamBank], a
ld a, $1
ld [RightOrnament], a
ld [wDecoRightOrnament], a
call Function1147cd
and a
jp nz, .asm_1147b7
@ -1069,13 +1069,13 @@ Function1146fa: ; 1146fa
and a
jr z, .asm_114794
ld a, $1
ld [BigDoll], a
ld [wDecoBigDoll], a
.asm_114749
call Function11494d
and a
jr nz, .asm_11478a
ld a, [BigDoll]
ld a, [wDecoBigDoll]
and a
jr nz, .asm_114786
ld hl, $dc03
@ -1102,7 +1102,7 @@ Function1146fa: ; 1146fa
ld a, [$dc0d]
inc a
ld [$dc0d], a
ld a, [BigDoll]
ld a, [wDecoBigDoll]
and a
jr z, .asm_114799
@ -1127,7 +1127,7 @@ Function1146fa: ; 1146fa
ret
.asm_114799
ld a, [Carpet]
ld a, [wDecoCarpet]
and a
jr z, .asm_114737
jr .asm_1147cb
@ -1141,14 +1141,14 @@ Function1146fa: ; 1146fa
and a
jr z, .asm_1147cb
xor a
ld [BigDoll], a
ld [wDecoBigDoll], a
.asm_1147b7
ld a, [$dc17]
and a
jr z, .asm_114794
ld a, $1
ld [BigDoll], a
ld [wDecoBigDoll], a
ld a, [$dc0d]
cp $1
jr nz, .asm_114773
@ -1162,7 +1162,7 @@ Function1146fa: ; 1146fa
Function1147cd: ; 1147cd
ld bc, NULL
ld a, [RightOrnament]
ld a, [wDecoRightOrnament]
and a
jr nz, .asm_11480c
.asm_1147d6
@ -1364,7 +1364,7 @@ Function1148c2: ; 1148c2
call z, Function114944
cp $3
jr nz, .asm_114904
ld hl, Plant
ld hl, wDecoPlant
ld a, [hli]
ld [de], a
inc e
@ -1458,7 +1458,7 @@ Function11494d: ; 11494d
call z, Function1149c3
cp $3
jr nz, .asm_114983
ld hl, Plant
ld hl, wDecoPlant
ld a, [hli]
ld [de], a
inc e
@ -1810,7 +1810,7 @@ Function114acf: ; 114acf
call z, Function114b4c
.asm_114b26
ld hl, Plant
ld hl, wDecoPlant
ld a, [$dc00]
ld [hli], a
ld [hl], e
@ -2703,7 +2703,7 @@ Function114f59: ; 114f59
ret
.asm_114fa7
ld hl, Bed
ld hl, wDecoBed
ld c, [hl]
inc hl
ld a, [hli]
@ -2842,7 +2842,7 @@ Function115059: ; 115059
; 115062
Function115062: ; 115062
ld hl, Bed
ld hl, wDecoBed
ld a, [hli]
and a
jr z, .asm_1150ae
@ -2948,9 +2948,9 @@ Function1150b3: ; 1150b3
.asm_1150f8
ld a, l
ld [Console], a
ld [wDecoConsole], a
ld a, h
ld [LeftOrnament], a
ld [wDecoLeftOrnament], a
ld hl, String_114232
.asm_115103
ld a, [hli]
@ -2987,9 +2987,9 @@ Function1150b3: ; 1150b3
ld a, $3d
ld [de], a
inc de
ld a, [Console]
ld a, [wDecoConsole]
ld l, a
ld a, [LeftOrnament]
ld a, [wDecoLeftOrnament]
ld h, a
jr .asm_1150bb
@ -3275,7 +3275,7 @@ Function115286: ; 115286
; 11528f
Function11528f: ; 11528f
ld hl, Bed
ld hl, wDecoBed
ld c, [hl]
inc hl
ld a, [hli]
@ -3458,7 +3458,7 @@ Function11537d: ; 11537d
ld a, b
ld [hli], a
inc de
ld hl, RightOrnament
ld hl, wDecoRightOrnament
ld a, [de]
ld [hli], a
inc de
@ -3502,7 +3502,7 @@ Function1153b5: ; 1153b5
ld [hl], a
inc de
ld a, [de]
ld [Bed], a
ld [wDecoBed], a
inc de
ld hl, $dc0d
ld [hl], e
@ -3522,9 +3522,9 @@ Function1153d2: ; 1153d2
ld [$dc03], a
ld [$dc04], a
ld a, $24
ld [Console], a
ld [wDecoConsole], a
ld a, $dc
ld [LeftOrnament], a
ld [wDecoLeftOrnament], a
push bc
jr .asm_1153f4
@ -3548,9 +3548,9 @@ Function1153d2: ; 1153d2
ld c, [hl]
inc hl
push hl
ld a, [Console]
ld a, [wDecoConsole]
ld l, a
ld a, [LeftOrnament]
ld a, [wDecoLeftOrnament]
ld h, a
push bc
ld b, $0
@ -3560,10 +3560,10 @@ Function1153d2: ; 1153d2
pop bc
ld a, l
ld e, a
ld [Console], a
ld [wDecoConsole], a
ld a, h
ld d, a
ld [LeftOrnament], a
ld [wDecoLeftOrnament], a
dec b
jr z, .asm_11542b
pop hl
@ -3582,9 +3582,9 @@ Function1153d2: ; 1153d2
.asm_115430
ld a, l
ld [Console], a
ld [wDecoConsole], a
ld a, h
ld [LeftOrnament], a
ld [wDecoLeftOrnament], a
xor a
ld [de], a
ld hl, $dc24
@ -3670,7 +3670,7 @@ Function1153d2: ; 1153d2
inc de
ld a, h
ld [de], a
ld hl, RightOrnament
ld hl, wDecoRightOrnament
ld a, [hli]
ld [wCurrMapBGEventCount], a
ld [hFF8C], a
@ -3680,15 +3680,15 @@ Function1153d2: ; 1153d2
ld d, [hl]
ld hl, $ddc8
call Function115d6a
ld hl, RightOrnament
ld hl, wDecoRightOrnament
ld a, [wCurrMapBGEventCount]
ld [hli], a
ld [hl], e
inc hl
ld [hl], d
ld a, [Console]
ld a, [wDecoConsole]
ld e, a
ld a, [LeftOrnament]
ld a, [wDecoLeftOrnament]
ld d, a
pop hl
ld a, h
@ -3708,9 +3708,9 @@ Function1154d4: ; 1154d4
and a
jr nz, .asm_11552c
call Function1155d1
ld a, [RightOrnament]
ld a, [wDecoRightOrnament]
dec a
ld [RightOrnament], a
ld [wDecoRightOrnament], a
and a
jp z, .asm_115577
cp $1
@ -3718,7 +3718,7 @@ Function1154d4: ; 1154d4
xor a
ld [wDailyResetTimer], a
.asm_1154f7
ld a, [BigDoll]
ld a, [wDecoBigDoll]
cp $2
jr z, .asm_115502
cp $3
@ -3822,9 +3822,9 @@ Function1154d4: ; 1154d4
jp Function11425c
.asm_1155a0
ld a, [RightOrnament]
ld a, [wDecoRightOrnament]
dec a
ld [RightOrnament], a
ld [wDecoRightOrnament], a
and a
jr z, .asm_115560
call Function1155d1
@ -3854,7 +3854,7 @@ Function1155af: ; 1155af
ld [hli], a
inc de
ld a, [de]
ld [RightOrnament], a
ld [wDecoRightOrnament], a
inc de
ld a, e
ld [hli], a
@ -3870,10 +3870,10 @@ Function1155d1: ; 1155d1
ld a, [$dc0e]
ld h, a
ld a, [hli]
ld [BigDoll], a
ld [wDecoBigDoll], a
cp $3
jr nz, .asm_1155f0
ld de, Carpet
ld de, wDecoCarpet
ld a, [hli]
ld [de], a
inc de
@ -3883,7 +3883,7 @@ Function1155d1: ; 1155d1
ld a, [hli]
ld [de], a
ld a, [hli]
ld [Bed], a
ld [wDecoBed], a
.asm_1155f0
ld de, $dc17
@ -4056,9 +4056,9 @@ Function1156cc: ; 1156cc
call Function115732
call Function11575c
ld a, h
ld [Poster], a
ld [wDecoPoster], a
ld a, l
ld [Plant], a
ld [wDecoPlant], a
.asm_1156fa
call Function1157d0
@ -4070,9 +4070,9 @@ Function1156cc: ; 1156cc
ld a, [wStartDay]
cp $5
jr z, .asm_115716
ld a, [Poster]
ld a, [wDecoPoster]
ld h, a
ld a, [Plant]
ld a, [wDecoPlant]
ld l, a
xor a
jp Function11425c
@ -4240,7 +4240,7 @@ Function1157d0: ; 1157d0
ld l, a
ld a, [$dc0e]
ld c, a
ld a, [Bed]
ld a, [wDecoBed]
ld b, a
cp h
jr c, .asm_1157eb
@ -4275,7 +4275,7 @@ Function1157d0: ; 1157d0
ld a, c
ld [$dc0e], a
ld a, b
ld [Bed], a
ld [wDecoBed], a
ld a, $4
ld [wStartDay], a
ret
@ -4285,7 +4285,7 @@ Function1157d0: ; 1157d0
ld a, c
ld [$dc0e], a
ld a, b
ld [Bed], a
ld [wDecoBed], a
ld a, $3
ld [wStartDay], a
ret
@ -4298,7 +4298,7 @@ Function11581e: ; 11581e
ret z
ld a, [$dc0e]
ld c, a
ld a, [Bed]
ld a, [wDecoBed]
ld b, a
ld hl, $dc02
ld a, [hli]
@ -4659,9 +4659,9 @@ Function1159fb: ; 1159fb
call Function115732
call Function115a5f
ld a, h
ld [Plant], a
ld [wDecoPlant], a
ld a, l
ld [Poster], a
ld [wDecoPoster], a
.asm_115a29
call Function115ab0
@ -4673,9 +4673,9 @@ Function1159fb: ; 1159fb
ld a, [wStartDay]
cp $5
jr z, .asm_115a45
ld a, [Poster]
ld a, [wDecoPoster]
ld h, a
ld a, [Plant]
ld a, [wDecoPlant]
ld l, a
xor a
jp Function11425c
@ -4771,7 +4771,7 @@ Function115ab0: ; 115ab0
ld l, a
ld a, [$dc0e]
ld c, a
ld a, [Bed]
ld a, [wDecoBed]
ld b, a
cp h
jr c, .asm_115acb
@ -4806,7 +4806,7 @@ Function115ab0: ; 115ab0
ld a, c
ld [$dc0e], a
ld a, b
ld [Bed], a
ld [wDecoBed], a
ld a, $4
ld [wStartDay], a
xor a
@ -4817,7 +4817,7 @@ Function115ab0: ; 115ab0
ld a, c
ld [$dc0e], a
ld a, b
ld [Bed], a
ld [wDecoBed], a
ld a, $3
ld [wStartDay], a
xor a
@ -4831,7 +4831,7 @@ Function115b00: ; 115b00
ret z
ld a, [$dc0e]
ld c, a
ld a, [Bed]
ld a, [wDecoBed]
ld b, a
ld hl, $dc02
ld a, [hli]
@ -4870,7 +4870,7 @@ Function115b00: ; 115b00
ret
.asm_115b43
ld a, [Carpet]
ld a, [wDecoCarpet]
add a
cpl
ld c, a
@ -4961,7 +4961,7 @@ Function115b00: ; 115b00
Function115bc8: ; 115bc8
xor a
ld [Carpet], a
ld [wDecoCarpet], a
.asm_115bcc
ld a, [de]
ld [hli], a
@ -5009,9 +5009,9 @@ Function115bc8: ; 115bc8
ld a, b
or c
jr z, .asm_115c46
ld a, [Carpet]
ld a, [wDecoCarpet]
inc a
ld [Carpet], a
ld [wDecoCarpet], a
dec bc
ld a, b
or c

View File

@ -360,7 +360,7 @@ Function11619d: ; 11619d
cp $2
jr c, .asm_1161b4
ld a, $a0
ld hl, Sprites
ld hl, wVirtualOAM
ld bc, 25 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
@ -667,7 +667,7 @@ Function11636e: ; 11636e
ld a, $1
ld [rSVBK], a
ld a, $a0
ld hl, Sprites
ld hl, wVirtualOAM
ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
ld a, $90
@ -695,7 +695,7 @@ Function1163c0: ; 1163c0
ld a, $1
ld [rSVBK], a
ld a, $a0
ld hl, Sprites
ld hl, wVirtualOAM
ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
call ByteFill
call DelayFrame

View File

@ -564,7 +564,7 @@ Function16cb2e: ; 16cb2e
ret z
call Function16cb40
ld hl, Unknown_16cb86
ld de, Sprites
ld de, wVirtualOAM
call Function16cb5d
ret
; 16cb40

View File

@ -517,7 +517,7 @@ String_17a9b2: ; 17a9b2
; 17a9cb
Function17a9cb: ; 17a9cb (5e:69cb)
ld de, Sprites ; $c400
ld de, wVirtualOAM ; $c400
ld hl, $d088
bit 6, [hl]
jr nz, .bit_6_set

View File

@ -22,16 +22,16 @@ wMusic::
MusicPlaying:: db ; c100
Channels::
Channel1:: channel_struct Channel1 ; c101
Channel2:: channel_struct Channel2 ; c133
Channel3:: channel_struct Channel3 ; c165
Channel4:: channel_struct Channel4 ; c197
wChannel1:: channel_struct Channel1 ; c101
wChannel2:: channel_struct Channel2 ; c133
wChannel3:: channel_struct Channel3 ; c165
wChannel4:: channel_struct Channel4 ; c197
SFXChannels::
Channel5:: channel_struct Channel5 ; c1c9
Channel6:: channel_struct Channel6 ; c1fb
Channel7:: channel_struct Channel7 ; c22d
Channel8:: channel_struct Channel8 ; c25f
wChannel5:: channel_struct Channel5 ; c1c9
wChannel6:: channel_struct Channel6 ; c1fb
wChannel7:: channel_struct Channel7 ; c22d
wChannel8:: channel_struct Channel8 ; c25f
ds 1 ; c291
@ -43,7 +43,7 @@ wCurNoteDuration:: db ; used in MusicE0 and LoadNote
CurMusicByte:: db ; c298
CurChannel:: db ; c299
Volume:: ; c29a
wVolume:: ; c29a
; corresponds to $ff24
; Channel control / ON-OFF / Volume (R/W)
; bit 7 - Vin->SO2 ON/OFF
@ -73,7 +73,7 @@ wNoiseSampleDelay:: db ; c2a2
MusicNoiseSampleSet:: db ; c2a4
SFXNoiseSampleSet:: db ; c2a5
Danger:: ; c2a6
wLowHealthAlarm:: ; c2a6
; bit 7: on/off
; bit 4: pitch
; bit 0-3: counter
@ -302,7 +302,7 @@ wc3fc:: ds 1
SECTION "Sprites", WRAM0
Sprites:: ; c400
wVirtualOAM:: ; c400
Sprite01:: sprite_oam_struct Sprite01
Sprite02:: sprite_oam_struct Sprite02
Sprite03:: sprite_oam_struct Sprite03
@ -631,7 +631,7 @@ wEnemyMinimized:: db ; c6fa
AlreadyFailed:: db ; c6fb
wBattleParticipantsIncludingFainted:: db ; c6fc
wDanger:: db ; c6fd
wBattleLowHealthAlarm:: db ; c6fd
wPlayerMinimized:: db ; c6fe
PlayerScreens:: ; c6ff
; bit
@ -659,7 +659,7 @@ EnemyLightScreenCount:: db ; c706
EnemyReflectCount:: db ; c707
ds 2
Weather:: ; c70a
wBattleWeather:: ; c70a
; 00 normal
; 01 rain
; 02 sun
@ -1871,7 +1871,7 @@ wNumMoves:: db
wFieldMoveSucceeded::
wItemEffectSucceeded::
wPlayerAction::
wBattlePlayerAction::
; 0 - use move
; 1 - use item
; 2 - switch
@ -2439,9 +2439,9 @@ Money:: ds 3 ; d84e
wMomsMoney:: ds 3 ; d851
wMomSavingMoney:: db ; d854
Coins:: dw ; d855
wCoins:: dw ; d855
Badges::
wBadges::
wJohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
wKantoBadges:: flag_array NUM_KANTO_BADGES ; d858
@ -2450,7 +2450,7 @@ TMsHMs:: ds NUM_TMS + NUM_HMS ; d859
TMsHMsEnd::
NumItems:: db ; d892
Items:: ds MAX_ITEMS * 2 + 1 ; d893
wItems:: ds MAX_ITEMS * 2 + 1 ; d893
ItemsEnd::
NumKeyItems:: db ; d8bc
@ -2458,7 +2458,7 @@ KeyItems:: ds MAX_KEY_ITEMS + 1 ; d8bd
KeyItemsEnd::
NumBalls:: db ; d8d7
Balls:: ds MAX_BALLS * 2 + 1 ; d8d8
wBalls:: ds MAX_BALLS * 2 + 1 ; d8d8
BallsEnd::
PCItems:: ds MAX_PC_ITEMS * 2 + 1 ; d8f1
@ -2649,14 +2649,14 @@ wCurrMapCallbacksPointer:: dw ; dc0b
ds 2
; Sprite id of each decoration
Bed:: db ; dc0f
Carpet:: db ; dc10
Plant:: db ; dc11
Poster:: db ; dc12
Console:: db ; dc13
LeftOrnament:: db ; dc14
RightOrnament:: db ; dc15
BigDoll:: db ; dc16
wDecoBed:: db ; dc0f
wDecoCarpet:: db ; dc10
wDecoPlant:: db ; dc11
wDecoPoster:: db ; dc12
wDecoConsole:: db ; dc13
wDecoLeftOrnament:: db ; dc14
wDecoRightOrnament:: db ; dc15
wDecoBigDoll:: db ; dc16
; Items bought from Mom
wWhichMomItem:: db ; dc17