forked from pret/pokecrystal
-
Notifications
You must be signed in to change notification settings - Fork 0
/
wram.asm
3066 lines (2563 loc) · 61.2 KB
/
wram.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
INCLUDE "constants.asm"
INCLUDE "macros/wram.asm"
INCLUDE "vram.asm"
SECTION "Stack", WRAM0
StackBottom::
ds $100 - 1
Stack::
StackTop::
ds 1
SECTION "Audio RAM", WRAM0
wMusic::
; nonzero if playing
MusicPlaying:: db ; c100
Channels::
Channel1:: channel_struct Channel1 ; c101
Channel2:: channel_struct Channel2 ; c133
Channel3:: channel_struct Channel3 ; c165
Channel4:: channel_struct Channel4 ; c197
SFXChannels::
Channel5:: channel_struct Channel5 ; c1c9
Channel6:: channel_struct Channel6 ; c1fb
Channel7:: channel_struct Channel7 ; c22d
Channel8:: channel_struct Channel8 ; c25f
ds 1 ; c291
wCurTrackDuty:: db
wCurTrackIntensity:: db
wCurTrackFrequency:: dw
wc296:: db ; BCD value, dummied out
wCurNoteDuration:: db ; used in MusicE0 and LoadNote
CurMusicByte:: db ; c298
CurChannel:: db ; c299
Volume:: ; c29a
; corresponds to $ff24
; Channel control / ON-OFF / Volume (R/W)
; bit 7 - Vin->SO2 ON/OFF
; bit 6-4 - SO2 output level (volume) (# 0-7)
; bit 3 - Vin->SO1 ON/OFF
; bit 2-0 - SO1 output level (volume) (# 0-7)
db
SoundOutput:: ; c29b
; corresponds to $ff25
; bit 4-7: ch1-4 so2 on/off
; bit 0-3: ch1-4 so1 on/off
db
SoundInput:: ; c29c
; corresponds to $ff26
; bit 7: global on/off
; bit 0: ch1 on/off
; bit 1: ch2 on/off
; bit 2: ch3 on/off
; bit 3: ch4 on/off
db
MusicID:: dw ; c29d
MusicBank:: db ; c29f
NoiseSampleAddress:: dw ; c2a0
wNoiseSampleDelay:: db ; c2a2
ds 1 ; c2a3
MusicNoiseSampleSet:: db ; c2a4
SFXNoiseSampleSet:: db ; c2a5
Danger:: ; c2a6
; bit 7: on/off
; bit 4: pitch
; bit 0-3: counter
db
MusicFade:: ; c2a7
; fades volume over x frames
; bit 7: fade in/out
; bit 0-5: number of frames for each volume level
; $00 = none (default)
db
MusicFadeCount:: db ; c2a8
MusicFadeID:: dw ; c2a9
ds 5
CryPitch:: dw ; c2b0
CryLength:: dw ; c2b2
LastVolume:: db ; c2b4
wc2b5:: db ; c2b5
SFXPriority:: ; c2b6
; if nonzero, turn off music when playing sfx
db
ds 1
Channel1JumpCondition:: db
Channel2JumpCondition:: db
Channel3JumpCondition:: db
Channel4JumpCondition:: db
wStereoPanningMask:: db ; c2bc
CryTracks:: ; c2bd
; plays only in left or right track depending on what side the monster is on
; both tracks active outside of battle
db
wSFXDuration:: db
CurSFX:: ; c2bf
; id of sfx currently playing
db
ChannelsEnd::
wMapMusic:: db ; c2c0
wDontPlayMapMusicOnReload:: db
wMusicEnd::
SECTION "WRAM", WRAM0
wLZAddress:: dw ; c2c2
wLZBank:: db ; c2c4
ds 1
wBoxAlignment:: db
InputType:: db ; c2c7
AutoInputAddress:: dw ; c2c8
AutoInputBank:: db ; c2ca
AutoInputLength:: db ; c2cb
wMonStatusFlags:: db
wGameLogicPaused:: db ; c2cd
wSpriteUpdatesEnabled:: db
wc2cf:: db ; ????
wMapTimeOfDay:: db
ds 3
wPrinterConnectionOpen:: db
wPrinterOpcode:: db
wPrevDexEntry:: db
wDisableTextAcceleration:: db
wPreviousLandmark:: db
wCurrentLandmark:: db
wLandmarkSignTimer:: dw
wLinkMode:: ; c2dc
; 0 not in link battle
; 1 link battle
; 4 mobile battle
db
ScriptVar:: db ; c2dd
wPlayerNextMovement:: db
wPlayerMovement:: db
ds 2
wc2e2::
wMovementObject::
db
wMovementDataPointer:: ds 3 ; dba
wc2e6:: ds 4
wMovementByteWasControlSwitch:: db
wMovementPointer:: dw ; c2eb
ds 3
wTempObjectCopyMapObjectIndex:: db ; c2f0
wTempObjectCopySprite:: db ; c2f1
wTempObjectCopySpriteVTile:: db ; c2f2
wTempObjectCopyPalette:: db ; c2f3
wTempObjectCopyMovement:: db ; c2f4
wTempObjectCopyRange:: db ; c2f5
wTempObjectCopyX:: db ; c2f6
wTempObjectCopyY:: db ; c2f7
wTempObjectCopyRadius:: db ; c2f8
ds 1
TileDown:: db ; c2fa
TileUp:: db ; c2fb
TileLeft:: db ; c2fc
TileRight:: db ; c2fd
TilePermissions:: ; c2fe
; set if tile behavior prevents
; you from walking in that direction
; bit 3: down
; bit 2: up
; bit 1: left
; bit 0: right
db
ds 1
SECTION "wSpriteAnims", WRAM0
UNION ; c300
; wSpriteAnimDict is a 10x2 dictionary
; keys: taken from third column of SpriteAnimSeqData
; values: vTiles
wSpriteAnimDict:: ds 10 * 2
wSpriteAnimationStructs::
; field 0: index
; fields 1-3: loaded from SpriteAnimSeqData
SpriteAnim1:: sprite_anim_struct SpriteAnim1
SpriteAnim2:: sprite_anim_struct SpriteAnim2
SpriteAnim3:: sprite_anim_struct SpriteAnim3
SpriteAnim4:: sprite_anim_struct SpriteAnim4
SpriteAnim5:: sprite_anim_struct SpriteAnim5
SpriteAnim6:: sprite_anim_struct SpriteAnim6
SpriteAnim7:: sprite_anim_struct SpriteAnim7
SpriteAnim8:: sprite_anim_struct SpriteAnim8
SpriteAnim9:: sprite_anim_struct SpriteAnim9
SpriteAnim10:: sprite_anim_struct SpriteAnim10
wSpriteAnimationStructsEnd::
NEXTU ; c300
; mobile data
wc300:: ds 1
wc301:: ds 1
wc302:: ds 1
wc303:: ds 2
wc305:: ds 1
wc306:: ds 1
wc307:: ds 1
wc308:: ds 1
wc309:: ds 1
wc30a:: ds 1
wc30b:: ds 1
wc30c:: ds 1
wc30d:: ds 1
wc30e:: ds 1
wc30f:: ds 1
wc310:: ds 1
wc311:: ds 1
wc312:: ds 1
wc313:: ds 1
wc314:: ds 152
wc3ac:: ds 8
ENDU ; c3b4
wSpriteAnimCount:: db
wCurrSpriteOAMAddr:: db
CurIcon:: db ; c3b6
wCurIconTile:: db
wSpriteAnimAddrBackup::
wSpriteAnimIDBuffer::
wCurrSpriteAddSubFlags::
dw
wCurrAnimVTile:: db
wCurrAnimXCoord:: db
wCurrAnimYCoord:: db
wCurrAnimXOffset:: db
wCurrAnimYOffset:: db
wGlobalAnimYOffset:: db
wGlobalAnimXOffset:: db
wSpriteAnimsEnd::
ds 11
; mobile data
wc3cc:: ds 1
wc3cd:: ds 31
wc3ec:: ds 1
wc3ed:: ds 1
wc3ee:: ds 1
wc3ef:: ds 1
wc3f0:: ds 1
wc3f1:: ds 1
wc3f2:: ds 1
wc3f3:: ds 1
wc3f4:: ds 1
wc3f5:: ds 1
wc3f6:: ds 1
wc3f7:: ds 1
wc3f8:: ds 1
wc3f9:: ds 1
wc3fa:: ds 1
wc3fb:: ds 1
wc3fc:: ds 1
ds 3
SECTION "Sprites", WRAM0
Sprites:: ; c400
Sprite01:: sprite_oam_struct Sprite01
Sprite02:: sprite_oam_struct Sprite02
Sprite03:: sprite_oam_struct Sprite03
Sprite04:: sprite_oam_struct Sprite04
Sprite05:: sprite_oam_struct Sprite05
Sprite06:: sprite_oam_struct Sprite06
Sprite07:: sprite_oam_struct Sprite07
Sprite08:: sprite_oam_struct Sprite08
Sprite09:: sprite_oam_struct Sprite09
Sprite10:: sprite_oam_struct Sprite10
Sprite11:: sprite_oam_struct Sprite11
Sprite12:: sprite_oam_struct Sprite12
Sprite13:: sprite_oam_struct Sprite13
Sprite14:: sprite_oam_struct Sprite14
Sprite15:: sprite_oam_struct Sprite15
Sprite16:: sprite_oam_struct Sprite16
Sprite17:: sprite_oam_struct Sprite17
Sprite18:: sprite_oam_struct Sprite18
Sprite19:: sprite_oam_struct Sprite19
Sprite20:: sprite_oam_struct Sprite20
Sprite21:: sprite_oam_struct Sprite21
Sprite22:: sprite_oam_struct Sprite22
Sprite23:: sprite_oam_struct Sprite23
Sprite24:: sprite_oam_struct Sprite24
Sprite25:: sprite_oam_struct Sprite25
Sprite26:: sprite_oam_struct Sprite26
Sprite27:: sprite_oam_struct Sprite27
Sprite28:: sprite_oam_struct Sprite28
Sprite29:: sprite_oam_struct Sprite29
Sprite30:: sprite_oam_struct Sprite30
Sprite31:: sprite_oam_struct Sprite31
Sprite32:: sprite_oam_struct Sprite32
Sprite33:: sprite_oam_struct Sprite33
Sprite34:: sprite_oam_struct Sprite34
Sprite35:: sprite_oam_struct Sprite35
Sprite36:: sprite_oam_struct Sprite36
Sprite37:: sprite_oam_struct Sprite37
Sprite38:: sprite_oam_struct Sprite38
Sprite39:: sprite_oam_struct Sprite39
Sprite40:: sprite_oam_struct Sprite40
SpritesEnd::
SECTION "Tilemap", WRAM0
TileMap:: ; c4a0
; 20x18 grid of 8x8 tiles
ds SCREEN_WIDTH * SCREEN_HEIGHT
TileMapEnd::
SECTION "Battle", WRAM0
UNION ; c608
; unidentified uses
wc608:: ds 480
NEXTU ; c608
; miscellaneous
wMisc:: ds WMISC_WIDTH * WMISC_HEIGHT
wMiscEnd::
NEXTU ; c608
; odd egg
wOddEgg:: party_struct OddEgg
wOddEggName:: ds MON_NAME_LENGTH
wOddEggOTName:: ds MON_NAME_LENGTH
NEXTU ; c608
; battle tower temp struct
wBT_OTTemp:: battle_tower_struct wBT_OTTemp
NEXTU ; c608
; hall of fame temp struct
wHallOfFameTemp:: hall_of_fame wHallOfFameTemp
NEXTU ; c608
; timeset temp storage
wTimeSetBuffer::
ds 20
wInitHourBuffer:: db ; c61c
ds 9
wInitMinuteBuffer:: db ; c626
NEXTU ; c608
; link engine data
ds 10
wc612:: ds 10
NEXTU ; c608
; battle data
wBattle::
wEnemyMoveStruct:: move_struct wEnemyMoveStruct ; c608
wPlayerMoveStruct:: move_struct wPlayerMoveStruct ; c60f
EnemyMonNick:: ds MON_NAME_LENGTH ; c616
BattleMonNick:: ds MON_NAME_LENGTH ; c621
BattleMon:: battle_struct BattleMon ; c62c
ds 2
wWildMon:: db ; c64e
ds 1
wEnemyTrainerItem1:: db ; c650
wEnemyTrainerItem2:: db ; c651
wEnemyTrainerBaseReward:: db ; c652
wEnemyTrainerAIFlags:: ds 3 ; c653
OTClassName:: ds TRAINER_CLASS_NAME_LENGTH ; c656
CurOTMon:: db ; c663
wBattleParticipantsNotFainted::
; Bit array. Bits 0 - 5 correspond to party members 1 - 6.
; Bit set if the mon appears in battle.
; Bit cleared if the mon faints.
; Backed up if the enemy switches.
; All bits cleared if the enemy faints.
db
TypeModifier:: ; c665
; >10: super-effective
; 10: normal
; <10: not very effective
; bit 7: stab
db
CriticalHit:: ; c666
; 0 if not critical
; 1 for a critical hit
; 2 for a OHKO
db
AttackMissed:: ; c667
; nonzero for a miss
db
PlayerSubStatus1:: ; c668
; bit
; 7 in love
; 6 rollout
; 5 endure
; 4 perish song
; 3 identified
; 2 protect
; 1 curse
; 0 nightmare
db
PlayerSubStatus2:: ; c669
; bit
; 7
; 6
; 5
; 4
; 3
; 2
; 1
; 0 curled
db
PlayerSubStatus3:: ; c66a
; bit
; 7 confused
; 6 flying
; 5 underground
; 4 charged
; 3 flinched
; 2 in loop
; 1 rampage
; 0 bide
db
PlayerSubStatus4:: ; c66b
; bit
; 7 leech seed
; 6 rage
; 5 recharge
; 4 substitute
; 3
; 2 focus energy
; 1 mist
; 0 x accuracy
db
PlayerSubStatus5:: ; c66c
; bit
; 7 can't run
; 6 destiny bond
; 5 lock-on
; 4 encored
; 3 transformed
; 2
; 1
; 0 toxic
db
EnemySubStatus1:: ; c66d
; see PlayerSubStatus1
db
EnemySubStatus2:: ; c66e
; see PlayerSubStatus2
db
EnemySubStatus3:: ; c66f
; see PlayerSubStatus3
db
EnemySubStatus4:: ; c670
; see PlayerSubStatus4
db
EnemySubStatus5:: ; c671
; see PlayerSubStatus5
db
PlayerRolloutCount:: db ; c672
PlayerConfuseCount:: db ; c673
PlayerToxicCount:: db ; c674
PlayerDisableCount:: db ; c675
PlayerEncoreCount:: db ; c676
PlayerPerishCount:: db ; c677
PlayerFuryCutterCount:: db ; c678
PlayerProtectCount:: db ; c679
EnemyRolloutCount:: db ; c67a
EnemyConfuseCount:: db ; c67b
EnemyToxicCount:: db ; c67c
EnemyDisableCount:: db ; c67d
EnemyEncoreCount:: db ; c67e
EnemyPerishCount:: db ; c67f
EnemyFuryCutterCount:: db ; c680
EnemyProtectCount:: db ; c681
PlayerDamageTaken:: dw ; c682
EnemyDamageTaken:: dw ; c684
wBattleReward:: ds 3 ; c686
wBattleAnimParam::
wKickCounter::
wPresentPower::
db ; c689
BattleScriptBuffer:: ds 40 ; c68a
BattleScriptBufferAddress:: dw ; c6b2
wTurnEnded:: db ; c6b4
ds 1
PlayerStats:: ; c6b6
PlayerAttack:: dw
PlayerDefense:: dw
PlayerSpeed:: dw
PlayerSpAtk:: dw
PlayerSpDef:: dw
ds 1
EnemyStats:: ; c6c1
EnemyAttack:: dw
EnemyDefense:: dw
EnemySpeed:: dw
EnemySpAtk:: dw
EnemySpDef:: dw
ds 1
PlayerStatLevels:: ; c6cc
; 07 neutral
PlayerAtkLevel:: db ; c6cc
PlayerDefLevel:: db ; c6cd
PlayerSpdLevel:: db ; c6ce
PlayerSAtkLevel:: db ; c6cf
UNION ; c6d0
; finish battle RAM
PlayerSDefLevel:: db ; c6d0
PlayerAccLevel:: db ; c6d1
PlayerEvaLevel:: db ; c6d2
ds 1 ; c6d3
PlayerStatLevelsEnd::
EnemyStatLevels:: ; c6d4
; 07 neutral
EnemyAtkLevel:: db ; c6d4
EnemyDefLevel:: db ; c6d5
EnemySpdLevel:: db ; c6d6
EnemySAtkLevel:: db ; c6d7
EnemySDefLevel:: db ; c6d8
EnemyAccLevel:: db ; c6d9
EnemyEvaLevel:: db ; c6da
ds 1
EnemyTurnsTaken:: db ; c6dc
PlayerTurnsTaken:: db ; c6dd
ds 1
PlayerSubstituteHP:: db ; c6df
EnemySubstituteHP:: db ; c6e0
wUnusedPlayerLockedMove:: db ; c6e1
ds 1
CurPlayerMove:: db ; c6e3
CurEnemyMove:: db ; c6e4
LinkBattleRNCount:: ; c6e5
; how far through the prng stream
db
wEnemyItemState:: db ; c6e6
ds 2
CurEnemyMoveNum:: db ; c6e9
wEnemyHPAtTimeOfPlayerSwitch:: dw ; c6ea
wPayDayMoney:: ds 3 ; c6ec
wSafariMonAngerCount:: db
wSafariMonEating:: db
ds 1
wEnemyBackupDVs:: dw ; used when enemy is transformed
AlreadyDisobeyed:: db ; c6f4
DisabledMove:: db ; c6f5
EnemyDisabledMove:: db ; c6f6
wWhichMonFaintedFirst:: db
; exists so you can't counter on switch
LastPlayerCounterMove:: db ; c6f8
LastEnemyCounterMove:: db ; c6f9
wEnemyMinimized:: db ; c6fa
AlreadyFailed:: db ; c6fb
wBattleParticipantsIncludingFainted:: db ; c6fc
wDanger:: db ; c6fd
wPlayerMinimized:: db ; c6fe
PlayerScreens:: ; c6ff
; bit
; 7
; 6
; 5
; 4 reflect
; 3 light screen
; 2 safeguard
; 1
; 0 spikes
db
EnemyScreens:: ; c700
; see PlayerScreens
db
PlayerSafeguardCount:: db ; c701
PlayerLightScreenCount:: db ; c702
PlayerReflectCount:: db ; c703
ds 1
EnemySafeguardCount:: db ; c705
EnemyLightScreenCount:: db ; c706
EnemyReflectCount:: db ; c707
ds 2
Weather:: ; c70a
; 00 normal
; 01 rain
; 02 sun
; 03 sandstorm
; 04 rain stopped
; 05 sunliight faded
; 06 sandstorm subsided
db
WeatherCount:: ; c70b
; # turns remaining
db
LoweredStat:: db ; c70c
EffectFailed:: db ; c70d
FailedMessage:: db ; c70e
wEnemyGoesFirst:: db ; c70f
wPlayerIsSwitching:: db ; c710
wEnemyIsSwitching:: db ; c711
PlayerUsedMoves:: ; c712
; add a move that has been used once by the player
; added in order of use
ds NUM_MOVES
wEnemyAISwitchScore:: db ; c716
wEnemySwitchMonParam:: db ; c717
wEnemySwitchMonIndex:: db ; c718
wTempLevel:: db ; c719
LastPlayerMon:: db ; c71a
LastPlayerMove:: db ; c71b
LastEnemyMove:: db ; c71c
wPlayerFutureSightCount:: db ; c71d
wEnemyFutureSightCount:: db ; c71e
wGivingExperienceToExpShareHolders:: db ; c71f
wBackupEnemyMonBaseStats:: ds 5 ; c720
wBackupEnemyMonCatchRate:: db ; c725
wBackupEnemyMonBaseExp:: db ; c726
wPlayerFutureSightDamage:: dw ; c727
wEnemyFutureSightDamage:: dw ; c729
wPlayerRageCounter:: db ; c72b
wEnemyRageCounter:: db ; c72c
wBeatUpHitAtLeastOnce:: db ; c72d
wPlayerTrappingMove:: db ; c72e
wEnemyTrappingMove:: db ; c72f
wPlayerWrapCount:: db ; c730
wEnemyWrapCount:: db ; c731
wPlayerCharging:: db ; c732
wEnemyCharging:: db ; c733
BattleEnded:: db ; c734
wWildMonMoves:: ds NUM_MOVES ; c735
wWildMonPP:: ds NUM_MOVES ; c739
wAmuletCoin:: db ; c73a
wSomeoneIsRampaging:: db ; c73b
wPlayerJustGotFrozen:: db ; c73c
wEnemyJustGotFrozen:: db ; c73d
wBattleEnd::
; Battle RAM
; c741
NEXTU ; c6d0
; trade
wTrademons::
wPlayerTrademon:: trademon wPlayerTrademon
wOTTrademon:: trademon wOTTrademon
wTrademonsEnd::
wTradeAnimAddress:: dw
wLinkPlayer1Name:: ds NAME_LENGTH
wLinkPlayer2Name:: ds NAME_LENGTH
wLinkTradeSendmonSpecies:: db
wLinkTradeGetmonSpecies:: db
NEXTU ; c6d0
; naming screen
wNamingScreenDestinationPointer:: dw ; c6d0
wNamingScreenCurrNameLength:: db ; c6d2
wNamingScreenMaxNameLength:: db ; c6d3
wNamingScreenType:: db ; c6d4
wNamingScreenCursorObjectPointer:: dw ; c6d5
wNamingScreenLastCharacter:: db ; c6d7
wNamingScreenStringEntryCoord:: dw ; c6d8
NEXTU ; c6d0
; pokegear
wPokegearPhoneLoadNameBuffer:: db ; c6d0
wPokegearPhoneCursorPosition:: db ; c6d1
wPokegearPhoneScrollPosition:: db ; c6d2
wPokegearPhoneSelectedPerson:: db ; c6d3
wPokegearPhoneSubmenuCursor:: db ; c6d4
wPokegearMapCursorObjectPointer:: dw ; c6d5
wPokegearMapCursorLandmark:: db ; c6d7
wPokegearMapPlayerIconLandmark:: db ; c6d8
wPokegearRadioChannelBank:: db ; c6d9
wPokegearRadioChannelAddr:: dw ; c6da
wPokegearRadioMusicPlaying:: db ; c6dc
NEXTU ; c6d0
; slot machine
wSlots::
wReel1:: slot_reel wReel1
wReel2:: slot_reel wReel2
wReel3:: slot_reel wReel3
; c700
wReel1Stopped:: ds 3
wReel2Stopped:: ds 3
wReel3Stopped:: ds 3
wSlotBias:: db
wSlotBet:: db
wFirstTwoReelsMatching:: db
wFirstTwoReelsMatchingSevens:: db
wSlotMatched:: db
wCurrReelStopped:: ds 3
wPayout:: dw
wCurrReelXCoord:: db
wCurrReelYCoord:: db
ds 2
wSlotBuildingMatch:: db
wSlotsDataEnd::
ds 28
wSlotsEnd::
NEXTU ; c6d0
; card flip
wCardFlip::
wDeck:: ds 24
wDeckEnd::
; c6e8
wCardFlipNumCardsPlayed:: db
wCardFlipFaceUpCard:: db
wDiscardPile:: ds 24
wDiscardPileEnd::
wCardFlipEnd::
NEXTU ; c6d0
; dummy game
wDummyGame::
wDummyGameCards:: ds 9 * 5
wDummyGameCardsEnd::
wDummyGameLastCardPicked:: db ; c6fd
wDummyGameCard1:: db ; c6fe
wDummyGameCard2:: db ; c6ff
wDummyGameCard1Location:: db ; c700
wDummyGameCard2Location:: db ; c701
wDummyGameNumberTriesRemaining:: db ; c702
wDummyGameLastMatches:: ds 5 ; c703
wDummyGameCounter:: db ; c708
wDummyGameNumCardsMatched:: db ; c709
wDummyGameEnd::
NEXTU ; c6d0
; unown puzzle
wUnownPuzzle::
wPuzzlePieces:: ds 6 * 6
wUnownPuzzleEnd::
NEXTU ; c6d0
; pokedex
wPokedexDataStart::
wPokedexOrder:: ds $100 ; >= NUM_POKEMON
wPokedexOrderEnd::
wDexListingScrollOffset:: db ; offset of the first displayed entry from the start
wDexListingCursor:: db ; Dex cursor
wDexListingEnd:: db ; Last mon to display
wDexListingHeight:: db ; number of entries displayed at once in the dex listing
wCurrentDexMode:: db ; Pokedex Mode
wDexSearchMonType1:: db ; first type to search
wDexSearchMonType2:: db ; second type to search
wDexSearchResultCount:: db
wDexArrowCursorPosIndex:: db
wDexArrowCursorDelayCounter:: db
wDexArrowCursorBlinkCounter:: db
wDexSearchSlowpokeFrame:: db
wUnlockedUnownMode:: db
wDexCurrentUnownIndex:: db
wDexUnownCount:: db
wDexConvertedMonType:: db ; mon type converted from dex search mon type
wDexListingScrollOffsetBackup:: db
wDexListingCursorBackup:: db
wBackupDexListingCursor:: db
wBackupDexListingPage:: db
wDexCurrentLocation:: db
if DEF(_CRYSTAL11)
wPokedexStatus:: db
wPokedexDataEnd::
else
wPokedexDataEnd:: ds 1
endc
ds 2
NEXTU ; c6d0
; mobile data
wc6d0:: ds 126
wc74e:: ds 107
wc7b9:: ds 1
wc7ba:: ds 1
wc7bb:: ds 2
wc7bd:: ds 19
wc7d0:: ds 1
wc7d1:: ds 1
wc7d2:: ds 1
wc7d3:: ds 1
wc7d4:: ds 1
ENDU ; c7e8
ENDU ; c7e8
wc7e8:: ds 24
wc7e8_End::
SECTION "Overworld Map", WRAM0
UNION ; c800
OverworldMap:: ds 1300 ; c800
OverworldMapEnd::
NEXTU ; c800
; GB Printer screen RAM
wGameboyPrinterRAM::
wGameboyPrinterScreen:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; c800
wGameboyPrinterScreenEnd:: ; c968
NEXTU ; c800
; GB Printer data
wGameboyPrinter2bppSource:: ds 40 tiles
wGameboyPrinter2bppSourceEnd::
wca80:: db
wPrinterRowIndex:: db
; Printer data
wPrinterData:: ds 4
wPrinterChecksum:: dw ; ca86
wPrinterHandshake:: db
wPrinterStatusFlags::
; bit 7: set if error 1 (battery low)
; bit 6: set if error 4 (too hot or cold)
; bit 5: set if error 3 (paper jammed or empty)
; if this and the previous byte are both $ff: error 2 (connection error)
db
wHandshakeFrameDelay:: db
wPrinterSerialFrameDelay:: db
wPrinterSendByteOffset:: dw
wPrinterSendByteCounter:: dw
; tilemap backup?
wPrinterTileMapBuffer:: ds SCREEN_HEIGHT * SCREEN_WIDTH ; ca90
wPrinterTileMapBufferEnd::
wPrinterStatus:: db ; cbf8
ds 1
wcbfa:: ds 1
wGBPrinterSettings:: db
ds 16
wGameboyPrinterRAMEnd::
NEXTU ; c800
; bill's pc data
wBillsPCPokemonList:: ; c800
; Pokemon, box number, list index
ds 3 * 30
NEXTU ; c800
; raw link data
wLinkData:: ds $514
wLinkDataEnd::
NEXTU ; c800
; link data members
wLinkPlayerName:: ds NAME_LENGTH
wLinkPartyCount:: db
wLinkPartySpecies:: ds PARTY_LENGTH
wLinkPartySpeciesEnd:: db ; legacy scripts don't check PartyCount
UNION ; c813
; time capsule party data
wTimeCapsulePlayerData::
wTimeCapsulePartyMon1:: red_party_struct wTimeCapsulePartyMon1
wTimeCapsulePartyMon2:: red_party_struct wTimeCapsulePartyMon2
wTimeCapsulePartyMon3:: red_party_struct wTimeCapsulePartyMon3
wTimeCapsulePartyMon4:: red_party_struct wTimeCapsulePartyMon4
wTimeCapsulePartyMon5:: red_party_struct wTimeCapsulePartyMon5
wTimeCapsulePartyMon6:: red_party_struct wTimeCapsulePartyMon6
wTimeCapsulePartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
wTimeCapsulePartyMonNicks:: ds PARTY_LENGTH * MON_NAME_LENGTH
wTimeCapsulePlayerDataEnd::
NEXTU ; c813
; link player data
wLinkPlayerData::
wLinkPlayerPartyMon1:: party_struct wLinkPlayerPartyMon1
wLinkPlayerPartyMon2:: party_struct wLinkPlayerPartyMon2
wLinkPlayerPartyMon3:: party_struct wLinkPlayerPartyMon3
wLinkPlayerPartyMon4:: party_struct wLinkPlayerPartyMon4
wLinkPlayerPartyMon5:: party_struct wLinkPlayerPartyMon5
wLinkPlayerPartyMon6:: party_struct wLinkPlayerPartyMon6
wLinkPlayerPartyMonOTNames:: ds PARTY_LENGTH * NAME_LENGTH
wLinkPlayerPartyMonNicks:: ds PARTY_LENGTH * MON_NAME_LENGTH
wLinkPlayerDataEnd::
ENDU ; c9b7
NEXTU ; c800
; mystery gift data
wMysteryGiftPartyTemp:: ; ds PARTY_LENGTH * (1 + 1 + NUM_MOVES)
wMysteryGiftStaging::
wc800:: ds 1
wc801:: ds 1
wc802:: ds 1
wc803:: ds 4
wc807:: ds 7
wc80e:: ds 1
wc80f:: ds 1
wc810:: ds 1
wc811:: ds 1
wc812:: ds 1
wc813:: ds 1
wc814:: ds 4
wc818:: ds 8
wc820:: ds 1
wc821:: ds 47
UNION ; c850
wMysteryGiftTrainerData:: ds (1 + 1 + NUM_MOVES) * PARTY_LENGTH + 2
wMysteryGiftTrainerDataEnd::
NEXTU ; c850
wc850:: ds 16
wc860:: ds 16