mirror of
https://github.com/thornAvery/kep-hack.git
synced 2025-11-14 00:56:40 +13:00
yet more naming
This commit is contained in:
parent
7f6d0d49b6
commit
93255d6d17
|
|
@ -2310,7 +2310,7 @@ UseBagItem:
|
||||||
call GetItemName
|
call GetItemName
|
||||||
call CopyStringToCF4B ; copy name
|
call CopyStringToCF4B ; copy name
|
||||||
xor a
|
xor a
|
||||||
ld [wd152], a
|
ld [wPseudoItemID], a
|
||||||
call UseItem
|
call UseItem
|
||||||
call LoadHudTilePatterns
|
call LoadHudTilePatterns
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
|
|
|
||||||
|
|
@ -349,12 +349,21 @@ GymTrashScript: ; 5ddfc (17:5dfc)
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
|
|
||||||
ld [$ffdb], a
|
; There is a bug in this code. It should calculate a value in the range [0, 3]
|
||||||
|
; but if the mask and random number don't have any 1 bits in common, then
|
||||||
|
; the result of the AND will be 0. When 1 is subtracted from that, the value
|
||||||
|
; will become $ff. This will result in 255 being added to hl, which will cause
|
||||||
|
; hl to point to one of the zero bytes that pad the end of the ROM bank.
|
||||||
|
; Trash can 0 was intended to be able to have the second lock only when the
|
||||||
|
; first lock was in trash can 1 or 3. However, due to this bug, trash can 0 can
|
||||||
|
; have the second lock regardless of which trash can had the first lock.
|
||||||
|
|
||||||
|
ld [hGymTrashCanRandNumMask], a
|
||||||
push hl
|
push hl
|
||||||
call Random
|
call Random
|
||||||
swap a
|
swap a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [$ffdb]
|
ld a, [hGymTrashCanRandNumMask]
|
||||||
and b
|
and b
|
||||||
dec a
|
dec a
|
||||||
pop hl
|
pop hl
|
||||||
|
|
@ -398,6 +407,12 @@ GymTrashScript: ; 5ddfc (17:5dfc)
|
||||||
jp PrintPredefTextID
|
jp PrintPredefTextID
|
||||||
|
|
||||||
GymTrashCans: ; 5de7d (17:5e7d)
|
GymTrashCans: ; 5de7d (17:5e7d)
|
||||||
|
; byte 0: mask for random number
|
||||||
|
; bytes 1-4: indices of the trash cans that can have the second lock
|
||||||
|
; (but see the comment above explaining a bug regarding this)
|
||||||
|
; Note that the mask is simply the number of valid trash can indices that
|
||||||
|
; follow. The remaining bytes are filled with 0 to pad the length of each entry
|
||||||
|
; to 5 bytes.
|
||||||
db 2, 1, 3, 0, 0 ; 0
|
db 2, 1, 3, 0, 0 ; 0
|
||||||
db 3, 0, 2, 4, 0 ; 1
|
db 3, 0, 2, 4, 0 ; 1
|
||||||
db 2, 1, 5, 0, 0 ; 2
|
db 2, 1, 5, 0, 0 ; 2
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ GymStatues: ; 62419 (18:6419)
|
||||||
jr .loop
|
jr .loop
|
||||||
.match
|
.match
|
||||||
ld b, [hl]
|
ld b, [hl]
|
||||||
ld a, [wd72a]
|
ld a, [wBeatGymFlags]
|
||||||
and b
|
and b
|
||||||
cp b
|
cp b
|
||||||
tx_pre_id GymStatueText2
|
tx_pre_id GymStatueText2
|
||||||
|
|
|
||||||
|
|
@ -125,21 +125,21 @@ PrintCinnabarQuiz: ; 1ea17 (7:6a17)
|
||||||
CinnabarGymQuiz: ; 1ea25 (7:6a25)
|
CinnabarGymQuiz: ; 1ea25 (7:6a25)
|
||||||
TX_ASM
|
TX_ASM
|
||||||
xor a
|
xor a
|
||||||
ld [wda38], a
|
ld [wOpponentAfterWrongAnswer], a
|
||||||
ld a, [wHiddenObjectFunctionArgument]
|
ld a, [wHiddenObjectFunctionArgument]
|
||||||
push af
|
push af
|
||||||
and $f
|
and $f
|
||||||
ld [$ffdb], a
|
ld [hGymGateIndex], a
|
||||||
pop af
|
pop af
|
||||||
and $f0
|
and $f0
|
||||||
swap a
|
swap a
|
||||||
ld [$ffdc], a
|
ld [$ffdc], a
|
||||||
ld hl, CinnabarGymQuizIntroText
|
ld hl, CinnabarGymQuizIntroText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, [$ffdb]
|
ld a, [hGymGateIndex]
|
||||||
dec a
|
dec a
|
||||||
add a
|
add a
|
||||||
ld d, $0
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
ld hl, CinnabarQuizQuestions
|
ld hl, CinnabarQuizQuestions
|
||||||
add hl, de
|
add hl, de
|
||||||
|
|
@ -198,10 +198,10 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wCurrentMenuItem]
|
ld a, [wCurrentMenuItem]
|
||||||
cp c
|
cp c
|
||||||
jr nz, .asm_1eab8
|
jr nz, .wrongAnswer
|
||||||
ld hl, wd126
|
ld hl, wd126
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
ld a, [$ffdb]
|
ld a, [hGymGateIndex]
|
||||||
ld [$ffe0], a
|
ld [$ffe0], a
|
||||||
ld hl, CinnabarGymQuizCorrectText
|
ld hl, CinnabarGymQuizCorrectText
|
||||||
call PrintText
|
call PrintText
|
||||||
|
|
@ -211,14 +211,14 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
|
||||||
ld b, FLAG_SET
|
ld b, FLAG_SET
|
||||||
call CinnabarGymGateFlagAction
|
call CinnabarGymGateFlagAction
|
||||||
jp UpdateCinnabarGymGateTileBlocks_
|
jp UpdateCinnabarGymGateTileBlocks_
|
||||||
.asm_1eab8
|
.wrongAnswer
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
ld a, SFX_DENIED
|
ld a, SFX_DENIED
|
||||||
call PlaySound
|
call PlaySound
|
||||||
call WaitForSoundToFinish
|
call WaitForSoundToFinish
|
||||||
ld hl, CinnabarGymQuizIncorrectText
|
ld hl, CinnabarGymQuizIncorrectText
|
||||||
call PrintText
|
call PrintText
|
||||||
ld a, [$ffdb]
|
ld a, [hGymGateIndex]
|
||||||
add $2
|
add $2
|
||||||
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
|
AdjustEventBit EVENT_BEAT_CINNABAR_GYM_TRAINER_0, 2
|
||||||
ld c, a
|
ld c, a
|
||||||
|
|
@ -228,9 +228,9 @@ CinnabarGymQuiz_1ea92: ; 1ea92 (7:6a92)
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, [$ffdb]
|
ld a, [hGymGateIndex]
|
||||||
add $2
|
add $2
|
||||||
ld [wda38], a
|
ld [wOpponentAfterWrongAnswer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
|
CinnabarGymQuizCorrectText: ; 1eae3 (7:6ae3)
|
||||||
|
|
@ -261,9 +261,9 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
|
||||||
; Update the overworld map with open floor blocks or locked gate blocks
|
; Update the overworld map with open floor blocks or locked gate blocks
|
||||||
; depending on event flags.
|
; depending on event flags.
|
||||||
ld a, 6
|
ld a, 6
|
||||||
ld [$ffdb], a
|
ld [hGymGateIndex], a
|
||||||
.loop
|
.loop
|
||||||
ld a, [$ffdb]
|
ld a, [hGymGateIndex]
|
||||||
dec a
|
dec a
|
||||||
add a
|
add a
|
||||||
add a
|
add a
|
||||||
|
|
@ -276,9 +276,9 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
|
||||||
ld c, a
|
ld c, a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [wd12f], a
|
ld [wGymGateTileBlock], a
|
||||||
push bc
|
push bc
|
||||||
ld a, [$ffdb]
|
ld a, [hGymGateIndex]
|
||||||
ld [$ffe0], a
|
ld [$ffe0], a
|
||||||
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
AdjustEventBit EVENT_CINNABAR_GYM_GATE0_UNLOCKED, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
|
|
@ -287,7 +287,7 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
jr nz, .unlocked
|
jr nz, .unlocked
|
||||||
ld a, [wd12f]
|
ld a, [wGymGateTileBlock]
|
||||||
jr .next
|
jr .next
|
||||||
.unlocked
|
.unlocked
|
||||||
ld a, $e
|
ld a, $e
|
||||||
|
|
@ -295,7 +295,7 @@ UpdateCinnabarGymGateTileBlocks_: ; 1eb0a (7:6b0a)
|
||||||
pop bc
|
pop bc
|
||||||
ld [wNewTileBlockID], a
|
ld [wNewTileBlockID], a
|
||||||
predef ReplaceTileBlock
|
predef ReplaceTileBlock
|
||||||
ld hl, $ffdb
|
ld hl, hGymGateIndex
|
||||||
dec [hl]
|
dec [hl]
|
||||||
jr nz, .loop
|
jr nz, .loop
|
||||||
ret
|
ret
|
||||||
|
|
|
||||||
|
|
@ -628,7 +628,7 @@ ItemUseEvoStone: ; da5b (3:5a5b)
|
||||||
ld a,[wWhichPokemon]
|
ld a,[wWhichPokemon]
|
||||||
push af
|
push af
|
||||||
ld a,[wcf91]
|
ld a,[wcf91]
|
||||||
ld [wd156],a
|
ld [wEvoStoneItemID],a
|
||||||
push af
|
push af
|
||||||
ld a,EVO_STONE_PARTY_MENU
|
ld a,EVO_STONE_PARTY_MENU
|
||||||
ld [wPartyMenuTypeOrMessageID],a
|
ld [wPartyMenuTypeOrMessageID],a
|
||||||
|
|
@ -679,7 +679,7 @@ ItemUseMedicine: ; dabb (3:5abb)
|
||||||
ld [wPartyMenuTypeOrMessageID],a
|
ld [wPartyMenuTypeOrMessageID],a
|
||||||
ld a,$ff
|
ld a,$ff
|
||||||
ld [wUpdateSpritesEnabled],a
|
ld [wUpdateSpritesEnabled],a
|
||||||
ld a,[wd152]
|
ld a,[wPseudoItemID]
|
||||||
and a ; using Softboiled?
|
and a ; using Softboiled?
|
||||||
jr z,.notUsingSoftboiled
|
jr z,.notUsingSoftboiled
|
||||||
; if using softboiled
|
; if using softboiled
|
||||||
|
|
@ -712,7 +712,7 @@ ItemUseMedicine: ; dabb (3:5abb)
|
||||||
ld [wcf91],a
|
ld [wcf91],a
|
||||||
pop af
|
pop af
|
||||||
ld [wWhichPokemon],a
|
ld [wWhichPokemon],a
|
||||||
ld a,[wd152]
|
ld a,[wPseudoItemID]
|
||||||
and a ; using Softboiled?
|
and a ; using Softboiled?
|
||||||
jr z,.checkItemType
|
jr z,.checkItemType
|
||||||
; if using softboiled
|
; if using softboiled
|
||||||
|
|
@ -865,7 +865,7 @@ ItemUseMedicine: ; dabb (3:5abb)
|
||||||
ld [wHPBarMaxHP+1],a
|
ld [wHPBarMaxHP+1],a
|
||||||
ld a,[hl]
|
ld a,[hl]
|
||||||
ld [wHPBarMaxHP],a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian)
|
ld [wHPBarMaxHP],a ; max HP stored at wHPBarMaxHP (2 bytes, big-endian)
|
||||||
ld a,[wd152]
|
ld a,[wPseudoItemID]
|
||||||
and a ; using Softboiled?
|
and a ; using Softboiled?
|
||||||
jp z,.notUsingSoftboiled2
|
jp z,.notUsingSoftboiled2
|
||||||
; if using softboiled
|
; if using softboiled
|
||||||
|
|
@ -1052,7 +1052,7 @@ ItemUseMedicine: ; dabb (3:5abb)
|
||||||
call ItemUseNoEffect
|
call ItemUseNoEffect
|
||||||
jp .done
|
jp .done
|
||||||
.doneHealing
|
.doneHealing
|
||||||
ld a,[wd152]
|
ld a,[wPseudoItemID]
|
||||||
and a ; using Softboiled?
|
and a ; using Softboiled?
|
||||||
jr nz,.skipRemovingItem ; no item to remove if using Softboiled
|
jr nz,.skipRemovingItem ; no item to remove if using Softboiled
|
||||||
push hl
|
push hl
|
||||||
|
|
@ -1107,7 +1107,7 @@ ItemUseMedicine: ; dabb (3:5abb)
|
||||||
pop af
|
pop af
|
||||||
pop af
|
pop af
|
||||||
.done
|
.done
|
||||||
ld a,[wd152]
|
ld a,[wPseudoItemID]
|
||||||
and a ; using Softboiled?
|
and a ; using Softboiled?
|
||||||
ret nz ; if so, return
|
ret nz ; if so, return
|
||||||
call GBPalWhiteOut
|
call GBPalWhiteOut
|
||||||
|
|
@ -1381,7 +1381,7 @@ ItemUseEscapeRope: ; dfaf (3:5faf)
|
||||||
inc a
|
inc a
|
||||||
ld [wEscapedFromBattle],a
|
ld [wEscapedFromBattle],a
|
||||||
ld [wActionResultOrTookBattleTurn],a ; item used
|
ld [wActionResultOrTookBattleTurn],a ; item used
|
||||||
ld a,[wd152]
|
ld a,[wPseudoItemID]
|
||||||
and a ; using Dig?
|
and a ; using Dig?
|
||||||
ret nz ; if so, return
|
ret nz ; if so, return
|
||||||
call ItemUseReloadOverworldData
|
call ItemUseReloadOverworldData
|
||||||
|
|
@ -1419,7 +1419,7 @@ ItemUseXAccuracy: ; e013 (3:6013)
|
||||||
; The Card Key is handled in a different way.
|
; The Card Key is handled in a different way.
|
||||||
ItemUseCardKey: ; e022 (3:6022)
|
ItemUseCardKey: ; e022 (3:6022)
|
||||||
xor a
|
xor a
|
||||||
ld [wd71f],a
|
ld [wUnusedD71F],a
|
||||||
call GetTileAndCoordsInFrontOfPlayer
|
call GetTileAndCoordsInFrontOfPlayer
|
||||||
ld a,[GetTileAndCoordsInFrontOfPlayer] ; $4586
|
ld a,[GetTileAndCoordsInFrontOfPlayer] ; $4586
|
||||||
cp a,$18
|
cp a,$18
|
||||||
|
|
@ -1451,7 +1451,7 @@ ItemUseCardKey: ; e022 (3:6022)
|
||||||
cp e
|
cp e
|
||||||
jr nz,.nextEntry3
|
jr nz,.nextEntry3
|
||||||
ld a,[hl]
|
ld a,[hl]
|
||||||
ld [wd71f],a
|
ld [wUnusedD71F],a
|
||||||
jr .done
|
jr .done
|
||||||
.nextEntry1
|
.nextEntry1
|
||||||
inc hl
|
inc hl
|
||||||
|
|
|
||||||
|
|
@ -278,7 +278,7 @@ LinkMenu: ; 5c0a (1:5c0a)
|
||||||
ld [wSerialExchangeNybbleSendData], a
|
ld [wSerialExchangeNybbleSendData], a
|
||||||
inc a ; LINK_STATE_IN_CABLE_CLUB
|
inc a ; LINK_STATE_IN_CABLE_CLUB
|
||||||
ld [wLinkState], a
|
ld [wLinkState], a
|
||||||
ld [wcc47], a
|
ld [wEnteringCableClub], a
|
||||||
jr SpecialEnterMap
|
jr SpecialEnterMap
|
||||||
.choseCancel
|
.choseCancel
|
||||||
xor a
|
xor a
|
||||||
|
|
@ -322,7 +322,7 @@ SpecialEnterMap: ; 5d5f (1:5d5f)
|
||||||
call ResetPlayerSpriteData
|
call ResetPlayerSpriteData
|
||||||
ld c, 20
|
ld c, 20
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
ld a, [wcc47]
|
ld a, [wEnteringCableClub]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
jp EnterMap
|
jp EnterMap
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ RedrawPartyMenu_: ; 12ce3 (4:6ce3)
|
||||||
dec hl
|
dec hl
|
||||||
dec hl
|
dec hl
|
||||||
ld b,[hl]
|
ld b,[hl]
|
||||||
ld a,[wd156] ; evolution stone item ID
|
ld a,[wEvoStoneItemID] ; the stone the player used
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
|
|
|
||||||
|
|
@ -65,11 +65,11 @@ GetPrizeMenuId: ; 5278e (14:678e)
|
||||||
; (distinguishing between Pokemon names
|
; (distinguishing between Pokemon names
|
||||||
; and Items (specifically TMs) names)
|
; and Items (specifically TMs) names)
|
||||||
ld a,[hSpriteIndexOrTextID]
|
ld a,[hSpriteIndexOrTextID]
|
||||||
sub a,$03 ; prize-texts' id are 3, 4 and 5
|
sub a,3 ; prize-texts' id are 3, 4 and 5
|
||||||
ld [wd12f],a ; prize-texts' id (relative, i.e. 0, 1 or 2)
|
ld [wWhichPrizeWindow],a ; prize-texts' id (relative, i.e. 0, 1 or 2)
|
||||||
add a
|
add a
|
||||||
add a
|
add a
|
||||||
ld d,$00
|
ld d,0
|
||||||
ld e,a
|
ld e,a
|
||||||
ld hl,PrizeDifferentMenuPtrs
|
ld hl,PrizeDifferentMenuPtrs
|
||||||
add hl,de
|
add hl,de
|
||||||
|
|
@ -84,10 +84,10 @@ GetPrizeMenuId: ; 5278e (14:678e)
|
||||||
ld a,[hli]
|
ld a,[hli]
|
||||||
ld h,[hl]
|
ld h,[hl]
|
||||||
ld l,a
|
ld l,a
|
||||||
ld de,wd141
|
ld de,wPrize1Price
|
||||||
ld bc,$0006
|
ld bc,6
|
||||||
call CopyData
|
call CopyData
|
||||||
ld a,[wd12f]
|
ld a,[wWhichPrizeWindow]
|
||||||
cp a,$02 ;is TM_menu?
|
cp a,$02 ;is TM_menu?
|
||||||
jr nz,.putMonName
|
jr nz,.putMonName
|
||||||
ld a,[W_PRIZE1]
|
ld a,[W_PRIZE1]
|
||||||
|
|
@ -127,7 +127,7 @@ GetPrizeMenuId: ; 5278e (14:678e)
|
||||||
ld de,NoThanksText
|
ld de,NoThanksText
|
||||||
call PlaceString
|
call PlaceString
|
||||||
; put prices on the right side of the textbox
|
; put prices on the right side of the textbox
|
||||||
ld de,wd141
|
ld de,wPrize1Price
|
||||||
coord hl, 13, 5
|
coord hl, 13, 5
|
||||||
; reg. c:
|
; reg. c:
|
||||||
; [low nybble] number of bytes
|
; [low nybble] number of bytes
|
||||||
|
|
@ -136,11 +136,11 @@ GetPrizeMenuId: ; 5278e (14:678e)
|
||||||
; Function $15CD displays BCD value (same routine
|
; Function $15CD displays BCD value (same routine
|
||||||
; used by text-command $02)
|
; used by text-command $02)
|
||||||
call PrintBCDNumber
|
call PrintBCDNumber
|
||||||
ld de,wd143
|
ld de,wPrize2Price
|
||||||
coord hl, 13, 7
|
coord hl, 13, 7
|
||||||
ld c,(%1 << 7 | 2)
|
ld c,(%1 << 7 | 2)
|
||||||
call PrintBCDNumber
|
call PrintBCDNumber
|
||||||
ld de,wd145
|
ld de,wPrize3Price
|
||||||
coord hl, 13, 9
|
coord hl, 13, 9
|
||||||
ld c,(1 << 7 | 2)
|
ld c,(1 << 7 | 2)
|
||||||
jp PrintBCDNumber
|
jp PrintBCDNumber
|
||||||
|
|
@ -172,11 +172,11 @@ PrintPrizePrice: ; 5287a (14:687a)
|
||||||
db " @"
|
db " @"
|
||||||
|
|
||||||
LoadCoinsToSubtract: ; 528b1 (14:68b1)
|
LoadCoinsToSubtract: ; 528b1 (14:68b1)
|
||||||
ld a,[wd139] ; backup of selected menu_entry
|
ld a,[wWhichPrize]
|
||||||
add a
|
add a
|
||||||
ld d,$00
|
ld d,0
|
||||||
ld e,a
|
ld e,a
|
||||||
ld hl,wd141 ; first prize's price
|
ld hl,wPrize1Price
|
||||||
add hl,de ; get selected prize's price
|
add hl,de ; get selected prize's price
|
||||||
xor a
|
xor a
|
||||||
ld [hUnusedCoinsByte],a
|
ld [hUnusedCoinsByte],a
|
||||||
|
|
@ -187,15 +187,15 @@ LoadCoinsToSubtract: ; 528b1 (14:68b1)
|
||||||
ret
|
ret
|
||||||
|
|
||||||
HandlePrizeChoice: ; 528c6 (14:68c6)
|
HandlePrizeChoice: ; 528c6 (14:68c6)
|
||||||
ld a,[wCurrentMenuItem] ; selected menu_entry
|
ld a,[wCurrentMenuItem]
|
||||||
ld [wd139],a
|
ld [wWhichPrize],a
|
||||||
ld d,$00
|
ld d,0
|
||||||
ld e,a
|
ld e,a
|
||||||
ld hl,W_PRIZE1
|
ld hl,W_PRIZE1
|
||||||
add hl,de
|
add hl,de
|
||||||
ld a,[hl]
|
ld a,[hl]
|
||||||
ld [wd11e],a
|
ld [wd11e],a
|
||||||
ld a,[wd12f]
|
ld a,[wWhichPrizeWindow]
|
||||||
cp a,$02 ; is prize a TM?
|
cp a,$02 ; is prize a TM?
|
||||||
jr nz,.GetMonName
|
jr nz,.GetMonName
|
||||||
call GetItemName
|
call GetItemName
|
||||||
|
|
@ -205,14 +205,14 @@ HandlePrizeChoice: ; 528c6 (14:68c6)
|
||||||
.GivePrize
|
.GivePrize
|
||||||
ld hl,SoYouWantPrizeTextPtr
|
ld hl,SoYouWantPrizeTextPtr
|
||||||
call PrintText
|
call PrintText
|
||||||
call YesNoChoice ; yes/no textbox
|
call YesNoChoice
|
||||||
ld a,[wCurrentMenuItem] ; yes/no answer (Y=0, N=1)
|
ld a,[wCurrentMenuItem] ; yes/no answer (Y=0, N=1)
|
||||||
and a
|
and a
|
||||||
jr nz,.PrintOhFineThen
|
jr nz,.PrintOhFineThen
|
||||||
call LoadCoinsToSubtract
|
call LoadCoinsToSubtract
|
||||||
call HasEnoughCoins
|
call HasEnoughCoins
|
||||||
jr c,.NotEnoughCoins
|
jr c,.NotEnoughCoins
|
||||||
ld a,[wd12f]
|
ld a,[wWhichPrizeWindow]
|
||||||
cp a,$02
|
cp a,$02
|
||||||
jr nz,.GiveMon
|
jr nz,.GiveMon
|
||||||
ld a,[wd11e]
|
ld a,[wd11e]
|
||||||
|
|
|
||||||
|
|
@ -167,7 +167,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
||||||
jp z,.loop
|
jp z,.loop
|
||||||
ld a,SURFBOARD
|
ld a,SURFBOARD
|
||||||
ld [wcf91],a
|
ld [wcf91],a
|
||||||
ld [wd152],a
|
ld [wPseudoItemID],a
|
||||||
call UseItem
|
call UseItem
|
||||||
ld a,[wActionResultOrTookBattleTurn]
|
ld a,[wActionResultOrTookBattleTurn]
|
||||||
and a
|
and a
|
||||||
|
|
@ -195,7 +195,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
||||||
.dig
|
.dig
|
||||||
ld a,ESCAPE_ROPE
|
ld a,ESCAPE_ROPE
|
||||||
ld [wcf91],a
|
ld [wcf91],a
|
||||||
ld [wd152],a
|
ld [wPseudoItemID],a
|
||||||
call UseItem
|
call UseItem
|
||||||
ld a,[wActionResultOrTookBattleTurn]
|
ld a,[wActionResultOrTookBattleTurn]
|
||||||
and a
|
and a
|
||||||
|
|
@ -260,7 +260,7 @@ StartMenu_Pokemon: ; 130a9 (4:70a9)
|
||||||
push af
|
push af
|
||||||
ld a,POTION
|
ld a,POTION
|
||||||
ld [wcf91],a
|
ld [wcf91],a
|
||||||
ld [wd152],a
|
ld [wPseudoItemID],a
|
||||||
call UseItem
|
call UseItem
|
||||||
pop af
|
pop af
|
||||||
ld [wPartyAndBillsPCSavedMenuItem],a
|
ld [wPartyAndBillsPCSavedMenuItem],a
|
||||||
|
|
@ -381,8 +381,8 @@ StartMenu_Item: ; 13302 (4:7302)
|
||||||
ld a,[wCurrentMenuItem]
|
ld a,[wCurrentMenuItem]
|
||||||
and a
|
and a
|
||||||
jr nz,.tossItem
|
jr nz,.tossItem
|
||||||
.useItem
|
; use item
|
||||||
ld [wd152],a
|
ld [wPseudoItemID],a ; a must be 0 due to above conditional jump
|
||||||
ld a,[wcf91]
|
ld a,[wcf91]
|
||||||
cp a,HM_01
|
cp a,HM_01
|
||||||
jr nc,.useItem_partyMenu
|
jr nc,.useItem_partyMenu
|
||||||
|
|
@ -399,7 +399,7 @@ StartMenu_Item: ; 13302 (4:7302)
|
||||||
jp ItemMenuLoop
|
jp ItemMenuLoop
|
||||||
.useItem_closeMenu
|
.useItem_closeMenu
|
||||||
xor a
|
xor a
|
||||||
ld [wd152],a
|
ld [wPseudoItemID],a
|
||||||
call UseItem
|
call UseItem
|
||||||
ld a,[wActionResultOrTookBattleTurn]
|
ld a,[wActionResultOrTookBattleTurn]
|
||||||
and a
|
and a
|
||||||
|
|
|
||||||
|
|
@ -178,7 +178,7 @@ PewterMovementScript_WalkToMuseum: ; 1a514 (6:6514)
|
||||||
dec a
|
dec a
|
||||||
ld [wSimulatedJoypadStatesIndex], a
|
ld [wSimulatedJoypadStatesIndex], a
|
||||||
xor a
|
xor a
|
||||||
ld [wd12f], a
|
ld [wWhichPewterGuy], a
|
||||||
predef PewterGuys
|
predef PewterGuys
|
||||||
ld hl, wNPCMovementDirections2
|
ld hl, wNPCMovementDirections2
|
||||||
ld de, RLEList_PewterMuseumGuy
|
ld de, RLEList_PewterMuseumGuy
|
||||||
|
|
@ -234,8 +234,8 @@ PewterMovementScript_WalkToGym: ; 1a581 (6:6581)
|
||||||
call DecodeRLEList
|
call DecodeRLEList
|
||||||
dec a
|
dec a
|
||||||
ld [wSimulatedJoypadStatesIndex], a
|
ld [wSimulatedJoypadStatesIndex], a
|
||||||
ld a, $1
|
ld a, 1
|
||||||
ld [wd12f], a
|
ld [wWhichPewterGuy], a
|
||||||
predef PewterGuys
|
predef PewterGuys
|
||||||
ld hl, wNPCMovementDirections2
|
ld hl, wNPCMovementDirections2
|
||||||
ld de, RLEList_PewterGymGuy
|
ld de, RLEList_PewterGymGuy
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,7 @@ PewterGuys: ; 37ca1 (d:7ca1)
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
ld hl, PointerTable_37ce6
|
ld hl, PointerTable_37ce6
|
||||||
ld a, [wd12f]
|
ld a, [wWhichPewterGuy]
|
||||||
add a
|
add a
|
||||||
ld b, 0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
|
|
@ -21,17 +21,17 @@ PewterGuys: ; 37ca1 (d:7ca1)
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [W_XCOORD]
|
ld a, [W_XCOORD]
|
||||||
ld c, a
|
ld c, a
|
||||||
.asm_37cc7
|
.findMatchingCoordsLoop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp b
|
cp b
|
||||||
jr nz, .asm_37ce1
|
jr nz, .nextEntry1
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp c
|
cp c
|
||||||
jr nz, .asm_37ce2
|
jr nz, .nextEntry2
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
.asm_37cd2
|
.copyMovementDataLoop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp $ff
|
cp $ff
|
||||||
ret z
|
ret z
|
||||||
|
|
@ -40,13 +40,13 @@ PewterGuys: ; 37ca1 (d:7ca1)
|
||||||
ld a, [wSimulatedJoypadStatesIndex]
|
ld a, [wSimulatedJoypadStatesIndex]
|
||||||
inc a
|
inc a
|
||||||
ld [wSimulatedJoypadStatesIndex], a
|
ld [wSimulatedJoypadStatesIndex], a
|
||||||
jr .asm_37cd2
|
jr .copyMovementDataLoop
|
||||||
.asm_37ce1
|
.nextEntry1
|
||||||
inc hl
|
inc hl
|
||||||
.asm_37ce2
|
.nextEntry2
|
||||||
inc hl
|
inc hl
|
||||||
inc hl
|
inc hl
|
||||||
jr .asm_37cc7
|
jr .findMatchingCoordsLoop
|
||||||
|
|
||||||
PointerTable_37ce6: ; 37ce6 (d:7ce6)
|
PointerTable_37ce6: ; 37ce6 (d:7ce6)
|
||||||
dw PewterMuseumGuyCoords
|
dw PewterMuseumGuyCoords
|
||||||
|
|
|
||||||
|
|
@ -24,16 +24,16 @@ _GetSpritePosition2: ; 56819 (15:6819)
|
||||||
ld [H_SPRITEINDEX], a
|
ld [H_SPRITEINDEX], a
|
||||||
call GetSpriteDataPointer
|
call GetSpriteDataPointer
|
||||||
ld a, [hli] ; c1x4 (screen Y pos)
|
ld a, [hli] ; c1x4 (screen Y pos)
|
||||||
ld [wd130], a
|
ld [wSavedSpriteScreenY], a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hl] ; c1x6 (screen X pos)
|
ld a, [hl] ; c1x6 (screen X pos)
|
||||||
ld [wd131], a
|
ld [wSavedSpriteScreenX], a
|
||||||
ld de, $104 - $6
|
ld de, $104 - $6
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hli] ; c2x4 (map Y pos)
|
ld a, [hli] ; c2x4 (map Y pos)
|
||||||
ld [wd132], a
|
ld [wSavedSpriteMapY], a
|
||||||
ld a, [hl] ; c2x5 (map X pos)
|
ld a, [hl] ; c2x5 (map X pos)
|
||||||
ld [wd133], a
|
ld [wSavedSpriteMapX], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
_SetSpritePosition1: ; 5683d (15:683d)
|
_SetSpritePosition1: ; 5683d (15:683d)
|
||||||
|
|
@ -61,16 +61,16 @@ _SetSpritePosition2: ; 5685d (15:685d)
|
||||||
ld a, [wSpriteIndex]
|
ld a, [wSpriteIndex]
|
||||||
ld [H_SPRITEINDEX], a
|
ld [H_SPRITEINDEX], a
|
||||||
call GetSpriteDataPointer
|
call GetSpriteDataPointer
|
||||||
ld a, [wd130]
|
ld a, [wSavedSpriteScreenY]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [wd131]
|
ld a, [wSavedSpriteScreenX]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ld de, $00fe
|
ld de, $00fe
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [wd132]
|
ld a, [wSavedSpriteMapY]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [wd133]
|
ld a, [wSavedSpriteMapX]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
|
||||||
4
home.asm
4
home.asm
|
|
@ -1144,7 +1144,7 @@ DisplayTextID:: ; 2920 (0:2920)
|
||||||
jr nz,HoldTextDisplayOpen
|
jr nz,HoldTextDisplayOpen
|
||||||
|
|
||||||
AfterDisplayingTextID:: ; 29d6 (0:29d6)
|
AfterDisplayingTextID:: ; 29d6 (0:29d6)
|
||||||
ld a,[wcc47]
|
ld a,[wEnteringCableClub]
|
||||||
and a
|
and a
|
||||||
jr nz,HoldTextDisplayOpen
|
jr nz,HoldTextDisplayOpen
|
||||||
call WaitForTextScrollButtonPress ; wait for a button press after displaying all the text
|
call WaitForTextScrollButtonPress ; wait for a button press after displaying all the text
|
||||||
|
|
@ -4162,7 +4162,7 @@ HandleDownArrowBlinkTiming:: ; 3c04 (0:3c04)
|
||||||
|
|
||||||
; The following code either enables or disables the automatic drawing of
|
; The following code either enables or disables the automatic drawing of
|
||||||
; text boxes by DisplayTextID. Both functions cause DisplayTextID to wait
|
; text boxes by DisplayTextID. Both functions cause DisplayTextID to wait
|
||||||
; for a button press after displaying text (unless [wcc47] is set).
|
; for a button press after displaying text (unless [wEnteringCableClub] is set).
|
||||||
|
|
||||||
EnableAutoTextBoxDrawing:: ; 3c3c (0:3c3c)
|
EnableAutoTextBoxDrawing:: ; 3c3c (0:3c3c)
|
||||||
xor a
|
xor a
|
||||||
|
|
|
||||||
|
|
@ -106,13 +106,14 @@ OverworldLoopLessDelay::
|
||||||
aCoord 8, 9
|
aCoord 8, 9
|
||||||
ld [wTilePlayerStandingOn],a ; unused?
|
ld [wTilePlayerStandingOn],a ; unused?
|
||||||
call DisplayTextID ; display either the start menu or the NPC/sign text
|
call DisplayTextID ; display either the start menu or the NPC/sign text
|
||||||
ld a,[wcc47]
|
ld a,[wEnteringCableClub]
|
||||||
and a
|
and a
|
||||||
jr z,.checkForOpponent
|
jr z,.checkForOpponent
|
||||||
dec a
|
dec a
|
||||||
ld a,$00
|
ld a,0
|
||||||
ld [wcc47],a
|
ld [wEnteringCableClub],a
|
||||||
jr z,.changeMap
|
jr z,.changeMap
|
||||||
|
; XXX can this code be reached?
|
||||||
predef LoadSAV
|
predef LoadSAV
|
||||||
ld a,[W_CURMAP]
|
ld a,[W_CURMAP]
|
||||||
ld [wDestinationMap],a
|
ld [wDestinationMap],a
|
||||||
|
|
@ -470,16 +471,16 @@ WarpFound1:: ; 0735 (0:0735)
|
||||||
WarpFound2:: ; 073c (0:073c)
|
WarpFound2:: ; 073c (0:073c)
|
||||||
ld a,[wNumberOfWarps]
|
ld a,[wNumberOfWarps]
|
||||||
sub c
|
sub c
|
||||||
ld [wd73b],a ; save ID of used warp
|
ld [wWarpedFromWhichWarp],a ; save ID of used warp
|
||||||
ld a,[W_CURMAP]
|
ld a,[W_CURMAP]
|
||||||
ld [wd73c],a
|
ld [wWarpedFromWhichMap],a
|
||||||
call CheckIfInOutsideMap
|
call CheckIfInOutsideMap
|
||||||
jr nz,.indoorMaps
|
jr nz,.indoorMaps
|
||||||
; this is for handling "outside" maps that can't have the 0xFF destination map
|
; this is for handling "outside" maps that can't have the 0xFF destination map
|
||||||
ld a,[W_CURMAP]
|
ld a,[W_CURMAP]
|
||||||
ld [wLastMap],a
|
ld [wLastMap],a
|
||||||
ld a,[W_CURMAPWIDTH]
|
ld a,[W_CURMAPWIDTH]
|
||||||
ld [wd366],a
|
ld [wUnusedD366],a ; not read
|
||||||
ld a,[hWarpDestinationMap]
|
ld a,[hWarpDestinationMap]
|
||||||
ld [W_CURMAP],a
|
ld [W_CURMAP],a
|
||||||
cp a,ROCK_TUNNEL_1
|
cp a,ROCK_TUNNEL_1
|
||||||
|
|
|
||||||
|
|
@ -376,9 +376,9 @@ TextCommandProcessor:: ; 1b40 (0:1b40)
|
||||||
xor e
|
xor e
|
||||||
ld [wLetterPrintingDelayFlags],a
|
ld [wLetterPrintingDelayFlags],a
|
||||||
ld a,c
|
ld a,c
|
||||||
ld [wcc3a],a
|
ld [wUnusedCC3A],a
|
||||||
ld a,b
|
ld a,b
|
||||||
ld [wcc3b],a
|
ld [wUnusedCC3B],a
|
||||||
|
|
||||||
NextTextCommand:: ; 1b55 (0:1b55)
|
NextTextCommand:: ; 1b55 (0:1b55)
|
||||||
ld a,[hli]
|
ld a,[hli]
|
||||||
|
|
@ -487,10 +487,10 @@ TextCommand02:: ; 1ba5 (0:1ba5)
|
||||||
TextCommand03:: ; 1bb7 (0:1bb7)
|
TextCommand03:: ; 1bb7 (0:1bb7)
|
||||||
pop hl
|
pop hl
|
||||||
ld a,[hli]
|
ld a,[hli]
|
||||||
ld [wcc3a],a
|
ld [wUnusedCC3A],a
|
||||||
ld c,a
|
ld c,a
|
||||||
ld a,[hli]
|
ld a,[hli]
|
||||||
ld [wcc3b],a
|
ld [wUnusedCC3B],a
|
||||||
ld b,a
|
ld b,a
|
||||||
jp NextTextCommand
|
jp NextTextCommand
|
||||||
|
|
||||||
|
|
|
||||||
4
hram.asm
4
hram.asm
|
|
@ -265,6 +265,10 @@ H_CURRENTSPRITEOFFSET EQU $FFDA ; multiple of $10
|
||||||
|
|
||||||
hFossilCounter EQU $FFDB
|
hFossilCounter EQU $FFDB
|
||||||
|
|
||||||
|
hGymGateIndex EQU $FFDB
|
||||||
|
|
||||||
|
hGymTrashCanRandNumMask EQU $FFDB
|
||||||
|
|
||||||
hItemToRemoveID EQU $FFDB
|
hItemToRemoveID EQU $FFDB
|
||||||
hItemToRemoveIndex EQU $FFDC
|
hItemToRemoveIndex EQU $FFDC
|
||||||
|
|
||||||
|
|
|
||||||
16
main.asm
16
main.asm
|
|
@ -687,9 +687,9 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
|
||||||
ld a, [wWhichDungeonWarp]
|
ld a, [wWhichDungeonWarp]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld hl, DungeonWarpList
|
ld hl, DungeonWarpList
|
||||||
ld de, $0
|
ld de, 0
|
||||||
ld a, $6
|
ld a, 6
|
||||||
ld [wd12f], a
|
ld [wDungeonWarpDataEntrySize], a
|
||||||
.dungeonWarpListLoop
|
.dungeonWarpListLoop
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
cp b
|
cp b
|
||||||
|
|
@ -701,7 +701,7 @@ LoadSpecialWarpData: ; 62ff (1:62ff)
|
||||||
cp c
|
cp c
|
||||||
jr z, .matchedDungeonWarpID
|
jr z, .matchedDungeonWarpID
|
||||||
.nextDungeonWarp
|
.nextDungeonWarp
|
||||||
ld a, [wd12f]
|
ld a, [wDungeonWarpDataEntrySize]
|
||||||
add e
|
add e
|
||||||
ld e, a
|
ld e, a
|
||||||
jr .dungeonWarpListLoop
|
jr .dungeonWarpListLoop
|
||||||
|
|
@ -2063,7 +2063,7 @@ ClearVariablesAfterLoadingMapData: ; c335 (3:4335)
|
||||||
ld [hJoyReleased], a
|
ld [hJoyReleased], a
|
||||||
ld [hJoyHeld], a
|
ld [hJoyHeld], a
|
||||||
ld [wActionResultOrTookBattleTurn], a
|
ld [wActionResultOrTookBattleTurn], a
|
||||||
ld [wd5a3], a
|
ld [wUnusedD5A3], a
|
||||||
ld hl, wCardKeyDoorY
|
ld hl, wCardKeyDoorY
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
|
|
@ -3640,8 +3640,8 @@ _AddPartyMon: ; f2e5 (3:72e5)
|
||||||
ld b, FLAG_TEST
|
ld b, FLAG_TEST
|
||||||
ld hl, wPokedexOwned
|
ld hl, wPokedexOwned
|
||||||
call FlagAction
|
call FlagAction
|
||||||
ld a, c
|
ld a, c ; whether the mon was already flagged as owned
|
||||||
ld [wd153], a
|
ld [wUnusedD153], a ; not read
|
||||||
ld a, [wd11e]
|
ld a, [wd11e]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
|
|
@ -4463,7 +4463,7 @@ InitPlayerData2:
|
||||||
ld [wPlayerID + 1], a
|
ld [wPlayerID + 1], a
|
||||||
|
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
ld [wd71b], a ; XXX what's this?
|
ld [wUnusedD71B], a
|
||||||
|
|
||||||
ld hl, wPartyCount
|
ld hl, wPartyCount
|
||||||
call InitializeEmptyList
|
call InitializeEmptyList
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ CeladonGymText_48963: ; 48963 (12:4963)
|
||||||
.asm_4898c
|
.asm_4898c
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 3, [hl]
|
set 3, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 3, [hl]
|
set 3, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ CeladonMartElevatorScript: ; 48600 (12:4600)
|
||||||
|
|
||||||
CeladonMartElevatorScript_4861c: ; 4861c (12:461c)
|
CeladonMartElevatorScript_4861c: ; 4861c (12:461c)
|
||||||
ld hl, wWarpEntries
|
ld hl, wWarpEntries
|
||||||
ld a, [wd73b]
|
ld a, [wWarpedFromWhichWarp]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd73c]
|
ld a, [wWarpedFromWhichMap]
|
||||||
ld c, a
|
ld c, a
|
||||||
call CeladonMartElevatorScript_4862a
|
call CeladonMartElevatorScript_4862a
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ CeruleanGymScript_5c70d: ; 5c70d (17:470d)
|
||||||
.asm_5c736
|
.asm_5c736
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 1, [hl]
|
set 1, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ CinnabarGymScript_75792: ; 75792 (1d:5792)
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
ld [W_CINNABARGYMCURSCRIPT], a
|
ld [W_CINNABARGYMCURSCRIPT], a
|
||||||
ld [W_CURMAPSCRIPT], a
|
ld [W_CURMAPSCRIPT], a
|
||||||
ld [wda38], a
|
ld [wOpponentAfterWrongAnswer], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CinnabarGymScript_757a0: ; 757a0 (1d:57a0)
|
CinnabarGymScript_757a0: ; 757a0 (1d:57a0)
|
||||||
|
|
@ -47,7 +47,7 @@ CinnabarGymScriptPointers: ; 757a6 (1d:57a6)
|
||||||
dw CinnabarGymScript3
|
dw CinnabarGymScript3
|
||||||
|
|
||||||
CinnabarGymScript0: ; 757ae (1d:57ae)
|
CinnabarGymScript0: ; 757ae (1d:57ae)
|
||||||
ld a, [wda38]
|
ld a, [wOpponentAfterWrongAnswer]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld [H_SPRITEINDEX], a
|
ld [H_SPRITEINDEX], a
|
||||||
|
|
@ -83,7 +83,7 @@ CinnabarGymScript1: ; 757dc (1d:57dc)
|
||||||
ret nz
|
ret nz
|
||||||
xor a
|
xor a
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
ld a, [wda38]
|
ld a, [wOpponentAfterWrongAnswer]
|
||||||
ld [wTrainerHeaderFlagBit], a
|
ld [wTrainerHeaderFlagBit], a
|
||||||
ld [hSpriteIndexOrTextID], a
|
ld [hSpriteIndexOrTextID], a
|
||||||
jp DisplayTextID
|
jp DisplayTextID
|
||||||
|
|
@ -127,7 +127,7 @@ CinnabarGymScript2: ; 757f6 (1d:57f6)
|
||||||
call UpdateCinnabarGymGateTileBlocks
|
call UpdateCinnabarGymGateTileBlocks
|
||||||
xor a
|
xor a
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
ld [wda38], a
|
ld [wOpponentAfterWrongAnswer], a
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [W_CINNABARGYMCURSCRIPT], a
|
ld [W_CINNABARGYMCURSCRIPT], a
|
||||||
ld [W_CURMAPSCRIPT], a
|
ld [W_CURMAPSCRIPT], a
|
||||||
|
|
@ -159,7 +159,7 @@ CinnabarGymScript3_75857: ; 75857 (1d:5857)
|
||||||
.asm_75880
|
.asm_75880
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ FuchsiaGymScript3_75497: ; 75497 (1d:5497)
|
||||||
.asm_754c0
|
.asm_754c0
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 4, [hl]
|
set 4, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
|
||||||
|
|
@ -522,11 +522,11 @@ OaksLabScript15: ; 1ceb0 (7:4eb0)
|
||||||
ld [wMissableObjectIndex], a
|
ld [wMissableObjectIndex], a
|
||||||
predef ShowObject
|
predef ShowObject
|
||||||
ld a, [wNPCMovementDirections2Index]
|
ld a, [wNPCMovementDirections2Index]
|
||||||
ld [wd157], a
|
ld [wSavedNPCMovementDirections2Index], a
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
ld hl, wNPCMovementDirections2
|
ld hl, wNPCMovementDirections2
|
||||||
ld a, $40
|
ld a, NPC_MOVEMENT_UP
|
||||||
call FillMemory
|
call FillMemory
|
||||||
ld [hl], $ff
|
ld [hl], $ff
|
||||||
ld a, $1
|
ld a, $1
|
||||||
|
|
@ -604,11 +604,11 @@ OaksLabScript16: ; 1cf12 (7:4f12)
|
||||||
ld a, HS_OLD_MAN
|
ld a, HS_OLD_MAN
|
||||||
ld [wMissableObjectIndex], a
|
ld [wMissableObjectIndex], a
|
||||||
predef ShowObject
|
predef ShowObject
|
||||||
ld a, [wd157]
|
ld a, [wSavedNPCMovementDirections2Index]
|
||||||
ld b, $0
|
ld b, 0
|
||||||
ld c, a
|
ld c, a
|
||||||
ld hl, wNPCMovementDirections2
|
ld hl, wNPCMovementDirections2
|
||||||
xor a
|
xor a ; NPC_MOVEMENT_DOWN
|
||||||
call FillMemory
|
call FillMemory
|
||||||
ld [hl], $ff
|
ld [hl], $ff
|
||||||
ld a, $ff
|
ld a, $ff
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ PewterGymScript_5c3df: ; 5c3df (17:43df)
|
||||||
.asm_5c408
|
.asm_5c408
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 0, [hl]
|
set 0, [hl]
|
||||||
|
|
||||||
ld a, HS_GYM_GUY
|
ld a, HS_GYM_GUY
|
||||||
|
|
@ -183,7 +183,7 @@ PewterGymAfterBattleText1: ; 5c4da (17:44da)
|
||||||
|
|
||||||
PewterGymText3: ; 5c4df (17:44df)
|
PewterGymText3: ; 5c4df (17:44df)
|
||||||
TX_ASM
|
TX_ASM
|
||||||
ld a, [wd72a]
|
ld a, [wBeatGymFlags]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_5c50c
|
jr nz, .asm_5c50c
|
||||||
ld hl, PewterGymText_5c515
|
ld hl, PewterGymText_5c515
|
||||||
|
|
|
||||||
|
|
@ -57,7 +57,7 @@ PokemonTower7Script3: ; 60d56 (18:4d56)
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
ld [wSpriteIndex], a
|
ld [wSpriteIndex], a
|
||||||
ld [wTrainerHeaderFlagBit], a
|
ld [wTrainerHeaderFlagBit], a
|
||||||
ld [wda38], a
|
ld [wUnusedDA38], a
|
||||||
ld a, $0
|
ld a, $0
|
||||||
ld [W_POKEMONTOWER7CURSCRIPT], a
|
ld [W_POKEMONTOWER7CURSCRIPT], a
|
||||||
ld [W_CURMAPSCRIPT], a
|
ld [W_CURMAPSCRIPT], a
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ RocketHideoutElevatorScript: ; 45710 (11:5710)
|
||||||
|
|
||||||
RocketHideoutElevatorScript_4572c: ; 4572c (11:572c)
|
RocketHideoutElevatorScript_4572c: ; 4572c (11:572c)
|
||||||
ld hl, wWarpEntries
|
ld hl, wWarpEntries
|
||||||
ld a, [wd73b]
|
ld a, [wWarpedFromWhichWarp]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd73c]
|
ld a, [wWarpedFromWhichMap]
|
||||||
ld c, a
|
ld c, a
|
||||||
call RocketHideoutElevatorScript_4573a
|
call RocketHideoutElevatorScript_4573a
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -62,7 +62,7 @@ SaffronGymText_5d068: ; 5d068 (17:5068)
|
||||||
.asm_5d091
|
.asm_5d091
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 5, [hl]
|
set 5, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
|
||||||
|
|
@ -35,12 +35,12 @@ SeafoamIslands5Script0: ; 467c7 (11:67c7)
|
||||||
ld a, [wCoordIndex]
|
ld a, [wCoordIndex]
|
||||||
cp $3
|
cp $3
|
||||||
jr nc, .asm_467e6
|
jr nc, .asm_467e6
|
||||||
ld a, $40
|
ld a, NPC_MOVEMENT_UP
|
||||||
ld [wccd4], a
|
ld [wSimulatedJoypadStatesEnd + 1], a
|
||||||
ld a, $2
|
ld a, 2
|
||||||
jr .asm_467e8
|
jr .asm_467e8
|
||||||
.asm_467e6
|
.asm_467e6
|
||||||
ld a, $1
|
ld a, 1
|
||||||
.asm_467e8
|
.asm_467e8
|
||||||
ld [wSimulatedJoypadStatesIndex], a
|
ld [wSimulatedJoypadStatesIndex], a
|
||||||
ld a, D_UP
|
ld a, D_UP
|
||||||
|
|
|
||||||
|
|
@ -16,9 +16,9 @@ SilphCoElevatorScript: ; 457c0 (11:57c0)
|
||||||
|
|
||||||
SilphCoElevatorScript_457dc: ; 457dc (11:57dc)
|
SilphCoElevatorScript_457dc: ; 457dc (11:57dc)
|
||||||
ld hl, wWarpEntries
|
ld hl, wWarpEntries
|
||||||
ld a, [wd73b]
|
ld a, [wWarpedFromWhichWarp]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd73c]
|
ld a, [wWarpedFromWhichMap]
|
||||||
ld c, a
|
ld c, a
|
||||||
call SilphCoElevatorScript_457ea
|
call SilphCoElevatorScript_457ea
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,8 +84,8 @@ VermilionCityScript2: ; 19833 (6:5833)
|
||||||
ld [wJoyIgnore], a
|
ld [wJoyIgnore], a
|
||||||
ld a, D_UP
|
ld a, D_UP
|
||||||
ld [wSimulatedJoypadStatesEnd], a
|
ld [wSimulatedJoypadStatesEnd], a
|
||||||
ld [wccd4], a
|
ld [wSimulatedJoypadStatesEnd + 1], a
|
||||||
ld a, $2
|
ld a, 2
|
||||||
ld [wSimulatedJoypadStatesIndex], a
|
ld [wSimulatedJoypadStatesIndex], a
|
||||||
call StartSimulatingJoypadStates
|
call StartSimulatingJoypadStates
|
||||||
ld a, $3
|
ld a, $3
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,7 @@ VermilionGymScript_5caaa: ; 5caaa (17:4aaa)
|
||||||
.asm_5cad3
|
.asm_5cad3
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
@ -247,7 +247,7 @@ VermilionGymAfterBattleText3: ; 5cbd6 (17:4bd6)
|
||||||
|
|
||||||
VermilionGymText5: ; 5cbdb (17:4bdb)
|
VermilionGymText5: ; 5cbdb (17:4bdb)
|
||||||
TX_ASM
|
TX_ASM
|
||||||
ld a, [wd72a]
|
ld a, [wBeatGymFlags]
|
||||||
bit 2, a
|
bit 2, a
|
||||||
jr nz, .asm_5cbeb
|
jr nz, .asm_5cbeb
|
||||||
ld hl, VermilionGymText_5cbf4
|
ld hl, VermilionGymText_5cbf4
|
||||||
|
|
|
||||||
|
|
@ -156,7 +156,7 @@ ViridianGymScript3_74995: ; 74995 (1d:4995)
|
||||||
.asm_749be
|
.asm_749be
|
||||||
ld hl, W_OBTAINEDBADGES
|
ld hl, W_OBTAINEDBADGES
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ld hl, wd72a
|
ld hl, wBeatGymFlags
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
|
|
||||||
; deactivate gym trainers
|
; deactivate gym trainers
|
||||||
|
|
|
||||||
131
wram.asm
131
wram.asm
|
|
@ -295,9 +295,11 @@ wTradeCenterPointerTableIndex:: ; cc38
|
||||||
|
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
; group these two together
|
wUnusedCC3A:: ; cc3a
|
||||||
wcc3a:: ds 1 ; both used in home/text.asm
|
ds 1
|
||||||
wcc3b:: ds 1
|
|
||||||
|
wUnusedCC3B:: ; cc3b
|
||||||
|
ds 1
|
||||||
|
|
||||||
wDoNotWaitForButtonPressAfterDisplayingText:: ; cc3c
|
wDoNotWaitForButtonPressAfterDisplayingText:: ; cc3c
|
||||||
; if non-zero, skip waiting for a button press after displaying text in DisplayTextID
|
; if non-zero, skip waiting for a button press after displaying text in DisplayTextID
|
||||||
|
|
@ -312,8 +314,7 @@ wSerialExchangeNybbleTempReceiveData:: ; cc3d
|
||||||
wLinkMenuSelectionReceiveBuffer:: ; cc3d
|
wLinkMenuSelectionReceiveBuffer:: ; cc3d
|
||||||
; two byte buffer
|
; two byte buffer
|
||||||
; the received menu selection is stored twice
|
; the received menu selection is stored twice
|
||||||
|
ds 1
|
||||||
wcc3d:: ds 1 ; not used for anything other than mentioned above (haha link function)
|
|
||||||
|
|
||||||
wSerialExchangeNybbleReceiveData:: ; cc3e
|
wSerialExchangeNybbleReceiveData:: ; cc3e
|
||||||
; the final received nybble is stored here by Serial_ExchangeNybble
|
; the final received nybble is stored here by Serial_ExchangeNybble
|
||||||
|
|
@ -336,8 +337,10 @@ wLinkTimeoutCounter:: ; cc47
|
||||||
wUnknownSerialCounter:: ; cc47
|
wUnknownSerialCounter:: ; cc47
|
||||||
; 2 bytes
|
; 2 bytes
|
||||||
|
|
||||||
wcc47:: ds 1 ; used in text id stuff
|
wEnteringCableClub:: ; cc47
|
||||||
wcc48:: ds 1 ; part of wUnknownSerialCounter
|
ds 1
|
||||||
|
|
||||||
|
ds 1
|
||||||
|
|
||||||
wWhichTradeMonSelectionMenu:: ; cc49
|
wWhichTradeMonSelectionMenu:: ; cc49
|
||||||
; $00 = player mons
|
; $00 = player mons
|
||||||
|
|
@ -412,9 +415,7 @@ wSlotMachineSavedROMBank:: ; cc5e
|
||||||
; ROM back to return to when the player is done with the slot machine
|
; ROM back to return to when the player is done with the slot machine
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
ds 12
|
ds 26
|
||||||
|
|
||||||
wcc6b:: ds 14 ; doesn't seem to be used for anything, probably just more storage
|
|
||||||
|
|
||||||
wAnimPalette:: ; cc79
|
wAnimPalette:: ; cc79
|
||||||
ds 1
|
ds 1
|
||||||
|
|
@ -452,8 +453,8 @@ wCanEvolveFlags:: ; ccd3
|
||||||
; Other methods of evolution simply set it by calling TryEvolvingMon.
|
; Other methods of evolution simply set it by calling TryEvolvingMon.
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wForceEvolution::
|
wForceEvolution:: ; ccd4
|
||||||
wccd4:: ds 1 ; has a direct reference for simulated joypad stuff in vermillion and seafoam
|
ds 1
|
||||||
|
|
||||||
; if [ccd5] != 1, the second AI layer is not applied
|
; if [ccd5] != 1, the second AI layer is not applied
|
||||||
wAILayer2Encouragement:: ; ccd5
|
wAILayer2Encouragement:: ; ccd5
|
||||||
|
|
@ -1942,12 +1943,36 @@ wMenuExitMethod:: ; d12e
|
||||||
; $02 = the user pressed B or pressed A with the second menu item selected
|
; $02 = the user pressed B or pressed A with the second menu item selected
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd12f:: ds 1 ; used in some coordinatestuff, npc pathstuff, and game corner prize stuff
|
wDungeonWarpDataEntrySize:: ; d12f
|
||||||
wd130:: ds 1 ; saved value of screen Y coord of trainer sprite
|
; the size is always 6, so they didn't need a variable in RAM for this
|
||||||
wd131:: ds 1 ; saved value of screen X coord of trainer sprite
|
|
||||||
wd132:: ds 1 ; saved value of map Y coordinate of trainer sprite (not sure for purpose)
|
wWhichPewterGuy:: ; d12f
|
||||||
wd133:: ds 6 ; saved value of map X coordinate of trainer sprite
|
; 0 = museum guy
|
||||||
wd139:: ds 1 ; backup of selected menu entry for game corner prizes
|
; 1 = gym guy
|
||||||
|
|
||||||
|
wWhichPrizeWindow:: ; d12f
|
||||||
|
; there are 3 windows, from 0 to 2
|
||||||
|
|
||||||
|
wGymGateTileBlock:: ; d12f
|
||||||
|
; a horizontal or vertical gate block
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
wSavedSpriteScreenY:: ; d130
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
wSavedSpriteScreenX:: ; d131
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
wSavedSpriteMapY:: ; d132
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
wSavedSpriteMapX:: ; d133
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
ds 5
|
||||||
|
|
||||||
|
wWhichPrize:: ; d139
|
||||||
|
ds 1
|
||||||
|
|
||||||
wIgnoreInputCounter:: ; d13a
|
wIgnoreInputCounter:: ; d13a
|
||||||
; counts downward each frame
|
; counts downward each frame
|
||||||
|
|
@ -1974,9 +1999,16 @@ W_PRIZE3:: ; d13f
|
||||||
wSerialRandomNumberListBlock:: ; d141
|
wSerialRandomNumberListBlock:: ; d141
|
||||||
; the first 7 bytes are the preamble
|
; the first 7 bytes are the preamble
|
||||||
|
|
||||||
wd141:: ds 2 ; prices for prizes
|
wPrize1Price:: ; d141
|
||||||
wd143:: ds 2 ; prices for prizes
|
ds 2
|
||||||
wd145:: ds 3 ; prices for prizes
|
|
||||||
|
wPrize2Price:: ; d143
|
||||||
|
ds 2
|
||||||
|
|
||||||
|
wPrize3Price:: ; d145
|
||||||
|
ds 2
|
||||||
|
|
||||||
|
ds 1
|
||||||
|
|
||||||
wLinkBattleRandomNumberList:: ; d148
|
wLinkBattleRandomNumberList:: ; d148
|
||||||
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
|
; shared list of 9 random numbers, indexed by wLinkBattleRandomNumberListIndex
|
||||||
|
|
@ -1985,11 +2017,23 @@ wLinkBattleRandomNumberList:: ; d148
|
||||||
wSerialPlayerDataBlock:: ; d152
|
wSerialPlayerDataBlock:: ; d152
|
||||||
; the first 6 bytes are the preamble
|
; the first 6 bytes are the preamble
|
||||||
|
|
||||||
wd152:: ds 1 ; used as a temporary storage for the item used
|
wPseudoItemID:: ; d152
|
||||||
wd153:: ds 3 ; written to during pokedex flag action but doesn't seem to be read from
|
; When a real item is being used, this is 0.
|
||||||
wd156:: ds 1 ; evolution stone ID used
|
; When a move is acting as an item, this is the ID of the item it's acting as.
|
||||||
wd157:: ds 1 ; used with oak's lab script (related to npc movement directions), possibly indirectly accessed with values below
|
; For example, out-of-battle Dig is executed using a fake Escape Rope item. In
|
||||||
|
; that case, this would be ESCAPE_ROPE.
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
wUnusedD153:: ; d153
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
ds 2
|
||||||
|
|
||||||
|
wEvoStoneItemID:: ; d156
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
wSavedNPCMovementDirections2Index:: ; d157
|
||||||
|
ds 1
|
||||||
|
|
||||||
wPlayerName:: ; d158
|
wPlayerName:: ; d158
|
||||||
ds 11
|
ds 11
|
||||||
|
|
@ -2092,7 +2136,8 @@ W_XBLOCKCOORD:: ; d364
|
||||||
wLastMap:: ; d365
|
wLastMap:: ; d365
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd366:: ds 1 ; W_CURMAPWIDTH of the last outdoor map visited when entering an inside map
|
wUnusedD366:: ; d366
|
||||||
|
ds 1
|
||||||
|
|
||||||
W_CURMAPTILESET:: ; d367
|
W_CURMAPTILESET:: ; d367
|
||||||
ds 1
|
ds 1
|
||||||
|
|
@ -2344,7 +2389,8 @@ wNumHoFTeams:: ; d5a2
|
||||||
; number of HOF teams
|
; number of HOF teams
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd5a3:: ds 1 ; unused? (written to when loading map data)
|
wUnusedD5A3:: ; d5a3
|
||||||
|
ds 1
|
||||||
|
|
||||||
wPlayerCoins:: ; d5a4
|
wPlayerCoins:: ; d5a4
|
||||||
ds 2 ; BCD
|
ds 2 ; BCD
|
||||||
|
|
@ -2635,7 +2681,8 @@ wDestinationMap:: ; d71a
|
||||||
; destination map (for certain types of special warps, not ordinary walking)
|
; destination map (for certain types of special warps, not ordinary walking)
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd71b:: ds 1 ; written to but doesn't seem to be read
|
wUnusedD71B:: ; d71b
|
||||||
|
ds 1
|
||||||
|
|
||||||
wTileInFrontOfBoulderAndBoulderCollisionResult:: ; d71c
|
wTileInFrontOfBoulderAndBoulderCollisionResult:: ; d71c
|
||||||
; used to store the tile in front of the boulder when trying to push a boulder
|
; used to store the tile in front of the boulder when trying to push a boulder
|
||||||
|
|
@ -2650,7 +2697,10 @@ wWhichDungeonWarp:: ; d71e
|
||||||
; which dungeon warp within the source map was used
|
; which dungeon warp within the source map was used
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd71f:: ds 9 ; used with card key
|
wUnusedD71F:: ; d71f
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
ds 8
|
||||||
|
|
||||||
wd728::
|
wd728::
|
||||||
; bit 0: using Strength outside of battle
|
; bit 0: using Strength outside of battle
|
||||||
|
|
@ -2658,7 +2708,12 @@ wd728::
|
||||||
|
|
||||||
ds 1
|
ds 1
|
||||||
|
|
||||||
wd72a:: ds 2 ; flags for if a gym is beaten, also used to determine whether to display your name on the gym statues
|
wBeatGymFlags:: ; d72a
|
||||||
|
; redundant because it matches W_OBTAINEDBADGES
|
||||||
|
; used to determine whether to show name on statue and in two NPC text scripts
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
ds 1
|
||||||
|
|
||||||
wd72c:: ; d72c
|
wd72c:: ; d72c
|
||||||
; bit 0: if not set, the 3 minimum steps between random battles have passed
|
; bit 0: if not set, the 3 minimum steps between random battles have passed
|
||||||
|
|
@ -2717,8 +2772,13 @@ wCompletedInGameTradeFlags:: ; d737
|
||||||
|
|
||||||
ds 2
|
ds 2
|
||||||
|
|
||||||
wd73b:: ds 1 ; used with elevator warps
|
wWarpedFromWhichWarp:: ; d73b
|
||||||
wd73c:: ds 3 ; also used with elevator warps
|
ds 1
|
||||||
|
|
||||||
|
wWarpedFromWhichMap:: ; d73c
|
||||||
|
ds 1
|
||||||
|
|
||||||
|
ds 2
|
||||||
|
|
||||||
wCardKeyDoorY:: ; d73f
|
wCardKeyDoorY:: ; d73f
|
||||||
ds 1
|
ds 1
|
||||||
|
|
@ -2767,7 +2827,12 @@ W_TRAINERHEADERPTR:: ; da30
|
||||||
|
|
||||||
ds 6
|
ds 6
|
||||||
|
|
||||||
wda38:: ds 1 ; used with cinnabar gym questions and pokemon tower 7F?
|
wOpponentAfterWrongAnswer:: ; da38
|
||||||
|
; the trainer the player must face after getting a wrong answer in the Cinnabar
|
||||||
|
; gym quiz
|
||||||
|
|
||||||
|
wUnusedDA38:: ; da38
|
||||||
|
ds 1
|
||||||
|
|
||||||
W_CURMAPSCRIPT:: ; da39
|
W_CURMAPSCRIPT:: ; da39
|
||||||
; index of current map script, mostly used as index for function pointer array
|
; index of current map script, mostly used as index for function pointer array
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue