About time I got to these functions
@ -123,18 +123,18 @@ Function3c000: ; 3c000
|
|||||||
|
|
||||||
WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
|
WildFled_EnemyFled_LinkBattleCanceled: ; 3c0e5
|
||||||
call Function30b4
|
call Function30b4
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
add $2
|
add $2
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
ld hl, BattleText_WildFled
|
ld hl, BattleText_WildFled
|
||||||
jr z, .asm_3c115
|
jr z, .asm_3c115
|
||||||
|
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
ld hl, BattleText_EnemyFled
|
ld hl, BattleText_EnemyFled
|
||||||
call Function3d2e0
|
call Function3d2e0
|
||||||
jr nc, .asm_3c115
|
jr nc, .asm_3c115
|
||||||
@ -584,10 +584,10 @@ Function3c3f5: ; 3c3f5
|
|||||||
ld a, [wdc79]
|
ld a, [wdc79]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3c40e
|
jr nz, .asm_3c40e
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
add $2
|
add $2
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -2245,9 +2245,9 @@ Function3ce01: ; 3ce01
|
|||||||
call z, Function3d0ea
|
call z, Function3d0ea
|
||||||
call EmptyBattleTextBox
|
call EmptyBattleTextBox
|
||||||
call Function309d
|
call Function309d
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
call Function3ceaa
|
call Function3ceaa
|
||||||
jr z, .asm_3ce72
|
jr z, .asm_3ce72
|
||||||
ld hl, EnemyMonBaseStats
|
ld hl, EnemyMonBaseStats
|
||||||
@ -2633,7 +2633,7 @@ Function3d0be: ; 3d0be
|
|||||||
push bc
|
push bc
|
||||||
ld b, h
|
ld b, h
|
||||||
ld c, l
|
ld c, l
|
||||||
callba Function106008
|
callba MobileFn_106008
|
||||||
pop bc
|
pop bc
|
||||||
pop hl
|
pop hl
|
||||||
.asm_3d0ce
|
.asm_3d0ce
|
||||||
@ -2831,10 +2831,10 @@ Function3d1aa: ; 3d1aa
|
|||||||
ld a, [CurBattleMon]
|
ld a, [CurBattleMon]
|
||||||
ld [CurPartyMon], a
|
ld [CurPartyMon], a
|
||||||
callab ChangeHappiness
|
callab ChangeHappiness
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and %11000000
|
and %11000000
|
||||||
add $1
|
add $1
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
ld a, [wc6f7]
|
ld a, [wc6f7]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
@ -3136,10 +3136,10 @@ LostBattle: ; 3d38e
|
|||||||
call CheckEnemyTrainerDefeated
|
call CheckEnemyTrainerDefeated
|
||||||
jr nz, .asm_3d40a
|
jr nz, .asm_3d40a
|
||||||
ld hl, TiedAgainstText
|
ld hl, TiedAgainstText
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
add 2
|
add 2
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
jr .text
|
jr .text
|
||||||
|
|
||||||
.asm_3d40a
|
.asm_3d40a
|
||||||
@ -4009,10 +4009,10 @@ Function3d8b3: ; 3d8b3
|
|||||||
dec a
|
dec a
|
||||||
.asm_3d9cf
|
.asm_3d9cf
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
add b
|
add b
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
call StopDangerSound
|
call StopDangerSound
|
||||||
push de
|
push de
|
||||||
ld de, SFX_RUN
|
ld de, SFX_RUN
|
||||||
@ -5251,7 +5251,7 @@ Function3e234: ; 3e234
|
|||||||
and a
|
and a
|
||||||
jr nz, .asm_3e279
|
jr nz, .asm_3e279
|
||||||
callab CheckItemPocket
|
callab CheckItemPocket
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
cp $3
|
cp $3
|
||||||
jr z, .asm_3e24a
|
jr z, .asm_3e24a
|
||||||
call WhiteBGMap
|
call WhiteBGMap
|
||||||
@ -5282,9 +5282,9 @@ Function3e234: ; 3e234
|
|||||||
.asm_3e279
|
.asm_3e279
|
||||||
xor a
|
xor a
|
||||||
ld [wc64e], a
|
ld [wc64e], a
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
call ResetTextRelatedRAM
|
call ResetTextRelatedRAM
|
||||||
call Function32f9
|
call Function32f9
|
||||||
scf
|
scf
|
||||||
@ -8403,9 +8403,13 @@ Function3f4b4: ; 3f4b4
|
|||||||
|
|
||||||
|
|
||||||
StartBattle: ; 3f4c1
|
StartBattle: ; 3f4c1
|
||||||
|
; This check prevents you from entering a battle without any Pokemon.
|
||||||
|
; Those using walk-through-walls to bypass getting a Pokemon experience
|
||||||
|
; the effects of this check.
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
|
|
||||||
ld a, [TimeOfDayPal]
|
ld a, [TimeOfDayPal]
|
||||||
push af
|
push af
|
||||||
call Function3f4dd
|
call Function3f4dd
|
||||||
@ -8425,17 +8429,17 @@ Function3f4d9: ; 3f4d9
|
|||||||
|
|
||||||
|
|
||||||
Function3f4dd: ; 3f4dd
|
Function3f4dd: ; 3f4dd
|
||||||
callba Function106050
|
callba MobileFn_106050 ; mobile
|
||||||
call Function3f54e
|
call LoadTrainerOrWildMonPic
|
||||||
xor a
|
xor a
|
||||||
ld [TempBattleMonSpecies], a
|
ld [TempBattleMonSpecies], a
|
||||||
ld [wd0d2], a
|
ld [wd0d2], a
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [$ffde], a
|
||||||
callba PlayBattleMusic
|
callba PlayBattleMusic
|
||||||
callba Function2ee18
|
callba ShowLinkBattleParticipants
|
||||||
callba Function2ee2f
|
callba FindFirstAliveMon
|
||||||
call Function2ed3
|
call DisableSpriteUpdates
|
||||||
callba ClearBattleRAM
|
callba ClearBattleRAM
|
||||||
call Function3f55e
|
call Function3f55e
|
||||||
call Function3f568
|
call Function3f568
|
||||||
@ -8465,14 +8469,14 @@ Function3f4dd: ; 3f4dd
|
|||||||
ret
|
ret
|
||||||
; 3f54e
|
; 3f54e
|
||||||
|
|
||||||
Function3f54e: ; 3f54e
|
LoadTrainerOrWildMonPic: ; 3f54e
|
||||||
ld a, [OtherTrainerClass]
|
ld a, [OtherTrainerClass]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_3f55a
|
jr nz, .Trainer
|
||||||
ld a, [TempWildMonSpecies]
|
ld a, [TempWildMonSpecies]
|
||||||
ld [CurPartySpecies], a
|
ld [CurPartySpecies], a
|
||||||
|
|
||||||
.asm_3f55a
|
.Trainer
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
ret
|
ret
|
||||||
; 3f55e
|
; 3f55e
|
||||||
@ -8480,8 +8484,8 @@ Function3f54e: ; 3f54e
|
|||||||
Function3f55e: ; 3f55e
|
Function3f55e: ; 3f55e
|
||||||
ld a, [OtherTrainerClass]
|
ld a, [OtherTrainerClass]
|
||||||
and a
|
and a
|
||||||
jp nz, Function3f594
|
jp nz, Function3f594 ; trainer
|
||||||
jp Function3f607
|
jp Function3f607 ; wild
|
||||||
; 3f568
|
; 3f568
|
||||||
|
|
||||||
Function3f568: ; 3f568
|
Function3f568: ; 3f568
|
||||||
@ -8510,7 +8514,7 @@ Function3f568: ; 3f568
|
|||||||
|
|
||||||
Function3f594: ; 3f594
|
Function3f594: ; 3f594
|
||||||
ld [TrainerClass], a
|
ld [TrainerClass], a
|
||||||
callba Function10606a
|
callba MobileFn_10606a
|
||||||
xor a
|
xor a
|
||||||
ld [TempEnemyMonSpecies], a
|
ld [TempEnemyMonSpecies], a
|
||||||
callab Function3957b
|
callab Function3957b
|
||||||
@ -8566,7 +8570,7 @@ Function3f594: ; 3f594
|
|||||||
Function3f607: ; 3f607
|
Function3f607: ; 3f607
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wBattleMode], a
|
ld [wBattleMode], a
|
||||||
callba Function10605d
|
callba MobileFn_10605d
|
||||||
call LoadEnemyMon
|
call LoadEnemyMon
|
||||||
ld hl, EnemyMonMoves
|
ld hl, EnemyMonMoves
|
||||||
ld de, wc735
|
ld de, wc735
|
||||||
@ -8660,15 +8664,15 @@ Function3f69e: ; 3f69e
|
|||||||
Function3f6a5: ; 3f6a5
|
Function3f6a5: ; 3f6a5
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3f6b7
|
jr z, .not_linked
|
||||||
call Function3f759
|
call Function3f759
|
||||||
ld c, 150
|
ld c, 150
|
||||||
call DelayFrames
|
call DelayFrames
|
||||||
call Function3f77c
|
call Function3f77c
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_3f6b7
|
.not_linked
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $f
|
and $f
|
||||||
ret nz
|
ret nz
|
||||||
call Function3f71d
|
call Function3f71d
|
||||||
@ -8692,11 +8696,11 @@ Function3f6d0: ; 3f6d0
|
|||||||
ld [wd267], a
|
ld [wd267], a
|
||||||
ld [wd232], a
|
ld [wd232], a
|
||||||
ld [wd0d8], a
|
ld [wd0d8], a
|
||||||
ld [wd0da], a
|
ld [wKeyItemsPocketPointerLocation], a
|
||||||
ld [wd0d9], a
|
ld [wItemsPocketPointerLocation], a
|
||||||
ld [wd0d2], a
|
ld [wd0d2], a
|
||||||
ld [CurMoveNum], a
|
ld [CurMoveNum], a
|
||||||
ld [wd0db], a
|
ld [wBallsPocketPointerLocation], a
|
||||||
ld [wd0d6], a
|
ld [wd0d6], a
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
ld [wd0e0], a
|
ld [wd0e0], a
|
||||||
@ -8750,7 +8754,7 @@ endr
|
|||||||
; 3f759
|
; 3f759
|
||||||
|
|
||||||
Function3f759: ; 3f759
|
Function3f759: ; 3f759
|
||||||
callba Function1060df
|
callba MobileFn_1060df
|
||||||
callba Function106187
|
callba Function106187
|
||||||
ld a, [CurOTMon]
|
ld a, [CurOTMon]
|
||||||
ld hl, OTPartyMon1Status
|
ld hl, OTPartyMon1Status
|
||||||
@ -8758,7 +8762,7 @@ Function3f759: ; 3f759
|
|||||||
ld a, [EnemyMonStatus]
|
ld a, [EnemyMonStatus]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call ClearTileMap
|
call ClearTileMap
|
||||||
callba Function2c1b2
|
callba _ShowLinkBattleParticipants
|
||||||
ret
|
ret
|
||||||
; 3f77c
|
; 3f77c
|
||||||
|
|
||||||
@ -8773,22 +8777,22 @@ Function3f77c: ; 3f77c
|
|||||||
callba Function2b930
|
callba Function2b930
|
||||||
|
|
||||||
.asm_3f797
|
.asm_3f797
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $f
|
and $f
|
||||||
cp $1
|
cp $1
|
||||||
jr c, .asm_3f7ad
|
jr c, .asm_3f7ad
|
||||||
jr z, .asm_3f7b8
|
jr z, .asm_3f7b8
|
||||||
callba Function106107
|
callba MobileFn_106107
|
||||||
ld de, .Draw
|
ld de, .Draw
|
||||||
jr .asm_3f7c3
|
jr .asm_3f7c3
|
||||||
|
|
||||||
.asm_3f7ad
|
.asm_3f7ad
|
||||||
callba Function1060fb
|
callba MobileFn_1060fb
|
||||||
ld de, .Win
|
ld de, .Win
|
||||||
jr .asm_3f7c3
|
jr .asm_3f7c3
|
||||||
|
|
||||||
.asm_3f7b8
|
.asm_3f7b8
|
||||||
callba Function106101
|
callba MobileFn_106101
|
||||||
ld de, .Lose
|
ld de, .Lose
|
||||||
jr .asm_3f7c3
|
jr .asm_3f7c3
|
||||||
|
|
||||||
@ -9006,7 +9010,7 @@ Function3f998: ; 3f998
|
|||||||
ld a, [BattleType]
|
ld a, [BattleType]
|
||||||
cp BATTLETYPE_ROAMING
|
cp BATTLETYPE_ROAMING
|
||||||
jr nz, .asm_3f9c4
|
jr nz, .asm_3f9c4
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $f
|
and $f
|
||||||
jr z, .asm_3f9af
|
jr z, .asm_3f9af
|
||||||
call GetRoamMonHP
|
call GetRoamMonHP
|
||||||
@ -9170,7 +9174,7 @@ endr
|
|||||||
; 3faa0
|
; 3faa0
|
||||||
|
|
||||||
Function3faa0: ; 3faa0
|
Function3faa0: ; 3faa0
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $f
|
and $f
|
||||||
cp $1
|
cp $1
|
||||||
ld bc, $000d
|
ld bc, $000d
|
||||||
@ -9405,7 +9409,7 @@ GetBattleBackpic: ; 3fbff
|
|||||||
jr z, .Decompress
|
jr z, .Decompress
|
||||||
|
|
||||||
; What gender are we?
|
; What gender are we?
|
||||||
ld a, [wd45b]
|
ld a, [wPlayerSpriteSetupFlags]
|
||||||
bit 2, a
|
bit 2, a
|
||||||
jr nz, .Chris
|
jr nz, .Chris
|
||||||
ld a, [PlayerGender]
|
ld a, [PlayerGender]
|
||||||
@ -9542,7 +9546,7 @@ BattleStartMessage: ; 3fc8b
|
|||||||
cp BATTLETYPE_FISH
|
cp BATTLETYPE_FISH
|
||||||
jr nz, .asm_3fcfd
|
jr nz, .asm_3fcfd
|
||||||
|
|
||||||
callba Function106086
|
callba MobileFn_106086
|
||||||
|
|
||||||
ld hl, HookedPokemonAttackedText
|
ld hl, HookedPokemonAttackedText
|
||||||
jr .asm_3fd0e
|
jr .asm_3fd0e
|
||||||
|
@ -7188,10 +7188,10 @@ BattleCommanda0: ; 36778
|
|||||||
|
|
||||||
|
|
||||||
Function36804: ; 36804
|
Function36804: ; 36804
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $c0
|
and $c0
|
||||||
or $2
|
or $2
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
ret
|
ret
|
||||||
; 3680f
|
; 3680f
|
||||||
|
|
||||||
@ -8519,7 +8519,7 @@ BattleCommand35: ; 36f9d
|
|||||||
|
|
||||||
BattleCommand36: ; 36fe1
|
BattleCommand36: ; 36fe1
|
||||||
call AnimateCurrentMove
|
call AnimateCurrentMove
|
||||||
callba Function1060e5
|
callba MobileFn_1060e5
|
||||||
jp PrintNothingHappened
|
jp PrintNothingHappened
|
||||||
; 36fed
|
; 36fed
|
||||||
|
|
||||||
@ -9152,7 +9152,7 @@ CheckSubstituteOpp: ; 37378
|
|||||||
|
|
||||||
|
|
||||||
BattleCommand1a: ; 37380
|
BattleCommand1a: ; 37380
|
||||||
callba Function10610d
|
callba MobileFn_10610d
|
||||||
ld a, $4
|
ld a, $4
|
||||||
ld [wcfca], a
|
ld [wcfca], a
|
||||||
ld c, $3
|
ld c, $3
|
||||||
|
215
battle/magikarp_length.asm
Normal file
@ -0,0 +1,215 @@
|
|||||||
|
CalcMagikarpLength: ; fbbfc
|
||||||
|
; Return Magikarp's length (in mm) at MagikarpLength (big endian).
|
||||||
|
;
|
||||||
|
; input:
|
||||||
|
; de: EnemyMonDVs
|
||||||
|
; bc: PlayerID
|
||||||
|
|
||||||
|
; This function is poorly commented.
|
||||||
|
|
||||||
|
; In short, it generates a value between 190 and 1786 using
|
||||||
|
; a Magikarp's DVs and its trainer ID. This value is further
|
||||||
|
; filtered in LoadEnemyMon to make longer Magikarp even rarer.
|
||||||
|
|
||||||
|
; The value is generated from a lookup table.
|
||||||
|
; The index is determined by the dv xored with the player's trainer id.
|
||||||
|
|
||||||
|
; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
|
||||||
|
|
||||||
|
; if bc < 10: [MagikarpLength] = c + 190
|
||||||
|
; if bc >= $ff00: [MagikarpLength] = c + 1370
|
||||||
|
; else: [MagikarpLength] = z * 100 + (bc - x) / y
|
||||||
|
|
||||||
|
; X, Y, and Z depend on the value of b as follows:
|
||||||
|
|
||||||
|
; if b = 0: x = 310, y = 2, z = 3
|
||||||
|
; if b = 1: x = 710, y = 4, z = 4
|
||||||
|
; if b = 2-9: x = 2710, y = 20, z = 5
|
||||||
|
; if b = 10-29: x = 7710, y = 50, z = 6
|
||||||
|
; if b = 30-68: x = 17710, y = 100, z = 7
|
||||||
|
; if b = 69-126: x = 32710, y = 150, z = 8
|
||||||
|
; if b = 127-185: x = 47710, y = 150, z = 9
|
||||||
|
; if b = 186-224: x = 57710, y = 100, z = 10
|
||||||
|
; if b = 225-243: x = 62710, y = 50, z = 11
|
||||||
|
; if b = 244-251: x = 64710, y = 20, z = 12
|
||||||
|
; if b = 252-253: x = 65210, y = 5, z = 13
|
||||||
|
; if b = 254: x = 65410, y = 2, z = 14
|
||||||
|
|
||||||
|
|
||||||
|
; bc = rrc(dv[0]) ++ rrc(dv[1]) ^ rrc(id)
|
||||||
|
|
||||||
|
; id
|
||||||
|
ld h, b
|
||||||
|
ld l, c
|
||||||
|
ld a, [hli]
|
||||||
|
ld b, a
|
||||||
|
ld c, [hl]
|
||||||
|
rrc b
|
||||||
|
rrc c
|
||||||
|
|
||||||
|
; dv
|
||||||
|
ld a, [de]
|
||||||
|
inc de
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
xor b
|
||||||
|
ld b, a
|
||||||
|
|
||||||
|
ld a, [de]
|
||||||
|
rrca
|
||||||
|
rrca
|
||||||
|
xor c
|
||||||
|
ld c, a
|
||||||
|
|
||||||
|
; if bc < 10:
|
||||||
|
; de = bc + 190
|
||||||
|
; break
|
||||||
|
|
||||||
|
ld a, b
|
||||||
|
and a
|
||||||
|
jr nz, .no
|
||||||
|
ld a, c
|
||||||
|
cp 10
|
||||||
|
jr nc, .no
|
||||||
|
|
||||||
|
ld hl, 190
|
||||||
|
add hl, bc
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
jr .done
|
||||||
|
|
||||||
|
.no
|
||||||
|
|
||||||
|
ld hl, .Lengths
|
||||||
|
ld a, 2
|
||||||
|
ld [wd265], a
|
||||||
|
|
||||||
|
.read
|
||||||
|
ld a, [hli]
|
||||||
|
ld e, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld d, a
|
||||||
|
call .BCLessThanDE
|
||||||
|
jr nc, .next
|
||||||
|
|
||||||
|
; c = (bc - de) / [hl]
|
||||||
|
call .BCMinusDE
|
||||||
|
ld a, b
|
||||||
|
ld [hDividend + 0], a
|
||||||
|
ld a, c
|
||||||
|
ld [hDividend + 1], a
|
||||||
|
ld a, [hl]
|
||||||
|
ld [hDivisor], a
|
||||||
|
ld b, 2
|
||||||
|
call Divide
|
||||||
|
ld a, [hQuotient + 2]
|
||||||
|
ld c, a
|
||||||
|
|
||||||
|
; de = c + 100 * (2 + i)
|
||||||
|
xor a
|
||||||
|
ld [hMultiplicand + 0], a
|
||||||
|
ld [hMultiplicand + 1], a
|
||||||
|
ld a, 100
|
||||||
|
ld [hMultiplicand + 2], a
|
||||||
|
ld a, [wd265]
|
||||||
|
ld [hMultiplier], a
|
||||||
|
call Multiply
|
||||||
|
ld b, 0
|
||||||
|
ld a, [hProduct + 3]
|
||||||
|
add c
|
||||||
|
ld e, a
|
||||||
|
ld a, [hProduct + 2]
|
||||||
|
adc b
|
||||||
|
ld d, a
|
||||||
|
jr .done
|
||||||
|
|
||||||
|
.next
|
||||||
|
inc hl ; align to next triplet
|
||||||
|
ld a, [wd265]
|
||||||
|
inc a
|
||||||
|
ld [wd265], a
|
||||||
|
cp 16
|
||||||
|
jr c, .read
|
||||||
|
|
||||||
|
call .BCMinusDE
|
||||||
|
ld hl, 1600
|
||||||
|
add hl, bc
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
|
||||||
|
.done
|
||||||
|
; hl = de * 10
|
||||||
|
ld h, d
|
||||||
|
ld l, e
|
||||||
|
rept 2
|
||||||
|
add hl, hl
|
||||||
|
endr
|
||||||
|
add hl, de
|
||||||
|
add hl, hl
|
||||||
|
|
||||||
|
; hl = hl / 254
|
||||||
|
ld de, -254
|
||||||
|
ld a, -1
|
||||||
|
.div_254
|
||||||
|
inc a
|
||||||
|
add hl, de
|
||||||
|
jr c, .div_254
|
||||||
|
|
||||||
|
; d, e = hl / 12, hl % 12
|
||||||
|
ld d, 0
|
||||||
|
.mod_12
|
||||||
|
cp 12
|
||||||
|
jr c, .ok
|
||||||
|
sub 12
|
||||||
|
inc d
|
||||||
|
jr .mod_12
|
||||||
|
.ok
|
||||||
|
ld e, a
|
||||||
|
|
||||||
|
ld hl, MagikarpLength
|
||||||
|
ld [hl], d
|
||||||
|
inc hl
|
||||||
|
ld [hl], e
|
||||||
|
ret
|
||||||
|
; fbc9a
|
||||||
|
|
||||||
|
.BCLessThanDE: ; fbc9a
|
||||||
|
; Intention: Return bc < de.
|
||||||
|
; Reality: Return b < d.
|
||||||
|
ld a, b
|
||||||
|
cp d
|
||||||
|
ret c
|
||||||
|
ret nc ; whoops
|
||||||
|
ld a, c
|
||||||
|
cp e
|
||||||
|
ret
|
||||||
|
; fbca1
|
||||||
|
|
||||||
|
.BCMinusDE: ; fbca1
|
||||||
|
; bc -= de
|
||||||
|
ld a, c
|
||||||
|
sub e
|
||||||
|
ld c, a
|
||||||
|
ld a, b
|
||||||
|
sbc d
|
||||||
|
ld b, a
|
||||||
|
ret
|
||||||
|
; fbca8
|
||||||
|
|
||||||
|
.Lengths: ; fbca8
|
||||||
|
; ????, divisor
|
||||||
|
dwb 110, 1
|
||||||
|
dwb 310, 2
|
||||||
|
dwb 710, 4
|
||||||
|
dwb 2710, 20
|
||||||
|
dwb 7710, 50
|
||||||
|
dwb 17710, 100
|
||||||
|
dwb 32710, 150
|
||||||
|
dwb 47710, 150
|
||||||
|
dwb 57710, 100
|
||||||
|
dwb 62710, 50
|
||||||
|
dwb 64710, 20
|
||||||
|
dwb 65210, 5
|
||||||
|
dwb 65410, 2
|
||||||
|
dwb 65510, 1 ; not used
|
||||||
|
; fbcd2
|
@ -10,6 +10,7 @@ INCLUDE "constants/type_constants.asm"
|
|||||||
INCLUDE "constants/move_constants.asm"
|
INCLUDE "constants/move_constants.asm"
|
||||||
INCLUDE "constants/battle_constants.asm"
|
INCLUDE "constants/battle_constants.asm"
|
||||||
INCLUDE "constants/map_constants.asm"
|
INCLUDE "constants/map_constants.asm"
|
||||||
|
INCLUDE "constants/map_setup_constants.asm"
|
||||||
INCLUDE "constants/landmark_constants.asm"
|
INCLUDE "constants/landmark_constants.asm"
|
||||||
INCLUDE "constants/item_constants.asm"
|
INCLUDE "constants/item_constants.asm"
|
||||||
INCLUDE "constants/trainer_constants.asm"
|
INCLUDE "constants/trainer_constants.asm"
|
||||||
|
@ -352,7 +352,7 @@ const_value SET 70
|
|||||||
const HELD_TRADE_EVOLVE
|
const HELD_TRADE_EVOLVE
|
||||||
const HELD_AMULET_COIN
|
const HELD_AMULET_COIN
|
||||||
const HELD_BRIGHTPOWDER
|
const HELD_BRIGHTPOWDER
|
||||||
const HELD_4E
|
const HELD_78
|
||||||
const HELD_FOCUS_BAND
|
const HELD_FOCUS_BAND
|
||||||
|
|
||||||
const_def
|
const_def
|
||||||
@ -364,3 +364,12 @@ const_value SET 70
|
|||||||
const ITEMATTR_POCKET
|
const ITEMATTR_POCKET
|
||||||
const ITEMATTR_HELP
|
const ITEMATTR_HELP
|
||||||
NUM_ITEMATTRS EQU const_value
|
NUM_ITEMATTRS EQU const_value
|
||||||
|
|
||||||
|
ITEMMENU_NOUSE EQU 0
|
||||||
|
ITEMMENU_CURRENT EQU 4
|
||||||
|
ITEMMENU_PARTY EQU 5
|
||||||
|
ITEMMENU_FIELD EQU 6
|
||||||
|
|
||||||
|
ITEMCONTEXT_NOTINBATTLE EQU 0
|
||||||
|
ITEMCONTEXT_BATTLEANDFIELD EQU 5
|
||||||
|
ITEMCONTEXT_BATTLEONLY EQU 6
|
||||||
|
13
constants/map_setup_constants.asm
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
const_def
|
||||||
|
const MAPSETUP_00
|
||||||
|
const MAPSETUP_01
|
||||||
|
const MAPSETUP_02
|
||||||
|
const MAPSETUP_03
|
||||||
|
const MAPSETUP_04
|
||||||
|
const MAPSETUP_05
|
||||||
|
const MAPSETUP_06
|
||||||
|
const MAPSETUP_07
|
||||||
|
const MAPSETUP_08
|
||||||
|
const MAPSETUP_09
|
||||||
|
const MAPSETUP_10
|
||||||
|
const MAPSETUP_11
|
@ -156,3 +156,6 @@ const_value = 1
|
|||||||
const LINK_TRADECENTER
|
const LINK_TRADECENTER
|
||||||
const LINK_COLOSSEUM
|
const LINK_COLOSSEUM
|
||||||
const LINK_MOBILE
|
const LINK_MOBILE
|
||||||
|
|
||||||
|
HMENURETURN_SCRIPT EQU %10000000
|
||||||
|
HMENURETURN_ASM EQU %11111111
|
||||||
|
@ -40,13 +40,28 @@
|
|||||||
const PHONE_BUENA
|
const PHONE_BUENA
|
||||||
|
|
||||||
const_def
|
const_def
|
||||||
const ELMCALL_NONE
|
const SPECIALCALL_NONE
|
||||||
const ELMCALL_POKERUS
|
const SPECIALCALL_POKERUS
|
||||||
const ELMCALL_ROBBED
|
const SPECIALCALL_ROBBED
|
||||||
const ELMCALL_ASSISTANT
|
const SPECIALCALL_ASSISTANT
|
||||||
const ELMCALL_WEIRDBROADCAST
|
const SPECIALCALL_WEIRDBROADCAST
|
||||||
const ELMCALL_SSTICKET
|
const SPECIALCALL_SSTICKET
|
||||||
const ELMCALL_UNKNOWN
|
const SPECIALCALL_BIKESHOP
|
||||||
const MOMCALL_WORRIED
|
const SPECIALCALL_WORRIED
|
||||||
const ELMCALL_MASTERBALL
|
const SPECIALCALL_MASTERBALL
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const PHONE_CONTACT_TRAINER_CLASS
|
||||||
|
const PHONE_CONTACT_TRAINER_NUMBER
|
||||||
|
const PHONE_CONTACT_MAP_GROUP
|
||||||
|
const PHONE_CONTACT_MAP_NUMBER
|
||||||
|
const PHONE_CONTACT_SCRIPT1_TIME
|
||||||
|
const PHONE_CONTACT_SCRIPT1_BANK
|
||||||
|
const PHONE_CONTACT_SCRIPT1_ADDR_LO
|
||||||
|
const PHONE_CONTACT_SCRIPT1_ADDR_HI
|
||||||
|
const PHONE_CONTACT_SCRIPT2_TIME
|
||||||
|
const PHONE_CONTACT_SCRIPT2_BANK
|
||||||
|
const PHONE_CONTACT_SCRIPT2_ADDR_LO
|
||||||
|
const PHONE_CONTACT_SCRIPT2_ADDR_HI
|
||||||
|
PHONE_TABLE_WIDTH EQU const_value
|
||||||
|
CONTACT_LIST_SIZE EQU 10
|
||||||
|
@ -5,7 +5,7 @@ LAST_TALKED EQU -2
|
|||||||
const_def
|
const_def
|
||||||
const VAR_STRINGBUFFER2
|
const VAR_STRINGBUFFER2
|
||||||
const VAR_PARTYCOUNT
|
const VAR_PARTYCOUNT
|
||||||
const VAR_02
|
const VAR_BATTLERESULT
|
||||||
const VAR_BATTLETYPE
|
const VAR_BATTLETYPE
|
||||||
const VAR_TIMEOFDAY
|
const VAR_TIMEOFDAY
|
||||||
const VAR_DEXCAUGHT
|
const VAR_DEXCAUGHT
|
||||||
@ -23,11 +23,15 @@ LAST_TALKED EQU -2
|
|||||||
const VAR_CONTESTMINUTES
|
const VAR_CONTESTMINUTES
|
||||||
const VAR_XCOORD
|
const VAR_XCOORD
|
||||||
const VAR_YCOORD
|
const VAR_YCOORD
|
||||||
const VAR_POKERUS
|
const VAR_SPECIALPHONECALL
|
||||||
const VAR_15
|
const VAR_15
|
||||||
const VAR_16
|
const VAR_KURT_APRICORNS
|
||||||
const VAR_CALLERID
|
const VAR_CALLERID
|
||||||
const VAR_BLUECARDBALANCE
|
const VAR_BLUECARDBALANCE
|
||||||
const VAR_19
|
const VAR_BUENASPASSWORD
|
||||||
const VAR_KENJI_BREAK
|
const VAR_KENJI_BREAK
|
||||||
NUM_VARS EQU const_value
|
NUM_VARS EQU const_value
|
||||||
|
|
||||||
|
RETVAR_STRBUF2 EQU (0 << 6)
|
||||||
|
RETVAR_ADDR_DE EQU (1 << 6)
|
||||||
|
RETVAR_EXECUTE EQU (2 << 6)
|
||||||
|
@ -614,3 +614,33 @@
|
|||||||
const EUSINE
|
const EUSINE
|
||||||
|
|
||||||
NUM_TRAINER_CLASSES EQU __enum__
|
NUM_TRAINER_CLASSES EQU __enum__
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const NO_AI
|
||||||
|
const_value = 0
|
||||||
|
shift_const AI_BASIC
|
||||||
|
shift_const AI_SETUP
|
||||||
|
shift_const AI_TYPES
|
||||||
|
shift_const AI_OFFENSIVE
|
||||||
|
shift_const AI_SMART
|
||||||
|
shift_const AI_OPPORTUNIST
|
||||||
|
shift_const AI_AGGRESSIVE
|
||||||
|
shift_const AI_CAUTIOUS
|
||||||
|
shift_const AI_STATUS
|
||||||
|
shift_const AI_RISKY
|
||||||
|
shift_const AI_10
|
||||||
|
shift_const AI_11
|
||||||
|
shift_const AI_12
|
||||||
|
shift_const AI_13
|
||||||
|
shift_const AI_14
|
||||||
|
shift_const AI_15
|
||||||
|
|
||||||
|
const_def
|
||||||
|
const TRNATTR_ITEM1
|
||||||
|
const TRNATTR_ITEM2
|
||||||
|
const TRNATTR_BASEMONEY
|
||||||
|
const TRNATTR_AI1
|
||||||
|
const TRNATTR_AI2
|
||||||
|
const TRNATTR_AI3
|
||||||
|
const TRNATTR_AI4
|
||||||
|
NUM_TRAINER_ATTRIBUTES EQU const_value
|
||||||
|
@ -785,16 +785,16 @@ Function973a: ; 973a
|
|||||||
Function974b: ; 974b
|
Function974b: ; 974b
|
||||||
and a
|
and a
|
||||||
jp nz, Function97f9
|
jp nz, Function97f9
|
||||||
ld a, [wd45b]
|
ld a, [wPlayerSpriteSetupFlags]
|
||||||
bit 2, a
|
bit 2, a
|
||||||
jr nz, .asm_9760
|
jr nz, .male
|
||||||
ld a, [PlayerGender]
|
ld a, [PlayerGender]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_9760
|
jr z, .male
|
||||||
ld hl, KrisPalette
|
ld hl, KrisPalette
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_9760
|
.male
|
||||||
ld hl, PlayerPalette
|
ld hl, PlayerPalette
|
||||||
ret
|
ret
|
||||||
; 9764
|
; 9764
|
||||||
|
@ -1,198 +1,200 @@
|
|||||||
; All locations are in WRAM bank 1.
|
; All locations are in WRAM bank 1.
|
||||||
|
engine_flag: MACRO
|
||||||
|
dwb \1, 1 << \2
|
||||||
|
ENDM
|
||||||
; location, bit
|
; location, bit
|
||||||
|
|
||||||
; pokegear
|
; pokegear
|
||||||
dwb wPokegearFlags, %00000010 ; radio card ; $0
|
engine_flag wPokegearFlags, 1 ; radio card ; $0
|
||||||
dwb wPokegearFlags, %00000001 ; map card
|
engine_flag wPokegearFlags, 0 ; map card
|
||||||
dwb wPokegearFlags, %00000100 ; phone card
|
engine_flag wPokegearFlags, 2 ; phone card
|
||||||
dwb wPokegearFlags, %00001000 ; expn card
|
engine_flag wPokegearFlags, 3 ; expn card
|
||||||
dwb wPokegearFlags, %10000000 ; on/off
|
engine_flag wPokegearFlags, 7 ; on/off
|
||||||
|
|
||||||
; wDaycareMan, %10000000 ; daycare 1 on
|
; wDaycareMan, 7 ; daycare 1 on
|
||||||
dwb wDaycareMan, %01000000 ; monster 1 and 2 are compatible
|
engine_flag wDaycareMan, 6 ; monster 1 and 2 are compatible
|
||||||
; wDaycareMan, %00100000 ; egg is ready
|
; wDaycareMan, 5 ; egg is ready
|
||||||
dwb wDaycareMan, %00000001 ; monster 1 in daycare
|
engine_flag wDaycareMan, 0 ; monster 1 in daycare
|
||||||
|
|
||||||
; wDaycareLady, %10000000 = daycare 2 on
|
; wDaycareLady, 7 = daycare 2 on
|
||||||
dwb wDaycareLady, %00000001 ; monster 2 in daycare
|
engine_flag wDaycareLady, 0 ; monster 2 in daycare
|
||||||
|
|
||||||
dwb wMomSavingMoney, %00000001 ; mom saving money ; $8
|
engine_flag wMomSavingMoney, 0 ; mom saving money ; $8
|
||||||
dwb wMomSavingMoney, %10000000 ; dst
|
engine_flag wMomSavingMoney, 7 ; dst
|
||||||
|
|
||||||
dwb wdc39, %00000001
|
engine_flag wdc39, 0
|
||||||
|
|
||||||
dwb StatusFlags, %00000001 ; pokedex
|
engine_flag StatusFlags, 0 ; pokedex
|
||||||
dwb StatusFlags, %00000010 ; unown dex
|
engine_flag StatusFlags, 1 ; unown dex
|
||||||
dwb StatusFlags, %00001000 ; pokerus
|
engine_flag StatusFlags, 3 ; pokerus
|
||||||
dwb StatusFlags, %00010000 ; rocket signal on ch20
|
engine_flag StatusFlags, 4 ; rocket signal on ch20
|
||||||
dwb StatusFlags, %01000000 ; credits skip
|
engine_flag StatusFlags, 6 ; credits skip
|
||||||
dwb StatusFlags, %10000000 ; bug contest on ; $10
|
engine_flag StatusFlags, 7 ; bug contest on ; $10
|
||||||
dwb StatusFlags2, %00000100 ; bug contest timer
|
engine_flag StatusFlags2, 2 ; bug contest timer
|
||||||
dwb StatusFlags2, %00000010
|
engine_flag StatusFlags2, 1
|
||||||
dwb StatusFlags2, %00000001 ; rockets in radio tower
|
engine_flag StatusFlags2, 0 ; rockets in radio tower
|
||||||
dwb StatusFlags2, %00010000 ; bike shop call enabled (1024 bike steps reqd)
|
engine_flag StatusFlags2, 4 ; bike shop call enabled (1024 bike steps reqd)
|
||||||
dwb StatusFlags2, %00100000 ; give pokerus; berry -> berry juice when trading?
|
engine_flag StatusFlags2, 5 ; give pokerus
|
||||||
dwb StatusFlags2, %01000000
|
engine_flag StatusFlags2, 6 ; berry -> berry juice when trading?
|
||||||
dwb StatusFlags2, %10000000 ; rockets in mahogany
|
engine_flag StatusFlags2, 7 ; rockets in mahogany
|
||||||
|
|
||||||
dwb BikeFlags, %00000001 ; strength active ; $18
|
engine_flag BikeFlags, 0 ; strength active ; $18
|
||||||
dwb BikeFlags, %00000010 ; always on bike (cant surf)
|
engine_flag BikeFlags, 1 ; always on bike (cant surf)
|
||||||
dwb BikeFlags, %00000100 ; downhill (cycling road)
|
engine_flag BikeFlags, 2 ; downhill (cycling road)
|
||||||
|
|
||||||
dwb JohtoBadges, %00000001 ; zephyrbadge
|
engine_flag JohtoBadges, 0 ; zephyrbadge
|
||||||
dwb JohtoBadges, %00000010 ; hivebadge
|
engine_flag JohtoBadges, 1 ; hivebadge
|
||||||
dwb JohtoBadges, %00000100 ; plainbadge
|
engine_flag JohtoBadges, 2 ; plainbadge
|
||||||
dwb JohtoBadges, %00001000 ; fogbadge
|
engine_flag JohtoBadges, 3 ; fogbadge
|
||||||
dwb JohtoBadges, %00010000 ; mineralbadge
|
engine_flag JohtoBadges, 4 ; mineralbadge
|
||||||
dwb JohtoBadges, %00100000 ; stormbadge ; $20
|
engine_flag JohtoBadges, 5 ; stormbadge ; $20
|
||||||
dwb JohtoBadges, %01000000 ; glacierbadge
|
engine_flag JohtoBadges, 6 ; glacierbadge
|
||||||
dwb JohtoBadges, %10000000 ; risingbadge
|
engine_flag JohtoBadges, 7 ; risingbadge
|
||||||
|
|
||||||
dwb KantoBadges, %00000001 ; boulderbadge
|
engine_flag KantoBadges, 0 ; boulderbadge
|
||||||
dwb KantoBadges, %00000010 ; cascadebadge
|
engine_flag KantoBadges, 1 ; cascadebadge
|
||||||
dwb KantoBadges, %00000100 ; thunderbadge
|
engine_flag KantoBadges, 2 ; thunderbadge
|
||||||
dwb KantoBadges, %00001000 ; rainbowbadge
|
engine_flag KantoBadges, 3 ; rainbowbadge
|
||||||
dwb KantoBadges, %00010000 ; soulbadge
|
engine_flag KantoBadges, 4 ; soulbadge
|
||||||
dwb KantoBadges, %00100000 ; marshbadge ; $28
|
engine_flag KantoBadges, 5 ; marshbadge ; $28
|
||||||
dwb KantoBadges, %01000000 ; volcanobadge
|
engine_flag KantoBadges, 6 ; volcanobadge
|
||||||
dwb KantoBadges, %10000000 ; earthbadge
|
engine_flag KantoBadges, 7 ; earthbadge
|
||||||
|
|
||||||
; unown sets
|
; unown sets
|
||||||
dwb UnlockedUnowns, %00000001 ; 1
|
engine_flag UnlockedUnowns, 0 ; 1
|
||||||
dwb UnlockedUnowns, %00000010 ; 2
|
engine_flag UnlockedUnowns, 1 ; 2
|
||||||
dwb UnlockedUnowns, %00000100 ; 3
|
engine_flag UnlockedUnowns, 2 ; 3
|
||||||
dwb UnlockedUnowns, %00001000 ; 4
|
engine_flag UnlockedUnowns, 3 ; 4
|
||||||
dwb UnlockedUnowns, %00010000 ; 5
|
engine_flag UnlockedUnowns, 4 ; 5
|
||||||
dwb UnlockedUnowns, %00100000 ; 6 ; $30
|
engine_flag UnlockedUnowns, 5 ; 6 ; $30
|
||||||
dwb UnlockedUnowns, %01000000 ; 7
|
engine_flag UnlockedUnowns, 6 ; 7
|
||||||
dwb UnlockedUnowns, %10000000 ; 8
|
engine_flag UnlockedUnowns, 7 ; 8
|
||||||
|
|
||||||
; fly
|
; fly
|
||||||
dwb VisitedSpawns, %00000001 ; your house
|
engine_flag VisitedSpawns, 0 ; your house
|
||||||
dwb VisitedSpawns, %00000010 ; viridian pokecenter
|
engine_flag VisitedSpawns, 1 ; viridian pokecenter
|
||||||
dwb VisitedSpawns, %00000100 ; pallet
|
engine_flag VisitedSpawns, 2 ; pallet
|
||||||
dwb VisitedSpawns, %00001000 ; viridian
|
engine_flag VisitedSpawns, 3 ; viridian
|
||||||
dwb VisitedSpawns, %00010000 ; pewter
|
engine_flag VisitedSpawns, 4 ; pewter
|
||||||
dwb VisitedSpawns, %00100000 ; cerulean ; $38
|
engine_flag VisitedSpawns, 5 ; cerulean ; $38
|
||||||
dwb VisitedSpawns, %01000000 ; rock tunnel
|
engine_flag VisitedSpawns, 6 ; rock tunnel
|
||||||
dwb VisitedSpawns, %10000000 ; vermilion
|
engine_flag VisitedSpawns, 7 ; vermilion
|
||||||
dwb VisitedSpawns + 1, %00000001 ; lavender
|
engine_flag VisitedSpawns + 1, 0 ; lavender
|
||||||
dwb VisitedSpawns + 1, %00000010 ; saffron
|
engine_flag VisitedSpawns + 1, 1 ; saffron
|
||||||
dwb VisitedSpawns + 1, %00000100 ; celadon
|
engine_flag VisitedSpawns + 1, 2 ; celadon
|
||||||
dwb VisitedSpawns + 1, %00001000 ; fuchsia
|
engine_flag VisitedSpawns + 1, 3 ; fuchsia
|
||||||
dwb VisitedSpawns + 1, %00010000 ; cinnabar
|
engine_flag VisitedSpawns + 1, 4 ; cinnabar
|
||||||
dwb VisitedSpawns + 1, %00100000 ; indigo plateau ; $40
|
engine_flag VisitedSpawns + 1, 5 ; indigo plateau ; $40
|
||||||
dwb VisitedSpawns + 1, %01000000 ; new bark
|
engine_flag VisitedSpawns + 1, 6 ; new bark
|
||||||
dwb VisitedSpawns + 1, %10000000 ; cherrygrove
|
engine_flag VisitedSpawns + 1, 7 ; cherrygrove
|
||||||
dwb VisitedSpawns + 2, %00000001 ; violet
|
engine_flag VisitedSpawns + 2, 0 ; violet
|
||||||
dwb VisitedSpawns + 2, %00000100 ; azalea
|
engine_flag VisitedSpawns + 2, 2 ; azalea
|
||||||
dwb VisitedSpawns + 2, %00001000 ; cianwood
|
engine_flag VisitedSpawns + 2, 3 ; cianwood
|
||||||
dwb VisitedSpawns + 2, %00010000 ; goldenrod
|
engine_flag VisitedSpawns + 2, 4 ; goldenrod
|
||||||
dwb VisitedSpawns + 2, %00100000 ; olivine
|
engine_flag VisitedSpawns + 2, 5 ; olivine
|
||||||
dwb VisitedSpawns + 2, %01000000 ; ecruteak ; $48
|
engine_flag VisitedSpawns + 2, 6 ; ecruteak ; $48
|
||||||
dwb VisitedSpawns + 2, %10000000 ; mahogany
|
engine_flag VisitedSpawns + 2, 7 ; mahogany
|
||||||
dwb VisitedSpawns + 3, %00000001 ; lake of rage
|
engine_flag VisitedSpawns + 3, 0 ; lake of rage
|
||||||
dwb VisitedSpawns + 3, %00000010 ; blackthorn
|
engine_flag VisitedSpawns + 3, 1 ; blackthorn
|
||||||
dwb VisitedSpawns + 3, %00000100 ; silver cave
|
engine_flag VisitedSpawns + 3, 2 ; silver cave
|
||||||
dwb VisitedSpawns + 3, %00010000 ; unused
|
engine_flag VisitedSpawns + 3, 4 ; unused
|
||||||
|
|
||||||
dwb wLuckyNumberShowFlag, %00000001 ; lucky number show
|
engine_flag wLuckyNumberShowFlag, 0 ; lucky number show
|
||||||
dwb StatusFlags2, %00001000
|
engine_flag StatusFlags2, 3 ; ????
|
||||||
|
|
||||||
dwb DailyFlags, %00000001 ; kurt making balls ; $50
|
engine_flag DailyFlags, 0 ; kurt making balls ; $50
|
||||||
dwb DailyFlags, %00000010
|
engine_flag DailyFlags, 1 ; ????
|
||||||
dwb DailyFlags, %00000100 ; special wilddata?
|
engine_flag DailyFlags, 2 ; special wilddata?
|
||||||
dwb DailyFlags, %00001000 ; time capsule (24h wait)
|
engine_flag DailyFlags, 3 ; time capsule (24h wait)
|
||||||
dwb DailyFlags, %00010000 ; all fruit trees
|
engine_flag DailyFlags, 4 ; all fruit trees
|
||||||
dwb DailyFlags, %00100000 ; shuckle given
|
engine_flag DailyFlags, 5 ; shuckle given
|
||||||
dwb DailyFlags, %01000000 ; goldenrod underground merchant closed
|
engine_flag DailyFlags, 6 ; goldenrod underground merchant closed
|
||||||
dwb DailyFlags, %10000000 ; fought in trainer hall today
|
engine_flag DailyFlags, 7 ; fought in trainer hall today
|
||||||
|
|
||||||
dwb WeeklyFlags, %00000001 ; mt moon square clefairy ; $58
|
engine_flag WeeklyFlags, 0 ; mt moon square clefairy ; $58
|
||||||
dwb WeeklyFlags, %00000010 ; union cave lapras
|
engine_flag WeeklyFlags, 1 ; union cave lapras
|
||||||
dwb WeeklyFlags, %00000100 ; goldenrod underground haircut used
|
engine_flag WeeklyFlags, 2 ; goldenrod underground haircut used
|
||||||
dwb WeeklyFlags, %00001000 ; goldenrod mall happiness event floor05 person07
|
engine_flag WeeklyFlags, 3 ; goldenrod mall happiness event floor05 person07
|
||||||
dwb WeeklyFlags, %00010000 ; tea in blues house
|
engine_flag WeeklyFlags, 4 ; tea in blues house
|
||||||
dwb WeeklyFlags, %00100000 ; indigo plateau rival fight
|
engine_flag WeeklyFlags, 5 ; indigo plateau rival fight
|
||||||
dwb WeeklyFlags, %01000000 ; move tutor
|
engine_flag WeeklyFlags, 6 ; move tutor
|
||||||
dwb WeeklyFlags, %10000000 ; buenas password
|
engine_flag WeeklyFlags, 7 ; buenas password
|
||||||
|
|
||||||
dwb SwarmFlags, %00000001 ; $60
|
engine_flag SwarmFlags, 0 ; $60
|
||||||
dwb SwarmFlags, %00000010 ; goldenrod dept store sale is on
|
engine_flag SwarmFlags, 1 ; goldenrod dept store sale is on
|
||||||
|
|
||||||
dwb GameTimerPause, %10000000 ; $62
|
engine_flag GameTimerPause, 7 ; $62
|
||||||
|
|
||||||
dwb PlayerGender, %00000001 ; player is female
|
engine_flag PlayerGender, 0 ; player is female
|
||||||
|
|
||||||
dwb wdbf3, %00000100 ; have gs ball after kurt examined it
|
engine_flag wCelebiEvent, 2 ; have gs ball after kurt examined it
|
||||||
|
|
||||||
; rematches
|
; rematches
|
||||||
dwb wDailyRematchFlags, %00000001 ; jack
|
engine_flag wDailyRematchFlags, 0 ; jack
|
||||||
dwb wDailyRematchFlags, %00000010 ; huey
|
engine_flag wDailyRematchFlags, 1 ; huey
|
||||||
dwb wDailyRematchFlags, %00000100 ; gaven
|
engine_flag wDailyRematchFlags, 2 ; gaven
|
||||||
dwb wDailyRematchFlags, %00001000 ; beth ; $68
|
engine_flag wDailyRematchFlags, 3 ; beth ; $68
|
||||||
dwb wDailyRematchFlags, %00010000 ; jose
|
engine_flag wDailyRematchFlags, 4 ; jose
|
||||||
dwb wDailyRematchFlags, %00100000 ; reena
|
engine_flag wDailyRematchFlags, 5 ; reena
|
||||||
dwb wDailyRematchFlags, %01000000 ; joey
|
engine_flag wDailyRematchFlags, 6 ; joey
|
||||||
dwb wDailyRematchFlags, %10000000 ; wade
|
engine_flag wDailyRematchFlags, 7 ; wade
|
||||||
dwb wDailyRematchFlags + 1, %00000001 ; ralph
|
engine_flag wDailyRematchFlags + 1, 0 ; ralph
|
||||||
dwb wDailyRematchFlags + 1, %00000010 ; liz
|
engine_flag wDailyRematchFlags + 1, 1 ; liz
|
||||||
dwb wDailyRematchFlags + 1, %00000100 ; anthony
|
engine_flag wDailyRematchFlags + 1, 2 ; anthony
|
||||||
dwb wDailyRematchFlags + 1, %00001000 ; todd ; $70
|
engine_flag wDailyRematchFlags + 1, 3 ; todd ; $70
|
||||||
dwb wDailyRematchFlags + 1, %00010000 ; gina
|
engine_flag wDailyRematchFlags + 1, 4 ; gina
|
||||||
dwb wDailyRematchFlags + 1, %00100000 ; arnie
|
engine_flag wDailyRematchFlags + 1, 5 ; arnie
|
||||||
dwb wDailyRematchFlags + 1, %01000000 ; alan
|
engine_flag wDailyRematchFlags + 1, 6 ; alan
|
||||||
dwb wDailyRematchFlags + 1, %10000000 ; dana
|
engine_flag wDailyRematchFlags + 1, 7 ; dana
|
||||||
dwb wDailyRematchFlags + 2, %00000001 ; chad
|
engine_flag wDailyRematchFlags + 2, 0 ; chad
|
||||||
dwb wDailyRematchFlags + 2, %00000010 ; tully
|
engine_flag wDailyRematchFlags + 2, 1 ; tully
|
||||||
dwb wDailyRematchFlags + 2, %00000100 ; brent
|
engine_flag wDailyRematchFlags + 2, 2 ; brent
|
||||||
dwb wDailyRematchFlags + 2, %00001000 ; tiffany ; $78
|
engine_flag wDailyRematchFlags + 2, 3 ; tiffany ; $78
|
||||||
dwb wDailyRematchFlags + 2, %00010000 ; vance
|
engine_flag wDailyRematchFlags + 2, 4 ; vance
|
||||||
dwb wDailyRematchFlags + 2, %00100000 ; wilton
|
engine_flag wDailyRematchFlags + 2, 5 ; wilton
|
||||||
dwb wDailyRematchFlags + 2, %01000000 ; parry
|
engine_flag wDailyRematchFlags + 2, 6 ; parry
|
||||||
dwb wDailyRematchFlags + 2, %10000000 ; erin
|
engine_flag wDailyRematchFlags + 2, 7 ; erin
|
||||||
|
|
||||||
dwb wDailyPhoneItemFlags, %00000001 ; beverly has nugget
|
engine_flag wDailyPhoneItemFlags, 0 ; beverly has nugget
|
||||||
dwb wDailyPhoneItemFlags, %00000010 ; jose has star piece
|
engine_flag wDailyPhoneItemFlags, 1 ; jose has star piece
|
||||||
dwb wDailyPhoneItemFlags, %00000100 ; wade has item (see bittable1 $032b-e)
|
engine_flag wDailyPhoneItemFlags, 2 ; wade has item (see bittable1 $032b-e)
|
||||||
dwb wDailyPhoneItemFlags, %00001000 ; gina has leaf stone ; $80
|
engine_flag wDailyPhoneItemFlags, 3 ; gina has leaf stone ; $80
|
||||||
dwb wDailyPhoneItemFlags, %00010000 ; alan has fire stone
|
engine_flag wDailyPhoneItemFlags, 4 ; alan has fire stone
|
||||||
dwb wDailyPhoneItemFlags, %00100000 ; liz has thunderstone
|
engine_flag wDailyPhoneItemFlags, 5 ; liz has thunderstone
|
||||||
dwb wDailyPhoneItemFlags, %01000000 ; derek has nugget
|
engine_flag wDailyPhoneItemFlags, 6 ; derek has nugget
|
||||||
dwb wDailyPhoneItemFlags, %10000000 ; tully has water stone
|
engine_flag wDailyPhoneItemFlags, 7 ; tully has water stone
|
||||||
|
|
||||||
dwb wDailyPhoneItemFlags + 1, %00000001 ; tiffany has pink bow
|
engine_flag wDailyPhoneItemFlags + 1, 0 ; tiffany has pink bow
|
||||||
dwb wDailyPhoneItemFlags + 1, %00000010 ; wilton has item (see bittable1 $032f-31)
|
engine_flag wDailyPhoneItemFlags + 1, 1 ; wilton has item (see bittable1 $032f-31)
|
||||||
|
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %00000001
|
engine_flag wDailyPhoneTimeOfDayFlags, 0
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %00000010 ; $88
|
engine_flag wDailyPhoneTimeOfDayFlags, 1 ; $88
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %00000100
|
engine_flag wDailyPhoneTimeOfDayFlags, 2
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %00001000
|
engine_flag wDailyPhoneTimeOfDayFlags, 3
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %00010000
|
engine_flag wDailyPhoneTimeOfDayFlags, 4
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %00100000
|
engine_flag wDailyPhoneTimeOfDayFlags, 5
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %01000000
|
engine_flag wDailyPhoneTimeOfDayFlags, 6
|
||||||
dwb wDailyPhoneTimeOfDayFlags, %10000000
|
engine_flag wDailyPhoneTimeOfDayFlags, 7
|
||||||
|
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %00000001
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 0
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %00000010 ; $90
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 1 ; $90
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %00000100
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 2
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %00001000
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 3
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %00010000
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 4
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %00100000
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 5
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %01000000
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 6
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 1, %10000000
|
engine_flag wDailyPhoneTimeOfDayFlags + 1, 7
|
||||||
|
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %00000001
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 0
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %00000010 ; $98
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 1 ; $98
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %00000100
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 2
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %00001000
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 3
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %00010000
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 4
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %00100000
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 5
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %01000000
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 6
|
||||||
dwb wDailyPhoneTimeOfDayFlags + 2, %10000000
|
engine_flag wDailyPhoneTimeOfDayFlags + 2, 7
|
||||||
|
|
||||||
dwb wd45b, %00000100 ; female player has been transformed into male
|
engine_flag wPlayerSpriteSetupFlags, 2 ; female player has been transformed into male
|
||||||
|
|
||||||
dwb SwarmFlags, %00000100 ; dunsparce swarm ; $a0
|
engine_flag SwarmFlags, 2 ; dunsparce swarm ; $a0
|
||||||
dwb SwarmFlags, %00001000 ; yanma swarm
|
engine_flag SwarmFlags, 3 ; yanma swarm
|
||||||
|
@ -123,7 +123,7 @@ StartMap: ; 96724
|
|||||||
ld hl, MapStatus
|
ld hl, MapStatus
|
||||||
ld bc, $3e ; 62
|
ld bc, $3e ; 62
|
||||||
call ByteFill
|
call ByteFill
|
||||||
callba Function113e5
|
callba InitCallReceiveDelay
|
||||||
call ClearJoypad
|
call ClearJoypad
|
||||||
; fallthrough
|
; fallthrough
|
||||||
; 9673e
|
; 9673e
|
||||||
@ -138,19 +138,19 @@ EnterMap: ; 9673e
|
|||||||
call ClearAllScriptFlags3
|
call ClearAllScriptFlags3
|
||||||
|
|
||||||
ld a, [hMapEntryMethod]
|
ld a, [hMapEntryMethod]
|
||||||
cp $f7
|
cp ($f << 4) + MAPSETUP_07
|
||||||
jr nz, .dontset
|
jr nz, .dontset
|
||||||
call SetAll_ScriptFlags3
|
call SetAll_ScriptFlags3
|
||||||
.dontset
|
.dontset
|
||||||
|
|
||||||
ld a, [hMapEntryMethod]
|
ld a, [hMapEntryMethod]
|
||||||
cp $f3
|
cp ($f << 4) + MAPSETUP_03
|
||||||
jr nz, .dontresetpoison
|
jr nz, .dontresetpoison
|
||||||
xor a
|
xor a
|
||||||
ld [PoisonStepCount], a
|
ld [PoisonStepCount], a
|
||||||
.dontresetpoison
|
.dontresetpoison
|
||||||
|
|
||||||
xor a
|
xor a ; ($0 << 4) + MAPSETUP_00
|
||||||
ld [hMapEntryMethod], a
|
ld [hMapEntryMethod], a
|
||||||
ld a, 2 ; HandleMap
|
ld a, 2 ; HandleMap
|
||||||
ld [MapStatus], a
|
ld [MapStatus], a
|
||||||
@ -285,12 +285,12 @@ Function96812: ; 96812
|
|||||||
PlayerEvents: ; 9681f
|
PlayerEvents: ; 9681f
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
|
; If there's already a player event, don't interrupt it.
|
||||||
ld a, [ScriptRunning]
|
ld a, [ScriptRunning]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
|
||||||
call Function968e4
|
call Dummy_CheckScriptFlags3Bit5 ; This is a waste of time
|
||||||
|
|
||||||
call CheckTrainerBattle3
|
call CheckTrainerBattle3
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
@ -298,13 +298,13 @@ PlayerEvents: ; 9681f
|
|||||||
call CheckTileEvent
|
call CheckTileEvent
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
|
|
||||||
call Function97c30
|
call RunMemScript
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
|
|
||||||
call Function968ec
|
call DoMapTrigger
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
|
|
||||||
call Function9693a
|
call CheckTimeEvents
|
||||||
jr c, .ok
|
jr c, .ok
|
||||||
|
|
||||||
call OWPlayerInput
|
call OWPlayerInput
|
||||||
@ -436,11 +436,7 @@ SetUpFiveStepWildEncounterCooldown: ; 968d1
|
|||||||
ret
|
ret
|
||||||
; 968d7
|
; 968d7
|
||||||
|
|
||||||
Function968d7: ; 968d7
|
SetMinTwoStepWildEncounterCooldown: mobile ; 968d7
|
||||||
ret
|
|
||||||
; 968d8
|
|
||||||
|
|
||||||
Function968d8: ; 968d8
|
|
||||||
ld a, [wWildEncounterCooldown]
|
ld a, [wWildEncounterCooldown]
|
||||||
cp 2
|
cp 2
|
||||||
ret nc
|
ret nc
|
||||||
@ -449,14 +445,14 @@ Function968d8: ; 968d8
|
|||||||
ret
|
ret
|
||||||
; 968e4
|
; 968e4
|
||||||
|
|
||||||
Function968e4: ; 968e4
|
Dummy_CheckScriptFlags3Bit5: ; 968e4
|
||||||
call CheckBit5_ScriptFlags3
|
call CheckBit5_ScriptFlags3
|
||||||
ret z
|
ret z
|
||||||
call Function2f3e
|
call ret_2f3e
|
||||||
ret
|
ret
|
||||||
; 968ec
|
; 968ec
|
||||||
|
|
||||||
Function968ec: ; 968ec
|
DoMapTrigger: ; 968ec
|
||||||
ld a, [wdc07]
|
ld a, [wdc07]
|
||||||
and a
|
and a
|
||||||
jr z, .nope
|
jr z, .nope
|
||||||
@ -468,7 +464,7 @@ Function968ec: ; 968ec
|
|||||||
|
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, wdc07 + 1
|
ld hl, wdc08
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
@ -505,23 +501,23 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 9693a
|
; 9693a
|
||||||
|
|
||||||
Function9693a: ; 9693a
|
CheckTimeEvents: ; 9693a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .nothing
|
jr nz, .nothing
|
||||||
|
|
||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
bit 2, [hl]
|
bit 2, [hl]
|
||||||
jr z, .asm_96951
|
jr z, .do_daily
|
||||||
|
|
||||||
callba Function114a4
|
callba CheckBugContestTimer
|
||||||
jr c, .elevator
|
jr c, .end_bug_contest
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_96951
|
.do_daily
|
||||||
callba Function11452
|
callba CheckDailyResetTimer
|
||||||
callba Function114e7
|
callba CheckPokerusTrick
|
||||||
callba CheckPhoneCall
|
callba CheckPhoneCall
|
||||||
ret c
|
ret c
|
||||||
|
|
||||||
@ -529,7 +525,7 @@ Function9693a: ; 9693a
|
|||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.elevator
|
.end_bug_contest
|
||||||
ld a, BANK(BugCatchingContestOverScript)
|
ld a, BANK(BugCatchingContestOverScript)
|
||||||
ld hl, BugCatchingContestOverScript
|
ld hl, BugCatchingContestOverScript
|
||||||
call CallScript
|
call CallScript
|
||||||
@ -537,7 +533,7 @@ Function9693a: ; 9693a
|
|||||||
ret
|
ret
|
||||||
; 96970
|
; 96970
|
||||||
|
|
||||||
Function96970: ; 96970
|
.unused ; 96970
|
||||||
ld a, 8
|
ld a, 8
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -856,7 +852,7 @@ PlayerMovement: ; 96af0
|
|||||||
; 96b10
|
; 96b10
|
||||||
|
|
||||||
.seven ; 96b10
|
.seven ; 96b10
|
||||||
call Function968d7 ; empty
|
call SetMinTwoStepWildEncounterCooldown ; mobile
|
||||||
xor a
|
xor a
|
||||||
ld c, a
|
ld c, a
|
||||||
ret
|
ret
|
||||||
@ -898,7 +894,7 @@ PlayerMovement: ; 96af0
|
|||||||
|
|
||||||
CheckMenuOW: ; 96b30
|
CheckMenuOW: ; 96b30
|
||||||
xor a
|
xor a
|
||||||
ld [$ffa0], a
|
ld [hMenuReturn], a
|
||||||
ld [$ffa1], a
|
ld [$ffa1], a
|
||||||
ld a, [hJoyPressed]
|
ld a, [hJoyPressed]
|
||||||
|
|
||||||
@ -940,9 +936,9 @@ SelectMenuScript: ; 96b5f
|
|||||||
|
|
||||||
StartMenuCallback:
|
StartMenuCallback:
|
||||||
SelectMenuCallback: ; 96b66
|
SelectMenuCallback: ; 96b66
|
||||||
copybytetovar $ffa0
|
copybytetovar hMenuReturn
|
||||||
if_equal %10000000, .Script
|
if_equal HMENURETURN_SCRIPT, .Script
|
||||||
if_equal -1, .Asm
|
if_equal HMENURETURN_ASM, .Asm
|
||||||
end
|
end
|
||||||
; 96b72
|
; 96b72
|
||||||
|
|
||||||
@ -957,75 +953,85 @@ SelectMenuCallback: ; 96b66
|
|||||||
|
|
||||||
|
|
||||||
CountStep: ; 96b79
|
CountStep: ; 96b79
|
||||||
|
; Don't count steps in link communication rooms.
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
and a
|
and a
|
||||||
jr nz, .done
|
jr nz, .done
|
||||||
|
|
||||||
callba Function90136
|
; If there is a special phone call, don't count the step.
|
||||||
jr c, .setminus1
|
callba CheckSpecialPhoneCall
|
||||||
|
jr c, .doscript
|
||||||
|
|
||||||
call Function96bd7
|
; If Repel wore off, don't count the step.
|
||||||
jr c, .setminus1
|
call DoRepelStep
|
||||||
|
jr c, .doscript
|
||||||
|
|
||||||
|
; Count the step for poison and total steps
|
||||||
ld hl, PoisonStepCount
|
ld hl, PoisonStepCount
|
||||||
inc [hl]
|
inc [hl]
|
||||||
ld hl, StepCount
|
ld hl, StepCount
|
||||||
inc [hl]
|
inc [hl]
|
||||||
jr nz, .asm_96b9c
|
; Every 256 steps, increase the happiness of all your Pokemon.
|
||||||
|
jr nz, .skip_happiness
|
||||||
|
|
||||||
callba StepHappiness
|
callba StepHappiness
|
||||||
|
|
||||||
.asm_96b9c
|
.skip_happiness
|
||||||
|
; Every 256 steps, offset from the happiness incrementor by 128 steps,
|
||||||
|
; decrease the hatch counter of all your eggs until you reach the first
|
||||||
|
; one that is ready to hatch.
|
||||||
ld a, [StepCount]
|
ld a, [StepCount]
|
||||||
cp $80
|
cp $80
|
||||||
jr nz, .asm_96bab
|
jr nz, .skip_egg
|
||||||
|
|
||||||
callba Function16f3e
|
callba DoEggStep
|
||||||
jr nz, .set8
|
jr nz, .hatch
|
||||||
|
|
||||||
.asm_96bab
|
.skip_egg
|
||||||
|
; Increase the EXP of (both) DayCare Pokemon by 1.
|
||||||
callba DaycareStep
|
callba DaycareStep
|
||||||
|
|
||||||
|
; Every four steps, deal damage to all Poisoned Pokemon
|
||||||
ld hl, PoisonStepCount
|
ld hl, PoisonStepCount
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp 4
|
cp 4
|
||||||
jr c, .poisoned
|
jr c, .skip_poison
|
||||||
ld [hl], 0
|
ld [hl], 0
|
||||||
|
|
||||||
callba Function505da
|
callba DoPoisonStep
|
||||||
jr c, .setminus1
|
jr c, .doscript
|
||||||
|
|
||||||
.poisoned
|
.skip_poison
|
||||||
callba Function97db3
|
callba DoBikeStep
|
||||||
|
|
||||||
.done
|
.done
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.setminus1
|
.doscript
|
||||||
ld a, -1
|
ld a, -1
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.set8
|
.hatch
|
||||||
ld a, 8
|
ld a, 8
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 96bd3
|
; 96bd3
|
||||||
|
|
||||||
|
|
||||||
Function96bd3: ; 96bd3
|
.unreferenced: ; 96bd3
|
||||||
ld a, 7
|
ld a, 7
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 96bd7
|
; 96bd7
|
||||||
|
|
||||||
Function96bd7: ; 96bd7
|
DoRepelStep: ; 96bd7
|
||||||
ld a, [wdca1]
|
ld a, [wRepelEffect]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
dec a
|
dec a
|
||||||
ld [wdca1], a
|
ld [wRepelEffect], a
|
||||||
ret nz
|
ret nz
|
||||||
ld a, BANK(RepelWoreOffScript)
|
ld a, BANK(RepelWoreOffScript)
|
||||||
ld hl, RepelWoreOffScript
|
ld hl, RepelWoreOffScript
|
||||||
@ -1038,7 +1044,7 @@ Function96beb: ; 96beb
|
|||||||
ld a, [ScriptRunning]
|
ld a, [ScriptRunning]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
cp -1
|
cp -1 ; run script
|
||||||
ret z
|
ret z
|
||||||
cp 10
|
cp 10
|
||||||
ret nc
|
ret nc
|
||||||
@ -1059,17 +1065,17 @@ endr
|
|||||||
; 96c0c
|
; 96c0c
|
||||||
|
|
||||||
ScriptPointers96c0c: ; 96c0c
|
ScriptPointers96c0c: ; 96c0c
|
||||||
dbw BANK(Invalid_0x96c2d), Invalid_0x96c2d
|
dba Invalid_0x96c2d
|
||||||
dbw BANK(SeenByTrainerScript), SeenByTrainerScript
|
dba SeenByTrainerScript
|
||||||
dbw BANK(TalkToTrainerScript), TalkToTrainerScript
|
dba TalkToTrainerScript
|
||||||
dbw BANK(FindItemInBallScript), FindItemInBallScript
|
dba FindItemInBallScript
|
||||||
dbw BANK(UnknownScript_0x96c4d), UnknownScript_0x96c4d
|
dba UnknownScript_0x96c4d
|
||||||
dbw BANK(WarpToNewMapScript), WarpToNewMapScript
|
dba WarpToNewMapScript
|
||||||
dbw BANK(FallIntoMapScript), FallIntoMapScript
|
dba FallIntoMapScript
|
||||||
dbw BANK(UnknownScript_0x124c8), UnknownScript_0x124c8
|
dba UnknownScript_0x124c8
|
||||||
dbw BANK(HatchEggScript), HatchEggScript
|
dba HatchEggScript
|
||||||
dbw BANK(UnknownScript_0x96c4f), UnknownScript_0x96c4f
|
dba UnknownScript_0x96c4f
|
||||||
dbw BANK(Invalid_0x96c2d), Invalid_0x96c2d
|
dba Invalid_0x96c2d
|
||||||
; 96c2d
|
; 96c2d
|
||||||
|
|
||||||
Invalid_0x96c2d: ; 96c2d
|
Invalid_0x96c2d: ; 96c2d
|
||||||
@ -1087,12 +1093,12 @@ HatchEggScript: ; 96c2f
|
|||||||
|
|
||||||
WarpToNewMapScript: ; 96c34
|
WarpToNewMapScript: ; 96c34
|
||||||
warpsound
|
warpsound
|
||||||
newloadmap $f5
|
newloadmap ($f << 4) + MAPSETUP_05
|
||||||
end
|
end
|
||||||
; 96c38
|
; 96c38
|
||||||
|
|
||||||
FallIntoMapScript: ; 96c38
|
FallIntoMapScript: ; 96c38
|
||||||
newloadmap $f6
|
newloadmap ($f << 4) + MAPSETUP_06
|
||||||
playsound SFX_KINESIS
|
playsound SFX_KINESIS
|
||||||
applymovement PLAYER, MovementData_0x96c48
|
applymovement PLAYER, MovementData_0x96c48
|
||||||
playsound SFX_STRENGTH
|
playsound SFX_STRENGTH
|
||||||
|
@ -8,33 +8,39 @@ WarpToSpawnPoint:: ; 97c28
|
|||||||
ret
|
ret
|
||||||
; 97c30
|
; 97c30
|
||||||
|
|
||||||
Function97c30:: ; 97c30
|
RunMemScript:: ; 97c30
|
||||||
ld a, [wd45c]
|
; If there is no script here, we don't need to be here.
|
||||||
|
ld a, [wMapReentryScriptQueueFlag]
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld hl, wd45c + 2
|
; Execute the script at (wMapReentryScriptBank):(wMapReentryScriptAddress).
|
||||||
|
ld hl, wMapReentryScriptAddress
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld h, [hl]
|
ld h, [hl]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wd45c + 1]
|
ld a, [wMapReentryScriptBank]
|
||||||
call CallScript
|
call CallScript
|
||||||
scf
|
scf
|
||||||
|
; Clear the buffer for the next script.
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld hl, wd45c
|
ld hl, wMapReentryScriptQueueFlag
|
||||||
ld bc, 8
|
ld bc, 8
|
||||||
call ByteFill
|
call ByteFill
|
||||||
pop af
|
pop af
|
||||||
ret
|
ret
|
||||||
; 97c4f
|
; 97c4f
|
||||||
|
|
||||||
Function97c4f:: ; 97c4f
|
LoadScriptBDE:: ; 97c4f
|
||||||
ld hl, wd45c
|
; If there's already a script here, don't overwrite.
|
||||||
|
ld hl, wMapReentryScriptQueueFlag
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
ret nz
|
ret nz
|
||||||
|
; Set the flag
|
||||||
ld [hl], 1
|
ld [hl], 1
|
||||||
inc hl
|
inc hl
|
||||||
|
; Load the script pointer b:de into (wMapReentryScriptBank):(wMapReentryScriptAddress)
|
||||||
ld [hl], b
|
ld [hl], b
|
||||||
inc hl
|
inc hl
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
@ -262,46 +268,60 @@ ContestMons: ; 97d87
|
|||||||
db -1, VENOMOTH, 30, 40
|
db -1, VENOMOTH, 30, 40
|
||||||
; 97db3
|
; 97db3
|
||||||
|
|
||||||
Function97db3:: ; 97db3
|
DoBikeStep:: ; 97db3
|
||||||
nop
|
nop
|
||||||
nop
|
nop
|
||||||
; fallthrough
|
; If the bike shop owner doesn't have our number, or
|
||||||
; 97db5
|
; if we've already gotten the call, we don't have to
|
||||||
|
; be here.
|
||||||
Function97db5: ; 97db5
|
|
||||||
ld hl, StatusFlags2
|
ld hl, StatusFlags2
|
||||||
bit 4, [hl]
|
bit 4, [hl]
|
||||||
jr z, .NoCall
|
jr z, .NoCall
|
||||||
|
|
||||||
|
; If we're not on the bike, we don't have to be here.
|
||||||
ld a, [PlayerState]
|
ld a, [PlayerState]
|
||||||
cp 1
|
cp PLAYER_BIKE
|
||||||
jr nz, .NoCall
|
jr nz, .NoCall
|
||||||
|
|
||||||
|
; If we're not in an area of phone service, we don't
|
||||||
|
; have to be here.
|
||||||
call GetMapHeaderPhoneServiceNybble
|
call GetMapHeaderPhoneServiceNybble
|
||||||
and a
|
and a
|
||||||
jr nz, .NoCall
|
jr nz, .NoCall
|
||||||
ld hl, wdca1 + 1
|
|
||||||
|
; Check the bike step count and check whether we've
|
||||||
|
; taken 65536 of them yet.
|
||||||
|
ld hl, wBikeStep
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld d, a
|
ld d, a
|
||||||
ld e, [hl]
|
ld e, [hl]
|
||||||
cp -1
|
cp 255
|
||||||
jr nz, .asm_97dd8
|
jr nz, .increment
|
||||||
ld a, e
|
ld a, e
|
||||||
cp -1
|
cp 255
|
||||||
jr z, .asm_97ddc
|
jr z, .dont_increment
|
||||||
|
|
||||||
.asm_97dd8
|
.increment
|
||||||
inc de
|
inc de
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
dec hl
|
dec hl
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
|
|
||||||
.asm_97ddc
|
.dont_increment
|
||||||
|
; If we've taken at least 1024 steps, have the bike
|
||||||
|
; shop owner try to call us.
|
||||||
ld a, d
|
ld a, d
|
||||||
cp $4
|
cp 1024 >> 8
|
||||||
jr c, .NoCall
|
jr c, .NoCall
|
||||||
|
|
||||||
|
; If a call has already been queued, don't overwrite
|
||||||
|
; that call.
|
||||||
ld a, [wSpecialPhoneCallID]
|
ld a, [wSpecialPhoneCallID]
|
||||||
and a
|
and a
|
||||||
jr nz, .NoCall
|
jr nz, .NoCall
|
||||||
ld a, 6
|
|
||||||
|
; Queue the call.
|
||||||
|
ld a, SPECIALCALL_BIKESHOP
|
||||||
ld [wSpecialPhoneCallID], a
|
ld [wSpecialPhoneCallID], a
|
||||||
xor a
|
xor a
|
||||||
ld [wSpecialPhoneCallID + 1], a
|
ld [wSpecialPhoneCallID + 1], a
|
||||||
@ -488,7 +508,7 @@ Function97eb7: ; 97eb7
|
|||||||
; 97eb8
|
; 97eb8
|
||||||
|
|
||||||
Function97eb8: ; 97eb8
|
Function97eb8: ; 97eb8
|
||||||
call Function2f3e
|
call ret_2f3e
|
||||||
ret
|
ret
|
||||||
; 97ebc
|
; 97ebc
|
||||||
|
|
||||||
|
@ -58,7 +58,7 @@ CheckFruitTree: ; 44055
|
|||||||
; 4405f
|
; 4405f
|
||||||
|
|
||||||
PickedFruitTree: ; 4405f
|
PickedFruitTree: ; 4405f
|
||||||
callba Function10609b ; empty function
|
callba MobileFn_10609b ; empty function
|
||||||
ld b, 1
|
ld b, 1
|
||||||
jp GetFruitTreeFlag
|
jp GetFruitTreeFlag
|
||||||
; 4406a
|
; 4406a
|
||||||
|
@ -2196,7 +2196,7 @@ Function4ecd: ; 4ecd
|
|||||||
add hl, bc
|
add hl, bc
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld b, a
|
ld b, a
|
||||||
callba Function807e
|
callba CopyDECoordsToMapObject
|
||||||
pop bc
|
pop bc
|
||||||
ld hl, OBJECT_FLAGS
|
ld hl, OBJECT_FLAGS
|
||||||
add hl, bc
|
add hl, bc
|
||||||
@ -3064,7 +3064,7 @@ Function579d: ; 579d
|
|||||||
; 57bc
|
; 57bc
|
||||||
|
|
||||||
Function57bc: ; 57bc
|
Function57bc: ; 57bc
|
||||||
ld hl, wd45b
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
jr nz, .ok
|
jr nz, .ok
|
||||||
ret
|
ret
|
||||||
@ -3076,10 +3076,10 @@ Function57bc: ; 57bc
|
|||||||
; 57ca
|
; 57ca
|
||||||
|
|
||||||
Function57ca: ; 57ca
|
Function57ca: ; 57ca
|
||||||
ld hl, wd45b
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
bit 5, [hl]
|
bit 5, [hl]
|
||||||
ret z
|
ret z
|
||||||
ld a, [wd45b]
|
ld a, [wPlayerSpriteSetupFlags]
|
||||||
and 3
|
and 3
|
||||||
rept 2
|
rept 2
|
||||||
add a
|
add a
|
||||||
|
@ -31,222 +31,171 @@ MapSetupScripts: ; 15377
|
|||||||
dw MapSetupScript12
|
dw MapSetupScript12
|
||||||
; 1538f
|
; 1538f
|
||||||
|
|
||||||
|
|
||||||
; Command descriptions from Condensation water's scripting compendium.
|
|
||||||
const_def
|
|
||||||
const map_lcd_on ; 00 = Turn LCD on
|
|
||||||
const map_lcd_off ; 01 = Turn LCD off
|
|
||||||
const map_sound_off ; 02 = Turn speakers off
|
|
||||||
const map_music ; 03 = Music check for current map/ special check for bug catcher contest
|
|
||||||
const map_start_music ; 04 = Start map music anew
|
|
||||||
const map_fade_music ; 05 = Music check for current map / special check for Bug Contest/ music with FadeOut (old) and FadeIn
|
|
||||||
const map_fade ; 06 = Fade out music + screen
|
|
||||||
const map_bike_music ; 07 = If HIRO is on bike = bike music, else play map music
|
|
||||||
const map_music_force ; 08 = Play map music
|
|
||||||
const map_max_volume ; 09 = Turn music to highest volume
|
|
||||||
const map_load_blocks ; 0A = Write map data to MapRAM
|
|
||||||
const map_connection_blocks ; 0B = Compute map’s connection pars and write into MapRAM
|
|
||||||
const map_save_screen ; 0C = Write current part of map into temporary memory
|
|
||||||
const map_buffer_screen ; 0D = Write current part of map into read-from memory
|
|
||||||
const map_load_graphics ; 0E = Write tileset header to ram/ load tileset/ load sprite tiles/ load special tiles
|
|
||||||
const map_load_tileset_header ; 0F = Write tileset header to ram
|
|
||||||
const map_time_of_day ; 10 = Compute time of day/ Update screen
|
|
||||||
const map_palettes ; 11 = Load map palettes
|
|
||||||
const map_wildmons ; 12 = Load probabilities for wild Pokémon battles
|
|
||||||
const map_sprites ; 13 = Delete sprite data and draw new sprites
|
|
||||||
const map_change_callback ; 14 = Check 2nd script header for 05 and 03 callbacks
|
|
||||||
const map_start_callback ; 15 = Check 2nd script header for 03 callbacks
|
|
||||||
const map_load_objects ; 16 = Analyze people data anew and check 2nd script header for 02 callbacks
|
|
||||||
const map_load_spawn ; 17 = Writes arrival data for arrival by flying/Blackout from table 05:5319 to ram
|
|
||||||
const map_load_connection ; 18 = Writes arrival data for entering a map by connection to ram
|
|
||||||
const map_load_warp ; 19 = Write warp data to ram when entering warp
|
|
||||||
const map_attributes ; 1A = Load complete map data (primary, secondary, event, script headers)
|
|
||||||
const map_attributes_2 ; 1B = Same as 1A, but some settings aren’t loaded new from the rom, such as hide function of the people events
|
|
||||||
const map_clear_bg_palettes ; 1C = Fill palette data with FFFF (=white)
|
|
||||||
const map_fade_out_palettes ; 1D = All BG pallet color are converted to 0|0 (Pal0, Col0), all sprite colors to x|0 (FadeOut)
|
|
||||||
const map_fade_in_palettes ; 1E = Palette FadeIn
|
|
||||||
const map_anchor_screen ; 1F = Compute position of upper left-most block visible on screen
|
|
||||||
const map_warp_face ; 20 = Position computation when HIRO leaves a warp
|
|
||||||
const map_face_down ; 21 = Set HIRO’s facing to “down”
|
|
||||||
const map_spawn_coord ; 22 = Prepare HIRO data for arrival by flight
|
|
||||||
const map_player_coord ; 23 = Compute HIRO x/y data anew
|
|
||||||
const map_prolong_sprites ; 24 = Prolong old sprites before removing them
|
|
||||||
const map_delay_sprites ; 25 = Delay rendering new sprites
|
|
||||||
const map_update_roam ; 26 = Compute chances to meet Raikou, Entei or Suicune
|
|
||||||
const map_keep_roam ; 27 = Recover chances to meet Raikou, Entei or Suicune
|
|
||||||
const map_fade_out_music ; 28 = Temporarily stop music playing
|
|
||||||
const map_animations_on ; 29 = Activate animations
|
|
||||||
const map_animations_off ; 2A = Deactivate animations
|
|
||||||
const map_keep_palettes ; 2B = Recover all palettes
|
|
||||||
const map_text_scroll_off ; 2C = Turn off text scroll (for town name overlays)
|
|
||||||
const map_stop_script ; 2D = Deactivate code prolonging
|
|
||||||
|
|
||||||
|
|
||||||
MapSetupScript4: ; 1538f
|
MapSetupScript4: ; 1538f
|
||||||
db map_prolong_sprites
|
map_prolong_sprites
|
||||||
|
|
||||||
MapSetupScript12: ; 15390
|
MapSetupScript12: ; 15390
|
||||||
db map_fade_out_palettes
|
map_fade_out_palettes
|
||||||
db map_keep_roam
|
map_keep_roam
|
||||||
|
|
||||||
MapSetupScript1: ; 15392
|
MapSetupScript1: ; 15392
|
||||||
db map_lcd_off
|
map_lcd_off
|
||||||
db map_sound_off
|
map_sound_off
|
||||||
db map_load_spawn
|
map_load_spawn
|
||||||
db map_attributes
|
map_attributes
|
||||||
db map_change_callback
|
map_change_callback
|
||||||
db map_spawn_coord
|
map_spawn_coord
|
||||||
db map_player_coord
|
map_player_coord
|
||||||
db map_anchor_screen
|
map_anchor_screen
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_buffer_screen
|
map_buffer_screen
|
||||||
db map_load_graphics
|
map_load_graphics
|
||||||
db map_time_of_day
|
map_time_of_day
|
||||||
db map_load_objects
|
map_load_objects
|
||||||
db map_lcd_on
|
map_lcd_on
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_face_down
|
map_face_down
|
||||||
db map_sprites
|
map_sprites
|
||||||
db map_bike_music
|
map_bike_music
|
||||||
db map_max_volume
|
map_max_volume
|
||||||
db map_fade_in_palettes
|
map_fade_in_palettes
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript11: ; 153a9
|
MapSetupScript11: ; 153a9
|
||||||
db map_load_spawn
|
map_load_spawn
|
||||||
db map_attributes
|
map_attributes
|
||||||
db map_change_callback
|
map_change_callback
|
||||||
db map_spawn_coord
|
map_spawn_coord
|
||||||
db map_player_coord
|
map_player_coord
|
||||||
db map_anchor_screen
|
map_anchor_screen
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_buffer_screen
|
map_buffer_screen
|
||||||
db map_lcd_off
|
map_lcd_off
|
||||||
db map_load_graphics
|
map_load_graphics
|
||||||
db map_time_of_day
|
map_time_of_day
|
||||||
db map_fade_out_music
|
map_fade_out_music
|
||||||
db map_lcd_on
|
map_lcd_on
|
||||||
db map_load_objects
|
map_load_objects
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_face_down
|
map_face_down
|
||||||
db map_sprites
|
map_sprites
|
||||||
db map_fade_music
|
map_fade_music
|
||||||
db map_fade_in_palettes
|
map_fade_in_palettes
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript7: ; 153bf
|
MapSetupScript7: ; 153bf
|
||||||
db map_animations_off
|
map_animations_off
|
||||||
db map_load_connection
|
map_load_connection
|
||||||
db map_attributes
|
map_attributes
|
||||||
db map_change_callback
|
map_change_callback
|
||||||
db map_player_coord
|
map_player_coord
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_load_tileset_header
|
map_load_tileset_header
|
||||||
db map_save_screen
|
map_save_screen
|
||||||
db map_load_objects
|
map_load_objects
|
||||||
db map_fade_music
|
map_fade_music
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_stop_script
|
map_stop_script
|
||||||
db map_keep_palettes
|
map_keep_palettes
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db map_update_roam
|
map_update_roam
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript6: ; 153d0
|
MapSetupScript6: ; 153d0
|
||||||
db map_prolong_sprites
|
map_prolong_sprites
|
||||||
|
|
||||||
MapSetupScript5: ; 153d1
|
MapSetupScript5: ; 153d1
|
||||||
db map_fade_out_palettes
|
map_fade_out_palettes
|
||||||
|
|
||||||
MapSetupScript9: ; 153d2
|
MapSetupScript9: ; 153d2
|
||||||
db map_load_warp
|
map_load_warp
|
||||||
db map_attributes
|
map_attributes
|
||||||
db map_warp_face
|
map_warp_face
|
||||||
db map_change_callback
|
map_change_callback
|
||||||
db map_player_coord
|
map_player_coord
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_buffer_screen
|
map_buffer_screen
|
||||||
db map_lcd_off
|
map_lcd_off
|
||||||
db map_load_graphics
|
map_load_graphics
|
||||||
db map_time_of_day
|
map_time_of_day
|
||||||
db map_fade_out_music
|
map_fade_out_music
|
||||||
db map_lcd_on
|
map_lcd_on
|
||||||
db map_load_objects
|
map_load_objects
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_sprites
|
map_sprites
|
||||||
db map_fade_music
|
map_fade_music
|
||||||
db map_fade_in_palettes
|
map_fade_in_palettes
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db map_update_roam
|
map_update_roam
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript3: ; 153e7
|
MapSetupScript3: ; 153e7
|
||||||
db map_fade
|
map_fade
|
||||||
db map_clear_bg_palettes
|
map_clear_bg_palettes
|
||||||
db map_lcd_off
|
map_lcd_off
|
||||||
db map_sound_off
|
map_sound_off
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_connection_blocks
|
map_connection_blocks
|
||||||
db map_load_graphics
|
map_load_graphics
|
||||||
db map_time_of_day
|
map_time_of_day
|
||||||
db map_lcd_on
|
map_lcd_on
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_sprites
|
map_sprites
|
||||||
db map_music_force
|
map_music_force
|
||||||
db map_fade_in_palettes
|
map_fade_in_palettes
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript8: ; 153f7
|
MapSetupScript8: ; 153f7
|
||||||
db map_fade
|
map_fade
|
||||||
db map_lcd_off
|
map_lcd_off
|
||||||
db map_sound_off
|
map_sound_off
|
||||||
db map_change_callback
|
map_change_callback
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_buffer_screen
|
map_buffer_screen
|
||||||
db map_load_graphics
|
map_load_graphics
|
||||||
db map_time_of_day
|
map_time_of_day
|
||||||
db map_lcd_on
|
map_lcd_on
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_sprites
|
map_sprites
|
||||||
db map_bike_music
|
map_bike_music
|
||||||
db map_fade_in_palettes
|
map_fade_in_palettes
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db map_text_scroll_off
|
map_text_scroll_off
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript2: ; 15408
|
MapSetupScript2: ; 15408
|
||||||
db map_lcd_off
|
map_lcd_off
|
||||||
db map_sound_off
|
map_sound_off
|
||||||
db map_attributes_2
|
map_attributes_2
|
||||||
db map_anchor_screen
|
map_anchor_screen
|
||||||
db map_start_callback
|
map_start_callback
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_connection_blocks
|
map_connection_blocks
|
||||||
db map_buffer_screen
|
map_buffer_screen
|
||||||
db map_load_graphics
|
map_load_graphics
|
||||||
db map_time_of_day
|
map_time_of_day
|
||||||
db map_lcd_on
|
map_lcd_on
|
||||||
db map_palettes
|
map_palettes
|
||||||
db map_sprites
|
map_sprites
|
||||||
db map_bike_music
|
map_bike_music
|
||||||
db map_fade_in_palettes
|
map_fade_in_palettes
|
||||||
db map_animations_on
|
map_animations_on
|
||||||
db map_wildmons
|
map_wildmons
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
MapSetupScript10: ; 1541a
|
MapSetupScript10: ; 1541a
|
||||||
db map_load_blocks
|
map_load_blocks
|
||||||
db map_connection_blocks
|
map_connection_blocks
|
||||||
db -1
|
map_end_setup_script
|
||||||
|
|
||||||
|
|
||||||
ReadMapSetupScript: ; 1541d
|
ReadMapSetupScript: ; 1541d
|
||||||
@ -374,13 +323,13 @@ Function154ea: ; 154ea
|
|||||||
; 154eb
|
; 154eb
|
||||||
|
|
||||||
DelayClearingOldSprites: ; 154eb
|
DelayClearingOldSprites: ; 154eb
|
||||||
ld hl, wd45b
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
; 154f1
|
; 154f1
|
||||||
|
|
||||||
DelayLoadingNewSprites: ; 154f1
|
DelayLoadingNewSprites: ; 154f1
|
||||||
ld hl, wd45b
|
ld hl, wPlayerSpriteSetupFlags
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
@ -1656,5 +1656,5 @@ UnknownScript_0xa0b04:
|
|||||||
BikeShopPhoneScript:
|
BikeShopPhoneScript:
|
||||||
farwritetext UnknownText_0x174000
|
farwritetext UnknownText_0x174000
|
||||||
clearflag ENGINE_BIKE_SHOP_CALL_ENABLED
|
clearflag ENGINE_BIKE_SHOP_CALL_ENABLED
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
end
|
end
|
||||||
|
394
engine/pack.asm
@ -54,24 +54,24 @@ Function10046: ; 10046 (4:4046)
|
|||||||
Function10056: ; 10056 (4:4056)
|
Function10056: ; 10056 (4:4056)
|
||||||
xor a
|
xor a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10067: ; 10067 (4:4067)
|
Function10067: ; 10067 (4:4067)
|
||||||
ld hl, MenuDataHeader_0x10a4f
|
ld hl, MenuDataHeader_0x10a4f
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0d9]
|
ld a, [wItemsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0df]
|
ld a, [wd0df]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0df], a
|
ld [wd0df], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0d9], a
|
ld [wItemsPocketPointerLocation], a
|
||||||
ld b, $7
|
ld b, $7
|
||||||
ld c, $3
|
ld c, $3
|
||||||
call Function108d4
|
call Function108d4
|
||||||
@ -82,24 +82,24 @@ Function10067: ; 10067 (4:4067)
|
|||||||
Function10094: ; 10094 (4:4094)
|
Function10094: ; 10094 (4:4094)
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function100a6: ; 100a6 (4:40a6)
|
Function100a6: ; 100a6 (4:40a6)
|
||||||
ld hl, MenuDataHeader_0x10a7f
|
ld hl, MenuDataHeader_0x10a7f
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0da]
|
ld a, [wKeyItemsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0e0]
|
ld a, [wd0e0]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0e0], a
|
ld [wd0e0], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0da], a
|
ld [wKeyItemsPocketPointerLocation], a
|
||||||
ld b, $3
|
ld b, $3
|
||||||
ld c, $7
|
ld c, $7
|
||||||
call Function108d4
|
call Function108d4
|
||||||
@ -110,11 +110,11 @@ Function100a6: ; 100a6 (4:40a6)
|
|||||||
Function100d3: ; 100d3 (4:40d3)
|
Function100d3: ; 100d3 (4:40d3)
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -125,7 +125,7 @@ Function100e8: ; 100e8 (4:40e8)
|
|||||||
call Function108d4
|
call Function108d4
|
||||||
ret c
|
ret c
|
||||||
callba _CheckTossableItem
|
callba _CheckTossableItem
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1010a
|
jr nz, .asm_1010a
|
||||||
ld hl, MenuDataHeader_0x1013b
|
ld hl, MenuDataHeader_0x1013b
|
||||||
@ -205,31 +205,31 @@ Function10159: ; 10159
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function10955
|
call Function10955
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10186: ; 10186 (4:4186)
|
Function10186: ; 10186 (4:4186)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10198: ; 10198 (4:4198)
|
Function10198: ; 10198 (4:4198)
|
||||||
ld hl, MenuDataHeader_0x10aaf
|
ld hl, MenuDataHeader_0x10aaf
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0db]
|
ld a, [wBallsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0e1]
|
ld a, [wd0e1]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0e1], a
|
ld [wd0e1], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0db], a
|
ld [wBallsPocketPointerLocation], a
|
||||||
ld b, $1
|
ld b, $1
|
||||||
ld c, $5
|
ld c, $5
|
||||||
call Function108d4
|
call Function108d4
|
||||||
@ -239,54 +239,62 @@ Function10198: ; 10198 (4:4198)
|
|||||||
|
|
||||||
Function101c5: ; 101c5 (4:41c5)
|
Function101c5: ; 101c5 (4:41c5)
|
||||||
callba _CheckTossableItem
|
callba _CheckTossableItem
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_101f9
|
jr nz, .tossable
|
||||||
callba CheckSelectableItem
|
callba CheckSelectableItem
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_101eb
|
jr nz, .selectable
|
||||||
callba CheckItemMenu
|
callba CheckItemMenu
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_10207
|
jr nz, .usable
|
||||||
jr .asm_10227
|
jr .unusable
|
||||||
.asm_101eb
|
|
||||||
|
.selectable
|
||||||
callba CheckItemMenu
|
callba CheckItemMenu
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_1020f
|
jr nz, .selectable_usable
|
||||||
jr .asm_1022f
|
jr .selectable_unusable
|
||||||
.asm_101f9
|
|
||||||
|
.tossable
|
||||||
callba CheckSelectableItem
|
callba CheckSelectableItem
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_10217
|
jr nz, .tossable_selectable
|
||||||
jr .asm_1021f
|
jr .tossable_unselectable
|
||||||
.asm_10207
|
|
||||||
|
.usable
|
||||||
ld hl, MenuDataHeader_0x10249
|
ld hl, MenuDataHeader_0x10249
|
||||||
ld de, Jumptable_1026a
|
ld de, Jumptable_1026a
|
||||||
jr .asm_10235
|
jr .build_menu
|
||||||
.asm_1020f
|
|
||||||
|
.selectable_usable
|
||||||
ld hl, MenuDataHeader_0x10274
|
ld hl, MenuDataHeader_0x10274
|
||||||
ld de, Jumptable_10291
|
ld de, Jumptable_10291
|
||||||
jr .asm_10235
|
jr .build_menu
|
||||||
.asm_10217
|
|
||||||
|
.tossable_selectable
|
||||||
ld hl, MenuDataHeader_0x10299
|
ld hl, MenuDataHeader_0x10299
|
||||||
ld de, Jumptable_102ac
|
ld de, Jumptable_102ac
|
||||||
jr .asm_10235
|
jr .build_menu
|
||||||
.asm_1021f
|
|
||||||
|
.tossable_unselectable
|
||||||
ld hl, MenuDataHeader_0x102b0
|
ld hl, MenuDataHeader_0x102b0
|
||||||
ld de, Jumptable_102c7
|
ld de, Jumptable_102c7
|
||||||
jr .asm_10235
|
jr .build_menu
|
||||||
.asm_10227
|
|
||||||
|
.unusable
|
||||||
ld hl, MenuDataHeader_0x102cd
|
ld hl, MenuDataHeader_0x102cd
|
||||||
ld de, Jumptable_102ea
|
ld de, Jumptable_102ea
|
||||||
jr .asm_10235
|
jr .build_menu
|
||||||
.asm_1022f
|
|
||||||
|
.selectable_unusable
|
||||||
ld hl, MenuDataHeader_0x102f2
|
ld hl, MenuDataHeader_0x102f2
|
||||||
ld de, Jumptable_1030b
|
ld de, Jumptable_1030b
|
||||||
.asm_10235
|
.build_menu
|
||||||
push de
|
push de
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call InterpretMenu2
|
call InterpretMenu2
|
||||||
@ -350,7 +358,7 @@ Jumptable_10291: ; 10291
|
|||||||
; 10299
|
; 10299
|
||||||
|
|
||||||
MenuDataHeader_0x10299: ; 0x10299
|
MenuDataHeader_0x10299: ; 0x10299
|
||||||
db $40 ; flags
|
db %01000000 ; flags
|
||||||
db 07, 13 ; start coords
|
db 07, 13 ; start coords
|
||||||
db 11, 19 ; end coords
|
db 11, 19 ; end coords
|
||||||
dw MenuData2_0x102a1
|
dw MenuData2_0x102a1
|
||||||
@ -370,7 +378,7 @@ Jumptable_102ac: ; 102ac
|
|||||||
; 102b0
|
; 102b0
|
||||||
|
|
||||||
MenuDataHeader_0x102b0: ; 0x102b0
|
MenuDataHeader_0x102b0: ; 0x102b0
|
||||||
db $40 ; flags
|
db %01000000 ; flags
|
||||||
db 05, 13 ; start coords
|
db 05, 13 ; start coords
|
||||||
db 11, 19 ; end coords
|
db 11, 19 ; end coords
|
||||||
dw MenuData2_0x102b8
|
dw MenuData2_0x102b8
|
||||||
@ -439,52 +447,52 @@ Jumptable_1030b: ; 1030b
|
|||||||
|
|
||||||
Function10311: ; 10311
|
Function10311: ; 10311
|
||||||
callba CheckItemMenu
|
callba CheckItemMenu
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, Jumptable_1031f
|
ld hl, .jumptable
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
; 1031f
|
; 1031f
|
||||||
|
|
||||||
Jumptable_1031f: ; 1031f (4:431f)
|
.jumptable: ; 1031f (4:431f)
|
||||||
dw Function1032d
|
dw .Oak
|
||||||
dw Function1032d
|
dw .Oak
|
||||||
dw Function1032d
|
dw .Oak
|
||||||
dw Function1032d
|
dw .Oak
|
||||||
dw Function10334
|
dw .Current
|
||||||
dw Function10338
|
dw .Party
|
||||||
dw Function10355
|
dw .Field
|
||||||
; 1035c
|
; 1035c
|
||||||
|
|
||||||
Function1032d: ; 1032d (4:432d)
|
.Oak: ; 1032d (4:432d)
|
||||||
ld hl, UnknownText_0x10af3
|
ld hl, UnknownText_0x10af3
|
||||||
call Function10889
|
call Function10889
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10334: ; 10334 (4:4334)
|
.Current: ; 10334 (4:4334)
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10338: ; 10338 (4:4338)
|
.Party: ; 10338 (4:4338)
|
||||||
ld a, [PartyCount]
|
ld a, [PartyCount]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_1034e
|
jr z, .NoPokemon
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function10955
|
call Function10955
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
ret
|
ret
|
||||||
.asm_1034e
|
.NoPokemon
|
||||||
ld hl, UnknownText_0x10af8
|
ld hl, UnknownText_0x10af8
|
||||||
call Function10889
|
call Function10889
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10355: ; 10355 (4:4355)
|
.Field: ; 10355 (4:4355)
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
ld a, [wd0ec]
|
ld a, [wd0ec]
|
||||||
and a
|
and a
|
||||||
jr z, Function1032d
|
jr z, .Oak
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wJumptableEntryIndexBuffer], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
@ -529,26 +537,26 @@ Function1039d: ; 1039d
|
|||||||
|
|
||||||
.asm_103aa
|
.asm_103aa
|
||||||
xor a
|
xor a
|
||||||
ld [wd0db], a
|
ld [wBallsPocketPointerLocation], a
|
||||||
ld [wd0e1], a
|
ld [wd0e1], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_103b2
|
.asm_103b2
|
||||||
xor a
|
xor a
|
||||||
ld [wd0d9], a
|
ld [wItemsPocketPointerLocation], a
|
||||||
ld [wd0df], a
|
ld [wd0df], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_103ba
|
.asm_103ba
|
||||||
xor a
|
xor a
|
||||||
ld [wd0da], a
|
ld [wKeyItemsPocketPointerLocation], a
|
||||||
ld [wd0e0], a
|
ld [wd0e0], a
|
||||||
ret
|
ret
|
||||||
; 103c2
|
; 103c2
|
||||||
|
|
||||||
Function103c2: ; 103c2
|
Function103c2: ; 103c2
|
||||||
callba CheckSelectableItem
|
callba CheckSelectableItem
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_103f6
|
jr nz, .asm_103f6
|
||||||
ld a, [wcf65]
|
ld a, [wcf65]
|
||||||
@ -625,7 +633,7 @@ Function103fd: ; 103fd
|
|||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function10955
|
call Function10955
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -701,24 +709,24 @@ Function104d9: ; 104d9 (4:44d9)
|
|||||||
Function104e9: ; 104e9 (4:44e9)
|
Function104e9: ; 104e9 (4:44e9)
|
||||||
xor a
|
xor a
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function104fa: ; 104fa (4:44fa)
|
Function104fa: ; 104fa (4:44fa)
|
||||||
ld hl, MenuDataHeader_0x10a4f
|
ld hl, MenuDataHeader_0x10a4f
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0d9]
|
ld a, [wItemsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0df]
|
ld a, [wd0df]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0df], a
|
ld [wd0df], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0d9], a
|
ld [wItemsPocketPointerLocation], a
|
||||||
ld b, $7
|
ld b, $7
|
||||||
ld c, $3
|
ld c, $3
|
||||||
call Function108d4
|
call Function108d4
|
||||||
@ -729,24 +737,24 @@ Function104fa: ; 104fa (4:44fa)
|
|||||||
Function10527: ; 10527 (4:4527)
|
Function10527: ; 10527 (4:4527)
|
||||||
ld a, $2
|
ld a, $2
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10539: ; 10539 (4:4539)
|
Function10539: ; 10539 (4:4539)
|
||||||
ld hl, MenuDataHeader_0x10a7f
|
ld hl, MenuDataHeader_0x10a7f
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0da]
|
ld a, [wKeyItemsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0e0]
|
ld a, [wd0e0]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0e0], a
|
ld [wd0e0], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0da], a
|
ld [wKeyItemsPocketPointerLocation], a
|
||||||
ld b, $3
|
ld b, $3
|
||||||
ld c, $7
|
ld c, $7
|
||||||
call Function108d4
|
call Function108d4
|
||||||
@ -757,11 +765,11 @@ Function10539: ; 10539 (4:4539)
|
|||||||
Function10566: ; 10566 (4:4566)
|
Function10566: ; 10566 (4:4566)
|
||||||
ld a, $3
|
ld a, $3
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
ld hl, UnknownText_0x10b0c
|
ld hl, UnknownText_0x10b0c
|
||||||
call Function10889
|
call Function10889
|
||||||
call Function10866
|
call Function10866
|
||||||
@ -780,24 +788,24 @@ Function10581: ; 10581 (4:4581)
|
|||||||
Function10594: ; 10594 (4:4594)
|
Function10594: ; 10594 (4:4594)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10866
|
call Function10866
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function105a6: ; 105a6 (4:45a6)
|
Function105a6: ; 105a6 (4:45a6)
|
||||||
ld hl, MenuDataHeader_0x10aaf
|
ld hl, MenuDataHeader_0x10aaf
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0db]
|
ld a, [wBallsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0e1]
|
ld a, [wd0e1]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0e1], a
|
ld [wd0e1], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0db], a
|
ld [wBallsPocketPointerLocation], a
|
||||||
ld b, $1
|
ld b, $1
|
||||||
ld c, $5
|
ld c, $5
|
||||||
call Function108d4
|
call Function108d4
|
||||||
@ -807,18 +815,18 @@ Function105a6: ; 105a6 (4:45a6)
|
|||||||
|
|
||||||
Function105d3: ; 105d3 (4:45d3)
|
Function105d3: ; 105d3 (4:45d3)
|
||||||
callba CheckItemContext
|
callba CheckItemContext
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
|
|
||||||
Function105dc: ; 105dc (4:45dc)
|
Function105dc: ; 105dc (4:45dc)
|
||||||
and a
|
and a
|
||||||
jr z, .asm_105e7
|
jr z, .NoUse
|
||||||
ld hl, MenuDataHeader_0x10601
|
ld hl, .UsableMenuDataHeader
|
||||||
ld de, Jumptable_10614
|
ld de, .UsableJumptable
|
||||||
jr .asm_105ed
|
jr .proceed
|
||||||
.asm_105e7
|
.NoUse
|
||||||
ld hl, MenuDataHeader_0x10618
|
ld hl, .UnusableMenuDataHeader
|
||||||
ld de, Jumptable_10627
|
ld de, .UnusableJumptable
|
||||||
.asm_105ed
|
.proceed
|
||||||
push de
|
push de
|
||||||
call LoadMenuDataHeader
|
call LoadMenuDataHeader
|
||||||
call InterpretMenu2
|
call InterpretMenu2
|
||||||
@ -831,106 +839,108 @@ Function105dc: ; 105dc (4:45dc)
|
|||||||
jp [hl]
|
jp [hl]
|
||||||
; 10601 (4:4601)
|
; 10601 (4:4601)
|
||||||
|
|
||||||
MenuDataHeader_0x10601: ; 0x10601
|
.UsableMenuDataHeader: ; 0x10601
|
||||||
db $40 ; flags
|
db $40 ; flags
|
||||||
db 07, 13 ; start coords
|
db 07, 13 ; start coords
|
||||||
db 11, 19 ; end coords
|
db 11, 19 ; end coords
|
||||||
dw MenuData2_0x10609
|
dw .UsableMenuData2
|
||||||
db 1 ; default option
|
db 1 ; default option
|
||||||
; 0x10609
|
; 0x10609
|
||||||
|
|
||||||
MenuData2_0x10609: ; 0x10609
|
.UsableMenuData2: ; 0x10609
|
||||||
db $c0 ; flags
|
db $c0 ; flags
|
||||||
db 2 ; items
|
db 2 ; items
|
||||||
db "USE@"
|
db "USE@"
|
||||||
db "QUIT@"
|
db "QUIT@"
|
||||||
; 0x10614
|
; 0x10614
|
||||||
|
|
||||||
Jumptable_10614: ; 10614
|
.UsableJumptable: ; 10614
|
||||||
dw Function10629
|
dw .Use
|
||||||
dw Function10689
|
dw .Quit
|
||||||
; 10618
|
; 10618
|
||||||
|
|
||||||
MenuDataHeader_0x10618: ; 0x10618
|
.UnusableMenuDataHeader: ; 0x10618
|
||||||
db $40 ; flags
|
db $40 ; flags
|
||||||
db 09, 13 ; start coords
|
db 09, 13 ; start coords
|
||||||
db 11, 19 ; end coords
|
db 11, 19 ; end coords
|
||||||
dw MenuData2_0x10620
|
dw .UnusableMenuData2
|
||||||
db 1 ; default option
|
db 1 ; default option
|
||||||
; 0x10620
|
; 0x10620
|
||||||
|
|
||||||
MenuData2_0x10620: ; 0x10620
|
.UnusableMenuData2: ; 0x10620
|
||||||
db $c0 ; flags
|
db $c0 ; flags
|
||||||
db 1 ; items
|
db 1 ; items
|
||||||
db "QUIT@"
|
db "QUIT@"
|
||||||
; 0x10627
|
; 0x10627
|
||||||
|
|
||||||
Jumptable_10627: ; 10627
|
.UnusableJumptable: ; 10627
|
||||||
dw Function10689
|
dw .Quit
|
||||||
; 10629
|
; 10629
|
||||||
|
|
||||||
Function10629: ; 10629
|
.Use: ; 10629
|
||||||
callba CheckItemContext
|
callba CheckItemContext
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
ld hl, Jumptable_10637
|
ld hl, .ItemFunctionJumptable
|
||||||
rst JumpTable
|
rst JumpTable
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Jumptable_10637: ; 10637 (4:4637)
|
.ItemFunctionJumptable: ; 10637 (4:4637)
|
||||||
dw Function10645
|
dw .Oak
|
||||||
dw Function10645
|
dw .Oak
|
||||||
dw Function10645
|
dw .Oak
|
||||||
dw Function10645
|
dw .Oak
|
||||||
dw Function1064c
|
dw .Unused
|
||||||
dw Function10656
|
dw .BattleField
|
||||||
dw Function10671
|
dw .BattleOnly
|
||||||
|
|
||||||
|
|
||||||
Function10645: ; 10645 (4:4645)
|
.Oak: ; 10645 (4:4645)
|
||||||
ld hl, UnknownText_0x10af3
|
ld hl, UnknownText_0x10af3
|
||||||
call Function10889
|
call Function10889
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1064c: ; 1064c (4:464c)
|
.Unused: ; 1064c (4:464c)
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
ld a, [wd0ec]
|
ld a, [wd0ec]
|
||||||
and a
|
and a
|
||||||
jr nz, asm_1066c
|
jr nz, .asm_1066c
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10656: ; 10656 (4:4656)
|
.BattleField: ; 10656 (4:4656)
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
ld a, [wd0ec]
|
ld a, [wd0ec]
|
||||||
and a
|
and a
|
||||||
jr nz, asm_1067e
|
jr nz, .asm_1067e
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a ; $ff00+$d4
|
ld [hBGMapMode], a ; $ff00+$d4
|
||||||
call Function10955
|
call Function10955
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
call Function10a40
|
call Function10a40
|
||||||
ret
|
ret
|
||||||
asm_1066c: ; 1066c (4:466c)
|
|
||||||
call WhiteBGMap
|
|
||||||
jr asm_1067e
|
|
||||||
|
|
||||||
Function10671: ; 10671 (4:4671)
|
.asm_1066c: ; 1066c (4:466c)
|
||||||
|
call WhiteBGMap
|
||||||
|
jr .asm_1067e
|
||||||
|
|
||||||
|
.BattleOnly: ; 10671 (4:4671)
|
||||||
call DoItemEffect
|
call DoItemEffect
|
||||||
ld a, [wd0ec]
|
ld a, [wd0ec]
|
||||||
and a
|
and a
|
||||||
jr z, Function10645
|
jr z, .Oak
|
||||||
cp $2
|
cp $2
|
||||||
jr z, asm_10684
|
jr z, .asm_10684
|
||||||
asm_1067e: ; 1067e (4:467e)
|
.asm_1067e: ; 1067e (4:467e)
|
||||||
ld a, $a
|
ld a, $a
|
||||||
ld [wJumptableEntryIndexBuffer], a
|
ld [wJumptableEntryIndexBuffer], a
|
||||||
ret
|
ret
|
||||||
asm_10684: ; 10684 (4:4684)
|
|
||||||
|
.asm_10684: ; 10684 (4:4684)
|
||||||
xor a
|
xor a
|
||||||
ld [wd0ec], a
|
ld [wd0ec], a
|
||||||
ret
|
ret
|
||||||
; 10689 (4:4689)
|
; 10689 (4:4689)
|
||||||
|
|
||||||
Function10689: ; 10689
|
.Quit: ; 10689
|
||||||
ret
|
ret
|
||||||
; 1068a
|
; 1068a
|
||||||
|
|
||||||
@ -982,74 +992,74 @@ Function106c7: ; 106c7
|
|||||||
|
|
||||||
|
|
||||||
Jumptable_106d1: ; 106d1 (4:46d1)
|
Jumptable_106d1: ; 106d1 (4:46d1)
|
||||||
dw Function106d9
|
dw .ItemsPocket
|
||||||
dw Function1073b
|
dw .BallsPocket
|
||||||
dw Function106ff
|
dw .KeyItemsPocket
|
||||||
dw Function10726
|
dw .TMHMPocket
|
||||||
|
|
||||||
|
|
||||||
Function106d9: ; 106d9 (4:46d9)
|
.ItemsPocket: ; 106d9 (4:46d9)
|
||||||
xor a
|
xor a
|
||||||
call Function10762
|
call InitPocket
|
||||||
ld hl, MenuDataHeader_0x10a67
|
ld hl, MenuDataHeader_0x10a67
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0d9]
|
ld a, [wItemsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0df]
|
ld a, [wd0df]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0df], a
|
ld [wd0df], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0d9], a
|
ld [wItemsPocketPointerLocation], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function106ff: ; 106ff (4:46ff)
|
.KeyItemsPocket: ; 106ff (4:46ff)
|
||||||
ld a, $2
|
ld a, $2
|
||||||
call Function10762
|
call InitPocket
|
||||||
ld hl, MenuDataHeader_0x10a97
|
ld hl, MenuDataHeader_0x10a97
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0da]
|
ld a, [wKeyItemsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0e0]
|
ld a, [wd0e0]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0e0], a
|
ld [wd0e0], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0da], a
|
ld [wKeyItemsPocketPointerLocation], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10726: ; 10726 (4:4726)
|
.TMHMPocket: ; 10726 (4:4726)
|
||||||
ld a, $3
|
ld a, $3
|
||||||
call Function10762
|
call InitPocket
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
callba Function2c76f
|
callba Function2c76f
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1073b: ; 1073b (4:473b)
|
.BallsPocket: ; 1073b (4:473b)
|
||||||
ld a, $1
|
ld a, $1
|
||||||
call Function10762
|
call InitPocket
|
||||||
ld hl, MenuDataHeader_0x10ac7
|
ld hl, MenuDataHeader_0x10ac7
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wd0db]
|
ld a, [wBallsPocketPointerLocation]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ld a, [wd0e1]
|
ld a, [wd0e1]
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
call Function350c
|
call Function350c
|
||||||
ld a, [wd0e4]
|
ld a, [wd0e4]
|
||||||
ld [wd0e1], a
|
ld [wd0e1], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wd0db], a
|
ld [wBallsPocketPointerLocation], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function10762: ; 10762 (4:4762)
|
InitPocket: ; 10762 (4:4762)
|
||||||
ld [wcf65], a
|
ld [wcf65], a
|
||||||
call Function10a36
|
call ClearPocketList
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
@ -1188,8 +1198,8 @@ MenuData2_0x10816: ; 0x10816
|
|||||||
|
|
||||||
Function10826: ; 10826 (4:4826)
|
Function10826: ; 10826 (4:4826)
|
||||||
ld a, $3
|
ld a, $3
|
||||||
call Function10762
|
call InitPocket
|
||||||
call Function1089a
|
call WaitBGMap_DrawPackGFX
|
||||||
callba Function2c76f
|
callba Function2c76f
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
@ -1221,7 +1231,7 @@ MenuData2_0x1084a: ; 0x1084a
|
|||||||
|
|
||||||
Function1085a: ; 1085a (4:485a)
|
Function1085a: ; 1085a (4:485a)
|
||||||
push hl
|
push hl
|
||||||
call Function10762
|
call InitPocket
|
||||||
pop hl
|
pop hl
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
call Function350c
|
call Function350c
|
||||||
@ -1268,23 +1278,23 @@ Function10889: ; 10889 (4:4889)
|
|||||||
ld [Options], a
|
ld [Options], a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1089a: ; 1089a (4:489a)
|
WaitBGMap_DrawPackGFX: ; 1089a (4:489a)
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
|
|
||||||
|
|
||||||
Function1089d: ; 1089d
|
DrawPackGFX: ; 1089d
|
||||||
ld a, [wcf65]
|
ld a, [wcf65]
|
||||||
and $3
|
and $3
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, $0
|
ld d, $0
|
||||||
ld a, [BattleType]
|
ld a, [BattleType]
|
||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jr z, .asm_108b3
|
jr z, .male_dude
|
||||||
ld a, [PlayerGender]
|
ld a, [PlayerGender]
|
||||||
bit 0, a
|
bit 0, a
|
||||||
jr nz, .asm_108c5
|
jr nz, .female
|
||||||
|
|
||||||
.asm_108b3
|
.male_dude
|
||||||
ld hl, PackGFXPointers
|
ld hl, PackGFXPointers
|
||||||
rept 2
|
rept 2
|
||||||
add hl, de
|
add hl, de
|
||||||
@ -1297,8 +1307,8 @@ endr
|
|||||||
call Request2bpp
|
call Request2bpp
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.asm_108c5
|
.female
|
||||||
callba Function48e81
|
callba DrawKrisPackGFX
|
||||||
ret
|
ret
|
||||||
; 108cc
|
; 108cc
|
||||||
|
|
||||||
@ -1412,13 +1422,13 @@ Function10955: ; 10955
|
|||||||
inc a
|
inc a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_1098a
|
jr nz, .asm_1098a
|
||||||
call Function109bb
|
call DrawPocketName
|
||||||
call Function109a5
|
call Function109a5
|
||||||
hlcoord 0, 12
|
hlcoord 0, 12
|
||||||
lb bc, 4, 18
|
lb bc, 4, 18
|
||||||
call TextBox
|
call TextBox
|
||||||
call EnableLCD
|
call EnableLCD
|
||||||
call Function1089d
|
call DrawPackGFX
|
||||||
ret
|
ret
|
||||||
; 109a5
|
; 109a5
|
||||||
|
|
||||||
@ -1440,7 +1450,7 @@ Function109a5: ; 109a5
|
|||||||
ret
|
ret
|
||||||
; 109bb
|
; 109bb
|
||||||
|
|
||||||
Function109bb: ; 109bb
|
DrawPocketName: ; 109bb
|
||||||
ld a, [wcf65]
|
ld a, [wcf65]
|
||||||
|
|
||||||
; * 15
|
; * 15
|
||||||
@ -1450,30 +1460,30 @@ Function109bb: ; 109bb
|
|||||||
|
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld e, a
|
ld e, a
|
||||||
ld hl, Tilemap_109e1
|
ld hl, .tilemap
|
||||||
add hl, de
|
add hl, de
|
||||||
ld d, h
|
ld d, h
|
||||||
ld e, l
|
ld e, l
|
||||||
hlcoord 0, 7
|
hlcoord 0, 7
|
||||||
ld c, 3
|
ld c, 3
|
||||||
.asm_109d0
|
.row
|
||||||
ld b, 5
|
ld b, 5
|
||||||
.asm_109d2
|
.col
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
inc de
|
inc de
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_109d2
|
jr nz, .col
|
||||||
ld a, c
|
ld a, c
|
||||||
ld c, 15
|
ld c, SCREEN_WIDTH - 5
|
||||||
add hl, bc
|
add hl, bc
|
||||||
ld c, a
|
ld c, a
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_109d0
|
jr nz, .row
|
||||||
ret
|
ret
|
||||||
; 109e1
|
; 109e1
|
||||||
|
|
||||||
Tilemap_109e1: ; 109e1
|
.tilemap: ; 109e1
|
||||||
db $00, $04, $04, $04, $01, $06, $07, $08, $09, $0a, $02, $05, $05, $05, $03
|
db $00, $04, $04, $04, $01, $06, $07, $08, $09, $0a, $02, $05, $05, $05, $03
|
||||||
db $00, $04, $04, $04, $01, $15, $16, $17, $18, $19, $02, $05, $05, $05, $03
|
db $00, $04, $04, $04, $01, $15, $16, $17, $18, $19, $02, $05, $05, $05, $03
|
||||||
db $00, $04, $04, $04, $01, $0b, $0c, $0d, $0e, $0f, $02, $05, $05, $05, $03
|
db $00, $04, $04, $04, $01, $0b, $0c, $0d, $0e, $0f, $02, $05, $05, $05, $03
|
||||||
@ -1491,21 +1501,21 @@ Function10a1d: ; 10a1d
|
|||||||
Function10a2a: ; 10a2a
|
Function10a2a: ; 10a2a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
ld bc, SCREEN_WIDTH * SCREEN_HEIGHT
|
||||||
ld a, $7f
|
ld a, " "
|
||||||
call ByteFill
|
call ByteFill
|
||||||
ret
|
ret
|
||||||
; 10a36
|
; 10a36
|
||||||
|
|
||||||
Function10a36: ; 10a36 (4:4a36)
|
ClearPocketList: ; 10a36 (4:4a36)
|
||||||
hlcoord 5, 2
|
hlcoord 5, 2
|
||||||
ld bc, $a0f
|
lb bc, 10, SCREEN_WIDTH - 5
|
||||||
call ClearBox
|
call ClearBox
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
Function10a40: ; 10a40
|
Function10a40: ; 10a40
|
||||||
call WaitBGMap
|
call WaitBGMap
|
||||||
ld b, $14
|
ld b, SCREEN_WIDTH
|
||||||
call GetSGBLayout
|
call GetSGBLayout
|
||||||
call Function32f9
|
call Function32f9
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
|
884
engine/phone.asm
Normal file
@ -0,0 +1,884 @@
|
|||||||
|
AddPhoneNumber:: ; 90000
|
||||||
|
call _CheckCellNum
|
||||||
|
jr c, .cant_add
|
||||||
|
call Phone_FindOpenSlot
|
||||||
|
jr nc, .cant_add
|
||||||
|
ld [hl], c
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.cant_add
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
; 9000f
|
||||||
|
|
||||||
|
|
||||||
|
DelCellNum:: ; 9000f
|
||||||
|
call _CheckCellNum
|
||||||
|
jr nc, .not_in_list
|
||||||
|
xor a
|
||||||
|
ld [hl], a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.not_in_list
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
; 90019
|
||||||
|
|
||||||
|
CheckCellNum:: ; 90019
|
||||||
|
jp _CheckCellNum ; wtf
|
||||||
|
; 9001c
|
||||||
|
|
||||||
|
_CheckCellNum: ; 9001c
|
||||||
|
ld hl, wPhoneList
|
||||||
|
ld b, CONTACT_LIST_SIZE
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
cp c
|
||||||
|
jr z, .got_it
|
||||||
|
dec b
|
||||||
|
jr nz, .loop
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.got_it
|
||||||
|
dec hl
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
; 9002d
|
||||||
|
|
||||||
|
Phone_FindOpenSlot: ; 9002d
|
||||||
|
call GetRemainingSpaceInPhoneList
|
||||||
|
ld b, a
|
||||||
|
ld hl, wPhoneList
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
and a
|
||||||
|
jr z, .FoundOpenSpace
|
||||||
|
dec b
|
||||||
|
jr nz, .loop
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.FoundOpenSpace
|
||||||
|
dec hl
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
; 90040
|
||||||
|
|
||||||
|
GetRemainingSpaceInPhoneList: ; 90040
|
||||||
|
xor a
|
||||||
|
ld [Buffer1], a
|
||||||
|
ld hl, PermanentNumbers
|
||||||
|
.loop
|
||||||
|
ld a, [hli]
|
||||||
|
cp -1
|
||||||
|
jr z, .done
|
||||||
|
cp c
|
||||||
|
jr z, .elm_or_mom
|
||||||
|
push bc
|
||||||
|
push hl
|
||||||
|
ld c, a
|
||||||
|
call _CheckCellNum
|
||||||
|
jr c, .elm_or_mom_in_list
|
||||||
|
ld hl, Buffer1
|
||||||
|
inc [hl]
|
||||||
|
|
||||||
|
.elm_or_mom_in_list
|
||||||
|
pop hl
|
||||||
|
pop bc
|
||||||
|
|
||||||
|
.elm_or_mom
|
||||||
|
jr .loop
|
||||||
|
|
||||||
|
.done
|
||||||
|
ld a, CONTACT_LIST_SIZE
|
||||||
|
ld hl, Buffer1
|
||||||
|
sub [hl]
|
||||||
|
ret
|
||||||
|
; 90066
|
||||||
|
|
||||||
|
PermanentNumbers: ; 90066
|
||||||
|
db MOM_PHONE, ELM_PHONE, -1
|
||||||
|
; 90069
|
||||||
|
|
||||||
|
|
||||||
|
FarPlaceString: ; 90069
|
||||||
|
ld a, [hROMBank]
|
||||||
|
push af
|
||||||
|
ld a, b
|
||||||
|
rst Bankswitch
|
||||||
|
|
||||||
|
call PlaceString
|
||||||
|
|
||||||
|
pop af
|
||||||
|
rst Bankswitch
|
||||||
|
ret
|
||||||
|
; 90074
|
||||||
|
|
||||||
|
|
||||||
|
CheckPhoneCall:: ; 90074 (24:4074)
|
||||||
|
; Check if the phone is ringing in the overworld.
|
||||||
|
|
||||||
|
call CheckStandingOnEntrance
|
||||||
|
jr z, .no_call
|
||||||
|
|
||||||
|
call .timecheck
|
||||||
|
nop
|
||||||
|
jr nc, .no_call
|
||||||
|
|
||||||
|
call Random
|
||||||
|
ld b, a
|
||||||
|
and 50 percent
|
||||||
|
cp b
|
||||||
|
jr nz, .no_call
|
||||||
|
|
||||||
|
call GetMapHeaderPhoneServiceNybble
|
||||||
|
and a
|
||||||
|
jr nz, .no_call
|
||||||
|
|
||||||
|
call GetAvailableCallers
|
||||||
|
call ChooseRandomCaller
|
||||||
|
jr nc, .no_call
|
||||||
|
|
||||||
|
ld e, a
|
||||||
|
call LoadCallerScript
|
||||||
|
ld a, BANK(Script_ReceivePhoneCall)
|
||||||
|
ld hl, Script_ReceivePhoneCall
|
||||||
|
call CallScript
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
|
.no_call
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.timecheck: ; 900a6 (24:40a6)
|
||||||
|
callba CheckReceiveCallTimer
|
||||||
|
ret
|
||||||
|
|
||||||
|
CheckPhoneContactTimeOfDay: ; 900ad (24:40ad)
|
||||||
|
push hl
|
||||||
|
push bc
|
||||||
|
push de
|
||||||
|
push af
|
||||||
|
|
||||||
|
callba CheckTime
|
||||||
|
pop af
|
||||||
|
and (1 << MORN) + (1 << DAY) + (1 << NITE)
|
||||||
|
and c
|
||||||
|
|
||||||
|
pop de
|
||||||
|
pop bc
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
ChooseRandomCaller: ; 900bf (24:40bf)
|
||||||
|
; If no one is available to call, don't return anything.
|
||||||
|
ld a, [EngineBuffer3]
|
||||||
|
and a
|
||||||
|
jr z, .NothingToSample
|
||||||
|
|
||||||
|
; Sample a random number between 0 and 31.
|
||||||
|
ld c, a
|
||||||
|
call Random
|
||||||
|
ld a, [hRandomAdd] ; $ff00+$e1
|
||||||
|
swap a
|
||||||
|
and $1f
|
||||||
|
; Compute that number modulo the number of available callers.
|
||||||
|
call SimpleDivide
|
||||||
|
; Return the caller ID you just sampled.
|
||||||
|
ld c, a
|
||||||
|
ld b, 0
|
||||||
|
ld hl, EngineBuffer4
|
||||||
|
add hl, bc
|
||||||
|
ld a, [hl]
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
|
.NothingToSample
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
|
||||||
|
GetAvailableCallers: ; 900de (24:40de)
|
||||||
|
callba CheckTime
|
||||||
|
ld a, c
|
||||||
|
ld [EngineBuffer1], a ; wd03e (aliases: MenuItemsList, CurFruitTree, CurInput)
|
||||||
|
ld hl, EngineBuffer3
|
||||||
|
ld bc, 11
|
||||||
|
xor a
|
||||||
|
call ByteFill
|
||||||
|
ld de, wPhoneList
|
||||||
|
ld a, CONTACT_LIST_SIZE
|
||||||
|
|
||||||
|
.loop
|
||||||
|
ld [EngineBuffer2], a
|
||||||
|
ld a, [de]
|
||||||
|
and a
|
||||||
|
jr z, .not_good_for_call
|
||||||
|
ld hl, PhoneContacts + PHONE_CONTACT_SCRIPT2_TIME
|
||||||
|
ld bc, PHONE_TABLE_WIDTH
|
||||||
|
call AddNTimes
|
||||||
|
ld a, [EngineBuffer1] ; wd03e (aliases: MenuItemsList, CurFruitTree, CurInput)
|
||||||
|
and [hl]
|
||||||
|
jr z, .not_good_for_call
|
||||||
|
ld bc, PHONE_CONTACT_MAP_GROUP - PHONE_CONTACT_SCRIPT2_TIME
|
||||||
|
add hl, bc
|
||||||
|
ld a, [MapGroup]
|
||||||
|
cp [hl]
|
||||||
|
jr nz, .different_map
|
||||||
|
inc hl
|
||||||
|
ld a, [MapNumber]
|
||||||
|
cp [hl]
|
||||||
|
jr z, .not_good_for_call
|
||||||
|
.different_map
|
||||||
|
ld a, [EngineBuffer3]
|
||||||
|
ld c, a
|
||||||
|
ld b, $0
|
||||||
|
inc a
|
||||||
|
ld [EngineBuffer3], a
|
||||||
|
ld hl, EngineBuffer4
|
||||||
|
add hl, bc
|
||||||
|
ld a, [de]
|
||||||
|
ld [hl], a
|
||||||
|
.not_good_for_call
|
||||||
|
inc de
|
||||||
|
ld a, [EngineBuffer2]
|
||||||
|
dec a
|
||||||
|
jr nz, .loop
|
||||||
|
ret
|
||||||
|
|
||||||
|
CheckSpecialPhoneCall:: ; 90136 (24:4136)
|
||||||
|
ld a, [wSpecialPhoneCallID]
|
||||||
|
and a
|
||||||
|
jr z, .NoPhoneCall
|
||||||
|
|
||||||
|
dec a
|
||||||
|
ld c, a
|
||||||
|
ld b, 0
|
||||||
|
ld hl, SpecialPhoneCallList
|
||||||
|
ld a, 6
|
||||||
|
call AddNTimes
|
||||||
|
ld a, [hli]
|
||||||
|
ld h, [hl]
|
||||||
|
ld l, a
|
||||||
|
call _hl_
|
||||||
|
jr nc, .NoPhoneCall
|
||||||
|
|
||||||
|
call .DoSpecialPhoneCall
|
||||||
|
rept 2
|
||||||
|
inc hl
|
||||||
|
endr
|
||||||
|
ld a, [hli]
|
||||||
|
ld e, a
|
||||||
|
push hl
|
||||||
|
call LoadCallerScript
|
||||||
|
pop hl
|
||||||
|
ld de, wd048
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
inc de
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
inc de
|
||||||
|
ld a, [hli]
|
||||||
|
ld [de], a
|
||||||
|
ld a, BANK(.script)
|
||||||
|
ld hl, .script
|
||||||
|
call CallScript
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
.NoPhoneCall
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
; 90173 (24:4173)
|
||||||
|
|
||||||
|
.script: ; 0x90173
|
||||||
|
pause 30
|
||||||
|
jump Script_ReceivePhoneCall
|
||||||
|
; 0x90178
|
||||||
|
|
||||||
|
.DoSpecialPhoneCall: ; 90178 (24:4178)
|
||||||
|
ld a, [wSpecialPhoneCallID]
|
||||||
|
dec a
|
||||||
|
ld c, a
|
||||||
|
ld b, 0
|
||||||
|
ld hl, SpecialPhoneCallList
|
||||||
|
ld a, 6
|
||||||
|
call AddNTimes
|
||||||
|
ret
|
||||||
|
|
||||||
|
SpecialCallOnlyWhenOutside: ; 90188
|
||||||
|
ld a, [wPermission]
|
||||||
|
cp TOWN
|
||||||
|
jr z, .outside
|
||||||
|
cp ROUTE
|
||||||
|
jr z, .outside
|
||||||
|
xor a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.outside
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
|
SpecialCallWhereverYouAre: ; 90197
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function90199: ; 90199 (24:4199)
|
||||||
|
; Don't do the call if you're in a link communication
|
||||||
|
ld a, [wLinkMode]
|
||||||
|
and a
|
||||||
|
jr nz, .OutOfArea
|
||||||
|
; If you're in an area without phone service, don't do the call
|
||||||
|
call GetMapHeaderPhoneServiceNybble
|
||||||
|
and a
|
||||||
|
jr nz, .OutOfArea
|
||||||
|
; If the person can't take a call at that time, don't do the call
|
||||||
|
ld a, b
|
||||||
|
ld [wCurrentCaller], a
|
||||||
|
ld hl, PhoneContacts
|
||||||
|
ld bc, PHONE_TABLE_WIDTH
|
||||||
|
call AddNTimes
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
ld hl, PHONE_CONTACT_SCRIPT1_TIME
|
||||||
|
add hl, de
|
||||||
|
ld a, [hl]
|
||||||
|
call CheckPhoneContactTimeOfDay
|
||||||
|
jr z, .OutOfArea
|
||||||
|
; If we're in the same map as the person we're calling,
|
||||||
|
; use the "Just talk to that person" script.
|
||||||
|
ld hl, PHONE_CONTACT_MAP_GROUP
|
||||||
|
add hl, de
|
||||||
|
ld a, [MapGroup]
|
||||||
|
cp [hl]
|
||||||
|
jr nz, .GetPhoneScript
|
||||||
|
ld hl, PHONE_CONTACT_MAP_NUMBER
|
||||||
|
add hl, de
|
||||||
|
ld a, [MapNumber]
|
||||||
|
cp [hl]
|
||||||
|
jr nz, .GetPhoneScript
|
||||||
|
ld b, BANK(PhoneScript_JustTalkToThem)
|
||||||
|
ld hl, PhoneScript_JustTalkToThem
|
||||||
|
jr .DoPhoneCall
|
||||||
|
|
||||||
|
.GetPhoneScript
|
||||||
|
ld hl, PHONE_CONTACT_SCRIPT1_BANK
|
||||||
|
add hl, de
|
||||||
|
ld b, [hl]
|
||||||
|
ld hl, PHONE_CONTACT_SCRIPT1_ADDR_LO
|
||||||
|
add hl, de
|
||||||
|
ld a, [hli]
|
||||||
|
ld h, [hl]
|
||||||
|
ld l, a
|
||||||
|
jr .DoPhoneCall
|
||||||
|
|
||||||
|
.OutOfArea
|
||||||
|
ld b, BANK(UnknownScript_0x90209)
|
||||||
|
ld de, UnknownScript_0x90209
|
||||||
|
call ExecuteCallbackScript
|
||||||
|
ret
|
||||||
|
|
||||||
|
.DoPhoneCall
|
||||||
|
ld a, b
|
||||||
|
ld [wd002], a
|
||||||
|
ld a, l
|
||||||
|
ld [wd003], a
|
||||||
|
ld a, h
|
||||||
|
ld [wd004], a
|
||||||
|
ld b, BANK(UnknownScript_0x90205)
|
||||||
|
ld de, UnknownScript_0x90205
|
||||||
|
call ExecuteCallbackScript
|
||||||
|
ret
|
||||||
|
; 90205 (24:4205)
|
||||||
|
|
||||||
|
UnknownScript_0x90205: ; 0x90205
|
||||||
|
ptcall wd002
|
||||||
|
return
|
||||||
|
; 0x90209
|
||||||
|
|
||||||
|
UnknownScript_0x90209: ; 0x90209
|
||||||
|
scall UnknownScript_0x90657
|
||||||
|
return
|
||||||
|
; 0x9020d
|
||||||
|
|
||||||
|
LoadCallerScript: ; 9020d (24:420d)
|
||||||
|
nop
|
||||||
|
nop
|
||||||
|
ld a, e
|
||||||
|
ld [wCurrentCaller], a
|
||||||
|
and a
|
||||||
|
jr nz, .actualcaller
|
||||||
|
ld a, BANK(WrongNumber)
|
||||||
|
ld hl, WrongNumber
|
||||||
|
jr .proceed
|
||||||
|
|
||||||
|
.actualcaller
|
||||||
|
ld hl, PhoneContacts
|
||||||
|
ld bc, 12
|
||||||
|
ld a, e
|
||||||
|
call AddNTimes
|
||||||
|
ld a, BANK(PhoneContacts)
|
||||||
|
.proceed
|
||||||
|
ld de, EngineBuffer2
|
||||||
|
ld bc, 12
|
||||||
|
call FarCopyBytes
|
||||||
|
ret
|
||||||
|
; 90233 (24:4233)
|
||||||
|
|
||||||
|
WrongNumber: ; 90233
|
||||||
|
db PHONE, PHONE_00
|
||||||
|
dba .script
|
||||||
|
.script:
|
||||||
|
writetext .text
|
||||||
|
end
|
||||||
|
.text:
|
||||||
|
; Huh? Sorry, wrong number!
|
||||||
|
text_jump UnknownText_0x1c5565
|
||||||
|
db "@"
|
||||||
|
; 90241
|
||||||
|
|
||||||
|
Script_ReceivePhoneCall: ; 0x90241
|
||||||
|
refreshscreen $0
|
||||||
|
callasm RingTwice_StartCall
|
||||||
|
ptcall wd048
|
||||||
|
closetext
|
||||||
|
callasm HangUp
|
||||||
|
loadmovesprites
|
||||||
|
callasm InitCallReceiveDelay
|
||||||
|
end
|
||||||
|
; 0x90255
|
||||||
|
|
||||||
|
Script_SpecialBillCall:: ; 0x90255
|
||||||
|
callasm Function9025c
|
||||||
|
jump Script_ReceivePhoneCall
|
||||||
|
; 0x9025c
|
||||||
|
|
||||||
|
Function9025c: ; 9025c
|
||||||
|
ld e, PHONE_BILL
|
||||||
|
jp LoadCallerScript
|
||||||
|
; 90261
|
||||||
|
|
||||||
|
UnknownScript_0x90261: ; 0x90261
|
||||||
|
callasm Function9026a
|
||||||
|
pause 30
|
||||||
|
jump Script_ReceivePhoneCall
|
||||||
|
; 0x9026a
|
||||||
|
|
||||||
|
Function9026a: ; 9026a
|
||||||
|
ld e, PHONE_ELM
|
||||||
|
jp LoadCallerScript
|
||||||
|
; 9026f
|
||||||
|
|
||||||
|
RingTwice_StartCall: ; 9026f
|
||||||
|
call .Ring
|
||||||
|
call .Ring
|
||||||
|
callba MobileFn_1060d3
|
||||||
|
ret
|
||||||
|
; 9027c
|
||||||
|
|
||||||
|
.Ring: ; 9027c (24:427c)
|
||||||
|
call Phone_StartRinging
|
||||||
|
call Phone_Wait20Frames
|
||||||
|
call Phone_CallerTextboxWithName
|
||||||
|
call Phone_Wait20Frames
|
||||||
|
call Phone_CallerTextbox
|
||||||
|
call Phone_Wait20Frames
|
||||||
|
call Phone_CallerTextboxWithName
|
||||||
|
ret
|
||||||
|
|
||||||
|
Phone_CallerTextboxWithName: ; 90292 (24:4292)
|
||||||
|
ld a, [wCurrentCaller]
|
||||||
|
ld b, a
|
||||||
|
call Function90363
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
PhoneCall:: ; 9029a
|
||||||
|
ld a, b
|
||||||
|
ld [PhoneScriptBank], a
|
||||||
|
ld a, e
|
||||||
|
ld [PhoneCallerLo], a
|
||||||
|
ld a, d
|
||||||
|
ld [PhoneCallerHi], a
|
||||||
|
call Phone_FirstOfTwoRings
|
||||||
|
call Phone_FirstOfTwoRings
|
||||||
|
callba MobileFn_1060d3
|
||||||
|
ret
|
||||||
|
; 902b3
|
||||||
|
|
||||||
|
Phone_FirstOfTwoRings: ; 902b3
|
||||||
|
call Phone_StartRinging
|
||||||
|
call Phone_Wait20Frames
|
||||||
|
call Phone_CallerTextboxWithName2
|
||||||
|
call Phone_Wait20Frames
|
||||||
|
call Phone_CallerTextbox
|
||||||
|
call Phone_Wait20Frames
|
||||||
|
call Phone_CallerTextboxWithName2
|
||||||
|
ret
|
||||||
|
; 902c9
|
||||||
|
|
||||||
|
Phone_CallerTextboxWithName2: ; 902c9
|
||||||
|
call Phone_CallerTextbox
|
||||||
|
hlcoord 1, 2
|
||||||
|
ld [hl], $62
|
||||||
|
rept 2
|
||||||
|
inc hl
|
||||||
|
endr
|
||||||
|
ld a, [PhoneScriptBank]
|
||||||
|
ld b, a
|
||||||
|
ld a, [PhoneCallerLo]
|
||||||
|
ld e, a
|
||||||
|
ld a, [PhoneCallerHi]
|
||||||
|
ld d, a
|
||||||
|
call FarPlaceString
|
||||||
|
ret
|
||||||
|
; 902e3
|
||||||
|
|
||||||
|
|
||||||
|
Phone_NoSignal: ; 902e3 (24:42e3)
|
||||||
|
ld de, SFX_NO_SIGNAL
|
||||||
|
call PlaySFX
|
||||||
|
jr Phone_CallEnd
|
||||||
|
|
||||||
|
HangUp:: ; 902eb
|
||||||
|
call HangUp_Beep
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
Phone_CallEnd:
|
||||||
|
call HangUp_BoopOn
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
call HangUp_BoopOff
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
call HangUp_BoopOn
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
call HangUp_BoopOff
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
call HangUp_BoopOn
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
call HangUp_BoopOff
|
||||||
|
call HangUp_Wait20Frames
|
||||||
|
ret
|
||||||
|
; 90316
|
||||||
|
|
||||||
|
Function90316: ; 90316
|
||||||
|
ld de, SFX_SHUT_DOWN_PC
|
||||||
|
call PlaySFX
|
||||||
|
ret
|
||||||
|
; 9031d
|
||||||
|
|
||||||
|
HangUp_Beep: ; 9031d
|
||||||
|
ld hl, UnknownText_0x9032a
|
||||||
|
call PrintText
|
||||||
|
ld de, SFX_HANG_UP
|
||||||
|
call PlaySFX
|
||||||
|
ret
|
||||||
|
; 9032a
|
||||||
|
|
||||||
|
UnknownText_0x9032a: ; 9032a
|
||||||
|
text_jump UnknownText_0x1c5580
|
||||||
|
db "@"
|
||||||
|
; 9032f
|
||||||
|
|
||||||
|
|
||||||
|
HangUp_BoopOn: ; 9032f
|
||||||
|
ld hl, UnknownText_0x90336
|
||||||
|
call PrintText
|
||||||
|
ret
|
||||||
|
; 90336
|
||||||
|
|
||||||
|
UnknownText_0x90336: ; 0x90336
|
||||||
|
text_jump UnknownText_0x1c5588
|
||||||
|
db "@"
|
||||||
|
; 0x9033b
|
||||||
|
|
||||||
|
|
||||||
|
HangUp_BoopOff: ; 9033b
|
||||||
|
call SpeechTextBox
|
||||||
|
ret
|
||||||
|
; 9033f
|
||||||
|
|
||||||
|
Phone_StartRinging: ; 9033f
|
||||||
|
call WaitSFX
|
||||||
|
ld de, SFX_CALL
|
||||||
|
call PlaySFX
|
||||||
|
call Phone_CallerTextbox
|
||||||
|
call UpdateSprites
|
||||||
|
callba Function4d188
|
||||||
|
ret
|
||||||
|
; 90355
|
||||||
|
|
||||||
|
HangUp_Wait20Frames: ; 90355
|
||||||
|
jr Phone_Wait20Frames
|
||||||
|
|
||||||
|
Phone_Wait20Frames
|
||||||
|
ld c, 20
|
||||||
|
call DelayFrames
|
||||||
|
callba Function4d188
|
||||||
|
ret
|
||||||
|
; 90363
|
||||||
|
|
||||||
|
|
||||||
|
Function90363: ; 90363 (24:4363)
|
||||||
|
push bc
|
||||||
|
call Phone_CallerTextbox
|
||||||
|
hlcoord 1, 1
|
||||||
|
ld [hl], $62
|
||||||
|
rept 2
|
||||||
|
inc hl
|
||||||
|
endr
|
||||||
|
ld d, h
|
||||||
|
ld e, l
|
||||||
|
pop bc
|
||||||
|
call Function90380
|
||||||
|
ret
|
||||||
|
|
||||||
|
|
||||||
|
Phone_CallerTextbox: ; 90375
|
||||||
|
hlcoord 0, 0
|
||||||
|
ld b, 2
|
||||||
|
ld c, SCREEN_WIDTH - 2
|
||||||
|
call TextBox
|
||||||
|
ret
|
||||||
|
; 90380
|
||||||
|
|
||||||
|
|
||||||
|
Function90380: ; 90380 (24:4380)
|
||||||
|
ld h, d
|
||||||
|
ld l, e
|
||||||
|
ld a, b
|
||||||
|
call GetCallerTrainerClass
|
||||||
|
call GetCallerName
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function9038a: ; 9038a (24:438a)
|
||||||
|
ld a, c
|
||||||
|
call GetCallerTrainerClass
|
||||||
|
ld a, c
|
||||||
|
ret nz
|
||||||
|
ld a, b
|
||||||
|
cp $1
|
||||||
|
ret z
|
||||||
|
cp $4
|
||||||
|
ret z
|
||||||
|
ld c, $1
|
||||||
|
ret
|
||||||
|
|
||||||
|
GetCallerTrainerClass: ; 9039a
|
||||||
|
push hl
|
||||||
|
ld hl, PhoneContacts + PHONE_CONTACT_TRAINER_CLASS
|
||||||
|
ld bc, PHONE_TABLE_WIDTH
|
||||||
|
call AddNTimes
|
||||||
|
ld a, [hli]
|
||||||
|
ld b, [hl]
|
||||||
|
ld c, a
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
; 903a9
|
||||||
|
|
||||||
|
|
||||||
|
GetCallerName: ; 903a9 (24:43a9)
|
||||||
|
ld a, c
|
||||||
|
and a
|
||||||
|
jr z, .NotTrainer
|
||||||
|
|
||||||
|
call Phone_GetTrainerName
|
||||||
|
push hl
|
||||||
|
push bc
|
||||||
|
call PlaceString
|
||||||
|
ld a, ":"
|
||||||
|
ld [bc], a
|
||||||
|
pop bc
|
||||||
|
pop hl
|
||||||
|
ld de, SCREEN_WIDTH + 3
|
||||||
|
add hl, de
|
||||||
|
call Phone_GetTrainerClassName
|
||||||
|
call PlaceString
|
||||||
|
ret
|
||||||
|
|
||||||
|
.NotTrainer
|
||||||
|
push hl
|
||||||
|
ld c, b
|
||||||
|
ld b, 0
|
||||||
|
ld hl, NonTrainerCallerNames
|
||||||
|
rept 2
|
||||||
|
add hl, bc
|
||||||
|
endr
|
||||||
|
ld a, [hli]
|
||||||
|
ld e, a
|
||||||
|
ld d, [hl]
|
||||||
|
pop hl
|
||||||
|
call PlaceString
|
||||||
|
ret
|
||||||
|
; 903d6 (24:43d6)
|
||||||
|
|
||||||
|
NonTrainerCallerNames: ; 903d6
|
||||||
|
dw .none
|
||||||
|
dw .mom
|
||||||
|
dw .bikeshop
|
||||||
|
dw .bill
|
||||||
|
dw .elm
|
||||||
|
dw .buena
|
||||||
|
|
||||||
|
.none: db "----------@"
|
||||||
|
.mom: db "MOM:@"
|
||||||
|
.bill: db "BILL:@"
|
||||||
|
.elm: db "PROF.ELM:@"
|
||||||
|
.bikeshop: db "BIKE SHOP:@"
|
||||||
|
.buena: db "BUENA:", $22, " DISC JOCKEY@"
|
||||||
|
; 90423
|
||||||
|
|
||||||
|
Phone_GetTrainerName: ; 90423 (24:4423)
|
||||||
|
push hl
|
||||||
|
push bc
|
||||||
|
callba GetTrainerName
|
||||||
|
pop bc
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
Phone_GetTrainerClassName: ; 9042e (24:442e)
|
||||||
|
push hl
|
||||||
|
push bc
|
||||||
|
callba GetTrainerClassName
|
||||||
|
pop bc
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
|
||||||
|
GetCallerLocation: ; 90439
|
||||||
|
ld a, [wCurrentCaller]
|
||||||
|
call GetCallerTrainerClass
|
||||||
|
ld d, c
|
||||||
|
ld e, b
|
||||||
|
push de
|
||||||
|
ld a, [wCurrentCaller]
|
||||||
|
ld hl, PhoneContacts + PHONE_CONTACT_MAP_GROUP
|
||||||
|
ld bc, PHONE_TABLE_WIDTH
|
||||||
|
call AddNTimes
|
||||||
|
ld b, [hl]
|
||||||
|
inc hl
|
||||||
|
ld c, [hl]
|
||||||
|
push bc
|
||||||
|
call GetWorldMapLocation
|
||||||
|
ld e, a
|
||||||
|
callba GetLandmarkName
|
||||||
|
pop bc
|
||||||
|
pop de
|
||||||
|
ret
|
||||||
|
; 9045f
|
||||||
|
|
||||||
|
PhoneContacts: ; 9045f
|
||||||
|
phone: MACRO
|
||||||
|
db \1, \2 ; trainer
|
||||||
|
map \3 ; map
|
||||||
|
db \4
|
||||||
|
dba \5 ; script 1
|
||||||
|
db \6
|
||||||
|
dba \7 ; script 2
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone PHONE, MOM_PHONE, KRISS_HOUSE_1F, 7, MomPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone PHONE, OAK_PHONE, OAKS_LAB, 0, UnusedPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone PHONE, BILL_PHONE, N_A, 7, BillPhoneScript1, 0, BillPhoneScript2
|
||||||
|
phone PHONE, ELM_PHONE, ELMS_LAB, 7, ElmPhoneScript1, 0, ElmPhoneScript2
|
||||||
|
phone SCHOOLBOY, JACK1, NATIONAL_PARK, 7, JackPhoneScript1, 7, JackPhoneScript2
|
||||||
|
phone POKEFANF, BEVERLY1, NATIONAL_PARK, 7, BeverlyPhoneScript1, 7, BeverlyPhoneScript2
|
||||||
|
phone SAILOR, HUEY1, OLIVINE_LIGHTHOUSE_2F, 7, HueyPhoneScript1, 7, HueyPhoneScript2
|
||||||
|
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone COOLTRAINERM, GAVEN3, ROUTE_26, 7, GavenPhoneScript1, 7, GavenPhoneScript2
|
||||||
|
phone COOLTRAINERF, BETH1, ROUTE_26, 7, BethPhoneScript1, 7, BethPhoneScript2
|
||||||
|
phone BIRD_KEEPER, JOSE2, ROUTE_27, 7, JosePhoneScript1, 7, JosePhoneScript2
|
||||||
|
phone COOLTRAINERF, REENA1, ROUTE_27, 7, ReenaPhoneScript1, 7, ReenaPhoneScript2
|
||||||
|
phone YOUNGSTER, JOEY1, ROUTE_30, 7, JoeyPhoneScript1, 7, JoeyPhoneScript2
|
||||||
|
phone BUG_CATCHER, WADE1, ROUTE_31, 7, WadePhoneScript1, 7, WadePhoneScript2
|
||||||
|
phone FISHER, RALPH1, ROUTE_32, 7, RalphPhoneScript1, 7, RalphPhoneScript2
|
||||||
|
phone PICNICKER, LIZ1, ROUTE_32, 7, LizPhoneScript1, 7, LizPhoneScript2
|
||||||
|
phone HIKER, ANTHONY2, ROUTE_33, 7, AnthonyPhoneScript1, 7, AnthonyPhoneScript2
|
||||||
|
phone CAMPER, TODD1, ROUTE_34, 7, ToddPhoneScript1, 7, ToddPhoneScript2
|
||||||
|
phone PICNICKER, GINA1, ROUTE_34, 7, GinaPhoneScript1, 7, GinaPhoneScript2
|
||||||
|
phone JUGGLER, IRWIN1, ROUTE_35, 7, IrwinPhoneScript1, 7, IrwinPhoneScript2
|
||||||
|
phone BUG_CATCHER, ARNIE1, ROUTE_35, 7, ArniePhoneScript1, 7, ArniePhoneScript2
|
||||||
|
phone SCHOOLBOY, ALAN1, ROUTE_36, 7, AlanPhoneScript1, 7, AlanPhoneScript2
|
||||||
|
phone PHONE, PHONE_00, N_A, 0, UnusedPhoneScript, 0, UnusedPhoneScript
|
||||||
|
phone LASS, DANA1, ROUTE_38, 7, DanaPhoneScript1, 7, DanaPhoneScript2
|
||||||
|
phone SCHOOLBOY, CHAD1, ROUTE_38, 7, ChadPhoneScript1, 7, ChadPhoneScript2
|
||||||
|
phone POKEFANM, DEREK1, ROUTE_39, 7, DerekPhoneScript1, 7, DerekPhoneScript2
|
||||||
|
phone FISHER, TULLY1, ROUTE_42, 7, TullyPhoneScript1, 7, TullyPhoneScript2
|
||||||
|
phone POKEMANIAC, BRENT1, ROUTE_43, 7, BrentPhoneScript1, 7, BrentPhoneScript2
|
||||||
|
phone PICNICKER, TIFFANY3, ROUTE_43, 7, TiffanyPhoneScript1, 7, TiffanyPhoneScript2
|
||||||
|
phone BIRD_KEEPER, VANCE1, ROUTE_44, 7, VancePhoneScript1, 7, VancePhoneScript2
|
||||||
|
phone FISHER, WILTON1, ROUTE_44, 7, WiltonPhoneScript1, 7, WiltonPhoneScript2
|
||||||
|
phone BLACKBELT_T, KENJI3, ROUTE_45, 7, KenjiPhoneScript1, 7, KenjiPhoneScript2
|
||||||
|
phone HIKER, PARRY1, ROUTE_45, 7, ParryPhoneScript1, 7, ParryPhoneScript2
|
||||||
|
phone PICNICKER, ERIN1, ROUTE_46, 7, ErinPhoneScript1, 7, ErinPhoneScript2
|
||||||
|
phone PHONE, BUENA_PHONE, GOLDENROD_DEPT_STORE_ROOF, 7, BuenaPhoneScript1, 7, BuenaPhoneScript2
|
||||||
|
; 90627
|
||||||
|
|
||||||
|
SpecialPhoneCallList: ; 90627
|
||||||
|
dw SpecialCallOnlyWhenOutside
|
||||||
|
db PHONE_ELM
|
||||||
|
dba ElmPhoneScript2
|
||||||
|
|
||||||
|
dw SpecialCallOnlyWhenOutside
|
||||||
|
db PHONE_ELM
|
||||||
|
dba ElmPhoneScript2
|
||||||
|
|
||||||
|
dw SpecialCallOnlyWhenOutside
|
||||||
|
db PHONE_ELM
|
||||||
|
dba ElmPhoneScript2
|
||||||
|
|
||||||
|
dw SpecialCallOnlyWhenOutside
|
||||||
|
db PHONE_ELM
|
||||||
|
dba ElmPhoneScript2
|
||||||
|
|
||||||
|
dw SpecialCallWhereverYouAre
|
||||||
|
db PHONE_ELM
|
||||||
|
dba ElmPhoneScript2
|
||||||
|
|
||||||
|
dw SpecialCallWhereverYouAre
|
||||||
|
db PHONE_OAK ; ????????
|
||||||
|
dba BikeShopPhoneScript ; bike shop
|
||||||
|
|
||||||
|
dw SpecialCallWhereverYouAre
|
||||||
|
db PHONE_MOM
|
||||||
|
dba MomPhoneLectureScript
|
||||||
|
|
||||||
|
dw SpecialCallOnlyWhenOutside
|
||||||
|
db PHONE_ELM
|
||||||
|
dba ElmPhoneScript2
|
||||||
|
; 90657
|
||||||
|
|
||||||
|
UnknownScript_0x90657: ; 0x90657
|
||||||
|
writetext UnknownText_0x9065b
|
||||||
|
end
|
||||||
|
; 0x9065b
|
||||||
|
|
||||||
|
UnknownText_0x9065b: ; 0x9065b
|
||||||
|
; That number is out of the area.
|
||||||
|
text_jump UnknownText_0x1c558b
|
||||||
|
db "@"
|
||||||
|
; 0x90660
|
||||||
|
|
||||||
|
PhoneScript_JustTalkToThem: ; 0x90660
|
||||||
|
writetext UnknownText_0x90664
|
||||||
|
end
|
||||||
|
; 0x90664
|
||||||
|
|
||||||
|
UnknownText_0x90664: ; 0x90664
|
||||||
|
; Just go talk to that person!
|
||||||
|
text_jump UnknownText_0x1c55ac
|
||||||
|
db "@"
|
||||||
|
; 0x90669
|
||||||
|
|
||||||
|
UnknownScript_0x90669: ; 0x90669
|
||||||
|
writetext UnknownText_0x9066d
|
||||||
|
end
|
||||||
|
; 0x9066d
|
||||||
|
|
||||||
|
UnknownText_0x9066d: ; 0x9066d
|
||||||
|
; Thank you!
|
||||||
|
text_jump UnknownText_0x1c55ca
|
||||||
|
db "@"
|
||||||
|
; 0x90672
|
@ -141,7 +141,7 @@ MomPhoneNoGymQuestScript: ; 0xbcfac
|
|||||||
MomPhoneLectureScript: ; 0xbcfb1
|
MomPhoneLectureScript: ; 0xbcfb1
|
||||||
setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
|
setevent EVENT_TALKED_TO_MOM_AFTER_MYSTERY_EGG_QUEST
|
||||||
setflag ENGINE_DST
|
setflag ENGINE_DST
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
farwritetext MomPhoneLectureText
|
farwritetext MomPhoneLectureText
|
||||||
yesorno
|
yesorno
|
||||||
iftrue MomPhoneSaveMoneyScript
|
iftrue MomPhoneSaveMoneyScript
|
||||||
@ -194,7 +194,7 @@ BillPhoneScript2: ; 0xbd007
|
|||||||
; Elm
|
; Elm
|
||||||
|
|
||||||
ElmPhoneScript1: ; 0xbd00d
|
ElmPhoneScript1: ; 0xbd00d
|
||||||
checkcode VAR_POKERUS
|
checkcode VAR_SPECIALPHONECALL
|
||||||
if_equal $1, .pokerus
|
if_equal $1, .pokerus
|
||||||
checkevent EVENT_SHOWED_TOGEPI_TO_ELM
|
checkevent EVENT_SHOWED_TOGEPI_TO_ELM
|
||||||
iftrue .discovery
|
iftrue .discovery
|
||||||
@ -253,46 +253,46 @@ ElmPhoneScript1: ; 0xbd00d
|
|||||||
|
|
||||||
.pokerus ; 0xbd079
|
.pokerus ; 0xbd079
|
||||||
farwritetext ElmPhonePokerusText
|
farwritetext ElmPhonePokerusText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
end
|
end
|
||||||
|
|
||||||
ElmPhoneScript2: ; 0xbd081
|
ElmPhoneScript2: ; 0xbd081
|
||||||
checkcode VAR_POKERUS
|
checkcode VAR_SPECIALPHONECALL
|
||||||
if_equal $2, .disaster
|
if_equal $2, .disaster
|
||||||
if_equal $3, .assistant
|
if_equal $3, .assistant
|
||||||
if_equal $4, .rocket
|
if_equal $4, .rocket
|
||||||
if_equal $5, .gift
|
if_equal $5, .gift
|
||||||
if_equal $8, .gift
|
if_equal $8, .gift
|
||||||
farwritetext ElmPhonePokerusText
|
farwritetext ElmPhonePokerusText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
end
|
end
|
||||||
|
|
||||||
.disaster ; 0xbd09f
|
.disaster ; 0xbd09f
|
||||||
farwritetext ElmPhoneDisasterText
|
farwritetext ElmPhoneDisasterText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
setevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
|
setevent EVENT_ELM_CALLED_ABOUT_STOLEN_POKEMON
|
||||||
end
|
end
|
||||||
|
|
||||||
.assistant ; 0xbd0aa
|
.assistant ; 0xbd0aa
|
||||||
farwritetext ElmPhoneEggAssistantText
|
farwritetext ElmPhoneEggAssistantText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
clearevent EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER
|
clearevent EVENT_ELMS_AIDE_IN_VIOLET_POKEMON_CENTER
|
||||||
setevent EVENT_ELMS_AIDE_IN_LAB
|
setevent EVENT_ELMS_AIDE_IN_LAB
|
||||||
end
|
end
|
||||||
|
|
||||||
.rocket ; 0xbd0b8
|
.rocket ; 0xbd0b8
|
||||||
farwritetext ElmPhoneRocketText
|
farwritetext ElmPhoneRocketText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
end
|
end
|
||||||
|
|
||||||
.gift ; 0xbd0c0
|
.gift ; 0xbd0c0
|
||||||
farwritetext ElmPhoneGiftText
|
farwritetext ElmPhoneGiftText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
end
|
end
|
||||||
|
|
||||||
.unused ; 0xbd0c8
|
.unused ; 0xbd0c8
|
||||||
farwritetext ElmPhoneUnusedText
|
farwritetext ElmPhoneUnusedText
|
||||||
specialphonecall ELMCALL_NONE
|
specialphonecall SPECIALCALL_NONE
|
||||||
end
|
end
|
||||||
; bd0d0
|
; bd0d0
|
||||||
|
|
||||||
|
@ -1707,7 +1707,7 @@ BuenasPassword3: ; b8f47 (2e:4f47)
|
|||||||
BuenasPassword4: ; b8f55 (2e:4f55)
|
BuenasPassword4: ; b8f55 (2e:4f55)
|
||||||
call BuenasPasswordCheckMidnight
|
call BuenasPasswordCheckMidnight
|
||||||
jp c, BuenasPassword8
|
jp c, BuenasPassword8
|
||||||
ld a, [wdc4a]
|
ld a, [wBuenasPassword]
|
||||||
; If we already generated the password today, we don't need to generate a new one.
|
; If we already generated the password today, we don't need to generate a new one.
|
||||||
ld hl, WeeklyFlags
|
ld hl, WeeklyFlags
|
||||||
bit 7, [hl]
|
bit 7, [hl]
|
||||||
@ -1727,9 +1727,9 @@ BuenasPassword4: ; b8f55 (2e:4f55)
|
|||||||
and $3
|
and $3
|
||||||
cp $3
|
cp $3
|
||||||
jr nc, .greater_than_three
|
jr nc, .greater_than_three
|
||||||
; The high nybble of wdc4a will now contain the password group index, and the low nybble contains the actual password.
|
; The high nybble of wBuenasPassword will now contain the password group index, and the low nybble contains the actual password.
|
||||||
add e
|
add e
|
||||||
ld [wdc4a], a
|
ld [wBuenasPassword], a
|
||||||
; Set the flag so that we don't generate a new password this week.
|
; Set the flag so that we don't generate a new password this week.
|
||||||
ld hl, WeeklyFlags
|
ld hl, WeeklyFlags
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
|
@ -529,7 +529,7 @@ Script_interpretmenu: ; 0x96f41
|
|||||||
ld a, [ScriptBank]
|
ld a, [ScriptBank]
|
||||||
ld hl, InterpretMenu
|
ld hl, InterpretMenu
|
||||||
rst FarCall
|
rst FarCall
|
||||||
ld a, [wcf88]
|
ld a, [wPocketPointerLocationBuffer]
|
||||||
jr nc, .ok
|
jr nc, .ok
|
||||||
xor a
|
xor a
|
||||||
.ok
|
.ok
|
||||||
@ -651,7 +651,7 @@ Script_specialsound: ; 0x96fe4
|
|||||||
; script command 0x88
|
; script command 0x88
|
||||||
|
|
||||||
callba CheckItemPocket
|
callba CheckItemPocket
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
cp TM_HM
|
cp TM_HM
|
||||||
ld de, SFX_GET_TM
|
ld de, SFX_GET_TM
|
||||||
jr z, .play
|
jr z, .play
|
||||||
@ -665,7 +665,7 @@ Script_specialsound: ; 0x96fe4
|
|||||||
|
|
||||||
GetPocketName: ; 96ffe
|
GetPocketName: ; 96ffe
|
||||||
callba CheckItemPocket
|
callba CheckItemPocket
|
||||||
ld a, [wd142]
|
ld a, [wItemAttributeParamBuffer]
|
||||||
dec a
|
dec a
|
||||||
ld hl, .Pockets
|
ld hl, .Pockets
|
||||||
and 3
|
and 3
|
||||||
@ -1338,12 +1338,12 @@ Script_moveperson: ; 0x97341
|
|||||||
call GetScriptPerson
|
call GetScriptPerson
|
||||||
ld b, a
|
ld b, a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
add $4
|
add 4
|
||||||
ld d, a
|
ld d, a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
add $4
|
add 4
|
||||||
ld e, a
|
ld e, a
|
||||||
callba Function807e
|
callba CopyDECoordsToMapObject
|
||||||
ret
|
ret
|
||||||
; 0x9735b
|
; 0x9735b
|
||||||
|
|
||||||
@ -1385,10 +1385,10 @@ Script_loademote: ; 0x97384
|
|||||||
; bubble (SingleByteParam)
|
; bubble (SingleByteParam)
|
||||||
|
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
cp $ff
|
cp -1
|
||||||
jr nz, .asm_9738e ; 0x97389 $3
|
jr nz, .not_var_emote ; 0x97389 $3
|
||||||
ld a, [ScriptVar]
|
ld a, [ScriptVar]
|
||||||
.asm_9738e
|
.not_var_emote
|
||||||
ld c, a
|
ld c, a
|
||||||
callba Function1442f
|
callba Function1442f
|
||||||
ret
|
ret
|
||||||
@ -1417,7 +1417,7 @@ Script_showemote: ; 0x97396
|
|||||||
; 0x973b6
|
; 0x973b6
|
||||||
|
|
||||||
ShowEmoteScript: ; 973b6
|
ShowEmoteScript: ; 973b6
|
||||||
loademote $ff
|
loademote -1
|
||||||
applymovement2 .Show
|
applymovement2 .Show
|
||||||
pause 0
|
pause 0
|
||||||
applymovement2 .Hide
|
applymovement2 .Hide
|
||||||
@ -1448,12 +1448,12 @@ Script_earthquake: ; 0x973c7
|
|||||||
ld [wd003], a
|
ld [wd003], a
|
||||||
and $3f
|
and $3f
|
||||||
ld [wd005], a
|
ld [wd005], a
|
||||||
ld b, BANK(UnknownScript_0x973e6)
|
ld b, BANK(.script)
|
||||||
ld de, UnknownScript_0x973e6
|
ld de, .script
|
||||||
jp ScriptCall
|
jp ScriptCall
|
||||||
; 0x973e6
|
; 0x973e6
|
||||||
|
|
||||||
UnknownScript_0x973e6: ; 973e6
|
.script: ; 973e6
|
||||||
applymovement PLAYER, wd002
|
applymovement PLAYER, wd002
|
||||||
end
|
end
|
||||||
; 973eb
|
; 973eb
|
||||||
@ -1487,7 +1487,7 @@ Script_battlecheck: ; 0x973fb
|
|||||||
Script_loadtrainerdata: ; 0x97400
|
Script_loadtrainerdata: ; 0x97400
|
||||||
; script command 0x5c
|
; script command 0x5c
|
||||||
|
|
||||||
ld a, $81
|
ld a, (1 << 7) | 1
|
||||||
ld [wd459], a
|
ld [wd459], a
|
||||||
ld a, [WalkingDirection]
|
ld a, [WalkingDirection]
|
||||||
ld [OtherTrainerClass], a
|
ld [OtherTrainerClass], a
|
||||||
@ -1502,7 +1502,7 @@ Script_loadpokedata: ; 0x97412
|
|||||||
; pokemon (PokemonParam)
|
; pokemon (PokemonParam)
|
||||||
; level (DecimalParam)
|
; level (DecimalParam)
|
||||||
|
|
||||||
ld a, $80
|
ld a, (1 << 7)
|
||||||
ld [wd459], a
|
ld [wd459], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [TempWildMonSpecies], a
|
ld [TempWildMonSpecies], a
|
||||||
@ -1517,7 +1517,7 @@ Script_loadtrainer: ; 0x97424
|
|||||||
; trainer_group (TrainerGroupParam)
|
; trainer_group (TrainerGroupParam)
|
||||||
; trainer_id (TrainerIdParam)
|
; trainer_id (TrainerIdParam)
|
||||||
|
|
||||||
ld a, $81
|
ld a, (1 << 7) | 1
|
||||||
ld [wd459], a
|
ld [wd459], a
|
||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld [OtherTrainerClass], a
|
ld [OtherTrainerClass], a
|
||||||
@ -1531,7 +1531,7 @@ Script_startbattle: ; 0x97436
|
|||||||
|
|
||||||
call BufferScreen
|
call BufferScreen
|
||||||
predef StartBattle
|
predef StartBattle
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $3f
|
and $3f
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
@ -1555,7 +1555,7 @@ Script_returnafterbattle: ; 0x97459
|
|||||||
ld hl, wd459
|
ld hl, wd459
|
||||||
ld d, [hl]
|
ld d, [hl]
|
||||||
ld [hl], $0
|
ld [hl], $0
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and $3f
|
and $3f
|
||||||
cp $1
|
cp $1
|
||||||
jr nz, .notblackedout ; 0x97466 $8
|
jr nz, .notblackedout ; 0x97466 $8
|
||||||
@ -1565,17 +1565,17 @@ Script_returnafterbattle: ; 0x97459
|
|||||||
|
|
||||||
.notblackedout
|
.notblackedout
|
||||||
bit 0, d
|
bit 0, d
|
||||||
jr z, .asm_9747c ; 0x97472 $8
|
jr z, .was_wild ; 0x97472 $8
|
||||||
callba MomTriesToBuySomething
|
callba MomTriesToBuySomething
|
||||||
jr .done ; 0x9747a $12
|
jr .done ; 0x9747a $12
|
||||||
|
|
||||||
.asm_9747c
|
.was_wild
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .done ; 0x97481 $b
|
jr z, .done ; 0x97481 $b
|
||||||
ld b, BANK(Script_SpecialBillCall)
|
ld b, BANK(Script_SpecialBillCall)
|
||||||
ld de, Script_SpecialBillCall
|
ld de, Script_SpecialBillCall
|
||||||
callba Function97c4f
|
callba LoadScriptBDE
|
||||||
.done
|
.done
|
||||||
jp Script_reloadmap
|
jp Script_reloadmap
|
||||||
; 0x97491
|
; 0x97491
|
||||||
@ -1585,7 +1585,7 @@ Script_reloadmap: ; 0x97491
|
|||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [wd459], a
|
ld [wd459], a
|
||||||
ld a, $f3
|
ld a, ($f << 4) + MAPSETUP_03
|
||||||
ld [hMapEntryMethod], a
|
ld [hMapEntryMethod], a
|
||||||
ld a, $1
|
ld a, $1
|
||||||
call LoadMapStatus
|
call LoadMapStatus
|
||||||
@ -2813,10 +2813,10 @@ Script_warpfacing: ; 0x97a0e
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
and $3
|
and $3
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wd45b]
|
ld a, [wPlayerSpriteSetupFlags]
|
||||||
set 5, a
|
set 5, a
|
||||||
or c
|
or c
|
||||||
ld [wd45b], a
|
ld [wPlayerSpriteSetupFlags], a
|
||||||
; fall through
|
; fall through
|
||||||
|
|
||||||
Script_warp: ; 0x97a1d
|
Script_warp: ; 0x97a1d
|
||||||
@ -2840,7 +2840,7 @@ Script_warp: ; 0x97a1d
|
|||||||
ld [YCoord], a
|
ld [YCoord], a
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wd001], a
|
ld [wd001], a
|
||||||
ld a, -15
|
ld a, ($f << 4) + MAPSETUP_01
|
||||||
ld [hMapEntryMethod], a
|
ld [hMapEntryMethod], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
call LoadMapStatus
|
call LoadMapStatus
|
||||||
@ -2852,7 +2852,7 @@ Script_warp: ; 0x97a1d
|
|||||||
call GetScriptByte
|
call GetScriptByte
|
||||||
ld a, -1
|
ld a, -1
|
||||||
ld [wd001], a
|
ld [wd001], a
|
||||||
ld a, -5
|
ld a, ($f << 4) + MAPSETUP_11
|
||||||
ld [hMapEntryMethod], a
|
ld [hMapEntryMethod], a
|
||||||
ld a, 1
|
ld a, 1
|
||||||
call LoadMapStatus
|
call LoadMapStatus
|
||||||
@ -2968,7 +2968,7 @@ Script_reloadmappart:: ; 0x97ae3
|
|||||||
; script command 0x7c
|
; script command 0x7c
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [$ffd4], a
|
ld [hBGMapMode], a
|
||||||
call Function2173
|
call Function2173
|
||||||
call Function2914
|
call Function2914
|
||||||
callba Function104061
|
callba Function104061
|
||||||
@ -3046,7 +3046,7 @@ Script_loadmovesprites: ; 0x97b2f
|
|||||||
; script command 0x49
|
; script command 0x49
|
||||||
|
|
||||||
call Function2e20
|
call Function2e20
|
||||||
call Function2dcf
|
call LoadMoveSprites
|
||||||
ret
|
ret
|
||||||
; 0x97b36
|
; 0x97b36
|
||||||
|
|
||||||
|
@ -88,7 +88,7 @@ SpecialsPointers:: ; c029
|
|||||||
add_special Special_FindAtLeastThatHappy
|
add_special Special_FindAtLeastThatHappy
|
||||||
add_special Special_FindThatSpecies
|
add_special Special_FindThatSpecies
|
||||||
add_special Special_FindThatSpeciesYourTrainerID
|
add_special Special_FindThatSpeciesYourTrainerID
|
||||||
add_special Functionc3ef ; unreferenced
|
add_special Special_CheckUnusedTwoDayTimer ; unreferenced
|
||||||
add_special Special_DayCareMon1
|
add_special Special_DayCareMon1
|
||||||
add_special Special_DayCareMon2
|
add_special Special_DayCareMon2
|
||||||
add_special Special_SelectRandomBugContestContestants
|
add_special Special_SelectRandomBugContestContestants
|
||||||
@ -169,7 +169,7 @@ SpecialsPointers:: ; c029
|
|||||||
add_special SpecialBuenasPassword
|
add_special SpecialBuenasPassword
|
||||||
add_special SpecialBuenaPrize
|
add_special SpecialBuenaPrize
|
||||||
add_special SpecialDratini
|
add_special SpecialDratini
|
||||||
add_special Function11485
|
add_special Special_SampleKenjiBreakCountdown
|
||||||
add_special SpecialBeastsCheck
|
add_special SpecialBeastsCheck
|
||||||
add_special SpecialMonCheck
|
add_special SpecialMonCheck
|
||||||
add_special Functionc225
|
add_special Functionc225
|
||||||
@ -482,9 +482,9 @@ ScriptReturnCarry: ; c3e2
|
|||||||
ret
|
ret
|
||||||
; c3ef
|
; c3ef
|
||||||
|
|
||||||
Functionc3ef: ; c3ef
|
Special_CheckUnusedTwoDayTimer: ; c3ef
|
||||||
callba Function1150c
|
callba CheckUnusedTwoDayTimer
|
||||||
ld a, [wdc3a]
|
ld a, [wUnusedTwoDayTimer]
|
||||||
ld [ScriptVar], a
|
ld [ScriptVar], a
|
||||||
ret
|
ret
|
||||||
; c3fc
|
; c3fc
|
||||||
@ -523,7 +523,7 @@ SpecialCheckPokerus: ; c419
|
|||||||
; c422
|
; c422
|
||||||
|
|
||||||
Special_ResetLuckyNumberShowFlag: ; c422
|
Special_ResetLuckyNumberShowFlag: ; c422
|
||||||
callba Function1152b
|
callba RestartLuckyNumberCountdown
|
||||||
ld hl, wLuckyNumberShowFlag
|
ld hl, wLuckyNumberShowFlag
|
||||||
res 0, [hl]
|
res 0, [hl]
|
||||||
callba LoadOrRegenerateLuckyIDNumber
|
callba LoadOrRegenerateLuckyIDNumber
|
||||||
|
@ -159,7 +159,7 @@ PokeCenterNurseScript:
|
|||||||
|
|
||||||
.pokerus_done
|
.pokerus_done
|
||||||
setflag ENGINE_POKERUS
|
setflag ENGINE_POKERUS
|
||||||
specialphonecall ELMCALL_POKERUS
|
specialphonecall SPECIALCALL_POKERUS
|
||||||
end
|
end
|
||||||
|
|
||||||
DifficultBookshelfScript:
|
DifficultBookshelfScript:
|
||||||
@ -297,7 +297,7 @@ RadioTowerRocketsScript:
|
|||||||
clearevent EVENT_RADIO_TOWER_ROCKET_TAKEOVER
|
clearevent EVENT_RADIO_TOWER_ROCKET_TAKEOVER
|
||||||
clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
|
clearevent EVENT_USED_THE_CARD_KEY_IN_THE_RADIO_TOWER
|
||||||
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
|
setevent EVENT_MAHOGANY_TOWN_POKEFAN_M_BLOCKS_EAST
|
||||||
specialphonecall ELMCALL_WEIRDBROADCAST
|
specialphonecall SPECIALCALL_WEIRDBROADCAST
|
||||||
domaptrigger MAHOGANY_TOWN, $1
|
domaptrigger MAHOGANY_TOWN, $1
|
||||||
end
|
end
|
||||||
|
|
||||||
|
332
engine/time.asm
@ -1,103 +1,103 @@
|
|||||||
Function113d6: ; 113d6
|
_InitializeStartDay: ; 113d6
|
||||||
call Function114dd
|
call InitializeStartDay
|
||||||
ret
|
ret
|
||||||
; 113da
|
; 113da
|
||||||
|
|
||||||
Function113da: ; 113da
|
ClearDailyTimers: ; 113da
|
||||||
xor a
|
xor a
|
||||||
ld [wLuckyNumberDayBuffer], a
|
ld [wLuckyNumberDayBuffer], a
|
||||||
ld [wdc3a], a
|
ld [wUnusedTwoDayTimer], a
|
||||||
ld [wdc1c], a
|
ld [wDailyResetTimer], a
|
||||||
ret
|
ret
|
||||||
; 113e5
|
; 113e5
|
||||||
|
|
||||||
Function113e5:: ; 113e5
|
InitCallReceiveDelay:: ; 113e5
|
||||||
xor a
|
xor a
|
||||||
ld [wd464], a
|
ld [wTimeCyclesSinceLastCall], a
|
||||||
|
|
||||||
Function113e9: ; 113e9
|
NextCallReceiveDelay: ; 113e9
|
||||||
ld a, [wd464]
|
ld a, [wTimeCyclesSinceLastCall]
|
||||||
cp 3
|
cp 3
|
||||||
jr c, .asm_113f2
|
jr c, .okay
|
||||||
ld a, 3
|
ld a, 3
|
||||||
|
|
||||||
.asm_113f2
|
.okay
|
||||||
ld e, a
|
ld e, a
|
||||||
ld d, 0
|
ld d, 0
|
||||||
ld hl, .data_113fd
|
ld hl, .ReceiveCallDelays
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
jp Function1142e
|
jp RestartReceiveCallDelay
|
||||||
; 113fd
|
; 113fd
|
||||||
|
|
||||||
.data_113fd
|
.ReceiveCallDelays
|
||||||
db 20, 10, 5, 3
|
db 20, 10, 5, 3
|
||||||
; 11401
|
; 11401
|
||||||
|
|
||||||
Function11401: ; 11401
|
CheckReceiveCallTimer: ; 11401
|
||||||
call Function1143c
|
call CheckReceiveCallDelay ; check timer
|
||||||
ret nc
|
ret nc
|
||||||
ld hl, wd464
|
ld hl, wTimeCyclesSinceLastCall
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
cp 3
|
cp 3
|
||||||
jr nc, .asm_1140e
|
jr nc, .ok
|
||||||
inc [hl]
|
inc [hl]
|
||||||
|
|
||||||
.asm_1140e
|
.ok
|
||||||
call Function113e9
|
call NextCallReceiveDelay ; restart timer
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 11413
|
; 11413
|
||||||
|
|
||||||
Function11413: ; 11413
|
InitOneDayCountdown: ; 11413
|
||||||
ld a, 1
|
ld a, 1
|
||||||
|
|
||||||
Function11415: ; 11415
|
InitNDaysCountdown: ; 11415
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
push hl
|
push hl
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
pop hl
|
pop hl
|
||||||
inc hl
|
inc hl
|
||||||
call Function11621
|
call CopyDayToHL
|
||||||
ret
|
ret
|
||||||
; 11420
|
; 11420
|
||||||
|
|
||||||
CheckDayDependentEventHL: ; 11420
|
CheckDayDependentEventHL: ; 11420
|
||||||
inc hl
|
inc hl
|
||||||
push hl
|
push hl
|
||||||
call Function115cf
|
call CalcDaysSince
|
||||||
call Function115c8
|
call GetDaysSince
|
||||||
pop hl
|
pop hl
|
||||||
dec hl
|
dec hl
|
||||||
call Function11586
|
call UpdateTimeRemaining
|
||||||
ret
|
ret
|
||||||
; 1142e
|
; 1142e
|
||||||
|
|
||||||
Function1142e: ; 1142e
|
RestartReceiveCallDelay: ; 1142e
|
||||||
ld hl, wd465
|
ld hl, wReceiveCallDelay_MinsRemaining
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld hl, wd466
|
ld hl, wReceiveCallDelay_StartTime
|
||||||
call Function1162e
|
call CopyDayHourMinToHL
|
||||||
ret
|
ret
|
||||||
; 1143c
|
; 1143c
|
||||||
|
|
||||||
Function1143c: ; 1143c
|
CheckReceiveCallDelay: ; 1143c
|
||||||
ld hl, wd466
|
ld hl, wReceiveCallDelay_StartTime
|
||||||
call Function115d6
|
call CalcMinsHoursDaysSince
|
||||||
call Function115ae
|
call GetMinutesSinceIfLessThan60
|
||||||
ld hl, wd465
|
ld hl, wReceiveCallDelay_MinsRemaining
|
||||||
call Function11586
|
call UpdateTimeRemaining
|
||||||
ret
|
ret
|
||||||
; 1144c
|
; 1144c
|
||||||
|
|
||||||
Function1144c: ; 1144c
|
RestartDailyResetTimer: ; 1144c
|
||||||
ld hl, wdc1c
|
ld hl, wDailyResetTimer
|
||||||
jp Function11413
|
jp InitOneDayCountdown
|
||||||
; 11452
|
; 11452
|
||||||
|
|
||||||
Function11452:: ; 11452
|
CheckDailyResetTimer:: ; 11452
|
||||||
ld hl, wdc1c
|
ld hl, wDailyResetTimer
|
||||||
call CheckDayDependentEventHL
|
call CheckDayDependentEventHL
|
||||||
ret nc
|
ret nc
|
||||||
xor a
|
xor a
|
||||||
@ -121,18 +121,19 @@ endr
|
|||||||
ld hl, wdc58
|
ld hl, wdc58
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_11480
|
jr z, .RestartKenjiBreakCountdown
|
||||||
dec [hl]
|
dec [hl]
|
||||||
jr nz, .asm_11483
|
jr nz, .DontRestartKenjiBreakCountdown
|
||||||
|
|
||||||
.asm_11480
|
.RestartKenjiBreakCountdown
|
||||||
call Function11485
|
call Special_SampleKenjiBreakCountdown
|
||||||
|
|
||||||
.asm_11483
|
.DontRestartKenjiBreakCountdown
|
||||||
jr Function1144c
|
jr RestartDailyResetTimer
|
||||||
; 11485
|
; 11485
|
||||||
|
|
||||||
Function11485: ; 11485
|
Special_SampleKenjiBreakCountdown: ; 11485
|
||||||
|
; Generate a random number between 3 and 5
|
||||||
call Random
|
call Random
|
||||||
and 3
|
and 3
|
||||||
add 3
|
add 3
|
||||||
@ -140,99 +141,101 @@ Function11485: ; 11485
|
|||||||
ret
|
ret
|
||||||
; 11490
|
; 11490
|
||||||
|
|
||||||
Function11490: ; 11490
|
StartBugContestTimer: ; 11490
|
||||||
ld a, $14
|
ld a, 20
|
||||||
ld [wd46c], a
|
ld [wBugContestMinsRemaining], a
|
||||||
ld a, $0
|
ld a, 0
|
||||||
ld [wd46d], a
|
ld [wBugContestSecsRemaining], a
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld hl, wdc35
|
ld hl, wBugContestStartTime
|
||||||
call Function11613
|
call CopyDayHourMinSecToHL
|
||||||
ret
|
ret
|
||||||
; 114a4
|
; 114a4
|
||||||
|
|
||||||
|
|
||||||
Function114a4:: ; 114a4 (4:54a4)
|
CheckBugContestTimer:: ; 114a4 (4:54a4)
|
||||||
ld hl, wdc35
|
ld hl, wBugContestStartTime
|
||||||
call Function115db
|
call CalcSecsMinsHoursDaysSince
|
||||||
ld a, [wcfd7]
|
ld a, [wDaysSince]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_114d4
|
jr nz, .timed_out
|
||||||
ld a, [wcfd6]
|
ld a, [wHoursSince]
|
||||||
and a
|
and a
|
||||||
jr nz, .asm_114d4
|
jr nz, .timed_out
|
||||||
ld a, [wcfd4]
|
ld a, [wSecondsSince]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd46d]
|
ld a, [wBugContestSecsRemaining]
|
||||||
sub b
|
sub b
|
||||||
jr nc, .asm_114c2
|
jr nc, .okay
|
||||||
add $3c
|
add 60
|
||||||
.asm_114c2
|
|
||||||
ld [wd46d], a
|
.okay
|
||||||
ld a, [wcfd5]
|
ld [wBugContestSecsRemaining], a
|
||||||
|
ld a, [wMinutesSince]
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wd46c]
|
ld a, [wBugContestMinsRemaining]
|
||||||
sbc b
|
sbc b
|
||||||
ld [wd46c], a
|
ld [wBugContestMinsRemaining], a
|
||||||
jr c, .asm_114d4
|
jr c, .timed_out
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
.asm_114d4
|
|
||||||
|
.timed_out
|
||||||
xor a
|
xor a
|
||||||
ld [wd46c], a
|
ld [wBugContestMinsRemaining], a
|
||||||
ld [wd46d], a
|
ld [wBugContestSecsRemaining], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
|
|
||||||
|
|
||||||
Function114dd: ; 114dd
|
InitializeStartDay: ; 114dd
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld hl, wdc23
|
ld hl, wStartDay
|
||||||
call Function11621
|
call CopyDayToHL
|
||||||
ret
|
ret
|
||||||
; 114e7
|
; 114e7
|
||||||
|
|
||||||
Function114e7:: ; 114e7
|
CheckPokerusTrick:: ; 114e7
|
||||||
ld hl, wdc23
|
ld hl, wStartDay
|
||||||
call Function115cf
|
call CalcDaysSince
|
||||||
call Function115c8
|
call GetDaysSince
|
||||||
and a
|
and a
|
||||||
jr z, .asm_114fa
|
jr z, .done
|
||||||
|
|
||||||
ld b, a
|
ld b, a
|
||||||
callba ApplyPokerusTick
|
callba ApplyPokerusTick
|
||||||
|
|
||||||
.asm_114fa
|
.done
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
; 114fc
|
; 114fc
|
||||||
|
|
||||||
Function114fc: ; 114fc
|
SetUnusedTwoDayTimer: ; 114fc
|
||||||
ld a, $2
|
ld a, 2
|
||||||
ld hl, wdc3a
|
ld hl, wUnusedTwoDayTimer
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
call UpdateTime
|
call UpdateTime
|
||||||
ld hl, wdc3b
|
ld hl, wUnusedTwoDayTimerStartDate
|
||||||
call Function11621
|
call CopyDayToHL
|
||||||
ret
|
ret
|
||||||
; 1150c
|
; 1150c
|
||||||
|
|
||||||
Function1150c: ; Specific version of CheckDayDependentEventHL when hl = $dc3a
|
CheckUnusedTwoDayTimer: ; 1150c
|
||||||
ld hl, wdc3b
|
ld hl, wUnusedTwoDayTimerStartDate
|
||||||
call Function115cf
|
call CalcDaysSince
|
||||||
call Function115c8
|
call GetDaysSince
|
||||||
ld hl, wdc3a
|
ld hl, wUnusedTwoDayTimer
|
||||||
call Function11586
|
call UpdateTimeRemaining
|
||||||
ret
|
ret
|
||||||
; 1151c
|
; 1151c
|
||||||
|
|
||||||
Function1151c: ; 1151c
|
Function1151c: ; unreferenced
|
||||||
ld hl, DailyFlags
|
ld hl, DailyFlags
|
||||||
set 2, [hl]
|
set 2, [hl]
|
||||||
ret
|
ret
|
||||||
; 11522
|
; 11522
|
||||||
|
|
||||||
Function11522: ; 11522
|
Function11522: ; unreferenced
|
||||||
and a
|
and a
|
||||||
ld hl, DailyFlags
|
ld hl, DailyFlags
|
||||||
bit 2, [hl]
|
bit 2, [hl]
|
||||||
@ -241,10 +244,10 @@ Function11522: ; 11522
|
|||||||
ret
|
ret
|
||||||
; 1152b
|
; 1152b
|
||||||
|
|
||||||
Function1152b: ; 1152b
|
RestartLuckyNumberCountdown: ; 1152b
|
||||||
call .GetDaysUntilNextFriday
|
call .GetDaysUntilNextFriday
|
||||||
ld hl, wLuckyNumberDayBuffer
|
ld hl, wLuckyNumberDayBuffer
|
||||||
jp Function11415
|
jp InitNDaysCountdown
|
||||||
; 11534
|
; 11534
|
||||||
|
|
||||||
.GetDaysUntilNextFriday: ; 11534
|
.GetDaysUntilNextFriday: ; 11534
|
||||||
@ -267,167 +270,170 @@ CheckLuckyNumberShowFlag: ; 11542
|
|||||||
jp CheckDayDependentEventHL
|
jp CheckDayDependentEventHL
|
||||||
; 11548
|
; 11548
|
||||||
|
|
||||||
Function11548: ; 11548
|
DoMysteryGiftIfDayHasPassed: ; 11548
|
||||||
ld a, BANK(s0_abfa)
|
ld a, BANK(sMysteryGiftTimer)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, s0_abfa
|
ld hl, sMysteryGiftTimer
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [Buffer1], a
|
ld [Buffer1], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [Buffer2], a
|
ld [Buffer2], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
|
|
||||||
ld hl, Buffer1
|
ld hl, Buffer1
|
||||||
call CheckDayDependentEventHL
|
call CheckDayDependentEventHL
|
||||||
jr nc, .asm_11572
|
jr nc, .not_timed_out
|
||||||
ld hl, Buffer1
|
ld hl, Buffer1
|
||||||
call Function11413
|
call InitOneDayCountdown
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
callba Function1050c8
|
callba Function1050c8
|
||||||
|
|
||||||
.asm_11572
|
.not_timed_out
|
||||||
ld a, BANK(s0_abfa)
|
ld a, BANK(sMysteryGiftTimer)
|
||||||
call GetSRAMBank
|
call GetSRAMBank
|
||||||
ld hl, Buffer1
|
ld hl, Buffer1
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
ld [s0_abfa], a
|
ld [sMysteryGiftTimer], a
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [s0_abfa + 1], a
|
ld [sMysteryGiftTimer + 1], a
|
||||||
call CloseSRAM
|
call CloseSRAM
|
||||||
ret
|
ret
|
||||||
; 11586
|
; 11586
|
||||||
|
|
||||||
Function11586: ; 11586
|
UpdateTimeRemaining: ; 11586
|
||||||
|
; If the amount of time elapsed exceeds the capacity of its
|
||||||
|
; unit, skip this part.
|
||||||
cp -1
|
cp -1
|
||||||
jr z, .skip
|
jr z, .set_carry
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [hl]
|
ld a, [hl] ; time remaining
|
||||||
sub c
|
sub c
|
||||||
jr nc, .ok
|
jr nc, .ok
|
||||||
xor a
|
xor a
|
||||||
|
|
||||||
.ok
|
.ok
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
jr z, .skip
|
jr z, .set_carry
|
||||||
xor a
|
xor a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
.skip
|
.set_carry
|
||||||
xor a
|
xor a
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
; 11599
|
; 11599
|
||||||
|
|
||||||
Function11599: ; 11599
|
GetSecondsSinceIfLessThan60: ; 11599
|
||||||
ld a, [wcfd7]
|
ld a, [wDaysSince]
|
||||||
and a
|
and a
|
||||||
jr nz, Function115cc
|
jr nz, GetTimeElapsed_ExceedsUnitLimit
|
||||||
ld a, [wcfd6]
|
ld a, [wHoursSince]
|
||||||
and a
|
and a
|
||||||
jr nz, Function115cc
|
jr nz, GetTimeElapsed_ExceedsUnitLimit
|
||||||
ld a, [wcfd5]
|
ld a, [wMinutesSince]
|
||||||
jr nz, Function115cc
|
jr nz, GetTimeElapsed_ExceedsUnitLimit
|
||||||
ld a, [wcfd4]
|
ld a, [wSecondsSince]
|
||||||
ret
|
ret
|
||||||
; 115ae
|
; 115ae
|
||||||
|
|
||||||
Function115ae: ; 115ae
|
GetMinutesSinceIfLessThan60: ; 115ae
|
||||||
ld a, [wcfd7]
|
ld a, [wDaysSince]
|
||||||
and a
|
and a
|
||||||
jr nz, Function115cc
|
jr nz, GetTimeElapsed_ExceedsUnitLimit
|
||||||
ld a, [wcfd6]
|
ld a, [wHoursSince]
|
||||||
and a
|
and a
|
||||||
jr nz, Function115cc
|
jr nz, GetTimeElapsed_ExceedsUnitLimit
|
||||||
ld a, [wcfd5]
|
ld a, [wMinutesSince]
|
||||||
ret
|
ret
|
||||||
; 115be
|
; 115be
|
||||||
|
|
||||||
Function115be: ; 115be
|
GetHoursSinceIfLessThan24: ; 115be
|
||||||
ld a, [wcfd7]
|
ld a, [wDaysSince]
|
||||||
and a
|
and a
|
||||||
jr nz, Function115cc
|
jr nz, GetTimeElapsed_ExceedsUnitLimit
|
||||||
ld a, [wcfd6]
|
ld a, [wHoursSince]
|
||||||
ret
|
ret
|
||||||
; 115c8
|
; 115c8
|
||||||
|
|
||||||
Function115c8: ; 115c8
|
GetDaysSince: ; 115c8
|
||||||
ld a, [wcfd7]
|
ld a, [wDaysSince]
|
||||||
ret
|
ret
|
||||||
; 115cc
|
; 115cc
|
||||||
|
|
||||||
Function115cc: ; 115cc
|
GetTimeElapsed_ExceedsUnitLimit: ; 115cc
|
||||||
ld a, $ff
|
ld a, -1
|
||||||
ret
|
ret
|
||||||
; 115cf
|
; 115cf
|
||||||
|
|
||||||
Function115cf: ; 115cf
|
CalcDaysSince: ; 115cf
|
||||||
xor a
|
xor a
|
||||||
jr Function11605
|
jr _CalcDaysSince
|
||||||
; 115d2
|
; 115d2
|
||||||
|
|
||||||
Function115d2: ; 115d2
|
CalcHoursDaysSince: ; 115d2
|
||||||
inc hl
|
inc hl
|
||||||
xor a
|
xor a
|
||||||
jr Function115f8
|
jr _CalcHoursDaysSince
|
||||||
; 115d6
|
; 115d6
|
||||||
|
|
||||||
Function115d6: ; 115d6
|
CalcMinsHoursDaysSince: ; 115d6
|
||||||
rept 2
|
rept 2
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
xor a
|
xor a
|
||||||
jr Function115eb
|
jr _CalcMinsHoursDaysSince
|
||||||
; 115db
|
; 115db
|
||||||
|
|
||||||
Function115db: ; 115db
|
CalcSecsMinsHoursDaysSince: ; 115db
|
||||||
rept 3
|
rept 3
|
||||||
inc hl
|
inc hl
|
||||||
endr
|
endr
|
||||||
ld a, [hSeconds]
|
ld a, [hSeconds]
|
||||||
ld c, a
|
ld c, a
|
||||||
sub [hl]
|
sub [hl]
|
||||||
jr nc, .asm_115e6
|
jr nc, .skip
|
||||||
add 60
|
add 60
|
||||||
.asm_115e6
|
.skip
|
||||||
ld [hl], c
|
ld [hl], c ; current seconds
|
||||||
dec hl
|
dec hl
|
||||||
ld [wcfd4], a
|
ld [wSecondsSince], a ; seconds since
|
||||||
|
|
||||||
Function115eb: ; 115eb
|
_CalcMinsHoursDaysSince: ; 115eb
|
||||||
ld a, [hMinutes]
|
ld a, [hMinutes]
|
||||||
ld c, a
|
ld c, a
|
||||||
sbc [hl]
|
sbc [hl]
|
||||||
jr nc, .asm_115f3
|
jr nc, .skip
|
||||||
add 60
|
add 60
|
||||||
.asm_115f3
|
.skip
|
||||||
ld [hl], c
|
ld [hl], c ; current minutes
|
||||||
dec hl
|
dec hl
|
||||||
ld [wcfd5], a
|
ld [wMinutesSince], a ; minutes since
|
||||||
|
|
||||||
Function115f8: ; 115f8
|
_CalcHoursDaysSince: ; 115f8
|
||||||
ld a, [hHours]
|
ld a, [hHours]
|
||||||
ld c, a
|
ld c, a
|
||||||
sbc [hl]
|
sbc [hl]
|
||||||
jr nc, .asm_11600
|
jr nc, .skip
|
||||||
add 24
|
add 24
|
||||||
.asm_11600
|
.skip
|
||||||
ld [hl], c
|
ld [hl], c ; current hours
|
||||||
dec hl
|
dec hl
|
||||||
ld [wcfd6], a
|
ld [wHoursSince], a ; hours since
|
||||||
|
|
||||||
Function11605
|
_CalcDaysSince:
|
||||||
ld a, [CurDay]
|
ld a, [CurDay]
|
||||||
ld c, a
|
ld c, a
|
||||||
sbc [hl]
|
sbc [hl]
|
||||||
jr nc, .skip
|
jr nc, .skip
|
||||||
add 20 * 7
|
add 20 * 7
|
||||||
.skip
|
.skip
|
||||||
ld [hl], c
|
ld [hl], c ; current days
|
||||||
ld [wcfd7], a
|
ld [wDaysSince], a ; days since
|
||||||
ret
|
ret
|
||||||
; 11613
|
; 11613
|
||||||
|
|
||||||
Function11613: ; 11613
|
CopyDayHourMinSecToHL: ; 11613
|
||||||
ld a, [CurDay]
|
ld a, [CurDay]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [hHours]
|
ld a, [hHours]
|
||||||
@ -439,13 +445,13 @@ Function11613: ; 11613
|
|||||||
ret
|
ret
|
||||||
; 11621
|
; 11621
|
||||||
|
|
||||||
Function11621: ; 11621
|
CopyDayToHL: ; 11621
|
||||||
ld a, [CurDay]
|
ld a, [CurDay]
|
||||||
ld [hl], a
|
ld [hl], a
|
||||||
ret
|
ret
|
||||||
; 11626
|
; 11626
|
||||||
|
|
||||||
Function11626: ; 11626
|
CopyDayHourToHL: ; 11626
|
||||||
ld a, [CurDay]
|
ld a, [CurDay]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [hHours]
|
ld a, [hHours]
|
||||||
@ -453,7 +459,7 @@ Function11626: ; 11626
|
|||||||
ret
|
ret
|
||||||
; 1162e
|
; 1162e
|
||||||
|
|
||||||
Function1162e: ; 1162e
|
CopyDayHourMinToHL: ; 1162e
|
||||||
ld a, [CurDay]
|
ld a, [CurDay]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
ld a, [hHours]
|
ld a, [hHours]
|
||||||
|
414
engine/timeofdaypals.asm
Normal file
@ -0,0 +1,414 @@
|
|||||||
|
Function8c001:: ; 8c001
|
||||||
|
call UpdateTime
|
||||||
|
ld a, [TimeOfDay]
|
||||||
|
ld [CurTimeOfDay], a
|
||||||
|
call GetTimePalette
|
||||||
|
ld [TimeOfDayPal], a
|
||||||
|
ret
|
||||||
|
; 8c011
|
||||||
|
|
||||||
|
|
||||||
|
_TimeOfDayPals:: ; 8c011
|
||||||
|
; return carry if pals are changed
|
||||||
|
|
||||||
|
; forced pals?
|
||||||
|
ld hl, wd846
|
||||||
|
bit 7, [hl]
|
||||||
|
jr nz, .dontchange
|
||||||
|
|
||||||
|
; do we need to bother updating?
|
||||||
|
ld a, [TimeOfDay]
|
||||||
|
ld hl, CurTimeOfDay
|
||||||
|
cp [hl]
|
||||||
|
jr z, .dontchange
|
||||||
|
|
||||||
|
; if so, the time of day has changed
|
||||||
|
ld a, [TimeOfDay]
|
||||||
|
ld [CurTimeOfDay], a
|
||||||
|
|
||||||
|
; get palette id
|
||||||
|
call GetTimePalette
|
||||||
|
|
||||||
|
; same palette as before?
|
||||||
|
ld hl, TimeOfDayPal
|
||||||
|
cp [hl]
|
||||||
|
jr z, .dontchange
|
||||||
|
|
||||||
|
; update palette id
|
||||||
|
ld [TimeOfDayPal], a
|
||||||
|
|
||||||
|
|
||||||
|
; save bg palette 8
|
||||||
|
ld hl, Unkn1Pals + 8 * 7 ; Unkn1Pals + 7 pals
|
||||||
|
|
||||||
|
; save wram bank
|
||||||
|
ld a, [rSVBK]
|
||||||
|
ld b, a
|
||||||
|
; wram bank 5
|
||||||
|
ld a, 5
|
||||||
|
ld [rSVBK], a
|
||||||
|
|
||||||
|
; push palette
|
||||||
|
ld c, 4 ; NUM_PAL_COLORS
|
||||||
|
.push
|
||||||
|
ld d, [hl]
|
||||||
|
inc hl
|
||||||
|
ld e, [hl]
|
||||||
|
inc hl
|
||||||
|
push de
|
||||||
|
dec c
|
||||||
|
jr nz, .push
|
||||||
|
|
||||||
|
; restore wram bank
|
||||||
|
ld a, b
|
||||||
|
ld [rSVBK], a
|
||||||
|
|
||||||
|
|
||||||
|
; update sgb pals
|
||||||
|
ld b, $9
|
||||||
|
call GetSGBLayout
|
||||||
|
|
||||||
|
|
||||||
|
; restore bg palette 8
|
||||||
|
ld hl, Unkn2Pals - 1 ; last byte in Unkn1Pals
|
||||||
|
|
||||||
|
; save wram bank
|
||||||
|
ld a, [rSVBK]
|
||||||
|
ld d, a
|
||||||
|
; wram bank 5
|
||||||
|
ld a, 5
|
||||||
|
ld [rSVBK], a
|
||||||
|
|
||||||
|
; pop palette
|
||||||
|
ld e, 4 ; NUM_PAL_COLORS
|
||||||
|
.pop
|
||||||
|
pop bc
|
||||||
|
ld [hl], c
|
||||||
|
dec hl
|
||||||
|
ld [hl], b
|
||||||
|
dec hl
|
||||||
|
dec e
|
||||||
|
jr nz, .pop
|
||||||
|
|
||||||
|
; restore wram bank
|
||||||
|
ld a, d
|
||||||
|
ld [rSVBK], a
|
||||||
|
|
||||||
|
; update palettes
|
||||||
|
call _UpdateTimePals
|
||||||
|
call DelayFrame
|
||||||
|
|
||||||
|
; successful change
|
||||||
|
scf
|
||||||
|
ret
|
||||||
|
|
||||||
|
.dontchange
|
||||||
|
; no change occurred
|
||||||
|
and a
|
||||||
|
ret
|
||||||
|
; 8c070
|
||||||
|
|
||||||
|
|
||||||
|
_UpdateTimePals:: ; 8c070
|
||||||
|
ld c, $9 ; normal
|
||||||
|
call GetTimePalFade
|
||||||
|
call DmgToCgbTimePals
|
||||||
|
ret
|
||||||
|
; 8c079
|
||||||
|
|
||||||
|
FadeInBGMap:: ; 8c079
|
||||||
|
ld c, $12
|
||||||
|
call GetTimePalFade
|
||||||
|
ld b, $4
|
||||||
|
call ConvertTimePalsDecHL
|
||||||
|
ret
|
||||||
|
; 8c084
|
||||||
|
|
||||||
|
FadeBlackBGMap:: ; 8c084
|
||||||
|
call Function8c0c1
|
||||||
|
ld c, $9
|
||||||
|
call GetTimePalFade
|
||||||
|
ld b, $4
|
||||||
|
call ConvertTimePalsIncHL
|
||||||
|
ret
|
||||||
|
; 8c092
|
||||||
|
|
||||||
|
Special_BattleTowerFade: ; 8c092
|
||||||
|
call Function8c0c1
|
||||||
|
ld c, $9
|
||||||
|
call GetTimePalFade
|
||||||
|
ld b, $4
|
||||||
|
.asm_8c09c
|
||||||
|
call DmgToCgbTimePals
|
||||||
|
rept 3
|
||||||
|
inc hl
|
||||||
|
endr
|
||||||
|
ld c, $7
|
||||||
|
call DelayFrames
|
||||||
|
dec b
|
||||||
|
jr nz, .asm_8c09c
|
||||||
|
ret
|
||||||
|
; 8c0ab
|
||||||
|
|
||||||
|
Special_FadeInQuickly: ; 8c0ab
|
||||||
|
ld c, $0
|
||||||
|
call GetTimePalFade
|
||||||
|
ld b, $4
|
||||||
|
call ConvertTimePalsIncHL
|
||||||
|
ret
|
||||||
|
; 8c0b6
|
||||||
|
|
||||||
|
Special_FadeBlackQuickly: ; 8c0b6
|
||||||
|
ld c, $9
|
||||||
|
call GetTimePalFade
|
||||||
|
ld b, $4
|
||||||
|
call ConvertTimePalsDecHL
|
||||||
|
ret
|
||||||
|
; 8c0c1
|
||||||
|
|
||||||
|
|
||||||
|
Function8c0c1: ; 8c0c1
|
||||||
|
ld a, [rSVBK]
|
||||||
|
push af
|
||||||
|
ld a, $5
|
||||||
|
ld [rSVBK], a
|
||||||
|
ld hl, Unkn1Pals
|
||||||
|
ld a, [hli]
|
||||||
|
ld e, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld d, a
|
||||||
|
ld hl, Unkn1Pals + 8
|
||||||
|
ld c, $6
|
||||||
|
.asm_8c0d4
|
||||||
|
ld a, e
|
||||||
|
ld [hli], a
|
||||||
|
ld a, d
|
||||||
|
ld [hli], a
|
||||||
|
rept 6
|
||||||
|
inc hl
|
||||||
|
endr
|
||||||
|
dec c
|
||||||
|
jr nz, .asm_8c0d4
|
||||||
|
pop af
|
||||||
|
ld [rSVBK], a
|
||||||
|
ret
|
||||||
|
; 8c0e5
|
||||||
|
|
||||||
|
brightlevel: MACRO
|
||||||
|
db (\1 << 6) | (\2 << 4) | (\3 << 2) | \4
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
Function8c0e5: ; 8c0e5
|
||||||
|
ld hl, .BrightnessLevels
|
||||||
|
ld a, [wc2d0]
|
||||||
|
cp $4 ; Dark cave, needs Flash
|
||||||
|
jr z, .DarkCave
|
||||||
|
and $7
|
||||||
|
add l
|
||||||
|
ld l, a
|
||||||
|
ld a, $0
|
||||||
|
adc h
|
||||||
|
ld h, a
|
||||||
|
ld a, [hl]
|
||||||
|
ld [wd847], a
|
||||||
|
ret
|
||||||
|
.DarkCave
|
||||||
|
ld a, [StatusFlags]
|
||||||
|
bit 2, a
|
||||||
|
jr nz, .UsedFlash
|
||||||
|
ld a, $ff ; 3, 3, 3, 3
|
||||||
|
ld [wd847], a
|
||||||
|
ret
|
||||||
|
.UsedFlash
|
||||||
|
ld a, $aa ; 2, 2, 2, 2
|
||||||
|
ld [wd847], a
|
||||||
|
ret
|
||||||
|
; 8c10f (23:410f)
|
||||||
|
|
||||||
|
.BrightnessLevels: ; 8c10f
|
||||||
|
brightlevel 3, 2, 1, 0
|
||||||
|
brightlevel 1, 1, 1, 1
|
||||||
|
brightlevel 2, 2, 2, 2
|
||||||
|
brightlevel 0, 0, 0, 0
|
||||||
|
brightlevel 3, 3, 3, 3
|
||||||
|
brightlevel 3, 2, 1, 0
|
||||||
|
brightlevel 3, 2, 1, 0
|
||||||
|
brightlevel 3, 2, 1, 0
|
||||||
|
; 8c117
|
||||||
|
|
||||||
|
GetTimePalette: ; 8c117
|
||||||
|
ld a, [TimeOfDay]
|
||||||
|
ld e, a
|
||||||
|
ld d, 0
|
||||||
|
ld hl, .TimePalettes
|
||||||
|
rept 2
|
||||||
|
add hl, de
|
||||||
|
endr
|
||||||
|
ld a, [hli]
|
||||||
|
ld h, [hl]
|
||||||
|
ld l, a
|
||||||
|
jp [hl]
|
||||||
|
; 8c126
|
||||||
|
|
||||||
|
.TimePalettes
|
||||||
|
dw .MorningPalette
|
||||||
|
dw .DayPalette
|
||||||
|
dw .NitePalette
|
||||||
|
dw .DarknessPalette
|
||||||
|
|
||||||
|
.MorningPalette
|
||||||
|
ld a, [wd847]
|
||||||
|
and %00000011 ; 0
|
||||||
|
ret
|
||||||
|
|
||||||
|
.DayPalette
|
||||||
|
ld a, [wd847]
|
||||||
|
and %00001100 ; 1
|
||||||
|
srl a
|
||||||
|
srl a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.NitePalette
|
||||||
|
ld a, [wd847]
|
||||||
|
and %00110000 ; 2
|
||||||
|
swap a
|
||||||
|
ret
|
||||||
|
|
||||||
|
.DarknessPalette
|
||||||
|
ld a, [wd847]
|
||||||
|
and %11000000 ; 3
|
||||||
|
rlca
|
||||||
|
rlca
|
||||||
|
ret
|
||||||
|
; 8c14e
|
||||||
|
|
||||||
|
|
||||||
|
DmgToCgbTimePals: ; 8c14e
|
||||||
|
push hl
|
||||||
|
push de
|
||||||
|
ld a, [hli]
|
||||||
|
call DmgToCgbBGPals
|
||||||
|
ld a, [hli]
|
||||||
|
ld e, a
|
||||||
|
ld a, [hli]
|
||||||
|
ld d, a
|
||||||
|
call DmgToCgbObjPals
|
||||||
|
pop de
|
||||||
|
pop hl
|
||||||
|
ret
|
||||||
|
; 8c15e
|
||||||
|
|
||||||
|
ConvertTimePalsIncHL: ; 8c15e
|
||||||
|
.loop
|
||||||
|
call DmgToCgbTimePals
|
||||||
|
rept 3
|
||||||
|
inc hl
|
||||||
|
endr
|
||||||
|
ld c, $2
|
||||||
|
call DelayFrames
|
||||||
|
dec b
|
||||||
|
jr nz, .loop
|
||||||
|
ret
|
||||||
|
; 8c16d
|
||||||
|
|
||||||
|
ConvertTimePalsDecHL: ; 8c16d
|
||||||
|
.loop
|
||||||
|
call DmgToCgbTimePals
|
||||||
|
rept 3
|
||||||
|
dec hl
|
||||||
|
endr
|
||||||
|
ld c, $2
|
||||||
|
call DelayFrames
|
||||||
|
dec b
|
||||||
|
jr nz, .loop
|
||||||
|
ret
|
||||||
|
; 8c17c
|
||||||
|
|
||||||
|
|
||||||
|
GetTimePalFade: ; 8c17c
|
||||||
|
; check cgb
|
||||||
|
ld a, [hCGB]
|
||||||
|
and a
|
||||||
|
jr nz, .cgb
|
||||||
|
|
||||||
|
; else: dmg
|
||||||
|
|
||||||
|
; index
|
||||||
|
ld a, [TimeOfDayPal]
|
||||||
|
and %11
|
||||||
|
|
||||||
|
; get fade table
|
||||||
|
push bc
|
||||||
|
ld c, a
|
||||||
|
ld b, $0
|
||||||
|
ld hl, .dmgfades
|
||||||
|
rept 2
|
||||||
|
add hl, bc
|
||||||
|
endr
|
||||||
|
ld a, [hli]
|
||||||
|
ld h, [hl]
|
||||||
|
ld l, a
|
||||||
|
pop bc
|
||||||
|
|
||||||
|
; get place in fade table
|
||||||
|
ld b, $0
|
||||||
|
add hl, bc
|
||||||
|
ret
|
||||||
|
|
||||||
|
.cgb
|
||||||
|
ld hl, .cgbfade
|
||||||
|
ld b, $0
|
||||||
|
add hl, bc
|
||||||
|
ret
|
||||||
|
|
||||||
|
.dmgfades
|
||||||
|
dw .morn
|
||||||
|
dw .day
|
||||||
|
dw .nite
|
||||||
|
dw .darkness
|
||||||
|
|
||||||
|
.morn
|
||||||
|
db %11111111, %11111111, %11111111
|
||||||
|
db %11111110, %11111110, %11111110
|
||||||
|
db %11111001, %11100100, %11100100
|
||||||
|
db %11100100, %11010000, %11010000
|
||||||
|
db %10010000, %10000000, %10000000
|
||||||
|
db %01000000, %01000000, %01000000
|
||||||
|
db %00000000, %00000000, %00000000
|
||||||
|
|
||||||
|
.day
|
||||||
|
db %11111111, %11111111, %11111111
|
||||||
|
db %11111110, %11111110, %11111110
|
||||||
|
db %11111001, %11100100, %11100100
|
||||||
|
db %11100100, %11010000, %11010000
|
||||||
|
db %10010000, %10000000, %10000000
|
||||||
|
db %01000000, %01000000, %01000000
|
||||||
|
db %00000000, %00000000, %00000000
|
||||||
|
|
||||||
|
.nite
|
||||||
|
db %11111111, %11111111, %11111111
|
||||||
|
db %11111110, %11111110, %11111110
|
||||||
|
db %11111001, %11100100, %11100100
|
||||||
|
db %11101001, %11010000, %11010000
|
||||||
|
db %10010000, %10000000, %10000000
|
||||||
|
db %01000000, %01000000, %01000000
|
||||||
|
db %00000000, %00000000, %00000000
|
||||||
|
|
||||||
|
.darkness
|
||||||
|
db %11111111, %11111111, %11111111
|
||||||
|
db %11111110, %11111110, %11111111
|
||||||
|
db %11111110, %11100100, %11111111
|
||||||
|
db %11111101, %11010000, %11111111
|
||||||
|
db %11111101, %10000000, %11111111
|
||||||
|
db %00000000, %01000000, %00000000
|
||||||
|
db %00000000, %00000000, %00000000
|
||||||
|
|
||||||
|
.cgbfade
|
||||||
|
db %11111111, %11111111, %11111111
|
||||||
|
db %11111110, %11111110, %11111110
|
||||||
|
db %11111001, %11111001, %11111001
|
||||||
|
db %11100100, %11100100, %11100100
|
||||||
|
db %10010000, %10010000, %10010000
|
||||||
|
db %01000000, %01000000, %01000000
|
||||||
|
db %00000000, %00000000, %00000000
|
||||||
|
; 8c20f
|
@ -3,20 +3,20 @@ SpecialBuenasPassword: ; 8af6b
|
|||||||
ld [wcf76], a
|
ld [wcf76], a
|
||||||
ld hl, MenuDataHeader_0x8afa9
|
ld hl, MenuDataHeader_0x8afa9
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [wdc4a]
|
ld a, [wBuenasPassword]
|
||||||
ld c, a
|
ld c, a
|
||||||
callba GetBuenasPassword
|
callba GetBuenasPassword
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
add c
|
add c
|
||||||
add $2
|
add $2
|
||||||
ld [wcf85], a
|
ld [wMenuBorderRightCoord], a
|
||||||
call Function1c00
|
call BackUpTiles
|
||||||
call Function1e5d
|
call Function1e5d
|
||||||
callba Function4ae5e
|
callba Function4ae5e
|
||||||
ld b, $0
|
ld b, $0
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wdc4a]
|
ld a, [wBuenasPassword]
|
||||||
and $3
|
and $3
|
||||||
cp c
|
cp c
|
||||||
jr nz, .asm_8afa4
|
jr nz, .asm_8afa4
|
||||||
@ -52,7 +52,7 @@ Unknown_8afb8: ; 8afb8
|
|||||||
|
|
||||||
Function8afbd: ; 8afbd
|
Function8afbd: ; 8afbd
|
||||||
push de
|
push de
|
||||||
ld a, [wdc4a]
|
ld a, [wBuenasPassword]
|
||||||
and $f0
|
and $f0
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
@ -94,14 +94,16 @@ SpecialBuenaPrize: ; 8afd4
|
|||||||
call Function105a
|
call Function105a
|
||||||
call YesNoBox
|
call YesNoBox
|
||||||
jr c, .asm_8afeb
|
jr c, .asm_8afeb
|
||||||
|
|
||||||
ld a, [wcf75]
|
ld a, [wcf75]
|
||||||
call Buena_getprize
|
call Buena_getprize
|
||||||
inc hl
|
inc hl
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wdc4b]
|
ld a, [wBlueCardBalance]
|
||||||
cp c
|
cp c
|
||||||
jr c, .asm_8b047
|
jr c, .InsufficientBalance
|
||||||
|
|
||||||
ld a, [hli]
|
ld a, [hli]
|
||||||
push hl
|
push hl
|
||||||
ld [CurItem], a
|
ld [CurItem], a
|
||||||
@ -113,13 +115,13 @@ SpecialBuenaPrize: ; 8afd4
|
|||||||
jr nc, .asm_8b04c
|
jr nc, .asm_8b04c
|
||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wdc4b]
|
ld a, [wBlueCardBalance]
|
||||||
sub c
|
sub c
|
||||||
ld [wdc4b], a
|
ld [wBlueCardBalance], a
|
||||||
call Function8b097
|
call Function8b097
|
||||||
jr .asm_8b051
|
jr .asm_8b051
|
||||||
|
|
||||||
.asm_8b047
|
.InsufficientBalance
|
||||||
ld hl, UnknownText_0x8b081
|
ld hl, UnknownText_0x8b081
|
||||||
jr .asm_8b05a
|
jr .asm_8b05a
|
||||||
|
|
||||||
@ -189,7 +191,7 @@ Function8b090: ; 8b090
|
|||||||
; 8b097
|
; 8b097
|
||||||
|
|
||||||
Function8b097: ; 8b097
|
Function8b097: ; 8b097
|
||||||
ld de, wdc4b
|
ld de, wBlueCardBalance
|
||||||
call Function8b09e
|
call Function8b09e
|
||||||
ret
|
ret
|
||||||
; 8b09e
|
; 8b09e
|
||||||
@ -245,7 +247,7 @@ Function8b0e2: ; 8b0e2
|
|||||||
ld hl, .MenuDataHeader
|
ld hl, .MenuDataHeader
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [wcf76], a
|
ld [wcf76], a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
@ -27,7 +27,7 @@ Special_SelectApricornForKurt: ; 88018
|
|||||||
ld c, $1
|
ld c, $1
|
||||||
xor a
|
xor a
|
||||||
ld [wd0e4], a
|
ld [wd0e4], a
|
||||||
ld [wdca4], a
|
ld [wKurtApricornQuantity], a
|
||||||
.loop
|
.loop
|
||||||
push bc
|
push bc
|
||||||
call Kurt_PrintTextWhichApricorn
|
call Kurt_PrintTextWhichApricorn
|
||||||
@ -48,7 +48,7 @@ Special_SelectApricornForKurt: ; 88018
|
|||||||
pop bc
|
pop bc
|
||||||
jr nc, .loop
|
jr nc, .loop
|
||||||
ld a, [wd10c]
|
ld a, [wd10c]
|
||||||
ld [wdca4], a
|
ld [wKurtApricornQuantity], a
|
||||||
call Kurt_GiveUpSelectedQuantityOfSelectedApricorn
|
call Kurt_GiveUpSelectedQuantityOfSelectedApricorn
|
||||||
|
|
||||||
.done
|
.done
|
||||||
@ -62,7 +62,7 @@ Kurt_SelectApricorn: ; 88055
|
|||||||
ld hl, .MenuDataHeader
|
ld hl, .MenuDataHeader
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
ld a, [MenuSelection]
|
ld a, [MenuSelection]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call Function352f
|
call Function352f
|
||||||
|
Before Width: | Height: | Size: 139 B After Width: | Height: | Size: 153 B |
Before Width: | Height: | Size: 348 B After Width: | Height: | Size: 388 B |
Before Width: | Height: | Size: 180 B After Width: | Height: | Size: 195 B |
Before Width: | Height: | Size: 282 B After Width: | Height: | Size: 373 B |
30
home.asm
@ -95,7 +95,7 @@ Function2ecb:: ; 2ecb
|
|||||||
; 2ed3
|
; 2ed3
|
||||||
|
|
||||||
|
|
||||||
Function2ed3:: ; 0x2ed3
|
DisableSpriteUpdates:: ; 0x2ed3
|
||||||
; disables overworld sprite updating?
|
; disables overworld sprite updating?
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [$ffde], a
|
||||||
@ -107,7 +107,7 @@ Function2ed3:: ; 0x2ed3
|
|||||||
ret
|
ret
|
||||||
; 0x2ee4
|
; 0x2ee4
|
||||||
|
|
||||||
Function2ee4:: ; 2ee4
|
EnableSpriteUpdates:: ; 2ee4
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [wc2ce], a
|
ld [wc2ce], a
|
||||||
ld a, [VramState]
|
ld a, [VramState]
|
||||||
@ -157,7 +157,7 @@ IsInJohto:: ; 2f17
|
|||||||
; 2f3e
|
; 2f3e
|
||||||
|
|
||||||
|
|
||||||
Function2f3e:: ; 2f3e
|
ret_2f3e:: ; 2f3e
|
||||||
ret
|
ret
|
||||||
; 2f3f
|
; 2f3f
|
||||||
|
|
||||||
@ -605,10 +605,12 @@ Function3246:: ; 3246
|
|||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
|
|
||||||
ld a, [$ffde]
|
ld a, [$ffde]
|
||||||
push af
|
push af
|
||||||
xor a
|
xor a
|
||||||
ld [$ffde], a
|
ld [$ffde], a
|
||||||
|
|
||||||
.wait
|
.wait
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
cp $7f
|
cp $7f
|
||||||
@ -623,6 +625,7 @@ Function3246:: ; 3246
|
|||||||
ld [rVBK], a
|
ld [rVBK], a
|
||||||
hlcoord 0, 0
|
hlcoord 0, 0
|
||||||
call Function327b
|
call Function327b
|
||||||
|
|
||||||
.wait2
|
.wait2
|
||||||
ld a, [rLY]
|
ld a, [rLY]
|
||||||
cp $7f
|
cp $7f
|
||||||
@ -637,30 +640,33 @@ Function3246:: ; 3246
|
|||||||
; 327b
|
; 327b
|
||||||
|
|
||||||
Function327b:: ; 327b
|
Function327b:: ; 327b
|
||||||
|
; Copy all tiles to VBGMap
|
||||||
ld [hSPBuffer], sp
|
ld [hSPBuffer], sp
|
||||||
ld sp, hl
|
ld sp, hl
|
||||||
ld a, [hBGMapAddress + 1]
|
ld a, [hBGMapAddress + 1]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld l, 0
|
ld l, 0
|
||||||
ld a, 18
|
ld a, SCREEN_HEIGHT
|
||||||
ld [$ffd3], a
|
ld [$ffd3], a
|
||||||
ld b, 1 << 1 ; not in v/hblank
|
ld b, 1 << 1 ; not in v/hblank
|
||||||
ld c, rSTAT % $100
|
ld c, rSTAT % $100
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
rept 20 / 2
|
rept SCREEN_WIDTH / 2
|
||||||
pop de
|
pop de
|
||||||
|
; if in v/hblank, wait until not in v/hblank
|
||||||
.loop\@
|
.loop\@
|
||||||
ld a, [$ff00+c]
|
ld a, [$ff00+c]
|
||||||
and b
|
and b
|
||||||
jr nz, .loop\@
|
jr nz, .loop\@
|
||||||
|
; load BGMap0
|
||||||
ld [hl], e
|
ld [hl], e
|
||||||
inc l
|
inc l
|
||||||
ld [hl], d
|
ld [hl], d
|
||||||
inc l
|
inc l
|
||||||
endr
|
endr
|
||||||
|
|
||||||
ld de, 32 - 20
|
ld de, $20 - SCREEN_WIDTH
|
||||||
add hl, de
|
add hl, de
|
||||||
ld a, [$ffd3]
|
ld a, [$ffd3]
|
||||||
dec a
|
dec a
|
||||||
@ -1163,16 +1169,16 @@ Function3524:: ; 3524
|
|||||||
; 352f
|
; 352f
|
||||||
|
|
||||||
Function352f:: ; 352f
|
Function352f:: ; 352f
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord]
|
||||||
dec a
|
dec a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcf84]
|
ld a, [wMenuBorderBottomCoord]
|
||||||
sub b
|
sub b
|
||||||
ld d, a
|
ld d, a
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
dec a
|
dec a
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcf85]
|
ld a, [wMenuBorderRightCoord]
|
||||||
sub c
|
sub c
|
||||||
ld e, a
|
ld e, a
|
||||||
push de
|
push de
|
||||||
@ -1599,7 +1605,7 @@ Function3718:: ; 3718
|
|||||||
jr .ok
|
jr .ok
|
||||||
|
|
||||||
.canlose
|
.canlose
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
ld hl, WalkingTile
|
ld hl, WalkingTile
|
||||||
and $f
|
and $f
|
||||||
jr z, .ok
|
jr z, .ok
|
||||||
@ -2221,7 +2227,7 @@ Function3f6e:: ; 3f6e
|
|||||||
|
|
||||||
Function3f7c:: ; 3f7c
|
Function3f7c:: ; 3f7c
|
||||||
call GetMemTileCoord
|
call GetMemTileCoord
|
||||||
call Function1c53
|
call GetMenuBoxDims
|
||||||
dec b
|
dec b
|
||||||
dec c
|
dec c
|
||||||
call Function3eea
|
call Function3eea
|
||||||
|
@ -224,19 +224,19 @@ Request2bpp:: ; eba
|
|||||||
|
|
||||||
ld a, [$ffd3]
|
ld a, [$ffd3]
|
||||||
push af
|
push af
|
||||||
|
|
||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd3], a
|
ld [$ffd3], a
|
||||||
|
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jr nz, .okay
|
jr nz, .NotMobile
|
||||||
ld a, [$ffe9]
|
ld a, [hMobile]
|
||||||
and a
|
and a
|
||||||
jr nz, .okay
|
jr nz, .NotMobile
|
||||||
ld a, $6
|
ld a, $6
|
||||||
ld [$ffd3], a
|
ld [$ffd3], a
|
||||||
|
|
||||||
.okay
|
.NotMobile
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [Requested2bppSource], a
|
ld [Requested2bppSource], a
|
||||||
ld a, d
|
ld a, d
|
||||||
@ -245,7 +245,6 @@ Request2bpp:: ; eba
|
|||||||
ld [Requested2bppDest], a
|
ld [Requested2bppDest], a
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [Requested2bppDest + 1], a
|
ld [Requested2bppDest + 1], a
|
||||||
|
|
||||||
.loop
|
.loop
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, $ffd3
|
ld hl, $ffd3
|
||||||
@ -272,11 +271,13 @@ Request2bpp:: ; eba
|
|||||||
.iterate
|
.iterate
|
||||||
ld a, [$ffd3]
|
ld a, [$ffd3]
|
||||||
ld [Requested2bpp], a
|
ld [Requested2bpp], a
|
||||||
|
|
||||||
.wait2
|
.wait2
|
||||||
call DelayFrame
|
call DelayFrame
|
||||||
ld a, [Requested2bpp]
|
ld a, [Requested2bpp]
|
||||||
and a
|
and a
|
||||||
jr nz, .wait2
|
jr nz, .wait2
|
||||||
|
|
||||||
ld a, c
|
ld a, c
|
||||||
ld hl, $ffd3
|
ld hl, $ffd3
|
||||||
sub [hl]
|
sub [hl]
|
||||||
@ -302,9 +303,9 @@ Request1bpp:: ; f1e
|
|||||||
ld a, $8
|
ld a, $8
|
||||||
ld [$ffd3], a
|
ld [$ffd3], a
|
||||||
ld a, [wLinkMode]
|
ld a, [wLinkMode]
|
||||||
cp $4
|
cp LINK_MOBILE
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
ld a, [$ffe9]
|
ld a, [hMobile]
|
||||||
and a
|
and a
|
||||||
jr nz, .NotMobile
|
jr nz, .NotMobile
|
||||||
ld a, $6
|
ld a, $6
|
||||||
|
16
home/map.asm
@ -508,17 +508,18 @@ GetMapConnection:: ; 23a3
|
|||||||
|
|
||||||
|
|
||||||
Function23ac:: ; 23ac
|
Function23ac:: ; 23ac
|
||||||
ld a, [hli]
|
ld a, [hli] ; trigger count
|
||||||
ld c, a
|
ld c, a
|
||||||
ld [wdc07], a
|
ld [wdc07], a ; current map trigger count
|
||||||
ld a, l
|
ld a, l
|
||||||
ld [wdc07 + 1], a
|
ld [wdc08], a ; map trigger pointer
|
||||||
ld a, h
|
ld a, h
|
||||||
ld [wdc09], a
|
ld [wdc09], a
|
||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld bc, $0004
|
|
||||||
|
ld bc, 4 ; size of a map trigger header entry
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ret
|
ret
|
||||||
; 23c3
|
; 23c3
|
||||||
@ -534,7 +535,8 @@ Function23c3:: ; 23c3
|
|||||||
ld a, c
|
ld a, c
|
||||||
and a
|
and a
|
||||||
ret z
|
ret z
|
||||||
ld bc, $0003
|
|
||||||
|
ld bc, 3
|
||||||
call AddNTimes
|
call AddNTimes
|
||||||
ret
|
ret
|
||||||
; 23da
|
; 23da
|
||||||
@ -1958,7 +1960,7 @@ FadeToMenu:: ; 2b29
|
|||||||
call Function1d6e
|
call Function1d6e
|
||||||
callba FadeBlackBGMap
|
callba FadeBlackBGMap
|
||||||
call ClearSprites
|
call ClearSprites
|
||||||
call Function2ed3
|
call DisableSpriteUpdates
|
||||||
ret
|
ret
|
||||||
; 2b3c
|
; 2b3c
|
||||||
|
|
||||||
@ -1986,7 +1988,7 @@ Function2b5c:: ; 2b5c
|
|||||||
callba Function49409
|
callba Function49409
|
||||||
call Function3200
|
call Function3200
|
||||||
callba FadeInBGMap
|
callba FadeInBGMap
|
||||||
call Function2ee4
|
call EnableSpriteUpdates
|
||||||
ret
|
ret
|
||||||
; 2b74
|
; 2b74
|
||||||
|
|
||||||
|
@ -1,14 +1,14 @@
|
|||||||
; Functions used in displaying and handling menus.
|
; Functions used in displaying and handling menus.
|
||||||
|
|
||||||
|
|
||||||
LoadMenuDataHeader:: ; 0x1d35
|
LoadMenuDataHeader::
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
call Function1c00
|
call BackUpTiles
|
||||||
ret
|
ret
|
||||||
|
|
||||||
CopyMenuDataHeader:: ; 0x1d3c
|
CopyMenuDataHeader::
|
||||||
ld de, wcf81
|
ld de, wcf81
|
||||||
ld bc, $0010
|
ld bc, 16
|
||||||
call CopyBytes
|
call CopyBytes
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld [wcf8a], a
|
ld [wcf8a], a
|
||||||
@ -16,7 +16,7 @@ CopyMenuDataHeader:: ; 0x1d3c
|
|||||||
; 0x1d4b
|
; 0x1d4b
|
||||||
|
|
||||||
Function1d4b:: ; 1d4b
|
Function1d4b:: ; 1d4b
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
ret
|
ret
|
||||||
; 1d4f
|
; 1d4f
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ Function1d7d:: ; 1d7d
|
|||||||
ret
|
ret
|
||||||
; 1d81
|
; 1d81
|
||||||
|
|
||||||
InterpretMenu2:: ; 0x1d81
|
InterpretMenu2::
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call Function1cbb
|
call Function1cbb
|
||||||
@ -81,12 +81,12 @@ InterpretMenu2:: ; 0x1d81
|
|||||||
call Function1c66
|
call Function1c66
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
bit 7, a
|
bit 7, a
|
||||||
jr z, .cancel ; 0x1d98 $d
|
jr z, .cancel
|
||||||
call Function1c10
|
call Function1c10
|
||||||
call Function1bc9
|
call Function1bc9
|
||||||
call Function1ff8
|
call Function1ff8
|
||||||
bit 1, a
|
bit 1, a
|
||||||
jr z, .okay ; 0x1da5 $2
|
jr z, .okay
|
||||||
.cancel
|
.cancel
|
||||||
scf
|
scf
|
||||||
ret
|
ret
|
||||||
@ -103,7 +103,7 @@ GetMenu2:: ; 1dab
|
|||||||
ret
|
ret
|
||||||
; 1db8
|
; 1db8
|
||||||
|
|
||||||
Function1db8:: ; 0x1db8
|
Function1db8::
|
||||||
push hl
|
push hl
|
||||||
push bc
|
push bc
|
||||||
push af
|
push af
|
||||||
@ -151,14 +151,14 @@ _YesNoBox:: ; 1dd9
|
|||||||
|
|
||||||
.okay
|
.okay
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wcf83], a
|
ld [wMenuBorderLeftCoord], a
|
||||||
add $5
|
add $5
|
||||||
ld [wcf85], a
|
ld [wMenuBorderRightCoord], a
|
||||||
ld a, c
|
ld a, c
|
||||||
ld [wcf82], a
|
ld [wMenuBorderTopCoord], a
|
||||||
add $4
|
add $4
|
||||||
ld [wcf84], a
|
ld [wMenuBorderBottomCoord], a
|
||||||
call Function1c00
|
call BackUpTiles
|
||||||
|
|
||||||
InterpretTwoOptionMenu:: ; 1dfe
|
InterpretTwoOptionMenu:: ; 1dfe
|
||||||
call InterpretMenu2
|
call InterpretMenu2
|
||||||
@ -198,7 +198,7 @@ YesNoMenuData2:: ; 1e25
|
|||||||
|
|
||||||
Function1e2e:: ; 1e2e
|
Function1e2e:: ; 1e2e
|
||||||
call Function1e35
|
call Function1e35
|
||||||
call Function1c00
|
call BackUpTiles
|
||||||
ret
|
ret
|
||||||
; 1e35
|
; 1e35
|
||||||
|
|
||||||
@ -206,24 +206,24 @@ Function1e35:: ; 1e35
|
|||||||
push de
|
push de
|
||||||
call CopyMenuDataHeader
|
call CopyMenuDataHeader
|
||||||
pop de
|
pop de
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, [wcf85]
|
ld a, [wMenuBorderRightCoord]
|
||||||
sub h
|
sub h
|
||||||
ld h, a
|
ld h, a
|
||||||
ld a, d
|
ld a, d
|
||||||
ld [wcf83], a
|
ld [wMenuBorderLeftCoord], a
|
||||||
add h
|
add h
|
||||||
ld [wcf85], a
|
ld [wMenuBorderRightCoord], a
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord]
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, [wcf84]
|
ld a, [wMenuBorderBottomCoord]
|
||||||
sub l
|
sub l
|
||||||
ld l, a
|
ld l, a
|
||||||
ld a, e
|
ld a, e
|
||||||
ld [wcf82], a
|
ld [wMenuBorderTopCoord], a
|
||||||
add l
|
add l
|
||||||
ld [wcf84], a
|
ld [wMenuBorderBottomCoord], a
|
||||||
ret
|
ret
|
||||||
; 1e5d
|
; 1e5d
|
||||||
|
|
||||||
@ -245,14 +245,14 @@ SetUpMenu:: ; 1e70
|
|||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MenuFunc_1e7f:: ; 0x1e7f
|
MenuFunc_1e7f::
|
||||||
call Function1c66
|
call Function1c66
|
||||||
call Function1ebd
|
call Function1ebd
|
||||||
call Function1ea6
|
call Function1ea6
|
||||||
call Function1cbb
|
call Function1cbb
|
||||||
ret
|
ret
|
||||||
|
|
||||||
MenuWriteText:: ; 0x1e8c
|
MenuWriteText::
|
||||||
xor a
|
xor a
|
||||||
ld [hBGMapMode], a
|
ld [hBGMapMode], a
|
||||||
call Function1ebd ; sort out the text
|
call Function1ebd ; sort out the text
|
||||||
@ -269,18 +269,18 @@ MenuWriteText:: ; 0x1e8c
|
|||||||
; 0x1ea6
|
; 0x1ea6
|
||||||
|
|
||||||
Function1ea6:: ; 1ea6
|
Function1ea6:: ; 1ea6
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcf85]
|
ld a, [wMenuBorderRightCoord]
|
||||||
sub c
|
sub c
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcf92]
|
ld a, [wcf92]
|
||||||
add a
|
add a
|
||||||
inc a
|
inc a
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord]
|
||||||
add b
|
add b
|
||||||
ld [wcf84], a
|
ld [wMenuBorderBottomCoord], a
|
||||||
ret
|
ret
|
||||||
; 1ebd
|
; 1ebd
|
||||||
|
|
||||||
@ -410,7 +410,7 @@ Function1f2a:: ; 1f2a
|
|||||||
ld a, [hl]
|
ld a, [hl]
|
||||||
ld [MenuSelection], a
|
ld [MenuSelection], a
|
||||||
ld a, [wcfa9]
|
ld a, [wcfa9]
|
||||||
ld [wcf88], a
|
ld [wPocketPointerLocationBuffer], a
|
||||||
and a
|
and a
|
||||||
ret
|
ret
|
||||||
|
|
||||||
@ -571,7 +571,7 @@ InterpretMenu:: ; 202a
|
|||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld [wcf94], a
|
ld [wcf94], a
|
||||||
callba Function2400e
|
callba Function2400e
|
||||||
ld a, [wcf88]
|
ld a, [wPocketPointerLocationBuffer]
|
||||||
ret
|
ret
|
||||||
; 2039
|
; 2039
|
||||||
|
|
||||||
@ -579,7 +579,7 @@ Function2039:: ; 2039
|
|||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld [wcf94], a
|
ld [wcf94], a
|
||||||
callba Function24022
|
callba Function24022
|
||||||
ld a, [wcf88]
|
ld a, [wPocketPointerLocationBuffer]
|
||||||
ret
|
ret
|
||||||
; 2048
|
; 2048
|
||||||
|
|
||||||
@ -587,7 +587,7 @@ Function2048:: ; 2048
|
|||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
ld [wcf94], a
|
ld [wcf94], a
|
||||||
callba Function2403c
|
callba Function2403c
|
||||||
ld a, [wcf88]
|
ld a, [wPocketPointerLocationBuffer]
|
||||||
ret
|
ret
|
||||||
; 2057
|
; 2057
|
||||||
|
|
||||||
|
@ -74,9 +74,9 @@ Timer:: ; 3e93
|
|||||||
push de
|
push de
|
||||||
push hl
|
push hl
|
||||||
|
|
||||||
ld a, [$ffe9]
|
ld a, [hMobile]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_3ed2
|
jr z, .pop_ret
|
||||||
|
|
||||||
xor a
|
xor a
|
||||||
ld [rTAC], a
|
ld [rTAC], a
|
||||||
@ -88,15 +88,15 @@ Timer:: ; 3e93
|
|||||||
|
|
||||||
ld a, [$c86a]
|
ld a, [$c86a]
|
||||||
or a
|
or a
|
||||||
jr z, .asm_3ed2
|
jr z, .pop_ret
|
||||||
|
|
||||||
ld a, [$c822]
|
ld a, [$c822]
|
||||||
bit 1, a
|
bit 1, a
|
||||||
jr nz, .asm_3eca
|
jr nz, .skip_Function1118de
|
||||||
|
|
||||||
ld a, [rSC]
|
ld a, [rSC]
|
||||||
and 1 << rSC_ON
|
and 1 << rSC_ON
|
||||||
jr nz, .asm_3eca
|
jr nz, .skip_Function1118de
|
||||||
|
|
||||||
ld a, [hROMBank]
|
ld a, [hROMBank]
|
||||||
push af
|
push af
|
||||||
@ -111,14 +111,14 @@ Timer:: ; 3e93
|
|||||||
ld [$c981], a
|
ld [$c981], a
|
||||||
rst Bankswitch
|
rst Bankswitch
|
||||||
|
|
||||||
.asm_3eca
|
.skip_Function1118de
|
||||||
ld a, [rTMA]
|
ld a, [rTMA]
|
||||||
ld [rTIMA], a
|
ld [rTIMA], a
|
||||||
|
|
||||||
ld a, 1 << rTAC_ON | rTAC_65536_HZ
|
ld a, 1 << rTAC_ON | rTAC_65536_HZ
|
||||||
ld [rTAC], a
|
ld [rTAC], a
|
||||||
|
|
||||||
.asm_3ed2
|
.pop_ret
|
||||||
pop hl
|
pop hl
|
||||||
pop de
|
pop de
|
||||||
pop bc
|
pop bc
|
||||||
|
@ -190,33 +190,3 @@ Function1bf7:: ; 1bf7
|
|||||||
ret
|
ret
|
||||||
; 1c00
|
; 1c00
|
||||||
|
|
||||||
Function1c00:: ; 1c00
|
|
||||||
callab Function24374
|
|
||||||
ret
|
|
||||||
; 1c07
|
|
||||||
|
|
||||||
ExitMenu:: ; 0x1c07
|
|
||||||
push af
|
|
||||||
callab Function243e8
|
|
||||||
pop af
|
|
||||||
ret
|
|
||||||
|
|
||||||
Function1c10:: ; 0x1c10
|
|
||||||
callab Function2446d
|
|
||||||
ret
|
|
||||||
|
|
||||||
WriteBackup:: ; 0x1c17
|
|
||||||
push af
|
|
||||||
call ExitMenu
|
|
||||||
call Function321c
|
|
||||||
call UpdateSprites
|
|
||||||
pop af
|
|
||||||
ret
|
|
||||||
|
|
||||||
Function1c23:: ; 0x1c23
|
|
||||||
call GetMemTileCoord
|
|
||||||
call Function1c30
|
|
||||||
call Function1d19
|
|
||||||
call Function1c30
|
|
||||||
ret
|
|
||||||
; 0x1c30
|
|
||||||
|
@ -1,44 +1,79 @@
|
|||||||
Function1c30:: ; 0x1c30
|
BackUpTiles:: ; 1c00
|
||||||
call Function1c53
|
callab _BackUpTiles
|
||||||
|
ret
|
||||||
|
; 1c07
|
||||||
|
|
||||||
|
ExitMenu:: ; 0x1c07
|
||||||
|
push af
|
||||||
|
callab Function243e8
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
|
Function1c10:: ; 0x1c10
|
||||||
|
callab Function2446d
|
||||||
|
ret
|
||||||
|
|
||||||
|
WriteBackup:: ; 0x1c17
|
||||||
|
push af
|
||||||
|
call ExitMenu
|
||||||
|
call Function321c
|
||||||
|
call UpdateSprites
|
||||||
|
pop af
|
||||||
|
ret
|
||||||
|
|
||||||
|
RestoreTileBackup:: ; 0x1c23
|
||||||
|
call GetMemTileCoord
|
||||||
|
call .copy
|
||||||
|
call GetMemAttrCoord
|
||||||
|
call .copy
|
||||||
|
ret
|
||||||
|
; 0x1c30
|
||||||
|
|
||||||
|
.copy: ; 0x1c30
|
||||||
|
call GetMenuBoxDims
|
||||||
inc b
|
inc b
|
||||||
inc c
|
inc c
|
||||||
.asm_1c35
|
|
||||||
|
.row
|
||||||
push bc
|
push bc
|
||||||
push hl
|
push hl
|
||||||
.asm_1c37
|
|
||||||
|
.col
|
||||||
ld a, [de]
|
ld a, [de]
|
||||||
ld [hli], a
|
ld [hli], a
|
||||||
dec de
|
dec de
|
||||||
dec c
|
dec c
|
||||||
jr nz, .asm_1c37 ; 0x1c3b $fa
|
jr nz, .col ; 0x1c3b $fa
|
||||||
|
|
||||||
pop hl
|
pop hl
|
||||||
ld bc, $0014
|
ld bc, SCREEN_WIDTH
|
||||||
add hl, bc
|
add hl, bc
|
||||||
pop bc
|
pop bc
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_1c35 ; 0x1c44 $ef
|
jr nz, .row ; 0x1c44 $ef
|
||||||
|
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1c47:: ; 0x1c47
|
Function1c47:: ; 0x1c47
|
||||||
ld b, $10
|
ld b, $10
|
||||||
ld de, wcf81
|
ld de, wcf81
|
||||||
.asm_1c4c
|
.loop
|
||||||
ld a, [hld]
|
ld a, [hld]
|
||||||
ld [de], a
|
ld [de], a
|
||||||
inc de
|
inc de
|
||||||
dec b
|
dec b
|
||||||
jr nz, .asm_1c4c ; 0x1c50 $fa
|
jr nz, .loop ; 0x1c50 $fa
|
||||||
ret
|
ret
|
||||||
|
|
||||||
Function1c53:: ; 0x1c53
|
GetMenuBoxDims:: ; 0x1c53
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord] ; top
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcf84]
|
ld a, [wMenuBorderBottomCoord] ; bottom
|
||||||
sub b
|
sub b
|
||||||
ld b, a
|
ld b, a
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord] ; left
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcf85]
|
ld a, [wMenuBorderRightCoord] ; right
|
||||||
sub c
|
sub c
|
||||||
ld c, a
|
ld c, a
|
||||||
ret
|
ret
|
||||||
@ -110,17 +145,17 @@ Function1c89:: ; 1c89
|
|||||||
|
|
||||||
Function1cbb:: ; 1cbb
|
Function1cbb:: ; 1cbb
|
||||||
call GetMemTileCoord
|
call GetMemTileCoord
|
||||||
call Function1c53
|
call GetMenuBoxDims
|
||||||
dec b
|
dec b
|
||||||
dec c
|
dec c
|
||||||
jp TextBox
|
jp TextBox
|
||||||
; 1cc6
|
; 1cc6
|
||||||
|
|
||||||
Function1cc6:: ; 1cc6
|
Function1cc6:: ; 1cc6
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord]
|
||||||
ld b, a
|
ld b, a
|
||||||
inc b
|
inc b
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
inc c
|
inc c
|
||||||
ld a, [wcf91]
|
ld a, [wcf91]
|
||||||
@ -142,7 +177,7 @@ Function1ce1:: ; 1ce1
|
|||||||
call GetMemTileCoord
|
call GetMemTileCoord
|
||||||
ld bc, $0015
|
ld bc, $0015
|
||||||
add hl, bc
|
add hl, bc
|
||||||
call Function1c53
|
call GetMenuBoxDims
|
||||||
dec b
|
dec b
|
||||||
dec c
|
dec c
|
||||||
call ClearBox
|
call ClearBox
|
||||||
@ -151,7 +186,7 @@ Function1ce1:: ; 1ce1
|
|||||||
|
|
||||||
Function1cf1:: ; 1cf1
|
Function1cf1:: ; 1cf1
|
||||||
call GetMemTileCoord
|
call GetMemTileCoord
|
||||||
call Function1c53
|
call GetMenuBoxDims
|
||||||
inc c
|
inc c
|
||||||
inc b
|
inc b
|
||||||
call ClearBox
|
call ClearBox
|
||||||
@ -160,9 +195,9 @@ Function1cf1:: ; 1cf1
|
|||||||
|
|
||||||
|
|
||||||
GetMemTileCoord:: ; 1cfd
|
GetMemTileCoord:: ; 1cfd
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord]
|
||||||
ld b, a
|
ld b, a
|
||||||
; 1d05
|
; 1d05
|
||||||
|
|
||||||
@ -191,10 +226,10 @@ endr
|
|||||||
ret
|
ret
|
||||||
; 1d19
|
; 1d19
|
||||||
|
|
||||||
Function1d19:: ; 1d19
|
GetMemAttrCoord:: ; 1d19
|
||||||
ld a, [wcf83]
|
ld a, [wMenuBorderLeftCoord]
|
||||||
ld c, a
|
ld c, a
|
||||||
ld a, [wcf82]
|
ld a, [wMenuBorderTopCoord]
|
||||||
ld b, a
|
ld b, a
|
||||||
|
|
||||||
GetAttrCoord:: ; 1d21
|
GetAttrCoord:: ; 1d21
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
AskTimer:: ; 591
|
AskTimer:: ; 591
|
||||||
push af
|
push af
|
||||||
ld a, [$ffe9]
|
ld a, [hMobile]
|
||||||
and a
|
and a
|
||||||
jr z, .asm_59a
|
jr z, .asm_59a
|
||||||
call Timer
|
call Timer
|
||||||
|
@ -16,12 +16,14 @@ ResetWindow:: ; 2dba
|
|||||||
; 2dcf
|
; 2dcf
|
||||||
|
|
||||||
|
|
||||||
Function2dcf:: ; 2dcf
|
LoadMoveSprites:: ; 2dcf
|
||||||
ld a, [hOAMUpdate]
|
ld a, [hOAMUpdate]
|
||||||
push af
|
push af
|
||||||
ld a, $1
|
ld a, $1
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
|
|
||||||
call Function2de2
|
call Function2de2
|
||||||
|
|
||||||
pop af
|
pop af
|
||||||
ld [hOAMUpdate], a
|
ld [hOAMUpdate], a
|
||||||
ld hl, VramState
|
ld hl, VramState
|
||||||
|
2
hram.asm
@ -20,6 +20,7 @@ hVBlankCounter EQU $ff9b
|
|||||||
hROMBank EQU $ff9d
|
hROMBank EQU $ff9d
|
||||||
hVBlank EQU $ff9e
|
hVBlank EQU $ff9e
|
||||||
hMapEntryMethod EQU $ff9f
|
hMapEntryMethod EQU $ff9f
|
||||||
|
hMenuReturn EQU $ffa0
|
||||||
|
|
||||||
hJoypadReleased EQU $ffa2
|
hJoypadReleased EQU $ffa2
|
||||||
hJoypadPressed EQU $ffa3
|
hJoypadPressed EQU $ffa3
|
||||||
@ -91,3 +92,4 @@ hCGBPalUpdate EQU $ffe5
|
|||||||
hCGB EQU $ffe6
|
hCGB EQU $ffe6
|
||||||
hSGB EQU $ffe7
|
hSGB EQU $ffe7
|
||||||
hDMATransfer EQU $ffe8
|
hDMATransfer EQU $ffe8
|
||||||
|
hMobile EQU $ffe9
|
||||||
|
@ -512,7 +512,7 @@ endr
|
|||||||
cp BATTLETYPE_TUTORIAL
|
cp BATTLETYPE_TUTORIAL
|
||||||
jp z, .asm_ebd9
|
jp z, .asm_ebd9
|
||||||
|
|
||||||
callba Function10607f
|
callba MobileFn_10607f
|
||||||
|
|
||||||
ld hl, UnknownText_0xedc9
|
ld hl, UnknownText_0xedc9
|
||||||
call PrintText
|
call PrintText
|
||||||
@ -550,7 +550,7 @@ endr
|
|||||||
jp z, .asm_ebd1
|
jp z, .asm_ebd1
|
||||||
cp BATTLETYPE_CELEBI
|
cp BATTLETYPE_CELEBI
|
||||||
jr nz, .asm_eac8
|
jr nz, .asm_eac8
|
||||||
ld hl, wd0ee
|
ld hl, wBattleResult
|
||||||
set 6, [hl]
|
set 6, [hl]
|
||||||
.asm_eac8
|
.asm_eac8
|
||||||
|
|
||||||
@ -628,7 +628,7 @@ endr
|
|||||||
ld a, [sBoxCount]
|
ld a, [sBoxCount]
|
||||||
cp MONS_PER_BOX
|
cp MONS_PER_BOX
|
||||||
jr nz, .asm_eb5b
|
jr nz, .asm_eb5b
|
||||||
ld hl, wd0ee
|
ld hl, wBattleResult
|
||||||
set 7, [hl]
|
set 7, [hl]
|
||||||
.asm_eb5b
|
.asm_eb5b
|
||||||
ld a, [CurItem]
|
ld a, [CurItem]
|
||||||
@ -2254,12 +2254,12 @@ Repel: ; f46a
|
|||||||
; f46c
|
; f46c
|
||||||
|
|
||||||
Function_0xf46c: ; f46c
|
Function_0xf46c: ; f46c
|
||||||
ld a, [wdca1]
|
ld a, [wRepelEffect]
|
||||||
and a
|
and a
|
||||||
ld hl, UnknownText_0xf47d
|
ld hl, UnknownText_0xf47d
|
||||||
jp nz, PrintText
|
jp nz, PrintText
|
||||||
ld a, b
|
ld a, b
|
||||||
ld [wdca1], a
|
ld [wRepelEffect], a
|
||||||
jp Functionf789
|
jp Functionf789
|
||||||
; f47d
|
; f47d
|
||||||
|
|
||||||
@ -2285,10 +2285,10 @@ PokeDoll: ; f48f
|
|||||||
jr nz, .asm_f4a6
|
jr nz, .asm_f4a6
|
||||||
inc a
|
inc a
|
||||||
ld [wd232], a
|
ld [wd232], a
|
||||||
ld a, [wd0ee]
|
ld a, [wBattleResult]
|
||||||
and 3 << 6
|
and 3 << 6
|
||||||
or $2
|
or $2
|
||||||
ld [wd0ee], a
|
ld [wBattleResult], a
|
||||||
jp Functionf789
|
jp Functionf789
|
||||||
|
|
||||||
.asm_f4a6
|
.asm_f4a6
|
||||||
|
17
macros.asm
@ -14,6 +14,7 @@ INCLUDE "macros/predef.asm"
|
|||||||
INCLUDE "macros/rst.asm"
|
INCLUDE "macros/rst.asm"
|
||||||
INCLUDE "macros/mobile.asm"
|
INCLUDE "macros/mobile.asm"
|
||||||
INCLUDE "macros/trainer.asm"
|
INCLUDE "macros/trainer.asm"
|
||||||
|
INCLUDE "macros/map_setup.asm"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@ -90,12 +91,16 @@ lb: MACRO ; r, hi, lo
|
|||||||
ld \1, (\2) << 8 + (\3)
|
ld \1, (\2) << 8 + (\3)
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
|
ln: MACRO ; r, hi, lo
|
||||||
|
ld \1, (\2) << 4 + (\3)
|
||||||
|
ENDM
|
||||||
|
|
||||||
bccoord equs "coord bc,"
|
bccoord equs "coord bc,"
|
||||||
decoord equs "coord de,"
|
decoord equs "coord de,"
|
||||||
hlcoord equs "coord hl,"
|
hlcoord equs "coord hl,"
|
||||||
|
|
||||||
coord: MACRO
|
coord: MACRO
|
||||||
|
; register, x, y[, origin]
|
||||||
if _NARG < 4
|
if _NARG < 4
|
||||||
ld \1, TileMap + SCREEN_WIDTH * (\3) + (\2)
|
ld \1, TileMap + SCREEN_WIDTH * (\3) + (\2)
|
||||||
else
|
else
|
||||||
@ -165,16 +170,4 @@ bcd: MACRO
|
|||||||
endr
|
endr
|
||||||
ENDM
|
ENDM
|
||||||
|
|
||||||
ln: MACRO
|
|
||||||
if _NARG == 5
|
|
||||||
lb \1, \2 << 4 + \3, \4 << 4 + \5
|
|
||||||
else
|
|
||||||
if _NARG == 3
|
|
||||||
ld \1, \2 << 4 + \3
|
|
||||||
else
|
|
||||||
fail "incorrect number of arguments for ln"
|
|
||||||
endc
|
|
||||||
endc
|
|
||||||
ENDM
|
|
||||||
|
|
||||||
tile EQUS "+ $10 *"
|
tile EQUS "+ $10 *"
|
||||||
|
@ -18,8 +18,8 @@ ENDM
|
|||||||
|
|
||||||
person_event: macro
|
person_event: macro
|
||||||
db \1 ; sprite
|
db \1 ; sprite
|
||||||
db \2 ; y
|
db \2 + 4 ; y
|
||||||
db \3 ; x
|
db \3 + 4 ; x
|
||||||
db \4 ; movement function
|
db \4 ; movement function
|
||||||
dn \5, \6 ; radius: y, x
|
dn \5, \6 ; radius: y, x
|
||||||
db \7 ; clock_hour
|
db \7 ; clock_hour
|
||||||
|
236
macros/map_setup.asm
Normal file
@ -0,0 +1,236 @@
|
|||||||
|
; Command descriptions from Condensation water's scripting compendium. enum_start
|
||||||
|
enum_start
|
||||||
|
|
||||||
|
enum map_lcd_on_command
|
||||||
|
map_lcd_on: MACRO ; 00 = Turn LCD on
|
||||||
|
db map_lcd_on_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_lcd_off_command
|
||||||
|
map_lcd_off: MACRO ; 01 = Turn LCD off
|
||||||
|
db map_lcd_off_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_sound_off_command
|
||||||
|
map_sound_off: MACRO ; 02 = Turn speakers off
|
||||||
|
db map_sound_off_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_music_command
|
||||||
|
map_music: MACRO ; 03 = Music check for current map/ special check for bug catcher contest
|
||||||
|
db map_music_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_start_music_command
|
||||||
|
map_start_music: MACRO ; 04 = Start map music anew
|
||||||
|
db map_start_music_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_fade_music_command
|
||||||
|
map_fade_music: MACRO ; 05 = Music check for current map / special check for Bug Contest/ music with FadeOut (old) and FadeIn
|
||||||
|
db map_fade_music_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_fade_command
|
||||||
|
map_fade: MACRO ; 06 = Fade out music + screen
|
||||||
|
db map_fade_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_bike_music_command
|
||||||
|
map_bike_music: MACRO ; 07 = If HIRO is on bike = bike music, else play map music
|
||||||
|
db map_bike_music_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_music_force_command
|
||||||
|
map_music_force: MACRO ; 08 = Play map music
|
||||||
|
db map_music_force_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_max_volume_command
|
||||||
|
map_max_volume: MACRO ; 09 = Turn music to highest volume
|
||||||
|
db map_max_volume_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_blocks_command
|
||||||
|
map_load_blocks: MACRO ; 0A = Write map data to MapRAM
|
||||||
|
db map_load_blocks_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_connection_blocks_command
|
||||||
|
map_connection_blocks: MACRO ; 0B = Compute map’s connection pars and write into MapRAM
|
||||||
|
db map_connection_blocks_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_save_screen_command
|
||||||
|
map_save_screen: MACRO ; 0C = Write current part of map into temporary memory
|
||||||
|
db map_save_screen_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_buffer_screen_command
|
||||||
|
map_buffer_screen: MACRO ; 0D = Write current part of map into read-from memory
|
||||||
|
db map_buffer_screen_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_graphics_command
|
||||||
|
map_load_graphics: MACRO ; 0E = Write tileset header to ram/ load tileset/ load sprite tiles/ load special tiles
|
||||||
|
db map_load_graphics_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_tileset_header_command
|
||||||
|
map_load_tileset_header: MACRO ; 0F = Write tileset header to ram
|
||||||
|
db map_load_tileset_header_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_time_of_day_command
|
||||||
|
map_time_of_day: MACRO ; 10 = Compute time of day/ Update screen
|
||||||
|
db map_time_of_day_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_palettes_command
|
||||||
|
map_palettes: MACRO ; 11 = Load map palettes
|
||||||
|
db map_palettes_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_wildmons_command
|
||||||
|
map_wildmons: MACRO ; 12 = Load probabilities for wild Pokémon battles
|
||||||
|
db map_wildmons_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_sprites_command
|
||||||
|
map_sprites: MACRO ; 13 = Delete sprite data and draw new sprites
|
||||||
|
db map_sprites_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_change_callback_command
|
||||||
|
map_change_callback: MACRO ; 14 = Check 2nd script header for 05 and 03 callbacks
|
||||||
|
db map_change_callback_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_start_callback_command
|
||||||
|
map_start_callback: MACRO ; 15 = Check 2nd script header for 03 callbacks
|
||||||
|
db map_start_callback_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_objects_command
|
||||||
|
map_load_objects: MACRO ; 16 = Analyze people data anew and check 2nd script header for 02 callbacks
|
||||||
|
db map_load_objects_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_spawn_command
|
||||||
|
map_load_spawn: MACRO ; 17 = Writes arrival data for arrival by flying/Blackout from table 05:5319 to ram
|
||||||
|
db map_load_spawn_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_connection_command
|
||||||
|
map_load_connection: MACRO ; 18 = Writes arrival data for entering a map by connection to ram
|
||||||
|
db map_load_connection_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_load_warp_command
|
||||||
|
map_load_warp: MACRO ; 19 = Write warp data to ram when entering warp
|
||||||
|
db map_load_warp_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_attributes_command
|
||||||
|
map_attributes: MACRO ; 1A = Load complete map data (primary, secondary, event, script headers)
|
||||||
|
db map_attributes_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_attributes_2_command
|
||||||
|
map_attributes_2: MACRO ; 1B = Same as 1A, but some settings aren’t loaded new from the rom, such as hide function of the people events
|
||||||
|
db map_attributes_2_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_clear_bg_palettes_command
|
||||||
|
map_clear_bg_palettes: MACRO ; 1C = Fill palette data with FFFF (=white)
|
||||||
|
db map_clear_bg_palettes_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_fade_out_palettes_command
|
||||||
|
map_fade_out_palettes: MACRO ; 1D = All BG pallet color are converted to 0|0 (Pal0, Col0), all sprite colors to x|0 (FadeOut)
|
||||||
|
db map_fade_out_palettes_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_fade_in_palettes_command
|
||||||
|
map_fade_in_palettes: MACRO ; 1E = Palette FadeIn
|
||||||
|
db map_fade_in_palettes_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_anchor_screen_command
|
||||||
|
map_anchor_screen: MACRO ; 1F = Compute position of upper left-most block visible on screen
|
||||||
|
db map_anchor_screen_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_warp_face_command
|
||||||
|
map_warp_face: MACRO ; 20 = Position computation when HIRO leaves a warp
|
||||||
|
db map_warp_face_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_face_down_command
|
||||||
|
map_face_down: MACRO ; 21 = Set HIRO’s facing to “down”
|
||||||
|
db map_face_down_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_spawn_coord_command
|
||||||
|
map_spawn_coord: MACRO ; 22 = Prepare HIRO data for arrival by flight
|
||||||
|
db map_spawn_coord_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_player_coord_command
|
||||||
|
map_player_coord: MACRO ; 23 = Compute HIRO x/y data anew
|
||||||
|
db map_player_coord_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_prolong_sprites_command
|
||||||
|
map_prolong_sprites: MACRO ; 24 = Prolong old sprites before removing them
|
||||||
|
db map_prolong_sprites_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_delay_sprites_command
|
||||||
|
map_delay_sprites: MACRO ; 25 = Delay rendering new sprites
|
||||||
|
db map_delay_sprites_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_update_roam_command
|
||||||
|
map_update_roam: MACRO ; 26 = Compute chances to meet Raikou, Entei or Suicune
|
||||||
|
db map_update_roam_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_keep_roam_command
|
||||||
|
map_keep_roam: MACRO ; 27 = Recover chances to meet Raikou, Entei or Suicune
|
||||||
|
db map_keep_roam_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_fade_out_music_command
|
||||||
|
map_fade_out_music: MACRO ; 28 = Temporarily stop music playing
|
||||||
|
db map_fade_out_music_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_animations_on_command
|
||||||
|
map_animations_on: MACRO ; 29 = Activate animations
|
||||||
|
db map_animations_on_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_animations_off_command
|
||||||
|
map_animations_off: MACRO ; 2A = Deactivate animations
|
||||||
|
db map_animations_off_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_keep_palettes_command
|
||||||
|
map_keep_palettes: MACRO ; 2B = Recover all palettes
|
||||||
|
db map_keep_palettes_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_text_scroll_off_command
|
||||||
|
map_text_scroll_off: MACRO ; 2C = Turn off text scroll (for town name overlays)
|
||||||
|
db map_text_scroll_off_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
enum map_stop_script_command
|
||||||
|
map_stop_script: MACRO ; 2D = Deactivate code prolonging
|
||||||
|
db map_stop_script_command
|
||||||
|
ENDM
|
||||||
|
|
||||||
|
map_end_setup_script: MACRO
|
||||||
|
db -1
|
||||||
|
ENDM
|
@ -371,10 +371,10 @@ AzaleaGym_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 7
|
db 7
|
||||||
person_event SPRITE_BUGSY, 7 + 4, 5 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, BugsyScript_0x18ec1e, -1
|
person_event SPRITE_BUGSY, 7, 5, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, BugsyScript_0x18ec1e, -1
|
||||||
person_event SPRITE_BUG_CATCHER, 3 + 4, 5 + 4, $a, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 2, 2, TrainerBug_catcherBug_catcher_benny, -1
|
person_event SPRITE_BUG_CATCHER, 3, 5, $a, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 2, 2, TrainerBug_catcherBug_catcher_benny, -1
|
||||||
person_event SPRITE_BUG_CATCHER, 8 + 4, 8 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 2, 3, TrainerBug_catcherAl, -1
|
person_event SPRITE_BUG_CATCHER, 8, 8, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 2, 3, TrainerBug_catcherAl, -1
|
||||||
person_event SPRITE_BUG_CATCHER, 2 + 4, 0 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 2, 3, TrainerBug_catcherJosh, -1
|
person_event SPRITE_BUG_CATCHER, 2, 0, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 2, 3, TrainerBug_catcherJosh, -1
|
||||||
person_event SPRITE_TWIN, 10 + 4, 4 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsAmyandmay1, -1
|
person_event SPRITE_TWIN, 10, 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsAmyandmay1, -1
|
||||||
person_event SPRITE_TWIN, 10 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsAmyandmay2, -1
|
person_event SPRITE_TWIN, 10, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsAmyandmay2, -1
|
||||||
person_event SPRITE_GYM_GUY, 13 + 4, 7 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, AzaleaGymGuyScript, -1
|
person_event SPRITE_GYM_GUY, 13, 7, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, AzaleaGymGuyScript, -1
|
||||||
|
@ -57,6 +57,6 @@ AzaleaMart_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_CLERK, 3 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x18e040, -1
|
person_event SPRITE_CLERK, 3, 1, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x18e040, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 5 + 4, 2 + 4, $7, 0, 0, -1, -1, 0, 0, 0, CooltrainerMScript_0x18e047, -1
|
person_event SPRITE_COOLTRAINER_M, 5, 2, $7, 0, 0, -1, -1, 0, 0, 0, CooltrainerMScript_0x18e047, -1
|
||||||
person_event SPRITE_BUG_CATCHER, 2 + 4, 7 + 4, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, BugCatcherScript_0x18e04a, -1
|
person_event SPRITE_BUG_CATCHER, 2, 7, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, BugCatcherScript_0x18e04a, -1
|
||||||
|
@ -90,7 +90,7 @@ AzaleaPokeCenter1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_NURSE, 1 + 4, 3 + 4, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x18db28, -1
|
person_event SPRITE_NURSE, 1, 3, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x18db28, -1
|
||||||
person_event SPRITE_GENTLEMAN, 6 + 4, 9 + 4, $4, 1, 0, -1, -1, 0, 0, 0, GentlemanScript_0x18db2b, -1
|
person_event SPRITE_GENTLEMAN, 6, 9, $4, 1, 0, -1, -1, 0, 0, 0, GentlemanScript_0x18db2b, -1
|
||||||
person_event SPRITE_FISHING_GURU, 1 + 4, 6 + 4, $6, 0, 0, -1, -1, 0, 0, 0, FishingGuruScript_0x18db2e, -1
|
person_event SPRITE_FISHING_GURU, 1, 6, $6, 0, 0, -1, -1, 0, 0, 0, FishingGuruScript_0x18db2e, -1
|
||||||
person_event SPRITE_POKEFAN_F, 4 + 4, 1 + 4, $2, 2, 1, -1, -1, 0, 0, 0, PokefanFScript_0x18db31, -1
|
person_event SPRITE_POKEFAN_F, 4, 1, $2, 2, 1, -1, -1, 0, 0, 0, PokefanFScript_0x18db31, -1
|
||||||
|
@ -481,15 +481,15 @@ AzaleaTown_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 12
|
db 12
|
||||||
person_event SPRITE_AZALEA_ROCKET, 9 + 4, 31 + 4, $6, 0, 0, -1, -1, 0, 0, 0, AzaleaRocketScript_0x1980ab, EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
|
person_event SPRITE_AZALEA_ROCKET, 9, 31, $6, 0, 0, -1, -1, 0, 0, 0, AzaleaRocketScript_0x1980ab, EVENT_AZALEA_TOWN_SLOWPOKETAIL_ROCKET
|
||||||
person_event SPRITE_GRAMPS, 9 + 4, 21 + 4, $2, 2, 1, -1, -1, 0, 0, 0, GrampsScript_0x1980b1, -1
|
person_event SPRITE_GRAMPS, 9, 21, $2, 2, 1, -1, -1, 0, 0, 0, GrampsScript_0x1980b1, -1
|
||||||
person_event SPRITE_TEACHER, 13 + 4, 15 + 4, $4, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, TeacherScript_0x1980c5, -1
|
person_event SPRITE_TEACHER, 13, 15, $4, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, TeacherScript_0x1980c5, -1
|
||||||
person_event SPRITE_YOUNGSTER, 9 + 4, 7 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x1980c8, -1
|
person_event SPRITE_YOUNGSTER, 9, 7, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x1980c8, -1
|
||||||
person_event SPRITE_SLOWPOKE, 17 + 4, 8 + 4, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
person_event SPRITE_SLOWPOKE, 17, 8, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
||||||
person_event SPRITE_SLOWPOKE, 9 + 4, 18 + 4, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
person_event SPRITE_SLOWPOKE, 9, 18, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
||||||
person_event SPRITE_SLOWPOKE, 9 + 4, 29 + 4, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
person_event SPRITE_SLOWPOKE, 9, 29, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
||||||
person_event SPRITE_SLOWPOKE, 15 + 4, 15 + 4, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
person_event SPRITE_SLOWPOKE, 15, 15, $1, 0, 0, -1, -1, 0, 0, 0, SlowpokeScript_0x1980cb, EVENT_AZALEA_TOWN_SLOWPOKES
|
||||||
person_event SPRITE_FRUIT_TREE, 2 + 4, 8 + 4, $1, 0, 0, -1, -1, 0, 0, 0, WhiteApricornTree, -1
|
person_event SPRITE_FRUIT_TREE, 2, 8, $1, 0, 0, -1, -1, 0, 0, 0, WhiteApricornTree, -1
|
||||||
person_event SPRITE_AZALEA_ROCKET, 10 + 4, 11 + 4, $8, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_RIVAL_AZALEA_TOWN
|
person_event SPRITE_AZALEA_ROCKET, 10, 11, $8, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_RIVAL_AZALEA_TOWN
|
||||||
person_event SPRITE_AZALEA_ROCKET, 16 + 4, 10 + 4, $6, 0, 0, -1, -1, 0, 0, 0, AzaleaRocketScript_0x1980ae, EVENT_SLOWPOKE_WELL_ROCKETS
|
person_event SPRITE_AZALEA_ROCKET, 16, 10, $6, 0, 0, -1, -1, 0, 0, 0, AzaleaRocketScript_0x1980ae, EVENT_SLOWPOKE_WELL_ROCKETS
|
||||||
person_event SPRITE_KURT_OUTSIDE, 5 + 4, 6 + 4, $8, 0, 0, -1, -1, 0, 0, 0, KurtOutsideScript_0x19810c, EVENT_AZALEA_TOWN_KURT
|
person_event SPRITE_KURT_OUTSIDE, 5, 6, $8, 0, 0, -1, -1, 0, 0, 0, KurtOutsideScript_0x19810c, EVENT_AZALEA_TOWN_KURT
|
||||||
|
@ -810,8 +810,8 @@ BattleTower1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_RECEPTIONIST, 6 + 4, 7 + 4, $6, 0, 0, -1, -1, 0, 0, 0, ReceptionistScript_0x9e3e2, -1
|
person_event SPRITE_RECEPTIONIST, 6, 7, $6, 0, 0, -1, -1, 0, 0, 0, ReceptionistScript_0x9e3e2, -1
|
||||||
person_event SPRITE_YOUNGSTER, 9 + 4, 14 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, YoungsterScript_0x9e55d, -1
|
person_event SPRITE_YOUNGSTER, 9, 14, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, YoungsterScript_0x9e55d, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 9 + 4, 4 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerFScript_0x9e568, -1
|
person_event SPRITE_COOLTRAINER_F, 9, 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerFScript_0x9e568, -1
|
||||||
person_event SPRITE_BUG_CATCHER, 3 + 4, 1 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, BugCatcherScript_0x9e56b, -1
|
person_event SPRITE_BUG_CATCHER, 3, 1, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, BugCatcherScript_0x9e56b, -1
|
||||||
person_event SPRITE_GRANNY, 3 + 4, 14 + 4, $4, 1, 0, -1, -1, 0, 0, 0, GrannyScript_0x9e56e, -1
|
person_event SPRITE_GRANNY, 3, 14, $4, 1, 0, -1, -1, 0, 0, 0, GrannyScript_0x9e56e, -1
|
||||||
|
@ -155,5 +155,5 @@ BattleTowerBattleRoom_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 2
|
db 2
|
||||||
person_event SPRITE_YOUNGSTER, 0 + 4, 4 + 4, $6, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
|
person_event SPRITE_YOUNGSTER, 0, 4, $6, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_BATTLE_TOWER_BATTLE_ROOM_YOUNGSTER
|
||||||
person_event SPRITE_RECEPTIONIST, 6 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, -1
|
person_event SPRITE_RECEPTIONIST, 6, 1, $9, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, -1
|
||||||
|
@ -60,4 +60,4 @@ BattleTowerElevator_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_RECEPTIONIST, 2 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, MovementData_0x9f58f, -1
|
person_event SPRITE_RECEPTIONIST, 2, 1, $9, 0, 0, -1, -1, 0, 0, 0, MovementData_0x9f58f, -1
|
||||||
|
@ -98,4 +98,4 @@ BattleTowerHallway_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_RECEPTIONIST, 2 + 4, 11 + 4, $6, 0, 0, -1, -1, 0, 0, 0, BattleTowerHallway_MapEventHeader, -1
|
person_event SPRITE_RECEPTIONIST, 2, 11, $6, 0, 0, -1, -1, 0, 0, 0, BattleTowerHallway_MapEventHeader, -1
|
||||||
|
@ -142,7 +142,7 @@ BattleTowerOutside_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_STANDING_YOUNGSTER, 12 + 4, 6 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, StandingYoungsterScript_0x9f85f, -1
|
person_event SPRITE_STANDING_YOUNGSTER, 12, 6, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, StandingYoungsterScript_0x9f85f, -1
|
||||||
person_event SPRITE_BUENA, 11 + 4, 13 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, BuenaScript_0x9f862, -1
|
person_event SPRITE_BUENA, 11, 13, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, BuenaScript_0x9f862, -1
|
||||||
person_event SPRITE_SAILOR, 18 + 4, 12 + 4, $5, 0, 1, -1, -1, 0, 0, 0, SailorScript_0x9f865, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
|
person_event SPRITE_SAILOR, 18, 12, $5, 0, 1, -1, -1, 0, 0, 0, SailorScript_0x9f865, EVENT_BATTLE_TOWER_OUTSIDE_SAILOR
|
||||||
person_event SPRITE_LASS, 24 + 4, 12 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ObjectEvent, -1
|
person_event SPRITE_LASS, 24, 12, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ObjectEvent, -1
|
||||||
|
@ -367,4 +367,4 @@ BillsHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_GRAMPS, 3 + 4, 2 + 4, $7, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GrampsScript_0x189538, -1
|
person_event SPRITE_GRAMPS, 3, 2, $7, 2, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GrampsScript_0x189538, -1
|
||||||
|
@ -333,12 +333,12 @@ BlackthornCity_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 9
|
db 9
|
||||||
person_event SPRITE_SUPER_NERD, 12 + 4, 18 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, SuperNerdScript_0x1a46e8, EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM
|
person_event SPRITE_SUPER_NERD, 12, 18, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, SuperNerdScript_0x1a46e8, EVENT_BLACKTHORN_CITY_SUPER_NERD_BLOCKS_GYM
|
||||||
person_event SPRITE_SUPER_NERD, 12 + 4, 19 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, SuperNerdScript_0x1a46e8, EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
|
person_event SPRITE_SUPER_NERD, 12, 19, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, SuperNerdScript_0x1a46e8, EVENT_BLACKTHORN_CITY_SUPER_NERD_DOES_NOT_BLOCK_GYM
|
||||||
person_event SPRITE_GRAMPS, 2 + 4, 20 + 4, $6, 0, 0, -1, -1, 0, 0, 0, GrampsScript_0x1a4708, EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN
|
person_event SPRITE_GRAMPS, 2, 20, $6, 0, 0, -1, -1, 0, 0, 0, GrampsScript_0x1a4708, EVENT_BLACKTHORN_CITY_GRAMPS_BLOCKS_DRAGONS_DEN
|
||||||
person_event SPRITE_GRAMPS, 2 + 4, 21 + 4, $8, 0, 0, -1, -1, 0, 0, 0, GrampsScript_0x1a470b, EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN
|
person_event SPRITE_GRAMPS, 2, 21, $8, 0, 0, -1, -1, 0, 0, 0, GrampsScript_0x1a470b, EVENT_BLACKTHORN_CITY_GRAMPS_NOT_BLOCKING_DRAGONS_DEN
|
||||||
person_event SPRITE_BLACK_BELT, 31 + 4, 24 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, BlackBeltScript_0x1a470e, -1
|
person_event SPRITE_BLACK_BELT, 31, 24, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, BlackBeltScript_0x1a470e, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 25 + 4, 9 + 4, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerFScript_0x1a4722, -1
|
person_event SPRITE_COOLTRAINER_F, 25, 9, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerFScript_0x1a4722, -1
|
||||||
person_event SPRITE_YOUNGSTER, 15 + 4, 13 + 4, $5, 0, 1, -1, -1, 0, 0, 0, YoungsterScript_0x1a4725, -1
|
person_event SPRITE_YOUNGSTER, 15, 13, $5, 0, 1, -1, -1, 0, 0, 0, YoungsterScript_0x1a4725, -1
|
||||||
person_event SPRITE_YOUNGSTER, 20 + 4, 22 + 4, $6, 0, 0, -1, -1, 0, 0, 0, SantosScript, EVENT_BLACKTHORN_CITY_SANTOS_OF_SATURDAY
|
person_event SPRITE_YOUNGSTER, 20, 22, $6, 0, 0, -1, -1, 0, 0, 0, SantosScript, EVENT_BLACKTHORN_CITY_SANTOS_OF_SATURDAY
|
||||||
person_event SPRITE_COOLTRAINER_F, 19 + 4, 35 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerFScript_0x1a4728, -1
|
person_event SPRITE_COOLTRAINER_F, 19, 35, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerFScript_0x1a4728, -1
|
||||||
|
@ -35,4 +35,4 @@ BlackthornDodrioTradeHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_LASS, 3 + 4, 2 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, Emy, -1
|
person_event SPRITE_LASS, 3, 2, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, Emy, -1
|
||||||
|
@ -58,5 +58,5 @@ BlackthornDragonSpeechHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 2
|
db 2
|
||||||
person_event SPRITE_GRANNY, 3 + 4, 2 + 4, $3, 0, 0, -1, -1, 0, 0, 0, GrannyScript_0x195949, -1
|
person_event SPRITE_GRANNY, 3, 2, $3, 0, 0, -1, -1, 0, 0, 0, GrannyScript_0x195949, -1
|
||||||
person_event SPRITE_EKANS, 5 + 4, 5 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, EkansScript_0x19594c, -1
|
person_event SPRITE_EKANS, 5, 5, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, EkansScript_0x19594c, -1
|
||||||
|
@ -404,8 +404,8 @@ BlackthornGym1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_CLAIR, 3 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClairScript_0x194e24, -1
|
person_event SPRITE_CLAIR, 3, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClairScript_0x194e24, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 6 + 4, 6 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 3, TrainerCooltrainermMike, -1
|
person_event SPRITE_COOLTRAINER_M, 6, 6, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 3, TrainerCooltrainermMike, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 14 + 4, 1 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 3, TrainerCooltrainermPaul, -1
|
person_event SPRITE_COOLTRAINER_M, 14, 1, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 3, TrainerCooltrainermPaul, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 2 + 4, 9 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerCooltrainerfLola, -1
|
person_event SPRITE_COOLTRAINER_F, 2, 9, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerCooltrainerfLola, -1
|
||||||
person_event SPRITE_GYM_GUY, 15 + 4, 7 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, BlackthornGymGuyScript, -1
|
person_event SPRITE_GYM_GUY, 15, 7, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, BlackthornGymGuyScript, -1
|
||||||
|
@ -145,11 +145,11 @@ BlackthornGym2F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 8
|
db 8
|
||||||
person_event SPRITE_COOLTRAINER_M, 1 + 4, 4 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerCooltrainermCody, -1
|
person_event SPRITE_COOLTRAINER_M, 1, 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerCooltrainermCody, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 11 + 4, 4 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerCooltrainerfFran, -1
|
person_event SPRITE_COOLTRAINER_F, 11, 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerCooltrainerfFran, -1
|
||||||
person_event SPRITE_BOULDER, 2 + 4, 8 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_1
|
person_event SPRITE_BOULDER, 2, 8, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_1
|
||||||
person_event SPRITE_BOULDER, 3 + 4, 2 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_2
|
person_event SPRITE_BOULDER, 3, 2, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_2
|
||||||
person_event SPRITE_BOULDER, 16 + 4, 6 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_3
|
person_event SPRITE_BOULDER, 16, 6, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, EVENT_BOULDER_IN_BLACKTHORN_GYM_3
|
||||||
person_event SPRITE_BOULDER, 3 + 4, 3 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, -1
|
person_event SPRITE_BOULDER, 3, 3, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, -1
|
||||||
person_event SPRITE_BOULDER, 1 + 4, 6 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, -1
|
person_event SPRITE_BOULDER, 1, 6, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, -1
|
||||||
person_event SPRITE_BOULDER, 14 + 4, 8 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, -1
|
person_event SPRITE_BOULDER, 14, 8, $19, 0, 0, -1, -1, 0, 0, 0, BlackthornGymBoulder, -1
|
||||||
|
@ -58,6 +58,6 @@ BlackthornMart_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_CLERK, 3 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x195a5d, -1
|
person_event SPRITE_CLERK, 3, 1, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x195a5d, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 6 + 4, 7 + 4, $5, 0, 2, -1, -1, 0, 0, 0, CooltrainerMScript_0x195a64, -1
|
person_event SPRITE_COOLTRAINER_M, 6, 7, $5, 0, 2, -1, -1, 0, 0, 0, CooltrainerMScript_0x195a64, -1
|
||||||
person_event SPRITE_BLACK_BELT, 2 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, BlackBeltScript_0x195a67, -1
|
person_event SPRITE_BLACK_BELT, 2, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, BlackBeltScript_0x195a67, -1
|
||||||
|
@ -61,7 +61,7 @@ BlackthornPokeCenter1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_NURSE, 1 + 4, 3 + 4, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x195b79, -1
|
person_event SPRITE_NURSE, 1, 3, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x195b79, -1
|
||||||
person_event SPRITE_GENTLEMAN, 3 + 4, 5 + 4, $6, 0, 0, -1, -1, 0, 0, 0, GentlemanScript_0x195b7c, -1
|
person_event SPRITE_GENTLEMAN, 3, 5, $6, 0, 0, -1, -1, 0, 0, 0, GentlemanScript_0x195b7c, -1
|
||||||
person_event SPRITE_TWIN, 4 + 4, 1 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TwinScript_0x195b7f, -1
|
person_event SPRITE_TWIN, 4, 1, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TwinScript_0x195b7f, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 6 + 4, 7 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerMScript_0x195b82, -1
|
person_event SPRITE_COOLTRAINER_M, 6, 7, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerMScript_0x195b82, -1
|
||||||
|
@ -158,4 +158,4 @@ BluesHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_DAISY, 3 + 4, 2 + 4, $3, 0, 0, -1, -1, 0, 0, 0, DaisyScript_0x19b0d0, -1
|
person_event SPRITE_DAISY, 3, 2, $3, 0, 0, -1, -1, 0, 0, 0, DaisyScript_0x19b0d0, -1
|
||||||
|
@ -145,4 +145,4 @@ BrunosRoom_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_BRUNO, 7 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, BrunoScript_0x1809c5, -1
|
person_event SPRITE_BRUNO, 7, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, BrunoScript_0x1809c5, -1
|
||||||
|
@ -309,8 +309,8 @@ BurnedTower1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_ROCK, 4 + 4, 15 + 4, $18, 0, 0, -1, -1, 0, 0, 0, BurnedTower1FRock, -1
|
person_event SPRITE_ROCK, 4, 15, $18, 0, 0, -1, -1, 0, 0, 0, BurnedTower1FRock, -1
|
||||||
person_event SPRITE_SUPER_NERD, 12 + 4, 12 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x185cbc, EVENT_BURNED_TOWER_1F_EUSINE
|
person_event SPRITE_SUPER_NERD, 12, 12, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x185cbc, EVENT_BURNED_TOWER_1F_EUSINE
|
||||||
person_event SPRITE_SILVER, 9 + 4, 8 + 4, $8, 0, 0, -1, -1, 0, 2, 3, ObjectEvent, EVENT_RIVAL_BURNED_TOWER
|
person_event SPRITE_SILVER, 9, 8, $8, 0, 0, -1, -1, 0, 2, 3, ObjectEvent, EVENT_RIVAL_BURNED_TOWER
|
||||||
person_event SPRITE_MORTY, 14 + 4, 14 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, MortyScript_0x185cbf, EVENT_BURNED_TOWER_MORTY
|
person_event SPRITE_MORTY, 14, 14, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, MortyScript_0x185cbf, EVENT_BURNED_TOWER_MORTY
|
||||||
person_event SPRITE_POKE_BALL, 2 + 4, 14 + 4, $1, 0, 0, -1, -1, 0, 1, 0, ItemFragment_0x185ccb, EVENT_BURNED_TOWER_1F_HP_UP
|
person_event SPRITE_POKE_BALL, 2, 14, $1, 0, 0, -1, -1, 0, 1, 0, ItemFragment_0x185ccb, EVENT_BURNED_TOWER_1F_HP_UP
|
||||||
|
@ -251,12 +251,12 @@ BurnedTowerB1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 9
|
db 9
|
||||||
person_event SPRITE_BOULDER, 8 + 4, 17 + 4, $19, 0, 0, -1, -1, 0, 0, 0, BurnedTowerB1FBoulder, -1
|
person_event SPRITE_BOULDER, 8, 17, $19, 0, 0, -1, -1, 0, 0, 0, BurnedTowerB1FBoulder, -1
|
||||||
person_event SPRITE_RAIKOU, 3 + 4, 7 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
|
person_event SPRITE_RAIKOU, 3, 7, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
|
||||||
person_event SPRITE_ENTEI, 3 + 4, 12 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
|
person_event SPRITE_ENTEI, 3, 12, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
|
||||||
person_event SPRITE_SUICUNE, 4 + 4, 10 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
|
person_event SPRITE_SUICUNE, 4, 10, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_1
|
||||||
person_event SPRITE_RAIKOU, 3 + 4, 7 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
|
person_event SPRITE_RAIKOU, 3, 7, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
|
||||||
person_event SPRITE_ENTEI, 3 + 4, 12 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
|
person_event SPRITE_ENTEI, 3, 12, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
|
||||||
person_event SPRITE_SUICUNE, 4 + 4, 10 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
|
person_event SPRITE_SUICUNE, 4, 10, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_SILVER, 0, 0, ObjectEvent, EVENT_BURNED_TOWER_B1F_BEASTS_2
|
||||||
person_event SPRITE_POKE_BALL, 4 + 4, 16 + 4, $1, 0, 0, -1, -1, 0, 1, 0, ItemFragment_0x186231, EVENT_BURNED_TOWER_B1F_TM_ENDURE
|
person_event SPRITE_POKE_BALL, 4, 16, $1, 0, 0, -1, -1, 0, 1, 0, ItemFragment_0x186231, EVENT_BURNED_TOWER_B1F_TM_ENDURE
|
||||||
person_event SPRITE_SUPER_NERD, 12 + 4, 10 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x186212, EVENT_EUSINE_IN_BURNED_TOWER
|
person_event SPRITE_SUPER_NERD, 12, 10, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x186212, EVENT_EUSINE_IN_BURNED_TOWER
|
||||||
|
@ -219,8 +219,8 @@ CeladonCafe_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_SUPER_NERD, 3 + 4, 9 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, SuperNerdScript_0x73049, -1
|
person_event SPRITE_SUPER_NERD, 3, 9, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, SuperNerdScript_0x73049, -1
|
||||||
person_event SPRITE_FISHER, 6 + 4, 4 + 4, $8, 0, 0, -1, -1, 0, 0, 0, FisherScript_0x73051, -1
|
person_event SPRITE_FISHER, 6, 4, $8, 0, 0, -1, -1, 0, 0, 0, FisherScript_0x73051, -1
|
||||||
person_event SPRITE_FISHER, 7 + 4, 1 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FisherScript_0x73062, -1
|
person_event SPRITE_FISHER, 7, 1, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FisherScript_0x73062, -1
|
||||||
person_event SPRITE_FISHER, 2 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, FisherScript_0x73073, -1
|
person_event SPRITE_FISHER, 2, 1, $9, 0, 0, -1, -1, 0, 0, 0, FisherScript_0x73073, -1
|
||||||
person_event SPRITE_TEACHER, 3 + 4, 4 + 4, $8, 0, 0, -1, -1, 0, 0, 0, TeacherScript_0x73084, -1
|
person_event SPRITE_TEACHER, 3, 4, $8, 0, 0, -1, -1, 0, 0, 0, TeacherScript_0x73084, -1
|
||||||
|
@ -257,12 +257,12 @@ CeladonCity_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 9
|
db 9
|
||||||
person_event SPRITE_FISHER, 11 + 4, 26 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FisherScript_0x1a9f43, -1
|
person_event SPRITE_FISHER, 11, 26, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FisherScript_0x1a9f43, -1
|
||||||
person_event SPRITE_POLIWAG, 11 + 4, 27 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CeladonCityPoliwrath, -1
|
person_event SPRITE_POLIWAG, 11, 27, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CeladonCityPoliwrath, -1
|
||||||
person_event SPRITE_TEACHER, 24 + 4, 20 + 4, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, TeacherScript_0x1a9f50, -1
|
person_event SPRITE_TEACHER, 24, 20, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, TeacherScript_0x1a9f50, -1
|
||||||
person_event SPRITE_GRAMPS, 16 + 4, 14 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, GrampsScript_0x1a9f53, -1
|
person_event SPRITE_GRAMPS, 16, 14, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, GrampsScript_0x1a9f53, -1
|
||||||
person_event SPRITE_GRAMPS, 31 + 4, 8 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GrampsScript_0x1a9f56, -1
|
person_event SPRITE_GRAMPS, 31, 8, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GrampsScript_0x1a9f56, -1
|
||||||
person_event SPRITE_YOUNGSTER, 13 + 4, 18 + 4, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, YoungsterScript_0x1a9f59, -1
|
person_event SPRITE_YOUNGSTER, 13, 18, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, YoungsterScript_0x1a9f59, -1
|
||||||
person_event SPRITE_YOUNGSTER, 33 + 4, 24 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x1a9f5c, -1
|
person_event SPRITE_YOUNGSTER, 33, 24, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x1a9f5c, -1
|
||||||
person_event SPRITE_TEACHER, 14 + 4, 6 + 4, $2, 2, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x1a9f5f, -1
|
person_event SPRITE_TEACHER, 14, 6, $2, 2, 2, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x1a9f5f, -1
|
||||||
person_event SPRITE_LASS, 22 + 4, 7 + 4, $4, 2, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, LassScript_0x1a9f62, -1
|
person_event SPRITE_LASS, 22, 7, $4, 2, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, LassScript_0x1a9f62, -1
|
||||||
|
@ -89,6 +89,6 @@ CeladonDeptStore1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_RECEPTIONIST, 1 + 4, 10 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, ReceptionistScript_0x709e0, -1
|
person_event SPRITE_RECEPTIONIST, 1, 10, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, ReceptionistScript_0x709e0, -1
|
||||||
person_event SPRITE_GENTLEMAN, 4 + 4, 11 + 4, $2, 1, 1, -1, -1, 0, 0, 0, GentlemanScript_0x709e3, -1
|
person_event SPRITE_GENTLEMAN, 4, 11, $2, 1, 1, -1, -1, 0, 0, 0, GentlemanScript_0x709e3, -1
|
||||||
person_event SPRITE_TEACHER, 3 + 4, 5 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x709e6, -1
|
person_event SPRITE_TEACHER, 3, 5, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x709e6, -1
|
||||||
|
@ -82,7 +82,7 @@ CeladonDeptStore2F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_CLERK, 5 + 4, 13 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70bad, -1
|
person_event SPRITE_CLERK, 5, 13, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70bad, -1
|
||||||
person_event SPRITE_CLERK, 5 + 4, 14 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70bb5, -1
|
person_event SPRITE_CLERK, 5, 14, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70bb5, -1
|
||||||
person_event SPRITE_POKEFAN_M, 2 + 4, 5 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, PokefanMScript_0x70bbd, -1
|
person_event SPRITE_POKEFAN_M, 2, 5, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, PokefanMScript_0x70bbd, -1
|
||||||
person_event SPRITE_YOUNGSTER, 2 + 4, 6 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x70bc0, -1
|
person_event SPRITE_YOUNGSTER, 2, 6, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x70bc0, -1
|
||||||
|
@ -107,8 +107,8 @@ CeladonDeptStore3F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_CLERK, 1 + 4, 7 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70d29, -1
|
person_event SPRITE_CLERK, 1, 7, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70d29, -1
|
||||||
person_event SPRITE_YOUNGSTER, 4 + 4, 6 + 4, $4, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x70d31, -1
|
person_event SPRITE_YOUNGSTER, 4, 6, $4, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, YoungsterScript_0x70d31, -1
|
||||||
person_event SPRITE_GAMEBOY_KID, 1 + 4, 9 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GameboyKidScript_0x70d34, -1
|
person_event SPRITE_GAMEBOY_KID, 1, 9, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GameboyKidScript_0x70d34, -1
|
||||||
person_event SPRITE_GAMEBOY_KID, 1 + 4, 10 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GameboyKidScript_0x70d3f, -1
|
person_event SPRITE_GAMEBOY_KID, 1, 10, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GameboyKidScript_0x70d3f, -1
|
||||||
person_event SPRITE_SUPER_NERD, 4 + 4, 13 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, SuperNerdScript_0x70d4a, -1
|
person_event SPRITE_SUPER_NERD, 4, 13, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, SuperNerdScript_0x70d4a, -1
|
||||||
|
@ -65,6 +65,6 @@ CeladonDeptStore4F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_CLERK, 5 + 4, 13 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70f0d, -1
|
person_event SPRITE_CLERK, 5, 13, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x70f0d, -1
|
||||||
person_event SPRITE_SUPER_NERD, 6 + 4, 7 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, SuperNerdScript_0x70f15, -1
|
person_event SPRITE_SUPER_NERD, 6, 7, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, SuperNerdScript_0x70f15, -1
|
||||||
person_event SPRITE_YOUNGSTER, 2 + 4, 8 + 4, $7, 0, 0, -1, -1, 0, 0, 0, YoungsterScript_0x70f18, -1
|
person_event SPRITE_YOUNGSTER, 2, 8, $7, 0, 0, -1, -1, 0, 0, 0, YoungsterScript_0x70f18, -1
|
||||||
|
@ -84,8 +84,8 @@ CeladonDeptStore5F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_CLERK, 5 + 4, 7 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x71004, -1
|
person_event SPRITE_CLERK, 5, 7, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x71004, -1
|
||||||
person_event SPRITE_CLERK, 5 + 4, 8 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x7100c, -1
|
person_event SPRITE_CLERK, 5, 8, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ClerkScript_0x7100c, -1
|
||||||
person_event SPRITE_GENTLEMAN, 5 + 4, 13 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GentlemanScript_0x71014, -1
|
person_event SPRITE_GENTLEMAN, 5, 13, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GentlemanScript_0x71014, -1
|
||||||
person_event SPRITE_SAILOR, 4 + 4, 3 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SailorScript_0x71017, -1
|
person_event SPRITE_SAILOR, 4, 3, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SailorScript_0x71017, -1
|
||||||
person_event SPRITE_TEACHER, 7 + 4, 1 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x7101a, -1
|
person_event SPRITE_TEACHER, 7, 1, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x7101a, -1
|
||||||
|
@ -168,5 +168,5 @@ CeladonDeptStore6F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 2
|
db 2
|
||||||
person_event SPRITE_SUPER_NERD, 2 + 4, 9 + 4, $7, 0, 0, -1, -1, 0, 0, 0, SuperNerdScript_0x7117a, -1
|
person_event SPRITE_SUPER_NERD, 2, 9, $7, 0, 0, -1, -1, 0, 0, 0, SuperNerdScript_0x7117a, -1
|
||||||
person_event SPRITE_YOUNGSTER, 5 + 4, 12 + 4, $2, 1, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x7117d, -1
|
person_event SPRITE_YOUNGSTER, 5, 12, $2, 1, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x7117d, -1
|
||||||
|
@ -325,12 +325,12 @@ CeladonGameCorner_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 9
|
db 9
|
||||||
person_event SPRITE_CLERK, 2 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ClerkScript_0x7211d, -1
|
person_event SPRITE_CLERK, 2, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ClerkScript_0x7211d, -1
|
||||||
person_event SPRITE_RECEPTIONIST, 2 + 4, 3 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ReceptionistScript_0x72120, -1
|
person_event SPRITE_RECEPTIONIST, 2, 3, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ReceptionistScript_0x72120, -1
|
||||||
person_event SPRITE_POKEFAN_M, 10 + 4, 14 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, PokefanMScript_0x72123, -1
|
person_event SPRITE_POKEFAN_M, 10, 14, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, PokefanMScript_0x72123, -1
|
||||||
person_event SPRITE_TEACHER, 7 + 4, 17 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, TeacherScript_0x7212e, -1
|
person_event SPRITE_TEACHER, 7, 17, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, TeacherScript_0x7212e, -1
|
||||||
person_event SPRITE_FISHING_GURU, 7 + 4, 11 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FishingGuruScript_0x72139, -1
|
person_event SPRITE_FISHING_GURU, 7, 11, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FishingGuruScript_0x72139, -1
|
||||||
person_event SPRITE_FISHER, 10 + 4, 8 + 4, $8, 0, 0, -1, 2, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x72144, -1
|
person_event SPRITE_FISHER, 10, 8, $8, 0, 0, -1, 2, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x72144, -1
|
||||||
person_event SPRITE_FISHER, 10 + 4, 8 + 4, $8, 0, 0, -1, 4, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x72144, -1
|
person_event SPRITE_FISHER, 10, 8, $8, 0, 0, -1, 4, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x72144, -1
|
||||||
person_event SPRITE_GYM_GUY, 3 + 4, 11 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CeladonGymGuyScript, -1
|
person_event SPRITE_GYM_GUY, 3, 11, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CeladonGymGuyScript, -1
|
||||||
person_event SPRITE_GRAMPS, 8 + 4, 2 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, GrampsScript_0x72190, -1
|
person_event SPRITE_GRAMPS, 8, 2, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, GrampsScript_0x72190, -1
|
||||||
|
@ -284,5 +284,5 @@ CeladonGameCornerPrizeRoom_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 2
|
db 2
|
||||||
person_event SPRITE_GENTLEMAN, 2 + 4, 0 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GentlemanScript_0x726e9, -1
|
person_event SPRITE_GENTLEMAN, 2, 0, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, GentlemanScript_0x726e9, -1
|
||||||
person_event SPRITE_PHARMACIST, 4 + 4, 4 + 4, $4, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, PharmacistScript_0x726ec, -1
|
person_event SPRITE_PHARMACIST, 4, 4, $4, 1, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, PharmacistScript_0x726ec, -1
|
||||||
|
@ -278,9 +278,9 @@ CeladonGym_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 6
|
db 6
|
||||||
person_event SPRITE_ERIKA, 3 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ErikaScript_0x72a6a, -1
|
person_event SPRITE_ERIKA, 3, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, ErikaScript_0x72a6a, -1
|
||||||
person_event SPRITE_LASS, 8 + 4, 7 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 2, 2, TrainerLassMichelle, -1
|
person_event SPRITE_LASS, 8, 7, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 2, 2, TrainerLassMichelle, -1
|
||||||
person_event SPRITE_LASS, 8 + 4, 2 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 2, 2, TrainerPicnickerTanya, -1
|
person_event SPRITE_LASS, 8, 2, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 2, 2, TrainerPicnickerTanya, -1
|
||||||
person_event SPRITE_BUENA, 5 + 4, 3 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 2, 2, TrainerBeautyJulia, -1
|
person_event SPRITE_BUENA, 5, 3, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 2, 2, TrainerBeautyJulia, -1
|
||||||
person_event SPRITE_TWIN, 10 + 4, 4 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsJoandzoe1, -1
|
person_event SPRITE_TWIN, 10, 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsJoandzoe1, -1
|
||||||
person_event SPRITE_TWIN, 10 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsJoandzoe2, -1
|
person_event SPRITE_TWIN, 10, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 1, TrainerTwinsJoandzoe2, -1
|
||||||
|
@ -91,7 +91,7 @@ CeladonMansion1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_GRANNY, 5 + 4, 1 + 4, $3, 0, 0, -1, -1, 0, 0, 0, CeladonMansionManager, -1
|
person_event SPRITE_GRANNY, 5, 1, $3, 0, 0, -1, -1, 0, 0, 0, CeladonMansionManager, -1
|
||||||
person_event SPRITE_GROWLITHE, 6 + 4, 2 + 4, $16, 0, 0, -1, -1, 0, 0, 0, CeladonMansion1FMeowth, -1
|
person_event SPRITE_GROWLITHE, 6, 2, $16, 0, 0, -1, -1, 0, 0, 0, CeladonMansion1FMeowth, -1
|
||||||
person_event SPRITE_CLEFAIRY, 4 + 4, 3 + 4, $16, 0, 0, -1, -1, 0, 0, 0, CeladonMansion1FClefairy, -1
|
person_event SPRITE_CLEFAIRY, 4, 3, $16, 0, 0, -1, -1, 0, 0, 0, CeladonMansion1FClefairy, -1
|
||||||
person_event SPRITE_GROWLITHE, 4 + 4, 4 + 4, $16, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CeladonMansion1FNidoranF, -1
|
person_event SPRITE_GROWLITHE, 4, 4, $16, 0, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CeladonMansion1FNidoranF, -1
|
||||||
|
@ -206,7 +206,7 @@ CeladonMansion3F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_COOLTRAINER_M, 6 + 4, 3 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerMScript_0x71670, -1
|
person_event SPRITE_COOLTRAINER_M, 6, 3, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerMScript_0x71670, -1
|
||||||
person_event SPRITE_GYM_GUY, 4 + 4, 3 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GymGuyScript_0x71696, -1
|
person_event SPRITE_GYM_GUY, 4, 3, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GymGuyScript_0x71696, -1
|
||||||
person_event SPRITE_SUPER_NERD, 7 + 4, 0 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x716bc, -1
|
person_event SPRITE_SUPER_NERD, 7, 0, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x716bc, -1
|
||||||
person_event SPRITE_FISHER, 4 + 4, 0 + 4, $7, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x716bf, -1
|
person_event SPRITE_FISHER, 4, 0, $7, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x716bf, -1
|
||||||
|
@ -49,4 +49,4 @@ CeladonMansionRoof_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_FISHER, 5 + 4, 7 + 4, $4, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, FisherScript_0x71a39, -1
|
person_event SPRITE_FISHER, 5, 7, $4, 1, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, FisherScript_0x71a39, -1
|
||||||
|
@ -130,4 +130,4 @@ CeladonMansionRoofHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_PHARMACIST, 2 + 4, 3 + 4, $6, 2, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, PharmacistScript_0x71afd, -1
|
person_event SPRITE_PHARMACIST, 2, 3, $6, 2, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, PharmacistScript_0x71afd, -1
|
||||||
|
@ -156,8 +156,8 @@ CeladonPokeCenter1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_NURSE, 1 + 4, 3 + 4, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x71e22, -1
|
person_event SPRITE_NURSE, 1, 3, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x71e22, -1
|
||||||
person_event SPRITE_GENTLEMAN, 5 + 4, 1 + 4, $5, 0, 1, -1, -1, 0, 0, 0, GentlemanScript_0x71e25, -1
|
person_event SPRITE_GENTLEMAN, 5, 1, $5, 0, 1, -1, -1, 0, 0, 0, GentlemanScript_0x71e25, -1
|
||||||
person_event SPRITE_PHARMACIST, 3 + 4, 0 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, PharmacistScript_0x71e2b, -1
|
person_event SPRITE_PHARMACIST, 3, 0, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, PharmacistScript_0x71e2b, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 6 + 4, 8 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerFScript_0x71e28, -1
|
person_event SPRITE_COOLTRAINER_F, 6, 8, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerFScript_0x71e28, -1
|
||||||
person_event SPRITE_SUPER_NERD, 3 + 4, 4 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x71e2e, EVENT_SET_WHEN_FOUGHT_HO_OH
|
person_event SPRITE_SUPER_NERD, 3, 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x71e2e, EVENT_SET_WHEN_FOUGHT_HO_OH
|
||||||
|
@ -299,9 +299,9 @@ CeruleanCity_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 6
|
db 6
|
||||||
person_event SPRITE_COOLTRAINER_M, 23 + 4, 15 + 4, $2, 2, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CooltrainerMScript_0x184009, -1
|
person_event SPRITE_COOLTRAINER_M, 23, 15, $2, 2, 2, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CooltrainerMScript_0x184009, -1
|
||||||
person_event SPRITE_SUPER_NERD, 15 + 4, 23 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x18401d, -1
|
person_event SPRITE_SUPER_NERD, 15, 23, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, SuperNerdScript_0x18401d, -1
|
||||||
person_event SPRITE_SLOWPOKE, 24 + 4, 20 + 4, $1, 0, 0, -1, -1, 0, 0, 0, CeruleanCitySlowbro, -1
|
person_event SPRITE_SLOWPOKE, 24, 20, $1, 0, 0, -1, -1, 0, 0, 0, CeruleanCitySlowbro, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 24 + 4, 21 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerFScript_0x18402a, -1
|
person_event SPRITE_COOLTRAINER_F, 24, 21, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerFScript_0x18402a, -1
|
||||||
person_event SPRITE_FISHER, 26 + 4, 30 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x18404a, -1
|
person_event SPRITE_FISHER, 26, 30, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x18404a, -1
|
||||||
person_event SPRITE_YOUNGSTER, 12 + 4, 6 + 4, $3, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x184064, -1
|
person_event SPRITE_YOUNGSTER, 12, 6, $3, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x184064, -1
|
||||||
|
@ -377,9 +377,9 @@ CeruleanGym_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 6
|
db 6
|
||||||
person_event SPRITE_ROCKET, 10 + 4, 4 + 4, $6, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_CERULEAN_GYM_ROCKET
|
person_event SPRITE_ROCKET, 10, 4, $6, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_CERULEAN_GYM_ROCKET
|
||||||
person_event SPRITE_MISTY, 3 + 4, 5 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, MistyScript_0x188432, EVENT_TRAINERS_IN_CERULEAN_GYM
|
person_event SPRITE_MISTY, 3, 5, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, MistyScript_0x188432, EVENT_TRAINERS_IN_CERULEAN_GYM
|
||||||
person_event SPRITE_SWIMMER_GIRL, 6 + 4, 4 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 2, 3, TrainerSwimmerfDiana, EVENT_TRAINERS_IN_CERULEAN_GYM
|
person_event SPRITE_SWIMMER_GIRL, 6, 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 2, 3, TrainerSwimmerfDiana, EVENT_TRAINERS_IN_CERULEAN_GYM
|
||||||
person_event SPRITE_SWIMMER_GIRL, 9 + 4, 1 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 2, 1, TrainerSwimmerfBriana, EVENT_TRAINERS_IN_CERULEAN_GYM
|
person_event SPRITE_SWIMMER_GIRL, 9, 1, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 2, 1, TrainerSwimmerfBriana, EVENT_TRAINERS_IN_CERULEAN_GYM
|
||||||
person_event SPRITE_SWIMMER_GUY, 9 + 4, 8 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 3, TrainerSwimmermParker, EVENT_TRAINERS_IN_CERULEAN_GYM
|
person_event SPRITE_SWIMMER_GUY, 9, 8, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 2, 3, TrainerSwimmermParker, EVENT_TRAINERS_IN_CERULEAN_GYM
|
||||||
person_event SPRITE_GYM_GUY, 13 + 4, 7 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CeruleanGymGuyScript, EVENT_TRAINERS_IN_CERULEAN_GYM
|
person_event SPRITE_GYM_GUY, 13, 7, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, CeruleanGymGuyScript, EVENT_TRAINERS_IN_CERULEAN_GYM
|
||||||
|
@ -30,4 +30,4 @@ CeruleanGymBadgeSpeechHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 1
|
db 1
|
||||||
person_event SPRITE_POKEFAN_M, 3 + 4, 2 + 4, $9, 0, 0, -1, -1, 0, 0, 0, PokefanMScript_0x188002, -1
|
person_event SPRITE_POKEFAN_M, 3, 2, $9, 0, 0, -1, -1, 0, 0, 0, PokefanMScript_0x188002, -1
|
||||||
|
@ -57,6 +57,6 @@ CeruleanMart_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_CLERK, 3 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x188ac0, -1
|
person_event SPRITE_CLERK, 3, 1, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x188ac0, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 6 + 4, 1 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerMScript_0x188ac7, -1
|
person_event SPRITE_COOLTRAINER_M, 6, 1, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, CooltrainerMScript_0x188ac7, -1
|
||||||
person_event SPRITE_COOLTRAINER_F, 2 + 4, 7 + 4, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerFScript_0x188aca, -1
|
person_event SPRITE_COOLTRAINER_F, 2, 7, $5, 0, 2, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, CooltrainerFScript_0x188aca, -1
|
||||||
|
@ -75,6 +75,6 @@ CeruleanPokeCenter1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_NURSE, 1 + 4, 3 + 4, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x18820f, -1
|
person_event SPRITE_NURSE, 1, 3, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x18820f, -1
|
||||||
person_event SPRITE_SUPER_NERD, 4 + 4, 8 + 4, $5, 0, 1, -1, -1, 0, 0, 0, SuperNerdScript_0x188212, -1
|
person_event SPRITE_SUPER_NERD, 4, 8, $5, 0, 1, -1, -1, 0, 0, 0, SuperNerdScript_0x188212, -1
|
||||||
person_event SPRITE_GYM_GUY, 5 + 4, 1 + 4, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, GymGuyScript_0x18821e, -1
|
person_event SPRITE_GYM_GUY, 5, 1, $2, 1, 1, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, GymGuyScript_0x18821e, -1
|
||||||
|
@ -55,6 +55,6 @@ CeruleanPoliceStation_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_FISHING_GURU, 1 + 4, 5 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FishingGuruScript_0x18804a, -1
|
person_event SPRITE_FISHING_GURU, 1, 5, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, FishingGuruScript_0x18804a, -1
|
||||||
person_event SPRITE_POKEFAN_F, 4 + 4, 5 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, PokefanFScript_0x18804d, -1
|
person_event SPRITE_POKEFAN_F, 4, 5, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, PokefanFScript_0x18804d, -1
|
||||||
person_event SPRITE_DIGLETT, 5 + 4, 3 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, DiglettScript_0x188050, -1
|
person_event SPRITE_DIGLETT, 5, 3, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, DiglettScript_0x188050, -1
|
||||||
|
@ -64,7 +64,7 @@ CeruleanTradeSpeechHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_GRANNY, 4 + 4, 2 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GrannyScript_0x188133, -1
|
person_event SPRITE_GRANNY, 4, 2, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, GrannyScript_0x188133, -1
|
||||||
person_event SPRITE_GRAMPS, 2 + 4, 1 + 4, $2, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, GrampsScript_0x188136, -1
|
person_event SPRITE_GRAMPS, 2, 1, $2, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, GrampsScript_0x188136, -1
|
||||||
person_event SPRITE_RHYDON, 2 + 4, 5 + 4, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, RhydonScript_0x188139, -1
|
person_event SPRITE_RHYDON, 2, 5, $16, 0, 0, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, RhydonScript_0x188139, -1
|
||||||
person_event SPRITE_ZUBAT, 6 + 4, 5 + 4, $16, 0, 0, -1, -1, 0, 0, 0, ZubatScript_0x188143, -1
|
person_event SPRITE_ZUBAT, 6, 5, $16, 0, 0, -1, -1, 0, 0, 0, ZubatScript_0x188143, -1
|
||||||
|
@ -163,6 +163,6 @@ CharcoalKiln_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_BLACK_BELT, 3 + 4, 2 + 4, $3, 0, 0, -1, -1, 0, 0, 0, CharcoalKilnBoss, EVENT_CHARCOAL_KILN_BOSS
|
person_event SPRITE_BLACK_BELT, 3, 2, $3, 0, 0, -1, -1, 0, 0, 0, CharcoalKilnBoss, EVENT_CHARCOAL_KILN_BOSS
|
||||||
person_event SPRITE_YOUNGSTER, 3 + 4, 5 + 4, $2, 1, 1, -1, -1, 0, 0, 0, CharcoalKilnApprentice, EVENT_CHARCOAL_KILN_APPRENTICE
|
person_event SPRITE_YOUNGSTER, 3, 5, $2, 1, 1, -1, -1, 0, 0, 0, CharcoalKilnApprentice, EVENT_CHARCOAL_KILN_APPRENTICE
|
||||||
person_event SPRITE_MOLTRES, 6 + 4, 5 + 4, $16, 2, 2, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, CharcoalKilnFarfetchd, EVENT_CHARCOAL_KILN_FARFETCH_D
|
person_event SPRITE_MOLTRES, 6, 5, $16, 2, 2, -1, -1, (1 << 3) | PAL_OW_BROWN, 0, 0, CharcoalKilnFarfetchd, EVENT_CHARCOAL_KILN_FARFETCH_D
|
||||||
|
@ -570,8 +570,8 @@ CherrygroveCity_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 5
|
db 5
|
||||||
person_event SPRITE_GRAMPS, 6 + 4, 32 + 4, $6, 0, 0, -1, -1, 0, 0, 0, CherrygroveCityGuideGent, EVENT_GUIDE_GENT_IN_HIS_HOUSE
|
person_event SPRITE_GRAMPS, 6, 32, $6, 0, 0, -1, -1, 0, 0, 0, CherrygroveCityGuideGent, EVENT_GUIDE_GENT_IN_HIS_HOUSE
|
||||||
person_event SPRITE_SILVER, 6 + 4, 39 + 4, $3, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_RIVAL_CHERRYGROVE_CITY
|
person_event SPRITE_SILVER, 6, 39, $3, 0, 0, -1, -1, 0, 0, 0, ObjectEvent, EVENT_RIVAL_CHERRYGROVE_CITY
|
||||||
person_event SPRITE_TEACHER, 12 + 4, 27 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, TeacherScript_0x19c146, -1
|
person_event SPRITE_TEACHER, 12, 27, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, TeacherScript_0x19c146, -1
|
||||||
person_event SPRITE_YOUNGSTER, 7 + 4, 23 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x19c15a, -1
|
person_event SPRITE_YOUNGSTER, 7, 23, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x19c15a, -1
|
||||||
person_event SPRITE_FISHER, 12 + 4, 7 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, MysticWaterGuy, -1
|
person_event SPRITE_FISHER, 12, 7, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, MysticWaterGuy, -1
|
||||||
|
@ -56,5 +56,5 @@ CherrygroveEvolutionSpeechHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 2
|
db 2
|
||||||
person_event SPRITE_LASS, 5 + 4, 3 + 4, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, LassScript_0x196cb9, -1
|
person_event SPRITE_LASS, 5, 3, $8, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, LassScript_0x196cb9, -1
|
||||||
person_event SPRITE_YOUNGSTER, 5 + 4, 2 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x196cb2, -1
|
person_event SPRITE_YOUNGSTER, 5, 2, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x196cb2, -1
|
||||||
|
@ -59,5 +59,5 @@ CherrygroveGymSpeechHouse_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 2
|
db 2
|
||||||
person_event SPRITE_POKEFAN_M, 3 + 4, 2 + 4, $6, 0, 0, -1, -1, 0, 0, 0, PokefanMScript_0x196ae1, -1
|
person_event SPRITE_POKEFAN_M, 3, 2, $6, 0, 0, -1, -1, 0, 0, 0, PokefanMScript_0x196ae1, -1
|
||||||
person_event SPRITE_BUG_CATCHER, 5 + 4, 5 + 4, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, BugCatcherScript_0x196ae4, -1
|
person_event SPRITE_BUG_CATCHER, 5, 5, $5, 0, 1, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, BugCatcherScript_0x196ae4, -1
|
||||||
|
@ -83,6 +83,6 @@ CherrygroveMart_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 3
|
db 3
|
||||||
person_event SPRITE_CLERK, 3 + 4, 1 + 4, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x19680a, -1
|
person_event SPRITE_CLERK, 3, 1, $9, 0, 0, -1, -1, 0, 0, 0, ClerkScript_0x19680a, -1
|
||||||
person_event SPRITE_COOLTRAINER_M, 6 + 4, 7 + 4, $5, 0, 2, -1, -1, 0, 0, 0, CooltrainerMScript_0x19681d, -1
|
person_event SPRITE_COOLTRAINER_M, 6, 7, $5, 0, 2, -1, -1, 0, 0, 0, CooltrainerMScript_0x19681d, -1
|
||||||
person_event SPRITE_YOUNGSTER, 5 + 4, 2 + 4, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x196831, -1
|
person_event SPRITE_YOUNGSTER, 5, 2, $6, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, YoungsterScript_0x196831, -1
|
||||||
|
@ -80,7 +80,7 @@ CherrygrovePokeCenter1F_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 4
|
db 4
|
||||||
person_event SPRITE_NURSE, 1 + 4, 3 + 4, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x19696d, -1
|
person_event SPRITE_NURSE, 1, 3, $6, 0, 0, -1, -1, 0, 0, 0, NurseScript_0x19696d, -1
|
||||||
person_event SPRITE_FISHER, 3 + 4, 2 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x196970, -1
|
person_event SPRITE_FISHER, 3, 2, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_RED, 0, 0, FisherScript_0x196970, -1
|
||||||
person_event SPRITE_GENTLEMAN, 6 + 4, 8 + 4, $7, 0, 0, -1, -1, 0, 0, 0, GentlemanScript_0x196973, -1
|
person_event SPRITE_GENTLEMAN, 6, 8, $7, 0, 0, -1, -1, 0, 0, 0, GentlemanScript_0x196973, -1
|
||||||
person_event SPRITE_TEACHER, 6 + 4, 1 + 4, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x196976, -1
|
person_event SPRITE_TEACHER, 6, 1, $9, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, TeacherScript_0x196976, -1
|
||||||
|
@ -401,15 +401,15 @@ CianwoodCity_MapEventHeader:
|
|||||||
|
|
||||||
.PersonEvents:
|
.PersonEvents:
|
||||||
db 12
|
db 12
|
||||||
person_event SPRITE_STANDING_YOUNGSTER, 37 + 4, 21 + 4, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, StandingYoungsterScript_0x1a00b3, -1
|
person_event SPRITE_STANDING_YOUNGSTER, 37, 21, $3, 0, 0, -1, -1, (1 << 3) | PAL_OW_GREEN, 0, 0, StandingYoungsterScript_0x1a00b3, -1
|
||||||
person_event SPRITE_POKEFAN_M, 33 + 4, 17 + 4, $5, 0, 1, -1, -1, 0, 0, 0, PokefanMScript_0x1a00b6, -1
|
person_event SPRITE_POKEFAN_M, 33, 17, $5, 0, 1, -1, -1, 0, 0, 0, PokefanMScript_0x1a00b6, -1
|
||||||
person_event SPRITE_LASS, 42 + 4, 14 + 4, $4, 2, 0, -1, -1, 0, 0, 0, LassScript_0x1a00b9, -1
|
person_event SPRITE_LASS, 42, 14, $4, 2, 0, -1, -1, 0, 0, 0, LassScript_0x1a00b9, -1
|
||||||
person_event SPRITE_ROCK, 16 + 4, 8 + 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
person_event SPRITE_ROCK, 16, 8, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
||||||
person_event SPRITE_ROCK, 17 + 4, 9 + 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
person_event SPRITE_ROCK, 17, 9, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
||||||
person_event SPRITE_ROCK, 25 + 4, 4 + 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
person_event SPRITE_ROCK, 25, 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
||||||
person_event SPRITE_ROCK, 29 + 4, 5 + 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
person_event SPRITE_ROCK, 29, 5, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
||||||
person_event SPRITE_ROCK, 27 + 4, 10 + 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
person_event SPRITE_ROCK, 27, 10, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
||||||
person_event SPRITE_ROCK, 19 + 4, 4 + 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
person_event SPRITE_ROCK, 19, 4, $18, 0, 0, -1, -1, 0, 0, 0, CianwoodCityRock, -1
|
||||||
person_event SPRITE_POKEFAN_F, 46 + 4, 10 + 4, $5, 0, 1, -1, -1, 0, 0, 0, PokefanFScript_0x1a0084, -1
|
person_event SPRITE_POKEFAN_F, 46, 10, $5, 0, 1, -1, -1, 0, 0, 0, PokefanFScript_0x1a0084, -1
|
||||||
person_event SPRITE_SUPER_NERD, 21 + 4, 11 + 4, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ObjectEvent, EVENT_CIANWOOD_CITY_EUSINE
|
person_event SPRITE_SUPER_NERD, 21, 11, $7, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ObjectEvent, EVENT_CIANWOOD_CITY_EUSINE
|
||||||
person_event SPRITE_SUICUNE, 14 + 4, 10 + 4, $1, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ObjectEvent, EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
|
person_event SPRITE_SUICUNE, 14, 10, $1, 0, 0, -1, -1, (1 << 3) | PAL_OW_BLUE, 0, 0, ObjectEvent, EVENT_SAW_SUICUNE_AT_CIANWOOD_CITY
|
||||||
|