mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2024-11-16 11:27:33 -08:00
Rename some labels
- Remove "Buffer" suffix from some byte and word quantities - Change "Ptr" to "Pointer" Fixes #789
This commit is contained in:
parent
1a054661ec
commit
99e66c2557
@ -210,7 +210,7 @@ _UpdateSound::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
UpdateChannels:
|
UpdateChannels:
|
||||||
ld hl, .ChannelFnPtrs
|
ld hl, .ChannelFunctions
|
||||||
ld a, [wCurChannel]
|
ld a, [wCurChannel]
|
||||||
maskbits NUM_CHANNELS
|
maskbits NUM_CHANNELS
|
||||||
add a
|
add a
|
||||||
@ -222,7 +222,7 @@ UpdateChannels:
|
|||||||
ld l, a
|
ld l, a
|
||||||
jp hl
|
jp hl
|
||||||
|
|
||||||
.ChannelFnPtrs:
|
.ChannelFunctions:
|
||||||
dw .Channel1
|
dw .Channel1
|
||||||
dw .Channel2
|
dw .Channel2
|
||||||
dw .Channel3
|
dw .Channel3
|
||||||
|
@ -87,7 +87,7 @@ SandstormHitsText:
|
|||||||
PerishCountText:
|
PerishCountText:
|
||||||
text "<USER>'s"
|
text "<USER>'s"
|
||||||
line "PERISH count is @"
|
line "PERISH count is @"
|
||||||
text_decimal wDeciramBuffer, 1, 1
|
text_decimal wTextDecimalByte, 1, 1
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
@ -670,7 +670,7 @@ SpiteEffectText:
|
|||||||
text_ram wStringBuffer1
|
text_ram wStringBuffer1
|
||||||
text " was"
|
text " was"
|
||||||
cont "reduced by @"
|
cont "reduced by @"
|
||||||
text_decimal wDeciramBuffer, 1, 1
|
text_decimal wTextDecimalByte, 1, 1
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
@ -1030,7 +1030,7 @@ SafeguardProtectText:
|
|||||||
|
|
||||||
MagnitudeText:
|
MagnitudeText:
|
||||||
text "Magnitude @"
|
text "Magnitude @"
|
||||||
text_decimal wDeciramBuffer, 1, 1
|
text_decimal wTextDecimalByte, 1, 1
|
||||||
text "!"
|
text "!"
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
|
@ -271,7 +271,7 @@ _NameCardListedCardText::
|
|||||||
text_ram wMysteryGiftCardHolderName
|
text_ram wMysteryGiftCardHolderName
|
||||||
text "'s CARD was"
|
text "'s CARD was"
|
||||||
line "listed as no.@"
|
line "listed as no.@"
|
||||||
text_decimal wDeciramBuffer, 1, 2
|
text_decimal wTextDecimalByte, 1, 2
|
||||||
text "."
|
text "."
|
||||||
prompt
|
prompt
|
||||||
|
|
||||||
@ -609,7 +609,7 @@ _AskThrowAwayText::
|
|||||||
|
|
||||||
_AskQuantityThrowAwayText::
|
_AskQuantityThrowAwayText::
|
||||||
text "Throw away @"
|
text "Throw away @"
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text_start
|
text_start
|
||||||
line "@"
|
line "@"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
@ -1110,7 +1110,7 @@ _PlayersPCHowManyWithdrawText::
|
|||||||
|
|
||||||
_PlayersPCWithdrewItemsText::
|
_PlayersPCWithdrewItemsText::
|
||||||
text "Withdrew @"
|
text "Withdrew @"
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text_start
|
text_start
|
||||||
line "@"
|
line "@"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
@ -1133,7 +1133,7 @@ _PlayersPCHowManyDepositText::
|
|||||||
|
|
||||||
_PlayersPCDepositItemsText::
|
_PlayersPCDepositItemsText::
|
||||||
text "Deposited @"
|
text "Deposited @"
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text_start
|
text_start
|
||||||
line "@"
|
line "@"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
@ -1390,7 +1390,7 @@ _ItemsTossOutHowManyText::
|
|||||||
|
|
||||||
_ItemsThrowAwayText::
|
_ItemsThrowAwayText::
|
||||||
text "Throw away @"
|
text "Throw away @"
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text_start
|
text_start
|
||||||
line "@"
|
line "@"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
|
@ -480,7 +480,7 @@ _MartHowManyText::
|
|||||||
done
|
done
|
||||||
|
|
||||||
_MartFinalPriceText::
|
_MartFinalPriceText::
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text " @"
|
text " @"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text "(S)"
|
text "(S)"
|
||||||
@ -509,7 +509,7 @@ _HerbalLadyHowManyText::
|
|||||||
done
|
done
|
||||||
|
|
||||||
_HerbalLadyFinalPriceText::
|
_HerbalLadyFinalPriceText::
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text " @"
|
text " @"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text "(S)"
|
text "(S)"
|
||||||
@ -592,7 +592,7 @@ _PharmacyHowManyText::
|
|||||||
done
|
done
|
||||||
|
|
||||||
_PharmacyFinalPriceText::
|
_PharmacyFinalPriceText::
|
||||||
text_decimal wItemQuantityChangeBuffer, 1, 2
|
text_decimal wItemQuantityChange, 1, 2
|
||||||
text " @"
|
text " @"
|
||||||
text_ram wStringBuffer2
|
text_ram wStringBuffer2
|
||||||
text "(S)"
|
text "(S)"
|
||||||
|
@ -263,9 +263,9 @@ If <code><i>item_id</i></code> = `USE_SCRIPT_VAR`, then it uses `[wScriptVar]` i
|
|||||||
## `$49`: `closetext`
|
## `$49`: `closetext`
|
||||||
|
|
||||||
|
|
||||||
## `$4A`: <code>writeunusedbytebuffer <i>byte</i></code>
|
## `$4A`: <code>writeunusedbyte <i>byte</i></code>
|
||||||
|
|
||||||
<code>[<i>wUnusedScriptByteBuffer</i>] = <i>byte</i></code>
|
<code>[<i>wUnusedScriptByte</i>] = <i>byte</i></code>
|
||||||
|
|
||||||
|
|
||||||
## `$4B`: <code>farwritetext <i>text_pointer</i></code>
|
## `$4B`: <code>farwritetext <i>text_pointer</i></code>
|
||||||
|
@ -836,7 +836,7 @@ PrintText_UsedItemOn_AND_AIUpdateHUD:
|
|||||||
|
|
||||||
PrintText_UsedItemOn:
|
PrintText_UsedItemOn:
|
||||||
ld a, [wCurEnemyItem]
|
ld a, [wCurEnemyItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
|
@ -373,7 +373,7 @@ HandleBerserkGene:
|
|||||||
push bc
|
push bc
|
||||||
callfar GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
sub BERSERK_GENE
|
sub BERSERK_GENE
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
@ -1161,7 +1161,7 @@ HandlePerishSong:
|
|||||||
ret z
|
ret z
|
||||||
dec [hl]
|
dec [hl]
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
push af
|
push af
|
||||||
ld hl, PerishCountText
|
ld hl, PerishCountText
|
||||||
call StdBattleTextbox
|
call StdBattleTextbox
|
||||||
@ -1235,7 +1235,7 @@ HandleWrap:
|
|||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wFXAnimID], a
|
ld [wFXAnimID], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
dec [hl]
|
dec [hl]
|
||||||
@ -1288,7 +1288,7 @@ HandleLeftovers:
|
|||||||
|
|
||||||
callfar GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld a, b
|
ld a, b
|
||||||
cp HELD_LEFTOVERS
|
cp HELD_LEFTOVERS
|
||||||
@ -1434,7 +1434,7 @@ HandleMysteryberry:
|
|||||||
.skip_checks
|
.skip_checks
|
||||||
callfar GetUserItem
|
callfar GetUserItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call GetPartymonItem
|
call GetPartymonItem
|
||||||
@ -3703,7 +3703,7 @@ TryToRunAwayFromBattle:
|
|||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld a, [wBattleMonItem]
|
ld a, [wBattleMonItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld b, a
|
ld b, a
|
||||||
callfar GetItemHeldEffect
|
callfar GetItemHeldEffect
|
||||||
ld a, b
|
ld a, b
|
||||||
@ -4025,7 +4025,7 @@ SendOutPlayerMon:
|
|||||||
call GetBattleMonBackpic
|
call GetBattleMonBackpic
|
||||||
xor a
|
xor a
|
||||||
ldh [hGraphicStartTile], a
|
ldh [hGraphicStartTile], a
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorPosition], a
|
||||||
ld [wCurMoveNum], a
|
ld [wCurMoveNum], a
|
||||||
ld [wTypeModifier], a
|
ld [wTypeModifier], a
|
||||||
ld [wPlayerMoveStruct + MOVE_ANIM], a
|
ld [wPlayerMoveStruct + MOVE_ANIM], a
|
||||||
@ -4343,7 +4343,7 @@ UseOpponentItem:
|
|||||||
call RefreshBattleHuds
|
call RefreshBattleHuds
|
||||||
callfar GetOpponentItem
|
callfar GetOpponentItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
callfar ConsumeHeldItem
|
callfar ConsumeHeldItem
|
||||||
ld hl, RecoveredUsingText
|
ld hl, RecoveredUsingText
|
||||||
@ -4437,7 +4437,7 @@ UseConfusionHealingItem:
|
|||||||
|
|
||||||
.heal_status
|
.heal_status
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
ld a, BATTLE_VARS_SUBSTATUS3_OPP
|
||||||
call GetBattleVarAddr
|
call GetBattleVarAddr
|
||||||
res SUBSTATUS_CONFUSED, [hl]
|
res SUBSTATUS_CONFUSED, [hl]
|
||||||
@ -4504,7 +4504,7 @@ HandleStatBoostingHeldItems:
|
|||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
pop bc
|
pop bc
|
||||||
ld a, [bc]
|
ld a, [bc]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
push bc
|
push bc
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
@ -4899,7 +4899,7 @@ BattleMenu:
|
|||||||
.next
|
.next
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
ld a, [wBattleMenuCursorBuffer]
|
ld a, [wBattleMenuCursorPosition]
|
||||||
cp $1
|
cp $1
|
||||||
jp z, BattleMenu_Fight
|
jp z, BattleMenu_Fight
|
||||||
cp $3
|
cp $3
|
||||||
@ -5003,7 +5003,7 @@ BattleMenu_Pack:
|
|||||||
and a
|
and a
|
||||||
jr nz, .run
|
jr nz, .run
|
||||||
callfar CheckItemPocket
|
callfar CheckItemPocket
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
cp BALL
|
cp BALL
|
||||||
jr z, .ball
|
jr z, .ball
|
||||||
call ClearBGPalettes
|
call ClearBGPalettes
|
||||||
@ -5427,7 +5427,7 @@ MoveSelectionScreen:
|
|||||||
|
|
||||||
.battle_player_moves
|
.battle_player_moves
|
||||||
call MoveInfoBox
|
call MoveInfoBox
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jr z, .interpret_joypad
|
jr z, .interpret_joypad
|
||||||
hlcoord 5, 13
|
hlcoord 5, 13
|
||||||
@ -5451,7 +5451,7 @@ MoveSelectionScreen:
|
|||||||
push af
|
push af
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
dec a
|
dec a
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
@ -5542,7 +5542,7 @@ MoveSelectionScreen:
|
|||||||
jp .menu_loop
|
jp .menu_loop
|
||||||
|
|
||||||
.pressed_select
|
.pressed_select
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jr z, .start_swap
|
jr z, .start_swap
|
||||||
ld hl, wBattleMonMoves
|
ld hl, wBattleMonMoves
|
||||||
@ -5560,14 +5560,14 @@ MoveSelectionScreen:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and $f
|
and $f
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
swap a
|
swap a
|
||||||
add b
|
add b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
jr .swap_moves_in_party_struct
|
jr .swap_moves_in_party_struct
|
||||||
|
|
||||||
.not_swapping_disabled_move
|
.not_swapping_disabled_move
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .swap_moves_in_party_struct
|
jr nz, .swap_moves_in_party_struct
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
@ -5595,12 +5595,12 @@ MoveSelectionScreen:
|
|||||||
|
|
||||||
.transformed
|
.transformed
|
||||||
xor a
|
xor a
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
jp MoveSelectionScreen
|
jp MoveSelectionScreen
|
||||||
|
|
||||||
.swap_bytes
|
.swap_bytes
|
||||||
push hl
|
push hl
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -5622,7 +5622,7 @@ MoveSelectionScreen:
|
|||||||
|
|
||||||
.start_swap
|
.start_swap
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
jp MoveSelectionScreen
|
jp MoveSelectionScreen
|
||||||
|
|
||||||
MoveInfoBox:
|
MoveInfoBox:
|
||||||
@ -5717,7 +5717,7 @@ MoveInfoBox:
|
|||||||
inc hl
|
inc hl
|
||||||
ld [hl], "/"
|
ld [hl], "/"
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wNamedObjectIndexBuffer
|
ld de, wNamedObjectIndex
|
||||||
lb bc, 1, 2
|
lb bc, 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ret
|
ret
|
||||||
@ -6383,7 +6383,7 @@ LoadEnemyMon:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
ld a, [wTempEnemyMonSpecies]
|
ld a, [wTempEnemyMonSpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
|
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
@ -8044,7 +8044,7 @@ BattleIntro:
|
|||||||
call LoadTrainerOrWildMonPic
|
call LoadTrainerOrWildMonPic
|
||||||
xor a
|
xor a
|
||||||
ld [wTempBattleMonSpecies], a
|
ld [wTempBattleMonSpecies], a
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorPosition], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hMapAnims], a
|
ldh [hMapAnims], a
|
||||||
farcall PlayBattleMusic
|
farcall PlayBattleMusic
|
||||||
@ -8300,7 +8300,7 @@ CleanUpBattleRAM:
|
|||||||
ld [wPartyMenuCursor], a
|
ld [wPartyMenuCursor], a
|
||||||
ld [wKeyItemsPocketCursor], a
|
ld [wKeyItemsPocketCursor], a
|
||||||
ld [wItemsPocketCursor], a
|
ld [wItemsPocketCursor], a
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorPosition], a
|
||||||
ld [wCurMoveNum], a
|
ld [wCurMoveNum], a
|
||||||
ld [wBallsPocketCursor], a
|
ld [wBallsPocketCursor], a
|
||||||
ld [wLastPocket], a
|
ld [wLastPocket], a
|
||||||
|
@ -595,7 +595,7 @@ MoveDisabled:
|
|||||||
|
|
||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
|
|
||||||
ld hl, DisabledMoveText
|
ld hl, DisabledMoveText
|
||||||
@ -2186,7 +2186,7 @@ BattleCommand_ApplyDamage:
|
|||||||
.focus_band_text
|
.focus_band_text
|
||||||
call GetOpponentItem
|
call GetOpponentItem
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, HungOnText
|
ld hl, HungOnText
|
||||||
jp StdBattleTextbox
|
jp StdBattleTextbox
|
||||||
@ -3608,7 +3608,7 @@ UpdateMoveData:
|
|||||||
ld a, BATTLE_VARS_MOVE
|
ld a, BATTLE_VARS_MOVE
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
|
|
||||||
dec a
|
dec a
|
||||||
call GetMoveData
|
call GetMoveData
|
||||||
@ -3624,7 +3624,7 @@ BattleCommand_SleepTarget:
|
|||||||
jr nz, .not_protected_by_item
|
jr nz, .not_protected_by_item
|
||||||
|
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, ProtectedByText
|
ld hl, ProtectedByText
|
||||||
jr .fail
|
jr .fail
|
||||||
@ -3772,7 +3772,7 @@ BattleCommand_Poison:
|
|||||||
cp HELD_PREVENT_POISON
|
cp HELD_PREVENT_POISON
|
||||||
jr nz, .do_poison
|
jr nz, .do_poison
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, ProtectedByText
|
ld hl, ProtectedByText
|
||||||
jr .failed
|
jr .failed
|
||||||
@ -4826,7 +4826,6 @@ BattleCommand_TriStatusChance:
|
|||||||
; tristatuschance
|
; tristatuschance
|
||||||
|
|
||||||
call BattleCommand_EffectChance
|
call BattleCommand_EffectChance
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
; 1/3 chance of each status
|
; 1/3 chance of each status
|
||||||
call BattleRandom
|
call BattleRandom
|
||||||
@ -4834,11 +4833,11 @@ BattleCommand_TriStatusChance:
|
|||||||
and %11
|
and %11
|
||||||
jr z, .loop
|
jr z, .loop
|
||||||
dec a
|
dec a
|
||||||
ld hl, .ptrs
|
ld hl, .StatusCommands
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.ptrs
|
.StatusCommands:
|
||||||
dw BattleCommand_ParalyzeTarget ; paralyze
|
dw BattleCommand_ParalyzeTarget ; paralyze
|
||||||
dw BattleCommand_FreezeTarget ; freeze
|
dw BattleCommand_FreezeTarget ; freeze
|
||||||
dw BattleCommand_BurnTarget ; burn
|
dw BattleCommand_BurnTarget ; burn
|
||||||
@ -5873,7 +5872,7 @@ BattleCommand_Confuse:
|
|||||||
cp HELD_PREVENT_CONFUSE
|
cp HELD_PREVENT_CONFUSE
|
||||||
jr nz, .no_item_protection
|
jr nz, .no_item_protection
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call AnimateFailedMove
|
call AnimateFailedMove
|
||||||
ld hl, ProtectedByText
|
ld hl, ProtectedByText
|
||||||
@ -5963,7 +5962,7 @@ BattleCommand_Paralyze:
|
|||||||
cp HELD_PREVENT_PARALYZE
|
cp HELD_PREVENT_PARALYZE
|
||||||
jr nz, .no_item_protection
|
jr nz, .no_item_protection
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call AnimateFailedMove
|
call AnimateFailedMove
|
||||||
ld hl, ProtectedByText
|
ld hl, ProtectedByText
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
LoadBattleMenu:
|
LoadBattleMenu:
|
||||||
ld hl, BattleMenuHeader
|
ld hl, BattleMenuHeader
|
||||||
call LoadMenuHeader
|
call LoadMenuHeader
|
||||||
ld a, [wBattleMenuCursorBuffer]
|
ld a, [wBattleMenuCursorPosition]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call InterpretBattleMenu
|
call InterpretBattleMenu
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorPosition], a
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -20,11 +20,11 @@ ContestBattleMenu:
|
|||||||
; fallthrough
|
; fallthrough
|
||||||
|
|
||||||
CommonBattleMenu:
|
CommonBattleMenu:
|
||||||
ld a, [wBattleMenuCursorBuffer]
|
ld a, [wBattleMenuCursorPosition]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call _2DMenu
|
call _2DMenu
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorPosition], a
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -118,7 +118,7 @@ BattleCommand_BeatUp:
|
|||||||
ld hl, wOTPartySpecies
|
ld hl, wOTPartySpecies
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
jr .got_enemy_nick
|
jr .got_enemy_nick
|
||||||
|
|
||||||
@ -156,7 +156,7 @@ BattleCommand_BeatUp:
|
|||||||
|
|
||||||
.wild
|
.wild
|
||||||
ld a, [wEnemyMonSpecies]
|
ld a, [wEnemyMonSpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, BeatUpAttackText
|
ld hl, BeatUpAttackText
|
||||||
call StdBattleTextbox
|
call StdBattleTextbox
|
||||||
|
@ -89,7 +89,7 @@ BattleCommand_Conversion:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
farcall GetTypeName
|
farcall GetTypeName
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
ld hl, TransformedTypeText
|
ld hl, TransformedTypeText
|
||||||
|
@ -55,7 +55,7 @@ BattleCommand_Conversion2:
|
|||||||
call BattleCommand_SwitchTurn
|
call BattleCommand_SwitchTurn
|
||||||
|
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
predef GetTypeName
|
predef GetTypeName
|
||||||
ld hl, TransformedTypeText
|
ld hl, TransformedTypeText
|
||||||
jp StdBattleTextbox
|
jp StdBattleTextbox
|
||||||
|
@ -63,7 +63,7 @@ BattleCommand_Disable:
|
|||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
ld hl, WasDisabledText
|
ld hl, WasDisabledText
|
||||||
jp StdBattleTextbox
|
jp StdBattleTextbox
|
||||||
|
@ -18,7 +18,7 @@ BattleCommand_GetMagnitude:
|
|||||||
push de
|
push de
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
call BattleCommand_MoveDelay
|
call BattleCommand_MoveDelay
|
||||||
ld hl, MagnitudeText
|
ld hl, MagnitudeText
|
||||||
call StdBattleTextbox
|
call StdBattleTextbox
|
||||||
|
@ -37,7 +37,7 @@ BattleCommand_Mimic:
|
|||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld bc, wBattleMonPP - wBattleMonMoves
|
ld bc, wBattleMonPP - wBattleMonMoves
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld [hl], 5
|
ld [hl], 5
|
||||||
|
@ -24,7 +24,7 @@ BattleCommand_MirrorMove:
|
|||||||
.use
|
.use
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
|
|
||||||
push af
|
push af
|
||||||
ld a, BATTLE_VARS_MOVE_ANIM
|
ld a, BATTLE_VARS_MOVE_ANIM
|
||||||
|
@ -34,7 +34,7 @@ BattleCommand_Sketch:
|
|||||||
.get_last_move
|
.get_last_move
|
||||||
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
ld a, BATTLE_VARS_LAST_COUNTER_MOVE_OPP
|
||||||
call GetBattleVar
|
call GetBattleVar
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld b, a
|
ld b, a
|
||||||
; Fail if move is invalid or is Struggle.
|
; Fail if move is invalid or is Struggle.
|
||||||
and a
|
and a
|
||||||
|
@ -24,7 +24,7 @@ BattleCommand_Spite:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
dec hl
|
dec hl
|
||||||
ld b, 0
|
ld b, 0
|
||||||
push bc
|
push bc
|
||||||
@ -78,7 +78,7 @@ BattleCommand_Spite:
|
|||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
pop de
|
pop de
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld hl, SpiteEffectText
|
ld hl, SpiteEffectText
|
||||||
jp StdBattleTextbox
|
jp StdBattleTextbox
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ BattleCommand_Thief:
|
|||||||
|
|
||||||
; Can't steal mail.
|
; Can't steal mail.
|
||||||
|
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld d, a
|
ld d, a
|
||||||
farcall ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
@ -45,7 +45,7 @@ BattleCommand_Thief:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
call .playeritem
|
call .playeritem
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
jr .stole
|
jr .stole
|
||||||
@ -68,7 +68,7 @@ BattleCommand_Thief:
|
|||||||
|
|
||||||
; Can't steal mail!
|
; Can't steal mail!
|
||||||
|
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld d, a
|
ld d, a
|
||||||
farcall ItemIsMail
|
farcall ItemIsMail
|
||||||
ret c
|
ret c
|
||||||
@ -86,7 +86,7 @@ BattleCommand_Thief:
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
call .enemyitem
|
call .enemyitem
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
|
@ -99,7 +99,7 @@ BattleCommand_Transform:
|
|||||||
jr nz, .pp_loop
|
jr nz, .pp_loop
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wEnemyStats
|
ld hl, wEnemyStats
|
||||||
ld de, wPlayerStats
|
ld de, wPlayerStats
|
||||||
|
@ -6,7 +6,7 @@ GetTrainerClassName:
|
|||||||
|
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld a, TRAINER_NAME
|
ld a, TRAINER_NAME
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
call GetName
|
call GetName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
ret
|
ret
|
||||||
@ -32,7 +32,7 @@ GetOTName:
|
|||||||
|
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld a, TRAINER_NAME
|
ld a, TRAINER_NAME
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
call GetName
|
call GetName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
|
|
||||||
|
@ -320,9 +320,9 @@ DebugColor_InitScreen:
|
|||||||
ld a, [wDebugColorCurMon]
|
ld a, [wDebugColorCurMon]
|
||||||
inc a
|
inc a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
hlcoord 0, 1
|
hlcoord 0, 1
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld a, [wDebugColorIsTrainer]
|
ld a, [wDebugColorIsTrainer]
|
||||||
@ -364,7 +364,7 @@ DebugColor_InitScreen:
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.trainer
|
.trainer
|
||||||
ld a, [wDeciramBuffer]
|
ld a, [wTextDecimalByte]
|
||||||
ld [wTrainerClass], a
|
ld [wTrainerClass], a
|
||||||
callfar GetTrainerAttributes
|
callfar GetTrainerAttributes
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
|
@ -573,9 +573,9 @@ DebugRoom_EditPagedValues:
|
|||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [wDebugRoomPageCount], a
|
ld [wDebugRoomPageCount], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wDebugRoomPagedValuesPtr], a
|
ld [wDebugRoomPagesPointer], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wDebugRoomPagedValuesPtr+1], a
|
ld [wDebugRoomPagesPointer+1], a
|
||||||
ld hl, hInMenu
|
ld hl, hInMenu
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push af
|
push af
|
||||||
@ -669,7 +669,7 @@ DebugRoom_PageString:
|
|||||||
db " P @"
|
db " P @"
|
||||||
|
|
||||||
DebugRoom_IncrementPagedValue:
|
DebugRoom_IncrementPagedValue:
|
||||||
call DebugRoom_GetCurPagedValuePtr
|
call DebugRoom_GetCurPagedValuePointer
|
||||||
ld e, [hl] ; de = value address
|
ld e, [hl] ; de = value address
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
@ -684,7 +684,7 @@ DebugRoom_IncrementPagedValue:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
DebugRoom_DecrementPagedValue:
|
DebugRoom_DecrementPagedValue:
|
||||||
call DebugRoom_GetCurPagedValuePtr
|
call DebugRoom_GetCurPagedValuePointer
|
||||||
ld e, [hl] ; de = value address
|
ld e, [hl] ; de = value address
|
||||||
inc hl
|
inc hl
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
@ -709,7 +709,7 @@ DebugRoom_NextPage:
|
|||||||
ld [wDebugRoomCurPage], a
|
ld [wDebugRoomCurPage], a
|
||||||
call DebugRoom_PrintPage
|
call DebugRoom_PrintPage
|
||||||
ld a, [wDebugRoomCurPage]
|
ld a, [wDebugRoomCurPage]
|
||||||
call DebugRoom_GetNthPagePtr
|
call DebugRoom_GetNthPagePointer
|
||||||
ld a, [wDebugRoomCurValue]
|
ld a, [wDebugRoomCurValue]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr c, .skip
|
jr c, .skip
|
||||||
@ -731,7 +731,7 @@ DebugRoom_PrevPage:
|
|||||||
ld [wDebugRoomCurPage], a
|
ld [wDebugRoomCurPage], a
|
||||||
call DebugRoom_PrintPage
|
call DebugRoom_PrintPage
|
||||||
ld a, [wDebugRoomCurPage]
|
ld a, [wDebugRoomCurPage]
|
||||||
call DebugRoom_GetNthPagePtr
|
call DebugRoom_GetNthPagePointer
|
||||||
ld a, [wDebugRoomCurValue]
|
ld a, [wDebugRoomCurValue]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr c, .skip
|
jr c, .skip
|
||||||
@ -747,7 +747,7 @@ DebugRoom_NextPagedValue:
|
|||||||
ld a, " "
|
ld a, " "
|
||||||
call DebugRoom_ShowHideCursor
|
call DebugRoom_ShowHideCursor
|
||||||
ld a, [wDebugRoomCurPage]
|
ld a, [wDebugRoomCurPage]
|
||||||
call DebugRoom_GetNthPagePtr
|
call DebugRoom_GetNthPagePointer
|
||||||
ld a, [wDebugRoomCurValue]
|
ld a, [wDebugRoomCurValue]
|
||||||
inc a
|
inc a
|
||||||
cp [hl] ; incremented value < paged_value count?
|
cp [hl] ; incremented value < paged_value count?
|
||||||
@ -776,15 +776,15 @@ DebugRoom_PrevPagedValue:
|
|||||||
dec a
|
dec a
|
||||||
jr DebugRoom_UpdateValueCursor
|
jr DebugRoom_UpdateValueCursor
|
||||||
|
|
||||||
DebugRoom_GetNthPagePtr:
|
DebugRoom_GetNthPagePointer:
|
||||||
; Input: a = page index
|
; Input: a = page index
|
||||||
; Output: hl = pointer to paged_data list
|
; Output: hl = pointer to paged_data list
|
||||||
ld h, 0
|
ld h, 0
|
||||||
ld l, a
|
ld l, a
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld a, [wDebugRoomPagedValuesPtr]
|
ld a, [wDebugRoomPagesPointer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wDebugRoomPagedValuesPtr+1]
|
ld a, [wDebugRoomPagesPointer+1]
|
||||||
ld d, a
|
ld d, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -792,10 +792,10 @@ DebugRoom_GetNthPagePtr:
|
|||||||
ld l, a
|
ld l, a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
_DebugRoom_GetPageBValueCPtr:
|
_DebugRoom_GetPageBValueCPointer:
|
||||||
push bc
|
push bc
|
||||||
ld a, b
|
ld a, b
|
||||||
call DebugRoom_GetNthPagePtr
|
call DebugRoom_GetNthPagePointer
|
||||||
pop bc
|
pop bc
|
||||||
inc hl
|
inc hl
|
||||||
ld a, c
|
ld a, c
|
||||||
@ -803,12 +803,12 @@ _DebugRoom_GetPageBValueCPtr:
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DebugRoom_GetCurPagedValuePtr:
|
DebugRoom_GetCurPagedValuePointer:
|
||||||
ld a, [wDebugRoomCurPage]
|
ld a, [wDebugRoomCurPage]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wDebugRoomCurValue]
|
ld a, [wDebugRoomCurValue]
|
||||||
ld c, a
|
ld c, a
|
||||||
jr _DebugRoom_GetPageBValueCPtr
|
jr _DebugRoom_GetPageBValueCPointer
|
||||||
|
|
||||||
DebugRoom_ShowHideCursor:
|
DebugRoom_ShowHideCursor:
|
||||||
push af
|
push af
|
||||||
@ -837,9 +837,9 @@ DebugRoom_InitializePagedValues:
|
|||||||
ld h, 0
|
ld h, 0
|
||||||
ld l, a
|
ld l, a
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld a, [wDebugRoomPagedValuesPtr]
|
ld a, [wDebugRoomPagesPointer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wDebugRoomPagedValuesPtr+1]
|
ld a, [wDebugRoomPagesPointer+1]
|
||||||
ld d, a
|
ld d, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -860,9 +860,9 @@ DebugRoom_InitializePagedValues:
|
|||||||
ld h, 0
|
ld h, 0
|
||||||
ld l, b
|
ld l, b
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld a, [wDebugRoomPagedValuesPtr]
|
ld a, [wDebugRoomPagesPointer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wDebugRoomPagedValuesPtr+1]
|
ld a, [wDebugRoomPagesPointer+1]
|
||||||
ld d, a
|
ld d, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -897,9 +897,9 @@ DebugRoom_PrintPage:
|
|||||||
ld h, 0
|
ld h, 0
|
||||||
ld l, a
|
ld l, a
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld a, [wDebugRoomPagedValuesPtr]
|
ld a, [wDebugRoomPagesPointer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wDebugRoomPagedValuesPtr+1]
|
ld a, [wDebugRoomPagesPointer+1]
|
||||||
ld d, a
|
ld d, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -927,9 +927,9 @@ DebugRoom_PrintPagedValue:
|
|||||||
ld h, 0
|
ld h, 0
|
||||||
ld l, b
|
ld l, b
|
||||||
add hl, hl
|
add hl, hl
|
||||||
ld a, [wDebugRoomPagedValuesPtr]
|
ld a, [wDebugRoomPagesPointer]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wDebugRoomPagedValuesPtr+1]
|
ld a, [wDebugRoomPagesPointer+1]
|
||||||
ld d, a
|
ld d, a
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -1083,7 +1083,7 @@ DebugRoom_SaveItem:
|
|||||||
done
|
done
|
||||||
|
|
||||||
DebugRoom_PrintItemName:
|
DebugRoom_PrintItemName:
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
push bc
|
push bc
|
||||||
call GetItemName
|
call GetItemName
|
||||||
pop hl
|
pop hl
|
||||||
@ -1229,19 +1229,19 @@ DebugRoom_SavePokemon:
|
|||||||
done
|
done
|
||||||
|
|
||||||
DebugRoom_PrintPokemonName:
|
DebugRoom_PrintPokemonName:
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
push bc
|
push bc
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
jr _DebugRoom_FinishGetName
|
jr _DebugRoom_FinishGetName
|
||||||
|
|
||||||
DebugRoom_PrintItemName2:
|
DebugRoom_PrintItemName2:
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
push bc
|
push bc
|
||||||
call GetItemName
|
call GetItemName
|
||||||
jr _DebugRoom_FinishGetName
|
jr _DebugRoom_FinishGetName
|
||||||
|
|
||||||
DebugRoom_PrintMoveName:
|
DebugRoom_PrintMoveName:
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
push bc
|
push bc
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
jr _DebugRoom_FinishGetName
|
jr _DebugRoom_FinishGetName
|
||||||
|
@ -269,7 +269,7 @@ ReadBTTrainerParty:
|
|||||||
jr nc, .skip_mon_1
|
jr nc, .skip_mon_1
|
||||||
|
|
||||||
ld a, [wBT_OTTempMon1]
|
ld a, [wBT_OTTempMon1]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -283,7 +283,7 @@ ReadBTTrainerParty:
|
|||||||
farcall CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
jr nc, .skip_mon_2
|
jr nc, .skip_mon_2
|
||||||
ld a, [wBT_OTTempMon2]
|
ld a, [wBT_OTTempMon2]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -297,7 +297,7 @@ ReadBTTrainerParty:
|
|||||||
farcall CheckStringForErrors
|
farcall CheckStringForErrors
|
||||||
jr nc, .skip_mon_3
|
jr nc, .skip_mon_3
|
||||||
ld a, [wBT_OTTempMon3]
|
ld a, [wBT_OTTempMon3]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld l, e
|
ld l, e
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -1289,7 +1289,7 @@ endr
|
|||||||
ld a, EGG_TICKET
|
ld a, EGG_TICKET
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wCurItemQuantity], a
|
ld [wCurItemQuantity], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
|
@ -168,13 +168,13 @@ LoadRandomBattleTowerMon:
|
|||||||
ld bc, NICKNAMED_MON_STRUCT_LENGTH
|
ld bc, NICKNAMED_MON_STRUCT_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
push af
|
push af
|
||||||
push de
|
push de
|
||||||
ld hl, -NICKNAMED_MON_STRUCT_LENGTH
|
ld hl, -NICKNAMED_MON_STRUCT_LENGTH
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
push hl
|
push hl
|
||||||
@ -187,7 +187,7 @@ LoadRandomBattleTowerMon:
|
|||||||
|
|
||||||
pop de
|
pop de
|
||||||
pop af
|
pop af
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
pop bc
|
pop bc
|
||||||
dec c
|
dec c
|
||||||
jp nz, .loop
|
jp nz, .loop
|
||||||
|
@ -87,7 +87,7 @@ BuenaPrize:
|
|||||||
ld [wMenuSelectionQuantity], a
|
ld [wMenuSelectionQuantity], a
|
||||||
call Buena_GetPrize
|
call Buena_GetPrize
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, .BuenaIsThatRightText
|
ld hl, .BuenaIsThatRightText
|
||||||
call BuenaPrintText
|
call BuenaPrintText
|
||||||
@ -107,7 +107,7 @@ BuenaPrize:
|
|||||||
push hl
|
push hl
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
pop hl
|
pop hl
|
||||||
@ -224,7 +224,7 @@ Buena_PrizeMenu:
|
|||||||
ld hl, .MenuHeader
|
ld hl, .MenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wMenuSelection]
|
ld a, [wMenuSelection]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
xor a
|
xor a
|
||||||
ld [wWhichIndexSet], a
|
ld [wWhichIndexSet], a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
@ -276,7 +276,7 @@ endr
|
|||||||
call Buena_GetPrize
|
call Buena_GetPrize
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
push de
|
push de
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
pop hl
|
pop hl
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
@ -2,7 +2,7 @@ BugContest_SetCaughtContestMon:
|
|||||||
ld a, [wContestMon]
|
ld a, [wContestMon]
|
||||||
and a
|
and a
|
||||||
jr z, .firstcatch
|
jr z, .firstcatch
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
farcall DisplayAlreadyCaughtText
|
farcall DisplayAlreadyCaughtText
|
||||||
farcall DisplayCaughtContestMonStats
|
farcall DisplayCaughtContestMonStats
|
||||||
lb bc, 14, 7
|
lb bc, 14, 7
|
||||||
@ -12,7 +12,7 @@ BugContest_SetCaughtContestMon:
|
|||||||
.firstcatch
|
.firstcatch
|
||||||
call .generatestats
|
call .generatestats
|
||||||
ld a, [wTempEnemyMonSpecies]
|
ld a, [wTempEnemyMonSpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, .ContestCaughtMonText
|
ld hl, .ContestCaughtMonText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -36,7 +36,7 @@ DisplayCaughtContestMonStats:
|
|||||||
call PlaceString
|
call PlaceString
|
||||||
|
|
||||||
ld a, [wContestMon]
|
ld a, [wContestMon]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
hlcoord 1, 2
|
hlcoord 1, 2
|
||||||
|
@ -5,21 +5,21 @@ _BugContestJudging:
|
|||||||
ld a, [wBugContestThirdPlaceWinnerID]
|
ld a, [wBugContestThirdPlaceWinnerID]
|
||||||
call LoadContestantName
|
call LoadContestantName
|
||||||
ld a, [wBugContestThirdPlaceMon]
|
ld a, [wBugContestThirdPlaceMon]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, ContestJudging_ThirdPlaceText
|
ld hl, ContestJudging_ThirdPlaceText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, [wBugContestSecondPlaceWinnerID]
|
ld a, [wBugContestSecondPlaceWinnerID]
|
||||||
call LoadContestantName
|
call LoadContestantName
|
||||||
ld a, [wBugContestSecondPlaceMon]
|
ld a, [wBugContestSecondPlaceMon]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, ContestJudging_SecondPlaceText
|
ld hl, ContestJudging_SecondPlaceText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, [wBugContestFirstPlaceWinnerID]
|
ld a, [wBugContestFirstPlaceWinnerID]
|
||||||
call LoadContestantName
|
call LoadContestantName
|
||||||
ld a, [wBugContestFirstPlaceMon]
|
ld a, [wBugContestFirstPlaceMon]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, ContestJudging_FirstPlaceText
|
ld hl, ContestJudging_FirstPlaceText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -3,7 +3,7 @@ BillsGrandfather:
|
|||||||
jr c, .cancel
|
jr c, .cancel
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
jp CopyPokemonName_Buffer1_Buffer3
|
jp CopyPokemonName_Buffer1_Buffer3
|
||||||
|
|
||||||
|
@ -462,7 +462,7 @@ DisplayHOFMon:
|
|||||||
call Textbox
|
call Textbox
|
||||||
ld a, [wTempMonSpecies]
|
ld a, [wTempMonSpecies]
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld hl, wTempMonDVs
|
ld hl, wTempMonDVs
|
||||||
predef GetUnownLetter
|
predef GetUnownLetter
|
||||||
xor a
|
xor a
|
||||||
@ -477,7 +477,7 @@ DisplayHOFMon:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], "<DOT>"
|
ld [hl], "<DOT>"
|
||||||
hlcoord 3, 13
|
hlcoord 3, 13
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
call GetBasePokemonName
|
call GetBasePokemonName
|
||||||
|
@ -11,7 +11,7 @@ GetFirstPokemonHappiness:
|
|||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.done
|
.done
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
@ -19,7 +19,7 @@ GetFirstPokemonHappiness:
|
|||||||
|
|
||||||
CheckFirstMonIsEgg:
|
CheckFirstMonIsEgg:
|
||||||
ld a, [wPartySpecies]
|
ld a, [wPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
cp EGG
|
cp EGG
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
jr z, .egg
|
jr z, .egg
|
||||||
|
@ -41,7 +41,7 @@ SelectApricornForKurt:
|
|||||||
call Kurt_SelectQuantity
|
call Kurt_SelectQuantity
|
||||||
pop bc
|
pop bc
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wKurtApricornQuantity], a
|
ld [wKurtApricornQuantity], a
|
||||||
call Kurt_GiveUpSelectedQuantityOfSelectedApricorn
|
call Kurt_GiveUpSelectedQuantityOfSelectedApricorn
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ Kurt_SelectApricorn:
|
|||||||
ld hl, .MenuHeader
|
ld hl, .MenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wMenuSelection]
|
ld a, [wMenuSelection]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
call InitScrollingMenu
|
call InitScrollingMenu
|
||||||
@ -104,7 +104,7 @@ Kurt_SelectApricorn:
|
|||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call Kurt_GetQuantityOfApricorn
|
call Kurt_GetQuantityOfApricorn
|
||||||
ret z
|
ret z
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wMenuSelectionQuantity], a
|
ld [wMenuSelectionQuantity], a
|
||||||
farcall PlaceMenuItemQuantity
|
farcall PlaceMenuItemQuantity
|
||||||
ret
|
ret
|
||||||
@ -114,10 +114,10 @@ Kurt_SelectQuantity:
|
|||||||
ld [wMenuSelection], a
|
ld [wMenuSelection], a
|
||||||
call Kurt_GetQuantityOfApricorn
|
call Kurt_GetQuantityOfApricorn
|
||||||
jr z, .done
|
jr z, .done
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, .MenuHeader
|
ld hl, .MenuHeader
|
||||||
call LoadMenuHeader
|
call LoadMenuHeader
|
||||||
.loop
|
.loop
|
||||||
@ -137,8 +137,8 @@ Kurt_SelectQuantity:
|
|||||||
ld a, b
|
ld a, b
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .done
|
jr z, .done
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wItemQuantityChangeBuffer], a ; What is the point of this operation?
|
ld [wItemQuantityChange], a ; What is the point of this operation?
|
||||||
scf
|
scf
|
||||||
|
|
||||||
.done
|
.done
|
||||||
@ -167,7 +167,7 @@ PlaceApricornQuantity:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], "×"
|
ld [hl], "×"
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wItemQuantityChangeBuffer
|
ld de, wItemQuantityChange
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||||
jp PrintNum
|
jp PrintNum
|
||||||
|
|
||||||
@ -198,7 +198,7 @@ Kurt_GetQuantityOfApricorn:
|
|||||||
|
|
||||||
.done2
|
.done2
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
and a
|
and a
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
@ -309,7 +309,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn:
|
|||||||
ld [wCurItemQuantity], a
|
ld [wCurItemQuantity], a
|
||||||
call Kurt_GetRidOfItem
|
call Kurt_GetRidOfItem
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
and a
|
and a
|
||||||
jr z, .done
|
jr z, .done
|
||||||
push hl
|
push hl
|
||||||
@ -332,7 +332,7 @@ Kurt_GiveUpSelectedQuantityOfSelectedApricorn:
|
|||||||
jr .loop4
|
jr .loop4
|
||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
and a
|
and a
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
@ -369,7 +369,7 @@ Kurt_GetRidOfItem:
|
|||||||
jr z, .done
|
jr z, .done
|
||||||
cp c
|
cp c
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sub c
|
sub c
|
||||||
@ -382,13 +382,13 @@ Kurt_GetRidOfItem:
|
|||||||
push bc
|
push bc
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
call TossItem
|
call TossItem
|
||||||
pop bc
|
pop bc
|
||||||
ld a, c
|
ld a, c
|
||||||
sub b
|
sub b
|
||||||
|
|
||||||
.done
|
.done
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
pop bc
|
pop bc
|
||||||
ret
|
ret
|
||||||
|
@ -109,7 +109,7 @@ CheckForLuckyNumberWinners:
|
|||||||
and a
|
and a
|
||||||
push af
|
push af
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, .LuckyNumberMatchPartyText
|
ld hl, .LuckyNumberMatchPartyText
|
||||||
pop af
|
pop af
|
||||||
|
@ -39,14 +39,14 @@ FindItemInBallScript::
|
|||||||
xor a
|
xor a
|
||||||
ld [wScriptVar], a
|
ld [wScriptVar], a
|
||||||
ld a, [wItemBallItemID]
|
ld a, [wItemBallItemID]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, wStringBuffer3
|
ld hl, wStringBuffer3
|
||||||
call CopyName2
|
call CopyName2
|
||||||
ld a, [wItemBallItemID]
|
ld a, [wItemBallItemID]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, [wItemBallQuantity]
|
ld a, [wItemBallQuantity]
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
ret nc
|
ret nc
|
||||||
|
@ -146,7 +146,7 @@ Mom_GiveItemOrDoll:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumPCItems
|
ld hl, wNumPCItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
ret
|
ret
|
||||||
|
@ -28,7 +28,7 @@ MoveDeletion:
|
|||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
push af
|
push af
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
ld hl, .AskDeleteMoveText
|
ld hl, .AskDeleteMoveText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -6,9 +6,9 @@ MoveTutor:
|
|||||||
ld b, SCGB_PACKPALS
|
ld b, SCGB_PACKPALS
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
xor a
|
xor a
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeValue], a
|
||||||
call .GetMoveTutorMove
|
call .GetMoveTutorMove
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
|
@ -29,7 +29,7 @@ _NameRater:
|
|||||||
xor a ; PARTYMON
|
xor a ; PARTYMON
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetBaseData
|
call GetBaseData
|
||||||
ld b, NAME_MON
|
ld b, NAME_MON
|
||||||
|
@ -21,7 +21,7 @@ NPCTrade::
|
|||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
ld e, NPCTRADE_GIVEMON
|
ld e, NPCTRADE_GIVEMON
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
ld a, TRADE_DIALOG_WRONG
|
ld a, TRADE_DIALOG_WRONG
|
||||||
@ -72,7 +72,7 @@ CheckTradeGender:
|
|||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
|
|
||||||
ld e, NPCTRADE_GENDER
|
ld e, NPCTRADE_GENDER
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a ; TRADE_GENDER_EITHER
|
and a ; TRADE_GENDER_EITHER
|
||||||
jr z, .matching
|
jr z, .matching
|
||||||
@ -106,19 +106,19 @@ TradeFlagAction:
|
|||||||
|
|
||||||
Trade_GetDialog:
|
Trade_GetDialog:
|
||||||
ld e, NPCTRADE_DIALOG
|
ld e, NPCTRADE_DIALOG
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wTradeDialog], a
|
ld [wTradeDialog], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
DoNPCTrade:
|
DoNPCTrade:
|
||||||
ld e, NPCTRADE_GIVEMON
|
ld e, NPCTRADE_GIVEMON
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wPlayerTrademonSpecies], a
|
ld [wPlayerTrademonSpecies], a
|
||||||
|
|
||||||
ld e, NPCTRADE_GETMON
|
ld e, NPCTRADE_GETMON
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wOTTrademonSpecies], a
|
ld [wOTTrademonSpecies], a
|
||||||
|
|
||||||
@ -164,7 +164,7 @@ DoNPCTrade:
|
|||||||
ld [wPlayerTrademonCaughtData], a
|
ld [wPlayerTrademonCaughtData], a
|
||||||
|
|
||||||
ld e, NPCTRADE_DIALOG
|
ld e, NPCTRADE_DIALOG
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp TRADE_DIALOGSET_GIRL
|
cp TRADE_DIALOGSET_GIRL
|
||||||
ld a, CAUGHT_BY_GIRL
|
ld a, CAUGHT_BY_GIRL
|
||||||
@ -187,7 +187,7 @@ DoNPCTrade:
|
|||||||
predef TryAddMonToParty
|
predef TryAddMonToParty
|
||||||
|
|
||||||
ld e, NPCTRADE_DIALOG
|
ld e, NPCTRADE_DIALOG
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp TRADE_DIALOGSET_GIRL
|
cp TRADE_DIALOGSET_GIRL
|
||||||
ld b, CAUGHT_BY_UNKNOWN
|
ld b, CAUGHT_BY_UNKNOWN
|
||||||
@ -197,7 +197,7 @@ DoNPCTrade:
|
|||||||
farcall SetGiftPartyMonCaughtData
|
farcall SetGiftPartyMonCaughtData
|
||||||
|
|
||||||
ld e, NPCTRADE_NICK
|
ld e, NPCTRADE_NICK
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld de, wOTTrademonNickname
|
ld de, wOTTrademonNickname
|
||||||
call CopyTradeName
|
call CopyTradeName
|
||||||
|
|
||||||
@ -208,7 +208,7 @@ DoNPCTrade:
|
|||||||
call CopyTradeName
|
call CopyTradeName
|
||||||
|
|
||||||
ld e, NPCTRADE_OT_NAME
|
ld e, NPCTRADE_OT_NAME
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
push hl
|
push hl
|
||||||
ld de, wOTTrademonOTName
|
ld de, wOTTrademonOTName
|
||||||
call CopyTradeName
|
call CopyTradeName
|
||||||
@ -223,7 +223,7 @@ DoNPCTrade:
|
|||||||
call CopyTradeName
|
call CopyTradeName
|
||||||
|
|
||||||
ld e, NPCTRADE_DVS
|
ld e, NPCTRADE_DVS
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld de, wOTTrademonDVs
|
ld de, wOTTrademonDVs
|
||||||
call Trade_CopyTwoBytes
|
call Trade_CopyTwoBytes
|
||||||
|
|
||||||
@ -234,7 +234,7 @@ DoNPCTrade:
|
|||||||
call Trade_CopyTwoBytes
|
call Trade_CopyTwoBytes
|
||||||
|
|
||||||
ld e, NPCTRADE_OT_ID
|
ld e, NPCTRADE_OT_ID
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld de, wOTTrademonID + 1
|
ld de, wOTTrademonID + 1
|
||||||
call Trade_CopyTwoBytesReverseEndian
|
call Trade_CopyTwoBytesReverseEndian
|
||||||
|
|
||||||
@ -245,7 +245,7 @@ DoNPCTrade:
|
|||||||
call Trade_CopyTwoBytes
|
call Trade_CopyTwoBytes
|
||||||
|
|
||||||
ld e, NPCTRADE_ITEM
|
ld e, NPCTRADE_ITEM
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
push hl
|
push hl
|
||||||
ld hl, wPartyMon1Item
|
ld hl, wPartyMon1Item
|
||||||
ld bc, PARTYMON_STRUCT_LENGTH
|
ld bc, PARTYMON_STRUCT_LENGTH
|
||||||
@ -272,7 +272,7 @@ DoNPCTrade:
|
|||||||
pop af
|
pop af
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetTradeAttribute:
|
GetTradeAttr:
|
||||||
ld d, 0
|
ld d, 0
|
||||||
push de
|
push de
|
||||||
ld a, [wJumptableIndex]
|
ld a, [wJumptableIndex]
|
||||||
@ -302,7 +302,7 @@ Trade_GetAttributeOfLastPartymon:
|
|||||||
|
|
||||||
GetTradeMonName:
|
GetTradeMonName:
|
||||||
push de
|
push de
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetBasePokemonName
|
call GetBasePokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
@ -345,7 +345,7 @@ Trade_CopyTwoBytesReverseEndian:
|
|||||||
|
|
||||||
GetTradeMonNames:
|
GetTradeMonNames:
|
||||||
ld e, NPCTRADE_GETMON
|
ld e, NPCTRADE_GETMON
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call GetTradeMonName
|
call GetTradeMonName
|
||||||
|
|
||||||
@ -353,7 +353,7 @@ GetTradeMonNames:
|
|||||||
call CopyTradeName
|
call CopyTradeName
|
||||||
|
|
||||||
ld e, NPCTRADE_GIVEMON
|
ld e, NPCTRADE_GIVEMON
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
call GetTradeMonName
|
call GetTradeMonName
|
||||||
|
|
||||||
@ -369,7 +369,7 @@ GetTradeMonNames:
|
|||||||
dec hl
|
dec hl
|
||||||
push hl
|
push hl
|
||||||
ld e, NPCTRADE_GENDER
|
ld e, NPCTRADE_GENDER
|
||||||
call GetTradeAttribute
|
call GetTradeAttr
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
pop hl
|
pop hl
|
||||||
and a ; TRADE_GENDER_EITHER
|
and a ; TRADE_GENDER_EITHER
|
||||||
|
@ -51,26 +51,26 @@ _GiveOddEgg:
|
|||||||
ld a, EGG_TICKET
|
ld a, EGG_TICKET
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wCurItemQuantity], a
|
ld [wCurItemQuantity], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call TossItem
|
call TossItem
|
||||||
|
|
||||||
; load species in wcd2a
|
; load species in wMobileMonSpecies
|
||||||
ld a, EGG
|
ld a, EGG
|
||||||
ld [wMobileMonSpeciesBuffer], a
|
ld [wMobileMonSpecies], a
|
||||||
|
|
||||||
; load pointer to (wMobileMonSpeciesBuffer - 1) in wMobileMonSpeciesPointerBuffer
|
; load pointer to (wMobileMonSpecies - 1) in wMobileMonSpeciesPointer
|
||||||
ld a, LOW(wMobileMonSpeciesBuffer - 1)
|
ld a, LOW(wMobileMonSpecies - 1)
|
||||||
ld [wMobileMonSpeciesPointerBuffer], a
|
ld [wMobileMonSpeciesPointer], a
|
||||||
ld a, HIGH(wMobileMonSpeciesBuffer - 1)
|
ld a, HIGH(wMobileMonSpecies - 1)
|
||||||
ld [wMobileMonSpeciesPointerBuffer + 1], a
|
ld [wMobileMonSpeciesPointer + 1], a
|
||||||
; load pointer to wOddEgg in wMobileMonStructurePointerBuffer
|
; load pointer to wOddEgg in wMobileMonStructPointer
|
||||||
ld a, LOW(wOddEgg)
|
ld a, LOW(wOddEgg)
|
||||||
ld [wMobileMonStructurePointerBuffer], a
|
ld [wMobileMonStructPointer], a
|
||||||
ld a, HIGH(wOddEgg)
|
ld a, HIGH(wOddEgg)
|
||||||
ld [wMobileMonStructurePointerBuffer + 1], a
|
ld [wMobileMonStructPointer + 1], a
|
||||||
|
|
||||||
; load Odd Egg Name in wTempOddEggNickname
|
; load Odd Egg Name in wTempOddEggNickname
|
||||||
ld hl, .Odd
|
ld hl, .Odd
|
||||||
@ -78,16 +78,16 @@ _GiveOddEgg:
|
|||||||
ld bc, MON_NAME_LENGTH
|
ld bc, MON_NAME_LENGTH
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
; load pointer to wTempOddEggNickname in wMobileMonOTNamePointerBuffer
|
; load pointer to wTempOddEggNickname in wMobileMonOTNamePointer
|
||||||
ld a, LOW(wTempOddEggNickname)
|
ld a, LOW(wTempOddEggNickname)
|
||||||
ld [wMobileMonOTNamePointerBuffer], a
|
ld [wMobileMonOTNamePointer], a
|
||||||
ld a, HIGH(wTempOddEggNickname)
|
ld a, HIGH(wTempOddEggNickname)
|
||||||
ld [wMobileMonOTNamePointerBuffer + 1], a
|
ld [wMobileMonOTNamePointer + 1], a
|
||||||
; load pointer to wOddEggName in wMobileMonNicknamePointerBuffer
|
; load pointer to wOddEggName in wMobileMonNicknamePointer
|
||||||
ld a, LOW(wOddEggName)
|
ld a, LOW(wOddEggName)
|
||||||
ld [wMobileMonNicknamePointerBuffer], a
|
ld [wMobileMonNicknamePointer], a
|
||||||
ld a, HIGH(wOddEggName)
|
ld a, HIGH(wOddEggName)
|
||||||
ld [wMobileMonNicknamePointerBuffer + 1], a
|
ld [wMobileMonNicknamePointer + 1], a
|
||||||
farcall AddMobileMonToParty
|
farcall AddMobileMonToParty
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -342,13 +342,13 @@ PlayerWithdrawItemMenu:
|
|||||||
.Submenu:
|
.Submenu:
|
||||||
; check if the item has a quantity
|
; check if the item has a quantity
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr z, .askquantity
|
jr z, .askquantity
|
||||||
|
|
||||||
; items without quantity are always ×1
|
; items without quantity are always ×1
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
jr .withdraw
|
jr .withdraw
|
||||||
|
|
||||||
.askquantity
|
.askquantity
|
||||||
@ -360,15 +360,15 @@ PlayerWithdrawItemMenu:
|
|||||||
jr c, .done
|
jr c, .done
|
||||||
|
|
||||||
.withdraw
|
.withdraw
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wPCItemQuantityChangeBuffer], a
|
ld [wPCItemQuantityChange], a
|
||||||
ld a, [wCurItemQuantity]
|
ld a, [wCurItemQuantity]
|
||||||
ld [wPCItemQuantity], a
|
ld [wPCItemQuantity], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
jr nc, .PackFull
|
jr nc, .PackFull
|
||||||
ld a, [wPCItemQuantityChangeBuffer]
|
ld a, [wPCItemQuantityChange]
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld a, [wPCItemQuantity]
|
ld a, [wPCItemQuantity]
|
||||||
ld [wCurItemQuantity], a
|
ld [wCurItemQuantity], a
|
||||||
ld hl, wNumPCItems
|
ld hl, wNumPCItems
|
||||||
@ -469,7 +469,7 @@ PlayerDepositItemMenu:
|
|||||||
ld a, FALSE
|
ld a, FALSE
|
||||||
ld [wSpriteUpdatesEnabled], a
|
ld [wSpriteUpdatesEnabled], a
|
||||||
farcall CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
ld hl, .dw
|
ld hl, .dw
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
pop af
|
pop af
|
||||||
@ -490,7 +490,7 @@ PlayerDepositItemMenu:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.tossable
|
.tossable
|
||||||
ld a, [wPCItemQuantityChangeBuffer]
|
ld a, [wPCItemQuantityChange]
|
||||||
push af
|
push af
|
||||||
ld a, [wPCItemQuantity]
|
ld a, [wPCItemQuantity]
|
||||||
push af
|
push af
|
||||||
@ -498,16 +498,16 @@ PlayerDepositItemMenu:
|
|||||||
pop af
|
pop af
|
||||||
ld [wPCItemQuantity], a
|
ld [wPCItemQuantity], a
|
||||||
pop af
|
pop af
|
||||||
ld [wPCItemQuantityChangeBuffer], a
|
ld [wPCItemQuantityChange], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.DepositItem:
|
.DepositItem:
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr z, .AskQuantity
|
jr z, .AskQuantity
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
jr .ContinueDeposit
|
jr .ContinueDeposit
|
||||||
|
|
||||||
.AskQuantity:
|
.AskQuantity:
|
||||||
@ -521,15 +521,15 @@ PlayerDepositItemMenu:
|
|||||||
jr c, .DeclinedToDeposit
|
jr c, .DeclinedToDeposit
|
||||||
|
|
||||||
.ContinueDeposit:
|
.ContinueDeposit:
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wPCItemQuantityChangeBuffer], a
|
ld [wPCItemQuantityChange], a
|
||||||
ld a, [wCurItemQuantity]
|
ld a, [wCurItemQuantity]
|
||||||
ld [wPCItemQuantity], a
|
ld [wPCItemQuantity], a
|
||||||
ld hl, wNumPCItems
|
ld hl, wNumPCItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
jr nc, .NoRoomInPC
|
jr nc, .NoRoomInPC
|
||||||
ld a, [wPCItemQuantityChangeBuffer]
|
ld a, [wPCItemQuantityChange]
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld a, [wPCItemQuantity]
|
ld a, [wPCItemQuantity]
|
||||||
ld [wCurItemQuantity], a
|
ld [wCurItemQuantity], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
@ -580,7 +580,7 @@ PCItemsJoypad:
|
|||||||
ld c, 18
|
ld c, 18
|
||||||
call Textbox
|
call Textbox
|
||||||
ld a, [wPCItemsCursor]
|
ld a, [wPCItemsCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wPCItemsScrollPosition]
|
ld a, [wPCItemsScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
|
@ -34,7 +34,7 @@ GameCornerPrizeMonCheckDex:
|
|||||||
call SetSeenAndCaughtMon
|
call SetSeenAndCaughtMon
|
||||||
call FadeToMenu
|
call FadeToMenu
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
farcall NewPokedexEntry
|
farcall NewPokedexEntry
|
||||||
call ExitAllMenus
|
call ExitAllMenus
|
||||||
ret
|
ret
|
||||||
@ -144,7 +144,7 @@ GetMysteryGiftItem:
|
|||||||
ld a, [sMysteryGiftItem]
|
ld a, [sMysteryGiftItem]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
jr nc, .no_room
|
jr nc, .no_room
|
||||||
@ -152,7 +152,7 @@ GetMysteryGiftItem:
|
|||||||
ld [sMysteryGiftItem], a
|
ld [sMysteryGiftItem], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, .ReceiveItemText
|
ld hl, .ReceiveItemText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
@ -29,7 +29,7 @@ SelectQuantityToSell:
|
|||||||
|
|
||||||
Toss_Sell_Loop:
|
Toss_Sell_Loop:
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
.loop
|
.loop
|
||||||
call BuySellToss_UpdateQuantityDisplay ; update display
|
call BuySellToss_UpdateQuantityDisplay ; update display
|
||||||
call BuySellToss_InterpretJoypad ; joy action
|
call BuySellToss_InterpretJoypad ; joy action
|
||||||
@ -71,10 +71,10 @@ BuySellToss_InterpretJoypad:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.down
|
.down
|
||||||
ld hl, wItemQuantityChangeBuffer
|
ld hl, wItemQuantityChange
|
||||||
dec [hl]
|
dec [hl]
|
||||||
jr nz, .finish_down
|
jr nz, .finish_down
|
||||||
ld a, [wItemQuantityBuffer]
|
ld a, [wItemQuantity]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
||||||
.finish_down
|
.finish_down
|
||||||
@ -82,9 +82,9 @@ BuySellToss_InterpretJoypad:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.up
|
.up
|
||||||
ld hl, wItemQuantityChangeBuffer
|
ld hl, wItemQuantityChange
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ld a, [wItemQuantityBuffer]
|
ld a, [wItemQuantity]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr nc, .finish_up
|
jr nc, .finish_up
|
||||||
ld [hl], 1
|
ld [hl], 1
|
||||||
@ -94,7 +94,7 @@ BuySellToss_InterpretJoypad:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.left
|
.left
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
sub 10
|
sub 10
|
||||||
jr c, .load_1
|
jr c, .load_1
|
||||||
jr z, .load_1
|
jr z, .load_1
|
||||||
@ -104,22 +104,22 @@ BuySellToss_InterpretJoypad:
|
|||||||
ld a, 1
|
ld a, 1
|
||||||
|
|
||||||
.finish_left
|
.finish_left
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.right
|
.right
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
add 10
|
add 10
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wItemQuantityBuffer]
|
ld a, [wItemQuantity]
|
||||||
cp b
|
cp b
|
||||||
jr nc, .finish_right
|
jr nc, .finish_right
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
.finish_right
|
.finish_right
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -130,7 +130,7 @@ BuySellToss_UpdateQuantityDisplay:
|
|||||||
add hl, de
|
add hl, de
|
||||||
ld [hl], "×"
|
ld [hl], "×"
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wItemQuantityChangeBuffer
|
ld de, wItemQuantityChange
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld a, [wMenuDataPointer]
|
ld a, [wMenuDataPointer]
|
||||||
@ -163,7 +163,7 @@ BuySell_MultiplyPrice:
|
|||||||
ldh [hMultiplicand + 1], a
|
ldh [hMultiplicand + 1], a
|
||||||
ld a, [wBuySellItemPrice + 1]
|
ld a, [wBuySellItemPrice + 1]
|
||||||
ldh [hMultiplicand + 2], a
|
ldh [hMultiplicand + 2], a
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ldh [hMultiplier], a
|
ldh [hMultiplier], a
|
||||||
push hl
|
push hl
|
||||||
call Multiply
|
call Multiply
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
_DoItemEffect::
|
_DoItemEffect::
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ld a, 1
|
ld a, 1
|
||||||
@ -566,7 +566,7 @@ PokeBallEffect:
|
|||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
@ -626,7 +626,7 @@ PokeBallEffect:
|
|||||||
call PrintText
|
call PrintText
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
@ -702,7 +702,7 @@ PokeBallEffect:
|
|||||||
.toss
|
.toss
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
inc a
|
inc a
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
jp TossItem
|
jp TossItem
|
||||||
|
|
||||||
.used_park_ball
|
.used_park_ball
|
||||||
@ -2333,7 +2333,7 @@ RestorePPEffect:
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
pop hl
|
pop hl
|
||||||
@ -2594,7 +2594,7 @@ UseItemText:
|
|||||||
UseDisposableItem:
|
UseDisposableItem:
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
jp TossItem
|
jp TossItem
|
||||||
|
|
||||||
UseBallInTrainerBattle:
|
UseBallInTrainerBattle:
|
||||||
|
@ -4,7 +4,7 @@ _ReceiveItem::
|
|||||||
push hl
|
push hl
|
||||||
call CheckItemPocket
|
call CheckItemPocket
|
||||||
pop de
|
pop de
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
dec a
|
dec a
|
||||||
ld hl, .Pockets
|
ld hl, .Pockets
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -45,7 +45,7 @@ _TossItem::
|
|||||||
push hl
|
push hl
|
||||||
call CheckItemPocket
|
call CheckItemPocket
|
||||||
pop de
|
pop de
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
dec a
|
dec a
|
||||||
ld hl, .Pockets
|
ld hl, .Pockets
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -88,7 +88,7 @@ _CheckItem::
|
|||||||
push hl
|
push hl
|
||||||
call CheckItemPocket
|
call CheckItemPocket
|
||||||
pop de
|
pop de
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
dec a
|
dec a
|
||||||
ld hl, .Pockets
|
ld hl, .Pockets
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
@ -172,7 +172,7 @@ PutItemInPocket:
|
|||||||
sub [hl]
|
sub [hl]
|
||||||
add b
|
add b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
cp b
|
cp b
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
@ -194,8 +194,8 @@ PutItemInPocket:
|
|||||||
ld l, e
|
ld l, e
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
.loop2
|
.loop2
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
@ -203,7 +203,7 @@ PutItemInPocket:
|
|||||||
jr z, .terminator2
|
jr z, .terminator2
|
||||||
cp c
|
cp c
|
||||||
jr nz, .loop2
|
jr nz, .loop2
|
||||||
ld a, [wItemQuantityBuffer]
|
ld a, [wItemQuantity]
|
||||||
add [hl]
|
add [hl]
|
||||||
cp MAX_ITEM_STACK + 1
|
cp MAX_ITEM_STACK + 1
|
||||||
jr nc, .newstack
|
jr nc, .newstack
|
||||||
@ -213,14 +213,14 @@ PutItemInPocket:
|
|||||||
.newstack
|
.newstack
|
||||||
ld [hl], MAX_ITEM_STACK
|
ld [hl], MAX_ITEM_STACK
|
||||||
sub MAX_ITEM_STACK
|
sub MAX_ITEM_STACK
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
jr .loop2
|
jr .loop2
|
||||||
|
|
||||||
.terminator2
|
.terminator2
|
||||||
dec hl
|
dec hl
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wItemQuantityBuffer]
|
ld a, [wItemQuantity]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], -1
|
ld [hl], -1
|
||||||
ld h, d
|
ld h, d
|
||||||
@ -264,13 +264,13 @@ RemoveItemFromPocket:
|
|||||||
jr .loop
|
jr .loop
|
||||||
|
|
||||||
.skip
|
.skip
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sub b
|
sub b
|
||||||
jr c, .nope
|
jr c, .nope
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
and a
|
and a
|
||||||
jr nz, .yup
|
jr nz, .yup
|
||||||
dec hl
|
dec hl
|
||||||
@ -406,7 +406,7 @@ ReceiveTMHM:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
ld hl, wTMsHMs
|
ld hl, wTMsHMs
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
add [hl]
|
add [hl]
|
||||||
cp MAX_ITEM_STACK + 1
|
cp MAX_ITEM_STACK + 1
|
||||||
jr nc, .toomany
|
jr nc, .toomany
|
||||||
@ -423,13 +423,13 @@ TossTMHM:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
ld hl, wTMsHMs
|
ld hl, wTMsHMs
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [wItemQuantityChangeBuffer]
|
ld a, [wItemQuantityChange]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
sub b
|
sub b
|
||||||
jr c, .nope
|
jr c, .nope
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
jr nz, .yup
|
jr nz, .yup
|
||||||
ld a, [wTMHMPocketScrollPosition]
|
ld a, [wTMHMPocketScrollPosition]
|
||||||
and a
|
and a
|
||||||
@ -492,7 +492,7 @@ GetNumberedTMHM:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_CheckTossableItem::
|
_CheckTossableItem::
|
||||||
; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be removed from the bag.
|
; Return 1 in wItemAttributeValue and carry if wCurItem can't be removed from the bag.
|
||||||
ld a, ITEMATTR_PERMISSIONS
|
ld a, ITEMATTR_PERMISSIONS
|
||||||
call GetItemAttr
|
call GetItemAttr
|
||||||
bit CANT_TOSS_F, a
|
bit CANT_TOSS_F, a
|
||||||
@ -501,7 +501,7 @@ _CheckTossableItem::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CheckSelectableItem:
|
CheckSelectableItem:
|
||||||
; Return 1 in wItemAttributeParamBuffer and carry if wCurItem can't be selected.
|
; Return 1 in wItemAttributeValue and carry if wCurItem can't be selected.
|
||||||
ld a, ITEMATTR_PERMISSIONS
|
ld a, ITEMATTR_PERMISSIONS
|
||||||
call GetItemAttr
|
call GetItemAttr
|
||||||
bit CANT_SELECT_F, a
|
bit CANT_SELECT_F, a
|
||||||
@ -510,28 +510,28 @@ CheckSelectableItem:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
CheckItemPocket::
|
CheckItemPocket::
|
||||||
; Return the pocket for wCurItem in wItemAttributeParamBuffer.
|
; Return the pocket for wCurItem in wItemAttributeValue.
|
||||||
ld a, ITEMATTR_POCKET
|
ld a, ITEMATTR_POCKET
|
||||||
call GetItemAttr
|
call GetItemAttr
|
||||||
and $f
|
and $f
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeValue], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckItemContext:
|
CheckItemContext:
|
||||||
; Return the context for wCurItem in wItemAttributeParamBuffer.
|
; Return the context for wCurItem in wItemAttributeValue.
|
||||||
ld a, ITEMATTR_HELP
|
ld a, ITEMATTR_HELP
|
||||||
call GetItemAttr
|
call GetItemAttr
|
||||||
and $f
|
and $f
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeValue], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CheckItemMenu:
|
CheckItemMenu:
|
||||||
; Return the menu for wCurItem in wItemAttributeParamBuffer.
|
; Return the menu for wCurItem in wItemAttributeValue.
|
||||||
ld a, ITEMATTR_HELP
|
ld a, ITEMATTR_HELP
|
||||||
call GetItemAttr
|
call GetItemAttr
|
||||||
swap a
|
swap a
|
||||||
and $f
|
and $f
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeValue], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
GetItemAttr:
|
GetItemAttr:
|
||||||
@ -546,7 +546,7 @@ GetItemAttr:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeValue], a
|
||||||
|
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
dec a
|
dec a
|
||||||
@ -562,7 +562,7 @@ GetItemAttr:
|
|||||||
|
|
||||||
ItemAttr_ReturnCarry:
|
ItemAttr_ReturnCarry:
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemAttributeParamBuffer], a
|
ld [wItemAttributeValue], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -339,7 +339,7 @@ BuyMenu:
|
|||||||
xor a
|
xor a
|
||||||
ld [wMenuScrollPositionBackup], a
|
ld [wMenuScrollPositionBackup], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wMenuCursorBufferBackup], a
|
ld [wMenuCursorPositionBackup], a
|
||||||
.loop
|
.loop
|
||||||
call BuyMenuLoop ; menu loop
|
call BuyMenuLoop ; menu loop
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
@ -431,15 +431,15 @@ BuyMenuLoop:
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
ld hl, MenuHeader_Buy
|
ld hl, MenuHeader_Buy
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wMenuCursorBufferBackup]
|
ld a, [wMenuCursorPositionBackup]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wMenuScrollPositionBackup]
|
ld a, [wMenuScrollPositionBackup]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
ld a, [wMenuScrollPosition]
|
ld a, [wMenuScrollPosition]
|
||||||
ld [wMenuScrollPositionBackup], a
|
ld [wMenuScrollPositionBackup], a
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
ld [wMenuCursorBufferBackup], a
|
ld [wMenuCursorPositionBackup], a
|
||||||
call SpeechTextbox
|
call SpeechTextbox
|
||||||
ld a, [wMenuJoypad]
|
ld a, [wMenuJoypad]
|
||||||
cp B_BUTTON
|
cp B_BUTTON
|
||||||
@ -499,7 +499,7 @@ BuyMenuLoop:
|
|||||||
|
|
||||||
StandardMartAskPurchaseQuantity:
|
StandardMartAskPurchaseQuantity:
|
||||||
ld a, MAX_ITEM_STACK
|
ld a, MAX_ITEM_STACK
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
ld a, MARTTEXT_HOW_MANY
|
ld a, MARTTEXT_HOW_MANY
|
||||||
call LoadBuyMenuText
|
call LoadBuyMenuText
|
||||||
farcall SelectQuantityToBuy
|
farcall SelectQuantityToBuy
|
||||||
@ -515,7 +515,7 @@ MartConfirmPurchase:
|
|||||||
|
|
||||||
BargainShopAskPurchaseQuantity:
|
BargainShopAskPurchaseQuantity:
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld a, [wMartItemID]
|
ld a, [wMartItemID]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
@ -558,7 +558,7 @@ RooftopSaleAskPurchaseQuantity:
|
|||||||
call LoadBuyMenuText
|
call LoadBuyMenuText
|
||||||
call .GetSalePrice
|
call .GetSalePrice
|
||||||
ld a, MAX_ITEM_STACK
|
ld a, MAX_ITEM_STACK
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
farcall RooftopSale_SelectQuantityToBuy
|
farcall RooftopSale_SelectQuantityToBuy
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
ret
|
ret
|
||||||
@ -734,7 +734,7 @@ SellMenu:
|
|||||||
|
|
||||||
.TryToSellItem:
|
.TryToSellItem:
|
||||||
farcall CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
ld hl, .dw
|
ld hl, .dw
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
@ -753,7 +753,7 @@ SellMenu:
|
|||||||
|
|
||||||
.try_sell
|
.try_sell
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr z, .okay_to_sell
|
jr z, .okay_to_sell
|
||||||
ld hl, MartCantBuyText
|
ld hl, MartCantBuyText
|
||||||
|
@ -74,7 +74,7 @@ Pack:
|
|||||||
ld hl, ItemsPocketMenuHeader
|
ld hl, ItemsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wItemsPocketCursor]
|
ld a, [wItemsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wItemsPocketScrollPosition]
|
ld a, [wItemsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -102,7 +102,7 @@ Pack:
|
|||||||
ld hl, KeyItemsPocketMenuHeader
|
ld hl, KeyItemsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wKeyItemsPocketCursor]
|
ld a, [wKeyItemsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wKeyItemsPocketScrollPosition]
|
ld a, [wKeyItemsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -135,7 +135,7 @@ Pack:
|
|||||||
call Pack_InterpretJoypad
|
call Pack_InterpretJoypad
|
||||||
ret c
|
ret c
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .use_quit
|
jr nz, .use_quit
|
||||||
ld hl, .MenuHeader2
|
ld hl, .MenuHeader2
|
||||||
@ -224,7 +224,7 @@ Pack:
|
|||||||
ld hl, BallsPocketMenuHeader
|
ld hl, BallsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wBallsPocketCursor]
|
ld a, [wBallsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wBallsPocketScrollPosition]
|
ld a, [wBallsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -241,29 +241,29 @@ Pack:
|
|||||||
|
|
||||||
.ItemBallsKey_LoadSubmenu:
|
.ItemBallsKey_LoadSubmenu:
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .tossable
|
jr nz, .tossable
|
||||||
farcall CheckSelectableItem
|
farcall CheckSelectableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .selectable
|
jr nz, .selectable
|
||||||
farcall CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .usable
|
jr nz, .usable
|
||||||
jr .unusable
|
jr .unusable
|
||||||
|
|
||||||
.selectable
|
.selectable
|
||||||
farcall CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .selectable_usable
|
jr nz, .selectable_usable
|
||||||
jr .selectable_unusable
|
jr .selectable_unusable
|
||||||
|
|
||||||
.tossable
|
.tossable
|
||||||
farcall CheckSelectableItem
|
farcall CheckSelectableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .tossable_selectable
|
jr nz, .tossable_selectable
|
||||||
jr .tossable_unselectable
|
jr .tossable_unselectable
|
||||||
@ -424,7 +424,7 @@ Jumptable_GiveTossQuit:
|
|||||||
|
|
||||||
UseItem:
|
UseItem:
|
||||||
farcall CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
ld hl, .dw
|
ld hl, .dw
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
@ -529,7 +529,7 @@ ResetPocketCursorPositions: ; unreferenced
|
|||||||
|
|
||||||
RegisterItem:
|
RegisterItem:
|
||||||
farcall CheckSelectableItem
|
farcall CheckSelectableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .cant_register
|
jr nz, .cant_register
|
||||||
ld a, [wCurPocket]
|
ld a, [wCurPocket]
|
||||||
@ -683,7 +683,7 @@ BattlePack:
|
|||||||
ld hl, ItemsPocketMenuHeader
|
ld hl, ItemsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wItemsPocketCursor]
|
ld a, [wItemsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wItemsPocketScrollPosition]
|
ld a, [wItemsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -711,7 +711,7 @@ BattlePack:
|
|||||||
ld hl, KeyItemsPocketMenuHeader
|
ld hl, KeyItemsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wKeyItemsPocketCursor]
|
ld a, [wKeyItemsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wKeyItemsPocketScrollPosition]
|
ld a, [wKeyItemsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -762,7 +762,7 @@ BattlePack:
|
|||||||
ld hl, BallsPocketMenuHeader
|
ld hl, BallsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wBallsPocketCursor]
|
ld a, [wBallsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wBallsPocketScrollPosition]
|
ld a, [wBallsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -779,7 +779,7 @@ BattlePack:
|
|||||||
|
|
||||||
ItemSubmenu:
|
ItemSubmenu:
|
||||||
farcall CheckItemContext
|
farcall CheckItemContext
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
TMHMSubmenu:
|
TMHMSubmenu:
|
||||||
and a
|
and a
|
||||||
jr z, .NoUse
|
jr z, .NoUse
|
||||||
@ -834,7 +834,7 @@ TMHMSubmenu:
|
|||||||
|
|
||||||
.Use:
|
.Use:
|
||||||
farcall CheckItemContext
|
farcall CheckItemContext
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
ld hl, .ItemFunctionJumptable
|
ld hl, .ItemFunctionJumptable
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
@ -951,7 +951,7 @@ DepositSellPack:
|
|||||||
ld hl, PC_Mart_ItemsPocketMenuHeader
|
ld hl, PC_Mart_ItemsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wItemsPocketCursor]
|
ld a, [wItemsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wItemsPocketScrollPosition]
|
ld a, [wItemsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -967,7 +967,7 @@ DepositSellPack:
|
|||||||
ld hl, PC_Mart_KeyItemsPocketMenuHeader
|
ld hl, PC_Mart_KeyItemsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wKeyItemsPocketCursor]
|
ld a, [wKeyItemsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wKeyItemsPocketScrollPosition]
|
ld a, [wKeyItemsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -992,7 +992,7 @@ DepositSellPack:
|
|||||||
ld hl, PC_Mart_BallsPocketMenuHeader
|
ld hl, PC_Mart_BallsPocketMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wBallsPocketCursor]
|
ld a, [wBallsPocketCursor]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wBallsPocketScrollPosition]
|
ld a, [wBallsPocketScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -1415,7 +1415,7 @@ INCBIN "gfx/pack/pack_menu.tilemap"
|
|||||||
|
|
||||||
Pack_GetItemName:
|
Pack_GetItemName:
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ret
|
ret
|
||||||
|
@ -15,7 +15,7 @@ TMHMPocket:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
call .ConvertItemToTMHMNumber
|
call .ConvertItemToTMHMNumber
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -377,7 +377,7 @@ TMHM_DisplayPocketItems:
|
|||||||
ld [wTempTMHM], a
|
ld [wTempTMHM], a
|
||||||
.okay
|
.okay
|
||||||
predef GetTMHMMove
|
predef GetTMHMMove
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -38,7 +38,7 @@ InitList:
|
|||||||
ld de, ItemNames
|
ld de, ItemNames
|
||||||
ld a, ITEM_NAME
|
ld a, ITEM_NAME
|
||||||
.done
|
.done
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wListPointer], a
|
ld [wListPointer], a
|
||||||
ld a, h
|
ld a, h
|
||||||
@ -49,7 +49,7 @@ InitList:
|
|||||||
ld [wUnusedNamesPointer + 1], a
|
ld [wUnusedNamesPointer + 1], a
|
||||||
ld bc, ItemAttributes
|
ld bc, ItemAttributes
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wItemAttributesPtr], a
|
ld [wItemAttributesPointer], a
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wItemAttributesPtr + 1], a
|
ld [wItemAttributesPointer + 1], a
|
||||||
ret
|
ret
|
||||||
|
@ -990,7 +990,7 @@ Link_ConvertPartyStruct1to2:
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld bc, wLinkOTPartyMonTypes
|
ld bc, wLinkOTPartyMonTypes
|
||||||
ld hl, wCurLinkOTPartyMonTypePtr
|
ld hl, wCurLinkOTPartyMonTypePointer
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
@ -1040,7 +1040,7 @@ Link_ConvertPartyStruct1to2:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld hl, wCurLinkOTPartyMonTypePtr
|
ld hl, wCurLinkOTPartyMonTypePointer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -1051,9 +1051,9 @@ Link_ConvertPartyStruct1to2:
|
|||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc de
|
inc de
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wCurLinkOTPartyMonTypePtr], a
|
ld [wCurLinkOTPartyMonTypePointer], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wCurLinkOTPartyMonTypePtr + 1], a
|
ld [wCurLinkOTPartyMonTypePointer + 1], a
|
||||||
push bc
|
push bc
|
||||||
ld hl, MON_ITEM
|
ld hl, MON_ITEM
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -1504,7 +1504,7 @@ LinkTrade_TradeStatsMenu:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
ld b, 4
|
ld b, 4
|
||||||
@ -1669,7 +1669,7 @@ LinkTrade:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wBufferTrademonNick
|
ld de, wBufferTrademonNick
|
||||||
@ -1681,7 +1681,7 @@ LinkTrade:
|
|||||||
ld b, 0
|
ld b, 0
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, LinkAskTradeForText
|
ld hl, LinkAskTradeForText
|
||||||
bccoord 1, 14
|
bccoord 1, 14
|
||||||
@ -2123,14 +2123,14 @@ CheckTimeCapsuleCompatibility:
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.mon_too_new
|
.mon_too_new
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld a, $1
|
ld a, $1
|
||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.move_too_new
|
.move_too_new
|
||||||
push bc
|
push bc
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
pop bc
|
pop bc
|
||||||
@ -2156,7 +2156,7 @@ GetIncompatibleMonName:
|
|||||||
ld hl, wPartyCount
|
ld hl, wPartyCount
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -123,7 +123,7 @@ DoMysteryGift:
|
|||||||
farcall MysteryGiftGetItem
|
farcall MysteryGiftGetItem
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [sBackupMysteryGiftItem], a
|
ld [sBackupMysteryGiftItem], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, .MysteryGiftSentText ; sent item/decoration
|
ld hl, .MysteryGiftSentText ; sent item/decoration
|
||||||
@ -1602,7 +1602,7 @@ DoNameCardSwap:
|
|||||||
ld de, wNameCardData
|
ld de, wNameCardData
|
||||||
farcall Function8ac70
|
farcall Function8ac70
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld hl, .NameCardNotRegisteredCardText
|
ld hl, .NameCardNotRegisteredCardText
|
||||||
jr c, .PrintTextAndExit
|
jr c, .PrintTextAndExit
|
||||||
ld hl, .NameCardListedCardText
|
ld hl, .NameCardListedCardText
|
||||||
|
@ -122,7 +122,7 @@ PlaceTradePartnerNamesAndParty:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp -1
|
cp -1
|
||||||
ret z
|
ret z
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
|
@ -51,7 +51,7 @@ _InterpretMobileMenu::
|
|||||||
ld c, a
|
ld c, a
|
||||||
ld a, [w2DMenuNumRows]
|
ld a, [w2DMenuNumRows]
|
||||||
call SimpleMultiply
|
call SimpleMultiply
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -91,7 +91,7 @@ Mobile_GetMenuSelection:
|
|||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wMenuCursorX]
|
ld a, [wMenuCursorX]
|
||||||
add c
|
add c
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -172,7 +172,7 @@ Init2DMenuCursorPosition:
|
|||||||
call .InitFlags_c
|
call .InitFlags_c
|
||||||
ld a, [w2DMenuNumCols]
|
ld a, [w2DMenuNumCols]
|
||||||
ld e, a
|
ld e, a
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ld b, a
|
ld b, a
|
||||||
xor a
|
xor a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
@ -780,7 +780,7 @@ _InitVerticalMenuCursor::
|
|||||||
.skip_bit_1
|
.skip_bit_1
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
; wMenuCursorY
|
; wMenuCursorY
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
and a
|
and a
|
||||||
jr z, .load_at_the_top
|
jr z, .load_at_the_top
|
||||||
ld c, a
|
ld c, a
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
PlaceMenuItemName:
|
PlaceMenuItemName:
|
||||||
push de
|
push de
|
||||||
ld a, [wMenuSelection]
|
ld a, [wMenuSelection]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
pop hl
|
pop hl
|
||||||
call PlaceString
|
call PlaceString
|
||||||
@ -12,7 +12,7 @@ PlaceMenuItemQuantity:
|
|||||||
ld a, [wMenuSelection]
|
ld a, [wMenuSelection]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
pop hl
|
pop hl
|
||||||
and a
|
and a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
@ -169,7 +169,7 @@ StartMenu_PrintBugContestStatus:
|
|||||||
and a
|
and a
|
||||||
ld de, .NoneString
|
ld de, .NoneString
|
||||||
jr z, .no_contest_mon
|
jr z, .no_contest_mon
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
.no_contest_mon
|
.no_contest_mon
|
||||||
|
@ -91,7 +91,7 @@ NamingScreen:
|
|||||||
ld e, MONICON_NAMINGSCREEN
|
ld e, MONICON_NAMINGSCREEN
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
hlcoord 5, 2
|
hlcoord 5, 2
|
||||||
call PlaceString
|
call PlaceString
|
||||||
|
@ -91,7 +91,7 @@ ScrollingMenuJoyAction:
|
|||||||
ld a, [wMenuSelection]
|
ld a, [wMenuSelection]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
ld a, [wMenuSelectionQuantity]
|
ld a, [wMenuSelectionQuantity]
|
||||||
ld [wItemQuantityBuffer], a
|
ld [wItemQuantity], a
|
||||||
call ScrollingMenu_GetCursorPosition
|
call ScrollingMenu_GetCursorPosition
|
||||||
dec a
|
dec a
|
||||||
ld [wScrollingMenuCursorPosition], a
|
ld [wScrollingMenuCursorPosition], a
|
||||||
@ -238,7 +238,7 @@ InitScrollingMenuCursor:
|
|||||||
.skip
|
.skip
|
||||||
ld a, [wMenuScrollPosition]
|
ld a, [wMenuScrollPosition]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
add c
|
add c
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wScrollingMenuListSize]
|
ld a, [wScrollingMenuListSize]
|
||||||
@ -251,7 +251,7 @@ InitScrollingMenuCursor:
|
|||||||
xor a
|
xor a
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
|
|
||||||
.done
|
.done
|
||||||
ret
|
ret
|
||||||
@ -307,7 +307,7 @@ ScrollingMenu_InitFlags:
|
|||||||
ld [wMenuJoypadFilter], a
|
ld [wMenuJoypadFilter], a
|
||||||
ld a, [w2DMenuNumRows]
|
ld a, [w2DMenuNumRows]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
and a
|
and a
|
||||||
jr z, .reset_cursor
|
jr z, .reset_cursor
|
||||||
cp b
|
cp b
|
||||||
|
@ -27,8 +27,8 @@ StartMenu::
|
|||||||
.GotMenuData:
|
.GotMenuData:
|
||||||
call LoadMenuHeader
|
call LoadMenuHeader
|
||||||
call .SetUpMenuItems
|
call .SetUpMenuItems
|
||||||
ld a, [wBattleMenuCursorBuffer]
|
ld a, [wBattleMenuCursorPosition]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call .DrawMenuAccount
|
call .DrawMenuAccount
|
||||||
call DrawVariableLengthMenuBox
|
call DrawVariableLengthMenuBox
|
||||||
call .DrawBugContestStatusBox
|
call .DrawBugContestStatusBox
|
||||||
@ -43,15 +43,15 @@ StartMenu::
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
call UpdateTimePals
|
call UpdateTimePals
|
||||||
call .SetUpMenuItems
|
call .SetUpMenuItems
|
||||||
ld a, [wBattleMenuCursorBuffer]
|
ld a, [wBattleMenuCursorPosition]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
|
|
||||||
.Select:
|
.Select:
|
||||||
call .GetInput
|
call .GetInput
|
||||||
jr c, .Exit
|
jr c, .Exit
|
||||||
call ._DrawMenuAccount
|
call ._DrawMenuAccount
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ld [wBattleMenuCursorBuffer], a
|
ld [wBattleMenuCursorPosition], a
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
call PlaceHollowCursor
|
call PlaceHollowCursor
|
||||||
call .OpenMenu
|
call .OpenMenu
|
||||||
|
@ -819,7 +819,7 @@ TradeAnim_GetFrontpic:
|
|||||||
|
|
||||||
TradeAnim_GetNickname:
|
TradeAnim_GetNickname:
|
||||||
push de
|
push de
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
|
@ -16,7 +16,7 @@ _PlayerDecorationMenu:
|
|||||||
ld [wCurDecorationCategory], a
|
ld [wCurDecorationCategory], a
|
||||||
.top_loop
|
.top_loop
|
||||||
ld a, [wCurDecorationCategory]
|
ld a, [wCurDecorationCategory]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call .FindCategoriesWithOwnedDecos
|
call .FindCategoriesWithOwnedDecos
|
||||||
call DoNthMenu
|
call DoNthMenu
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
@ -561,7 +561,7 @@ GetDecoName:
|
|||||||
|
|
||||||
.getpokename
|
.getpokename
|
||||||
push bc
|
push bc
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
pop bc
|
pop bc
|
||||||
jr .copy
|
jr .copy
|
||||||
|
@ -137,7 +137,7 @@ ScriptCommandTable:
|
|||||||
dw Script_opentext ; 47
|
dw Script_opentext ; 47
|
||||||
dw Script_refreshscreen ; 48
|
dw Script_refreshscreen ; 48
|
||||||
dw Script_closetext ; 49
|
dw Script_closetext ; 49
|
||||||
dw Script_writeunusedbytebuffer ; 4a
|
dw Script_writeunusedbyte ; 4a
|
||||||
dw Script_farwritetext ; 4b
|
dw Script_farwritetext ; 4b
|
||||||
dw Script_writetext ; 4c
|
dw Script_writetext ; 4c
|
||||||
dw Script_repeattext ; 4d
|
dw Script_repeattext ; 4d
|
||||||
@ -434,7 +434,7 @@ Script__2dmenu:
|
|||||||
ld a, [wScriptBank]
|
ld a, [wScriptBank]
|
||||||
ld hl, _2DMenu
|
ld hl, _2DMenu
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
jr nc, .ok
|
jr nc, .ok
|
||||||
xor a
|
xor a
|
||||||
.ok
|
.ok
|
||||||
@ -490,7 +490,7 @@ Script_verbosegiveitemvar:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
call GetVarAction
|
call GetVarAction
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
ld a, TRUE
|
ld a, TRUE
|
||||||
@ -524,7 +524,7 @@ Script_pocketisfull:
|
|||||||
|
|
||||||
Script_specialsound:
|
Script_specialsound:
|
||||||
farcall CheckItemPocket
|
farcall CheckItemPocket
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
cp TM_HM
|
cp TM_HM
|
||||||
ld de, SFX_GET_TM
|
ld de, SFX_GET_TM
|
||||||
jr z, .play
|
jr z, .play
|
||||||
@ -536,7 +536,7 @@ Script_specialsound:
|
|||||||
|
|
||||||
GetPocketName:
|
GetPocketName:
|
||||||
farcall CheckItemPocket
|
farcall CheckItemPocket
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
dec a
|
dec a
|
||||||
ld hl, ItemPocketNames
|
ld hl, ItemPocketNames
|
||||||
maskbits NUM_POCKETS
|
maskbits NUM_POCKETS
|
||||||
@ -555,7 +555,7 @@ INCLUDE "data/items/pocket_names.asm"
|
|||||||
|
|
||||||
CurItemName:
|
CurItemName:
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -1577,7 +1577,7 @@ Script_getmonname:
|
|||||||
jr nz, .gotit
|
jr nz, .gotit
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
.gotit
|
.gotit
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
|
|
||||||
@ -1601,7 +1601,7 @@ Script_getitemname:
|
|||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ld a, [wScriptVar]
|
ld a, [wScriptVar]
|
||||||
.ok
|
.ok
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
jr GetStringBuffer
|
jr GetStringBuffer
|
||||||
@ -1633,7 +1633,7 @@ Script_gettrainername:
|
|||||||
|
|
||||||
Script_getname:
|
Script_getname:
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
|
|
||||||
ContinueToGetName:
|
ContinueToGetName:
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
@ -1644,7 +1644,7 @@ ContinueToGetName:
|
|||||||
|
|
||||||
Script_gettrainerclassname:
|
Script_gettrainerclassname:
|
||||||
ld a, TRAINER_NAME
|
ld a, TRAINER_NAME
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
jr ContinueToGetName
|
jr ContinueToGetName
|
||||||
|
|
||||||
Script_getmoney:
|
Script_getmoney:
|
||||||
@ -1728,7 +1728,7 @@ Script_giveitem:
|
|||||||
.ok
|
.ok
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
jr nc, .full
|
jr nc, .full
|
||||||
@ -1746,7 +1746,7 @@ Script_takeitem:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wCurItemQuantity], a
|
ld [wCurItemQuantity], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
@ -2198,9 +2198,9 @@ Script_refreshscreen:
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Script_writeunusedbytebuffer:
|
Script_writeunusedbyte:
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [wUnusedScriptByteBuffer], a
|
ld [wUnusedScriptByte], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
UnusedClosetextScript: ; unreferenced
|
UnusedClosetextScript: ; unreferenced
|
||||||
|
@ -109,7 +109,7 @@ CheckRegisteredItem:
|
|||||||
|
|
||||||
UseRegisteredItem:
|
UseRegisteredItem:
|
||||||
farcall CheckItemMenu
|
farcall CheckItemMenu
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
ld hl, .SwitchTo
|
ld hl, .SwitchTo
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
|
@ -4,7 +4,7 @@ _InitializeStartDay:
|
|||||||
|
|
||||||
ClearDailyTimers:
|
ClearDailyTimers:
|
||||||
xor a
|
xor a
|
||||||
ld [wLuckyNumberDayBuffer], a
|
ld [wLuckyNumberDayTimer], a
|
||||||
ld [wUnusedTwoDayTimer], a
|
ld [wUnusedTwoDayTimer], a
|
||||||
ld [wDailyResetTimer], a
|
ld [wDailyResetTimer], a
|
||||||
ret
|
ret
|
||||||
@ -235,7 +235,7 @@ UnusedCheckSwarmFlag: ; unreferenced
|
|||||||
|
|
||||||
RestartLuckyNumberCountdown:
|
RestartLuckyNumberCountdown:
|
||||||
call .GetDaysUntilNextFriday
|
call .GetDaysUntilNextFriday
|
||||||
ld hl, wLuckyNumberDayBuffer
|
ld hl, wLuckyNumberDayTimer
|
||||||
jp InitNDaysCountdown
|
jp InitNDaysCountdown
|
||||||
|
|
||||||
.GetDaysUntilNextFriday:
|
.GetDaysUntilNextFriday:
|
||||||
@ -253,7 +253,7 @@ RestartLuckyNumberCountdown:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
_CheckLuckyNumberShowFlag:
|
_CheckLuckyNumberShowFlag:
|
||||||
ld hl, wLuckyNumberDayBuffer
|
ld hl, wLuckyNumberDayTimer
|
||||||
jp CheckDayDependentEventHL
|
jp CheckDayDependentEventHL
|
||||||
|
|
||||||
DoMysteryGiftIfDayHasPassed:
|
DoMysteryGiftIfDayHasPassed:
|
||||||
|
@ -28,7 +28,7 @@ LoadWildMonData:
|
|||||||
FindNest:
|
FindNest:
|
||||||
; Parameters:
|
; Parameters:
|
||||||
; e: 0 = Johto, 1 = Kanto
|
; e: 0 = Johto, 1 = Kanto
|
||||||
; wNamedObjectIndexBuffer: species
|
; wNamedObjectIndex: species
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
xor a
|
xor a
|
||||||
@ -102,7 +102,7 @@ FindNest:
|
|||||||
inc hl
|
inc hl
|
||||||
.ScanMapLoop:
|
.ScanMapLoop:
|
||||||
push af
|
push af
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
cp [hl]
|
cp [hl]
|
||||||
jr z, .found
|
jr z, .found
|
||||||
inc hl
|
inc hl
|
||||||
@ -144,7 +144,7 @@ FindNest:
|
|||||||
.RoamMon1:
|
.RoamMon1:
|
||||||
ld a, [wRoamMon1Species]
|
ld a, [wRoamMon1Species]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
cp b
|
cp b
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [wRoamMon1MapGroup]
|
ld a, [wRoamMon1MapGroup]
|
||||||
@ -160,7 +160,7 @@ FindNest:
|
|||||||
.RoamMon2:
|
.RoamMon2:
|
||||||
ld a, [wRoamMon2Species]
|
ld a, [wRoamMon2Species]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
cp b
|
cp b
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [wRoamMon2MapGroup]
|
ld a, [wRoamMon2MapGroup]
|
||||||
@ -822,7 +822,7 @@ RandomUnseenWildMon:
|
|||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, .JustSawSomeRareMonText
|
ld hl, .JustSawSomeRareMonText
|
||||||
call PrintText
|
call PrintText
|
||||||
@ -871,7 +871,7 @@ RandomPhoneWildMon:
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wStringBuffer4
|
ld de, wStringBuffer4
|
||||||
@ -954,7 +954,7 @@ RandomPhoneMon:
|
|||||||
inc hl ; species
|
inc hl ; species
|
||||||
ld a, BANK(Trainers)
|
ld a, BANK(Trainers)
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wStringBuffer4
|
ld de, wStringBuffer4
|
||||||
|
@ -1493,7 +1493,8 @@ Pokedex_PrintListing:
|
|||||||
.loop
|
.loop
|
||||||
push af
|
push af
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [wTempSpecies], a ; also sets wNamedObjectIndexBuffer
|
ld [wTempSpecies], a ; also sets wNamedObjectIndex
|
||||||
|
assert wTempSpecies == wNamedObjectIndex
|
||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
call .PrintEntry
|
call .PrintEntry
|
||||||
|
@ -1037,13 +1037,13 @@ PokegearPhone_UpdateDisplayList:
|
|||||||
ld hl, wPhoneList
|
ld hl, wPhoneList
|
||||||
add hl, de
|
add hl, de
|
||||||
xor a
|
xor a
|
||||||
ld [wPokegearPhoneLoadNameBuffer], a
|
ld [wPokegearPhoneDisplayPosition], a
|
||||||
.loop
|
.loop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
push hl
|
push hl
|
||||||
push af
|
push af
|
||||||
hlcoord 2, 4
|
hlcoord 2, 4
|
||||||
ld a, [wPokegearPhoneLoadNameBuffer]
|
ld a, [wPokegearPhoneDisplayPosition]
|
||||||
ld bc, 2 * SCREEN_WIDTH
|
ld bc, 2 * SCREEN_WIDTH
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ld d, h
|
ld d, h
|
||||||
@ -1052,9 +1052,9 @@ PokegearPhone_UpdateDisplayList:
|
|||||||
ld b, a
|
ld b, a
|
||||||
call GetCallerClassAndName
|
call GetCallerClassAndName
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wPokegearPhoneLoadNameBuffer]
|
ld a, [wPokegearPhoneDisplayPosition]
|
||||||
inc a
|
inc a
|
||||||
ld [wPokegearPhoneLoadNameBuffer], a
|
ld [wPokegearPhoneDisplayPosition], a
|
||||||
cp PHONE_DISPLAY_HEIGHT
|
cp PHONE_DISPLAY_HEIGHT
|
||||||
jr c, .loop
|
jr c, .loop
|
||||||
call PokegearPhone_UpdateCursor
|
call PokegearPhone_UpdateCursor
|
||||||
|
@ -257,7 +257,7 @@ endr
|
|||||||
inc hl ; skip level
|
inc hl ; skip level
|
||||||
ld a, BANK(JohtoGrassWildMons)
|
ld a, BANK(JohtoGrassWildMons)
|
||||||
call GetFarByte
|
call GetFarByte
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
@ -319,7 +319,7 @@ OPT_OakText3:
|
|||||||
|
|
||||||
OaksPKMNTalk7:
|
OaksPKMNTalk7:
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, OPT_MaryText1
|
ld hl, OPT_MaryText1
|
||||||
ld a, OAKS_POKEMON_TALK_8
|
ld a, OAKS_POKEMON_TALK_8
|
||||||
@ -674,7 +674,7 @@ PokedexShow1:
|
|||||||
inc c
|
inc c
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, PokedexShowText
|
ld hl, PokedexShowText
|
||||||
ld a, POKEDEX_SHOW_2
|
ld a, POKEDEX_SHOW_2
|
||||||
@ -1552,7 +1552,7 @@ GetBuenasPassword:
|
|||||||
ld l, c
|
ld l, c
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.RawString:
|
.RawString:
|
||||||
|
@ -130,7 +130,7 @@ _DepositPKMN:
|
|||||||
ld hl, BillsPCDepositMenuHeader
|
ld hl, BillsPCDepositMenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
call StoreTo_wMenuCursorBuffer
|
call StoreMenuCursorPosition
|
||||||
call VerticalMenu
|
call VerticalMenu
|
||||||
jp c, BillsPCDepositFuncCancel
|
jp c, BillsPCDepositFuncCancel
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
@ -387,7 +387,7 @@ BillsPC_Withdraw:
|
|||||||
ld hl, .MenuHeader
|
ld hl, .MenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
call StoreTo_wMenuCursorBuffer
|
call StoreMenuCursorPosition
|
||||||
call VerticalMenu
|
call VerticalMenu
|
||||||
jp c, .cancel
|
jp c, .cancel
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
@ -638,7 +638,7 @@ _MovePKMNWithoutMail:
|
|||||||
ld hl, .MenuHeader
|
ld hl, .MenuHeader
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
call StoreTo_wMenuCursorBuffer
|
call StoreMenuCursorPosition
|
||||||
call VerticalMenu
|
call VerticalMenu
|
||||||
jp c, .Cancel
|
jp c, .Cancel
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
@ -2314,9 +2314,9 @@ BillsPC_PrintBoxCountAndCapacity:
|
|||||||
ld de, .Pokemon
|
ld de, .Pokemon
|
||||||
call PlaceString
|
call PlaceString
|
||||||
call GetBoxCount
|
call GetBoxCount
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
hlcoord 13, 11
|
hlcoord 13, 11
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
lb bc, 1, 2
|
lb bc, 1, 2
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld de, .out_of_20
|
ld de, .out_of_20
|
||||||
|
@ -47,14 +47,14 @@ _BillsPC:
|
|||||||
call LoadMenuHeader
|
call LoadMenuHeader
|
||||||
ld a, $1
|
ld a, $1
|
||||||
.loop
|
.loop
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call SetPalettes
|
call SetPalettes
|
||||||
xor a
|
xor a
|
||||||
ld [wWhichIndexSet], a
|
ld [wWhichIndexSet], a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
call DoNthMenu
|
call DoNthMenu
|
||||||
jr c, .cancel
|
jr c, .cancel
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
push af
|
push af
|
||||||
ld a, [wMenuSelection]
|
ld a, [wMenuSelection]
|
||||||
ld hl, .Jumptable
|
ld hl, .Jumptable
|
||||||
|
@ -250,7 +250,7 @@ HatchEggs:
|
|||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
dec de
|
dec de
|
||||||
ld [de], a
|
ld [de], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
xor a
|
xor a
|
||||||
@ -673,7 +673,7 @@ EggHatch_DoAnimFrame:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
EggHatch_AnimationSequence:
|
EggHatch_AnimationSequence:
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld [wJumptableIndex], a
|
ld [wJumptableIndex], a
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
push af
|
push af
|
||||||
|
@ -38,7 +38,7 @@ CheckPartyFullAfterContest:
|
|||||||
ld hl, wPlayerName
|
ld hl, wPlayerName
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld de, wMonOrItemNameBuffer
|
ld de, wMonOrItemNameBuffer
|
||||||
@ -105,7 +105,7 @@ CheckPartyFullAfterContest:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
callfar InsertPokemonIntoBox
|
callfar InsertPokemonIntoBox
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
call GiveANickname_YesNo
|
call GiveANickname_YesNo
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
|
@ -123,7 +123,7 @@ CorrectPartyErrors: ; unreferenced
|
|||||||
cp EGG
|
cp EGG
|
||||||
ld hl, .TAMAGO
|
ld hl, .TAMAGO
|
||||||
jr z, .got_nickname
|
jr z, .got_nickname
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
.got_nickname
|
.got_nickname
|
||||||
|
@ -236,7 +236,7 @@ EvolveAfterBattle_MasterLoop:
|
|||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld [wTempMonSpecies], a
|
ld [wTempMonSpecies], a
|
||||||
ld [wEvolutionNewSpecies], a
|
ld [wEvolutionNewSpecies], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
@ -348,7 +348,7 @@ UpdateSpeciesNameIfNotNicknamed:
|
|||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
push af
|
push af
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
pop af
|
pop af
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
@ -369,7 +369,7 @@ UpdateSpeciesNameIfNotNicknamed:
|
|||||||
call AddNTimes
|
call AddNTimes
|
||||||
push hl
|
push hl
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
pop de
|
pop de
|
||||||
@ -462,7 +462,7 @@ LearnLevelMoves:
|
|||||||
.learn
|
.learn
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wPutativeTMHMMove], a
|
ld [wPutativeTMHMMove], a
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
predef LearnMove
|
predef LearnMove
|
||||||
|
@ -36,7 +36,7 @@ LearnMove:
|
|||||||
|
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wBattleMode]
|
ld a, [wBattleMode]
|
||||||
|
@ -382,7 +382,7 @@ MailboxPC:
|
|||||||
call UpdateSprites
|
call UpdateSprites
|
||||||
|
|
||||||
ld a, [wCurMessageIndex]
|
ld a, [wCurMessageIndex]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, [wCurMessageScrollPosition]
|
ld a, [wCurMessageScrollPosition]
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
call ScrollingMenu
|
call ScrollingMenu
|
||||||
@ -439,7 +439,7 @@ MailboxPC:
|
|||||||
dec a
|
dec a
|
||||||
call .GetMailType
|
call .GetMailType
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
call ReceiveItem
|
call ReceiveItem
|
||||||
jr c, .put_in_bag
|
jr c, .put_in_bag
|
||||||
|
@ -26,7 +26,7 @@ TossItemFromPC:
|
|||||||
push de
|
push de
|
||||||
call PartyMonItemName
|
call PartyMonItemName
|
||||||
farcall _CheckTossableItem
|
farcall _CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .key_item
|
jr nz, .key_item
|
||||||
ld hl, .ItemsTossOutHowManyText
|
ld hl, .ItemsTossOutHowManyText
|
||||||
@ -93,7 +93,7 @@ ItemsOakWarningText:
|
|||||||
|
|
||||||
PartyMonItemName:
|
PartyMonItemName:
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call CopyName1
|
call CopyName1
|
||||||
ret
|
ret
|
||||||
@ -252,7 +252,7 @@ GiveTakePartyMonItem:
|
|||||||
jr z, .next
|
jr z, .next
|
||||||
|
|
||||||
call CheckTossableItem
|
call CheckTossableItem
|
||||||
ld a, [wItemAttributeParamBuffer]
|
ld a, [wItemAttributeValue]
|
||||||
and a
|
and a
|
||||||
jr nz, .next
|
jr nz, .next
|
||||||
|
|
||||||
@ -296,17 +296,17 @@ TryGiveItemToPartymon:
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
.already_holding_item
|
.already_holding_item
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, PokemonAskSwapItemText
|
ld hl, PokemonAskSwapItemText
|
||||||
call StartMenuYesNo
|
call StartMenuYesNo
|
||||||
jr c, .abort
|
jr c, .abort
|
||||||
|
|
||||||
call GiveItemToPokemon
|
call GiveItemToPokemon
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
push af
|
push af
|
||||||
ld a, [wCurItem]
|
ld a, [wCurItem]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
pop af
|
pop af
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call ReceiveItemFromPokemon
|
call ReceiveItemFromPokemon
|
||||||
@ -314,13 +314,13 @@ TryGiveItemToPartymon:
|
|||||||
|
|
||||||
ld hl, PokemonSwapItemText
|
ld hl, PokemonSwapItemText
|
||||||
call MenuTextboxBackup
|
call MenuTextboxBackup
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call GivePartyItem
|
call GivePartyItem
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.bag_full
|
.bag_full
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld [wCurItem], a
|
ld [wCurItem], a
|
||||||
call ReceiveItemFromPokemon
|
call ReceiveItemFromPokemon
|
||||||
ld hl, ItemStorageFullText
|
ld hl, ItemStorageFullText
|
||||||
@ -355,7 +355,7 @@ TakePartyItem:
|
|||||||
farcall ItemIsMail
|
farcall ItemIsMail
|
||||||
call GetPartyItemLocation
|
call GetPartyItemLocation
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [hl], NO_ITEM
|
ld [hl], NO_ITEM
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ld hl, PokemonTookItemText
|
ld hl, PokemonTookItemText
|
||||||
@ -427,13 +427,13 @@ GetPartyItemLocation:
|
|||||||
|
|
||||||
ReceiveItemFromPokemon:
|
ReceiveItemFromPokemon:
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
jp ReceiveItem
|
jp ReceiveItem
|
||||||
|
|
||||||
GiveItemToPokemon:
|
GiveItemToPokemon:
|
||||||
ld a, 1
|
ld a, 1
|
||||||
ld [wItemQuantityChangeBuffer], a
|
ld [wItemQuantityChange], a
|
||||||
ld hl, wNumItems
|
ld hl, wNumItems
|
||||||
jp TossItem
|
jp TossItem
|
||||||
|
|
||||||
@ -899,7 +899,7 @@ MoveScreenLoop:
|
|||||||
|
|
||||||
.skip_joy
|
.skip_joy
|
||||||
call PrepareToPlaceMoveData
|
call PrepareToPlaceMoveData
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jr nz, .moving_move
|
jr nz, .moving_move
|
||||||
call PlaceMoveData
|
call PlaceMoveData
|
||||||
@ -920,21 +920,21 @@ MoveScreenLoop:
|
|||||||
.b_button
|
.b_button
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jp z, .exit
|
jp z, .exit
|
||||||
|
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
ld [wMenuCursorY], a
|
ld [wMenuCursorY], a
|
||||||
xor a
|
xor a
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
hlcoord 1, 2
|
hlcoord 1, 2
|
||||||
lb bc, 8, SCREEN_WIDTH - 2
|
lb bc, 8, SCREEN_WIDTH - 2
|
||||||
call ClearBox
|
call ClearBox
|
||||||
jp .loop
|
jp .loop
|
||||||
|
|
||||||
.d_right
|
.d_right
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jp nz, .joy_loop
|
jp nz, .joy_loop
|
||||||
|
|
||||||
@ -949,7 +949,7 @@ MoveScreenLoop:
|
|||||||
jp MoveScreenLoop
|
jp MoveScreenLoop
|
||||||
|
|
||||||
.d_left
|
.d_left
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jp nz, .joy_loop
|
jp nz, .joy_loop
|
||||||
ld a, [wCurPartyMon]
|
ld a, [wCurPartyMon]
|
||||||
@ -1000,11 +1000,11 @@ MoveScreenLoop:
|
|||||||
.a_button
|
.a_button
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
call WaitSFX
|
call WaitSFX
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
and a
|
and a
|
||||||
jr nz, .place_move
|
jr nz, .place_move
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
call PlaceHollowCursor
|
call PlaceHollowCursor
|
||||||
jp .moving_move
|
jp .moving_move
|
||||||
|
|
||||||
@ -1057,7 +1057,7 @@ MoveScreenLoop:
|
|||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
pop hl
|
pop hl
|
||||||
ld a, [wMoveSwapBuffer]
|
ld a, [wSwappingMove]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
@ -1071,7 +1071,7 @@ MoveScreenLoop:
|
|||||||
|
|
||||||
.exit
|
.exit
|
||||||
xor a
|
xor a
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
ld hl, w2DMenuFlags1
|
ld hl, w2DMenuFlags1
|
||||||
res 6, [hl]
|
res 6, [hl]
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
@ -1137,7 +1137,7 @@ SetUpMoveScreenBG:
|
|||||||
SetUpMoveList:
|
SetUpMoveList:
|
||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
ld [wMoveSwapBuffer], a
|
ld [wSwappingMove], a
|
||||||
ld [wMonType], a
|
ld [wMonType], a
|
||||||
predef CopyMonToTempMon
|
predef CopyMonToTempMon
|
||||||
ld hl, wTempMonMoves
|
ld hl, wTempMonMoves
|
||||||
@ -1202,8 +1202,8 @@ PlaceMoveData:
|
|||||||
hlcoord 16, 12
|
hlcoord 16, 12
|
||||||
cp 2
|
cp 2
|
||||||
jr c, .no_power
|
jr c, .no_power
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
lb bc, 1, 3
|
lb bc, 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
jr .description
|
jr .description
|
||||||
|
@ -448,7 +448,7 @@ ListMoves:
|
|||||||
push hl
|
push hl
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld a, MOVE_NAME
|
ld a, MOVE_NAME
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
call GetName
|
call GetName
|
||||||
ld de, wStringBuffer1
|
ld de, wStringBuffer1
|
||||||
pop hl
|
pop hl
|
||||||
|
@ -100,7 +100,7 @@ GetMonMenuString:
|
|||||||
jr z, .NotMove
|
jr z, .NotMove
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ TryAddMonToParty:
|
|||||||
and a
|
and a
|
||||||
jr nz, .skipnickname
|
jr nz, .skipnickname
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wPartyMonNicknames
|
ld hl, wPartyMonNicknames
|
||||||
ldh a, [hMoveMon]
|
ldh a, [hMoveMon]
|
||||||
@ -444,7 +444,7 @@ AddTempmonToParty:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
cp EGG
|
cp EGG
|
||||||
jr z, .egg
|
jr z, .egg
|
||||||
dec a
|
dec a
|
||||||
@ -972,7 +972,7 @@ SendMonIntoBox:
|
|||||||
call CopyBytes
|
call CopyBytes
|
||||||
|
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
|
|
||||||
ld de, sBoxMonNicknames
|
ld de, sBoxMonNicknames
|
||||||
@ -1671,7 +1671,7 @@ GivePoke::
|
|||||||
|
|
||||||
.done
|
.done
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wTempEnemyMonSpecies], a
|
ld [wTempEnemyMonSpecies], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
|
@ -416,7 +416,7 @@ StatsScreen_InitUpperHalf:
|
|||||||
xor a
|
xor a
|
||||||
ldh [hBGMapMode], a
|
ldh [hBGMapMode], a
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
hlcoord 8, 0
|
hlcoord 8, 0
|
||||||
ld [hl], "№"
|
ld [hl], "№"
|
||||||
@ -425,7 +425,7 @@ StatsScreen_InitUpperHalf:
|
|||||||
inc hl
|
inc hl
|
||||||
hlcoord 10, 0
|
hlcoord 10, 0
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 14, 0
|
hlcoord 14, 0
|
||||||
call PrintLevel
|
call PrintLevel
|
||||||
@ -440,7 +440,7 @@ StatsScreen_InitUpperHalf:
|
|||||||
ld a, "/"
|
ld a, "/"
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wBaseDexNo]
|
ld a, [wBaseDexNo]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
call PlaceString
|
call PlaceString
|
||||||
call StatsScreen_PlaceHorizontalDivider
|
call StatsScreen_PlaceHorizontalDivider
|
||||||
@ -748,7 +748,7 @@ LoadGreenPage:
|
|||||||
ld b, a
|
ld b, a
|
||||||
farcall TimeCapsule_ReplaceTeruSama
|
farcall TimeCapsule_ReplaceTeruSama
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetItemName
|
call GetItemName
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ PrintType:
|
|||||||
jp PlaceString
|
jp PlaceString
|
||||||
|
|
||||||
GetTypeName:
|
GetTypeName:
|
||||||
; Copy the name of type [wNamedObjectIndexBuffer] to wStringBuffer1.
|
; Copy the name of type [wNamedObjectIndex] to wStringBuffer1.
|
||||||
|
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld hl, TypeNames
|
ld hl, TypeNames
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
|
@ -3,9 +3,9 @@ GetPredefPointer::
|
|||||||
|
|
||||||
; Save hl for later (back in Predef)
|
; Save hl for later (back in Predef)
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wPredefTemp], a
|
ld [wPredefHL], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wPredefTemp + 1], a
|
ld [wPredefHL + 1], a
|
||||||
|
|
||||||
push de
|
push de
|
||||||
ld a, [wPredefID]
|
ld a, [wPredefID]
|
||||||
|
@ -170,7 +170,7 @@ PrintPartyMonPage1:
|
|||||||
lb bc, 2, 3
|
lb bc, 2, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
ld a, [wCurPartySpecies]
|
ld a, [wCurPartySpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld hl, wPartyMonNicknames
|
ld hl, wPartyMonNicknames
|
||||||
call GetCurPartyMonName
|
call GetCurPartyMonName
|
||||||
@ -186,7 +186,7 @@ PrintPartyMonPage1:
|
|||||||
inc hl
|
inc hl
|
||||||
ld [hl], "."
|
ld [hl], "."
|
||||||
inc hl
|
inc hl
|
||||||
ld de, wNamedObjectIndexBuffer
|
ld de, wNamedObjectIndex
|
||||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||||
call PrintNum
|
call PrintNum
|
||||||
hlcoord 1, 9
|
hlcoord 1, 9
|
||||||
@ -297,7 +297,7 @@ PlaceMoveNameString:
|
|||||||
and a
|
and a
|
||||||
jr z, .no_move
|
jr z, .no_move
|
||||||
|
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetMoveName
|
call GetMoveName
|
||||||
jr .got_string
|
jr .got_string
|
||||||
|
|
||||||
|
@ -728,7 +728,7 @@ Printer_PrintBoxListSegment:
|
|||||||
ld a, [de]
|
ld a, [de]
|
||||||
cp $ff
|
cp $ff
|
||||||
jp z, .finish
|
jp z, .finish
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
ld [wCurPartySpecies], a
|
ld [wCurPartySpecies], a
|
||||||
|
|
||||||
push bc
|
push bc
|
||||||
|
@ -683,8 +683,8 @@ PrintHour:
|
|||||||
inc hl
|
inc hl
|
||||||
pop bc
|
pop bc
|
||||||
call AdjustHourForAMorPM
|
call AdjustHourForAMorPM
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
call PrintTwoDigitNumberLeftAlign
|
call PrintTwoDigitNumberLeftAlign
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -28,9 +28,9 @@ ReturnFarCall::
|
|||||||
; We want to retain the contents of f.
|
; We want to retain the contents of f.
|
||||||
; To do this, we can pop to bc instead of af.
|
; To do this, we can pop to bc instead of af.
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wFarCallBCBuffer], a
|
ld [wFarCallBC], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wFarCallBCBuffer + 1], a
|
ld [wFarCallBC + 1], a
|
||||||
|
|
||||||
; Restore the working bank.
|
; Restore the working bank.
|
||||||
pop bc
|
pop bc
|
||||||
@ -38,9 +38,9 @@ ReturnFarCall::
|
|||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; Restore the contents of bc.
|
; Restore the contents of bc.
|
||||||
ld a, [wFarCallBCBuffer]
|
ld a, [wFarCallBC]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wFarCallBCBuffer + 1]
|
ld a, [wFarCallBC + 1]
|
||||||
ld c, a
|
ld c, a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -1278,7 +1278,7 @@ BackupBGMapColumn::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
UpdateBGMapRow::
|
UpdateBGMapRow::
|
||||||
ld hl, wBGMapBufferPtrs
|
ld hl, wBGMapBufferPointers
|
||||||
push de
|
push de
|
||||||
call .iteration
|
call .iteration
|
||||||
pop de
|
pop de
|
||||||
@ -1309,7 +1309,7 @@ UpdateBGMapRow::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
UpdateBGMapColumn::
|
UpdateBGMapColumn::
|
||||||
ld hl, wBGMapBufferPtrs
|
ld hl, wBGMapBufferPointers
|
||||||
ld c, SCREEN_HEIGHT
|
ld c, SCREEN_HEIGHT
|
||||||
.loop
|
.loop
|
||||||
ld a, e
|
ld a, e
|
||||||
|
@ -321,8 +321,8 @@ CopyMenuHeader::
|
|||||||
ld [wMenuDataBank], a
|
ld [wMenuDataBank], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
StoreTo_wMenuCursorBuffer::
|
StoreMenuCursorPosition::
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MenuTextbox::
|
MenuTextbox::
|
||||||
@ -684,7 +684,7 @@ ContinueGettingMenuJoypad:
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wMenuSelection], a
|
ld [wMenuSelection], a
|
||||||
ld a, [wMenuCursorY]
|
ld a, [wMenuCursorY]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -829,19 +829,19 @@ _2DMenu::
|
|||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
ld [wMenuData_2DMenuItemStringsBank], a
|
ld [wMenuData_2DMenuItemStringsBank], a
|
||||||
farcall _2DMenu_
|
farcall _2DMenu_
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
InterpretBattleMenu::
|
InterpretBattleMenu::
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
ld [wMenuData_2DMenuItemStringsBank], a
|
ld [wMenuData_2DMenuItemStringsBank], a
|
||||||
farcall _InterpretBattleMenu
|
farcall _InterpretBattleMenu
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
InterpretMobileMenu:: ; unreferenced
|
InterpretMobileMenu:: ; unreferenced
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
ld [wMenuData_2DMenuItemStringsBank], a
|
ld [wMenuData_2DMenuItemStringsBank], a
|
||||||
farcall _InterpretMobileMenu
|
farcall _InterpretMobileMenu
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ret
|
ret
|
||||||
|
@ -10,7 +10,7 @@ NamesPointers::
|
|||||||
dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)
|
dbw 4, MoveDescriptions ; MOVE_DESC_NAME_BROKEN (wrong bank)
|
||||||
|
|
||||||
GetName::
|
GetName::
|
||||||
; Return name wCurSpecies from name list wNamedObjectTypeBuffer in wStringBuffer1.
|
; Return name wCurSpecies from name list wNamedObjectType in wStringBuffer1.
|
||||||
|
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
@ -18,12 +18,12 @@ GetName::
|
|||||||
push bc
|
push bc
|
||||||
push de
|
push de
|
||||||
|
|
||||||
ld a, [wNamedObjectTypeBuffer]
|
ld a, [wNamedObjectType]
|
||||||
cp MON_NAME
|
cp MON_NAME
|
||||||
jr nz, .NotPokeName
|
jr nz, .NotPokeName
|
||||||
|
|
||||||
ld a, [wCurSpecies]
|
ld a, [wCurSpecies]
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, MON_NAME_LENGTH
|
ld hl, MON_NAME_LENGTH
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -32,7 +32,7 @@ GetName::
|
|||||||
jr .done
|
jr .done
|
||||||
|
|
||||||
.NotPokeName:
|
.NotPokeName:
|
||||||
ld a, [wNamedObjectTypeBuffer]
|
ld a, [wNamedObjectType]
|
||||||
dec a
|
dec a
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
@ -110,7 +110,7 @@ GetBasePokemonName::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetPokemonName::
|
GetPokemonName::
|
||||||
; Get Pokemon name for wNamedObjectIndexBuffer.
|
; Get Pokemon name for wNamedObjectIndex.
|
||||||
|
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
@ -119,7 +119,7 @@ GetPokemonName::
|
|||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
; Each name is ten characters
|
; Each name is ten characters
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
dec a
|
dec a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
@ -147,18 +147,18 @@ GetPokemonName::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetItemName::
|
GetItemName::
|
||||||
; Get item name for wNamedObjectIndexBuffer.
|
; Get item name for wNamedObjectIndex.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
|
|
||||||
cp TM01
|
cp TM01
|
||||||
jr nc, .TM
|
jr nc, .TM
|
||||||
|
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
ld a, ITEM_NAME
|
ld a, ITEM_NAME
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
call GetName
|
call GetName
|
||||||
jr .Copied
|
jr .Copied
|
||||||
.TM:
|
.TM:
|
||||||
@ -170,12 +170,12 @@ GetItemName::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
GetTMHMName::
|
GetTMHMName::
|
||||||
; Get TM/HM name for item wNamedObjectIndexBuffer.
|
; Get TM/HM name for item wNamedObjectIndex.
|
||||||
|
|
||||||
push hl
|
push hl
|
||||||
push de
|
push de
|
||||||
push bc
|
push bc
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
; TM/HM prefix
|
; TM/HM prefix
|
||||||
@ -197,7 +197,7 @@ GetTMHMName::
|
|||||||
|
|
||||||
; TM/HM number
|
; TM/HM number
|
||||||
push de
|
push de
|
||||||
ld a, [wNamedObjectIndexBuffer]
|
ld a, [wNamedObjectIndex]
|
||||||
ld c, a
|
ld c, a
|
||||||
callfar GetTMHMNumber
|
callfar GetTMHMNumber
|
||||||
pop de
|
pop de
|
||||||
@ -235,7 +235,7 @@ GetTMHMName::
|
|||||||
ld [de], a
|
ld [de], a
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
pop bc
|
pop bc
|
||||||
pop de
|
pop de
|
||||||
pop hl
|
pop hl
|
||||||
@ -257,9 +257,9 @@ GetMoveName::
|
|||||||
push hl
|
push hl
|
||||||
|
|
||||||
ld a, MOVE_NAME
|
ld a, MOVE_NAME
|
||||||
ld [wNamedObjectTypeBuffer], a
|
ld [wNamedObjectType], a
|
||||||
|
|
||||||
ld a, [wNamedObjectIndexBuffer] ; move id
|
ld a, [wNamedObjectIndex] ; move id
|
||||||
ld [wCurSpecies], a
|
ld [wCurSpecies], a
|
||||||
|
|
||||||
call GetName
|
call GetName
|
||||||
|
@ -229,8 +229,8 @@ PrintLevel_Force3Digits::
|
|||||||
ld c, 3
|
ld c, 3
|
||||||
|
|
||||||
Print8BitNumLeftAlign::
|
Print8BitNumLeftAlign::
|
||||||
ld [wDeciramBuffer], a
|
ld [wTextDecimalByte], a
|
||||||
ld de, wDeciramBuffer
|
ld de, wTextDecimalByte
|
||||||
ld b, PRINTNUM_LEFTALIGN | 1
|
ld b, PRINTNUM_LEFTALIGN | 1
|
||||||
jp PrintNum
|
jp PrintNum
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ Predef::
|
|||||||
|
|
||||||
ld a, BANK(GetPredefPointer)
|
ld a, BANK(GetPredefPointer)
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
call GetPredefPointer ; stores hl in wPredefTemp
|
call GetPredefPointer ; stores hl in wPredefHL
|
||||||
|
|
||||||
; Switch to the new function's bank
|
; Switch to the new function's bank
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
@ -27,9 +27,9 @@ Predef::
|
|||||||
push hl
|
push hl
|
||||||
|
|
||||||
; Get hl back
|
; Get hl back
|
||||||
ld a, [wPredefTemp]
|
ld a, [wPredefHL]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [wPredefTemp + 1]
|
ld a, [wPredefHL + 1]
|
||||||
ld l, a
|
ld l, a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -37,16 +37,16 @@ Predef::
|
|||||||
; Clean up after the Predef call
|
; Clean up after the Predef call
|
||||||
|
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wPredefTemp], a
|
ld [wPredefHL], a
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wPredefTemp + 1], a
|
ld [wPredefHL + 1], a
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
ld a, h
|
ld a, h
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
ld a, [wPredefTemp]
|
ld a, [wPredefHL]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [wPredefTemp + 1]
|
ld a, [wPredefHL + 1]
|
||||||
ld l, a
|
ld l, a
|
||||||
ret
|
ret
|
||||||
|
@ -41,10 +41,10 @@ BattleRandom::
|
|||||||
|
|
||||||
call _BattleRandom
|
call _BattleRandom
|
||||||
|
|
||||||
ld [wPredefTemp + 1], a
|
ld [wPredefHL + 1], a
|
||||||
pop af
|
pop af
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
ld a, [wPredefTemp + 1]
|
ld a, [wPredefHL + 1]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
RandomRange::
|
RandomRange::
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
InitSpriteAnimStruct::
|
InitSpriteAnimStruct::
|
||||||
ld [wSpriteAnimIDBuffer], a
|
ld [wSpriteAnimID], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, BANK(_InitSpriteAnimStruct)
|
ld a, BANK(_InitSpriteAnimStruct)
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
ld a, [wSpriteAnimIDBuffer]
|
ld a, [wSpriteAnimID]
|
||||||
|
|
||||||
call _InitSpriteAnimStruct
|
call _InitSpriteAnimStruct
|
||||||
|
|
||||||
@ -15,13 +15,13 @@ InitSpriteAnimStruct::
|
|||||||
ret
|
ret
|
||||||
|
|
||||||
ReinitSpriteAnimFrame::
|
ReinitSpriteAnimFrame::
|
||||||
ld [wSpriteAnimIDBuffer], a
|
ld [wSpriteAnimID], a
|
||||||
ldh a, [hROMBank]
|
ldh a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, BANK(_ReinitSpriteAnimFrame)
|
ld a, BANK(_ReinitSpriteAnimFrame)
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
ld a, [wSpriteAnimIDBuffer]
|
ld a, [wSpriteAnimID]
|
||||||
|
|
||||||
call _ReinitSpriteAnimFrame
|
call _ReinitSpriteAnimFrame
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ DMATransfer::
|
|||||||
|
|
||||||
UpdateBGMapBuffer::
|
UpdateBGMapBuffer::
|
||||||
; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer
|
; Copy [hBGMapTileCount] 16x8 tiles from wBGMapBuffer
|
||||||
; to bg map addresses in wBGMapBufferPtrs.
|
; to bg map addresses in wBGMapBufferPointers.
|
||||||
|
|
||||||
; [hBGMapTileCount] must be even since this is done in pairs.
|
; [hBGMapTileCount] must be even since this is done in pairs.
|
||||||
|
|
||||||
@ -32,9 +32,9 @@ UpdateBGMapBuffer::
|
|||||||
ldh a, [rVBK]
|
ldh a, [rVBK]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
; Relocate the stack pointer to wBGMapBufferPtrs
|
; Relocate the stack pointer to wBGMapBufferPointers
|
||||||
ld [hSPBuffer], sp
|
ld [hSPBuffer], sp
|
||||||
ld hl, wBGMapBufferPtrs
|
ld hl, wBGMapBufferPointers
|
||||||
ld sp, hl
|
ld sp, hl
|
||||||
|
|
||||||
; We can now pop the addresses of affected spots on the BG Map
|
; We can now pop the addresses of affected spots on the BG Map
|
||||||
|
@ -200,7 +200,8 @@ givepokeitem EQUS "givepokemail"
|
|||||||
checkpokeitem EQUS "checkpokemail"
|
checkpokeitem EQUS "checkpokemail"
|
||||||
passtoengine EQUS "autoinput"
|
passtoengine EQUS "autoinput"
|
||||||
verbosegiveitem2 EQUS "verbosegiveitemvar"
|
verbosegiveitem2 EQUS "verbosegiveitemvar"
|
||||||
loadbytec2cf EQUS "writeunusedbytebuffer"
|
loadbytec2cf EQUS "writeunusedbyte"
|
||||||
|
writeunusedbytebuffer EQUS "writeunusedbyte"
|
||||||
|
|
||||||
; macros/scripts/maps.asm
|
; macros/scripts/maps.asm
|
||||||
|
|
||||||
|
@ -489,9 +489,9 @@ closetext: MACRO
|
|||||||
db closetext_command
|
db closetext_command
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
const writeunusedbytebuffer_command ; $4a
|
const writeunusedbyte_command ; $4a
|
||||||
writeunusedbytebuffer: MACRO
|
writeunusedbyte: MACRO
|
||||||
db writeunusedbytebuffer_command
|
db writeunusedbyte_command
|
||||||
db \1 ; byte
|
db \1 ; byte
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
@ -261,7 +261,7 @@ CopyMobileEZChatToC608:
|
|||||||
|
|
||||||
.get_name
|
.get_name
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wNamedObjectIndexBuffer], a
|
ld [wNamedObjectIndex], a
|
||||||
call GetPokemonName
|
call GetPokemonName
|
||||||
ld hl, wStringBuffer1
|
ld hl, wStringBuffer1
|
||||||
ld bc, MON_NAME_LENGTH - 1
|
ld bc, MON_NAME_LENGTH - 1
|
||||||
|
@ -295,7 +295,7 @@ asm_4828d:
|
|||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld a, [wPlayerGender]
|
ld a, [wPlayerGender]
|
||||||
inc a
|
inc a
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call StaticMenuJoypad
|
call StaticMenuJoypad
|
||||||
call PlayClickSFX
|
call PlayClickSFX
|
||||||
call ExitMenu
|
call ExitMenu
|
||||||
@ -339,7 +339,7 @@ Function48304:
|
|||||||
ld b, $c
|
ld b, $c
|
||||||
ld c, $8
|
ld c, $8
|
||||||
call Function48cdc
|
call Function48cdc
|
||||||
ld a, [wMenuCursorBuffer]
|
ld a, [wMenuCursorPosition]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wMenuScrollPosition]
|
ld a, [wMenuScrollPosition]
|
||||||
ld c, a
|
ld c, a
|
||||||
@ -350,7 +350,7 @@ Function48304:
|
|||||||
jr c, .asm_4833f
|
jr c, .asm_4833f
|
||||||
sub $29
|
sub $29
|
||||||
inc a
|
inc a
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, $29
|
ld a, $29
|
||||||
.asm_4833f
|
.asm_4833f
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
@ -363,7 +363,7 @@ Function48304:
|
|||||||
ld d, a
|
ld d, a
|
||||||
pop bc
|
pop bc
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wMenuScrollPosition], a
|
ld [wMenuScrollPosition], a
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -412,7 +412,7 @@ Function48383:
|
|||||||
.asm_483af
|
.asm_483af
|
||||||
ld hl, wMenuCursorY
|
ld hl, wMenuCursorY
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
scf
|
scf
|
||||||
.asm_483b7
|
.asm_483b7
|
||||||
pop bc
|
pop bc
|
||||||
|
@ -719,7 +719,7 @@ Function4acaa:
|
|||||||
ld a, $b
|
ld a, $b
|
||||||
ld [wMenuBorderLeftCoord], a
|
ld [wMenuBorderLeftCoord], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
ld hl, w2DMenuFlags1
|
ld hl, w2DMenuFlags1
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
|
@ -234,7 +234,7 @@ Function89261:
|
|||||||
add $5
|
add $5
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
pop af
|
pop af
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call PushWindow
|
call PushWindow
|
||||||
call Mobile22_SetBGMapMode0
|
call Mobile22_SetBGMapMode0
|
||||||
call Mobile_EnableSpriteUpdates
|
call Mobile_EnableSpriteUpdates
|
||||||
@ -2087,7 +2087,7 @@ Function89d5e:
|
|||||||
push af
|
push af
|
||||||
call CopyMenuHeader
|
call CopyMenuHeader
|
||||||
pop af
|
pop af
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
call Mobile22_SetBGMapMode0
|
call Mobile22_SetBGMapMode0
|
||||||
call PlaceVerticalMenuItems
|
call PlaceVerticalMenuItems
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
@ -2904,7 +2904,7 @@ Function8a31c:
|
|||||||
call Function8a3b2
|
call Function8a3b2
|
||||||
pop bc
|
pop bc
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wMenuCursorBuffer], a
|
ld [wMenuCursorPosition], a
|
||||||
ld [wMenuSelection], a
|
ld [wMenuSelection], a
|
||||||
call PlaceVerticalMenuItems
|
call PlaceVerticalMenuItems
|
||||||
call InitVerticalMenuCursor
|
call InitVerticalMenuCursor
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user