-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.FE7_Installer.event
1114 lines (988 loc) · 33.5 KB
/
.FE7_Installer.event
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
#ifndef callHackNew
#define callHackNew(offset) "BYTE $01 $4B $9E $46 $00 $F8 $01 $E0; POIN (offset|0x1)"
#endif
//#define SKILLSYS_INSTALLED
//#define STRMAG_INSTALLED
#ifdef VeslyBuildfile
#include "Text/repointedTextTable.event"
#endif
#include "EAstdlib.event"
#include "Definitions.event"
#include "Extensions/Hack Installation.txt"
#ifdef VeslyBuildfile
ORG 0x1030000
#include "gfx/Installer.event"
MESSAGE Graphics end at currentoffset
#endif
#ifndef PROC_CALL_ROUTINE_2
#define PROC_CALL_ROUTINE_2(aprRoutine) "SHORT 0x16 0; POIN aprRoutine"
#endif
#ifndef gCharacterData
#define gCharacterData 0x8BDCE4C
#endif
#ifdef VeslyBuildfile
#include "Tables/TableInstaller.event"
#else
#define gCharacterDataFE1 0x8BDCE4C
#define gCharacterDataFE4 0x8BDCE4C
#define gCharacterDataFE5 0x8BDCE4C
#define gCharacterDataFE6 0x8BDCE4C
#define gCharacterDataFE7 0x8BDCE4C
#define gCharacterDataFE8 0x8BDCE4C
#define gCharacterDataFE10 0x8BDCE4C
#define gCharacterDataFE13 0x8BDCE4C
#define gCharacterDataFE14 0x8BDCE4C
#define gCharacterDataFE15 0x8BDCE4C
#define gCharacterDataFE16 0x8BDCE4C
#define gCharacterDataFE17 0x8BDCE4C
#endif
#include "Patches/FE7.lyn.event"
#include "Patches/FE7_AsmHooks.lyn.event"
//#define TLP // to use this installer on TLP
//#define JankyPalettes // Uncomment if you want to always use char palettes, even with classes randomized
//#define NeverRandomizeMusic // comment this out if you want music randomized
// it only knows of vanilla song IDs though
#ifndef TextTable
#define TextTable 0xB808AC
#endif
#ifndef SetText
#define SetText(textID, offset) "PUSH; ORG (TextTable+(4*textID)); POIN (offset|0x80000000); POP"
#endif
ConfigText:
String("Config") ; BYTE 0
ConfigDescText:
String("Reconfigure the randomizer.") ; BYTE 0
SetText(0x119f, ConfigText)
SetText(0x11a0, ConfigDescText)
ALIGN 4
BonusItemChance:
WORD 10
VanillaPortraitsOnly:
#ifdef Reskin
WORD 1
#else
WORD 0
#endif
CasualModeFlag:
WORD 0xA0
RandomizePrepShop:
WORD 1 // If true, randomize prep shop if player randomizes found items
MinClassBase:
#ifdef TLP
WORD 1
#endif
WORD 0 // If true, stats won't go lower than class bases
RandomizeMovConBonus:
WORD 1
OnlyThievesCanUseLockpicks:
WORD 1
ClassBasedGrowths:
WORD 0
ChanceToDemote:
WORD 80
CombinedGrowths:
WORD 0
#define statCap 60
maxStat:
WORD statCap
AllEnemiesCanUseWepLocks:
#ifdef NoWepLock
WORD 1
#else
WORD 0
#endif
// Each shop will have one of these items at random
RareItemTableSize:
WORD 17
RareItemTable: // stat boosters / promo items
BYTE 0x5a 0x5b 0x5c 0x5d 0x5e 0x5f 0x60 0x61 0x62 0x63 0x64 0x65 0x66 0x67 0x96 0x87 0x67
#define NeverChangeFromItem(id) "PUSH; ORG ItemExceptions + (id * 2); BYTE 1; POP"
#define NeverChangeIntoItem(id) "PUSH; ORG ItemExceptions + (id * 2) + 1; BYTE 1; POP"
#define NeverChangeItem(id) "PUSH; ORG ItemExceptions + (id * 2); BYTE 1 1; POP" // does both of the above
#define NeverChangeItems(id1, id2) "PUSH; ORG ItemExceptions + (id1 * 2); FILL((id2-id1)*2) 0x1; POP"
#define NeverChangeFromClass(id) "PUSH; ORG ClassExceptions + (id * 2); BYTE 1; POP"
#define NeverChangeIntoClass(id) "PUSH; ORG ClassExceptions + (id * 2) + 1; BYTE 1; POP"
#define NeverChangeClass(id) "PUSH; ORG ClassExceptions + (id * 2); BYTE 1 1; POP" // does both of the above
#define NeverChangeClasses(id1, id2) "PUSH; ORG ClassExceptions + (id1 * 2); FILL((id2-id1)*2) 0x1; POP"
#define NeverChangeChar(id) "PUSH; ORG CharExceptions + (id * 2); BYTE 1 1; POP"
#define NeverChangeChars(id1, id2) "PUSH; ORG CharExceptions + (id1 * 2); FILL((id2-id1)*2) 0x1; POP"
#define NeverUseBGM(id) "PUSH; ORG BGMExceptions + id; BYTE 1; POP"
#define IgnoreTextID(id) "PUSH; ORG TextIDExceptionTable + (id); BYTE 1; POP"
#define IgnoreTextIDRange(id1, id2) "PUSH; ORG TextIDExceptionTable + (id1); FILL(id2-id1) 0x1; POP"
ALIGN 4
ItemExceptions:
FILL(256*2)
ALIGN 4
ClassExceptions:
FILL(256*2)
ALIGN 4
CharExceptions:
FILL(256*2)
ALIGN 4
BGMExceptions:
FILL(0x1000) // probably not more than this many tracks
ALIGN 4
TextIDExceptionTable:
FILL(0x2000) // max id 0x2000
IgnoreTextIDRange(0x813, 0x814) // uses SetName idk
// shops & misc
IgnoreTextIDRange(0, 0x58)
// class, stat screen descs
IgnoreTextIDRange(0x22B, 0x278)
// Items, misc
IgnoreTextIDRange(0x279, 0x48E)
// Class
IgnoreTextIDRange(0x48F, 0x4D5)
// names here
// terrain, misc
IgnoreTextIDRange(0x5E2, 0x663)
// misc
IgnoreTextIDRange(0x70f, 0x74D)
// merlinus is full
// misc
IgnoreTextIDRange(0x74F, 0x75B)
IgnoreTextIDRange(0x75D, 0x75F)
IgnoreTextIDRange(0x761, 0x7A6)
// menu stuff
IgnoreTextIDRange(0x109F, 0x114A)
// Merlinus
IgnoreTextIDRange(0x114C, 0x1154)
IgnoreTextIDRange(0x117b, 0x1195)
IgnoreTextIDRange(0x1225, 0x12CD)
// sound room below
#ifndef TLP
NeverChangeIntoClass(4) // 4, 5, 6 are duplicate promoted lords
NeverChangeIntoClass(5)
NeverChangeIntoClass(6)
NeverChangeIntoClass(0xB)
NeverChangeIntoClass(0xF)
NeverChangeIntoClass(0x11)
NeverChangeIntoClass(0x15)
NeverChangeIntoClass(0x17)
NeverChangeIntoClass(0x19)
NeverChangeIntoClass(0x1B)
NeverChangeIntoClass(0x1F)
NeverChangeIntoClass(0x25)
NeverChangeIntoClass(0x29)
NeverChangeIntoClass(0x2B)
NeverChangeIntoClass(0x2F)
NeverChangeIntoClass(0x31)
NeverChangeIntoClass(0x35)
NeverChangeIntoClass(0x37)
NeverChangeIntoClass(0x3D)
NeverChangeIntoClass(0x5A) // 3rd sage
#endif
NeverChangeIntoClass(0x4D)
NeverChangeIntoClass(0x52)
NeverChangeIntoClass(0x53)
NeverChangeIntoClass(0x56)
NeverChangeChar(0xFB) // arena enemy randomized breaks things
ALIGN 4
ShopText:
String("Shop"); BYTE 0
SetText(0x1260, ShopText)
ALIGN 4
SkillExceptions:
FILL 256*2
NumberOfSkills:
WORD 0xE3
DisplayRandomSkillsOption:
WORD 0
ALIGN 4
VanillaSkill:
FILL 256
ALIGN 4
AlwaysSkillTable:
FILL 256
ALIGN 4
SRR_TotalOptions:
WORD 21
ALIGN 4
MaxItems_Link:
#ifdef TLP
WORD 0xDC
#endif
WORD 0 // If 0, it'll read through your item editor and count
// until it finds an item with an ID that does not match (eg. says 0)
MaxClasses_Link:
#ifdef TLP
WORD 0x5A
#endif
#ifndef VeslyBuildfile
WORD 0 // If 0, it'll read through your class editor and count
#endif
WORD 0 //90
// until it finds a class with an ID that does not match (eg. says 0)
PUSH
// checksum testing stuff
//ORG $9f924
//SHORT $4770 // bx lr
//ORG $9f92c
//SHORT $2001
//SHORT $46db // mov r11, r11
//
/// 9f924 -> 9e4f0 -> 80130b4
// is saved string the same as rom string?
//ORG $ad2
//SHORT $46c0 $46c0
// 80130B4
ORG $28842 // Melee & magic arena fix fe7
BYTE $11 $80 $00 $00 $49 $46 $08 $70 $2E $E0
ORG $184dc
BYTE $10 $B5 $04 $1C $FE $F7 $40 $F9 $00 $28 $04 $D1 $E0 $6A $00 $28 $06 $D0 $01 $20 $04 $E0 $FE $F7 $C3 $FE $02 $21 $08 $40 $40 $08 $10 $BD
ORG $2cc88
replaceWithHack(FE7PromoHook)
ORG $37D84
jumpToHack(MaybeChargeAtPlayer)
ORG $CE3F0C //ORG $CE45EC // in CE45E4 //B9395C //CE49D8
PROC_CALL_ROUTINE_2(FE7_StartDifficultySelection)
ORG $67E84
jumpToHack(FE7_RandBattleMusicHook)
ORG $17E9E // by Circles
byte 0x00 0x00
jumpToHack(CasualMode)
#ifndef TLP
ORG $9E9FC // Select any mode on new game
// by Doesnt
BYTE $1F $20 $70 $47
#endif
//ORG $A06E2
//SHORT $46c0 $46c0 // don't reset game time on new game
ORG $2FA48 // fe7
callHackNew(DroppableItemHook_FE7) // enemies in fe6 do not drop items, so unnecessary there
ORG $2DFCA // Default game speed option to fast by 7743 ported by Vesly
BYTE $d0 $22
/*
OFF:0x02DFCA=0x02 0x40
FAST_A:0x02DFCA=0xd0 0x22
FAST_CURSOL_A:0x02DFCA=0xc0 0x22
FAST_A_TERRAINOFF:0x02DFCA=0xd2 0x22
FAST_CURSOL_A_TERRAINOFF:0x02DFCA=0xc2 0x22
*/
// Merlinus can use supply on maps
// by Gryz / Vesly
ORG $22D60; SHORT $2800 $D023 // if no Merlinus unit found, exit
SHORT $1C03 $6818 $2800 $D01F
ORG $22D94; SHORT $DD08
// Merlinus no autopromote
//ORG $8F082; BYTE level
ORG $21E3E; BYTE 0xC0 0x46 0xC0 0x46 // Merlinus can trade
ORG $23D08; BYTE 0xC0 0x46 0xC0 0x46 // Units can trade Merlinus
ORG $4049A0 // Don't draw "mov"
WORD 0 0 0 0
//BYTE $94 $31 $00 $02 $0E $35 $00 $02 $03 $00 $00 $00 $24 $27 $CC $08
ORG $4049F0 // Don't draw "mov"
BYTE $94 $31 $00 $02 $0E $35 $00 $02 $03 $00 $00 $00 $24 $27 $CC $08
ORG $404a40; WORD 0 0 0 0
ORG $7FE78
FILL($7FFDC - $7FE78) // nop out the vanilla draw bar stuff
ORG $7FFD0 // our new version
callHackNew(DrawBarsOrGrowths)
ORG $813E0
FILL($81400 - $813E0)
ORG $813E2
SHORT $1C28
callHackNew(StatScreenSelectLoop)
#define jumpToHack_r1(offset) "BYTE 0x00 0x49 0x08 0x47; POIN (offset|0x1)"
#ifndef JankyPalettes
ORG $53230
jumpToHack_r1(MaybeUseGenericPalette_FE7)
//ORG $53242
//SHORT $2000 // always use generic palette (by Vesly)
#endif
// in 8019E5C BuildBestMovementScript
// Fix REDA / MOVE from crashing on impassible terrain
// by 7743 - ported to fe7 by Vesly
//ORG 0x01A77E; // fe8 version
ORG 0x19F9A // fe7u
// looks like code is the same
BYTE 0xFF 0x2D 0x29 0xDA 0x02 0x99 0x08 0x70 0x04 0x9B 0x02 0x93
// Zero out movement if ai4
ORG $19BE4
jumpToHack(NullifyMov)
//Patches Tutorial Disabler (PatchForm) Tutorial Disabler2024-03-13 6:22:07 PM
ORG $D7C6
BYTE $00 $00;
ORG $D842
BYTE $04 $E0;
ORG $02DF06
BYTE $07 $E0;
ORG $078FC8
BYTE $00 $20 $70 $47;
ORG $079004
BYTE $00 $20 $70 $47;
ORG $07905C
BYTE $00 $20 $70 $47;
ORG $0790C4
BYTE $00 $20 $70 $47;
ORG $079104
BYTE $00 $20 $70 $47;
// DangerZone by Circles
ORG 0x1c3e0
BYTE 0x69 0xf0 0x4c 0xfc 0x2 0x4a 0x91 0x69 0x50 0x69 0x2 0x4b 0x4 0xe0 0xc0 0x46 0xb8 0xbb 0x2 0x2 0x23 0x60 0x2 0x8 0x0 0xf0 0x1 0xf8 0x1 0xe0 0x10 0xb5 0x18 0x47 0x5 0xf0 0xe7 0xf8 0x19 0xe0 0xc0 0x46 0x4 0x1c 0x0 0x2c
ORG 0x1c40f
BYTE 0xd0 0x50 0xf0 0x50 0xfc 0x20 0x1c 0xa 0xf0 0xbd 0xf8 0x69
ORG 0x1c41c
BYTE 0x2d 0xfc 0x30 0x1c 0x16 0xf0 0xa4 0xf9 0x2d 0xe0 0x0 0x0 0xf8 0x57 0xb8 0x8
ORG 0x1c8ab
BYTE 0xe0
// 92220
// Shop in fe7 by Vesly
// 922FC as nop = can always sell
//ORG $922FC; SHORT $46C0
// 9230E as nop: can use sell/shop if no items
ORG $9230E; SHORT $46C0
// goes to label B in CC4448
ORG $B7CF2A; BYTE $7E $1A $64 $12 // rename "Sell" into "Shop"
//ORG $91FBE; SHORT $2400 // make "Shop" white
// Enable Trnsfr always
//ORG $9177C; SHORT $2100 // make "Trnsfr" white
// enable give all
//ORG $92344; SHORT $46C0 // skip first branch
//ORG $92358; SHORT $E008 // always branch
//ORG $92378; SHORT $46C0 // skip 3rd branch
// enable trnsfr
//ORG $92330; SHORT $46C0
// 91354 - [20252cc+0x2B]!!
ORG $8EF16
#define SupplyUnitID 0x28 // Merlinus //0x3 Lyn
SHORT $6800 $7900 $46c0 $46c0 $46c0 $46c0 $46c0; BYTE SupplyUnitID $28; SHORT $D003
// search for unit id instead of "supply" 0x200 bitflag
// in $2E818
ORG $2E838 // when inv full and sending an item
SHORT $46C0 $46C0 $46c0 $46c0 $46c0 $46c0
SHORT $7918; BYTE SupplyUnitID $28;
// search for unit id instead of "supply" 0x200 bitflag
// Anti-Huffman by Hextator & ported by 7743
//ORG 0x4364; BYTE $00 $B5 $C2 $0F $00 $2A $02 $D0 $0E $F0 $86 $FC $03 $E0 $02 $4A $12 $68 $BB $F0 $6D $FC $00 $BD $40 $39 $00 $03
//ORG 0x12C6C; BYTE $02 $49 $28 $1C $00 $F0 $14 $F8 $35 $60 $0C $E0 $B4 $A5 $02 $02 $80 $23 $1B $06 $C0 $1A $02 $78 $0A $70 $01 $31 $01 $30 $00 $2A $F9 $D1 $70 $47
// fe6: 8034BF0 // doesn't seem to check unit bitflags? can any enemy unit in fe6 use a lockpick already?
ORG $3BB9C; SHORT $46C0 // any ai can use lockpick from 803BB40
ORG $4F40
SHORT $46C0 $46C0 // don't erase bg when setting up debug font
ORG $404B60 // in 80804C8
POIN NewDisplayPage0|1
// normally it is: POIN 0x807FDf1 0x80800B5 0x8080425 0x0807fdf1
// as page 1, 2, 3, ??
ORG $B95AFC
POIN NewChMenu
ORG 0x179C
callHackNew(RandColoursHook)
SHORT 0x46C0
#ifdef _FE6_
ORG $2EF4C
callHackNew(MakeStolenItemDroppable_FE6)
#endif
#ifdef _FE7_
ORG $35378
callHackNew(MakeStolenItemDroppable_FE7)
#endif
#ifdef _FE8_
ORG $3A15C
callHackNew(MakeStolenItemDroppable_FE8)
SHORT 0x46C0
#endif
ORG $26A88
BYTE 30 // Support range
#ifdef VeslyBuildfile
ORG $CBD270 // athos coord in CBCD80 event
BYTE 8
#endif
// PutUnitSpriteIconsOam fe6/7/8 8022378 8025B54 80275E8
ORG $25E04
jumpToHack(DisplayStealOrDropIcon_FE7)
ORG $8e74 // in 7854 // fe7 8008E34 fe6 800a4f4
callHackNew(HookLoadFace_FE8) // fe8 and fe7 identical here
// world map?
ORG $b4dc4
callHackNew(HookWMStartFace_FE7)
// b4d4c
ORG $18BD8
jumpToHack(GetUnitPortraitId_FE7)
// 80192F4 GetUnitChibiId // fe7 8018BF4 fe6 8018500
ORG $18BF4
jumpToHack(GetUnitMiniPortraitId_FE7)
// in 69370 from 692a4
ORG $69378
jumpToHack(GetBattleLevelUpPortraitId_FE7)
// at 74B98 from 74a28 - fe6 8067E84
ORG $74B94
callHackNew(GetMapLevelUpPortraitId_FE7)
ORG $528B6
SHORT $B408 // push r3
callHackNew(UniqueAnimationHook_FE7)
SHORT $BC08 // pop r3
ORG $9fA50
jumpToHack(NewClearBWLFunction_FE7)
#ifdef VeslyBuildfile
ORG $bada4
callHackNew(TitleScreen_FE7)
ORG $a39fc
jumpToHack(SaveScreen_FE7)
#endif
// display range on page 2
/*
ORG $801F6
SHORT $205e $5a20 $1c05
ORG $80202
SHORT $46c0 $46c0
SHORT $2128 $46c0
ORG $80210
BL(0x8005B3C)
*/
ORG $7D9E4 // Should karla appear
jumpToHack(ShouldKarlaAppear)
POP
TextA:
String("Eliwood"); BYTE 0
TextB: ; String("Some name"); BYTE 0
TextC:
String("Marcus"); BYTE 0
TextD: ; String("another name"); BYTE 0
TextE:
String("I "); BYTE 0
TextF: ; String("arbitrary text "); BYTE 0
ALIGN 4
ReplaceTextList:
// required flag, required chapter, pad, text to find, replacement text
//SHORT 0; BYTE 0xFF 0; POIN TextA TextB
//SHORT 0; BYTE 0xff 0; POIN TextC TextD
//SHORT 0; BYTE 0xff 0; POIN TextE TextF
WORD 0 0 0// terminator
#ifdef VeslyBuildfile
#define SetName(id) "{ addr: ; SetText(id, addr) ; }"
#else
#define SetName(id) "ALIGN 16"
#endif
ALIGN 16
NameStrings:
FILL(16*256)
ORG NameStrings
ALIGN 16 ; SetName(0x04DC); String("Eliwood")
ALIGN 16 ; SetName(0x04DD); String("Hector")
ALIGN 16 ; SetName(0x04DE); String("Lyn")
ALIGN 16 ; SetName(0x04DF); String("Raven")
ALIGN 16 ; SetName(0x04E0); String("Geitz")
ALIGN 16 ; SetName(0x04E1); String("Guy")
ALIGN 16 ; SetName(0x04E2); String("Karel")
ALIGN 16 ; SetName(0x04E3); String("Dorcas")
ALIGN 16 ; SetName(0x04E4); String("Bartre")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x04E5); String("Oswin")
ALIGN 16 ; SetName(0x04E6); String("Fargus")
ALIGN 16 ; SetName(0x04E7); String("Wil")
ALIGN 16 ; SetName(0x04E8); String("Rebecca")
ALIGN 16 ; SetName(0x04E9); String("Louise")
ALIGN 16 ; SetName(0x04EA); String("Lucius")
ALIGN 16 ; SetName(0x04EB); String("Serra")
ALIGN 16 ; SetName(0x04EC); String("Renault")
ALIGN 16 ; SetName(0x04ED); String("Erk")
ALIGN 16 ; SetName(0x04EE); String("Nino")
ALIGN 16 ; SetName(0x04EF); String("Pent")
ALIGN 16 ; SetName(0x04F0); String("Canas")
ALIGN 16 ; SetName(0x04F1); String("Kent")
ALIGN 16 ; SetName(0x04F2); String("Sain")
ALIGN 16 ; SetName(0x04F3); String("Lowen")
ALIGN 16 ; SetName(0x04F4); String("Marcus")
ALIGN 16 ; SetName(0x04F5); String("Priscilla")
ALIGN 16 ; SetName(0x04F6); String("Rath")
ALIGN 16 ; SetName(0x04F7); String("Florina")
ALIGN 16 ; SetName(0x04F8); String("Fiora")
ALIGN 16 ; SetName(0x04F9); String("Farina")
ALIGN 16 ; SetName(0x04FA); String("Heath")
ALIGN 16 ; SetName(0x04FB); String("Vaida")
ALIGN 16 ; SetName(0x04FC); String("Hawkeye")
ALIGN 16 ; SetName(0x04FD); String("Matthew")
ALIGN 16 ; SetName(0x04FE); String("Jaffar")
ALIGN 16 ; SetName(0x04FF); String("Ninian")
ALIGN 16 ; SetName(0x0500); String("Nils")
ALIGN 16 ; SetName(0x0501); String("Athos")
ALIGN 16 ; SetName(0x0502); String("Merlinus")
ALIGN 16 ; SetName(0x0500); String("Nils")
ALIGN 16 ; SetName(0x0504); String("Uther")
ALIGN 16 ; SetName(0x04FB); String("Vaida")
ALIGN 16 ; SetName(0x0507); String("Wallace")
ALIGN 16 ; SetName(0x04DE); String("Lyn")
ALIGN 16 ; SetName(0x04E7); String("Wil")
ALIGN 16 ; SetName(0x04F1); String("Kent")
ALIGN 16 ; SetName(0x04F2); String("Sain")
ALIGN 16 ; SetName(0x04F7); String("Florina")
ALIGN 16 ; SetName(0x04F6); String("Rath")
ALIGN 16 ; SetName(0x0506); String("Dart")
ALIGN 16 ; SetName(0x0508); String("Isadora")
ALIGN 16 ; SetName(0x0503); String("Eleanora")
ALIGN 16 ; SetName(0x050A); String("Legault")
ALIGN 16 ; SetName(0x050C); String("Karla")
ALIGN 16 ; SetName(0x050B); String("Harken")
ALIGN 16 ; SetName(0x050D); String("Leila")
ALIGN 16 ; SetName(0x050E); String("Bramimond")
ALIGN 16 ; SetName(0x050F); String("Kishuna")
ALIGN 16 ; SetName(0x0511); String("Groznyi")
ALIGN 16 ; SetName(0x0510); String("Wire")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0512); String("Zagan")
ALIGN 16 ; SetName(0x0513); String("Boies")
ALIGN 16 ; SetName(0x0514); String("Puzon")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0516); String("Santals")
ALIGN 16 ; SetName(0x0517); String("Nergal")
ALIGN 16 ; SetName(0x0518); String("Erik")
ALIGN 16 ; SetName(0x0519); String("Sealen")
ALIGN 16 ; SetName(0x051A); String("Bauker")
ALIGN 16 ; SetName(0x051B); String("Bernard")
ALIGN 16 ; SetName(0x051C); String("Damian")
ALIGN 16 ; SetName(0x051D); String("Zoldam")
ALIGN 16 ; SetName(0x051E); String("Uhai")
ALIGN 16 ; SetName(0x051F); String("Aion")
ALIGN 16 ; SetName(0x0520); String("Darin")
ALIGN 16 ; SetName(0x0521); String("Cameron")
ALIGN 16 ; SetName(0x0522); String("Oleg")
ALIGN 16 ; SetName(0x0515); String("Eubans")
ALIGN 16 ; SetName(0x0523); String("Ursula")
ALIGN 16 ; SetName(0x0549); String("Black Fang")
ALIGN 16 ; SetName(0x0525); String("Paul")
ALIGN 16 ; SetName(0x0526); String("Jasmine")
ALIGN 16 ; SetName(0x0549); String("Black Fang")
ALIGN 16 ; SetName(0x052D); String("Jerme")
ALIGN 16 ; SetName(0x052B); String("Pascal")
ALIGN 16 ; SetName(0x052C); String("Kenneth")
ALIGN 16 ; SetName(0x052D); String("Jerme")
ALIGN 16 ; SetName(0x052E); String("Maxime")
ALIGN 16 ; SetName(0x052F); String("Sonia")
ALIGN 16 ; SetName(0x0530); String("Teodor")
ALIGN 16 ; SetName(0x0539); String("Georg")
ALIGN 16 ; SetName(0x0531); String("Kaim")
ALIGN 16 ; SetName(0x0556); String("Merc")
ALIGN 16 ; SetName(0x052A); String("Denning")
ALIGN 16 ; SetName(0x0555); String("Bern")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0535); String("Lloyd")
ALIGN 16 ; SetName(0x0536); String("Linus")
ALIGN 16 ; SetName(0x0535); String("Lloyd")
ALIGN 16 ; SetName(0x0536); String("Linus")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0552); String("Laus")
ALIGN 16 ; SetName(0x0552); String("Laus")
ALIGN 16 ; SetName(0x0550); String("Pirate")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0554); String("Ostia")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0558); String("Guardian")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0552); String("Laus")
ALIGN 16 ; SetName(0x0552); String("Laus")
ALIGN 16 ; SetName(0x053A); String("Zephiel")
ALIGN 16 ; SetName(0x053B); String("Elbert")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0527); String("Brendan")
ALIGN 16 ; SetName(0x0537); String("Limstella")
ALIGN 16 ; SetName(0x0538); String("Dragon")
ALIGN 16 ; SetName(0x053C); String("Batta")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x053D); String("Zugu")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x053E); String("Glass")
ALIGN 16 ; SetName(0x053F); String("Migal")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0540); String("Carjiga")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0541); String("Bug")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0543); String("Natalie")
ALIGN 16 ; SetName(0x0542); String("Bool")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0544); String("Heintz")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0545); String("Beyard")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0546); String("Yogi")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0547); String("Eagler")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0548); String("Lundgren")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x0553); String("Caelin")
ALIGN 16 ; SetName(0x054A); String("Tactician")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x0556); String("Merc")
ALIGN 16 ; SetName(0x0550); String("Pirate")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x054B); String("Citizen")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0554); String("Ostia")
ALIGN 16 ; SetName(0x055A); String("Rath's unit")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0555); String("Bern")
ALIGN 16 ; SetName(0x0558); String("Guardian")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0552); String("Laus")
ALIGN 16 ; SetName(0x054F); String("Bandit")
ALIGN 16 ; SetName(0x0551); String("Bandit")
ALIGN 16 ; SetName(0x0555); String("Bern")
ALIGN 16 ; SetName(0x0558); String("Guardian")
ALIGN 16 ; SetName(0x0559); String("Morph")
ALIGN 16 ; SetName(0x0558); String("Guardian")
ALIGN 16 ; SetName(0x0557); String("Black Fang")
ALIGN 16 ; SetName(0x0535); String("Lloyd")
ALIGN 16 ; SetName(0x0536); String("Linus")
ALIGN 16 ; SetName(0x0527); String("Brendan")
ALIGN 16 ; SetName(0x051E); String("Uhai")
ALIGN 16 ; SetName(0x0523); String("Ursula")
ALIGN 16 ; SetName(0x052C); String("Kenneth")
ALIGN 16 ; SetName(0x0520); String("Darin")
ALIGN 16 ; SetName(0x054C); String("Enemy")
ALIGN 16 ; SetName(0x054D); String("Wall")
ALIGN 16 ; SetName(0x054E); String("Snag")
ORG NameStrings + (16*256)
ALIGN 16
WORD 0 0 0 0
ALIGN 4
DIS_matrixTable:
#incbin "matrixTable.bin"
ALIGN 4
NeverRandomizeColours:
WORD 0
PortraitColoursPastThisAreNotSkin:
WORD 5 // vanilla portraits use the first few colours for skin
IncludeMonstersWithoutWEXP:
WORD 0
ALIGN 4
NewChMenu:
BYTE $C4 $3F $1C $08 $E2 $10 $70 $03 $00 $6A $00 $00 $F9 $A8 $04 $08 $00 $00 $00 $00 $95 $15 $02 $08 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $A8 $3E $1C $08 $E3 $10 $71 $03 $00 $6B $00 $00 $F9 $A8 $04 $08 $00 $00 $00 $00 $C5 $15 $02 $08 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $BC $3F $1C $08 $E4 $10 $72 $03 $00 $6C $00 $00 $F9 $A8 $04 $08 $00 $00 $00 $00 $B1 $15 $02 $08 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $B4 $3F $1C $08 $E5 $10 $73 $03 $00 $6D $00 $00 $45 $15 $02 $08 $00 $00 $00 $00 $5D $15 $02 $08 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00
BYTE $AC $3F $1C $08 ; SHORT $119f $11a0; BYTE $00 $71 $00 $00 $F9 $A8 $04 $08 $00 $00 $00 $00; POIN MenuStartConfigMenu; BYTE $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00
// End
BYTE $AC $3F $1C $08 $E9 $10 $74 $03 $00 $71 $00 $00 $F9 $A8 $04 $08 $00 $00 $00 $00 $81 $15 $02 $08 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $00 $FF $FF $FF $FF
ALIGN 4
NullifyMov:
BYTE $0C $06 $24 $16 $EB $7A $40 $2B $11 $DB $44 $23 $EB $5C $03 $2B $0D $D1 $42 $23 $EB $5C $03 $2B $07 $D0 $42 $23 $EB $5C $06 $2B $03 $D0 $41 $23 $EB $5C $20 $2B $01 $D1 $03 $48 $02 $E0 $03 $4B $9E $46 $00 $F8 $02 $4B $18 $47 $44 $19 $8F $08 $D4 $87 $01 $08 $ED $9B $01 $08 $C0 $46 $C0 $46 $C0 $46 $C0 $46 $C0 $46 $C0 $46
ALIGN 4
CasualMode:
BYTE $10 $B4 $14 $1C $00 $F0 $13 $F8 $00 $28 $01 $D1 $05 $23 $00 $E0 $09 $23 $E0 $68 $05 $21 $C9 $43 $08 $40 $19 $1C $08 $43 $E0 $60 $20 $1C $06 $4B $00 $F0 $02 $F8 $10 $BC $05 $4B $18 $47 $00 $B5 $A0 $20 $04 $4B $FF $F7 $FA $FF $00 $BD $00 $00 $45 $68 $02 $08 $B3 $7E $01 $08 $F9 $98 $07 $08
//#define GetUnitMaxHp 0x08019191
#define GetUnitPower 0x08018AD1
#define GetUnitSkill 0x08018AF1
#define GetUnitSpeed 0x08018B31
#define GetUnitDefense 0x08018B71
#define GetUnitResistance 0x08018B91
#define GetUnitLuck 0x08018BB9
#define SS_STR "WORD 11; POIN GetUnitUnadjustedPow GetUnitPower GetUnitMaxPow GetUnitPowGrowth"
#define SS_SKL "WORD 12; POIN GetUnitUnadjustedSkl GetUnitSkill GetUnitMaxSkl GetUnitSklGrowth"
#define SS_SPD "WORD 13; POIN GetUnitUnadjustedSpd GetUnitSpeed GetUnitMaxSpd GetUnitSpdGrowth"
#define SS_LCK "WORD 14; POIN GetUnitUnadjustedLck GetUnitLuck GetUnitMaxLck GetUnitLckGrowth"
#define SS_DEF "WORD 15; POIN GetUnitUnadjustedDef GetUnitDefense GetUnitMaxDef GetUnitDefGrowth"
#define SS_RES "WORD 16; POIN GetUnitUnadjustedRes GetUnitResistance GetUnitMaxRes GetUnitResGrowth"
#define SS_MAG "WORD 17; POIN GetUnitUnadjustedMag GetUnitMagic GetUnitMaxMag GetUnitMagGrowth"
#define SS_BLANK "WORD 0 0 0 0 0"
#define SS_MOV "WORD 1; POIN GetUnitUnadjustedMov GetUnitMov GetUnitMaxMov GetUnitHPGrowth" // yes, hp
#define SS_CON "WORD 2; POIN GetUnitUnadjustedCon GetUnitCon GetUnitMaxCon 0"
#define SS_AID "WORD 3; POIN 0 0 0 0"
#define SS_TRV "WORD 4; POIN 0 0 0 0"
#define SS_AFN "WORD 5; POIN 0 0 0 0"
#define SS_COND "WORD 6; POIN 0 0 0 0"
#define SS_TALK "WORD 7; POIN 0 0 0 0"
#define SS_SKILLS "WORD 8; POIN 0 0 0 0"
#define SS_SKILLICONS1 "WORD 9; POIN 0 0 0 0"
#define SS_SKILLICONS2 "WORD 10; POIN 0 0 0 0"
ALIGN 4
gStatScreenFunction:
SS_Page0_Layout:
#ifndef SKILLSYS_INSTALLED
// Left side
SS_STR
SS_SKL
SS_SPD
SS_LCK
SS_DEF
SS_RES
SS_BLANK
SS_BLANK
// Right side below
SS_MOV
SS_CON
SS_AID
SS_TALK
SS_AFN
SS_COND
SS_BLANK
SS_BLANK // must have 16 entries
#endif
#ifndef STRMAG_INSTALLED
ALIGN 4
SS_Page0_Layout_Skills:
// Left side
SS_STR
SS_SKL
SS_SPD
SS_LCK
SS_DEF
SS_RES
SS_MOV
SS_CON
// Right side
SS_AID
SS_TRV
SS_AFN
SS_COND
SS_TALK
SS_SKILLS
SS_SKILLICONS1
SS_SKILLICONS2
#endif
#ifdef STRMAG_INSTALLED
ALIGN 4
SS_Page0_Layout_Skills:
SS_STR
SS_MAG
SS_SKL
SS_SPD
SS_LCK
SS_DEF
SS_RES
SS_MOV
// Right side
SS_CON
SS_AID
SS_COND // SS_TRV alternates with?
SS_AFN
SS_TALK
SS_SKILLS
SS_SKILLICONS1
SS_SKILLICONS2
#endif
ALIGN 4
SS_EnableBWL:
#ifdef SKILLSYS_INSTALLED
WORD 0
#endif
WORD 1
VramDest_DebugFont:
WORD 0x3000 // in glowy or 0x3000 ? // 0x4800
ALIGN 4
ReplacePortraitTable:
FILL(256)
#define ReplacePortraitEntry(id, newID) "PUSH; ORG ReplacePortraitTable + id; BYTE newID; POP"
#ifdef VeslyBuildfile
ReplacePortraitEntry(3, 2) // Replace Eliwoods
ReplacePortraitEntry(4, 2)
ReplacePortraitEntry(5, 2)
ReplacePortraitEntry(6, 2)
ReplacePortraitEntry(7, 2)
ReplacePortraitEntry(8, 2)
ReplacePortraitEntry(9, 2)
ReplacePortraitEntry(0xA, 2)
ReplacePortraitEntry(0xB, 2)
ReplacePortraitEntry(0xB, 2)
ReplacePortraitEntry(0xD, 0xC)
ReplacePortraitEntry(0xE, 0xC)
ReplacePortraitEntry(0xF, 0xC)
ReplacePortraitEntry(0x10, 0xC)
ReplacePortraitEntry(0x11, 0xC)
ReplacePortraitEntry(0x12, 0xC)
ReplacePortraitEntry(0x13, 0xC)
ReplacePortraitEntry(0x14, 0xC)
ReplacePortraitEntry(0x15, 0xC)
ReplacePortraitEntry(0x17, 0x16)
ReplacePortraitEntry(0x18, 0x16)
ReplacePortraitEntry(0x19, 0x16)
ReplacePortraitEntry(0x1A, 0x16)
ReplacePortraitEntry(0x17, 0x16)
ReplacePortraitEntry(0x17, 0x16)
ReplacePortraitEntry(0x17, 0x16)
ReplacePortraitEntry(0x17, 0x16)
ReplacePortraitEntry(0x17, 0x16)
ReplacePortraitEntry(0x1d, 0x1C)
ReplacePortraitEntry(0x1e, 0x1C)
ReplacePortraitEntry(0x22, 0x21)
ReplacePortraitEntry(0x34, 0x33)
ReplacePortraitEntry(0x42, 0x41)
ReplacePortraitEntry(0x43, 0x41)
ReplacePortraitEntry(0x44, 0x41)
ReplacePortraitEntry(0x34, 0x33)
ReplacePortraitEntry(0x4d, 0x4c)
ReplacePortraitEntry(0x58, 0x57)
ReplacePortraitEntry(0x5f, 0x61)
ReplacePortraitEntry(0x60, 0x61)
ReplacePortraitEntry(0x62, 0x61)
ReplacePortraitEntry(0x58, 0x57)
#endif