mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Prefix wram labels with w, part 1.
Handle edge cases first.
This commit is contained in:
parent
c60f1331fe
commit
f2ae74079f
390
audio/engine.asm
390
audio/engine.asm
File diff suppressed because it is too large
Load Diff
@ -66,23 +66,23 @@ NUM_CHANNELS EQU const_value
|
|||||||
const NOTE_REST ; 5
|
const NOTE_REST ; 5
|
||||||
const NOTE_VIBRATO_OVERRIDE ; 6
|
const NOTE_VIBRATO_OVERRIDE ; 6
|
||||||
|
|
||||||
; Volume:
|
; wVolume
|
||||||
VOLUME_SO1_F EQU 3
|
VOLUME_SO1_F EQU 3
|
||||||
VOLUME_SO2_F EQU 7
|
VOLUME_SO2_F EQU 7
|
||||||
VOLUME_SO1_LEVEL EQU %00000111
|
VOLUME_SO1_LEVEL EQU %00000111
|
||||||
VOLUME_SO2_LEVEL EQU %01110000
|
VOLUME_SO2_LEVEL EQU %01110000
|
||||||
MAX_VOLUME EQU $77
|
MAX_VOLUME EQU $77
|
||||||
|
|
||||||
; SoundInput:
|
; SoundInput
|
||||||
SOUND_INPUT_CH1_F EQU 0
|
SOUND_INPUT_CH1_F EQU 0
|
||||||
SOUND_INPUT_CH2_F EQU 1
|
SOUND_INPUT_CH2_F EQU 1
|
||||||
SOUND_INPUT_CH3_F EQU 2
|
SOUND_INPUT_CH3_F EQU 2
|
||||||
SOUND_INPUT_CH4_F EQU 3
|
SOUND_INPUT_CH4_F EQU 3
|
||||||
SOUND_INPUT_GLOBAL_F EQU 7
|
SOUND_INPUT_GLOBAL_F EQU 7
|
||||||
|
|
||||||
; Danger:
|
; wLowHealthAlarm
|
||||||
DANGER_PITCH_F EQU 4
|
DANGER_PITCH_F EQU 4
|
||||||
DANGER_ON_F EQU 7
|
DANGER_ON_F EQU 7
|
||||||
|
|
||||||
; MusicFade:
|
; MusicFade
|
||||||
MUSIC_FADE_IN_F EQU 7
|
MUSIC_FADE_IN_F EQU 7
|
||||||
|
@ -214,7 +214,7 @@ SUBSTATUS_CURLED EQU 0
|
|||||||
enum SCREENS_UNUSED
|
enum SCREENS_UNUSED
|
||||||
enum SCREENS_SPIKES
|
enum SCREENS_SPIKES
|
||||||
|
|
||||||
; Weather values
|
; values in wBattleWeather
|
||||||
const_def
|
const_def
|
||||||
const WEATHER_NONE
|
const WEATHER_NONE
|
||||||
const WEATHER_RAIN
|
const WEATHER_RAIN
|
||||||
|
@ -28,4 +28,4 @@ EXP_BAR_LENGTH_PX EQU EXP_BAR_LENGTH * TILE_WIDTH ; pixels
|
|||||||
const SPRITEOAMSTRUCT_TILE_ID ; 2
|
const SPRITEOAMSTRUCT_TILE_ID ; 2
|
||||||
const SPRITEOAMSTRUCT_ATTRIBUTES ; 3
|
const SPRITEOAMSTRUCT_ATTRIBUTES ; 3
|
||||||
SPRITEOAMSTRUCT_LENGTH EQU const_value
|
SPRITEOAMSTRUCT_LENGTH EQU const_value
|
||||||
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see Sprites
|
NUM_SPRITE_OAM_STRUCTS EQU 40 ; see wVirtualOAM
|
||||||
|
@ -1288,7 +1288,7 @@ UnknownText_0x1c5c5e::
|
|||||||
UnknownText_0x1c5c7b::
|
UnknownText_0x1c5c7b::
|
||||||
text "Coins:"
|
text "Coins:"
|
||||||
line "@"
|
line "@"
|
||||||
deciram Coins, 2, 4
|
deciram wCoins, 2, 4
|
||||||
db "@@"
|
db "@@"
|
||||||
|
|
||||||
Text_RaiseThePPOfWhichMove::
|
Text_RaiseThePPOfWhichMove::
|
||||||
|
@ -135,7 +135,7 @@ AI_Redundant: ; 2c41a
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.Sandstorm: ; 2c4f5
|
.Sandstorm: ; 2c4f5
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SANDSTORM
|
cp WEATHER_SANDSTORM
|
||||||
jr z, .Redundant
|
jr z, .Redundant
|
||||||
jr .NotRedundant
|
jr .NotRedundant
|
||||||
@ -153,13 +153,13 @@ AI_Redundant: ; 2c41a
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.RainDance: ; 2c512
|
.RainDance: ; 2c512
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_RAIN
|
cp WEATHER_RAIN
|
||||||
jr z, .Redundant
|
jr z, .Redundant
|
||||||
jr .NotRedundant
|
jr .NotRedundant
|
||||||
|
|
||||||
.SunnyDay: ; 2c51b
|
.SunnyDay: ; 2c51b
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SUN
|
cp WEATHER_SUN
|
||||||
jr z, .Redundant
|
jr z, .Redundant
|
||||||
jr .NotRedundant
|
jr .NotRedundant
|
||||||
|
@ -2842,7 +2842,7 @@ AI_Smart_Solarbeam: ; 3920b
|
|||||||
; 80% chance to encourage this move when it's sunny.
|
; 80% chance to encourage this move when it's sunny.
|
||||||
; 90% chance to discourage this move when it's raining.
|
; 90% chance to discourage this move when it's raining.
|
||||||
|
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SUN
|
cp WEATHER_SUN
|
||||||
jr z, .asm_3921e
|
jr z, .asm_3921e
|
||||||
|
|
||||||
@ -2870,7 +2870,7 @@ AI_Smart_Solarbeam: ; 3920b
|
|||||||
AI_Smart_Thunder: ; 39225
|
AI_Smart_Thunder: ; 39225
|
||||||
; 90% chance to discourage this move when it's sunny.
|
; 90% chance to discourage this move when it's sunny.
|
||||||
|
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SUN
|
cp WEATHER_SUN
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@ DoBattle: ; 3c000
|
|||||||
xor a
|
xor a
|
||||||
ld [wBattleParticipantsNotFainted], a
|
ld [wBattleParticipantsNotFainted], a
|
||||||
ld [wBattleParticipantsIncludingFainted], a
|
ld [wBattleParticipantsIncludingFainted], a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
inc a
|
inc a
|
||||||
ld [wBattleHasJustStarted], a
|
ld [wBattleHasJustStarted], a
|
||||||
@ -455,7 +455,7 @@ DetermineMoveOrder: ; 3c314
|
|||||||
jr z, .use_move
|
jr z, .use_move
|
||||||
sub BATTLEACTION_SWITCH1
|
sub BATTLEACTION_SWITCH1
|
||||||
jr c, .use_move
|
jr c, .use_move
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
cp $2
|
cp $2
|
||||||
jr nz, .switch
|
jr nz, .switch
|
||||||
ld a, [hSerialConnectionStatus]
|
ld a, [hSerialConnectionStatus]
|
||||||
@ -480,7 +480,7 @@ DetermineMoveOrder: ; 3c314
|
|||||||
jp .enemy_first
|
jp .enemy_first
|
||||||
|
|
||||||
.use_move
|
.use_move
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a
|
||||||
jp nz, .player_first
|
jp nz, .player_first
|
||||||
call CompareMovePriority
|
call CompareMovePriority
|
||||||
@ -623,7 +623,7 @@ ParsePlayerAction: ; 3c434
|
|||||||
jr .encored
|
jr .encored
|
||||||
|
|
||||||
.not_encored
|
.not_encored
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .reset_rage
|
jr z, .reset_rage
|
||||||
and a
|
and a
|
||||||
@ -920,7 +920,7 @@ Battle_EnemyFirst: ; 3c5fe
|
|||||||
jp z, HandlePlayerMonFaint
|
jp z, HandlePlayerMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
; 3c664
|
; 3c664
|
||||||
|
|
||||||
@ -970,7 +970,7 @@ Battle_PlayerFirst: ; 3c664
|
|||||||
jp z, HandleEnemyMonFaint
|
jp z, HandleEnemyMonFaint
|
||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
; 3c6cf
|
; 3c6cf
|
||||||
|
|
||||||
@ -1716,7 +1716,7 @@ HandleScreens: ; 3cb36
|
|||||||
; 3cb9e
|
; 3cb9e
|
||||||
|
|
||||||
HandleWeather: ; 3cb9e
|
HandleWeather: ; 3cb9e
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_NONE
|
cp WEATHER_NONE
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
@ -1727,7 +1727,7 @@ HandleWeather: ; 3cb9e
|
|||||||
ld hl, .WeatherMessages
|
ld hl, .WeatherMessages
|
||||||
call .PrintWeatherMessage
|
call .PrintWeatherMessage
|
||||||
|
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SANDSTORM
|
cp WEATHER_SANDSTORM
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -1790,11 +1790,11 @@ HandleWeather: ; 3cb9e
|
|||||||
ld hl, .WeatherEndedMessages
|
ld hl, .WeatherEndedMessages
|
||||||
call .PrintWeatherMessage
|
call .PrintWeatherMessage
|
||||||
xor a
|
xor a
|
||||||
ld [Weather], a
|
ld [wBattleWeather], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.PrintWeatherMessage:
|
.PrintWeatherMessage:
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -2099,18 +2099,18 @@ HandleEnemyMonFaint: ; 3cd55
|
|||||||
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
jp c, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
|
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call HandleEnemySwitch
|
call HandleEnemySwitch
|
||||||
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
jr DoubleSwitch
|
jr DoubleSwitch
|
||||||
|
|
||||||
.player_mon_not_fainted
|
.player_mon_not_fainted
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call HandleEnemySwitch
|
call HandleEnemySwitch
|
||||||
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
; 3cdca
|
; 3cdca
|
||||||
|
|
||||||
@ -2140,7 +2140,7 @@ DoubleSwitch: ; 3cdca
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
; 3ce01
|
; 3ce01
|
||||||
|
|
||||||
@ -2173,7 +2173,7 @@ UpdateBattleStateAndExperienceAfterEnemyFaint: ; 3ce01
|
|||||||
.wild2
|
.wild2
|
||||||
call StopDangerSound
|
call StopDangerSound
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wDanger], a
|
ld [wBattleLowHealthAlarm], a
|
||||||
|
|
||||||
.trainer
|
.trainer
|
||||||
ld hl, BattleMonHP
|
ld hl, BattleMonHP
|
||||||
@ -2293,7 +2293,7 @@ IsAnyMonHoldingExpShare: ; 3ceaa
|
|||||||
|
|
||||||
StopDangerSound: ; 3ceec
|
StopDangerSound: ; 3ceec
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
ret
|
ret
|
||||||
; 3cef1
|
; 3cef1
|
||||||
|
|
||||||
@ -2394,7 +2394,7 @@ EnemyPartyMonEntrance: ; 3cf78
|
|||||||
call SpikesDamage
|
call SpikesDamage
|
||||||
xor a
|
xor a
|
||||||
ld [wEnemyMoveStruct + MOVE_ANIM], a
|
ld [wEnemyMoveStruct + MOVE_ANIM], a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
inc a
|
inc a
|
||||||
ret
|
ret
|
||||||
; 3cfa4
|
; 3cfa4
|
||||||
@ -2403,7 +2403,7 @@ WinTrainerBattle: ; 3cfa4
|
|||||||
; Player won the battle
|
; Player won the battle
|
||||||
call StopDangerSound
|
call StopDangerSound
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wDanger], a
|
ld [wBattleLowHealthAlarm], a
|
||||||
ld [BattleEnded], a
|
ld [BattleEnded], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
@ -2705,7 +2705,7 @@ HandlePlayerMonFaint: ; 3d14e
|
|||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call HandleEnemySwitch
|
call HandleEnemySwitch
|
||||||
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
jp z, WildFled_EnemyFled_LinkBattleCanceled
|
||||||
jp DoubleSwitch
|
jp DoubleSwitch
|
||||||
@ -2720,7 +2720,7 @@ PlayerMonFaintHappinessMod: ; 3d1aa
|
|||||||
ld hl, EnemySubStatus3
|
ld hl, EnemySubStatus3
|
||||||
res SUBSTATUS_IN_LOOP, [hl]
|
res SUBSTATUS_IN_LOOP, [hl]
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
ld hl, PlayerDamageTaken
|
ld hl, PlayerDamageTaken
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
@ -2788,12 +2788,12 @@ ForcePlayerMonChoice: ; 3d227
|
|||||||
and a
|
and a
|
||||||
jr z, .skip_link
|
jr z, .skip_link
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call LinkBattleSendReceiveAction
|
call LinkBattleSendReceiveAction
|
||||||
|
|
||||||
.skip_link
|
.skip_link
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call CheckMobileBattleError
|
call CheckMobileBattleError
|
||||||
jr c, .enemy_fainted_mobile_error
|
jr c, .enemy_fainted_mobile_error
|
||||||
ld hl, EnemyMonHP
|
ld hl, EnemyMonHP
|
||||||
@ -3229,7 +3229,7 @@ EnemySwitch: ; 3d4e1
|
|||||||
xor a
|
xor a
|
||||||
ld [wBattleParticipantsNotFainted], a
|
ld [wBattleParticipantsNotFainted], a
|
||||||
ld [wBattleParticipantsIncludingFainted], a
|
ld [wBattleParticipantsIncludingFainted], a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
inc a
|
inc a
|
||||||
ld [wEnemyIsSwitching], a
|
ld [wEnemyIsSwitching], a
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
@ -3883,7 +3883,7 @@ TryToRunAwayFromBattle: ; 3d8b3
|
|||||||
cp b
|
cp b
|
||||||
jr nc, .can_escape
|
jr nc, .can_escape
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ld hl, BattleText_CantEscape2
|
ld hl, BattleText_CantEscape2
|
||||||
jr .print_inescapable_text
|
jr .print_inescapable_text
|
||||||
|
|
||||||
@ -3909,7 +3909,7 @@ TryToRunAwayFromBattle: ; 3d8b3
|
|||||||
jr z, .fled
|
jr z, .fled
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ld a, $f
|
ld a, $f
|
||||||
ld [CurMoveNum], a
|
ld [CurMoveNum], a
|
||||||
xor a
|
xor a
|
||||||
@ -4769,7 +4769,7 @@ CheckDanger: ; 3df9e
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
jr z, .no_danger
|
jr z, .no_danger
|
||||||
ld a, [wDanger]
|
ld a, [wBattleLowHealthAlarm]
|
||||||
and a
|
and a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
ld a, [PlayerHPPal]
|
ld a, [PlayerHPPal]
|
||||||
@ -4777,12 +4777,12 @@ CheckDanger: ; 3df9e
|
|||||||
jr z, .danger
|
jr z, .danger
|
||||||
|
|
||||||
.no_danger
|
.no_danger
|
||||||
ld hl, Danger
|
ld hl, wLowHealthAlarm
|
||||||
res DANGER_ON_F, [hl]
|
res DANGER_ON_F, [hl]
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.danger
|
.danger
|
||||||
ld hl, Danger
|
ld hl, wLowHealthAlarm
|
||||||
set DANGER_ON_F, [hl]
|
set DANGER_ON_F, [hl]
|
||||||
|
|
||||||
.done
|
.done
|
||||||
@ -5116,7 +5116,7 @@ BattleMenu_Pack: ; 3e1c7
|
|||||||
jr z, .contest
|
jr z, .contest
|
||||||
|
|
||||||
farcall BattlePack
|
farcall BattlePack
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a
|
||||||
jr z, .didnt_use_item
|
jr z, .didnt_use_item
|
||||||
jr .got_item
|
jr .got_item
|
||||||
@ -5329,7 +5329,7 @@ TryPlayerSwitch: ; 3e358
|
|||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [LastPlayerMon], a
|
ld [LastPlayerMon], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
call ClearPalettes
|
call ClearPalettes
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
@ -5464,7 +5464,7 @@ BattleMenu_Run: ; 3e489
|
|||||||
ld a, $0
|
ld a, $0
|
||||||
ld [wFailedToFlee], a
|
ld [wFailedToFlee], a
|
||||||
ret c
|
ret c
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
jp BattleMenu
|
jp BattleMenu
|
||||||
@ -5955,7 +5955,7 @@ ParseEnemyAction: ; 3e7c1
|
|||||||
jr z, .not_linked
|
jr z, .not_linked
|
||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
call LoadTileMapToTempTileMap
|
call LoadTileMapToTempTileMap
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a
|
||||||
call z, LinkBattleSendReceiveAction
|
call z, LinkBattleSendReceiveAction
|
||||||
call Call_LoadTempTileMapToTileMap
|
call Call_LoadTempTileMapToTileMap
|
||||||
@ -8560,7 +8560,7 @@ ExitBattle: ; 3f69e
|
|||||||
CleanUpBattleRAM: ; 3f6d0
|
CleanUpBattleRAM: ; 3f6d0
|
||||||
call BattleEnd_HandleRoamMons
|
call BattleEnd_HandleRoamMons
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
ld [wBattleMode], a
|
ld [wBattleMode], a
|
||||||
ld [BattleType], a
|
ld [BattleType], a
|
||||||
ld [AttackMissed], a
|
ld [AttackMissed], a
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
DoPlayerTurn: ; 34000
|
DoPlayerTurn: ; 34000
|
||||||
call SetPlayerTurn
|
call SetPlayerTurn
|
||||||
|
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
@ -1908,7 +1908,7 @@ BattleCommand_CheckHit: ; 34d32
|
|||||||
cp EFFECT_THUNDER
|
cp EFFECT_THUNDER
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_RAIN
|
cp WEATHER_RAIN
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -5394,7 +5394,7 @@ BattleCommand_FreezeTarget: ; 36102
|
|||||||
ld a, [TypeModifier]
|
ld a, [TypeModifier]
|
||||||
and $7f
|
and $7f
|
||||||
ret z
|
ret z
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SUN
|
cp WEATHER_SUN
|
||||||
ret z
|
ret z
|
||||||
call CheckMoveTypeMatchesTarget ; Don't freeze an Ice-type
|
call CheckMoveTypeMatchesTarget ; Don't freeze an Ice-type
|
||||||
@ -9046,7 +9046,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
|||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
|
|
||||||
call LoadStandardMenuDataHeader
|
call LoadStandardMenuDataHeader
|
||||||
ld hl, LinkBattleSendReceiveAction
|
ld hl, LinkBattleSendReceiveAction
|
||||||
@ -9054,7 +9054,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
|
|||||||
call CloseWindow
|
call CloseWindow
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 37a82
|
; 37a82
|
||||||
@ -9310,15 +9310,15 @@ BattleCommand_TimeBasedHealContinue: ; 37b7e
|
|||||||
; Don't factor in time of day in link battles.
|
; Don't factor in time of day in link battles.
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .Weather
|
jr nz, .checkWeather
|
||||||
|
|
||||||
ld a, [TimeOfDay]
|
ld a, [TimeOfDay]
|
||||||
cp b
|
cp b
|
||||||
jr z, .Weather
|
jr z, .checkWeather
|
||||||
dec c ; double
|
dec c ; double
|
||||||
|
|
||||||
.Weather:
|
.checkWeather:
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
and a
|
and a
|
||||||
jr z, .Heal
|
jr z, .Heal
|
||||||
|
|
||||||
@ -9384,7 +9384,7 @@ BattleCommand_HiddenPower: ; 37be8
|
|||||||
BattleCommand_StartRain: ; 37bf4
|
BattleCommand_StartRain: ; 37bf4
|
||||||
; startrain
|
; startrain
|
||||||
ld a, WEATHER_RAIN
|
ld a, WEATHER_RAIN
|
||||||
ld [Weather], a
|
ld [wBattleWeather], a
|
||||||
ld a, 5
|
ld a, 5
|
||||||
ld [WeatherCount], a
|
ld [WeatherCount], a
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
@ -9397,7 +9397,7 @@ BattleCommand_StartRain: ; 37bf4
|
|||||||
BattleCommand_StartSun: ; 37c07
|
BattleCommand_StartSun: ; 37c07
|
||||||
; startsun
|
; startsun
|
||||||
ld a, WEATHER_SUN
|
ld a, WEATHER_SUN
|
||||||
ld [Weather], a
|
ld [wBattleWeather], a
|
||||||
ld a, 5
|
ld a, 5
|
||||||
ld [WeatherCount], a
|
ld [WeatherCount], a
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
@ -9588,7 +9588,7 @@ BattleCommand_DoubleMinimizeDamage: ; 37ce6
|
|||||||
|
|
||||||
BattleCommand_SkipSunCharge: ; 37d02
|
BattleCommand_SkipSunCharge: ; 37d02
|
||||||
; mimicsuncharge
|
; mimicsuncharge
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SUN
|
cp WEATHER_SUN
|
||||||
ret nz
|
ret nz
|
||||||
ld b, charge_command
|
ld b, charge_command
|
||||||
@ -9690,7 +9690,7 @@ BattleCommand_ThunderAccuracy: ; 37d94
|
|||||||
ld a, BATTLE_VARS_MOVE_TYPE
|
ld a, BATTLE_VARS_MOVE_TYPE
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_RAIN
|
cp WEATHER_RAIN
|
||||||
jr z, .rain
|
jr z, .rain
|
||||||
cp WEATHER_SUN
|
cp WEATHER_SUN
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
BattleCommand_StartSandstorm: ; 376f8
|
BattleCommand_StartSandstorm: ; 376f8
|
||||||
; startsandstorm
|
; startsandstorm
|
||||||
|
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
cp WEATHER_SANDSTORM
|
cp WEATHER_SANDSTORM
|
||||||
jr z, .failed
|
jr z, .failed
|
||||||
|
|
||||||
ld a, WEATHER_SANDSTORM
|
ld a, WEATHER_SANDSTORM
|
||||||
ld [Weather], a
|
ld [wBattleWeather], a
|
||||||
ld a, 5
|
ld a, 5
|
||||||
ld [WeatherCount], a
|
ld [WeatherCount], a
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
|
@ -53,7 +53,7 @@ GetPlayerBackpicCoords: ; fbd9d (3e:7d9d)
|
|||||||
DoWeatherModifiers: ; fbda4
|
DoWeatherModifiers: ; fbda4
|
||||||
|
|
||||||
ld de, .WeatherTypeModifiers
|
ld de, .WeatherTypeModifiers
|
||||||
ld a, [Weather]
|
ld a, [wBattleWeather]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd265] ; move type
|
ld a, [wd265] ; move type
|
||||||
ld c, a
|
ld c, a
|
||||||
|
@ -150,7 +150,7 @@ PlayBattleMusic: ; 2ee6c
|
|||||||
|
|
||||||
ClearBattleRAM: ; 2ef18
|
ClearBattleRAM: ; 2ef18
|
||||||
xor a
|
xor a
|
||||||
ld [wPlayerAction], a
|
ld [wBattlePlayerAction], a
|
||||||
ld [wBattleResult], a
|
ld [wBattleResult], a
|
||||||
|
|
||||||
ld hl, wPartyMenuCursor
|
ld hl, wPartyMenuCursor
|
||||||
|
@ -271,8 +271,8 @@ endr
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.delete
|
.delete
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld c, SpritesEnd - Sprites
|
ld c, SpritesEnd - wVirtualOAM
|
||||||
xor a
|
xor a
|
||||||
.loop2
|
.loop2
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -1499,7 +1499,7 @@ BattleAnim_UpdateOAM_All: ; cc96e
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ld a, [wBattleAnimOAMPointerLo]
|
ld a, [wBattleAnimOAMPointerLo]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, HIGH(Sprites)
|
ld h, HIGH(wVirtualOAM)
|
||||||
.loop2
|
.loop2
|
||||||
ld a, l
|
ld a, l
|
||||||
cp LOW(SpritesEnd)
|
cp LOW(SpritesEnd)
|
||||||
|
@ -106,7 +106,7 @@ BattleAnimOAMUpdate: ; cca09
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wBattleAnimOAMPointerLo]
|
ld a, [wBattleAnimOAMPointerLo]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, HIGH(Sprites)
|
ld d, HIGH(wVirtualOAM)
|
||||||
.loop
|
.loop
|
||||||
ld a, [wBattleAnimTempYCoord]
|
ld a, [wBattleAnimTempYCoord]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
@ -126,9 +126,9 @@ _CardFlip: ; e00ee (38:40ee)
|
|||||||
; 0xe01d2
|
; 0xe01d2
|
||||||
|
|
||||||
.DeductCoins: ; e01d2
|
.DeductCoins: ; e01d2
|
||||||
ld a, [Coins]
|
ld a, [wCoins]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [Coins + 1]
|
ld a, [wCoins + 1]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, h
|
ld a, h
|
||||||
and a
|
and a
|
||||||
@ -146,9 +146,9 @@ _CardFlip: ; e00ee (38:40ee)
|
|||||||
ld de, -3
|
ld de, -3
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [Coins], a
|
ld [wCoins], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Coins + 1], a
|
ld [wCoins + 1], a
|
||||||
ld de, SFX_TRANSACTION
|
ld de, SFX_TRANSACTION
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
xor a
|
xor a
|
||||||
@ -535,7 +535,7 @@ CardFlip_PrintCoinBalance: ; e049c
|
|||||||
ld de, .CoinStr
|
ld de, .CoinStr
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 15, 16
|
hlcoord 15, 16
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 4
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 4
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ret
|
ret
|
||||||
@ -1174,29 +1174,29 @@ CardFlip_CheckWinCondition: ; e0637
|
|||||||
; 0xe081b
|
; 0xe081b
|
||||||
|
|
||||||
.AddCoinPlaySFX: ; e081b
|
.AddCoinPlaySFX: ; e081b
|
||||||
ld a, [Coins]
|
ld a, [wCoins]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [Coins + 1]
|
ld a, [wCoins + 1]
|
||||||
ld l, a
|
ld l, a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [Coins], a
|
ld [wCoins], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Coins + 1], a
|
ld [wCoins + 1], a
|
||||||
ld de, SFX_PAY_DAY
|
ld de, SFX_PAY_DAY
|
||||||
call PlaySFX
|
call PlaySFX
|
||||||
ret
|
ret
|
||||||
; e0833
|
; e0833
|
||||||
|
|
||||||
.IsCoinCaseFull: ; e0833
|
.IsCoinCaseFull: ; e0833
|
||||||
ld a, [Coins]
|
ld a, [wCoins]
|
||||||
cp HIGH(MAX_COINS)
|
cp HIGH(MAX_COINS)
|
||||||
jr c, .less
|
jr c, .less
|
||||||
jr z, .check_low
|
jr z, .check_low
|
||||||
jr .more
|
jr .more
|
||||||
|
|
||||||
.check_low
|
.check_low
|
||||||
ld a, [Coins + 1]
|
ld a, [wCoins + 1]
|
||||||
cp LOW(MAX_COINS)
|
cp LOW(MAX_COINS)
|
||||||
jr c, .less
|
jr c, .less
|
||||||
|
|
||||||
|
@ -1029,7 +1029,7 @@ Function81f5e: ; 81f5e
|
|||||||
ld [hl], $ed
|
ld [hl], $ed
|
||||||
ld b, $70
|
ld b, $70
|
||||||
ld c, $5
|
ld c, $5
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld de, wc608 + 10
|
ld de, wc608 + 10
|
||||||
call .asm_81fb7
|
call .asm_81fb7
|
||||||
ld de, wc608 + 11
|
ld de, wc608 + 11
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
InitDecorations: ; 26751 (9:6751)
|
InitDecorations: ; 26751 (9:6751)
|
||||||
ld a, DECO_FEATHERY_BED
|
ld a, DECO_FEATHERY_BED
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ld a, DECO_TOWN_MAP
|
ld a, DECO_TOWN_MAP
|
||||||
ld [Poster], a
|
ld [wDecoPoster], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
_KrisDecorationMenu: ; 0x2675c
|
_KrisDecorationMenu: ; 0x2675c
|
||||||
@ -645,62 +645,62 @@ DecoAction_nothing: ; 26ce3
|
|||||||
; 26ce5
|
; 26ce5
|
||||||
|
|
||||||
DecoAction_setupbed: ; 26ce5
|
DecoAction_setupbed: ; 26ce5
|
||||||
ld hl, Bed
|
ld hl, wDecoBed
|
||||||
jp DecoAction_TrySetItUp
|
jp DecoAction_TrySetItUp
|
||||||
; 26ceb
|
; 26ceb
|
||||||
|
|
||||||
DecoAction_putawaybed: ; 26ceb
|
DecoAction_putawaybed: ; 26ceb
|
||||||
ld hl, Bed
|
ld hl, wDecoBed
|
||||||
jp DecoAction_TryPutItAway
|
jp DecoAction_TryPutItAway
|
||||||
; 26cf1
|
; 26cf1
|
||||||
|
|
||||||
DecoAction_setupcarpet: ; 26cf1
|
DecoAction_setupcarpet: ; 26cf1
|
||||||
ld hl, Carpet
|
ld hl, wDecoCarpet
|
||||||
jp DecoAction_TrySetItUp
|
jp DecoAction_TrySetItUp
|
||||||
; 26cf7
|
; 26cf7
|
||||||
|
|
||||||
DecoAction_putawaycarpet: ; 26cf7
|
DecoAction_putawaycarpet: ; 26cf7
|
||||||
ld hl, Carpet
|
ld hl, wDecoCarpet
|
||||||
jp DecoAction_TryPutItAway
|
jp DecoAction_TryPutItAway
|
||||||
; 26cfd
|
; 26cfd
|
||||||
|
|
||||||
DecoAction_setupplant: ; 26cfd
|
DecoAction_setupplant: ; 26cfd
|
||||||
ld hl, Plant
|
ld hl, wDecoPlant
|
||||||
jp DecoAction_TrySetItUp
|
jp DecoAction_TrySetItUp
|
||||||
; 26d03
|
; 26d03
|
||||||
|
|
||||||
DecoAction_putawayplant: ; 26d03
|
DecoAction_putawayplant: ; 26d03
|
||||||
ld hl, Plant
|
ld hl, wDecoPlant
|
||||||
jp DecoAction_TryPutItAway
|
jp DecoAction_TryPutItAway
|
||||||
; 26d09
|
; 26d09
|
||||||
|
|
||||||
DecoAction_setupposter: ; 26d09
|
DecoAction_setupposter: ; 26d09
|
||||||
ld hl, Poster
|
ld hl, wDecoPoster
|
||||||
jp DecoAction_TrySetItUp
|
jp DecoAction_TrySetItUp
|
||||||
; 26d0f
|
; 26d0f
|
||||||
|
|
||||||
DecoAction_putawayposter: ; 26d0f
|
DecoAction_putawayposter: ; 26d0f
|
||||||
ld hl, Poster
|
ld hl, wDecoPoster
|
||||||
jp DecoAction_TryPutItAway
|
jp DecoAction_TryPutItAway
|
||||||
; 26d15
|
; 26d15
|
||||||
|
|
||||||
DecoAction_setupconsole: ; 26d15
|
DecoAction_setupconsole: ; 26d15
|
||||||
ld hl, Console
|
ld hl, wDecoConsole
|
||||||
jp DecoAction_TrySetItUp
|
jp DecoAction_TrySetItUp
|
||||||
; 26d1b
|
; 26d1b
|
||||||
|
|
||||||
DecoAction_putawayconsole: ; 26d1b
|
DecoAction_putawayconsole: ; 26d1b
|
||||||
ld hl, Console
|
ld hl, wDecoConsole
|
||||||
jp DecoAction_TryPutItAway
|
jp DecoAction_TryPutItAway
|
||||||
; 26d21
|
; 26d21
|
||||||
|
|
||||||
DecoAction_setupbigdoll: ; 26d21
|
DecoAction_setupbigdoll: ; 26d21
|
||||||
ld hl, BigDoll
|
ld hl, wDecoBigDoll
|
||||||
jp DecoAction_TrySetItUp
|
jp DecoAction_TrySetItUp
|
||||||
; 26d27
|
; 26d27
|
||||||
|
|
||||||
DecoAction_putawaybigdoll: ; 26d27
|
DecoAction_putawaybigdoll: ; 26d27
|
||||||
ld hl, BigDoll
|
ld hl, wDecoBigDoll
|
||||||
jp DecoAction_TryPutItAway
|
jp DecoAction_TryPutItAway
|
||||||
; 26d2d
|
; 26d2d
|
||||||
|
|
||||||
@ -935,8 +935,8 @@ DecoAction_AskWhichSide: ; 26e70
|
|||||||
; 26e9a
|
; 26e9a
|
||||||
|
|
||||||
QueryWhichSide: ; 26e9a
|
QueryWhichSide: ; 26e9a
|
||||||
ld hl, RightOrnament
|
ld hl, wDecoRightOrnament
|
||||||
ld de, LeftOrnament
|
ld de, wDecoLeftOrnament
|
||||||
ld a, [Buffer2]
|
ld a, [Buffer2]
|
||||||
cp 1
|
cp 1
|
||||||
ret z
|
ret z
|
||||||
@ -1072,7 +1072,7 @@ DescribeDecoration:: ; 26f59
|
|||||||
; 26f69
|
; 26f69
|
||||||
|
|
||||||
DecorationDesc_Poster: ; 26f69
|
DecorationDesc_Poster: ; 26f69
|
||||||
ld a, [Poster]
|
ld a, [wDecoPoster]
|
||||||
ld hl, DecorationDesc_PosterPointers
|
ld hl, DecorationDesc_PosterPointers
|
||||||
ld de, 3
|
ld de, 3
|
||||||
call IsInArray
|
call IsInArray
|
||||||
@ -1148,15 +1148,15 @@ DecorationDesc_NullPoster: ; 26fb8
|
|||||||
; 26fb9
|
; 26fb9
|
||||||
|
|
||||||
DecorationDesc_LeftOrnament: ; 26fb9
|
DecorationDesc_LeftOrnament: ; 26fb9
|
||||||
ld a, [LeftOrnament]
|
ld a, [wDecoLeftOrnament]
|
||||||
jr DecorationDesc_OrnamentOrConsole
|
jr DecorationDesc_OrnamentOrConsole
|
||||||
|
|
||||||
DecorationDesc_RightOrnament: ; 26fbe
|
DecorationDesc_RightOrnament: ; 26fbe
|
||||||
ld a, [RightOrnament]
|
ld a, [wDecoRightOrnament]
|
||||||
jr DecorationDesc_OrnamentOrConsole
|
jr DecorationDesc_OrnamentOrConsole
|
||||||
|
|
||||||
DecorationDesc_Console: ; 26fc3
|
DecorationDesc_Console: ; 26fc3
|
||||||
ld a, [Console]
|
ld a, [wDecoConsole]
|
||||||
jr DecorationDesc_OrnamentOrConsole
|
jr DecorationDesc_OrnamentOrConsole
|
||||||
|
|
||||||
DecorationDesc_OrnamentOrConsole: ; 26fc8
|
DecorationDesc_OrnamentOrConsole: ; 26fc8
|
||||||
@ -1196,18 +1196,18 @@ DecorationDesc_GiantOrnament: ; 26fdd
|
|||||||
|
|
||||||
Special_ToggleMaptileDecorations: ; 26feb
|
Special_ToggleMaptileDecorations: ; 26feb
|
||||||
lb de, 0, 4
|
lb de, 0, 4
|
||||||
ld a, [Bed]
|
ld a, [wDecoBed]
|
||||||
call SetDecorationTile
|
call SetDecorationTile
|
||||||
lb de, 7, 4
|
lb de, 7, 4
|
||||||
ld a, [Plant]
|
ld a, [wDecoPlant]
|
||||||
call SetDecorationTile
|
call SetDecorationTile
|
||||||
lb de, 6, 0
|
lb de, 6, 0
|
||||||
ld a, [Poster]
|
ld a, [wDecoPoster]
|
||||||
call SetDecorationTile
|
call SetDecorationTile
|
||||||
call SetPosterVisibility
|
call SetPosterVisibility
|
||||||
lb de, 0, 0
|
lb de, 0, 0
|
||||||
call PadCoords_de
|
call PadCoords_de
|
||||||
ld a, [Carpet]
|
ld a, [wDecoCarpet]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
call _GetDecorationSprite
|
call _GetDecorationSprite
|
||||||
@ -1227,7 +1227,7 @@ Special_ToggleMaptileDecorations: ; 26feb
|
|||||||
|
|
||||||
SetPosterVisibility: ; 27027
|
SetPosterVisibility: ; 27027
|
||||||
ld b, SET_FLAG
|
ld b, SET_FLAG
|
||||||
ld a, [Poster]
|
ld a, [wDecoPoster]
|
||||||
and a
|
and a
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ld b, RESET_FLAG
|
ld b, RESET_FLAG
|
||||||
@ -1251,19 +1251,19 @@ SetDecorationTile: ; 27037
|
|||||||
Special_ToggleDecorationsVisibility: ; 27043
|
Special_ToggleDecorationsVisibility: ; 27043
|
||||||
ld de, EVENT_KRISS_HOUSE_2F_CONSOLE
|
ld de, EVENT_KRISS_HOUSE_2F_CONSOLE
|
||||||
ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS
|
ld hl, VariableSprites + SPRITE_CONSOLE - SPRITE_VARS
|
||||||
ld a, [Console]
|
ld a, [wDecoConsole]
|
||||||
call ToggleDecorationVisibility
|
call ToggleDecorationVisibility
|
||||||
ld de, EVENT_KRISS_HOUSE_2F_DOLL_1
|
ld de, EVENT_KRISS_HOUSE_2F_DOLL_1
|
||||||
ld hl, VariableSprites + SPRITE_DOLL_1 - SPRITE_VARS
|
ld hl, VariableSprites + SPRITE_DOLL_1 - SPRITE_VARS
|
||||||
ld a, [LeftOrnament]
|
ld a, [wDecoLeftOrnament]
|
||||||
call ToggleDecorationVisibility
|
call ToggleDecorationVisibility
|
||||||
ld de, EVENT_KRISS_HOUSE_2F_DOLL_2
|
ld de, EVENT_KRISS_HOUSE_2F_DOLL_2
|
||||||
ld hl, VariableSprites + SPRITE_DOLL_2 - SPRITE_VARS
|
ld hl, VariableSprites + SPRITE_DOLL_2 - SPRITE_VARS
|
||||||
ld a, [RightOrnament]
|
ld a, [wDecoRightOrnament]
|
||||||
call ToggleDecorationVisibility
|
call ToggleDecorationVisibility
|
||||||
ld de, EVENT_KRISS_HOUSE_2F_BIG_DOLL
|
ld de, EVENT_KRISS_HOUSE_2F_BIG_DOLL
|
||||||
ld hl, VariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS
|
ld hl, VariableSprites + SPRITE_BIG_DOLL - SPRITE_VARS
|
||||||
ld a, [BigDoll]
|
ld a, [wDecoBigDoll]
|
||||||
call ToggleDecorationVisibility
|
call ToggleDecorationVisibility
|
||||||
ret
|
ret
|
||||||
; 27074
|
; 27074
|
||||||
|
@ -44,7 +44,7 @@ EvolutionAnimation: ; 4e5e1
|
|||||||
call Request2bpp
|
call Request2bpp
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
@ -106,8 +106,8 @@ ResetWRAM: ; 5ba7
|
|||||||
|
|
||||||
_ResetWRAM: ; 5bae
|
_ResetWRAM: ; 5bae
|
||||||
|
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld bc, Options - Sprites
|
ld bc, Options - wVirtualOAM
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
@ -196,8 +196,8 @@ _ResetWRAM: ; 5bae
|
|||||||
ld [wJohtoBadges], a
|
ld [wJohtoBadges], a
|
||||||
ld [wKantoBadges], a
|
ld [wKantoBadges], a
|
||||||
|
|
||||||
ld [Coins], a
|
ld [wCoins], a
|
||||||
ld [Coins + 1], a
|
ld [wCoins + 1], a
|
||||||
|
|
||||||
if START_MONEY >= $10000
|
if START_MONEY >= $10000
|
||||||
ld a, HIGH(START_MONEY >> 8)
|
ld a, HIGH(START_MONEY >> 8)
|
||||||
|
@ -1658,7 +1658,7 @@ RevivePokemon: ; f0d6
|
|||||||
|
|
||||||
.skip_to_revive
|
.skip_to_revive
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
cp REVIVE
|
cp REVIVE
|
||||||
jr z, .revive_half_hp
|
jr z, .revive_half_hp
|
||||||
@ -1701,7 +1701,7 @@ FullRestore: ; f128
|
|||||||
|
|
||||||
.FullRestore: ; f144
|
.FullRestore: ; f144
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
call ReviveFullHP
|
call ReviveFullHP
|
||||||
ld a, MON_STATUS
|
ld a, MON_STATUS
|
||||||
call GetPartyParamLocation
|
call GetPartyParamLocation
|
||||||
@ -1798,7 +1798,7 @@ ItemRestoreHP: ; f1a9 (3:71a9)
|
|||||||
ret nc
|
ret nc
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [Danger], a
|
ld [wLowHealthAlarm], a
|
||||||
call GetHealingItemAmount
|
call GetHealingItemAmount
|
||||||
call RestoreHealth
|
call RestoreHealth
|
||||||
call BattlemonRestoreHealth
|
call BattlemonRestoreHealth
|
||||||
@ -2357,7 +2357,7 @@ PokeFlute: ; f50c
|
|||||||
ld hl, .PlayedTheFlute
|
ld hl, .PlayedTheFlute
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
ld a, [Danger]
|
ld a, [wLowHealthAlarm]
|
||||||
and 1 << DANGER_ON_F
|
and 1 << DANGER_ON_F
|
||||||
jr nz, .dummy2
|
jr nz, .dummy2
|
||||||
.dummy2
|
.dummy2
|
||||||
|
@ -2829,7 +2829,7 @@ _UpdateSprites:: ; 5920
|
|||||||
cp b
|
cp b
|
||||||
ret nc
|
ret nc
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, HIGH(Sprites)
|
ld h, HIGH(wVirtualOAM)
|
||||||
ld de, SPRITEOAMSTRUCT_LENGTH
|
ld de, SPRITEOAMSTRUCT_LENGTH
|
||||||
ld a, b
|
ld a, b
|
||||||
ld c, SCREEN_HEIGHT_PX + 2 * TILE_WIDTH
|
ld c, SCREEN_HEIGHT_PX + 2 * TILE_WIDTH
|
||||||
@ -3043,7 +3043,7 @@ InitSprites: ; 5991
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld a, [hUsedSpriteIndex]
|
ld a, [hUsedSpriteIndex]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, HIGH(Sprites)
|
ld b, HIGH(wVirtualOAM)
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [hUsedSpriteTile], a
|
ld [hUsedSpriteTile], a
|
||||||
add c
|
add c
|
||||||
|
@ -76,7 +76,7 @@ Special_DisplayCoinCaseBalance: ; 24b25
|
|||||||
hlcoord 17, 1
|
hlcoord 17, 1
|
||||||
ld de, ShowMoney_TerminatorString
|
ld de, ShowMoney_TerminatorString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
lb bc, 2, 4
|
lb bc, 2, 4
|
||||||
hlcoord 13, 1
|
hlcoord 13, 1
|
||||||
call PrintNum
|
call PrintNum
|
||||||
@ -98,7 +98,7 @@ Special_DisplayMoneyAndCoinBalance: ; 24b4e
|
|||||||
ld de, CoinString
|
ld de, CoinString
|
||||||
call PlaceString
|
call PlaceString
|
||||||
hlcoord 15, 3
|
hlcoord 15, 3
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
lb bc, 2, 4
|
lb bc, 2, 4
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ret
|
ret
|
||||||
|
@ -171,7 +171,7 @@ AddFunds: ; 16055
|
|||||||
|
|
||||||
GiveCoins:: ; 1606f
|
GiveCoins:: ; 1606f
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
call AddFunds
|
call AddFunds
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld bc, .maxcoins
|
ld bc, .maxcoins
|
||||||
@ -198,7 +198,7 @@ GiveCoins:: ; 1606f
|
|||||||
|
|
||||||
TakeCoins:: ; 1608f
|
TakeCoins:: ; 1608f
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
call SubtractFunds
|
call SubtractFunds
|
||||||
jr nc, .okay
|
jr nc, .okay
|
||||||
; leave with 0 coins
|
; leave with 0 coins
|
||||||
@ -216,6 +216,6 @@ TakeCoins:: ; 1608f
|
|||||||
|
|
||||||
CheckCoins:: ; 160a1
|
CheckCoins:: ; 160a1
|
||||||
ld a, 2
|
ld a, 2
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
jp CompareFunds
|
jp CompareFunds
|
||||||
; 160a9
|
; 160a9
|
||||||
|
@ -2588,8 +2588,8 @@ Pokedex_GetArea: ; 91d11
|
|||||||
|
|
||||||
.copy_sprites
|
.copy_sprites
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld de, Sprites
|
ld de, wVirtualOAM
|
||||||
ld bc, SpritesEnd - Sprites
|
ld bc, SpritesEnd - wVirtualOAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2654,9 +2654,9 @@ Pokedex_GetArea: ; 91d11
|
|||||||
jr .nestloop
|
jr .nestloop
|
||||||
|
|
||||||
.done_nest
|
.done_nest
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
decoord 0, 0
|
decoord 0, 0
|
||||||
ld bc, SpritesEnd - Sprites
|
ld bc, SpritesEnd - wVirtualOAM
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2741,8 +2741,8 @@ Pokedex_GetArea: ; 91d11
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.clear
|
.clear
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld bc, SpritesEnd - Sprites
|
ld bc, SpritesEnd - wVirtualOAM
|
||||||
xor a
|
xor a
|
||||||
call ByteFill
|
call ByteFill
|
||||||
scf
|
scf
|
||||||
|
@ -11,7 +11,7 @@ LoadPushOAM:: ; 4031
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.PushOAM: ; 403f
|
.PushOAM: ; 403f
|
||||||
ld a, HIGH(Sprites)
|
ld a, HIGH(wVirtualOAM)
|
||||||
ld [rDMA], a
|
ld [rDMA], a
|
||||||
ld a, NUM_SPRITE_OAM_STRUCTS
|
ld a, NUM_SPRITE_OAM_STRUCTS
|
||||||
.pushoam_loop
|
.pushoam_loop
|
||||||
|
@ -1993,7 +1993,7 @@ Script_readcoins:
|
|||||||
|
|
||||||
call ResetStringBuffer1
|
call ResetStringBuffer1
|
||||||
ld hl, StringBuffer1
|
ld hl, StringBuffer1
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_RIGHTALIGN | 2, 6
|
lb bc, PRINTNUM_RIGHTALIGN | 2, 6
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld de, StringBuffer1
|
ld de, StringBuffer1
|
||||||
|
@ -223,7 +223,7 @@ SlotsLoop: ; 927af (24:67af)
|
|||||||
|
|
||||||
.PrintCoinsAndPayout: ; 927f8 (24:67f8)
|
.PrintCoinsAndPayout: ; 927f8 (24:67f8)
|
||||||
hlcoord 5, 1
|
hlcoord 5, 1
|
||||||
ld de, Coins
|
ld de, wCoins
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 4
|
lb bc, PRINTNUM_LEADINGZEROS | 2, 4
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 11, 1
|
hlcoord 11, 1
|
||||||
@ -480,7 +480,7 @@ SlotsAction_PayoutAnim: ; 929a4 (24:69a4)
|
|||||||
ld [hl], e
|
ld [hl], e
|
||||||
dec hl
|
dec hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld hl, Coins
|
ld hl, wCoins
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
@ -1819,7 +1819,7 @@ Slots_AskBet: ; 9307c (24:707c)
|
|||||||
ld a, 4
|
ld a, 4
|
||||||
sub b
|
sub b
|
||||||
ld [wSlotBet], a
|
ld [wSlotBet], a
|
||||||
ld hl, Coins
|
ld hl, wCoins
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
@ -1832,7 +1832,7 @@ Slots_AskBet: ; 9307c (24:707c)
|
|||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.Start:
|
.Start:
|
||||||
ld hl, Coins + 1
|
ld hl, wCoins + 1
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sub c
|
sub c
|
||||||
ld [hld], a
|
ld [hld], a
|
||||||
@ -1883,7 +1883,7 @@ Slots_AskBet: ; 9307c (24:707c)
|
|||||||
; 0x930e9
|
; 0x930e9
|
||||||
|
|
||||||
Slots_AskPlayAgain: ; 930e9 (24:70e9)
|
Slots_AskPlayAgain: ; 930e9 (24:70e9)
|
||||||
ld hl, Coins
|
ld hl, wCoins
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
jr nz, .you_have_coins
|
jr nz, .you_have_coins
|
||||||
|
@ -253,7 +253,7 @@ Special_StartGameCornerGame: ; c39a
|
|||||||
; c3ae
|
; c3ae
|
||||||
|
|
||||||
Special_CheckCoins: ; c3ae
|
Special_CheckCoins: ; c3ae
|
||||||
ld hl, Coins
|
ld hl, wCoins
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
or [hl]
|
or [hl]
|
||||||
jr z, .no_coins
|
jr z, .no_coins
|
||||||
|
@ -23,7 +23,7 @@ PlaySpriteAnimations: ; 8cf69
|
|||||||
push bc
|
push bc
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, LOW(Sprites)
|
ld a, LOW(wVirtualOAM)
|
||||||
ld [wCurrSpriteOAMAddr], a
|
ld [wCurrSpriteOAMAddr], a
|
||||||
call DoNextFrameForAllSprites
|
call DoNextFrameForAllSprites
|
||||||
|
|
||||||
@ -60,9 +60,9 @@ DoNextFrameForAllSprites: ; 8cf7a
|
|||||||
|
|
||||||
ld a, [wCurrSpriteOAMAddr]
|
ld a, [wCurrSpriteOAMAddr]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld h, HIGH(Sprites)
|
ld h, HIGH(wVirtualOAM)
|
||||||
|
|
||||||
.loop2 ; Clear (Sprites + [wCurrSpriteOAMAddr] --> SpritesEnd)
|
.loop2 ; Clear (wVirtualOAM + [wCurrSpriteOAMAddr] --> SpritesEnd)
|
||||||
ld a, l
|
ld a, l
|
||||||
cp LOW(SpritesEnd)
|
cp LOW(SpritesEnd)
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
@ -102,7 +102,7 @@ DoNextFrameForFirst16Sprites: ; 8cfa8 (23:4fa8)
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld h, HIGH(Sprite17)
|
ld h, HIGH(Sprite17)
|
||||||
|
|
||||||
.loop2 ; Clear (Sprites + [wCurrSpriteOAMAddr] --> Sprites + $40)
|
.loop2 ; Clear (wVirtualOAM + [wCurrSpriteOAMAddr] --> Sprites + $40)
|
||||||
ld a, l
|
ld a, l
|
||||||
cp LOW(Sprite17)
|
cp LOW(Sprite17)
|
||||||
jr nc, .done
|
jr nc, .done
|
||||||
@ -253,7 +253,7 @@ UpdateAnimFrame: ; 8d04c
|
|||||||
push bc
|
push bc
|
||||||
ld a, [wCurrSpriteOAMAddr]
|
ld a, [wCurrSpriteOAMAddr]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, HIGH(Sprites)
|
ld d, HIGH(wVirtualOAM)
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld c, a ; number of objects
|
ld c, a ; number of objects
|
||||||
.loop
|
.loop
|
||||||
|
@ -89,7 +89,7 @@ _GetVarAction:: ; 80648 (20:4648)
|
|||||||
|
|
||||||
.CountBadges: ; 806e1
|
.CountBadges: ; 806e1
|
||||||
; Number of owned badges.
|
; Number of owned badges.
|
||||||
ld hl, Badges
|
ld hl, wBadges
|
||||||
ld b, 2
|
ld b, 2
|
||||||
call CountSetBits
|
call CountSetBits
|
||||||
ld a, [wd265]
|
ld a, [wd265]
|
||||||
|
4
home.asm
4
home.asm
@ -169,8 +169,8 @@ INCLUDE "home/double_speed.asm"
|
|||||||
|
|
||||||
ClearSprites:: ; 300b
|
ClearSprites:: ; 300b
|
||||||
; Erase OAM data
|
; Erase OAM data
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld b, SpritesEnd - Sprites
|
ld b, SpritesEnd - wVirtualOAM
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
|
@ -296,19 +296,19 @@ IsSFXPlaying:: ; 3c74
|
|||||||
|
|
||||||
MaxVolume:: ; 3c97
|
MaxVolume:: ; 3c97
|
||||||
ld a, MAX_VOLUME
|
ld a, MAX_VOLUME
|
||||||
ld [Volume], a
|
ld [wVolume], a
|
||||||
ret
|
ret
|
||||||
; 3c9d
|
; 3c9d
|
||||||
|
|
||||||
LowVolume:: ; 3c9d
|
LowVolume:: ; 3c9d
|
||||||
ld a, $33 ; 40%
|
ld a, $33 ; 40%
|
||||||
ld [Volume], a
|
ld [wVolume], a
|
||||||
ret
|
ret
|
||||||
; 3ca3
|
; 3ca3
|
||||||
|
|
||||||
VolumeOff:: ; 3ca3
|
VolumeOff:: ; 3ca3
|
||||||
xor a
|
xor a
|
||||||
ld [Volume], a
|
ld [wVolume], a
|
||||||
ret
|
ret
|
||||||
; 3ca8
|
; 3ca8
|
||||||
|
|
||||||
|
@ -129,7 +129,7 @@ map_connection_struct: MACRO
|
|||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
channel_struct: MACRO
|
channel_struct: MACRO
|
||||||
; Addreses are Channel1 (c101).
|
; Addreses are wChannel1 (c101).
|
||||||
\1MusicID:: dw
|
\1MusicID:: dw
|
||||||
\1MusicBank:: db
|
\1MusicBank:: db
|
||||||
\1Flags:: db ; 0:on/off 1:subroutine 3:sfx 4:noise 5:rest
|
\1Flags:: db ; 0:on/off 1:subroutine 3:sfx 4:noise 5:rest
|
||||||
|
@ -40,7 +40,7 @@ Doll1:
|
|||||||
Doll2:
|
Doll2:
|
||||||
describedecoration DECODESC_RIGHT_DOLL
|
describedecoration DECODESC_RIGHT_DOLL
|
||||||
|
|
||||||
BigDoll:
|
wDecoBigDoll:
|
||||||
describedecoration DECODESC_BIG_DOLL
|
describedecoration DECODESC_BIG_DOLL
|
||||||
|
|
||||||
GameConsole:
|
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, 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 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 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
|
||||||
|
@ -568,9 +568,9 @@ Function8942b: ; 8942b (22:542b)
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
Function89448: ; 89448 (22:5448)
|
Function89448: ; 89448 (22:5448)
|
||||||
; Clears the Sprites array
|
; Clears the sprite array
|
||||||
push af
|
push af
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld d, 24 * SPRITEOAMSTRUCT_LENGTH
|
ld d, 24 * SPRITEOAMSTRUCT_LENGTH
|
||||||
xor a
|
xor a
|
||||||
.loop
|
.loop
|
||||||
@ -2550,7 +2550,7 @@ Function89f77: ; 89f77 (22:5f77)
|
|||||||
|
|
||||||
Function89f9a: ; 89f9a (22:5f9a)
|
Function89f9a: ; 89f9a (22:5f9a)
|
||||||
dec a
|
dec a
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
.asm_89fa0
|
.asm_89fa0
|
||||||
@ -3293,7 +3293,7 @@ asm_8a529: ; 8a529 (22:6529)
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
xor a
|
xor a
|
||||||
ld bc, 8 * SPRITEOAMSTRUCT_LENGTH
|
ld bc, 8 * SPRITEOAMSTRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
@ -1646,7 +1646,7 @@ _LinkBattleSendReceiveAction: ; 100a09
|
|||||||
; 100a2e
|
; 100a2e
|
||||||
|
|
||||||
.StageForSend: ; 100a2e
|
.StageForSend: ; 100a2e
|
||||||
ld a, [wPlayerAction]
|
ld a, [wBattlePlayerAction]
|
||||||
and a
|
and a
|
||||||
jr nz, .switch
|
jr nz, .switch
|
||||||
ld a, [CurPlayerMove]
|
ld a, [CurPlayerMove]
|
||||||
@ -7143,7 +7143,7 @@ Function10306e: ; 10306e
|
|||||||
ld a, $01
|
ld a, $01
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
ld de, Sprites
|
ld de, wVirtualOAM
|
||||||
call Function1030cd
|
call Function1030cd
|
||||||
xor a
|
xor a
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
|
@ -650,7 +650,7 @@ Function1144d1: ; 1144d1
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
xor a
|
xor a
|
||||||
ld [BigDoll], a
|
ld [wDecoBigDoll], a
|
||||||
ld [$dc17], a
|
ld [$dc17], a
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [$dc0e], a
|
ld [$dc0e], a
|
||||||
@ -691,7 +691,7 @@ Function1144d1: ; 1144d1
|
|||||||
ld a, [$dc0d]
|
ld a, [$dc0d]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, [BigDoll]
|
ld a, [wDecoBigDoll]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_114537
|
jr z, .asm_114537
|
||||||
ld b, $1
|
ld b, $1
|
||||||
@ -753,7 +753,7 @@ Function114561: ; 114561
|
|||||||
|
|
||||||
Function114576: ; 114576
|
Function114576: ; 114576
|
||||||
xor a
|
xor a
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ld b, $7
|
ld b, $7
|
||||||
call Function1143f3
|
call Function1143f3
|
||||||
cp $2
|
cp $2
|
||||||
@ -802,7 +802,7 @@ Function114576: ; 114576
|
|||||||
|
|
||||||
.asm_1145bf
|
.asm_1145bf
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
; 1145c5
|
; 1145c5
|
||||||
@ -924,7 +924,7 @@ Function11463c: ; 11463c
|
|||||||
cp $d
|
cp $d
|
||||||
jr nz, .asm_11468a
|
jr nz, .asm_11468a
|
||||||
xor a
|
xor a
|
||||||
ld [Carpet], a
|
ld [wDecoCarpet], a
|
||||||
.asm_114662
|
.asm_114662
|
||||||
inc e
|
inc e
|
||||||
call z, Function11469b
|
call z, Function11469b
|
||||||
@ -947,7 +947,7 @@ Function11463c: ; 11463c
|
|||||||
inc e
|
inc e
|
||||||
call z, Function11469b
|
call z, Function11469b
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [Carpet], a
|
ld [wDecoCarpet], a
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp $d
|
cp $d
|
||||||
jr z, .asm_114662
|
jr z, .asm_114662
|
||||||
@ -959,7 +959,7 @@ Function11463c: ; 11463c
|
|||||||
ld [hFF8C], a
|
ld [hFF8C], a
|
||||||
ld [MBC3SRamBank], a
|
ld [MBC3SRamBank], a
|
||||||
xor a
|
xor a
|
||||||
ld [Carpet], a
|
ld [wDecoCarpet], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1021,7 +1021,7 @@ Function1146a4: ; 1146a4
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_1146f5
|
jr z, .asm_1146f5
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [BigDoll], a
|
ld [wDecoBigDoll], a
|
||||||
jr .asm_1146da
|
jr .asm_1146da
|
||||||
|
|
||||||
.asm_1146f5
|
.asm_1146f5
|
||||||
@ -1057,7 +1057,7 @@ Function1146fa: ; 1146fa
|
|||||||
ld [hFF8C], a
|
ld [hFF8C], a
|
||||||
ld [MBC3SRamBank], a
|
ld [MBC3SRamBank], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [RightOrnament], a
|
ld [wDecoRightOrnament], a
|
||||||
call Function1147cd
|
call Function1147cd
|
||||||
and a
|
and a
|
||||||
jp nz, .asm_1147b7
|
jp nz, .asm_1147b7
|
||||||
@ -1069,13 +1069,13 @@ Function1146fa: ; 1146fa
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_114794
|
jr z, .asm_114794
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [BigDoll], a
|
ld [wDecoBigDoll], a
|
||||||
|
|
||||||
.asm_114749
|
.asm_114749
|
||||||
call Function11494d
|
call Function11494d
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_11478a
|
jr nz, .asm_11478a
|
||||||
ld a, [BigDoll]
|
ld a, [wDecoBigDoll]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_114786
|
jr nz, .asm_114786
|
||||||
ld hl, $dc03
|
ld hl, $dc03
|
||||||
@ -1102,7 +1102,7 @@ Function1146fa: ; 1146fa
|
|||||||
ld a, [$dc0d]
|
ld a, [$dc0d]
|
||||||
inc a
|
inc a
|
||||||
ld [$dc0d], a
|
ld [$dc0d], a
|
||||||
ld a, [BigDoll]
|
ld a, [wDecoBigDoll]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_114799
|
jr z, .asm_114799
|
||||||
|
|
||||||
@ -1127,7 +1127,7 @@ Function1146fa: ; 1146fa
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_114799
|
.asm_114799
|
||||||
ld a, [Carpet]
|
ld a, [wDecoCarpet]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_114737
|
jr z, .asm_114737
|
||||||
jr .asm_1147cb
|
jr .asm_1147cb
|
||||||
@ -1141,14 +1141,14 @@ Function1146fa: ; 1146fa
|
|||||||
and a
|
and a
|
||||||
jr z, .asm_1147cb
|
jr z, .asm_1147cb
|
||||||
xor a
|
xor a
|
||||||
ld [BigDoll], a
|
ld [wDecoBigDoll], a
|
||||||
|
|
||||||
.asm_1147b7
|
.asm_1147b7
|
||||||
ld a, [$dc17]
|
ld a, [$dc17]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_114794
|
jr z, .asm_114794
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [BigDoll], a
|
ld [wDecoBigDoll], a
|
||||||
ld a, [$dc0d]
|
ld a, [$dc0d]
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .asm_114773
|
jr nz, .asm_114773
|
||||||
@ -1162,7 +1162,7 @@ Function1146fa: ; 1146fa
|
|||||||
|
|
||||||
Function1147cd: ; 1147cd
|
Function1147cd: ; 1147cd
|
||||||
ld bc, NULL
|
ld bc, NULL
|
||||||
ld a, [RightOrnament]
|
ld a, [wDecoRightOrnament]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_11480c
|
jr nz, .asm_11480c
|
||||||
.asm_1147d6
|
.asm_1147d6
|
||||||
@ -1364,7 +1364,7 @@ Function1148c2: ; 1148c2
|
|||||||
call z, Function114944
|
call z, Function114944
|
||||||
cp $3
|
cp $3
|
||||||
jr nz, .asm_114904
|
jr nz, .asm_114904
|
||||||
ld hl, Plant
|
ld hl, wDecoPlant
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc e
|
inc e
|
||||||
@ -1458,7 +1458,7 @@ Function11494d: ; 11494d
|
|||||||
call z, Function1149c3
|
call z, Function1149c3
|
||||||
cp $3
|
cp $3
|
||||||
jr nz, .asm_114983
|
jr nz, .asm_114983
|
||||||
ld hl, Plant
|
ld hl, wDecoPlant
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc e
|
inc e
|
||||||
@ -1810,7 +1810,7 @@ Function114acf: ; 114acf
|
|||||||
call z, Function114b4c
|
call z, Function114b4c
|
||||||
|
|
||||||
.asm_114b26
|
.asm_114b26
|
||||||
ld hl, Plant
|
ld hl, wDecoPlant
|
||||||
ld a, [$dc00]
|
ld a, [$dc00]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
@ -2703,7 +2703,7 @@ Function114f59: ; 114f59
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_114fa7
|
.asm_114fa7
|
||||||
ld hl, Bed
|
ld hl, wDecoBed
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -2842,7 +2842,7 @@ Function115059: ; 115059
|
|||||||
; 115062
|
; 115062
|
||||||
|
|
||||||
Function115062: ; 115062
|
Function115062: ; 115062
|
||||||
ld hl, Bed
|
ld hl, wDecoBed
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_1150ae
|
jr z, .asm_1150ae
|
||||||
@ -2948,9 +2948,9 @@ Function1150b3: ; 1150b3
|
|||||||
|
|
||||||
.asm_1150f8
|
.asm_1150f8
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Console], a
|
ld [wDecoConsole], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [LeftOrnament], a
|
ld [wDecoLeftOrnament], a
|
||||||
ld hl, String_114232
|
ld hl, String_114232
|
||||||
.asm_115103
|
.asm_115103
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -2987,9 +2987,9 @@ Function1150b3: ; 1150b3
|
|||||||
ld a, $3d
|
ld a, $3d
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld a, [Console]
|
ld a, [wDecoConsole]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [LeftOrnament]
|
ld a, [wDecoLeftOrnament]
|
||||||
ld h, a
|
ld h, a
|
||||||
jr .asm_1150bb
|
jr .asm_1150bb
|
||||||
|
|
||||||
@ -3275,7 +3275,7 @@ Function115286: ; 115286
|
|||||||
; 11528f
|
; 11528f
|
||||||
|
|
||||||
Function11528f: ; 11528f
|
Function11528f: ; 11528f
|
||||||
ld hl, Bed
|
ld hl, wDecoBed
|
||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -3458,7 +3458,7 @@ Function11537d: ; 11537d
|
|||||||
ld a, b
|
ld a, b
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
ld hl, RightOrnament
|
ld hl, wDecoRightOrnament
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
@ -3502,7 +3502,7 @@ Function1153b5: ; 1153b5
|
|||||||
ld [hl], a
|
ld [hl], a
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
inc de
|
inc de
|
||||||
ld hl, $dc0d
|
ld hl, $dc0d
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
@ -3522,9 +3522,9 @@ Function1153d2: ; 1153d2
|
|||||||
ld [$dc03], a
|
ld [$dc03], a
|
||||||
ld [$dc04], a
|
ld [$dc04], a
|
||||||
ld a, $24
|
ld a, $24
|
||||||
ld [Console], a
|
ld [wDecoConsole], a
|
||||||
ld a, $dc
|
ld a, $dc
|
||||||
ld [LeftOrnament], a
|
ld [wDecoLeftOrnament], a
|
||||||
push bc
|
push bc
|
||||||
jr .asm_1153f4
|
jr .asm_1153f4
|
||||||
|
|
||||||
@ -3548,9 +3548,9 @@ Function1153d2: ; 1153d2
|
|||||||
ld c, [hl]
|
ld c, [hl]
|
||||||
inc hl
|
inc hl
|
||||||
push hl
|
push hl
|
||||||
ld a, [Console]
|
ld a, [wDecoConsole]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [LeftOrnament]
|
ld a, [wDecoLeftOrnament]
|
||||||
ld h, a
|
ld h, a
|
||||||
push bc
|
push bc
|
||||||
ld b, $0
|
ld b, $0
|
||||||
@ -3560,10 +3560,10 @@ Function1153d2: ; 1153d2
|
|||||||
pop bc
|
pop bc
|
||||||
ld a, l
|
ld a, l
|
||||||
ld e, a
|
ld e, a
|
||||||
ld [Console], a
|
ld [wDecoConsole], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld d, a
|
ld d, a
|
||||||
ld [LeftOrnament], a
|
ld [wDecoLeftOrnament], a
|
||||||
dec b
|
dec b
|
||||||
jr z, .asm_11542b
|
jr z, .asm_11542b
|
||||||
pop hl
|
pop hl
|
||||||
@ -3582,9 +3582,9 @@ Function1153d2: ; 1153d2
|
|||||||
|
|
||||||
.asm_115430
|
.asm_115430
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Console], a
|
ld [wDecoConsole], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [LeftOrnament], a
|
ld [wDecoLeftOrnament], a
|
||||||
xor a
|
xor a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, $dc24
|
ld hl, $dc24
|
||||||
@ -3670,7 +3670,7 @@ Function1153d2: ; 1153d2
|
|||||||
inc de
|
inc de
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld hl, RightOrnament
|
ld hl, wDecoRightOrnament
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wCurrMapBGEventCount], a
|
ld [wCurrMapBGEventCount], a
|
||||||
ld [hFF8C], a
|
ld [hFF8C], a
|
||||||
@ -3680,15 +3680,15 @@ Function1153d2: ; 1153d2
|
|||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
ld hl, $ddc8
|
ld hl, $ddc8
|
||||||
call Function115d6a
|
call Function115d6a
|
||||||
ld hl, RightOrnament
|
ld hl, wDecoRightOrnament
|
||||||
ld a, [wCurrMapBGEventCount]
|
ld a, [wCurrMapBGEventCount]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
ld a, [Console]
|
ld a, [wDecoConsole]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [LeftOrnament]
|
ld a, [wDecoLeftOrnament]
|
||||||
ld d, a
|
ld d, a
|
||||||
pop hl
|
pop hl
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -3708,9 +3708,9 @@ Function1154d4: ; 1154d4
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_11552c
|
jr nz, .asm_11552c
|
||||||
call Function1155d1
|
call Function1155d1
|
||||||
ld a, [RightOrnament]
|
ld a, [wDecoRightOrnament]
|
||||||
dec a
|
dec a
|
||||||
ld [RightOrnament], a
|
ld [wDecoRightOrnament], a
|
||||||
and a
|
and a
|
||||||
jp z, .asm_115577
|
jp z, .asm_115577
|
||||||
cp $1
|
cp $1
|
||||||
@ -3718,7 +3718,7 @@ Function1154d4: ; 1154d4
|
|||||||
xor a
|
xor a
|
||||||
ld [wDailyResetTimer], a
|
ld [wDailyResetTimer], a
|
||||||
.asm_1154f7
|
.asm_1154f7
|
||||||
ld a, [BigDoll]
|
ld a, [wDecoBigDoll]
|
||||||
cp $2
|
cp $2
|
||||||
jr z, .asm_115502
|
jr z, .asm_115502
|
||||||
cp $3
|
cp $3
|
||||||
@ -3822,9 +3822,9 @@ Function1154d4: ; 1154d4
|
|||||||
jp Function11425c
|
jp Function11425c
|
||||||
|
|
||||||
.asm_1155a0
|
.asm_1155a0
|
||||||
ld a, [RightOrnament]
|
ld a, [wDecoRightOrnament]
|
||||||
dec a
|
dec a
|
||||||
ld [RightOrnament], a
|
ld [wDecoRightOrnament], a
|
||||||
and a
|
and a
|
||||||
jr z, .asm_115560
|
jr z, .asm_115560
|
||||||
call Function1155d1
|
call Function1155d1
|
||||||
@ -3854,7 +3854,7 @@ Function1155af: ; 1155af
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [RightOrnament], a
|
ld [wDecoRightOrnament], a
|
||||||
inc de
|
inc de
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -3870,10 +3870,10 @@ Function1155d1: ; 1155d1
|
|||||||
ld a, [$dc0e]
|
ld a, [$dc0e]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [BigDoll], a
|
ld [wDecoBigDoll], a
|
||||||
cp $3
|
cp $3
|
||||||
jr nz, .asm_1155f0
|
jr nz, .asm_1155f0
|
||||||
ld de, Carpet
|
ld de, wDecoCarpet
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
@ -3883,7 +3883,7 @@ Function1155d1: ; 1155d1
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
|
|
||||||
.asm_1155f0
|
.asm_1155f0
|
||||||
ld de, $dc17
|
ld de, $dc17
|
||||||
@ -4056,9 +4056,9 @@ Function1156cc: ; 1156cc
|
|||||||
call Function115732
|
call Function115732
|
||||||
call Function11575c
|
call Function11575c
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [Poster], a
|
ld [wDecoPoster], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Plant], a
|
ld [wDecoPlant], a
|
||||||
|
|
||||||
.asm_1156fa
|
.asm_1156fa
|
||||||
call Function1157d0
|
call Function1157d0
|
||||||
@ -4070,9 +4070,9 @@ Function1156cc: ; 1156cc
|
|||||||
ld a, [wStartDay]
|
ld a, [wStartDay]
|
||||||
cp $5
|
cp $5
|
||||||
jr z, .asm_115716
|
jr z, .asm_115716
|
||||||
ld a, [Poster]
|
ld a, [wDecoPoster]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [Plant]
|
ld a, [wDecoPlant]
|
||||||
ld l, a
|
ld l, a
|
||||||
xor a
|
xor a
|
||||||
jp Function11425c
|
jp Function11425c
|
||||||
@ -4240,7 +4240,7 @@ Function1157d0: ; 1157d0
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld a, [$dc0e]
|
ld a, [$dc0e]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [Bed]
|
ld a, [wDecoBed]
|
||||||
ld b, a
|
ld b, a
|
||||||
cp h
|
cp h
|
||||||
jr c, .asm_1157eb
|
jr c, .asm_1157eb
|
||||||
@ -4275,7 +4275,7 @@ Function1157d0: ; 1157d0
|
|||||||
ld a, c
|
ld a, c
|
||||||
ld [$dc0e], a
|
ld [$dc0e], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wStartDay], a
|
ld [wStartDay], a
|
||||||
ret
|
ret
|
||||||
@ -4285,7 +4285,7 @@ Function1157d0: ; 1157d0
|
|||||||
ld a, c
|
ld a, c
|
||||||
ld [$dc0e], a
|
ld [$dc0e], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wStartDay], a
|
ld [wStartDay], a
|
||||||
ret
|
ret
|
||||||
@ -4298,7 +4298,7 @@ Function11581e: ; 11581e
|
|||||||
ret z
|
ret z
|
||||||
ld a, [$dc0e]
|
ld a, [$dc0e]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [Bed]
|
ld a, [wDecoBed]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld hl, $dc02
|
ld hl, $dc02
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -4659,9 +4659,9 @@ Function1159fb: ; 1159fb
|
|||||||
call Function115732
|
call Function115732
|
||||||
call Function115a5f
|
call Function115a5f
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [Plant], a
|
ld [wDecoPlant], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [Poster], a
|
ld [wDecoPoster], a
|
||||||
|
|
||||||
.asm_115a29
|
.asm_115a29
|
||||||
call Function115ab0
|
call Function115ab0
|
||||||
@ -4673,9 +4673,9 @@ Function1159fb: ; 1159fb
|
|||||||
ld a, [wStartDay]
|
ld a, [wStartDay]
|
||||||
cp $5
|
cp $5
|
||||||
jr z, .asm_115a45
|
jr z, .asm_115a45
|
||||||
ld a, [Poster]
|
ld a, [wDecoPoster]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [Plant]
|
ld a, [wDecoPlant]
|
||||||
ld l, a
|
ld l, a
|
||||||
xor a
|
xor a
|
||||||
jp Function11425c
|
jp Function11425c
|
||||||
@ -4771,7 +4771,7 @@ Function115ab0: ; 115ab0
|
|||||||
ld l, a
|
ld l, a
|
||||||
ld a, [$dc0e]
|
ld a, [$dc0e]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [Bed]
|
ld a, [wDecoBed]
|
||||||
ld b, a
|
ld b, a
|
||||||
cp h
|
cp h
|
||||||
jr c, .asm_115acb
|
jr c, .asm_115acb
|
||||||
@ -4806,7 +4806,7 @@ Function115ab0: ; 115ab0
|
|||||||
ld a, c
|
ld a, c
|
||||||
ld [$dc0e], a
|
ld [$dc0e], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wStartDay], a
|
ld [wStartDay], a
|
||||||
xor a
|
xor a
|
||||||
@ -4817,7 +4817,7 @@ Function115ab0: ; 115ab0
|
|||||||
ld a, c
|
ld a, c
|
||||||
ld [$dc0e], a
|
ld [$dc0e], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [Bed], a
|
ld [wDecoBed], a
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wStartDay], a
|
ld [wStartDay], a
|
||||||
xor a
|
xor a
|
||||||
@ -4831,7 +4831,7 @@ Function115b00: ; 115b00
|
|||||||
ret z
|
ret z
|
||||||
ld a, [$dc0e]
|
ld a, [$dc0e]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [Bed]
|
ld a, [wDecoBed]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld hl, $dc02
|
ld hl, $dc02
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -4870,7 +4870,7 @@ Function115b00: ; 115b00
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_115b43
|
.asm_115b43
|
||||||
ld a, [Carpet]
|
ld a, [wDecoCarpet]
|
||||||
add a
|
add a
|
||||||
cpl
|
cpl
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -4961,7 +4961,7 @@ Function115b00: ; 115b00
|
|||||||
|
|
||||||
Function115bc8: ; 115bc8
|
Function115bc8: ; 115bc8
|
||||||
xor a
|
xor a
|
||||||
ld [Carpet], a
|
ld [wDecoCarpet], a
|
||||||
.asm_115bcc
|
.asm_115bcc
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
@ -5009,9 +5009,9 @@ Function115bc8: ; 115bc8
|
|||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
jr z, .asm_115c46
|
jr z, .asm_115c46
|
||||||
ld a, [Carpet]
|
ld a, [wDecoCarpet]
|
||||||
inc a
|
inc a
|
||||||
ld [Carpet], a
|
ld [wDecoCarpet], a
|
||||||
dec bc
|
dec bc
|
||||||
ld a, b
|
ld a, b
|
||||||
or c
|
or c
|
||||||
|
@ -360,7 +360,7 @@ Function11619d: ; 11619d
|
|||||||
cp $2
|
cp $2
|
||||||
jr c, .asm_1161b4
|
jr c, .asm_1161b4
|
||||||
ld a, $a0
|
ld a, $a0
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld bc, 25 * SPRITEOAMSTRUCT_LENGTH
|
ld bc, 25 * SPRITEOAMSTRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
|
|
||||||
@ -667,7 +667,7 @@ Function11636e: ; 11636e
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, $a0
|
ld a, $a0
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
|
ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ld a, $90
|
ld a, $90
|
||||||
@ -695,7 +695,7 @@ Function1163c0: ; 1163c0
|
|||||||
ld a, $1
|
ld a, $1
|
||||||
ld [rSVBK], a
|
ld [rSVBK], a
|
||||||
ld a, $a0
|
ld a, $a0
|
||||||
ld hl, Sprites
|
ld hl, wVirtualOAM
|
||||||
ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
|
ld bc, 16 * SPRITEOAMSTRUCT_LENGTH
|
||||||
call ByteFill
|
call ByteFill
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
@ -564,7 +564,7 @@ Function16cb2e: ; 16cb2e
|
|||||||
ret z
|
ret z
|
||||||
call Function16cb40
|
call Function16cb40
|
||||||
ld hl, Unknown_16cb86
|
ld hl, Unknown_16cb86
|
||||||
ld de, Sprites
|
ld de, wVirtualOAM
|
||||||
call Function16cb5d
|
call Function16cb5d
|
||||||
ret
|
ret
|
||||||
; 16cb40
|
; 16cb40
|
||||||
|
@ -517,7 +517,7 @@ String_17a9b2: ; 17a9b2
|
|||||||
; 17a9cb
|
; 17a9cb
|
||||||
|
|
||||||
Function17a9cb: ; 17a9cb (5e:69cb)
|
Function17a9cb: ; 17a9cb (5e:69cb)
|
||||||
ld de, Sprites ; $c400
|
ld de, wVirtualOAM ; $c400
|
||||||
ld hl, $d088
|
ld hl, $d088
|
||||||
bit 6, [hl]
|
bit 6, [hl]
|
||||||
jr nz, .bit_6_set
|
jr nz, .bit_6_set
|
||||||
|
52
wram.asm
52
wram.asm
@ -22,16 +22,16 @@ wMusic::
|
|||||||
MusicPlaying:: db ; c100
|
MusicPlaying:: db ; c100
|
||||||
|
|
||||||
Channels::
|
Channels::
|
||||||
Channel1:: channel_struct Channel1 ; c101
|
wChannel1:: channel_struct Channel1 ; c101
|
||||||
Channel2:: channel_struct Channel2 ; c133
|
wChannel2:: channel_struct Channel2 ; c133
|
||||||
Channel3:: channel_struct Channel3 ; c165
|
wChannel3:: channel_struct Channel3 ; c165
|
||||||
Channel4:: channel_struct Channel4 ; c197
|
wChannel4:: channel_struct Channel4 ; c197
|
||||||
|
|
||||||
SFXChannels::
|
SFXChannels::
|
||||||
Channel5:: channel_struct Channel5 ; c1c9
|
wChannel5:: channel_struct Channel5 ; c1c9
|
||||||
Channel6:: channel_struct Channel6 ; c1fb
|
wChannel6:: channel_struct Channel6 ; c1fb
|
||||||
Channel7:: channel_struct Channel7 ; c22d
|
wChannel7:: channel_struct Channel7 ; c22d
|
||||||
Channel8:: channel_struct Channel8 ; c25f
|
wChannel8:: channel_struct Channel8 ; c25f
|
||||||
|
|
||||||
ds 1 ; c291
|
ds 1 ; c291
|
||||||
|
|
||||||
@ -43,7 +43,7 @@ wCurNoteDuration:: db ; used in MusicE0 and LoadNote
|
|||||||
|
|
||||||
CurMusicByte:: db ; c298
|
CurMusicByte:: db ; c298
|
||||||
CurChannel:: db ; c299
|
CurChannel:: db ; c299
|
||||||
Volume:: ; c29a
|
wVolume:: ; c29a
|
||||||
; corresponds to $ff24
|
; corresponds to $ff24
|
||||||
; Channel control / ON-OFF / Volume (R/W)
|
; Channel control / ON-OFF / Volume (R/W)
|
||||||
; bit 7 - Vin->SO2 ON/OFF
|
; bit 7 - Vin->SO2 ON/OFF
|
||||||
@ -73,7 +73,7 @@ wNoiseSampleDelay:: db ; c2a2
|
|||||||
MusicNoiseSampleSet:: db ; c2a4
|
MusicNoiseSampleSet:: db ; c2a4
|
||||||
SFXNoiseSampleSet:: db ; c2a5
|
SFXNoiseSampleSet:: db ; c2a5
|
||||||
|
|
||||||
Danger:: ; c2a6
|
wLowHealthAlarm:: ; c2a6
|
||||||
; bit 7: on/off
|
; bit 7: on/off
|
||||||
; bit 4: pitch
|
; bit 4: pitch
|
||||||
; bit 0-3: counter
|
; bit 0-3: counter
|
||||||
@ -302,7 +302,7 @@ wc3fc:: ds 1
|
|||||||
|
|
||||||
SECTION "Sprites", WRAM0
|
SECTION "Sprites", WRAM0
|
||||||
|
|
||||||
Sprites:: ; c400
|
wVirtualOAM:: ; c400
|
||||||
Sprite01:: sprite_oam_struct Sprite01
|
Sprite01:: sprite_oam_struct Sprite01
|
||||||
Sprite02:: sprite_oam_struct Sprite02
|
Sprite02:: sprite_oam_struct Sprite02
|
||||||
Sprite03:: sprite_oam_struct Sprite03
|
Sprite03:: sprite_oam_struct Sprite03
|
||||||
@ -631,7 +631,7 @@ wEnemyMinimized:: db ; c6fa
|
|||||||
AlreadyFailed:: db ; c6fb
|
AlreadyFailed:: db ; c6fb
|
||||||
|
|
||||||
wBattleParticipantsIncludingFainted:: db ; c6fc
|
wBattleParticipantsIncludingFainted:: db ; c6fc
|
||||||
wDanger:: db ; c6fd
|
wBattleLowHealthAlarm:: db ; c6fd
|
||||||
wPlayerMinimized:: db ; c6fe
|
wPlayerMinimized:: db ; c6fe
|
||||||
PlayerScreens:: ; c6ff
|
PlayerScreens:: ; c6ff
|
||||||
; bit
|
; bit
|
||||||
@ -659,7 +659,7 @@ EnemyLightScreenCount:: db ; c706
|
|||||||
EnemyReflectCount:: db ; c707
|
EnemyReflectCount:: db ; c707
|
||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
Weather:: ; c70a
|
wBattleWeather:: ; c70a
|
||||||
; 00 normal
|
; 00 normal
|
||||||
; 01 rain
|
; 01 rain
|
||||||
; 02 sun
|
; 02 sun
|
||||||
@ -1871,7 +1871,7 @@ wNumMoves:: db
|
|||||||
|
|
||||||
wFieldMoveSucceeded::
|
wFieldMoveSucceeded::
|
||||||
wItemEffectSucceeded::
|
wItemEffectSucceeded::
|
||||||
wPlayerAction::
|
wBattlePlayerAction::
|
||||||
; 0 - use move
|
; 0 - use move
|
||||||
; 1 - use item
|
; 1 - use item
|
||||||
; 2 - switch
|
; 2 - switch
|
||||||
@ -2439,9 +2439,9 @@ Money:: ds 3 ; d84e
|
|||||||
wMomsMoney:: ds 3 ; d851
|
wMomsMoney:: ds 3 ; d851
|
||||||
wMomSavingMoney:: db ; d854
|
wMomSavingMoney:: db ; d854
|
||||||
|
|
||||||
Coins:: dw ; d855
|
wCoins:: dw ; d855
|
||||||
|
|
||||||
Badges::
|
wBadges::
|
||||||
wJohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
|
wJohtoBadges:: flag_array NUM_JOHTO_BADGES ; d857
|
||||||
wKantoBadges:: flag_array NUM_KANTO_BADGES ; d858
|
wKantoBadges:: flag_array NUM_KANTO_BADGES ; d858
|
||||||
|
|
||||||
@ -2450,7 +2450,7 @@ TMsHMs:: ds NUM_TMS + NUM_HMS ; d859
|
|||||||
TMsHMsEnd::
|
TMsHMsEnd::
|
||||||
|
|
||||||
NumItems:: db ; d892
|
NumItems:: db ; d892
|
||||||
Items:: ds MAX_ITEMS * 2 + 1 ; d893
|
wItems:: ds MAX_ITEMS * 2 + 1 ; d893
|
||||||
ItemsEnd::
|
ItemsEnd::
|
||||||
|
|
||||||
NumKeyItems:: db ; d8bc
|
NumKeyItems:: db ; d8bc
|
||||||
@ -2458,7 +2458,7 @@ KeyItems:: ds MAX_KEY_ITEMS + 1 ; d8bd
|
|||||||
KeyItemsEnd::
|
KeyItemsEnd::
|
||||||
|
|
||||||
NumBalls:: db ; d8d7
|
NumBalls:: db ; d8d7
|
||||||
Balls:: ds MAX_BALLS * 2 + 1 ; d8d8
|
wBalls:: ds MAX_BALLS * 2 + 1 ; d8d8
|
||||||
BallsEnd::
|
BallsEnd::
|
||||||
|
|
||||||
PCItems:: ds MAX_PC_ITEMS * 2 + 1 ; d8f1
|
PCItems:: ds MAX_PC_ITEMS * 2 + 1 ; d8f1
|
||||||
@ -2649,14 +2649,14 @@ wCurrMapCallbacksPointer:: dw ; dc0b
|
|||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
; Sprite id of each decoration
|
; Sprite id of each decoration
|
||||||
Bed:: db ; dc0f
|
wDecoBed:: db ; dc0f
|
||||||
Carpet:: db ; dc10
|
wDecoCarpet:: db ; dc10
|
||||||
Plant:: db ; dc11
|
wDecoPlant:: db ; dc11
|
||||||
Poster:: db ; dc12
|
wDecoPoster:: db ; dc12
|
||||||
Console:: db ; dc13
|
wDecoConsole:: db ; dc13
|
||||||
LeftOrnament:: db ; dc14
|
wDecoLeftOrnament:: db ; dc14
|
||||||
RightOrnament:: db ; dc15
|
wDecoRightOrnament:: db ; dc15
|
||||||
BigDoll:: db ; dc16
|
wDecoBigDoll:: db ; dc16
|
||||||
|
|
||||||
; Items bought from Mom
|
; Items bought from Mom
|
||||||
wWhichMomItem:: db ; dc17
|
wWhichMomItem:: db ; dc17
|
||||||
|
Loading…
Reference in New Issue
Block a user