-
Notifications
You must be signed in to change notification settings - Fork 3
/
Bank06.asm
7318 lines (4575 loc) · 171 KB
/
Bank06.asm
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
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
; ==============================================================================
; *$30000-$30044 LONG
BottleVendor_DetectFish:
{
PHB : PHK : PLB
LDY.b #$0F
.nextSprite
LDA $0DD0, Y : BEQ .inactiveSprite
; Literally!
LDA $0E20, Y : CMP.b #$D2 : BEQ .isFishOutOfWater
.inactiveSprite
DEY : BPL .nextSprite
PLB
RTL
.isFishOutOfWater
LDA $0D10, X : STA $00
LDA $0D30, X : STA $08
LDA.b #$10 : STA $02
LDA $0D00, X : STA $01
LDA $0D20, X : STA $09
LDA.b #$10 : STA $03
PHX : TYX
JSR Sprite_SetupHitBox
PLX
JSR Utility_CheckIfHitBoxesOverlap : BCC .delta
; If the fish is close enough to the merchant, indicate as such.
TYA : ORA.b #$80 : STA $0E90, X
.delta
PLB
RTL
}
; ==============================================================================
; $30044-$30053 DATA
pool BottleVendor_SpawnFishRewards:
{
.x_speeds
db $FA, $FD, $00, $04, $07
.y_speeds
db $0B, $0E, $10, $0E, $0B
.item_types
db $DB, $E0, $DE, $E2, $D9
}
; ==============================================================================
; *$30054-$3009E LONG
BottleVendor_SpawnFishRewards:
{
; Only used by the bottle vendor...
; I think this spawns the items he gives you in the
; event that you give him a fish?
PHB : PHK : PLB
LDA.b #$13 : JSL Sound_SetSfx3PanLong
LDA.b #$04 : STA $0FB5
.nextItem
LDY $0FB5
LDA .item_types, Y : JSL Sprite_SpawnDynamically : BMI .spawnFailed
JSL Sprite_SetSpawnedCoords
LDA $00 : ADD.b #$04 : STA $0D10, Y
LDA.b #$FF : STA $0B58, Y
PHX
LDX $0FB5
LDA .x_speeds, X : STA $0D50, Y
LDA .y_speeds, X : STA $0D40, Y
LDA.b #$20 : STA $0F80, Y : STA $0F10, Y
PLX
.spawnFailed
DEC $0FB5 : BPL .nextItem
PLB
RTL
}
; ==============================================================================
; \wtf When the boomerang is off camera and still in play, it dramatically
; speeds up to catch up to the player. This was confirmed by setting
; the 0x70 and 0x90 values in this routine to much lower values and
; dashing away after throwing the boomerang. It took about 2 minutes
; for the boomerang to get back to the player, but when it finally
; appeared on screen it moved at its normal speed.
; Anyways, this routine overrides the values set by
; Ancilla_ProjectSpeedTowardsPlayer when the boomerang is out of
; view.
; *$3009F-$300E5 LONG
Boomerang_CheatWhenNoOnesLooking:
{
LDA $0C04, X : STA $02
LDA $0C18, X : STA $03
LDA $0BFA, X : STA $04
LDA $0C0E, X : STA $05
REP #$20
LDY.b #$70
LDA $22 : SUB $02 : ADD.w #$00F0 : CMP.w #$01E0 : BPL .too_far_x
; Note: this is the negative version of 0x70
LDY.b #$90
.too_far_x
BCC .close_enough_x
STY $01
BRA .return
.close_enough_x
LDY.b #$70
LDA $20 : SUB $04 : ADD.w #$00F0 : CMP.w #$01E0 : BPL .too_far_y
LDY.b #$90
.too_far_y
BCC .close_enough_y
STY $00
.close_enough_y
.return
SEP #$20
RTL
}
; ==============================================================================
; $300E6-$300F9 DATA
pool Player_ApplyRumbleToSprites:
{
.x_offsets_low
db -32, -32, -32, 16
.y_offsets_low
db -32, 32, -24, -24
.y_offsets_high
db -1, 0
.x_offsets_high
db -1, -1, -1, 0
; $300F4
db 80, 80
; $300F6
db 32, 32, 80, 80
}
; ==============================================================================
; *$300FA-$3012C LONG
Player_ApplyRumbleToSprites:
{
; Grabs Link's coordinates plus an offset determined by his direction
; and stores them to direct page locations.
PHB : PHK : PLB
LDA $2F : LSR A : TAY
LDA $22 : ADD .x_offsets_low, Y : STA $00
LDA $23 : ADC .x_offsets_high, Y : STA $08
LDA $20 : ADC .y_offsets_low, Y : STA $01
LDA $21 : ADC .y_offsets_high, Y : STA $09
LDA $80F4, Y : STA $02
LDA $80F6, Y : STA $03
JSR Entity_ApplyRumbleToSprites
PLB
RTL
}
; ==============================================================================
; *$3012D-$3014A LONG
Sprite_SpawnImmediatelySmashedTerrain:
{
LDY $0314 : PHY
LDY $0FB2 : PHY
PHB : PHK : PLB
JSL Sprite_SpawnThrowableTerrainSilently : BMI .spawn_failed
JSR $E239 ; $36239 IN ROM
.spawn_failed
PLB
PLA : STA $0FB2
PLA : STA $0314
RTL
}
; ==============================================================================
; *$3014B-$301F3 LONG
Sprite_SpawnThrowableTerrain:
{
; This routine is called when you pick up a bush/pot/etc.
; A = 0 - sign
; 1 - small light rock
; 2 - normal bush / pot
; 3 - thick grass
; 4 - off color bush
; 5 - small heavy rock
; 6 - large light rock
; 7 - large heavy rock
PHA
JSL Sound_SetSfxPanWithPlayerCoords
ORA.b #$1D : STA $012E
PLA
; *$30156 ALTERNATE ENTRY POINT
shared Sprite_SpawnThrowableTerrainSilently:
LDX.b #$0F
.next_slot
; look for dead sprites
LDY $0DD0, X : BEQ .empty_slot
DEX : BPL .next_slot
; can't find any slots so don't do any animation
RTL
.empty_slot
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PHA
LDA.b #$0A : STA $0DD0, X
; Make a bush/pot/etc. sprite appear
LDA.b #$EC : STA $0E20, X
LDA $00 : STA $0D10, X
LDA $01 : STA $0D30, X
LDA $02 : STA $0D00, X
LDA $03 : STA $0D20, X
JSL Sprite_LoadProperties
; Set the floor level to whichever the player is on.
LDA $EE : STA $0F20, X
PLA : STA $0DB0, X : CMP.b #$06 : BCC .not_heavy_object
PHA
LDA.b #$A6 : STA $0E40, X
PLA
.not_heavy_object
CMP.b #$02 : BNE .notBushOrPot
LDA $1B : BEQ .outdoors
; This doesn't seem to do anything because it gets overwritten just
; a few lines down anyways!
LDA.b #$80 : STA $0F50, X
.notBushOrPot
.outdoors
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
PHB : PHK : PLB
TAY
LDA $AACA, Y : STA $0F50, X
LDA.b #$09 : STA $7FFA2C, X
LDA.b #$02 : STA $0314
STA $0FB2
LDA.b #$10 : STA $0DF0, X
LDA $EE : STA $0F20, X
STZ $0DC0, X
LDA $0B9C : CMP.b #$FF : BEQ .invalid_secret
ORA $1B : BNE .dont_substitute
LDA $0DB0, X : DEC #2 : CMP.b #$02 : BCC .dont_substitute
JSL Overworld_SubstituteAlternateSecret
.dont_substitute
LDA $0B9C : BPL .normal_secret
AND.b #$7F : STA $0DC0, X
STZ $0B9C
.normal_secret
JSR Sprite_SpawnSecret
.invalid_secret
PLB
RTL
}
; ==============================================================================
; *$30262-$30327 BRANCH LOCATION
pool Sprite_SpawnSecret:
{
.easy_out
CLC
RTS
; *$30264 MAIN ENTRY POINT
Sprite_SpawnSecret:
LDA $1B : BNE .indoors
JSL GetRandomInt : AND.b #$08 : BNE .easy_out
.indoors
LDY $0B9C : BEQ .easy_out
CPY.b #$04 : BNE .not_random
JSL GetRandomInt : AND.b #$03 : ADD.b #$13 : TAY
.not_random
STY $0D
; List of sprites that can be spawned by secrets
LDA $81F3, Y : BEQ .easy_out
JSL Sprite_SpawnDynamically : BMI .easy_out
PHX
LDX $0D
LDA $8209, X : STA $0D80, Y
LDA $8235, X : STA $0BA0, Y
LDA $824B, X : STA $0F80, Y
LDA $00 : ADD $821F, X : STA $0D10, Y
LDA $01 : ADC.b #$00 : STA $0D30, Y
LDA $02 : STA $0D00, Y
LDA $03 : STA $0D20, Y
LDA $04 : STA $0F70, Y
LDA.b #$00 : STA $0DC0, Y
LDA.b #$20 : STA $0F10, Y
LDA.b #$30 : STA $0E10, Y
LDX $0E20, Y : CPX.b #$E4 : BNE .not_key
PHX
TYX
JSR $9262 ; $31262 IN ROM
PLX
.not_key
CPX.b #$0B : BNE .not_chicken
; Make a chicken noise
LDA #$30 : STA $012E
LDA $048E : CMP.b #$01 : BNE BRANCH_DELTA
STA $0E30, Y
BRANCH_DELTA:
.not_chicken
CPX.b #$42 : BEQ .is_soldier
CPX.b #$41 : BEQ .is_soldier
CPX.b #$3E : BNE .not_rock_crab
LDA.b #$09 : STA $0F50, Y
BRA .return
.is_soldier
; Play the "pissed off soldier" sound effect
LDA.b #$04 : STA $012F
LDA.b #$00 : STA $0CE2, Y
LDA.b #$A0 : STA $0EF0, Y
BRA .carry_on
.not_rock_crab
LDA.b #$FF : STA $0B58, Y
.carry_on
CPX.b #$79 : BNE .return
LDA.b #$20 : STA $0D90, Y
.return
SEC
PLX
RTS
}
; ==============================================================================
; $30328-$303C1 LONG
Sprite_Main:
{
; ARE WE INDOORS
LDA $1B : BNE .indoors
STZ $0C7C : STZ $0C7D : STZ $0C7E : STZ $0C7F
STZ $0C80
; Looks like this might load or unload sprites as we scroll during
; the overworld... Not certain of this yet.
JSL Sprite_RangeBasedActivation
.indoors
PHB : PHK : PLB
LDY.b #$00
LDA $7EF3CA : BEQ .in_light_world
; $7E0FFF = 0 if in LW, 1 otherwise
INY
.in_light_World
; Darkworld/Lightworld indicator
STY $0FFF
LDA $11 : BNE .dont_reset_player_dragging
; \wtf Wait, so the dragging of the player is reset under normal
; circumstances, but not in another submodule? Does not compute.
STZ $0B7C
STZ $0B7D
STZ $0B7E
STZ $0B7F
.dont_reset_player_dragging
JSR Oam_ResetRegionBases
JSL Garnish_ExecuteUpperSlotsLong
JSL Tagalong_MainLong
LDA $0314 : STA $0FB2
STZ $0314
LDA.b #$80 : STA $0FAB
; Is this a delay counter between repulse sparks for sprites?
LDA $47 : AND.b #$7F : BEQ .done_counting
DEC $47
BRA .still_counting
.done_counting
STZ $47
.still_counting
STZ $0379
STZ $0377
STZ $037B
LDA $0FDC : BEQ .projectileCounterDone
DEC $0FDC
.projectileCounterDone
JSL Ancilla_Main
JSL Overlord_Main
STZ $0B9A
LDX.b #$0F
.next_sprite
STX $0FA0
JSR Sprite_ExecuteSingle
DEX : BPL .next_sprite
JSL Garnish_ExecuteLowerSlotsLong
STZ $069F
STZ $069E
PLB
JSL CacheSprite_ExecuteAll
LDA $0AAA : BEQ .iota
STA $0FC6
.iota
RTL
}
; ==============================================================================
; $303C2-$303C6 LONG
EasterEgg_BageCodeTrampoline:
{
; \tcrf Already mentioned on tcrf, but I'm pretty sure they got that
; material from me, as some guy in IRC was asking about it around
; the time it went up on the wiki.
; Anyways, this code is confirmed to work, but is not accessible
; in an unmodified game. A hook would have to be inserted somewhere
; to call this.
JSL EasterEgg_BageCode
RTL
}
; ==============================================================================
; $303C7-$303D2 DATA
pool Oam_ResetRegionBases:
{
.bases
db $0030, $01D0, $0000, $0030, $0120, $0140
}
; ==============================================================================
; \note Appears to reset oam regions every frame that the sprite
; handlers are active. Whether these are just for sprites themselves
; and not object handlers, I dunno.
; *$303D3-$303E5 LOCAL
Oam_ResetRegionBases:
{
LDY.b #$00
REP #$20
.next_oam_region
LDA .bases, Y : STA $0FE0, Y
INY #2 : CPY.b #$0B : BCC .next_oam_region
SEP #$20
RTS
}
; ==============================================================================
; *$303E6-$303E9 LONG
Utility_CheckIfHitBoxesOverlapLong:
{
JSR Utility_CheckIfHitBoxesOverlap
RTL
}
; ==============================================================================
; *$303EA-$303F1 LONG
Sprite_SetupHitBoxLong:
{
PHB : PHK : PLB
JSR Sprite_SetupHitBox
PLB
RTL
}
; ==============================================================================
; *$303F2-$304BC LOCAL
{
JSR Sprite_Get_16_bit_Coords
LDA $0E40, X : AND.b #$1F : INC A : ASL #2
LDY $0FB3 : BEQ .dontSortSprites
LDY $0F20, X : BEQ .onBG2
JSL OAM_AllocateFromRegionF : BRA .doneAllocatingOamSlot
.onBG2
JSL OAM_AllocateFromRegionD : BRA .doneAllocatingOamSlot
.dontSortSprites
JSL OAM_AllocateFromRegionA
.doneAllocatingOamSlot
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
; checking for oddball modes
; typically branches along this path
LDA $11 : ORA $0FC1 : BEQ .normalGameMode
JMP $84A4 ; $304A4 IN ROM
.normalGameMode
; this section decrements the sprite's 4 general purpose timers (if nonzero)
LDA $0DF0, X : BEQ .timer_0_expired
DEC $0DF0, X
.timer_0_expired
LDA $0E00, X : BEQ .timer_1_expired
DEC $0E00, X
.timer_1_expired
LDA $0E10, X : BEQ .timer_2_expired
DEC $0E10, X
.timer_2_expired
LDA $0EE0, X : BEQ .timer_3_expired
DEC $0EE0, X
.timer_3_expired
LDA $0EF0, X : AND.b #$7F : BEQ .death_timer_inactive
LDY $0DD0, X : CPY.b #$09 : BCC .sprite_inactive
; on the 0x1F tick of the damage timer we...
CMP.b #$1F : BNE BRANCH_MU
PHA
; Is the sprite Agahnim?
LDA $0E20, X : CMP.b #$7A : BNE .not_agahnim_bitching
; branch if in the dark world
LDA $0FFF : BNE .not_agahnim_bitching
; subtract off damage from agahnim
LDA $0E50, X : SUB $0CE2, X : BEQ .agahnim_bitches
BCS .not_agahnim_bitching
.agahnim_bitches
; Agahnim bitching about you beating him in the Light world
LDA.b #$40 : STA $1CF0
LDA.b #$01 : STA $1CF1
JSL Sprite_ShowMessageMinimal
.not_agahnim_bitching
PLA
BRANCH_MU:
CMP.b #$18 : BNE BRANCH_LAMBDA
JSR $EEC8 ; $36EC8 IN ROM
BRANCH_LAMBDA:
.sprite_inactive
LDA $0CE2, X : CMP.b #$FB : BCS BRANCH_XI
LDA $0EF0, X : ASL A : AND.b #$0E : STA $0B89, X
BRANCH_XI:
DEC $0EF0, X
BRA BRANCH_OMICRON
.death_timer_inactive
STZ $0EF0, X
STZ $0B89, X
BRANCH_OMICRON:
LDA $0F10, X : BEQ .aux_timer_4_expired
DEC $0F10, X
.aux_timer_4_expired
; *$304A4 ALTERNATE ENTRY POINT
; \wtf Interesting.... if player priority is super priority, all sprites
; follow? \task Investigate this.
LDY $EE : CPY.b #$03 : BEQ .player_using_super_priority
LDY $0F20, X
.player_using_super_priority
LDA $0B89, X : AND.b #$CF : ORA .priority, Y : STA $0B89, X
RTS
.priority
db $20, $10, $30, $30
}
; ==============================================================================
; *$304BD-$304C0 LONG
Sprite_Get_16_bit_CoordsLong:
{
JSR Sprite_Get_16_bit_Coords
RTL
}
; ==============================================================================
; *$304C1-$304D9 LOCAL
Sprite_Get_16_bit_Coords:
{
; $0FD8 = sprite's X coordinate, $0FDA = sprite's Y coordinate
LDA $0D10, X : STA $0FD8
LDA $0D30, X : STA $0FD9
LDA $0D00, X : STA $0FDA
LDA $0D20, X : STA $0FDB
RTS
}
; ==============================================================================
; *$304DA-$304E1 LON
Sprite_ExecuteSingleLong:
{
PHB : PHK : PLB
JSR Sprite_ExecuteSingle
PLB
RTL
}
; ==============================================================================
; *$304E2-$30525 LOCAL
Sprite_ExecuteSingle:
{
LDA $0DD0, X : BEQ .inactiveSprite
PHA
JSR $83F2 ; $303F2 IN ROM; Loads some sprite data into common addresses.
PLA
CMP.b #$09 : BEQ .activeSprite
JSL UseImplicitRegIndexedLocalJumpTable
; index is $0DD0, X
dw .inactiveSprite ; 0x00 - Sprite is totally inactive
dw SpriteFall_Main ; 0x01 - sprite is falling into a hole
dw SpritePoof_Main ; 0x02 - Frozen Sprite being smashed by hammer, and pooferized, perhaps into a nice magic refilling item.
dw SpriteDrown_Main ; 0x03 - Sprite has fallen into deep water, may produce a fish
dw SpriteExplode_Main ; 0x04 - Explodey Mode for bosses?
dw SpriteCustomFall_Main ; 0x05 - Sprite falling into a hole but that has a special animation (e.g. soldiers and hard hat beetles)
dw SpriteDeath_Main ; 0x06 - Death mode for normal creatures.
dw SpriteBurn_Main ; 0x07 - Being incinerated? (By Fire Rod)
dw SpritePrep_Main ; 0x08 - A spawning sprite
dw SpriteActive_Main ; 0x09 - An active sprite
dw SpriteHeld_Main ; 0x0A - sprite is being held above Link's head
dw SpriteStunned_Main ; 0x0B - sprite is frozen and immobile
.activeSprite
JMP SpriteActive_Main
; 3050F ALTERNATE ENTRY POINT
shared SpritePrep_ThrowableScenery:
; Why the hell *this* is used as an alternate entry point is beyond
; me.
RTS
; *$30510 ALTERNATE ENTRY POINT
.inactiveSprite
LDA $1B : BNE .indoors
TXA : ASL A
LDA.b #$FF : STA $0BC0, Y : STA $0BC1, Y
RTS
.indoors
LDA.b #$FF : STA $0BC0, X
RTS
}
; ==============================================================================
; *$30526-$3052D LONG
SpriteActive_MainLong:
{
PHB : PHK : PLB
JSR SpriteActive_Main
PLB
RTL
}
; ==============================================================================
; *$3052E-$30542 JUMP LOCATION
SpriteFall_Main:
{
; Sprite mode for falling into a hole
LDA $0DF0, X : BNE .delay
STZ $0DD0, X
JSL Dungeon_ManuallySetSpriteDeathFlag
RTS
.delay
JSR Sprite_PrepOamCoord
JSL SpriteFall_Draw
RTS
}
; ==============================================================================
; *$30543-$30547 JUMP LOCATION
SpriteBurn_Main:
{
JSL SpriteBurn_Execute
RTS
}
; ==============================================================================
; *$30548-$3054C JUMP LOCATION
SpriteExplode_Main:
{
JSL SpriteExplode_ExecuteLong
RTS
}
; ==============================================================================
; $3054D-$3059B DATA
pool SpriteDrown_Main:
{
.oam_groups
dw -7, -7 : db $80, $04, $00, $00
dw 14, -6 : db $83, $04, $00, $00
dw -6, -6 : db $CF, $04, $00, $00
dw 13, -5 : db $DF, $04, $00, $00
dw -4, -4 : db $AE, $04, $00, $00
dw 12, -4 : db $AF, $44, $00, $00
dw 0, 0 : db $E7, $04, $00, $02
dw 0, 0 : db $E7, $04, $00, $02
.vh_flip
db $00, $40, $C0, $80
.chr
db $C0, $C0, $C0, $C0, $CD, $CD, $CD, $CB
db $CB, $CB, $CB
}