1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
|
HandleEvoModeCollision: ; 0x19a95
ld a, [wCurrentStage]
call CallInFollowingTable
HandleEvoModeCollisionPointerTable: ; 0x10a9b
padded_dab HandleRedEvoModeCollision ; STAGE_RED_FIELD_TOP
padded_dab HandleRedEvoModeCollision ; STAGE_RED_FIELD_BOTTOM
padded_dab HandleRedEvoModeCollision
padded_dab HandleRedEvoModeCollision
padded_dab HandleBlueEvoModeCollision ; STAGE_BLUE_FIELD_TOP
padded_dab HandleBlueEvoModeCollision ; STAGE_BLUE_FIELD_BOTTOM
StartEvolutionMode: ; 0x10ab3
ld a, [wInSpecialMode]
and a
ret nz
ld a, [wCurrentStage]
rst JumpTable ; calls JumpToFuncInTable
StartEvolutionMode_CallTable: ; 0x10abc
dw StartEvolutionMode_RedField ; STAGE_RED_FIELD_TOP
dw StartEvolutionMode_RedField ; STAGE_RED_FIELD_BOTTOM
dw StartEvolutionMode_UnusedField
dw StartEvolutionMode_UnusedField
dw StartEvolutionMode_BlueField ; STAGE_BLUE_FIELD_TOP
dw StartEvolutionMode_BlueField ; STAGE_BLUE_FIELD_BOTTOM
ConcludeEvolutionMode: ; 0x10ac8
xor a
ld [wBottomTextEnabled], a
call FillBottomMessageBufferWithBlackTile
xor a
ld [wInSpecialMode], a
ld [wWildMonIsHittable], a
ld [wNumberOfCatchModeTilesFlipped], a
ld [wNumMonHits], a
ld [wEvolutionObjectsDisabled], a
ld [wd554], a
call ClearWildMonCollisionMask
callba StopTimer
ld a, [wCurrentStage]
rst JumpTable ; calls JumpToFuncInTable
ConcludeEvolutionMode_CallTable: ; 0x10af3
dw ConcludeEvolutionMode_RedField ; STAGE_RED_FIELD_TOP
dw ConcludeEvolutionMode_RedField ; STAGE_RED_FIELD_BOTTOM
dw DoNothing_11060
dw DoNothing_11060
dw ConcludeEvolutionMode_BlueField ; STAGE_BLUE_FIELD_TOP
dw ConcludeEvolutionMode_BlueField ; STAGE_BLUE_FIELD_TOP
LoadRedFieldTopGraphics: ; 0x10aff
ld a, [wCurrentStage]
res 0, a
ld c, a
ld b, $0
srl c
sla a
sla a
sla a
sub c
ld c, a
ld hl, VideoData_10b2a
add hl, bc
ld a, [hli]
ld c, a
ld a, [hli]
ld b, a
ld a, [hli]
push af
push bc
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
ld a, [hli]
ld c, a
ld a, [hli]
ld b, a
pop hl
pop af
call LoadVRAMData
ret
VideoData_10b2a: ; 0x10b2a
dab StageRedFieldTopGfx3
dw $8900
dw $E0
dab StageRedFieldTopGfx3
dw $8900
dw $E0
dab StageRedFieldTopGfx3
dw $8900
dw $E0
ShowStartEvolutionModeText: ; 0x10b3f
call FillBottomMessageBufferWithBlackTile
call EnableBottomText
ld hl, wScrollingText1
ld a, [wCurrentEvolutionType]
cp EVO_EXPERIENCE
ld de, StartTrainingText
jr z, .showText
ld de, FindItemsText
.showText
call LoadScrollingText
ret
InitEvolutionSelectionMenu: ; 0x10b59
; Initializes the list menu, which the player uses to select which pokemon to evolve.
xor a
ld [wDrawBottomMessageBox], a
ld hl, wBottomMessageText
ld a, $81
ld b, $30
.clearLoop
ld [hli], a ; load spaces into bottom text. repeat 192 times
ld [hli], a
ld [hli], a
ld [hli], a
dec b
jr nz, .clearLoop
ld hl, wPartyMons
call LoadMonNamesIntoEvolutionSelectionList
ld a, BANK(InGameMenuSymbolsGfx)
ld hl, InGameMenuSymbolsGfx + $50
ld de, vTilesSH tile $08
ld bc, $0030
call LoadVRAMData
ld a, $0
ld hl, wBottomMessageText
deCoord 0, 0, vBGWin
ld bc, $00c0
call LoadVRAMData
ret
LoadMonNamesIntoEvolutionSelectionList: ; 0x10b8e
; Loads 6 pokemon names into the list that allows the player to select which pokemon to evolve.
; Input: hl = pointer to a list of pokemon ids. (an offset of wPartyMons)
ld a, [wNumPartyMons]
ld c, $0
ld b, a
.loop
ld a, [hli]
call LoadMonNameIntoEvolutionSelectionList
inc c
ld a, c
cp $6
jr z, .done
dec b
jr nz, .loop
.done
ret
LoadMonNameIntoEvolutionSelectionList: ; 0x10ba2
; Loads a single pokemon name into the list of pokemon to evolve.
; Input: c = index of the list
; a = pokemon id
push bc
push hl
swap c ;c* 32, does wird things if c starts >15
sla c
ld b, $0
ld hl, wBottomMessageText
add hl, bc ;goes down text as many times as new c
ld d, h
ld e, l
ld c, a ;c now equals paerty mon, HL stored in de
ld b, $0
sla c
rl b
sla c
rl b
sla c
rl b
sla c
rl b ;multiplies party mon by 16, then jumps to correct name in the table
ld hl, PokemonNames ;names are 16 chars long
add hl, bc
ld a, $81
ld [de], a
inc de
ld a, $81
ld [de], a
inc de
ld a, $81
ld [de], a
inc de
ld a, $81
ld [de], a ; loaded 4 spaces into de
inc de
call LoadMonNameIntoBottomMessageBufferList
.loadBlankCharacterLoop
ld a, e
and $1f
cp $14
jr nc, .done
ld a, $81
ld [de], a
inc de
jr .loadBlankCharacterLoop
.done
pop hl
pop bc
ret
SelectPokemonToEvolveMenu: ; 0x10bea
; Drivers the menu that allows the player to select a pokemon to evolve.
xor a
ld [wCurSelectedPartyMon], a
ld [wCurSelectedPartyMonScrollOffset], a
ld [wPartySelectionCursorCounter], a
.loop
call MoveEvolutionSelectionCursor
call ClearPersistentJoypadStates
call UpdateEvolutionSelectionList
rst AdvanceFrame
ld a, [wNewlyPressedButtonsPersistent]
bit BIT_A_BUTTON, a
jr z, .loop
lb de, $00, $01
call PlaySoundEffect
ret
MoveEvolutionSelectionCursor: ; 0x10c0c
ld a, [wPressedButtonsPersistent]
ld b, a
ld a, [wNumPartyMons]
ld c, a
ld a, [wCurSelectedPartyMon]
bit BIT_D_UP, b
jr z, .didntPressUp
and a
ret z
; move the cursor up
dec a
ld [wCurSelectedPartyMon], a
lb de, $00, $03
call PlaySoundEffect
ret
.didntPressUp
bit BIT_D_DOWN, b
ret z
inc a
cp c
ret z
; move the cursor down
ld [wCurSelectedPartyMon], a
lb de, $00, $03
call PlaySoundEffect
ret
UpdateEvolutionSelectionList: ; 0x10c38
ld a, [wCurSelectedPartyMon]
ld hl, wCurSelectedPartyMonScrollOffset
sub [hl]
jr nc, .asm_10c45
dec [hl]
xor a
jr .asm_10c4c
.asm_10c45
cp $6
jr c, .asm_10c4c
inc [hl]
ld a, $5
.asm_10c4c
ld c, a
push bc
ld a, [hl]
ld c, a
ld b, $0
ld hl, wPartyMons
add hl, bc
call LoadMonNamesIntoEvolutionSelectionList
ld a, [hJoypadState]
and a
ld a, [wPartySelectionCursorCounter]
jr z, .asm_10c62
xor a
.asm_10c62
inc a
ld [wPartySelectionCursorCounter], a
bit 3, a
pop bc
jr nz, .asm_10c78
swap c
sla c
ld b, $0
ld hl, wBottomMessageText + $03
add hl, bc
ld a, $88
ld [hl], a
.asm_10c78
ld a, [wCurSelectedPartyMonScrollOffset]
and a
jr z, .asm_10c83
ld a, $8a
ld [wBottomMessageText + $11], a
.asm_10c83
ld a, [wCurSelectedPartyMonScrollOffset]
add $7
jr z, .asm_10c96
ld c, a
ld a, [wNumPartyMons]
cp c
jr c, .asm_10c96
ld a, $89
ld [wBottomMessageText + $b1], a
.asm_10c96
ld a, $0
ld hl, wBottomMessageText
deCoord 0, 0, vBGWin
ld bc, $00c0
call LoadVRAMData
ret
PlaceEvolutionInParty: ; 0x10ca5
ld a, [wCurSelectedPartyMon]
ld c, a
ld b, $0
ld hl, wPartyMons
add hl, bc
ld a, [wCurrentEvolutionMon]
cp $ff
ret z
ld [hl], a
ret
SelectPokemonToEvolve: ; 0x10cb7
call FillBottomMessageBufferWithBlackTile
call InitEvolutionSelectionMenu
ld a, $60
ld [hWY], a
dec a
ld [hLYC], a
ld a, $fd
ld [hLCDCMask], a
call SelectPokemonToEvolveMenu
ld a, $86
ld [hWY], a
ld a, $83
ld [hLYC], a
ld [hLastLYC], a
ld a, $ff
ld [hLCDCMask], a
ld a, [hGameBoyColorFlag]
and a
jr nz, .gameboyColor
ld a, BANK(StageRedFieldTopStatusBarSymbolsGfx_GameBoy)
ld hl, StageRedFieldTopStatusBarSymbolsGfx_GameBoy + $80
ld de, vTilesSH tile $08
ld bc, $0030
call LoadVRAMData
jr .asm_10cfc
.gameboyColor
ld a, BANK(StageRedFieldTopStatusBarSymbolsGfx_GameBoyColor)
ld hl, StageRedFieldTopStatusBarSymbolsGfx_GameBoyColor + $80
ld de, vTilesSH tile $08
ld bc, $0030
call LoadVRAMData
.asm_10cfc
call FillBottomMessageBufferWithBlackTile
ld a, SPECIAL_MODE_EVOLUTION
ld [wDrawBottomMessageBox], a
ld [wInSpecialMode], a
ld [wSpecialMode], a
xor a
ld [wSpecialModeState], a
ld a, [wCurSelectedPartyMon]
ld c, a
ld b, $0
ld hl, wPartyMons
add hl, bc
ld a, [hl]
ld [wCurrentCatchEmMon], a
ret
InitEvolutionModeForMon: ; 0x10d1d
ld hl, wBillboardTilesIlluminationStates
ld b, $18
.asm_10d22
ld a, $1
ld [hli], a
xor a
ld [hli], a
dec b
jr nz, .asm_10d22
ld a, [wCurrentCatchEmMon]
ld c, a
ld b, $0
ld hl, Data_1298b
add hl, bc
ld a, [hl]
add $2
ld [wd555], a
xor a
ld hl, wd566
ld b, $13
.asm_10d40
ld [hli], a
dec b
jr nz, .asm_10d40
ld a, [wCurrentCatchEmMon]
ld c, a
ld b, $0
sla c
rl b
ld hl, CatchEmTimerData
add hl, bc
ld a, [hli]
ld c, a
ld a, [hl]
ld b, a
callba StartTimer
ld a, [wCurrentCatchEmMon]
ld c, a
ld b, $0
sla c ; multiply mon id by 6
rl b
add c
ld c, a
jr nc, .noCarry
inc b
.noCarry
sla c
rl b
ld hl, MonEvolutions
add hl, bc
push hl
ld bc, $03ff
.countMonEvolutionsLoop
ld a, [hli]
and a
jr z, .noEvolution
inc c
.noEvolution
inc hl
dec b
jr nz, .countMonEvolutionsLoop
ld a, c
cp $ff
jr nz, .asm_10d8a
xor a
.asm_10d8a
call RandomRange
sla a
ld c, a
pop hl
add hl, bc ; hl points to one of three entries in mon's evolution data
ld a, [hli] ; a = mon id of evolution
dec a
ld [wCurrentEvolutionMon], a
ld a, [hl] ; a = evoluion type id
ld [wCurrentEvolutionType], a
xor a
ld [wd554], a
ld [wEvolutionTrinketCooldownFrames], a
ld [wEvolutionTrinketCooldownFrames + 1], a
ld hl, wd55c
ld a, $1
ld b, $3
.asm_10dac
ld [hli], a
dec b
jr nz, .asm_10dac
xor a
ld b, $7
.asm_10db3
ld [hli], a
dec b
jr nz, .asm_10db3
ld de, wd55c
ld a, [wd555]
ld c, a
inc a
ld b, a
.asm_10dc0
push bc
ld a, c
call RandomRange
ld c, a
ld b, $0
ld hl, wd55c
add hl, bc
ld c, [hl]
ld a, [de]
ld [hl], a
ld a, c
ld [de], a
pop bc
inc de
dec b
jr nz, .asm_10dc0
callba InitBallSaverForCatchEmMode
call ShowStartEvolutionModeText
call Func_3579
ld a, [wCurrentStage]
bit 0, a
jr z, .asm_10e09
ld a, BANK(StageRedFieldBottomBaseGameBoyColorGfx)
ld hl, StageRedFieldBottomBaseGameBoyColorGfx + $300
ld de, vTilesSH tile $2e
ld bc, $0020
call LoadOrCopyVRAMData
ld a, $0
ld hl, CatchBarTiles
deCoord 6, 8, vBGMap
ld bc, (CatchBarTilesEnd - CatchBarTiles)
call LoadOrCopyVRAMData
.asm_10e09
ret
ShowMonEvolvedText: ; 0x10e0a
ld a, [wCurrentEvolutionMon]
cp $ff
jp z, EvolutionSpecialBonus
ld c, a
ld b, $0
sla c
rl b
sla c
rl b
sla c
rl b
sla c
rl b
ld hl, PokemonNames + 1
add hl, bc
ld de, ItEvolvedIntoAnText ; "It evolved into an"
ld bc, Data_2b34
ld a, [hl]
; check if mon's name starts with a vowel, so it can print "an", instead of "a"
cp "A"
jr z, .nameStartsWithVowel
cp "I"
jr z, .nameStartsWithVowel
cp "U"
jr z, .nameStartsWithVowel
cp "E"
jr z, .nameStartsWithVowel
cp "O"
jr z, .nameStartsWithVowel
ld de, ItEvolvedIntoAText ; "It evolved into a"
ld bc, Data_2b1c
.nameStartsWithVowel
push hl
push bc
push de
call FillBottomMessageBufferWithBlackTile
call EnableBottomText
ld hl, wScrollingText1
pop de
call LoadScrollingText
ld hl, wScrollingText2
pop de
call LoadScrollingText
pop hl
ld de, wBottomMessageText + $20
ld b, $0
.loadMonNameLoop
ld a, [hli]
and a
jr z, .continue
ld [de], a
inc de
inc b
jr .loadMonNameLoop
.continue
ld a, $20
ld [de], a
inc de
xor a
ld [de], a
ld a, [wScrollingText2ScrollStepsRemaining]
add b
ld [wScrollingText2ScrollStepsRemaining], a
ld a, $14
sub b
srl a
ld b, a
ld a, [wScrollingText2StopOffset]
add b
ld [wScrollingText2StopOffset], a
ret
EvolutionSpecialBonus: ; 0x10e8b
ld bc, OneMillionPoints
callba AddBigBCD6FromQueue
ld bc, $0100
ld de, $0000
push bc
push de
call FillBottomMessageBufferWithBlackTile
call EnableBottomText
ld hl, wScrollingText2
ld de, Data_2b6b
call Func_32cc
pop de
pop bc
ld hl, wScrollingText1
ld de, EvolutionSpecialBonusText
call LoadScrollingText
ret
StartEvolutionMode_RedField: ; 0x10ebb
ld a, [wNumPartyMons]
and a
ret z
call SelectPokemonToEvolve
call InitEvolutionModeForMon
ld a, [wd555]
sub $2
ld c, a
sla c
ld hl, IndicatorStatesPointerTable_10f3b
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
ld de, wIndicatorStates
ld b, $13
.loop
ld a, [hli]
ld [de], a
inc de
dec b
jr nz, .loop
xor a
ld [wLeftAlleyCount], a
call Func_107b0
ld a, $2
ld [wd7ad], a
ld de, MUSIC_CATCH_EM_BLUE ; Either MUSIC_CATCH_EM_BLUE or MUSIC_CATCH_EM_RED. They have the same id in their respective audio Banks.
call PlaySong
call SetPokemonSeenFlag
ld a, [wCurrentStage]
bit 0, a
jr nz, .bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesSH tile $10
ld bc, $00e0
call LoadOrCopyVRAMData
ret
.bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesOB tile $20
ld bc, $00e0
call LoadOrCopyVRAMData
callba ClearAllRedIndicators
callba Func_10184
ld a, [hGameBoyColorFlag]
and a
callba nz, Func_102bc
ret
IndicatorStatesPointerTable_10f3b: ; 0x10f3b
dw IndicatorStates_10f4b
dw IndicatorStates_10f5e
dw IndicatorStates_10f71
dw IndicatorStates_10f84
dw IndicatorStates_10f97
dw IndicatorStates_10faa
dw IndicatorStates_10fbd
dw IndicatorStates_10fd0
IndicatorStates_10f4b: ; 0x10f4b
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $01, $01, $00, $00, $00, $00
IndicatorStates_10f5e: ; 0x10f5e
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $01, $00, $01, $01, $00, $00, $00, $00
IndicatorStates_10f71: ; 0x10f71
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_10f84: ; 0x10f84
db $00, $00, $00, $00, $00, $00, $00, $00, $01, $01, $00, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_10f97: ; 0x10f97
db $00, $00, $00, $80, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_10faa: ; 0x10faa
db $00, $00, $80, $80, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_10fbd: ; 0x10fbd
db $00, $00, $80, $80, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_10fd0: ; 0x10fd0
db $00, $00, $80, $80, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
ConcludeEvolutionMode_RedField: ; 0x10fe3
call ResetIndicatorStates
call OpenSlotCave
call SetLeftAndRightAlleyArrowIndicatorStates_RedField
call Func_107e9
ld a, [wCurrentStage]
bit 0, a
jp z, LoadRedFieldTopGraphics
callba ClearAllRedIndicators
callba LoadSlotCaveCoverGraphics_RedField
callba LoadMapBillboardTileData
ld a, BANK(StageSharedBonusSlotGlowGfx)
ld hl, StageSharedBonusSlotGlowGfx + $60
ld de, vTilesOB tile $20
ld bc, $00e0
call LoadVRAMData
ld a, [hGameBoyColorFlag]
and a
jr z, .asm_11036
ld a, BANK(StageRedFieldBottomOBJPalette7)
ld hl, StageRedFieldBottomOBJPalette7
ld de, $0078
ld bc, $0008
call Func_7dc
.asm_11036
ld hl, BlankSaverSpaceTileDataRedField
ld a, BANK(BlankSaverSpaceTileDataRedField)
call QueueGraphicsToLoad
ld a, [wPreviousNumPokeballs]
callba LoadPokeballsGraphics_RedField
ld hl, CaughtPokeballTileDataPointers
ld a, BANK(CaughtPokeballTileDataPointers)
call QueueGraphicsToLoad
ret
StartEvolutionMode_UnusedField: ; 0x11054
ld a, [wNumPartyMons]
and a
ret z
call SelectPokemonToEvolve
call InitEvolutionModeForMon
ret
DoNothing_11060: ; 0x11060
ret
StartEvolutionMode_BlueField: ; 0x11061
ld a, [wNumPartyMons]
and a
ret z
call SelectPokemonToEvolve
call InitEvolutionModeForMon
ld a, $1
ld [wd643], a
ld a, [wd555]
sub $2
ld c, a
sla c
ld hl, IndicatorStatesPointerTable_110ed
add hl, bc
ld a, [hli]
ld h, [hl]
ld l, a
ld de, wIndicatorStates
ld b, $13
.asm_11085
ld a, [hli]
ld [de], a
inc de
dec b
jr nz, .asm_11085
xor a
ld [wLeftAlleyCount], a
callba CloseSlotCave
ld a, $2
ld [wd7ad], a
ld de, MUSIC_CATCH_EM_BLUE ; Either MUSIC_CATCH_EM_BLUE or MUSIC_CATCH_EM_RED. They have the same id in their respective audio Banks.
call PlaySong
call SetPokemonSeenFlag
ld a, [wCurrentStage]
bit 0, a
jr nz, .bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesOB tile $60
ld bc, $00e0
call LoadOrCopyVRAMData
ret
.bottom
ld a, BANK(EvolutionTrinketsGfx)
ld hl, EvolutionTrinketsGfx
ld de, vTilesOB tile $20
ld bc, $00e0
call LoadOrCopyVRAMData
callba Func_1c2cb
callba Func_10184
ld a, [hGameBoyColorFlag]
and a
callba nz, Func_102bc
ret
IndicatorStatesPointerTable_110ed: ; 0x110ed
dw IndicatorStates_110fd
dw IndicatorStates_11110
dw IndicatorStates_11123
dw IndicatorStates_11136
dw IndicatorStates_11149
dw IndicatorStates_1115c
dw IndicatorStates_1116f
dw IndicatorStates_11182
IndicatorStates_110fd: ; 0x110fd
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $00, $00, $01, $01, $00, $00, $00, $00
IndicatorStates_11110: ; 0x11110
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $01, $00, $01, $01, $00, $00, $00, $00
IndicatorStates_11123: ; 0x11123
db $00, $00, $00, $00, $00, $00, $00, $00, $00, $01, $00, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_11136: ; 0x11136
db $00, $00, $80, $00, $00, $00, $00, $00, $01, $01, $00, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_11149: ; 0x11149
db $00, $00, $80, $80, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_1115c: ; 0x1115c
db $00, $00, $80, $80, $00, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_1116f: ; 0x1116f
db $80, $00, $80, $80, $00, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
IndicatorStates_11182: ; 0x11182
db $80, $00, $80, $80, $00, $00, $01, $01, $01, $01, $01, $01, $01, $01, $01, $00, $00, $00, $00
ConcludeEvolutionMode_BlueField: ; 0x11195
xor a
ld [wd643], a
call ResetIndicatorStates
call OpenSlotCave
callba SetLeftAndRightAlleyArrowIndicatorStates_BlueField
ld a, [wCurrentStage]
bit 0, a
jp z, LoadBlueFieldTopGraphics
callba Func_1c2cb
callba LoadSlotCaveCoverGraphics_BlueField
callba LoadMapBillboardTileData
ld a, Bank(StageSharedBonusSlotGlowGfx)
ld hl, StageSharedBonusSlotGlowGfx + $60
ld de, vTilesOB tile $20
ld bc, $00e0
call LoadVRAMData
ld a, [hGameBoyColorFlag]
and a
jr z, .asm_111f0
ld a, BANK(StageBlueFieldBottomOBJPalette7)
ld hl, StageBlueFieldBottomOBJPalette7
ld de, $0078
ld bc, $0008
call Func_7dc
.asm_111f0
ld hl, BlankSaverSpaceTileDataBlueField
ld a, BANK(BlankSaverSpaceTileDataBlueField)
call QueueGraphicsToLoad
ld a, [wPreviousNumPokeballs]
callba LoadPokeballsGraphics_RedField
ld hl, Data_10a88
ld a, BANK(Data_10a88)
call QueueGraphicsToLoad
ret
LoadBlueFieldTopGraphics: ; 0x1120e
ld a, [wCurrentStage]
sub $4
res 0, a
ld c, a
ld b, $0
srl c
sla a
sla a
sla a
sub c
ld c, a
ld hl, VRAMData_1123b
add hl, bc
ld a, [hli]
ld c, a
ld a, [hli]
ld b, a
ld a, [hli]
push af
push bc
ld a, [hli]
ld e, a
ld a, [hli]
ld d, a
ld a, [hli]
ld c, a
ld a, [hli]
ld b, a
pop hl
pop af
call LoadVRAMData
ret
VRAMData_1123b: ; 0x1123b
; This doesn't seem very useful...
dab StageBlueFieldTopGfx3
dw $8600, $E0
dab StageBlueFieldTopGfx3
dw $8600, $E0
dab StageBlueFieldTopGfx3
dw $8600, $E0
dab StageBlueFieldTopGfx3
dw $8600, $E0
dab StageBlueFieldTopGfx3
dw $8600, $E0
dab StageBlueFieldTopGfx3
dw $8600, $E0
dab StageBlueFieldTopGfx3
dw $8600, $E0
|