So very jumb

This commit is contained in:
PikalaxALT 2015-10-19 16:49:29 -04:00
parent 0a244e043c
commit 6c25592b8c
19 changed files with 885 additions and 847 deletions

View File

@ -237,16 +237,16 @@ Functioncc220: ; cc220
; Appears to be unused.
xor a
ld [hBGMapMode], a
ld a, $80
ld a, (VBGMap0 tile $28) % $100
ld [hBGMapAddress], a
ld a, $9a
ld a, (VBGMap0 tile $28) / $100
ld [hBGMapAddress + 1], a
call Function3200
ld a, $60
ld [hWY], a
xor a
ld [hBGMapAddress], a
ld a, $98
ld a, VBGMap0 / $100
ld [hBGMapAddress + 1], a
call BattleAnimDelayFrame
ret

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,7 @@
; trainer groups
enum_start 1
enum_start
trainerclass PHONE ; 0
trainerclass FALKNER ; 1
trainerclass WHITNEY ; 2

View File

@ -13,7 +13,7 @@ Predef_StartBattle: ; 8c20f
ld [hl], $1
.loop
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
jr nz, .done
call FlashyTransitionToBattle
@ -72,7 +72,7 @@ Function8c26d: ; 8c26d
call DelayFrame
xor a
ld [hBGMapMode], a
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
xor a
rept 2
ld [hli], a
@ -146,7 +146,7 @@ INCBIN "gfx/overworld/trainer_battle_pokeball_tiles.2bpp"
FlashyTransitionToBattle: ; 8c314
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld e, a
ld d, 0
ld hl, .jumptable
@ -230,7 +230,7 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
ld hl, .StartingPoints
add hl, de
ld a, [hl]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 8c38f (23:438f)
@ -242,11 +242,11 @@ StartTrainerBattle_DetermineWhichAnimation: ; 8c365 (23:4365)
StartTrainerBattle_Finish: ; 8c393 (23:4393)
call ClearSprites
ld a, $80
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
StartTrainerBattle_NextScene: ; 8c39c (23:439c)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
inc [hl]
ret
@ -331,7 +331,7 @@ StartTrainerBattle_SineWave: ; 8c408 (23:4408)
.end
ld a, $20
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
.DoSineWave: ; 8c419 (23:4419)
@ -416,7 +416,7 @@ endr
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld a, $20
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 8c490 (23:4490)
@ -540,7 +540,7 @@ StartTrainerBattle_SpeckleToBlack: ; 8c58f (23:458f)
xor a
ld [hBGMapMode], a ; $ff00+$d4
ld a, $20
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
.BlackOutRandomTile: ; 8c5b8 (23:45b8)
@ -836,7 +836,7 @@ StartTrainerBattle_ZoomToBlack: ; 8c768 (23:4768)
.done
ld a, $20
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 8c792 (23:4792)

View File

@ -124,7 +124,7 @@ Function109847:: ; 109847
jr z, .asm_10984f
ld a, $40
.asm_10984f
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld a, [rSVBK]
push af
@ -225,7 +225,7 @@ Function1098fd: ; 1098fd
ld a, [hJoypadDown]
and $1
ret z
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
ret
; 109908
@ -234,7 +234,7 @@ Function109908: ; 109908
ld a, [hJoypadDown]
and $2
ret z
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 6, a
ret z
ld hl, CreditsPos
@ -255,7 +255,7 @@ Function109908: ; 109908
; 109926
Function109926: ; 109926
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
and $f
ld e, a
ld d, 0
@ -287,12 +287,12 @@ Jumptable_109937: ; 109937 (42:5937)
Function109951: ; 109951 (42:5951)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
inc [hl]
ret
Function109956: ; 109956 (42:5956)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
ld a, [hl]
and $f0
ld [hl], a
@ -348,7 +348,7 @@ Function1099a3: ; 1099a3 (42:59a3)
ParseCredits: ; 1099aa
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
bit 7, [hl]
jp nz, .done
@ -488,7 +488,7 @@ endr
.end
; Stop execution.
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
set 7, [hl]
ld a, $20
ld [MusicFade], a

View File

@ -5,7 +5,7 @@ Pack: ; 10000
call Function1068a
.loop
call JoyTextDelay
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
jr nz, .done
call Function10026
@ -21,7 +21,7 @@ Pack: ; 10000
; 10026
Function10026: ; 10026
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld hl, Jumptable_10030
call Function1086b
jp [hl]
@ -47,7 +47,7 @@ Function10046: ; 10046 (4:4046)
ld [hBGMapMode], a ; $ff00+$d4
call Function10955
ld a, [wcf64]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
call Function10a40
ret
@ -486,7 +486,7 @@ Function10355: ; 10355 (4:4355)
and a
jr z, Function1032d
ld a, $a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 10364 (4:4364)
@ -605,7 +605,7 @@ Function103fd: ; 103fd
call PrintText
jr .asm_10427
.asm_10453
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
push af
ld a, [wcf64]
push af
@ -618,7 +618,7 @@ Function103fd: ; 103fd
pop af
ld [wcf64], a
pop af
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
.asm_10475
pop af
ld [Options], a
@ -652,7 +652,7 @@ BattlePack: ; 10493
call Function1068a
.asm_1049b
call JoyTextDelay
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
jr nz, .asm_104ad
call Function104b9
@ -668,7 +668,7 @@ BattlePack: ; 10493
; 104b9
Function104b9: ; 104b9
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld hl, Jumptable_104c3
call Function1086b
jp [hl]
@ -694,7 +694,7 @@ Function104d9: ; 104d9 (4:44d9)
ld [hBGMapMode], a ; $ff00+$d4
call Function10955
ld a, [wcf64]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
call Function10a40
ret
@ -922,7 +922,7 @@ Function10671: ; 10671 (4:4671)
jr z, asm_10684
asm_1067e: ; 1067e (4:467e)
ld a, $a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
asm_10684: ; 10684 (4:4684)
xor a
@ -937,7 +937,7 @@ Function10689: ; 10689
Function1068a: ; 1068a
xor a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld a, [wd0d6]
and $3
ld [wcf65], a
@ -955,7 +955,7 @@ Function1068a: ; 1068a
Function106a5: ; 106a5
xor a
ld [hBGMapMode], a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@ -974,7 +974,7 @@ Function106be: ; 106be
; 106c7
Function106c7: ; 106c7
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld hl, Jumptable_106d1
call Function1086b
jp [hl]
@ -1083,10 +1083,10 @@ Function1076f: ; 1076f
ret
.asm_10795
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
dec a
and $3
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
push de
ld de, SFX_UNKNOWN_62
call PlaySFX
@ -1095,10 +1095,10 @@ Function1076f: ; 1076f
ret
.asm_107a8
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
inc a
and $3
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
push de
ld de, SFX_UNKNOWN_62
call PlaySFX
@ -1124,7 +1124,7 @@ Function107bb: ; 107bb
; 107d7
Function107d7: ; 107d7
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld hl, Jumptable_107e1
call Function1086b
jp [hl]
@ -1228,7 +1228,7 @@ Function1085a: ; 1085a (4:485a)
ret
Function10866: ; 10866 (4:4866)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
inc [hl]
ret
@ -1245,14 +1245,14 @@ endr
; 10874
Function10874: ; 10874 (4:4874)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
set 7, [hl]
xor a
ld [wcf66], a
ret
Function1087e: ; 1087e (4:487e)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
set 7, [hl]
ld a, $1
ld [wcf66], a
@ -1336,12 +1336,12 @@ Function108d4: ; 108d4 (4:48d4)
ret
.asm_108fa
ld a, $9
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
scf
ret
.asm_10901
ld a, b
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld [wcf64], a
push de
ld de, SFX_UNKNOWN_62
@ -1351,7 +1351,7 @@ Function108d4: ; 108d4 (4:48d4)
ret
.asm_10912
ld a, c
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld [wcf64], a
push de
ld de, SFX_UNKNOWN_62

View File

@ -28,7 +28,7 @@ Pokedex: ; 40000
.main
call JoyTextDelay
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
jr nz, .exit
call Function4010b
@ -75,7 +75,7 @@ ENDC
call ByteFill
xor a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a
@ -173,7 +173,7 @@ Function400ed: ; 400ed
; 4010b
Function4010b: ; 4010b
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld hl, Jumptable_40115
call Function41432
jp [hl]
@ -198,12 +198,12 @@ Jumptable_40115: ; 40115 (10:4115)
Function40131: ; 40131 (10:4131)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
inc [hl]
ret
Function40136: ; 40136 (10:4136)
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
set 7, [hl]
ret
@ -283,7 +283,7 @@ Function401ae: ; 401ae (10:41ae)
call Function40bd0
ret z
ld a, $2
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld a, $0
ld [wcf64], a
ret
@ -291,7 +291,7 @@ Function401ae: ; 401ae (10:41ae)
.select
call Function41401
ld a, $7
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
xor a
ld [hSCX], a ; $ff00+$cf
ld a, $a7
@ -302,7 +302,7 @@ Function401ae: ; 401ae (10:41ae)
.start
call Function41401
ld a, $5
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
xor a
ld [hSCX], a ; $ff00+$cf
ld a, $a7
@ -312,7 +312,7 @@ Function401ae: ; 401ae (10:41ae)
.b
ld a, $d
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
Function40217: ; 40217 (10:4217)
@ -372,7 +372,7 @@ Function40258: ; 40258 (10:4258)
.asm_40288
call MaxVolume
ld a, [wcf64]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 40292 (10:4292)
@ -408,7 +408,7 @@ Function402aa: ; 402aa (10:42aa)
call Function41423
ld a, [CurPartySpecies]
call PlayCry
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
dec [hl]
ret
; 402e8 (10:42e8)
@ -478,11 +478,11 @@ Function4034f: ; 4034f
push af
ld a, [wcf64]
push af
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
push af
callba Function8442c
pop af
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
pop af
ld [wcf64], a
pop af
@ -552,7 +552,7 @@ Function403be: ; 403be (10:43be)
.asm_403ea
call Function41401
ld a, $0
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 403f3 (10:43f3)
@ -604,13 +604,13 @@ Function40417: ; 40417 (10:4417)
.asm_40431
call Function41401
ld a, $0
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
Function4043a: ; 4043a (10:443a)
call Function41401
ld a, $b
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
Function40443: ; 40443 (10:4443)
@ -656,7 +656,7 @@ Function40471: ; 40471 (10:4471)
.asm_40495
call Function41401
ld a, $0
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 4049e (10:449e)
@ -710,14 +710,14 @@ Function404b7: ; 404b7
ld [wc7d1], a
call Function41401
ld a, $9
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 40501
Function40501: ; 40501
call Function41401
ld a, $0
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 4050a
@ -779,7 +779,7 @@ Function40562: ; 40562 (10:4562)
call Function40bd0
ret z
ld a, $2
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld a, $9
ld [wcf64], a
ret
@ -795,7 +795,7 @@ Function40562: ; 40562 (10:4562)
call ClearSprites
call Function40bdc
ld a, $5
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
xor a
ld [hSCX], a ; $ff00+$cf
ld a, $a7
@ -827,7 +827,7 @@ Function405df: ; 405df (10:45df)
.asm_405eb
call Function41401
ld a, $7
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
call DelayFrame
call Function41a24
jr nz, .asm_40603

View File

@ -1558,23 +1558,25 @@ Script_returnafterbattle: ; 0x97459
ld a, [wd0ee]
and $3f
cp $1
jr nz, .asm_97470 ; 0x97466 $8
jr nz, .notblackedout ; 0x97466 $8
ld b, BANK(UnknownScript_0x124c1)
ld hl, UnknownScript_0x124c1
jp ScriptJump
.asm_97470
.notblackedout
bit 0, d
jr z, .asm_9747c ; 0x97472 $8
callba Functionfcfec
jr .asm_9748e ; 0x9747a $12
callba MomTriesToBuySomething
jr .done ; 0x9747a $12
.asm_9747c
ld a, [wd0ee]
bit 7, a
jr z, .asm_9748e ; 0x97481 $b
ld b, BANK(UnknownScript_0x90255)
ld de, UnknownScript_0x90255
jr z, .done ; 0x97481 $b
ld b, BANK(Script_SpecialBillCall)
ld de, Script_SpecialBillCall
callba Function97c4f
.asm_9748e
.done
jp Script_reloadmap
; 0x97491

View File

@ -9,7 +9,7 @@ _TitleScreen: ; 10ed67
ld [hBGMapMode], a
; Reset timing variables
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
ld [hli], a ; cf63 ; Scene?
ld [hli], a ; cf64
ld [hli], a ; cf65 ; Timer lo
@ -130,10 +130,10 @@ _TitleScreen: ; 10ed67
; Initialize running Suicune?
ld d, $0
call Function10eed2
call LoadSuicuneFrame
; Initialize background crystal
call Function10ef06
call InitializeBackground
; Save WRAM bank
ld a, [rSVBK]
@ -145,12 +145,12 @@ _TitleScreen: ; 10ed67
; Update palette colors
ld hl, TitleScreenPalettes
ld de, Unkn1Pals
ld bc, $0080
ld bc, 4 * 32
call CopyBytes
ld hl, TitleScreenPalettes
ld de, BGPals
ld bc, $0080
ld bc, 4 * 32
call CopyBytes
; Restore WRAM bank
@ -220,7 +220,7 @@ _TitleScreen: ; 10ed67
ld [hBGMapMode], a
xor a
ld [DefaultFlypoint], a
ld [UnknPals1 + 2], a
; Play starting sound effect
call SFXChannelsOff
@ -230,25 +230,28 @@ _TitleScreen: ; 10ed67
ret
; 10eea7
Function10eea7: ; 10eea7
ld hl, DefaultFlypoint
SuicuneFrameIterator: ; 10eea7
ld hl, UnknPals1 + 2
ld a, [hl]
ld c, a
inc [hl]
and $7
; Only do this once every eight frames
and (1 << 3) - 1
ret nz
ld a, c
and $18
and 3 << 3
sla a
swap a
ld e, a
ld d, $0
ld hl, Unknown_10eece
ld hl, .Frames
add hl, de
ld d, [hl]
xor a
ld [hBGMapMode], a
call Function10eed2
call LoadSuicuneFrame
ld a, $1
ld [hBGMapMode], a
ld a, $3
@ -256,33 +259,36 @@ Function10eea7: ; 10eea7
ret
; 10eece
Unknown_10eece: ; 10eece
db $80, $88, $00, $08
.Frames: ; 10eece
db $80 ; VTiles4 tile $00
db $88 ; VTiles4 tile $08
db $00 ; VTiles5 tile $00
db $08 ; VTiles5 tile $08
; 10eed2
Function10eed2: ; 10eed2
LoadSuicuneFrame: ; 10eed2
hlcoord 6, 12
ld b, $6
.asm_10eed7
ld c, $8
.asm_10eed9
ld b, 6
.row
ld c, 8
.col
ld a, d
ld [hli], a
inc d
dec c
jr nz, .asm_10eed9
ld a, $c
jr nz, .col
ld a, SCREEN_WIDTH - 8
add l
ld l, a
ld a, $0
ld a, 0
adc h
ld h, a
ld a, $8
ld a, 8
add d
ld d, a
dec b
jr nz, .asm_10eed7
jr nz, .row
ret
; 10eeef
@ -293,18 +299,18 @@ DrawTitleGraphic: ; 10eeef
; c: width
; d: tile to start drawing from
; e: number of tiles to advance for each row
.asm_10eeef
.row
push de
push bc
push hl
.asm_10eef2
.col
ld a, d
ld [hli], a
inc d
dec c
jr nz, .asm_10eef2
jr nz, .col
pop hl
ld bc, $0014
ld bc, SCREEN_WIDTH
add hl, bc
pop bc
pop de
@ -312,31 +318,31 @@ DrawTitleGraphic: ; 10eeef
add d
ld d, a
dec b
jr nz, .asm_10eeef
jr nz, .row
ret
; 10ef06
Function10ef06: ; 10ef06
InitializeBackground: ; 10ef06
ld hl, Sprites
ld d, $de
ld d, -$22
ld e, $0
ld c, $5
.asm_10ef0f
ld c, 5
.loop
push bc
call Function10ef1c
call .InitColumn
pop bc
ld a, $10
add d
ld d, a
dec c
jr nz, .asm_10ef0f
jr nz, .loop
ret
; 10ef1c
Function10ef1c: ; 10ef1c
.InitColumn: ; 10ef1c
ld c, $6
ld b, $40
.asm_10ef20
.loop
ld a, d
ld [hli], a
ld a, b
@ -351,7 +357,7 @@ endr
ld a, $80
ld [hli], a
dec c
jr nz, .asm_10ef20
jr nz, .loop
ret
; 10ef32
@ -363,7 +369,7 @@ AnimateTitleCrystal: ; 10ef32
; y is really from the bottom of the sprite, which is two tiles high
ld hl, Sprites
ld a, [hl]
cp 6 + 16
cp 6 + $10
ret z
; Move all 30 parts of the crystal down by 2

View File

@ -4,9 +4,9 @@ Special_BankOfMom: ; 16218
ld a, $1
ld [hInMenu], a
xor a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
.asm_16223
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
jr nz, .asm_1622f
call Function16233
@ -19,10 +19,10 @@ Special_BankOfMom: ; 16218
; 16233
Function16233: ; 16233
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld e, a
ld d, 0
ld hl, Jumptable_16242
ld hl, .jumptable
rept 2
add hl, de
endr
@ -32,75 +32,75 @@ endr
jp [hl]
; 16242
Jumptable_16242: ; 16242
dw Function16254
dw Function1626a
dw Function16290
dw Function162a8
dw Function162e0
dw Function16373
dw Function16406
dw Function1642d
dw Function16433
.jumptable: ; 16242
dw .CheckIfBankInitialized
dw .InitializeBank
dw .IsThisAboutYourMoney
dw .AccessBankOfMom
dw .StoreMoney
dw .TakeMoney
dw .StopOrStartSavingMoney
dw .AskDST
dw .JustDoWhatYouCan
; 16254
Function16254: ; 16254
ld a, [wd854]
.CheckIfBankInitialized: ; 16254
ld a, [wBankOfMomMode]
bit 7, a
jr nz, .asm_16264
jr nz, .savingmoneyalready
set 7, a
ld [wd854], a
ld [wBankOfMomMode], a
ld a, $1
jr .asm_16266
jr .done_0
.asm_16264
.savingmoneyalready
ld a, $2
.asm_16266
ld [wcf63], a
.done_0
ld [wJumptableEntryIndexBuffer], a
ret
; 1626a
Function1626a: ; 1626a
.InitializeBank: ; 1626a
ld hl, UnknownText_0x16649
call PrintText
call YesNoBox
jr c, .asm_1627f
jr c, .DontSaveMoney
ld hl, UnknownText_0x1664e
call PrintText
ld a, $81
jr .asm_16281
ld a, %10000001
jr .done_1
.asm_1627f
ld a, $80
.DontSaveMoney
ld a, %10000000
.asm_16281
ld [wd854], a
.done_1
ld [wBankOfMomMode], a
ld hl, UnknownText_0x16653
call PrintText
ld a, $8
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 16290
Function16290: ; 16290
.IsThisAboutYourMoney: ; 16290
ld hl, UnknownText_0x16658
call PrintText
call YesNoBox
jr c, .asm_1629f
jr c, .nope
ld a, $3
jr .asm_162a4
jr .done_2
.asm_1629f
.nope
call DSTChecks
ld a, $7
.asm_162a4
ld [wcf63], a
.done_2
ld [wJumptableEntryIndexBuffer], a
ret
; 162a8
Function162a8: ; 162a8
.AccessBankOfMom: ; 162a8
ld hl, UnknownText_0x1665d
call PrintText
call Function1d6e
@ -108,36 +108,36 @@ Function162a8: ; 162a8
call CopyMenuDataHeader
call InterpretMenu2
call WriteBackup
jr c, .asm_162ce
jr c, .cancel
ld a, [wcfa9]
cp $1
jr z, .asm_162d2
jr z, .withdraw
cp $2
jr z, .asm_162d6
jr z, .deposit
cp $3
jr z, .asm_162da
jr z, .stopsaving
.asm_162ce
.cancel
ld a, $7
jr .asm_162dc
jr .done_3
.asm_162d2
.withdraw
ld a, $5
jr .asm_162dc
jr .done_3
.asm_162d6
.deposit
ld a, $4
jr .asm_162dc
jr .done_3
.asm_162da
.stopsaving
ld a, $6
.asm_162dc
ld [wcf63], a
.done_3
ld [wJumptableEntryIndexBuffer], a
ret
; 162e0
Function162e0: ; 162e0
.StoreMoney: ; 162e0
ld hl, UnknownText_0x16662
call PrintText
xor a
@ -153,31 +153,31 @@ endr
call Function1656b
call Function16571
call WriteBackup
jr c, .asm_1636d
jr c, .CancelDeposit
ld hl, StringBuffer2
ld a, [hli]
or [hl]
inc hl
or [hl]
jr z, .asm_1636d
jr z, .CancelDeposit
ld de, Money
ld bc, StringBuffer2
callba CheckMoney
jr c, .asm_1635f
jr c, .DontHaveThatMuchToDeposit
ld hl, StringBuffer2
ld de, StringBuffer2 + 3
ld bc, $0003
ld bc, 3
call CopyBytes
ld bc, wd851
ld de, StringBuffer2
callba GiveMoney
jr c, .asm_16366
jr c, .CantDepositThatMuch
ld bc, StringBuffer2 + 3
ld de, Money
callba TakeMoney
ld hl, StringBuffer2
ld de, wd851
ld bc, $0003
ld bc, 3
call CopyBytes
ld de, SFX_TRANSACTION
call PlaySFX
@ -185,27 +185,27 @@ endr
ld hl, UnknownText_0x1668a
call PrintText
ld a, $8
jr .asm_1636f
jr .done_4
.asm_1635f
.DontHaveThatMuchToDeposit
ld hl, UnknownText_0x1667b
call PrintText
ret
.asm_16366
.CantDepositThatMuch
ld hl, UnknownText_0x16680
call PrintText
ret
.asm_1636d
.CancelDeposit
ld a, $7
.asm_1636f
ld [wcf63], a
.done_4
ld [wJumptableEntryIndexBuffer], a
ret
; 16373
Function16373: ; 16373
.TakeMoney: ; 16373
ld hl, UnknownText_0x16667
call PrintText
xor a
@ -221,13 +221,13 @@ endr
call Function1656b
call Function16571
call WriteBackup
jr c, .asm_16400
jr c, .CancelWithdraw
ld hl, StringBuffer2
ld a, [hli]
or [hl]
inc hl
or [hl]
jr z, .asm_16400
jr z, .CancelWithdraw
ld hl, StringBuffer2
ld de, StringBuffer2 + 3
ld bc, 3
@ -235,11 +235,11 @@ endr
ld de, wd851
ld bc, StringBuffer2
callba CheckMoney
jr c, .asm_163f2
jr c, .InsufficientFundsInBank
ld bc, Money
ld de, StringBuffer2
callba GiveMoney
jr c, .asm_163f9
jr c, .NotEnoughRoomInWallet
ld bc, StringBuffer2 + 3
ld de, wd851
callba TakeMoney
@ -253,53 +253,53 @@ endr
ld hl, UnknownText_0x1668f
call PrintText
ld a, $8
jr .asm_16402
jr .done_5
.asm_163f2
.InsufficientFundsInBank
ld hl, UnknownText_0x16671
call PrintText
ret
.asm_163f9
.NotEnoughRoomInWallet
ld hl, UnknownText_0x16676
call PrintText
ret
.asm_16400
ld a, 7
.CancelWithdraw
ld a, $7
.asm_16402
ld [wcf63], a
.done_5
ld [wJumptableEntryIndexBuffer], a
ret
; 16406
Function16406: ; 16406
.StopOrStartSavingMoney: ; 16406
ld hl, UnknownText_0x1666c
call PrintText
call YesNoBox
jr c, .asm_16422
jr c, .StopSavingMoney
ld a, $81
ld [wd854], a
ld [wBankOfMomMode], a
ld hl, UnknownText_0x16685
call PrintText
ld a, $8
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
.asm_16422
.StopSavingMoney
ld a, $80
ld [wd854], a
ld [wBankOfMomMode], a
ld a, $7
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 1642d
Function1642d: ; 1642d
.AskDST: ; 1642d
ld hl, UnknownText_0x16694
call PrintText
Function16433: ; 16433
ld hl, wcf63
.JustDoWhatYouCan: ; 16433
ld hl, wJumptableEntryIndexBuffer
set 7, [hl]
ret
; 16439

View File

@ -136,15 +136,14 @@ Init:: ; 17d
; BG on
ld [rLCDC], a
ld a, $ff
ld a, -1
ld [$ffcb], a
callba Function9890
ld a, $9c
ld [$ffd7], a
xor a
ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a
xor a ; VBGMap1 % $100
ld [hBGMapAddress], a
callba StartClock

View File

@ -15,7 +15,7 @@ Serial:: ; 6ef
jr nz, .asm_721
ld a, [$ffcb]
inc a
inc a ; is it equal to -1?
jr z, .asm_726
ld a, [rSB]

904
main.asm

File diff suppressed because it is too large Load Diff

View File

@ -6612,12 +6612,12 @@ Function102c71: ; 102c71
; 102c87
Function102c87: ; 102c87
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
push af
ld a, [wcf64]
push af
ld a, [wcd4c]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld a, [PartyCount]
ld [wcf64], a
ld a, $0
@ -6632,7 +6632,7 @@ Function102c87: ; 102c87
ld bc, $011a
call Function102d3e
ld a, [wcd4d]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld a, [OTPartyCount]
ld [wcf64], a
ld a, $5
@ -6649,18 +6649,18 @@ Function102c87: ; 102c87
pop af
ld [wcf64], a
pop af
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ret
; 102cee
Function102cee: ; 102cee
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
dec a
call Function102d34
ld de, DefaultFlypoint
ld bc, $002f
call CopyBytes
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld c, a
ld a, $6
sub c
@ -6669,7 +6669,7 @@ Function102cee: ; 102cee
ld hl, $0000
call AddNTimes
push hl
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
dec a
call Function102d34
ld d, h

View File

@ -124,7 +124,7 @@ Function108089: ; 108089
Function1080b7: ; 1080b7
xor a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
call WhiteBGMap
call ClearSprites
call ClearTileMap
@ -187,7 +187,7 @@ Function1080b7: ; 1080b7
Function108157: ; 108157
xor a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
call WhiteBGMap
call ClearSprites
call ClearTileMap
@ -310,7 +310,7 @@ Function108239: ; 108239
; 10824b
Function10824b: ; 10824b
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
bit 7, a
jr nz, .asm_10825a
call Function10827b
@ -335,7 +335,7 @@ Function10824b: ; 10824b
; 10827b
Function10827b: ; 10827b
ld a, [wcf63]
ld a, [wJumptableEntryIndexBuffer]
ld e, a
ld d, 0
ld hl, Jumptable_10828a
@ -372,7 +372,7 @@ Jumptable_10828a: ; 10828a
; 1082b2
Function1082b2: ; 1082b2
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
inc [hl]
ret
; 1082b7
@ -383,7 +383,7 @@ Function1082b7: ; 1082b7
inc hl
ld d, [hl]
ld a, [de]
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
inc de
ld [hl], d
dec hl
@ -392,7 +392,7 @@ Function1082b7: ; 1082b7
; 1082c6
Function1082c6: ; 1082c6
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
set 7, [hl]
ret
; 1082cc
@ -1270,8 +1270,8 @@ Function1089d2:
asm_1089fc
call WaitTop
call Function108ac8
ld a, $9c
ld [$ffd7], a
ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a
hlcoord 5, 0
ld b, $6
ld c, $9
@ -1293,8 +1293,8 @@ String_108a1d: ; 108a1d
Function108a33: ; 108a33
call WaitTop
call Function108ac8
ld a, $9c
ld [$ffd7], a
ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a
hlcoord 5, 0
ld b, $6
ld c, $9
@ -1313,8 +1313,8 @@ String_108a54: ; 108a54
Function108a5b: ; 108a5b
call WaitTop
call Function108ac8
ld a, $9c
ld [$ffd7], a
ld a, VBGMap1 / $100
ld [hBGMapAddress + 1], a
hlcoord 4, 0
ld b, $6
ld c, $a
@ -1336,8 +1336,8 @@ String_108a79: ; 108a79
Function108a87: ; 108a87
call WaitBGMap
call WaitTop
ld a, $98
ld [$ffd7], a
ld a, VBGMap0 / $100
ld [hBGMapAddress + 1], a
ret
; 108a92

File diff suppressed because it is too large Load Diff

View File

@ -521,7 +521,7 @@ Function17d2b6: ; 17d2b6
Function17d2c0: ; 17d2c0
xor a
ld [wcf63], a
ld [wJumptableEntryIndexBuffer], a
ld [wcf64], a
ld [wcf65], a
ld [wcf66], a

View File

@ -9,7 +9,7 @@ UnusedTitleScreen: ; 10c000
xor a
ld [hBGMapMode], a
ld hl, wcf63
ld hl, wJumptableEntryIndexBuffer
rept 3
ld [hli], a
endr

View File

@ -135,7 +135,7 @@ INCLUDE "vram.asm"
SECTION "Stack", WRAM0
wc000::
StackBottom::
ds $ff
ds $100 - 1
Stack::
StackTop::
ds 1
@ -441,6 +441,8 @@ wc60f::
wPlayerMoveStruct:: ds MOVE_LENGTH ; c60f
wc616::
EnemyMonNick:: ds PKMN_NAME_LENGTH ; c616
ds -5
wInitHourBuffer:: ds 5
BattleMonNick:: ds PKMN_NAME_LENGTH ; c621
BattleMon:: battle_struct BattleMon ; c62c
@ -1179,9 +1181,9 @@ MonType:: ; cf5f
CurSpecies:: ; cf60
ds 1
wNamedObjectTypeBuffer:: ds 2
wIntroSceneIndex::
wcf63:: ds 1
wNamedObjectTypeBuffer:: ds 1
ds 1
wJumptableEntryIndexBuffer:: ds 1
wNrOfBeatenBattleTowerTrainers::
wMomBankDigitCursorPosition::
wIntroSceneFrameCounter::
@ -2126,7 +2128,7 @@ Money:: ; d84e
wd851::
wMomsMoney:: ; d851
ds 3
wd854::
wBankOfMomMode::
wMomSavingMoney:: ; d854
ds 1