link and seer labels

This commit is contained in:
PikalaxALT 2015-11-23 16:04:53 -05:00
parent 0dc5ae04b8
commit d972564175
24 changed files with 705 additions and 643 deletions

File diff suppressed because it is too large Load Diff

View File

@ -9028,7 +9028,7 @@ BatonPass_LinkPlayerSwitch: ; 37a67
ld [wd0ec], a
call LoadStandardMenuDataHeader
ld hl, Function3e8e4
ld hl, LinkBattleSendReceiveAction
call CallBattleCore
call WriteBackup
@ -9044,7 +9044,7 @@ BatonPass_LinkEnemySwitch: ; 37a82
ret z
call LoadStandardMenuDataHeader
ld hl, Function3e8e4
ld hl, LinkBattleSendReceiveAction
call CallBattleCore
ld a, [OTPartyCount]

View File

@ -176,6 +176,10 @@ const_value = 1
const LINK_COLOSSEUM
const LINK_MOBILE
SERIAL_TIMECAPSULE EQU $60
SERIAL_TRADECENTER EQU $70
SERIAL_BATTLE EQU $80
HMENURETURN_SCRIPT EQU %10000000
HMENURETURN_ASM EQU %11111111

View File

@ -2362,7 +2362,7 @@ _ChangeBox: ; e35aa (38:75aa)
ld hl, _ChangeBox_menudataheader
call CopyMenuDataHeader
xor a
ld [wd0e4], a
ld [wMenuScrollPosition], a
hlcoord 0, 4
lb bc, 8, 9
call TextBox

View File

@ -399,7 +399,7 @@ PopulateDecoCategoryMenu: ; 2695b
ld [hBGMapMode], a
call InitScrollingMenu
xor a
ld [wd0e4], a
ld [wMenuScrollPosition], a
call HandleScrollingMenu
ld a, [wcf73]
cp 2

View File

@ -9,7 +9,7 @@ EvolvePokemon: ; 421d8
EvolveAfterBattle: ; 421e6
xor a
ld [wd268], a
ld [wMonTriedToEvolve], a
dec a
ld [CurPartyMon], a
push hl
@ -201,7 +201,7 @@ endr
ld a, [TempMonLevel]
ld [CurPartyLevel], a
ld a, $1
ld [wd268], a
ld [wMonTriedToEvolve], a
push hl
@ -349,7 +349,7 @@ Evolution_ReturnToMap: ; 423ff
ld a, [wBattleMode]
and a
ret nz
ld a, [wd268]
ld a, [wMonTriedToEvolve]
and a
call nz, RestartMapMusic
ret

View File

@ -40,7 +40,7 @@ Function2805d: ; 2805d
call Function28499
call Function28434
xor a
ld [wcf56], a
ld [wPlayerLinkAction], a
call Function87d
ld a, [hLinkPlayerNumber]
cp $2
@ -474,7 +474,7 @@ Function283b2: ; 283b2
ld b, $a
.asm_283b7
call DelayFrame
call Function908
call LinkCommunicationsSignalDataReceived
dec b
jr nz, .asm_283b7
xor a
@ -1213,7 +1213,7 @@ Function287e3: ; 287e3
call Function28ef8
callba Function16d673
xor a
ld hl, wcf51
ld hl, wOtherPlayerLinkMode
rept 3
ld [hli], a
endr
@ -1221,7 +1221,7 @@ endr
ld a, $1
ld [MenuSelection2], a
inc a
ld [wcf56], a
ld [wPlayerLinkAction], a
jp Function2888b
; 28803
@ -1468,9 +1468,9 @@ Function28926: ; 28926
ld [MenuSelection2], a
dec a
ld [wd002], a
ld [wcf56], a
ld [wPlayerLinkAction], a
callba Function16d6ce
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
cp $f
jp z, Function287e3
ld [wd003], a
@ -1483,7 +1483,7 @@ Function28926: ; 28926
jp nc, Function28b87
xor a
ld [wcf57], a
ld [wcf52], a
ld [wOtherPlayerLinkAction], a
hlcoord 0, 12
ld b, $4
ld c, $12
@ -1497,7 +1497,7 @@ Function28926: ; 28926
.asm_28a58
xor a
ld [wcf57], a
ld [wcf52], a
ld [wOtherPlayerLinkAction], a
ld a, [wd003]
ld hl, OTPartySpecies
ld c, a
@ -1524,7 +1524,7 @@ Function28926: ; 28926
ld de, String28ece
call PlaceString
ld a, $1
ld [wcf56], a
ld [wPlayerLinkAction], a
callba Function16d6ce
ld c, $64
call DelayFrames
@ -1591,9 +1591,9 @@ Function28ade: ; 28ade
ld a, $ec
ldcoord_a 9, 17
ld a, $f
ld [wcf56], a
ld [wPlayerLinkAction], a
callba Function16d6ce
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
cp $f
jr nz, .asm_28ade
@ -1634,7 +1634,7 @@ String_28b61: ; 28b61
; 28b68
Function28b68: ; 28b68
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
hlcoord 6, 9
ld bc, SCREEN_WIDTH
call AddNTimes
@ -1662,7 +1662,7 @@ Function28b77: ; 28b77
Function28b87: ; 28b87
xor a
ld [wcf57], a
ld [wcf52], a
ld [wOtherPlayerLinkAction], a
hlcoord 0, 12
ld b, $4
ld c, $12
@ -1731,7 +1731,7 @@ Function28b87: ; 28b87
.asm_28c33
ld a, $1
ld [wcf56], a
ld [wPlayerLinkAction], a
hlcoord 0, 12
ld b, 4
ld c, 18
@ -1744,9 +1744,9 @@ Function28b87: ; 28b87
.asm_28c54
ld a, $2
ld [wcf56], a
ld [wPlayerLinkAction], a
callba Function16d6ce
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
dec a
jr nz, .asm_28c7b
hlcoord 0, 12
@ -1959,7 +1959,7 @@ Function28b87: ; 28b87
.asm_28e49
ld a, b
ld [wcf56], a
ld [wPlayerLinkAction], a
push bc
call Function862
pop bc
@ -1969,7 +1969,7 @@ Function28b87: ; 28b87
ld a, b
and a
jr z, .asm_28e63
ld a, [wcf52]
ld a, [wOtherPlayerLinkAction]
cp b
jr nz, .asm_28e49
@ -2148,11 +2148,11 @@ Function29c67: ; 29c67
; 29c7b
Special_EnterTimeCapsule: ; 29c7b
ld c, $a
ld c, 10
call DelayFrames
ld a, $4
call Function29f17
ld c, $28
ld c, 40
call DelayFrames
xor a
ld [hVBlank], a
@ -2210,15 +2210,15 @@ Special_AbortLink: ; 29c92
; 29ce8
Special_SetBitsForLinkTradeRequest: ; 29ce8
ld a, $1
ld [wcf56], a
ld a, LINK_TRADECENTER - 1
ld [wPlayerLinkAction], a
ld [wd265], a
ret
; 29cf1
Special_SetBitsForBattleRequest: ; 29cf1
ld a, $2
ld [wcf56], a
ld a, LINK_COLOSSEUM - 1
ld [wPlayerLinkAction], a
ld [wd265], a
ret
; 29cfa
@ -2232,14 +2232,14 @@ Special_SetBitsForTimeCapsuleRequest: ; 29cfa
ld [rSC], a
ld a, $80
ld [rSC], a
xor a
ld [wcf56], a
xor a ; LINK_TIMECAPSULE - 1
ld [wPlayerLinkAction], a
ld [wd265], a
ret
; 29d11
Special_WaitForLinkedFriend: ; 29d11
ld a, [wcf56]
ld a, [wPlayerLinkAction]
and a
jr z, .asm_29d2f
ld a, $2
@ -2295,9 +2295,9 @@ Special_WaitForLinkedFriend: ; 29d11
jr .asm_29d39
.asm_29d79
call Function908
call LinkCommunicationsSignalDataReceived
call DelayFrame
call Function908
call LinkCommunicationsSignalDataReceived
ld c, $32
call DelayFrames
ld a, $1
@ -2312,7 +2312,7 @@ Special_WaitForLinkedFriend: ; 29d11
Special_CheckLinkTimeout: ; 29d92
ld a, $1
ld [wcf56], a
ld [wPlayerLinkAction], a
ld hl, wcf5b
ld a, $3
ld [hli], a
@ -2334,7 +2334,7 @@ Special_CheckLinkTimeout: ; 29d92
Function29dba: ; 29dba
ld a, $5
ld [wcf56], a
ld [wPlayerLinkAction], a
ld hl, wcf5b
ld a, $3
ld [hli], a
@ -2355,17 +2355,17 @@ Function29dba: ; 29dba
ld a, b
or c
jr nz, .asm_29de0
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
cp $5
jr nz, .asm_29e03
ld a, $6
ld [wcf56], a
ld [wPlayerLinkAction], a
ld hl, wcf5b
ld a, $1
ld [hli], a
ld [hl], $32
call Function29e0c
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
cp $6
jr z, .asm_29e08
@ -2426,7 +2426,7 @@ Function29e47: ; 29e47
ld b, $a
.asm_29e49
call DelayFrame
call Function908
call LinkCommunicationsSignalDataReceived
dec b
jr nz, .asm_29e49
ret
@ -2467,14 +2467,14 @@ Special_CheckBothSelectedSameRoom: ; 29e82
ld a, [wd265]
call Function29f17
push af
call Function908
call LinkCommunicationsSignalDataReceived
call DelayFrame
call Function908
call LinkCommunicationsSignalDataReceived
pop af
ld b, a
ld a, [wd265]
cp b
jr nz, .asm_29eaa
jr nz, .fail
ld a, [wd265]
inc a
ld [wLinkMode], a
@ -2484,7 +2484,7 @@ Special_CheckBothSelectedSameRoom: ; 29e82
ld [ScriptVar], a
ret
.asm_29eaa
.fail
xor a
ld [ScriptVar], a
ret
@ -2532,14 +2532,14 @@ Special_CloseLink: ; 29eee
; 29efa
Special_FailedLinkToPast: ; 29efa
ld c, $28
ld c, 40
call DelayFrames
ld a, $e
jp Function29f17
; 29f04
Function29f04: ; 29f04
ld c, $3
ld c, 3
call DelayFrames
ld a, -1
ld [hLinkPlayerNumber], a
@ -2553,26 +2553,26 @@ Function29f04: ; 29f04
Function29f17: ; 29f17
add $d0
ld [wcf56], a
ld [wPlayerLinkAction], a
ld [wcf57], a
ld a, $2
ld [hVBlank], a
call DelayFrame
call DelayFrame
.asm_29f29
.receive_loop
call Function83b
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
ld b, a
and $f0
cp $d0
jr z, .asm_29f40
ld a, [wcf52]
jr z, .done
ld a, [wOtherPlayerLinkAction]
ld b, a
and $f0
cp $d0
jr nz, .asm_29f29
jr nz, .receive_loop
.asm_29f40
.done
xor a
ld [hVBlank], a
ld a, b

View File

@ -398,9 +398,9 @@ MailboxPC: ; 0x44806
ld a, [wCurMessageIndex]
ld [wMenuCursorBuffer], a
ld a, [OBPals + 8 * 6]
ld [wd0e4], a
ld [wMenuScrollPosition], a
call HandleScrollingMenu
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
ld [OBPals + 8 * 6], a
ld a, [MenuSelection2]
ld [wCurMessageIndex], a

View File

@ -477,9 +477,9 @@ BuyMenuLoop: ; 15cef
ld a, [wd045]
ld [wMenuCursorBuffer], a
ld a, [wd045 + 1]
ld [wd0e4], a
ld [wMenuScrollPosition], a
call HandleScrollingMenu
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
ld [wd045 + 1], a
ld a, [MenuSelection2]
ld [wd045], a
@ -658,7 +658,7 @@ MenuDataHeader_Buy: ; 0x15e18
dbw 0, CurMart
dba PlaceMenuItemName
dba .PrintBCDPrices
dba Function244c3
dba UpdateItemDescription
; 15e30
.PrintBCDPrices: ; 15e30

File diff suppressed because it is too large Load Diff

View File

@ -590,9 +590,9 @@ Function15985: ; 0x15985
ld a, [wd0d7]
ld [wMenuCursorBuffer], a
ld a, [wd0dd]
ld [wd0e4], a
ld [wMenuScrollPosition], a
call HandleScrollingMenu
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
ld [wd0dd], a
ld a, [MenuSelection2]
ld [wd0d7], a
@ -659,7 +659,7 @@ MenuData15a08: ; 0x15a08
dbw 0, PCItems
dba PlaceMenuItemName
dba PlaceMenuItemQuantity
dba Function244c3
dba UpdateItemDescription
PC_DisplayText: ; 15a20
call MenuTextBox

View File

@ -66,7 +66,7 @@ SpecialBuenasPassword: ; 8af6b
SpecialBuenaPrize: ; 8afd4
xor a
ld [wd0e4], a
ld [wMenuScrollPosition], a
ld a, $1
ld [MenuSelection], a
call Function8b0d6

View File

@ -130,7 +130,7 @@ Function134dd: ; 134dd
call InitScrollingMenu
call UpdateSprites
xor a
ld [wd0e4], a
ld [wMenuScrollPosition], a
call HandleScrollingMenu
call WriteBackup
ld a, [wcf73]

View File

@ -26,7 +26,7 @@ Special_SelectApricornForKurt: ; 88018
call LoadStandardMenuDataHeader
ld c, $1
xor a
ld [wd0e4], a
ld [wMenuScrollPosition], a
ld [wKurtApricornQuantity], a
.loop
push bc

View File

@ -1,12 +1,19 @@
SEER_INTRO EQU 0
SEER_CANT_TELL EQU 1
SEER_MET_AT EQU 2
SEER_TIME_LEVEL EQU 3
SEER_TRADED EQU 4
SEER_CANCEL EQU 5
SEER_EGG EQU 6
SEER_LEVEL_ONLY EQU 7
const_def
const SEER_INTRO
const SEER_CANT_TELL
const SEER_MET_AT
const SEER_TIME_LEVEL
const SEER_TRADED
const SEER_CANCEL
const SEER_EGG
const SEER_LEVEL_ONLY
const_def
const SEERACTION_MET
const SEERACTION_TRADED
const SEERACTION_CANT_TELL_1
const SEERACTION_CANT_TELL_2
const SEERACTION_LEVEL_ONLY
SpecialPokeSeer: ; 4f0bc
ld a, SEER_INTRO
@ -44,7 +51,7 @@ SpecialPokeSeer: ; 4f0bc
SeerAction: ; 4f0ee
ld a, [wd002]
ld a, [wSeerAction]
ld hl, SeerActions
rst JumpTable
ret
@ -100,29 +107,30 @@ ReadCaughtData: ; 4f134
ld a, MON_CAUGHTDATA
call GetPartyParamLocation
ld a, [hli]
ld [wd03b], a
ld [wSeerCaughtData], a
ld a, [hld]
ld [wd03b + 1], a
ld [wSeerCaughtGender], a
or [hl]
jr z, .asm_4f170
jr z, .error
ld a, 1
ld [wd002], a
ld a, SEERACTION_TRADED
ld [wSeerAction], a
ld a, MON_ID
call GetPartyParamLocation
ld a, [PlayerID]
cp [hl]
jr nz, .asm_4f15f
jr nz, .traded
inc hl
ld a, [PlayerID + 1]
jr nz, .asm_4f15f
; cp [hl]
jr nz, .traded
ld a, 0
ld [wd002], a
ld a, SEERACTION_MET
ld [wSeerAction], a
.asm_4f15f
.traded
call GetCaughtLevel
call GetCaughtOT
call GetCaughtName
@ -131,9 +139,9 @@ ReadCaughtData: ; 4f134
and a
ret
.asm_4f170
ld a, 2
ld [wd002], a
.error
ld a, SEERACTION_CANT_TELL_1
ld [wSeerAction], a
ret
; 4f176
@ -142,7 +150,7 @@ GetCaughtName: ; 4f176
ld hl, PartyMonNicknames
ld bc, PKMN_NAME_LENGTH
call AddNTimes
ld de, wd003
ld de, wSeerNickname
ld bc, PKMN_NAME_LENGTH
call CopyBytes
ret
@ -150,12 +158,12 @@ GetCaughtName: ; 4f176
GetCaughtLevel: ; 4f18c
ld a, "@"
ld hl, wd036
ld hl, wSeerCaughtLevelString
ld bc, 4
call ByteFill
; caught level
ld a, [wd03b]
ld a, [wSeerCaughtData]
and $3f
jr z, .unknown
cp 1 ; hatched from an egg
@ -163,15 +171,15 @@ GetCaughtLevel: ; 4f18c
ld a, 5 ; egg hatch level
.print
ld [wd038 + 2], a
ld hl, wd036
ld de, wd038 + 2
ld [wSeerCaughtLevel], a
ld hl, wSeerCaughtLevelString
ld de, wSeerCaughtLevel
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
call PrintNum
ret
.unknown
ld de, wd036
ld de, wSeerCaughtLevelString
ld hl, .unknown_level
ld bc, 4
call CopyBytes
@ -183,7 +191,7 @@ GetCaughtLevel: ; 4f18c
; 4f1c5
GetCaughtTime: ; 4f1c5
ld a, [wd03b]
ld a, [wSeerCaughtData]
and $c0
jr z, .none
@ -194,13 +202,13 @@ GetCaughtTime: ; 4f1c5
call GetNthString
ld d, h
ld e, l
ld hl, wd01f
ld hl, wSeerTimeOfDay
call CopyName2
and a
ret
.none
ld de, wd01f
ld de, wSeerTimeOfDay
call UnknownCaughtData
ret
; 4f1e6
@ -213,7 +221,7 @@ GetCaughtTime: ; 4f1c5
UnknownCaughtData: ; 4f1f8
ld hl, .unknown
ld bc, $000b
ld bc, NAME_LENGTH
call CopyBytes
ret
; 4f202
@ -223,35 +231,35 @@ UnknownCaughtData: ; 4f1f8
; 4f20a
GetCaughtLocation: ; 4f20a
ld a, [wd03b + 1]
ld a, [wSeerCaughtGender]
and $7f
jr z, .asm_4f22e
jr z, .Unknown
cp $7f
jr z, .asm_4f234
jr z, .event
cp $7e
jr z, .asm_4f23b
jr z, .fail
ld e, a
callba GetLandmarkName
ld hl, StringBuffer1
ld de, wd00e
ld bc, $0011
ld de, wSeerCaughtLocation
ld bc, 17
call CopyBytes
and a
ret
.asm_4f22e
ld de, wd00e
.Unknown
ld de, wSeerCaughtLocation
jp UnknownCaughtData
.asm_4f234
ld a, $4
ld [wd002], a
.event
ld a, SEERACTION_LEVEL_ONLY
ld [wSeerAction], a
scf
ret
.asm_4f23b
ld a, $3
ld [wd002], a
.fail
ld a, SEERACTION_CANT_TELL_2
ld [wSeerAction], a
scf
ret
; 4f242
@ -261,17 +269,19 @@ GetCaughtOT: ; 4f242
ld hl, PartyMonOT
ld bc, NAME_LENGTH
call AddNTimes
ld de, wd02a
ld bc, $000b
ld de, wSeerOTName
ld bc, NAME_LENGTH
call CopyBytes
; this routine is useless in Western localizations
ld hl, .male
ld a, [wd03b + 1]
ld a, [wSeerCaughtGender]
bit 7, a
jr z, .asm_4f264
jr z, .got_grammar
ld hl, .female
.asm_4f264
ld de, wd034 + 1
.got_grammar
ld de, wSeerOTNameGrammar
ld a, "@"
ld [de], a
ret
@ -360,7 +370,7 @@ SeerCancelText: ; 0x4f2af
SeerAdvice: ; 4f2b4
ld a, MON_LEVEL
call GetPartyParamLocation
ld a, [wd038 + 2]
ld a, [wSeerCaughtLevel]
ld c, a
ld a, [hl]
sub c

View File

@ -247,8 +247,8 @@ Function833:: ; 833
; 83b
Function83b:: ; 83b
ld hl, wcf56
ld de, wcf51
ld hl, wPlayerLinkAction
ld de, wOtherPlayerLinkMode
ld c, $2
ld a, $1
ld [hFFCC], a
@ -274,7 +274,7 @@ Function83b:: ; 83b
Function862:: ; 862
call LoadTileMapToTempTileMap
callab Function4000
callab PlaceWaitingText
call Function87d
jp Call_LoadTempTileMapToTileMap
; 871
@ -282,102 +282,106 @@ Function862:: ; 862
Function871:: ; 871
call LoadTileMapToTempTileMap
callab Function4000
callab PlaceWaitingText
jp Function87d
; 87d
; One "giant" leap for machinekind
Function87d:: ; 87d
ld a, $ff
ld [wcf52], a
.asm_882
call Function8c1
ld [wOtherPlayerLinkAction], a
.loop
call LinkCommunicationsSendReceive
call DelayFrame
call Function82b
jr z, .asm_89e
jr z, .check
push hl
ld hl, wcf5c
dec [hl]
jr nz, .asm_89d
jr nz, .skip
dec hl
dec [hl]
jr nz, .asm_89d
jr nz, .skip
pop hl
xor a
jp Function833
.asm_89d
.skip
pop hl
.asm_89e
ld a, [wcf52]
.check
ld a, [wOtherPlayerLinkAction]
inc a
jr z, .asm_882
ld b, $a
.asm_8a6
jr z, .loop
ld b, 10
.receive
call DelayFrame
call Function8c1
call LinkCommunicationsSendReceive
dec b
jr nz, .asm_8a6
ld b, $a
.asm_8b1
jr nz, .receive
ld b, 10
.acknowledge
call DelayFrame
call Function908
call LinkCommunicationsSignalDataReceived
dec b
jr nz, .asm_8b1
ld a, [wcf52]
ld [wcf51], a
jr nz, .acknowledge
ld a, [wOtherPlayerLinkAction]
ld [wOtherPlayerLinkMode], a
ret
; 8c1
Function8c1:: ; 8c1
LinkCommunicationsSendReceive:: ; 8c1
push bc
ld b, $60
ld b, SERIAL_TIMECAPSULE
ld a, [wLinkMode]
cp $1
jr z, .asm_8d7
ld b, $60
jr c, .asm_8d7
cp $2
ld b, $70
jr z, .asm_8d7
ld b, $80
cp LINK_TIMECAPSULE
jr z, .got_high_nybble
ld b, SERIAL_TIMECAPSULE
jr c, .got_high_nybble
cp LINK_TRADECENTER
ld b, SERIAL_TRADECENTER
jr z, .got_high_nybble
ld b, SERIAL_BATTLE
.asm_8d7
call Function8f3
ld a, [wcf56]
.got_high_nybble
call .Receive
ld a, [wPlayerLinkAction]
add b
ld [hSerialSend], a
ld a, [hLinkPlayerNumber]
cp $2
jr nz, .asm_8ee
jr nz, .player_1
ld a, $1
ld [rSC], a
ld a, $81
ld [rSC], a
.asm_8ee
call Function8f3
.player_1
call .Receive
pop bc
ret
; 8f3
Function8f3:: ; 8f3
.Receive ; 8f3
ld a, [hSerialReceive]
ld [wcf51], a
ld [wOtherPlayerLinkMode], a
and $f0
cp b
ret nz
xor a
ld [hSerialReceive], a
ld a, [wcf51]
ld a, [wOtherPlayerLinkMode]
and $f
ld [wcf52], a
ld [wOtherPlayerLinkAction], a
ret
; 908
Function908:: ; 908
LinkCommunicationsSignalDataReceived:: ; 908
; Let the other system know that the data has been received.
xor a
ld [hSerialSend], a
ld a, [hLinkPlayerNumber]

View File

@ -880,10 +880,10 @@ Text_TX_MOVE:: ; 1480
; [$03][addr]
ld a, [hli]
ld [wd0e4 + 2], a
ld [wMenuScrollPosition + 2], a
ld c, a
ld a, [hli]
ld [wd0e4 + 2 + 1], a
ld [wMenuScrollPosition + 2 + 1], a
ld b, a
ret
; 148b

View File

@ -4,7 +4,7 @@ _DoItemEffect:: ; e722
call GetItemName
call CopyName1
ld a, 1
ld [wd0ec], a
ld [wPlayerAction], a
ld a, [CurItem]
dec a
ld hl, ItemEffects
@ -1209,7 +1209,7 @@ SunStone: ; ee0f
ld [wd1e9], a
callba EvolvePokemon
ld a, [wd268]
ld a, [wMonTriedToEvolve]
and a
jr z, .NoEffect
@ -1220,7 +1220,7 @@ SunStone: ; ee0f
.DecidedNotToUse
xor a
ld [wd0ec], a
ld [wPlayerAction], a
ret
; ee3d
@ -1293,7 +1293,7 @@ UpdateStatsAfterItem: ; ee8c
RareCandy_StatBooster_ExitMenu: ; ee9f
xor a
ld [wd0ec], a
ld [wPlayerAction], a
jp ClearPalettes
; eea6
@ -1930,7 +1930,7 @@ StatusHealer_NoEffect: ; f299 (3:7299)
StatusHealer_ExitMenu: ; f29e (3:729e)
xor a
ld [wd0ec], a
ld [wPlayerAction], a
StatusHealer_ClearPalettes: ; f2a2 (3:72a2)
call ClearPalettes
ret
@ -2233,10 +2233,10 @@ Softboiled_MilkDrinkFunction: ; f3df (3:73df)
EscapeRope: ; f44f
xor a
ld [wd0ec], a
ld [wPlayerAction], a
callba EscapeRopeFunction
ld a, [wd0ec]
ld a, [wPlayerAction]
cp 1
call z, UseDisposableItem
ret
@ -2298,7 +2298,7 @@ PokeDoll: ; f48f
.asm_f4a6
xor a
ld [wd0ec], a
ld [wPlayerAction], a
ret
; f4ab
@ -2547,7 +2547,7 @@ Mysteryberry: ; f5bf
xor a
ld [CurMoveNum], a
ld a, $2
ld [wd235], a
ld [wMoveSelectionMenuType], a
callba MoveSelectionScreen
pop bc
@ -2701,7 +2701,7 @@ PPRestoreItem_NoEffect: ; f6dd
PPRestoreItem_Cancel: ; f6e0
call ClearPalettes
xor a
ld [wd0ec], a
ld [wPlayerAction], a
ret
; f6e8
@ -2802,7 +2802,7 @@ BasementKey: ; f74c
SacredAsh: ; f753
callba _SacredAsh
ld a, [wd0ec]
ld a, [wPlayerAction]
cp $1
ret nz
call UseDisposableItem
@ -2973,7 +2973,7 @@ WontHaveAnyEffect_NotUsedMessage: ; f7ca
; Item wasn't used.
ld a, $2
ld [wd0ec], a
ld [wPlayerAction], a
ret
; f7d6
@ -2988,7 +2988,7 @@ Ball_BoxIsFullMessage: ; f7dc
; Item wasn't used.
ld a, $2
ld [wd0ec], a
ld [wPlayerAction], a
ret
; f7e8
@ -3018,7 +3018,7 @@ CantGetOnYourBikeMessage: ; f801
CantUseItemMessage: ; f804
; Item couldn't be used.
xor a
ld [wd0ec], a
ld [wPlayerAction], a
jp PrintText
; f80b

View File

@ -4,7 +4,7 @@ INCLUDE "includes.asm"
SECTION "bank1", ROMX, BANK[$1]
Function4000:: ; 4000
PlaceWaitingText:: ; 4000
hlcoord 3, 10
ld b, 1
ld c, 11
@ -5710,11 +5710,11 @@ TossTMHM: ; d3d8
ld [hl], a
ld [wItemQuantityBuffer], a
jr nz, .yup
ld a, [wd0e2]
ld a, [wTMHMPocketScrollPosition]
and a
jr z, .yup
dec a
ld [wd0e2], a
ld [wTMHMPocketScrollPosition], a
.yup
scf
@ -9901,7 +9901,7 @@ endr
; 244c3
Function244c3: ; 0x244c3
UpdateItemDescription: ; 0x244c3
ld a, [MenuSelection]
ld [CurSpecies], a
hlcoord 0, 12
@ -10216,7 +10216,7 @@ MenuJoyAction: ; 24609
ld hl, wcfa6
bit 7, [hl]
jp z, xor_a
ld hl, wd0e4
ld hl, wMenuScrollPosition
ld a, [hl]
and a
jr z, .xor_dec_up
@ -10231,7 +10231,7 @@ MenuJoyAction: ; 24609
ld hl, wcfa6
bit 7, [hl]
jp z, xor_a
ld hl, wd0e4
ld hl, wMenuScrollPosition
ld a, [wMenuData2Items]
add [hl]
ld b, a
@ -10246,7 +10246,7 @@ MenuJoyAction: ; 24609
; 246fc
Function246fc: ; 246fc
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
ld c, a
ld a, [MenuSelection2]
add c
@ -10276,10 +10276,10 @@ ClearObjectStructsa: ; 2471a
ld a, [wcf95]
call GetFarByte
ld [wd144], a
; if ([wd144] + 1) < [wMenuData2Items] + [wd0e4]: [wd0e4] = max(([wd144] + 1) - [wMenuData2Items], 0)
; if ([wd144] + 1) < [wMenuData2Items] + [wMenuScrollPosition]: [wMenuScrollPosition] = max(([wd144] + 1) - [wMenuData2Items], 0)
ld a, [wMenuData2Items]
ld c, a
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
add c
ld c, a
ld a, [wd144]
@ -10295,10 +10295,10 @@ ClearObjectStructsa: ; 2471a
xor a
.store
ld [wd0e4], a
ld [wMenuScrollPosition], a
.skip
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
ld c, a
ld a, [wMenuCursorBuffer]
add c
@ -10311,7 +10311,7 @@ ClearObjectStructsa: ; 2471a
.asm_2475a
xor a
ld [wd0e4], a
ld [wMenuScrollPosition], a
ld a, $1
ld [wMenuCursorBuffer], a
@ -10413,7 +10413,7 @@ Function247f0: ; 247f0
ld a, [wMenuData2Flags]
bit 4, a
jr z, .asm_2480d
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
and a
jr z, .asm_2480d
ld a, [wMenuBorderTopCoord]
@ -10431,7 +10431,7 @@ Function247f0: ; 247f0
ld b, a
ld c, $0
.asm_2481a
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
add c
ld [wcf77], a
ld a, c
@ -10508,7 +10508,7 @@ Function2488b: ; 2488b
and a
jr z, .asm_248b7
ld b, a
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
cp b
jr nc, .asm_248b7
ld c, a
@ -10558,7 +10558,7 @@ Function248d5: ; 248d5
push de
push hl
ld e, a
ld a, [wd0e4]
ld a, [wMenuScrollPosition]
add e
ld e, a
ld d, $0
@ -13540,7 +13540,7 @@ Function2c974: ; 2c974 (b:4974)
ld a, [MenuSelection2]
dec a
ld b, a
ld a, [wd0e2]
ld a, [wTMHMPocketScrollPosition]
add b
ld b, a
ld a, [wd265]
@ -13584,7 +13584,7 @@ Function2c9b1: ; 2c9b1 (b:49b1)
ld a, b
bit 7, a
jr nz, .skip
ld hl, wd0e2
ld hl, wTMHMPocketScrollPosition
ld a, [hl]
and a
jp z, Function2c915
@ -13605,7 +13605,7 @@ Function2c9b1: ; 2c9b1 (b:49b1)
jr z, .loop
dec b
jr nz, .loop
ld hl, wd0e2
ld hl, wTMHMPocketScrollPosition
inc [hl]
call Function2c9e2
jp Function2c946
@ -13737,7 +13737,7 @@ String_2caae: ; 2caae
Function2cab5: ; 2cab5 (b:4ab5)
ld hl, TMsHMs
ld a, [wd0e2]
ld a, [wTMHMPocketScrollPosition]
ld b, a
inc b
ld c, 0
@ -13820,11 +13820,11 @@ Function2cb0c: ; 2cb0c (b:4b0c)
dec a
ld [hl], a
ret nz
ld a, [wd0e2]
ld a, [wTMHMPocketScrollPosition]
and a
ret z
dec a
ld [wd0e2], a
ld [wTMHMPocketScrollPosition], a
ret
Function2cb2a: ; 2cb2a (b:4b2a)
@ -14186,7 +14186,7 @@ rept 3
endr
ld [hl], a
ld [wd0e4], a
ld [wMenuScrollPosition], a
ld [CriticalHit], a
ld [BattleMonSpecies], a
ld [wBattleParticipantsNotFainted], a

View File

@ -91,7 +91,7 @@ LinkReceptionistScript_Trade:
writetext Text_PleaseWait
special Special_CheckLinkTimeout
iffalse .LinkTimedOut
copybytetovar wcf51
copybytetovar wOtherPlayerLinkMode
iffalse .LinkedToFirstGen
special Special_CheckBothSelectedSameRoom
iffalse .IncompatibleRooms
@ -193,7 +193,7 @@ LinkReceptionistScript_Battle:
writetext Text_PleaseWait
special Special_CheckLinkTimeout
iffalse .LinkTimedOut
copybytetovar wcf51
copybytetovar wOtherPlayerLinkMode
iffalse .LinkedToFirstGen
special Special_CheckBothSelectedSameRoom
iffalse .IncompatibleRooms
@ -320,7 +320,7 @@ LinkReceptionistScript_TimeCapsule:
writetext Text_PleaseWait
special Special_CheckLinkTimeout
iffalse .LinkTimedOut
copybytetovar wcf51
copybytetovar wOtherPlayerLinkMode
iffalse .OK
special Special_CheckBothSelectedSameRoom
writetext Text_IncompatibleRooms

Some files were not shown because too many files have changed in this diff Show More