mirror of https://github.com/pret/pokecrystal.git
merge conflicts resolved
This commit is contained in:
commit
3b9a3cc3be
|
@ -298,7 +298,7 @@ AI_Items: ; 39196
|
|||
.FullHeal: ; 381be
|
||||
call .Status
|
||||
jp c, .DontUse
|
||||
call Function383a3
|
||||
call EnemyUsedFullHeal
|
||||
jp .Use
|
||||
; 381ca
|
||||
|
||||
|
@ -309,7 +309,7 @@ AI_Items: ; 39196
|
|||
|
||||
ld a, [bc]
|
||||
bit CONTEXT_USE_F, a
|
||||
jr nz, .asm_381e7
|
||||
jr nz, .StatusCheckContext
|
||||
ld a, [bc]
|
||||
bit ALWAYS_USE_F, a
|
||||
jp nz, .Use
|
||||
|
@ -318,17 +318,17 @@ AI_Items: ; 39196
|
|||
jp c, .Use
|
||||
jp .DontUse
|
||||
|
||||
.asm_381e7
|
||||
.StatusCheckContext
|
||||
ld a, [EnemySubStatus5]
|
||||
bit SUBSTATUS_TOXIC, a
|
||||
jr z, .asm_381fd
|
||||
jr z, .FailToxicCheck
|
||||
ld a, [EnemyToxicCount]
|
||||
cp 4
|
||||
jr c, .asm_381fd
|
||||
jr c, .FailToxicCheck
|
||||
call Random
|
||||
cp $80
|
||||
jp c, .Use
|
||||
.asm_381fd
|
||||
.FailToxicCheck
|
||||
ld a, [EnemyMonStatus]
|
||||
and 1 << FRZ | SLP
|
||||
jp z, .DontUse
|
||||
|
@ -337,58 +337,58 @@ AI_Items: ; 39196
|
|||
|
||||
.FullRestore: ; 38208
|
||||
call .HealItem
|
||||
jp nc, .asm_3821a
|
||||
jp nc, .UseFullRestore
|
||||
ld a, [bc]
|
||||
bit CONTEXT_USE_F, a
|
||||
jp z, .DontUse
|
||||
call .Status
|
||||
jp c, .DontUse
|
||||
|
||||
.asm_3821a
|
||||
call Function383b5
|
||||
.UseFullRestore
|
||||
call EnemyUsedFullRestore
|
||||
jp .Use
|
||||
; 38220
|
||||
|
||||
.MaxPotion: ; 38220
|
||||
call .HealItem
|
||||
jp c, .DontUse
|
||||
call Function383ae
|
||||
call EnemyUsedMaxPotion
|
||||
jp .Use
|
||||
|
||||
.HealItem: ; 3822c (e:422c)
|
||||
ld a, [bc]
|
||||
bit CONTEXT_USE_F, a
|
||||
jr nz, .asm_38267
|
||||
jr nz, .CheckHalfOrQuarterHP
|
||||
callab AICheckEnemyHalfHP
|
||||
jp c, .DontUse
|
||||
ld a, [bc]
|
||||
bit UNKNOWN_USE_F, a
|
||||
jp nz, .asm_38254
|
||||
jp nz, .CheckQuarterHP
|
||||
callab AICheckEnemyQuarterHP
|
||||
jp nc, .asm_38281
|
||||
jp nc, .UseHealItem
|
||||
call Random
|
||||
cp $80
|
||||
jp c, .asm_38281
|
||||
jp c, .UseHealItem
|
||||
jp .DontUse
|
||||
|
||||
.asm_38254: ; 38254 (e:4254)
|
||||
.CheckQuarterHP: ; 38254 (e:4254)
|
||||
callab AICheckEnemyQuarterHP
|
||||
jp c, .DontUse
|
||||
call Random
|
||||
cp 50
|
||||
cp $32
|
||||
jp c, .DontUse
|
||||
jr .asm_38281
|
||||
jr .UseHealItem
|
||||
|
||||
.asm_38267: ; 38267 (e:4267)
|
||||
.CheckHalfOrQuarterHP: ; 38267 (e:4267)
|
||||
callab AICheckEnemyHalfHP
|
||||
jp c, .DontUse
|
||||
callab AICheckEnemyQuarterHP
|
||||
jp nc, .asm_38281
|
||||
jp nc, .UseHealItem
|
||||
call Random
|
||||
cp 50
|
||||
cp $32
|
||||
jp nc, .DontUse
|
||||
|
||||
.asm_38281: ; 38281 (e:4281)
|
||||
.UseHealItem: ; 38281 (e:4281)
|
||||
jp .Use
|
||||
; 38284
|
||||
|
||||
|
@ -396,7 +396,7 @@ AI_Items: ; 39196
|
|||
call .HealItem
|
||||
jp c, .DontUse
|
||||
ld b, 200
|
||||
call Function383f4
|
||||
call EnemyUsedHyperPotion
|
||||
jp .Use
|
||||
; 38292 (e:4292)
|
||||
|
||||
|
@ -404,7 +404,7 @@ AI_Items: ; 39196
|
|||
call .HealItem
|
||||
jp c, .DontUse
|
||||
ld b, 50
|
||||
call Function383ee
|
||||
call EnemyUsedSuperPotion
|
||||
jp .Use
|
||||
; 382a0
|
||||
|
||||
|
@ -412,11 +412,11 @@ AI_Items: ; 39196
|
|||
call .HealItem
|
||||
jp c, .DontUse
|
||||
ld b, 20
|
||||
call Function383e8
|
||||
call EnemyUsedPotion
|
||||
jp .Use
|
||||
; 382ae
|
||||
|
||||
.asm_382ae: ; 382ae
|
||||
.asm_382ae: ; This appears to be unused
|
||||
callab AICheckEnemyMaxHP
|
||||
jr c, .asm_382e4
|
||||
push bc
|
||||
|
@ -455,7 +455,7 @@ AI_Items: ; 39196
|
|||
bit UNKNOWN_USE_F, a
|
||||
jp z, .DontUse
|
||||
call Random
|
||||
cp 100
|
||||
cp $64
|
||||
jp c, .Use
|
||||
jp .DontUse
|
||||
; 382f9
|
||||
|
@ -463,56 +463,56 @@ AI_Items: ; 39196
|
|||
.XAccuracy: ; 382f9
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function384f7
|
||||
call EnemyUsedXAccuracy
|
||||
jp .Use
|
||||
; 38305
|
||||
|
||||
.GuardSpec: ; 38305
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function38504
|
||||
call EnemyUsedGuardSpec
|
||||
jp .Use
|
||||
; 38311
|
||||
|
||||
.DireHit: ; 38311
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function38511
|
||||
call EnemyUsedDireHit
|
||||
jp .Use
|
||||
; 3831d (e:431d)
|
||||
|
||||
.XAttack: ; 3831d
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function38541
|
||||
call EnemyUsedXAttack
|
||||
jp .Use
|
||||
; 38329
|
||||
|
||||
.XDefend: ; 38329
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function38547
|
||||
call EnemyUsedXDefend
|
||||
jp .Use
|
||||
; 38335
|
||||
|
||||
.XSpeed: ; 38335
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function3854d
|
||||
call EnemyUsedXSpeed
|
||||
jp .Use
|
||||
; 38341
|
||||
|
||||
.XSpecial: ; 38341
|
||||
call .XItem
|
||||
jp c, .DontUse
|
||||
call Function38553
|
||||
call EnemyUsedXSpecial
|
||||
jp .Use
|
||||
; 3834d
|
||||
|
||||
.XItem: ; 3834d (e:434d)
|
||||
ld a, [EnemyTurnsTaken]
|
||||
and a
|
||||
jr nz, .asm_38372
|
||||
jr nz, .notfirstturnout
|
||||
ld a, [bc]
|
||||
bit ALWAYS_USE_F, a
|
||||
jp nz, .Use
|
||||
|
@ -526,12 +526,12 @@ AI_Items: ; 39196
|
|||
cp $80
|
||||
jp c, .DontUse
|
||||
jp .Use
|
||||
.asm_38372
|
||||
.notfirstturnout
|
||||
ld a, [bc]
|
||||
bit ALWAYS_USE_F, a
|
||||
jp z, .DontUse
|
||||
call Random
|
||||
cp 50
|
||||
cp $32
|
||||
jp nc, .DontUse
|
||||
jp .Use
|
||||
|
||||
|
@ -564,18 +564,18 @@ AIUsedItemSound: ; 3839a
|
|||
; 383a3
|
||||
|
||||
|
||||
Function383a3: ; 383a3 (e:43a3)
|
||||
EnemyUsedFullHeal: ; 383a3 (e:43a3)
|
||||
call AIUsedItemSound
|
||||
call AI_HealStatus
|
||||
ld a, FULL_HEAL
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
|
||||
Function383ae: ; 383ae (e:43ae)
|
||||
EnemyUsedMaxPotion: ; 383ae (e:43ae)
|
||||
ld a, MAX_POTION
|
||||
ld [wd1f1], a
|
||||
jr asm_383c6
|
||||
jr FullRestoreContinue
|
||||
|
||||
Function383b5: ; 383b5 (e:43b5)
|
||||
EnemyUsedFullRestore: ; 383b5 (e:43b5)
|
||||
call AI_HealStatus
|
||||
ld a, FULL_RESTORE
|
||||
ld [wd1f1], a
|
||||
|
@ -584,7 +584,7 @@ Function383b5: ; 383b5 (e:43b5)
|
|||
xor a
|
||||
ld [EnemyConfuseCount], a
|
||||
|
||||
asm_383c6: ; 383c6
|
||||
FullRestoreContinue: ; 383c6
|
||||
ld de, wd1ec
|
||||
ld hl, EnemyMonHP + 1
|
||||
ld a, [hld]
|
||||
|
@ -603,24 +603,24 @@ asm_383c6: ; 383c6
|
|||
ld [de], a
|
||||
ld [Buffer2], a
|
||||
ld [EnemyMonHP], a
|
||||
jr Function38436
|
||||
jr EnemyPotionFinish
|
||||
; 383e8 (e:43e8)
|
||||
|
||||
Function383e8: ; 383e8
|
||||
EnemyUsedPotion: ; 383e8
|
||||
ld a, POTION
|
||||
ld b, 20
|
||||
jr Function383f8
|
||||
jr EnemyPotionContinue
|
||||
|
||||
Function383ee: ; 383ee
|
||||
EnemyUsedSuperPotion: ; 383ee
|
||||
ld a, SUPER_POTION
|
||||
ld b, 50
|
||||
jr Function383f8
|
||||
jr EnemyPotionContinue
|
||||
|
||||
Function383f4: ; 383f4 (e:43f4)
|
||||
EnemyUsedHyperPotion: ; 383f4 (e:43f4)
|
||||
ld a, HYPER_POTION
|
||||
ld b, 200
|
||||
|
||||
Function383f8: ; 383f8
|
||||
EnemyPotionContinue: ; 383f8
|
||||
ld [wd1f1], a
|
||||
ld hl, EnemyMonHP + 1
|
||||
ld a, [hl]
|
||||
|
@ -631,11 +631,11 @@ Function383f8: ; 383f8
|
|||
ld a, [hl]
|
||||
ld [wd1ec + 1], a
|
||||
ld [wd1ee + 1], a
|
||||
jr nc, .asm_38415
|
||||
jr nc, .ok
|
||||
inc a
|
||||
ld [hl], a
|
||||
ld [wd1ee + 1], a
|
||||
.asm_38415
|
||||
.ok
|
||||
inc hl
|
||||
ld a, [hld]
|
||||
ld b, a
|
||||
|
@ -649,7 +649,7 @@ Function383f8: ; 383f8
|
|||
ld a, [de]
|
||||
ld [Buffer2], a
|
||||
sbc b
|
||||
jr nc, .asm_38436
|
||||
jr nc, EnemyPotionFinish
|
||||
inc de
|
||||
ld a, [de]
|
||||
dec de
|
||||
|
@ -658,9 +658,8 @@ Function383f8: ; 383f8
|
|||
ld a, [de]
|
||||
ld [hl], a
|
||||
ld [wd1ef], a
|
||||
.asm_38436
|
||||
|
||||
Function38436: ; 38436
|
||||
EnemyPotionFinish: ; 38436
|
||||
call PrintText_UsedItemOn
|
||||
hlcoord 2, 2
|
||||
xor a
|
||||
|
@ -671,24 +670,26 @@ Function38436: ; 38436
|
|||
|
||||
|
||||
AI_TrySwitch: ; 3844b
|
||||
; Determine whether the AI can switch based on how many Pokemon are still alive.
|
||||
; If it can switch, it will.
|
||||
ld a, [OTPartyCount]
|
||||
ld c, a
|
||||
ld hl, OTPartyMon1HP
|
||||
ld d, 0
|
||||
.asm_38454
|
||||
.SwitchLoop
|
||||
ld a, [hli]
|
||||
ld b, a
|
||||
ld a, [hld]
|
||||
or b
|
||||
jr z, .asm_3845b
|
||||
jr z, .fainted
|
||||
inc d
|
||||
.asm_3845b
|
||||
.fainted
|
||||
push bc
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
add hl, bc
|
||||
pop bc
|
||||
dec c
|
||||
jr nz, .asm_38454
|
||||
jr nz, .SwitchLoop
|
||||
|
||||
ld a, d
|
||||
cp 2
|
||||
|
@ -717,10 +718,10 @@ AI_Switch: ; 3846c
|
|||
ld bc, $0004
|
||||
call CopyBytes
|
||||
pop af
|
||||
jr c, .asm_384a3
|
||||
jr c, .skiptext
|
||||
ld hl, TextJump_EnemyWithdrew
|
||||
call PrintText
|
||||
.asm_384a3
|
||||
.skiptext
|
||||
ld a, $1
|
||||
ld [wd264], a
|
||||
callab NewEnemyMonStatus
|
||||
|
@ -743,10 +744,10 @@ TextJump_EnemyWithdrew: ; 384d0
|
|||
db "@"
|
||||
; 384d5
|
||||
|
||||
Function384d5: ; 384d5
|
||||
Function384d5: ; This appears to be unused
|
||||
call AIUsedItemSound
|
||||
call AI_HealStatus
|
||||
ld a, FULL_HEAL_RED
|
||||
ld a, X_SPEED
|
||||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 384e0
|
||||
|
||||
|
@ -763,7 +764,7 @@ AI_HealStatus: ; 384e0
|
|||
ret
|
||||
; 384f7
|
||||
|
||||
Function384f7: ; 384f7
|
||||
EnemyUsedXAccuracy: ; 384f7
|
||||
call AIUsedItemSound
|
||||
ld hl, EnemySubStatus4
|
||||
set SUBSTATUS_X_ACCURACY, [hl]
|
||||
|
@ -771,7 +772,7 @@ Function384f7: ; 384f7
|
|||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 38504
|
||||
|
||||
Function38504: ; 38504
|
||||
EnemyUsedGuardSpec: ; 38504
|
||||
call AIUsedItemSound
|
||||
ld hl, EnemySubStatus4
|
||||
set SUBSTATUS_MIST, [hl]
|
||||
|
@ -779,7 +780,7 @@ Function38504: ; 38504
|
|||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 38511
|
||||
|
||||
Function38511: ; 38511
|
||||
EnemyUsedDireHit: ; 38511
|
||||
call AIUsedItemSound
|
||||
ld hl, EnemySubStatus4
|
||||
set SUBSTATUS_FOCUS_ENERGY, [hl]
|
||||
|
@ -787,14 +788,14 @@ Function38511: ; 38511
|
|||
jp PrintText_UsedItemOn_AND_AIUpdateHUD
|
||||
; 3851e
|
||||
|
||||
Function3851e: ; 3851e
|
||||
Function3851e: ; This appears to be unused
|
||||
ld [hDivisor], a
|
||||
ld hl, EnemyMonMaxHP
|
||||
ld a, [hli]
|
||||
ld [hDividend + 0], a
|
||||
ld [hDividend], a
|
||||
ld a, [hl]
|
||||
ld [hDividend + 1], a
|
||||
ld b, $2
|
||||
ld b, 2
|
||||
call Divide
|
||||
ld a, [hQuotient + 2]
|
||||
ld c, a
|
||||
|
@ -813,25 +814,25 @@ Function3851e: ; 3851e
|
|||
ret
|
||||
; 38541
|
||||
|
||||
Function38541: ; 38541
|
||||
EnemyUsedXAttack: ; 38541
|
||||
ld b, ATTACK
|
||||
ld a, X_ATTACK
|
||||
jr Function38557
|
||||
jr EnemyUsedXItem
|
||||
; 38547
|
||||
|
||||
Function38547: ; 38547
|
||||
EnemyUsedXDefend: ; 38547
|
||||
ld b, DEFENSE
|
||||
ld a, X_DEFEND
|
||||
jr Function38557
|
||||
jr EnemyUsedXItem
|
||||
; 3854d
|
||||
|
||||
Function3854d: ; 3854d
|
||||
EnemyUsedXSpeed: ; 3854d
|
||||
ld b, SPEED
|
||||
ld a, X_SPEED
|
||||
jr Function38557
|
||||
jr EnemyUsedXItem
|
||||
; 38553
|
||||
|
||||
Function38553: ; 38553
|
||||
EnemyUsedXSpecial: ; 38553
|
||||
ld b, SP_ATTACK
|
||||
ld a, X_SPECIAL
|
||||
|
||||
|
@ -839,12 +840,12 @@ Function38553: ; 38553
|
|||
; Parameter
|
||||
; a = ITEM_CONSTANT
|
||||
; b = BATTLE_CONSTANT (ATTACK, DEFENSE, SPEED, SP_ATTACK, SP_DEFENSE, ACCURACY, EVASION)
|
||||
Function38557:
|
||||
EnemyUsedXItem:
|
||||
ld [wd1f1], a
|
||||
push bc
|
||||
call PrintText_UsedItemOn
|
||||
pop bc
|
||||
callba Function361ef
|
||||
callba CheckIfStatCanBeRaised
|
||||
jp AIUpdateHUD
|
||||
; 38568
|
||||
|
||||
|
|
|
@ -240,14 +240,14 @@ Functioncc220: ; cc220
|
|||
ld a, $80
|
||||
ld [hBGMapAddress], a
|
||||
ld a, $9a
|
||||
ld [$ffd7], a
|
||||
ld [hBGMapAddress + 1], a
|
||||
call Function3200
|
||||
ld a, $60
|
||||
ld [hWY], a
|
||||
xor a
|
||||
ld [hBGMapAddress], a
|
||||
ld a, $98
|
||||
ld [$ffd7], a
|
||||
ld [hBGMapAddress + 1], a
|
||||
call BattleAnimDelayFrame
|
||||
ret
|
||||
; cc23d
|
||||
|
|
|
@ -1696,9 +1696,9 @@ Functioncd677: ; cd677 (33:5677)
|
|||
ld a, $42
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
ld a, $58
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $5e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functioncd687: ; cd687 (33:5687)
|
||||
|
@ -1712,7 +1712,7 @@ Functioncd687: ; cd687 (33:5687)
|
|||
jr nc, .asm_cd69b
|
||||
call Functionce72c
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ret
|
||||
.asm_cd69b
|
||||
dec a
|
||||
|
@ -1730,7 +1730,7 @@ Functioncd687: ; cd687 (33:5687)
|
|||
add [hl]
|
||||
sub $10
|
||||
ret c
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld hl, $9
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
@ -1754,8 +1754,8 @@ Functioncd6c6: ; cd6c6 (33:56c6)
|
|||
jr c, asm_cd6da
|
||||
xor a
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
ld [$ffc7], a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
|
||||
Functioncd6d6: ; cd6d6 (33:56d6)
|
||||
call Functioncc9bd
|
||||
|
@ -1767,7 +1767,7 @@ endr
|
|||
ld [hl], a
|
||||
sub $10
|
||||
ret c
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ret
|
||||
|
||||
Functioncd6e3: ; cd6e3 (33:56e3)
|
||||
|
|
|
@ -932,7 +932,7 @@ Functionc8565: ; c8565 (32:4565)
|
|||
ld hl, w5_d422
|
||||
ld bc, $0
|
||||
.asm_c8580
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp e
|
||||
jr nc, .asm_c858b
|
||||
push hl
|
||||
|
@ -969,9 +969,9 @@ Functionc85a2: ; c85a2 (32:45a2)
|
|||
ld a, $42
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $5e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld de, $202
|
||||
call Functionc8f2e
|
||||
ret
|
||||
|
@ -1044,9 +1044,9 @@ Functionc8610: ; c8610 (32:4610)
|
|||
ld a, $43
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $5f
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld de, $605
|
||||
call Functionc8f2e
|
||||
ld hl, $3
|
||||
|
@ -1140,9 +1140,9 @@ Functionc8698: ; c8698 (32:4698)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -1196,9 +1196,9 @@ Functionc86ea: ; c86ea (32:46ea)
|
|||
inc a
|
||||
ld d, a
|
||||
ld h, $d2
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
srl a
|
||||
push af
|
||||
|
@ -1238,7 +1238,7 @@ Functionc8712: ; c8712 (32:4712)
|
|||
ld d, $2
|
||||
call Functionc8f2e
|
||||
ld h, $d2
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
ld l, a
|
||||
ld [hl], $0
|
||||
dec l
|
||||
|
@ -1246,7 +1246,7 @@ Functionc8712: ; c8712 (32:4712)
|
|||
ret
|
||||
|
||||
Functionc8732: ; c8732 (32:4732)
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
ld l, a
|
||||
ld h, $d2
|
||||
ld e, l
|
||||
|
@ -1256,11 +1256,11 @@ Functionc8732: ; c8732 (32:4732)
|
|||
ld a, [de]
|
||||
dec de
|
||||
ld [hld], a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp l
|
||||
jr nz, .asm_c873a
|
||||
ld [hl], $90
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
ld l, a
|
||||
ld a, [hl]
|
||||
cp $1
|
||||
|
@ -1296,9 +1296,9 @@ Functionc876a: ; c876a (32:476a)
|
|||
call Functionc8eca
|
||||
ld a, $42
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
|
@ -1347,9 +1347,9 @@ Functionc87b2: ; c87b2 (32:47b2)
|
|||
call Functionc8eca
|
||||
ld a, $42
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $2
|
||||
|
@ -1371,9 +1371,9 @@ Functionc87cf: ; c87cf (32:47cf)
|
|||
call Functionc80e5
|
||||
|
||||
Functionc87de: ; c87de (32:47de)
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
dec a
|
||||
ld hl, $2
|
||||
|
@ -1416,9 +1416,9 @@ Functionc8810: ; c8810 (32:4810)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -1451,9 +1451,9 @@ Functionc8842: ; c8842 (32:4842)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ef4
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -1524,16 +1524,16 @@ Functionc88a5: ; c88a5 (32:48a5)
|
|||
pop af
|
||||
jp Functionc900b
|
||||
.asm_c88b7
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld d, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub d
|
||||
ld d, a
|
||||
ld h, LYOverridesBackup / $100
|
||||
ld a, [hSCY] ; $ff00+$d0
|
||||
or a
|
||||
jr nz, .asm_c88d0
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
or a
|
||||
jr z, .asm_c88d6
|
||||
dec a
|
||||
|
@ -1541,14 +1541,14 @@ Functionc88a5: ; c88a5 (32:48a5)
|
|||
ld [hl], $0
|
||||
jr .asm_c88d6
|
||||
.asm_c88d0
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
dec a
|
||||
ld l, a
|
||||
ld [hl], $0
|
||||
.asm_c88d6
|
||||
ld a, [hSCY] ; $ff00+$d0
|
||||
ld l, a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
sub l
|
||||
jr nc, .asm_c88e0
|
||||
xor a
|
||||
|
@ -1581,9 +1581,9 @@ Functionc88f6: ; c88f6 (32:48f6)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -1628,9 +1628,9 @@ Functionc8933: ; c8933 (32:4933)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -1668,9 +1668,9 @@ Functionc896d: ; c896d (32:496d)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
xor a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
|
@ -1767,9 +1767,9 @@ Functionc89f7: ; c89f7 (32:49f7)
|
|||
call Functionc8eca
|
||||
ld a, $42
|
||||
call Functionc8ef4
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
|
@ -1824,14 +1824,14 @@ Functionc8a49: ; c8a49 (32:4a49)
|
|||
call Functionc8ecb
|
||||
ld a, $47
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld a, [$ffc7]
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld h, $d2
|
||||
.asm_c8a60
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
cp l
|
||||
jr z, .asm_c8a69
|
||||
xor a
|
||||
|
@ -1854,9 +1854,9 @@ Functionc8a70: ; c8a70 (32:4a70)
|
|||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
inc a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
call Functionc80e5
|
||||
ret
|
||||
|
||||
|
@ -1864,7 +1864,7 @@ Functionc8a88: ; c8a88 (32:4a88)
|
|||
call Functionc8ab0
|
||||
jr nc, .asm_c8a96
|
||||
call Functionc8a9a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
dec a
|
||||
ld l, a
|
||||
ld [hl], e
|
||||
|
@ -1875,9 +1875,9 @@ Functionc8a88: ; c8a88 (32:4a88)
|
|||
|
||||
Functionc8a9a: ; c8a9a (32:4a9a)
|
||||
ld e, a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
srl a
|
||||
ld h, $d2
|
||||
|
@ -1971,9 +1971,9 @@ Functionc8b0e: ; c8b0e (32:4b0e)
|
|||
ld a, $47
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $60
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functionc8b22: ; c8b22 (32:4b22)
|
||||
|
@ -2221,9 +2221,9 @@ Functionc8c68: ; c8c68 (32:4c68)
|
|||
call Functionc8eca
|
||||
ld a, $43
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $2
|
||||
add hl, bc
|
||||
ld [hl], $1
|
||||
|
@ -2268,9 +2268,9 @@ Functionc8cab: ; c8cab (32:4cab)
|
|||
ld a, $43
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, $37
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld [hl], $0
|
||||
|
@ -2431,9 +2431,9 @@ Functionc8d8b: ; c8d8b (32:4d8b)
|
|||
call Functionc8ecb
|
||||
ld a, $47
|
||||
call Functionc8ede
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
inc a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ld hl, $3
|
||||
add hl, bc
|
||||
ld a, [hl]
|
||||
|
@ -2669,9 +2669,9 @@ Functionc8ede: ; c8ede (32:4ede)
|
|||
ld de, $2f5e
|
||||
.asm_c8eed
|
||||
ld a, d
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functionc8ef4: ; c8ef4 (32:4ef4)
|
||||
|
@ -2684,15 +2684,15 @@ Functionc8ef4: ; c8ef4 (32:4ef4)
|
|||
ld de, $2d5e
|
||||
.asm_c8f03
|
||||
ld a, d
|
||||
ld [$ffc7], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld a, e
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
ret
|
||||
|
||||
Functionc8f0a: ; c8f0a (32:4f0a)
|
||||
xor a
|
||||
ld [$ffc7], a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
call Functionc8eca
|
||||
xor a
|
||||
ld [hLCDStatCustom], a ; $ff00+$c6
|
||||
|
@ -2706,8 +2706,8 @@ Functionc8f19: ; c8f19 (32:4f19)
|
|||
ld [rBGP], a ; $ff00+$47
|
||||
ld [wcfc7], a
|
||||
ld [wcfc9], a
|
||||
ld [$ffc7], a
|
||||
ld [$ffc8], a
|
||||
ld [hLCDStatCustom + 1], a
|
||||
ld [hLCDStatCustom + 2], a
|
||||
call Functionc8eca
|
||||
ret
|
||||
|
||||
|
@ -2723,10 +2723,10 @@ Functionc8f2e: ; c8f2e (32:4f2e)
|
|||
ld [BattleAnimTemps + 3], a
|
||||
ld bc, LYOverridesBackup
|
||||
.asm_c8f43
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp c
|
||||
jr nc, .asm_c8f58
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
cp c
|
||||
jr c, .asm_c8f58
|
||||
ld a, [BattleAnimTemps + 2]
|
||||
|
@ -2800,14 +2800,14 @@ Functionc8f9a: ; c8f9a (32:4f9a)
|
|||
call Functionc905d
|
||||
ld e, a
|
||||
pop hl
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
cp c
|
||||
jr c, .asm_c8fcf
|
||||
ld a, e
|
||||
ld [bc], a
|
||||
inc bc
|
||||
.asm_c8fcf
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
cp l
|
||||
jr nc, .asm_c8fd6
|
||||
ld [hl], e
|
||||
|
@ -2824,7 +2824,7 @@ Functionc8f9a: ; c8f9a (32:4f9a)
|
|||
ret
|
||||
|
||||
Functionc8fe4: ; c8fe4 (32:4fe4)
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld e, a
|
||||
ld a, [BattleAnimTemps]
|
||||
add e
|
||||
|
@ -2834,13 +2834,13 @@ Functionc8fe4: ; c8fe4 (32:4fe4)
|
|||
|
||||
Functionc8fef: ; c8fef (32:4fef)
|
||||
push bc
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
inc a
|
||||
ld e, a
|
||||
ld h, $d2
|
||||
ld d, h
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
and a
|
||||
jr z, .asm_c9009
|
||||
|
@ -2862,9 +2862,9 @@ Functionc8fef: ; c8fef (32:4fef)
|
|||
Functionc900b: ; c900b (32:500b)
|
||||
push af
|
||||
ld h, $d2
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
ld d, a
|
||||
pop af
|
||||
|
@ -2877,14 +2877,14 @@ Functionc900b: ; c900b (32:500b)
|
|||
Functionc901b: ; c901b (32:501b)
|
||||
push af
|
||||
ld e, a
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, [$ffc8]
|
||||
ld a, [hLCDStatCustom + 2]
|
||||
sub l
|
||||
sub e
|
||||
ld d, a
|
||||
ld h, $d2
|
||||
ld a, [$ffc7]
|
||||
ld a, [hLCDStatCustom + 1]
|
||||
ld l, a
|
||||
ld a, $90
|
||||
.asm_c902c
|
||||
|
|
|
@ -2824,21 +2824,22 @@ Function3d1aa: ; 3d1aa
|
|||
ld [hl], a
|
||||
ld [BattleMonStatus], a
|
||||
call UpdateBattleMonInParty
|
||||
ld c, $6
|
||||
ld c, HAPPINESS_FAINTED
|
||||
; If TheirLevel > (YourLevel + 30), use a different parameter
|
||||
ld a, [BattleMonLevel]
|
||||
add $1e
|
||||
add 30
|
||||
ld b, a
|
||||
ld a, [EnemyMonLevel]
|
||||
cp b
|
||||
jr c, .asm_3d1dc
|
||||
ld c, $8
|
||||
ld c, HAPPINESS_BEATENBYSTRONGFOE
|
||||
|
||||
.asm_3d1dc
|
||||
ld a, [CurBattleMon]
|
||||
ld [CurPartyMon], a
|
||||
callab ChangeHappiness
|
||||
ld a, [wd0ee]
|
||||
and $c0
|
||||
and %11000000
|
||||
add $1
|
||||
ld [wd0ee], a
|
||||
ld a, [wc6f7]
|
||||
|
@ -3242,7 +3243,7 @@ Function3d444: ; 3d444
|
|||
|
||||
|
||||
Function3d490: ; 3d490
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld c, a
|
||||
.asm_3d493
|
||||
push bc
|
||||
|
@ -3266,7 +3267,7 @@ Function3d490: ; 3d490
|
|||
; 3d4ae
|
||||
|
||||
Function3d4ae: ; 3d4ae
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
ld c, a
|
||||
cp $8
|
||||
jr nz, .back
|
||||
|
@ -4842,7 +4843,7 @@ DrawPlayerHUD: ; 3df58
|
|||
; HP bar
|
||||
hlcoord 10, 9
|
||||
ld b, 1
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
predef DrawPlayerHP
|
||||
|
||||
|
@ -4924,7 +4925,7 @@ PrintPlayerHUD: ; 3dfbf
|
|||
pop hl
|
||||
dec hl
|
||||
|
||||
ld a, $3
|
||||
ld a, BREEDMON
|
||||
ld [MonType], a
|
||||
callab GetGender
|
||||
ld a, " "
|
||||
|
@ -5002,7 +5003,7 @@ DrawEnemyHUD: ; 3e043
|
|||
ld a, [hl]
|
||||
ld [de], a
|
||||
|
||||
ld a, $3
|
||||
ld a, BREEDMON
|
||||
ld [MonType], a
|
||||
callab GetGender
|
||||
ld a, " "
|
||||
|
@ -5379,7 +5380,7 @@ Function3e308: ; 3e308
|
|||
call EnableLCD
|
||||
call ClearSprites
|
||||
call LowVolume
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
callba Function4dc7b
|
||||
call MaxVolume
|
||||
|
@ -5987,7 +5988,7 @@ Function3e75f: ; 3e75f
|
|||
.ok
|
||||
push hl
|
||||
ld de, StringBuffer1
|
||||
ld bc, $0102
|
||||
lb bc, 1, 2
|
||||
call PrintNum
|
||||
pop hl
|
||||
rept 2
|
||||
|
@ -5995,8 +5996,8 @@ rept 2
|
|||
endr
|
||||
ld [hl], "/"
|
||||
inc hl
|
||||
ld de, wd265
|
||||
ld bc, $0102
|
||||
ld de, wNamedObjectIndexBuffer
|
||||
lb bc, 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 3e786
|
||||
|
@ -7559,7 +7560,7 @@ endr
|
|||
ld [hld], a
|
||||
|
||||
.asm_3ef74
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
predef CopyPkmnToTempMon
|
||||
callab Function50e1b
|
||||
|
@ -7671,7 +7672,7 @@ endr
|
|||
call LoadTileMapToTempTileMap
|
||||
|
||||
.asm_3f057
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
predef CopyPkmnToTempMon
|
||||
hlcoord 9, 0
|
||||
|
@ -7685,7 +7686,7 @@ endr
|
|||
call DelayFrames
|
||||
call Functiona80
|
||||
call Call_LoadTempTileMapToTileMap
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
ld a, [CurSpecies]
|
||||
ld [wd265], a
|
||||
|
@ -7826,7 +7827,7 @@ Function3f136: ; 3f136
|
|||
push af
|
||||
xor a
|
||||
ld [DefaultFlypoint], a
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
predef CopyPkmnToTempMon
|
||||
ld a, [TempMonLevel]
|
||||
|
@ -8556,28 +8557,28 @@ Function3f594: ; 3f594
|
|||
ld [IsInBattle], a
|
||||
|
||||
call IsJohtoGymLeader
|
||||
jr nc, .asm_3f606
|
||||
jr nc, .done
|
||||
xor a
|
||||
ld [CurPartyMon], a
|
||||
ld a, [PartyCount]
|
||||
ld b, a
|
||||
.asm_3f5ea
|
||||
.partyloop
|
||||
push bc
|
||||
ld a, PartyMon1HP - PartyMon1
|
||||
call GetPartyParamLocation
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
jr z, .asm_3f5fc
|
||||
ld c, $4
|
||||
jr z, .skipfaintedmon
|
||||
ld c, HAPPINESS_GYMBATTLE
|
||||
callab ChangeHappiness
|
||||
.asm_3f5fc
|
||||
.skipfaintedmon
|
||||
pop bc
|
||||
dec b
|
||||
jr z, .asm_3f606
|
||||
jr z, .done
|
||||
ld hl, CurPartyMon
|
||||
inc [hl]
|
||||
jr .asm_3f5ea
|
||||
.asm_3f606
|
||||
jr .partyloop
|
||||
.done
|
||||
ret
|
||||
; 3f607
|
||||
|
||||
|
@ -8922,20 +8923,20 @@ Function3f85f: ; 3f85f
|
|||
add hl, de
|
||||
push hl
|
||||
ld de, wd00d
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
pop hl
|
||||
ld de, $0005
|
||||
add hl, de
|
||||
push hl
|
||||
ld de, wd00f
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
pop hl
|
||||
ld de, $0005
|
||||
add hl, de
|
||||
ld de, wd011
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
jr .asm_3f8cf
|
||||
|
||||
|
@ -8975,21 +8976,21 @@ Function3f85f: ; 3f85f
|
|||
call .asm_3f92b
|
||||
jr c, .asm_3f92a
|
||||
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
|
||||
hlcoord 11, 4
|
||||
ld de, sLinkBattleLosses
|
||||
call .asm_3f92b
|
||||
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
|
||||
hlcoord 16, 4
|
||||
ld de, sLinkBattleDraws
|
||||
call .asm_3f92b
|
||||
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
|
||||
.asm_3f92a
|
||||
|
@ -9472,7 +9473,7 @@ Function3fc30: ; 3fc30
|
|||
Function3fc5b: ; 3fc5b
|
||||
ld hl, Sprites
|
||||
xor a
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld b, $6
|
||||
ld e, $a8
|
||||
.asm_3fc65
|
||||
|
@ -9483,10 +9484,10 @@ Function3fc5b: ; 3fc5b
|
|||
inc hl
|
||||
ld [hl], e
|
||||
inc hl
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
ld [hli], a
|
||||
inc a
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld a, $1
|
||||
ld [hli], a
|
||||
ld a, d
|
||||
|
@ -9494,9 +9495,9 @@ Function3fc5b: ; 3fc5b
|
|||
ld d, a
|
||||
dec c
|
||||
jr nz, .asm_3fc69
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
add $3
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld a, e
|
||||
add $8
|
||||
ld e, a
|
||||
|
|
|
@ -1036,13 +1036,13 @@ BattleCommand04: ; 34555
|
|||
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
jr z, .asm_34570
|
||||
jr z, .proceed
|
||||
|
||||
ld hl, EnemyMonPP
|
||||
ld de, EnemySubStatus3
|
||||
ld bc, EnemyTurnsTaken
|
||||
|
||||
.asm_34570
|
||||
.proceed
|
||||
|
||||
; If we've gotten this far, this counts as a turn.
|
||||
ld a, [bc]
|
||||
|
@ -1390,7 +1390,7 @@ BattleCommand_CalcDamageTypeMultiplier: ; 346d2
|
|||
cp c
|
||||
jr z, .stab
|
||||
|
||||
jr .asm_3473a
|
||||
jr .SkipStab
|
||||
|
||||
.stab
|
||||
ld hl, CurDamage + 1
|
||||
|
@ -1412,13 +1412,13 @@ BattleCommand_CalcDamageTypeMultiplier: ; 346d2
|
|||
ld hl, TypeModifier
|
||||
set 7, [hl]
|
||||
|
||||
.asm_3473a
|
||||
.SkipStab
|
||||
ld a, BATTLE_VARS_MOVE_TYPE
|
||||
call GetBattleVar
|
||||
ld b, a
|
||||
ld hl, TypeMatchup
|
||||
|
||||
.asm_34743
|
||||
.TypesLoop
|
||||
ld a, [hli]
|
||||
|
||||
cp $ff
|
||||
|
@ -1426,38 +1426,39 @@ BattleCommand_CalcDamageTypeMultiplier: ; 346d2
|
|||
|
||||
; foresight
|
||||
cp $fe
|
||||
jr nz, .asm_34757
|
||||
jr nz, .SkipForesightCheck
|
||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||
call GetBattleVar
|
||||
bit SUBSTATUS_IDENTIFIED, a
|
||||
jr nz, .end
|
||||
|
||||
jr .asm_34743
|
||||
jr .TypesLoop
|
||||
|
||||
.asm_34757
|
||||
.SkipForesightCheck
|
||||
cp b
|
||||
jr nz, .asm_347b3
|
||||
jr nz, .SkipType
|
||||
ld a, [hl]
|
||||
cp d
|
||||
jr z, .asm_34763
|
||||
jr z, .GotMatchup
|
||||
cp e
|
||||
jr z, .asm_34763
|
||||
jr .asm_347b3
|
||||
jr z, .GotMatchup
|
||||
jr .SkipType
|
||||
|
||||
.asm_34763
|
||||
.GotMatchup
|
||||
push hl
|
||||
push bc
|
||||
inc hl
|
||||
ld a, [TypeModifier]
|
||||
and %10000000
|
||||
ld b, a
|
||||
; If the target is immune to the move, treat it as a miss and calculate the damage as 0
|
||||
ld a, [hl]
|
||||
and a
|
||||
jr nz, .asm_34775
|
||||
jr nz, .NotImmune
|
||||
inc a
|
||||
ld [AttackMissed], a
|
||||
xor a
|
||||
.asm_34775
|
||||
.NotImmune
|
||||
ld [hMultiplier], a
|
||||
add b
|
||||
ld [TypeModifier], a
|
||||
|
@ -1480,34 +1481,35 @@ BattleCommand_CalcDamageTypeMultiplier: ; 346d2
|
|||
ld b, a
|
||||
ld a, [hProduct + 3]
|
||||
or b
|
||||
jr z, .asm_347ab
|
||||
jr z, .ok ; This is a very convoluted way to get back that we've essentially dealt no damage.
|
||||
|
||||
ld a, $a
|
||||
; Take the product and divide it by 10.
|
||||
ld a, 10
|
||||
ld [hDivisor], a
|
||||
ld b, $4
|
||||
ld b, 4
|
||||
call Divide
|
||||
ld a, [hQuotient + 1]
|
||||
ld b, a
|
||||
ld a, [hQuotient + 2]
|
||||
or b
|
||||
jr nz, .asm_347ab
|
||||
jr nz, .ok
|
||||
|
||||
ld a, $1
|
||||
ld [$ffb6], a
|
||||
ld a, 1
|
||||
ld [hMultiplicand + 2], a
|
||||
|
||||
.asm_347ab
|
||||
ld a, [$ffb5]
|
||||
.ok
|
||||
ld a, [hMultiplicand + 1]
|
||||
ld [hli], a
|
||||
ld a, [$ffb6]
|
||||
ld a, [hMultiplicand + 2]
|
||||
ld [hl], a
|
||||
pop bc
|
||||
pop hl
|
||||
|
||||
.asm_347b3
|
||||
.SkipType
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
jr .asm_34743
|
||||
jr .TypesLoop
|
||||
|
||||
.end
|
||||
call HowEffectiveIsTheMovetypeAgainstTheEnemyPkmn
|
||||
|
@ -1545,32 +1547,32 @@ Function347d3: ; 347d3
|
|||
ld a, 10 ; 1.0
|
||||
ld [wd265], a
|
||||
ld hl, TypeMatchup
|
||||
.asm_347e7
|
||||
.TypesLoop
|
||||
ld a, [hli]
|
||||
cp $ff
|
||||
jr z, .asm_3482f
|
||||
jr z, .End
|
||||
cp $fe
|
||||
jr nz, .asm_347fb
|
||||
jr nz, .Next
|
||||
ld a, BATTLE_VARS_SUBSTATUS1_OPP
|
||||
call GetBattleVar
|
||||
bit SUBSTATUS_IDENTIFIED, a
|
||||
jr nz, .asm_3482f
|
||||
jr .asm_347e7
|
||||
.asm_347fb
|
||||
jr nz, .End
|
||||
jr .TypesLoop
|
||||
.Next
|
||||
cp d
|
||||
jr nz, .asm_34807
|
||||
jr nz, .Nope
|
||||
ld a, [hli]
|
||||
cp b
|
||||
jr z, .asm_3480b
|
||||
jr z, .Yup
|
||||
cp c
|
||||
jr z, .asm_3480b
|
||||
jr .asm_34808
|
||||
.asm_34807
|
||||
jr z, .Yup
|
||||
jr .Nope2
|
||||
.Nope
|
||||
inc hl
|
||||
.asm_34808
|
||||
.Nope2
|
||||
inc hl
|
||||
jr .asm_347e7
|
||||
.asm_3480b
|
||||
jr .TypesLoop
|
||||
.Yup
|
||||
xor a
|
||||
ld [hDividend + 0], a
|
||||
ld [hMultiplicand + 0], a
|
||||
|
@ -1588,9 +1590,9 @@ Function347d3: ; 347d3
|
|||
pop bc
|
||||
ld a, [hQuotient + 2]
|
||||
ld [wd265], a
|
||||
jr .asm_347e7
|
||||
jr .TypesLoop
|
||||
|
||||
.asm_3482f
|
||||
.End
|
||||
pop bc
|
||||
pop de
|
||||
pop hl
|
||||
|
@ -1603,14 +1605,14 @@ BattleCommanda3: ; 34833
|
|||
ld a, [wd265]
|
||||
and a
|
||||
ld a, 10 ; 1.0
|
||||
jr nz, .asm_3484a
|
||||
jr nz, .skip
|
||||
call ResetDamage
|
||||
xor a
|
||||
ld [TypeModifier], a
|
||||
inc a
|
||||
ld [AttackMissed], a
|
||||
ret
|
||||
.asm_3484a
|
||||
.skip
|
||||
ld [wd265], a
|
||||
ret
|
||||
; 3484e
|
||||
|
@ -6098,7 +6100,7 @@ BattleCommand7d: ; 361e0
|
|||
jr BattleCommand1c
|
||||
BattleCommand1c: ; 361e4
|
||||
; statup
|
||||
call Function361ef
|
||||
call CheckIfStatCanBeRaised
|
||||
ld a, [FailedMessage]
|
||||
and a
|
||||
ret nz
|
||||
|
@ -6106,7 +6108,7 @@ BattleCommand1c: ; 361e4
|
|||
; 361ef
|
||||
|
||||
|
||||
Function361ef: ; 361ef
|
||||
CheckIfStatCanBeRaised: ; 361ef
|
||||
ld a, b
|
||||
ld [LoweredStat], a
|
||||
ld hl, PlayerStatLevels
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
Functionfbd54: ; fbd54
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ld a, [hBattleTurn] ; $ff00+$e4
|
||||
and a
|
||||
jr z, .asm_fbd61
|
||||
call Functionfbd96
|
||||
jr .asm_fbd64
|
||||
.asm_fbd61
|
||||
call Functionfbd9d
|
||||
.asm_fbd64
|
||||
call ClearBox
|
||||
jr Functionfbd91
|
||||
|
||||
Functionfbd69: ; fbd69 (3e:7d69)
|
||||
callba BattleCommanda6
|
||||
jr Functionfbd77
|
||||
|
||||
Functionfbd71: ; fbd71 (3e:7d71)
|
||||
callba BattleCommanda7
|
||||
|
||||
Functionfbd77: ; fbd77 (3e:7d77)
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ld a, [hBattleTurn] ; $ff00+$e4
|
||||
and a
|
||||
jr z, .asm_fbd85
|
||||
call Functionfbd96
|
||||
xor a
|
||||
jr .asm_fbd8a
|
||||
.asm_fbd85
|
||||
call Functionfbd9d
|
||||
ld a, $31
|
||||
.asm_fbd8a
|
||||
ld [$ffad], a
|
||||
predef FillBox
|
||||
Functionfbd91: ; fbd91 (3e:7d91)
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ret
|
||||
|
||||
Functionfbd96: ; fbd96 (3e:7d96)
|
||||
hlcoord 12, 0
|
||||
lb bc, 7, 7
|
||||
ret
|
||||
|
||||
Functionfbd9d: ; fbd9d (3e:7d9d)
|
||||
hlcoord 2, 6
|
||||
lb bc, 6, 6
|
||||
ret
|
||||
|
||||
|
||||
DoWeatherModifiers: ; fbda4
|
||||
|
||||
ld de, .WeatherTypeModifiers
|
||||
ld a, [Weather]
|
||||
ld b, a
|
||||
ld a, [wd265] ; move type
|
||||
ld c, a
|
||||
|
||||
.CheckWeatherType
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
jr z, .asm_fbdc0
|
||||
|
||||
cp b
|
||||
jr nz, .NextWeatherType
|
||||
|
||||
ld a, [de]
|
||||
cp c
|
||||
jr z, .ApplyModifier
|
||||
|
||||
.NextWeatherType
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
jr .CheckWeatherType
|
||||
|
||||
|
||||
.asm_fbdc0
|
||||
ld de, .WeatherMoveModifiers
|
||||
|
||||
ld a, BATTLE_VARS_MOVE_EFFECT
|
||||
call GetBattleVar
|
||||
ld c, a
|
||||
|
||||
.CheckWeatherMove
|
||||
ld a, [de]
|
||||
inc de
|
||||
cp $ff
|
||||
jr z, .done
|
||||
|
||||
cp b
|
||||
jr nz, .NextWeatherMove
|
||||
|
||||
ld a, [de]
|
||||
cp c
|
||||
jr z, .ApplyModifier
|
||||
|
||||
.NextWeatherMove
|
||||
rept 2
|
||||
inc de
|
||||
endr
|
||||
jr .CheckWeatherMove
|
||||
|
||||
.ApplyModifier
|
||||
xor a
|
||||
ld [hMultiplicand + 0], a
|
||||
ld hl, CurDamage
|
||||
ld a, [hli]
|
||||
ld [hMultiplicand + 1], a
|
||||
ld a, [hl]
|
||||
ld [hMultiplicand + 2], a
|
||||
|
||||
inc de
|
||||
ld a, [de]
|
||||
ld [hMultiplier], a
|
||||
|
||||
call Multiply
|
||||
|
||||
ld a, 10
|
||||
ld [hDivisor], a
|
||||
ld b, $4
|
||||
call Divide
|
||||
|
||||
ld a, [hQuotient + 0]
|
||||
and a
|
||||
ld bc, -1
|
||||
jr nz, .Update
|
||||
|
||||
ld a, [hQuotient + 1]
|
||||
ld b, a
|
||||
ld a, [hQuotient + 2]
|
||||
ld c, a
|
||||
or b
|
||||
jr nz, .Update
|
||||
|
||||
ld bc, 1
|
||||
|
||||
.Update
|
||||
ld a, b
|
||||
ld [CurDamage], a
|
||||
ld a, c
|
||||
ld [CurDamage + 1], a
|
||||
|
||||
.done
|
||||
ret
|
||||
|
||||
.WeatherTypeModifiers
|
||||
db WEATHER_RAIN, WATER, 15
|
||||
db WEATHER_RAIN, FIRE, 05
|
||||
db WEATHER_SUN, FIRE, 15
|
||||
db WEATHER_SUN, WATER, 05
|
||||
db $ff
|
||||
|
||||
.WeatherMoveModifiers
|
||||
db WEATHER_RAIN, EFFECT_SOLARBEAM, 05
|
||||
db $ff
|
||||
; fbe24
|
||||
|
||||
|
||||
DoBadgeTypeBoosts: ; fbe24
|
||||
ld a, [InLinkBattle]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
ld a, [InBattleTowerBattle]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
ld a, [hBattleTurn]
|
||||
and a
|
||||
ret nz
|
||||
|
||||
push de
|
||||
push bc
|
||||
|
||||
ld hl, .BadgeTypes
|
||||
|
||||
ld a, [KantoBadges]
|
||||
ld b, a
|
||||
ld a, [JohtoBadges]
|
||||
ld c, a
|
||||
|
||||
.CheckBadge
|
||||
ld a, [hl]
|
||||
cp $ff
|
||||
jr z, .done
|
||||
|
||||
srl b
|
||||
rr c
|
||||
jr nc, .NextBadge
|
||||
|
||||
ld a, [wd265] ; move type
|
||||
cp [hl]
|
||||
jr z, .ApplyBoost
|
||||
|
||||
.NextBadge
|
||||
inc hl
|
||||
jr .CheckBadge
|
||||
|
||||
.ApplyBoost
|
||||
ld a, [CurDamage]
|
||||
ld h, a
|
||||
ld d, a
|
||||
ld a, [CurDamage + 1]
|
||||
ld l, a
|
||||
ld e, a
|
||||
|
||||
srl d
|
||||
rr e
|
||||
srl d
|
||||
rr e
|
||||
srl d
|
||||
rr e
|
||||
|
||||
ld a, e
|
||||
or d
|
||||
jr nz, .asm_fbe6f
|
||||
ld e, 1
|
||||
|
||||
.asm_fbe6f
|
||||
add hl, de
|
||||
jr nc, .Update
|
||||
|
||||
ld hl, $ffff
|
||||
|
||||
.Update
|
||||
ld a, h
|
||||
ld [CurDamage], a
|
||||
ld a, l
|
||||
ld [CurDamage + 1], a
|
||||
|
||||
.done
|
||||
pop bc
|
||||
pop de
|
||||
ret
|
||||
|
||||
.BadgeTypes
|
||||
db FLYING ; zephyrbadge
|
||||
db BUG ; hivebadge
|
||||
db NORMAL ; plainbadge
|
||||
db GHOST ; fogbadge
|
||||
db STEEL ; mineralbadge
|
||||
db FIGHTING ; stormbadge
|
||||
db ICE ; glacierbadge
|
||||
db DRAGON ; risingbadge
|
||||
|
||||
db ROCK ; boulderbadge
|
||||
db WATER ; cascadebadge
|
||||
db ELECTRIC ; thunderbadge
|
||||
db GRASS ; rainbowbadge
|
||||
db POISON ; soulbadge
|
||||
db PSYCHIC ; marshbadge
|
||||
db FIRE ; volcanobadge
|
||||
db GROUND ; earthbadge
|
||||
db $ff
|
||||
; fbe91
|
|
@ -51,35 +51,36 @@ const_value = 1
|
|||
const SET_UP_ORNAMENT
|
||||
const PUT_AWAY_ORNAMENT
|
||||
|
||||
const_value = 2
|
||||
const_value = 1
|
||||
const DECO_01
|
||||
const DECO_FEATHERY_BED ; 2
|
||||
const DECO_PINK_BED ; 3
|
||||
const DECO_POLKADOT_BED ; 4
|
||||
const DECO_PIKACHU_BED ; 5
|
||||
const_value = const_value + 1
|
||||
const DECO_06
|
||||
const DECO_RED_CARPET ; 7
|
||||
const DECO_BLUE_CARPET ; 8
|
||||
const DECO_YELLOW_CARPET ; 9
|
||||
const DECO_GREEN_CARPET ; a
|
||||
const_value = const_value + 1
|
||||
const DECO_0B
|
||||
const DECO_MAGNAPLANT ; c
|
||||
const DECO_TROPICPLANT ; d
|
||||
const DECO_JUMBOPLANT ; e
|
||||
const_value = const_value + 1
|
||||
const DECO_0F
|
||||
const DECO_TOWN_MAP ; 10
|
||||
const DECO_PIKACHU_POSTER ; 11
|
||||
const DECO_CLEFAIRY_POSTER ; 12
|
||||
const DECO_JIGGLYPUFF_POSTER ; 13
|
||||
const_value = const_value + 1
|
||||
const DECO_14
|
||||
const DECO_FAMICOM ; 15
|
||||
const DECO_SNES ; 16
|
||||
const DECO_N64 ; 17
|
||||
const DECO_VIRTUAL_BOY ; 18
|
||||
const_value = const_value + 1
|
||||
const DECO_19
|
||||
const DECO_BIG_SNORLAX_DOLL ; 1a
|
||||
const DECO_BIG_ONIX_DOLL ; 1b
|
||||
const DECO_BIG_LAPRAS_DOLL ; 1c
|
||||
const_value = const_value + 1
|
||||
const DECO_1D
|
||||
const DECO_PIKACHU_DOLL ; 1e
|
||||
const DECO_SURF_PIKACHU_DOLL ; 1f
|
||||
const DECO_CLEFAIRY_DOLL ; 20
|
||||
|
|
|
@ -113,3 +113,36 @@ BATTLETOWER_NROFPKMNS EQU 3
|
|||
BATTLETOWER_TRAINERDATALENGTH EQU $24
|
||||
BATTLETOWER_NROFTRAINERS EQU 7
|
||||
|
||||
NUM_WILDMONS_PER_AREA_TIME_OF_DAY EQU 7
|
||||
WILDMON_GRASS_STRUCTURE_LENGTH EQU 2 + 3 * (1 + 2 * NUM_WILDMONS_PER_AREA_TIME_OF_DAY)
|
||||
|
||||
|
||||
PRINTNUM_MONEY_F EQU 5
|
||||
PRINTNUM_RIGHTALIGN_F EQU 6
|
||||
PRINTNUM_LEADINGZEROS_F EQU 7
|
||||
|
||||
PRINTNUM_MONEY EQU 1 << PRINTNUM_MONEY_F
|
||||
PRINTNUM_RIGHTALIGN EQU 1 << PRINTNUM_RIGHTALIGN_F
|
||||
PRINTNUM_LEADINGZEROS EQU 1 << PRINTNUM_LEADINGZEROS_F
|
||||
|
||||
const_value = 1
|
||||
const HAPPINESS_GAINLEVEL ; 01
|
||||
const HAPPINESS_USEDITEM ; 02
|
||||
const HAPPINESS_USEDXITEM ; 03
|
||||
const HAPPINESS_GYMBATTLE ; 04
|
||||
const HAPPINESS_LEARNMOVE ; 05
|
||||
const HAPPINESS_FAINTED ; 06
|
||||
const HAPPINESS_POISONFAINT ; 07
|
||||
const HAPPINESS_BEATENBYSTRONGFOE ; 08
|
||||
const HAPPINESS_YOUNGCUT1 ; 09
|
||||
const HAPPINESS_YOUNGCUT2 ; 0a
|
||||
const HAPPINESS_YOUNGCUT3 ; 0b
|
||||
const HAPPINESS_OLDERCUT1 ; 0c
|
||||
const HAPPINESS_OLDERCUT2 ; 0d
|
||||
const HAPPINESS_OLDERCUT3 ; 0e
|
||||
const HAPPINESS_BITTERPOWDER ; 0f
|
||||
const HAPPINESS_ENERGYROOT ; 10
|
||||
const HAPPINESS_REVIVALHERB ; 11
|
||||
const HAPPINESS_MASSAGE ; 12
|
||||
const HAPPINESS_GAINLEVELATHOME ; 13
|
||||
|
||||
|
|
|
@ -1,15 +1,92 @@
|
|||
const_def
|
||||
const OAKS_POKEMON_TALK
|
||||
const POKEDEX_SHOW
|
||||
const POKEMON_MUSIC
|
||||
const LUCKY_CHANNEL
|
||||
const BUENAS_PASSWORD
|
||||
const PLACES_AND_PEOPLE
|
||||
const LETS_ALL_SING
|
||||
const ROCKET_RADIO
|
||||
const POKE_FLUTE_RADIO
|
||||
const UNOWN_RADIO
|
||||
const EVOLUTION_RADIO
|
||||
const OAKS_POKEMON_TALK ; $00
|
||||
const POKEDEX_SHOW ; $01
|
||||
const POKEMON_MUSIC ; $02
|
||||
const LUCKY_CHANNEL ; $03
|
||||
const BUENAS_PASSWORD ; $04
|
||||
const PLACES_AND_PEOPLE ; $05
|
||||
const LETS_ALL_SING ; $06
|
||||
const ROCKET_RADIO ; $07
|
||||
const POKE_FLUTE_RADIO ; $08
|
||||
const UNOWN_RADIO ; $09
|
||||
const EVOLUTION_RADIO ; $0a
|
||||
const OAKS_POKEMON_TALK_2 ; $0b
|
||||
const OAKS_POKEMON_TALK_3 ; $0c
|
||||
const OAKS_POKEMON_TALK_4 ; $0d
|
||||
const OAKS_POKEMON_TALK_5 ; $0e
|
||||
const OAKS_POKEMON_TALK_6 ; $0f
|
||||
const OAKS_POKEMON_TALK_7 ; $10
|
||||
const OAKS_POKEMON_TALK_8 ; $11
|
||||
const OAKS_POKEMON_TALK_9 ; $12
|
||||
const POKEDEX_SHOW_2 ; $13
|
||||
const POKEDEX_SHOW_3 ; $14
|
||||
const POKEDEX_SHOW_4 ; $15
|
||||
const POKEDEX_SHOW_5 ; $16
|
||||
const POKEMON_MUSIC_2 ; $17
|
||||
const POKEMON_MUSIC_3 ; $18
|
||||
const POKEMON_MUSIC_4 ; $19
|
||||
const POKEMON_MUSIC_5 ; $1a
|
||||
const POKEMON_MUSIC_6 ; $1b
|
||||
const POKEMON_MUSIC_7 ; $1c
|
||||
const LETS_ALL_SING_2 ; $1d
|
||||
const LUCKY_NUMBER_SHOW_2 ; $1e
|
||||
const LUCKY_NUMBER_SHOW_3 ; $1f
|
||||
const LUCKY_NUMBER_SHOW_4 ; $20
|
||||
const LUCKY_NUMBER_SHOW_5 ; $21
|
||||
const LUCKY_NUMBER_SHOW_6 ; $22
|
||||
const LUCKY_NUMBER_SHOW_7 ; $23
|
||||
const LUCKY_NUMBER_SHOW_8 ; $24
|
||||
const LUCKY_NUMBER_SHOW_9 ; $25
|
||||
const LUCKY_NUMBER_SHOW_10 ; $26
|
||||
const LUCKY_NUMBER_SHOW_11 ; $27
|
||||
const LUCKY_NUMBER_SHOW_12 ; $28
|
||||
const LUCKY_NUMBER_SHOW_13 ; $29
|
||||
const LUCKY_NUMBER_SHOW_14 ; $2a
|
||||
const LUCKY_NUMBER_SHOW_15 ; $2b
|
||||
const PLACES_AND_PEOPLE_2 ; $2c
|
||||
const PLACES_AND_PEOPLE_3 ; $2d
|
||||
const PLACES_AND_PEOPLE_4 ; $2e
|
||||
const PLACES_AND_PEOPLE_5 ; $2f
|
||||
const PLACES_AND_PEOPLE_6 ; $30
|
||||
const PLACES_AND_PEOPLE_7 ; $31
|
||||
const ROCKET_RADIO_2 ; $32
|
||||
const ROCKET_RADIO_3 ; $33
|
||||
const ROCKET_RADIO_4 ; $34
|
||||
const ROCKET_RADIO_5 ; $35
|
||||
const ROCKET_RADIO_6 ; $36
|
||||
const ROCKET_RADIO_7 ; $37
|
||||
const ROCKET_RADIO_8 ; $38
|
||||
const ROCKET_RADIO_9 ; $39
|
||||
const ROCKET_RADIO_10 ; $3a
|
||||
const OAKS_POKEMON_TALK_10 ; $3b
|
||||
const OAKS_POKEMON_TALK_11 ; $3c
|
||||
const OAKS_POKEMON_TALK_12 ; $3d
|
||||
const OAKS_POKEMON_TALK_13 ; $3e
|
||||
const OAKS_POKEMON_TALK_14 ; $3f
|
||||
const BUENAS_PASSWORD_2 ; $40
|
||||
const BUENAS_PASSWORD_3 ; $41
|
||||
const BUENAS_PASSWORD_4 ; $42
|
||||
const BUENAS_PASSWORD_5 ; $43
|
||||
const BUENAS_PASSWORD_6 ; $44
|
||||
const BUENAS_PASSWORD_7 ; $45
|
||||
const BUENAS_PASSWORD_8 ; $46
|
||||
const BUENAS_PASSWORD_9 ; $47
|
||||
const BUENAS_PASSWORD_10 ; $48
|
||||
const BUENAS_PASSWORD_11 ; $49
|
||||
const BUENAS_PASSWORD_12 ; $4a
|
||||
const BUENAS_PASSWORD_13 ; $4b
|
||||
const BUENAS_PASSWORD_14 ; $4c
|
||||
const BUENAS_PASSWORD_15 ; $4d
|
||||
const BUENAS_PASSWORD_16 ; $4e
|
||||
const BUENAS_PASSWORD_17 ; $4f
|
||||
const BUENAS_PASSWORD_18 ; $50
|
||||
const BUENAS_PASSWORD_19 ; $51
|
||||
const BUENAS_PASSWORD_20 ; $52
|
||||
const BUENAS_PASSWORD_21 ; $53
|
||||
const RADIO_SCROLL ; $54
|
||||
const POKEDEX_SHOW_6 ; $55
|
||||
const POKEDEX_SHOW_7 ; $56
|
||||
const POKEDEX_SHOW_8 ; $57
|
||||
|
||||
const_def
|
||||
const BUENA_MON
|
||||
|
|
|
@ -72,3 +72,7 @@ PLAYER_SURF_PIKA EQU 8
|
|||
|
||||
OBJECT_STRUCT_LENGTH EQU 40
|
||||
NUM_OBJECT_STRUCTS EQU 13
|
||||
|
||||
; After-Champion Spawn
|
||||
SPAWN_LANCE EQU 1
|
||||
SPAWN_RED EQU 2
|
||||
|
|
|
@ -70,12 +70,12 @@ Function1dd7ae: ; 1dd7ae
|
|||
call PlaceString
|
||||
hlcoord 12, 15
|
||||
ld de, GameTimeHours
|
||||
ld bc, $0204
|
||||
lb bc, 2, 4
|
||||
call PrintNum
|
||||
ld [hl], $67
|
||||
inc hl
|
||||
ld de, GameTimeMinutes
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
; 1dd7f0
|
||||
|
|
|
@ -97,7 +97,7 @@
|
|||
dwb VisitedSpawns + 3, %00000100 ; silver cave
|
||||
dwb VisitedSpawns + 3, %00010000 ; unused
|
||||
|
||||
dwb wdc9d, %00000001 ; lucky number show
|
||||
dwb wLuckyNumberShowFlag, %00000001 ; lucky number show
|
||||
dwb StatusFlags2, %00001000
|
||||
|
||||
dwb DailyFlags, %00000001 ; kurt making balls ; $50
|
||||
|
|
|
@ -121,7 +121,7 @@ StartMap: ; 96724
|
|||
xor a
|
||||
ld [ScriptRunning], a
|
||||
ld hl, MapStatus
|
||||
ld bc, $3e
|
||||
ld bc, $3e ; 62
|
||||
call ByteFill
|
||||
callba Function113e5
|
||||
call ClearJoypad
|
||||
|
@ -133,17 +133,17 @@ EnterMap: ; 9673e
|
|||
xor a
|
||||
ld [wd453], a
|
||||
ld [wd454], a
|
||||
call Function968d1
|
||||
call SetUpFiveStepWildEncounterCooldown
|
||||
callba RunMapSetupScript
|
||||
call ClearAllScriptFlags3
|
||||
|
||||
ld a, [$ff9f]
|
||||
ld a, [hMapEntryMethod]
|
||||
cp $f7
|
||||
jr nz, .dontset
|
||||
call SetAll_ScriptFlags3
|
||||
.dontset
|
||||
|
||||
ld a, [$ff9f]
|
||||
ld a, [hMapEntryMethod]
|
||||
cp $f3
|
||||
jr nz, .dontresetpoison
|
||||
xor a
|
||||
|
@ -151,7 +151,7 @@ EnterMap: ; 9673e
|
|||
.dontresetpoison
|
||||
|
||||
xor a
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
ld a, 2 ; HandleMap
|
||||
ld [MapStatus], a
|
||||
ret
|
||||
|
@ -382,9 +382,9 @@ CheckTileEvent: ; 96874
|
|||
call CheckBit4_ScriptFlags3
|
||||
jr z, .ok
|
||||
|
||||
call RockSmashEncounter
|
||||
call RandomEncounter
|
||||
ret c
|
||||
jr .ok
|
||||
jr .ok ; pointless
|
||||
|
||||
.ok
|
||||
xor a
|
||||
|
@ -419,8 +419,8 @@ CheckTileEvent: ; 96874
|
|||
; 968c7
|
||||
|
||||
|
||||
Function968c7:: ; 968c7
|
||||
ld hl, wd452
|
||||
CheckWildEncounterCooldown:: ; 968c7
|
||||
ld hl, wWildEncounterCooldown
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret z
|
||||
|
@ -430,9 +430,9 @@ Function968c7:: ; 968c7
|
|||
ret
|
||||
; 968d1
|
||||
|
||||
Function968d1: ; 968d1
|
||||
SetUpFiveStepWildEncounterCooldown: ; 968d1
|
||||
ld a, 5
|
||||
ld [wd452], a
|
||||
ld [wWildEncounterCooldown], a
|
||||
ret
|
||||
; 968d7
|
||||
|
||||
|
@ -441,11 +441,11 @@ Function968d7: ; 968d7
|
|||
; 968d8
|
||||
|
||||
Function968d8: ; 968d8
|
||||
ld a, [wd452]
|
||||
ld a, [wWildEncounterCooldown]
|
||||
cp 2
|
||||
ret nc
|
||||
ld a, 2
|
||||
ld [wd452], a
|
||||
ld [wWildEncounterCooldown], a
|
||||
ret
|
||||
; 968e4
|
||||
|
||||
|
|
|
@ -95,10 +95,10 @@ CheckFacingTileEvent:: ; 97c5f
|
|||
; 97cc0
|
||||
|
||||
|
||||
RockSmashEncounter:: ; 97cc0
|
||||
; Rock Smash encounter
|
||||
RandomEncounter:: ; 97cc0
|
||||
; Random encounter
|
||||
|
||||
call Function968c7
|
||||
call CheckWildEncounterCooldown
|
||||
jr c, .nope
|
||||
call CanUseSweetScent
|
||||
jr nc, .nope
|
||||
|
@ -120,8 +120,8 @@ RockSmashEncounter:: ; 97cc0
|
|||
ret
|
||||
|
||||
.ok
|
||||
ld a, BANK(RockSmashBattleScript)
|
||||
ld hl, RockSmashBattleScript
|
||||
ld a, BANK(WildBattleScript)
|
||||
ld hl, WildBattleScript
|
||||
jr .done
|
||||
|
||||
.ok_bug_contest
|
||||
|
@ -135,7 +135,7 @@ RockSmashEncounter:: ; 97cc0
|
|||
ret
|
||||
; 97cf9
|
||||
|
||||
RockSmashBattleScript: ; 97cf9
|
||||
WildBattleScript: ; 97cf9
|
||||
battlecheck
|
||||
startbattle
|
||||
returnafterbattle
|
||||
|
|
|
@ -1499,7 +1499,7 @@ Function4af0: ; 4af0
|
|||
add hl, bc
|
||||
ld [hl], 2
|
||||
ld hl, wd4cf
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
cp [hl]
|
||||
jr z, .ok
|
||||
ld hl, OBJECT_09
|
||||
|
@ -2508,7 +2508,7 @@ Function54b8: ; 54b8
|
|||
ret z
|
||||
ld a, [wd4cd]
|
||||
ld d, a
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
cp d
|
||||
ret nz
|
||||
ld a, e
|
||||
|
@ -2651,7 +2651,7 @@ Function5565: ; 5565
|
|||
|
||||
Function5579: ; 5579
|
||||
push bc
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
ld c, a
|
||||
call Function5582
|
||||
pop bc
|
||||
|
@ -2712,7 +2712,7 @@ Function55b9: ; 55b9
|
|||
ld [hli], a
|
||||
ld a, [de]
|
||||
ld [hli], a
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
ld [hli], a
|
||||
push hl
|
||||
ld hl, OBJECT_MAP_X
|
||||
|
@ -2737,7 +2737,7 @@ Function55e0:: ; 55e0
|
|||
ld bc, ObjectStructs
|
||||
xor a
|
||||
.loop
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
call GetObjectSprite
|
||||
jr z, .ok
|
||||
call Function565c
|
||||
|
@ -2747,7 +2747,7 @@ Function55e0:: ; 55e0
|
|||
add hl, bc
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
inc a
|
||||
cp NUM_OBJECT_STRUCTS
|
||||
jr nz, .loop
|
||||
|
@ -2801,13 +2801,13 @@ Function5645: ; 5645
|
|||
xor a
|
||||
ld bc, ObjectStructs
|
||||
.loop
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
call Function5680
|
||||
ld hl, OBJECT_STRUCT_LENGTH
|
||||
add hl, bc
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
inc a
|
||||
cp NUM_OBJECT_STRUCTS
|
||||
jr nz, .loop
|
||||
|
@ -3032,7 +3032,7 @@ Function5781: ; 5781
|
|||
ld bc, ObjectStructs
|
||||
xor a
|
||||
.loop
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
call GetObjectSprite
|
||||
jr z, .next
|
||||
call Function437b
|
||||
|
@ -3042,7 +3042,7 @@ Function5781: ; 5781
|
|||
add hl, bc
|
||||
ld b, h
|
||||
ld c, l
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
inc a
|
||||
cp NUM_OBJECT_STRUCTS
|
||||
jr nz, .loop
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
RunMapSetupScript:: ; 15363
|
||||
ld a, [$ff9f]
|
||||
ld a, [hMapEntryMethod]
|
||||
and $f
|
||||
dec a
|
||||
ld c, a
|
||||
|
|
|
@ -217,7 +217,7 @@ Function4013c: ; 4013c (10:413c)
|
|||
call ByteFill
|
||||
callba Function1de171
|
||||
hlcoord 0, 17
|
||||
ld de, Unknown_407f2
|
||||
ld de, String_START_SEARCH
|
||||
call Function40acd
|
||||
ld a, $7
|
||||
ld [wc7d3], a
|
||||
|
@ -246,7 +246,7 @@ Function4013c: ; 4013c (10:413c)
|
|||
call Function41148
|
||||
callba Function1de171
|
||||
hlcoord 0, 17
|
||||
ld de, Unknown_407f2
|
||||
ld de, String_START_SEARCH
|
||||
call Function40acd
|
||||
ld a, $7
|
||||
ld [wc7d3], a
|
||||
|
@ -1068,7 +1068,7 @@ Function40741: ; 40741
|
|||
|
||||
Function4074c: ; 4074c (10:474c)
|
||||
hlcoord 0, 17
|
||||
ld de, Unknown_407f2
|
||||
ld de, String_START_SEARCH
|
||||
call Function40acd
|
||||
ld a, $32
|
||||
hlcoord 0, 0
|
||||
|
@ -1081,27 +1081,27 @@ Function4074c: ; 4074c (10:474c)
|
|||
ld bc, $607
|
||||
call Function40ad5
|
||||
hlcoord 1, 11
|
||||
ld de, Unknown_407e1
|
||||
ld de, String_SEEN
|
||||
call Function40acd
|
||||
ld hl, PokedexSeen ; wdeb9 (aliases: EndPokedexSeen)
|
||||
ld b, EndPokedexSeen - PokedexSeen
|
||||
call CountSetBits
|
||||
ld de, wd265
|
||||
hlcoord 5, 12
|
||||
ld bc, $103
|
||||
lb bc, 1, 3
|
||||
call PrintNum
|
||||
hlcoord 1, 14
|
||||
ld de, Unknown_407e6
|
||||
ld de, String_OWN
|
||||
call Function40acd
|
||||
ld hl, PokedexCaught
|
||||
ld b, EndPokedexCaught - PokedexCaught
|
||||
call CountSetBits
|
||||
ld de, wd265
|
||||
hlcoord 5, 15
|
||||
ld bc, $103
|
||||
lb bc, 1, 3
|
||||
call PrintNum
|
||||
hlcoord 1, 17
|
||||
ld de, Unknown_407ea
|
||||
ld de, String_SELECT_OPTION
|
||||
call Function40acd
|
||||
hlcoord 8, 1
|
||||
ld b, $7
|
||||
|
@ -1123,13 +1123,13 @@ Function4074c: ; 4074c (10:474c)
|
|||
ret
|
||||
; 407e1 (10:47e1)
|
||||
|
||||
Unknown_407e1: ; 407e1
|
||||
String_SEEN: ; 407e1
|
||||
db "SEEN", $ff
|
||||
Unknown_407e6: ; 407e6
|
||||
String_OWN: ; 407e6
|
||||
db "OWN", $ff
|
||||
Unknown_407ea: ; 407ea
|
||||
String_SELECT_OPTION: ; 407ea
|
||||
db $3b, $48, $49, $4a, $44, $45, $46, $47 ; SELECT > OPTION
|
||||
Unknown_407f2: ; 407f2
|
||||
String_START_SEARCH: ; 407f2
|
||||
db $3c, $3b, $41, $42, $43, $4b, $4c, $4d, $4e, $3c, $ff ; START > SEARCH
|
||||
; 407fd
|
||||
|
||||
|
@ -1270,7 +1270,7 @@ Function40962: ; 40962 (10:4962)
|
|||
call PlaceString
|
||||
ld de, wc7d7
|
||||
hlcoord 1, 16
|
||||
ld bc, $103
|
||||
lb bc, 1, 3
|
||||
call PrintNum
|
||||
hlcoord 8, 0
|
||||
ld [hl], $59
|
||||
|
@ -1541,7 +1541,7 @@ Function40b6a: ; 40b6a (10:4b6a)
|
|||
ld de, -20
|
||||
add hl, de
|
||||
ld de, wd265
|
||||
ld bc, $8103
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
pop hl
|
||||
ret
|
||||
|
@ -2360,7 +2360,7 @@ Function413f5: ; 413f5 (10:53f5)
|
|||
ret
|
||||
|
||||
Function413fe: ; 413fe (10:53fe)
|
||||
jp Functionfb8
|
||||
jp FillBoxWithByte
|
||||
|
||||
Function41401: ; 41401 (10:5401)
|
||||
ld a, [rSVBK] ; $ff00+$70
|
||||
|
|
|
@ -36,7 +36,7 @@ PredefPointers:: ; 856b
|
|||
add_predef FlagPredef
|
||||
add_predef Functionc699
|
||||
add_predef FillPP
|
||||
add_predef AddPkmnToParty
|
||||
add_predef TryAddMonToParty
|
||||
add_predef Functionda96
|
||||
add_predef SentGetPkmnIntoFromBox
|
||||
add_predef SentPkmnIntoBox
|
||||
|
|
786
engine/radio.asm
786
engine/radio.asm
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,404 @@
|
|||
_UpdateRadioStation: ; 9163e (24:563e)
|
||||
jr UpdateRadioStation
|
||||
|
||||
Function91640: ; 91640 (24:5640)
|
||||
push bc
|
||||
call .TuningKnob
|
||||
pop bc
|
||||
ld a, [wRadioTuningKnob]
|
||||
ld hl, $6
|
||||
add hl, bc
|
||||
ld [hl], a
|
||||
ret
|
||||
|
||||
.TuningKnob: ; 9164e (24:564e)
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
jr nz, .down
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
jr nz, .up
|
||||
ret
|
||||
|
||||
.down
|
||||
ld hl, wRadioTuningKnob
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret z
|
||||
rept 2
|
||||
dec [hl]
|
||||
endr
|
||||
jr .update
|
||||
|
||||
.up
|
||||
ld hl, wRadioTuningKnob
|
||||
ld a, [hl]
|
||||
cp 80
|
||||
ret nc
|
||||
rept 2
|
||||
inc [hl]
|
||||
endr
|
||||
|
||||
.update
|
||||
|
||||
UpdateRadioStation: ; 9166f (24:566f)
|
||||
ld hl, wRadioTuningKnob
|
||||
ld d, [hl]
|
||||
ld hl, RadioChannels
|
||||
.loop
|
||||
ld a, [hli]
|
||||
cp -1
|
||||
jr z, .nostation
|
||||
cp d
|
||||
jr z, .foundstation
|
||||
rept 2
|
||||
inc hl
|
||||
endr
|
||||
jr .loop
|
||||
|
||||
.nostation
|
||||
call NoRadioStation
|
||||
ret
|
||||
|
||||
.foundstation
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, .returnafterstation
|
||||
push de
|
||||
jp [hl]
|
||||
.returnafterstation
|
||||
ld a, [wc6d9]
|
||||
and a
|
||||
ret z
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
hlcoord 2, 9
|
||||
call PlaceString
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a
|
||||
ret
|
||||
; 916a1 (24:56a1)
|
||||
|
||||
Function916a1: ; 916a1
|
||||
ld [wc6d9], a
|
||||
ld a, [hli]
|
||||
ld [wc6da], a
|
||||
ld a, [hli]
|
||||
ld [wc6db], a
|
||||
ret
|
||||
; 916ad
|
||||
|
||||
|
||||
RadioChannels:
|
||||
; frequencies and the shows that play on them.
|
||||
; frequency value given here = 4 × ingame_frequency − 2
|
||||
dbw 16, .PkmnTalkAndPokedexShow
|
||||
dbw 28, .PokemonMusic
|
||||
dbw 32, .LuckyChannel
|
||||
dbw 40, .BuenasPassword
|
||||
dbw 52, .RuinsOfAlphRadio
|
||||
dbw 64, .PlacesAndPeople
|
||||
dbw 72, .LetsAllSing
|
||||
dbw 78, .PokeFluteRadio
|
||||
dbw 80, .EvolutionRadio
|
||||
db $ff
|
||||
|
||||
.PkmnTalkAndPokedexShow
|
||||
; Pokédex Show in the morning
|
||||
; Oak's Pokémon Talk in the afternoon and evening
|
||||
call .InJohto
|
||||
jr nc, .NoSignal
|
||||
ld a, [TimeOfDay]
|
||||
and a
|
||||
jp z, LoadStation_PokedexShow
|
||||
jp LoadStation_OaksPokemonTalk
|
||||
|
||||
.PokemonMusic
|
||||
call .InJohto
|
||||
jr nc, .NoSignal
|
||||
jp LoadStation_PokemonMusic
|
||||
|
||||
.LuckyChannel
|
||||
call .InJohto
|
||||
jr nc, .NoSignal
|
||||
jp LoadStation_LuckyChannel
|
||||
|
||||
.BuenasPassword
|
||||
call .InJohto
|
||||
jr nc, .NoSignal
|
||||
jp LoadStation_BuenasPassword
|
||||
|
||||
.RuinsOfAlphRadio
|
||||
ld a, [wc6d8]
|
||||
cp RUINS_OF_ALPH
|
||||
jr nz, .NoSignal
|
||||
jp LoadStation_UnownRadio
|
||||
|
||||
.PlacesAndPeople
|
||||
call .InJohto
|
||||
jr c, .NoSignal
|
||||
ld a, [wPokegearFlags]
|
||||
bit 3, a
|
||||
jr z, .NoSignal
|
||||
jp LoadStation_PlacesAndPeople
|
||||
|
||||
.LetsAllSing
|
||||
call .InJohto
|
||||
jr c, .NoSignal
|
||||
ld a, [wPokegearFlags]
|
||||
bit 3, a
|
||||
jr z, .NoSignal
|
||||
jp LoadStation_LetsAllSing
|
||||
|
||||
.PokeFluteRadio
|
||||
call .InJohto
|
||||
jr c, .NoSignal
|
||||
ld a, [wPokegearFlags]
|
||||
bit 3, a
|
||||
jr z, .NoSignal
|
||||
jp LoadStation_PokeFluteRadio
|
||||
|
||||
.EvolutionRadio
|
||||
; This station airs in the Lake of Rage area when Rocket are still in Mahogany.
|
||||
|
||||
ld a, [StatusFlags]
|
||||
bit 4, a
|
||||
jr z, .NoSignal
|
||||
|
||||
ld a, [wc6d8]
|
||||
cp MAHOGANY_TOWN
|
||||
jr z, .ok
|
||||
cp ROUTE_43
|
||||
jr z, .ok
|
||||
cp LAKE_OF_RAGE
|
||||
jr nz, .NoSignal
|
||||
.ok
|
||||
jp LoadStation_EvolutionRadio
|
||||
|
||||
.NoSignal
|
||||
call NoRadioStation
|
||||
ret
|
||||
|
||||
.InJohto
|
||||
; if in Johto or on the S.S. Aqua, set carry
|
||||
; otherwise clear carry
|
||||
ld a, [wc6d8]
|
||||
cp FAST_SHIP
|
||||
jr z, .johto
|
||||
cp KANTO_LANDMARK
|
||||
jr c, .johto
|
||||
.kanto
|
||||
and a
|
||||
ret
|
||||
.johto
|
||||
scf
|
||||
ret
|
||||
|
||||
|
||||
|
||||
LoadStation_OaksPokemonTalk: ; 91753 (24:5753)
|
||||
xor a ; OAKS_POKEMON_TALK
|
||||
ld [wd002], a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, OaksPkmnTalkName
|
||||
ret
|
||||
|
||||
LoadStation_PokedexShow: ; 91766 (24:5766)
|
||||
ld a, POKEDEX_SHOW
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, PokedexShowName
|
||||
ret
|
||||
|
||||
LoadStation_PokemonMusic: ; 9177b (24:577b)
|
||||
ld a, POKEMON_MUSIC
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, PokemonMusicName
|
||||
ret
|
||||
|
||||
LoadStation_LuckyChannel: ; 91790 (24:5790)
|
||||
ld a, LUCKY_CHANNEL
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, LuckyChannelName
|
||||
ret
|
||||
|
||||
LoadStation_BuenasPassword: ; 917a5 (24:57a5)
|
||||
ld a, BUENAS_PASSWORD
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, NotBuenasPasswordName
|
||||
ld a, [StatusFlags2]
|
||||
bit 0, a
|
||||
ret z
|
||||
ld de, BuenasPasswordName
|
||||
ret
|
||||
; 917c3 (24:57c3)
|
||||
|
||||
BuenasPasswordName: db "BUENA'S PASSWORD@"
|
||||
NotBuenasPasswordName: db "@"
|
||||
|
||||
LoadStation_UnownRadio: ; 917d5 (24:57d5)
|
||||
ld a, UNOWN_RADIO
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, UnknownStationName
|
||||
ret
|
||||
|
||||
LoadStation_PlacesAndPeople: ; 917ea (24:57ea)
|
||||
ld a, PLACES_AND_PEOPLE
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, PlacesAndPeopleName
|
||||
ret
|
||||
|
||||
LoadStation_LetsAllSing: ; 917ff (24:57ff)
|
||||
ld a, LETS_ALL_SING
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, LetsAllSingName
|
||||
ret
|
||||
; 91814 (24:5814)
|
||||
|
||||
LoadStation_RocketRadio: ; 91814
|
||||
ld a, ROCKET_RADIO
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, LetsAllSingName
|
||||
ret
|
||||
; 91829
|
||||
|
||||
LoadStation_PokeFluteRadio: ; 91829 (24:5829)
|
||||
ld a, POKE_FLUTE_RADIO
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, PokeFluteStationName
|
||||
ret
|
||||
|
||||
LoadStation_EvolutionRadio: ; 9183e (24:583e)
|
||||
ld a, EVOLUTION_RADIO
|
||||
ld [wd002], a
|
||||
xor a
|
||||
ld [wd005], a
|
||||
ld a, BANK(PlayRadioShow)
|
||||
ld hl, PlayRadioShow
|
||||
call Radio_BackUpFarCallParams
|
||||
ld de, UnknownStationName
|
||||
ret
|
||||
; 91853 (24:5853)
|
||||
|
||||
LoadStation_Dummy: ; 91853
|
||||
ret
|
||||
|
||||
RadioMusicRestartDE: ; 91854 (24:5854)
|
||||
push de
|
||||
ld a, e
|
||||
ld [wc6dc], a
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
pop de
|
||||
ld a, e
|
||||
ld [wMapMusic], a
|
||||
call PlayMusic
|
||||
ret
|
||||
|
||||
RadioMusicRestartPokemonChannel: ; 91868 (24:5868)
|
||||
push de
|
||||
ld a, $fe
|
||||
ld [wc6dc], a
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
pop de
|
||||
ld de, MUSIC_POKEMON_CHANNEL
|
||||
call PlayMusic
|
||||
ret
|
||||
|
||||
Radio_BackUpFarCallParams: ; 9187c (24:587c)
|
||||
ld [wc6d9], a
|
||||
ld a, l
|
||||
ld [wc6da], a
|
||||
ld a, h
|
||||
ld [wc6db], a
|
||||
ret
|
||||
|
||||
NoRadioStation: ; 91888 (24:5888)
|
||||
call NoRadioMusic
|
||||
call NoRadioName
|
||||
xor a
|
||||
ld [wc6d9], a
|
||||
ld [wc6da], a
|
||||
ld [wc6db], a
|
||||
ld a, $1
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
ret
|
||||
|
||||
NoRadioMusic: ; 9189d (24:589d)
|
||||
ld de, MUSIC_NONE
|
||||
call PlayMusic
|
||||
ld a, $ff
|
||||
ld [wc6dc], a
|
||||
ret
|
||||
|
||||
NoRadioName: ; 918a9 (24:58a9)
|
||||
xor a
|
||||
ld [hBGMapMode], a ; $ff00+$d4
|
||||
hlcoord 1, 8
|
||||
ld bc, $312
|
||||
call ClearBox
|
||||
hlcoord 0, 12
|
||||
ld bc, $412
|
||||
call TextBox
|
||||
ret
|
||||
; 918bf
|
||||
|
||||
OaksPkmnTalkName: db "OAK's <PK><MN> Talk@"
|
||||
PokedexShowName: db "#DEX Show@"
|
||||
PokemonMusicName: db "#MON Music@"
|
||||
LuckyChannelName: db "Lucky Channel@"
|
||||
UnknownStationName: db "?????@"
|
||||
PlacesAndPeopleName: db "Places & People@"
|
||||
LetsAllSingName: db "Let's All Sing!@"
|
||||
PokeFluteStationName: db "# FLUTE@"
|
||||
; 9191c
|
|
@ -1258,7 +1258,7 @@ Script_appear: ; 0x972dd
|
|||
call GetScriptByte
|
||||
call GetScriptPerson
|
||||
call _CopyObjectStruct
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
ld b, 0 ; clear
|
||||
call ApplyEventActionAppearDisappear
|
||||
ret
|
||||
|
@ -1276,7 +1276,7 @@ Script_disappear: ; 0x972ee
|
|||
ld a, [hLastTalked]
|
||||
.ok
|
||||
call DeleteObjectStruct
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
ld b, 1 ; set
|
||||
call ApplyEventActionAppearDisappear
|
||||
callba RefreshMapAppearDisappear
|
||||
|
@ -1584,7 +1584,7 @@ Script_reloadmap: ; 0x97491
|
|||
xor a
|
||||
ld [wd459], a
|
||||
ld a, $f3
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
ld a, $1
|
||||
call LoadMapStatus
|
||||
call StopScript
|
||||
|
@ -2232,7 +2232,7 @@ Script_readmoney: ; 0x97732
|
|||
call ResetStringBuffer1
|
||||
call GetMoneyAccount
|
||||
ld hl, StringBuffer1
|
||||
ld bc, $4306
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 3, 6
|
||||
call PrintNum
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
|
@ -2246,7 +2246,7 @@ Script_readcoins: ; 0x97747
|
|||
call ResetStringBuffer1
|
||||
ld hl, StringBuffer1
|
||||
ld de, Coins
|
||||
ld bc, $4206
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 2, 6
|
||||
call PrintNum
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
|
@ -2260,7 +2260,7 @@ Script_RAM2MEM: ; 0x9775c
|
|||
call ResetStringBuffer1
|
||||
ld de, ScriptVar
|
||||
ld hl, StringBuffer1
|
||||
ld bc, $4103
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
call PrintNum
|
||||
ld de, StringBuffer1
|
||||
jp ConvertMemToText
|
||||
|
@ -2656,7 +2656,7 @@ Script_giveegg: ; 0x97968
|
|||
; level (DecimalParam)
|
||||
; if no room in the party, return 0 in ScriptVar; else, return 2
|
||||
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [ScriptVar], a
|
||||
ld [MonType], a
|
||||
call GetScriptByte
|
||||
|
@ -2839,7 +2839,7 @@ Script_warp: ; 0x97a1d
|
|||
ld a, -1
|
||||
ld [wd001], a
|
||||
ld a, -15
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
ld a, 1
|
||||
call LoadMapStatus
|
||||
call StopScript
|
||||
|
@ -2851,7 +2851,7 @@ Script_warp: ; 0x97a1d
|
|||
ld a, -1
|
||||
ld [wd001], a
|
||||
ld a, -5
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
ld a, 1
|
||||
call LoadMapStatus
|
||||
call StopScript
|
||||
|
@ -2994,7 +2994,7 @@ Script_newloadmap: ; 0x97b08
|
|||
; which_method (SingleByteParam)
|
||||
|
||||
call GetScriptByte
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
ld a, 1
|
||||
call LoadMapStatus
|
||||
call StopScript
|
||||
|
@ -3198,7 +3198,7 @@ Script_halloffame: ; 0x97bd5
|
|||
Script_credits: ; 0x97bf3
|
||||
; script command 0xa2
|
||||
|
||||
callba Function86455
|
||||
callba RedCredits
|
||||
; fallthrough
|
||||
|
||||
DisplayCredits:
|
||||
|
|
|
@ -102,9 +102,9 @@ SpecialsPointers:: ; c029
|
|||
add_special Function24b25
|
||||
add_special Function24b4e
|
||||
add_special Function24ae8
|
||||
add_special Function4d87a
|
||||
add_special Functionc434
|
||||
add_special Functionc422
|
||||
add_special Special_CheckForLuckyNumberWinners
|
||||
add_special Special_CheckLuckyNumberShowFlag
|
||||
add_special Special_ResetLuckyNumberShowFlag
|
||||
add_special Function4d9d3
|
||||
add_special Function88018
|
||||
add_special SpecialNameRater
|
||||
|
@ -117,9 +117,9 @@ SpecialsPointers:: ; c029
|
|||
add_special RunCallback_04
|
||||
add_special Functionfb841
|
||||
add_special SpecialSnorlaxAwake
|
||||
add_special Function7413
|
||||
add_special Function7418
|
||||
add_special Function741d
|
||||
add_special Special_YoungerHaircutBrother
|
||||
add_special Special_OlderHaircutBrother
|
||||
add_special Special_DaisyMassage
|
||||
add_special Functionc472
|
||||
add_special ProfOaksPCBoot
|
||||
add_special SpecialGameboyCheck
|
||||
|
@ -522,15 +522,15 @@ SpecialCheckPokerus: ; c419
|
|||
jp ScriptReturnCarry
|
||||
; c422
|
||||
|
||||
Functionc422: ; c422
|
||||
Special_ResetLuckyNumberShowFlag: ; c422
|
||||
callba Function1152b
|
||||
ld hl, wdc9d
|
||||
ld hl, wLuckyNumberShowFlag
|
||||
res 0, [hl]
|
||||
callba Function5d33
|
||||
callba LoadOrRegenerateLuckyIDNumber
|
||||
ret
|
||||
; c434
|
||||
|
||||
Functionc434: ; c434
|
||||
Special_CheckLuckyNumberShowFlag: ; c434
|
||||
callba Function11542
|
||||
jp ScriptReturnCarry
|
||||
; c43d
|
||||
|
|
|
@ -5,7 +5,7 @@ Function113d6: ; 113d6
|
|||
|
||||
Function113da: ; 113da
|
||||
xor a
|
||||
ld [wdc2d], a
|
||||
ld [wLuckyNumberDayBuffer], a
|
||||
ld [wdc3a], a
|
||||
ld [wdc1c], a
|
||||
ret
|
||||
|
@ -242,28 +242,28 @@ Function11522: ; 11522
|
|||
; 1152b
|
||||
|
||||
Function1152b: ; 1152b
|
||||
call Function11534
|
||||
ld hl, wdc2d
|
||||
call .GetDaysUntilNextFriday
|
||||
ld hl, wLuckyNumberDayBuffer
|
||||
jp Function11415
|
||||
; 11534
|
||||
|
||||
Function11534: ; 11534
|
||||
.GetDaysUntilNextFriday: ; 11534
|
||||
call GetWeekday
|
||||
ld c, a
|
||||
ld a, $5
|
||||
ld a, FRIDAY
|
||||
sub c
|
||||
jr z, .asm_1153f
|
||||
jr nc, .asm_11541
|
||||
jr z, .friday_saturday
|
||||
jr nc, .earlier ; should've done "ret nc"
|
||||
|
||||
.asm_1153f
|
||||
add $7
|
||||
.friday_saturday
|
||||
add 7
|
||||
|
||||
.asm_11541
|
||||
.earlier
|
||||
ret
|
||||
; 11542
|
||||
|
||||
Function11542: ; 11542
|
||||
ld hl, wdc2d
|
||||
ld hl, wLuckyNumberDayBuffer
|
||||
jp Function11420
|
||||
; 11548
|
||||
|
||||
|
|
|
@ -1,3 +1,114 @@
|
|||
|
||||
|
||||
Special_CheckMagikarpLength: ; fbb32
|
||||
; Returns 3 if you select a Magikarp that beats the previous record.
|
||||
; Returns 2 if you select a Magikarp, but the current record is longer.
|
||||
; Returns 1 if you press B in the Pokemon selection menu.
|
||||
; Returns 0 if the Pokemon you select is not a Magikarp.
|
||||
|
||||
; Let's start by selecting a Magikarp.
|
||||
callba SelectMonFromParty
|
||||
jr c, .declined
|
||||
ld a, [CurPartySpecies]
|
||||
cp MAGIKARP
|
||||
jr nz, .not_magikarp
|
||||
|
||||
; Now let's compute its length based on its DVs and ID.
|
||||
ld a, [CurPartyMon]
|
||||
ld hl, PartyMon1Species
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
call AddNTimes
|
||||
push hl
|
||||
ld bc, MON_DVS
|
||||
add hl, bc
|
||||
ld d, h
|
||||
ld e, l
|
||||
pop hl
|
||||
ld bc, MON_ID
|
||||
add hl, bc
|
||||
ld b, h
|
||||
ld c, l
|
||||
call CalcMagikarpLength
|
||||
call PrintMagikarpLength
|
||||
callba MagikarpLength_Mobile
|
||||
ld hl, .MeasureItText
|
||||
call PrintText
|
||||
|
||||
; Did we beat the record?
|
||||
ld hl, Buffer1
|
||||
ld de, wBestMagikarpLengthFeet
|
||||
ld c, 2
|
||||
call StringCmp
|
||||
jr nc, .not_long_enough
|
||||
|
||||
; NEW RECORD!!! Let's save that.
|
||||
ld hl, Buffer1
|
||||
ld de, wBestMagikarpLengthFeet
|
||||
ld a, [hli]
|
||||
ld [de], a
|
||||
inc de
|
||||
ld a, [hl]
|
||||
ld [de], a
|
||||
inc de
|
||||
ld a, [CurPartyMon]
|
||||
ld hl, PartyMonOT
|
||||
call SkipNames
|
||||
call CopyBytes
|
||||
ld a, 3
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.not_long_enough
|
||||
ld a, 2
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.declined
|
||||
ld a, 1
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
|
||||
.not_magikarp
|
||||
xor a
|
||||
ld [ScriptVar], a
|
||||
ret
|
||||
; fbba9
|
||||
|
||||
.MeasureItText: ; 0xfbba9
|
||||
; Let me measure that MAGIKARP. …Hm, it measures @ .
|
||||
text_jump UnknownText_0x1c1203
|
||||
db "@"
|
||||
; 0xfbbae
|
||||
|
||||
Magikarp_LoadFeetInchesChars: ; fbbae
|
||||
ld hl, VTiles2 + "′" * $10
|
||||
ld de, .feetinchchars
|
||||
lb bc, BANK(.feetinchchars), 2
|
||||
call Request2bpp
|
||||
ret
|
||||
; fbbbb
|
||||
|
||||
.feetinchchars: ; fbbb
|
||||
INCBIN "gfx/unknown/0fbbbb.2bpp"
|
||||
; fbbdb
|
||||
|
||||
PrintMagikarpLength: ; fbbdb
|
||||
call Magikarp_LoadFeetInchesChars
|
||||
ld hl, StringBuffer1
|
||||
ld de, Buffer1
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
||||
call PrintNum
|
||||
ld [hl], "′"
|
||||
inc hl
|
||||
ld de, Buffer2
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 2
|
||||
call PrintNum
|
||||
ld [hl], "″"
|
||||
inc hl
|
||||
ld [hl], "@"
|
||||
ret
|
||||
; fbbfc
|
||||
|
||||
CalcMagikarpLength: ; fbbfc
|
||||
; Return Magikarp's length (in mm) at MagikarpLength (big endian).
|
||||
;
|
||||
|
@ -17,8 +128,8 @@ CalcMagikarpLength: ; fbbfc
|
|||
; 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
|
||||
; 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:
|
||||
|
||||
|
@ -105,7 +216,7 @@ CalcMagikarpLength: ; fbbfc
|
|||
ld a, [hQuotient + 2]
|
||||
ld c, a
|
||||
|
||||
; de = c + 100 * (2 + i)
|
||||
; de = c + 100 × (2 + i)
|
||||
xor a
|
||||
ld [hMultiplicand + 0], a
|
||||
ld [hMultiplicand + 1], a
|
||||
|
@ -138,7 +249,7 @@ CalcMagikarpLength: ; fbbfc
|
|||
ld e, l
|
||||
|
||||
.done
|
||||
; hl = de * 10
|
||||
; hl = de × 10
|
||||
ld h, d
|
||||
ld l, e
|
||||
rept 2
|
||||
|
@ -213,3 +324,22 @@ endr
|
|||
dwb 65410, 2
|
||||
dwb 65510, 1 ; not used
|
||||
; fbcd2
|
||||
|
||||
|
||||
|
||||
Special_MagikarpHouseSign: ; fbcd2
|
||||
ld a, [wBestMagikarpLengthFeet]
|
||||
ld [Buffer1], a
|
||||
ld a, [wBestMagikarpLengthInches]
|
||||
ld [Buffer2], a
|
||||
call PrintMagikarpLength
|
||||
ld hl, .CurrentRecordtext
|
||||
call PrintText
|
||||
ret
|
||||
; fbce8
|
||||
|
||||
.CurrentRecordtext: ; 0xfbce8
|
||||
; "CURRENT RECORD"
|
||||
text_jump UnknownText_0x1c123a
|
||||
db "@"
|
||||
; 0xfbced
|
|
@ -0,0 +1,750 @@
|
|||
Special_BankOfMom: ; 16218
|
||||
ld a, [$ffaa]
|
||||
push af
|
||||
ld a, $1
|
||||
ld [$ffaa], a
|
||||
xor a
|
||||
ld [wcf63], a
|
||||
.asm_16223
|
||||
ld a, [wcf63]
|
||||
bit 7, a
|
||||
jr nz, .asm_1622f
|
||||
call Function16233
|
||||
jr .asm_16223
|
||||
|
||||
.asm_1622f
|
||||
pop af
|
||||
ld [$ffaa], a
|
||||
ret
|
||||
; 16233
|
||||
|
||||
Function16233: ; 16233
|
||||
ld a, [wcf63]
|
||||
ld e, a
|
||||
ld d, 0
|
||||
ld hl, Jumptable_16242
|
||||
rept 2
|
||||
add hl, de
|
||||
endr
|
||||
ld a, [hli]
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
jp [hl]
|
||||
; 16242
|
||||
|
||||
Jumptable_16242: ; 16242
|
||||
dw Function16254
|
||||
dw Function1626a
|
||||
dw Function16290
|
||||
dw Function162a8
|
||||
dw Function162e0
|
||||
dw Function16373
|
||||
dw Function16406
|
||||
dw Function1642d
|
||||
dw Function16433
|
||||
; 16254
|
||||
|
||||
Function16254: ; 16254
|
||||
ld a, [wd854]
|
||||
bit 7, a
|
||||
jr nz, .asm_16264
|
||||
set 7, a
|
||||
ld [wd854], a
|
||||
ld a, $1
|
||||
jr .asm_16266
|
||||
|
||||
.asm_16264
|
||||
ld a, $2
|
||||
|
||||
.asm_16266
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 1626a
|
||||
|
||||
Function1626a: ; 1626a
|
||||
ld hl, UnknownText_0x16649
|
||||
call PrintText
|
||||
call YesNoBox
|
||||
jr c, .asm_1627f
|
||||
ld hl, UnknownText_0x1664e
|
||||
call PrintText
|
||||
ld a, $81
|
||||
jr .asm_16281
|
||||
|
||||
.asm_1627f
|
||||
ld a, $80
|
||||
|
||||
.asm_16281
|
||||
ld [wd854], a
|
||||
ld hl, UnknownText_0x16653
|
||||
call PrintText
|
||||
ld a, $8
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 16290
|
||||
|
||||
Function16290: ; 16290
|
||||
ld hl, UnknownText_0x16658
|
||||
call PrintText
|
||||
call YesNoBox
|
||||
jr c, .asm_1629f
|
||||
ld a, $3
|
||||
jr .asm_162a4
|
||||
|
||||
.asm_1629f
|
||||
call DSTChecks
|
||||
ld a, $7
|
||||
|
||||
.asm_162a4
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 162a8
|
||||
|
||||
Function162a8: ; 162a8
|
||||
ld hl, UnknownText_0x1665d
|
||||
call PrintText
|
||||
call LoadMenuDataHeader_0x1d75
|
||||
ld hl, MenuDataHeader_0x166b5
|
||||
call CopyMenuDataHeader
|
||||
call InterpretMenu2
|
||||
call WriteBackup
|
||||
jr c, .asm_162ce
|
||||
ld a, [wcfa9]
|
||||
cp $1
|
||||
jr z, .asm_162d2
|
||||
cp $2
|
||||
jr z, .asm_162d6
|
||||
cp $3
|
||||
jr z, .asm_162da
|
||||
|
||||
.asm_162ce
|
||||
ld a, $7
|
||||
jr .asm_162dc
|
||||
|
||||
.asm_162d2
|
||||
ld a, $5
|
||||
jr .asm_162dc
|
||||
|
||||
.asm_162d6
|
||||
ld a, $4
|
||||
jr .asm_162dc
|
||||
|
||||
.asm_162da
|
||||
ld a, $6
|
||||
|
||||
.asm_162dc
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 162e0
|
||||
|
||||
Function162e0: ; 162e0
|
||||
ld hl, UnknownText_0x16662
|
||||
call PrintText
|
||||
xor a
|
||||
ld hl, StringBuffer2
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hl], a
|
||||
ld a, $5
|
||||
ld [wcf64], a
|
||||
call LoadMenuDataHeader_0x1d75
|
||||
call Function16517
|
||||
call Function1656b
|
||||
call Function16571
|
||||
call WriteBackup
|
||||
jr c, .asm_1636d
|
||||
ld hl, StringBuffer2
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
inc hl
|
||||
or [hl]
|
||||
jr z, .asm_1636d
|
||||
ld de, Money
|
||||
ld bc, StringBuffer2
|
||||
callba CheckMoney
|
||||
jr c, .asm_1635f
|
||||
ld hl, StringBuffer2
|
||||
ld de, StringBuffer2 + 3
|
||||
ld bc, $0003
|
||||
call CopyBytes
|
||||
ld bc, wd851
|
||||
ld de, StringBuffer2
|
||||
callba GiveMoney
|
||||
jr c, .asm_16366
|
||||
ld bc, StringBuffer2 + 3
|
||||
ld de, Money
|
||||
callba TakeMoney
|
||||
ld hl, StringBuffer2
|
||||
ld de, wd851
|
||||
ld bc, $0003
|
||||
call CopyBytes
|
||||
ld de, SFX_TRANSACTION
|
||||
call PlaySFX
|
||||
call WaitSFX
|
||||
ld hl, UnknownText_0x1668a
|
||||
call PrintText
|
||||
ld a, $8
|
||||
jr .asm_1636f
|
||||
|
||||
.asm_1635f
|
||||
ld hl, UnknownText_0x1667b
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
.asm_16366
|
||||
ld hl, UnknownText_0x16680
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
.asm_1636d
|
||||
ld a, $7
|
||||
|
||||
.asm_1636f
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 16373
|
||||
|
||||
Function16373: ; 16373
|
||||
ld hl, UnknownText_0x16667
|
||||
call PrintText
|
||||
xor a
|
||||
ld hl, StringBuffer2
|
||||
rept 2
|
||||
ld [hli], a
|
||||
endr
|
||||
ld [hl], a
|
||||
ld a, $5
|
||||
ld [wcf64], a
|
||||
call LoadMenuDataHeader_0x1d75
|
||||
call Function16512
|
||||
call Function1656b
|
||||
call Function16571
|
||||
call WriteBackup
|
||||
jr c, .asm_16400
|
||||
ld hl, StringBuffer2
|
||||
ld a, [hli]
|
||||
or [hl]
|
||||
inc hl
|
||||
or [hl]
|
||||
jr z, .asm_16400
|
||||
ld hl, StringBuffer2
|
||||
ld de, StringBuffer2 + 3
|
||||
ld bc, 3
|
||||
call CopyBytes
|
||||
ld de, wd851
|
||||
ld bc, StringBuffer2
|
||||
callba CheckMoney
|
||||
jr c, .asm_163f2
|
||||
ld bc, Money
|
||||
ld de, StringBuffer2
|
||||
callba GiveMoney
|
||||
jr c, .asm_163f9
|
||||
ld bc, StringBuffer2 + 3
|
||||
ld de, wd851
|
||||
callba TakeMoney
|
||||
ld hl, StringBuffer2
|
||||
ld de, Money
|
||||
ld bc, 3
|
||||
call CopyBytes
|
||||
ld de, SFX_TRANSACTION
|
||||
call PlaySFX
|
||||
call WaitSFX
|
||||
ld hl, UnknownText_0x1668f
|
||||
call PrintText
|
||||
ld a, $8
|
||||
jr .asm_16402
|
||||
|
||||
.asm_163f2
|
||||
ld hl, UnknownText_0x16671
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
.asm_163f9
|
||||
ld hl, UnknownText_0x16676
|
||||
call PrintText
|
||||
ret
|
||||
|
||||
.asm_16400
|
||||
ld a, 7
|
||||
|
||||
.asm_16402
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 16406
|
||||
|
||||
Function16406: ; 16406
|
||||
ld hl, UnknownText_0x1666c
|
||||
call PrintText
|
||||
call YesNoBox
|
||||
jr c, .asm_16422
|
||||
ld a, $81
|
||||
ld [wd854], a
|
||||
ld hl, UnknownText_0x16685
|
||||
call PrintText
|
||||
ld a, $8
|
||||
ld [wcf63], a
|
||||
ret
|
||||
|
||||
.asm_16422
|
||||
ld a, $80
|
||||
ld [wd854], a
|
||||
ld a, $7
|
||||
ld [wcf63], a
|
||||
ret
|
||||
; 1642d
|
||||
|
||||
Function1642d: ; 1642d
|
||||
ld hl, UnknownText_0x16694
|
||||
call PrintText
|
||||
|
||||
Function16433: ; 16433
|
||||
ld hl, wcf63
|
||||
set 7, [hl]
|
||||
ret
|
||||
; 16439
|
||||
|
||||
DSTChecks: ; 16439
|
||||
; check the time; avoid changing DST if doing so would change the current day
|
||||
ld a, [wDST]
|
||||
bit 7, a
|
||||
ld a, [hHours]
|
||||
jr z, .asm_16447
|
||||
and a ; within one hour of 00:00?
|
||||
jr z, .LostBooklet
|
||||
jr .loop
|
||||
|
||||
.asm_16447
|
||||
cp 23 ; within one hour of 23:00?
|
||||
jr nz, .loop
|
||||
; fallthrough
|
||||
|
||||
.LostBooklet
|
||||
call Function164ea
|
||||
bccoord 1, 14
|
||||
ld hl, UnknownText_0x164f4
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
call YesNoBox
|
||||
ret c
|
||||
call Function164ea
|
||||
bccoord 1, 14
|
||||
ld hl, LostInstructionBookletText
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
ret
|
||||
|
||||
.loop
|
||||
call Function164ea
|
||||
bccoord 1, 14
|
||||
ld a, [wDST]
|
||||
bit 7, a
|
||||
jr z, .asm_16497
|
||||
ld hl, UnknownText_0x16508
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
call YesNoBox
|
||||
ret c
|
||||
ld a, [wDST]
|
||||
res 7, a
|
||||
ld [wDST], a
|
||||
call Function164d1
|
||||
call Function164ea
|
||||
bccoord 1, 14
|
||||
ld hl, UnknownText_0x1650d
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
ret
|
||||
|
||||
.asm_16497
|
||||
ld hl, UnknownText_0x164fe
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
call YesNoBox
|
||||
ret c
|
||||
ld a, [wDST]
|
||||
set 7, a
|
||||
ld [wDST], a
|
||||
call Function164b9
|
||||
call Function164ea
|
||||
bccoord 1, 14
|
||||
ld hl, UnknownText_0x16503
|
||||
call PlaceWholeStringInBoxAtOnce
|
||||
ret
|
||||
; 164b9
|
||||
|
||||
Function164b9: ; 164b9
|
||||
ld a, [StartHour]
|
||||
add 1
|
||||
sub 24
|
||||
jr nc, .asm_164c4
|
||||
add 24
|
||||
.asm_164c4
|
||||
ld [StartHour], a
|
||||
ccf
|
||||
ld a, [StartDay]
|
||||
adc 0
|
||||
ld [StartDay], a
|
||||
ret
|
||||
; 164d1
|
||||
|
||||
Function164d1: ; 164d1
|
||||
ld a, [StartHour]
|
||||
sub 1
|
||||
jr nc, .asm_164da
|
||||
add 24
|
||||
.asm_164da
|
||||
ld [StartHour], a
|
||||
ld a, [StartDay]
|
||||
sbc 0
|
||||
jr nc, .asm_164e6
|
||||
add 7
|
||||
.asm_164e6
|
||||
ld [StartDay], a
|
||||
ret
|
||||
; 164ea
|
||||
|
||||
Function164ea: ; 164ea
|
||||
hlcoord 1, 14
|
||||
ld bc, $0312
|
||||
call ClearBox
|
||||
ret
|
||||
; 164f4
|
||||
|
||||
UnknownText_0x164f4: ; 0x164f4
|
||||
; Do you want to adjust your clock for Daylight Saving Time?
|
||||
text_jump UnknownText_0x1c6095
|
||||
db "@"
|
||||
; 0x164f9
|
||||
|
||||
LostInstructionBookletText: ; 0x164f9
|
||||
; I lost the instruction booklet for the POKéGEAR.
|
||||
; Come back again in a while.
|
||||
text_jump UnknownText_0x1c60d1
|
||||
db "@"
|
||||
; 0x164fe
|
||||
|
||||
UnknownText_0x164fe: ; 0x164fe
|
||||
; Do you want to switch to Daylight Saving Time?
|
||||
text_jump UnknownText_0x1c6000
|
||||
db "@"
|
||||
; 0x16503
|
||||
|
||||
UnknownText_0x16503: ; 0x16503
|
||||
; I set the clock forward by one hour.
|
||||
text_jump UnknownText_0x1c6030
|
||||
db "@"
|
||||
; 0x16508
|
||||
|
||||
UnknownText_0x16508: ; 0x16508
|
||||
; Is Daylight Saving Time over?
|
||||
text_jump UnknownText_0x1c6056
|
||||
db "@"
|
||||
; 0x1650d
|
||||
|
||||
UnknownText_0x1650d: ; 0x1650d
|
||||
; I put the clock back one hour.
|
||||
text_jump UnknownText_0x1c6075
|
||||
db "@"
|
||||
; 0x16512
|
||||
|
||||
Function16512: ; 16512
|
||||
ld de, String_1669f
|
||||
jr Function1651a
|
||||
|
||||
Function16517: ; 16517
|
||||
ld de, String_166a8
|
||||
|
||||
Function1651a: ; 1651a
|
||||
push de
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
hlcoord 0, 0
|
||||
lb bc, 6, 18
|
||||
call TextBox
|
||||
hlcoord 1, 2
|
||||
ld de, String_16699
|
||||
call PlaceString
|
||||
hlcoord 12, 2
|
||||
ld de, wd851
|
||||
lb bc, PRINTNUM_MONEY | 3, 6
|
||||
call PrintNum
|
||||
hlcoord 1, 4
|
||||
ld de, String_166b0
|
||||
call PlaceString
|
||||
hlcoord 12, 4
|
||||
ld de, Money
|
||||
lb bc, PRINTNUM_MONEY | 3, 6
|
||||
call PrintNum
|
||||
hlcoord 1, 6
|
||||
pop de
|
||||
call PlaceString
|
||||
hlcoord 12, 6
|
||||
ld de, StringBuffer2
|
||||
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
|
||||
call PrintNum
|
||||
call UpdateSprites
|
||||
call Function3238
|
||||
ret
|
||||
; 1656b
|
||||
|
||||
Function1656b: ; 1656b
|
||||
ld c, 10
|
||||
call DelayFrames
|
||||
ret
|
||||
; 16571
|
||||
|
||||
Function16571: ; 16571
|
||||
.loop
|
||||
call Functiona57
|
||||
ld hl, hJoyPressed
|
||||
ld a, [hl]
|
||||
and B_BUTTON
|
||||
jr nz, .pressedB
|
||||
ld a, [hl]
|
||||
and A_BUTTON
|
||||
jr nz, .pressedA
|
||||
call .dpadaction
|
||||
xor a
|
||||
ld [hBGMapMode], a
|
||||
hlcoord 12, 6
|
||||
ld bc, 7
|
||||
ld a, " "
|
||||
call ByteFill
|
||||
hlcoord 12, 6
|
||||
ld de, StringBuffer2
|
||||
lb bc, PRINTNUM_MONEY | PRINTNUM_LEADINGZEROS | 3, 6
|
||||
call PrintNum
|
||||
ld a, [$ff9b]
|
||||
and $10
|
||||
jr nz, .skip
|
||||
hlcoord 13, 6
|
||||
ld a, [wMomBankDigitCursorPosition]
|
||||
ld c, a
|
||||
ld b, 0
|
||||
add hl, bc
|
||||
ld [hl], " "
|
||||
|
||||
.skip
|
||||
call WaitBGMap
|
||||
jr .loop
|
||||
|
||||
.pressedB
|
||||
scf
|
||||
ret
|
||||
|
||||
.pressedA
|
||||
and a
|
||||
ret
|
||||
; 165b9
|
||||
|
||||
.dpadaction: ; 165b9
|
||||
ld hl, hJoyLast
|
||||
ld a, [hl]
|
||||
and D_UP
|
||||
jr nz, .incrementdigit
|
||||
ld a, [hl]
|
||||
and D_DOWN
|
||||
jr nz, .decrementdigit
|
||||
ld a, [hl]
|
||||
and D_LEFT
|
||||
jr nz, .movecursorleft
|
||||
ld a, [hl]
|
||||
and D_RIGHT
|
||||
jr nz, .movecursorright
|
||||
and a
|
||||
ret
|
||||
|
||||
.movecursorleft
|
||||
ld hl, wMomBankDigitCursorPosition
|
||||
ld a, [hl]
|
||||
and a
|
||||
ret z
|
||||
dec [hl]
|
||||
ret
|
||||
|
||||
.movecursorright
|
||||
ld hl, wMomBankDigitCursorPosition
|
||||
ld a, [hl]
|
||||
cp 5
|
||||
ret nc
|
||||
inc [hl]
|
||||
ret
|
||||
|
||||
.incrementdigit
|
||||
ld hl, .DigitQuantities
|
||||
call .getdigitquantity
|
||||
ld c, l
|
||||
ld b, h
|
||||
ld de, StringBuffer2
|
||||
callba GiveMoney
|
||||
ret
|
||||
|
||||
.decrementdigit
|
||||
ld hl, .DigitQuantities
|
||||
call .getdigitquantity
|
||||
ld c, l
|
||||
ld b, h
|
||||
ld de, StringBuffer2
|
||||
callba TakeMoney
|
||||
ret
|
||||
; 16607
|
||||
|
||||
.getdigitquantity: ; 16607
|
||||
ld a, [wMomBankDigitCursorPosition]
|
||||
push de
|
||||
ld e, a
|
||||
ld d, 0
|
||||
rept 3
|
||||
add hl, de
|
||||
endr
|
||||
pop de
|
||||
ret
|
||||
; 16613
|
||||
|
||||
.DigitQuantities: ; 16613
|
||||
dt 100000
|
||||
dt 10000
|
||||
dt 1000
|
||||
dt 100
|
||||
dt 10
|
||||
dt 1
|
||||
|
||||
dt 100000
|
||||
dt 10000
|
||||
dt 1000
|
||||
dt 100
|
||||
dt 10
|
||||
dt 1
|
||||
|
||||
dt 900000
|
||||
dt 90000
|
||||
dt 9000
|
||||
dt 900
|
||||
dt 90
|
||||
dt 9
|
||||
; 16649
|
||||
|
||||
UnknownText_0x16649: ; 0x16649
|
||||
; Wow, that's a cute #MON. Where did you get it? … So, you're leaving on an adventure… OK! I'll help too. But what can I do for you? I know! I'll save money for you. On a long journey, money's important. Do you want me to save your money?
|
||||
text_jump UnknownText_0x1bd77f
|
||||
db "@"
|
||||
; 0x1664e
|
||||
|
||||
UnknownText_0x1664e: ; 0x1664e
|
||||
; OK, I'll take care of your money.
|
||||
text_jump UnknownText_0x1bd868
|
||||
db "@"
|
||||
; 0x16653
|
||||
|
||||
UnknownText_0x16653: ; 0x16653
|
||||
; Be careful. #MON are your friends. You need to work as a team. Now, go on!
|
||||
text_jump UnknownText_0x1bd88e
|
||||
db "@"
|
||||
; 0x16658
|
||||
|
||||
UnknownText_0x16658: ; 0x16658
|
||||
; Hi! Welcome home! You're trying very hard, I see. I've kept your room tidy. Or is this about your money?
|
||||
text_jump UnknownText_0x1bd8da
|
||||
db "@"
|
||||
; 0x1665d
|
||||
|
||||
UnknownText_0x1665d: ; 0x1665d
|
||||
; What do you want to do?
|
||||
text_jump UnknownText_0x1bd942
|
||||
db "@"
|
||||
; 0x16662
|
||||
|
||||
UnknownText_0x16662: ; 0x16662
|
||||
; How much do you want to save?
|
||||
text_jump UnknownText_0x1bd95b
|
||||
db "@"
|
||||
; 0x16667
|
||||
|
||||
UnknownText_0x16667: ; 0x16667
|
||||
; How much do you want to take?
|
||||
text_jump UnknownText_0x1bd97a
|
||||
db "@"
|
||||
; 0x1666c
|
||||
|
||||
UnknownText_0x1666c: ; 0x1666c
|
||||
; Do you want to save some money?
|
||||
text_jump UnknownText_0x1bd999
|
||||
db "@"
|
||||
; 0x16671
|
||||
|
||||
UnknownText_0x16671: ; 0x16671
|
||||
; You haven't saved that much.
|
||||
text_jump UnknownText_0x1bd9ba
|
||||
db "@"
|
||||
; 0x16676
|
||||
|
||||
UnknownText_0x16676: ; 0x16676
|
||||
; You can't take that much.
|
||||
text_jump UnknownText_0x1bd9d7
|
||||
db "@"
|
||||
; 0x1667b
|
||||
|
||||
UnknownText_0x1667b: ; 0x1667b
|
||||
; You don't have that much.
|
||||
text_jump UnknownText_0x1bd9f1
|
||||
db "@"
|
||||
; 0x16680
|
||||
|
||||
UnknownText_0x16680: ; 0x16680
|
||||
; You can't save that much.
|
||||
text_jump UnknownText_0x1bda0b
|
||||
db "@"
|
||||
; 0x16685
|
||||
|
||||
UnknownText_0x16685: ; 0x16685
|
||||
; OK, I'll save your money. Trust me! , stick with it!
|
||||
text_jump UnknownText_0x1bda25
|
||||
db "@"
|
||||
; 0x1668a
|
||||
|
||||
UnknownText_0x1668a: ; 0x1668a
|
||||
; Your money's safe here! Get going!
|
||||
text_jump UnknownText_0x1bda5b
|
||||
db "@"
|
||||
; 0x1668f
|
||||
|
||||
UnknownText_0x1668f: ; 0x1668f
|
||||
; , don't give up!
|
||||
text_jump UnknownText_0x1bda7e
|
||||
db "@"
|
||||
; 0x16694
|
||||
|
||||
UnknownText_0x16694: ; 0x16694
|
||||
; Just do what you can.
|
||||
text_jump UnknownText_0x1bda90
|
||||
db "@"
|
||||
; 0x16699
|
||||
|
||||
String_16699: ; 16699
|
||||
db "SAVED@"
|
||||
; 1669f
|
||||
|
||||
String_1669f: ; 1669f
|
||||
db "WITHDRAW@"
|
||||
; 166a8
|
||||
|
||||
String_166a8: ; 166a8
|
||||
db "DEPOSIT@"
|
||||
; 166b0
|
||||
|
||||
String_166b0: ; 166b0
|
||||
db "HELD@"
|
||||
; 166b5
|
||||
|
||||
MenuDataHeader_0x166b5: ; 0x166b5
|
||||
db $40 ; flags
|
||||
db 00, 00 ; start coords
|
||||
db 10, 10 ; end coords
|
||||
dw MenuData2_0x166bd
|
||||
db 1 ; default option
|
||||
; 0x166bd
|
||||
|
||||
MenuData2_0x166bd: ; 0x166bd
|
||||
db $80 ; flags
|
||||
db 4 ; items
|
||||
db "GET@"
|
||||
db "SAVE@"
|
||||
db "CHANGE@"
|
||||
db "CANCEL@"
|
||||
; 0x166d6
|
|
@ -26,7 +26,7 @@ NameRater: ; fb6ed
|
|||
ld hl, NameRaterWhichNameText
|
||||
call PrintText
|
||||
; Load the new nickname into StringBuffer2
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
ld a, [CurPartySpecies]
|
||||
ld [wd265], a
|
||||
|
|
|
@ -166,7 +166,7 @@ GetCaughtLevel: ; 4f18c
|
|||
ld [wd038 + 2], a
|
||||
ld hl, wd036
|
||||
ld de, wd038 + 2
|
||||
ld bc, $4103
|
||||
lb bc, PRINTNUM_RIGHTALIGN | 1, 3
|
||||
call PrintNum
|
||||
ret
|
||||
|
||||
|
|
10
home.asm
10
home.asm
|
@ -76,12 +76,12 @@ Function2ebb:: ; 2ebb
|
|||
ret
|
||||
; 2ec6
|
||||
|
||||
Function2ec6:: ; 2ec6
|
||||
xor_a:: ; 2ec6
|
||||
xor a
|
||||
ret
|
||||
; 2ec8
|
||||
|
||||
Function2ec8:: ; 2ec8
|
||||
xor_a_dec_a:: ; 2ec8
|
||||
xor a
|
||||
dec a
|
||||
ret
|
||||
|
@ -1119,7 +1119,7 @@ IsHMMove:: ; 34e7
|
|||
db FLASH
|
||||
db WATERFALL
|
||||
db WHIRLPOOL
|
||||
db $ff
|
||||
db -1
|
||||
; 34f8
|
||||
|
||||
|
||||
|
@ -1129,7 +1129,7 @@ GetMoveName:: ; 34f8
|
|||
ld a, MOVE_NAME
|
||||
ld [wcf61], a
|
||||
|
||||
ld a, [wd265] ; move id
|
||||
ld a, [wNamedObjectIndexBuffer] ; move id
|
||||
ld [CurSpecies], a
|
||||
|
||||
call GetName
|
||||
|
@ -1764,7 +1764,7 @@ Function383d:: ; 383d
|
|||
Function3842:: ; 3842
|
||||
ld [wd265], a
|
||||
ld de, wd265
|
||||
ld b, 1 << 6 + 1 ; 65
|
||||
ld b, PRINTNUM_RIGHTALIGN | 1
|
||||
jp PrintNum
|
||||
; 384d
|
||||
|
||||
|
|
|
@ -331,7 +331,7 @@ Functiona57:: ; a57
|
|||
jr z, .asm_a63
|
||||
ld a, [hJoyDown]
|
||||
.asm_a63
|
||||
ld [$ffa9], a
|
||||
ld [hJoyLast], a
|
||||
ld a, [hJoyPressed]
|
||||
and a
|
||||
jr z, .asm_a70
|
||||
|
@ -344,7 +344,7 @@ Functiona57:: ; a57
|
|||
and a
|
||||
jr z, .asm_a7a
|
||||
xor a
|
||||
ld [$ffa9], a
|
||||
ld [hJoyLast], a
|
||||
ret
|
||||
|
||||
.asm_a7a
|
||||
|
@ -354,12 +354,12 @@ Functiona57:: ; a57
|
|||
; a80
|
||||
|
||||
Functiona80:: ; a80
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
push af
|
||||
ld a, [$ffb0]
|
||||
push af
|
||||
xor a
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld a, $6
|
||||
ld [$ffb0], a
|
||||
.asm_a8d
|
||||
|
@ -374,7 +374,7 @@ Functiona80:: ; a80
|
|||
pop af
|
||||
ld [$ffb0], a
|
||||
pop af
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ret
|
||||
; aa5
|
||||
|
||||
|
@ -452,9 +452,9 @@ Functionb06:: ; b06
|
|||
cp b
|
||||
pop bc
|
||||
jr nz, .asm_b27
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
dec a
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ret nz
|
||||
ld a, [$ffb0]
|
||||
dec a
|
||||
|
@ -463,20 +463,20 @@ Functionb06:: ; b06
|
|||
ld a, $7a
|
||||
ld [hl], a
|
||||
ld a, $ff
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld a, $6
|
||||
ld [$ffb0], a
|
||||
ret
|
||||
|
||||
.asm_b27
|
||||
ld a, [$ffaf]
|
||||
ld a, [hConnectionStripLength]
|
||||
and a
|
||||
ret z
|
||||
dec a
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ret nz
|
||||
dec a
|
||||
ld [$ffaf], a
|
||||
ld [hConnectionStripLength], a
|
||||
ld a, [$ffb0]
|
||||
dec a
|
||||
ld [$ffb0], a
|
||||
|
|
|
@ -207,10 +207,10 @@ endr
|
|||
|
||||
Function222a:: ; 222a
|
||||
ld a, $fa
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
callba RunMapSetupScript
|
||||
xor a
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
ret
|
||||
; 2238
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@ ClearBox:: ; fb6
|
|||
|
||||
ld a, " "
|
||||
|
||||
Functionfb8::
|
||||
FillBoxWithByte::
|
||||
.col
|
||||
push bc
|
||||
push hl
|
||||
|
@ -273,7 +273,7 @@ endm
|
|||
dict $24, PlacePOKE
|
||||
dict $25, NextChar
|
||||
dict2 $1f, " "
|
||||
dict $5f, Char5F
|
||||
dict "<DEXEND>", PlaceDexEnd
|
||||
dict "<TARGET>", PlaceMoveTargetsName
|
||||
dict "<USER>", PlaceMoveUsersName
|
||||
dict "<ENEMY>", PlaceEnemysName
|
||||
|
@ -590,7 +590,7 @@ ContText:: ; 1345
|
|||
; 1356
|
||||
|
||||
|
||||
Char5F:: ; 1356
|
||||
PlaceDexEnd:: ; 1356
|
||||
; Legacy: ends a Pokédex entry (Red).
|
||||
; Dex entries are now regular strings.
|
||||
ld [hl], "."
|
||||
|
@ -972,7 +972,7 @@ Text_09:: ; 14d2
|
|||
ld a, b
|
||||
and $f0
|
||||
swap a
|
||||
set 6, a
|
||||
set PRINTNUM_RIGHTALIGN_F, a
|
||||
ld b, a
|
||||
call PrintNum
|
||||
ld b, h
|
||||
|
|
9
hram.asm
9
hram.asm
|
@ -17,6 +17,7 @@ hSeconds EQU $ff98
|
|||
|
||||
hROMBank EQU $ff9d
|
||||
hVBlank EQU $ff9e
|
||||
hMapEntryMethod EQU $ff9f
|
||||
|
||||
hJoypadReleased EQU $ffa2
|
||||
hJoypadPressed EQU $ffa3
|
||||
|
@ -25,6 +26,7 @@ hJoypadSum EQU $ffa5
|
|||
hJoyReleased EQU $ffa6
|
||||
hJoyPressed EQU $ffa7
|
||||
hJoyDown EQU $ffa8
|
||||
hJoyLast EQU $ffa9
|
||||
|
||||
hConnectionStripLength EQU $ffaf
|
||||
hConnectedMapWidth EQU $ffb0
|
||||
|
@ -42,6 +44,13 @@ hMultiplicand EQU $ffb4 ; 3 bytes long
|
|||
hMultiplier EQU $ffb7 ; 1 byte long
|
||||
hProduct EQU $ffb3 ; result (4 bytes long)
|
||||
|
||||
hPrintNum1 EQU $ffb3
|
||||
hPrintNum2 EQU $ffb4
|
||||
hPrintNum3 EQU $ffb5
|
||||
hPrintNum4 EQU $ffb6
|
||||
hPrintNum5 EQU $ffb7
|
||||
hPrintNum6 EQU $ffb8
|
||||
hPrintNum7 EQU $ffb9
|
||||
hMathBuffer EQU $ffb8
|
||||
|
||||
hMoneyTemp EQU $ffc3
|
||||
|
|
|
@ -558,11 +558,11 @@ endr
|
|||
cp PARTY_LENGTH
|
||||
jr z, .asm_eb3c
|
||||
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
call ClearSprites
|
||||
|
||||
predef AddPkmnToParty
|
||||
predef TryAddMonToParty
|
||||
|
||||
callba Function4db49
|
||||
|
||||
|
@ -600,7 +600,7 @@ endr
|
|||
ld d, h
|
||||
ld e, l
|
||||
push de
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
ld b, 0
|
||||
callba Function116c1
|
||||
|
@ -691,7 +691,7 @@ endr
|
|||
jr .asm_ebe2
|
||||
|
||||
.asm_ebd1
|
||||
callba Functione6ce
|
||||
callba BugContest_SetCaughtContestMon
|
||||
jr .asm_ebe2
|
||||
|
||||
.asm_ebd9
|
||||
|
@ -980,7 +980,7 @@ LoveBallMultiplier:
|
|||
push bc
|
||||
ld a, [TempBattleMonSpecies]
|
||||
ld [CurPartySpecies], a
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
ld a, [CurBattleMon]
|
||||
ld [CurPartyMon], a
|
||||
|
@ -1259,7 +1259,7 @@ Calcium: ; ee3d
|
|||
ld h, [hl]
|
||||
ld l, a
|
||||
ld de, StringBuffer2
|
||||
ld bc, $000d
|
||||
ld bc, ITEM_NAME_LENGTH
|
||||
call CopyBytes
|
||||
|
||||
call Play_SFX_FULL_HEAL
|
||||
|
@ -1267,7 +1267,7 @@ Calcium: ; ee3d
|
|||
ld hl, UnknownText_0xeea6
|
||||
call PrintText
|
||||
|
||||
ld c, $2
|
||||
ld c, HAPPINESS_USEDITEM
|
||||
callba ChangeHappiness
|
||||
|
||||
jp Functionf795
|
||||
|
@ -1425,7 +1425,7 @@ RareCandy: ; ef14
|
|||
ld a, $f8
|
||||
call Functionf24a
|
||||
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
predef CopyPkmnToTempMon
|
||||
|
||||
|
@ -1440,7 +1440,7 @@ RareCandy: ; ef14
|
|||
|
||||
call Functiona80
|
||||
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
ld a, [CurPartySpecies]
|
||||
ld [wd265], a
|
||||
|
@ -1464,7 +1464,7 @@ HealPowder: ; efad
|
|||
|
||||
cp $0
|
||||
jr nz, .asm_efc9
|
||||
ld c, $f
|
||||
ld c, HAPPINESS_BITTERPOWDER
|
||||
callba ChangeHappiness
|
||||
|
||||
call LooksBitterMessage
|
||||
|
@ -1632,7 +1632,7 @@ RevivalHerb: ; f0a9
|
|||
cp 0
|
||||
jr nz, .asm_f0c5
|
||||
|
||||
ld c, $11
|
||||
ld c, HAPPINESS_REVIVALHERB
|
||||
callba ChangeHappiness
|
||||
call LooksBitterMessage
|
||||
ld a, 0
|
||||
|
@ -1780,12 +1780,12 @@ GoldBerry: ; f186
|
|||
|
||||
|
||||
Energypowder: ; f18c
|
||||
ld c, $f
|
||||
ld c, HAPPINESS_BITTERPOWDER
|
||||
jr Functionf192
|
||||
; f190
|
||||
|
||||
EnergyRoot: ; f190
|
||||
ld c, $10
|
||||
ld c, HAPPINESS_ENERGYROOT
|
||||
; f192
|
||||
|
||||
Functionf192: ; f192
|
||||
|
@ -2341,7 +2341,7 @@ endr
|
|||
ld [hBattleTurn], a
|
||||
ld [AttackMissed], a
|
||||
ld [EffectFailed], a
|
||||
callba Function361ef
|
||||
callba CheckIfStatCanBeRaised
|
||||
call WaitSFX
|
||||
|
||||
callba BattleCommand8c
|
||||
|
@ -2349,7 +2349,7 @@ endr
|
|||
|
||||
ld a, [CurBattleMon]
|
||||
ld [CurPartyMon], a
|
||||
ld c, $3
|
||||
ld c, HAPPINESS_USEDXITEM
|
||||
callba ChangeHappiness
|
||||
ret
|
||||
; f504
|
||||
|
@ -2705,7 +2705,7 @@ Functionf6e0: ; f6e0
|
|||
; f6e8
|
||||
|
||||
Functionf6e8: ; f6e8
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [MonType], a
|
||||
call Functionf8ec
|
||||
ld hl, PartyMon1PP
|
||||
|
@ -3190,7 +3190,7 @@ Functionf8b9: ; f8b9
|
|||
ld a, PartyMon1Moves - PartyMon1
|
||||
call GetPartyParamLocation
|
||||
pop de
|
||||
xor a
|
||||
xor a ; PARTYMON
|
||||
ld [wcfa9], a
|
||||
ld [MonType], a
|
||||
ld c, NUM_MOVES
|
||||
|
@ -3231,27 +3231,27 @@ Functionf8ec: ; f8ec
|
|||
|
||||
ld hl, PartyMon1Moves
|
||||
ld bc, PartyMon2 - PartyMon1
|
||||
jr z, .asm_f91a
|
||||
jr z, .asm_f91a ; PARTYMON
|
||||
|
||||
ld hl, OTPartyMon1Moves
|
||||
dec a
|
||||
jr z, .asm_f91a
|
||||
jr z, .asm_f91a ; OTPARTYMON
|
||||
|
||||
ld hl, TempMonMoves
|
||||
dec a
|
||||
jr z, .asm_f915
|
||||
jr z, .asm_f915 ; BOXMON
|
||||
|
||||
ld hl, TempMonMoves
|
||||
ld hl, TempMonMoves ; Wasted cycles
|
||||
dec a
|
||||
jr z, .asm_f915
|
||||
jr z, .asm_f915 ; BREEDMON
|
||||
|
||||
ld hl, BattleMonMoves
|
||||
ld hl, BattleMonMoves ; WILDMON
|
||||
|
||||
.asm_f915
|
||||
.asm_f915 ; BOXMON, BREEDMON, WILDMON
|
||||
call Functionf969
|
||||
jr .asm_f91d
|
||||
|
||||
.asm_f91a
|
||||
.asm_f91a ; PARTYMON, OTPARTYMON
|
||||
call Add_CurPartyMon_Times
|
||||
|
||||
.asm_f91d
|
||||
|
|
26
macros.asm
26
macros.asm
|
@ -149,3 +149,29 @@ bcd: MACRO
|
|||
shift
|
||||
endr
|
||||
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
|
||||
|
||||
dwtile: MACRO
|
||||
dw (\1 << 4) + \2
|
||||
if _NARG > 2
|
||||
rept _NARG + -2
|
||||
dw \3
|
||||
shift
|
||||
endr
|
||||
endc
|
||||
ENDM
|
||||
|
||||
ldtile: MACRO
|
||||
ld \1, (\2 << 4) + \3
|
||||
ENDM
|
||||
|
|
|
@ -10,6 +10,9 @@
|
|||
charmap "└", $7d
|
||||
charmap "┘", $7e
|
||||
charmap " ", $7f
|
||||
charmap "′", $6e
|
||||
charmap "″", $6f
|
||||
|
||||
|
||||
charmap "A", $80
|
||||
charmap "B", $81
|
||||
|
@ -301,3 +304,5 @@
|
|||
charmap "<TRNER>", $5d
|
||||
charmap "<ROCKET>", $5e
|
||||
charmap "<......>", $56
|
||||
charmap "<START>", $00
|
||||
charmap "<DEXEND>", $5f
|
||||
|
|
|
@ -23,7 +23,7 @@ UnknownScript_0x19b0de:
|
|||
iffalse UnknownScript_0x19b124
|
||||
writetext UnknownText_0x19b244
|
||||
closetext
|
||||
special Function741d
|
||||
special Special_DaisyMassage
|
||||
if_equal 0, UnknownScript_0x19b124
|
||||
if_equal 1, UnknownScript_0x19b12a
|
||||
setflag ENGINE_TEA_IN_BLUES_HOUSE
|
||||
|
|
|
@ -26,10 +26,10 @@ GentlemanScript_0x5cd3d:
|
|||
loadfont
|
||||
writetext UnknownText_0x5ceba
|
||||
keeptextopen
|
||||
special Functionc434
|
||||
iffalse UnknownScript_0x5cd4c
|
||||
special Functionc422
|
||||
UnknownScript_0x5cd4c:
|
||||
special Special_CheckLuckyNumberShowFlag
|
||||
iffalse .skip
|
||||
special Special_ResetLuckyNumberShowFlag
|
||||
.skip:
|
||||
special Function4d9d3
|
||||
checkflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
iftrue .GameOver
|
||||
|
@ -45,7 +45,7 @@ UnknownScript_0x5cd4c:
|
|||
playsound SFX_DEX_FANFARE_20_49
|
||||
waitbutton
|
||||
keeptextopen
|
||||
special Function4d87a
|
||||
special Special_CheckForLuckyNumberWinners
|
||||
loadmovesprites
|
||||
applymovement $6, MovementData_0x5ce74
|
||||
loadfont
|
||||
|
@ -66,7 +66,7 @@ UnknownScript_0x5cd4c:
|
|||
waitbutton
|
||||
keeptextopen
|
||||
giveitem MASTER_BALL, 1
|
||||
iffalse UnknownScript_0x5cdcf
|
||||
iffalse .BagFull
|
||||
itemnotify
|
||||
setflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
jump .GameOver
|
||||
|
@ -77,7 +77,7 @@ UnknownScript_0x5cd4c:
|
|||
waitbutton
|
||||
keeptextopen
|
||||
giveitem EXP_SHARE, 1
|
||||
iffalse UnknownScript_0x5cdcf
|
||||
iffalse .BagFull
|
||||
itemnotify
|
||||
setflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
jump .GameOver
|
||||
|
@ -88,7 +88,7 @@ UnknownScript_0x5cd4c:
|
|||
waitbutton
|
||||
keeptextopen
|
||||
giveitem PP_UP, 1
|
||||
iffalse UnknownScript_0x5cdcf
|
||||
iffalse .BagFull
|
||||
itemnotify
|
||||
setflag ENGINE_LUCKY_NUMBER_SHOW
|
||||
jump .GameOver
|
||||
|
@ -99,7 +99,7 @@ UnknownScript_0x5cd4c:
|
|||
loadmovesprites
|
||||
end
|
||||
|
||||
UnknownScript_0x5cdcf:
|
||||
.BagFull:
|
||||
writetext UnknownText_0x5d0e6
|
||||
closetext
|
||||
loadmovesprites
|
||||
|
|
|
@ -7,9 +7,9 @@ UndergroundWarehouse_MapScriptHeader:
|
|||
|
||||
; callbacks
|
||||
|
||||
dbw 5, UnknownScript_0x7d950
|
||||
dbw 5, .ResetSwitches
|
||||
|
||||
UnknownScript_0x7d950:
|
||||
.ResetSwitches:
|
||||
clearevent EVENT_SWITCH_1
|
||||
clearevent EVENT_SWITCH_2
|
||||
clearevent EVENT_SWITCH_3
|
||||
|
|
|
@ -194,7 +194,7 @@ OlderHaircutBrotherScript:
|
|||
if_equal $2, .NotEnoughMoney
|
||||
writetext UnknownText_0x7c69a
|
||||
keeptextopen
|
||||
special Function7413
|
||||
special Special_YoungerHaircutBrother
|
||||
if_equal $0, .Refused
|
||||
if_equal $1, .Refused
|
||||
setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
|
||||
|
@ -277,7 +277,7 @@ YoungerHaircutBrotherScript:
|
|||
if_equal $2, .NotEnoughMoney
|
||||
writetext UnknownText_0x7c7f1
|
||||
keeptextopen
|
||||
special Function7418
|
||||
special Special_OlderHaircutBrother
|
||||
if_equal $0, .Refused
|
||||
if_equal $1, .Refused
|
||||
setflag ENGINE_GOLDENROD_UNDERGROUND_GOT_HAIRCUT
|
||||
|
@ -342,21 +342,21 @@ YoungerHaircutBrotherScript:
|
|||
end
|
||||
|
||||
UnknownScript_0x7c2bb:
|
||||
writetext UnknownText_0x7c8bf
|
||||
writetext HaircutBrosText_SlightlyHappier
|
||||
special Functionc472
|
||||
closetext
|
||||
loadmovesprites
|
||||
end
|
||||
|
||||
UnknownScript_0x7c2c4:
|
||||
writetext UnknownText_0x7c8dc
|
||||
writetext HaircutBrosText_Happier
|
||||
special Functionc472
|
||||
closetext
|
||||
loadmovesprites
|
||||
end
|
||||
|
||||
UnknownScript_0x7c2cd:
|
||||
writetext UnknownText_0x7c8ee
|
||||
writetext HaircutBrosText_MuchHappier
|
||||
special Functionc472
|
||||
closetext
|
||||
loadmovesprites
|
||||
|
@ -615,19 +615,19 @@ UnknownText_0x7c87b:
|
|||
line "done for today."
|
||||
done
|
||||
|
||||
UnknownText_0x7c8bf:
|
||||
HaircutBrosText_SlightlyHappier:
|
||||
text_from_ram StringBuffer3
|
||||
text " looks a"
|
||||
line "little happier."
|
||||
done
|
||||
|
||||
UnknownText_0x7c8dc:
|
||||
HaircutBrosText_Happier:
|
||||
text_from_ram StringBuffer3
|
||||
text " looks"
|
||||
line "happy."
|
||||
done
|
||||
|
||||
UnknownText_0x7c8ee:
|
||||
HaircutBrosText_MuchHappier:
|
||||
text_from_ram StringBuffer3
|
||||
text " looks"
|
||||
line "delighted!"
|
||||
|
|
|
@ -407,10 +407,10 @@ Function1002c9: ; 1002c9
|
|||
|
||||
Function1002dc: ; 1002dc
|
||||
ld a, $f8
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
callba RunMapSetupScript
|
||||
xor a
|
||||
ld [$ff9f], a
|
||||
ld [hMapEntryMethod], a
|
||||
call Functione51
|
||||
ret
|
||||
; 1002ed
|
||||
|
@ -1097,7 +1097,7 @@ Function100697: ; 100697
|
|||
ret
|
||||
|
||||
.asm_1006b4
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ret
|
||||
|
||||
|
@ -1484,7 +1484,7 @@ Function100902: ; 100902
|
|||
hlcoord 4, 11
|
||||
call PlaceString
|
||||
hlcoord 8, 11
|
||||
ld bc, $0102
|
||||
lb bc, 1, 2
|
||||
ld de, StringBuffer2
|
||||
call PrintNum
|
||||
ld de, SFX_TWO_PC_BEEPS
|
||||
|
@ -1844,7 +1844,7 @@ Function100b9f: ; 100b9f
|
|||
callba Function3e786
|
||||
ret z
|
||||
call Function100dd8
|
||||
jp c, Function2ec8
|
||||
jp c, xor_a_dec_a
|
||||
call Function100e72
|
||||
call Function100bc2
|
||||
push af
|
||||
|
@ -7558,7 +7558,7 @@ Function1034e0: ; 1034e0
|
|||
add hl, bc
|
||||
pop bc
|
||||
ld a, $6
|
||||
call Functionfb8
|
||||
call FillBoxWithByte
|
||||
ret
|
||||
; 1034f1
|
||||
|
||||
|
|
|
@ -1343,7 +1343,7 @@ Function108a87: ; 108a87
|
|||
|
||||
Function108a92: ; 108a92
|
||||
hlcoord 9, 0
|
||||
ld bc, $8103
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
ret
|
||||
; 108a9c
|
||||
|
@ -1380,7 +1380,7 @@ Unknown_108abb: ; 108abb
|
|||
|
||||
Function108abe: ; 108abe
|
||||
hlcoord 8, 6
|
||||
ld bc, $8205
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 2, 5
|
||||
call PrintNum
|
||||
ret
|
||||
; 108ac8
|
||||
|
|
|
@ -8345,7 +8345,7 @@ Function117bb6:
|
|||
ld a, [wd001]
|
||||
cp $f
|
||||
jr nz, .asm_117c16 ; 0x117c01 $13
|
||||
ld hl, wdfec
|
||||
ld hl, $e000 - 20
|
||||
ld de, wcd69
|
||||
ld c, $10
|
||||
.asm_117c0b
|
||||
|
@ -13368,11 +13368,11 @@ Function11a302: ; 11a302
|
|||
call PlaceString
|
||||
hlcoord 9, 4
|
||||
ld de, wcd68
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
hlcoord 14, 4
|
||||
ld de, wcd67
|
||||
ld bc, $8102
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 2
|
||||
call PrintNum
|
||||
ld a, $80
|
||||
ld [wcd44], a
|
||||
|
@ -15254,7 +15254,7 @@ Function11b22a: ; 11b22a
|
|||
; 11b236
|
||||
|
||||
Function11b236: ; 11b236
|
||||
jp Functionfb8
|
||||
jp FillBoxWithByte
|
||||
; 11b239
|
||||
|
||||
Function11b239: ; 11b239
|
||||
|
|
|
@ -2359,7 +2359,7 @@ Function17ded9: ; 17ded9
|
|||
ld [MonType], a
|
||||
push hl
|
||||
push bc
|
||||
predef AddPkmnToParty
|
||||
predef TryAddMonToParty
|
||||
callba Function4db49
|
||||
pop bc
|
||||
pop hl
|
||||
|
@ -4359,9 +4359,9 @@ Function17f382: ; 17f382
|
|||
ld de, $b2f4
|
||||
|
||||
.asm_17f3ab
|
||||
ld a, $82
|
||||
ld a, PRINTNUM_LEADINGZEROS | 2
|
||||
ld b, a
|
||||
ld a, $3
|
||||
ld a, 3
|
||||
ld c, a
|
||||
call PrintNum
|
||||
call CloseSRAM
|
||||
|
@ -5347,7 +5347,7 @@ Function17ff3c: ; 17ff3c
|
|||
ld [wc300], a
|
||||
hlcoord 14, 2
|
||||
ld de, wc300
|
||||
ld bc, $8103
|
||||
lb bc, PRINTNUM_LEADINGZEROS | 1, 3
|
||||
call PrintNum
|
||||
pop af
|
||||
ld [wc300], a
|
||||
|
|
5
sram.asm
5
sram.asm
|
@ -27,9 +27,8 @@ s0_abe4End::
|
|||
ds $30
|
||||
|
||||
s0_ac60:: ds 8
|
||||
s0_ac68:: ds 1
|
||||
s0_ac69:: ds 1
|
||||
s0_ac6a:: ds 1
|
||||
sLuckyNumberDay:: ds 1
|
||||
sLuckyIDNumber:: ds 2
|
||||
|
||||
ds $b200 - $ac6b
|
||||
|
||||
|
|
|
@ -1222,7 +1222,7 @@ UnknownText_0x1c123a: ; 1c123a
|
|||
text_from_ram StringBuffer1
|
||||
text " caught by"
|
||||
line "@"
|
||||
text_from_ram wdfe9 + 1
|
||||
text_from_ram wMagikarpRecordHoldersName
|
||||
text_waitbutton
|
||||
db "@"
|
||||
; 1c1260
|
||||
|
|
|
@ -36,12 +36,10 @@ endr
|
|||
jp [hl]
|
||||
; fc01b
|
||||
|
||||
|
||||
Tileset00Anim: ; 0xfc01b
|
||||
Tileset02Anim: ; 0xfc01b
|
||||
Tileset03Anim: ; 0xfc01b
|
||||
; param, function
|
||||
dw $9140, AnimateWaterTile
|
||||
dwtile $14, VTiles2, AnimateWaterTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -55,10 +53,9 @@ Tileset03Anim: ; 0xfc01b
|
|||
; 0xfc047
|
||||
|
||||
Tileset25Anim: ; 0xfc047
|
||||
; param, function
|
||||
dw $9140, AnimateWaterTile
|
||||
dwtile $14, VTiles2, AnimateWaterTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw $95f0, AnimateFountain
|
||||
dwtile $5f, VTiles2, AnimateFountain
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, TileAnimationPalette
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -70,7 +67,6 @@ Tileset25Anim: ; 0xfc047
|
|||
; 0xfc073
|
||||
|
||||
Tileset31Anim: ; 0xfc073
|
||||
; param, function
|
||||
dw NULL, ForestTreeLeftAnimation
|
||||
dw NULL, ForestTreeRightAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -79,15 +75,14 @@ Tileset31Anim: ; 0xfc073
|
|||
dw NULL, ForestTreeLeftAnimation2
|
||||
dw NULL, ForestTreeRightAnimation2
|
||||
dw NULL, AnimateFlowerTile
|
||||
dw $9140, AnimateWaterTile
|
||||
dwtile $14, VTiles2, AnimateWaterTile
|
||||
dw NULL, TileAnimationPalette
|
||||
dw NULL, NextTileFrame8
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc0a3
|
||||
|
||||
Tileset01Anim: ; 0xfc0a3
|
||||
; param, function
|
||||
dw $9140, AnimateWaterTile
|
||||
dwtile $14, VTiles2, AnimateWaterTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, TileAnimationPalette
|
||||
|
@ -103,10 +98,9 @@ Tileset01Anim: ; 0xfc0a3
|
|||
; 0xfc0d7
|
||||
|
||||
TilesetAnimfc0d7: ; 0xfc0d7
|
||||
; param, function
|
||||
dw $9030, WriteTileToBuffer
|
||||
dwtile $03, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw $9030, WriteTileFromBuffer
|
||||
dwtile $03, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -118,10 +112,9 @@ TilesetAnimfc0d7: ; 0xfc0d7
|
|||
; 0xfc103
|
||||
|
||||
TilesetAnimfc103: ; 0xfc103
|
||||
; param, function
|
||||
dw $9140, WriteTileToBuffer
|
||||
dwtile $14, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw $9140, WriteTileFromBuffer
|
||||
dwtile $14, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -133,8 +126,7 @@ TilesetAnimfc103: ; 0xfc103
|
|||
; 0xfc12f
|
||||
|
||||
Tileset09Anim: ; 0xfc12f
|
||||
; param, function
|
||||
dw $9140, AnimateWaterTile
|
||||
dwtile $14, VTiles2, AnimateWaterTile
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -149,7 +141,6 @@ Tileset09Anim: ; 0xfc12f
|
|||
; 0xfc15f
|
||||
|
||||
Tileset15Anim: ; 0xfc15f
|
||||
; param, function
|
||||
dw NULL, SafariFountainAnim2
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -161,88 +152,83 @@ Tileset15Anim: ; 0xfc15f
|
|||
; 0xfc17f
|
||||
|
||||
TilesetAnimfc17f: ; 0xfc17f
|
||||
; param, function
|
||||
dw $9530, WriteTileToBuffer
|
||||
dwtile $53, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileDown
|
||||
dw wcf41, ScrollTileDown
|
||||
dw $9530, WriteTileFromBuffer
|
||||
dw $9030, WriteTileToBuffer
|
||||
dwtile $53, VTiles2, WriteTileFromBuffer
|
||||
dwtile $03, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw $9030, WriteTileFromBuffer
|
||||
dw $9530, WriteTileToBuffer
|
||||
dwtile $03, VTiles2, WriteTileFromBuffer
|
||||
dwtile $53, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileDown
|
||||
dw wcf41, ScrollTileDown
|
||||
dw $9530, WriteTileFromBuffer
|
||||
dwtile $53, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc1af
|
||||
|
||||
TilesetAnimfc1af: ; 0xfc1af
|
||||
; param, function
|
||||
dw $9540, WriteTileToBuffer
|
||||
dwtile $54, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileDown
|
||||
dw wcf41, ScrollTileDown
|
||||
dw $9540, WriteTileFromBuffer
|
||||
dwtile $54, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, WaitTileAnimation
|
||||
dw $9030, WriteTileToBuffer
|
||||
dwtile $03, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw $9030, WriteTileFromBuffer
|
||||
dwtile $03, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, WaitTileAnimation
|
||||
dw $9540, WriteTileToBuffer
|
||||
dwtile $54, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileDown
|
||||
dw wcf41, ScrollTileDown
|
||||
dw $9540, WriteTileFromBuffer
|
||||
dwtile $54, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc1e7
|
||||
|
||||
Tileset24Anim: ; 0xfc1e7
|
||||
Tileset30Anim: ; 0xfc1e7
|
||||
; param, function
|
||||
dw $9140, WriteTileToBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dwtile $14, VTiles2, WriteTileToBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw NULL, Functionfc71e
|
||||
dw $9140, WriteTileFromBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dwtile $14, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw NULL, TileAnimationPalette
|
||||
dw NULL, Functionfc71e
|
||||
dw $9400, WriteTileToBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dwtile $40, VTiles2, WriteTileToBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileDown
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileDown
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileDown
|
||||
dw NULL, Functionfc71e
|
||||
dw $9400, WriteTileFromBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dwtile $40, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc233
|
||||
|
||||
Tileset29Anim: ; 0xfc233
|
||||
; param, function
|
||||
dw $9350, WriteTileToBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dwtile $35, VTiles2, WriteTileToBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw NULL, Functionfc71e
|
||||
dw $9350, WriteTileFromBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dwtile $35, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw NULL, TileAnimationPalette
|
||||
dw NULL, Functionfc71e
|
||||
dw $9310, WriteTileToBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dwtile $31, VTiles2, WriteTileToBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileDown
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileDown
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw wcf41, ScrollTileDown
|
||||
dw NULL, Functionfc71e
|
||||
dw $9310, WriteTileFromBuffer
|
||||
dw NULL, Functionfc71e
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dwtile $31, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, FlickeringCaveEntrancePalette
|
||||
dw NULL, DoneTileAnimation
|
||||
; 0xfc27f
|
||||
|
||||
Tileset23Anim: ; 0xfc27f
|
||||
; param, function
|
||||
dw SproutPillarTilePointer9, AnimateSproutPillarTile
|
||||
dw SproutPillarTilePointer10, AnimateSproutPillarTile
|
||||
dw SproutPillarTilePointer7, AnimateSproutPillarTile
|
||||
|
@ -262,9 +248,9 @@ Tileset23Anim: ; 0xfc27f
|
|||
; 0xfc2bf
|
||||
|
||||
TilesetAnimfc2bf: ; 0xfc2bf
|
||||
dw $94f0, WriteTileToBuffer
|
||||
dwtile $4f, VTiles2, WriteTileToBuffer
|
||||
dw wcf41, ScrollTileRightLeft
|
||||
dw $94f0, WriteTileFromBuffer
|
||||
dwtile $4f, VTiles2, WriteTileFromBuffer
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -299,7 +285,6 @@ Tileset33Anim: ; 0xfc2e7
|
|||
Tileset34Anim: ; 0xfc2e7
|
||||
Tileset35Anim: ; 0xfc2e7
|
||||
Tileset36Anim: ; 0xfc2e7
|
||||
; param, function
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
dw NULL, WaitTileAnimation
|
||||
|
@ -1002,36 +987,37 @@ TileAnimationPalette: ; fc6d7
|
|||
; fc71e
|
||||
|
||||
|
||||
Functionfc71e: ; fc71e
|
||||
FlickeringCaveEntrancePalette: ; fc71e
|
||||
; No palette changes on DMG.
|
||||
ld a, [hCGB]
|
||||
and a
|
||||
ret z
|
||||
|
||||
; We don't want to mess with non-standard palettes.
|
||||
ld a, [rBGP]
|
||||
cp $e4
|
||||
cp %11100100
|
||||
ret nz
|
||||
|
||||
; We only want to be here if we're in a dark cave.
|
||||
ld a, [wd847]
|
||||
cp $ff
|
||||
cp $ff ; 3,3,3,3
|
||||
ret nz
|
||||
|
||||
ld a, [rSVBK]
|
||||
push af
|
||||
|
||||
ld a, 5
|
||||
ld a, 5 ; wra5: gfx
|
||||
ld [rSVBK], a
|
||||
ld a, $a0
|
||||
; Ready for BGPD input...
|
||||
ld a, %10100000 ; auto-increment, index $20 (pal 4 color 0)
|
||||
ld [rBGPI], a
|
||||
ld a, [$ff9b]
|
||||
and 2
|
||||
jr nz, .asm_fc743
|
||||
ld hl, Unkn1Pals + $20
|
||||
jr .asm_fc746
|
||||
and %00000010
|
||||
jr nz, .bit1set
|
||||
ld hl, Unkn1Pals + $20 ; pal 4 color 0
|
||||
jr .okay
|
||||
|
||||
.asm_fc743
|
||||
ld hl, Unkn1Pals + $22
|
||||
.bit1set
|
||||
ld hl, Unkn1Pals + $22 ; pal 4 color 2
|
||||
|
||||
.asm_fc746
|
||||
.okay
|
||||
ld a, [hli]
|
||||
ld [rBGPD], a
|
||||
ld a, [hli]
|
||||
|
@ -1043,16 +1029,16 @@ Functionfc71e: ; fc71e
|
|||
; fc750
|
||||
|
||||
|
||||
SproutPillarTilePointer1: dw $92d0, SproutPillarTile1
|
||||
SproutPillarTilePointer2: dw $92f0, SproutPillarTile2
|
||||
SproutPillarTilePointer3: dw $93d0, SproutPillarTile3
|
||||
SproutPillarTilePointer4: dw $93f0, SproutPillarTile4
|
||||
SproutPillarTilePointer5: dw $93c0, SproutPillarTile5
|
||||
SproutPillarTilePointer6: dw $92c0, SproutPillarTile6
|
||||
SproutPillarTilePointer7: dw $94d0, SproutPillarTile7
|
||||
SproutPillarTilePointer8: dw $94f0, SproutPillarTile8
|
||||
SproutPillarTilePointer9: dw $95d0, SproutPillarTile9
|
||||
SproutPillarTilePointer10: dw $95f0, SproutPillarTile10
|
||||
SproutPillarTilePointer1: dwtile $2d, VTiles2, SproutPillarTile1
|
||||
SproutPillarTilePointer2: dwtile $2f, VTiles2, SproutPillarTile2
|
||||
SproutPillarTilePointer3: dwtile $3d, VTiles2, SproutPillarTile3
|
||||
SproutPillarTilePointer4: dwtile $3f, VTiles2, SproutPillarTile4
|
||||
SproutPillarTilePointer5: dwtile $3c, VTiles2, SproutPillarTile5
|
||||
SproutPillarTilePointer6: dwtile $2c, VTiles2, SproutPillarTile6
|
||||
SproutPillarTilePointer7: dwtile $4d, VTiles2, SproutPillarTile7
|
||||
SproutPillarTilePointer8: dwtile $4f, VTiles2, SproutPillarTile8
|
||||
SproutPillarTilePointer9: dwtile $5d, VTiles2, SproutPillarTile9
|
||||
SproutPillarTilePointer10: dwtile $5f, VTiles2, SproutPillarTile10
|
||||
|
||||
SproutPillarTile1: INCBIN "gfx/tilesets/sprout-pillar/1.2bpp"
|
||||
SproutPillarTile2: INCBIN "gfx/tilesets/sprout-pillar/2.2bpp"
|
||||
|
@ -1067,10 +1053,10 @@ SproutPillarTile10: INCBIN "gfx/tilesets/sprout-pillar/10.2bpp"
|
|||
; fca98
|
||||
|
||||
|
||||
WhirlpoolFrames1: dw $9320, WhirlpoolTiles1
|
||||
WhirlpoolFrames2: dw $9330, WhirlpoolTiles2
|
||||
WhirlpoolFrames3: dw $9420, WhirlpoolTiles3
|
||||
WhirlpoolFrames4: dw $9430, WhirlpoolTiles4
|
||||
WhirlpoolFrames1: dwtile $32, VTiles2, WhirlpoolTiles1
|
||||
WhirlpoolFrames2: dwtile $33, VTiles2, WhirlpoolTiles2
|
||||
WhirlpoolFrames3: dwtile $42, VTiles2, WhirlpoolTiles3
|
||||
WhirlpoolFrames4: dwtile $43, VTiles2, WhirlpoolTiles4
|
||||
; fcaa8
|
||||
|
||||
WhirlpoolTiles1: INCBIN "gfx/tilesets/whirlpool/1.2bpp"
|
||||
|
|
45
wram.asm
45
wram.asm
|
@ -4,7 +4,7 @@ flag_array: MACRO
|
|||
ds ((\1) + 7) / 8
|
||||
ENDM
|
||||
|
||||
box_struct_length EQU 24 + NUM_MOVES * 2
|
||||
box_struct_length EQU 24 + NUM_MOVES * 2 ; 32
|
||||
box_struct: MACRO
|
||||
\1Species:: db
|
||||
\1Item:: db
|
||||
|
@ -30,6 +30,7 @@ box_struct: MACRO
|
|||
\1End::
|
||||
ENDM
|
||||
|
||||
party_struct_length EQU box_struct_length + 16
|
||||
party_struct: MACRO
|
||||
box_struct \1
|
||||
\1Status:: db
|
||||
|
@ -1190,6 +1191,7 @@ CurSpecies:: ; cf60
|
|||
wcf61:: ds 2
|
||||
wcf63:: ds 1
|
||||
wNrOfBeatenBattleTowerTrainers::
|
||||
wMomBankDigitCursorPosition::
|
||||
wcf64:: ds 1
|
||||
IF !DEF(CRYSTAL11)
|
||||
wPokedexStatus::
|
||||
|
@ -1352,17 +1354,22 @@ wd001:: ds 1
|
|||
wd002::
|
||||
PhoneScriptBank::
|
||||
DefaultFlypoint:: ; d002
|
||||
LuckyNumberDigit1Buffer::
|
||||
ds 1
|
||||
wd003::
|
||||
LuckyNumberDigit2Buffer::
|
||||
PhoneCallerLo::
|
||||
ds 1
|
||||
wd004::
|
||||
LuckyNumberDigit3Buffer::
|
||||
PhoneCallerHi::
|
||||
ds 1
|
||||
wd005::
|
||||
LuckyNumberDigit4Buffer::
|
||||
StartFlypoint:: ; d005
|
||||
ds 1
|
||||
wd006::
|
||||
LuckyNumberDigit5Buffer::
|
||||
EndFlypoint:: ; d006
|
||||
ds 1
|
||||
|
||||
|
@ -1717,8 +1724,11 @@ MovementType::
|
|||
Buffer2:: ; d1eb
|
||||
ds 1
|
||||
|
||||
Buffer3::
|
||||
wd1ec:: ds 1
|
||||
Buffer4::
|
||||
wd1ed:: ds 1
|
||||
Buffer5::
|
||||
wd1ee:: ds 1
|
||||
wd1ef:: ds 1
|
||||
wd1f0:: ds 1
|
||||
|
@ -1842,7 +1852,9 @@ wd25e:: ds 4
|
|||
wd262:: ds 1
|
||||
wd263:: ds 1
|
||||
wd264:: ds 1
|
||||
GetPokemonName_Parameter::
|
||||
wFoundMatchingIDInParty::
|
||||
wNamedObjectIndexBuffer::
|
||||
wCurTMHM::
|
||||
wd265:: ds 1
|
||||
wd266:: ds 1
|
||||
wd267:: ds 1
|
||||
|
@ -1914,7 +1926,7 @@ wd44e:: ds 1
|
|||
wd44f:: ds 1
|
||||
wd450:: ds 1
|
||||
wd451:: ds 1
|
||||
wd452:: ds 1
|
||||
wWildEncounterCooldown:: ds 1
|
||||
wd453:: ds 1
|
||||
wd454:: ds 1
|
||||
ds 4
|
||||
|
@ -1944,8 +1956,8 @@ wCrystalDataEnd::
|
|||
|
||||
wd479:: ds 2
|
||||
|
||||
wGameData::
|
||||
wPlayerData::
|
||||
|
||||
PlayerID:: ; d47b
|
||||
ds 2
|
||||
|
||||
|
@ -1956,7 +1968,7 @@ RedsName:: ds NAME_LENGTH ; d49e
|
|||
GreensName:: ds NAME_LENGTH ; d4a9
|
||||
|
||||
wd4b4:: ds 1
|
||||
wd4b5:: ds 1
|
||||
wSpawnAfterChampion:: ds 1
|
||||
|
||||
; init time set at newgame
|
||||
StartDay:: ; d4b6
|
||||
|
@ -2150,7 +2162,7 @@ PCItemsEnd::
|
|||
ds 1
|
||||
|
||||
wPokegearFlags:: ds 1
|
||||
wd958:: ds 1
|
||||
wRadioTuningKnob:: ds 1
|
||||
wd959:: ds 2
|
||||
WhichRegisteredItem:: ; d95b
|
||||
ds 1
|
||||
|
@ -2384,7 +2396,8 @@ FruitTreeFlags:: ; dc27
|
|||
|
||||
ds 5
|
||||
|
||||
wdc2d:: ds 4
|
||||
wLuckyNumberDayBuffer:: ds 2
|
||||
ds 2
|
||||
wSpecialPhoneCallID:: ds 2
|
||||
wdc33:: ds 2
|
||||
wdc35:: ds 4
|
||||
|
@ -2416,9 +2429,8 @@ wdc77:: ds 2
|
|||
wdc79:: ds 1
|
||||
wdc7a:: ds 2
|
||||
wdc7c:: ds 33
|
||||
wdc9d:: ds 2
|
||||
wdc9f:: ds 1
|
||||
wdca0:: ds 1
|
||||
wLuckyNumberShowFlag:: ds 2 ; dc9d
|
||||
wLuckyIDNumber:: ds 2 ; dc9f
|
||||
RepelStepsLeft:: ; If a Repel is in use, it contains the nr of steps it's still active
|
||||
ds 1
|
||||
wdca2:: ds 2
|
||||
|
@ -2571,18 +2583,13 @@ wdfe4:: ds 1
|
|||
wdfe5:: ds 1
|
||||
wdfe6:: ds 1
|
||||
wdfe7:: ds 1
|
||||
wdfe8:: ds 1
|
||||
wdfe9:: ds 1
|
||||
ds 1
|
||||
ds 1
|
||||
wdfec:: ds 1
|
||||
ds 3
|
||||
|
||||
ds 5
|
||||
wBestMagikarpLengthFeet:: ds 1
|
||||
wBestMagikarpLengthInches:: ds 1
|
||||
wMagikarpRecordHoldersName:: ds NAME_LENGTH
|
||||
wdff5::
|
||||
|
||||
wPokemonDataEnd::
|
||||
|
||||
wGameDataEnd::
|
||||
|
||||
SECTION "Pic Animations", WRAMX, BANK [2]
|
||||
|
||||
|
|
Loading…
Reference in New Issue