Merge pull request #213 from yenatch/merge-mrwint

Merge mrwint/master into kanzure/master
This commit is contained in:
Bryan Bishop 2013-10-25 16:01:12 -07:00
commit 07612257cc
17 changed files with 46237 additions and 2355 deletions

View File

@ -4469,9 +4469,7 @@ BattleCommand40: ; 35813
ret z
ld b, a
ld hl, $45ec
ld a, $f
rst FarCall
callab Function3c5ec
ld a, b
cp $59
@ -4668,9 +4666,7 @@ BattleCommand42: ; 35926
ld hl, $c4ca
ld a, $b
call Predef
ld a, $5e
ld hl, $4000
rst FarCall
callba Function178000
ld hl, SharedPainText
jp StdBattleTextBox
@ -5099,9 +5095,7 @@ BattleCommand48: ; 35b33
push bc
ld b, a
ld hl, $45ec
ld a, $f
rst $8
callab Function3c5ec
ld a, b
pop bc
@ -5324,9 +5318,7 @@ PlayFXAnimID: ; 35d08
ld c, 3
call DelayFrames
ld hl, $40d6
ld a, $33
rst FarCall ; callab SafePlayBattleAnimation
callab Functioncc0d6
ret
; 35d1c
@ -5589,9 +5581,7 @@ BattleCommand14: ; 35e5c
ld hl, FellAsleepText
call StdBattleTextBox
ld a, $f
ld hl, $5de9
rst FarCall
callba Function3dde9
jp z, Function0x34216
ret
@ -5666,9 +5656,7 @@ BattleCommand13: ; 35eee
ld hl, WasPoisonedText
call StdBattleTextBox
ld a, $f
ld hl, $5de9
rst FarCall
callba Function3dde9
ret
; 35f2c
@ -5742,9 +5730,7 @@ BattleCommand2f: ; 35f2c
call StdBattleTextBox
.asm_35fb1
ld a, $f
ld hl, $5de9
rst FarCall
callba Function3dde9
ret
.asm_35fb8
@ -5940,9 +5926,7 @@ BattleCommand17: ; 3608c
ld hl, WasBurnedText
call StdBattleTextBox
ld a, $f
ld hl, $5de9
rst FarCall
callba Function3dde9
ret
; 360dd
@ -6013,9 +5997,7 @@ BattleCommand18: ; 36102
ld hl, WasFrozenText
call StdBattleTextBox
ld a, $f
ld hl, $5de9
rst FarCall
callba Function3dde9
ret nz
call Function0x34216
call EndRechargeOpp
@ -7300,9 +7282,7 @@ BattleCommand23: ; 3680f
ld a, d
inc a
ld [$c718], a
ld hl, $54c3
ld a, $f
rst FarCall
callab Function3d4c3
ld hl, DraggedOutText
call StdBattleTextBox
@ -8509,9 +8489,7 @@ BattleCommand35: ; 36f9d
BattleCommand36: ; 36fe1
call Function0x37e01
ld a, $41
ld hl, $60e5
rst FarCall
callba Function1060e5
jp PrintNothingHappened
; 36fed
@ -8701,9 +8679,7 @@ BattleCommand1f: ; 3707f
inc de
ld [de], a
ld [$d265], a
ld a, $14
ld hl, $4964
rst FarCall
callba GetTypeName
call Function0x37e01
ld hl, TransformedTypeText
jp StdBattleTextBox
@ -9137,9 +9113,7 @@ CheckSubstituteOpp: ; 37378
BattleCommand1a: ; 37380
ld a, $41
ld hl, $610d
rst FarCall
callba Function10610d
ld a, $4
ld [$cfca], a
ld c, $3
@ -9163,12 +9137,8 @@ BattleCommand1a: ; 37380
res 6, [hl]
call Function0x37ed5
ret nc
ld a, $f
ld hl, $5f58
rst FarCall
ld a, $f
ld hl, $6043
rst FarCall
callba DrawPlayerHUD
callba Function3e043
call $31f6
jp RefreshBattleHuds
; 373c9
@ -9822,9 +9792,7 @@ Function0x377f5: ; 377f5
xor a
ld [MonType], a
ld a, $14
ld hl, $4bdd
rst FarCall
callba GetGender
jr c, .asm_37849
ld b, 1
@ -9848,9 +9816,7 @@ Function0x377f5: ; 377f5
ld [$d124], a
ld a, 3
ld [MonType], a
ld a, $14
ld hl, $4bdd
rst FarCall
callba GetGender
pop bc
jr c, .asm_37849
@ -9948,13 +9914,13 @@ BattleCommand61: ; 37874
ld [$c689], a
call Function0x37e01
call SwitchTurn
ld hl, $5246
ld hl, AICheckPlayerMaxHP
ld a, [hBattleTurn]
and a
jr z, .asm_378ce ; 378c9 $3
ld hl, $5251
ld hl, AICheckEnemyMaxHP
.asm_378ce
ld a, $e
ld a, BANK(AICheckPlayerMaxHP)
rst FarCall
jr c, .asm_378f3 ; 378d1 $20
ld hl, $4c8e
@ -10132,19 +10098,13 @@ BattleCommand67: ; 379c9
call $1d6e
ld a, $f
ld hl, $52f7
rst FarCall
callba Function3d2f7
ld a, $f
ld hl, $5380
rst FarCall
callba Function3d380
call $3317
ld a, $f
ld hl, $6d9f
rst FarCall
callba Function3ed9f
call $1c17
call $300b
@ -10158,9 +10118,7 @@ BattleCommand67: ; 379c9
call $32f9
call Function0x37a67
ld a, $f
ld hl, $52e0
rst FarCall
callba Function3d2e0
jp c, EndMoveEffect
@ -10182,9 +10140,7 @@ BattleCommand67: ; 379c9
call Function0x37e01
call Function0x37a82
ld a, $f
ld hl, $52e0
rst FarCall
callba Function3d2e0
jp c, EndMoveEffect
xor a
@ -10484,9 +10440,7 @@ BattleCommand6a6c: ; 37b7e
call Function0x37e01
call SwitchTurn
ld hl, $4cef
ld a, $f
rst FarCall ; callab 3ccef
callab Function3ccef
call SwitchTurn
call UpdateUserInParty
@ -10552,21 +10506,15 @@ BattleCommand95: ; 37c1a
and a
jr nz, .asm_37c4f
ld hl, $4c9f
ld a, $f
rst FarCall
callab GetHalfMaxHP
ld hl, $4cde
ld a, $f
rst FarCall
callab Function3ccde
jr nc, .asm_37c4f
push bc
call Function0x37e01
pop bc
ld hl, $4c3f
ld a, $f
rst FarCall
callab Function3cc3f
call UpdateUserInParty
ld a, $5
@ -10642,9 +10590,7 @@ BattleCommand9a: ; 37c95
and a
ret z
ld b, a
ld hl, $45ec
ld a, $f
rst FarCall
callab Function3c5ec
ld a, b
cp $90
ret z
@ -10965,9 +10911,7 @@ Function0x37e47: ; 37e47
push hl
push de
push bc
ld hl, $40d6
ld a, $33
rst FarCall ; callab SafePlayBattleAnimation
callab Functioncc0d6
pop bc
pop de
pop hl
@ -10988,9 +10932,7 @@ Function0x37e54: ; 37e54
push bc
call SwitchTurn
ld hl, $40d6
ld a, $33
rst FarCall ; callab SafePlayBattleAnimation
callab Functioncc0d6
call SwitchTurn
pop bc
@ -11080,25 +11022,19 @@ GetMoveByte: ; 37ebb
Function0x37ec0: ; 37ec0
ld a, $3e
ld hl, $7d54
rst $8
callba Functionfbd54
ret
; 37ec7
Function0x37ec7: ; 37ec7
ld a, $3e
ld hl, $7d71
rst $8
callba Functionfbd71
ret
; 37ece
Function0x37ece: ; 37ece
ld a, $3e
ld hl, $7d69
rst $8
callba Functionfbd69
ret
; 37ed5
@ -11108,9 +11044,7 @@ Function0x37ed5: ; 37ed5
push hl
push de
push bc
ld a, $13
ld hl, $6a44
rst $8
callba Function4ea44
pop bc
pop de
pop hl

View File

@ -283,8 +283,96 @@ ParseCredits: ; 1099aa
; 109a95
INCBIN "baserom.gbc", $109a95, $109b2c - $109a95
; known jump sources: 1098ac (42:58ac)
Function109a95: ; 109a95 (42:5a95)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld a, $c
ld [hBGMapAddress], a ; $ff00+$d6
ld a, $28
ld hl, TileMap ; $c4a0 (aliases: SpritesEnd)
ld bc, $168
call ByteFill
ld a, $7f
ld hl, $c4f0
ld bc, $118
call ByteFill
ld hl, $c4f0
ld a, $24
call Function109b1d
ld hl, $c5f4
ld a, $20
call Function109b1d
ld hl, AttrMap ; $cdd9
ld bc, $50
xor a
call ByteFill
ld hl, $ce29
ld bc, $14
ld a, $1
call ByteFill
ld hl, $ce3d
ld bc, $f0
ld a, $2
call ByteFill
ld hl, $cf2d
ld bc, $14
ld a, $1
call ByteFill
call Function3200
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld [hBGMapAddress], a ; $ff00+$d6
ld hl, TileMap ; $c4a0 (aliases: SpritesEnd)
call Function109aff
call Function3200
ret
; known jump sources: 109af8 (42:5af8)
Function109aff: ; 109aff (42:5aff)
ld b, $5
.asm_109b01
push hl
ld de, $11
ld c, $4
xor a
.asm_109b08
ld [hli], a
inc a
ld [hli], a
inc a
ld [hli], a
inc a
ld [hl], a
inc a
add hl, de
dec c
jr nz, .asm_109b08
pop hl
inc hl
inc hl
inc hl
inc hl
dec b
jr nz, .asm_109b01
ret
; known jump sources: 109ab7 (42:5ab7), 109abf (42:5abf)
Function109b1d: ; 109b1d (42:5b1d)
ld c, $5
.asm_109b1f
push af
ld [hli], a
inc a
ld [hli], a
inc a
ld [hli], a
inc a
ld [hli], a
pop af
dec c
jr nz, .asm_109b1f
ret
GetCreditsPalette: ; 109b2c
call .GetPalAddress
@ -342,7 +430,56 @@ INCBIN "baserom.gbc",$109b9a,$18 ; ditto.pal
INCBIN "baserom.gbc",$109bb2,$18 ; igglybuff.pal
; 109bca
INCBIN "baserom.gbc", $109bca, $109c24 - $109bca
; known jump sources: 10989e (42:589e), 109964 (42:5964)
Function109bca: ; 109bca (42:5bca)
ld hl, $cf64
ld a, [hl]
cp $ff
jr z, .asm_109bed
and $3
ld e, a
inc a
and $3
ld [hl], a
ld a, [$cf65]
and $3
add a
add a
add e
add a
ld e, a
ld d, $0
ld hl, $5bf1
add hl, de
ld a, [hli]
ld h, [hl]
ld l, a
ret
.asm_109bed
ld hl, $ca00
ret
; 109bf1 (42:5bf1)
INCBIN "baserom.gbc",$109bf1,$109c11 - $109bf1
; known jump sources: 109a1b (42:5a1b)
Function109c11: ; 109c11 (42:5c11)
ld a, $40
ld hl, $c55a
call Function109c1c
ld hl, $c56e
; known jump sources: 109c16 (42:5c16)
Function109c1c: ; 109c1c (42:5c1c)
ld c, $8
.asm_109c1e
ld [hli], a
inc a
dec c
jr nz, .asm_109c1e
ret
; 109c24 (42:5c24)
CreditsGFX:
INCBIN "gfx/credits/border.2bpp"

View File

@ -3,7 +3,7 @@
; location, bit
; pokegear
dwb $d957, %00000010 ; radio card
dwb $d957, %00000010 ; radio card ; $0
dwb $d957, %00000001 ; map card
dwb $d957, %00000100 ; phone card
dwb $d957, %00001000 ; expn card
@ -17,7 +17,7 @@
; DaycareLady, %10000000 = daycare 2 on
dwb DaycareLady, %00000001 ; monster 2 in daycare
dwb $d854, %00000001 ; mom saving money
dwb $d854, %00000001 ; mom saving money ; $8
dwb $d854, %10000000 ; dst
dwb $dc39, %00000001
@ -27,7 +27,7 @@
dwb $d84c, %00001000 ; pokerus
dwb $d84c, %00010000 ; rocket signal on ch20
dwb $d84c, %01000000 ; credits skip
dwb $d84c, %10000000 ; bug contest on
dwb $d84c, %10000000 ; bug contest on ; $10
dwb $d84d, %00000100 ; bug contest timer
dwb $d84d, %00000010 ; rockets in radio tower
dwb $d84d, %00000001 ; bike shop call enabled (1024 bike steps reqd)
@ -36,7 +36,7 @@
dwb $d84d, %01000000
dwb $d84d, %10000000 ; rockets in mahogany
dwb $dbf5, %00000001 ; strength active
dwb $dbf5, %00000001 ; strength active ; $18
dwb $dbf5, %00000010 ; always on bike (cant surf)
dwb $dbf5, %00000100 ; downhill (cycling road)
@ -45,7 +45,7 @@
dwb JohtoBadges, %00000100 ; plainbadge
dwb JohtoBadges, %00001000 ; fogbadge
dwb JohtoBadges, %00010000 ; mineralbadge
dwb JohtoBadges, %00100000 ; stormbadge
dwb JohtoBadges, %00100000 ; stormbadge ; $20
dwb JohtoBadges, %01000000 ; glacierbadge
dwb JohtoBadges, %10000000 ; risingbadge
@ -54,7 +54,7 @@
dwb KantoBadges, %00000100 ; thunderbadge
dwb KantoBadges, %00001000 ; rainbowbadge
dwb KantoBadges, %00010000 ; soulbadge
dwb KantoBadges, %00100000 ; marshbadge
dwb KantoBadges, %00100000 ; marshbadge ; $28
dwb KantoBadges, %01000000 ; volcanobadge
dwb KantoBadges, %10000000 ; earthbadge
@ -64,7 +64,7 @@
dwb UnlockedUnowns, %00000100 ; 3
dwb UnlockedUnowns, %00001000 ; 4
dwb UnlockedUnowns, %00010000 ; 5
dwb UnlockedUnowns, %00100000 ; 6
dwb UnlockedUnowns, %00100000 ; 6 ; $30
dwb UnlockedUnowns, %01000000 ; 7
dwb UnlockedUnowns, %10000000 ; 8
@ -74,7 +74,7 @@
dwb FlypointPerms, %00000100 ; pallet
dwb FlypointPerms, %00001000 ; viridian
dwb FlypointPerms, %00010000 ; pewter
dwb FlypointPerms, %00100000 ; cerulean
dwb FlypointPerms, %00100000 ; cerulean ; $38
dwb FlypointPerms, %01000000 ; rock tunnel
dwb FlypointPerms, %10000000 ; vermilion
dwb FlypointPerms + 1, %00000001 ; lavender
@ -82,7 +82,7 @@
dwb FlypointPerms + 1, %00000100 ; celadon
dwb FlypointPerms + 1, %00001000 ; fuchsia
dwb FlypointPerms + 1, %00010000 ; cinnabar
dwb FlypointPerms + 1, %00100000 ; indigo plateau
dwb FlypointPerms + 1, %00100000 ; indigo plateau ; $40
dwb FlypointPerms + 1, %01000000 ; new bark
dwb FlypointPerms + 1, %10000000 ; cherrygrove
dwb FlypointPerms + 2, %00000001 ; violet
@ -90,7 +90,7 @@
dwb FlypointPerms + 2, %00001000 ; cianwood
dwb FlypointPerms + 2, %00010000 ; goldenrod
dwb FlypointPerms + 2, %00100000 ; olivine
dwb FlypointPerms + 2, %01000000 ; ecruteak
dwb FlypointPerms + 2, %01000000 ; ecruteak ; $48
dwb FlypointPerms + 2, %10000000 ; mahogany
dwb FlypointPerms + 3, %00000001 ; lake of rage
dwb FlypointPerms + 3, %00000010 ; blackthorn
@ -100,7 +100,7 @@
dwb $dc9d, %00000001 ; lucky number show
dwb $d84d, %00001000
dwb $dc1e, %00000001 ; kurt making balls
dwb $dc1e, %00000001 ; kurt making balls ; $50
dwb $dc1e, %00000010
dwb $dc1e, %00000100 ; special wilddata?
dwb $dc1e, %00001000 ; time capsule (24h wait)
@ -109,7 +109,7 @@
dwb $dc1e, %01000000 ; goldenrod underground merchant closed
dwb $dc1e, %10000000 ; fought in trainer hall today
dwb $dc1f, %00000001 ; mt moon square clefairy
dwb $dc1f, %00000001 ; mt moon square clefairy ; $58
dwb $dc1f, %00000010 ; union cave lapras
dwb $dc1f, %00000100 ; goldenrod underground haircut used
dwb $dc1f, %00001000 ; goldenrod mall happiness event floor05 person07
@ -131,7 +131,7 @@
dwb $dc4c, %00000001 ; jack
dwb $dc4c, %00000010 ; huey
dwb $dc4c, %00000100 ; gaven
dwb $dc4c, %00001000 ; beth
dwb $dc4c, %00001000 ; beth ; $68
dwb $dc4c, %00010000 ; jose
dwb $dc4c, %00100000 ; reena
dwb $dc4c, %01000000 ; joey
@ -139,7 +139,7 @@
dwb $dc4d, %00000001 ; ralph
dwb $dc4d, %00000010 ; liz
dwb $dc4d, %00000100 ; anthony
dwb $dc4d, %00001000 ; todd
dwb $dc4d, %00001000 ; todd ; $70
dwb $dc4d, %00010000 ; gina
dwb $dc4d, %00100000 ; arnie
dwb $dc4d, %01000000 ; alan
@ -147,7 +147,7 @@
dwb $dc4e, %00000001 ; chad
dwb $dc4e, %00000010 ; tully
dwb $dc4e, %00000100 ; brent
dwb $dc4e, %00001000 ; tiffany
dwb $dc4e, %00001000 ; tiffany ; $78
dwb $dc4e, %00010000 ; vance
dwb $dc4e, %00100000 ; wilton
dwb $dc4e, %01000000 ; parry
@ -156,7 +156,7 @@
dwb $dc50, %00000001 ; beverly has nugget
dwb $dc50, %00000010 ; jose has star piece
dwb $dc50, %00000100 ; wade has item (see bittable1 $032b-e)
dwb $dc50, %00001000 ; gina has leaf stone
dwb $dc50, %00001000 ; gina has leaf stone ; $80
dwb $dc50, %00010000 ; alan has fire stone
dwb $dc50, %00100000 ; liz has thunderstone
dwb $dc50, %01000000 ; derek has nugget
@ -166,7 +166,7 @@
dwb $dc51, %00000010 ; wilton has item (see bittable1 $032f-31)
dwb $dc54, %00000001
dwb $dc54, %00000010
dwb $dc54, %00000010 ; $88
dwb $dc54, %00000100
dwb $dc54, %00001000
dwb $dc54, %00010000
@ -175,7 +175,7 @@
dwb $dc54, %10000000
dwb $dc55, %00000001
dwb $dc55, %00000010
dwb $dc55, %00000010 ; $90
dwb $dc55, %00000100
dwb $dc55, %00001000
dwb $dc55, %00010000
@ -184,7 +184,7 @@
dwb $dc55, %10000000
dwb $dc56, %00000001
dwb $dc56, %00000010
dwb $dc56, %00000010 ; $98
dwb $dc56, %00000100
dwb $dc56, %00001000
dwb $dc56, %00010000
@ -194,5 +194,5 @@
dwb $d45b, %00000100 ; female player has been transformed into male
dwb $dc20, %00000100 ; dunsparce swarm
dwb $dc20, %00000100 ; dunsparce swarm ; $a0
dwb $dc20, %00001000 ; yanma swarm

View File

@ -58,10 +58,7 @@ CheckFruitTree: ; 44055
; 4405f
PickedFruitTree: ; 4405f
ld a, $41
ld hl, $609b
rst FarCall ; empty function
callba Function10609b ; empty function
ld b, 1
jp GetFruitTreeFlag
; 4406a

View File

@ -201,7 +201,7 @@ Script_3callasm: ; 0x96e17
call GetScriptByte
ld h, a
ld a, b
rst $8
rst FarCall
ret
; 0x96e26
@ -214,9 +214,7 @@ Script_special: ; 0x96e26
ld e, a
call GetScriptByte
ld d, a
ld a, $3
ld hl, $401b
rst $8
callba Functionc01b
ret
; 0x96e35
@ -235,7 +233,7 @@ Script_2ptcallasm: ; 0x96e35
ld h, [hl]
ld l, a
ld a, b
rst $8
rst FarCall
ret
; 0x96e45
@ -421,18 +419,14 @@ Script_pokepic: ; 0x96f16
ld a, [$c2dd]
.asm_96f1f
ld [$d108], a
ld a, $9
ld hl, $44e3
rst $8
callba Function244e3
ret
; 0x96f29
Script_pokepicyesorno: ; 0x96f29
; script command 0x57
ld a, $9
ld hl, $4528
rst $8
callba Function24528
ret
; 0x96f30
@ -441,7 +435,7 @@ Script_interpretmenu2: ; 0x96f30
ld a, [ScriptBank]
ld hl, $1d81
rst $8
rst FarCall
ld a, [$cfa9]
jr nc, .asm_96f3d ; 0x96f3a $1
xor a
@ -455,7 +449,7 @@ Script_interpretmenu: ; 0x96f41
ld a, [ScriptBank]
ld hl, $202a
rst $8
rst FarCall
ld a, [$cf88]
jr nc, .asm_96f4e ; 0x96f4b $1
xor a
@ -473,9 +467,7 @@ Script_storetext: ; 0x96f52
call Function106c
call GetScriptByte
ld c, a
ld a, $47
ld hl, $4000
rst $8
callba Function11c000
ret
; 0x96f60
@ -579,9 +571,7 @@ Script_pocketisfull: ; 0x96fd5
Script_specialsound: ; 0x96fe4
; script command 0x88
ld a, $3
ld hl, $543d
rst $8
callba CheckItemPocket
ld a, [$d142]
cp TM_HM
ld de, SFX_GET_TM
@ -660,9 +650,7 @@ Script_pokemart: ; 0x97065
ld d, a
ld a, [ScriptBank]
ld b, a
ld a, $5
ld hl, $5a45
rst $8
callba OpenMartDialog
ret
; 0x9707c
@ -679,9 +667,7 @@ Script_elevator: ; 0x9707c
ld d, a
ld a, [ScriptBank]
ld b, a
ld a, $4
ld hl, $742d
rst $8
callba Function1342d
ret c
ld a, $1
ld [$c2dd], a
@ -695,9 +681,7 @@ Script_trade: ; 0x97099
call GetScriptByte
ld e, a
ld a, $3f
ld hl, $4ba8
rst $8
callba Functionfcba8
ret
; 0x970a4
@ -712,18 +696,14 @@ Script_phonecall: ; 0x970a4
ld d, a
ld a, [ScriptBank]
ld b, a
ld a, $24
ld hl, $429a
rst $8
callba Function9029a
ret
; 0x970b7
Script_hangup: ; 0x970b7
; script command 0x99
ld a, $24
ld hl, $42eb
rst $8
callba Function902eb
ret
; 0x970be
@ -736,9 +716,7 @@ Script_askforphonenumber: ; 0x970be
jr c, .asm_970d6 ; 0x970c1 $13
call GetScriptByte
ld c, a
ld a, $24
ld hl, $4000
rst $8
callba Function90000
jr c, .asm_970d2 ; 0x970cd $3
xor a
jr .asm_970db ; 0x970d0 $9
@ -760,9 +738,7 @@ Script_describedecoration: ; 0x970df
call GetScriptByte
ld b, a
ld a, $9
ld hl, $6f59
rst $8
callba Function26f59
ld h, d
ld l, e
jp ScriptJump
@ -792,9 +768,7 @@ Script_loadwilddata: ; 0x970fc
ld d, a
call GetScriptByte
ld e, a
ld a, $3
ld hl, $4403
rst $8
callba Functionc403
ret
; 0x9710f
@ -898,9 +872,7 @@ Script_playrammusic: ; 0x9717a
ld a, [$d22f]
ld e, a
ld a, $3a
ld hl, $500a
rst $8
callba PlayTrainerEncounterMusic
ret
; 0x97185
@ -968,9 +940,7 @@ Script_waitbutton: ; 0x971c3
Script_warpsound: ; 0x971c7
; script command 0x87
ld a, $5
ld hl, $4a07
rst $8
callba Function14a07
call PlaySFX
ret
; 0x971d1
@ -1026,9 +996,7 @@ Script_applymovement: ; 0x971f3
Function971fa: ; 971fa
push bc
ld a, c
ld a, $1
ld hl, $585c
rst $8
callba Function585c
pop bc
push bc
call Unknown_0x97221
@ -1048,9 +1016,7 @@ Function971fa: ; 971fa
; 0x97221
Unknown_0x97221: ; 0x97221
ld a, $1
ld hl, $5897
rst $8
callba Function5897
ret
; 0x97228
@ -1073,9 +1039,7 @@ Script_faceplayer: ; 0x9722e
ld d, $0
ld a, [$ffe0]
ld e, a
ld a, $2
ld hl, $4417
rst $8
callba Function8417
ld a, d
add a
add a
@ -1107,9 +1071,7 @@ Script_faceperson: ; 0x97248
.asm_97261
ld d, a
push de
ld a, $2
ld hl, $4417
rst $8
callba Function8417
pop bc
ret c
ld a, d
@ -1233,9 +1195,7 @@ Script_disappear: ; 0x972ee
ld a, [$ffaf]
ld b, $1
call Unknown_0x9730b
ld a, $1
ld hl, $5920
rst $8
callba Function5920
ret
; 0x9730b
@ -1272,18 +1232,14 @@ Script_follow: ; 0x97325
call GetScriptByte
call Unknown_0x971e3
ld c, a
ld a, $1
ld hl, $5803
rst $8
callba Function5803
ret
; 0x9733a
Script_stopfollow: ; 0x9733a
; script command 0x71
ld a, $1
ld hl, $581f
rst $8
callba Function581f
ret
; 0x97341
@ -1303,9 +1259,7 @@ Script_moveperson: ; 0x97341
call GetScriptByte
add $4
ld e, a
ld a, $2
ld hl, $407e
rst $8
callba Function807e
ret
; 0x9735b
@ -1321,9 +1275,7 @@ Script_writepersonxy: ; 0x9735b
ld a, [$ffe0]
.asm_97367
ld b, a
ld a, $2
ld hl, $40a1
rst $8
callba Function80a1
ret
; 0x9736f
@ -1339,9 +1291,7 @@ Script_follownotexact: ; 0x9736f
call GetScriptByte
call Unknown_0x971e3
ld c, a
ld a, $2
ld hl, $439e
rst $8
callba Function839e
ret
; 0x97384
@ -1356,9 +1306,7 @@ Script_loademote: ; 0x97384
ld a, [$c2dd]
.asm_9738e
ld c, a
ld a, $5
ld hl, $442f
rst $8
callba Function1442f
ret
; 0x97396
@ -1514,9 +1462,7 @@ Script_catchtutorial: ; 0x97447
call GetScriptByte
ld [$d230], a
call Function2879
ld a, $13
ld hl, $6554
rst $8
callba Function4e554
jp Script_reloadmap
; 0x97459
@ -1536,9 +1482,7 @@ Script_returnafterbattle: ; 0x97459
.asm_97470
bit 0, d
jr z, .asm_9747c ; 0x97472 $8
ld a, $3f
ld hl, $4fec
rst $8
callba Functionfcfec
jr .asm_9748e ; 0x9747a $12
.asm_9747c
ld a, [$d0ee]
@ -2061,9 +2005,7 @@ Script_writecode: ; 0x97693
Unknown_0x9769e: ; 0x9769e
ld c, a
ld a, $20
ld hl, $4648
rst $8
callba Function80648
ret
; 0x976a6
@ -2140,9 +2082,7 @@ Script_mapnametotext: ; 0x976e9
Unknown_976f4: ; 0x976f4
ld e, a
ld a, $72
ld hl, $68a5
rst $8
callba GetLandmarkName
ld de, StringBuffer1
jp Unknown_976c0
; 0x97701
@ -2168,9 +2108,7 @@ Script_trainertotext: ; 0x97706
ld c, a
call GetScriptByte
ld b, a
ld a, $e
ld hl, $594c
rst $8
callba Function3994c
jr Unknown_976c0 ; 0x97714 $aa
; 0x97716
@ -2262,7 +2200,7 @@ Script_stringtotext: ; 0x9777d
ld d, a
ld a, [ScriptBank]
ld hl, $30d6
rst $8
rst FarCall
ld de, StringBuffer2
jp Unknown_976c0
; 0x97792
@ -2286,9 +2224,7 @@ Script_givepokeitem: ; 0x97792
ld a, [ScriptBank]
call FarCopyBytes
pop bc
ld a, $11
ld hl, $46cc
rst $8
callba Function446cc
ret
; 0x977b7
@ -2303,9 +2239,7 @@ Script_checkpokeitem: ; 0x977b7
ld d, a
ld a, [ScriptBank]
ld b, a
ld a, $11
ld hl, $4654
rst $8
callba Function44654
ret
; 0x977ca
@ -2382,9 +2316,7 @@ Script_givemoney: ; 0x97829
call Unknown_0x97861
call Unknown_0x9786d
ld a, $5
ld hl, $5fd7
rst $8
callba Function15fd7
ret
; 0x97836
@ -2396,9 +2328,7 @@ Script_takemoney: ; 0x97836
call Unknown_0x97861
call Unknown_0x9786d
ld a, $5
ld hl, $5ffa
rst $8
callba Function15ffa
ret
; 0x97843
@ -2410,9 +2340,7 @@ Script_checkmoney: ; 0x97843
call Unknown_0x97861
call Unknown_0x9786d
ld a, $5
ld hl, $600b
rst $8
callba Function1600b
; 0x9784f
Unknown_9784f: ; 0x9784f
@ -2460,9 +2388,7 @@ Script_givecoins: ; 0x97881
; coins (CoinByteParam)
call Function978a0
ld a, $5
ld hl, $606f
rst $8
callba Function1606f
ret
; 0x9788b
@ -2472,9 +2398,7 @@ Script_takecoins: ; 0x9788b
; coins (CoinByteParam)
call Function978a0
ld a, $5
ld hl, $608f
rst $8
callba Function1608f
ret
; 0x97895
@ -2484,9 +2408,7 @@ Script_checkcoins: ; 0x97895
; coins (CoinByteParam)
call Function978a0
ld a, $5
ld hl, $60a1
rst $8
callba Function160a1
jr Unknown_9784f
; 978a0
@ -2506,9 +2428,7 @@ Script_checktime: ; 0x978ae
xor a
ld [$c2dd], a
ld a, $3
ld hl, $4000
rst $8
callba Functionc000
call GetScriptByte
and c
ret z
@ -2543,9 +2463,7 @@ Script_addcellnum: ; 0x978da
ld [$c2dd], a
call GetScriptByte
ld c, a
ld a, $24
ld hl, $4000
rst $8
callba Function90000
ret nc
ld a, $1
ld [$c2dd], a
@ -2561,9 +2479,7 @@ Script_delcellnum: ; 0x978ef
ld [$c2dd], a
call GetScriptByte
ld c, a
ld a, $24
ld hl, $400f
rst $8
callba Function9000f
ret nc
ld a, $1
ld [$c2dd], a
@ -2579,9 +2495,7 @@ Script_checkcellnum: ; 0x97904
ld [$c2dd], a
call GetScriptByte
ld c, a
ld a, $24
ld hl, $4019
rst $8
callba Function90019
ret nc
ld a, $1
ld [$c2dd], a
@ -2641,9 +2555,7 @@ Script_givepoke: ; 0x97932
call GetScriptByte
call GetScriptByte
.asm_9795d
ld a, $3
ld hl, $6277
rst $8
callba Functione277
ld a, b
ld [$c2dd], a
ret
@ -2662,9 +2574,7 @@ Script_giveegg: ; 0x97968
ld [$d108], a
call GetScriptByte
ld [$d143], a
ld a, $3
ld hl, $5f8c
rst $8
callba Functiondf8c
ret nc
ld a, $2
ld [$c2dd], a
@ -2768,9 +2678,7 @@ Script_checkflag: ; 0x979d7
; 0x979ee
Unknown_0x979ee: ; 0x979ee
ld a, $20
ld hl, $4430
rst $8
callba EngineFlagAction
ret
; 0x979f5
@ -2971,9 +2879,7 @@ Script_reloadmappart: ; 0x97ae3
ld [$ffd4], a
call Function2173
call Function2914
ld a, $41
ld hl, $4061
rst $8
callba Function104061
call Function1ad2
ret
; 0x97af6
@ -3202,9 +3108,7 @@ Script_halloffame: ; 0x97bd5
Script_credits: ; 0x97bf3
; script command 0xa2
ld a, $21
ld hl, $6455
rst $8
callba Function86455
; fallthrough
DisplayCredits:
@ -3236,9 +3140,7 @@ Script_wait: ; 0x97c05
Script_unknown0xa9: ; 0x97c15
; script command 0xa9
ld a, $13
ld hl, $4ffe
rst $8
callba Function4cffe
ld a, c
ld [$c2dd], a
ret

View File

@ -106,44 +106,32 @@ Functiondfd: ; dfd
Functione4a: ; e4a
ld a, $5
ld hl, $4135
rst FarCall
callba Function14135
ret
; e51
Functione51: ; e51
ld a, $3e
ld hl, $7449
rst FarCall
callba Functionfb449
ret
; e58
Functione58: ; e58
ld a, $3e
ld hl, $74be
rst FarCall
callba Functionfb4be
ret
; e5f
Functione5f: ; e5f
ld a, $3e
ld hl, $748a
rst FarCall
ld a, $3e
ld hl, $74b0
rst FarCall
callba Functionfb48a
callba Functionfb4b0
ret
; e6c
Functione6c: ; e6c
ld a, $3e
ld hl, $74b0
rst FarCall
callba Functionfb4b0
ret
; e73

View File

@ -197,7 +197,7 @@ endr
ld de, $0060
add hl, de
pop de
ld a, [$d19f]
ld a, [MapWidth]
add $6
add e
ld e, a
@ -421,7 +421,7 @@ Function2326: ; 2326
Function2336: ; 2336
push af
ld hl, $d1a6
ld hl, MapEventHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@ -438,7 +438,7 @@ Function2336: ; 2336
; 234f
Function234f: ; 234f
ld hl, $d1a4
ld hl, MapScriptHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@ -466,7 +466,7 @@ Function2368: ; 2368
ld [WestConnectedMapGroup], a
ld [EastConnectedMapGroup], a
ld a, [$d1a8]
ld a, [MapConnections]
ld b, a
bit 3, b
@ -670,10 +670,10 @@ Function2471: ; 2471
; 248a
Function248a: ; 248a
call GetMapEventBank
call GetMapScriptHeaderBank
rst Bankswitch
ld hl, $d1a6
ld hl, MapEventHeaderPointer
ld a, [hli]
ld h, [hl]
ld l, a
@ -696,9 +696,7 @@ Function248a: ; 248a
call Function24ba
.asm_24b3
ld a, $41
ld hl, $486d
rst FarCall
callba Function10486d
ret
; 24ba
@ -730,7 +728,7 @@ Function24e4: ; 24e4
ld a, [hROMBank]
push af
ld hl, OverworldMap
ld a, [$d19f]
ld a, [MapWidth]
ld [hConnectedMapWidth], a
add $6
ld [hConnectionStripLength], a
@ -741,14 +739,14 @@ Function24e4: ; 24e4
add hl, bc
ld c, $3
add hl, bc
ld a, [$d1a0]
ld a, [MapBlockDataBank]
rst Bankswitch
ld a, [$d1a1]
ld a, [MapBlockDataPointer]
ld e, a
ld a, [$d1a2]
ld a, [MapBlockDataPointer+1]
ld d, a
ld a, [$d19e]
ld a, [MapHeight]
ld b, a
.asm_250c
push hl
@ -901,7 +899,7 @@ FillSouthConnectionStrip: ; 25d3
add hl, de
pop de
ld a, [$d19f]
ld a, [MapWidth]
add 6
add e
ld e, a
@ -918,7 +916,7 @@ FillWestConnectionStrip:
FillEastConnectionStrip: ; 25f6
.asm_25f6
ld a, [$d19f]
ld a, [MapWidth]
add 6
ld [hConnectedMapWidth], a
@ -979,7 +977,7 @@ Function2631: ; 2631
ld a, [ScriptRunning]
and a
ret nz
call GetMapEventBank
call GetMapScriptHeaderBank
jr CallScript
; 263b
@ -991,7 +989,7 @@ Function263b: ; 263b
call Function2653
jr nc, .done
call GetMapEventBank
call GetMapScriptHeaderBank
ld b, a
ld d, h
ld e, l
@ -1444,7 +1442,7 @@ Function2879: ; 2879
dec b
jr nz, .asm_2888
pop hl
ld a, [$d19f]
ld a, [MapWidth]
add $6
ld c, a
ld b, $0
@ -1461,7 +1459,7 @@ Function289d: ; 289d
ld h, [hl]
ld l, a
ld de, $dcb9
ld a, [$d19f]
ld a, [MapWidth]
add $6
ld [hConnectionStripLength], a
ld a, [$d151]
@ -1508,7 +1506,7 @@ Function289d: ; 289d
ld a, [hli]
ld h, [hl]
ld l, a
ld a, [$d19f]
ld a, [MapWidth]
add $6
ld [hConnectionStripLength], a
ld de, $dcb9
@ -1778,7 +1776,7 @@ Function2a3c: ; 2a3c
; 2a66
Function2a66: ; 2a66
ld a, [$d19f]
ld a, [MapWidth]
add $6
ld c, a
ld b, $0
@ -1942,9 +1940,7 @@ FadeToMenu: ; 2b29
xor a
ld [hBGMapMode], a
call Function1d6e
ld a, $23
ld hl, $4084
rst FarCall
callba Function8c084
call ClearSprites
call Function2ed3
ret
@ -1971,13 +1967,9 @@ Function2b4d: ; 2b4d
Function2b5c: ; 2b5c
ld b, $9
call GetSGBLayout
ld a, $12
ld hl, $5409
rst FarCall
callba Function49409
call Function3200
ld a, $23
ld hl, $4079
rst FarCall
callba Function8c079
call Function2ee4
ret
; 2b74
@ -2011,9 +2003,7 @@ Function2b74: ; 0x2b74
Function2bae: ; 2bae
call DisableLCD
call ClearSprites
ld a, $5
ld hl, $4168
rst FarCall
callba Function14168
call Functione51
call Functione5f
ld a, [hROMBank]
@ -2023,9 +2013,7 @@ Function2bae: ; 2bae
ld a, [MapNumber]
ld c, a
call Function2c24
ld a, $23
ld hl, $4001
rst FarCall
callba Function8c001
call Function2173
call Function2821
ld a, $9
@ -2161,14 +2149,14 @@ Function2c3d: ; 2c3d
; 2c52
Function2c52: ; 2c52
ld a, [MapEventBank]
ld a, [MapScriptHeaderBank]
rst Bankswitch
ret
; 2c57
GetMapEventBank: ; 2c57
ld a, [MapEventBank]
GetMapScriptHeaderBank: ; 2c57
ld a, [MapScriptHeaderBank]
ret
; 2c5b
@ -2276,9 +2264,7 @@ Function2cbd: ; 2cbd
jr z, .asm_2cee
bit 7, c
jr nz, .asm_2cda
ld a, $22
ld hl, $7342
rst FarCall
callba Function8b342
ld e, c
ld d, $0
.asm_2cd7

View File

@ -337,9 +337,7 @@ Function1956: ; 1956
call Function271e
ld a, [hConnectionStripLength]
call GetMapObject
ld a, $2
ld hl, $40e7
rst FarCall
callba Function80e7
ret
; 1967

View File

@ -561,9 +561,7 @@ Function201c: ; 201c
Function202a: ; 202a
ld a, [hROMBank]
ld [$cf94], a
ld a, $9
ld hl, $400e
rst FarCall
callba Function2400e
ld a, [$cf88]
ret
; 2039
@ -571,9 +569,7 @@ Function202a: ; 202a
Function2039: ; 2039
ld a, [hROMBank]
ld [$cf94], a
ld a, $9
ld hl, $4022
rst FarCall
callba Function24022
ld a, [$cf88]
ret
; 2048
@ -581,9 +577,7 @@ Function2039: ; 2039
Function2048: ; 2048
ld a, [hROMBank]
ld [$cf94], a
ld a, $9
ld hl, $403c
rst FarCall
callba Function2403c
ld a, [$cf88]
ret
; 2057

View File

@ -2,7 +2,7 @@ ClearBox: ; fb6
; Fill a c*b box at hl with blank tiles.
ld a, " "
.y
Functionfb8:
push bc
push hl
.x
@ -14,7 +14,7 @@ ClearBox: ; fb6
add hl, bc
pop bc
dec b
jr nz, .y
jr nz, Functionfb8
ret
; fc8
@ -315,9 +315,7 @@ CheckDict: ; 1087
Function117b: ; 117b
ld c, l
ld b, h
ld a, $5f
ld hl, $7036
rst FarCall
callba Function17f036
jp PlaceNextChar
; 1186
@ -463,9 +461,7 @@ Function1205: ; 1205
ld de, String12a2
call PlaceString
push bc
ld hl, $5939
ld a, $e
rst FarCall
callab Function39939
pop hl
ld de, StringBuffer1
jr .asm_126a ; 0x1246 $22

View File

@ -192,8 +192,9 @@ Function658: ; 658
ld [StringBuffer2], a
ld a, $0
ld [$d089], a
jr .asm_677
jr Function677
Function663: ; 663
call UpdateTime
ld a, [hHours]
ld [$d087], a
@ -201,12 +202,10 @@ Function658: ; 658
ld [$d088], a
ld a, [hSeconds]
ld [$d089], a
jr .asm_677
jr Function677
.asm_677
ld a, $5
ld hl, $40ed
rst FarCall
Function677
callba Function140ed
ret
; 67e

View File

@ -4,9 +4,7 @@ GetItemDescription: ; 0x1c8955
jr c, .nomovedesc ; if not a TM, use a predefined string
ld [$d106], a
push de
ld a, $b ; XXX replace this with BANK(label)
ld hl, $47b6 ; XXX replace this with label
rst FarCall
callba Function2c7b6
pop hl
ld a, [$d265]
ld [$cf60], a

View File

@ -150,9 +150,7 @@ ParkBall: ; e8a2
ld d, a
push de
ld a, [BattleMonItem]
ld a, $d
ld hl, $7dd0
rst FarCall
callba GetItem
ld a, b
cp $46
@ -258,9 +256,7 @@ ParkBall: ; e8a2
ld [CurPartySpecies], a
ld a, [EnemyMonLevel]
ld [CurPartyLevel], a
ld a, $f
ld hl, $68eb
rst FarCall
callba LoadEnemyMon
pop af
ld [EnemySubStatus5], a
@ -296,9 +292,7 @@ ParkBall: ; e8a2
ld a, [BattleType]
cp $3
jp z, $6bd9
ld a, $41
ld hl, $607f
rst FarCall
callba Function10607f
ld hl, $6dc9
call $1057
@ -351,9 +345,7 @@ ParkBall: ; e8a2
ld a, $6
call Predef
ld a, $13
ld hl, $5b49
rst FarCall
callba Function4db49
ld a, [CurItem]
cp $a4
@ -392,9 +384,7 @@ ParkBall: ; e8a2
xor a
ld [MonType], a
ld b, $0
ld a, $4
ld hl, $56c1
rst FarCall
callba Function116c1
call $04b6
@ -412,9 +402,7 @@ ParkBall: ; e8a2
ld a, $9
call Predef
ld a, $13
ld hl, $5b83
rst FarCall
callba Function4db83
ld a, $1
call GetSRAMBank
@ -452,9 +440,7 @@ ParkBall: ; e8a2
ld [MonType], a
ld de, $d050
ld b, $0
ld a, $4
ld hl, $56c1
rst FarCall
callba Function116c1
ld a, $1
call GetSRAMBank
@ -490,9 +476,7 @@ ParkBall: ; e8a2
jr .asm_ebe2
ld a, $3
ld hl, $66ce
rst FarCall
callba Functione6ce
jr .asm_ebe2
@ -762,9 +746,7 @@ Function_0xed12: ; ed12
ld [MonType], a
ld a, [CurBattleMon]
ld [CurPartyMon], a
ld a, $14
ld hl, $4bdd
rst FarCall
callba GetGender
jr c, .asm_ed66
ld d, 0
@ -777,9 +759,7 @@ Function_0xed12: ; ed12
ld [CurPartySpecies], a
ld a, WILDMON
ld [MonType], a
ld a, $14
ld hl, $4bdd
rst FarCall
callba GetGender
jr c, .asm_ed65
ld d, 0
@ -871,21 +851,21 @@ Function_0xed8c: ; ed8c
; edab
INCBIN "baserom.gbc", $edab, $ee01 - $edab
INCBIN "baserom.gbc", $edab, $edfa - $edab
; known jump sources: e8c9 (3:68c9), f7a0 (3:77a0)
Functionedfa: ; edfa (3:6dfa)
callba Function2715c
ret
Item06: ; ee01
ld a, $24
ld hl, $5ae1
rst FarCall
callba Function91ae1
ret
; ee08
Bicycle: ; ee08
ld a, $3
ld hl, $50b3
rst FarCall
callba Functiond0b3
ret
; ee0f
@ -909,9 +889,7 @@ SunStone: ; ee0f
jr z, .asm_ee35
ld a, $1
ld [$d1e9], a
ld a, $10
ld hl, $61d8
rst FarCall
callba Function421d8
ld a, [$d268]
and a
@ -969,9 +947,7 @@ Calcium: ; ee3d
call $1057
ld c, $2
ld a, $1
ld hl, $71c2
rst FarCall
callba ChangeHappiness
jp $7795
@ -1005,9 +981,7 @@ RareCandy: ; ef14
ld [CurPartyLevel], a
push de
ld d, a
ld a, $14
ld hl, $4e47
rst FarCall
callba Function50e47
pop de
ld a, $8
@ -1045,9 +1019,7 @@ RareCandy: ; ef14
ld a, [hl]
adc b
ld [hl], a
ld a, $9
ld hl, $709e
rst FarCall
callba Function2709e
ld a, $f8
call $724a
@ -1078,9 +1050,7 @@ RareCandy: ; ef14
xor a
ld [$d1e9], a
ld a, $10
ld hl, $61d8
rst FarCall
callba Function421d8
jp $7795
; efad
@ -1097,9 +1067,7 @@ HealPowder: ; efad
cp $0
jr nz, .asm_efc9
ld c, $f
ld a, $1
ld hl, $71c2
rst FarCall
callba ChangeHappiness
call $77d6
@ -1133,7 +1101,118 @@ Miracleberry: ; efcc
; efda
INCBIN "baserom.gbc", $efda, $f0a9 - $efda
; known jump sources: efb5 (3:6fb5), efd4 (3:6fd4)
Functionefda: ; efda (3:6fda)
call Functionf30d
ld a, $1
ret z
call Functionf058
ld a, $20
call GetPartyParamLocation
ld a, [hl]
and c
jr nz, .asm_eff4
call Functionf009
ld a, $1
ret nc
ld b, $f9
.asm_eff4
xor a
ld [hl], a
ld a, b
ld [PartyMenuActionText], a ; $d141
call Functionf030
call Functionf780
call Functionf279
call Functionf795
ld a, $0
ret
; known jump sources: efec (3:6fec)
Functionf009: ; f009 (3:7009)
call Functionf2a6
jr nc, .asm_f01c
ld a, [PlayerSubStatus3] ; $c66a
bit 7, a
jr z, .asm_f01c
ld a, c
cp $ff
jr nz, .asm_f01c
scf
ret
.asm_f01c
and a
ret
; known jump sources: f156 (3:7156), f1c7 (3:71c7)
Functionf01e: ; f01e (3:701e)
call Functionf2a6
ret nc
ld a, $22
call GetPartyParamLocation
ld a, [hli]
ld [BattleMonHP], a ; $c63c
ld a, [hld]
ld [$c63d], a
ret
; known jump sources: effa (3:6ffa), f153 (3:7153)
Functionf030: ; f030 (3:7030)
call Functionf2a6
ret nc
xor a
ld [BattleMonStatus], a ; $c63a
ld hl, PlayerSubStatus5 ; $c66c
res 0, [hl]
ld hl, PlayerSubStatus1 ; $c668
res 0, [hl]
call Functionf058
ld a, c
cp $ff
jr nz, .asm_f04f
ld hl, PlayerSubStatus3 ; $c66a
res 7, [hl]
.asm_f04f
push bc
callba Function0x365d7
pop bc
ret
; known jump sources: efe0 (3:6fe0), f042 (3:7042)
Functionf058: ; f058 (3:7058)
push hl
ld a, [CurItem] ; $d106
ld hl, $7071
ld bc, $3
.asm_f062
cp [hl]
jr z, .asm_f068
add hl, bc
jr .asm_f062
.asm_f068
inc hl
ld b, [hl]
inc hl
ld a, [hl]
ld c, a
cp $ff
pop hl
ret
; f071 (3:7071)
INCBIN "baserom.gbc",$f071,$f09e - $f071
; known jump sources: efc9 (3:6fc9), efd7 (3:6fd7), f0c5 (3:70c5), f0d3 (3:70d3), f141 (3:7141), f183 (3:7183), f189 (3:7189), f1a6 (3:71a6)
Functionf09e: ; f09e (3:709e)
ld hl, $70a3
rst $28
ret
; no known jump sources
Jumptable_f0a3: ; f0a3 (3:70a3)
dw Functionf2a2
dw Functionf299
dw Functionf29e
RevivalHerb: ; f0a9
@ -1147,9 +1226,7 @@ RevivalHerb: ; f0a9
cp $0
jr nz, .asm_f0c5
ld c, $11
ld a, $1
ld hl, $71c2
rst FarCall
callba ChangeHappiness
call $77d6
@ -1254,9 +1331,7 @@ Function_0xf192: ; f192
pop bc
cp $0
jr nz, .asm_f1a6
ld a, $1
ld hl, $71c2
rst FarCall
callba ChangeHappiness
call $77d6
@ -1267,15 +1342,414 @@ Function_0xf192: ; f192
; f1a9
INCBIN "baserom.gbc", $f1a9, $f44f - $f1a9
; known jump sources: f186 (3:7186), f193 (3:7193)
Functionf1a9: ; f1a9 (3:71a9)
ld b, $1
call Functionf1f9
ld a, $2
ret c
call Functionf30d
ld a, $1
ret z
call Functionf31b
ld a, $1
ret nc
xor a
ld [Danger], a ; $c2a6
call Functionf395
call Functionf2d1
call Functionf01e
call Functionf1db
ld a, $f5
ld [PartyMenuActionText], a ; $d141
call Functionf279
call Functionf795
ld a, $0
ret
; known jump sources: f117 (3:7117), f159 (3:7159), f1ca (3:71ca), f3f7 (3:73f7), f408 (3:7408)
Functionf1db: ; f1db (3:71db)
push de
ld de, $4
call WaitPlaySFX
pop de
ld a, [CurPartyMon] ; $d109
ld hl, $c4ab
ld bc, $28
call AddNTimes
ld a, $2
ld [$d10a], a
ld a, $b
jp Predef
; known jump sources: ee11 (3:6e11), ee3f (3:6e3f), ef16 (3:6f16), efaf (3:6faf), efce (3:6fce), f0ab (3:70ab), f0ca (3:70ca), f12a (3:712a), f1ab (3:71ab), f5c7 (3:75c7)
Functionf1f9: ; f1f9 (3:71f9)
call Functionf20b
ret c
ld a, [CurPartySpecies] ; $d108
cp $fd
jr nz, .asm_f209
call Functionf7e8
scf
ret
.asm_f209
and a
ret
; known jump sources: f1f9 (3:71f9)
Functionf20b: ; f20b (3:720b)
ld a, b
ld [PartyMenuActionText], a ; $d141
push hl
push de
push bc
call WhiteBGMap
call Functionf21c
pop bc
pop de
pop hl
ret
; known jump sources: f215 (3:7215), f41f (3:741f)
Functionf21c: ; f21c (3:721c)
callba Function5004f
callba Function50405
callba Function503e0
callba WritePartyMenuTilemap
callba PrintPartyMenuText
call WaitBGMap
call Function32f9
call DelayFrame
callba PartyMenuSelect
ret
; known jump sources: ef6d (3:6f6d), f28a (3:728a), f40d (3:740d)
Functionf24a: ; f24a (3:724a)
ld [PartyMenuActionText], a ; $d141
ld a, [CurPartySpecies] ; $d108
push af
ld a, [CurPartyMon] ; $d109
push af
push hl
push de
push bc
callba WritePartyMenuTilemap
callba Function50566
call WaitBGMap
call Function32f9
call DelayFrame
pop bc
pop de
pop hl
pop af
ld [CurPartyMon], a ; $d109
pop af
ld [CurPartySpecies], a ; $d108
ret
; known jump sources: f000 (3:7000), f11f (3:711f), f161 (3:7161), f1d2 (3:71d2)
Functionf279: ; f279 (3:7279)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld hl, TileMap ; $c4a0 (aliases: SpritesEnd)
ld bc, $168
ld a, $7f
call ByteFill
ld a, [PartyMenuActionText] ; $d141
call Functionf24a
ld a, $1
ld [hBGMapMode], a ; $ff00+$d4
ld c, $32
call DelayFrames
jp Functiona80
; known jump sources: f133 (3:7133)
Functionf299: ; f299 (3:7299)
call Functionf7f2
jr Functionf2a2
; known jump sources: efb2 (3:6fb2), efd1 (3:6fd1), f0ae (3:70ae), f0cd (3:70cd), f12d (3:712d)
Functionf29e: ; f29e (3:729e)
xor a
ld [$d0ec], a
; known jump sources: f29c (3:729c)
Functionf2a2: ; f2a2 (3:72a2)
call ClearPalettes
ret
; known jump sources: f009 (3:7009), f01e (3:701e), f030 (3:7030)
Functionf2a6: ; f2a6 (3:72a6)
ld a, [IsInBattle] ; $d22d (aliases: EnemyMonEnd)
and a
ret z
ld a, [CurPartyMon] ; $d109
push hl
ld hl, CurBattleMon ; $d0d4
cp [hl]
pop hl
jr nz, .asm_f2b8
scf
ret
.asm_f2b8
xor a
ret
; known jump sources: f114 (3:7114)
Functionf2ba: ; f2ba (3:72ba)
call Functionf36f
srl d
rr e
jr asm_f2c6
; known jump sources: f10f (3:710f), f148 (3:7148), f2f5 (3:72f5)
Functionf2c3: ; f2c3 (3:72c3)
call Functionf36f
asm_f2c6: ; f2c6 (3:72c6)
ld a, $22
call GetPartyParamLocation
ld [hl], d
inc hl
ld [hl], e
jp Functionf328
; known jump sources: f1c4 (3:71c4), f405 (3:7405)
Functionf2d1: ; f2d1 (3:72d1)
ld a, $23
call GetPartyParamLocation
ld a, [hl]
add e
ld [hld], a
ld a, [hl]
adc d
ld [hl], a
jr c, .asm_f2f5
call Functionf328
ld a, $23
call GetPartyParamLocation
ld d, h
ld e, l
ld a, $25
call GetPartyParamLocation
ld a, [de]
sub [hl]
dec de
dec hl
ld a, [de]
sbc [hl]
jr c, .asm_f2f8
.asm_f2f5
call Functionf2c3
.asm_f2f8
ret
; known jump sources: f3f3 (3:73f3)
Functionf2f9: ; f2f9 (3:72f9)
ld a, $23
call GetPartyParamLocation
ld a, [hl]
sub e
ld [hld], a
ld a, [hl]
sbc d
ld [hl], a
jr nc, .asm_f309
xor a
ld [hld], a
ld [hl], a
.asm_f309
call Functionf328
ret
; known jump sources: efda (3:6fda), f0d6 (3:70d6), f130 (3:7130), f1b1 (3:71b1), f3ed (3:73ed), f402 (3:7402), f432 (3:7432)
Functionf30d: ; f30d (3:730d)
push de
call Functionf35f
call Functionf348
call Functionf356
ld a, d
or e
pop de
ret
; known jump sources: f136 (3:7136), f1b7 (3:71b7), f437 (3:7437)
Functionf31b: ; f31b (3:731b)
call Functionf356
ld h, d
ld l, e
call Functionf36f
ld a, l
sub e
ld a, h
sbc d
ret
; known jump sources: f2ce (3:72ce), f2de (3:72de), f309 (3:7309)
Functionf328: ; f328 (3:7328)
ld a, $22
call GetPartyParamLocation
ld a, [hli]
ld [$d1ef], a
ld a, [hl]
ld [$d1ee], a
ret
; f336 (3:7336)
INCBIN "baserom.gbc",$f336,$f348 - $f336
; known jump sources: f311 (3:7311)
Functionf348: ; f348 (3:7348)
ld a, $22
call GetPartyParamLocation
ld a, [hli]
ld [$d1ed], a
ld a, [hl]
ld [$d1ec], a
ret
; known jump sources: f314 (3:7314), f31b (3:731b)
Functionf356: ; f356 (3:7356)
ld a, [$d1ed]
ld d, a
ld a, [$d1ec]
ld e, a
ret
; known jump sources: f30e (3:730e)
Functionf35f: ; f35f (3:735f)
push hl
ld a, $24
call GetPartyParamLocation
ld a, [hli]
ld [Buffer2], a ; $d1eb (aliases: MovementType)
ld a, [hl]
ld [Buffer1], a ; $d1ea (aliases: MagikarpLength)
pop hl
ret
; known jump sources: f2ba (3:72ba), f2c3 (3:72c3), f320 (3:7320)
Functionf36f: ; f36f (3:736f)
ld a, [Buffer2] ; $d1eb (aliases: MovementType)
ld d, a
ld a, [Buffer1] ; $d1ea (aliases: MagikarpLength)
ld e, a
ret
; known jump sources: f3f0 (3:73f0), f3fb (3:73fb)
Functionf378: ; f378 (3:7378)
push bc
ld a, $24
call GetPartyParamLocation
ld a, [hli]
ld [hPastLeadingZeroes], a ; $ff00+$b3 (aliases: hDividend, hProduct)
ld a, [hl]
ld [hQuotient], a ; $ff00+$b4 (aliases: hMultiplicand)
ld a, $5
ld [hDivisor], a ; $ff00+$b7 (aliases: hMultiplier)
ld b, $2
call Divide
ld a, [$FF00+$b5]
ld d, a
ld a, [$FF00+$b6]
ld e, a
pop bc
ret
; known jump sources: f1c1 (3:71c1)
Functionf395: ; f395 (3:7395)
push hl
ld a, [CurItem] ; $d106
ld hl, $73af
ld d, a
.asm_f39d
ld a, [hli]
cp $ff
jr z, .asm_f3a9
cp d
jr z, .asm_f3aa
inc hl
inc hl
jr .asm_f39d
.asm_f3a9
scf
.asm_f3aa
ld e, [hl]
inc hl
ld d, [hl]
pop hl
ret
; f3af (3:73af)
INCBIN "baserom.gbc",$f3af,$f3df - $f3af
Functionf3df: ; f3df (3:73df)
ld a, [$d0d8]
dec a
ld b, a
call Functionf419
jr c, .asm_f413
ld a, b
ld [CurPartyMon], a ; $d109
call Functionf30d
call Functionf378
call Functionf2f9
push bc
call Functionf1db
pop bc
call Functionf378
ld a, c
ld [CurPartyMon], a ; $d109
call Functionf30d
call Functionf2d1
call Functionf1db
ld a, $f5
call Functionf24a
call Functiona36
.asm_f413
ld a, b
inc a
ld [$d0d8], a
ret
; known jump sources: f3e4 (3:73e4), f448 (3:7448)
Functionf419: ; f419 (3:7419)
push bc
ld a, $1
ld [PartyMenuActionText], a ; $d141
call Functionf21c
pop bc
jr c, .asm_f43e
ld a, [$d0d8]
dec a
ld c, a
ld a, b
cp c
jr z, .asm_f440
ld a, c
ld [CurPartyMon], a ; $d109
call Functionf30d
jr z, .asm_f440
call Functionf31b
jr nc, .asm_f440
xor a
ret
.asm_f43e
scf
ret
.asm_f440
push bc
ld hl, $744a
call Function1d67
pop bc
jr Functionf419
; f44a (3:744a)
INCBIN "baserom.gbc",$f44a,$f44f - $f44a
EscapeRope: ; f44f
xor a
ld [$d0ec], a
ld a, $3
ld hl, $4b95
rst FarCall
callba Functioncb95
ld a, [$d0ec]
cp $1
@ -1381,26 +1855,18 @@ XSpecial: ; f4c5
ld [hBattleTurn], a
ld [AttackMissed], a
ld [$c70d], a
ld a, $d
ld hl, $61ef
rst FarCall
callba Function0x361ef
call WaitSFX
ld a, $d
ld hl, $63b8
rst FarCall
callba BattleCommand8c
ld a, $d
ld hl, $644c
rst FarCall
callba BattleCommand8e
ld a, [CurBattleMon]
ld [CurPartyMon], a
ld c, $3
ld a, $1
ld hl, $71c2
rst FarCall
callba ChangeHappiness
ret
; f504
@ -1542,17 +2008,13 @@ SuperRod: ; f5ad
; f5b1
Function_0xf5b1: ; f5b1
ld a, $3
ld hl, $4f8e
rst FarCall
callba Functioncf8e
ret
; f5b8
Itemfinder: ; f5b8
ld a, $4
ld hl, $6580
rst FarCall
callba Function12580
ret
; f5bf
@ -1593,9 +2055,7 @@ Mysteryberry: ; f5bf
ld [CurMoveNum], a
ld a, $2
ld [$d235], a
ld a, $f
ld hl, $64bc
rst FarCall
callba Function3e4bc
pop bc
ld a, b
@ -1691,9 +2151,7 @@ GorgeousBox: ; f767
; f769
Function_0xf769: ; f769
ld a, $9
ld hl, $6f02
rst FarCall
callba Function26f02
ld hl, UnknownText_0xf778
call $1057

File diff suppressed because it is too large Load Diff

45660
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -158,9 +158,9 @@ Function8e23: ; 8e23
Function8e85: ; 8e85
ld a, $40
ld hl, $4dc0
rst FarCall
callba Function100dc0
Function8e8b: ; 8e8b
ld hl, $7311
jr nc, .asm_8e93
ld hl, $7309

View File

@ -1099,15 +1099,29 @@ SECTION "UsedSprites",WRAMX[$d154],BANK[1]
UsedSprites: ; d154
ds 32
SECTION "map",WRAMX[$d1a3],BANK[1]
SECTION "map",WRAMX[$d19d],BANK[1]
MapEventBank: ; d1a3
; both are in blocks (2x2 walkable tiles, 4x4 graphics tiles)
MapHeader: ; d19d
MapBorderBlock: ; d19d
ds 1
MapHeight: ; d19e
ds 1
MapWidth: ; d19f
ds 1
MapBlockDataBank: ; d1a0
ds 1
MapBlockDataPointer: ; d1a1
ds 2
MapScriptHeaderBank: ; d1a3
ds 1
MapScriptHeaderPointer: ; d1a4
ds 2
MapEventHeaderPointer: ; d1a6
ds 2
; bit set
MapConnections: ; d1a8
ds 1
ds 5
MapConnections:
NorthMapConnection: ; d1a9
NorthConnectedMapGroup: ; d1a9
ds 1