diff --git a/.FE8_Installer.event b/.FE8_Installer.event index 8975e92e..912d5dda 100644 --- a/.FE8_Installer.event +++ b/.FE8_Installer.event @@ -360,8 +360,26 @@ WORD 1 VramDest_DebugFont: WORD 0x4800 // in glowy +EphraimCharPalette: +BYTE $10 $80 $00 $00 $00 $55 $53 $FF $7F $FF $6B $1F $4B $00 $18 $2A $2E $19 $B3 $7F $89 $7A $00 $62 $55 $FA $04 $90 $0C $98 $77 $00 $F3 $6E $50 $5E $69 $3D $A5 $14 $C0 $F0 $1F $10 $1F $1C $5B $3D $42 $99 $31 $20 $D1 $18 $F0 $1F $62 $55 $4E $32 $49 $00 $25 $78 $53 $71 $4F $AF $36 $68 $40 $21 $F0 $1F $62 $55 $F1 $39 $29 $29 $00 $F7 $5E $B5 $56 $31 $46 $6B $2D $00 $A5 $14 +EirikaCharPalette: +BYTE $10 $80 $00 $00 $00 $55 $53 $FF $7F $FF $6B $1F $4B $00 $18 $2A $2E $19 $B3 $7F $89 $7A $00 $62 $5D $FF $1B $9E $1A $94 $01 $00 $1C $01 $76 $08 $6F $0C $A5 $14 $80 $90 $1F $99 $7F $92 $7E $6B $69 $9F $06 $42 $BD $29 $14 $0D $F0 $1F $B0 $3F $4D $06 $23 $6C $12 $86 $05 $F0 $1F $50 $1F $52 $00 $4A $8C $31 $C6 $18 $A5 $14 + + PUSH +// EF8008 CharacterPaletteTable is followed by free space, so don't bother repointing +ORG $95EF07 +BYTE 0x6D +ORG 0xef86d4 +POIN EphraimCharPalette + +ORG $95EEA5 +BYTE 0x6E +ORG 0xef86e4 +POIN EirikaCharPalette + + // 48752 5 // handaxes 588C0 diff --git a/.gitignore b/.gitignore index 935262b4..0edba453 100644 --- a/.gitignore +++ b/.gitignore @@ -85,3 +85,4 @@ Temporary Items fe6srr.ups fe7srr.ups fe8srr.ups +fe8srr_c_skillsys.ups diff --git a/C_code.c b/C_code.c index e13ec2f8..9dccd9ac 100644 --- a/C_code.c +++ b/C_code.c @@ -217,6 +217,11 @@ u32 HashByte_Simple(u32 rn, int max) extern u8 VanillaSkill[]; extern int NumberOfSkills; extern u8 * AlwaysSkill; +void EnableRandSkills(void) +{ + RandValues->skills = 1; +} + int RandomizeSkill(int id, struct Unit * unit) { if (!id) diff --git a/MAKE_fe8_cskillsys.cmd b/MAKE_fe8_cskillsys.cmd new file mode 100644 index 00000000..953a674f --- /dev/null +++ b/MAKE_fe8_cskillsys.cmd @@ -0,0 +1,58 @@ +@echo off + +@rem USAGE: "MAKE HACK_full.cmd" [quick] +@rem If first argument is "quick", then this will not update text, tables, maps, or generate a patch +@rem "MACK HACK_quick.cmd" simply calls this but with the quick argument, for convenience + +@rem defining buildfile config + +set "source_rom=%~dp0fe8-kernel-dev.gba" + +set "main_event=%~dp0RomBuildfile_c_skillsys.event" + +set "target_rom=%~dp0fe8srr_c_skillsys.gba" +set "target_ups=%~dp0fe8srr_c_skillsys.ups" +set "target_sym=%~dp0fe8srr_c_skillsys.sym" + +@rem defining tools + +set "c2ea=%~dp0Tools\C2EA\c2ea" +set "textprocess=%~dp0Tools\TextProcess\text-process-classic" +set "ups=%~dp0Tools\ups\ups" +set "parsefile=%~dp0EventAssembler\Tools\ParseFileUTF8.exe" +set "tmx2ea=%~dp0Tools\tmx2ea\tmx2ea" +set symcombo=%~dp0Tools\sym\SymCombo.exe + +@rem set %~dp0 into a variable because batch is stupid and messes with it when using conditionals? + +set "base_dir=%~dp0" + +@rem do the actual building + +echo Copying ROM + +copy "%source_rom%" "%target_rom%" + +echo: +echo Assembling + +cd "%base_dir%EventAssembler" +ColorzCore A FE8 "-output:%target_rom%" "-input:%main_event%" --nocash-sym "--build-times" + + + echo: + echo Generating patch + + cd "%base_dir%" + "%ups%" diff -b "%source_rom%" -m "%target_rom%" -o "%target_ups%" + + +echo: +echo Generating sym file + +echo: | ( "%symcombo%" "%target_sym%" "%target_sym%" "fe8.sym" ) + +echo: +echo Done! + +pause diff --git a/Patches/FE8.lyn.event b/Patches/FE8.lyn.event index 43856881..384c223b 100644 --- a/Patches/FE8.lyn.event +++ b/Patches/FE8.lyn.event @@ -230,7 +230,8 @@ ORG CURRENTOFFSET+$14;ShouldRandomizeRecruitment: ORG CURRENTOFFSET+$10;ShouldRandomizeRecruitmentForUnitID: ORG CURRENTOFFSET+$2c;ShouldRandomizeRecruitmentForPortraitID: ORG CURRENTOFFSET+$18;HashByte_Simple: -ORG CURRENTOFFSET+$1c;GetAlwaysSkill: +ORG CURRENTOFFSET+$1c;EnableRandSkills: +ORG CURRENTOFFSET+$18;GetAlwaysSkill: ORG CURRENTOFFSET+$34;GetNextAlwaysSkill: ORG CURRENTOFFSET+$40;GetPreviousAlwaysSkill: ORG CURRENTOFFSET+$40;ShouldRandomizeUsedCharTable: @@ -453,20 +454,22 @@ ORG CURRENTOFFSET+$90;GetUnitKeyItemSlotForTerrain: ORG CURRENTOFFSET+$58;IsItemDisplayUsable: ORG CURRENTOFFSET+$b4;ArenaIsUnitAllowed: POP -WORD $46C04770 $4A022101 $430B7853 $47707053 $3003080 $B5102335 $2B005CC3 $BC10D102 $4700BC01 $F00A4B01 $E7F8FE75 $80311A9 $681A4B18 $B5102307 $40237814 $D0042900 $4096A81 $2B05D501 $2B02D11F $7813D017 $F5B075B $D8142B03 $B7901 $61B3B54 $E1B2200 $D8062B13 $411A4A0B $22010013 $2301401A $29A6405A $2A00D801 $2000D001 $2001E000 $BC02BC10 $3B014708 $41931E5A $E7F70058 +WORD $46C04770 $4A022101 $430B7853 $47707053 $3003080 $B5102335 $2B005CC3 $BC10D102 $4700BC01 $F00A4B01 $E7F8FE81 $80311A9 $681A4B18 $B5102307 $40237814 $D0042900 $4096A81 $2B05D501 $2B02D11F $7813D017 $F5B075B $D8142B03 $B7901 $61B3B54 $E1B2200 $D8062B13 $411A4A0B $22010013 $2301401A $29A6405A $2A00D801 $2000D001 $2001E000 $BC02BC10 $3B014708 $41931E5A $E7F70058 POIN RecruitValues -WORD $FFF1FFBE $681DB570 $DB0E2900 $DB074295 $19443A01 $78221880 $3C015462 $D1FA4284 $60191869 $BC01BC70 $424E4700 $DD084295 $18821A52 $19401A40 $54547814 $42823201 $31D1FA $46C0E7EC $5B5F0 $27002463 $18C017C3 $4058000E $FEB0FD1 $41794294 $417B42AC $400BB083 $2A632101 $2100DC00 $61B430B $1C610E1C $DD172809 $DD302863 $2A633404 $2D00DD13 $2404DD2D $492563 $22151870 $4B152104 $FDF0F00A $2A0060 $4B132104 $F00A1830 $E016FDE9 $2D003402 $426DDCED $93014B0F $492301 $20002203 $18719300 $4F0C0023 $FDDCF00A $2A0060 $4B072103 $F00A1830 $B003FDD1 $BC01BCF0 $34034700 $2563E7E3 $E7E32404 $8004B0D $8004BE5 -POIN CURRENTOFFSET+43932 -WORD $800443D $4B03B510 $FDBCF00A $BC01BC10 $46C04700 +WORD $FFF1FFBE $681DB570 $DB0E2900 $DB074295 $19443A01 $78221880 $3C015462 $D1FA4284 $60191869 $BC01BC70 $424E4700 $DD084295 $18821A52 $19401A40 $54547814 $42823201 $31D1FA $46C0E7EC $5B5F0 $27002463 $18C017C3 $4058000E $FEB0FD1 $41794294 $417B42AC $400BB083 $2A632101 $2100DC00 $61B430B $1C610E1C $DD172809 $DD302863 $2A633404 $2D00DD13 $2404DD2D $492563 $22151870 $4B152104 $FDFCF00A $2A0060 $4B132104 $F00A1830 $E016FDF5 $2D003402 $426DDCED $93014B0F $492301 $20002203 $18719300 $4F0C0023 $FDE8F00A $2A0060 $4B072103 $F00A1830 $B003FDDD $BC01BCF0 $34034700 $2563E7E3 $E7E32404 $8004B0D $8004BE5 +POIN CURRENTOFFSET+43956 +WORD $800443D $4B03B510 $FDC8F00A $BC01BC10 $46C04700 POIN ForceHardModeFE8 WORD $681B4B02 $7407818 $47700F40 POIN RecruitValues -WORD $B5104B08 $FDAAF00A $2B0088C3 $4B06D007 $7818681B $F400740 $BC02BC10 $20004708 $46C0E7FA $8019465 +WORD $B5104B08 $FDB6F00A $2B0088C3 $4B06D007 $7818681B $F400740 $BC02BC10 $20004708 $46C0E7FA $8019465 POIN RecruitValues WORD $D0052800 $681B4B03 $7407818 $47700F40 $E7FC2000 POIN RecruitValues -WORD $2900B510 $4B04D006 $F00A08C0 $BC10FD85 $4708BC02 $E7FA2000 +WORD $2900B510 $4B04D006 $F00A08C0 $BC10FD91 $4708BC02 $E7FA2000 POIN Mod +WORD $681A4B04 $78D1233F $2140400B $70D3430B $46C04770 +POIN RandValues WORD $23C0220B $40135682 $D00C2B80 $4B07223F $78DB681B $43932000 $D0002BC0 $4B044770 $7818681B $2000E7FA $46C0E7F8 POIN RandValues POIN AlwaysSkill @@ -488,7 +491,7 @@ WORD $8019465 $6A832280 $401A0212 $681B4B08 $23077819 $2B05400B $1F18D007 $41584 POIN RecruitValues WORD $681B4B05 $2307781A $3B054013 $41931E5A $BC06A80 $47704018 POIN RecruitValues -WORD $88C4B570 $2C000005 $7928D103 $BC02BC70 $4B094708 $F00A2001 $4B08FC9D $E00218C1 $42883034 $88C2D0F1 $D1F942A2 $2A006AC2 $7900D0F6 $46C0E7EA $8019465 $33CC $88C3B510 $D0042B00 $FE12F7FF $BC02BC10 $20004708 $46C0E7FA $681B4B0C $781CB510 $401C2307 $2B0088C3 $F7FFD00C $2C04FE01 $BC10D002 $4708BC02 $D0052801 $42433802 $E7F64158 $E7F42000 $E7F22002 +WORD $88C4B570 $2C000005 $7928D103 $BC02BC70 $4B094708 $F00A2001 $4B08FC9D $E00218C1 $42883034 $88C2D0F1 $D1F942A2 $2A006AC2 $7900D0F6 $46C0E7EA $8019465 $33CC $88C3B510 $D0042B00 $FE06F7FF $BC02BC10 $20004708 $46C0E7FA $681B4B0C $781CB510 $401C2307 $2B0088C3 $F7FFD00C $2C04FDF5 $BC10D002 $4708BC02 $D0052801 $42433802 $E7F64158 $E7F42000 $E7F22002 POIN RecruitValues WORD $4B042007 $789B681B $38024018 $41584243 $46C04770 POIN RandBitflags @@ -563,7 +566,7 @@ POIN NumberOfSkills WORD $B5704A0C $78526812 $306D2 $ED0B084 $DD0A280B $10466A $C9704907 $6809C070 $210C6001 $F7FF0018 $B004FF59 $BC02BC70 $46C04708 POIN GrowthValues POIN CURRENTOFFSET+41144 -WORD $46DEB5F0 $464E4657 $B5E04645 $9007B0B5 $20014EC3 $FEFBF009 $681B4BC2 $31B681B $93030B1B $184BC0 $4CC04698 $30502103 $FEEBF009 $33704643 $21030007 $189006 $FEE3F009 $2B4DBA $21033310 $184683 $FEDBF009 $90013530 $282103 $FED5F009 $2200232C $230054FA $93049305 $46994BB1 $5B2380 $469A2401 $96009002 $2C80E01F $2CC0D04F $9F02D100 $2200233F $18FB4023 $701A332C $2B0088C3 $2380D00E $21B6A81 $F7FF4019 $2801F83F $2802D045 $9A05D104 $549CAB20 $93051C53 $45543401 $9B00D043 $F0090020 $464BFEA1 $785B681B $EDB06DB $DD0D2B0B $AB084642 $88C03240 $C362CA62 $210C6812 $3601A $F7FFAA08 $3FED9 $D0112B00 $46942234 $46624641 $9B4362 $3A3458C8 $79031880 $41931E5A $4018425B $D1B42C40 $E7B7465F $9B000020 $FE74F009 $232CE7F6 $9F012200 $88C354FA $D1B42B00 $9F012481 $9A04E7C3 $549CAB0C $34011C53 $45549304 $2401D1BB $9B052500 $9B064698 $4B794699 $4B79469A $9F049E00 $209300 $FE55F009 $2B0088C3 $2380D030 $21B6A81 $F7FE4019 $4653FFD7 $781A681B $40132307 $D0322B04 $D0342801 $D11F2802 $9903002A $F7FF1E60 $4643FD47 $3B010005 $E083D500 $46434698 $D1002B00 $4641E085 $8E89B00 $FE2AF009 $AA20233F $5C114023 $332B444B $46437019 $54135CD3 $54D14643 $2CFF3401 $2C3FD02D $46D9DDC3 $DDC02C7F $46999B01 $DDBC2CBF $46999B02 $2801E7B9 $2802D0CE $2AD1EC $1E609903 $FD14F7FF $3F010005 $9B04D501 $2F001E5F $39D057 $8E89B00 $FDFAF009 $AA0C233F $5C114023 $332B444B $5DD37019 $54133401 $2CFF55D1 $273FD1D1 $3CFE9D06 $DD432C3F $DD402C7F $DC582CBF $F0090020 $F7FFFDE4 $1C63F935 $42839D01 $1182D04D $D03E2A02 $DC3F2A02 $D0442A00 $D1072A01 $44584038 $403C302B $192C7802 $7022342B $2BFF001C $9B07D1DC $D04B2B02 $2B00DC41 $3B01D006 $4153425A $425B465A $9206401A $B0359806 $46BBBCF0 $46A946B2 $BCF046A0 $4708BC02 $3B019B05 $46434698 $D0002B00 $2000E779 $2000E77C $465DE7AA $F0090020 $F7FFFDA4 $1C63F8F5 $D0D14283 $2A021182 $9A01D1C0 $E0034038 $D1C92A03 $40389A02 $44604694 $9A06E7BE $1CE7FA $20E7A0 $F0099D02 $F7FFFD8A $1C63F8DB $D1E54283 $9B07E7B6 $425A3B03 $9A024153 $401A425B $E7BD9206 $93069B01 $46C0E7BA $8019465 +WORD $46DEB5F0 $464E4657 $B5E04645 $9007B0B5 $20014EC3 $FEFBF009 $681B4BC2 $31B681B $93030B1B $184BC0 $4CC04698 $30502103 $FEEBF009 $33704643 $21030007 $189006 $FEE3F009 $2B4DBA $21033310 $184683 $FEDBF009 $90013530 $282103 $FED5F009 $2200232C $230054FA $93049305 $46994BB1 $5B2380 $469A2401 $96009002 $2C80E01F $2CC0D04F $9F02D100 $2200233F $18FB4023 $701A332C $2B0088C3 $2380D00E $21B6A81 $F7FF4019 $2801F833 $2802D045 $9A05D104 $549CAB20 $93051C53 $45543401 $9B00D043 $F0090020 $464BFEA1 $785B681B $EDB06DB $DD0D2B0B $AB084642 $88C03240 $C362CA62 $210C6812 $3601A $F7FFAA08 $3FED9 $D0112B00 $46942234 $46624641 $9B4362 $3A3458C8 $79031880 $41931E5A $4018425B $D1B42C40 $E7B7465F $9B000020 $FE74F009 $232CE7F6 $9F012200 $88C354FA $D1B42B00 $9F012481 $9A04E7C3 $549CAB0C $34011C53 $45549304 $2401D1BB $9B052500 $9B064698 $4B794699 $4B79469A $9F049E00 $209300 $FE55F009 $2B0088C3 $2380D030 $21B6A81 $F7FE4019 $4653FFCB $781A681B $40132307 $D0322B04 $D0342801 $D11F2802 $9903002A $F7FF1E60 $4643FD47 $3B010005 $E083D500 $46434698 $D1002B00 $4641E085 $8E89B00 $FE2AF009 $AA20233F $5C114023 $332B444B $46437019 $54135CD3 $54D14643 $2CFF3401 $2C3FD02D $46D9DDC3 $DDC02C7F $46999B01 $DDBC2CBF $46999B02 $2801E7B9 $2802D0CE $2AD1EC $1E609903 $FD14F7FF $3F010005 $9B04D501 $2F001E5F $39D057 $8E89B00 $FDFAF009 $AA0C233F $5C114023 $332B444B $5DD37019 $54133401 $2CFF55D1 $273FD1D1 $3CFE9D06 $DD432C3F $DD402C7F $DC582CBF $F0090020 $F7FFFDE4 $1C63F935 $42839D01 $1182D04D $D03E2A02 $DC3F2A02 $D0442A00 $D1072A01 $44584038 $403C302B $192C7802 $7022342B $2BFF001C $9B07D1DC $D04B2B02 $2B00DC41 $3B01D006 $4153425A $425B465A $9206401A $B0359806 $46BBBCF0 $46A946B2 $BCF046A0 $4708BC02 $3B019B05 $46434698 $D0002B00 $2000E779 $2000E77C $465DE7AA $F0090020 $F7FFFDA4 $1C63F8F5 $D0D14283 $2A021182 $9A01D1C0 $E0034038 $D1C92A03 $40389A02 $44604694 $9A06E7BE $1CE7FA $20E7A0 $F0099D02 $F7FFFD8A $1C63F8DB $D1E54283 $9B07E7B6 $425A3B03 $9A024153 $401A425B $E7BD9206 $93069B01 $46C0E7BA $8019465 POIN RandValues POIN CURRENTOFFSET+40268 WORD $8002C7D @@ -711,7 +714,7 @@ WORD $68124A16 $5D28812 $F520003 $D01C2A05 $2000D80C $D0172A02 $D1122A03 $18CB00 POIN RandBitflags WORD $68124A16 $5D28812 $F520003 $D01D2A05 $2000D80D $D0182A02 $D1132A03 $1AD200DA $17D12307 $189B400B $3B0110DB $2A06E00A $2307D108 $18120082 $17D10052 $189B400B $330110DB $17C043D8 $47704018 $C22307 $17D11812 $189B400B $E7F310DB POIN RandBitflags -WORD $46D6B5F0 $4646464F $B5C0001D $9B0CB084 $46981B5B $681B4B3A $5DB881B $468A0F5B $6091E99 $E094681 $D8632904 $1ACB0119 $49343B1E $429E680E $1EDD00 $D05C1C73 $1544653 $4B3018E7 $18FF007F $1AE99B0D $41991E4B $42492301 $2A4399 $384B2B $F0073104 $4643FCDD $D0042B00 $39002A $F7FC4640 $9B0CFEBB $DD0142B3 $46981B73 $341E4454 $46A20064 $449A4B21 $5F464B $469C4B20 $984643 $4B1F4440 $C0444F $44400031 $1C007F $F0074467 $9002FCB9 $194000A8 $3100C0 $F0071940 $9B0DFCB2 $9001469C $44600098 $3100C0 $F0074460 $23C0FCA8 $46529000 $382106 $1DB4C0F $FC9FF007 $BCE0B004 $46B146BA $BCF046A8 $4700BC01 $425B2301 $361FE79B $46C0E7A0 +WORD $46D6B5F0 $4646464F $B5C0001D $9B0CB084 $46981B5B $681B4B3A $5DB881B $468A0F5B $6091E99 $E094681 $D8632904 $1ACB0119 $49343B1E $429E680E $1EDD00 $D05C1C73 $1544653 $4B3018E7 $18FF007F $1AE99B0D $41991E4B $42492301 $2A4399 $384B2B $F0073104 $4643FCDD $D0042B00 $39002A $F7FC4640 $9B0CFEAF $DD0142B3 $46981B73 $341E4454 $46A20064 $449A4B21 $5F464B $469C4B20 $984643 $4B1F4440 $C0444F $44400031 $1C007F $F0074467 $9002FCB9 $194000A8 $3100C0 $F0071940 $9B0DFCB2 $9001469C $44600098 $3100C0 $F0074460 $23C0FCA8 $46529000 $382106 $1DB4C0F $FC9FF007 $BCE0B004 $46B146BA $BCF046A8 $4700BC01 $425B2301 $361FE79B $46C0E7A0 POIN RandBitflags POIN maxStat WORD $2003D2C $8004B95 $200472C $401 $80D18FD $8086B2D $B083B500 $23009300 $FD7EF7FE $BC02B003 $46C04708 $464FB5F0 $46D64646 $17B5C0 $1E2203 $681B4B20 $5781B $B082000C $D008421A $791B6803 $46414698 $494B1B $2B005CCB $20D008 $BCE0B002 $46B146BA $BCF046A8 $4708BC02 $399200 $200032 $FD52F7FE $23C0220B $401356AA $1E5A3B80 $46814193 $2B004682 $4643D102 $D8012B2C $DC04454C $F7FF4650 $4FEFB $2303E7DB $93000032 $23000039 $320D4648 $FD34F7FE $DAEF4581 $E7ED4682 @@ -944,7 +947,7 @@ POIN StrMagInstalled WORD $46A9230F $1E0035 $22732300 $320554A3 $52A36763 $681B4653 $D0022B00 $237A2200 $1FF354E2 $4658003A $A9129500 $FBD6F7FE $6002373 $54E01600 $46982300 $D00A2800 $7C9B464B $161B061B $9810181B $17C20FD9 $41514298 $1FB34688 $9500003A $A9129803 $FBBCF7FE $6002374 $54E01600 $464BD00D $61B7D1B $9A09161B $4293181B $4643DC05 $D1002B01 $2301E081 $1F734698 $9500003A $A9129804 $FBA2F7FE $6002375 $54E01600 $464BD00C $61B7D5B $9A0A161B $4293181B $4643DC04 $D0682B01 $46982301 $3A1F33 $98059500 $F7FEA912 $2376FB89 $16000600 $D00C54E0 $7D9B464B $161B061B $181B9A0B $DC044293 $2B014643 $2301D04F $1EF34698 $9500003A $A9129806 $FB70F7FE $6002377 $54E01600 $464BD00C $61B7DDB $9A0C161B $4293181B $4643DC04 $D0362B01 $46982301 $3A1EB3 $98079500 $F7FEA912 $2378FB57 $16000600 $D00C54E0 $7E1B464B $161B061B $181B9A0D $DC044293 $2B014643 $2301D01D $1E734698 $9500003A $A9129808 $FB3EF7FE $6002379 $54E01600 $464BD007 $61B7E5B $9A0E161B $4293181B $4653DD2F $2B00681B $360DD105 $D0002E43 $464DE73E $33E6FA $9500003A $A912980F $FB20F7FE $600237A $54E01600 $464AD0ED $5CD23B40 $98111812 $17C10FD3 $414B4290 $D0E2061B $7DB4643 $464DD5DF $2308E6DE $9600003A $A912980F $FB04F7FE $54E0237A $4643E6D1 $D0D42B01 $46982301 $46C0E7C9 $46D6B5F0 $4646464F $B5C00005 $4B3C0008 $F004000E $2222F815 $793B686F $79034698 $5C83469C $4469A $44527CAA $342374AA $17862 $2127820 $78A04302 $43100400 $61278E2 $482F4302 $464C4681 $401C696B $401046A1 $4B2C405A $401A4448 $20274042 $7E2A616A $18125C08 $4A28762A $2A006812 $203AD007 $B44A26 $78D21912 $18A25C2C $2A542A $32280028 $372C0013 $781C3030 $1BA4783E $3301701C $42833701 $6069D1F7 $7814312C $191B780B $DD002BFB $701323FB $31013201 $D1F44282 $2B3E4643 $4663D104 $D1012B2D $54EA2200 $26132301 $7CEB812B $284453 $F7FE74EB $28FDC5 $57AE4C0D $FFAFF003 $DC064286 $46BABCE0 $46A846B1 $BC01BCF0 $284700 $FFA3F003 $E7F374E8 $8019445 $7F7F7F7F $80808080 POIN StrMagInstalled POIN MagClassTable -WORD $8019191 $6843B510 $F7FF7959 $BC10FF6F $4700BC01 $4B07B510 $F0032000 $2278FF87 $880B4905 $2380401A $4313015B $BC10800B $4700BC01 $8001B59 $3003080 $20014B09 $F003B510 $4A08FF73 $18810003 $88DA2000 $41A21E54 $18803334 $D1F84299 $BC02BC10 $46C04708 $8019465 $E04 $46C6B5F0 $46804B18 $2001B500 $FF58F003 $4B160004 $4F162500 $18C63C34 $6838E011 $581B009B $DA0A2B00 $58120092 $5200E9 $4441005B $85B0852 $604B600A $42A63501 $3434D009 $F7FA0020 $8822F9D7 $429A8803 $2D77D0F5 $4642DDE3 $ED2300 $BC8050AB $BCF046B8 $4700BC01 $8019465 $3398 $800A2A0 $46C04770 $20000002 $3001E002 $D00328FF $2B005C13 $4770D1F9 $E7FC2000 $22180 $20000149 $3001E002 $D0034288 $2B005C13 $4770D1F9 $E7FC2000 $2900B510 $F7F9D001 $BC10F8C9 $4700BC01 $46C6B5F0 $1A4690 $9B06B500 $189F2400 $5D3EE005 $D12442AE $2CFF3401 $5D0DD002 $D1F62D00 $E0022500 $2DFF3501 $4643D01B $29005D59 $1B29D1F8 $D00342A5 $98060003 $F8A4F7F9 $2D002300 $4642D005 $54FA5CD2 $42AB3301 $2001D1F9 $46B8BC80 $BC02BCF0 $20004708 $2C00E7F8 $3D0F5 $98064261 $F88CF7F9 $46C0E7EF $CB510 $DA122800 $8420040 $2000490D $3001E002 $D0124288 $54235C13 $D1F82B00 $54232300 $70631824 $BC02BC10 $4B064708 $F0034A06 $4B06FEAB $DCF54298 $2000E7F0 $46C0E7EE $555 +WORD $8019191 $6843B510 $F7FF7959 $BC10FF6F $4700BC01 $4B07B510 $F0032000 $2278FF87 $880B4905 $2380401A $4313015B $BC10800B $4700BC01 $8001B59 $3003080 $20014B09 $F003B510 $4A08FF73 $18810003 $88DA2000 $41A21E54 $18803334 $D1F84299 $BC02BC10 $46C04708 $8019465 $E04 $46C6B5F0 $46804B18 $2001B500 $FF58F003 $4B160004 $4F162500 $18C63C34 $6838E011 $581B009B $DA0A2B00 $58120092 $5200E9 $4441005B $85B0852 $604B600A $42A63501 $3434D009 $F7FA0020 $8822F9D7 $429A8803 $2D77D0F5 $4642DDE3 $ED2300 $BC8050AB $BCF046B8 $4700BC01 $8019465 $3398 $800A2A0 $46C04770 $20000002 $3001E002 $D00328FF $2B005C13 $4770D1F9 $E7FC2000 $22180 $20000149 $3001E002 $D0034288 $2B005C13 $4770D1F9 $E7FC2000 $2900B510 $F7F9D001 $BC10F8BD $4700BC01 $46C6B5F0 $1A4690 $9B06B500 $189F2400 $5D3EE005 $D12442AE $2CFF3401 $5D0DD002 $D1F62D00 $E0022500 $2DFF3501 $4643D01B $29005D59 $1B29D1F8 $D00342A5 $98060003 $F898F7F9 $2D002300 $4642D005 $54FA5CD2 $42AB3301 $2001D1F9 $46B8BC80 $BC02BCF0 $20004708 $2C00E7F8 $3D0F5 $98064261 $F880F7F9 $46C0E7EF $CB510 $DA122800 $8420040 $2000490D $3001E002 $D0124288 $54235C13 $D1F82B00 $54232300 $70631824 $BC02BC10 $4B064708 $F0034A06 $4B06FEAB $DCF54298 $2000E7F0 $46C0E7EE $555 POIN Arm_DecompText WORD $3004150 $FFE $B5104B0A $4B0A6018 $80681B $C58C0 $FFCCF7FF $54232300 $DC052864 $DB032800 $BC100020 $4708BC02 $E7F946DB $202B6AC $800A2A0 $46DEB5F0 $464E4657 $B5E04645 $B08B4B64 $20010007 $9205469A $F0039104 $2300FE73 $4B609302 $4B60469B $681B9307 $465B9306 $4A5E2680 $92089001 $93039709 $9A020076 $9B014694 $881B9A03 $60139D04 $44659A06 $5898009B $F7FF0029 $2300FF8F $2864542B $E086DD00 $DA002800 $9B01E083 $88DD603D $D0292D00 $681B4B4E $75B781B $46A9D024 $DC042DFF $5D5B4B4B $D0002B00 $46A84699 $464D2401 $465746B9 $3401E003 $D10042B4 $20E078 $FE32F003 $42AB88C3 $7900D1F5 $464546BA $2800464F $F003D006 $F7FAFE2A $88C3F8BD $D1632B00 $46999B08 $46BB2300 $1F46A8 $2500003B $24014647 $E00C4698 $6818464B $79031940 $D0572B00 $42BB88C3 $3401D00C $42B43534 $4643D03D $D1EF2B00 $F0030020 $88C3FE06 $D1F242BB $8803465F $9902009A $9903468C $9B07600B $681B9D05 $58984465 $F7FF0029 $2300FF27 $2864542B $2800DC1D $9B01DB1B $93013334 $330E9B02 $9302001A $607D23D2 $370800DB $D000429A $23F0E775 $9F092200 $50FA009B $BCF0B00B $46B246BB $46A046A9 $BC01BCF0 $46DB4700 $46DBE7E1 $4643E779 $1F46B8 $469C2304 $44E13701 $D1A52F0C $2204465F $E7C02301 $E799001D $464546BA $E795464F $DEFF88DB $8019465 $202B6AC $800A2A0 POIN CURRENTOFFSET+15812 @@ -1066,7 +1069,7 @@ POIN DisplayTimedHitsOption POIN TimedHitsDifficultyRam POIN DisplayRandomSkillsOption POIN AlwaysSkill -WORD $2800B510 $F7F6D001 $BC10FDB7 $4700BC01 $46CEB5F0 $B5804647 $B083001C $D01D2B00 $4B120152 $6D1855 $4B1118ED $466B4699 $4B101D9E $4F104698 $20210A $FBBCF001 $210A3030 $208030 $FBB5F001 $40031 $F0010028 $3D02FBAF $D1ED2C00 $BCC0B003 $46B046B9 $BC01BCF0 $46C04700 $2022CA8 +WORD $2800B510 $F7F6D001 $BC10FDAB $4700BC01 $46CEB5F0 $B5804647 $B083001C $D01D2B00 $4B120152 $6D1855 $4B1118ED $466B4699 $4B101D9E $4F104698 $20210A $FBBCF001 $210A3030 $208030 $FBB5F001 $40031 $F0010028 $3D02FBAF $D1ED2C00 $BCC0B003 $46B046B9 $BC01BCF0 $46C04700 $2022CA8 POIN Mod WORD $80D18FD $8003805 $4D23B570 $4892B $D51005DA $781E4B21 $681B4B21 $D1292B00 $202100 $F0014B1F $4B1FFB87 $300021 $FB82F001 $75B892B $4B18D519 $781D4E18 $2B006833 $2D00D11B $2100D111 $4B150020 $FB72F001 $22804B15 $237F6819 $438278C8 $43134003 $2070CB $F0014B11 $BC70FB65 $4700BC01 $F0014B0F $6FB5F $4B0DE7D0 $FB5AF001 $56833 $D0DC2B00 $F0014B0A $2800FB53 $E7EAD1D7 $2024CC0 $2003BFC POIN SkillSysInstalled @@ -1075,7 +1078,7 @@ POIN RandBitflags WORD $8088671 POIN GetStatScreenPage POIN PressSelectFE8Something -WORD $4647B5F8 $468046CE $16B580 $1A9F2401 $DC042A63 $22002363 $42BB0FFC $14D4154 $4B0D4444 $641964 $204699 $21020032 $44484B0A $FB22F001 $D0072F00 $44410029 $320049 $44490038 $FCFEF7F6 $46B9BCC0 $BCF846B0 $4700BC01 $2003D2C $8004B95 $68026843 $7CD27C5B $61B7E80 $16120612 $600161B $1600189B $47701818 $7C9B6843 $61B7F40 $161B0600 $18181600 $46C04770 $5CC0233A $46C04770 $46D6B5F0 $464F4646 $4B1FB5C0 $78180005 $F0014B1E $23FFFAE7 $11B6844 $4B1C18E6 $4B1C469A $4B1C4698 $E0054699 $2F007A67 $3410D112 $D02442B4 $2B008823 $7A23D021 $D1F642AB $28008860 $F001D0F0 $2800FAD2 $7A67D1EF $D0EC2F00 $14000438 $FAC7F001 $D0E62800 $2B006803 $464AD0E3 $421368C3 $38D1DF $46BABCE0 $46A846B1 $BC02BCF0 $27004708 $46C0E7F5 $202BCFE $80346B1 $8083DA9 $801829D $1000C $4B5F8 $210520A0 $1C04B17 $FA9CF001 $2C004A16 $2197D01E $4C152000 $FA95F001 $27062600 $292505 $4A122014 $FA8DF001 $20C50039 $F0014A10 $31FA88 $4A0F20C1 $FA83F001 $20C80029 $F0014A0D $BCF8FA7E $4700BC01 $20002100 $F0014C05 $2686FA76 $258B278C $46C0E7DF $8003B25 +WORD $4647B5F8 $468046CE $16B580 $1A9F2401 $DC042A63 $22002363 $42BB0FFC $14D4154 $4B0D4444 $641964 $204699 $21020032 $44484B0A $FB22F001 $D0072F00 $44410029 $320049 $44490038 $FCF2F7F6 $46B9BCC0 $BCF846B0 $4700BC01 $2003D2C $8004B95 $68026843 $7CD27C5B $61B7E80 $16120612 $600161B $1600189B $47701818 $7C9B6843 $61B7F40 $161B0600 $18181600 $46C04770 $5CC0233A $46C04770 $46D6B5F0 $464F4646 $4B1FB5C0 $78180005 $F0014B1E $23FFFAE7 $11B6844 $4B1C18E6 $4B1C469A $4B1C4698 $E0054699 $2F007A67 $3410D112 $D02442B4 $2B008823 $7A23D021 $D1F642AB $28008860 $F001D0F0 $2800FAD2 $7A67D1EF $D0EC2F00 $14000438 $FAC7F001 $D0E62800 $2B006803 $464AD0E3 $421368C3 $38D1DF $46BABCE0 $46A846B1 $BC02BCF0 $27004708 $46C0E7F5 $202BCFE $80346B1 $8083DA9 $801829D $1000C $4B5F8 $210520A0 $1C04B17 $FA9CF001 $2C004A16 $2197D01E $4C152000 $FA95F001 $27062600 $292505 $4A122014 $FA8DF001 $20C50039 $F0014A10 $31FA88 $4A0F20C1 $FA83F001 $20C80029 $F0014A0D $BCF8FA7E $4700BC01 $20002100 $F0014C05 $2686FA76 $258B278C $46C0E7DF $8003B25 POIN CURRENTOFFSET+5364 WORD $8003BB1 POIN CURRENTOFFSET+5388 @@ -1339,27 +1342,27 @@ POIN gCharacterDataFE17 WORD $924EA36E $4F67B784 $592D8092 $A7948E70 $5 $7 $9 $B $1 POIN CURRENTOFFSET-416 WORD $E $0 $3 -POIN CURRENTOFFSET-45027 +POIN CURRENTOFFSET-45051 WORD $0 $0 $1 POIN CURRENTOFFSET-476 WORD $E $0 $3 -POIN CURRENTOFFSET-45059 +POIN CURRENTOFFSET-45083 WORD $0 $0 $1 POIN CURRENTOFFSET-536 WORD $E $0 $3 -POIN CURRENTOFFSET-45091 +POIN CURRENTOFFSET-45115 WORD $0 $0 $1 POIN CURRENTOFFSET-596 WORD $E $0 $3 -POIN CURRENTOFFSET-45123 +POIN CURRENTOFFSET-45147 WORD $0 $0 $0 $1000000 $40302 $0 $2010100 $0 $2530 $253500 $30310000 $31000025 $2535 $253032 $25353200 $30330000 $33000025 $2535 $253034 $25353400 $30350000 $35000025 $2535 $253036 $25353600 $30370000 $37000025 $2535 $253038 $25353800 $30390000 $39000025 $2535 $25303031 $0 $696E6156 $616C6C $646E6152 $6D6F $696E6156 $616C6C $0 $52000000 $6F646E61 $6D $0 $25300000 $0 $0 $0 $30303100 $25 $0 $0 $253035 $0 $0 $0 $696E6156 $616C6C $0 $42000000 $64657361 $206E6F20 $64656573 $69460000 $646578 $0 $0 $0 $696E6156 $616C6C $61520000 $6D6F646E $0 $30 $0 $35310000 $0 $0 $3033 $0 $35340000 $0 $0 $3036 $0 $0 $696E6156 $616C6C $0 $0 $0 $0 $6E615200 $6D6F64 $0 $0 $0 $0 $61520000 $6D6F646E $756F6620 $6920646E $736D6574 $6C6E6F20 $52000079 $6F646E61 $7469206D $73206D65 $73746174 $6C6E6F20 $79 $73616C43 $636973 $61430000 $6C617573 $0 $696E6156 $20616C6C $4D4742 $0 $0 $61520000 $6D6F646E $4D474220 $0 $0 $0 $696E6156 $20616C6C $6F6C6F43 $737275 $0 $61520000 $6D6F646E $0 $0 $0 $0 $6B6E614A $79 $0 $0 $0 $6F500000 $61727472 $20737469 $796C6E6F $0 $0 $696E6156 $616C6C $0 $0 $0 $69666E49 $6574696E $73616220 $736369 $0 $69666E49 $6574696E $61657720 $736E6F70 $0 $69666E49 $6574696E $65746920 $736D $0 $696E6156 $616C6C $41000000 $7961776C $666F2073 $6C410066 $73796177 $6E6F20 $0 $696E6156 $616C6C $0 $0 $0 $0 $61684300 $20656772 $61776F74 $20736472 $756F79 $0 $72470000 $61756461 $20796C6C $72616863 $6567 $0 $0 $696E6156 $616C6C $0 $72500000 $20737365 $41 $0 $656E6F4E $0 $0 $6C410000 $6C $0 $0 $79616C50 $737265 $0 $6E450000 $65696D65 $73 $0 $696E6156 $616C6C $0 $0 $0 $0 $65745300 $6E616870 $202F206F $616B6F53 $6C6C6162 $61 $79480000 $67726570 $616D6D61 $63617073 $7365 $0 $50000000 $696D6B69 $202F206E $726E6546 $726965 $0 $0 $61736944 $64656C62 $0 $0 $0 $73657250 $20422073 $75206E6F $74696E $0 $66664F $0 $61450000 $7973 $0 $6D726F4E $6C61 $61480000 $6472 $0 $696E6156 $616C6C $61520000 $6D6F646E $0 $65786946 $64 $61520000 $6D6F646E $2620 $20001 $64000 $0 $1000000 $2020201 $3030303 $4040404 $3040404 $2020203 $1010101 $64656553 $0 $69726156 $65636E61 $0 $72616843 $65746361 $7372 $6D6F7246 $6D614720 $65 $65736142 $61745320 $7374 $776F7247 $736874 $6576654C $7370756C $0 $74617453 $666E4920 $6974616C $432F6E6F $737061 $73616C43 $73 $6D657449 $73 $65646F4D $0 $6973754D $63 $6F6C6F43 $737275 $6D657449 $65735520 $73 $79616C50 $42207265 $73756E6F $0 $79616C50 $47207265 $74776F72 $6F422068 $73756E $6D656E45 $69442079 $202E6666 $756E6F42 $73 $6D656E45 $72472079 $6874776F $6E6F4220 $7375 $676F46 $7265764F $65646972 $494120 $70696B53 $61686320 $72657470 $0 $6F6C6552 $75206461 $7374696E $0 $72657355 $746E4920 $61667265 $6563 $75626544 $72656767 $0 $656D6954 $69482064 $7374 $6C696B53 $736C $646E6152 $7A696D6F $7265 $0 $1 $A $64 $3E8 $2710 $186A0 $F4240 $A4 $10 $9C $10 $94 $10 $8C $10 $84 $10 $7C $10 $74 $10 $6C $10 $64 $10 $12 $18 $12 $28 $12 $38 $12 $48 $12 $58 $12 $68 $12 $78 $12 $88 $20D0615 $7070305 $4020204 $1F101F04 $2030310 $4020404 $4 $1006C $1F0014 $38002D $45003F $4B $0 $20202FF $20202FF $2020202 $2020403 $2040404 $2040404 $FFFF0402 $2FF0202 $2FF0202 $2040202 $2020202 $10402FF $FF04FF02 $4040402 $4040404 $FF020404 $FF $10101FF $10101FF $1020101 $2010402 $1040404 $1040404 $FFFF0401 $1FF0201 $1FF0101 $2040201 $1010202 $10401FF $FF04FF01 $4040401 $4040404 $FF010404 $FF $10101010 $10101010 $10101010 $10101010 $10101010 $10101010 $10 $4070503 $6050506 $3030303 $B070604 $6020B0A $5070707 $406 $8 $7 $696E6156 $616C6C $312B0000 $2530 $0 $2530322B $0 $332B0000 $2530 $0 $2530342B $0 $352B0000 $2530 $0 $2530362B $0 $372B0000 $2530 $0 $2530382B $0 $392B0000 $2530 $0 $3030312B $25 $312D0000 $2530 $0 $2530322D $0 $332D0000 $2530 $0 $2530342D $0 $352D0000 $2530 $0 $696E6156 $616C6C $0 $0 $0 $6820312B $65646469 $656C206E $6C6576 $0 $6820322B $65646469 $656C206E $736C6576 $0 $6820332B $65646469 $656C206E $736C6576 $0 $6820342B $65646469 $656C206E $736C6576 $0 $6820352B $65646469 $656C206E $736C6576 $0 $6820362B $65646469 $656C206E $736C6576 $0 $6820372B $65646469 $656C206E $736C6576 $0 $6820382B $65646469 $656C206E $736C6576 $0 $6820392B $65646469 $656C206E $736C6576 $0 $2030312B $64646968 $6C206E65 $6C657665 $73 $2031312B $64646968 $6C206E65 $6C657665 $73 $2032312B $64646968 $6C206E65 $6C657665 $73 $2033312B $64646968 $6C206E65 $6C657665 $73 $2034312B $64646968 $6C206E65 $6C657665 $73 $2035312B $64646968 $6C206E65 $6C657665 $73 $2036312B $64646968 $6C206E65 $6C657665 $73 $2037312B $64646968 $6C206E65 $6C657665 $73 $2038312B $64646968 $6C206E65 $6C657665 $73 $2039312B $64646968 $6C206E65 $6C657665 $73 $2030322B $64646968 $6C206E65 $6C657665 $73 $2030312D $64646968 $6C206E65 $6C657665 $73 $6820392D $65646469 $656C206E $736C6576 $0 $6820382D $65646469 $656C206E $736C6576 $0 $6820372D $65646469 $656C206E $736C6576 $0 $6820362D $65646469 $656C206E $736C6576 $0 $6820352D $65646469 $656C206E $736C6576 $0 $6820342D $65646469 $656C206E $736C6576 $0 $6820332D $65646469 $656C206E $736C6576 $0 $6820322D $65646469 $656C206E $736C6576 $0 $6820312D $65646469 $656C206E $6C6576 $0 $696E6156 $616C6C $312B0000 $2530 $0 $2530322B $0 $332B0000 $2530 $0 $2530342B $0 $352B0000 $2530 $0 $2530362B $0 $372B0000 $2530 $0 $2530382B $0 $392B0000 $2530 $0 $3030312B $25 $312D0000 $2530 $0 $2530322D $0 $332D0000 $2530 $0 $2530342D $0 $352D0000 $2530 $0 $696E6156 $616C6C $0 $0 $0 $6820312B $65646469 $656C206E $6C6576 $0 $6820322B $65646469 $656C206E $736C6576 $0 $6820332B $65646469 $656C206E $736C6576 $0 $6820342B $65646469 $656C206E $736C6576 $0 $6820352B $65646469 $656C206E $736C6576 $0 $6820362B $65646469 $656C206E $736C6576 $0 $6820372B $65646469 $656C206E $736C6576 $0 $6820382B $65646469 $656C206E $736C6576 $0 $6820392B $65646469 $656C206E $736C6576 $0 $2030312B $64646968 $6C206E65 $6C657665 $73 $2031312B $64646968 $6C206E65 $6C657665 $73 $2032312B $64646968 $6C206E65 $6C657665 $73 $2033312B $64646968 $6C206E65 $6C657665 $73 $2034312B $64646968 $6C206E65 $6C657665 $73 $2035312B $64646968 $6C206E65 $6C657665 $73 $2036312B $64646968 $6C206E65 $6C657665 $73 $2037312B $64646968 $6C206E65 $6C657665 $73 $2038312B $64646968 $6C206E65 $6C657665 $73 $2039312B $64646968 $6C206E65 $6C657665 $73 $2030322B $64646968 $6C206E65 $6C657665 $73 $2030312D $64646968 $6C206E65 $6C657665 $73 $6820392D $65646469 $656C206E $736C6576 $0 $6820382D $65646469 $656C206E $736C6576 $0 $6820372D $65646469 $656C206E $736C6576 $0 $6820362D $65646469 $656C206E $736C6576 $0 $6820352D $65646469 $656C206E $736C6576 $0 $6820342D $65646469 $656C206E $736C6576 $0 $6820332D $65646469 $656C206E $736C6576 $0 $6820322D $65646469 $656C206E $736C6576 $0 $6820312D $65646469 $656C206E $6C6576 $0 $696E6156 $616C6C $0 $0 $0 $0 $61520000 $6D6F646E $6E617620 $616C6C69 $616C6320 $73657373 $0 $646E6152 $66206D6F $7020726F $6579616C $7372 $0 $61520000 $6D6F646E $726F6620 $656E6520 $7365696D $0 $0 $646E6152 $77206D6F $20687469 $2077656E $73616C63 $736573 $654E0000 $61722077 $7020646E $6579616C $6C632072 $65737361 $73 $2077654E $646E6172 $656E6520 $6320796D $7373616C $7365 $0 $696E6156 $616C6C $0 $0 $0 $0 $0 $0 $2F314546 $53203A33 $6F646168 $72442077 $6E6F6761 $0 $0 $0 $3A344546 $6E654720 $6F6C6165 $482F7967 $20796C6F $726157 $0 $0 $3A354546 $72685420 $61696361 $36373720 $0 $0 $0 $0 $3A364546 $65685420 $6E694220 $676E6964 $616C4220 $6564 $0 $0 $3A374546 $65685420 $616C4220 $676E697A $616C4220 $6564 $0 $0 $2F394546 $30314546 $6152203A $6E616964 $61442074 $6E77 $0 $0 $33314546 $7741203A $6E656B61 $676E69 $0 $0 $0 $0 $34314546 $6146203A $736574 $0 $0 $0 $0 $0 $2F324546 $203A3531 $6F686345 $7365 $0 $0 $0 $0 $36314546 $6854203A $20656572 $73756F48 $7365 $0 $0 $0 $37314546 $6E45203A $65676167 $0 $0 $0 $0 $0 $646E6152 $6D6F $0 $0 $0 $0 $0 $0 $696E6156 $616C6C $0 $0 $0 $0 $0 $0 $79616C50 $20737265 $726F6572 $65726564 $64 $0 $0 $0 $73736F42 $72207365 $64726F65 $64657265 $0 $0 $0 $0 $79616C50 $20737265 $6F422026 $73657373 $6F657220 $72656472 $6465 $0 $79616C50 $20737265 $20646E61 $73736F42 $73207365 $706177 $0 $0 $646E6152 $6D6F $0 $0 $0 $0 $0 $0 $2 $8015361 $2 $8030185 $2 $8013D81 $3 $8014069 $E $0 $2 $8013DA5 $3 $8014069 $2 POIN CURRENTOFFSET-12339 WORD $2 -POIN CURRENTOFFSET-49435 +POIN CURRENTOFFSET-49459 WORD $3 POIN CURRENTOFFSET-15411 WORD $2 $8013D81 $3 $8014069 $2 POIN CURRENTOFFSET-17319 WORD $2 -POIN CURRENTOFFSET-49459 +POIN CURRENTOFFSET-49483 WORD $2 $8015371 $2 $80301B9 $2 $804EF21 $E $0 $0 $0 $63 $C diff --git a/Patches/FE8.o b/Patches/FE8.o index 9b6fe9ba..84eac9cb 100644 Binary files a/Patches/FE8.o and b/Patches/FE8.o differ diff --git a/Patches/FE8.s b/Patches/FE8.s index 19d8b7e0..adf12003 100644 --- a/Patches/FE8.s +++ b/Patches/FE8.s @@ -45,16 +45,16 @@ EnableBG0Display: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:6555: gLCDControlBuffer.dispcnt.bg0_on = 1; +@ Patches/../C_code.c:6560: gLCDControlBuffer.dispcnt.bg0_on = 1; movs r1, #1 @ tmp119, -@ Patches/../C_code.c:6556: } +@ Patches/../C_code.c:6561: } @ sp needed @ -@ Patches/../C_code.c:6555: gLCDControlBuffer.dispcnt.bg0_on = 1; +@ Patches/../C_code.c:6560: gLCDControlBuffer.dispcnt.bg0_on = 1; ldr r2, .L4 @ tmp114, ldrb r3, [r2, #1] @ gLCDControlBuffer.dispcnt.bg0_on, gLCDControlBuffer.dispcnt.bg0_on orrs r3, r1 @ tmp121, tmp119 strb r3, [r2, #1] @ tmp121, gLCDControlBuffer.dispcnt.bg0_on -@ Patches/../C_code.c:6556: } +@ Patches/../C_code.c:6561: } bx lr .L5: .align 2 @@ -72,25 +72,25 @@ RestoreBackgrounds: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:6536: if (proc->calledFromChapter) +@ Patches/../C_code.c:6541: if (proc->calledFromChapter) movs r3, #53 @ tmp116, -@ Patches/../C_code.c:6535: { +@ Patches/../C_code.c:6540: { push {r4, lr} @ -@ Patches/../C_code.c:6536: if (proc->calledFromChapter) +@ Patches/../C_code.c:6541: if (proc->calledFromChapter) ldrb r3, [r0, r3] @ tmp117, cmp r3, #0 @ tmp117, bne .L11 @, .L6: -@ Patches/../C_code.c:6549: } +@ Patches/../C_code.c:6554: } @ sp needed @ pop {r4} pop {r0} bx r0 .L11: -@ Patches/../C_code.c:6538: RefreshBMapGraphics(); +@ Patches/../C_code.c:6543: RefreshBMapGraphics(); ldr r3, .L12 @ tmp118, bl .L14 @ -@ Patches/../C_code.c:6549: } +@ Patches/../C_code.c:6554: } b .L6 @ .L13: .align 2 @@ -107,39 +107,39 @@ GetUnitListToUse.part.0: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:658: if ((RecruitValues->recruitment == 5)) +@ Patches/../C_code.c:663: if ((RecruitValues->recruitment == 5)) ldr r3, .L36 @ tmp134, ldr r2, [r3] @ pretmp_48, RecruitValues -@ Patches/../C_code.c:658: if ((RecruitValues->recruitment == 5)) +@ Patches/../C_code.c:663: if ((RecruitValues->recruitment == 5)) movs r3, #7 @ tmp140, -@ Patches/../C_code.c:710: int GetUnitListToUse(const struct CharacterData * table, int boss, int excludeNoSupports) +@ Patches/../C_code.c:715: int GetUnitListToUse(const struct CharacterData * table, int boss, int excludeNoSupports) push {r4, lr} @ -@ Patches/../C_code.c:658: if ((RecruitValues->recruitment == 5)) +@ Patches/../C_code.c:663: if ((RecruitValues->recruitment == 5)) ldrb r4, [r2] @ MEM[(struct RecruitmentValues *)pretmp_48], MEM[(struct RecruitmentValues *)pretmp_48] ands r3, r4 @ _50, MEM[(struct RecruitmentValues *)pretmp_48] -@ Patches/../C_code.c:736: if (boss && (MustCharacterBecomeBoss(table))) +@ Patches/../C_code.c:741: if (boss && (MustCharacterBecomeBoss(table))) cmp r1, #0 @ tmp196, beq .L16 @, -@ Patches/../C_code.c:665: if (boss) +@ Patches/../C_code.c:670: if (boss) ldr r1, [r0, #40] @ table_2(D)->attributes, table_2(D)->attributes lsls r1, r1, #16 @ tmp197, table_2(D)->attributes, bpl .L16 @, cmp r3, #5 @ _50, bne .L17 @, .L16: -@ Patches/../C_code.c:742: if (RecruitValues->recruitment == 2) +@ Patches/../C_code.c:747: if (RecruitValues->recruitment == 2) cmp r3, #2 @ _50, beq .L27 @, -@ Patches/../C_code.c:754: if (RecruitValues->recruitment < 4) +@ Patches/../C_code.c:759: if (RecruitValues->recruitment < 4) ldrb r3, [r2] @ *pretmp_48, *pretmp_48 lsls r3, r3, #29 @ tmp162, *pretmp_48, -@ Patches/../C_code.c:754: if (RecruitValues->recruitment < 4) +@ Patches/../C_code.c:759: if (RecruitValues->recruitment < 4) lsrs r3, r3, #29 @ tmp165, tmp162, cmp r3, #3 @ tmp165, bhi .L21 @, -@ Patches/../C_code.c:763: if (table->number == 0x65) // Idunn, also 0x66 +@ Patches/../C_code.c:768: if (table->number == 0x65) // Idunn, also 0x66 ldrb r1, [r0, #4] @ _17, -@ Patches/../C_code.c:773: if (table->number == 0x54) // Pablo fe8 +@ Patches/../C_code.c:778: if (table->number == 0x54) // Pablo fe8 movs r3, r1 @ tmp167, _17 subs r3, r3, #84 @ tmp167, lsls r3, r3, #24 @ tmp168, tmp167, @@ -155,20 +155,20 @@ GetUnitListToUse.part.0: movs r3, #1 @ tmp182, eors r2, r3 @ _30, tmp182 .L23: -@ Patches/../C_code.c:786: if (table->number > 0xA6) // playables are below 0xA6 unit ID +@ Patches/../C_code.c:791: if (table->number > 0xA6) // playables are below 0xA6 unit ID cmp r1, #166 @ _17, bhi .L27 @, cmp r2, #0 @ _30, beq .L21 @, .L27: -@ Patches/../C_code.c:719: return result; +@ Patches/../C_code.c:724: return result; movs r0, #0 @ , b .L15 @ .L21: -@ Patches/../C_code.c:794: result = 1; +@ Patches/../C_code.c:799: result = 1; movs r0, #1 @ , .L15: -@ Patches/../C_code.c:798: } +@ Patches/../C_code.c:803: } @ sp needed @ pop {r4} pop {r1} @@ -196,58 +196,58 @@ ShiftDataInBuffer.part.0: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:7079: int length = usedBufferLength[0]; +@ Patches/../C_code.c:7084: int length = usedBufferLength[0]; ldr r5, [r3] @ length, *usedBufferLength_1(D) -@ Patches/../C_code.c:7082: if (amount < 0) +@ Patches/../C_code.c:7087: if (amount < 0) cmp r1, #0 @ amount, blt .L39 @, -@ Patches/../C_code.c:7092: for (i = length; i >= offset; --i) +@ Patches/../C_code.c:7097: for (i = length; i >= offset; --i) cmp r5, r2 @ length, offset blt .L44 @, subs r2, r2, #1 @ tmp145, - adds r4, r0, r5 @ ivtmp.726, buffer, length + adds r4, r0, r5 @ ivtmp.728, buffer, length adds r0, r0, r2 @ _61, buffer, tmp145 .L45: -@ Patches/../C_code.c:7094: buffer[i + amount] = buffer[i]; +@ Patches/../C_code.c:7099: buffer[i + amount] = buffer[i]; ldrb r2, [r4] @ _20, MEM[(char *)_55] -@ Patches/../C_code.c:7094: buffer[i + amount] = buffer[i]; +@ Patches/../C_code.c:7099: buffer[i + amount] = buffer[i]; strb r2, [r4, r1] @ _20, MEM[(char *)_55 + _57 * 1] -@ Patches/../C_code.c:7092: for (i = length; i >= offset; --i) - subs r4, r4, #1 @ ivtmp.726, - cmp r4, r0 @ ivtmp.726, _61 +@ Patches/../C_code.c:7097: for (i = length; i >= offset; --i) + subs r4, r4, #1 @ ivtmp.728, + cmp r4, r0 @ ivtmp.728, _61 bne .L45 @, .L44: -@ Patches/../C_code.c:7098: } +@ Patches/../C_code.c:7103: } @ sp needed @ -@ Patches/../C_code.c:7097: usedBufferLength[0] = length + amount; +@ Patches/../C_code.c:7102: usedBufferLength[0] = length + amount; adds r1, r5, r1 @ tmp147, length, amount -@ Patches/../C_code.c:7097: usedBufferLength[0] = length + amount; +@ Patches/../C_code.c:7102: usedBufferLength[0] = length + amount; str r1, [r3] @ tmp147, *usedBufferLength_1(D) -@ Patches/../C_code.c:7098: } +@ Patches/../C_code.c:7103: } pop {r4, r5, r6} pop {r0} bx r0 .L39: -@ Patches/../C_code.c:7084: amount = ABS(amount); +@ Patches/../C_code.c:7089: amount = ABS(amount); rsbs r6, r1, #0 @ amount, amount -@ Patches/../C_code.c:7085: for (i = offset; i < length; ++i) +@ Patches/../C_code.c:7090: for (i = offset; i < length; ++i) cmp r5, r2 @ length, offset ble .L42 @, subs r2, r2, r1 @ tmp142, offset, amount - adds r2, r0, r2 @ ivtmp.719, buffer, tmp142 + adds r2, r0, r2 @ ivtmp.721, buffer, tmp142 subs r0, r0, r1 @ tmp143, buffer, amount adds r0, r0, r5 @ _49, tmp143, length .L43: -@ Patches/../C_code.c:7087: buffer[i] = buffer[i + amount]; +@ Patches/../C_code.c:7092: buffer[i] = buffer[i + amount]; ldrb r4, [r2] @ _12, MEM[(char *)_34] -@ Patches/../C_code.c:7087: buffer[i] = buffer[i + amount]; +@ Patches/../C_code.c:7092: buffer[i] = buffer[i + amount]; strb r4, [r2, r1] @ _12, MEM[(char *)_34 + _5 * 1] -@ Patches/../C_code.c:7085: for (i = offset; i < length; ++i) - adds r2, r2, #1 @ ivtmp.719, - cmp r2, r0 @ ivtmp.719, _49 +@ Patches/../C_code.c:7090: for (i = offset; i < length; ++i) + adds r2, r2, #1 @ ivtmp.721, + cmp r2, r0 @ ivtmp.721, _49 bne .L43 @, .L42: -@ Patches/../C_code.c:7084: amount = ABS(amount); +@ Patches/../C_code.c:7089: amount = ABS(amount); movs r1, r6 @ amount, amount b .L44 @ .size ShiftDataInBuffer.part.0, .-ShiftDataInBuffer.part.0 @@ -268,31 +268,31 @@ NewPutNumberBonus.part.0: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ movs r5, r0 @ number, tmp177 -@ Patches/../C_code.c:9048: if ((base < 100) && (number < 100)) +@ Patches/../C_code.c:9053: if ((base < 100) && (number < 100)) movs r4, #99 @ tmp141, movs r7, #0 @ tmp143, -@ Patches/../C_code.c:9045: int absNum = ABS(number); +@ Patches/../C_code.c:9050: int absNum = ABS(number); asrs r3, r0, #31 @ tmp185, number, adds r0, r0, r3 @ absNum, number, tmp185 -@ Patches/../C_code.c:9038: void NewPutNumberBonus(int number, u16 * tm, int base) +@ Patches/../C_code.c:9043: void NewPutNumberBonus(int number, u16 * tm, int base) movs r6, r1 @ tm, tmp178 -@ Patches/../C_code.c:9045: int absNum = ABS(number); +@ Patches/../C_code.c:9050: int absNum = ABS(number); eors r0, r3 @ absNum, tmp185 -@ Patches/../C_code.c:9048: if ((base < 100) && (number < 100)) +@ Patches/../C_code.c:9053: if ((base < 100) && (number < 100)) lsrs r1, r2, #31 @ tmp142, base, -@ Patches/../C_code.c:9048: if ((base < 100) && (number < 100)) +@ Patches/../C_code.c:9053: if ((base < 100) && (number < 100)) lsrs r3, r5, #31 @ tmp147, number, -@ Patches/../C_code.c:9048: if ((base < 100) && (number < 100)) +@ Patches/../C_code.c:9053: if ((base < 100) && (number < 100)) cmp r4, r2 @ tmp141, base adcs r1, r1, r7 @ tmp140, tmp142, tmp143 -@ Patches/../C_code.c:9048: if ((base < 100) && (number < 100)) +@ Patches/../C_code.c:9053: if ((base < 100) && (number < 100)) cmp r4, r5 @ tmp141, number adcs r3, r3, r7 @ tmp145, tmp147, tmp143 -@ Patches/../C_code.c:9038: void NewPutNumberBonus(int number, u16 * tm, int base) +@ Patches/../C_code.c:9043: void NewPutNumberBonus(int number, u16 * tm, int base) sub sp, sp, #12 @,, -@ Patches/../C_code.c:9048: if ((base < 100) && (number < 100)) +@ Patches/../C_code.c:9053: if ((base < 100) && (number < 100)) ands r3, r1 @ tmp149, tmp140 -@ Patches/../C_code.c:9052: if (base >= 100) +@ Patches/../C_code.c:9057: if (base >= 100) movs r1, #1 @ tmp151, cmp r2, #99 @ base, bgt .L49 @, @@ -302,36 +302,36 @@ NewPutNumberBonus.part.0: lsls r3, r3, #24 @ tmp157, tmp156, lsrs r4, r3, #24 @ _35, tmp157, adds r1, r4, #1 @ _39, _35, -@ Patches/../C_code.c:9057: if (absNum >= 10) +@ Patches/../C_code.c:9062: if (absNum >= 10) cmp r0, #9 @ absNum, ble .L50 @, -@ Patches/../C_code.c:9061: if (absNum >= 100) +@ Patches/../C_code.c:9066: if (absNum >= 100) cmp r0, #99 @ absNum, ble .L58 @, -@ Patches/../C_code.c:9063: specCharPos = 3 + offset; +@ Patches/../C_code.c:9068: specCharPos = 3 + offset; adds r4, r4, #4 @ specCharPos, -@ Patches/../C_code.c:9064: if (base >= 100) +@ Patches/../C_code.c:9069: if (base >= 100) cmp r2, #99 @ base, ble .L52 @, -@ Patches/../C_code.c:9067: if (number > 0) +@ Patches/../C_code.c:9072: if (number > 0) cmp r5, #0 @ number, ble .L59 @, -@ Patches/../C_code.c:9066: specCharPos--; +@ Patches/../C_code.c:9071: specCharPos--; movs r4, #4 @ specCharPos, -@ Patches/../C_code.c:9069: number = 99; +@ Patches/../C_code.c:9074: number = 99; movs r5, #99 @ number, .L54: -@ Patches/../C_code.c:9080: PutSpecialChar(tm + offset, green, 0x15); // + +@ Patches/../C_code.c:9085: PutSpecialChar(tm + offset, green, 0x15); // + lsls r1, r1, #1 @ tmp158, _39, -@ Patches/../C_code.c:9080: PutSpecialChar(tm + offset, green, 0x15); // + +@ Patches/../C_code.c:9085: PutSpecialChar(tm + offset, green, 0x15); // + adds r0, r6, r1 @ tmp159, tm, tmp158 movs r2, #21 @, movs r1, #4 @, ldr r3, .L60 @ tmp160, bl .L14 @ -@ Patches/../C_code.c:9081: PutNumberSmall(tm + specCharPos, green, number); +@ Patches/../C_code.c:9086: PutNumberSmall(tm + specCharPos, green, number); lsls r0, r4, #1 @ tmp161, specCharPos, -@ Patches/../C_code.c:9081: PutNumberSmall(tm + specCharPos, green, number); +@ Patches/../C_code.c:9086: PutNumberSmall(tm + specCharPos, green, number); movs r2, r5 @, number movs r1, #4 @, ldr r3, .L60+4 @ tmp163, @@ -339,22 +339,22 @@ NewPutNumberBonus.part.0: bl .L14 @ b .L48 @ .L50: -@ Patches/../C_code.c:9056: int specCharPos = 1 + offset; +@ Patches/../C_code.c:9061: int specCharPos = 1 + offset; adds r4, r4, #2 @ specCharPos, .L52: -@ Patches/../C_code.c:9078: if (number > 0) +@ Patches/../C_code.c:9083: if (number > 0) cmp r5, #0 @ number, bgt .L54 @, -@ Patches/../C_code.c:9085: number = ~number + 1; // neg +@ Patches/../C_code.c:9090: number = ~number + 1; // neg rsbs r5, r5, #0 @ _47, number .L55: -@ Patches/../C_code.c:9088: PutDrawText(0, tm + offset, gold, specCharPos, 1, "-"); +@ Patches/../C_code.c:9093: PutDrawText(0, tm + offset, gold, specCharPos, 1, "-"); ldr r3, .L60+8 @ tmp166, str r3, [sp, #4] @ tmp166, movs r3, #1 @ tmp167, -@ Patches/../C_code.c:9088: PutDrawText(0, tm + offset, gold, specCharPos, 1, "-"); +@ Patches/../C_code.c:9093: PutDrawText(0, tm + offset, gold, specCharPos, 1, "-"); lsls r1, r1, #1 @ tmp164, _39, -@ Patches/../C_code.c:9088: PutDrawText(0, tm + offset, gold, specCharPos, 1, "-"); +@ Patches/../C_code.c:9093: PutDrawText(0, tm + offset, gold, specCharPos, 1, "-"); movs r2, #3 @, movs r0, #0 @, str r3, [sp] @ tmp167, @@ -362,28 +362,28 @@ NewPutNumberBonus.part.0: movs r3, r4 @, specCharPos ldr r7, .L60+12 @ tmp168, bl .L62 @ -@ Patches/../C_code.c:9094: PutNumberSmall(tm + specCharPos, gold, number); +@ Patches/../C_code.c:9099: PutNumberSmall(tm + specCharPos, gold, number); lsls r0, r4, #1 @ tmp169, specCharPos, -@ Patches/../C_code.c:9094: PutNumberSmall(tm + specCharPos, gold, number); +@ Patches/../C_code.c:9099: PutNumberSmall(tm + specCharPos, gold, number); movs r2, r5 @, _47 movs r1, #3 @, ldr r3, .L60+4 @ tmp171, adds r0, r6, r0 @ tmp170, tm, tmp169 bl .L14 @ .L48: -@ Patches/../C_code.c:9096: } +@ Patches/../C_code.c:9101: } add sp, sp, #12 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r0} bx r0 .L58: -@ Patches/../C_code.c:9059: specCharPos = 2 + offset; +@ Patches/../C_code.c:9064: specCharPos = 2 + offset; adds r4, r4, #3 @ specCharPos, b .L52 @ .L59: movs r5, #99 @ _47, -@ Patches/../C_code.c:9066: specCharPos--; +@ Patches/../C_code.c:9071: specCharPos--; movs r4, #4 @ specCharPos, b .L55 @ .L61: @@ -564,6 +564,37 @@ HashByte_Simple: .size HashByte_Simple, .-HashByte_Simple .align 1 .p2align 2,,3 + .global EnableRandSkills + .syntax unified + .code 16 + .thumb_func + .type EnableRandSkills, %function +EnableRandSkills: + @ Function supports interworking. + @ args = 0, pretend = 0, frame = 0 + @ frame_needed = 0, uses_anonymous_args = 0 + @ link register save eliminated. +@ Patches/../C_code.c:222: RandValues->skills = 1; + ldr r3, .L85 @ tmp116, +@ Patches/../C_code.c:223: } + @ sp needed @ +@ Patches/../C_code.c:222: RandValues->skills = 1; + ldr r2, [r3] @ RandValues, RandValues + movs r3, #63 @ tmp124, + ldrb r1, [r2, #3] @ RandValues.1_1->skills, RandValues.1_1->skills + ands r3, r1 @ tmp123, RandValues.1_1->skills + movs r1, #64 @ tmp126, + orrs r3, r1 @ tmp128, tmp126 + strb r3, [r2, #3] @ tmp128, RandValues.1_1->skills +@ Patches/../C_code.c:223: } + bx lr +.L86: + .align 2 +.L85: + .word RandValues + .size EnableRandSkills, .-EnableRandSkills + .align 1 + .p2align 2,,3 .global GetAlwaysSkill .syntax unified .code 16 @@ -574,43 +605,43 @@ GetAlwaysSkill: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:257: if (UNIT_FACTION(unit) == FACTION_RED) +@ Patches/../C_code.c:262: if (UNIT_FACTION(unit) == FACTION_RED) movs r2, #11 @ tmp124, movs r3, #192 @ tmp125, ldrsb r2, [r0, r2] @ tmp124, ands r3, r2 @ tmp126, tmp124 -@ Patches/../C_code.c:257: if (UNIT_FACTION(unit) == FACTION_RED) +@ Patches/../C_code.c:262: if (UNIT_FACTION(unit) == FACTION_RED) cmp r3, #128 @ tmp126, - beq .L86 @, -@ Patches/../C_code.c:261: if (RandValues->skills != 3) + beq .L89 @, +@ Patches/../C_code.c:266: if (RandValues->skills != 3) movs r2, #63 @ tmp132, -@ Patches/../C_code.c:261: if (RandValues->skills != 3) - ldr r3, .L89 @ tmp128, +@ Patches/../C_code.c:266: if (RandValues->skills != 3) + ldr r3, .L92 @ tmp128, ldr r3, [r3] @ RandValues, RandValues - ldrb r3, [r3, #3] @ *RandValues.4_4, *RandValues.4_4 -@ Patches/../C_code.c:259: return 0; + ldrb r3, [r3, #3] @ *RandValues.5_4, *RandValues.5_4 +@ Patches/../C_code.c:264: return 0; movs r0, #0 @ , -@ Patches/../C_code.c:261: if (RandValues->skills != 3) +@ Patches/../C_code.c:266: if (RandValues->skills != 3) bics r3, r2 @ tmp133, tmp132 cmp r3, #192 @ tmp133, - beq .L88 @, -.L84: -@ Patches/../C_code.c:266: } + beq .L91 @, +.L87: +@ Patches/../C_code.c:271: } @ sp needed @ bx lr -.L88: -@ Patches/../C_code.c:265: return *AlwaysSkill; - ldr r3, .L89+4 @ tmp136, +.L91: +@ Patches/../C_code.c:270: return *AlwaysSkill; + ldr r3, .L92+4 @ tmp136, ldr r3, [r3] @ AlwaysSkill, AlwaysSkill - ldrb r0, [r3] @ , *AlwaysSkill.5_7 - b .L84 @ -.L86: -@ Patches/../C_code.c:259: return 0; + ldrb r0, [r3] @ , *AlwaysSkill.6_7 + b .L87 @ +.L89: +@ Patches/../C_code.c:264: return 0; movs r0, #0 @ , - b .L84 @ -.L90: + b .L87 @ +.L93: .align 2 -.L89: +.L92: .word RandValues .word AlwaysSkill .size GetAlwaysSkill, .-GetAlwaysSkill @@ -626,58 +657,58 @@ GetNextAlwaysSkill: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - ldr r3, .L102 @ tmp121, - ldr r2, [r3] @ NumberOfSkills.6_10, NumberOfSkills -@ Patches/../C_code.c:271: id++; +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + ldr r3, .L105 @ tmp121, + ldr r2, [r3] @ NumberOfSkills.7_10, NumberOfSkills +@ Patches/../C_code.c:276: id++; adds r0, r0, #1 @ , -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - cmp r0, r2 @ , NumberOfSkills.6_10 - bge .L92 @, - ldr r1, .L102+4 @ tmp129, - b .L94 @ -.L99: -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + cmp r0, r2 @ , NumberOfSkills.7_10 + bge .L95 @, + ldr r1, .L105+4 @ tmp129, + b .L97 @ +.L102: +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) adds r0, r0, #1 @ , -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - cmp r2, r0 @ NumberOfSkills.6_10, - beq .L92 @, -.L94: -@ Patches/../C_code.c:274: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + cmp r2, r0 @ NumberOfSkills.7_10, + beq .L95 @, +.L97: +@ Patches/../C_code.c:279: if (AlwaysSkillTable[i]) ldrb r3, [r1, r0] @ MEM[(unsigned char *)&AlwaysSkillTable + _5 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _5 * 1] cmp r3, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _5 * 1], - beq .L99 @, -.L91: -@ Patches/../C_code.c:287: } + beq .L102 @, +.L94: +@ Patches/../C_code.c:292: } @ sp needed @ bx lr -.L92: -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) +.L95: +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) movs r0, #0 @ , -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) - cmp r2, #0 @ NumberOfSkills.6_10, - ble .L91 @, - ldr r1, .L102+4 @ tmp129, - b .L95 @ -.L101: -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) + cmp r2, #0 @ NumberOfSkills.7_10, + ble .L94 @, + ldr r1, .L105+4 @ tmp129, + b .L98 @ +.L104: +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) adds r0, r0, #1 @ , -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) - cmp r2, r0 @ NumberOfSkills.6_10, - beq .L100 @, -.L95: -@ Patches/../C_code.c:281: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) + cmp r2, r0 @ NumberOfSkills.7_10, + beq .L103 @, +.L98: +@ Patches/../C_code.c:286: if (AlwaysSkillTable[i]) ldrb r3, [r1, r0] @ MEM[(unsigned char *)&AlwaysSkillTable + _6 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _6 * 1] cmp r3, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _6 * 1], - beq .L101 @, - b .L91 @ -.L100: -@ Patches/../C_code.c:286: return 0; - movs r0, #0 @ , - b .L91 @ + beq .L104 @, + b .L94 @ .L103: +@ Patches/../C_code.c:291: return 0; + movs r0, #0 @ , + b .L94 @ +.L106: .align 2 -.L102: +.L105: .word NumberOfSkills .word AlwaysSkillTable .size GetNextAlwaysSkill, .-GetNextAlwaysSkill @@ -693,56 +724,56 @@ GetPreviousAlwaysSkill: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:290: id--; +@ Patches/../C_code.c:295: id--; subs r0, r0, #1 @ , -@ Patches/../C_code.c:291: for (int i = id; i > 0; --i) +@ Patches/../C_code.c:296: for (int i = id; i > 0; --i) cmp r0, #0 @ , - ble .L105 @, - ldr r2, .L114 @ tmp128, - b .L107 @ -.L112: -@ Patches/../C_code.c:291: for (int i = id; i > 0; --i) + ble .L108 @, + ldr r2, .L117 @ tmp128, + b .L110 @ +.L115: +@ Patches/../C_code.c:296: for (int i = id; i > 0; --i) subs r0, r0, #1 @ , -@ Patches/../C_code.c:291: for (int i = id; i > 0; --i) +@ Patches/../C_code.c:296: for (int i = id; i > 0; --i) cmp r0, #0 @ , - beq .L105 @, -.L107: -@ Patches/../C_code.c:293: if (AlwaysSkillTable[i]) + beq .L108 @, +.L110: +@ Patches/../C_code.c:298: if (AlwaysSkillTable[i]) ldrb r3, [r2, r0] @ MEM[(unsigned char *)&AlwaysSkillTable + _15 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _15 * 1] cmp r3, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _15 * 1], - beq .L112 @, -.L104: -@ Patches/../C_code.c:306: } + beq .L115 @, +.L107: +@ Patches/../C_code.c:311: } @ sp needed @ bx lr -.L105: -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) - ldr r3, .L114+4 @ tmp123, +.L108: +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) + ldr r3, .L117+4 @ tmp123, ldr r0, [r3] @ , NumberOfSkills -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) cmp r0, #0 @ , - ble .L109 @, - ldr r2, .L114 @ tmp128, - b .L108 @ -.L113: -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) + ble .L112 @, + ldr r2, .L117 @ tmp128, + b .L111 @ +.L116: +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) subs r0, r0, #1 @ , -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) cmp r0, #0 @ , - beq .L104 @, -.L108: -@ Patches/../C_code.c:300: if (AlwaysSkillTable[i]) + beq .L107 @, +.L111: +@ Patches/../C_code.c:305: if (AlwaysSkillTable[i]) ldrb r3, [r2, r0] @ MEM[(unsigned char *)&AlwaysSkillTable + _2 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _2 * 1] cmp r3, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _2 * 1], - beq .L113 @, - b .L104 @ -.L109: -@ Patches/../C_code.c:305: return 0; + beq .L116 @, + b .L107 @ +.L112: +@ Patches/../C_code.c:310: return 0; movs r0, #0 @ , - b .L104 @ -.L115: + b .L107 @ +.L118: .align 2 -.L114: +.L117: .word AlwaysSkillTable .word NumberOfSkills .size GetPreviousAlwaysSkill, .-GetPreviousAlwaysSkill @@ -758,26 +789,26 @@ ShouldRandomizeUsedCharTable: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:391: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); +@ Patches/../C_code.c:396: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); movs r2, #12 @ tmp132, -@ Patches/../C_code.c:392: } +@ Patches/../C_code.c:397: } @ sp needed @ -@ Patches/../C_code.c:391: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); +@ Patches/../C_code.c:396: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); movs r0, #0 @ tmp133, -@ Patches/../C_code.c:391: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); - ldr r3, .L117 @ tmp120, +@ Patches/../C_code.c:396: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); + ldr r3, .L120 @ tmp120, ldr r3, [r3] @ GrowthValues, GrowthValues - ldrb r3, [r3, #1] @ *GrowthValues.8_1, *GrowthValues.8_1 - lsls r3, r3, #27 @ tmp125, *GrowthValues.8_1, -@ Patches/../C_code.c:391: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); + ldrb r3, [r3, #1] @ *GrowthValues.9_1, *GrowthValues.9_1 + lsls r3, r3, #27 @ tmp125, *GrowthValues.9_1, +@ Patches/../C_code.c:396: return (GrowthValues->ForcedCharTable <= NumberOfCharTables); lsrs r3, r3, #27 @ tmp129, tmp125, cmp r2, r3 @ tmp132, tmp129 adcs r0, r0, r0 @ tmp131, tmp133, tmp133 -@ Patches/../C_code.c:392: } +@ Patches/../C_code.c:397: } bx lr -.L118: +.L121: .align 2 -.L117: +.L120: .word GrowthValues .size ShouldRandomizeUsedCharTable, .-ShouldRandomizeUsedCharTable .align 1 @@ -792,20 +823,20 @@ GetForcedCharTable: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:396: return GrowthValues->ForcedCharTable; - ldr r3, .L120 @ tmp119, -@ Patches/../C_code.c:397: } +@ Patches/../C_code.c:401: return GrowthValues->ForcedCharTable; + ldr r3, .L123 @ tmp119, +@ Patches/../C_code.c:402: } @ sp needed @ -@ Patches/../C_code.c:396: return GrowthValues->ForcedCharTable; +@ Patches/../C_code.c:401: return GrowthValues->ForcedCharTable; ldr r3, [r3] @ GrowthValues, GrowthValues - ldrb r0, [r3, #1] @ *GrowthValues.9_1, *GrowthValues.9_1 - lsls r0, r0, #27 @ tmp124, *GrowthValues.9_1, + ldrb r0, [r3, #1] @ *GrowthValues.10_1, *GrowthValues.10_1 + lsls r0, r0, #27 @ tmp124, *GrowthValues.10_1, lsrs r0, r0, #27 @ tmp117, tmp124, -@ Patches/../C_code.c:397: } +@ Patches/../C_code.c:402: } bx lr -.L121: +.L124: .align 2 -.L120: +.L123: .word GrowthValues .size GetForcedCharTable, .-GetForcedCharTable .align 1 @@ -820,47 +851,47 @@ NewGetCharacterData: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:423: if (charId < 1) +@ Patches/../C_code.c:428: if (charId < 1) cmp r0, #0 @ charId, - ble .L125 @, -@ Patches/../C_code.c:426: if (!tableID) + ble .L128 @, +@ Patches/../C_code.c:431: if (!tableID) cmp r1, #0 @ tableID, - beq .L127 @, -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) + beq .L130 @, +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) movs r3, #52 @ tmp125, muls r3, r0 @ tmp126, charId -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) - ldr r2, .L128 @ tmp123, +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) + ldr r2, .L131 @ tmp123, lsls r1, r1, #2 @ tmp124, tableID, -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldr r0, [r1, r2] @ cData[tableID_6(D)], cData[tableID_6(D)] subs r3, r3, #52 @ tmp127, adds r0, r0, r3 @ , cData[tableID_6(D)], tmp127 -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldrb r3, [r0, #4] @ tmp129, -@ Patches/../C_code.c:424: return NULL; +@ Patches/../C_code.c:429: return NULL; subs r2, r3, #1 @ tmp133, tmp129 sbcs r3, r3, r2 @ tmp132, tmp129, tmp133 rsbs r3, r3, #0 @ tmp134, tmp132 ands r0, r3 @ , tmp134 -.L122: -@ Patches/../C_code.c:457: } +.L125: +@ Patches/../C_code.c:462: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L127: -@ Patches/../C_code.c:431: return GetCharacterData(charId); - ldr r3, .L128+4 @ tmp122, +.L130: +@ Patches/../C_code.c:436: return GetCharacterData(charId); + ldr r3, .L131+4 @ tmp122, bl .L14 @ - b .L122 @ -.L125: -@ Patches/../C_code.c:424: return NULL; + b .L125 @ +.L128: +@ Patches/../C_code.c:429: return NULL; movs r0, #0 @ , - b .L122 @ -.L129: + b .L125 @ +.L132: .align 2 -.L128: +.L131: .word .LANCHOR0 .word GetCharacterData .size NewGetCharacterData, .-NewGetCharacterData @@ -876,60 +907,60 @@ GetUnitIdOfPortrait: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:461: { +@ Patches/../C_code.c:466: { movs r5, r0 @ portraitID, tmp129 -@ Patches/../C_code.c:462: if (portraitID < 0x100) // vanilla closed eyes etc portraits to replace +@ Patches/../C_code.c:467: if (portraitID < 0x100) // vanilla closed eyes etc portraits to replace cmp r0, #255 @ portraitID, - bgt .L131 @, -@ Patches/../C_code.c:464: if (ReplacePortraitTable[portraitID]) - ldr r3, .L141 @ tmp122, + bgt .L134 @, +@ Patches/../C_code.c:469: if (ReplacePortraitTable[portraitID]) + ldr r3, .L144 @ tmp122, ldrb r3, [r3, r0] @ _1, ReplacePortraitTable -@ Patches/../C_code.c:464: if (ReplacePortraitTable[portraitID]) +@ Patches/../C_code.c:469: if (ReplacePortraitTable[portraitID]) cmp r3, #0 @ _1, - bne .L139 @, -.L131: -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + bne .L142 @, +.L134: +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r7, #128 @ tmp128, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r4, #1 @ i, - ldr r6, .L141+4 @ tmp127, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + ldr r6, .L144+4 @ tmp127, +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) lsls r7, r7, #1 @ tmp128, tmp128, - b .L134 @ -.L132: -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + b .L137 @ +.L135: +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) cmp r4, r7 @ i, tmp128 - beq .L140 @, -.L134: -@ Patches/../C_code.c:475: table = GetCharacterData(i); + beq .L143 @, +.L137: +@ Patches/../C_code.c:480: table = GetCharacterData(i); movs r0, r4 @, i - bl .L143 @ -@ Patches/../C_code.c:476: if (table->portraitId == portraitID) + bl .L146 @ +@ Patches/../C_code.c:481: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp124, -@ Patches/../C_code.c:476: if (table->portraitId == portraitID) +@ Patches/../C_code.c:481: if (table->portraitId == portraitID) cmp r3, r5 @ tmp124, portraitID - bne .L132 @, -@ Patches/../C_code.c:478: return table->number; + bne .L135 @, +@ Patches/../C_code.c:483: return table->number; ldrb r0, [r0, #4] @ , -.L130: -@ Patches/../C_code.c:486: } +.L133: +@ Patches/../C_code.c:491: } @ sp needed @ pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L139: -@ Patches/../C_code.c:466: portraitID = ReplacePortraitTable[portraitID]; +.L142: +@ Patches/../C_code.c:471: portraitID = ReplacePortraitTable[portraitID]; movs r5, r3 @ portraitID, _1 - b .L131 @ -.L140: -@ Patches/../C_code.c:485: return 0; + b .L134 @ +.L143: +@ Patches/../C_code.c:490: return 0; movs r0, #0 @ , - b .L130 @ -.L142: + b .L133 @ +.L145: .align 2 -.L141: +.L144: .word ReplacePortraitTable .word GetCharacterData .size GetUnitIdOfPortrait, .-GetUnitIdOfPortrait @@ -949,36 +980,36 @@ CanCharacterBecomeBoss: ldr r3, [r0, #40] @ table_7(D)->attributes, table_7(D)->attributes lsls r2, r2, #8 @ tmp125, tmp125, ands r2, r3 @ _8, table_7(D)->attributes -@ Patches/../C_code.c:640: if ((RecruitValues->recruitment == 5)) - ldr r3, .L147 @ tmp127, +@ Patches/../C_code.c:645: if ((RecruitValues->recruitment == 5)) + ldr r3, .L150 @ tmp127, ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r1, [r3] @ *RecruitValues.12_2, *RecruitValues.12_2 + ldrb r1, [r3] @ *RecruitValues.13_2, *RecruitValues.13_2 movs r3, #7 @ tmp133, - ands r3, r1 @ _4, *RecruitValues.12_2 -@ Patches/../C_code.c:640: if ((RecruitValues->recruitment == 5)) + ands r3, r1 @ _4, *RecruitValues.13_2 +@ Patches/../C_code.c:645: if ((RecruitValues->recruitment == 5)) cmp r3, #5 @ _4, - beq .L146 @, -@ Patches/../C_code.c:644: if ((!boss) && (RecruitValues->recruitment == 4)) + beq .L149 @, +@ Patches/../C_code.c:649: if ((!boss) && (RecruitValues->recruitment == 4)) subs r0, r3, #4 @ tmp137, _4, rsbs r3, r0, #0 @ tmp138, tmp137 adcs r0, r0, r3 @ tmp136, tmp137, tmp138 -@ Patches/../C_code.c:644: if ((!boss) && (RecruitValues->recruitment == 4)) +@ Patches/../C_code.c:649: if ((!boss) && (RecruitValues->recruitment == 4)) movs r3, r2 @ _8, _8 subs r2, r3, #1 @ tmp141, _8 sbcs r3, r3, r2 @ _8, _8, tmp141 -@ Patches/../C_code.c:644: if ((!boss) && (RecruitValues->recruitment == 4)) +@ Patches/../C_code.c:649: if ((!boss) && (RecruitValues->recruitment == 4)) orrs r0, r3 @ , tmp140 -.L144: -@ Patches/../C_code.c:653: } +.L147: +@ Patches/../C_code.c:658: } @ sp needed @ bx lr -.L146: -@ Patches/../C_code.c:642: return false; +.L149: +@ Patches/../C_code.c:647: return false; movs r0, #0 @ , - b .L144 @ -.L148: + b .L147 @ +.L151: .align 2 -.L147: +.L150: .word RecruitValues .size CanCharacterBecomeBoss, .-CanCharacterBecomeBoss .align 1 @@ -993,28 +1024,28 @@ MustCharacterBecomeBoss: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:658: if ((RecruitValues->recruitment == 5)) - ldr r3, .L150 @ tmp126, -@ Patches/../C_code.c:670: } +@ Patches/../C_code.c:663: if ((RecruitValues->recruitment == 5)) + ldr r3, .L153 @ tmp126, +@ Patches/../C_code.c:675: } @ sp needed @ -@ Patches/../C_code.c:658: if ((RecruitValues->recruitment == 5)) +@ Patches/../C_code.c:663: if ((RecruitValues->recruitment == 5)) ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r2, [r3] @ *RecruitValues.14_2, *RecruitValues.14_2 -@ Patches/../C_code.c:658: if ((RecruitValues->recruitment == 5)) + ldrb r2, [r3] @ *RecruitValues.15_2, *RecruitValues.15_2 +@ Patches/../C_code.c:663: if ((RecruitValues->recruitment == 5)) movs r3, #7 @ tmp132, - ands r3, r2 @ tmp134, *RecruitValues.14_2 + ands r3, r2 @ tmp134, *RecruitValues.15_2 subs r3, r3, #5 @ tmp137, subs r2, r3, #1 @ tmp138, tmp137 sbcs r3, r3, r2 @ tmp136, tmp137, tmp138 -@ Patches/../C_code.c:665: if (boss) +@ Patches/../C_code.c:670: if (boss) ldr r0, [r0, #40] @ table_7(D)->attributes, table_7(D)->attributes lsrs r0, r0, #15 @ tmp144, table_7(D)->attributes, ands r0, r3 @ tmp124, tmp136 -@ Patches/../C_code.c:670: } +@ Patches/../C_code.c:675: } bx lr -.L151: +.L154: .align 2 -.L150: +.L153: .word RecruitValues .size MustCharacterBecomeBoss, .-MustCharacterBecomeBoss .align 1 @@ -1029,51 +1060,51 @@ GetAdjustedCharacterID: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:674: int portraitID = table->portraitId; +@ Patches/../C_code.c:679: int portraitID = table->portraitId; ldrh r4, [r0, #6] @ _1, -@ Patches/../C_code.c:673: { +@ Patches/../C_code.c:678: { movs r5, r0 @ table, tmp128 -@ Patches/../C_code.c:675: if (!portraitID) +@ Patches/../C_code.c:680: if (!portraitID) cmp r4, #0 @ _1, - bne .L153 @, -.L161: -@ Patches/../C_code.c:706: return table->number; + bne .L156 @, +.L164: +@ Patches/../C_code.c:711: return table->number; ldrb r0, [r5, #4] @ , -.L152: -@ Patches/../C_code.c:707: } +.L155: +@ Patches/../C_code.c:712: } @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L153: -@ Patches/../C_code.c:679: const struct CharacterData * table2 = GetCharacterData(1); - ldr r3, .L162 @ tmp124, +.L156: +@ Patches/../C_code.c:684: const struct CharacterData * table2 = GetCharacterData(1); + ldr r3, .L165 @ tmp124, movs r0, #1 @, bl .L14 @ - ldr r3, .L162+4 @ tmp131, + ldr r3, .L165+4 @ tmp131, adds r1, r0, r3 @ _23, table2, tmp131 - b .L156 @ -.L155: -@ Patches/../C_code.c:686: table2++; + b .L159 @ +.L158: +@ Patches/../C_code.c:691: table2++; adds r0, r0, #52 @ table2, -@ Patches/../C_code.c:680: for (int i = 0; i < MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:685: for (int i = 0; i < MAX_CHAR_ID; ++i) cmp r0, r1 @ table2, _23 - beq .L161 @, -.L156: -@ Patches/../C_code.c:682: if ((portraitID == table2->portraitId) && (table2->pSupportData)) + beq .L164 @, +.L159: +@ Patches/../C_code.c:687: if ((portraitID == table2->portraitId) && (table2->pSupportData)) ldrh r2, [r0, #6] @ MEM[(short unsigned int *)table2_22 + 6B], MEM[(short unsigned int *)table2_22 + 6B] cmp r2, r4 @ MEM[(short unsigned int *)table2_22 + 6B], _1 - bne .L155 @, -@ Patches/../C_code.c:682: if ((portraitID == table2->portraitId) && (table2->pSupportData)) + bne .L158 @, +@ Patches/../C_code.c:687: if ((portraitID == table2->portraitId) && (table2->pSupportData)) ldr r2, [r0, #44] @ MEM[(long unsigned int *)table2_22 + 44B], MEM[(long unsigned int *)table2_22 + 44B] cmp r2, #0 @ MEM[(long unsigned int *)table2_22 + 44B], - beq .L155 @, -@ Patches/../C_code.c:684: return table2->number; + beq .L158 @, +@ Patches/../C_code.c:689: return table2->number; ldrb r0, [r0, #4] @ , - b .L152 @ -.L163: + b .L155 @ +.L166: .align 2 -.L162: +.L165: .word GetCharacterData .word 13260 .size GetAdjustedCharacterID, .-GetAdjustedCharacterID @@ -1089,21 +1120,21 @@ GetUnitListToUse: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:717: if (!table->portraitId) +@ Patches/../C_code.c:722: if (!table->portraitId) ldrh r3, [r0, #6] @ tmp119, cmp r3, #0 @ tmp119, - beq .L166 @, + beq .L169 @, bl GetUnitListToUse.part.0 @ -.L164: -@ Patches/../C_code.c:798: } +.L167: +@ Patches/../C_code.c:803: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L166: -@ Patches/../C_code.c:719: return result; +.L169: +@ Patches/../C_code.c:724: return result; movs r0, #0 @ , - b .L164 @ + b .L167 @ .size GetUnitListToUse, .-GetUnitListToUse .align 1 .p2align 2,,3 @@ -1116,49 +1147,49 @@ CallGetUnitListToUse: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) - ldr r3, .L175 @ tmp124, +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) + ldr r3, .L178 @ tmp124, ldr r3, [r3] @ RecruitValues, RecruitValues -@ Patches/../C_code.c:801: { +@ Patches/../C_code.c:806: { push {r4, lr} @ -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) ldrb r4, [r3] @ MEM[(struct RecruitmentValues *)pretmp_22], MEM[(struct RecruitmentValues *)pretmp_22] movs r3, #7 @ tmp130, ands r4, r3 @ _24, tmp130 -@ Patches/../C_code.c:717: if (!table->portraitId) +@ Patches/../C_code.c:722: if (!table->portraitId) ldrh r3, [r0, #6] @ tmp132, cmp r3, #0 @ tmp132, - beq .L173 @, + beq .L176 @, bl GetUnitListToUse.part.0 @ -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) cmp r4, #4 @ _24, - beq .L174 @, -.L167: -@ Patches/../C_code.c:815: } + beq .L177 @, +.L170: +@ Patches/../C_code.c:820: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L174: -@ Patches/../C_code.c:805: if (result == 1) +.L177: +@ Patches/../C_code.c:810: if (result == 1) cmp r0, #1 @ , - beq .L172 @, -@ Patches/../C_code.c:809: else if (result == 2) + beq .L175 @, +@ Patches/../C_code.c:814: else if (result == 2) subs r0, r0, #2 @ tmp135, rsbs r3, r0, #0 @ tmp136, tmp135 adcs r0, r0, r3 @ , tmp135, tmp136 - b .L167 @ -.L173: -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) + b .L170 @ +.L176: +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) movs r0, #0 @ , - b .L167 @ -.L172: -@ Patches/../C_code.c:807: return 2; + b .L170 @ +.L175: +@ Patches/../C_code.c:812: return 2; movs r0, #2 @ , - b .L167 @ -.L176: + b .L170 @ +.L179: .align 2 -.L175: +.L178: .word RecruitValues .size CallGetUnitListToUse, .-CallGetUnitListToUse .align 1 @@ -1173,23 +1204,23 @@ ShouldDoJankyPalettes: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1119: return RandBitflags->colours == 2; +@ Patches/../C_code.c:1124: return RandBitflags->colours == 2; movs r0, #7 @ tmp127, -@ Patches/../C_code.c:1120: } +@ Patches/../C_code.c:1125: } @ sp needed @ -@ Patches/../C_code.c:1119: return RandBitflags->colours == 2; - ldr r3, .L178 @ tmp121, +@ Patches/../C_code.c:1124: return RandBitflags->colours == 2; + ldr r3, .L181 @ tmp121, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.21_1, *RandBitflags.21_1 - ands r0, r3 @ tmp129, *RandBitflags.21_1 + ldrb r3, [r3, #2] @ *RandBitflags.22_1, *RandBitflags.22_1 + ands r0, r3 @ tmp129, *RandBitflags.22_1 subs r0, r0, #2 @ tmp132, rsbs r3, r0, #0 @ tmp133, tmp132 adcs r0, r0, r3 @ tmp131, tmp132, tmp133 -@ Patches/../C_code.c:1120: } +@ Patches/../C_code.c:1125: } bx lr -.L179: +.L182: .align 2 -.L178: +.L181: .word RandBitflags .size ShouldDoJankyPalettes, .-ShouldDoJankyPalettes .align 1 @@ -1204,33 +1235,33 @@ ShouldRandomizeBGM: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) - ldr r3, .L183 @ tmp119, -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) + ldr r3, .L186 @ tmp119, +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) ldr r3, [r3] @ NeverRandomizeBGM, NeverRandomizeBGM cmp r3, #0 @ NeverRandomizeBGM, - bne .L182 @, -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) + bne .L185 @, +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) movs r0, #63 @ tmp128, -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) - ldr r3, .L183+4 @ tmp122, +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) + ldr r3, .L186+4 @ tmp122, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) - ldrb r3, [r3, #1] @ *RandBitflags.23_5, *RandBitflags.23_5 - cmp r0, r3 @ tmp128, *RandBitflags.23_5 +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) + ldrb r3, [r3, #1] @ *RandBitflags.24_5, *RandBitflags.24_5 + cmp r0, r3 @ tmp128, *RandBitflags.24_5 sbcs r0, r0, r0 @ tmp131 rsbs r0, r0, #0 @ , tmp131 -.L180: -@ Patches/../C_code.c:1135: } +.L183: +@ Patches/../C_code.c:1140: } @ sp needed @ bx lr -.L182: -@ Patches/../C_code.c:1128: return false; +.L185: +@ Patches/../C_code.c:1133: return false; movs r0, #0 @ , - b .L180 @ -.L184: + b .L183 @ +.L187: .align 2 -.L183: +.L186: .word NeverRandomizeBGM .word RandBitflags .size ShouldRandomizeBGM, .-ShouldRandomizeBGM @@ -1246,70 +1277,70 @@ GetItemAttributes: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1139: u32 attr = GetItemData(item & 0xFF)->attributes; +@ Patches/../C_code.c:1144: u32 attr = GetItemData(item & 0xFF)->attributes; movs r5, #255 @ tmp143, -@ Patches/../C_code.c:1138: { // 801727C +@ Patches/../C_code.c:1143: { // 801727C mov lr, r8 @, -@ Patches/../C_code.c:1139: u32 attr = GetItemData(item & 0xFF)->attributes; - ldr r3, .L206 @ tmp198, +@ Patches/../C_code.c:1144: u32 attr = GetItemData(item & 0xFF)->attributes; + ldr r3, .L209 @ tmp198, ands r5, r0 @ _1, tmp205 -@ Patches/../C_code.c:1138: { // 801727C +@ Patches/../C_code.c:1143: { // 801727C push {lr} @ -@ Patches/../C_code.c:1139: u32 attr = GetItemData(item & 0xFF)->attributes; +@ Patches/../C_code.c:1144: u32 attr = GetItemData(item & 0xFF)->attributes; movs r0, r5 @, _1 mov r8, r3 @ tmp198, tmp198 bl .L14 @ -@ Patches/../C_code.c:1139: u32 attr = GetItemData(item & 0xFF)->attributes; +@ Patches/../C_code.c:1144: u32 attr = GetItemData(item & 0xFF)->attributes; ldr r6, [r0, #8] @ attr, _2->attributes -@ Patches/../C_code.c:1140: int wepType = GetItemData(item & 0xFF)->weaponType; +@ Patches/../C_code.c:1145: int wepType = GetItemData(item & 0xFF)->weaponType; movs r0, r5 @, _1 - bl .L208 @ -@ Patches/../C_code.c:1141: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) - ldr r7, .L206+4 @ tmp199, + bl .L211 @ +@ Patches/../C_code.c:1146: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) + ldr r7, .L209+4 @ tmp199, ldr r3, [r7] @ RandBitflags, RandBitflags - ldrb r2, [r3, #2] @ *RandBitflags.24_5, *RandBitflags.24_5 + ldrb r2, [r3, #2] @ *RandBitflags.25_5, *RandBitflags.25_5 movs r3, #96 @ tmp153, -@ Patches/../C_code.c:1140: int wepType = GetItemData(item & 0xFF)->weaponType; +@ Patches/../C_code.c:1145: int wepType = GetItemData(item & 0xFF)->weaponType; ldrb r4, [r0, #7] @ wepType, -@ Patches/../C_code.c:1141: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) - ands r3, r2 @ _7, *RandBitflags.24_5 -@ Patches/../C_code.c:1141: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) +@ Patches/../C_code.c:1146: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) + ands r3, r2 @ _7, *RandBitflags.25_5 +@ Patches/../C_code.c:1146: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) cmp r3, #64 @ _7, - beq .L204 @, -@ Patches/../C_code.c:1145: if (RandBitflags->itemDur == 3) + beq .L207 @, +@ Patches/../C_code.c:1150: if (RandBitflags->itemDur == 3) cmp r3, #96 @ _7, - bne .L187 @, -@ Patches/../C_code.c:1147: attr |= IA_UNBREAKABLE; + bne .L190 @, +@ Patches/../C_code.c:1152: attr |= IA_UNBREAKABLE; subs r3, r3, #88 @ tmp170, orrs r6, r3 @ attr, tmp170 -.L187: -@ Patches/../C_code.c:1149: int rank = GetItemData(item & 0xFF)->weaponRank; +.L190: +@ Patches/../C_code.c:1154: int rank = GetItemData(item & 0xFF)->weaponRank; movs r0, r5 @, _1 -@ Patches/../C_code.c:1150: int maxRank = 1; +@ Patches/../C_code.c:1155: int maxRank = 1; subs r4, r4, #7 @ tmp201, -@ Patches/../C_code.c:1149: int rank = GetItemData(item & 0xFF)->weaponRank; - bl .L208 @ -@ Patches/../C_code.c:1150: int maxRank = 1; +@ Patches/../C_code.c:1154: int rank = GetItemData(item & 0xFF)->weaponRank; + bl .L211 @ +@ Patches/../C_code.c:1155: int maxRank = 1; rsbs r3, r4, #0 @ tmp202, tmp201 adcs r4, r4, r3 @ tmp200, tmp201, tmp202 -@ Patches/../C_code.c:1156: if ((RandBitflags->itemDur == 1) && +@ Patches/../C_code.c:1161: if ((RandBitflags->itemDur == 1) && ldr r2, [r7] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:1150: int maxRank = 1; +@ Patches/../C_code.c:1155: int maxRank = 1; movs r3, #50 @ tmp204, -@ Patches/../C_code.c:1156: if ((RandBitflags->itemDur == 1) && - ldrb r1, [r2, #2] @ *RandBitflags.26_11, *RandBitflags.26_11 -@ Patches/../C_code.c:1156: if ((RandBitflags->itemDur == 1) && +@ Patches/../C_code.c:1161: if ((RandBitflags->itemDur == 1) && + ldrb r1, [r2, #2] @ *RandBitflags.27_11, *RandBitflags.27_11 +@ Patches/../C_code.c:1161: if ((RandBitflags->itemDur == 1) && movs r2, #96 @ tmp179, -@ Patches/../C_code.c:1150: int maxRank = 1; +@ Patches/../C_code.c:1155: int maxRank = 1; rsbs r4, r4, #0 @ tmp203, tmp200 ands r3, r4 @ maxRank, tmp203 adds r3, r3, #1 @ maxRank, -@ Patches/../C_code.c:1156: if ((RandBitflags->itemDur == 1) && - ands r2, r1 @ tmp180, *RandBitflags.26_11 +@ Patches/../C_code.c:1161: if ((RandBitflags->itemDur == 1) && + ands r2, r1 @ tmp180, *RandBitflags.27_11 cmp r2, #32 @ tmp180, - beq .L205 @, -.L189: -@ Patches/../C_code.c:1162: } + beq .L208 @, +.L192: +@ Patches/../C_code.c:1167: } @ sp needed @ movs r0, r6 @, attr pop {r7} @@ -1317,14 +1348,14 @@ GetItemAttributes: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L204: -@ Patches/../C_code.c:1141: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) +.L207: +@ Patches/../C_code.c:1146: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) subs r3, r3, #59 @ tmp155, ands r3, r6 @ tmp156, attr -@ Patches/../C_code.c:1141: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) +@ Patches/../C_code.c:1146: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) subs r2, r3, #1 @ tmp159, tmp156 sbcs r3, r3, r2 @ tmp158, tmp156, tmp159 -@ Patches/../C_code.c:1141: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) +@ Patches/../C_code.c:1146: if ((RandBitflags->itemDur == 2) && ((attr & (IA_WEAPON | IA_STAFF)) || (wepType == 0xC))) movs r2, r4 @ tmp162, wepType subs r2, r2, #12 @ tmp162, rsbs r1, r2, #0 @ tmp163, tmp162 @@ -1332,31 +1363,31 @@ GetItemAttributes: orrs r3, r2 @ tmp165, tmp161 lsls r3, r3, #3 @ tmp169, tmp165, orrs r6, r3 @ attr, tmp169 - b .L187 @ -.L205: -@ Patches/../C_code.c:1156: if ((RandBitflags->itemDur == 1) && + b .L190 @ +.L208: +@ Patches/../C_code.c:1161: if ((RandBitflags->itemDur == 1) && cmp r5, #108 @ _1, - beq .L190 @, -@ Patches/../C_code.c:1157: (((item & 0xFF) == VULNERARY) || ((attr & (IA_WEAPON | IA_STAFF)) && (((rank <= maxRank) && (rank > 0)))))) + beq .L193 @, +@ Patches/../C_code.c:1162: (((item & 0xFF) == VULNERARY) || ((attr & (IA_WEAPON | IA_STAFF)) && (((rank <= maxRank) && (rank > 0)))))) subs r2, r2, #27 @ tmp182, -@ Patches/../C_code.c:1157: (((item & 0xFF) == VULNERARY) || ((attr & (IA_WEAPON | IA_STAFF)) && (((rank <= maxRank) && (rank > 0)))))) +@ Patches/../C_code.c:1162: (((item & 0xFF) == VULNERARY) || ((attr & (IA_WEAPON | IA_STAFF)) && (((rank <= maxRank) && (rank > 0)))))) tst r2, r6 @ tmp182, attr - beq .L189 @, -@ Patches/../C_code.c:1149: int rank = GetItemData(item & 0xFF)->weaponRank; + beq .L192 @, +@ Patches/../C_code.c:1154: int rank = GetItemData(item & 0xFF)->weaponRank; ldrb r2, [r0, #28] @ rank, -@ Patches/../C_code.c:1157: (((item & 0xFF) == VULNERARY) || ((attr & (IA_WEAPON | IA_STAFF)) && (((rank <= maxRank) && (rank > 0)))))) +@ Patches/../C_code.c:1162: (((item & 0xFF) == VULNERARY) || ((attr & (IA_WEAPON | IA_STAFF)) && (((rank <= maxRank) && (rank > 0)))))) cmp r3, r2 @ maxRank, rank - bcc .L189 @, + bcc .L192 @, cmp r2, #0 @ rank, - beq .L189 @, -.L190: -@ Patches/../C_code.c:1159: attr |= IA_UNBREAKABLE; + beq .L192 @, +.L193: +@ Patches/../C_code.c:1164: attr |= IA_UNBREAKABLE; movs r3, #8 @ tmp196, orrs r6, r3 @ attr, tmp196 - b .L189 @ -.L207: + b .L192 @ +.L210: .align 2 -.L206: +.L209: .word GetItemData .word RandBitflags .size GetItemAttributes, .-GetItemAttributes @@ -1372,37 +1403,37 @@ GetItemAfterUse: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1165: { // 16AEC 8016730 8016928 +@ Patches/../C_code.c:1170: { // 16AEC 8016730 8016928 movs r4, r0 @ item, tmp124 -@ Patches/../C_code.c:1166: int attr = GetItemAttributes(item); +@ Patches/../C_code.c:1171: int attr = GetItemAttributes(item); bl GetItemAttributes @ -@ Patches/../C_code.c:1168: if (attr & IA_UNBREAKABLE) +@ Patches/../C_code.c:1173: if (attr & IA_UNBREAKABLE) lsls r0, r0, #28 @ tmp126, tmp125, - bmi .L213 @, -@ Patches/../C_code.c:1173: item -= (1 << 8); // lose one use + bmi .L216 @, +@ Patches/../C_code.c:1178: item -= (1 << 8); // lose one use subs r4, r4, #1 @ item, subs r4, r4, #255 @ item, -@ Patches/../C_code.c:1175: if (item < (1 << 8)) +@ Patches/../C_code.c:1180: if (item < (1 << 8)) cmp r4, #255 @ item, - ble .L212 @, -@ Patches/../C_code.c:1178: return item; // return used item + ble .L215 @, +@ Patches/../C_code.c:1183: return item; // return used item lsls r4, r4, #16 @ tmp122, item, lsrs r0, r4, #16 @ , tmp122, -.L211: -@ Patches/../C_code.c:1179: } +.L214: +@ Patches/../C_code.c:1184: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L212: -@ Patches/../C_code.c:1176: return 0; // return no item if uses < 0 +.L215: +@ Patches/../C_code.c:1181: return 0; // return no item if uses < 0 movs r0, #0 @ , - b .L211 @ -.L213: -@ Patches/../C_code.c:1170: return item; + b .L214 @ +.L216: +@ Patches/../C_code.c:1175: return item; lsls r0, r4, #16 @ tmp121, item, lsrs r0, r0, #16 @ , tmp121, - b .L211 @ + b .L214 @ .size GetItemAfterUse, .-GetItemAfterUse .align 1 .p2align 2,,3 @@ -1416,36 +1447,36 @@ GetItemUses: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1182: { +@ Patches/../C_code.c:1187: { movs r4, r0 @ item, tmp138 -@ Patches/../C_code.c:1183: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) +@ Patches/../C_code.c:1188: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) bl GetItemAttributes @ -@ Patches/../C_code.c:1183: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) +@ Patches/../C_code.c:1188: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) lsls r0, r0, #28 @ tmp140, tmp139, - bmi .L217 @, -@ Patches/../C_code.c:1183: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) + bmi .L220 @, +@ Patches/../C_code.c:1188: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) movs r2, #96 @ tmp131, - ldr r3, .L218 @ tmp125, + ldr r3, .L221 @ tmp125, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.27_3, *RandBitflags.27_3 - tst r2, r3 @ tmp131, *RandBitflags.27_3 - bne .L217 @, -@ Patches/../C_code.c:1186: return (item & 0xFF00) >> 8; + ldrb r3, [r3, #2] @ *RandBitflags.28_3, *RandBitflags.28_3 + tst r2, r3 @ tmp131, *RandBitflags.28_3 + bne .L220 @, +@ Patches/../C_code.c:1191: return (item & 0xFF00) >> 8; lsls r0, r4, #16 @ tmp136, item, lsrs r0, r0, #24 @ , tmp136, -.L214: -@ Patches/../C_code.c:1187: } +.L217: +@ Patches/../C_code.c:1192: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L217: -@ Patches/../C_code.c:1184: return 0xFF; +.L220: +@ Patches/../C_code.c:1189: return 0xFF; movs r0, #255 @ , - b .L214 @ -.L219: + b .L217 @ +.L222: .align 2 -.L218: +.L221: .word RandBitflags .size GetItemUses, .-GetItemUses .align 1 @@ -1460,45 +1491,45 @@ GetItemMaxUses: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1190: { +@ Patches/../C_code.c:1195: { movs r4, r0 @ item, tmp141 -@ Patches/../C_code.c:1191: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) +@ Patches/../C_code.c:1196: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) bl GetItemAttributes @ -@ Patches/../C_code.c:1191: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) +@ Patches/../C_code.c:1196: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) lsls r0, r0, #28 @ tmp144, tmp142, - bmi .L222 @, -@ Patches/../C_code.c:1191: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) + bmi .L225 @, +@ Patches/../C_code.c:1196: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) movs r2, #96 @ tmp133, - ldr r3, .L225 @ tmp127, + ldr r3, .L228 @ tmp127, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.28_3, *RandBitflags.28_3 -@ Patches/../C_code.c:1192: return 0xFF; + ldrb r3, [r3, #2] @ *RandBitflags.29_3, *RandBitflags.29_3 +@ Patches/../C_code.c:1197: return 0xFF; movs r0, #255 @ , -@ Patches/../C_code.c:1191: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) - tst r2, r3 @ tmp133, *RandBitflags.28_3 - beq .L224 @, -.L220: -@ Patches/../C_code.c:1195: } +@ Patches/../C_code.c:1196: if ((GetItemAttributes(item) & IA_UNBREAKABLE) || RandBitflags->itemDur) + tst r2, r3 @ tmp133, *RandBitflags.29_3 + beq .L227 @, +.L223: +@ Patches/../C_code.c:1200: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L224: -@ Patches/../C_code.c:1194: return GetItemData(item & 0xFF)->maxUses; - ldr r3, .L225+4 @ tmp139, +.L227: +@ Patches/../C_code.c:1199: return GetItemData(item & 0xFF)->maxUses; + ldr r3, .L228+4 @ tmp139, ands r0, r4 @ tmp138, item bl .L14 @ -@ Patches/../C_code.c:1194: return GetItemData(item & 0xFF)->maxUses; +@ Patches/../C_code.c:1199: return GetItemData(item & 0xFF)->maxUses; ldrb r0, [r0, #20] @ , -@ Patches/../C_code.c:1194: return GetItemData(item & 0xFF)->maxUses; - b .L220 @ -.L222: -@ Patches/../C_code.c:1192: return 0xFF; +@ Patches/../C_code.c:1199: return GetItemData(item & 0xFF)->maxUses; + b .L223 @ +.L225: +@ Patches/../C_code.c:1197: return 0xFF; movs r0, #255 @ , - b .L220 @ -.L226: + b .L223 @ +.L229: .align 2 -.L225: +.L228: .word RandBitflags .word GetItemData .size GetItemMaxUses, .-GetItemMaxUses @@ -1514,74 +1545,74 @@ BuildTracklist: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:1233: for (i = 0; i < 1000; ++i) +@ Patches/../C_code.c:1238: for (i = 0; i < 1000; ++i) movs r5, #250 @ tmp153, -@ Patches/../C_code.c:1230: List[i] = 0; +@ Patches/../C_code.c:1235: List[i] = 0; movs r2, #198 @, - ldr r3, .L236 @ tmp133, + ldr r3, .L239 @ tmp133, movs r1, #0 @, -@ Patches/../C_code.c:1225: { +@ Patches/../C_code.c:1230: { movs r4, r0 @ List, tmp154 -@ Patches/../C_code.c:1230: List[i] = 0; - bl .L14 @ -@ Patches/../C_code.c:1232: struct Song * gST = *getSongTable; - ldr r3, .L236+4 @ tmp136, -@ Patches/../C_code.c:1243: if (BGMExceptions[i]) - ldr r6, .L236+8 @ tmp152, - ldr r2, [r3] @ ivtmp.852, getSongTable[0] -@ Patches/../C_code.c:1233: for (i = 0; i < 1000; ++i) +@ Patches/../C_code.c:1235: List[i] = 0; + bl .L14 @ +@ Patches/../C_code.c:1237: struct Song * gST = *getSongTable; + ldr r3, .L239+4 @ tmp136, +@ Patches/../C_code.c:1248: if (BGMExceptions[i]) + ldr r6, .L239+8 @ tmp152, + ldr r2, [r3] @ ivtmp.857, getSongTable[0] +@ Patches/../C_code.c:1238: for (i = 0; i < 1000; ++i) lsls r5, r5, #2 @ tmp153, tmp153, -@ Patches/../C_code.c:1233: for (i = 0; i < 1000; ++i) +@ Patches/../C_code.c:1238: for (i = 0; i < 1000; ++i) movs r3, #0 @ i, - b .L230 @ -.L235: -@ Patches/../C_code.c:1239: if (!gST[i].header) + b .L233 @ +.L238: +@ Patches/../C_code.c:1244: if (!gST[i].header) ldr r0, [r2] @ MEM[(void * *)_34], MEM[(void * *)_34] cmp r0, #0 @ MEM[(void * *)_34], - beq .L228 @, -@ Patches/../C_code.c:1243: if (BGMExceptions[i]) + beq .L231 @, +@ Patches/../C_code.c:1248: if (BGMExceptions[i]) ldrb r0, [r6, r3] @ MEM[(unsigned char *)&BGMExceptions + _3 * 1], MEM[(unsigned char *)&BGMExceptions + _3 * 1] cmp r0, #0 @ MEM[(unsigned char *)&BGMExceptions + _3 * 1], - bne .L229 @, -@ Patches/../C_code.c:1247: if (gST[i].ms != 1) + bne .L232 @, +@ Patches/../C_code.c:1252: if (gST[i].ms != 1) ldrh r0, [r2, #4] @ MEM[(short unsigned int *)_34 + 4B], MEM[(short unsigned int *)_34 + 4B] cmp r0, #1 @ MEM[(short unsigned int *)_34 + 4B], - bne .L229 @, -@ Patches/../C_code.c:1251: if (gST[i].me != 1) + bne .L232 @, +@ Patches/../C_code.c:1256: if (gST[i].me != 1) ldrh r0, [r2, #6] @ MEM[(short unsigned int *)_34 + 6B], MEM[(short unsigned int *)_34 + 6B] cmp r0, #1 @ MEM[(short unsigned int *)_34 + 6B], - bne .L229 @, -@ Patches/../C_code.c:1255: List[0]++; + bne .L232 @, +@ Patches/../C_code.c:1260: List[0]++; adds r1, r1, #1 @ tmp145, lsls r1, r1, #16 @ tmp146, tmp145, lsrs r1, r1, #16 @ _12, tmp146, strh r1, [r4] @ _12, *List_24(D) -@ Patches/../C_code.c:1256: List[List[0]] = i; +@ Patches/../C_code.c:1261: List[List[0]] = i; lsls r1, r1, #1 @ tmp148, _12, strh r3, [r1, r4] @ i, *_15 -.L229: -@ Patches/../C_code.c:1233: for (i = 0; i < 1000; ++i) +.L232: +@ Patches/../C_code.c:1238: for (i = 0; i < 1000; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:1233: for (i = 0; i < 1000; ++i) - adds r2, r2, #8 @ ivtmp.852, +@ Patches/../C_code.c:1238: for (i = 0; i < 1000; ++i) + adds r2, r2, #8 @ ivtmp.857, cmp r3, r5 @ i, tmp153 - beq .L228 @, -.L230: -@ Patches/../C_code.c:1235: if (List[0] >= MaxNumberOfSongs) + beq .L231 @, +.L233: +@ Patches/../C_code.c:1240: if (List[0] >= MaxNumberOfSongs) ldrh r1, [r4] @ _4, *List_24(D) -@ Patches/../C_code.c:1235: if (List[0] >= MaxNumberOfSongs) +@ Patches/../C_code.c:1240: if (List[0] >= MaxNumberOfSongs) cmp r1, #98 @ _4, - bls .L235 @, -.L228: -@ Patches/../C_code.c:1259: } + bls .L238 @, +.L231: +@ Patches/../C_code.c:1264: } movs r0, r4 @, List @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L237: +.L240: .align 2 -.L236: +.L239: .word memset .word getSongTable .word BGMExceptions @@ -1597,43 +1628,43 @@ RandomizeBattleMusic: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) - ldr r3, .L240 @ tmp124, -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) + ldr r3, .L243 @ tmp124, +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) ldr r3, [r3] @ NeverRandomizeBGM, NeverRandomizeBGM -@ Patches/../C_code.c:1303: { +@ Patches/../C_code.c:1308: { push {r4, lr} @ -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) cmp r3, #0 @ NeverRandomizeBGM, - bne .L239 @, -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) - ldr r3, .L240+4 @ tmp127, + bne .L242 @, +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) + ldr r3, .L243+4 @ tmp127, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) - ldrb r3, [r3, #1] @ *RandBitflags.23_14, *RandBitflags.23_14 - cmp r3, #63 @ *RandBitflags.23_14, - bls .L239 @, -@ Patches/../C_code.c:1313: struct SoundRoomData * SoundRoomTable = *getSoundRoom; // starts at index 1, not 0 - ldr r3, .L240+8 @ tmp131, -@ Patches/../C_code.c:1322: return SoundRoomTable[NextRN_N(63)].songID; // before game over at 64 +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) + ldrb r3, [r3, #1] @ *RandBitflags.24_14, *RandBitflags.24_14 + cmp r3, #63 @ *RandBitflags.24_14, + bls .L242 @, +@ Patches/../C_code.c:1318: struct SoundRoomData * SoundRoomTable = *getSoundRoom; // starts at index 1, not 0 + ldr r3, .L243+8 @ tmp131, +@ Patches/../C_code.c:1327: return SoundRoomTable[NextRN_N(63)].songID; // before game over at 64 movs r0, #63 @, -@ Patches/../C_code.c:1313: struct SoundRoomData * SoundRoomTable = *getSoundRoom; // starts at index 1, not 0 +@ Patches/../C_code.c:1318: struct SoundRoomData * SoundRoomTable = *getSoundRoom; // starts at index 1, not 0 ldr r4, [r3] @ SoundRoomTable, getSoundRoom[0] -@ Patches/../C_code.c:1322: return SoundRoomTable[NextRN_N(63)].songID; // before game over at 64 - ldr r3, .L240+12 @ tmp132, +@ Patches/../C_code.c:1327: return SoundRoomTable[NextRN_N(63)].songID; // before game over at 64 + ldr r3, .L243+12 @ tmp132, bl .L14 @ -@ Patches/../C_code.c:1322: return SoundRoomTable[NextRN_N(63)].songID; // before game over at 64 +@ Patches/../C_code.c:1327: return SoundRoomTable[NextRN_N(63)].songID; // before game over at 64 lsls r0, r0, #4 @ tmp133, tmp136, ldr r0, [r0, r4] @ id, _4->songID -.L239: -@ Patches/../C_code.c:1324: }; +.L242: +@ Patches/../C_code.c:1329: }; @ sp needed @ pop {r4} pop {r1} bx r1 -.L241: +.L244: .align 2 -.L240: +.L243: .word NeverRandomizeBGM .word RandBitflags .word getSoundRoom @@ -1651,26 +1682,26 @@ UnitHasDroppableItem: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1386: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1391: if (UNIT_FACTION(unit) != FACTION_RED) movs r1, #11 @ tmp121, movs r2, #192 @ tmp122, ldrsb r1, [r0, r1] @ tmp121, -@ Patches/../C_code.c:1385: { +@ Patches/../C_code.c:1390: { movs r3, r0 @ unit, tmp127 -@ Patches/../C_code.c:1386: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1391: if (UNIT_FACTION(unit) != FACTION_RED) ands r2, r1 @ tmp123, tmp121 -@ Patches/../C_code.c:1388: return false; +@ Patches/../C_code.c:1393: return false; movs r0, #0 @ , -@ Patches/../C_code.c:1386: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1391: if (UNIT_FACTION(unit) != FACTION_RED) cmp r2, #128 @ tmp123, - bne .L242 @, -@ Patches/../C_code.c:1390: return (unit->state & US_DROP_ITEM); + bne .L245 @, +@ Patches/../C_code.c:1395: return (unit->state & US_DROP_ITEM); ldr r0, [r3, #12] @ unit_7(D)->state, unit_7(D)->state movs r3, #128 @ tmp125, lsls r3, r3, #5 @ tmp125, tmp125, ands r0, r3 @ , tmp125 -.L242: -@ Patches/../C_code.c:1391: } +.L245: +@ Patches/../C_code.c:1396: } @ sp needed @ bx lr .size UnitHasDroppableItem, .-UnitHasDroppableItem @@ -1685,52 +1716,52 @@ UnitHasStealableItem: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:1399: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1404: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp129, -@ Patches/../C_code.c:1398: { +@ Patches/../C_code.c:1403: { push {r3, r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1399: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1404: if (UNIT_FACTION(unit) != FACTION_RED) movs r3, #192 @ tmp130, ldrsb r2, [r0, r2] @ tmp129, ands r3, r2 @ tmp131, tmp129 -@ Patches/../C_code.c:1399: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1404: if (UNIT_FACTION(unit) != FACTION_RED) cmp r3, #128 @ tmp131, - bne .L246 @, - movs r4, r0 @ ivtmp.872, unit + bne .L249 @, + movs r4, r0 @ ivtmp.877, unit adds r0, r0, #40 @ unit, movs r5, r0 @ _28, unit -@ Patches/../C_code.c:1394: return (GetItemData(item & 0xFF)->weaponType == 9); +@ Patches/../C_code.c:1399: return (GetItemData(item & 0xFF)->weaponType == 9); movs r6, #255 @ tmp137, - ldr r7, .L251 @ tmp143, - adds r4, r4, #30 @ ivtmp.872, -.L248: + ldr r7, .L254 @ tmp143, + adds r4, r4, #30 @ ivtmp.877, +.L251: ldrh r0, [r4] @ MEM[(short unsigned int *)_26], MEM[(short unsigned int *)_26] ands r0, r6 @ tmp138, tmp137 bl .L62 @ -@ Patches/../C_code.c:1406: if (IsItemStealableSimple(unit->items[i])) +@ Patches/../C_code.c:1411: if (IsItemStealableSimple(unit->items[i])) ldrb r3, [r0, #7] @ tmp141, cmp r3, #9 @ tmp141, - beq .L249 @, -@ Patches/../C_code.c:1403: for (int i = 0; i < 5; ++i) - adds r4, r4, #2 @ ivtmp.872, - cmp r4, r5 @ ivtmp.872, _28 - bne .L248 @, -.L246: -@ Patches/../C_code.c:1401: return false; + beq .L252 @, +@ Patches/../C_code.c:1408: for (int i = 0; i < 5; ++i) + adds r4, r4, #2 @ ivtmp.877, + cmp r4, r5 @ ivtmp.877, _28 + bne .L251 @, +.L249: +@ Patches/../C_code.c:1406: return false; movs r0, #0 @ , -.L245: -@ Patches/../C_code.c:1418: } +.L248: +@ Patches/../C_code.c:1423: } @ sp needed @ pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L249: -@ Patches/../C_code.c:1408: return true; - movs r0, #1 @ , - b .L245 @ .L252: +@ Patches/../C_code.c:1413: return true; + movs r0, #1 @ , + b .L248 @ +.L255: .align 2 -.L251: +.L254: .word GetItemData .size UnitHasStealableItem, .-UnitHasStealableItem .align 1 @@ -1747,108 +1778,108 @@ MaybeDisplayStealOrDropIcon: push {r3, r4, r5, r6, r7, lr} @ mov lr, r9 @, mov r7, r8 @, -@ Patches/../C_code.c:1421: if ((GetGameClock() & 0x1F) >= 20) - ldr r3, .L267 @ tmp161, -@ Patches/../C_code.c:1420: { +@ Patches/../C_code.c:1426: if ((GetGameClock() & 0x1F) >= 20) + ldr r3, .L270 @ tmp161, +@ Patches/../C_code.c:1425: { push {r7, lr} @ -@ Patches/../C_code.c:1420: { +@ Patches/../C_code.c:1425: { movs r4, r0 @ unit, tmp221 -@ Patches/../C_code.c:1421: if ((GetGameClock() & 0x1F) >= 20) +@ Patches/../C_code.c:1426: if ((GetGameClock() & 0x1F) >= 20) bl .L14 @ -@ Patches/../C_code.c:1421: if ((GetGameClock() & 0x1F) >= 20) +@ Patches/../C_code.c:1426: if ((GetGameClock() & 0x1F) >= 20) movs r3, #31 @ tmp162, ands r3, r0 @ tmp163, tmp222 -@ Patches/../C_code.c:1425: if (!UNIT_IS_VALID(unit)) +@ Patches/../C_code.c:1430: if (!UNIT_IS_VALID(unit)) cmp r3, #19 @ tmp163, - bhi .L264 @, + bhi .L267 @, cmp r4, #0 @ unit, - beq .L264 @, -@ Patches/../C_code.c:1425: if (!UNIT_IS_VALID(unit)) + beq .L267 @, +@ Patches/../C_code.c:1430: if (!UNIT_IS_VALID(unit)) ldr r3, [r4] @ unit_30(D)->pCharacterData, unit_30(D)->pCharacterData cmp r3, #0 @ unit_30(D)->pCharacterData, - beq .L264 @, -@ Patches/../C_code.c:1430: int x = unit->xPos; + beq .L267 @, +@ Patches/../C_code.c:1435: int x = unit->xPos; movs r5, #16 @ x, -@ Patches/../C_code.c:1432: x = x * 16 - gCameraX; - ldr r3, .L267+4 @ tmp177, -@ Patches/../C_code.c:1430: int x = unit->xPos; +@ Patches/../C_code.c:1437: x = x * 16 - gCameraX; + ldr r3, .L270+4 @ tmp177, +@ Patches/../C_code.c:1435: int x = unit->xPos; ldrsb r5, [r4, r5] @ x,* x -@ Patches/../C_code.c:1432: x = x * 16 - gCameraX; +@ Patches/../C_code.c:1437: x = x * 16 - gCameraX; ldrh r3, [r3] @ gCameraX, gCameraX -@ Patches/../C_code.c:1432: x = x * 16 - gCameraX; +@ Patches/../C_code.c:1437: x = x * 16 - gCameraX; lsls r5, r5, #4 @ _6, x, -@ Patches/../C_code.c:1432: x = x * 16 - gCameraX; +@ Patches/../C_code.c:1437: x = x * 16 - gCameraX; subs r5, r5, r3 @ x, _6, gCameraX -@ Patches/../C_code.c:1434: if (x < -16 || x > 240) +@ Patches/../C_code.c:1439: if (x < -16 || x > 240) movs r2, r5 @ tmp179, x -@ Patches/../C_code.c:1434: if (x < -16 || x > 240) +@ Patches/../C_code.c:1439: if (x < -16 || x > 240) movs r3, #128 @ tmp180, -@ Patches/../C_code.c:1434: if (x < -16 || x > 240) +@ Patches/../C_code.c:1439: if (x < -16 || x > 240) adds r2, r2, #16 @ tmp179, -@ Patches/../C_code.c:1434: if (x < -16 || x > 240) +@ Patches/../C_code.c:1439: if (x < -16 || x > 240) lsls r3, r3, #1 @ tmp180, tmp180, cmp r2, r3 @ tmp179, tmp180 - bhi .L264 @, -@ Patches/../C_code.c:1431: int y = unit->yPos; + bhi .L267 @, +@ Patches/../C_code.c:1436: int y = unit->yPos; movs r6, #17 @ y, -@ Patches/../C_code.c:1433: y = y * 16 - gCameraY; - ldr r3, .L267+8 @ tmp182, -@ Patches/../C_code.c:1431: int y = unit->yPos; +@ Patches/../C_code.c:1438: y = y * 16 - gCameraY; + ldr r3, .L270+8 @ tmp182, +@ Patches/../C_code.c:1436: int y = unit->yPos; ldrsb r6, [r4, r6] @ y,* y -@ Patches/../C_code.c:1433: y = y * 16 - gCameraY; +@ Patches/../C_code.c:1438: y = y * 16 - gCameraY; ldrh r3, [r3] @ gCameraY, gCameraY -@ Patches/../C_code.c:1433: y = y * 16 - gCameraY; +@ Patches/../C_code.c:1438: y = y * 16 - gCameraY; lsls r6, r6, #4 @ _9, y, -@ Patches/../C_code.c:1433: y = y * 16 - gCameraY; +@ Patches/../C_code.c:1438: y = y * 16 - gCameraY; subs r6, r6, r3 @ y, _9, gCameraY -@ Patches/../C_code.c:1439: if (y < -16 || y > 160) +@ Patches/../C_code.c:1444: if (y < -16 || y > 160) movs r3, r6 @ tmp184, y adds r3, r3, #16 @ tmp184, -@ Patches/../C_code.c:1439: if (y < -16 || y > 160) +@ Patches/../C_code.c:1444: if (y < -16 || y > 160) cmp r3, #176 @ tmp184, - bhi .L264 @, -@ Patches/../C_code.c:1386: if (UNIT_FACTION(unit) != FACTION_RED) + bhi .L267 @, +@ Patches/../C_code.c:1391: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp185, movs r3, #192 @ tmp186, ldrsb r2, [r4, r2] @ tmp185, ands r3, r2 @ tmp187, tmp185 -@ Patches/../C_code.c:1386: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:1391: if (UNIT_FACTION(unit) != FACTION_RED) cmp r3, #128 @ tmp187, - bne .L256 @, -@ Patches/../C_code.c:1443: if (UnitHasDroppableItem(unit)) + bne .L259 @, +@ Patches/../C_code.c:1448: if (UnitHasDroppableItem(unit)) ldr r3, [r4, #12] @ unit_30(D)->state, unit_30(D)->state lsls r3, r3, #19 @ tmp225, unit_30(D)->state, - bmi .L266 @, + bmi .L269 @, movs r3, #40 @ _107, mov r9, r3 @ _107, _107 - ldr r3, .L267+12 @ tmp220, - movs r7, r4 @ ivtmp.884, unit + ldr r3, .L270+12 @ tmp220, + movs r7, r4 @ ivtmp.889, unit add r9, r9, r4 @ _107, unit mov r8, r3 @ tmp220, tmp220 -@ Patches/../C_code.c:1394: return (GetItemData(item & 0xFF)->weaponType == 9); +@ Patches/../C_code.c:1399: return (GetItemData(item & 0xFF)->weaponType == 9); movs r4, #255 @ tmp201, - adds r7, r7, #30 @ ivtmp.884, -.L259: + adds r7, r7, #30 @ ivtmp.889, +.L262: ldrh r0, [r7] @ MEM[(short unsigned int *)_109], MEM[(short unsigned int *)_109] ands r0, r4 @ tmp206, tmp201 - bl .L208 @ -@ Patches/../C_code.c:1406: if (IsItemStealableSimple(unit->items[i])) + bl .L211 @ +@ Patches/../C_code.c:1411: if (IsItemStealableSimple(unit->items[i])) ldrb r3, [r0, #7] @ tmp209, cmp r3, #9 @ tmp209, - beq .L258 @, -@ Patches/../C_code.c:1403: for (int i = 0; i < 5; ++i) - adds r7, r7, #2 @ ivtmp.884, - cmp r9, r7 @ _107, ivtmp.884 - bne .L259 @, -.L256: -@ Patches/../C_code.c:1459: return true; + beq .L261 @, +@ Patches/../C_code.c:1408: for (int i = 0; i < 5; ++i) + adds r7, r7, #2 @ ivtmp.889, + cmp r9, r7 @ _107, ivtmp.889 + bne .L262 @, +.L259: +@ Patches/../C_code.c:1464: return true; movs r0, #1 @ , - b .L253 @ -.L264: -@ Patches/../C_code.c:1423: return false; + b .L256 @ +.L267: +@ Patches/../C_code.c:1428: return false; movs r0, #0 @ , -.L253: -@ Patches/../C_code.c:1460: } +.L256: +@ Patches/../C_code.c:1465: } @ sp needed @ pop {r6, r7} mov r9, r7 @@ -1856,53 +1887,53 @@ MaybeDisplayStealOrDropIcon: pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L258: -@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); +.L261: +@ Patches/../C_code.c:1455: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); movs r1, r4 @ tmp201, tmp201 -@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); - ldr r3, .L267+16 @ tmp237, -@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); +@ Patches/../C_code.c:1455: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); + ldr r3, .L270+16 @ tmp237, +@ Patches/../C_code.c:1455: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); adds r6, r6, #8 @ tmp213, -@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); +@ Patches/../C_code.c:1455: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); adds r0, r5, r3 @ tmp216, x, tmp237 -@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); +@ Patches/../C_code.c:1455: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); adds r6, r6, #255 @ tmp213, -@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); +@ Patches/../C_code.c:1455: CallARM_PushToSecondaryOAM(OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x865); lsls r0, r0, #23 @ tmp218, tmp216, lsrs r0, r0, #23 @ tmp217, tmp218, - ldr r2, .L267+20 @ tmp212, - ldr r3, .L267+24 @, - ldr r4, .L267+28 @ tmp219, + ldr r2, .L270+20 @ tmp212, + ldr r3, .L270+24 @, + ldr r4, .L270+28 @ tmp219, ands r1, r6 @ tmp201, tmp213 - bl .L269 @ -@ Patches/../C_code.c:1459: return true; + bl .L272 @ +@ Patches/../C_code.c:1464: return true; movs r0, #1 @ , - b .L253 @ -.L266: -@ Patches/../C_code.c:1445: CallARM_PushToSecondaryOAM( + b .L256 @ +.L269: +@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM( movs r1, #255 @ tmp194, -@ Patches/../C_code.c:1446: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 - ldr r3, .L267+16 @ tmp231, -@ Patches/../C_code.c:1446: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 +@ Patches/../C_code.c:1451: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 + ldr r3, .L270+16 @ tmp231, +@ Patches/../C_code.c:1451: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 adds r6, r6, #8 @ tmp193, -@ Patches/../C_code.c:1446: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 +@ Patches/../C_code.c:1451: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 adds r0, r5, r3 @ tmp196, x, tmp231 -@ Patches/../C_code.c:1446: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 +@ Patches/../C_code.c:1451: OAM1_X(0x200 + x + 1), OAM0_Y(0x100 + y + 7), gObject_8x8, 0x869); // 0x869 priority 2 tile 0x69 adds r6, r6, #255 @ tmp193, -@ Patches/../C_code.c:1445: CallARM_PushToSecondaryOAM( +@ Patches/../C_code.c:1450: CallARM_PushToSecondaryOAM( lsls r0, r0, #23 @ tmp198, tmp196, lsrs r0, r0, #23 @ tmp197, tmp198, - ldr r2, .L267+20 @ tmp192, - ldr r3, .L267+32 @, - ldr r4, .L267+28 @ tmp199, + ldr r2, .L270+20 @ tmp192, + ldr r3, .L270+32 @, + ldr r4, .L270+28 @ tmp199, ands r1, r6 @ tmp195, tmp193 - bl .L269 @ -@ Patches/../C_code.c:1459: return true; + bl .L272 @ +@ Patches/../C_code.c:1464: return true; movs r0, #1 @ , - b .L253 @ -.L268: + b .L256 @ +.L271: .align 2 -.L267: +.L270: .word GetGameClock .word gCameraX .word gCameraY @@ -1925,45 +1956,45 @@ GetAdjustedPortraitId: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1541: { +@ Patches/../C_code.c:1546: { movs r4, r0 @ unit, tmp130 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); - ldr r3, .L274 @ tmp124, +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); + ldr r3, .L277 @ tmp124, bl .L14 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r4] @ _1, unit_10(D)->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp125, cmp r2, #0 @ tmp125, - bne .L271 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L274 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp126, ldrsb r2, [r4, r2] @ tmp126, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp126, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r0, #255 @ tmp128, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp127, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp127, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r0, r3 @ , portraitID -.L271: -@ Patches/../C_code.c:1549: if (!portraitID) +.L274: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r0, #0 @ , - bne .L270 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L273 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r0, r0, #1 @ , -.L270: -@ Patches/../C_code.c:1554: } +.L273: +@ Patches/../C_code.c:1559: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L275: +.L278: .align 2 -.L274: +.L277: .word GetUnitPortraitId .size GetAdjustedPortraitId, .-GetAdjustedPortraitId .align 1 @@ -1978,33 +2009,33 @@ ShouldRandomizeColours: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1560: if (NeverRandomizeColours) - ldr r3, .L279 @ tmp120, -@ Patches/../C_code.c:1560: if (NeverRandomizeColours) +@ Patches/../C_code.c:1565: if (NeverRandomizeColours) + ldr r3, .L282 @ tmp120, +@ Patches/../C_code.c:1565: if (NeverRandomizeColours) ldr r3, [r3] @ NeverRandomizeColours, NeverRandomizeColours cmp r3, #0 @ NeverRandomizeColours, - bne .L278 @, -@ Patches/../C_code.c:1564: if (RandBitflags->colours) + bne .L281 @, +@ Patches/../C_code.c:1569: if (RandBitflags->colours) movs r0, #7 @ tmp129, -@ Patches/../C_code.c:1564: if (RandBitflags->colours) - ldr r3, .L279+4 @ tmp123, +@ Patches/../C_code.c:1569: if (RandBitflags->colours) + ldr r3, .L282+4 @ tmp123, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.44_5, *RandBitflags.44_5 -@ Patches/../C_code.c:1564: if (RandBitflags->colours) - ands r0, r3 @ tmp131, *RandBitflags.44_5 + ldrb r3, [r3, #2] @ *RandBitflags.45_5, *RandBitflags.45_5 +@ Patches/../C_code.c:1569: if (RandBitflags->colours) + ands r0, r3 @ tmp131, *RandBitflags.45_5 subs r3, r0, #1 @ tmp134, tmp131 sbcs r0, r0, r3 @ , tmp131, tmp134 -.L276: -@ Patches/../C_code.c:1569: } +.L279: +@ Patches/../C_code.c:1574: } @ sp needed @ bx lr -.L278: -@ Patches/../C_code.c:1562: return false; +.L281: +@ Patches/../C_code.c:1567: return false; movs r0, #0 @ , - b .L276 @ -.L280: + b .L279 @ +.L283: .align 2 -.L279: +.L282: .word NeverRandomizeColours .word RandBitflags .size ShouldRandomizeColours, .-ShouldRandomizeColours @@ -2020,51 +2051,51 @@ AnyFadeExists: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1678: if (FadeExists()) - ldr r3, .L285 @ tmp121, +@ Patches/../C_code.c:1683: if (FadeExists()) + ldr r3, .L288 @ tmp121, bl .L14 @ -@ Patches/../C_code.c:1678: if (FadeExists()) +@ Patches/../C_code.c:1683: if (FadeExists()) cmp r0, #0 @ tmp136, - beq .L282 @, -.L284: -@ Patches/../C_code.c:1679: return true; + beq .L285 @, +.L287: +@ Patches/../C_code.c:1684: return true; movs r0, #1 @ , -.L281: -@ Patches/../C_code.c:1690: } +.L284: +@ Patches/../C_code.c:1695: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L282: -@ Patches/../C_code.c:1680: if (Proc_Find(ProcScr_FadeCore)) - ldr r0, .L285+4 @ tmp124, - ldr r4, .L285+8 @ tmp125, - bl .L269 @ -@ Patches/../C_code.c:1680: if (Proc_Find(ProcScr_FadeCore)) +.L285: +@ Patches/../C_code.c:1685: if (Proc_Find(ProcScr_FadeCore)) + ldr r0, .L288+4 @ tmp124, + ldr r4, .L288+8 @ tmp125, + bl .L272 @ +@ Patches/../C_code.c:1685: if (Proc_Find(ProcScr_FadeCore)) cmp r0, #0 @ tmp137, - bne .L284 @, -@ Patches/../C_code.c:1682: if (Proc_Find(ProcScr_PalFade)) - ldr r0, .L285+12 @ tmp126, - bl .L269 @ -@ Patches/../C_code.c:1682: if (Proc_Find(ProcScr_PalFade)) + bne .L287 @, +@ Patches/../C_code.c:1687: if (Proc_Find(ProcScr_PalFade)) + ldr r0, .L288+12 @ tmp126, + bl .L272 @ +@ Patches/../C_code.c:1687: if (Proc_Find(ProcScr_PalFade)) cmp r0, #0 @ tmp138, - bne .L284 @, -@ Patches/../C_code.c:1684: if (Proc_Find(ProcScr_BmFadeIN)) - ldr r0, .L285+16 @ tmp128, - bl .L269 @ -@ Patches/../C_code.c:1684: if (Proc_Find(ProcScr_BmFadeIN)) + bne .L287 @, +@ Patches/../C_code.c:1689: if (Proc_Find(ProcScr_BmFadeIN)) + ldr r0, .L288+16 @ tmp128, + bl .L272 @ +@ Patches/../C_code.c:1689: if (Proc_Find(ProcScr_BmFadeIN)) cmp r0, #0 @ tmp139, - bne .L284 @, -@ Patches/../C_code.c:1686: if (Proc_Find(ProcScr_BmFadeOUT)) - ldr r0, .L285+20 @ tmp130, - bl .L269 @ -@ Patches/../C_code.c:1686: if (Proc_Find(ProcScr_BmFadeOUT)) + bne .L287 @, +@ Patches/../C_code.c:1691: if (Proc_Find(ProcScr_BmFadeOUT)) + ldr r0, .L288+20 @ tmp130, + bl .L272 @ +@ Patches/../C_code.c:1691: if (Proc_Find(ProcScr_BmFadeOUT)) subs r3, r0, #1 @ tmp134, tmp140 sbcs r0, r0, r3 @ , tmp140, tmp134 - b .L281 @ -.L286: + b .L284 @ +.L289: .align 2 -.L285: +.L288: .word FadeExists .word ProcScr_FadeCore .word Proc_Find @@ -2084,35 +2115,35 @@ ShouldRandomizeGrowth: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L290 @ tmp125, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L293 @ tmp125, ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_1, *RandBitflags.63_1 - ldr r3, .L290+4 @ tmp128, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_1, tmp128 - beq .L289 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r2, [r3] @ *RandBitflags.64_1, *RandBitflags.64_1 + ldr r3, .L293+4 @ tmp128, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_1, tmp128 + beq .L292 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_6(D)], MEM[(const struct CharacterData * *)unit_6(D)] ldrb r2, [r2, #4] @ tmp131, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L290+8 @ tmp129, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L293+8 @ tmp129, lsls r2, r2, #1 @ tmp132, tmp131, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r0, [r2, r3] @ tmp134, CharExceptions rsbs r3, r0, #0 @ tmp136, tmp134 adcs r0, r0, r3 @ , tmp134, tmp136 -.L287: -@ Patches/../C_code.c:1978: } +.L290: +@ Patches/../C_code.c:1983: } @ sp needed @ bx lr -.L289: -@ Patches/../C_code.c:1975: return false; +.L292: +@ Patches/../C_code.c:1980: return false; movs r0, #0 @ , - b .L287 @ -.L291: + b .L290 @ +.L294: .align 2 -.L290: +.L293: .word RandBitflags .word 268435468 .word CharExceptions @@ -2129,36 +2160,36 @@ ShouldRandomizeStatCaps: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L295 @ tmp125, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L298 @ tmp125, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r2, [r3] @ *RandBitflags.64_1, *RandBitflags.64_1 + ldrh r2, [r3] @ *RandBitflags.65_1, *RandBitflags.65_1 movs r3, #224 @ tmp129, lsls r3, r3, #1 @ tmp129, tmp129, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r2, r3 @ *RandBitflags.64_1, tmp129 - beq .L294 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r2, r3 @ *RandBitflags.65_1, tmp129 + beq .L297 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_6(D)], MEM[(const struct CharacterData * *)unit_6(D)] ldrb r2, [r2, #4] @ tmp135, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L295+4 @ tmp133, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L298+4 @ tmp133, lsls r2, r2, #1 @ tmp136, tmp135, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r0, [r2, r3] @ tmp138, CharExceptions rsbs r3, r0, #0 @ tmp140, tmp138 adcs r0, r0, r3 @ , tmp138, tmp140 -.L292: -@ Patches/../C_code.c:1986: } +.L295: +@ Patches/../C_code.c:1991: } @ sp needed @ bx lr -.L294: -@ Patches/../C_code.c:1983: return false; +.L297: +@ Patches/../C_code.c:1988: return false; movs r0, #0 @ , - b .L292 @ -.L296: + b .L295 @ +.L299: .align 2 -.L295: +.L298: .word RandBitflags .word CharExceptions .size ShouldRandomizeStatCaps, .-ShouldRandomizeStatCaps @@ -2174,72 +2205,72 @@ ShouldRandomizeClass: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:1990: int config = RandBitflags->class; - ldr r3, .L308 @ tmp131, +@ Patches/../C_code.c:1995: int config = RandBitflags->class; + ldr r3, .L311 @ tmp131, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.65_1, *RandBitflags.65_1 - lsls r3, r3, #29 @ tmp136, *RandBitflags.65_1, -@ Patches/../C_code.c:1989: { + ldrb r3, [r3, #1] @ *RandBitflags.66_1, *RandBitflags.66_1 + lsls r3, r3, #29 @ tmp136, *RandBitflags.66_1, +@ Patches/../C_code.c:1994: { movs r2, r0 @ unit, tmp155 -@ Patches/../C_code.c:1990: int config = RandBitflags->class; +@ Patches/../C_code.c:1995: int config = RandBitflags->class; lsrs r0, r3, #30 @ , tmp136, -@ Patches/../C_code.c:1991: if (!config) - beq .L297 @, -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:1996: if (!config) + beq .L300 @, +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) cmp r0, #3 @ , - beq .L306 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + beq .L309 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players ldr r3, [r2] @ unit_14(D)->pCharacterData, unit_14(D)->pCharacterData ldrb r3, [r3, #4] @ prephitmp_28, -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) cmp r0, #2 @ , - beq .L307 @, -.L300: -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r2, .L308+4 @ tmp148, + beq .L310 @, +.L303: +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r2, .L311+4 @ tmp148, lsls r3, r3, #1 @ tmp149, prephitmp_28, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r0, [r3, r2] @ tmp151, CharExceptions rsbs r3, r0, #0 @ tmp153, tmp151 adcs r0, r0, r3 @ , tmp151, tmp153 -.L297: -@ Patches/../C_code.c:2013: } +.L300: +@ Patches/../C_code.c:2018: } @ sp needed @ bx lr -.L306: -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +.L309: +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) movs r1, #11 @ tmp138, movs r3, #192 @ tmp139, ldrsb r1, [r2, r1] @ tmp138, -@ Patches/../C_code.c:1993: return false; +@ Patches/../C_code.c:1998: return false; movs r0, #0 @ , -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) ands r3, r1 @ tmp140, tmp138 -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) cmp r3, #128 @ tmp140, - bne .L297 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + bne .L300 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players ldr r3, [r2] @ unit_14(D)->pCharacterData, unit_14(D)->pCharacterData ldrb r3, [r3, #4] @ prephitmp_28, - b .L300 @ -.L307: -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) + b .L303 @ +.L310: +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) movs r1, #11 @ tmp143, ldrsb r1, [r2, r1] @ tmp143, movs r2, #192 @ tmp144, ands r2, r1 @ tmp145, tmp143 -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) cmp r2, #128 @ tmp145, - bne .L300 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + bne .L303 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players cmp r3, #58 @ prephitmp_28, - bls .L300 @, -@ Patches/../C_code.c:1993: return false; + bls .L303 @, +@ Patches/../C_code.c:1998: return false; movs r0, #0 @ , - b .L297 @ -.L309: + b .L300 @ +.L312: .align 2 -.L308: +.L311: .word RandBitflags .word CharExceptions .size ShouldRandomizeClass, .-ShouldRandomizeClass @@ -2254,94 +2285,94 @@ IsClassOrRecruitmentRandomized: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:1990: int config = RandBitflags->class; - ldr r2, .L325 @ tmp135, -@ Patches/../C_code.c:2015: { +@ Patches/../C_code.c:1995: int config = RandBitflags->class; + ldr r2, .L328 @ tmp135, +@ Patches/../C_code.c:2020: { push {r4, lr} @ -@ Patches/../C_code.c:1990: int config = RandBitflags->class; +@ Patches/../C_code.c:1995: int config = RandBitflags->class; ldr r2, [r2] @ RandBitflags, RandBitflags - ldrb r4, [r2, #1] @ *RandBitflags.65_16, *RandBitflags.65_16 -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + ldrb r4, [r2, #1] @ *RandBitflags.66_16, *RandBitflags.66_16 +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players ldr r2, [r0] @ unit_5(D)->pCharacterData, unit_5(D)->pCharacterData -@ Patches/../C_code.c:1990: int config = RandBitflags->class; - lsls r4, r4, #29 @ tmp140, *RandBitflags.65_16, -@ Patches/../C_code.c:2015: { +@ Patches/../C_code.c:1995: int config = RandBitflags->class; + lsls r4, r4, #29 @ tmp140, *RandBitflags.66_16, +@ Patches/../C_code.c:2020: { movs r3, r0 @ unit, tmp169 -@ Patches/../C_code.c:1990: int config = RandBitflags->class; +@ Patches/../C_code.c:1995: int config = RandBitflags->class; lsrs r4, r4, #30 @ , tmp140, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players ldrb r0, [r2, #4] @ _67, -@ Patches/../C_code.c:1991: if (!config) +@ Patches/../C_code.c:1996: if (!config) cmp r4, #0 @ , - beq .L311 @, -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) + beq .L314 @, +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) cmp r4, #3 @ , - beq .L323 @, -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) + beq .L326 @, +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) cmp r4, #2 @ , - beq .L324 @, -.L313: -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L325+4 @ tmp151, + beq .L327 @, +.L316: +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L328+4 @ tmp151, lsls r2, r0, #1 @ tmp152, _67, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r4, [r2, r3] @ tmp154, CharExceptions rsbs r3, r4, #0 @ tmp156, tmp154 adcs r4, r4, r3 @ , tmp154, tmp156 -.L311: +.L314: @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) - ldr r3, .L325+8 @ tmp157, + ldr r3, .L328+8 @ tmp157, bl .L14 @ @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) ldrh r3, [r0, #6] @ tmp158, cmp r3, #0 @ tmp158, - beq .L310 @, + beq .L313 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L325+12 @ tmp160, + ldr r3, .L328+12 @ tmp160, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_12, *RecruitValues.0_12 lsls r3, r3, #29 @ tmp165, *RecruitValues.0_12, lsrs r3, r3, #29 @ tmp166, tmp165, -@ Patches/../C_code.c:2017: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); +@ Patches/../C_code.c:2022: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); orrs r4, r3 @ , tmp166 -.L310: -@ Patches/../C_code.c:2019: } +.L313: +@ Patches/../C_code.c:2024: } movs r0, r4 @, @ sp needed @ pop {r4} pop {r1} bx r1 -.L323: -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +.L326: +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) movs r2, #11 @ tmp143, ldrsb r2, [r3, r2] @ tmp143, movs r3, #192 @ tmp144, -@ Patches/../C_code.c:1993: return false; +@ Patches/../C_code.c:1998: return false; movs r4, #0 @ , -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) ands r3, r2 @ tmp145, tmp143 -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) cmp r3, #128 @ tmp145, - bne .L311 @, - b .L313 @ -.L324: -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) + bne .L314 @, + b .L316 @ +.L327: +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) movs r2, #11 @ tmp146, ldrsb r2, [r3, r2] @ tmp146, movs r3, #192 @ tmp147, ands r3, r2 @ tmp148, tmp146 -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) cmp r3, #128 @ tmp148, - bne .L313 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + bne .L316 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players cmp r0, #58 @ _67, - bls .L313 @, -@ Patches/../C_code.c:1993: return false; + bls .L316 @, +@ Patches/../C_code.c:1998: return false; movs r4, #0 @ , - b .L311 @ -.L326: + b .L314 @ +.L329: .align 2 -.L325: +.L328: .word RandBitflags .word CharExceptions .word GetCharacterData @@ -2359,70 +2390,70 @@ IsAnythingRandomized: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - ldr r3, .L328 @ tmp141, -@ Patches/../C_code.c:2026: } +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + ldr r3, .L331 @ tmp141, +@ Patches/../C_code.c:2031: } @ sp needed @ -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - ldr r1, [r3] @ RandBitflags.66_1, RandBitflags -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - ldr r3, .L328+4 @ tmp144, +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + ldr r1, [r3] @ RandBitflags.67_1, RandBitflags +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + ldr r3, .L331+4 @ tmp144, ldr r3, [r3] @ RecruitValues, RecruitValues -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - ldrb r2, [r1] @ *RandBitflags.66_1, *RandBitflags.66_1 -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - ldrb r0, [r3] @ *RecruitValues.67_4, *RecruitValues.67_4 -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - lsls r3, r2, #30 @ tmp156, *RandBitflags.66_1, -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | - lsls r0, r0, #29 @ tmp149, *RecruitValues.67_4, -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + ldrb r2, [r1] @ *RandBitflags.67_1, *RandBitflags.67_1 +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + ldrb r0, [r3] @ *RecruitValues.68_4, *RecruitValues.68_4 +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + lsls r3, r2, #30 @ tmp156, *RandBitflags.67_1, +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | + lsls r0, r0, #29 @ tmp149, *RecruitValues.68_4, +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | lsrs r3, r3, #30 @ tmp157, tmp156, -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | lsrs r0, r0, #29 @ tmp150, tmp149, -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r3 @ tmp159, tmp157 -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | - ldrh r3, [r1] @ *RandBitflags.66_1, *RandBitflags.66_1 - lsls r3, r3, #23 @ tmp164, *RandBitflags.66_1, +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | + ldrh r3, [r1] @ *RandBitflags.67_1, *RandBitflags.67_1 + lsls r3, r3, #23 @ tmp164, *RandBitflags.67_1, lsrs r3, r3, #29 @ tmp165, tmp164, -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r3 @ tmp167, tmp165 -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | - ldrb r3, [r1, #2] @ *RandBitflags.66_1, *RandBitflags.66_1 - lsls r3, r3, #27 @ tmp172, *RandBitflags.66_1, +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | + ldrb r3, [r1, #2] @ *RandBitflags.67_1, *RandBitflags.67_1 + lsls r3, r3, #27 @ tmp172, *RandBitflags.67_1, lsrs r3, r3, #30 @ tmp173, tmp172, -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r3 @ tmp175, tmp173 -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | - ldrb r3, [r1, #1] @ *RandBitflags.66_1, *RandBitflags.66_1 - lsls r1, r3, #29 @ tmp180, *RandBitflags.66_1, +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | + ldrb r3, [r1, #1] @ *RandBitflags.67_1, *RandBitflags.67_1 + lsls r1, r3, #29 @ tmp180, *RandBitflags.67_1, lsrs r1, r1, #30 @ tmp181, tmp180, -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r1 @ tmp183, tmp181 -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | - lsls r1, r3, #28 @ tmp188, *RandBitflags.66_1, +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | + lsls r1, r3, #28 @ tmp188, *RandBitflags.67_1, lsrs r1, r1, #31 @ tmp189, tmp188, -@ Patches/../C_code.c:2025: RandBitflags->foundItems; - lsls r3, r3, #26 @ tmp196, *RandBitflags.66_1, -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2030: RandBitflags->foundItems; + lsls r3, r3, #26 @ tmp196, *RandBitflags.67_1, +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r1 @ tmp191, tmp189 -@ Patches/../C_code.c:2025: RandBitflags->foundItems; +@ Patches/../C_code.c:2030: RandBitflags->foundItems; lsrs r3, r3, #30 @ tmp197, tmp196, -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r3 @ tmp199, tmp197 -@ Patches/../C_code.c:2023: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | +@ Patches/../C_code.c:2028: return RandBitflags->base | RecruitValues->recruitment | ((RandBitflags->growth != 4) && (RandBitflags->growth)) | movs r3, #12 @ tmp205, - ands r3, r2 @ tmp207, *RandBitflags.66_1 + ands r3, r2 @ tmp207, *RandBitflags.67_1 subs r2, r3, #1 @ tmp210, tmp207 sbcs r3, r3, r2 @ tmp209, tmp207, tmp210 -@ Patches/../C_code.c:2024: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | +@ Patches/../C_code.c:2029: RandBitflags->caps | RandBitflags->itemStats | RandBitflags->class | RandBitflags->shopItems | orrs r0, r3 @ tmp142, tmp209 -@ Patches/../C_code.c:2026: } +@ Patches/../C_code.c:2031: } bx lr -.L329: +.L332: .align 2 -.L328: +.L331: .word RandBitflags .word RecruitValues .size IsAnythingRandomized, .-IsAnythingRandomized @@ -2438,20 +2469,20 @@ GetSeed: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:2030: return RandValues->seed; - ldr r3, .L331 @ tmp119, -@ Patches/../C_code.c:2031: } +@ Patches/../C_code.c:2035: return RandValues->seed; + ldr r3, .L334 @ tmp119, +@ Patches/../C_code.c:2036: } @ sp needed @ -@ Patches/../C_code.c:2030: return RandValues->seed; +@ Patches/../C_code.c:2035: return RandValues->seed; ldr r3, [r3] @ RandValues, RandValues - ldr r0, [r3] @ *RandValues.74_1, *RandValues.74_1 - lsls r0, r0, #12 @ tmp121, *RandValues.74_1, + ldr r0, [r3] @ *RandValues.75_1, *RandValues.75_1 + lsls r0, r0, #12 @ tmp121, *RandValues.75_1, lsrs r0, r0, #12 @ tmp117, tmp121, -@ Patches/../C_code.c:2031: } +@ Patches/../C_code.c:2036: } bx lr -.L332: +.L335: .align 2 -.L331: +.L334: .word RandValues .size GetSeed, .-GetSeed .align 1 @@ -2466,19 +2497,19 @@ ShouldChangeAI: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:2035: return RecruitValues->ai; - ldr r3, .L334 @ tmp119, -@ Patches/../C_code.c:2036: } +@ Patches/../C_code.c:2040: return RecruitValues->ai; + ldr r3, .L337 @ tmp119, +@ Patches/../C_code.c:2041: } @ sp needed @ -@ Patches/../C_code.c:2035: return RecruitValues->ai; +@ Patches/../C_code.c:2040: return RecruitValues->ai; ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r0, [r3] @ *RecruitValues.75_1, *RecruitValues.75_1 - lsrs r0, r0, #6 @ tmp117, *RecruitValues.75_1, -@ Patches/../C_code.c:2036: } + ldrb r0, [r3] @ *RecruitValues.76_1, *RecruitValues.76_1 + lsrs r0, r0, #6 @ tmp117, *RecruitValues.76_1, +@ Patches/../C_code.c:2041: } bx lr -.L335: +.L338: .align 2 -.L334: +.L337: .word RecruitValues .size ShouldChangeAI, .-ShouldChangeAI .align 1 @@ -2492,69 +2523,69 @@ GetMaxItems: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2067: if (MaxItems_Link) - ldr r3, .L347 @ tmp124, +@ Patches/../C_code.c:2072: if (MaxItems_Link) + ldr r3, .L350 @ tmp124, ldr r0, [r3] @ , MaxItems_Link -@ Patches/../C_code.c:2066: { +@ Patches/../C_code.c:2071: { push {r4, lr} @ -@ Patches/../C_code.c:2067: if (MaxItems_Link) +@ Patches/../C_code.c:2072: if (MaxItems_Link) cmp r0, #0 @ , - bne .L336 @, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) - ldr r4, .L347+4 @ tmp136, + bne .L339 @, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) + ldr r4, .L350+4 @ tmp136, ldr r3, [r4] @ MaxItems, MaxItems - ldrb r0, [r3] @ _3, *MaxItems.88_2 -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + ldrb r0, [r3] @ _3, *MaxItems.89_2 +@ Patches/../C_code.c:2076: if (*MaxItems > 1) cmp r0, #1 @ _3, - bls .L346 @, -.L336: -@ Patches/../C_code.c:2096: } + bls .L349 @, +.L339: +@ Patches/../C_code.c:2101: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L346: -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); - ldr r3, .L347+8 @ tmp129, +.L349: +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); + ldr r3, .L350+8 @ tmp129, movs r0, #1 @, bl .L14 @ -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ tmp130, -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) movs r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r2, #1 @ tmp130, - bne .L341 @, -.L339: -@ Patches/../C_code.c:2083: table++; + bne .L344 @, +.L342: +@ Patches/../C_code.c:2088: table++; adds r0, r0, #36 @ table, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ MEM[(unsigned char *)table_16 + 6B], MEM[(unsigned char *)table_16 + 6B] -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r3, r2 @ i, MEM[(unsigned char *)table_16 + 6B] - beq .L339 @, -.L341: -@ Patches/../C_code.c:2085: int c = table->number; + beq .L342 @, +.L344: +@ Patches/../C_code.c:2090: int c = table->number; subs r0, r0, #36 @ tmp131, ldrb r3, [r0, #6] @ prephitmp_5, -@ Patches/../C_code.c:2085: int c = table->number; +@ Patches/../C_code.c:2090: int c = table->number; subs r0, r3, #0 @ , prephitmp_5, -@ Patches/../C_code.c:2090: if (c < 1) - bne .L340 @, +@ Patches/../C_code.c:2095: if (c < 1) + bne .L343 @, movs r3, #1 @ prephitmp_5, -@ Patches/../C_code.c:2092: c = 1; +@ Patches/../C_code.c:2097: c = 1; movs r0, #1 @ , -.L340: -@ Patches/../C_code.c:2094: *MaxItems = c; - ldr r2, [r4] @ MaxItems.90_21, MaxItems -@ Patches/../C_code.c:2094: *MaxItems = c; - strb r3, [r2] @ prephitmp_5, *MaxItems.90_21 - b .L336 @ -.L348: +.L343: +@ Patches/../C_code.c:2099: *MaxItems = c; + ldr r2, [r4] @ MaxItems.91_21, MaxItems +@ Patches/../C_code.c:2099: *MaxItems = c; + strb r3, [r2] @ prephitmp_5, *MaxItems.91_21 + b .L339 @ +.L351: .align 2 -.L347: +.L350: .word MaxItems_Link .word MaxItems .word GetItemData @@ -2570,84 +2601,84 @@ GetMaxClasses: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2099: if (MaxClasses_Link) - ldr r3, .L361 @ tmp130, +@ Patches/../C_code.c:2104: if (MaxClasses_Link) + ldr r3, .L364 @ tmp130, ldr r0, [r3] @ , MaxClasses_Link -@ Patches/../C_code.c:2098: { +@ Patches/../C_code.c:2103: { push {r4, lr} @ -@ Patches/../C_code.c:2099: if (MaxClasses_Link) +@ Patches/../C_code.c:2104: if (MaxClasses_Link) cmp r0, #0 @ , - bne .L349 @, -@ Patches/../C_code.c:2103: if (*MaxClasses > 1) - ldr r4, .L361+4 @ tmp151, + bne .L352 @, +@ Patches/../C_code.c:2108: if (*MaxClasses > 1) + ldr r4, .L364+4 @ tmp151, ldr r3, [r4] @ MaxClasses, MaxClasses - ldrb r0, [r3] @ _3, *MaxClasses.92_2 -@ Patches/../C_code.c:2103: if (*MaxClasses > 1) + ldrb r0, [r3] @ _3, *MaxClasses.93_2 +@ Patches/../C_code.c:2108: if (*MaxClasses > 1) cmp r0, #1 @ _3, - bls .L360 @, -.L349: -@ Patches/../C_code.c:2147: } + bls .L363 @, +.L352: +@ Patches/../C_code.c:2152: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L360: -@ Patches/../C_code.c:2107: const struct ClassData * table = GetClassData(1); - ldr r3, .L361+8 @ tmp135, +.L363: +@ Patches/../C_code.c:2112: const struct ClassData * table = GetClassData(1); + ldr r3, .L364+8 @ tmp135, movs r0, #1 @, bl .L14 @ -@ Patches/../C_code.c:2122: if (!RecruitValues->newClasses) - ldr r3, .L361+12 @ tmp137, +@ Patches/../C_code.c:2127: if (!RecruitValues->newClasses) + ldr r3, .L364+12 @ tmp137, ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r2, [r3] @ *RecruitValues.94_11, *RecruitValues.94_11 -@ Patches/../C_code.c:2122: if (!RecruitValues->newClasses) + ldrb r2, [r3] @ *RecruitValues.95_11, *RecruitValues.95_11 +@ Patches/../C_code.c:2127: if (!RecruitValues->newClasses) movs r3, #48 @ tmp143, - ands r3, r2 @ tmp145, *RecruitValues.94_11 -@ Patches/../C_code.c:2124: c = 126; + ands r3, r2 @ tmp145, *RecruitValues.95_11 +@ Patches/../C_code.c:2129: c = 126; subs r2, r3, #1 @ tmp153, tmp145 sbcs r3, r3, r2 @ tmp152, tmp145, tmp153 movs r1, #130 @ tmp155, rsbs r3, r3, #0 @ tmp154, tmp152 ands r1, r3 @ c, tmp154 adds r1, r1, #127 @ _28, -@ Patches/../C_code.c:2127: for (int i = 1; i <= c; i++) +@ Patches/../C_code.c:2132: for (int i = 1; i <= c; i++) movs r3, #1 @ i, - b .L355 @ -.L353: -@ Patches/../C_code.c:2127: for (int i = 1; i <= c; i++) + b .L358 @ +.L356: +@ Patches/../C_code.c:2132: for (int i = 1; i <= c; i++) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2134: table++; +@ Patches/../C_code.c:2139: table++; adds r0, r0, #84 @ table, -@ Patches/../C_code.c:2127: for (int i = 1; i <= c; i++) +@ Patches/../C_code.c:2132: for (int i = 1; i <= c; i++) cmp r3, r1 @ i, _28 - beq .L354 @, -.L355: -@ Patches/../C_code.c:2129: if (table->number != i) + beq .L357 @, +.L358: +@ Patches/../C_code.c:2134: if (table->number != i) ldrb r2, [r0, #4] @ MEM[(unsigned char *)table_18 + 4B], MEM[(unsigned char *)table_18 + 4B] -@ Patches/../C_code.c:2129: if (table->number != i) +@ Patches/../C_code.c:2134: if (table->number != i) cmp r2, r3 @ MEM[(unsigned char *)table_18 + 4B], i - beq .L353 @, -@ Patches/../C_code.c:2131: table--; + beq .L356 @, +@ Patches/../C_code.c:2136: table--; subs r0, r0, #84 @ table, -.L354: -@ Patches/../C_code.c:2136: c = table->number; +.L357: +@ Patches/../C_code.c:2141: c = table->number; ldrb r3, [r0, #4] @ prephitmp_7, -@ Patches/../C_code.c:2136: c = table->number; +@ Patches/../C_code.c:2141: c = table->number; subs r0, r3, #0 @ , prephitmp_7, -@ Patches/../C_code.c:2141: if (c < 1) - bne .L356 @, -@ Patches/../C_code.c:2143: c = 1; +@ Patches/../C_code.c:2146: if (c < 1) + bne .L359 @, +@ Patches/../C_code.c:2148: c = 1; movs r0, #1 @ , adds r3, r3, #1 @ prephitmp_7, -.L356: -@ Patches/../C_code.c:2145: *MaxClasses = c; - ldr r2, [r4] @ MaxClasses.95_26, MaxClasses -@ Patches/../C_code.c:2145: *MaxClasses = c; - strb r3, [r2] @ prephitmp_7, *MaxClasses.95_26 - b .L349 @ -.L362: +.L359: +@ Patches/../C_code.c:2150: *MaxClasses = c; + ldr r2, [r4] @ MaxClasses.96_26, MaxClasses +@ Patches/../C_code.c:2150: *MaxClasses = c; + strb r3, [r2] @ prephitmp_7, *MaxClasses.96_26 + b .L352 @ +.L365: .align 2 -.L361: +.L364: .word MaxClasses_Link .word MaxClasses .word GetClassData @@ -2665,25 +2696,25 @@ NextSeededRN_Simple: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:2152: u32 rn0 = rn & 0xFFFF; +@ Patches/../C_code.c:2157: u32 rn0 = rn & 0xFFFF; lsls r1, r0, #16 @ tmp126, rn, -@ Patches/../C_code.c:2153: u32 rn1 = rn >> 16; +@ Patches/../C_code.c:2158: u32 rn1 = rn >> 16; lsrs r3, r0, #16 @ rn1, rn, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsls r2, r3, #11 @ tmp127, rn1, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsrs r0, r1, #21 @ tmp128, tmp126, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r2, r2, r0 @ tmp129, tmp127, tmp128 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; orrs r3, r1 @ tmp135, tmp126 -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r2, r2, r1 @ rn, tmp129, tmp126 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; lsrs r0, r3, #15 @ rn0, tmp135, -@ Patches/../C_code.c:2163: rn ^= rn0; +@ Patches/../C_code.c:2168: rn ^= rn0; eors r0, r2 @ rn, rn -@ Patches/../C_code.c:2165: } +@ Patches/../C_code.c:2170: } @ sp needed @ bx lr .size NextSeededRN_Simple, .-NextSeededRN_Simple @@ -2700,88 +2731,88 @@ InitSeededRN_Simple: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ sub sp, sp, #16 @,, -@ Patches/../C_code.c:2172: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; +@ Patches/../C_code.c:2177: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; mov r4, sp @ tmp135, movs r2, r4 @ tmp137, tmp135 -@ Patches/../C_code.c:2168: { +@ Patches/../C_code.c:2173: { movs r5, r0 @ seed, tmp164 -@ Patches/../C_code.c:2172: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; - ldr r3, .L374 @ tmp138, +@ Patches/../C_code.c:2177: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; + ldr r3, .L377 @ tmp138, ldmia r3!, {r0, r1, r6} @ tmp138, tmp168, tmp167, tmp169 stmia r2!, {r0, r1, r6} @ tmp137, tmp168, tmp167, tmp169 ldr r3, [r3] @ tmp139, -@ Patches/../C_code.c:2174: int mod = Mod(seed, 7); +@ Patches/../C_code.c:2179: int mod = Mod(seed, 7); movs r1, #7 @, -@ Patches/../C_code.c:2172: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; +@ Patches/../C_code.c:2177: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; str r3, [r2] @ tmp139, -@ Patches/../C_code.c:2174: int mod = Mod(seed, 7); +@ Patches/../C_code.c:2179: int mod = Mod(seed, 7); movs r0, r5 @, seed - ldr r6, .L374+4 @ tmp140, - bl .L143 @ -@ Patches/../C_code.c:2176: currentRN = initTable[(mod++ & 7)]; + ldr r6, .L377+4 @ tmp140, + bl .L146 @ +@ Patches/../C_code.c:2181: currentRN = initTable[(mod++ & 7)]; movs r3, #7 @ tmp142, movs r2, r3 @ tmp143, tmp142 ands r2, r0 @ tmp143, mod -@ Patches/../C_code.c:2176: currentRN = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2181: currentRN = initTable[(mod++ & 7)]; adds r0, r0, #1 @ mod, -@ Patches/../C_code.c:2177: currentRN |= initTable[(mod++ & 7)] << 16; +@ Patches/../C_code.c:2182: currentRN |= initTable[(mod++ & 7)] << 16; ands r3, r0 @ tmp148, mod -@ Patches/../C_code.c:2176: currentRN = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2181: currentRN = initTable[(mod++ & 7)]; lsls r2, r2, #1 @ tmp144, tmp143, -@ Patches/../C_code.c:2177: currentRN |= initTable[(mod++ & 7)] << 16; +@ Patches/../C_code.c:2182: currentRN |= initTable[(mod++ & 7)] << 16; lsls r3, r3, #1 @ tmp149, tmp148, -@ Patches/../C_code.c:2176: currentRN = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2181: currentRN = initTable[(mod++ & 7)]; ldrh r2, [r2, r4] @ currentRN, initTable -@ Patches/../C_code.c:2177: currentRN |= initTable[(mod++ & 7)] << 16; +@ Patches/../C_code.c:2182: currentRN |= initTable[(mod++ & 7)] << 16; ldrh r4, [r3, r4] @ tmp150, initTable -@ Patches/../C_code.c:2179: if (Mod(seed, 5) > 0) +@ Patches/../C_code.c:2184: if (Mod(seed, 5) > 0) movs r1, #5 @, -@ Patches/../C_code.c:2177: currentRN |= initTable[(mod++ & 7)] << 16; +@ Patches/../C_code.c:2182: currentRN |= initTable[(mod++ & 7)] << 16; lsls r4, r4, #16 @ tmp151, tmp150, -@ Patches/../C_code.c:2179: if (Mod(seed, 5) > 0) +@ Patches/../C_code.c:2184: if (Mod(seed, 5) > 0) movs r0, r5 @, seed -@ Patches/../C_code.c:2177: currentRN |= initTable[(mod++ & 7)] << 16; +@ Patches/../C_code.c:2182: currentRN |= initTable[(mod++ & 7)] << 16; orrs r4, r2 @ , currentRN -@ Patches/../C_code.c:2179: if (Mod(seed, 5) > 0) - bl .L143 @ -@ Patches/../C_code.c:2179: if (Mod(seed, 5) > 0) +@ Patches/../C_code.c:2184: if (Mod(seed, 5) > 0) + bl .L146 @ +@ Patches/../C_code.c:2184: if (Mod(seed, 5) > 0) cmp r0, #0 @ mod, - ble .L367 @, -.L370: -@ Patches/../C_code.c:2152: u32 rn0 = rn & 0xFFFF; + ble .L370 @, +.L373: +@ Patches/../C_code.c:2157: u32 rn0 = rn & 0xFFFF; lsls r2, r4, #16 @ tmp153, , -@ Patches/../C_code.c:2153: u32 rn1 = rn >> 16; +@ Patches/../C_code.c:2158: u32 rn1 = rn >> 16; lsrs r3, r4, #16 @ rn1, , -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsls r1, r3, #11 @ tmp155, rn1, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsrs r4, r2, #21 @ tmp154, tmp153, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r4, r4, r1 @ tmp156, tmp154, tmp155 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; orrs r3, r2 @ tmp162, tmp153 -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r4, r4, r2 @ rn, tmp156, tmp153 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; lsrs r3, r3, #15 @ rn0, tmp162, -@ Patches/../C_code.c:2181: for (mod = Mod(seed, 5); mod != 0; mod--) +@ Patches/../C_code.c:2186: for (mod = Mod(seed, 5); mod != 0; mod--) subs r0, r0, #1 @ mod, -@ Patches/../C_code.c:2163: rn ^= rn0; +@ Patches/../C_code.c:2168: rn ^= rn0; eors r4, r3 @ , rn0 -@ Patches/../C_code.c:2181: for (mod = Mod(seed, 5); mod != 0; mod--) +@ Patches/../C_code.c:2186: for (mod = Mod(seed, 5); mod != 0; mod--) cmp r0, #0 @ mod, - bne .L370 @, -.L367: -@ Patches/../C_code.c:2188: } + bne .L373 @, +.L370: +@ Patches/../C_code.c:2193: } movs r0, r4 @, add sp, sp, #16 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L375: +.L378: .align 2 -.L374: +.L377: .word .LANCHOR0+48 .word Mod .size InitSeededRN_Simple, .-InitSeededRN_Simple @@ -2797,55 +2828,55 @@ GetNthRN_Simple: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:2192: n = (n ^ (n >> 4)) & 0xF; +@ Patches/../C_code.c:2197: n = (n ^ (n >> 4)) & 0xF; movs r4, #15 @ tmp132, -@ Patches/../C_code.c:2192: n = (n ^ (n >> 4)) & 0xF; +@ Patches/../C_code.c:2197: n = (n ^ (n >> 4)) & 0xF; asrs r3, r0, #4 @ tmp131, tmp144, -@ Patches/../C_code.c:2192: n = (n ^ (n >> 4)) & 0xF; +@ Patches/../C_code.c:2197: n = (n ^ (n >> 4)) & 0xF; eors r3, r0 @ _2, tmp144 -@ Patches/../C_code.c:2191: { +@ Patches/../C_code.c:2196: { movs r5, r1 @ seed, tmp145 -@ Patches/../C_code.c:2192: n = (n ^ (n >> 4)) & 0xF; +@ Patches/../C_code.c:2197: n = (n ^ (n >> 4)) & 0xF; ands r4, r3 @ n, _2 -@ Patches/../C_code.c:2193: if (!currentRN) +@ Patches/../C_code.c:2198: if (!currentRN) cmp r2, #0 @ currentRN, - bne .L377 @, -@ Patches/../C_code.c:2195: currentRN = InitSeededRN_Simple(seed, currentRN); + bne .L380 @, +@ Patches/../C_code.c:2200: currentRN = InitSeededRN_Simple(seed, currentRN); movs r1, #0 @, movs r0, r5 @, seed bl InitSeededRN_Simple @ movs r2, r0 @ currentRN, tmp147 -.L377: -@ Patches/../C_code.c:2197: for (int i = 0; i < n; i++) +.L380: +@ Patches/../C_code.c:2202: for (int i = 0; i < n; i++) cmp r4, #0 @ n, - beq .L378 @, + beq .L381 @, movs r0, #0 @ i, -.L380: -@ Patches/../C_code.c:2152: u32 rn0 = rn & 0xFFFF; +.L383: +@ Patches/../C_code.c:2157: u32 rn0 = rn & 0xFFFF; lsls r1, r2, #16 @ tmp133, currentRN, -@ Patches/../C_code.c:2153: u32 rn1 = rn >> 16; +@ Patches/../C_code.c:2158: u32 rn1 = rn >> 16; lsrs r3, r2, #16 @ rn1, currentRN, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsls r5, r3, #11 @ tmp135, rn1, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsrs r2, r1, #21 @ tmp134, tmp133, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r2, r2, r5 @ tmp136, tmp134, tmp135 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; orrs r3, r1 @ tmp142, tmp133 -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r2, r2, r1 @ rn, tmp136, tmp133 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; lsrs r3, r3, #15 @ rn0, tmp142, -@ Patches/../C_code.c:2197: for (int i = 0; i < n; i++) +@ Patches/../C_code.c:2202: for (int i = 0; i < n; i++) adds r0, r0, #1 @ i, -@ Patches/../C_code.c:2163: rn ^= rn0; +@ Patches/../C_code.c:2168: rn ^= rn0; eors r2, r3 @ currentRN, rn0 -@ Patches/../C_code.c:2197: for (int i = 0; i < n; i++) +@ Patches/../C_code.c:2202: for (int i = 0; i < n; i++) cmp r4, r0 @ n, i - bne .L380 @, -.L378: -@ Patches/../C_code.c:2202: } + bne .L383 @, +.L381: +@ Patches/../C_code.c:2207: } @ sp needed @ movs r0, r2 @, currentRN pop {r4, r5, r6} @@ -2865,47 +2896,47 @@ NextSeededRN: @ frame_needed = 0, uses_anonymous_args = 0 movs r3, r0 @ currentRN, tmp146 push {r4, r5, lr} @ -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); ldrh r1, [r0, #2] @ _1, MEM[(u16 *)currentRN_11(D) + 2B] -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); ldrh r4, [r0] @ _3, *currentRN_11(D) -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); lsls r0, r1, #11 @ tmp125, _1, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); lsrs r2, r4, #5 @ tmp126, _3, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); adds r0, r0, r2 @ tmp129, tmp125, tmp126 -@ Patches/../C_code.c:2212: currentRN[2] *= 2; +@ Patches/../C_code.c:2217: currentRN[2] *= 2; ldrh r2, [r3, #4] @ MEM[(u16 *)currentRN_11(D) + 4B], MEM[(u16 *)currentRN_11(D) + 4B] -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); lsls r0, r0, #16 @ tmp130, tmp129, -@ Patches/../C_code.c:2212: currentRN[2] *= 2; +@ Patches/../C_code.c:2217: currentRN[2] *= 2; lsls r2, r2, #17 @ tmp134, MEM[(u16 *)currentRN_11(D) + 4B], -@ Patches/../C_code.c:2215: if (currentRN[1] & 0x8000) +@ Patches/../C_code.c:2220: if (currentRN[1] & 0x8000) lsls r5, r1, #16 @ _1, _1, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); lsrs r0, r0, #16 @ rn, tmp130, -@ Patches/../C_code.c:2212: currentRN[2] *= 2; +@ Patches/../C_code.c:2217: currentRN[2] *= 2; lsrs r2, r2, #16 @ _6, tmp134, -@ Patches/../C_code.c:2215: if (currentRN[1] & 0x8000) +@ Patches/../C_code.c:2220: if (currentRN[1] & 0x8000) asrs r5, r5, #16 @ _1, _1, - bpl .L388 @, -@ Patches/../C_code.c:2216: currentRN[2]++; + bpl .L391 @, +@ Patches/../C_code.c:2221: currentRN[2]++; adds r2, r2, #1 @ tmp138, lsls r2, r2, #16 @ tmp139, tmp138, lsrs r2, r2, #16 @ _6, tmp139, -.L388: -@ Patches/../C_code.c:2218: rn ^= currentRN[2]; +.L391: +@ Patches/../C_code.c:2223: rn ^= currentRN[2]; eors r0, r2 @ rn, _6 -@ Patches/../C_code.c:2221: currentRN[2] = currentRN[1]; +@ Patches/../C_code.c:2226: currentRN[2] = currentRN[1]; strh r1, [r3, #4] @ _1, MEM[(u16 *)currentRN_11(D) + 4B] -@ Patches/../C_code.c:2226: } +@ Patches/../C_code.c:2231: } @ sp needed @ -@ Patches/../C_code.c:2222: currentRN[1] = currentRN[0]; +@ Patches/../C_code.c:2227: currentRN[1] = currentRN[0]; strh r4, [r3, #2] @ _3, MEM[(u16 *)currentRN_11(D) + 2B] -@ Patches/../C_code.c:2223: currentRN[0] = rn; +@ Patches/../C_code.c:2228: currentRN[0] = rn; strh r0, [r3] @ rn, *currentRN_11(D) -@ Patches/../C_code.c:2226: } +@ Patches/../C_code.c:2231: } pop {r4, r5} pop {r1} bx r1 @@ -2926,105 +2957,105 @@ InitSeededRN: mov r7, r8 @, push {r7, lr} @ sub sp, sp, #20 @,, -@ Patches/../C_code.c:2233: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; +@ Patches/../C_code.c:2238: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; mov r4, sp @ tmp132, movs r2, r4 @ tmp134, tmp132 -@ Patches/../C_code.c:2229: { +@ Patches/../C_code.c:2234: { mov r8, r0 @ seed, tmp175 -@ Patches/../C_code.c:2233: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; - ldr r3, .L395 @ tmp135, -@ Patches/../C_code.c:2229: { +@ Patches/../C_code.c:2238: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; + ldr r3, .L398 @ tmp135, +@ Patches/../C_code.c:2234: { movs r7, r1 @ currentRN, tmp176 -@ Patches/../C_code.c:2233: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; +@ Patches/../C_code.c:2238: u16 initTable[8] = { 0xA36E, 0x924E, 0xB784, 0x4F67, 0x8092, 0x592D, 0x8E70, 0xA794 }; ldmia r3!, {r0, r1, r5} @ tmp135, tmp180, tmp179, tmp181 stmia r2!, {r0, r1, r5} @ tmp134, tmp180, tmp179, tmp181 ldr r3, [r3] @ tmp136, str r3, [r2] @ tmp136, -@ Patches/../C_code.c:2235: int mod = Mod(seed, 7); - ldr r3, .L395+4 @ tmp137, +@ Patches/../C_code.c:2240: int mod = Mod(seed, 7); + ldr r3, .L398+4 @ tmp137, movs r1, #7 @, mov r0, r8 @, seed mov r9, r3 @ tmp137, tmp137 bl .L14 @ -@ Patches/../C_code.c:2237: currentRN[0] = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2242: currentRN[0] = initTable[(mod++ & 7)]; movs r3, #7 @ tmp139, movs r2, r3 @ tmp140, tmp139 ands r2, r0 @ tmp140, mod -@ Patches/../C_code.c:2237: currentRN[0] = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2242: currentRN[0] = initTable[(mod++ & 7)]; lsls r2, r2, #1 @ tmp141, tmp140, - ldrh r6, [r2, r4] @ currentRN__lsm.966, initTable -@ Patches/../C_code.c:2237: currentRN[0] = initTable[(mod++ & 7)]; + ldrh r6, [r2, r4] @ currentRN__lsm.971, initTable +@ Patches/../C_code.c:2242: currentRN[0] = initTable[(mod++ & 7)]; adds r2, r0, #1 @ mod, mod, -@ Patches/../C_code.c:2238: currentRN[1] = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2243: currentRN[1] = initTable[(mod++ & 7)]; adds r0, r0, #2 @ mod, -@ Patches/../C_code.c:2238: currentRN[1] = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2243: currentRN[1] = initTable[(mod++ & 7)]; ands r2, r3 @ tmp146, tmp139 -@ Patches/../C_code.c:2239: currentRN[2] = initTable[(mod & 7)]; +@ Patches/../C_code.c:2244: currentRN[2] = initTable[(mod & 7)]; ands r3, r0 @ tmp152, mod -@ Patches/../C_code.c:2238: currentRN[1] = initTable[(mod++ & 7)]; +@ Patches/../C_code.c:2243: currentRN[1] = initTable[(mod++ & 7)]; lsls r2, r2, #1 @ tmp147, tmp146, -@ Patches/../C_code.c:2239: currentRN[2] = initTable[(mod & 7)]; +@ Patches/../C_code.c:2244: currentRN[2] = initTable[(mod & 7)]; lsls r3, r3, #1 @ tmp153, tmp152, -@ Patches/../C_code.c:2238: currentRN[1] = initTable[(mod++ & 7)]; - ldrh r5, [r2, r4] @ currentRN__lsm.965, initTable -@ Patches/../C_code.c:2239: currentRN[2] = initTable[(mod & 7)]; - ldrh r4, [r3, r4] @ currentRN__lsm.967, initTable -@ Patches/../C_code.c:2241: if (Mod(seed, 23) > 0) +@ Patches/../C_code.c:2243: currentRN[1] = initTable[(mod++ & 7)]; + ldrh r5, [r2, r4] @ currentRN__lsm.970, initTable +@ Patches/../C_code.c:2244: currentRN[2] = initTable[(mod & 7)]; + ldrh r4, [r3, r4] @ currentRN__lsm.972, initTable +@ Patches/../C_code.c:2246: if (Mod(seed, 23) > 0) movs r1, #23 @, mov r0, r8 @, seed -@ Patches/../C_code.c:2237: currentRN[0] = initTable[(mod++ & 7)]; - strh r6, [r7] @ currentRN__lsm.966, *currentRN_16(D) -@ Patches/../C_code.c:2238: currentRN[1] = initTable[(mod++ & 7)]; - strh r5, [r7, #2] @ currentRN__lsm.965, MEM[(u16 *)currentRN_16(D) + 2B] -@ Patches/../C_code.c:2239: currentRN[2] = initTable[(mod & 7)]; - strh r4, [r7, #4] @ currentRN__lsm.967, MEM[(u16 *)currentRN_16(D) + 4B] -@ Patches/../C_code.c:2241: if (Mod(seed, 23) > 0) - bl .L397 @ -@ Patches/../C_code.c:2241: if (Mod(seed, 23) > 0) +@ Patches/../C_code.c:2242: currentRN[0] = initTable[(mod++ & 7)]; + strh r6, [r7] @ currentRN__lsm.971, *currentRN_16(D) +@ Patches/../C_code.c:2243: currentRN[1] = initTable[(mod++ & 7)]; + strh r5, [r7, #2] @ currentRN__lsm.970, MEM[(u16 *)currentRN_16(D) + 2B] +@ Patches/../C_code.c:2244: currentRN[2] = initTable[(mod & 7)]; + strh r4, [r7, #4] @ currentRN__lsm.972, MEM[(u16 *)currentRN_16(D) + 4B] +@ Patches/../C_code.c:2246: if (Mod(seed, 23) > 0) + bl .L400 @ +@ Patches/../C_code.c:2246: if (Mod(seed, 23) > 0) cmp r0, #0 @ mod, - bgt .L392 @, - b .L389 @ -.L393: -@ Patches/../C_code.c:2222: currentRN[1] = currentRN[0]; - movs r5, r6 @ currentRN__lsm.965, currentRN__lsm.966 -@ Patches/../C_code.c:2223: currentRN[0] = rn; - movs r6, r3 @ currentRN__lsm.966, rn -.L392: -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); - lsls r3, r5, #11 @ tmp156, currentRN__lsm.965, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); - lsrs r2, r6, #5 @ tmp157, currentRN__lsm.966, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); + bgt .L395 @, + b .L392 @ +.L396: +@ Patches/../C_code.c:2227: currentRN[1] = currentRN[0]; + movs r5, r6 @ currentRN__lsm.970, currentRN__lsm.971 +@ Patches/../C_code.c:2228: currentRN[0] = rn; + movs r6, r3 @ currentRN__lsm.971, rn +.L395: +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); + lsls r3, r5, #11 @ tmp156, currentRN__lsm.970, +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); + lsrs r2, r6, #5 @ tmp157, currentRN__lsm.971, +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); adds r3, r3, r2 @ tmp160, tmp156, tmp157 lsls r3, r3, #16 @ tmp161, tmp160, -@ Patches/../C_code.c:2212: currentRN[2] *= 2; - lsls r4, r4, #17 @ tmp164, currentRN__lsm.967, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2217: currentRN[2] *= 2; + lsls r4, r4, #17 @ tmp164, currentRN__lsm.972, +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); lsrs r3, r3, #16 @ rn, tmp161, -@ Patches/../C_code.c:2212: currentRN[2] *= 2; - lsrs r4, r4, #16 @ currentRN__lsm.967, tmp164, -@ Patches/../C_code.c:2215: if (currentRN[1] & 0x8000) - lsls r2, r5, #16 @ tmp182, currentRN__lsm.965, - bpl .L391 @, -@ Patches/../C_code.c:2216: currentRN[2]++; +@ Patches/../C_code.c:2217: currentRN[2] *= 2; + lsrs r4, r4, #16 @ currentRN__lsm.972, tmp164, +@ Patches/../C_code.c:2220: if (currentRN[1] & 0x8000) + lsls r2, r5, #16 @ tmp182, currentRN__lsm.970, + bpl .L394 @, +@ Patches/../C_code.c:2221: currentRN[2]++; adds r4, r4, #1 @ tmp168, lsls r4, r4, #16 @ tmp169, tmp168, - lsrs r4, r4, #16 @ currentRN__lsm.967, tmp169, -.L391: -@ Patches/../C_code.c:2242: for (mod = Mod(seed, 23); mod != 0; mod--) + lsrs r4, r4, #16 @ currentRN__lsm.972, tmp169, +.L394: +@ Patches/../C_code.c:2247: for (mod = Mod(seed, 23); mod != 0; mod--) subs r0, r0, #1 @ mod, -@ Patches/../C_code.c:2218: rn ^= currentRN[2]; - eors r3, r4 @ rn, currentRN__lsm.967 -@ Patches/../C_code.c:2221: currentRN[2] = currentRN[1]; - movs r4, r5 @ currentRN__lsm.967, currentRN__lsm.965 -@ Patches/../C_code.c:2242: for (mod = Mod(seed, 23); mod != 0; mod--) +@ Patches/../C_code.c:2223: rn ^= currentRN[2]; + eors r3, r4 @ rn, currentRN__lsm.972 +@ Patches/../C_code.c:2226: currentRN[2] = currentRN[1]; + movs r4, r5 @ currentRN__lsm.972, currentRN__lsm.970 +@ Patches/../C_code.c:2247: for (mod = Mod(seed, 23); mod != 0; mod--) cmp r0, #0 @ mod, - bne .L393 @, - strh r5, [r7, #4] @ currentRN__lsm.965, MEM[(u16 *)currentRN_16(D) + 4B] - strh r6, [r7, #2] @ currentRN__lsm.966, MEM[(u16 *)currentRN_16(D) + 2B] + bne .L396 @, + strh r5, [r7, #4] @ currentRN__lsm.970, MEM[(u16 *)currentRN_16(D) + 4B] + strh r6, [r7, #2] @ currentRN__lsm.971, MEM[(u16 *)currentRN_16(D) + 2B] strh r3, [r7] @ rn, *currentRN_16(D) -.L389: -@ Patches/../C_code.c:2244: } +.L392: +@ Patches/../C_code.c:2249: } add sp, sp, #20 @,, @ sp needed @ pop {r6, r7} @@ -3033,9 +3064,9 @@ InitSeededRN: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L396: +.L399: .align 2 -.L395: +.L398: .word .LANCHOR0+48 .word Mod .size InitSeededRN, .-InitSeededRN @@ -3052,75 +3083,75 @@ GetNthRN: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ movs r3, r0 @ tmp149, n -@ Patches/../C_code.c:2248: n &= 0x3F; +@ Patches/../C_code.c:2253: n &= 0x3F; movs r4, #63 @ tmp127, -@ Patches/../C_code.c:2247: { +@ Patches/../C_code.c:2252: { sub sp, sp, #8 @,, -@ Patches/../C_code.c:2247: { +@ Patches/../C_code.c:2252: { movs r0, r1 @ seed, tmp150 -@ Patches/../C_code.c:2250: InitSeededRN(seed, currentRN); +@ Patches/../C_code.c:2255: InitSeededRN(seed, currentRN); mov r1, sp @, -@ Patches/../C_code.c:2248: n &= 0x3F; +@ Patches/../C_code.c:2253: n &= 0x3F; ands r4, r3 @ n, tmp149 -@ Patches/../C_code.c:2250: InitSeededRN(seed, currentRN); +@ Patches/../C_code.c:2255: InitSeededRN(seed, currentRN); bl InitSeededRN @ -@ Patches/../C_code.c:2252: for (int i = 0; i < n; i++) +@ Patches/../C_code.c:2257: for (int i = 0; i < n; i++) cmp r4, #0 @ n, - beq .L402 @, + beq .L405 @, mov r3, sp @ tmp154, -@ Patches/../C_code.c:2252: for (int i = 0; i < n; i++) +@ Patches/../C_code.c:2257: for (int i = 0; i < n; i++) movs r1, #0 @ i, - ldrh r2, [r3, #2] @ currentRN__lsm.977, MEM[(u16 *)¤tRN + 2B] - ldrh r5, [r3] @ currentRN__lsm.978, MEM[(u16 *)¤tRN] - ldrh r6, [r3, #4] @ currentRN__lsm.979, MEM[(u16 *)¤tRN + 4B] - b .L401 @ -.L403: -@ Patches/../C_code.c:2222: currentRN[1] = currentRN[0]; - movs r2, r5 @ currentRN__lsm.977, currentRN__lsm.978 -@ Patches/../C_code.c:2223: currentRN[0] = rn; - movs r5, r0 @ currentRN__lsm.978, -.L401: -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); - lsls r0, r2, #11 @ tmp133, currentRN__lsm.977, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); - lsrs r3, r5, #5 @ tmp132, currentRN__lsm.978, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); + ldrh r2, [r3, #2] @ currentRN__lsm.982, MEM[(u16 *)¤tRN + 2B] + ldrh r5, [r3] @ currentRN__lsm.983, MEM[(u16 *)¤tRN] + ldrh r6, [r3, #4] @ currentRN__lsm.984, MEM[(u16 *)¤tRN + 4B] + b .L404 @ +.L406: +@ Patches/../C_code.c:2227: currentRN[1] = currentRN[0]; + movs r2, r5 @ currentRN__lsm.982, currentRN__lsm.983 +@ Patches/../C_code.c:2228: currentRN[0] = rn; + movs r5, r0 @ currentRN__lsm.983, +.L404: +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); + lsls r0, r2, #11 @ tmp133, currentRN__lsm.982, +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); + lsrs r3, r5, #5 @ tmp132, currentRN__lsm.983, +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); adds r3, r3, r0 @ tmp136, tmp132, tmp133 lsls r3, r3, #16 @ tmp137, tmp136, -@ Patches/../C_code.c:2212: currentRN[2] *= 2; - lsls r6, r6, #17 @ tmp140, currentRN__lsm.979, -@ Patches/../C_code.c:2209: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); +@ Patches/../C_code.c:2217: currentRN[2] *= 2; + lsls r6, r6, #17 @ tmp140, currentRN__lsm.984, +@ Patches/../C_code.c:2214: u16 rn = (currentRN[1] << 11) + (currentRN[0] >> 5); lsrs r3, r3, #16 @ rn, tmp137, -@ Patches/../C_code.c:2212: currentRN[2] *= 2; - lsrs r0, r6, #16 @ currentRN__lsm.979, tmp140, -@ Patches/../C_code.c:2215: if (currentRN[1] & 0x8000) - lsls r6, r2, #16 @ tmp151, currentRN__lsm.977, - bpl .L400 @, -@ Patches/../C_code.c:2216: currentRN[2]++; +@ Patches/../C_code.c:2217: currentRN[2] *= 2; + lsrs r0, r6, #16 @ currentRN__lsm.984, tmp140, +@ Patches/../C_code.c:2220: if (currentRN[1] & 0x8000) + lsls r6, r2, #16 @ tmp151, currentRN__lsm.982, + bpl .L403 @, +@ Patches/../C_code.c:2221: currentRN[2]++; adds r0, r0, #1 @ tmp144, lsls r0, r0, #16 @ tmp145, tmp144, - lsrs r0, r0, #16 @ currentRN__lsm.979, tmp145, -.L400: -@ Patches/../C_code.c:2252: for (int i = 0; i < n; i++) + lsrs r0, r0, #16 @ currentRN__lsm.984, tmp145, +.L403: +@ Patches/../C_code.c:2257: for (int i = 0; i < n; i++) adds r1, r1, #1 @ i, -@ Patches/../C_code.c:2221: currentRN[2] = currentRN[1]; - movs r6, r2 @ currentRN__lsm.979, currentRN__lsm.977 -@ Patches/../C_code.c:2218: rn ^= currentRN[2]; +@ Patches/../C_code.c:2226: currentRN[2] = currentRN[1]; + movs r6, r2 @ currentRN__lsm.984, currentRN__lsm.982 +@ Patches/../C_code.c:2223: rn ^= currentRN[2]; eors r0, r3 @ , rn -@ Patches/../C_code.c:2252: for (int i = 0; i < n; i++) +@ Patches/../C_code.c:2257: for (int i = 0; i < n; i++) cmp r4, r1 @ n, i - bne .L403 @, -.L399: -@ Patches/../C_code.c:2257: } + bne .L406 @, +.L402: +@ Patches/../C_code.c:2262: } add sp, sp, #8 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L402: -@ Patches/../C_code.c:2252: for (int i = 0; i < n; i++) +.L405: +@ Patches/../C_code.c:2257: for (int i = 0; i < n; i++) movs r0, #0 @ , - b .L399 @ + b .L402 @ .size GetNthRN, .-GetNthRN .align 1 .p2align 2,,3 @@ -3135,67 +3166,67 @@ GetInitialSeed: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ mov lr, r8 @, -@ Patches/../C_code.c:2267: int result = RandValues->seed; - ldr r3, .L410 @ tmp151, -@ Patches/../C_code.c:2266: { +@ Patches/../C_code.c:2272: int result = RandValues->seed; + ldr r3, .L413 @ tmp151, +@ Patches/../C_code.c:2271: { push {lr} @ -@ Patches/../C_code.c:2267: int result = RandValues->seed; +@ Patches/../C_code.c:2272: int result = RandValues->seed; ldr r3, [r3] @ RandValues, RandValues - ldr r4, [r3] @ *RandValues.100_1, *RandValues.100_1 -@ Patches/../C_code.c:2268: int clock = GetGameClock() >> rate; - ldr r3, .L410+4 @ tmp154, -@ Patches/../C_code.c:2266: { + ldr r4, [r3] @ *RandValues.101_1, *RandValues.101_1 +@ Patches/../C_code.c:2273: int clock = GetGameClock() >> rate; + ldr r3, .L413+4 @ tmp154, +@ Patches/../C_code.c:2271: { sub sp, sp, #104 @,, -@ Patches/../C_code.c:2266: { +@ Patches/../C_code.c:2271: { movs r7, r0 @ rate, tmp184 movs r6, r1 @ proc, tmp185 -@ Patches/../C_code.c:2268: int clock = GetGameClock() >> rate; +@ Patches/../C_code.c:2273: int clock = GetGameClock() >> rate; mov r8, r3 @ tmp154, tmp154 bl .L14 @ -@ Patches/../C_code.c:2267: int result = RandValues->seed; - lsls r4, r4, #12 @ tmp153, *RandValues.100_1, -@ Patches/../C_code.c:2268: int clock = GetGameClock() >> rate; +@ Patches/../C_code.c:2272: int result = RandValues->seed; + lsls r4, r4, #12 @ tmp153, *RandValues.101_1, +@ Patches/../C_code.c:2273: int clock = GetGameClock() >> rate; movs r5, r0 @ _3, tmp186 -@ Patches/../C_code.c:2267: int result = RandValues->seed; +@ Patches/../C_code.c:2272: int result = RandValues->seed; lsrs r4, r4, #12 @ , tmp153, -@ Patches/../C_code.c:2269: if (!result) - bne .L406 @, -@ Patches/../C_code.c:2271: if (!proc->globalChecksum) +@ Patches/../C_code.c:2274: if (!result) + bne .L409 @, +@ Patches/../C_code.c:2276: if (!proc->globalChecksum) ldrh r4, [r6, #60] @ _5, -@ Patches/../C_code.c:2271: if (!proc->globalChecksum) +@ Patches/../C_code.c:2276: if (!proc->globalChecksum) cmp r4, #0 @ _5, - beq .L409 @, -@ Patches/../C_code.c:2268: int clock = GetGameClock() >> rate; + beq .L412 @, +@ Patches/../C_code.c:2273: int clock = GetGameClock() >> rate; lsrs r5, r5, r7 @ _49, _3, rate -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r1, #15 @ tmp175, movs r0, r5 @, _49 ands r1, r5 @ tmp176, _49 bl GetNthRN @ -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r1, #240 @ tmp179, -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r6, r0 @ tmp177, tmp190 -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); ands r1, r5 @ tmp180, _49 movs r0, r5 @, _49 bl GetNthRN @ -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); lsls r6, r6, #4 @ tmp183, tmp177, -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); orrs r6, r0 @ result, tmp191 -@ Patches/../C_code.c:2278: result += proc->globalChecksum; +@ Patches/../C_code.c:2283: result += proc->globalChecksum; adds r4, r4, r6 @ , _5, result -.L406: -@ Patches/../C_code.c:2284: if (result > 999999) - ldr r3, .L410+8 @ tmp170, +.L409: +@ Patches/../C_code.c:2289: if (result > 999999) + ldr r3, .L413+8 @ tmp170, cmp r4, r3 @ , tmp170 - ble .L405 @, -@ Patches/../C_code.c:2286: result &= 0xEFFFF; - ldr r3, .L410+12 @ tmp173, + ble .L408 @, +@ Patches/../C_code.c:2291: result &= 0xEFFFF; + ldr r3, .L413+12 @ tmp173, ands r4, r3 @ , tmp173 -.L405: -@ Patches/../C_code.c:2289: } +.L408: +@ Patches/../C_code.c:2294: } movs r0, r4 @, add sp, sp, #104 @,, @ sp needed @ @@ -3204,52 +3235,52 @@ GetInitialSeed: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L409: -@ Patches/../C_code.c:2274: ReadGlobalSaveInfo(&info); +.L412: +@ Patches/../C_code.c:2279: ReadGlobalSaveInfo(&info); add r4, sp, #4 @ tmp155,, movs r0, r4 @, tmp155 - ldr r3, .L410+16 @ tmp156, + ldr r3, .L413+16 @ tmp156, bl .L14 @ -@ Patches/../C_code.c:2275: proc->globalChecksum = info.checksum; +@ Patches/../C_code.c:2280: proc->globalChecksum = info.checksum; movs r3, #96 @ tmp158, -@ Patches/../C_code.c:2268: int clock = GetGameClock() >> rate; +@ Patches/../C_code.c:2273: int clock = GetGameClock() >> rate; lsrs r5, r5, r7 @ _4, _3, rate -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r1, #15 @ tmp160, -@ Patches/../C_code.c:2275: proc->globalChecksum = info.checksum; +@ Patches/../C_code.c:2280: proc->globalChecksum = info.checksum; ldrh r4, [r4, r3] @ _6, -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); ands r1, r5 @ tmp161, _4 -@ Patches/../C_code.c:2275: proc->globalChecksum = info.checksum; +@ Patches/../C_code.c:2280: proc->globalChecksum = info.checksum; strh r4, [r6, #60] @ _6, proc_27(D)->globalChecksum -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r0, r5 @, _4 bl GetNthRN @ -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r1, #240 @ tmp164, -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); movs r6, r0 @ tmp162, tmp187 -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); ands r1, r5 @ tmp165, _4 movs r0, r5 @, _4 bl GetNthRN @ -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); lsls r6, r6, #4 @ tmp168, tmp162, -@ Patches/../C_code.c:2277: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); +@ Patches/../C_code.c:2282: result = (GetNthRN(clock, (clock & 0xF)) << 4) | GetNthRN(clock, (clock & 0xF0)); orrs r6, r0 @ result, tmp188 -@ Patches/../C_code.c:2278: result += proc->globalChecksum; +@ Patches/../C_code.c:2283: result += proc->globalChecksum; adds r4, r4, r6 @ , _6, result -@ Patches/../C_code.c:2280: if (!result) +@ Patches/../C_code.c:2285: if (!result) cmp r4, #0 @ , - bne .L406 @, -@ Patches/../C_code.c:2282: result = GetGameClock() << 9; - bl .L208 @ -@ Patches/../C_code.c:2282: result = GetGameClock() << 9; + bne .L409 @, +@ Patches/../C_code.c:2287: result = GetGameClock() << 9; + bl .L211 @ +@ Patches/../C_code.c:2287: result = GetGameClock() << 9; lsls r4, r0, #9 @ , tmp189, - b .L406 @ -.L411: + b .L409 @ +.L414: .align 2 -.L410: +.L413: .word RandValues .word GetGameClock .word 999999 @@ -3268,96 +3299,96 @@ HashByte_Class: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:2294: while ((c = *noise++)) +@ Patches/../C_code.c:2299: while ((c = *noise++)) ldrb r5, [r2] @ c, *noise_31(D) -@ Patches/../C_code.c:2294: while ((c = *noise++)) +@ Patches/../C_code.c:2299: while ((c = *noise++)) adds r4, r2, #1 @ noise, noise, -@ Patches/../C_code.c:2294: while ((c = *noise++)) +@ Patches/../C_code.c:2299: while ((c = *noise++)) cmp r5, #0 @ c, - beq .L413 @, -.L414: -@ Patches/../C_code.c:2296: n = c + (n << 6) + (n << 16) - n; + beq .L416 @, +.L417: +@ Patches/../C_code.c:2301: n = c + (n << 6) + (n << 16) - n; lsls r2, r0, #6 @ tmp154, n, -@ Patches/../C_code.c:2296: n = c + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2301: n = c + (n << 6) + (n << 16) - n; adds r2, r2, r5 @ tmp155, tmp154, c -@ Patches/../C_code.c:2296: n = c + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2301: n = c + (n << 6) + (n << 16) - n; lsls r5, r0, #16 @ tmp156, n, -@ Patches/../C_code.c:2296: n = c + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2301: n = c + (n << 6) + (n << 16) - n; adds r2, r2, r5 @ _4, tmp155, tmp156 -@ Patches/../C_code.c:2294: while ((c = *noise++)) +@ Patches/../C_code.c:2299: while ((c = *noise++)) ldrb r5, [r4] @ c, MEM[(u8 *)_117] -@ Patches/../C_code.c:2296: n = c + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2301: n = c + (n << 6) + (n << 16) - n; subs r0, r2, r0 @ n, _4, n -@ Patches/../C_code.c:2294: while ((c = *noise++)) - adds r4, r4, #1 @ ivtmp.993, +@ Patches/../C_code.c:2299: while ((c = *noise++)) + adds r4, r4, #1 @ ivtmp.998, cmp r5, #0 @ c, - bne .L414 @, -.L413: -@ Patches/../C_code.c:2302: } + bne .L417 @, +.L416: +@ Patches/../C_code.c:2307: } @ sp needed @ -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; movs r4, #255 @ tmp161, movs r5, r4 @ tmp162, tmp161 -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; - ldr r2, .L419 @ tmp158, +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; + ldr r2, .L422 @ tmp158, ldr r2, [r2] @ RandValues, RandValues - ldr r2, [r2] @ *RandValues.102_6, *RandValues.102_6 - lsls r2, r2, #12 @ tmp160, *RandValues.102_6, + ldr r2, [r2] @ *RandValues.103_6, *RandValues.103_6 + lsls r2, r2, #12 @ tmp160, *RandValues.103_6, lsrs r2, r2, #12 @ _7, tmp160, -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; lsls r6, r0, #6 @ tmp163, n, -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; ands r5, r2 @ tmp162, _7 -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; adds r5, r5, r6 @ tmp164, tmp162, tmp163 -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; lsls r6, r0, #16 @ tmp165, n, -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; adds r5, r5, r6 @ _12, tmp164, tmp165 -@ Patches/../C_code.c:2298: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2303: n = (RandValues->seed & 0xFF) + (n << 6) + (n << 16) - n; subs r0, r5, r0 @ n, _12, n -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; asrs r2, r2, #8 @ tmp166, _7, -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; lsls r5, r0, #6 @ tmp169, n, -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; ands r2, r4 @ tmp168, tmp161 -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; adds r2, r2, r5 @ tmp170, tmp168, tmp169 -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; lsls r5, r0, #16 @ tmp171, n, -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; adds r2, r2, r5 @ _20, tmp170, tmp171 -@ Patches/../C_code.c:2299: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2304: n = ((RandValues->seed & 0xFF00) >> 8) + (n << 6) + (n << 16) - n; subs r2, r2, r0 @ n, _20, n -@ Patches/../C_code.c:2300: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2305: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; ands r4, r3 @ tmp173, offset -@ Patches/../C_code.c:2300: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2305: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; lsls r0, r2, #6 @ tmp174, n, -@ Patches/../C_code.c:2300: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2305: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; lsls r3, r2, #16 @ tmp176, n, -@ Patches/../C_code.c:2300: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2305: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; adds r0, r4, r0 @ tmp175, tmp173, tmp174 -@ Patches/../C_code.c:2300: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2305: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; adds r0, r0, r3 @ _25, tmp175, tmp176 -@ Patches/../C_code.c:2301: return Mod((n & 0x2FFFFFFF), max); - ldr r3, .L419+4 @ tmp179, -@ Patches/../C_code.c:2300: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; +@ Patches/../C_code.c:2306: return Mod((n & 0x2FFFFFFF), max); + ldr r3, .L422+4 @ tmp179, +@ Patches/../C_code.c:2305: n = ((offset & 0xFF)) + (n << 6) + (n << 16) - n; subs r0, r0, r2 @ n, _25, n -@ Patches/../C_code.c:2301: return Mod((n & 0x2FFFFFFF), max); +@ Patches/../C_code.c:2306: return Mod((n & 0x2FFFFFFF), max); ands r0, r3 @ tmp178, tmp179 - ldr r3, .L419+8 @ tmp180, + ldr r3, .L422+8 @ tmp180, bl .L14 @ -@ Patches/../C_code.c:2301: return Mod((n & 0x2FFFFFFF), max); +@ Patches/../C_code.c:2306: return Mod((n & 0x2FFFFFFF), max); lsls r0, r0, #16 @ tmp183, tmp188, lsrs r0, r0, #16 @ tmp182, tmp183, -@ Patches/../C_code.c:2302: } +@ Patches/../C_code.c:2307: } pop {r4, r5, r6} pop {r1} bx r1 -.L420: +.L423: .align 2 -.L419: +.L422: .word RandValues .word 805306367 .word Mod @@ -3377,68 +3408,68 @@ HashByte_Global: movs r5, r2 @ noise, tmp227 movs r6, r0 @ number, tmp225 mov lr, r8 @, -@ Patches/../C_code.c:2309: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); - ldr r2, .L432 @ tmp175, +@ Patches/../C_code.c:2314: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); + ldr r2, .L435 @ tmp175, ldr r2, [r2] @ RandValues, RandValues -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; ldr r0, [r5] @ *noise_44(D), *noise_44(D) -@ Patches/../C_code.c:2309: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); - ldr r7, [r2] @ *RandValues.104_9, *RandValues.104_9 -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2314: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); + ldr r7, [r2] @ *RandValues.105_9, *RandValues.105_9 +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; ldr r2, [r5, #4] @ MEM[(int *)noise_44(D) + 4B], MEM[(int *)noise_44(D) + 4B] adds r0, r0, r2 @ tmp178, *noise_44(D), MEM[(int *)noise_44(D) + 4B] -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; ldr r2, [r5, #8] @ MEM[(int *)noise_44(D) + 8B], MEM[(int *)noise_44(D) + 8B] adds r0, r0, r2 @ tmp181, tmp178, MEM[(int *)noise_44(D) + 8B] -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; ldr r2, [r5, #12] @ MEM[(int *)noise_44(D) + 12B], MEM[(int *)noise_44(D) + 12B] -@ Patches/../C_code.c:2309: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); - lsls r7, r7, #12 @ tmp177, *RandValues.104_9, -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2314: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); + lsls r7, r7, #12 @ tmp177, *RandValues.105_9, +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; adds r0, r0, r2 @ tmp183, tmp181, MEM[(int *)noise_44(D) + 12B] -@ Patches/../C_code.c:2309: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); +@ Patches/../C_code.c:2314: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); lsrs r7, r7, #12 @ _10, tmp177, -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; adds r0, r0, r6 @ tmp185, tmp183, number -@ Patches/../C_code.c:2309: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); +@ Patches/../C_code.c:2314: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); movs r2, #0 @, -@ Patches/../C_code.c:2306: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; +@ Patches/../C_code.c:2311: offset += noise[0] + noise[1] + noise[2] + noise[3] + number; adds r0, r0, r3 @ offset, tmp185, tmp228 -@ Patches/../C_code.c:2305: { +@ Patches/../C_code.c:2310: { mov r8, r1 @ max, tmp226 push {lr} @ -@ Patches/../C_code.c:2309: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); +@ Patches/../C_code.c:2314: currentRN = GetNthRN_Simple(offset, RandValues->seed, currentRN); movs r1, r7 @, _10 bl GetNthRN_Simple @ -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; movs r3, #255 @ tmp187, movs r2, r3 @ tmp188, tmp187 -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; lsls r1, r0, #6 @ tmp189, _13, -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; ands r2, r7 @ tmp188, _10 -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; adds r2, r2, r1 @ tmp190, tmp188, tmp189 -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; lsls r1, r0, #16 @ tmp191, _13, -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; adds r2, r2, r1 @ _20, tmp190, tmp191 -@ Patches/../C_code.c:2310: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2315: currentRN = (RandValues->seed & 0xFF) + (currentRN << 6) + (currentRN << 16) - currentRN; subs r2, r2, r0 @ currentRN, _20, _13 -@ Patches/../C_code.c:2311: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2316: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; asrs r1, r7, #8 @ tmp192, _10, ands r3, r1 @ tmp194, tmp192 -@ Patches/../C_code.c:2311: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2316: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; lsls r1, r2, #6 @ tmp195, currentRN, -@ Patches/../C_code.c:2311: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2316: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; adds r3, r3, r1 @ tmp196, tmp194, tmp195 -@ Patches/../C_code.c:2311: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2316: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; lsls r1, r2, #16 @ tmp197, currentRN, -@ Patches/../C_code.c:2311: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2316: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; adds r3, r3, r1 @ _26, tmp196, tmp197 -@ Patches/../C_code.c:2311: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; +@ Patches/../C_code.c:2316: currentRN = ((RandValues->seed & 0xFF00) >> 8) + (currentRN << 6) + (currentRN << 16) - currentRN; subs r3, r3, r2 @ currentRN, _26, currentRN -@ Patches/../C_code.c:2314: currentRN = ((currentRN << 5) + currentRN) ^ number; +@ Patches/../C_code.c:2319: currentRN = ((currentRN << 5) + currentRN) ^ number; lsls r2, r3, #5 @ tmp200, currentRN, adds r2, r2, r3 @ tmp201, tmp200, currentRN movs r3, #16 @ _68, @@ -3446,70 +3477,70 @@ HashByte_Global: lsls r0, r2, #5 @ tmp204, tmp202, mov ip, r3 @ _68, _68 adds r0, r0, r2 @ tmp205, tmp204, tmp202 -@ Patches/../C_code.c:2314: currentRN = ((currentRN << 5) + currentRN) ^ number; +@ Patches/../C_code.c:2319: currentRN = ((currentRN << 5) + currentRN) ^ number; eors r0, r6 @ currentRN, number -@ Patches/../C_code.c:2317: for (int i = 0; i < (noise[c] & 0xF); ++i) +@ Patches/../C_code.c:2322: for (int i = 0; i < (noise[c] & 0xF); ++i) movs r6, #15 @ tmp213, - add ip, ip, r5 @ _68, ivtmp.1008 -.L422: + add ip, ip, r5 @ _68, ivtmp.1013 +.L425: ldr r3, [r5] @ MEM[(int *)_63], MEM[(int *)_63] movs r2, r3 @ _82, MEM[(int *)_63] -@ Patches/../C_code.c:2317: for (int i = 0; i < (noise[c] & 0xF); ++i) +@ Patches/../C_code.c:2322: for (int i = 0; i < (noise[c] & 0xF); ++i) movs r1, #0 @ i, -@ Patches/../C_code.c:2317: for (int i = 0; i < (noise[c] & 0xF); ++i) +@ Patches/../C_code.c:2322: for (int i = 0; i < (noise[c] & 0xF); ++i) ands r2, r6 @ _82, tmp213 -@ Patches/../C_code.c:2317: for (int i = 0; i < (noise[c] & 0xF); ++i) +@ Patches/../C_code.c:2322: for (int i = 0; i < (noise[c] & 0xF); ++i) tst r3, r6 @ MEM[(int *)_63], tmp213 - beq .L426 @, -.L424: -@ Patches/../C_code.c:2152: u32 rn0 = rn & 0xFFFF; + beq .L429 @, +.L427: +@ Patches/../C_code.c:2157: u32 rn0 = rn & 0xFFFF; lsls r4, r0, #16 @ tmp206, currentRN, -@ Patches/../C_code.c:2153: u32 rn1 = rn >> 16; +@ Patches/../C_code.c:2158: u32 rn1 = rn >> 16; lsrs r0, r0, #16 @ rn1, currentRN, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsls r7, r0, #11 @ tmp208, rn1, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); lsrs r3, r4, #21 @ tmp207, tmp206, -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r3, r3, r7 @ tmp209, tmp207, tmp208 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; orrs r0, r4 @ tmp222, tmp206 -@ Patches/../C_code.c:2154: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); +@ Patches/../C_code.c:2159: rn = (rn1 << 11) + (rn0 >> 5) + (rn0 << 16); adds r3, r3, r4 @ rn, tmp209, tmp206 -@ Patches/../C_code.c:2161: rn0++; +@ Patches/../C_code.c:2166: rn0++; lsrs r0, r0, #15 @ rn0, tmp222, -@ Patches/../C_code.c:2317: for (int i = 0; i < (noise[c] & 0xF); ++i) +@ Patches/../C_code.c:2322: for (int i = 0; i < (noise[c] & 0xF); ++i) adds r1, r1, #1 @ i, -@ Patches/../C_code.c:2163: rn ^= rn0; +@ Patches/../C_code.c:2168: rn ^= rn0; eors r0, r3 @ currentRN, rn -@ Patches/../C_code.c:2317: for (int i = 0; i < (noise[c] & 0xF); ++i) +@ Patches/../C_code.c:2322: for (int i = 0; i < (noise[c] & 0xF); ++i) cmp r1, r2 @ i, _82 - bne .L424 @, -.L426: -@ Patches/../C_code.c:2315: for (int c = 0; c < 4; ++c) - adds r5, r5, #4 @ ivtmp.1008, - cmp ip, r5 @ _68, ivtmp.1008 - bne .L422 @, -@ Patches/../C_code.c:2324: } + bne .L427 @, +.L429: +@ Patches/../C_code.c:2320: for (int c = 0; c < 4; ++c) + adds r5, r5, #4 @ ivtmp.1013, + cmp ip, r5 @ _68, ivtmp.1013 + bne .L425 @, +@ Patches/../C_code.c:2329: } @ sp needed @ -@ Patches/../C_code.c:2323: return Mod((currentRN & 0x2FFFFFFF), max); - ldr r3, .L432+4 @ tmp216, +@ Patches/../C_code.c:2328: return Mod((currentRN & 0x2FFFFFFF), max); + ldr r3, .L435+4 @ tmp216, mov r1, r8 @, max ands r0, r3 @ tmp215, tmp216 - ldr r3, .L432+8 @ tmp217, + ldr r3, .L435+8 @ tmp217, bl .L14 @ -@ Patches/../C_code.c:2323: return Mod((currentRN & 0x2FFFFFFF), max); +@ Patches/../C_code.c:2328: return Mod((currentRN & 0x2FFFFFFF), max); lsls r0, r0, #16 @ tmp220, tmp230, lsrs r0, r0, #16 @ tmp219, tmp220, -@ Patches/../C_code.c:2324: } +@ Patches/../C_code.c:2329: } pop {r7} mov r8, r7 pop {r4, r5, r6, r7} pop {r1} bx r1 -.L433: +.L436: .align 2 -.L432: +.L435: .word RandValues .word 805306367 .word Mod @@ -3527,78 +3558,78 @@ RandomizeSkill: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ sub sp, sp, #16 @,, -@ Patches/../C_code.c:222: if (!id) +@ Patches/../C_code.c:227: if (!id) cmp r0, #0 @ id, - beq .L438 @, -@ Patches/../C_code.c:226: if (SkillExceptions[id].NeverChangeFrom) - ldr r4, .L445 @ tmp132, + beq .L441 @, +@ Patches/../C_code.c:231: if (SkillExceptions[id].NeverChangeFrom) + ldr r4, .L448 @ tmp132, lsls r3, r0, #1 @ tmp133, id, -@ Patches/../C_code.c:226: if (SkillExceptions[id].NeverChangeFrom) +@ Patches/../C_code.c:231: if (SkillExceptions[id].NeverChangeFrom) ldrb r3, [r3, r4] @ tmp134, SkillExceptions cmp r3, #0 @ tmp134, - bne .L434 @, -@ Patches/../C_code.c:230: if (!RandValues->skills) - ldr r3, .L445+4 @ tmp136, + bne .L437 @, +@ Patches/../C_code.c:235: if (!RandValues->skills) + ldr r3, .L448+4 @ tmp136, ldr r3, [r3] @ RandValues, RandValues - ldrb r3, [r3, #3] @ _3, *RandValues.1_2 -@ Patches/../C_code.c:230: if (!RandValues->skills) + ldrb r3, [r3, #3] @ _3, *RandValues.2_2 +@ Patches/../C_code.c:235: if (!RandValues->skills) cmp r3, #63 @ _3, - bhi .L437 @, -@ Patches/../C_code.c:232: if (!VanillaSkill[id]) - ldr r3, .L445+8 @ tmp139, -@ Patches/../C_code.c:232: if (!VanillaSkill[id]) + bhi .L440 @, +@ Patches/../C_code.c:237: if (!VanillaSkill[id]) + ldr r3, .L448+8 @ tmp139, +@ Patches/../C_code.c:237: if (!VanillaSkill[id]) ldrb r3, [r3, r0] @ tmp140, VanillaSkill cmp r3, #0 @ tmp140, - bne .L434 @, -.L438: -@ Patches/../C_code.c:224: return 0; + bne .L437 @, +.L441: +@ Patches/../C_code.c:229: return 0; movs r0, #0 @ , -.L434: -@ Patches/../C_code.c:253: } +.L437: +@ Patches/../C_code.c:258: } add sp, sp, #16 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L437: -@ Patches/../C_code.c:241: if (RandValues->skills == 2) +.L440: +@ Patches/../C_code.c:246: if (RandValues->skills == 2) movs r2, #63 @ tmp142, bics r3, r2 @ tmp143, tmp142 cmp r3, #128 @ tmp143, - beq .L434 @, -@ Patches/../C_code.c:245: const struct CharacterData * table = unit->pCharacterData; + beq .L437 @, +@ Patches/../C_code.c:250: const struct CharacterData * table = unit->pCharacterData; ldr r3, [r1] @ table, unit_20(D)->pCharacterData -@ Patches/../C_code.c:246: int noise[4] = { table->number, id, id, table->portraitId }; +@ Patches/../C_code.c:251: int noise[4] = { table->number, id, id, table->portraitId }; ldrb r2, [r3, #4] @ tmp146, -@ Patches/../C_code.c:246: int noise[4] = { table->number, id, id, table->portraitId }; +@ Patches/../C_code.c:251: int noise[4] = { table->number, id, id, table->portraitId }; str r0, [sp, #4] @ , noise[1] -@ Patches/../C_code.c:246: int noise[4] = { table->number, id, id, table->portraitId }; +@ Patches/../C_code.c:251: int noise[4] = { table->number, id, id, table->portraitId }; str r2, [sp] @ tmp146, noise[0] -@ Patches/../C_code.c:246: int noise[4] = { table->number, id, id, table->portraitId }; +@ Patches/../C_code.c:251: int noise[4] = { table->number, id, id, table->portraitId }; str r0, [sp, #8] @ , noise[2] -@ Patches/../C_code.c:246: int noise[4] = { table->number, id, id, table->portraitId }; +@ Patches/../C_code.c:251: int noise[4] = { table->number, id, id, table->portraitId }; ldrh r3, [r3, #6] @ tmp150, str r3, [sp, #12] @ tmp150, noise[3] -@ Patches/../C_code.c:247: id = HashByte_Global(id, NumberOfSkills - 1, noise, 12) + 1; // never 0 - ldr r3, .L445+12 @ tmp152, +@ Patches/../C_code.c:252: id = HashByte_Global(id, NumberOfSkills - 1, noise, 12) + 1; // never 0 + ldr r3, .L448+12 @ tmp152, ldr r1, [r3] @ NumberOfSkills, NumberOfSkills mov r2, sp @, movs r3, #12 @, subs r1, r1, #1 @ tmp153, bl HashByte_Global @ -@ Patches/../C_code.c:247: id = HashByte_Global(id, NumberOfSkills - 1, noise, 12) + 1; // never 0 +@ Patches/../C_code.c:252: id = HashByte_Global(id, NumberOfSkills - 1, noise, 12) + 1; // never 0 adds r0, r0, #1 @ , -@ Patches/../C_code.c:248: if (SkillExceptions[id].NeverChangeInto) +@ Patches/../C_code.c:253: if (SkillExceptions[id].NeverChangeInto) lsls r3, r0, #1 @ tmp158, , adds r4, r4, r3 @ tmp159, tmp132, tmp158 -@ Patches/../C_code.c:248: if (SkillExceptions[id].NeverChangeInto) +@ Patches/../C_code.c:253: if (SkillExceptions[id].NeverChangeInto) ldrb r3, [r4, #1] @ tmp161, SkillExceptions cmp r3, #0 @ tmp161, - beq .L434 @, - b .L438 @ -.L446: + beq .L437 @, + b .L441 @ +.L449: .align 2 -.L445: +.L448: .word SkillExceptions .word RandValues .word VanillaSkill @@ -3615,44 +3646,44 @@ GetCharTableID: @ Function supports interworking. @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:396: return GrowthValues->ForcedCharTable; - ldr r2, .L449 @ tmp120, -@ Patches/../C_code.c:400: { +@ Patches/../C_code.c:401: return GrowthValues->ForcedCharTable; + ldr r2, .L452 @ tmp120, +@ Patches/../C_code.c:405: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:396: return GrowthValues->ForcedCharTable; +@ Patches/../C_code.c:401: return GrowthValues->ForcedCharTable; ldr r2, [r2] @ GrowthValues, GrowthValues - ldrb r2, [r2, #1] @ *GrowthValues.9_5, *GrowthValues.9_5 - lsls r2, r2, #27 @ tmp125, *GrowthValues.9_5, -@ Patches/../C_code.c:400: { + ldrb r2, [r2, #1] @ *GrowthValues.10_5, *GrowthValues.10_5 + lsls r2, r2, #27 @ tmp125, *GrowthValues.10_5, +@ Patches/../C_code.c:405: { movs r3, r0 @ portraitID, tmp136 sub sp, sp, #16 @,, -@ Patches/../C_code.c:396: return GrowthValues->ForcedCharTable; +@ Patches/../C_code.c:401: return GrowthValues->ForcedCharTable; lsrs r0, r2, #27 @ , tmp125, -@ Patches/../C_code.c:406: if (result < NumberOfCharTables) +@ Patches/../C_code.c:411: if (result < NumberOfCharTables) cmp r0, #11 @ , - ble .L447 @, -@ Patches/../C_code.c:410: int noise[4] = { 5, 7, 9, 11 }; + ble .L450 @, +@ Patches/../C_code.c:415: int noise[4] = { 5, 7, 9, 11 }; mov r2, sp @ tmp127, movs r0, r2 @ tmp129, tmp127 - ldr r1, .L449+4 @ tmp130, + ldr r1, .L452+4 @ tmp130, ldmia r1!, {r4, r5, r6} @ tmp130, tmp138, tmp139, tmp140 stmia r0!, {r4, r5, r6} @ tmp129, tmp138, tmp139, tmp140 ldr r1, [r1] @ tmp131, str r1, [r0] @ tmp131, -@ Patches/../C_code.c:411: result = HashByte_Global(portraitID, NumberOfCharTables, noise, portraitID); +@ Patches/../C_code.c:416: result = HashByte_Global(portraitID, NumberOfCharTables, noise, portraitID); movs r1, #12 @, movs r0, r3 @, portraitID bl HashByte_Global @ -.L447: -@ Patches/../C_code.c:414: } +.L450: +@ Patches/../C_code.c:419: } add sp, sp, #16 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L450: +.L453: .align 2 -.L449: +.L452: .word GrowthValues .word .LANCHOR0+64 .size GetCharTableID, .-GetCharTableID @@ -3674,296 +3705,296 @@ InitRandomRecruitmentProc: mov r5, r8 @, push {r5, r6, r7, lr} @ sub sp, sp, #212 @,, -@ Patches/../C_code.c:818: { +@ Patches/../C_code.c:823: { str r0, [sp, #28] @ tmp389, %sfp -@ Patches/../C_code.c:821: const struct CharacterData * table = GetCharacterData(1); - ldr r6, .L539 @ tmp364, +@ Patches/../C_code.c:826: const struct CharacterData * table = GetCharacterData(1); + ldr r6, .L542 @ tmp364, movs r0, #1 @, - bl .L143 @ -@ Patches/../C_code.c:824: int seed = RandValues->seed; - ldr r3, .L539+4 @ tmp210, + bl .L146 @ +@ Patches/../C_code.c:829: int seed = RandValues->seed; + ldr r3, .L542+4 @ tmp210, ldr r3, [r3] @ RandValues, RandValues - ldr r3, [r3] @ *RandValues.20_1, *RandValues.20_1 - lsls r3, r3, #12 @ tmp212, *RandValues.20_1, + ldr r3, [r3] @ *RandValues.21_1, *RandValues.21_1 + lsls r3, r3, #12 @ tmp212, *RandValues.21_1, lsrs r3, r3, #12 @ seed, tmp212, str r3, [sp, #12] @ seed, %sfp -@ Patches/../C_code.c:826: RecruitmentProc * proc1 = Proc_Start(RecruitmentProcCmd1, PROC_TREE_3); - ldr r3, .L539+8 @ tmp365, +@ Patches/../C_code.c:831: RecruitmentProc * proc1 = Proc_Start(RecruitmentProcCmd1, PROC_TREE_3); + ldr r3, .L542+8 @ tmp365, movs r0, r3 @ tmp214, tmp365 mov r8, r3 @ tmp365, tmp365 - ldr r4, .L539+12 @ tmp215, + ldr r4, .L542+12 @ tmp215, movs r1, #3 @, adds r0, r0, #80 @ tmp214, - bl .L269 @ -@ Patches/../C_code.c:827: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); + bl .L272 @ +@ Patches/../C_code.c:832: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); mov r3, r8 @ tmp217, tmp365 adds r3, r3, #112 @ tmp217, -@ Patches/../C_code.c:826: RecruitmentProc * proc1 = Proc_Start(RecruitmentProcCmd1, PROC_TREE_3); +@ Patches/../C_code.c:831: RecruitmentProc * proc1 = Proc_Start(RecruitmentProcCmd1, PROC_TREE_3); movs r7, r0 @ , tmp390 -@ Patches/../C_code.c:827: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); +@ Patches/../C_code.c:832: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); movs r1, #3 @, -@ Patches/../C_code.c:826: RecruitmentProc * proc1 = Proc_Start(RecruitmentProcCmd1, PROC_TREE_3); +@ Patches/../C_code.c:831: RecruitmentProc * proc1 = Proc_Start(RecruitmentProcCmd1, PROC_TREE_3); str r0, [sp, #24] @ , %sfp -@ Patches/../C_code.c:827: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); +@ Patches/../C_code.c:832: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); movs r0, r3 @ tmp217, tmp217 - bl .L269 @ -@ Patches/../C_code.c:828: RecruitmentProc * proc3 = Proc_Start(RecruitmentProcCmd3, PROC_TREE_3); - ldr r5, .L539+16 @ tmp219, + bl .L272 @ +@ Patches/../C_code.c:833: RecruitmentProc * proc3 = Proc_Start(RecruitmentProcCmd3, PROC_TREE_3); + ldr r5, .L542+16 @ tmp219, movs r3, r5 @ tmp220, tmp219 adds r3, r3, #16 @ tmp220, movs r1, #3 @, -@ Patches/../C_code.c:827: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); +@ Patches/../C_code.c:832: RecruitmentProc * proc2 = Proc_Start(RecruitmentProcCmd2, PROC_TREE_3); mov fp, r0 @ proc2, tmp391 -@ Patches/../C_code.c:828: RecruitmentProc * proc3 = Proc_Start(RecruitmentProcCmd3, PROC_TREE_3); +@ Patches/../C_code.c:833: RecruitmentProc * proc3 = Proc_Start(RecruitmentProcCmd3, PROC_TREE_3); movs r0, r3 @ tmp220, tmp220 - bl .L269 @ -@ Patches/../C_code.c:829: RecruitmentProc * proc4 = Proc_Start(RecruitmentProcCmd4, PROC_TREE_3); + bl .L272 @ +@ Patches/../C_code.c:834: RecruitmentProc * proc4 = Proc_Start(RecruitmentProcCmd4, PROC_TREE_3); adds r5, r5, #48 @ tmp219, -@ Patches/../C_code.c:828: RecruitmentProc * proc3 = Proc_Start(RecruitmentProcCmd3, PROC_TREE_3); +@ Patches/../C_code.c:833: RecruitmentProc * proc3 = Proc_Start(RecruitmentProcCmd3, PROC_TREE_3); str r0, [sp, #4] @ tmp392, %sfp -@ Patches/../C_code.c:829: RecruitmentProc * proc4 = Proc_Start(RecruitmentProcCmd4, PROC_TREE_3); +@ Patches/../C_code.c:834: RecruitmentProc * proc4 = Proc_Start(RecruitmentProcCmd4, PROC_TREE_3); movs r1, #3 @, movs r0, r5 @ tmp223, tmp219 - bl .L269 @ -@ Patches/../C_code.c:832: proc->id[0] = 0; + bl .L272 @ +@ Patches/../C_code.c:837: proc->id[0] = 0; movs r3, #44 @ tmp225, movs r2, #0 @ tmp226, strb r2, [r7, r3] @ tmp226, proc1_81->id[0] -@ Patches/../C_code.c:823: int b = 0; // bosses count +@ Patches/../C_code.c:828: int b = 0; // bosses count movs r3, #0 @ b, str r3, [sp, #20] @ b, %sfp -@ Patches/../C_code.c:822: int c = 0; +@ Patches/../C_code.c:827: int c = 0; str r3, [sp, #16] @ c, %sfp - ldr r3, .L539+20 @ tmp363, + ldr r3, .L542+20 @ tmp363, mov r9, r3 @ tmp363, tmp363 -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) movs r3, #128 @ tmp388, lsls r3, r3, #1 @ tmp388, tmp388, -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) movs r4, #1 @ i, -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) mov r10, r3 @ tmp388, tmp388 -@ Patches/../C_code.c:829: RecruitmentProc * proc4 = Proc_Start(RecruitmentProcCmd4, PROC_TREE_3); +@ Patches/../C_code.c:834: RecruitmentProc * proc4 = Proc_Start(RecruitmentProcCmd4, PROC_TREE_3); str r0, [sp, #8] @ tmp393, %sfp -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) str r6, [sp] @ tmp364, %sfp - b .L461 @ -.L530: -@ Patches/../C_code.c:844: if (i == 0x80) + b .L464 @ +.L533: +@ Patches/../C_code.c:849: if (i == 0x80) cmp r4, #128 @ i, - beq .L456 @, -@ Patches/../C_code.c:848: if (i == 0xC0) + beq .L459 @, +@ Patches/../C_code.c:853: if (i == 0xC0) cmp r4, #192 @ i, - bne .L455 @, -@ Patches/../C_code.c:850: proc = proc4; + bne .L458 @, +@ Patches/../C_code.c:855: proc = proc4; ldr r7, [sp, #8] @ proc, %sfp -.L455: -@ Patches/../C_code.c:852: proc->id[i & 0x3F] = 0x0; +.L458: +@ Patches/../C_code.c:857: proc->id[i & 0x3F] = 0x0; movs r3, #63 @ tmp253, -@ Patches/../C_code.c:852: proc->id[i & 0x3F] = 0x0; +@ Patches/../C_code.c:857: proc->id[i & 0x3F] = 0x0; movs r2, #0 @ tmp258, -@ Patches/../C_code.c:852: proc->id[i & 0x3F] = 0x0; +@ Patches/../C_code.c:857: proc->id[i & 0x3F] = 0x0; ands r3, r4 @ tmp254, i -@ Patches/../C_code.c:852: proc->id[i & 0x3F] = 0x0; +@ Patches/../C_code.c:857: proc->id[i & 0x3F] = 0x0; adds r3, r7, r3 @ tmp256, proc, tmp254 adds r3, r3, #44 @ tmp257, strb r2, [r3] @ tmp258, proc_57->id[_6] -@ Patches/../C_code.c:717: if (!table->portraitId) +@ Patches/../C_code.c:722: if (!table->portraitId) ldrh r3, [r0, #6] @ tmp260, cmp r3, #0 @ tmp260, - beq .L457 @, -.L488: -@ Patches/../C_code.c:859: boss = table->attributes & (CA_BOSS); + beq .L460 @, +.L491: +@ Patches/../C_code.c:864: boss = table->attributes & (CA_BOSS); movs r3, #128 @ tmp263, ldr r1, [r0, #40] @ _139->attributes, _139->attributes lsls r3, r3, #8 @ tmp263, tmp263, ands r1, r3 @ boss, tmp263 bl GetUnitListToUse.part.0 @ -@ Patches/../C_code.c:860: switch (GetUnitListToUse(table, boss, true)) +@ Patches/../C_code.c:865: switch (GetUnitListToUse(table, boss, true)) cmp r0, #1 @ _106, - beq .L458 @, + beq .L461 @, cmp r0, #2 @ _106, - bne .L457 @, -@ Patches/../C_code.c:875: bosses[b] = i; + bne .L460 @, +@ Patches/../C_code.c:880: bosses[b] = i; ldr r2, [sp, #20] @ b, %sfp add r3, sp, #128 @ tmp266,, strb r4, [r3, r2] @ i, bosses[b_177] -@ Patches/../C_code.c:876: b++; +@ Patches/../C_code.c:881: b++; adds r3, r2, #1 @ b, b, str r3, [sp, #20] @ b, %sfp -.L457: -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +.L460: +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) cmp r4, r10 @ i, tmp388 - beq .L528 @, -.L461: -@ Patches/../C_code.c:836: table = GetCharacterData(i); + beq .L531 @, +.L464: +@ Patches/../C_code.c:841: table = GetCharacterData(i); ldr r3, [sp] @ tmp364, %sfp movs r0, r4 @, i bl .L14 @ -@ Patches/../C_code.c:396: return GrowthValues->ForcedCharTable; +@ Patches/../C_code.c:401: return GrowthValues->ForcedCharTable; mov r3, r9 @ tmp363, tmp363 ldr r3, [r3] @ GrowthValues, GrowthValues - ldrb r3, [r3, #1] @ *GrowthValues.9_140, *GrowthValues.9_140 - lsls r3, r3, #27 @ tmp235, *GrowthValues.9_140, + ldrb r3, [r3, #1] @ *GrowthValues.10_140, *GrowthValues.10_140 + lsls r3, r3, #27 @ tmp235, *GrowthValues.10_140, lsrs r3, r3, #27 @ result, tmp235, -@ Patches/../C_code.c:406: if (result < NumberOfCharTables) +@ Patches/../C_code.c:411: if (result < NumberOfCharTables) cmp r3, #11 @ result, - ble .L452 @, -@ Patches/../C_code.c:410: int noise[4] = { 5, 7, 9, 11 }; + ble .L455 @, +@ Patches/../C_code.c:415: int noise[4] = { 5, 7, 9, 11 }; mov r2, r8 @ tmp240, tmp365 add r3, sp, #32 @ tmp239,, adds r2, r2, #64 @ tmp240, -@ Patches/../C_code.c:837: table = (const struct CharacterData *)NewGetCharacterData(i, GetCharTableID(table->portraitId)); +@ Patches/../C_code.c:842: table = (const struct CharacterData *)NewGetCharacterData(i, GetCharTableID(table->portraitId)); ldrh r0, [r0, #6] @ _3, -@ Patches/../C_code.c:410: int noise[4] = { 5, 7, 9, 11 }; +@ Patches/../C_code.c:415: int noise[4] = { 5, 7, 9, 11 }; ldmia r2!, {r1, r5, r6} @ tmp240, tmp411, tmp413, tmp412 stmia r3!, {r1, r5, r6} @ tmp239, tmp411, tmp413, tmp412 ldr r2, [r2] @ tmp241, -@ Patches/../C_code.c:411: result = HashByte_Global(portraitID, NumberOfCharTables, noise, portraitID); +@ Patches/../C_code.c:416: result = HashByte_Global(portraitID, NumberOfCharTables, noise, portraitID); movs r1, #12 @, -@ Patches/../C_code.c:410: int noise[4] = { 5, 7, 9, 11 }; +@ Patches/../C_code.c:415: int noise[4] = { 5, 7, 9, 11 }; str r2, [r3] @ tmp241, -@ Patches/../C_code.c:411: result = HashByte_Global(portraitID, NumberOfCharTables, noise, portraitID); +@ Patches/../C_code.c:416: result = HashByte_Global(portraitID, NumberOfCharTables, noise, portraitID); movs r3, r0 @, _3 add r2, sp, #32 @,, bl HashByte_Global @ movs r3, r0 @ result, tmp395 -.L452: -@ Patches/../C_code.c:426: if (!tableID) +.L455: +@ Patches/../C_code.c:431: if (!tableID) cmp r3, #0 @ result, - beq .L529 @, -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) + beq .L532 @, +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) movs r2, #52 @ tmp455, mov ip, r2 @ tmp455, tmp455 mov r1, r8 @ tmp365, tmp365 mov r2, ip @ tmp249, tmp455 muls r2, r4 @ tmp249, i -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) lsls r3, r3, #2 @ tmp247, result, -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldr r0, [r1, r3] @ cData[_131], cData[_131] subs r2, r2, #52 @ tmp250, adds r0, r0, r2 @ _139, cData[_131], tmp250 -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldrb r3, [r0, #4] @ tmp252, -@ Patches/../C_code.c:424: return NULL; +@ Patches/../C_code.c:429: return NULL; subs r2, r3, #1 @ tmp368, tmp252 sbcs r3, r3, r2 @ tmp367, tmp252, tmp368 rsbs r3, r3, #0 @ tmp369, tmp367 ands r0, r3 @ _139, tmp369 -.L454: -@ Patches/../C_code.c:840: if (i == 0x40) +.L457: +@ Patches/../C_code.c:845: if (i == 0x40) cmp r4, #64 @ i, - bne .L530 @, -@ Patches/../C_code.c:842: proc = proc2; + bne .L533 @, +@ Patches/../C_code.c:847: proc = proc2; mov r7, fp @ proc, proc2 - b .L455 @ -.L529: -@ Patches/../C_code.c:431: return GetCharacterData(charId); + b .L458 @ +.L532: +@ Patches/../C_code.c:436: return GetCharacterData(charId); movs r0, r4 @, i ldr r3, [sp] @ tmp364, %sfp bl .L14 @ - b .L454 @ -.L456: -@ Patches/../C_code.c:852: proc->id[i & 0x3F] = 0x0; + b .L457 @ +.L459: +@ Patches/../C_code.c:857: proc->id[i & 0x3F] = 0x0; movs r3, #44 @ tmp359, movs r2, #0 @ tmp360, ldr r7, [sp, #4] @ proc3, %sfp strb r2, [r7, r3] @ tmp360, proc3_85->id[0] -@ Patches/../C_code.c:717: if (!table->portraitId) +@ Patches/../C_code.c:722: if (!table->portraitId) ldrh r3, [r0, #6] @ tmp362, cmp r3, #0 @ tmp362, - bne .L488 @, -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) + bne .L491 @, +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) movs r4, #129 @ i, -@ Patches/../C_code.c:846: proc = proc3; +@ Patches/../C_code.c:851: proc = proc3; ldr r7, [sp, #4] @ proc, %sfp - b .L461 @ -.L458: -@ Patches/../C_code.c:869: unit[c] = i; + b .L464 @ +.L461: +@ Patches/../C_code.c:874: unit[c] = i; ldr r2, [sp, #16] @ c, %sfp add r3, sp, #48 @ tmp264,, strb r4, [r3, r2] @ i, unit[c_5] -@ Patches/../C_code.c:870: c++; +@ Patches/../C_code.c:875: c++; adds r3, r2, #1 @ c, c, -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:870: c++; +@ Patches/../C_code.c:875: c++; str r3, [sp, #16] @ c, %sfp -@ Patches/../C_code.c:834: for (int i = 1; i <= MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:839: for (int i = 1; i <= MAX_CHAR_ID; ++i) cmp r4, r10 @ i, tmp388 - bne .L461 @, -.L528: -@ Patches/../C_code.c:908: for (int i = 1; i < MAX_CHAR_ID; ++i) + bne .L464 @, +.L531: +@ Patches/../C_code.c:913: for (int i = 1; i < MAX_CHAR_ID; ++i) movs r4, #1 @ i, -@ Patches/../C_code.c:887: u32 rn = 0; +@ Patches/../C_code.c:892: u32 rn = 0; movs r5, #0 @ rn, ldr r3, [sp, #20] @ b, %sfp mov r8, r3 @ b, b -@ Patches/../C_code.c:907: proc = proc1; +@ Patches/../C_code.c:912: proc = proc1; ldr r3, [sp, #24] @ proc, %sfp mov r9, r3 @ proc, proc -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) - ldr r3, .L539+24 @ tmp383, +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) + ldr r3, .L542+24 @ tmp383, mov r10, r3 @ tmp383, tmp383 @ Patches/../C_code.c:214: return Mod((rn >> 3), max); - ldr r3, .L539+28 @ tmp384, + ldr r3, .L542+28 @ tmp384, ldr r6, [sp] @ tmp364, %sfp ldr r7, [sp, #16] @ c, %sfp str r3, [sp] @ tmp384, %sfp -.L460: -@ Patches/../C_code.c:924: table = GetCharacterData(i); +.L463: +@ Patches/../C_code.c:929: table = GetCharacterData(i); movs r0, r4 @, i - bl .L143 @ -@ Patches/../C_code.c:717: if (!table->portraitId) + bl .L146 @ +@ Patches/../C_code.c:722: if (!table->portraitId) ldrh r3, [r0, #6] @ tmp270, cmp r3, #0 @ tmp270, - beq .L463 @, -@ Patches/../C_code.c:933: boss = table->attributes & (CA_BOSS); + beq .L466 @, +@ Patches/../C_code.c:938: boss = table->attributes & (CA_BOSS); movs r3, #128 @ tmp273, ldr r1, [r0, #40] @ table_103->attributes, table_103->attributes lsls r3, r3, #8 @ tmp273, tmp273, ands r1, r3 @ boss, tmp273 bl GetUnitListToUse.part.0 @ -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) mov r3, r10 @ tmp383, tmp383 ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r2, [r3] @ *RecruitValues.19_157, *RecruitValues.19_157 -@ Patches/../C_code.c:803: if (RecruitValues->recruitment == 4) + ldrb r2, [r3] @ *RecruitValues.20_157, *RecruitValues.20_157 +@ Patches/../C_code.c:808: if (RecruitValues->recruitment == 4) movs r3, #7 @ tmp281, - ands r3, r2 @ tmp282, *RecruitValues.19_157 + ands r3, r2 @ tmp282, *RecruitValues.20_157 cmp r3, #4 @ tmp282, - beq .L531 @, -@ Patches/../C_code.c:935: switch (CallGetUnitListToUse(table, boss, true)) + beq .L534 @, +@ Patches/../C_code.c:940: switch (CallGetUnitListToUse(table, boss, true)) cmp r0, #1 @ _156, - beq .L466 @, + beq .L469 @, cmp r0, #2 @ _156, - bne .L463 @, -.L465: -@ Patches/../C_code.c:958: rn = GetNthRN_Simple(i - 1, seed, rn); + bne .L466 @, +.L468: +@ Patches/../C_code.c:963: rn = GetNthRN_Simple(i - 1, seed, rn); movs r2, r5 @, rn ldr r1, [sp, #12] @, %sfp subs r0, r4, #1 @ tmp299, i, bl GetNthRN_Simple @ -@ Patches/../C_code.c:960: if (b < 0) +@ Patches/../C_code.c:965: if (b < 0) mov r3, r8 @ b, b -@ Patches/../C_code.c:958: rn = GetNthRN_Simple(i - 1, seed, rn); +@ Patches/../C_code.c:963: rn = GetNthRN_Simple(i - 1, seed, rn); movs r5, r0 @ rn, tmp402 -@ Patches/../C_code.c:960: if (b < 0) +@ Patches/../C_code.c:965: if (b < 0) subs r3, r3, #1 @ b, b, - bpl .LCB3252 @ - b .L532 @long jump @ -.LCB3252: + bpl .LCB3276 @ + b .L535 @long jump @ +.LCB3276: mov r8, r3 @ b, b @ Patches/../C_code.c:212: if (max == 0) mov r3, r8 @ b, b cmp r3, #0 @ b, - bne .LCB3256 @ - b .L494 @long jump @ -.LCB3256: -.L536: + bne .LCB3280 @ + b .L497 @long jump @ +.LCB3280: +.L539: @ Patches/../C_code.c:214: return Mod((rn >> 3), max); mov r1, r8 @, b ldr r3, [sp] @ tmp384, %sfp @@ -3971,74 +4002,74 @@ InitRandomRecruitmentProc: lsrs r0, r5, #3 @ tmp300, rn, @ Patches/../C_code.c:214: return Mod((rn >> 3), max); bl .L14 @ -.L470: -@ Patches/../C_code.c:966: proc->id[(i & 0x3F) - 1] = bosses[num]; +.L473: +@ Patches/../C_code.c:971: proc->id[(i & 0x3F) - 1] = bosses[num]; movs r3, #63 @ tmp303, -@ Patches/../C_code.c:966: proc->id[(i & 0x3F) - 1] = bosses[num]; +@ Patches/../C_code.c:971: proc->id[(i & 0x3F) - 1] = bosses[num]; add r2, sp, #128 @ tmp302,, -@ Patches/../C_code.c:966: proc->id[(i & 0x3F) - 1] = bosses[num]; +@ Patches/../C_code.c:971: proc->id[(i & 0x3F) - 1] = bosses[num]; ands r3, r4 @ tmp304, i -@ Patches/../C_code.c:966: proc->id[(i & 0x3F) - 1] = bosses[num]; +@ Patches/../C_code.c:971: proc->id[(i & 0x3F) - 1] = bosses[num]; ldrb r1, [r2, r0] @ _20, bosses -@ Patches/../C_code.c:966: proc->id[(i & 0x3F) - 1] = bosses[num]; +@ Patches/../C_code.c:971: proc->id[(i & 0x3F) - 1] = bosses[num]; add r3, r3, r9 @ tmp306, proc adds r3, r3, #43 @ tmp307, strb r1, [r3] @ _20, proc_59->id[_19] -@ Patches/../C_code.c:967: bosses[num] = bosses[b]; // move last entry to one we just used +@ Patches/../C_code.c:972: bosses[num] = bosses[b]; // move last entry to one we just used mov r3, r8 @ b, b ldrb r3, [r2, r3] @ _21, bosses -@ Patches/../C_code.c:967: bosses[num] = bosses[b]; // move last entry to one we just used +@ Patches/../C_code.c:972: bosses[num] = bosses[b]; // move last entry to one we just used strb r3, [r2, r0] @ _21, bosses[prephitmp_22] -@ Patches/../C_code.c:968: bosses[b] = proc->id[(i & 0x3F) - 1]; +@ Patches/../C_code.c:973: bosses[b] = proc->id[(i & 0x3F) - 1]; mov r3, r8 @ b, b strb r1, [r2, r3] @ _20, bosses[b_53] -.L463: -@ Patches/../C_code.c:908: for (int i = 1; i < MAX_CHAR_ID; ++i) +.L466: +@ Patches/../C_code.c:913: for (int i = 1; i < MAX_CHAR_ID; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:908: for (int i = 1; i < MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:913: for (int i = 1; i < MAX_CHAR_ID; ++i) cmp r4, #255 @ i, - beq .L533 @, -.L471: -@ Patches/../C_code.c:910: if (i >= 0x40) + beq .L536 @, +.L474: +@ Patches/../C_code.c:915: if (i >= 0x40) cmp r4, #63 @ i, - ble .L460 @, + ble .L463 @, mov r9, fp @ proc, proc2 -@ Patches/../C_code.c:914: if (i >= 0x80) +@ Patches/../C_code.c:919: if (i >= 0x80) cmp r4, #127 @ i, - ble .L460 @, + ble .L463 @, ldr r3, [sp, #4] @ proc, %sfp mov r9, r3 @ proc, proc -@ Patches/../C_code.c:918: if (i >= 0xC0) +@ Patches/../C_code.c:923: if (i >= 0xC0) cmp r4, #191 @ i, - ble .L460 @, -@ Patches/../C_code.c:920: proc = proc4; + ble .L463 @, +@ Patches/../C_code.c:925: proc = proc4; ldr r3, [sp, #8] @ proc, %sfp mov r9, r3 @ proc, proc - b .L460 @ -.L531: -@ Patches/../C_code.c:805: if (result == 1) + b .L463 @ +.L534: +@ Patches/../C_code.c:810: if (result == 1) cmp r0, #1 @ _156, - beq .L465 @, -@ Patches/../C_code.c:809: else if (result == 2) + beq .L468 @, +@ Patches/../C_code.c:814: else if (result == 2) cmp r0, #2 @ _156, - bne .L463 @, -.L466: -@ Patches/../C_code.c:944: rn = GetNthRN_Simple(i - 1, seed, rn); + bne .L466 @, +.L469: +@ Patches/../C_code.c:949: rn = GetNthRN_Simple(i - 1, seed, rn); movs r2, r5 @, rn ldr r1, [sp, #12] @, %sfp subs r0, r4, #1 @ tmp284, i, bl GetNthRN_Simple @ movs r5, r0 @ rn, tmp400 -@ Patches/../C_code.c:946: if (c < 0) +@ Patches/../C_code.c:951: if (c < 0) subs r7, r7, #1 @ c, c, - bpl .L467 @, -@ Patches/../C_code.c:948: c = c_max - 1; + bpl .L470 @, +@ Patches/../C_code.c:953: c = c_max - 1; ldr r3, [sp, #16] @ c, %sfp subs r7, r3, #1 @ c, c, -.L467: +.L470: @ Patches/../C_code.c:212: if (max == 0) cmp r7, #0 @ c, - beq .L493 @, + beq .L496 @, @ Patches/../C_code.c:214: return Mod((rn >> 3), max); movs r1, r7 @, c ldr r3, [sp] @ tmp384, %sfp @@ -4046,98 +4077,98 @@ InitRandomRecruitmentProc: lsrs r0, r5, #3 @ tmp285, rn, @ Patches/../C_code.c:214: return Mod((rn >> 3), max); bl .L14 @ -.L468: -@ Patches/../C_code.c:951: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char +.L471: +@ Patches/../C_code.c:956: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char movs r3, #63 @ tmp288, -@ Patches/../C_code.c:951: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char +@ Patches/../C_code.c:956: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char add r2, sp, #48 @ tmp287,, -@ Patches/../C_code.c:951: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char +@ Patches/../C_code.c:956: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char ands r3, r4 @ tmp289, i -@ Patches/../C_code.c:951: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char +@ Patches/../C_code.c:956: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char ldrb r1, [r2, r0] @ _15, unit -@ Patches/../C_code.c:951: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char +@ Patches/../C_code.c:956: proc->id[(i & 0x3F) - 1] = unit[num]; // proc + offset set to nth char add r3, r3, r9 @ tmp291, proc adds r3, r3, #43 @ tmp292, strb r1, [r3] @ _15, proc_59->id[_14] -@ Patches/../C_code.c:952: unit[num] = unit[c]; // move last entry to one we just used +@ Patches/../C_code.c:957: unit[num] = unit[c]; // move last entry to one we just used ldrb r3, [r2, r7] @ _16, unit -@ Patches/../C_code.c:908: for (int i = 1; i < MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:913: for (int i = 1; i < MAX_CHAR_ID; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:952: unit[num] = unit[c]; // move last entry to one we just used +@ Patches/../C_code.c:957: unit[num] = unit[c]; // move last entry to one we just used strb r3, [r2, r0] @ _16, unit[prephitmp_56] -@ Patches/../C_code.c:953: unit[c] = proc->id[(i & 0x3F) - 1]; +@ Patches/../C_code.c:958: unit[c] = proc->id[(i & 0x3F) - 1]; strb r1, [r2, r7] @ _15, unit[c_48] -@ Patches/../C_code.c:908: for (int i = 1; i < MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:913: for (int i = 1; i < MAX_CHAR_ID; ++i) cmp r4, #255 @ i, - bne .L471 @, -.L533: -@ Patches/../C_code.c:1030: proc->id[(i & 0x3F) - 1] = proc3->id[(num & 0x3F) - 1]; + bne .L474 @, +.L536: +@ Patches/../C_code.c:1035: proc->id[(i & 0x3F) - 1] = proc3->id[(num & 0x3F) - 1]; movs r7, #63 @ tmp380, -@ Patches/../C_code.c:994: proc = proc1; +@ Patches/../C_code.c:999: proc = proc1; ldr r5, [sp, #24] @ proc, %sfp -@ Patches/../C_code.c:995: for (int i = 1; i < MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:1000: for (int i = 1; i < MAX_CHAR_ID; ++i) subs r4, r4, #254 @ i, -.L482: -@ Patches/../C_code.c:997: if (i >= 0x40) +.L485: +@ Patches/../C_code.c:1002: if (i >= 0x40) cmp r4, #63 @ i, - ble .L472 @, -@ Patches/../C_code.c:1001: if (i >= 0x80) + ble .L475 @, +@ Patches/../C_code.c:1006: if (i >= 0x80) cmp r4, #127 @ i, - ble .L495 @, -@ Patches/../C_code.c:1005: if (i >= 0xC0) + ble .L498 @, +@ Patches/../C_code.c:1010: if (i >= 0xC0) cmp r4, #191 @ i, - bgt .L534 @, -@ Patches/../C_code.c:1010: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table + bgt .L537 @, +@ Patches/../C_code.c:1015: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table movs r0, r4 @, i - bl .L143 @ -@ Patches/../C_code.c:1013: num = GetAdjustedCharacterID(table); + bl .L146 @ +@ Patches/../C_code.c:1018: num = GetAdjustedCharacterID(table); bl GetAdjustedCharacterID @ -@ Patches/../C_code.c:1014: if (num != (i + 1)) +@ Patches/../C_code.c:1019: if (num != (i + 1)) adds r3, r4, #1 @ _24, i, -@ Patches/../C_code.c:1014: if (num != (i + 1)) +@ Patches/../C_code.c:1019: if (num != (i + 1)) ldr r5, [sp, #4] @ proc, %sfp cmp r3, r0 @ _24, num - beq .L535 @, -@ Patches/../C_code.c:1016: switch (num >> 6) + beq .L538 @, +@ Patches/../C_code.c:1021: switch (num >> 6) asrs r2, r0, #6 @ _25, num, -@ Patches/../C_code.c:1016: switch (num >> 6) +@ Patches/../C_code.c:1021: switch (num >> 6) cmp r2, #2 @ _25, - beq .L475 @, -.L537: + beq .L478 @, +.L540: cmp r2, #2 @ _25, - bgt .L476 @, + bgt .L479 @, cmp r2, #0 @ _25, - beq .L477 @, + beq .L480 @, cmp r2, #1 @ _25, - bne .L496 @, -@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc2->id[(num & 0x3F) - 1]; + bne .L499 @, +@ Patches/../C_code.c:1030: proc->id[(i & 0x3F) - 1] = proc2->id[(num & 0x3F) - 1]; ands r0, r7 @ tmp325, tmp380 -@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc2->id[(num & 0x3F) - 1]; +@ Patches/../C_code.c:1030: proc->id[(i & 0x3F) - 1] = proc2->id[(num & 0x3F) - 1]; add r0, r0, fp @ tmp327, proc2 -.L527: -@ Patches/../C_code.c:1020: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; +.L530: +@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; adds r0, r0, #43 @ tmp317, -@ Patches/../C_code.c:1020: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; +@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; ands r4, r7 @ tmp319, tmp380 -@ Patches/../C_code.c:1020: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; +@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; ldrb r2, [r0] @ _30, -@ Patches/../C_code.c:1020: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; +@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; adds r4, r5, r4 @ tmp321, proc, tmp319 adds r4, r4, #43 @ tmp322, strb r2, [r4] @ _30, -.L496: -@ Patches/../C_code.c:1038: default: +.L499: +@ Patches/../C_code.c:1043: default: movs r4, r3 @ i, _24 -@ Patches/../C_code.c:995: for (int i = 1; i < MAX_CHAR_ID; ++i) +@ Patches/../C_code.c:1000: for (int i = 1; i < MAX_CHAR_ID; ++i) cmp r3, #255 @ _24, - bne .L482 @, -@ Patches/../C_code.c:1044: switch (procID) + bne .L485 @, +@ Patches/../C_code.c:1049: switch (procID) ldr r3, [sp, #28] @ procID, %sfp cmp r3, #2 @ procID, - beq .L497 @, - bgt .L484 @, + beq .L500 @, + bgt .L487 @, cmp r3, #0 @ procID, - beq .L451 @, + beq .L454 @, subs r3, r3, #1 @ procID, rsbs r2, r3, #0 @ tmp373, tmp372 adcs r3, r3, r2 @ tmp371, tmp372, tmp373 @@ -4145,8 +4176,8 @@ InitRandomRecruitmentProc: rsbs r3, r3, #0 @ tmp374, tmp371 ands r2, r3 @ proc2, tmp374 str r2, [sp, #24] @ proc2, %sfp -.L451: -@ Patches/../C_code.c:1069: } +.L454: +@ Patches/../C_code.c:1074: } ldr r0, [sp, #24] @, %sfp add sp, sp, #212 @,, @ sp needed @ @@ -4158,85 +4189,85 @@ InitRandomRecruitmentProc: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L532: -@ Patches/../C_code.c:962: b = b_max - 1; +.L535: +@ Patches/../C_code.c:967: b = b_max - 1; ldr r3, [sp, #20] @ b, %sfp subs r3, r3, #1 @ b, mov r8, r3 @ b, b @ Patches/../C_code.c:212: if (max == 0) mov r3, r8 @ b, b cmp r3, #0 @ b, - beq .LCB3418 @ - b .L536 @long jump @ -.LCB3418: -.L494: + beq .LCB3442 @ + b .L539 @long jump @ +.LCB3442: +.L497: movs r0, #0 @ prephitmp_22, - b .L470 @ -.L493: + b .L473 @ +.L496: movs r0, #0 @ prephitmp_56, - b .L468 @ -.L495: + b .L471 @ +.L498: mov r5, fp @ proc, proc2 -.L472: -@ Patches/../C_code.c:1010: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table +.L475: +@ Patches/../C_code.c:1015: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table movs r0, r4 @, i - bl .L143 @ -@ Patches/../C_code.c:1013: num = GetAdjustedCharacterID(table); + bl .L146 @ +@ Patches/../C_code.c:1018: num = GetAdjustedCharacterID(table); bl GetAdjustedCharacterID @ -@ Patches/../C_code.c:1014: if (num != (i + 1)) +@ Patches/../C_code.c:1019: if (num != (i + 1)) adds r3, r4, #1 @ _24, i, -@ Patches/../C_code.c:1014: if (num != (i + 1)) +@ Patches/../C_code.c:1019: if (num != (i + 1)) cmp r3, r0 @ _24, num - beq .L496 @, -.L538: -@ Patches/../C_code.c:1016: switch (num >> 6) + beq .L499 @, +.L541: +@ Patches/../C_code.c:1021: switch (num >> 6) asrs r2, r0, #6 @ _25, num, -@ Patches/../C_code.c:1016: switch (num >> 6) +@ Patches/../C_code.c:1021: switch (num >> 6) cmp r2, #2 @ _25, - bne .L537 @, -.L475: -@ Patches/../C_code.c:1030: proc->id[(i & 0x3F) - 1] = proc3->id[(num & 0x3F) - 1]; + bne .L540 @, +.L478: +@ Patches/../C_code.c:1035: proc->id[(i & 0x3F) - 1] = proc3->id[(num & 0x3F) - 1]; ldr r2, [sp, #4] @ proc3, %sfp -@ Patches/../C_code.c:1030: proc->id[(i & 0x3F) - 1] = proc3->id[(num & 0x3F) - 1]; +@ Patches/../C_code.c:1035: proc->id[(i & 0x3F) - 1] = proc3->id[(num & 0x3F) - 1]; ands r0, r7 @ tmp336, tmp380 - b .L526 @ -.L476: -@ Patches/../C_code.c:1016: switch (num >> 6) + b .L529 @ +.L479: +@ Patches/../C_code.c:1021: switch (num >> 6) cmp r2, #3 @ _25, - bne .L496 @, -@ Patches/../C_code.c:1035: proc->id[(i & 0x3F) - 1] = proc4->id[(num & 0x3F) - 1]; + bne .L499 @, +@ Patches/../C_code.c:1040: proc->id[(i & 0x3F) - 1] = proc4->id[(num & 0x3F) - 1]; ldr r2, [sp, #8] @ proc4, %sfp -@ Patches/../C_code.c:1035: proc->id[(i & 0x3F) - 1] = proc4->id[(num & 0x3F) - 1]; +@ Patches/../C_code.c:1040: proc->id[(i & 0x3F) - 1] = proc4->id[(num & 0x3F) - 1]; ands r0, r7 @ tmp347, tmp380 -.L526: -@ Patches/../C_code.c:1020: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; +.L529: +@ Patches/../C_code.c:1025: proc->id[(i & 0x3F) - 1] = proc1->id[(num & 0x3F) - 1]; mov ip, r2 @ , add r0, r0, ip @ tmp316, - b .L527 @ -.L477: + b .L530 @ +.L480: ldr r2, [sp, #24] @ , %sfp - b .L526 @ -.L535: -@ Patches/../C_code.c:1013: num = GetAdjustedCharacterID(table); + b .L529 @ +.L538: +@ Patches/../C_code.c:1018: num = GetAdjustedCharacterID(table); movs r4, r3 @ i, _24 - b .L482 @ -.L534: -@ Patches/../C_code.c:1010: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table + b .L485 @ +.L537: +@ Patches/../C_code.c:1015: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table movs r0, r4 @, i -@ Patches/../C_code.c:1007: proc = proc4; +@ Patches/../C_code.c:1012: proc = proc4; ldr r5, [sp, #8] @ proc, %sfp -@ Patches/../C_code.c:1010: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table - bl .L143 @ -@ Patches/../C_code.c:1013: num = GetAdjustedCharacterID(table); +@ Patches/../C_code.c:1015: table = GetCharacterData(i); // check for morphs and duplicates in vanilla table + bl .L146 @ +@ Patches/../C_code.c:1018: num = GetAdjustedCharacterID(table); bl GetAdjustedCharacterID @ -@ Patches/../C_code.c:1014: if (num != (i + 1)) +@ Patches/../C_code.c:1019: if (num != (i + 1)) adds r3, r4, #1 @ _24, i, -@ Patches/../C_code.c:1014: if (num != (i + 1)) +@ Patches/../C_code.c:1019: if (num != (i + 1)) cmp r3, r0 @ _24, num - bne .L538 @, - b .L496 @ -.L484: -@ Patches/../C_code.c:1063: return proc4; + bne .L541 @, + b .L499 @ +.L487: +@ Patches/../C_code.c:1068: return proc4; ldr r3, [sp, #28] @ procID, %sfp subs r3, r3, #3 @ procID, rsbs r2, r3, #0 @ tmp378, tmp377 @@ -4245,15 +4276,15 @@ InitRandomRecruitmentProc: rsbs r3, r3, #0 @ tmp379, tmp376 ands r2, r3 @ proc4, tmp379 str r2, [sp, #24] @ proc4, %sfp - b .L451 @ -.L497: -@ Patches/../C_code.c:1058: return proc3; + b .L454 @ +.L500: +@ Patches/../C_code.c:1063: return proc3; ldr r3, [sp, #4] @ proc3, %sfp str r3, [sp, #24] @ proc3, %sfp - b .L451 @ -.L540: + b .L454 @ +.L543: .align 2 -.L539: +.L542: .word GetCharacterData .word RandValues .word .LANCHOR0 @@ -4278,18 +4309,18 @@ GetReorderedCharacter: mov lr, r9 @, mov r7, r8 @, push {r7, lr} @ -@ Patches/../C_code.c:490: if (!table->portraitId) +@ Patches/../C_code.c:495: if (!table->portraitId) ldrh r3, [r0, #6] @ tmp140, -@ Patches/../C_code.c:489: { +@ Patches/../C_code.c:494: { movs r4, r0 @ table, tmp191 -@ Patches/../C_code.c:490: if (!table->portraitId) +@ Patches/../C_code.c:495: if (!table->portraitId) cmp r3, #0 @ tmp140, - bne .L542 @, -.L555: -@ Patches/../C_code.c:492: return table; + bne .L545 @, +.L558: +@ Patches/../C_code.c:497: return table; movs r0, r4 @ , table -.L541: -@ Patches/../C_code.c:545: } +.L544: +@ Patches/../C_code.c:550: } @ sp needed @ pop {r6, r7} mov r9, r7 @@ -4297,140 +4328,140 @@ GetReorderedCharacter: pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L542: -@ Patches/../C_code.c:495: int id = table->number; +.L545: +@ Patches/../C_code.c:500: int id = table->number; ldrb r5, [r0, #4] @ _2, @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) - ldr r7, .L571 @ tmp190, + ldr r7, .L574 @ tmp190, movs r0, r5 @, _2 bl .L62 @ @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) ldrh r3, [r0, #6] @ tmp142, -@ Patches/../C_code.c:495: int id = table->number; +@ Patches/../C_code.c:500: int id = table->number; mov r8, r5 @ id, _2 @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) cmp r3, #0 @ tmp142, - beq .L544 @, + beq .L547 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L571+4 @ tmp144, + ldr r3, .L574+4 @ tmp144, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_42, *RecruitValues.0_42 lsls r3, r3, #29 @ tmp149, *RecruitValues.0_42, -@ Patches/../C_code.c:496: if (!ShouldRandomizeRecruitmentForUnitID(id)) - beq .L544 @, -@ Patches/../C_code.c:500: int tableID = GetCharTableID(table->portraitId); +@ Patches/../C_code.c:501: if (!ShouldRandomizeRecruitmentForUnitID(id)) + beq .L547 @, +@ Patches/../C_code.c:505: int tableID = GetCharTableID(table->portraitId); ldrh r0, [r4, #6] @ tmp153, bl GetCharTableID @ -@ Patches/../C_code.c:502: int procID = id >> 6; // 0, 1, 2, or 3 +@ Patches/../C_code.c:507: int procID = id >> 6; // 0, 1, 2, or 3 asrs r3, r5, #6 @ procID, _2, -@ Patches/../C_code.c:500: int tableID = GetCharTableID(table->portraitId); +@ Patches/../C_code.c:505: int tableID = GetCharTableID(table->portraitId); movs r6, r0 @ tableID, tmp194 -@ Patches/../C_code.c:502: int procID = id >> 6; // 0, 1, 2, or 3 +@ Patches/../C_code.c:507: int procID = id >> 6; // 0, 1, 2, or 3 mov r9, r3 @ procID, procID -@ Patches/../C_code.c:504: switch (procID) +@ Patches/../C_code.c:509: switch (procID) cmp r3, #2 @ procID, - beq .L546 @, + beq .L549 @, cmp r3, #3 @ procID, - beq .L547 @, + beq .L550 @, cmp r3, #1 @ procID, - beq .L548 @, -@ Patches/../C_code.c:508: proc = Proc_Find(RecruitmentProcCmd1); - ldr r0, .L571+8 @ tmp155, - ldr r3, .L571+12 @ tmp156, + beq .L551 @, +@ Patches/../C_code.c:513: proc = Proc_Find(RecruitmentProcCmd1); + ldr r0, .L574+8 @ tmp155, + ldr r3, .L574+12 @ tmp156, bl .L14 @ -.L549: -@ Patches/../C_code.c:529: if (!proc) +.L552: +@ Patches/../C_code.c:534: if (!proc) cmp r0, #0 @ proc, - beq .L569 @, -.L550: -@ Patches/../C_code.c:534: int unitID = proc->id[(id & 0x3F) - 1]; + beq .L572 @, +.L553: +@ Patches/../C_code.c:539: int unitID = proc->id[(id & 0x3F) - 1]; movs r3, #63 @ tmp169, ands r3, r5 @ tmp170, _2 -@ Patches/../C_code.c:534: int unitID = proc->id[(id & 0x3F) - 1]; +@ Patches/../C_code.c:539: int unitID = proc->id[(id & 0x3F) - 1]; adds r0, r0, r3 @ tmp173, proc, tmp170 adds r0, r0, #43 @ tmp174, -@ Patches/../C_code.c:534: int unitID = proc->id[(id & 0x3F) - 1]; +@ Patches/../C_code.c:539: int unitID = proc->id[(id & 0x3F) - 1]; ldrb r3, [r0] @ unitID, *proc_11 -@ Patches/../C_code.c:535: if (!unitID) +@ Patches/../C_code.c:540: if (!unitID) cmp r3, #0 @ unitID, - bne .L556 @, -@ Patches/../C_code.c:423: if (charId < 1) + bne .L559 @, +@ Patches/../C_code.c:428: if (charId < 1) cmp r5, #0 @ _2, - beq .L552 @, -.L551: -@ Patches/../C_code.c:426: if (!tableID) + beq .L555 @, +.L554: +@ Patches/../C_code.c:431: if (!tableID) cmp r6, #0 @ tableID, - beq .L570 @, -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) + beq .L573 @, +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) movs r3, #52 @ tmp178, movs r1, r3 @ tmp178, tmp178 mov r3, r8 @ tmp179, id muls r3, r1 @ tmp179, tmp178 -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) - ldr r2, .L571+16 @ tmp176, +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) + ldr r2, .L574+16 @ tmp176, lsls r6, r6, #2 @ tmp177, tableID, -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldr r0, [r6, r2] @ cData[tableID_23], cData[tableID_23] subs r3, r3, #52 @ tmp180, adds r0, r0, r3 @ , cData[tableID_23], tmp180 -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldrb r3, [r0, #4] @ tmp182, cmp r3, #0 @ tmp182, - beq .L552 @, -.L554: -@ Patches/../C_code.c:540: if (!result->portraitId) + beq .L555 @, +.L557: +@ Patches/../C_code.c:545: if (!result->portraitId) ldrh r3, [r0, #6] @ tmp183, cmp r3, #0 @ tmp183, - beq .L555 @, - b .L541 @ -.L547: -@ Patches/../C_code.c:523: proc = Proc_Find(RecruitmentProcCmd4); - ldr r3, .L571+12 @ tmp165, - ldr r0, .L571+20 @ tmp164, - bl .L14 @ -@ Patches/../C_code.c:524: break; - b .L549 @ -.L556: -@ Patches/../C_code.c:534: int unitID = proc->id[(id & 0x3F) - 1]; + beq .L558 @, + b .L544 @ +.L550: +@ Patches/../C_code.c:528: proc = Proc_Find(RecruitmentProcCmd4); + ldr r3, .L574+12 @ tmp165, + ldr r0, .L574+20 @ tmp164, + bl .L14 @ +@ Patches/../C_code.c:529: break; + b .L552 @ +.L559: +@ Patches/../C_code.c:539: int unitID = proc->id[(id & 0x3F) - 1]; mov r8, r3 @ id, unitID - b .L551 @ -.L544: -@ Patches/../C_code.c:498: return GetCharacterData(id); + b .L554 @ +.L547: +@ Patches/../C_code.c:503: return GetCharacterData(id); movs r0, r5 @, _2 bl .L62 @ - b .L541 @ -.L546: -@ Patches/../C_code.c:518: proc = Proc_Find(RecruitmentProcCmd3); - ldr r3, .L571+12 @ tmp162, - ldr r0, .L571+24 @ tmp161, + b .L544 @ +.L549: +@ Patches/../C_code.c:523: proc = Proc_Find(RecruitmentProcCmd3); + ldr r3, .L574+12 @ tmp162, + ldr r0, .L574+24 @ tmp161, + bl .L14 @ +@ Patches/../C_code.c:524: break; + b .L552 @ +.L551: +@ Patches/../C_code.c:518: proc = Proc_Find(RecruitmentProcCmd2); + ldr r3, .L574+12 @ tmp159, + ldr r0, .L574+28 @ tmp158, bl .L14 @ @ Patches/../C_code.c:519: break; - b .L549 @ -.L548: -@ Patches/../C_code.c:513: proc = Proc_Find(RecruitmentProcCmd2); - ldr r3, .L571+12 @ tmp159, - ldr r0, .L571+28 @ tmp158, - bl .L14 @ -@ Patches/../C_code.c:514: break; - b .L549 @ -.L570: -@ Patches/../C_code.c:431: return GetCharacterData(charId); + b .L552 @ +.L573: +@ Patches/../C_code.c:436: return GetCharacterData(charId); mov r0, r8 @, id bl .L62 @ - b .L554 @ -.L569: -@ Patches/../C_code.c:531: proc = InitRandomRecruitmentProc(procID); + b .L557 @ +.L572: +@ Patches/../C_code.c:536: proc = InitRandomRecruitmentProc(procID); mov r0, r9 @, procID bl InitRandomRecruitmentProc @ - b .L550 @ -.L552: -@ Patches/../C_code.c:540: if (!result->portraitId) + b .L553 @ +.L555: +@ Patches/../C_code.c:545: if (!result->portraitId) movs r3, #0 @ tmp185, ldrh r3, [r3, #6] @ tmp188, .inst 0xdeff -.L572: +.L575: .align 2 -.L571: +.L574: .word GetCharacterData .word RecruitValues .word .LANCHOR0+80 @@ -4452,13 +4483,13 @@ GetReorderedUnit: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r0] @ unit_3(D)->pCharacterData, unit_3(D)->pCharacterData -@ Patches/../C_code.c:551: } +@ Patches/../C_code.c:556: } @ sp needed @ -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); bl GetReorderedCharacter @ -@ Patches/../C_code.c:551: } +@ Patches/../C_code.c:556: } pop {r4} pop {r1} bx r1 @@ -4475,66 +4506,66 @@ HbPopulate_SSCharacter: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:1073: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) - ldr r5, .L588 @ tmp152, -@ Patches/../C_code.c:1073: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) +@ Patches/../C_code.c:1078: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) + ldr r5, .L591 @ tmp152, +@ Patches/../C_code.c:1078: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) ldr r3, [r5, #12] @ gStatScreen.unit, gStatScreen.unit -@ Patches/../C_code.c:1073: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) +@ Patches/../C_code.c:1078: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) ldr r3, [r3] @ _1->pCharacterData, _1->pCharacterData -@ Patches/../C_code.c:1072: { +@ Patches/../C_code.c:1077: { movs r4, r0 @ proc, tmp153 -@ Patches/../C_code.c:1073: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) +@ Patches/../C_code.c:1078: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) ldrb r0, [r3, #4] @ tmp132, @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) - ldr r3, .L588+4 @ tmp133, + ldr r3, .L591+4 @ tmp133, bl .L14 @ @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) ldrh r3, [r0, #6] @ tmp134, cmp r3, #0 @ tmp134, - beq .L575 @, + beq .L578 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L588+8 @ tmp136, + ldr r3, .L591+8 @ tmp136, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_25, *RecruitValues.0_25 lsls r3, r3, #29 @ tmp141, *RecruitValues.0_25, -@ Patches/../C_code.c:1073: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) - bne .L587 @, -.L575: -@ Patches/../C_code.c:1096: int midDesc = gStatScreen.unit->pCharacterData->descTextId; +@ Patches/../C_code.c:1078: if (ShouldRandomizeRecruitmentForUnitID(gStatScreen.unit->pCharacterData->number)) + bne .L590 @, +.L578: +@ Patches/../C_code.c:1101: int midDesc = gStatScreen.unit->pCharacterData->descTextId; ldr r3, [r5, #12] @ gStatScreen.unit, gStatScreen.unit -@ Patches/../C_code.c:1096: int midDesc = gStatScreen.unit->pCharacterData->descTextId; +@ Patches/../C_code.c:1101: int midDesc = gStatScreen.unit->pCharacterData->descTextId; ldr r3, [r3] @ _8->pCharacterData, _8->pCharacterData ldrh r3, [r3, #2] @ _10, -@ Patches/../C_code.c:1098: if (midDesc) +@ Patches/../C_code.c:1103: if (midDesc) cmp r3, #0 @ _10, - beq .L577 @, -.L576: -@ Patches/../C_code.c:1115: } + beq .L580 @, +.L579: +@ Patches/../C_code.c:1120: } @ sp needed @ -@ Patches/../C_code.c:1084: proc->mid = 0x6BE; // TODO: mid constants +@ Patches/../C_code.c:1089: proc->mid = 0x6BE; // TODO: mid constants movs r2, #76 @ tmp150, strh r3, [r4, r2] @ _10, proc_15(D)->mid -@ Patches/../C_code.c:1115: } +@ Patches/../C_code.c:1120: } pop {r4, r5, r6} pop {r0} bx r0 -.L587: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L590: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r3, [r5, #12] @ gStatScreen.unit, gStatScreen.unit ldr r0, [r3] @ pretmp_27->pCharacterData, pretmp_27->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:1075: int midDesc = GetReorderedUnit(gStatScreen.unit)->descTextId; +@ Patches/../C_code.c:1080: int midDesc = GetReorderedUnit(gStatScreen.unit)->descTextId; ldrh r3, [r0, #2] @ _10, -@ Patches/../C_code.c:1077: if (midDesc) +@ Patches/../C_code.c:1082: if (midDesc) cmp r3, #0 @ _10, - bne .L576 @, -.L577: -@ Patches/../C_code.c:1072: { - ldr r3, .L588+12 @ _10, - b .L576 @ -.L589: + bne .L579 @, +.L580: +@ Patches/../C_code.c:1077: { + ldr r3, .L591+12 @ _10, + b .L579 @ +.L592: .align 2 -.L588: +.L591: .word gStatScreen .word GetCharacterData .word RecruitValues @@ -4552,15 +4583,15 @@ GetReorderedUnitID: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldr r0, [r0] @ unit_5(D)->pCharacterData, unit_5(D)->pCharacterData -@ Patches/../C_code.c:555: } +@ Patches/../C_code.c:560: } @ sp needed @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; bl GetReorderedCharacter @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldrb r0, [r0, #4] @ tmp120, -@ Patches/../C_code.c:555: } +@ Patches/../C_code.c:560: } pop {r4} pop {r1} bx r1 @@ -4581,53 +4612,53 @@ GetReorderedCharacterPortraitByPortrait: movs r6, r0 @ portraitID, portraitID mov r8, r0 @ portraitID, tmp135 push {lr} @ -@ Patches/../C_code.c:462: if (portraitID < 0x100) // vanilla closed eyes etc portraits to replace +@ Patches/../C_code.c:467: if (portraitID < 0x100) // vanilla closed eyes etc portraits to replace cmp r0, #255 @ portraitID, - bgt .L592 @, -@ Patches/../C_code.c:464: if (ReplacePortraitTable[portraitID]) - ldr r3, .L606 @ tmp127, + bgt .L595 @, +@ Patches/../C_code.c:469: if (ReplacePortraitTable[portraitID]) + ldr r3, .L609 @ tmp127, ldrb r3, [r3, r0] @ _13, ReplacePortraitTable -@ Patches/../C_code.c:464: if (ReplacePortraitTable[portraitID]) +@ Patches/../C_code.c:469: if (ReplacePortraitTable[portraitID]) cmp r3, #0 @ _13, - bne .L605 @, -.L592: -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + bne .L608 @, +.L595: +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r7, #128 @ tmp134, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r4, #1 @ i, - ldr r5, .L606+4 @ tmp133, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + ldr r5, .L609+4 @ tmp133, +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) lsls r7, r7, #1 @ tmp134, tmp134, - b .L596 @ -.L593: -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + b .L599 @ +.L596: +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) cmp r4, r7 @ i, tmp134 - beq .L594 @, -.L596: -@ Patches/../C_code.c:475: table = GetCharacterData(i); + beq .L597 @, +.L599: +@ Patches/../C_code.c:480: table = GetCharacterData(i); movs r0, r4 @, i - bl .L608 @ -@ Patches/../C_code.c:476: if (table->portraitId == portraitID) + bl .L611 @ +@ Patches/../C_code.c:481: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp129, -@ Patches/../C_code.c:476: if (table->portraitId == portraitID) +@ Patches/../C_code.c:481: if (table->portraitId == portraitID) cmp r3, r6 @ tmp129, portraitID - bne .L593 @, -@ Patches/../C_code.c:478: return table->number; + bne .L596 @, +@ Patches/../C_code.c:483: return table->number; ldrb r0, [r0, #4] @ _22, -@ Patches/../C_code.c:560: if (!result) +@ Patches/../C_code.c:565: if (!result) cmp r0, #0 @ _22, - beq .L594 @, -@ Patches/../C_code.c:564: return GetReorderedCharacter(GetCharacterData(result))->portraitId; - bl .L608 @ -@ Patches/../C_code.c:564: return GetReorderedCharacter(GetCharacterData(result))->portraitId; + beq .L597 @, +@ Patches/../C_code.c:569: return GetReorderedCharacter(GetCharacterData(result))->portraitId; + bl .L611 @ +@ Patches/../C_code.c:569: return GetReorderedCharacter(GetCharacterData(result))->portraitId; bl GetReorderedCharacter @ -@ Patches/../C_code.c:564: return GetReorderedCharacter(GetCharacterData(result))->portraitId; +@ Patches/../C_code.c:569: return GetReorderedCharacter(GetCharacterData(result))->portraitId; ldrh r3, [r0, #6] @ portraitID, mov r8, r3 @ portraitID, portraitID -.L594: -@ Patches/../C_code.c:565: } +.L597: +@ Patches/../C_code.c:570: } @ sp needed @ mov r0, r8 @, portraitID pop {r7} @@ -4635,13 +4666,13 @@ GetReorderedCharacterPortraitByPortrait: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L605: -@ Patches/../C_code.c:466: portraitID = ReplacePortraitTable[portraitID]; +.L608: +@ Patches/../C_code.c:471: portraitID = ReplacePortraitTable[portraitID]; movs r6, r3 @ portraitID, _13 - b .L592 @ -.L607: + b .L595 @ +.L610: .align 2 -.L606: +.L609: .word ReplacePortraitTable .word GetCharacterData .size GetReorderedCharacterPortraitByPortrait, .-GetReorderedCharacterPortraitByPortrait @@ -4657,37 +4688,37 @@ GetRandomizedPortrait: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:569: { +@ Patches/../C_code.c:574: { subs r4, r0, #0 @ portraitID, tmp130, -@ Patches/../C_code.c:570: if (portraitID < 0) - blt .L611 @, +@ Patches/../C_code.c:575: if (portraitID < 0) + blt .L614 @, @ Patches/../C_code.c:200: if (!id) cmp r0, #0 @ portraitID, - beq .L611 @, + beq .L614 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L622 @ tmp121, + ldr r3, .L625 @ tmp121, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_10, *RecruitValues.0_10 lsls r3, r3, #29 @ tmp126, *RecruitValues.0_10, -@ Patches/../C_code.c:574: if (!ShouldRandomizeRecruitmentForPortraitID(portraitID)) - beq .L611 @, -@ Patches/../C_code.c:578: int result = GetReorderedCharacterPortraitByPortrait(portraitID); +@ Patches/../C_code.c:579: if (!ShouldRandomizeRecruitmentForPortraitID(portraitID)) + beq .L614 @, +@ Patches/../C_code.c:583: int result = GetReorderedCharacterPortraitByPortrait(portraitID); bl GetReorderedCharacterPortraitByPortrait @ -@ Patches/../C_code.c:580: if (!result) +@ Patches/../C_code.c:585: if (!result) cmp r0, #0 @ result, - beq .L611 @, -@ Patches/../C_code.c:604: return result; + beq .L614 @, +@ Patches/../C_code.c:609: return result; movs r4, r0 @ portraitID, result -.L611: -@ Patches/../C_code.c:605: } +.L614: +@ Patches/../C_code.c:610: } @ sp needed @ movs r0, r4 @, portraitID pop {r4} pop {r1} bx r1 -.L623: +.L626: .align 2 -.L622: +.L625: .word RecruitValues .size GetRandomizedPortrait, .-GetRandomizedPortrait .align 1 @@ -4706,86 +4737,86 @@ GetNameTextIdOfRandomizedPortrait: mov lr, r10 @, mov r7, r9 @, push {r6, r7, lr} @ -@ Patches/../C_code.c:608: { +@ Patches/../C_code.c:613: { subs r6, r0, #0 @ portraitID, tmp156, -@ Patches/../C_code.c:570: if (portraitID < 0) - blt .L626 @, +@ Patches/../C_code.c:575: if (portraitID < 0) + blt .L629 @, @ Patches/../C_code.c:200: if (!id) cmp r0, #0 @ portraitID, - beq .L626 @, + beq .L629 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L648 @ tmp133, + ldr r3, .L651 @ tmp133, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_21, *RecruitValues.0_21 lsls r3, r3, #29 @ tmp138, *RecruitValues.0_21, -@ Patches/../C_code.c:574: if (!ShouldRandomizeRecruitmentForPortraitID(portraitID)) - beq .L626 @, -@ Patches/../C_code.c:578: int result = GetReorderedCharacterPortraitByPortrait(portraitID); +@ Patches/../C_code.c:579: if (!ShouldRandomizeRecruitmentForPortraitID(portraitID)) + beq .L629 @, +@ Patches/../C_code.c:583: int result = GetReorderedCharacterPortraitByPortrait(portraitID); bl GetReorderedCharacterPortraitByPortrait @ -@ Patches/../C_code.c:580: if (!result) +@ Patches/../C_code.c:585: if (!result) cmp r0, #0 @ result, - beq .L626 @, -@ Patches/../C_code.c:604: return result; + beq .L629 @, +@ Patches/../C_code.c:609: return result; movs r6, r0 @ portraitID, result -.L626: - ldr r3, .L648+4 @ ivtmp.1078, - mov r9, r3 @ ivtmp.1078, ivtmp.1078 -@ Patches/../C_code.c:617: int bankID = 0; +.L629: + ldr r3, .L651+4 @ ivtmp.1083, + mov r9, r3 @ ivtmp.1083, ivtmp.1083 +@ Patches/../C_code.c:622: int bankID = 0; movs r3, #0 @ bankID, mov r8, r3 @ bankID, bankID -@ Patches/../C_code.c:431: return GetCharacterData(charId); - ldr r3, .L648+8 @ tmp153, -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:436: return GetCharacterData(charId); + ldr r3, .L651+8 @ tmp153, +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r7, #128 @ tmp154, -@ Patches/../C_code.c:431: return GetCharacterData(charId); +@ Patches/../C_code.c:436: return GetCharacterData(charId); mov r10, r3 @ tmp153, tmp153 -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) lsls r7, r7, #1 @ tmp154, tmp154, -.L628: -@ Patches/../C_code.c:604: return result; - movs r5, #0 @ ivtmp.1072, -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) +.L631: +@ Patches/../C_code.c:609: return result; + movs r5, #0 @ ivtmp.1077, +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r4, #1 @ i, - b .L634 @ -.L629: -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) - mov r3, r9 @ ivtmp.1078, ivtmp.1078 + b .L637 @ +.L632: +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) + mov r3, r9 @ ivtmp.1083, ivtmp.1083 ldr r0, [r3] @ MEM[(const struct CharacterData * *)_49], MEM[(const struct CharacterData * *)_49] - adds r0, r0, r5 @ _27, MEM[(const struct CharacterData * *)_49], ivtmp.1072 -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) + adds r0, r0, r5 @ _27, MEM[(const struct CharacterData * *)_49], ivtmp.1077 +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldrb r3, [r0, #4] @ tmp144, cmp r3, #0 @ tmp144, - beq .L631 @, -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) + beq .L634 @, +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp145, -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) cmp r3, r6 @ tmp145, portraitID - beq .L646 @, -.L632: -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) + beq .L649 @, +.L635: +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) - adds r5, r5, #52 @ ivtmp.1072, +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) + adds r5, r5, #52 @ ivtmp.1077, cmp r4, r7 @ i, tmp154 - beq .L647 @, -.L634: -@ Patches/../C_code.c:426: if (!tableID) + beq .L650 @, +.L637: +@ Patches/../C_code.c:431: if (!tableID) mov r3, r8 @ bankID, bankID cmp r3, #0 @ bankID, - bne .L629 @, -@ Patches/../C_code.c:431: return GetCharacterData(charId); + bne .L632 @, +@ Patches/../C_code.c:436: return GetCharacterData(charId); movs r0, r4 @, i - bl .L650 @ -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) + bl .L653 @ +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp145, -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) cmp r3, r6 @ tmp145, portraitID - bne .L632 @, -.L646: -@ Patches/../C_code.c:625: return table->nameTextId; + bne .L635 @, +.L649: +@ Patches/../C_code.c:630: return table->nameTextId; ldrh r0, [r0] @ , *_27 -.L624: -@ Patches/../C_code.c:633: } +.L627: +@ Patches/../C_code.c:638: } @ sp needed @ pop {r5, r6, r7} mov r10, r7 @@ -4794,30 +4825,30 @@ GetNameTextIdOfRandomizedPortrait: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L647: -@ Patches/../C_code.c:629: bankID++; +.L650: +@ Patches/../C_code.c:634: bankID++; movs r3, #1 @ tmp166, mov ip, r3 @ tmp166, tmp166 -@ Patches/../C_code.c:618: while (bankID < NumberOfCharTables) +@ Patches/../C_code.c:623: while (bankID < NumberOfCharTables) adds r3, r3, #3 @ tmp168, -@ Patches/../C_code.c:629: bankID++; +@ Patches/../C_code.c:634: bankID++; add r8, r8, ip @ bankID, tmp166 -@ Patches/../C_code.c:618: while (bankID < NumberOfCharTables) +@ Patches/../C_code.c:623: while (bankID < NumberOfCharTables) mov ip, r3 @ tmp168, tmp168 mov r3, r8 @ bankID, bankID - add r9, r9, ip @ ivtmp.1078, tmp168 + add r9, r9, ip @ ivtmp.1083, tmp168 cmp r3, #12 @ bankID, - bne .L628 @, -@ Patches/../C_code.c:632: return 1; // "Yes" + bne .L631 @, +@ Patches/../C_code.c:637: return 1; // "Yes" movs r0, #1 @ , - b .L624 @ -.L631: -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) + b .L627 @ +.L634: +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) ldrh r3, [r3, #6] @ tmp151, .inst 0xdeff -.L649: +.L652: .align 2 -.L648: +.L651: .word RecruitValues .word .LANCHOR0 .word GetCharacterData @@ -4844,119 +4875,119 @@ AdjustNonSkinColours: mov r8, r2 @ AlwaysRandomizePastThisColour, tmp193 movs r5, r3 @ NeverRandomizeBeforeThisColour, tmp194 sub sp, sp, #20 @,, -@ Patches/../C_code.c:1578: if (id > 0xFF) // other games use different palette order +@ Patches/../C_code.c:1583: if (id > 0xFF) // other games use different palette order cmp r1, #255 @ id, - ble .L652 @, -@ Patches/../C_code.c:1580: AlwaysRandomizePastThisColour = 99; + ble .L655 @, +@ Patches/../C_code.c:1585: AlwaysRandomizePastThisColour = 99; movs r3, #99 @ AlwaysRandomizePastThisColour, -@ Patches/../C_code.c:1581: NeverRandomizeBeforeThisColour = 0; +@ Patches/../C_code.c:1586: NeverRandomizeBeforeThisColour = 0; movs r5, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1580: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1585: AlwaysRandomizePastThisColour = 99; mov r8, r3 @ AlwaysRandomizePastThisColour, AlwaysRandomizePastThisColour -.L652: -@ Patches/../C_code.c:2431: int noise[4] = { 0, 0, 0, 0 }; +.L655: +@ Patches/../C_code.c:2436: int noise[4] = { 0, 0, 0, 0 }; movs r2, #16 @, movs r1, #0 @, - ldr r3, .L667 @ tmp148, + ldr r3, .L670 @ tmp148, mov r0, sp @, bl .L14 @ -@ Patches/../C_code.c:2432: int result = HashByte_Global(5, 254, noise, id) + 1; +@ Patches/../C_code.c:2437: int result = HashByte_Global(5, 254, noise, id) + 1; movs r3, r4 @, id mov r2, sp @, movs r1, #254 @, movs r0, #5 @, bl HashByte_Global @ -@ Patches/../C_code.c:2432: int result = HashByte_Global(5, 254, noise, id) + 1; +@ Patches/../C_code.c:2437: int result = HashByte_Global(5, 254, noise, id) + 1; adds r6, r0, #1 @ result, tmp152, -@ Patches/../C_code.c:2433: if (result < 40) +@ Patches/../C_code.c:2438: if (result < 40) cmp r6, #39 @ result, - bgt .L653 @, -@ Patches/../C_code.c:2435: result += 40; + bgt .L656 @, +@ Patches/../C_code.c:2440: result += 40; adds r0, r0, #41 @ tmp152, movs r6, r0 @ result, tmp152 -.L654: - ldr r2, .L667+4 @ tmp187, +.L657: + ldr r2, .L670+4 @ tmp187, mov r9, r2 @ tmp187, tmp187 -@ Patches/../C_code.c:1616: RandColours(bank, i, 1, id); - ldr r2, .L667+8 @ tmp190, -@ Patches/../C_code.c:1585: u16 * buffer = &gPaletteBuffer[(bank * 16)]; +@ Patches/../C_code.c:1621: RandColours(bank, i, 1, id); + ldr r2, .L670+8 @ tmp190, +@ Patches/../C_code.c:1590: u16 * buffer = &gPaletteBuffer[(bank * 16)]; lsls r3, r7, #4 @ _47, bank, mov r10, r3 @ _47, _47 -@ Patches/../C_code.c:1616: RandColours(bank, i, 1, id); +@ Patches/../C_code.c:1621: RandColours(bank, i, 1, id); mov fp, r2 @ tmp190, tmp190 -@ Patches/../C_code.c:1586: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:1591: for (int i = 0; i < 16; i++) movs r3, #0 @ i, -@ Patches/../C_code.c:1616: RandColours(bank, i, 1, id); +@ Patches/../C_code.c:1621: RandColours(bank, i, 1, id); lsls r6, r6, #24 @ tmp188, result, lsrs r6, r6, #24 @ tmp189, tmp188, -.L658: -@ Patches/../C_code.c:1588: if (i < NeverRandomizeBeforeThisColour) +.L661: +@ Patches/../C_code.c:1593: if (i < NeverRandomizeBeforeThisColour) movs r4, r5 @ _24, NeverRandomizeBeforeThisColour cmp r5, r3 @ NeverRandomizeBeforeThisColour, i - bge .L655 @, + bge .L658 @, movs r4, r3 @ _24, i -.L655: -@ Patches/../C_code.c:1592: col = buffer[i]; +.L658: +@ Patches/../C_code.c:1597: col = buffer[i]; mov r3, r10 @ _47, _47 mov r2, r9 @ tmp187, tmp187 adds r3, r4, r3 @ tmp154, _24, _47 lsls r3, r3, #1 @ tmp155, tmp154, ldrh r0, [r2, r3] @ _5, *_4 -@ Patches/../C_code.c:1596: if (i < AlwaysRandomizePastThisColour) +@ Patches/../C_code.c:1601: if (i < AlwaysRandomizePastThisColour) cmp r8, r4 @ AlwaysRandomizePastThisColour, _24 - ble .L656 @, + ble .L659 @, movs r3, #31 @ tmp159, movs r1, r3 @ _23, tmp159 -@ Patches/../C_code.c:1594: g = (col & (0x1F << 5)) >> 5; +@ Patches/../C_code.c:1599: g = (col & (0x1F << 5)) >> 5; asrs r2, r0, #5 @ tmp163, _5, ands r1, r0 @ _23, _5 -@ Patches/../C_code.c:1595: b = (col & (0x1F << 10)) >> 10; +@ Patches/../C_code.c:1600: b = (col & (0x1F << 10)) >> 10; asrs r0, r0, #10 @ tmp165, _5, -@ Patches/../C_code.c:1594: g = (col & (0x1F << 5)) >> 5; +@ Patches/../C_code.c:1599: g = (col & (0x1F << 5)) >> 5; ands r2, r3 @ g, tmp159 -@ Patches/../C_code.c:1595: b = (col & (0x1F << 10)) >> 10; +@ Patches/../C_code.c:1600: b = (col & (0x1F << 10)) >> 10; ands r3, r0 @ b, tmp165 -@ Patches/../C_code.c:1598: if ((r >= g) && (g >= b)) +@ Patches/../C_code.c:1603: if ((r >= g) && (g >= b)) cmp r1, r2 @ _23, g - bcc .L656 @, + bcc .L659 @, cmp r2, r3 @ g, b - bcc .L656 @, -@ Patches/../C_code.c:1600: if (((r - g) < 14) && ((g - b) < 25)) + bcc .L659 @, +@ Patches/../C_code.c:1605: if (((r - g) < 14) && ((g - b) < 25)) subs r0, r1, r2 @ tmp179, _23, g -@ Patches/../C_code.c:1600: if (((r - g) < 14) && ((g - b) < 25)) +@ Patches/../C_code.c:1605: if (((r - g) < 14) && ((g - b) < 25)) cmp r0, #13 @ tmp179, - bgt .L656 @, -@ Patches/../C_code.c:1600: if (((r - g) < 14) && ((g - b) < 25)) + bgt .L659 @, +@ Patches/../C_code.c:1605: if (((r - g) < 14) && ((g - b) < 25)) subs r3, r2, r3 @ tmp180, g, b -@ Patches/../C_code.c:1600: if (((r - g) < 14) && ((g - b) < 25)) +@ Patches/../C_code.c:1605: if (((r - g) < 14) && ((g - b) < 25)) cmp r3, #24 @ tmp180, - bgt .L656 @, -@ Patches/../C_code.c:1602: if (fading) + bgt .L659 @, +@ Patches/../C_code.c:1607: if (fading) ldr r3, [sp, #56] @ tmp206, fading cmp r3, #0 @ tmp206, - bne .L657 @, -@ Patches/../C_code.c:1606: else if (r > 17) + bne .L660 @, +@ Patches/../C_code.c:1611: else if (r > 17) cmp r1, #17 @ _23, - bls .L656 @, -@ Patches/../C_code.c:1608: if ((r + g) > 36) + bls .L659 @, +@ Patches/../C_code.c:1613: if ((r + g) > 36) adds r1, r1, r2 @ tmp183, _23, g -@ Patches/../C_code.c:1608: if ((r + g) > 36) +@ Patches/../C_code.c:1613: if ((r + g) > 36) cmp r1, #36 @ tmp183, - bgt .L657 @, -.L656: -@ Patches/../C_code.c:1616: RandColours(bank, i, 1, id); + bgt .L660 @, +.L659: +@ Patches/../C_code.c:1621: RandColours(bank, i, 1, id); movs r3, r6 @, tmp189 movs r2, #1 @, movs r1, r4 @, _24 movs r0, r7 @, bank - bl .L669 @ -.L657: -@ Patches/../C_code.c:1586: for (int i = 0; i < 16; i++) + bl .L672 @ +.L660: +@ Patches/../C_code.c:1591: for (int i = 0; i < 16; i++) adds r3, r4, #1 @ i, _24, -@ Patches/../C_code.c:1586: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:1591: for (int i = 0; i < 16; i++) cmp r3, #15 @ i, - ble .L658 @, -@ Patches/../C_code.c:1618: } + ble .L661 @, +@ Patches/../C_code.c:1623: } add sp, sp, #20 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -4967,17 +4998,17 @@ AdjustNonSkinColours: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L653: -@ Patches/../C_code.c:2437: if (result > 210) +.L656: +@ Patches/../C_code.c:2442: if (result > 210) cmp r6, #210 @ result, - ble .L654 @, -@ Patches/../C_code.c:2439: result -= 40; + ble .L657 @, +@ Patches/../C_code.c:2444: result -= 40; subs r0, r0, #39 @ tmp152, movs r6, r0 @ result, tmp152 - b .L654 @ -.L668: + b .L657 @ +.L671: .align 2 -.L667: +.L670: .word memset .word gPaletteBuffer .word RandColours @@ -4996,16 +5027,16 @@ PortraitAdjustNonSkinColours: push {r4, r5, lr} @ movs r4, r3 @ NeverRandomizeBeforeThisColour, tmp156 sub sp, sp, #12 @,, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L671 @, + beq .L674 @, cmp r3, #0 @ NeverRandomizeBeforeThisColour, - bne .L671 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r3, .L683 @ tmp137, + bne .L674 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r3, .L686 @ tmp137, lsls r4, r0, #5 @ tmp139, bank, adds r4, r4, #2 @ tmp140, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r5, [r4, r3] @ tmp145, gPaletteBuffer movs r4, #192 @ tmp144, movs r3, #0 @ tmp150, @@ -5015,41 +5046,41 @@ PortraitAdjustNonSkinColours: movs r4, #5 @ tmp152, rsbs r3, r3, #0 @ tmp151, tmp149 ands r4, r3 @ NeverRandomizeBeforeThisColour, tmp151 -.L671: -@ Patches/../C_code.c:1702: if (classCard) +.L674: +@ Patches/../C_code.c:1707: if (classCard) ldr r3, [sp, #28] @ tmp160, classCard cmp r3, #0 @ tmp160, - beq .L672 @, -@ Patches/../C_code.c:1705: NeverRandomizeBeforeThisColour = 0; + beq .L675 @, +@ Patches/../C_code.c:1710: NeverRandomizeBeforeThisColour = 0; movs r4, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, -.L672: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L683+4 @ tmp148, - ldr r3, [r3] @ VanillaPortraitsOnly.46_7, VanillaPortraitsOnly -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r3, #0 @ VanillaPortraitsOnly.46_7, - beq .L676 @, - movs r3, r4 @ VanillaPortraitsOnly.46_7, NeverRandomizeBeforeThisColour -.L673: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L675: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L686+4 @ tmp148, + ldr r3, [r3] @ VanillaPortraitsOnly.47_7, VanillaPortraitsOnly +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r3, #0 @ VanillaPortraitsOnly.47_7, + beq .L679 @, + movs r3, r4 @ VanillaPortraitsOnly.47_7, NeverRandomizeBeforeThisColour +.L676: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r4, [sp, #24] @ tmp161, fading str r4, [sp] @ tmp161, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1713: } +@ Patches/../C_code.c:1718: } add sp, sp, #12 @,, @ sp needed @ pop {r4, r5} pop {r0} bx r0 -.L676: -@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; +.L679: +@ Patches/../C_code.c:1714: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L673 @ -.L684: + b .L676 @ +.L687: .align 2 -.L683: +.L686: .word gPaletteBuffer .word VanillaPortraitsOnly .size PortraitAdjustNonSkinColours, .-PortraitAdjustNonSkinColours @@ -5069,44 +5100,44 @@ MaybeRandomizeColours: mov lr, fp @, mov r6, r9 @, mov r5, r8 @, -@ Patches/../C_code.c:1719: if (RandBitflags->fog == 1) +@ Patches/../C_code.c:1724: if (RandBitflags->fog == 1) movs r3, #96 @ tmp297, -@ Patches/../C_code.c:1718: { +@ Patches/../C_code.c:1723: { push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:1719: if (RandBitflags->fog == 1) - ldr r7, .L842 @ tmp526, - ldr r2, [r7] @ RandBitflags.47_1, RandBitflags -@ Patches/../C_code.c:1719: if (RandBitflags->fog == 1) - ldrb r1, [r2, #3] @ *RandBitflags.47_1, *RandBitflags.47_1 -@ Patches/../C_code.c:1718: { +@ Patches/../C_code.c:1724: if (RandBitflags->fog == 1) + ldr r7, .L845 @ tmp526, + ldr r2, [r7] @ RandBitflags.48_1, RandBitflags +@ Patches/../C_code.c:1724: if (RandBitflags->fog == 1) + ldrb r1, [r2, #3] @ *RandBitflags.48_1, *RandBitflags.48_1 +@ Patches/../C_code.c:1723: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:1719: if (RandBitflags->fog == 1) - ands r3, r1 @ _3, *RandBitflags.47_1 -@ Patches/../C_code.c:1719: if (RandBitflags->fog == 1) +@ Patches/../C_code.c:1724: if (RandBitflags->fog == 1) + ands r3, r1 @ _3, *RandBitflags.48_1 +@ Patches/../C_code.c:1724: if (RandBitflags->fog == 1) cmp r3, #32 @ _3, - beq .L836 @, -@ Patches/../C_code.c:1723: if (RandBitflags->fog == 2) + beq .L839 @, +@ Patches/../C_code.c:1728: if (RandBitflags->fog == 2) cmp r3, #64 @ _3, - bne .L687 @, -@ Patches/../C_code.c:1725: gVision = 3; + bne .L690 @, +@ Patches/../C_code.c:1730: gVision = 3; movs r1, #3 @ tmp303, - ldr r3, .L842+4 @ tmp302, + ldr r3, .L845+4 @ tmp302, strb r1, [r3] @ tmp303, gVision -.L687: -@ Patches/../C_code.c:1560: if (NeverRandomizeColours) - ldr r3, .L842+8 @ tmp305, +.L690: +@ Patches/../C_code.c:1565: if (NeverRandomizeColours) + ldr r3, .L845+8 @ tmp305, ldr r4, [r3] @ , NeverRandomizeColours -@ Patches/../C_code.c:1560: if (NeverRandomizeColours) +@ Patches/../C_code.c:1565: if (NeverRandomizeColours) cmp r4, #0 @ , - bne .L751 @, -.L838: -@ Patches/../C_code.c:1564: if (RandBitflags->colours) - ldrb r3, [r2, #2] @ *RandBitflags.47_1, *RandBitflags.47_1 -@ Patches/../C_code.c:1564: if (RandBitflags->colours) - lsls r3, r3, #29 @ tmp603, *RandBitflags.47_1, - bne .L837 @, -.L685: -@ Patches/../C_code.c:1965: } + bne .L754 @, +.L841: +@ Patches/../C_code.c:1569: if (RandBitflags->colours) + ldrb r3, [r2, #2] @ *RandBitflags.48_1, *RandBitflags.48_1 +@ Patches/../C_code.c:1569: if (RandBitflags->colours) + lsls r3, r3, #29 @ tmp603, *RandBitflags.48_1, + bne .L840 @, +.L688: +@ Patches/../C_code.c:1970: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ @@ -5118,77 +5149,77 @@ MaybeRandomizeColours: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L837: -@ Patches/../C_code.c:1733: int fading = AnyFadeExists(); +.L840: +@ Patches/../C_code.c:1738: int fading = AnyFadeExists(); bl AnyFadeExists @ -@ Patches/../C_code.c:1741: if (Proc_Find(gProcScr_StatScreen)) - ldr r3, .L842+12 @ tmp527, -@ Patches/../C_code.c:1733: int fading = AnyFadeExists(); +@ Patches/../C_code.c:1746: if (Proc_Find(gProcScr_StatScreen)) + ldr r3, .L845+12 @ tmp527, +@ Patches/../C_code.c:1738: int fading = AnyFadeExists(); str r0, [sp, #12] @ tmp573, %sfp -@ Patches/../C_code.c:1741: if (Proc_Find(gProcScr_StatScreen)) - ldr r0, .L842+16 @ tmp315, +@ Patches/../C_code.c:1746: if (Proc_Find(gProcScr_StatScreen)) + ldr r0, .L845+16 @ tmp315, mov r9, r3 @ tmp527, tmp527 bl .L14 @ -@ Patches/../C_code.c:1741: if (Proc_Find(gProcScr_StatScreen)) +@ Patches/../C_code.c:1746: if (Proc_Find(gProcScr_StatScreen)) cmp r0, #0 @ tmp574, - beq .L689 @, -@ Patches/../C_code.c:1743: unit = gStatScreen.unit; - ldr r3, .L842+20 @ tmp317, + beq .L692 @, +@ Patches/../C_code.c:1748: unit = gStatScreen.unit; + ldr r3, .L845+20 @ tmp317, ldr r5, [r3, #12] @ unit, gStatScreen.unit -@ Patches/../C_code.c:1744: if (unit) +@ Patches/../C_code.c:1749: if (unit) cmp r5, #0 @ unit, - beq .L689 @, -@ Patches/../C_code.c:1746: if (unit->pCharacterData->portraitId) + beq .L692 @, +@ Patches/../C_code.c:1751: if (unit->pCharacterData->portraitId) ldr r3, [r5] @ unit_122->pCharacterData, unit_122->pCharacterData -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r0, r5 @, unit -@ Patches/../C_code.c:1746: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1751: if (unit->pCharacterData->portraitId) ldrh r6, [r3, #6] @ _8, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); - ldr r3, .L842+24 @ tmp319, +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); + ldr r3, .L845+24 @ tmp319, bl .L14 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r5] @ _183, unit_122->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp320, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp575 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp320, - bne .L690 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L693 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp321, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp323, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r5, r2] @ tmp321, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp322, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp321, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp322, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L690: -@ Patches/../C_code.c:1549: if (!portraitID) +.L693: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L691 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L694 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L691: -@ Patches/../C_code.c:1754: PortraitAdjustNonSkinColours( - ldr r3, .L842+28 @ tmp324, +.L694: +@ Patches/../C_code.c:1759: PortraitAdjustNonSkinColours( + ldr r3, .L845+28 @ tmp324, ldr r2, [r3] @ AlwaysRandomizePastThisColour, PortraitColoursPastThisAreNotSkin movs r3, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L692 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + beq .L695 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r5, #177 @ tmp326, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r0, .L842+32 @ tmp325, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r0, .L845+32 @ tmp325, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) lsls r5, r5, #1 @ tmp326, tmp326, ldrh r5, [r0, r5] @ tmp331, movs r0, #192 @ tmp330, @@ -5198,148 +5229,148 @@ MaybeRandomizeColours: rsbs r0, r3, #0 @ tmp548, tmp546 movs r3, #5 @ tmp549, ands r3, r0 @ NeverRandomizeBeforeThisColour, tmp548 -.L692: -@ Patches/../C_code.c:1702: if (classCard) +.L695: +@ Patches/../C_code.c:1707: if (classCard) cmp r6, #0 @ _8, - bne .LCB4317 @ - b .L755 @long jump @ -.LCB4317: + bne .LCB4341 @ + b .L758 @long jump @ +.LCB4341: movs r4, r3 @ , NeverRandomizeBeforeThisColour -.L693: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L842+36 @ tmp334, - ldr r3, [r3] @ VanillaPortraitsOnly.46_176, VanillaPortraitsOnly -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r3, #0 @ VanillaPortraitsOnly.46_176, - bne .LCB4324 @ - b .L756 @long jump @ -.LCB4324: - movs r3, r4 @ VanillaPortraitsOnly.46_176, -.L694: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L696: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L845+36 @ tmp334, + ldr r3, [r3] @ VanillaPortraitsOnly.47_176, VanillaPortraitsOnly +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r3, #0 @ VanillaPortraitsOnly.47_176, + bne .LCB4348 @ + b .L759 @long jump @ +.LCB4348: + movs r3, r4 @ VanillaPortraitsOnly.47_176, +.L697: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r0, [sp, #12] @ fading, %sfp str r0, [sp] @ fading, movs r0, #11 @, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1757: return true; // so we don't alter prep palettes during stat screen +@ Patches/../C_code.c:1762: return true; // so we don't alter prep palettes during stat screen movs r4, #1 @ , - b .L685 @ -.L836: -@ Patches/../C_code.c:1721: gVision = 0; + b .L688 @ +.L839: +@ Patches/../C_code.c:1726: gVision = 0; movs r1, #0 @ tmp300, - ldr r3, .L842+4 @ tmp299, + ldr r3, .L845+4 @ tmp299, strb r1, [r3] @ tmp300, gVision -@ Patches/../C_code.c:1560: if (NeverRandomizeColours) - ldr r3, .L842+8 @ tmp305, +@ Patches/../C_code.c:1565: if (NeverRandomizeColours) + ldr r3, .L845+8 @ tmp305, ldr r4, [r3] @ , NeverRandomizeColours -@ Patches/../C_code.c:1560: if (NeverRandomizeColours) +@ Patches/../C_code.c:1565: if (NeverRandomizeColours) cmp r4, #0 @ , - beq .L838 @, -.L751: -@ Patches/../C_code.c:1730: return false; + beq .L841 @, +.L754: +@ Patches/../C_code.c:1735: return false; movs r4, #0 @ , - b .L685 @ -.L689: -@ Patches/../C_code.c:1760: struct PlayerInterfaceProc * proc = Proc_Find((struct ProcCmd *)gProcScr_UnitDisplay_MinimugBox); - ldr r0, .L842+40 @ tmp335, - bl .L397 @ + b .L688 @ +.L692: +@ Patches/../C_code.c:1765: struct PlayerInterfaceProc * proc = Proc_Find((struct ProcCmd *)gProcScr_UnitDisplay_MinimugBox); + ldr r0, .L845+40 @ tmp335, + bl .L400 @ subs r5, r0, #0 @ proc, tmp576, -@ Patches/../C_code.c:1761: if (proc) - beq .L700 @, -@ Patches/../C_code.c:1763: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); - ldr r3, .L842+44 @ tmp337, - ldr r6, .L842+48 @ tmp340, +@ Patches/../C_code.c:1766: if (proc) + beq .L703 @, +@ Patches/../C_code.c:1768: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); + ldr r3, .L845+44 @ tmp337, + ldr r6, .L845+48 @ tmp340, ldrh r3, [r3] @ gCursorY, gCursorY ldr r1, [r6] @ gBmMapUnit, gBmMapUnit -@ Patches/../C_code.c:1763: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); - ldr r2, .L842+52 @ tmp342, -@ Patches/../C_code.c:1763: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); +@ Patches/../C_code.c:1768: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); + ldr r2, .L845+52 @ tmp342, +@ Patches/../C_code.c:1768: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); lsls r3, r3, #2 @ tmp341, gCursorY, -@ Patches/../C_code.c:1763: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); +@ Patches/../C_code.c:1768: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); ldr r3, [r3, r1] @ *_15, *_15 ldrh r2, [r2] @ gCursorX, gCursorX -@ Patches/../C_code.c:1763: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); +@ Patches/../C_code.c:1768: unit = GetUnit(gBmMapUnit[gCursorY][gCursorX]); ldrb r0, [r3, r2] @ *_19, *_19 - ldr r3, .L842+56 @ tmp346, + ldr r3, .L845+56 @ tmp346, mov r10, r3 @ tmp346, tmp346 bl .L14 @ -@ Patches/../C_code.c:1772: if (proc->isRetracting) +@ Patches/../C_code.c:1777: if (proc->isRetracting) movs r3, #86 @ tmp347, -@ Patches/../C_code.c:1772: if (proc->isRetracting) +@ Patches/../C_code.c:1777: if (proc->isRetracting) ldrsb r3, [r5, r3] @ tmp348, cmp r3, #0 @ tmp348, - beq .LCB4370 @ - b .L839 @long jump @ -.LCB4370: -.L698: -@ Patches/../C_code.c:1777: if (gActiveUnit->state & US_HIDDEN) - ldr r3, .L842+60 @ tmp359, - ldr r5, [r3] @ gActiveUnit.54_34, gActiveUnit -@ Patches/../C_code.c:1777: if (gActiveUnit->state & US_HIDDEN) - ldr r3, [r5, #12] @ gActiveUnit.54_34->state, gActiveUnit.54_34->state -@ Patches/../C_code.c:1777: if (gActiveUnit->state & US_HIDDEN) - lsls r3, r3, #31 @ tmp604, gActiveUnit.54_34->state, - bmi .L699 @, -@ Patches/../C_code.c:1781: if (unit) + beq .LCB4394 @ + b .L842 @long jump @ +.LCB4394: +.L701: +@ Patches/../C_code.c:1782: if (gActiveUnit->state & US_HIDDEN) + ldr r3, .L845+60 @ tmp359, + ldr r5, [r3] @ gActiveUnit.55_34, gActiveUnit +@ Patches/../C_code.c:1782: if (gActiveUnit->state & US_HIDDEN) + ldr r3, [r5, #12] @ gActiveUnit.55_34->state, gActiveUnit.55_34->state +@ Patches/../C_code.c:1782: if (gActiveUnit->state & US_HIDDEN) + lsls r3, r3, #31 @ tmp604, gActiveUnit.55_34->state, + bmi .L702 @, +@ Patches/../C_code.c:1786: if (unit) cmp r0, #0 @ unit, - beq .L700 @, - movs r5, r0 @ gActiveUnit.54_34, unit -.L699: -@ Patches/../C_code.c:1783: if (unit->pCharacterData->portraitId) + beq .L703 @, + movs r5, r0 @ gActiveUnit.55_34, unit +.L702: +@ Patches/../C_code.c:1788: if (unit->pCharacterData->portraitId) ldr r3, [r5] @ unit_197->pCharacterData, unit_197->pCharacterData ldrh r6, [r3, #6] @ _38, -@ Patches/../C_code.c:1783: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1788: if (unit->pCharacterData->portraitId) rsbs r2, r6, #0 @ classCard, _38 adcs r2, r2, r6 @ classCard, _38 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); - movs r0, r5 @, gActiveUnit.54_34 - ldr r3, .L842+24 @ tmp367, -@ Patches/../C_code.c:1783: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); + movs r0, r5 @, gActiveUnit.55_34 + ldr r3, .L845+24 @ tmp367, +@ Patches/../C_code.c:1788: if (unit->pCharacterData->portraitId) mov r10, r2 @ classCard, classCard -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); bl .L14 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r5] @ _207, unit_197->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp368, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp579 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp368, - bne .L701 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L704 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp369, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp371, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r5, r2] @ tmp369, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp370, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp369, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp370, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L701: -@ Patches/../C_code.c:1549: if (!portraitID) +.L704: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L702 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L705 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L702: -@ Patches/../C_code.c:1787: PortraitAdjustNonSkinColours( - ldr r3, .L842+28 @ tmp372, +.L705: +@ Patches/../C_code.c:1792: PortraitAdjustNonSkinColours( + ldr r3, .L845+28 @ tmp372, ldr r2, [r3] @ AlwaysRandomizePastThisColour, PortraitColoursPastThisAreNotSkin movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L703 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + beq .L706 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r5, #130 @ tmp374, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r3, .L842+32 @ tmp373, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r3, .L845+32 @ tmp373, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r5, [r3, r5] @ tmp379, movs r3, #192 @ tmp378, lsls r3, r3, #7 @ tmp378, tmp378, @@ -5348,37 +5379,37 @@ MaybeRandomizeColours: movs r3, #5 @ tmp553, rsbs r0, r0, #0 @ tmp552, tmp550 ands r0, r3 @ NeverRandomizeBeforeThisColour, tmp553 -.L703: -@ Patches/../C_code.c:1702: if (classCard) +.L706: +@ Patches/../C_code.c:1707: if (classCard) cmp r6, #0 @ _38, - bne .L704 @, -@ Patches/../C_code.c:1705: NeverRandomizeBeforeThisColour = 0; + bne .L707 @, +@ Patches/../C_code.c:1710: NeverRandomizeBeforeThisColour = 0; movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, -.L704: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L842+36 @ tmp382, - ldr r3, [r3] @ VanillaPortraitsOnly.46_200, VanillaPortraitsOnly -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r3, #0 @ VanillaPortraitsOnly.46_200, - bne .LCB4436 @ - b .L761 @long jump @ -.LCB4436: - movs r3, r0 @ VanillaPortraitsOnly.46_200, NeverRandomizeBeforeThisColour -.L705: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L707: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L845+36 @ tmp382, + ldr r3, [r3] @ VanillaPortraitsOnly.47_200, VanillaPortraitsOnly +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r3, #0 @ VanillaPortraitsOnly.47_200, + bne .LCB4460 @ + b .L764 @long jump @ +.LCB4460: + movs r3, r0 @ VanillaPortraitsOnly.47_200, NeverRandomizeBeforeThisColour +.L708: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r0, [sp, #12] @ fading, %sfp str r0, [sp] @ fading, movs r0, #4 @, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1789: result = true; +@ Patches/../C_code.c:1794: result = true; movs r3, #1 @ result, str r3, [sp, #16] @ result, %sfp - b .L697 @ -.L843: + b .L700 @ +.L846: .align 2 -.L842: +.L845: .word RandBitflags .word gVision .word NeverRandomizeColours @@ -5395,183 +5426,183 @@ MaybeRandomizeColours: .word gCursorX .word GetUnit .word gActiveUnit -.L700: -@ Patches/../C_code.c:1732: int result = false; // sizeof(struct BattleUnit); +.L703: +@ Patches/../C_code.c:1737: int result = false; // sizeof(struct BattleUnit); movs r3, #0 @ result, str r3, [sp, #16] @ result, %sfp -@ Patches/../C_code.c:1738: int classCard = true; +@ Patches/../C_code.c:1743: int classCard = true; adds r3, r3, #1 @ classCard, mov r10, r3 @ classCard, classCard -.L697: -@ Patches/../C_code.c:1825: PortraitAdjustNonSkinColours( - ldr r3, .L844 @ tmp570, +.L700: +@ Patches/../C_code.c:1830: PortraitAdjustNonSkinColours( + ldr r3, .L847 @ tmp570, mov r8, r3 @ tmp570, tmp570 -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L844+4 @ tmp571, +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L847+4 @ tmp571, mov fp, r3 @ tmp571, tmp571 -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) mov r1, fp @ tmp571, tmp571 - ldr r3, .L844+8 @ tmp572, + ldr r3, .L847+8 @ tmp572, str r3, [sp, #20] @ tmp572, %sfp mov r3, r8 @ tmp570, tmp570 mov fp, r7 @ tmp526, tmp526 mov r8, r4 @ , movs r7, r1 @ tmp571, tmp571 ldr r2, [sp, #16] @ result, %sfp - ldr r6, .L844+12 @ ivtmp.1095, - ldr r5, .L844+16 @ ivtmp.1097, + ldr r6, .L847+12 @ ivtmp.1100, + ldr r5, .L847+16 @ ivtmp.1102, str r3, [sp, #16] @ tmp570, %sfp -.L712: -@ Patches/../C_code.c:1797: if (gFaces[i] == NULL) +.L715: +@ Patches/../C_code.c:1802: if (gFaces[i] == NULL) ldr r3, [r6] @ _41, MEM[(struct FaceProc * *)_9] -@ Patches/../C_code.c:1797: if (gFaces[i] == NULL) +@ Patches/../C_code.c:1802: if (gFaces[i] == NULL) cmp r3, #0 @ _41, - beq .L706 @, -@ Patches/../C_code.c:1814: if (gFaces[i]->faceId < 0x72) + beq .L709 @, +@ Patches/../C_code.c:1819: if (gFaces[i]->faceId < 0x72) ldrh r1, [r3, #62] @ _43, -@ Patches/../C_code.c:1826: sFaceConfig[i].paletteId + 16, gFaces[i]->faceId, PortraitColoursPastThisAreNotSkin, 0, fading, classCard); +@ Patches/../C_code.c:1831: sFaceConfig[i].paletteId + 16, gFaces[i]->faceId, PortraitColoursPastThisAreNotSkin, 0, fading, classCard); ldrh r0, [r5, #4] @ MEM[(short unsigned int *)_46 + 4B], MEM[(short unsigned int *)_46 + 4B] -@ Patches/../C_code.c:1825: PortraitAdjustNonSkinColours( +@ Patches/../C_code.c:1830: PortraitAdjustNonSkinColours( ldr r3, [sp, #16] @ tmp570, %sfp adds r0, r0, #16 @ _109, ldr r2, [r3] @ AlwaysRandomizePastThisColour, PortraitColoursPastThisAreNotSkin -@ Patches/../C_code.c:1814: if (gFaces[i]->faceId < 0x72) +@ Patches/../C_code.c:1819: if (gFaces[i]->faceId < 0x72) cmp r1, #113 @ _43, - bls .LCB4506 @ - b .L707 @long jump @ -.LCB4506: -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) + bls .LCB4530 @ + b .L710 @long jump @ +.LCB4530: +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - bne .LCB4508 @ - b .L835 @long jump @ -.LCB4508: -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + bne .LCB4532 @ + b .L838 @long jump @ +.LCB4532: +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) lsls r4, r0, #5 @ tmp516, _109, mov ip, r4 @ tmp516, tmp516 movs r4, #2 @ tmp670, mov r10, r4 @ tmp670, tmp670 -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r4, #192 @ tmp521, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) add ip, ip, r10 @ tmp517, tmp670 -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) lsls r4, r4, #7 @ tmp521, tmp521, mov r10, r4 @ tmp521, tmp521 mov r4, ip @ tmp517, tmp517 -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r3, .L844+8 @ tmp514, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r3, .L847+8 @ tmp514, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r3, [r4, r3] @ tmp522, gPaletteBuffer cmp r3, r10 @ tmp522, tmp521 - bcs .LCB4522 @ - b .L835 @long jump @ -.LCB4522: + bcs .LCB4546 @ + b .L838 @long jump @ +.LCB4546: movs r3, #0 @ classCard, mov r10, r3 @ classCard, classCard -@ Patches/../C_code.c:1699: NeverRandomizeBeforeThisColour = 5; +@ Patches/../C_code.c:1704: NeverRandomizeBeforeThisColour = 5; adds r3, r3, #5 @ NeverRandomizeBeforeThisColour, -.L709: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r4, [r7] @ VanillaPortraitsOnly.46_224, VanillaPortraitsOnly - mov ip, r4 @ VanillaPortraitsOnly.46_224, VanillaPortraitsOnly.46_224 -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r4, #0 @ VanillaPortraitsOnly.46_224, - bne .LCB4531 @ - b .L764 @long jump @ -.LCB4531: - mov ip, r3 @ VanillaPortraitsOnly.46_224, NeverRandomizeBeforeThisColour -.L711: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L712: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r4, [r7] @ VanillaPortraitsOnly.47_224, VanillaPortraitsOnly + mov ip, r4 @ VanillaPortraitsOnly.47_224, VanillaPortraitsOnly.47_224 +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r4, #0 @ VanillaPortraitsOnly.47_224, + bne .LCB4555 @ + b .L767 @long jump @ +.LCB4555: + mov ip, r3 @ VanillaPortraitsOnly.47_224, NeverRandomizeBeforeThisColour +.L714: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r3, [sp, #12] @ fading, %sfp str r3, [sp] @ fading, - mov r3, ip @, VanillaPortraitsOnly.46_224 + mov r3, ip @, VanillaPortraitsOnly.47_224 bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1828: result = true; +@ Patches/../C_code.c:1833: result = true; movs r2, #1 @ result, -.L706: -@ Patches/../C_code.c:1795: for (int i = 0; i < 4; ++i) - ldr r3, .L844+20 @ tmp648, - adds r5, r5, #8 @ ivtmp.1097, - adds r6, r6, #4 @ ivtmp.1095, - cmp r3, r5 @ tmp648, ivtmp.1097 - bne .L712 @, -@ Patches/../C_code.c:1831: struct PrepItemScreenProc * proc_2 = Proc_Find((struct ProcCmd *)ProcScr_PrepUnitScreen); - ldr r0, .L844+24 @ tmp399, +.L709: +@ Patches/../C_code.c:1800: for (int i = 0; i < 4; ++i) + ldr r3, .L847+20 @ tmp648, + adds r5, r5, #8 @ ivtmp.1102, + adds r6, r6, #4 @ ivtmp.1100, + cmp r3, r5 @ tmp648, ivtmp.1102 + bne .L715 @, +@ Patches/../C_code.c:1836: struct PrepItemScreenProc * proc_2 = Proc_Find((struct ProcCmd *)ProcScr_PrepUnitScreen); + ldr r0, .L847+24 @ tmp399, mov r4, r8 @ , mov r7, fp @ tmp526, tmp526 str r2, [sp, #16] @ result, %sfp - bl .L397 @ -@ Patches/../C_code.c:1832: if (proc_2) + bl .L400 @ +@ Patches/../C_code.c:1837: if (proc_2) cmp r0, #0 @ proc_2, - beq .L715 @, -@ Patches/../C_code.c:1846: id = proc_2->id; + beq .L718 @, +@ Patches/../C_code.c:1851: id = proc_2->id; movs r3, #44 @ tmp401, -@ Patches/../C_code.c:1846: id = proc_2->id; +@ Patches/../C_code.c:1851: id = proc_2->id; ldrb r0, [r0, r3] @ id, -@ Patches/../C_code.c:1848: unit = GetUnitFromPrepList(id); - ldr r3, .L844+28 @ tmp403, +@ Patches/../C_code.c:1853: unit = GetUnitFromPrepList(id); + ldr r3, .L847+28 @ tmp403, bl .L14 @ subs r5, r0, #0 @ unit, tmp581, -@ Patches/../C_code.c:1856: if (unit) - beq .L715 @, -@ Patches/../C_code.c:1858: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1861: if (unit) + beq .L718 @, +@ Patches/../C_code.c:1863: if (unit->pCharacterData->portraitId) ldr r3, [r0] @ unit_138->pCharacterData, unit_138->pCharacterData -@ Patches/../C_code.c:1858: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1863: if (unit->pCharacterData->portraitId) ldrh r3, [r3, #6] @ tmp405, -@ Patches/../C_code.c:1860: classCard = false; +@ Patches/../C_code.c:1865: classCard = false; rsbs r2, r3, #0 @ tmp532, tmp405 adcs r3, r3, r2 @ tmp531, tmp405, tmp532 mov r2, r10 @ classCard, classCard rsbs r3, r3, #0 @ tmp533, tmp531 ands r2, r3 @ classCard, tmp533 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); - ldr r3, .L844+32 @ tmp406, -@ Patches/../C_code.c:1860: classCard = false; +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); + ldr r3, .L847+32 @ tmp406, +@ Patches/../C_code.c:1865: classCard = false; mov r10, r2 @ classCard, classCard -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); bl .L14 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r5] @ _243, unit_138->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp407, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp582 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp407, - bne .L717 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L720 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp408, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp410, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r5, r2] @ tmp408, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp409, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp408, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp409, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L717: -@ Patches/../C_code.c:1549: if (!portraitID) +.L720: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L718 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L721 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L718: -@ Patches/../C_code.c:1862: PortraitAdjustNonSkinColours( - ldr r3, .L844 @ tmp411, +.L721: +@ Patches/../C_code.c:1867: PortraitAdjustNonSkinColours( + ldr r3, .L847 @ tmp411, ldr r2, [r3] @ AlwaysRandomizePastThisColour, PortraitColoursPastThisAreNotSkin movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L719 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + beq .L722 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r5, #66 @ tmp413, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r3, .L844+8 @ tmp412, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r3, .L847+8 @ tmp412, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r5, [r3, r5] @ tmp418, movs r3, #192 @ tmp417, lsls r3, r3, #7 @ tmp417, tmp417, @@ -5580,121 +5611,121 @@ MaybeRandomizeColours: movs r3, #5 @ tmp561, rsbs r0, r0, #0 @ tmp560, tmp558 ands r0, r3 @ NeverRandomizeBeforeThisColour, tmp561 -.L719: -@ Patches/../C_code.c:1702: if (classCard) +.L722: +@ Patches/../C_code.c:1707: if (classCard) mov r3, r10 @ classCard, classCard cmp r3, #0 @ classCard, - beq .L720 @, -@ Patches/../C_code.c:1705: NeverRandomizeBeforeThisColour = 0; + beq .L723 @, +@ Patches/../C_code.c:1710: NeverRandomizeBeforeThisColour = 0; movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, -.L720: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L844+4 @ tmp421, - ldr r3, [r3] @ VanillaPortraitsOnly.46_236, VanillaPortraitsOnly -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r3, #0 @ VanillaPortraitsOnly.46_236, - bne .LCB4615 @ - b .L770 @long jump @ -.LCB4615: - movs r3, r0 @ VanillaPortraitsOnly.46_236, NeverRandomizeBeforeThisColour -.L721: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L723: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L847+4 @ tmp421, + ldr r3, [r3] @ VanillaPortraitsOnly.47_236, VanillaPortraitsOnly +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r3, #0 @ VanillaPortraitsOnly.47_236, + bne .LCB4639 @ + b .L773 @long jump @ +.LCB4639: + movs r3, r0 @ VanillaPortraitsOnly.47_236, NeverRandomizeBeforeThisColour +.L724: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r0, [sp, #12] @ fading, %sfp str r0, [sp] @ fading, movs r0, #2 @, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1864: result = true; +@ Patches/../C_code.c:1869: result = true; movs r3, #1 @ result, str r3, [sp, #16] @ result, %sfp -.L715: -@ Patches/../C_code.c:1868: struct PrepItemScreenProc * proc_3 = Proc_Find((struct ProcCmd *)ProcScr_PrepItemScreen); - ldr r0, .L844+36 @ tmp422, - bl .L397 @ +.L718: +@ Patches/../C_code.c:1873: struct PrepItemScreenProc * proc_3 = Proc_Find((struct ProcCmd *)ProcScr_PrepItemScreen); + ldr r0, .L847+36 @ tmp422, + bl .L400 @ subs r5, r0, #0 @ proc_3, tmp583, -@ Patches/../C_code.c:1869: if (proc_3) - beq .L724 @, -@ Patches/../C_code.c:1872: struct ProcPtr * proc_5 = Proc_Find((struct ProcCmd *)ProcScr_ekrsubAnimeEmulator); - ldr r0, .L844+40 @ tmp424, - bl .L397 @ -@ Patches/../C_code.c:1873: if (!proc_5) +@ Patches/../C_code.c:1874: if (proc_3) + beq .L727 @, +@ Patches/../C_code.c:1877: struct ProcPtr * proc_5 = Proc_Find((struct ProcCmd *)ProcScr_ekrsubAnimeEmulator); + ldr r0, .L847+40 @ tmp424, + bl .L400 @ +@ Patches/../C_code.c:1878: if (!proc_5) cmp r0, #0 @ tmp584, - bne .LCB4636 @ - b .L840 @long jump @ -.LCB4636: -.L724: -@ Patches/../C_code.c:1914: struct SupportScreenProc * proc_4 = Proc_Find((struct ProcCmd *)gProcScr_SupportScreen); - ldr r0, .L844+44 @ tmp447, - bl .L397 @ -@ Patches/../C_code.c:1915: if (proc_4) + bne .LCB4660 @ + b .L843 @long jump @ +.LCB4660: +.L727: +@ Patches/../C_code.c:1919: struct SupportScreenProc * proc_4 = Proc_Find((struct ProcCmd *)gProcScr_SupportScreen); + ldr r0, .L847+44 @ tmp447, + bl .L400 @ +@ Patches/../C_code.c:1920: if (proc_4) cmp r0, #0 @ proc_4, - beq .L734 @, -@ Patches/../C_code.c:1917: unit = GetUnitFromPrepList(proc_4->curIndex); + beq .L737 @, +@ Patches/../C_code.c:1922: unit = GetUnitFromPrepList(proc_4->curIndex); ldr r0, [r0, #56] @ proc_4_152->curIndex, proc_4_152->curIndex - ldr r3, .L844+28 @ tmp450, + ldr r3, .L847+28 @ tmp450, bl .L14 @ subs r5, r0, #0 @ unit, tmp588, -@ Patches/../C_code.c:1918: if (unit) - beq .L734 @, -@ Patches/../C_code.c:1920: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1923: if (unit) + beq .L737 @, +@ Patches/../C_code.c:1925: if (unit->pCharacterData->portraitId) ldr r3, [r0] @ unit_154->pCharacterData, unit_154->pCharacterData -@ Patches/../C_code.c:1920: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1925: if (unit->pCharacterData->portraitId) ldrh r3, [r3, #6] @ tmp452, -@ Patches/../C_code.c:1922: classCard = false; +@ Patches/../C_code.c:1927: classCard = false; rsbs r2, r3, #0 @ tmp540, tmp452 adcs r3, r3, r2 @ tmp539, tmp452, tmp540 mov r2, r10 @ classCard, classCard rsbs r3, r3, #0 @ tmp541, tmp539 ands r2, r3 @ classCard, tmp541 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); - ldr r3, .L844+32 @ tmp453, -@ Patches/../C_code.c:1922: classCard = false; +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); + ldr r3, .L847+32 @ tmp453, +@ Patches/../C_code.c:1927: classCard = false; mov r10, r2 @ classCard, classCard -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); bl .L14 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r5] @ _291, unit_154->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp454, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp589 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp454, - bne .L736 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L739 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp455, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp457, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r5, r2] @ tmp455, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp456, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp455, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp456, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L736: -@ Patches/../C_code.c:1549: if (!portraitID) +.L739: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L737 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L740 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L737: -@ Patches/../C_code.c:1924: PortraitAdjustNonSkinColours( - ldr r3, .L844 @ tmp458, +.L740: +@ Patches/../C_code.c:1929: PortraitAdjustNonSkinColours( + ldr r3, .L847 @ tmp458, ldr r2, [r3] @ AlwaysRandomizePastThisColour, PortraitColoursPastThisAreNotSkin movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L738 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + beq .L741 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r5, #66 @ tmp460, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r3, .L844+8 @ tmp459, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r3, .L847+8 @ tmp459, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r5, [r3, r5] @ tmp465, movs r3, #192 @ tmp464, lsls r3, r3, #7 @ tmp464, tmp464, @@ -5703,65 +5734,65 @@ MaybeRandomizeColours: movs r3, #5 @ tmp569, rsbs r0, r0, #0 @ tmp568, tmp566 ands r0, r3 @ NeverRandomizeBeforeThisColour, tmp569 -.L738: -@ Patches/../C_code.c:1702: if (classCard) +.L741: +@ Patches/../C_code.c:1707: if (classCard) mov r3, r10 @ classCard, classCard cmp r3, #0 @ classCard, - beq .L739 @, -@ Patches/../C_code.c:1705: NeverRandomizeBeforeThisColour = 0; + beq .L742 @, +@ Patches/../C_code.c:1710: NeverRandomizeBeforeThisColour = 0; movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; - movs r2, #99 @ AlwaysRandomizePastThisColour, -.L739: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L844+4 @ tmp468, - ldr r3, [r3] @ VanillaPortraitsOnly.46_284, VanillaPortraitsOnly -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r3, #0 @ VanillaPortraitsOnly.46_284, - beq .LCB4702 @ - b .L841 @long jump @ -.LCB4702: @ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, -.L740: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L742: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L847+4 @ tmp468, + ldr r3, [r3] @ VanillaPortraitsOnly.47_284, VanillaPortraitsOnly +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r3, #0 @ VanillaPortraitsOnly.47_284, + beq .LCB4726 @ + b .L844 @long jump @ +.LCB4726: +@ Patches/../C_code.c:1714: AlwaysRandomizePastThisColour = 99; + movs r2, #99 @ AlwaysRandomizePastThisColour, +.L743: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r0, [sp, #12] @ fading, %sfp str r0, [sp] @ fading, movs r0, #2 @, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1926: result = true; +@ Patches/../C_code.c:1931: result = true; movs r3, #1 @ result, str r3, [sp, #16] @ result, %sfp -.L734: -@ Patches/../C_code.c:1932: if (RandBitflags->colours == 1) +.L737: +@ Patches/../C_code.c:1937: if (RandBitflags->colours == 1) ldr r3, [r7] @ RandBitflags, RandBitflags - ldrb r2, [r3, #2] @ *RandBitflags.60_67, *RandBitflags.60_67 -@ Patches/../C_code.c:1932: if (RandBitflags->colours == 1) + ldrb r2, [r3, #2] @ *RandBitflags.61_67, *RandBitflags.61_67 +@ Patches/../C_code.c:1937: if (RandBitflags->colours == 1) movs r3, #7 @ tmp476, - ands r3, r2 @ tmp477, *RandBitflags.60_67 + ands r3, r2 @ tmp477, *RandBitflags.61_67 cmp r3, #1 @ tmp477, - beq .L741 @, -.L742: -@ Patches/../C_code.c:1757: return true; // so we don't alter prep palettes during stat screen + beq .L744 @, +.L745: +@ Patches/../C_code.c:1762: return true; // so we don't alter prep palettes during stat screen ldr r4, [sp, #16] @ , %sfp - b .L685 @ -.L764: -@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; + b .L688 @ +.L767: +@ Patches/../C_code.c:1714: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L711 @ -.L707: + b .L714 @ +.L710: movs r3, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L710 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + beq .L713 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldr r4, [sp, #20] @ tmp572, %sfp -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) lsls r3, r0, #5 @ tmp389, _109, adds r3, r3, #2 @ tmp390, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r3, [r3, r4] @ tmp395, gPaletteBuffer -@ Patches/../C_code.c:1699: NeverRandomizeBeforeThisColour = 5; +@ Patches/../C_code.c:1704: NeverRandomizeBeforeThisColour = 5; movs r4, #192 @ tmp394, lsls r4, r4, #7 @ tmp394, tmp394, cmp r3, r4 @ tmp395, tmp394 @@ -5769,201 +5800,201 @@ MaybeRandomizeColours: movs r4, #4 @ tmp557, bics r3, r4 @ NeverRandomizeBeforeThisColour, tmp557 adds r3, r3, #5 @ NeverRandomizeBeforeThisColour, -.L710: -@ Patches/../C_code.c:1702: if (classCard) +.L713: +@ Patches/../C_code.c:1707: if (classCard) mov r4, r10 @ classCard, classCard cmp r4, #0 @ classCard, - bne .LCB4752 @ - b .L709 @long jump @ -.LCB4752: -@ Patches/../C_code.c:1705: NeverRandomizeBeforeThisColour = 0; + bne .LCB4776 @ + b .L712 @long jump @ +.LCB4776: +@ Patches/../C_code.c:1710: NeverRandomizeBeforeThisColour = 0; movs r3, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L709 @ -.L835: -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + b .L712 @ +.L838: +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r3, #0 @ classCard, mov r10, r3 @ classCard, classCard - b .L709 @ -.L756: -@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; + b .L712 @ +.L759: +@ Patches/../C_code.c:1714: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L694 @ -.L755: -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; + b .L697 @ +.L758: +@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L693 @ -.L741: -@ Patches/../C_code.c:1935: if (Proc_Find(gProc_ekrBattleDeamon)) - ldr r0, .L844+48 @ tmp479, - bl .L397 @ -@ Patches/../C_code.c:1935: if (Proc_Find(gProc_ekrBattleDeamon)) + b .L696 @ +.L744: +@ Patches/../C_code.c:1940: if (Proc_Find(gProc_ekrBattleDeamon)) + ldr r0, .L847+48 @ tmp479, + bl .L400 @ +@ Patches/../C_code.c:1940: if (Proc_Find(gProc_ekrBattleDeamon)) cmp r0, #0 @ tmp590, - beq .L742 @, -@ Patches/../C_code.c:1938: if (BattleAttackerSideBool) - ldr r3, .L844+52 @ tmp529, + beq .L745 @, +@ Patches/../C_code.c:1943: if (BattleAttackerSideBool) + ldr r3, .L847+52 @ tmp529, mov r10, r3 @ tmp529, tmp529 -@ Patches/../C_code.c:1938: if (BattleAttackerSideBool) +@ Patches/../C_code.c:1943: if (BattleAttackerSideBool) ldrb r3, [r3] @ BattleAttackerSideBool, BattleAttackerSideBool cmp r3, #0 @ BattleAttackerSideBool, - beq .LCB4784 @ - b .L783 @long jump @ -.LCB4784: -@ Patches/../C_code.c:1937: unit = &gBattleActorUnit; - ldr r6, .L844+56 @ unit, -.L743: -@ Patches/../C_code.c:1943: if (gPaletteBuffer[((7 + 16) * 16) + 1] >= 0x7BBE) - ldr r3, .L844+8 @ tmp525, + beq .LCB4808 @ + b .L786 @long jump @ +.LCB4808: +@ Patches/../C_code.c:1942: unit = &gBattleActorUnit; + ldr r6, .L847+56 @ unit, +.L746: +@ Patches/../C_code.c:1948: if (gPaletteBuffer[((7 + 16) * 16) + 1] >= 0x7BBE) + ldr r3, .L847+8 @ tmp525, mov r9, r3 @ tmp525, tmp525 -@ Patches/../C_code.c:1943: if (gPaletteBuffer[((7 + 16) * 16) + 1] >= 0x7BBE) +@ Patches/../C_code.c:1948: if (gPaletteBuffer[((7 + 16) * 16) + 1] >= 0x7BBE) mov r2, r9 @ tmp525, tmp525 - ldr r3, .L844+60 @ tmp484, + ldr r3, .L847+60 @ tmp484, ldrh r2, [r2, r3] @ tmp489, -@ Patches/../C_code.c:1942: int offset = 0; - ldr r3, .L844+64 @ tmp488, +@ Patches/../C_code.c:1947: int offset = 0; + ldr r3, .L847+64 @ tmp488, movs r5, #5 @ tmp545, cmp r3, r2 @ tmp488, tmp489 sbcs r3, r3, r3 @ tmp544 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r0, r6 @, unit - ldr r7, .L844+32 @ tmp528, -@ Patches/../C_code.c:1942: int offset = 0; + ldr r7, .L847+32 @ tmp528, +@ Patches/../C_code.c:1947: int offset = 0; ands r5, r3 @ offset, tmp544 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); bl .L62 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r6] @ _303, unit_86->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp493, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp591 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp493, - bne .L745 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L748 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp494, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp496, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r6, r2] @ tmp494, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp495, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp494, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp495, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L745: -@ Patches/../C_code.c:1549: if (!portraitID) +.L748: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L746 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L749 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L746: -@ Patches/../C_code.c:1948: AdjustNonSkinColours(7 + 16, GetAdjustedPortraitId(unit), 99, offset, fading); +.L749: +@ Patches/../C_code.c:1953: AdjustNonSkinColours(7 + 16, GetAdjustedPortraitId(unit), 99, offset, fading); ldr r3, [sp, #12] @ fading, %sfp movs r2, #99 @, str r3, [sp] @ fading, movs r0, #23 @, movs r3, r5 @, offset bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1950: if (BattleAttackerSideBool) +@ Patches/../C_code.c:1955: if (BattleAttackerSideBool) mov r3, r10 @ tmp529, tmp529 ldrb r3, [r3] @ BattleAttackerSideBool, BattleAttackerSideBool cmp r3, #0 @ BattleAttackerSideBool, - beq .LCB4829 @ - b .L786 @long jump @ -.LCB4829: -@ Patches/../C_code.c:1949: unit = &gBattleTargetUnit; - ldr r5, .L844+68 @ unit, -.L747: -@ Patches/../C_code.c:1955: if (gPaletteBuffer[((9 + 16) * 16) + 1] >= 0x7BBE) + beq .LCB4853 @ + b .L789 @long jump @ +.LCB4853: +@ Patches/../C_code.c:1954: unit = &gBattleTargetUnit; + ldr r5, .L847+68 @ unit, +.L750: +@ Patches/../C_code.c:1960: if (gPaletteBuffer[((9 + 16) * 16) + 1] >= 0x7BBE) mov r1, r9 @ tmp525, tmp525 - ldr r2, .L844+72 @ tmp500, - ldr r3, .L844+64 @ tmp504, + ldr r2, .L847+72 @ tmp500, + ldr r3, .L847+64 @ tmp504, ldrh r2, [r1, r2] @ tmp505, cmp r2, r3 @ tmp505, tmp504 - bls .L748 @, -@ Patches/../C_code.c:1957: offset = 5; + bls .L751 @, +@ Patches/../C_code.c:1962: offset = 5; movs r4, #5 @ , -.L748: -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +.L751: +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r0, r5 @, unit bl .L62 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r5] @ _315, unit_87->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp509, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp592 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp509, - bne .L749 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L752 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp510, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp512, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r5, r2] @ tmp510, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp511, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp510, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp511, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L749: -@ Patches/../C_code.c:1549: if (!portraitID) +.L752: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L750 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L753 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L750: -@ Patches/../C_code.c:1959: AdjustNonSkinColours(9 + 16, GetAdjustedPortraitId(unit), 99, offset, fading); +.L753: +@ Patches/../C_code.c:1964: AdjustNonSkinColours(9 + 16, GetAdjustedPortraitId(unit), 99, offset, fading); ldr r3, [sp, #12] @ fading, %sfp movs r2, #99 @, str r3, [sp] @ fading, movs r0, #25 @, movs r3, r4 @, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1757: return true; // so we don't alter prep palettes during stat screen +@ Patches/../C_code.c:1762: return true; // so we don't alter prep palettes during stat screen movs r4, #1 @ , - b .L685 @ -.L841: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - movs r3, r0 @ VanillaPortraitsOnly.46_284, NeverRandomizeBeforeThisColour - b .L740 @ -.L761: -@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; + b .L688 @ +.L844: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + movs r3, r0 @ VanillaPortraitsOnly.47_284, NeverRandomizeBeforeThisColour + b .L743 @ +.L764: +@ Patches/../C_code.c:1714: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L705 @ -.L770: + b .L708 @ +.L773: movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L721 @ -.L839: -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); + b .L724 @ +.L842: +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); movs r3, #77 @ tmp349, -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); movs r2, #76 @ tmp354, -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); ldrb r3, [r5, r3] @ tmp350, -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); ldr r1, [r6] @ gBmMapUnit, gBmMapUnit lsls r3, r3, #2 @ tmp353, tmp350, -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); ldrb r2, [r5, r2] @ tmp355, -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); ldr r3, [r3, r1] @ *_27, *_27 -@ Patches/../C_code.c:1774: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); +@ Patches/../C_code.c:1779: unit = GetUnit(gBmMapUnit[proc->yCursorPrev][proc->xCursorPrev]); ldrb r0, [r3, r2] @ *_31, *_31 - bl .L650 @ - b .L698 @ -.L845: + bl .L653 @ + b .L701 @ +.L848: .align 2 -.L844: +.L847: .word PortraitColoursPastThisAreNotSkin .word VanillaPortraitsOnly .word gPaletteBuffer @@ -5983,85 +6014,85 @@ MaybeRandomizeColours: .word 31677 .word gBattleTargetUnit .word 802 -.L840: -@ Patches/../C_code.c:1891: id = proc_3->selectedUnitIdx; +.L843: +@ Patches/../C_code.c:1896: id = proc_3->selectedUnitIdx; movs r3, #43 @ tmp426, -@ Patches/../C_code.c:1891: id = proc_3->selectedUnitIdx; +@ Patches/../C_code.c:1896: id = proc_3->selectedUnitIdx; ldrb r0, [r5, r3] @ id, -@ Patches/../C_code.c:1892: if (id == 0xFF) +@ Patches/../C_code.c:1897: if (id == 0xFF) cmp r0, #255 @ id, - bne .L725 @, -@ Patches/../C_code.c:1894: id = proc_3->hoverUnitIdx; + bne .L728 @, +@ Patches/../C_code.c:1899: id = proc_3->hoverUnitIdx; subs r3, r3, #1 @ tmp427, -@ Patches/../C_code.c:1894: id = proc_3->hoverUnitIdx; +@ Patches/../C_code.c:1899: id = proc_3->hoverUnitIdx; ldrb r0, [r5, r3] @ id, -.L725: -@ Patches/../C_code.c:1897: unit = GetUnitFromPrepList(id); - ldr r3, .L846 @ tmp428, +.L728: +@ Patches/../C_code.c:1902: unit = GetUnitFromPrepList(id); + ldr r3, .L849 @ tmp428, bl .L14 @ subs r5, r0, #0 @ unit, tmp585, -@ Patches/../C_code.c:1898: if (unit) - bne .LCB4938 @ - b .L724 @long jump @ -.LCB4938: -@ Patches/../C_code.c:1900: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1903: if (unit) + bne .LCB4962 @ + b .L727 @long jump @ +.LCB4962: +@ Patches/../C_code.c:1905: if (unit->pCharacterData->portraitId) ldr r3, [r0] @ unit_148->pCharacterData, unit_148->pCharacterData -@ Patches/../C_code.c:1900: if (unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1905: if (unit->pCharacterData->portraitId) ldrh r3, [r3, #6] @ tmp430, -@ Patches/../C_code.c:1902: classCard = false; +@ Patches/../C_code.c:1907: classCard = false; rsbs r2, r3, #0 @ tmp536, tmp430 adcs r3, r3, r2 @ tmp535, tmp430, tmp536 mov r2, r10 @ classCard, classCard rsbs r3, r3, #0 @ tmp537, tmp535 ands r2, r3 @ classCard, tmp537 -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); - ldr r3, .L846+4 @ tmp431, -@ Patches/../C_code.c:1902: classCard = false; +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); + ldr r3, .L849+4 @ tmp431, +@ Patches/../C_code.c:1907: classCard = false; mov r10, r2 @ classCard, classCard -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); bl .L14 @ -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldr r3, [r5] @ _267, unit_148->pCharacterData -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) ldrh r2, [r3, #6] @ tmp432, -@ Patches/../C_code.c:1542: int portraitID = GetUnitPortraitId(unit); +@ Patches/../C_code.c:1547: int portraitID = GetUnitPortraitId(unit); movs r1, r0 @ portraitID, tmp586 -@ Patches/../C_code.c:1543: if (!unit->pCharacterData->portraitId) +@ Patches/../C_code.c:1548: if (!unit->pCharacterData->portraitId) cmp r2, #0 @ tmp432, - bne .L727 @, -@ Patches/../C_code.c:1545: portraitID += unit->index; + bne .L730 @, +@ Patches/../C_code.c:1550: portraitID += unit->index; movs r2, #11 @ tmp433, -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; movs r1, #255 @ tmp435, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; ldrsb r2, [r5, r2] @ tmp433, -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; ldrb r3, [r3, #4] @ tmp434, -@ Patches/../C_code.c:1545: portraitID += unit->index; +@ Patches/../C_code.c:1550: portraitID += unit->index; adds r2, r2, r0 @ portraitID, tmp433, portraitID -@ Patches/../C_code.c:1546: portraitID += unit->pCharacterData->number; +@ Patches/../C_code.c:1551: portraitID += unit->pCharacterData->number; adds r3, r3, r2 @ portraitID, tmp434, portraitID -@ Patches/../C_code.c:1547: portraitID &= 0xFF; +@ Patches/../C_code.c:1552: portraitID &= 0xFF; ands r1, r3 @ portraitID, portraitID -.L727: -@ Patches/../C_code.c:1549: if (!portraitID) +.L730: +@ Patches/../C_code.c:1554: if (!portraitID) cmp r1, #0 @ portraitID, - bne .L728 @, -@ Patches/../C_code.c:1551: portraitID = 1; + bne .L731 @, +@ Patches/../C_code.c:1556: portraitID = 1; adds r1, r1, #1 @ portraitID, -.L728: -@ Patches/../C_code.c:1904: PortraitAdjustNonSkinColours( - ldr r3, .L846+8 @ tmp436, +.L731: +@ Patches/../C_code.c:1909: PortraitAdjustNonSkinColours( + ldr r3, .L849+8 @ tmp436, ldr r2, [r3] @ AlwaysRandomizePastThisColour, PortraitColoursPastThisAreNotSkin movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1695: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) +@ Patches/../C_code.c:1700: if ((AlwaysRandomizePastThisColour) && (!NeverRandomizeBeforeThisColour)) cmp r2, #0 @ AlwaysRandomizePastThisColour, - beq .L729 @, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + beq .L732 @, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) movs r5, #98 @ tmp438, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) - ldr r3, .L846+12 @ tmp437, -@ Patches/../C_code.c:1697: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) + ldr r3, .L849+12 @ tmp437, +@ Patches/../C_code.c:1702: if (gPaletteBuffer[(bank * 16) + 1] >= 0x6000) ldrh r5, [r3, r5] @ tmp443, movs r3, #192 @ tmp442, lsls r3, r3, #7 @ tmp442, tmp442, @@ -6070,49 +6101,49 @@ MaybeRandomizeColours: movs r3, #5 @ tmp565, rsbs r0, r0, #0 @ tmp564, tmp562 ands r0, r3 @ NeverRandomizeBeforeThisColour, tmp565 -.L729: -@ Patches/../C_code.c:1702: if (classCard) +.L732: +@ Patches/../C_code.c:1707: if (classCard) mov r3, r10 @ classCard, classCard cmp r3, #0 @ classCard, - beq .L730 @, -@ Patches/../C_code.c:1705: NeverRandomizeBeforeThisColour = 0; + beq .L733 @, +@ Patches/../C_code.c:1710: NeverRandomizeBeforeThisColour = 0; movs r0, #0 @ NeverRandomizeBeforeThisColour, -@ Patches/../C_code.c:1704: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, -.L730: -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - ldr r3, .L846+16 @ tmp446, - ldr r3, [r3] @ VanillaPortraitsOnly.46_260, VanillaPortraitsOnly -@ Patches/../C_code.c:1707: if (!VanillaPortraitsOnly) - cmp r3, #0 @ VanillaPortraitsOnly.46_260, - beq .L776 @, - movs r3, r0 @ VanillaPortraitsOnly.46_260, NeverRandomizeBeforeThisColour -.L731: -@ Patches/../C_code.c:1712: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); +.L733: +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + ldr r3, .L849+16 @ tmp446, + ldr r3, [r3] @ VanillaPortraitsOnly.47_260, VanillaPortraitsOnly +@ Patches/../C_code.c:1712: if (!VanillaPortraitsOnly) + cmp r3, #0 @ VanillaPortraitsOnly.47_260, + beq .L779 @, + movs r3, r0 @ VanillaPortraitsOnly.47_260, NeverRandomizeBeforeThisColour +.L734: +@ Patches/../C_code.c:1717: AdjustNonSkinColours(bank, id, AlwaysRandomizePastThisColour, NeverRandomizeBeforeThisColour, fading); ldr r0, [sp, #12] @ fading, %sfp str r0, [sp] @ fading, movs r0, #3 @, bl AdjustNonSkinColours @ -@ Patches/../C_code.c:1906: result = true; +@ Patches/../C_code.c:1911: result = true; movs r3, #1 @ result, str r3, [sp, #16] @ result, %sfp -@ Patches/../C_code.c:1713: } - b .L724 @ +@ Patches/../C_code.c:1718: } + b .L727 @ +.L789: +@ Patches/../C_code.c:1957: unit = &gBattleActorUnit; + ldr r5, .L849+20 @ unit, + b .L750 @ .L786: -@ Patches/../C_code.c:1952: unit = &gBattleActorUnit; - ldr r5, .L846+20 @ unit, - b .L747 @ -.L783: -@ Patches/../C_code.c:1940: unit = &gBattleTargetUnit; - ldr r6, .L846+24 @ unit, - b .L743 @ -.L776: -@ Patches/../C_code.c:1709: AlwaysRandomizePastThisColour = 99; +@ Patches/../C_code.c:1945: unit = &gBattleTargetUnit; + ldr r6, .L849+24 @ unit, + b .L746 @ +.L779: +@ Patches/../C_code.c:1714: AlwaysRandomizePastThisColour = 99; movs r2, #99 @ AlwaysRandomizePastThisColour, - b .L731 @ -.L847: + b .L734 @ +.L850: .align 2 -.L846: +.L849: .word GetUnitFromPrepList .word GetUnitPortraitId .word PortraitColoursPastThisAreNotSkin @@ -6133,90 +6164,90 @@ GetBGMTrack: @ args = 0, pretend = 0, frame = 216 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) - ldr r3, .L856 @ tmp134, -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) + ldr r3, .L859 @ tmp134, +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) ldr r3, [r3] @ NeverRandomizeBGM, NeverRandomizeBGM -@ Patches/../C_code.c:1263: { // fe7/fe8 only? +@ Patches/../C_code.c:1268: { // fe7/fe8 only? sub sp, sp, #216 @,, -@ Patches/../C_code.c:1126: if (NeverRandomizeBGM) +@ Patches/../C_code.c:1131: if (NeverRandomizeBGM) cmp r3, #0 @ NeverRandomizeBGM, - bne .L849 @, -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) - ldr r2, .L856+4 @ tmp137, + bne .L852 @, +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) + ldr r2, .L859+4 @ tmp137, ldr r2, [r2] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:1130: if (!RandBitflags->randMusic) - ldrb r2, [r2, #1] @ *RandBitflags.23_33, *RandBitflags.23_33 - cmp r2, #63 @ *RandBitflags.23_33, - bls .L849 @, -@ Patches/../C_code.c:1268: int noise[4] = { 1, 2, gCh, 0 }; +@ Patches/../C_code.c:1135: if (!RandBitflags->randMusic) + ldrb r2, [r2, #1] @ *RandBitflags.24_33, *RandBitflags.24_33 + cmp r2, #63 @ *RandBitflags.24_33, + bls .L852 @, +@ Patches/../C_code.c:1273: int noise[4] = { 1, 2, gCh, 0 }; movs r1, #2 @, movs r0, #1 @ tmp141, - ldr r2, .L856+8 @ tmp142, + ldr r2, .L859+8 @ tmp142, str r3, [sp, #12] @ NeverRandomizeBGM, noise[3] ldrb r5, [r2] @ _2, gCh -@ Patches/../C_code.c:1269: int number = gPhase; - ldr r3, .L856+12 @ tmp146, -@ Patches/../C_code.c:1275: BuildTracklist(List); +@ Patches/../C_code.c:1274: int number = gPhase; + ldr r3, .L859+12 @ tmp146, +@ Patches/../C_code.c:1280: BuildTracklist(List); add r4, sp, #16 @ tmp147,, -@ Patches/../C_code.c:1268: int noise[4] = { 1, 2, gCh, 0 }; +@ Patches/../C_code.c:1273: int noise[4] = { 1, 2, gCh, 0 }; str r0, [sp] @ tmp141, MEM [(int *)&noise] str r1, [sp, #4] @ tmp141, -@ Patches/../C_code.c:1275: BuildTracklist(List); +@ Patches/../C_code.c:1280: BuildTracklist(List); movs r0, r4 @, tmp147 -@ Patches/../C_code.c:1269: int number = gPhase; - ldrb r6, [r3] @ gPhase.34_3, gPhase -@ Patches/../C_code.c:1268: int noise[4] = { 1, 2, gCh, 0 }; +@ Patches/../C_code.c:1274: int number = gPhase; + ldrb r6, [r3] @ gPhase.35_3, gPhase +@ Patches/../C_code.c:1273: int noise[4] = { 1, 2, gCh, 0 }; str r5, [sp, #8] @ _2, noise[2] -@ Patches/../C_code.c:1275: BuildTracklist(List); +@ Patches/../C_code.c:1280: BuildTracklist(List); bl BuildTracklist @ - mov r2, sp @ ivtmp.1111, -@ Patches/../C_code.c:1276: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; - ldr r3, .L856+16 @ tmp149, -@ Patches/../C_code.c:1276: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; - ldrh r1, [r4] @ _4, List.1100 -@ Patches/../C_code.c:1276: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; - ldrh r3, [r3] @ gTurn.36_6, gTurn -.L850: -@ Patches/../C_code.c:2363: if (!noise[i]) + mov r2, sp @ ivtmp.1116, +@ Patches/../C_code.c:1281: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; + ldr r3, .L859+16 @ tmp149, +@ Patches/../C_code.c:1281: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; + ldrh r1, [r4] @ _4, List.1105 +@ Patches/../C_code.c:1281: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; + ldrh r3, [r3] @ gTurn.37_6, gTurn +.L853: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r0, [r2] @ MEM[(int *)_39], MEM[(int *)_39] cmp r0, #0 @ MEM[(int *)_39], - beq .L855 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r2, r2, #4 @ ivtmp.1111, - cmp r4, r2 @ tmp147, ivtmp.1111 - bne .L850 @, -.L853: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L858 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r2, r2, #4 @ ivtmp.1116, + cmp r4, r2 @ tmp147, ivtmp.1116 + bne .L853 @, +.L856: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); mov r2, sp @, - movs r0, r6 @, gPhase.34_3 + movs r0, r6 @, gPhase.35_3 bl HashByte_Global @ -@ Patches/../C_code.c:1276: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; +@ Patches/../C_code.c:1281: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; adds r0, r0, #1 @ tmp156, lsls r0, r0, #1 @ tmp157, tmp156, -@ Patches/../C_code.c:1276: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; - ldrh r0, [r4, r0] @ , List.1100 -@ Patches/../C_code.c:1277: return result; - b .L848 @ -.L849: -@ Patches/../C_code.c:1266: return GetCurrentMapMusicIndex(); - ldr r3, .L856+20 @ tmp150, - bl .L14 @ -.L848: -@ Patches/../C_code.c:1278: }; +@ Patches/../C_code.c:1281: int result = List[HashByte_Ch(number, List[0], noise, gTurn) + 1]; + ldrh r0, [r4, r0] @ , List.1105 +@ Patches/../C_code.c:1282: return result; + b .L851 @ +.L852: +@ Patches/../C_code.c:1271: return GetCurrentMapMusicIndex(); + ldr r3, .L859+20 @ tmp150, + bl .L14 @ +.L851: +@ Patches/../C_code.c:1283: }; add sp, sp, #216 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L855: -@ Patches/../C_code.c:2365: noise[i] = gCh; +.L858: +@ Patches/../C_code.c:2370: noise[i] = gCh; str r5, [r2] @ _2, *_39 -@ Patches/../C_code.c:2366: break; - b .L853 @ -.L857: +@ Patches/../C_code.c:2371: break; + b .L856 @ +.L860: .align 2 -.L856: +.L859: .word NeverRandomizeBGM .word RandBitflags .word gCh @@ -6236,21 +6267,21 @@ StartMapSongBgm: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1333: StartBgm(GetBGMTrack(), 0); // 8003890, 8003210 +@ Patches/../C_code.c:1338: StartBgm(GetBGMTrack(), 0); // 8003890, 8003210 bl GetBGMTrack @ -@ Patches/../C_code.c:1335: } +@ Patches/../C_code.c:1340: } @ sp needed @ -@ Patches/../C_code.c:1333: StartBgm(GetBGMTrack(), 0); // 8003890, 8003210 +@ Patches/../C_code.c:1338: StartBgm(GetBGMTrack(), 0); // 8003890, 8003210 movs r1, #0 @, - ldr r3, .L859 @ tmp115, + ldr r3, .L862 @ tmp115, bl .L14 @ -@ Patches/../C_code.c:1335: } +@ Patches/../C_code.c:1340: } pop {r4} pop {r0} bx r0 -.L860: +.L863: .align 2 -.L859: +.L862: .word StartBgm .size StartMapSongBgm, .-StartMapSongBgm .align 1 @@ -6265,48 +6296,48 @@ PhaseIntroInitText: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:1349: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 - ldr r3, .L866 @ tmp119, -@ Patches/../C_code.c:1348: { +@ Patches/../C_code.c:1354: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 + ldr r3, .L869 @ tmp119, +@ Patches/../C_code.c:1353: { movs r4, r0 @ proc, tmp135 -@ Patches/../C_code.c:1349: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 +@ Patches/../C_code.c:1354: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 bl .L14 @ movs r5, r0 @ _1, tmp136 -@ Patches/../C_code.c:1349: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 +@ Patches/../C_code.c:1354: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 bl GetBGMTrack @ -@ Patches/../C_code.c:1349: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 +@ Patches/../C_code.c:1354: if (GetCurrentBgmSong() != GetBGMTrack()) // 80034DC, 8002F68 cmp r5, r0 @ _1, tmp137 - beq .L862 @, -@ Patches/../C_code.c:1350: Sound_FadeOutBGM(4); // 80035EC, 8003064 + beq .L865 @, +@ Patches/../C_code.c:1355: Sound_FadeOutBGM(4); // 80035EC, 8003064 movs r0, #4 @, - ldr r3, .L866+4 @ tmp120, + ldr r3, .L869+4 @ tmp120, bl .L14 @ -.L862: -@ Patches/../C_code.c:1353: PlaySoundEffect(0x73); // 803DD98, 8036D08 - ldr r3, .L866+8 @ tmp121, +.L865: +@ Patches/../C_code.c:1358: PlaySoundEffect(0x73); // 803DD98, 8036D08 + ldr r3, .L869+8 @ tmp121, ldrb r3, [r3] @ gSfx, gSfx lsls r3, r3, #30 @ tmp138, gSfx, - bpl .L865 @, -.L863: -@ Patches/../C_code.c:1363: } + bpl .L868 @, +.L866: +@ Patches/../C_code.c:1368: } @ sp needed @ -@ Patches/../C_code.c:1362: proc->timer = 15; +@ Patches/../C_code.c:1367: proc->timer = 15; movs r3, #76 @ tmp132, movs r2, #15 @ tmp133, strh r2, [r4, r3] @ tmp133, proc_11(D)->timer -@ Patches/../C_code.c:1363: } +@ Patches/../C_code.c:1368: } pop {r4, r5, r6} pop {r0} bx r0 -.L865: -@ Patches/../C_code.c:1353: PlaySoundEffect(0x73); // 803DD98, 8036D08 +.L868: +@ Patches/../C_code.c:1358: PlaySoundEffect(0x73); // 803DD98, 8036D08 movs r0, #115 @, - ldr r3, .L866+12 @ tmp131, + ldr r3, .L869+12 @ tmp131, bl .L14 @ - b .L863 @ -.L867: + b .L866 @ +.L870: .align 2 -.L866: +.L869: .word GetCurrentBgmSong .word Sound_FadeOutBGM .word gSfx @@ -6324,32 +6355,32 @@ sub_80328B0: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:1367: int bgmIdx = GetBGMTrack(); +@ Patches/../C_code.c:1372: int bgmIdx = GetBGMTrack(); bl GetBGMTrack @ -@ Patches/../C_code.c:1369: if (GetCurrentBgmSong() != bgmIdx) - ldr r3, .L870 @ tmp116, -@ Patches/../C_code.c:1367: int bgmIdx = GetBGMTrack(); +@ Patches/../C_code.c:1374: if (GetCurrentBgmSong() != bgmIdx) + ldr r3, .L873 @ tmp116, +@ Patches/../C_code.c:1372: int bgmIdx = GetBGMTrack(); movs r4, r0 @ bgmIdx, tmp118 -@ Patches/../C_code.c:1369: if (GetCurrentBgmSong() != bgmIdx) +@ Patches/../C_code.c:1374: if (GetCurrentBgmSong() != bgmIdx) bl .L14 @ -@ Patches/../C_code.c:1369: if (GetCurrentBgmSong() != bgmIdx) +@ Patches/../C_code.c:1374: if (GetCurrentBgmSong() != bgmIdx) cmp r0, r4 @ tmp119, bgmIdx - beq .L868 @, -@ Patches/../C_code.c:1371: StartBgmExt(bgmIdx, 6, NULL); // 80038AC, 800322C + beq .L871 @, +@ Patches/../C_code.c:1376: StartBgmExt(bgmIdx, 6, NULL); // 80038AC, 800322C movs r2, #0 @, movs r1, #6 @, movs r0, r4 @, bgmIdx - ldr r3, .L870+4 @ tmp117, + ldr r3, .L873+4 @ tmp117, bl .L14 @ -.L868: -@ Patches/../C_code.c:1375: } +.L871: +@ Patches/../C_code.c:1380: } @ sp needed @ pop {r4} pop {r0} bx r0 -.L871: +.L874: .align 2 -.L870: +.L873: .word GetCurrentBgmSong .word StartBgmExt .size sub_80328B0, .-sub_80328B0 @@ -6365,148 +6396,148 @@ RandRareItem.part.0: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ movs r6, r2 @ offset, tmp185 -@ Patches/../C_code.c:3144: item &= 0xFF; +@ Patches/../C_code.c:3149: item &= 0xFF; movs r2, #255 @ tmp150, -@ Patches/../C_code.c:3138: int RandRareItem(int item, int noise[], int offset, int costReq, int varyByCh) +@ Patches/../C_code.c:3143: int RandRareItem(int item, int noise[], int offset, int costReq, int varyByCh) mov lr, r8 @, -@ Patches/../C_code.c:3144: item &= 0xFF; +@ Patches/../C_code.c:3149: item &= 0xFF; ands r0, r2 @ item, tmp150 -@ Patches/../C_code.c:3145: if (ItemExceptions[item].NeverChangeFrom) - ldr r2, .L896 @ tmp151, -@ Patches/../C_code.c:3138: int RandRareItem(int item, int noise[], int offset, int costReq, int varyByCh) +@ Patches/../C_code.c:3150: if (ItemExceptions[item].NeverChangeFrom) + ldr r2, .L899 @ tmp151, +@ Patches/../C_code.c:3143: int RandRareItem(int item, int noise[], int offset, int costReq, int varyByCh) movs r5, r1 @ noise, tmp184 -@ Patches/../C_code.c:3145: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3150: if (ItemExceptions[item].NeverChangeFrom) lsls r1, r0, #1 @ tmp152, item, -@ Patches/../C_code.c:3145: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3150: if (ItemExceptions[item].NeverChangeFrom) ldrb r2, [r1, r2] @ tmp153, ItemExceptions -@ Patches/../C_code.c:3138: int RandRareItem(int item, int noise[], int offset, int costReq, int varyByCh) +@ Patches/../C_code.c:3143: int RandRareItem(int item, int noise[], int offset, int costReq, int varyByCh) push {lr} @ -@ Patches/../C_code.c:3145: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3150: if (ItemExceptions[item].NeverChangeFrom) cmp r2, #0 @ tmp153, - bne .L891 @, -@ Patches/../C_code.c:3152: c = HashByte_Ch(item, RareItemTableSize, noise, offset); - ldr r2, .L896+4 @ tmp155, + bne .L894 @, +@ Patches/../C_code.c:3157: c = HashByte_Ch(item, RareItemTableSize, noise, offset); + ldr r2, .L899+4 @ tmp155, ldr r1, [r2] @ pretmp_80, RareItemTableSize -@ Patches/../C_code.c:3150: if (varyByCh) +@ Patches/../C_code.c:3155: if (varyByCh) cmp r3, #0 @ varyByCh, - bne .L892 @, -@ Patches/../C_code.c:3156: c = HashByte_Global(item, RareItemTableSize, noise, offset); + bne .L895 @, +@ Patches/../C_code.c:3161: c = HashByte_Global(item, RareItemTableSize, noise, offset); movs r2, r5 @, noise movs r3, r6 @, offset bl HashByte_Global @ -@ Patches/../C_code.c:3158: item = RareItemTable[c]; - ldr r3, .L896+8 @ tmp167, -@ Patches/../C_code.c:3158: item = RareItemTable[c]; +@ Patches/../C_code.c:3163: item = RareItemTable[c]; + ldr r3, .L899+8 @ tmp167, +@ Patches/../C_code.c:3163: item = RareItemTable[c]; ldrb r4, [r3, r0] @ item, RareItemTable -@ Patches/../C_code.c:3160: if (GetItemData(item)->nameTextId == 0xFFFF) - ldr r3, .L896+12 @ tmp168, +@ Patches/../C_code.c:3165: if (GetItemData(item)->nameTextId == 0xFFFF) + ldr r3, .L899+12 @ tmp168, movs r0, r4 @, item bl .L14 @ -@ Patches/../C_code.c:3160: if (GetItemData(item)->nameTextId == 0xFFFF) - ldr r3, .L896+16 @ tmp170, +@ Patches/../C_code.c:3165: if (GetItemData(item)->nameTextId == 0xFFFF) + ldr r3, .L899+16 @ tmp170, ldrh r2, [r0] @ *_20, *_20 cmp r2, r3 @ *_20, tmp170 - beq .L893 @, -.L880: -@ Patches/../C_code.c:3177: return MakeNewItem(item); + beq .L896 @, +.L883: +@ Patches/../C_code.c:3182: return MakeNewItem(item); movs r0, r4 @, item -.L891: - ldr r3, .L896+20 @ tmp181, +.L894: + ldr r3, .L899+20 @ tmp181, bl .L14 @ -.L872: -@ Patches/../C_code.c:3178: } +.L875: +@ Patches/../C_code.c:3183: } @ sp needed @ pop {r7} mov r8, r7 pop {r4, r5, r6, r7} pop {r1} bx r1 -.L892: +.L895: movs r3, #16 @ _27, mov r8, r3 @ _27, _27 - movs r7, r5 @ ivtmp.1132, noise -@ Patches/../C_code.c:3150: if (varyByCh) - movs r3, r5 @ ivtmp.1139, noise + movs r7, r5 @ ivtmp.1137, noise +@ Patches/../C_code.c:3155: if (varyByCh) + movs r3, r5 @ ivtmp.1144, noise add r8, r8, r5 @ _27, noise -.L878: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L881: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_43], MEM[(int *)_43] cmp r2, #0 @ MEM[(int *)_43], - beq .L894 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1139, - cmp r3, r8 @ ivtmp.1139, _27 - bne .L878 @, -.L877: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L897 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1144, + cmp r3, r8 @ ivtmp.1144, _27 + bne .L881 @, +.L880: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r2, r5 @, noise movs r3, r6 @, offset bl HashByte_Global @ -@ Patches/../C_code.c:3158: item = RareItemTable[c]; - ldr r3, .L896+8 @ tmp161, -@ Patches/../C_code.c:3158: item = RareItemTable[c]; +@ Patches/../C_code.c:3163: item = RareItemTable[c]; + ldr r3, .L899+8 @ tmp161, +@ Patches/../C_code.c:3163: item = RareItemTable[c]; ldrb r4, [r3, r0] @ item, RareItemTable -@ Patches/../C_code.c:3160: if (GetItemData(item)->nameTextId == 0xFFFF) - ldr r3, .L896+12 @ tmp162, +@ Patches/../C_code.c:3165: if (GetItemData(item)->nameTextId == 0xFFFF) + ldr r3, .L899+12 @ tmp162, movs r0, r4 @, item bl .L14 @ -@ Patches/../C_code.c:3160: if (GetItemData(item)->nameTextId == 0xFFFF) - ldr r3, .L896+16 @ tmp164, +@ Patches/../C_code.c:3165: if (GetItemData(item)->nameTextId == 0xFFFF) + ldr r3, .L899+16 @ tmp164, ldrh r2, [r0] @ *_70, *_70 cmp r2, r3 @ *_70, tmp164 - bne .L880 @, -@ Patches/../C_code.c:3164: c = HashByte_Ch(item, NumberOfSkills, noise, offset); - ldr r3, .L896+24 @ tmp171, - ldr r1, [r3] @ NumberOfSkills.139_19, NumberOfSkills -.L884: -@ Patches/../C_code.c:2363: if (!noise[i]) + bne .L883 @, +@ Patches/../C_code.c:3169: c = HashByte_Ch(item, NumberOfSkills, noise, offset); + ldr r3, .L899+24 @ tmp171, + ldr r1, [r3] @ NumberOfSkills.140_19, NumberOfSkills +.L887: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r3, [r7] @ MEM[(int *)_53], MEM[(int *)_53] cmp r3, #0 @ MEM[(int *)_53], - beq .L895 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r7, r7, #4 @ ivtmp.1132, - cmp r8, r7 @ _27, ivtmp.1132 - bne .L884 @, - b .L890 @ -.L893: -@ Patches/../C_code.c:3168: c = HashByte_Global(item, NumberOfSkills, noise, offset); - ldr r3, .L896+24 @ tmp177, + beq .L898 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r7, r7, #4 @ ivtmp.1137, + cmp r8, r7 @ _27, ivtmp.1137 + bne .L887 @, + b .L893 @ +.L896: +@ Patches/../C_code.c:3173: c = HashByte_Global(item, NumberOfSkills, noise, offset); + ldr r3, .L899+24 @ tmp177, ldr r1, [r3] @ NumberOfSkills, NumberOfSkills -.L890: +.L893: movs r3, r6 @, offset movs r2, r5 @, noise movs r0, r4 @, item bl HashByte_Global @ -@ Patches/../C_code.c:3170: if (!c) +@ Patches/../C_code.c:3175: if (!c) cmp r0, #0 @ c, - beq .L887 @, -@ Patches/../C_code.c:3174: return item | (c << 8); // random durability + beq .L890 @, +@ Patches/../C_code.c:3179: return item | (c << 8); // random durability lsls r0, r0, #8 @ _78, c, -@ Patches/../C_code.c:3174: return item | (c << 8); // random durability +@ Patches/../C_code.c:3179: return item | (c << 8); // random durability orrs r0, r4 @ , item - b .L872 @ -.L887: + b .L875 @ +.L890: movs r0, #128 @ _78, lsls r0, r0, #1 @ _78, _78, orrs r0, r4 @ , item - b .L872 @ -.L894: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L896+28 @ tmp157, + b .L875 @ +.L897: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L899+28 @ tmp157, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_43 -@ Patches/../C_code.c:2366: break; - b .L877 @ -.L895: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r3, .L896+28 @ tmp173, +@ Patches/../C_code.c:2371: break; + b .L880 @ +.L898: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r3, .L899+28 @ tmp173, ldrb r3, [r3] @ gCh, gCh str r3, [r7] @ gCh, *_53 -@ Patches/../C_code.c:2366: break; - b .L890 @ -.L897: +@ Patches/../C_code.c:2371: break; + b .L893 @ +.L900: .align 2 -.L896: +.L899: .word ItemExceptions .word RareItemTableSize .word RareItemTable @@ -6527,116 +6558,116 @@ MaybeChangeAi2: @ Function supports interworking. @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2035: return RecruitValues->ai; - ldr r3, .L910 @ tmp143, -@ Patches/../C_code.c:2039: { +@ Patches/../C_code.c:2040: return RecruitValues->ai; + ldr r3, .L913 @ tmp143, +@ Patches/../C_code.c:2044: { push {r4, r5, lr} @ -@ Patches/../C_code.c:2035: return RecruitValues->ai; +@ Patches/../C_code.c:2040: return RecruitValues->ai; ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r3, [r3] @ *RecruitValues.75_23, *RecruitValues.75_23 -@ Patches/../C_code.c:2039: { + ldrb r3, [r3] @ *RecruitValues.76_23, *RecruitValues.76_23 +@ Patches/../C_code.c:2044: { sub sp, sp, #20 @,, -@ Patches/../C_code.c:2035: return RecruitValues->ai; - lsrs r3, r3, #6 @ _33, *RecruitValues.75_23, -@ Patches/../C_code.c:2041: if (settings == 2) +@ Patches/../C_code.c:2040: return RecruitValues->ai; + lsrs r3, r3, #6 @ _33, *RecruitValues.76_23, +@ Patches/../C_code.c:2046: if (settings == 2) cmp r3, #2 @ _33, - beq .L907 @, -@ Patches/../C_code.c:2059: else if (settings == 1) + beq .L910 @, +@ Patches/../C_code.c:2064: else if (settings == 1) cmp r3, #1 @ _33, - beq .L908 @, -.L898: -@ Patches/../C_code.c:2063: } + beq .L911 @, +.L901: +@ Patches/../C_code.c:2068: } add sp, sp, #20 @,, @ sp needed @ pop {r4, r5} pop {r0} bx r0 -.L908: -@ Patches/../C_code.c:2061: gActiveUnit->ai2 = 0; - ldr r3, .L910+4 @ tmp180, +.L911: +@ Patches/../C_code.c:2066: gActiveUnit->ai2 = 0; + ldr r3, .L913+4 @ tmp180, movs r1, #0 @ tmp182, ldr r2, [r3] @ gActiveUnit, gActiveUnit movs r3, #68 @ tmp181, - strb r1, [r2, r3] @ tmp182, gActiveUnit.86_19->ai2 - b .L898 @ -.L907: -@ Patches/../C_code.c:2043: if (gActiveUnit->ai2 == 3) - ldr r3, .L910+4 @ tmp150, - ldr r4, [r3] @ gActiveUnit.76_1, gActiveUnit + strb r1, [r2, r3] @ tmp182, gActiveUnit.87_19->ai2 + b .L901 @ +.L910: +@ Patches/../C_code.c:2048: if (gActiveUnit->ai2 == 3) + ldr r3, .L913+4 @ tmp150, + ldr r4, [r3] @ gActiveUnit.77_1, gActiveUnit movs r3, #68 @ tmp151, -@ Patches/../C_code.c:2043: if (gActiveUnit->ai2 == 3) +@ Patches/../C_code.c:2048: if (gActiveUnit->ai2 == 3) ldrb r3, [r4, r3] @ tmp152, cmp r3, #3 @ tmp152, - bne .L898 @, -@ Patches/../C_code.c:2045: if (UNIT_CATTRIBUTES(gActiveUnit) & CA_BOSS) - ldr r1, [r4] @ _3, gActiveUnit.76_1->pCharacterData - ldr r2, [r4, #4] @ _5, gActiveUnit.76_1->pClassData + bne .L901 @, +@ Patches/../C_code.c:2050: if (UNIT_CATTRIBUTES(gActiveUnit) & CA_BOSS) + ldr r1, [r4] @ _3, gActiveUnit.77_1->pCharacterData + ldr r2, [r4, #4] @ _5, gActiveUnit.77_1->pClassData ldr r3, [r1, #40] @ _3->attributes, _3->attributes ldr r0, [r2, #40] @ _5->attributes, _5->attributes orrs r3, r0 @ tmp153, _5->attributes -@ Patches/../C_code.c:2045: if (UNIT_CATTRIBUTES(gActiveUnit) & CA_BOSS) +@ Patches/../C_code.c:2050: if (UNIT_CATTRIBUTES(gActiveUnit) & CA_BOSS) lsls r3, r3, #16 @ tmp188, tmp153, - bmi .L898 @, -@ Patches/../C_code.c:2049: if (gTurn > 15) - ldr r3, .L910+8 @ tmp158, - ldrh r5, [r3] @ gTurn.79_9, gTurn -@ Patches/../C_code.c:2049: if (gTurn > 15) - cmp r5, #15 @ gTurn.79_9, - bls .L898 @, -@ Patches/../C_code.c:2051: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; + bmi .L901 @, +@ Patches/../C_code.c:2054: if (gTurn > 15) + ldr r3, .L913+8 @ tmp158, + ldrh r5, [r3] @ gTurn.80_9, gTurn +@ Patches/../C_code.c:2054: if (gTurn > 15) + cmp r5, #15 @ gTurn.80_9, + bls .L901 @, +@ Patches/../C_code.c:2056: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; ldrb r3, [r1, #4] @ tmp162, str r3, [sp] @ tmp162, noise[0] -@ Patches/../C_code.c:2051: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; +@ Patches/../C_code.c:2056: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; ldrb r3, [r2, #4] @ tmp164, -@ Patches/../C_code.c:2051: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; +@ Patches/../C_code.c:2056: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; movs r2, #0 @ tmp165, -@ Patches/../C_code.c:2051: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; +@ Patches/../C_code.c:2056: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; str r3, [sp, #4] @ tmp164, noise[1] -@ Patches/../C_code.c:2051: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; +@ Patches/../C_code.c:2056: int noise[4] = { gActiveUnit->pCharacterData->number, gActiveUnit->pClassData->number, 0, 0 }; movs r3, #0 @, str r2, [sp, #8] @ tmp165, MEM [(int *)&noise + 8B] str r3, [sp, #12] @ tmp165, - mov r3, sp @ ivtmp.1152, + mov r3, sp @ ivtmp.1157, add r1, sp, #16 @ _50,, -.L903: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L906: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_37], MEM[(int *)_37] cmp r2, #0 @ MEM[(int *)_37], - beq .L909 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1152, - cmp r3, r1 @ ivtmp.1152, _50 - bne .L903 @, -.L902: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); - movs r3, r5 @, gTurn.79_9 - movs r0, r5 @, gTurn.79_9 + beq .L912 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1157, + cmp r3, r1 @ ivtmp.1157, _50 + bne .L906 @, +.L905: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); + movs r3, r5 @, gTurn.80_9 + movs r0, r5 @, gTurn.80_9 mov r2, sp @, movs r1, #100 @, bl HashByte_Global @ -@ Patches/../C_code.c:2052: if (HashByte_Ch(gTurn, 100, noise, gTurn) < ((gTurn - 15) * 3)) +@ Patches/../C_code.c:2057: if (HashByte_Ch(gTurn, 100, noise, gTurn) < ((gTurn - 15) * 3)) subs r5, r5, #15 @ tmp172, -@ Patches/../C_code.c:2052: if (HashByte_Ch(gTurn, 100, noise, gTurn) < ((gTurn - 15) * 3)) +@ Patches/../C_code.c:2057: if (HashByte_Ch(gTurn, 100, noise, gTurn) < ((gTurn - 15) * 3)) lsls r3, r5, #1 @ tmp174, tmp172, adds r3, r3, r5 @ tmp175, tmp174, tmp172 -@ Patches/../C_code.c:2052: if (HashByte_Ch(gTurn, 100, noise, gTurn) < ((gTurn - 15) * 3)) +@ Patches/../C_code.c:2057: if (HashByte_Ch(gTurn, 100, noise, gTurn) < ((gTurn - 15) * 3)) cmp r0, r3 @ tmp186, tmp175 - bge .L898 @, -@ Patches/../C_code.c:2054: gActiveUnit->ai2 = 0; + bge .L901 @, +@ Patches/../C_code.c:2059: gActiveUnit->ai2 = 0; movs r3, #68 @ tmp176, movs r2, #0 @ tmp177, - strb r2, [r4, r3] @ tmp177, gActiveUnit.76_1->ai2 - b .L898 @ -.L909: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L910+12 @ tmp167, + strb r2, [r4, r3] @ tmp177, gActiveUnit.77_1->ai2 + b .L901 @ +.L912: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L913+12 @ tmp167, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_37 -@ Patches/../C_code.c:2366: break; - b .L902 @ -.L911: +@ Patches/../C_code.c:2371: break; + b .L905 @ +.L914: .align 2 -.L910: +.L913: .word RecruitValues .word gActiveUnit .word gTurn @@ -6654,116 +6685,116 @@ HashByte_GlobalOld: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:2327: { +@ Patches/../C_code.c:2332: { movs r5, r0 @ number, tmp212 subs r4, r1, #0 @ max, tmp213, -@ Patches/../C_code.c:2328: if (max == 0) - beq .L916 @, -@ Patches/../C_code.c:2335: offset &= 0xFF; +@ Patches/../C_code.c:2333: if (max == 0) + beq .L919 @, +@ Patches/../C_code.c:2340: offset &= 0xFF; movs r6, #255 @ tmp179, -@ Patches/../C_code.c:2330: offset += noise[0] * 3; +@ Patches/../C_code.c:2335: offset += noise[0] * 3; ldr r0, [r2] @ *noise_40(D), *noise_40(D) lsls r1, r0, #1 @ tmp163, *noise_40(D), adds r1, r1, r0 @ tmp164, tmp163, *noise_40(D) -@ Patches/../C_code.c:2331: offset += noise[1] * 5; +@ Patches/../C_code.c:2336: offset += noise[1] * 5; ldr r0, [r2, #4] @ MEM[(int *)noise_40(D) + 4B], MEM[(int *)noise_40(D) + 4B] -@ Patches/../C_code.c:2330: offset += noise[0] * 3; +@ Patches/../C_code.c:2335: offset += noise[0] * 3; adds r1, r1, r3 @ offset, tmp164, offset -@ Patches/../C_code.c:2331: offset += noise[1] * 5; +@ Patches/../C_code.c:2336: offset += noise[1] * 5; lsls r3, r0, #2 @ tmp167, MEM[(int *)noise_40(D) + 4B], adds r3, r3, r0 @ tmp168, tmp167, MEM[(int *)noise_40(D) + 4B] -@ Patches/../C_code.c:2332: offset += noise[2] * 7; +@ Patches/../C_code.c:2337: offset += noise[2] * 7; ldr r0, [r2, #8] @ MEM[(int *)noise_40(D) + 8B], MEM[(int *)noise_40(D) + 8B] -@ Patches/../C_code.c:2331: offset += noise[1] * 5; +@ Patches/../C_code.c:2336: offset += noise[1] * 5; adds r3, r3, r1 @ offset, tmp168, offset -@ Patches/../C_code.c:2332: offset += noise[2] * 7; +@ Patches/../C_code.c:2337: offset += noise[2] * 7; lsls r1, r0, #3 @ tmp171, MEM[(int *)noise_40(D) + 8B], subs r1, r1, r0 @ tmp172, tmp171, MEM[(int *)noise_40(D) + 8B] -@ Patches/../C_code.c:2333: offset += noise[3] * 11; +@ Patches/../C_code.c:2338: offset += noise[3] * 11; ldr r0, [r2, #12] @ MEM[(int *)noise_40(D) + 12B], MEM[(int *)noise_40(D) + 12B] -@ Patches/../C_code.c:2332: offset += noise[2] * 7; +@ Patches/../C_code.c:2337: offset += noise[2] * 7; adds r1, r1, r3 @ offset, tmp172, offset -@ Patches/../C_code.c:2333: offset += noise[3] * 11; +@ Patches/../C_code.c:2338: offset += noise[3] * 11; lsls r3, r0, #2 @ tmp175, MEM[(int *)noise_40(D) + 12B], adds r3, r3, r0 @ tmp176, tmp175, MEM[(int *)noise_40(D) + 12B] lsls r3, r3, #1 @ tmp177, tmp176, adds r0, r3, r0 @ tmp178, tmp177, MEM[(int *)noise_40(D) + 12B] -@ Patches/../C_code.c:2339: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; - ldr r3, .L921 @ tmp181, +@ Patches/../C_code.c:2344: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; + ldr r3, .L924 @ tmp181, ldr r3, [r3] @ RandValues, RandValues -@ Patches/../C_code.c:2337: hash = ((hash << 5) + hash) ^ number; - ldr r7, .L921+4 @ tmp185, -@ Patches/../C_code.c:2333: offset += noise[3] * 11; +@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ number; + ldr r7, .L924+4 @ tmp185, +@ Patches/../C_code.c:2338: offset += noise[3] * 11; adds r0, r0, r1 @ offset, tmp178, offset -@ Patches/../C_code.c:2339: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; - ldr r1, [r3] @ *RandValues.112_10, *RandValues.112_10 -@ Patches/../C_code.c:2337: hash = ((hash << 5) + hash) ^ number; +@ Patches/../C_code.c:2344: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; + ldr r1, [r3] @ *RandValues.113_10, *RandValues.113_10 +@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ number; eors r5, r7 @ hash, tmp185 -@ Patches/../C_code.c:2339: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; - lsls r3, r1, #12 @ tmp183, *RandValues.112_10, +@ Patches/../C_code.c:2344: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; + lsls r3, r1, #12 @ tmp183, *RandValues.113_10, lsls r7, r5, #5 @ tmp187, hash, -@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ seed[i]; - lsls r1, r1, #24 @ tmp190, *RandValues.112_10, +@ Patches/../C_code.c:2347: hash = ((hash << 5) + hash) ^ seed[i]; + lsls r1, r1, #24 @ tmp190, *RandValues.113_10, adds r5, r7, r5 @ tmp188, tmp187, hash lsrs r1, r1, #24 @ tmp189, tmp190, -@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ seed[i]; +@ Patches/../C_code.c:2347: hash = ((hash << 5) + hash) ^ seed[i]; eors r1, r5 @ hash, tmp188 lsls r5, r1, #5 @ tmp193, hash, adds r5, r5, r1 @ tmp194, tmp193, hash -@ Patches/../C_code.c:2339: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; +@ Patches/../C_code.c:2344: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; lsrs r1, r3, #20 @ tmp195, tmp183, -@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ seed[i]; +@ Patches/../C_code.c:2347: hash = ((hash << 5) + hash) ^ seed[i]; ands r1, r6 @ tmp197, tmp179 -@ Patches/../C_code.c:2335: offset &= 0xFF; +@ Patches/../C_code.c:2340: offset &= 0xFF; ands r0, r6 @ offset, tmp179 - movs r6, r2 @ _102, ivtmp.1164 -@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ seed[i]; + movs r6, r2 @ _102, ivtmp.1169 +@ Patches/../C_code.c:2347: hash = ((hash << 5) + hash) ^ seed[i]; eors r1, r5 @ hash, tmp194 lsls r5, r1, #5 @ tmp200, hash, adds r5, r5, r1 @ tmp201, tmp200, hash -@ Patches/../C_code.c:2339: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; +@ Patches/../C_code.c:2344: u8 seed[3] = { (RandValues->seed & 0xFF), (RandValues->seed & 0xFF00) >> 8, (RandValues->seed & 0xFF0000) >> 16 }; lsrs r1, r3, #28 @ tmp202, tmp183, -@ Patches/../C_code.c:2342: hash = ((hash << 5) + hash) ^ seed[i]; +@ Patches/../C_code.c:2347: hash = ((hash << 5) + hash) ^ seed[i]; eors r1, r5 @ hash, tmp201 adds r6, r6, #16 @ _102, -.L915: -@ Patches/../C_code.c:2347: if (!noise[i]) +.L918: +@ Patches/../C_code.c:2352: if (!noise[i]) ldr r3, [r2] @ _34, MEM[(int *)_104] -@ Patches/../C_code.c:2347: if (!noise[i]) +@ Patches/../C_code.c:2352: if (!noise[i]) cmp r3, #0 @ _34, - beq .L914 @, + beq .L917 @, lsls r5, r1, #5 @ tmp204, hash, adds r1, r5, r1 @ tmp205, tmp204, hash -@ Patches/../C_code.c:2351: hash = ((hash << 5) + hash) ^ noise[i]; +@ Patches/../C_code.c:2356: hash = ((hash << 5) + hash) ^ noise[i]; eors r1, r3 @ hash, _34 -.L914: -@ Patches/../C_code.c:2345: for (int i = 0; i < 4; ++i) - adds r2, r2, #4 @ ivtmp.1164, - cmp r2, r6 @ ivtmp.1164, _102 - bne .L915 @, -@ Patches/../C_code.c:2353: hash = GetNthRN(offset + 1, hash); +.L917: +@ Patches/../C_code.c:2350: for (int i = 0; i < 4; ++i) + adds r2, r2, #4 @ ivtmp.1169, + cmp r2, r6 @ ivtmp.1169, _102 + bne .L918 @, +@ Patches/../C_code.c:2358: hash = GetNthRN(offset + 1, hash); adds r0, r0, #1 @ tmp206, bl GetNthRN @ -@ Patches/../C_code.c:2355: return Mod((hash & 0x2FFFFFFF), max); +@ Patches/../C_code.c:2360: return Mod((hash & 0x2FFFFFFF), max); movs r1, r4 @, max - ldr r3, .L921+8 @ tmp209, + ldr r3, .L924+8 @ tmp209, bl .L14 @ -@ Patches/../C_code.c:2355: return Mod((hash & 0x2FFFFFFF), max); +@ Patches/../C_code.c:2360: return Mod((hash & 0x2FFFFFFF), max); lsls r0, r0, #16 @ tmp210, tmp217, lsrs r0, r0, #16 @ , tmp210, -.L913: -@ Patches/../C_code.c:2356: }; +.L916: +@ Patches/../C_code.c:2361: }; @ sp needed @ pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L916: -@ Patches/../C_code.c:2329: return 0; +.L919: +@ Patches/../C_code.c:2334: return 0; movs r0, #0 @ , - b .L913 @ -.L922: + b .L916 @ +.L925: .align 2 -.L921: +.L924: .word RandValues .word 177573 .word Mod @@ -6781,36 +6812,36 @@ HashByte_Ch: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ movs r6, r2 @ _25, noise - movs r4, r2 @ ivtmp.1174, noise + movs r4, r2 @ ivtmp.1179, noise adds r6, r6, #16 @ _25, -.L926: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L929: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r5, [r4] @ MEM[(int *)_3], MEM[(int *)_3] cmp r5, #0 @ MEM[(int *)_3], - beq .L928 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r4, r4, #4 @ ivtmp.1174, - cmp r4, r6 @ ivtmp.1174, _25 - bne .L926 @, -.L925: -@ Patches/../C_code.c:2370: }; + beq .L931 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r4, r4, #4 @ ivtmp.1179, + cmp r4, r6 @ ivtmp.1179, _25 + bne .L929 @, +.L928: +@ Patches/../C_code.c:2375: }; @ sp needed @ -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); bl HashByte_Global @ -@ Patches/../C_code.c:2370: }; +@ Patches/../C_code.c:2375: }; pop {r4, r5, r6} pop {r1} bx r1 -.L928: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r5, .L929 @ tmp126, +.L931: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r5, .L932 @ tmp126, ldrb r5, [r5] @ gCh, gCh str r5, [r4] @ gCh, *_3 -@ Patches/../C_code.c:2366: break; - b .L925 @ -.L930: +@ Patches/../C_code.c:2371: break; + b .L928 @ +.L933: .align 2 -.L929: +.L932: .word gCh .size HashByte_Ch, .-HashByte_Ch .global __aeabi_uidiv @@ -6829,153 +6860,153 @@ HashPercent: push {r4, r5, r6, r7, lr} @ mov lr, r9 @, mov r9, r3 @ global, tmp216 -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) mvns r3, r0 @ tmp200, number -@ Patches/../C_code.c:2373: { +@ Patches/../C_code.c:2378: { movs r5, r0 @ number, tmp213 -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) asrs r3, r3, #31 @ tmp199, tmp200, ands r5, r3 @ _25, tmp199 -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldr r3, .L955 @ tmp147, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldr r3, .L958 @ tmp147, ldr r3, [r3] @ RandValues, RandValues -@ Patches/../C_code.c:2373: { +@ Patches/../C_code.c:2378: { push {lr} @ -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldrh r4, [r3, #2] @ *RandValues.122_1, *RandValues.122_1 -@ Patches/../C_code.c:2377: if (earlygamePromo == 3) +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldrh r4, [r3, #2] @ *RandValues.123_1, *RandValues.123_1 +@ Patches/../C_code.c:2382: if (earlygamePromo == 3) ldr r3, [sp, #24] @ tmp230, earlygamePromo -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - lsls r4, r4, #23 @ tmp152, *RandValues.122_1, -@ Patches/../C_code.c:2373: { +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + lsls r4, r4, #23 @ tmp152, *RandValues.123_1, +@ Patches/../C_code.c:2378: { movs r7, r1 @ noise, tmp214 movs r6, r2 @ offset, tmp215 -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; lsrs r4, r4, #27 @ _3, tmp152, -@ Patches/../C_code.c:2377: if (earlygamePromo == 3) +@ Patches/../C_code.c:2382: if (earlygamePromo == 3) cmp r3, #3 @ tmp230, - beq .L933 @, -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; + beq .L936 @, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; lsls r3, r4, #2 @ tmp155, _3, adds r4, r3, r4 @ variation, tmp155, _3 -@ Patches/../C_code.c:2383: if (global) +@ Patches/../C_code.c:2388: if (global) mov r3, r9 @ global, global -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r1, r4, #1 @ _61, variation, -@ Patches/../C_code.c:2383: if (global) +@ Patches/../C_code.c:2388: if (global) cmp r3, #0 @ global, - beq .L935 @, -.L938: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L938 @, +.L941: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r3, r6 @, offset movs r2, r7 @, noise movs r0, r5 @, _25 bl HashByte_Global @ -@ Patches/../C_code.c:2392: if (earlygamePromo == 1) +@ Patches/../C_code.c:2397: if (earlygamePromo == 1) ldr r3, [sp, #24] @ tmp233, earlygamePromo -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 subs r4, r0, r4 @ tmp177, percentage, variation -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 adds r4, r4, #100 @ percentage, -@ Patches/../C_code.c:2392: if (earlygamePromo == 1) +@ Patches/../C_code.c:2397: if (earlygamePromo == 1) cmp r3, #1 @ tmp233, - beq .L953 @, -@ Patches/../C_code.c:2401: if (percentage > 150) + beq .L956 @, +@ Patches/../C_code.c:2406: if (percentage > 150) ldr r3, [sp, #24] @ tmp234, earlygamePromo cmp r3, #2 @ tmp234, - bne .L941 @, + bne .L944 @, movs r3, #1 @ tmp184, cmp r4, #150 @ percentage, - bgt .L942 @, + bgt .L945 @, movs r3, #0 @ tmp184, -.L942: +.L945: lsls r3, r3, #24 @ tmp189, tmp184, - bne .L952 @, -.L941: -@ Patches/../C_code.c:2406: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) + bne .L955 @, +.L944: +@ Patches/../C_code.c:2411: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) movs r1, #100 @, movs r0, r5 @ tmp190, _25 muls r0, r4 @ tmp190, percentage - ldr r6, .L955+4 @ tmp191, - bl .L143 @ -@ Patches/../C_code.c:2407: if (ret > 127) + ldr r6, .L958+4 @ tmp191, + bl .L146 @ +@ Patches/../C_code.c:2412: if (ret > 127) cmp r0, #127 @ ret, - ble .L943 @, -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); + ble .L946 @, +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r0, #200 @ tmp192, subs r0, r0, r4 @ tmp193, tmp192, percentage -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r1, #100 @, muls r0, r5 @ tmp194, _25 - bl .L143 @ -.L943: -@ Patches/../C_code.c:2412: }; + bl .L146 @ +.L946: +@ Patches/../C_code.c:2417: }; @ sp needed @ -@ Patches/../C_code.c:2409: if (ret < 0) +@ Patches/../C_code.c:2414: if (ret < 0) mvns r3, r0 @ tmp207, ret asrs r3, r3, #31 @ tmp206, tmp207, ands r0, r3 @ ret, tmp206 -@ Patches/../C_code.c:2411: return ret; +@ Patches/../C_code.c:2416: return ret; lsls r0, r0, #16 @ ret, ret, asrs r0, r0, #16 @ ret, ret, -@ Patches/../C_code.c:2412: }; +@ Patches/../C_code.c:2417: }; pop {r7} mov r9, r7 pop {r4, r5, r6, r7} pop {r1} bx r1 -.L953: -@ Patches/../C_code.c:2394: if (percentage > 125) +.L956: +@ Patches/../C_code.c:2399: if (percentage > 125) cmp r4, #125 @ percentage, - ble .L941 @, -.L952: -@ Patches/../C_code.c:2403: percentage = percentage >> 1; + ble .L944 @, +.L955: +@ Patches/../C_code.c:2408: percentage = percentage >> 1; asrs r4, r4, #1 @ percentage, percentage, - b .L941 @ -.L933: -@ Patches/../C_code.c:2379: variation += variation; + b .L944 @ +.L936: +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r4, #2 @ tmp158, _3, adds r0, r0, r4 @ tmp159, tmp158, _3 -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r1, #3 @, - ldr r3, .L955+8 @ tmp167, -@ Patches/../C_code.c:2379: variation += variation; + ldr r3, .L958+8 @ tmp167, +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r0, #1 @ tmp160, tmp159, -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; bl .L14 @ -@ Patches/../C_code.c:2383: if (global) +@ Patches/../C_code.c:2388: if (global) mov r3, r9 @ global, global -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r4, r0 @ variation, tmp217 -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r1, r4, #1 @ _61, variation, -@ Patches/../C_code.c:2383: if (global) +@ Patches/../C_code.c:2388: if (global) cmp r3, #0 @ global, - bne .L938 @, -.L935: + bne .L941 @, +.L938: movs r0, r7 @ _4, noise - movs r3, r7 @ ivtmp.1185, noise + movs r3, r7 @ ivtmp.1190, noise adds r0, r0, #16 @ _4, -.L939: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L942: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_41], MEM[(int *)_41] cmp r2, #0 @ MEM[(int *)_41], - beq .L954 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1185, - cmp r0, r3 @ _4, ivtmp.1185 - bne .L939 @, - b .L938 @ -.L954: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L955+12 @ tmp172, + beq .L957 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1190, + cmp r0, r3 @ _4, ivtmp.1190 + bne .L942 @, + b .L941 @ +.L957: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L958+12 @ tmp172, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_41 -@ Patches/../C_code.c:2366: break; - b .L938 @ -.L956: +@ Patches/../C_code.c:2371: break; + b .L941 @ +.L959: .align 2 -.L955: +.L958: .word RandValues .word Div1 .word __aeabi_idiv @@ -6994,11 +7025,11 @@ HashByPercent_Ch: @ frame_needed = 0, uses_anonymous_args = 0 push {lr} @ sub sp, sp, #12 @,, -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); str r3, [sp] @ tmp125, movs r3, #0 @, bl HashPercent @ -@ Patches/../C_code.c:2417: }; +@ Patches/../C_code.c:2422: }; add sp, sp, #12 @,, @ sp needed @ pop {r1} @@ -7016,66 +7047,66 @@ HashByPercent: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 movs r3, r2 @ offset, tmp167 -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) mvns r2, r0 @ tmp162, number -@ Patches/../C_code.c:2420: { +@ Patches/../C_code.c:2425: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:2420: { +@ Patches/../C_code.c:2425: { movs r4, r0 @ number, tmp165 movs r6, r1 @ noise, tmp166 -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) asrs r2, r2, #31 @ tmp161, tmp162, ands r4, r2 @ _7, tmp161 -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldr r2, .L962 @ tmp134, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldr r2, .L965 @ tmp134, ldr r2, [r2] @ RandValues, RandValues - ldrh r0, [r2, #2] @ *RandValues.122_8, *RandValues.122_8 - lsls r0, r0, #23 @ tmp139, *RandValues.122_8, + ldrh r0, [r2, #2] @ *RandValues.123_8, *RandValues.123_8 + lsls r0, r0, #23 @ tmp139, *RandValues.123_8, lsrs r0, r0, #27 @ _10, tmp139, -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r5, r0, #2 @ tmp142, _10, adds r5, r5, r0 @ tmp143, tmp142, _10 lsls r1, r5, #1 @ tmp144, tmp143, movs r2, r6 @, noise movs r0, r4 @, _7 bl HashByte_Global @ -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 subs r5, r0, r5 @ tmp151, tmp168, tmp143 -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 adds r5, r5, #100 @ percentage, -@ Patches/../C_code.c:2406: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) +@ Patches/../C_code.c:2411: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) movs r1, #100 @, movs r0, r5 @ tmp152, percentage muls r0, r4 @ tmp152, _7 - ldr r6, .L962+4 @ tmp153, - bl .L143 @ -@ Patches/../C_code.c:2407: if (ret > 127) + ldr r6, .L965+4 @ tmp153, + bl .L146 @ +@ Patches/../C_code.c:2412: if (ret > 127) cmp r0, #127 @ ret, - ble .L960 @, -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); + ble .L963 @, +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r0, #200 @ tmp154, subs r0, r0, r5 @ tmp155, tmp154, percentage -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r1, #100 @, muls r0, r4 @ tmp156, _7 - bl .L143 @ -.L960: -@ Patches/../C_code.c:2422: }; + bl .L146 @ +.L963: +@ Patches/../C_code.c:2427: }; @ sp needed @ -@ Patches/../C_code.c:2409: if (ret < 0) +@ Patches/../C_code.c:2414: if (ret < 0) mvns r3, r0 @ tmp164, ret asrs r3, r3, #31 @ tmp163, tmp164, ands r0, r3 @ ret, tmp163 -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); lsls r0, r0, #16 @ ret, ret, asrs r0, r0, #16 @ ret, ret, -@ Patches/../C_code.c:2422: }; +@ Patches/../C_code.c:2427: }; pop {r4, r5, r6} pop {r1} bx r1 -.L963: +.L966: .align 2 -.L962: +.L965: .word RandValues .word Div1 .size HashByPercent, .-HashByPercent @@ -7091,79 +7122,79 @@ HashByTwoThirdsPercent: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) mvns r3, r0 @ tmp170, number -@ Patches/../C_code.c:2425: { +@ Patches/../C_code.c:2430: { movs r4, r0 @ number, tmp173 -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) asrs r3, r3, #31 @ tmp169, tmp170, ands r4, r3 @ _7, tmp169 -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldr r3, .L968 @ tmp135, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldr r3, .L971 @ tmp135, ldr r3, [r3] @ RandValues, RandValues - ldrh r5, [r3, #2] @ *RandValues.122_8, *RandValues.122_8 - lsls r5, r5, #23 @ tmp140, *RandValues.122_8, + ldrh r5, [r3, #2] @ *RandValues.123_8, *RandValues.123_8 + lsls r5, r5, #23 @ tmp140, *RandValues.123_8, lsrs r5, r5, #27 @ tmp141, tmp140, -@ Patches/../C_code.c:2379: variation += variation; +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r5, #2 @ tmp144, tmp141, adds r0, r0, r5 @ tmp145, tmp144, tmp141 -@ Patches/../C_code.c:2425: { +@ Patches/../C_code.c:2430: { movs r6, r1 @ noise, tmp174 -@ Patches/../C_code.c:2380: variation = variation / 3; - ldr r3, .L968+4 @ tmp153, +@ Patches/../C_code.c:2385: variation = variation / 3; + ldr r3, .L971+4 @ tmp153, movs r1, #3 @, -@ Patches/../C_code.c:2379: variation += variation; +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r0, #1 @ tmp146, tmp145, -@ Patches/../C_code.c:2425: { +@ Patches/../C_code.c:2430: { movs r7, r2 @ offset, tmp175 -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; bl .L14 @ -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 movs r2, r6 @, noise lsls r1, r0, #1 @ tmp155, tmp154, -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r5, r0 @ tmp154, tmp176 -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 movs r3, r7 @, offset movs r0, r4 @, _7 bl HashByte_Global @ -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 subs r5, r0, r5 @ tmp159, tmp177, tmp154 -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 adds r5, r5, #100 @ percentage, -@ Patches/../C_code.c:2406: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) +@ Patches/../C_code.c:2411: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) movs r1, #100 @, movs r0, r5 @ tmp160, percentage muls r0, r4 @ tmp160, _7 - ldr r6, .L968+8 @ tmp161, - bl .L143 @ -@ Patches/../C_code.c:2407: if (ret > 127) + ldr r6, .L971+8 @ tmp161, + bl .L146 @ +@ Patches/../C_code.c:2412: if (ret > 127) cmp r0, #127 @ ret, - ble .L966 @, -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); + ble .L969 @, +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r0, #200 @ tmp162, subs r0, r0, r5 @ tmp163, tmp162, percentage -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r1, #100 @, muls r0, r4 @ tmp164, _7 - bl .L143 @ -.L966: -@ Patches/../C_code.c:2427: }; + bl .L146 @ +.L969: +@ Patches/../C_code.c:2432: }; @ sp needed @ -@ Patches/../C_code.c:2409: if (ret < 0) +@ Patches/../C_code.c:2414: if (ret < 0) mvns r3, r0 @ tmp172, ret asrs r3, r3, #31 @ tmp171, tmp172, ands r0, r3 @ ret, tmp171 -@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, 3); +@ Patches/../C_code.c:2431: return HashPercent(number, noise, offset, true, 3); lsls r0, r0, #16 @ ret, ret, asrs r0, r0, #16 @ ret, ret, -@ Patches/../C_code.c:2427: }; +@ Patches/../C_code.c:2432: }; pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L969: +.L972: .align 2 -.L968: +.L971: .word RandValues .word __aeabi_idiv .word Div1 @@ -7182,46 +7213,46 @@ GetRNByID: push {r4, lr} @ movs r4, r0 @ id, tmp128 sub sp, sp, #16 @,, -@ Patches/../C_code.c:2431: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2436: int noise[4] = { 0, 0, 0, 0 }; movs r2, #16 @, movs r1, #0 @, - ldr r3, .L973 @ tmp121, + ldr r3, .L976 @ tmp121, mov r0, sp @, bl .L14 @ -@ Patches/../C_code.c:2432: int result = HashByte_Global(5, 254, noise, id) + 1; +@ Patches/../C_code.c:2437: int result = HashByte_Global(5, 254, noise, id) + 1; movs r3, r4 @, id mov r2, sp @, movs r1, #254 @, movs r0, #5 @, bl HashByte_Global @ movs r3, r0 @ tmp125, tmp129 -@ Patches/../C_code.c:2432: int result = HashByte_Global(5, 254, noise, id) + 1; +@ Patches/../C_code.c:2437: int result = HashByte_Global(5, 254, noise, id) + 1; adds r0, r0, #1 @ , -@ Patches/../C_code.c:2433: if (result < 40) +@ Patches/../C_code.c:2438: if (result < 40) cmp r0, #39 @ , - bgt .L971 @, -@ Patches/../C_code.c:2435: result += 40; + bgt .L974 @, +@ Patches/../C_code.c:2440: result += 40; adds r3, r3, #41 @ tmp125, movs r0, r3 @ , tmp125 -.L970: -@ Patches/../C_code.c:2442: } +.L973: +@ Patches/../C_code.c:2447: } add sp, sp, #16 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L971: -@ Patches/../C_code.c:2437: if (result > 210) +.L974: +@ Patches/../C_code.c:2442: if (result > 210) cmp r0, #210 @ , - ble .L970 @, -@ Patches/../C_code.c:2439: result -= 40; + ble .L973 @, +@ Patches/../C_code.c:2444: result -= 40; subs r3, r3, #39 @ tmp125, movs r0, r3 @ , tmp125 -@ Patches/../C_code.c:2441: return result; - b .L970 @ -.L974: +@ Patches/../C_code.c:2446: return result; + b .L973 @ +.L977: .align 2 -.L973: +.L976: .word memset .size GetRNByID, .-GetRNByID .align 1 @@ -7235,96 +7266,96 @@ HashMight: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2446: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2451: if (!RandBitflags->itemStats) movs r2, #24 @ tmp145, - ldr r3, .L984 @ tmp139, + ldr r3, .L987 @ tmp139, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.123_1, *RandBitflags.123_1 -@ Patches/../C_code.c:2445: { + ldrb r3, [r3, #2] @ *RandBitflags.124_1, *RandBitflags.124_1 +@ Patches/../C_code.c:2450: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:2445: { +@ Patches/../C_code.c:2450: { movs r5, r1 @ noise, tmp190 -@ Patches/../C_code.c:2446: if (!RandBitflags->itemStats) - tst r2, r3 @ tmp145, *RandBitflags.123_1 - beq .L982 @, -@ Patches/../C_code.c:2450: if (number == 255) +@ Patches/../C_code.c:2451: if (!RandBitflags->itemStats) + tst r2, r3 @ tmp145, *RandBitflags.124_1 + beq .L985 @, +@ Patches/../C_code.c:2455: if (number == 255) cmp r0, #255 @ number, - beq .L981 @, -@ Patches/../C_code.c:2374: if (number < 0) + beq .L984 @, +@ Patches/../C_code.c:2379: if (number < 0) mvns r4, r0 @ tmp186, number -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldr r3, .L984+4 @ tmp150, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldr r3, .L987+4 @ tmp150, ldr r3, [r3] @ RandValues, RandValues - ldrh r3, [r3, #2] @ *RandValues.122_18, *RandValues.122_18 - lsls r3, r3, #23 @ tmp155, *RandValues.122_18, + ldrh r3, [r3, #2] @ *RandValues.123_18, *RandValues.123_18 + lsls r3, r3, #23 @ tmp155, *RandValues.123_18, lsrs r3, r3, #27 @ tmp156, tmp155, -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) asrs r4, r4, #31 @ tmp185, tmp186, ands r4, r0 @ _17, number -@ Patches/../C_code.c:2379: variation += variation; +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r3, #2 @ tmp159, tmp156, adds r0, r0, r3 @ tmp160, tmp159, tmp156 -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r1, #3 @, - ldr r3, .L984+8 @ tmp168, -@ Patches/../C_code.c:2379: variation += variation; + ldr r3, .L987+8 @ tmp168, +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r0, #1 @ tmp161, tmp160, -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; bl .L14 @ -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 movs r2, r5 @, noise -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r6, r0 @ tmp169, tmp191 -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r1, r0, #1 @ tmp170, tmp169, movs r3, #0 @, movs r0, r4 @, _17 bl HashByte_Global @ -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 subs r5, r0, r6 @ tmp174, tmp192, tmp169 -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 adds r5, r5, #100 @ percentage, -@ Patches/../C_code.c:2406: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) +@ Patches/../C_code.c:2411: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) movs r1, #100 @, movs r0, r5 @ tmp175, percentage muls r0, r4 @ tmp175, _17 - ldr r6, .L984+12 @ tmp176, - bl .L143 @ -@ Patches/../C_code.c:2407: if (ret > 127) + ldr r6, .L987+12 @ tmp176, + bl .L146 @ +@ Patches/../C_code.c:2412: if (ret > 127) cmp r0, #127 @ ret, - bgt .L983 @, -.L979: -@ Patches/../C_code.c:2409: if (ret < 0) + bgt .L986 @, +.L982: +@ Patches/../C_code.c:2414: if (ret < 0) mvns r3, r0 @ tmp188, ret asrs r3, r3, #31 @ tmp187, tmp188, ands r0, r3 @ ret, tmp187 -@ Patches/../C_code.c:2454: return HashByTwoThirdsPercent(number, noise, 0) + 2; +@ Patches/../C_code.c:2459: return HashByTwoThirdsPercent(number, noise, 0) + 2; adds r0, r0, #2 @ tmp183, -.L982: +.L985: lsls r0, r0, #16 @ , tmp183, asrs r0, r0, #16 @ , , -.L977: -@ Patches/../C_code.c:2455: } +.L980: +@ Patches/../C_code.c:2460: } @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L983: -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +.L986: +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r0, #200 @ tmp177, subs r0, r0, r5 @ tmp178, tmp177, percentage -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r1, #100 @, muls r0, r4 @ tmp179, _17 - bl .L143 @ - b .L979 @ -.L981: -@ Patches/../C_code.c:2452: return number; + bl .L146 @ + b .L982 @ +.L984: +@ Patches/../C_code.c:2457: return number; movs r0, #255 @ , - b .L977 @ -.L985: + b .L980 @ +.L988: .align 2 -.L984: +.L987: .word RandBitflags .word RandValues .word __aeabi_idiv @@ -7341,66 +7372,66 @@ HashHit: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2459: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2464: if (!RandBitflags->itemStats) movs r2, #24 @ tmp135, - ldr r3, .L991 @ tmp129, -@ Patches/../C_code.c:2458: { + ldr r3, .L994 @ tmp129, +@ Patches/../C_code.c:2463: { push {r4, lr} @ -@ Patches/../C_code.c:2459: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2464: if (!RandBitflags->itemStats) ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.124_1, *RandBitflags.124_1 -@ Patches/../C_code.c:2458: { + ldrb r3, [r3, #2] @ *RandBitflags.125_1, *RandBitflags.125_1 +@ Patches/../C_code.c:2463: { movs r4, r1 @ noise, tmp150 sub sp, sp, #8 @,, -@ Patches/../C_code.c:2459: if (!RandBitflags->itemStats) - tst r2, r3 @ tmp135, *RandBitflags.124_1 - bne .L987 @, -@ Patches/../C_code.c:2461: return number; +@ Patches/../C_code.c:2464: if (!RandBitflags->itemStats) + tst r2, r3 @ tmp135, *RandBitflags.125_1 + bne .L990 @, +@ Patches/../C_code.c:2466: return number; lsls r0, r0, #16 @ , number, asrs r0, r0, #16 @ , , -.L988: -@ Patches/../C_code.c:2471: } +.L991: +@ Patches/../C_code.c:2476: } add sp, sp, #8 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L987: -@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, 3); +.L990: +@ Patches/../C_code.c:2431: return HashPercent(number, noise, offset, true, 3); movs r3, #3 @ tmp139, movs r2, #0 @, str r3, [sp] @ tmp139, subs r3, r3, #2 @, bl HashPercent @ -@ Patches/../C_code.c:2464: if (number < 50) +@ Patches/../C_code.c:2469: if (number < 50) cmp r0, #49 @ number, - bgt .L989 @, -@ Patches/../C_code.c:2465: number += number + (noise[0] & 0x1F) + 30; + bgt .L992 @, +@ Patches/../C_code.c:2470: number += number + (noise[0] & 0x1F) + 30; movs r2, #31 @ tmp142, ldr r3, [r4] @ *noise_9(D), *noise_9(D) ands r3, r2 @ tmp143, tmp142 -@ Patches/../C_code.c:2465: number += number + (noise[0] & 0x1F) + 30; +@ Patches/../C_code.c:2470: number += number + (noise[0] & 0x1F) + 30; adds r3, r3, r0 @ tmp145, tmp143, number -@ Patches/../C_code.c:2465: number += number + (noise[0] & 0x1F) + 30; +@ Patches/../C_code.c:2470: number += number + (noise[0] & 0x1F) + 30; adds r3, r3, #30 @ _17, -@ Patches/../C_code.c:2465: number += number + (noise[0] & 0x1F) + 30; +@ Patches/../C_code.c:2470: number += number + (noise[0] & 0x1F) + 30; adds r0, r0, r3 @ number, number, _17 -.L989: -@ Patches/../C_code.c:2466: if (number > MaxWeaponHitrate) - ldr r3, .L991+4 @ tmp147, -@ Patches/../C_code.c:2466: if (number > MaxWeaponHitrate) +.L992: +@ Patches/../C_code.c:2471: if (number > MaxWeaponHitrate) + ldr r3, .L994+4 @ tmp147, +@ Patches/../C_code.c:2471: if (number > MaxWeaponHitrate) ldr r3, [r3] @ MaxWeaponHitrate, MaxWeaponHitrate cmp r3, r0 @ MaxWeaponHitrate, number - ble .L990 @, + ble .L993 @, movs r3, r0 @ MaxWeaponHitrate, number -.L990: -@ Patches/../C_code.c:2470: return number; +.L993: +@ Patches/../C_code.c:2475: return number; lsls r0, r3, #16 @ , MaxWeaponHitrate, asrs r0, r0, #16 @ , , - b .L988 @ -.L992: + b .L991 @ +.L995: .align 2 -.L991: +.L994: .word RandBitflags .word MaxWeaponHitrate .size HashHit, .-HashHit @@ -7416,84 +7447,84 @@ HashCrit: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 movs r2, r1 @ noise, tmp178 -@ Patches/../C_code.c:2474: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2479: if (!RandBitflags->itemStats) movs r1, #24 @ tmp142, - ldr r3, .L1002 @ tmp136, + ldr r3, .L1005 @ tmp136, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.126_1, *RandBitflags.126_1 -@ Patches/../C_code.c:2473: { + ldrb r3, [r3, #2] @ *RandBitflags.127_1, *RandBitflags.127_1 +@ Patches/../C_code.c:2478: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:2474: if (!RandBitflags->itemStats) - tst r1, r3 @ tmp142, *RandBitflags.126_1 - beq .L1000 @, -@ Patches/../C_code.c:2478: if (number == 255) +@ Patches/../C_code.c:2479: if (!RandBitflags->itemStats) + tst r1, r3 @ tmp142, *RandBitflags.127_1 + beq .L1003 @, +@ Patches/../C_code.c:2483: if (number == 255) cmp r0, #255 @ number, - beq .L999 @, -@ Patches/../C_code.c:2374: if (number < 0) + beq .L1002 @, +@ Patches/../C_code.c:2379: if (number < 0) mvns r4, r0 @ tmp174, number -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldr r3, .L1002+4 @ tmp147, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldr r3, .L1005+4 @ tmp147, ldr r3, [r3] @ RandValues, RandValues - ldrh r3, [r3, #2] @ *RandValues.122_15, *RandValues.122_15 - lsls r3, r3, #23 @ tmp152, *RandValues.122_15, + ldrh r3, [r3, #2] @ *RandValues.123_15, *RandValues.123_15 + lsls r3, r3, #23 @ tmp152, *RandValues.123_15, lsrs r3, r3, #27 @ _17, tmp152, -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r5, r3, #2 @ tmp155, _17, -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) asrs r4, r4, #31 @ tmp173, tmp174, -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 adds r5, r5, r3 @ tmp156, tmp155, _17 -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) ands r4, r0 @ _14, number -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r1, r5, #1 @ tmp157, tmp156, movs r3, #0 @, movs r0, r4 @, _14 bl HashByte_Global @ -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 subs r5, r0, r5 @ tmp164, tmp179, tmp156 -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 adds r5, r5, #100 @ percentage, -@ Patches/../C_code.c:2406: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) +@ Patches/../C_code.c:2411: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) movs r1, #100 @, movs r0, r5 @ tmp165, percentage muls r0, r4 @ tmp165, _14 - ldr r6, .L1002+8 @ tmp166, - bl .L143 @ -@ Patches/../C_code.c:2407: if (ret > 127) + ldr r6, .L1005+8 @ tmp166, + bl .L146 @ +@ Patches/../C_code.c:2412: if (ret > 127) cmp r0, #127 @ ret, - bgt .L1001 @, -.L997: -@ Patches/../C_code.c:2409: if (ret < 0) + bgt .L1004 @, +.L1000: +@ Patches/../C_code.c:2414: if (ret < 0) mvns r3, r0 @ tmp176, ret asrs r3, r3, #31 @ tmp175, tmp176, ands r0, r3 @ ret, tmp175 -.L1000: -@ Patches/../C_code.c:2411: return ret; +.L1003: +@ Patches/../C_code.c:2416: return ret; lsls r0, r0, #16 @ , ret, asrs r0, r0, #16 @ , , -.L995: -@ Patches/../C_code.c:2483: } +.L998: +@ Patches/../C_code.c:2488: } @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L1001: -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +.L1004: +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r0, #200 @ tmp167, subs r0, r0, r5 @ tmp168, tmp167, percentage -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r1, #100 @, muls r0, r4 @ tmp169, _14 - bl .L143 @ - b .L997 @ -.L999: -@ Patches/../C_code.c:2480: return number; + bl .L146 @ + b .L1000 @ +.L1002: +@ Patches/../C_code.c:2485: return number; movs r0, #255 @ , - b .L995 @ -.L1003: + b .L998 @ +.L1006: .align 2 -.L1002: +.L1005: .word RandBitflags .word RandValues .word Div1 @@ -7509,88 +7540,88 @@ HashWeight: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2486: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2491: if (!RandBitflags->itemStats) movs r2, #24 @ tmp143, - ldr r3, .L1011 @ tmp137, + ldr r3, .L1014 @ tmp137, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.127_1, *RandBitflags.127_1 -@ Patches/../C_code.c:2485: { + ldrb r3, [r3, #2] @ *RandBitflags.128_1, *RandBitflags.128_1 +@ Patches/../C_code.c:2490: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:2485: { +@ Patches/../C_code.c:2490: { movs r5, r1 @ noise, tmp186 -@ Patches/../C_code.c:2486: if (!RandBitflags->itemStats) - tst r2, r3 @ tmp143, *RandBitflags.127_1 - bne .L1005 @, -.L1010: -@ Patches/../C_code.c:2491: } +@ Patches/../C_code.c:2491: if (!RandBitflags->itemStats) + tst r2, r3 @ tmp143, *RandBitflags.128_1 + bne .L1008 @, +.L1013: +@ Patches/../C_code.c:2496: } @ sp needed @ -@ Patches/../C_code.c:2411: return ret; +@ Patches/../C_code.c:2416: return ret; lsls r0, r0, #16 @ , ret, asrs r0, r0, #16 @ , , -@ Patches/../C_code.c:2491: } +@ Patches/../C_code.c:2496: } pop {r4, r5, r6} pop {r1} bx r1 -.L1005: -@ Patches/../C_code.c:2374: if (number < 0) +.L1008: +@ Patches/../C_code.c:2379: if (number < 0) mvns r4, r0 @ tmp182, number -@ Patches/../C_code.c:2376: int variation = (RandValues->variance) * 5; - ldr r3, .L1011+4 @ tmp148, +@ Patches/../C_code.c:2381: int variation = (RandValues->variance) * 5; + ldr r3, .L1014+4 @ tmp148, ldr r3, [r3] @ RandValues, RandValues - ldrh r3, [r3, #2] @ *RandValues.122_15, *RandValues.122_15 - lsls r3, r3, #23 @ tmp153, *RandValues.122_15, + ldrh r3, [r3, #2] @ *RandValues.123_15, *RandValues.123_15 + lsls r3, r3, #23 @ tmp153, *RandValues.123_15, lsrs r3, r3, #27 @ tmp154, tmp153, -@ Patches/../C_code.c:2374: if (number < 0) +@ Patches/../C_code.c:2379: if (number < 0) asrs r4, r4, #31 @ tmp181, tmp182, ands r4, r0 @ _14, number -@ Patches/../C_code.c:2379: variation += variation; +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r3, #2 @ tmp157, tmp154, adds r0, r0, r3 @ tmp158, tmp157, tmp154 -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r1, #3 @, - ldr r3, .L1011+8 @ tmp166, -@ Patches/../C_code.c:2379: variation += variation; + ldr r3, .L1014+8 @ tmp166, +@ Patches/../C_code.c:2384: variation += variation; lsls r0, r0, #1 @ tmp159, tmp158, -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; bl .L14 @ -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 movs r2, r5 @, noise -@ Patches/../C_code.c:2380: variation = variation / 3; +@ Patches/../C_code.c:2385: variation = variation / 3; movs r6, r0 @ tmp167, tmp187 -@ Patches/../C_code.c:2385: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 +@ Patches/../C_code.c:2390: percentage = HashByte_Global(number, variation * 2, noise, offset); // rn up to 150 e.g. 125 lsls r1, r0, #1 @ tmp168, tmp167, movs r3, #0 @, movs r0, r4 @, _14 bl HashByte_Global @ -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 subs r5, r0, r6 @ tmp172, tmp188, tmp167 -@ Patches/../C_code.c:2391: percentage += (100 - variation); // 125 + 25 = 150 +@ Patches/../C_code.c:2396: percentage += (100 - variation); // 125 + 25 = 150 adds r5, r5, #100 @ percentage, -@ Patches/../C_code.c:2406: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) +@ Patches/../C_code.c:2411: int ret = Div1((percentage * number), 100); // 1.5 * 120 (we want to negate this) movs r1, #100 @, movs r0, r5 @ tmp173, percentage muls r0, r4 @ tmp173, _14 - ldr r6, .L1011+12 @ tmp174, - bl .L143 @ -@ Patches/../C_code.c:2407: if (ret > 127) + ldr r6, .L1014+12 @ tmp174, + bl .L146 @ +@ Patches/../C_code.c:2412: if (ret > 127) cmp r0, #127 @ ret, - ble .L1008 @, -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); + ble .L1011 @, +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r0, #200 @ tmp175, subs r0, r0, r5 @ tmp176, tmp175, percentage -@ Patches/../C_code.c:2408: ret = Div1((200 - percentage) * number, 100); +@ Patches/../C_code.c:2413: ret = Div1((200 - percentage) * number, 100); movs r1, #100 @, muls r0, r4 @ tmp177, _14 - bl .L143 @ -.L1008: -@ Patches/../C_code.c:2409: if (ret < 0) + bl .L146 @ +.L1011: +@ Patches/../C_code.c:2414: if (ret < 0) mvns r3, r0 @ tmp184, ret asrs r3, r3, #31 @ tmp183, tmp184, ands r0, r3 @ ret, tmp183 - b .L1010 @ -.L1012: + b .L1013 @ +.L1015: .align 2 -.L1011: +.L1014: .word RandBitflags .word RandValues .word __aeabi_idiv @@ -7608,61 +7639,61 @@ GetItemMight: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:2527: item &= 0xFF; +@ Patches/../C_code.c:2532: item &= 0xFF; movs r4, #255 @ tmp126, -@ Patches/../C_code.c:2526: { +@ Patches/../C_code.c:2531: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:2528: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2533: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:2527: item &= 0xFF; +@ Patches/../C_code.c:2532: item &= 0xFF; ands r4, r0 @ item, tmp153 -@ Patches/../C_code.c:2528: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2533: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1021 @ tmp130, + ldr r3, .L1024 @ tmp130, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:2530: int might = GetItemData(item & 0xFF)->might; - ldr r3, .L1021+4 @ tmp134, +@ Patches/../C_code.c:2535: int might = GetItemData(item & 0xFF)->might; + ldr r3, .L1024+4 @ tmp134, movs r0, r4 @, item -@ Patches/../C_code.c:2529: noise[0] = item; +@ Patches/../C_code.c:2534: noise[0] = item; str r4, [sp, #8] @ item, noise[0] -@ Patches/../C_code.c:2530: int might = GetItemData(item & 0xFF)->might; +@ Patches/../C_code.c:2535: int might = GetItemData(item & 0xFF)->might; bl .L14 @ -@ Patches/../C_code.c:2446: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2451: if (!RandBitflags->itemStats) movs r2, #24 @ tmp142, - ldr r3, .L1021+8 @ tmp136, + ldr r3, .L1024+8 @ tmp136, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.123_14, *RandBitflags.123_14 -@ Patches/../C_code.c:2530: int might = GetItemData(item & 0xFF)->might; + ldrb r3, [r3, #2] @ *RandBitflags.124_14, *RandBitflags.124_14 +@ Patches/../C_code.c:2535: int might = GetItemData(item & 0xFF)->might; ldrb r0, [r0, #21] @ , -@ Patches/../C_code.c:2446: if (!RandBitflags->itemStats) - tst r2, r3 @ tmp142, *RandBitflags.123_14 - beq .L1013 @, -@ Patches/../C_code.c:2450: if (number == 255) +@ Patches/../C_code.c:2451: if (!RandBitflags->itemStats) + tst r2, r3 @ tmp142, *RandBitflags.124_14 + beq .L1016 @, +@ Patches/../C_code.c:2455: if (number == 255) cmp r0, #255 @ , - beq .L1013 @, -@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, 3); + beq .L1016 @, +@ Patches/../C_code.c:2431: return HashPercent(number, noise, offset, true, 3); movs r3, #3 @ tmp147, movs r2, #0 @, str r3, [sp] @ tmp147, add r1, sp, #8 @,, subs r3, r3, #2 @, bl HashPercent @ -@ Patches/../C_code.c:2454: return HashByTwoThirdsPercent(number, noise, 0) + 2; +@ Patches/../C_code.c:2459: return HashByTwoThirdsPercent(number, noise, 0) + 2; adds r0, r0, #2 @ tmp151, -@ Patches/../C_code.c:2531: return HashMight(might, noise); +@ Patches/../C_code.c:2536: return HashMight(might, noise); lsls r0, r0, #16 @ , tmp151, asrs r0, r0, #16 @ , , -.L1013: -@ Patches/../C_code.c:2532: } +.L1016: +@ Patches/../C_code.c:2537: } add sp, sp, #24 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L1022: +.L1025: .align 2 -.L1021: +.L1024: .word memset .word GetItemData .word RandBitflags @@ -7679,41 +7710,41 @@ GetItemHit: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:2536: item &= 0xFF; +@ Patches/../C_code.c:2541: item &= 0xFF; movs r4, #255 @ tmp121, -@ Patches/../C_code.c:2535: { +@ Patches/../C_code.c:2540: { sub sp, sp, #16 @,, -@ Patches/../C_code.c:2537: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2542: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:2536: item &= 0xFF; +@ Patches/../C_code.c:2541: item &= 0xFF; ands r4, r0 @ item, tmp135 -@ Patches/../C_code.c:2537: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2542: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1024 @ tmp125, + ldr r3, .L1027 @ tmp125, add r0, sp, #4 @,, bl .L14 @ -@ Patches/../C_code.c:2539: int hit = GetItemData(item & 0xFF)->hit; - ldr r3, .L1024+4 @ tmp129, +@ Patches/../C_code.c:2544: int hit = GetItemData(item & 0xFF)->hit; + ldr r3, .L1027+4 @ tmp129, movs r0, r4 @, item -@ Patches/../C_code.c:2538: noise[0] = item; +@ Patches/../C_code.c:2543: noise[0] = item; str r4, [sp] @ item, noise[0] -@ Patches/../C_code.c:2539: int hit = GetItemData(item & 0xFF)->hit; +@ Patches/../C_code.c:2544: int hit = GetItemData(item & 0xFF)->hit; bl .L14 @ -@ Patches/../C_code.c:2540: return HashHit(hit, noise); +@ Patches/../C_code.c:2545: return HashHit(hit, noise); mov r1, sp @, -@ Patches/../C_code.c:2539: int hit = GetItemData(item & 0xFF)->hit; +@ Patches/../C_code.c:2544: int hit = GetItemData(item & 0xFF)->hit; ldrb r0, [r0, #22] @ hit, -@ Patches/../C_code.c:2540: return HashHit(hit, noise); +@ Patches/../C_code.c:2545: return HashHit(hit, noise); bl HashHit @ -@ Patches/../C_code.c:2541: } +@ Patches/../C_code.c:2546: } add sp, sp, #16 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L1025: +.L1028: .align 2 -.L1024: +.L1027: .word memset .word GetItemData .size GetItemHit, .-GetItemHit @@ -7729,56 +7760,56 @@ GetItemCrit: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:2545: item &= 0xFF; +@ Patches/../C_code.c:2550: item &= 0xFF; movs r4, #255 @ tmp123, -@ Patches/../C_code.c:2544: { +@ Patches/../C_code.c:2549: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:2546: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2551: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:2545: item &= 0xFF; +@ Patches/../C_code.c:2550: item &= 0xFF; ands r4, r0 @ item, tmp148 -@ Patches/../C_code.c:2546: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2551: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1034 @ tmp127, + ldr r3, .L1037 @ tmp127, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:2548: int crit = GetItemData(item & 0xFF)->crit; - ldr r3, .L1034+4 @ tmp131, +@ Patches/../C_code.c:2553: int crit = GetItemData(item & 0xFF)->crit; + ldr r3, .L1037+4 @ tmp131, movs r0, r4 @, item -@ Patches/../C_code.c:2547: noise[0] = item; +@ Patches/../C_code.c:2552: noise[0] = item; str r4, [sp, #8] @ item, noise[0] -@ Patches/../C_code.c:2548: int crit = GetItemData(item & 0xFF)->crit; +@ Patches/../C_code.c:2553: int crit = GetItemData(item & 0xFF)->crit; bl .L14 @ -@ Patches/../C_code.c:2474: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2479: if (!RandBitflags->itemStats) movs r2, #24 @ tmp139, - ldr r3, .L1034+8 @ tmp133, + ldr r3, .L1037+8 @ tmp133, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.126_14, *RandBitflags.126_14 -@ Patches/../C_code.c:2548: int crit = GetItemData(item & 0xFF)->crit; + ldrb r3, [r3, #2] @ *RandBitflags.127_14, *RandBitflags.127_14 +@ Patches/../C_code.c:2553: int crit = GetItemData(item & 0xFF)->crit; ldrb r0, [r0, #24] @ , -@ Patches/../C_code.c:2474: if (!RandBitflags->itemStats) - tst r2, r3 @ tmp139, *RandBitflags.126_14 - beq .L1026 @, -@ Patches/../C_code.c:2478: if (number == 255) +@ Patches/../C_code.c:2479: if (!RandBitflags->itemStats) + tst r2, r3 @ tmp139, *RandBitflags.127_14 + beq .L1029 @, +@ Patches/../C_code.c:2483: if (number == 255) cmp r0, #255 @ , - beq .L1026 @, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); + beq .L1029 @, +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp144, movs r2, #0 @, str r3, [sp] @ tmp144, add r1, sp, #8 @,, adds r3, r3, #1 @, bl HashPercent @ -.L1026: -@ Patches/../C_code.c:2550: } +.L1029: +@ Patches/../C_code.c:2555: } add sp, sp, #24 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L1035: +.L1038: .align 2 -.L1034: +.L1037: .word memset .word GetItemData .word RandBitflags @@ -7795,53 +7826,53 @@ GetItemWeight: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:2554: item &= 0xFF; +@ Patches/../C_code.c:2559: item &= 0xFF; movs r4, #255 @ tmp123, -@ Patches/../C_code.c:2553: { +@ Patches/../C_code.c:2558: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:2555: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2560: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:2554: item &= 0xFF; +@ Patches/../C_code.c:2559: item &= 0xFF; ands r4, r0 @ item, tmp148 -@ Patches/../C_code.c:2555: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:2560: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1041 @ tmp127, + ldr r3, .L1044 @ tmp127, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:2557: int weight = GetItemData(item & 0xFF)->weight; - ldr r3, .L1041+4 @ tmp131, +@ Patches/../C_code.c:2562: int weight = GetItemData(item & 0xFF)->weight; + ldr r3, .L1044+4 @ tmp131, movs r0, r4 @, item -@ Patches/../C_code.c:2556: noise[0] = item; +@ Patches/../C_code.c:2561: noise[0] = item; str r4, [sp, #8] @ item, noise[0] -@ Patches/../C_code.c:2557: int weight = GetItemData(item & 0xFF)->weight; +@ Patches/../C_code.c:2562: int weight = GetItemData(item & 0xFF)->weight; bl .L14 @ -@ Patches/../C_code.c:2486: if (!RandBitflags->itemStats) +@ Patches/../C_code.c:2491: if (!RandBitflags->itemStats) movs r2, #24 @ tmp139, - ldr r3, .L1041+8 @ tmp133, + ldr r3, .L1044+8 @ tmp133, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #2] @ *RandBitflags.127_14, *RandBitflags.127_14 -@ Patches/../C_code.c:2557: int weight = GetItemData(item & 0xFF)->weight; + ldrb r3, [r3, #2] @ *RandBitflags.128_14, *RandBitflags.128_14 +@ Patches/../C_code.c:2562: int weight = GetItemData(item & 0xFF)->weight; ldrb r0, [r0, #23] @ , -@ Patches/../C_code.c:2486: if (!RandBitflags->itemStats) - tst r2, r3 @ tmp139, *RandBitflags.127_14 - beq .L1036 @, -@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, 3); +@ Patches/../C_code.c:2491: if (!RandBitflags->itemStats) + tst r2, r3 @ tmp139, *RandBitflags.128_14 + beq .L1039 @, +@ Patches/../C_code.c:2431: return HashPercent(number, noise, offset, true, 3); movs r3, #3 @ tmp144, movs r2, #0 @, str r3, [sp] @ tmp144, add r1, sp, #8 @,, subs r3, r3, #2 @, bl HashPercent @ -.L1036: -@ Patches/../C_code.c:2559: } +.L1039: +@ Patches/../C_code.c:2564: } add sp, sp, #24 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L1042: +.L1045: .align 2 -.L1041: +.L1044: .word memset .word GetItemData .word RandBitflags @@ -7862,128 +7893,128 @@ BuildAvailableClassList: mov r6, r9 @, mov r5, r8 @, mov lr, fp @, -@ Patches/../C_code.c:2567: list[0] = 0; // count +@ Patches/../C_code.c:2572: list[0] = 0; // count movs r3, #0 @ tmp164, -@ Patches/../C_code.c:2565: { +@ Patches/../C_code.c:2570: { push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:2567: list[0] = 0; // count +@ Patches/../C_code.c:2572: list[0] = 0; // count strb r3, [r0] @ tmp164, *list_36(D) -@ Patches/../C_code.c:2580: const struct ClassData * table = GetClassData(i); - ldr r3, .L1075 @ tmp238, +@ Patches/../C_code.c:2585: const struct ClassData * table = GetClassData(i); + ldr r3, .L1078 @ tmp238, mov r9, r3 @ tmp238, tmp238 -@ Patches/../C_code.c:2632: if (IncludeMonstersWithoutWEXP) - ldr r3, .L1075+4 @ tmp240, -@ Patches/../C_code.c:2565: { +@ Patches/../C_code.c:2637: if (IncludeMonstersWithoutWEXP) + ldr r3, .L1078+4 @ tmp240, +@ Patches/../C_code.c:2570: { sub sp, sp, #12 @,, -@ Patches/../C_code.c:2578: for (int i = 1; i <= GetMaxClasses(); i++) +@ Patches/../C_code.c:2583: for (int i = 1; i <= GetMaxClasses(); i++) movs r4, #1 @ i, -@ Patches/../C_code.c:2565: { +@ Patches/../C_code.c:2570: { mov r8, r0 @ list, tmp241 mov r10, r1 @ promotedBitflag, tmp242 -@ Patches/../C_code.c:2577: int curSMS = 0; +@ Patches/../C_code.c:2582: int curSMS = 0; movs r7, #0 @ curSMS, -@ Patches/../C_code.c:2575: int curName = 0; +@ Patches/../C_code.c:2580: int curName = 0; movs r6, #0 @ curName, -@ Patches/../C_code.c:2632: if (IncludeMonstersWithoutWEXP) +@ Patches/../C_code.c:2637: if (IncludeMonstersWithoutWEXP) mov fp, r3 @ tmp240, tmp240 -@ Patches/../C_code.c:2565: { +@ Patches/../C_code.c:2570: { str r2, [sp, #4] @ tmp243, %sfp - ldr r5, .L1075+8 @ ivtmp.1231, -@ Patches/../C_code.c:2578: for (int i = 1; i <= GetMaxClasses(); i++) + ldr r5, .L1078+8 @ ivtmp.1236, +@ Patches/../C_code.c:2583: for (int i = 1; i <= GetMaxClasses(); i++) bl GetMaxClasses @ -@ Patches/../C_code.c:2578: for (int i = 1; i <= GetMaxClasses(); i++) +@ Patches/../C_code.c:2583: for (int i = 1; i <= GetMaxClasses(); i++) cmp r0, r4 @ tmp245, i - blt .L1072 @, -.L1054: -@ Patches/../C_code.c:2580: const struct ClassData * table = GetClassData(i); + blt .L1075 @, +.L1057: +@ Patches/../C_code.c:2585: const struct ClassData * table = GetClassData(i); movs r0, r4 @, i - bl .L397 @ -@ Patches/../C_code.c:2582: curName = table->nameTextId; + bl .L400 @ +@ Patches/../C_code.c:2587: curName = table->nameTextId; ldrh r3, [r0] @ curName, *table_47 -@ Patches/../C_code.c:2584: curSMS = table->SMSId; +@ Patches/../C_code.c:2589: curSMS = table->SMSId; ldrb r1, [r0, #6] @ curSMS, -@ Patches/../C_code.c:2585: if (curName) +@ Patches/../C_code.c:2590: if (curName) cmp r3, #0 @ curName, - beq .L1046 @, -@ Patches/../C_code.c:2587: if ((curName == prevName) && (curSMS == prevSMS)) + beq .L1049 @, +@ Patches/../C_code.c:2592: if ((curName == prevName) && (curSMS == prevSMS)) cmp r6, r3 @ curName, curName - bne .L1055 @, + bne .L1058 @, cmp r7, r1 @ curSMS, curSMS - beq .L1046 @, -.L1055: -@ Patches/../C_code.c:2596: if (IsClassInvalid(i)) + beq .L1049 @, +.L1058: +@ Patches/../C_code.c:2601: if (IsClassInvalid(i)) ldrb r2, [r5] @ MEM[(unsigned char *)_83], MEM[(unsigned char *)_83] cmp r2, #0 @ MEM[(unsigned char *)_83], - bne .L1046 @, -@ Patches/../C_code.c:2602: if (!promotedBitflag) + bne .L1049 @, +@ Patches/../C_code.c:2607: if (!promotedBitflag) mov r7, r10 @ promotedBitflag, promotedBitflag -@ Patches/../C_code.c:2601: attr = table->attributes; +@ Patches/../C_code.c:2606: attr = table->attributes; ldr r6, [r0, #40] @ _6, table_47->attributes adds r2, r2, #1 @ _91, adds r2, r2, #255 @ _91, ands r2, r6 @ _91, _6 -@ Patches/../C_code.c:2602: if (!promotedBitflag) +@ Patches/../C_code.c:2607: if (!promotedBitflag) cmp r7, #0 @ promotedBitflag, - bne .L1049 @, -@ Patches/../C_code.c:2604: if (attr & CA_PROMOTED) + bne .L1052 @, +@ Patches/../C_code.c:2609: if (attr & CA_PROMOTED) cmp r2, #0 @ _91, - bne .L1046 @, -.L1050: -@ Patches/../C_code.c:2614: if (!allegiance) + bne .L1049 @, +.L1053: +@ Patches/../C_code.c:2619: if (!allegiance) ldr r2, [sp, #4] @ allegiance, %sfp cmp r2, #0 @ allegiance, - bne .L1051 @, -@ Patches/../C_code.c:2616: if (attrExceptions & attr) + bne .L1054 @, +@ Patches/../C_code.c:2621: if (attrExceptions & attr) adds r2, r2, #48 @ tmp181, tst r2, r6 @ tmp181, _6 - bne .L1073 @, -.L1051: -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; + bne .L1076 @, +.L1054: +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; movs r2, #44 @ tmp189, movs r7, #45 @ tmp190, ldrb r2, [r0, r2] @ tmp192, ldrb r7, [r0, r7] @ tmp194, orrs r2, r7 @ tmp195, tmp194 -@ Patches/../C_code.c:2625: wexp |= table->baseRanks[2]; +@ Patches/../C_code.c:2630: wexp |= table->baseRanks[2]; movs r7, #46 @ tmp196, -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; ldrb r7, [r0, r7] @ tmp199, orrs r2, r7 @ tmp200, tmp199 -@ Patches/../C_code.c:2626: wexp |= table->baseRanks[3]; +@ Patches/../C_code.c:2631: wexp |= table->baseRanks[3]; movs r7, #47 @ tmp201, -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; ldrb r7, [r0, r7] @ tmp204, orrs r2, r7 @ tmp205, tmp204 -@ Patches/../C_code.c:2627: wexp |= table->baseRanks[4]; +@ Patches/../C_code.c:2632: wexp |= table->baseRanks[4]; movs r7, #48 @ tmp206, -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; ldrb r7, [r0, r7] @ tmp209, orrs r2, r7 @ tmp210, tmp209 -@ Patches/../C_code.c:2628: wexp |= table->baseRanks[5]; +@ Patches/../C_code.c:2633: wexp |= table->baseRanks[5]; movs r7, #49 @ tmp211, -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; ldrb r7, [r0, r7] @ tmp214, orrs r2, r7 @ tmp215, tmp214 -@ Patches/../C_code.c:2629: wexp |= table->baseRanks[6]; +@ Patches/../C_code.c:2634: wexp |= table->baseRanks[6]; movs r7, #50 @ tmp216, -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; ldrb r7, [r0, r7] @ tmp219, orrs r2, r7 @ tmp220, tmp219 -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; movs r7, #51 @ tmp221, -@ Patches/../C_code.c:2630: wexp |= table->baseRanks[7]; +@ Patches/../C_code.c:2635: wexp |= table->baseRanks[7]; ldrb r0, [r0, r7] @ tmp224, orrs r2, r0 @ wexp, tmp224 -@ Patches/../C_code.c:2632: if (IncludeMonstersWithoutWEXP) +@ Patches/../C_code.c:2637: if (IncludeMonstersWithoutWEXP) mov r0, fp @ tmp240, tmp240 ldr r0, [r0] @ IncludeMonstersWithoutWEXP, IncludeMonstersWithoutWEXP cmp r0, #0 @ IncludeMonstersWithoutWEXP, - beq .L1052 @, -@ Patches/../C_code.c:2634: if ((!wexp) && (!(attr & CA_LOCK_3))) + beq .L1055 @, +@ Patches/../C_code.c:2639: if ((!wexp) && (!(attr & CA_LOCK_3))) cmp r2, #0 @ wexp, - beq .L1074 @, -.L1053: -@ Patches/../C_code.c:2644: list[0]++; + beq .L1077 @, +.L1056: +@ Patches/../C_code.c:2649: list[0]++; mov r2, r8 @ list, list mov r0, r8 @ list, list ldrb r2, [r2] @ *list_36(D), *list_36(D) @@ -7991,23 +8022,23 @@ BuildAvailableClassList: lsls r2, r2, #24 @ tmp234, tmp233, lsrs r2, r2, #24 @ _24, tmp234, strb r2, [r0] @ _24, *list_36(D) -@ Patches/../C_code.c:2645: list[list[0]] = i; +@ Patches/../C_code.c:2650: list[list[0]] = i; strb r4, [r0, r2] @ i, *_26 -.L1046: -@ Patches/../C_code.c:2578: for (int i = 1; i <= GetMaxClasses(); i++) +.L1049: +@ Patches/../C_code.c:2583: for (int i = 1; i <= GetMaxClasses(); i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:2584: curSMS = table->SMSId; +@ Patches/../C_code.c:2589: curSMS = table->SMSId; movs r7, r1 @ curSMS, curSMS -@ Patches/../C_code.c:2582: curName = table->nameTextId; +@ Patches/../C_code.c:2587: curName = table->nameTextId; movs r6, r3 @ curName, curName - adds r5, r5, #2 @ ivtmp.1231, -@ Patches/../C_code.c:2578: for (int i = 1; i <= GetMaxClasses(); i++) + adds r5, r5, #2 @ ivtmp.1236, +@ Patches/../C_code.c:2583: for (int i = 1; i <= GetMaxClasses(); i++) bl GetMaxClasses @ -@ Patches/../C_code.c:2578: for (int i = 1; i <= GetMaxClasses(); i++) +@ Patches/../C_code.c:2583: for (int i = 1; i <= GetMaxClasses(); i++) cmp r0, r4 @ tmp245, i - bge .L1054 @, -.L1072: -@ Patches/../C_code.c:2648: } + bge .L1057 @, +.L1075: +@ Patches/../C_code.c:2653: } mov r0, r8 @, list add sp, sp, #12 @,, @ sp needed @ @@ -8019,23 +8050,23 @@ BuildAvailableClassList: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1049: -@ Patches/../C_code.c:2609: else if (!(attr & CA_PROMOTED)) - cmp r2, #0 @ _91, - bne .L1050 @, - b .L1046 @ .L1052: -@ Patches/../C_code.c:2639: else if (!wexp) - cmp r2, #0 @ wexp, +@ Patches/../C_code.c:2614: else if (!(attr & CA_PROMOTED)) + cmp r2, #0 @ _91, bne .L1053 @, - b .L1046 @ -.L1074: -@ Patches/../C_code.c:2634: if ((!wexp) && (!(attr & CA_LOCK_3))) + b .L1049 @ +.L1055: +@ Patches/../C_code.c:2644: else if (!wexp) + cmp r2, #0 @ wexp, + bne .L1056 @, + b .L1049 @ +.L1077: +@ Patches/../C_code.c:2639: if ((!wexp) && (!(attr & CA_LOCK_3))) lsls r6, r6, #13 @ tmp247, _6, - bmi .L1053 @, - b .L1046 @ -.L1073: -@ Patches/../C_code.c:2618: list[0]++; + bmi .L1056 @, + b .L1049 @ +.L1076: +@ Patches/../C_code.c:2623: list[0]++; mov r2, r8 @ list, list mov r7, r8 @ list, list ldrb r2, [r2] @ *list_36(D), *list_36(D) @@ -8043,12 +8074,12 @@ BuildAvailableClassList: lsls r2, r2, #24 @ tmp186, tmp185, lsrs r2, r2, #24 @ _9, tmp186, strb r2, [r7] @ _9, *list_36(D) -@ Patches/../C_code.c:2619: list[list[0]] = i; +@ Patches/../C_code.c:2624: list[list[0]] = i; strb r4, [r7, r2] @ i, *_11 - b .L1051 @ -.L1076: + b .L1054 @ +.L1079: .align 2 -.L1075: +.L1078: .word GetClassData .word IncludeMonstersWithoutWEXP .word ClassExceptions+3 @@ -8067,115 +8098,115 @@ RandClass: push {r4, r5, r6, r7, lr} @ movs r4, r0 @ id, tmp171 sub sp, sp, #260 @,, -@ Patches/../C_code.c:2653: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:2658: if (!ShouldRandomizeClass(unit)) movs r0, r2 @, unit -@ Patches/../C_code.c:2652: { +@ Patches/../C_code.c:2657: { movs r6, r1 @ noise, tmp172 movs r5, r2 @ unit, tmp173 -@ Patches/../C_code.c:2653: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:2658: if (!ShouldRandomizeClass(unit)) bl ShouldRandomizeClass @ -@ Patches/../C_code.c:2653: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:2658: if (!ShouldRandomizeClass(unit)) cmp r0, #0 @ tmp174, - beq .L1078 @, -@ Patches/../C_code.c:2657: if (ClassExceptions[id].NeverChangeFrom) - ldr r3, .L1091 @ tmp142, + beq .L1081 @, +@ Patches/../C_code.c:2662: if (ClassExceptions[id].NeverChangeFrom) + ldr r3, .L1094 @ tmp142, lsls r2, r4, #1 @ tmp143, id, -@ Patches/../C_code.c:2657: if (ClassExceptions[id].NeverChangeFrom) +@ Patches/../C_code.c:2662: if (ClassExceptions[id].NeverChangeFrom) ldrb r3, [r2, r3] @ tmp144, ClassExceptions cmp r3, #0 @ tmp144, - beq .L1089 @, -.L1078: -@ Patches/../C_code.c:2678: } + beq .L1092 @, +.L1081: +@ Patches/../C_code.c:2683: } movs r0, r4 @, id add sp, sp, #260 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1089: -@ Patches/../C_code.c:2664: list[0] = 99; +.L1092: +@ Patches/../C_code.c:2669: list[0] = 99; mov r2, sp @ tmp180, -@ Patches/../C_code.c:2661: int allegiance = (unit->index) >> 6; +@ Patches/../C_code.c:2666: int allegiance = (unit->index) >> 6; movs r7, #11 @ tmp145, -@ Patches/../C_code.c:2664: list[0] = 99; +@ Patches/../C_code.c:2669: list[0] = 99; adds r3, r3, #99 @ tmp150, -@ Patches/../C_code.c:2661: int allegiance = (unit->index) >> 6; +@ Patches/../C_code.c:2666: int allegiance = (unit->index) >> 6; ldrsb r7, [r5, r7] @ tmp145, -@ Patches/../C_code.c:2664: list[0] = 99; +@ Patches/../C_code.c:2669: list[0] = 99; strb r3, [r2] @ tmp150, list[0] -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ldr r3, [r5] @ unit_19(D)->pCharacterData, unit_19(D)->pCharacterData -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; movs r0, r4 @, id -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ldr r5, [r3, #40] @ _6, _5->attributes -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; - ldr r3, .L1091+4 @ tmp153, +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; + ldr r3, .L1094+4 @ tmp153, bl .L14 @ -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; movs r3, #128 @ tmp157, -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ldr r1, [r0, #40] @ _7->attributes, _7->attributes -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; lsls r3, r3, #1 @ tmp157, tmp157, -@ Patches/../C_code.c:2661: int allegiance = (unit->index) >> 6; +@ Patches/../C_code.c:2666: int allegiance = (unit->index) >> 6; asrs r7, r7, #6 @ allegiance, tmp145, -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; orrs r1, r5 @ tmp154, _6 -@ Patches/../C_code.c:2665: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2670: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ands r1, r3 @ promotedBitflag, tmp157 -@ Patches/../C_code.c:2667: BuildAvailableClassList(list, promotedBitflag, allegiance); +@ Patches/../C_code.c:2672: BuildAvailableClassList(list, promotedBitflag, allegiance); movs r2, r7 @, allegiance mov r0, sp @, bl BuildAvailableClassList @ -@ Patches/../C_code.c:2668: id = HashByte_Ch(id, list[0] + 1, noise, 0); +@ Patches/../C_code.c:2673: id = HashByte_Ch(id, list[0] + 1, noise, 0); mov r3, sp @ tmp181, movs r0, r6 @ _52, noise ldrb r1, [r3] @ list, list - movs r3, r6 @ ivtmp.1243, noise -@ Patches/../C_code.c:2668: id = HashByte_Ch(id, list[0] + 1, noise, 0); + movs r3, r6 @ ivtmp.1248, noise +@ Patches/../C_code.c:2673: id = HashByte_Ch(id, list[0] + 1, noise, 0); adds r1, r1, #1 @ _12, adds r0, r0, #16 @ _52, -.L1081: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L1084: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_35], MEM[(int *)_35] cmp r2, #0 @ MEM[(int *)_35], - beq .L1090 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1243, - cmp r0, r3 @ _52, ivtmp.1243 - bne .L1081 @, -.L1080: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L1093 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1248, + cmp r0, r3 @ _52, ivtmp.1248 + bne .L1084 @, +.L1083: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r3, #0 @, movs r2, r6 @, noise movs r0, r4 @, id bl HashByte_Global @ -@ Patches/../C_code.c:2669: if (!id) +@ Patches/../C_code.c:2674: if (!id) cmp r0, #0 @ id, - bne .L1082 @, -@ Patches/../C_code.c:2671: id = 1; + bne .L1085 @, +@ Patches/../C_code.c:2676: id = 1; adds r0, r0, #1 @ id, -.L1082: -@ Patches/../C_code.c:2673: if (!list[id]) +.L1085: +@ Patches/../C_code.c:2678: if (!list[id]) mov r3, sp @ tmp183, ldrb r4, [r3, r0] @ _14, list -@ Patches/../C_code.c:2673: if (!list[id]) +@ Patches/../C_code.c:2678: if (!list[id]) cmp r4, #0 @ _14, - bne .L1078 @, -@ Patches/../C_code.c:2675: return 1; + bne .L1081 @, +@ Patches/../C_code.c:2680: return 1; adds r4, r4, #1 @ id, - b .L1078 @ -.L1090: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L1091+8 @ tmp163, + b .L1081 @ +.L1093: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L1094+8 @ tmp163, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_35 -@ Patches/../C_code.c:2366: break; - b .L1080 @ -.L1092: +@ Patches/../C_code.c:2371: break; + b .L1083 @ +.L1095: .align 2 -.L1091: +.L1094: .word ClassExceptions .word GetClassData .word gCh @@ -8194,98 +8225,98 @@ RandClass2: push {r4, r5, r6, r7, lr} @ movs r4, r0 @ id, tmp170 sub sp, sp, #260 @,, -@ Patches/../C_code.c:2683: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:2688: if (!ShouldRandomizeClass(unit)) movs r0, r2 @, unit -@ Patches/../C_code.c:2681: { +@ Patches/../C_code.c:2686: { movs r6, r1 @ noise, tmp171 movs r5, r2 @ unit, tmp172 -@ Patches/../C_code.c:2683: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:2688: if (!ShouldRandomizeClass(unit)) bl ShouldRandomizeClass @ -@ Patches/../C_code.c:2683: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:2688: if (!ShouldRandomizeClass(unit)) cmp r0, #0 @ tmp173, - beq .L1094 @, -@ Patches/../C_code.c:2687: if (ClassExceptions[id].NeverChangeFrom) - ldr r3, .L1103 @ tmp137, + beq .L1097 @, +@ Patches/../C_code.c:2692: if (ClassExceptions[id].NeverChangeFrom) + ldr r3, .L1106 @ tmp137, lsls r2, r4, #1 @ tmp138, id, -@ Patches/../C_code.c:2687: if (ClassExceptions[id].NeverChangeFrom) +@ Patches/../C_code.c:2692: if (ClassExceptions[id].NeverChangeFrom) ldrb r3, [r2, r3] @ tmp139, ClassExceptions cmp r3, #0 @ tmp139, - beq .L1101 @, -.L1094: -@ Patches/../C_code.c:2708: } + beq .L1104 @, +.L1097: +@ Patches/../C_code.c:2713: } movs r0, r4 @, id add sp, sp, #260 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1101: -@ Patches/../C_code.c:2694: list[0] = 99; +.L1104: +@ Patches/../C_code.c:2699: list[0] = 99; mov r2, sp @ tmp179, -@ Patches/../C_code.c:2691: int allegiance = (unit->index) >> 6; +@ Patches/../C_code.c:2696: int allegiance = (unit->index) >> 6; movs r7, #11 @ tmp140, -@ Patches/../C_code.c:2694: list[0] = 99; +@ Patches/../C_code.c:2699: list[0] = 99; adds r3, r3, #99 @ tmp145, -@ Patches/../C_code.c:2691: int allegiance = (unit->index) >> 6; +@ Patches/../C_code.c:2696: int allegiance = (unit->index) >> 6; ldrsb r7, [r5, r7] @ tmp140, -@ Patches/../C_code.c:2694: list[0] = 99; +@ Patches/../C_code.c:2699: list[0] = 99; strb r3, [r2] @ tmp145, list[0] -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ldr r3, [r5] @ unit_7(D)->pCharacterData, unit_7(D)->pCharacterData -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; movs r0, r4 @, id -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ldr r5, [r3, #40] @ _15, _14->attributes -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; - ldr r3, .L1103+4 @ tmp148, +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; + ldr r3, .L1106+4 @ tmp148, bl .L14 @ -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; movs r3, #128 @ tmp152, -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ldr r1, [r0, #40] @ _16->attributes, _16->attributes -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; lsls r3, r3, #1 @ tmp152, tmp152, -@ Patches/../C_code.c:2691: int allegiance = (unit->index) >> 6; +@ Patches/../C_code.c:2696: int allegiance = (unit->index) >> 6; asrs r7, r7, #6 @ allegiance, tmp140, -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; orrs r1, r5 @ tmp149, _15 -@ Patches/../C_code.c:2695: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; +@ Patches/../C_code.c:2700: int promotedBitflag = (unit->pCharacterData->attributes | GetClassData(id)->attributes) & CA_PROMOTED; ands r1, r3 @ promotedBitflag, tmp152 -@ Patches/../C_code.c:2697: BuildAvailableClassList(list, promotedBitflag, allegiance); +@ Patches/../C_code.c:2702: BuildAvailableClassList(list, promotedBitflag, allegiance); movs r2, r7 @, allegiance mov r0, sp @, bl BuildAvailableClassList @ -@ Patches/../C_code.c:2698: id = HashByte_Class(id, list[0] + 1, noise, 0); +@ Patches/../C_code.c:2703: id = HashByte_Class(id, list[0] + 1, noise, 0); mov r3, sp @ tmp180, ldrb r1, [r3] @ list, list -@ Patches/../C_code.c:2698: id = HashByte_Class(id, list[0] + 1, noise, 0); +@ Patches/../C_code.c:2703: id = HashByte_Class(id, list[0] + 1, noise, 0); movs r2, r6 @, noise movs r3, #0 @, movs r0, r4 @, id adds r1, r1, #1 @ tmp157, bl HashByte_Class @ -@ Patches/../C_code.c:2699: if (!id) +@ Patches/../C_code.c:2704: if (!id) cmp r0, #0 @ id, - bne .L1095 @, -@ Patches/../C_code.c:2701: id = 1; + bne .L1098 @, +@ Patches/../C_code.c:2706: id = 1; adds r0, r0, #1 @ id, -.L1095: +.L1098: mov r3, sp @ tmp181, ldrb r3, [r3, r0] @ tmp163, list adds r4, r3, #0 @ tmp160, tmp163 cmp r3, #0 @ tmp163, - beq .L1102 @, + beq .L1105 @, lsls r4, r4, #24 @ tmp167, tmp160, lsrs r4, r4, #24 @ id, tmp167, - b .L1094 @ -.L1102: + b .L1097 @ +.L1105: movs r4, #1 @ tmp160, lsls r4, r4, #24 @ tmp167, tmp160, lsrs r4, r4, #24 @ id, tmp167, - b .L1094 @ -.L1104: + b .L1097 @ +.L1107: .align 2 -.L1103: +.L1106: .word ClassExceptions .word GetClassData .size RandClass2, .-RandClass2 @@ -8300,34 +8331,34 @@ GetValidWexpMask: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:2716: wexp = unit->pClassData->baseRanks[i]; +@ Patches/../C_code.c:2721: wexp = unit->pClassData->baseRanks[i]; ldr r1, [r0, #4] @ _1, unit_9(D)->pClassData -@ Patches/../C_code.c:2711: { +@ Patches/../C_code.c:2716: { push {r4, lr} @ -@ Patches/../C_code.c:2714: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2719: for (int i = 0; i < 8; ++i) movs r3, #0 @ i, -@ Patches/../C_code.c:2712: int result = 0; +@ Patches/../C_code.c:2717: int result = 0; movs r0, #0 @ , -@ Patches/../C_code.c:2719: result |= 1 << i; +@ Patches/../C_code.c:2724: result |= 1 << i; movs r4, #1 @ tmp128, adds r1, r1, #44 @ tmp127, -.L1107: -@ Patches/../C_code.c:2717: if (wexp) +.L1110: +@ Patches/../C_code.c:2722: if (wexp) ldrb r2, [r1, r3] @ MEM[(unsigned char *)_6 + _16 * 1], MEM[(unsigned char *)_6 + _16 * 1] cmp r2, #0 @ MEM[(unsigned char *)_6 + _16 * 1], - beq .L1106 @, -@ Patches/../C_code.c:2719: result |= 1 << i; + beq .L1109 @, +@ Patches/../C_code.c:2724: result |= 1 << i; movs r2, r4 @ tmp124, tmp128 lsls r2, r2, r3 @ tmp124, tmp124, i -@ Patches/../C_code.c:2719: result |= 1 << i; +@ Patches/../C_code.c:2724: result |= 1 << i; orrs r0, r2 @ , tmp124 -.L1106: -@ Patches/../C_code.c:2714: for (int i = 0; i < 8; ++i) +.L1109: +@ Patches/../C_code.c:2719: for (int i = 0; i < 8; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2714: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2719: for (int i = 0; i < 8; ++i) cmp r3, #8 @ i, - bne .L1107 @, -@ Patches/../C_code.c:2723: } + bne .L1110 @, +@ Patches/../C_code.c:2728: } @ sp needed @ pop {r4} pop {r1} @@ -8346,30 +8377,30 @@ GetUsedWexpMask: @ frame_needed = 0, uses_anonymous_args = 0 movs r1, r0 @ tmp128, unit push {r4, lr} @ -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) movs r3, #0 @ i, -@ Patches/../C_code.c:2727: int result = 0; +@ Patches/../C_code.c:2732: int result = 0; movs r0, #0 @ , -@ Patches/../C_code.c:2734: result |= 1 << i; +@ Patches/../C_code.c:2739: result |= 1 << i; movs r4, #1 @ tmp127, adds r1, r1, #40 @ tmp126, -.L1114: -@ Patches/../C_code.c:2732: if (wexp) +.L1117: +@ Patches/../C_code.c:2737: if (wexp) ldrb r2, [r1, r3] @ MEM[(unsigned char *)_5 + _15 * 1], MEM[(unsigned char *)_5 + _15 * 1] cmp r2, #0 @ MEM[(unsigned char *)_5 + _15 * 1], - beq .L1113 @, -@ Patches/../C_code.c:2734: result |= 1 << i; + beq .L1116 @, +@ Patches/../C_code.c:2739: result |= 1 << i; movs r2, r4 @ tmp123, tmp127 lsls r2, r2, r3 @ tmp123, tmp123, i -@ Patches/../C_code.c:2734: result |= 1 << i; +@ Patches/../C_code.c:2739: result |= 1 << i; orrs r0, r2 @ , tmp123 -.L1113: -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +.L1116: +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) cmp r3, #8 @ i, - bne .L1114 @, -@ Patches/../C_code.c:2738: } + bne .L1117 @, +@ Patches/../C_code.c:2743: } @ sp needed @ pop {r4} pop {r1} @@ -8394,305 +8425,305 @@ BuildAvailableWeaponList: movs r4, r1 @ tmp361, unit push {r5, r6, r7, lr} @ mov fp, r0 @ list, tmp370 -@ Patches/../C_code.c:2727: int result = 0; +@ Patches/../C_code.c:2732: int result = 0; movs r2, #0 @ result, -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) movs r3, #0 @ i, -@ Patches/../C_code.c:2734: result |= 1 << i; +@ Patches/../C_code.c:2739: result |= 1 << i; movs r5, #1 @ tmp369, -@ Patches/../C_code.c:2744: { +@ Patches/../C_code.c:2749: { sub sp, sp, #28 @,, adds r4, r4, #40 @ tmp361, -.L1121: -@ Patches/../C_code.c:2732: if (wexp) +.L1124: +@ Patches/../C_code.c:2737: if (wexp) ldrb r0, [r4, r3] @ MEM[(unsigned char *)_82 + _83 * 1], MEM[(unsigned char *)_82 + _83 * 1] cmp r0, #0 @ MEM[(unsigned char *)_82 + _83 * 1], - beq .L1120 @, -@ Patches/../C_code.c:2734: result |= 1 << i; + beq .L1123 @, +@ Patches/../C_code.c:2739: result |= 1 << i; movs r0, r5 @ tmp212, tmp369 lsls r0, r0, r3 @ tmp212, tmp212, i -@ Patches/../C_code.c:2734: result |= 1 << i; +@ Patches/../C_code.c:2739: result |= 1 << i; orrs r2, r0 @ result, tmp212 -.L1120: -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +.L1123: +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) cmp r3, #8 @ i, - bne .L1121 @, -@ Patches/../C_code.c:2757: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; + bne .L1124 @, +@ Patches/../C_code.c:2762: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; ldr r3, [r1, #4] @ unit_65(D)->pClassData, unit_65(D)->pClassData -@ Patches/../C_code.c:2757: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; +@ Patches/../C_code.c:2762: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; ldr r4, [r1] @ _1, unit_65(D)->pCharacterData -@ Patches/../C_code.c:2757: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; +@ Patches/../C_code.c:2762: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; ldr r0, [r3, #40] @ _3->attributes, _3->attributes -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r5, #11 @ tmp217, -@ Patches/../C_code.c:2757: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; +@ Patches/../C_code.c:2762: attr = unit->pCharacterData->attributes | unit->pClassData->attributes; ldr r3, [r4, #40] @ _1->attributes, _1->attributes orrs r0, r3 @ _5, _1->attributes -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r3, #192 @ tmp218, ldrsb r5, [r1, r5] @ tmp217, ands r3, r5 @ tmp219, tmp217 -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) subs r3, r3, #128 @ tmp222, -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) subs r5, r3, #1 @ tmp223, tmp222 sbcs r3, r3, r5 @ tmp224, tmp222, tmp223 cmp r3, #0 @ tmp224, - bne .L1122 @, + bne .L1125 @, ldrb r3, [r4, #4] @ tmp229, cmp r3, #44 @ tmp229, - bls .LCB6973 @ - b .L1238 @long jump @ -.LCB6973: -.L1122: -@ Patches/../C_code.c:2755: badAttr = IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7 | IA_UNCOUNTERABLE; - ldr r3, .L1246 @ tmp418, + bls .LCB6997 @ + b .L1241 @long jump @ +.LCB6997: +.L1125: +@ Patches/../C_code.c:2760: badAttr = IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7 | IA_UNCOUNTERABLE; + ldr r3, .L1249 @ tmp418, mov ip, r3 @ tmp418, tmp418 -@ Patches/../C_code.c:2760: if (attr & CA_LOCK_1) +@ Patches/../C_code.c:2765: if (attr & CA_LOCK_1) lsls r6, r0, #15 @ tmp239, _5, -@ Patches/../C_code.c:2755: badAttr = IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7 | IA_UNCOUNTERABLE; +@ Patches/../C_code.c:2760: badAttr = IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7 | IA_UNCOUNTERABLE; asrs r6, r6, #31 @ tmp364, tmp239, lsrs r6, r6, #11 @ tmp365, tmp364, lsls r6, r6, #11 @ badAttr, tmp365, add r6, r6, ip @ badAttr, tmp418 -@ Patches/../C_code.c:2764: if (attr & CA_LOCK_2) +@ Patches/../C_code.c:2769: if (attr & CA_LOCK_2) lsls r3, r0, #14 @ tmp379, _5, - bpl .L1125 @, -@ Patches/../C_code.c:2766: badAttr &= ~IA_LOCK_2; - ldr r3, .L1246+4 @ tmp245, + bpl .L1128 @, +@ Patches/../C_code.c:2771: badAttr &= ~IA_LOCK_2; + ldr r3, .L1249+4 @ tmp245, ands r6, r3 @ badAttr, tmp245 -.L1125: -@ Patches/../C_code.c:2768: if (attr & CA_LOCK_3) +.L1128: +@ Patches/../C_code.c:2773: if (attr & CA_LOCK_3) lsls r3, r0, #13 @ tmp380, _5, - bpl .L1126 @, -@ Patches/../C_code.c:2770: badAttr &= ~IA_LOCK_3; - ldr r3, .L1246+8 @ tmp250, + bpl .L1129 @, +@ Patches/../C_code.c:2775: badAttr &= ~IA_LOCK_3; + ldr r3, .L1249+8 @ tmp250, ands r6, r3 @ badAttr, tmp250 -.L1126: -@ Patches/../C_code.c:2772: if (attr & CA_LOCK_4) +.L1129: +@ Patches/../C_code.c:2777: if (attr & CA_LOCK_4) lsls r3, r0, #3 @ tmp381, _5, - bpl .L1127 @, -@ Patches/../C_code.c:2774: badAttr &= ~IA_LOCK_4; - ldr r3, .L1246+12 @ tmp255, + bpl .L1130 @, +@ Patches/../C_code.c:2779: badAttr &= ~IA_LOCK_4; + ldr r3, .L1249+12 @ tmp255, ands r6, r3 @ badAttr, tmp255 -.L1127: -@ Patches/../C_code.c:2777: if (attr & CA_LOCK_5) +.L1130: +@ Patches/../C_code.c:2782: if (attr & CA_LOCK_5) lsls r3, r0, #2 @ tmp382, _5, - bpl .L1128 @, -@ Patches/../C_code.c:2779: badAttr &= ~IA_LOCK_5; - ldr r3, .L1246+16 @ tmp260, + bpl .L1131 @, +@ Patches/../C_code.c:2784: badAttr &= ~IA_LOCK_5; + ldr r3, .L1249+16 @ tmp260, ands r6, r3 @ badAttr, tmp260 -.L1128: -@ Patches/../C_code.c:2781: if (attr & CA_LOCK_6) +.L1131: +@ Patches/../C_code.c:2786: if (attr & CA_LOCK_6) lsls r3, r0, #1 @ tmp383, _5, - bpl .LCB7019 @ - b .L1239 @long jump @ -.LCB7019: -.L1129: -@ Patches/../C_code.c:2790: allowStatBoosts = true; + bpl .LCB7043 @ + b .L1242 @long jump @ +.LCB7043: +.L1132: +@ Patches/../C_code.c:2795: allowStatBoosts = true; movs r3, #1 @ allowStatBoosts, str r3, [sp, #8] @ allowStatBoosts, %sfp -@ Patches/../C_code.c:2785: if (attr & CA_LOCK_7) +@ Patches/../C_code.c:2790: if (attr & CA_LOCK_7) cmp r0, #0 @ _5, - bge .L1123 @, -@ Patches/../C_code.c:2787: badAttr &= ~IA_LOCK_7; - ldr r3, .L1246+20 @ tmp268, + bge .L1126 @, +@ Patches/../C_code.c:2792: badAttr &= ~IA_LOCK_7; + ldr r3, .L1249+20 @ tmp268, ands r6, r3 @ badAttr, tmp268 -.L1123: -@ Patches/../C_code.c:2792: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) - ldr r3, .L1246+24 @ tmp269, - ldr r3, [r3] @ IncludeMonstersWithoutWEXP.130_7, IncludeMonstersWithoutWEXP - mov r8, r3 @ IncludeMonstersWithoutWEXP.130_7, IncludeMonstersWithoutWEXP.130_7 -@ Patches/../C_code.c:2792: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) - cmp r3, #0 @ IncludeMonstersWithoutWEXP.130_7, - beq .L1130 @, -@ Patches/../C_code.c:2792: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) +.L1126: +@ Patches/../C_code.c:2797: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) + ldr r3, .L1249+24 @ tmp269, + ldr r3, [r3] @ IncludeMonstersWithoutWEXP.131_7, IncludeMonstersWithoutWEXP + mov r8, r3 @ IncludeMonstersWithoutWEXP.131_7, IncludeMonstersWithoutWEXP.131_7 +@ Patches/../C_code.c:2797: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) + cmp r3, #0 @ IncludeMonstersWithoutWEXP.131_7, + beq .L1133 @, +@ Patches/../C_code.c:2797: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) lsls r3, r0, #13 @ tmp384, _5, - bpl .LCB7037 @ - b .L1240 @long jump @ -.LCB7037: -.L1130: -@ Patches/../C_code.c:2798: ranks[0] = unit->ranks[0]; - ldr r7, [r1, #40] @ vect__8.1280, MEM [(unsigned char *)unit_65(D) + 40B] -@ Patches/../C_code.c:2806: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; - lsls r3, r7, #8 @ tmp276, vect__8.1280, - orrs r3, r7 @ tmp276, vect__8.1280 + bpl .LCB7061 @ + b .L1243 @long jump @ +.LCB7061: +.L1133: +@ Patches/../C_code.c:2803: ranks[0] = unit->ranks[0]; + ldr r7, [r1, #40] @ vect__8.1285, MEM [(unsigned char *)unit_65(D) + 40B] +@ Patches/../C_code.c:2811: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; + lsls r3, r7, #8 @ tmp276, vect__8.1285, + orrs r3, r7 @ tmp276, vect__8.1285 mov ip, r3 @ tmp277, tmp276 mov r4, ip @ tmp277, tmp277 - lsls r3, r7, #16 @ tmp280, vect__8.1280, + lsls r3, r7, #16 @ tmp280, vect__8.1285, orrs r3, r4 @ tmp279, tmp277 -@ Patches/../C_code.c:2807: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) - mov r4, r8 @ IncludeMonstersWithoutWEXP.130_7, IncludeMonstersWithoutWEXP.130_7 -@ Patches/../C_code.c:2798: ranks[0] = unit->ranks[0]; - ldr r5, [r1, #44] @ vect__8.1281, MEM [(unsigned char *)unit_65(D) + 44B] -@ Patches/../C_code.c:2806: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2812: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) + mov r4, r8 @ IncludeMonstersWithoutWEXP.131_7, IncludeMonstersWithoutWEXP.131_7 +@ Patches/../C_code.c:2803: ranks[0] = unit->ranks[0]; + ldr r5, [r1, #44] @ vect__8.1286, MEM [(unsigned char *)unit_65(D) + 44B] +@ Patches/../C_code.c:2811: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; lsrs r3, r3, #24 @ tmp282, tmp279, - orrs r3, r7 @ tmp285, vect__8.1280 -@ Patches/../C_code.c:2798: ranks[0] = unit->ranks[0]; - str r7, [sp, #16] @ vect__8.1280, MEM [(unsigned char *)&ranks] -@ Patches/../C_code.c:2806: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; - lsrs r7, r5, #24 @ tmp286, vect__8.1281, + orrs r3, r7 @ tmp285, vect__8.1285 +@ Patches/../C_code.c:2803: ranks[0] = unit->ranks[0]; + str r7, [sp, #16] @ vect__8.1285, MEM [(unsigned char *)&ranks] +@ Patches/../C_code.c:2811: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; + lsrs r7, r5, #24 @ tmp286, vect__8.1286, orrs r3, r7 @ tmp288, tmp286 - lsls r7, r5, #8 @ tmp290, vect__8.1281, -@ Patches/../C_code.c:2798: ranks[0] = unit->ranks[0]; - str r5, [sp, #20] @ vect__8.1281, MEM [(unsigned char *)&ranks + 4B] -@ Patches/../C_code.c:2806: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; + lsls r7, r5, #8 @ tmp290, vect__8.1286, +@ Patches/../C_code.c:2803: ranks[0] = unit->ranks[0]; + str r5, [sp, #20] @ vect__8.1286, MEM [(unsigned char *)&ranks + 4B] +@ Patches/../C_code.c:2811: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; lsrs r7, r7, #24 @ tmp289, tmp290, - lsls r5, r5, #16 @ tmp294, vect__8.1281, + lsls r5, r5, #16 @ tmp294, vect__8.1286, orrs r3, r7 @ tmp292, tmp289 lsrs r5, r5, #24 @ tmp293, tmp294, orrs r3, r5 @ tmp296, tmp293 lsls r3, r3, #24 @ tmp297, tmp296, lsrs r3, r3, #24 @ _21, tmp297, -@ Patches/../C_code.c:2807: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) - cmp r4, #0 @ IncludeMonstersWithoutWEXP.130_7, - beq .L1131 @, -@ Patches/../C_code.c:2807: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) +@ Patches/../C_code.c:2812: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) + cmp r4, #0 @ IncludeMonstersWithoutWEXP.131_7, + beq .L1134 @, +@ Patches/../C_code.c:2812: if (IncludeMonstersWithoutWEXP && (attr & CA_LOCK_3)) lsls r0, r0, #13 @ tmp385, _5, - bpl .L1131 @, -@ Patches/../C_code.c:2820: ranks[4] = 0; + bpl .L1134 @, +@ Patches/../C_code.c:2825: ranks[4] = 0; movs r3, #0 @ tmp304, add r0, sp, #16 @ tmp424,, strb r3, [r0, #4] @ tmp304, ranks[4] -@ Patches/../C_code.c:2821: doWeHaveNonStaff = 0; +@ Patches/../C_code.c:2826: doWeHaveNonStaff = 0; str r3, [sp, #4] @ doWeHaveNonStaff, %sfp -.L1133: -@ Patches/../C_code.c:2828: list[0] = 0; // count +.L1136: +@ Patches/../C_code.c:2833: list[0] = 0; // count movs r3, #0 @ tmp306, mov r0, fp @ list, list strb r3, [r0] @ tmp306, *list_92(D) -@ Patches/../C_code.c:2071: if (*MaxItems > 1) - ldr r3, .L1246+28 @ tmp366, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) + ldr r3, .L1249+28 @ tmp366, mov r8, r3 @ tmp366, tmp366 -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); - ldr r3, .L1246+32 @ tmp367, +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); + ldr r3, .L1249+32 @ tmp367, mov r9, r3 @ tmp367, tmp367 mov r3, r8 @ tmp366, tmp366 -@ Patches/../C_code.c:2830: for (int i = 1; i <= GetMaxItems(); i++) +@ Patches/../C_code.c:2835: for (int i = 1; i <= GetMaxItems(); i++) movs r4, #1 @ i, mov r8, r6 @ badAttr, badAttr mov r10, r2 @ result, result movs r6, r3 @ tmp366, tmp366 - ldr r5, .L1246+36 @ ivtmp.1296, - ldr r7, .L1246+40 @ tmp359, + ldr r5, .L1249+36 @ ivtmp.1301, + ldr r7, .L1249+40 @ tmp359, str r1, [sp, #12] @ unit, %sfp -.L1134: -@ Patches/../C_code.c:2067: if (MaxItems_Link) +.L1137: +@ Patches/../C_code.c:2072: if (MaxItems_Link) ldr r3, [r7] @ c, MaxItems_Link -@ Patches/../C_code.c:2067: if (MaxItems_Link) +@ Patches/../C_code.c:2072: if (MaxItems_Link) cmp r3, #0 @ c, - bne .L1153 @, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + bne .L1156 @, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) ldr r3, [r6] @ MaxItems, MaxItems - ldrb r3, [r3] @ _125, *MaxItems.88_124 -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + ldrb r3, [r3] @ _125, *MaxItems.89_124 +@ Patches/../C_code.c:2076: if (*MaxItems > 1) cmp r3, #1 @ _125, - bls .L1241 @, -.L1153: -@ Patches/../C_code.c:2830: for (int i = 1; i <= GetMaxItems(); i++) + bls .L1244 @, +.L1156: +@ Patches/../C_code.c:2835: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - bgt .L1242 @, -.L1158: -@ Patches/../C_code.c:2832: if (ItemExceptions[i].NeverChangeInto) + bgt .L1245 @, +.L1161: +@ Patches/../C_code.c:2837: if (ItemExceptions[i].NeverChangeInto) ldrb r3, [r5] @ MEM[(unsigned char *)_84], MEM[(unsigned char *)_84] cmp r3, #0 @ MEM[(unsigned char *)_84], - bne .L1136 @, -@ Patches/../C_code.c:2836: table = GetItemData(i); + bne .L1139 @, +@ Patches/../C_code.c:2841: table = GetItemData(i); movs r0, r4 @, i - bl .L397 @ -@ Patches/../C_code.c:2839: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) + bl .L400 @ +@ Patches/../C_code.c:2844: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) mov r2, r8 @ badAttr, badAttr -@ Patches/../C_code.c:2837: attr = table->attributes; +@ Patches/../C_code.c:2842: attr = table->attributes; ldr r3, [r0, #8] @ _23, table_99->attributes -@ Patches/../C_code.c:2839: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) +@ Patches/../C_code.c:2844: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) tst r3, r2 @ _23, badAttr - bne .L1136 @, -@ Patches/../C_code.c:2839: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) + bne .L1139 @, +@ Patches/../C_code.c:2844: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) movs r2, #1 @ tmp311, ldr r1, [sp, #4] @ doWeHaveNonStaff, %sfp orrs r2, r1 @ tmp312, doWeHaveNonStaff -@ Patches/../C_code.c:2839: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) +@ Patches/../C_code.c:2844: if ((attr & badAttr) || (!(attr & (IA_WEAPON | doWeHaveNonStaff)))) tst r3, r2 @ _23, tmp312 - beq .L1136 @, -@ Patches/../C_code.c:2845: rank = table->weaponRank; + beq .L1139 @, +@ Patches/../C_code.c:2850: rank = table->weaponRank; ldrb r1, [r0, #28] @ rank, -@ Patches/../C_code.c:2844: type = table->weaponType; +@ Patches/../C_code.c:2849: type = table->weaponType; ldrb r2, [r0, #7] @ type, -@ Patches/../C_code.c:2845: rank = table->weaponRank; +@ Patches/../C_code.c:2850: rank = table->weaponRank; str r1, [sp] @ rank, %sfp -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) ldrb r1, [r0, #31] @ pretmp_189, mov ip, r1 @ pretmp_189, pretmp_189 -@ Patches/../C_code.c:2849: if ((!rank) && (!(attr & (IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7)))) +@ Patches/../C_code.c:2854: if ((!rank) && (!(attr & (IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7)))) ldr r1, [sp] @ rank, %sfp cmp r1, #0 @ rank, - beq .L1138 @, -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + beq .L1141 @, +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) mov r1, ip @ pretmp_189, pretmp_189 -@ Patches/../C_code.c:2858: if (type <= 7) +@ Patches/../C_code.c:2863: if (type <= 7) cmp r2, #7 @ type, - ble .L1243 @, -.L1139: -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + ble .L1246 @, +.L1142: +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) cmp r1, #4 @ pretmp_189, - beq .L1235 @, -.L1146: -@ Patches/../C_code.c:2899: if ((!allowStatBoosts) && (table->pStatBonuses)) + beq .L1238 @, +.L1149: +@ Patches/../C_code.c:2904: if ((!allowStatBoosts) && (table->pStatBonuses)) ldr r2, [sp, #8] @ allowStatBoosts, %sfp cmp r2, #0 @ allowStatBoosts, - bne .L1149 @, -@ Patches/../C_code.c:2899: if ((!allowStatBoosts) && (table->pStatBonuses)) + bne .L1152 @, +@ Patches/../C_code.c:2904: if ((!allowStatBoosts) && (table->pStatBonuses)) ldr r2, [r0, #12] @ table_99->pStatBonuses, table_99->pStatBonuses cmp r2, #0 @ table_99->pStatBonuses, - beq .L1149 @, -.L1136: -@ Patches/../C_code.c:2830: for (int i = 1; i <= GetMaxItems(); i++) + beq .L1152 @, +.L1139: +@ Patches/../C_code.c:2835: for (int i = 1; i <= GetMaxItems(); i++) adds r4, r4, #1 @ i, - adds r5, r5, #2 @ ivtmp.1296, - b .L1134 @ -.L1131: -@ Patches/../C_code.c:2825: doWeHaveNonStaff = IA_STAFF; + adds r5, r5, #2 @ ivtmp.1301, + b .L1137 @ +.L1134: +@ Patches/../C_code.c:2830: doWeHaveNonStaff = IA_STAFF; movs r0, #4 @ doWeHaveNonStaff, str r0, [sp, #4] @ doWeHaveNonStaff, %sfp -@ Patches/../C_code.c:2813: else if (doWeHaveNonStaff) +@ Patches/../C_code.c:2818: else if (doWeHaveNonStaff) cmp r3, #0 @ _21, - beq .L1133 @, -@ Patches/../C_code.c:2815: badAttr |= IA_LOCK_3; + beq .L1136 @, +@ Patches/../C_code.c:2820: badAttr |= IA_LOCK_3; movs r3, #128 @ tmp302, lsls r3, r3, #3 @ tmp302, tmp302, orrs r6, r3 @ badAttr, tmp302 -@ Patches/../C_code.c:2820: ranks[4] = 0; +@ Patches/../C_code.c:2825: ranks[4] = 0; movs r3, #0 @ tmp304, add r0, sp, #16 @ tmp424,, strb r3, [r0, #4] @ tmp304, ranks[4] -@ Patches/../C_code.c:2821: doWeHaveNonStaff = 0; +@ Patches/../C_code.c:2826: doWeHaveNonStaff = 0; str r3, [sp, #4] @ doWeHaveNonStaff, %sfp - b .L1133 @ -.L1149: -@ Patches/../C_code.c:2904: if (WepLockExInstalled) - ldr r2, .L1246+44 @ tmp327, -@ Patches/../C_code.c:2904: if (WepLockExInstalled) + b .L1136 @ +.L1152: +@ Patches/../C_code.c:2909: if (WepLockExInstalled) + ldr r2, .L1249+44 @ tmp327, +@ Patches/../C_code.c:2909: if (WepLockExInstalled) ldr r2, [r2] @ WepLockExInstalled, WepLockExInstalled cmp r2, #0 @ WepLockExInstalled, - beq .L1152 @, -@ Patches/../C_code.c:2908: if (!CanUnitUseStaff(unit, i | 0x100)) + beq .L1155 @, +@ Patches/../C_code.c:2913: if (!CanUnitUseStaff(unit, i | 0x100)) movs r1, #128 @ tmp335, lsls r1, r1, #1 @ tmp335, tmp335, ldr r0, [sp, #12] @, %sfp orrs r1, r4 @ _184, i -@ Patches/../C_code.c:2906: if (attr & IA_STAFF) +@ Patches/../C_code.c:2911: if (attr & IA_STAFF) lsls r3, r3, #29 @ tmp386, _23, - bpl .L1151 @, -@ Patches/../C_code.c:2908: if (!CanUnitUseStaff(unit, i | 0x100)) - ldr r3, .L1246+48 @ tmp338, + bpl .L1154 @, +@ Patches/../C_code.c:2913: if (!CanUnitUseStaff(unit, i | 0x100)) + ldr r3, .L1249+48 @ tmp338, bl .L14 @ -@ Patches/../C_code.c:2908: if (!CanUnitUseStaff(unit, i | 0x100)) +@ Patches/../C_code.c:2913: if (!CanUnitUseStaff(unit, i | 0x100)) cmp r0, #0 @ tmp373, - beq .L1136 @, -.L1152: -@ Patches/../C_code.c:2919: list[0]++; + beq .L1139 @, +.L1155: +@ Patches/../C_code.c:2924: list[0]++; mov r3, fp @ list, list mov r2, fp @ list, list ldrb r3, [r3] @ *list_92(D), *list_92(D) @@ -8700,55 +8731,55 @@ BuildAvailableWeaponList: lsls r3, r3, #24 @ tmp332, tmp331, lsrs r3, r3, #24 @ _41, tmp332, strb r3, [r2] @ _41, *list_92(D) -@ Patches/../C_code.c:2920: list[list[0]] = i; +@ Patches/../C_code.c:2925: list[list[0]] = i; strb r4, [r2, r3] @ i, *_43 -.L1245: -@ Patches/../C_code.c:2830: for (int i = 1; i <= GetMaxItems(); i++) +.L1248: +@ Patches/../C_code.c:2835: for (int i = 1; i <= GetMaxItems(); i++) adds r4, r4, #1 @ i, - adds r5, r5, #2 @ ivtmp.1296, - b .L1134 @ -.L1241: -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); + adds r5, r5, #2 @ ivtmp.1301, + b .L1137 @ +.L1244: +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); movs r0, #1 @, - bl .L397 @ -@ Patches/../C_code.c:2078: if (table->number != i) + bl .L400 @ +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ tmp350, -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) movs r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r2, #1 @ tmp350, - bne .L1157 @, -.L1155: -@ Patches/../C_code.c:2083: table++; + bne .L1160 @, +.L1158: +@ Patches/../C_code.c:2088: table++; adds r0, r0, #36 @ table, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ MEM[(unsigned char *)table_135 + 6B], MEM[(unsigned char *)table_135 + 6B] -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r3, r2 @ i, MEM[(unsigned char *)table_135 + 6B] - beq .L1155 @, -.L1157: -@ Patches/../C_code.c:2085: int c = table->number; + beq .L1158 @, +.L1160: +@ Patches/../C_code.c:2090: int c = table->number; subs r0, r0, #36 @ tmp351, ldrb r2, [r0, #6] @ _132, -@ Patches/../C_code.c:2085: int c = table->number; +@ Patches/../C_code.c:2090: int c = table->number; subs r3, r2, #0 @ c, _132, -@ Patches/../C_code.c:2090: if (c < 1) - bne .L1156 @, +@ Patches/../C_code.c:2095: if (c < 1) + bne .L1159 @, movs r2, #1 @ _132, -@ Patches/../C_code.c:2092: c = 1; +@ Patches/../C_code.c:2097: c = 1; movs r3, #1 @ c, -.L1156: -@ Patches/../C_code.c:2094: *MaxItems = c; - ldr r1, [r6] @ MaxItems.90_140, MaxItems -@ Patches/../C_code.c:2094: *MaxItems = c; - strb r2, [r1] @ _132, *MaxItems.90_140 -@ Patches/../C_code.c:2830: for (int i = 1; i <= GetMaxItems(); i++) +.L1159: +@ Patches/../C_code.c:2099: *MaxItems = c; + ldr r1, [r6] @ MaxItems.91_140, MaxItems +@ Patches/../C_code.c:2099: *MaxItems = c; + strb r2, [r1] @ _132, *MaxItems.91_140 +@ Patches/../C_code.c:2835: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - ble .L1158 @, -.L1242: -@ Patches/../C_code.c:2928: } + ble .L1161 @, +.L1245: +@ Patches/../C_code.c:2933: } mov r0, fp @, list add sp, sp, #28 @,, @ sp needed @ @@ -8760,99 +8791,99 @@ BuildAvailableWeaponList: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1138: -@ Patches/../C_code.c:2849: if ((!rank) && (!(attr & (IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7)))) - ldr r1, .L1246+52 @ tmp315, +.L1141: +@ Patches/../C_code.c:2854: if ((!rank) && (!(attr & (IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7)))) + ldr r1, .L1249+52 @ tmp315, tst r3, r1 @ _23, tmp315 - bne .L1143 @, -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + bne .L1146 @, +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) mov r1, ip @ pretmp_189, pretmp_189 -@ Patches/../C_code.c:2858: if (type <= 7) +@ Patches/../C_code.c:2863: if (type <= 7) cmp r2, #7 @ type, - bgt .L1139 @, -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + bgt .L1142 @, +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) cmp r1, #4 @ pretmp_189, - beq .L1164 @, -@ Patches/../C_code.c:2856: rank = 251; + beq .L1167 @, +@ Patches/../C_code.c:2861: rank = 251; movs r1, #251 @ rank, str r1, [sp] @ rank, %sfp - b .L1140 @ -.L1239: -@ Patches/../C_code.c:2783: badAttr &= ~IA_LOCK_6; - ldr r3, .L1246+56 @ tmp265, + b .L1143 @ +.L1242: +@ Patches/../C_code.c:2788: badAttr &= ~IA_LOCK_6; + ldr r3, .L1249+56 @ tmp265, ands r6, r3 @ badAttr, tmp265 - b .L1129 @ -.L1143: -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + b .L1132 @ +.L1146: +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) mov r1, ip @ pretmp_189, pretmp_189 -@ Patches/../C_code.c:2858: if (type <= 7) +@ Patches/../C_code.c:2863: if (type <= 7) cmp r2, #7 @ type, - bgt .L1139 @, -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + bgt .L1142 @, +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) cmp r1, #4 @ pretmp_189, - beq .L1141 @, -@ Patches/../C_code.c:2862: rank = 1; + beq .L1144 @, +@ Patches/../C_code.c:2867: rank = 1; movs r1, #1 @ rank, str r1, [sp] @ rank, %sfp - b .L1140 @ -.L1243: -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + b .L1143 @ +.L1246: +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) cmp r1, #4 @ pretmp_189, - beq .L1244 @, -.L1140: -@ Patches/../C_code.c:2885: if (rank > ranks[type]) + beq .L1247 @, +.L1143: +@ Patches/../C_code.c:2890: if (rank > ranks[type]) add r1, sp, #16 @ tmp447,, ldrb r1, [r1, r2] @ tmp358, ranks mov ip, r1 @ tmp358, tmp358 -@ Patches/../C_code.c:2885: if (rank > ranks[type]) +@ Patches/../C_code.c:2890: if (rank > ranks[type]) ldr r1, [sp] @ rank, %sfp cmp ip, r1 @ tmp358, rank - blt .L1136 @, -.L1235: -@ Patches/../C_code.c:2891: type = 1 << (type); // now bitmask only + blt .L1139 @, +.L1238: +@ Patches/../C_code.c:2896: type = 1 << (type); // now bitmask only movs r1, #1 @ tmp324, lsls r1, r1, r2 @ type, tmp324, type -@ Patches/../C_code.c:2894: if (!(type & wexpMask)) +@ Patches/../C_code.c:2899: if (!(type & wexpMask)) mov r2, r10 @ result, result tst r1, r2 @ type, result - beq .LCB7293 @ - b .L1146 @long jump @ -.LCB7293: -.L1236: -@ Patches/../C_code.c:2830: for (int i = 1; i <= GetMaxItems(); i++) + beq .LCB7317 @ + b .L1149 @long jump @ +.LCB7317: +.L1239: +@ Patches/../C_code.c:2835: for (int i = 1; i <= GetMaxItems(); i++) adds r4, r4, #1 @ i, - adds r5, r5, #2 @ ivtmp.1296, - b .L1134 @ -.L1240: -@ Patches/../C_code.c:2794: badAttr &= ~IA_LOCK_3; - ldr r3, .L1246+8 @ tmp274, + adds r5, r5, #2 @ ivtmp.1301, + b .L1137 @ +.L1243: +@ Patches/../C_code.c:2799: badAttr &= ~IA_LOCK_3; + ldr r3, .L1249+8 @ tmp274, ands r6, r3 @ badAttr, tmp274 - b .L1130 @ -.L1238: + b .L1133 @ +.L1241: movs r3, #128 @ tmp237, -@ Patches/../C_code.c:2758: if ((IsUnitAlliedOrPlayable(unit)) || (attr & CA_BOSS) || AllEnemiesCanUseWepLocks) - ldr r4, .L1246+60 @ tmp235, +@ Patches/../C_code.c:2763: if ((IsUnitAlliedOrPlayable(unit)) || (attr & CA_BOSS) || AllEnemiesCanUseWepLocks) + ldr r4, .L1249+60 @ tmp235, lsls r3, r3, #8 @ tmp237, tmp237, ldr r4, [r4] @ AllEnemiesCanUseWepLocks, AllEnemiesCanUseWepLocks ands r3, r0 @ tmp236, _5 orrs r3, r4 @ tmp236, AllEnemiesCanUseWepLocks str r3, [sp, #8] @ allowStatBoosts, %sfp - beq .LCB7315 @ - b .L1122 @long jump @ -.LCB7315: -@ Patches/../C_code.c:2755: badAttr = IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7 | IA_UNCOUNTERABLE; - ldr r6, .L1246 @ badAttr, - b .L1123 @ -.L1151: -@ Patches/../C_code.c:2913: else if (!CanUnitUseWeapon(unit, i | 0x100)) - ldr r3, .L1246+64 @ tmp341, - bl .L14 @ -@ Patches/../C_code.c:2913: else if (!CanUnitUseWeapon(unit, i | 0x100)) + beq .LCB7339 @ + b .L1125 @long jump @ +.LCB7339: +@ Patches/../C_code.c:2760: badAttr = IA_LOCK_1 | IA_LOCK_2 | IA_LOCK_3 | IA_LOCK_4 | IA_LOCK_5 | IA_LOCK_6 | IA_LOCK_7 | IA_UNCOUNTERABLE; + ldr r6, .L1249 @ badAttr, + b .L1126 @ +.L1154: +@ Patches/../C_code.c:2918: else if (!CanUnitUseWeapon(unit, i | 0x100)) + ldr r3, .L1249+64 @ tmp341, + bl .L14 @ +@ Patches/../C_code.c:2918: else if (!CanUnitUseWeapon(unit, i | 0x100)) cmp r0, #0 @ tmp374, - bne .LCB7325 @ - b .L1136 @long jump @ -.LCB7325: -@ Patches/../C_code.c:2919: list[0]++; + bne .LCB7349 @ + b .L1139 @long jump @ +.LCB7349: +@ Patches/../C_code.c:2924: list[0]++; mov r3, fp @ list, list mov r2, fp @ list, list ldrb r3, [r3] @ *list_92(D), *list_92(D) @@ -8860,61 +8891,61 @@ BuildAvailableWeaponList: lsls r3, r3, #24 @ tmp332, tmp331, lsrs r3, r3, #24 @ _41, tmp332, strb r3, [r2] @ _41, *list_92(D) -@ Patches/../C_code.c:2920: list[list[0]] = i; +@ Patches/../C_code.c:2925: list[list[0]] = i; strb r4, [r2, r3] @ i, *_43 - b .L1245 @ -.L1141: -@ Patches/../C_code.c:2885: if (rank > ranks[type]) + b .L1248 @ +.L1144: +@ Patches/../C_code.c:2890: if (rank > ranks[type]) add r1, sp, #16 @ tmp441,, ldrb r1, [r1, r2] @ tmp323, ranks cmp r1, #70 @ tmp323, - bhi .LCB7342 @ - b .L1136 @long jump @ -.LCB7342: -@ Patches/../C_code.c:2891: type = 1 << (type); // now bitmask only + bhi .LCB7366 @ + b .L1139 @long jump @ +.LCB7366: +@ Patches/../C_code.c:2896: type = 1 << (type); // now bitmask only movs r1, #1 @ tmp324, lsls r1, r1, r2 @ type, tmp324, type -@ Patches/../C_code.c:2894: if (!(type & wexpMask)) +@ Patches/../C_code.c:2899: if (!(type & wexpMask)) mov r2, r10 @ result, result tst r1, r2 @ type, result - beq .LCB7347 @ - b .L1146 @long jump @ -.LCB7347: - b .L1236 @ -.L1244: -@ Patches/../C_code.c:2877: if ((table->weaponEffectId == 4) && (rank < 101)) + beq .LCB7371 @ + b .L1149 @long jump @ +.LCB7371: + b .L1239 @ +.L1247: +@ Patches/../C_code.c:2882: if ((table->weaponEffectId == 4) && (rank < 101)) ldr r1, [sp] @ rank, %sfp cmp r1, #100 @ rank, - ble .L1141 @, -.L1142: -@ Patches/../C_code.c:2885: if (rank > ranks[type]) + ble .L1144 @, +.L1145: +@ Patches/../C_code.c:2890: if (rank > ranks[type]) add r1, sp, #16 @ tmp439,, ldrb r1, [r1, r2] @ tmp317, ranks mov ip, r1 @ tmp317, tmp317 -@ Patches/../C_code.c:2885: if (rank > ranks[type]) +@ Patches/../C_code.c:2890: if (rank > ranks[type]) ldr r1, [sp] @ rank, %sfp cmp ip, r1 @ tmp317, rank - bge .LCB7362 @ - b .L1136 @long jump @ -.LCB7362: -@ Patches/../C_code.c:2891: type = 1 << (type); // now bitmask only + bge .LCB7386 @ + b .L1139 @long jump @ +.LCB7386: +@ Patches/../C_code.c:2896: type = 1 << (type); // now bitmask only movs r1, #1 @ tmp324, lsls r1, r1, r2 @ type, tmp324, type -@ Patches/../C_code.c:2894: if (!(type & wexpMask)) +@ Patches/../C_code.c:2899: if (!(type & wexpMask)) mov r2, r10 @ result, result tst r1, r2 @ type, result - beq .LCB7367 @ - b .L1146 @long jump @ -.LCB7367: - b .L1236 @ -.L1164: -@ Patches/../C_code.c:2856: rank = 251; + beq .LCB7391 @ + b .L1149 @long jump @ +.LCB7391: + b .L1239 @ +.L1167: +@ Patches/../C_code.c:2861: rank = 251; movs r1, #251 @ rank, str r1, [sp] @ rank, %sfp - b .L1142 @ -.L1247: + b .L1145 @ +.L1250: .align 2 -.L1246: +.L1249: .word 3939456 .word -4097 .word -1025 @@ -8951,171 +8982,171 @@ AppendAvailableStaffList: mov r6, r9 @, mov r8, r0 @ list, tmp252 push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) movs r3, #0 @ i, -@ Patches/../C_code.c:2727: int result = 0; +@ Patches/../C_code.c:2732: int result = 0; movs r7, #0 @ result, -@ Patches/../C_code.c:2734: result |= 1 << i; +@ Patches/../C_code.c:2739: result |= 1 << i; movs r0, #1 @ tmp251, -@ Patches/../C_code.c:2931: { +@ Patches/../C_code.c:2936: { movs r5, r1 @ unit, tmp253 sub sp, sp, #12 @,, - adds r1, r1, #40 @ tmp245, -.L1250: -@ Patches/../C_code.c:2732: if (wexp) + adds r1, r1, #40 @ tmp246, +.L1253: +@ Patches/../C_code.c:2737: if (wexp) ldrb r2, [r1, r3] @ MEM[(unsigned char *)_92 + _78 * 1], MEM[(unsigned char *)_92 + _78 * 1] cmp r2, #0 @ MEM[(unsigned char *)_92 + _78 * 1], - beq .L1249 @, -@ Patches/../C_code.c:2734: result |= 1 << i; + beq .L1252 @, +@ Patches/../C_code.c:2739: result |= 1 << i; movs r2, r0 @ tmp168, tmp251 lsls r2, r2, r3 @ tmp168, tmp168, i -@ Patches/../C_code.c:2734: result |= 1 << i; +@ Patches/../C_code.c:2739: result |= 1 << i; orrs r7, r2 @ result, tmp168 -.L1249: -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +.L1252: +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2729: for (int i = 0; i < 8; ++i) +@ Patches/../C_code.c:2734: for (int i = 0; i < 8; ++i) cmp r3, #8 @ i, - bne .L1250 @, -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; + bne .L1253 @, +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; movs r2, #41 @ tmp172, -@ Patches/../C_code.c:2942: ranks[4] = unit->ranks[4]; +@ Patches/../C_code.c:2947: ranks[4] = unit->ranks[4]; adds r3, r3, #36 @ tmp170, ldrb r1, [r5, r3] @ _5, str r1, [sp, #4] @ _5, %sfp -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; subs r3, r3, #4 @ tmp171, ldrb r2, [r5, r2] @ tmp176, ldrb r3, [r5, r3] @ tmp174, orrs r3, r2 @ tmp177, tmp176 -@ Patches/../C_code.c:2940: ranks[2] = unit->ranks[2]; +@ Patches/../C_code.c:2945: ranks[2] = unit->ranks[2]; movs r2, #42 @ tmp178, -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; ldrb r2, [r5, r2] @ tmp181, orrs r3, r2 @ tmp182, tmp181 -@ Patches/../C_code.c:2941: ranks[3] = unit->ranks[3]; +@ Patches/../C_code.c:2946: ranks[3] = unit->ranks[3]; movs r2, #43 @ tmp183, -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; ldrb r2, [r5, r2] @ tmp186, orrs r3, r2 @ tmp187, tmp186 -@ Patches/../C_code.c:2943: ranks[5] = unit->ranks[5]; +@ Patches/../C_code.c:2948: ranks[5] = unit->ranks[5]; movs r2, #45 @ tmp188, -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; ldrb r2, [r5, r2] @ tmp191, orrs r3, r2 @ tmp192, tmp191 -@ Patches/../C_code.c:2944: ranks[6] = unit->ranks[6]; +@ Patches/../C_code.c:2949: ranks[6] = unit->ranks[6]; movs r2, #46 @ tmp193, -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; ldrb r2, [r5, r2] @ tmp196, orrs r3, r2 @ tmp197, tmp196 -@ Patches/../C_code.c:2945: ranks[7] = unit->ranks[7]; +@ Patches/../C_code.c:2950: ranks[7] = unit->ranks[7]; movs r2, #47 @ tmp198, -@ Patches/../C_code.c:2946: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; +@ Patches/../C_code.c:2951: int doWeHaveNonStaff = ranks[0] | ranks[1] | ranks[2] | ranks[3] | ranks[5] | ranks[6] | ranks[7]; ldrb r2, [r5, r2] @ tmp201, -@ Patches/../C_code.c:2947: if (!doWeHaveNonStaff) +@ Patches/../C_code.c:2952: if (!doWeHaveNonStaff) orrs r3, r2 @ tmp204, tmp201 -@ Patches/../C_code.c:2951: if (!ranks[4]) - beq .L1272 @, +@ Patches/../C_code.c:2956: if (!ranks[4]) + beq .L1275 @, cmp r1, #0 @ _5, - beq .L1272 @, - ldr r3, .L1288 @ tmp246, - mov r9, r3 @ tmp246, tmp246 -@ Patches/../C_code.c:2071: if (*MaxItems > 1) - ldr r3, .L1288+4 @ tmp248, + beq .L1275 @, + ldr r3, .L1291 @ tmp247, + mov r9, r3 @ tmp247, tmp247 +@ Patches/../C_code.c:2076: if (*MaxItems > 1) + ldr r3, .L1291+4 @ tmp248, mov r10, r3 @ tmp248, tmp248 -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); - ldr r3, .L1288+8 @ tmp249, -@ Patches/../C_code.c:2955: for (int i = 1; i <= GetMaxItems(); i++) +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); + ldr r3, .L1291+8 @ tmp249, +@ Patches/../C_code.c:2960: for (int i = 1; i <= GetMaxItems(); i++) movs r4, #1 @ i, -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); mov fp, r3 @ tmp249, tmp249 - ldr r6, .L1288+12 @ ivtmp.1324, - b .L1252 @ -.L1259: -@ Patches/../C_code.c:2955: for (int i = 1; i <= GetMaxItems(); i++) + ldr r6, .L1291+12 @ ivtmp.1329, + b .L1255 @ +.L1262: +@ Patches/../C_code.c:2960: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - bgt .L1272 @, -.L1264: -@ Patches/../C_code.c:2957: if (ItemExceptions[i].NeverChangeInto) + bgt .L1275 @, +.L1267: +@ Patches/../C_code.c:2962: if (ItemExceptions[i].NeverChangeInto) ldrb r3, [r6] @ MEM[(unsigned char *)_48], MEM[(unsigned char *)_48] cmp r3, #0 @ MEM[(unsigned char *)_48], - bne .L1254 @, -@ Patches/../C_code.c:2961: table = GetItemData(i); + bne .L1257 @, +@ Patches/../C_code.c:2966: table = GetItemData(i); movs r0, r4 @, i - bl .L669 @ -@ Patches/../C_code.c:2964: if (!(attr & IA_STAFF)) + bl .L672 @ +@ Patches/../C_code.c:2969: if (!(attr & IA_STAFF)) ldr r3, [r0, #8] @ table_41->attributes, table_41->attributes lsls r3, r3, #29 @ tmp257, table_41->attributes, - bpl .L1254 @, -@ Patches/../C_code.c:2969: rank = table->weaponRank; + bpl .L1257 @, +@ Patches/../C_code.c:2974: rank = table->weaponRank; ldrb r3, [r0, #28] @ _17, -@ Patches/../C_code.c:2971: if (!rank) +@ Patches/../C_code.c:2976: if (!rank) cmp r3, #0 @ _17, - beq .L1256 @, -@ Patches/../C_code.c:2976: if (rank > ranks[4]) + beq .L1259 @, +@ Patches/../C_code.c:2981: if (rank > ranks[4]) ldr r2, [sp, #4] @ _5, %sfp cmp r2, r3 @ _5, _17 - bcs .L1256 @, -.L1254: -@ Patches/../C_code.c:2955: for (int i = 1; i <= GetMaxItems(); i++) + bcs .L1259 @, +.L1257: +@ Patches/../C_code.c:2960: for (int i = 1; i <= GetMaxItems(); i++) adds r4, r4, #1 @ i, - adds r6, r6, #2 @ ivtmp.1324, -.L1252: -@ Patches/../C_code.c:2067: if (MaxItems_Link) - mov r3, r9 @ tmp246, tmp246 + adds r6, r6, #2 @ ivtmp.1329, +.L1255: +@ Patches/../C_code.c:2072: if (MaxItems_Link) + mov r3, r9 @ tmp247, tmp247 ldr r3, [r3] @ c, MaxItems_Link -@ Patches/../C_code.c:2067: if (MaxItems_Link) +@ Patches/../C_code.c:2072: if (MaxItems_Link) cmp r3, #0 @ c, - bne .L1259 @, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + bne .L1262 @, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) mov r3, r10 @ tmp248, tmp248 ldr r3, [r3] @ MaxItems, MaxItems - ldrb r3, [r3] @ _56, *MaxItems.88_55 -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + ldrb r3, [r3] @ _56, *MaxItems.89_55 +@ Patches/../C_code.c:2076: if (*MaxItems > 1) cmp r3, #1 @ _56, - bhi .L1259 @, -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); + bhi .L1262 @, +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); movs r0, #1 @, - bl .L669 @ -@ Patches/../C_code.c:2078: if (table->number != i) + bl .L672 @ +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ tmp240, -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) movs r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r2, #1 @ tmp240, - bne .L1263 @, -.L1261: -@ Patches/../C_code.c:2083: table++; + bne .L1266 @, +.L1264: +@ Patches/../C_code.c:2088: table++; adds r0, r0, #36 @ table, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ MEM[(unsigned char *)table_66 + 6B], MEM[(unsigned char *)table_66 + 6B] -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r3, r2 @ i, MEM[(unsigned char *)table_66 + 6B] - beq .L1261 @, -.L1263: -@ Patches/../C_code.c:2085: int c = table->number; + beq .L1264 @, +.L1266: +@ Patches/../C_code.c:2090: int c = table->number; subs r0, r0, #36 @ tmp241, ldrb r2, [r0, #6] @ _63, -@ Patches/../C_code.c:2085: int c = table->number; +@ Patches/../C_code.c:2090: int c = table->number; subs r3, r2, #0 @ c, _63, -@ Patches/../C_code.c:2090: if (c < 1) - bne .L1262 @, +@ Patches/../C_code.c:2095: if (c < 1) + bne .L1265 @, movs r2, #1 @ _63, -@ Patches/../C_code.c:2092: c = 1; +@ Patches/../C_code.c:2097: c = 1; movs r3, #1 @ c, -.L1262: -@ Patches/../C_code.c:2094: *MaxItems = c; +.L1265: +@ Patches/../C_code.c:2099: *MaxItems = c; mov r1, r10 @ tmp248, tmp248 - ldr r1, [r1] @ MaxItems.90_71, MaxItems -@ Patches/../C_code.c:2094: *MaxItems = c; - strb r2, [r1] @ _63, *MaxItems.90_71 -@ Patches/../C_code.c:2955: for (int i = 1; i <= GetMaxItems(); i++) + ldr r1, [r1] @ MaxItems.91_71, MaxItems +@ Patches/../C_code.c:2099: *MaxItems = c; + strb r2, [r1] @ _63, *MaxItems.91_71 +@ Patches/../C_code.c:2960: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - ble .L1264 @, -.L1272: -@ Patches/../C_code.c:3002: } + ble .L1267 @, +.L1275: +@ Patches/../C_code.c:3007: } mov r0, r8 @, list add sp, sp, #12 @,, @ sp needed @ @@ -9127,18 +9158,18 @@ AppendAvailableStaffList: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1256: -@ Patches/../C_code.c:2984: if (!(type & wexpMask)) +.L1259: +@ Patches/../C_code.c:2989: if (!(type & wexpMask)) lsls r3, r7, #27 @ tmp258, result, - bpl .L1254 @, -@ Patches/../C_code.c:2990: if (WepLockExInstalled) - ldr r3, .L1288+16 @ tmp223, -@ Patches/../C_code.c:2990: if (WepLockExInstalled) + bpl .L1257 @, +@ Patches/../C_code.c:2995: if (WepLockExInstalled) + ldr r3, .L1291+16 @ tmp223, +@ Patches/../C_code.c:2995: if (WepLockExInstalled) ldr r3, [r3] @ WepLockExInstalled, WepLockExInstalled cmp r3, #0 @ WepLockExInstalled, - bne .L1257 @, -.L1258: -@ Patches/../C_code.c:2998: list[0]++; + bne .L1260 @, +.L1261: +@ Patches/../C_code.c:3003: list[0]++; mov r3, r8 @ list, list mov r2, r8 @ list, list ldrb r3, [r3] @ *list_39(D), *list_39(D) @@ -9146,22 +9177,22 @@ AppendAvailableStaffList: lsls r3, r3, #24 @ tmp228, tmp227, lsrs r3, r3, #24 @ _23, tmp228, strb r3, [r2] @ _23, *list_39(D) -@ Patches/../C_code.c:2999: list[list[0]] = i; +@ Patches/../C_code.c:3004: list[list[0]] = i; strb r4, [r2, r3] @ i, *_25 - b .L1254 @ -.L1257: -@ Patches/../C_code.c:2992: if (!CanUnitUseStaff(unit, i)) + b .L1257 @ +.L1260: +@ Patches/../C_code.c:2997: if (!CanUnitUseStaff(unit, i)) movs r1, r4 @, i movs r0, r5 @, unit - ldr r3, .L1288+20 @ tmp231, + ldr r3, .L1291+20 @ tmp231, bl .L14 @ -@ Patches/../C_code.c:2992: if (!CanUnitUseStaff(unit, i)) +@ Patches/../C_code.c:2997: if (!CanUnitUseStaff(unit, i)) cmp r0, #0 @ tmp255, - bne .L1258 @, - b .L1254 @ -.L1289: + bne .L1261 @, + b .L1257 @ +.L1292: .align 2 -.L1288: +.L1291: .word MaxItems_Link .word MaxItems .word GetItemData @@ -9183,47 +9214,47 @@ BuildRingItemList: push {r3, r4, r5, r6, r7, lr} @ mov r7, r8 @, mov lr, r9 @, -@ Patches/../C_code.c:3007: list[0] = 0; +@ Patches/../C_code.c:3012: list[0] = 0; movs r3, #0 @ tmp139, -@ Patches/../C_code.c:3005: { +@ Patches/../C_code.c:3010: { push {r7, lr} @ -@ Patches/../C_code.c:3007: list[0] = 0; +@ Patches/../C_code.c:3012: list[0] = 0; strb r3, [r0] @ tmp139, *list_14(D) -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); - ldr r3, .L1309 @ tmp166, -@ Patches/../C_code.c:3005: { +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); + ldr r3, .L1312 @ tmp166, +@ Patches/../C_code.c:3010: { mov r8, r0 @ list, tmp168 -@ Patches/../C_code.c:3009: for (int i = 1; i <= GetMaxItems(); i++) +@ Patches/../C_code.c:3014: for (int i = 1; i <= GetMaxItems(); i++) movs r4, #1 @ i, -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); mov r9, r3 @ tmp166, tmp166 - ldr r5, .L1309+4 @ ivtmp.1350, - ldr r6, .L1309+8 @ tmp163, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) - ldr r7, .L1309+12 @ tmp165, -@ Patches/../C_code.c:3009: for (int i = 1; i <= GetMaxItems(); i++) - b .L1291 @ -.L1295: -@ Patches/../C_code.c:3009: for (int i = 1; i <= GetMaxItems(); i++) + ldr r5, .L1312+4 @ ivtmp.1355, + ldr r6, .L1312+8 @ tmp163, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) + ldr r7, .L1312+12 @ tmp165, +@ Patches/../C_code.c:3014: for (int i = 1; i <= GetMaxItems(); i++) + b .L1294 @ +.L1298: +@ Patches/../C_code.c:3014: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - bgt .L1308 @, -.L1300: -@ Patches/../C_code.c:3011: if (ItemExceptions[i].NeverChangeInto) + bgt .L1311 @, +.L1303: +@ Patches/../C_code.c:3016: if (ItemExceptions[i].NeverChangeInto) ldrb r3, [r5] @ MEM[(unsigned char *)_50], MEM[(unsigned char *)_50] cmp r3, #0 @ MEM[(unsigned char *)_50], - bne .L1293 @, -@ Patches/../C_code.c:3015: table = GetItemData(i); + bne .L1296 @, +@ Patches/../C_code.c:3020: table = GetItemData(i); movs r0, r4 @, i - bl .L397 @ -@ Patches/../C_code.c:3017: if (!table->useEffectId) + bl .L400 @ +@ Patches/../C_code.c:3022: if (!table->useEffectId) ldrb r3, [r0, #30] @ tmp143, cmp r3, #0 @ tmp143, - beq .L1293 @, -@ Patches/../C_code.c:3022: if (table->weaponType != 0xC) + beq .L1296 @, +@ Patches/../C_code.c:3027: if (table->weaponType != 0xC) ldrb r3, [r0, #7] @ tmp144, cmp r3, #12 @ tmp144, - bne .L1293 @, -@ Patches/../C_code.c:3026: list[0]++; + bne .L1296 @, +@ Patches/../C_code.c:3031: list[0]++; mov r3, r8 @ list, list mov r2, r8 @ list, list ldrb r3, [r3] @ *list_14(D), *list_14(D) @@ -9231,65 +9262,65 @@ BuildRingItemList: lsls r3, r3, #24 @ tmp148, tmp147, lsrs r3, r3, #24 @ _5, tmp148, strb r3, [r2] @ _5, *list_14(D) -@ Patches/../C_code.c:3027: list[list[0]] = i; +@ Patches/../C_code.c:3032: list[list[0]] = i; strb r4, [r2, r3] @ i, *_7 -.L1293: -@ Patches/../C_code.c:3009: for (int i = 1; i <= GetMaxItems(); i++) +.L1296: +@ Patches/../C_code.c:3014: for (int i = 1; i <= GetMaxItems(); i++) adds r4, r4, #1 @ i, - adds r5, r5, #2 @ ivtmp.1350, -.L1291: -@ Patches/../C_code.c:2067: if (MaxItems_Link) + adds r5, r5, #2 @ ivtmp.1355, +.L1294: +@ Patches/../C_code.c:2072: if (MaxItems_Link) ldr r3, [r6] @ c, MaxItems_Link -@ Patches/../C_code.c:2067: if (MaxItems_Link) +@ Patches/../C_code.c:2072: if (MaxItems_Link) cmp r3, #0 @ c, - bne .L1295 @, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + bne .L1298 @, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) ldr r3, [r7] @ MaxItems, MaxItems - ldrb r3, [r3] @ _24, *MaxItems.88_23 -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + ldrb r3, [r3] @ _24, *MaxItems.89_23 +@ Patches/../C_code.c:2076: if (*MaxItems > 1) cmp r3, #1 @ _24, - bhi .L1295 @, -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); + bhi .L1298 @, +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); movs r0, #1 @, - bl .L397 @ -@ Patches/../C_code.c:2078: if (table->number != i) + bl .L400 @ +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ tmp157, -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) movs r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r2, #1 @ tmp157, - bne .L1299 @, -.L1297: -@ Patches/../C_code.c:2083: table++; + bne .L1302 @, +.L1300: +@ Patches/../C_code.c:2088: table++; adds r0, r0, #36 @ table, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ MEM[(unsigned char *)table_34 + 6B], MEM[(unsigned char *)table_34 + 6B] -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r3, r2 @ i, MEM[(unsigned char *)table_34 + 6B] - beq .L1297 @, -.L1299: -@ Patches/../C_code.c:2085: int c = table->number; + beq .L1300 @, +.L1302: +@ Patches/../C_code.c:2090: int c = table->number; subs r0, r0, #36 @ tmp158, ldrb r2, [r0, #6] @ _31, -@ Patches/../C_code.c:2085: int c = table->number; +@ Patches/../C_code.c:2090: int c = table->number; subs r3, r2, #0 @ c, _31, -@ Patches/../C_code.c:2090: if (c < 1) - bne .L1298 @, +@ Patches/../C_code.c:2095: if (c < 1) + bne .L1301 @, movs r2, #1 @ _31, -@ Patches/../C_code.c:2092: c = 1; +@ Patches/../C_code.c:2097: c = 1; movs r3, #1 @ c, -.L1298: -@ Patches/../C_code.c:2094: *MaxItems = c; - ldr r1, [r7] @ MaxItems.90_39, MaxItems -@ Patches/../C_code.c:2094: *MaxItems = c; - strb r2, [r1] @ _31, *MaxItems.90_39 -@ Patches/../C_code.c:3009: for (int i = 1; i <= GetMaxItems(); i++) +.L1301: +@ Patches/../C_code.c:2099: *MaxItems = c; + ldr r1, [r7] @ MaxItems.91_39, MaxItems +@ Patches/../C_code.c:2099: *MaxItems = c; + strb r2, [r1] @ _31, *MaxItems.91_39 +@ Patches/../C_code.c:3014: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - ble .L1300 @, -.L1308: -@ Patches/../C_code.c:3030: } + ble .L1303 @, +.L1311: +@ Patches/../C_code.c:3035: } @ sp needed @ mov r0, r8 @, list pop {r6, r7} @@ -9298,9 +9329,9 @@ BuildRingItemList: pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L1310: +.L1313: .align 2 -.L1309: +.L1312: .word GetItemData .word ItemExceptions+3 .word MaxItems_Link @@ -9324,9 +9355,9 @@ BuildSimilarPriceItemList: mov r7, r10 @, push {r5, r6, r7, lr} @ sub sp, sp, #20 @,, -@ Patches/../C_code.c:3033: { +@ Patches/../C_code.c:3038: { str r3, [sp, #8] @ tmp294, %sfp -@ Patches/../C_code.c:3037: int badAttr = IA_LOCK_3; // manakete lock +@ Patches/../C_code.c:3042: int badAttr = IA_LOCK_3; // manakete lock subs r3, r2, #1 @ tmp266, tmp293 sbcs r2, r2, r3 @ tmp265, tmp293, tmp266 movs r3, #5 @ tmp268, @@ -9336,188 +9367,188 @@ BuildSimilarPriceItemList: movs r3, #128 @ tmp331, lsls r3, r3, #3 @ tmp331, tmp331, mov ip, r3 @ tmp331, tmp331 -@ Patches/../C_code.c:3043: int originalPrice = GetItemData(item)->costPerUse; - ldr r3, .L1355 @ tmp262, -@ Patches/../C_code.c:3033: { +@ Patches/../C_code.c:3048: int originalPrice = GetItemData(item)->costPerUse; + ldr r3, .L1358 @ tmp263, +@ Patches/../C_code.c:3038: { mov r10, r0 @ list, tmp291 -@ Patches/../C_code.c:3043: int originalPrice = GetItemData(item)->costPerUse; +@ Patches/../C_code.c:3048: int originalPrice = GetItemData(item)->costPerUse; movs r0, r1 @, item -@ Patches/../C_code.c:3033: { +@ Patches/../C_code.c:3038: { movs r5, r1 @ item, tmp292 -@ Patches/../C_code.c:3043: int originalPrice = GetItemData(item)->costPerUse; - mov r8, r3 @ tmp262, tmp262 -@ Patches/../C_code.c:3037: int badAttr = IA_LOCK_3; // manakete lock +@ Patches/../C_code.c:3048: int originalPrice = GetItemData(item)->costPerUse; + mov r8, r3 @ tmp263, tmp263 +@ Patches/../C_code.c:3042: int badAttr = IA_LOCK_3; // manakete lock add r9, r9, ip @ badAttr, tmp331 -@ Patches/../C_code.c:3043: int originalPrice = GetItemData(item)->costPerUse; +@ Patches/../C_code.c:3048: int originalPrice = GetItemData(item)->costPerUse; bl .L14 @ -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); - ldr r3, .L1355+4 @ tmp180, +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); + ldr r3, .L1358+4 @ tmp180, ldr r3, [r3] @ RandValues, RandValues -@ Patches/../C_code.c:3043: int originalPrice = GetItemData(item)->costPerUse; +@ Patches/../C_code.c:3048: int originalPrice = GetItemData(item)->costPerUse; ldrh r4, [r0, #26] @ originalPrice, -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); - ldrh r0, [r3, #2] @ *RandValues.134_3, *RandValues.134_3 - lsls r0, r0, #23 @ tmp185, *RandValues.134_3, +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); + ldrh r0, [r3, #2] @ *RandValues.135_3, *RandValues.135_3 + lsls r0, r0, #23 @ tmp185, *RandValues.135_3, lsrs r0, r0, #27 @ tmp186, tmp185, -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); - ldr r3, .L1355+8 @ tmp189, +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); + ldr r3, .L1358+8 @ tmp189, movs r1, #100 @, muls r0, r4 @ tmp188, originalPrice bl .L14 @ -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); lsls r3, r0, #2 @ tmp191, tmp296, adds r3, r3, r0 @ tmp192, tmp191, tmp296 -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); adds r3, r3, #200 @ tmp193, -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); adds r6, r3, r4 @ originalPrice, tmp193, originalPrice -@ Patches/../C_code.c:3046: int uses = GetItemData(item)->maxUses; +@ Patches/../C_code.c:3051: int uses = GetItemData(item)->maxUses; movs r0, r5 @, item -@ Patches/../C_code.c:3045: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); +@ Patches/../C_code.c:3050: originalPrice += 200 + (Div1((originalPrice * RandValues->variance), 100) * 5); str r6, [sp, #4] @ originalPrice, %sfp -@ Patches/../C_code.c:3046: int uses = GetItemData(item)->maxUses; - bl .L208 @ -@ Patches/../C_code.c:3046: int uses = GetItemData(item)->maxUses; +@ Patches/../C_code.c:3051: int uses = GetItemData(item)->maxUses; + bl .L211 @ +@ Patches/../C_code.c:3051: int uses = GetItemData(item)->maxUses; ldrb r3, [r0, #20] @ uses, -@ Patches/../C_code.c:3047: if (!uses) +@ Patches/../C_code.c:3052: if (!uses) cmp r3, #0 @ uses, - beq .L1313 @, -@ Patches/../C_code.c:3051: originalPrice = originalPrice * uses; + beq .L1316 @, +@ Patches/../C_code.c:3056: originalPrice = originalPrice * uses; mov ip, r6 @ originalPrice, originalPrice mov r2, ip @ originalPrice, originalPrice muls r2, r3 @ originalPrice, uses -@ Patches/../C_code.c:3052: minPrice = minPrice * uses; +@ Patches/../C_code.c:3057: minPrice = minPrice * uses; muls r4, r3 @ originalPrice, uses -@ Patches/../C_code.c:3051: originalPrice = originalPrice * uses; +@ Patches/../C_code.c:3056: originalPrice = originalPrice * uses; str r2, [sp, #4] @ originalPrice, %sfp -.L1313: -@ Patches/../C_code.c:3053: if (minPrice < 2000) +.L1316: +@ Patches/../C_code.c:3058: if (minPrice < 2000) movs r2, #250 @ tmp195, -@ Patches/../C_code.c:3055: minPrice = 0; +@ Patches/../C_code.c:3060: minPrice = 0; movs r3, #0 @ _22, -@ Patches/../C_code.c:3053: if (minPrice < 2000) +@ Patches/../C_code.c:3058: if (minPrice < 2000) lsls r2, r2, #3 @ tmp195, tmp195, cmp r4, r2 @ originalPrice, tmp195 - blt .L1314 @, -@ Patches/../C_code.c:3060: if (minPrice > 4000) + blt .L1317 @, +@ Patches/../C_code.c:3065: if (minPrice > 4000) movs r2, #250 @ tmp196, -@ Patches/../C_code.c:3059: minPrice = minPrice >> 2; +@ Patches/../C_code.c:3064: minPrice = minPrice >> 2; asrs r3, r4, #2 @ _22, originalPrice, -@ Patches/../C_code.c:3060: if (minPrice > 4000) +@ Patches/../C_code.c:3065: if (minPrice > 4000) lsls r2, r2, #4 @ tmp196, tmp196, cmp r3, r2 @ _22, tmp196 - ble .LCB7770 @ - b .L1350 @long jump @ -.LCB7770: -.L1314: -@ Patches/../C_code.c:3066: list[0] = 0; // count + ble .LCB7794 @ + b .L1353 @long jump @ +.LCB7794: +.L1317: +@ Patches/../C_code.c:3071: list[0] = 0; // count movs r2, #0 @ tmp197, mov r1, r10 @ list, list strb r2, [r1] @ tmp197, *list_53(D) -@ Patches/../C_code.c:3090: if (table->descTextId == MONEYBAG_DESC) - ldr r2, .L1355+12 @ tmp290, -@ Patches/../C_code.c:3067: for (int i = 1; i <= GetMaxItems(); i++) +@ Patches/../C_code.c:3095: if (table->descTextId == MONEYBAG_DESC) + ldr r2, .L1358+12 @ tmp290, +@ Patches/../C_code.c:3072: for (int i = 1; i <= GetMaxItems(); i++) movs r4, #1 @ i, -@ Patches/../C_code.c:3090: if (table->descTextId == MONEYBAG_DESC) +@ Patches/../C_code.c:3095: if (table->descTextId == MONEYBAG_DESC) mov fp, r2 @ tmp290, tmp290 - ldr r5, .L1355+16 @ ivtmp.1369, - ldr r6, .L1355+20 @ tmp263, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) - ldr r7, .L1355+24 @ tmp289, + ldr r5, .L1358+16 @ ivtmp.1374, + ldr r6, .L1358+20 @ tmp264, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) + ldr r7, .L1358+24 @ tmp289, str r3, [sp, #12] @ _22, %sfp -.L1316: -@ Patches/../C_code.c:2067: if (MaxItems_Link) +.L1319: +@ Patches/../C_code.c:2072: if (MaxItems_Link) ldr r3, [r6] @ c, MaxItems_Link -@ Patches/../C_code.c:2067: if (MaxItems_Link) +@ Patches/../C_code.c:2072: if (MaxItems_Link) cmp r3, #0 @ c, - bne .L1324 @, -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + bne .L1327 @, +@ Patches/../C_code.c:2076: if (*MaxItems > 1) ldr r3, [r7] @ MaxItems, MaxItems - ldrb r3, [r3] @ _66, *MaxItems.88_65 -@ Patches/../C_code.c:2071: if (*MaxItems > 1) + ldrb r3, [r3] @ _66, *MaxItems.89_65 +@ Patches/../C_code.c:2076: if (*MaxItems > 1) cmp r3, #1 @ _66, - bls .L1351 @, -.L1324: -@ Patches/../C_code.c:3067: for (int i = 1; i <= GetMaxItems(); i++) + bls .L1354 @, +.L1327: +@ Patches/../C_code.c:3072: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - bgt .L1352 @, -.L1329: -@ Patches/../C_code.c:3069: if (ItemExceptions[i].NeverChangeInto) + bgt .L1355 @, +.L1332: +@ Patches/../C_code.c:3074: if (ItemExceptions[i].NeverChangeInto) ldrb r3, [r5] @ MEM[(unsigned char *)_84], MEM[(unsigned char *)_84] cmp r3, #0 @ MEM[(unsigned char *)_84], - bne .L1318 @, -@ Patches/../C_code.c:3073: table = GetItemData(i); + bne .L1321 @, +@ Patches/../C_code.c:3078: table = GetItemData(i); movs r0, r4 @, i - bl .L208 @ -@ Patches/../C_code.c:3074: if (table->attributes & badAttr) + bl .L211 @ +@ Patches/../C_code.c:3079: if (table->attributes & badAttr) mov r2, r9 @ badAttr, badAttr -@ Patches/../C_code.c:3074: if (table->attributes & badAttr) +@ Patches/../C_code.c:3079: if (table->attributes & badAttr) ldr r3, [r0, #8] @ table_57->attributes, table_57->attributes -@ Patches/../C_code.c:3074: if (table->attributes & badAttr) +@ Patches/../C_code.c:3079: if (table->attributes & badAttr) tst r3, r2 @ table_57->attributes, badAttr - bne .L1318 @, -@ Patches/../C_code.c:3081: if ((effectID == 0x33) || (effectID == 0x34) || (effectID == 0x35)) + bne .L1321 @, +@ Patches/../C_code.c:3086: if ((effectID == 0x33) || (effectID == 0x34) || (effectID == 0x35)) ldrb r3, [r0, #30] @ tmp203, subs r3, r3, #51 @ tmp204, -@ Patches/../C_code.c:3081: if ((effectID == 0x33) || (effectID == 0x34) || (effectID == 0x35)) +@ Patches/../C_code.c:3086: if ((effectID == 0x33) || (effectID == 0x34) || (effectID == 0x35)) cmp r3, #2 @ tmp204, - bls .L1318 @, -@ Patches/../C_code.c:3085: if (table->weaponType == 0xC) + bls .L1321 @, +@ Patches/../C_code.c:3090: if (table->weaponType == 0xC) ldrb r3, [r0, #7] @ tmp205, cmp r3, #12 @ tmp205, - beq .L1318 @, -@ Patches/../C_code.c:3090: if (table->descTextId == MONEYBAG_DESC) + beq .L1321 @, +@ Patches/../C_code.c:3095: if (table->descTextId == MONEYBAG_DESC) ldrh r3, [r0, #2] @ _20, -@ Patches/../C_code.c:3090: if (table->descTextId == MONEYBAG_DESC) +@ Patches/../C_code.c:3095: if (table->descTextId == MONEYBAG_DESC) cmp r3, fp @ _20, tmp290 - beq .L1318 @, -@ Patches/../C_code.c:3094: if (!table->nameTextId) + beq .L1321 @, +@ Patches/../C_code.c:3099: if (!table->nameTextId) ldrh r2, [r0] @ *table_57, *table_57 -@ Patches/../C_code.c:3105: if (table->descTextId == 0x4AB) +@ Patches/../C_code.c:3110: if (table->descTextId == 0x4AB) cmp r2, #0 @ *table_57, - beq .L1318 @, - ldr r2, .L1355+28 @ tmp342, + beq .L1321 @, + ldr r2, .L1358+28 @ tmp342, mov ip, r2 @ tmp342, tmp342 add r3, r3, ip @ tmp218, tmp342 cmp r3, #0 @ tmp218, - beq .L1318 @, -@ Patches/../C_code.c:3113: if ((costReq) && (!cost)) + beq .L1321 @, +@ Patches/../C_code.c:3118: if ((costReq) && (!cost)) ldr r1, [sp, #8] @ costReq, %sfp -@ Patches/../C_code.c:3111: uses = table->maxUses; +@ Patches/../C_code.c:3116: uses = table->maxUses; ldrb r2, [r0, #20] @ _23, -@ Patches/../C_code.c:3112: int cost = table->costPerUse; +@ Patches/../C_code.c:3117: int cost = table->costPerUse; ldrh r3, [r0, #26] @ cost, -@ Patches/../C_code.c:3113: if ((costReq) && (!cost)) +@ Patches/../C_code.c:3118: if ((costReq) && (!cost)) cmp r1, #0 @ costReq, - beq .L1334 @, + beq .L1337 @, cmp r3, #0 @ cost, - beq .L1318 @, -.L1334: -@ Patches/../C_code.c:3117: if (!uses) - cmp r2, #0 @ _23, beq .L1321 @, -@ Patches/../C_code.c:3121: if ((cost * uses) > originalPrice) +.L1337: +@ Patches/../C_code.c:3122: if (!uses) + cmp r2, #0 @ _23, + beq .L1324 @, +@ Patches/../C_code.c:3126: if ((cost * uses) > originalPrice) muls r3, r2 @ cost, _23 -.L1321: -@ Patches/../C_code.c:3125: if ((cost * uses) < minPrice) +.L1324: +@ Patches/../C_code.c:3130: if ((cost * uses) < minPrice) ldr r1, [sp, #12] @ _22, %sfp movs r2, #1 @ tmp232, cmp r1, r3 @ _22, cost - bgt .L1322 @, + bgt .L1325 @, movs r2, #0 @ tmp232, -.L1322: +.L1325: lsls r2, r2, #24 @ tmp237, tmp232, - bne .L1318 @, -@ Patches/../C_code.c:3121: if ((cost * uses) > originalPrice) + bne .L1321 @, +@ Patches/../C_code.c:3126: if ((cost * uses) > originalPrice) ldr r1, [sp, #4] @ originalPrice, %sfp movs r2, #1 @ tmp238, cmp r1, r3 @ originalPrice, cost - bge .L1353 @, -@ Patches/../C_code.c:3125: if ((cost * uses) < minPrice) + bge .L1356 @, +@ Patches/../C_code.c:3130: if ((cost * uses) < minPrice) lsls r2, r2, #24 @ tmp243, tmp238, - bne .L1318 @, -.L1354: -@ Patches/../C_code.c:3129: list[0]++; + bne .L1321 @, +.L1357: +@ Patches/../C_code.c:3134: list[0]++; mov r3, r10 @ list, list mov r2, r10 @ list, list ldrb r3, [r3] @ *list_53(D), *list_53(D) @@ -9525,55 +9556,55 @@ BuildSimilarPriceItemList: lsls r3, r3, #24 @ tmp247, tmp246, lsrs r3, r3, #24 @ _30, tmp247, strb r3, [r2] @ _30, *list_53(D) -@ Patches/../C_code.c:3130: list[list[0]] = i; +@ Patches/../C_code.c:3135: list[list[0]] = i; strb r4, [r2, r3] @ i, *_32 -.L1318: -@ Patches/../C_code.c:3067: for (int i = 1; i <= GetMaxItems(); i++) +.L1321: +@ Patches/../C_code.c:3072: for (int i = 1; i <= GetMaxItems(); i++) adds r4, r4, #1 @ i, - adds r5, r5, #2 @ ivtmp.1369, - b .L1316 @ -.L1351: -@ Patches/../C_code.c:2075: const struct ItemData * table = GetItemData(1); + adds r5, r5, #2 @ ivtmp.1374, + b .L1319 @ +.L1354: +@ Patches/../C_code.c:2080: const struct ItemData * table = GetItemData(1); movs r0, #1 @, - bl .L208 @ -@ Patches/../C_code.c:2078: if (table->number != i) + bl .L211 @ +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ tmp256, -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) movs r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r2, #1 @ tmp256, - bne .L1328 @, -.L1326: -@ Patches/../C_code.c:2083: table++; + bne .L1331 @, +.L1329: +@ Patches/../C_code.c:2088: table++; adds r0, r0, #36 @ table, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) ldrb r2, [r0, #6] @ MEM[(unsigned char *)table_76 + 6B], MEM[(unsigned char *)table_76 + 6B] -@ Patches/../C_code.c:2076: for (int i = 1; i <= 256; i++) +@ Patches/../C_code.c:2081: for (int i = 1; i <= 256; i++) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:2078: if (table->number != i) +@ Patches/../C_code.c:2083: if (table->number != i) cmp r3, r2 @ i, MEM[(unsigned char *)table_76 + 6B] - beq .L1326 @, -.L1328: -@ Patches/../C_code.c:2085: int c = table->number; + beq .L1329 @, +.L1331: +@ Patches/../C_code.c:2090: int c = table->number; subs r0, r0, #36 @ tmp257, ldrb r2, [r0, #6] @ _73, -@ Patches/../C_code.c:2085: int c = table->number; +@ Patches/../C_code.c:2090: int c = table->number; subs r3, r2, #0 @ c, _73, -@ Patches/../C_code.c:2090: if (c < 1) - bne .L1327 @, +@ Patches/../C_code.c:2095: if (c < 1) + bne .L1330 @, movs r2, #1 @ _73, -@ Patches/../C_code.c:2092: c = 1; +@ Patches/../C_code.c:2097: c = 1; movs r3, #1 @ c, -.L1327: -@ Patches/../C_code.c:2094: *MaxItems = c; - ldr r1, [r7] @ MaxItems.90_81, MaxItems -@ Patches/../C_code.c:2094: *MaxItems = c; - strb r2, [r1] @ _73, *MaxItems.90_81 -@ Patches/../C_code.c:3067: for (int i = 1; i <= GetMaxItems(); i++) +.L1330: +@ Patches/../C_code.c:2099: *MaxItems = c; + ldr r1, [r7] @ MaxItems.91_81, MaxItems +@ Patches/../C_code.c:2099: *MaxItems = c; + strb r2, [r1] @ _73, *MaxItems.91_81 +@ Patches/../C_code.c:3072: for (int i = 1; i <= GetMaxItems(); i++) cmp r4, r3 @ i, c - ble .L1329 @, -.L1352: -@ Patches/../C_code.c:3134: } + ble .L1332 @, +.L1355: +@ Patches/../C_code.c:3139: } mov r0, r10 @, list add sp, sp, #20 @,, @ sp needed @ @@ -9585,20 +9616,20 @@ BuildSimilarPriceItemList: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1350: -@ Patches/../C_code.c:3060: if (minPrice > 4000) - movs r3, r2 @ _22, tmp196 - b .L1314 @ .L1353: -@ Patches/../C_code.c:3121: if ((cost * uses) > originalPrice) +@ Patches/../C_code.c:3065: if (minPrice > 4000) + movs r3, r2 @ _22, tmp196 + b .L1317 @ +.L1356: +@ Patches/../C_code.c:3126: if ((cost * uses) > originalPrice) movs r2, #0 @ tmp238, -@ Patches/../C_code.c:3125: if ((cost * uses) < minPrice) +@ Patches/../C_code.c:3130: if ((cost * uses) < minPrice) lsls r2, r2, #24 @ tmp243, tmp238, - beq .L1354 @, - b .L1318 @ -.L1356: + beq .L1357 @, + b .L1321 @ +.L1359: .align 2 -.L1355: +.L1358: .word GetItemData .word RandValues .word Div1 @@ -9619,157 +9650,157 @@ RandNewItem.part.0: @ args = 8, pretend = 0, frame = 256 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:3186: item &= 0xFF; +@ Patches/../C_code.c:3191: item &= 0xFF; movs r4, #255 @ tmp149, ands r4, r0 @ item, tmp184 -@ Patches/../C_code.c:3187: if (ItemExceptions[item].NeverChangeFrom) - ldr r0, .L1387 @ tmp150, -@ Patches/../C_code.c:3180: int RandNewItem(int item, int noise[], int offset, int costReq, int varyByCh, int noWeapons) +@ Patches/../C_code.c:3192: if (ItemExceptions[item].NeverChangeFrom) + ldr r0, .L1390 @ tmp150, +@ Patches/../C_code.c:3185: int RandNewItem(int item, int noise[], int offset, int costReq, int varyByCh, int noWeapons) movs r6, r2 @ offset, tmp186 -@ Patches/../C_code.c:3187: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3192: if (ItemExceptions[item].NeverChangeFrom) lsls r2, r4, #1 @ tmp151, item, -@ Patches/../C_code.c:3187: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3192: if (ItemExceptions[item].NeverChangeFrom) ldrb r2, [r2, r0] @ tmp152, ItemExceptions -@ Patches/../C_code.c:3180: int RandNewItem(int item, int noise[], int offset, int costReq, int varyByCh, int noWeapons) +@ Patches/../C_code.c:3185: int RandNewItem(int item, int noise[], int offset, int costReq, int varyByCh, int noWeapons) movs r5, r1 @ noise, tmp185 sub sp, sp, #256 @,, -@ Patches/../C_code.c:3187: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3192: if (ItemExceptions[item].NeverChangeFrom) cmp r2, #0 @ tmp152, - bne .L1367 @, -@ Patches/../C_code.c:3192: list[0] = 99; // so compiler doesn't assume uninitialized or whatever + bne .L1370 @, +@ Patches/../C_code.c:3197: list[0] = 99; // so compiler doesn't assume uninitialized or whatever movs r2, #99 @ tmp156, mov r1, sp @ tmp198, -@ Patches/../C_code.c:3194: BuildSimilarPriceItemList(list, item, noWeapons, costReq); +@ Patches/../C_code.c:3199: BuildSimilarPriceItemList(list, item, noWeapons, costReq); mov r0, sp @, -@ Patches/../C_code.c:3192: list[0] = 99; // so compiler doesn't assume uninitialized or whatever +@ Patches/../C_code.c:3197: list[0] = 99; // so compiler doesn't assume uninitialized or whatever strb r2, [r1] @ tmp156, list[0] -@ Patches/../C_code.c:3194: BuildSimilarPriceItemList(list, item, noWeapons, costReq); +@ Patches/../C_code.c:3199: BuildSimilarPriceItemList(list, item, noWeapons, costReq); movs r1, r4 @, item ldr r2, [sp, #276] @, noWeapons bl BuildSimilarPriceItemList @ -@ Patches/../C_code.c:3195: if (list[0]) +@ Patches/../C_code.c:3200: if (list[0]) mov r3, sp @ tmp199, ldrb r1, [r3] @ _7, list -@ Patches/../C_code.c:3195: if (list[0]) +@ Patches/../C_code.c:3200: if (list[0]) cmp r1, #0 @ _7, - beq .L1360 @, -@ Patches/../C_code.c:3197: if (varyByCh) + beq .L1363 @, +@ Patches/../C_code.c:3202: if (varyByCh) ldr r3, [sp, #272] @ tmp200, varyByCh -@ Patches/../C_code.c:3199: c = HashByte_Ch(item, list[0] + 1, noise, offset); +@ Patches/../C_code.c:3204: c = HashByte_Ch(item, list[0] + 1, noise, offset); adds r1, r1, #1 @ _86, -@ Patches/../C_code.c:3197: if (varyByCh) +@ Patches/../C_code.c:3202: if (varyByCh) cmp r3, #0 @ tmp200, - bne .L1381 @, -.L1361: -@ Patches/../C_code.c:3203: c = HashByte_Global(item, list[0] + 1, noise, offset); + bne .L1384 @, +.L1364: +@ Patches/../C_code.c:3208: c = HashByte_Global(item, list[0] + 1, noise, offset); movs r3, r6 @, offset movs r2, r5 @, noise movs r0, r4 @, item bl HashByte_Global @ -@ Patches/../C_code.c:3205: if (!c) +@ Patches/../C_code.c:3210: if (!c) cmp r0, #0 @ c, - bne .L1366 @, -@ Patches/../C_code.c:3207: c = 1; + bne .L1369 @, +@ Patches/../C_code.c:3212: c = 1; adds r0, r0, #1 @ c, -.L1366: -@ Patches/../C_code.c:3209: item = list[c]; +.L1369: +@ Patches/../C_code.c:3214: item = list[c]; mov r3, sp @ tmp202, ldrb r4, [r3, r0] @ item, list -.L1360: -@ Patches/../C_code.c:3212: if (GetItemData(item)->nameTextId == 0xFFFF) - ldr r3, .L1387+4 @ tmp170, +.L1363: +@ Patches/../C_code.c:3217: if (GetItemData(item)->nameTextId == 0xFFFF) + ldr r3, .L1390+4 @ tmp170, movs r0, r4 @, item bl .L14 @ -@ Patches/../C_code.c:3212: if (GetItemData(item)->nameTextId == 0xFFFF) - ldr r3, .L1387+8 @ tmp172, +@ Patches/../C_code.c:3217: if (GetItemData(item)->nameTextId == 0xFFFF) + ldr r3, .L1390+8 @ tmp172, ldrh r2, [r0] @ *_24, *_24 cmp r2, r3 @ *_24, tmp172 - beq .L1382 @, -.L1367: -@ Patches/../C_code.c:3229: return MakeNewItem(item); + beq .L1385 @, +.L1370: +@ Patches/../C_code.c:3234: return MakeNewItem(item); movs r0, r4 @, item - ldr r3, .L1387+12 @ tmp181, + ldr r3, .L1390+12 @ tmp181, bl .L14 @ -.L1357: -@ Patches/../C_code.c:3230: } +.L1360: +@ Patches/../C_code.c:3235: } add sp, sp, #256 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L1382: -@ Patches/../C_code.c:3216: c = HashByte_Ch(item, NumberOfSkills, noise, offset); - ldr r3, .L1387+16 @ tmp173, +.L1385: +@ Patches/../C_code.c:3221: c = HashByte_Ch(item, NumberOfSkills, noise, offset); + ldr r3, .L1390+16 @ tmp173, ldr r1, [r3] @ pretmp_84, NumberOfSkills -@ Patches/../C_code.c:3214: if (varyByCh) +@ Patches/../C_code.c:3219: if (varyByCh) ldr r3, [sp, #272] @ tmp203, varyByCh cmp r3, #0 @ tmp203, - bne .L1383 @, -.L1368: -@ Patches/../C_code.c:3220: c = HashByte_Global(item, NumberOfSkills, noise, offset); + bne .L1386 @, +.L1371: +@ Patches/../C_code.c:3225: c = HashByte_Global(item, NumberOfSkills, noise, offset); movs r3, r6 @, offset movs r2, r5 @, noise movs r0, r4 @, item bl HashByte_Global @ -@ Patches/../C_code.c:3222: if (!c) +@ Patches/../C_code.c:3227: if (!c) cmp r0, #0 @ c, - bne .L1384 @, + bne .L1387 @, movs r0, #128 @ _82, lsls r0, r0, #1 @ _82, _82, -@ Patches/../C_code.c:3226: return item | (c << 8); // random durability +@ Patches/../C_code.c:3231: return item | (c << 8); // random durability orrs r0, r4 @ , item - b .L1357 @ -.L1384: -@ Patches/../C_code.c:3226: return item | (c << 8); // random durability + b .L1360 @ +.L1387: +@ Patches/../C_code.c:3231: return item | (c << 8); // random durability lsls r0, r0, #8 @ _82, c, -@ Patches/../C_code.c:3226: return item | (c << 8); // random durability +@ Patches/../C_code.c:3231: return item | (c << 8); // random durability orrs r0, r4 @ , item - b .L1357 @ -.L1383: + b .L1360 @ +.L1386: movs r0, r5 @ _48, noise - movs r3, r5 @ ivtmp.1382, noise + movs r3, r5 @ ivtmp.1387, noise adds r0, r0, #16 @ _48, -.L1371: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L1374: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_64], MEM[(int *)_64] cmp r2, #0 @ MEM[(int *)_64], - beq .L1385 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1382, - cmp r0, r3 @ _48, ivtmp.1382 - bne .L1371 @, - b .L1368 @ -.L1381: + beq .L1388 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1387, + cmp r0, r3 @ _48, ivtmp.1387 + bne .L1374 @, + b .L1371 @ +.L1384: movs r0, r5 @ _10, noise - movs r3, r5 @ ivtmp.1389, noise + movs r3, r5 @ ivtmp.1394, noise adds r0, r0, #16 @ _10, -.L1364: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L1367: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_54], MEM[(int *)_54] cmp r2, #0 @ MEM[(int *)_54], - beq .L1386 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1389, - cmp r0, r3 @ _10, ivtmp.1389 - bne .L1364 @, - b .L1361 @ -.L1386: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L1387+20 @ tmp162, + beq .L1389 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1394, + cmp r0, r3 @ _10, ivtmp.1394 + bne .L1367 @, + b .L1364 @ +.L1389: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L1390+20 @ tmp162, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_54 -@ Patches/../C_code.c:2366: break; - b .L1361 @ -.L1385: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L1387+20 @ tmp175, +@ Patches/../C_code.c:2371: break; + b .L1364 @ +.L1388: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L1390+20 @ tmp175, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_64 -@ Patches/../C_code.c:2366: break; - b .L1368 @ -.L1388: +@ Patches/../C_code.c:2371: break; + b .L1371 @ +.L1391: .align 2 -.L1387: +.L1390: .word ItemExceptions .word GetItemData .word 65535 @@ -9789,144 +9820,144 @@ RandNewWeapon.part.0: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ mov lr, r8 @, -@ Patches/../C_code.c:3238: item &= 0xFF; +@ Patches/../C_code.c:3243: item &= 0xFF; movs r4, #255 @ tmp188, -@ Patches/../C_code.c:3232: int RandNewWeapon(struct Unit * unit, int item, int noise[], int offset, u8 list[]) +@ Patches/../C_code.c:3237: int RandNewWeapon(struct Unit * unit, int item, int noise[], int offset, u8 list[]) push {lr} @ movs r5, r0 @ unit, tmp286 sub sp, sp, #256 @,, -@ Patches/../C_code.c:3232: int RandNewWeapon(struct Unit * unit, int item, int noise[], int offset, u8 list[]) +@ Patches/../C_code.c:3237: int RandNewWeapon(struct Unit * unit, int item, int noise[], int offset, u8 list[]) movs r7, r2 @ noise, tmp288 mov r8, r3 @ offset, tmp289 -@ Patches/../C_code.c:3238: item &= 0xFF; +@ Patches/../C_code.c:3243: item &= 0xFF; ands r4, r1 @ item, tmp287 -@ Patches/../C_code.c:2016: int result = ShouldRandomizeClass(unit); +@ Patches/../C_code.c:2021: int result = ShouldRandomizeClass(unit); bl ShouldRandomizeClass @ -@ Patches/../C_code.c:2017: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); +@ Patches/../C_code.c:2022: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); ldr r3, [r5] @ unit_3(D)->pCharacterData, unit_3(D)->pCharacterData -@ Patches/../C_code.c:2016: int result = ShouldRandomizeClass(unit); +@ Patches/../C_code.c:2021: int result = ShouldRandomizeClass(unit); movs r6, r0 @ result, tmp290 -@ Patches/../C_code.c:2017: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); +@ Patches/../C_code.c:2022: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); ldrb r0, [r3, #4] @ tmp190, @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) - ldr r3, .L1467 @ tmp191, + ldr r3, .L1470 @ tmp191, bl .L14 @ @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) ldrh r3, [r0, #6] @ tmp192, cmp r3, #0 @ tmp192, - beq .L1390 @, + beq .L1393 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L1467+4 @ tmp194, + ldr r3, .L1470+4 @ tmp194, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r1, [r3] @ *RecruitValues.0_108, *RecruitValues.0_108 lsls r1, r1, #29 @ tmp199, *RecruitValues.0_108, lsrs r1, r1, #29 @ tmp200, tmp199, -@ Patches/../C_code.c:2017: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); +@ Patches/../C_code.c:2022: result |= ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); orrs r6, r1 @ result, tmp200 -.L1390: -@ Patches/../C_code.c:3239: if (!IsClassOrRecruitmentRandomized(unit)) +.L1393: +@ Patches/../C_code.c:3244: if (!IsClassOrRecruitmentRandomized(unit)) cmp r6, #0 @ result, - beq .L1419 @, -@ Patches/../C_code.c:3243: if (ItemExceptions[item].NeverChangeFrom) - ldr r3, .L1467+8 @ tmp203, + beq .L1422 @, +@ Patches/../C_code.c:3248: if (ItemExceptions[item].NeverChangeFrom) + ldr r3, .L1470+8 @ tmp203, lsls r2, r4, #1 @ tmp204, item, -@ Patches/../C_code.c:3243: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3248: if (ItemExceptions[item].NeverChangeFrom) ldrb r3, [r2, r3] @ tmp205, ItemExceptions -@ Patches/../C_code.c:3245: return MakeNewItem(item); +@ Patches/../C_code.c:3250: return MakeNewItem(item); movs r0, r4 @, item -@ Patches/../C_code.c:3243: if (ItemExceptions[item].NeverChangeFrom) +@ Patches/../C_code.c:3248: if (ItemExceptions[item].NeverChangeFrom) cmp r3, #0 @ tmp205, - bne .L1454 @, -@ Patches/../C_code.c:3250: if (!((GetItemData(item)->attributes) & (IA_REQUIRES_WEXP))) - ldr r3, .L1467+12 @ tmp207, + bne .L1457 @, +@ Patches/../C_code.c:3255: if (!((GetItemData(item)->attributes) & (IA_REQUIRES_WEXP))) + ldr r3, .L1470+12 @ tmp207, bl .L14 @ -@ Patches/../C_code.c:3250: if (!((GetItemData(item)->attributes) & (IA_REQUIRES_WEXP))) +@ Patches/../C_code.c:3255: if (!((GetItemData(item)->attributes) & (IA_REQUIRES_WEXP))) movs r3, #5 @ tmp208, ldr r2, [r0, #8] @ _8->attributes, _8->attributes -@ Patches/../C_code.c:3250: if (!((GetItemData(item)->attributes) & (IA_REQUIRES_WEXP))) +@ Patches/../C_code.c:3255: if (!((GetItemData(item)->attributes) & (IA_REQUIRES_WEXP))) tst r2, r3 @ _8->attributes, tmp208 - bne .L1394 @, -@ Patches/../C_code.c:3252: if ((unit->pClassData->number == CLASS_THIEF_A) || (unit->pClassData->number == CLASS_THIEF_B)) + bne .L1397 @, +@ Patches/../C_code.c:3257: if ((unit->pClassData->number == CLASS_THIEF_A) || (unit->pClassData->number == CLASS_THIEF_B)) ldr r3, [r5, #4] @ unit_3(D)->pClassData, unit_3(D)->pClassData ldrb r3, [r3, #4] @ _12, -@ Patches/../C_code.c:3252: if ((unit->pClassData->number == CLASS_THIEF_A) || (unit->pClassData->number == CLASS_THIEF_B)) +@ Patches/../C_code.c:3257: if ((unit->pClassData->number == CLASS_THIEF_A) || (unit->pClassData->number == CLASS_THIEF_B)) cmp r3, #13 @ _12, - beq .L1402 @, + beq .L1405 @, cmp r3, #51 @ _12, - beq .L1402 @, -@ Patches/../C_code.c:3256: if (item == CHEST_KEY_A) + beq .L1405 @, +@ Patches/../C_code.c:3261: if (item == CHEST_KEY_A) cmp r4, #105 @ item, - bne .LCB8172 @ - b .L1458 @long jump @ -.LCB8172: -@ Patches/../C_code.c:3260: if (item == CHEST_KEY_B) + bne .LCB8196 @ + b .L1461 @long jump @ +.LCB8196: +@ Patches/../C_code.c:3265: if (item == CHEST_KEY_B) cmp r4, #121 @ item, - bne .LCB8174 @ - b .L1459 @long jump @ -.LCB8174: -@ Patches/../C_code.c:3264: if (item == DOOR_KEY) + bne .LCB8198 @ + b .L1462 @long jump @ +.LCB8198: +@ Patches/../C_code.c:3269: if (item == DOOR_KEY) cmp r4, #106 @ item, - bne .LCB8176 @ - b .L1460 @long jump @ -.LCB8176: -@ Patches/../C_code.c:3268: if (UNIT_FACTION(unit) != FACTION_BLUE) + bne .LCB8200 @ + b .L1463 @long jump @ +.LCB8200: +@ Patches/../C_code.c:3273: if (UNIT_FACTION(unit) != FACTION_BLUE) movs r2, #192 @ tmp229, movs r3, #11 @ tmp228, movs r1, r2 @ _22, tmp229 ldrsb r3, [r5, r3] @ tmp228, ands r1, r3 @ _22, tmp228 -@ Patches/../C_code.c:3268: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:3273: if (UNIT_FACTION(unit) != FACTION_BLUE) tst r2, r3 @ tmp229, tmp228 - beq .L1452 @, -@ Patches/../C_code.c:3270: if (item == LOCKPICK) + beq .L1455 @, +@ Patches/../C_code.c:3275: if (item == LOCKPICK) cmp r4, #107 @ item, - beq .L1402 @, -@ Patches/../C_code.c:2496: int uid = unit->pCharacterData->number; + beq .L1405 @, +@ Patches/../C_code.c:2501: int uid = unit->pCharacterData->number; ldr r3, [r5] @ unit_3(D)->pCharacterData, unit_3(D)->pCharacterData ldrb r3, [r3, #4] @ _25, -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) cmp r1, #128 @ _22, - bne .L1452 @, -@ Patches/../C_code.c:2514: if (uid < 0x2d) + bne .L1455 @, +@ Patches/../C_code.c:2519: if (uid < 0x2d) cmp r3, #44 @ _25, - bhi .L1407 @, -.L1452: -@ Patches/../C_code.c:3278: if (item == VULNERARY) + bhi .L1410 @, +.L1455: +@ Patches/../C_code.c:3283: if (item == VULNERARY) cmp r4, #108 @ item, - bne .LCB8194 @ - b .L1461 @long jump @ -.LCB8194: -@ Patches/../C_code.c:3285: if (item == ELIXIR) + bne .LCB8218 @ + b .L1464 @long jump @ +.LCB8218: +@ Patches/../C_code.c:3290: if (item == ELIXIR) cmp r4, #109 @ item, - bne .LCB8196 @ - b .L1462 @long jump @ -.LCB8196: -.L1407: -@ Patches/../C_code.c:3291: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever + bne .LCB8220 @ + b .L1465 @long jump @ +.LCB8220: +.L1410: +@ Patches/../C_code.c:3296: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever mov r6, sp @ tmp285, movs r3, #99 @ tmp237, -@ Patches/../C_code.c:3292: BuildSimilarPriceItemList(list2, item, true, false); +@ Patches/../C_code.c:3297: BuildSimilarPriceItemList(list2, item, true, false); movs r1, r4 @, item -@ Patches/../C_code.c:3291: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever +@ Patches/../C_code.c:3296: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever strb r3, [r6] @ tmp237, MEM[(u8[255] *)_163][0] -@ Patches/../C_code.c:3292: BuildSimilarPriceItemList(list2, item, true, false); +@ Patches/../C_code.c:3297: BuildSimilarPriceItemList(list2, item, true, false); movs r2, #1 @, movs r3, #0 @, movs r0, r6 @, tmp285 bl BuildSimilarPriceItemList @ -@ Patches/../C_code.c:3293: if (list2[0]) +@ Patches/../C_code.c:3298: if (list2[0]) ldrb r1, [r6] @ _28, MEM[(u8[255] *)_163] -@ Patches/../C_code.c:3293: if (list2[0]) +@ Patches/../C_code.c:3298: if (list2[0]) cmp r1, #0 @ _28, - bne .L1463 @, -.L1419: -@ Patches/../C_code.c:3339: return MakeNewItem(item); + bne .L1466 @, +.L1422: +@ Patches/../C_code.c:3344: return MakeNewItem(item); movs r0, r4 @, item -.L1454: - ldr r3, .L1467+16 @ tmp283, +.L1457: + ldr r3, .L1470+16 @ tmp283, bl .L14 @ -.L1389: -@ Patches/../C_code.c:3340: } +.L1392: +@ Patches/../C_code.c:3345: } add sp, sp, #256 @,, @ sp needed @ pop {r7} @@ -9934,181 +9965,181 @@ RandNewWeapon.part.0: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1394: -@ Patches/../C_code.c:3305: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) +.L1397: +@ Patches/../C_code.c:3310: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) ldr r3, [r5] @ unit_3(D)->pCharacterData, unit_3(D)->pCharacterData -@ Patches/../C_code.c:3305: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) +@ Patches/../C_code.c:3310: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) ldr r2, [r5, #4] @ unit_3(D)->pClassData, unit_3(D)->pClassData -@ Patches/../C_code.c:3305: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) +@ Patches/../C_code.c:3310: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) ldr r3, [r3, #40] @ _40->attributes, _40->attributes ldr r2, [r2, #40] @ _42->attributes, _42->attributes orrs r3, r2 @ tmp252, _42->attributes -@ Patches/../C_code.c:3305: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) +@ Patches/../C_code.c:3310: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) movs r2, #48 @ tmp255, -@ Patches/../C_code.c:3305: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) +@ Patches/../C_code.c:3310: if ((unit->pCharacterData->attributes | unit->pClassData->attributes) & (CA_DANCE | CA_PLAY)) tst r2, r3 @ tmp255, tmp252 - bne .L1464 @, -@ Patches/../C_code.c:3330: if (list[0]) + bne .L1467 @, +@ Patches/../C_code.c:3335: if (list[0]) ldr r3, [sp, #280] @ tmp312, list ldrb r1, [r3] @ _57, *list_56(D) -@ Patches/../C_code.c:3330: if (list[0]) +@ Patches/../C_code.c:3335: if (list[0]) cmp r1, #0 @ _57, - beq .L1419 @, + beq .L1422 @, movs r0, r7 @ _23, noise - movs r3, r7 @ ivtmp.1416, noise -@ Patches/../C_code.c:3332: c = HashByte_Ch(item, list[0] + 1, noise, offset); + movs r3, r7 @ ivtmp.1421, noise +@ Patches/../C_code.c:3337: c = HashByte_Ch(item, list[0] + 1, noise, offset); adds r1, r1, #1 @ _59, adds r0, r0, #16 @ _23, -.L1422: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L1425: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_135], MEM[(int *)_135] cmp r2, #0 @ MEM[(int *)_135], - beq .L1465 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1416, - cmp r0, r3 @ _23, ivtmp.1416 - bne .L1422 @, -.L1421: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L1468 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1421, + cmp r0, r3 @ _23, ivtmp.1421 + bne .L1425 @, +.L1424: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); mov r3, r8 @, offset movs r2, r7 @, noise movs r0, r4 @, item bl HashByte_Global @ -@ Patches/../C_code.c:3337: item = list[c]; +@ Patches/../C_code.c:3342: item = list[c]; adds r3, r0, #0 @ _141, tmp275 cmp r0, #0 @ tmp275, - beq .L1466 @, -.L1423: -@ Patches/../C_code.c:3337: item = list[c]; + beq .L1469 @, +.L1426: +@ Patches/../C_code.c:3342: item = list[c]; ldr r2, [sp, #280] @ tmp314, list -@ Patches/../C_code.c:3337: item = list[c]; +@ Patches/../C_code.c:3342: item = list[c]; lsls r3, r3, #16 @ tmp282, _141, lsrs r3, r3, #16 @ tmp281, tmp282, -@ Patches/../C_code.c:3337: item = list[c]; +@ Patches/../C_code.c:3342: item = list[c]; ldrb r4, [r2, r3] @ item, *_64 -@ Patches/../C_code.c:3339: return MakeNewItem(item); +@ Patches/../C_code.c:3344: return MakeNewItem(item); movs r0, r4 @, item - b .L1454 @ -.L1402: -@ Patches/../C_code.c:3254: return MakeNewItem(LOCKPICK); // Non weapons become lockpick for thieves - ldr r3, .L1467+16 @ tmp224, + b .L1457 @ +.L1405: +@ Patches/../C_code.c:3259: return MakeNewItem(LOCKPICK); // Non weapons become lockpick for thieves + ldr r3, .L1470+16 @ tmp224, movs r0, #107 @, bl .L14 @ - b .L1389 @ -.L1464: -@ Patches/../C_code.c:3316: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever + b .L1392 @ +.L1467: +@ Patches/../C_code.c:3321: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever mov r6, sp @ tmp285, movs r3, #99 @ tmp259, -@ Patches/../C_code.c:3317: BuildRingItemList(list2, unit); +@ Patches/../C_code.c:3322: BuildRingItemList(list2, unit); movs r1, r5 @, unit movs r0, r6 @, tmp285 -@ Patches/../C_code.c:3316: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever +@ Patches/../C_code.c:3321: list2[0] = 99; // so compiler doesn't assume uninitialized or whatever strb r3, [r6] @ tmp259, MEM[(u8[255] *)_163][0] -@ Patches/../C_code.c:3317: BuildRingItemList(list2, unit); +@ Patches/../C_code.c:3322: BuildRingItemList(list2, unit); bl BuildRingItemList @ -@ Patches/../C_code.c:3318: if (list2[0]) +@ Patches/../C_code.c:3323: if (list2[0]) ldrb r1, [r6] @ _46, MEM[(u8[255] *)_163] -@ Patches/../C_code.c:3318: if (list2[0]) +@ Patches/../C_code.c:3323: if (list2[0]) cmp r1, #0 @ _46, - beq .L1419 @, + beq .L1422 @, movs r0, r7 @ _139, noise - movs r3, r7 @ ivtmp.1409, noise -@ Patches/../C_code.c:3320: c = HashByte_Ch(item, list2[0] + 1, noise, offset); + movs r3, r7 @ ivtmp.1414, noise +@ Patches/../C_code.c:3325: c = HashByte_Ch(item, list2[0] + 1, noise, offset); adds r1, r1, #1 @ _48, adds r0, r0, #16 @ _139, -.L1417: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L1420: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_125], MEM[(int *)_125] cmp r2, #0 @ MEM[(int *)_125], - beq .L1457 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1409, - cmp r3, r0 @ ivtmp.1409, _139 - bne .L1417 @, -.L1416: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L1460 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1414, + cmp r3, r0 @ ivtmp.1414, _139 + bne .L1420 @, +.L1419: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); mov r3, r8 @, offset movs r2, r7 @, noise movs r0, r4 @, item bl HashByte_Global @ -@ Patches/../C_code.c:3321: if (!c) +@ Patches/../C_code.c:3326: if (!c) cmp r0, #0 @ c, - bne .L1418 @, -@ Patches/../C_code.c:3323: c = 1; + bne .L1421 @, +@ Patches/../C_code.c:3328: c = 1; adds r0, r0, #1 @ c, -.L1418: -@ Patches/../C_code.c:3325: item = list2[c]; +.L1421: +@ Patches/../C_code.c:3330: item = list2[c]; ldrb r4, [r6, r0] @ item, MEM[(u8[255] *)_163] -@ Patches/../C_code.c:3339: return MakeNewItem(item); +@ Patches/../C_code.c:3344: return MakeNewItem(item); movs r0, r4 @, item - b .L1454 @ -.L1463: + b .L1457 @ +.L1466: movs r0, r7 @ _112, noise - movs r3, r7 @ ivtmp.1402, noise -@ Patches/../C_code.c:3295: c = HashByte_Ch(item, list2[0] + 1, noise, offset); + movs r3, r7 @ ivtmp.1407, noise +@ Patches/../C_code.c:3300: c = HashByte_Ch(item, list2[0] + 1, noise, offset); adds r1, r1, #1 @ _30, adds r0, r0, #16 @ _112, -.L1411: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L1414: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_115], MEM[(int *)_115] cmp r2, #0 @ MEM[(int *)_115], - beq .L1457 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1402, - cmp r3, r0 @ ivtmp.1402, _112 - bne .L1411 @, - b .L1416 @ -.L1466: -@ Patches/../C_code.c:3337: item = list[c]; + beq .L1460 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1407, + cmp r3, r0 @ ivtmp.1407, _112 + bne .L1414 @, + b .L1419 @ +.L1469: +@ Patches/../C_code.c:3342: item = list[c]; movs r3, #1 @ _141, - b .L1423 @ -.L1458: -@ Patches/../C_code.c:3258: return MakeNewItem(CHEST_KEY_A); - ldr r3, .L1467+16 @ tmp225, + b .L1426 @ +.L1461: +@ Patches/../C_code.c:3263: return MakeNewItem(CHEST_KEY_A); + ldr r3, .L1470+16 @ tmp225, movs r0, #105 @, bl .L14 @ - b .L1389 @ -.L1459: -@ Patches/../C_code.c:3262: return MakeNewItem(CHEST_KEY_B); - ldr r3, .L1467+16 @ tmp226, + b .L1392 @ +.L1462: +@ Patches/../C_code.c:3267: return MakeNewItem(CHEST_KEY_B); + ldr r3, .L1470+16 @ tmp226, movs r0, #121 @, bl .L14 @ - b .L1389 @ -.L1460: -@ Patches/../C_code.c:3266: return MakeNewItem(DOOR_KEY); - ldr r3, .L1467+16 @ tmp227, + b .L1392 @ +.L1463: +@ Patches/../C_code.c:3271: return MakeNewItem(DOOR_KEY); + ldr r3, .L1470+16 @ tmp227, movs r0, #106 @, bl .L14 @ - b .L1389 @ -.L1462: -@ Patches/../C_code.c:3287: return MakeNewItem(ELIXIR); - ldr r3, .L1467+16 @ tmp234, + b .L1392 @ +.L1465: +@ Patches/../C_code.c:3292: return MakeNewItem(ELIXIR); + ldr r3, .L1470+16 @ tmp234, movs r0, #109 @, bl .L14 @ - b .L1389 @ -.L1465: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L1467+20 @ tmp273, + b .L1392 @ +.L1468: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L1470+20 @ tmp273, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_135 -@ Patches/../C_code.c:2366: break; - b .L1421 @ -.L1461: -@ Patches/../C_code.c:3280: return MakeNewItem(VULNERARY); - ldr r3, .L1467+16 @ tmp233, +@ Patches/../C_code.c:2371: break; + b .L1424 @ +.L1464: +@ Patches/../C_code.c:3285: return MakeNewItem(VULNERARY); + ldr r3, .L1470+16 @ tmp233, movs r0, #108 @, bl .L14 @ - b .L1389 @ -.L1457: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L1467+20 @ tmp265, + b .L1392 @ +.L1460: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L1470+20 @ tmp265, ldrb r2, [r2] @ gCh, gCh - str r2, [r3] @ gCh,* ivtmp.1409 -@ Patches/../C_code.c:2366: break; - b .L1416 @ -.L1468: + str r2, [r3] @ gCh,* ivtmp.1414 +@ Patches/../C_code.c:2371: break; + b .L1419 @ +.L1471: .align 2 -.L1467: +.L1470: .word GetCharacterData .word RecruitValues .word ItemExceptions @@ -10128,21 +10159,21 @@ RandRareItem: @ args = 4, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:3140: if (!item) +@ Patches/../C_code.c:3145: if (!item) cmp r0, #0 @ item, - beq .L1471 @, + beq .L1474 @, ldr r3, [sp, #8] @, varyByCh bl RandRareItem.part.0 @ -.L1469: -@ Patches/../C_code.c:3178: } +.L1472: +@ Patches/../C_code.c:3183: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L1471: -@ Patches/../C_code.c:3142: return item; +.L1474: +@ Patches/../C_code.c:3147: return item; movs r0, #0 @ , - b .L1469 @ + b .L1472 @ .size RandRareItem, .-RandRareItem .align 1 .p2align 2,,3 @@ -10157,25 +10188,25 @@ RandNewItem: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ sub sp, sp, #8 @,, -@ Patches/../C_code.c:3182: if (!item) +@ Patches/../C_code.c:3187: if (!item) cmp r0, #0 @ item, - beq .L1474 @, + beq .L1477 @, ldr r4, [sp, #20] @ tmp128, noWeapons str r4, [sp, #4] @ tmp128, ldr r4, [sp, #16] @ tmp129, varyByCh str r4, [sp] @ tmp129, bl RandNewItem.part.0 @ -.L1472: -@ Patches/../C_code.c:3230: } +.L1475: +@ Patches/../C_code.c:3235: } add sp, sp, #8 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L1474: -@ Patches/../C_code.c:3184: return item; +.L1477: +@ Patches/../C_code.c:3189: return item; movs r0, #0 @ , - b .L1472 @ + b .L1475 @ .size RandNewItem, .-RandNewItem .align 1 .p2align 2,,3 @@ -10190,15 +10221,15 @@ RandNewWeapon: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ sub sp, sp, #8 @,, -@ Patches/../C_code.c:3234: if (!item) +@ Patches/../C_code.c:3239: if (!item) cmp r1, #0 @ item, - beq .L1476 @, + beq .L1479 @, ldr r4, [sp, #16] @ tmp127, list str r4, [sp] @ tmp127, bl RandNewWeapon.part.0 @ movs r1, r0 @ item, tmp125 -.L1476: -@ Patches/../C_code.c:3340: } +.L1479: +@ Patches/../C_code.c:3345: } movs r0, r1 @, item add sp, sp, #8 @,, @ sp needed @ @@ -10219,52 +10250,52 @@ NewPopup_ItemGot: @ frame_needed = 0, uses_anonymous_args = 0 movs r3, r0 @ parent, tmp168 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:3362: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); - ldr r0, .L1492 @ tmp133, -@ Patches/../C_code.c:3359: { +@ Patches/../C_code.c:3367: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); + ldr r0, .L1495 @ tmp133, +@ Patches/../C_code.c:3364: { movs r5, r1 @ unit, tmp169 movs r4, r2 @ item, tmp170 -@ Patches/../C_code.c:3362: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); +@ Patches/../C_code.c:3367: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); movs r1, r3 @, parent -@ Patches/../C_code.c:3359: { +@ Patches/../C_code.c:3364: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:3362: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); +@ Patches/../C_code.c:3367: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); cmp r3, #7 @ parent, - bhi .L1481 @, -@ Patches/../C_code.c:3362: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); - ldr r3, .L1492+4 @ tmp134, + bhi .L1484 @, +@ Patches/../C_code.c:3367: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); + ldr r3, .L1495+4 @ tmp134, bl .L14 @ - movs r6, r0 @ iftmp.144_17, tmp171 -.L1482: -@ Patches/../C_code.c:3364: int noise[4] = { 0, 0, 0, 0 }; + movs r6, r0 @ iftmp.145_17, tmp171 +.L1485: +@ Patches/../C_code.c:3369: int noise[4] = { 0, 0, 0, 0 }; movs r2, #8 @, - ldr r3, .L1492+8 @ tmp140, + ldr r3, .L1495+8 @ tmp140, movs r1, #0 @, add r0, sp, #16 @,, bl .L14 @ -@ Patches/../C_code.c:3365: noise[0] = unit->xPos; +@ Patches/../C_code.c:3370: noise[0] = unit->xPos; movs r3, #16 @ tmp144, ldrsb r3, [r5, r3] @ tmp144, str r3, [sp, #8] @ tmp144, noise[0] -@ Patches/../C_code.c:3366: noise[1] = unit->yPos; +@ Patches/../C_code.c:3371: noise[1] = unit->yPos; movs r3, #17 @ tmp146, -@ Patches/../C_code.c:3368: if (RandBitflags->foundItems) +@ Patches/../C_code.c:3373: if (RandBitflags->foundItems) movs r2, #48 @ tmp154, -@ Patches/../C_code.c:3366: noise[1] = unit->yPos; +@ Patches/../C_code.c:3371: noise[1] = unit->yPos; ldrsb r3, [r5, r3] @ tmp146, str r3, [sp, #12] @ tmp146, noise[1] -@ Patches/../C_code.c:3368: if (RandBitflags->foundItems) - ldr r3, .L1492+12 @ tmp148, +@ Patches/../C_code.c:3373: if (RandBitflags->foundItems) + ldr r3, .L1495+12 @ tmp148, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.146_6, *RandBitflags.146_6 -@ Patches/../C_code.c:3370: item = RandNewItem(item, noise, 0, false, true, false); + ldrb r3, [r3, #1] @ *RandBitflags.147_6, *RandBitflags.147_6 +@ Patches/../C_code.c:3375: item = RandNewItem(item, noise, 0, false, true, false); movs r0, r4 @ prephitmp_61, item -@ Patches/../C_code.c:3368: if (RandBitflags->foundItems) - tst r2, r3 @ tmp154, *RandBitflags.146_6 - beq .L1483 @, -@ Patches/../C_code.c:3182: if (!item) +@ Patches/../C_code.c:3373: if (RandBitflags->foundItems) + tst r2, r3 @ tmp154, *RandBitflags.147_6 + beq .L1486 @, +@ Patches/../C_code.c:3187: if (!item) cmp r4, #0 @ prephitmp_61, - beq .L1483 @, + beq .L1486 @, movs r3, #0 @ tmp159, str r3, [sp, #4] @ tmp159, adds r3, r3, #1 @ tmp160, @@ -10275,42 +10306,42 @@ NewPopup_ItemGot: bl RandNewItem.part.0 @ lsls r0, r0, #16 @ tmp161, tmp173, lsrs r0, r0, #16 @ prephitmp_61, tmp161, -.L1483: -@ Patches/../C_code.c:3376: if (FACTION_RED == UNIT_FACTION(unit)) +.L1486: +@ Patches/../C_code.c:3381: if (FACTION_RED == UNIT_FACTION(unit)) movs r2, #11 @ tmp162, movs r3, #192 @ tmp163, -@ Patches/../C_code.c:3373: proc->item = item; - str r0, [r6, #88] @ prephitmp_61, MEM[(struct GotItemPopupProc *)iftmp.144_17].item -@ Patches/../C_code.c:3374: proc->unit = unit; - str r5, [r6, #84] @ unit, MEM[(struct GotItemPopupProc *)iftmp.144_17].unit -@ Patches/../C_code.c:3376: if (FACTION_RED == UNIT_FACTION(unit)) +@ Patches/../C_code.c:3378: proc->item = item; + str r0, [r6, #88] @ prephitmp_61, MEM[(struct GotItemPopupProc *)iftmp.145_17].item +@ Patches/../C_code.c:3379: proc->unit = unit; + str r5, [r6, #84] @ unit, MEM[(struct GotItemPopupProc *)iftmp.145_17].unit +@ Patches/../C_code.c:3381: if (FACTION_RED == UNIT_FACTION(unit)) ldrsb r2, [r5, r2] @ tmp162, ands r3, r2 @ tmp164, tmp162 -@ Patches/../C_code.c:3376: if (FACTION_RED == UNIT_FACTION(unit)) +@ Patches/../C_code.c:3381: if (FACTION_RED == UNIT_FACTION(unit)) cmp r3, #128 @ tmp164, - bne .L1480 @, -@ Patches/../C_code.c:3377: unit->state |= US_DROP_ITEM; + bne .L1483 @, +@ Patches/../C_code.c:3382: unit->state |= US_DROP_ITEM; movs r3, #128 @ tmp167, ldr r2, [r5, #12] @ unit_28(D)->state, unit_28(D)->state lsls r3, r3, #5 @ tmp167, tmp167, orrs r3, r2 @ tmp165, unit_28(D)->state str r3, [r5, #12] @ tmp165, unit_28(D)->state -.L1480: -@ Patches/../C_code.c:3378: } +.L1483: +@ Patches/../C_code.c:3383: } add sp, sp, #24 @,, @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L1481: -@ Patches/../C_code.c:3362: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); - ldr r3, .L1492+16 @ tmp136, +.L1484: +@ Patches/../C_code.c:3367: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); + ldr r3, .L1495+16 @ tmp136, bl .L14 @ - movs r6, r0 @ iftmp.144_17, tmp172 - b .L1482 @ -.L1493: + movs r6, r0 @ iftmp.145_17, tmp172 + b .L1485 @ +.L1496: .align 2 -.L1492: +.L1495: .word ProcScr_GotItem .word Proc_Start .word memset @@ -10329,55 +10360,55 @@ NewPopup_ItemGot_NoRand: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:3389: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); - ldr r3, .L1498 @ tmp125, -@ Patches/../C_code.c:3386: { +@ Patches/../C_code.c:3394: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); + ldr r3, .L1501 @ tmp125, +@ Patches/../C_code.c:3391: { movs r4, r1 @ unit, tmp136 movs r5, r2 @ item, tmp137 -@ Patches/../C_code.c:3389: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); +@ Patches/../C_code.c:3394: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); movs r1, r0 @, parent -@ Patches/../C_code.c:3389: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); +@ Patches/../C_code.c:3394: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); cmp r0, #7 @ parent, - bhi .L1495 @, -@ Patches/../C_code.c:3389: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); + bhi .L1498 @, +@ Patches/../C_code.c:3394: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); movs r0, r3 @ tmp125, tmp125 - ldr r3, .L1498+4 @ tmp126, + ldr r3, .L1501+4 @ tmp126, bl .L14 @ -.L1496: -@ Patches/../C_code.c:3394: if (FACTION_RED == UNIT_FACTION(unit)) +.L1499: +@ Patches/../C_code.c:3399: if (FACTION_RED == UNIT_FACTION(unit)) movs r2, #11 @ tmp129, movs r3, #192 @ tmp130, -@ Patches/../C_code.c:3391: proc->item = item; - str r5, [r0, #88] @ item, MEM[(struct GotItemPopupProc *)iftmp.147_8].item -@ Patches/../C_code.c:3392: proc->unit = unit; - str r4, [r0, #84] @ unit, MEM[(struct GotItemPopupProc *)iftmp.147_8].unit -@ Patches/../C_code.c:3394: if (FACTION_RED == UNIT_FACTION(unit)) +@ Patches/../C_code.c:3396: proc->item = item; + str r5, [r0, #88] @ item, MEM[(struct GotItemPopupProc *)iftmp.148_8].item +@ Patches/../C_code.c:3397: proc->unit = unit; + str r4, [r0, #84] @ unit, MEM[(struct GotItemPopupProc *)iftmp.148_8].unit +@ Patches/../C_code.c:3399: if (FACTION_RED == UNIT_FACTION(unit)) ldrsb r2, [r4, r2] @ tmp129, ands r3, r2 @ tmp131, tmp129 -@ Patches/../C_code.c:3394: if (FACTION_RED == UNIT_FACTION(unit)) +@ Patches/../C_code.c:3399: if (FACTION_RED == UNIT_FACTION(unit)) cmp r3, #128 @ tmp131, - bne .L1494 @, -@ Patches/../C_code.c:3395: unit->state |= US_DROP_ITEM; + bne .L1497 @, +@ Patches/../C_code.c:3400: unit->state |= US_DROP_ITEM; movs r3, #128 @ tmp134, ldr r2, [r4, #12] @ unit_19(D)->state, unit_19(D)->state lsls r3, r3, #5 @ tmp134, tmp134, orrs r3, r2 @ tmp132, unit_19(D)->state str r3, [r4, #12] @ tmp132, unit_19(D)->state -.L1494: -@ Patches/../C_code.c:3396: } +.L1497: +@ Patches/../C_code.c:3401: } @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L1495: -@ Patches/../C_code.c:3389: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); +.L1498: +@ Patches/../C_code.c:3394: proc = (PROC_IS_ROOT(parent)) ? Proc_Start(ProcScr_GotItem, parent) : Proc_StartBlocking(ProcScr_GotItem, parent); movs r0, r3 @ tmp127, tmp127 - ldr r3, .L1498+8 @ tmp128, + ldr r3, .L1501+8 @ tmp128, bl .L14 @ - b .L1496 @ -.L1499: + b .L1499 @ +.L1502: .align 2 -.L1498: +.L1501: .word ProcScr_GotItem .word Proc_Start .word Proc_StartBlocking @@ -10395,78 +10426,78 @@ NewPopup_GoldGot: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ sub sp, sp, #24 @,, -@ Patches/../C_code.c:3415: { +@ Patches/../C_code.c:3420: { movs r5, r1 @ unit, tmp167 -@ Patches/../C_code.c:3419: int noise[4] = { 0, 0, 0, 0 }; - ldr r3, .L1510 @ tmp133, -@ Patches/../C_code.c:3415: { +@ Patches/../C_code.c:3424: int noise[4] = { 0, 0, 0, 0 }; + ldr r3, .L1513 @ tmp133, +@ Patches/../C_code.c:3420: { movs r6, r0 @ parent, tmp166 movs r4, r2 @ value, tmp168 -@ Patches/../C_code.c:3419: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:3424: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, movs r2, #8 @, add r0, sp, #16 @,, bl .L14 @ -@ Patches/../C_code.c:3420: noise[0] = unit->xPos; +@ Patches/../C_code.c:3425: noise[0] = unit->xPos; movs r3, #16 @ tmp137, ldrsb r3, [r5, r3] @ tmp137, str r3, [sp, #8] @ tmp137, noise[0] -@ Patches/../C_code.c:3421: noise[1] = unit->yPos; +@ Patches/../C_code.c:3426: noise[1] = unit->yPos; movs r3, #17 @ tmp139, -@ Patches/../C_code.c:3423: if (RandBitflags->foundItems) +@ Patches/../C_code.c:3428: if (RandBitflags->foundItems) movs r2, #48 @ tmp147, -@ Patches/../C_code.c:3421: noise[1] = unit->yPos; +@ Patches/../C_code.c:3426: noise[1] = unit->yPos; ldrsb r3, [r5, r3] @ tmp139, str r3, [sp, #12] @ tmp139, noise[1] -@ Patches/../C_code.c:3423: if (RandBitflags->foundItems) - ldr r3, .L1510+4 @ tmp141, +@ Patches/../C_code.c:3428: if (RandBitflags->foundItems) + ldr r3, .L1513+4 @ tmp141, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.149_5, *RandBitflags.149_5 -@ Patches/../C_code.c:3423: if (RandBitflags->foundItems) - tst r2, r3 @ tmp147, *RandBitflags.149_5 - bne .L1509 @, -.L1501: -@ Patches/../C_code.c:3431: SetPopupNumber(value); - ldr r3, .L1510+8 @ tmp155, + ldrb r3, [r3, #1] @ *RandBitflags.150_5, *RandBitflags.150_5 +@ Patches/../C_code.c:3428: if (RandBitflags->foundItems) + tst r2, r3 @ tmp147, *RandBitflags.150_5 + bne .L1512 @, +.L1504: +@ Patches/../C_code.c:3436: SetPopupNumber(value); + ldr r3, .L1513+8 @ tmp155, movs r0, r4 @, value bl .L14 @ -@ Patches/../C_code.c:3433: if (FACTION_BLUE == UNIT_FACTION(unit)) +@ Patches/../C_code.c:3438: if (FACTION_BLUE == UNIT_FACTION(unit)) movs r3, #11 @ tmp156, movs r2, #192 @ tmp157, ldrsb r3, [r5, r3] @ tmp156, -@ Patches/../C_code.c:3433: if (FACTION_BLUE == UNIT_FACTION(unit)) +@ Patches/../C_code.c:3438: if (FACTION_BLUE == UNIT_FACTION(unit)) tst r2, r3 @ tmp157, tmp156 - bne .L1502 @, -@ Patches/../C_code.c:3435: value += GetPartyGoldAmount(); - ldr r3, .L1510+12 @ tmp159, + bne .L1505 @, +@ Patches/../C_code.c:3440: value += GetPartyGoldAmount(); + ldr r3, .L1513+12 @ tmp159, bl .L14 @ -@ Patches/../C_code.c:3436: SetPartyGoldAmount(value); - ldr r3, .L1510+16 @ tmp161, -@ Patches/../C_code.c:3435: value += GetPartyGoldAmount(); +@ Patches/../C_code.c:3441: SetPartyGoldAmount(value); + ldr r3, .L1513+16 @ tmp161, +@ Patches/../C_code.c:3440: value += GetPartyGoldAmount(); adds r0, r4, r0 @ value, value, tmp170 -@ Patches/../C_code.c:3436: SetPartyGoldAmount(value); +@ Patches/../C_code.c:3441: SetPartyGoldAmount(value); bl .L14 @ -@ Patches/../C_code.c:3437: NewPopup_Simple(PopupScr_GotGold, 0x60, 0x0, parent); // 0D720 //5C3FE4 fe6 - ldr r0, .L1510+20 @ tmp162, -.L1508: -@ Patches/../C_code.c:3440: NewPopup_Simple(PopupScr_GoldWasStole, 0x60, 0x0, parent); +@ Patches/../C_code.c:3442: NewPopup_Simple(PopupScr_GotGold, 0x60, 0x0, parent); // 0D720 //5C3FE4 fe6 + ldr r0, .L1513+20 @ tmp162, +.L1511: +@ Patches/../C_code.c:3445: NewPopup_Simple(PopupScr_GoldWasStole, 0x60, 0x0, parent); movs r3, r6 @, parent movs r2, #0 @, movs r1, #96 @, - ldr r4, .L1510+24 @ tmp165, - bl .L269 @ -@ Patches/../C_code.c:3441: } + ldr r4, .L1513+24 @ tmp165, + bl .L272 @ +@ Patches/../C_code.c:3446: } add sp, sp, #24 @,, @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L1502: -@ Patches/../C_code.c:3440: NewPopup_Simple(PopupScr_GoldWasStole, 0x60, 0x0, parent); - ldr r0, .L1510+28 @ tmp164, - b .L1508 @ -.L1509: -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +.L1505: +@ Patches/../C_code.c:3445: NewPopup_Simple(PopupScr_GoldWasStole, 0x60, 0x0, parent); + ldr r0, .L1513+28 @ tmp164, + b .L1511 @ +.L1512: +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); movs r3, #0 @ tmp152, movs r0, r4 @, value str r3, [sp] @ tmp152, @@ -10474,14 +10505,14 @@ NewPopup_GoldGot: add r1, sp, #8 @ tmp174,, bl HashPercent @ subs r4, r0, #0 @ value, tmp169, -@ Patches/../C_code.c:3426: if (!value) - bne .L1501 @, -@ Patches/../C_code.c:3428: value = 1; +@ Patches/../C_code.c:3431: if (!value) + bne .L1504 @, +@ Patches/../C_code.c:3433: value = 1; adds r4, r4, #1 @ value, - b .L1501 @ -.L1511: + b .L1504 @ +.L1514: .align 2 -.L1510: +.L1513: .word memset .word RandBitflags .word SetPopupNumber @@ -10503,77 +10534,77 @@ AdjustGrowthForStatInflation: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3446: switch (RandBitflags->caps) - ldr r3, .L1521 @ tmp124, +@ Patches/../C_code.c:3451: switch (RandBitflags->caps) + ldr r3, .L1524 @ tmp124, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r3, [r3] @ *RandBitflags.150_1, *RandBitflags.150_1 - lsls r3, r3, #23 @ tmp129, *RandBitflags.150_1, -@ Patches/../C_code.c:3444: { + ldrh r3, [r3] @ *RandBitflags.151_1, *RandBitflags.151_1 + lsls r3, r3, #23 @ tmp129, *RandBitflags.151_1, +@ Patches/../C_code.c:3449: { movs r2, r0 @ growth, tmp167 -@ Patches/../C_code.c:3446: switch (RandBitflags->caps) +@ Patches/../C_code.c:3451: switch (RandBitflags->caps) lsrs r3, r3, #29 @ _2, tmp129, -@ Patches/../C_code.c:3446: switch (RandBitflags->caps) +@ Patches/../C_code.c:3451: switch (RandBitflags->caps) cmp r3, #5 @ _2, - beq .L1513 @, - bhi .L1514 @, + beq .L1516 @, + bhi .L1517 @, movs r0, #0 @ , cmp r3, #2 @ _2, - beq .L1512 @, + beq .L1515 @, cmp r3, #3 @ _2, - bne .L1520 @, -@ Patches/../C_code.c:3465: result = (3 * growth) / 4; + bne .L1523 @, +@ Patches/../C_code.c:3470: result = (3 * growth) / 4; lsls r1, r2, #1 @ tmp134, growth, adds r2, r1, r2 @ tmp135, tmp134, growth -@ Patches/../C_code.c:3465: result = (3 * growth) / 4; +@ Patches/../C_code.c:3470: result = (3 * growth) / 4; asrs r1, r2, #31 @ tmp138, tmp135, ands r3, r1 @ tmp140, tmp138 adds r0, r3, r2 @ tmp141, tmp140, tmp135 asrs r0, r0, #2 @ , tmp141, -@ Patches/../C_code.c:3466: break; - b .L1512 @ -.L1514: -@ Patches/../C_code.c:3446: switch (RandBitflags->caps) +@ Patches/../C_code.c:3471: break; + b .L1515 @ +.L1517: +@ Patches/../C_code.c:3451: switch (RandBitflags->caps) cmp r3, #6 @ _2, - bne .L1520 @, -@ Patches/../C_code.c:3480: result = ((6 * growth) / 4) + 20; + bne .L1523 @, +@ Patches/../C_code.c:3485: result = ((6 * growth) / 4) + 20; lsls r3, r0, #1 @ tmp155, growth, adds r3, r3, r0 @ tmp156, tmp155, growth -@ Patches/../C_code.c:3480: result = ((6 * growth) / 4) + 20; +@ Patches/../C_code.c:3485: result = ((6 * growth) / 4) + 20; movs r0, #3 @ tmp162, -@ Patches/../C_code.c:3480: result = ((6 * growth) / 4) + 20; +@ Patches/../C_code.c:3485: result = ((6 * growth) / 4) + 20; lsls r3, r3, #1 @ tmp157, tmp156, -@ Patches/../C_code.c:3480: result = ((6 * growth) / 4) + 20; +@ Patches/../C_code.c:3485: result = ((6 * growth) / 4) + 20; asrs r2, r3, #31 @ tmp161, tmp157, ands r0, r2 @ tmp163, tmp161 adds r0, r0, r3 @ tmp164, tmp163, tmp157 asrs r0, r0, #2 @ tmp165, tmp164, -@ Patches/../C_code.c:3480: result = ((6 * growth) / 4) + 20; +@ Patches/../C_code.c:3485: result = ((6 * growth) / 4) + 20; adds r0, r0, #20 @ , -.L1512: -@ Patches/../C_code.c:3485: } +.L1515: +@ Patches/../C_code.c:3490: } @ sp needed @ bx lr -.L1520: -@ Patches/../C_code.c:3445: int result = growth; +.L1523: +@ Patches/../C_code.c:3450: int result = growth; movs r0, r2 @ , growth - b .L1512 @ -.L1513: -@ Patches/../C_code.c:3475: result = ((5 * growth) / 4) + 10; + b .L1515 @ +.L1516: +@ Patches/../C_code.c:3480: result = ((5 * growth) / 4) + 10; lsls r3, r0, #2 @ tmp144, growth, adds r3, r3, r0 @ tmp145, tmp144, growth -@ Patches/../C_code.c:3475: result = ((5 * growth) / 4) + 10; +@ Patches/../C_code.c:3480: result = ((5 * growth) / 4) + 10; movs r0, #3 @ tmp150, asrs r2, r3, #31 @ tmp149, tmp145, ands r0, r2 @ tmp151, tmp149 adds r0, r0, r3 @ tmp152, tmp151, tmp145 asrs r0, r0, #2 @ tmp153, tmp152, -@ Patches/../C_code.c:3475: result = ((5 * growth) / 4) + 10; +@ Patches/../C_code.c:3480: result = ((5 * growth) / 4) + 10; adds r0, r0, #10 @ , -@ Patches/../C_code.c:3476: break; - b .L1512 @ -.L1522: +@ Patches/../C_code.c:3481: break; + b .L1515 @ +.L1525: .align 2 -.L1521: +.L1524: .word RandBitflags .size AdjustGrowthForStatInflation, .-AdjustGrowthForStatInflation .align 1 @@ -10588,40 +10619,40 @@ GetGeneralStatCap: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldr r3, .L1527 @ tmp125, +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldr r3, .L1530 @ tmp125, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r3, [r3] @ *RandBitflags.151_1, *RandBitflags.151_1 - lsls r3, r3, #23 @ tmp130, *RandBitflags.151_1, + ldrh r3, [r3] @ *RandBitflags.152_1, *RandBitflags.152_1 + lsls r3, r3, #23 @ tmp130, *RandBitflags.152_1, lsrs r3, r3, #29 @ _2, tmp130, subs r2, r3, #2 @ tmp132, _2, lsls r2, r2, #24 @ tmp136, tmp132, lsrs r2, r2, #24 @ tmp135, tmp136, cmp r2, #4 @ tmp135, - bhi .L1526 @, + bhi .L1529 @, lsls r2, r3, #4 @ tmp138, _2, subs r3, r2, r3 @ tmp139, tmp138, _2 subs r3, r3, #30 @ result, -.L1524: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r2, .L1527+4 @ tmp141, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L1527: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r2, .L1530+4 @ tmp141, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r2] @ maxStat, maxStat cmp r0, r3 @ maxStat, result - ble .L1525 @, + ble .L1528 @, movs r0, r3 @ maxStat, result -.L1525: -@ Patches/../C_code.c:3533: } +.L1528: +@ Patches/../C_code.c:3538: } @ sp needed @ bx lr -.L1526: -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) +.L1529: +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) movs r3, #1 @ result, rsbs r3, r3, #0 @ result, result - b .L1524 @ -.L1528: + b .L1527 @ +.L1531: .align 2 -.L1527: +.L1530: .word RandBitflags .word maxStat .size GetGeneralStatCap, .-GetGeneralStatCap @@ -10637,49 +10668,49 @@ GetGlobalStatCap: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldr r3, .L1537 @ tmp125, +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldr r3, .L1540 @ tmp125, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r3, [r3] @ *RandBitflags.151_4, *RandBitflags.151_4 - lsls r3, r3, #23 @ tmp130, *RandBitflags.151_4, + ldrh r3, [r3] @ *RandBitflags.152_4, *RandBitflags.152_4 + lsls r3, r3, #23 @ tmp130, *RandBitflags.152_4, lsrs r3, r3, #29 @ _5, tmp130, subs r2, r3, #2 @ tmp132, _5, lsls r2, r2, #24 @ tmp136, tmp132, lsrs r2, r2, #24 @ tmp135, tmp136, cmp r2, #4 @ tmp135, - bhi .L1533 @, + bhi .L1536 @, lsls r2, r3, #4 @ tmp138, _5, subs r3, r2, r3 @ tmp139, tmp138, _5 subs r3, r3, #30 @ result, -.L1530: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r2, .L1537+4 @ tmp140, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L1533: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r2, .L1540+4 @ tmp140, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r2] @ , maxStat cmp r0, r3 @ , result - ble .L1531 @, + ble .L1534 @, movs r0, r3 @ , result -.L1531: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L1534: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r3, r0, #1 @ tmp143, , - beq .L1536 @, -.L1529: -@ Patches/../C_code.c:3543: } + beq .L1539 @, +.L1532: +@ Patches/../C_code.c:3548: } @ sp needed @ bx lr -.L1533: -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) +.L1536: +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) movs r3, #1 @ result, rsbs r3, r3, #0 @ result, result - b .L1530 @ -.L1536: -@ Patches/../C_code.c:3540: result = 30; + b .L1533 @ +.L1539: +@ Patches/../C_code.c:3545: result = 30; adds r0, r0, #31 @ , -@ Patches/../C_code.c:3542: return result; - b .L1529 @ -.L1538: +@ Patches/../C_code.c:3547: return result; + b .L1532 @ +.L1541: .align 2 -.L1537: +.L1540: .word RandBitflags .word maxStat .size GetGlobalStatCap, .-GetGlobalStatCap @@ -10695,80 +10726,80 @@ AdjustStatForInflatedNumbers: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) - ldr r2, .L1549 @ tmp125, +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) + ldr r2, .L1552 @ tmp125, ldr r2, [r2] @ RandBitflags, RandBitflags - ldrh r2, [r2] @ *RandBitflags.153_1, *RandBitflags.153_1 - lsls r2, r2, #23 @ tmp130, *RandBitflags.153_1, -@ Patches/../C_code.c:3546: { + ldrh r2, [r2] @ *RandBitflags.154_1, *RandBitflags.154_1 + lsls r2, r2, #23 @ tmp130, *RandBitflags.154_1, +@ Patches/../C_code.c:3551: { movs r3, r0 @ stat, tmp171 -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) lsrs r2, r2, #29 @ _2, tmp130, -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) cmp r2, #5 @ _2, - beq .L1540 @, - bhi .L1541 @, + beq .L1543 @, + bhi .L1544 @, movs r0, #0 @ , cmp r2, #2 @ _2, - beq .L1539 @, + beq .L1542 @, cmp r2, #3 @ _2, - bne .L1544 @, -@ Patches/../C_code.c:3567: result = ((3 * stat) / 4) - 2; + bne .L1547 @, +@ Patches/../C_code.c:3572: result = ((3 * stat) / 4) - 2; lsls r1, r3, #1 @ tmp135, stat, adds r3, r1, r3 @ tmp136, tmp135, stat -@ Patches/../C_code.c:3567: result = ((3 * stat) / 4) - 2; +@ Patches/../C_code.c:3572: result = ((3 * stat) / 4) - 2; asrs r1, r3, #31 @ tmp140, tmp136, ands r2, r1 @ tmp142, tmp140 adds r3, r2, r3 @ tmp143, tmp142, tmp136 asrs r3, r3, #2 @ tmp144, tmp143, -@ Patches/../C_code.c:3567: result = ((3 * stat) / 4) - 2; +@ Patches/../C_code.c:3572: result = ((3 * stat) / 4) - 2; subs r3, r3, #2 @ stat, -@ Patches/../C_code.c:3568: break; - b .L1544 @ -.L1541: -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) +@ Patches/../C_code.c:3573: break; + b .L1547 @ +.L1544: +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) cmp r2, #6 @ _2, - bne .L1544 @, -@ Patches/../C_code.c:3582: result = ((6 * stat) / 4) + 2; + bne .L1547 @, +@ Patches/../C_code.c:3587: result = ((6 * stat) / 4) + 2; movs r3, #3 @ tmp164, -@ Patches/../C_code.c:3582: result = ((6 * stat) / 4) + 2; +@ Patches/../C_code.c:3587: result = ((6 * stat) / 4) + 2; lsls r2, r0, #1 @ tmp157, stat, adds r2, r2, r0 @ tmp158, tmp157, stat lsls r2, r2, #1 @ tmp159, tmp158, -@ Patches/../C_code.c:3582: result = ((6 * stat) / 4) + 2; +@ Patches/../C_code.c:3587: result = ((6 * stat) / 4) + 2; asrs r1, r2, #31 @ tmp163, tmp159, ands r3, r1 @ tmp165, tmp163 adds r3, r3, r2 @ tmp166, tmp165, tmp159 asrs r3, r3, #2 @ tmp167, tmp166, -@ Patches/../C_code.c:3582: result = ((6 * stat) / 4) + 2; +@ Patches/../C_code.c:3587: result = ((6 * stat) / 4) + 2; adds r3, r3, #2 @ stat, -.L1544: -@ Patches/../C_code.c:3586: if (result < 0) +.L1547: +@ Patches/../C_code.c:3591: if (result < 0) mvns r0, r3 @ tmp170, stat asrs r0, r0, #31 @ tmp169, tmp170, ands r0, r3 @ , stat -.L1539: -@ Patches/../C_code.c:3591: } +.L1542: +@ Patches/../C_code.c:3596: } @ sp needed @ bx lr -.L1540: -@ Patches/../C_code.c:3577: result = ((5 * stat) / 4) + 1; +.L1543: +@ Patches/../C_code.c:3582: result = ((5 * stat) / 4) + 1; movs r3, #3 @ tmp152, -@ Patches/../C_code.c:3577: result = ((5 * stat) / 4) + 1; +@ Patches/../C_code.c:3582: result = ((5 * stat) / 4) + 1; lsls r2, r0, #2 @ tmp146, stat, adds r2, r2, r0 @ tmp147, tmp146, stat -@ Patches/../C_code.c:3577: result = ((5 * stat) / 4) + 1; +@ Patches/../C_code.c:3582: result = ((5 * stat) / 4) + 1; asrs r1, r2, #31 @ tmp151, tmp147, ands r3, r1 @ tmp153, tmp151 adds r3, r3, r2 @ tmp154, tmp153, tmp147 asrs r3, r3, #2 @ tmp155, tmp154, -@ Patches/../C_code.c:3577: result = ((5 * stat) / 4) + 1; +@ Patches/../C_code.c:3582: result = ((5 * stat) / 4) + 1; adds r3, r3, #1 @ stat, -@ Patches/../C_code.c:3578: break; - b .L1544 @ -.L1550: +@ Patches/../C_code.c:3583: break; + b .L1547 @ +.L1553: .align 2 -.L1549: +.L1552: .word RandBitflags .size AdjustStatForInflatedNumbers, .-AdjustStatForInflatedNumbers .align 1 @@ -10783,79 +10814,79 @@ SlightlyAdjustStatForInflatedNumbers: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) - ldr r2, .L1561 @ tmp124, +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) + ldr r2, .L1564 @ tmp124, ldr r2, [r2] @ RandBitflags, RandBitflags - ldrh r2, [r2] @ *RandBitflags.154_1, *RandBitflags.154_1 - lsls r2, r2, #23 @ tmp129, *RandBitflags.154_1, -@ Patches/../C_code.c:3594: { + ldrh r2, [r2] @ *RandBitflags.155_1, *RandBitflags.155_1 + lsls r2, r2, #23 @ tmp129, *RandBitflags.155_1, +@ Patches/../C_code.c:3599: { movs r3, r0 @ stat, tmp169 -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) lsrs r2, r2, #29 @ _2, tmp129, -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) cmp r2, #5 @ _2, - beq .L1552 @, - bhi .L1553 @, + beq .L1555 @, + bhi .L1556 @, movs r0, #0 @ , cmp r2, #2 @ _2, - beq .L1551 @, + beq .L1554 @, cmp r2, #3 @ _2, - bne .L1556 @, -@ Patches/../C_code.c:3615: result = ((7 * stat) / 8) - 1; + bne .L1559 @, +@ Patches/../C_code.c:3620: result = ((7 * stat) / 8) - 1; lsls r2, r3, #3 @ tmp134, stat, subs r2, r2, r3 @ tmp135, tmp134, stat -@ Patches/../C_code.c:3615: result = ((7 * stat) / 8) - 1; +@ Patches/../C_code.c:3620: result = ((7 * stat) / 8) - 1; movs r3, #7 @ tmp140, asrs r1, r2, #31 @ tmp139, tmp135, ands r3, r1 @ tmp141, tmp139 adds r3, r3, r2 @ tmp142, tmp141, tmp135 asrs r3, r3, #3 @ tmp143, tmp142, -@ Patches/../C_code.c:3615: result = ((7 * stat) / 8) - 1; +@ Patches/../C_code.c:3620: result = ((7 * stat) / 8) - 1; subs r3, r3, #1 @ stat, -@ Patches/../C_code.c:3616: break; - b .L1556 @ -.L1553: -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) +@ Patches/../C_code.c:3621: break; + b .L1559 @ +.L1556: +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) cmp r2, #6 @ _2, - bne .L1556 @, -@ Patches/../C_code.c:3630: result = ((10 * stat) / 8) + 1; + bne .L1559 @, +@ Patches/../C_code.c:3635: result = ((10 * stat) / 8) + 1; movs r3, #7 @ tmp162, -@ Patches/../C_code.c:3630: result = ((10 * stat) / 8) + 1; +@ Patches/../C_code.c:3635: result = ((10 * stat) / 8) + 1; lsls r2, r0, #2 @ tmp155, stat, adds r2, r2, r0 @ tmp156, tmp155, stat lsls r2, r2, #1 @ tmp157, tmp156, -@ Patches/../C_code.c:3630: result = ((10 * stat) / 8) + 1; +@ Patches/../C_code.c:3635: result = ((10 * stat) / 8) + 1; asrs r1, r2, #31 @ tmp161, tmp157, ands r3, r1 @ tmp163, tmp161 adds r3, r3, r2 @ tmp164, tmp163, tmp157 asrs r3, r3, #3 @ tmp165, tmp164, -@ Patches/../C_code.c:3630: result = ((10 * stat) / 8) + 1; +@ Patches/../C_code.c:3635: result = ((10 * stat) / 8) + 1; adds r3, r3, #1 @ stat, -.L1556: -@ Patches/../C_code.c:3634: if (result < 0) +.L1559: +@ Patches/../C_code.c:3639: if (result < 0) mvns r0, r3 @ tmp168, stat asrs r0, r0, #31 @ tmp167, tmp168, ands r0, r3 @ , stat -.L1551: -@ Patches/../C_code.c:3639: } +.L1554: +@ Patches/../C_code.c:3644: } @ sp needed @ bx lr -.L1552: -@ Patches/../C_code.c:3625: result = ((9 * stat) / 8) + 0; +.L1555: +@ Patches/../C_code.c:3630: result = ((9 * stat) / 8) + 0; movs r3, #7 @ tmp150, -@ Patches/../C_code.c:3625: result = ((9 * stat) / 8) + 0; +@ Patches/../C_code.c:3630: result = ((9 * stat) / 8) + 0; lsls r2, r0, #3 @ tmp145, stat, adds r2, r2, r0 @ tmp146, tmp145, stat -@ Patches/../C_code.c:3625: result = ((9 * stat) / 8) + 0; +@ Patches/../C_code.c:3630: result = ((9 * stat) / 8) + 0; asrs r1, r2, #31 @ tmp149, tmp146, ands r3, r1 @ tmp151, tmp149 adds r3, r3, r2 @ tmp152, tmp151, tmp146 asrs r3, r3, #3 @ stat, tmp152, -@ Patches/../C_code.c:3626: break; - b .L1556 @ -.L1562: +@ Patches/../C_code.c:3631: break; + b .L1559 @ +.L1565: .align 2 -.L1561: +.L1564: .word RandBitflags .size SlightlyAdjustStatForInflatedNumbers, .-SlightlyAdjustStatForInflatedNumbers .align 1 @@ -10876,153 +10907,153 @@ NewDrawStatWithBar: movs r5, r3 @ base, tmp223 push {r6, r7, lr} @ sub sp, sp, #16 @,, -@ Patches/../C_code.c:3649: int diff = total - base; +@ Patches/../C_code.c:3654: int diff = total - base; ldr r3, [sp, #48] @ tmp233, total subs r3, r3, r5 @ diff, tmp233, base mov r8, r3 @ diff, diff -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldr r3, .L1578 @ tmp152, +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldr r3, .L1581 @ tmp152, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r3, [r3] @ *RandBitflags.151_38, *RandBitflags.151_38 - lsls r3, r3, #23 @ tmp157, *RandBitflags.151_38, + ldrh r3, [r3] @ *RandBitflags.152_38, *RandBitflags.152_38 + lsls r3, r3, #23 @ tmp157, *RandBitflags.152_38, lsrs r3, r3, #29 @ _39, tmp157, -@ Patches/../C_code.c:3648: { +@ Patches/../C_code.c:3653: { mov r10, r1 @ x, tmp221 subs r1, r3, #2 @ tmp159, _39, lsls r1, r1, #24 @ tmp163, tmp159, mov r9, r0 @ num, tmp220 lsrs r1, r1, #24 @ tmp162, tmp163, cmp r1, #4 @ tmp162, - bhi .L1570 @, + bhi .L1573 @, lsls r1, r3, #4 @ tmp165, _39, subs r3, r1, r3 @ tmp166, tmp165, _39 subs r3, r3, #30 @ result, -.L1564: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r1, .L1578+4 @ tmp167, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L1567: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r1, .L1581+4 @ tmp167, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r6, [r1] @ result, maxStat cmp r6, r3 @ result, result - ble .L1565 @, + ble .L1568 @, movs r6, r3 @ result, result -.L1565: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L1568: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r3, r6, #1 @ tmp229, result, - beq .L1577 @, -.L1566: -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); + beq .L1580 @, +.L1569: +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); mov r3, r10 @ x, x lsls r4, r2, #5 @ _1, y, adds r7, r4, r3 @ tmp168, _1, x -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); - ldr r3, .L1578+8 @ tmp170, -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); + ldr r3, .L1581+8 @ tmp170, +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); lsls r7, r7, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); adds r7, r7, r3 @ _5, tmp169, tmp170 -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); ldr r3, [sp, #52] @ tmp235, max subs r1, r5, r3 @ tmp216, base, tmp235 subs r3, r1, #1 @ tmp217, tmp216 sbcs r1, r1, r3 @ tmp215, tmp216, tmp217 movs r3, #1 @ tmp219, rsbs r1, r1, #0 @ tmp218, tmp215 - bics r1, r3 @ iftmp.155_22, tmp219 -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); + bics r1, r3 @ iftmp.156_22, tmp219 +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); movs r2, r5 @, base - ldr r3, .L1578+12 @ tmp171, + ldr r3, .L1581+12 @ tmp171, movs r0, r7 @, _5 -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); - adds r1, r1, #4 @ iftmp.155_22, -@ Patches/../C_code.c:3652: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); + adds r1, r1, #4 @ iftmp.156_22, +@ Patches/../C_code.c:3657: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), (base == max) ? green : blue, base); bl .L14 @ -@ Patches/../C_code.c:9040: if (number == 0) +@ Patches/../C_code.c:9045: if (number == 0) mov r3, r8 @ diff, diff cmp r3, #0 @ diff, - beq .L1568 @, + beq .L1571 @, movs r2, r5 @, base movs r1, r7 @, _5 mov r0, r8 @, diff bl NewPutNumberBonus.part.0 @ -.L1568: -@ Patches/../C_code.c:3656: if (total > globalCap) +.L1571: +@ Patches/../C_code.c:3661: if (total > globalCap) ldr r3, [sp, #48] @ tmp237, total cmp r3, r6 @ tmp237, result - ble .L1569 @, -@ Patches/../C_code.c:3659: diff = total - base; + ble .L1572 @, +@ Patches/../C_code.c:3664: diff = total - base; subs r3, r6, r5 @ diff, result, base mov r8, r3 @ diff, diff -.L1569: -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +.L1572: +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, add r4, r4, r10 @ tmp174, x adds r4, r4, #30 @ tmp175, -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, lsls r4, r4, #1 @ tmp176, tmp175, -@ Patches/../C_code.c:3662: DrawStatBarGfx( +@ Patches/../C_code.c:3667: DrawStatBarGfx( mov r10, r4 @ tmp176, tmp176 - ldr r3, .L1578+16 @ tmp178, + ldr r3, .L1581+16 @ tmp178, add r10, r10, r3 @ tmp176, tmp178 -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, mov r3, r9 @ num, num lsls r7, r3, #1 @ tmp180, num, -@ Patches/../C_code.c:3662: DrawStatBarGfx( - ldr r3, .L1578+20 @ tmp241, +@ Patches/../C_code.c:3667: DrawStatBarGfx( + ldr r3, .L1581+20 @ tmp241, mov ip, r3 @ tmp241, tmp241 -@ Patches/../C_code.c:3664: base * 41 / globalCap, diff * 41 / globalCap); +@ Patches/../C_code.c:3669: base * 41 / globalCap, diff * 41 / globalCap); mov r3, r8 @ diff, diff lsls r0, r3, #2 @ tmp185, diff, add r0, r0, r8 @ tmp186, diff -@ Patches/../C_code.c:3662: DrawStatBarGfx( - ldr r3, .L1578+24 @ tmp192, -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3667: DrawStatBarGfx( + ldr r3, .L1581+24 @ tmp192, +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, add r7, r7, r9 @ tmp181, num -@ Patches/../C_code.c:3664: base * 41 / globalCap, diff * 41 / globalCap); +@ Patches/../C_code.c:3669: base * 41 / globalCap, diff * 41 / globalCap); lsls r0, r0, #3 @ tmp187, tmp186, -@ Patches/../C_code.c:3662: DrawStatBarGfx( +@ Patches/../C_code.c:3667: DrawStatBarGfx( movs r1, r6 @, result -@ Patches/../C_code.c:3664: base * 41 / globalCap, diff * 41 / globalCap); +@ Patches/../C_code.c:3669: base * 41 / globalCap, diff * 41 / globalCap); add r0, r0, r8 @ tmp188, diff -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, lsls r7, r7, #1 @ tmp182, tmp181, -@ Patches/../C_code.c:3662: DrawStatBarGfx( +@ Patches/../C_code.c:3667: DrawStatBarGfx( movs r4, r3 @ tmp192, tmp192 add r7, r7, ip @ tmp183, tmp241 bl .L14 @ str r0, [sp, #8] @ tmp224, -@ Patches/../C_code.c:3664: base * 41 / globalCap, diff * 41 / globalCap); +@ Patches/../C_code.c:3669: base * 41 / globalCap, diff * 41 / globalCap); lsls r0, r5, #2 @ tmp195, base, adds r0, r0, r5 @ tmp196, tmp195, base lsls r0, r0, #3 @ tmp197, tmp196, -@ Patches/../C_code.c:3662: DrawStatBarGfx( +@ Patches/../C_code.c:3667: DrawStatBarGfx( movs r1, r6 @, result -@ Patches/../C_code.c:3664: base * 41 / globalCap, diff * 41 / globalCap); +@ Patches/../C_code.c:3669: base * 41 / globalCap, diff * 41 / globalCap); adds r0, r0, r5 @ tmp198, tmp197, base -@ Patches/../C_code.c:3662: DrawStatBarGfx( - bl .L269 @ -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3667: DrawStatBarGfx( + bl .L272 @ +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, ldr r3, [sp, #52] @ tmp244, max mov ip, r3 @ tmp245, tmp245 -@ Patches/../C_code.c:3662: DrawStatBarGfx( +@ Patches/../C_code.c:3667: DrawStatBarGfx( str r0, [sp, #4] @ tmp225, -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, lsls r0, r3, #2 @ tmp205, tmp244, add r0, r0, ip @ tmp206, tmp245 lsls r0, r0, #3 @ tmp207, tmp206, -@ Patches/../C_code.c:3662: DrawStatBarGfx( +@ Patches/../C_code.c:3667: DrawStatBarGfx( movs r1, r6 @, result -@ Patches/../C_code.c:3663: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, +@ Patches/../C_code.c:3668: 0x401 + num * 6, 6, gUiTmScratchC + TILEMAP_INDEX(x - 2, y + 1), TILEREF(0, 6), max * 41 / globalCap, add r0, r0, ip @ tmp208, tmp247 -@ Patches/../C_code.c:3662: DrawStatBarGfx( - bl .L269 @ +@ Patches/../C_code.c:3667: DrawStatBarGfx( + bl .L272 @ movs r3, #192 @, str r0, [sp] @ tmp226, mov r2, r10 @, tmp177 movs r1, #6 @, movs r0, r7 @, tmp183 - ldr r4, .L1578+28 @ tmp214, + ldr r4, .L1581+28 @ tmp214, lsls r3, r3, #7 @,, - bl .L269 @ -@ Patches/../C_code.c:3665: } + bl .L272 @ +@ Patches/../C_code.c:3670: } add sp, sp, #16 @,, @ sp needed @ pop {r5, r6, r7} @@ -11032,18 +11063,18 @@ NewDrawStatWithBar: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L1570: -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) +.L1573: +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) movs r3, #1 @ result, rsbs r3, r3, #0 @ result, result - b .L1564 @ -.L1577: -@ Patches/../C_code.c:3540: result = 30; + b .L1567 @ +.L1580: +@ Patches/../C_code.c:3545: result = 30; adds r6, r6, #31 @ result, - b .L1566 @ -.L1579: + b .L1569 @ +.L1582: .align 2 -.L1578: +.L1581: .word RandBitflags .word maxStat .word gUiTmScratchA @@ -11091,35 +11122,35 @@ RandHPStat: mov lr, r10 @, push {r6, r7, lr} @ movs r7, r2 @ noise, tmp180 -@ Patches/../C_code.c:3675: if (!RandBitflags->base) +@ Patches/../C_code.c:3680: if (!RandBitflags->base) movs r2, #3 @ tmp141, -@ Patches/../C_code.c:3674: { +@ Patches/../C_code.c:3679: { movs r6, r3 @ offset, tmp181 -@ Patches/../C_code.c:3675: if (!RandBitflags->base) - ldr r3, .L1595 @ tmp139, +@ Patches/../C_code.c:3680: if (!RandBitflags->base) + ldr r3, .L1598 @ tmp139, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3] @ *RandBitflags.156_1, *RandBitflags.156_1 -@ Patches/../C_code.c:3674: { + ldrb r3, [r3] @ *RandBitflags.157_1, *RandBitflags.157_1 +@ Patches/../C_code.c:3679: { movs r5, r0 @ unit, tmp178 movs r4, r1 @ stat, tmp179 sub sp, sp, #8 @,, -@ Patches/../C_code.c:3675: if (!RandBitflags->base) - tst r2, r3 @ tmp141, *RandBitflags.156_1 - beq .L1582 @, -@ Patches/../C_code.c:3679: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) +@ Patches/../C_code.c:3680: if (!RandBitflags->base) + tst r2, r3 @ tmp141, *RandBitflags.157_1 + beq .L1585 @, +@ Patches/../C_code.c:3684: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) ldr r3, [r0] @ unit_7(D)->pCharacterData, unit_7(D)->pCharacterData ldrb r3, [r3, #4] @ _15, mov r8, r3 @ _15, _15 -@ Patches/../C_code.c:3679: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) +@ Patches/../C_code.c:3684: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) mov r1, r8 @ _15, _15 - ldr r3, .L1595+4 @ tmp150, + ldr r3, .L1598+4 @ tmp150, lsls r1, r1, #1 @ tmp151, _15, -@ Patches/../C_code.c:3679: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) +@ Patches/../C_code.c:3684: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) ldrb r3, [r1, r3] @ tmp152, CharExceptions cmp r3, #0 @ tmp152, - beq .L1593 @, -.L1582: -@ Patches/../C_code.c:3697: } + beq .L1596 @, +.L1585: +@ Patches/../C_code.c:3702: } movs r0, r4 @, stat add sp, sp, #8 @,, @ sp needed @ @@ -11130,66 +11161,66 @@ RandHPStat: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1593: -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +.L1596: +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); str r2, [sp] @ tmp141, movs r1, r7 @, noise movs r2, r6 @, offset movs r0, r4 @, stat bl HashPercent @ -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp156, movs r3, #192 @ tmp157, ldrsb r2, [r5, r2] @ tmp156, ands r3, r2 @ tmp158, tmp156 -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) subs r3, r3, #128 @ tmp161, -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) subs r2, r3, #1 @ tmp162, tmp161 sbcs r3, r3, r2 @ tmp163, tmp161, tmp162 -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); mov r9, r0 @ tmp154, tmp182 -@ Patches/../C_code.c:3683: int result = HashStat(stat, noise, offset, 3); // by 2/3rds percent +@ Patches/../C_code.c:3688: int result = HashStat(stat, noise, offset, 3); // by 2/3rds percent mov r10, r0 @ result, tmp154 -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) cmp r3, #0 @ tmp163, - bne .L1586 @, + bne .L1589 @, mov r3, r8 @ _15, _15 cmp r3, #44 @ _15, - bhi .L1583 @, -.L1586: -@ Patches/../C_code.c:3686: if (result < stat) + bhi .L1586 @, +.L1589: +@ Patches/../C_code.c:3691: if (result < stat) cmp r4, r9 @ stat, tmp154 - bgt .L1594 @, -.L1583: -@ Patches/../C_code.c:3695: result = SlightlyAdjustStatForInflatedNumbers(result); + bgt .L1597 @, +.L1586: +@ Patches/../C_code.c:3700: result = SlightlyAdjustStatForInflatedNumbers(result); mov r0, r10 @, result bl SlightlyAdjustStatForInflatedNumbers @ movs r4, r0 @ stat, tmp184 -@ Patches/../C_code.c:3696: return result; - b .L1582 @ -.L1594: -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:3701: return result; + b .L1585 @ +.L1597: +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); movs r3, #3 @ tmp174, -@ Patches/../C_code.c:3688: stat = HashStat(result, noise, offset + 13, 3); +@ Patches/../C_code.c:3693: stat = HashStat(result, noise, offset + 13, 3); movs r2, r6 @ offset, offset -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); str r3, [sp] @ tmp174, movs r1, r7 @, noise movs r3, #0 @, mov r0, r9 @, tmp154 -@ Patches/../C_code.c:3688: stat = HashStat(result, noise, offset + 13, 3); +@ Patches/../C_code.c:3693: stat = HashStat(result, noise, offset + 13, 3); adds r2, r2, #13 @ offset, -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); bl HashPercent @ -@ Patches/../C_code.c:3689: if (stat > result) +@ Patches/../C_code.c:3694: if (stat > result) cmp r9, r0 @ tmp154, tmp175 - bge .L1583 @, + bge .L1586 @, mov r10, r0 @ result, tmp175 - b .L1583 @ -.L1596: + b .L1586 @ +.L1599: .align 2 -.L1595: +.L1598: .word RandBitflags .word CharExceptions .size RandHPStat, .-RandHPStat @@ -11210,32 +11241,32 @@ RandStat: mov lr, r10 @, push {r6, r7, lr} @ movs r6, r3 @ offset, tmp179 -@ Patches/../C_code.c:3700: if (!RandBitflags->base) - ldr r3, .L1612 @ tmp139, +@ Patches/../C_code.c:3705: if (!RandBitflags->base) + ldr r3, .L1615 @ tmp139, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3] @ *RandBitflags.157_1, *RandBitflags.157_1 -@ Patches/../C_code.c:3699: { + ldrb r3, [r3] @ *RandBitflags.158_1, *RandBitflags.158_1 +@ Patches/../C_code.c:3704: { movs r5, r0 @ unit, tmp176 movs r4, r1 @ stat, tmp177 movs r7, r2 @ noise, tmp178 sub sp, sp, #8 @,, -@ Patches/../C_code.c:3700: if (!RandBitflags->base) - lsls r3, r3, #30 @ tmp183, *RandBitflags.157_1, - beq .L1598 @, -@ Patches/../C_code.c:3704: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) +@ Patches/../C_code.c:3705: if (!RandBitflags->base) + lsls r3, r3, #30 @ tmp183, *RandBitflags.158_1, + beq .L1601 @, +@ Patches/../C_code.c:3709: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) ldr r3, [r0] @ unit_7(D)->pCharacterData, unit_7(D)->pCharacterData ldrb r3, [r3, #4] @ _15, mov r8, r3 @ _15, _15 -@ Patches/../C_code.c:3704: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) +@ Patches/../C_code.c:3709: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) mov r2, r8 @ _15, _15 - ldr r3, .L1612+4 @ tmp150, + ldr r3, .L1615+4 @ tmp150, lsls r2, r2, #1 @ tmp151, _15, -@ Patches/../C_code.c:3704: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) +@ Patches/../C_code.c:3709: if (CharExceptions[unit->pCharacterData->number].NeverChangeFrom) ldrb r3, [r2, r3] @ tmp152, CharExceptions cmp r3, #0 @ tmp152, - beq .L1610 @, -.L1598: -@ Patches/../C_code.c:3722: } + beq .L1613 @, +.L1601: +@ Patches/../C_code.c:3727: } movs r0, r4 @, stat add sp, sp, #8 @,, @ sp needed @ @@ -11246,8 +11277,8 @@ RandStat: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1610: -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +.L1613: +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); ldr r3, [sp, #40] @ tmp188, promoted movs r2, r6 @, offset str r3, [sp] @ tmp188, @@ -11255,58 +11286,58 @@ RandStat: movs r3, #0 @, movs r0, r4 @, stat bl HashPercent @ -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp155, movs r3, #192 @ tmp156, ldrsb r2, [r5, r2] @ tmp155, ands r3, r2 @ tmp157, tmp155 -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) subs r3, r3, #128 @ tmp160, -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) subs r2, r3, #1 @ tmp161, tmp160 sbcs r3, r3, r2 @ tmp162, tmp160, tmp161 -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); mov r9, r0 @ tmp153, tmp180 -@ Patches/../C_code.c:3708: int result = HashStat(stat, noise, offset, promoted); +@ Patches/../C_code.c:3713: int result = HashStat(stat, noise, offset, promoted); mov r10, r0 @ result, tmp153 -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) cmp r3, #0 @ tmp162, - bne .L1602 @, + bne .L1605 @, mov r3, r8 @ _15, _15 cmp r3, #44 @ _15, - bhi .L1599 @, -.L1602: -@ Patches/../C_code.c:3711: if (result < stat) + bhi .L1602 @, +.L1605: +@ Patches/../C_code.c:3716: if (result < stat) cmp r4, r9 @ stat, tmp153 - bgt .L1611 @, -.L1599: -@ Patches/../C_code.c:3720: result = SlightlyAdjustStatForInflatedNumbers(result); + bgt .L1614 @, +.L1602: +@ Patches/../C_code.c:3725: result = SlightlyAdjustStatForInflatedNumbers(result); mov r0, r10 @, result bl SlightlyAdjustStatForInflatedNumbers @ movs r4, r0 @ stat, tmp182 -@ Patches/../C_code.c:3721: return result; - b .L1598 @ -.L1611: -@ Patches/../C_code.c:3713: stat = HashStat(result, noise, offset + 13, promoted); +@ Patches/../C_code.c:3726: return result; + b .L1601 @ +.L1614: +@ Patches/../C_code.c:3718: stat = HashStat(result, noise, offset + 13, promoted); movs r2, r6 @ offset, offset -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); ldr r3, [sp, #40] @ tmp191, promoted movs r1, r7 @, noise str r3, [sp] @ tmp191, mov r0, r9 @, tmp153 movs r3, #0 @, -@ Patches/../C_code.c:3713: stat = HashStat(result, noise, offset + 13, promoted); +@ Patches/../C_code.c:3718: stat = HashStat(result, noise, offset + 13, promoted); adds r2, r2, #13 @ offset, -@ Patches/../C_code.c:2416: return HashPercent(number, noise, offset, false, earlygamePromo); +@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, false, earlygamePromo); bl HashPercent @ -@ Patches/../C_code.c:3714: if (stat > result) +@ Patches/../C_code.c:3719: if (stat > result) cmp r9, r0 @ tmp153, tmp173 - bge .L1599 @, + bge .L1602 @, mov r10, r0 @ result, tmp173 - b .L1599 @ -.L1613: + b .L1602 @ +.L1616: .align 2 -.L1612: +.L1615: .word RandBitflags .word CharExceptions .size RandStat, .-RandStat @@ -11323,48 +11354,48 @@ HashWexp: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ sub sp, sp, #8 @,, -@ Patches/../C_code.c:3726: if (!number) +@ Patches/../C_code.c:3731: if (!number) cmp r0, #0 @ number, - beq .L1618 @, -@ Patches/../C_code.c:3730: if (!RandBitflags->class) + beq .L1621 @, +@ Patches/../C_code.c:3735: if (!RandBitflags->class) movs r4, #6 @ tmp132, - ldr r3, .L1619 @ tmp126, + ldr r3, .L1622 @ tmp126, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.158_1, *RandBitflags.158_1 -@ Patches/../C_code.c:3730: if (!RandBitflags->class) - tst r4, r3 @ tmp132, *RandBitflags.158_1 - bne .L1616 @, -.L1617: -@ Patches/../C_code.c:3739: return number; + ldrb r3, [r3, #1] @ *RandBitflags.159_1, *RandBitflags.159_1 +@ Patches/../C_code.c:3735: if (!RandBitflags->class) + tst r4, r3 @ tmp132, *RandBitflags.159_1 + bne .L1619 @, +.L1620: +@ Patches/../C_code.c:3744: return number; lsls r0, r0, #16 @ , number, asrs r0, r0, #16 @ , , -.L1615: -@ Patches/../C_code.c:3740: } +.L1618: +@ Patches/../C_code.c:3745: } add sp, sp, #8 @,, @ sp needed @ pop {r4} pop {r1} bx r1 -.L1616: -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +.L1619: +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp136, str r3, [sp] @ tmp136, adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:3734: number = HashByPercent(number, noise, offset) + 1; +@ Patches/../C_code.c:3739: number = HashByPercent(number, noise, offset) + 1; adds r0, r0, #1 @ number, -@ Patches/../C_code.c:3735: if (number > 255) +@ Patches/../C_code.c:3740: if (number > 255) cmp r0, #255 @ number, - ble .L1617 @, + ble .L1620 @, movs r0, #255 @ number, - b .L1617 @ -.L1618: -@ Patches/../C_code.c:3728: return number; + b .L1620 @ +.L1621: +@ Patches/../C_code.c:3733: return number; movs r0, #0 @ , - b .L1615 @ -.L1620: + b .L1618 @ +.L1623: .align 2 -.L1619: +.L1622: .word RandBitflags .size HashWexp, .-HashWexp .align 1 @@ -11379,22 +11410,22 @@ GetGrowthModifiers: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; movs r3, #128 @ tmp120, -@ Patches/../C_code.c:3745: } +@ Patches/../C_code.c:3750: } @ sp needed @ -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r0, [r0, #12] @ unit_5(D)->state, unit_5(D)->state lsls r3, r3, #6 @ tmp120, tmp120, ands r0, r3 @ tmp118, tmp120 -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; rsbs r3, r0, #0 @ tmp123, tmp118 adcs r0, r0, r3 @ tmp122, tmp118, tmp123 movs r3, #4 @ tmp125, rsbs r0, r0, #0 @ tmp124, tmp122 bics r0, r3 @ , tmp125 adds r0, r0, #5 @ , -@ Patches/../C_code.c:3745: } +@ Patches/../C_code.c:3750: } bx lr .size GetGrowthModifiers, .-GetGrowthModifiers .align 1 @@ -11409,50 +11440,50 @@ GetBonusGrowth: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1629 @ tmp123, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1632 @ tmp123, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r1, #11 @ tmp124, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r2, [r3] @ pretmp_16, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp125, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r1, [r0, r1] @ tmp124, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r1 @ allegiance, tmp124 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1628 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1631 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r2] @ *pretmp_16, *pretmp_16 lsls r3, r3, #28 @ tmp137, *pretmp_16, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp137, -.L1626: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1629: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r0, r3, #2 @ tmp140, bonus, adds r0, r0, r3 @ tmp141, tmp140, bonus lsls r0, r0, #1 @ , tmp141, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r0, #100 @ , - ble .L1624 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1627 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp143, subs r0, r3, r0 @ , tmp143, -.L1624: -@ Patches/../C_code.c:3765: } +.L1627: +@ Patches/../C_code.c:3770: } @ sp needed @ bx lr -.L1628: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +.L1631: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r2] @ *pretmp_16, *pretmp_16 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_16, - b .L1626 @ -.L1630: + b .L1629 @ +.L1633: .align 2 -.L1629: +.L1632: .word GrowthValues .size GetBonusGrowth, .-GetBonusGrowth .align 1 @@ -11467,138 +11498,138 @@ GetClassMagGrowth: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:3797: growth += MagClassTable[unit->pClassData->number].growth; +@ Patches/../C_code.c:3802: growth += MagClassTable[unit->pClassData->number].growth; ldr r3, [r0, #4] @ unit_15(D)->pClassData, unit_15(D)->pClassData ldrb r7, [r3, #4] @ _3, -@ Patches/../C_code.c:3797: growth += MagClassTable[unit->pClassData->number].growth; - ldr r3, .L1649 @ tmp147, +@ Patches/../C_code.c:3802: growth += MagClassTable[unit->pClassData->number].growth; + ldr r3, .L1652 @ tmp147, lsls r2, r7, #2 @ tmp148, _3, adds r3, r3, r2 @ tmp149, tmp147, tmp148 ldrb r4, [r3, #1] @ , MagClassTable -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1649+4 @ tmp152, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1652+4 @ tmp152, ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1649+8 @ tmp155, -@ Patches/../C_code.c:3795: { + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1652+8 @ tmp155, +@ Patches/../C_code.c:3800: { movs r5, r0 @ unit, tmp211 sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp155 - beq .L1631 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp155 + beq .L1634 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp158, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1649+12 @ tmp156, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1652+12 @ tmp156, lsls r2, r2, #1 @ tmp159, tmp158, -@ Patches/../C_code.c:3798: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:3803: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp161, CharExceptions -@ Patches/../C_code.c:3798: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:3803: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp161, - bne .L1631 @, + bne .L1634 @, rsbs r6, r1, #0 @ tmp169, modifiersBool adcs r6, r6, r1 @ tmp169, modifiersBool cmp r6, #0 @ tmp169, - bne .L1631 @, -@ Patches/../C_code.c:3802: int noise[4] = { 0, 0, 0, 0 }; + bne .L1634 @, +@ Patches/../C_code.c:3807: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1649+16 @ tmp174, + ldr r3, .L1652+16 @ tmp174, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #1 @, movs r2, #81 @, movs r0, r4 @, str r6, [sp] @ tmp169, add r1, sp, #8 @,, -@ Patches/../C_code.c:3803: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:3808: noise[0] = unit->pClassData->number; str r7, [sp, #8] @ _3, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); bl HashPercent @ -@ Patches/../C_code.c:3805: if ((result - growth) > 99) +@ Patches/../C_code.c:3810: if ((result - growth) > 99) subs r3, r0, r4 @ tmp182, result, -@ Patches/../C_code.c:3805: if ((result - growth) > 99) +@ Patches/../C_code.c:3810: if ((result - growth) > 99) cmp r3, #99 @ tmp182, - bgt .L1647 @, -@ Patches/../C_code.c:3809: if ((growth - result) > 99) + bgt .L1650 @, +@ Patches/../C_code.c:3814: if ((growth - result) > 99) subs r3, r4, r0 @ tmp183, , result -@ Patches/../C_code.c:3809: if ((growth - result) > 99) +@ Patches/../C_code.c:3814: if ((growth - result) > 99) cmp r3, #99 @ tmp183, - ble .L1634 @, -@ Patches/../C_code.c:3811: result = growth - 99; + ble .L1637 @, +@ Patches/../C_code.c:3816: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1634: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1637: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r5, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp214, unit_15(D)->state, - bpl .L1635 @, -@ Patches/../C_code.c:3815: result += GetGrowthModifiers(unit); + bpl .L1638 @, +@ Patches/../C_code.c:3820: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1635: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1649+20 @ tmp187, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1638: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1652+20 @ tmp187, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp188, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_6, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp189, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r5, r2] @ tmp188, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp188 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1648 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1651 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_6, *pretmp_6 lsls r3, r3, #28 @ tmp201, *pretmp_6, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp201, -.L1637: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1640: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp204, bonus, adds r4, r4, r3 @ tmp205, tmp204, bonus lsls r4, r4, #1 @ bonus, tmp205, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1638 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1641 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp207, subs r4, r3, r4 @ bonus, tmp207, bonus -.L1638: -@ Patches/../C_code.c:3816: result += GetBonusGrowth(unit); +.L1641: +@ Patches/../C_code.c:3821: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:3818: if (result < 0) +@ Patches/../C_code.c:3823: if (result < 0) mvns r3, r4 @ tmp210, asrs r3, r3, #31 @ tmp209, tmp210, ands r4, r3 @ , tmp209 -.L1631: -@ Patches/../C_code.c:3823: } +.L1634: +@ Patches/../C_code.c:3828: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1647: -@ Patches/../C_code.c:3807: result = growth + 99; +.L1650: +@ Patches/../C_code.c:3812: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1634 @ -.L1648: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1637 @ +.L1651: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_6, *pretmp_6 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_6, - b .L1637 @ -.L1650: + b .L1640 @ +.L1653: .align 2 -.L1649: +.L1652: .word MagClassTable .word RandBitflags .word 268435468 @@ -11622,156 +11653,156 @@ GetUnitMagGrowth: push {lr} @ movs r4, r0 @ unit, tmp305 movs r6, r1 @ modifiersBool, tmp306 -@ Patches/../C_code.c:3827: int add = 0; +@ Patches/../C_code.c:3832: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:3825: { +@ Patches/../C_code.c:3830: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:3828: if (modifiersBool) +@ Patches/../C_code.c:3833: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L1652 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L1655 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_54(D)->state, unit_54(D)->state lsls r3, r3, #18 @ tmp180, unit_54(D)->state, -@ Patches/../C_code.c:3827: int add = 0; +@ Patches/../C_code.c:3832: int add = 0; asrs r3, r3, #31 @ tmp303, tmp180, adds r7, r7, #5 @ tmp304, ands r7, r3 @ add, tmp303 -.L1652: -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +.L1655: +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldr r0, [r4] @ unit_54(D)->pCharacterData, unit_54(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldrb r3, [r0, #4] @ tmp185, -@ Patches/../C_code.c:3832: baseGrowth = MagCharTable[GetReorderedUnitID(unit)].growth; - ldr r2, .L1693 @ tmp297, +@ Patches/../C_code.c:3837: baseGrowth = MagCharTable[GetReorderedUnitID(unit)].growth; + ldr r2, .L1696 @ tmp297, lsls r3, r3, #1 @ tmp186, tmp185, adds r3, r2, r3 @ tmp187, tmp297, tmp186 ldrb r5, [r3, #1] @ _1, MagCharTable -@ Patches/../C_code.c:3834: if (ClassBasedGrowths) - ldr r3, .L1693+4 @ tmp189, -@ Patches/../C_code.c:3834: if (ClassBasedGrowths) +@ Patches/../C_code.c:3839: if (ClassBasedGrowths) + ldr r3, .L1696+4 @ tmp189, +@ Patches/../C_code.c:3839: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths cmp r3, #0 @ ClassBasedGrowths, - beq .L1653 @, -@ Patches/../C_code.c:3836: baseGrowth = MagClassTable[unit->pClassData->number].growth; + beq .L1656 @, +@ Patches/../C_code.c:3841: baseGrowth = MagClassTable[unit->pClassData->number].growth; ldr r1, [r4, #4] @ unit_54(D)->pClassData, unit_54(D)->pClassData ldrb r1, [r1, #4] @ tmp193, -@ Patches/../C_code.c:3836: baseGrowth = MagClassTable[unit->pClassData->number].growth; - ldr r3, .L1693+8 @ tmp191, +@ Patches/../C_code.c:3841: baseGrowth = MagClassTable[unit->pClassData->number].growth; + ldr r3, .L1696+8 @ tmp191, lsls r1, r1, #2 @ tmp194, tmp193, adds r3, r3, r1 @ tmp195, tmp191, tmp194 ldrb r5, [r3, #1] @ _1, MagClassTable -.L1653: -@ Patches/../C_code.c:3838: if (CombinedGrowths) - ldr r3, .L1693+12 @ tmp197, -@ Patches/../C_code.c:3838: if (CombinedGrowths) +.L1656: +@ Patches/../C_code.c:3843: if (CombinedGrowths) + ldr r3, .L1696+12 @ tmp197, +@ Patches/../C_code.c:3843: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L1654 @, -@ Patches/../C_code.c:3840: baseGrowth += MagClassTable[unit->pClassData->number].growth; + beq .L1657 @, +@ Patches/../C_code.c:3845: baseGrowth += MagClassTable[unit->pClassData->number].growth; ldr r1, [r4, #4] @ unit_54(D)->pClassData, unit_54(D)->pClassData ldrb r1, [r1, #4] @ tmp201, -@ Patches/../C_code.c:3840: baseGrowth += MagClassTable[unit->pClassData->number].growth; - ldr r3, .L1693+8 @ tmp199, +@ Patches/../C_code.c:3845: baseGrowth += MagClassTable[unit->pClassData->number].growth; + ldr r3, .L1696+8 @ tmp199, lsls r1, r1, #2 @ tmp202, tmp201, adds r3, r3, r1 @ tmp203, tmp199, tmp202 ldrb r3, [r3, #1] @ tmp205, MagClassTable -@ Patches/../C_code.c:3840: baseGrowth += MagClassTable[unit->pClassData->number].growth; +@ Patches/../C_code.c:3845: baseGrowth += MagClassTable[unit->pClassData->number].growth; adds r5, r5, r3 @ baseGrowth, baseGrowth, tmp205 -.L1654: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1693+16 @ tmp298, +.L1657: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1696+16 @ tmp298, mov r8, r3 @ tmp298, tmp298 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r1, [r3] @ *RandBitflags.63_83, *RandBitflags.63_83 - ldr r3, .L1693+20 @ tmp210, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r1, r3 @ *RandBitflags.63_83, tmp210 - beq .L1655 @, -@ Patches/../C_code.c:3833: int originalGrowth = MagCharTable[unit->pCharacterData->number].growth; + ldr r1, [r3] @ *RandBitflags.64_83, *RandBitflags.64_83 + ldr r3, .L1696+20 @ tmp210, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r1, r3 @ *RandBitflags.64_83, tmp210 + beq .L1658 @, +@ Patches/../C_code.c:3838: int originalGrowth = MagCharTable[unit->pCharacterData->number].growth; ldr r3, [r4] @ unit_54(D)->pCharacterData, unit_54(D)->pCharacterData ldrb r3, [r3, #4] @ _4, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L1693+24 @ tmp212, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L1696+24 @ tmp212, lsls r3, r3, #1 @ tmp213, _4, -@ Patches/../C_code.c:3842: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:3847: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r1, [r3, r1] @ tmp215, CharExceptions -@ Patches/../C_code.c:3842: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:3847: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r1, #0 @ tmp215, - bne .L1655 @, + bne .L1658 @, cmp r6, #0 @ modifiersBool, - beq .L1655 @, -@ Patches/../C_code.c:3833: int originalGrowth = MagCharTable[unit->pCharacterData->number].growth; + beq .L1658 @, +@ Patches/../C_code.c:3838: int originalGrowth = MagCharTable[unit->pCharacterData->number].growth; adds r2, r2, r3 @ tmp227, tmp297, tmp213 -@ Patches/../C_code.c:3846: int growth = CallGet_Mag_Growth(unit); +@ Patches/../C_code.c:3851: int growth = CallGet_Mag_Growth(unit); movs r0, r4 @, unit - ldr r3, .L1693+28 @ tmp229, -@ Patches/../C_code.c:3833: int originalGrowth = MagCharTable[unit->pCharacterData->number].growth; + ldr r3, .L1696+28 @ tmp229, +@ Patches/../C_code.c:3838: int originalGrowth = MagCharTable[unit->pCharacterData->number].growth; ldrb r6, [r2, #1] @ _5, MagCharTable -@ Patches/../C_code.c:3846: int growth = CallGet_Mag_Growth(unit); +@ Patches/../C_code.c:3851: int growth = CallGet_Mag_Growth(unit); bl .L14 @ -@ Patches/../C_code.c:3848: if (growth != (-1)) +@ Patches/../C_code.c:3853: if (growth != (-1)) adds r3, r0, #1 @ tmp312, growth, - beq .L1659 @, -@ Patches/../C_code.c:3850: add = growth - originalGrowth; + beq .L1662 @, +@ Patches/../C_code.c:3855: add = growth - originalGrowth; subs r7, r0, r6 @ add, growth, _5 -.L1659: -@ Patches/../C_code.c:3853: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L1662: +@ Patches/../C_code.c:3858: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp231, movs r3, #11 @ tmp230, movs r6, r2 @ , tmp231 ldrsb r3, [r4, r3] @ tmp230, ands r6, r3 @ , tmp230 -@ Patches/../C_code.c:3854: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:3859: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp231, tmp230 - bne .L1660 @, -@ Patches/../C_code.c:3854: if (player && (RandBitflags->grow50 == 1)) + bne .L1663 @, +@ Patches/../C_code.c:3859: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp298, tmp298 - ldr r2, [r3] @ RandBitflags.164_22, RandBitflags -@ Patches/../C_code.c:3854: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.164_22, *RandBitflags.164_22 -@ Patches/../C_code.c:3854: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp313, *RandBitflags.164_22, - bmi .L1671 @, -@ Patches/../C_code.c:3858: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.165_22, RandBitflags +@ Patches/../C_code.c:3859: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.165_22, *RandBitflags.165_22 +@ Patches/../C_code.c:3859: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp313, *RandBitflags.165_22, + bmi .L1674 @, +@ Patches/../C_code.c:3863: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp247, - ldrb r2, [r2] @ *RandBitflags.164_22, *RandBitflags.164_22 - ands r3, r2 @ _26, *RandBitflags.164_22 -@ Patches/../C_code.c:3858: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.165_22, *RandBitflags.165_22 + ands r3, r2 @ _26, *RandBitflags.165_22 +@ Patches/../C_code.c:3863: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _26, - beq .L1651 @, -@ Patches/../C_code.c:3862: if (player && (RandBitflags->growth == 3)) + beq .L1654 @, +@ Patches/../C_code.c:3867: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _26, - beq .L1672 @, -.L1660: -@ Patches/../C_code.c:3866: if (MagClassTable[unit->pClassData->number].growth > growth) + beq .L1675 @, +.L1663: +@ Patches/../C_code.c:3871: if (MagClassTable[unit->pClassData->number].growth > growth) ldr r2, [r4, #4] @ unit_54(D)->pClassData, unit_54(D)->pClassData ldrb r2, [r2, #4] @ tmp252, -@ Patches/../C_code.c:3866: if (MagClassTable[unit->pClassData->number].growth > growth) - ldr r3, .L1693+8 @ tmp250, +@ Patches/../C_code.c:3871: if (MagClassTable[unit->pClassData->number].growth > growth) + ldr r3, .L1696+8 @ tmp250, lsls r2, r2, #2 @ tmp253, tmp252, adds r3, r3, r2 @ tmp254, tmp250, tmp253 ldrb r0, [r3, #1] @ baseGrowth, MagClassTable -@ Patches/../C_code.c:3866: if (MagClassTable[unit->pClassData->number].growth > growth) +@ Patches/../C_code.c:3871: if (MagClassTable[unit->pClassData->number].growth > growth) cmp r0, r5 @ baseGrowth, baseGrowth - blt .L1690 @, -.L1661: -@ Patches/../C_code.c:3870: growth = AdjustGrowthForStatInflation(growth); + blt .L1693 @, +.L1664: +@ Patches/../C_code.c:3875: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:3871: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:3876: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:3870: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:3875: growth = AdjustGrowthForStatInflation(growth); movs r5, r0 @ growth, tmp309 -@ Patches/../C_code.c:3871: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:3876: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1693+32 @ tmp260, + ldr r3, .L1696+32 @ tmp260, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:3872: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:3877: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_54(D)->pCharacterData, unit_54(D)->pCharacterData ldrb r3, [r3, #4] @ tmp265, str r3, [sp, #8] @ tmp265, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp267, add r1, sp, #8 @ tmp323,, str r3, [sp] @ tmp267, @@ -11779,76 +11810,76 @@ GetUnitMagGrowth: movs r0, r5 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:3874: if (result < (growth / 2)) +@ Patches/../C_code.c:3879: if (result < (growth / 2)) lsrs r1, r5, #31 @ tmp270, growth, adds r1, r1, r5 @ tmp271, tmp270, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp310 -@ Patches/../C_code.c:3874: if (result < (growth / 2)) +@ Patches/../C_code.c:3879: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp272, tmp271, -@ Patches/../C_code.c:3874: if (result < (growth / 2)) +@ Patches/../C_code.c:3879: if (result < (growth / 2)) cmp r1, r0 @ tmp272, result - ble .L1662 @, -@ Patches/../C_code.c:3876: result += HashByte_Global(growth, (growth / 2), noise, 89); + ble .L1665 @, +@ Patches/../C_code.c:3881: result += HashByte_Global(growth, (growth / 2), noise, 89); movs r3, #89 @, movs r0, r5 @, growth add r2, sp, #8 @ tmp324,, bl HashByte_Global @ -@ Patches/../C_code.c:3876: result += HashByte_Global(growth, (growth / 2), noise, 89); +@ Patches/../C_code.c:3881: result += HashByte_Global(growth, (growth / 2), noise, 89); adds r4, r4, r0 @ result, result, tmp311 -.L1662: -@ Patches/../C_code.c:3878: if ((result - growth) > 99) +.L1665: +@ Patches/../C_code.c:3883: if ((result - growth) > 99) subs r3, r4, r5 @ tmp276, result, growth -@ Patches/../C_code.c:3878: if ((result - growth) > 99) +@ Patches/../C_code.c:3883: if ((result - growth) > 99) cmp r3, #99 @ tmp276, - bgt .L1691 @, -@ Patches/../C_code.c:3882: if ((growth - result) > 99) + bgt .L1694 @, +@ Patches/../C_code.c:3887: if ((growth - result) > 99) subs r3, r5, r4 @ tmp277, growth, result -@ Patches/../C_code.c:3882: if ((growth - result) > 99) +@ Patches/../C_code.c:3887: if ((growth - result) > 99) cmp r3, #99 @ tmp277, - ble .L1664 @, -@ Patches/../C_code.c:3884: result = growth - 99; + ble .L1667 @, +@ Patches/../C_code.c:3889: result = growth - 99; movs r4, r5 @ growth, growth subs r4, r4, #99 @ growth, -.L1664: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1693+36 @ tmp278, +.L1667: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1696+36 @ tmp278, ldr r3, [r3] @ pretmp_62, GrowthValues -@ Patches/../C_code.c:3886: result += add; +@ Patches/../C_code.c:3891: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_62, *pretmp_62 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r6, #128 @ , - beq .L1692 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1695 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp289, *pretmp_62, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp289, -.L1666: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1669: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r6, r3, #2 @ tmp292, bonus, adds r6, r6, r3 @ tmp293, tmp292, bonus lsls r6, r6, #1 @ bonus, tmp293, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r6, #100 @ bonus, - ble .L1667 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1670 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp295, subs r6, r3, r6 @ bonus, tmp295, bonus -.L1667: -@ Patches/../C_code.c:3887: result += GetBonusGrowth(unit); +.L1670: +@ Patches/../C_code.c:3892: result += GetBonusGrowth(unit); adds r6, r7, r6 @ , result, bonus -@ Patches/../C_code.c:3888: if (result < 0) +@ Patches/../C_code.c:3893: if (result < 0) mvns r3, r6 @ tmp300, asrs r3, r3, #31 @ tmp299, tmp300, ands r6, r3 @ , tmp299 - b .L1651 @ -.L1655: -@ Patches/../C_code.c:3844: return baseGrowth + add; + b .L1654 @ +.L1658: +@ Patches/../C_code.c:3849: return baseGrowth + add; adds r6, r5, r7 @ , baseGrowth, add -.L1651: -@ Patches/../C_code.c:3893: } +.L1654: +@ Patches/../C_code.c:3898: } movs r0, r6 @, add sp, sp, #24 @,, @ sp needed @ @@ -11857,30 +11888,30 @@ GetUnitMagGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1691: -@ Patches/../C_code.c:3880: result = growth + 99; +.L1694: +@ Patches/../C_code.c:3885: result = growth + 99; movs r4, r5 @ growth, growth adds r4, r4, #99 @ growth, - b .L1664 @ -.L1690: -@ Patches/../C_code.c:3866: if (MagClassTable[unit->pClassData->number].growth > growth) + b .L1667 @ +.L1693: +@ Patches/../C_code.c:3871: if (MagClassTable[unit->pClassData->number].growth > growth) movs r0, r5 @ baseGrowth, baseGrowth - b .L1661 @ -.L1692: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1664 @ +.L1695: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_62, - b .L1666 @ -.L1672: -@ Patches/../C_code.c:3864: return 100; + b .L1669 @ +.L1675: +@ Patches/../C_code.c:3869: return 100; movs r6, #100 @ , - b .L1651 @ -.L1671: -@ Patches/../C_code.c:3856: return 50; + b .L1654 @ +.L1674: +@ Patches/../C_code.c:3861: return 50; movs r6, #50 @ , - b .L1651 @ -.L1694: + b .L1654 @ +.L1697: .align 2 -.L1693: +.L1696: .word MagCharTable .word ClassBasedGrowths .word MagClassTable @@ -11904,120 +11935,120 @@ GetUnitMaxMag: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:3898: if (StrMagInstalled) - ldr r3, .L1730 @ tmp153, +@ Patches/../C_code.c:3903: if (StrMagInstalled) + ldr r3, .L1733 @ tmp153, ldr r5, [r3] @ cap, StrMagInstalled -@ Patches/../C_code.c:3896: { +@ Patches/../C_code.c:3901: { movs r4, r0 @ unit, tmp212 sub sp, sp, #28 @,, -@ Patches/../C_code.c:3898: if (StrMagInstalled) +@ Patches/../C_code.c:3903: if (StrMagInstalled) cmp r5, #0 @ cap, - beq .L1696 @, -@ Patches/../C_code.c:3900: cap = MagClassTable[unit->pClassData->number].cap; + beq .L1699 @, +@ Patches/../C_code.c:3905: cap = MagClassTable[unit->pClassData->number].cap; ldr r2, [r0, #4] @ unit_20(D)->pClassData, unit_20(D)->pClassData ldrb r2, [r2, #4] @ tmp156, -@ Patches/../C_code.c:3900: cap = MagClassTable[unit->pClassData->number].cap; - ldr r3, .L1730+4 @ tmp154, +@ Patches/../C_code.c:3905: cap = MagClassTable[unit->pClassData->number].cap; + ldr r3, .L1733+4 @ tmp154, lsls r2, r2, #2 @ tmp157, tmp156, adds r3, r3, r2 @ tmp158, tmp154, tmp157 -@ Patches/../C_code.c:3900: cap = MagClassTable[unit->pClassData->number].cap; +@ Patches/../C_code.c:3905: cap = MagClassTable[unit->pClassData->number].cap; ldrb r5, [r3, #2] @ cap, MagClassTable -.L1696: -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +.L1699: +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r0, #224 @ tmp172, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L1730+8 @ tmp160, - ldr r3, [r3] @ RandBitflags.64_35, RandBitflags -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldrh r1, [r3] @ *RandBitflags.64_35, *RandBitflags.64_35 - lsls r2, r1, #23 @ tmp165, *RandBitflags.64_35, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L1733+8 @ tmp160, + ldr r3, [r3] @ RandBitflags.65_35, RandBitflags +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldrh r1, [r3] @ *RandBitflags.65_35, *RandBitflags.65_35 + lsls r2, r1, #23 @ tmp165, *RandBitflags.65_35, lsrs r2, r2, #29 @ pretmp_80, tmp165, subs r3, r2, #2 @ tmp167, pretmp_80, lsls r3, r3, #24 @ tmp168, tmp167, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) lsls r0, r0, #1 @ tmp172, tmp172, lsrs r3, r3, #24 @ _82, tmp168, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r0 @ *RandBitflags.64_35, tmp172 - beq .L1697 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r0 @ *RandBitflags.65_35, tmp172 + beq .L1700 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r0, [r4] @ MEM[(const struct CharacterData * *)unit_20(D)], MEM[(const struct CharacterData * *)unit_20(D)] ldrb r0, [r0, #4] @ tmp178, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L1730+12 @ tmp176, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L1733+12 @ tmp176, lsls r0, r0, #1 @ tmp179, tmp178, -@ Patches/../C_code.c:3902: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:3907: if (!ShouldRandomizeStatCaps(unit)) ldrb r1, [r0, r1] @ tmp180, CharExceptions cmp r1, #0 @ tmp180, - bne .L1697 @, + bne .L1700 @, cmp r3, #4 @ _82, - bhi .L1713 @, + bhi .L1716 @, lsls r6, r2, #4 @ tmp190, pretmp_80, subs r6, r6, r2 @ tmp191, tmp190, pretmp_80 subs r6, r6, #30 @ result, -.L1704: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r7, .L1730+16 @ tmp211, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L1707: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r7, .L1733+16 @ tmp211, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r7] @ , maxStat cmp r0, r6 @ , result - ble .L1705 @, + ble .L1708 @, movs r0, r6 @ , result -.L1705: -@ Patches/../C_code.c:3911: if (max != (-1)) +.L1708: +@ Patches/../C_code.c:3916: if (max != (-1)) adds r3, r0, #1 @ tmp219, , - beq .L1725 @, -.L1695: -@ Patches/../C_code.c:3931: } + beq .L1728 @, +.L1698: +@ Patches/../C_code.c:3936: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1713: -@ Patches/../C_code.c:3902: if (!ShouldRandomizeStatCaps(unit)) +.L1716: +@ Patches/../C_code.c:3907: if (!ShouldRandomizeStatCaps(unit)) movs r6, #1 @ result, rsbs r6, r6, #0 @ result, result - b .L1704 @ -.L1697: + b .L1707 @ +.L1700: cmp r3, #4 @ _82, - bhi .L1711 @, + bhi .L1714 @, lsls r3, r2, #4 @ tmp184, pretmp_80, subs r2, r3, r2 @ tmp185, tmp184, pretmp_80 subs r2, r2, #30 @ result, -.L1699: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r3, .L1730+16 @ tmp186, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L1702: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r3, .L1733+16 @ tmp186, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r3] @ result, maxStat cmp r3, r2 @ result, result - ble .L1700 @, + ble .L1703 @, movs r3, r2 @ result, result -.L1700: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L1703: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp218, result, - beq .L1726 @, -.L1701: -@ Patches/../C_code.c:3904: if (cap > GetGlobalStatCap()) + beq .L1729 @, +.L1704: +@ Patches/../C_code.c:3909: if (cap > GetGlobalStatCap()) movs r0, r5 @ , cap cmp r5, r3 @ , result - ble .L1695 @, -.L1724: -@ Patches/../C_code.c:3926: if (result > GetGlobalStatCap()) + ble .L1698 @, +.L1727: +@ Patches/../C_code.c:3931: if (result > GetGlobalStatCap()) movs r0, r3 @ , result - b .L1695 @ -.L1725: -@ Patches/../C_code.c:3915: int noise[4] = { 0, 0, 0, 0 }; + b .L1698 @ +.L1728: +@ Patches/../C_code.c:3920: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1730+20 @ tmp196, + ldr r3, .L1733+20 @ tmp196, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:3916: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:3921: noise[0] = unit->pClassData->number; ldr r3, [r4, #4] @ unit_20(D)->pClassData, unit_20(D)->pClassData ldrb r3, [r3, #4] @ tmp201, str r3, [sp, #8] @ tmp201, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp203, add r1, sp, #8 @ tmp224,, str r3, [sp] @ tmp203, @@ -12025,69 +12056,69 @@ GetUnitMaxMag: movs r0, r5 @, cap adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:3918: if (result < (cap >> 1)) +@ Patches/../C_code.c:3923: if (result < (cap >> 1)) asrs r1, r5, #1 @ _10, cap, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp213 -@ Patches/../C_code.c:3918: if (result < (cap >> 1)) +@ Patches/../C_code.c:3923: if (result < (cap >> 1)) cmp r1, r0 @ _10, result - ble .L1706 @, -@ Patches/../C_code.c:3920: result += HashByte_Global(cap, (cap >> 1), noise, 73); + ble .L1709 @, +@ Patches/../C_code.c:3925: result += HashByte_Global(cap, (cap >> 1), noise, 73); movs r3, #73 @, movs r0, r5 @, cap add r2, sp, #8 @ tmp225,, bl HashByte_Global @ -@ Patches/../C_code.c:3920: result += HashByte_Global(cap, (cap >> 1), noise, 73); +@ Patches/../C_code.c:3925: result += HashByte_Global(cap, (cap >> 1), noise, 73); adds r4, r4, r0 @ result, result, tmp214 -.L1706: -@ Patches/../C_code.c:3922: if (result > cap) +.L1709: +@ Patches/../C_code.c:3927: if (result > cap) movs r0, r5 @ _15, cap cmp r5, r4 @ _15, result - bgt .L1727 @, -@ Patches/../C_code.c:3528: if (result > maxStat) + bgt .L1730 @, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat cmp r3, r6 @ result, result - bgt .L1728 @, -.L1708: -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L1731 @, +.L1711: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp220, result, - beq .L1729 @, -.L1709: -@ Patches/../C_code.c:3926: if (result > GetGlobalStatCap()) + beq .L1732 @, +.L1712: +@ Patches/../C_code.c:3931: if (result > GetGlobalStatCap()) cmp r0, r3 @ , result - ble .L1695 @, - b .L1724 @ -.L1711: -@ Patches/../C_code.c:3896: { + ble .L1698 @, + b .L1727 @ +.L1714: +@ Patches/../C_code.c:3901: { movs r2, #1 @ result, rsbs r2, r2, #0 @ result, result - b .L1699 @ -.L1728: -@ Patches/../C_code.c:3528: if (result > maxStat) + b .L1702 @ +.L1731: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r6 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp220, result, - bne .L1709 @, - b .L1729 @ -.L1727: -@ Patches/../C_code.c:3528: if (result > maxStat) + bne .L1712 @, + b .L1732 @ +.L1730: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat -@ Patches/../C_code.c:3922: if (result > cap) +@ Patches/../C_code.c:3927: if (result > cap) movs r0, r4 @ _15, result -@ Patches/../C_code.c:3528: if (result > maxStat) +@ Patches/../C_code.c:3533: if (result > maxStat) cmp r3, r6 @ result, result - ble .L1708 @, - b .L1728 @ -.L1726: -@ Patches/../C_code.c:3540: result = 30; - adds r3, r3, #31 @ result, - b .L1701 @ + ble .L1711 @, + b .L1731 @ .L1729: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L1709 @ -.L1731: + b .L1704 @ +.L1732: + adds r3, r3, #31 @ result, + b .L1712 @ +.L1734: .align 2 -.L1730: +.L1733: .word StrMagInstalled .word MagClassTable .word RandBitflags @@ -12107,36 +12138,36 @@ GetUnitBaseMag: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldr r2, [r0, #4] @ unit_9(D)->pClassData, unit_9(D)->pClassData -@ Patches/../C_code.c:3936: } +@ Patches/../C_code.c:3941: } @ sp needed @ -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldrb r2, [r2, #4] @ tmp129, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; - ldr r3, .L1733 @ tmp127, +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + ldr r3, .L1736 @ tmp127, lsls r2, r2, #2 @ tmp130, tmp129, -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldr r0, [r0] @ unit_9(D)->pCharacterData, unit_9(D)->pCharacterData -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldrb r4, [r2, r3] @ _5, MagClassTable -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; bl GetReorderedCharacter @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldrb r2, [r0, #4] @ tmp134, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; - ldr r3, .L1733+4 @ tmp133, +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + ldr r3, .L1736+4 @ tmp133, lsls r2, r2, #1 @ tmp135, tmp134, ldrb r0, [r2, r3] @ tmp136, MagCharTable -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; adds r0, r0, r4 @ tmp132, tmp136, _5 -@ Patches/../C_code.c:3936: } +@ Patches/../C_code.c:3941: } pop {r4} pop {r1} bx r1 -.L1734: +.L1737: .align 2 -.L1733: +.L1736: .word MagClassTable .word MagCharTable .size GetUnitBaseMag, .-GetUnitBaseMag @@ -12152,27 +12183,27 @@ GetBaseMag: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; - ldr r3, .L1736 @ tmp122, -@ Patches/../C_code.c:3940: } +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; + ldr r3, .L1739 @ tmp122, +@ Patches/../C_code.c:3945: } @ sp needed @ -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; - ldr r2, .L1736+4 @ tmp125, -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; + ldr r2, .L1739+4 @ tmp125, +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; lsls r1, r1, #2 @ tmp123, tmp129, -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; lsls r0, r0, #1 @ tmp126, tmp128, -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; ldrb r3, [r1, r3] @ tmp124, MagClassTable -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; ldrb r0, [r0, r2] @ tmp127, MagCharTable -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; adds r0, r3, r0 @ tmp121, tmp124, tmp127 -@ Patches/../C_code.c:3940: } +@ Patches/../C_code.c:3945: } bx lr -.L1737: +.L1740: .align 2 -.L1736: +.L1739: .word MagClassTable .word MagCharTable .size GetBaseMag, .-GetBaseMag @@ -12188,19 +12219,19 @@ GetPromoMag: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:3944: return MagClassTable[classId].promo; - ldr r3, .L1739 @ tmp118, -@ Patches/../C_code.c:3945: } +@ Patches/../C_code.c:3949: return MagClassTable[classId].promo; + ldr r3, .L1742 @ tmp118, +@ Patches/../C_code.c:3950: } @ sp needed @ -@ Patches/../C_code.c:3944: return MagClassTable[classId].promo; +@ Patches/../C_code.c:3949: return MagClassTable[classId].promo; lsls r0, r0, #2 @ tmp119, tmp122, adds r3, r3, r0 @ tmp120, tmp118, tmp119 ldrb r0, [r3, #3] @ tmp117, MagClassTable -@ Patches/../C_code.c:3945: } +@ Patches/../C_code.c:3950: } bx lr -.L1740: +.L1743: .align 2 -.L1739: +.L1742: .word MagClassTable .size GetPromoMag, .-GetPromoMag .align 1 @@ -12215,140 +12246,140 @@ GetClassHPGrowth: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:3975: growth += unit->pClassData->growthHP; +@ Patches/../C_code.c:3980: growth += unit->pClassData->growthHP; movs r4, #27 @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1759 @ tmp147, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1762 @ tmp147, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:3975: growth += unit->pClassData->growthHP; +@ Patches/../C_code.c:3980: growth += unit->pClassData->growthHP; ldr r7, [r0, #4] @ _1, unit_15(D)->pClassData -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1759+4 @ tmp150, -@ Patches/../C_code.c:3973: { +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1762+4 @ tmp150, +@ Patches/../C_code.c:3978: { movs r6, r0 @ unit, tmp207 -@ Patches/../C_code.c:3975: growth += unit->pClassData->growthHP; +@ Patches/../C_code.c:3980: growth += unit->pClassData->growthHP; ldrsb r4, [r7, r4] @ ,* -@ Patches/../C_code.c:3973: { +@ Patches/../C_code.c:3978: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp150 - beq .L1741 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp150 + beq .L1744 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp153, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1759+8 @ tmp151, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1762+8 @ tmp151, lsls r2, r2, #1 @ tmp154, tmp153, -@ Patches/../C_code.c:3976: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:3981: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp156, CharExceptions -@ Patches/../C_code.c:3976: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:3981: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp156, - bne .L1741 @, + bne .L1744 @, rsbs r5, r1, #0 @ tmp164, modifiersBool adcs r5, r5, r1 @ tmp164, modifiersBool cmp r5, #0 @ tmp164, - bne .L1741 @, -@ Patches/../C_code.c:3980: int noise[4] = { 0, 0, 0, 0 }; + bne .L1744 @, +@ Patches/../C_code.c:3985: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1759+12 @ tmp169, + ldr r3, .L1762+12 @ tmp169, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:3981: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:3986: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp173, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #11 @, -@ Patches/../C_code.c:3981: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:3986: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp173, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp164, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:3983: if ((result - growth) > 99) +@ Patches/../C_code.c:3988: if ((result - growth) > 99) subs r3, r0, r4 @ tmp178, result, -@ Patches/../C_code.c:3983: if ((result - growth) > 99) +@ Patches/../C_code.c:3988: if ((result - growth) > 99) cmp r3, #99 @ tmp178, - bgt .L1757 @, -@ Patches/../C_code.c:3987: if ((growth - result) > 99) + bgt .L1760 @, +@ Patches/../C_code.c:3992: if ((growth - result) > 99) subs r3, r4, r0 @ tmp179, , result -@ Patches/../C_code.c:3987: if ((growth - result) > 99) +@ Patches/../C_code.c:3992: if ((growth - result) > 99) cmp r3, #99 @ tmp179, - ble .L1744 @, -@ Patches/../C_code.c:3989: result = growth - 99; + ble .L1747 @, +@ Patches/../C_code.c:3994: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1744: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1747: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp210, unit_15(D)->state, - bpl .L1745 @, -@ Patches/../C_code.c:3993: result += GetGrowthModifiers(unit); + bpl .L1748 @, +@ Patches/../C_code.c:3998: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1745: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1759+16 @ tmp183, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1748: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1762+16 @ tmp183, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp184, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_4, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp185, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp184 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1758 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1761 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 lsls r3, r3, #28 @ tmp197, *pretmp_4, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp197, -.L1747: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1750: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp200, bonus, adds r4, r4, r3 @ tmp201, tmp200, bonus lsls r4, r4, #1 @ bonus, tmp201, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1748 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1751 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp203, subs r4, r3, r4 @ bonus, tmp203, bonus -.L1748: -@ Patches/../C_code.c:3994: result += GetBonusGrowth(unit); +.L1751: +@ Patches/../C_code.c:3999: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:3996: if (result < 0) +@ Patches/../C_code.c:4001: if (result < 0) mvns r3, r4 @ tmp206, asrs r3, r3, #31 @ tmp205, tmp206, ands r4, r3 @ , tmp205 -.L1741: -@ Patches/../C_code.c:4001: } +.L1744: +@ Patches/../C_code.c:4006: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1757: -@ Patches/../C_code.c:3985: result = growth + 99; +.L1760: +@ Patches/../C_code.c:3990: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1744 @ -.L1758: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1747 @ +.L1761: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_4, - b .L1747 @ -.L1760: + b .L1750 @ +.L1763: .align 2 -.L1759: +.L1762: .word RandBitflags .word 268435468 .word CharExceptions @@ -12367,136 +12398,136 @@ GetClassPowGrowth: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:4006: growth += unit->pClassData->growthPow; +@ Patches/../C_code.c:4011: growth += unit->pClassData->growthPow; movs r4, #28 @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1778 @ tmp146, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1781 @ tmp146, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:4006: growth += unit->pClassData->growthPow; +@ Patches/../C_code.c:4011: growth += unit->pClassData->growthPow; ldr r7, [r0, #4] @ _1, unit_14(D)->pClassData -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r2, [r3] @ *RandBitflags.63_30, *RandBitflags.63_30 - ldr r3, .L1778+4 @ tmp149, -@ Patches/../C_code.c:4004: { +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r2, [r3] @ *RandBitflags.64_30, *RandBitflags.64_30 + ldr r3, .L1781+4 @ tmp149, +@ Patches/../C_code.c:4009: { movs r6, r0 @ unit, tmp204 -@ Patches/../C_code.c:4006: growth += unit->pClassData->growthPow; +@ Patches/../C_code.c:4011: growth += unit->pClassData->growthPow; ldrsb r4, [r7, r4] @ ,* -@ Patches/../C_code.c:4004: { +@ Patches/../C_code.c:4009: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_30, tmp149 - beq .L1761 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_30, tmp149 + beq .L1764 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_14(D)], MEM[(const struct CharacterData * *)unit_14(D)] ldrb r2, [r2, #4] @ tmp152, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1778+8 @ tmp150, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1781+8 @ tmp150, lsls r2, r2, #1 @ tmp153, tmp152, -@ Patches/../C_code.c:4007: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4012: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp155, CharExceptions -@ Patches/../C_code.c:4007: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4012: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp155, - bne .L1761 @, + bne .L1764 @, rsbs r5, r1, #0 @ tmp163, modifiersBool adcs r5, r5, r1 @ tmp163, modifiersBool cmp r5, #0 @ tmp163, - bne .L1761 @, -@ Patches/../C_code.c:4011: int noise[4] = { 0, 0, 0, 0 }; + bne .L1764 @, +@ Patches/../C_code.c:4016: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1778+12 @ tmp168, + ldr r3, .L1781+12 @ tmp168, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4012: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4017: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp172, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #21 @, -@ Patches/../C_code.c:4012: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4017: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp172, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp163, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:4014: if ((result - growth) > 99) +@ Patches/../C_code.c:4019: if ((result - growth) > 99) subs r3, r0, r4 @ tmp177, result, -@ Patches/../C_code.c:4014: if ((result - growth) > 99) +@ Patches/../C_code.c:4019: if ((result - growth) > 99) cmp r3, #99 @ tmp177, - bgt .L1776 @, -@ Patches/../C_code.c:4018: if ((growth - result) > 99) + bgt .L1779 @, +@ Patches/../C_code.c:4023: if ((growth - result) > 99) subs r3, r4, r0 @ tmp178, , result -@ Patches/../C_code.c:4018: if ((growth - result) > 99) +@ Patches/../C_code.c:4023: if ((growth - result) > 99) cmp r3, #99 @ tmp178, - ble .L1764 @, -@ Patches/../C_code.c:4020: result = growth - 99; + ble .L1767 @, +@ Patches/../C_code.c:4025: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1764: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1767: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_14(D)->state, unit_14(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp207, unit_14(D)->state, - bpl .L1765 @, -@ Patches/../C_code.c:4024: result += GetGrowthModifiers(unit); + bpl .L1768 @, +@ Patches/../C_code.c:4029: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1765: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1778+16 @ tmp182, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1768: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1781+16 @ tmp182, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp183, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_33, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp183, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp183 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1777 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1780 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_33, *pretmp_33 lsls r3, r3, #28 @ tmp196, *pretmp_33, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp196, -.L1767: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1770: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp199, bonus, adds r4, r4, r3 @ tmp200, tmp199, bonus lsls r4, r4, #1 @ bonus, tmp200, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1768 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1771 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp202, subs r4, r3, r4 @ bonus, tmp202, bonus -.L1768: -@ Patches/../C_code.c:4025: result += GetBonusGrowth(unit); +.L1771: +@ Patches/../C_code.c:4030: result += GetBonusGrowth(unit); adds r4, r4, r0 @ , bonus, result -.L1761: -@ Patches/../C_code.c:4028: } +.L1764: +@ Patches/../C_code.c:4033: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1776: -@ Patches/../C_code.c:4016: result = growth + 99; +.L1779: +@ Patches/../C_code.c:4021: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1764 @ -.L1777: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1767 @ +.L1780: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_33, *pretmp_33 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_33, - b .L1767 @ -.L1779: + b .L1770 @ +.L1782: .align 2 -.L1778: +.L1781: .word RandBitflags .word 268435468 .word CharExceptions @@ -12515,140 +12546,140 @@ GetClassSklGrowth: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; movs r4, #29 @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1798 @ tmp147, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1801 @ tmp147, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; ldr r7, [r0, #4] @ _1, unit_15(D)->pClassData -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1798+4 @ tmp150, -@ Patches/../C_code.c:4031: { +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1801+4 @ tmp150, +@ Patches/../C_code.c:4036: { movs r6, r0 @ unit, tmp207 -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; ldrsb r4, [r7, r4] @ ,* -@ Patches/../C_code.c:4031: { +@ Patches/../C_code.c:4036: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp150 - beq .L1780 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp150 + beq .L1783 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp153, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1798+8 @ tmp151, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1801+8 @ tmp151, lsls r2, r2, #1 @ tmp154, tmp153, -@ Patches/../C_code.c:4034: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4039: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp156, CharExceptions -@ Patches/../C_code.c:4034: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4039: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp156, - bne .L1780 @, + bne .L1783 @, rsbs r5, r1, #0 @ tmp164, modifiersBool adcs r5, r5, r1 @ tmp164, modifiersBool cmp r5, #0 @ tmp164, - bne .L1780 @, -@ Patches/../C_code.c:4038: int noise[4] = { 0, 0, 0, 0 }; + bne .L1783 @, +@ Patches/../C_code.c:4043: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1798+12 @ tmp169, + ldr r3, .L1801+12 @ tmp169, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4039: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4044: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp173, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #31 @, -@ Patches/../C_code.c:4039: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4044: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp173, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp164, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:4041: if ((result - growth) > 99) +@ Patches/../C_code.c:4046: if ((result - growth) > 99) subs r3, r0, r4 @ tmp178, result, -@ Patches/../C_code.c:4041: if ((result - growth) > 99) +@ Patches/../C_code.c:4046: if ((result - growth) > 99) cmp r3, #99 @ tmp178, - bgt .L1796 @, -@ Patches/../C_code.c:4045: if ((growth - result) > 99) + bgt .L1799 @, +@ Patches/../C_code.c:4050: if ((growth - result) > 99) subs r3, r4, r0 @ tmp179, , result -@ Patches/../C_code.c:4045: if ((growth - result) > 99) +@ Patches/../C_code.c:4050: if ((growth - result) > 99) cmp r3, #99 @ tmp179, - ble .L1783 @, -@ Patches/../C_code.c:4047: result = growth - 99; + ble .L1786 @, +@ Patches/../C_code.c:4052: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1783: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1786: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp210, unit_15(D)->state, - bpl .L1784 @, -@ Patches/../C_code.c:4051: result += GetGrowthModifiers(unit); + bpl .L1787 @, +@ Patches/../C_code.c:4056: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1784: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1798+16 @ tmp183, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1787: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1801+16 @ tmp183, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp184, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_4, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp185, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp184 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1797 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1800 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 lsls r3, r3, #28 @ tmp197, *pretmp_4, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp197, -.L1786: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1789: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp200, bonus, adds r4, r4, r3 @ tmp201, tmp200, bonus lsls r4, r4, #1 @ bonus, tmp201, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1787 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1790 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp203, subs r4, r3, r4 @ bonus, tmp203, bonus -.L1787: -@ Patches/../C_code.c:4052: result += GetBonusGrowth(unit); +.L1790: +@ Patches/../C_code.c:4057: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:4054: if (result < 0) +@ Patches/../C_code.c:4059: if (result < 0) mvns r3, r4 @ tmp206, asrs r3, r3, #31 @ tmp205, tmp206, ands r4, r3 @ , tmp205 -.L1780: -@ Patches/../C_code.c:4059: } +.L1783: +@ Patches/../C_code.c:4064: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1796: -@ Patches/../C_code.c:4043: result = growth + 99; +.L1799: +@ Patches/../C_code.c:4048: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1783 @ -.L1797: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1786 @ +.L1800: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_4, - b .L1786 @ -.L1799: + b .L1789 @ +.L1802: .align 2 -.L1798: +.L1801: .word RandBitflags .word 268435468 .word CharExceptions @@ -12667,140 +12698,140 @@ GetClassSpdGrowth: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; movs r4, #30 @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1818 @ tmp147, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1821 @ tmp147, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; ldr r7, [r0, #4] @ _1, unit_15(D)->pClassData -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1818+4 @ tmp150, -@ Patches/../C_code.c:4062: { +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1821+4 @ tmp150, +@ Patches/../C_code.c:4067: { movs r6, r0 @ unit, tmp207 -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; ldrsb r4, [r7, r4] @ ,* -@ Patches/../C_code.c:4062: { +@ Patches/../C_code.c:4067: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp150 - beq .L1800 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp150 + beq .L1803 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp153, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1818+8 @ tmp151, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1821+8 @ tmp151, lsls r2, r2, #1 @ tmp154, tmp153, -@ Patches/../C_code.c:4065: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4070: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp156, CharExceptions -@ Patches/../C_code.c:4065: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4070: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp156, - bne .L1800 @, + bne .L1803 @, rsbs r5, r1, #0 @ tmp164, modifiersBool adcs r5, r5, r1 @ tmp164, modifiersBool cmp r5, #0 @ tmp164, - bne .L1800 @, -@ Patches/../C_code.c:4069: int noise[4] = { 0, 0, 0, 0 }; + bne .L1803 @, +@ Patches/../C_code.c:4074: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1818+12 @ tmp169, + ldr r3, .L1821+12 @ tmp169, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4070: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4075: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp173, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #41 @, -@ Patches/../C_code.c:4070: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4075: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp173, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp164, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:4072: if ((result - growth) > 99) +@ Patches/../C_code.c:4077: if ((result - growth) > 99) subs r3, r0, r4 @ tmp178, result, -@ Patches/../C_code.c:4072: if ((result - growth) > 99) +@ Patches/../C_code.c:4077: if ((result - growth) > 99) cmp r3, #99 @ tmp178, - bgt .L1816 @, -@ Patches/../C_code.c:4076: if ((growth - result) > 99) + bgt .L1819 @, +@ Patches/../C_code.c:4081: if ((growth - result) > 99) subs r3, r4, r0 @ tmp179, , result -@ Patches/../C_code.c:4076: if ((growth - result) > 99) +@ Patches/../C_code.c:4081: if ((growth - result) > 99) cmp r3, #99 @ tmp179, - ble .L1803 @, -@ Patches/../C_code.c:4078: result = growth - 99; + ble .L1806 @, +@ Patches/../C_code.c:4083: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1803: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1806: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp210, unit_15(D)->state, - bpl .L1804 @, -@ Patches/../C_code.c:4082: result += GetGrowthModifiers(unit); + bpl .L1807 @, +@ Patches/../C_code.c:4087: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1804: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1818+16 @ tmp183, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1807: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1821+16 @ tmp183, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp184, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_4, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp185, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp184 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1817 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1820 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 lsls r3, r3, #28 @ tmp197, *pretmp_4, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp197, -.L1806: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1809: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp200, bonus, adds r4, r4, r3 @ tmp201, tmp200, bonus lsls r4, r4, #1 @ bonus, tmp201, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1807 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1810 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp203, subs r4, r3, r4 @ bonus, tmp203, bonus -.L1807: -@ Patches/../C_code.c:4083: result += GetBonusGrowth(unit); +.L1810: +@ Patches/../C_code.c:4088: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:4085: if (result < 0) +@ Patches/../C_code.c:4090: if (result < 0) mvns r3, r4 @ tmp206, asrs r3, r3, #31 @ tmp205, tmp206, ands r4, r3 @ , tmp205 -.L1800: -@ Patches/../C_code.c:4090: } +.L1803: +@ Patches/../C_code.c:4095: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1816: -@ Patches/../C_code.c:4074: result = growth + 99; +.L1819: +@ Patches/../C_code.c:4079: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1803 @ -.L1817: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1806 @ +.L1820: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_4, - b .L1806 @ -.L1819: + b .L1809 @ +.L1822: .align 2 -.L1818: +.L1821: .word RandBitflags .word 268435468 .word CharExceptions @@ -12819,140 +12850,140 @@ GetClassDefGrowth: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:4095: growth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4100: growth += unit->pClassData->growthDef; movs r4, #31 @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1838 @ tmp147, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1841 @ tmp147, ldr r3, [r3] @ RandBitflags, RandBitflags -@ Patches/../C_code.c:4095: growth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4100: growth += unit->pClassData->growthDef; ldr r7, [r0, #4] @ _1, unit_15(D)->pClassData -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1838+4 @ tmp150, -@ Patches/../C_code.c:4093: { +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1841+4 @ tmp150, +@ Patches/../C_code.c:4098: { movs r6, r0 @ unit, tmp207 -@ Patches/../C_code.c:4095: growth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4100: growth += unit->pClassData->growthDef; ldrsb r4, [r7, r4] @ ,* -@ Patches/../C_code.c:4093: { +@ Patches/../C_code.c:4098: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp150 - beq .L1820 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp150 + beq .L1823 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp153, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1838+8 @ tmp151, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1841+8 @ tmp151, lsls r2, r2, #1 @ tmp154, tmp153, -@ Patches/../C_code.c:4096: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4101: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp156, CharExceptions -@ Patches/../C_code.c:4096: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4101: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp156, - bne .L1820 @, + bne .L1823 @, rsbs r5, r1, #0 @ tmp164, modifiersBool adcs r5, r5, r1 @ tmp164, modifiersBool cmp r5, #0 @ tmp164, - bne .L1820 @, -@ Patches/../C_code.c:4100: int noise[4] = { 0, 0, 0, 0 }; + bne .L1823 @, +@ Patches/../C_code.c:4105: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1838+12 @ tmp169, + ldr r3, .L1841+12 @ tmp169, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4101: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4106: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp173, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #51 @, -@ Patches/../C_code.c:4101: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4106: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp173, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp164, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:4103: if ((result - growth) > 99) +@ Patches/../C_code.c:4108: if ((result - growth) > 99) subs r3, r0, r4 @ tmp178, result, -@ Patches/../C_code.c:4103: if ((result - growth) > 99) +@ Patches/../C_code.c:4108: if ((result - growth) > 99) cmp r3, #99 @ tmp178, - bgt .L1836 @, -@ Patches/../C_code.c:4107: if ((growth - result) > 99) + bgt .L1839 @, +@ Patches/../C_code.c:4112: if ((growth - result) > 99) subs r3, r4, r0 @ tmp179, , result -@ Patches/../C_code.c:4107: if ((growth - result) > 99) +@ Patches/../C_code.c:4112: if ((growth - result) > 99) cmp r3, #99 @ tmp179, - ble .L1823 @, -@ Patches/../C_code.c:4109: result = growth - 99; + ble .L1826 @, +@ Patches/../C_code.c:4114: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1823: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1826: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp210, unit_15(D)->state, - bpl .L1824 @, -@ Patches/../C_code.c:4113: result += GetGrowthModifiers(unit); + bpl .L1827 @, +@ Patches/../C_code.c:4118: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1824: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1838+16 @ tmp183, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1827: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1841+16 @ tmp183, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp184, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_4, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp185, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp184 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1837 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1840 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 lsls r3, r3, #28 @ tmp197, *pretmp_4, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp197, -.L1826: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1829: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp200, bonus, adds r4, r4, r3 @ tmp201, tmp200, bonus lsls r4, r4, #1 @ bonus, tmp201, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1827 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1830 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp203, subs r4, r3, r4 @ bonus, tmp203, bonus -.L1827: -@ Patches/../C_code.c:4114: result += GetBonusGrowth(unit); +.L1830: +@ Patches/../C_code.c:4119: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:4116: if (result < 0) +@ Patches/../C_code.c:4121: if (result < 0) mvns r3, r4 @ tmp206, asrs r3, r3, #31 @ tmp205, tmp206, ands r4, r3 @ , tmp205 -.L1820: -@ Patches/../C_code.c:4121: } +.L1823: +@ Patches/../C_code.c:4126: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1836: -@ Patches/../C_code.c:4105: result = growth + 99; +.L1839: +@ Patches/../C_code.c:4110: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1823 @ -.L1837: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1826 @ +.L1840: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_4, - b .L1826 @ -.L1839: + b .L1829 @ +.L1842: .align 2 -.L1838: +.L1841: .word RandBitflags .word 268435468 .word CharExceptions @@ -12970,140 +13001,140 @@ GetClassResGrowth: @ Function supports interworking. @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:4126: growth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4131: growth += unit->pClassData->growthRes; movs r3, #32 @ tmp146, -@ Patches/../C_code.c:4124: { +@ Patches/../C_code.c:4129: { push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:4126: growth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4131: growth += unit->pClassData->growthRes; ldr r7, [r0, #4] @ _1, unit_15(D)->pClassData -@ Patches/../C_code.c:4126: growth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4131: growth += unit->pClassData->growthRes; ldrsb r4, [r7, r3] @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1858 @ tmp148, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1861 @ tmp148, ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1858+4 @ tmp151, -@ Patches/../C_code.c:4124: { + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1861+4 @ tmp151, +@ Patches/../C_code.c:4129: { movs r6, r0 @ unit, tmp208 sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp151 - beq .L1840 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp151 + beq .L1843 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp154, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1858+8 @ tmp152, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1861+8 @ tmp152, lsls r2, r2, #1 @ tmp155, tmp154, -@ Patches/../C_code.c:4127: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4132: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp157, CharExceptions -@ Patches/../C_code.c:4127: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4132: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp157, - bne .L1840 @, + bne .L1843 @, rsbs r5, r1, #0 @ tmp165, modifiersBool adcs r5, r5, r1 @ tmp165, modifiersBool cmp r5, #0 @ tmp165, - bne .L1840 @, -@ Patches/../C_code.c:4131: int noise[4] = { 0, 0, 0, 0 }; + bne .L1843 @, +@ Patches/../C_code.c:4136: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1858+12 @ tmp170, + ldr r3, .L1861+12 @ tmp170, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4132: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4137: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp174, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #61 @, -@ Patches/../C_code.c:4132: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4137: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp174, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp165, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:4134: if ((result - growth) > 99) +@ Patches/../C_code.c:4139: if ((result - growth) > 99) subs r3, r0, r4 @ tmp179, result, -@ Patches/../C_code.c:4134: if ((result - growth) > 99) +@ Patches/../C_code.c:4139: if ((result - growth) > 99) cmp r3, #99 @ tmp179, - bgt .L1856 @, -@ Patches/../C_code.c:4138: if ((growth - result) > 99) + bgt .L1859 @, +@ Patches/../C_code.c:4143: if ((growth - result) > 99) subs r3, r4, r0 @ tmp180, , result -@ Patches/../C_code.c:4138: if ((growth - result) > 99) +@ Patches/../C_code.c:4143: if ((growth - result) > 99) cmp r3, #99 @ tmp180, - ble .L1843 @, -@ Patches/../C_code.c:4140: result = growth - 99; + ble .L1846 @, +@ Patches/../C_code.c:4145: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1843: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1846: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp211, unit_15(D)->state, - bpl .L1844 @, -@ Patches/../C_code.c:4144: result += GetGrowthModifiers(unit); + bpl .L1847 @, +@ Patches/../C_code.c:4149: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1844: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1858+16 @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1847: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1861+16 @ tmp184, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp185, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_4, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp186, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp185, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp185 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1857 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1860 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 lsls r3, r3, #28 @ tmp198, *pretmp_4, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp198, -.L1846: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1849: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp201, bonus, adds r4, r4, r3 @ tmp202, tmp201, bonus lsls r4, r4, #1 @ bonus, tmp202, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1847 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1850 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp204, subs r4, r3, r4 @ bonus, tmp204, bonus -.L1847: -@ Patches/../C_code.c:4145: result += GetBonusGrowth(unit); +.L1850: +@ Patches/../C_code.c:4150: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:4147: if (result < 0) +@ Patches/../C_code.c:4152: if (result < 0) mvns r3, r4 @ tmp207, asrs r3, r3, #31 @ tmp206, tmp207, ands r4, r3 @ , tmp206 -.L1840: -@ Patches/../C_code.c:4152: } +.L1843: +@ Patches/../C_code.c:4157: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1856: -@ Patches/../C_code.c:4136: result = growth + 99; +.L1859: +@ Patches/../C_code.c:4141: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1843 @ -.L1857: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1846 @ +.L1860: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_4, - b .L1846 @ -.L1859: + b .L1849 @ +.L1862: .align 2 -.L1858: +.L1861: .word RandBitflags .word 268435468 .word CharExceptions @@ -13121,140 +13152,140 @@ GetClassLckGrowth: @ Function supports interworking. @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:4157: growth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4162: growth += unit->pClassData->growthLck; movs r3, #33 @ tmp146, -@ Patches/../C_code.c:4155: { +@ Patches/../C_code.c:4160: { push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:4157: growth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4162: growth += unit->pClassData->growthLck; ldr r7, [r0, #4] @ _1, unit_15(D)->pClassData -@ Patches/../C_code.c:4157: growth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4162: growth += unit->pClassData->growthLck; ldrsb r4, [r7, r3] @ , -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1878 @ tmp148, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1881 @ tmp148, ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_31, *RandBitflags.63_31 - ldr r3, .L1878+4 @ tmp151, -@ Patches/../C_code.c:4155: { + ldr r2, [r3] @ *RandBitflags.64_31, *RandBitflags.64_31 + ldr r3, .L1881+4 @ tmp151, +@ Patches/../C_code.c:4160: { movs r6, r0 @ unit, tmp208 sub sp, sp, #28 @,, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_31, tmp151 - beq .L1860 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_31, tmp151 + beq .L1863 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r2, [r2, #4] @ tmp154, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1878+8 @ tmp152, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1881+8 @ tmp152, lsls r2, r2, #1 @ tmp155, tmp154, -@ Patches/../C_code.c:4158: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4163: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp157, CharExceptions -@ Patches/../C_code.c:4158: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4163: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp157, - bne .L1860 @, + bne .L1863 @, rsbs r5, r1, #0 @ tmp165, modifiersBool adcs r5, r5, r1 @ tmp165, modifiersBool cmp r5, #0 @ tmp165, - bne .L1860 @, -@ Patches/../C_code.c:4162: int noise[4] = { 0, 0, 0, 0 }; + bne .L1863 @, +@ Patches/../C_code.c:4167: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L1878+12 @ tmp170, + ldr r3, .L1881+12 @ tmp170, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4163: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4168: noise[0] = unit->pClassData->number; ldrb r3, [r7, #4] @ tmp174, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r2, #71 @, -@ Patches/../C_code.c:4163: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:4168: noise[0] = unit->pClassData->number; str r3, [sp, #8] @ tmp174, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r0, r4 @, movs r3, #1 @, str r5, [sp] @ tmp165, add r1, sp, #8 @,, bl HashPercent @ -@ Patches/../C_code.c:4165: if ((result - growth) > 99) +@ Patches/../C_code.c:4170: if ((result - growth) > 99) subs r3, r0, r4 @ tmp179, result, -@ Patches/../C_code.c:4165: if ((result - growth) > 99) +@ Patches/../C_code.c:4170: if ((result - growth) > 99) cmp r3, #99 @ tmp179, - bgt .L1876 @, -@ Patches/../C_code.c:4169: if ((growth - result) > 99) + bgt .L1879 @, +@ Patches/../C_code.c:4174: if ((growth - result) > 99) subs r3, r4, r0 @ tmp180, , result -@ Patches/../C_code.c:4169: if ((growth - result) > 99) +@ Patches/../C_code.c:4174: if ((growth - result) > 99) cmp r3, #99 @ tmp180, - ble .L1863 @, -@ Patches/../C_code.c:4171: result = growth - 99; + ble .L1866 @, +@ Patches/../C_code.c:4176: result = growth - 99; movs r0, r4 @ , subs r0, r0, #99 @ , -.L1863: -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +.L1866: +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r6, #12] @ unit_15(D)->state, unit_15(D)->state -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; lsls r3, r3, #18 @ tmp211, unit_15(D)->state, - bpl .L1864 @, -@ Patches/../C_code.c:4175: result += GetGrowthModifiers(unit); + bpl .L1867 @, +@ Patches/../C_code.c:4180: result += GetGrowthModifiers(unit); adds r0, r0, #5 @ result, -.L1864: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1878+16 @ tmp184, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +.L1867: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1881+16 @ tmp184, +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r2, #11 @ tmp185, -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldr r1, [r3] @ pretmp_4, GrowthValues -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); movs r3, #192 @ tmp186, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ldrsb r2, [r6, r2] @ tmp185, -@ Patches/../C_code.c:3750: int allegiance = UNIT_FACTION(unit); +@ Patches/../C_code.c:3755: int allegiance = UNIT_FACTION(unit); ands r3, r2 @ allegiance, tmp185 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r3, #128 @ allegiance, - beq .L1877 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1880 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 lsls r3, r3, #28 @ tmp198, *pretmp_4, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp198, -.L1866: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1869: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r4, r3, #2 @ tmp201, bonus, adds r4, r4, r3 @ tmp202, tmp201, bonus lsls r4, r4, #1 @ bonus, tmp202, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r4, #100 @ bonus, - ble .L1867 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1870 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp204, subs r4, r3, r4 @ bonus, tmp204, bonus -.L1867: -@ Patches/../C_code.c:4176: result += GetBonusGrowth(unit); +.L1870: +@ Patches/../C_code.c:4181: result += GetBonusGrowth(unit); adds r4, r0, r4 @ , result, bonus -@ Patches/../C_code.c:4178: if (result < 0) +@ Patches/../C_code.c:4183: if (result < 0) mvns r3, r4 @ tmp207, asrs r3, r3, #31 @ tmp206, tmp207, ands r4, r3 @ , tmp206 -.L1860: -@ Patches/../C_code.c:4183: } +.L1863: +@ Patches/../C_code.c:4188: } movs r0, r4 @, add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1876: -@ Patches/../C_code.c:4167: result = growth + 99; +.L1879: +@ Patches/../C_code.c:4172: result = growth + 99; movs r0, r4 @ , adds r0, r0, #99 @ , - b .L1863 @ -.L1877: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1866 @ +.L1880: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r1] @ *pretmp_4, *pretmp_4 -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_4, - b .L1866 @ -.L1879: + b .L1869 @ +.L1882: .align 2 -.L1878: +.L1881: .word RandBitflags .word 268435468 .word CharExceptions @@ -13277,142 +13308,142 @@ GetUnitHPGrowth: push {lr} @ movs r4, r0 @ unit, tmp273 movs r5, r1 @ modifiersBool, tmp274 -@ Patches/../C_code.c:4188: int add = 0; +@ Patches/../C_code.c:4193: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4186: { +@ Patches/../C_code.c:4191: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:4189: if (modifiersBool) +@ Patches/../C_code.c:4194: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L1881 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L1884 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4188: int add = 0; +@ Patches/../C_code.c:4193: int add = 0; asrs r3, r3, #31 @ tmp271, tmp173, adds r7, r7, #5 @ tmp272, ands r7, r3 @ add, tmp271 -.L1881: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L1884: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4195: if (ClassBasedGrowths) - ldr r3, .L1920 @ tmp177, -@ Patches/../C_code.c:4195: if (ClassBasedGrowths) +@ Patches/../C_code.c:4200: if (ClassBasedGrowths) + ldr r3, .L1923 @ tmp177, +@ Patches/../C_code.c:4200: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths -@ Patches/../C_code.c:4193: baseGrowth = GetReorderedUnit(unit)->growthHP; +@ Patches/../C_code.c:4198: baseGrowth = GetReorderedUnit(unit)->growthHP; ldrb r6, [r0, #28] @ _1, -@ Patches/../C_code.c:4195: if (ClassBasedGrowths) +@ Patches/../C_code.c:4200: if (ClassBasedGrowths) cmp r3, #0 @ ClassBasedGrowths, - beq .L1883 @, -@ Patches/../C_code.c:4197: baseGrowth = unit->pClassData->growthHP; + beq .L1886 @, +@ Patches/../C_code.c:4202: baseGrowth = unit->pClassData->growthHP; movs r6, #27 @ baseGrowth, -@ Patches/../C_code.c:4197: baseGrowth = unit->pClassData->growthHP; +@ Patches/../C_code.c:4202: baseGrowth = unit->pClassData->growthHP; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4197: baseGrowth = unit->pClassData->growthHP; +@ Patches/../C_code.c:4202: baseGrowth = unit->pClassData->growthHP; ldrsb r6, [r3, r6] @ baseGrowth,* baseGrowth -.L1883: -@ Patches/../C_code.c:4199: if (CombinedGrowths) - ldr r3, .L1920+4 @ tmp180, -@ Patches/../C_code.c:4199: if (CombinedGrowths) +.L1886: +@ Patches/../C_code.c:4204: if (CombinedGrowths) + ldr r3, .L1923+4 @ tmp180, +@ Patches/../C_code.c:4204: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L1884 @, -@ Patches/../C_code.c:4201: baseGrowth += unit->pClassData->growthHP; + beq .L1887 @, +@ Patches/../C_code.c:4206: baseGrowth += unit->pClassData->growthHP; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrb r3, [r3, #27] @ tmp183, lsls r3, r3, #24 @ tmp183, tmp183, asrs r3, r3, #24 @ tmp183, tmp183, -@ Patches/../C_code.c:4201: baseGrowth += unit->pClassData->growthHP; +@ Patches/../C_code.c:4206: baseGrowth += unit->pClassData->growthHP; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp183 -.L1884: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1920+8 @ tmp266, +.L1887: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1923+8 @ tmp266, mov r8, r3 @ tmp266, tmp266 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_74, *RandBitflags.63_74 - ldr r3, .L1920+12 @ tmp188, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_74, tmp188 - beq .L1885 @, -@ Patches/../C_code.c:4194: int originalGrowth = unit->pCharacterData->growthHP; + ldr r2, [r3] @ *RandBitflags.64_74, *RandBitflags.64_74 + ldr r3, .L1923+12 @ tmp188, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_74, tmp188 + beq .L1888 @, +@ Patches/../C_code.c:4199: int originalGrowth = unit->pCharacterData->growthHP; ldr r1, [r4] @ _2, unit_45(D)->pCharacterData -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r2, [r1, #4] @ tmp190, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1920+16 @ tmp189, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1923+16 @ tmp189, lsls r2, r2, #1 @ tmp191, tmp190, -@ Patches/../C_code.c:4203: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4208: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp193, CharExceptions -@ Patches/../C_code.c:4203: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4208: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp193, - bne .L1885 @, + bne .L1888 @, cmp r5, #0 @ modifiersBool, - beq .L1885 @, -@ Patches/../C_code.c:4207: int growth = CallGet_Hp_Growth(unit); - ldr r3, .L1920+20 @ tmp203, + beq .L1888 @, +@ Patches/../C_code.c:4212: int growth = CallGet_Hp_Growth(unit); + ldr r3, .L1923+20 @ tmp203, movs r0, r4 @, unit -@ Patches/../C_code.c:4194: int originalGrowth = unit->pCharacterData->growthHP; +@ Patches/../C_code.c:4199: int originalGrowth = unit->pCharacterData->growthHP; ldrb r5, [r1, #28] @ _3, -@ Patches/../C_code.c:4207: int growth = CallGet_Hp_Growth(unit); +@ Patches/../C_code.c:4212: int growth = CallGet_Hp_Growth(unit); bl .L14 @ -@ Patches/../C_code.c:4209: if (growth != (-1)) +@ Patches/../C_code.c:4214: if (growth != (-1)) adds r3, r0, #1 @ tmp280, growth, - beq .L1889 @, -@ Patches/../C_code.c:4211: add = growth - originalGrowth; + beq .L1892 @, +@ Patches/../C_code.c:4216: add = growth - originalGrowth; subs r7, r0, r5 @ add, growth, _3 -.L1889: -@ Patches/../C_code.c:4214: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L1892: +@ Patches/../C_code.c:4219: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp205, movs r3, #11 @ tmp204, movs r5, r2 @ , tmp205 ldrsb r3, [r4, r3] @ tmp204, ands r5, r3 @ , tmp204 -@ Patches/../C_code.c:4215: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4220: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp205, tmp204 - bne .L1890 @, -@ Patches/../C_code.c:4215: if (player && (RandBitflags->grow50 == 1)) + bne .L1893 @, +@ Patches/../C_code.c:4220: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp266, tmp266 - ldr r2, [r3] @ RandBitflags.170_15, RandBitflags -@ Patches/../C_code.c:4215: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.170_15, *RandBitflags.170_15 -@ Patches/../C_code.c:4215: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp281, *RandBitflags.170_15, - bmi .L1901 @, -@ Patches/../C_code.c:4219: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.171_15, RandBitflags +@ Patches/../C_code.c:4220: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.171_15, *RandBitflags.171_15 +@ Patches/../C_code.c:4220: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp281, *RandBitflags.171_15, + bmi .L1904 @, +@ Patches/../C_code.c:4224: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp221, - ldrb r2, [r2] @ *RandBitflags.170_15, *RandBitflags.170_15 - ands r3, r2 @ _19, *RandBitflags.170_15 -@ Patches/../C_code.c:4219: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.171_15, *RandBitflags.171_15 + ands r3, r2 @ _19, *RandBitflags.171_15 +@ Patches/../C_code.c:4224: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L1880 @, -@ Patches/../C_code.c:4223: if (player && (RandBitflags->growth == 3)) + beq .L1883 @, +@ Patches/../C_code.c:4228: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L1902 @, -.L1890: -@ Patches/../C_code.c:4227: if (unit->pClassData->growthHP > growth) + beq .L1905 @, +.L1893: +@ Patches/../C_code.c:4232: if (unit->pClassData->growthHP > growth) movs r0, #27 @ tmp223, ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r3, r0] @ tmp223, -@ Patches/../C_code.c:4227: if (unit->pClassData->growthHP > growth) +@ Patches/../C_code.c:4232: if (unit->pClassData->growthHP > growth) cmp r0, r6 @ tmp223, baseGrowth - blt .L1917 @, -.L1891: -@ Patches/../C_code.c:4231: growth = AdjustGrowthForStatInflation(growth); + blt .L1920 @, +.L1894: +@ Patches/../C_code.c:4236: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4232: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4237: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4231: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4236: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp277 -@ Patches/../C_code.c:4232: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4237: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1920+24 @ tmp229, + ldr r3, .L1923+24 @ tmp229, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4233: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4238: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp234, str r3, [sp, #8] @ tmp234, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp236, add r1, sp, #8 @ tmp288,, str r3, [sp] @ tmp236, @@ -13420,76 +13451,76 @@ GetUnitHPGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4235: if (result < (growth / 2)) +@ Patches/../C_code.c:4240: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp239, growth, adds r1, r1, r6 @ tmp240, tmp239, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp278 -@ Patches/../C_code.c:4235: if (result < (growth / 2)) +@ Patches/../C_code.c:4240: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp241, tmp240, -@ Patches/../C_code.c:4235: if (result < (growth / 2)) +@ Patches/../C_code.c:4240: if (result < (growth / 2)) cmp r1, r0 @ tmp241, result - ble .L1892 @, -@ Patches/../C_code.c:4237: result += HashByte_Global(growth, (growth / 2), noise, 19); + ble .L1895 @, +@ Patches/../C_code.c:4242: result += HashByte_Global(growth, (growth / 2), noise, 19); movs r3, #19 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp289,, bl HashByte_Global @ -@ Patches/../C_code.c:4237: result += HashByte_Global(growth, (growth / 2), noise, 19); +@ Patches/../C_code.c:4242: result += HashByte_Global(growth, (growth / 2), noise, 19); adds r4, r4, r0 @ result, result, tmp279 -.L1892: -@ Patches/../C_code.c:4239: if ((result - growth) > 99) +.L1895: +@ Patches/../C_code.c:4244: if ((result - growth) > 99) subs r3, r4, r6 @ tmp245, result, growth -@ Patches/../C_code.c:4239: if ((result - growth) > 99) +@ Patches/../C_code.c:4244: if ((result - growth) > 99) cmp r3, #99 @ tmp245, - bgt .L1918 @, -@ Patches/../C_code.c:4243: if ((growth - result) > 99) + bgt .L1921 @, +@ Patches/../C_code.c:4248: if ((growth - result) > 99) subs r3, r6, r4 @ tmp246, growth, result -@ Patches/../C_code.c:4243: if ((growth - result) > 99) +@ Patches/../C_code.c:4248: if ((growth - result) > 99) cmp r3, #99 @ tmp246, - ble .L1894 @, -@ Patches/../C_code.c:4245: result = growth - 99; + ble .L1897 @, +@ Patches/../C_code.c:4250: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L1894: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1920+28 @ tmp247, +.L1897: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1923+28 @ tmp247, ldr r3, [r3] @ pretmp_55, GrowthValues -@ Patches/../C_code.c:4247: result += add; +@ Patches/../C_code.c:4252: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_55, *pretmp_55 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L1919 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1922 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp258, *pretmp_55, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp258, -.L1896: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1899: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp261, bonus, adds r5, r5, r3 @ tmp262, tmp261, bonus lsls r5, r5, #1 @ bonus, tmp262, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L1897 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1900 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp264, subs r5, r3, r5 @ bonus, tmp264, bonus -.L1897: -@ Patches/../C_code.c:4248: result += GetBonusGrowth(unit); +.L1900: +@ Patches/../C_code.c:4253: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4249: if (result < 0) +@ Patches/../C_code.c:4254: if (result < 0) mvns r3, r5 @ tmp268, asrs r3, r3, #31 @ tmp267, tmp268, ands r5, r3 @ , tmp267 - b .L1880 @ -.L1885: -@ Patches/../C_code.c:4205: return baseGrowth + add; + b .L1883 @ +.L1888: +@ Patches/../C_code.c:4210: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L1880: -@ Patches/../C_code.c:4254: } +.L1883: +@ Patches/../C_code.c:4259: } movs r0, r5 @, add sp, sp, #24 @,, @ sp needed @ @@ -13498,30 +13529,30 @@ GetUnitHPGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1918: -@ Patches/../C_code.c:4241: result = growth + 99; +.L1921: +@ Patches/../C_code.c:4246: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L1894 @ -.L1917: -@ Patches/../C_code.c:4227: if (unit->pClassData->growthHP > growth) + b .L1897 @ +.L1920: +@ Patches/../C_code.c:4232: if (unit->pClassData->growthHP > growth) movs r0, r6 @ tmp223, baseGrowth - b .L1891 @ -.L1919: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1894 @ +.L1922: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_55, - b .L1896 @ -.L1902: -@ Patches/../C_code.c:4225: return 100; + b .L1899 @ +.L1905: +@ Patches/../C_code.c:4230: return 100; movs r5, #100 @ , - b .L1880 @ -.L1901: -@ Patches/../C_code.c:4217: return 50; + b .L1883 @ +.L1904: +@ Patches/../C_code.c:4222: return 50; movs r5, #50 @ , - b .L1880 @ -.L1921: + b .L1883 @ +.L1924: .align 2 -.L1920: +.L1923: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -13547,142 +13578,142 @@ GetUnitPowGrowth: push {lr} @ movs r4, r0 @ unit, tmp273 movs r5, r1 @ modifiersBool, tmp274 -@ Patches/../C_code.c:4259: int add = 0; +@ Patches/../C_code.c:4264: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4257: { +@ Patches/../C_code.c:4262: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:4260: if (modifiersBool) +@ Patches/../C_code.c:4265: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L1923 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L1926 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4259: int add = 0; +@ Patches/../C_code.c:4264: int add = 0; asrs r3, r3, #31 @ tmp271, tmp173, adds r7, r7, #5 @ tmp272, ands r7, r3 @ add, tmp271 -.L1923: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L1926: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4266: if (ClassBasedGrowths) - ldr r3, .L1962 @ tmp177, -@ Patches/../C_code.c:4266: if (ClassBasedGrowths) +@ Patches/../C_code.c:4271: if (ClassBasedGrowths) + ldr r3, .L1965 @ tmp177, +@ Patches/../C_code.c:4271: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths -@ Patches/../C_code.c:4264: baseGrowth = GetReorderedUnit(unit)->growthPow; +@ Patches/../C_code.c:4269: baseGrowth = GetReorderedUnit(unit)->growthPow; ldrb r6, [r0, #29] @ _1, -@ Patches/../C_code.c:4266: if (ClassBasedGrowths) +@ Patches/../C_code.c:4271: if (ClassBasedGrowths) cmp r3, #0 @ ClassBasedGrowths, - beq .L1925 @, -@ Patches/../C_code.c:4268: baseGrowth = unit->pClassData->growthPow; + beq .L1928 @, +@ Patches/../C_code.c:4273: baseGrowth = unit->pClassData->growthPow; movs r6, #28 @ baseGrowth, -@ Patches/../C_code.c:4268: baseGrowth = unit->pClassData->growthPow; +@ Patches/../C_code.c:4273: baseGrowth = unit->pClassData->growthPow; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4268: baseGrowth = unit->pClassData->growthPow; +@ Patches/../C_code.c:4273: baseGrowth = unit->pClassData->growthPow; ldrsb r6, [r3, r6] @ baseGrowth,* baseGrowth -.L1925: -@ Patches/../C_code.c:4270: if (CombinedGrowths) - ldr r3, .L1962+4 @ tmp180, -@ Patches/../C_code.c:4270: if (CombinedGrowths) +.L1928: +@ Patches/../C_code.c:4275: if (CombinedGrowths) + ldr r3, .L1965+4 @ tmp180, +@ Patches/../C_code.c:4275: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L1926 @, -@ Patches/../C_code.c:4272: baseGrowth += unit->pClassData->growthPow; + beq .L1929 @, +@ Patches/../C_code.c:4277: baseGrowth += unit->pClassData->growthPow; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrb r3, [r3, #28] @ tmp183, lsls r3, r3, #24 @ tmp183, tmp183, asrs r3, r3, #24 @ tmp183, tmp183, -@ Patches/../C_code.c:4272: baseGrowth += unit->pClassData->growthPow; +@ Patches/../C_code.c:4277: baseGrowth += unit->pClassData->growthPow; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp183 -.L1926: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L1962+8 @ tmp266, +.L1929: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L1965+8 @ tmp266, mov r8, r3 @ tmp266, tmp266 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_74, *RandBitflags.63_74 - ldr r3, .L1962+12 @ tmp188, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_74, tmp188 - beq .L1927 @, -@ Patches/../C_code.c:4265: int originalGrowth = unit->pCharacterData->growthPow; + ldr r2, [r3] @ *RandBitflags.64_74, *RandBitflags.64_74 + ldr r3, .L1965+12 @ tmp188, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_74, tmp188 + beq .L1930 @, +@ Patches/../C_code.c:4270: int originalGrowth = unit->pCharacterData->growthPow; ldr r1, [r4] @ _2, unit_45(D)->pCharacterData -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r2, [r1, #4] @ tmp190, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L1962+16 @ tmp189, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L1965+16 @ tmp189, lsls r2, r2, #1 @ tmp191, tmp190, -@ Patches/../C_code.c:4274: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4279: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp193, CharExceptions -@ Patches/../C_code.c:4274: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4279: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp193, - bne .L1927 @, + bne .L1930 @, cmp r5, #0 @ modifiersBool, - beq .L1927 @, -@ Patches/../C_code.c:4278: int growth = CallGet_Str_Growth(unit); - ldr r3, .L1962+20 @ tmp203, + beq .L1930 @, +@ Patches/../C_code.c:4283: int growth = CallGet_Str_Growth(unit); + ldr r3, .L1965+20 @ tmp203, movs r0, r4 @, unit -@ Patches/../C_code.c:4265: int originalGrowth = unit->pCharacterData->growthPow; +@ Patches/../C_code.c:4270: int originalGrowth = unit->pCharacterData->growthPow; ldrb r5, [r1, #29] @ _3, -@ Patches/../C_code.c:4278: int growth = CallGet_Str_Growth(unit); +@ Patches/../C_code.c:4283: int growth = CallGet_Str_Growth(unit); bl .L14 @ -@ Patches/../C_code.c:4279: if (growth != (-1)) +@ Patches/../C_code.c:4284: if (growth != (-1)) adds r3, r0, #1 @ tmp280, growth, - beq .L1931 @, -@ Patches/../C_code.c:4281: add = growth - originalGrowth; + beq .L1934 @, +@ Patches/../C_code.c:4286: add = growth - originalGrowth; subs r7, r0, r5 @ add, growth, _3 -.L1931: -@ Patches/../C_code.c:4284: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L1934: +@ Patches/../C_code.c:4289: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp205, movs r3, #11 @ tmp204, movs r5, r2 @ , tmp205 ldrsb r3, [r4, r3] @ tmp204, ands r5, r3 @ , tmp204 -@ Patches/../C_code.c:4285: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4290: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp205, tmp204 - bne .L1932 @, -@ Patches/../C_code.c:4285: if (player && (RandBitflags->grow50 == 1)) + bne .L1935 @, +@ Patches/../C_code.c:4290: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp266, tmp266 - ldr r2, [r3] @ RandBitflags.175_15, RandBitflags -@ Patches/../C_code.c:4285: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.175_15, *RandBitflags.175_15 -@ Patches/../C_code.c:4285: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp281, *RandBitflags.175_15, - bmi .L1943 @, -@ Patches/../C_code.c:4289: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.176_15, RandBitflags +@ Patches/../C_code.c:4290: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.176_15, *RandBitflags.176_15 +@ Patches/../C_code.c:4290: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp281, *RandBitflags.176_15, + bmi .L1946 @, +@ Patches/../C_code.c:4294: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp221, - ldrb r2, [r2] @ *RandBitflags.175_15, *RandBitflags.175_15 - ands r3, r2 @ _19, *RandBitflags.175_15 -@ Patches/../C_code.c:4289: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.176_15, *RandBitflags.176_15 + ands r3, r2 @ _19, *RandBitflags.176_15 +@ Patches/../C_code.c:4294: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L1922 @, -@ Patches/../C_code.c:4293: if (player && (RandBitflags->growth == 3)) + beq .L1925 @, +@ Patches/../C_code.c:4298: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L1944 @, -.L1932: -@ Patches/../C_code.c:4297: if (unit->pClassData->growthPow > growth) + beq .L1947 @, +.L1935: +@ Patches/../C_code.c:4302: if (unit->pClassData->growthPow > growth) movs r0, #28 @ tmp223, ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r3, r0] @ tmp223, -@ Patches/../C_code.c:4297: if (unit->pClassData->growthPow > growth) +@ Patches/../C_code.c:4302: if (unit->pClassData->growthPow > growth) cmp r0, r6 @ tmp223, baseGrowth - blt .L1959 @, -.L1933: -@ Patches/../C_code.c:4301: growth = AdjustGrowthForStatInflation(growth); + blt .L1962 @, +.L1936: +@ Patches/../C_code.c:4306: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4302: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4307: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4301: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4306: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp277 -@ Patches/../C_code.c:4302: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4307: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L1962+24 @ tmp229, + ldr r3, .L1965+24 @ tmp229, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4303: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4308: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp234, str r3, [sp, #8] @ tmp234, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp236, add r1, sp, #8 @ tmp288,, str r3, [sp] @ tmp236, @@ -13690,76 +13721,76 @@ GetUnitPowGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4305: if (result < (growth / 2)) +@ Patches/../C_code.c:4310: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp239, growth, adds r1, r1, r6 @ tmp240, tmp239, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp278 -@ Patches/../C_code.c:4305: if (result < (growth / 2)) +@ Patches/../C_code.c:4310: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp241, tmp240, -@ Patches/../C_code.c:4305: if (result < (growth / 2)) +@ Patches/../C_code.c:4310: if (result < (growth / 2)) cmp r1, r0 @ tmp241, result - ble .L1934 @, -@ Patches/../C_code.c:4307: result += HashByte_Global(growth, (growth / 2), noise, 29); + ble .L1937 @, +@ Patches/../C_code.c:4312: result += HashByte_Global(growth, (growth / 2), noise, 29); movs r3, #29 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp289,, bl HashByte_Global @ -@ Patches/../C_code.c:4307: result += HashByte_Global(growth, (growth / 2), noise, 29); +@ Patches/../C_code.c:4312: result += HashByte_Global(growth, (growth / 2), noise, 29); adds r4, r4, r0 @ result, result, tmp279 -.L1934: -@ Patches/../C_code.c:4309: if ((result - growth) > 99) +.L1937: +@ Patches/../C_code.c:4314: if ((result - growth) > 99) subs r3, r4, r6 @ tmp245, result, growth -@ Patches/../C_code.c:4309: if ((result - growth) > 99) +@ Patches/../C_code.c:4314: if ((result - growth) > 99) cmp r3, #99 @ tmp245, - bgt .L1960 @, -@ Patches/../C_code.c:4313: if ((growth - result) > 99) + bgt .L1963 @, +@ Patches/../C_code.c:4318: if ((growth - result) > 99) subs r3, r6, r4 @ tmp246, growth, result -@ Patches/../C_code.c:4313: if ((growth - result) > 99) +@ Patches/../C_code.c:4318: if ((growth - result) > 99) cmp r3, #99 @ tmp246, - ble .L1936 @, -@ Patches/../C_code.c:4315: result = growth - 99; + ble .L1939 @, +@ Patches/../C_code.c:4320: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L1936: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L1962+28 @ tmp247, +.L1939: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L1965+28 @ tmp247, ldr r3, [r3] @ pretmp_55, GrowthValues -@ Patches/../C_code.c:4317: result += add; +@ Patches/../C_code.c:4322: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_55, *pretmp_55 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L1961 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L1964 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp258, *pretmp_55, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp258, -.L1938: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1941: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp261, bonus, adds r5, r5, r3 @ tmp262, tmp261, bonus lsls r5, r5, #1 @ bonus, tmp262, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L1939 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1942 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp264, subs r5, r3, r5 @ bonus, tmp264, bonus -.L1939: -@ Patches/../C_code.c:4318: result += GetBonusGrowth(unit); +.L1942: +@ Patches/../C_code.c:4323: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4319: if (result < 0) +@ Patches/../C_code.c:4324: if (result < 0) mvns r3, r5 @ tmp268, asrs r3, r3, #31 @ tmp267, tmp268, ands r5, r3 @ , tmp267 - b .L1922 @ -.L1927: -@ Patches/../C_code.c:4276: return baseGrowth + add; + b .L1925 @ +.L1930: +@ Patches/../C_code.c:4281: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L1922: -@ Patches/../C_code.c:4324: } +.L1925: +@ Patches/../C_code.c:4329: } movs r0, r5 @, add sp, sp, #24 @,, @ sp needed @ @@ -13768,30 +13799,30 @@ GetUnitPowGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L1960: -@ Patches/../C_code.c:4311: result = growth + 99; +.L1963: +@ Patches/../C_code.c:4316: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L1936 @ -.L1959: -@ Patches/../C_code.c:4297: if (unit->pClassData->growthPow > growth) + b .L1939 @ +.L1962: +@ Patches/../C_code.c:4302: if (unit->pClassData->growthPow > growth) movs r0, r6 @ tmp223, baseGrowth - b .L1933 @ -.L1961: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1936 @ +.L1964: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_55, - b .L1938 @ -.L1944: -@ Patches/../C_code.c:4295: return 100; + b .L1941 @ +.L1947: +@ Patches/../C_code.c:4300: return 100; movs r5, #100 @ , - b .L1922 @ -.L1943: -@ Patches/../C_code.c:4287: return 50; + b .L1925 @ +.L1946: +@ Patches/../C_code.c:4292: return 50; movs r5, #50 @ , - b .L1922 @ -.L1963: + b .L1925 @ +.L1966: .align 2 -.L1962: +.L1965: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -13817,142 +13848,142 @@ GetUnitSklGrowth: push {lr} @ movs r4, r0 @ unit, tmp273 movs r5, r1 @ modifiersBool, tmp274 -@ Patches/../C_code.c:4329: int add = 0; +@ Patches/../C_code.c:4334: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4327: { +@ Patches/../C_code.c:4332: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:4330: if (modifiersBool) +@ Patches/../C_code.c:4335: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L1965 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L1968 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4329: int add = 0; +@ Patches/../C_code.c:4334: int add = 0; asrs r3, r3, #31 @ tmp271, tmp173, adds r7, r7, #5 @ tmp272, ands r7, r3 @ add, tmp271 -.L1965: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L1968: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4336: if (ClassBasedGrowths) - ldr r3, .L2004 @ tmp177, -@ Patches/../C_code.c:4336: if (ClassBasedGrowths) +@ Patches/../C_code.c:4341: if (ClassBasedGrowths) + ldr r3, .L2007 @ tmp177, +@ Patches/../C_code.c:4341: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths -@ Patches/../C_code.c:4334: baseGrowth = GetReorderedUnit(unit)->growthSkl; +@ Patches/../C_code.c:4339: baseGrowth = GetReorderedUnit(unit)->growthSkl; ldrb r6, [r0, #30] @ _1, -@ Patches/../C_code.c:4336: if (ClassBasedGrowths) +@ Patches/../C_code.c:4341: if (ClassBasedGrowths) cmp r3, #0 @ ClassBasedGrowths, - beq .L1967 @, -@ Patches/../C_code.c:4338: baseGrowth = unit->pClassData->growthSkl; + beq .L1970 @, +@ Patches/../C_code.c:4343: baseGrowth = unit->pClassData->growthSkl; movs r6, #29 @ baseGrowth, -@ Patches/../C_code.c:4338: baseGrowth = unit->pClassData->growthSkl; +@ Patches/../C_code.c:4343: baseGrowth = unit->pClassData->growthSkl; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4338: baseGrowth = unit->pClassData->growthSkl; +@ Patches/../C_code.c:4343: baseGrowth = unit->pClassData->growthSkl; ldrsb r6, [r3, r6] @ baseGrowth,* baseGrowth -.L1967: -@ Patches/../C_code.c:4340: if (CombinedGrowths) - ldr r3, .L2004+4 @ tmp180, -@ Patches/../C_code.c:4340: if (CombinedGrowths) +.L1970: +@ Patches/../C_code.c:4345: if (CombinedGrowths) + ldr r3, .L2007+4 @ tmp180, +@ Patches/../C_code.c:4345: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L1968 @, -@ Patches/../C_code.c:4342: baseGrowth += unit->pClassData->growthSkl; + beq .L1971 @, +@ Patches/../C_code.c:4347: baseGrowth += unit->pClassData->growthSkl; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrb r3, [r3, #29] @ tmp183, lsls r3, r3, #24 @ tmp183, tmp183, asrs r3, r3, #24 @ tmp183, tmp183, -@ Patches/../C_code.c:4342: baseGrowth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4347: baseGrowth += unit->pClassData->growthSkl; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp183 -.L1968: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L2004+8 @ tmp266, +.L1971: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L2007+8 @ tmp266, mov r8, r3 @ tmp266, tmp266 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_74, *RandBitflags.63_74 - ldr r3, .L2004+12 @ tmp188, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_74, tmp188 - beq .L1969 @, -@ Patches/../C_code.c:4335: int originalGrowth = unit->pCharacterData->growthSkl; + ldr r2, [r3] @ *RandBitflags.64_74, *RandBitflags.64_74 + ldr r3, .L2007+12 @ tmp188, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_74, tmp188 + beq .L1972 @, +@ Patches/../C_code.c:4340: int originalGrowth = unit->pCharacterData->growthSkl; ldr r1, [r4] @ _2, unit_45(D)->pCharacterData -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r2, [r1, #4] @ tmp190, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L2004+16 @ tmp189, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L2007+16 @ tmp189, lsls r2, r2, #1 @ tmp191, tmp190, -@ Patches/../C_code.c:4344: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4349: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp193, CharExceptions -@ Patches/../C_code.c:4344: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4349: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp193, - bne .L1969 @, + bne .L1972 @, cmp r5, #0 @ modifiersBool, - beq .L1969 @, -@ Patches/../C_code.c:4348: int growth = CallGet_Skl_Growth(unit); - ldr r3, .L2004+20 @ tmp203, + beq .L1972 @, +@ Patches/../C_code.c:4353: int growth = CallGet_Skl_Growth(unit); + ldr r3, .L2007+20 @ tmp203, movs r0, r4 @, unit -@ Patches/../C_code.c:4335: int originalGrowth = unit->pCharacterData->growthSkl; +@ Patches/../C_code.c:4340: int originalGrowth = unit->pCharacterData->growthSkl; ldrb r5, [r1, #30] @ _3, -@ Patches/../C_code.c:4348: int growth = CallGet_Skl_Growth(unit); +@ Patches/../C_code.c:4353: int growth = CallGet_Skl_Growth(unit); bl .L14 @ -@ Patches/../C_code.c:4349: if (growth != (-1)) +@ Patches/../C_code.c:4354: if (growth != (-1)) adds r3, r0, #1 @ tmp280, growth, - beq .L1973 @, -@ Patches/../C_code.c:4351: add = growth - originalGrowth; + beq .L1976 @, +@ Patches/../C_code.c:4356: add = growth - originalGrowth; subs r7, r0, r5 @ add, growth, _3 -.L1973: -@ Patches/../C_code.c:4354: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L1976: +@ Patches/../C_code.c:4359: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp205, movs r3, #11 @ tmp204, movs r5, r2 @ , tmp205 ldrsb r3, [r4, r3] @ tmp204, ands r5, r3 @ , tmp204 -@ Patches/../C_code.c:4355: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4360: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp205, tmp204 - bne .L1974 @, -@ Patches/../C_code.c:4355: if (player && (RandBitflags->grow50 == 1)) + bne .L1977 @, +@ Patches/../C_code.c:4360: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp266, tmp266 - ldr r2, [r3] @ RandBitflags.180_15, RandBitflags -@ Patches/../C_code.c:4355: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.180_15, *RandBitflags.180_15 -@ Patches/../C_code.c:4355: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp281, *RandBitflags.180_15, - bmi .L1985 @, -@ Patches/../C_code.c:4359: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.181_15, RandBitflags +@ Patches/../C_code.c:4360: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.181_15, *RandBitflags.181_15 +@ Patches/../C_code.c:4360: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp281, *RandBitflags.181_15, + bmi .L1988 @, +@ Patches/../C_code.c:4364: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp221, - ldrb r2, [r2] @ *RandBitflags.180_15, *RandBitflags.180_15 - ands r3, r2 @ _19, *RandBitflags.180_15 -@ Patches/../C_code.c:4359: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.181_15, *RandBitflags.181_15 + ands r3, r2 @ _19, *RandBitflags.181_15 +@ Patches/../C_code.c:4364: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L1964 @, -@ Patches/../C_code.c:4363: if (player && (RandBitflags->growth == 3)) + beq .L1967 @, +@ Patches/../C_code.c:4368: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L1986 @, -.L1974: -@ Patches/../C_code.c:4367: if (unit->pClassData->growthSkl > growth) + beq .L1989 @, +.L1977: +@ Patches/../C_code.c:4372: if (unit->pClassData->growthSkl > growth) movs r0, #29 @ tmp223, ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r3, r0] @ tmp223, -@ Patches/../C_code.c:4367: if (unit->pClassData->growthSkl > growth) +@ Patches/../C_code.c:4372: if (unit->pClassData->growthSkl > growth) cmp r0, r6 @ tmp223, baseGrowth - blt .L2001 @, -.L1975: -@ Patches/../C_code.c:4371: growth = AdjustGrowthForStatInflation(growth); + blt .L2004 @, +.L1978: +@ Patches/../C_code.c:4376: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4372: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4377: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4371: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4376: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp277 -@ Patches/../C_code.c:4372: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4377: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L2004+24 @ tmp229, + ldr r3, .L2007+24 @ tmp229, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4373: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4378: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp234, str r3, [sp, #8] @ tmp234, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp236, add r1, sp, #8 @ tmp288,, str r3, [sp] @ tmp236, @@ -13960,76 +13991,76 @@ GetUnitSklGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4375: if (result < (growth / 2)) +@ Patches/../C_code.c:4380: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp239, growth, adds r1, r1, r6 @ tmp240, tmp239, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp278 -@ Patches/../C_code.c:4375: if (result < (growth / 2)) +@ Patches/../C_code.c:4380: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp241, tmp240, -@ Patches/../C_code.c:4375: if (result < (growth / 2)) +@ Patches/../C_code.c:4380: if (result < (growth / 2)) cmp r1, r0 @ tmp241, result - ble .L1976 @, -@ Patches/../C_code.c:4377: result += HashByte_Global(growth, (growth / 2), noise, 39); + ble .L1979 @, +@ Patches/../C_code.c:4382: result += HashByte_Global(growth, (growth / 2), noise, 39); movs r3, #39 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp289,, bl HashByte_Global @ -@ Patches/../C_code.c:4377: result += HashByte_Global(growth, (growth / 2), noise, 39); +@ Patches/../C_code.c:4382: result += HashByte_Global(growth, (growth / 2), noise, 39); adds r4, r4, r0 @ result, result, tmp279 -.L1976: -@ Patches/../C_code.c:4379: if ((result - growth) > 99) +.L1979: +@ Patches/../C_code.c:4384: if ((result - growth) > 99) subs r3, r4, r6 @ tmp245, result, growth -@ Patches/../C_code.c:4379: if ((result - growth) > 99) +@ Patches/../C_code.c:4384: if ((result - growth) > 99) cmp r3, #99 @ tmp245, - bgt .L2002 @, -@ Patches/../C_code.c:4383: if ((growth - result) > 99) + bgt .L2005 @, +@ Patches/../C_code.c:4388: if ((growth - result) > 99) subs r3, r6, r4 @ tmp246, growth, result -@ Patches/../C_code.c:4383: if ((growth - result) > 99) +@ Patches/../C_code.c:4388: if ((growth - result) > 99) cmp r3, #99 @ tmp246, - ble .L1978 @, -@ Patches/../C_code.c:4385: result = growth - 99; + ble .L1981 @, +@ Patches/../C_code.c:4390: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L1978: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L2004+28 @ tmp247, +.L1981: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L2007+28 @ tmp247, ldr r3, [r3] @ pretmp_55, GrowthValues -@ Patches/../C_code.c:4387: result += add; +@ Patches/../C_code.c:4392: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_55, *pretmp_55 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L2003 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L2006 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp258, *pretmp_55, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp258, -.L1980: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L1983: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp261, bonus, adds r5, r5, r3 @ tmp262, tmp261, bonus lsls r5, r5, #1 @ bonus, tmp262, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L1981 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L1984 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp264, subs r5, r3, r5 @ bonus, tmp264, bonus -.L1981: -@ Patches/../C_code.c:4388: result += GetBonusGrowth(unit); +.L1984: +@ Patches/../C_code.c:4393: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4389: if (result < 0) +@ Patches/../C_code.c:4394: if (result < 0) mvns r3, r5 @ tmp268, asrs r3, r3, #31 @ tmp267, tmp268, ands r5, r3 @ , tmp267 - b .L1964 @ -.L1969: -@ Patches/../C_code.c:4346: return baseGrowth + add; + b .L1967 @ +.L1972: +@ Patches/../C_code.c:4351: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L1964: -@ Patches/../C_code.c:4394: } +.L1967: +@ Patches/../C_code.c:4399: } movs r0, r5 @, add sp, sp, #24 @,, @ sp needed @ @@ -14038,30 +14069,30 @@ GetUnitSklGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2002: -@ Patches/../C_code.c:4381: result = growth + 99; +.L2005: +@ Patches/../C_code.c:4386: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L1978 @ -.L2001: -@ Patches/../C_code.c:4367: if (unit->pClassData->growthSkl > growth) + b .L1981 @ +.L2004: +@ Patches/../C_code.c:4372: if (unit->pClassData->growthSkl > growth) movs r0, r6 @ tmp223, baseGrowth - b .L1975 @ -.L2003: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L1978 @ +.L2006: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_55, - b .L1980 @ -.L1986: -@ Patches/../C_code.c:4365: return 100; + b .L1983 @ +.L1989: +@ Patches/../C_code.c:4370: return 100; movs r5, #100 @ , - b .L1964 @ -.L1985: -@ Patches/../C_code.c:4357: return 50; + b .L1967 @ +.L1988: +@ Patches/../C_code.c:4362: return 50; movs r5, #50 @ , - b .L1964 @ -.L2005: + b .L1967 @ +.L2008: .align 2 -.L2004: +.L2007: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -14087,142 +14118,142 @@ GetUnitSpdGrowth: push {lr} @ movs r4, r0 @ unit, tmp273 movs r5, r1 @ modifiersBool, tmp274 -@ Patches/../C_code.c:4399: int add = 0; +@ Patches/../C_code.c:4404: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4397: { +@ Patches/../C_code.c:4402: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:4400: if (modifiersBool) +@ Patches/../C_code.c:4405: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L2007 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L2010 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4399: int add = 0; +@ Patches/../C_code.c:4404: int add = 0; asrs r3, r3, #31 @ tmp271, tmp173, adds r7, r7, #5 @ tmp272, ands r7, r3 @ add, tmp271 -.L2007: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2010: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4406: if (ClassBasedGrowths) - ldr r3, .L2046 @ tmp177, -@ Patches/../C_code.c:4406: if (ClassBasedGrowths) +@ Patches/../C_code.c:4411: if (ClassBasedGrowths) + ldr r3, .L2049 @ tmp177, +@ Patches/../C_code.c:4411: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths -@ Patches/../C_code.c:4404: baseGrowth = GetReorderedUnit(unit)->growthSpd; +@ Patches/../C_code.c:4409: baseGrowth = GetReorderedUnit(unit)->growthSpd; ldrb r6, [r0, #31] @ _1, -@ Patches/../C_code.c:4406: if (ClassBasedGrowths) +@ Patches/../C_code.c:4411: if (ClassBasedGrowths) cmp r3, #0 @ ClassBasedGrowths, - beq .L2009 @, -@ Patches/../C_code.c:4408: baseGrowth = unit->pClassData->growthSpd; + beq .L2012 @, +@ Patches/../C_code.c:4413: baseGrowth = unit->pClassData->growthSpd; movs r6, #30 @ baseGrowth, -@ Patches/../C_code.c:4408: baseGrowth = unit->pClassData->growthSpd; +@ Patches/../C_code.c:4413: baseGrowth = unit->pClassData->growthSpd; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4408: baseGrowth = unit->pClassData->growthSpd; +@ Patches/../C_code.c:4413: baseGrowth = unit->pClassData->growthSpd; ldrsb r6, [r3, r6] @ baseGrowth,* baseGrowth -.L2009: -@ Patches/../C_code.c:4410: if (CombinedGrowths) - ldr r3, .L2046+4 @ tmp180, -@ Patches/../C_code.c:4410: if (CombinedGrowths) +.L2012: +@ Patches/../C_code.c:4415: if (CombinedGrowths) + ldr r3, .L2049+4 @ tmp180, +@ Patches/../C_code.c:4415: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L2010 @, -@ Patches/../C_code.c:4412: baseGrowth += unit->pClassData->growthSpd; + beq .L2013 @, +@ Patches/../C_code.c:4417: baseGrowth += unit->pClassData->growthSpd; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrb r3, [r3, #30] @ tmp183, lsls r3, r3, #24 @ tmp183, tmp183, asrs r3, r3, #24 @ tmp183, tmp183, -@ Patches/../C_code.c:4412: baseGrowth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4417: baseGrowth += unit->pClassData->growthSpd; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp183 -.L2010: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L2046+8 @ tmp266, +.L2013: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L2049+8 @ tmp266, mov r8, r3 @ tmp266, tmp266 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_74, *RandBitflags.63_74 - ldr r3, .L2046+12 @ tmp188, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_74, tmp188 - beq .L2011 @, -@ Patches/../C_code.c:4405: int originalGrowth = unit->pCharacterData->growthSpd; + ldr r2, [r3] @ *RandBitflags.64_74, *RandBitflags.64_74 + ldr r3, .L2049+12 @ tmp188, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_74, tmp188 + beq .L2014 @, +@ Patches/../C_code.c:4410: int originalGrowth = unit->pCharacterData->growthSpd; ldr r1, [r4] @ _2, unit_45(D)->pCharacterData -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r2, [r1, #4] @ tmp190, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L2046+16 @ tmp189, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L2049+16 @ tmp189, lsls r2, r2, #1 @ tmp191, tmp190, -@ Patches/../C_code.c:4414: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4419: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp193, CharExceptions -@ Patches/../C_code.c:4414: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4419: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp193, - bne .L2011 @, + bne .L2014 @, cmp r5, #0 @ modifiersBool, - beq .L2011 @, -@ Patches/../C_code.c:4418: int growth = CallGet_Spd_Growth(unit); - ldr r3, .L2046+20 @ tmp203, + beq .L2014 @, +@ Patches/../C_code.c:4423: int growth = CallGet_Spd_Growth(unit); + ldr r3, .L2049+20 @ tmp203, movs r0, r4 @, unit -@ Patches/../C_code.c:4405: int originalGrowth = unit->pCharacterData->growthSpd; +@ Patches/../C_code.c:4410: int originalGrowth = unit->pCharacterData->growthSpd; ldrb r5, [r1, #31] @ _3, -@ Patches/../C_code.c:4418: int growth = CallGet_Spd_Growth(unit); +@ Patches/../C_code.c:4423: int growth = CallGet_Spd_Growth(unit); bl .L14 @ -@ Patches/../C_code.c:4419: if (growth != (-1)) +@ Patches/../C_code.c:4424: if (growth != (-1)) adds r3, r0, #1 @ tmp280, growth, - beq .L2015 @, -@ Patches/../C_code.c:4421: add = growth - originalGrowth; + beq .L2018 @, +@ Patches/../C_code.c:4426: add = growth - originalGrowth; subs r7, r0, r5 @ add, growth, _3 -.L2015: -@ Patches/../C_code.c:4424: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L2018: +@ Patches/../C_code.c:4429: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp205, movs r3, #11 @ tmp204, movs r5, r2 @ , tmp205 ldrsb r3, [r4, r3] @ tmp204, ands r5, r3 @ , tmp204 -@ Patches/../C_code.c:4425: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4430: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp205, tmp204 - bne .L2016 @, -@ Patches/../C_code.c:4425: if (player && (RandBitflags->grow50 == 1)) + bne .L2019 @, +@ Patches/../C_code.c:4430: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp266, tmp266 - ldr r2, [r3] @ RandBitflags.185_15, RandBitflags -@ Patches/../C_code.c:4425: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.185_15, *RandBitflags.185_15 -@ Patches/../C_code.c:4425: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp281, *RandBitflags.185_15, - bmi .L2027 @, -@ Patches/../C_code.c:4429: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.186_15, RandBitflags +@ Patches/../C_code.c:4430: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.186_15, *RandBitflags.186_15 +@ Patches/../C_code.c:4430: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp281, *RandBitflags.186_15, + bmi .L2030 @, +@ Patches/../C_code.c:4434: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp221, - ldrb r2, [r2] @ *RandBitflags.185_15, *RandBitflags.185_15 - ands r3, r2 @ _19, *RandBitflags.185_15 -@ Patches/../C_code.c:4429: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.186_15, *RandBitflags.186_15 + ands r3, r2 @ _19, *RandBitflags.186_15 +@ Patches/../C_code.c:4434: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L2006 @, -@ Patches/../C_code.c:4433: if (player && (RandBitflags->growth == 3)) + beq .L2009 @, +@ Patches/../C_code.c:4438: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L2028 @, -.L2016: -@ Patches/../C_code.c:4437: if (unit->pClassData->growthSpd > growth) + beq .L2031 @, +.L2019: +@ Patches/../C_code.c:4442: if (unit->pClassData->growthSpd > growth) movs r0, #30 @ tmp223, ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r3, r0] @ tmp223, -@ Patches/../C_code.c:4437: if (unit->pClassData->growthSpd > growth) +@ Patches/../C_code.c:4442: if (unit->pClassData->growthSpd > growth) cmp r0, r6 @ tmp223, baseGrowth - blt .L2043 @, -.L2017: -@ Patches/../C_code.c:4441: growth = AdjustGrowthForStatInflation(growth); + blt .L2046 @, +.L2020: +@ Patches/../C_code.c:4446: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4442: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4447: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4441: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4446: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp277 -@ Patches/../C_code.c:4442: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4447: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L2046+24 @ tmp229, + ldr r3, .L2049+24 @ tmp229, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4443: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4448: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp234, str r3, [sp, #8] @ tmp234, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp236, add r1, sp, #8 @ tmp288,, str r3, [sp] @ tmp236, @@ -14230,76 +14261,76 @@ GetUnitSpdGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4445: if (result < (growth / 2)) +@ Patches/../C_code.c:4450: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp239, growth, adds r1, r1, r6 @ tmp240, tmp239, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp278 -@ Patches/../C_code.c:4445: if (result < (growth / 2)) +@ Patches/../C_code.c:4450: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp241, tmp240, -@ Patches/../C_code.c:4445: if (result < (growth / 2)) +@ Patches/../C_code.c:4450: if (result < (growth / 2)) cmp r1, r0 @ tmp241, result - ble .L2018 @, -@ Patches/../C_code.c:4447: result += HashByte_Global(growth, (growth / 2), noise, 49); + ble .L2021 @, +@ Patches/../C_code.c:4452: result += HashByte_Global(growth, (growth / 2), noise, 49); movs r3, #49 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp289,, bl HashByte_Global @ -@ Patches/../C_code.c:4447: result += HashByte_Global(growth, (growth / 2), noise, 49); +@ Patches/../C_code.c:4452: result += HashByte_Global(growth, (growth / 2), noise, 49); adds r4, r4, r0 @ result, result, tmp279 -.L2018: -@ Patches/../C_code.c:4449: if ((result - growth) > 99) +.L2021: +@ Patches/../C_code.c:4454: if ((result - growth) > 99) subs r3, r4, r6 @ tmp245, result, growth -@ Patches/../C_code.c:4449: if ((result - growth) > 99) +@ Patches/../C_code.c:4454: if ((result - growth) > 99) cmp r3, #99 @ tmp245, - bgt .L2044 @, -@ Patches/../C_code.c:4453: if ((growth - result) > 99) + bgt .L2047 @, +@ Patches/../C_code.c:4458: if ((growth - result) > 99) subs r3, r6, r4 @ tmp246, growth, result -@ Patches/../C_code.c:4453: if ((growth - result) > 99) +@ Patches/../C_code.c:4458: if ((growth - result) > 99) cmp r3, #99 @ tmp246, - ble .L2020 @, -@ Patches/../C_code.c:4455: result = growth - 99; + ble .L2023 @, +@ Patches/../C_code.c:4460: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L2020: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L2046+28 @ tmp247, +.L2023: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L2049+28 @ tmp247, ldr r3, [r3] @ pretmp_55, GrowthValues -@ Patches/../C_code.c:4457: result += add; +@ Patches/../C_code.c:4462: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_55, *pretmp_55 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L2045 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L2048 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp258, *pretmp_55, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp258, -.L2022: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L2025: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp261, bonus, adds r5, r5, r3 @ tmp262, tmp261, bonus lsls r5, r5, #1 @ bonus, tmp262, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L2023 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L2026 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp264, subs r5, r3, r5 @ bonus, tmp264, bonus -.L2023: -@ Patches/../C_code.c:4458: result += GetBonusGrowth(unit); +.L2026: +@ Patches/../C_code.c:4463: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4459: if (result < 0) +@ Patches/../C_code.c:4464: if (result < 0) mvns r3, r5 @ tmp268, asrs r3, r3, #31 @ tmp267, tmp268, ands r5, r3 @ , tmp267 - b .L2006 @ -.L2011: -@ Patches/../C_code.c:4416: return baseGrowth + add; + b .L2009 @ +.L2014: +@ Patches/../C_code.c:4421: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L2006: -@ Patches/../C_code.c:4464: } +.L2009: +@ Patches/../C_code.c:4469: } movs r0, r5 @, add sp, sp, #24 @,, @ sp needed @ @@ -14308,30 +14339,30 @@ GetUnitSpdGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2044: -@ Patches/../C_code.c:4451: result = growth + 99; +.L2047: +@ Patches/../C_code.c:4456: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L2020 @ -.L2043: -@ Patches/../C_code.c:4437: if (unit->pClassData->growthSpd > growth) + b .L2023 @ +.L2046: +@ Patches/../C_code.c:4442: if (unit->pClassData->growthSpd > growth) movs r0, r6 @ tmp223, baseGrowth - b .L2017 @ -.L2045: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L2020 @ +.L2048: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_55, - b .L2022 @ -.L2028: -@ Patches/../C_code.c:4435: return 100; + b .L2025 @ +.L2031: +@ Patches/../C_code.c:4440: return 100; movs r5, #100 @ , - b .L2006 @ -.L2027: -@ Patches/../C_code.c:4427: return 50; + b .L2009 @ +.L2030: +@ Patches/../C_code.c:4432: return 50; movs r5, #50 @ , - b .L2006 @ -.L2047: + b .L2009 @ +.L2050: .align 2 -.L2046: +.L2049: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -14358,145 +14389,145 @@ GetUnitDefGrowth: push {r7, lr} @ movs r4, r0 @ unit, tmp275 movs r5, r1 @ modifiersBool, tmp276 -@ Patches/../C_code.c:4469: int add = 0; +@ Patches/../C_code.c:4474: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4467: { +@ Patches/../C_code.c:4472: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:4470: if (modifiersBool) +@ Patches/../C_code.c:4475: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L2049 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L2052 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4469: int add = 0; +@ Patches/../C_code.c:4474: int add = 0; asrs r3, r3, #31 @ tmp273, tmp173, adds r7, r7, #5 @ tmp274, ands r7, r3 @ add, tmp273 -.L2049: -@ Patches/../C_code.c:4474: int originalGrowth = unit->pCharacterData->growthDef; +.L2052: +@ Patches/../C_code.c:4479: int originalGrowth = unit->pCharacterData->growthDef; movs r6, #32 @ tmp176, -@ Patches/../C_code.c:4474: int originalGrowth = unit->pCharacterData->growthDef; +@ Patches/../C_code.c:4479: int originalGrowth = unit->pCharacterData->growthDef; ldr r0, [r4] @ _1, unit_45(D)->pCharacterData -@ Patches/../C_code.c:4474: int originalGrowth = unit->pCharacterData->growthDef; +@ Patches/../C_code.c:4479: int originalGrowth = unit->pCharacterData->growthDef; ldrb r3, [r0, r6] @ _2, mov r8, r3 @ _2, _2 -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); bl GetReorderedCharacter @ -@ Patches/../C_code.c:4476: if (ClassBasedGrowths) - ldr r3, .L2088 @ tmp178, -@ Patches/../C_code.c:4476: if (ClassBasedGrowths) +@ Patches/../C_code.c:4481: if (ClassBasedGrowths) + ldr r3, .L2091 @ tmp178, +@ Patches/../C_code.c:4481: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths -@ Patches/../C_code.c:4475: baseGrowth = GetReorderedUnit(unit)->growthDef; +@ Patches/../C_code.c:4480: baseGrowth = GetReorderedUnit(unit)->growthDef; ldrb r6, [r0, r6] @ _3, -@ Patches/../C_code.c:4476: if (ClassBasedGrowths) +@ Patches/../C_code.c:4481: if (ClassBasedGrowths) cmp r3, #0 @ ClassBasedGrowths, - beq .L2051 @, -@ Patches/../C_code.c:4478: baseGrowth = unit->pClassData->growthDef; + beq .L2054 @, +@ Patches/../C_code.c:4483: baseGrowth = unit->pClassData->growthDef; movs r6, #31 @ baseGrowth, -@ Patches/../C_code.c:4478: baseGrowth = unit->pClassData->growthDef; +@ Patches/../C_code.c:4483: baseGrowth = unit->pClassData->growthDef; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4478: baseGrowth = unit->pClassData->growthDef; +@ Patches/../C_code.c:4483: baseGrowth = unit->pClassData->growthDef; ldrsb r6, [r3, r6] @ baseGrowth,* baseGrowth -.L2051: -@ Patches/../C_code.c:4480: if (CombinedGrowths) - ldr r3, .L2088+4 @ tmp181, -@ Patches/../C_code.c:4480: if (CombinedGrowths) +.L2054: +@ Patches/../C_code.c:4485: if (CombinedGrowths) + ldr r3, .L2091+4 @ tmp181, +@ Patches/../C_code.c:4485: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L2052 @, -@ Patches/../C_code.c:4482: baseGrowth += unit->pClassData->growthDef; + beq .L2055 @, +@ Patches/../C_code.c:4487: baseGrowth += unit->pClassData->growthDef; ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrb r3, [r3, #31] @ tmp184, lsls r3, r3, #24 @ tmp184, tmp184, asrs r3, r3, #24 @ tmp184, tmp184, -@ Patches/../C_code.c:4482: baseGrowth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4487: baseGrowth += unit->pClassData->growthDef; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp184 -.L2052: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L2088+8 @ tmp268, +.L2055: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L2091+8 @ tmp268, mov r9, r3 @ tmp268, tmp268 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_73, *RandBitflags.63_73 - ldr r3, .L2088+12 @ tmp189, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_73, tmp189 - beq .L2053 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r2, [r3] @ *RandBitflags.64_73, *RandBitflags.64_73 + ldr r3, .L2091+12 @ tmp189, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_73, tmp189 + beq .L2056 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r4] @ MEM[(const struct CharacterData * *)unit_45(D)], MEM[(const struct CharacterData * *)unit_45(D)] ldrb r2, [r2, #4] @ tmp192, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L2088+16 @ tmp190, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L2091+16 @ tmp190, lsls r2, r2, #1 @ tmp193, tmp192, -@ Patches/../C_code.c:4484: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4489: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp195, CharExceptions -@ Patches/../C_code.c:4484: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4489: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp195, - bne .L2053 @, + bne .L2056 @, cmp r5, #0 @ modifiersBool, - beq .L2053 @, -@ Patches/../C_code.c:4488: int growth = CallGet_Def_Growth(unit); - ldr r3, .L2088+20 @ tmp205, + beq .L2056 @, +@ Patches/../C_code.c:4493: int growth = CallGet_Def_Growth(unit); + ldr r3, .L2091+20 @ tmp205, movs r0, r4 @, unit bl .L14 @ -@ Patches/../C_code.c:4489: if (growth != (-1)) +@ Patches/../C_code.c:4494: if (growth != (-1)) adds r3, r0, #1 @ tmp282, growth, - beq .L2057 @, -@ Patches/../C_code.c:4491: add = growth - originalGrowth; + beq .L2060 @, +@ Patches/../C_code.c:4496: add = growth - originalGrowth; mov r3, r8 @ _2, _2 subs r7, r0, r3 @ add, growth, _2 -.L2057: -@ Patches/../C_code.c:4494: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L2060: +@ Patches/../C_code.c:4499: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp207, movs r3, #11 @ tmp206, movs r5, r2 @ , tmp207 ldrsb r3, [r4, r3] @ tmp206, ands r5, r3 @ , tmp206 -@ Patches/../C_code.c:4495: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4500: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp207, tmp206 - bne .L2058 @, -@ Patches/../C_code.c:4495: if (player && (RandBitflags->grow50 == 1)) + bne .L2061 @, +@ Patches/../C_code.c:4500: if (player && (RandBitflags->grow50 == 1)) mov r3, r9 @ tmp268, tmp268 - ldr r2, [r3] @ RandBitflags.190_15, RandBitflags -@ Patches/../C_code.c:4495: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.190_15, *RandBitflags.190_15 -@ Patches/../C_code.c:4495: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp283, *RandBitflags.190_15, - bmi .L2069 @, -@ Patches/../C_code.c:4499: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.191_15, RandBitflags +@ Patches/../C_code.c:4500: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.191_15, *RandBitflags.191_15 +@ Patches/../C_code.c:4500: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp283, *RandBitflags.191_15, + bmi .L2072 @, +@ Patches/../C_code.c:4504: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp223, - ldrb r2, [r2] @ *RandBitflags.190_15, *RandBitflags.190_15 - ands r3, r2 @ _19, *RandBitflags.190_15 -@ Patches/../C_code.c:4499: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.191_15, *RandBitflags.191_15 + ands r3, r2 @ _19, *RandBitflags.191_15 +@ Patches/../C_code.c:4504: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L2048 @, -@ Patches/../C_code.c:4503: if (player && (RandBitflags->growth == 3)) + beq .L2051 @, +@ Patches/../C_code.c:4508: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L2070 @, -.L2058: -@ Patches/../C_code.c:4507: if (unit->pClassData->growthDef > growth) + beq .L2073 @, +.L2061: +@ Patches/../C_code.c:4512: if (unit->pClassData->growthDef > growth) movs r0, #31 @ tmp225, ldr r3, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r3, r0] @ tmp225, -@ Patches/../C_code.c:4507: if (unit->pClassData->growthDef > growth) +@ Patches/../C_code.c:4512: if (unit->pClassData->growthDef > growth) cmp r0, r6 @ tmp225, baseGrowth - blt .L2085 @, -.L2059: -@ Patches/../C_code.c:4511: growth = AdjustGrowthForStatInflation(growth); + blt .L2088 @, +.L2062: +@ Patches/../C_code.c:4516: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4512: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4517: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4511: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4516: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp279 -@ Patches/../C_code.c:4512: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4517: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L2088+24 @ tmp231, + ldr r3, .L2091+24 @ tmp231, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4513: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4518: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp236, str r3, [sp, #8] @ tmp236, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp238, add r1, sp, #8 @ tmp292,, str r3, [sp] @ tmp238, @@ -14504,76 +14535,76 @@ GetUnitDefGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4515: if (result < (growth / 2)) +@ Patches/../C_code.c:4520: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp241, growth, adds r1, r1, r6 @ tmp242, tmp241, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp280 -@ Patches/../C_code.c:4515: if (result < (growth / 2)) +@ Patches/../C_code.c:4520: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp243, tmp242, -@ Patches/../C_code.c:4515: if (result < (growth / 2)) +@ Patches/../C_code.c:4520: if (result < (growth / 2)) cmp r1, r0 @ tmp243, result - ble .L2060 @, -@ Patches/../C_code.c:4517: result += HashByte_Global(growth, (growth / 2), noise, 59); + ble .L2063 @, +@ Patches/../C_code.c:4522: result += HashByte_Global(growth, (growth / 2), noise, 59); movs r3, #59 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp293,, bl HashByte_Global @ -@ Patches/../C_code.c:4517: result += HashByte_Global(growth, (growth / 2), noise, 59); +@ Patches/../C_code.c:4522: result += HashByte_Global(growth, (growth / 2), noise, 59); adds r4, r4, r0 @ result, result, tmp281 -.L2060: -@ Patches/../C_code.c:4519: if ((result - growth) > 99) +.L2063: +@ Patches/../C_code.c:4524: if ((result - growth) > 99) subs r3, r4, r6 @ tmp247, result, growth -@ Patches/../C_code.c:4519: if ((result - growth) > 99) +@ Patches/../C_code.c:4524: if ((result - growth) > 99) cmp r3, #99 @ tmp247, - bgt .L2086 @, -@ Patches/../C_code.c:4523: if ((growth - result) > 99) + bgt .L2089 @, +@ Patches/../C_code.c:4528: if ((growth - result) > 99) subs r3, r6, r4 @ tmp248, growth, result -@ Patches/../C_code.c:4523: if ((growth - result) > 99) +@ Patches/../C_code.c:4528: if ((growth - result) > 99) cmp r3, #99 @ tmp248, - ble .L2062 @, -@ Patches/../C_code.c:4525: result = growth - 99; + ble .L2065 @, +@ Patches/../C_code.c:4530: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L2062: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L2088+28 @ tmp249, +.L2065: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L2091+28 @ tmp249, ldr r3, [r3] @ pretmp_54, GrowthValues -@ Patches/../C_code.c:4527: result += add; +@ Patches/../C_code.c:4532: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_54, *pretmp_54 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L2087 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L2090 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp260, *pretmp_54, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp260, -.L2064: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L2067: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp263, bonus, adds r5, r5, r3 @ tmp264, tmp263, bonus lsls r5, r5, #1 @ bonus, tmp264, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L2065 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L2068 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp266, subs r5, r3, r5 @ bonus, tmp266, bonus -.L2065: -@ Patches/../C_code.c:4528: result += GetBonusGrowth(unit); +.L2068: +@ Patches/../C_code.c:4533: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4529: if (result < 0) +@ Patches/../C_code.c:4534: if (result < 0) mvns r3, r5 @ tmp270, asrs r3, r3, #31 @ tmp269, tmp270, ands r5, r3 @ , tmp269 - b .L2048 @ -.L2053: -@ Patches/../C_code.c:4486: return baseGrowth + add; + b .L2051 @ +.L2056: +@ Patches/../C_code.c:4491: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L2048: -@ Patches/../C_code.c:4534: } +.L2051: +@ Patches/../C_code.c:4539: } movs r0, r5 @, add sp, sp, #28 @,, @ sp needed @ @@ -14583,30 +14614,30 @@ GetUnitDefGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2086: -@ Patches/../C_code.c:4521: result = growth + 99; +.L2089: +@ Patches/../C_code.c:4526: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L2062 @ -.L2085: -@ Patches/../C_code.c:4507: if (unit->pClassData->growthDef > growth) + b .L2065 @ +.L2088: +@ Patches/../C_code.c:4512: if (unit->pClassData->growthDef > growth) movs r0, r6 @ tmp225, baseGrowth - b .L2059 @ -.L2087: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L2062 @ +.L2090: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_54, - b .L2064 @ -.L2070: -@ Patches/../C_code.c:4505: return 100; + b .L2067 @ +.L2073: +@ Patches/../C_code.c:4510: return 100; movs r5, #100 @ , - b .L2048 @ -.L2069: -@ Patches/../C_code.c:4497: return 50; + b .L2051 @ +.L2072: +@ Patches/../C_code.c:4502: return 50; movs r5, #50 @ , - b .L2048 @ -.L2089: + b .L2051 @ +.L2092: .align 2 -.L2088: +.L2091: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -14632,142 +14663,142 @@ GetUnitResGrowth: push {lr} @ movs r4, r0 @ unit, tmp278 movs r5, r1 @ modifiersBool, tmp279 -@ Patches/../C_code.c:4539: int add = 0; +@ Patches/../C_code.c:4544: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4537: { +@ Patches/../C_code.c:4542: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:4540: if (modifiersBool) +@ Patches/../C_code.c:4545: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L2091 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L2094 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4539: int add = 0; +@ Patches/../C_code.c:4544: int add = 0; asrs r3, r3, #31 @ tmp276, tmp173, adds r7, r7, #5 @ tmp277, ands r7, r3 @ add, tmp276 -.L2091: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2094: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4544: baseGrowth = GetReorderedUnit(unit)->growthRes; +@ Patches/../C_code.c:4549: baseGrowth = GetReorderedUnit(unit)->growthRes; movs r3, #33 @ tmp177, ldrb r6, [r0, r3] @ _1, -@ Patches/../C_code.c:4546: if (ClassBasedGrowths) - ldr r3, .L2130 @ tmp178, -@ Patches/../C_code.c:4546: if (ClassBasedGrowths) +@ Patches/../C_code.c:4551: if (ClassBasedGrowths) + ldr r3, .L2133 @ tmp178, +@ Patches/../C_code.c:4551: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths cmp r3, #0 @ ClassBasedGrowths, - beq .L2093 @, -@ Patches/../C_code.c:4548: baseGrowth = unit->pClassData->growthRes; + beq .L2096 @, +@ Patches/../C_code.c:4553: baseGrowth = unit->pClassData->growthRes; movs r3, #32 @ tmp181, ldr r2, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4548: baseGrowth = unit->pClassData->growthRes; +@ Patches/../C_code.c:4553: baseGrowth = unit->pClassData->growthRes; ldrsb r6, [r2, r3] @ baseGrowth, -.L2093: -@ Patches/../C_code.c:4550: if (CombinedGrowths) - ldr r3, .L2130+4 @ tmp182, -@ Patches/../C_code.c:4550: if (CombinedGrowths) +.L2096: +@ Patches/../C_code.c:4555: if (CombinedGrowths) + ldr r3, .L2133+4 @ tmp182, +@ Patches/../C_code.c:4555: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L2094 @, -@ Patches/../C_code.c:4552: baseGrowth += unit->pClassData->growthRes; + beq .L2097 @, +@ Patches/../C_code.c:4557: baseGrowth += unit->pClassData->growthRes; movs r3, #32 @ tmp185, ldr r2, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r3, [r2, r3] @ tmp186, -@ Patches/../C_code.c:4552: baseGrowth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4557: baseGrowth += unit->pClassData->growthRes; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp186 -.L2094: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L2130+8 @ tmp271, +.L2097: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L2133+8 @ tmp271, mov r8, r3 @ tmp271, tmp271 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_74, *RandBitflags.63_74 - ldr r3, .L2130+12 @ tmp191, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_74, tmp191 - beq .L2095 @, -@ Patches/../C_code.c:4545: int originalGrowth = unit->pCharacterData->growthRes; + ldr r2, [r3] @ *RandBitflags.64_74, *RandBitflags.64_74 + ldr r3, .L2133+12 @ tmp191, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_74, tmp191 + beq .L2098 @, +@ Patches/../C_code.c:4550: int originalGrowth = unit->pCharacterData->growthRes; ldr r1, [r4] @ _2, unit_45(D)->pCharacterData -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r2, [r1, #4] @ tmp193, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L2130+16 @ tmp192, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L2133+16 @ tmp192, lsls r2, r2, #1 @ tmp194, tmp193, -@ Patches/../C_code.c:4554: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4559: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp196, CharExceptions -@ Patches/../C_code.c:4554: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4559: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp196, - bne .L2095 @, + bne .L2098 @, cmp r5, #0 @ modifiersBool, - beq .L2095 @, -@ Patches/../C_code.c:4545: int originalGrowth = unit->pCharacterData->growthRes; + beq .L2098 @, +@ Patches/../C_code.c:4550: int originalGrowth = unit->pCharacterData->growthRes; movs r3, #33 @ tmp206, -@ Patches/../C_code.c:4558: int growth = CallGet_Res_Growth(unit); +@ Patches/../C_code.c:4563: int growth = CallGet_Res_Growth(unit); movs r0, r4 @, unit -@ Patches/../C_code.c:4545: int originalGrowth = unit->pCharacterData->growthRes; +@ Patches/../C_code.c:4550: int originalGrowth = unit->pCharacterData->growthRes; ldrb r5, [r1, r3] @ _3, -@ Patches/../C_code.c:4558: int growth = CallGet_Res_Growth(unit); - ldr r3, .L2130+20 @ tmp207, +@ Patches/../C_code.c:4563: int growth = CallGet_Res_Growth(unit); + ldr r3, .L2133+20 @ tmp207, bl .L14 @ -@ Patches/../C_code.c:4559: if (growth != (-1)) +@ Patches/../C_code.c:4564: if (growth != (-1)) adds r3, r0, #1 @ tmp285, growth, - beq .L2099 @, -@ Patches/../C_code.c:4561: add = growth - originalGrowth; + beq .L2102 @, +@ Patches/../C_code.c:4566: add = growth - originalGrowth; subs r7, r0, r5 @ add, growth, _3 -.L2099: -@ Patches/../C_code.c:4564: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L2102: +@ Patches/../C_code.c:4569: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp209, movs r3, #11 @ tmp208, movs r5, r2 @ , tmp209 ldrsb r3, [r4, r3] @ tmp208, ands r5, r3 @ , tmp208 -@ Patches/../C_code.c:4565: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4570: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp209, tmp208 - bne .L2100 @, -@ Patches/../C_code.c:4565: if (player && (RandBitflags->grow50 == 1)) + bne .L2103 @, +@ Patches/../C_code.c:4570: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp271, tmp271 - ldr r2, [r3] @ RandBitflags.195_15, RandBitflags -@ Patches/../C_code.c:4565: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.195_15, *RandBitflags.195_15 -@ Patches/../C_code.c:4565: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp286, *RandBitflags.195_15, - bmi .L2111 @, -@ Patches/../C_code.c:4569: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.196_15, RandBitflags +@ Patches/../C_code.c:4570: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.196_15, *RandBitflags.196_15 +@ Patches/../C_code.c:4570: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp286, *RandBitflags.196_15, + bmi .L2114 @, +@ Patches/../C_code.c:4574: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp225, - ldrb r2, [r2] @ *RandBitflags.195_15, *RandBitflags.195_15 - ands r3, r2 @ _19, *RandBitflags.195_15 -@ Patches/../C_code.c:4569: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.196_15, *RandBitflags.196_15 + ands r3, r2 @ _19, *RandBitflags.196_15 +@ Patches/../C_code.c:4574: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L2090 @, -@ Patches/../C_code.c:4573: if (player && (RandBitflags->growth == 3)) + beq .L2093 @, +@ Patches/../C_code.c:4578: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L2112 @, -.L2100: -@ Patches/../C_code.c:4577: if (unit->pClassData->growthRes > growth) + beq .L2115 @, +.L2103: +@ Patches/../C_code.c:4582: if (unit->pClassData->growthRes > growth) movs r3, #32 @ tmp229, ldr r2, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r2, r3] @ tmp227, -@ Patches/../C_code.c:4577: if (unit->pClassData->growthRes > growth) +@ Patches/../C_code.c:4582: if (unit->pClassData->growthRes > growth) cmp r0, r6 @ tmp227, baseGrowth - blt .L2127 @, -.L2101: -@ Patches/../C_code.c:4581: growth = AdjustGrowthForStatInflation(growth); + blt .L2130 @, +.L2104: +@ Patches/../C_code.c:4586: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4582: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4587: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4581: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4586: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp282 -@ Patches/../C_code.c:4582: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4587: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L2130+24 @ tmp234, + ldr r3, .L2133+24 @ tmp234, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4583: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4588: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp239, str r3, [sp, #8] @ tmp239, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp241, add r1, sp, #8 @ tmp293,, str r3, [sp] @ tmp241, @@ -14775,76 +14806,76 @@ GetUnitResGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4585: if (result < (growth / 2)) +@ Patches/../C_code.c:4590: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp244, growth, adds r1, r1, r6 @ tmp245, tmp244, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp283 -@ Patches/../C_code.c:4585: if (result < (growth / 2)) +@ Patches/../C_code.c:4590: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp246, tmp245, -@ Patches/../C_code.c:4585: if (result < (growth / 2)) +@ Patches/../C_code.c:4590: if (result < (growth / 2)) cmp r1, r0 @ tmp246, result - ble .L2102 @, -@ Patches/../C_code.c:4587: result += HashByte_Global(growth, (growth / 2), noise, 69); + ble .L2105 @, +@ Patches/../C_code.c:4592: result += HashByte_Global(growth, (growth / 2), noise, 69); movs r3, #69 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp294,, bl HashByte_Global @ -@ Patches/../C_code.c:4587: result += HashByte_Global(growth, (growth / 2), noise, 69); +@ Patches/../C_code.c:4592: result += HashByte_Global(growth, (growth / 2), noise, 69); adds r4, r4, r0 @ result, result, tmp284 -.L2102: -@ Patches/../C_code.c:4589: if ((result - growth) > 99) +.L2105: +@ Patches/../C_code.c:4594: if ((result - growth) > 99) subs r3, r4, r6 @ tmp250, result, growth -@ Patches/../C_code.c:4589: if ((result - growth) > 99) +@ Patches/../C_code.c:4594: if ((result - growth) > 99) cmp r3, #99 @ tmp250, - bgt .L2128 @, -@ Patches/../C_code.c:4593: if ((growth - result) > 99) + bgt .L2131 @, +@ Patches/../C_code.c:4598: if ((growth - result) > 99) subs r3, r6, r4 @ tmp251, growth, result -@ Patches/../C_code.c:4593: if ((growth - result) > 99) +@ Patches/../C_code.c:4598: if ((growth - result) > 99) cmp r3, #99 @ tmp251, - ble .L2104 @, -@ Patches/../C_code.c:4595: result = growth - 99; + ble .L2107 @, +@ Patches/../C_code.c:4600: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L2104: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L2130+28 @ tmp252, +.L2107: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L2133+28 @ tmp252, ldr r3, [r3] @ pretmp_55, GrowthValues -@ Patches/../C_code.c:4597: result += add; +@ Patches/../C_code.c:4602: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_55, *pretmp_55 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L2129 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L2132 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp263, *pretmp_55, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp263, -.L2106: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L2109: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp266, bonus, adds r5, r5, r3 @ tmp267, tmp266, bonus lsls r5, r5, #1 @ bonus, tmp267, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L2107 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L2110 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp269, subs r5, r3, r5 @ bonus, tmp269, bonus -.L2107: -@ Patches/../C_code.c:4598: result += GetBonusGrowth(unit); +.L2110: +@ Patches/../C_code.c:4603: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4599: if (result < 0) +@ Patches/../C_code.c:4604: if (result < 0) mvns r3, r5 @ tmp273, asrs r3, r3, #31 @ tmp272, tmp273, ands r5, r3 @ , tmp272 - b .L2090 @ -.L2095: -@ Patches/../C_code.c:4556: return baseGrowth + add; + b .L2093 @ +.L2098: +@ Patches/../C_code.c:4561: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L2090: -@ Patches/../C_code.c:4604: } +.L2093: +@ Patches/../C_code.c:4609: } movs r0, r5 @, add sp, sp, #24 @,, @ sp needed @ @@ -14853,30 +14884,30 @@ GetUnitResGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2128: -@ Patches/../C_code.c:4591: result = growth + 99; +.L2131: +@ Patches/../C_code.c:4596: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L2104 @ -.L2127: -@ Patches/../C_code.c:4577: if (unit->pClassData->growthRes > growth) + b .L2107 @ +.L2130: +@ Patches/../C_code.c:4582: if (unit->pClassData->growthRes > growth) movs r0, r6 @ tmp227, baseGrowth - b .L2101 @ -.L2129: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L2104 @ +.L2132: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_55, - b .L2106 @ -.L2112: -@ Patches/../C_code.c:4575: return 100; + b .L2109 @ +.L2115: +@ Patches/../C_code.c:4580: return 100; movs r5, #100 @ , - b .L2090 @ -.L2111: -@ Patches/../C_code.c:4567: return 50; + b .L2093 @ +.L2114: +@ Patches/../C_code.c:4572: return 50; movs r5, #50 @ , - b .L2090 @ -.L2131: + b .L2093 @ +.L2134: .align 2 -.L2130: +.L2133: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -14902,142 +14933,142 @@ GetUnitLckGrowth: push {lr} @ movs r4, r0 @ unit, tmp278 movs r5, r1 @ modifiersBool, tmp279 -@ Patches/../C_code.c:4609: int add = 0; +@ Patches/../C_code.c:4614: int add = 0; movs r7, #0 @ add, -@ Patches/../C_code.c:4607: { +@ Patches/../C_code.c:4612: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:4610: if (modifiersBool) +@ Patches/../C_code.c:4615: if (modifiersBool) cmp r1, #0 @ modifiersBool, - beq .L2133 @, -@ Patches/../C_code.c:3744: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; + beq .L2136 @, +@ Patches/../C_code.c:3749: return (unit->state & US_GROWTH_BOOST) ? 5 : 0; ldr r3, [r0, #12] @ unit_45(D)->state, unit_45(D)->state lsls r3, r3, #18 @ tmp173, unit_45(D)->state, -@ Patches/../C_code.c:4609: int add = 0; +@ Patches/../C_code.c:4614: int add = 0; asrs r3, r3, #31 @ tmp276, tmp173, adds r7, r7, #5 @ tmp277, ands r7, r3 @ add, tmp276 -.L2133: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2136: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4614: baseGrowth = GetReorderedUnit(unit)->growthLck; +@ Patches/../C_code.c:4619: baseGrowth = GetReorderedUnit(unit)->growthLck; movs r3, #34 @ tmp177, ldrb r6, [r0, r3] @ _1, -@ Patches/../C_code.c:4616: if (ClassBasedGrowths) - ldr r3, .L2172 @ tmp178, -@ Patches/../C_code.c:4616: if (ClassBasedGrowths) +@ Patches/../C_code.c:4621: if (ClassBasedGrowths) + ldr r3, .L2175 @ tmp178, +@ Patches/../C_code.c:4621: if (ClassBasedGrowths) ldr r3, [r3] @ ClassBasedGrowths, ClassBasedGrowths cmp r3, #0 @ ClassBasedGrowths, - beq .L2135 @, -@ Patches/../C_code.c:4618: baseGrowth = unit->pClassData->growthLck; + beq .L2138 @, +@ Patches/../C_code.c:4623: baseGrowth = unit->pClassData->growthLck; movs r3, #33 @ tmp181, ldr r2, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData -@ Patches/../C_code.c:4618: baseGrowth = unit->pClassData->growthLck; +@ Patches/../C_code.c:4623: baseGrowth = unit->pClassData->growthLck; ldrsb r6, [r2, r3] @ baseGrowth, -.L2135: -@ Patches/../C_code.c:4620: if (CombinedGrowths) - ldr r3, .L2172+4 @ tmp182, -@ Patches/../C_code.c:4620: if (CombinedGrowths) +.L2138: +@ Patches/../C_code.c:4625: if (CombinedGrowths) + ldr r3, .L2175+4 @ tmp182, +@ Patches/../C_code.c:4625: if (CombinedGrowths) ldr r3, [r3] @ CombinedGrowths, CombinedGrowths cmp r3, #0 @ CombinedGrowths, - beq .L2136 @, -@ Patches/../C_code.c:4622: baseGrowth += unit->pClassData->growthLck; + beq .L2139 @, +@ Patches/../C_code.c:4627: baseGrowth += unit->pClassData->growthLck; movs r3, #33 @ tmp185, ldr r2, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r3, [r2, r3] @ tmp186, -@ Patches/../C_code.c:4622: baseGrowth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4627: baseGrowth += unit->pClassData->growthLck; adds r6, r6, r3 @ baseGrowth, baseGrowth, tmp186 -.L2136: -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - ldr r3, .L2172+8 @ tmp271, +.L2139: +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + ldr r3, .L2175+8 @ tmp271, mov r8, r3 @ tmp271, tmp271 ldr r3, [r3] @ RandBitflags, RandBitflags - ldr r2, [r3] @ *RandBitflags.63_74, *RandBitflags.63_74 - ldr r3, .L2172+12 @ tmp191, -@ Patches/../C_code.c:1973: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) - tst r2, r3 @ *RandBitflags.63_74, tmp191 - beq .L2137 @, -@ Patches/../C_code.c:4615: int originalGrowth = unit->pCharacterData->growthLck; + ldr r2, [r3] @ *RandBitflags.64_74, *RandBitflags.64_74 + ldr r3, .L2175+12 @ tmp191, +@ Patches/../C_code.c:1978: if ((!RandBitflags->growth) && (!RandBitflags->grow50)) + tst r2, r3 @ *RandBitflags.64_74, tmp191 + beq .L2140 @, +@ Patches/../C_code.c:4620: int originalGrowth = unit->pCharacterData->growthLck; ldr r1, [r4] @ _2, unit_45(D)->pCharacterData -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldrb r2, [r1, #4] @ tmp193, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L2172+16 @ tmp192, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L2175+16 @ tmp192, lsls r2, r2, #1 @ tmp194, tmp193, -@ Patches/../C_code.c:4624: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4629: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) ldrb r3, [r2, r3] @ tmp196, CharExceptions -@ Patches/../C_code.c:4624: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) +@ Patches/../C_code.c:4629: if ((!ShouldRandomizeGrowth(unit)) || (!modifiersBool)) cmp r3, #0 @ tmp196, - bne .L2137 @, + bne .L2140 @, cmp r5, #0 @ modifiersBool, - beq .L2137 @, -@ Patches/../C_code.c:4615: int originalGrowth = unit->pCharacterData->growthLck; + beq .L2140 @, +@ Patches/../C_code.c:4620: int originalGrowth = unit->pCharacterData->growthLck; movs r3, #34 @ tmp206, -@ Patches/../C_code.c:4628: int growth = CallGet_Luk_Growth(unit); +@ Patches/../C_code.c:4633: int growth = CallGet_Luk_Growth(unit); movs r0, r4 @, unit -@ Patches/../C_code.c:4615: int originalGrowth = unit->pCharacterData->growthLck; +@ Patches/../C_code.c:4620: int originalGrowth = unit->pCharacterData->growthLck; ldrb r5, [r1, r3] @ _3, -@ Patches/../C_code.c:4628: int growth = CallGet_Luk_Growth(unit); - ldr r3, .L2172+20 @ tmp207, +@ Patches/../C_code.c:4633: int growth = CallGet_Luk_Growth(unit); + ldr r3, .L2175+20 @ tmp207, bl .L14 @ -@ Patches/../C_code.c:4629: if (growth != (-1)) +@ Patches/../C_code.c:4634: if (growth != (-1)) adds r3, r0, #1 @ tmp285, growth, - beq .L2141 @, -@ Patches/../C_code.c:4631: add = growth - originalGrowth; + beq .L2144 @, +@ Patches/../C_code.c:4636: add = growth - originalGrowth; subs r7, r0, r5 @ add, growth, _3 -.L2141: -@ Patches/../C_code.c:4634: int player = (UNIT_FACTION(unit) == FACTION_BLUE); +.L2144: +@ Patches/../C_code.c:4639: int player = (UNIT_FACTION(unit) == FACTION_BLUE); movs r2, #192 @ tmp209, movs r3, #11 @ tmp208, movs r5, r2 @ , tmp209 ldrsb r3, [r4, r3] @ tmp208, ands r5, r3 @ , tmp208 -@ Patches/../C_code.c:4635: if (player && (RandBitflags->grow50 == 1)) +@ Patches/../C_code.c:4640: if (player && (RandBitflags->grow50 == 1)) tst r2, r3 @ tmp209, tmp208 - bne .L2142 @, -@ Patches/../C_code.c:4635: if (player && (RandBitflags->grow50 == 1)) + bne .L2145 @, +@ Patches/../C_code.c:4640: if (player && (RandBitflags->grow50 == 1)) mov r3, r8 @ tmp271, tmp271 - ldr r2, [r3] @ RandBitflags.200_15, RandBitflags -@ Patches/../C_code.c:4635: if (player && (RandBitflags->grow50 == 1)) - ldrb r3, [r2, #3] @ *RandBitflags.200_15, *RandBitflags.200_15 -@ Patches/../C_code.c:4635: if (player && (RandBitflags->grow50 == 1)) - lsls r3, r3, #27 @ tmp286, *RandBitflags.200_15, - bmi .L2153 @, -@ Patches/../C_code.c:4639: if (player && (RandBitflags->growth == 2)) + ldr r2, [r3] @ RandBitflags.201_15, RandBitflags +@ Patches/../C_code.c:4640: if (player && (RandBitflags->grow50 == 1)) + ldrb r3, [r2, #3] @ *RandBitflags.201_15, *RandBitflags.201_15 +@ Patches/../C_code.c:4640: if (player && (RandBitflags->grow50 == 1)) + lsls r3, r3, #27 @ tmp286, *RandBitflags.201_15, + bmi .L2156 @, +@ Patches/../C_code.c:4644: if (player && (RandBitflags->growth == 2)) movs r3, #12 @ tmp225, - ldrb r2, [r2] @ *RandBitflags.200_15, *RandBitflags.200_15 - ands r3, r2 @ _19, *RandBitflags.200_15 -@ Patches/../C_code.c:4639: if (player && (RandBitflags->growth == 2)) + ldrb r2, [r2] @ *RandBitflags.201_15, *RandBitflags.201_15 + ands r3, r2 @ _19, *RandBitflags.201_15 +@ Patches/../C_code.c:4644: if (player && (RandBitflags->growth == 2)) cmp r3, #8 @ _19, - beq .L2132 @, -@ Patches/../C_code.c:4643: if (player && (RandBitflags->growth == 3)) + beq .L2135 @, +@ Patches/../C_code.c:4648: if (player && (RandBitflags->growth == 3)) cmp r3, #12 @ _19, - beq .L2154 @, -.L2142: -@ Patches/../C_code.c:4647: if (unit->pClassData->growthLck > growth) + beq .L2157 @, +.L2145: +@ Patches/../C_code.c:4652: if (unit->pClassData->growthLck > growth) movs r3, #33 @ tmp229, ldr r2, [r4, #4] @ unit_45(D)->pClassData, unit_45(D)->pClassData ldrsb r0, [r2, r3] @ tmp227, -@ Patches/../C_code.c:4647: if (unit->pClassData->growthLck > growth) +@ Patches/../C_code.c:4652: if (unit->pClassData->growthLck > growth) cmp r0, r6 @ tmp227, baseGrowth - blt .L2169 @, -.L2143: -@ Patches/../C_code.c:4651: growth = AdjustGrowthForStatInflation(growth); + blt .L2172 @, +.L2146: +@ Patches/../C_code.c:4656: growth = AdjustGrowthForStatInflation(growth); bl AdjustGrowthForStatInflation @ -@ Patches/../C_code.c:4652: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4657: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, -@ Patches/../C_code.c:4651: growth = AdjustGrowthForStatInflation(growth); +@ Patches/../C_code.c:4656: growth = AdjustGrowthForStatInflation(growth); movs r6, r0 @ growth, tmp282 -@ Patches/../C_code.c:4652: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:4657: int noise[4] = { 0, 0, 0, 0 }; movs r1, #0 @, - ldr r3, .L2172+24 @ tmp234, + ldr r3, .L2175+24 @ tmp234, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:4653: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:4658: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_45(D)->pCharacterData, unit_45(D)->pCharacterData ldrb r3, [r3, #4] @ tmp239, str r3, [sp, #8] @ tmp239, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp241, add r1, sp, #8 @ tmp293,, str r3, [sp] @ tmp241, @@ -15045,76 +15076,76 @@ GetUnitLckGrowth: movs r0, r6 @, growth adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:4655: if (result < (growth / 2)) +@ Patches/../C_code.c:4660: if (result < (growth / 2)) lsrs r1, r6, #31 @ tmp244, growth, adds r1, r1, r6 @ tmp245, tmp244, growth -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp283 -@ Patches/../C_code.c:4655: if (result < (growth / 2)) +@ Patches/../C_code.c:4660: if (result < (growth / 2)) asrs r1, r1, #1 @ tmp246, tmp245, -@ Patches/../C_code.c:4655: if (result < (growth / 2)) +@ Patches/../C_code.c:4660: if (result < (growth / 2)) cmp r1, r0 @ tmp246, result - ble .L2144 @, -@ Patches/../C_code.c:4657: result += HashByte_Global(growth, (growth / 2), noise, 79); + ble .L2147 @, +@ Patches/../C_code.c:4662: result += HashByte_Global(growth, (growth / 2), noise, 79); movs r3, #79 @, movs r0, r6 @, growth add r2, sp, #8 @ tmp294,, bl HashByte_Global @ -@ Patches/../C_code.c:4657: result += HashByte_Global(growth, (growth / 2), noise, 79); +@ Patches/../C_code.c:4662: result += HashByte_Global(growth, (growth / 2), noise, 79); adds r4, r4, r0 @ result, result, tmp284 -.L2144: -@ Patches/../C_code.c:4659: if ((result - growth) > 99) +.L2147: +@ Patches/../C_code.c:4664: if ((result - growth) > 99) subs r3, r4, r6 @ tmp250, result, growth -@ Patches/../C_code.c:4659: if ((result - growth) > 99) +@ Patches/../C_code.c:4664: if ((result - growth) > 99) cmp r3, #99 @ tmp250, - bgt .L2170 @, -@ Patches/../C_code.c:4663: if ((growth - result) > 99) + bgt .L2173 @, +@ Patches/../C_code.c:4668: if ((growth - result) > 99) subs r3, r6, r4 @ tmp251, growth, result -@ Patches/../C_code.c:4663: if ((growth - result) > 99) +@ Patches/../C_code.c:4668: if ((growth - result) > 99) cmp r3, #99 @ tmp251, - ble .L2146 @, -@ Patches/../C_code.c:4665: result = growth - 99; + ble .L2149 @, +@ Patches/../C_code.c:4670: result = growth - 99; movs r4, r6 @ growth, growth subs r4, r4, #99 @ growth, -.L2146: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; - ldr r3, .L2172+28 @ tmp252, +.L2149: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; + ldr r3, .L2175+28 @ tmp252, ldr r3, [r3] @ pretmp_55, GrowthValues -@ Patches/../C_code.c:4667: result += add; +@ Patches/../C_code.c:4672: result += add; adds r7, r7, r4 @ result, add, result -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; ldrb r3, [r3] @ *pretmp_55, *pretmp_55 -@ Patches/../C_code.c:3751: if (allegiance == FACTION_RED) +@ Patches/../C_code.c:3756: if (allegiance == FACTION_RED) cmp r5, #128 @ , - beq .L2171 @, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; + beq .L2174 @, +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsls r3, r3, #28 @ tmp263, *pretmp_55, -@ Patches/../C_code.c:3757: bonus = GrowthValues->player; +@ Patches/../C_code.c:3762: bonus = GrowthValues->player; lsrs r3, r3, #28 @ bonus, tmp263, -.L2148: -@ Patches/../C_code.c:3759: bonus = bonus * 10; +.L2151: +@ Patches/../C_code.c:3764: bonus = bonus * 10; lsls r5, r3, #2 @ tmp266, bonus, adds r5, r5, r3 @ tmp267, tmp266, bonus lsls r5, r5, #1 @ bonus, tmp267, -@ Patches/../C_code.c:3760: if (bonus > 100) +@ Patches/../C_code.c:3765: if (bonus > 100) cmp r5, #100 @ bonus, - ble .L2149 @, -@ Patches/../C_code.c:3762: bonus = 100 - bonus; + ble .L2152 @, +@ Patches/../C_code.c:3767: bonus = 100 - bonus; movs r3, #100 @ tmp269, subs r5, r3, r5 @ bonus, tmp269, bonus -.L2149: -@ Patches/../C_code.c:4668: result += GetBonusGrowth(unit); +.L2152: +@ Patches/../C_code.c:4673: result += GetBonusGrowth(unit); adds r5, r7, r5 @ , result, bonus -@ Patches/../C_code.c:4669: if (result < 0) +@ Patches/../C_code.c:4674: if (result < 0) mvns r3, r5 @ tmp273, asrs r3, r3, #31 @ tmp272, tmp273, ands r5, r3 @ , tmp272 - b .L2132 @ -.L2137: -@ Patches/../C_code.c:4626: return baseGrowth + add; + b .L2135 @ +.L2140: +@ Patches/../C_code.c:4631: return baseGrowth + add; adds r5, r6, r7 @ , baseGrowth, add -.L2132: -@ Patches/../C_code.c:4674: } +.L2135: +@ Patches/../C_code.c:4679: } movs r0, r5 @, add sp, sp, #24 @,, @ sp needed @ @@ -15123,30 +15154,30 @@ GetUnitLckGrowth: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2170: -@ Patches/../C_code.c:4661: result = growth + 99; +.L2173: +@ Patches/../C_code.c:4666: result = growth + 99; movs r4, r6 @ growth, growth adds r4, r4, #99 @ growth, - b .L2146 @ -.L2169: -@ Patches/../C_code.c:4647: if (unit->pClassData->growthLck > growth) + b .L2149 @ +.L2172: +@ Patches/../C_code.c:4652: if (unit->pClassData->growthLck > growth) movs r0, r6 @ tmp227, baseGrowth - b .L2143 @ -.L2171: -@ Patches/../C_code.c:3753: bonus = GrowthValues->enemy; + b .L2146 @ +.L2174: +@ Patches/../C_code.c:3758: bonus = GrowthValues->enemy; lsrs r3, r3, #4 @ bonus, *pretmp_55, - b .L2148 @ -.L2154: -@ Patches/../C_code.c:4645: return 100; + b .L2151 @ +.L2157: +@ Patches/../C_code.c:4650: return 100; movs r5, #100 @ , - b .L2132 @ -.L2153: -@ Patches/../C_code.c:4637: return 50; + b .L2135 @ +.L2156: +@ Patches/../C_code.c:4642: return 50; movs r5, #50 @ , - b .L2132 @ -.L2173: + b .L2135 @ +.L2176: .align 2 -.L2172: +.L2175: .word ClassBasedGrowths .word CombinedGrowths .word RandBitflags @@ -15167,335 +15198,335 @@ UnitCheckStatMins: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:4684: if (MinClassBase) - ldr r3, .L2210 @ tmp209, -@ Patches/../C_code.c:4684: if (MinClassBase) +@ Patches/../C_code.c:4689: if (MinClassBase) + ldr r3, .L2213 @ tmp209, +@ Patches/../C_code.c:4689: if (MinClassBase) ldr r3, [r3] @ MinClassBase, MinClassBase -@ Patches/../C_code.c:4683: { +@ Patches/../C_code.c:4688: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:4683: { +@ Patches/../C_code.c:4688: { movs r4, r0 @ unit, tmp346 -@ Patches/../C_code.c:4684: if (MinClassBase) +@ Patches/../C_code.c:4689: if (MinClassBase) cmp r3, #0 @ MinClassBase, - bne .L2201 @, -@ Patches/../C_code.c:4755: if (unit->pow < 0) + bne .L2204 @, +@ Patches/../C_code.c:4760: if (unit->pow < 0) ldrb r2, [r0, #20] @ tmp269, cmp r2, #127 @ tmp269, - bhi .L2202 @, -@ Patches/../C_code.c:4759: if (unit->skl < 0) + bhi .L2205 @, +@ Patches/../C_code.c:4764: if (unit->skl < 0) ldrb r3, [r4, #21] @ tmp274, cmp r3, #127 @ tmp274, - bhi .L2203 @, -.L2193: -@ Patches/../C_code.c:4763: if (unit->spd < 0) + bhi .L2206 @, +.L2196: +@ Patches/../C_code.c:4768: if (unit->spd < 0) ldrb r3, [r4, #22] @ tmp279, cmp r3, #127 @ tmp279, - bhi .L2204 @, -.L2194: -@ Patches/../C_code.c:4767: if (unit->def < 0) + bhi .L2207 @, +.L2197: +@ Patches/../C_code.c:4772: if (unit->def < 0) ldrb r3, [r4, #23] @ tmp284, cmp r3, #127 @ tmp284, - bhi .L2205 @, -.L2195: -@ Patches/../C_code.c:4771: if (unit->res < 0) + bhi .L2208 @, +.L2198: +@ Patches/../C_code.c:4776: if (unit->res < 0) ldrb r3, [r4, #24] @ tmp289, cmp r3, #127 @ tmp289, - bhi .L2206 @, -.L2196: -@ Patches/../C_code.c:4775: if (unit->lck < 0) + bhi .L2209 @, +.L2199: +@ Patches/../C_code.c:4780: if (unit->lck < 0) ldrb r3, [r4, #25] @ tmp294, cmp r3, #127 @ tmp294, - bhi .L2207 @, -.L2197: -@ Patches/../C_code.c:4779: if (StrMagInstalled) - ldr r3, .L2210+4 @ tmp297, -@ Patches/../C_code.c:4779: if (StrMagInstalled) + bhi .L2210 @, +.L2200: +@ Patches/../C_code.c:4784: if (StrMagInstalled) + ldr r3, .L2213+4 @ tmp297, +@ Patches/../C_code.c:4784: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2174 @, -.L2209: -@ Patches/../C_code.c:4781: if ((unit->_u3A < 0) || (unit->_u3A > 127)) + beq .L2177 @, +.L2212: +@ Patches/../C_code.c:4786: if ((unit->_u3A < 0) || (unit->_u3A > 127)) movs r3, #58 @ tmp299, -@ Patches/../C_code.c:4781: if ((unit->_u3A < 0) || (unit->_u3A > 127)) +@ Patches/../C_code.c:4786: if ((unit->_u3A < 0) || (unit->_u3A > 127)) ldrb r2, [r4, r3] @ tmp302, cmp r2, #127 @ tmp302, - bls .LCB12880 @ - b .L2208 @long jump @ -.LCB12880: -.L2174: -@ Patches/../C_code.c:4787: } + bls .LCB12904 @ + b .L2211 @long jump @ +.LCB12904: +.L2177: +@ Patches/../C_code.c:4792: } @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L2207: -@ Patches/../C_code.c:4777: unit->lck = 0; +.L2210: +@ Patches/../C_code.c:4782: unit->lck = 0; movs r3, #0 @ tmp295, strb r3, [r4, #25] @ tmp295, unit_75(D)->lck -@ Patches/../C_code.c:4779: if (StrMagInstalled) - ldr r3, .L2210+4 @ tmp297, -@ Patches/../C_code.c:4779: if (StrMagInstalled) +@ Patches/../C_code.c:4784: if (StrMagInstalled) + ldr r3, .L2213+4 @ tmp297, +@ Patches/../C_code.c:4784: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2174 @, - b .L2209 @ -.L2206: -@ Patches/../C_code.c:4773: unit->res = 0; + beq .L2177 @, + b .L2212 @ +.L2209: +@ Patches/../C_code.c:4778: unit->res = 0; movs r3, #0 @ tmp290, strb r3, [r4, #24] @ tmp290, unit_75(D)->res -@ Patches/../C_code.c:4775: if (unit->lck < 0) +@ Patches/../C_code.c:4780: if (unit->lck < 0) ldrb r3, [r4, #25] @ tmp294, cmp r3, #127 @ tmp294, - bls .L2197 @, - b .L2207 @ -.L2205: -@ Patches/../C_code.c:4769: unit->def = 0; + bls .L2200 @, + b .L2210 @ +.L2208: +@ Patches/../C_code.c:4774: unit->def = 0; movs r3, #0 @ tmp285, strb r3, [r4, #23] @ tmp285, unit_75(D)->def -@ Patches/../C_code.c:4771: if (unit->res < 0) +@ Patches/../C_code.c:4776: if (unit->res < 0) ldrb r3, [r4, #24] @ tmp289, cmp r3, #127 @ tmp289, - bls .L2196 @, - b .L2206 @ -.L2204: -@ Patches/../C_code.c:4765: unit->spd = 0; + bls .L2199 @, + b .L2209 @ +.L2207: +@ Patches/../C_code.c:4770: unit->spd = 0; movs r3, #0 @ tmp280, strb r3, [r4, #22] @ tmp280, unit_75(D)->spd -@ Patches/../C_code.c:4767: if (unit->def < 0) +@ Patches/../C_code.c:4772: if (unit->def < 0) ldrb r3, [r4, #23] @ tmp284, cmp r3, #127 @ tmp284, - bls .L2195 @, - b .L2205 @ -.L2203: -@ Patches/../C_code.c:4761: unit->skl = 0; + bls .L2198 @, + b .L2208 @ +.L2206: +@ Patches/../C_code.c:4766: unit->skl = 0; movs r3, #0 @ tmp275, strb r3, [r4, #21] @ tmp275, unit_75(D)->skl -@ Patches/../C_code.c:4763: if (unit->spd < 0) +@ Patches/../C_code.c:4768: if (unit->spd < 0) ldrb r3, [r4, #22] @ tmp279, cmp r3, #127 @ tmp279, - bls .L2194 @, - b .L2204 @ -.L2202: -@ Patches/../C_code.c:4757: unit->pow = 0; + bls .L2197 @, + b .L2207 @ +.L2205: +@ Patches/../C_code.c:4762: unit->pow = 0; strb r3, [r0, #20] @ MinClassBase, unit_75(D)->pow -@ Patches/../C_code.c:4759: if (unit->skl < 0) +@ Patches/../C_code.c:4764: if (unit->skl < 0) ldrb r3, [r4, #21] @ tmp274, cmp r3, #127 @ tmp274, - bls .L2193 @, - b .L2203 @ -.L2201: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); + bls .L2196 @, + b .L2206 @ +.L2204: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r0] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4686: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; +@ Patches/../C_code.c:4691: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; movs r2, #13 @ tmp214, -@ Patches/../C_code.c:4686: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; +@ Patches/../C_code.c:4691: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; ldr r3, [r4, #4] @ unit_75(D)->pClassData, unit_75(D)->pClassData ldrb r3, [r3, #12] @ tmp213, -@ Patches/../C_code.c:4686: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; +@ Patches/../C_code.c:4691: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; ldrsb r2, [r0, r2] @ tmp214, -@ Patches/../C_code.c:4686: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; +@ Patches/../C_code.c:4691: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; lsls r3, r3, #24 @ tmp213, tmp213, asrs r3, r3, #24 @ tmp213, tmp213, -@ Patches/../C_code.c:4686: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; +@ Patches/../C_code.c:4691: int minStat = GetReorderedUnit(unit)->basePow + unit->pClassData->basePow; adds r3, r3, r2 @ _117, tmp213, tmp214 -@ Patches/../C_code.c:4687: if (minStat < 0) +@ Patches/../C_code.c:4692: if (minStat < 0) mvns r2, r3 @ tmp307, _117 asrs r2, r2, #31 @ tmp306, tmp307, ands r3, r2 @ _117, tmp306 -@ Patches/../C_code.c:4691: if (unit->pow < minStat) +@ Patches/../C_code.c:4696: if (unit->pow < minStat) movs r2, #20 @ tmp215, ldrsb r2, [r4, r2] @ tmp215, -@ Patches/../C_code.c:4691: if (unit->pow < minStat) +@ Patches/../C_code.c:4696: if (unit->pow < minStat) cmp r2, r3 @ tmp215, _117 - bge .L2177 @, -@ Patches/../C_code.c:4693: unit->pow = minStat; + bge .L2180 @, +@ Patches/../C_code.c:4698: unit->pow = minStat; strb r3, [r4, #20] @ _117, unit_75(D)->pow -.L2177: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2180: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4695: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; +@ Patches/../C_code.c:4700: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; movs r2, #14 @ tmp220, -@ Patches/../C_code.c:4695: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; +@ Patches/../C_code.c:4700: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; ldr r3, [r4, #4] @ unit_75(D)->pClassData, unit_75(D)->pClassData ldrb r3, [r3, #13] @ tmp219, -@ Patches/../C_code.c:4695: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; +@ Patches/../C_code.c:4700: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; ldrsb r2, [r0, r2] @ tmp220, -@ Patches/../C_code.c:4695: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; +@ Patches/../C_code.c:4700: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; lsls r3, r3, #24 @ tmp219, tmp219, asrs r3, r3, #24 @ tmp219, tmp219, -@ Patches/../C_code.c:4695: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; +@ Patches/../C_code.c:4700: minStat = GetReorderedUnit(unit)->baseSkl + unit->pClassData->baseSkl; adds r3, r3, r2 @ _87, tmp219, tmp220 -@ Patches/../C_code.c:4696: if (minStat < 0) +@ Patches/../C_code.c:4701: if (minStat < 0) mvns r2, r3 @ tmp309, _87 asrs r2, r2, #31 @ tmp308, tmp309, ands r3, r2 @ _87, tmp308 -@ Patches/../C_code.c:4700: if (unit->skl < minStat) +@ Patches/../C_code.c:4705: if (unit->skl < minStat) movs r2, #21 @ tmp221, ldrsb r2, [r4, r2] @ tmp221, -@ Patches/../C_code.c:4700: if (unit->skl < minStat) +@ Patches/../C_code.c:4705: if (unit->skl < minStat) cmp r2, r3 @ tmp221, _87 - bge .L2179 @, -@ Patches/../C_code.c:4702: unit->skl = minStat; + bge .L2182 @, +@ Patches/../C_code.c:4707: unit->skl = minStat; strb r3, [r4, #21] @ _87, unit_75(D)->skl -.L2179: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2182: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4704: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; +@ Patches/../C_code.c:4709: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; movs r2, #15 @ tmp226, -@ Patches/../C_code.c:4704: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; +@ Patches/../C_code.c:4709: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; ldr r3, [r4, #4] @ unit_75(D)->pClassData, unit_75(D)->pClassData ldrb r3, [r3, #14] @ tmp225, -@ Patches/../C_code.c:4704: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; +@ Patches/../C_code.c:4709: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; ldrsb r2, [r0, r2] @ tmp226, -@ Patches/../C_code.c:4704: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; +@ Patches/../C_code.c:4709: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; lsls r3, r3, #24 @ tmp225, tmp225, asrs r3, r3, #24 @ tmp225, tmp225, -@ Patches/../C_code.c:4704: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; +@ Patches/../C_code.c:4709: minStat = GetReorderedUnit(unit)->baseSpd + unit->pClassData->baseSpd; adds r3, r3, r2 @ _11, tmp225, tmp226 -@ Patches/../C_code.c:4705: if (minStat < 0) +@ Patches/../C_code.c:4710: if (minStat < 0) mvns r2, r3 @ tmp311, _11 asrs r2, r2, #31 @ tmp310, tmp311, ands r3, r2 @ _11, tmp310 -@ Patches/../C_code.c:4709: if (unit->spd < minStat) +@ Patches/../C_code.c:4714: if (unit->spd < minStat) movs r2, #22 @ tmp227, ldrsb r2, [r4, r2] @ tmp227, -@ Patches/../C_code.c:4709: if (unit->spd < minStat) +@ Patches/../C_code.c:4714: if (unit->spd < minStat) cmp r3, r2 @ _11, tmp227 - ble .L2181 @, -@ Patches/../C_code.c:4711: unit->spd = minStat; + ble .L2184 @, +@ Patches/../C_code.c:4716: unit->spd = minStat; strb r3, [r4, #22] @ _11, unit_75(D)->spd -.L2181: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2184: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4713: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; +@ Patches/../C_code.c:4718: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; movs r2, #16 @ tmp232, -@ Patches/../C_code.c:4713: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; +@ Patches/../C_code.c:4718: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; ldr r3, [r4, #4] @ unit_75(D)->pClassData, unit_75(D)->pClassData ldrb r3, [r3, #15] @ tmp231, -@ Patches/../C_code.c:4713: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; +@ Patches/../C_code.c:4718: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; ldrsb r2, [r0, r2] @ tmp232, -@ Patches/../C_code.c:4713: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; +@ Patches/../C_code.c:4718: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; lsls r3, r3, #24 @ tmp231, tmp231, asrs r3, r3, #24 @ tmp231, tmp231, -@ Patches/../C_code.c:4713: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; +@ Patches/../C_code.c:4718: minStat = GetReorderedUnit(unit)->baseDef + unit->pClassData->baseDef; adds r3, r3, r2 @ _115, tmp231, tmp232 -@ Patches/../C_code.c:4714: if (minStat < 0) +@ Patches/../C_code.c:4719: if (minStat < 0) mvns r2, r3 @ tmp313, _115 asrs r2, r2, #31 @ tmp312, tmp313, ands r3, r2 @ _115, tmp312 -@ Patches/../C_code.c:4718: if (unit->def < minStat) +@ Patches/../C_code.c:4723: if (unit->def < minStat) movs r2, #23 @ tmp233, ldrsb r2, [r4, r2] @ tmp233, -@ Patches/../C_code.c:4718: if (unit->def < minStat) +@ Patches/../C_code.c:4723: if (unit->def < minStat) cmp r2, r3 @ tmp233, _115 - bge .L2183 @, -@ Patches/../C_code.c:4720: unit->def = minStat; + bge .L2186 @, +@ Patches/../C_code.c:4725: unit->def = minStat; strb r3, [r4, #23] @ _115, unit_75(D)->def -.L2183: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2186: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4722: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; +@ Patches/../C_code.c:4727: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; movs r2, #17 @ tmp238, -@ Patches/../C_code.c:4722: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; +@ Patches/../C_code.c:4727: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; ldr r3, [r4, #4] @ unit_75(D)->pClassData, unit_75(D)->pClassData ldrb r3, [r3, #16] @ tmp237, -@ Patches/../C_code.c:4722: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; +@ Patches/../C_code.c:4727: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; ldrsb r2, [r0, r2] @ tmp238, -@ Patches/../C_code.c:4722: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; +@ Patches/../C_code.c:4727: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; lsls r3, r3, #24 @ tmp237, tmp237, asrs r3, r3, #24 @ tmp237, tmp237, -@ Patches/../C_code.c:4722: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; +@ Patches/../C_code.c:4727: minStat = GetReorderedUnit(unit)->baseRes + unit->pClassData->baseRes; adds r3, r3, r2 @ _84, tmp237, tmp238 -@ Patches/../C_code.c:4723: if (minStat < 0) +@ Patches/../C_code.c:4728: if (minStat < 0) mvns r2, r3 @ tmp315, _84 asrs r2, r2, #31 @ tmp314, tmp315, ands r3, r2 @ _84, tmp314 -@ Patches/../C_code.c:4727: if (unit->res < minStat) +@ Patches/../C_code.c:4732: if (unit->res < minStat) movs r2, #24 @ tmp239, ldrsb r2, [r4, r2] @ tmp239, -@ Patches/../C_code.c:4727: if (unit->res < minStat) +@ Patches/../C_code.c:4732: if (unit->res < minStat) cmp r2, r3 @ tmp239, _84 - bge .L2185 @, -@ Patches/../C_code.c:4729: unit->res = minStat; + bge .L2188 @, +@ Patches/../C_code.c:4734: unit->res = minStat; strb r3, [r4, #24] @ _84, unit_75(D)->res -.L2185: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); +.L2188: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData bl GetReorderedCharacter @ -@ Patches/../C_code.c:4731: minStat = GetReorderedUnit(unit)->baseLck; +@ Patches/../C_code.c:4736: minStat = GetReorderedUnit(unit)->baseLck; movs r2, #18 @ _44, ldrsb r2, [r0, r2] @ _44,* _44 -@ Patches/../C_code.c:4736: if (unit->lck < minStat) +@ Patches/../C_code.c:4741: if (unit->lck < minStat) movs r1, #25 @ tmp243, -@ Patches/../C_code.c:4732: if (minStat < 0) +@ Patches/../C_code.c:4737: if (minStat < 0) mvns r3, r2 @ tmp317, _44 -@ Patches/../C_code.c:4736: if (unit->lck < minStat) +@ Patches/../C_code.c:4741: if (unit->lck < minStat) ldrsb r1, [r4, r1] @ tmp243, -@ Patches/../C_code.c:4732: if (minStat < 0) +@ Patches/../C_code.c:4737: if (minStat < 0) asrs r3, r3, #31 @ tmp316, tmp317, ands r3, r2 @ minStat, _44 -@ Patches/../C_code.c:4736: if (unit->lck < minStat) +@ Patches/../C_code.c:4741: if (unit->lck < minStat) cmp r3, r1 @ minStat, tmp243 - ble .L2186 @, -@ Patches/../C_code.c:4738: unit->lck = minStat; + ble .L2189 @, +@ Patches/../C_code.c:4743: unit->lck = minStat; mvns r3, r2 @ tmp319, _44 asrs r3, r3, #31 @ tmp323, tmp319, ands r3, r2 @ tmp322, _44 strb r3, [r4, #25] @ tmp322, unit_75(D)->lck -.L2186: -@ Patches/../C_code.c:4740: if (StrMagInstalled) - ldr r3, .L2210+4 @ tmp251, -@ Patches/../C_code.c:4740: if (StrMagInstalled) +.L2189: +@ Patches/../C_code.c:4745: if (StrMagInstalled) + ldr r3, .L2213+4 @ tmp251, +@ Patches/../C_code.c:4745: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - bne .LCB13070 @ - b .L2174 @long jump @ -.LCB13070: -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + bne .LCB13094 @ + b .L2177 @long jump @ +.LCB13094: +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldr r2, [r4, #4] @ unit_75(D)->pClassData, unit_75(D)->pClassData ldrb r2, [r2, #4] @ tmp255, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; - ldr r3, .L2210+8 @ tmp253, +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + ldr r3, .L2213+8 @ tmp253, lsls r2, r2, #2 @ tmp256, tmp255, -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldr r0, [r4] @ unit_75(D)->pCharacterData, unit_75(D)->pCharacterData -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldrb r5, [r2, r3] @ _124, MagClassTable -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; bl GetReorderedCharacter @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldrb r2, [r0, #4] @ tmp259, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; - ldr r3, .L2210+12 @ tmp258, +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + ldr r3, .L2213+12 @ tmp258, lsls r2, r2, #1 @ tmp260, tmp259, ldrb r3, [r2, r3] @ _130, MagCharTable -@ Patches/../C_code.c:4747: if (unit->_u3A < minStat) +@ Patches/../C_code.c:4752: if (unit->_u3A < minStat) movs r2, #58 @ tmp261, ldrb r1, [r4, r2] @ tmp262, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; adds r3, r5, r3 @ tmp263, _124, _130 -@ Patches/../C_code.c:4747: if (unit->_u3A < minStat) +@ Patches/../C_code.c:4752: if (unit->_u3A < minStat) cmp r1, r3 @ tmp262, tmp263 - blt .LCB13087 @ - b .L2174 @long jump @ -.LCB13087: -@ Patches/../C_code.c:4749: unit->_u3A = minStat; + blt .LCB13111 @ + b .L2177 @long jump @ +.LCB13111: +@ Patches/../C_code.c:4754: unit->_u3A = minStat; strb r3, [r4, r2] @ tmp263, unit_75(D)->_u3A - b .L2174 @ -.L2208: -@ Patches/../C_code.c:4783: unit->_u3A = 0; + b .L2177 @ +.L2211: +@ Patches/../C_code.c:4788: unit->_u3A = 0; movs r2, #0 @ tmp304, strb r2, [r4, r3] @ tmp304, unit_75(D)->_u3A -@ Patches/../C_code.c:4787: } - b .L2174 @ -.L2211: +@ Patches/../C_code.c:4792: } + b .L2177 @ +.L2214: .align 2 -.L2210: +.L2213: .word MinClassBase .word StrMagInstalled .word MagClassTable @@ -15513,141 +15544,141 @@ MakePromotedUnitHaveMinStats: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:4792: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) +@ Patches/../C_code.c:4797: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) ldr r3, [r0] @ unit_10(D)->pCharacterData, unit_10(D)->pCharacterData ldr r2, [r0, #4] @ unit_10(D)->pClassData, unit_10(D)->pClassData ldr r3, [r3, #40] @ _1->attributes, _1->attributes ldr r2, [r2, #40] @ _3->attributes, _3->attributes orrs r3, r2 @ tmp151, _3->attributes -@ Patches/../C_code.c:4792: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) +@ Patches/../C_code.c:4797: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) lsls r3, r3, #23 @ tmp212, tmp151, - bpl .L2212 @, -@ Patches/../C_code.c:4794: if (unit->pow < (MinPromotedStat + 2)) + bpl .L2215 @, +@ Patches/../C_code.c:4799: if (unit->pow < (MinPromotedStat + 2)) movs r3, #20 @ _11, ldrsb r3, [r0, r3] @ _11,* _11 -@ Patches/../C_code.c:4794: if (unit->pow < (MinPromotedStat + 2)) +@ Patches/../C_code.c:4799: if (unit->pow < (MinPromotedStat + 2)) cmp r3, #3 @ _11, - bgt .L2215 @, -@ Patches/../C_code.c:4796: unit->pow += MinPromotedStat; + bgt .L2218 @, +@ Patches/../C_code.c:4801: unit->pow += MinPromotedStat; adds r3, r3, #2 @ tmp159, strb r3, [r0, #20] @ tmp159, unit_10(D)->pow -.L2215: -@ Patches/../C_code.c:4798: if (unit->skl < MinPromotedStat) +.L2218: +@ Patches/../C_code.c:4803: if (unit->skl < MinPromotedStat) movs r3, #21 @ _15, ldrsb r3, [r0, r3] @ _15,* _15 -@ Patches/../C_code.c:4798: if (unit->skl < MinPromotedStat) +@ Patches/../C_code.c:4803: if (unit->skl < MinPromotedStat) cmp r3, #1 @ _15, - ble .L2226 @, -@ Patches/../C_code.c:4802: if (unit->spd < MinPromotedStat) + ble .L2229 @, +@ Patches/../C_code.c:4807: if (unit->spd < MinPromotedStat) movs r3, #22 @ _19, ldrsb r3, [r0, r3] @ _19,* _19 -@ Patches/../C_code.c:4802: if (unit->spd < MinPromotedStat) +@ Patches/../C_code.c:4807: if (unit->spd < MinPromotedStat) cmp r3, #1 @ _19, - ble .L2227 @, -.L2217: -@ Patches/../C_code.c:4806: if (unit->def < MinPromotedStat) + ble .L2230 @, +.L2220: +@ Patches/../C_code.c:4811: if (unit->def < MinPromotedStat) movs r3, #23 @ _23, ldrsb r3, [r0, r3] @ _23,* _23 -@ Patches/../C_code.c:4806: if (unit->def < MinPromotedStat) +@ Patches/../C_code.c:4811: if (unit->def < MinPromotedStat) cmp r3, #1 @ _23, - ble .L2228 @, -.L2218: -@ Patches/../C_code.c:4810: if (unit->res < MinPromotedStat) + ble .L2231 @, +.L2221: +@ Patches/../C_code.c:4815: if (unit->res < MinPromotedStat) movs r3, #24 @ _27, ldrsb r3, [r0, r3] @ _27,* _27 -@ Patches/../C_code.c:4810: if (unit->res < MinPromotedStat) +@ Patches/../C_code.c:4815: if (unit->res < MinPromotedStat) cmp r3, #1 @ _27, - ble .L2229 @, -.L2219: -@ Patches/../C_code.c:4814: if (unit->lck < MinPromotedStat) + ble .L2232 @, +.L2222: +@ Patches/../C_code.c:4819: if (unit->lck < MinPromotedStat) movs r3, #25 @ _31, ldrsb r3, [r0, r3] @ _31,* _31 -@ Patches/../C_code.c:4814: if (unit->lck < MinPromotedStat) +@ Patches/../C_code.c:4819: if (unit->lck < MinPromotedStat) cmp r3, #1 @ _31, - ble .L2230 @, -.L2220: -@ Patches/../C_code.c:4818: if (StrMagInstalled) - ldr r3, .L2232 @ tmp186, -@ Patches/../C_code.c:4818: if (StrMagInstalled) + ble .L2233 @, +.L2223: +@ Patches/../C_code.c:4823: if (StrMagInstalled) + ldr r3, .L2235 @ tmp186, +@ Patches/../C_code.c:4823: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2212 @, -.L2231: -@ Patches/../C_code.c:4820: if ((unit->_u3A < (MinPromotedStat + 2)) || (unit->_u3A > 127)) + beq .L2215 @, +.L2234: +@ Patches/../C_code.c:4825: if ((unit->_u3A < (MinPromotedStat + 2)) || (unit->_u3A > 127)) movs r1, #58 @ tmp188, ldrb r2, [r0, r1] @ _36, -@ Patches/../C_code.c:4820: if ((unit->_u3A < (MinPromotedStat + 2)) || (unit->_u3A > 127)) +@ Patches/../C_code.c:4825: if ((unit->_u3A < (MinPromotedStat + 2)) || (unit->_u3A > 127)) subs r3, r2, #4 @ tmp189, _36, -@ Patches/../C_code.c:4820: if ((unit->_u3A < (MinPromotedStat + 2)) || (unit->_u3A > 127)) +@ Patches/../C_code.c:4825: if ((unit->_u3A < (MinPromotedStat + 2)) || (unit->_u3A > 127)) lsls r3, r3, #24 @ tmp193, tmp189, lsrs r3, r3, #24 @ tmp192, tmp193, cmp r3, #123 @ tmp192, - bls .L2212 @, -@ Patches/../C_code.c:4822: unit->_u3A += MinPromotedStat; + bls .L2215 @, +@ Patches/../C_code.c:4827: unit->_u3A += MinPromotedStat; adds r2, r2, #2 @ tmp194, strb r2, [r0, r1] @ tmp194, unit_10(D)->_u3A -.L2212: -@ Patches/../C_code.c:4826: } +.L2215: +@ Patches/../C_code.c:4831: } @ sp needed @ bx lr -.L2226: -@ Patches/../C_code.c:4800: unit->skl += MinPromotedStat; +.L2229: +@ Patches/../C_code.c:4805: unit->skl += MinPromotedStat; adds r3, r3, #2 @ tmp164, strb r3, [r0, #21] @ tmp164, unit_10(D)->skl -@ Patches/../C_code.c:4802: if (unit->spd < MinPromotedStat) +@ Patches/../C_code.c:4807: if (unit->spd < MinPromotedStat) movs r3, #22 @ _19, ldrsb r3, [r0, r3] @ _19,* _19 -@ Patches/../C_code.c:4802: if (unit->spd < MinPromotedStat) +@ Patches/../C_code.c:4807: if (unit->spd < MinPromotedStat) cmp r3, #1 @ _19, - bgt .L2217 @, - b .L2227 @ -.L2230: -@ Patches/../C_code.c:4816: unit->lck += MinPromotedStat; + bgt .L2220 @, + b .L2230 @ +.L2233: +@ Patches/../C_code.c:4821: unit->lck += MinPromotedStat; adds r3, r3, #2 @ tmp184, strb r3, [r0, #25] @ tmp184, unit_10(D)->lck -@ Patches/../C_code.c:4818: if (StrMagInstalled) - ldr r3, .L2232 @ tmp186, -@ Patches/../C_code.c:4818: if (StrMagInstalled) +@ Patches/../C_code.c:4823: if (StrMagInstalled) + ldr r3, .L2235 @ tmp186, +@ Patches/../C_code.c:4823: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2212 @, - b .L2231 @ -.L2229: -@ Patches/../C_code.c:4812: unit->res += MinPromotedStat; + beq .L2215 @, + b .L2234 @ +.L2232: +@ Patches/../C_code.c:4817: unit->res += MinPromotedStat; adds r3, r3, #2 @ tmp179, strb r3, [r0, #24] @ tmp179, unit_10(D)->res -@ Patches/../C_code.c:4814: if (unit->lck < MinPromotedStat) +@ Patches/../C_code.c:4819: if (unit->lck < MinPromotedStat) movs r3, #25 @ _31, ldrsb r3, [r0, r3] @ _31,* _31 -@ Patches/../C_code.c:4814: if (unit->lck < MinPromotedStat) +@ Patches/../C_code.c:4819: if (unit->lck < MinPromotedStat) cmp r3, #1 @ _31, - bgt .L2220 @, - b .L2230 @ -.L2228: -@ Patches/../C_code.c:4808: unit->def += MinPromotedStat; + bgt .L2223 @, + b .L2233 @ +.L2231: +@ Patches/../C_code.c:4813: unit->def += MinPromotedStat; adds r3, r3, #2 @ tmp174, strb r3, [r0, #23] @ tmp174, unit_10(D)->def -@ Patches/../C_code.c:4810: if (unit->res < MinPromotedStat) +@ Patches/../C_code.c:4815: if (unit->res < MinPromotedStat) movs r3, #24 @ _27, ldrsb r3, [r0, r3] @ _27,* _27 -@ Patches/../C_code.c:4810: if (unit->res < MinPromotedStat) +@ Patches/../C_code.c:4815: if (unit->res < MinPromotedStat) cmp r3, #1 @ _27, - bgt .L2219 @, - b .L2229 @ -.L2227: -@ Patches/../C_code.c:4804: unit->spd += MinPromotedStat; + bgt .L2222 @, + b .L2232 @ +.L2230: +@ Patches/../C_code.c:4809: unit->spd += MinPromotedStat; adds r3, r3, #2 @ tmp169, strb r3, [r0, #22] @ tmp169, unit_10(D)->spd -@ Patches/../C_code.c:4806: if (unit->def < MinPromotedStat) +@ Patches/../C_code.c:4811: if (unit->def < MinPromotedStat) movs r3, #23 @ _23, ldrsb r3, [r0, r3] @ _23,* _23 -@ Patches/../C_code.c:4806: if (unit->def < MinPromotedStat) +@ Patches/../C_code.c:4811: if (unit->def < MinPromotedStat) cmp r3, #1 @ _23, - bgt .L2218 @, - b .L2228 @ -.L2233: + bgt .L2221 @, + b .L2231 @ +.L2236: .align 2 -.L2232: +.L2235: .word StrMagInstalled .size MakePromotedUnitHaveMinStats, .-MakePromotedUnitHaveMinStats .align 1 @@ -15662,37 +15693,37 @@ NewGetStatDecrease: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:4831: int result = 0; +@ Patches/../C_code.c:4836: int result = 0; movs r4, #0 @ , -@ Patches/../C_code.c:4833: while (growth > 100) +@ Patches/../C_code.c:4838: while (growth > 100) cmp r0, #100 @ growth, - ble .L2235 @, -.L2236: -@ Patches/../C_code.c:4836: growth -= 100; + ble .L2238 @, +.L2239: +@ Patches/../C_code.c:4841: growth -= 100; subs r0, r0, #100 @ growth, -@ Patches/../C_code.c:4835: result++; +@ Patches/../C_code.c:4840: result++; adds r4, r4, #1 @ , -@ Patches/../C_code.c:4833: while (growth > 100) +@ Patches/../C_code.c:4838: while (growth > 100) cmp r0, #100 @ growth, - bgt .L2236 @, -.L2235: -@ Patches/../C_code.c:4851: } + bgt .L2239 @, +.L2238: +@ Patches/../C_code.c:4856: } @ sp needed @ -@ Patches/../C_code.c:4841: if (Roll1RN(growth)) - ldr r3, .L2242 @ tmp117, +@ Patches/../C_code.c:4846: if (Roll1RN(growth)) + ldr r3, .L2245 @ tmp117, bl .L14 @ -@ Patches/../C_code.c:4843: result++; +@ Patches/../C_code.c:4848: result++; subs r3, r0, #1 @ tmp123, tmp125 sbcs r0, r0, r3 @ tmp122, tmp125, tmp123 adds r4, r4, r0 @ , , tmp122 -@ Patches/../C_code.c:4851: } +@ Patches/../C_code.c:4856: } movs r0, r4 @, pop {r4} pop {r1} bx r1 -.L2243: +.L2246: .align 2 -.L2242: +.L2245: .word Roll1RN .size NewGetStatDecrease, .-NewGetStatDecrease .align 1 @@ -15706,71 +15737,71 @@ GetAutoleveledStatDecrease: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:4855: levelCount = ABS(levelCount); +@ Patches/../C_code.c:4860: levelCount = ABS(levelCount); asrs r3, r1, #31 @ tmp161, tmp157, -@ Patches/../C_code.c:4854: { +@ Patches/../C_code.c:4859: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:4855: levelCount = ABS(levelCount); +@ Patches/../C_code.c:4860: levelCount = ABS(levelCount); adds r4, r1, r3 @ levelCount, tmp157, tmp161 eors r4, r3 @ levelCount, tmp161 -@ Patches/../C_code.c:4859: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); +@ Patches/../C_code.c:4864: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); muls r4, r0 @ _1, tmp156 -@ Patches/../C_code.c:4859: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); +@ Patches/../C_code.c:4864: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); movs r0, #3 @ tmp133, asrs r6, r4, #31 @ tmp132, _1, ands r0, r6 @ tmp134, tmp132 adds r0, r0, r4 @ tmp135, tmp134, _1 - ldr r3, .L2253 @ tmp137, + ldr r3, .L2256 @ tmp137, asrs r0, r0, #2 @ tmp136, tmp135, -@ Patches/../C_code.c:4854: { +@ Patches/../C_code.c:4859: { movs r5, r2 @ stat, tmp158 -@ Patches/../C_code.c:4859: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); +@ Patches/../C_code.c:4864: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); bl .L14 @ -@ Patches/../C_code.c:4859: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); +@ Patches/../C_code.c:4864: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); movs r3, #7 @ tmp142, ands r3, r6 @ tmp143, tmp132 adds r3, r3, r4 @ tmp144, tmp143, _1 asrs r3, r3, #3 @ tmp145, tmp144, -@ Patches/../C_code.c:4859: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); +@ Patches/../C_code.c:4864: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); subs r0, r0, r3 @ tmp146, tmp159, tmp145 -@ Patches/../C_code.c:4859: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); +@ Patches/../C_code.c:4864: NewGetStatDecrease((growth * levelCount) + (NextRN_N((growth * levelCount) / 4) - (growth * levelCount) / 8)); adds r0, r0, r4 @ growth, tmp146, _1 -@ Patches/../C_code.c:4831: int result = 0; +@ Patches/../C_code.c:4836: int result = 0; movs r4, #0 @ result, -@ Patches/../C_code.c:4833: while (growth > 100) +@ Patches/../C_code.c:4838: while (growth > 100) cmp r0, #100 @ growth, - ble .L2245 @, -.L2246: -@ Patches/../C_code.c:4836: growth -= 100; + ble .L2248 @, +.L2249: +@ Patches/../C_code.c:4841: growth -= 100; subs r0, r0, #100 @ growth, -@ Patches/../C_code.c:4835: result++; +@ Patches/../C_code.c:4840: result++; adds r4, r4, #1 @ result, -@ Patches/../C_code.c:4833: while (growth > 100) +@ Patches/../C_code.c:4838: while (growth > 100) cmp r0, #100 @ growth, - bgt .L2246 @, -.L2245: -@ Patches/../C_code.c:4866: } + bgt .L2249 @, +.L2248: +@ Patches/../C_code.c:4871: } @ sp needed @ -@ Patches/../C_code.c:4841: if (Roll1RN(growth)) - ldr r3, .L2253+4 @ tmp147, +@ Patches/../C_code.c:4846: if (Roll1RN(growth)) + ldr r3, .L2256+4 @ tmp147, bl .L14 @ -@ Patches/../C_code.c:4843: result++; +@ Patches/../C_code.c:4848: result++; subs r3, r0, #1 @ tmp153, tmp160 sbcs r0, r0, r3 @ tmp152, tmp160, tmp153 adds r4, r4, r0 @ result, result, tmp152 -@ Patches/../C_code.c:4858: int result = stat - +@ Patches/../C_code.c:4863: int result = stat - subs r0, r5, r4 @ result, stat, result -@ Patches/../C_code.c:4861: if (result < 0) +@ Patches/../C_code.c:4866: if (result < 0) mvns r3, r0 @ tmp155, result asrs r3, r3, #31 @ tmp154, tmp155, ands r0, r3 @ result, tmp154 -@ Patches/../C_code.c:4866: } +@ Patches/../C_code.c:4871: } pop {r4, r5, r6} pop {r1} bx r1 -.L2254: +.L2257: .align 2 -.L2253: +.L2256: .word NextRN_N .word Roll1RN .size GetAutoleveledStatDecrease, .-GetAutoleveledStatDecrease @@ -15786,16 +15817,16 @@ AdjustGrowthForLosingLevels: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa lsls r1, r1, #1 @ tmp120, tmp122, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r1, r0 @ num, tmp120, tmp121 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2256 @, + bge .L2259 @, movs r0, #20 @ num, -.L2256: -@ Patches/../C_code.c:4925: } +.L2259: +@ Patches/../C_code.c:4930: } @ sp needed @ bx lr .size AdjustGrowthForLosingLevels, .-AdjustGrowthForLosingLevels @@ -15811,24 +15842,24 @@ GetAdjustedLevel: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:5052: { +@ Patches/../C_code.c:5057: { movs r3, r0 @ table, tmp128 -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; movs r0, #11 @ , -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r2, [r1, #40] @ classTable_8(D)->attributes, classTable_8(D)->attributes -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; ldrsb r0, [r3, r0] @ ,* -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r3, [r3, #40] @ table_7(D)->attributes, table_7(D)->attributes orrs r3, r2 @ tmp122, classTable_8(D)->attributes -@ Patches/../C_code.c:5055: if (promoted) +@ Patches/../C_code.c:5060: if (promoted) lsls r3, r3, #23 @ tmp130, tmp122, - bpl .L2257 @, -@ Patches/../C_code.c:5057: level += 15; + bpl .L2260 @, +@ Patches/../C_code.c:5062: level += 15; adds r0, r0, #15 @ , -.L2257: -@ Patches/../C_code.c:5060: } +.L2260: +@ Patches/../C_code.c:5065: } @ sp needed @ bx lr .size GetAdjustedLevel, .-GetAdjustedLevel @@ -15843,106 +15874,106 @@ GetHPStatMaxBonus: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:5065: int result = (stat + avg) / 2; +@ Patches/../C_code.c:5070: int result = (stat + avg) / 2; adds r3, r1, r2 @ tmp131, stat, avg -@ Patches/../C_code.c:5064: { +@ Patches/../C_code.c:5069: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:5065: int result = (stat + avg) / 2; +@ Patches/../C_code.c:5070: int result = (stat + avg) / 2; lsrs r5, r3, #31 @ tmp132, tmp131, adds r5, r5, r3 @ tmp133, tmp132, tmp131 -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; - ldr r3, .L2275 @ tmp136, +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2278 @ tmp136, ldr r3, [r3] @ RandValues, RandValues - ldrh r0, [r3, #2] @ *RandValues.212_2, *RandValues.212_2 -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) - ldr r3, .L2275+4 @ tmp144, + ldrh r0, [r3, #2] @ *RandValues.213_2, *RandValues.213_2 +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) + ldr r3, .L2278+4 @ tmp144, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r3, [r3] @ *RandBitflags.153_16, *RandBitflags.153_16 -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; - lsls r0, r0, #23 @ tmp141, *RandValues.212_2, -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) - lsls r3, r3, #23 @ tmp149, *RandBitflags.153_16, -@ Patches/../C_code.c:5064: { + ldrh r3, [r3] @ *RandBitflags.154_16, *RandBitflags.154_16 +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; + lsls r0, r0, #23 @ tmp141, *RandValues.213_2, +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) + lsls r3, r3, #23 @ tmp149, *RandBitflags.154_16, +@ Patches/../C_code.c:5069: { movs r4, r1 @ stat, tmp192 movs r6, r2 @ avg, tmp193 -@ Patches/../C_code.c:5065: int result = (stat + avg) / 2; +@ Patches/../C_code.c:5070: int result = (stat + avg) / 2; asrs r5, r5, #1 @ result, tmp133, -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsrs r0, r0, #27 @ _4, tmp141, -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) lsrs r3, r3, #29 @ _17, tmp149, -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) cmp r3, #5 @ _17, - beq .L2264 @, - bhi .L2265 @, + beq .L2267 @, + bhi .L2268 @, cmp r3, #2 @ _17, - beq .L2266 @, + beq .L2269 @, cmp r3, #3 @ _17, - bne .L2268 @, -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; + bne .L2271 @, +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r3, r0, #3 @ tmp168, _4, subs r0, r3, r0 @ tmp169, tmp168, _4 -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; movs r1, #20 @, - ldr r3, .L2275+8 @ tmp178, + ldr r3, .L2278+8 @ tmp178, bl .L14 @ -@ Patches/../C_code.c:5067: result += bonus; +@ Patches/../C_code.c:5072: result += bonus; adds r5, r5, r0 @ result, result, tmp195 -@ Patches/../C_code.c:3568: break; - b .L2266 @ -.L2265: -@ Patches/../C_code.c:3548: switch (RandBitflags->caps) +@ Patches/../C_code.c:3573: break; + b .L2269 @ +.L2268: +@ Patches/../C_code.c:3553: switch (RandBitflags->caps) cmp r3, #6 @ _17, - bne .L2268 @, -@ Patches/../C_code.c:5067: result += bonus; + bne .L2271 @, +@ Patches/../C_code.c:5072: result += bonus; adds r5, r5, r0 @ result, result, _4 -.L2266: -@ Patches/../C_code.c:5068: if (result < stat) +.L2269: +@ Patches/../C_code.c:5073: if (result < stat) movs r0, r4 @ , stat cmp r4, r5 @ , result - bge .L2270 @, + bge .L2273 @, movs r0, r5 @ , result -.L2270: -@ Patches/../C_code.c:5072: if (result < (avg + 1)) +.L2273: +@ Patches/../C_code.c:5077: if (result < (avg + 1)) cmp r6, r0 @ avg, - blt .L2263 @, -@ Patches/../C_code.c:5074: result = avg + 1; + blt .L2266 @, +@ Patches/../C_code.c:5079: result = avg + 1; adds r0, r6, #1 @ , avg, -.L2263: -@ Patches/../C_code.c:5077: } +.L2266: +@ Patches/../C_code.c:5082: } @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L2268: -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; +.L2271: +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r3, r0, #1 @ tmp154, _4, adds r0, r3, r0 @ tmp155, tmp154, _4 -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; movs r1, #20 @, - ldr r3, .L2275+8 @ tmp165, -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2278+8 @ tmp165, +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r0, #2 @ tmp156, tmp155, -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; bl .L14 @ -@ Patches/../C_code.c:5067: result += bonus; +@ Patches/../C_code.c:5072: result += bonus; adds r5, r5, r0 @ result, result, tmp194 - b .L2266 @ -.L2264: -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; + b .L2269 @ +.L2267: +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; movs r1, #20 @, - ldr r3, .L2275+8 @ tmp189, -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2278+8 @ tmp189, +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r0, #4 @ tmp180, _4, -@ Patches/../C_code.c:5066: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5071: int bonus = (AdjustStatForInflatedNumbers(HPStatMaxBonus) * ((RandValues->variance) * 5)) / 100; bl .L14 @ -@ Patches/../C_code.c:5067: result += bonus; +@ Patches/../C_code.c:5072: result += bonus; adds r5, r5, r0 @ result, result, tmp196 -@ Patches/../C_code.c:3578: break; - b .L2266 @ -.L2276: +@ Patches/../C_code.c:3583: break; + b .L2269 @ +.L2279: .align 2 -.L2275: +.L2278: .word RandValues .word RandBitflags .word __aeabi_idiv @@ -15958,115 +15989,115 @@ GetStatMaxBonus: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:5081: int result = (stat + avg) / 2; +@ Patches/../C_code.c:5086: int result = (stat + avg) / 2; adds r3, r1, r2 @ tmp134, stat, avg -@ Patches/../C_code.c:5080: { +@ Patches/../C_code.c:5085: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:5081: int result = (stat + avg) / 2; +@ Patches/../C_code.c:5086: int result = (stat + avg) / 2; lsrs r5, r3, #31 @ tmp135, tmp134, adds r5, r5, r3 @ tmp136, tmp135, tmp134 -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; - ldr r3, .L2291 @ tmp139, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2294 @ tmp139, ldr r3, [r3] @ RandValues, RandValues -@ Patches/../C_code.c:5080: { +@ Patches/../C_code.c:5085: { movs r4, r1 @ stat, tmp212 -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; - ldrh r1, [r3, #2] @ *RandValues.213_2, *RandValues.213_2 -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) - ldr r3, .L2291+4 @ tmp147, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldrh r1, [r3, #2] @ *RandValues.214_2, *RandValues.214_2 +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) + ldr r3, .L2294+4 @ tmp147, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r3, [r3] @ *RandBitflags.154_17, *RandBitflags.154_17 -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; - lsls r1, r1, #23 @ tmp144, *RandValues.213_2, -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) - lsls r3, r3, #23 @ tmp152, *RandBitflags.154_17, -@ Patches/../C_code.c:5080: { + ldrh r3, [r3] @ *RandBitflags.155_17, *RandBitflags.155_17 +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + lsls r1, r1, #23 @ tmp144, *RandValues.214_2, +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) + lsls r3, r3, #23 @ tmp152, *RandBitflags.155_17, +@ Patches/../C_code.c:5085: { movs r6, r2 @ avg, tmp213 -@ Patches/../C_code.c:5081: int result = (stat + avg) / 2; +@ Patches/../C_code.c:5086: int result = (stat + avg) / 2; asrs r5, r5, #1 @ result, tmp136, -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsrs r1, r1, #27 @ _4, tmp144, -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) lsrs r3, r3, #29 @ _18, tmp152, -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) cmp r3, #5 @ _18, - beq .L2278 @, - bhi .L2279 @, + beq .L2281 @, + bhi .L2282 @, cmp r3, #2 @ _18, - beq .L2280 @, + beq .L2283 @, cmp r3, #3 @ _18, - bne .L2282 @, -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + bne .L2285 @, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r1, #1 @ tmp168, _4, adds r0, r0, r1 @ tmp169, tmp168, _4 -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; - ldr r3, .L2291+8 @ tmp179, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2294+8 @ tmp179, movs r1, #20 @, -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r0, #1 @ tmp170, tmp169, -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; bl .L14 @ -@ Patches/../C_code.c:5083: result += bonus; +@ Patches/../C_code.c:5088: result += bonus; adds r5, r5, r0 @ result, result, tmp215 -@ Patches/../C_code.c:3616: break; - b .L2280 @ -.L2279: -@ Patches/../C_code.c:3596: switch (RandBitflags->caps) +@ Patches/../C_code.c:3621: break; + b .L2283 @ +.L2282: +@ Patches/../C_code.c:3601: switch (RandBitflags->caps) cmp r3, #6 @ _18, - bne .L2282 @, -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + bne .L2285 @, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r1, #2 @ tmp195, _4, adds r0, r0, r1 @ tmp196, tmp195, _4 lsls r0, r0, #1 @ tmp197, tmp196, -.L2290: +.L2293: adds r0, r0, r1 @ tmp198, tmp197, _4 -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; - ldr r3, .L2291+8 @ tmp207, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2294+8 @ tmp207, movs r1, #20 @, bl .L14 @ -@ Patches/../C_code.c:5083: result += bonus; +@ Patches/../C_code.c:5088: result += bonus; adds r5, r5, r0 @ result, result, tmp217 -.L2280: -@ Patches/../C_code.c:5084: if (result < stat) +.L2283: +@ Patches/../C_code.c:5089: if (result < stat) movs r0, r4 @ result, stat cmp r4, r5 @ result, result - bge .L2284 @, + bge .L2287 @, movs r0, r5 @ result, result -.L2284: -@ Patches/../C_code.c:5088: if (result < (avg + 1)) +.L2287: +@ Patches/../C_code.c:5093: if (result < (avg + 1)) cmp r6, r0 @ avg, result - blt .L2285 @, -@ Patches/../C_code.c:5090: result = avg + 1; + blt .L2288 @, +@ Patches/../C_code.c:5095: result = avg + 1; adds r0, r6, #1 @ result, avg, -.L2285: -@ Patches/../C_code.c:5092: if (result < 0) +.L2288: +@ Patches/../C_code.c:5097: if (result < 0) mvns r3, r0 @ tmp211, result -@ Patches/../C_code.c:5097: } +@ Patches/../C_code.c:5102: } @ sp needed @ -@ Patches/../C_code.c:5092: if (result < 0) +@ Patches/../C_code.c:5097: if (result < 0) asrs r3, r3, #31 @ tmp210, tmp211, ands r0, r3 @ result, tmp210 -@ Patches/../C_code.c:5097: } +@ Patches/../C_code.c:5102: } pop {r4, r5, r6} pop {r1} bx r1 -.L2282: -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; +.L2285: +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r1, #3 @ tmp156, _4, -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; - ldr r3, .L2291+8 @ tmp165, +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + ldr r3, .L2294+8 @ tmp165, movs r1, #20 @, bl .L14 @ -@ Patches/../C_code.c:5083: result += bonus; +@ Patches/../C_code.c:5088: result += bonus; adds r5, r5, r0 @ result, result, tmp214 - b .L2280 @ -.L2278: -@ Patches/../C_code.c:5082: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; + b .L2283 @ +.L2281: +@ Patches/../C_code.c:5087: int bonus = (SlightlyAdjustStatForInflatedNumbers(StatMaxBonus) * ((RandValues->variance) * 5)) / 100; lsls r0, r1, #3 @ tmp182, _4, - b .L2290 @ -.L2292: + b .L2293 @ +.L2295: .align 2 -.L2291: +.L2294: .word RandValues .word RandBitflags .word __aeabi_idiv @@ -16085,75 +16116,75 @@ UnitLoadItemsFromDefinition: push {r4, r5, r6, r7, lr} @ mov lr, r8 @, push {lr} @ -@ Patches/../C_code.c:5620: UnitClearInventory(unit); - ldr r3, .L2302 @ tmp130, -@ Patches/../C_code.c:5617: { +@ Patches/../C_code.c:5625: UnitClearInventory(unit); + ldr r3, .L2305 @ tmp130, +@ Patches/../C_code.c:5622: { sub sp, sp, #64 @,, -@ Patches/../C_code.c:5617: { +@ Patches/../C_code.c:5622: { movs r7, r1 @ uDef, tmp166 movs r6, r0 @ unit, tmp165 -@ Patches/../C_code.c:5620: UnitClearInventory(unit); +@ Patches/../C_code.c:5625: UnitClearInventory(unit); bl .L14 @ -@ Patches/../C_code.c:5621: int noise[4] = { 0, 0, 0, 0 }; +@ Patches/../C_code.c:5626: int noise[4] = { 0, 0, 0, 0 }; movs r3, #0 @ tmp132, str r3, [sp, #20] @ tmp132, MEM [(int[4] *)&noise + 12B] -@ Patches/../C_code.c:5622: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:5627: noise[0] = unit->pCharacterData->number; ldr r3, [r6] @ unit_15(D)->pCharacterData, unit_15(D)->pCharacterData ldrb r3, [r3, #4] @ tmp135, str r3, [sp, #8] @ tmp135, noise[0] -@ Patches/../C_code.c:5628: noise[1] = uDef->xPosition; +@ Patches/../C_code.c:5633: noise[1] = uDef->xPosition; ldrb r3, [r7, #4] @ *uDef_19(D), *uDef_19(D) lsls r3, r3, #26 @ tmp141, *uDef_19(D), lsrs r3, r3, #26 @ tmp142, tmp141, str r3, [sp, #12] @ tmp142, noise[1] -@ Patches/../C_code.c:5629: noise[2] = uDef->yPosition; +@ Patches/../C_code.c:5634: noise[2] = uDef->yPosition; ldrh r3, [r7, #4] @ *uDef_19(D), *uDef_19(D) lsls r3, r3, #20 @ tmp149, *uDef_19(D), lsrs r3, r3, #26 @ tmp150, tmp149, str r3, [sp, #16] @ tmp150, noise[2] -@ Patches/../C_code.c:5632: list[0] = 99; // so compiler doesn't assume uninitialized or whatever +@ Patches/../C_code.c:5637: list[0] = 99; // so compiler doesn't assume uninitialized or whatever movs r3, #99 @ tmp153, add r5, sp, #24 @ tmp162,, -@ Patches/../C_code.c:5633: BuildAvailableWeaponList(list, unit); +@ Patches/../C_code.c:5638: BuildAvailableWeaponList(list, unit); movs r1, r6 @, unit movs r0, r5 @, tmp162 -@ Patches/../C_code.c:5632: list[0] = 99; // so compiler doesn't assume uninitialized or whatever +@ Patches/../C_code.c:5637: list[0] = 99; // so compiler doesn't assume uninitialized or whatever strb r3, [r5] @ tmp153, list[0] -@ Patches/../C_code.c:5633: BuildAvailableWeaponList(list, unit); +@ Patches/../C_code.c:5638: BuildAvailableWeaponList(list, unit); bl BuildAvailableWeaponList @ -@ Patches/../C_code.c:5640: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); - ldr r3, .L2302+4 @ tmp164, -@ Patches/../C_code.c:5634: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5645: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); + ldr r3, .L2305+4 @ tmp164, +@ Patches/../C_code.c:5639: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) movs r4, #0 @ i, -@ Patches/../C_code.c:5640: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); +@ Patches/../C_code.c:5645: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); mov r8, r3 @ tmp164, tmp164 adds r7, r7, #12 @ _40, -.L2294: -@ Patches/../C_code.c:5634: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +.L2297: +@ Patches/../C_code.c:5639: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) ldrb r1, [r7, r4] @ _10, MEM[(unsigned char *)_40 + _39 * 1] -@ Patches/../C_code.c:5634: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5639: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) cmp r1, #0 @ _10, - beq .L2293 @, -@ Patches/../C_code.c:5636: if (i == 1) + beq .L2296 @, +@ Patches/../C_code.c:5641: if (i == 1) cmp r4, #1 @ i, - beq .L2301 @, -.L2296: + beq .L2304 @, +.L2299: movs r3, r4 @, i add r2, sp, #8 @ tmp170,, movs r0, r6 @, unit str r5, [sp] @ tmp162, bl RandNewWeapon.part.0 @ -@ Patches/../C_code.c:5634: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5639: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) adds r4, r4, #1 @ i, movs r1, r0 @ _29, tmp167 -@ Patches/../C_code.c:5640: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); +@ Patches/../C_code.c:5645: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); movs r0, r6 @, unit - bl .L208 @ -@ Patches/../C_code.c:5634: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) + bl .L211 @ +@ Patches/../C_code.c:5639: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) cmp r4, #4 @ i, - bne .L2294 @, -.L2293: -@ Patches/../C_code.c:5642: } + bne .L2297 @, +.L2296: +@ Patches/../C_code.c:5647: } add sp, sp, #64 @,, @ sp needed @ pop {r7} @@ -16161,27 +16192,27 @@ UnitLoadItemsFromDefinition: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L2301: -@ Patches/../C_code.c:5638: AppendAvailableStaffList(list, unit); +.L2304: +@ Patches/../C_code.c:5643: AppendAvailableStaffList(list, unit); movs r1, r6 @, unit movs r0, r5 @, tmp162 bl AppendAvailableStaffList @ -@ Patches/../C_code.c:5640: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); +@ Patches/../C_code.c:5645: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); ldrb r1, [r7, #1] @ _13, MEM[(unsigned char *)_40 + 1B] -@ Patches/../C_code.c:3234: if (!item) +@ Patches/../C_code.c:3239: if (!item) cmp r1, #0 @ _13, - bne .L2296 @, -@ Patches/../C_code.c:5640: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); + bne .L2299 @, +@ Patches/../C_code.c:5645: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); movs r1, #0 @, movs r0, r6 @, unit - ldr r3, .L2302+4 @ tmp160, + ldr r3, .L2305+4 @ tmp160, bl .L14 @ -@ Patches/../C_code.c:5634: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5639: for (i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) movs r4, #2 @ i, - b .L2294 @ -.L2303: + b .L2297 @ +.L2306: .align 2 -.L2302: +.L2305: .word UnitClearInventory .word UnitAddItem .size UnitLoadItemsFromDefinition, .-UnitLoadItemsFromDefinition @@ -16197,7 +16228,7 @@ UnitLoadStatsFromCharacter: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:5649: } +@ Patches/../C_code.c:5654: } @ sp needed @ bx lr .size UnitLoadStatsFromCharacter, .-UnitLoadStatsFromCharacter @@ -16213,48 +16244,48 @@ GetUnitHPCap: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:5656: if (UNIT_CATTRIBUTES(unit) & CA_BOSS) +@ Patches/../C_code.c:5661: if (UNIT_CATTRIBUTES(unit) & CA_BOSS) ldr r2, [r0] @ _1, unit_13(D)->pCharacterData ldr r3, [r0, #4] @ unit_13(D)->pClassData, unit_13(D)->pClassData ldr r1, [r2, #40] @ _1->attributes, _1->attributes ldr r3, [r3, #40] @ _3->attributes, _3->attributes orrs r3, r1 @ tmp127, _1->attributes -@ Patches/../C_code.c:5656: if (UNIT_CATTRIBUTES(unit) & CA_BOSS) +@ Patches/../C_code.c:5661: if (UNIT_CATTRIBUTES(unit) & CA_BOSS) lsls r3, r3, #16 @ tmp143, tmp127, - bpl .L2306 @, -@ Patches/../C_code.c:5658: if (unit->pCharacterData->number > 0x3F) + bpl .L2309 @, +@ Patches/../C_code.c:5663: if (unit->pCharacterData->number > 0x3F) ldrb r3, [r2, #4] @ tmp134, cmp r3, #63 @ tmp134, - bhi .L2312 @, -.L2307: -@ Patches/../C_code.c:5670: return EnemyMaxHP; - ldr r3, .L2313 @ tmp140, + bhi .L2315 @, +.L2310: +@ Patches/../C_code.c:5675: return EnemyMaxHP; + ldr r3, .L2316 @ tmp140, ldr r0, [r3] @ , -.L2305: -@ Patches/../C_code.c:5671: } +.L2308: +@ Patches/../C_code.c:5676: } @ sp needed @ bx lr -.L2306: -@ Patches/../C_code.c:5665: if (UNIT_FACTION(unit) != FACTION_RED) +.L2309: +@ Patches/../C_code.c:5670: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp136, movs r3, #192 @ tmp137, ldrsb r2, [r0, r2] @ tmp136, ands r3, r2 @ tmp138, tmp136 -@ Patches/../C_code.c:5665: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:5670: if (UNIT_FACTION(unit) != FACTION_RED) cmp r3, #128 @ tmp138, - beq .L2307 @, -@ Patches/../C_code.c:5667: return PlayerMaxHP; - ldr r3, .L2313+4 @ tmp139, + beq .L2310 @, +@ Patches/../C_code.c:5672: return PlayerMaxHP; + ldr r3, .L2316+4 @ tmp139, ldr r0, [r3] @ , - b .L2305 @ -.L2312: -@ Patches/../C_code.c:5660: return EnemyBossMaxHP; - ldr r3, .L2313+8 @ tmp135, + b .L2308 @ +.L2315: +@ Patches/../C_code.c:5665: return EnemyBossMaxHP; + ldr r3, .L2316+8 @ tmp135, ldr r0, [r3] @ , - b .L2305 @ -.L2314: + b .L2308 @ +.L2317: .align 2 -.L2313: +.L2316: .word EnemyMaxHP .word PlayerMaxHP .word EnemyBossMaxHP @@ -16271,108 +16302,108 @@ GetUnitMaxPow: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r6, #224 @ tmp162, -@ Patches/../C_code.c:5675: int cap = ((unit)->pClassData->maxPow); // return cap; +@ Patches/../C_code.c:5680: int cap = ((unit)->pClassData->maxPow); // return cap; movs r5, #20 @ cap, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L2344 @ tmp150, - ldr r3, [r3] @ RandBitflags.64_30, RandBitflags -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldrh r1, [r3] @ *RandBitflags.64_30, *RandBitflags.64_30 - lsls r2, r1, #23 @ tmp155, *RandBitflags.64_30, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L2347 @ tmp150, + ldr r3, [r3] @ RandBitflags.65_30, RandBitflags +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldrh r1, [r3] @ *RandBitflags.65_30, *RandBitflags.65_30 + lsls r2, r1, #23 @ tmp155, *RandBitflags.65_30, lsrs r2, r2, #29 @ pretmp_75, tmp155, -@ Patches/../C_code.c:5675: int cap = ((unit)->pClassData->maxPow); // return cap; +@ Patches/../C_code.c:5680: int cap = ((unit)->pClassData->maxPow); // return cap; ldr r4, [r0, #4] @ _1, unit_15(D)->pClassData subs r3, r2, #2 @ tmp157, pretmp_75, lsls r3, r3, #24 @ tmp158, tmp157, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) lsls r6, r6, #1 @ tmp162, tmp162, -@ Patches/../C_code.c:5675: int cap = ((unit)->pClassData->maxPow); // return cap; +@ Patches/../C_code.c:5680: int cap = ((unit)->pClassData->maxPow); // return cap; ldrsb r5, [r4, r5] @ cap,* cap -@ Patches/../C_code.c:5674: { +@ Patches/../C_code.c:5679: { sub sp, sp, #28 @,, lsrs r3, r3, #24 @ _77, tmp158, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r6 @ *RandBitflags.64_30, tmp162 - beq .L2316 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r6 @ *RandBitflags.65_30, tmp162 + beq .L2319 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r0, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r0, [r0, #4] @ tmp168, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L2344+4 @ tmp166, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L2347+4 @ tmp166, lsls r0, r0, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:5676: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:5681: if (!ShouldRandomizeStatCaps(unit)) ldrb r1, [r0, r1] @ tmp170, CharExceptions cmp r1, #0 @ tmp170, - bne .L2316 @, + bne .L2319 @, cmp r3, #4 @ _77, - bhi .L2331 @, + bhi .L2334 @, lsls r6, r2, #4 @ tmp180, pretmp_75, subs r6, r6, r2 @ tmp181, tmp180, pretmp_75 subs r6, r6, #30 @ result, -.L2323: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r7, .L2344+8 @ tmp205, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2326: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r7, .L2347+8 @ tmp205, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r7] @ , maxStat cmp r0, r6 @ , result - ble .L2324 @, + ble .L2327 @, movs r0, r6 @ , result -.L2324: -@ Patches/../C_code.c:5685: if (max != (-1)) +.L2327: +@ Patches/../C_code.c:5690: if (max != (-1)) adds r3, r0, #1 @ tmp213, , - beq .L2340 @, -.L2315: -@ Patches/../C_code.c:5701: } + beq .L2343 @, +.L2318: +@ Patches/../C_code.c:5706: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2331: -@ Patches/../C_code.c:5676: if (!ShouldRandomizeStatCaps(unit)) +.L2334: +@ Patches/../C_code.c:5681: if (!ShouldRandomizeStatCaps(unit)) movs r6, #1 @ result, rsbs r6, r6, #0 @ result, result - b .L2323 @ -.L2316: + b .L2326 @ +.L2319: cmp r3, #4 @ _77, - bhi .L2329 @, + bhi .L2332 @, lsls r3, r2, #4 @ tmp174, pretmp_75, subs r2, r3, r2 @ tmp175, tmp174, pretmp_75 subs r2, r2, #30 @ result, -.L2318: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r3, .L2344+8 @ tmp176, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2321: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r3, .L2347+8 @ tmp176, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r3] @ result, maxStat cmp r3, r2 @ result, result - ble .L2319 @, + ble .L2322 @, movs r3, r2 @ result, result -.L2319: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L2322: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp212, result, - beq .L2341 @, -.L2320: -@ Patches/../C_code.c:5678: if (cap > GetGlobalStatCap()) + beq .L2344 @, +.L2323: +@ Patches/../C_code.c:5683: if (cap > GetGlobalStatCap()) movs r0, r5 @ , cap cmp r5, r3 @ , result - ble .L2315 @, -.L2339: -@ Patches/../C_code.c:5696: if (result > GetGlobalStatCap()) + ble .L2318 @, +.L2342: +@ Patches/../C_code.c:5701: if (result > GetGlobalStatCap()) movs r0, r3 @ , result - b .L2315 @ -.L2340: -@ Patches/../C_code.c:5689: int noise[4] = { 0, 0, 0, 0 }; + b .L2318 @ +.L2343: +@ Patches/../C_code.c:5694: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L2344+12 @ tmp186, + ldr r3, .L2347+12 @ tmp186, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:5690: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:5695: noise[0] = unit->pClassData->number; ldrb r3, [r4, #4] @ tmp190, str r3, [sp, #8] @ tmp190, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp192, movs r2, #17 @, str r3, [sp] @ tmp192, @@ -16380,14 +16411,14 @@ GetUnitMaxPow: adds r3, r3, #1 @, add r1, sp, #8 @ tmp217,, bl HashPercent @ -@ Patches/../C_code.c:5692: if (result < (cap >> 1)) +@ Patches/../C_code.c:5697: if (result < (cap >> 1)) asrs r3, r5, #1 @ tmp195, cap, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp207 -@ Patches/../C_code.c:5692: if (result < (cap >> 1)) +@ Patches/../C_code.c:5697: if (result < (cap >> 1)) cmp r3, r0 @ tmp195, result - ble .L2325 @, -@ Patches/../C_code.c:5694: result += HashByte_Global(cap, (cap / 2), noise, 13); + ble .L2328 @, +@ Patches/../C_code.c:5699: result += HashByte_Global(cap, (cap / 2), noise, 13); lsrs r1, r5, #31 @ tmp198, cap, adds r1, r1, r5 @ tmp199, tmp198, cap movs r3, #13 @, @@ -16395,44 +16426,44 @@ GetUnitMaxPow: asrs r1, r1, #1 @ tmp200, tmp199, add r2, sp, #8 @ tmp218,, bl HashByte_Global @ -@ Patches/../C_code.c:5694: result += HashByte_Global(cap, (cap / 2), noise, 13); +@ Patches/../C_code.c:5699: result += HashByte_Global(cap, (cap / 2), noise, 13); adds r4, r4, r0 @ result, result, tmp208 -.L2325: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2328: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat cmp r3, r6 @ result, result - bgt .L2342 @, -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L2345 @, +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - beq .L2343 @, -.L2327: -@ Patches/../C_code.c:5696: if (result > GetGlobalStatCap()) + beq .L2346 @, +.L2330: +@ Patches/../C_code.c:5701: if (result > GetGlobalStatCap()) movs r0, r4 @ , result cmp r4, r3 @ , result - ble .L2315 @, - b .L2339 @ -.L2329: -@ Patches/../C_code.c:5674: { + ble .L2318 @, + b .L2342 @ +.L2332: +@ Patches/../C_code.c:5679: { movs r2, #1 @ result, rsbs r2, r2, #0 @ result, result - b .L2318 @ -.L2342: -@ Patches/../C_code.c:3528: if (result > maxStat) + b .L2321 @ +.L2345: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r6 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - bne .L2327 @, - b .L2343 @ -.L2341: -@ Patches/../C_code.c:3540: result = 30; + bne .L2330 @, + b .L2346 @ +.L2344: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L2320 @ -.L2343: + b .L2323 @ +.L2346: adds r3, r3, #31 @ result, - b .L2327 @ -.L2345: + b .L2330 @ +.L2348: .align 2 -.L2344: +.L2347: .word RandBitflags .word CharExceptions .word maxStat @@ -16450,108 +16481,108 @@ GetUnitMaxSkl: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r6, #224 @ tmp162, -@ Patches/../C_code.c:5705: int cap = ((unit)->pClassData->maxSkl); // return cap; +@ Patches/../C_code.c:5710: int cap = ((unit)->pClassData->maxSkl); // return cap; movs r5, #21 @ cap, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L2375 @ tmp150, - ldr r3, [r3] @ RandBitflags.64_30, RandBitflags -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldrh r1, [r3] @ *RandBitflags.64_30, *RandBitflags.64_30 - lsls r2, r1, #23 @ tmp155, *RandBitflags.64_30, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L2378 @ tmp150, + ldr r3, [r3] @ RandBitflags.65_30, RandBitflags +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldrh r1, [r3] @ *RandBitflags.65_30, *RandBitflags.65_30 + lsls r2, r1, #23 @ tmp155, *RandBitflags.65_30, lsrs r2, r2, #29 @ pretmp_75, tmp155, -@ Patches/../C_code.c:5705: int cap = ((unit)->pClassData->maxSkl); // return cap; +@ Patches/../C_code.c:5710: int cap = ((unit)->pClassData->maxSkl); // return cap; ldr r4, [r0, #4] @ _1, unit_15(D)->pClassData subs r3, r2, #2 @ tmp157, pretmp_75, lsls r3, r3, #24 @ tmp158, tmp157, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) lsls r6, r6, #1 @ tmp162, tmp162, -@ Patches/../C_code.c:5705: int cap = ((unit)->pClassData->maxSkl); // return cap; +@ Patches/../C_code.c:5710: int cap = ((unit)->pClassData->maxSkl); // return cap; ldrsb r5, [r4, r5] @ cap,* cap -@ Patches/../C_code.c:5704: { +@ Patches/../C_code.c:5709: { sub sp, sp, #28 @,, lsrs r3, r3, #24 @ _77, tmp158, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r6 @ *RandBitflags.64_30, tmp162 - beq .L2347 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r6 @ *RandBitflags.65_30, tmp162 + beq .L2350 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r0, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r0, [r0, #4] @ tmp168, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L2375+4 @ tmp166, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L2378+4 @ tmp166, lsls r0, r0, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:5706: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:5711: if (!ShouldRandomizeStatCaps(unit)) ldrb r1, [r0, r1] @ tmp170, CharExceptions cmp r1, #0 @ tmp170, - bne .L2347 @, + bne .L2350 @, cmp r3, #4 @ _77, - bhi .L2362 @, + bhi .L2365 @, lsls r6, r2, #4 @ tmp180, pretmp_75, subs r6, r6, r2 @ tmp181, tmp180, pretmp_75 subs r6, r6, #30 @ result, -.L2354: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r7, .L2375+8 @ tmp205, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2357: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r7, .L2378+8 @ tmp205, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r7] @ , maxStat cmp r0, r6 @ , result - ble .L2355 @, + ble .L2358 @, movs r0, r6 @ , result -.L2355: -@ Patches/../C_code.c:5715: if (max != (-1)) +.L2358: +@ Patches/../C_code.c:5720: if (max != (-1)) adds r3, r0, #1 @ tmp213, , - beq .L2371 @, -.L2346: -@ Patches/../C_code.c:5731: } + beq .L2374 @, +.L2349: +@ Patches/../C_code.c:5736: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2362: -@ Patches/../C_code.c:5706: if (!ShouldRandomizeStatCaps(unit)) +.L2365: +@ Patches/../C_code.c:5711: if (!ShouldRandomizeStatCaps(unit)) movs r6, #1 @ result, rsbs r6, r6, #0 @ result, result - b .L2354 @ -.L2347: + b .L2357 @ +.L2350: cmp r3, #4 @ _77, - bhi .L2360 @, + bhi .L2363 @, lsls r3, r2, #4 @ tmp174, pretmp_75, subs r2, r3, r2 @ tmp175, tmp174, pretmp_75 subs r2, r2, #30 @ result, -.L2349: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r3, .L2375+8 @ tmp176, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2352: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r3, .L2378+8 @ tmp176, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r3] @ result, maxStat cmp r3, r2 @ result, result - ble .L2350 @, + ble .L2353 @, movs r3, r2 @ result, result -.L2350: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L2353: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp212, result, - beq .L2372 @, -.L2351: -@ Patches/../C_code.c:5708: if (cap > GetGlobalStatCap()) + beq .L2375 @, +.L2354: +@ Patches/../C_code.c:5713: if (cap > GetGlobalStatCap()) movs r0, r5 @ , cap cmp r5, r3 @ , result - ble .L2346 @, -.L2370: -@ Patches/../C_code.c:5726: if (result > GetGlobalStatCap()) + ble .L2349 @, +.L2373: +@ Patches/../C_code.c:5731: if (result > GetGlobalStatCap()) movs r0, r3 @ , result - b .L2346 @ -.L2371: -@ Patches/../C_code.c:5719: int noise[4] = { 0, 0, 0, 0 }; + b .L2349 @ +.L2374: +@ Patches/../C_code.c:5724: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L2375+12 @ tmp186, + ldr r3, .L2378+12 @ tmp186, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:5720: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:5725: noise[0] = unit->pClassData->number; ldrb r3, [r4, #4] @ tmp190, str r3, [sp, #8] @ tmp190, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp192, movs r2, #27 @, str r3, [sp] @ tmp192, @@ -16559,14 +16590,14 @@ GetUnitMaxSkl: adds r3, r3, #1 @, add r1, sp, #8 @ tmp217,, bl HashPercent @ -@ Patches/../C_code.c:5722: if (result < (cap >> 1)) +@ Patches/../C_code.c:5727: if (result < (cap >> 1)) asrs r3, r5, #1 @ tmp195, cap, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp207 -@ Patches/../C_code.c:5722: if (result < (cap >> 1)) +@ Patches/../C_code.c:5727: if (result < (cap >> 1)) cmp r3, r0 @ tmp195, result - ble .L2356 @, -@ Patches/../C_code.c:5724: result += HashByte_Global(cap, (cap / 2), noise, 23); + ble .L2359 @, +@ Patches/../C_code.c:5729: result += HashByte_Global(cap, (cap / 2), noise, 23); lsrs r1, r5, #31 @ tmp198, cap, adds r1, r1, r5 @ tmp199, tmp198, cap movs r3, #23 @, @@ -16574,44 +16605,44 @@ GetUnitMaxSkl: asrs r1, r1, #1 @ tmp200, tmp199, add r2, sp, #8 @ tmp218,, bl HashByte_Global @ -@ Patches/../C_code.c:5724: result += HashByte_Global(cap, (cap / 2), noise, 23); +@ Patches/../C_code.c:5729: result += HashByte_Global(cap, (cap / 2), noise, 23); adds r4, r4, r0 @ result, result, tmp208 -.L2356: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2359: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat cmp r3, r6 @ result, result - bgt .L2373 @, -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L2376 @, +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - beq .L2374 @, -.L2358: -@ Patches/../C_code.c:5726: if (result > GetGlobalStatCap()) + beq .L2377 @, +.L2361: +@ Patches/../C_code.c:5731: if (result > GetGlobalStatCap()) movs r0, r4 @ , result cmp r4, r3 @ , result - ble .L2346 @, - b .L2370 @ -.L2360: -@ Patches/../C_code.c:5704: { + ble .L2349 @, + b .L2373 @ +.L2363: +@ Patches/../C_code.c:5709: { movs r2, #1 @ result, rsbs r2, r2, #0 @ result, result - b .L2349 @ -.L2373: -@ Patches/../C_code.c:3528: if (result > maxStat) + b .L2352 @ +.L2376: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r6 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - bne .L2358 @, - b .L2374 @ -.L2372: -@ Patches/../C_code.c:3540: result = 30; + bne .L2361 @, + b .L2377 @ +.L2375: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L2351 @ -.L2374: + b .L2354 @ +.L2377: adds r3, r3, #31 @ result, - b .L2358 @ -.L2376: + b .L2361 @ +.L2379: .align 2 -.L2375: +.L2378: .word RandBitflags .word CharExceptions .word maxStat @@ -16629,108 +16660,108 @@ GetUnitMaxSpd: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r6, #224 @ tmp162, -@ Patches/../C_code.c:5735: int cap = ((unit)->pClassData->maxSpd); // return cap; +@ Patches/../C_code.c:5740: int cap = ((unit)->pClassData->maxSpd); // return cap; movs r5, #22 @ cap, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L2406 @ tmp150, - ldr r3, [r3] @ RandBitflags.64_30, RandBitflags -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldrh r1, [r3] @ *RandBitflags.64_30, *RandBitflags.64_30 - lsls r2, r1, #23 @ tmp155, *RandBitflags.64_30, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L2409 @ tmp150, + ldr r3, [r3] @ RandBitflags.65_30, RandBitflags +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldrh r1, [r3] @ *RandBitflags.65_30, *RandBitflags.65_30 + lsls r2, r1, #23 @ tmp155, *RandBitflags.65_30, lsrs r2, r2, #29 @ pretmp_75, tmp155, -@ Patches/../C_code.c:5735: int cap = ((unit)->pClassData->maxSpd); // return cap; +@ Patches/../C_code.c:5740: int cap = ((unit)->pClassData->maxSpd); // return cap; ldr r4, [r0, #4] @ _1, unit_15(D)->pClassData subs r3, r2, #2 @ tmp157, pretmp_75, lsls r3, r3, #24 @ tmp158, tmp157, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) lsls r6, r6, #1 @ tmp162, tmp162, -@ Patches/../C_code.c:5735: int cap = ((unit)->pClassData->maxSpd); // return cap; +@ Patches/../C_code.c:5740: int cap = ((unit)->pClassData->maxSpd); // return cap; ldrsb r5, [r4, r5] @ cap,* cap -@ Patches/../C_code.c:5734: { +@ Patches/../C_code.c:5739: { sub sp, sp, #28 @,, lsrs r3, r3, #24 @ _77, tmp158, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r6 @ *RandBitflags.64_30, tmp162 - beq .L2378 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r6 @ *RandBitflags.65_30, tmp162 + beq .L2381 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r0, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r0, [r0, #4] @ tmp168, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L2406+4 @ tmp166, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L2409+4 @ tmp166, lsls r0, r0, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:5736: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:5741: if (!ShouldRandomizeStatCaps(unit)) ldrb r1, [r0, r1] @ tmp170, CharExceptions cmp r1, #0 @ tmp170, - bne .L2378 @, + bne .L2381 @, cmp r3, #4 @ _77, - bhi .L2393 @, + bhi .L2396 @, lsls r6, r2, #4 @ tmp180, pretmp_75, subs r6, r6, r2 @ tmp181, tmp180, pretmp_75 subs r6, r6, #30 @ result, -.L2385: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r7, .L2406+8 @ tmp205, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2388: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r7, .L2409+8 @ tmp205, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r7] @ , maxStat cmp r0, r6 @ , result - ble .L2386 @, + ble .L2389 @, movs r0, r6 @ , result -.L2386: -@ Patches/../C_code.c:5745: if (max != (-1)) +.L2389: +@ Patches/../C_code.c:5750: if (max != (-1)) adds r3, r0, #1 @ tmp213, , - beq .L2402 @, -.L2377: -@ Patches/../C_code.c:5761: } + beq .L2405 @, +.L2380: +@ Patches/../C_code.c:5766: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2393: -@ Patches/../C_code.c:5736: if (!ShouldRandomizeStatCaps(unit)) +.L2396: +@ Patches/../C_code.c:5741: if (!ShouldRandomizeStatCaps(unit)) movs r6, #1 @ result, rsbs r6, r6, #0 @ result, result - b .L2385 @ -.L2378: + b .L2388 @ +.L2381: cmp r3, #4 @ _77, - bhi .L2391 @, + bhi .L2394 @, lsls r3, r2, #4 @ tmp174, pretmp_75, subs r2, r3, r2 @ tmp175, tmp174, pretmp_75 subs r2, r2, #30 @ result, -.L2380: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r3, .L2406+8 @ tmp176, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2383: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r3, .L2409+8 @ tmp176, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r3] @ result, maxStat cmp r3, r2 @ result, result - ble .L2381 @, + ble .L2384 @, movs r3, r2 @ result, result -.L2381: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L2384: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp212, result, - beq .L2403 @, -.L2382: -@ Patches/../C_code.c:5738: if (cap > GetGlobalStatCap()) + beq .L2406 @, +.L2385: +@ Patches/../C_code.c:5743: if (cap > GetGlobalStatCap()) movs r0, r5 @ , cap cmp r5, r3 @ , result - ble .L2377 @, -.L2401: -@ Patches/../C_code.c:5756: if (result > GetGlobalStatCap()) + ble .L2380 @, +.L2404: +@ Patches/../C_code.c:5761: if (result > GetGlobalStatCap()) movs r0, r3 @ , result - b .L2377 @ -.L2402: -@ Patches/../C_code.c:5749: int noise[4] = { 0, 0, 0, 0 }; + b .L2380 @ +.L2405: +@ Patches/../C_code.c:5754: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L2406+12 @ tmp186, + ldr r3, .L2409+12 @ tmp186, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:5750: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:5755: noise[0] = unit->pClassData->number; ldrb r3, [r4, #4] @ tmp190, str r3, [sp, #8] @ tmp190, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp192, movs r2, #37 @, str r3, [sp] @ tmp192, @@ -16738,14 +16769,14 @@ GetUnitMaxSpd: adds r3, r3, #1 @, add r1, sp, #8 @ tmp217,, bl HashPercent @ -@ Patches/../C_code.c:5752: if (result < (cap >> 1)) +@ Patches/../C_code.c:5757: if (result < (cap >> 1)) asrs r3, r5, #1 @ tmp195, cap, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp207 -@ Patches/../C_code.c:5752: if (result < (cap >> 1)) +@ Patches/../C_code.c:5757: if (result < (cap >> 1)) cmp r3, r0 @ tmp195, result - ble .L2387 @, -@ Patches/../C_code.c:5754: result += HashByte_Global(cap, (cap / 2), noise, 33); + ble .L2390 @, +@ Patches/../C_code.c:5759: result += HashByte_Global(cap, (cap / 2), noise, 33); lsrs r1, r5, #31 @ tmp198, cap, adds r1, r1, r5 @ tmp199, tmp198, cap movs r3, #33 @, @@ -16753,44 +16784,44 @@ GetUnitMaxSpd: asrs r1, r1, #1 @ tmp200, tmp199, add r2, sp, #8 @ tmp218,, bl HashByte_Global @ -@ Patches/../C_code.c:5754: result += HashByte_Global(cap, (cap / 2), noise, 33); +@ Patches/../C_code.c:5759: result += HashByte_Global(cap, (cap / 2), noise, 33); adds r4, r4, r0 @ result, result, tmp208 -.L2387: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2390: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat cmp r3, r6 @ result, result - bgt .L2404 @, -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L2407 @, +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - beq .L2405 @, -.L2389: -@ Patches/../C_code.c:5756: if (result > GetGlobalStatCap()) + beq .L2408 @, +.L2392: +@ Patches/../C_code.c:5761: if (result > GetGlobalStatCap()) movs r0, r4 @ , result cmp r4, r3 @ , result - ble .L2377 @, - b .L2401 @ -.L2391: -@ Patches/../C_code.c:5734: { + ble .L2380 @, + b .L2404 @ +.L2394: +@ Patches/../C_code.c:5739: { movs r2, #1 @ result, rsbs r2, r2, #0 @ result, result - b .L2380 @ -.L2404: -@ Patches/../C_code.c:3528: if (result > maxStat) + b .L2383 @ +.L2407: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r6 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - bne .L2389 @, - b .L2405 @ -.L2403: -@ Patches/../C_code.c:3540: result = 30; + bne .L2392 @, + b .L2408 @ +.L2406: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L2382 @ -.L2405: + b .L2385 @ +.L2408: adds r3, r3, #31 @ result, - b .L2389 @ -.L2407: + b .L2392 @ +.L2410: .align 2 -.L2406: +.L2409: .word RandBitflags .word CharExceptions .word maxStat @@ -16808,108 +16839,108 @@ GetUnitMaxDef: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r6, #224 @ tmp162, -@ Patches/../C_code.c:5765: int cap = ((unit)->pClassData->maxDef); // return cap; +@ Patches/../C_code.c:5770: int cap = ((unit)->pClassData->maxDef); // return cap; movs r5, #23 @ cap, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L2437 @ tmp150, - ldr r3, [r3] @ RandBitflags.64_30, RandBitflags -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldrh r1, [r3] @ *RandBitflags.64_30, *RandBitflags.64_30 - lsls r2, r1, #23 @ tmp155, *RandBitflags.64_30, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L2440 @ tmp150, + ldr r3, [r3] @ RandBitflags.65_30, RandBitflags +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldrh r1, [r3] @ *RandBitflags.65_30, *RandBitflags.65_30 + lsls r2, r1, #23 @ tmp155, *RandBitflags.65_30, lsrs r2, r2, #29 @ pretmp_75, tmp155, -@ Patches/../C_code.c:5765: int cap = ((unit)->pClassData->maxDef); // return cap; +@ Patches/../C_code.c:5770: int cap = ((unit)->pClassData->maxDef); // return cap; ldr r4, [r0, #4] @ _1, unit_15(D)->pClassData subs r3, r2, #2 @ tmp157, pretmp_75, lsls r3, r3, #24 @ tmp158, tmp157, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) lsls r6, r6, #1 @ tmp162, tmp162, -@ Patches/../C_code.c:5765: int cap = ((unit)->pClassData->maxDef); // return cap; +@ Patches/../C_code.c:5770: int cap = ((unit)->pClassData->maxDef); // return cap; ldrsb r5, [r4, r5] @ cap,* cap -@ Patches/../C_code.c:5764: { +@ Patches/../C_code.c:5769: { sub sp, sp, #28 @,, lsrs r3, r3, #24 @ _77, tmp158, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r6 @ *RandBitflags.64_30, tmp162 - beq .L2409 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r6 @ *RandBitflags.65_30, tmp162 + beq .L2412 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r0, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r0, [r0, #4] @ tmp168, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L2437+4 @ tmp166, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L2440+4 @ tmp166, lsls r0, r0, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:5766: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:5771: if (!ShouldRandomizeStatCaps(unit)) ldrb r1, [r0, r1] @ tmp170, CharExceptions cmp r1, #0 @ tmp170, - bne .L2409 @, + bne .L2412 @, cmp r3, #4 @ _77, - bhi .L2424 @, + bhi .L2427 @, lsls r6, r2, #4 @ tmp180, pretmp_75, subs r6, r6, r2 @ tmp181, tmp180, pretmp_75 subs r6, r6, #30 @ result, -.L2416: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r7, .L2437+8 @ tmp205, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2419: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r7, .L2440+8 @ tmp205, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r7] @ , maxStat cmp r0, r6 @ , result - ble .L2417 @, + ble .L2420 @, movs r0, r6 @ , result -.L2417: -@ Patches/../C_code.c:5775: if (max != (-1)) +.L2420: +@ Patches/../C_code.c:5780: if (max != (-1)) adds r3, r0, #1 @ tmp213, , - beq .L2433 @, -.L2408: -@ Patches/../C_code.c:5791: } + beq .L2436 @, +.L2411: +@ Patches/../C_code.c:5796: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2424: -@ Patches/../C_code.c:5766: if (!ShouldRandomizeStatCaps(unit)) +.L2427: +@ Patches/../C_code.c:5771: if (!ShouldRandomizeStatCaps(unit)) movs r6, #1 @ result, rsbs r6, r6, #0 @ result, result - b .L2416 @ -.L2409: + b .L2419 @ +.L2412: cmp r3, #4 @ _77, - bhi .L2422 @, + bhi .L2425 @, lsls r3, r2, #4 @ tmp174, pretmp_75, subs r2, r3, r2 @ tmp175, tmp174, pretmp_75 subs r2, r2, #30 @ result, -.L2411: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r3, .L2437+8 @ tmp176, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2414: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r3, .L2440+8 @ tmp176, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r3] @ result, maxStat cmp r3, r2 @ result, result - ble .L2412 @, + ble .L2415 @, movs r3, r2 @ result, result -.L2412: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L2415: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp212, result, - beq .L2434 @, -.L2413: -@ Patches/../C_code.c:5768: if (cap > GetGlobalStatCap()) + beq .L2437 @, +.L2416: +@ Patches/../C_code.c:5773: if (cap > GetGlobalStatCap()) movs r0, r5 @ , cap cmp r5, r3 @ , result - ble .L2408 @, -.L2432: -@ Patches/../C_code.c:5786: if (result > GetGlobalStatCap()) + ble .L2411 @, +.L2435: +@ Patches/../C_code.c:5791: if (result > GetGlobalStatCap()) movs r0, r3 @ , result - b .L2408 @ -.L2433: -@ Patches/../C_code.c:5779: int noise[4] = { 0, 0, 0, 0 }; + b .L2411 @ +.L2436: +@ Patches/../C_code.c:5784: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L2437+12 @ tmp186, + ldr r3, .L2440+12 @ tmp186, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:5780: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:5785: noise[0] = unit->pClassData->number; ldrb r3, [r4, #4] @ tmp190, str r3, [sp, #8] @ tmp190, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp192, movs r2, #47 @, str r3, [sp] @ tmp192, @@ -16917,14 +16948,14 @@ GetUnitMaxDef: adds r3, r3, #1 @, add r1, sp, #8 @ tmp217,, bl HashPercent @ -@ Patches/../C_code.c:5782: if (result < (cap >> 1)) +@ Patches/../C_code.c:5787: if (result < (cap >> 1)) asrs r3, r5, #1 @ tmp195, cap, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp207 -@ Patches/../C_code.c:5782: if (result < (cap >> 1)) +@ Patches/../C_code.c:5787: if (result < (cap >> 1)) cmp r3, r0 @ tmp195, result - ble .L2418 @, -@ Patches/../C_code.c:5784: result += HashByte_Global(cap, (cap / 2), noise, 43); + ble .L2421 @, +@ Patches/../C_code.c:5789: result += HashByte_Global(cap, (cap / 2), noise, 43); lsrs r1, r5, #31 @ tmp198, cap, adds r1, r1, r5 @ tmp199, tmp198, cap movs r3, #43 @, @@ -16932,44 +16963,44 @@ GetUnitMaxDef: asrs r1, r1, #1 @ tmp200, tmp199, add r2, sp, #8 @ tmp218,, bl HashByte_Global @ -@ Patches/../C_code.c:5784: result += HashByte_Global(cap, (cap / 2), noise, 43); +@ Patches/../C_code.c:5789: result += HashByte_Global(cap, (cap / 2), noise, 43); adds r4, r4, r0 @ result, result, tmp208 -.L2418: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2421: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat cmp r3, r6 @ result, result - bgt .L2435 @, -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L2438 @, +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - beq .L2436 @, -.L2420: -@ Patches/../C_code.c:5786: if (result > GetGlobalStatCap()) + beq .L2439 @, +.L2423: +@ Patches/../C_code.c:5791: if (result > GetGlobalStatCap()) movs r0, r4 @ , result cmp r4, r3 @ , result - ble .L2408 @, - b .L2432 @ -.L2422: -@ Patches/../C_code.c:5764: { + ble .L2411 @, + b .L2435 @ +.L2425: +@ Patches/../C_code.c:5769: { movs r2, #1 @ result, rsbs r2, r2, #0 @ result, result - b .L2411 @ -.L2435: -@ Patches/../C_code.c:3528: if (result > maxStat) + b .L2414 @ +.L2438: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r6 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - bne .L2420 @, - b .L2436 @ -.L2434: -@ Patches/../C_code.c:3540: result = 30; + bne .L2423 @, + b .L2439 @ +.L2437: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L2413 @ -.L2436: + b .L2416 @ +.L2439: adds r3, r3, #31 @ result, - b .L2420 @ -.L2438: + b .L2423 @ +.L2441: .align 2 -.L2437: +.L2440: .word RandBitflags .word CharExceptions .word maxStat @@ -16987,108 +17018,108 @@ GetUnitMaxRes: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r6, #224 @ tmp162, -@ Patches/../C_code.c:5795: int cap = ((unit)->pClassData->maxRes); // return cap; +@ Patches/../C_code.c:5800: int cap = ((unit)->pClassData->maxRes); // return cap; movs r5, #24 @ cap, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - ldr r3, .L2468 @ tmp150, - ldr r3, [r3] @ RandBitflags.64_30, RandBitflags -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldrh r1, [r3] @ *RandBitflags.64_30, *RandBitflags.64_30 - lsls r2, r1, #23 @ tmp155, *RandBitflags.64_30, +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + ldr r3, .L2471 @ tmp150, + ldr r3, [r3] @ RandBitflags.65_30, RandBitflags +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldrh r1, [r3] @ *RandBitflags.65_30, *RandBitflags.65_30 + lsls r2, r1, #23 @ tmp155, *RandBitflags.65_30, lsrs r2, r2, #29 @ pretmp_75, tmp155, -@ Patches/../C_code.c:5795: int cap = ((unit)->pClassData->maxRes); // return cap; +@ Patches/../C_code.c:5800: int cap = ((unit)->pClassData->maxRes); // return cap; ldr r4, [r0, #4] @ _1, unit_15(D)->pClassData subs r3, r2, #2 @ tmp157, pretmp_75, lsls r3, r3, #24 @ tmp158, tmp157, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) lsls r6, r6, #1 @ tmp162, tmp162, -@ Patches/../C_code.c:5795: int cap = ((unit)->pClassData->maxRes); // return cap; +@ Patches/../C_code.c:5800: int cap = ((unit)->pClassData->maxRes); // return cap; ldrsb r5, [r4, r5] @ cap,* cap -@ Patches/../C_code.c:5794: { +@ Patches/../C_code.c:5799: { sub sp, sp, #28 @,, lsrs r3, r3, #24 @ _77, tmp158, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r6 @ *RandBitflags.64_30, tmp162 - beq .L2440 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r6 @ *RandBitflags.65_30, tmp162 + beq .L2443 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r0, [r0] @ MEM[(const struct CharacterData * *)unit_15(D)], MEM[(const struct CharacterData * *)unit_15(D)] ldrb r0, [r0, #4] @ tmp168, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r1, .L2468+4 @ tmp166, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r1, .L2471+4 @ tmp166, lsls r0, r0, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:5796: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:5801: if (!ShouldRandomizeStatCaps(unit)) ldrb r1, [r0, r1] @ tmp170, CharExceptions cmp r1, #0 @ tmp170, - bne .L2440 @, + bne .L2443 @, cmp r3, #4 @ _77, - bhi .L2455 @, + bhi .L2458 @, lsls r6, r2, #4 @ tmp180, pretmp_75, subs r6, r6, r2 @ tmp181, tmp180, pretmp_75 subs r6, r6, #30 @ result, -.L2447: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r7, .L2468+8 @ tmp205, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2450: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r7, .L2471+8 @ tmp205, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r7] @ , maxStat cmp r0, r6 @ , result - ble .L2448 @, + ble .L2451 @, movs r0, r6 @ , result -.L2448: -@ Patches/../C_code.c:5805: if (max != (-1)) +.L2451: +@ Patches/../C_code.c:5810: if (max != (-1)) adds r3, r0, #1 @ tmp213, , - beq .L2464 @, -.L2439: -@ Patches/../C_code.c:5821: } + beq .L2467 @, +.L2442: +@ Patches/../C_code.c:5826: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2455: -@ Patches/../C_code.c:5796: if (!ShouldRandomizeStatCaps(unit)) +.L2458: +@ Patches/../C_code.c:5801: if (!ShouldRandomizeStatCaps(unit)) movs r6, #1 @ result, rsbs r6, r6, #0 @ result, result - b .L2447 @ -.L2440: + b .L2450 @ +.L2443: cmp r3, #4 @ _77, - bhi .L2453 @, + bhi .L2456 @, lsls r3, r2, #4 @ tmp174, pretmp_75, subs r2, r3, r2 @ tmp175, tmp174, pretmp_75 subs r2, r2, #30 @ result, -.L2442: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r3, .L2468+8 @ tmp176, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2445: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r3, .L2471+8 @ tmp176, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r3] @ result, maxStat cmp r3, r2 @ result, result - ble .L2443 @, + ble .L2446 @, movs r3, r2 @ result, result -.L2443: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L2446: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp212, result, - beq .L2465 @, -.L2444: -@ Patches/../C_code.c:5798: if (cap > GetGlobalStatCap()) + beq .L2468 @, +.L2447: +@ Patches/../C_code.c:5803: if (cap > GetGlobalStatCap()) movs r0, r5 @ , cap cmp r5, r3 @ , result - ble .L2439 @, -.L2463: -@ Patches/../C_code.c:5816: if (result > GetGlobalStatCap()) + ble .L2442 @, +.L2466: +@ Patches/../C_code.c:5821: if (result > GetGlobalStatCap()) movs r0, r3 @ , result - b .L2439 @ -.L2464: -@ Patches/../C_code.c:5809: int noise[4] = { 0, 0, 0, 0 }; + b .L2442 @ +.L2467: +@ Patches/../C_code.c:5814: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L2468+12 @ tmp186, + ldr r3, .L2471+12 @ tmp186, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:5810: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:5815: noise[0] = unit->pClassData->number; ldrb r3, [r4, #4] @ tmp190, str r3, [sp, #8] @ tmp190, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp192, movs r2, #57 @, str r3, [sp] @ tmp192, @@ -17096,14 +17127,14 @@ GetUnitMaxRes: adds r3, r3, #1 @, add r1, sp, #8 @ tmp217,, bl HashPercent @ -@ Patches/../C_code.c:5812: if (result < (cap >> 1)) +@ Patches/../C_code.c:5817: if (result < (cap >> 1)) asrs r3, r5, #1 @ tmp195, cap, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r4, r0 @ result, tmp207 -@ Patches/../C_code.c:5812: if (result < (cap >> 1)) +@ Patches/../C_code.c:5817: if (result < (cap >> 1)) cmp r3, r0 @ tmp195, result - ble .L2449 @, -@ Patches/../C_code.c:5814: result += HashByte_Global(cap, (cap / 2), noise, 53); + ble .L2452 @, +@ Patches/../C_code.c:5819: result += HashByte_Global(cap, (cap / 2), noise, 53); lsrs r1, r5, #31 @ tmp198, cap, adds r1, r1, r5 @ tmp199, tmp198, cap movs r3, #53 @, @@ -17111,44 +17142,44 @@ GetUnitMaxRes: asrs r1, r1, #1 @ tmp200, tmp199, add r2, sp, #8 @ tmp218,, bl HashByte_Global @ -@ Patches/../C_code.c:5814: result += HashByte_Global(cap, (cap / 2), noise, 53); +@ Patches/../C_code.c:5819: result += HashByte_Global(cap, (cap / 2), noise, 53); adds r4, r4, r0 @ result, result, tmp208 -.L2449: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2452: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r7] @ result, maxStat cmp r3, r6 @ result, result - bgt .L2466 @, -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L2469 @, +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - beq .L2467 @, -.L2451: -@ Patches/../C_code.c:5816: if (result > GetGlobalStatCap()) + beq .L2470 @, +.L2454: +@ Patches/../C_code.c:5821: if (result > GetGlobalStatCap()) movs r0, r4 @ , result cmp r4, r3 @ , result - ble .L2439 @, - b .L2463 @ -.L2453: -@ Patches/../C_code.c:5794: { + ble .L2442 @, + b .L2466 @ +.L2456: +@ Patches/../C_code.c:5799: { movs r2, #1 @ result, rsbs r2, r2, #0 @ result, result - b .L2442 @ -.L2466: -@ Patches/../C_code.c:3528: if (result > maxStat) + b .L2445 @ +.L2469: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r6 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp214, result, - bne .L2451 @, - b .L2467 @ -.L2465: -@ Patches/../C_code.c:3540: result = 30; + bne .L2454 @, + b .L2470 @ +.L2468: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L2444 @ -.L2467: + b .L2447 @ +.L2470: adds r3, r3, #31 @ result, - b .L2451 @ -.L2469: + b .L2454 @ +.L2472: .align 2 -.L2468: +.L2471: .word RandBitflags .word CharExceptions .word maxStat @@ -17167,63 +17198,63 @@ GetUnitMaxLck: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ mov lr, r8 @, -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - ldr r3, .L2489 @ tmp143, - ldr r3, [r3] @ RandBitflags.151_26, RandBitflags - ldrh r1, [r3] @ *RandBitflags.151_26, *RandBitflags.151_26 -@ Patches/../C_code.c:5824: { +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + ldr r3, .L2492 @ tmp143, + ldr r3, [r3] @ RandBitflags.152_26, RandBitflags + ldrh r1, [r3] @ *RandBitflags.152_26, *RandBitflags.152_26 +@ Patches/../C_code.c:5829: { push {lr} @ -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) - lsls r2, r1, #23 @ tmp148, *RandBitflags.151_26, +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) + lsls r2, r1, #23 @ tmp148, *RandBitflags.152_26, lsrs r2, r2, #29 @ _27, tmp148, subs r3, r2, #2 @ tmp150, _27, lsls r3, r3, #24 @ tmp154, tmp150, -@ Patches/../C_code.c:5824: { +@ Patches/../C_code.c:5829: { movs r5, r0 @ unit, tmp196 sub sp, sp, #24 @,, lsrs r3, r3, #24 @ tmp153, tmp154, cmp r3, #4 @ tmp153, - bhi .L2479 @, + bhi .L2482 @, lsls r4, r2, #4 @ tmp156, _27, subs r4, r4, r2 @ tmp157, tmp156, _27 subs r4, r4, #30 @ result, -.L2471: -@ Patches/../C_code.c:3528: if (result > maxStat) - ldr r6, .L2489+4 @ tmp194, -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2474: +@ Patches/../C_code.c:3533: if (result > maxStat) + ldr r6, .L2492+4 @ tmp194, +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r0, [r6] @ , maxStat cmp r0, r4 @ , result - ble .L2472 @, + ble .L2475 @, movs r0, r4 @ , result -.L2472: -@ Patches/../C_code.c:3538: if (result == (-1)) +.L2475: +@ Patches/../C_code.c:3543: if (result == (-1)) adds r3, r0, #1 @ tmp201, , - beq .L2480 @, -@ Patches/../C_code.c:3537: int result = GetGeneralStatCap(); + beq .L2483 @, +@ Patches/../C_code.c:3542: int result = GetGeneralStatCap(); movs r7, r0 @ result, -.L2473: -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) +.L2476: +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) movs r3, #224 @ tmp162, lsls r3, r3, #1 @ tmp162, tmp162, -@ Patches/../C_code.c:1981: if (!RandBitflags->caps) - tst r1, r3 @ *RandBitflags.151_26, tmp162 - beq .L2482 @, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; +@ Patches/../C_code.c:1986: if (!RandBitflags->caps) + tst r1, r3 @ *RandBitflags.152_26, tmp162 + beq .L2485 @, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; ldr r2, [r5] @ MEM[(const struct CharacterData * *)unit_14(D)], MEM[(const struct CharacterData * *)unit_14(D)] ldrb r2, [r2, #4] @ tmp168, -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L2489+8 @ tmp166, +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L2492+8 @ tmp166, lsls r2, r2, #1 @ tmp169, tmp168, -@ Patches/../C_code.c:5826: if (!ShouldRandomizeStatCaps(unit)) +@ Patches/../C_code.c:5831: if (!ShouldRandomizeStatCaps(unit)) ldrb r3, [r2, r3] @ tmp170, CharExceptions mov r8, r3 @ tmp170, tmp170 cmp r3, #0 @ tmp170, - bne .L2482 @, -@ Patches/../C_code.c:5835: if (max != (-1)) + bne .L2485 @, +@ Patches/../C_code.c:5840: if (max != (-1)) adds r3, r0, #1 @ tmp202, , - beq .L2486 @, -.L2470: -@ Patches/../C_code.c:5851: } + beq .L2489 @, +.L2473: +@ Patches/../C_code.c:5856: } add sp, sp, #24 @,, @ sp needed @ pop {r7} @@ -17231,23 +17262,23 @@ GetUnitMaxLck: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2479: -@ Patches/../C_code.c:3490: switch (RandBitflags->caps) +.L2482: +@ Patches/../C_code.c:3495: switch (RandBitflags->caps) movs r4, #1 @ result, rsbs r4, r4, #0 @ result, result - b .L2471 @ -.L2486: -@ Patches/../C_code.c:5839: int noise[4] = { 0, 0, 0, 0 }; + b .L2474 @ +.L2489: +@ Patches/../C_code.c:5844: int noise[4] = { 0, 0, 0, 0 }; movs r2, #12 @, movs r1, #0 @, - ldr r3, .L2489+12 @ tmp174, + ldr r3, .L2492+12 @ tmp174, add r0, sp, #12 @,, bl .L14 @ -@ Patches/../C_code.c:5840: noise[0] = unit->pClassData->number; +@ Patches/../C_code.c:5845: noise[0] = unit->pClassData->number; ldr r3, [r5, #4] @ unit_14(D)->pClassData, unit_14(D)->pClassData ldrb r3, [r3, #4] @ tmp179, str r3, [sp, #8] @ tmp179, noise[0] -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); mov r3, r8 @ tmp170, tmp170 movs r2, #67 @, str r3, [sp] @ tmp170, @@ -17255,14 +17286,14 @@ GetUnitMaxLck: movs r3, #1 @, add r1, sp, #8 @ tmp209,, bl HashPercent @ -@ Patches/../C_code.c:5842: if (result < (cap >> 1)) +@ Patches/../C_code.c:5847: if (result < (cap >> 1)) asrs r3, r7, #1 @ tmp184, result, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r5, r0 @ result, tmp197 -@ Patches/../C_code.c:5842: if (result < (cap >> 1)) +@ Patches/../C_code.c:5847: if (result < (cap >> 1)) cmp r3, r0 @ tmp184, result - ble .L2475 @, -@ Patches/../C_code.c:5844: result += HashByte_Global(cap, (cap / 2), noise, 63); + ble .L2478 @, +@ Patches/../C_code.c:5849: result += HashByte_Global(cap, (cap / 2), noise, 63); lsrs r1, r7, #31 @ tmp187, result, adds r1, r1, r7 @ tmp188, tmp187, result movs r3, #63 @, @@ -17270,44 +17301,44 @@ GetUnitMaxLck: asrs r1, r1, #1 @ tmp189, tmp188, add r2, sp, #8 @ tmp210,, bl HashByte_Global @ -@ Patches/../C_code.c:5844: result += HashByte_Global(cap, (cap / 2), noise, 63); +@ Patches/../C_code.c:5849: result += HashByte_Global(cap, (cap / 2), noise, 63); adds r5, r5, r0 @ result, result, tmp198 -.L2475: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2478: +@ Patches/../C_code.c:3533: if (result > maxStat) ldr r3, [r6] @ result, maxStat cmp r3, r4 @ result, result - bgt .L2487 @, -@ Patches/../C_code.c:3538: if (result == (-1)) + bgt .L2490 @, +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp203, result, - beq .L2488 @, -.L2477: -@ Patches/../C_code.c:5846: if (result > GetGlobalStatCap()) + beq .L2491 @, +.L2480: +@ Patches/../C_code.c:5851: if (result > GetGlobalStatCap()) movs r0, r5 @ , result cmp r5, r3 @ , result - ble .L2470 @, + ble .L2473 @, movs r0, r3 @ , result - b .L2470 @ -.L2482: -@ Patches/../C_code.c:5832: return cap; + b .L2473 @ +.L2485: +@ Patches/../C_code.c:5837: return cap; movs r0, r7 @ , result - b .L2470 @ -.L2480: -@ Patches/../C_code.c:3540: result = 30; - movs r7, #30 @ result, b .L2473 @ -.L2487: -@ Patches/../C_code.c:3528: if (result > maxStat) +.L2483: +@ Patches/../C_code.c:3545: result = 30; + movs r7, #30 @ result, + b .L2476 @ +.L2490: +@ Patches/../C_code.c:3533: if (result > maxStat) movs r3, r4 @ result, result -@ Patches/../C_code.c:3538: if (result == (-1)) +@ Patches/../C_code.c:3543: if (result == (-1)) adds r2, r3, #1 @ tmp203, result, - bne .L2477 @, -.L2488: -@ Patches/../C_code.c:3540: result = 30; + bne .L2480 @, +.L2491: +@ Patches/../C_code.c:3545: result = 30; adds r3, r3, #31 @ result, - b .L2477 @ -.L2490: + b .L2480 @ +.L2493: .align 2 -.L2489: +.L2492: .word RandBitflags .word maxStat .word CharExceptions @@ -17327,54 +17358,54 @@ NewGetStatIncrease: push {r4, r5, r6, r7, lr} @ mov lr, r8 @, movs r4, r0 @ growth, tmp170 -@ Patches/../C_code.c:5865: int result = 0; +@ Patches/../C_code.c:5870: int result = 0; movs r5, #0 @ , -@ Patches/../C_code.c:5864: { +@ Patches/../C_code.c:5869: { push {lr} @ -@ Patches/../C_code.c:5867: while (growth > 100) +@ Patches/../C_code.c:5872: while (growth > 100) cmp r0, #100 @ growth, - ble .L2492 @, -.L2493: -@ Patches/../C_code.c:5870: growth -= 100; + ble .L2495 @, +.L2496: +@ Patches/../C_code.c:5875: growth -= 100; subs r4, r4, #100 @ growth, -@ Patches/../C_code.c:5869: result++; +@ Patches/../C_code.c:5874: result++; adds r5, r5, #1 @ , -@ Patches/../C_code.c:5867: while (growth > 100) +@ Patches/../C_code.c:5872: while (growth > 100) cmp r4, #100 @ growth, - bgt .L2493 @, -.L2492: -@ Patches/../C_code.c:5874: if ((RandBitflags->levelups == 2)) - ldr r0, .L2505 @ tmp136, + bgt .L2496 @, +.L2495: +@ Patches/../C_code.c:5879: if ((RandBitflags->levelups == 2)) + ldr r0, .L2508 @ tmp136, ldr r0, [r0] @ RandBitflags, RandBitflags - ldrb r6, [r0] @ *RandBitflags.227_1, *RandBitflags.227_1 + ldrb r6, [r0] @ *RandBitflags.228_1, *RandBitflags.228_1 movs r0, #48 @ tmp142, - ands r0, r6 @ _3, *RandBitflags.227_1 -@ Patches/../C_code.c:5874: if ((RandBitflags->levelups == 2)) + ands r0, r6 @ _3, *RandBitflags.228_1 +@ Patches/../C_code.c:5879: if ((RandBitflags->levelups == 2)) cmp r0, #32 @ _3, - beq .L2502 @, -@ Patches/../C_code.c:5890: if (!(RandBitflags->levelups)) + beq .L2505 @, +@ Patches/../C_code.c:5895: if (!(RandBitflags->levelups)) cmp r0, #0 @ _3, - beq .L2503 @, -@ Patches/../C_code.c:5888: offset += (level * 15) + level; + beq .L2506 @, +@ Patches/../C_code.c:5893: offset += (level * 15) + level; lsls r2, r2, #4 @ tmp152, level, -@ Patches/../C_code.c:5888: offset += (level * 15) + level; +@ Patches/../C_code.c:5893: offset += (level * 15) + level; adds r3, r2, r3 @ offset, tmp152, offset -@ Patches/../C_code.c:5897: else if (HashByte_Global(growth, 100, noise, offset) >= (100 - growth)) +@ Patches/../C_code.c:5902: else if (HashByte_Global(growth, 100, noise, offset) >= (100 - growth)) movs r0, r4 @, growth movs r2, r1 @, noise movs r1, #100 @, bl HashByte_Global @ -@ Patches/../C_code.c:5897: else if (HashByte_Global(growth, 100, noise, offset) >= (100 - growth)) +@ Patches/../C_code.c:5902: else if (HashByte_Global(growth, 100, noise, offset) >= (100 - growth)) movs r3, #100 @ tmp156, subs r3, r3, r4 @ tmp157, tmp156, growth -@ Patches/../C_code.c:5900: result++; +@ Patches/../C_code.c:5905: result++; asrs r2, r0, #31 @ tmp166, tmp154, lsrs r1, r3, #31 @ tmp167, tmp157, cmp r0, r3 @ tmp154, tmp157 adcs r2, r2, r1 @ tmp165, tmp166, tmp167 adds r5, r5, r2 @ , , tmp165 -.L2491: -@ Patches/../C_code.c:5904: } +.L2494: +@ Patches/../C_code.c:5909: } movs r0, r5 @, @ sp needed @ pop {r7} @@ -17382,51 +17413,51 @@ NewGetStatIncrease: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L2503: -@ Patches/../C_code.c:5892: if (Roll1RN(growth)) - ldr r3, .L2505+4 @ tmp149, +.L2506: +@ Patches/../C_code.c:5897: if (Roll1RN(growth)) + ldr r3, .L2508+4 @ tmp149, movs r0, r4 @, growth bl .L14 @ -@ Patches/../C_code.c:5894: result++; +@ Patches/../C_code.c:5899: result++; subs r3, r0, #1 @ tmp163, tmp176 sbcs r0, r0, r3 @ tmp162, tmp176, tmp163 adds r5, r5, r0 @ , , tmp162 - b .L2491 @ -.L2502: -@ Patches/../C_code.c:5876: if (level < 1) + b .L2494 @ +.L2505: +@ Patches/../C_code.c:5881: if (level < 1) cmp r2, #0 @ level, - ble .L2504 @, -.L2495: -@ Patches/../C_code.c:5881: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) + ble .L2507 @, +.L2498: +@ Patches/../C_code.c:5886: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) adds r2, r2, #1 @ tmp145, -@ Patches/../C_code.c:5881: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) +@ Patches/../C_code.c:5886: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) movs r6, r4 @ _5, growth muls r6, r2 @ _5, tmp145 - ldr r3, .L2505+8 @ tmp146, + ldr r3, .L2508+8 @ tmp146, movs r1, #100 @, movs r0, r6 @, _5 mov r8, r3 @ tmp146, tmp146 bl .L14 @ -@ Patches/../C_code.c:5881: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) +@ Patches/../C_code.c:5886: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) movs r1, #100 @, -@ Patches/../C_code.c:5881: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) +@ Patches/../C_code.c:5886: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) movs r7, r0 @ _6, tmp174 -@ Patches/../C_code.c:5881: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) +@ Patches/../C_code.c:5886: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) adds r0, r6, r4 @ tmp147, _5, growth - bl .L208 @ -@ Patches/../C_code.c:5881: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) + bl .L211 @ +@ Patches/../C_code.c:5886: if (Div1((growth * (level + 1)), 100) < Div1((growth * (level + 2)), 100)) cmp r7, r0 @ _6, tmp175 - bge .L2491 @, -@ Patches/../C_code.c:5883: result++; + bge .L2494 @, +@ Patches/../C_code.c:5888: result++; adds r5, r5, #1 @ , - b .L2491 @ -.L2504: -@ Patches/../C_code.c:5876: if (level < 1) + b .L2494 @ +.L2507: +@ Patches/../C_code.c:5881: if (level < 1) movs r2, #1 @ level, - b .L2495 @ -.L2506: + b .L2498 @ +.L2509: .align 2 -.L2505: +.L2508: .word RandBitflags .word Roll1RN .word Div1 @@ -17448,158 +17479,158 @@ UnitLevelUp: mov r6, r9 @, mov r5, r8 @, push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:5910: if (unit->level != 20) +@ Patches/../C_code.c:5915: if (unit->level != 20) movs r7, #8 @ _1, ldrsb r7, [r0, r7] @ _1,* _1 -@ Patches/../C_code.c:5909: { +@ Patches/../C_code.c:5914: { movs r4, r0 @ unit, tmp367 sub sp, sp, #108 @,, -@ Patches/../C_code.c:5910: if (unit->level != 20) +@ Patches/../C_code.c:5915: if (unit->level != 20) cmp r7, #20 @ _1, - bne .LCB14839 @ - b .L2507 @long jump @ -.LCB14839: -@ Patches/../C_code.c:5916: unit->level++; + bne .LCB14863 @ + b .L2510 @long jump @ +.LCB14863: +@ Patches/../C_code.c:5921: unit->level++; adds r7, r7, #1 @ tmp247, lsls r7, r7, #24 @ tmp248, tmp247, asrs r7, r7, #24 @ _4, tmp248, strb r7, [r0, #8] @ _4, unit_168(D)->level -@ Patches/../C_code.c:5918: int noise[4] = { 0, 0, 0, 0 }; - ldr r3, .L2610 @ tmp253, +@ Patches/../C_code.c:5923: int noise[4] = { 0, 0, 0, 0 }; + ldr r3, .L2613 @ tmp253, movs r2, #12 @, movs r1, #0 @, add r0, sp, #92 @,, bl .L14 @ -@ Patches/../C_code.c:5919: noise[0] = unit->pCharacterData->number; +@ Patches/../C_code.c:5924: noise[0] = unit->pCharacterData->number; ldr r3, [r4] @ unit_168(D)->pCharacterData, unit_168(D)->pCharacterData ldrb r3, [r3, #4] @ tmp258, str r3, [sp, #88] @ tmp258, noise[0] -@ Patches/../C_code.c:5920: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:5925: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); ldr r3, [r4, #4] @ unit_168(D)->pClassData, unit_168(D)->pClassData -@ Patches/../C_code.c:5920: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:5925: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); ldr r3, [r3, #40] @ _9->attributes, _9->attributes -@ Patches/../C_code.c:5920: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:5925: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); movs r6, r7 @ _8, _4 -@ Patches/../C_code.c:5920: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:5925: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); lsls r3, r3, #23 @ tmp397, _9->attributes, - bpl .L2509 @, -@ Patches/../C_code.c:5920: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); + bpl .L2512 @, +@ Patches/../C_code.c:5925: int level = unit->level + (((unit->pClassData->attributes & CA_PROMOTED) != 0) * 20); adds r6, r6, #20 @ _8, -.L2509: -@ Patches/../C_code.c:5923: if (unit->level == 20) +.L2512: +@ Patches/../C_code.c:5928: if (unit->level == 20) subs r7, r7, #20 @ tmp268, rsbs r3, r7, #0 @ tmp269, tmp268 adcs r7, r7, r3 @ tmp267, tmp268, tmp269 -@ Patches/../C_code.c:5921: int useRN = !(IsAnythingRandomized()); +@ Patches/../C_code.c:5926: int useRN = !(IsAnythingRandomized()); bl IsAnythingRandomized @ -@ Patches/../C_code.c:5923: if (unit->level == 20) +@ Patches/../C_code.c:5928: if (unit->level == 20) rsbs r7, r7, #0 @ tmp270, tmp267 -@ Patches/../C_code.c:5921: int useRN = !(IsAnythingRandomized()); +@ Patches/../C_code.c:5926: int useRN = !(IsAnythingRandomized()); rsbs r5, r0, #0 @ tmp264, tmp368 adcs r5, r5, r0 @ tmp264, tmp368 -@ Patches/../C_code.c:5929: int hpGrowth = GetUnitHPGrowth(unit, true); +@ Patches/../C_code.c:5934: int hpGrowth = GetUnitHPGrowth(unit, true); movs r1, #1 @, strb r7, [r4, #9] @ tmp270, MEM [(void *)unit_168(D)].exp movs r0, r4 @, unit bl GetUnitHPGrowth @ -@ Patches/../C_code.c:5930: int powGrowth = GetUnitPowGrowth(unit, true); +@ Patches/../C_code.c:5935: int powGrowth = GetUnitPowGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:5929: int hpGrowth = GetUnitHPGrowth(unit, true); +@ Patches/../C_code.c:5934: int hpGrowth = GetUnitHPGrowth(unit, true); movs r7, r0 @ hpGrowth, tmp369 str r0, [sp, #76] @ hpGrowth, %sfp -@ Patches/../C_code.c:5930: int powGrowth = GetUnitPowGrowth(unit, true); +@ Patches/../C_code.c:5935: int powGrowth = GetUnitPowGrowth(unit, true); movs r0, r4 @, unit bl GetUnitPowGrowth @ -@ Patches/../C_code.c:5931: int sklGrowth = GetUnitSklGrowth(unit, true); +@ Patches/../C_code.c:5936: int sklGrowth = GetUnitSklGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:5930: int powGrowth = GetUnitPowGrowth(unit, true); +@ Patches/../C_code.c:5935: int powGrowth = GetUnitPowGrowth(unit, true); str r0, [sp, #36] @ tmp370, %sfp -@ Patches/../C_code.c:5931: int sklGrowth = GetUnitSklGrowth(unit, true); +@ Patches/../C_code.c:5936: int sklGrowth = GetUnitSklGrowth(unit, true); movs r0, r4 @, unit bl GetUnitSklGrowth @ -@ Patches/../C_code.c:5932: int spdGrowth = GetUnitSpdGrowth(unit, true); +@ Patches/../C_code.c:5937: int spdGrowth = GetUnitSpdGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:5931: int sklGrowth = GetUnitSklGrowth(unit, true); +@ Patches/../C_code.c:5936: int sklGrowth = GetUnitSklGrowth(unit, true); str r0, [sp, #44] @ tmp371, %sfp -@ Patches/../C_code.c:5932: int spdGrowth = GetUnitSpdGrowth(unit, true); +@ Patches/../C_code.c:5937: int spdGrowth = GetUnitSpdGrowth(unit, true); movs r0, r4 @, unit bl GetUnitSpdGrowth @ -@ Patches/../C_code.c:5933: int defGrowth = GetUnitDefGrowth(unit, true); +@ Patches/../C_code.c:5938: int defGrowth = GetUnitDefGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:5932: int spdGrowth = GetUnitSpdGrowth(unit, true); +@ Patches/../C_code.c:5937: int spdGrowth = GetUnitSpdGrowth(unit, true); str r0, [sp, #48] @ tmp372, %sfp -@ Patches/../C_code.c:5933: int defGrowth = GetUnitDefGrowth(unit, true); +@ Patches/../C_code.c:5938: int defGrowth = GetUnitDefGrowth(unit, true); movs r0, r4 @, unit bl GetUnitDefGrowth @ -@ Patches/../C_code.c:5934: int resGrowth = GetUnitResGrowth(unit, true); +@ Patches/../C_code.c:5939: int resGrowth = GetUnitResGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:5933: int defGrowth = GetUnitDefGrowth(unit, true); +@ Patches/../C_code.c:5938: int defGrowth = GetUnitDefGrowth(unit, true); str r0, [sp, #52] @ tmp373, %sfp -@ Patches/../C_code.c:5934: int resGrowth = GetUnitResGrowth(unit, true); +@ Patches/../C_code.c:5939: int resGrowth = GetUnitResGrowth(unit, true); movs r0, r4 @, unit bl GetUnitResGrowth @ -@ Patches/../C_code.c:5935: int lckGrowth = GetUnitLckGrowth(unit, true); +@ Patches/../C_code.c:5940: int lckGrowth = GetUnitLckGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:5934: int resGrowth = GetUnitResGrowth(unit, true); +@ Patches/../C_code.c:5939: int resGrowth = GetUnitResGrowth(unit, true); str r0, [sp, #56] @ tmp374, %sfp -@ Patches/../C_code.c:5935: int lckGrowth = GetUnitLckGrowth(unit, true); +@ Patches/../C_code.c:5940: int lckGrowth = GetUnitLckGrowth(unit, true); movs r0, r4 @, unit bl GetUnitLckGrowth @ -@ Patches/../C_code.c:5937: int maxHP = CallGetMaxHP(unit); - ldr r3, .L2610+4 @ tmp272, -@ Patches/../C_code.c:5935: int lckGrowth = GetUnitLckGrowth(unit, true); +@ Patches/../C_code.c:5942: int maxHP = CallGetMaxHP(unit); + ldr r3, .L2613+4 @ tmp272, +@ Patches/../C_code.c:5940: int lckGrowth = GetUnitLckGrowth(unit, true); str r0, [sp, #60] @ tmp375, %sfp -@ Patches/../C_code.c:5937: int maxHP = CallGetMaxHP(unit); +@ Patches/../C_code.c:5942: int maxHP = CallGetMaxHP(unit); movs r0, r4 @, unit bl .L14 @ str r0, [sp, #68] @ maxHP, %sfp mov r9, r0 @ maxHP, tmp376 -@ Patches/../C_code.c:5938: int maxPow = GetUnitMaxPow(unit); +@ Patches/../C_code.c:5943: int maxPow = GetUnitMaxPow(unit); movs r0, r4 @, unit bl GetUnitMaxPow @ str r0, [sp, #20] @ tmp377, %sfp -@ Patches/../C_code.c:5939: int maxSkl = GetUnitMaxSkl(unit); +@ Patches/../C_code.c:5944: int maxSkl = GetUnitMaxSkl(unit); movs r0, r4 @, unit bl GetUnitMaxSkl @ str r0, [sp, #24] @ tmp378, %sfp -@ Patches/../C_code.c:5940: int maxSpd = GetUnitMaxSpd(unit); +@ Patches/../C_code.c:5945: int maxSpd = GetUnitMaxSpd(unit); movs r0, r4 @, unit bl GetUnitMaxSpd @ str r0, [sp, #28] @ tmp379, %sfp -@ Patches/../C_code.c:5941: int maxDef = GetUnitMaxDef(unit); +@ Patches/../C_code.c:5946: int maxDef = GetUnitMaxDef(unit); movs r0, r4 @, unit bl GetUnitMaxDef @ str r0, [sp, #32] @ tmp380, %sfp -@ Patches/../C_code.c:5942: int maxRes = GetUnitMaxRes(unit); +@ Patches/../C_code.c:5947: int maxRes = GetUnitMaxRes(unit); movs r0, r4 @, unit bl GetUnitMaxRes @ str r0, [sp, #40] @ tmp381, %sfp -@ Patches/../C_code.c:5943: int maxLck = GetUnitMaxLck(unit); +@ Patches/../C_code.c:5948: int maxLck = GetUnitMaxLck(unit); movs r0, r4 @, unit bl GetUnitMaxLck @ -@ Patches/../C_code.c:5945: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); +@ Patches/../C_code.c:5950: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); movs r3, #1 @, -@ Patches/../C_code.c:5943: int maxLck = GetUnitMaxLck(unit); +@ Patches/../C_code.c:5948: int maxLck = GetUnitMaxLck(unit); str r0, [sp, #64] @ tmp382, %sfp -@ Patches/../C_code.c:5945: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); +@ Patches/../C_code.c:5950: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); movs r2, r6 @, _8 movs r0, r7 @, hpGrowth str r5, [sp] @ tmp264, add r1, sp, #88 @ tmp428,, bl NewGetStatIncrease @ mov r8, r0 @ hpGain, tmp383 -@ Patches/../C_code.c:5946: if (hpGain && (unit->maxHP + hpGain) <= maxHP) +@ Patches/../C_code.c:5951: if (hpGain && (unit->maxHP + hpGain) <= maxHP) cmp r0, #0 @ hpGain, - beq .L2510 @, -@ Patches/../C_code.c:5946: if (hpGain && (unit->maxHP + hpGain) <= maxHP) + beq .L2513 @, +@ Patches/../C_code.c:5951: if (hpGain && (unit->maxHP + hpGain) <= maxHP) movs r2, #18 @ tmp274, -@ Patches/../C_code.c:5949: hpGain = 0; +@ Patches/../C_code.c:5954: hpGain = 0; mov r0, r9 @ maxHP, maxHP -@ Patches/../C_code.c:5946: if (hpGain && (unit->maxHP + hpGain) <= maxHP) +@ Patches/../C_code.c:5951: if (hpGain && (unit->maxHP + hpGain) <= maxHP) ldrsb r2, [r4, r2] @ tmp274, -@ Patches/../C_code.c:5946: if (hpGain && (unit->maxHP + hpGain) <= maxHP) +@ Patches/../C_code.c:5951: if (hpGain && (unit->maxHP + hpGain) <= maxHP) add r2, r2, r8 @ tmp275, hpGain -@ Patches/../C_code.c:5949: hpGain = 0; +@ Patches/../C_code.c:5954: hpGain = 0; lsrs r3, r2, #31 @ tmp361, tmp275, asrs r1, r0, #31 @ tmp362, maxHP, cmp r0, r2 @ maxHP, tmp275 @@ -17608,8 +17639,8 @@ UnitLevelUp: rsbs r3, r3, #0 @ tmp363, tmp360 ands r2, r3 @ hpGain, tmp363 mov r8, r2 @ hpGain, hpGain -.L2510: -@ Patches/../C_code.c:5951: powGain = NewGetStatIncrease(powGrowth, noise, level, 2, useRN); +.L2513: +@ Patches/../C_code.c:5956: powGain = NewGetStatIncrease(powGrowth, noise, level, 2, useRN); movs r2, r6 @, _8 movs r3, #2 @, str r5, [sp] @ tmp264, @@ -17619,28 +17650,28 @@ UnitLevelUp: mov r7, r8 @ totalGain, hpGain subs r2, r0, #0 @ powGain, tmp384, str r0, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) - beq .L2511 @, -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) + beq .L2514 @, +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) movs r3, #20 @ tmp277, -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) mov ip, r0 @ powGain, powGain -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) ldrsb r3, [r4, r3] @ tmp277, -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) ldr r1, [sp, #20] @ maxPow, %sfp -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) add r3, r3, ip @ tmp278, powGain -@ Patches/../C_code.c:5952: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:5957: if (powGain && ((unit->pow + powGain) <= maxPow)) cmp r3, r1 @ tmp278, maxPow - ble .LCB14961 @ - b .L2536 @long jump @ -.LCB14961: -@ Patches/../C_code.c:5953: totalGain += powGain; + ble .LCB14985 @ + b .L2539 @long jump @ +.LCB14985: +@ Patches/../C_code.c:5958: totalGain += powGain; add r2, r2, r8 @ totalGain, hpGain movs r7, r2 @ totalGain, totalGain -.L2511: -@ Patches/../C_code.c:5957: sklGain = NewGetStatIncrease(sklGrowth, noise, level, 3, useRN); +.L2514: +@ Patches/../C_code.c:5962: sklGain = NewGetStatIncrease(sklGrowth, noise, level, 3, useRN); movs r3, #3 @, movs r2, r6 @, _8 str r5, [sp] @ tmp264, @@ -17648,25 +17679,25 @@ UnitLevelUp: add r1, sp, #88 @ tmp440,, bl NewGetStatIncrease @ mov r9, r0 @ sklGain, tmp385 -@ Patches/../C_code.c:5958: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:5963: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) cmp r0, #0 @ sklGain, - beq .L2512 @, -@ Patches/../C_code.c:5958: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) + beq .L2515 @, +@ Patches/../C_code.c:5963: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) movs r3, #21 @ tmp280, ldrsb r3, [r4, r3] @ tmp280, -@ Patches/../C_code.c:5958: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:5963: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) ldr r2, [sp, #24] @ maxSkl, %sfp -@ Patches/../C_code.c:5958: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:5963: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) add r3, r3, r9 @ tmp281, sklGain -@ Patches/../C_code.c:5958: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:5963: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) cmp r3, r2 @ tmp281, maxSkl - ble .LCB14980 @ - b .L2537 @long jump @ -.LCB14980: -@ Patches/../C_code.c:5959: totalGain += sklGain; + ble .LCB15004 @ + b .L2540 @long jump @ +.LCB15004: +@ Patches/../C_code.c:5964: totalGain += sklGain; add r7, r7, r9 @ totalGain, sklGain -.L2512: -@ Patches/../C_code.c:5963: spdGain = NewGetStatIncrease(spdGrowth, noise, level, 4, useRN); +.L2515: +@ Patches/../C_code.c:5968: spdGain = NewGetStatIncrease(spdGrowth, noise, level, 4, useRN); movs r3, #4 @, movs r2, r6 @, _8 str r5, [sp] @ tmp264, @@ -17674,25 +17705,25 @@ UnitLevelUp: add r1, sp, #88 @ tmp444,, bl NewGetStatIncrease @ mov r10, r0 @ spdGain, tmp386 -@ Patches/../C_code.c:5964: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:5969: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) cmp r0, #0 @ spdGain, - beq .L2513 @, -@ Patches/../C_code.c:5964: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) + beq .L2516 @, +@ Patches/../C_code.c:5969: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) movs r3, #22 @ tmp283, ldrsb r3, [r4, r3] @ tmp283, -@ Patches/../C_code.c:5964: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:5969: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) ldr r2, [sp, #28] @ maxSpd, %sfp -@ Patches/../C_code.c:5964: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:5969: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) add r3, r3, r10 @ tmp284, spdGain -@ Patches/../C_code.c:5964: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:5969: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) cmp r3, r2 @ tmp284, maxSpd - ble .LCB14998 @ - b .L2538 @long jump @ -.LCB14998: -@ Patches/../C_code.c:5965: totalGain += spdGain; + ble .LCB15022 @ + b .L2541 @long jump @ +.LCB15022: +@ Patches/../C_code.c:5970: totalGain += spdGain; add r7, r7, r10 @ totalGain, spdGain -.L2513: -@ Patches/../C_code.c:5969: defGain = NewGetStatIncrease(defGrowth, noise, level, 5, useRN); +.L2516: +@ Patches/../C_code.c:5974: defGain = NewGetStatIncrease(defGrowth, noise, level, 5, useRN); movs r3, #5 @, movs r2, r6 @, _8 str r5, [sp] @ tmp264, @@ -17700,25 +17731,25 @@ UnitLevelUp: add r1, sp, #88 @ tmp448,, bl NewGetStatIncrease @ mov fp, r0 @ defGain, tmp387 -@ Patches/../C_code.c:5970: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:5975: if (defGain && ((unit->def + defGain) <= maxDef)) cmp r0, #0 @ defGain, - beq .L2514 @, -@ Patches/../C_code.c:5970: if (defGain && ((unit->def + defGain) <= maxDef)) + beq .L2517 @, +@ Patches/../C_code.c:5975: if (defGain && ((unit->def + defGain) <= maxDef)) movs r3, #23 @ tmp286, ldrsb r3, [r4, r3] @ tmp286, -@ Patches/../C_code.c:5970: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:5975: if (defGain && ((unit->def + defGain) <= maxDef)) ldr r2, [sp, #32] @ maxDef, %sfp -@ Patches/../C_code.c:5970: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:5975: if (defGain && ((unit->def + defGain) <= maxDef)) add r3, r3, fp @ tmp287, defGain -@ Patches/../C_code.c:5970: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:5975: if (defGain && ((unit->def + defGain) <= maxDef)) cmp r3, r2 @ tmp287, maxDef - ble .LCB15016 @ - b .L2539 @long jump @ -.LCB15016: -@ Patches/../C_code.c:5971: totalGain += defGain; + ble .LCB15040 @ + b .L2542 @long jump @ +.LCB15040: +@ Patches/../C_code.c:5976: totalGain += defGain; add r7, r7, fp @ totalGain, defGain -.L2514: -@ Patches/../C_code.c:5975: resGain = NewGetStatIncrease(resGrowth, noise, level, 6, useRN); +.L2517: +@ Patches/../C_code.c:5980: resGain = NewGetStatIncrease(resGrowth, noise, level, 6, useRN); movs r3, #6 @, movs r2, r6 @, _8 str r5, [sp] @ tmp264, @@ -17726,212 +17757,212 @@ UnitLevelUp: add r1, sp, #88 @ tmp452,, bl NewGetStatIncrease @ str r0, [sp, #8] @ resGain, %sfp -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) cmp r0, #0 @ resGain, - beq .L2515 @, -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) + beq .L2518 @, +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) movs r3, #24 @ tmp289, -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) mov ip, r0 @ resGain, resGain -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) ldrsb r3, [r4, r3] @ tmp289, -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) ldr r1, [sp, #40] @ maxRes, %sfp -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) add r3, r3, ip @ tmp290, resGain -@ Patches/../C_code.c:5976: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:5981: if (resGain && ((unit->res + resGain) <= maxRes)) cmp r3, r1 @ tmp290, maxRes - ble .LCB15035 @ - b .L2540 @long jump @ -.LCB15035: -@ Patches/../C_code.c:5977: totalGain += resGain; + ble .LCB15059 @ + b .L2543 @long jump @ +.LCB15059: +@ Patches/../C_code.c:5982: totalGain += resGain; add r7, r7, ip @ totalGain, resGain -.L2515: -@ Patches/../C_code.c:5981: lckGain = NewGetStatIncrease(lckGrowth, noise, level, 7, useRN); +.L2518: +@ Patches/../C_code.c:5986: lckGain = NewGetStatIncrease(lckGrowth, noise, level, 7, useRN); movs r3, #7 @, movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #60] @, %sfp add r1, sp, #88 @ tmp460,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) cmp r0, #0 @ lckGain, - beq .L2516 @, -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) + beq .L2519 @, +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) movs r3, #25 @ tmp292, ldrsb r3, [r4, r3] @ tmp292, -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) ldr r2, [sp, #64] @ maxLck, %sfp -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) adds r3, r3, r0 @ tmp293, tmp292, lckGain -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) cmp r3, r2 @ tmp293, maxLck - ble .LCB15052 @ - b .L2541 @long jump @ -.LCB15052: -@ Patches/../C_code.c:5983: totalGain += lckGain; + ble .LCB15076 @ + b .L2544 @long jump @ +.LCB15076: +@ Patches/../C_code.c:5988: totalGain += lckGain; adds r7, r7, r0 @ totalGain, totalGain, lckGain -.L2516: -@ Patches/../C_code.c:5987: if (totalGain < MinimumStatUps) +.L2519: +@ Patches/../C_code.c:5992: if (totalGain < MinimumStatUps) cmp r7, #1 @ totalGain, - bgt .LCB15057 @ - b .L2601 @long jump @ -.LCB15057: -.L2517: -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) + bgt .LCB15081 @ + b .L2604 @long jump @ +.LCB15081: +.L2520: +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r1, #21 @ pretmp_389, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r2, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldrsb r1, [r4, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov ip, r2 @ powGain, powGain -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r2, r1 @ _405, pretmp_389 add r2, r2, r9 @ _405, sklGain movs r7, r2 @ _405, _405 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r2, #22 @ pretmp_412, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) movs r3, #20 @ pretmp_365, -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldrsb r2, [r4, r2] @ pretmp_412,* pretmp_412 movs r5, r2 @ pretmp_412, pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldrsb r3, [r4, r3] @ pretmp_365,* pretmp_365 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) str r2, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) add r3, r3, ip @ tmp358, powGain -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) mov r2, r10 @ _428, spdGain mov ip, r5 @ pretmp_412, pretmp_412 add r2, r2, ip @ _428, pretmp_412 str r2, [sp, #44] @ _428, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) movs r2, #23 @ pretmp_434, ldrsb r2, [r4, r2] @ pretmp_434,* pretmp_434 str r2, [sp, #36] @ pretmp_434, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) add r2, r2, fp @ _450, defGain str r2, [sp, #48] @ _450, %sfp -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldr r5, [sp, #8] @ _471, %sfp -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) movs r2, #24 @ pretmp_455, -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) mov ip, r5 @ _471, _471 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldrsb r2, [r4, r2] @ pretmp_455,* pretmp_455 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) add ip, ip, r2 @ _471, pretmp_455 mov r5, ip @ _471, _471 str r5, [sp, #52] @ _471, %sfp -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) movs r5, #25 @ pretmp_475, ldrsb r5, [r4, r5] @ pretmp_475,* pretmp_475 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) mov ip, r5 @ _491, _491 add ip, ip, r0 @ _491, lckGain -@ Patches/../C_code.c:5982: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:5987: if (lckGain && ((unit->lck + lckGain) <= maxLck)) str r5, [sp, #72] @ pretmp_475, %sfp -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) mov r5, ip @ _491, _491 str r5, [sp, #56] @ _491, %sfp -.L2520: -@ Patches/../C_code.c:6080: if ((unit->maxHP + hpGain) > maxHP) +.L2523: +@ Patches/../C_code.c:6085: if ((unit->maxHP + hpGain) > maxHP) movs r5, #18 @ _71, ldrsb r5, [r4, r5] @ _71,* _71 -@ Patches/../C_code.c:6080: if ((unit->maxHP + hpGain) > maxHP) +@ Patches/../C_code.c:6085: if ((unit->maxHP + hpGain) > maxHP) ldr r6, [sp, #68] @ maxHP, %sfp -@ Patches/../C_code.c:6080: if ((unit->maxHP + hpGain) > maxHP) +@ Patches/../C_code.c:6085: if ((unit->maxHP + hpGain) > maxHP) add r5, r5, r8 @ tmp357, hpGain -@ Patches/../C_code.c:6080: if ((unit->maxHP + hpGain) > maxHP) +@ Patches/../C_code.c:6085: if ((unit->maxHP + hpGain) > maxHP) cmp r5, r6 @ tmp357, maxHP - ble .L2527 @, + ble .L2530 @, movs r5, r6 @ tmp357, maxHP -.L2527: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +.L2530: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r6, [sp, #20] @ maxPow, %sfp cmp r6, r3 @ maxPow, tmp358 - bge .L2528 @, + bge .L2531 @, movs r3, r6 @ tmp358, maxPow -.L2528: -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +.L2531: +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldr r6, [sp, #24] @ maxSkl, %sfp cmp r6, r7 @ maxSkl, _405 - bge .L2529 @, -@ Patches/../C_code.c:6087: sklGain = maxSkl - unit->skl; + bge .L2532 @, +@ Patches/../C_code.c:6092: sklGain = maxSkl - unit->skl; subs r6, r6, r1 @ sklGain, maxSkl, pretmp_389 mov r9, r6 @ sklGain, sklGain -.L2529: -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +.L2532: +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldr r6, [sp, #28] @ maxSpd, %sfp ldr r7, [sp, #44] @ _428, %sfp cmp r6, r7 @ maxSpd, _428 - bge .L2530 @, -@ Patches/../C_code.c:6090: spdGain = maxSpd - unit->spd; + bge .L2533 @, +@ Patches/../C_code.c:6095: spdGain = maxSpd - unit->spd; ldr r7, [sp, #12] @ pretmp_412, %sfp subs r6, r6, r7 @ spdGain, maxSpd, pretmp_412 mov r10, r6 @ spdGain, spdGain -.L2530: -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +.L2533: +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) ldr r6, [sp, #32] @ maxDef, %sfp ldr r7, [sp, #48] @ _450, %sfp cmp r6, r7 @ maxDef, _450 - bge .L2531 @, -@ Patches/../C_code.c:6093: defGain = maxDef - unit->def; + bge .L2534 @, +@ Patches/../C_code.c:6098: defGain = maxDef - unit->def; ldr r7, [sp, #36] @ pretmp_434, %sfp subs r6, r6, r7 @ defGain, maxDef, pretmp_434 mov fp, r6 @ defGain, defGain -.L2531: -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +.L2534: +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldr r6, [sp, #40] @ maxRes, %sfp ldr r7, [sp, #52] @ _471, %sfp cmp r6, r7 @ maxRes, _471 - bge .L2532 @, -@ Patches/../C_code.c:6096: resGain = maxRes - unit->res; + bge .L2535 @, +@ Patches/../C_code.c:6101: resGain = maxRes - unit->res; subs r6, r6, r2 @ resGain, maxRes, pretmp_455 str r6, [sp, #8] @ resGain, %sfp -.L2532: -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +.L2535: +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) ldr r6, [sp, #64] @ maxLck, %sfp ldr r7, [sp, #56] @ _491, %sfp cmp r6, r7 @ maxLck, _491 - blt .L2602 @, -.L2533: -@ Patches/../C_code.c:6102: unit->pow += powGain; + blt .L2605 @, +.L2536: +@ Patches/../C_code.c:6107: unit->pow += powGain; strb r3, [r4, #20] @ tmp358, unit_168(D)->pow -@ Patches/../C_code.c:6105: unit->def += defGain; +@ Patches/../C_code.c:6110: unit->def += defGain; ldr r3, [sp, #36] @ pretmp_434, %sfp add r3, r3, fp @ pretmp_434, defGain strb r3, [r4, #23] @ tmp346, unit_168(D)->def -@ Patches/../C_code.c:6106: unit->res += resGain; +@ Patches/../C_code.c:6111: unit->res += resGain; ldr r3, [sp, #8] @ resGain, %sfp mov ip, r3 @ resGain, resGain -@ Patches/../C_code.c:6101: unit->maxHP += hpGain; +@ Patches/../C_code.c:6106: unit->maxHP += hpGain; strb r5, [r4, #18] @ tmp357, unit_168(D)->maxHP -@ Patches/../C_code.c:6107: unit->lck += lckGain; +@ Patches/../C_code.c:6112: unit->lck += lckGain; ldr r3, [sp, #72] @ pretmp_475, %sfp -@ Patches/../C_code.c:6104: unit->spd += spdGain; +@ Patches/../C_code.c:6109: unit->spd += spdGain; ldr r5, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6103: unit->skl += sklGain; +@ Patches/../C_code.c:6108: unit->skl += sklGain; add r1, r1, r9 @ pretmp_389, sklGain strb r1, [r4, #21] @ tmp338, unit_168(D)->skl -@ Patches/../C_code.c:6104: unit->spd += spdGain; +@ Patches/../C_code.c:6109: unit->spd += spdGain; add r5, r5, r10 @ pretmp_412, spdGain -@ Patches/../C_code.c:6106: unit->res += resGain; +@ Patches/../C_code.c:6111: unit->res += resGain; add r2, r2, ip @ tmp350, resGain -@ Patches/../C_code.c:6107: unit->lck += lckGain; +@ Patches/../C_code.c:6112: unit->lck += lckGain; adds r1, r3, r0 @ tmp354, pretmp_475, lckGain -@ Patches/../C_code.c:6104: unit->spd += spdGain; +@ Patches/../C_code.c:6109: unit->spd += spdGain; strb r5, [r4, #22] @ tmp342, unit_168(D)->spd -@ Patches/../C_code.c:6106: unit->res += resGain; +@ Patches/../C_code.c:6111: unit->res += resGain; strb r2, [r4, #24] @ tmp350, unit_168(D)->res -@ Patches/../C_code.c:6107: unit->lck += lckGain; +@ Patches/../C_code.c:6112: unit->lck += lckGain; strb r1, [r4, #25] @ tmp354, unit_168(D)->lck -.L2507: -@ Patches/../C_code.c:6109: } +.L2510: +@ Patches/../C_code.c:6114: } add sp, sp, #108 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -17942,643 +17973,643 @@ UnitLevelUp: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L2602: -@ Patches/../C_code.c:6099: lckGain = maxLck - unit->lck; +.L2605: +@ Patches/../C_code.c:6104: lckGain = maxLck - unit->lck; ldr r0, [sp, #72] @ pretmp_475, %sfp subs r0, r6, r0 @ lckGain, maxLck, pretmp_475 - b .L2533 @ -.L2611: + b .L2536 @ +.L2614: .align 2 -.L2610: +.L2613: .word memset .word CallGetMaxHP -.L2601: - movs r7, #8 @ ivtmp.1621, -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) +.L2604: + movs r7, #8 @ ivtmp.1626, +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) mov r9, r4 @ unit, unit ldr r3, [sp, #68] @ maxHP, %sfp asrs r3, r3, #31 @ tmp365, maxHP, str r3, [sp, #84] @ tmp365, %sfp -.L2526: -@ Patches/../C_code.c:6000: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); - movs r3, r7 @, ivtmp.1621 +.L2529: +@ Patches/../C_code.c:6005: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); + movs r3, r7 @, ivtmp.1626 movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #76] @, %sfp add r1, sp, #88 @ tmp464,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:5991: totalGain = 0; +@ Patches/../C_code.c:5996: totalGain = 0; movs r4, #0 @ totalGain, -@ Patches/../C_code.c:6000: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); +@ Patches/../C_code.c:6005: hpGain = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); str r0, [sp, #80] @ hpGain, %sfp -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) cmp r0, #0 @ hpGain, - beq .L2518 @, -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) + beq .L2521 @, +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) mov r3, r9 @ unit, unit -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) mov ip, r0 @ hpGain, hpGain -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) ldrb r3, [r3, #18] @ tmp295, lsls r3, r3, #24 @ tmp295, tmp295, asrs r3, r3, #24 @ tmp295, tmp295, -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) add r3, r3, ip @ tmp296, hpGain -@ Patches/../C_code.c:6002: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) +@ Patches/../C_code.c:6007: if (hpGain && ((unit->maxHP + hpGain) <= maxHP)) ldr r2, [sp, #84] @ tmp365, %sfp ldr r1, [sp, #68] @ maxHP, %sfp lsrs r4, r3, #31 @ tmp299, tmp296, cmp r1, r3 @ maxHP, tmp296 adcs r4, r4, r2 @ totalGain, tmp299, tmp365 -.L2518: -@ Patches/../C_code.c:6011: powGain = NewGetStatIncrease(powGrowth, noise, level, 9 + (i * 13), useRN); +.L2521: +@ Patches/../C_code.c:6016: powGain = NewGetStatIncrease(powGrowth, noise, level, 9 + (i * 13), useRN); movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #36] @, %sfp - adds r3, r7, #1 @ tmp301, ivtmp.1621, + adds r3, r7, #1 @ tmp301, ivtmp.1626, add r1, sp, #88 @ tmp471,, bl NewGetStatIncrease @ str r0, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) cmp r0, #0 @ powGain, - beq .L2519 @, -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) + beq .L2522 @, +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) mov r3, r9 @ unit, unit -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) mov ip, r0 @ powGain, powGain -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) ldrb r3, [r3, #20] @ pretmp_365, lsls r3, r3, #24 @ pretmp_365, pretmp_365, asrs r3, r3, #24 @ pretmp_365, pretmp_365, -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) ldr r2, [sp, #20] @ maxPow, %sfp -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) add r3, r3, ip @ tmp358, powGain -@ Patches/../C_code.c:6013: if (powGain && ((unit->pow + powGain) <= maxPow)) +@ Patches/../C_code.c:6018: if (powGain && ((unit->pow + powGain) <= maxPow)) cmp r3, r2 @ tmp358, maxPow - bgt .L2519 @, -@ Patches/../C_code.c:6016: if (totalGain >= MinimumStatUps) + bgt .L2522 @, +@ Patches/../C_code.c:6021: if (totalGain >= MinimumStatUps) cmp r4, #1 @ totalGain, - bne .LCB15249 @ - b .L2603 @long jump @ -.LCB15249: -@ Patches/../C_code.c:6015: totalGain++; + bne .LCB15273 @ + b .L2606 @long jump @ +.LCB15273: +@ Patches/../C_code.c:6020: totalGain++; movs r4, #1 @ totalGain, -.L2519: -@ Patches/../C_code.c:6022: sklGain = NewGetStatIncrease(sklGrowth, noise, level, 10 + (i * 13), useRN); +.L2522: +@ Patches/../C_code.c:6027: sklGain = NewGetStatIncrease(sklGrowth, noise, level, 10 + (i * 13), useRN); movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #44] @, %sfp - adds r3, r7, #2 @ tmp303, ivtmp.1621, + adds r3, r7, #2 @ tmp303, ivtmp.1626, add r1, sp, #88 @ tmp488,, bl NewGetStatIncrease @ mov r8, r0 @ sklGain, tmp392 -@ Patches/../C_code.c:6024: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:6029: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) cmp r0, #0 @ sklGain, - beq .L2521 @, -@ Patches/../C_code.c:6024: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) + beq .L2524 @, +@ Patches/../C_code.c:6029: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) mov r3, r9 @ unit, unit movs r1, #21 @ pretmp_389, ldrsb r1, [r3, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6024: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:6029: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) ldr r2, [sp, #24] @ maxSkl, %sfp -@ Patches/../C_code.c:6024: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:6029: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) adds r3, r1, r0 @ _405, pretmp_389, sklGain -@ Patches/../C_code.c:6024: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) +@ Patches/../C_code.c:6029: if (sklGain && ((unit->skl + sklGain) <= maxSkl)) cmp r3, r2 @ _405, maxSkl - bgt .L2521 @, -@ Patches/../C_code.c:6027: if (totalGain >= MinimumStatUps) + bgt .L2524 @, +@ Patches/../C_code.c:6032: if (totalGain >= MinimumStatUps) cmp r4, #1 @ totalGain, - bne .LCB15270 @ - b .L2604 @long jump @ -.LCB15270: -@ Patches/../C_code.c:6026: totalGain++; + bne .LCB15294 @ + b .L2607 @long jump @ +.LCB15294: +@ Patches/../C_code.c:6031: totalGain++; movs r4, #1 @ totalGain, -.L2521: -@ Patches/../C_code.c:6033: spdGain = NewGetStatIncrease(spdGrowth, noise, level, 11 + (i * 13), useRN); +.L2524: +@ Patches/../C_code.c:6038: spdGain = NewGetStatIncrease(spdGrowth, noise, level, 11 + (i * 13), useRN); movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #48] @, %sfp - adds r3, r7, #3 @ tmp305, ivtmp.1621, + adds r3, r7, #3 @ tmp305, ivtmp.1626, add r1, sp, #88 @ tmp505,, bl NewGetStatIncrease @ mov r10, r0 @ spdGain, tmp393 -@ Patches/../C_code.c:6035: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:6040: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) cmp r0, #0 @ spdGain, - beq .L2522 @, -@ Patches/../C_code.c:6035: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) + beq .L2525 @, +@ Patches/../C_code.c:6040: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) mov r3, r9 @ unit, unit ldrb r3, [r3, #22] @ pretmp_412, lsls r3, r3, #24 @ pretmp_412, pretmp_412, asrs r3, r3, #24 @ pretmp_412, pretmp_412, -@ Patches/../C_code.c:6035: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:6040: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) ldr r1, [sp, #28] @ maxSpd, %sfp -@ Patches/../C_code.c:6035: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:6040: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) adds r2, r3, r0 @ _428, pretmp_412, spdGain -@ Patches/../C_code.c:6035: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) +@ Patches/../C_code.c:6040: if (spdGain && ((unit->spd + spdGain) <= maxSpd)) cmp r2, r1 @ _428, maxSpd - bgt .L2522 @, -@ Patches/../C_code.c:6038: if (totalGain >= MinimumStatUps) + bgt .L2525 @, +@ Patches/../C_code.c:6043: if (totalGain >= MinimumStatUps) cmp r4, #1 @ totalGain, - bne .LCB15292 @ - b .L2605 @long jump @ -.LCB15292: -@ Patches/../C_code.c:6037: totalGain++; + bne .LCB15316 @ + b .L2608 @long jump @ +.LCB15316: +@ Patches/../C_code.c:6042: totalGain++; movs r4, #1 @ totalGain, -.L2522: -@ Patches/../C_code.c:6044: defGain = NewGetStatIncrease(defGrowth, noise, level, 12 + (i * 13), useRN); +.L2525: +@ Patches/../C_code.c:6049: defGain = NewGetStatIncrease(defGrowth, noise, level, 12 + (i * 13), useRN); movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #52] @, %sfp - adds r3, r7, #4 @ tmp307, ivtmp.1621, + adds r3, r7, #4 @ tmp307, ivtmp.1626, add r1, sp, #88 @ tmp521,, bl NewGetStatIncrease @ mov fp, r0 @ defGain, tmp394 -@ Patches/../C_code.c:6046: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:6051: if (defGain && ((unit->def + defGain) <= maxDef)) cmp r0, #0 @ defGain, - beq .L2523 @, -@ Patches/../C_code.c:6046: if (defGain && ((unit->def + defGain) <= maxDef)) + beq .L2526 @, +@ Patches/../C_code.c:6051: if (defGain && ((unit->def + defGain) <= maxDef)) mov r3, r9 @ unit, unit ldrb r3, [r3, #23] @ pretmp_434, lsls r3, r3, #24 @ pretmp_434, pretmp_434, asrs r3, r3, #24 @ pretmp_434, pretmp_434, -@ Patches/../C_code.c:6046: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:6051: if (defGain && ((unit->def + defGain) <= maxDef)) ldr r1, [sp, #32] @ maxDef, %sfp -@ Patches/../C_code.c:6046: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:6051: if (defGain && ((unit->def + defGain) <= maxDef)) adds r2, r3, r0 @ _450, pretmp_434, defGain -@ Patches/../C_code.c:6046: if (defGain && ((unit->def + defGain) <= maxDef)) +@ Patches/../C_code.c:6051: if (defGain && ((unit->def + defGain) <= maxDef)) cmp r2, r1 @ _450, maxDef - bgt .L2523 @, -@ Patches/../C_code.c:6049: if (totalGain >= MinimumStatUps) + bgt .L2526 @, +@ Patches/../C_code.c:6054: if (totalGain >= MinimumStatUps) cmp r4, #1 @ totalGain, - bne .LCB15314 @ - b .L2606 @long jump @ -.LCB15314: -@ Patches/../C_code.c:6048: totalGain++; + bne .LCB15338 @ + b .L2609 @long jump @ +.LCB15338: +@ Patches/../C_code.c:6053: totalGain++; movs r4, #1 @ totalGain, -.L2523: -@ Patches/../C_code.c:6055: resGain = NewGetStatIncrease(resGrowth, noise, level, 13 + (i * 13), useRN); +.L2526: +@ Patches/../C_code.c:6060: resGain = NewGetStatIncrease(resGrowth, noise, level, 13 + (i * 13), useRN); movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #56] @, %sfp - adds r3, r7, #5 @ tmp309, ivtmp.1621, + adds r3, r7, #5 @ tmp309, ivtmp.1626, add r1, sp, #88 @ tmp537,, bl NewGetStatIncrease @ str r0, [sp, #8] @ resGain, %sfp -@ Patches/../C_code.c:6057: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:6062: if (resGain && ((unit->res + resGain) <= maxRes)) cmp r0, #0 @ resGain, - beq .L2524 @, -@ Patches/../C_code.c:6057: if (resGain && ((unit->res + resGain) <= maxRes)) + beq .L2527 @, +@ Patches/../C_code.c:6062: if (resGain && ((unit->res + resGain) <= maxRes)) mov r2, r9 @ unit, unit ldrb r2, [r2, #24] @ pretmp_455, lsls r2, r2, #24 @ pretmp_455, pretmp_455, asrs r2, r2, #24 @ pretmp_455, pretmp_455, -@ Patches/../C_code.c:6057: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:6062: if (resGain && ((unit->res + resGain) <= maxRes)) ldr r1, [sp, #40] @ maxRes, %sfp -@ Patches/../C_code.c:6057: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:6062: if (resGain && ((unit->res + resGain) <= maxRes)) adds r3, r2, r0 @ _471, pretmp_455, resGain -@ Patches/../C_code.c:6057: if (resGain && ((unit->res + resGain) <= maxRes)) +@ Patches/../C_code.c:6062: if (resGain && ((unit->res + resGain) <= maxRes)) cmp r3, r1 @ _471, maxRes - ble .L2607 @, -.L2524: -@ Patches/../C_code.c:6066: lckGain = NewGetStatIncrease(lckGrowth, noise, level, 14 + (i * 13), useRN); + ble .L2610 @, +.L2527: +@ Patches/../C_code.c:6071: lckGain = NewGetStatIncrease(lckGrowth, noise, level, 14 + (i * 13), useRN); movs r2, r6 @, _8 str r5, [sp] @ tmp264, ldr r0, [sp, #60] @, %sfp - adds r3, r7, #6 @ tmp311, ivtmp.1621, + adds r3, r7, #6 @ tmp311, ivtmp.1626, add r1, sp, #88 @ tmp555,, bl NewGetStatIncrease @ str r0, [sp, #12] @ tmp396, %sfp -@ Patches/../C_code.c:6068: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:6073: if (lckGain && ((unit->lck + lckGain) <= maxLck)) cmp r0, #0 @ lckGain, - beq .L2525 @, -@ Patches/../C_code.c:6068: if (lckGain && ((unit->lck + lckGain) <= maxLck)) + beq .L2528 @, +@ Patches/../C_code.c:6073: if (lckGain && ((unit->lck + lckGain) <= maxLck)) mov r3, r9 @ unit, unit ldrb r3, [r3, #25] @ pretmp_475, lsls r3, r3, #24 @ pretmp_475, pretmp_475, asrs r3, r3, #24 @ pretmp_475, pretmp_475, -@ Patches/../C_code.c:6068: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:6073: if (lckGain && ((unit->lck + lckGain) <= maxLck)) adds r2, r3, r0 @ _491, pretmp_475, lckGain -@ Patches/../C_code.c:6068: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:6073: if (lckGain && ((unit->lck + lckGain) <= maxLck)) ldr r0, [sp, #64] @ maxLck, %sfp -@ Patches/../C_code.c:6068: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:6073: if (lckGain && ((unit->lck + lckGain) <= maxLck)) str r3, [sp, #72] @ pretmp_475, %sfp -@ Patches/../C_code.c:6068: if (lckGain && ((unit->lck + lckGain) <= maxLck)) +@ Patches/../C_code.c:6073: if (lckGain && ((unit->lck + lckGain) <= maxLck)) asrs r3, r0, #31 @ tmp316, maxLck, movs r1, r3 @ tmp316, tmp316 movs r3, r0 @ maxLck, maxLck lsrs r0, r2, #31 @ tmp315, _491, cmp r3, r2 @ maxLck, _491 adcs r0, r0, r1 @ tmp315, tmp315, tmp316 -@ Patches/../C_code.c:6071: if (totalGain >= MinimumStatUps) +@ Patches/../C_code.c:6076: if (totalGain >= MinimumStatUps) lsls r3, r0, #24 @ tmp318, tmp314, - beq .L2525 @, + beq .L2528 @, lsls r4, r4, #31 @ tmp398, totalGain, - bpl .LCB15371 @ - b .L2608 @long jump @ -.LCB15371: -.L2525: -@ Patches/../C_code.c:5989: for (int i = 0; i < 4; i++) - adds r7, r7, #13 @ ivtmp.1621, - cmp r7, #60 @ ivtmp.1621, - beq .LCB15375 @ - b .L2526 @long jump @ -.LCB15375: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) + bpl .LCB15395 @ + b .L2611 @long jump @ +.LCB15395: +.L2528: +@ Patches/../C_code.c:5994: for (int i = 0; i < 4; i++) + adds r7, r7, #13 @ ivtmp.1626, + cmp r7, #60 @ ivtmp.1626, + beq .LCB15399 @ + b .L2529 @long jump @ +.LCB15399: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r3, [sp, #80] @ hpGain, %sfp mov r4, r9 @ unit, unit ldr r0, [sp, #12] @ lckGain, %sfp mov r9, r8 @ sklGain, sklGain mov r8, r3 @ hpGain, hpGain - b .L2517 @ -.L2607: -@ Patches/../C_code.c:6060: if (totalGain >= MinimumStatUps) + b .L2520 @ +.L2610: +@ Patches/../C_code.c:6065: if (totalGain >= MinimumStatUps) cmp r4, #1 @ totalGain, - beq .L2609 @, -@ Patches/../C_code.c:6059: totalGain++; + beq .L2612 @, +@ Patches/../C_code.c:6064: totalGain++; movs r4, #1 @ totalGain, - b .L2524 @ -.L2536: -@ Patches/../C_code.c:5955: powGain = 0; + b .L2527 @ +.L2539: +@ Patches/../C_code.c:5960: powGain = 0; movs r3, #0 @ powGain, str r3, [sp, #16] @ powGain, %sfp - b .L2511 @ -.L2537: -@ Patches/../C_code.c:5961: sklGain = 0; + b .L2514 @ +.L2540: +@ Patches/../C_code.c:5966: sklGain = 0; movs r3, #0 @ sklGain, mov r9, r3 @ sklGain, sklGain - b .L2512 @ -.L2538: -@ Patches/../C_code.c:5967: spdGain = 0; + b .L2515 @ +.L2541: +@ Patches/../C_code.c:5972: spdGain = 0; movs r3, #0 @ spdGain, mov r10, r3 @ spdGain, spdGain - b .L2513 @ -.L2539: -@ Patches/../C_code.c:5973: defGain = 0; + b .L2516 @ +.L2542: +@ Patches/../C_code.c:5978: defGain = 0; movs r3, #0 @ defGain, mov fp, r3 @ defGain, defGain - b .L2514 @ -.L2540: -@ Patches/../C_code.c:5979: resGain = 0; + b .L2517 @ +.L2543: +@ Patches/../C_code.c:5984: resGain = 0; movs r3, #0 @ resGain, str r3, [sp, #8] @ resGain, %sfp - b .L2515 @ -.L2541: -@ Patches/../C_code.c:5985: lckGain = 0; + b .L2518 @ +.L2544: +@ Patches/../C_code.c:5990: lckGain = 0; movs r0, #0 @ lckGain, -@ Patches/../C_code.c:5987: if (totalGain < MinimumStatUps) +@ Patches/../C_code.c:5992: if (totalGain < MinimumStatUps) cmp r7, #1 @ totalGain, - ble .LCB15424 @ - b .L2517 @long jump @ -.LCB15424: - b .L2601 @ -.L2609: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) + ble .LCB15448 @ + b .L2520 @long jump @ +.LCB15448: + b .L2604 @ +.L2612: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r1, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r4, r9 @ unit, unit -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov ip, r1 @ powGain, powGain -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r1, #21 @ pretmp_389, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) str r3, [sp, #52] @ _471, %sfp -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldrsb r1, [r4, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r9, r8 @ sklGain, sklGain -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r0, r1 @ _405, pretmp_389 add r0, r0, r9 @ _405, sklGain movs r7, r0 @ _405, _405 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r0, #22 @ pretmp_412, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r3, [sp, #80] @ hpGain, %sfp -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldrsb r0, [r4, r0] @ pretmp_412,* pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r8, r3 @ hpGain, hpGain movs r3, #20 @ pretmp_365, -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r5, r0 @ pretmp_412, pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldrsb r3, [r4, r3] @ pretmp_365,* pretmp_365 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) str r0, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) add r3, r3, ip @ tmp358, powGain -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) mov r0, r10 @ _428, spdGain mov ip, r5 @ pretmp_412, pretmp_412 add r0, r0, ip @ _428, pretmp_412 str r0, [sp, #44] @ _428, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) movs r0, #23 @ pretmp_434, ldrsb r0, [r4, r0] @ pretmp_434,* pretmp_434 str r0, [sp, #36] @ pretmp_434, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) add r0, r0, fp @ _450, defGain str r0, [sp, #48] @ _450, %sfp -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) movs r0, #25 @ pretmp_475, ldrsb r0, [r4, r0] @ pretmp_475,* pretmp_475 str r0, [sp, #72] @ pretmp_475, %sfp str r0, [sp, #56] @ pretmp_475, %sfp -@ Patches/../C_code.c:5998: lckGain = 0; +@ Patches/../C_code.c:6003: lckGain = 0; movs r0, #0 @ lckGain, - b .L2520 @ -.L2603: -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) + b .L2523 @ +.L2606: +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldr r2, [sp, #80] @ hpGain, %sfp mov r4, r9 @ unit, unit mov r8, r2 @ hpGain, hpGain -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r2, #22 @ pretmp_412, -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r1, #21 @ pretmp_389, -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) movs r0, #23 @ pretmp_434, -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldrsb r2, [r4, r2] @ pretmp_412,* pretmp_412 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) movs r5, #25 @ pretmp_475, -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldrsb r1, [r4, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r6, r2 @ pretmp_412, pretmp_412 str r2, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) movs r2, #24 @ pretmp_455, -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) ldrsb r0, [r4, r0] @ pretmp_434,* pretmp_434 str r0, [sp, #36] @ pretmp_434, %sfp -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) ldrsb r5, [r4, r5] @ pretmp_475,* pretmp_475 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldrsb r2, [r4, r2] @ pretmp_455,* pretmp_455 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r5, [sp, #72] @ pretmp_475, %sfp str r5, [sp, #56] @ pretmp_475, %sfp -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; movs r5, #0 @ resGain, -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r0, [sp, #48] @ pretmp_434, %sfp movs r7, r1 @ _405, pretmp_389 -@ Patches/../C_code.c:5998: lckGain = 0; +@ Patches/../C_code.c:6003: lckGain = 0; movs r0, #0 @ lckGain, -@ Patches/../C_code.c:5996: defGain = 0; +@ Patches/../C_code.c:6001: defGain = 0; mov fp, r5 @ defGain, defGain -@ Patches/../C_code.c:5995: spdGain = 0; +@ Patches/../C_code.c:6000: spdGain = 0; mov r10, r5 @ spdGain, spdGain -@ Patches/../C_code.c:5994: sklGain = 0; +@ Patches/../C_code.c:5999: sklGain = 0; mov r9, r5 @ sklGain, sklGain -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r2, [sp, #52] @ pretmp_455, %sfp str r6, [sp, #44] @ pretmp_412, %sfp -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; str r5, [sp, #8] @ resGain, %sfp - b .L2520 @ -.L2604: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) + b .L2523 @ +.L2607: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r2, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r4, r9 @ unit, unit -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov ip, r2 @ powGain, powGain -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) movs r7, r3 @ _405, _405 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r2, #22 @ pretmp_412, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r3, [sp, #80] @ hpGain, %sfp mov r8, r3 @ hpGain, hpGain movs r3, #20 @ pretmp_365, mov r9, r0 @ sklGain, sklGain -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) movs r0, #23 @ pretmp_434, -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldrsb r2, [r4, r2] @ pretmp_412,* pretmp_412 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) movs r5, #25 @ pretmp_475, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldrsb r3, [r4, r3] @ pretmp_365,* pretmp_365 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r6, r2 @ pretmp_412, pretmp_412 str r2, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) movs r2, #24 @ pretmp_455, -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) ldrsb r0, [r4, r0] @ pretmp_434,* pretmp_434 str r0, [sp, #36] @ pretmp_434, %sfp -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) ldrsb r5, [r4, r5] @ pretmp_475,* pretmp_475 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldrsb r2, [r4, r2] @ pretmp_455,* pretmp_455 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r5, [sp, #72] @ pretmp_475, %sfp str r5, [sp, #56] @ pretmp_475, %sfp -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; movs r5, #0 @ resGain, -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r0, [sp, #48] @ pretmp_434, %sfp -@ Patches/../C_code.c:5996: defGain = 0; +@ Patches/../C_code.c:6001: defGain = 0; mov fp, r5 @ defGain, defGain -@ Patches/../C_code.c:5998: lckGain = 0; +@ Patches/../C_code.c:6003: lckGain = 0; movs r0, #0 @ lckGain, -@ Patches/../C_code.c:5995: spdGain = 0; +@ Patches/../C_code.c:6000: spdGain = 0; mov r10, r5 @ spdGain, spdGain -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r2, [sp, #52] @ pretmp_455, %sfp str r6, [sp, #44] @ pretmp_412, %sfp -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; str r5, [sp, #8] @ resGain, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) add r3, r3, ip @ tmp358, powGain - b .L2520 @ -.L2605: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) + b .L2523 @ +.L2608: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r4, r9 @ unit, unit -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r1, #21 @ pretmp_389, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) str r3, [sp, #12] @ pretmp_412, %sfp str r2, [sp, #44] @ _428, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r2, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldrsb r1, [r4, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r9, r8 @ sklGain, sklGain -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov ip, r2 @ powGain, powGain -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r2, r1 @ _405, pretmp_389 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r3, [sp, #80] @ hpGain, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) movs r0, #23 @ pretmp_434, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r8, r3 @ hpGain, hpGain movs r3, #20 @ pretmp_365, -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) movs r5, #25 @ pretmp_475, -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) add r2, r2, r9 @ _405, sklGain movs r7, r2 @ _405, _405 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) movs r2, #24 @ pretmp_455, -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) ldrsb r0, [r4, r0] @ pretmp_434,* pretmp_434 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldrsb r3, [r4, r3] @ pretmp_365,* pretmp_365 -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) str r0, [sp, #36] @ pretmp_434, %sfp -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) ldrsb r5, [r4, r5] @ pretmp_475,* pretmp_475 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldrsb r2, [r4, r2] @ pretmp_455,* pretmp_455 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r5, [sp, #72] @ pretmp_475, %sfp str r5, [sp, #56] @ pretmp_475, %sfp -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; movs r5, #0 @ resGain, -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r0, [sp, #48] @ pretmp_434, %sfp -@ Patches/../C_code.c:5996: defGain = 0; +@ Patches/../C_code.c:6001: defGain = 0; mov fp, r5 @ defGain, defGain -@ Patches/../C_code.c:5998: lckGain = 0; +@ Patches/../C_code.c:6003: lckGain = 0; movs r0, #0 @ lckGain, -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r2, [sp, #52] @ pretmp_455, %sfp -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; str r5, [sp, #8] @ resGain, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) add r3, r3, ip @ tmp358, powGain - b .L2520 @ -.L2606: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) + b .L2523 @ +.L2609: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r4, r9 @ unit, unit -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r1, #21 @ pretmp_389, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) str r3, [sp, #36] @ pretmp_434, %sfp str r2, [sp, #48] @ _450, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r2, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldrsb r1, [r4, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov ip, r2 @ powGain, powGain -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r9, r8 @ sklGain, sklGain -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r2, r1 @ _405, pretmp_389 add r2, r2, r9 @ _405, sklGain movs r7, r2 @ _405, _405 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r2, #22 @ pretmp_412, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r3, [sp, #80] @ hpGain, %sfp -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldrsb r2, [r4, r2] @ pretmp_412,* pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r8, r3 @ hpGain, hpGain movs r3, #20 @ pretmp_365, -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r0, r2 @ pretmp_412, pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldrsb r3, [r4, r3] @ pretmp_365,* pretmp_365 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) str r2, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) add r3, r3, ip @ tmp358, powGain -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) mov r2, r10 @ _428, spdGain mov ip, r0 @ pretmp_412, pretmp_412 add r2, r2, ip @ _428, pretmp_412 str r2, [sp, #44] @ _428, %sfp -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) movs r0, #25 @ pretmp_475, -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) movs r2, #24 @ pretmp_455, -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; movs r5, #0 @ resGain, -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) ldrsb r0, [r4, r0] @ pretmp_475,* pretmp_475 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldrsb r2, [r4, r2] @ pretmp_455,* pretmp_455 -@ Patches/../C_code.c:6098: if ((unit->lck + lckGain) > maxLck) +@ Patches/../C_code.c:6103: if ((unit->lck + lckGain) > maxLck) str r0, [sp, #72] @ pretmp_475, %sfp str r0, [sp, #56] @ pretmp_475, %sfp str r2, [sp, #52] @ pretmp_455, %sfp -@ Patches/../C_code.c:5998: lckGain = 0; +@ Patches/../C_code.c:6003: lckGain = 0; movs r0, #0 @ lckGain, -@ Patches/../C_code.c:5997: resGain = 0; +@ Patches/../C_code.c:6002: resGain = 0; str r5, [sp, #8] @ resGain, %sfp - b .L2520 @ -.L2608: -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) + b .L2523 @ +.L2611: +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r4, r9 @ unit, unit -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r1, #21 @ pretmp_389, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) str r2, [sp, #56] @ _491, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r2, [sp, #16] @ powGain, %sfp -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) ldrsb r1, [r4, r1] @ pretmp_389,* pretmp_389 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov ip, r2 @ powGain, powGain -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r9, r8 @ sklGain, sklGain -@ Patches/../C_code.c:6086: if ((unit->skl + sklGain) > maxSkl) +@ Patches/../C_code.c:6091: if ((unit->skl + sklGain) > maxSkl) movs r2, r1 @ _405, pretmp_389 add r2, r2, r9 @ _405, sklGain movs r7, r2 @ _405, _405 -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r2, #22 @ pretmp_412, -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldr r3, [sp, #80] @ hpGain, %sfp -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) ldrsb r2, [r4, r2] @ pretmp_412,* pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) mov r8, r3 @ hpGain, hpGain movs r3, #20 @ pretmp_365, -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) movs r5, r2 @ pretmp_412, pretmp_412 -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) ldrsb r3, [r4, r3] @ pretmp_365,* pretmp_365 ldr r0, [sp, #12] @ lckGain, %sfp -@ Patches/../C_code.c:6083: if ((unit->pow + powGain) > maxPow) +@ Patches/../C_code.c:6088: if ((unit->pow + powGain) > maxPow) add r3, r3, ip @ tmp358, powGain -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) str r2, [sp, #12] @ pretmp_412, %sfp -@ Patches/../C_code.c:6089: if ((unit->spd + spdGain) > maxSpd) +@ Patches/../C_code.c:6094: if ((unit->spd + spdGain) > maxSpd) mov ip, r5 @ pretmp_412, pretmp_412 mov r2, r10 @ _428, spdGain add r2, r2, ip @ _428, pretmp_412 str r2, [sp, #44] @ _428, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) movs r2, #23 @ pretmp_434, ldrsb r2, [r4, r2] @ pretmp_434,* pretmp_434 str r2, [sp, #36] @ pretmp_434, %sfp -@ Patches/../C_code.c:6092: if ((unit->def + defGain) > maxDef) +@ Patches/../C_code.c:6097: if ((unit->def + defGain) > maxDef) add r2, r2, fp @ _450, defGain str r2, [sp, #48] @ _450, %sfp -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldr r5, [sp, #8] @ _471, %sfp -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) movs r2, #24 @ pretmp_455, -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) mov ip, r5 @ _471, _471 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) ldrsb r2, [r4, r2] @ pretmp_455,* pretmp_455 -@ Patches/../C_code.c:6095: if ((unit->res + resGain) > maxRes) +@ Patches/../C_code.c:6100: if ((unit->res + resGain) > maxRes) add ip, ip, r2 @ _471, pretmp_455 mov r5, ip @ _471, _471 str r5, [sp, #52] @ _471, %sfp - b .L2520 @ + b .L2523 @ .size UnitLevelUp, .-UnitLevelUp .align 1 .p2align 2,,3 @@ -18592,170 +18623,170 @@ UnitCheckStatCaps: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:6318: int max = CallGetMaxHP(unit); - ldr r3, .L2626 @ tmp174, -@ Patches/../C_code.c:6317: { +@ Patches/../C_code.c:6323: int max = CallGetMaxHP(unit); + ldr r3, .L2629 @ tmp174, +@ Patches/../C_code.c:6322: { movs r4, r0 @ unit, tmp225 -@ Patches/../C_code.c:6318: int max = CallGetMaxHP(unit); +@ Patches/../C_code.c:6323: int max = CallGetMaxHP(unit); bl .L14 @ -@ Patches/../C_code.c:6319: if (unit->maxHP > max) +@ Patches/../C_code.c:6324: if (unit->maxHP > max) movs r3, #18 @ tmp175, ldrsb r3, [r4, r3] @ tmp175, -@ Patches/../C_code.c:6319: if (unit->maxHP > max) +@ Patches/../C_code.c:6324: if (unit->maxHP > max) cmp r3, r0 @ tmp175, max - ble .L2613 @, -@ Patches/../C_code.c:6321: unit->maxHP = max; + ble .L2616 @, +@ Patches/../C_code.c:6326: unit->maxHP = max; strb r0, [r4, #18] @ max, unit_63(D)->maxHP -.L2613: -@ Patches/../C_code.c:6324: max = GetUnitMaxPow(unit); +.L2616: +@ Patches/../C_code.c:6329: max = GetUnitMaxPow(unit); movs r0, r4 @, unit bl GetUnitMaxPow @ -@ Patches/../C_code.c:6325: if (unit->pow > max) +@ Patches/../C_code.c:6330: if (unit->pow > max) movs r3, #20 @ tmp177, ldrsb r3, [r4, r3] @ tmp177, -@ Patches/../C_code.c:6325: if (unit->pow > max) +@ Patches/../C_code.c:6330: if (unit->pow > max) cmp r3, r0 @ tmp177, max - ble .L2614 @, -@ Patches/../C_code.c:6327: unit->pow = max; + ble .L2617 @, +@ Patches/../C_code.c:6332: unit->pow = max; strb r0, [r4, #20] @ max, unit_63(D)->pow -.L2614: -@ Patches/../C_code.c:6330: max = GetUnitMaxSkl(unit); +.L2617: +@ Patches/../C_code.c:6335: max = GetUnitMaxSkl(unit); movs r0, r4 @, unit bl GetUnitMaxSkl @ -@ Patches/../C_code.c:6331: if (unit->skl > max) +@ Patches/../C_code.c:6336: if (unit->skl > max) movs r3, #21 @ tmp179, ldrsb r3, [r4, r3] @ tmp179, -@ Patches/../C_code.c:6331: if (unit->skl > max) +@ Patches/../C_code.c:6336: if (unit->skl > max) cmp r3, r0 @ tmp179, max - ble .L2615 @, -@ Patches/../C_code.c:6333: unit->skl = max; + ble .L2618 @, +@ Patches/../C_code.c:6338: unit->skl = max; strb r0, [r4, #21] @ max, unit_63(D)->skl -.L2615: -@ Patches/../C_code.c:6336: max = GetUnitMaxSpd(unit); +.L2618: +@ Patches/../C_code.c:6341: max = GetUnitMaxSpd(unit); movs r0, r4 @, unit bl GetUnitMaxSpd @ -@ Patches/../C_code.c:6337: if (unit->spd > max) +@ Patches/../C_code.c:6342: if (unit->spd > max) movs r3, #22 @ tmp181, ldrsb r3, [r4, r3] @ tmp181, -@ Patches/../C_code.c:6337: if (unit->spd > max) +@ Patches/../C_code.c:6342: if (unit->spd > max) cmp r3, r0 @ tmp181, max - ble .L2616 @, -@ Patches/../C_code.c:6339: unit->spd = max; + ble .L2619 @, +@ Patches/../C_code.c:6344: unit->spd = max; strb r0, [r4, #22] @ max, unit_63(D)->spd -.L2616: -@ Patches/../C_code.c:6342: max = GetUnitMaxDef(unit); +.L2619: +@ Patches/../C_code.c:6347: max = GetUnitMaxDef(unit); movs r0, r4 @, unit bl GetUnitMaxDef @ -@ Patches/../C_code.c:6343: if (unit->def > max) +@ Patches/../C_code.c:6348: if (unit->def > max) movs r3, #23 @ tmp183, ldrsb r3, [r4, r3] @ tmp183, -@ Patches/../C_code.c:6343: if (unit->def > max) +@ Patches/../C_code.c:6348: if (unit->def > max) cmp r3, r0 @ tmp183, max - ble .L2617 @, -@ Patches/../C_code.c:6345: unit->def = max; + ble .L2620 @, +@ Patches/../C_code.c:6350: unit->def = max; strb r0, [r4, #23] @ max, unit_63(D)->def -.L2617: -@ Patches/../C_code.c:6348: max = GetUnitMaxRes(unit); +.L2620: +@ Patches/../C_code.c:6353: max = GetUnitMaxRes(unit); movs r0, r4 @, unit bl GetUnitMaxRes @ -@ Patches/../C_code.c:6349: if (unit->res > max) +@ Patches/../C_code.c:6354: if (unit->res > max) movs r3, #24 @ tmp185, ldrsb r3, [r4, r3] @ tmp185, -@ Patches/../C_code.c:6349: if (unit->res > max) +@ Patches/../C_code.c:6354: if (unit->res > max) cmp r3, r0 @ tmp185, max - ble .L2618 @, -@ Patches/../C_code.c:6351: unit->res = max; + ble .L2621 @, +@ Patches/../C_code.c:6356: unit->res = max; strb r0, [r4, #24] @ max, unit_63(D)->res -.L2618: -@ Patches/../C_code.c:6354: max = GetUnitMaxLck(unit); +.L2621: +@ Patches/../C_code.c:6359: max = GetUnitMaxLck(unit); movs r0, r4 @, unit bl GetUnitMaxLck @ -@ Patches/../C_code.c:6355: if (unit->lck > max) +@ Patches/../C_code.c:6360: if (unit->lck > max) movs r3, #25 @ tmp187, ldrsb r3, [r4, r3] @ tmp187, -@ Patches/../C_code.c:6355: if (unit->lck > max) +@ Patches/../C_code.c:6360: if (unit->lck > max) cmp r3, r0 @ tmp187, max - ble .L2619 @, -@ Patches/../C_code.c:6357: unit->lck = max; + ble .L2622 @, +@ Patches/../C_code.c:6362: unit->lck = max; strb r0, [r4, #25] @ max, unit_63(D)->lck -.L2619: -@ Patches/../C_code.c:6360: if (StrMagInstalled) - ldr r3, .L2626+4 @ tmp189, -@ Patches/../C_code.c:6360: if (StrMagInstalled) +.L2622: +@ Patches/../C_code.c:6365: if (StrMagInstalled) + ldr r3, .L2629+4 @ tmp189, +@ Patches/../C_code.c:6365: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - bne .L2625 @, -.L2621: -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) + bne .L2628 @, +.L2624: +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) movs r5, #19 @ _34, ldr r0, [r4] @ unit_63(D)->pCharacterData, unit_63(D)->pCharacterData movs r1, #17 @ _31, ldrsb r5, [r0, r5] @ _34,* _34 -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) movs r3, #25 @ _29, -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) movs r0, #26 @ tmp196, -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) ldr r2, [r4, #4] @ _28, unit_63(D)->pClassData -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) ldrsb r1, [r2, r1] @ _31,* _31 -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) ldrsb r3, [r2, r3] @ _29,* _29 -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) ldrsb r0, [r4, r0] @ tmp196, -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) adds r1, r1, r5 @ tmp214, _31, _34 -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) subs r3, r3, r1 @ tmp198, _29, tmp214 -@ Patches/../C_code.c:6369: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) +@ Patches/../C_code.c:6374: if (unit->conBonus > (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit))) cmp r0, r3 @ tmp196, tmp198 - ble .L2623 @, -@ Patches/../C_code.c:6370: unit->conBonus = (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit)); + ble .L2626 @, +@ Patches/../C_code.c:6375: unit->conBonus = (UNIT_CON_MAX(unit) - UNIT_CON_BASE(unit)); strb r3, [r4, #26] @ tmp198, unit_63(D)->conBonus -.L2623: -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +.L2626: +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) movs r1, #29 @ tmp206, -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) movs r3, #15 @ tmp207, -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) ldrb r2, [r2, #18] @ _46, -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) ldrsb r1, [r4, r1] @ tmp206, -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) lsls r2, r2, #24 @ _46, _46, asrs r2, r2, #24 @ _46, _46, -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) subs r3, r3, r2 @ tmp208, tmp207, _46 -@ Patches/../C_code.c:6373: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) +@ Patches/../C_code.c:6378: if (unit->movBonus > (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit))) cmp r1, r3 @ tmp206, tmp208 - ble .L2612 @, -@ Patches/../C_code.c:6374: unit->movBonus = (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit)); + ble .L2615 @, +@ Patches/../C_code.c:6379: unit->movBonus = (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit)); movs r3, #15 @ tmp209, subs r3, r3, r2 @ tmp212, tmp209, _46 -@ Patches/../C_code.c:6374: unit->movBonus = (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit)); +@ Patches/../C_code.c:6379: unit->movBonus = (UNIT_MOV_MAX(unit) - UNIT_MOV_BASE(unit)); strb r3, [r4, #29] @ tmp212, unit_63(D)->movBonus -.L2612: -@ Patches/../C_code.c:6382: } +.L2615: +@ Patches/../C_code.c:6387: } @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L2625: -@ Patches/../C_code.c:6362: max = GetUnitMaxMag(unit); +.L2628: +@ Patches/../C_code.c:6367: max = GetUnitMaxMag(unit); movs r0, r4 @, unit bl GetUnitMaxMag @ -@ Patches/../C_code.c:6363: if (unit->_u3A > max) +@ Patches/../C_code.c:6368: if (unit->_u3A > max) movs r3, #58 @ tmp191, ldrb r2, [r4, r3] @ tmp192, -@ Patches/../C_code.c:6363: if (unit->_u3A > max) +@ Patches/../C_code.c:6368: if (unit->_u3A > max) cmp r2, r0 @ tmp192, max - ble .L2621 @, -@ Patches/../C_code.c:6365: unit->_u3A = max; + ble .L2624 @, +@ Patches/../C_code.c:6370: unit->_u3A = max; strb r0, [r4, r3] @ max, unit_63(D)->_u3A - b .L2621 @ -.L2627: + b .L2624 @ +.L2630: .align 2 -.L2626: +.L2629: .word CallGetMaxHP .word StrMagInstalled .size UnitCheckStatCaps, .-UnitCheckStatCaps @@ -18771,266 +18802,266 @@ UnitAutolevelCore: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:4869: { +@ Patches/../C_code.c:4874: { movs r4, r0 @ unit, tmp323 subs r5, r2, #0 @ levelCount, tmp324, -@ Patches/../C_code.c:4870: if (levelCount > 0) - ble .LCB15784 @ - b .L2645 @long jump @ -.LCB15784: -@ Patches/../C_code.c:4884: if (levelCount < 0) +@ Patches/../C_code.c:4875: if (levelCount > 0) + ble .LCB15808 @ + b .L2648 @long jump @ +.LCB15808: +@ Patches/../C_code.c:4889: if (levelCount < 0) cmp r2, #0 @ levelCount, - beq .L2631 @, -@ Patches/../C_code.c:4886: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); + beq .L2634 @, +@ Patches/../C_code.c:4891: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); movs r1, #1 @, bl GetClassHPGrowth @ -@ Patches/../C_code.c:4886: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); +@ Patches/../C_code.c:4891: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); movs r2, #18 @ tmp273, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp273, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4886: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); +@ Patches/../C_code.c:4891: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); lsls r0, r0, #24 @ tmp274, tmp342, asrs r0, r0, #24 @ _52, tmp274, strb r0, [r4, #18] @ _52, unit_94(D)->maxHP -@ Patches/../C_code.c:2496: int uid = unit->pCharacterData->number; +@ Patches/../C_code.c:2501: int uid = unit->pCharacterData->number; ldr r3, [r4] @ unit_94(D)->pCharacterData, unit_94(D)->pCharacterData -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) ldrb r3, [r3, #4] @ tmp280, cmp r3, #44 @ tmp280, - bls .L2638 @, -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) + bls .L2641 @, +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp286, movs r3, #192 @ tmp287, ldrsb r2, [r4, r2] @ tmp286, ands r3, r2 @ tmp288, tmp286 -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) cmp r3, #128 @ tmp288, - bne .LCB15815 @ - b .L2633 @long jump @ -.LCB15815: -.L2638: -@ Patches/../C_code.c:4889: if (unit->maxHP < 15) + bne .LCB15839 @ + b .L2636 @long jump @ +.LCB15839: +.L2641: +@ Patches/../C_code.c:4894: if (unit->maxHP < 15) cmp r0, #14 @ _52, - bgt .L2636 @, -@ Patches/../C_code.c:4891: unit->maxHP = 15; + bgt .L2639 @, +@ Patches/../C_code.c:4896: unit->maxHP = 15; movs r3, #15 @ tmp299, strb r3, [r4, #18] @ tmp299, unit_94(D)->maxHP -.L2636: -@ Patches/../C_code.c:4901: unit->pow = GetAutoleveledStatDecrease(GetClassPowGrowth(unit, true), levelCount, unit->pow); +.L2639: +@ Patches/../C_code.c:4906: unit->pow = GetAutoleveledStatDecrease(GetClassPowGrowth(unit, true), levelCount, unit->pow); movs r1, #1 @, movs r0, r4 @, unit bl GetClassPowGrowth @ -@ Patches/../C_code.c:4901: unit->pow = GetAutoleveledStatDecrease(GetClassPowGrowth(unit, true), levelCount, unit->pow); +@ Patches/../C_code.c:4906: unit->pow = GetAutoleveledStatDecrease(GetClassPowGrowth(unit, true), levelCount, unit->pow); movs r2, #20 @ tmp303, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp303, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4902: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); +@ Patches/../C_code.c:4907: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); movs r1, #1 @, -@ Patches/../C_code.c:4901: unit->pow = GetAutoleveledStatDecrease(GetClassPowGrowth(unit, true), levelCount, unit->pow); +@ Patches/../C_code.c:4906: unit->pow = GetAutoleveledStatDecrease(GetClassPowGrowth(unit, true), levelCount, unit->pow); strb r0, [r4, #20] @ tmp344, unit_94(D)->pow -@ Patches/../C_code.c:4902: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); +@ Patches/../C_code.c:4907: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); movs r0, r4 @, unit bl GetClassSklGrowth @ -@ Patches/../C_code.c:4902: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); +@ Patches/../C_code.c:4907: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); movs r2, #21 @ tmp305, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp305, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4903: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); +@ Patches/../C_code.c:4908: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); movs r1, #1 @, -@ Patches/../C_code.c:4902: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); +@ Patches/../C_code.c:4907: unit->skl = GetAutoleveledStatDecrease(GetClassSklGrowth(unit, true), levelCount, unit->skl); strb r0, [r4, #21] @ tmp346, unit_94(D)->skl -@ Patches/../C_code.c:4903: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); +@ Patches/../C_code.c:4908: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); movs r0, r4 @, unit bl GetClassSpdGrowth @ -@ Patches/../C_code.c:4903: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); +@ Patches/../C_code.c:4908: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); movs r2, #22 @ tmp307, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp307, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4904: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); +@ Patches/../C_code.c:4909: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); movs r1, #1 @, -@ Patches/../C_code.c:4903: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); +@ Patches/../C_code.c:4908: unit->spd = GetAutoleveledStatDecrease(GetClassSpdGrowth(unit, true), levelCount, unit->spd); strb r0, [r4, #22] @ tmp348, unit_94(D)->spd -@ Patches/../C_code.c:4904: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); +@ Patches/../C_code.c:4909: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); movs r0, r4 @, unit bl GetClassDefGrowth @ -@ Patches/../C_code.c:4904: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); +@ Patches/../C_code.c:4909: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); movs r2, #23 @ tmp309, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp309, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4905: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); +@ Patches/../C_code.c:4910: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); movs r1, #1 @, -@ Patches/../C_code.c:4904: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); +@ Patches/../C_code.c:4909: unit->def = GetAutoleveledStatDecrease(GetClassDefGrowth(unit, true), levelCount, unit->def); strb r0, [r4, #23] @ tmp350, unit_94(D)->def -@ Patches/../C_code.c:4905: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); +@ Patches/../C_code.c:4910: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); movs r0, r4 @, unit bl GetClassResGrowth @ -@ Patches/../C_code.c:4905: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); +@ Patches/../C_code.c:4910: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); movs r2, #24 @ tmp311, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp311, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4906: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); +@ Patches/../C_code.c:4911: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); movs r1, #1 @, -@ Patches/../C_code.c:4905: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); +@ Patches/../C_code.c:4910: unit->res = GetAutoleveledStatDecrease(GetClassResGrowth(unit, true), levelCount, unit->res); strb r0, [r4, #24] @ tmp352, unit_94(D)->res -@ Patches/../C_code.c:4906: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); +@ Patches/../C_code.c:4911: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); movs r0, r4 @, unit bl GetClassLckGrowth @ -@ Patches/../C_code.c:4906: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); +@ Patches/../C_code.c:4911: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); movs r2, #25 @ tmp313, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp313, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4907: if (StrMagInstalled) - ldr r3, .L2646 @ tmp315, -@ Patches/../C_code.c:4907: if (StrMagInstalled) +@ Patches/../C_code.c:4912: if (StrMagInstalled) + ldr r3, .L2649 @ tmp315, +@ Patches/../C_code.c:4912: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled -@ Patches/../C_code.c:4906: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); +@ Patches/../C_code.c:4911: unit->lck = GetAutoleveledStatDecrease(GetClassLckGrowth(unit, true), levelCount, unit->lck); strb r0, [r4, #25] @ tmp354, unit_94(D)->lck -@ Patches/../C_code.c:4907: if (StrMagInstalled) +@ Patches/../C_code.c:4912: if (StrMagInstalled) cmp r3, #0 @ StrMagInstalled, - beq .L2631 @, -@ Patches/../C_code.c:4909: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); + beq .L2634 @, +@ Patches/../C_code.c:4914: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); movs r6, #58 @ tmp317, -@ Patches/../C_code.c:4909: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); +@ Patches/../C_code.c:4914: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); movs r1, #1 @, movs r0, r4 @, unit bl GetClassMagGrowth @ -@ Patches/../C_code.c:4909: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); +@ Patches/../C_code.c:4914: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); movs r1, r5 @, levelCount ldrb r2, [r4, r6] @ tmp318, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4909: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); +@ Patches/../C_code.c:4914: unit->_u3A = GetAutoleveledStatDecrease(GetClassMagGrowth(unit, true), levelCount, unit->_u3A); strb r0, [r4, r6] @ tmp356, unit_94(D)->_u3A -.L2631: -@ Patches/../C_code.c:4914: } +.L2634: +@ Patches/../C_code.c:4919: } @ sp needed @ -@ Patches/../C_code.c:4912: UnitCheckStatMins(unit); +@ Patches/../C_code.c:4917: UnitCheckStatMins(unit); movs r0, r4 @, unit bl UnitCheckStatMins @ -@ Patches/../C_code.c:4913: UnitCheckStatCaps(unit); +@ Patches/../C_code.c:4918: UnitCheckStatCaps(unit); movs r0, r4 @, unit bl UnitCheckStatCaps @ -@ Patches/../C_code.c:4914: } +@ Patches/../C_code.c:4919: } pop {r4, r5, r6} pop {r0} bx r0 -.L2645: -@ Patches/../C_code.c:4872: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); +.L2648: +@ Patches/../C_code.c:4877: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); movs r1, #1 @, bl GetClassHPGrowth @ -@ Patches/../C_code.c:4872: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); - ldr r6, .L2646+4 @ tmp221, +@ Patches/../C_code.c:4877: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); + ldr r6, .L2649+4 @ tmp221, movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4872: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4877: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); ldrb r3, [r4, #18] @ tmp223, adds r3, r3, r0 @ tmp225, tmp223, tmp326 strb r3, [r4, #18] @ tmp225, unit_94(D)->maxHP -@ Patches/../C_code.c:4873: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4878: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassPowGrowth @ -@ Patches/../C_code.c:4873: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4878: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4873: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4878: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); ldrb r3, [r4, #20] @ tmp229, adds r3, r3, r0 @ tmp231, tmp229, tmp328 strb r3, [r4, #20] @ tmp231, unit_94(D)->pow -@ Patches/../C_code.c:4874: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4879: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassSklGrowth @ -@ Patches/../C_code.c:4874: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4879: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4874: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4879: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); ldrb r3, [r4, #21] @ tmp235, adds r3, r3, r0 @ tmp237, tmp235, tmp330 strb r3, [r4, #21] @ tmp237, unit_94(D)->skl -@ Patches/../C_code.c:4875: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4880: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassSpdGrowth @ -@ Patches/../C_code.c:4875: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4880: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4875: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4880: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); ldrb r3, [r4, #22] @ tmp241, adds r3, r3, r0 @ tmp243, tmp241, tmp332 strb r3, [r4, #22] @ tmp243, unit_94(D)->spd -@ Patches/../C_code.c:4876: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4881: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassDefGrowth @ -@ Patches/../C_code.c:4876: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4881: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4876: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4881: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); ldrb r3, [r4, #23] @ tmp247, adds r3, r3, r0 @ tmp249, tmp247, tmp334 strb r3, [r4, #23] @ tmp249, unit_94(D)->def -@ Patches/../C_code.c:4877: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4882: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassResGrowth @ -@ Patches/../C_code.c:4877: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4882: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4877: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4882: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); ldrb r3, [r4, #24] @ tmp253, adds r3, r3, r0 @ tmp255, tmp253, tmp336 strb r3, [r4, #24] @ tmp255, unit_94(D)->res -@ Patches/../C_code.c:4878: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4883: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassLckGrowth @ -@ Patches/../C_code.c:4878: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4883: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4878: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4883: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); ldrb r3, [r4, #25] @ tmp259, adds r3, r3, r0 @ tmp261, tmp259, tmp338 strb r3, [r4, #25] @ tmp261, unit_94(D)->lck -@ Patches/../C_code.c:4879: if (StrMagInstalled) - ldr r3, .L2646 @ tmp263, -@ Patches/../C_code.c:4879: if (StrMagInstalled) +@ Patches/../C_code.c:4884: if (StrMagInstalled) + ldr r3, .L2649 @ tmp263, +@ Patches/../C_code.c:4884: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2631 @, -@ Patches/../C_code.c:4881: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); + beq .L2634 @, +@ Patches/../C_code.c:4886: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassMagGrowth @ -@ Patches/../C_code.c:4881: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4886: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4881: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4886: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); movs r2, #58 @ tmp266, -@ Patches/../C_code.c:4881: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4886: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); ldrb r3, [r4, r2] @ tmp268, adds r3, r3, r0 @ tmp270, tmp268, tmp340 strb r3, [r4, r2] @ tmp270, unit_94(D)->_u3A - b .L2631 @ -.L2633: -@ Patches/../C_code.c:4896: if (unit->maxHP < 10) + b .L2634 @ +.L2636: +@ Patches/../C_code.c:4901: if (unit->maxHP < 10) cmp r0, #9 @ _52, - ble .LCB15987 @ - b .L2636 @long jump @ -.LCB15987: -@ Patches/../C_code.c:4898: unit->maxHP = 10; + ble .LCB16011 @ + b .L2639 @long jump @ +.LCB16011: +@ Patches/../C_code.c:4903: unit->maxHP = 10; movs r3, #10 @ tmp301, strb r3, [r4, #18] @ tmp301, unit_94(D)->maxHP - b .L2636 @ -.L2647: + b .L2639 @ +.L2650: .align 2 -.L2646: +.L2649: .word StrMagInstalled .word GetAutoleveledStatIncrease .size UnitAutolevelCore, .-UnitAutolevelCore @@ -19050,413 +19081,413 @@ UnitAutolevelCore_Char: movs r4, r0 @ unit, tmp469 movs r5, r2 @ levelCount, tmp470 push {lr} @ -@ Patches/../C_code.c:4928: if (levelCount > 0) +@ Patches/../C_code.c:4933: if (levelCount > 0) cmp r2, #0 @ levelCount, - ble .LCB16010 @ - b .L2681 @long jump @ -.LCB16010: -@ Patches/../C_code.c:4956: if (levelCount < 0) - bne .LCB16012 @ - b .L2651 @long jump @ -.LCB16012: -@ Patches/../C_code.c:4961: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); + ble .LCB16034 @ + b .L2684 @long jump @ +.LCB16034: +@ Patches/../C_code.c:4961: if (levelCount < 0) + bne .LCB16036 @ + b .L2654 @long jump @ +.LCB16036: +@ Patches/../C_code.c:4966: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); movs r1, #1 @, bl GetClassHPGrowth @ -@ Patches/../C_code.c:4961: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); +@ Patches/../C_code.c:4966: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); movs r2, #18 @ tmp340, movs r1, r5 @, levelCount ldrsb r2, [r4, r2] @ tmp340, bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4961: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); +@ Patches/../C_code.c:4966: unit->maxHP = GetAutoleveledStatDecrease(GetClassHPGrowth(unit, true), levelCount, unit->maxHP); lsls r0, r0, #24 @ tmp341, tmp488, asrs r0, r0, #24 @ _52, tmp341, strb r0, [r4, #18] @ _52, unit_98(D)->maxHP -@ Patches/../C_code.c:2496: int uid = unit->pCharacterData->number; +@ Patches/../C_code.c:2501: int uid = unit->pCharacterData->number; ldr r3, [r4] @ unit_98(D)->pCharacterData, unit_98(D)->pCharacterData -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) ldrb r3, [r3, #4] @ tmp347, cmp r3, #44 @ tmp347, - bls .L2671 @, -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) + bls .L2674 @, +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp353, movs r3, #192 @ tmp354, ldrsb r2, [r4, r2] @ tmp353, ands r3, r2 @ tmp355, tmp353 -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) cmp r3, #128 @ tmp355, - bne .LCB16041 @ - b .L2653 @long jump @ -.LCB16041: -.L2671: -@ Patches/../C_code.c:4965: if (unit->maxHP < 15) + bne .LCB16065 @ + b .L2656 @long jump @ +.LCB16065: +.L2674: +@ Patches/../C_code.c:4970: if (unit->maxHP < 15) cmp r0, #14 @ _52, - bgt .L2656 @, -@ Patches/../C_code.c:4967: unit->maxHP = 15; + bgt .L2659 @, +@ Patches/../C_code.c:4972: unit->maxHP = 15; movs r3, #15 @ tmp366, strb r3, [r4, #18] @ tmp366, unit_98(D)->maxHP -.L2656: -@ Patches/../C_code.c:4006: growth += unit->pClassData->growthPow; +.L2659: +@ Patches/../C_code.c:4011: growth += unit->pClassData->growthPow; movs r7, #28 @ _318, -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; movs r3, #29 @ tmp370, -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; movs r1, #30 @ tmp372, -@ Patches/../C_code.c:4006: growth += unit->pClassData->growthPow; +@ Patches/../C_code.c:4011: growth += unit->pClassData->growthPow; ldr r2, [r4, #4] @ _316, unit_98(D)->pClassData -@ Patches/../C_code.c:4006: growth += unit->pClassData->growthPow; +@ Patches/../C_code.c:4011: growth += unit->pClassData->growthPow; ldrsb r7, [r2, r7] @ _318,* _318 -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; ldrsb r3, [r2, r3] @ tmp370, -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; ldrsb r1, [r2, r1] @ tmp372, -@ Patches/../C_code.c:4993: avg += GetClassSklGrowth(unit, false); +@ Patches/../C_code.c:4998: avg += GetClassSklGrowth(unit, false); adds r3, r3, r7 @ tmp371, tmp370, _318 -@ Patches/../C_code.c:4995: avg += GetClassSpdGrowth(unit, false); +@ Patches/../C_code.c:5000: avg += GetClassSpdGrowth(unit, false); adds r3, r3, r1 @ tmp373, tmp371, tmp372 -@ Patches/../C_code.c:4095: growth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4100: growth += unit->pClassData->growthDef; movs r1, #31 @ tmp374, ldrsb r1, [r2, r1] @ tmp374, -@ Patches/../C_code.c:4997: avg += GetClassDefGrowth(unit, false); +@ Patches/../C_code.c:5002: avg += GetClassDefGrowth(unit, false); adds r3, r3, r1 @ tmp375, tmp373, tmp374 -@ Patches/../C_code.c:4126: growth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4131: growth += unit->pClassData->growthRes; movs r1, #32 @ tmp376, ldrsb r1, [r2, r1] @ tmp377, -@ Patches/../C_code.c:4999: avg += GetClassResGrowth(unit, false); +@ Patches/../C_code.c:5004: avg += GetClassResGrowth(unit, false); adds r3, r3, r1 @ tmp378, tmp375, tmp377 -@ Patches/../C_code.c:4157: growth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4162: growth += unit->pClassData->growthLck; movs r1, #33 @ tmp379, ldrsb r0, [r2, r1] @ tmp380, -@ Patches/../C_code.c:5001: avg += GetClassLckGrowth(unit, false); +@ Patches/../C_code.c:5006: avg += GetClassLckGrowth(unit, false); adds r0, r3, r0 @ _449, tmp378, tmp380 -@ Patches/../C_code.c:5003: if (StrMagInstalled) - ldr r3, .L2684 @ tmp466, +@ Patches/../C_code.c:5008: if (StrMagInstalled) + ldr r3, .L2687 @ tmp466, ldr r6, [r3] @ pretmp_450, StrMagInstalled mov r8, r3 @ tmp466, tmp466 -@ Patches/../C_code.c:5003: if (StrMagInstalled) +@ Patches/../C_code.c:5008: if (StrMagInstalled) cmp r6, #0 @ pretmp_450, - beq .LCB16072 @ - b .L2682 @long jump @ -.LCB16072: -@ Patches/../C_code.c:5008: avg = avg / i; + beq .LCB16096 @ + b .L2685 @long jump @ +.LCB16096: +@ Patches/../C_code.c:5013: avg = avg / i; movs r1, #6 @, - ldr r3, .L2684+4 @ tmp413, + ldr r3, .L2687+4 @ tmp413, bl .L14 @ movs r6, r0 @ avg, tmp492 -.L2663: -@ Patches/../C_code.c:5010: unit->pow = GetAutoleveledStatDecrease( +.L2666: +@ Patches/../C_code.c:5015: unit->pow = GetAutoleveledStatDecrease( movs r2, #20 @ tmp415, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r7, r6 @ tmp417, _318, avg -@ Patches/../C_code.c:5010: unit->pow = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5015: unit->pow = GetAutoleveledStatDecrease( ldrsb r2, [r4, r2] @ tmp415, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r0 @ num, avg, tmp417 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2664 @, + bge .L2667 @, movs r0, #20 @ num, -.L2664: -@ Patches/../C_code.c:5010: unit->pow = GetAutoleveledStatDecrease( +.L2667: +@ Patches/../C_code.c:5015: unit->pow = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:5010: unit->pow = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5015: unit->pow = GetAutoleveledStatDecrease( strb r0, [r4, #20] @ tmp493, unit_98(D)->pow -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; movs r0, #29 @ tmp422, -@ Patches/../C_code.c:5012: unit->skl = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5017: unit->skl = GetAutoleveledStatDecrease( movs r2, #21 @ tmp419, -@ Patches/../C_code.c:4033: growth += unit->pClassData->growthSkl; +@ Patches/../C_code.c:4038: growth += unit->pClassData->growthSkl; ldr r3, [r4, #4] @ unit_98(D)->pClassData, unit_98(D)->pClassData ldrsb r0, [r3, r0] @ tmp422, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r0, r6 @ tmp423, tmp422, avg -@ Patches/../C_code.c:5012: unit->skl = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5017: unit->skl = GetAutoleveledStatDecrease( ldrsb r2, [r4, r2] @ tmp419, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r0 @ num, avg, tmp423 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2665 @, + bge .L2668 @, movs r0, #20 @ num, -.L2665: -@ Patches/../C_code.c:5012: unit->skl = GetAutoleveledStatDecrease( +.L2668: +@ Patches/../C_code.c:5017: unit->skl = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:5012: unit->skl = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5017: unit->skl = GetAutoleveledStatDecrease( strb r0, [r4, #21] @ tmp494, unit_98(D)->skl -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; movs r0, #30 @ tmp428, -@ Patches/../C_code.c:5014: unit->spd = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5019: unit->spd = GetAutoleveledStatDecrease( movs r2, #22 @ tmp425, -@ Patches/../C_code.c:4064: growth += unit->pClassData->growthSpd; +@ Patches/../C_code.c:4069: growth += unit->pClassData->growthSpd; ldr r3, [r4, #4] @ unit_98(D)->pClassData, unit_98(D)->pClassData ldrsb r0, [r3, r0] @ tmp428, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r0, r6 @ tmp429, tmp428, avg -@ Patches/../C_code.c:5014: unit->spd = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5019: unit->spd = GetAutoleveledStatDecrease( ldrsb r2, [r4, r2] @ tmp425, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r0 @ num, avg, tmp429 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2666 @, + bge .L2669 @, movs r0, #20 @ num, -.L2666: -@ Patches/../C_code.c:5014: unit->spd = GetAutoleveledStatDecrease( +.L2669: +@ Patches/../C_code.c:5019: unit->spd = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:5014: unit->spd = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5019: unit->spd = GetAutoleveledStatDecrease( strb r0, [r4, #22] @ tmp495, unit_98(D)->spd -@ Patches/../C_code.c:4095: growth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4100: growth += unit->pClassData->growthDef; movs r0, #31 @ tmp434, -@ Patches/../C_code.c:5016: unit->def = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5021: unit->def = GetAutoleveledStatDecrease( movs r2, #23 @ tmp431, -@ Patches/../C_code.c:4095: growth += unit->pClassData->growthDef; +@ Patches/../C_code.c:4100: growth += unit->pClassData->growthDef; ldr r3, [r4, #4] @ unit_98(D)->pClassData, unit_98(D)->pClassData ldrsb r0, [r3, r0] @ tmp434, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r0, r6 @ tmp435, tmp434, avg -@ Patches/../C_code.c:5016: unit->def = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5021: unit->def = GetAutoleveledStatDecrease( ldrsb r2, [r4, r2] @ tmp431, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r0 @ num, avg, tmp435 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2667 @, + bge .L2670 @, movs r0, #20 @ num, -.L2667: -@ Patches/../C_code.c:5016: unit->def = GetAutoleveledStatDecrease( +.L2670: +@ Patches/../C_code.c:5021: unit->def = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4126: growth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4131: growth += unit->pClassData->growthRes; movs r3, #32 @ tmp440, -@ Patches/../C_code.c:5018: unit->res = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5023: unit->res = GetAutoleveledStatDecrease( movs r2, #24 @ tmp437, -@ Patches/../C_code.c:5016: unit->def = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5021: unit->def = GetAutoleveledStatDecrease( strb r0, [r4, #23] @ tmp496, unit_98(D)->def -@ Patches/../C_code.c:4126: growth += unit->pClassData->growthRes; +@ Patches/../C_code.c:4131: growth += unit->pClassData->growthRes; ldr r1, [r4, #4] @ unit_98(D)->pClassData, unit_98(D)->pClassData ldrsb r0, [r1, r3] @ tmp441, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r0, r6 @ tmp442, tmp441, avg -@ Patches/../C_code.c:5018: unit->res = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5023: unit->res = GetAutoleveledStatDecrease( ldrsb r2, [r4, r2] @ tmp437, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r0 @ num, avg, tmp442 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2668 @, + bge .L2671 @, movs r0, #20 @ num, -.L2668: -@ Patches/../C_code.c:5018: unit->res = GetAutoleveledStatDecrease( +.L2671: +@ Patches/../C_code.c:5023: unit->res = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:4157: growth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4162: growth += unit->pClassData->growthLck; movs r3, #33 @ tmp447, -@ Patches/../C_code.c:5020: unit->lck = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5025: unit->lck = GetAutoleveledStatDecrease( movs r2, #25 @ tmp444, -@ Patches/../C_code.c:5018: unit->res = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5023: unit->res = GetAutoleveledStatDecrease( strb r0, [r4, #24] @ tmp497, unit_98(D)->res -@ Patches/../C_code.c:4157: growth += unit->pClassData->growthLck; +@ Patches/../C_code.c:4162: growth += unit->pClassData->growthLck; ldr r1, [r4, #4] @ unit_98(D)->pClassData, unit_98(D)->pClassData ldrsb r0, [r1, r3] @ tmp448, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r0, r6 @ tmp449, tmp448, avg -@ Patches/../C_code.c:5020: unit->lck = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5025: unit->lck = GetAutoleveledStatDecrease( ldrsb r2, [r4, r2] @ tmp444, -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r0 @ num, avg, tmp449 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .L2669 @, + bge .L2672 @, movs r0, #20 @ num, -.L2669: -@ Patches/../C_code.c:5020: unit->lck = GetAutoleveledStatDecrease( +.L2672: +@ Patches/../C_code.c:5025: unit->lck = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:5022: if (StrMagInstalled) +@ Patches/../C_code.c:5027: if (StrMagInstalled) mov r3, r8 @ tmp466, tmp466 ldr r3, [r3] @ StrMagInstalled, StrMagInstalled -@ Patches/../C_code.c:5020: unit->lck = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5025: unit->lck = GetAutoleveledStatDecrease( strb r0, [r4, #25] @ tmp498, unit_98(D)->lck -@ Patches/../C_code.c:5022: if (StrMagInstalled) +@ Patches/../C_code.c:5027: if (StrMagInstalled) cmp r3, #0 @ StrMagInstalled, - beq .L2651 @, -@ Patches/../C_code.c:5025: AdjustGrowthForLosingLevels(GetClassMagGrowth(unit, false), avg), levelCount, unit->_u3A); + beq .L2654 @, +@ Patches/../C_code.c:5030: AdjustGrowthForLosingLevels(GetClassMagGrowth(unit, false), avg), levelCount, unit->_u3A); movs r3, #58 @ tmp453, -@ Patches/../C_code.c:3797: growth += MagClassTable[unit->pClassData->number].growth; +@ Patches/../C_code.c:3802: growth += MagClassTable[unit->pClassData->number].growth; ldr r1, [r4, #4] @ unit_98(D)->pClassData, unit_98(D)->pClassData ldrb r1, [r1, #4] @ tmp458, -@ Patches/../C_code.c:5024: unit->_u3A = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5029: unit->_u3A = GetAutoleveledStatDecrease( ldrb r2, [r4, r3] @ tmp454, -@ Patches/../C_code.c:3797: growth += MagClassTable[unit->pClassData->number].growth; - ldr r3, .L2684+8 @ tmp456, +@ Patches/../C_code.c:3802: growth += MagClassTable[unit->pClassData->number].growth; + ldr r3, .L2687+8 @ tmp456, lsls r1, r1, #2 @ tmp459, tmp458, adds r3, r3, r1 @ tmp460, tmp456, tmp459 ldrb r3, [r3, #1] @ tmp462, MagClassTable -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r3, r3, r6 @ tmp463, tmp462, avg -@ Patches/../C_code.c:4919: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa +@ Patches/../C_code.c:4924: int num = avg - (growth - avg); // invert growths so high growths become low and vice versa subs r0, r6, r3 @ num, avg, tmp463 -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) cmp r0, #20 @ num, - bge .LCB16187 @ - b .L2683 @long jump @ -.LCB16187: -.L2670: -@ Patches/../C_code.c:5024: unit->_u3A = GetAutoleveledStatDecrease( + bge .LCB16211 @ + b .L2686 @long jump @ +.LCB16211: +.L2673: +@ Patches/../C_code.c:5029: unit->_u3A = GetAutoleveledStatDecrease( movs r1, r5 @, levelCount bl GetAutoleveledStatDecrease @ -@ Patches/../C_code.c:5024: unit->_u3A = GetAutoleveledStatDecrease( +@ Patches/../C_code.c:5029: unit->_u3A = GetAutoleveledStatDecrease( movs r3, #58 @ tmp464, strb r0, [r4, r3] @ tmp499, unit_98(D)->_u3A -.L2651: -@ Patches/../C_code.c:5031: } +.L2654: +@ Patches/../C_code.c:5036: } @ sp needed @ -@ Patches/../C_code.c:5029: UnitCheckStatMins(unit); +@ Patches/../C_code.c:5034: UnitCheckStatMins(unit); movs r0, r4 @, unit bl UnitCheckStatMins @ -@ Patches/../C_code.c:5030: UnitCheckStatCaps(unit); +@ Patches/../C_code.c:5035: UnitCheckStatCaps(unit); movs r0, r4 @, unit bl UnitCheckStatCaps @ -@ Patches/../C_code.c:5031: } +@ Patches/../C_code.c:5036: } pop {r7} mov r8, r7 pop {r4, r5, r6, r7} pop {r0} bx r0 -.L2681: -@ Patches/../C_code.c:4943: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); +.L2684: +@ Patches/../C_code.c:4948: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); movs r1, #1 @, bl GetClassHPGrowth @ -@ Patches/../C_code.c:4943: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); - ldr r6, .L2684+12 @ tmp288, +@ Patches/../C_code.c:4948: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); + ldr r6, .L2687+12 @ tmp288, movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4943: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4948: unit->maxHP += GetAutoleveledStatIncrease(GetClassHPGrowth(unit, true), levelCount); ldrb r3, [r4, #18] @ tmp290, adds r3, r3, r0 @ tmp292, tmp290, tmp472 strb r3, [r4, #18] @ tmp292, unit_98(D)->maxHP -@ Patches/../C_code.c:4944: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4949: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassPowGrowth @ -@ Patches/../C_code.c:4944: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4949: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4944: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4949: unit->pow += GetAutoleveledStatIncrease(GetClassPowGrowth(unit, true), levelCount); ldrb r3, [r4, #20] @ tmp296, adds r3, r3, r0 @ tmp298, tmp296, tmp474 strb r3, [r4, #20] @ tmp298, unit_98(D)->pow -@ Patches/../C_code.c:4945: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4950: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassSklGrowth @ -@ Patches/../C_code.c:4945: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4950: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4945: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4950: unit->skl += GetAutoleveledStatIncrease(GetClassSklGrowth(unit, true), levelCount); ldrb r3, [r4, #21] @ tmp302, adds r3, r3, r0 @ tmp304, tmp302, tmp476 strb r3, [r4, #21] @ tmp304, unit_98(D)->skl -@ Patches/../C_code.c:4946: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4951: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassSpdGrowth @ -@ Patches/../C_code.c:4946: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4951: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4946: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4951: unit->spd += GetAutoleveledStatIncrease(GetClassSpdGrowth(unit, true), levelCount); ldrb r3, [r4, #22] @ tmp308, adds r3, r3, r0 @ tmp310, tmp308, tmp478 strb r3, [r4, #22] @ tmp310, unit_98(D)->spd -@ Patches/../C_code.c:4947: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4952: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassDefGrowth @ -@ Patches/../C_code.c:4947: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4952: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4947: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4952: unit->def += GetAutoleveledStatIncrease(GetClassDefGrowth(unit, true), levelCount); ldrb r3, [r4, #23] @ tmp314, adds r3, r3, r0 @ tmp316, tmp314, tmp480 strb r3, [r4, #23] @ tmp316, unit_98(D)->def -@ Patches/../C_code.c:4948: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4953: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassResGrowth @ -@ Patches/../C_code.c:4948: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4953: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4948: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4953: unit->res += GetAutoleveledStatIncrease(GetClassResGrowth(unit, true), levelCount); ldrb r3, [r4, #24] @ tmp320, adds r3, r3, r0 @ tmp322, tmp320, tmp482 strb r3, [r4, #24] @ tmp322, unit_98(D)->res -@ Patches/../C_code.c:4949: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4954: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassLckGrowth @ -@ Patches/../C_code.c:4949: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4954: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4949: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4954: unit->lck += GetAutoleveledStatIncrease(GetClassLckGrowth(unit, true), levelCount); ldrb r3, [r4, #25] @ tmp326, adds r3, r3, r0 @ tmp328, tmp326, tmp484 strb r3, [r4, #25] @ tmp328, unit_98(D)->lck -@ Patches/../C_code.c:4950: if (StrMagInstalled) - ldr r3, .L2684 @ tmp330, -@ Patches/../C_code.c:4950: if (StrMagInstalled) +@ Patches/../C_code.c:4955: if (StrMagInstalled) + ldr r3, .L2687 @ tmp330, +@ Patches/../C_code.c:4955: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2651 @, -@ Patches/../C_code.c:4952: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); + beq .L2654 @, +@ Patches/../C_code.c:4957: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); movs r1, #1 @, movs r0, r4 @, unit bl GetClassMagGrowth @ -@ Patches/../C_code.c:4952: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4957: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); movs r1, r5 @, levelCount - bl .L143 @ -@ Patches/../C_code.c:4952: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); + bl .L146 @ +@ Patches/../C_code.c:4957: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); movs r2, #58 @ tmp333, -@ Patches/../C_code.c:4952: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); +@ Patches/../C_code.c:4957: unit->_u3A += GetAutoleveledStatIncrease(GetClassMagGrowth(unit, true), levelCount); ldrb r3, [r4, r2] @ tmp335, adds r3, r3, r0 @ tmp337, tmp335, tmp486 strb r3, [r4, r2] @ tmp337, unit_98(D)->_u3A - b .L2651 @ -.L2682: -@ Patches/../C_code.c:3797: growth += MagClassTable[unit->pClassData->number].growth; + b .L2654 @ +.L2685: +@ Patches/../C_code.c:3802: growth += MagClassTable[unit->pClassData->number].growth; ldrb r2, [r2, #4] @ tmp402, -@ Patches/../C_code.c:3797: growth += MagClassTable[unit->pClassData->number].growth; - ldr r3, .L2684+8 @ tmp401, +@ Patches/../C_code.c:3802: growth += MagClassTable[unit->pClassData->number].growth; + ldr r3, .L2687+8 @ tmp401, lsls r2, r2, #2 @ tmp403, tmp402, adds r3, r3, r2 @ tmp404, tmp401, tmp403 ldrb r3, [r3, #1] @ tmp406, MagClassTable -@ Patches/../C_code.c:5008: avg = avg / i; +@ Patches/../C_code.c:5013: avg = avg / i; movs r1, #7 @, -@ Patches/../C_code.c:5005: avg += GetClassMagGrowth(unit, false); +@ Patches/../C_code.c:5010: avg += GetClassMagGrowth(unit, false); adds r0, r3, r0 @ avg, tmp406, _449 -@ Patches/../C_code.c:5008: avg = avg / i; - ldr r3, .L2684+4 @ tmp409, +@ Patches/../C_code.c:5013: avg = avg / i; + ldr r3, .L2687+4 @ tmp409, bl .L14 @ movs r6, r0 @ avg, tmp491 - b .L2663 @ -.L2653: -@ Patches/../C_code.c:4972: if (unit->maxHP < 10) + b .L2666 @ +.L2656: +@ Patches/../C_code.c:4977: if (unit->maxHP < 10) cmp r0, #9 @ _52, - ble .LCB16307 @ - b .L2656 @long jump @ -.LCB16307: -@ Patches/../C_code.c:4974: unit->maxHP = 10; + ble .LCB16331 @ + b .L2659 @long jump @ +.LCB16331: +@ Patches/../C_code.c:4979: unit->maxHP = 10; movs r3, #10 @ tmp368, strb r3, [r4, #18] @ tmp368, unit_98(D)->maxHP - b .L2656 @ -.L2683: -@ Patches/../C_code.c:4920: if (num < MinCharAutolevelBonusGrowth) + b .L2659 @ +.L2686: +@ Patches/../C_code.c:4925: if (num < MinCharAutolevelBonusGrowth) movs r0, #20 @ num, - b .L2670 @ -.L2685: + b .L2673 @ +.L2688: .align 2 -.L2684: +.L2687: .word StrMagInstalled .word __aeabi_idiv .word MagClassTable @@ -19481,103 +19512,103 @@ UnitInitFromDefinition: push {r5, r6, r7, lr} @ movs r6, r1 @ uDef, tmp1218 movs r4, r0 @ unit, tmp1217 -@ Patches/../C_code.c:5102: unit->pCharacterData = GetCharacterData(uDef->charIndex); - ldr r3, .L2881 @ tmp1179, -@ Patches/../C_code.c:5101: { +@ Patches/../C_code.c:5107: unit->pCharacterData = GetCharacterData(uDef->charIndex); + ldr r3, .L2884 @ tmp1179, +@ Patches/../C_code.c:5106: { sub sp, sp, #396 @,, -@ Patches/../C_code.c:5102: unit->pCharacterData = GetCharacterData(uDef->charIndex); +@ Patches/../C_code.c:5107: unit->pCharacterData = GetCharacterData(uDef->charIndex); ldrb r0, [r1] @ *uDef_377(D), *uDef_377(D) mov r10, r3 @ tmp1179, tmp1179 -@ Patches/../C_code.c:5101: { +@ Patches/../C_code.c:5106: { str r1, [sp, #16] @ uDef, %sfp -@ Patches/../C_code.c:5102: unit->pCharacterData = GetCharacterData(uDef->charIndex); +@ Patches/../C_code.c:5107: unit->pCharacterData = GetCharacterData(uDef->charIndex); bl .L14 @ -@ Patches/../C_code.c:5104: unit->level = uDef->level; +@ Patches/../C_code.c:5109: unit->level = uDef->level; ldrb r3, [r6, #3] @ *uDef_377(D), *uDef_377(D) lsrs r3, r3, #3 @ tmp586, *uDef_377(D), -@ Patches/../C_code.c:5104: unit->level = uDef->level; +@ Patches/../C_code.c:5109: unit->level = uDef->level; strb r3, [r4, #8] @ tmp586, unit_379(D)->level -@ Patches/../C_code.c:5105: unit->xPos = uDef->xPosition; +@ Patches/../C_code.c:5110: unit->xPos = uDef->xPosition; ldrb r3, [r6, #4] @ *uDef_377(D), *uDef_377(D) lsls r3, r3, #26 @ tmp592, *uDef_377(D), lsrs r3, r3, #26 @ tmp591, tmp592, -@ Patches/../C_code.c:5105: unit->xPos = uDef->xPosition; +@ Patches/../C_code.c:5110: unit->xPos = uDef->xPosition; strb r3, [r4, #16] @ tmp591, unit_379(D)->xPos -@ Patches/../C_code.c:5106: unit->yPos = uDef->yPosition; +@ Patches/../C_code.c:5111: unit->yPos = uDef->yPosition; ldrh r3, [r6, #4] @ *uDef_377(D), *uDef_377(D) lsls r3, r3, #20 @ tmp597, *uDef_377(D), lsrs r3, r3, #26 @ tmp596, tmp597, -@ Patches/../C_code.c:5102: unit->pCharacterData = GetCharacterData(uDef->charIndex); +@ Patches/../C_code.c:5107: unit->pCharacterData = GetCharacterData(uDef->charIndex); str r0, [r4] @ character, unit_379(D)->pCharacterData -@ Patches/../C_code.c:5106: unit->yPos = uDef->yPosition; +@ Patches/../C_code.c:5111: unit->yPos = uDef->yPosition; strb r3, [r4, #17] @ tmp596, unit_379(D)->yPos -@ Patches/../C_code.c:5102: unit->pCharacterData = GetCharacterData(uDef->charIndex); +@ Patches/../C_code.c:5107: unit->pCharacterData = GetCharacterData(uDef->charIndex); movs r5, r0 @ character, tmp1219 -@ Patches/../C_code.c:5108: int noise[4] = { 0, 0, 0, 0 }; // 1 extra so gCh is used +@ Patches/../C_code.c:5113: int noise[4] = { 0, 0, 0, 0 }; // 1 extra so gCh is used movs r2, #16 @, movs r1, #0 @, - ldr r3, .L2881+4 @ tmp602, + ldr r3, .L2884+4 @ tmp602, add r0, sp, #96 @ tmp1350,, bl .L14 @ -@ Patches/../C_code.c:5113: if (uDef->classIndex) +@ Patches/../C_code.c:5118: if (uDef->classIndex) ldrb r0, [r6, #1] @ _10, -@ Patches/../C_code.c:5113: if (uDef->classIndex) +@ Patches/../C_code.c:5118: if (uDef->classIndex) cmp r0, #0 @ _10, - bne .L2857 @, -@ Patches/../C_code.c:5119: originalClass = GetClassData(unit->pCharacterData->defaultClass); + bne .L2860 @, +@ Patches/../C_code.c:5124: originalClass = GetClassData(unit->pCharacterData->defaultClass); ldrb r0, [r5, #5] @ tmp606, -.L2857: - ldr r3, .L2881+8 @ tmp1180, +.L2860: + ldr r3, .L2884+8 @ tmp1180, mov r8, r3 @ tmp1180, tmp1180 bl .L14 @ -@ Patches/../C_code.c:5129: noise2[c] = character->baseLevel; +@ Patches/../C_code.c:5134: noise2[c] = character->baseLevel; movs r6, #11 @ _16, -@ Patches/../C_code.c:5131: noise2[c] = character->baseHP; +@ Patches/../C_code.c:5136: noise2[c] = character->baseHP; movs r7, #12 @ _18, -@ Patches/../C_code.c:5119: originalClass = GetClassData(unit->pCharacterData->defaultClass); +@ Patches/../C_code.c:5124: originalClass = GetClassData(unit->pCharacterData->defaultClass); str r0, [sp, #8] @ tmp1221, %sfp -@ Patches/../C_code.c:5121: unit->pClassData = originalClass; // for now +@ Patches/../C_code.c:5126: unit->pClassData = originalClass; // for now ldr r3, [sp, #8] @ originalClass, %sfp str r3, [r4, #4] @ originalClass, unit_379(D)->pClassData -@ Patches/../C_code.c:5133: noise2[c] = character->basePow; +@ Patches/../C_code.c:5138: noise2[c] = character->basePow; movs r3, #13 @ _20, -@ Patches/../C_code.c:5127: noise2[c] = character->number; +@ Patches/../C_code.c:5132: noise2[c] = character->number; ldrb r2, [r5, #4] @ _15, mov r9, r2 @ _15, _15 -@ Patches/../C_code.c:5135: noise2[c] = character->baseSkl; +@ Patches/../C_code.c:5140: noise2[c] = character->baseSkl; movs r2, #14 @ _22, -@ Patches/../C_code.c:5129: noise2[c] = character->baseLevel; +@ Patches/../C_code.c:5134: noise2[c] = character->baseLevel; ldrsb r6, [r5, r6] @ _16,* _16 str r6, [sp, #44] @ _16, %sfp -@ Patches/../C_code.c:5131: noise2[c] = character->baseHP; +@ Patches/../C_code.c:5136: noise2[c] = character->baseHP; ldrsb r7, [r5, r7] @ _18,* _18 str r7, [sp, #48] @ _18, %sfp -@ Patches/../C_code.c:5133: noise2[c] = character->basePow; +@ Patches/../C_code.c:5138: noise2[c] = character->basePow; ldrsb r3, [r5, r3] @ _20,* _20 str r3, [sp, #12] @ _20, %sfp -@ Patches/../C_code.c:5135: noise2[c] = character->baseSkl; +@ Patches/../C_code.c:5140: noise2[c] = character->baseSkl; ldrsb r2, [r5, r2] @ _22,* _22 str r2, [sp, #52] @ _22, %sfp -@ Patches/../C_code.c:5137: noise2[c] = character->baseSpd; +@ Patches/../C_code.c:5142: noise2[c] = character->baseSpd; movs r2, #15 @ _24, ldrsb r2, [r5, r2] @ _24,* _24 str r2, [sp, #56] @ _24, %sfp -@ Patches/../C_code.c:5139: noise2[c] = character->baseDef; +@ Patches/../C_code.c:5144: noise2[c] = character->baseDef; movs r2, #16 @ _26, ldrsb r2, [r5, r2] @ _26,* _26 str r2, [sp, #60] @ _26, %sfp -@ Patches/../C_code.c:5141: noise2[c] = character->baseRes; +@ Patches/../C_code.c:5146: noise2[c] = character->baseRes; movs r2, #17 @ _28, ldrsb r2, [r5, r2] @ _28,* _28 str r2, [sp, #64] @ _28, %sfp -@ Patches/../C_code.c:5143: noise2[c] = character->baseLck; +@ Patches/../C_code.c:5148: noise2[c] = character->baseLck; movs r2, #18 @ _30, ldrsb r2, [r5, r2] @ _30,* _30 str r2, [sp, #20] @ _30, %sfp -@ Patches/../C_code.c:5145: noise2[c] = character->growthHP; +@ Patches/../C_code.c:5150: noise2[c] = character->growthHP; ldrb r0, [r5, #28] @ _32, str r0, [sp, #24] @ _32, %sfp -@ Patches/../C_code.c:5147: noise2[c] = character->growthPow; +@ Patches/../C_code.c:5152: noise2[c] = character->growthPow; ldrb r2, [r5, #29] @ _33, str r2, [sp, #28] @ _33, %sfp ldrb r2, [r5, #31] @ MEM [(unsigned char *)_3 + 31B], MEM [(unsigned char *)_3 + 31B] @@ -19587,7 +19618,7 @@ UnitInitFromDefinition: movs r2, r5 @ tmp616, character lsls r1, r1, #16 @ tmp613, MEM [(signed char *)_3 + 14B], orrs r1, r3 @ tmp614, MEM [(signed char *)_3 + 14B] -@ Patches/../C_code.c:5149: noise2[c] = character->growthSkl; +@ Patches/../C_code.c:5154: noise2[c] = character->growthSkl; ldrb r3, [r5, #30] @ _34, str r3, [sp, #32] @ _34, %sfp mov r3, ip @ MEM [(unsigned char *)_3 + 31B], MEM [(unsigned char *)_3 + 31B] @@ -19601,19 +19632,19 @@ UnitInitFromDefinition: orrs r3, r0 @ tmp624, tmp621 lsls r2, r2, #24 @ tmp626, MEM [(unsigned char *)_3 + 31B], orrs r2, r3 @ tmp627, tmp624 -@ Patches/../C_code.c:5153: noise2[c] = character->growthDef; +@ Patches/../C_code.c:5158: noise2[c] = character->growthDef; movs r3, #32 @ tmp628, ldrb r0, [r5, r3] @ _36, str r0, [sp, #68] @ _36, %sfp -@ Patches/../C_code.c:5155: noise2[c] = character->growthRes; +@ Patches/../C_code.c:5160: noise2[c] = character->growthRes; adds r3, r3, #1 @ tmp629, ldrb r0, [r5, r3] @ _37, str r0, [sp, #72] @ _37, %sfp -@ Patches/../C_code.c:5157: noise2[c] = character->growthLck; +@ Patches/../C_code.c:5162: noise2[c] = character->growthLck; adds r3, r3, #1 @ tmp630, ldrb r0, [r5, r3] @ _38, str r0, [sp, #76] @ _38, %sfp -@ Patches/../C_code.c:5127: noise2[c] = character->number; +@ Patches/../C_code.c:5132: noise2[c] = character->number; lsls r0, r7, #24 @ tmp642, _18, mov r7, r9 @ _15, _15 lsls r3, r6, #24 @ tmp636, _16, @@ -19640,447 +19671,447 @@ UnitInitFromDefinition: orrs r3, r0 @ tmp670, tmp667 str r3, [sp, #120] @ tmp670, MEM [(unsigned char *)&noise2 + 8B] str r2, [sp, #124] @ tmp627, MEM [(unsigned char *)&noise2 + 12B] -@ Patches/../C_code.c:5159: noise2[c] = character->portraitId; +@ Patches/../C_code.c:5164: noise2[c] = character->portraitId; ldrh r2, [r5, #6] @ _39, -@ Patches/../C_code.c:5159: noise2[c] = character->portraitId; +@ Patches/../C_code.c:5164: noise2[c] = character->portraitId; add r0, sp, #112 @ tmp1177,, strb r2, [r0, #16] @ _39, noise2[16] -@ Patches/../C_code.c:5161: noise2[c] = character->affinity; +@ Patches/../C_code.c:5166: noise2[c] = character->affinity; ldrb r3, [r5, #9] @ _41, -@ Patches/../C_code.c:5161: noise2[c] = character->affinity; +@ Patches/../C_code.c:5166: noise2[c] = character->affinity; strb r3, [r0, #17] @ _41, noise2[17] -@ Patches/../C_code.c:5161: noise2[c] = character->affinity; +@ Patches/../C_code.c:5166: noise2[c] = character->affinity; str r3, [sp, #88] @ _41, %sfp -@ Patches/../C_code.c:5165: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5170: if (UNIT_FACTION(unit) != FACTION_BLUE) movs r3, #192 @ tmp680, -@ Patches/../C_code.c:5159: noise2[c] = character->portraitId; +@ Patches/../C_code.c:5164: noise2[c] = character->portraitId; mov fp, r0 @ tmp1177, tmp1177 -@ Patches/../C_code.c:5163: noise2[c] = unit->index; +@ Patches/../C_code.c:5168: noise2[c] = unit->index; movs r0, #11 @ _42, -@ Patches/../C_code.c:5165: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5170: if (UNIT_FACTION(unit) != FACTION_BLUE) movs r1, r3 @ _45, tmp680 -@ Patches/../C_code.c:5163: noise2[c] = unit->index; +@ Patches/../C_code.c:5168: noise2[c] = unit->index; mov r6, fp @ tmp1177, tmp1177 -@ Patches/../C_code.c:5163: noise2[c] = unit->index; +@ Patches/../C_code.c:5168: noise2[c] = unit->index; ldrsb r0, [r4, r0] @ _42,* _42 -@ Patches/../C_code.c:5165: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5170: if (UNIT_FACTION(unit) != FACTION_BLUE) ands r1, r0 @ _45, _42 -@ Patches/../C_code.c:5163: noise2[c] = unit->index; +@ Patches/../C_code.c:5168: noise2[c] = unit->index; strb r0, [r6, #18] @ _42, noise2[18] -@ Patches/../C_code.c:5165: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5170: if (UNIT_FACTION(unit) != FACTION_BLUE) str r1, [sp, #80] @ _45, %sfp -@ Patches/../C_code.c:5167: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) +@ Patches/../C_code.c:5172: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) ldr r7, [r4] @ pretmp_876, unit_379(D)->pCharacterData -@ Patches/../C_code.c:5165: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5170: if (UNIT_FACTION(unit) != FACTION_BLUE) tst r3, r0 @ tmp680, _42 - beq .L2780 @, -@ Patches/../C_code.c:5167: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) + beq .L2783 @, +@ Patches/../C_code.c:5172: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) ldr r1, [sp, #8] @ originalClass, %sfp ldr r3, [r7, #40] @ pretmp_876->attributes, pretmp_876->attributes ldr r1, [r1, #40] @ originalClass_326->attributes, originalClass_326->attributes orrs r3, r1 @ tmp681, originalClass_326->attributes -@ Patches/../C_code.c:5167: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) +@ Patches/../C_code.c:5172: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) lsls r3, r3, #16 @ tmp1280, tmp681, - bmi .LCB16514 @ - b .L2864 @long jump @ -.LCB16514: -.L2780: + bmi .LCB16538 @ + b .L2867 @long jump @ +.LCB16538: +.L2783: movs r3, #20 @ prephitmp_856, - ldr r1, .L2881+12 @ tmp1181, + ldr r1, .L2884+12 @ tmp1181, str r3, [sp, #84] @ prephitmp_856, %sfp -@ Patches/../C_code.c:5164: c++; +@ Patches/../C_code.c:5169: c++; subs r3, r3, #1 @ c, str r3, [sp, #36] @ c, %sfp str r1, [sp, #40] @ tmp1181, %sfp -.L2689: -@ Patches/../C_code.c:5185: noise2[c] = 0; +.L2692: +@ Patches/../C_code.c:5190: noise2[c] = 0; mov r6, fp @ tmp1177, tmp1177 movs r1, #0 @ tmp707, ldr r3, [sp, #36] @ c, %sfp strb r1, [r6, r3] @ tmp707, noise2[c_324] -@ Patches/../C_code.c:5186: noise2[c + 1] = 0; +@ Patches/../C_code.c:5191: noise2[c + 1] = 0; ldr r3, [sp, #84] @ prephitmp_856, %sfp strb r1, [r6, r3] @ tmp707, noise2[prephitmp_856] ldr r3, [sp, #36] @ c, %sfp -@ Patches/../C_code.c:5191: noise2[i]++; +@ Patches/../C_code.c:5196: noise2[i]++; movs r6, #1 @ tmp1216, add r3, r3, fp @ c, tmp1177 - b .L2691 @ -.L2882: + b .L2694 @ +.L2885: .align 2 -.L2881: +.L2884: .word GetCharacterData .word memset .word GetClassData .word gCh -.L2781: - movs r3, r1 @ ivtmp.1708, ivtmp.1708 -.L2691: -@ Patches/../C_code.c:5189: if (!noise2[i]) +.L2784: + movs r3, r1 @ ivtmp.1713, ivtmp.1713 +.L2694: +@ Patches/../C_code.c:5194: if (!noise2[i]) ldrb r1, [r3] @ MEM[(unsigned char *)_722], MEM[(unsigned char *)_722] cmp r1, #0 @ MEM[(unsigned char *)_722], - bne .L2690 @, -@ Patches/../C_code.c:5191: noise2[i]++; + bne .L2693 @, +@ Patches/../C_code.c:5196: noise2[i]++; strb r6, [r3] @ tmp1216, MEM[(unsigned char *)_722] -.L2690: -@ Patches/../C_code.c:5187: for (int i = c; i >= 0; --i) - subs r1, r3, #1 @ ivtmp.1708, ivtmp.1708, - cmp fp, r3 @ tmp1177, ivtmp.1708 - bne .L2781 @, -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +.L2693: +@ Patches/../C_code.c:5192: for (int i = c; i >= 0; --i) + subs r1, r3, #1 @ ivtmp.1713, ivtmp.1713, + cmp fp, r3 @ tmp1177, ivtmp.1713 + bne .L2784 @, +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + ldr r1, [sp, #48] @ _18, %sfp -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + ldr r3, [sp, #44] @ _16, %sfp add r3, r3, r9 @ _16, _15 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + mov r9, r1 @ _18, _18 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + ldr r1, [sp, #12] @ _20, %sfp -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + add r3, r3, r9 @ tmp718, _18 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + adds r6, r3, r1 @ tmp719, tmp718, _20 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + ldr r3, [sp, #52] @ _22, %sfp mov r9, r3 @ _22, _22 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + ldr r3, [sp, #56] @ _24, %sfp -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + add r6, r6, r9 @ tmp720, _22 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + mov r9, r3 @ _24, _24 -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; ldr r3, [sp, #60] @ _26, %sfp -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + add r6, r6, r9 @ tmp721, _24 -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; mov r9, r3 @ _26, _26 -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; ldr r3, [sp, #64] @ _28, %sfp -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; add r6, r6, r9 @ tmp722, _26 -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; mov r9, r3 @ _28, _28 -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; ldr r3, [sp, #20] @ _30, %sfp -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; add r6, r6, r9 @ tmp723, _28 -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; mov r9, r3 @ _30, _30 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + ldr r3, [sp, #24] @ _32, %sfp -@ Patches/../C_code.c:5197: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; +@ Patches/../C_code.c:5202: character->baseSpd + character->baseDef + character->baseRes + character->baseLck; add r6, r6, r9 @ _74, _30 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + mov r9, r3 @ _32, _32 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + ldr r3, [sp, #28] @ _33, %sfp -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + adds r2, r2, r0 @ tmp728, _39, _42 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + add r2, r2, r9 @ tmp729, _32 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + mov r9, r3 @ _33, _33 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + ldr r3, [sp, #32] @ _34, %sfp -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + add r2, r2, r9 @ tmp730, _33 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + mov r9, r3 @ _34, _34 -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; ldr r3, [sp, #68] @ _36, %sfp -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + add r2, r2, r9 @ tmp731, _34 -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + add r2, r2, ip @ tmp732, MEM [(unsigned char *)_3 + 31B] -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; mov ip, r3 @ _36, _36 -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; ldr r3, [sp, #72] @ _37, %sfp -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; add r2, r2, ip @ tmp733, _36 -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; mov ip, r3 @ _37, _37 -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; ldr r3, [sp, #76] @ _38, %sfp -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; add r2, r2, ip @ tmp734, _37 -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; mov ip, r3 @ _38, _38 -@ Patches/../C_code.c:5207: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5212: if (UNIT_FACTION(unit) != FACTION_BLUE) ldr r3, [sp, #80] @ _45, %sfp -@ Patches/../C_code.c:5199: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; +@ Patches/../C_code.c:5204: character->growthSpd + character->growthDef + character->growthRes + character->growthLck; add r2, r2, ip @ tmp735, _38 -@ Patches/../C_code.c:5196: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + +@ Patches/../C_code.c:5201: noise[0] = character->number + character->baseLevel + character->baseHP + character->basePow + character->baseSkl + str r6, [sp, #96] @ _74, noise[0] -@ Patches/../C_code.c:5198: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + +@ Patches/../C_code.c:5203: noise[1] = unit->index + character->portraitId + character->growthHP + character->growthPow + character->growthSkl + str r2, [sp, #100] @ tmp735, noise[1] -@ Patches/../C_code.c:5207: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5212: if (UNIT_FACTION(unit) != FACTION_BLUE) cmp r3, #0 @ _45, - bne .LCB16604 @ - b .L2692 @long jump @ -.LCB16604: -@ Patches/../C_code.c:5209: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) + bne .LCB16628 @ + b .L2695 @long jump @ +.LCB16628: +@ Patches/../C_code.c:5214: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) ldr r2, [sp, #8] @ originalClass, %sfp ldr r3, [r7, #40] @ pretmp_876->attributes, pretmp_876->attributes ldr r2, [r2, #40] @ originalClass_326->attributes, originalClass_326->attributes orrs r3, r2 @ tmp736, originalClass_326->attributes -@ Patches/../C_code.c:5209: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) +@ Patches/../C_code.c:5214: if (!(UNIT_CATTRIBUTES(unit) & CA_BOSS)) lsls r3, r3, #16 @ tmp1281, tmp736, - bmi .LCB16612 @ - b .L2865 @long jump @ -.LCB16612: -.L2693: -@ Patches/../C_code.c:5229: int RandomizeRecruitment = ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); + bmi .LCB16636 @ + b .L2868 @long jump @ +.LCB16636: +.L2696: +@ Patches/../C_code.c:5234: int RandomizeRecruitment = ShouldRandomizeRecruitmentForUnitID(unit->pCharacterData->number); ldrb r0, [r7, #4] @ tmp764, @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) - bl .L650 @ + bl .L653 @ @ Patches/../C_code.c:191: if (!GetCharacterData(id)->portraitId) ldrh r3, [r0, #6] @ tmp766, cmp r3, #0 @ tmp766, - bne .LCB16619 @ - b .L2697 @long jump @ -.LCB16619: + bne .LCB16643 @ + b .L2700 @long jump @ +.LCB16643: @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L2883 @ tmp768, + ldr r3, .L2886 @ tmp768, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_583, *RecruitValues.0_583 lsls r3, r3, #29 @ tmp773, *RecruitValues.0_583, lsrs r2, r3, #29 @ _585, tmp773, str r2, [sp, #20] @ _585, %sfp -@ Patches/../C_code.c:5231: if (RandomizeRecruitment) +@ Patches/../C_code.c:5236: if (RandomizeRecruitment) cmp r3, #0 @ tmp773, - bne .LCB16629 @ - b .L2697 @long jump @ -.LCB16629: -@ Patches/../C_code.c:550: return GetReorderedCharacter(unit->pCharacterData); + bne .LCB16653 @ + b .L2700 @long jump @ +.LCB16653: +@ Patches/../C_code.c:555: return GetReorderedCharacter(unit->pCharacterData); ldr r0, [r4] @ unit_379(D)->pCharacterData, unit_379(D)->pCharacterData bl GetReorderedCharacter @ movs r5, r0 @ character, tmp1223 -@ Patches/../C_code.c:5234: randCharOriginalClass = GetClassData(character->defaultClass); +@ Patches/../C_code.c:5239: randCharOriginalClass = GetClassData(character->defaultClass); ldrb r0, [r0, #5] @ tmp776, - bl .L208 @ + bl .L211 @ str r0, [sp, #92] @ tmp1224, %sfp -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); movs r2, r4 @, unit mov r1, fp @, tmp1177 ldrb r0, [r5, #5] @ tmp779, bl RandClass2 @ -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); - bl .L208 @ -@ Patches/../C_code.c:5257: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); + bl .L211 @ +@ Patches/../C_code.c:5262: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) ldr r3, [sp, #8] @ originalClass, %sfp ldr r2, [r3, #40] @ originalClass_326->attributes, originalClass_326->attributes movs r3, #128 @ tmp783, lsls r3, r3, #1 @ tmp783, tmp783, -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); mov r9, r0 @ _666, tmp1226 -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); str r0, [r4, #4] @ _666, unit_379(D)->pClassData -@ Patches/../C_code.c:5257: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) +@ Patches/../C_code.c:5262: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) tst r2, r3 @ originalClass_326->attributes, tmp783 - bne .LCB16649 @ - b .L2698 @long jump @ -.LCB16649: -.L2699: -@ Patches/../C_code.c:5287: noise[2] = unit->pClassData->number; + bne .LCB16673 @ + b .L2701 @long jump @ +.LCB16673: +.L2702: +@ Patches/../C_code.c:5292: noise[2] = unit->pClassData->number; mov r3, r9 @ _666, _666 ldrb r3, [r3, #4] @ tmp801, -@ Patches/../C_code.c:5289: if (ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5294: if (ShouldRandomizeClass(unit)) movs r0, r4 @, unit -@ Patches/../C_code.c:5287: noise[2] = unit->pClassData->number; +@ Patches/../C_code.c:5292: noise[2] = unit->pClassData->number; str r3, [sp, #104] @ tmp801, noise[2] -@ Patches/../C_code.c:5289: if (ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5294: if (ShouldRandomizeClass(unit)) bl ShouldRandomizeClass @ mov r8, r0 @ personalWexp, tmp1232 -@ Patches/../C_code.c:5289: if (ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5294: if (ShouldRandomizeClass(unit)) cmp r0, #0 @ personalWexp, - beq .L2704 @, -@ Patches/../C_code.c:5286: int personalWexp = 0; + beq .L2707 @, +@ Patches/../C_code.c:5291: int personalWexp = 0; movs r2, #0 @ personalWexp, - movs r3, r5 @ ivtmp.1695, character + movs r3, r5 @ ivtmp.1700, character movs r1, r5 @ _708, character movs r0, r2 @ personalWexp, personalWexp - adds r3, r3, #20 @ ivtmp.1695, + adds r3, r3, #20 @ ivtmp.1700, adds r1, r1, #28 @ _708, -.L2706: -@ Patches/../C_code.c:5293: tmp = character->baseRanks[c]; +.L2709: +@ Patches/../C_code.c:5298: tmp = character->baseRanks[c]; ldrb r2, [r3] @ tmp, MEM[(unsigned char *)_705] -@ Patches/../C_code.c:5294: if (tmp > personalWexp) +@ Patches/../C_code.c:5299: if (tmp > personalWexp) cmp r0, r2 @ personalWexp, tmp - bge .L2705 @, + bge .L2708 @, movs r0, r2 @ personalWexp, tmp -.L2705: -@ Patches/../C_code.c:5291: for (int c = 0; c < 8; ++c) - adds r3, r3, #1 @ ivtmp.1695, - cmp r3, r1 @ ivtmp.1695, _708 - bne .L2706 @, +.L2708: +@ Patches/../C_code.c:5296: for (int c = 0; c < 8; ++c) + adds r3, r3, #1 @ ivtmp.1700, + cmp r3, r1 @ ivtmp.1700, _708 + bne .L2709 @, mov r8, r0 @ personalWexp, personalWexp -.L2704: +.L2707: movs r3, #44 @ tmp1451, mov ip, r3 @ tmp1451, tmp1451 - ldr r3, .L2883+4 @ tmp1182, + ldr r3, .L2886+4 @ tmp1182, mov r10, r3 @ tmp1182, tmp1182 -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) movs r3, #20 @ tmp1213, add r9, r9, ip @ tmp1183, tmp1451 mov ip, r3 @ tmp1213, tmp1213 add ip, ip, r5 @ tmp1213, character mov r3, ip @ tmp1213, tmp1213 - movs r7, r4 @ ivtmp.1686, unit -@ Patches/../C_code.c:5300: for (int i = 0; i < 8; ++i) + movs r7, r4 @ ivtmp.1691, unit +@ Patches/../C_code.c:5305: for (int i = 0; i < 8; ++i) movs r6, #0 @ i, -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) str r3, [sp, #12] @ tmp1213, %sfp - adds r7, r7, #40 @ ivtmp.1686, -.L2721: -@ Patches/../C_code.c:5302: wexp = unit->pClassData->baseRanks[i]; + adds r7, r7, #40 @ ivtmp.1691, +.L2724: +@ Patches/../C_code.c:5307: wexp = unit->pClassData->baseRanks[i]; mov r3, r9 @ tmp1183, tmp1183 ldrb r3, [r3, r6] @ wexp, MEM[(unsigned char *)_672 + _668 * 1] -@ Patches/../C_code.c:5303: if (wexp) +@ Patches/../C_code.c:5308: if (wexp) cmp r3, #0 @ wexp, - beq .LCB16698 @ - b .L2866 @long jump @ -.LCB16698: -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) + beq .LCB16722 @ + b .L2869 @long jump @ +.LCB16722: +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) movs r0, r4 @, unit -@ Patches/../C_code.c:5312: unit->ranks[i] = wexp; +@ Patches/../C_code.c:5317: unit->ranks[i] = wexp; strb r3, [r7] @ wexp, MEM[(unsigned char *)_684] -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) bl ShouldRandomizeClass @ -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) cmp r0, #0 @ tmp1233, - bne .L2712 @, -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) + bne .L2715 @, +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) ldr r3, [sp, #12] @ tmp1213, %sfp ldrb r3, [r3, r6] @ _136, MEM[(unsigned char *)_696 + _668 * 1] -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) cmp r3, #0 @ _136, - beq .L2712 @, -@ Patches/../C_code.c:5336: unit->ranks[i] = character->baseRanks[i]; + beq .L2715 @, +@ Patches/../C_code.c:5341: unit->ranks[i] = character->baseRanks[i]; strb r3, [r7] @ _136, MEM[(unsigned char *)_680] -.L2712: -@ Patches/../C_code.c:5300: for (int i = 0; i < 8; ++i) +.L2715: +@ Patches/../C_code.c:5305: for (int i = 0; i < 8; ++i) adds r6, r6, #1 @ i, -@ Patches/../C_code.c:5300: for (int i = 0; i < 8; ++i) - adds r7, r7, #1 @ ivtmp.1686, +@ Patches/../C_code.c:5305: for (int i = 0; i < 8; ++i) + adds r7, r7, #1 @ ivtmp.1691, cmp r6, #8 @ i, - bne .L2721 @, -.L2719: -@ Patches/../C_code.c:5342: list[0] = 99; // so compiler doesn't assume uninitialized or whatever + bne .L2724 @, +.L2722: +@ Patches/../C_code.c:5347: list[0] = 99; // so compiler doesn't assume uninitialized or whatever movs r3, #99 @ tmp840, add r6, sp, #136 @ tmp1178,, -@ Patches/../C_code.c:5343: BuildAvailableWeaponList(list, unit); +@ Patches/../C_code.c:5348: BuildAvailableWeaponList(list, unit); movs r1, r4 @, unit movs r0, r6 @, tmp1178 -@ Patches/../C_code.c:5342: list[0] = 99; // so compiler doesn't assume uninitialized or whatever +@ Patches/../C_code.c:5347: list[0] = 99; // so compiler doesn't assume uninitialized or whatever strb r3, [r6] @ tmp840, list[0] -@ Patches/../C_code.c:5343: BuildAvailableWeaponList(list, unit); +@ Patches/../C_code.c:5348: BuildAvailableWeaponList(list, unit); bl BuildAvailableWeaponList @ movs r2, #12 @ tmp1464, mov ip, r2 @ tmp1464, tmp1464 ldr r3, [sp, #16] @ _631, %sfp add r3, r3, ip @ _631, tmp1464 mov r8, r3 @ _631, _631 -@ Patches/../C_code.c:5351: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); - ldr r3, .L2883+8 @ tmp1212, -@ Patches/../C_code.c:5345: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5356: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); + ldr r3, .L2886+8 @ tmp1212, +@ Patches/../C_code.c:5350: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) movs r7, #0 @ i, -@ Patches/../C_code.c:5351: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); +@ Patches/../C_code.c:5356: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); mov r9, r3 @ tmp1212, tmp1212 -.L2722: -@ Patches/../C_code.c:5345: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +.L2725: +@ Patches/../C_code.c:5350: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) mov r3, r8 @ _631, _631 ldrb r1, [r3, r7] @ _139, MEM[(unsigned char *)_631 + _628 * 1] -@ Patches/../C_code.c:5345: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5350: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) cmp r1, #0 @ _139, - beq .L2730 @, -@ Patches/../C_code.c:5347: if (i == 1) + beq .L2733 @, +@ Patches/../C_code.c:5352: if (i == 1) cmp r7, #1 @ i, - bne .LCB16738 @ - b .L2867 @long jump @ -.LCB16738: -.L2724: + bne .LCB16762 @ + b .L2870 @long jump @ +.LCB16762: +.L2727: movs r3, r7 @, i add r2, sp, #96 @ tmp1468,, movs r0, r4 @, unit str r6, [sp] @ tmp1178, bl RandNewWeapon.part.0 @ -@ Patches/../C_code.c:5345: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5350: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) adds r7, r7, #1 @ i, movs r1, r0 @ _519, tmp1236 -@ Patches/../C_code.c:5351: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); +@ Patches/../C_code.c:5356: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); movs r0, r4 @, unit - bl .L397 @ -@ Patches/../C_code.c:5345: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) + bl .L400 @ +@ Patches/../C_code.c:5350: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) cmp r7, #4 @ i, - bne .L2722 @, -.L2730: -@ Patches/../C_code.c:5354: unit->ai1 = uDef->ai[0]; + bne .L2725 @, +.L2733: +@ Patches/../C_code.c:5359: unit->ai1 = uDef->ai[0]; movs r3, #66 @ tmp847, -@ Patches/../C_code.c:5358: unit->ai3And4 &= 0xFFF8; +@ Patches/../C_code.c:5363: unit->ai3And4 &= 0xFFF8; movs r1, #64 @ tmp853, -@ Patches/../C_code.c:5354: unit->ai1 = uDef->ai[0]; +@ Patches/../C_code.c:5359: unit->ai1 = uDef->ai[0]; ldr r0, [sp, #16] @ uDef, %sfp ldrb r2, [r0, #16] @ tmp848, strb r2, [r4, r3] @ tmp848, unit_379(D)->ai1 -@ Patches/../C_code.c:5356: unit->ai2 = uDef->ai[1]; +@ Patches/../C_code.c:5361: unit->ai2 = uDef->ai[1]; ldrb r2, [r0, #17] @ tmp851, adds r3, r3, #2 @ tmp850, strb r2, [r4, r3] @ tmp851, unit_379(D)->ai2 -@ Patches/../C_code.c:5358: unit->ai3And4 &= 0xFFF8; +@ Patches/../C_code.c:5363: unit->ai3And4 &= 0xFFF8; ldrh r2, [r4, r1] @ tmp855, subs r3, r3, #61 @ tmp857, bics r2, r3 @ tmp856, tmp857 -@ Patches/../C_code.c:5359: unit->ai3And4 |= uDef->ai[2]; +@ Patches/../C_code.c:5364: unit->ai3And4 |= uDef->ai[2]; ldrb r3, [r0, #18] @ tmp859, -@ Patches/../C_code.c:5359: unit->ai3And4 |= uDef->ai[2]; +@ Patches/../C_code.c:5364: unit->ai3And4 |= uDef->ai[2]; orrs r3, r2 @ tmp861, tmp856 -@ Patches/../C_code.c:5360: unit->ai3And4 |= (uDef->ai[3] << 8); +@ Patches/../C_code.c:5365: unit->ai3And4 |= (uDef->ai[3] << 8); ldrb r2, [r0, #19] @ tmp863, lsls r2, r2, #8 @ tmp864, tmp863, orrs r3, r2 @ tmp867, tmp864 strh r3, [r4, r1] @ tmp867, unit_379(D)->ai3And4 -@ Patches/../C_code.c:5362: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5367: if (UNIT_FACTION(unit) != FACTION_BLUE) movs r3, #11 @ tmp870, movs r2, #192 @ tmp871, ldrsb r3, [r4, r3] @ tmp870, ands r2, r3 @ tmp871, tmp870 -@ Patches/../C_code.c:5366: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) +@ Patches/../C_code.c:5371: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) ldr r3, [r4] @ _154, unit_379(D)->pCharacterData mov r9, r3 @ _154, _154 -@ Patches/../C_code.c:5371: if (gCh > 0xD) +@ Patches/../C_code.c:5376: if (gCh > 0xD) ldr r3, [sp, #40] @ tmp1181, %sfp -@ Patches/../C_code.c:5362: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:5367: if (UNIT_FACTION(unit) != FACTION_BLUE) mov r8, r2 @ _153, tmp871 -@ Patches/../C_code.c:5371: if (gCh > 0xD) +@ Patches/../C_code.c:5376: if (gCh > 0xD) ldrb r2, [r3] @ pretmp_875, gCh -@ Patches/../C_code.c:5366: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) +@ Patches/../C_code.c:5371: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) mov r3, r9 @ _154, _154 ldr r7, [r4, #4] @ _156, unit_379(D)->pClassData ldr r3, [r3, #40] @ _154->attributes, _154->attributes ldr r1, [r7, #40] @ _156->attributes, _156->attributes orrs r3, r1 @ tmp873, _156->attributes -@ Patches/../C_code.c:5366: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) +@ Patches/../C_code.c:5371: if (UNIT_CATTRIBUTES(unit) & CA_PROMOTED) lsls r3, r3, #23 @ tmp1282, tmp873, - bmi .LCB16786 @ - b .L2868 @long jump @ -.LCB16786: -@ Patches/../C_code.c:5378: if (gCh > 0xE) + bmi .LCB16810 @ + b .L2871 @long jump @ +.LCB16810: +@ Patches/../C_code.c:5383: if (gCh > 0xE) movs r6, #0 @ tmp883, movs r3, #14 @ tmp882, cmp r3, r2 @ tmp882, pretmp_875 adcs r6, r6, r6 @ max150percent, tmp883, tmp883 -.L2731: -@ Patches/../C_code.c:5386: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); +.L2734: +@ Patches/../C_code.c:5391: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); movs r1, #12 @ tmp890, -@ Patches/../C_code.c:5386: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); +@ Patches/../C_code.c:5391: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); movs r3, #11 @ tmp891, -@ Patches/../C_code.c:5386: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); +@ Patches/../C_code.c:5391: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); ldrsb r1, [r5, r1] @ tmp890, -@ Patches/../C_code.c:5386: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); +@ Patches/../C_code.c:5391: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); ldrsb r3, [r7, r3] @ tmp891, -@ Patches/../C_code.c:5386: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); +@ Patches/../C_code.c:5391: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); adds r1, r1, r3 @ tmp892, tmp890, tmp891 movs r3, #3 @ tmp893, add r2, sp, #96 @ tmp1479,, @@ -20088,162 +20119,162 @@ UnitInitFromDefinition: movs r0, r4 @, unit adds r3, r3, #12 @, bl RandHPStat @ -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) mov r2, r9 @ _154, _154 -@ Patches/../C_code.c:5386: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); +@ Patches/../C_code.c:5391: unit->maxHP = RandHPStat(unit, character->baseHP + unit->pClassData->baseHP, noise, 15, 3); lsls r3, r0, #24 @ tmp894, _166, asrs r3, r3, #24 @ _167, tmp894, strb r3, [r4, #18] @ _167, unit_379(D)->maxHP -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) ldrb r2, [r2, #4] @ tmp899, cmp r2, #44 @ tmp899, - bls .L2788 @, + bls .L2791 @, mov r2, r8 @ _153, _153 cmp r2, #128 @ _153, - bne .LCB16821 @ - b .L2732 @long jump @ -.LCB16821: -.L2788: -@ Patches/../C_code.c:5389: if (unit->maxHP < 15) + bne .LCB16845 @ + b .L2735 @long jump @ +.LCB16845: +.L2791: +@ Patches/../C_code.c:5394: if (unit->maxHP < 15) cmp r3, #14 @ _167, - bgt .LCB16824 @ - b .L2734 @long jump @ -.LCB16824: -.L2735: -@ Patches/../C_code.c:5401: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); + bgt .LCB16848 @ + b .L2737 @long jump @ +.LCB16848: +.L2738: +@ Patches/../C_code.c:5406: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); movs r1, #13 @ tmp922, -@ Patches/../C_code.c:5401: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); +@ Patches/../C_code.c:5406: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); movs r3, #12 @ tmp923, -@ Patches/../C_code.c:5401: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); +@ Patches/../C_code.c:5406: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); ldrsb r1, [r5, r1] @ tmp922, -@ Patches/../C_code.c:5401: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); +@ Patches/../C_code.c:5406: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); ldrsb r3, [r7, r3] @ tmp923, -@ Patches/../C_code.c:5401: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); +@ Patches/../C_code.c:5406: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); add r2, sp, #96 @ tmp1482,, adds r1, r1, r3 @ tmp924, tmp922, tmp923 movs r0, r4 @, unit movs r3, #25 @, str r6, [sp] @ max150percent, bl RandStat @ -@ Patches/../C_code.c:5402: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); +@ Patches/../C_code.c:5407: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); movs r1, #14 @ tmp927, -@ Patches/../C_code.c:5402: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); +@ Patches/../C_code.c:5407: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); movs r3, #13 @ tmp928, -@ Patches/../C_code.c:5401: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); +@ Patches/../C_code.c:5406: unit->pow = RandStat(unit, character->basePow + unit->pClassData->basePow, noise, 25, max150percent); strb r0, [r4, #20] @ tmp1238, unit_379(D)->pow -@ Patches/../C_code.c:5402: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); +@ Patches/../C_code.c:5407: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); ldrsb r3, [r7, r3] @ tmp928, -@ Patches/../C_code.c:5402: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); +@ Patches/../C_code.c:5407: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); ldrsb r1, [r5, r1] @ tmp927, -@ Patches/../C_code.c:5402: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); +@ Patches/../C_code.c:5407: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); add r2, sp, #96 @ tmp1483,, adds r1, r1, r3 @ tmp929, tmp927, tmp928 movs r0, r4 @, unit movs r3, #35 @, str r6, [sp] @ max150percent, bl RandStat @ -@ Patches/../C_code.c:5403: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); +@ Patches/../C_code.c:5408: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); movs r1, #15 @ tmp932, -@ Patches/../C_code.c:5403: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); +@ Patches/../C_code.c:5408: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); movs r3, #14 @ tmp933, -@ Patches/../C_code.c:5402: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); +@ Patches/../C_code.c:5407: unit->skl = RandStat(unit, character->baseSkl + unit->pClassData->baseSkl, noise, 35, max150percent); strb r0, [r4, #21] @ tmp1239, unit_379(D)->skl -@ Patches/../C_code.c:5403: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); +@ Patches/../C_code.c:5408: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); ldrsb r3, [r7, r3] @ tmp933, -@ Patches/../C_code.c:5403: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); +@ Patches/../C_code.c:5408: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); ldrsb r1, [r5, r1] @ tmp932, -@ Patches/../C_code.c:5403: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); +@ Patches/../C_code.c:5408: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); add r2, sp, #96 @ tmp1484,, adds r1, r1, r3 @ tmp934, tmp932, tmp933 movs r0, r4 @, unit movs r3, #45 @, str r6, [sp] @ max150percent, bl RandStat @ -@ Patches/../C_code.c:5404: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); +@ Patches/../C_code.c:5409: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); movs r1, #16 @ tmp937, -@ Patches/../C_code.c:5404: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); +@ Patches/../C_code.c:5409: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); movs r3, #15 @ tmp938, -@ Patches/../C_code.c:5403: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); +@ Patches/../C_code.c:5408: unit->spd = RandStat(unit, character->baseSpd + unit->pClassData->baseSpd, noise, 45, max150percent); strb r0, [r4, #22] @ tmp1240, unit_379(D)->spd -@ Patches/../C_code.c:5404: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); +@ Patches/../C_code.c:5409: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); ldrsb r3, [r7, r3] @ tmp938, -@ Patches/../C_code.c:5404: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); +@ Patches/../C_code.c:5409: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); ldrsb r1, [r5, r1] @ tmp937, -@ Patches/../C_code.c:5404: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); +@ Patches/../C_code.c:5409: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); add r2, sp, #96 @ tmp1485,, adds r1, r1, r3 @ tmp939, tmp937, tmp938 movs r0, r4 @, unit movs r3, #55 @, str r6, [sp] @ max150percent, bl RandStat @ -@ Patches/../C_code.c:5405: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); +@ Patches/../C_code.c:5410: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); movs r1, #17 @ tmp942, -@ Patches/../C_code.c:5405: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); +@ Patches/../C_code.c:5410: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); movs r3, #16 @ tmp943, -@ Patches/../C_code.c:5404: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); +@ Patches/../C_code.c:5409: unit->def = RandStat(unit, character->baseDef + unit->pClassData->baseDef, noise, 55, max150percent); strb r0, [r4, #23] @ tmp1241, unit_379(D)->def -@ Patches/../C_code.c:5405: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); +@ Patches/../C_code.c:5410: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); ldrsb r3, [r7, r3] @ tmp943, -@ Patches/../C_code.c:5405: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); +@ Patches/../C_code.c:5410: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); ldrsb r1, [r5, r1] @ tmp942, -@ Patches/../C_code.c:5405: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); +@ Patches/../C_code.c:5410: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); add r2, sp, #96 @ tmp1486,, adds r1, r1, r3 @ tmp944, tmp942, tmp943 movs r0, r4 @, unit movs r3, #65 @, str r6, [sp] @ max150percent, bl RandStat @ -@ Patches/../C_code.c:5406: unit->lck = RandStat(unit, character->baseLck, noise, 75, max150percent); +@ Patches/../C_code.c:5411: unit->lck = RandStat(unit, character->baseLck, noise, 75, max150percent); movs r1, #18 @ tmp947, -@ Patches/../C_code.c:5405: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); +@ Patches/../C_code.c:5410: unit->res = RandStat(unit, character->baseRes + unit->pClassData->baseRes, noise, 65, max150percent); strb r0, [r4, #24] @ tmp1242, unit_379(D)->res -@ Patches/../C_code.c:5406: unit->lck = RandStat(unit, character->baseLck, noise, 75, max150percent); +@ Patches/../C_code.c:5411: unit->lck = RandStat(unit, character->baseLck, noise, 75, max150percent); movs r3, #75 @, ldrsb r1, [r5, r1] @ tmp947, movs r0, r4 @, unit str r6, [sp] @ max150percent, add r2, sp, #96 @ tmp1487,, bl RandStat @ -@ Patches/../C_code.c:5407: if (StrMagInstalled) - ldr r3, .L2883+12 @ tmp949, -@ Patches/../C_code.c:5407: if (StrMagInstalled) +@ Patches/../C_code.c:5412: if (StrMagInstalled) + ldr r3, .L2886+12 @ tmp949, +@ Patches/../C_code.c:5412: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled -@ Patches/../C_code.c:5406: unit->lck = RandStat(unit, character->baseLck, noise, 75, max150percent); +@ Patches/../C_code.c:5411: unit->lck = RandStat(unit, character->baseLck, noise, 75, max150percent); strb r0, [r4, #25] @ tmp1243, unit_379(D)->lck -@ Patches/../C_code.c:5407: if (StrMagInstalled) +@ Patches/../C_code.c:5412: if (StrMagInstalled) cmp r3, #0 @ StrMagInstalled, - beq .LCB16898 @ - b .L2869 @long jump @ -.LCB16898: -.L2737: -@ Patches/../C_code.c:5418: unit->conBonus = 0; + beq .LCB16922 @ + b .L2872 @long jump @ +.LCB16922: +.L2740: +@ Patches/../C_code.c:5423: unit->conBonus = 0; movs r3, #0 @ tmp964, strb r3, [r4, #26] @ tmp964, unit_379(D)->conBonus -@ Patches/../C_code.c:5419: unit->movBonus = 0; +@ Patches/../C_code.c:5424: unit->movBonus = 0; strb r3, [r4, #29] @ tmp964, unit_379(D)->movBonus -@ Patches/../C_code.c:5421: if (RandomizeMovConBonus) - ldr r3, .L2883+16 @ tmp968, -@ Patches/../C_code.c:5421: if (RandomizeMovConBonus) +@ Patches/../C_code.c:5426: if (RandomizeMovConBonus) + ldr r3, .L2886+16 @ tmp968, +@ Patches/../C_code.c:5426: if (RandomizeMovConBonus) ldr r3, [r3] @ RandomizeMovConBonus, RandomizeMovConBonus cmp r3, #0 @ RandomizeMovConBonus, - beq .L2739 @, -@ Patches/../C_code.c:5423: if (RandBitflags->base) + beq .L2742 @, +@ Patches/../C_code.c:5428: if (RandBitflags->base) mov r3, r10 @ tmp1182, tmp1182 ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3] @ *RandBitflags.220_218, *RandBitflags.220_218 -@ Patches/../C_code.c:5423: if (RandBitflags->base) - lsls r3, r3, #30 @ tmp1283, *RandBitflags.220_218, - beq .LCB16915 @ - b .L2870 @long jump @ -.LCB16915: -.L2739: -@ Patches/../C_code.c:5445: if (UNIT_FACTION(unit) == FACTION_BLUE && (unit->level != 20)) + ldrb r3, [r3] @ *RandBitflags.221_218, *RandBitflags.221_218 +@ Patches/../C_code.c:5428: if (RandBitflags->base) + lsls r3, r3, #30 @ tmp1283, *RandBitflags.221_218, + beq .LCB16939 @ + b .L2873 @long jump @ +.LCB16939: +.L2742: +@ Patches/../C_code.c:5450: if (UNIT_FACTION(unit) == FACTION_BLUE && (unit->level != 20)) mov r3, r8 @ _153, _153 cmp r3, #0 @ _153, - beq .LCB16919 @ - b .L2743 @long jump @ -.LCB16919: -@ Patches/../C_code.c:5445: if (UNIT_FACTION(unit) == FACTION_BLUE && (unit->level != 20)) + beq .LCB16943 @ + b .L2746 @long jump @ +.LCB16943: +@ Patches/../C_code.c:5450: if (UNIT_FACTION(unit) == FACTION_BLUE && (unit->level != 20)) movs r3, #8 @ tmp1018, ldrsb r3, [r4, r3] @ tmp1018, subs r3, r3, #20 @ tmp1020, @@ -20252,226 +20283,226 @@ UnitInitFromDefinition: rsbs r3, r3, #0 @ tmp1022, tmp1019 lsls r3, r3, #24 @ tmp1023, tmp1022, lsrs r3, r3, #24 @ _132, tmp1023, -.L2742: +.L2745: strb r3, [r4, #9] @ _132, unit_379(D)->exp -@ Patches/../C_code.c:5452: if (RandomizeRecruitment) +@ Patches/../C_code.c:5457: if (RandomizeRecruitment) ldr r3, [sp, #20] @ _585, %sfp cmp r3, #0 @ _585, - beq .L2744 @, -@ Patches/../C_code.c:5054: int level = table->baseLevel; + beq .L2747 @, +@ Patches/../C_code.c:5059: int level = table->baseLevel; movs r0, #11 @ level, -@ Patches/../C_code.c:5455: GetAdjustedLevel(unit->pCharacterData, originalClass) - GetAdjustedLevel(character, unit->pClassData); +@ Patches/../C_code.c:5460: GetAdjustedLevel(unit->pCharacterData, originalClass) - GetAdjustedLevel(character, unit->pClassData); ldr r2, [r4] @ _233, unit_379(D)->pCharacterData -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r3, [sp, #8] @ originalClass, %sfp -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; ldrsb r0, [r2, r0] @ level,* level -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r3, [r3, #40] @ _564, originalClass_326->attributes -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r2, [r2, #40] @ _233->attributes, _233->attributes orrs r2, r3 @ tmp1025, _564 -@ Patches/../C_code.c:5055: if (promoted) +@ Patches/../C_code.c:5060: if (promoted) lsls r2, r2, #23 @ tmp1284, tmp1025, - bpl .L2745 @, -@ Patches/../C_code.c:5057: level += 15; + bpl .L2748 @, +@ Patches/../C_code.c:5062: level += 15; adds r0, r0, #15 @ level, -.L2745: -@ Patches/../C_code.c:5455: GetAdjustedLevel(unit->pCharacterData, originalClass) - GetAdjustedLevel(character, unit->pClassData); +.L2748: +@ Patches/../C_code.c:5460: GetAdjustedLevel(unit->pCharacterData, originalClass) - GetAdjustedLevel(character, unit->pClassData); ldr r1, [r4, #4] @ _234, unit_379(D)->pClassData -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r2, [r5, #40] @ _555, character_698->attributes -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; ldrb r5, [r5, #11] @ level, -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r6, [r1, #40] @ _234->attributes, _234->attributes -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; lsls r5, r5, #24 @ level, level, asrs r5, r5, #24 @ level, level, -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); orrs r6, r2 @ tmp1029, _555 -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; movs r7, r5 @ level, level -@ Patches/../C_code.c:5055: if (promoted) +@ Patches/../C_code.c:5060: if (promoted) lsls r6, r6, #23 @ tmp1285, tmp1029, - bpl .L2746 @, -@ Patches/../C_code.c:5057: level += 15; + bpl .L2749 @, +@ Patches/../C_code.c:5062: level += 15; adds r7, r7, #15 @ level, -.L2746: -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +.L2749: +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); orrs r3, r2 @ _564, _555 movs r6, r3 @ tmp1033, _564 -@ Patches/../C_code.c:5454: int bonusLevels = +@ Patches/../C_code.c:5459: int bonusLevels = subs r0, r0, r7 @ bonusLevels, level, level -@ Patches/../C_code.c:5054: int level = table->baseLevel; +@ Patches/../C_code.c:5059: int level = table->baseLevel; movs r3, r5 @ level, level -@ Patches/../C_code.c:5055: if (promoted) +@ Patches/../C_code.c:5060: if (promoted) lsls r6, r6, #23 @ tmp1286, tmp1033, - bpl .L2747 @, -@ Patches/../C_code.c:5057: level += 15; + bpl .L2750 @, +@ Patches/../C_code.c:5062: level += 15; adds r3, r3, #15 @ level, -.L2747: -@ Patches/../C_code.c:5053: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); +.L2750: +@ Patches/../C_code.c:5058: int promoted = ((table->attributes | classTable->attributes) & CA_PROMOTED); ldr r6, [sp, #92] @ randCharOriginalClass, %sfp ldr r6, [r6, #40] @ randCharOriginalClass_702->attributes, randCharOriginalClass_702->attributes orrs r2, r6 @ tmp1036, randCharOriginalClass_702->attributes -@ Patches/../C_code.c:5055: if (promoted) +@ Patches/../C_code.c:5060: if (promoted) lsls r2, r2, #23 @ tmp1287, tmp1036, - bpl .L2748 @, -@ Patches/../C_code.c:5057: level += 15; + bpl .L2751 @, +@ Patches/../C_code.c:5062: level += 15; adds r5, r5, #15 @ level, -.L2748: -@ Patches/../C_code.c:5456: bonusLevels += GetAdjustedLevel(character, originalClass) - GetAdjustedLevel(character, randCharOriginalClass); +.L2751: +@ Patches/../C_code.c:5461: bonusLevels += GetAdjustedLevel(character, originalClass) - GetAdjustedLevel(character, randCharOriginalClass); subs r2, r3, r5 @ tmp1040, level, level -@ Patches/../C_code.c:5456: bonusLevels += GetAdjustedLevel(character, originalClass) - GetAdjustedLevel(character, randCharOriginalClass); +@ Patches/../C_code.c:5461: bonusLevels += GetAdjustedLevel(character, originalClass) - GetAdjustedLevel(character, randCharOriginalClass); adds r2, r2, r0 @ bonusLevels, tmp1040, bonusLevels -@ Patches/../C_code.c:5457: if (bonusLevels) +@ Patches/../C_code.c:5462: if (bonusLevels) cmp r2, #0 @ bonusLevels, - beq .LCB16986 @ - b .L2871 @long jump @ -.LCB16986: -.L2744: -@ Patches/../C_code.c:5475: if (RandBitflags->foundItems) + beq .LCB17010 @ + b .L2874 @long jump @ +.LCB17010: +.L2747: +@ Patches/../C_code.c:5480: if (RandBitflags->foundItems) mov r3, r10 @ tmp1182, tmp1182 movs r2, #48 @ tmp1050, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.221_236, *RandBitflags.221_236 -@ Patches/../C_code.c:5475: if (RandBitflags->foundItems) - tst r2, r3 @ tmp1050, *RandBitflags.221_236 - beq .LCB16996 @ - b .L2872 @long jump @ -.LCB16996: -.L2752: -@ Patches/../C_code.c:5509: MakePromotedUnitHaveMinStats(unit); + ldrb r3, [r3, #1] @ *RandBitflags.222_236, *RandBitflags.222_236 +@ Patches/../C_code.c:5480: if (RandBitflags->foundItems) + tst r2, r3 @ tmp1050, *RandBitflags.222_236 + beq .LCB17020 @ + b .L2875 @long jump @ +.LCB17020: +.L2755: +@ Patches/../C_code.c:5514: MakePromotedUnitHaveMinStats(unit); movs r0, r4 @, unit bl MakePromotedUnitHaveMinStats @ -@ Patches/../C_code.c:5510: UnitCheckStatMins(unit); +@ Patches/../C_code.c:5515: UnitCheckStatMins(unit); movs r0, r4 @, unit bl UnitCheckStatMins @ -@ Patches/../C_code.c:5512: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; +@ Patches/../C_code.c:5517: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; movs r1, #12 @ tmp1079, -@ Patches/../C_code.c:5512: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; +@ Patches/../C_code.c:5517: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; movs r2, #11 @ tmp1080, ldr r0, [sp, #8] @ originalClass, %sfp -@ Patches/../C_code.c:5512: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; +@ Patches/../C_code.c:5517: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; ldr r3, [r4] @ _252, unit_379(D)->pCharacterData -@ Patches/../C_code.c:5512: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; +@ Patches/../C_code.c:5517: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; ldrsb r2, [r0, r2] @ tmp1080, -@ Patches/../C_code.c:5512: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; +@ Patches/../C_code.c:5517: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; ldrsb r1, [r3, r1] @ tmp1079, -@ Patches/../C_code.c:5512: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; +@ Patches/../C_code.c:5517: int orgHP = unit->pCharacterData->baseHP + originalClass->baseHP; adds r2, r1, r2 @ orgHP, tmp1079, tmp1080 str r2, [sp, #8] @ orgHP, %sfp -@ Patches/../C_code.c:5513: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; +@ Patches/../C_code.c:5518: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; movs r1, #13 @ tmp1081, -@ Patches/../C_code.c:5513: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; +@ Patches/../C_code.c:5518: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; movs r2, #12 @ tmp1082, -@ Patches/../C_code.c:5513: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; +@ Patches/../C_code.c:5518: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; ldrsb r1, [r3, r1] @ tmp1081, -@ Patches/../C_code.c:5513: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; +@ Patches/../C_code.c:5518: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; ldrsb r2, [r0, r2] @ tmp1082, -@ Patches/../C_code.c:5513: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; +@ Patches/../C_code.c:5518: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; adds r5, r1, r2 @ orgPow, tmp1081, tmp1082 -@ Patches/../C_code.c:5514: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; +@ Patches/../C_code.c:5519: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; movs r1, #14 @ tmp1083, -@ Patches/../C_code.c:5513: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; +@ Patches/../C_code.c:5518: int orgPow = unit->pCharacterData->basePow + originalClass->basePow; str r5, [sp, #12] @ orgPow, %sfp -@ Patches/../C_code.c:5514: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; +@ Patches/../C_code.c:5519: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; movs r2, #13 @ tmp1084, -@ Patches/../C_code.c:5514: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; +@ Patches/../C_code.c:5519: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; ldrsb r1, [r3, r1] @ tmp1083, -@ Patches/../C_code.c:5514: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; +@ Patches/../C_code.c:5519: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; mov r9, r1 @ tmp1083, tmp1083 -@ Patches/../C_code.c:5515: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; +@ Patches/../C_code.c:5520: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; movs r1, #15 @ tmp1085, -@ Patches/../C_code.c:5514: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; +@ Patches/../C_code.c:5519: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; ldrsb r2, [r0, r2] @ tmp1084, -@ Patches/../C_code.c:5515: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; +@ Patches/../C_code.c:5520: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; ldrsb r1, [r3, r1] @ tmp1085, -@ Patches/../C_code.c:5514: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; +@ Patches/../C_code.c:5519: int orgSkl = unit->pCharacterData->baseSkl + originalClass->baseSkl; add r9, r9, r2 @ tmp1083, tmp1084 -@ Patches/../C_code.c:5515: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; +@ Patches/../C_code.c:5520: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; movs r2, #14 @ tmp1086, -@ Patches/../C_code.c:5515: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; +@ Patches/../C_code.c:5520: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; mov r8, r1 @ tmp1085, tmp1085 -@ Patches/../C_code.c:5515: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; +@ Patches/../C_code.c:5520: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; ldrsb r2, [r0, r2] @ tmp1086, -@ Patches/../C_code.c:5516: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; +@ Patches/../C_code.c:5521: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; movs r7, #16 @ tmp1087, -@ Patches/../C_code.c:5515: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; +@ Patches/../C_code.c:5520: int orgSpd = unit->pCharacterData->baseSpd + originalClass->baseSpd; add r8, r8, r2 @ tmp1085, tmp1086 -@ Patches/../C_code.c:5516: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; +@ Patches/../C_code.c:5521: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; movs r2, #15 @ tmp1088, -@ Patches/../C_code.c:5516: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; +@ Patches/../C_code.c:5521: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; ldrsb r7, [r3, r7] @ tmp1087, -@ Patches/../C_code.c:5516: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; +@ Patches/../C_code.c:5521: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; ldrsb r2, [r0, r2] @ tmp1088, -@ Patches/../C_code.c:5517: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; +@ Patches/../C_code.c:5522: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; movs r6, #17 @ tmp1089, -@ Patches/../C_code.c:5516: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; +@ Patches/../C_code.c:5521: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; adds r7, r7, r2 @ orgDef, tmp1087, tmp1088 -@ Patches/../C_code.c:5517: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; +@ Patches/../C_code.c:5522: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; movs r2, #16 @ tmp1090, -@ Patches/../C_code.c:5517: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; +@ Patches/../C_code.c:5522: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; ldrsb r6, [r3, r6] @ tmp1089, -@ Patches/../C_code.c:5517: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; +@ Patches/../C_code.c:5522: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; ldrsb r2, [r0, r2] @ tmp1090, -@ Patches/../C_code.c:5517: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; +@ Patches/../C_code.c:5522: int orgRes = unit->pCharacterData->baseRes + originalClass->baseRes; adds r6, r6, r2 @ orgRes, tmp1089, tmp1090 -@ Patches/../C_code.c:5518: int orgLck = unit->pCharacterData->baseLck; +@ Patches/../C_code.c:5523: int orgLck = unit->pCharacterData->baseLck; movs r2, #18 @ orgLck, -@ Patches/../C_code.c:5516: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; +@ Patches/../C_code.c:5521: int orgDef = unit->pCharacterData->baseDef + originalClass->baseDef; movs r1, r0 @ originalClass, originalClass -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; movs r0, r5 @ tmp1091, orgPow -@ Patches/../C_code.c:5518: int orgLck = unit->pCharacterData->baseLck; +@ Patches/../C_code.c:5523: int orgLck = unit->pCharacterData->baseLck; ldrsb r2, [r3, r2] @ orgLck,* orgLck -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; mov ip, r2 @ orgLck, orgLck -@ Patches/../C_code.c:5518: int orgLck = unit->pCharacterData->baseLck; +@ Patches/../C_code.c:5523: int orgLck = unit->pCharacterData->baseLck; str r2, [sp, #16] @ orgLck, %sfp -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; add r0, r0, r9 @ tmp1091, orgSkl -@ Patches/../C_code.c:5523: if (SkillSysInstalled) - ldr r2, .L2883+20 @ tmp1095, -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5528: if (SkillSysInstalled) + ldr r2, .L2886+20 @ tmp1095, +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; add r0, r0, r8 @ tmp1092, orgSpd -@ Patches/../C_code.c:5523: if (SkillSysInstalled) - ldr r2, [r2] @ SkillSysInstalled.223_282, SkillSysInstalled -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5528: if (SkillSysInstalled) + ldr r2, [r2] @ SkillSysInstalled.224_282, SkillSysInstalled +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; adds r0, r0, r7 @ tmp1093, tmp1092, orgDef -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; adds r0, r0, r6 @ tmp1094, tmp1093, orgRes -@ Patches/../C_code.c:5523: if (SkillSysInstalled) - mov fp, r2 @ SkillSysInstalled.223_282, SkillSysInstalled.223_282 -@ Patches/../C_code.c:5520: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; +@ Patches/../C_code.c:5528: if (SkillSysInstalled) + mov fp, r2 @ SkillSysInstalled.224_282, SkillSysInstalled.224_282 +@ Patches/../C_code.c:5525: int avgStat = orgPow + orgSkl + orgSpd + orgDef + orgRes + orgLck; add r0, r0, ip @ avgStat, orgLck -@ Patches/../C_code.c:5523: if (SkillSysInstalled) - cmp r2, #0 @ SkillSysInstalled.223_282, - bne .LCB17053 @ - b .L2787 @long jump @ -.LCB17053: -@ Patches/../C_code.c:5525: orgMag = GetBaseMag(unit->pCharacterData->number, originalClass->number); +@ Patches/../C_code.c:5528: if (SkillSysInstalled) + cmp r2, #0 @ SkillSysInstalled.224_282, + bne .LCB17077 @ + b .L2790 @long jump @ +.LCB17077: +@ Patches/../C_code.c:5530: orgMag = GetBaseMag(unit->pCharacterData->number, originalClass->number); ldrb r1, [r1, #4] @ tmp1097, -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; - ldr r2, .L2883+24 @ tmp1096, -@ Patches/../C_code.c:5525: orgMag = GetBaseMag(unit->pCharacterData->number, originalClass->number); +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; + ldr r2, .L2886+24 @ tmp1096, +@ Patches/../C_code.c:5530: orgMag = GetBaseMag(unit->pCharacterData->number, originalClass->number); ldrb r3, [r3, #4] @ tmp1101, -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; lsls r1, r1, #2 @ tmp1098, tmp1097, ldrb r1, [r1, r2] @ tmp1099, MagClassTable -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; - ldr r2, .L2883+28 @ tmp1100, +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; + ldr r2, .L2886+28 @ tmp1100, lsls r3, r3, #1 @ tmp1102, tmp1101, ldrb r3, [r3, r2] @ tmp1103, MagCharTable -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; adds r3, r1, r3 @ orgMag, tmp1099, tmp1103 -@ Patches/../C_code.c:5526: avgStat += orgMag; +@ Patches/../C_code.c:5531: avgStat += orgMag; mov ip, r3 @ orgMag, orgMag - b .L2884 @ -.L2885: + b .L2887 @ +.L2888: .align 2 -.L2883: +.L2886: .word RecruitValues .word RandBitflags .word UnitAddItem @@ -20480,170 +20511,170 @@ UnitInitFromDefinition: .word SkillSysInstalled .word MagClassTable .word MagCharTable -.L2884: -@ Patches/../C_code.c:5527: countOfStats++; +.L2887: +@ Patches/../C_code.c:5532: countOfStats++; movs r1, #7 @ countOfStats, -@ Patches/../C_code.c:3939: return MagClassTable[classID].base + MagCharTable[charID].base; +@ Patches/../C_code.c:3944: return MagClassTable[classID].base + MagCharTable[charID].base; str r3, [sp, #20] @ orgMag, %sfp -@ Patches/../C_code.c:5526: avgStat += orgMag; +@ Patches/../C_code.c:5531: avgStat += orgMag; add r0, r0, ip @ avgStat, orgMag -.L2765: -@ Patches/../C_code.c:5530: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; - ldr r3, .L2886 @ tmp1106, -@ Patches/../C_code.c:5530: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; +.L2768: +@ Patches/../C_code.c:5535: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; + ldr r3, .L2889 @ tmp1106, +@ Patches/../C_code.c:5535: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; adds r0, r0, #3 @ _287, -@ Patches/../C_code.c:5530: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; +@ Patches/../C_code.c:5535: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; bl .L14 @ -@ Patches/../C_code.c:5531: int max = GetHPStatMaxBonus(unit, orgHP, avgStat); +@ Patches/../C_code.c:5536: int max = GetHPStatMaxBonus(unit, orgHP, avgStat); ldr r1, [sp, #8] @, %sfp movs r2, r0 @, avgStat -@ Patches/../C_code.c:5530: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; +@ Patches/../C_code.c:5535: avgStat = (avgStat + (countOfStats / 2)) / countOfStats; movs r5, r0 @ avgStat, tmp1251 -@ Patches/../C_code.c:5531: int max = GetHPStatMaxBonus(unit, orgHP, avgStat); +@ Patches/../C_code.c:5536: int max = GetHPStatMaxBonus(unit, orgHP, avgStat); movs r0, r4 @, unit bl GetHPStatMaxBonus @ -@ Patches/../C_code.c:5532: if (unit->maxHP > max) +@ Patches/../C_code.c:5537: if (unit->maxHP > max) movs r3, #18 @ tmp1108, ldrsb r3, [r4, r3] @ tmp1108, -@ Patches/../C_code.c:5532: if (unit->maxHP > max) +@ Patches/../C_code.c:5537: if (unit->maxHP > max) cmp r3, r0 @ tmp1108, max - ble .L2766 @, -@ Patches/../C_code.c:5534: unit->maxHP = max; + ble .L2769 @, +@ Patches/../C_code.c:5539: unit->maxHP = max; lsls r0, r0, #24 @ tmp1114, max, lsrs r3, r0, #16 @ tmp1123, tmp1114, lsrs r0, r0, #24 @ tmp1126, tmp1114, orrs r0, r3 @ tmp1130, tmp1123 strh r0, [r4, #18] @ tmp1130, MEM [(signed char *)unit_379(D) + 18B] -.L2766: -@ Patches/../C_code.c:5537: max = GetStatMaxBonus(unit, orgPow, avgStat); +.L2769: +@ Patches/../C_code.c:5542: max = GetStatMaxBonus(unit, orgPow, avgStat); movs r2, r5 @, avgStat movs r0, r4 @, unit ldr r1, [sp, #12] @, %sfp bl GetStatMaxBonus @ -@ Patches/../C_code.c:5538: if (unit->pow > max) +@ Patches/../C_code.c:5543: if (unit->pow > max) movs r3, #20 @ tmp1132, ldrsb r3, [r4, r3] @ tmp1132, -@ Patches/../C_code.c:5538: if (unit->pow > max) +@ Patches/../C_code.c:5543: if (unit->pow > max) cmp r3, r0 @ tmp1132, max - ble .L2767 @, -@ Patches/../C_code.c:5540: unit->pow = max; + ble .L2770 @, +@ Patches/../C_code.c:5545: unit->pow = max; strb r0, [r4, #20] @ max, unit_379(D)->pow -.L2767: -@ Patches/../C_code.c:5542: max = GetStatMaxBonus(unit, orgSkl, avgStat); +.L2770: +@ Patches/../C_code.c:5547: max = GetStatMaxBonus(unit, orgSkl, avgStat); movs r2, r5 @, avgStat mov r1, r9 @, orgSkl movs r0, r4 @, unit bl GetStatMaxBonus @ -@ Patches/../C_code.c:5543: if (unit->skl > max) +@ Patches/../C_code.c:5548: if (unit->skl > max) movs r3, #21 @ tmp1134, ldrsb r3, [r4, r3] @ tmp1134, -@ Patches/../C_code.c:5543: if (unit->skl > max) +@ Patches/../C_code.c:5548: if (unit->skl > max) cmp r3, r0 @ tmp1134, max - ble .L2768 @, -@ Patches/../C_code.c:5545: unit->skl = max; + ble .L2771 @, +@ Patches/../C_code.c:5550: unit->skl = max; strb r0, [r4, #21] @ max, unit_379(D)->skl -.L2768: -@ Patches/../C_code.c:5547: max = GetStatMaxBonus(unit, orgSpd, avgStat); +.L2771: +@ Patches/../C_code.c:5552: max = GetStatMaxBonus(unit, orgSpd, avgStat); movs r2, r5 @, avgStat mov r1, r8 @, orgSpd movs r0, r4 @, unit bl GetStatMaxBonus @ -@ Patches/../C_code.c:5548: if (unit->spd > max) +@ Patches/../C_code.c:5553: if (unit->spd > max) movs r3, #22 @ tmp1136, ldrsb r3, [r4, r3] @ tmp1136, -@ Patches/../C_code.c:5548: if (unit->spd > max) +@ Patches/../C_code.c:5553: if (unit->spd > max) cmp r3, r0 @ tmp1136, max - ble .L2769 @, -@ Patches/../C_code.c:5550: unit->spd = max; + ble .L2772 @, +@ Patches/../C_code.c:5555: unit->spd = max; strb r0, [r4, #22] @ max, unit_379(D)->spd -.L2769: -@ Patches/../C_code.c:5552: max = GetStatMaxBonus(unit, orgDef, avgStat); +.L2772: +@ Patches/../C_code.c:5557: max = GetStatMaxBonus(unit, orgDef, avgStat); movs r2, r5 @, avgStat movs r1, r7 @, orgDef movs r0, r4 @, unit bl GetStatMaxBonus @ -@ Patches/../C_code.c:5553: if (unit->def > max) +@ Patches/../C_code.c:5558: if (unit->def > max) movs r3, #23 @ tmp1138, ldrsb r3, [r4, r3] @ tmp1138, -@ Patches/../C_code.c:5553: if (unit->def > max) +@ Patches/../C_code.c:5558: if (unit->def > max) cmp r3, r0 @ tmp1138, max - ble .L2770 @, -@ Patches/../C_code.c:5555: unit->def = max; + ble .L2773 @, +@ Patches/../C_code.c:5560: unit->def = max; strb r0, [r4, #23] @ max, unit_379(D)->def -.L2770: -@ Patches/../C_code.c:5557: max = GetStatMaxBonus(unit, orgRes, avgStat); +.L2773: +@ Patches/../C_code.c:5562: max = GetStatMaxBonus(unit, orgRes, avgStat); movs r2, r5 @, avgStat movs r1, r6 @, orgRes movs r0, r4 @, unit bl GetStatMaxBonus @ -@ Patches/../C_code.c:5558: if (unit->res > max) +@ Patches/../C_code.c:5563: if (unit->res > max) movs r3, #24 @ tmp1140, ldrsb r3, [r4, r3] @ tmp1140, -@ Patches/../C_code.c:5558: if (unit->res > max) +@ Patches/../C_code.c:5563: if (unit->res > max) cmp r3, r0 @ tmp1140, max - ble .L2771 @, -@ Patches/../C_code.c:5560: unit->res = max; + ble .L2774 @, +@ Patches/../C_code.c:5565: unit->res = max; strb r0, [r4, #24] @ max, unit_379(D)->res -.L2771: -@ Patches/../C_code.c:5562: max = GetStatMaxBonus(unit, orgLck, avgStat); +.L2774: +@ Patches/../C_code.c:5567: max = GetStatMaxBonus(unit, orgLck, avgStat); movs r2, r5 @, avgStat movs r0, r4 @, unit ldr r1, [sp, #16] @, %sfp bl GetStatMaxBonus @ -@ Patches/../C_code.c:5563: if (unit->lck > max) +@ Patches/../C_code.c:5568: if (unit->lck > max) movs r3, #25 @ tmp1142, ldrsb r3, [r4, r3] @ tmp1142, -@ Patches/../C_code.c:5563: if (unit->lck > max) +@ Patches/../C_code.c:5568: if (unit->lck > max) cmp r3, r0 @ tmp1142, max - ble .L2772 @, -@ Patches/../C_code.c:5565: unit->lck = max; + ble .L2775 @, +@ Patches/../C_code.c:5570: unit->lck = max; strb r0, [r4, #25] @ max, unit_379(D)->lck -.L2772: -@ Patches/../C_code.c:5569: if (SkillSysInstalled) - mov r3, fp @ SkillSysInstalled.223_282, SkillSysInstalled.223_282 - cmp r3, #0 @ SkillSysInstalled.223_282, - beq .L2773 @, -@ Patches/../C_code.c:5571: max = GetStatMaxBonus(unit, orgMag, avgStat); +.L2775: +@ Patches/../C_code.c:5574: if (SkillSysInstalled) + mov r3, fp @ SkillSysInstalled.224_282, SkillSysInstalled.224_282 + cmp r3, #0 @ SkillSysInstalled.224_282, + beq .L2776 @, +@ Patches/../C_code.c:5576: max = GetStatMaxBonus(unit, orgMag, avgStat); movs r2, r5 @, avgStat movs r0, r4 @, unit ldr r1, [sp, #20] @, %sfp bl GetStatMaxBonus @ -@ Patches/../C_code.c:5572: if (unit->_u3A > max) +@ Patches/../C_code.c:5577: if (unit->_u3A > max) movs r3, #58 @ tmp1144, ldrb r2, [r4, r3] @ tmp1145, -@ Patches/../C_code.c:5572: if (unit->_u3A > max) +@ Patches/../C_code.c:5577: if (unit->_u3A > max) cmp r2, r0 @ tmp1145, max - ble .LCB17184 @ - b .L2873 @long jump @ -.LCB17184: -.L2773: -@ Patches/../C_code.c:5579: if (UNIT_FACTION(unit) != FACTION_RED) + ble .LCB17208 @ + b .L2876 @long jump @ +.LCB17208: +.L2776: +@ Patches/../C_code.c:5584: if (UNIT_FACTION(unit) != FACTION_RED) movs r2, #11 @ tmp1148, movs r3, #192 @ tmp1149, ldrsb r2, [r4, r2] @ tmp1148, ands r3, r2 @ tmp1150, tmp1148 -@ Patches/../C_code.c:5579: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:5584: if (UNIT_FACTION(unit) != FACTION_RED) cmp r3, #128 @ tmp1150, - beq .L2774 @, -@ Patches/../C_code.c:5581: int bonusLevels = RandBitflags->playerBonus; + beq .L2777 @, +@ Patches/../C_code.c:5586: int bonusLevels = RandBitflags->playerBonus; mov r3, r10 @ tmp1182, tmp1182 ldr r3, [r3] @ RandBitflags, RandBitflags - ldrh r2, [r3, #2] @ *RandBitflags.225_315, *RandBitflags.225_315 - lsls r2, r2, #20 @ tmp1157, *RandBitflags.225_315, -@ Patches/../C_code.c:5581: int bonusLevels = RandBitflags->playerBonus; + ldrh r2, [r3, #2] @ *RandBitflags.226_315, *RandBitflags.226_315 + lsls r2, r2, #20 @ tmp1157, *RandBitflags.226_315, +@ Patches/../C_code.c:5586: int bonusLevels = RandBitflags->playerBonus; lsrs r2, r2, #27 @ bonusLevels, tmp1157, -@ Patches/../C_code.c:5582: if (bonusLevels > 20) +@ Patches/../C_code.c:5587: if (bonusLevels > 20) cmp r2, #20 @ bonusLevels, - bgt .L2862 @, -.L2777: -@ Patches/../C_code.c:5598: if (bonusLevels) + bgt .L2865 @, +.L2780: +@ Patches/../C_code.c:5603: if (bonusLevels) cmp r2, #0 @ bonusLevels, - bne .L2874 @, -.L2776: -@ Patches/../C_code.c:5604: UnitCheckStatCaps(unit); + bne .L2877 @, +.L2779: +@ Patches/../C_code.c:5609: UnitCheckStatCaps(unit); movs r0, r4 @, unit bl UnitCheckStatCaps @ -@ Patches/../C_code.c:5605: } +@ Patches/../C_code.c:5610: } add sp, sp, #396 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -20654,537 +20685,537 @@ UnitInitFromDefinition: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L2697: -@ Patches/../C_code.c:5237: if ((!uDef->classIndex) || RandomizeRecruitment) +.L2700: +@ Patches/../C_code.c:5242: if ((!uDef->classIndex) || RandomizeRecruitment) ldr r3, [sp, #16] @ uDef, %sfp ldrb r0, [r3, #1] @ _106, -@ Patches/../C_code.c:5237: if ((!uDef->classIndex) || RandomizeRecruitment) +@ Patches/../C_code.c:5242: if ((!uDef->classIndex) || RandomizeRecruitment) cmp r0, #0 @ _106, - bne .LCB17226 @ - b .L2695 @long jump @ -.LCB17226: -.L2858: -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); + bne .LCB17250 @ + b .L2698 @long jump @ +.LCB17250: +.L2861: +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); movs r2, r4 @, unit mov r1, fp @, tmp1177 bl RandClass2 @ -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); - bl .L208 @ -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); + bl .L211 @ +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); movs r3, #0 @ _585, -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); mov r9, r0 @ _666, tmp1262 -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); str r0, [r4, #4] @ _666, unit_379(D)->pClassData str r3, [sp, #20] @ _585, %sfp - b .L2699 @ -.L2774: -@ Patches/../C_code.c:5593: int bonusLevels = RandValues->bonus; - ldr r3, .L2886+4 @ tmp1162, + b .L2702 @ +.L2777: +@ Patches/../C_code.c:5598: int bonusLevels = RandValues->bonus; + ldr r3, .L2889+4 @ tmp1162, ldr r3, [r3] @ RandValues, RandValues - ldrb r2, [r3, #3] @ *RandValues.226_319, *RandValues.226_319 - lsls r2, r2, #26 @ tmp1167, *RandValues.226_319, -@ Patches/../C_code.c:5593: int bonusLevels = RandValues->bonus; + ldrb r2, [r3, #3] @ *RandValues.227_319, *RandValues.227_319 + lsls r2, r2, #26 @ tmp1167, *RandValues.227_319, +@ Patches/../C_code.c:5598: int bonusLevels = RandValues->bonus; lsrs r2, r2, #27 @ bonusLevels, tmp1167, -@ Patches/../C_code.c:5594: if (bonusLevels > 20) +@ Patches/../C_code.c:5599: if (bonusLevels > 20) cmp r2, #20 @ bonusLevels, - ble .L2777 @, -.L2862: -@ Patches/../C_code.c:5596: bonusLevels = (-10) + (bonusLevels - 21); + ble .L2780 @, +.L2865: +@ Patches/../C_code.c:5601: bonusLevels = (-10) + (bonusLevels - 21); subs r2, r2, #31 @ bonusLevels, -@ Patches/../C_code.c:5598: if (bonusLevels) +@ Patches/../C_code.c:5603: if (bonusLevels) cmp r2, #0 @ bonusLevels, - beq .L2776 @, -.L2874: -@ Patches/../C_code.c:5600: UnitAutolevelCore(unit, unit->pClassData->number, bonusLevels); + beq .L2779 @, +.L2877: +@ Patches/../C_code.c:5605: UnitAutolevelCore(unit, unit->pClassData->number, bonusLevels); ldr r3, [r4, #4] @ unit_379(D)->pClassData, unit_379(D)->pClassData -@ Patches/../C_code.c:5600: UnitAutolevelCore(unit, unit->pClassData->number, bonusLevels); +@ Patches/../C_code.c:5605: UnitAutolevelCore(unit, unit->pClassData->number, bonusLevels); movs r0, r4 @, unit ldrb r1, [r3, #4] @ tmp1170, bl UnitAutolevelCore @ - b .L2776 @ -.L2866: -@ Patches/../C_code.c:5305: if (personalWexp > wexp) + b .L2779 @ +.L2869: +@ Patches/../C_code.c:5310: if (personalWexp > wexp) mov r0, r8 @ _149, personalWexp cmp r8, r3 @ personalWexp, wexp - bge .L2708 @, + bge .L2711 @, movs r0, r3 @ _149, wexp -.L2708: -@ Patches/../C_code.c:3730: if (!RandBitflags->class) +.L2711: +@ Patches/../C_code.c:3735: if (!RandBitflags->class) mov r3, r10 @ tmp1182, tmp1182 -@ Patches/../C_code.c:3730: if (!RandBitflags->class) +@ Patches/../C_code.c:3735: if (!RandBitflags->class) movs r2, #6 @ tmp1459, -@ Patches/../C_code.c:3730: if (!RandBitflags->class) +@ Patches/../C_code.c:3735: if (!RandBitflags->class) ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.158_597, *RandBitflags.158_597 -@ Patches/../C_code.c:3730: if (!RandBitflags->class) - tst r2, r3 @ tmp1459, *RandBitflags.158_597 - beq .L2714 @, -@ Patches/../C_code.c:2421: return HashPercent(number, noise, offset, true, false); + ldrb r3, [r3, #1] @ *RandBitflags.159_597, *RandBitflags.159_597 +@ Patches/../C_code.c:3735: if (!RandBitflags->class) + tst r2, r3 @ tmp1459, *RandBitflags.159_597 + beq .L2717 @, +@ Patches/../C_code.c:2426: return HashPercent(number, noise, offset, true, false); movs r3, #0 @ tmp818, movs r2, r6 @, i str r3, [sp] @ tmp818, add r1, sp, #96 @ tmp1460,, adds r3, r3, #1 @, bl HashPercent @ -@ Patches/../C_code.c:3734: number = HashByPercent(number, noise, offset) + 1; +@ Patches/../C_code.c:3739: number = HashByPercent(number, noise, offset) + 1; adds r0, r0, #1 @ number, -@ Patches/../C_code.c:3735: if (number > 255) +@ Patches/../C_code.c:3740: if (number > 255) cmp r0, #255 @ number, - ble .L2714 @, + ble .L2717 @, movs r0, #255 @ number, -.L2714: -@ Patches/../C_code.c:3739: return number; +.L2717: +@ Patches/../C_code.c:3744: return number; lsls r0, r0, #16 @ _600, number, asrs r0, r0, #16 @ _600, _600, -@ Patches/../C_code.c:5312: unit->ranks[i] = wexp; +@ Patches/../C_code.c:5317: unit->ranks[i] = wexp; lsls r0, r0, #24 @ tmp822, _600, lsrs r0, r0, #24 @ _133, tmp822, strb r0, [r7] @ _133, MEM[(unsigned char *)_682] -@ Patches/../C_code.c:5314: if (i == 7) +@ Patches/../C_code.c:5319: if (i == 7) cmp r6, #7 @ i, - beq .L2875 @, -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) + beq .L2878 @, +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) movs r0, r4 @, unit bl ShouldRandomizeClass @ -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) cmp r0, #0 @ tmp1235, - bne .L2859 @, -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) + bne .L2862 @, +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) ldr r3, [sp, #12] @ tmp1213, %sfp ldrb r3, [r3, r6] @ _848, MEM[(unsigned char *)_852 + _668 * 1] -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) cmp r3, #0 @ _848, - beq .L2859 @, -@ Patches/../C_code.c:5336: unit->ranks[i] = character->baseRanks[i]; + beq .L2862 @, +@ Patches/../C_code.c:5341: unit->ranks[i] = character->baseRanks[i]; strb r3, [r7] @ _848, MEM[(unsigned char *)_847] -.L2859: -@ Patches/../C_code.c:5300: for (int i = 0; i < 8; ++i) +.L2862: +@ Patches/../C_code.c:5305: for (int i = 0; i < 8; ++i) adds r6, r6, #1 @ i, -@ Patches/../C_code.c:5300: for (int i = 0; i < 8; ++i) - adds r7, r7, #1 @ ivtmp.1686, - b .L2721 @ -.L2875: -@ Patches/../C_code.c:5323: if ((unit->ranks[i]) && (unit->ranks[i] < 31)) +@ Patches/../C_code.c:5305: for (int i = 0; i < 8; ++i) + adds r7, r7, #1 @ ivtmp.1691, + b .L2724 @ +.L2878: +@ Patches/../C_code.c:5328: if ((unit->ranks[i]) && (unit->ranks[i] < 31)) subs r0, r0, #1 @ tmp824, -@ Patches/../C_code.c:5323: if ((unit->ranks[i]) && (unit->ranks[i] < 31)) +@ Patches/../C_code.c:5328: if ((unit->ranks[i]) && (unit->ranks[i] < 31)) lsls r0, r0, #24 @ tmp828, tmp824, lsrs r0, r0, #24 @ tmp827, tmp828, cmp r0, #29 @ tmp827, - bhi .L2716 @, -@ Patches/../C_code.c:5325: unit->ranks[i] = 31; + bhi .L2719 @, +@ Patches/../C_code.c:5330: unit->ranks[i] = 31; movs r3, #47 @ tmp829, movs r2, #31 @ tmp830, strb r2, [r4, r3] @ tmp830, unit_379(D)->ranks[7] -.L2716: -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) +.L2719: +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) movs r0, r4 @, unit bl ShouldRandomizeClass @ -@ Patches/../C_code.c:5332: if (!ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:5337: if (!ShouldRandomizeClass(unit)) cmp r0, #0 @ tmp1260, - beq .LCB17329 @ - b .L2719 @long jump @ -.LCB17329: -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) + beq .LCB17353 @ + b .L2722 @long jump @ +.LCB17353: +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) ldrb r3, [r5, #27] @ _651, MEM[(unsigned char *)_516 + 7B] -@ Patches/../C_code.c:5334: if (character->baseRanks[i]) +@ Patches/../C_code.c:5339: if (character->baseRanks[i]) cmp r3, #0 @ _651, - bne .LCB17333 @ - b .L2719 @long jump @ -.LCB17333: -@ Patches/../C_code.c:5336: unit->ranks[i] = character->baseRanks[i]; + bne .LCB17357 @ + b .L2722 @long jump @ +.LCB17357: +@ Patches/../C_code.c:5341: unit->ranks[i] = character->baseRanks[i]; strb r3, [r7] @ _651, MEM[(unsigned char *)_834] - b .L2719 @ -.L2787: -@ Patches/../C_code.c:5522: int orgMag = 0; + b .L2722 @ +.L2790: +@ Patches/../C_code.c:5527: int orgMag = 0; movs r3, #0 @ orgMag, -@ Patches/../C_code.c:5519: int countOfStats = 6; +@ Patches/../C_code.c:5524: int countOfStats = 6; movs r1, #6 @ countOfStats, -@ Patches/../C_code.c:5522: int orgMag = 0; +@ Patches/../C_code.c:5527: int orgMag = 0; str r3, [sp, #20] @ orgMag, %sfp - b .L2765 @ -.L2692: -@ Patches/../C_code.c:5225: noise[2] = 5; // becomes class id + b .L2768 @ +.L2695: +@ Patches/../C_code.c:5230: noise[2] = 5; // becomes class id movs r3, #5 @ tmp761, str r3, [sp, #104] @ tmp761, noise[2] -@ Patches/../C_code.c:5226: noise[3] = character->affinity; // players don't use gCh anymore +@ Patches/../C_code.c:5231: noise[3] = character->affinity; // players don't use gCh anymore ldr r3, [sp, #88] @ _41, %sfp str r3, [sp, #108] @ _41, noise[3] - b .L2693 @ -.L2743: -@ Patches/../C_code.c:5449: unit->exp = UNIT_EXP_DISABLED; + b .L2696 @ +.L2746: +@ Patches/../C_code.c:5454: unit->exp = UNIT_EXP_DISABLED; movs r3, #255 @ _132, - b .L2742 @ -.L2868: -@ Patches/../C_code.c:5371: if (gCh > 0xD) + b .L2745 @ +.L2871: +@ Patches/../C_code.c:5376: if (gCh > 0xD) movs r6, #0 @ max150percent, cmp r2, #13 @ pretmp_875, - bls .LCB17361 @ - b .L2731 @long jump @ -.LCB17361: -@ Patches/../C_code.c:5362: if (UNIT_FACTION(unit) != FACTION_BLUE) + bls .LCB17385 @ + b .L2734 @long jump @ +.LCB17385: +@ Patches/../C_code.c:5367: if (UNIT_FACTION(unit) != FACTION_BLUE) mov r6, r8 @ tmp887, _153 subs r3, r6, #1 @ tmp888, tmp887 sbcs r6, r6, r3 @ tmp887, tmp887, tmp888 lsls r6, r6, #1 @ max150percent, tmp887, - b .L2731 @ -.L2734: -@ Patches/../C_code.c:5391: unit->maxHP += 15; + b .L2734 @ +.L2737: +@ Patches/../C_code.c:5396: unit->maxHP += 15; adds r0, r0, #15 @ tmp916, strb r0, [r4, #18] @ tmp916, unit_379(D)->maxHP - b .L2735 @ -.L2732: -@ Patches/../C_code.c:5396: if (unit->maxHP < 10) + b .L2738 @ +.L2735: +@ Patches/../C_code.c:5401: if (unit->maxHP < 10) cmp r3, #9 @ _167, - ble .LCB17376 @ - b .L2735 @long jump @ -.LCB17376: -@ Patches/../C_code.c:5398: unit->maxHP += 10; + ble .LCB17400 @ + b .L2738 @long jump @ +.LCB17400: +@ Patches/../C_code.c:5403: unit->maxHP += 10; adds r0, r0, #10 @ tmp919, strb r0, [r4, #18] @ tmp919, unit_379(D)->maxHP - b .L2735 @ -.L2873: -@ Patches/../C_code.c:5574: unit->_u3A = max; + b .L2738 @ +.L2876: +@ Patches/../C_code.c:5579: unit->_u3A = max; strb r0, [r4, r3] @ max, unit_379(D)->_u3A - b .L2773 @ -.L2698: -@ Patches/../C_code.c:5257: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) + b .L2776 @ +.L2701: +@ Patches/../C_code.c:5262: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) ldr r2, [r0, #40] @ _666->attributes, _666->attributes -@ Patches/../C_code.c:5257: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) +@ Patches/../C_code.c:5262: if ((!(originalClass->attributes & CA_PROMOTED)) && (unit->pClassData->attributes & CA_PROMOTED)) tst r2, r3 @ _666->attributes, tmp783 - bne .LCB17391 @ - b .L2699 @long jump @ -.LCB17391: + bne .LCB17415 @ + b .L2702 @long jump @ +.LCB17415: add r3, sp, #96 @ tmp1439,, -.L2703: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L2706: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_590], MEM[(int *)_590] cmp r2, #0 @ MEM[(int *)_590], - bne .LCB17397 @ - b .L2876 @long jump @ -.LCB17397: -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1702, - cmp fp, r3 @ tmp1177, ivtmp.1702 - bne .L2703 @, -.L2702: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + bne .LCB17421 @ + b .L2879 @long jump @ +.LCB17421: +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1707, + cmp fp, r3 @ tmp1177, ivtmp.1707 + bne .L2706 @, +.L2705: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r3, #3 @, movs r1, #100 @, movs r0, r6 @, _74 add r2, sp, #96 @ tmp1441,, bl HashByte_Global @ -@ Patches/../C_code.c:5259: if (((HashByte_Ch(noise[0], 100, noise, 3)) < (ChanceToDemote))) - ldr r3, .L2886+8 @ tmp795, -@ Patches/../C_code.c:5259: if (((HashByte_Ch(noise[0], 100, noise, 3)) < (ChanceToDemote))) +@ Patches/../C_code.c:5264: if (((HashByte_Ch(noise[0], 100, noise, 3)) < (ChanceToDemote))) + ldr r3, .L2889+8 @ tmp795, +@ Patches/../C_code.c:5264: if (((HashByte_Ch(noise[0], 100, noise, 3)) < (ChanceToDemote))) ldr r3, [r3] @ ChanceToDemote, ChanceToDemote cmp r0, r3 @ tmp1229, ChanceToDemote - blt .LCB17411 @ - b .L2699 @long jump @ -.LCB17411: -@ Patches/../C_code.c:5261: int prepromoteClassId = unit->pClassData->promotion; + blt .LCB17435 @ + b .L2702 @long jump @ +.LCB17435: +@ Patches/../C_code.c:5266: int prepromoteClassId = unit->pClassData->promotion; mov r3, r9 @ _666, _666 ldrb r0, [r3, #5] @ prepromoteClassId, -@ Patches/../C_code.c:5262: if (prepromoteClassId) +@ Patches/../C_code.c:5267: if (prepromoteClassId) cmp r0, #0 @ prepromoteClassId, - bne .LCB17415 @ - b .L2699 @long jump @ -.LCB17415: -@ Patches/../C_code.c:5269: unit->pClassData = originalClass; // so RandClass will treat us as promoted or not based on that + bne .LCB17439 @ + b .L2702 @long jump @ +.LCB17439: +@ Patches/../C_code.c:5274: unit->pClassData = originalClass; // so RandClass will treat us as promoted or not based on that ldr r3, [sp, #8] @ originalClass, %sfp -@ Patches/../C_code.c:5271: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); +@ Patches/../C_code.c:5276: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); movs r2, r4 @, unit mov r1, fp @, tmp1177 -@ Patches/../C_code.c:5269: unit->pClassData = originalClass; // so RandClass will treat us as promoted or not based on that +@ Patches/../C_code.c:5274: unit->pClassData = originalClass; // so RandClass will treat us as promoted or not based on that str r3, [r4, #4] @ originalClass, unit_379(D)->pClassData -@ Patches/../C_code.c:5271: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); +@ Patches/../C_code.c:5276: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); bl RandClass2 @ -@ Patches/../C_code.c:5271: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); - bl .L208 @ +@ Patches/../C_code.c:5276: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); + bl .L211 @ mov r9, r0 @ _666, tmp1231 -@ Patches/../C_code.c:5271: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); +@ Patches/../C_code.c:5276: unit->pClassData = GetClassData(RandClass2(prepromoteClassId, noise2, unit)); str r0, [r4, #4] @ _666, unit_379(D)->pClassData - b .L2699 @ -.L2865: -@ Patches/../C_code.c:5216: noise[1] = uDef->xPosition; + b .L2702 @ +.L2868: +@ Patches/../C_code.c:5221: noise[1] = uDef->xPosition; ldr r2, [sp, #16] @ uDef, %sfp ldrb r3, [r2, #4] @ *uDef_377(D), *uDef_377(D) lsls r3, r3, #26 @ tmp747, *uDef_377(D), lsrs r3, r3, #26 @ tmp748, tmp747, str r3, [sp, #100] @ tmp748, noise[1] -@ Patches/../C_code.c:5217: noise[2] = uDef->yPosition; +@ Patches/../C_code.c:5222: noise[2] = uDef->yPosition; ldrh r3, [r2, #4] @ *uDef_377(D), *uDef_377(D) lsls r3, r3, #20 @ tmp756, *uDef_377(D), lsrs r3, r3, #26 @ tmp757, tmp756, str r3, [sp, #104] @ tmp757, noise[2] - b .L2693 @ -.L2864: -@ Patches/../C_code.c:5176: noise2[c] = uDef->xPosition; + b .L2696 @ +.L2867: +@ Patches/../C_code.c:5181: noise2[c] = uDef->xPosition; ldr r1, [sp, #16] @ uDef, %sfp ldrb r3, [r1, #4] @ *uDef_377(D), *uDef_377(D) lsls r3, r3, #26 @ tmp692, *uDef_377(D), lsrs r3, r3, #26 @ tmp691, tmp692, -@ Patches/../C_code.c:5176: noise2[c] = uDef->xPosition; +@ Patches/../C_code.c:5181: noise2[c] = uDef->xPosition; strb r3, [r6, #19] @ tmp691, noise2[19] -@ Patches/../C_code.c:5178: noise2[c] = uDef->yPosition; +@ Patches/../C_code.c:5183: noise2[c] = uDef->yPosition; ldrh r3, [r1, #4] @ *uDef_377(D), *uDef_377(D) lsls r3, r3, #20 @ tmp699, *uDef_377(D), lsrs r3, r3, #26 @ tmp698, tmp699, -@ Patches/../C_code.c:5178: noise2[c] = uDef->yPosition; +@ Patches/../C_code.c:5183: noise2[c] = uDef->yPosition; strb r3, [r6, #20] @ tmp698, noise2[20] -@ Patches/../C_code.c:5181: noise2[c] = gCh; - ldr r3, .L2886+12 @ tmp1181, +@ Patches/../C_code.c:5186: noise2[c] = gCh; + ldr r3, .L2889+12 @ tmp1181, str r3, [sp, #40] @ tmp1181, %sfp ldrb r3, [r3] @ gCh, gCh strb r3, [r6, #21] @ gCh, noise2[21] movs r3, #23 @ prephitmp_856, str r3, [sp, #84] @ prephitmp_856, %sfp -@ Patches/../C_code.c:5182: c++; // so gCh is used +@ Patches/../C_code.c:5187: c++; // so gCh is used subs r3, r3, #1 @ c, str r3, [sp, #36] @ c, %sfp - b .L2689 @ -.L2870: -@ Patches/../C_code.c:2496: int uid = unit->pCharacterData->number; + b .L2692 @ +.L2873: +@ Patches/../C_code.c:2501: int uid = unit->pCharacterData->number; ldr r3, [r4] @ unit_379(D)->pCharacterData, unit_379(D)->pCharacterData -@ Patches/../C_code.c:2514: if (uid < 0x2d) +@ Patches/../C_code.c:2519: if (uid < 0x2d) ldrb r3, [r3, #4] @ tmp985, cmp r3, #44 @ tmp985, - bls .L2741 @, + bls .L2744 @, mov r3, r8 @ _153, _153 cmp r3, #128 @ _153, - beq .L2743 @, -.L2741: -@ Patches/../C_code.c:5428: ConModifiers[HashByte_Global(1, sizeof(ConModifiers), noise, 16)]; // num, max, noise, offset + beq .L2746 @, +.L2744: +@ Patches/../C_code.c:5433: ConModifiers[HashByte_Global(1, sizeof(ConModifiers), noise, 16)]; // num, max, noise, offset movs r3, #16 @, movs r1, #12 @, movs r0, #1 @, add r2, sp, #96 @ tmp1492,, bl HashByte_Global @ -@ Patches/../C_code.c:5427: unit->conBonus = +@ Patches/../C_code.c:5432: unit->conBonus = movs r3, #80 @ tmp1001, -@ Patches/../C_code.c:5428: ConModifiers[HashByte_Global(1, sizeof(ConModifiers), noise, 16)]; // num, max, noise, offset - ldr r6, .L2886+16 @ tmp1000, +@ Patches/../C_code.c:5433: ConModifiers[HashByte_Global(1, sizeof(ConModifiers), noise, 16)]; // num, max, noise, offset + ldr r6, .L2889+16 @ tmp1000, adds r0, r6, r0 @ tmp1002, tmp1000, tmp1246 -@ Patches/../C_code.c:5427: unit->conBonus = +@ Patches/../C_code.c:5432: unit->conBonus = ldrb r3, [r0, r3] @ tmp1003, ConModifiers strb r3, [r4, #26] @ tmp1003, unit_379(D)->conBonus -@ Patches/../C_code.c:5429: if (unit->pClassData->baseMov < 7) +@ Patches/../C_code.c:5434: if (unit->pClassData->baseMov < 7) ldr r3, [r4, #4] @ unit_379(D)->pClassData, unit_379(D)->pClassData -@ Patches/../C_code.c:5429: if (unit->pClassData->baseMov < 7) +@ Patches/../C_code.c:5434: if (unit->pClassData->baseMov < 7) ldrb r3, [r3, #18] @ tmp1008, lsls r3, r3, #24 @ tmp1008, tmp1008, asrs r3, r3, #24 @ tmp1008, tmp1008, cmp r3, #6 @ tmp1008, - ble .LCB17498 @ - b .L2739 @long jump @ -.LCB17498: -@ Patches/../C_code.c:5438: MovModifiers[HashByte_Global(3, sizeof(MovModifiers), noise, 14)]; // num, max, noise, offset + ble .LCB17522 @ + b .L2742 @long jump @ +.LCB17522: +@ Patches/../C_code.c:5443: MovModifiers[HashByte_Global(3, sizeof(MovModifiers), noise, 14)]; // num, max, noise, offset movs r3, #14 @, movs r1, #9 @, movs r0, #3 @, add r2, sp, #96 @ tmp1493,, bl HashByte_Global @ -@ Patches/../C_code.c:5437: unit->movBonus = +@ Patches/../C_code.c:5442: unit->movBonus = movs r3, #92 @ tmp1013, -@ Patches/../C_code.c:5438: MovModifiers[HashByte_Global(3, sizeof(MovModifiers), noise, 14)]; // num, max, noise, offset +@ Patches/../C_code.c:5443: MovModifiers[HashByte_Global(3, sizeof(MovModifiers), noise, 14)]; // num, max, noise, offset adds r6, r6, r0 @ tmp1014, tmp1000, tmp1247 -@ Patches/../C_code.c:5437: unit->movBonus = +@ Patches/../C_code.c:5442: unit->movBonus = ldrb r3, [r6, r3] @ tmp1015, MovModifiers strb r3, [r4, #29] @ tmp1015, unit_379(D)->movBonus - b .L2739 @ -.L2695: -@ Patches/../C_code.c:5240: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); + b .L2742 @ +.L2698: +@ Patches/../C_code.c:5245: unit->pClassData = GetClassData(RandClass2(character->defaultClass, noise2, unit)); ldrb r0, [r5, #5] @ tmp1172, - b .L2858 @ -.L2867: -@ Patches/../C_code.c:5349: AppendAvailableStaffList(list, unit); + b .L2861 @ +.L2870: +@ Patches/../C_code.c:5354: AppendAvailableStaffList(list, unit); movs r1, r4 @, unit movs r0, r6 @, tmp1178 bl AppendAvailableStaffList @ -@ Patches/../C_code.c:5351: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); +@ Patches/../C_code.c:5356: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); mov r3, r8 @ _631, _631 ldrb r1, [r3, #1] @ _431, MEM[(unsigned char *)_631 + 1B] -@ Patches/../C_code.c:3234: if (!item) +@ Patches/../C_code.c:3239: if (!item) cmp r1, #0 @ _431, - beq .LCB17524 @ - b .L2724 @long jump @ -.LCB17524: -@ Patches/../C_code.c:5351: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); + beq .LCB17548 @ + b .L2727 @long jump @ +.LCB17548: +@ Patches/../C_code.c:5356: UnitAddItem(unit, RandNewWeapon(unit, uDef->items[i], noise, i, list)); movs r1, #0 @, movs r0, r4 @, unit - ldr r3, .L2886+20 @ tmp1174, + ldr r3, .L2889+20 @ tmp1174, bl .L14 @ -@ Patches/../C_code.c:5345: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) +@ Patches/../C_code.c:5350: for (int i = 0; (i < UNIT_DEFINITION_ITEM_COUNT) && (uDef->items[i]); ++i) movs r7, #2 @ i, - b .L2722 @ -.L2887: + b .L2725 @ +.L2890: .align 2 -.L2886: +.L2889: .word __aeabi_idiv .word RandValues .word ChanceToDemote .word gCh .word .LANCHOR1 .word UnitAddItem -.L2872: +.L2875: add r5, sp, #96 @ tmp1503,, -@ Patches/../C_code.c:5475: if (RandBitflags->foundItems) +@ Patches/../C_code.c:5480: if (RandBitflags->foundItems) movs r3, r5 @ tmp1504, tmp1503 -.L2755: -@ Patches/../C_code.c:2363: if (!noise[i]) +.L2758: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_624], MEM[(int *)_624] cmp r2, #0 @ MEM[(int *)_624], - beq .L2877 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.1670, - cmp fp, r3 @ tmp1177, ivtmp.1670 - bne .L2755 @, -.L2754: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L2880 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.1675, + cmp fp, r3 @ tmp1177, ivtmp.1675 + bne .L2758 @, +.L2757: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r3, #8 @, movs r1, #100 @, movs r0, #1 @, add r2, sp, #96 @ tmp1506,, bl HashByte_Global @ -@ Patches/../C_code.c:5477: if (HashByte_Ch(1, 100, noise, 8) < BonusItemChance) - ldr r3, .L2888 @ tmp1060, -@ Patches/../C_code.c:5477: if (HashByte_Ch(1, 100, noise, 8) < BonusItemChance) +@ Patches/../C_code.c:5482: if (HashByte_Ch(1, 100, noise, 8) < BonusItemChance) + ldr r3, .L2891 @ tmp1060, +@ Patches/../C_code.c:5482: if (HashByte_Ch(1, 100, noise, 8) < BonusItemChance) ldr r3, [r3] @ BonusItemChance, BonusItemChance cmp r0, r3 @ tmp1248, BonusItemChance - blt .LCB17565 @ - b .L2752 @long jump @ -.LCB17565: -.L2759: -@ Patches/../C_code.c:2363: if (!noise[i]) + blt .LCB17589 @ + b .L2755 @long jump @ +.LCB17589: +.L2762: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r3, [r5] @ MEM[(int *)_634], MEM[(int *)_634] cmp r3, #0 @ MEM[(int *)_634], - beq .L2878 @, -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r5, r5, #4 @ ivtmp.1663, - cmp fp, r5 @ tmp1177, ivtmp.1663 - bne .L2759 @, -.L2758: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + beq .L2881 @, +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r5, r5, #4 @ ivtmp.1668, + cmp fp, r5 @ tmp1177, ivtmp.1668 + bne .L2762 @, +.L2761: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r3, #7 @, movs r1, #100 @, movs r0, #2 @, add r2, sp, #96 @ tmp1508,, bl HashByte_Global @ -@ Patches/../C_code.c:5492: if (UNIT_FACTION(unit) == FACTION_BLUE) +@ Patches/../C_code.c:5497: if (UNIT_FACTION(unit) == FACTION_BLUE) movs r3, #11 @ tmp1068, movs r5, #192 @ tmp1069, ldrsb r3, [r4, r3] @ tmp1068, ands r5, r3 @ noWeapons, tmp1068 -@ Patches/../C_code.c:5480: if (HashByte_Ch(2, 100, noise, 7) < 50) +@ Patches/../C_code.c:5485: if (HashByte_Ch(2, 100, noise, 7) < 50) cmp r0, #49 @ tmp1249, - bls .L2760 @, -@ Patches/../C_code.c:5492: if (UNIT_FACTION(unit) == FACTION_BLUE) + bls .L2763 @, +@ Patches/../C_code.c:5497: if (UNIT_FACTION(unit) == FACTION_BLUE) cmp r5, #0 @ noWeapons, - bne .L2879 @, -@ Patches/../C_code.c:5473: int noWeapons = true; + bne .L2882 @, +@ Patches/../C_code.c:5478: int noWeapons = true; movs r5, #1 @ noWeapons, -@ Patches/../C_code.c:5494: c = 3; +@ Patches/../C_code.c:5499: c = 3; movs r0, #3 @ c, - b .L2761 @ -.L2869: -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + b .L2764 @ +.L2872: +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldrb r2, [r7, #4] @ tmp952, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; - ldr r3, .L2888+4 @ tmp951, +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + ldr r3, .L2891+4 @ tmp951, lsls r2, r2, #2 @ tmp953, tmp952, -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; mov r0, r9 @, _154 -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; ldrb r7, [r2, r3] @ _613, MagClassTable -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; bl GetReorderedCharacter @ -@ Patches/../C_code.c:554: return GetReorderedCharacter(unit->pCharacterData)->number; +@ Patches/../C_code.c:559: return GetReorderedCharacter(unit->pCharacterData)->number; ldrb r2, [r0, #4] @ tmp956, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; - ldr r3, .L2888+8 @ tmp955, +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; + ldr r3, .L2891+8 @ tmp955, lsls r2, r2, #1 @ tmp957, tmp956, ldrb r1, [r2, r3] @ tmp958, MagCharTable -@ Patches/../C_code.c:5409: unit->_u3A = RandStat(unit, GetUnitBaseMag(unit), noise, 85, max150percent); +@ Patches/../C_code.c:5414: unit->_u3A = RandStat(unit, GetUnitBaseMag(unit), noise, 85, max150percent); movs r0, r4 @, unit movs r3, #85 @, add r2, sp, #96 @ tmp1488,, str r6, [sp] @ max150percent, -@ Patches/../C_code.c:3935: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; +@ Patches/../C_code.c:3940: return MagClassTable[unit->pClassData->number].base + MagCharTable[GetReorderedUnitID(unit)].base; adds r1, r1, r7 @ tmp959, tmp958, _613 -@ Patches/../C_code.c:5409: unit->_u3A = RandStat(unit, GetUnitBaseMag(unit), noise, 85, max150percent); +@ Patches/../C_code.c:5414: unit->_u3A = RandStat(unit, GetUnitBaseMag(unit), noise, 85, max150percent); bl RandStat @ -@ Patches/../C_code.c:5409: unit->_u3A = RandStat(unit, GetUnitBaseMag(unit), noise, 85, max150percent); +@ Patches/../C_code.c:5414: unit->_u3A = RandStat(unit, GetUnitBaseMag(unit), noise, 85, max150percent); movs r3, #58 @ tmp960, strb r0, [r4, r3] @ tmp1245, unit_379(D)->_u3A -@ Patches/../C_code.c:2497: if (UNIT_FACTION(unit) != FACTION_RED) +@ Patches/../C_code.c:2502: if (UNIT_FACTION(unit) != FACTION_RED) movs r3, #11 @ tmp962, movs r2, #192 @ tmp963, ldrsb r3, [r4, r3] @ tmp962, ands r2, r3 @ tmp963, tmp962 mov r8, r2 @ _153, tmp963 - b .L2737 @ -.L2871: -@ Patches/../C_code.c:5463: if (bonusLevels < (-8)) + b .L2740 @ +.L2874: +@ Patches/../C_code.c:5468: if (bonusLevels < (-8)) movs r3, r2 @ tmp1288, bonusLevels adds r3, r3, #8 @ tmp1288, tmp1288, - bge .L2749 @, + bge .L2752 @, movs r2, #8 @ bonusLevels, rsbs r2, r2, #0 @ bonusLevels, bonusLevels -.L2750: -@ Patches/../C_code.c:5467: UnitAutolevelCore_Char(unit, unit->pClassData->number, bonusLevels); +.L2753: +@ Patches/../C_code.c:5472: UnitAutolevelCore_Char(unit, unit->pClassData->number, bonusLevels); movs r0, r4 @, unit ldrb r1, [r1, #4] @ tmp1042, bl UnitAutolevelCore_Char @ - b .L2744 @ -.L2749: + b .L2747 @ +.L2752: cmp r2, #8 @ bonusLevels, - ble .L2750 @, + ble .L2753 @, movs r2, #8 @ bonusLevels, - b .L2750 @ -.L2877: -@ Patches/../C_code.c:2365: noise[i] = gCh; + b .L2753 @ +.L2880: +@ Patches/../C_code.c:2370: noise[i] = gCh; ldr r2, [sp, #40] @ tmp1181, %sfp ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_624 -@ Patches/../C_code.c:2366: break; - b .L2754 @ -.L2760: -@ Patches/../C_code.c:5483: if (UNIT_FACTION(unit) == FACTION_RED) +@ Patches/../C_code.c:2371: break; + b .L2757 @ +.L2763: +@ Patches/../C_code.c:5488: if (UNIT_FACTION(unit) == FACTION_RED) cmp r5, #128 @ noWeapons, - beq .L2762 @, -@ Patches/../C_code.c:5494: c = 3; + beq .L2765 @, +@ Patches/../C_code.c:5499: c = 3; movs r0, #3 @ c, -@ Patches/../C_code.c:5492: if (UNIT_FACTION(unit) == FACTION_BLUE) +@ Patches/../C_code.c:5497: if (UNIT_FACTION(unit) == FACTION_BLUE) cmp r5, #0 @ noWeapons, - beq .L2761 @, -@ Patches/../C_code.c:5482: noWeapons = false; + beq .L2764 @, +@ Patches/../C_code.c:5487: noWeapons = false; movs r5, #0 @ noWeapons, -@ Patches/../C_code.c:5491: c = 2; +@ Patches/../C_code.c:5496: c = 2; subs r0, r0, #1 @ c, -.L2761: - movs r3, r4 @ ivtmp.1655, unit -@ Patches/../C_code.c:5500: if (unit->items[i]) +.L2764: + movs r3, r4 @ ivtmp.1660, unit +@ Patches/../C_code.c:5505: if (unit->items[i]) ldrh r1, [r3, #30] @ MEM[(short unsigned int *)_357], MEM[(short unsigned int *)_357] - adds r3, r3, #30 @ ivtmp.1655, -@ Patches/../C_code.c:5498: for (int i = 0; i < c; ++i) + adds r3, r3, #30 @ ivtmp.1660, +@ Patches/../C_code.c:5503: for (int i = 0; i < c; ++i) movs r2, #0 @ i, -@ Patches/../C_code.c:5500: if (unit->items[i]) +@ Patches/../C_code.c:5505: if (unit->items[i]) cmp r1, #0 @ MEM[(short unsigned int *)_357], - beq .L2763 @, -.L2880: -@ Patches/../C_code.c:5498: for (int i = 0; i < c; ++i) + beq .L2766 @, +.L2883: +@ Patches/../C_code.c:5503: for (int i = 0; i < c; ++i) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:5498: for (int i = 0; i < c; ++i) - adds r3, r3, #2 @ ivtmp.1655, +@ Patches/../C_code.c:5503: for (int i = 0; i < c; ++i) + adds r3, r3, #2 @ ivtmp.1660, cmp r2, r0 @ i, c - bne .LCB17670 @ - b .L2752 @long jump @ -.LCB17670: -@ Patches/../C_code.c:5500: if (unit->items[i]) + bne .LCB17694 @ + b .L2755 @long jump @ +.LCB17694: +@ Patches/../C_code.c:5505: if (unit->items[i]) ldrh r1, [r3] @ MEM[(short unsigned int *)_357], MEM[(short unsigned int *)_357] cmp r1, #0 @ MEM[(short unsigned int *)_357], - bne .L2880 @, -.L2763: + bne .L2883 @, +.L2766: movs r3, #1 @ tmp1077, add r1, sp, #96 @ tmp1510,, str r3, [sp] @ tmp1077, @@ -21192,49 +21223,49 @@ UnitInitFromDefinition: movs r3, #0 @, movs r0, #4 @, bl RandNewItem.part.0 @ -@ Patches/../C_code.c:5504: UnitAddItem(unit, RandNewItem(4, noise, i, false, true, noWeapons)); - ldr r3, .L2888+12 @ tmp1078, +@ Patches/../C_code.c:5509: UnitAddItem(unit, RandNewItem(4, noise, i, false, true, noWeapons)); + ldr r3, .L2891+12 @ tmp1078, movs r1, r0 @ _571, tmp1250 movs r0, r4 @, unit bl .L14 @ -@ Patches/../C_code.c:5505: break; - b .L2752 @ -.L2879: -@ Patches/../C_code.c:5473: int noWeapons = true; +@ Patches/../C_code.c:5510: break; + b .L2755 @ +.L2882: +@ Patches/../C_code.c:5478: int noWeapons = true; movs r5, #1 @ noWeapons, -@ Patches/../C_code.c:5491: c = 2; +@ Patches/../C_code.c:5496: c = 2; movs r0, #2 @ c, - b .L2761 @ -.L2762: -@ Patches/../C_code.c:5485: unit->state |= US_DROP_ITEM; + b .L2764 @ +.L2765: +@ Patches/../C_code.c:5490: unit->state |= US_DROP_ITEM; movs r3, #128 @ tmp1074, ldr r2, [r4, #12] @ unit_379(D)->state, unit_379(D)->state lsls r3, r3, #5 @ tmp1074, tmp1074, orrs r3, r2 @ tmp1072, unit_379(D)->state -@ Patches/../C_code.c:5482: noWeapons = false; +@ Patches/../C_code.c:5487: noWeapons = false; movs r5, #0 @ noWeapons, -@ Patches/../C_code.c:5491: c = 2; +@ Patches/../C_code.c:5496: c = 2; movs r0, #2 @ c, -@ Patches/../C_code.c:5485: unit->state |= US_DROP_ITEM; +@ Patches/../C_code.c:5490: unit->state |= US_DROP_ITEM; str r3, [r4, #12] @ tmp1072, unit_379(D)->state - b .L2761 @ -.L2878: -@ Patches/../C_code.c:2365: noise[i] = gCh; + b .L2764 @ +.L2881: +@ Patches/../C_code.c:2370: noise[i] = gCh; ldr r3, [sp, #40] @ tmp1181, %sfp ldrb r3, [r3] @ gCh, gCh str r3, [r5] @ gCh, *_634 -@ Patches/../C_code.c:2366: break; - b .L2758 @ -.L2876: -@ Patches/../C_code.c:2365: noise[i] = gCh; +@ Patches/../C_code.c:2371: break; + b .L2761 @ +.L2879: +@ Patches/../C_code.c:2370: noise[i] = gCh; ldr r2, [sp, #40] @ tmp1181, %sfp ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_590 -@ Patches/../C_code.c:2366: break; - b .L2702 @ -.L2889: +@ Patches/../C_code.c:2371: break; + b .L2705 @ +.L2892: .align 2 -.L2888: +.L2891: .word BonusItemChance .word MagClassTable .word MagCharTable @@ -21252,195 +21283,195 @@ CheckBattleUnitStatCaps: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:6386: int max = CallGetMaxHP(unit); - ldr r3, .L2902 @ tmp196, -@ Patches/../C_code.c:6385: { +@ Patches/../C_code.c:6391: int max = CallGetMaxHP(unit); + ldr r3, .L2905 @ tmp196, +@ Patches/../C_code.c:6390: { movs r5, r1 @ bu, tmp272 movs r4, r0 @ unit, tmp271 -@ Patches/../C_code.c:6386: int max = CallGetMaxHP(unit); +@ Patches/../C_code.c:6391: int max = CallGetMaxHP(unit); bl .L14 @ -@ Patches/../C_code.c:6387: if ((unit->maxHP + bu->changeHP) > max) +@ Patches/../C_code.c:6392: if ((unit->maxHP + bu->changeHP) > max) movs r1, #18 @ _1, -@ Patches/../C_code.c:6387: if ((unit->maxHP + bu->changeHP) > max) +@ Patches/../C_code.c:6392: if ((unit->maxHP + bu->changeHP) > max) movs r2, #115 @ tmp197, -@ Patches/../C_code.c:6387: if ((unit->maxHP + bu->changeHP) > max) +@ Patches/../C_code.c:6392: if ((unit->maxHP + bu->changeHP) > max) ldrsb r1, [r4, r1] @ _1,* _1 -@ Patches/../C_code.c:6387: if ((unit->maxHP + bu->changeHP) > max) +@ Patches/../C_code.c:6392: if ((unit->maxHP + bu->changeHP) > max) ldrsb r3, [r5, r2] @ tmp198, -@ Patches/../C_code.c:6387: if ((unit->maxHP + bu->changeHP) > max) +@ Patches/../C_code.c:6392: if ((unit->maxHP + bu->changeHP) > max) adds r3, r3, r1 @ tmp199, tmp198, _1 -@ Patches/../C_code.c:6387: if ((unit->maxHP + bu->changeHP) > max) +@ Patches/../C_code.c:6392: if ((unit->maxHP + bu->changeHP) > max) cmp r3, r0 @ tmp199, max - ble .L2891 @, -@ Patches/../C_code.c:6389: bu->changeHP = max - unit->maxHP; + ble .L2894 @, +@ Patches/../C_code.c:6394: bu->changeHP = max - unit->maxHP; subs r0, r0, r1 @ tmp202, max, _1 -@ Patches/../C_code.c:6389: bu->changeHP = max - unit->maxHP; +@ Patches/../C_code.c:6394: bu->changeHP = max - unit->maxHP; strb r0, [r5, r2] @ tmp202, bu_85(D)->changeHP -.L2891: -@ Patches/../C_code.c:6392: max = GetUnitMaxPow(unit); +.L2894: +@ Patches/../C_code.c:6397: max = GetUnitMaxPow(unit); movs r0, r4 @, unit bl GetUnitMaxPow @ -@ Patches/../C_code.c:6393: if ((unit->pow + bu->changePow) > max) +@ Patches/../C_code.c:6398: if ((unit->pow + bu->changePow) > max) movs r1, #20 @ _10, -@ Patches/../C_code.c:6393: if ((unit->pow + bu->changePow) > max) +@ Patches/../C_code.c:6398: if ((unit->pow + bu->changePow) > max) movs r2, #116 @ tmp205, -@ Patches/../C_code.c:6393: if ((unit->pow + bu->changePow) > max) +@ Patches/../C_code.c:6398: if ((unit->pow + bu->changePow) > max) ldrsb r1, [r4, r1] @ _10,* _10 -@ Patches/../C_code.c:6393: if ((unit->pow + bu->changePow) > max) +@ Patches/../C_code.c:6398: if ((unit->pow + bu->changePow) > max) ldrsb r3, [r5, r2] @ tmp206, -@ Patches/../C_code.c:6393: if ((unit->pow + bu->changePow) > max) +@ Patches/../C_code.c:6398: if ((unit->pow + bu->changePow) > max) adds r3, r3, r1 @ tmp207, tmp206, _10 -@ Patches/../C_code.c:6393: if ((unit->pow + bu->changePow) > max) +@ Patches/../C_code.c:6398: if ((unit->pow + bu->changePow) > max) cmp r3, r0 @ tmp207, max - ble .L2892 @, -@ Patches/../C_code.c:6395: bu->changePow = max - unit->pow; + ble .L2895 @, +@ Patches/../C_code.c:6400: bu->changePow = max - unit->pow; subs r0, r0, r1 @ tmp210, max, _10 -@ Patches/../C_code.c:6395: bu->changePow = max - unit->pow; +@ Patches/../C_code.c:6400: bu->changePow = max - unit->pow; strb r0, [r5, r2] @ tmp210, bu_85(D)->changePow -.L2892: -@ Patches/../C_code.c:6398: max = GetUnitMaxSkl(unit); +.L2895: +@ Patches/../C_code.c:6403: max = GetUnitMaxSkl(unit); movs r0, r4 @, unit bl GetUnitMaxSkl @ -@ Patches/../C_code.c:6399: if ((unit->skl + bu->changeSkl) > max) +@ Patches/../C_code.c:6404: if ((unit->skl + bu->changeSkl) > max) movs r1, #21 @ _19, -@ Patches/../C_code.c:6399: if ((unit->skl + bu->changeSkl) > max) +@ Patches/../C_code.c:6404: if ((unit->skl + bu->changeSkl) > max) movs r2, #117 @ tmp213, -@ Patches/../C_code.c:6399: if ((unit->skl + bu->changeSkl) > max) +@ Patches/../C_code.c:6404: if ((unit->skl + bu->changeSkl) > max) ldrsb r1, [r4, r1] @ _19,* _19 -@ Patches/../C_code.c:6399: if ((unit->skl + bu->changeSkl) > max) +@ Patches/../C_code.c:6404: if ((unit->skl + bu->changeSkl) > max) ldrsb r3, [r5, r2] @ tmp214, -@ Patches/../C_code.c:6399: if ((unit->skl + bu->changeSkl) > max) +@ Patches/../C_code.c:6404: if ((unit->skl + bu->changeSkl) > max) adds r3, r3, r1 @ tmp215, tmp214, _19 -@ Patches/../C_code.c:6399: if ((unit->skl + bu->changeSkl) > max) +@ Patches/../C_code.c:6404: if ((unit->skl + bu->changeSkl) > max) cmp r3, r0 @ tmp215, max - ble .L2893 @, -@ Patches/../C_code.c:6401: bu->changeSkl = max - unit->skl; + ble .L2896 @, +@ Patches/../C_code.c:6406: bu->changeSkl = max - unit->skl; subs r0, r0, r1 @ tmp218, max, _19 -@ Patches/../C_code.c:6401: bu->changeSkl = max - unit->skl; +@ Patches/../C_code.c:6406: bu->changeSkl = max - unit->skl; strb r0, [r5, r2] @ tmp218, bu_85(D)->changeSkl -.L2893: -@ Patches/../C_code.c:6404: max = GetUnitMaxSpd(unit); +.L2896: +@ Patches/../C_code.c:6409: max = GetUnitMaxSpd(unit); movs r0, r4 @, unit bl GetUnitMaxSpd @ -@ Patches/../C_code.c:6405: if ((unit->spd + bu->changeSpd) > max) +@ Patches/../C_code.c:6410: if ((unit->spd + bu->changeSpd) > max) movs r1, #22 @ _28, -@ Patches/../C_code.c:6405: if ((unit->spd + bu->changeSpd) > max) +@ Patches/../C_code.c:6410: if ((unit->spd + bu->changeSpd) > max) movs r2, #118 @ tmp221, -@ Patches/../C_code.c:6405: if ((unit->spd + bu->changeSpd) > max) +@ Patches/../C_code.c:6410: if ((unit->spd + bu->changeSpd) > max) ldrsb r1, [r4, r1] @ _28,* _28 -@ Patches/../C_code.c:6405: if ((unit->spd + bu->changeSpd) > max) +@ Patches/../C_code.c:6410: if ((unit->spd + bu->changeSpd) > max) ldrsb r3, [r5, r2] @ tmp222, -@ Patches/../C_code.c:6405: if ((unit->spd + bu->changeSpd) > max) +@ Patches/../C_code.c:6410: if ((unit->spd + bu->changeSpd) > max) adds r3, r3, r1 @ tmp223, tmp222, _28 -@ Patches/../C_code.c:6405: if ((unit->spd + bu->changeSpd) > max) +@ Patches/../C_code.c:6410: if ((unit->spd + bu->changeSpd) > max) cmp r3, r0 @ tmp223, max - ble .L2894 @, -@ Patches/../C_code.c:6407: bu->changeSpd = max - unit->spd; + ble .L2897 @, +@ Patches/../C_code.c:6412: bu->changeSpd = max - unit->spd; subs r0, r0, r1 @ tmp226, max, _28 -@ Patches/../C_code.c:6407: bu->changeSpd = max - unit->spd; +@ Patches/../C_code.c:6412: bu->changeSpd = max - unit->spd; strb r0, [r5, r2] @ tmp226, bu_85(D)->changeSpd -.L2894: -@ Patches/../C_code.c:6410: max = GetUnitMaxDef(unit); +.L2897: +@ Patches/../C_code.c:6415: max = GetUnitMaxDef(unit); movs r0, r4 @, unit bl GetUnitMaxDef @ -@ Patches/../C_code.c:6411: if ((unit->def + bu->changeDef) > max) +@ Patches/../C_code.c:6416: if ((unit->def + bu->changeDef) > max) movs r1, #23 @ _37, -@ Patches/../C_code.c:6411: if ((unit->def + bu->changeDef) > max) +@ Patches/../C_code.c:6416: if ((unit->def + bu->changeDef) > max) movs r2, #119 @ tmp229, -@ Patches/../C_code.c:6411: if ((unit->def + bu->changeDef) > max) +@ Patches/../C_code.c:6416: if ((unit->def + bu->changeDef) > max) ldrsb r1, [r4, r1] @ _37,* _37 -@ Patches/../C_code.c:6411: if ((unit->def + bu->changeDef) > max) +@ Patches/../C_code.c:6416: if ((unit->def + bu->changeDef) > max) ldrsb r3, [r5, r2] @ tmp230, -@ Patches/../C_code.c:6411: if ((unit->def + bu->changeDef) > max) +@ Patches/../C_code.c:6416: if ((unit->def + bu->changeDef) > max) adds r3, r3, r1 @ tmp231, tmp230, _37 -@ Patches/../C_code.c:6411: if ((unit->def + bu->changeDef) > max) +@ Patches/../C_code.c:6416: if ((unit->def + bu->changeDef) > max) cmp r3, r0 @ tmp231, max - ble .L2895 @, -@ Patches/../C_code.c:6413: bu->changeDef = max - unit->def; + ble .L2898 @, +@ Patches/../C_code.c:6418: bu->changeDef = max - unit->def; subs r0, r0, r1 @ tmp234, max, _37 -@ Patches/../C_code.c:6413: bu->changeDef = max - unit->def; +@ Patches/../C_code.c:6418: bu->changeDef = max - unit->def; strb r0, [r5, r2] @ tmp234, bu_85(D)->changeDef -.L2895: -@ Patches/../C_code.c:6416: max = GetUnitMaxRes(unit); +.L2898: +@ Patches/../C_code.c:6421: max = GetUnitMaxRes(unit); movs r0, r4 @, unit bl GetUnitMaxRes @ -@ Patches/../C_code.c:6417: if ((unit->res + bu->changeRes) > max) +@ Patches/../C_code.c:6422: if ((unit->res + bu->changeRes) > max) movs r1, #24 @ _46, -@ Patches/../C_code.c:6417: if ((unit->res + bu->changeRes) > max) +@ Patches/../C_code.c:6422: if ((unit->res + bu->changeRes) > max) movs r2, #120 @ tmp237, -@ Patches/../C_code.c:6417: if ((unit->res + bu->changeRes) > max) +@ Patches/../C_code.c:6422: if ((unit->res + bu->changeRes) > max) ldrsb r1, [r4, r1] @ _46,* _46 -@ Patches/../C_code.c:6417: if ((unit->res + bu->changeRes) > max) +@ Patches/../C_code.c:6422: if ((unit->res + bu->changeRes) > max) ldrsb r3, [r5, r2] @ tmp238, -@ Patches/../C_code.c:6417: if ((unit->res + bu->changeRes) > max) +@ Patches/../C_code.c:6422: if ((unit->res + bu->changeRes) > max) adds r3, r3, r1 @ tmp239, tmp238, _46 -@ Patches/../C_code.c:6417: if ((unit->res + bu->changeRes) > max) +@ Patches/../C_code.c:6422: if ((unit->res + bu->changeRes) > max) cmp r3, r0 @ tmp239, max - ble .L2896 @, -@ Patches/../C_code.c:6419: bu->changeRes = max - unit->res; + ble .L2899 @, +@ Patches/../C_code.c:6424: bu->changeRes = max - unit->res; subs r0, r0, r1 @ tmp242, max, _46 -@ Patches/../C_code.c:6419: bu->changeRes = max - unit->res; +@ Patches/../C_code.c:6424: bu->changeRes = max - unit->res; strb r0, [r5, r2] @ tmp242, bu_85(D)->changeRes -.L2896: -@ Patches/../C_code.c:6422: max = GetUnitMaxLck(unit); +.L2899: +@ Patches/../C_code.c:6427: max = GetUnitMaxLck(unit); movs r0, r4 @, unit bl GetUnitMaxLck @ -@ Patches/../C_code.c:6423: if ((unit->lck + bu->changeLck) > max) +@ Patches/../C_code.c:6428: if ((unit->lck + bu->changeLck) > max) movs r1, #25 @ _55, -@ Patches/../C_code.c:6423: if ((unit->lck + bu->changeLck) > max) +@ Patches/../C_code.c:6428: if ((unit->lck + bu->changeLck) > max) movs r2, #121 @ tmp245, -@ Patches/../C_code.c:6423: if ((unit->lck + bu->changeLck) > max) +@ Patches/../C_code.c:6428: if ((unit->lck + bu->changeLck) > max) ldrsb r1, [r4, r1] @ _55,* _55 -@ Patches/../C_code.c:6423: if ((unit->lck + bu->changeLck) > max) +@ Patches/../C_code.c:6428: if ((unit->lck + bu->changeLck) > max) ldrsb r3, [r5, r2] @ tmp246, -@ Patches/../C_code.c:6423: if ((unit->lck + bu->changeLck) > max) +@ Patches/../C_code.c:6428: if ((unit->lck + bu->changeLck) > max) adds r3, r3, r1 @ tmp247, tmp246, _55 -@ Patches/../C_code.c:6423: if ((unit->lck + bu->changeLck) > max) +@ Patches/../C_code.c:6428: if ((unit->lck + bu->changeLck) > max) cmp r3, r0 @ tmp247, max - ble .L2897 @, -@ Patches/../C_code.c:6425: bu->changeLck = max - unit->lck; + ble .L2900 @, +@ Patches/../C_code.c:6430: bu->changeLck = max - unit->lck; subs r0, r0, r1 @ tmp250, max, _55 -@ Patches/../C_code.c:6425: bu->changeLck = max - unit->lck; +@ Patches/../C_code.c:6430: bu->changeLck = max - unit->lck; strb r0, [r5, r2] @ tmp250, bu_85(D)->changeLck -.L2897: -@ Patches/../C_code.c:6428: if (StrMagInstalled) - ldr r3, .L2902+4 @ tmp253, -@ Patches/../C_code.c:6428: if (StrMagInstalled) +.L2900: +@ Patches/../C_code.c:6433: if (StrMagInstalled) + ldr r3, .L2905+4 @ tmp253, +@ Patches/../C_code.c:6433: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - bne .L2901 @, -.L2890: -@ Patches/../C_code.c:6436: } + bne .L2904 @, +.L2893: +@ Patches/../C_code.c:6441: } @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L2901: -@ Patches/../C_code.c:6430: max = GetUnitMaxMag(unit); +.L2904: +@ Patches/../C_code.c:6435: max = GetUnitMaxMag(unit); movs r0, r4 @, unit bl GetUnitMaxMag @ -@ Patches/../C_code.c:6431: if ((unit->_u3A + bu->changeCon) > max) +@ Patches/../C_code.c:6436: if ((unit->_u3A + bu->changeCon) > max) movs r3, #58 @ tmp255, -@ Patches/../C_code.c:6431: if ((unit->_u3A + bu->changeCon) > max) +@ Patches/../C_code.c:6436: if ((unit->_u3A + bu->changeCon) > max) movs r2, #122 @ tmp256, -@ Patches/../C_code.c:6431: if ((unit->_u3A + bu->changeCon) > max) +@ Patches/../C_code.c:6436: if ((unit->_u3A + bu->changeCon) > max) ldrb r1, [r4, r3] @ _65, -@ Patches/../C_code.c:6431: if ((unit->_u3A + bu->changeCon) > max) +@ Patches/../C_code.c:6436: if ((unit->_u3A + bu->changeCon) > max) ldrsb r3, [r5, r2] @ tmp257, -@ Patches/../C_code.c:6431: if ((unit->_u3A + bu->changeCon) > max) +@ Patches/../C_code.c:6436: if ((unit->_u3A + bu->changeCon) > max) adds r3, r3, r1 @ tmp258, tmp257, _65 -@ Patches/../C_code.c:6431: if ((unit->_u3A + bu->changeCon) > max) +@ Patches/../C_code.c:6436: if ((unit->_u3A + bu->changeCon) > max) cmp r3, r0 @ tmp258, max - ble .L2890 @, -@ Patches/../C_code.c:6433: bu->changeCon = max - unit->_u3A; + ble .L2893 @, +@ Patches/../C_code.c:6438: bu->changeCon = max - unit->_u3A; subs r0, r0, r1 @ tmp260, max, _65 -@ Patches/../C_code.c:6433: bu->changeCon = max - unit->_u3A; +@ Patches/../C_code.c:6438: bu->changeCon = max - unit->_u3A; strb r0, [r5, r2] @ tmp260, bu_85(D)->changeCon -@ Patches/../C_code.c:6436: } - b .L2890 @ -.L2903: +@ Patches/../C_code.c:6441: } + b .L2893 @ +.L2906: .align 2 -.L2902: +.L2905: .word CallGetMaxHP .word StrMagInstalled .size CheckBattleUnitStatCaps, .-CheckBattleUnitStatCaps @@ -21461,399 +21492,399 @@ CheckBattleUnitLevelUp: mov r6, r9 @, mov r5, r8 @, push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:6115: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) - ldr r3, .L3027 @ tmp271, -@ Patches/../C_code.c:6114: { +@ Patches/../C_code.c:6120: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) + ldr r3, .L3030 @ tmp271, +@ Patches/../C_code.c:6119: { sub sp, sp, #92 @,, -@ Patches/../C_code.c:6114: { +@ Patches/../C_code.c:6119: { movs r4, r0 @ bu, tmp471 -@ Patches/../C_code.c:6115: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) +@ Patches/../C_code.c:6120: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) bl .L14 @ -@ Patches/../C_code.c:6115: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) +@ Patches/../C_code.c:6120: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) cmp r0, #0 @ tmp472, - bne .LCB17877 @ - b .L2904 @long jump @ -.LCB17877: -@ Patches/../C_code.c:6115: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) + bne .LCB17901 @ + b .L2907 @long jump @ +.LCB17901: +@ Patches/../C_code.c:6120: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) ldrb r5, [r4, #9] @ _2, -@ Patches/../C_code.c:6115: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) +@ Patches/../C_code.c:6120: if (CanBattleUnitGainLevels(bu) && bu->unit.exp >= 100) cmp r5, #99 @ _2, - bhi .LCB17880 @ - b .L2904 @long jump @ -.LCB17880: -@ Patches/../C_code.c:6118: int noise[4] = { 0, 0, 0, 0 }; - ldr r3, .L3027+4 @ tmp279, + bhi .LCB17904 @ + b .L2907 @long jump @ +.LCB17904: +@ Patches/../C_code.c:6123: int noise[4] = { 0, 0, 0, 0 }; + ldr r3, .L3030+4 @ tmp279, movs r2, #12 @, movs r1, #0 @, add r0, sp, #76 @,, bl .L14 @ -@ Patches/../C_code.c:6119: noise[0] = bu->unit.pCharacterData->number; +@ Patches/../C_code.c:6124: noise[0] = bu->unit.pCharacterData->number; ldr r3, [r4] @ bu_159(D)->unit.pCharacterData, bu_159(D)->unit.pCharacterData ldrb r3, [r3, #4] @ tmp284, str r3, [sp, #72] @ tmp284, noise[0] -@ Patches/../C_code.c:6120: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:6125: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); movs r3, #8 @ _6, ldrsb r3, [r4, r3] @ _6,* _6 mov r8, r3 @ _6, _6 movs r7, r3 @ _7, _6 -@ Patches/../C_code.c:6120: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:6125: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); ldr r3, [r4, #4] @ bu_159(D)->unit.pClassData, bu_159(D)->unit.pClassData -@ Patches/../C_code.c:6120: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:6125: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); ldr r3, [r3, #40] @ _8->attributes, _8->attributes -@ Patches/../C_code.c:6120: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); +@ Patches/../C_code.c:6125: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); lsls r3, r3, #23 @ tmp508, _8->attributes, - bpl .L2906 @, -@ Patches/../C_code.c:6120: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); + bpl .L2909 @, +@ Patches/../C_code.c:6125: int level = bu->unit.level + (((bu->unit.pClassData->attributes & CA_PROMOTED) != 0) * 20); adds r7, r7, #20 @ _7, -.L2906: -@ Patches/../C_code.c:6121: int useRN = !(IsAnythingRandomized()); +.L2909: +@ Patches/../C_code.c:6126: int useRN = !(IsAnythingRandomized()); bl IsAnythingRandomized @ -@ Patches/../C_code.c:6121: int useRN = !(IsAnythingRandomized()); +@ Patches/../C_code.c:6126: int useRN = !(IsAnythingRandomized()); rsbs r6, r0, #0 @ tmp290, tmp473 adcs r6, r6, r0 @ tmp290, tmp473 -@ Patches/../C_code.c:6123: bu->unit.level++; +@ Patches/../C_code.c:6128: bu->unit.level++; mov r3, r8 @ _6, _6 -@ Patches/../C_code.c:6122: bu->unit.exp -= 100; +@ Patches/../C_code.c:6127: bu->unit.exp -= 100; subs r5, r5, #100 @ tmp292, -@ Patches/../C_code.c:6123: bu->unit.level++; +@ Patches/../C_code.c:6128: bu->unit.level++; adds r3, r3, #1 @ _6, -@ Patches/../C_code.c:6122: bu->unit.exp -= 100; +@ Patches/../C_code.c:6127: bu->unit.exp -= 100; lsls r5, r5, #24 @ tmp293, tmp292, -@ Patches/../C_code.c:6123: bu->unit.level++; +@ Patches/../C_code.c:6128: bu->unit.level++; lsls r3, r3, #24 @ tmp297, tmp296, -@ Patches/../C_code.c:6122: bu->unit.exp -= 100; +@ Patches/../C_code.c:6127: bu->unit.exp -= 100; lsrs r5, r5, #24 @ _13, tmp293, -@ Patches/../C_code.c:6123: bu->unit.level++; +@ Patches/../C_code.c:6128: bu->unit.level++; asrs r3, r3, #24 @ _16, tmp297, -@ Patches/../C_code.c:6122: bu->unit.exp -= 100; +@ Patches/../C_code.c:6127: bu->unit.exp -= 100; strb r5, [r4, #9] @ _13, bu_159(D)->unit.exp -@ Patches/../C_code.c:6123: bu->unit.level++; +@ Patches/../C_code.c:6128: bu->unit.level++; strb r3, [r4, #8] @ _16, bu_159(D)->unit.level -@ Patches/../C_code.c:6125: if (bu->unit.level == 20) +@ Patches/../C_code.c:6130: if (bu->unit.level == 20) cmp r3, #20 @ _16, - bne .LCB17915 @ - b .L3023 @long jump @ -.LCB17915: -.L2907: -@ Patches/../C_code.c:6132: struct Unit * unit = GetUnit(bu->unit.index); + bne .LCB17939 @ + b .L3026 @long jump @ +.LCB17939: +.L2910: +@ Patches/../C_code.c:6137: struct Unit * unit = GetUnit(bu->unit.index); movs r0, #11 @ tmp307, - ldr r3, .L3027+8 @ tmp308, + ldr r3, .L3030+8 @ tmp308, ldrsb r0, [r4, r0] @ tmp307, bl .L14 @ -@ Patches/../C_code.c:6133: int hpGrowth = GetUnitHPGrowth(unit, true); +@ Patches/../C_code.c:6138: int hpGrowth = GetUnitHPGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6132: struct Unit * unit = GetUnit(bu->unit.index); +@ Patches/../C_code.c:6137: struct Unit * unit = GetUnit(bu->unit.index); movs r5, r0 @ unit, tmp474 -@ Patches/../C_code.c:6133: int hpGrowth = GetUnitHPGrowth(unit, true); +@ Patches/../C_code.c:6138: int hpGrowth = GetUnitHPGrowth(unit, true); bl GetUnitHPGrowth @ -@ Patches/../C_code.c:6134: int powGrowth = GetUnitPowGrowth(unit, true); +@ Patches/../C_code.c:6139: int powGrowth = GetUnitPowGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6133: int hpGrowth = GetUnitHPGrowth(unit, true); +@ Patches/../C_code.c:6138: int hpGrowth = GetUnitHPGrowth(unit, true); mov fp, r0 @ hpGrowth, tmp475 -@ Patches/../C_code.c:6134: int powGrowth = GetUnitPowGrowth(unit, true); +@ Patches/../C_code.c:6139: int powGrowth = GetUnitPowGrowth(unit, true); movs r0, r5 @, unit bl GetUnitPowGrowth @ -@ Patches/../C_code.c:6135: int sklGrowth = GetUnitSklGrowth(unit, true); +@ Patches/../C_code.c:6140: int sklGrowth = GetUnitSklGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6134: int powGrowth = GetUnitPowGrowth(unit, true); +@ Patches/../C_code.c:6139: int powGrowth = GetUnitPowGrowth(unit, true); str r0, [sp, #12] @ tmp476, %sfp -@ Patches/../C_code.c:6135: int sklGrowth = GetUnitSklGrowth(unit, true); +@ Patches/../C_code.c:6140: int sklGrowth = GetUnitSklGrowth(unit, true); movs r0, r5 @, unit bl GetUnitSklGrowth @ -@ Patches/../C_code.c:6136: int spdGrowth = GetUnitSpdGrowth(unit, true); +@ Patches/../C_code.c:6141: int spdGrowth = GetUnitSpdGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6135: int sklGrowth = GetUnitSklGrowth(unit, true); +@ Patches/../C_code.c:6140: int sklGrowth = GetUnitSklGrowth(unit, true); str r0, [sp, #16] @ tmp477, %sfp -@ Patches/../C_code.c:6136: int spdGrowth = GetUnitSpdGrowth(unit, true); +@ Patches/../C_code.c:6141: int spdGrowth = GetUnitSpdGrowth(unit, true); movs r0, r5 @, unit bl GetUnitSpdGrowth @ -@ Patches/../C_code.c:6137: int defGrowth = GetUnitDefGrowth(unit, true); +@ Patches/../C_code.c:6142: int defGrowth = GetUnitDefGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6136: int spdGrowth = GetUnitSpdGrowth(unit, true); +@ Patches/../C_code.c:6141: int spdGrowth = GetUnitSpdGrowth(unit, true); str r0, [sp, #20] @ tmp478, %sfp -@ Patches/../C_code.c:6137: int defGrowth = GetUnitDefGrowth(unit, true); +@ Patches/../C_code.c:6142: int defGrowth = GetUnitDefGrowth(unit, true); movs r0, r5 @, unit bl GetUnitDefGrowth @ -@ Patches/../C_code.c:6138: int resGrowth = GetUnitResGrowth(unit, true); +@ Patches/../C_code.c:6143: int resGrowth = GetUnitResGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6137: int defGrowth = GetUnitDefGrowth(unit, true); +@ Patches/../C_code.c:6142: int defGrowth = GetUnitDefGrowth(unit, true); str r0, [sp, #24] @ tmp479, %sfp -@ Patches/../C_code.c:6138: int resGrowth = GetUnitResGrowth(unit, true); +@ Patches/../C_code.c:6143: int resGrowth = GetUnitResGrowth(unit, true); movs r0, r5 @, unit bl GetUnitResGrowth @ -@ Patches/../C_code.c:6139: int lckGrowth = GetUnitLckGrowth(unit, true); +@ Patches/../C_code.c:6144: int lckGrowth = GetUnitLckGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6138: int resGrowth = GetUnitResGrowth(unit, true); +@ Patches/../C_code.c:6143: int resGrowth = GetUnitResGrowth(unit, true); str r0, [sp, #28] @ tmp480, %sfp -@ Patches/../C_code.c:6139: int lckGrowth = GetUnitLckGrowth(unit, true); +@ Patches/../C_code.c:6144: int lckGrowth = GetUnitLckGrowth(unit, true); movs r0, r5 @, unit bl GetUnitLckGrowth @ -@ Patches/../C_code.c:6140: int magGrowth = GetUnitMagGrowth(unit, true); +@ Patches/../C_code.c:6145: int magGrowth = GetUnitMagGrowth(unit, true); movs r1, #1 @, -@ Patches/../C_code.c:6139: int lckGrowth = GetUnitLckGrowth(unit, true); +@ Patches/../C_code.c:6144: int lckGrowth = GetUnitLckGrowth(unit, true); str r0, [sp, #32] @ tmp481, %sfp -@ Patches/../C_code.c:6140: int magGrowth = GetUnitMagGrowth(unit, true); +@ Patches/../C_code.c:6145: int magGrowth = GetUnitMagGrowth(unit, true); movs r0, r5 @, unit bl GetUnitMagGrowth @ -@ Patches/../C_code.c:6144: int maxHP = CallGetMaxHP(unit); - ldr r3, .L3027+12 @ tmp309, -@ Patches/../C_code.c:6140: int magGrowth = GetUnitMagGrowth(unit, true); +@ Patches/../C_code.c:6149: int maxHP = CallGetMaxHP(unit); + ldr r3, .L3030+12 @ tmp309, +@ Patches/../C_code.c:6145: int magGrowth = GetUnitMagGrowth(unit, true); str r0, [sp, #60] @ tmp482, %sfp -@ Patches/../C_code.c:6144: int maxHP = CallGetMaxHP(unit); +@ Patches/../C_code.c:6149: int maxHP = CallGetMaxHP(unit); movs r0, r5 @, unit bl .L14 @ str r0, [sp, #64] @ maxHP, %sfp mov r9, r0 @ maxHP, tmp483 -@ Patches/../C_code.c:6145: int maxPow = GetUnitMaxPow(unit); +@ Patches/../C_code.c:6150: int maxPow = GetUnitMaxPow(unit); movs r0, r5 @, unit bl GetUnitMaxPow @ str r0, [sp, #36] @ tmp484, %sfp -@ Patches/../C_code.c:6146: int maxSkl = GetUnitMaxSkl(unit); +@ Patches/../C_code.c:6151: int maxSkl = GetUnitMaxSkl(unit); movs r0, r5 @, unit bl GetUnitMaxSkl @ str r0, [sp, #40] @ tmp485, %sfp -@ Patches/../C_code.c:6147: int maxSpd = GetUnitMaxSpd(unit); +@ Patches/../C_code.c:6152: int maxSpd = GetUnitMaxSpd(unit); movs r0, r5 @, unit bl GetUnitMaxSpd @ str r0, [sp, #44] @ tmp486, %sfp -@ Patches/../C_code.c:6148: int maxDef = GetUnitMaxDef(unit); +@ Patches/../C_code.c:6153: int maxDef = GetUnitMaxDef(unit); movs r0, r5 @, unit bl GetUnitMaxDef @ str r0, [sp, #48] @ tmp487, %sfp -@ Patches/../C_code.c:6149: int maxRes = GetUnitMaxRes(unit); +@ Patches/../C_code.c:6154: int maxRes = GetUnitMaxRes(unit); movs r0, r5 @, unit bl GetUnitMaxRes @ str r0, [sp, #52] @ tmp488, %sfp -@ Patches/../C_code.c:6150: int maxLck = GetUnitMaxLck(unit); +@ Patches/../C_code.c:6155: int maxLck = GetUnitMaxLck(unit); movs r0, r5 @, unit bl GetUnitMaxLck @ str r0, [sp, #56] @ tmp489, %sfp -@ Patches/../C_code.c:6151: int maxMag = GetUnitMaxMag(unit); +@ Patches/../C_code.c:6156: int maxMag = GetUnitMaxMag(unit); movs r0, r5 @, unit bl GetUnitMaxMag @ -@ Patches/../C_code.c:6153: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); +@ Patches/../C_code.c:6158: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); movs r3, #1 @, -@ Patches/../C_code.c:6151: int maxMag = GetUnitMaxMag(unit); +@ Patches/../C_code.c:6156: int maxMag = GetUnitMaxMag(unit); str r0, [sp, #68] @ tmp490, %sfp -@ Patches/../C_code.c:6153: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); +@ Patches/../C_code.c:6158: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); movs r2, r7 @, _7 mov r0, fp @, hpGrowth str r6, [sp] @ tmp290, add r1, sp, #72 @ tmp528,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6153: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); +@ Patches/../C_code.c:6158: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 1, useRN); movs r3, #115 @ tmp312, lsls r0, r0, #24 @ tmp311, tmp491, asrs r0, r0, #24 @ _24, tmp311, strb r0, [r4, r3] @ _24, bu_159(D)->changeHP -@ Patches/../C_code.c:6154: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) - beq .LCB17992 @ - b .L3024 @long jump @ -.LCB17992: -.L2908: -@ Patches/../C_code.c:6157: bu->changeHP = 0; +@ Patches/../C_code.c:6159: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) + beq .LCB18016 @ + b .L3027 @long jump @ +.LCB18016: +.L2911: +@ Patches/../C_code.c:6162: bu->changeHP = 0; movs r3, #115 @ tmp316, movs r2, #0 @ tmp317, strb r2, [r4, r3] @ tmp317, bu_159(D)->changeHP -@ Patches/../C_code.c:6131: statGainTotal = 0; +@ Patches/../C_code.c:6136: statGainTotal = 0; movs r3, #0 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -.L2909: -@ Patches/../C_code.c:6159: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 2, useRN); +.L2912: +@ Patches/../C_code.c:6164: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 2, useRN); movs r3, #2 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #12] @, %sfp add r1, sp, #72 @ tmp531,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6159: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 2, useRN); +@ Patches/../C_code.c:6164: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 2, useRN); movs r3, #116 @ tmp321, lsls r0, r0, #24 @ tmp320, tmp492, asrs r0, r0, #24 @ _30, tmp320, strb r0, [r4, r3] @ _30, bu_159(D)->changePow -@ Patches/../C_code.c:6160: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) - bne .LCB18013 @ - b .L2910 @long jump @ -.LCB18013: -@ Patches/../C_code.c:6160: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6165: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) + bne .LCB18037 @ + b .L2913 @long jump @ +.LCB18037: +@ Patches/../C_code.c:6165: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) movs r3, #20 @ tmp323, ldrsb r3, [r5, r3] @ tmp323, -@ Patches/../C_code.c:6160: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6165: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) ldr r2, [sp, #36] @ maxPow, %sfp -@ Patches/../C_code.c:6160: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6165: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) adds r3, r3, r0 @ tmp324, tmp323, _30 -@ Patches/../C_code.c:6160: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6165: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) cmp r3, r2 @ tmp324, maxPow - ble .LCB18019 @ - b .L2910 @long jump @ -.LCB18019: -@ Patches/../C_code.c:6161: statGainTotal += bu->changePow; + ble .LCB18043 @ + b .L2913 @long jump @ +.LCB18043: +@ Patches/../C_code.c:6166: statGainTotal += bu->changePow; add r8, r8, r0 @ statGainTotal, _30 -.L2911: -@ Patches/../C_code.c:6165: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 3, useRN); +.L2914: +@ Patches/../C_code.c:6170: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 3, useRN); movs r3, #3 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #16] @, %sfp add r1, sp, #72 @ tmp533,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6165: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 3, useRN); +@ Patches/../C_code.c:6170: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 3, useRN); movs r3, #117 @ tmp330, lsls r0, r0, #24 @ tmp329, tmp493, asrs r0, r0, #24 @ _36, tmp329, strb r0, [r4, r3] @ _36, bu_159(D)->changeSkl -@ Patches/../C_code.c:6166: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) - bne .LCB18035 @ - b .L2912 @long jump @ -.LCB18035: -@ Patches/../C_code.c:6166: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6171: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) + bne .LCB18059 @ + b .L2915 @long jump @ +.LCB18059: +@ Patches/../C_code.c:6171: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) movs r3, #21 @ tmp332, ldrsb r3, [r5, r3] @ tmp332, -@ Patches/../C_code.c:6166: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6171: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) ldr r2, [sp, #40] @ maxSkl, %sfp -@ Patches/../C_code.c:6166: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6171: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) adds r3, r3, r0 @ tmp333, tmp332, _36 -@ Patches/../C_code.c:6166: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6171: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) cmp r3, r2 @ tmp333, maxSkl - ble .LCB18041 @ - b .L2912 @long jump @ -.LCB18041: -@ Patches/../C_code.c:6167: statGainTotal += bu->changeSkl; + ble .LCB18065 @ + b .L2915 @long jump @ +.LCB18065: +@ Patches/../C_code.c:6172: statGainTotal += bu->changeSkl; add r8, r8, r0 @ statGainTotal, _36 -.L2913: -@ Patches/../C_code.c:6171: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 4, useRN); +.L2916: +@ Patches/../C_code.c:6176: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 4, useRN); movs r3, #4 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #20] @, %sfp add r1, sp, #72 @ tmp535,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6171: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 4, useRN); +@ Patches/../C_code.c:6176: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 4, useRN); movs r3, #118 @ tmp339, lsls r0, r0, #24 @ tmp338, tmp494, asrs r0, r0, #24 @ _42, tmp338, strb r0, [r4, r3] @ _42, bu_159(D)->changeSpd -@ Patches/../C_code.c:6172: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) - bne .LCB18057 @ - b .L2914 @long jump @ -.LCB18057: -@ Patches/../C_code.c:6172: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6177: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) + bne .LCB18081 @ + b .L2917 @long jump @ +.LCB18081: +@ Patches/../C_code.c:6177: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) movs r3, #22 @ tmp341, ldrsb r3, [r5, r3] @ tmp341, -@ Patches/../C_code.c:6172: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6177: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) ldr r2, [sp, #44] @ maxSpd, %sfp -@ Patches/../C_code.c:6172: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6177: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) adds r3, r3, r0 @ tmp342, tmp341, _42 -@ Patches/../C_code.c:6172: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6177: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) cmp r3, r2 @ tmp342, maxSpd - ble .LCB18063 @ - b .L2914 @long jump @ -.LCB18063: -@ Patches/../C_code.c:6173: statGainTotal += bu->changeSpd; + ble .LCB18087 @ + b .L2917 @long jump @ +.LCB18087: +@ Patches/../C_code.c:6178: statGainTotal += bu->changeSpd; add r8, r8, r0 @ statGainTotal, _42 -.L2915: -@ Patches/../C_code.c:6177: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 5, useRN); +.L2918: +@ Patches/../C_code.c:6182: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 5, useRN); movs r3, #5 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #24] @, %sfp add r1, sp, #72 @ tmp537,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6177: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 5, useRN); +@ Patches/../C_code.c:6182: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 5, useRN); movs r3, #119 @ tmp348, lsls r0, r0, #24 @ tmp347, tmp495, asrs r0, r0, #24 @ _48, tmp347, strb r0, [r4, r3] @ _48, bu_159(D)->changeDef -@ Patches/../C_code.c:6178: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) - beq .L2916 @, -@ Patches/../C_code.c:6178: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6183: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) + beq .L2919 @, +@ Patches/../C_code.c:6183: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) movs r3, #23 @ tmp350, ldrsb r3, [r5, r3] @ tmp350, -@ Patches/../C_code.c:6178: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6183: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) ldr r2, [sp, #48] @ maxDef, %sfp -@ Patches/../C_code.c:6178: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6183: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) adds r3, r3, r0 @ tmp351, tmp350, _48 -@ Patches/../C_code.c:6178: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6183: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) cmp r3, r2 @ tmp351, maxDef - bgt .L2916 @, -@ Patches/../C_code.c:6179: statGainTotal += bu->changeDef; + bgt .L2919 @, +@ Patches/../C_code.c:6184: statGainTotal += bu->changeDef; add r8, r8, r0 @ statGainTotal, _48 -.L2917: -@ Patches/../C_code.c:6183: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 6, useRN); +.L2920: +@ Patches/../C_code.c:6188: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 6, useRN); movs r3, #6 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #28] @, %sfp add r1, sp, #72 @ tmp539,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6183: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 6, useRN); +@ Patches/../C_code.c:6188: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 6, useRN); movs r3, #120 @ tmp357, lsls r0, r0, #24 @ tmp356, tmp496, asrs r0, r0, #24 @ _54, tmp356, strb r0, [r4, r3] @ _54, bu_159(D)->changeRes -@ Patches/../C_code.c:6184: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) - beq .L2918 @, -@ Patches/../C_code.c:6184: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6189: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) + beq .L2921 @, +@ Patches/../C_code.c:6189: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) movs r3, #24 @ tmp359, ldrsb r3, [r5, r3] @ tmp359, -@ Patches/../C_code.c:6184: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6189: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) ldr r2, [sp, #52] @ maxRes, %sfp -@ Patches/../C_code.c:6184: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6189: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) adds r3, r3, r0 @ tmp360, tmp359, _54 -@ Patches/../C_code.c:6184: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6189: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) cmp r3, r2 @ tmp360, maxRes - bgt .L2918 @, -@ Patches/../C_code.c:6185: statGainTotal += bu->changeRes; + bgt .L2921 @, +@ Patches/../C_code.c:6190: statGainTotal += bu->changeRes; add r8, r8, r0 @ statGainTotal, _54 -.L2919: -@ Patches/../C_code.c:6189: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 7, useRN); +.L2922: +@ Patches/../C_code.c:6194: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 7, useRN); movs r3, #7 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #32] @, %sfp add r1, sp, #72 @ tmp541,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6189: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 7, useRN); +@ Patches/../C_code.c:6194: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 7, useRN); movs r3, #121 @ tmp366, lsls r0, r0, #24 @ tmp365, tmp497, asrs r0, r0, #24 @ _60, tmp365, strb r0, [r4, r3] @ _60, bu_159(D)->changeLck -@ Patches/../C_code.c:6190: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) - beq .L2920 @, -@ Patches/../C_code.c:6190: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6195: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) + beq .L2923 @, +@ Patches/../C_code.c:6195: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) movs r3, #25 @ tmp368, ldrsb r3, [r5, r3] @ tmp368, -@ Patches/../C_code.c:6190: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6195: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) ldr r2, [sp, #56] @ maxLck, %sfp -@ Patches/../C_code.c:6190: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6195: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) adds r3, r3, r0 @ tmp369, tmp368, _60 -@ Patches/../C_code.c:6190: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6195: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) cmp r3, r2 @ tmp369, maxLck - bgt .L2920 @, -@ Patches/../C_code.c:6191: statGainTotal += bu->changeLck; + bgt .L2923 @, +@ Patches/../C_code.c:6196: statGainTotal += bu->changeLck; add r8, r8, r0 @ statGainTotal, _60 -.L2921: -@ Patches/../C_code.c:6195: if (StrMagInstalled) - ldr r3, .L3027+16 @ tmp466, +.L2924: +@ Patches/../C_code.c:6200: if (StrMagInstalled) + ldr r3, .L3030+16 @ tmp466, mov r10, r3 @ tmp466, tmp466 -@ Patches/../C_code.c:6195: if (StrMagInstalled) +@ Patches/../C_code.c:6200: if (StrMagInstalled) ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .LCB18137 @ - b .L3025 @long jump @ -.LCB18137: -.L2922: -@ Patches/../C_code.c:6200: if (statGainTotal < MinimumStatUps) + beq .LCB18161 @ + b .L3028 @long jump @ +.LCB18161: +.L2925: +@ Patches/../C_code.c:6205: if (statGainTotal < MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - ble .L2936 @, -.L2927: -@ Patches/../C_code.c:6310: CheckBattleUnitStatCaps(unit, bu); + ble .L2939 @, +.L2930: +@ Patches/../C_code.c:6315: CheckBattleUnitStatCaps(unit, bu); movs r1, r4 @, bu movs r0, r5 @, unit bl CheckBattleUnitStatCaps @ -.L2904: -@ Patches/../C_code.c:6312: } +.L2907: +@ Patches/../C_code.c:6317: } add sp, sp, #92 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -21864,406 +21895,406 @@ CheckBattleUnitLevelUp: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3024: -@ Patches/../C_code.c:6154: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +.L3027: +@ Patches/../C_code.c:6159: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) movs r3, #18 @ tmp314, -@ Patches/../C_code.c:6154: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6159: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) mov r8, r0 @ statGainTotal, _24 -@ Patches/../C_code.c:6154: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6159: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) ldrsb r3, [r5, r3] @ tmp314, -@ Patches/../C_code.c:6154: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6159: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) add r3, r3, r8 @ tmp315, statGainTotal -@ Patches/../C_code.c:6154: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6159: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) cmp r3, r9 @ tmp315, maxHP - bgt .LCB18169 @ - b .L2909 @long jump @ -.LCB18169: - b .L2908 @ -.L3023: -@ Patches/../C_code.c:6127: bu->expGain -= bu->unit.exp; + bgt .LCB18193 @ + b .L2912 @long jump @ +.LCB18193: + b .L2911 @ +.L3026: +@ Patches/../C_code.c:6132: bu->expGain -= bu->unit.exp; movs r2, #110 @ tmp299, -@ Patches/../C_code.c:6127: bu->expGain -= bu->unit.exp; +@ Patches/../C_code.c:6132: bu->expGain -= bu->unit.exp; ldrb r3, [r4, r2] @ tmp301, subs r3, r3, r5 @ tmp302, tmp301, _13 strb r3, [r4, r2] @ tmp302, bu_159(D)->expGain -@ Patches/../C_code.c:6128: bu->unit.exp = UNIT_EXP_DISABLED; +@ Patches/../C_code.c:6133: bu->unit.exp = UNIT_EXP_DISABLED; movs r3, #255 @ tmp305, strb r3, [r4, #9] @ tmp305, bu_159(D)->unit.exp - b .L2907 @ -.L2912: -@ Patches/../C_code.c:6169: bu->changeSkl = 0; + b .L2910 @ +.L2915: +@ Patches/../C_code.c:6174: bu->changeSkl = 0; movs r3, #117 @ tmp334, movs r2, #0 @ tmp335, strb r2, [r4, r3] @ tmp335, bu_159(D)->changeSkl - b .L2913 @ -.L2910: -@ Patches/../C_code.c:6163: bu->changePow = 0; + b .L2916 @ +.L2913: +@ Patches/../C_code.c:6168: bu->changePow = 0; movs r3, #116 @ tmp325, movs r2, #0 @ tmp326, strb r2, [r4, r3] @ tmp326, bu_159(D)->changePow - b .L2911 @ -.L2920: -@ Patches/../C_code.c:6193: bu->changeLck = 0; + b .L2914 @ +.L2923: +@ Patches/../C_code.c:6198: bu->changeLck = 0; movs r3, #121 @ tmp370, movs r2, #0 @ tmp371, strb r2, [r4, r3] @ tmp371, bu_159(D)->changeLck - b .L2921 @ -.L2918: -@ Patches/../C_code.c:6187: bu->changeRes = 0; + b .L2924 @ +.L2921: +@ Patches/../C_code.c:6192: bu->changeRes = 0; movs r3, #120 @ tmp361, movs r2, #0 @ tmp362, strb r2, [r4, r3] @ tmp362, bu_159(D)->changeRes - b .L2919 @ -.L2916: -@ Patches/../C_code.c:6181: bu->changeDef = 0; + b .L2922 @ +.L2919: +@ Patches/../C_code.c:6186: bu->changeDef = 0; movs r3, #119 @ tmp352, movs r2, #0 @ tmp353, strb r2, [r4, r3] @ tmp353, bu_159(D)->changeDef - b .L2917 @ -.L2914: -@ Patches/../C_code.c:6175: bu->changeSpd = 0; + b .L2920 @ +.L2917: +@ Patches/../C_code.c:6180: bu->changeSpd = 0; movs r3, #118 @ tmp343, movs r2, #0 @ tmp344, strb r2, [r4, r3] @ tmp344, bu_159(D)->changeSpd - b .L2915 @ -.L3028: + b .L2918 @ +.L3031: .align 2 -.L3027: +.L3030: .word CanBattleUnitGainLevels .word memset .word GetUnit .word CallGetMaxHP .word StrMagInstalled -.L2936: - movs r3, #15 @ ivtmp.1721, -@ Patches/../C_code.c:6210: bu->changeRes = 0; +.L2939: + movs r3, #15 @ ivtmp.1726, +@ Patches/../C_code.c:6215: bu->changeRes = 0; mov r9, r5 @ unit, unit movs r5, r6 @ tmp290, tmp290 - movs r6, r3 @ ivtmp.1721, ivtmp.1721 -.L2923: -@ Patches/../C_code.c:6205: bu->changeHP = 0; + movs r6, r3 @ ivtmp.1726, ivtmp.1726 +.L2926: +@ Patches/../C_code.c:6210: bu->changeHP = 0; movs r3, #0 @ tmp550, movs r2, #115 @ tmp548, strb r3, [r4, r2] @ tmp549, bu_159(D)->changeHP -@ Patches/../C_code.c:6210: bu->changeRes = 0; +@ Patches/../C_code.c:6215: bu->changeRes = 0; adds r2, r2, #5 @ tmp552, -@ Patches/../C_code.c:6206: bu->changePow = 0; +@ Patches/../C_code.c:6211: bu->changePow = 0; str r3, [r4, #116] @ tmp551, MEM [(signed char *)bu_159(D) + 116B] -@ Patches/../C_code.c:6210: bu->changeRes = 0; +@ Patches/../C_code.c:6215: bu->changeRes = 0; strh r3, [r4, r2] @ tmp553, MEM [(signed char *)bu_159(D) + 120B] -@ Patches/../C_code.c:6212: if (StrMagInstalled) +@ Patches/../C_code.c:6217: if (StrMagInstalled) mov r3, r10 @ tmp466, tmp466 ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - beq .L2924 @, -@ Patches/../C_code.c:6214: bu->changeCon = 0; + beq .L2927 @, +@ Patches/../C_code.c:6219: bu->changeCon = 0; movs r2, #0 @ tmp384, movs r3, #122 @ tmp387, strb r2, [r4, r3] @ tmp384, bu_159(D)->changeCon -.L2924: -@ Patches/../C_code.c:6217: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); - subs r3, r6, #7 @ tmp390, ivtmp.1721, +.L2927: +@ Patches/../C_code.c:6222: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); + subs r3, r6, #7 @ tmp390, ivtmp.1726, movs r2, r7 @, _7 mov r0, fp @, hpGrowth str r5, [sp] @ tmp290, add r1, sp, #72 @ tmp556,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6217: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); +@ Patches/../C_code.c:6222: bu->changeHP = NewGetStatIncrease(hpGrowth, noise, level, 8 + (i * 13), useRN); movs r3, #115 @ tmp557, lsls r0, r0, #24 @ tmp392, tmp499, asrs r0, r0, #24 @ _72, tmp392, strb r0, [r4, r3] @ _72, bu_159(D)->changeHP -@ Patches/../C_code.c:6204: statGainTotal = 0; +@ Patches/../C_code.c:6209: statGainTotal = 0; movs r3, #0 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -@ Patches/../C_code.c:6219: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6224: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) cmp r0, #0 @ _72, - beq .L2925 @, -@ Patches/../C_code.c:6219: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) + beq .L2928 @, +@ Patches/../C_code.c:6224: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) mov r3, r9 @ unit, unit ldrb r3, [r3, #18] @ tmp395, lsls r3, r3, #24 @ tmp395, tmp395, asrs r3, r3, #24 @ tmp395, tmp395, -@ Patches/../C_code.c:6219: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6224: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) adds r3, r3, r0 @ tmp396, tmp395, _72 -@ Patches/../C_code.c:6219: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) +@ Patches/../C_code.c:6224: if (bu->changeHP && ((unit->maxHP + bu->changeHP) <= maxHP)) ldr r0, [sp, #64] @ maxHP, %sfp lsrs r1, r3, #31 @ tmp399, tmp396, asrs r2, r0, #31 @ tmp400, maxHP, cmp r0, r3 @ maxHP, tmp396 adcs r1, r1, r2 @ tmp399, tmp399, tmp400 mov r8, r1 @ statGainTotal, tmp399 -.L2925: -@ Patches/../C_code.c:6228: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 9 + (i * 13), useRN); - subs r3, r6, #6 @ tmp401, ivtmp.1721, +.L2928: +@ Patches/../C_code.c:6233: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 9 + (i * 13), useRN); + subs r3, r6, #6 @ tmp401, ivtmp.1726, movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #12] @, %sfp add r1, sp, #72 @ tmp563,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6228: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 9 + (i * 13), useRN); +@ Patches/../C_code.c:6233: bu->changePow = NewGetStatIncrease(powGrowth, noise, level, 9 + (i * 13), useRN); movs r3, #116 @ tmp404, lsls r0, r0, #24 @ tmp403, tmp500, asrs r0, r0, #24 @ _79, tmp403, strb r0, [r4, r3] @ _79, bu_159(D)->changePow -@ Patches/../C_code.c:6230: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) - beq .L2926 @, -@ Patches/../C_code.c:6230: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6235: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) + beq .L2929 @, +@ Patches/../C_code.c:6235: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) mov r3, r9 @ unit, unit ldrb r3, [r3, #20] @ tmp406, lsls r3, r3, #24 @ tmp406, tmp406, asrs r3, r3, #24 @ tmp406, tmp406, -@ Patches/../C_code.c:6230: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6235: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) ldr r2, [sp, #36] @ maxPow, %sfp -@ Patches/../C_code.c:6230: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6235: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) adds r3, r3, r0 @ tmp407, tmp406, _79 -@ Patches/../C_code.c:6230: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) +@ Patches/../C_code.c:6235: if (bu->changePow && ((unit->pow + bu->changePow) <= maxPow)) cmp r3, r2 @ tmp407, maxPow - bgt .L2926 @, -@ Patches/../C_code.c:6233: if (statGainTotal >= MinimumStatUps) + bgt .L2929 @, +@ Patches/../C_code.c:6238: if (statGainTotal >= MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - bne .LCB18313 @ - b .L3022 @long jump @ -.LCB18313: -@ Patches/../C_code.c:6232: statGainTotal++; + bne .LCB18337 @ + b .L3025 @long jump @ +.LCB18337: +@ Patches/../C_code.c:6237: statGainTotal++; movs r3, #1 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -.L2926: -@ Patches/../C_code.c:6239: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 10 + (i * 13), useRN); - subs r3, r6, #5 @ tmp408, ivtmp.1721, +.L2929: +@ Patches/../C_code.c:6244: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 10 + (i * 13), useRN); + subs r3, r6, #5 @ tmp408, ivtmp.1726, movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #16] @, %sfp add r1, sp, #72 @ tmp568,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6239: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 10 + (i * 13), useRN); +@ Patches/../C_code.c:6244: bu->changeSkl = NewGetStatIncrease(sklGrowth, noise, level, 10 + (i * 13), useRN); movs r3, #117 @ tmp411, lsls r0, r0, #24 @ tmp410, tmp501, asrs r0, r0, #24 @ _86, tmp410, strb r0, [r4, r3] @ _86, bu_159(D)->changeSkl -@ Patches/../C_code.c:6241: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) - beq .L2928 @, -@ Patches/../C_code.c:6241: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6246: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) + beq .L2931 @, +@ Patches/../C_code.c:6246: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) mov r3, r9 @ unit, unit ldrb r3, [r3, #21] @ tmp413, lsls r3, r3, #24 @ tmp413, tmp413, asrs r3, r3, #24 @ tmp413, tmp413, -@ Patches/../C_code.c:6241: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6246: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) ldr r2, [sp, #40] @ maxSkl, %sfp -@ Patches/../C_code.c:6241: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6246: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) adds r3, r3, r0 @ tmp414, tmp413, _86 -@ Patches/../C_code.c:6241: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) +@ Patches/../C_code.c:6246: if (bu->changeSkl && ((unit->skl + bu->changeSkl) <= maxSkl)) cmp r3, r2 @ tmp414, maxSkl - bgt .L2928 @, -@ Patches/../C_code.c:6244: if (statGainTotal >= MinimumStatUps) + bgt .L2931 @, +@ Patches/../C_code.c:6249: if (statGainTotal >= MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - beq .L3022 @, -@ Patches/../C_code.c:6243: statGainTotal++; + beq .L3025 @, +@ Patches/../C_code.c:6248: statGainTotal++; movs r3, #1 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -.L2928: -@ Patches/../C_code.c:6250: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 11 + (i * 13), useRN); - subs r3, r6, #4 @ tmp415, ivtmp.1721, +.L2931: +@ Patches/../C_code.c:6255: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 11 + (i * 13), useRN); + subs r3, r6, #4 @ tmp415, ivtmp.1726, movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #20] @, %sfp add r1, sp, #72 @ tmp573,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6250: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 11 + (i * 13), useRN); +@ Patches/../C_code.c:6255: bu->changeSpd = NewGetStatIncrease(spdGrowth, noise, level, 11 + (i * 13), useRN); movs r3, #118 @ tmp418, lsls r0, r0, #24 @ tmp417, tmp502, asrs r0, r0, #24 @ _93, tmp417, strb r0, [r4, r3] @ _93, bu_159(D)->changeSpd -@ Patches/../C_code.c:6252: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) - beq .L2929 @, -@ Patches/../C_code.c:6252: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6257: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) + beq .L2932 @, +@ Patches/../C_code.c:6257: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) mov r3, r9 @ unit, unit ldrb r3, [r3, #22] @ tmp420, lsls r3, r3, #24 @ tmp420, tmp420, asrs r3, r3, #24 @ tmp420, tmp420, -@ Patches/../C_code.c:6252: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6257: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) ldr r2, [sp, #44] @ maxSpd, %sfp -@ Patches/../C_code.c:6252: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6257: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) adds r3, r3, r0 @ tmp421, tmp420, _93 -@ Patches/../C_code.c:6252: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) +@ Patches/../C_code.c:6257: if (bu->changeSpd && ((unit->spd + bu->changeSpd) <= maxSpd)) cmp r3, r2 @ tmp421, maxSpd - bgt .L2929 @, -@ Patches/../C_code.c:6255: if (statGainTotal >= MinimumStatUps) + bgt .L2932 @, +@ Patches/../C_code.c:6260: if (statGainTotal >= MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - beq .L3022 @, -@ Patches/../C_code.c:6254: statGainTotal++; + beq .L3025 @, +@ Patches/../C_code.c:6259: statGainTotal++; movs r3, #1 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -.L2929: -@ Patches/../C_code.c:6261: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 12 + (i * 13), useRN); - subs r3, r6, #3 @ tmp422, ivtmp.1721, +.L2932: +@ Patches/../C_code.c:6266: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 12 + (i * 13), useRN); + subs r3, r6, #3 @ tmp422, ivtmp.1726, movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #24] @, %sfp add r1, sp, #72 @ tmp578,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6261: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 12 + (i * 13), useRN); +@ Patches/../C_code.c:6266: bu->changeDef = NewGetStatIncrease(defGrowth, noise, level, 12 + (i * 13), useRN); movs r3, #119 @ tmp425, lsls r0, r0, #24 @ tmp424, tmp503, asrs r0, r0, #24 @ _100, tmp424, strb r0, [r4, r3] @ _100, bu_159(D)->changeDef -@ Patches/../C_code.c:6263: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) - beq .L2930 @, -@ Patches/../C_code.c:6263: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6268: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) + beq .L2933 @, +@ Patches/../C_code.c:6268: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) mov r3, r9 @ unit, unit ldrb r3, [r3, #23] @ tmp427, lsls r3, r3, #24 @ tmp427, tmp427, asrs r3, r3, #24 @ tmp427, tmp427, -@ Patches/../C_code.c:6263: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6268: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) ldr r2, [sp, #48] @ maxDef, %sfp -@ Patches/../C_code.c:6263: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6268: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) adds r3, r3, r0 @ tmp428, tmp427, _100 -@ Patches/../C_code.c:6263: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) +@ Patches/../C_code.c:6268: if (bu->changeDef && ((unit->def + bu->changeDef) <= maxDef)) cmp r3, r2 @ tmp428, maxDef - bgt .L2930 @, -@ Patches/../C_code.c:6266: if (statGainTotal >= MinimumStatUps) + bgt .L2933 @, +@ Patches/../C_code.c:6271: if (statGainTotal >= MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - beq .L3022 @, -@ Patches/../C_code.c:6265: statGainTotal++; + beq .L3025 @, +@ Patches/../C_code.c:6270: statGainTotal++; movs r3, #1 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -.L2930: -@ Patches/../C_code.c:6272: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 13 + (i * 13), useRN); - subs r3, r6, #2 @ tmp429, ivtmp.1721, +.L2933: +@ Patches/../C_code.c:6277: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 13 + (i * 13), useRN); + subs r3, r6, #2 @ tmp429, ivtmp.1726, movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #28] @, %sfp add r1, sp, #72 @ tmp583,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6272: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 13 + (i * 13), useRN); +@ Patches/../C_code.c:6277: bu->changeRes = NewGetStatIncrease(resGrowth, noise, level, 13 + (i * 13), useRN); movs r3, #120 @ tmp584, lsls r0, r0, #24 @ tmp431, tmp504, asrs r0, r0, #24 @ _108, tmp431, strb r0, [r4, r3] @ _108, bu_159(D)->changeRes -@ Patches/../C_code.c:6274: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) - beq .L2931 @, -@ Patches/../C_code.c:6274: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6279: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) + beq .L2934 @, +@ Patches/../C_code.c:6279: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) mov r3, r9 @ unit, unit ldrb r3, [r3, #24] @ tmp434, lsls r3, r3, #24 @ tmp434, tmp434, asrs r3, r3, #24 @ tmp434, tmp434, -@ Patches/../C_code.c:6274: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6279: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) ldr r2, [sp, #52] @ maxRes, %sfp -@ Patches/../C_code.c:6274: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6279: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) adds r3, r3, r0 @ tmp435, tmp434, _108 -@ Patches/../C_code.c:6274: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) +@ Patches/../C_code.c:6279: if (bu->changeRes && ((unit->res + bu->changeRes) <= maxRes)) cmp r3, r2 @ tmp435, maxRes - bgt .L2931 @, -@ Patches/../C_code.c:6277: if (statGainTotal >= MinimumStatUps) + bgt .L2934 @, +@ Patches/../C_code.c:6282: if (statGainTotal >= MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - beq .L3022 @, -@ Patches/../C_code.c:6276: statGainTotal++; + beq .L3025 @, +@ Patches/../C_code.c:6281: statGainTotal++; movs r3, #1 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal -.L2931: -@ Patches/../C_code.c:6283: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 14 + (i * 13), useRN); - subs r3, r6, #1 @ tmp436, ivtmp.1721, +.L2934: +@ Patches/../C_code.c:6288: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 14 + (i * 13), useRN); + subs r3, r6, #1 @ tmp436, ivtmp.1726, movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #32] @, %sfp add r1, sp, #72 @ tmp589,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6283: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 14 + (i * 13), useRN); +@ Patches/../C_code.c:6288: bu->changeLck = NewGetStatIncrease(lckGrowth, noise, level, 14 + (i * 13), useRN); movs r3, #121 @ tmp439, lsls r0, r0, #24 @ tmp438, tmp505, asrs r0, r0, #24 @ _115, tmp438, strb r0, [r4, r3] @ _115, bu_159(D)->changeLck -@ Patches/../C_code.c:6285: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) - beq .L2932 @, -@ Patches/../C_code.c:6285: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6290: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) + beq .L2935 @, +@ Patches/../C_code.c:6290: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) mov r3, r9 @ unit, unit ldrb r3, [r3, #25] @ tmp441, lsls r3, r3, #24 @ tmp441, tmp441, asrs r3, r3, #24 @ tmp441, tmp441, -@ Patches/../C_code.c:6285: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6290: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) ldr r2, [sp, #56] @ maxLck, %sfp -@ Patches/../C_code.c:6285: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6290: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) adds r3, r3, r0 @ tmp442, tmp441, _115 -@ Patches/../C_code.c:6285: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) +@ Patches/../C_code.c:6290: if (bu->changeLck && ((unit->lck + bu->changeLck) <= maxLck)) cmp r3, r2 @ tmp442, maxLck - ble .L3026 @, -.L2932: -@ Patches/../C_code.c:6294: if (StrMagInstalled) + ble .L3029 @, +.L2935: +@ Patches/../C_code.c:6299: if (StrMagInstalled) mov r3, r10 @ tmp466, tmp466 ldr r3, [r3] @ StrMagInstalled, StrMagInstalled cmp r3, #0 @ StrMagInstalled, - bne .L2933 @, -.L2934: -@ Patches/../C_code.c:6202: for (int i = 0; i < 4; i++) - adds r6, r6, #13 @ ivtmp.1721, - cmp r6, #67 @ ivtmp.1721, - beq .LCB18459 @ - b .L2923 @long jump @ -.LCB18459: -.L3022: + bne .L2936 @, +.L2937: +@ Patches/../C_code.c:6207: for (int i = 0; i < 4; i++) + adds r6, r6, #13 @ ivtmp.1726, + cmp r6, #67 @ ivtmp.1726, + beq .LCB18483 @ + b .L2926 @long jump @ +.LCB18483: +.L3025: mov r5, r9 @ unit, unit - b .L2927 @ -.L2933: -@ Patches/../C_code.c:6296: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 15 + (i * 13), useRN); - movs r3, r6 @, ivtmp.1721 + b .L2930 @ +.L2936: +@ Patches/../C_code.c:6301: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 15 + (i * 13), useRN); + movs r3, r6 @, ivtmp.1726 movs r2, r7 @, _7 str r5, [sp] @ tmp290, ldr r0, [sp, #60] @, %sfp add r1, sp, #72 @ tmp595,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6296: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 15 + (i * 13), useRN); +@ Patches/../C_code.c:6301: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 15 + (i * 13), useRN); movs r3, #122 @ tmp447, lsls r0, r0, #24 @ tmp446, tmp506, asrs r0, r0, #24 @ _123, tmp446, strb r0, [r4, r3] @ _123, bu_159(D)->changeCon -@ Patches/../C_code.c:6298: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) - beq .L2934 @, -@ Patches/../C_code.c:6298: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) +@ Patches/../C_code.c:6303: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) + beq .L2937 @, +@ Patches/../C_code.c:6303: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) mov r2, r9 @ unit, unit subs r3, r3, #64 @ tmp449, ldrb r2, [r2, r3] @ tmp450, -@ Patches/../C_code.c:6298: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) +@ Patches/../C_code.c:6303: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) adds r2, r2, r0 @ tmp451, tmp450, _123 -@ Patches/../C_code.c:6298: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) +@ Patches/../C_code.c:6303: if (bu->changeCon && ((unit->_u3A + bu->changeCon) <= maxMag)) ldr r0, [sp, #68] @ maxMag, %sfp lsrs r3, r2, #31 @ tmp454, tmp451, asrs r1, r0, #31 @ tmp455, maxMag, cmp r0, r2 @ maxMag, tmp451 adcs r3, r3, r1 @ tmp453, tmp454, tmp455 -@ Patches/../C_code.c:6301: if (statGainTotal >= MinimumStatUps) +@ Patches/../C_code.c:6306: if (statGainTotal >= MinimumStatUps) lsls r3, r3, #24 @ tmp457, tmp453, - beq .L2934 @, + beq .L2937 @, mov r3, r8 @ statGainTotal, statGainTotal lsls r3, r3, #31 @ tmp509, statGainTotal, - bpl .L2934 @, + bpl .L2937 @, mov r5, r9 @ unit, unit - b .L2927 @ -.L3025: -@ Patches/../C_code.c:6197: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 8, useRN); + b .L2930 @ +.L3028: +@ Patches/../C_code.c:6202: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 8, useRN); movs r3, #8 @, movs r2, r7 @, _7 str r6, [sp] @ tmp290, ldr r0, [sp, #60] @, %sfp add r1, sp, #72 @ tmp545,, bl NewGetStatIncrease @ -@ Patches/../C_code.c:6197: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 8, useRN); +@ Patches/../C_code.c:6202: bu->changeCon = NewGetStatIncrease(magGrowth, noise, level, 8, useRN); movs r3, #122 @ tmp376, strb r0, [r4, r3] @ tmp498, bu_159(D)->changeCon - b .L2922 @ -.L3026: -@ Patches/../C_code.c:6288: if (statGainTotal >= MinimumStatUps) + b .L2925 @ +.L3029: +@ Patches/../C_code.c:6293: if (statGainTotal >= MinimumStatUps) mov r3, r8 @ statGainTotal, statGainTotal cmp r3, #1 @ statGainTotal, - beq .L3022 @, -@ Patches/../C_code.c:6287: statGainTotal++; + beq .L3025 @, +@ Patches/../C_code.c:6292: statGainTotal++; movs r3, #1 @ statGainTotal, mov r8, r3 @ statGainTotal, statGainTotal - b .L2932 @ + b .L2935 @ .size CheckBattleUnitLevelUp, .-CheckBattleUnitLevelUp .align 1 .p2align 2,,3 @@ -22282,34 +22313,34 @@ ApplyUnitPromotion: mov r6, r8 @, movs r5, r0 @ unit, tmp266 push {r6, r7, lr} @ -@ Patches/../C_code.c:6441: const struct ClassData * promotedClass = GetClassData(classId); +@ Patches/../C_code.c:6446: const struct ClassData * promotedClass = GetClassData(classId); movs r0, r1 @, classId - ldr r3, .L3048 @ tmp182, -@ Patches/../C_code.c:6440: { + ldr r3, .L3051 @ tmp182, +@ Patches/../C_code.c:6445: { movs r6, r1 @ classId, tmp267 -@ Patches/../C_code.c:6441: const struct ClassData * promotedClass = GetClassData(classId); +@ Patches/../C_code.c:6446: const struct ClassData * promotedClass = GetClassData(classId); bl .L14 @ -@ Patches/../C_code.c:6450: unit->maxHP += promotedClass->promotionHp; +@ Patches/../C_code.c:6455: unit->maxHP += promotedClass->promotionHp; movs r2, #34 @ tmp183, -@ Patches/../C_code.c:6443: int baseClassId = unit->pClassData->number; +@ Patches/../C_code.c:6448: int baseClassId = unit->pClassData->number; ldr r7, [r5, #4] @ _2, unit_68(D)->pClassData -@ Patches/../C_code.c:6443: int baseClassId = unit->pClassData->number; +@ Patches/../C_code.c:6448: int baseClassId = unit->pClassData->number; ldrb r3, [r7, #4] @ _3, mov r8, r3 @ _3, _3 -@ Patches/../C_code.c:6444: int promClassId = promotedClass->number; +@ Patches/../C_code.c:6449: int promClassId = promotedClass->number; ldrb r3, [r0, #4] @ _4, mov ip, r3 @ _4, _4 -@ Patches/../C_code.c:6450: unit->maxHP += promotedClass->promotionHp; +@ Patches/../C_code.c:6455: unit->maxHP += promotedClass->promotionHp; ldrb r3, [r0, r2] @ _7, mov r10, r3 @ _7, _7 movs r4, r0 @ tmp189, promotedClass -@ Patches/../C_code.c:6450: unit->maxHP += promotedClass->promotionHp; +@ Patches/../C_code.c:6455: unit->maxHP += promotedClass->promotionHp; ldrb r2, [r5, #18] @ tmp185, add r2, r2, r10 @ tmp186, _7 strb r2, [r5, #18] @ tmp186, unit_68(D)->maxHP adds r4, r4, #35 @ tmp189, ldrb r2, [r4, #1] @ MEM [(unsigned char *)promotedClass_67 + 35B], MEM [(unsigned char *)promotedClass_67 + 35B] -@ Patches/../C_code.c:6441: const struct ClassData * promotedClass = GetClassData(classId); +@ Patches/../C_code.c:6446: const struct ClassData * promotedClass = GetClassData(classId); movs r1, r0 @ promotedClass, tmp268 ldrb r0, [r4] @ MEM [(unsigned char *)promotedClass_67 + 35B], MEM [(unsigned char *)promotedClass_67 + 35B] lsls r2, r2, #8 @ tmp193, MEM [(unsigned char *)promotedClass_67 + 35B], @@ -22320,8 +22351,8 @@ ApplyUnitPromotion: ldrb r2, [r4, #3] @ MEM [(unsigned char *)promotedClass_67 + 35B], MEM [(unsigned char *)promotedClass_67 + 35B] lsls r2, r2, #24 @ tmp199, MEM [(unsigned char *)promotedClass_67 + 35B], orrs r2, r0 @ tmp200, tmp197 -@ Patches/../C_code.c:6451: unit->pow += promotedClass->promotionPow; - ldr r0, .L3048+4 @ tmp202, +@ Patches/../C_code.c:6456: unit->pow += promotedClass->promotionPow; + ldr r0, .L3051+4 @ tmp202, mov r9, r0 @ tmp202, tmp202 mov r4, r9 @ tmp202, tmp202 ldr r3, [r5, #20] @ _111, MEM [(signed char *)unit_68(D) + 20B] @@ -22329,115 +22360,115 @@ ApplyUnitPromotion: mov r9, r4 @ tmp203, tmp202 ands r0, r2 @ tmp201, tmp200 eors r2, r3 @ tmp206, _111 - ldr r3, .L3048+8 @ tmp208, + ldr r3, .L3051+8 @ tmp208, add r0, r0, r9 @ tmp205, tmp203 ands r2, r3 @ tmp207, tmp208 - eors r2, r0 @ vect__14.1740, tmp205 -@ Patches/../C_code.c:6455: unit->res += promotedClass->promotionRes; + eors r2, r0 @ vect__14.1745, tmp205 +@ Patches/../C_code.c:6460: unit->res += promotedClass->promotionRes; movs r0, #39 @ tmp210, -@ Patches/../C_code.c:6451: unit->pow += promotedClass->promotionPow; - str r2, [r5, #20] @ vect__14.1740, MEM [(signed char *)unit_68(D) + 20B] -@ Patches/../C_code.c:6455: unit->res += promotedClass->promotionRes; +@ Patches/../C_code.c:6456: unit->pow += promotedClass->promotionPow; + str r2, [r5, #20] @ vect__14.1745, MEM [(signed char *)unit_68(D) + 20B] +@ Patches/../C_code.c:6460: unit->res += promotedClass->promotionRes; ldrb r2, [r5, #24] @ tmp212, ldrb r0, [r1, r0] @ tmp214, adds r2, r2, r0 @ tmp215, tmp212, tmp214 strb r2, [r5, #24] @ tmp215, unit_68(D)->res -@ Patches/../C_code.c:6457: if (StrMagInstalled) - ldr r2, .L3048+12 @ tmp217, -@ Patches/../C_code.c:6457: if (StrMagInstalled) +@ Patches/../C_code.c:6462: if (StrMagInstalled) + ldr r2, .L3051+12 @ tmp217, +@ Patches/../C_code.c:6462: if (StrMagInstalled) ldr r2, [r2] @ StrMagInstalled, StrMagInstalled cmp r2, #0 @ StrMagInstalled, - beq .L3030 @, -@ Patches/../C_code.c:6459: unit->_u3A += GetPromoMag(classId); + beq .L3033 @, +@ Patches/../C_code.c:6464: unit->_u3A += GetPromoMag(classId); movs r0, #58 @ tmp219, -@ Patches/../C_code.c:3944: return MagClassTable[classId].promo; - ldr r2, .L3048+16 @ tmp220, +@ Patches/../C_code.c:3949: return MagClassTable[classId].promo; + ldr r2, .L3051+16 @ tmp220, lsls r4, r6, #2 @ tmp221, classId, adds r2, r2, r4 @ tmp222, tmp220, tmp221 -@ Patches/../C_code.c:6459: unit->_u3A += GetPromoMag(classId); +@ Patches/../C_code.c:6464: unit->_u3A += GetPromoMag(classId); ldrb r2, [r2, #3] @ tmp227, MagClassTable ldrb r4, [r5, r0] @ tmp225, adds r2, r4, r2 @ tmp228, tmp225, tmp227 strb r2, [r5, r0] @ tmp228, unit_68(D)->_u3A -.L3030: - movs r2, r5 @ ivtmp.1748, unit +.L3033: + movs r2, r5 @ ivtmp.1753, unit movs r0, r5 @ _129, unit - adds r2, r2, #40 @ ivtmp.1748, -@ Patches/../C_code.c:6440: { - movs r3, r2 @ ivtmp.1757, ivtmp.1748 - adds r7, r7, #44 @ ivtmp.1759, + adds r2, r2, #40 @ ivtmp.1753, +@ Patches/../C_code.c:6445: { + movs r3, r2 @ ivtmp.1762, ivtmp.1753 + adds r7, r7, #44 @ ivtmp.1764, adds r0, r0, #48 @ _129, -.L3031: -@ Patches/../C_code.c:6465: unit->ranks[i] -= unit->pClassData->baseRanks[i]; +.L3034: +@ Patches/../C_code.c:6470: unit->ranks[i] -= unit->pClassData->baseRanks[i]; ldrb r4, [r3] @ MEM[(unsigned char *)_105], MEM[(unsigned char *)_105] ldrb r6, [r7] @ MEM[(unsigned char *)_127], MEM[(unsigned char *)_127] subs r4, r4, r6 @ tmp235, MEM[(unsigned char *)_105], MEM[(unsigned char *)_127] strb r4, [r3] @ tmp235, MEM[(unsigned char *)_105] -@ Patches/../C_code.c:6464: for (i = 0; i < 8; ++i) - adds r3, r3, #1 @ ivtmp.1757, - adds r7, r7, #1 @ ivtmp.1759, - cmp r3, r0 @ ivtmp.1757, _129 - bne .L3031 @, -@ Patches/../C_code.c:6468: unit->pClassData = promotedClass; +@ Patches/../C_code.c:6469: for (i = 0; i < 8; ++i) + adds r3, r3, #1 @ ivtmp.1762, + adds r7, r7, #1 @ ivtmp.1764, + cmp r3, r0 @ ivtmp.1762, _129 + bne .L3034 @, +@ Patches/../C_code.c:6473: unit->pClassData = promotedClass; str r1, [r5, #4] @ promotedClass, unit_68(D)->pClassData - adds r1, r1, #44 @ ivtmp.1750, -.L3033: -@ Patches/../C_code.c:6473: int wexp = unit->ranks[i]; + adds r1, r1, #44 @ ivtmp.1755, +.L3036: +@ Patches/../C_code.c:6478: int wexp = unit->ranks[i]; ldrb r4, [r2] @ wexp, MEM[(unsigned char *)_125] -@ Patches/../C_code.c:6475: wexp += unit->pClassData->baseRanks[i]; +@ Patches/../C_code.c:6480: wexp += unit->pClassData->baseRanks[i]; ldrb r3, [r1] @ MEM[(unsigned char *)_74], MEM[(unsigned char *)_74] -@ Patches/../C_code.c:6475: wexp += unit->pClassData->baseRanks[i]; +@ Patches/../C_code.c:6480: wexp += unit->pClassData->baseRanks[i]; adds r3, r3, r4 @ wexp, MEM[(unsigned char *)_74], wexp -@ Patches/../C_code.c:6477: if (wexp > 251) // wexp s rank +@ Patches/../C_code.c:6482: if (wexp > 251) // wexp s rank cmp r3, #251 @ wexp, - ble .L3032 @, + ble .L3035 @, movs r3, #251 @ wexp, -.L3032: -@ Patches/../C_code.c:6480: unit->ranks[i] = wexp; +.L3035: +@ Patches/../C_code.c:6485: unit->ranks[i] = wexp; strb r3, [r2] @ wexp, MEM[(unsigned char *)_125] -@ Patches/../C_code.c:6471: for (i = 0; i < 8; ++i) - adds r2, r2, #1 @ ivtmp.1748, - adds r1, r1, #1 @ ivtmp.1750, - cmp r2, r0 @ ivtmp.1748, _129 - bne .L3033 @, -@ Patches/../C_code.c:6485: if (baseClassId == 0x3E && promClassId == 0x2D) +@ Patches/../C_code.c:6476: for (i = 0; i < 8; ++i) + adds r2, r2, #1 @ ivtmp.1753, + adds r1, r1, #1 @ ivtmp.1755, + cmp r2, r0 @ ivtmp.1753, _129 + bne .L3036 @, +@ Patches/../C_code.c:6490: if (baseClassId == 0x3E && promClassId == 0x2D) mov r3, r8 @ _3, _3 cmp r3, #62 @ _3, - bne .L3034 @, + bne .L3037 @, mov r3, ip @ _4, _4 cmp r3, #45 @ _4, - bne .L3034 @, -@ Patches/../C_code.c:6487: unit->ranks[5] = 0; + bne .L3037 @, +@ Patches/../C_code.c:6492: unit->ranks[5] = 0; movs r2, #0 @ tmp253, strb r2, [r5, r3] @ tmp253, unit_68(D)->ranks[5] -.L3034: -@ Patches/../C_code.c:6491: unit->level = 1; +.L3037: +@ Patches/../C_code.c:6496: unit->level = 1; movs r3, #1 @ tmp255, -@ Patches/../C_code.c:6496: if (unit->curHP > GetUnitMaxHp(unit)) +@ Patches/../C_code.c:6501: if (unit->curHP > GetUnitMaxHp(unit)) movs r6, #19 @ _54, -@ Patches/../C_code.c:6491: unit->level = 1; +@ Patches/../C_code.c:6496: unit->level = 1; strh r3, [r5, #8] @ tmp255, MEM [(void *)unit_68(D) + 8B] -@ Patches/../C_code.c:6494: unit->curHP += promotedClass->promotionHp; +@ Patches/../C_code.c:6499: unit->curHP += promotedClass->promotionHp; ldrb r3, [r5, #19] @ tmp258, add r3, r3, r10 @ tmp258, _7 -@ Patches/../C_code.c:6495: UnitCheckStatCaps(unit); +@ Patches/../C_code.c:6500: UnitCheckStatCaps(unit); movs r0, r5 @, unit -@ Patches/../C_code.c:6494: unit->curHP += promotedClass->promotionHp; +@ Patches/../C_code.c:6499: unit->curHP += promotedClass->promotionHp; strb r3, [r5, #19] @ tmp259, unit_68(D)->curHP -@ Patches/../C_code.c:6495: UnitCheckStatCaps(unit); +@ Patches/../C_code.c:6500: UnitCheckStatCaps(unit); bl UnitCheckStatCaps @ -@ Patches/../C_code.c:6496: if (unit->curHP > GetUnitMaxHp(unit)) +@ Patches/../C_code.c:6501: if (unit->curHP > GetUnitMaxHp(unit)) movs r0, r5 @, unit - ldr r4, .L3048+20 @ tmp261, -@ Patches/../C_code.c:6496: if (unit->curHP > GetUnitMaxHp(unit)) + ldr r4, .L3051+20 @ tmp261, +@ Patches/../C_code.c:6501: if (unit->curHP > GetUnitMaxHp(unit)) ldrsb r6, [r5, r6] @ _54,* _54 -@ Patches/../C_code.c:6496: if (unit->curHP > GetUnitMaxHp(unit)) - bl .L269 @ -@ Patches/../C_code.c:6496: if (unit->curHP > GetUnitMaxHp(unit)) +@ Patches/../C_code.c:6501: if (unit->curHP > GetUnitMaxHp(unit)) + bl .L272 @ +@ Patches/../C_code.c:6501: if (unit->curHP > GetUnitMaxHp(unit)) cmp r6, r0 @ _54, tmp269 - bgt .L3047 @, -.L3029: -@ Patches/../C_code.c:6498: } + bgt .L3050 @, +.L3032: +@ Patches/../C_code.c:6503: } @ sp needed @ pop {r5, r6, r7} mov r10, r7 @@ -22446,17 +22477,17 @@ ApplyUnitPromotion: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3047: -@ Patches/../C_code.c:6497: unit->curHP = GetUnitMaxHp(unit); +.L3050: +@ Patches/../C_code.c:6502: unit->curHP = GetUnitMaxHp(unit); movs r0, r5 @, unit - bl .L269 @ -@ Patches/../C_code.c:6497: unit->curHP = GetUnitMaxHp(unit); + bl .L272 @ +@ Patches/../C_code.c:6502: unit->curHP = GetUnitMaxHp(unit); strb r0, [r5, #19] @ tmp270, unit_68(D)->curHP -@ Patches/../C_code.c:6498: } - b .L3029 @ -.L3049: +@ Patches/../C_code.c:6503: } + b .L3032 @ +.L3052: .align 2 -.L3048: +.L3051: .word GetClassData .word 2139062143 .word -2139062144 @@ -22476,14 +22507,14 @@ ApplyUnitDefaultPromotion: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:6502: ApplyUnitPromotion(unit, unit->pClassData->promotion); +@ Patches/../C_code.c:6507: ApplyUnitPromotion(unit, unit->pClassData->promotion); ldr r3, [r0, #4] @ unit_4(D)->pClassData, unit_4(D)->pClassData -@ Patches/../C_code.c:6503: } +@ Patches/../C_code.c:6508: } @ sp needed @ -@ Patches/../C_code.c:6502: ApplyUnitPromotion(unit, unit->pClassData->promotion); +@ Patches/../C_code.c:6507: ApplyUnitPromotion(unit, unit->pClassData->promotion); ldrb r1, [r3, #5] @ tmp118, bl ApplyUnitPromotion @ -@ Patches/../C_code.c:6503: } +@ Patches/../C_code.c:6508: } pop {r4} pop {r0} bx r0 @@ -22500,29 +22531,29 @@ CallSetupBackgrounds: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:6515: SetupBackgrounds(0); - ldr r3, .L3052 @ tmp118, -@ Patches/../C_code.c:6531: } +@ Patches/../C_code.c:6520: SetupBackgrounds(0); + ldr r3, .L3055 @ tmp118, +@ Patches/../C_code.c:6536: } @ sp needed @ -@ Patches/../C_code.c:6515: SetupBackgrounds(0); +@ Patches/../C_code.c:6520: SetupBackgrounds(0); movs r0, #0 @, bl .L14 @ -@ Patches/../C_code.c:6521: gLCDControlBuffer.dispcnt.mode = 0; +@ Patches/../C_code.c:6526: gLCDControlBuffer.dispcnt.mode = 0; movs r2, #120 @ tmp126, - ldr r1, .L3052+4 @ tmp119, + ldr r1, .L3055+4 @ tmp119, ldrh r3, [r1] @ MEM[(struct DispCnt *)&gLCDControlBuffer], MEM[(struct DispCnt *)&gLCDControlBuffer] ands r2, r3 @ tmp125, MEM[(struct DispCnt *)&gLCDControlBuffer] movs r3, #128 @ tmp129, lsls r3, r3, #5 @ tmp129, tmp129, orrs r3, r2 @ tmp128, tmp125 strh r3, [r1] @ tmp128, MEM[(struct DispCnt *)&gLCDControlBuffer] -@ Patches/../C_code.c:6531: } +@ Patches/../C_code.c:6536: } pop {r4} pop {r0} bx r0 -.L3053: +.L3056: .align 2 -.L3052: +.L3055: .word SetupBackgrounds .word gLCDControlBuffer .size CallSetupBackgrounds, .-CallSetupBackgrounds @@ -22537,39 +22568,39 @@ CountBWLUnits: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:6905: const struct CharacterData * table = GetCharacterData(1); - ldr r3, .L3060 @ tmp118, +@ Patches/../C_code.c:6910: const struct CharacterData * table = GetCharacterData(1); + ldr r3, .L3063 @ tmp118, movs r0, #1 @, -@ Patches/../C_code.c:6904: { +@ Patches/../C_code.c:6909: { push {r4, lr} @ -@ Patches/../C_code.c:6905: const struct CharacterData * table = GetCharacterData(1); +@ Patches/../C_code.c:6910: const struct CharacterData * table = GetCharacterData(1); bl .L14 @ - ldr r2, .L3060+4 @ tmp126, + ldr r2, .L3063+4 @ tmp126, movs r3, r0 @ table, tmp124 adds r1, r0, r2 @ _13, table, tmp126 -@ Patches/../C_code.c:6906: int c = 0; +@ Patches/../C_code.c:6911: int c = 0; movs r0, #0 @ , -.L3056: -@ Patches/../C_code.c:6909: if (table->portraitId) +.L3059: +@ Patches/../C_code.c:6914: if (table->portraitId) ldrh r2, [r3, #6] @ MEM[(short unsigned int *)table_14 + 6B], MEM[(short unsigned int *)table_14 + 6B] -@ Patches/../C_code.c:6911: c++; +@ Patches/../C_code.c:6916: c++; subs r4, r2, #1 @ tmp123, MEM[(short unsigned int *)table_14 + 6B] sbcs r2, r2, r4 @ tmp122, MEM[(short unsigned int *)table_14 + 6B], tmp123 -@ Patches/../C_code.c:6913: table++; +@ Patches/../C_code.c:6918: table++; adds r3, r3, #52 @ table, -@ Patches/../C_code.c:6911: c++; +@ Patches/../C_code.c:6916: c++; adds r0, r0, r2 @ , , tmp122 -@ Patches/../C_code.c:6907: for (int i = 1; i <= 0x45; ++i) +@ Patches/../C_code.c:6912: for (int i = 1; i <= 0x45; ++i) cmp r1, r3 @ _13, table - bne .L3056 @, -@ Patches/../C_code.c:6916: } + bne .L3059 @, +@ Patches/../C_code.c:6921: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L3061: +.L3064: .align 2 -.L3060: +.L3063: .word GetCharacterData .word 3588 .size CountBWLUnits, .-CountBWLUnits @@ -22586,94 +22617,94 @@ InitReplaceTextListAntiHuffman: @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ mov lr, r8 @, -@ Patches/../C_code.c:6966: const struct CharacterData * table = GetCharacterData(1); - ldr r3, .L3068 @ tmp144, -@ Patches/../C_code.c:6965: { +@ Patches/../C_code.c:6971: const struct CharacterData * table = GetCharacterData(1); + ldr r3, .L3071 @ tmp144, +@ Patches/../C_code.c:6970: { mov r8, r0 @ list, tmp157 push {lr} @ -@ Patches/../C_code.c:6966: const struct CharacterData * table = GetCharacterData(1); +@ Patches/../C_code.c:6971: const struct CharacterData * table = GetCharacterData(1); movs r0, #1 @, bl .L14 @ -@ Patches/../C_code.c:6972: table--; +@ Patches/../C_code.c:6977: table--; movs r4, r0 @ table, table - ldr r3, .L3068+4 @ tmp162, -@ Patches/../C_code.c:6969: int c = 0; + ldr r3, .L3071+4 @ tmp162, +@ Patches/../C_code.c:6974: int c = 0; movs r5, #0 @ c, -@ Patches/../C_code.c:6986: value = (int)ggMsgStringTable[table->nameTextId]; - ldr r7, .L3068+8 @ tmp156, -@ Patches/../C_code.c:6972: table--; +@ Patches/../C_code.c:6991: value = (int)ggMsgStringTable[table->nameTextId]; + ldr r7, .L3071+8 @ tmp156, +@ Patches/../C_code.c:6977: table--; subs r4, r4, #52 @ table, adds r6, r0, r3 @ _15, table, tmp162 - b .L3065 @ -.L3067: -@ Patches/../C_code.c:6986: value = (int)ggMsgStringTable[table->nameTextId]; - ldr r0, [r7] @ ggMsgStringTable.240_3, ggMsgStringTable -@ Patches/../C_code.c:6987: value2 = (int)ggMsgStringTable[table2->nameTextId]; + b .L3068 @ +.L3070: +@ Patches/../C_code.c:6991: value = (int)ggMsgStringTable[table->nameTextId]; + ldr r0, [r7] @ ggMsgStringTable.241_3, ggMsgStringTable +@ Patches/../C_code.c:6992: value2 = (int)ggMsgStringTable[table2->nameTextId]; lsls r3, r3, #2 @ tmp146, _2, ldr r3, [r3, r0] @ _12, *_11 -@ Patches/../C_code.c:6989: if (!(value2 >> 31)) +@ Patches/../C_code.c:6994: if (!(value2 >> 31)) cmp r3, #0 @ _12, - bge .L3063 @, -@ Patches/../C_code.c:6986: value = (int)ggMsgStringTable[table->nameTextId]; + bge .L3066 @, +@ Patches/../C_code.c:6991: value = (int)ggMsgStringTable[table->nameTextId]; lsls r2, r2, #2 @ tmp148, _1, -@ Patches/../C_code.c:6993: list[c].find = (void *)(value & 0x7FFFFFFF); +@ Patches/../C_code.c:6998: list[c].find = (void *)(value & 0x7FFFFFFF); ldr r2, [r2, r0] @ *_7, *_7 -@ Patches/../C_code.c:6993: list[c].find = (void *)(value & 0x7FFFFFFF); +@ Patches/../C_code.c:6998: list[c].find = (void *)(value & 0x7FFFFFFF); lsls r1, r5, #3 @ tmp147, c, -@ Patches/../C_code.c:6993: list[c].find = (void *)(value & 0x7FFFFFFF); +@ Patches/../C_code.c:6998: list[c].find = (void *)(value & 0x7FFFFFFF); lsls r2, r2, #1 @ tmp151, *_7, -@ Patches/../C_code.c:6994: list[c].replace = (void *)(value2 & 0x7FFFFFFF); +@ Patches/../C_code.c:6999: list[c].replace = (void *)(value2 & 0x7FFFFFFF); lsls r3, r3, #1 @ tmp153, _12, -@ Patches/../C_code.c:6993: list[c].find = (void *)(value & 0x7FFFFFFF); +@ Patches/../C_code.c:6998: list[c].find = (void *)(value & 0x7FFFFFFF); add r1, r1, r8 @ _60, list -@ Patches/../C_code.c:6993: list[c].find = (void *)(value & 0x7FFFFFFF); +@ Patches/../C_code.c:6998: list[c].find = (void *)(value & 0x7FFFFFFF); lsrs r2, r2, #1 @ tmp149, tmp151, -@ Patches/../C_code.c:6994: list[c].replace = (void *)(value2 & 0x7FFFFFFF); +@ Patches/../C_code.c:6999: list[c].replace = (void *)(value2 & 0x7FFFFFFF); lsrs r3, r3, #1 @ tmp152, tmp153, -@ Patches/../C_code.c:6993: list[c].find = (void *)(value & 0x7FFFFFFF); +@ Patches/../C_code.c:6998: list[c].find = (void *)(value & 0x7FFFFFFF); str r2, [r1] @ tmp149, _60->find -@ Patches/../C_code.c:6994: list[c].replace = (void *)(value2 & 0x7FFFFFFF); +@ Patches/../C_code.c:6999: list[c].replace = (void *)(value2 & 0x7FFFFFFF); str r3, [r1, #4] @ tmp152, _60->replace -@ Patches/../C_code.c:6995: c++; +@ Patches/../C_code.c:7000: c++; adds r5, r5, #1 @ c, -.L3063: -@ Patches/../C_code.c:6973: for (int i = 0; i < MAX_CHAR_ID; ++i) +.L3066: +@ Patches/../C_code.c:6978: for (int i = 0; i < MAX_CHAR_ID; ++i) cmp r6, r4 @ _15, table - beq .L3064 @, -.L3065: -@ Patches/../C_code.c:6976: table++; + beq .L3067 @, +.L3068: +@ Patches/../C_code.c:6981: table++; adds r4, r4, #52 @ table, -@ Patches/../C_code.c:6977: table2 = GetReorderedCharacter(table); +@ Patches/../C_code.c:6982: table2 = GetReorderedCharacter(table); movs r0, r4 @, table bl GetReorderedCharacter @ -@ Patches/../C_code.c:6978: if (table->nameTextId == table2->nameTextId) +@ Patches/../C_code.c:6983: if (table->nameTextId == table2->nameTextId) ldrh r2, [r4] @ _1, MEM[(short unsigned int *)table_35] -@ Patches/../C_code.c:6978: if (table->nameTextId == table2->nameTextId) +@ Patches/../C_code.c:6983: if (table->nameTextId == table2->nameTextId) ldrh r3, [r0] @ _2, *table2_37 -@ Patches/../C_code.c:6978: if (table->nameTextId == table2->nameTextId) +@ Patches/../C_code.c:6983: if (table->nameTextId == table2->nameTextId) cmp r2, r3 @ _1, _2 - beq .L3063 @, -@ Patches/../C_code.c:6982: if (c >= ListSize) + beq .L3066 @, +@ Patches/../C_code.c:6987: if (c >= ListSize) cmp r5, #119 @ c, - ble .L3067 @, -.L3064: -@ Patches/../C_code.c:6998: list[c].find = NULL; + ble .L3070 @, +.L3067: +@ Patches/../C_code.c:7003: list[c].find = NULL; mov r2, r8 @ list, list -@ Patches/../C_code.c:7000: } +@ Patches/../C_code.c:7005: } @ sp needed @ -@ Patches/../C_code.c:6998: list[c].find = NULL; +@ Patches/../C_code.c:7003: list[c].find = NULL; movs r3, #0 @ tmp155, lsls r5, r5, #3 @ tmp154, c, str r3, [r5, r2] @ tmp155, _23->find -@ Patches/../C_code.c:7000: } +@ Patches/../C_code.c:7005: } pop {r7} mov r8, r7 pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3069: +.L3072: .align 2 -.L3068: +.L3071: .word GetCharacterData .word 13208 .word ggMsgStringTable @@ -22690,7 +22721,7 @@ PutStringInBuffer: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:7049: } +@ Patches/../C_code.c:7054: } @ sp needed @ bx lr .size PutStringInBuffer, .-PutStringInBuffer @@ -22706,30 +22737,30 @@ GetStringLength: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:7053: { +@ Patches/../C_code.c:7058: { movs r2, r0 @ str, tmp120 -@ Patches/../C_code.c:7054: for (int i = 0; i < 255; ++i) +@ Patches/../C_code.c:7059: for (int i = 0; i < 255; ++i) movs r0, #0 @ , - b .L3073 @ -.L3079: -@ Patches/../C_code.c:7054: for (int i = 0; i < 255; ++i) + b .L3076 @ +.L3082: +@ Patches/../C_code.c:7059: for (int i = 0; i < 255; ++i) adds r0, r0, #1 @ , -@ Patches/../C_code.c:7054: for (int i = 0; i < 255; ++i) +@ Patches/../C_code.c:7059: for (int i = 0; i < 255; ++i) cmp r0, #255 @ , - beq .L3078 @, -.L3073: -@ Patches/../C_code.c:7056: if (!str[i]) + beq .L3081 @, +.L3076: +@ Patches/../C_code.c:7061: if (!str[i]) ldrb r3, [r2, r0] @ MEM[(const char *)str_7(D) + _12 * 1], MEM[(const char *)str_7(D) + _12 * 1] cmp r3, #0 @ MEM[(const char *)str_7(D) + _12 * 1], - bne .L3079 @, -.L3071: -@ Patches/../C_code.c:7060: } + bne .L3082 @, +.L3074: +@ Patches/../C_code.c:7065: } @ sp needed @ bx lr -.L3078: -@ Patches/../C_code.c:7059: return 0; +.L3081: +@ Patches/../C_code.c:7064: return 0; movs r0, #0 @ , - b .L3071 @ + b .L3074 @ .size GetStringLength, .-GetStringLength .align 1 .p2align 2,,3 @@ -22743,34 +22774,34 @@ GetEndOfBuffer: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:7063: for (int i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7068: for (int i = 0; i < 0x1000; ++i) movs r1, #128 @ tmp121, -@ Patches/../C_code.c:7062: { +@ Patches/../C_code.c:7067: { movs r2, r0 @ buffer, tmp122 -@ Patches/../C_code.c:7063: for (int i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7068: for (int i = 0; i < 0x1000; ++i) lsls r1, r1, #5 @ tmp121, tmp121, -@ Patches/../C_code.c:7063: for (int i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7068: for (int i = 0; i < 0x1000; ++i) movs r0, #0 @ , - b .L3082 @ -.L3088: -@ Patches/../C_code.c:7063: for (int i = 0; i < 0x1000; ++i) + b .L3085 @ +.L3091: +@ Patches/../C_code.c:7068: for (int i = 0; i < 0x1000; ++i) adds r0, r0, #1 @ , -@ Patches/../C_code.c:7063: for (int i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7068: for (int i = 0; i < 0x1000; ++i) cmp r0, r1 @ , tmp121 - beq .L3087 @, -.L3082: -@ Patches/../C_code.c:7065: if (!buffer[i]) + beq .L3090 @, +.L3085: +@ Patches/../C_code.c:7070: if (!buffer[i]) ldrb r3, [r2, r0] @ MEM[(char *)buffer_7(D) + _12 * 1], MEM[(char *)buffer_7(D) + _12 * 1] cmp r3, #0 @ MEM[(char *)buffer_7(D) + _12 * 1], - bne .L3088 @, -.L3080: -@ Patches/../C_code.c:7071: } + bne .L3091 @, +.L3083: +@ Patches/../C_code.c:7076: } @ sp needed @ bx lr -.L3087: -@ Patches/../C_code.c:7070: return 0; +.L3090: +@ Patches/../C_code.c:7075: return 0; movs r0, #0 @ , - b .L3080 @ + b .L3083 @ .size GetEndOfBuffer, .-GetEndOfBuffer .align 1 .p2align 2,,3 @@ -22784,12 +22815,12 @@ ShiftDataInBuffer: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:7074: if (!amount) +@ Patches/../C_code.c:7079: if (!amount) cmp r1, #0 @ amount, - beq .L3089 @, + beq .L3092 @, bl ShiftDataInBuffer.part.0 @ -.L3089: -@ Patches/../C_code.c:7098: } +.L3092: +@ Patches/../C_code.c:7103: } @ sp needed @ pop {r4} pop {r0} @@ -22811,94 +22842,94 @@ ReplaceIfMatching: mov r8, r2 @ replace, tmp141 movs r2, r3 @ c, tmp142 push {lr} @ -@ Patches/../C_code.c:7103: char * buffer = &b[c]; +@ Patches/../C_code.c:7108: char * buffer = &b[c]; ldr r3, [sp, #24] @ tmp144, b -@ Patches/../C_code.c:7114: for (i = 0; i < 255; ++i) +@ Patches/../C_code.c:7119: for (i = 0; i < 255; ++i) movs r4, #0 @ i, -@ Patches/../C_code.c:7103: char * buffer = &b[c]; +@ Patches/../C_code.c:7108: char * buffer = &b[c]; adds r7, r3, r2 @ buffer, tmp144, c - b .L3097 @ -.L3120: -@ Patches/../C_code.c:7120: if (buffer[i] != find[i]) + b .L3100 @ +.L3123: +@ Patches/../C_code.c:7125: if (buffer[i] != find[i]) ldrb r6, [r7, r4] @ MEM[(char *)buffer_20 + _47 * 1], MEM[(char *)buffer_20 + _47 * 1] cmp r6, r5 @ MEM[(char *)buffer_20 + _47 * 1], _4 - bne .L3104 @, -@ Patches/../C_code.c:7114: for (i = 0; i < 255; ++i) + bne .L3107 @, +@ Patches/../C_code.c:7119: for (i = 0; i < 255; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:7114: for (i = 0; i < 255; ++i) +@ Patches/../C_code.c:7119: for (i = 0; i < 255; ++i) cmp r4, #255 @ i, - beq .L3095 @, -.L3097: -@ Patches/../C_code.c:7116: if (!find[i]) + beq .L3098 @, +.L3100: +@ Patches/../C_code.c:7121: if (!find[i]) ldrb r5, [r1, r4] @ _4, MEM[(const char *)find_21(D) + _47 * 1] -@ Patches/../C_code.c:7116: if (!find[i]) +@ Patches/../C_code.c:7121: if (!find[i]) cmp r5, #0 @ _4, - bne .L3120 @, -.L3095: -@ Patches/../C_code.c:7114: for (i = 0; i < 255; ++i) + bne .L3123 @, +.L3098: +@ Patches/../C_code.c:7119: for (i = 0; i < 255; ++i) movs r5, #0 @ i, - b .L3099 @ -.L3122: -@ Patches/../C_code.c:7054: for (int i = 0; i < 255; ++i) + b .L3102 @ +.L3125: +@ Patches/../C_code.c:7059: for (int i = 0; i < 255; ++i) adds r5, r5, #1 @ i, -@ Patches/../C_code.c:7054: for (int i = 0; i < 255; ++i) +@ Patches/../C_code.c:7059: for (int i = 0; i < 255; ++i) cmp r5, #255 @ i, - beq .L3121 @, -.L3099: -@ Patches/../C_code.c:7056: if (!str[i]) + beq .L3124 @, +.L3102: +@ Patches/../C_code.c:7061: if (!str[i]) mov r3, r8 @ replace, replace ldrb r1, [r3, r5] @ MEM[(const char *)replace_24(D) + _46 * 1], MEM[(const char *)replace_24(D) + _46 * 1] cmp r1, #0 @ MEM[(const char *)replace_24(D) + _46 * 1], - bne .L3122 @, -@ Patches/../C_code.c:7127: ShiftDataInBuffer(b, len2 - i, c, usedBufferLength); + bne .L3125 @, +@ Patches/../C_code.c:7132: ShiftDataInBuffer(b, len2 - i, c, usedBufferLength); subs r1, r5, r4 @ _8, i, i -@ Patches/../C_code.c:7074: if (!amount) +@ Patches/../C_code.c:7079: if (!amount) cmp r5, r4 @ i, i - beq .L3101 @, + beq .L3104 @, movs r3, r0 @, usedBufferLength ldr r0, [sp, #24] @, b bl ShiftDataInBuffer.part.0 @ -.L3101: -@ Patches/../C_code.c:7129: for (i = 0; i < len2; ++i) +.L3104: +@ Patches/../C_code.c:7134: for (i = 0; i < len2; ++i) movs r3, #0 @ i, cmp r5, #0 @ i, - beq .L3103 @, -.L3102: -@ Patches/../C_code.c:7131: buffer[i] = replace[i]; + beq .L3106 @, +.L3105: +@ Patches/../C_code.c:7136: buffer[i] = replace[i]; mov r2, r8 @ replace, replace ldrb r2, [r2, r3] @ _12, MEM[(const char *)replace_24(D) + _39 * 1] -@ Patches/../C_code.c:7131: buffer[i] = replace[i]; +@ Patches/../C_code.c:7136: buffer[i] = replace[i]; strb r2, [r7, r3] @ _12, MEM[(char *)buffer_20 + _39 * 1] -@ Patches/../C_code.c:7129: for (i = 0; i < len2; ++i) +@ Patches/../C_code.c:7134: for (i = 0; i < len2; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:7129: for (i = 0; i < len2; ++i) +@ Patches/../C_code.c:7134: for (i = 0; i < len2; ++i) cmp r3, r5 @ i, i - bne .L3102 @, -.L3103: -@ Patches/../C_code.c:7133: return true; + bne .L3105 @, +.L3106: +@ Patches/../C_code.c:7138: return true; movs r0, #1 @ , -.L3094: -@ Patches/../C_code.c:7134: } +.L3097: +@ Patches/../C_code.c:7139: } @ sp needed @ pop {r7} mov r8, r7 pop {r4, r5, r6, r7} pop {r1} bx r1 -.L3104: -@ Patches/../C_code.c:7122: return false; +.L3107: +@ Patches/../C_code.c:7127: return false; movs r0, #0 @ , - b .L3094 @ -.L3121: -@ Patches/../C_code.c:7074: if (!amount) + b .L3097 @ +.L3124: +@ Patches/../C_code.c:7079: if (!amount) cmp r4, #0 @ i, - beq .L3103 @, + beq .L3106 @, movs r3, r0 @, usedBufferLength -@ Patches/../C_code.c:7127: ShiftDataInBuffer(b, len2 - i, c, usedBufferLength); +@ Patches/../C_code.c:7132: ShiftDataInBuffer(b, len2 - i, c, usedBufferLength); rsbs r1, r4, #0 @ tmp138, i ldr r0, [sp, #24] @, b bl ShiftDataInBuffer.part.0 @ - b .L3103 @ + b .L3106 @ .size ReplaceIfMatching, .-ReplaceIfMatching .align 1 .p2align 2,,3 @@ -22912,63 +22943,63 @@ DecompText: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:7143: { +@ Patches/../C_code.c:7148: { movs r4, r1 @ b, tmp142 -@ Patches/../C_code.c:7145: if ((int)a & 0x80000000) +@ Patches/../C_code.c:7150: if ((int)a & 0x80000000) cmp r0, #0 @ a, - bge .L3124 @, -@ Patches/../C_code.c:7147: a = (const char *)((int)a & 0x7FFFFFFF); + bge .L3127 @, +@ Patches/../C_code.c:7152: a = (const char *)((int)a & 0x7FFFFFFF); lsls r0, r0, #1 @ tmp128, a, lsrs r2, r0, #1 @ _2, tmp128, -@ Patches/../C_code.c:7148: for (int i = 0; i < TextBufferSize; ++i) - ldr r1, .L3135 @ tmp140, -@ Patches/../C_code.c:7148: for (int i = 0; i < TextBufferSize; ++i) +@ Patches/../C_code.c:7153: for (int i = 0; i < TextBufferSize; ++i) + ldr r1, .L3138 @ tmp140, +@ Patches/../C_code.c:7153: for (int i = 0; i < TextBufferSize; ++i) movs r0, #0 @ , - b .L3126 @ -.L3134: -@ Patches/../C_code.c:7148: for (int i = 0; i < TextBufferSize; ++i) + b .L3129 @ +.L3137: +@ Patches/../C_code.c:7153: for (int i = 0; i < TextBufferSize; ++i) adds r0, r0, #1 @ , -@ Patches/../C_code.c:7148: for (int i = 0; i < TextBufferSize; ++i) +@ Patches/../C_code.c:7153: for (int i = 0; i < TextBufferSize; ++i) cmp r0, r1 @ , tmp140 - beq .L3133 @, -.L3126: -@ Patches/../C_code.c:7150: b[i] = a[i]; + beq .L3136 @, +.L3129: +@ Patches/../C_code.c:7155: b[i] = a[i]; ldrb r3, [r2, r0] @ _6, *_4 -@ Patches/../C_code.c:7150: b[i] = a[i]; +@ Patches/../C_code.c:7155: b[i] = a[i]; strb r3, [r4, r0] @ _6, MEM[(char *)b_18(D) + _32 * 1] -@ Patches/../C_code.c:7151: if (!a[i]) +@ Patches/../C_code.c:7156: if (!a[i]) cmp r3, #0 @ _6, - bne .L3134 @, -.L3128: -@ Patches/../C_code.c:7175: b[length] = 0; + bne .L3137 @, +.L3131: +@ Patches/../C_code.c:7180: b[length] = 0; movs r3, #0 @ tmp134, strb r3, [r4, r0] @ tmp134, *_8 -@ Patches/../C_code.c:7176: b[length + 1] = 0; +@ Patches/../C_code.c:7181: b[length + 1] = 0; adds r4, r4, r0 @ tmp136, b, strb r3, [r4, #1] @ tmp134, *_10 -.L3123: -@ Patches/../C_code.c:7179: } +.L3126: +@ Patches/../C_code.c:7184: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L3124: -@ Patches/../C_code.c:7161: length = Arm_DecompText(a, b, 0x3004150); - ldr r3, .L3135+4 @ tmp132, - ldr r2, .L3135+8 @, +.L3127: +@ Patches/../C_code.c:7166: length = Arm_DecompText(a, b, 0x3004150); + ldr r3, .L3138+4 @ tmp132, + ldr r2, .L3138+8 @, bl .L14 @ -@ Patches/../C_code.c:7173: if (length < 0xFFF) - ldr r3, .L3135+12 @ tmp133, +@ Patches/../C_code.c:7178: if (length < 0xFFF) + ldr r3, .L3138+12 @ tmp133, cmp r0, r3 @ , tmp133 - bgt .L3123 @, - b .L3128 @ -.L3133: -@ Patches/../C_code.c:7144: int length = 0; - movs r0, #0 @ , - b .L3128 @ + bgt .L3126 @, + b .L3131 @ .L3136: +@ Patches/../C_code.c:7149: int length = 0; + movs r0, #0 @ , + b .L3131 @ +.L3139: .align 2 -.L3135: +.L3138: .word 1365 .word Arm_DecompText .word 50348368 @@ -22985,49 +23016,49 @@ GetStringFromIndexInBufferWithoutReplacing: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:6923: sActiveMsg = index; - ldr r3, .L3141 @ tmp125, -@ Patches/../C_code.c:6922: { +@ Patches/../C_code.c:6928: sActiveMsg = index; + ldr r3, .L3144 @ tmp125, +@ Patches/../C_code.c:6927: { push {r4, lr} @ -@ Patches/../C_code.c:6923: sActiveMsg = index; +@ Patches/../C_code.c:6928: sActiveMsg = index; str r0, [r3] @ index, sActiveMsg -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); - ldr r3, .L3141+4 @ tmp127, +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); + ldr r3, .L3144+4 @ tmp127, ldr r3, [r3] @ ggMsgStringTable, ggMsgStringTable lsls r0, r0, #2 @ tmp128, index, ldr r0, [r0, r3] @ *_4, *_4 -@ Patches/../C_code.c:6922: { +@ Patches/../C_code.c:6927: { movs r4, r1 @ buffer, tmp134 -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); bl DecompText @ -@ Patches/../C_code.c:6925: buffer[size] = 0; +@ Patches/../C_code.c:6930: buffer[size] = 0; movs r3, #0 @ tmp130, strb r3, [r4, r0] @ tmp130, *_7 -@ Patches/../C_code.c:6926: if (size > 100) +@ Patches/../C_code.c:6931: if (size > 100) cmp r0, #100 @ size, - bgt .L3140 @, -@ Patches/../C_code.c:6930: if (size < 0) + bgt .L3143 @, +@ Patches/../C_code.c:6935: if (size < 0) cmp r0, #0 @ size, - blt .L3140 @, -.L3139: -@ Patches/../C_code.c:6936: } + blt .L3143 @, +.L3142: +@ Patches/../C_code.c:6941: } @ sp needed @ movs r0, r4 @, buffer pop {r4} pop {r1} bx r1 -.L3140: -@ Patches/../C_code.c:6932: asm("mov r11, r11"); +.L3143: +@ Patches/../C_code.c:6937: asm("mov r11, r11"); .syntax divided -@ 6932 "Patches/../C_code.c" 1 +@ 6937 "Patches/../C_code.c" 1 mov r11, r11 @ 0 "" 2 .thumb .syntax unified - b .L3139 @ -.L3142: + b .L3142 @ +.L3145: .align 2 -.L3141: +.L3144: .word sActiveMsg .word ggMsgStringTable .size GetStringFromIndexInBufferWithoutReplacing, .-GetStringFromIndexInBufferWithoutReplacing @@ -23048,258 +23079,258 @@ InitReplaceTextList: mov r6, r9 @, mov r5, r8 @, push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:7008: const struct CharacterData * table = GetCharacterData(1); - ldr r3, .L3187 @ tmp216, -@ Patches/../C_code.c:7005: { +@ Patches/../C_code.c:7013: const struct CharacterData * table = GetCharacterData(1); + ldr r3, .L3190 @ tmp216, +@ Patches/../C_code.c:7010: { sub sp, sp, #44 @,, -@ Patches/../C_code.c:7005: { +@ Patches/../C_code.c:7010: { movs r7, r0 @ list, tmp226 -@ Patches/../C_code.c:7008: const struct CharacterData * table = GetCharacterData(1); +@ Patches/../C_code.c:7013: const struct CharacterData * table = GetCharacterData(1); movs r0, #1 @, mov r10, r3 @ tmp216, tmp216 -@ Patches/../C_code.c:7005: { +@ Patches/../C_code.c:7010: { str r2, [sp, #20] @ tmp228, %sfp str r1, [sp, #16] @ tmp227, %sfp -@ Patches/../C_code.c:7008: const struct CharacterData * table = GetCharacterData(1); +@ Patches/../C_code.c:7013: const struct CharacterData * table = GetCharacterData(1); bl .L14 @ - movs r3, #0 @ ivtmp.1894, - str r3, [sp, #8] @ ivtmp.1894, %sfp - ldr r3, .L3187+4 @ tmp217, + movs r3, #0 @ ivtmp.1899, + str r3, [sp, #8] @ ivtmp.1899, %sfp + ldr r3, .L3190+4 @ tmp217, mov fp, r3 @ tmp217, tmp217 - ldr r3, .L3187+8 @ tmp218, + ldr r3, .L3190+8 @ tmp218, str r3, [sp, #28] @ tmp218, %sfp -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); ldr r3, [r3] @ ggMsgStringTable, ggMsgStringTable str r3, [sp, #24] @ ggMsgStringTable, %sfp -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) mov r3, fp @ tmp217, tmp217 movs r6, #128 @ tmp223, - ldr r2, .L3187+12 @ ivtmp.1873, -@ Patches/../C_code.c:7008: const struct CharacterData * table = GetCharacterData(1); + ldr r2, .L3190+12 @ ivtmp.1878, +@ Patches/../C_code.c:7013: const struct CharacterData * table = GetCharacterData(1); str r0, [sp, #4] @ tmp229, %sfp - str r2, [sp, #32] @ ivtmp.1873, %sfp -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + str r2, [sp, #32] @ ivtmp.1878, %sfp +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) str r7, [sp, #36] @ list, %sfp str r3, [sp, #12] @ tmp217, %sfp lsls r6, r6, #1 @ tmp223, tmp223, -.L3161: -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); - ldr r2, [sp, #8] @ ivtmp.1894, %sfp - mov ip, r2 @ ivtmp.1894, ivtmp.1894 -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); +.L3164: +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); + ldr r2, [sp, #8] @ ivtmp.1899, %sfp + mov ip, r2 @ ivtmp.1899, ivtmp.1899 +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); ldr r3, [sp, #4] @ table, %sfp -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); ldr r2, [sp, #12] @ tmp217, %sfp -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); ldrh r3, [r3] @ _3, MEM[(short unsigned int *)table_2] -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); ldr r5, [sp, #16] @ _8, %sfp str r3, [r2] @ _3, sActiveMsg -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); ldr r2, [sp, #24] @ ggMsgStringTable, %sfp -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); - add r5, r5, ip @ _8, ivtmp.1894 -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); + add r5, r5, ip @ _8, ivtmp.1899 +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); lsls r3, r3, #2 @ tmp178, _3, ldr r0, [r3, r2] @ *_59, *_59 movs r1, r5 @, _8 bl DecompText @ -@ Patches/../C_code.c:6925: buffer[size] = 0; +@ Patches/../C_code.c:6930: buffer[size] = 0; movs r3, #0 @ tmp180, strb r3, [r5, r0] @ tmp180, *_63 -@ Patches/../C_code.c:6926: if (size > 100) +@ Patches/../C_code.c:6931: if (size > 100) cmp r0, #100 @ size, - ble .LCB19173 @ - b .L3181 @long jump @ -.LCB19173: -@ Patches/../C_code.c:6930: if (size < 0) + ble .LCB19197 @ + b .L3184 @long jump @ +.LCB19197: +@ Patches/../C_code.c:6935: if (size < 0) cmp r0, #0 @ size, - bge .LCB19175 @ - b .L3181 @long jump @ -.LCB19175: -.L3145: -@ Patches/../C_code.c:7019: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( + bge .LCB19199 @ + b .L3184 @long jump @ +.LCB19199: +.L3148: +@ Patches/../C_code.c:7024: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( ldr r3, [sp, #4] @ table, %sfp -@ Patches/../C_code.c:7018: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); +@ Patches/../C_code.c:7023: list[i].find = GetStringFromIndexInBufferWithoutReplacing(table->nameTextId, &buffer[i][0]); str r5, [r7] @ _8, MEM[(const char * *)_38] -@ Patches/../C_code.c:7019: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( +@ Patches/../C_code.c:7024: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( ldrh r5, [r3, #6] @ _13, MEM[(short unsigned int *)table_2 + 6B] @ Patches/../C_code.c:200: if (!id) cmp r5, #0 @ _13, - beq .L3146 @, + beq .L3149 @, @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L3187+16 @ tmp183, + ldr r3, .L3190+16 @ tmp183, ldr r3, [r3] @ RecruitValues, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_64, *RecruitValues.0_64 lsls r3, r3, #29 @ tmp188, *RecruitValues.0_64, -@ Patches/../C_code.c:574: if (!ShouldRandomizeRecruitmentForPortraitID(portraitID)) - beq .L3146 @, +@ Patches/../C_code.c:579: if (!ShouldRandomizeRecruitmentForPortraitID(portraitID)) + beq .L3149 @, mov r9, r5 @ portraitID, _13 -@ Patches/../C_code.c:462: if (portraitID < 0x100) // vanilla closed eyes etc portraits to replace +@ Patches/../C_code.c:467: if (portraitID < 0x100) // vanilla closed eyes etc portraits to replace cmp r5, #255 @ _13, - bgt .L3148 @, -@ Patches/../C_code.c:464: if (ReplacePortraitTable[portraitID]) - ldr r3, .L3187+20 @ tmp191, + bgt .L3151 @, +@ Patches/../C_code.c:469: if (ReplacePortraitTable[portraitID]) + ldr r3, .L3190+20 @ tmp191, ldrb r3, [r3, r5] @ _74, ReplacePortraitTable -@ Patches/../C_code.c:464: if (ReplacePortraitTable[portraitID]) +@ Patches/../C_code.c:469: if (ReplacePortraitTable[portraitID]) cmp r3, #0 @ _74, - beq .L3148 @, -@ Patches/../C_code.c:466: portraitID = ReplacePortraitTable[portraitID]; + beq .L3151 @, +@ Patches/../C_code.c:471: portraitID = ReplacePortraitTable[portraitID]; mov r9, r3 @ portraitID, _74 -.L3148: -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +.L3151: +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) mov r8, r5 @ _13, _13 movs r4, #1 @ i, mov r5, r9 @ portraitID, portraitID - mov r9, r7 @ ivtmp.1890, ivtmp.1890 + mov r9, r7 @ ivtmp.1895, ivtmp.1895 mov r7, r10 @ tmp216, tmp216 - b .L3151 @ -.L3149: -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) + b .L3154 @ +.L3152: +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:473: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:478: for (int i = 1; i <= MAX_CHAR_ID; i++) cmp r4, r6 @ i, tmp223 - bne .LCB19212 @ - b .L3183 @long jump @ -.LCB19212: -.L3151: -@ Patches/../C_code.c:475: table = GetCharacterData(i); + bne .LCB19236 @ + b .L3186 @long jump @ +.LCB19236: +.L3154: +@ Patches/../C_code.c:480: table = GetCharacterData(i); movs r0, r4 @, i bl .L62 @ -@ Patches/../C_code.c:476: if (table->portraitId == portraitID) +@ Patches/../C_code.c:481: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp193, -@ Patches/../C_code.c:476: if (table->portraitId == portraitID) +@ Patches/../C_code.c:481: if (table->portraitId == portraitID) cmp r3, r5 @ tmp193, portraitID - bne .L3149 @, -@ Patches/../C_code.c:478: return table->number; + bne .L3152 @, +@ Patches/../C_code.c:483: return table->number; ldrb r0, [r0, #4] @ _83, mov r10, r7 @ tmp216, tmp216 mov r5, r8 @ _13, _13 - mov r7, r9 @ ivtmp.1890, ivtmp.1890 -@ Patches/../C_code.c:560: if (!result) + mov r7, r9 @ ivtmp.1895, ivtmp.1895 +@ Patches/../C_code.c:565: if (!result) cmp r0, #0 @ _83, - beq .L3146 @, -@ Patches/../C_code.c:564: return GetReorderedCharacter(GetCharacterData(result))->portraitId; - bl .L650 @ -@ Patches/../C_code.c:564: return GetReorderedCharacter(GetCharacterData(result))->portraitId; + beq .L3149 @, +@ Patches/../C_code.c:569: return GetReorderedCharacter(GetCharacterData(result))->portraitId; + bl .L653 @ +@ Patches/../C_code.c:569: return GetReorderedCharacter(GetCharacterData(result))->portraitId; bl GetReorderedCharacter @ -@ Patches/../C_code.c:564: return GetReorderedCharacter(GetCharacterData(result))->portraitId; +@ Patches/../C_code.c:569: return GetReorderedCharacter(GetCharacterData(result))->portraitId; ldrh r3, [r0, #6] @ _72, -@ Patches/../C_code.c:580: if (!result) +@ Patches/../C_code.c:585: if (!result) cmp r3, #0 @ _72, - bne .L3184 @, -.L3146: - ldr r3, [sp, #32] @ ivtmp.1873, %sfp - mov r9, r3 @ ivtmp.1873, ivtmp.1873 -@ Patches/../C_code.c:617: int bankID = 0; + bne .L3187 @, +.L3149: + ldr r3, [sp, #32] @ ivtmp.1878, %sfp + mov r9, r3 @ ivtmp.1878, ivtmp.1878 +@ Patches/../C_code.c:622: int bankID = 0; movs r3, #0 @ bankID, - mov fp, r7 @ ivtmp.1890, ivtmp.1890 + mov fp, r7 @ ivtmp.1895, ivtmp.1895 mov r8, r5 @ _13, _13 movs r7, r3 @ bankID, bankID -.L3152: +.L3155: movs r3, r7 @ bankID, bankID -@ Patches/../C_code.c:604: return result; - movs r5, #0 @ ivtmp.1867, +@ Patches/../C_code.c:609: return result; + movs r5, #0 @ ivtmp.1872, mov r7, r8 @ _13, _13 -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) movs r4, #1 @ i, mov r8, r3 @ bankID, bankID - b .L3158 @ -.L3153: -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) - mov r3, r9 @ ivtmp.1873, ivtmp.1873 + b .L3161 @ +.L3156: +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) + mov r3, r9 @ ivtmp.1878, ivtmp.1878 ldr r0, [r3] @ MEM[(const struct CharacterData * *)_31], MEM[(const struct CharacterData * *)_31] - adds r0, r0, r5 @ _88, MEM[(const struct CharacterData * *)_31], ivtmp.1867 -@ Patches/../C_code.c:453: if (!((cData[tableID] + (charId - 1))->number)) + adds r0, r0, r5 @ _88, MEM[(const struct CharacterData * *)_31], ivtmp.1872 +@ Patches/../C_code.c:458: if (!((cData[tableID] + (charId - 1))->number)) ldrb r3, [r0, #4] @ tmp199, cmp r3, #0 @ tmp199, - beq .L3155 @, -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) + beq .L3158 @, +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp200, -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) cmp r3, r7 @ tmp200, _13 - beq .L3185 @, -.L3156: -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) + beq .L3188 @, +.L3159: +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:620: for (int i = 1; i <= MAX_CHAR_ID; i++) - adds r5, r5, #52 @ ivtmp.1867, +@ Patches/../C_code.c:625: for (int i = 1; i <= MAX_CHAR_ID; i++) + adds r5, r5, #52 @ ivtmp.1872, cmp r4, r6 @ i, tmp223 - beq .L3186 @, -.L3158: -@ Patches/../C_code.c:426: if (!tableID) + beq .L3189 @, +.L3161: +@ Patches/../C_code.c:431: if (!tableID) mov r3, r8 @ bankID, bankID cmp r3, #0 @ bankID, - bne .L3153 @, -@ Patches/../C_code.c:431: return GetCharacterData(charId); + bne .L3156 @, +@ Patches/../C_code.c:436: return GetCharacterData(charId); movs r0, r4 @, i - bl .L650 @ -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) + bl .L653 @ +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) ldrh r3, [r0, #6] @ tmp200, -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) cmp r3, r7 @ tmp200, _13 - bne .L3156 @, -.L3185: -@ Patches/../C_code.c:625: return table->nameTextId; - mov r7, fp @ ivtmp.1890, ivtmp.1890 + bne .L3159 @, +.L3188: +@ Patches/../C_code.c:630: return table->nameTextId; + mov r7, fp @ ivtmp.1895, ivtmp.1895 ldrh r3, [r0] @ _52, *_88 -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); lsls r2, r3, #2 @ _136, _52, -.L3157: -@ Patches/../C_code.c:7019: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( - ldr r1, [sp, #8] @ ivtmp.1894, %sfp - mov ip, r1 @ ivtmp.1894, ivtmp.1894 -@ Patches/../C_code.c:6923: sActiveMsg = index; +.L3160: +@ Patches/../C_code.c:7024: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( + ldr r1, [sp, #8] @ ivtmp.1899, %sfp + mov ip, r1 @ ivtmp.1899, ivtmp.1899 +@ Patches/../C_code.c:6928: sActiveMsg = index; ldr r1, [sp, #12] @ tmp217, %sfp str r3, [r1] @ _52, sActiveMsg -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); ldr r3, [sp, #28] @ tmp218, %sfp -@ Patches/../C_code.c:7019: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( +@ Patches/../C_code.c:7024: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( ldr r5, [sp, #20] @ _16, %sfp -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); ldr r3, [r3] @ ggMsgStringTable, ggMsgStringTable -@ Patches/../C_code.c:7019: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( - add r5, r5, ip @ _16, ivtmp.1894 -@ Patches/../C_code.c:6924: int size = DecompText((void *)ggMsgStringTable[index], buffer); +@ Patches/../C_code.c:7024: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( + add r5, r5, ip @ _16, ivtmp.1899 +@ Patches/../C_code.c:6929: int size = DecompText((void *)ggMsgStringTable[index], buffer); ldr r0, [r3, r2] @ *_39, *_39 movs r1, r5 @, _16 bl DecompText @ -@ Patches/../C_code.c:6925: buffer[size] = 0; +@ Patches/../C_code.c:6930: buffer[size] = 0; movs r3, #0 @ tmp206, strb r3, [r5, r0] @ tmp206, *_43 -@ Patches/../C_code.c:6926: if (size > 100) +@ Patches/../C_code.c:6931: if (size > 100) cmp r0, #100 @ size, - bgt .L3182 @, -@ Patches/../C_code.c:6930: if (size < 0) + bgt .L3185 @, +@ Patches/../C_code.c:6935: if (size < 0) cmp r0, #0 @ size, - blt .L3182 @, -.L3160: -@ Patches/../C_code.c:7021: table++; + blt .L3185 @, +.L3163: +@ Patches/../C_code.c:7026: table++; ldr r3, [sp, #4] @ table, %sfp adds r3, r3, #52 @ table, str r3, [sp, #4] @ table, %sfp -@ Patches/../C_code.c:7014: if (i >= ListSize) - ldr r3, [sp, #8] @ ivtmp.1894, %sfp - adds r3, r3, #14 @ ivtmp.1894, - movs r2, r3 @ ivtmp.1894, ivtmp.1894 - str r3, [sp, #8] @ ivtmp.1894, %sfp +@ Patches/../C_code.c:7019: if (i >= ListSize) + ldr r3, [sp, #8] @ ivtmp.1899, %sfp + adds r3, r3, #14 @ ivtmp.1899, + movs r2, r3 @ ivtmp.1899, ivtmp.1899 + str r3, [sp, #8] @ ivtmp.1899, %sfp movs r3, #210 @ tmp208, -@ Patches/../C_code.c:7019: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( +@ Patches/../C_code.c:7024: list[i].replace = GetStringFromIndexInBufferWithoutReplacing( str r5, [r7, #4] @ _16, MEM[(const char * *)_38 + 4B] -@ Patches/../C_code.c:7014: if (i >= ListSize) +@ Patches/../C_code.c:7019: if (i >= ListSize) lsls r3, r3, #3 @ tmp208, tmp208, - adds r7, r7, #8 @ ivtmp.1890, - cmp r2, r3 @ ivtmp.1894, tmp208 - beq .LCB19309 @ - b .L3161 @long jump @ -.LCB19309: -@ Patches/../C_code.c:7023: list[ListSize].find = NULL; + adds r7, r7, #8 @ ivtmp.1895, + cmp r2, r3 @ ivtmp.1899, tmp208 + beq .LCB19333 @ + b .L3164 @long jump @ +.LCB19333: +@ Patches/../C_code.c:7028: list[ListSize].find = NULL; movs r3, #240 @ tmp209, movs r2, #0 @ tmp210, ldr r7, [sp, #36] @ list, %sfp lsls r3, r3, #2 @ tmp209, tmp209, str r2, [r7, r3] @ tmp210, MEM[(struct ReplaceTextStruct *)list_26(D) + 960B].find -@ Patches/../C_code.c:7025: } +@ Patches/../C_code.c:7030: } add sp, sp, #44 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -23310,58 +23341,58 @@ InitReplaceTextList: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3182: -@ Patches/../C_code.c:6932: asm("mov r11, r11"); +.L3185: +@ Patches/../C_code.c:6937: asm("mov r11, r11"); .syntax divided -@ 6932 "Patches/../C_code.c" 1 +@ 6937 "Patches/../C_code.c" 1 mov r11, r11 @ 0 "" 2 .thumb .syntax unified - b .L3160 @ -.L3181: + b .L3163 @ +.L3184: .syntax divided -@ 6932 "Patches/../C_code.c" 1 +@ 6937 "Patches/../C_code.c" 1 mov r11, r11 @ 0 "" 2 .thumb .syntax unified - b .L3145 @ -.L3186: -@ Patches/../C_code.c:629: bankID++; + b .L3148 @ +.L3189: +@ Patches/../C_code.c:634: bankID++; mov r3, r8 @ bankID, bankID mov r8, r7 @ _13, _13 movs r7, r3 @ bankID, bankID -@ Patches/../C_code.c:618: while (bankID < NumberOfCharTables) +@ Patches/../C_code.c:623: while (bankID < NumberOfCharTables) movs r3, #4 @ tmp289, mov ip, r3 @ tmp289, tmp289 -@ Patches/../C_code.c:629: bankID++; +@ Patches/../C_code.c:634: bankID++; adds r7, r7, #1 @ bankID, -@ Patches/../C_code.c:618: while (bankID < NumberOfCharTables) - add r9, r9, ip @ ivtmp.1873, tmp289 +@ Patches/../C_code.c:623: while (bankID < NumberOfCharTables) + add r9, r9, ip @ ivtmp.1878, tmp289 cmp r7, #12 @ bankID, - bne .L3152 @, - mov r7, fp @ ivtmp.1890, ivtmp.1890 + bne .L3155 @, + mov r7, fp @ ivtmp.1895, ivtmp.1895 movs r2, #4 @ _136, -@ Patches/../C_code.c:632: return 1; // "Yes" +@ Patches/../C_code.c:637: return 1; // "Yes" movs r3, #1 @ _52, - b .L3157 @ -.L3184: -@ Patches/../C_code.c:604: return result; + b .L3160 @ +.L3187: +@ Patches/../C_code.c:609: return result; movs r5, r3 @ _13, _72 - b .L3146 @ -.L3183: + b .L3149 @ +.L3186: mov r10, r7 @ tmp216, tmp216 mov r5, r8 @ _13, _13 - mov r7, r9 @ ivtmp.1890, ivtmp.1890 - b .L3146 @ -.L3155: -@ Patches/../C_code.c:623: if (table->portraitId == portraitID) + mov r7, r9 @ ivtmp.1895, ivtmp.1895 + b .L3149 @ +.L3158: +@ Patches/../C_code.c:628: if (table->portraitId == portraitID) ldrh r3, [r3, #6] @ tmp214, .inst 0xdeff -.L3188: +.L3191: .align 2 -.L3187: +.L3190: .word GetCharacterData .word sActiveMsg .word ggMsgStringTable @@ -23383,72 +23414,72 @@ CallARM_DecompText: push {r4, r5, r6, r7, lr} @ mov lr, r8 @, push {lr} @ - ldr r4, .L3209 @, + ldr r4, .L3212 @, add sp, sp, r4 @, -@ Patches/../C_code.c:7195: { +@ Patches/../C_code.c:7200: { movs r5, r1 @ b, tmp167 -@ Patches/../C_code.c:7198: length[0] = DecompText(a, b); +@ Patches/../C_code.c:7203: length[0] = DecompText(a, b); bl DecompText @ @ Patches/../C_code.c:187: return RecruitValues->recruitment; - ldr r3, .L3209+4 @ tmp134, + ldr r3, .L3212+4 @ tmp134, ldr r3, [r3] @ RecruitValues.0_26, RecruitValues ldrb r3, [r3] @ *RecruitValues.0_26, *RecruitValues.0_26 -@ Patches/../C_code.c:7198: length[0] = DecompText(a, b); +@ Patches/../C_code.c:7203: length[0] = DecompText(a, b); str r0, [sp, #12] @ tmp168, length[0] @ Patches/../C_code.c:187: return RecruitValues->recruitment; lsls r2, r3, #29 @ tmp139, *RecruitValues.0_26, -@ Patches/../C_code.c:7199: if (!ShouldRandomizeRecruitment()) - beq .L3189 @, -@ Patches/../C_code.c:7203: if (RecruitValues->pauseNameReplace) +@ Patches/../C_code.c:7204: if (!ShouldRandomizeRecruitment()) + beq .L3192 @, +@ Patches/../C_code.c:7208: if (RecruitValues->pauseNameReplace) lsls r3, r3, #28 @ tmp170, *RecruitValues.0_26, - bmi .L3189 @, -@ Patches/../C_code.c:7207: if (TextIDExceptionTable[sActiveMsg]) - ldr r2, .L3209+8 @ tmp153, - ldr r3, .L3209+12 @ tmp151, + bmi .L3192 @, +@ Patches/../C_code.c:7212: if (TextIDExceptionTable[sActiveMsg]) + ldr r2, .L3212+8 @ tmp153, + ldr r3, .L3212+12 @ tmp151, ldr r2, [r2] @ sActiveMsg, sActiveMsg -@ Patches/../C_code.c:7207: if (TextIDExceptionTable[sActiveMsg]) +@ Patches/../C_code.c:7212: if (TextIDExceptionTable[sActiveMsg]) ldrb r3, [r3, r2] @ tmp154, TextIDExceptionTable cmp r3, #0 @ tmp154, - bne .L3189 @, -@ Patches/../C_code.c:7213: InitReplaceTextListAntiHuffman(ReplaceTextList); + bne .L3192 @, +@ Patches/../C_code.c:7218: InitReplaceTextListAntiHuffman(ReplaceTextList); add r0, sp, #16 @ tmp173,, bl InitReplaceTextListAntiHuffman @ add r3, sp, #976 @ _48,, - movs r7, r5 @ ivtmp.1921, b -@ Patches/../C_code.c:7227: for (int i = 0; i < TextBufferSize; ++i) + movs r7, r5 @ ivtmp.1926, b +@ Patches/../C_code.c:7232: for (int i = 0; i < TextBufferSize; ++i) movs r6, #0 @ i, mov r8, r3 @ _48, _48 -.L3193: -@ Patches/../C_code.c:7229: if (!b[i]) +.L3196: +@ Patches/../C_code.c:7234: if (!b[i]) ldrb r3, [r7] @ MEM[(char *)_54], MEM[(char *)_54] cmp r3, #0 @ MEM[(char *)_54], - beq .L3189 @, + beq .L3192 @, add r4, sp, #16 @ tmp175,, -.L3192: -@ Patches/../C_code.c:7239: if (!ReplaceTextList[c].find) +.L3195: +@ Patches/../C_code.c:7244: if (!ReplaceTextList[c].find) ldr r1, [r4] @ _10, MEM[(const char * *)_49] -@ Patches/../C_code.c:7239: if (!ReplaceTextList[c].find) +@ Patches/../C_code.c:7244: if (!ReplaceTextList[c].find) cmp r1, #0 @ _10, - beq .L3191 @, -@ Patches/../C_code.c:7243: if (ReplaceIfMatching(length, ReplaceTextList[c].find, ReplaceTextList[c].replace, i, b)) + beq .L3194 @, +@ Patches/../C_code.c:7248: if (ReplaceIfMatching(length, ReplaceTextList[c].find, ReplaceTextList[c].replace, i, b)) ldr r2, [r4, #4] @ MEM[(const char * *)_49 + 4B], MEM[(const char * *)_49 + 4B] movs r3, r6 @, i str r5, [sp] @ b, add r0, sp, #12 @ tmp176,, bl ReplaceIfMatching @ -@ Patches/../C_code.c:7243: if (ReplaceIfMatching(length, ReplaceTextList[c].find, ReplaceTextList[c].replace, i, b)) +@ Patches/../C_code.c:7248: if (ReplaceIfMatching(length, ReplaceTextList[c].find, ReplaceTextList[c].replace, i, b)) cmp r0, #0 @ tmp169, - bne .L3191 @, -@ Patches/../C_code.c:7233: for (int c = 0; c < ListSize; ++c) - adds r4, r4, #8 @ ivtmp.1910, - cmp r4, r8 @ ivtmp.1910, _48 - beq .L3191 @, -@ Patches/../C_code.c:7235: if (!b[i]) + bne .L3194 @, +@ Patches/../C_code.c:7238: for (int c = 0; c < ListSize; ++c) + adds r4, r4, #8 @ ivtmp.1915, + cmp r4, r8 @ ivtmp.1915, _48 + beq .L3194 @, +@ Patches/../C_code.c:7240: if (!b[i]) ldrb r3, [r7] @ MEM[(char *)_54], MEM[(char *)_54] cmp r3, #0 @ MEM[(char *)_54], - bne .L3192 @, -.L3189: -@ Patches/../C_code.c:7249: } + bne .L3195 @, +.L3192: +@ Patches/../C_code.c:7254: } movs r3, #246 @, lsls r3, r3, #2 @,, add sp, sp, r3 @, @@ -23458,19 +23489,19 @@ CallARM_DecompText: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3191: -@ Patches/../C_code.c:7227: for (int i = 0; i < TextBufferSize; ++i) - ldr r3, .L3209+16 @ tmp160, -@ Patches/../C_code.c:7227: for (int i = 0; i < TextBufferSize; ++i) +.L3194: +@ Patches/../C_code.c:7232: for (int i = 0; i < TextBufferSize; ++i) + ldr r3, .L3212+16 @ tmp160, +@ Patches/../C_code.c:7232: for (int i = 0; i < TextBufferSize; ++i) adds r6, r6, #1 @ i, -@ Patches/../C_code.c:7227: for (int i = 0; i < TextBufferSize; ++i) - adds r7, r7, #1 @ ivtmp.1921, +@ Patches/../C_code.c:7232: for (int i = 0; i < TextBufferSize; ++i) + adds r7, r7, #1 @ ivtmp.1926, cmp r6, r3 @ i, tmp160 - bne .L3193 @, - b .L3189 @ -.L3210: + bne .L3196 @, + b .L3192 @ +.L3213: .align 2 -.L3209: +.L3212: .word -984 .word RecruitValues .word sActiveMsg @@ -23488,34 +23519,34 @@ GetStringFromIndex: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r3, .L3212 @ tmp121, -@ Patches/../C_code.c:7182: { +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r3, .L3215 @ tmp121, +@ Patches/../C_code.c:7187: { push {r4, lr} @ -@ Patches/../C_code.c:7185: sActiveMsg = index; +@ Patches/../C_code.c:7190: sActiveMsg = index; str r0, [r3] @ index, sActiveMsg -@ Patches/../C_code.c:7191: } +@ Patches/../C_code.c:7196: } @ sp needed @ -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r3, .L3212+4 @ tmp124, - ldr r4, .L3212+8 @ tmp122, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r3, .L3215+4 @ tmp124, + ldr r4, .L3215+8 @ tmp122, ldr r2, [r3] @ ggMsgStringTable, ggMsgStringTable lsls r0, r0, #2 @ tmp125, index, ldr r0, [r0, r2] @ *_4, *_4 movs r1, r4 @, tmp122 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); movs r0, r4 @, tmp122 - ldr r3, .L3212+12 @ tmp128, + ldr r3, .L3215+12 @ tmp128, bl .L14 @ -@ Patches/../C_code.c:7191: } +@ Patches/../C_code.c:7196: } movs r0, r4 @, tmp122 pop {r4} pop {r1} bx r1 -.L3213: +.L3216: .align 2 -.L3212: +.L3215: .word sActiveMsg .word ggMsgStringTable .word sMsgString @@ -23533,29 +23564,29 @@ IsSkill: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:7259: if (skillId == 255) +@ Patches/../C_code.c:7264: if (skillId == 255) cmp r0, #255 @ skillId, - beq .L3216 @, + beq .L3219 @, cmp r0, #0 @ skillId, - beq .L3216 @, -@ Patches/../C_code.c:7262: return !!SkillDescTable[skillId]; - ldr r3, .L3217 @ tmp132, + beq .L3219 @, +@ Patches/../C_code.c:7267: return !!SkillDescTable[skillId]; + ldr r3, .L3220 @ tmp132, lsls r0, r0, #1 @ tmp133, skillId, -@ Patches/../C_code.c:7262: return !!SkillDescTable[skillId]; +@ Patches/../C_code.c:7267: return !!SkillDescTable[skillId]; ldrh r0, [r0, r3] @ tmp135, SkillDescTable subs r3, r0, #1 @ tmp137, tmp135 sbcs r0, r0, r3 @ , tmp135, tmp137 -.L3214: -@ Patches/../C_code.c:7263: } +.L3217: +@ Patches/../C_code.c:7268: } @ sp needed @ bx lr -.L3216: -@ Patches/../C_code.c:7257: return FALSE; +.L3219: +@ Patches/../C_code.c:7262: return FALSE; movs r0, #0 @ , - b .L3214 @ -.L3218: + b .L3217 @ +.L3221: .align 2 -.L3217: +.L3220: .word SkillDescTable .size IsSkill, .-IsSkill .align 1 @@ -23569,60 +23600,60 @@ GetSkillName: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:7266: char * desc = GetStringFromIndex(SkillDescTable[skillId]); - ldr r3, .L3227 @ tmp125, +@ Patches/../C_code.c:7271: char * desc = GetStringFromIndex(SkillDescTable[skillId]); + ldr r3, .L3230 @ tmp125, lsls r0, r0, #1 @ tmp126, tmp140, ldrh r3, [r0, r3] @ _1, SkillDescTable -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r2, .L3227+4 @ tmp127, -@ Patches/../C_code.c:7265: { +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r2, .L3230+4 @ tmp127, +@ Patches/../C_code.c:7270: { push {r4, lr} @ -@ Patches/../C_code.c:7266: char * desc = GetStringFromIndex(SkillDescTable[skillId]); +@ Patches/../C_code.c:7271: char * desc = GetStringFromIndex(SkillDescTable[skillId]); str r3, [r2] @ _1, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r2, .L3227+8 @ tmp130, - ldr r4, .L3227+12 @ , +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r2, .L3230+8 @ tmp130, + ldr r4, .L3230+12 @ , ldr r2, [r2] @ ggMsgStringTable, ggMsgStringTable lsls r3, r3, #2 @ tmp131, _1, ldr r0, [r3, r2] @ *_16, *_16 movs r1, r4 @, bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); - ldr r3, .L3227+16 @ tmp134, +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); + ldr r3, .L3230+16 @ tmp134, movs r0, r4 @, bl .L14 @ -@ Patches/../C_code.c:7268: for (char * it = desc; *it; ++it) +@ Patches/../C_code.c:7273: for (char * it = desc; *it; ++it) ldrb r3, [r4] @ _3, MEM[(char *)&sMsgString] cmp r3, #0 @ _3, - beq .L3220 @, -@ Patches/../C_code.c:7268: for (char * it = desc; *it; ++it) + beq .L3223 @, +@ Patches/../C_code.c:7273: for (char * it = desc; *it; ++it) movs r2, r4 @ it, - b .L3222 @ -.L3221: -@ Patches/../C_code.c:7268: for (char * it = desc; *it; ++it) + b .L3225 @ +.L3224: +@ Patches/../C_code.c:7273: for (char * it = desc; *it; ++it) ldrb r3, [r2, #1] @ _3, MEM[(char *)it_11] -@ Patches/../C_code.c:7268: for (char * it = desc; *it; ++it) +@ Patches/../C_code.c:7273: for (char * it = desc; *it; ++it) adds r2, r2, #1 @ it, -@ Patches/../C_code.c:7268: for (char * it = desc; *it; ++it) +@ Patches/../C_code.c:7273: for (char * it = desc; *it; ++it) cmp r3, #0 @ _3, - beq .L3220 @, -.L3222: -@ Patches/../C_code.c:7270: if (*it == ':') + beq .L3223 @, +.L3225: +@ Patches/../C_code.c:7275: if (*it == ':') cmp r3, #58 @ _3, - bne .L3221 @, -@ Patches/../C_code.c:7272: *it = 0; + bne .L3224 @, +@ Patches/../C_code.c:7277: *it = 0; movs r3, #0 @ tmp136, strb r3, [r2] @ tmp136, *it_9 -.L3220: -@ Patches/../C_code.c:7278: } +.L3223: +@ Patches/../C_code.c:7283: } @ sp needed @ movs r0, r4 @, pop {r4} pop {r1} bx r1 -.L3228: +.L3231: .align 2 -.L3227: +.L3230: .word SkillDescTable .word sActiveMsg .word ggMsgStringTable @@ -23641,73 +23672,73 @@ GetCombinedString: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:7283: for (i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7288: for (i = 0; i < 0x1000; ++i) movs r7, #128 @ tmp141, -@ Patches/../C_code.c:7281: { +@ Patches/../C_code.c:7286: { movs r5, r0 @ a, tmp142 -@ Patches/../C_code.c:7283: for (i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7288: for (i = 0; i < 0x1000; ++i) movs r3, #0 @ i, -@ Patches/../C_code.c:7281: { +@ Patches/../C_code.c:7286: { movs r0, r2 @ c, tmp144 -@ Patches/../C_code.c:7283: for (i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7288: for (i = 0; i < 0x1000; ++i) lsls r7, r7, #5 @ tmp141, tmp141, -@ Patches/../C_code.c:7289: c[i] = a[i]; +@ Patches/../C_code.c:7294: c[i] = a[i]; subs r2, r2, #1 @ tmp140, - b .L3231 @ -.L3243: + b .L3234 @ +.L3246: strb r4, [r2, r3] @ _3, MEM[(char *)_25 + _6 * 1] -@ Patches/../C_code.c:7283: for (i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7288: for (i = 0; i < 0x1000; ++i) cmp r3, r7 @ i, tmp141 - beq .L3242 @, -.L3231: -@ Patches/../C_code.c:7285: if (!a[i]) + beq .L3245 @, +.L3234: +@ Patches/../C_code.c:7290: if (!a[i]) ldrb r4, [r5, r3] @ _3, MEM[(const char *)a_20(D) + _23 * 1] movs r6, r3 @ _23, i -@ Patches/../C_code.c:7283: for (i = 0; i < 0x1000; ++i) +@ Patches/../C_code.c:7288: for (i = 0; i < 0x1000; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:7285: if (!a[i]) +@ Patches/../C_code.c:7290: if (!a[i]) cmp r4, #0 @ _3, - bne .L3243 @, -.L3230: -@ Patches/../C_code.c:7291: c[i] = *" "; + bne .L3246 @, +.L3233: +@ Patches/../C_code.c:7296: c[i] = *" "; movs r2, #32 @ tmp132, strb r2, [r0, r6] @ tmp132, *_7 -@ Patches/../C_code.c:7294: for (int d = 0; d < 0x1000; ++d) +@ Patches/../C_code.c:7299: for (int d = 0; d < 0x1000; ++d) movs r6, #128 @ tmp139, -@ Patches/../C_code.c:7294: for (int d = 0; d < 0x1000; ++d) +@ Patches/../C_code.c:7299: for (int d = 0; d < 0x1000; ++d) movs r4, #0 @ d, adds r3, r0, r3 @ tmp138, c, i -@ Patches/../C_code.c:7294: for (int d = 0; d < 0x1000; ++d) +@ Patches/../C_code.c:7299: for (int d = 0; d < 0x1000; ++d) lsls r6, r6, #5 @ tmp139, tmp139, - b .L3233 @ -.L3244: -@ Patches/../C_code.c:7294: for (int d = 0; d < 0x1000; ++d) + b .L3236 @ +.L3247: +@ Patches/../C_code.c:7299: for (int d = 0; d < 0x1000; ++d) adds r4, r4, #1 @ d, -@ Patches/../C_code.c:7294: for (int d = 0; d < 0x1000; ++d) +@ Patches/../C_code.c:7299: for (int d = 0; d < 0x1000; ++d) cmp r4, r6 @ d, tmp139 - beq .L3232 @, -.L3233: -@ Patches/../C_code.c:7296: c[i + d] = b[d]; + beq .L3235 @, +.L3236: +@ Patches/../C_code.c:7301: c[i + d] = b[d]; ldrb r5, [r1, r4] @ _13, MEM[(char *)b_26(D) + _14 * 1] -@ Patches/../C_code.c:7296: c[i + d] = b[d]; +@ Patches/../C_code.c:7301: c[i + d] = b[d]; strb r5, [r3, r4] @ _13, MEM[(char *)_44 + _14 * 1] -@ Patches/../C_code.c:7297: if (!b[d]) +@ Patches/../C_code.c:7302: if (!b[d]) cmp r5, #0 @ _13, - bne .L3244 @, -.L3232: -@ Patches/../C_code.c:7303: } + bne .L3247 @, +.L3235: +@ Patches/../C_code.c:7308: } @ sp needed @ pop {r4, r5, r6, r7} pop {r1} bx r1 -.L3242: +.L3245: movs r6, #128 @ _23, - ldr r3, .L3245 @ i, + ldr r3, .L3248 @ i, lsls r6, r6, #5 @ _23, _23, - b .L3230 @ -.L3246: + b .L3233 @ +.L3249: .align 2 -.L3245: +.L3248: .word 4097 .size GetCombinedString, .-GetCombinedString .align 1 @@ -23726,37 +23757,34 @@ DrawConfigMenu: mov r5, r8 @, mov lr, fp @, mov r6, r9 @, -@ Patches/../C_code.c:7333: int offset2 = proc->offset; +@ Patches/../C_code.c:7338: int offset2 = proc->offset; movs r3, #49 @ tmp457, -@ Patches/../C_code.c:7323: { +@ Patches/../C_code.c:7328: { push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:7337: if (proc->clear) +@ Patches/../C_code.c:7342: if (proc->clear) movs r7, #58 @ tmp458, -@ Patches/../C_code.c:7333: int offset2 = proc->offset; +@ Patches/../C_code.c:7338: int offset2 = proc->offset; ldrb r4, [r0, r3] @ _1, -@ Patches/../C_code.c:7337: if (proc->clear) +@ Patches/../C_code.c:7342: if (proc->clear) ldrb r3, [r0, r7] @ tmp459, -@ Patches/../C_code.c:7323: { +@ Patches/../C_code.c:7328: { movs r5, r0 @ proc, tmp935 sub sp, sp, #84 @,, -@ Patches/../C_code.c:7337: if (proc->clear) +@ Patches/../C_code.c:7342: if (proc->clear) cmp r3, #0 @ tmp459, - bne .L3367 @, -.L3248: -@ Patches/../C_code.c:7359: switch (offset2) + bne .L3370 @, +.L3251: +@ Patches/../C_code.c:7364: switch (offset2) cmp r4, #25 @ _1, - bhi .L3249 @, - ldr r2, .L3369 @ tmp474, + bhi .L3252 @, + ldr r2, .L3372 @ tmp474, lsls r4, r4, #2 @ tmp472, _1, ldr r3, [r2, r4] @ tmp475, mov pc, r3 @ tmp475 .section .rodata .align 2 -.L3251: - .word .L3276 - .word .L3281 - .word .L3282 - .word .L3283 +.L3254: + .word .L3279 .word .L3284 .word .L3285 .word .L3286 @@ -23779,91 +23807,94 @@ DrawConfigMenu: .word .L3303 .word .L3304 .word .L3305 + .word .L3306 + .word .L3307 + .word .L3308 .text -.L3304: +.L3307: movs r4, #0 @ i, -.L3252: -@ Patches/../C_code.c:7579: if (DisplayTimedHitsOption) - ldr r3, .L3369+4 @ tmp868, -@ Patches/../C_code.c:7579: if (DisplayTimedHitsOption) +.L3255: +@ Patches/../C_code.c:7584: if (DisplayTimedHitsOption) + ldr r3, .L3372+4 @ tmp868, +@ Patches/../C_code.c:7584: if (DisplayTimedHitsOption) ldr r3, [r3] @ DisplayTimedHitsOption, DisplayTimedHitsOption cmp r3, #0 @ DisplayTimedHitsOption, - beq .LCB19724 @ - bl .L3368 @far jump @ -.LCB19724: -.L3250: -@ Patches/../C_code.c:7593: if (DisplayRandomSkillsOption) - ldr r3, .L3369+8 @ tmp891, -@ Patches/../C_code.c:7593: if (DisplayRandomSkillsOption) + beq .LCB19748 @ + bl .L3371 @far jump @ +.LCB19748: +.L3253: +@ Patches/../C_code.c:7598: if (DisplayRandomSkillsOption) + ldr r3, .L3372+8 @ tmp891, +@ Patches/../C_code.c:7598: if (DisplayRandomSkillsOption) ldr r3, [r3] @ DisplayRandomSkillsOption, DisplayRandomSkillsOption cmp r3, #0 @ DisplayRandomSkillsOption, - beq .L3249 @, -@ Patches/../C_code.c:7595: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) + beq .L3252 @, +@ Patches/../C_code.c:7600: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) movs r3, #86 @ tmp893, -@ Patches/../C_code.c:7606: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7611: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r6, r4 @ tmp894, i -@ Patches/../C_code.c:7595: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) +@ Patches/../C_code.c:7600: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) ldrsb r1, [r5, r3] @ _324, -@ Patches/../C_code.c:7606: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7611: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r6, r6, #8 @ tmp894, -@ Patches/../C_code.c:7605: PutDrawText( - ldr r3, .L3369+12 @ tmp896, -@ Patches/../C_code.c:7606: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7610: PutDrawText( + ldr r3, .L3372+12 @ tmp896, +@ Patches/../C_code.c:7611: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r6, r6, #3 @ tmp895, tmp894, -@ Patches/../C_code.c:7605: PutDrawText( +@ Patches/../C_code.c:7610: PutDrawText( adds r6, r6, r3 @ _1574, tmp895, tmp896 - ldr r3, .L3369+16 @ tmp901, -@ Patches/../C_code.c:7606: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + ldr r3, .L3372+16 @ tmp901, +@ Patches/../C_code.c:7611: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r4, r4, #7 @ tmp898, i, -@ Patches/../C_code.c:7605: PutDrawText( +@ Patches/../C_code.c:7610: PutDrawText( adds r4, r4, r3 @ _1580, tmp898, tmp901 -@ Patches/../C_code.c:7595: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) +@ Patches/../C_code.c:7600: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) cmp r1, #3 @ _324, - bne .L3279 @, -@ Patches/../C_code.c:7595: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) + bne .L3282 @, +@ Patches/../C_code.c:7600: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) movs r3, #56 @ tmp902, ldrb r0, [r5, r3] @ _325, -@ Patches/../C_code.c:7256: if (skillId == 0) +@ Patches/../C_code.c:7261: if (skillId == 0) subs r3, r0, #1 @ tmp903, _325, -@ Patches/../C_code.c:7259: if (skillId == 255) +@ Patches/../C_code.c:7264: if (skillId == 255) lsls r3, r3, #24 @ tmp907, tmp903, lsrs r3, r3, #24 @ tmp906, tmp907, cmp r3, #253 @ tmp906, - bhi .L3279 @, -@ Patches/../C_code.c:7262: return !!SkillDescTable[skillId]; - ldr r3, .L3369+20 @ tmp908, + bhi .L3282 @, +@ Patches/../C_code.c:7267: return !!SkillDescTable[skillId]; + ldr r3, .L3372+20 @ tmp908, lsls r2, r0, #1 @ tmp909, _325, -@ Patches/../C_code.c:7595: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) +@ Patches/../C_code.c:7600: if ((proc->Option[24] != 3) || (!IsSkill(proc->skill))) ldrh r3, [r2, r3] @ tmp910, SkillDescTable cmp r3, #0 @ tmp910, - beq .LCB19756 @ - bl .L3280 @far jump @ -.LCB19756: -.L3279: -@ Patches/../C_code.c:7599: PutStringInBuffer(Option24[proc->Option[24]], UseHuffmanEncoding)); + beq .LCB19780 @ + bl .L3283 @far jump @ +.LCB19780: +.L3282: +@ Patches/../C_code.c:7604: PutStringInBuffer(Option24[proc->Option[24]], UseHuffmanEncoding)); lsls r2, r1, #2 @ tmp914, _324, - ldr r3, .L3369+24 @ tmp912, + ldr r3, .L3372+24 @ tmp912, adds r2, r2, r1 @ tmp915, tmp914, _324 lsls r2, r2, #1 @ tmp916, tmp915, adds r3, r3, r2 @ tmp917, tmp912, tmp916 -@ Patches/../C_code.c:7597: PutDrawText( +@ Patches/../C_code.c:7602: PutDrawText( str r3, [sp, #4] @ tmp917, -.L3366: -@ Patches/../C_code.c:7605: PutDrawText( +.L3369: +@ Patches/../C_code.c:7610: PutDrawText( movs r3, #16 @ tmp924, movs r1, r4 @, _1580 str r3, [sp] @ tmp924, movs r2, #0 @, movs r3, #0 @, movs r0, r6 @, _1574 - ldr r4, .L3369+28 @ tmp925, - bl .L269 @ -.L3249: -@ Patches/../C_code.c:7625: BG_EnableSyncByMask(BG0_SYNC_BIT); + ldr r4, .L3372+28 @ tmp925, + bl .L272 @ +.L3252: +@ Patches/../C_code.c:7630: BG_EnableSyncByMask(BG0_SYNC_BIT); movs r0, #1 @, - ldr r3, .L3369+32 @ tmp926, + ldr r3, .L3372+32 @ tmp926, bl .L14 @ -@ Patches/../C_code.c:7626: } +@ Patches/../C_code.c:7631: } add sp, sp, #84 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -23874,74 +23905,74 @@ DrawConfigMenu: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3367: -@ Patches/../C_code.c:7339: ClearText(&th[hOff + offset + proc->id]); +.L3370: +@ Patches/../C_code.c:7344: ClearText(&th[hOff + offset + proc->id]); movs r3, #48 @ tmp460, ldrsb r0, [r0, r3] @ tmp461, -@ Patches/../C_code.c:7339: ClearText(&th[hOff + offset + proc->id]); - ldr r6, .L3369+12 @ tmp934, -@ Patches/../C_code.c:7339: ClearText(&th[hOff + offset + proc->id]); +@ Patches/../C_code.c:7344: ClearText(&th[hOff + offset + proc->id]); + ldr r6, .L3372+12 @ tmp934, +@ Patches/../C_code.c:7344: ClearText(&th[hOff + offset + proc->id]); adds r0, r0, #8 @ tmp462, -@ Patches/../C_code.c:7339: ClearText(&th[hOff + offset + proc->id]); +@ Patches/../C_code.c:7344: ClearText(&th[hOff + offset + proc->id]); lsls r0, r0, #3 @ tmp463, tmp462, -@ Patches/../C_code.c:7339: ClearText(&th[hOff + offset + proc->id]); - ldr r3, .L3369+36 @ tmp466, +@ Patches/../C_code.c:7344: ClearText(&th[hOff + offset + proc->id]); + ldr r3, .L3372+36 @ tmp466, adds r0, r6, r0 @ tmp464, tmp934, tmp463 bl .L14 @ -@ Patches/../C_code.c:7340: proc->clear = false; +@ Patches/../C_code.c:7345: proc->clear = false; movs r3, #0 @ tmp468, strb r3, [r5, r7] @ tmp468, proc_404(D)->clear - b .L3248 @ -.L3303: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3251 @ +.L3306: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ i, movs r1, #222 @ _1547, movs r0, #64 @ _1537, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3253: -@ Patches/../C_code.c:7570: PutStringInBuffer(Option22[proc->Option[22]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3256: +@ Patches/../C_code.c:7575: PutStringInBuffer(Option22[proc->Option[22]], UseHuffmanEncoding)); movs r2, #84 @ tmp859, -@ Patches/../C_code.c:7568: PutDrawText( +@ Patches/../C_code.c:7573: PutDrawText( adds r0, r6, r0 @ tmp855, tmp934, _1537 -@ Patches/../C_code.c:7570: PutStringInBuffer(Option22[proc->Option[22]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7575: PutStringInBuffer(Option22[proc->Option[22]], UseHuffmanEncoding)); ldrsb r6, [r5, r2] @ tmp860, lsls r2, r6, #2 @ tmp862, tmp860, - ldr r3, .L3369+44 @ tmp858, + ldr r3, .L3372+44 @ tmp858, adds r2, r2, r6 @ tmp863, tmp862, tmp860 lsls r2, r2, #2 @ tmp864, tmp863, adds r3, r3, r2 @ tmp865, tmp858, tmp864 -@ Patches/../C_code.c:7568: PutDrawText( +@ Patches/../C_code.c:7573: PutDrawText( str r3, [sp, #4] @ tmp865, movs r3, #16 @ tmp866, movs r2, #0 @, str r3, [sp] @ tmp866, -@ Patches/../C_code.c:7568: PutDrawText( +@ Patches/../C_code.c:7573: PutDrawText( add r1, r1, r8 @ tmp853, tmp927 -@ Patches/../C_code.c:7568: PutDrawText( +@ Patches/../C_code.c:7573: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:7572: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7577: if (i > SRR_MAXDISP) cmp r4, #8 @ i, - bne .L3252 @, - b .L3249 @ -.L3302: - ldr r3, .L3369+40 @ tmp927, + bne .L3255 @, + b .L3252 @ +.L3305: + ldr r3, .L3372+40 @ tmp927, mov r8, r3 @ tmp927, tmp927 - ldr r3, .L3369+48 @ tmp933, -@ Patches/../C_code.c:7359: switch (offset2) + ldr r3, .L3372+48 @ tmp933, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1531, movs r1, #222 @ _1529, movs r0, #64 @ _1519, mov r9, r3 @ tmp933, tmp933 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3254: -@ Patches/../C_code.c:7559: PutStringInBuffer(Option21[proc->Option[21]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3257: +@ Patches/../C_code.c:7564: PutStringInBuffer(Option21[proc->Option[21]], UseHuffmanEncoding)); movs r3, #83 @ tmp839, -@ Patches/../C_code.c:7559: PutStringInBuffer(Option21[proc->Option[21]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7564: PutStringInBuffer(Option21[proc->Option[21]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp840, mov r2, r9 @ tmp933, tmp933 mov ip, r3 @ tmp840, tmp840 @@ -23953,102 +23984,102 @@ DrawConfigMenu: mov ip, r2 @ tmp844, tmp844 add r3, r3, ip @ tmp845, tmp844 add r3, r3, r9 @ tmp846, tmp838 -@ Patches/../C_code.c:7557: PutDrawText( +@ Patches/../C_code.c:7562: PutDrawText( str r3, [sp, #4] @ tmp846, movs r3, #16 @ tmp847, movs r2, #0 @, str r3, [sp] @ tmp847, -@ Patches/../C_code.c:7557: PutDrawText( +@ Patches/../C_code.c:7562: PutDrawText( add r1, r1, r8 @ tmp833, tmp927 -@ Patches/../C_code.c:7557: PutDrawText( +@ Patches/../C_code.c:7562: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7557: PutDrawText( +@ Patches/../C_code.c:7562: PutDrawText( adds r0, r6, r0 @ tmp835, tmp934, _1519 -@ Patches/../C_code.c:7557: PutDrawText( +@ Patches/../C_code.c:7562: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7561: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7566: if (i > SRR_MAXDISP) cmp r4, #8 @ _1531, - beq .L3249 @, -@ Patches/../C_code.c:7569: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + beq .L3252 @, +@ Patches/../C_code.c:7574: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp849, _1531 -@ Patches/../C_code.c:7569: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7574: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp851, _1531, -@ Patches/../C_code.c:7569: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7574: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp849, -@ Patches/../C_code.c:7569: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7574: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1537, tmp849, -@ Patches/../C_code.c:7569: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7574: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1547, -@ Patches/../C_code.c:7571: i++; +@ Patches/../C_code.c:7576: i++; adds r4, r4, #1 @ i, - b .L3253 @ -.L3301: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3256 @ +.L3304: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1513, movs r1, #222 @ _1511, movs r0, #64 @ _1501, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3255: -@ Patches/../C_code.c:7548: PutStringInBuffer(Option20[proc->Option[20]], UseHuffmanEncoding)); - ldr r3, .L3369+48 @ tmp933, + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3258: +@ Patches/../C_code.c:7553: PutStringInBuffer(Option20[proc->Option[20]], UseHuffmanEncoding)); + ldr r3, .L3372+48 @ tmp933, mov r9, r3 @ tmp933, tmp933 -@ Patches/../C_code.c:7548: PutStringInBuffer(Option20[proc->Option[20]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7553: PutStringInBuffer(Option20[proc->Option[20]], UseHuffmanEncoding)); movs r3, #82 @ tmp820, -@ Patches/../C_code.c:7548: PutStringInBuffer(Option20[proc->Option[20]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7553: PutStringInBuffer(Option20[proc->Option[20]], UseHuffmanEncoding)); ldrsb r2, [r5, r3] @ tmp821, lsls r3, r2, #3 @ tmp823, tmp821, subs r3, r3, r2 @ tmp824, tmp823, tmp821 lsls r3, r3, #1 @ tmp825, tmp824, add r3, r3, r9 @ tmp826, tmp933 -@ Patches/../C_code.c:7546: PutDrawText( +@ Patches/../C_code.c:7551: PutDrawText( str r3, [sp, #4] @ tmp826, movs r3, #16 @ tmp827, movs r2, #0 @, str r3, [sp] @ tmp827, -@ Patches/../C_code.c:7546: PutDrawText( +@ Patches/../C_code.c:7551: PutDrawText( add r1, r1, r8 @ tmp815, tmp927 -@ Patches/../C_code.c:7546: PutDrawText( +@ Patches/../C_code.c:7551: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7546: PutDrawText( +@ Patches/../C_code.c:7551: PutDrawText( adds r0, r6, r0 @ tmp817, tmp934, _1501 -@ Patches/../C_code.c:7546: PutDrawText( +@ Patches/../C_code.c:7551: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7550: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7555: if (i > SRR_MAXDISP) cmp r4, #8 @ _1513, - bne .LCB19912 @ - b .L3249 @long jump @ -.LCB19912: -@ Patches/../C_code.c:7558: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB19936 @ + b .L3252 @long jump @ +.LCB19936: +@ Patches/../C_code.c:7563: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp829, _1513 -@ Patches/../C_code.c:7558: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7563: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp831, _1513, -@ Patches/../C_code.c:7558: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7563: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp829, -@ Patches/../C_code.c:7558: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7563: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1519, tmp829, -@ Patches/../C_code.c:7558: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7563: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1529, -@ Patches/../C_code.c:7560: i++; +@ Patches/../C_code.c:7565: i++; adds r4, r4, #1 @ _1531, - b .L3254 @ -.L3300: - ldr r3, .L3369+40 @ tmp927, + b .L3257 @ +.L3303: + ldr r3, .L3372+40 @ tmp927, mov r8, r3 @ tmp927, tmp927 - ldr r3, .L3369+52 @ tmp932, -@ Patches/../C_code.c:7359: switch (offset2) + ldr r3, .L3372+52 @ tmp932, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1495, movs r1, #222 @ _1493, movs r0, #64 @ _1483, mov r9, r3 @ tmp932, tmp932 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3256: -@ Patches/../C_code.c:7539: PutStringInBuffer(Option19[proc->Option[19]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3259: +@ Patches/../C_code.c:7544: PutStringInBuffer(Option19[proc->Option[19]], UseHuffmanEncoding)); movs r2, #81 @ tmp802, -@ Patches/../C_code.c:7539: PutStringInBuffer(Option19[proc->Option[19]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7544: PutStringInBuffer(Option19[proc->Option[19]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp803, mov r3, r9 @ tmp932, tmp932 mov ip, r2 @ tmp803, tmp803 @@ -24060,54 +24091,54 @@ DrawConfigMenu: lsls r2, r2, #1 @ tmp807, tmp806, movs r3, r2 @ tmp807, tmp807 add r3, r3, r9 @ tmp807, tmp801 -@ Patches/../C_code.c:7537: PutDrawText( +@ Patches/../C_code.c:7542: PutDrawText( str r3, [sp, #4] @ tmp808, movs r3, #16 @ tmp809, movs r2, #0 @, str r3, [sp] @ tmp809, -@ Patches/../C_code.c:7537: PutDrawText( +@ Patches/../C_code.c:7542: PutDrawText( add r1, r1, r8 @ tmp796, tmp927 -@ Patches/../C_code.c:7537: PutDrawText( +@ Patches/../C_code.c:7542: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7537: PutDrawText( +@ Patches/../C_code.c:7542: PutDrawText( adds r0, r6, r0 @ tmp798, tmp934, _1483 -@ Patches/../C_code.c:7537: PutDrawText( +@ Patches/../C_code.c:7542: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7541: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7546: if (i > SRR_MAXDISP) cmp r4, #8 @ _1495, - bne .LCB19957 @ - b .L3249 @long jump @ -.LCB19957: -@ Patches/../C_code.c:7547: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB19981 @ + b .L3252 @long jump @ +.LCB19981: +@ Patches/../C_code.c:7552: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp811, _1495 -@ Patches/../C_code.c:7547: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7552: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp813, _1495, -@ Patches/../C_code.c:7547: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7552: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp811, -@ Patches/../C_code.c:7547: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7552: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1501, tmp811, -@ Patches/../C_code.c:7547: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7552: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1511, -@ Patches/../C_code.c:7549: i++; +@ Patches/../C_code.c:7554: i++; adds r4, r4, #1 @ _1513, - b .L3255 @ -.L3299: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3258 @ +.L3302: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1477, movs r1, #222 @ _1475, movs r0, #64 @ _1465, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3257: -@ Patches/../C_code.c:7530: PutStringInBuffer(Option18[proc->Option[18]], UseHuffmanEncoding)); - ldr r3, .L3369+52 @ tmp932, + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3260: +@ Patches/../C_code.c:7535: PutStringInBuffer(Option18[proc->Option[18]], UseHuffmanEncoding)); + ldr r3, .L3372+52 @ tmp932, movs r2, r3 @ tmp781, tmp932 mov r9, r3 @ tmp932, tmp932 -@ Patches/../C_code.c:7530: PutStringInBuffer(Option18[proc->Option[18]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7535: PutStringInBuffer(Option18[proc->Option[18]], UseHuffmanEncoding)); movs r3, #80 @ tmp782, -@ Patches/../C_code.c:7530: PutStringInBuffer(Option18[proc->Option[18]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7535: PutStringInBuffer(Option18[proc->Option[18]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp783, mov ip, r3 @ tmp783, tmp783 lsls r3, r3, #2 @ tmp785, tmp783, @@ -24118,291 +24149,291 @@ DrawConfigMenu: mov ip, r2 @ tmp787, tmp787 add r3, r3, ip @ tmp788, tmp787 add r3, r3, r10 @ tmp789, tmp781 -@ Patches/../C_code.c:7528: PutDrawText( +@ Patches/../C_code.c:7533: PutDrawText( str r3, [sp, #4] @ tmp789, movs r3, #16 @ tmp790, movs r2, #0 @, str r3, [sp] @ tmp790, -@ Patches/../C_code.c:7528: PutDrawText( +@ Patches/../C_code.c:7533: PutDrawText( add r1, r1, r8 @ tmp776, tmp927 -@ Patches/../C_code.c:7528: PutDrawText( +@ Patches/../C_code.c:7533: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7528: PutDrawText( +@ Patches/../C_code.c:7533: PutDrawText( adds r0, r6, r0 @ tmp778, tmp934, _1465 -@ Patches/../C_code.c:7528: PutDrawText( +@ Patches/../C_code.c:7533: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7532: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7537: if (i > SRR_MAXDISP) cmp r4, #8 @ _1477, - bne .LCB20002 @ - b .L3249 @long jump @ -.LCB20002: -@ Patches/../C_code.c:7538: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20026 @ + b .L3252 @long jump @ +.LCB20026: +@ Patches/../C_code.c:7543: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp792, _1477 -@ Patches/../C_code.c:7538: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7543: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp794, _1477, -@ Patches/../C_code.c:7538: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7543: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp792, -@ Patches/../C_code.c:7538: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7543: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1483, tmp792, -@ Patches/../C_code.c:7538: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7543: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1493, -@ Patches/../C_code.c:7540: i++; +@ Patches/../C_code.c:7545: i++; adds r4, r4, #1 @ _1495, - b .L3256 @ -.L3298: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3259 @ +.L3301: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1459, movs r1, #222 @ _1457, movs r0, #64 @ _1447, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3258: -@ Patches/../C_code.c:7521: PutStringInBuffer(Option17[proc->Option[17]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3261: +@ Patches/../C_code.c:7526: PutStringInBuffer(Option17[proc->Option[17]], UseHuffmanEncoding)); movs r3, #79 @ tmp762, -@ Patches/../C_code.c:7521: PutStringInBuffer(Option17[proc->Option[17]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7526: PutStringInBuffer(Option17[proc->Option[17]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp763, mov ip, r3 @ tmp763, tmp763 lsls r3, r3, #2 @ tmp765, tmp763, add r3, r3, ip @ tmp766, tmp763 - ldr r2, .L3369+56 @ tmp761, + ldr r2, .L3372+56 @ tmp761, lsls r3, r3, #1 @ tmp767, tmp766, add r3, r3, ip @ tmp768, tmp763 adds r2, r2, r3 @ tmp769, tmp761, tmp768 -@ Patches/../C_code.c:7519: PutDrawText( +@ Patches/../C_code.c:7524: PutDrawText( movs r3, #16 @ tmp770, str r2, [sp, #4] @ tmp769, str r3, [sp] @ tmp770, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7519: PutDrawText( +@ Patches/../C_code.c:7524: PutDrawText( add r1, r1, r8 @ tmp756, tmp927 adds r0, r6, r0 @ tmp758, tmp934, _1447 -@ Patches/../C_code.c:7519: PutDrawText( +@ Patches/../C_code.c:7524: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7523: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7528: if (i > SRR_MAXDISP) cmp r4, #8 @ _1459, - bne .LCB20043 @ - b .L3249 @long jump @ -.LCB20043: -@ Patches/../C_code.c:7529: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20067 @ + b .L3252 @long jump @ +.LCB20067: +@ Patches/../C_code.c:7534: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp772, _1459 -@ Patches/../C_code.c:7529: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7534: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp774, _1459, -@ Patches/../C_code.c:7529: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7534: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp772, -@ Patches/../C_code.c:7529: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7534: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1465, tmp772, -@ Patches/../C_code.c:7529: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7534: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1475, -@ Patches/../C_code.c:7531: i++; +@ Patches/../C_code.c:7536: i++; adds r4, r4, #1 @ _1477, - b .L3257 @ -.L3297: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3260 @ +.L3300: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1441, movs r1, #222 @ _1439, movs r0, #64 @ _1429, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3259: -@ Patches/../C_code.c:7512: PutStringInBuffer(Option16[proc->Option[16]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3262: +@ Patches/../C_code.c:7517: PutStringInBuffer(Option16[proc->Option[16]], UseHuffmanEncoding)); movs r3, #78 @ tmp742, -@ Patches/../C_code.c:7512: PutStringInBuffer(Option16[proc->Option[16]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7517: PutStringInBuffer(Option16[proc->Option[16]], UseHuffmanEncoding)); ldrsb r2, [r5, r3] @ tmp743, lsls r3, r2, #2 @ tmp745, tmp743, adds r3, r3, r2 @ tmp746, tmp745, tmp743 - ldr r2, .L3369+60 @ tmp749, + ldr r2, .L3372+60 @ tmp749, lsls r3, r3, #1 @ tmp747, tmp746, adds r3, r3, r2 @ tmp748, tmp747, tmp749 -@ Patches/../C_code.c:7510: PutDrawText( +@ Patches/../C_code.c:7515: PutDrawText( str r3, [sp, #4] @ tmp748, movs r3, #16 @ tmp750, movs r2, #0 @, str r3, [sp] @ tmp750, -@ Patches/../C_code.c:7510: PutDrawText( +@ Patches/../C_code.c:7515: PutDrawText( add r1, r1, r8 @ tmp738, tmp927 -@ Patches/../C_code.c:7510: PutDrawText( +@ Patches/../C_code.c:7515: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7510: PutDrawText( +@ Patches/../C_code.c:7515: PutDrawText( adds r0, r6, r0 @ tmp740, tmp934, _1429 -@ Patches/../C_code.c:7510: PutDrawText( +@ Patches/../C_code.c:7515: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7514: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7519: if (i > SRR_MAXDISP) cmp r4, #8 @ _1441, - bne .LCB20081 @ - b .L3249 @long jump @ -.LCB20081: -@ Patches/../C_code.c:7520: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20105 @ + b .L3252 @long jump @ +.LCB20105: +@ Patches/../C_code.c:7525: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp752, _1441 -@ Patches/../C_code.c:7520: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7525: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp754, _1441, -@ Patches/../C_code.c:7520: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7525: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp752, -@ Patches/../C_code.c:7520: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7525: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1447, tmp752, -@ Patches/../C_code.c:7520: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7525: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1457, -@ Patches/../C_code.c:7522: i++; +@ Patches/../C_code.c:7527: i++; adds r4, r4, #1 @ _1459, - b .L3258 @ -.L3296: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3261 @ +.L3299: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1423, movs r1, #222 @ _1421, movs r0, #64 @ _1411, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3260: -@ Patches/../C_code.c:7503: PutStringInBuffer(Option15[proc->Option[15]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3263: +@ Patches/../C_code.c:7508: PutStringInBuffer(Option15[proc->Option[15]], UseHuffmanEncoding)); movs r3, #77 @ tmp724, -@ Patches/../C_code.c:7503: PutStringInBuffer(Option15[proc->Option[15]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7508: PutStringInBuffer(Option15[proc->Option[15]], UseHuffmanEncoding)); ldrsb r2, [r5, r3] @ tmp725, lsls r3, r2, #2 @ tmp727, tmp725, adds r3, r3, r2 @ tmp728, tmp727, tmp725 - ldr r2, .L3369+64 @ tmp731, + ldr r2, .L3372+64 @ tmp731, lsls r3, r3, #2 @ tmp729, tmp728, adds r3, r3, r2 @ tmp730, tmp729, tmp731 -@ Patches/../C_code.c:7501: PutDrawText( +@ Patches/../C_code.c:7506: PutDrawText( str r3, [sp, #4] @ tmp730, movs r3, #16 @ tmp732, movs r2, #0 @, str r3, [sp] @ tmp732, -@ Patches/../C_code.c:7501: PutDrawText( +@ Patches/../C_code.c:7506: PutDrawText( add r1, r1, r8 @ tmp720, tmp927 -@ Patches/../C_code.c:7501: PutDrawText( +@ Patches/../C_code.c:7506: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7501: PutDrawText( +@ Patches/../C_code.c:7506: PutDrawText( adds r0, r6, r0 @ tmp722, tmp934, _1411 -@ Patches/../C_code.c:7501: PutDrawText( +@ Patches/../C_code.c:7506: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7505: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7510: if (i > SRR_MAXDISP) cmp r4, #8 @ _1423, - bne .LCB20119 @ - b .L3249 @long jump @ -.LCB20119: -@ Patches/../C_code.c:7511: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20143 @ + b .L3252 @long jump @ +.LCB20143: +@ Patches/../C_code.c:7516: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp734, _1423 -@ Patches/../C_code.c:7511: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7516: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp736, _1423, -@ Patches/../C_code.c:7511: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7516: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp734, -@ Patches/../C_code.c:7511: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7516: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1429, tmp734, -@ Patches/../C_code.c:7511: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7516: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1439, -@ Patches/../C_code.c:7513: i++; +@ Patches/../C_code.c:7518: i++; adds r4, r4, #1 @ _1441, - b .L3259 @ -.L3295: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3262 @ +.L3298: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1405, movs r1, #222 @ _1403, movs r0, #64 @ _1393, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3261: -@ Patches/../C_code.c:7494: PutStringInBuffer(Option14[proc->Option[14]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3264: +@ Patches/../C_code.c:7499: PutStringInBuffer(Option14[proc->Option[14]], UseHuffmanEncoding)); movs r3, #76 @ tmp706, -@ Patches/../C_code.c:7494: PutStringInBuffer(Option14[proc->Option[14]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7499: PutStringInBuffer(Option14[proc->Option[14]], UseHuffmanEncoding)); ldrsb r2, [r5, r3] @ tmp707, lsls r3, r2, #2 @ tmp709, tmp707, adds r3, r3, r2 @ tmp710, tmp709, tmp707 - ldr r2, .L3369+68 @ tmp713, + ldr r2, .L3372+68 @ tmp713, lsls r3, r3, #1 @ tmp711, tmp710, adds r3, r3, r2 @ tmp712, tmp711, tmp713 -@ Patches/../C_code.c:7492: PutDrawText( +@ Patches/../C_code.c:7497: PutDrawText( str r3, [sp, #4] @ tmp712, movs r3, #16 @ tmp714, movs r2, #0 @, str r3, [sp] @ tmp714, -@ Patches/../C_code.c:7492: PutDrawText( +@ Patches/../C_code.c:7497: PutDrawText( add r1, r1, r8 @ tmp702, tmp927 -@ Patches/../C_code.c:7492: PutDrawText( +@ Patches/../C_code.c:7497: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7492: PutDrawText( +@ Patches/../C_code.c:7497: PutDrawText( adds r0, r6, r0 @ tmp704, tmp934, _1393 -@ Patches/../C_code.c:7492: PutDrawText( +@ Patches/../C_code.c:7497: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7496: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7501: if (i > SRR_MAXDISP) cmp r4, #8 @ _1405, - bne .LCB20157 @ - b .L3249 @long jump @ -.LCB20157: -@ Patches/../C_code.c:7502: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20181 @ + b .L3252 @long jump @ +.LCB20181: +@ Patches/../C_code.c:7507: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp716, _1405 -@ Patches/../C_code.c:7502: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7507: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp718, _1405, -@ Patches/../C_code.c:7502: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7507: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp716, -@ Patches/../C_code.c:7502: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7507: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1411, tmp716, -@ Patches/../C_code.c:7502: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7507: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1421, -@ Patches/../C_code.c:7504: i++; +@ Patches/../C_code.c:7509: i++; adds r4, r4, #1 @ _1423, - b .L3260 @ -.L3294: - ldr r3, .L3369+40 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3263 @ +.L3297: + ldr r3, .L3372+40 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1387, movs r1, #222 @ _1385, movs r0, #64 @ _1375, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3369+12 @ tmp934, - ldr r7, .L3369+28 @ tmp928, -.L3262: -@ Patches/../C_code.c:7485: PutStringInBuffer(Option13[proc->Option[13]], UseHuffmanEncoding)); + ldr r6, .L3372+12 @ tmp934, + ldr r7, .L3372+28 @ tmp928, +.L3265: +@ Patches/../C_code.c:7490: PutStringInBuffer(Option13[proc->Option[13]], UseHuffmanEncoding)); movs r3, #75 @ tmp688, -@ Patches/../C_code.c:7485: PutStringInBuffer(Option13[proc->Option[13]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7490: PutStringInBuffer(Option13[proc->Option[13]], UseHuffmanEncoding)); ldrsb r2, [r5, r3] @ tmp689, lsls r3, r2, #2 @ tmp691, tmp689, adds r3, r3, r2 @ tmp692, tmp691, tmp689 - ldr r2, .L3369+72 @ tmp695, + ldr r2, .L3372+72 @ tmp695, lsls r3, r3, #2 @ tmp693, tmp692, adds r3, r3, r2 @ tmp694, tmp693, tmp695 -@ Patches/../C_code.c:7483: PutDrawText( +@ Patches/../C_code.c:7488: PutDrawText( str r3, [sp, #4] @ tmp694, movs r3, #16 @ tmp696, movs r2, #0 @, str r3, [sp] @ tmp696, -@ Patches/../C_code.c:7483: PutDrawText( +@ Patches/../C_code.c:7488: PutDrawText( add r1, r1, r8 @ tmp684, tmp927 -@ Patches/../C_code.c:7483: PutDrawText( +@ Patches/../C_code.c:7488: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7483: PutDrawText( +@ Patches/../C_code.c:7488: PutDrawText( adds r0, r6, r0 @ tmp686, tmp934, _1375 -@ Patches/../C_code.c:7483: PutDrawText( +@ Patches/../C_code.c:7488: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7487: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7492: if (i > SRR_MAXDISP) cmp r4, #8 @ _1387, - bne .LCB20195 @ - b .L3249 @long jump @ -.LCB20195: -@ Patches/../C_code.c:7493: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20219 @ + b .L3252 @long jump @ +.LCB20219: +@ Patches/../C_code.c:7498: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp698, _1387 -@ Patches/../C_code.c:7493: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7498: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp700, _1387, -@ Patches/../C_code.c:7493: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7498: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp698, -@ Patches/../C_code.c:7493: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7498: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1393, tmp698, -@ Patches/../C_code.c:7493: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7498: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1403, -@ Patches/../C_code.c:7495: i++; +@ Patches/../C_code.c:7500: i++; adds r4, r4, #1 @ _1405, - b .L3261 @ -.L3370: + b .L3264 @ +.L3373: .align 2 -.L3369: - .word .L3251 +.L3372: + .word .L3254 .word DisplayTimedHitsOption .word DisplayRandomSkillsOption .word gStatScreen+24 @@ -24421,72 +24452,72 @@ DrawConfigMenu: .word Option15 .word Option14 .word Option13 -.L3293: - ldr r3, .L3371 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) +.L3296: + ldr r3, .L3374 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1369, movs r1, #222 @ _1367, movs r0, #64 @ _1357, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3263: -@ Patches/../C_code.c:7476: PutStringInBuffer(Option12[proc->Option[12]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3266: +@ Patches/../C_code.c:7481: PutStringInBuffer(Option12[proc->Option[12]], UseHuffmanEncoding)); movs r2, #74 @ tmp671, -@ Patches/../C_code.c:7476: PutStringInBuffer(Option12[proc->Option[12]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7481: PutStringInBuffer(Option12[proc->Option[12]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp672, mov ip, r2 @ tmp672, tmp672 lsls r2, r2, #2 @ tmp674, tmp672, - ldr r3, .L3371+12 @ tmp670, + ldr r3, .L3374+12 @ tmp670, add r2, r2, ip @ tmp675, tmp672 lsls r2, r2, #2 @ tmp676, tmp675, adds r3, r3, r2 @ tmp677, tmp670, tmp676 -@ Patches/../C_code.c:7474: PutDrawText( +@ Patches/../C_code.c:7479: PutDrawText( str r3, [sp, #4] @ tmp677, movs r3, #16 @ tmp678, movs r2, #0 @, str r3, [sp] @ tmp678, -@ Patches/../C_code.c:7474: PutDrawText( +@ Patches/../C_code.c:7479: PutDrawText( add r1, r1, r8 @ tmp665, tmp927 -@ Patches/../C_code.c:7474: PutDrawText( +@ Patches/../C_code.c:7479: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7474: PutDrawText( +@ Patches/../C_code.c:7479: PutDrawText( adds r0, r6, r0 @ tmp667, tmp934, _1357 -@ Patches/../C_code.c:7474: PutDrawText( +@ Patches/../C_code.c:7479: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7478: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7483: if (i > SRR_MAXDISP) cmp r4, #8 @ _1369, - bne .LCB20259 @ - b .L3249 @long jump @ -.LCB20259: -@ Patches/../C_code.c:7484: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20283 @ + b .L3252 @long jump @ +.LCB20283: +@ Patches/../C_code.c:7489: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp680, _1369 -@ Patches/../C_code.c:7484: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7489: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp682, _1369, -@ Patches/../C_code.c:7484: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7489: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp680, -@ Patches/../C_code.c:7484: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7489: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1375, tmp680, -@ Patches/../C_code.c:7484: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7489: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1385, -@ Patches/../C_code.c:7486: i++; +@ Patches/../C_code.c:7491: i++; adds r4, r4, #1 @ _1387, - b .L3262 @ -.L3292: - ldr r3, .L3371 @ tmp927, + b .L3265 @ +.L3295: + ldr r3, .L3374 @ tmp927, mov r8, r3 @ tmp927, tmp927 - ldr r3, .L3371+16 @ tmp931, -@ Patches/../C_code.c:7359: switch (offset2) + ldr r3, .L3374+16 @ tmp931, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1351, movs r1, #222 @ _1349, movs r0, #64 @ _1339, mov r9, r3 @ tmp931, tmp931 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3264: -@ Patches/../C_code.c:7467: PutStringInBuffer(Option11[proc->Option[11]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3267: +@ Patches/../C_code.c:7472: PutStringInBuffer(Option11[proc->Option[11]], UseHuffmanEncoding)); movs r2, #73 @ tmp654, -@ Patches/../C_code.c:7467: PutStringInBuffer(Option11[proc->Option[11]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7472: PutStringInBuffer(Option11[proc->Option[11]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp655, mov r3, r9 @ tmp931, tmp931 mov ip, r2 @ tmp655, tmp655 @@ -24498,52 +24529,52 @@ DrawConfigMenu: muls r2, r3 @ tmp657, tmp656 movs r3, r2 @ tmp657, tmp657 add r3, r3, r9 @ tmp657, tmp653 -@ Patches/../C_code.c:7465: PutDrawText( +@ Patches/../C_code.c:7470: PutDrawText( str r3, [sp, #4] @ tmp658, movs r3, #16 @ tmp659, movs r2, #0 @, str r3, [sp] @ tmp659, -@ Patches/../C_code.c:7465: PutDrawText( +@ Patches/../C_code.c:7470: PutDrawText( add r1, r1, r8 @ tmp648, tmp927 -@ Patches/../C_code.c:7465: PutDrawText( +@ Patches/../C_code.c:7470: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7465: PutDrawText( +@ Patches/../C_code.c:7470: PutDrawText( adds r0, r6, r0 @ tmp650, tmp934, _1339 -@ Patches/../C_code.c:7465: PutDrawText( +@ Patches/../C_code.c:7470: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7469: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7474: if (i > SRR_MAXDISP) cmp r4, #8 @ _1351, - bne .LCB20303 @ - b .L3249 @long jump @ -.LCB20303: -@ Patches/../C_code.c:7475: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20327 @ + b .L3252 @long jump @ +.LCB20327: +@ Patches/../C_code.c:7480: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp661, _1351 -@ Patches/../C_code.c:7475: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7480: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp663, _1351, -@ Patches/../C_code.c:7475: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7480: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp661, -@ Patches/../C_code.c:7475: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7480: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1357, tmp661, -@ Patches/../C_code.c:7475: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7480: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1367, -@ Patches/../C_code.c:7477: i++; +@ Patches/../C_code.c:7482: i++; adds r4, r4, #1 @ _1369, - b .L3263 @ -.L3291: - ldr r3, .L3371 @ tmp927, + b .L3266 @ +.L3294: + ldr r3, .L3374 @ tmp927, mov r8, r3 @ tmp927, tmp927 - ldr r3, .L3371+16 @ tmp931, -@ Patches/../C_code.c:7359: switch (offset2) + ldr r3, .L3374+16 @ tmp931, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1333, movs r1, #222 @ _1331, movs r0, #64 @ _1321, mov r9, r3 @ tmp931, tmp931 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3265: -@ Patches/../C_code.c:7458: PutStringInBuffer(Option10[proc->Option[10]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3268: +@ Patches/../C_code.c:7463: PutStringInBuffer(Option10[proc->Option[10]], UseHuffmanEncoding)); movs r2, #72 @ tmp637, -@ Patches/../C_code.c:7458: PutStringInBuffer(Option10[proc->Option[10]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7463: PutStringInBuffer(Option10[proc->Option[10]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp638, mov r3, r9 @ tmp636, tmp931 mov ip, r2 @ tmp638, tmp638 @@ -24555,54 +24586,54 @@ DrawConfigMenu: muls r2, r3 @ tmp640, tmp639 movs r3, r2 @ tmp640, tmp640 add r3, r3, r10 @ tmp640, tmp636 -@ Patches/../C_code.c:7456: PutDrawText( +@ Patches/../C_code.c:7461: PutDrawText( str r3, [sp, #4] @ tmp641, movs r3, #16 @ tmp642, movs r2, #0 @, str r3, [sp] @ tmp642, -@ Patches/../C_code.c:7456: PutDrawText( +@ Patches/../C_code.c:7461: PutDrawText( add r1, r1, r8 @ tmp631, tmp927 -@ Patches/../C_code.c:7456: PutDrawText( +@ Patches/../C_code.c:7461: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7456: PutDrawText( +@ Patches/../C_code.c:7461: PutDrawText( adds r0, r6, r0 @ tmp633, tmp934, _1321 -@ Patches/../C_code.c:7456: PutDrawText( +@ Patches/../C_code.c:7461: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7460: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7465: if (i > SRR_MAXDISP) cmp r4, #8 @ _1333, - bne .LCB20347 @ - b .L3249 @long jump @ -.LCB20347: -@ Patches/../C_code.c:7466: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20371 @ + b .L3252 @long jump @ +.LCB20371: +@ Patches/../C_code.c:7471: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp644, _1333 -@ Patches/../C_code.c:7466: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7471: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp646, _1333, -@ Patches/../C_code.c:7466: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7471: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp644, -@ Patches/../C_code.c:7466: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7471: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1339, tmp644, -@ Patches/../C_code.c:7466: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7471: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1349, -@ Patches/../C_code.c:7468: i++; +@ Patches/../C_code.c:7473: i++; adds r4, r4, #1 @ _1351, - b .L3264 @ -.L3290: - ldr r3, .L3371 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3267 @ +.L3293: + ldr r3, .L3374 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1315, movs r1, #222 @ _1313, movs r0, #64 @ _1303, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3266: -@ Patches/../C_code.c:7449: PutStringInBuffer(Option9[proc->Option[9]], UseHuffmanEncoding)); - ldr r3, .L3371+16 @ tmp931, + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3269: +@ Patches/../C_code.c:7454: PutStringInBuffer(Option9[proc->Option[9]], UseHuffmanEncoding)); + ldr r3, .L3374+16 @ tmp931, movs r2, r3 @ tmp617, tmp931 mov r9, r3 @ tmp931, tmp931 -@ Patches/../C_code.c:7449: PutStringInBuffer(Option9[proc->Option[9]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7454: PutStringInBuffer(Option9[proc->Option[9]], UseHuffmanEncoding)); movs r3, #71 @ tmp618, -@ Patches/../C_code.c:7449: PutStringInBuffer(Option9[proc->Option[9]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7454: PutStringInBuffer(Option9[proc->Option[9]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp619, mov ip, r3 @ tmp619, tmp619 lsls r3, r3, #2 @ tmp621, tmp619, @@ -24610,53 +24641,53 @@ DrawConfigMenu: adds r2, r2, #12 @ tmp617, lsls r3, r3, #1 @ tmp623, tmp622, adds r3, r2, r3 @ tmp624, tmp617, tmp623 -@ Patches/../C_code.c:7447: PutDrawText( +@ Patches/../C_code.c:7452: PutDrawText( str r3, [sp, #4] @ tmp624, movs r3, #16 @ tmp625, movs r2, #0 @, str r3, [sp] @ tmp625, -@ Patches/../C_code.c:7447: PutDrawText( +@ Patches/../C_code.c:7452: PutDrawText( add r1, r1, r8 @ tmp612, tmp927 -@ Patches/../C_code.c:7447: PutDrawText( +@ Patches/../C_code.c:7452: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7447: PutDrawText( +@ Patches/../C_code.c:7452: PutDrawText( adds r0, r6, r0 @ tmp614, tmp934, _1303 -@ Patches/../C_code.c:7447: PutDrawText( +@ Patches/../C_code.c:7452: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7451: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7456: if (i > SRR_MAXDISP) cmp r4, #8 @ _1315, - bne .LCB20389 @ - b .L3249 @long jump @ -.LCB20389: -@ Patches/../C_code.c:7457: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20413 @ + b .L3252 @long jump @ +.LCB20413: +@ Patches/../C_code.c:7462: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp627, _1315 -@ Patches/../C_code.c:7457: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7462: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp629, _1315, -@ Patches/../C_code.c:7457: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7462: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp627, -@ Patches/../C_code.c:7457: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7462: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1321, tmp627, -@ Patches/../C_code.c:7457: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7462: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1331, -@ Patches/../C_code.c:7459: i++; +@ Patches/../C_code.c:7464: i++; adds r4, r4, #1 @ _1333, - b .L3265 @ -.L3289: - ldr r3, .L3371 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3268 @ +.L3292: + ldr r3, .L3374 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1297, movs r1, #222 @ _1295, movs r0, #64 @ _1285, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3267: -@ Patches/../C_code.c:7440: PutStringInBuffer(Option8[proc->Option[8]], UseHuffmanEncoding)); - ldr r3, .L3371+20 @ tmp597, + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3270: +@ Patches/../C_code.c:7445: PutStringInBuffer(Option8[proc->Option[8]], UseHuffmanEncoding)); + ldr r3, .L3374+20 @ tmp597, str r3, [sp, #12] @ tmp597, %sfp -@ Patches/../C_code.c:7440: PutStringInBuffer(Option8[proc->Option[8]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7445: PutStringInBuffer(Option8[proc->Option[8]], UseHuffmanEncoding)); movs r3, #70 @ tmp598, -@ Patches/../C_code.c:7440: PutStringInBuffer(Option8[proc->Option[8]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7445: PutStringInBuffer(Option8[proc->Option[8]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp599, mov ip, r3 @ tmp599, tmp599 lsls r3, r3, #2 @ tmp601, tmp599, @@ -24666,146 +24697,146 @@ DrawConfigMenu: ldr r2, [sp, #12] @ tmp597, %sfp add r3, r3, ip @ tmp604, tmp603 adds r2, r2, r3 @ tmp605, tmp597, tmp604 -@ Patches/../C_code.c:7438: PutDrawText( +@ Patches/../C_code.c:7443: PutDrawText( movs r3, #16 @ tmp606, str r2, [sp, #4] @ tmp605, str r3, [sp] @ tmp606, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7438: PutDrawText( +@ Patches/../C_code.c:7443: PutDrawText( add r1, r1, r8 @ tmp592, tmp927 adds r0, r6, r0 @ tmp594, tmp934, _1285 -@ Patches/../C_code.c:7438: PutDrawText( +@ Patches/../C_code.c:7443: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7442: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7447: if (i > SRR_MAXDISP) cmp r4, #8 @ _1297, - bne .LCB20434 @ - b .L3249 @long jump @ -.LCB20434: -@ Patches/../C_code.c:7448: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20458 @ + b .L3252 @long jump @ +.LCB20458: +@ Patches/../C_code.c:7453: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp608, _1297 -@ Patches/../C_code.c:7448: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7453: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp610, _1297, -@ Patches/../C_code.c:7448: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7453: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp608, -@ Patches/../C_code.c:7448: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7453: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1303, tmp608, -@ Patches/../C_code.c:7448: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7453: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1313, -@ Patches/../C_code.c:7450: i++; +@ Patches/../C_code.c:7455: i++; adds r4, r4, #1 @ _1315, - b .L3266 @ -.L3288: - ldr r3, .L3371 @ tmp927, -@ Patches/../C_code.c:7359: switch (offset2) + b .L3269 @ +.L3291: + ldr r3, .L3374 @ tmp927, +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #1 @ _1279, movs r1, #222 @ _1277, movs r0, #64 @ _1267, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3268: -@ Patches/../C_code.c:7431: PutStringInBuffer(Option7[proc->Option[7]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3271: +@ Patches/../C_code.c:7436: PutStringInBuffer(Option7[proc->Option[7]], UseHuffmanEncoding)); movs r3, #69 @ tmp580, -@ Patches/../C_code.c:7431: PutStringInBuffer(Option7[proc->Option[7]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7436: PutStringInBuffer(Option7[proc->Option[7]], UseHuffmanEncoding)); ldrsb r2, [r5, r3] @ tmp581, subs r3, r3, #43 @ tmp582, muls r3, r2 @ tmp583, tmp581 - ldr r2, .L3371+24 @ tmp585, + ldr r2, .L3374+24 @ tmp585, adds r3, r3, r2 @ tmp584, tmp583, tmp585 -@ Patches/../C_code.c:7429: PutDrawText( +@ Patches/../C_code.c:7434: PutDrawText( str r3, [sp, #4] @ tmp584, movs r3, #16 @ tmp586, movs r2, #0 @, str r3, [sp] @ tmp586, -@ Patches/../C_code.c:7429: PutDrawText( +@ Patches/../C_code.c:7434: PutDrawText( add r1, r1, r8 @ tmp576, tmp927 -@ Patches/../C_code.c:7429: PutDrawText( +@ Patches/../C_code.c:7434: PutDrawText( movs r3, #0 @, -@ Patches/../C_code.c:7429: PutDrawText( +@ Patches/../C_code.c:7434: PutDrawText( adds r0, r6, r0 @ tmp578, tmp934, _1267 -@ Patches/../C_code.c:7429: PutDrawText( +@ Patches/../C_code.c:7434: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:7433: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7438: if (i > SRR_MAXDISP) cmp r4, #8 @ _1279, - bne .LCB20471 @ - b .L3249 @long jump @ -.LCB20471: -@ Patches/../C_code.c:7439: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20495 @ + b .L3252 @long jump @ +.LCB20495: +@ Patches/../C_code.c:7444: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp588, _1279 -@ Patches/../C_code.c:7439: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7444: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp590, _1279, -@ Patches/../C_code.c:7439: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7444: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp588, -@ Patches/../C_code.c:7439: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7444: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1285, tmp588, -@ Patches/../C_code.c:7439: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7444: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1295, -@ Patches/../C_code.c:7441: i++; +@ Patches/../C_code.c:7446: i++; adds r4, r4, #1 @ _1297, - b .L3267 @ -.L3287: -@ Patches/../C_code.c:7359: switch (offset2) + b .L3270 @ +.L3290: +@ Patches/../C_code.c:7364: switch (offset2) movs r3, #222 @ prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 subs r3, r3, #158 @ prephitmp_1247, mov r10, r3 @ prephitmp_1247, prephitmp_1247 - ldr r3, .L3371 @ tmp927, + ldr r3, .L3374 @ tmp927, mov r8, r3 @ tmp927, tmp927 - ldr r3, .L3371+28 @ tmp930, + ldr r3, .L3374+28 @ tmp930, movs r4, #1 @ prephitmp_1253, mov r9, r3 @ tmp930, tmp930 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3269: -@ Patches/../C_code.c:7422: PutStringInBuffer(Option6[proc->Option[6]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3272: +@ Patches/../C_code.c:7427: PutStringInBuffer(Option6[proc->Option[6]], UseHuffmanEncoding)); movs r2, #68 @ tmp563, -@ Patches/../C_code.c:7420: PutDrawText( +@ Patches/../C_code.c:7425: PutDrawText( mov r3, r10 @ prephitmp_1247, prephitmp_1247 -@ Patches/../C_code.c:7422: PutStringInBuffer(Option6[proc->Option[6]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7427: PutStringInBuffer(Option6[proc->Option[6]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp564, mov ip, r2 @ tmp564, tmp564 -@ Patches/../C_code.c:7420: PutDrawText( +@ Patches/../C_code.c:7425: PutDrawText( adds r0, r6, r3 @ tmp559, tmp934, prephitmp_1247 -@ Patches/../C_code.c:7422: PutStringInBuffer(Option6[proc->Option[6]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7427: PutStringInBuffer(Option6[proc->Option[6]], UseHuffmanEncoding)); mov r3, r9 @ tmp930, tmp930 lsls r2, r2, #2 @ tmp566, tmp564, add r2, r2, ip @ tmp567, tmp564 lsls r2, r2, #1 @ tmp568, tmp567, adds r3, r3, #96 @ tmp930, adds r3, r3, r2 @ tmp569, tmp562, tmp568 -@ Patches/../C_code.c:7420: PutDrawText( +@ Patches/../C_code.c:7425: PutDrawText( mov r1, fp @ prephitmp_1252, prephitmp_1252 -@ Patches/../C_code.c:7420: PutDrawText( +@ Patches/../C_code.c:7425: PutDrawText( str r3, [sp, #4] @ tmp569, movs r3, #16 @ tmp570, movs r2, #0 @, str r3, [sp] @ tmp570, -@ Patches/../C_code.c:7420: PutDrawText( +@ Patches/../C_code.c:7425: PutDrawText( add r1, r1, r8 @ prephitmp_1252, tmp927 -@ Patches/../C_code.c:7420: PutDrawText( +@ Patches/../C_code.c:7425: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:7424: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7429: if (i > SRR_MAXDISP) cmp r4, #8 @ prephitmp_1253, - bne .LCB20517 @ - b .L3249 @long jump @ -.LCB20517: -@ Patches/../C_code.c:7430: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, + bne .LCB20541 @ + b .L3252 @long jump @ +.LCB20541: +@ Patches/../C_code.c:7435: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp572, prephitmp_1253 -@ Patches/../C_code.c:7430: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7435: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp574, prephitmp_1253, -@ Patches/../C_code.c:7430: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7435: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp572, -@ Patches/../C_code.c:7430: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7435: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ _1267, tmp572, -@ Patches/../C_code.c:7430: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7435: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r1, r1, #222 @ _1277, -@ Patches/../C_code.c:7432: i++; +@ Patches/../C_code.c:7437: i++; adds r4, r4, #1 @ _1279, - b .L3268 @ -.L3286: -@ Patches/../C_code.c:7359: switch (offset2) + b .L3271 @ +.L3289: +@ Patches/../C_code.c:7364: switch (offset2) movs r3, #175 @ prephitmp_1252, lsls r3, r3, #1 @ prephitmp_1252, prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 @@ -24816,19 +24847,19 @@ DrawConfigMenu: str r3, [sp, #16] @ prephitmp_1225, %sfp subs r3, r3, #158 @ prephitmp_1220, str r3, [sp, #12] @ prephitmp_1220, %sfp - ldr r3, .L3371 @ tmp927, + ldr r3, .L3374 @ tmp927, movs r4, #2 @ prephitmp_1253, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3270: -@ Patches/../C_code.c:7413: PutStringInBuffer(Option5[proc->Option[5]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3273: +@ Patches/../C_code.c:7418: PutStringInBuffer(Option5[proc->Option[5]], UseHuffmanEncoding)); movs r2, #67 @ tmp549, -@ Patches/../C_code.c:7411: PutDrawText( +@ Patches/../C_code.c:7416: PutDrawText( ldr r3, [sp, #12] @ prephitmp_1220, %sfp adds r0, r6, r3 @ tmp545, tmp934, prephitmp_1220 -@ Patches/../C_code.c:7413: PutStringInBuffer(Option5[proc->Option[5]], UseHuffmanEncoding)); - ldr r3, .L3371+28 @ tmp930, +@ Patches/../C_code.c:7418: PutStringInBuffer(Option5[proc->Option[5]], UseHuffmanEncoding)); + ldr r3, .L3374+28 @ tmp930, mov r9, r3 @ tmp930, tmp930 adds r3, r3, #48 @ tmp548, str r3, [sp, #12] @ tmp548, %sfp @@ -24839,22 +24870,22 @@ DrawConfigMenu: subs r2, r2, r3 @ tmp553, tmp552, tmp550 ldr r3, [sp, #12] @ tmp548, %sfp adds r3, r3, r2 @ tmp554, tmp548, tmp553 -@ Patches/../C_code.c:7411: PutDrawText( +@ Patches/../C_code.c:7416: PutDrawText( str r3, [sp, #4] @ tmp554, movs r3, #16 @ tmp555, -@ Patches/../C_code.c:7411: PutDrawText( +@ Patches/../C_code.c:7416: PutDrawText( ldr r1, [sp, #16] @ prephitmp_1225, %sfp -@ Patches/../C_code.c:7411: PutDrawText( +@ Patches/../C_code.c:7416: PutDrawText( str r3, [sp] @ tmp555, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7411: PutDrawText( +@ Patches/../C_code.c:7416: PutDrawText( add r1, r1, r8 @ prephitmp_1225, tmp927 -@ Patches/../C_code.c:7411: PutDrawText( +@ Patches/../C_code.c:7416: PutDrawText( bl .L62 @ - b .L3269 @ -.L3285: -@ Patches/../C_code.c:7359: switch (offset2) + b .L3272 @ +.L3288: +@ Patches/../C_code.c:7364: switch (offset2) movs r3, #239 @ prephitmp_1252, lsls r3, r3, #1 @ prephitmp_1252, prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 @@ -24871,23 +24902,23 @@ DrawConfigMenu: str r3, [sp, #24] @ prephitmp_1189, %sfp subs r3, r3, #158 @ prephitmp_1184, str r3, [sp, #20] @ prephitmp_1184, %sfp - ldr r3, .L3371 @ tmp927, + ldr r3, .L3374 @ tmp927, mov r8, r3 @ tmp927, tmp927 - ldr r3, .L3371+32 @ tmp929, + ldr r3, .L3374+32 @ tmp929, movs r4, #3 @ prephitmp_1253, mov r9, r3 @ tmp929, tmp929 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3271: -@ Patches/../C_code.c:7404: PutStringInBuffer(Option4[proc->Option[4]], UseHuffmanEncoding)); + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3274: +@ Patches/../C_code.c:7409: PutStringInBuffer(Option4[proc->Option[4]], UseHuffmanEncoding)); movs r2, #66 @ tmp535, -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( ldr r3, [sp, #20] @ prephitmp_1184, %sfp -@ Patches/../C_code.c:7404: PutStringInBuffer(Option4[proc->Option[4]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7409: PutStringInBuffer(Option4[proc->Option[4]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp536, -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( adds r0, r6, r3 @ tmp531, tmp934, prephitmp_1184 -@ Patches/../C_code.c:7404: PutStringInBuffer(Option4[proc->Option[4]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7409: PutStringInBuffer(Option4[proc->Option[4]], UseHuffmanEncoding)); mov r3, r9 @ tmp929, tmp929 mov ip, r2 @ tmp536, tmp536 adds r3, r3, #100 @ tmp929, @@ -24897,23 +24928,23 @@ DrawConfigMenu: subs r2, r2, r3 @ tmp539, tmp538, tmp536 movs r3, r2 @ tmp539, tmp539 add r3, r3, r9 @ tmp539, tmp534 -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( str r3, [sp, #4] @ tmp540, movs r3, #16 @ tmp541, -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( ldr r1, [sp, #24] @ prephitmp_1189, %sfp -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( str r3, [sp] @ tmp541, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( add r1, r1, r8 @ prephitmp_1189, tmp927 -@ Patches/../C_code.c:7402: PutDrawText( +@ Patches/../C_code.c:7407: PutDrawText( bl .L62 @ - b .L3270 @ -.L3284: -@ Patches/../C_code.c:7359: switch (offset2) - ldr r3, .L3371+36 @ prephitmp_1252, + b .L3273 @ +.L3287: +@ Patches/../C_code.c:7364: switch (offset2) + ldr r3, .L3374+36 @ prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 movs r3, #88 @ prephitmp_1247, mov r10, r3 @ prephitmp_1247, prephitmp_1247 @@ -24933,46 +24964,46 @@ DrawConfigMenu: str r3, [sp, #28] @ prephitmp_1144, %sfp subs r3, r3, #158 @ prephitmp_1139, mov r9, r3 @ prephitmp_1139, prephitmp_1139 - ldr r3, .L3371 @ tmp927, + ldr r3, .L3374 @ tmp927, movs r4, #4 @ prephitmp_1253, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3272: -@ Patches/../C_code.c:7393: PutDrawText( + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3275: +@ Patches/../C_code.c:7398: PutDrawText( mov r3, r9 @ prephitmp_1139, prephitmp_1139 -@ Patches/../C_code.c:7395: PutStringInBuffer(Option3[proc->Option[3]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7400: PutStringInBuffer(Option3[proc->Option[3]], UseHuffmanEncoding)); movs r2, #65 @ tmp523, -@ Patches/../C_code.c:7393: PutDrawText( +@ Patches/../C_code.c:7398: PutDrawText( adds r0, r6, r3 @ tmp519, tmp934, prephitmp_1139 -@ Patches/../C_code.c:7395: PutStringInBuffer(Option3[proc->Option[3]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7400: PutStringInBuffer(Option3[proc->Option[3]], UseHuffmanEncoding)); ldrsb r2, [r5, r2] @ tmp524, - ldr r3, .L3371+32 @ tmp929, + ldr r3, .L3374+32 @ tmp929, lsls r2, r2, #3 @ tmp525, tmp524, mov r9, r3 @ tmp929, tmp929 adds r3, r3, #84 @ tmp522, adds r3, r3, r2 @ tmp526, tmp522, tmp525 -@ Patches/../C_code.c:7393: PutDrawText( +@ Patches/../C_code.c:7398: PutDrawText( str r3, [sp, #4] @ tmp526, movs r3, #16 @ tmp527, -@ Patches/../C_code.c:7393: PutDrawText( +@ Patches/../C_code.c:7398: PutDrawText( ldr r1, [sp, #28] @ prephitmp_1144, %sfp -@ Patches/../C_code.c:7393: PutDrawText( +@ Patches/../C_code.c:7398: PutDrawText( str r3, [sp] @ tmp527, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7393: PutDrawText( +@ Patches/../C_code.c:7398: PutDrawText( add r1, r1, r8 @ prephitmp_1144, tmp927 -@ Patches/../C_code.c:7393: PutDrawText( +@ Patches/../C_code.c:7398: PutDrawText( bl .L62 @ - b .L3271 @ -.L3283: -@ Patches/../C_code.c:7359: switch (offset2) - ldr r3, .L3371+40 @ prephitmp_1252, + b .L3274 @ +.L3286: +@ Patches/../C_code.c:7364: switch (offset2) + ldr r3, .L3374+40 @ prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 movs r3, #96 @ prephitmp_1247, mov r10, r3 @ prephitmp_1247, prephitmp_1247 - ldr r3, .L3371+36 @ prephitmp_1225, + ldr r3, .L3374+36 @ prephitmp_1225, str r3, [sp, #16] @ prephitmp_1225, %sfp movs r3, #88 @ prephitmp_1220, str r3, [sp, #12] @ prephitmp_1220, %sfp @@ -24992,39 +25023,39 @@ DrawConfigMenu: str r3, [sp, #36] @ prephitmp_1090, %sfp subs r3, r3, #158 @ prephitmp_1085, str r3, [sp, #32] @ prephitmp_1085, %sfp - ldr r3, .L3371 @ tmp927, + ldr r3, .L3374 @ tmp927, movs r4, #5 @ prephitmp_1253, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3371+4 @ tmp934, - ldr r7, .L3371+8 @ tmp928, -.L3273: -@ Patches/../C_code.c:7384: PutDrawText( + ldr r6, .L3374+4 @ tmp934, + ldr r7, .L3374+8 @ tmp928, +.L3276: +@ Patches/../C_code.c:7389: PutDrawText( ldr r3, [sp, #32] @ prephitmp_1085, %sfp adds r0, r6, r3 @ tmp508, tmp934, prephitmp_1085 -@ Patches/../C_code.c:7386: PutStringInBuffer(Option2[proc->Option[2]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7391: PutStringInBuffer(Option2[proc->Option[2]], UseHuffmanEncoding)); movs r3, #64 @ tmp510, -@ Patches/../C_code.c:7386: PutStringInBuffer(Option2[proc->Option[2]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7391: PutStringInBuffer(Option2[proc->Option[2]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp511, - ldr r2, .L3371+44 @ tmp514, + ldr r2, .L3374+44 @ tmp514, lsls r3, r3, #5 @ tmp512, tmp511, adds r3, r3, r2 @ tmp513, tmp512, tmp514 -@ Patches/../C_code.c:7384: PutDrawText( +@ Patches/../C_code.c:7389: PutDrawText( str r3, [sp, #4] @ tmp513, movs r3, #16 @ tmp515, -@ Patches/../C_code.c:7384: PutDrawText( +@ Patches/../C_code.c:7389: PutDrawText( ldr r1, [sp, #36] @ prephitmp_1090, %sfp -@ Patches/../C_code.c:7384: PutDrawText( +@ Patches/../C_code.c:7389: PutDrawText( str r3, [sp] @ tmp515, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7384: PutDrawText( +@ Patches/../C_code.c:7389: PutDrawText( add r1, r1, r8 @ prephitmp_1090, tmp927 -@ Patches/../C_code.c:7384: PutDrawText( +@ Patches/../C_code.c:7389: PutDrawText( bl .L62 @ - b .L3272 @ -.L3372: + b .L3275 @ +.L3375: .align 2 -.L3371: +.L3374: .word gBG0TilemapBuffer .word gStatScreen+24 .word PutDrawText @@ -25037,17 +25068,17 @@ DrawConfigMenu: .word 606 .word 734 .word Option2 -.L3282: -@ Patches/../C_code.c:7359: switch (offset2) - ldr r3, .L3373 @ prephitmp_1252, +.L3285: +@ Patches/../C_code.c:7364: switch (offset2) + ldr r3, .L3376 @ prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 movs r3, #104 @ prephitmp_1247, mov r10, r3 @ prephitmp_1247, prephitmp_1247 - ldr r3, .L3373+4 @ prephitmp_1225, + ldr r3, .L3376+4 @ prephitmp_1225, str r3, [sp, #16] @ prephitmp_1225, %sfp movs r3, #96 @ prephitmp_1220, str r3, [sp, #12] @ prephitmp_1220, %sfp - ldr r3, .L3373+8 @ prephitmp_1189, + ldr r3, .L3376+8 @ prephitmp_1189, str r3, [sp, #24] @ prephitmp_1189, %sfp movs r3, #88 @ prephitmp_1184, str r3, [sp, #20] @ prephitmp_1184, %sfp @@ -25067,51 +25098,51 @@ DrawConfigMenu: str r3, [sp, #44] @ prephitmp_1027, %sfp subs r3, r3, #158 @ prephitmp_1022, str r3, [sp, #40] @ prephitmp_1022, %sfp - ldr r3, .L3373+12 @ tmp927, + ldr r3, .L3376+12 @ tmp927, movs r4, #6 @ prephitmp_1253, mov r8, r3 @ tmp927, tmp927 - ldr r6, .L3373+16 @ tmp934, - ldr r7, .L3373+20 @ tmp928, -.L3274: -@ Patches/../C_code.c:7375: PutDrawText( + ldr r6, .L3376+16 @ tmp934, + ldr r7, .L3376+20 @ tmp928, +.L3277: +@ Patches/../C_code.c:7380: PutDrawText( ldr r3, [sp, #40] @ prephitmp_1022, %sfp adds r0, r6, r3 @ tmp497, tmp934, prephitmp_1022 -@ Patches/../C_code.c:7377: PutStringInBuffer(Option1[proc->Option[1]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7382: PutStringInBuffer(Option1[proc->Option[1]], UseHuffmanEncoding)); movs r3, #63 @ tmp499, -@ Patches/../C_code.c:7377: PutStringInBuffer(Option1[proc->Option[1]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7382: PutStringInBuffer(Option1[proc->Option[1]], UseHuffmanEncoding)); ldrsb r3, [r5, r3] @ tmp500, - ldr r2, .L3373+24 @ tmp503, + ldr r2, .L3376+24 @ tmp503, lsls r3, r3, #5 @ tmp501, tmp500, adds r3, r3, r2 @ tmp502, tmp501, tmp503 -@ Patches/../C_code.c:7375: PutDrawText( +@ Patches/../C_code.c:7380: PutDrawText( str r3, [sp, #4] @ tmp502, movs r3, #16 @ tmp504, -@ Patches/../C_code.c:7375: PutDrawText( +@ Patches/../C_code.c:7380: PutDrawText( ldr r1, [sp, #44] @ prephitmp_1027, %sfp -@ Patches/../C_code.c:7375: PutDrawText( +@ Patches/../C_code.c:7380: PutDrawText( str r3, [sp] @ tmp504, movs r2, #0 @, movs r3, #0 @, -@ Patches/../C_code.c:7375: PutDrawText( +@ Patches/../C_code.c:7380: PutDrawText( add r1, r1, r8 @ prephitmp_1027, tmp927 -@ Patches/../C_code.c:7375: PutDrawText( +@ Patches/../C_code.c:7380: PutDrawText( bl .L62 @ - b .L3273 @ -.L3281: -@ Patches/../C_code.c:7359: switch (offset2) - ldr r3, .L3373+28 @ prephitmp_1252, + b .L3276 @ +.L3284: +@ Patches/../C_code.c:7364: switch (offset2) + ldr r3, .L3376+28 @ prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 movs r3, #112 @ prephitmp_1247, mov r10, r3 @ prephitmp_1247, prephitmp_1247 - ldr r3, .L3373 @ prephitmp_1225, + ldr r3, .L3376 @ prephitmp_1225, str r3, [sp, #16] @ prephitmp_1225, %sfp movs r3, #104 @ prephitmp_1220, str r3, [sp, #12] @ prephitmp_1220, %sfp - ldr r3, .L3373+4 @ prephitmp_1189, + ldr r3, .L3376+4 @ prephitmp_1189, str r3, [sp, #24] @ prephitmp_1189, %sfp movs r3, #96 @ prephitmp_1184, str r3, [sp, #20] @ prephitmp_1184, %sfp - ldr r3, .L3373+8 @ prephitmp_1144, + ldr r3, .L3376+8 @ prephitmp_1144, str r3, [sp, #28] @ prephitmp_1144, %sfp movs r3, #88 @ prephitmp_1139, movs r4, #7 @ prephitmp_1253, @@ -25130,73 +25161,73 @@ DrawConfigMenu: subs r3, r3, #23 @ prephitmp_1022, subs r3, r3, #255 @ prephitmp_1022, str r3, [sp, #40] @ prephitmp_1022, %sfp -.L3275: -@ Patches/../C_code.c:7368: PutStringInBuffer(Option0[proc->Option[0]], UseHuffmanEncoding)); +.L3278: +@ Patches/../C_code.c:7373: PutStringInBuffer(Option0[proc->Option[0]], UseHuffmanEncoding)); movs r2, #62 @ tmp487, -@ Patches/../C_code.c:7366: PutDrawText( - ldr r3, .L3373+12 @ tmp927, -@ Patches/../C_code.c:7368: PutStringInBuffer(Option0[proc->Option[0]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7371: PutDrawText( + ldr r3, .L3376+12 @ tmp927, +@ Patches/../C_code.c:7373: PutStringInBuffer(Option0[proc->Option[0]], UseHuffmanEncoding)); ldrsb r7, [r5, r2] @ tmp488, -@ Patches/../C_code.c:7366: PutDrawText( +@ Patches/../C_code.c:7371: PutDrawText( mov r8, r3 @ tmp927, tmp927 -@ Patches/../C_code.c:7368: PutStringInBuffer(Option0[proc->Option[0]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7373: PutStringInBuffer(Option0[proc->Option[0]], UseHuffmanEncoding)); lsls r2, r7, #2 @ tmp490, tmp488, - ldr r3, .L3373+32 @ tmp486, + ldr r3, .L3376+32 @ tmp486, adds r2, r2, r7 @ tmp491, tmp490, tmp488 adds r3, r3, r2 @ tmp492, tmp486, tmp491 -@ Patches/../C_code.c:7366: PutDrawText( +@ Patches/../C_code.c:7371: PutDrawText( str r3, [sp, #4] @ tmp492, movs r3, #16 @ tmp493, -@ Patches/../C_code.c:7366: PutDrawText( - ldr r6, .L3373+16 @ tmp934, -@ Patches/../C_code.c:7366: PutDrawText( +@ Patches/../C_code.c:7371: PutDrawText( + ldr r6, .L3376+16 @ tmp934, +@ Patches/../C_code.c:7371: PutDrawText( str r3, [sp] @ tmp493, movs r2, #0 @, movs r3, #0 @, - ldr r7, .L3373+20 @ tmp928, -@ Patches/../C_code.c:7366: PutDrawText( + ldr r7, .L3376+20 @ tmp928, +@ Patches/../C_code.c:7371: PutDrawText( add r1, r1, r8 @ tmp481, tmp927 adds r0, r6, r0 @ tmp483, tmp934, prephitmp_1013 -@ Patches/../C_code.c:7366: PutDrawText( +@ Patches/../C_code.c:7371: PutDrawText( bl .L62 @ - b .L3274 @ -.L3305: -@ Patches/../C_code.c:7359: switch (offset2) + b .L3277 @ +.L3308: +@ Patches/../C_code.c:7364: switch (offset2) movs r4, #0 @ i, - bl .L3250 @ far jump @ -.L3276: -@ Patches/../C_code.c:7362: TileMap_FillRect(TILEMAP_LOCATED(gBG0TilemapBuffer, NUMBER_X - 7, Y_HAND), 9, 2, 0); // seed first - ldr r4, .L3373+36 @ tmp476, + bl .L3253 @ far jump @ +.L3279: +@ Patches/../C_code.c:7367: TileMap_FillRect(TILEMAP_LOCATED(gBG0TilemapBuffer, NUMBER_X - 7, Y_HAND), 9, 2, 0); // seed first + ldr r4, .L3376+36 @ tmp476, movs r3, #0 @, movs r0, r4 @, tmp476 movs r2, #2 @, movs r1, #9 @, - ldr r6, .L3373+40 @ tmp477, - bl .L143 @ -@ Patches/../C_code.c:7363: PutNumber(TILEMAP_LOCATED(gBG0TilemapBuffer, NUMBER_X - 1, 3 + ((i) * 2)), white, proc->seed); + ldr r6, .L3376+40 @ tmp477, + bl .L146 @ +@ Patches/../C_code.c:7368: PutNumber(TILEMAP_LOCATED(gBG0TilemapBuffer, NUMBER_X - 1, 3 + ((i) * 2)), white, proc->seed); movs r0, r4 @ tmp476, tmp476 movs r1, #0 @, - ldr r3, .L3373+44 @ tmp480, + ldr r3, .L3376+44 @ tmp480, adds r0, r0, #12 @ tmp476, ldr r2, [r5, #44] @ proc_404(D)->seed, proc_404(D)->seed bl .L14 @ - ldr r3, .L3373+48 @ prephitmp_1252, + ldr r3, .L3376+48 @ prephitmp_1252, mov fp, r3 @ prephitmp_1252, prephitmp_1252 movs r3, #120 @ prephitmp_1247, mov r10, r3 @ prephitmp_1247, prephitmp_1247 - ldr r3, .L3373+28 @ prephitmp_1225, + ldr r3, .L3376+28 @ prephitmp_1225, str r3, [sp, #16] @ prephitmp_1225, %sfp movs r3, #112 @ prephitmp_1220, str r3, [sp, #12] @ prephitmp_1220, %sfp - ldr r3, .L3373 @ prephitmp_1189, + ldr r3, .L3376 @ prephitmp_1189, str r3, [sp, #24] @ prephitmp_1189, %sfp movs r3, #104 @ prephitmp_1184, str r3, [sp, #20] @ prephitmp_1184, %sfp - ldr r3, .L3373+4 @ prephitmp_1144, + ldr r3, .L3376+4 @ prephitmp_1144, str r3, [sp, #28] @ prephitmp_1144, %sfp movs r3, #96 @ prephitmp_1139, mov r9, r3 @ prephitmp_1139, prephitmp_1139 - ldr r3, .L3373+8 @ prephitmp_1090, + ldr r3, .L3376+8 @ prephitmp_1090, str r3, [sp, #36] @ prephitmp_1090, %sfp movs r3, #88 @ prephitmp_1085, movs r1, #175 @ prephitmp_1018, @@ -25210,69 +25241,69 @@ DrawConfigMenu: movs r0, #72 @ prephitmp_1013, str r3, [sp, #40] @ prephitmp_1022, %sfp lsls r1, r1, #1 @ prephitmp_1018, prephitmp_1018, - b .L3275 @ -.L3368: -@ Patches/../C_code.c:7583: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); + b .L3278 @ +.L3371: +@ Patches/../C_code.c:7588: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); movs r2, #85 @ tmp882, -@ Patches/../C_code.c:7582: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7587: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, movs r0, r4 @ tmp876, i -@ Patches/../C_code.c:7581: PutDrawText( - ldr r3, .L3373+52 @ tmp875, -@ Patches/../C_code.c:7583: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7586: PutDrawText( + ldr r3, .L3376+52 @ tmp875, +@ Patches/../C_code.c:7588: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); ldrsb r6, [r5, r2] @ tmp883, -@ Patches/../C_code.c:7582: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7587: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r1, r4, #7 @ tmp871, i, -@ Patches/../C_code.c:7581: PutDrawText( +@ Patches/../C_code.c:7586: PutDrawText( adds r1, r1, r3 @ tmp874, tmp871, tmp875 -@ Patches/../C_code.c:7582: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7587: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, adds r0, r0, #8 @ tmp876, -@ Patches/../C_code.c:7581: PutDrawText( - ldr r3, .L3373+16 @ tmp879, -@ Patches/../C_code.c:7583: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7586: PutDrawText( + ldr r3, .L3376+16 @ tmp879, +@ Patches/../C_code.c:7588: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); lsls r2, r6, #2 @ tmp885, tmp883, -@ Patches/../C_code.c:7582: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, +@ Patches/../C_code.c:7587: &th[i + offset + hOff], TILEMAP_LOCATED(gBG0TilemapBuffer, 15, 3 + ((i) * 2)), white, 0, MaxRTW, lsls r0, r0, #3 @ tmp877, tmp876, -@ Patches/../C_code.c:7581: PutDrawText( +@ Patches/../C_code.c:7586: PutDrawText( adds r0, r0, r3 @ tmp878, tmp877, tmp879 -@ Patches/../C_code.c:7583: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); +@ Patches/../C_code.c:7588: PutStringInBuffer(Option23[proc->Option[23]], UseHuffmanEncoding)); adds r2, r2, r6 @ tmp886, tmp885, tmp883 - ldr r3, .L3373+56 @ tmp881, + ldr r3, .L3376+56 @ tmp881, lsls r2, r2, #1 @ tmp887, tmp886, adds r3, r3, r2 @ tmp888, tmp881, tmp887 -@ Patches/../C_code.c:7581: PutDrawText( +@ Patches/../C_code.c:7586: PutDrawText( str r3, [sp, #4] @ tmp888, movs r3, #16 @ tmp889, movs r2, #0 @, str r3, [sp] @ tmp889, - ldr r6, .L3373+20 @ tmp890, + ldr r6, .L3376+20 @ tmp890, movs r3, #0 @, -@ Patches/../C_code.c:7584: i++; +@ Patches/../C_code.c:7589: i++; adds r4, r4, #1 @ i, -@ Patches/../C_code.c:7581: PutDrawText( - bl .L143 @ -@ Patches/../C_code.c:7585: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:7586: PutDrawText( + bl .L146 @ +@ Patches/../C_code.c:7590: if (i > SRR_MAXDISP) cmp r4, #8 @ i, - beq .LCB20929 @ - bl .L3250 @far jump @ -.LCB20929: - bl .L3249 @ far jump @ -.L3280: -@ Patches/../C_code.c:7607: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); + beq .LCB20953 @ + bl .L3253 @far jump @ +.LCB20953: + bl .L3252 @ far jump @ +.L3283: +@ Patches/../C_code.c:7612: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); bl GetSkillName @ -@ Patches/../C_code.c:7607: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); - ldr r3, .L3373+60 @ tmp922, -@ Patches/../C_code.c:7607: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); +@ Patches/../C_code.c:7612: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); + ldr r3, .L3376+60 @ tmp922, +@ Patches/../C_code.c:7612: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); movs r1, r0 @ _349, tmp936 -@ Patches/../C_code.c:7607: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); +@ Patches/../C_code.c:7612: GetCombinedString(Option24[proc->Option[24]], GetSkillName(proc->skill), string)); add r2, sp, #48 @,, movs r0, r3 @ tmp922, tmp922 bl GetCombinedString @ -@ Patches/../C_code.c:7605: PutDrawText( +@ Patches/../C_code.c:7610: PutDrawText( str r0, [sp, #4] @ tmp937, - bl .L3366 @ far jump @ -.L3374: + bl .L3369 @ far jump @ +.L3377: .align 2 -.L3373: +.L3376: .word 862 .word 734 .word 606 @@ -25302,85 +25333,85 @@ DisplayVertUiHand: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:7698: if ((GetGameClock() - 1) == sPrevHandClockFrame) - ldr r6, .L3379 @ tmp163, -@ Patches/../C_code.c:7697: { +@ Patches/../C_code.c:7703: if ((GetGameClock() - 1) == sPrevHandClockFrame) + ldr r6, .L3382 @ tmp164, +@ Patches/../C_code.c:7702: { sub sp, sp, #12 @,, -@ Patches/../C_code.c:7697: { +@ Patches/../C_code.c:7702: { movs r4, r0 @ x, tmp165 movs r5, r1 @ y, tmp166 -@ Patches/../C_code.c:7698: if ((GetGameClock() - 1) == sPrevHandClockFrame) - bl .L143 @ -@ Patches/../C_code.c:7698: if ((GetGameClock() - 1) == sPrevHandClockFrame) - ldr r7, .L3379+4 @ tmp164, -@ Patches/../C_code.c:7698: if ((GetGameClock() - 1) == sPrevHandClockFrame) +@ Patches/../C_code.c:7703: if ((GetGameClock() - 1) == sPrevHandClockFrame) + bl .L146 @ +@ Patches/../C_code.c:7703: if ((GetGameClock() - 1) == sPrevHandClockFrame) + ldr r7, .L3382+4 @ tmp162, +@ Patches/../C_code.c:7703: if ((GetGameClock() - 1) == sPrevHandClockFrame) ldr r3, [r7] @ sPrevHandClockFrame, sPrevHandClockFrame -@ Patches/../C_code.c:7698: if ((GetGameClock() - 1) == sPrevHandClockFrame) +@ Patches/../C_code.c:7703: if ((GetGameClock() - 1) == sPrevHandClockFrame) subs r0, r0, #1 @ tmp138, -@ Patches/../C_code.c:7698: if ((GetGameClock() - 1) == sPrevHandClockFrame) +@ Patches/../C_code.c:7703: if ((GetGameClock() - 1) == sPrevHandClockFrame) cmp r0, r3 @ tmp138, sPrevHandClockFrame - beq .L3378 @, - ldr r3, .L3379+8 @ tmp162, -.L3376: -@ Patches/../C_code.c:7704: sPrevHandScreenPosition.x = x; + beq .L3381 @, + ldr r3, .L3382+8 @ tmp163, +.L3379: +@ Patches/../C_code.c:7709: sPrevHandScreenPosition.x = x; strh r4, [r3] @ x, sPrevHandScreenPosition.x -@ Patches/../C_code.c:7705: sPrevHandScreenPosition.y = y; +@ Patches/../C_code.c:7710: sPrevHandScreenPosition.y = y; strh r5, [r3, #2] @ y, sPrevHandScreenPosition.y -@ Patches/../C_code.c:7706: sPrevHandClockFrame = GetGameClock(); - bl .L143 @ -@ Patches/../C_code.c:7706: sPrevHandClockFrame = GetGameClock(); +@ Patches/../C_code.c:7711: sPrevHandClockFrame = GetGameClock(); + bl .L146 @ +@ Patches/../C_code.c:7711: sPrevHandClockFrame = GetGameClock(); str r0, [r7] @ tmp168, sPrevHandClockFrame -@ Patches/../C_code.c:7708: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); - bl .L143 @ -@ Patches/../C_code.c:7708: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); - ldr r3, .L3379+12 @ tmp152, +@ Patches/../C_code.c:7713: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); + bl .L146 @ +@ Patches/../C_code.c:7713: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); + ldr r3, .L3382+12 @ tmp152, movs r1, #32 @, bl .L14 @ -@ Patches/../C_code.c:7709: PutSprite(2, x, y, sSprite_VertHand, 0); - ldr r2, .L3379+16 @ tmp153, +@ Patches/../C_code.c:7714: PutSprite(2, x, y, sSprite_VertHand, 0); + ldr r2, .L3382+16 @ tmp153, movs r1, #0 @ tmp160, movs r3, r2 @ tmp154, tmp153 -@ Patches/../C_code.c:7708: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); +@ Patches/../C_code.c:7713: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); adds r2, r2, r0 @ tmp156, tmp153, tmp170 ldrb r2, [r2, #28] @ tmp157, sHandVOffsetLookup -@ Patches/../C_code.c:7708: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); +@ Patches/../C_code.c:7713: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); subs r2, r2, #14 @ tmp158, -@ Patches/../C_code.c:7709: PutSprite(2, x, y, sSprite_VertHand, 0); +@ Patches/../C_code.c:7714: PutSprite(2, x, y, sSprite_VertHand, 0); str r1, [sp] @ tmp160, movs r0, #2 @, movs r1, r4 @, x adds r3, r3, #20 @ tmp154, - ldr r4, .L3379+20 @ tmp161, -@ Patches/../C_code.c:7708: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); + ldr r4, .L3382+20 @ tmp161, +@ Patches/../C_code.c:7713: y += (sHandVOffsetLookup[Mod(GetGameClock(), ARRAY_COUNT(sHandVOffsetLookup))] - 14); adds r2, r2, r5 @ y, tmp158, y -@ Patches/../C_code.c:7709: PutSprite(2, x, y, sSprite_VertHand, 0); - bl .L269 @ -@ Patches/../C_code.c:7710: } +@ Patches/../C_code.c:7714: PutSprite(2, x, y, sSprite_VertHand, 0); + bl .L272 @ +@ Patches/../C_code.c:7715: } add sp, sp, #12 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3378: -@ Patches/../C_code.c:7700: x = (x + sPrevHandScreenPosition.x) >> 1; - ldr r3, .L3379+8 @ tmp162, +.L3381: +@ Patches/../C_code.c:7705: x = (x + sPrevHandScreenPosition.x) >> 1; + ldr r3, .L3382+8 @ tmp163, movs r1, #0 @ tmp172, - ldrsh r2, [r3, r1] @ sPrevHandScreenPosition, tmp162, tmp172 -@ Patches/../C_code.c:7700: x = (x + sPrevHandScreenPosition.x) >> 1; + ldrsh r2, [r3, r1] @ sPrevHandScreenPosition, tmp163, tmp172 +@ Patches/../C_code.c:7705: x = (x + sPrevHandScreenPosition.x) >> 1; adds r4, r2, r4 @ _7, sPrevHandScreenPosition, x -@ Patches/../C_code.c:7701: y = (y + sPrevHandScreenPosition.y) >> 1; +@ Patches/../C_code.c:7706: y = (y + sPrevHandScreenPosition.y) >> 1; movs r1, #2 @ tmp173, - ldrsh r2, [r3, r1] @ tmp144, tmp162, tmp173 -@ Patches/../C_code.c:7701: y = (y + sPrevHandScreenPosition.y) >> 1; + ldrsh r2, [r3, r1] @ tmp144, tmp163, tmp173 +@ Patches/../C_code.c:7706: y = (y + sPrevHandScreenPosition.y) >> 1; adds r5, r2, r5 @ _10, tmp144, y -@ Patches/../C_code.c:7700: x = (x + sPrevHandScreenPosition.x) >> 1; +@ Patches/../C_code.c:7705: x = (x + sPrevHandScreenPosition.x) >> 1; asrs r4, r4, #1 @ x, _7, -@ Patches/../C_code.c:7701: y = (y + sPrevHandScreenPosition.y) >> 1; +@ Patches/../C_code.c:7706: y = (y + sPrevHandScreenPosition.y) >> 1; asrs r5, r5, #1 @ y, _10, - b .L3376 @ -.L3380: + b .L3379 @ +.L3383: .align 2 -.L3379: +.L3382: .word GetGameClock .word sPrevHandClockFrame .word sPrevHandScreenPosition @@ -25400,26 +25431,26 @@ DisplayHand: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:7632: if (type) +@ Patches/../C_code.c:7637: if (type) cmp r2, #0 @ tmp120, - beq .L3382 @, -@ Patches/../C_code.c:7634: DisplayVertUiHand(x, y); + beq .L3385 @, +@ Patches/../C_code.c:7639: DisplayVertUiHand(x, y); bl DisplayVertUiHand @ -.L3381: -@ Patches/../C_code.c:7640: } +.L3384: +@ Patches/../C_code.c:7645: } @ sp needed @ pop {r4} pop {r0} bx r0 -.L3382: -@ Patches/../C_code.c:7638: DisplayUiHand(x, y); - ldr r3, .L3384 @ tmp117, - bl .L14 @ -@ Patches/../C_code.c:7640: } - b .L3381 @ .L3385: +@ Patches/../C_code.c:7643: DisplayUiHand(x, y); + ldr r3, .L3387 @ tmp117, + bl .L14 @ +@ Patches/../C_code.c:7645: } + b .L3384 @ +.L3388: .align 2 -.L3384: +.L3387: .word DisplayUiHand .size DisplayHand, .-DisplayHand .align 1 @@ -25434,27 +25465,27 @@ InitUnitDef: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:7718: uDef->charIndex = unit->pCharacterData->number; +@ Patches/../C_code.c:7723: uDef->charIndex = unit->pCharacterData->number; ldr r6, [r1] @ _1, unit_33(D)->pCharacterData -@ Patches/../C_code.c:7748: } +@ Patches/../C_code.c:7753: } @ sp needed @ -@ Patches/../C_code.c:7718: uDef->charIndex = unit->pCharacterData->number; +@ Patches/../C_code.c:7723: uDef->charIndex = unit->pCharacterData->number; ldrh r3, [r6, #4] @ MEM [(unsigned char *)_1 + 4B], MEM [(unsigned char *)_1 + 4B] -@ Patches/../C_code.c:7718: uDef->charIndex = unit->pCharacterData->number; +@ Patches/../C_code.c:7723: uDef->charIndex = unit->pCharacterData->number; strh r3, [r0] @ MEM [(unsigned char *)_1 + 4B], MEM [(unsigned char *)uDef_34(D)] -@ Patches/../C_code.c:7720: uDef->leaderCharIndex = unit->supports[UNIT_SUPPORT_MAX_COUNT - 1]; +@ Patches/../C_code.c:7725: uDef->leaderCharIndex = unit->supports[UNIT_SUPPORT_MAX_COUNT - 1]; movs r3, #56 @ tmp161, -@ Patches/../C_code.c:7721: uDef->autolevel = true; +@ Patches/../C_code.c:7726: uDef->autolevel = true; movs r7, #1 @ tmp166, -@ Patches/../C_code.c:7720: uDef->leaderCharIndex = unit->supports[UNIT_SUPPORT_MAX_COUNT - 1]; +@ Patches/../C_code.c:7725: uDef->leaderCharIndex = unit->supports[UNIT_SUPPORT_MAX_COUNT - 1]; ldrb r3, [r1, r3] @ tmp162, -@ Patches/../C_code.c:7724: uDef->xPosition = unit->xPos; +@ Patches/../C_code.c:7729: uDef->xPosition = unit->xPos; movs r5, #16 @ _11, -@ Patches/../C_code.c:7720: uDef->leaderCharIndex = unit->supports[UNIT_SUPPORT_MAX_COUNT - 1]; +@ Patches/../C_code.c:7725: uDef->leaderCharIndex = unit->supports[UNIT_SUPPORT_MAX_COUNT - 1]; strb r3, [r0, #2] @ tmp162, uDef_34(D)->leaderCharIndex -@ Patches/../C_code.c:7725: uDef->yPosition = unit->yPos; +@ Patches/../C_code.c:7730: uDef->yPosition = unit->yPos; movs r3, #17 @ _13, -@ Patches/../C_code.c:7721: uDef->autolevel = true; +@ Patches/../C_code.c:7726: uDef->autolevel = true; ldrb r2, [r1, #11] @ tmp174, ldrb r6, [r6, #11] @ tmp183, lsrs r2, r2, #6 @ tmp175, tmp174, @@ -25462,57 +25493,57 @@ InitUnitDef: orrs r2, r7 @ tmp181, tmp166 lsls r6, r6, #3 @ tmp184, tmp183, orrs r2, r6 @ tmp187, tmp184 -@ Patches/../C_code.c:7724: uDef->xPosition = unit->xPos; +@ Patches/../C_code.c:7729: uDef->xPosition = unit->xPos; ldrsb r5, [r1, r5] @ _11,* _11 -@ Patches/../C_code.c:7725: uDef->yPosition = unit->yPos; +@ Patches/../C_code.c:7730: uDef->yPosition = unit->yPos; ldrsb r3, [r1, r3] @ _13,* _13 -@ Patches/../C_code.c:7733: uDef->itemDrop = (unit->state & US_DROP_ITEM) != 0; +@ Patches/../C_code.c:7738: uDef->itemDrop = (unit->state & US_DROP_ITEM) != 0; ldr r4, [r1, #12] @ unit_33(D)->state, unit_33(D)->state -@ Patches/../C_code.c:7721: uDef->autolevel = true; +@ Patches/../C_code.c:7726: uDef->autolevel = true; strb r2, [r0, #3] @ tmp187, MEM [(struct UnitDefinition *)uDef_34(D) + 3B] -@ Patches/../C_code.c:7724: uDef->xPosition = unit->xPos; +@ Patches/../C_code.c:7729: uDef->xPosition = unit->xPos; movs r2, #63 @ tmp192, -@ Patches/../C_code.c:7733: uDef->itemDrop = (unit->state & US_DROP_ITEM) != 0; +@ Patches/../C_code.c:7738: uDef->itemDrop = (unit->state & US_DROP_ITEM) != 0; lsls r4, r4, #19 @ tmp170, unit_33(D)->state, -@ Patches/../C_code.c:7724: uDef->xPosition = unit->xPos; +@ Patches/../C_code.c:7729: uDef->xPosition = unit->xPos; ands r3, r2 @ tmp193, tmp192 -@ Patches/../C_code.c:7733: uDef->itemDrop = (unit->state & US_DROP_ITEM) != 0; +@ Patches/../C_code.c:7738: uDef->itemDrop = (unit->state & US_DROP_ITEM) != 0; lsrs r4, r4, #31 @ _17, tmp170, -@ Patches/../C_code.c:7724: uDef->xPosition = unit->xPos; +@ Patches/../C_code.c:7729: uDef->xPosition = unit->xPos; ands r2, r5 @ tmp200, _11 lsls r3, r3, #6 @ tmp195, tmp193, orrs r3, r2 @ tmp202, tmp200 lsls r4, r4, #13 @ tmp203, _17, orrs r3, r4 @ tmp204, tmp203 str r3, [r0, #4] @ tmp204, MEM [(struct UnitDefinition *)uDef_34(D) + 4B] -@ Patches/../C_code.c:7738: uDef->redas = NULL; +@ Patches/../C_code.c:7743: uDef->redas = NULL; movs r3, #0 @ tmp205, str r3, [r0, #8] @ tmp205, uDef_34(D)->redas -@ Patches/../C_code.c:7741: uDef->items[1] = unit->items[1]; +@ Patches/../C_code.c:7746: uDef->items[1] = unit->items[1]; ldrh r4, [r1, #32] @ tmp217, -@ Patches/../C_code.c:7740: uDef->items[0] = unit->items[0]; +@ Patches/../C_code.c:7745: uDef->items[0] = unit->items[0]; ldrb r3, [r1, #30] @ tmp221, -@ Patches/../C_code.c:7742: uDef->items[2] = unit->items[2]; +@ Patches/../C_code.c:7747: uDef->items[2] = unit->items[2]; ldrh r2, [r1, #34] @ tmp226, -@ Patches/../C_code.c:7740: uDef->items[0] = unit->items[0]; +@ Patches/../C_code.c:7745: uDef->items[0] = unit->items[0]; lsls r4, r4, #24 @ tmp219, tmp217, lsrs r4, r4, #16 @ tmp220, tmp219, orrs r3, r4 @ tmp230, tmp220 lsls r2, r2, #24 @ tmp228, tmp226, -@ Patches/../C_code.c:7743: uDef->items[3] = unit->items[3]; +@ Patches/../C_code.c:7748: uDef->items[3] = unit->items[3]; ldrh r4, [r1, #36] @ tmp235, -@ Patches/../C_code.c:7740: uDef->items[0] = unit->items[0]; +@ Patches/../C_code.c:7745: uDef->items[0] = unit->items[0]; lsrs r2, r2, #8 @ tmp229, tmp228, lsls r4, r4, #24 @ tmp238, tmp235, orrs r3, r2 @ tmp239, tmp229 orrs r3, r4 @ tmp241, tmp238 str r3, [r0, #12] @ tmp241, MEM [(unsigned char *)uDef_34(D) + 12B] -@ Patches/../C_code.c:7746: uDef->ai[2] = unit->ai3And4 & 0xFF; +@ Patches/../C_code.c:7751: uDef->ai[2] = unit->ai3And4 & 0xFF; movs r3, #64 @ tmp242, ldrh r2, [r1, r3] @ _28, -@ Patches/../C_code.c:7745: uDef->ai[1] = unit->ai2; +@ Patches/../C_code.c:7750: uDef->ai[1] = unit->ai2; adds r3, r3, #4 @ tmp249, -@ Patches/../C_code.c:7744: uDef->ai[0] = unit->ai1; +@ Patches/../C_code.c:7749: uDef->ai[0] = unit->ai1; ldrb r4, [r1, r3] @ tmp250, subs r3, r3, #2 @ tmp244, ldrb r3, [r1, r3] @ tmp252, @@ -25525,7 +25556,7 @@ InitUnitDef: orrs r3, r1 @ tmp266, tmp257 orrs r3, r2 @ tmp268, tmp265 str r3, [r0, #16] @ tmp268, MEM [(unsigned char *)uDef_34(D) + 16B] -@ Patches/../C_code.c:7748: } +@ Patches/../C_code.c:7753: } pop {r4, r5, r6, r7} pop {r0} bx r0 @@ -25545,33 +25576,33 @@ ReloadAllUnits: mov lr, r10 @, mov r7, r9 @, mov r6, r8 @, -@ Patches/../C_code.c:7752: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) +@ Patches/../C_code.c:7757: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) movs r3, #53 @ tmp124, -@ Patches/../C_code.c:7751: { +@ Patches/../C_code.c:7756: { push {r6, r7, lr} @ -@ Patches/../C_code.c:7752: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) +@ Patches/../C_code.c:7757: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) ldrb r3, [r0, r3] @ tmp125, -@ Patches/../C_code.c:7751: { +@ Patches/../C_code.c:7756: { sub sp, sp, #24 @,, -@ Patches/../C_code.c:7752: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) +@ Patches/../C_code.c:7757: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) cmp r3, #0 @ tmp125, - beq .L3387 @, -@ Patches/../C_code.c:7752: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) + beq .L3390 @, +@ Patches/../C_code.c:7757: if (!((proc->calledFromChapter) && (proc->reloadPlayers || proc->reloadEnemies))) ldrh r3, [r0, #54] @ MEM [(void *)proc_5(D)], MEM [(void *)proc_5(D)] cmp r3, #0 @ MEM [(void *)proc_5(D)], - beq .L3387 @, -@ Patches/../C_code.c:7761: if (!proc->reloadPlayers) + beq .L3390 @, +@ Patches/../C_code.c:7766: if (!proc->reloadPlayers) movs r2, #54 @ tmp128, movs r3, #55 @ tmp127, ldrb r2, [r0, r2] @ MEM[(unsigned char *)proc_5(D) + 54B], MEM[(unsigned char *)proc_5(D) + 54B] ldrb r3, [r0, r3] @ _8, MEM[(unsigned char *)proc_5(D) + 55B] cmp r2, #0 @ MEM[(unsigned char *)proc_5(D) + 54B], - bne .L3389 @, -@ Patches/../C_code.c:7765: if (!proc->reloadEnemies) + bne .L3392 @, +@ Patches/../C_code.c:7770: if (!proc->reloadEnemies) cmp r3, #0 @ _8, - bne .L3395 @, -.L3387: -@ Patches/../C_code.c:7783: } + bne .L3398 @, +.L3390: +@ Patches/../C_code.c:7788: } add sp, sp, #24 @,, @ sp needed @ pop {r5, r6, r7} @@ -25581,68 +25612,68 @@ ReloadAllUnits: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3389: -@ Patches/../C_code.c:7759: int i = 1; +.L3392: +@ Patches/../C_code.c:7764: int i = 1; movs r5, #1 @ i, -@ Patches/../C_code.c:7765: if (!proc->reloadEnemies) +@ Patches/../C_code.c:7770: if (!proc->reloadEnemies) cmp r3, #0 @ _8, - beq .L3410 @, -.L3390: -@ Patches/../C_code.c:7767: end = 0x80; + beq .L3413 @, +.L3393: +@ Patches/../C_code.c:7772: end = 0x80; movs r7, #192 @ end, -.L3394: -@ Patches/../C_code.c:7779: ClearUnit(unit); - ldr r3, .L3411 @ tmp138, +.L3397: +@ Patches/../C_code.c:7784: ClearUnit(unit); + ldr r3, .L3414 @ tmp138, mov r9, r3 @ tmp138, tmp138 -@ Patches/../C_code.c:7780: LoadUnit(&uDef); - ldr r3, .L3411+4 @ tmp139, +@ Patches/../C_code.c:7785: LoadUnit(&uDef); + ldr r3, .L3414+4 @ tmp139, mov r8, r3 @ tmp139, tmp139 - ldr r6, .L3411+8 @ tmp136, -.L3392: -@ Patches/../C_code.c:7772: unit = GetUnit(i); + ldr r6, .L3414+8 @ tmp136, +.L3395: +@ Patches/../C_code.c:7777: unit = GetUnit(i); movs r0, r5 @, i - bl .L143 @ + bl .L146 @ subs r4, r0, #0 @ unit, tmp141, -@ Patches/../C_code.c:7773: if (!UNIT_IS_VALID(unit)) - beq .L3391 @, -@ Patches/../C_code.c:7773: if (!UNIT_IS_VALID(unit)) +@ Patches/../C_code.c:7778: if (!UNIT_IS_VALID(unit)) + beq .L3394 @, +@ Patches/../C_code.c:7778: if (!UNIT_IS_VALID(unit)) ldr r3, [r0] @ unit_12->pCharacterData, unit_12->pCharacterData cmp r3, #0 @ unit_12->pCharacterData, - beq .L3391 @, -@ Patches/../C_code.c:7777: state = unit->state; + beq .L3394 @, +@ Patches/../C_code.c:7782: state = unit->state; ldr r3, [r0, #12] @ state, unit_12->state mov r10, r3 @ state, state -@ Patches/../C_code.c:7778: InitUnitDef(&uDef, unit); +@ Patches/../C_code.c:7783: InitUnitDef(&uDef, unit); movs r1, r0 @, unit add r0, sp, #4 @ tmp146,, bl InitUnitDef @ -@ Patches/../C_code.c:7779: ClearUnit(unit); +@ Patches/../C_code.c:7784: ClearUnit(unit); movs r0, r4 @, unit - bl .L397 @ -@ Patches/../C_code.c:7780: LoadUnit(&uDef); + bl .L400 @ +@ Patches/../C_code.c:7785: LoadUnit(&uDef); add r0, sp, #4 @ tmp147,, - bl .L208 @ -@ Patches/../C_code.c:7781: unit->state = state; + bl .L211 @ +@ Patches/../C_code.c:7786: unit->state = state; mov r3, r10 @ state, state str r3, [r4, #12] @ state, unit_12->state -.L3391: -@ Patches/../C_code.c:7770: for (; i < end; ++i) +.L3394: +@ Patches/../C_code.c:7775: for (; i < end; ++i) adds r5, r5, #1 @ i, -@ Patches/../C_code.c:7770: for (; i < end; ++i) +@ Patches/../C_code.c:7775: for (; i < end; ++i) cmp r5, r7 @ i, end - blt .L3392 @, - b .L3387 @ -.L3410: -@ Patches/../C_code.c:7767: end = 0x80; + blt .L3395 @, + b .L3390 @ +.L3413: +@ Patches/../C_code.c:7772: end = 0x80; movs r7, #128 @ end, - b .L3394 @ -.L3395: -@ Patches/../C_code.c:7763: i = 0x80; + b .L3397 @ +.L3398: +@ Patches/../C_code.c:7768: i = 0x80; movs r5, #128 @ i, - b .L3390 @ -.L3412: + b .L3393 @ +.L3415: .align 2 -.L3411: +.L3414: .word ClearUnit .word LoadUnit .word GetUnit @@ -25659,22 +25690,22 @@ PlayTitleBGM: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:7800: StartBgmExt(titleTrack, 5, 0); // 809C8D8 80BE60C +@ Patches/../C_code.c:7805: StartBgmExt(titleTrack, 5, 0); // 809C8D8 80BE60C movs r2, #0 @, -@ Patches/../C_code.c:7802: } +@ Patches/../C_code.c:7807: } @ sp needed @ -@ Patches/../C_code.c:7800: StartBgmExt(titleTrack, 5, 0); // 809C8D8 80BE60C +@ Patches/../C_code.c:7805: StartBgmExt(titleTrack, 5, 0); // 809C8D8 80BE60C movs r1, #5 @, movs r0, #67 @, - ldr r3, .L3414 @ tmp114, + ldr r3, .L3417 @ tmp114, bl .L14 @ -@ Patches/../C_code.c:7802: } +@ Patches/../C_code.c:7807: } pop {r4} pop {r0} bx r0 -.L3415: +.L3418: .align 2 -.L3414: +.L3417: .word StartBgmExt .size PlayTitleBGM, .-PlayTitleBGM .align 1 @@ -25694,51 +25725,48 @@ RedrawAllText: mov r6, r9 @, mov lr, fp @, push {r5, r6, r7, lr} @ - ldr r5, .L3540 @ tmp607, + ldr r5, .L3543 @ tmp607, movs r7, r5 @ _709, tmp607 mov r8, r0 @ proc, tmp614 - movs r4, r5 @ ivtmp.1998, tmp607 - ldr r6, .L3540+4 @ tmp610, + movs r4, r5 @ ivtmp.2003, tmp607 + ldr r6, .L3543+4 @ tmp610, sub sp, sp, #52 @,, adds r7, r7, #136 @ _709, -.L3417: -@ Patches/../C_code.c:8482: ClearText(&th[i]); - movs r0, r4 @, ivtmp.1998 -@ Patches/../C_code.c:8480: for (int i = 0; i < ((SRR_NUMBERDISP * 2) + 1); ++i) - adds r4, r4, #8 @ ivtmp.1998, -@ Patches/../C_code.c:8482: ClearText(&th[i]); - bl .L143 @ -@ Patches/../C_code.c:8480: for (int i = 0; i < ((SRR_NUMBERDISP * 2) + 1); ++i) - cmp r4, r7 @ ivtmp.1998, _709 - bne .L3417 @, -@ Patches/../C_code.c:8484: TileMap_FillRect(TILEMAP_LOCATED(gBG0TilemapBuffer, 0, 0), 0x1d, 0x13, 0); // all - ldr r6, .L3540+8 @ tmp612, +.L3420: +@ Patches/../C_code.c:8487: ClearText(&th[i]); + movs r0, r4 @, ivtmp.2003 +@ Patches/../C_code.c:8485: for (int i = 0; i < ((SRR_NUMBERDISP * 2) + 1); ++i) + adds r4, r4, #8 @ ivtmp.2003, +@ Patches/../C_code.c:8487: ClearText(&th[i]); + bl .L146 @ +@ Patches/../C_code.c:8485: for (int i = 0; i < ((SRR_NUMBERDISP * 2) + 1); ++i) + cmp r4, r7 @ ivtmp.2003, _709 + bne .L3420 @, +@ Patches/../C_code.c:8489: TileMap_FillRect(TILEMAP_LOCATED(gBG0TilemapBuffer, 0, 0), 0x1d, 0x13, 0); // all + ldr r6, .L3543+8 @ tmp612, movs r3, #0 @, movs r2, #19 @, movs r1, #29 @, movs r0, r6 @, tmp612 - ldr r4, .L3540+12 @ tmp331, - bl .L269 @ -@ Patches/../C_code.c:8486: int offset2 = proc->offset; + ldr r4, .L3543+12 @ tmp331, + bl .L272 @ +@ Patches/../C_code.c:8491: int offset2 = proc->offset; movs r3, #49 @ tmp332, -@ Patches/../C_code.c:8493: switch (offset2) +@ Patches/../C_code.c:8498: switch (offset2) mov r2, r8 @ proc, proc ldrb r3, [r2, r3] @ tmp335, cmp r3, #25 @ tmp335, - bls .LCB21330 @ - b .L3537 @long jump @ -.LCB21330: - ldr r2, .L3540+16 @ tmp339, + bls .LCB21354 @ + b .L3540 @long jump @ +.LCB21354: + ldr r2, .L3543+16 @ tmp339, lsls r3, r3, #2 @ tmp337, tmp335, ldr r3, [r2, r3] @ tmp340, mov pc, r3 @ tmp340 .section .rodata .align 2 -.L3420: - .word .L3445 +.L3423: .word .L3448 - .word .L3449 - .word .L3450 .word .L3451 .word .L3452 .word .L3453 @@ -25761,46 +25789,49 @@ RedrawAllText: .word .L3470 .word .L3471 .word .L3472 + .word .L3473 + .word .L3474 + .word .L3475 .text -.L3471: - ldr r3, .L3540+20 @ tmp613, +.L3474: + ldr r3, .L3543+20 @ tmp613, movs r4, #0 @ i, mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3421: -@ Patches/../C_code.c:8715: if (DisplayTimedHitsOption) - ldr r3, .L3540+28 @ tmp571, -@ Patches/../C_code.c:8715: if (DisplayTimedHitsOption) + ldr r7, .L3543+24 @ tmp609, +.L3424: +@ Patches/../C_code.c:8720: if (DisplayTimedHitsOption) + ldr r3, .L3543+28 @ tmp571, +@ Patches/../C_code.c:8720: if (DisplayTimedHitsOption) ldr r3, [r3] @ DisplayTimedHitsOption, DisplayTimedHitsOption cmp r3, #0 @ DisplayTimedHitsOption, - beq .LCB21351 @ - b .L3538 @long jump @ -.LCB21351: -.L3419: -@ Patches/../C_code.c:8729: if (DisplayRandomSkillsOption) - ldr r3, .L3540+32 @ tmp586, -@ Patches/../C_code.c:8729: if (DisplayRandomSkillsOption) + beq .LCB21375 @ + b .L3541 @long jump @ +.LCB21375: +.L3422: +@ Patches/../C_code.c:8734: if (DisplayRandomSkillsOption) + ldr r3, .L3543+32 @ tmp586, +@ Patches/../C_code.c:8734: if (DisplayRandomSkillsOption) ldr r3, [r3] @ DisplayRandomSkillsOption, DisplayRandomSkillsOption cmp r3, #0 @ DisplayRandomSkillsOption, - beq .LCB21356 @ - b .L3539 @long jump @ -.LCB21356: -.L3418: -@ Patches/../C_code.c:8745: DrawConfigMenu(proc); + beq .LCB21380 @ + b .L3542 @long jump @ +.LCB21380: +.L3421: +@ Patches/../C_code.c:8750: DrawConfigMenu(proc); mov r0, r8 @, proc bl DrawConfigMenu @ -@ Patches/../C_code.c:8746: PutDrawText( +@ Patches/../C_code.c:8751: PutDrawText( mov r3, r9 @ tmp613, tmp613 adds r3, r3, #124 @ tmp613, str r3, [sp, #4] @ tmp604, movs r3, #6 @ tmp605, movs r2, #4 @, str r3, [sp] @ tmp605, - ldr r1, .L3540+36 @ tmp601, + ldr r1, .L3543+36 @ tmp601, movs r3, #0 @, - ldr r0, .L3540+40 @ tmp602, + ldr r0, .L3543+40 @ tmp602, bl .L62 @ -@ Patches/../C_code.c:8751: } +@ Patches/../C_code.c:8756: } add sp, sp, #52 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -25811,550 +25842,550 @@ RedrawAllText: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3470: - ldr r3, .L3540+20 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) +.L3473: + ldr r3, .L3543+20 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ i, movs r1, #198 @ _1140, movs r0, r5 @ _1130, tmp607 mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3422: -@ Patches/../C_code.c:8704: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3425: +@ Patches/../C_code.c:8709: PutDrawText( mov r3, r9 @ tmp568, tmp613 adds r3, r3, #92 @ tmp568, str r3, [sp, #4] @ tmp568, movs r3, #11 @ tmp569, movs r2, #3 @, str r3, [sp] @ tmp569, -@ Patches/../C_code.c:8704: PutDrawText( +@ Patches/../C_code.c:8709: PutDrawText( adds r1, r6, r1 @ tmp565, tmp612, _1140 -@ Patches/../C_code.c:8704: PutDrawText( +@ Patches/../C_code.c:8709: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8708: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8713: if (i > SRR_MAXDISP) cmp r4, #8 @ i, - bne .L3421 @, - b .L3418 @ -.L3469: - ldr r3, .L3540+20 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) + bne .L3424 @, + b .L3421 @ +.L3472: + ldr r3, .L3543+20 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1124, movs r1, #198 @ _1122, movs r0, r5 @ _1112, tmp607 mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3423: -@ Patches/../C_code.c:8695: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3426: +@ Patches/../C_code.c:8700: PutDrawText( mov r3, r9 @ tmp557, tmp613 adds r3, r3, #76 @ tmp557, str r3, [sp, #4] @ tmp557, movs r3, #11 @ tmp558, movs r2, #3 @, str r3, [sp] @ tmp558, -@ Patches/../C_code.c:8695: PutDrawText( +@ Patches/../C_code.c:8700: PutDrawText( adds r1, r6, r1 @ tmp554, tmp612, _1122 -@ Patches/../C_code.c:8695: PutDrawText( +@ Patches/../C_code.c:8700: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8699: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8704: if (i > SRR_MAXDISP) cmp r4, #8 @ _1124, - beq .L3418 @, -@ Patches/../C_code.c:8705: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + beq .L3421 @, +@ Patches/../C_code.c:8710: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp560, _1124, -@ Patches/../C_code.c:8705: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8710: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp563, _1124, -@ Patches/../C_code.c:8704: PutDrawText( +@ Patches/../C_code.c:8709: PutDrawText( adds r0, r5, r0 @ _1130, tmp607, tmp560 -@ Patches/../C_code.c:8705: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8710: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1140, -@ Patches/../C_code.c:8707: i++; +@ Patches/../C_code.c:8712: i++; adds r4, r4, #1 @ i, - b .L3422 @ -.L3468: - ldr r3, .L3540+20 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3425 @ +.L3471: + ldr r3, .L3543+20 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1106, movs r1, #198 @ _1104, movs r0, r5 @ _1094, tmp607 mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3424: -@ Patches/../C_code.c:8685: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3427: +@ Patches/../C_code.c:8690: PutDrawText( mov r3, r9 @ tmp546, tmp613 adds r3, r3, #60 @ tmp546, str r3, [sp, #4] @ tmp546, movs r3, #11 @ tmp547, movs r2, #3 @, str r3, [sp] @ tmp547, -@ Patches/../C_code.c:8685: PutDrawText( +@ Patches/../C_code.c:8690: PutDrawText( adds r1, r6, r1 @ tmp543, tmp612, _1104 -@ Patches/../C_code.c:8685: PutDrawText( +@ Patches/../C_code.c:8690: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8689: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8694: if (i > SRR_MAXDISP) cmp r4, #8 @ _1106, - beq .L3418 @, -@ Patches/../C_code.c:8696: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + beq .L3421 @, +@ Patches/../C_code.c:8701: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp549, _1106, -@ Patches/../C_code.c:8696: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8701: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp552, _1106, -@ Patches/../C_code.c:8695: PutDrawText( +@ Patches/../C_code.c:8700: PutDrawText( adds r0, r5, r0 @ _1112, tmp607, tmp549 -@ Patches/../C_code.c:8696: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8701: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1122, -@ Patches/../C_code.c:8698: i++; +@ Patches/../C_code.c:8703: i++; adds r4, r4, #1 @ _1124, - b .L3423 @ -.L3467: - ldr r3, .L3540+20 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3426 @ +.L3470: + ldr r3, .L3543+20 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1088, movs r1, #198 @ _1086, movs r0, r5 @ _1076, tmp607 mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3425: -@ Patches/../C_code.c:8676: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3428: +@ Patches/../C_code.c:8681: PutDrawText( mov r3, r9 @ tmp535, tmp613 adds r3, r3, #44 @ tmp535, str r3, [sp, #4] @ tmp535, movs r3, #11 @ tmp536, movs r2, #3 @, str r3, [sp] @ tmp536, -@ Patches/../C_code.c:8676: PutDrawText( +@ Patches/../C_code.c:8681: PutDrawText( adds r1, r6, r1 @ tmp532, tmp612, _1086 -@ Patches/../C_code.c:8676: PutDrawText( +@ Patches/../C_code.c:8681: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8680: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8685: if (i > SRR_MAXDISP) cmp r4, #8 @ _1088, - beq .L3418 @, -@ Patches/../C_code.c:8686: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + beq .L3421 @, +@ Patches/../C_code.c:8691: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp538, _1088, -@ Patches/../C_code.c:8686: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8691: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp541, _1088, -@ Patches/../C_code.c:8685: PutDrawText( +@ Patches/../C_code.c:8690: PutDrawText( adds r0, r5, r0 @ _1094, tmp607, tmp538 -@ Patches/../C_code.c:8686: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8691: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1104, -@ Patches/../C_code.c:8688: i++; +@ Patches/../C_code.c:8693: i++; adds r4, r4, #1 @ _1106, - b .L3424 @ -.L3466: - ldr r3, .L3540+20 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3427 @ +.L3469: + ldr r3, .L3543+20 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1070, movs r1, #198 @ _1068, movs r0, r5 @ _1058, tmp607 mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3426: -@ Patches/../C_code.c:8667: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3429: +@ Patches/../C_code.c:8672: PutDrawText( mov r3, r9 @ tmp524, tmp613 adds r3, r3, #32 @ tmp524, str r3, [sp, #4] @ tmp524, movs r3, #11 @ tmp525, movs r2, #3 @, str r3, [sp] @ tmp525, -@ Patches/../C_code.c:8667: PutDrawText( +@ Patches/../C_code.c:8672: PutDrawText( adds r1, r6, r1 @ tmp521, tmp612, _1068 -@ Patches/../C_code.c:8667: PutDrawText( +@ Patches/../C_code.c:8672: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8671: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8676: if (i > SRR_MAXDISP) cmp r4, #8 @ _1070, - bne .LCB21517 @ - b .L3418 @long jump @ -.LCB21517: -@ Patches/../C_code.c:8677: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21541 @ + b .L3421 @long jump @ +.LCB21541: +@ Patches/../C_code.c:8682: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp527, _1070, -@ Patches/../C_code.c:8677: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8682: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp530, _1070, -@ Patches/../C_code.c:8676: PutDrawText( +@ Patches/../C_code.c:8681: PutDrawText( adds r0, r5, r0 @ _1076, tmp607, tmp527 -@ Patches/../C_code.c:8677: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8682: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1086, -@ Patches/../C_code.c:8679: i++; +@ Patches/../C_code.c:8684: i++; adds r4, r4, #1 @ _1088, - b .L3425 @ -.L3465: - ldr r3, .L3540+20 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3428 @ +.L3468: + ldr r3, .L3543+20 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1052, movs r1, #198 @ _1050, movs r0, r5 @ _1040, tmp607 mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3540+24 @ tmp609, -.L3427: -@ Patches/../C_code.c:8658: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3430: +@ Patches/../C_code.c:8663: PutDrawText( mov r3, r9 @ tmp513, tmp613 adds r3, r3, #28 @ tmp513, str r3, [sp, #4] @ tmp513, movs r3, #11 @ tmp514, movs r2, #3 @, str r3, [sp] @ tmp514, -@ Patches/../C_code.c:8658: PutDrawText( +@ Patches/../C_code.c:8663: PutDrawText( adds r1, r6, r1 @ tmp510, tmp612, _1050 -@ Patches/../C_code.c:8658: PutDrawText( +@ Patches/../C_code.c:8663: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8662: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8667: if (i > SRR_MAXDISP) cmp r4, #8 @ _1052, - bne .LCB21547 @ - b .L3418 @long jump @ -.LCB21547: -@ Patches/../C_code.c:8668: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21571 @ + b .L3421 @long jump @ +.LCB21571: +@ Patches/../C_code.c:8673: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp516, _1052, -@ Patches/../C_code.c:8668: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8673: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp519, _1052, -@ Patches/../C_code.c:8667: PutDrawText( +@ Patches/../C_code.c:8672: PutDrawText( adds r0, r5, r0 @ _1058, tmp607, tmp516 -@ Patches/../C_code.c:8668: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8673: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1068, -@ Patches/../C_code.c:8670: i++; +@ Patches/../C_code.c:8675: i++; adds r4, r4, #1 @ _1070, - b .L3426 @ -.L3464: -@ Patches/../C_code.c:8493: switch (offset2) + b .L3429 @ +.L3467: +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1034, movs r1, #198 @ _1032, movs r0, r5 @ _1022, tmp607 - ldr r7, .L3540+24 @ tmp609, -.L3428: -@ Patches/../C_code.c:8649: PutDrawText( - ldr r3, .L3540+20 @ tmp613, + ldr r7, .L3543+24 @ tmp609, +.L3431: +@ Patches/../C_code.c:8654: PutDrawText( + ldr r3, .L3543+20 @ tmp613, mov r9, r3 @ tmp613, tmp613 adds r3, r3, #8 @ tmp502, str r3, [sp, #4] @ tmp502, movs r3, #11 @ tmp503, movs r2, #3 @, str r3, [sp] @ tmp503, -@ Patches/../C_code.c:8649: PutDrawText( +@ Patches/../C_code.c:8654: PutDrawText( adds r1, r6, r1 @ tmp499, tmp612, _1032 -@ Patches/../C_code.c:8649: PutDrawText( +@ Patches/../C_code.c:8654: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8653: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8658: if (i > SRR_MAXDISP) cmp r4, #8 @ _1034, - bne .LCB21576 @ - b .L3418 @long jump @ -.LCB21576: -@ Patches/../C_code.c:8659: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21600 @ + b .L3421 @long jump @ +.LCB21600: +@ Patches/../C_code.c:8664: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp505, _1034, -@ Patches/../C_code.c:8659: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8664: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp508, _1034, -@ Patches/../C_code.c:8658: PutDrawText( +@ Patches/../C_code.c:8663: PutDrawText( adds r0, r5, r0 @ _1040, tmp607, tmp505 -@ Patches/../C_code.c:8659: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8664: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1050, -@ Patches/../C_code.c:8661: i++; +@ Patches/../C_code.c:8666: i++; adds r4, r4, #1 @ _1052, - b .L3427 @ -.L3463: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3430 @ +.L3466: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _1016, movs r1, #198 @ _1014, movs r0, r5 @ _1004, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3429: -@ Patches/../C_code.c:8640: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3432: +@ Patches/../C_code.c:8645: PutDrawText( mov r3, r9 @ tmp611, tmp611 adds r3, r3, #116 @ tmp611, str r3, [sp, #4] @ tmp491, movs r3, #11 @ tmp492, movs r2, #3 @, str r3, [sp] @ tmp492, -@ Patches/../C_code.c:8640: PutDrawText( +@ Patches/../C_code.c:8645: PutDrawText( adds r1, r6, r1 @ tmp488, tmp612, _1014 -@ Patches/../C_code.c:8640: PutDrawText( +@ Patches/../C_code.c:8645: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8644: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8649: if (i > SRR_MAXDISP) cmp r4, #8 @ _1016, - bne .LCB21606 @ - b .L3536 @long jump @ -.LCB21606: -@ Patches/../C_code.c:8650: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21630 @ + b .L3539 @long jump @ +.LCB21630: +@ Patches/../C_code.c:8655: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp494, _1016, -@ Patches/../C_code.c:8650: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8655: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp497, _1016, -@ Patches/../C_code.c:8649: PutDrawText( +@ Patches/../C_code.c:8654: PutDrawText( adds r0, r5, r0 @ _1022, tmp607, tmp494 -@ Patches/../C_code.c:8650: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8655: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1032, -@ Patches/../C_code.c:8652: i++; +@ Patches/../C_code.c:8657: i++; adds r4, r4, #1 @ _1034, - b .L3428 @ -.L3462: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3431 @ +.L3465: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _998, movs r1, #198 @ _996, movs r0, r5 @ _986, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3430: -@ Patches/../C_code.c:8631: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3433: +@ Patches/../C_code.c:8636: PutDrawText( mov r3, r9 @ tmp480, tmp611 adds r3, r3, #96 @ tmp480, str r3, [sp, #4] @ tmp480, movs r3, #11 @ tmp481, movs r2, #3 @, str r3, [sp] @ tmp481, -@ Patches/../C_code.c:8631: PutDrawText( +@ Patches/../C_code.c:8636: PutDrawText( adds r1, r6, r1 @ tmp477, tmp612, _996 -@ Patches/../C_code.c:8631: PutDrawText( +@ Patches/../C_code.c:8636: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8635: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8640: if (i > SRR_MAXDISP) cmp r4, #8 @ _998, - bne .LCB21636 @ - b .L3536 @long jump @ -.LCB21636: -@ Patches/../C_code.c:8641: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21660 @ + b .L3539 @long jump @ +.LCB21660: +@ Patches/../C_code.c:8646: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp483, _998, -@ Patches/../C_code.c:8641: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8646: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp486, _998, -@ Patches/../C_code.c:8640: PutDrawText( +@ Patches/../C_code.c:8645: PutDrawText( adds r0, r5, r0 @ _1004, tmp607, tmp483 -@ Patches/../C_code.c:8641: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8646: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _1014, -@ Patches/../C_code.c:8643: i++; // make enemies have more bonus levels +@ Patches/../C_code.c:8648: i++; // make enemies have more bonus levels adds r4, r4, #1 @ _1016, - b .L3429 @ -.L3461: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3432 @ +.L3464: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _980, movs r1, #198 @ _978, movs r0, r5 @ _968, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3431: -@ Patches/../C_code.c:8622: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3434: +@ Patches/../C_code.c:8627: PutDrawText( mov r3, r9 @ tmp469, tmp611 adds r3, r3, #80 @ tmp469, str r3, [sp, #4] @ tmp469, movs r3, #11 @ tmp470, movs r2, #3 @, str r3, [sp] @ tmp470, -@ Patches/../C_code.c:8622: PutDrawText( +@ Patches/../C_code.c:8627: PutDrawText( adds r1, r6, r1 @ tmp466, tmp612, _978 -@ Patches/../C_code.c:8622: PutDrawText( +@ Patches/../C_code.c:8627: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8626: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8631: if (i > SRR_MAXDISP) cmp r4, #8 @ _980, - bne .LCB21666 @ - b .L3536 @long jump @ -.LCB21666: -@ Patches/../C_code.c:8632: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21690 @ + b .L3539 @long jump @ +.LCB21690: +@ Patches/../C_code.c:8637: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp472, _980, -@ Patches/../C_code.c:8632: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8637: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp475, _980, -@ Patches/../C_code.c:8631: PutDrawText( +@ Patches/../C_code.c:8636: PutDrawText( adds r0, r5, r0 @ _986, tmp607, tmp472 -@ Patches/../C_code.c:8632: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8637: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _996, -@ Patches/../C_code.c:8634: i++; +@ Patches/../C_code.c:8639: i++; adds r4, r4, #1 @ _998, - b .L3430 @ -.L3460: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3433 @ +.L3463: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _962, movs r1, #198 @ _960, movs r0, r5 @ _950, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3432: -@ Patches/../C_code.c:8613: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3435: +@ Patches/../C_code.c:8618: PutDrawText( mov r3, r9 @ tmp458, tmp611 adds r3, r3, #68 @ tmp458, str r3, [sp, #4] @ tmp458, movs r3, #11 @ tmp459, movs r2, #3 @, str r3, [sp] @ tmp459, -@ Patches/../C_code.c:8613: PutDrawText( +@ Patches/../C_code.c:8618: PutDrawText( adds r1, r6, r1 @ tmp455, tmp612, _960 -@ Patches/../C_code.c:8613: PutDrawText( +@ Patches/../C_code.c:8618: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8617: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8622: if (i > SRR_MAXDISP) cmp r4, #8 @ _962, - bne .LCB21696 @ - b .L3536 @long jump @ -.LCB21696: -@ Patches/../C_code.c:8623: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21720 @ + b .L3539 @long jump @ +.LCB21720: +@ Patches/../C_code.c:8628: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp461, _962, -@ Patches/../C_code.c:8623: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8628: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp464, _962, -@ Patches/../C_code.c:8622: PutDrawText( +@ Patches/../C_code.c:8627: PutDrawText( adds r0, r5, r0 @ _968, tmp607, tmp461 -@ Patches/../C_code.c:8623: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8628: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _978, -@ Patches/../C_code.c:8625: i++; // make players have bonus levels +@ Patches/../C_code.c:8630: i++; // make players have bonus levels adds r4, r4, #1 @ _980, - b .L3431 @ -.L3459: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3434 @ +.L3462: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _944, movs r1, #198 @ _942, movs r0, r5 @ _932, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3433: -@ Patches/../C_code.c:8604: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3436: +@ Patches/../C_code.c:8609: PutDrawText( mov r3, r9 @ tmp447, tmp611 adds r3, r3, #60 @ tmp447, str r3, [sp, #4] @ tmp447, movs r3, #11 @ tmp448, movs r2, #3 @, str r3, [sp] @ tmp448, -@ Patches/../C_code.c:8604: PutDrawText( +@ Patches/../C_code.c:8609: PutDrawText( adds r1, r6, r1 @ tmp444, tmp612, _942 -@ Patches/../C_code.c:8604: PutDrawText( +@ Patches/../C_code.c:8609: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8608: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8613: if (i > SRR_MAXDISP) cmp r4, #8 @ _944, - bne .LCB21726 @ - b .L3536 @long jump @ -.LCB21726: -@ Patches/../C_code.c:8614: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21750 @ + b .L3539 @long jump @ +.LCB21750: +@ Patches/../C_code.c:8619: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp450, _944, -@ Patches/../C_code.c:8614: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8619: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp453, _944, -@ Patches/../C_code.c:8613: PutDrawText( +@ Patches/../C_code.c:8618: PutDrawText( adds r0, r5, r0 @ _950, tmp607, tmp450 -@ Patches/../C_code.c:8614: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8619: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _960, -@ Patches/../C_code.c:8616: i++; +@ Patches/../C_code.c:8621: i++; adds r4, r4, #1 @ _962, - b .L3432 @ -.L3458: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3435 @ +.L3461: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _926, movs r1, #198 @ _924, movs r0, r5 @ _914, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3434: -@ Patches/../C_code.c:8595: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3437: +@ Patches/../C_code.c:8600: PutDrawText( mov r3, r9 @ tmp436, tmp611 adds r3, r3, #52 @ tmp436, str r3, [sp, #4] @ tmp436, movs r3, #11 @ tmp437, movs r2, #3 @, str r3, [sp] @ tmp437, -@ Patches/../C_code.c:8595: PutDrawText( +@ Patches/../C_code.c:8600: PutDrawText( adds r1, r6, r1 @ tmp433, tmp612, _924 -@ Patches/../C_code.c:8595: PutDrawText( +@ Patches/../C_code.c:8600: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8599: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8604: if (i > SRR_MAXDISP) cmp r4, #8 @ _926, - bne .LCB21756 @ - b .L3536 @long jump @ -.LCB21756: -@ Patches/../C_code.c:8605: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21780 @ + b .L3539 @long jump @ +.LCB21780: +@ Patches/../C_code.c:8610: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp439, _926, -@ Patches/../C_code.c:8605: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8610: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp442, _926, -@ Patches/../C_code.c:8604: PutDrawText( +@ Patches/../C_code.c:8609: PutDrawText( adds r0, r5, r0 @ _932, tmp607, tmp439 -@ Patches/../C_code.c:8605: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8610: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _942, -@ Patches/../C_code.c:8607: i++; +@ Patches/../C_code.c:8612: i++; adds r4, r4, #1 @ _944, - b .L3433 @ -.L3457: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3436 @ +.L3460: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _908, movs r1, #198 @ _906, movs r0, r5 @ _896, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3435: -@ Patches/../C_code.c:8586: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3438: +@ Patches/../C_code.c:8591: PutDrawText( mov r3, r9 @ tmp425, tmp611 adds r3, r3, #44 @ tmp425, str r3, [sp, #4] @ tmp425, movs r3, #11 @ tmp426, movs r2, #3 @, str r3, [sp] @ tmp426, -@ Patches/../C_code.c:8586: PutDrawText( +@ Patches/../C_code.c:8591: PutDrawText( adds r1, r6, r1 @ tmp422, tmp612, _906 -@ Patches/../C_code.c:8586: PutDrawText( +@ Patches/../C_code.c:8591: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8590: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8595: if (i > SRR_MAXDISP) cmp r4, #8 @ _908, - bne .LCB21786 @ - b .L3536 @long jump @ -.LCB21786: -@ Patches/../C_code.c:8596: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21810 @ + b .L3539 @long jump @ +.LCB21810: +@ Patches/../C_code.c:8601: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp428, _908, -@ Patches/../C_code.c:8596: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8601: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp431, _908, -@ Patches/../C_code.c:8595: PutDrawText( +@ Patches/../C_code.c:8600: PutDrawText( adds r0, r5, r0 @ _914, tmp607, tmp428 -@ Patches/../C_code.c:8596: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8601: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _924, -@ Patches/../C_code.c:8598: i++; +@ Patches/../C_code.c:8603: i++; adds r4, r4, #1 @ _926, - b .L3434 @ -.L3456: - ldr r3, .L3540+44 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3437 @ +.L3459: + ldr r3, .L3543+44 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _890, movs r1, #198 @ _888, movs r0, r5 @ _878, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3540+24 @ tmp609, -.L3436: -@ Patches/../C_code.c:8577: PutDrawText( + ldr r7, .L3543+24 @ tmp609, +.L3439: +@ Patches/../C_code.c:8582: PutDrawText( mov r3, r9 @ tmp414, tmp611 adds r3, r3, #36 @ tmp414, str r3, [sp, #4] @ tmp414, movs r3, #11 @ tmp415, movs r2, #3 @, str r3, [sp] @ tmp415, -@ Patches/../C_code.c:8577: PutDrawText( +@ Patches/../C_code.c:8582: PutDrawText( adds r1, r6, r1 @ tmp411, tmp612, _888 -@ Patches/../C_code.c:8577: PutDrawText( +@ Patches/../C_code.c:8582: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8581: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8586: if (i > SRR_MAXDISP) cmp r4, #8 @ _890, - bne .LCB21816 @ - b .L3536 @long jump @ -.LCB21816: -@ Patches/../C_code.c:8587: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21840 @ + b .L3539 @long jump @ +.LCB21840: +@ Patches/../C_code.c:8592: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp417, _890, -@ Patches/../C_code.c:8587: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8592: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp420, _890, -@ Patches/../C_code.c:8586: PutDrawText( +@ Patches/../C_code.c:8591: PutDrawText( adds r0, r5, r0 @ _896, tmp607, tmp417 -@ Patches/../C_code.c:8587: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8592: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _906, -@ Patches/../C_code.c:8589: i++; // Classic/Casual +@ Patches/../C_code.c:8594: i++; // Classic/Casual adds r4, r4, #1 @ _908, - b .L3435 @ -.L3541: + b .L3438 @ +.L3544: .align 2 -.L3540: +.L3543: .word gStatScreen+24 .word ClearText .word gBG0TilemapBuffer .word TileMap_FillRect - .word .L3420 + .word .L3423 .word .LANCHOR12 .word PutDrawText .word DisplayTimedHitsOption @@ -26362,56 +26393,56 @@ RedrawAllText: .word gBG0TilemapBuffer+18 .word gStatScreen+152 .word .LANCHOR11 -.L3455: - ldr r3, .L3542 @ tmp611, -@ Patches/../C_code.c:8493: switch (offset2) +.L3458: + ldr r3, .L3545 @ tmp611, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #1 @ _872, movs r1, #198 @ _870, movs r0, r5 @ _860, tmp607 mov r9, r3 @ tmp611, tmp611 - ldr r7, .L3542+4 @ tmp609, -.L3437: -@ Patches/../C_code.c:8568: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3440: +@ Patches/../C_code.c:8573: PutDrawText( mov r3, r9 @ tmp403, tmp611 adds r3, r3, #28 @ tmp403, str r3, [sp, #4] @ tmp403, movs r3, #11 @ tmp404, movs r2, #3 @, str r3, [sp] @ tmp404, -@ Patches/../C_code.c:8568: PutDrawText( +@ Patches/../C_code.c:8573: PutDrawText( adds r1, r6, r1 @ tmp400, tmp612, _870 -@ Patches/../C_code.c:8568: PutDrawText( +@ Patches/../C_code.c:8573: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8572: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8577: if (i > SRR_MAXDISP) cmp r4, #8 @ _872, - bne .LCB21863 @ - b .L3536 @long jump @ -.LCB21863: -@ Patches/../C_code.c:8578: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21887 @ + b .L3539 @long jump @ +.LCB21887: +@ Patches/../C_code.c:8583: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp406, _872, -@ Patches/../C_code.c:8578: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8583: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp409, _872, -@ Patches/../C_code.c:8577: PutDrawText( +@ Patches/../C_code.c:8582: PutDrawText( adds r0, r5, r0 @ _878, tmp607, tmp406 -@ Patches/../C_code.c:8578: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8583: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _888, -@ Patches/../C_code.c:8580: i++; +@ Patches/../C_code.c:8585: i++; adds r4, r4, #1 @ _890, - b .L3436 @ -.L3454: -@ Patches/../C_code.c:8493: switch (offset2) + b .L3439 @ +.L3457: +@ Patches/../C_code.c:8498: switch (offset2) movs r3, #198 @ prephitmp_844, movs r4, #1 @ prephitmp_845, mov r10, r3 @ prephitmp_844, prephitmp_844 movs r0, r5 @ _848, tmp607 - ldr r7, .L3542+4 @ tmp609, -.L3438: -@ Patches/../C_code.c:8559: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3441: +@ Patches/../C_code.c:8564: PutDrawText( mov r3, r10 @ prephitmp_844, prephitmp_844 adds r1, r6, r3 @ tmp389, tmp612, prephitmp_844 -@ Patches/../C_code.c:8559: PutDrawText( - ldr r3, .L3542 @ tmp611, +@ Patches/../C_code.c:8564: PutDrawText( + ldr r3, .L3545 @ tmp611, mov r9, r3 @ tmp611, tmp611 adds r3, r3, #8 @ tmp392, str r3, [sp, #4] @ tmp392, @@ -26420,24 +26451,24 @@ RedrawAllText: str r3, [sp] @ tmp393, movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8563: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8568: if (i > SRR_MAXDISP) cmp r4, #8 @ prephitmp_845, - bne .LCB21894 @ - b .L3536 @long jump @ -.LCB21894: -@ Patches/../C_code.c:8569: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + bne .LCB21918 @ + b .L3539 @long jump @ +.LCB21918: +@ Patches/../C_code.c:8574: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp395, prephitmp_845, -@ Patches/../C_code.c:8569: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8574: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp398, prephitmp_845, -@ Patches/../C_code.c:8568: PutDrawText( +@ Patches/../C_code.c:8573: PutDrawText( adds r0, r5, r0 @ _860, tmp607, tmp395 -@ Patches/../C_code.c:8569: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8574: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ _870, -@ Patches/../C_code.c:8571: i++; +@ Patches/../C_code.c:8576: i++; adds r4, r4, #1 @ _872, - b .L3437 @ -.L3453: -@ Patches/../C_code.c:8493: switch (offset2) + b .L3440 @ +.L3456: +@ Patches/../C_code.c:8498: switch (offset2) movs r3, #163 @ prephitmp_844, lsls r3, r3, #1 @ prephitmp_844, prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 @@ -26446,16 +26477,16 @@ RedrawAllText: str r3, [sp, #8] @ prephitmp_821, %sfp adds r3, r3, #190 @ prephitmp_818, mov fp, r3 @ prephitmp_818, prephitmp_818 - ldr r3, .L3542+8 @ tmp608, + ldr r3, .L3545+8 @ tmp608, movs r4, #2 @ prephitmp_845, movs r0, r5 @ _830, tmp607 mov r9, r3 @ tmp608, tmp608 - ldr r7, .L3542+4 @ tmp609, -.L3439: -@ Patches/../C_code.c:8550: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3442: +@ Patches/../C_code.c:8555: PutDrawText( mov r3, fp @ prephitmp_818, prephitmp_818 adds r1, r6, r3 @ tmp382, tmp612, prephitmp_818 -@ Patches/../C_code.c:8550: PutDrawText( +@ Patches/../C_code.c:8555: PutDrawText( mov r3, r9 @ tmp608, tmp608 adds r3, r3, #124 @ tmp608, str r3, [sp, #4] @ tmp385, @@ -26464,12 +26495,12 @@ RedrawAllText: str r3, [sp] @ tmp386, movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8559: PutDrawText( +@ Patches/../C_code.c:8564: PutDrawText( ldr r3, [sp, #8] @ prephitmp_821, %sfp adds r0, r5, r3 @ _848, tmp607, prephitmp_821 - b .L3438 @ -.L3452: -@ Patches/../C_code.c:8493: switch (offset2) + b .L3441 @ +.L3455: +@ Patches/../C_code.c:8498: switch (offset2) movs r3, #227 @ prephitmp_844, lsls r3, r3, #1 @ prephitmp_844, prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 @@ -26484,16 +26515,16 @@ RedrawAllText: str r3, [sp, #16] @ prephitmp_787, %sfp adds r3, r3, #190 @ prephitmp_784, str r3, [sp, #12] @ prephitmp_784, %sfp - ldr r3, .L3542+8 @ tmp608, + ldr r3, .L3545+8 @ tmp608, movs r4, #3 @ prephitmp_845, movs r0, r5 @ _804, tmp607 mov r9, r3 @ tmp608, tmp608 - ldr r7, .L3542+4 @ tmp609, -.L3440: -@ Patches/../C_code.c:8541: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3443: +@ Patches/../C_code.c:8546: PutDrawText( ldr r3, [sp, #12] @ prephitmp_784, %sfp adds r1, r6, r3 @ tmp375, tmp612, prephitmp_784 -@ Patches/../C_code.c:8541: PutDrawText( +@ Patches/../C_code.c:8546: PutDrawText( mov r3, r9 @ tmp378, tmp608 adds r3, r3, #116 @ tmp378, str r3, [sp, #4] @ tmp378, @@ -26502,13 +26533,13 @@ RedrawAllText: str r3, [sp] @ tmp379, movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8550: PutDrawText( +@ Patches/../C_code.c:8555: PutDrawText( ldr r3, [sp, #16] @ prephitmp_787, %sfp adds r0, r5, r3 @ _830, tmp607, prephitmp_787 - b .L3439 @ -.L3451: -@ Patches/../C_code.c:8493: switch (offset2) - ldr r3, .L3542+12 @ prephitmp_844, + b .L3442 @ +.L3454: +@ Patches/../C_code.c:8498: switch (offset2) + ldr r3, .L3545+12 @ prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 movs r3, #24 @ prephitmp_821, str r3, [sp, #8] @ prephitmp_821, %sfp @@ -26526,16 +26557,16 @@ RedrawAllText: str r3, [sp, #24] @ prephitmp_745, %sfp adds r3, r3, #190 @ prephitmp_742, str r3, [sp, #20] @ prephitmp_742, %sfp - ldr r3, .L3542+8 @ tmp608, + ldr r3, .L3545+8 @ tmp608, movs r4, #4 @ prephitmp_845, movs r0, r5 @ _770, tmp607 mov r9, r3 @ tmp608, tmp608 - ldr r7, .L3542+4 @ tmp609, -.L3441: -@ Patches/../C_code.c:8532: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3444: +@ Patches/../C_code.c:8537: PutDrawText( ldr r3, [sp, #20] @ prephitmp_742, %sfp adds r1, r6, r3 @ tmp368, tmp612, prephitmp_742 -@ Patches/../C_code.c:8532: PutDrawText( +@ Patches/../C_code.c:8537: PutDrawText( mov r3, r9 @ tmp371, tmp608 adds r3, r3, #104 @ tmp371, str r3, [sp, #4] @ tmp371, @@ -26544,17 +26575,17 @@ RedrawAllText: str r3, [sp] @ tmp372, movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8541: PutDrawText( +@ Patches/../C_code.c:8546: PutDrawText( ldr r3, [sp, #24] @ prephitmp_745, %sfp adds r0, r5, r3 @ _804, tmp607, prephitmp_745 - b .L3440 @ -.L3450: -@ Patches/../C_code.c:8493: switch (offset2) - ldr r3, .L3542+16 @ prephitmp_844, + b .L3443 @ +.L3453: +@ Patches/../C_code.c:8498: switch (offset2) + ldr r3, .L3545+16 @ prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 movs r3, #32 @ prephitmp_821, str r3, [sp, #8] @ prephitmp_821, %sfp - ldr r3, .L3542+12 @ prephitmp_818, + ldr r3, .L3545+12 @ prephitmp_818, mov fp, r3 @ prephitmp_818, prephitmp_818 movs r3, #24 @ prephitmp_787, str r3, [sp, #16] @ prephitmp_787, %sfp @@ -26572,16 +26603,16 @@ RedrawAllText: str r3, [sp, #32] @ prephitmp_695, %sfp adds r3, r3, #190 @ prephitmp_692, str r3, [sp, #28] @ prephitmp_692, %sfp - ldr r3, .L3542+8 @ tmp608, + ldr r3, .L3545+8 @ tmp608, movs r4, #5 @ prephitmp_845, movs r0, r5 @ _728, tmp607 mov r9, r3 @ tmp608, tmp608 - ldr r7, .L3542+4 @ tmp609, -.L3442: -@ Patches/../C_code.c:8523: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3445: +@ Patches/../C_code.c:8528: PutDrawText( ldr r3, [sp, #28] @ prephitmp_692, %sfp adds r1, r6, r3 @ tmp361, tmp612, prephitmp_692 -@ Patches/../C_code.c:8523: PutDrawText( +@ Patches/../C_code.c:8528: PutDrawText( mov r3, r9 @ tmp364, tmp608 adds r3, r3, #92 @ tmp364, str r3, [sp, #4] @ tmp364, @@ -26590,21 +26621,21 @@ RedrawAllText: str r3, [sp] @ tmp365, movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8532: PutDrawText( +@ Patches/../C_code.c:8537: PutDrawText( ldr r3, [sp, #32] @ prephitmp_695, %sfp adds r0, r5, r3 @ _770, tmp607, prephitmp_695 - b .L3441 @ -.L3449: -@ Patches/../C_code.c:8493: switch (offset2) - ldr r3, .L3542+20 @ prephitmp_844, + b .L3444 @ +.L3452: +@ Patches/../C_code.c:8498: switch (offset2) + ldr r3, .L3545+20 @ prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 movs r3, #40 @ prephitmp_821, str r3, [sp, #8] @ prephitmp_821, %sfp - ldr r3, .L3542+16 @ prephitmp_818, + ldr r3, .L3545+16 @ prephitmp_818, mov fp, r3 @ prephitmp_818, prephitmp_818 movs r3, #32 @ prephitmp_787, str r3, [sp, #16] @ prephitmp_787, %sfp - ldr r3, .L3542+12 @ prephitmp_784, + ldr r3, .L3545+12 @ prephitmp_784, str r3, [sp, #12] @ prephitmp_784, %sfp movs r3, #24 @ prephitmp_745, str r3, [sp, #24] @ prephitmp_745, %sfp @@ -26622,16 +26653,16 @@ RedrawAllText: str r3, [sp, #40] @ prephitmp_637, %sfp adds r3, r3, #190 @ prephitmp_634, str r3, [sp, #36] @ prephitmp_634, %sfp - ldr r3, .L3542+8 @ tmp608, + ldr r3, .L3545+8 @ tmp608, movs r4, #6 @ prephitmp_845, movs r0, r5 @ _678, tmp607 mov r9, r3 @ tmp608, tmp608 - ldr r7, .L3542+4 @ tmp609, -.L3443: -@ Patches/../C_code.c:8514: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3446: +@ Patches/../C_code.c:8519: PutDrawText( ldr r3, [sp, #36] @ prephitmp_634, %sfp adds r1, r6, r3 @ tmp354, tmp612, prephitmp_634 -@ Patches/../C_code.c:8514: PutDrawText( +@ Patches/../C_code.c:8519: PutDrawText( mov r3, r9 @ tmp357, tmp608 adds r3, r3, #80 @ tmp357, str r3, [sp, #4] @ tmp357, @@ -26640,25 +26671,25 @@ RedrawAllText: str r3, [sp] @ tmp358, movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8523: PutDrawText( +@ Patches/../C_code.c:8528: PutDrawText( ldr r3, [sp, #40] @ prephitmp_637, %sfp adds r0, r5, r3 @ _728, tmp607, prephitmp_637 - b .L3442 @ -.L3448: -@ Patches/../C_code.c:8493: switch (offset2) - ldr r3, .L3542+24 @ prephitmp_844, + b .L3445 @ +.L3451: +@ Patches/../C_code.c:8498: switch (offset2) + ldr r3, .L3545+24 @ prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 movs r3, #48 @ prephitmp_821, str r3, [sp, #8] @ prephitmp_821, %sfp - ldr r3, .L3542+20 @ prephitmp_818, + ldr r3, .L3545+20 @ prephitmp_818, mov fp, r3 @ prephitmp_818, prephitmp_818 movs r3, #40 @ prephitmp_787, str r3, [sp, #16] @ prephitmp_787, %sfp - ldr r3, .L3542+16 @ prephitmp_784, + ldr r3, .L3545+16 @ prephitmp_784, str r3, [sp, #12] @ prephitmp_784, %sfp movs r3, #32 @ prephitmp_745, str r3, [sp, #24] @ prephitmp_745, %sfp - ldr r3, .L3542+12 @ prephitmp_742, + ldr r3, .L3545+12 @ prephitmp_742, str r3, [sp, #20] @ prephitmp_742, %sfp movs r3, #24 @ prephitmp_695, str r3, [sp, #32] @ prephitmp_695, %sfp @@ -26674,60 +26705,60 @@ RedrawAllText: subs r3, r3, #63 @ prephitmp_629, subs r3, r3, #255 @ prephitmp_629, str r3, [sp, #44] @ prephitmp_629, %sfp - ldr r3, .L3542+8 @ tmp608, + ldr r3, .L3545+8 @ tmp608, movs r4, #7 @ prephitmp_845, movs r1, #198 @ prephitmp_626, movs r0, r5 @ prephitmp_621, tmp607 mov r9, r3 @ tmp608, tmp608 - ldr r7, .L3542+4 @ tmp609, -.L3444: -@ Patches/../C_code.c:8505: PutDrawText( + ldr r7, .L3545+4 @ tmp609, +.L3447: +@ Patches/../C_code.c:8510: PutDrawText( mov r3, r9 @ tmp350, tmp608 adds r3, r3, #68 @ tmp350, str r3, [sp, #4] @ tmp350, movs r3, #11 @ tmp351, movs r2, #3 @, str r3, [sp] @ tmp351, -@ Patches/../C_code.c:8505: PutDrawText( +@ Patches/../C_code.c:8510: PutDrawText( adds r1, r6, r1 @ tmp347, tmp612, prephitmp_626 -@ Patches/../C_code.c:8505: PutDrawText( +@ Patches/../C_code.c:8510: PutDrawText( movs r3, #0 @, bl .L62 @ -@ Patches/../C_code.c:8514: PutDrawText( +@ Patches/../C_code.c:8519: PutDrawText( ldr r3, [sp, #44] @ prephitmp_629, %sfp adds r0, r5, r3 @ _678, tmp607, prephitmp_629 - b .L3443 @ -.L3445: -@ Patches/../C_code.c:8496: PutDrawText( - ldr r3, .L3542+8 @ tmp608, + b .L3446 @ +.L3448: +@ Patches/../C_code.c:8501: PutDrawText( + ldr r3, .L3545+8 @ tmp608, mov r9, r3 @ tmp608, tmp608 adds r3, r3, #60 @ tmp344, str r3, [sp, #4] @ tmp344, movs r3, #11 @ tmp345, movs r0, r5 @, tmp607 - ldr r1, .L3542+28 @ tmp341, + ldr r1, .L3545+28 @ tmp341, str r3, [sp] @ tmp345, movs r2, #3 @, movs r3, #0 @, - ldr r7, .L3542+4 @ tmp609, + ldr r7, .L3545+4 @ tmp609, bl .L62 @ - ldr r3, .L3542+32 @ prephitmp_844, + ldr r3, .L3545+32 @ prephitmp_844, mov r10, r3 @ prephitmp_844, prephitmp_844 movs r3, #56 @ prephitmp_821, str r3, [sp, #8] @ prephitmp_821, %sfp - ldr r3, .L3542+24 @ prephitmp_818, + ldr r3, .L3545+24 @ prephitmp_818, mov fp, r3 @ prephitmp_818, prephitmp_818 movs r3, #48 @ prephitmp_787, str r3, [sp, #16] @ prephitmp_787, %sfp - ldr r3, .L3542+20 @ prephitmp_784, + ldr r3, .L3545+20 @ prephitmp_784, str r3, [sp, #12] @ prephitmp_784, %sfp movs r3, #40 @ prephitmp_745, str r3, [sp, #24] @ prephitmp_745, %sfp - ldr r3, .L3542+16 @ prephitmp_742, + ldr r3, .L3545+16 @ prephitmp_742, str r3, [sp, #20] @ prephitmp_742, %sfp movs r3, #32 @ prephitmp_695, str r3, [sp, #32] @ prephitmp_695, %sfp - ldr r3, .L3542+12 @ prephitmp_692, + ldr r3, .L3545+12 @ prephitmp_692, str r3, [sp, #28] @ prephitmp_692, %sfp movs r3, #24 @ prephitmp_637, movs r1, #163 @ prephitmp_626, @@ -26742,77 +26773,77 @@ RedrawAllText: str r3, [sp, #44] @ prephitmp_629, %sfp lsls r1, r1, #1 @ prephitmp_626, prephitmp_626, adds r0, r0, #8 @ prephitmp_621, - b .L3444 @ -.L3472: - ldr r3, .L3542+36 @ tmp613, -@ Patches/../C_code.c:8493: switch (offset2) + b .L3447 @ +.L3475: + ldr r3, .L3545+36 @ tmp613, +@ Patches/../C_code.c:8498: switch (offset2) movs r4, #0 @ i, mov r9, r3 @ tmp613, tmp613 - ldr r7, .L3542+4 @ tmp609, - b .L3419 @ -.L3536: - ldr r3, .L3542+36 @ tmp613, - mov r9, r3 @ tmp613, tmp613 - b .L3418 @ + ldr r7, .L3545+4 @ tmp609, + b .L3422 @ .L3539: -@ Patches/../C_code.c:8732: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, + ldr r3, .L3545+36 @ tmp613, + mov r9, r3 @ tmp613, tmp613 + b .L3421 @ +.L3542: +@ Patches/../C_code.c:8737: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r3, r4, #7 @ tmp589, i, adds r3, r3, #198 @ tmp591, -@ Patches/../C_code.c:8731: PutDrawText( +@ Patches/../C_code.c:8736: PutDrawText( adds r1, r6, r3 @ tmp592, tmp612, tmp591 -@ Patches/../C_code.c:8731: PutDrawText( +@ Patches/../C_code.c:8736: PutDrawText( mov r3, r9 @ tmp598, tmp613 adds r3, r3, #116 @ tmp598, str r3, [sp, #4] @ tmp598, movs r3, #11 @ tmp599, -@ Patches/../C_code.c:8732: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8737: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r4, r4, #3 @ tmp594, i, -@ Patches/../C_code.c:8731: PutDrawText( +@ Patches/../C_code.c:8736: PutDrawText( str r3, [sp] @ tmp599, movs r2, #3 @, movs r3, #0 @, -@ Patches/../C_code.c:8731: PutDrawText( +@ Patches/../C_code.c:8736: PutDrawText( adds r0, r5, r4 @ tmp595, tmp607, tmp594 -@ Patches/../C_code.c:8731: PutDrawText( +@ Patches/../C_code.c:8736: PutDrawText( bl .L62 @ - b .L3418 @ -.L3538: -@ Patches/../C_code.c:8717: PutDrawText( + b .L3421 @ +.L3541: +@ Patches/../C_code.c:8722: PutDrawText( mov r3, r9 @ tmp583, tmp613 adds r3, r3, #104 @ tmp583, str r3, [sp, #4] @ tmp583, movs r3, #11 @ tmp584, -@ Patches/../C_code.c:8718: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8723: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r1, r4, #7 @ tmp574, i, -@ Patches/../C_code.c:8718: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8723: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, lsls r0, r4, #3 @ tmp579, i, -@ Patches/../C_code.c:8718: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, +@ Patches/../C_code.c:8723: &th[i + offset], TILEMAP_LOCATED(gBG0TilemapBuffer, 3, 3 + ((i) * 2)), gold, 0, MaxTW, adds r1, r1, #198 @ tmp576, -@ Patches/../C_code.c:8717: PutDrawText( +@ Patches/../C_code.c:8722: PutDrawText( str r3, [sp] @ tmp584, movs r2, #3 @, movs r3, #0 @, -@ Patches/../C_code.c:8717: PutDrawText( +@ Patches/../C_code.c:8722: PutDrawText( adds r1, r6, r1 @ tmp577, tmp612, tmp576 adds r0, r5, r0 @ tmp580, tmp607, tmp579 -@ Patches/../C_code.c:8720: i++; +@ Patches/../C_code.c:8725: i++; adds r4, r4, #1 @ i, -@ Patches/../C_code.c:8717: PutDrawText( +@ Patches/../C_code.c:8722: PutDrawText( bl .L62 @ -@ Patches/../C_code.c:8721: if (i > SRR_MAXDISP) +@ Patches/../C_code.c:8726: if (i > SRR_MAXDISP) cmp r4, #8 @ i, - beq .LCB22257 @ - b .L3419 @long jump @ -.LCB22257: - b .L3418 @ -.L3537: - ldr r3, .L3542+36 @ tmp613, - ldr r7, .L3542+4 @ tmp609, + beq .LCB22281 @ + b .L3422 @long jump @ +.LCB22281: + b .L3421 @ +.L3540: + ldr r3, .L3545+36 @ tmp613, + ldr r7, .L3545+4 @ tmp609, mov r9, r3 @ tmp613, tmp613 - b .L3418 @ -.L3543: + b .L3421 @ +.L3546: .align 2 -.L3542: +.L3545: .word .LANCHOR11 .word PutDrawText .word .LANCHOR10 @@ -26841,393 +26872,393 @@ ConfigMenuLoop: mov lr, fp @, mov r6, r9 @, push {r5, r6, r7, lr} @ -@ Patches/../C_code.c:7825: if (proc->offset) +@ Patches/../C_code.c:7830: if (proc->offset) movs r5, #49 @ tmp465, -@ Patches/../C_code.c:7830: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) - ldr r3, .L3813 @ tmp464, +@ Patches/../C_code.c:7835: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) + ldr r3, .L3816 @ tmp464, ldr r7, [r3] @ pretmp_727, SRR_TotalOptions -@ Patches/../C_code.c:7825: if (proc->offset) +@ Patches/../C_code.c:7830: if (proc->offset) ldrb r3, [r0, r5] @ tmp466, -@ Patches/../C_code.c:7823: { +@ Patches/../C_code.c:7828: { movs r4, r0 @ proc, tmp1626 sub sp, sp, #68 @,, -@ Patches/../C_code.c:7825: if (proc->offset) +@ Patches/../C_code.c:7830: if (proc->offset) cmp r3, #0 @ tmp466, - beq .LCB22300 @ - b .L3788 @long jump @ -.LCB22300: -@ Patches/../C_code.c:7830: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) + beq .LCB22324 @ + b .L3791 @long jump @ +.LCB22324: +@ Patches/../C_code.c:7835: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) cmp r7, #7 @ pretmp_727, - ble .LCB22302 @ - bl .L3789 @far jump @ -.LCB22302: -.L3547: -@ Patches/../C_code.c:7835: u16 keys = sKeyStatusBuffer.newKeys; - ldr r3, .L3813+4 @ tmp1590, - mov r8, r3 @ tmp1590, tmp1590 + ble .LCB22326 @ + bl .L3792 @far jump @ +.LCB22326: +.L3550: +@ Patches/../C_code.c:7840: u16 keys = sKeyStatusBuffer.newKeys; + ldr r3, .L3816+4 @ tmp1592, + mov r8, r3 @ tmp1592, tmp1592 ldrh r6, [r3, #8] @ keys, -@ Patches/../C_code.c:7836: if (!proc->freezeSeed) +@ Patches/../C_code.c:7841: if (!proc->freezeSeed) movs r3, #52 @ tmp475, -@ Patches/../C_code.c:7836: if (!proc->freezeSeed) +@ Patches/../C_code.c:7841: if (!proc->freezeSeed) ldrb r3, [r4, r3] @ tmp476, cmp r3, #0 @ tmp476, - bne .LCB22310 @ - b .L3790 @long jump @ -.LCB22310: -.L3549: -@ Patches/../C_code.c:7841: int id = proc->id; + bne .LCB22334 @ + b .L3793 @long jump @ +.LCB22334: +.L3552: +@ Patches/../C_code.c:7846: int id = proc->id; movs r3, #48 @ tmp480, ldrsb r5, [r4, r3] @ id, -@ Patches/../C_code.c:7842: int offset = proc->offset; +@ Patches/../C_code.c:7847: int offset = proc->offset; adds r3, r3, #1 @ tmp481, ldrb r3, [r4, r3] @ offset, str r3, [sp, #4] @ offset, %sfp -@ Patches/../C_code.c:7844: if ((keys & START_BUTTON) || (keys & A_BUTTON)) +@ Patches/../C_code.c:7849: if ((keys & START_BUTTON) || (keys & A_BUTTON)) movs r3, #9 @ tmp485, -@ Patches/../C_code.c:7841: int id = proc->id; +@ Patches/../C_code.c:7846: int id = proc->id; movs r2, r5 @ pretmp_629, id -@ Patches/../C_code.c:7844: if ((keys & START_BUTTON) || (keys & A_BUTTON)) +@ Patches/../C_code.c:7849: if ((keys & START_BUTTON) || (keys & A_BUTTON)) tst r3, r6 @ tmp485, keys - bne .LCB22323 @ - b .L3550 @long jump @ -.LCB22323: -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) - ldr r3, .L3813+8 @ tmp1593, -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) + bne .LCB22347 @ + b .L3553 @long jump @ +.LCB22347: +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) + ldr r3, .L3816+8 @ tmp1593, +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) ldr r2, [r4, #44] @ pretmp_675, proc_345(D)->seed -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) mov fp, r3 @ tmp1593, tmp1593 ldr r3, [r3] @ pretmp_677, RandValues -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) str r2, [sp, #20] @ pretmp_675, %sfp -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) mov ip, r3 @ pretmp_677, pretmp_677 -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) movs r2, #62 @ tmp492, ldrsb r1, [r4, r2] @ pretmp_679, -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) mov r2, ip @ pretmp_677, pretmp_677 -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) - ldr r3, [r3] @ *RandValues.286_12, *RandValues.286_12 -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) - ldrh r2, [r2, #2] @ *RandValues.286_12, *RandValues.286_12 -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) - lsls r3, r3, #12 @ tmp491, *RandValues.286_12, -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) - lsls r2, r2, #23 @ tmp497, *RandValues.286_12, -@ Patches/../C_code.c:7857: reloadUnits = true; +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) + ldr r3, [r3] @ *RandValues.287_12, *RandValues.287_12 +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) + ldrh r2, [r2, #2] @ *RandValues.287_12, *RandValues.287_12 +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) + lsls r3, r3, #12 @ tmp491, *RandValues.287_12, +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) + lsls r2, r2, #23 @ tmp497, *RandValues.287_12, +@ Patches/../C_code.c:7862: reloadUnits = true; movs r0, #1 @ reloadUnits, -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) str r1, [sp, #28] @ pretmp_679, %sfp -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) lsrs r3, r3, #12 @ _13, tmp491, -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) lsrs r2, r2, #27 @ tmp498, tmp497, -@ Patches/../C_code.c:7855: if (RandValues->variance != proc->Option[0]) +@ Patches/../C_code.c:7860: if (RandValues->variance != proc->Option[0]) cmp r2, r1 @ tmp498, pretmp_679 - bne .LCB22344 @ - b .L3791 @long jump @ -.LCB22344: -.L3551: -@ Patches/../C_code.c:7859: if (RecruitValues->recruitment != proc->Option[1]) - ldr r3, .L3813+12 @ tmp1594, - str r3, [sp, #52] @ tmp1594, %sfp + bne .LCB22368 @ + b .L3794 @long jump @ +.LCB22368: +.L3554: +@ Patches/../C_code.c:7864: if (RecruitValues->recruitment != proc->Option[1]) + ldr r3, .L3816+12 @ tmp1595, + str r3, [sp, #52] @ tmp1595, %sfp ldr r2, [r3] @ pretmp_683, RecruitValues -@ Patches/../C_code.c:7859: if (RecruitValues->recruitment != proc->Option[1]) +@ Patches/../C_code.c:7864: if (RecruitValues->recruitment != proc->Option[1]) movs r3, #63 @ tmp505, ldrsb r1, [r4, r3] @ pretmp_681, -@ Patches/../C_code.c:7859: if (RecruitValues->recruitment != proc->Option[1]) - ldrb r3, [r2] @ *RecruitValues.288_20, *RecruitValues.288_20 - lsls r3, r3, #29 @ tmp510, *RecruitValues.288_20, -@ Patches/../C_code.c:7859: if (RecruitValues->recruitment != proc->Option[1]) +@ Patches/../C_code.c:7864: if (RecruitValues->recruitment != proc->Option[1]) + ldrb r3, [r2] @ *RecruitValues.289_20, *RecruitValues.289_20 + lsls r3, r3, #29 @ tmp510, *RecruitValues.289_20, +@ Patches/../C_code.c:7864: if (RecruitValues->recruitment != proc->Option[1]) str r1, [sp, #24] @ pretmp_681, %sfp -@ Patches/../C_code.c:7859: if (RecruitValues->recruitment != proc->Option[1]) +@ Patches/../C_code.c:7864: if (RecruitValues->recruitment != proc->Option[1]) lsrs r3, r3, #29 @ tmp511, tmp510, -@ Patches/../C_code.c:7859: if (RecruitValues->recruitment != proc->Option[1]) +@ Patches/../C_code.c:7864: if (RecruitValues->recruitment != proc->Option[1]) cmp r3, r1 @ tmp511, pretmp_681 - bne .LCB22358 @ - b .L3678 @long jump @ -.LCB22358: -@ Patches/../C_code.c:7861: if (proc->Option[1] == 1) + bne .LCB22382 @ + b .L3681 @long jump @ +.LCB22382: +@ Patches/../C_code.c:7866: if (proc->Option[1] == 1) cmp r1, #1 @ pretmp_681, - bne .LCB22360 @ - bl .L3676 @far jump @ -.LCB22360: -@ Patches/../C_code.c:7865: if (proc->Option[1] == 2) + bne .LCB22384 @ + bl .L3679 @far jump @ +.LCB22384: +@ Patches/../C_code.c:7870: if (proc->Option[1] == 2) cmp r1, #2 @ pretmp_681, - beq .LCB22362 @ - b .L3792 @long jump @ -.LCB22362: -@ Patches/../C_code.c:7867: reloadEnemies = true; + beq .LCB22386 @ + b .L3795 @long jump @ +.LCB22386: +@ Patches/../C_code.c:7872: reloadEnemies = true; movs r3, #1 @ reloadEnemies, str r3, [sp, #8] @ reloadEnemies, %sfp movs r3, #0 @ reloadPlayers, mov r9, r3 @ reloadPlayers, reloadPlayers -.L3552: -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) - ldr r3, .L3813+16 @ tmp1596, +.L3555: +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) + ldr r3, .L3816+16 @ tmp1596, ldr r1, [r3] @ pretmp_687, GrowthValues str r3, [sp, #56] @ tmp1596, %sfp -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) movs r3, #64 @ tmp529, -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) str r1, [sp, #16] @ pretmp_687, %sfp -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) ldrsb r6, [r4, r3] @ pretmp_685, -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) - ldrb r3, [r1, #1] @ *GrowthValues.289_25, *GrowthValues.289_25 - lsls r3, r3, #27 @ tmp534, *GrowthValues.289_25, -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) + ldrb r3, [r1, #1] @ *GrowthValues.290_25, *GrowthValues.290_25 + lsls r3, r3, #27 @ tmp534, *GrowthValues.290_25, +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) str r6, [sp, #32] @ pretmp_685, %sfp -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) lsrs r3, r3, #27 @ tmp535, tmp534, -@ Patches/../C_code.c:7878: if (GrowthValues->ForcedCharTable != proc->Option[2]) +@ Patches/../C_code.c:7883: if (GrowthValues->ForcedCharTable != proc->Option[2]) cmp r3, r6 @ tmp535, pretmp_685 - beq .L3555 @, -@ Patches/../C_code.c:7880: reloadUnits = true; + beq .L3558 @, +@ Patches/../C_code.c:7885: reloadUnits = true; movs r0, #1 @ reloadUnits, -.L3555: -@ Patches/../C_code.c:7883: if (RandBitflags->base != proc->Option[3]) +.L3558: +@ Patches/../C_code.c:7888: if (RandBitflags->base != proc->Option[3]) movs r1, #65 @ tmp538, -@ Patches/../C_code.c:7883: if (RandBitflags->base != proc->Option[3]) - ldr r3, .L3813+20 @ tmp1597, +@ Patches/../C_code.c:7888: if (RandBitflags->base != proc->Option[3]) + ldr r3, .L3816+20 @ tmp1597, str r3, [sp, #12] @ tmp1597, %sfp ldr r3, [r3] @ pretmp_691, RandBitflags -@ Patches/../C_code.c:7883: if (RandBitflags->base != proc->Option[3]) +@ Patches/../C_code.c:7888: if (RandBitflags->base != proc->Option[3]) ldrsb r1, [r4, r1] @ pretmp_689, movs r6, r1 @ pretmp_689, pretmp_689 str r1, [sp, #36] @ pretmp_689, %sfp -@ Patches/../C_code.c:7883: if (RandBitflags->base != proc->Option[3]) - ldrb r1, [r3] @ *RandBitflags.290_30, *RandBitflags.290_30 - lsls r7, r1, #30 @ tmp543, *RandBitflags.290_30, +@ Patches/../C_code.c:7888: if (RandBitflags->base != proc->Option[3]) + ldrb r1, [r3] @ *RandBitflags.291_30, *RandBitflags.291_30 + lsls r7, r1, #30 @ tmp543, *RandBitflags.291_30, lsrs r7, r7, #30 @ tmp544, tmp543, -@ Patches/../C_code.c:7883: if (RandBitflags->base != proc->Option[3]) +@ Patches/../C_code.c:7888: if (RandBitflags->base != proc->Option[3]) cmp r7, r6 @ tmp544, pretmp_689 - beq .L3556 @, -@ Patches/../C_code.c:7885: reloadUnits = true; + beq .L3559 @, +@ Patches/../C_code.c:7890: reloadUnits = true; movs r0, #1 @ reloadUnits, -.L3556: -@ Patches/../C_code.c:7887: if (RandBitflags->growth != proc->Option[4]) +.L3559: +@ Patches/../C_code.c:7892: if (RandBitflags->growth != proc->Option[4]) movs r7, #66 @ tmp546, ldrsb r6, [r4, r7] @ pretmp_693, -@ Patches/../C_code.c:7887: if (RandBitflags->growth != proc->Option[4]) - lsls r7, r1, #28 @ tmp551, *RandBitflags.290_30, -@ Patches/../C_code.c:7887: if (RandBitflags->growth != proc->Option[4]) +@ Patches/../C_code.c:7892: if (RandBitflags->growth != proc->Option[4]) + lsls r7, r1, #28 @ tmp551, *RandBitflags.291_30, +@ Patches/../C_code.c:7892: if (RandBitflags->growth != proc->Option[4]) str r6, [sp, #40] @ pretmp_693, %sfp -@ Patches/../C_code.c:7887: if (RandBitflags->growth != proc->Option[4]) +@ Patches/../C_code.c:7892: if (RandBitflags->growth != proc->Option[4]) lsrs r7, r7, #30 @ tmp552, tmp551, -@ Patches/../C_code.c:7887: if (RandBitflags->growth != proc->Option[4]) +@ Patches/../C_code.c:7892: if (RandBitflags->growth != proc->Option[4]) cmp r7, r6 @ tmp552, pretmp_693 - beq .L3557 @, -@ Patches/../C_code.c:7889: reloadUnits = true; + beq .L3560 @, +@ Patches/../C_code.c:7894: reloadUnits = true; movs r0, #1 @ reloadUnits, -.L3557: -@ Patches/../C_code.c:7891: if (RandBitflags->levelups != proc->Option[5]) +.L3560: +@ Patches/../C_code.c:7896: if (RandBitflags->levelups != proc->Option[5]) movs r7, #67 @ tmp554, ldrsb r6, [r4, r7] @ pretmp_695, -@ Patches/../C_code.c:7891: if (RandBitflags->levelups != proc->Option[5]) - lsls r1, r1, #26 @ tmp559, *RandBitflags.290_30, -@ Patches/../C_code.c:7891: if (RandBitflags->levelups != proc->Option[5]) +@ Patches/../C_code.c:7896: if (RandBitflags->levelups != proc->Option[5]) + lsls r1, r1, #26 @ tmp559, *RandBitflags.291_30, +@ Patches/../C_code.c:7896: if (RandBitflags->levelups != proc->Option[5]) str r6, [sp, #44] @ pretmp_695, %sfp -@ Patches/../C_code.c:7891: if (RandBitflags->levelups != proc->Option[5]) +@ Patches/../C_code.c:7896: if (RandBitflags->levelups != proc->Option[5]) lsrs r1, r1, #30 @ tmp560, tmp559, -@ Patches/../C_code.c:7891: if (RandBitflags->levelups != proc->Option[5]) +@ Patches/../C_code.c:7896: if (RandBitflags->levelups != proc->Option[5]) cmp r1, r6 @ tmp560, pretmp_695 - beq .L3558 @, -@ Patches/../C_code.c:7893: reloadUnits = true; + beq .L3561 @, +@ Patches/../C_code.c:7898: reloadUnits = true; movs r0, #1 @ reloadUnits, -.L3558: -@ Patches/../C_code.c:7895: if (RandBitflags->caps != proc->Option[6]) +.L3561: +@ Patches/../C_code.c:7900: if (RandBitflags->caps != proc->Option[6]) movs r1, #68 @ tmp562, ldrsb r6, [r4, r1] @ pretmp_697, -@ Patches/../C_code.c:7895: if (RandBitflags->caps != proc->Option[6]) - ldrh r1, [r3] @ *RandBitflags.290_30, *RandBitflags.290_30 - lsls r1, r1, #23 @ tmp567, *RandBitflags.290_30, -@ Patches/../C_code.c:7895: if (RandBitflags->caps != proc->Option[6]) +@ Patches/../C_code.c:7900: if (RandBitflags->caps != proc->Option[6]) + ldrh r1, [r3] @ *RandBitflags.291_30, *RandBitflags.291_30 + lsls r1, r1, #23 @ tmp567, *RandBitflags.291_30, +@ Patches/../C_code.c:7900: if (RandBitflags->caps != proc->Option[6]) str r6, [sp, #48] @ pretmp_697, %sfp -@ Patches/../C_code.c:7895: if (RandBitflags->caps != proc->Option[6]) +@ Patches/../C_code.c:7900: if (RandBitflags->caps != proc->Option[6]) lsrs r1, r1, #29 @ tmp568, tmp567, -@ Patches/../C_code.c:7895: if (RandBitflags->caps != proc->Option[6]) +@ Patches/../C_code.c:7900: if (RandBitflags->caps != proc->Option[6]) cmp r1, r6 @ tmp568, pretmp_697 - beq .L3559 @, -@ Patches/../C_code.c:7897: reloadUnits = true; + beq .L3562 @, +@ Patches/../C_code.c:7902: reloadUnits = true; movs r0, #1 @ reloadUnits, -.L3559: -@ Patches/../C_code.c:7899: if (RandBitflags->class != proc->Option[7]) +.L3562: +@ Patches/../C_code.c:7904: if (RandBitflags->class != proc->Option[7]) movs r1, #69 @ tmp570, -@ Patches/../C_code.c:7899: if (RandBitflags->class != proc->Option[7]) - ldrb r7, [r3, #1] @ *RandBitflags.290_30, *RandBitflags.290_30 -@ Patches/../C_code.c:7899: if (RandBitflags->class != proc->Option[7]) +@ Patches/../C_code.c:7904: if (RandBitflags->class != proc->Option[7]) + ldrb r7, [r3, #1] @ *RandBitflags.291_30, *RandBitflags.291_30 +@ Patches/../C_code.c:7904: if (RandBitflags->class != proc->Option[7]) ldrsb r1, [r4, r1] @ pretmp_699, -@ Patches/../C_code.c:7899: if (RandBitflags->class != proc->Option[7]) - lsls r7, r7, #29 @ tmp575, *RandBitflags.290_30, +@ Patches/../C_code.c:7904: if (RandBitflags->class != proc->Option[7]) + lsls r7, r7, #29 @ tmp575, *RandBitflags.291_30, lsrs r7, r7, #30 @ tmp576, tmp575, -@ Patches/../C_code.c:7899: if (RandBitflags->class != proc->Option[7]) +@ Patches/../C_code.c:7904: if (RandBitflags->class != proc->Option[7]) cmp r7, r1 @ tmp576, pretmp_699 - beq .L3560 @, -@ Patches/../C_code.c:7901: if (proc->Option[7] == 2) + beq .L3563 @, +@ Patches/../C_code.c:7906: if (proc->Option[7] == 2) cmp r1, #2 @ pretmp_699, - bne .LCB22450 @ - bl .L3684 @far jump @ -.LCB22450: -@ Patches/../C_code.c:7905: if (proc->Option[7] == 3) + bne .LCB22474 @ + bl .L3687 @far jump @ +.LCB22474: +@ Patches/../C_code.c:7910: if (proc->Option[7] == 3) cmp r1, #3 @ pretmp_699, - bne .LCB22452 @ - bl .L3685 @far jump @ -.LCB22452: -@ Patches/../C_code.c:7913: if (proc->Option[7] == 0) + bne .LCB22476 @ + bl .L3688 @far jump @ +.LCB22476: +@ Patches/../C_code.c:7918: if (proc->Option[7] == 0) lsls r7, r1, #24 @ tmp581, pretmp_699, lsrs r7, r7, #24 @ tmp580, tmp581, cmp r7, #1 @ tmp580, - bhi .L3560 @, -@ Patches/../C_code.c:7915: reloadUnits = true; + bhi .L3563 @, +@ Patches/../C_code.c:7920: reloadUnits = true; movs r0, #1 @ reloadUnits, -.L3560: -@ Patches/../C_code.c:7918: if (RandBitflags->playerBonus != proc->Option[13]) +.L3563: +@ Patches/../C_code.c:7923: if (RandBitflags->playerBonus != proc->Option[13]) movs r6, #75 @ tmp589, -@ Patches/../C_code.c:7918: if (RandBitflags->playerBonus != proc->Option[13]) - ldrh r7, [r3, #2] @ *RandBitflags.290_30, *RandBitflags.290_30 -@ Patches/../C_code.c:7918: if (RandBitflags->playerBonus != proc->Option[13]) +@ Patches/../C_code.c:7923: if (RandBitflags->playerBonus != proc->Option[13]) + ldrh r7, [r3, #2] @ *RandBitflags.291_30, *RandBitflags.291_30 +@ Patches/../C_code.c:7923: if (RandBitflags->playerBonus != proc->Option[13]) ldrsb r6, [r4, r6] @ tmp590, -@ Patches/../C_code.c:7918: if (RandBitflags->playerBonus != proc->Option[13]) - lsls r7, r7, #20 @ tmp586, *RandBitflags.290_30, +@ Patches/../C_code.c:7923: if (RandBitflags->playerBonus != proc->Option[13]) + lsls r7, r7, #20 @ tmp586, *RandBitflags.291_30, lsrs r7, r7, #27 @ tmp587, tmp586, -@ Patches/../C_code.c:7918: if (RandBitflags->playerBonus != proc->Option[13]) +@ Patches/../C_code.c:7923: if (RandBitflags->playerBonus != proc->Option[13]) cmp r7, r6 @ tmp587, tmp590 - beq .L3561 @, -@ Patches/../C_code.c:7920: reloadPlayers = true; + beq .L3564 @, +@ Patches/../C_code.c:7925: reloadPlayers = true; movs r6, #1 @ reloadPlayers, mov r9, r6 @ reloadPlayers, reloadPlayers -.L3561: -@ Patches/../C_code.c:7922: if (GrowthValues->player != proc->Option[14]) +.L3564: +@ Patches/../C_code.c:7927: if (GrowthValues->player != proc->Option[14]) ldr r6, [sp, #16] @ pretmp_687, %sfp - ldrb r7, [r6] @ *GrowthValues.289_25, *GrowthValues.289_25 - lsls r6, r7, #28 @ tmp595, *GrowthValues.289_25, + ldrb r7, [r6] @ *GrowthValues.290_25, *GrowthValues.290_25 + lsls r6, r7, #28 @ tmp595, *GrowthValues.290_25, lsrs r6, r6, #28 @ tmp596, tmp595, mov r8, r6 @ tmp596, tmp596 -@ Patches/../C_code.c:7922: if (GrowthValues->player != proc->Option[14]) +@ Patches/../C_code.c:7927: if (GrowthValues->player != proc->Option[14]) movs r6, #76 @ tmp598, ldrsb r6, [r4, r6] @ tmp599, -@ Patches/../C_code.c:7922: if (GrowthValues->player != proc->Option[14]) +@ Patches/../C_code.c:7927: if (GrowthValues->player != proc->Option[14]) cmp r8, r6 @ tmp596, tmp599 - beq .L3562 @, -@ Patches/../C_code.c:7924: reloadPlayers = true; + beq .L3565 @, +@ Patches/../C_code.c:7929: reloadPlayers = true; movs r6, #1 @ reloadPlayers, mov r9, r6 @ reloadPlayers, reloadPlayers -.L3562: -@ Patches/../C_code.c:7926: if (RandValues->bonus != proc->Option[15]) +.L3565: +@ Patches/../C_code.c:7931: if (RandValues->bonus != proc->Option[15]) mov r6, ip @ pretmp_677, pretmp_677 - ldrb r6, [r6, #3] @ *RandValues.286_12, *RandValues.286_12 - mov r10, r6 @ *RandValues.286_12, *RandValues.286_12 - lsls r6, r6, #26 @ tmp604, *RandValues.286_12, + ldrb r6, [r6, #3] @ *RandValues.287_12, *RandValues.287_12 + mov r10, r6 @ *RandValues.287_12, *RandValues.287_12 + lsls r6, r6, #26 @ tmp604, *RandValues.287_12, lsrs r6, r6, #27 @ tmp605, tmp604, mov r8, r6 @ tmp605, tmp605 -@ Patches/../C_code.c:7926: if (RandValues->bonus != proc->Option[15]) +@ Patches/../C_code.c:7931: if (RandValues->bonus != proc->Option[15]) movs r6, #77 @ tmp1758, ldrsb r6, [r4, r6] @ tmp608, -@ Patches/../C_code.c:7926: if (RandValues->bonus != proc->Option[15]) +@ Patches/../C_code.c:7931: if (RandValues->bonus != proc->Option[15]) cmp r8, r6 @ tmp605, tmp608 - beq .L3563 @, -@ Patches/../C_code.c:7928: reloadEnemies = true; + beq .L3566 @, +@ Patches/../C_code.c:7933: reloadEnemies = true; movs r6, #1 @ reloadEnemies, str r6, [sp, #8] @ reloadEnemies, %sfp -.L3563: -@ Patches/../C_code.c:7930: if (GrowthValues->enemy != proc->Option[16]) - lsrs r6, r7, #4 @ tmp614, *GrowthValues.289_25, -@ Patches/../C_code.c:7930: if (GrowthValues->enemy != proc->Option[16]) +.L3566: +@ Patches/../C_code.c:7935: if (GrowthValues->enemy != proc->Option[16]) + lsrs r6, r7, #4 @ tmp614, *GrowthValues.290_25, +@ Patches/../C_code.c:7935: if (GrowthValues->enemy != proc->Option[16]) movs r7, #78 @ tmp616, ldrsb r7, [r4, r7] @ tmp617, -@ Patches/../C_code.c:7930: if (GrowthValues->enemy != proc->Option[16]) +@ Patches/../C_code.c:7935: if (GrowthValues->enemy != proc->Option[16]) cmp r6, r7 @ tmp614, tmp617 - beq .L3564 @, -@ Patches/../C_code.c:7932: reloadEnemies = true; + beq .L3567 @, +@ Patches/../C_code.c:7937: reloadEnemies = true; movs r6, #1 @ reloadEnemies, str r6, [sp, #8] @ reloadEnemies, %sfp -.L3564: -@ Patches/../C_code.c:7934: if (DisplayRandomSkillsOption) - ldr r6, .L3813+24 @ tmp1598, +.L3567: +@ Patches/../C_code.c:7939: if (DisplayRandomSkillsOption) + ldr r6, .L3816+24 @ tmp1598, str r6, [sp, #60] @ tmp1598, %sfp -@ Patches/../C_code.c:7934: if (DisplayRandomSkillsOption) +@ Patches/../C_code.c:7939: if (DisplayRandomSkillsOption) ldr r6, [r6] @ DisplayRandomSkillsOption, DisplayRandomSkillsOption cmp r6, #0 @ DisplayRandomSkillsOption, - bne .LCB22522 @ - b .L3565 @long jump @ -.LCB22522: -@ Patches/../C_code.c:7936: if (RandValues->skills != proc->Option[24]) - mov r6, r10 @ *RandValues.286_12, *RandValues.286_12 - lsrs r6, r6, #6 @ tmp625, *RandValues.286_12, + bne .LCB22546 @ + b .L3568 @long jump @ +.LCB22546: +@ Patches/../C_code.c:7941: if (RandValues->skills != proc->Option[24]) + mov r6, r10 @ *RandValues.287_12, *RandValues.287_12 + lsrs r6, r6, #6 @ tmp625, *RandValues.287_12, mov r10, r6 @ tmp625, tmp625 -@ Patches/../C_code.c:7936: if (RandValues->skills != proc->Option[24]) +@ Patches/../C_code.c:7941: if (RandValues->skills != proc->Option[24]) movs r6, #86 @ tmp627, ldrsb r6, [r4, r6] @ tmp628, -@ Patches/../C_code.c:7936: if (RandValues->skills != proc->Option[24]) +@ Patches/../C_code.c:7941: if (RandValues->skills != proc->Option[24]) cmp r10, r6 @ tmp625, tmp628 - bne .LCB22532 @ - b .L3565 @long jump @ -.LCB22532: -.L3567: -@ Patches/../C_code.c:7949: proc->reloadPlayers = true; + bne .LCB22556 @ + b .L3568 @long jump @ +.LCB22556: +.L3570: +@ Patches/../C_code.c:7954: proc->reloadPlayers = true; movs r0, #54 @ tmp629, movs r6, #1 @ tmp630, strb r6, [r4, r0] @ tmp630, proc_345(D)->reloadPlayers subs r0, r0, #53 @ reloadPlayers, mov r9, r0 @ reloadPlayers, reloadPlayers -.L3566: -@ Patches/../C_code.c:7953: proc->reloadEnemies = true; +.L3569: +@ Patches/../C_code.c:7958: proc->reloadEnemies = true; movs r0, #55 @ tmp635, movs r6, #1 @ tmp636, strb r6, [r4, r0] @ tmp636, proc_345(D)->reloadEnemies subs r0, r0, #54 @ reloadEnemies, str r0, [sp, #8] @ reloadEnemies, %sfp -@ Patches/../C_code.c:7956: if (proc->calledFromChapter) +@ Patches/../C_code.c:7961: if (proc->calledFromChapter) movs r0, #53 @ tmp638, -@ Patches/../C_code.c:7956: if (proc->calledFromChapter) +@ Patches/../C_code.c:7961: if (proc->calledFromChapter) ldrb r0, [r4, r0] @ tmp639, cmp r0, #0 @ tmp639, - bne .LCB22549 @ - b .L3570 @long jump @ -.LCB22549: -.L3800: -@ Patches/../C_code.c:7958: if ((id + offset) != 21) + bne .LCB22573 @ + b .L3573 @long jump @ +.LCB22573: +.L3803: +@ Patches/../C_code.c:7963: if ((id + offset) != 21) ldr r0, [sp, #4] @ offset, %sfp adds r0, r5, r0 @ tmp640, id, offset -@ Patches/../C_code.c:7960: if ((id + offset) != 20) +@ Patches/../C_code.c:7965: if ((id + offset) != 20) subs r0, r0, #20 @ tmp641, cmp r0, #1 @ tmp641, - bhi .LCB22555 @ - b .L3570 @long jump @ -.LCB22555: -@ Patches/../C_code.c:7962: proc->id = 7; - ldr r3, .L3813+28 @ tmp642, -@ Patches/../C_code.c:7964: proc->redraw = RedrawAll; + bhi .LCB22579 @ + b .L3573 @long jump @ +.LCB22579: +@ Patches/../C_code.c:7967: proc->id = 7; + ldr r3, .L3816+28 @ tmp642, +@ Patches/../C_code.c:7969: proc->redraw = RedrawAll; movs r2, #2 @ tmp645, -@ Patches/../C_code.c:7962: proc->id = 7; +@ Patches/../C_code.c:7967: proc->id = 7; strh r3, [r4, #48] @ tmp642, MEM [(void *)proc_345(D) + 48B] -@ Patches/../C_code.c:7964: proc->redraw = RedrawAll; +@ Patches/../C_code.c:7969: proc->redraw = RedrawAll; movs r3, #50 @ tmp644, strb r2, [r4, r3] @ tmp645, proc_345(D)->redraw -@ Patches/../C_code.c:7966: if (reloadPlayers) +@ Patches/../C_code.c:7971: if (reloadPlayers) mov r3, r9 @ reloadPlayers, reloadPlayers cmp r3, #0 @ reloadPlayers, - bne .LCB22563 @ - b .L3571 @long jump @ -.LCB22563: -@ Patches/../C_code.c:7970: if (reloadEnemies) + bne .LCB22587 @ + b .L3574 @long jump @ +.LCB22587: +@ Patches/../C_code.c:7975: if (reloadEnemies) ldr r3, [sp, #8] @ reloadEnemies, %sfp cmp r3, #0 @ reloadEnemies, - bne .LCB22566 @ - b .L3574 @long jump @ -.LCB22566: -@ Patches/../C_code.c:7976: proc->Option[20] = 1; + bne .LCB22590 @ + b .L3577 @long jump @ +.LCB22590: +@ Patches/../C_code.c:7981: proc->Option[20] = 1; movs r3, #82 @ tmp649, movs r2, #1 @ tmp650, strb r2, [r4, r3] @ tmp650, -.L3573: -@ Patches/../C_code.c:7978: DrawConfigMenu(proc); +.L3576: +@ Patches/../C_code.c:7983: DrawConfigMenu(proc); movs r0, r4 @, proc bl DrawConfigMenu @ -.L3544: -@ Patches/../C_code.c:8421: } +.L3547: +@ Patches/../C_code.c:8426: } add sp, sp, #68 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -27238,89 +27269,89 @@ ConfigMenuLoop: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3550: -@ Patches/../C_code.c:8192: if (!keys) +.L3553: +@ Patches/../C_code.c:8197: if (!keys) cmp r6, #0 @ keys, - bne .L3611 @, -@ Patches/../C_code.c:8194: keys = sKeyStatusBuffer.repeatedKeys; - mov r3, r8 @ tmp1590, tmp1590 + bne .L3614 @, +@ Patches/../C_code.c:8199: keys = sKeyStatusBuffer.repeatedKeys; + mov r3, r8 @ tmp1592, tmp1592 ldrh r6, [r3, #6] @ keys, -.L3611: -@ Patches/../C_code.c:8199: if ((id == 0) && (offset == 0)) +.L3614: +@ Patches/../C_code.c:8204: if ((id == 0) && (offset == 0)) ldr r3, [sp, #4] @ _170, %sfp orrs r3, r5 @ _170, id mov r8, r3 @ _170, _170 -@ Patches/../C_code.c:8199: if ((id == 0) && (offset == 0)) - beq .LCB22602 @ - b .L3612 @long jump @ -.LCB22602: -@ Patches/../C_code.c:8202: if (!proc->freezeSeed) +@ Patches/../C_code.c:8204: if ((id == 0) && (offset == 0)) + beq .LCB22626 @ + b .L3615 @long jump @ +.LCB22626: +@ Patches/../C_code.c:8207: if (!proc->freezeSeed) adds r3, r3, #52 @ tmp1157, -@ Patches/../C_code.c:8202: if (!proc->freezeSeed) +@ Patches/../C_code.c:8207: if (!proc->freezeSeed) ldrb r3, [r4, r3] @ tmp1158, cmp r3, #0 @ tmp1158, - bne .LCB22606 @ - b .L3793 @long jump @ -.LCB22606: -.L3613: -@ Patches/../C_code.c:8207: proc->freezeSeed = true; + bne .LCB22630 @ + b .L3796 @long jump @ +.LCB22630: +.L3616: +@ Patches/../C_code.c:8212: proc->freezeSeed = true; movs r3, #52 @ tmp1162, movs r2, #1 @ tmp1163, - ldr r1, .L3813+32 @ tmp1586, -@ Patches/../C_code.c:7666: while (number > DigitDecimalTable[result]) - ldr r0, .L3813+36 @ tmp1168, -@ Patches/../C_code.c:8207: proc->freezeSeed = true; + ldr r1, .L3816+32 @ tmp1586, +@ Patches/../C_code.c:7671: while (number > DigitDecimalTable[result]) + ldr r0, .L3816+36 @ tmp1168, +@ Patches/../C_code.c:8212: proc->freezeSeed = true; strb r2, [r4, r3] @ tmp1163, proc_345(D)->freezeSeed - movs r2, r1 @ ivtmp.2020, tmp1586 -@ Patches/../C_code.c:7666: while (number > DigitDecimalTable[result]) + movs r2, r1 @ ivtmp.2025, tmp1586 +@ Patches/../C_code.c:7671: while (number > DigitDecimalTable[result]) mov ip, r0 @ tmp1168, tmp1168 - adds r2, r2, #16 @ ivtmp.2020, -@ Patches/../C_code.c:7665: int result = 1; + adds r2, r2, #16 @ ivtmp.2025, +@ Patches/../C_code.c:7670: int result = 1; subs r3, r3, #51 @ result, -.L3614: -@ Patches/../C_code.c:7666: while (number > DigitDecimalTable[result]) - adds r2, r2, #4 @ ivtmp.2020, -@ Patches/../C_code.c:7666: while (number > DigitDecimalTable[result]) - subs r0, r2, #4 @ tmp1167, ivtmp.2020, -@ Patches/../C_code.c:7666: while (number > DigitDecimalTable[result]) +.L3617: +@ Patches/../C_code.c:7671: while (number > DigitDecimalTable[result]) + adds r2, r2, #4 @ ivtmp.2025, +@ Patches/../C_code.c:7671: while (number > DigitDecimalTable[result]) + subs r0, r2, #4 @ tmp1167, ivtmp.2025, +@ Patches/../C_code.c:7671: while (number > DigitDecimalTable[result]) ldr r0, [r0] @ MEM[(long unsigned int *)_596 + 4294967292B], MEM[(long unsigned int *)_596 + 4294967292B] -@ Patches/../C_code.c:7668: result++; +@ Patches/../C_code.c:7673: result++; adds r3, r3, #1 @ result, -@ Patches/../C_code.c:7666: while (number > DigitDecimalTable[result]) +@ Patches/../C_code.c:7671: while (number > DigitDecimalTable[result]) cmp r0, ip @ MEM[(long unsigned int *)_596 + 4294967292B], tmp1168 - bls .L3614 @, -@ Patches/../C_code.c:7671: if (result > 6) + bls .L3617 @, +@ Patches/../C_code.c:7676: if (result > 6) cmp r3, #7 @ result, - bne .LCB22627 @ - b .L3794 @long jump @ -.LCB22627: -.L3615: + bne .LCB22651 @ + b .L3797 @long jump @ +.LCB22651: +.L3618: movs r2, #16 @ tmp1173, movs r0, #32 @ tmp1179, mov r9, r2 @ tmp1173, tmp1173 ands r2, r6 @ _360, keys mov r10, r2 @ _360, _360 -@ Patches/../C_code.c:8214: if (proc->digit > 0) +@ Patches/../C_code.c:8219: if (proc->digit > 0) movs r2, #51 @ tmp1175, ands r0, r6 @ tmp1179, keys mov ip, r2 @ tmp1175, tmp1175 ldrsb r2, [r4, r2] @ prephitmp_624, str r0, [sp, #12] @ tmp1179, %sfp -@ Patches/../C_code.c:8212: if (keys & DPAD_RIGHT) +@ Patches/../C_code.c:8217: if (keys & DPAD_RIGHT) mov r0, r9 @ tmp1173, tmp1173 -@ Patches/../C_code.c:8214: if (proc->digit > 0) +@ Patches/../C_code.c:8219: if (proc->digit > 0) str r2, [sp, #8] @ prephitmp_624, %sfp -@ Patches/../C_code.c:8212: if (keys & DPAD_RIGHT) +@ Patches/../C_code.c:8217: if (keys & DPAD_RIGHT) tst r0, r6 @ tmp1173, keys - bne .LCB22647 @ - b .L3616 @long jump @ -.LCB22647: -@ Patches/../C_code.c:8214: if (proc->digit > 0) + bne .LCB22671 @ + b .L3619 @long jump @ +.LCB22671: +@ Patches/../C_code.c:8219: if (proc->digit > 0) cmp r2, #0 @ prephitmp_624, - bgt .LCB22649 @ - b .L3617 @long jump @ -.LCB22649: -@ Patches/../C_code.c:8216: proc->digit--; + bgt .LCB22673 @ + b .L3620 @long jump @ +.LCB22673: +@ Patches/../C_code.c:8221: proc->digit--; subs r0, r2, #1 @ tmp1184, prephitmp_624, lsls r0, r0, #24 @ tmp1185, tmp1184, mov r9, r0 @ tmp1185, tmp1185 @@ -27332,126 +27363,126 @@ ConfigMenuLoop: mov r0, ip @ tmp1175, tmp1175 mov r2, r9 @ _178, _178 strb r2, [r4, r0] @ _178, proc_345(D)->digit -@ Patches/../C_code.c:8223: if (keys & DPAD_LEFT) +@ Patches/../C_code.c:8228: if (keys & DPAD_LEFT) ldr r2, [sp, #12] @ _718, %sfp cmp r2, #0 @ _718, - bne .LCB22664 @ - bl .L3795 @far jump @ -.LCB22664: -@ Patches/../C_code.c:8225: if (proc->digit < (max_digits)) + bne .LCB22688 @ + bl .L3798 @far jump @ +.LCB22688: +@ Patches/../C_code.c:8230: if (proc->digit < (max_digits)) cmp fp, r3 @ _177, result - blt .LCB22666 @ - bl .L3622 @far jump @ -.LCB22666: -@ Patches/../C_code.c:8227: proc->digit++; + blt .LCB22690 @ + bl .L3625 @far jump @ +.LCB22690: +@ Patches/../C_code.c:8232: proc->digit++; ldr r2, [sp, #8] @ prephitmp_624, %sfp strb r2, [r4, r0] @ prephitmp_624, proc_345(D)->digit -.L3621: -@ Patches/../C_code.c:8237: if (keys & DPAD_UP) +.L3624: +@ Patches/../C_code.c:8242: if (keys & DPAD_UP) lsls r3, r6, #25 @ tmp1654, keys, - bpl .L3627 @, -@ Patches/../C_code.c:8239: if (proc->seed == max) + bpl .L3630 @, +@ Patches/../C_code.c:8244: if (proc->seed == max) ldr r0, [r4, #44] @ _187, proc_345(D)->seed -@ Patches/../C_code.c:8239: if (proc->seed == max) - ldr r3, .L3813+40 @ tmp1226, +@ Patches/../C_code.c:8244: if (proc->seed == max) + ldr r3, .L3816+40 @ tmp1226, cmp r0, r3 @ _187, tmp1226 - beq .L3628 @, -@ Patches/../C_code.c:8245: proc->seed += DigitDecimalTable[proc->digit]; + beq .L3631 @, +@ Patches/../C_code.c:8250: proc->seed += DigitDecimalTable[proc->digit]; mov r8, r0 @ _187, _187 -@ Patches/../C_code.c:8245: proc->seed += DigitDecimalTable[proc->digit]; +@ Patches/../C_code.c:8250: proc->seed += DigitDecimalTable[proc->digit]; ldr r2, [sp, #8] @ prephitmp_624, %sfp lsls r5, r2, #2 @ tmp1228, prephitmp_624, adds r5, r1, r5 @ tmp1229, tmp1586, tmp1228 -@ Patches/../C_code.c:8245: proc->seed += DigitDecimalTable[proc->digit]; +@ Patches/../C_code.c:8250: proc->seed += DigitDecimalTable[proc->digit]; ldr r5, [r5, #8] @ DigitDecimalTable[_715], DigitDecimalTable[_715] add r8, r8, r5 @ _187, DigitDecimalTable[_715] -@ Patches/../C_code.c:8246: if (proc->seed > max) +@ Patches/../C_code.c:8251: if (proc->seed > max) cmp r8, r3 @ _170, tmp1226 - ble .L3628 @, + ble .L3631 @, mov r8, r3 @ _170, tmp1226 -.L3628: -@ Patches/../C_code.c:8241: proc->seed = min; +.L3631: +@ Patches/../C_code.c:8246: proc->seed = min; mov r3, r8 @ _170, _170 -@ Patches/../C_code.c:8251: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8256: proc->redraw = RedrawSome; movs r0, #1 @ tmp1234, -@ Patches/../C_code.c:8241: proc->seed = min; +@ Patches/../C_code.c:8246: proc->seed = min; str r3, [r4, #44] @ _170, proc_345(D)->seed -@ Patches/../C_code.c:8251: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8256: proc->redraw = RedrawSome; movs r3, #50 @ tmp1233, strb r0, [r4, r3] @ tmp1234, proc_345(D)->redraw -.L3627: -@ Patches/../C_code.c:8253: if (keys & DPAD_DOWN) +.L3630: +@ Patches/../C_code.c:8258: if (keys & DPAD_DOWN) lsls r6, r6, #24 @ tmp1655, keys, - bpl .L3630 @, -@ Patches/../C_code.c:8256: if (proc->seed == min) + bpl .L3633 @, +@ Patches/../C_code.c:8261: if (proc->seed == min) ldr r3, [r4, #44] @ _193, proc_345(D)->seed -@ Patches/../C_code.c:8256: if (proc->seed == min) +@ Patches/../C_code.c:8261: if (proc->seed == min) cmp r3, #0 @ _193, - bne .LCB22707 @ - bl .L3692 @far jump @ -.LCB22707: -@ Patches/../C_code.c:8262: proc->seed -= DigitDecimalTable[proc->digit]; + bne .LCB22731 @ + bl .L3695 @far jump @ +.LCB22731: +@ Patches/../C_code.c:8267: proc->seed -= DigitDecimalTable[proc->digit]; ldr r2, [sp, #8] @ prephitmp_624, %sfp lsls r0, r2, #2 @ tmp1244, prephitmp_624, adds r0, r1, r0 @ tmp1245, tmp1586, tmp1244 -@ Patches/../C_code.c:8262: proc->seed -= DigitDecimalTable[proc->digit]; +@ Patches/../C_code.c:8267: proc->seed -= DigitDecimalTable[proc->digit]; ldr r0, [r0, #8] @ DigitDecimalTable[_715], DigitDecimalTable[_715] subs r3, r3, r0 @ _433, _193, DigitDecimalTable[_715] -@ Patches/../C_code.c:8263: if (proc->seed < min) +@ Patches/../C_code.c:8268: if (proc->seed < min) mvns r0, r3 @ tmp1612, _433 asrs r0, r0, #31 @ tmp1611, tmp1612, ands r3, r0 @ _433, tmp1611 -.L3631: -@ Patches/../C_code.c:8258: proc->seed = max; +.L3634: +@ Patches/../C_code.c:8263: proc->seed = max; str r3, [r4, #44] @ _433, proc_345(D)->seed -@ Patches/../C_code.c:8269: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8274: proc->redraw = RedrawSome; movs r0, #1 @ tmp1249, movs r3, #50 @ tmp1248, strb r0, [r4, r3] @ tmp1249, proc_345(D)->redraw -.L3630: -@ Patches/../C_code.c:8272: DisplayHand(CursorLocationTable[proc->digit].x, CursorLocationTable[proc->digit].y + (id * 8), true); +.L3633: +@ Patches/../C_code.c:8277: DisplayHand(CursorLocationTable[proc->digit].x, CursorLocationTable[proc->digit].y + (id * 8), true); ldr r3, [sp, #8] @ prephitmp_624, %sfp lsls r2, r3, #3 @ tmp1252, prephitmp_624, adds r2, r1, r2 @ tmp1253, tmp1586, tmp1252 -@ Patches/../C_code.c:7634: DisplayVertUiHand(x, y); +@ Patches/../C_code.c:7639: DisplayVertUiHand(x, y); adds r2, r2, #40 @, ldmia r2!, {r0, r1} @,, bl DisplayVertUiHand @ -@ Patches/../C_code.c:8273: if (proc->redraw == RedrawSome) +@ Patches/../C_code.c:8278: if (proc->redraw == RedrawSome) movs r3, #50 @ tmp1261, -@ Patches/../C_code.c:8273: if (proc->redraw == RedrawSome) +@ Patches/../C_code.c:8278: if (proc->redraw == RedrawSome) ldrb r3, [r4, r3] @ tmp1262, cmp r3, #1 @ tmp1262, - beq .LCB22733 @ - b .L3544 @long jump @ -.LCB22733: -.L3633: -@ Patches/../C_code.c:8275: proc->redraw = RedrawNone; + beq .LCB22757 @ + b .L3547 @long jump @ +.LCB22757: +.L3636: +@ Patches/../C_code.c:8280: proc->redraw = RedrawNone; movs r3, #50 @ tmp1263, movs r2, #0 @ tmp1264, -@ Patches/../C_code.c:8276: DrawConfigMenu(proc); +@ Patches/../C_code.c:8281: DrawConfigMenu(proc); movs r0, r4 @, proc -@ Patches/../C_code.c:8275: proc->redraw = RedrawNone; +@ Patches/../C_code.c:8280: proc->redraw = RedrawNone; strb r2, [r4, r3] @ tmp1264, -@ Patches/../C_code.c:8276: DrawConfigMenu(proc); +@ Patches/../C_code.c:8281: DrawConfigMenu(proc); bl DrawConfigMenu @ - b .L3544 @ -.L3790: -@ Patches/../C_code.c:7838: proc->seed = GetInitialSeed(2, proc); + b .L3547 @ +.L3793: +@ Patches/../C_code.c:7843: proc->seed = GetInitialSeed(2, proc); movs r1, r4 @, proc movs r0, #2 @, bl GetInitialSeed @ -@ Patches/../C_code.c:7839: proc->redraw = true; +@ Patches/../C_code.c:7844: proc->redraw = true; movs r3, #50 @ tmp477, movs r2, #1 @ tmp478, -@ Patches/../C_code.c:7838: proc->seed = GetInitialSeed(2, proc); +@ Patches/../C_code.c:7843: proc->seed = GetInitialSeed(2, proc); str r0, [r4, #44] @ tmp1627, proc_345(D)->seed -@ Patches/../C_code.c:7839: proc->redraw = true; +@ Patches/../C_code.c:7844: proc->redraw = true; strb r2, [r4, r3] @ tmp478, proc_345(D)->redraw - b .L3549 @ -.L3814: + b .L3552 @ +.L3817: .align 2 -.L3813: +.L3816: .word SRR_TotalOptions .word sKeyStatusBuffer .word RandValues @@ -27463,331 +27494,331 @@ ConfigMenuLoop: .word .LANCHOR13 .word 999998 .word 999999 -.L3788: -@ Patches/../C_code.c:7827: DisplayUiVArrow(MENU_X + (9 * 8), MENU_Y + 8, 0x3240, 1); // up arrow +.L3791: +@ Patches/../C_code.c:7832: DisplayUiVArrow(MENU_X + (9 * 8), MENU_Y + 8, 0x3240, 1); // up arrow movs r2, #201 @, movs r3, #1 @, movs r1, #16 @, movs r0, #90 @, - ldr r6, .L3815 @ tmp1589, + ldr r6, .L3818 @ tmp1589, lsls r2, r2, #6 @,, - bl .L143 @ -@ Patches/../C_code.c:7830: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) + bl .L146 @ +@ Patches/../C_code.c:7835: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) cmp r7, #7 @ pretmp_727, - bgt .LCB22780 @ - b .L3547 @long jump @ -.LCB22780: -@ Patches/../C_code.c:7830: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) + bgt .LCB22804 @ + b .L3550 @long jump @ +.LCB22804: +@ Patches/../C_code.c:7835: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) ldrb r2, [r4, r5] @ tmp470, -@ Patches/../C_code.c:7830: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) +@ Patches/../C_code.c:7835: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) subs r3, r7, #7 @ tmp471, pretmp_727, -@ Patches/../C_code.c:7830: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) +@ Patches/../C_code.c:7835: if ((SRR_TotalOptions > SRR_MAXDISP) && (proc->offset < (SRR_TotalOptions - SRR_MAXDISP))) cmp r2, r3 @ tmp470, tmp471 - blt .LCB22784 @ - b .L3547 @long jump @ -.LCB22784: - b .L3673 @ -.L3612: -@ Patches/../C_code.c:8283: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) + blt .LCB22808 @ + b .L3550 @long jump @ +.LCB22808: + b .L3676 @ +.L3615: +@ Patches/../C_code.c:8288: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) ldr r3, [sp, #4] @ _206, %sfp mov ip, r3 @ _206, _206 add ip, ip, r5 @ _206, id -@ Patches/../C_code.c:8283: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) +@ Patches/../C_code.c:8288: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) mov r3, ip @ _206, _206 cmp r3, #25 @ _206, - beq .L3796 @, -@ Patches/../C_code.c:8333: if (keys & DPAD_DOWN) + beq .L3799 @, +@ Patches/../C_code.c:8338: if (keys & DPAD_DOWN) lsls r3, r6, #24 @ tmp1662, keys, - bpl .LCB22800 @ - b .L3655 @long jump @ -.LCB22800: -@ Patches/../C_code.c:8352: else if (keys & DPAD_UP) + bpl .LCB22824 @ + b .L3658 @long jump @ +.LCB22824: +@ Patches/../C_code.c:8357: else if (keys & DPAD_UP) lsls r3, r6, #25 @ tmp1664, keys, - bpl .L3770 @, -@ Patches/../C_code.c:8354: if ((id + offset) <= 0) + bpl .L3773 @, +@ Patches/../C_code.c:8359: if ((id + offset) <= 0) mov r3, ip @ _206, _206 cmp r3, #0 @ _206, - ble .LCB22809 @ - b .L3656 @long jump @ -.LCB22809: - ldr r1, .L3815+4 @ tmp1586, -.L3624: -@ Patches/../C_code.c:8356: proc->id = SRR_MAXDISP; + ble .LCB22833 @ + b .L3659 @long jump @ +.LCB22833: + ldr r1, .L3818+4 @ tmp1586, +.L3627: +@ Patches/../C_code.c:8361: proc->id = SRR_MAXDISP; movs r3, #48 @ tmp1424, movs r2, #7 @ tmp1425, -@ Patches/../C_code.c:8357: proc->offset = SRR_TotalOptions - SRR_MAXDISP; +@ Patches/../C_code.c:8362: proc->offset = SRR_TotalOptions - SRR_MAXDISP; subs r7, r7, #7 @ tmp1428, -@ Patches/../C_code.c:8356: proc->id = SRR_MAXDISP; +@ Patches/../C_code.c:8361: proc->id = SRR_MAXDISP; strb r2, [r4, r3] @ tmp1425, proc_345(D)->id -@ Patches/../C_code.c:8357: proc->offset = SRR_TotalOptions - SRR_MAXDISP; +@ Patches/../C_code.c:8362: proc->offset = SRR_TotalOptions - SRR_MAXDISP; adds r3, r3, #1 @ tmp1429, strb r7, [r4, r3] @ tmp1428, proc_345(D)->offset -@ Patches/../C_code.c:8358: proc->redraw = RedrawAll; +@ Patches/../C_code.c:8363: proc->redraw = RedrawAll; subs r2, r2, #5 @ tmp1432, adds r3, r3, #1 @ tmp1431, strb r2, [r4, r3] @ tmp1432, proc_345(D)->redraw -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); lsls r3, r5, #3 @ tmp1435, id, adds r3, r1, r3 @ tmp1436, tmp1586, tmp1435 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r3, r3, #112 @, ldmia r3, {r0, r3} @,, - b .L3661 @ -.L3791: -@ Patches/../C_code.c:7851: if (RandValues->seed != proc->seed) + b .L3664 @ +.L3794: +@ Patches/../C_code.c:7856: if (RandValues->seed != proc->seed) ldr r2, [sp, #20] @ pretmp_675, %sfp subs r0, r3, r2 @ tmp502, _13, pretmp_675 subs r3, r0, #1 @ tmp503, tmp502 sbcs r0, r0, r3 @ reloadUnits, tmp502, tmp503 - b .L3551 @ -.L3616: -@ Patches/../C_code.c:8223: if (keys & DPAD_LEFT) + b .L3554 @ +.L3619: +@ Patches/../C_code.c:8228: if (keys & DPAD_LEFT) ldr r2, [sp, #12] @ _718, %sfp cmp r2, #0 @ _718, - beq .L3619 @, -@ Patches/../C_code.c:8225: if (proc->digit < (max_digits)) + beq .L3622 @, +@ Patches/../C_code.c:8230: if (proc->digit < (max_digits)) ldr r2, [sp, #8] @ prephitmp_624, %sfp cmp r2, r3 @ prephitmp_624, result - blt .LCB22843 @ - b .L3622 @long jump @ -.LCB22843: -@ Patches/../C_code.c:8227: proc->digit++; + blt .LCB22867 @ + b .L3625 @long jump @ +.LCB22867: +@ Patches/../C_code.c:8232: proc->digit++; mov r3, ip @ tmp1175, tmp1175 adds r2, r2, #1 @ prephitmp_624, lsls r2, r2, #24 @ tmp1196, tmp1195, asrs r2, r2, #24 @ prephitmp_624, tmp1196, str r2, [sp, #8] @ prephitmp_624, %sfp strb r2, [r4, r3] @ prephitmp_624, proc_345(D)->digit -.L3619: -@ Patches/../C_code.c:8235: if (proc->digit) +.L3622: +@ Patches/../C_code.c:8240: if (proc->digit) ldr r3, [sp, #8] @ prephitmp_624, %sfp cmp r3, #0 @ prephitmp_624, - beq .LCB22854 @ - b .L3621 @long jump @ -.LCB22854: -.L3626: -@ Patches/../C_code.c:8333: if (keys & DPAD_DOWN) + beq .LCB22878 @ + b .L3624 @long jump @ +.LCB22878: +.L3629: +@ Patches/../C_code.c:8338: if (keys & DPAD_DOWN) lsls r3, r6, #24 @ tmp1656, keys, - bmi .LCB22861 @ - b .L3634 @long jump @ -.LCB22861: -.L3623: -@ Patches/../C_code.c:8337: proc->id++; + bmi .LCB22885 @ + b .L3637 @long jump @ +.LCB22885: +.L3626: +@ Patches/../C_code.c:8342: proc->id++; movs r3, #48 @ tmp1273, ldrsb r2, [r4, r3] @ pretmp_629, lsls r6, r5, #3 @ tmp1581, id, -.L3635: -@ Patches/../C_code.c:8337: proc->id++; +.L3638: +@ Patches/../C_code.c:8342: proc->id++; adds r3, r2, #1 @ tmp1395, pretmp_629, movs r2, #48 @ tmp1396, -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r6, r1, r6 @ tmp1400, tmp1586, tmp1581 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r6, r6, #112 @, -@ Patches/../C_code.c:8337: proc->id++; +@ Patches/../C_code.c:8342: proc->id++; strb r3, [r4, r2] @ tmp1395, proc_345(D)->id -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); ldmia r6!, {r0, r3} @,, -.L3661: -@ Patches/../C_code.c:7638: DisplayUiHand(x, y); +.L3664: +@ Patches/../C_code.c:7643: DisplayUiHand(x, y); movs r1, r3 @, prephitmp_666 - ldr r3, .L3815+8 @ tmp1564, + ldr r3, .L3818+8 @ tmp1564, bl .L14 @ -@ Patches/../C_code.c:8407: if (proc->redraw == RedrawSome) +@ Patches/../C_code.c:8412: if (proc->redraw == RedrawSome) movs r3, #50 @ tmp1565, ldrb r3, [r4, r3] @ _265, -@ Patches/../C_code.c:8407: if (proc->redraw == RedrawSome) +@ Patches/../C_code.c:8412: if (proc->redraw == RedrawSome) cmp r3, #1 @ _265, - bne .LCB22882 @ - b .L3797 @long jump @ -.LCB22882: -.L3670: -@ Patches/../C_code.c:8416: if (proc->redraw == RedrawAll) + bne .LCB22906 @ + b .L3800 @long jump @ +.LCB22906: +.L3673: +@ Patches/../C_code.c:8421: if (proc->redraw == RedrawAll) cmp r3, #2 @ _265, - beq .LCB22885 @ - b .L3544 @long jump @ -.LCB22885: -@ Patches/../C_code.c:8418: proc->redraw = RedrawNone; + beq .LCB22909 @ + b .L3547 @long jump @ +.LCB22909: +@ Patches/../C_code.c:8423: proc->redraw = RedrawNone; movs r2, #0 @ tmp1577, adds r3, r3, #48 @ tmp1576, -@ Patches/../C_code.c:8419: RedrawAllText(proc); +@ Patches/../C_code.c:8424: RedrawAllText(proc); movs r0, r4 @, proc -@ Patches/../C_code.c:8418: proc->redraw = RedrawNone; +@ Patches/../C_code.c:8423: proc->redraw = RedrawNone; strb r2, [r4, r3] @ tmp1577, proc_345(D)->redraw -@ Patches/../C_code.c:8419: RedrawAllText(proc); +@ Patches/../C_code.c:8424: RedrawAllText(proc); bl RedrawAllText @ - b .L3544 @ -.L3796: -@ Patches/../C_code.c:8283: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) + b .L3547 @ +.L3799: +@ Patches/../C_code.c:8288: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) adds r3, r3, #61 @ tmp1274, -@ Patches/../C_code.c:8283: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) +@ Patches/../C_code.c:8288: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) ldrsb r3, [r4, r3] @ tmp1275, cmp r3, #3 @ tmp1275, - bne .LCB22898 @ - b .L3798 @long jump @ -.LCB22898: -.L3638: -@ Patches/../C_code.c:8333: if (keys & DPAD_DOWN) + bne .LCB22922 @ + b .L3801 @long jump @ +.LCB22922: +.L3641: +@ Patches/../C_code.c:8338: if (keys & DPAD_DOWN) lsls r3, r6, #24 @ tmp1660, keys, - bpl .LCB22905 @ - b .L3655 @long jump @ -.LCB22905: -@ Patches/../C_code.c:8352: else if (keys & DPAD_UP) + bpl .LCB22929 @ + b .L3658 @long jump @ +.LCB22929: +@ Patches/../C_code.c:8357: else if (keys & DPAD_UP) lsls r3, r6, #25 @ tmp1661, keys, - bmi .L3656 @, -.L3770: + bmi .L3659 @, +.L3773: movs r3, #16 @ tmp1485, ands r3, r6 @ tmp1485, keys mov r10, r3 @ _360, tmp1485 - ldr r1, .L3815+4 @ tmp1586, -.L3658: -@ Patches/../C_code.c:8372: else if (keys & DPAD_RIGHT) + ldr r1, .L3818+4 @ tmp1586, +.L3661: +@ Patches/../C_code.c:8377: else if (keys & DPAD_RIGHT) mov r3, r10 @ _360, _360 cmp r3, #0 @ _360, - beq .LCB22923 @ - b .L3625 @long jump @ -.LCB22923: -@ Patches/../C_code.c:8389: else if (keys & DPAD_LEFT) + beq .LCB22947 @ + b .L3628 @long jump @ +.LCB22947: +@ Patches/../C_code.c:8394: else if (keys & DPAD_LEFT) lsls r6, r6, #26 @ tmp1665, keys, - bpl .LCB22929 @ - b .L3667 @long jump @ -.LCB22929: -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); + bpl .LCB22953 @ + b .L3670 @long jump @ +.LCB22953: +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); lsls r3, r5, #3 @ tmp1524, id, adds r3, r1, r3 @ tmp1525, tmp1586, tmp1524 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r3, r3, #112 @, ldmia r3, {r0, r3} @,, - b .L3661 @ -.L3793: -@ Patches/../C_code.c:8204: proc->seed = GetInitialSeed(0, proc); + b .L3664 @ +.L3796: +@ Patches/../C_code.c:8209: proc->seed = GetInitialSeed(0, proc); movs r1, r4 @, proc movs r0, #0 @, bl GetInitialSeed @ -@ Patches/../C_code.c:8205: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8210: proc->redraw = RedrawSome; movs r3, #50 @ tmp1159, movs r2, #1 @ tmp1160, -@ Patches/../C_code.c:8204: proc->seed = GetInitialSeed(0, proc); +@ Patches/../C_code.c:8209: proc->seed = GetInitialSeed(0, proc); str r0, [r4, #44] @ tmp1632, proc_345(D)->seed -@ Patches/../C_code.c:8205: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8210: proc->redraw = RedrawSome; strb r2, [r4, r3] @ tmp1160, proc_345(D)->redraw - b .L3613 @ -.L3792: -@ Patches/../C_code.c:7869: if (proc->Option[1] >= 3) + b .L3616 @ +.L3795: +@ Patches/../C_code.c:7874: if (proc->Option[1] >= 3) movs r3, #1 @ tmp513, cmp r1, #2 @ pretmp_681, - bgt .L3554 @, + bgt .L3557 @, movs r3, #0 @ tmp513, -.L3554: -@ Patches/../C_code.c:7873: if (proc->Option[1] == 0) +.L3557: +@ Patches/../C_code.c:7878: if (proc->Option[1] == 0) lsls r3, r3, #24 @ tmp522, tmp513, - bne .L3696 @, + bne .L3699 @, ldr r3, [sp, #24] @ pretmp_681, %sfp cmp r3, #0 @ pretmp_681, - bne .L3678 @, -.L3696: + bne .L3681 @, +.L3699: movs r3, #0 @ reloadEnemies, -@ Patches/../C_code.c:7875: reloadUnits = true; +@ Patches/../C_code.c:7880: reloadUnits = true; movs r0, #1 @ reloadUnits, -@ Patches/../C_code.c:7873: if (proc->Option[1] == 0) +@ Patches/../C_code.c:7878: if (proc->Option[1] == 0) mov r9, r3 @ reloadPlayers, reloadPlayers str r3, [sp, #8] @ reloadEnemies, %sfp - b .L3552 @ -.L3794: -@ Patches/../C_code.c:7673: result = 6; + b .L3555 @ +.L3797: +@ Patches/../C_code.c:7678: result = 6; subs r3, r3, #1 @ result, - b .L3615 @ -.L3571: -@ Patches/../C_code.c:7970: if (reloadEnemies) + b .L3618 @ +.L3574: +@ Patches/../C_code.c:7975: if (reloadEnemies) ldr r3, [sp, #8] @ reloadEnemies, %sfp cmp r3, #0 @ reloadEnemies, - beq .LCB22982 @ - b .L3799 @long jump @ -.LCB22982: + beq .LCB23006 @ + b .L3802 @long jump @ +.LCB23006: movs r2, #0 @ _595, -.L3574: -@ Patches/../C_code.c:7968: proc->Option[20] = 2; +.L3577: +@ Patches/../C_code.c:7973: proc->Option[20] = 2; movs r3, #82 @ tmp647, strb r2, [r4, r3] @ _595, - b .L3573 @ -.L3656: -@ Patches/../C_code.c:8360: else if ((!id) && (offset)) + b .L3576 @ +.L3659: +@ Patches/../C_code.c:8365: else if ((!id) && (offset)) cmp r5, #0 @ id, - beq .LCB22996 @ - b .L3664 @long jump @ -.LCB22996: + beq .LCB23020 @ + b .L3667 @long jump @ +.LCB23020: ldr r3, [sp, #4] @ offset, %sfp cmp r3, #0 @ offset, - bne .LCB23002 @ - b .L3664 @long jump @ -.LCB23002: -@ Patches/../C_code.c:8362: proc->offset--; + bne .LCB23026 @ + b .L3667 @long jump @ +.LCB23026: +@ Patches/../C_code.c:8367: proc->offset--; movs r2, #49 @ tmp1465, subs r3, r3, #1 @ tmp1464, strb r3, [r4, r2] @ tmp1464, proc_345(D)->offset -@ Patches/../C_code.c:8363: proc->redraw = RedrawAll; +@ Patches/../C_code.c:8368: proc->redraw = RedrawAll; movs r3, #50 @ tmp1467, subs r2, r2, #47 @ tmp1468, strb r2, [r4, r3] @ tmp1468, proc_345(D)->redraw movs r0, #18 @ prephitmp_648, subs r3, r3, #26 @ prephitmp_666, - b .L3661 @ -.L3678: -@ Patches/../C_code.c:7849: int reloadEnemies = false; + b .L3664 @ +.L3681: +@ Patches/../C_code.c:7854: int reloadEnemies = false; movs r3, #0 @ reloadEnemies, -@ Patches/../C_code.c:7848: int reloadPlayers = false; +@ Patches/../C_code.c:7853: int reloadPlayers = false; mov r9, r3 @ reloadPlayers, reloadPlayers -@ Patches/../C_code.c:7849: int reloadEnemies = false; +@ Patches/../C_code.c:7854: int reloadEnemies = false; str r3, [sp, #8] @ reloadEnemies, %sfp - b .L3552 @ -.L3816: + b .L3555 @ +.L3819: .align 2 -.L3815: +.L3818: .word DisplayUiVArrow .word .LANCHOR13 .word DisplayUiHand -.L3565: -@ Patches/../C_code.c:7942: if (reloadUnits) +.L3568: +@ Patches/../C_code.c:7947: if (reloadUnits) cmp r0, #0 @ reloadUnits, - beq .LCB23031 @ - b .L3567 @long jump @ -.LCB23031: -@ Patches/../C_code.c:7947: if (reloadPlayers) + beq .LCB23055 @ + b .L3570 @long jump @ +.LCB23055: +@ Patches/../C_code.c:7952: if (reloadPlayers) mov r0, r9 @ reloadPlayers, reloadPlayers cmp r0, #0 @ reloadPlayers, - beq .L3568 @, -@ Patches/../C_code.c:7949: proc->reloadPlayers = true; + beq .L3571 @, +@ Patches/../C_code.c:7954: proc->reloadPlayers = true; movs r0, #54 @ tmp632, movs r6, #1 @ tmp633, strb r6, [r4, r0] @ tmp633, proc_345(D)->reloadPlayers -.L3568: -@ Patches/../C_code.c:7951: if (reloadEnemies) +.L3571: +@ Patches/../C_code.c:7956: if (reloadEnemies) ldr r0, [sp, #8] @ reloadEnemies, %sfp cmp r0, #0 @ reloadEnemies, - beq .LCB23042 @ - b .L3566 @long jump @ -.LCB23042: -@ Patches/../C_code.c:7956: if (proc->calledFromChapter) + beq .LCB23066 @ + b .L3569 @long jump @ +.LCB23066: +@ Patches/../C_code.c:7961: if (proc->calledFromChapter) movs r0, #53 @ tmp638, -@ Patches/../C_code.c:7956: if (proc->calledFromChapter) +@ Patches/../C_code.c:7961: if (proc->calledFromChapter) ldrb r0, [r4, r0] @ tmp639, cmp r0, #0 @ tmp639, - beq .LCB23046 @ - b .L3800 @long jump @ -.LCB23046: -.L3570: -@ Patches/../C_code.c:7983: if (proc->Option[20] == 0) + beq .LCB23070 @ + b .L3803 @long jump @ +.LCB23070: +.L3573: +@ Patches/../C_code.c:7988: if (proc->Option[20] == 0) movs r0, #82 @ tmp655, ldrsb r0, [r4, r0] @ _75, -@ Patches/../C_code.c:7983: if (proc->Option[20] == 0) +@ Patches/../C_code.c:7988: if (proc->Option[20] == 0) cmp r0, #0 @ _75, - beq .LCB23051 @ - b .L3576 @long jump @ -.LCB23051: -@ Patches/../C_code.c:7985: proc->reloadPlayers = false; + beq .LCB23075 @ + b .L3579 @long jump @ +.LCB23075: +@ Patches/../C_code.c:7990: proc->reloadPlayers = false; strh r0, [r4, #54] @ _75, MEM [(unsigned char *)proc_345(D) + 54B] -.L3582: -@ Patches/../C_code.c:8009: RandValues->seed = proc->seed; +.L3585: +@ Patches/../C_code.c:8014: RandValues->seed = proc->seed; movs r0, #31 @ tmp681, mov r8, r0 @ tmp681, tmp681 mov r6, r8 @ tmp681, tmp681 @@ -27807,7 +27838,7 @@ ConfigMenuLoop: orrs r0, r6 @ tmp695, tmp692 mov r6, ip @ pretmp_677, pretmp_677 str r0, [r6] @ tmp695, MEM[(struct RandomizerValues *)prephitmp_678] -@ Patches/../C_code.c:8011: RecruitValues->recruitment = proc->Option[1]; +@ Patches/../C_code.c:8016: RecruitValues->recruitment = proc->Option[1]; movs r0, #7 @ tmp699, ldr r6, [sp, #24] @ pretmp_681, %sfp ands r6, r0 @ pretmp_681, tmp699 @@ -27818,15 +27849,15 @@ ConfigMenuLoop: mov r6, r9 @ tmp701, tmp701 mov r7, ip @ tmp705, tmp705 orrs r6, r7 @ tmp701, tmp705 -@ Patches/../C_code.c:8012: GrowthValues->ForcedCharTable = proc->Option[2]; +@ Patches/../C_code.c:8017: GrowthValues->ForcedCharTable = proc->Option[2]; mov r7, r8 @ tmp681, tmp681 -@ Patches/../C_code.c:8011: RecruitValues->recruitment = proc->Option[1]; +@ Patches/../C_code.c:8016: RecruitValues->recruitment = proc->Option[1]; mov r10, r0 @ tmp699, tmp699 -@ Patches/../C_code.c:8012: GrowthValues->ForcedCharTable = proc->Option[2]; +@ Patches/../C_code.c:8017: GrowthValues->ForcedCharTable = proc->Option[2]; mov r0, r8 @ tmp681, tmp681 -@ Patches/../C_code.c:8011: RecruitValues->recruitment = proc->Option[1]; +@ Patches/../C_code.c:8016: RecruitValues->recruitment = proc->Option[1]; strb r6, [r2] @ tmp709, prephitmp_684->recruitment -@ Patches/../C_code.c:8012: GrowthValues->ForcedCharTable = proc->Option[2]; +@ Patches/../C_code.c:8017: GrowthValues->ForcedCharTable = proc->Option[2]; ldr r6, [sp, #32] @ pretmp_685, %sfp ands r6, r7 @ pretmp_685, tmp681 mov ip, r6 @ tmp716, pretmp_685 @@ -27837,20 +27868,20 @@ ConfigMenuLoop: mov r7, ip @ tmp716, tmp716 mov r0, r9 @ tmp720, tmp720 orrs r7, r0 @ tmp716, tmp720 -@ Patches/../C_code.c:8013: RecruitValues->pauseNameReplace = false; +@ Patches/../C_code.c:8018: RecruitValues->pauseNameReplace = false; ldrb r0, [r2] @ prephitmp_684->pauseNameReplace, prephitmp_684->pauseNameReplace mov ip, r0 @ prephitmp_684->pauseNameReplace, prephitmp_684->pauseNameReplace -@ Patches/../C_code.c:8012: GrowthValues->ForcedCharTable = proc->Option[2]; +@ Patches/../C_code.c:8017: GrowthValues->ForcedCharTable = proc->Option[2]; strb r7, [r6, #1] @ tmp724, prephitmp_688->ForcedCharTable -@ Patches/../C_code.c:8013: RecruitValues->pauseNameReplace = false; +@ Patches/../C_code.c:8018: RecruitValues->pauseNameReplace = false; movs r0, #8 @ tmp731, mov r6, ip @ prephitmp_684->pauseNameReplace, prephitmp_684->pauseNameReplace bics r6, r0 @ prephitmp_684->pauseNameReplace, tmp731 -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; movs r0, #3 @ tmp736, -@ Patches/../C_code.c:8013: RecruitValues->pauseNameReplace = false; +@ Patches/../C_code.c:8018: RecruitValues->pauseNameReplace = false; strb r6, [r2] @ tmp730, prephitmp_684->pauseNameReplace -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; ldr r6, [sp, #40] @ pretmp_693, %sfp movs r7, r6 @ tmp737, pretmp_693 mov ip, r0 @ tmp736, tmp736 @@ -27882,21 +27913,21 @@ ConfigMenuLoop: ands r7, r1 @ tmp736, pretmp_699 lsls r7, r7, #9 @ tmp769, tmp767, orrs r0, r7 @ tmp770, tmp769 -@ Patches/../C_code.c:8016: if (proc->Option[4] > 3) +@ Patches/../C_code.c:8021: if (proc->Option[4] > 3) movs r7, #1 @ tmp771, mov ip, r7 @ tmp771, tmp771 cmp r6, #3 @ pretmp_693, - bgt .L3583 @, + bgt .L3586 @, movs r6, #0 @ tmp771, mov ip, r6 @ tmp771, tmp771 -.L3583: -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +.L3586: +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; mov r6, ip @ tmp771, tmp771 lsls r6, r6, #28 @ tmp777, tmp771, orrs r0, r6 @ tmp779, tmp777 ldr r6, [r3] @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] mov ip, r6 @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] - ldr r6, .L3817 @ tmp783, + ldr r6, .L3820 @ tmp783, mov r8, r6 @ tmp783, tmp783 mov r6, ip @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] mov r7, r8 @ tmp783, tmp783 @@ -27904,20 +27935,20 @@ ConfigMenuLoop: orrs r6, r0 @ tmp781, tmp779 str r6, [r3] @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] mov ip, r6 @ MEM[(struct RandomizerSettings *)prephitmp_692], tmp781 -@ Patches/../C_code.c:8027: RecruitValues->newClasses = 0; +@ Patches/../C_code.c:8032: RecruitValues->newClasses = 0; movs r6, #48 @ tmp790, ldrb r0, [r2] @ prephitmp_684->newClasses, prephitmp_684->newClasses bics r0, r6 @ tmp789, tmp790 mov r8, r6 @ tmp790, tmp790 strb r0, [r2] @ tmp789, prephitmp_684->newClasses -@ Patches/../C_code.c:8028: if (proc->Option[7] >= 4) +@ Patches/../C_code.c:8033: if (proc->Option[7] >= 4) cmp r1, #3 @ pretmp_699, - ble .L3584 @, -@ Patches/../C_code.c:8030: RandBitflags->class = proc->Option[7] - 3; + ble .L3587 @, +@ Patches/../C_code.c:8035: RandBitflags->class = proc->Option[7] - 3; movs r0, #3 @ tmp802, -@ Patches/../C_code.c:8030: RandBitflags->class = proc->Option[7] - 3; +@ Patches/../C_code.c:8035: RandBitflags->class = proc->Option[7] - 3; subs r1, r1, #3 @ tmp795, -@ Patches/../C_code.c:8030: RandBitflags->class = proc->Option[7] - 3; +@ Patches/../C_code.c:8035: RandBitflags->class = proc->Option[7] - 3; ands r1, r0 @ tmp801, tmp802 ldrb r0, [r3, #1] @ prephitmp_692->class, prephitmp_692->class subs r6, r6, #42 @ tmp808, @@ -27925,7 +27956,7 @@ ConfigMenuLoop: bics r0, r6 @ tmp807, tmp808 orrs r0, r1 @ tmp811, tmp804 strb r0, [r3, #1] @ tmp811, prephitmp_692->class -@ Patches/../C_code.c:8031: RecruitValues->newClasses = 1; +@ Patches/../C_code.c:8036: RecruitValues->newClasses = 1; mov r0, r8 @ tmp790, tmp790 ldrb r1, [r2] @ prephitmp_684->newClasses, prephitmp_684->newClasses bics r1, r0 @ tmp817, tmp790 @@ -27934,300 +27965,300 @@ ConfigMenuLoop: strb r1, [r2] @ tmp822, prephitmp_684->newClasses ldr r2, [r3] @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] mov ip, r2 @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] -.L3584: -@ Patches/../C_code.c:8034: RandBitflags->itemStats = ((proc->Option[8] == 1) || (proc->Option[8] == 3)); +.L3587: +@ Patches/../C_code.c:8039: RandBitflags->itemStats = ((proc->Option[8] == 1) || (proc->Option[8] == 3)); movs r2, #70 @ tmp824, -@ Patches/../C_code.c:8035: RandBitflags->foundItems = ((proc->Option[8] == 1) || (proc->Option[8] == 2)); +@ Patches/../C_code.c:8040: RandBitflags->foundItems = ((proc->Option[8] == 1) || (proc->Option[8] == 2)); movs r1, #0 @ tmp834, movs r6, #1 @ tmp833, -@ Patches/../C_code.c:8034: RandBitflags->itemStats = ((proc->Option[8] == 1) || (proc->Option[8] == 3)); +@ Patches/../C_code.c:8039: RandBitflags->itemStats = ((proc->Option[8] == 1) || (proc->Option[8] == 3)); ldrsb r2, [r4, r2] @ _462, -@ Patches/../C_code.c:8035: RandBitflags->foundItems = ((proc->Option[8] == 1) || (proc->Option[8] == 2)); +@ Patches/../C_code.c:8040: RandBitflags->foundItems = ((proc->Option[8] == 1) || (proc->Option[8] == 2)); subs r0, r2, #1 @ tmp826, _462, lsls r0, r0, #24 @ tmp831, tmp826, lsrs r0, r0, #24 @ tmp830, tmp831, cmp r6, r0 @ tmp833, tmp830 adcs r1, r1, r1 @ tmp832, tmp834, tmp834 -@ Patches/../C_code.c:8034: RandBitflags->itemStats = ((proc->Option[8] == 1) || (proc->Option[8] == 3)); +@ Patches/../C_code.c:8039: RandBitflags->itemStats = ((proc->Option[8] == 1) || (proc->Option[8] == 3)); movs r0, #2 @ tmp837, bics r2, r0 @ tmp839, tmp837 subs r2, r2, #1 @ tmp842, rsbs r0, r2, #0 @ tmp843, tmp842 adcs r2, r2, r0 @ tmp841, tmp842, tmp843 -@ Patches/../C_code.c:8036: RandBitflags->shopItems = ((proc->Option[8] == 1) || (proc->Option[8] == 2)); +@ Patches/../C_code.c:8041: RandBitflags->shopItems = ((proc->Option[8] == 1) || (proc->Option[8] == 2)); lsls r0, r1, #12 @ tmp845, _109, lsls r1, r1, #11 @ tmp846, _109, orrs r0, r1 @ tmp847, tmp846 lsls r2, r2, #19 @ tmp844, tmp841, orrs r2, r0 @ tmp849, tmp847 mov r0, ip @ MEM[(struct RandomizerSettings *)prephitmp_692], MEM[(struct RandomizerSettings *)prephitmp_692] - ldr r1, .L3817+4 @ tmp853, + ldr r1, .L3820+4 @ tmp853, ands r0, r1 @ MEM[(struct RandomizerSettings *)prephitmp_692], tmp853 orrs r2, r0 @ tmp854, tmp851 str r2, [r3] @ tmp854, MEM[(struct RandomizerSettings *)prephitmp_692] -@ Patches/../C_code.c:8039: SetFlag(CasualModeFlag); - ldr r3, .L3817+8 @ tmp855, +@ Patches/../C_code.c:8044: SetFlag(CasualModeFlag); + ldr r3, .L3820+8 @ tmp855, ldr r0, [r3] @ pretmp_713, CasualModeFlag -@ Patches/../C_code.c:8037: if (proc->Option[9] == 1) +@ Patches/../C_code.c:8042: if (proc->Option[9] == 1) movs r3, #71 @ tmp856, -@ Patches/../C_code.c:8037: if (proc->Option[9] == 1) +@ Patches/../C_code.c:8042: if (proc->Option[9] == 1) ldrsb r3, [r4, r3] @ tmp857, cmp r3, #1 @ tmp857, - bne .LCB23232 @ - b .L3801 @long jump @ -.LCB23232: -@ Patches/../C_code.c:8043: UnsetFlag(CasualModeFlag); - ldr r3, .L3817+12 @ tmp1599, + bne .LCB23256 @ + b .L3804 @long jump @ +.LCB23256: +@ Patches/../C_code.c:8048: UnsetFlag(CasualModeFlag); + ldr r3, .L3820+12 @ tmp1599, mov r8, r3 @ tmp1599, tmp1599 bl .L14 @ -.L3586: -@ Patches/../C_code.c:8046: RandBitflags->randMusic = proc->Option[10]; +.L3589: +@ Patches/../C_code.c:8051: RandBitflags->randMusic = proc->Option[10]; ldr r3, [sp, #12] @ tmp1597, %sfp - ldr r1, [r3] @ RandBitflags.322_115, RandBitflags -@ Patches/../C_code.c:8047: RandBitflags->colours = proc->Option[11]; + ldr r1, [r3] @ RandBitflags.323_115, RandBitflags +@ Patches/../C_code.c:8052: RandBitflags->colours = proc->Option[11]; movs r3, #73 @ tmp861, -@ Patches/../C_code.c:8046: RandBitflags->randMusic = proc->Option[10]; +@ Patches/../C_code.c:8051: RandBitflags->randMusic = proc->Option[10]; movs r0, #7 @ tmp867, ldrb r3, [r4, r3] @ tmp865, ands r0, r3 @ tmp868, tmp865 -@ Patches/../C_code.c:8046: RandBitflags->randMusic = proc->Option[10]; +@ Patches/../C_code.c:8051: RandBitflags->randMusic = proc->Option[10]; movs r3, #72 @ tmp871, -@ Patches/../C_code.c:8046: RandBitflags->randMusic = proc->Option[10]; +@ Patches/../C_code.c:8051: RandBitflags->randMusic = proc->Option[10]; movs r2, #3 @ tmp877, ldrb r3, [r4, r3] @ tmp875, ands r3, r2 @ tmp878, tmp877 lsls r0, r0, #16 @ tmp870, tmp868, lsls r3, r3, #14 @ tmp880, tmp878, orrs r3, r0 @ tmp881, tmp870 -@ Patches/../C_code.c:8048: RandBitflags->itemDur = proc->Option[12]; +@ Patches/../C_code.c:8053: RandBitflags->itemDur = proc->Option[12]; movs r0, #74 @ tmp882, -@ Patches/../C_code.c:8046: RandBitflags->randMusic = proc->Option[10]; +@ Patches/../C_code.c:8051: RandBitflags->randMusic = proc->Option[10]; ldrb r0, [r4, r0] @ tmp886, ands r2, r0 @ tmp889, tmp886 lsls r2, r2, #21 @ tmp891, tmp889, orrs r3, r2 @ tmp892, tmp891 -@ Patches/../C_code.c:8049: RandBitflags->playerBonus = proc->Option[13]; +@ Patches/../C_code.c:8054: RandBitflags->playerBonus = proc->Option[13]; movs r2, #75 @ tmp893, -@ Patches/../C_code.c:8046: RandBitflags->randMusic = proc->Option[10]; +@ Patches/../C_code.c:8051: RandBitflags->randMusic = proc->Option[10]; ldrb r0, [r4, r2] @ tmp897, subs r2, r2, #44 @ tmp899, ands r0, r2 @ tmp900, tmp899 lsls r0, r0, #23 @ tmp902, tmp900, - ldr r6, .L3817+16 @ tmp908, + ldr r6, .L3820+16 @ tmp908, orrs r0, r3 @ tmp904, tmp892 - ldr r3, [r1] @ MEM[(struct RandomizerSettings *)RandBitflags.322_115], MEM[(struct RandomizerSettings *)RandBitflags.322_115] + ldr r3, [r1] @ MEM[(struct RandomizerSettings *)RandBitflags.323_115], MEM[(struct RandomizerSettings *)RandBitflags.323_115] ands r3, r6 @ tmp906, tmp908 orrs r0, r3 @ tmp909, tmp906 - str r0, [r1] @ tmp909, MEM[(struct RandomizerSettings *)RandBitflags.322_115] -@ Patches/../C_code.c:8050: GrowthValues->player = proc->Option[14]; + str r0, [r1] @ tmp909, MEM[(struct RandomizerSettings *)RandBitflags.323_115] +@ Patches/../C_code.c:8055: GrowthValues->player = proc->Option[14]; ldr r3, [sp, #56] @ tmp1596, %sfp -@ Patches/../C_code.c:8050: GrowthValues->player = proc->Option[14]; +@ Patches/../C_code.c:8055: GrowthValues->player = proc->Option[14]; movs r1, #76 @ tmp911, -@ Patches/../C_code.c:8050: GrowthValues->player = proc->Option[14]; - ldr r0, [r3] @ GrowthValues.326_124, GrowthValues -@ Patches/../C_code.c:8050: GrowthValues->player = proc->Option[14]; +@ Patches/../C_code.c:8055: GrowthValues->player = proc->Option[14]; + ldr r0, [r3] @ GrowthValues.327_124, GrowthValues +@ Patches/../C_code.c:8055: GrowthValues->player = proc->Option[14]; movs r3, #15 @ tmp915, ldrb r1, [r4, r1] @ tmp917, ands r1, r3 @ tmp917, tmp915 mov ip, r1 @ tmp918, tmp917 mov r6, ip @ tmp918, tmp918 - ldrb r1, [r0] @ GrowthValues.326_124->player, GrowthValues.326_124->player + ldrb r1, [r0] @ GrowthValues.327_124->player, GrowthValues.327_124->player bics r1, r3 @ tmp922, tmp915 orrs r1, r6 @ tmp926, tmp918 - strb r1, [r0] @ tmp926, GrowthValues.326_124->player -@ Patches/../C_code.c:8051: RandValues->bonus = proc->Option[15]; + strb r1, [r0] @ tmp926, GrowthValues.327_124->player +@ Patches/../C_code.c:8056: RandValues->bonus = proc->Option[15]; mov r1, fp @ tmp1593, tmp1593 ldr r1, [r1] @ RandValues, RandValues mov ip, r1 @ RandValues, RandValues -@ Patches/../C_code.c:8051: RandValues->bonus = proc->Option[15]; +@ Patches/../C_code.c:8056: RandValues->bonus = proc->Option[15]; movs r1, #77 @ tmp930, -@ Patches/../C_code.c:8051: RandValues->bonus = proc->Option[15]; +@ Patches/../C_code.c:8056: RandValues->bonus = proc->Option[15]; ldrb r1, [r4, r1] @ tmp936, ands r2, r1 @ tmp937, tmp936 mov r1, ip @ RandValues, RandValues movs r6, #62 @ tmp944, - ldrb r1, [r1, #3] @ RandValues.327_127->bonus, RandValues.327_127->bonus + ldrb r1, [r1, #3] @ RandValues.328_127->bonus, RandValues.328_127->bonus lsls r2, r2, #1 @ tmp940, tmp937, bics r1, r6 @ tmp943, tmp944 orrs r1, r2 @ tmp947, tmp940 mov r2, ip @ RandValues, RandValues - strb r1, [r2, #3] @ tmp947, RandValues.327_127->bonus -@ Patches/../C_code.c:8052: GrowthValues->enemy = proc->Option[16]; + strb r1, [r2, #3] @ tmp947, RandValues.328_127->bonus +@ Patches/../C_code.c:8057: GrowthValues->enemy = proc->Option[16]; movs r2, #78 @ tmp949, -@ Patches/../C_code.c:8052: GrowthValues->enemy = proc->Option[16]; - ldrb r1, [r0] @ GrowthValues.326_124->enemy, GrowthValues.326_124->enemy +@ Patches/../C_code.c:8057: GrowthValues->enemy = proc->Option[16]; + ldrb r1, [r0] @ GrowthValues.327_124->enemy, GrowthValues.327_124->enemy ldrb r2, [r4, r2] @ tmp953, - ands r3, r1 @ tmp959, GrowthValues.326_124->enemy + ands r3, r1 @ tmp959, GrowthValues.327_124->enemy lsls r2, r2, #4 @ tmp954, tmp953, orrs r3, r2 @ tmp963, tmp954 - strb r3, [r0] @ tmp963, GrowthValues.326_124->enemy -@ Patches/../C_code.c:8053: RecruitValues->ai = proc->Option[18]; - ldr r3, [sp, #52] @ tmp1594, %sfp + strb r3, [r0] @ tmp963, GrowthValues.327_124->enemy +@ Patches/../C_code.c:8058: RecruitValues->ai = proc->Option[18]; + ldr r3, [sp, #52] @ tmp1595, %sfp ldr r1, [r3] @ RecruitValues, RecruitValues -@ Patches/../C_code.c:8053: RecruitValues->ai = proc->Option[18]; +@ Patches/../C_code.c:8058: RecruitValues->ai = proc->Option[18]; movs r3, #80 @ tmp967, -@ Patches/../C_code.c:8053: RecruitValues->ai = proc->Option[18]; - ldrb r0, [r1] @ RecruitValues.329_132->ai, RecruitValues.329_132->ai +@ Patches/../C_code.c:8058: RecruitValues->ai = proc->Option[18]; + ldrb r0, [r1] @ RecruitValues.330_132->ai, RecruitValues.330_132->ai ldrb r2, [r4, r3] @ tmp971, subs r3, r3, #17 @ tmp978, lsls r2, r2, #6 @ tmp972, tmp971, -@ Patches/../C_code.c:8056: UnsetFlag(StephanoStyleFlag); - ldr r6, .L3817+20 @ tmp983, -@ Patches/../C_code.c:8053: RecruitValues->ai = proc->Option[18]; - ands r3, r0 @ tmp977, RecruitValues.329_132->ai +@ Patches/../C_code.c:8061: UnsetFlag(StephanoStyleFlag); + ldr r6, .L3820+20 @ tmp983, +@ Patches/../C_code.c:8058: RecruitValues->ai = proc->Option[18]; + ands r3, r0 @ tmp977, RecruitValues.330_132->ai orrs r3, r2 @ tmp981, tmp972 - strb r3, [r1] @ tmp981, RecruitValues.329_132->ai -@ Patches/../C_code.c:8056: UnsetFlag(StephanoStyleFlag); + strb r3, [r1] @ tmp981, RecruitValues.330_132->ai +@ Patches/../C_code.c:8061: UnsetFlag(StephanoStyleFlag); ldr r0, [r6] @ StephanoStyleFlag, StephanoStyleFlag - bl .L208 @ -@ Patches/../C_code.c:8057: UnsetFlag(GammaStyleFlag); - ldr r3, .L3817+24 @ tmp986, + bl .L211 @ +@ Patches/../C_code.c:8062: UnsetFlag(GammaStyleFlag); + ldr r3, .L3820+24 @ tmp986, ldr r0, [r3] @ GammaStyleFlag, GammaStyleFlag mov r10, r3 @ tmp986, tmp986 - bl .L208 @ -@ Patches/../C_code.c:8058: UnsetFlag(PikminStyleFlag); - ldr r3, .L3817+28 @ tmp989, + bl .L211 @ +@ Patches/../C_code.c:8063: UnsetFlag(PikminStyleFlag); + ldr r3, .L3820+28 @ tmp989, ldr r0, [r3] @ PikminStyleFlag, PikminStyleFlag mov r9, r3 @ tmp989, tmp989 - bl .L208 @ -@ Patches/../C_code.c:8059: switch (proc->Option[21]) + bl .L211 @ +@ Patches/../C_code.c:8064: switch (proc->Option[21]) movs r3, #83 @ tmp992, ldrsb r3, [r4, r3] @ _137, -@ Patches/../C_code.c:8059: switch (proc->Option[21]) +@ Patches/../C_code.c:8064: switch (proc->Option[21]) cmp r3, #2 @ _137, - bne .LCB23335 @ - b .L3587 @long jump @ -.LCB23335: + bne .LCB23359 @ + b .L3590 @long jump @ +.LCB23359: cmp r3, #3 @ _137, - bne .LCB23337 @ - b .L3588 @long jump @ -.LCB23337: + bne .LCB23361 @ + b .L3591 @long jump @ +.LCB23361: cmp r3, #1 @ _137, - bne .L3589 @, -@ Patches/../C_code.c:8063: SetFlag(StephanoStyleFlag); + bne .L3592 @, +@ Patches/../C_code.c:8068: SetFlag(StephanoStyleFlag); ldr r0, [r6] @ StephanoStyleFlag, StephanoStyleFlag - ldr r3, .L3817+32 @ tmp995, + ldr r3, .L3820+32 @ tmp995, bl .L14 @ -.L3589: -@ Patches/../C_code.c:8080: SetFlag(DebuggerTurnedOff_Flag); - ldr r3, .L3817+36 @ tmp1002, +.L3592: +@ Patches/../C_code.c:8085: SetFlag(DebuggerTurnedOff_Flag); + ldr r3, .L3820+36 @ tmp1002, ldr r0, [r3] @ pretmp_712, DebuggerTurnedOff_Flag -@ Patches/../C_code.c:8078: if (proc->Option[22] == 0) +@ Patches/../C_code.c:8083: if (proc->Option[22] == 0) movs r3, #84 @ tmp1003, -@ Patches/../C_code.c:8078: if (proc->Option[22] == 0) +@ Patches/../C_code.c:8083: if (proc->Option[22] == 0) ldrsb r3, [r4, r3] @ tmp1004, cmp r3, #0 @ tmp1004, - beq .LCB23350 @ - b .L3590 @long jump @ -.LCB23350: -@ Patches/../C_code.c:8080: SetFlag(DebuggerTurnedOff_Flag); - ldr r3, .L3817+32 @ tmp1005, + beq .LCB23374 @ + b .L3593 @long jump @ +.LCB23374: +@ Patches/../C_code.c:8085: SetFlag(DebuggerTurnedOff_Flag); + ldr r3, .L3820+32 @ tmp1005, bl .L14 @ -.L3591: -@ Patches/../C_code.c:8087: if (DisplayRandomSkillsOption) +.L3594: +@ Patches/../C_code.c:8092: if (DisplayRandomSkillsOption) ldr r3, [sp, #60] @ tmp1598, %sfp ldr r3, [r3] @ DisplayRandomSkillsOption, DisplayRandomSkillsOption cmp r3, #0 @ DisplayRandomSkillsOption, - beq .L3592 @, -@ Patches/../C_code.c:8089: RandValues->skills = proc->Option[24]; + beq .L3595 @, +@ Patches/../C_code.c:8094: RandValues->skills = proc->Option[24]; mov r3, fp @ tmp1593, tmp1593 ldr r1, [r3] @ RandValues, RandValues -@ Patches/../C_code.c:8089: RandValues->skills = proc->Option[24]; +@ Patches/../C_code.c:8094: RandValues->skills = proc->Option[24]; movs r3, #86 @ tmp1011, -@ Patches/../C_code.c:8089: RandValues->skills = proc->Option[24]; - ldrb r0, [r1, #3] @ RandValues.339_146->skills, RandValues.339_146->skills +@ Patches/../C_code.c:8094: RandValues->skills = proc->Option[24]; + ldrb r0, [r1, #3] @ RandValues.340_146->skills, RandValues.340_146->skills ldrb r2, [r4, r3] @ tmp1015, subs r3, r3, #23 @ tmp1022, lsls r2, r2, #6 @ tmp1016, tmp1015, - ands r3, r0 @ tmp1021, RandValues.339_146->skills + ands r3, r0 @ tmp1021, RandValues.340_146->skills orrs r3, r2 @ tmp1025, tmp1016 -@ Patches/../C_code.c:8090: AlwaysSkill[0] = proc->skill; +@ Patches/../C_code.c:8095: AlwaysSkill[0] = proc->skill; movs r2, #56 @ tmp1028, -@ Patches/../C_code.c:8089: RandValues->skills = proc->Option[24]; - strb r3, [r1, #3] @ tmp1025, RandValues.339_146->skills -@ Patches/../C_code.c:8090: AlwaysSkill[0] = proc->skill; - ldr r3, .L3817+40 @ tmp1027, -@ Patches/../C_code.c:8090: AlwaysSkill[0] = proc->skill; +@ Patches/../C_code.c:8094: RandValues->skills = proc->Option[24]; + strb r3, [r1, #3] @ tmp1025, RandValues.340_146->skills +@ Patches/../C_code.c:8095: AlwaysSkill[0] = proc->skill; + ldr r3, .L3820+40 @ tmp1027, +@ Patches/../C_code.c:8095: AlwaysSkill[0] = proc->skill; ldrb r2, [r4, r2] @ _149, -@ Patches/../C_code.c:8090: AlwaysSkill[0] = proc->skill; - ldr r3, [r3] @ AlwaysSkill.340_148, AlwaysSkill -@ Patches/../C_code.c:8090: AlwaysSkill[0] = proc->skill; - strb r2, [r3] @ _149, *AlwaysSkill.340_148 -.L3592: -@ Patches/../C_code.c:8093: if (DisplayTimedHitsOption) - ldr r3, .L3817+44 @ tmp1030, -@ Patches/../C_code.c:8093: if (DisplayTimedHitsOption) +@ Patches/../C_code.c:8095: AlwaysSkill[0] = proc->skill; + ldr r3, [r3] @ AlwaysSkill.341_148, AlwaysSkill +@ Patches/../C_code.c:8095: AlwaysSkill[0] = proc->skill; + strb r2, [r3] @ _149, *AlwaysSkill.341_148 +.L3595: +@ Patches/../C_code.c:8098: if (DisplayTimedHitsOption) + ldr r3, .L3820+44 @ tmp1030, +@ Patches/../C_code.c:8098: if (DisplayTimedHitsOption) ldr r3, [r3] @ DisplayTimedHitsOption, DisplayTimedHitsOption cmp r3, #0 @ DisplayTimedHitsOption, - beq .L3594 @, -@ Patches/../C_code.c:8095: int timedHits = proc->Option[23]; + beq .L3597 @, +@ Patches/../C_code.c:8100: int timedHits = proc->Option[23]; movs r3, #85 @ tmp1032, -@ Patches/../C_code.c:8098: TimedHitsDifficultyRam->difficulty = 0; +@ Patches/../C_code.c:8103: TimedHitsDifficultyRam->difficulty = 0; movs r0, #127 @ tmp1037, -@ Patches/../C_code.c:8095: int timedHits = proc->Option[23]; +@ Patches/../C_code.c:8100: int timedHits = proc->Option[23]; ldrsb r1, [r4, r3] @ timedHits, -@ Patches/../C_code.c:8096: TimedHitsDifficultyRam->off = false; - ldr r3, .L3817+48 @ tmp1033, - ldr r3, [r3] @ TimedHitsDifficultyRam.342_152, TimedHitsDifficultyRam -@ Patches/../C_code.c:8098: TimedHitsDifficultyRam->difficulty = 0; - ldrb r2, [r3] @ MEM[(struct TimedHitsDifficultyStruct *)TimedHitsDifficultyRam.342_152], MEM[(struct TimedHitsDifficultyStruct *)TimedHitsDifficultyRam.342_152] +@ Patches/../C_code.c:8101: TimedHitsDifficultyRam->off = false; + ldr r3, .L3820+48 @ tmp1033, + ldr r3, [r3] @ TimedHitsDifficultyRam.343_152, TimedHitsDifficultyRam +@ Patches/../C_code.c:8103: TimedHitsDifficultyRam->difficulty = 0; + ldrb r2, [r3] @ MEM[(struct TimedHitsDifficultyStruct *)TimedHitsDifficultyRam.343_152], MEM[(struct TimedHitsDifficultyStruct *)TimedHitsDifficultyRam.343_152] bics r2, r0 @ tmp1036, tmp1037 - strb r2, [r3] @ tmp1036, MEM[(struct TimedHitsDifficultyStruct *)TimedHitsDifficultyRam.342_152] -@ Patches/../C_code.c:8099: if (timedHits == 0) + strb r2, [r3] @ tmp1036, MEM[(struct TimedHitsDifficultyStruct *)TimedHitsDifficultyRam.343_152] +@ Patches/../C_code.c:8104: if (timedHits == 0) cmp r1, #0 @ timedHits, - beq .LCB23389 @ - b .L3595 @long jump @ -.LCB23389: -@ Patches/../C_code.c:8101: TimedHitsDifficultyRam->off = true; + beq .LCB23413 @ + b .L3598 @long jump @ +.LCB23413: +@ Patches/../C_code.c:8106: TimedHitsDifficultyRam->off = true; movs r1, #64 @ tmp1047, - lsls r2, r2, #24 @ TimedHitsDifficultyRam.342_152->off,, - lsrs r2, r2, #24 @ TimedHitsDifficultyRam.342_152->off, TimedHitsDifficultyRam.342_152->off, + lsls r2, r2, #24 @ TimedHitsDifficultyRam.343_152->off,, + lsrs r2, r2, #24 @ TimedHitsDifficultyRam.343_152->off, TimedHitsDifficultyRam.343_152->off, orrs r2, r1 @ tmp1049, tmp1047 - strb r2, [r3] @ tmp1049,* TimedHitsDifficultyRam.342_152 -.L3594: -@ Patches/../C_code.c:8118: if (RandBitflags->fog != proc->Option[17]) + strb r2, [r3] @ tmp1049,* TimedHitsDifficultyRam.343_152 +.L3597: +@ Patches/../C_code.c:8123: if (RandBitflags->fog != proc->Option[17]) movs r7, #79 @ tmp1082, -@ Patches/../C_code.c:8118: if (RandBitflags->fog != proc->Option[17]) +@ Patches/../C_code.c:8123: if (RandBitflags->fog != proc->Option[17]) ldr r3, [sp, #12] @ tmp1597, %sfp - ldr r1, [r3] @ RandBitflags.349_153, RandBitflags - ldrb r3, [r1, #3] @ *RandBitflags.349_153, *RandBitflags.349_153 -@ Patches/../C_code.c:8118: if (RandBitflags->fog != proc->Option[17]) + ldr r1, [r3] @ RandBitflags.350_153, RandBitflags + ldrb r3, [r1, #3] @ *RandBitflags.350_153, *RandBitflags.350_153 +@ Patches/../C_code.c:8123: if (RandBitflags->fog != proc->Option[17]) ldrsb r0, [r4, r7] @ _156, -@ Patches/../C_code.c:8118: if (RandBitflags->fog != proc->Option[17]) - lsls r3, r3, #25 @ tmp1087, *RandBitflags.349_153, +@ Patches/../C_code.c:8123: if (RandBitflags->fog != proc->Option[17]) + lsls r3, r3, #25 @ tmp1087, *RandBitflags.350_153, lsrs r3, r3, #30 @ tmp1088, tmp1087, -@ Patches/../C_code.c:8118: if (RandBitflags->fog != proc->Option[17]) +@ Patches/../C_code.c:8123: if (RandBitflags->fog != proc->Option[17]) cmp r3, r0 @ tmp1088, _156 - beq .L3599 @, -@ Patches/../C_code.c:8120: if ((proc->Option[17] == 1) && proc->calledFromChapter) + beq .L3602 @, +@ Patches/../C_code.c:8125: if ((proc->Option[17] == 1) && proc->calledFromChapter) cmp r0, #1 @ _156, - bne .LCB23409 @ - b .L3802 @long jump @ -.LCB23409: -.L3600: -@ Patches/../C_code.c:8124: if ((proc->Option[17] == 2) && proc->calledFromChapter) + bne .LCB23433 @ + b .L3805 @long jump @ +.LCB23433: +.L3603: +@ Patches/../C_code.c:8129: if ((proc->Option[17] == 2) && proc->calledFromChapter) cmp r0, #2 @ _156, - bne .LCB23412 @ - b .L3803 @long jump @ -.LCB23412: -.L3602: -@ Patches/../C_code.c:8128: if ((proc->Option[17] == 0) && proc->calledFromChapter) + bne .LCB23436 @ + b .L3806 @long jump @ +.LCB23436: +.L3605: +@ Patches/../C_code.c:8133: if ((proc->Option[17] == 0) && proc->calledFromChapter) cmp r0, #0 @ _156, - bne .L3782 @, -@ Patches/../C_code.c:8128: if ((proc->Option[17] == 0) && proc->calledFromChapter) + bne .L3785 @, +@ Patches/../C_code.c:8133: if ((proc->Option[17] == 0) && proc->calledFromChapter) movs r3, #53 @ tmp1100, -@ Patches/../C_code.c:8128: if ((proc->Option[17] == 0) && proc->calledFromChapter) +@ Patches/../C_code.c:8133: if ((proc->Option[17] == 0) && proc->calledFromChapter) ldrb r3, [r4, r3] @ tmp1101, cmp r3, #0 @ tmp1101, - beq .LCB23419 @ - b .L3605 @long jump @ -.LCB23419: -.L3782: -@ Patches/../C_code.c:8133: RandBitflags->fog = proc->Option[17]; + beq .LCB23443 @ + b .L3608 @long jump @ +.LCB23443: +.L3785: +@ Patches/../C_code.c:8138: RandBitflags->fog = proc->Option[17]; ldr r3, [sp, #12] @ tmp1597, %sfp - ldr r1, [r3] @ RandBitflags.349_153, RandBitflags -.L3599: -@ Patches/../C_code.c:8133: RandBitflags->fog = proc->Option[17]; + ldr r1, [r3] @ RandBitflags.350_153, RandBitflags +.L3602: +@ Patches/../C_code.c:8138: RandBitflags->fog = proc->Option[17]; movs r2, #3 @ tmp1113, ands r2, r0 @ tmp1112, _156 movs r0, #96 @ tmp1119, @@ -28236,261 +28267,261 @@ ConfigMenuLoop: bics r3, r0 @ tmp1118, tmp1119 orrs r3, r2 @ tmp1122, tmp1115 strb r3, [r1, #3] @ tmp1122, prephitmp_711->fog -@ Patches/../C_code.c:8135: RecruitmentProc * recruitmentProc = Proc_Find(RecruitmentProcCmd1); - ldr r3, .L3817+52 @ tmp1582, +@ Patches/../C_code.c:8140: RecruitmentProc * recruitmentProc = Proc_Find(RecruitmentProcCmd1); + ldr r3, .L3820+52 @ tmp1582, movs r0, r3 @ tmp1125, tmp1582 - ldr r7, .L3817+56 @ tmp1583, + ldr r7, .L3820+56 @ tmp1583, adds r0, r0, #80 @ tmp1125, mov r8, r3 @ tmp1582, tmp1582 bl .L62 @ -@ Patches/../C_code.c:8138: Proc_Break(recruitmentProc); - ldr r3, .L3817+60 @ tmp1584, +@ Patches/../C_code.c:8143: Proc_Break(recruitmentProc); + ldr r3, .L3820+60 @ tmp1584, mov r9, r3 @ tmp1584, tmp1584 -@ Patches/../C_code.c:8136: if (recruitmentProc) +@ Patches/../C_code.c:8141: if (recruitmentProc) cmp r0, #0 @ recruitmentProc, - beq .L3606 @, -@ Patches/../C_code.c:8138: Proc_Break(recruitmentProc); + beq .L3609 @, +@ Patches/../C_code.c:8143: Proc_Break(recruitmentProc); bl .L14 @ -.L3606: -@ Patches/../C_code.c:8140: recruitmentProc = Proc_Find(RecruitmentProcCmd2); +.L3609: +@ Patches/../C_code.c:8145: recruitmentProc = Proc_Find(RecruitmentProcCmd2); mov r0, r8 @ tmp1582, tmp1582 adds r0, r0, #112 @ tmp1582, bl .L62 @ -@ Patches/../C_code.c:8141: if (recruitmentProc) +@ Patches/../C_code.c:8146: if (recruitmentProc) cmp r0, #0 @ recruitmentProc, - beq .L3607 @, -@ Patches/../C_code.c:8143: Proc_Break(recruitmentProc); - bl .L397 @ -.L3607: -@ Patches/../C_code.c:8145: recruitmentProc = Proc_Find(RecruitmentProcCmd3); - ldr r3, .L3817+64 @ tmp1585, + beq .L3610 @, +@ Patches/../C_code.c:8148: Proc_Break(recruitmentProc); + bl .L400 @ +.L3610: +@ Patches/../C_code.c:8150: recruitmentProc = Proc_Find(RecruitmentProcCmd3); + ldr r3, .L3820+64 @ tmp1585, movs r0, r3 @ tmp1133, tmp1585 adds r0, r0, #16 @ tmp1133, mov r8, r3 @ tmp1585, tmp1585 bl .L62 @ -@ Patches/../C_code.c:8146: if (recruitmentProc) +@ Patches/../C_code.c:8151: if (recruitmentProc) cmp r0, #0 @ recruitmentProc, - beq .L3608 @, -@ Patches/../C_code.c:8148: Proc_Break(recruitmentProc); - bl .L397 @ -.L3608: -@ Patches/../C_code.c:8150: recruitmentProc = Proc_Find(RecruitmentProcCmd4); + beq .L3611 @, +@ Patches/../C_code.c:8153: Proc_Break(recruitmentProc); + bl .L400 @ +.L3611: +@ Patches/../C_code.c:8155: recruitmentProc = Proc_Find(RecruitmentProcCmd4); mov r0, r8 @ tmp1585, tmp1585 adds r0, r0, #48 @ tmp1585, bl .L62 @ -@ Patches/../C_code.c:8151: if (recruitmentProc) +@ Patches/../C_code.c:8156: if (recruitmentProc) cmp r0, #0 @ recruitmentProc, - beq .L3609 @, -@ Patches/../C_code.c:8153: Proc_Break(recruitmentProc); - bl .L397 @ -.L3609: -@ Patches/../C_code.c:8157: if (proc->Option[19] && ((id + offset) == 20)) + beq .L3612 @, +@ Patches/../C_code.c:8158: Proc_Break(recruitmentProc); + bl .L400 @ +.L3612: +@ Patches/../C_code.c:8162: if (proc->Option[19] && ((id + offset) == 20)) movs r3, #81 @ tmp1140, -@ Patches/../C_code.c:8157: if (proc->Option[19] && ((id + offset) == 20)) +@ Patches/../C_code.c:8162: if (proc->Option[19] && ((id + offset) == 20)) ldrsb r3, [r4, r3] @ tmp1141, cmp r3, #0 @ tmp1141, - beq .L3610 @, -@ Patches/../C_code.c:8157: if (proc->Option[19] && ((id + offset) == 20)) + beq .L3613 @, +@ Patches/../C_code.c:8162: if (proc->Option[19] && ((id + offset) == 20)) ldr r3, [sp, #4] @ offset, %sfp mov ip, r3 @ offset, offset add r5, r5, ip @ tmp1142, offset -@ Patches/../C_code.c:8157: if (proc->Option[19] && ((id + offset) == 20)) +@ Patches/../C_code.c:8162: if (proc->Option[19] && ((id + offset) == 20)) cmp r5, #20 @ tmp1142, - bne .LCB23480 @ - b .L3804 @long jump @ -.LCB23480: -.L3610: -@ Patches/../C_code.c:8175: RandBitflags->disp = 1; + bne .LCB23504 @ + b .L3807 @long jump @ +.LCB23504: +.L3613: +@ Patches/../C_code.c:8180: RandBitflags->disp = 1; ldr r3, [sp, #12] @ tmp1597, %sfp ldr r2, [r3] @ RandBitflags, RandBitflags movs r3, #128 @ tmp1153, - ldrb r1, [r2, #3] @ RandBitflags.351_169->disp, RandBitflags.351_169->disp + ldrb r1, [r2, #3] @ RandBitflags.352_169->disp, RandBitflags.352_169->disp rsbs r3, r3, #0 @ tmp1153, tmp1153 - orrs r3, r1 @ tmp1152, RandBitflags.351_169->disp -@ Patches/../C_code.c:8183: Proc_Break((ProcPtr)proc); + orrs r3, r1 @ tmp1152, RandBitflags.352_169->disp +@ Patches/../C_code.c:8188: Proc_Break((ProcPtr)proc); movs r0, r4 @, proc -@ Patches/../C_code.c:8175: RandBitflags->disp = 1; - strb r3, [r2, #3] @ tmp1152, RandBitflags.351_169->disp -@ Patches/../C_code.c:8183: Proc_Break((ProcPtr)proc); - bl .L397 @ -@ Patches/../C_code.c:8184: return; - b .L3544 @ -.L3789: - ldr r6, .L3817+68 @ tmp1589, -.L3673: -@ Patches/../C_code.c:7832: DisplayUiVArrow(MENU_X + (9 * 8), MENU_Y + (16 * 9), 0x3240, 0); +@ Patches/../C_code.c:8180: RandBitflags->disp = 1; + strb r3, [r2, #3] @ tmp1152, RandBitflags.352_169->disp +@ Patches/../C_code.c:8188: Proc_Break((ProcPtr)proc); + bl .L400 @ +@ Patches/../C_code.c:8189: return; + b .L3547 @ +.L3792: + ldr r6, .L3820+68 @ tmp1589, +.L3676: +@ Patches/../C_code.c:7837: DisplayUiVArrow(MENU_X + (9 * 8), MENU_Y + (16 * 9), 0x3240, 0); movs r2, #201 @, movs r3, #0 @, movs r1, #152 @, movs r0, #90 @, lsls r2, r2, #6 @,, - bl .L143 @ - bl .L3547 @ far jump @ -.L3590: -@ Patches/../C_code.c:8084: UnsetFlag(DebuggerTurnedOff_Flag); - bl .L208 @ - b .L3591 @ -.L3576: -@ Patches/../C_code.c:7988: if (proc->Option[20] == 1) + bl .L146 @ + bl .L3550 @ far jump @ +.L3593: +@ Patches/../C_code.c:8089: UnsetFlag(DebuggerTurnedOff_Flag); + bl .L211 @ + b .L3594 @ +.L3579: +@ Patches/../C_code.c:7993: if (proc->Option[20] == 1) cmp r0, #1 @ _75, - beq .L3805 @, -@ Patches/../C_code.c:7993: if (proc->Option[20] == 2) + beq .L3808 @, +@ Patches/../C_code.c:7998: if (proc->Option[20] == 2) cmp r0, #2 @ _75, - beq .L3806 @, -@ Patches/../C_code.c:7998: if (proc->Option[20] == 3) + beq .L3809 @, +@ Patches/../C_code.c:8003: if (proc->Option[20] == 3) cmp r0, #3 @ _75, - beq .LCB23518 @ - b .L3807 @long jump @ -.LCB23518: -@ Patches/../C_code.c:8000: proc->reloadPlayers = false; + beq .LCB23542 @ + b .L3810 @long jump @ +.LCB23542: +@ Patches/../C_code.c:8005: proc->reloadPlayers = false; movs r3, #128 @ tmp663, lsls r3, r3, #1 @ tmp663, tmp663, strh r3, [r4, #54] @ tmp663, MEM [(unsigned char *)proc_345(D) + 54B] -.L3579: -@ Patches/../C_code.c:8006: *MaxClasses = 0; +.L3582: +@ Patches/../C_code.c:8011: *MaxClasses = 0; movs r2, #0 @ tmp666, -@ Patches/../C_code.c:8006: *MaxClasses = 0; - ldr r3, .L3817+72 @ tmp665, - ldr r3, [r3] @ MaxClasses.301_77, MaxClasses -@ Patches/../C_code.c:8006: *MaxClasses = 0; - strb r2, [r3] @ tmp666, *MaxClasses.301_77 -@ Patches/../C_code.c:8009: RandValues->seed = proc->seed; +@ Patches/../C_code.c:8011: *MaxClasses = 0; + ldr r3, .L3820+72 @ tmp665, + ldr r3, [r3] @ MaxClasses.302_77, MaxClasses +@ Patches/../C_code.c:8011: *MaxClasses = 0; + strb r2, [r3] @ tmp666, *MaxClasses.302_77 +@ Patches/../C_code.c:8014: RandValues->seed = proc->seed; ldr r3, [r4, #44] @ pretmp_675, proc_345(D)->seed str r3, [sp, #20] @ pretmp_675, %sfp -@ Patches/../C_code.c:8009: RandValues->seed = proc->seed; +@ Patches/../C_code.c:8014: RandValues->seed = proc->seed; mov r3, fp @ tmp1593, tmp1593 ldr r3, [r3] @ pretmp_677, RandValues mov ip, r3 @ pretmp_677, pretmp_677 -@ Patches/../C_code.c:8010: RandValues->variance = proc->Option[0]; +@ Patches/../C_code.c:8015: RandValues->variance = proc->Option[0]; movs r3, #62 @ tmp669, ldrsb r3, [r4, r3] @ pretmp_679, str r3, [sp, #28] @ pretmp_679, %sfp -@ Patches/../C_code.c:8011: RecruitValues->recruitment = proc->Option[1]; +@ Patches/../C_code.c:8016: RecruitValues->recruitment = proc->Option[1]; movs r3, #63 @ tmp670, ldrsb r3, [r4, r3] @ pretmp_681, str r3, [sp, #24] @ pretmp_681, %sfp -@ Patches/../C_code.c:8011: RecruitValues->recruitment = proc->Option[1]; - ldr r3, [sp, #52] @ tmp1594, %sfp +@ Patches/../C_code.c:8016: RecruitValues->recruitment = proc->Option[1]; + ldr r3, [sp, #52] @ tmp1595, %sfp ldr r2, [r3] @ pretmp_683, RecruitValues -@ Patches/../C_code.c:8012: GrowthValues->ForcedCharTable = proc->Option[2]; +@ Patches/../C_code.c:8017: GrowthValues->ForcedCharTable = proc->Option[2]; movs r3, #64 @ tmp672, ldrsb r3, [r4, r3] @ pretmp_685, str r3, [sp, #32] @ pretmp_685, %sfp -@ Patches/../C_code.c:8012: GrowthValues->ForcedCharTable = proc->Option[2]; +@ Patches/../C_code.c:8017: GrowthValues->ForcedCharTable = proc->Option[2]; ldr r3, [sp, #56] @ tmp1596, %sfp ldr r3, [r3] @ pretmp_687, GrowthValues str r3, [sp, #16] @ pretmp_687, %sfp -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; movs r3, #65 @ tmp674, -@ Patches/../C_code.c:8015: RandBitflags->growth = proc->Option[4]; +@ Patches/../C_code.c:8020: RandBitflags->growth = proc->Option[4]; movs r1, #66 @ tmp676, -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; ldrsb r3, [r4, r3] @ pretmp_689, str r3, [sp, #36] @ pretmp_689, %sfp -@ Patches/../C_code.c:8015: RandBitflags->growth = proc->Option[4]; +@ Patches/../C_code.c:8020: RandBitflags->growth = proc->Option[4]; ldrsb r1, [r4, r1] @ pretmp_693, str r1, [sp, #40] @ pretmp_693, %sfp -@ Patches/../C_code.c:8024: RandBitflags->levelups = proc->Option[5]; +@ Patches/../C_code.c:8029: RandBitflags->levelups = proc->Option[5]; movs r1, #67 @ tmp677, ldrsb r1, [r4, r1] @ pretmp_695, str r1, [sp, #44] @ pretmp_695, %sfp -@ Patches/../C_code.c:8025: RandBitflags->caps = proc->Option[6]; +@ Patches/../C_code.c:8030: RandBitflags->caps = proc->Option[6]; movs r1, #68 @ tmp678, ldrsb r1, [r4, r1] @ pretmp_697, str r1, [sp, #48] @ pretmp_697, %sfp -@ Patches/../C_code.c:8026: RandBitflags->class = proc->Option[7]; +@ Patches/../C_code.c:8031: RandBitflags->class = proc->Option[7]; movs r1, #69 @ tmp679, -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; ldr r3, [sp, #12] @ tmp1597, %sfp -@ Patches/../C_code.c:8026: RandBitflags->class = proc->Option[7]; +@ Patches/../C_code.c:8031: RandBitflags->class = proc->Option[7]; ldrsb r1, [r4, r1] @ pretmp_699, -@ Patches/../C_code.c:8014: RandBitflags->base = proc->Option[3]; +@ Patches/../C_code.c:8019: RandBitflags->base = proc->Option[3]; ldr r3, [r3] @ pretmp_691, RandBitflags - b .L3582 @ -.L3655: -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); - ldr r1, .L3817+76 @ tmp1586, + b .L3585 @ +.L3658: +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); + ldr r1, .L3820+76 @ tmp1586, lsls r6, r5, #3 @ tmp1581, id, adds r3, r1, r6 @ tmp1388, tmp1586, tmp1581 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r3, r3, #112 @, ldmia r3, {r0, r3} @,, -@ Patches/../C_code.c:8335: if (id < SRR_MAXDISP) +@ Patches/../C_code.c:8340: if (id < SRR_MAXDISP) cmp r5, #6 @ id, - bgt .LCB23573 @ - b .L3635 @long jump @ -.LCB23573: -@ Patches/../C_code.c:8339: else if ((id + offset) < SRR_TotalOptions) + bgt .LCB23597 @ + b .L3638 @long jump @ +.LCB23597: +@ Patches/../C_code.c:8344: else if ((id + offset) < SRR_TotalOptions) cmp ip, r7 @ _206, pretmp_727 - blt .LCB23575 @ - b .L3662 @long jump @ -.LCB23575: -@ Patches/../C_code.c:8341: proc->offset++; + blt .LCB23599 @ + b .L3665 @long jump @ +.LCB23599: +@ Patches/../C_code.c:8346: proc->offset++; movs r1, #49 @ tmp1407, ldr r2, [sp, #4] @ offset, %sfp adds r2, r2, #1 @ tmp1406, strb r2, [r4, r1] @ tmp1406, proc_345(D)->offset -@ Patches/../C_code.c:8342: proc->redraw = RedrawAll; +@ Patches/../C_code.c:8347: proc->redraw = RedrawAll; movs r2, #50 @ tmp1409, subs r1, r1, #47 @ tmp1410, strb r1, [r4, r2] @ tmp1410, proc_345(D)->redraw - b .L3661 @ -.L3797: -@ Patches/../C_code.c:8409: if (((id + offset) == 25) && (proc->Option[24] == 3)) + b .L3664 @ +.L3800: +@ Patches/../C_code.c:8414: if (((id + offset) == 25) && (proc->Option[24] == 3)) ldr r2, [sp, #4] @ offset, %sfp mov ip, r2 @ offset, offset add r5, r5, ip @ tmp1566, offset -@ Patches/../C_code.c:8409: if (((id + offset) == 25) && (proc->Option[24] == 3)) +@ Patches/../C_code.c:8414: if (((id + offset) == 25) && (proc->Option[24] == 3)) cmp r5, #25 @ tmp1566, - bne .LCB23591 @ - b .L3808 @long jump @ -.LCB23591: -.L3671: -@ Patches/../C_code.c:8413: proc->redraw = RedrawNone; + bne .LCB23615 @ + b .L3811 @long jump @ +.LCB23615: +.L3674: +@ Patches/../C_code.c:8418: proc->redraw = RedrawNone; movs r3, #0 @ tmp1573, movs r5, #50 @ tmp1572, -@ Patches/../C_code.c:8414: DrawConfigMenu(proc); +@ Patches/../C_code.c:8419: DrawConfigMenu(proc); movs r0, r4 @, proc -@ Patches/../C_code.c:8413: proc->redraw = RedrawNone; +@ Patches/../C_code.c:8418: proc->redraw = RedrawNone; strb r3, [r4, r5] @ tmp1573, proc_345(D)->redraw -@ Patches/../C_code.c:8414: DrawConfigMenu(proc); +@ Patches/../C_code.c:8419: DrawConfigMenu(proc); bl DrawConfigMenu @ -@ Patches/../C_code.c:8416: if (proc->redraw == RedrawAll) +@ Patches/../C_code.c:8421: if (proc->redraw == RedrawAll) ldrb r3, [r4, r5] @ _265, - b .L3670 @ -.L3676: + b .L3673 @ +.L3679: movs r3, #0 @ reloadEnemies, str r3, [sp, #8] @ reloadEnemies, %sfp -@ Patches/../C_code.c:7863: reloadPlayers = true; +@ Patches/../C_code.c:7868: reloadPlayers = true; adds r3, r3, #1 @ reloadPlayers, mov r9, r3 @ reloadPlayers, reloadPlayers - bl .L3552 @ far jump @ -.L3684: -@ Patches/../C_code.c:7903: reloadPlayers = true; + bl .L3555 @ far jump @ +.L3687: +@ Patches/../C_code.c:7908: reloadPlayers = true; movs r6, #1 @ reloadPlayers, mov r9, r6 @ reloadPlayers, reloadPlayers - bl .L3560 @ far jump @ -.L3801: -@ Patches/../C_code.c:8039: SetFlag(CasualModeFlag); - ldr r3, .L3817+32 @ tmp858, + bl .L3563 @ far jump @ +.L3804: +@ Patches/../C_code.c:8044: SetFlag(CasualModeFlag); + ldr r3, .L3820+32 @ tmp858, bl .L14 @ - ldr r3, .L3817+12 @ tmp1599, + ldr r3, .L3820+12 @ tmp1599, mov r8, r3 @ tmp1599, tmp1599 - b .L3586 @ -.L3806: -@ Patches/../C_code.c:7995: proc->reloadPlayers = true; + b .L3589 @ +.L3809: +@ Patches/../C_code.c:8000: proc->reloadPlayers = true; movs r3, #1 @ tmp660, strh r3, [r4, #54] @ tmp660, MEM [(unsigned char *)proc_345(D) + 54B] - b .L3579 @ -.L3805: -@ Patches/../C_code.c:7990: proc->reloadPlayers = true; + b .L3582 @ +.L3808: +@ Patches/../C_code.c:7995: proc->reloadPlayers = true; movs r3, #2 @ tmp658, adds r3, r3, #255 @ tmp658, strh r3, [r4, #54] @ tmp658, MEM [(unsigned char *)proc_345(D) + 54B] - b .L3579 @ -.L3818: + b .L3582 @ +.L3821: .align 2 -.L3817: +.L3820: .word -268437504 .word -1587201 .word CasualModeFlag @@ -28511,506 +28542,506 @@ ConfigMenuLoop: .word DisplayUiVArrow .word MaxClasses .word .LANCHOR13 -.L3595: -@ Patches/../C_code.c:8103: if (timedHits == 1) +.L3598: +@ Patches/../C_code.c:8108: if (timedHits == 1) cmp r1, #1 @ timedHits, - beq .L3809 @, -@ Patches/../C_code.c:8107: if (timedHits == 2) + beq .L3812 @, +@ Patches/../C_code.c:8112: if (timedHits == 2) cmp r1, #2 @ timedHits, - beq .L3810 @, -@ Patches/../C_code.c:8111: if (timedHits == 3) + beq .L3813 @, +@ Patches/../C_code.c:8116: if (timedHits == 3) cmp r1, #3 @ timedHits, - beq .LCB23668 @ - b .L3594 @long jump @ -.LCB23668: -@ Patches/../C_code.c:8113: TimedHitsDifficultyRam->difficulty = 3; - ldrb r2, [r3] @ TimedHitsDifficultyRam.342_152->difficulty, TimedHitsDifficultyRam.342_152->difficulty + beq .LCB23692 @ + b .L3597 @long jump @ +.LCB23692: +@ Patches/../C_code.c:8118: TimedHitsDifficultyRam->difficulty = 3; + ldrb r2, [r3] @ TimedHitsDifficultyRam.343_152->difficulty, TimedHitsDifficultyRam.343_152->difficulty adds r1, r1, #28 @ tmp1075, bics r2, r1 @ tmp1074, tmp1075 movs r1, #3 @ tmp1077, orrs r2, r1 @ tmp1079, tmp1077 - strb r2, [r3] @ tmp1079,* TimedHitsDifficultyRam.342_152 - b .L3594 @ -.L3810: -@ Patches/../C_code.c:8109: TimedHitsDifficultyRam->difficulty = 2; - ldrb r2, [r3] @ TimedHitsDifficultyRam.342_152->difficulty, TimedHitsDifficultyRam.342_152->difficulty + strb r2, [r3] @ tmp1079,* TimedHitsDifficultyRam.343_152 + b .L3597 @ +.L3813: +@ Patches/../C_code.c:8114: TimedHitsDifficultyRam->difficulty = 2; + ldrb r2, [r3] @ TimedHitsDifficultyRam.343_152->difficulty, TimedHitsDifficultyRam.343_152->difficulty adds r1, r1, #29 @ tmp1064, bics r2, r1 @ tmp1063, tmp1064 movs r1, #2 @ tmp1066, orrs r2, r1 @ tmp1068, tmp1066 - strb r2, [r3] @ tmp1068,* TimedHitsDifficultyRam.342_152 - b .L3594 @ -.L3587: -@ Patches/../C_code.c:8068: SetFlag(GammaStyleFlag); + strb r2, [r3] @ tmp1068,* TimedHitsDifficultyRam.343_152 + b .L3597 @ +.L3590: +@ Patches/../C_code.c:8073: SetFlag(GammaStyleFlag); mov r3, r10 @ tmp986, tmp986 ldr r0, [r3] @ GammaStyleFlag, - ldr r3, .L3819 @ tmp998, + ldr r3, .L3822 @ tmp998, bl .L14 @ -@ Patches/../C_code.c:8069: break; - b .L3589 @ -.L3588: -@ Patches/../C_code.c:8073: SetFlag(PikminStyleFlag); +@ Patches/../C_code.c:8074: break; + b .L3592 @ +.L3591: +@ Patches/../C_code.c:8078: SetFlag(PikminStyleFlag); mov r3, r9 @ tmp989, tmp989 ldr r0, [r3] @ PikminStyleFlag, - ldr r3, .L3819 @ tmp1001, + ldr r3, .L3822 @ tmp1001, bl .L14 @ -@ Patches/../C_code.c:8074: break; - b .L3589 @ -.L3634: -@ Patches/../C_code.c:8352: else if (keys & DPAD_UP) +@ Patches/../C_code.c:8079: break; + b .L3592 @ +.L3637: +@ Patches/../C_code.c:8357: else if (keys & DPAD_UP) lsls r3, r6, #25 @ tmp1663, keys, - bmi .LCB23710 @ - b .L3658 @long jump @ -.LCB23710: - b .L3624 @ -.L3685: -@ Patches/../C_code.c:7907: reloadEnemies = true; + bmi .LCB23734 @ + b .L3661 @long jump @ +.LCB23734: + b .L3627 @ +.L3688: +@ Patches/../C_code.c:7912: reloadEnemies = true; movs r6, #1 @ reloadEnemies, str r6, [sp, #8] @ reloadEnemies, %sfp - bl .L3560 @ far jump @ -.L3803: -@ Patches/../C_code.c:8124: if ((proc->Option[17] == 2) && proc->calledFromChapter) + bl .L3563 @ far jump @ +.L3806: +@ Patches/../C_code.c:8129: if ((proc->Option[17] == 2) && proc->calledFromChapter) movs r3, #53 @ tmp1094, -@ Patches/../C_code.c:8124: if ((proc->Option[17] == 2) && proc->calledFromChapter) +@ Patches/../C_code.c:8129: if ((proc->Option[17] == 2) && proc->calledFromChapter) ldrb r3, [r4, r3] @ tmp1095, cmp r3, #0 @ tmp1095, - bne .LCB23724 @ - b .L3782 @long jump @ -.LCB23724: -@ Patches/../C_code.c:8126: UpdateMapViewWithFog(3); + bne .LCB23748 @ + b .L3785 @long jump @ +.LCB23748: +@ Patches/../C_code.c:8131: UpdateMapViewWithFog(3); movs r0, #3 @, - ldr r3, .L3819+4 @ tmp1097, + ldr r3, .L3822+4 @ tmp1097, bl .L14 @ -@ Patches/../C_code.c:8128: if ((proc->Option[17] == 0) && proc->calledFromChapter) +@ Patches/../C_code.c:8133: if ((proc->Option[17] == 0) && proc->calledFromChapter) movs r3, #79 @ tmp1098, ldrsb r0, [r4, r3] @ _156, - b .L3602 @ -.L3802: -@ Patches/../C_code.c:8120: if ((proc->Option[17] == 1) && proc->calledFromChapter) + b .L3605 @ +.L3805: +@ Patches/../C_code.c:8125: if ((proc->Option[17] == 1) && proc->calledFromChapter) movs r3, #53 @ tmp1090, -@ Patches/../C_code.c:8120: if ((proc->Option[17] == 1) && proc->calledFromChapter) +@ Patches/../C_code.c:8125: if ((proc->Option[17] == 1) && proc->calledFromChapter) ldrb r3, [r4, r3] @ tmp1091, cmp r3, #0 @ tmp1091, - bne .LCB23737 @ - b .L3782 @long jump @ -.LCB23737: -@ Patches/../C_code.c:8122: UpdateMapViewWithFog(0); + bne .LCB23761 @ + b .L3785 @long jump @ +.LCB23761: +@ Patches/../C_code.c:8127: UpdateMapViewWithFog(0); movs r0, #0 @, - ldr r3, .L3819+4 @ tmp1092, + ldr r3, .L3822+4 @ tmp1092, bl .L14 @ -@ Patches/../C_code.c:8124: if ((proc->Option[17] == 2) && proc->calledFromChapter) +@ Patches/../C_code.c:8129: if ((proc->Option[17] == 2) && proc->calledFromChapter) ldrsb r0, [r4, r7] @ _156, - b .L3600 @ -.L3804: -@ Patches/../C_code.c:8163: if (proc->calledFromChapter) + b .L3603 @ +.L3807: +@ Patches/../C_code.c:8168: if (proc->calledFromChapter) movs r3, #53 @ tmp1143, -@ Patches/../C_code.c:8163: if (proc->calledFromChapter) +@ Patches/../C_code.c:8168: if (proc->calledFromChapter) ldrb r3, [r4, r3] @ tmp1144, cmp r3, #0 @ tmp1144, - bne .LCB23749 @ - b .L3610 @long jump @ -.LCB23749: -@ Patches/../C_code.c:8170: CallEndEvent(); - ldr r3, .L3819+8 @ tmp1145, + bne .LCB23773 @ + b .L3613 @long jump @ +.LCB23773: +@ Patches/../C_code.c:8175: CallEndEvent(); + ldr r3, .L3822+8 @ tmp1145, bl .L14 @ - b .L3610 @ -.L3809: -@ Patches/../C_code.c:8105: TimedHitsDifficultyRam->alwaysA = true; + b .L3613 @ +.L3812: +@ Patches/../C_code.c:8110: TimedHitsDifficultyRam->alwaysA = true; movs r1, #32 @ tmp1055, - ldrb r2, [r3] @ TimedHitsDifficultyRam.342_152->alwaysA, TimedHitsDifficultyRam.342_152->alwaysA + ldrb r2, [r3] @ TimedHitsDifficultyRam.343_152->alwaysA, TimedHitsDifficultyRam.343_152->alwaysA orrs r2, r1 @ tmp1057, tmp1055 - strb r2, [r3] @ tmp1057,* TimedHitsDifficultyRam.342_152 - b .L3594 @ -.L3617: -@ Patches/../C_code.c:8223: if (keys & DPAD_LEFT) + strb r2, [r3] @ tmp1057,* TimedHitsDifficultyRam.343_152 + b .L3597 @ +.L3620: +@ Patches/../C_code.c:8228: if (keys & DPAD_LEFT) ldr r2, [sp, #12] @ _718, %sfp cmp r2, #0 @ _718, - bne .L3620 @, -@ Patches/../C_code.c:8220: proc->digit = max_digits; + bne .L3623 @, +@ Patches/../C_code.c:8225: proc->digit = max_digits; lsls r2, r3, #24 @ tmp1189, result, mov r3, ip @ tmp1175, tmp1175 asrs r2, r2, #24 @ prephitmp_624, tmp1189, str r2, [sp, #8] @ prephitmp_624, %sfp strb r2, [r4, r3] @ prephitmp_624, proc_345(D)->digit - b .L3621 @ -.L3662: -@ Patches/../C_code.c:8346: proc->id = 0; + b .L3624 @ +.L3665: +@ Patches/../C_code.c:8351: proc->id = 0; movs r2, #0 @ tmp1412, -@ Patches/../C_code.c:8348: proc->redraw = RedrawAll; +@ Patches/../C_code.c:8353: proc->redraw = RedrawAll; movs r1, #2 @ tmp1415, -@ Patches/../C_code.c:8346: proc->id = 0; +@ Patches/../C_code.c:8351: proc->id = 0; strh r2, [r4, #48] @ tmp1412, MEM [(void *)proc_345(D) + 48B] -@ Patches/../C_code.c:8348: proc->redraw = RedrawAll; +@ Patches/../C_code.c:8353: proc->redraw = RedrawAll; adds r2, r2, #50 @ tmp1414, strb r1, [r4, r2] @ tmp1415, proc_345(D)->redraw - b .L3661 @ -.L3620: -@ Patches/../C_code.c:8231: proc->digit = 0; + b .L3664 @ +.L3623: +@ Patches/../C_code.c:8236: proc->digit = 0; movs r3, #0 @ tmp1200, mov r2, ip @ tmp1175, tmp1175 strb r3, [r4, r2] @ tmp1200, proc_345(D)->digit -@ Patches/../C_code.c:8333: if (keys & DPAD_DOWN) +@ Patches/../C_code.c:8338: if (keys & DPAD_DOWN) lsls r3, r6, #24 @ tmp1652, keys, - bpl .LCB23793 @ - b .L3623 @long jump @ -.LCB23793: -@ Patches/../C_code.c:8352: else if (keys & DPAD_UP) + bpl .LCB23817 @ + b .L3626 @long jump @ +.LCB23817: +@ Patches/../C_code.c:8357: else if (keys & DPAD_UP) lsls r6, r6, #25 @ tmp1653, keys, - bpl .LCB23799 @ - b .L3624 @long jump @ -.LCB23799: -.L3625: -@ Patches/../C_code.c:8375: id += offset; + bpl .LCB23823 @ + b .L3627 @long jump @ +.LCB23823: +.L3628: +@ Patches/../C_code.c:8380: id += offset; ldr r3, [sp, #4] @ offset, %sfp mov ip, r3 @ offset, offset -@ Patches/../C_code.c:8374: id--; +@ Patches/../C_code.c:8379: id--; subs r5, r5, #1 @ id, -@ Patches/../C_code.c:8375: id += offset; +@ Patches/../C_code.c:8380: id += offset; add r5, r5, ip @ id, offset -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) adds r3, r4, r5 @ tmp1580, proc, id movs r2, r3 @ tmp1489, tmp1580 -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) movs r6, #48 @ tmp1491, - ldr r0, .L3819+12 @ tmp1490, -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) + ldr r0, .L3822+12 @ tmp1490, +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) adds r2, r2, #62 @ tmp1489, -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) adds r0, r0, r5 @ tmp1492, tmp1490, id ldrb r0, [r0, r6] @ tmp1493, OptionAmounts -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) ldrb r2, [r2] @ _244, *proc_345(D) -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) subs r0, r0, #1 @ tmp1494, -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) lsls r2, r2, #24 @ _244, _244, -@ Patches/../C_code.c:8382: proc->Option[id] = 0; +@ Patches/../C_code.c:8387: proc->Option[id] = 0; movs r6, #0 @ _252, -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) asrs r2, r2, #24 @ _244, _244, -@ Patches/../C_code.c:8376: if (proc->Option[id] < (OptionAmounts[id] - 1)) +@ Patches/../C_code.c:8381: if (proc->Option[id] < (OptionAmounts[id] - 1)) cmp r2, r0 @ _244, tmp1494 - bge .L3666 @, -@ Patches/../C_code.c:8378: proc->Option[id]++; + bge .L3669 @, +@ Patches/../C_code.c:8383: proc->Option[id]++; adds r2, r2, #1 @ tmp1496, lsls r2, r2, #24 @ tmp1497, tmp1496, asrs r6, r2, #24 @ _252, tmp1497, -.L3666: +.L3669: adds r3, r3, #62 @ tmp1500, strb r6, [r3] @ _252, proc_345(D)->Option[id_401] -@ Patches/../C_code.c:8384: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8389: proc->redraw = RedrawSome; movs r2, #50 @ tmp1502, movs r3, #1 @ tmp1503, strb r3, [r4, r2] @ tmp1503, proc_345(D)->redraw -@ Patches/../C_code.c:8385: proc->clear = true; +@ Patches/../C_code.c:8390: proc->clear = true; adds r2, r2, #8 @ tmp1505, strb r3, [r4, r2] @ tmp1503, proc_345(D)->clear -@ Patches/../C_code.c:8387: id -= offset; +@ Patches/../C_code.c:8392: id -= offset; ldr r3, [sp, #4] @ offset, %sfp -@ Patches/../C_code.c:8386: id++; +@ Patches/../C_code.c:8391: id++; adds r5, r5, #1 @ id, -@ Patches/../C_code.c:8387: id -= offset; +@ Patches/../C_code.c:8392: id -= offset; subs r5, r5, r3 @ id, id, offset -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); lsls r3, r5, #3 @ tmp1509, id, adds r3, r1, r3 @ tmp1510, tmp1586, tmp1509 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r3, r3, #112 @, ldmia r3, {r0, r3} @,, - b .L3661 @ -.L3799: -@ Patches/../C_code.c:7972: proc->Option[20] = 3; + b .L3664 @ +.L3802: +@ Patches/../C_code.c:7977: proc->Option[20] = 3; movs r3, #82 @ tmp652, movs r2, #3 @ tmp653, strb r2, [r4, r3] @ tmp653, - bl .L3573 @ far jump @ -.L3795: -@ Patches/../C_code.c:8223: if (keys & DPAD_LEFT) + bl .L3576 @ far jump @ +.L3798: +@ Patches/../C_code.c:8228: if (keys & DPAD_LEFT) mov r3, r9 @ _178, _178 str r3, [sp, #8] @ _178, %sfp - b .L3619 @ -.L3622: -@ Patches/../C_code.c:8231: proc->digit = 0; + b .L3622 @ +.L3625: +@ Patches/../C_code.c:8236: proc->digit = 0; movs r3, #51 @ tmp1216, movs r2, #0 @ tmp1217, strb r2, [r4, r3] @ tmp1217, proc_345(D)->digit - b .L3626 @ -.L3664: -@ Patches/../C_code.c:8367: proc->id--; + b .L3629 @ +.L3667: +@ Patches/../C_code.c:8372: proc->id--; movs r2, #48 @ tmp1472, subs r3, r5, #1 @ tmp1471, id, strb r3, [r4, r2] @ tmp1471, proc_345(D)->id -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); - ldr r3, .L3819+16 @ tmp1474, +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); + ldr r3, .L3822+16 @ tmp1474, lsls r2, r5, #3 @ tmp1475, id, adds r3, r3, r2 @ tmp1476, tmp1474, tmp1475 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r3, r3, #112 @, ldmia r3, {r0, r3} @,, - b .L3661 @ -.L3798: -@ Patches/../C_code.c:8283: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) + b .L3664 @ +.L3801: +@ Patches/../C_code.c:8288: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) adds r3, r3, #54 @ tmp1276, -@ Patches/../C_code.c:8283: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) +@ Patches/../C_code.c:8288: if (((id + offset) == 25) && (proc->Option[24] == 3) && (proc->choosingSkill)) ldrb r1, [r4, r3] @ tmp1277, cmp r1, #0 @ tmp1277, - bne .LCB23877 @ - b .L3638 @long jump @ -.LCB23877: -@ Patches/../C_code.c:8286: if (keys & DPAD_UP) + bne .LCB23901 @ + b .L3641 @long jump @ +.LCB23901: +@ Patches/../C_code.c:8291: if (keys & DPAD_UP) lsls r2, r6, #25 @ tmp1657, keys, - bpl .L3639 @, -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - ldr r2, .L3819+20 @ tmp1287, -@ Patches/../C_code.c:8288: proc->skill = GetNextAlwaysSkill(proc->skill); + bpl .L3642 @, +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + ldr r2, .L3822+20 @ tmp1287, +@ Patches/../C_code.c:8293: proc->skill = GetNextAlwaysSkill(proc->skill); subs r3, r3, #1 @ tmp1285, -@ Patches/../C_code.c:8288: proc->skill = GetNextAlwaysSkill(proc->skill); +@ Patches/../C_code.c:8293: proc->skill = GetNextAlwaysSkill(proc->skill); ldrb r3, [r4, r3] @ tmp1286, -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - ldr r0, [r2] @ NumberOfSkills.6_587, NumberOfSkills -@ Patches/../C_code.c:271: id++; +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + ldr r0, [r2] @ NumberOfSkills.7_587, NumberOfSkills +@ Patches/../C_code.c:276: id++; adds r3, r3, #1 @ id, -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - cmp r3, r0 @ id, NumberOfSkills.6_587 - blt .LCB23890 @ - b .L3640 @long jump @ -.LCB23890: - ldr r1, .L3819+24 @ tmp1587, - b .L3642 @ -.L3811: -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + cmp r3, r0 @ id, NumberOfSkills.7_587 + blt .LCB23914 @ + b .L3643 @long jump @ +.LCB23914: + ldr r1, .L3822+24 @ tmp1587, + b .L3645 @ +.L3814: +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) adds r3, r3, #1 @ id, -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - cmp r3, r0 @ id, NumberOfSkills.6_587 - beq .L3646 @, -.L3642: -@ Patches/../C_code.c:274: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + cmp r3, r0 @ id, NumberOfSkills.7_587 + beq .L3649 @, +.L3645: +@ Patches/../C_code.c:279: if (AlwaysSkillTable[i]) ldrb r2, [r1, r3] @ MEM[(unsigned char *)&AlwaysSkillTable + _600 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _600 * 1] cmp r2, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _600 * 1], - beq .L3811 @, -@ Patches/../C_code.c:8288: proc->skill = GetNextAlwaysSkill(proc->skill); + beq .L3814 @, +@ Patches/../C_code.c:8293: proc->skill = GetNextAlwaysSkill(proc->skill); lsls r3, r3, #24 @ tmp1294, id, lsrs r3, r3, #24 @ _613, tmp1294, -.L3650: -@ Patches/../C_code.c:8294: proc->skill = GetPreviousAlwaysSkill(proc->skill); +.L3653: +@ Patches/../C_code.c:8299: proc->skill = GetPreviousAlwaysSkill(proc->skill); movs r2, #56 @ tmp1319, strb r3, [r4, r2] @ id, proc_345(D)->skill -@ Patches/../C_code.c:8295: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8300: proc->redraw = RedrawSome; movs r3, #1 @ tmp1322, subs r2, r2, #6 @ tmp1321, strb r3, [r4, r2] @ tmp1322, proc_345(D)->redraw -@ Patches/../C_code.c:8296: proc->clear = true; +@ Patches/../C_code.c:8301: proc->clear = true; adds r2, r2, #8 @ tmp1324, strb r3, [r4, r2] @ tmp1322, proc_345(D)->clear -.L3647: -@ Patches/../C_code.c:7634: DisplayVertUiHand(x, y); +.L3650: +@ Patches/../C_code.c:7639: DisplayVertUiHand(x, y); movs r1, #128 @, movs r0, #176 @, bl DisplayVertUiHand @ -.L3672: -@ Patches/../C_code.c:8319: if (!proc->freezeSeed) +.L3675: +@ Patches/../C_code.c:8324: if (!proc->freezeSeed) movs r5, #52 @ tmp1337, -@ Patches/../C_code.c:8319: if (!proc->freezeSeed) +@ Patches/../C_code.c:8324: if (!proc->freezeSeed) ldrb r3, [r4, r5] @ tmp1338, cmp r3, #0 @ tmp1338, - beq .L3653 @, -@ Patches/../C_code.c:8325: if (proc->redraw == RedrawSome) + beq .L3656 @, +@ Patches/../C_code.c:8330: if (proc->redraw == RedrawSome) movs r3, #50 @ tmp1339, -@ Patches/../C_code.c:8324: proc->freezeSeed = true; +@ Patches/../C_code.c:8329: proc->freezeSeed = true; movs r2, #1 @ tmp1341, -@ Patches/../C_code.c:8325: if (proc->redraw == RedrawSome) +@ Patches/../C_code.c:8330: if (proc->redraw == RedrawSome) ldrb r3, [r4, r3] @ pretmp_616, -@ Patches/../C_code.c:8324: proc->freezeSeed = true; +@ Patches/../C_code.c:8329: proc->freezeSeed = true; strb r2, [r4, r5] @ tmp1341, proc_345(D)->freezeSeed -@ Patches/../C_code.c:8325: if (proc->redraw == RedrawSome) +@ Patches/../C_code.c:8330: if (proc->redraw == RedrawSome) cmp r3, #1 @ pretmp_616, - beq .LCB23931 @ - bl .L3544 @far jump @ -.LCB23931: - bl .L3633 @ far jump @ -.L3645: -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) + beq .LCB23955 @ + bl .L3547 @far jump @ +.LCB23955: + bl .L3636 @ far jump @ +.L3648: +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) - cmp r2, r0 @ i, NumberOfSkills.6_587 - beq .L3650 @, -.L3646: -@ Patches/../C_code.c:281: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) + cmp r2, r0 @ i, NumberOfSkills.7_587 + beq .L3653 @, +.L3649: +@ Patches/../C_code.c:286: if (AlwaysSkillTable[i]) ldrb r3, [r1, r2] @ _613, MEM[(unsigned char *)&AlwaysSkillTable + _599 * 1] -@ Patches/../C_code.c:281: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:286: if (AlwaysSkillTable[i]) cmp r3, #0 @ _613, - beq .L3645 @, -@ Patches/../C_code.c:8288: proc->skill = GetNextAlwaysSkill(proc->skill); + beq .L3648 @, +@ Patches/../C_code.c:8293: proc->skill = GetNextAlwaysSkill(proc->skill); lsls r3, r2, #24 @ tmp1293, i, lsrs r3, r3, #24 @ _613, tmp1293, - b .L3650 @ -.L3808: -@ Patches/../C_code.c:8409: if (((id + offset) == 25) && (proc->Option[24] == 3)) + b .L3653 @ +.L3811: +@ Patches/../C_code.c:8414: if (((id + offset) == 25) && (proc->Option[24] == 3)) movs r2, #86 @ tmp1567, -@ Patches/../C_code.c:8409: if (((id + offset) == 25) && (proc->Option[24] == 3)) +@ Patches/../C_code.c:8414: if (((id + offset) == 25) && (proc->Option[24] == 3)) ldrsb r2, [r4, r2] @ tmp1568, cmp r2, #3 @ tmp1568, - beq .LCB23953 @ - b .L3671 @long jump @ -.LCB23953: -@ Patches/../C_code.c:8411: proc->choosingSkill = true; + beq .LCB23977 @ + b .L3674 @long jump @ +.LCB23977: +@ Patches/../C_code.c:8416: proc->choosingSkill = true; adds r2, r2, #54 @ tmp1569, strb r3, [r4, r2] @ _265, proc_345(D)->choosingSkill - b .L3671 @ -.L3605: -@ Patches/../C_code.c:8130: UpdateMapViewWithFog(-1); + b .L3674 @ +.L3608: +@ Patches/../C_code.c:8135: UpdateMapViewWithFog(-1); movs r0, #1 @, - ldr r3, .L3819+4 @ tmp1104, + ldr r3, .L3822+4 @ tmp1104, rsbs r0, r0, #0 @, bl .L14 @ -@ Patches/../C_code.c:8133: RandBitflags->fog = proc->Option[17]; +@ Patches/../C_code.c:8138: RandBitflags->fog = proc->Option[17]; movs r3, #79 @ tmp1105, ldrsb r0, [r4, r3] @ _156, - b .L3782 @ -.L3667: -@ Patches/../C_code.c:8392: id += offset; + b .L3785 @ +.L3670: +@ Patches/../C_code.c:8397: id += offset; ldr r3, [sp, #4] @ offset, %sfp mov ip, r3 @ offset, offset -@ Patches/../C_code.c:8391: id--; +@ Patches/../C_code.c:8396: id--; subs r5, r5, #1 @ id, -@ Patches/../C_code.c:8392: id += offset; +@ Patches/../C_code.c:8397: id += offset; add r5, r5, ip @ id, offset -@ Patches/../C_code.c:8393: if (proc->Option[id] > 0) +@ Patches/../C_code.c:8398: if (proc->Option[id] > 0) adds r2, r4, r5 @ tmp1579, proc, id movs r3, r2 @ tmp1533, tmp1579 adds r3, r3, #62 @ tmp1533, ldrb r3, [r3] @ _253, *proc_345(D) lsls r3, r3, #24 @ _253, _253, asrs r3, r3, #24 @ _253, _253, -@ Patches/../C_code.c:8393: if (proc->Option[id] > 0) +@ Patches/../C_code.c:8398: if (proc->Option[id] > 0) cmp r3, #0 @ _253, - bgt .L3783 @, -@ Patches/../C_code.c:8399: proc->Option[id] = OptionAmounts[id] - 1; + bgt .L3786 @, +@ Patches/../C_code.c:8404: proc->Option[id] = OptionAmounts[id] - 1; movs r0, #48 @ tmp1540, -@ Patches/../C_code.c:8399: proc->Option[id] = OptionAmounts[id] - 1; - ldr r3, .L3819+12 @ tmp1539, +@ Patches/../C_code.c:8404: proc->Option[id] = OptionAmounts[id] - 1; + ldr r3, .L3822+12 @ tmp1539, adds r3, r3, r5 @ tmp1541, tmp1539, id -@ Patches/../C_code.c:8399: proc->Option[id] = OptionAmounts[id] - 1; +@ Patches/../C_code.c:8404: proc->Option[id] = OptionAmounts[id] - 1; ldrb r3, [r3, r0] @ tmp1543, OptionAmounts -.L3783: +.L3786: subs r3, r3, #1 @ tmp1544, lsls r3, r3, #24 @ tmp1545, tmp1544, asrs r3, r3, #24 @ _257, tmp1545, adds r2, r2, #62 @ tmp1548, strb r3, [r2] @ _257, proc_345(D)->Option[id_393] -@ Patches/../C_code.c:8401: proc->redraw = RedrawSome; +@ Patches/../C_code.c:8406: proc->redraw = RedrawSome; movs r3, #1 @ tmp1551, movs r2, #50 @ tmp1550, strb r3, [r4, r2] @ tmp1551, proc_345(D)->redraw -@ Patches/../C_code.c:8402: proc->clear = true; +@ Patches/../C_code.c:8407: proc->clear = true; adds r2, r2, #8 @ tmp1553, strb r3, [r4, r2] @ tmp1551, proc_345(D)->clear -@ Patches/../C_code.c:8404: id -= offset; +@ Patches/../C_code.c:8409: id -= offset; ldr r3, [sp, #4] @ offset, %sfp -@ Patches/../C_code.c:8403: id++; +@ Patches/../C_code.c:8408: id++; adds r5, r5, #1 @ id, -@ Patches/../C_code.c:8404: id -= offset; +@ Patches/../C_code.c:8409: id -= offset; subs r5, r5, r3 @ id, id, offset -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); lsls r3, r5, #3 @ tmp1557, id, adds r1, r1, r3 @ tmp1558, tmp1586, tmp1557 -@ Patches/../C_code.c:8406: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); +@ Patches/../C_code.c:8411: DisplayHand(SRR_CursorLocationTable[id].x, SRR_CursorLocationTable[id].y, 0); adds r1, r1, #112 @, ldmia r1!, {r0, r3} @,, - b .L3661 @ -.L3692: - ldr r3, .L3819+28 @ _433, - bl .L3631 @ far jump @ -.L3639: -@ Patches/../C_code.c:8292: else if (keys & DPAD_DOWN) + b .L3664 @ +.L3695: + ldr r3, .L3822+28 @ _433, + bl .L3634 @ far jump @ +.L3642: +@ Patches/../C_code.c:8297: else if (keys & DPAD_DOWN) movs r2, #128 @ tmp1306, movs r1, r2 @ tmp1308, tmp1306 ands r1, r6 @ tmp1308, keys tst r2, r6 @ tmp1306, keys - beq .L3648 @, -@ Patches/../C_code.c:8294: proc->skill = GetPreviousAlwaysSkill(proc->skill); + beq .L3651 @, +@ Patches/../C_code.c:8299: proc->skill = GetPreviousAlwaysSkill(proc->skill); movs r3, #56 @ tmp1310, -@ Patches/../C_code.c:8294: proc->skill = GetPreviousAlwaysSkill(proc->skill); +@ Patches/../C_code.c:8299: proc->skill = GetPreviousAlwaysSkill(proc->skill); ldrb r3, [r4, r3] @ tmp1311, -@ Patches/../C_code.c:290: id--; +@ Patches/../C_code.c:295: id--; subs r3, r3, #1 @ id, -@ Patches/../C_code.c:291: for (int i = id; i > 0; --i) +@ Patches/../C_code.c:296: for (int i = id; i > 0; --i) cmp r3, #0 @ id, - ble .L3649 @, - ldr r1, .L3819+24 @ tmp1587, -.L3651: -@ Patches/../C_code.c:293: if (AlwaysSkillTable[i]) + ble .L3652 @, + ldr r1, .L3822+24 @ tmp1587, +.L3654: +@ Patches/../C_code.c:298: if (AlwaysSkillTable[i]) ldrb r2, [r1, r3] @ MEM[(unsigned char *)&AlwaysSkillTable + _606 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _606 * 1] cmp r2, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _606 * 1], - bne .L3650 @, -@ Patches/../C_code.c:291: for (int i = id; i > 0; --i) + bne .L3653 @, +@ Patches/../C_code.c:296: for (int i = id; i > 0; --i) subs r3, r3, #1 @ id, -@ Patches/../C_code.c:291: for (int i = id; i > 0; --i) +@ Patches/../C_code.c:296: for (int i = id; i > 0; --i) cmp r3, #0 @ id, - bne .L3651 @, -.L3649: -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) - ldr r3, .L3819+20 @ tmp1315, + bne .L3654 @, +.L3652: +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) + ldr r3, .L3822+20 @ tmp1315, ldr r3, [r3] @ id, NumberOfSkills -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) cmp r3, #0 @ id, - ble .L3694 @, - ldr r1, .L3819+24 @ tmp1587, - b .L3652 @ -.L3812: -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) + ble .L3697 @, + ldr r1, .L3822+24 @ tmp1587, + b .L3655 @ +.L3815: +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) subs r3, r3, #1 @ id, -@ Patches/../C_code.c:298: for (int i = NumberOfSkills; i > 0; --i) +@ Patches/../C_code.c:303: for (int i = NumberOfSkills; i > 0; --i) cmp r3, #0 @ id, - beq .L3650 @, -.L3652: -@ Patches/../C_code.c:300: if (AlwaysSkillTable[i]) + beq .L3653 @, +.L3655: +@ Patches/../C_code.c:305: if (AlwaysSkillTable[i]) ldrb r2, [r1, r3] @ MEM[(unsigned char *)&AlwaysSkillTable + _604 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _604 * 1] cmp r2, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _604 * 1], - beq .L3812 @, - b .L3650 @ -.L3653: -@ Patches/../C_code.c:8321: proc->seed = GetInitialSeed(0, proc); + beq .L3815 @, + b .L3653 @ +.L3656: +@ Patches/../C_code.c:8326: proc->seed = GetInitialSeed(0, proc); movs r1, r4 @, proc movs r0, #0 @, bl GetInitialSeed @ -@ Patches/../C_code.c:8324: proc->freezeSeed = true; +@ Patches/../C_code.c:8329: proc->freezeSeed = true; movs r3, #1 @ tmp1344, -@ Patches/../C_code.c:8321: proc->seed = GetInitialSeed(0, proc); +@ Patches/../C_code.c:8326: proc->seed = GetInitialSeed(0, proc); str r0, [r4, #44] @ tmp1633, proc_345(D)->seed -@ Patches/../C_code.c:8324: proc->freezeSeed = true; +@ Patches/../C_code.c:8329: proc->freezeSeed = true; strb r3, [r4, r5] @ tmp1344, proc_345(D)->freezeSeed - bl .L3633 @ far jump @ -.L3648: -@ Patches/../C_code.c:8306: else if (keys & DPAD_LEFT) + bl .L3636 @ far jump @ +.L3651: +@ Patches/../C_code.c:8311: else if (keys & DPAD_LEFT) movs r2, #48 @ tmp1330, tst r2, r6 @ tmp1330, keys - beq .L3647 @, -@ Patches/../C_code.c:8300: proc->choosingSkill = false; + beq .L3650 @, +@ Patches/../C_code.c:8305: proc->choosingSkill = false; strb r1, [r4, r3] @ tmp1308, proc_345(D)->choosingSkill - b .L3672 @ -.L3807: -@ Patches/../C_code.c:8004: if (proc->reloadPlayers || proc->reloadEnemies) + b .L3675 @ +.L3810: +@ Patches/../C_code.c:8009: if (proc->reloadPlayers || proc->reloadEnemies) ldrh r0, [r4, #54] @ MEM [(void *)proc_345(D)], MEM [(void *)proc_345(D)] cmp r0, #0 @ MEM [(void *)proc_345(D)], - beq .LCB24082 @ - b .L3579 @long jump @ -.LCB24082: - b .L3582 @ -.L3640: -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) - cmp r0, #0 @ NumberOfSkills.6_587, - ble .L3694 @, + beq .LCB24106 @ + b .L3582 @long jump @ +.LCB24106: + b .L3585 @ +.L3643: +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) + cmp r0, #0 @ NumberOfSkills.7_587, + ble .L3697 @, movs r2, #0 @ i, - ldr r1, .L3819+24 @ tmp1587, - b .L3646 @ -.L3694: -@ Patches/../C_code.c:305: return 0; + ldr r1, .L3822+24 @ tmp1587, + b .L3649 @ +.L3697: +@ Patches/../C_code.c:310: return 0; movs r3, #0 @ id, - b .L3650 @ -.L3820: + b .L3653 @ +.L3823: .align 2 -.L3819: +.L3822: .word SetFlag .word UpdateMapViewWithFog .word CallEndEvent @@ -29035,129 +29066,129 @@ InitDraw: mov r6, r8 @, mov lr, r10 @, mov r7, r9 @, -@ Patches/../C_code.c:8755: if (!proc->calledFromChapter) +@ Patches/../C_code.c:8760: if (!proc->calledFromChapter) movs r3, #53 @ tmp129, -@ Patches/../C_code.c:8754: { +@ Patches/../C_code.c:8759: { push {r6, r7, lr} @ -@ Patches/../C_code.c:8755: if (!proc->calledFromChapter) +@ Patches/../C_code.c:8760: if (!proc->calledFromChapter) ldrb r3, [r0, r3] @ tmp130, -@ Patches/../C_code.c:8754: { +@ Patches/../C_code.c:8759: { mov r8, r0 @ proc, tmp177 -@ Patches/../C_code.c:8755: if (!proc->calledFromChapter) +@ Patches/../C_code.c:8760: if (!proc->calledFromChapter) cmp r3, #0 @ tmp130, - beq .L3827 @, -.L3822: -@ Patches/../C_code.c:8762: RegisterBlankTile(0); // so bg fill works I guess + beq .L3830 @, +.L3825: +@ Patches/../C_code.c:8767: RegisterBlankTile(0); // so bg fill works I guess movs r0, #0 @, - ldr r3, .L3828 @ tmp132, + ldr r3, .L3831 @ tmp132, bl .L14 @ -@ Patches/../C_code.c:6515: SetupBackgrounds(0); +@ Patches/../C_code.c:6520: SetupBackgrounds(0); movs r0, #0 @, - ldr r3, .L3828+4 @ tmp133, + ldr r3, .L3831+4 @ tmp133, bl .L14 @ -@ Patches/../C_code.c:6521: gLCDControlBuffer.dispcnt.mode = 0; +@ Patches/../C_code.c:6526: gLCDControlBuffer.dispcnt.mode = 0; movs r2, #120 @ tmp141, - ldr r7, .L3828+8 @ tmp175, + ldr r7, .L3831+8 @ tmp176, ldrh r3, [r7] @ MEM[(struct DispCnt *)&gLCDControlBuffer], MEM[(struct DispCnt *)&gLCDControlBuffer] ands r2, r3 @ tmp140, MEM[(struct DispCnt *)&gLCDControlBuffer] movs r3, #128 @ tmp144, lsls r3, r3, #5 @ tmp144, tmp144, orrs r3, r2 @ tmp143, tmp140 -@ Patches/../C_code.c:8764: BG_Fill(gBG0TilemapBuffer, 0); +@ Patches/../C_code.c:8769: BG_Fill(gBG0TilemapBuffer, 0); movs r1, #0 @, -@ Patches/../C_code.c:6521: gLCDControlBuffer.dispcnt.mode = 0; +@ Patches/../C_code.c:6526: gLCDControlBuffer.dispcnt.mode = 0; strh r3, [r7] @ tmp143, MEM[(struct DispCnt *)&gLCDControlBuffer] -@ Patches/../C_code.c:8764: BG_Fill(gBG0TilemapBuffer, 0); - ldr r0, .L3828+12 @ tmp146, - ldr r3, .L3828+16 @ tmp147, +@ Patches/../C_code.c:8769: BG_Fill(gBG0TilemapBuffer, 0); + ldr r0, .L3831+12 @ tmp146, + ldr r3, .L3831+16 @ tmp147, bl .L14 @ -@ Patches/../C_code.c:8765: BG_EnableSyncByMask(BG0_SYNC_BIT); - ldr r3, .L3828+20 @ tmp176, +@ Patches/../C_code.c:8770: BG_EnableSyncByMask(BG0_SYNC_BIT); + ldr r3, .L3831+20 @ tmp174, movs r0, #1 @, - mov r9, r3 @ tmp176, tmp176 + mov r9, r3 @ tmp174, tmp174 bl .L14 @ -@ Patches/../C_code.c:8768: ResetTextFont(); - ldr r3, .L3828+24 @ tmp149, +@ Patches/../C_code.c:8773: ResetTextFont(); + ldr r3, .L3831+24 @ tmp149, bl .L14 @ -@ Patches/../C_code.c:8769: SetTextFontGlyphs(0); +@ Patches/../C_code.c:8774: SetTextFontGlyphs(0); movs r0, #0 @, - ldr r3, .L3828+28 @ tmp150, + ldr r3, .L3831+28 @ tmp150, bl .L14 @ -@ Patches/../C_code.c:8770: SetTextFont(0); +@ Patches/../C_code.c:8775: SetTextFont(0); movs r0, #0 @, - ldr r3, .L3828+32 @ tmp151, + ldr r3, .L3831+32 @ tmp151, bl .L14 @ -@ Patches/../C_code.c:8771: InitSystemTextFont(); - ldr r3, .L3828+36 @ tmp152, +@ Patches/../C_code.c:8776: InitSystemTextFont(); + ldr r3, .L3831+36 @ tmp152, bl .L14 @ -@ Patches/../C_code.c:8773: ResetText(); // need this - ldr r3, .L3828+40 @ tmp153, +@ Patches/../C_code.c:8778: ResetText(); // need this + ldr r3, .L3831+40 @ tmp153, bl .L14 @ movs r3, #24 @ _71, - ldr r4, .L3828+44 @ ivtmp.2062, + ldr r4, .L3831+44 @ ivtmp.2067, rsbs r3, r3, #0 @ _71, _71 mov r10, r3 @ _71, _71 - movs r6, r4 @ _72, ivtmp.2062 - ldr r5, .L3828+48 @ tmp174, - add r10, r10, r4 @ _71, ivtmp.2062 + movs r6, r4 @ _72, ivtmp.2067 + ldr r5, .L3831+48 @ tmp175, + add r10, r10, r4 @ _71, ivtmp.2067 adds r6, r6, #64 @ _72, -.L3823: -@ Patches/../C_code.c:8804: InitText(&th[i], MaxTW); - movs r0, r4 @, ivtmp.2062 +.L3826: +@ Patches/../C_code.c:8809: InitText(&th[i], MaxTW); + movs r0, r4 @, ivtmp.2067 movs r1, #11 @, -@ Patches/../C_code.c:8802: for (int i = 0; i < SRR_NUMBERDISP; ++i) - adds r4, r4, #8 @ ivtmp.2062, -@ Patches/../C_code.c:8804: InitText(&th[i], MaxTW); - bl .L608 @ -@ Patches/../C_code.c:8802: for (int i = 0; i < SRR_NUMBERDISP; ++i) - cmp r4, r6 @ ivtmp.2062, _72 - bne .L3823 @, +@ Patches/../C_code.c:8807: for (int i = 0; i < SRR_NUMBERDISP; ++i) + adds r4, r4, #8 @ ivtmp.2067, +@ Patches/../C_code.c:8809: InitText(&th[i], MaxTW); + bl .L611 @ +@ Patches/../C_code.c:8807: for (int i = 0; i < SRR_NUMBERDISP; ++i) + cmp r4, r6 @ ivtmp.2067, _72 + bne .L3826 @, mov r6, r10 @ _71, _71 - ldr r4, .L3828+52 @ ivtmp.2054, + ldr r4, .L3831+52 @ ivtmp.2059, adds r6, r6, #152 @ _71, -.L3824: -@ Patches/../C_code.c:8810: InitText(&th[i + hOff], MaxRTW); - movs r0, r4 @, ivtmp.2054 +.L3827: +@ Patches/../C_code.c:8815: InitText(&th[i + hOff], MaxRTW); + movs r0, r4 @, ivtmp.2059 movs r1, #16 @, -@ Patches/../C_code.c:8808: for (int i = 0; i < SRR_NUMBERDISP; ++i) - adds r4, r4, #8 @ ivtmp.2054, -@ Patches/../C_code.c:8810: InitText(&th[i + hOff], MaxRTW); - bl .L608 @ -@ Patches/../C_code.c:8808: for (int i = 0; i < SRR_NUMBERDISP; ++i) - cmp r4, r6 @ ivtmp.2054, _66 - bne .L3824 @, -@ Patches/../C_code.c:8854: } +@ Patches/../C_code.c:8813: for (int i = 0; i < SRR_NUMBERDISP; ++i) + adds r4, r4, #8 @ ivtmp.2059, +@ Patches/../C_code.c:8815: InitText(&th[i + hOff], MaxRTW); + bl .L611 @ +@ Patches/../C_code.c:8813: for (int i = 0; i < SRR_NUMBERDISP; ++i) + cmp r4, r6 @ ivtmp.2059, _66 + bne .L3827 @, +@ Patches/../C_code.c:8859: } @ sp needed @ -@ Patches/../C_code.c:8812: InitText(&th[SRR_NUMBERDISP * 2], 6); // "Randomizer" title +@ Patches/../C_code.c:8817: InitText(&th[SRR_NUMBERDISP * 2], 6); // "Randomizer" title movs r1, #6 @, - ldr r0, .L3828+56 @ tmp156, - bl .L608 @ -@ Patches/../C_code.c:8815: LoadObjUIGfx(); - ldr r3, .L3828+60 @ tmp158, + ldr r0, .L3831+56 @ tmp156, + bl .L611 @ +@ Patches/../C_code.c:8820: LoadObjUIGfx(); + ldr r3, .L3831+60 @ tmp158, bl .L14 @ -@ Patches/../C_code.c:8816: UnpackUiVArrowGfx(0x240, 3); +@ Patches/../C_code.c:8821: UnpackUiVArrowGfx(0x240, 3); movs r0, #144 @, movs r1, #3 @, - ldr r3, .L3828+64 @ tmp160, + ldr r3, .L3831+64 @ tmp160, lsls r0, r0, #2 @,, bl .L14 @ -@ Patches/../C_code.c:8818: RedrawAllText(proc); +@ Patches/../C_code.c:8823: RedrawAllText(proc); mov r0, r8 @, proc bl RedrawAllText @ -@ Patches/../C_code.c:8826: gLCDControlBuffer.dispcnt.mode = 0; +@ Patches/../C_code.c:8831: gLCDControlBuffer.dispcnt.mode = 0; movs r2, #120 @ tmp168, ldrh r3, [r7] @ MEM[(struct DispCnt *)&gLCDControlBuffer], MEM[(struct DispCnt *)&gLCDControlBuffer] ands r2, r3 @ tmp167, MEM[(struct DispCnt *)&gLCDControlBuffer] movs r3, #128 @ tmp171, lsls r3, r3, #5 @ tmp171, tmp171, orrs r3, r2 @ tmp170, tmp167 -@ Patches/../C_code.c:8853: BG_EnableSyncByMask(BG0_SYNC_BIT | BG1_SYNC_BIT); +@ Patches/../C_code.c:8858: BG_EnableSyncByMask(BG0_SYNC_BIT | BG1_SYNC_BIT); movs r0, #3 @, -@ Patches/../C_code.c:8826: gLCDControlBuffer.dispcnt.mode = 0; +@ Patches/../C_code.c:8831: gLCDControlBuffer.dispcnt.mode = 0; strh r3, [r7] @ tmp170, MEM[(struct DispCnt *)&gLCDControlBuffer] -@ Patches/../C_code.c:8853: BG_EnableSyncByMask(BG0_SYNC_BIT | BG1_SYNC_BIT); - bl .L397 @ -@ Patches/../C_code.c:8854: } +@ Patches/../C_code.c:8858: BG_EnableSyncByMask(BG0_SYNC_BIT | BG1_SYNC_BIT); + bl .L400 @ +@ Patches/../C_code.c:8859: } pop {r5, r6, r7} mov r10, r7 mov r9, r6 @@ -29165,18 +29196,18 @@ InitDraw: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3827: -@ Patches/../C_code.c:7800: StartBgmExt(titleTrack, 5, 0); // 809C8D8 80BE60C +.L3830: +@ Patches/../C_code.c:7805: StartBgmExt(titleTrack, 5, 0); // 809C8D8 80BE60C movs r2, #0 @, movs r1, #5 @, movs r0, #67 @, - ldr r3, .L3828+68 @ tmp131, + ldr r3, .L3831+68 @ tmp131, bl .L14 @ -@ Patches/../C_code.c:7802: } - b .L3822 @ -.L3829: +@ Patches/../C_code.c:7807: } + b .L3825 @ +.L3832: .align 2 -.L3828: +.L3831: .word RegisterBlankTile .word SetupBackgrounds .word gLCDControlBuffer @@ -29208,193 +29239,193 @@ StartConfigMenu: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 movs r1, r0 @ parent, tmp213 -@ Patches/../C_code.c:8859: RecruitValues->pauseNameReplace = true; +@ Patches/../C_code.c:8864: RecruitValues->pauseNameReplace = true; movs r0, #8 @ tmp140, - ldr r3, .L3852 @ tmp135, + ldr r3, .L3855 @ tmp135, ldr r2, [r3] @ RecruitValues, RecruitValues - ldrb r3, [r2] @ RecruitValues.359_1->pauseNameReplace, RecruitValues.359_1->pauseNameReplace + ldrb r3, [r2] @ RecruitValues.360_1->pauseNameReplace, RecruitValues.360_1->pauseNameReplace orrs r3, r0 @ tmp142, tmp140 -@ Patches/../C_code.c:8858: { +@ Patches/../C_code.c:8863: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:8863: proc = (ConfigMenuProc *)Proc_StartBlocking((ProcPtr)&ConfigMenuProcCmd, parent); - ldr r0, .L3852+4 @ tmp144, -@ Patches/../C_code.c:8859: RecruitValues->pauseNameReplace = true; - strb r3, [r2] @ tmp142, RecruitValues.359_1->pauseNameReplace -@ Patches/../C_code.c:8861: if (parent) +@ Patches/../C_code.c:8868: proc = (ConfigMenuProc *)Proc_StartBlocking((ProcPtr)&ConfigMenuProcCmd, parent); + ldr r0, .L3855+4 @ tmp144, +@ Patches/../C_code.c:8864: RecruitValues->pauseNameReplace = true; + strb r3, [r2] @ tmp142, RecruitValues.360_1->pauseNameReplace +@ Patches/../C_code.c:8866: if (parent) cmp r1, #0 @ parent, - beq .L3831 @, -@ Patches/../C_code.c:8863: proc = (ConfigMenuProc *)Proc_StartBlocking((ProcPtr)&ConfigMenuProcCmd, parent); - ldr r3, .L3852+8 @ tmp145, + beq .L3834 @, +@ Patches/../C_code.c:8868: proc = (ConfigMenuProc *)Proc_StartBlocking((ProcPtr)&ConfigMenuProcCmd, parent); + ldr r3, .L3855+8 @ tmp145, bl .L14 @ movs r4, r0 @ , tmp214 -.L3832: -@ Patches/../C_code.c:8869: if (proc) +.L3835: +@ Patches/../C_code.c:8874: if (proc) cmp r4, #0 @ , - beq .L3830 @, -@ Patches/../C_code.c:8871: for (int i = 0; i < SRR_TotalOptions; i++) - ldr r3, .L3852+12 @ tmp148, - ldr r2, [r3] @ SRR_TotalOptions.360_71, SRR_TotalOptions - cmp r2, #0 @ SRR_TotalOptions.360_71, - ble .L3837 @, -@ Patches/../C_code.c:8873: proc->Option[i] = 0; + beq .L3833 @, +@ Patches/../C_code.c:8876: for (int i = 0; i < SRR_TotalOptions; i++) + ldr r3, .L3855+12 @ tmp148, + ldr r2, [r3] @ SRR_TotalOptions.361_71, SRR_TotalOptions + cmp r2, #0 @ SRR_TotalOptions.361_71, + ble .L3840 @, +@ Patches/../C_code.c:8878: proc->Option[i] = 0; movs r0, r4 @ tmp153, movs r1, #0 @, - ldr r3, .L3852+16 @ tmp156, + ldr r3, .L3855+16 @ tmp156, adds r0, r0, #62 @ tmp153, bl .L14 @ -.L3837: -@ Patches/../C_code.c:8875: proc->reloadPlayers = false; +.L3840: +@ Patches/../C_code.c:8880: proc->reloadPlayers = false; movs r3, #0 @ tmp149, strh r3, [r4, #54] @ tmp149, MEM [(unsigned char *)proc_10 + 54B] -@ Patches/../C_code.c:8877: if (!DefaultConfigToVanilla) - ldr r3, .L3852+20 @ tmp151, -@ Patches/../C_code.c:8877: if (!DefaultConfigToVanilla) +@ Patches/../C_code.c:8882: if (!DefaultConfigToVanilla) + ldr r3, .L3855+20 @ tmp151, +@ Patches/../C_code.c:8882: if (!DefaultConfigToVanilla) ldr r3, [r3] @ DefaultConfigToVanilla, DefaultConfigToVanilla cmp r3, #0 @ DefaultConfigToVanilla, - beq .L3835 @, -.L3836: -@ Patches/../C_code.c:8892: proc->globalChecksum = 0; + beq .L3838 @, +.L3839: +@ Patches/../C_code.c:8897: proc->globalChecksum = 0; movs r2, #0 @ tmp166, movs r3, #0 @ tmp167, strh r2, [r4, #60] @ tmp166, proc_10->globalChecksum -@ Patches/../C_code.c:8894: proc->calledFromChapter = false; +@ Patches/../C_code.c:8899: proc->calledFromChapter = false; adds r2, r2, #53 @ tmp168, strb r3, [r4, r2] @ tmp167, proc_10->calledFromChapter -@ Patches/../C_code.c:8893: proc->id = 1; +@ Patches/../C_code.c:8898: proc->id = 1; subs r2, r2, #52 @ tmp171, strh r2, [r4, #48] @ tmp171, MEM [(void *)proc_10 + 48B] -@ Patches/../C_code.c:8896: proc->redraw = 0; +@ Patches/../C_code.c:8901: proc->redraw = 0; adds r2, r2, #49 @ tmp173, strb r3, [r4, r2] @ tmp167, proc_10->redraw -@ Patches/../C_code.c:8897: proc->clear = false; +@ Patches/../C_code.c:8902: proc->clear = false; adds r2, r2, #8 @ tmp176, strb r3, [r4, r2] @ tmp167, proc_10->clear -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - ldr r3, .L3852+24 @ tmp179, - ldr r1, [r3] @ NumberOfSkills.6_47, NumberOfSkills - cmp r1, #1 @ NumberOfSkills.6_47, - ble .L3838 @, -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + ldr r3, .L3855+24 @ tmp179, + ldr r1, [r3] @ NumberOfSkills.7_47, NumberOfSkills + cmp r1, #1 @ NumberOfSkills.7_47, + ble .L3841 @, +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) movs r3, #1 @ i, - ldr r0, .L3852+28 @ tmp212, - b .L3840 @ -.L3851: -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) + ldr r0, .L3855+28 @ tmp212, + b .L3843 @ +.L3854: +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) adds r3, r3, #1 @ i, -@ Patches/../C_code.c:272: for (int i = id; i < NumberOfSkills; ++i) - cmp r1, r3 @ NumberOfSkills.6_47, i - beq .L3844 @, -.L3840: -@ Patches/../C_code.c:274: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:277: for (int i = id; i < NumberOfSkills; ++i) + cmp r1, r3 @ NumberOfSkills.7_47, i + beq .L3847 @, +.L3843: +@ Patches/../C_code.c:279: if (AlwaysSkillTable[i]) ldrb r2, [r0, r3] @ MEM[(unsigned char *)&AlwaysSkillTable + _24 * 1], MEM[(unsigned char *)&AlwaysSkillTable + _24 * 1] cmp r2, #0 @ MEM[(unsigned char *)&AlwaysSkillTable + _24 * 1], - beq .L3851 @, -@ Patches/../C_code.c:8898: proc->skill = GetNextAlwaysSkill(0); + beq .L3854 @, +@ Patches/../C_code.c:8903: proc->skill = GetNextAlwaysSkill(0); lsls r3, r3, #24 @ tmp186, i, lsrs r3, r3, #24 @ _15, tmp186, -.L3842: +.L3845: movs r2, #56 @ tmp187, -@ Patches/../C_code.c:8899: proc->choosingSkill = 0; +@ Patches/../C_code.c:8904: proc->choosingSkill = 0; movs r5, #0 @ tmp190, -@ Patches/../C_code.c:8898: proc->skill = GetNextAlwaysSkill(0); +@ Patches/../C_code.c:8903: proc->skill = GetNextAlwaysSkill(0); strb r3, [r4, r2] @ _15, proc_10->skill -@ Patches/../C_code.c:8899: proc->choosingSkill = 0; +@ Patches/../C_code.c:8904: proc->choosingSkill = 0; movs r3, #57 @ tmp189, strb r5, [r4, r3] @ tmp190, proc_10->choosingSkill -@ Patches/../C_code.c:8901: if (RandValues->seed) - ldr r3, .L3852+32 @ tmp193, +@ Patches/../C_code.c:8906: if (RandValues->seed) + ldr r3, .L3855+32 @ tmp193, ldr r3, [r3] @ RandValues, RandValues - ldr r3, [r3] @ *RandValues.362_6, *RandValues.362_6 - lsls r3, r3, #12 @ tmp196, *RandValues.362_6, -@ Patches/../C_code.c:8901: if (RandValues->seed) + ldr r3, [r3] @ *RandValues.363_6, *RandValues.363_6 + lsls r3, r3, #12 @ tmp196, *RandValues.363_6, +@ Patches/../C_code.c:8906: if (RandValues->seed) subs r2, r3, #1 @ tmp199, tmp196 sbcs r3, r3, r2 @ tmp198, tmp196, tmp199 movs r2, #52 @ tmp200, -@ Patches/../C_code.c:8905: proc->seed = GetInitialSeed(2, proc); +@ Patches/../C_code.c:8910: proc->seed = GetInitialSeed(2, proc); movs r1, r4 @, strb r3, [r4, r2] @ tmp198, MEM [(void *)proc_10].freezeSeed movs r0, #2 @, bl GetInitialSeed @ -@ Patches/../C_code.c:8906: proc->digit = 0; +@ Patches/../C_code.c:8911: proc->digit = 0; movs r3, #51 @ tmp201, -@ Patches/../C_code.c:8905: proc->seed = GetInitialSeed(2, proc); +@ Patches/../C_code.c:8910: proc->seed = GetInitialSeed(2, proc); str r0, [r4, #44] @ tmp216, proc_10->seed -@ Patches/../C_code.c:8906: proc->digit = 0; +@ Patches/../C_code.c:8911: proc->digit = 0; strb r5, [r4, r3] @ tmp190, proc_10->digit -@ Patches/../C_code.c:8907: StartGreenText(proc); +@ Patches/../C_code.c:8912: StartGreenText(proc); movs r0, r4 @, - ldr r3, .L3852+36 @ tmp204, + ldr r3, .L3855+36 @ tmp204, bl .L14 @ -@ Patches/../C_code.c:8908: proc->Option[21] = 3; // ui default: pikmin style +@ Patches/../C_code.c:8913: proc->Option[21] = 3; // ui default: pikmin style movs r3, #83 @ tmp205, movs r2, #3 @ tmp206, strb r2, [r4, r3] @ tmp206, proc_10->Option[21] -@ Patches/../C_code.c:8910: proc->Option[22] = 1; // debugger +@ Patches/../C_code.c:8915: proc->Option[22] = 1; // debugger movs r2, #2 @ tmp209, adds r3, r3, #1 @ tmp208, adds r2, r2, #255 @ tmp209, strh r2, [r4, r3] @ tmp209, MEM [(signed char *)proc_10 + 84B] -.L3830: -@ Patches/../C_code.c:8922: } +.L3833: +@ Patches/../C_code.c:8927: } @ sp needed @ movs r0, r4 @, pop {r4, r5, r6} pop {r1} bx r1 -.L3843: -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) +.L3846: +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) - cmp r1, r2 @ NumberOfSkills.6_47, i - beq .L3842 @, -.L3844: -@ Patches/../C_code.c:281: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) + cmp r1, r2 @ NumberOfSkills.7_47, i + beq .L3845 @, +.L3847: +@ Patches/../C_code.c:286: if (AlwaysSkillTable[i]) ldrb r3, [r0, r2] @ _15, MEM[(unsigned char *)&AlwaysSkillTable + _25 * 1] -@ Patches/../C_code.c:281: if (AlwaysSkillTable[i]) +@ Patches/../C_code.c:286: if (AlwaysSkillTable[i]) cmp r3, #0 @ _15, - beq .L3843 @, -@ Patches/../C_code.c:8898: proc->skill = GetNextAlwaysSkill(0); + beq .L3846 @, +@ Patches/../C_code.c:8903: proc->skill = GetNextAlwaysSkill(0); lsls r2, r2, #24 @ tmp185, i, lsrs r3, r2, #24 @ _15, tmp185, - b .L3842 @ -.L3835: -@ Patches/../C_code.c:8879: proc->Option[0] = OptionAmounts[0] - 1; // start on 100% + b .L3845 @ +.L3838: +@ Patches/../C_code.c:8884: proc->Option[0] = OptionAmounts[0] - 1; // start on 100% movs r3, #138 @ tmp159, lsls r3, r3, #1 @ tmp159, tmp159, strh r3, [r4, #62] @ tmp159, MEM [(signed char *)proc_10 + 62B] -@ Patches/../C_code.c:8881: proc->Option[2] = 0; // Fe8 game - ldr r3, .L3852+40 @ tmp161, +@ Patches/../C_code.c:8886: proc->Option[2] = 0; // Fe8 game + ldr r3, .L3855+40 @ tmp161, str r3, [r4, #64] @ tmp161, MEM [(signed char *)proc_10 + 64B] -@ Patches/../C_code.c:8885: proc->Option[6] = 1; - ldr r3, .L3852+44 @ tmp162, -@ Patches/../C_code.c:8889: proc->Option[10] = 1; // Random BGM +@ Patches/../C_code.c:8890: proc->Option[6] = 1; + ldr r3, .L3855+44 @ tmp162, +@ Patches/../C_code.c:8894: proc->Option[10] = 1; // Random BGM movs r2, #1 @ tmp164, -@ Patches/../C_code.c:8885: proc->Option[6] = 1; +@ Patches/../C_code.c:8890: proc->Option[6] = 1; str r3, [r4, #68] @ tmp162, MEM [(signed char *)proc_10 + 68B] -@ Patches/../C_code.c:8889: proc->Option[10] = 1; // Random BGM +@ Patches/../C_code.c:8894: proc->Option[10] = 1; // Random BGM movs r3, #72 @ tmp163, strh r2, [r4, r3] @ tmp164, MEM [(signed char *)proc_10 + 72B] - b .L3836 @ -.L3831: -@ Patches/../C_code.c:8867: proc = (ConfigMenuProc *)Proc_Start((ProcPtr)&ConfigMenuProcCmd, PROC_TREE_3); + b .L3839 @ +.L3834: +@ Patches/../C_code.c:8872: proc = (ConfigMenuProc *)Proc_Start((ProcPtr)&ConfigMenuProcCmd, PROC_TREE_3); movs r1, #3 @, - ldr r3, .L3852+48 @ tmp147, + ldr r3, .L3855+48 @ tmp147, bl .L14 @ movs r4, r0 @ , tmp215 - b .L3832 @ -.L3838: -@ Patches/../C_code.c:279: for (int i = 0; i < NumberOfSkills; ++i) - cmp r1, #1 @ NumberOfSkills.6_47, - bne .L3845 @, + b .L3835 @ +.L3841: +@ Patches/../C_code.c:284: for (int i = 0; i < NumberOfSkills; ++i) + cmp r1, #1 @ NumberOfSkills.7_47, + bne .L3848 @, movs r2, #0 @ i, - ldr r0, .L3852+28 @ tmp212, - b .L3844 @ -.L3845: + ldr r0, .L3855+28 @ tmp212, + b .L3847 @ +.L3848: movs r3, #0 @ _15, - b .L3842 @ -.L3853: + b .L3845 @ +.L3856: .align 2 -.L3852: +.L3855: .word RecruitValues .word ConfigMenuProcCmd .word Proc_StartBlocking @@ -29421,335 +29452,335 @@ MenuStartConfigMenu: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:8940: gLCDControlBuffer.dispcnt.bg0_on = 0; +@ Patches/../C_code.c:8945: gLCDControlBuffer.dispcnt.bg0_on = 0; movs r2, #15 @ tmp210, -@ Patches/../C_code.c:8939: { +@ Patches/../C_code.c:8944: { mov lr, r10 @, mov r7, r9 @, mov r6, r8 @, -@ Patches/../C_code.c:8940: gLCDControlBuffer.dispcnt.bg0_on = 0; - ldr r5, .L3885 @ tmp463, +@ Patches/../C_code.c:8945: gLCDControlBuffer.dispcnt.bg0_on = 0; + ldr r5, .L3888 @ tmp463, ldrb r3, [r5, #1] @ MEM [(struct DispCnt *)&gLCDControlBuffer + 1B], MEM [(struct DispCnt *)&gLCDControlBuffer + 1B] -@ Patches/../C_code.c:8939: { +@ Patches/../C_code.c:8944: { push {r6, r7, lr} @ -@ Patches/../C_code.c:8940: gLCDControlBuffer.dispcnt.bg0_on = 0; +@ Patches/../C_code.c:8945: gLCDControlBuffer.dispcnt.bg0_on = 0; bics r3, r2 @ tmp209, tmp210 strb r3, [r5, #1] @ tmp209, MEM [(struct DispCnt *)&gLCDControlBuffer + 1B] -@ Patches/../C_code.c:8944: ConfigMenuProc * proc = StartConfigMenu(parent); +@ Patches/../C_code.c:8949: ConfigMenuProc * proc = StartConfigMenu(parent); bl StartConfigMenu @ -@ Patches/../C_code.c:8945: proc->calledFromChapter = true; +@ Patches/../C_code.c:8950: proc->calledFromChapter = true; movs r3, #53 @ tmp216, movs r2, #1 @ tmp217, -@ Patches/../C_code.c:8948: proc->Option[0] = RandValues->variance; - ldr r6, .L3885+4 @ tmp464, -@ Patches/../C_code.c:8945: proc->calledFromChapter = true; +@ Patches/../C_code.c:8953: proc->Option[0] = RandValues->variance; + ldr r6, .L3888+4 @ tmp464, +@ Patches/../C_code.c:8950: proc->calledFromChapter = true; strb r2, [r0, r3] @ tmp217, proc_99->calledFromChapter -@ Patches/../C_code.c:8948: proc->Option[0] = RandValues->variance; +@ Patches/../C_code.c:8953: proc->Option[0] = RandValues->variance; ldr r3, [r6] @ RandValues, RandValues - ldrh r3, [r3, #2] @ *RandValues.363_1, *RandValues.363_1 -@ Patches/../C_code.c:8949: proc->Option[1] = RecruitValues->recruitment; - ldr r7, .L3885+8 @ tmp465, -@ Patches/../C_code.c:8948: proc->Option[0] = RandValues->variance; - lsls r3, r3, #23 @ tmp225, *RandValues.363_1, + ldrh r3, [r3, #2] @ *RandValues.364_1, *RandValues.364_1 +@ Patches/../C_code.c:8954: proc->Option[1] = RecruitValues->recruitment; + ldr r7, .L3888+8 @ tmp465, +@ Patches/../C_code.c:8953: proc->Option[0] = RandValues->variance; + lsls r3, r3, #23 @ tmp225, *RandValues.364_1, lsrs r3, r3, #27 @ tmp224, tmp225, -@ Patches/../C_code.c:8948: proc->Option[0] = RandValues->variance; +@ Patches/../C_code.c:8953: proc->Option[0] = RandValues->variance; adds r2, r2, #61 @ tmp226, strb r3, [r0, r2] @ tmp224, proc_99->Option[0] -@ Patches/../C_code.c:8949: proc->Option[1] = RecruitValues->recruitment; - ldr r1, [r7] @ RecruitValues.364_4, RecruitValues - ldrb r3, [r1] @ *RecruitValues.364_4, *RecruitValues.364_4 - lsls r3, r3, #29 @ tmp232, *RecruitValues.364_4, +@ Patches/../C_code.c:8954: proc->Option[1] = RecruitValues->recruitment; + ldr r1, [r7] @ RecruitValues.365_4, RecruitValues + ldrb r3, [r1] @ *RecruitValues.365_4, *RecruitValues.365_4 + lsls r3, r3, #29 @ tmp232, *RecruitValues.365_4, lsrs r3, r3, #29 @ tmp231, tmp232, -@ Patches/../C_code.c:8949: proc->Option[1] = RecruitValues->recruitment; +@ Patches/../C_code.c:8954: proc->Option[1] = RecruitValues->recruitment; adds r2, r2, #1 @ tmp233, strb r3, [r0, r2] @ tmp231, proc_99->Option[1] -@ Patches/../C_code.c:8950: proc->Option[2] = GrowthValues->ForcedCharTable; - ldr r3, .L3885+12 @ tmp466, +@ Patches/../C_code.c:8955: proc->Option[2] = GrowthValues->ForcedCharTable; + ldr r3, .L3888+12 @ tmp466, mov r8, r3 @ tmp466, tmp466 ldr r3, [r3] @ GrowthValues, GrowthValues - ldrb r3, [r3, #1] @ *GrowthValues.365_7, *GrowthValues.365_7 - lsls r3, r3, #27 @ tmp240, *GrowthValues.365_7, + ldrb r3, [r3, #1] @ *GrowthValues.366_7, *GrowthValues.366_7 + lsls r3, r3, #27 @ tmp240, *GrowthValues.366_7, lsrs r3, r3, #27 @ tmp239, tmp240, -@ Patches/../C_code.c:8950: proc->Option[2] = GrowthValues->ForcedCharTable; +@ Patches/../C_code.c:8955: proc->Option[2] = GrowthValues->ForcedCharTable; adds r2, r2, #1 @ tmp241, strb r3, [r0, r2] @ tmp239, proc_99->Option[2] -@ Patches/../C_code.c:8944: ConfigMenuProc * proc = StartConfigMenu(parent); +@ Patches/../C_code.c:8949: ConfigMenuProc * proc = StartConfigMenu(parent); movs r4, r0 @ proc, tmp482 -@ Patches/../C_code.c:8952: proc->Option[3] = RandBitflags->base; +@ Patches/../C_code.c:8957: proc->Option[3] = RandBitflags->base; movs r0, #65 @ tmp248, -@ Patches/../C_code.c:8952: proc->Option[3] = RandBitflags->base; - ldr r3, .L3885+16 @ tmp467, - ldr r2, [r3] @ RandBitflags.366_10, RandBitflags +@ Patches/../C_code.c:8957: proc->Option[3] = RandBitflags->base; + ldr r3, .L3888+16 @ tmp467, + ldr r2, [r3] @ RandBitflags.367_10, RandBitflags mov r9, r3 @ tmp467, tmp467 - ldrb r3, [r2] @ *RandBitflags.366_10, *RandBitflags.366_10 - lsls r3, r3, #30 @ tmp247, *RandBitflags.366_10, + ldrb r3, [r2] @ *RandBitflags.367_10, *RandBitflags.367_10 + lsls r3, r3, #30 @ tmp247, *RandBitflags.367_10, lsrs r3, r3, #30 @ tmp246, tmp247, -@ Patches/../C_code.c:8952: proc->Option[3] = RandBitflags->base; +@ Patches/../C_code.c:8957: proc->Option[3] = RandBitflags->base; strb r3, [r4, r0] @ tmp246, proc_99->Option[3] -@ Patches/../C_code.c:8953: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); +@ Patches/../C_code.c:8958: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); movs r3, #4 @ tmp259, -@ Patches/../C_code.c:8953: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); - ldrb r0, [r2, #3] @ *RandBitflags.366_10, *RandBitflags.366_10 - lsls r0, r0, #27 @ tmp253, *RandBitflags.366_10, -@ Patches/../C_code.c:8953: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); +@ Patches/../C_code.c:8958: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); + ldrb r0, [r2, #3] @ *RandBitflags.367_10, *RandBitflags.367_10 + lsls r0, r0, #27 @ tmp253, *RandBitflags.367_10, +@ Patches/../C_code.c:8958: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); asrs r0, r0, #31 @ tmp254, tmp253, ands r3, r0 @ tmp258, tmp254 -@ Patches/../C_code.c:8953: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); - ldrb r0, [r2] @ *RandBitflags.366_10, *RandBitflags.366_10 - lsls r0, r0, #28 @ tmp264, *RandBitflags.366_10, +@ Patches/../C_code.c:8958: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); + ldrb r0, [r2] @ *RandBitflags.367_10, *RandBitflags.367_10 + lsls r0, r0, #28 @ tmp264, *RandBitflags.367_10, lsrs r0, r0, #30 @ tmp263, tmp264, -@ Patches/../C_code.c:8953: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); +@ Patches/../C_code.c:8958: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); adds r3, r3, r0 @ tmp266, tmp258, tmp263 -@ Patches/../C_code.c:8953: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); +@ Patches/../C_code.c:8958: proc->Option[4] = RandBitflags->growth + (RandBitflags->grow50 * 4); movs r0, #66 @ tmp267, strb r3, [r4, r0] @ tmp266, proc_99->Option[4] -@ Patches/../C_code.c:8954: proc->Option[5] = RandBitflags->levelups; - ldrb r3, [r2] @ *RandBitflags.366_10, *RandBitflags.366_10 - lsls r3, r3, #26 @ tmp273, *RandBitflags.366_10, +@ Patches/../C_code.c:8959: proc->Option[5] = RandBitflags->levelups; + ldrb r3, [r2] @ *RandBitflags.367_10, *RandBitflags.367_10 + lsls r3, r3, #26 @ tmp273, *RandBitflags.367_10, lsrs r3, r3, #30 @ tmp272, tmp273, -@ Patches/../C_code.c:8954: proc->Option[5] = RandBitflags->levelups; +@ Patches/../C_code.c:8959: proc->Option[5] = RandBitflags->levelups; adds r0, r0, #1 @ tmp274, strb r3, [r4, r0] @ tmp272, proc_99->Option[5] -@ Patches/../C_code.c:8955: proc->Option[6] = RandBitflags->caps; - ldrh r3, [r2] @ *RandBitflags.366_10, *RandBitflags.366_10 - lsls r3, r3, #23 @ tmp279, *RandBitflags.366_10, +@ Patches/../C_code.c:8960: proc->Option[6] = RandBitflags->caps; + ldrh r3, [r2] @ *RandBitflags.367_10, *RandBitflags.367_10 + lsls r3, r3, #23 @ tmp279, *RandBitflags.367_10, lsrs r3, r3, #29 @ tmp278, tmp279, -@ Patches/../C_code.c:8955: proc->Option[6] = RandBitflags->caps; +@ Patches/../C_code.c:8960: proc->Option[6] = RandBitflags->caps; adds r0, r0, #1 @ tmp280, strb r3, [r4, r0] @ tmp278, proc_99->Option[6] -@ Patches/../C_code.c:8956: proc->Option[7] = RandBitflags->class; - ldrb r3, [r2, #1] @ *RandBitflags.366_10, *RandBitflags.366_10 - lsls r3, r3, #29 @ tmp285, *RandBitflags.366_10, -@ Patches/../C_code.c:8956: proc->Option[7] = RandBitflags->class; +@ Patches/../C_code.c:8961: proc->Option[7] = RandBitflags->class; + ldrb r3, [r2, #1] @ *RandBitflags.367_10, *RandBitflags.367_10 + lsls r3, r3, #29 @ tmp285, *RandBitflags.367_10, +@ Patches/../C_code.c:8961: proc->Option[7] = RandBitflags->class; adds r0, r0, #1 @ tmp287, -@ Patches/../C_code.c:8956: proc->Option[7] = RandBitflags->class; +@ Patches/../C_code.c:8961: proc->Option[7] = RandBitflags->class; lsrs r3, r3, #30 @ _24, tmp285, -@ Patches/../C_code.c:8956: proc->Option[7] = RandBitflags->class; +@ Patches/../C_code.c:8961: proc->Option[7] = RandBitflags->class; strb r3, [r4, r0] @ _24, proc_99->Option[7] -@ Patches/../C_code.c:8957: if (RecruitValues->newClasses) - ldrb r1, [r1] @ *RecruitValues.364_4, *RecruitValues.364_4 -@ Patches/../C_code.c:8956: proc->Option[7] = RandBitflags->class; +@ Patches/../C_code.c:8962: if (RecruitValues->newClasses) + ldrb r1, [r1] @ *RecruitValues.365_4, *RecruitValues.365_4 +@ Patches/../C_code.c:8961: proc->Option[7] = RandBitflags->class; mov r10, r0 @ tmp287, tmp287 -@ Patches/../C_code.c:8957: if (RecruitValues->newClasses) +@ Patches/../C_code.c:8962: if (RecruitValues->newClasses) subs r0, r0, #21 @ tmp294, -@ Patches/../C_code.c:8957: if (RecruitValues->newClasses) - tst r0, r1 @ tmp294, *RecruitValues.364_4 - beq .L3855 @, -@ Patches/../C_code.c:8959: proc->Option[7] += 3; +@ Patches/../C_code.c:8962: if (RecruitValues->newClasses) + tst r0, r1 @ tmp294, *RecruitValues.365_4 + beq .L3858 @, +@ Patches/../C_code.c:8964: proc->Option[7] += 3; mov r1, r10 @ tmp287, tmp287 adds r3, r3, #3 @ tmp298, strb r3, [r4, r1] @ tmp298, proc_99->Option[7] -.L3855: -@ Patches/../C_code.c:8961: if (RandBitflags->itemStats && RandBitflags->foundItems) +.L3858: +@ Patches/../C_code.c:8966: if (RandBitflags->itemStats && RandBitflags->foundItems) movs r3, #48 @ tmp306, - ldrb r1, [r2, #1] @ *RandBitflags.366_10, *RandBitflags.366_10 - ands r3, r1 @ _144, *RandBitflags.366_10 -@ Patches/../C_code.c:8961: if (RandBitflags->itemStats && RandBitflags->foundItems) + ldrb r1, [r2, #1] @ *RandBitflags.367_10, *RandBitflags.367_10 + ands r3, r1 @ _144, *RandBitflags.367_10 +@ Patches/../C_code.c:8966: if (RandBitflags->itemStats && RandBitflags->foundItems) movs r1, #24 @ tmp313, - ldrb r2, [r2, #2] @ *RandBitflags.366_10, *RandBitflags.366_10 -@ Patches/../C_code.c:8961: if (RandBitflags->itemStats && RandBitflags->foundItems) - tst r1, r2 @ tmp313, *RandBitflags.366_10 - beq .LCB24536 @ - b .L3883 @long jump @ -.LCB24536: -@ Patches/../C_code.c:8969: else if (RandBitflags->foundItems) + ldrb r2, [r2, #2] @ *RandBitflags.367_10, *RandBitflags.367_10 +@ Patches/../C_code.c:8966: if (RandBitflags->itemStats && RandBitflags->foundItems) + tst r1, r2 @ tmp313, *RandBitflags.367_10 + beq .LCB24560 @ + b .L3886 @long jump @ +.LCB24560: +@ Patches/../C_code.c:8974: else if (RandBitflags->foundItems) subs r2, r3, #1 @ tmp319, _144 sbcs r3, r3, r2 @ tmp318, _144, tmp319 lsls r3, r3, #1 @ _111, tmp318, -.L3857: -@ Patches/../C_code.c:8963: proc->Option[8] = 1; +.L3860: +@ Patches/../C_code.c:8968: proc->Option[8] = 1; movs r2, #70 @ tmp322, strb r3, [r4, r2] @ _111, proc_99->Option[8] -@ Patches/../C_code.c:8977: proc->Option[9] = CheckFlag(CasualModeFlag); - ldr r3, .L3885+20 @ tmp324, +@ Patches/../C_code.c:8982: proc->Option[9] = CheckFlag(CasualModeFlag); + ldr r3, .L3888+20 @ tmp324, ldr r0, [r3] @ CasualModeFlag, CasualModeFlag - ldr r3, .L3885+24 @ tmp468, + ldr r3, .L3888+24 @ tmp468, mov r10, r3 @ tmp468, tmp468 bl .L14 @ -@ Patches/../C_code.c:8977: proc->Option[9] = CheckFlag(CasualModeFlag); +@ Patches/../C_code.c:8982: proc->Option[9] = CheckFlag(CasualModeFlag); movs r3, #71 @ tmp327, strb r0, [r4, r3] @ tmp483, proc_99->Option[9] -@ Patches/../C_code.c:8978: proc->Option[10] = RandBitflags->randMusic; +@ Patches/../C_code.c:8983: proc->Option[10] = RandBitflags->randMusic; mov r3, r9 @ tmp467, tmp467 -@ Patches/../C_code.c:8978: proc->Option[10] = RandBitflags->randMusic; +@ Patches/../C_code.c:8983: proc->Option[10] = RandBitflags->randMusic; movs r1, #72 @ tmp335, -@ Patches/../C_code.c:8978: proc->Option[10] = RandBitflags->randMusic; - ldr r3, [r3] @ RandBitflags.378_40, RandBitflags - ldrb r2, [r3, #1] @ *RandBitflags.378_40, *RandBitflags.378_40 - lsrs r2, r2, #6 @ tmp333, *RandBitflags.378_40, -@ Patches/../C_code.c:8978: proc->Option[10] = RandBitflags->randMusic; +@ Patches/../C_code.c:8983: proc->Option[10] = RandBitflags->randMusic; + ldr r3, [r3] @ RandBitflags.379_40, RandBitflags + ldrb r2, [r3, #1] @ *RandBitflags.379_40, *RandBitflags.379_40 + lsrs r2, r2, #6 @ tmp333, *RandBitflags.379_40, +@ Patches/../C_code.c:8983: proc->Option[10] = RandBitflags->randMusic; strb r2, [r4, r1] @ tmp333, proc_99->Option[10] -@ Patches/../C_code.c:8979: proc->Option[11] = RandBitflags->colours; - ldrb r2, [r3, #2] @ *RandBitflags.378_40, *RandBitflags.378_40 - lsls r2, r2, #29 @ tmp340, *RandBitflags.378_40, +@ Patches/../C_code.c:8984: proc->Option[11] = RandBitflags->colours; + ldrb r2, [r3, #2] @ *RandBitflags.379_40, *RandBitflags.379_40 + lsls r2, r2, #29 @ tmp340, *RandBitflags.379_40, lsrs r2, r2, #29 @ tmp339, tmp340, -@ Patches/../C_code.c:8979: proc->Option[11] = RandBitflags->colours; +@ Patches/../C_code.c:8984: proc->Option[11] = RandBitflags->colours; adds r1, r1, #1 @ tmp341, strb r2, [r4, r1] @ tmp339, proc_99->Option[11] -@ Patches/../C_code.c:8980: proc->Option[12] = RandBitflags->itemDur; - ldrb r2, [r3, #2] @ *RandBitflags.378_40, *RandBitflags.378_40 - lsls r2, r2, #25 @ tmp346, *RandBitflags.378_40, +@ Patches/../C_code.c:8985: proc->Option[12] = RandBitflags->itemDur; + ldrb r2, [r3, #2] @ *RandBitflags.379_40, *RandBitflags.379_40 + lsls r2, r2, #25 @ tmp346, *RandBitflags.379_40, lsrs r2, r2, #30 @ tmp345, tmp346, -@ Patches/../C_code.c:8980: proc->Option[12] = RandBitflags->itemDur; +@ Patches/../C_code.c:8985: proc->Option[12] = RandBitflags->itemDur; adds r1, r1, #1 @ tmp347, strb r2, [r4, r1] @ tmp345, proc_99->Option[12] -@ Patches/../C_code.c:8981: proc->Option[13] = RandBitflags->playerBonus; - ldrh r2, [r3, #2] @ *RandBitflags.378_40, *RandBitflags.378_40 - lsls r2, r2, #20 @ tmp352, *RandBitflags.378_40, +@ Patches/../C_code.c:8986: proc->Option[13] = RandBitflags->playerBonus; + ldrh r2, [r3, #2] @ *RandBitflags.379_40, *RandBitflags.379_40 + lsls r2, r2, #20 @ tmp352, *RandBitflags.379_40, lsrs r2, r2, #27 @ tmp351, tmp352, -@ Patches/../C_code.c:8981: proc->Option[13] = RandBitflags->playerBonus; +@ Patches/../C_code.c:8986: proc->Option[13] = RandBitflags->playerBonus; adds r1, r1, #1 @ tmp353, strb r2, [r4, r1] @ tmp351, proc_99->Option[13] -@ Patches/../C_code.c:8982: proc->Option[14] = GrowthValues->player; +@ Patches/../C_code.c:8987: proc->Option[14] = GrowthValues->player; mov r2, r8 @ tmp466, tmp466 -@ Patches/../C_code.c:8982: proc->Option[14] = GrowthValues->player; +@ Patches/../C_code.c:8987: proc->Option[14] = GrowthValues->player; movs r0, #76 @ tmp360, -@ Patches/../C_code.c:8982: proc->Option[14] = GrowthValues->player; - ldr r1, [r2] @ GrowthValues.382_49, GrowthValues - ldrb r2, [r1] @ *GrowthValues.382_49, *GrowthValues.382_49 - lsls r2, r2, #28 @ tmp359, *GrowthValues.382_49, +@ Patches/../C_code.c:8987: proc->Option[14] = GrowthValues->player; + ldr r1, [r2] @ GrowthValues.383_49, GrowthValues + ldrb r2, [r1] @ *GrowthValues.383_49, *GrowthValues.383_49 + lsls r2, r2, #28 @ tmp359, *GrowthValues.383_49, lsrs r2, r2, #28 @ tmp358, tmp359, -@ Patches/../C_code.c:8982: proc->Option[14] = GrowthValues->player; +@ Patches/../C_code.c:8987: proc->Option[14] = GrowthValues->player; strb r2, [r4, r0] @ tmp358, proc_99->Option[14] -@ Patches/../C_code.c:8983: proc->Option[15] = RandValues->bonus; +@ Patches/../C_code.c:8988: proc->Option[15] = RandValues->bonus; ldr r2, [r6] @ RandValues, RandValues - ldrb r2, [r2, #3] @ *RandValues.383_52, *RandValues.383_52 - lsls r2, r2, #26 @ tmp367, *RandValues.383_52, + ldrb r2, [r2, #3] @ *RandValues.384_52, *RandValues.384_52 + lsls r2, r2, #26 @ tmp367, *RandValues.384_52, lsrs r2, r2, #27 @ tmp366, tmp367, -@ Patches/../C_code.c:8983: proc->Option[15] = RandValues->bonus; +@ Patches/../C_code.c:8988: proc->Option[15] = RandValues->bonus; adds r0, r0, #1 @ tmp368, strb r2, [r4, r0] @ tmp366, proc_99->Option[15] -@ Patches/../C_code.c:8984: proc->Option[16] = GrowthValues->enemy; - ldrb r2, [r1] @ *GrowthValues.382_49, *GrowthValues.382_49 -@ Patches/../C_code.c:8984: proc->Option[16] = GrowthValues->enemy; +@ Patches/../C_code.c:8989: proc->Option[16] = GrowthValues->enemy; + ldrb r2, [r1] @ *GrowthValues.383_49, *GrowthValues.383_49 +@ Patches/../C_code.c:8989: proc->Option[16] = GrowthValues->enemy; movs r1, #78 @ tmp374, -@ Patches/../C_code.c:8984: proc->Option[16] = GrowthValues->enemy; - lsrs r2, r2, #4 @ tmp372, *GrowthValues.382_49, -@ Patches/../C_code.c:8984: proc->Option[16] = GrowthValues->enemy; +@ Patches/../C_code.c:8989: proc->Option[16] = GrowthValues->enemy; + lsrs r2, r2, #4 @ tmp372, *GrowthValues.383_49, +@ Patches/../C_code.c:8989: proc->Option[16] = GrowthValues->enemy; strb r2, [r4, r1] @ tmp372, proc_99->Option[16] -@ Patches/../C_code.c:8985: proc->Option[17] = RandBitflags->fog; +@ Patches/../C_code.c:8990: proc->Option[17] = RandBitflags->fog; movs r2, #79 @ tmp380, -@ Patches/../C_code.c:8985: proc->Option[17] = RandBitflags->fog; - ldrb r3, [r3, #3] @ *RandBitflags.378_40, *RandBitflags.378_40 - lsls r3, r3, #25 @ tmp379, *RandBitflags.378_40, +@ Patches/../C_code.c:8990: proc->Option[17] = RandBitflags->fog; + ldrb r3, [r3, #3] @ *RandBitflags.379_40, *RandBitflags.379_40 + lsls r3, r3, #25 @ tmp379, *RandBitflags.379_40, lsrs r3, r3, #30 @ tmp378, tmp379, -@ Patches/../C_code.c:8985: proc->Option[17] = RandBitflags->fog; +@ Patches/../C_code.c:8990: proc->Option[17] = RandBitflags->fog; strb r3, [r4, r2] @ tmp378, proc_99->Option[17] -@ Patches/../C_code.c:8986: proc->Option[18] = RecruitValues->ai; +@ Patches/../C_code.c:8991: proc->Option[18] = RecruitValues->ai; ldr r3, [r7] @ RecruitValues, RecruitValues - ldrb r3, [r3] @ *RecruitValues.386_59, *RecruitValues.386_59 -@ Patches/../C_code.c:8986: proc->Option[18] = RecruitValues->ai; + ldrb r3, [r3] @ *RecruitValues.387_59, *RecruitValues.387_59 +@ Patches/../C_code.c:8991: proc->Option[18] = RecruitValues->ai; adds r2, r2, #1 @ tmp388, -@ Patches/../C_code.c:8986: proc->Option[18] = RecruitValues->ai; - lsrs r3, r3, #6 @ tmp386, *RecruitValues.386_59, -@ Patches/../C_code.c:8986: proc->Option[18] = RecruitValues->ai; +@ Patches/../C_code.c:8991: proc->Option[18] = RecruitValues->ai; + lsrs r3, r3, #6 @ tmp386, *RecruitValues.387_59, +@ Patches/../C_code.c:8991: proc->Option[18] = RecruitValues->ai; strb r3, [r4, r2] @ tmp386, proc_99->Option[18] -@ Patches/../C_code.c:8989: proc->Option[21] = 0; +@ Patches/../C_code.c:8994: proc->Option[21] = 0; movs r7, #83 @ tmp389, movs r3, #0 @ tmp390, strb r3, [r4, r7] @ tmp390, proc_99->Option[21] -@ Patches/../C_code.c:8990: if (CheckFlag(StephanoStyleFlag)) - ldr r3, .L3885+28 @ tmp392, +@ Patches/../C_code.c:8995: if (CheckFlag(StephanoStyleFlag)) + ldr r3, .L3888+28 @ tmp392, ldr r0, [r3] @ StephanoStyleFlag, StephanoStyleFlag - bl .L650 @ -@ Patches/../C_code.c:8990: if (CheckFlag(StephanoStyleFlag)) + bl .L653 @ +@ Patches/../C_code.c:8995: if (CheckFlag(StephanoStyleFlag)) cmp r0, #0 @ tmp484, - beq .L3858 @, -@ Patches/../C_code.c:8992: proc->Option[21] = 1; + beq .L3861 @, +@ Patches/../C_code.c:8997: proc->Option[21] = 1; movs r3, #1 @ tmp396, strb r3, [r4, r7] @ tmp396, proc_99->Option[21] -.L3858: -@ Patches/../C_code.c:8994: if (CheckFlag(GammaStyleFlag)) - ldr r3, .L3885+32 @ tmp398, +.L3861: +@ Patches/../C_code.c:8999: if (CheckFlag(GammaStyleFlag)) + ldr r3, .L3888+32 @ tmp398, ldr r0, [r3] @ GammaStyleFlag, GammaStyleFlag - bl .L650 @ -@ Patches/../C_code.c:8994: if (CheckFlag(GammaStyleFlag)) + bl .L653 @ +@ Patches/../C_code.c:8999: if (CheckFlag(GammaStyleFlag)) cmp r0, #0 @ tmp485, - beq .L3859 @, -@ Patches/../C_code.c:8996: proc->Option[21] = 2; + beq .L3862 @, +@ Patches/../C_code.c:9001: proc->Option[21] = 2; movs r3, #83 @ tmp401, movs r2, #2 @ tmp402, strb r2, [r4, r3] @ tmp402, proc_99->Option[21] -.L3859: -@ Patches/../C_code.c:8998: if (CheckFlag(PikminStyleFlag)) - ldr r3, .L3885+36 @ tmp404, +.L3862: +@ Patches/../C_code.c:9003: if (CheckFlag(PikminStyleFlag)) + ldr r3, .L3888+36 @ tmp404, ldr r0, [r3] @ PikminStyleFlag, PikminStyleFlag - bl .L650 @ -@ Patches/../C_code.c:8998: if (CheckFlag(PikminStyleFlag)) + bl .L653 @ +@ Patches/../C_code.c:9003: if (CheckFlag(PikminStyleFlag)) cmp r0, #0 @ tmp486, - beq .L3860 @, -@ Patches/../C_code.c:9000: proc->Option[21] = 3; + beq .L3863 @, +@ Patches/../C_code.c:9005: proc->Option[21] = 3; movs r3, #83 @ tmp407, movs r2, #3 @ tmp408, strb r2, [r4, r3] @ tmp408, proc_99->Option[21] -.L3860: -@ Patches/../C_code.c:9003: proc->Option[22] = !CheckFlag(DebuggerTurnedOff_Flag); - ldr r3, .L3885+40 @ tmp410, +.L3863: +@ Patches/../C_code.c:9008: proc->Option[22] = !CheckFlag(DebuggerTurnedOff_Flag); + ldr r3, .L3888+40 @ tmp410, ldr r0, [r3] @ DebuggerTurnedOff_Flag, DebuggerTurnedOff_Flag - bl .L650 @ -@ Patches/../C_code.c:9003: proc->Option[22] = !CheckFlag(DebuggerTurnedOff_Flag); + bl .L653 @ +@ Patches/../C_code.c:9008: proc->Option[22] = !CheckFlag(DebuggerTurnedOff_Flag); rsbs r3, r0, #0 @ tmp415, tmp487 adcs r0, r0, r3 @ tmp414, tmp487, tmp415 -@ Patches/../C_code.c:9003: proc->Option[22] = !CheckFlag(DebuggerTurnedOff_Flag); +@ Patches/../C_code.c:9008: proc->Option[22] = !CheckFlag(DebuggerTurnedOff_Flag); movs r3, #84 @ tmp416, strb r0, [r4, r3] @ tmp414, proc_99->Option[22] -@ Patches/../C_code.c:9004: if (DisplayTimedHitsOption) - ldr r3, .L3885+44 @ tmp417, -@ Patches/../C_code.c:9004: if (DisplayTimedHitsOption) +@ Patches/../C_code.c:9009: if (DisplayTimedHitsOption) + ldr r3, .L3888+44 @ tmp417, +@ Patches/../C_code.c:9009: if (DisplayTimedHitsOption) ldr r3, [r3] @ DisplayTimedHitsOption, DisplayTimedHitsOption cmp r3, #0 @ DisplayTimedHitsOption, - beq .L3862 @, -@ Patches/../C_code.c:9007: if (TimedHitsDifficultyRam->alwaysA) - ldr r3, .L3885+48 @ tmp420, + beq .L3865 @, +@ Patches/../C_code.c:9012: if (TimedHitsDifficultyRam->alwaysA) + ldr r3, .L3888+48 @ tmp420, ldr r3, [r3] @ TimedHitsDifficultyRam, TimedHitsDifficultyRam - ldrb r2, [r3] @ _74, *TimedHitsDifficultyRam.392_73 -@ Patches/../C_code.c:9011: if (TimedHitsDifficultyRam->difficulty == 2) + ldrb r2, [r3] @ _74, *TimedHitsDifficultyRam.393_73 +@ Patches/../C_code.c:9016: if (TimedHitsDifficultyRam->difficulty == 2) movs r3, #31 @ tmp424, ands r3, r2 @ _76, _74 -@ Patches/../C_code.c:9011: if (TimedHitsDifficultyRam->difficulty == 2) +@ Patches/../C_code.c:9016: if (TimedHitsDifficultyRam->difficulty == 2) cmp r3, #2 @ _76, - beq .L3864 @, -@ Patches/../C_code.c:9015: if (TimedHitsDifficultyRam->difficulty == 3) + beq .L3867 @, +@ Patches/../C_code.c:9020: if (TimedHitsDifficultyRam->difficulty == 3) cmp r3, #3 @ _76, - bne .L3884 @, -.L3864: -@ Patches/../C_code.c:9017: proc->Option[23] = 3; + bne .L3887 @, +.L3867: +@ Patches/../C_code.c:9022: proc->Option[23] = 3; movs r2, #85 @ tmp437, strb r3, [r4, r2] @ _76, proc_99->Option[23] -.L3862: -@ Patches/../C_code.c:9022: if (DisplayRandomSkillsOption) - ldr r3, .L3885+52 @ tmp440, -@ Patches/../C_code.c:9022: if (DisplayRandomSkillsOption) +.L3865: +@ Patches/../C_code.c:9027: if (DisplayRandomSkillsOption) + ldr r3, .L3888+52 @ tmp440, +@ Patches/../C_code.c:9027: if (DisplayRandomSkillsOption) ldr r3, [r3] @ DisplayRandomSkillsOption, DisplayRandomSkillsOption cmp r3, #0 @ DisplayRandomSkillsOption, - beq .L3866 @, -@ Patches/../C_code.c:9024: proc->Option[24] = RandValues->skills; + beq .L3869 @, +@ Patches/../C_code.c:9029: proc->Option[24] = RandValues->skills; movs r2, #86 @ tmp449, -@ Patches/../C_code.c:9024: proc->Option[24] = RandValues->skills; +@ Patches/../C_code.c:9029: proc->Option[24] = RandValues->skills; ldr r3, [r6] @ RandValues, RandValues - ldrb r3, [r3, #3] @ *RandValues.396_78, *RandValues.396_78 - lsrs r3, r3, #6 @ tmp447, *RandValues.396_78, -@ Patches/../C_code.c:9024: proc->Option[24] = RandValues->skills; + ldrb r3, [r3, #3] @ *RandValues.397_78, *RandValues.397_78 + lsrs r3, r3, #6 @ tmp447, *RandValues.397_78, +@ Patches/../C_code.c:9029: proc->Option[24] = RandValues->skills; strb r3, [r4, r2] @ tmp447, proc_99->Option[24] -@ Patches/../C_code.c:9025: proc->skill = AlwaysSkill[0]; - ldr r3, .L3885+56 @ tmp451, +@ Patches/../C_code.c:9030: proc->skill = AlwaysSkill[0]; + ldr r3, .L3888+56 @ tmp451, ldr r3, [r3] @ AlwaysSkill, AlwaysSkill - ldrb r2, [r3] @ _82, *AlwaysSkill.397_81 -@ Patches/../C_code.c:9025: proc->skill = AlwaysSkill[0]; + ldrb r2, [r3] @ _82, *AlwaysSkill.398_81 +@ Patches/../C_code.c:9030: proc->skill = AlwaysSkill[0]; movs r3, #56 @ tmp452, strb r2, [r4, r3] @ _82, proc_99->skill -.L3866: -@ Patches/../C_code.c:9030: } +.L3869: +@ Patches/../C_code.c:9035: } @ sp needed @ -@ Patches/../C_code.c:9028: gLCDControlBuffer.dispcnt.bg0_on = 0; +@ Patches/../C_code.c:9033: gLCDControlBuffer.dispcnt.bg0_on = 0; movs r2, #1 @ tmp460, ldrb r3, [r5, #1] @ gLCDControlBuffer.dispcnt.bg0_on, gLCDControlBuffer.dispcnt.bg0_on bics r3, r2 @ tmp459, tmp460 -@ Patches/../C_code.c:9030: } +@ Patches/../C_code.c:9035: } movs r0, #5 @, -@ Patches/../C_code.c:9028: gLCDControlBuffer.dispcnt.bg0_on = 0; +@ Patches/../C_code.c:9033: gLCDControlBuffer.dispcnt.bg0_on = 0; strb r3, [r5, #1] @ tmp459, gLCDControlBuffer.dispcnt.bg0_on -@ Patches/../C_code.c:9030: } +@ Patches/../C_code.c:9035: } pop {r5, r6, r7} mov r10, r7 mov r9, r6 @@ -29757,25 +29788,25 @@ MenuStartConfigMenu: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L3883: -@ Patches/../C_code.c:8961: if (RandBitflags->itemStats && RandBitflags->foundItems) +.L3886: +@ Patches/../C_code.c:8966: if (RandBitflags->itemStats && RandBitflags->foundItems) subs r2, r3, #1 @ tmp471, _144 sbcs r3, r3, r2 @ tmp470, _144, tmp471 movs r2, #1 @ tmp473, rsbs r3, r3, #0 @ tmp472, tmp470 bics r3, r2 @ _111, tmp473 adds r3, r3, #3 @ _111, - b .L3857 @ -.L3884: + b .L3860 @ +.L3887: movs r3, #85 @ tmp435, -@ Patches/../C_code.c:9007: if (TimedHitsDifficultyRam->alwaysA) +@ Patches/../C_code.c:9012: if (TimedHitsDifficultyRam->alwaysA) lsls r2, r2, #26 @ tmp434, _74, lsrs r2, r2, #31 @ tmp433, tmp434, strb r2, [r4, r3] @ tmp433, MEM [(void *)proc_99].Option[23] - b .L3862 @ -.L3886: + b .L3865 @ +.L3889: .align 2 -.L3885: +.L3888: .word gLCDControlBuffer .word RandValues .word RecruitValues @@ -29804,12 +29835,12 @@ NewPutNumberBonus: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:9040: if (number == 0) +@ Patches/../C_code.c:9045: if (number == 0) cmp r0, #0 @ number, - beq .L3887 @, + beq .L3890 @, bl NewPutNumberBonus.part.0 @ -.L3887: -@ Patches/../C_code.c:9096: } +.L3890: +@ Patches/../C_code.c:9101: } @ sp needed @ pop {r4} pop {r0} @@ -29832,49 +29863,49 @@ PrintDebugNumberToBG: push {r7, lr} @ movs r4, r3 @ n, tmp150 sub sp, sp, #12 @,, -@ Patches/../C_code.c:9105: while (n != 0) +@ Patches/../C_code.c:9110: while (n != 0) cmp r3, #0 @ n, - beq .L3892 @, -@ Patches/../C_code.c:9110: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); + beq .L3895 @, +@ Patches/../C_code.c:9115: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); lsls r2, r2, #5 @ tmp128, y, - ldr r3, .L3899 @ tmp131, + ldr r3, .L3902 @ tmp131, adds r5, r2, r1 @ tmp129, tmp128, x lsls r5, r5, #1 @ tmp130, tmp129, - adds r5, r5, r3 @ ivtmp.2095, tmp130, tmp131 - ldr r3, .L3899+4 @ tmp146, - mov r9, r3 @ tmp146, tmp146 + adds r5, r5, r3 @ ivtmp.2100, tmp130, tmp131 + ldr r3, .L3902+4 @ tmp145, + mov r9, r3 @ tmp145, tmp145 mov r3, sp @ tmp155, adds r6, r3, #6 @ tmp144, tmp155, - ldr r3, .L3899+8 @ tmp145, - mov r8, r3 @ tmp145, tmp145 - ldr r7, .L3899+12 @ tmp147, -.L3894: -@ Patches/../C_code.c:9107: u16 c = '0' + Mod(n, 10); + ldr r3, .L3902+8 @ tmp146, + mov r8, r3 @ tmp146, tmp146 + ldr r7, .L3902+12 @ tmp147, +.L3897: +@ Patches/../C_code.c:9112: u16 c = '0' + Mod(n, 10); movs r1, #10 @, movs r0, r4 @, n - bl .L397 @ -@ Patches/../C_code.c:9107: u16 c = '0' + Mod(n, 10); + bl .L400 @ +@ Patches/../C_code.c:9112: u16 c = '0' + Mod(n, 10); adds r0, r0, #48 @ tmp135, -@ Patches/../C_code.c:9109: n /= 10; +@ Patches/../C_code.c:9114: n /= 10; movs r1, #10 @, -@ Patches/../C_code.c:9107: u16 c = '0' + Mod(n, 10); +@ Patches/../C_code.c:9112: u16 c = '0' + Mod(n, 10); strh r0, [r6] @ tmp135, c -@ Patches/../C_code.c:9109: n /= 10; +@ Patches/../C_code.c:9114: n /= 10; movs r0, r4 @, n - bl .L208 @ -@ Patches/../C_code.c:9110: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); + bl .L211 @ +@ Patches/../C_code.c:9115: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); movs r1, r6 @, tmp144 -@ Patches/../C_code.c:9109: n /= 10; +@ Patches/../C_code.c:9114: n /= 10; movs r4, r0 @ n, tmp152 -@ Patches/../C_code.c:9110: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); - movs r0, r5 @, ivtmp.2095 +@ Patches/../C_code.c:9115: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); + movs r0, r5 @, ivtmp.2100 bl .L62 @ -@ Patches/../C_code.c:9105: while (n != 0) - subs r5, r5, #2 @ ivtmp.2095, +@ Patches/../C_code.c:9110: while (n != 0) + subs r5, r5, #2 @ ivtmp.2100, cmp r4, #0 @ n, - bne .L3894 @, -.L3892: -@ Patches/../C_code.c:9113: } + bne .L3897 @, +.L3895: +@ Patches/../C_code.c:9118: } add sp, sp, #12 @,, @ sp needed @ pop {r6, r7} @@ -29883,9 +29914,9 @@ PrintDebugNumberToBG: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3900: +.L3903: .align 2 -.L3899: +.L3902: .word gBG0TilemapBuffer .word Mod .word __aeabi_idiv @@ -29903,109 +29934,109 @@ StatScreenSelectLoop: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:9123: if (sKeyStatusBuffer.newKeys & R_BUTTON) - ldr r5, .L3922 @ tmp183, +@ Patches/../C_code.c:9128: if (sKeyStatusBuffer.newKeys & R_BUTTON) + ldr r5, .L3925 @ tmp183, ldrh r3, [r5, #8] @ _1, -@ Patches/../C_code.c:9121: { +@ Patches/../C_code.c:9126: { movs r4, r0 @ proc, tmp184 -@ Patches/../C_code.c:9123: if (sKeyStatusBuffer.newKeys & R_BUTTON) +@ Patches/../C_code.c:9128: if (sKeyStatusBuffer.newKeys & R_BUTTON) lsls r2, r3, #23 @ tmp188, _1, - bpl .L3902 @, -@ Patches/../C_code.c:9125: int page = gStatScreen.page; - ldr r3, .L3922+4 @ tmp136, + bpl .L3905 @, +@ Patches/../C_code.c:9130: int page = gStatScreen.page; + ldr r3, .L3925+4 @ tmp136, ldrb r6, [r3] @ _2, gStatScreen -@ Patches/../C_code.c:9127: if (SkillSysInstalled) - ldr r3, .L3922+8 @ tmp137, -@ Patches/../C_code.c:9127: if (SkillSysInstalled) +@ Patches/../C_code.c:9132: if (SkillSysInstalled) + ldr r3, .L3925+8 @ tmp137, +@ Patches/../C_code.c:9132: if (SkillSysInstalled) ldr r3, [r3] @ SkillSysInstalled, SkillSysInstalled cmp r3, #0 @ SkillSysInstalled, - bne .L3920 @, -.L3904: -@ Patches/../C_code.c:9132: Proc_Goto(proc, 0); // TODO: label name + bne .L3923 @, +.L3907: +@ Patches/../C_code.c:9137: Proc_Goto(proc, 0); // TODO: label name movs r1, #0 @, movs r0, r4 @, proc - ldr r3, .L3922+12 @ tmp140, + ldr r3, .L3925+12 @ tmp140, bl .L14 @ -@ Patches/../C_code.c:9133: StartStatScreenHelp(page, proc); - ldr r3, .L3922+16 @ tmp141, +@ Patches/../C_code.c:9138: StartStatScreenHelp(page, proc); + ldr r3, .L3925+16 @ tmp141, movs r1, r4 @, proc movs r0, r6 @, page bl .L14 @ -@ Patches/../C_code.c:9135: if (sKeyStatusBuffer.newKeys & SELECT_BUTTON) +@ Patches/../C_code.c:9140: if (sKeyStatusBuffer.newKeys & SELECT_BUTTON) ldrh r3, [r5, #8] @ _1, -.L3902: -@ Patches/../C_code.c:9135: if (sKeyStatusBuffer.newKeys & SELECT_BUTTON) +.L3905: +@ Patches/../C_code.c:9140: if (sKeyStatusBuffer.newKeys & SELECT_BUTTON) lsls r3, r3, #29 @ tmp189, _1, - bpl .L3901 @, -@ Patches/../C_code.c:9137: int page = gStatScreen.page; - ldr r3, .L3922+4 @ tmp150, -@ Patches/../C_code.c:9139: if (SkillSysInstalled) - ldr r6, .L3922+8 @ tmp151, -@ Patches/../C_code.c:9137: int page = gStatScreen.page; + bpl .L3904 @, +@ Patches/../C_code.c:9142: int page = gStatScreen.page; + ldr r3, .L3925+4 @ tmp150, +@ Patches/../C_code.c:9144: if (SkillSysInstalled) + ldr r6, .L3925+8 @ tmp151, +@ Patches/../C_code.c:9142: int page = gStatScreen.page; ldrb r5, [r3] @ _5, gStatScreen -@ Patches/../C_code.c:9139: if (SkillSysInstalled) +@ Patches/../C_code.c:9144: if (SkillSysInstalled) ldr r3, [r6] @ SkillSysInstalled, SkillSysInstalled cmp r3, #0 @ SkillSysInstalled, - bne .L3921 @, -.L3908: -@ Patches/../C_code.c:9153: if (page) + bne .L3924 @, +.L3911: +@ Patches/../C_code.c:9158: if (page) cmp r5, #0 @ page, - bne .L3901 @, -@ Patches/../C_code.c:9157: Proc_Goto(proc, 0); // TODO: label name + bne .L3904 @, +@ Patches/../C_code.c:9162: Proc_Goto(proc, 0); // TODO: label name movs r1, #0 @, movs r0, r4 @, proc - ldr r3, .L3922+12 @ tmp157, + ldr r3, .L3925+12 @ tmp157, bl .L14 @ -@ Patches/../C_code.c:9158: if (!RandBitflags->disp) - ldr r3, .L3922+20 @ tmp158, -@ Patches/../C_code.c:9158: if (!RandBitflags->disp) +@ Patches/../C_code.c:9163: if (!RandBitflags->disp) + ldr r3, .L3925+20 @ tmp158, +@ Patches/../C_code.c:9163: if (!RandBitflags->disp) movs r2, #128 @ tmp167, -@ Patches/../C_code.c:9158: if (!RandBitflags->disp) - ldr r1, [r3] @ RandBitflags.405_9, RandBitflags +@ Patches/../C_code.c:9163: if (!RandBitflags->disp) + ldr r1, [r3] @ RandBitflags.406_9, RandBitflags movs r3, #127 @ tmp177, -@ Patches/../C_code.c:9158: if (!RandBitflags->disp) - ldrb r0, [r1, #3] @ *RandBitflags.405_9, *RandBitflags.405_9 - bics r2, r0 @ tmp171, *RandBitflags.405_9 - ands r3, r0 @ tmp176, *RandBitflags.405_9 +@ Patches/../C_code.c:9163: if (!RandBitflags->disp) + ldrb r0, [r1, #3] @ *RandBitflags.406_9, *RandBitflags.406_9 + bics r2, r0 @ tmp171, *RandBitflags.406_9 + ands r3, r0 @ tmp176, *RandBitflags.406_9 orrs r3, r2 @ tmp180, tmp171 - strb r3, [r1, #3] @ tmp180, RandBitflags.405_9->disp -@ Patches/../C_code.c:9166: StatScreen_Display(proc); + strb r3, [r1, #3] @ tmp180, RandBitflags.406_9->disp +@ Patches/../C_code.c:9171: StatScreen_Display(proc); movs r0, r4 @, proc - ldr r3, .L3922+24 @ tmp182, + ldr r3, .L3925+24 @ tmp182, bl .L14 @ -.L3901: -@ Patches/../C_code.c:9169: } +.L3904: +@ Patches/../C_code.c:9174: } @ sp needed @ pop {r4, r5, r6} pop {r0} bx r0 -.L3920: -@ Patches/../C_code.c:9129: page = GetStatScreenPage(); - ldr r3, .L3922+28 @ tmp139, +.L3923: +@ Patches/../C_code.c:9134: page = GetStatScreenPage(); + ldr r3, .L3925+28 @ tmp139, bl .L14 @ movs r6, r0 @ page, tmp185 - b .L3904 @ -.L3921: -@ Patches/../C_code.c:9141: page = GetStatScreenPage(); - ldr r3, .L3922+28 @ tmp153, + b .L3907 @ +.L3924: +@ Patches/../C_code.c:9146: page = GetStatScreenPage(); + ldr r3, .L3925+28 @ tmp153, bl .L14 @ -@ Patches/../C_code.c:9145: if (SkillSysInstalled) +@ Patches/../C_code.c:9150: if (SkillSysInstalled) ldr r3, [r6] @ SkillSysInstalled, SkillSysInstalled -@ Patches/../C_code.c:9141: page = GetStatScreenPage(); +@ Patches/../C_code.c:9146: page = GetStatScreenPage(); movs r5, r0 @ page, tmp186 -@ Patches/../C_code.c:9145: if (SkillSysInstalled) +@ Patches/../C_code.c:9150: if (SkillSysInstalled) cmp r3, #0 @ SkillSysInstalled, - beq .L3908 @, -@ Patches/../C_code.c:9147: if (!PressSelectFE8Something()) - ldr r3, .L3922+32 @ tmp156, + beq .L3911 @, +@ Patches/../C_code.c:9152: if (!PressSelectFE8Something()) + ldr r3, .L3925+32 @ tmp156, bl .L14 @ -@ Patches/../C_code.c:9147: if (!PressSelectFE8Something()) +@ Patches/../C_code.c:9152: if (!PressSelectFE8Something()) cmp r0, #0 @ tmp187, - bne .L3908 @, - b .L3901 @ -.L3923: + bne .L3911 @, + b .L3904 @ +.L3926: .align 2 -.L3922: +.L3925: .word sKeyStatusBuffer .word gStatScreen .word SkillSysInstalled @@ -30032,54 +30063,54 @@ DrawGrowthWithDifference: mov lr, r9 @, mov r8, r0 @ x, tmp146 push {r7, lr} @ -@ Patches/../C_code.c:9172: { +@ Patches/../C_code.c:9177: { movs r6, r2 @ base, tmp148 -@ Patches/../C_code.c:9177: offset++; +@ Patches/../C_code.c:9182: offset++; movs r4, #1 @ offset, -@ Patches/../C_code.c:9173: int diff = modified - base; +@ Patches/../C_code.c:9178: int diff = modified - base; subs r7, r3, r2 @ diff, tmp149, base -@ Patches/../C_code.c:9175: if (base > 99) +@ Patches/../C_code.c:9180: if (base > 99) cmp r2, #99 @ base, - bgt .L3925 @, -@ Patches/../C_code.c:9179: if ((base < 100) && (diff < 100)) + bgt .L3928 @, +@ Patches/../C_code.c:9184: if ((base < 100) && (diff < 100)) movs r3, #99 @ tmp133, movs r2, #0 @ tmp135, lsrs r4, r7, #31 @ tmp134, diff, cmp r3, r7 @ tmp133, diff adcs r4, r4, r2 @ offset, tmp134, tmp135 -.L3925: -@ Patches/../C_code.c:9183: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); +.L3928: +@ Patches/../C_code.c:9188: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); lsls r5, r1, #5 @ _4, y, add r4, r4, r8 @ tmp136, x -@ Patches/../C_code.c:9183: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); - ldr r3, .L3931 @ tmp140, -@ Patches/../C_code.c:9183: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); +@ Patches/../C_code.c:9188: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); + ldr r3, .L3934 @ tmp140, +@ Patches/../C_code.c:9188: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); adds r4, r4, r5 @ tmp137, tmp136, _4 -@ Patches/../C_code.c:9183: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); +@ Patches/../C_code.c:9188: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); lsls r4, r4, #1 @ tmp138, tmp137, -@ Patches/../C_code.c:9183: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); +@ Patches/../C_code.c:9188: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x + offset, y), blue, base); mov r9, r3 @ tmp140, tmp140 movs r0, r4 @ tmp138, tmp138 movs r2, r6 @, base movs r1, #2 @, - ldr r3, .L3931+4 @ tmp141, + ldr r3, .L3934+4 @ tmp141, add r0, r0, r9 @ tmp138, tmp140 bl .L14 @ -@ Patches/../C_code.c:9040: if (number == 0) +@ Patches/../C_code.c:9045: if (number == 0) cmp r7, #0 @ diff, - beq .L3924 @, -@ Patches/../C_code.c:9184: NewPutNumberBonus(diff, gUiTmScratchA + TILEMAP_INDEX(x, y), base); + beq .L3927 @, +@ Patches/../C_code.c:9189: NewPutNumberBonus(diff, gUiTmScratchA + TILEMAP_INDEX(x, y), base); movs r1, r5 @ _4, _4 add r1, r1, r8 @ _4, x -@ Patches/../C_code.c:9184: NewPutNumberBonus(diff, gUiTmScratchA + TILEMAP_INDEX(x, y), base); +@ Patches/../C_code.c:9189: NewPutNumberBonus(diff, gUiTmScratchA + TILEMAP_INDEX(x, y), base); lsls r1, r1, #1 @ tmp143, tmp142, movs r2, r6 @, base movs r0, r7 @, diff -@ Patches/../C_code.c:9184: NewPutNumberBonus(diff, gUiTmScratchA + TILEMAP_INDEX(x, y), base); +@ Patches/../C_code.c:9189: NewPutNumberBonus(diff, gUiTmScratchA + TILEMAP_INDEX(x, y), base); add r1, r1, r9 @ tmp144, tmp140 bl NewPutNumberBonus.part.0 @ -.L3924: -@ Patches/../C_code.c:9185: } +.L3927: +@ Patches/../C_code.c:9190: } @ sp needed @ pop {r6, r7} mov r9, r7 @@ -30087,9 +30118,9 @@ DrawGrowthWithDifference: pop {r3, r4, r5, r6, r7} pop {r0} bx r0 -.L3932: +.L3935: .align 2 -.L3931: +.L3934: .word gUiTmScratchA .word PutNumberOrBlank .size DrawGrowthWithDifference, .-DrawGrowthWithDifference @@ -30105,11 +30136,11 @@ GetUnitCon: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9190: return UNIT_CON(unit); +@ Patches/../C_code.c:9195: return UNIT_CON(unit); ldr r3, [r0, #4] @ unit_11(D)->pClassData, unit_11(D)->pClassData -@ Patches/../C_code.c:9191: } +@ Patches/../C_code.c:9196: } @ sp needed @ -@ Patches/../C_code.c:9190: return UNIT_CON(unit); +@ Patches/../C_code.c:9195: return UNIT_CON(unit); ldr r2, [r0] @ unit_11(D)->pCharacterData, unit_11(D)->pCharacterData ldrb r3, [r3, #17] @ tmp127, ldrb r2, [r2, #19] @ tmp129, @@ -30122,7 +30153,7 @@ GetUnitCon: adds r3, r3, r2 @ tmp130, tmp127, tmp129 asrs r0, r0, #24 @ tmp131, tmp131, adds r0, r3, r0 @ tmp125, tmp130, tmp131 -@ Patches/../C_code.c:9191: } +@ Patches/../C_code.c:9196: } bx lr .size GetUnitCon, .-GetUnitCon .align 1 @@ -30137,11 +30168,11 @@ GetUnitMov: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9194: return UNIT_MOV(unit); +@ Patches/../C_code.c:9199: return UNIT_MOV(unit); ldr r3, [r0, #4] @ unit_7(D)->pClassData, unit_7(D)->pClassData -@ Patches/../C_code.c:9195: } +@ Patches/../C_code.c:9200: } @ sp needed @ -@ Patches/../C_code.c:9194: return UNIT_MOV(unit); +@ Patches/../C_code.c:9199: return UNIT_MOV(unit); ldrb r3, [r3, #18] @ tmp123, ldrb r0, [r0, #29] @ tmp124, lsls r3, r3, #24 @ tmp123, tmp123, @@ -30149,7 +30180,7 @@ GetUnitMov: asrs r3, r3, #24 @ tmp123, tmp123, asrs r0, r0, #24 @ tmp124, tmp124, adds r0, r3, r0 @ tmp121, tmp123, tmp124 -@ Patches/../C_code.c:9195: } +@ Patches/../C_code.c:9200: } bx lr .size GetUnitMov, .-GetUnitMov .align 1 @@ -30164,13 +30195,13 @@ GetUnitMag: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9198: return unit->_u3A; +@ Patches/../C_code.c:9203: return unit->_u3A; movs r3, #58 @ tmp118, -@ Patches/../C_code.c:9199: } +@ Patches/../C_code.c:9204: } @ sp needed @ -@ Patches/../C_code.c:9198: return unit->_u3A; +@ Patches/../C_code.c:9203: return unit->_u3A; ldrb r0, [r0, r3] @ tmp117, -@ Patches/../C_code.c:9199: } +@ Patches/../C_code.c:9204: } bx lr .size GetUnitMag, .-GetUnitMag .align 1 @@ -30189,85 +30220,85 @@ _GetTalkee: mov r6, r8 @, mov r7, r9 @, push {r6, r7, lr} @ -@ Patches/../C_code.c:9275: const struct TalkEventCond * talkCond = GetChapterEventDataPointer(gCh)->characterBasedEvents; - ldr r3, .L3958 @ tmp135, -@ Patches/../C_code.c:9274: { +@ Patches/../C_code.c:9280: const struct TalkEventCond * talkCond = GetChapterEventDataPointer(gCh)->characterBasedEvents; + ldr r3, .L3961 @ tmp135, +@ Patches/../C_code.c:9279: { movs r5, r0 @ unitID, tmp151 -@ Patches/../C_code.c:9275: const struct TalkEventCond * talkCond = GetChapterEventDataPointer(gCh)->characterBasedEvents; +@ Patches/../C_code.c:9280: const struct TalkEventCond * talkCond = GetChapterEventDataPointer(gCh)->characterBasedEvents; ldrb r0, [r3] @ gCh, gCh - ldr r3, .L3958+4 @ tmp137, + ldr r3, .L3961+4 @ tmp137, bl .L14 @ movs r3, #255 @ tmp156, - ldr r4, [r0, #4] @ ivtmp.2120, _3->characterBasedEvents + ldr r4, [r0, #4] @ ivtmp.2125, _3->characterBasedEvents lsls r3, r3, #4 @ tmp156, tmp156, - adds r6, r4, r3 @ _43, ivtmp.2120, tmp156 -@ Patches/../C_code.c:9291: if (CheckFlag(flag)) - ldr r3, .L3958+8 @ tmp148, + adds r6, r4, r3 @ _43, ivtmp.2125, tmp156 +@ Patches/../C_code.c:9296: if (CheckFlag(flag)) + ldr r3, .L3961+8 @ tmp148, mov r10, r3 @ tmp148, tmp148 -@ Patches/../C_code.c:9309: unit = GetUnitFromCharId(pid); - ldr r3, .L3958+12 @ tmp149, +@ Patches/../C_code.c:9314: unit = GetUnitFromCharId(pid); + ldr r3, .L3961+12 @ tmp149, mov r8, r3 @ tmp149, tmp149 -@ Patches/../C_code.c:9314: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) - ldr r3, .L3958+16 @ tmp150, +@ Patches/../C_code.c:9319: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) + ldr r3, .L3961+16 @ tmp150, mov r9, r3 @ tmp150, tmp150 - b .L3939 @ -.L3957: -@ Patches/../C_code.c:9296: pid = talkCond[i].pidB; + b .L3942 @ +.L3960: +@ Patches/../C_code.c:9301: pid = talkCond[i].pidB; ldrb r7, [r4, #9] @ , MEM[(unsigned char *)_18 + 9B] -@ Patches/../C_code.c:9306: if (pid) +@ Patches/../C_code.c:9311: if (pid) cmp r7, #0 @ , - bne .L3956 @, + bne .L3959 @, +.L3945: +@ Patches/../C_code.c:9283: for (int i = 0; i < 255; ++i) + adds r4, r4, #16 @ ivtmp.2125, + cmp r4, r6 @ ivtmp.2125, _43 + beq .L3940 @, .L3942: -@ Patches/../C_code.c:9278: for (int i = 0; i < 255; ++i) - adds r4, r4, #16 @ ivtmp.2120, - cmp r4, r6 @ ivtmp.2120, _43 - beq .L3937 @, -.L3939: -@ Patches/../C_code.c:9280: if (!talkCond[i].eventType) +@ Patches/../C_code.c:9285: if (!talkCond[i].eventType) ldrh r3, [r4] @ MEM[(short unsigned int *)_18], MEM[(short unsigned int *)_18] cmp r3, #0 @ MEM[(short unsigned int *)_18], - beq .L3937 @, -@ Patches/../C_code.c:9284: if (talkCond[i].pidA != unitID) + beq .L3940 @, +@ Patches/../C_code.c:9289: if (talkCond[i].pidA != unitID) ldrb r3, [r4, #8] @ MEM[(unsigned char *)_18 + 8B], MEM[(unsigned char *)_18 + 8B] -@ Patches/../C_code.c:9284: if (talkCond[i].pidA != unitID) +@ Patches/../C_code.c:9289: if (talkCond[i].pidA != unitID) cmp r3, r5 @ MEM[(unsigned char *)_18 + 8B], unitID - bne .L3942 @, -@ Patches/../C_code.c:9288: flag = talkCond[i].flag; + bne .L3945 @, +@ Patches/../C_code.c:9293: flag = talkCond[i].flag; ldrh r0, [r4, #2] @ flag, MEM[(short unsigned int *)_18 + 2B] -@ Patches/../C_code.c:9289: if (flag) +@ Patches/../C_code.c:9294: if (flag) cmp r0, #0 @ flag, - beq .L3957 @, -@ Patches/../C_code.c:9291: if (CheckFlag(flag)) - bl .L650 @ -@ Patches/../C_code.c:9291: if (CheckFlag(flag)) + beq .L3960 @, +@ Patches/../C_code.c:9296: if (CheckFlag(flag)) + bl .L653 @ +@ Patches/../C_code.c:9296: if (CheckFlag(flag)) cmp r0, #0 @ tmp153, - bne .L3942 @, -@ Patches/../C_code.c:9296: pid = talkCond[i].pidB; + bne .L3945 @, +@ Patches/../C_code.c:9301: pid = talkCond[i].pidB; ldrb r7, [r4, #9] @ , MEM[(unsigned char *)_18 + 9B] -@ Patches/../C_code.c:9306: if (pid) +@ Patches/../C_code.c:9311: if (pid) cmp r7, #0 @ , - beq .L3942 @, -.L3956: -@ Patches/../C_code.c:9309: unit = GetUnitFromCharId(pid); + beq .L3945 @, +.L3959: +@ Patches/../C_code.c:9314: unit = GetUnitFromCharId(pid); lsls r0, r7, #16 @ _13, , asrs r0, r0, #16 @ _13, _13, - bl .L208 @ -@ Patches/../C_code.c:9310: if (!UNIT_IS_VALID(unit)) + bl .L211 @ +@ Patches/../C_code.c:9315: if (!UNIT_IS_VALID(unit)) cmp r0, #0 @ unit, - beq .L3942 @, -@ Patches/../C_code.c:9310: if (!UNIT_IS_VALID(unit)) + beq .L3945 @, +@ Patches/../C_code.c:9315: if (!UNIT_IS_VALID(unit)) ldr r3, [r0] @ unit_32->pCharacterData, unit_32->pCharacterData cmp r3, #0 @ unit_32->pCharacterData, - beq .L3942 @, -@ Patches/../C_code.c:9314: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) + beq .L3945 @, +@ Patches/../C_code.c:9319: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) mov r2, r9 @ tmp150, tmp150 -@ Patches/../C_code.c:9314: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) +@ Patches/../C_code.c:9319: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) ldr r3, [r0, #12] @ unit_32->state, unit_32->state -@ Patches/../C_code.c:9314: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) +@ Patches/../C_code.c:9319: if (unit->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) tst r3, r2 @ unit_32->state, tmp150 - bne .L3942 @, -.L3936: -@ Patches/../C_code.c:9322: } + bne .L3945 @, +.L3939: +@ Patches/../C_code.c:9327: } @ sp needed @ movs r0, r7 @, pop {r5, r6, r7} @@ -30277,13 +30308,13 @@ _GetTalkee: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L3937: -@ Patches/../C_code.c:9321: return 0; +.L3940: +@ Patches/../C_code.c:9326: return 0; movs r7, #0 @ , - b .L3936 @ -.L3959: + b .L3939 @ +.L3962: .align 2 -.L3958: +.L3961: .word gCh .word GetChapterEventDataPointer .word CheckFlag @@ -30292,19 +30323,19 @@ _GetTalkee: .size _GetTalkee, .-_GetTalkee .section .rodata.str1.4 .align 2 -.LC738: +.LC739: .ascii " SRR V1.8.9 by Vesly\000" .align 2 -.LC741: +.LC742: .ascii "discord.com/invite/XEZ\000" .align 2 -.LC743: +.LC744: .ascii ")\000" .align 2 -.LC745: +.LC746: .ascii ".\000" .align 2 -.LC747: +.LC748: .ascii "TJQ\000" .text .align 1 @@ -30319,76 +30350,76 @@ DrawVersionNumber: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:9514: { +@ Patches/../C_code.c:9519: { movs r4, r0 @ addr, tmp133 -@ Patches/../C_code.c:9516: SetupDebugFontForOBJ(0x5000, 5); +@ Patches/../C_code.c:9521: SetupDebugFontForOBJ(0x5000, 5); movs r0, #160 @, movs r1, #5 @, - ldr r3, .L3963 @ tmp119, + ldr r3, .L3966 @ tmp119, lsls r0, r0, #7 @,, bl .L14 @ -@ Patches/../C_code.c:9541: PrintDebugStringAsOBJ(0, 0, VersionNumber " by Vesly"); - ldr r2, .L3963+4 @ tmp122, -@ Patches/../C_code.c:9529: if (!addr) +@ Patches/../C_code.c:9546: PrintDebugStringAsOBJ(0, 0, VersionNumber " by Vesly"); + ldr r2, .L3966+4 @ tmp122, +@ Patches/../C_code.c:9534: if (!addr) cmp r4, #0 @ addr, - beq .L3961 @, -@ Patches/../C_code.c:9536: PrintDebugStringAsOBJ(0, y + 7, VersionNumber " by Vesly"); + beq .L3964 @, +@ Patches/../C_code.c:9541: PrintDebugStringAsOBJ(0, y + 7, VersionNumber " by Vesly"); movs r1, #151 @, movs r0, #0 @, - ldr r4, .L3963+8 @ tmp132, - bl .L269 @ + ldr r4, .L3966+8 @ tmp132, + bl .L272 @ movs r6, #0 @ prephitmp_15, movs r7, #6 @ prephitmp_14, -@ Patches/../C_code.c:9537: y = 5; +@ Patches/../C_code.c:9542: y = 5; movs r5, #5 @ y, -.L3962: -@ Patches/../C_code.c:9551: } +.L3965: +@ Patches/../C_code.c:9556: } @ sp needed @ -@ Patches/../C_code.c:9544: PrintDebugStringAsOBJ(x + 0, y, "discord.com/invite/XEZ"); +@ Patches/../C_code.c:9549: PrintDebugStringAsOBJ(x + 0, y, "discord.com/invite/XEZ"); movs r1, r5 @, y movs r0, #20 @, - ldr r2, .L3963+12 @ tmp124, - bl .L269 @ -@ Patches/../C_code.c:9545: PrintDebugStringAsOBJ(x + 177, y + 1, ")"); + ldr r2, .L3966+12 @ tmp124, + bl .L272 @ +@ Patches/../C_code.c:9550: PrintDebugStringAsOBJ(x + 177, y + 1, ")"); movs r1, r7 @, prephitmp_14 movs r0, #197 @, - ldr r2, .L3963+16 @ tmp126, - bl .L269 @ -@ Patches/../C_code.c:9546: PrintDebugStringAsOBJ(x + 173, y - 5, "."); + ldr r2, .L3966+16 @ tmp126, + bl .L272 @ +@ Patches/../C_code.c:9551: PrintDebugStringAsOBJ(x + 173, y - 5, "."); movs r1, r6 @, prephitmp_15 movs r0, #193 @, - ldr r2, .L3963+20 @ tmp128, - bl .L269 @ -@ Patches/../C_code.c:9547: PrintDebugStringAsOBJ(x + 180, y, "TJQ"); + ldr r2, .L3966+20 @ tmp128, + bl .L272 @ +@ Patches/../C_code.c:9552: PrintDebugStringAsOBJ(x + 180, y, "TJQ"); movs r1, r5 @, y movs r0, #200 @, - ldr r2, .L3963+24 @ tmp130, - bl .L269 @ -@ Patches/../C_code.c:9551: } + ldr r2, .L3966+24 @ tmp130, + bl .L272 @ +@ Patches/../C_code.c:9556: } pop {r3, r4, r5, r6, r7} pop {r0} bx r0 -.L3961: -@ Patches/../C_code.c:9541: PrintDebugStringAsOBJ(0, 0, VersionNumber " by Vesly"); +.L3964: +@ Patches/../C_code.c:9546: PrintDebugStringAsOBJ(0, 0, VersionNumber " by Vesly"); movs r1, #0 @, movs r0, #0 @, - ldr r4, .L3963+8 @ tmp132, - bl .L269 @ + ldr r4, .L3966+8 @ tmp132, + bl .L272 @ movs r6, #134 @ prephitmp_15, movs r7, #140 @ prephitmp_14, -@ Patches/../C_code.c:9531: y -= 5; +@ Patches/../C_code.c:9536: y -= 5; movs r5, #139 @ y, - b .L3962 @ -.L3964: + b .L3965 @ +.L3967: .align 2 -.L3963: +.L3966: .word SetupDebugFontForOBJ - .word .LC738 + .word .LC739 .word PrintDebugStringAsOBJ - .word .LC741 - .word .LC743 - .word .LC745 - .word .LC747 + .word .LC742 + .word .LC744 + .word .LC746 + .word .LC748 .size DrawVersionNumber, .-DrawVersionNumber .align 1 .p2align 2,,3 @@ -30404,53 +30435,53 @@ DrawStatus: push {r4, r5, r6, r7, lr} @ mov r7, r8 @, mov lr, r9 @, -@ Patches/../C_code.c:9595: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) +@ Patches/../C_code.c:9600: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) movs r6, #48 @ tmp136, -@ Patches/../C_code.c:9592: { +@ Patches/../C_code.c:9597: { push {r7, lr} @ -@ Patches/../C_code.c:9595: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) +@ Patches/../C_code.c:9600: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) movs r7, #15 @ tmp138, -@ Patches/../C_code.c:9595: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) - ldr r4, .L3978 @ tmp210, +@ Patches/../C_code.c:9600: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) + ldr r4, .L3981 @ tmp210, ldr r5, [r4, #12] @ _1, gStatScreen.unit -@ Patches/../C_code.c:9595: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) +@ Patches/../C_code.c:9600: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) ldrb r3, [r5, r6] @ *_1, *_1 -@ Patches/../C_code.c:9592: { +@ Patches/../C_code.c:9597: { mov r8, r0 @ x, tmp211 mov r9, r1 @ y, tmp212 sub sp, sp, #76 @,, -@ Patches/../C_code.c:9595: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) +@ Patches/../C_code.c:9600: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) ands r3, r7 @ _3, tmp138 -@ Patches/../C_code.c:9595: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) +@ Patches/../C_code.c:9600: if (gStatScreen.unit->statusIndex != UNIT_STATUS_RECOVER) cmp r3, #10 @ _3, - beq .L3966 @, -@ Patches/../C_code.c:9602: &gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(gStatScreen.unit)); + beq .L3969 @, +@ Patches/../C_code.c:9607: &gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(gStatScreen.unit)); movs r0, r5 @, _1 -@ Patches/../C_code.c:9599: if (gStatScreen.unit->statusIndex == UNIT_STATUS_NONE) +@ Patches/../C_code.c:9604: if (gStatScreen.unit->statusIndex == UNIT_STATUS_NONE) cmp r3, #0 @ _3, - beq .L3976 @, -@ Patches/../C_code.c:9607: &gStatScreen.text[STATSCREEN_TEXT_STATUS], 22, blue, GetUnitStatusName(gStatScreen.unit)); - ldr r3, .L3978+4 @ tmp147, + beq .L3979 @, +@ Patches/../C_code.c:9612: &gStatScreen.text[STATSCREEN_TEXT_STATUS], 22, blue, GetUnitStatusName(gStatScreen.unit)); + ldr r3, .L3981+4 @ tmp147, bl .L14 @ movs r3, r0 @ _5, tmp214 -@ Patches/../C_code.c:9606: Text_InsertDrawString( +@ Patches/../C_code.c:9611: Text_InsertDrawString( movs r0, r4 @ tmp148, tmp210 movs r2, #2 @, movs r1, #22 @, - ldr r5, .L3978+8 @ tmp149, + ldr r5, .L3981+8 @ tmp149, adds r0, r0, #136 @ tmp148, - bl .L608 @ -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) + bl .L611 @ +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) movs r3, #48 @ tmp151, -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) ldr r2, [r4, #12] @ _6, gStatScreen.unit -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) ldrb r2, [r2, r3] @ *_6, *_6 -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) lsls r3, r2, #28 @ tmp217, *_6, - bne .L3977 @, -.L3965: -@ Patches/../C_code.c:9634: } + bne .L3980 @, +.L3968: +@ Patches/../C_code.c:9639: } add sp, sp, #76 @,, @ sp needed @ pop {r6, r7} @@ -30459,92 +30490,92 @@ DrawStatus: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L3976: -@ Patches/../C_code.c:9602: &gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(gStatScreen.unit)); - ldr r3, .L3978+4 @ tmp144, +.L3979: +@ Patches/../C_code.c:9607: &gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(gStatScreen.unit)); + ldr r3, .L3981+4 @ tmp144, bl .L14 @ movs r3, r0 @ _4, tmp213 -@ Patches/../C_code.c:9601: Text_InsertDrawString( +@ Patches/../C_code.c:9606: Text_InsertDrawString( movs r0, r4 @ tmp145, tmp210 movs r2, #2 @, movs r1, #24 @, - ldr r5, .L3978+8 @ tmp146, + ldr r5, .L3981+8 @ tmp146, adds r0, r0, #136 @ tmp145, - bl .L608 @ -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) + bl .L611 @ +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) movs r3, #48 @ tmp151, -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) ldr r2, [r4, #12] @ _6, gStatScreen.unit -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) ldrb r2, [r2, r3] @ *_6, *_6 -@ Patches/../C_code.c:9612: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) +@ Patches/../C_code.c:9617: if (gStatScreen.unit->statusIndex != UNIT_STATUS_NONE) lsls r3, r2, #28 @ tmp217, *_6, - beq .L3965 @, -.L3977: -@ Patches/../C_code.c:9614: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); + beq .L3968 @, +.L3980: +@ Patches/../C_code.c:9619: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); mov r3, r9 @ y, y lsls r0, r3, #5 @ tmp170, y, add r0, r0, r8 @ tmp171, x -@ Patches/../C_code.c:9614: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); - ldr r3, .L3978+12 @ tmp174, -@ Patches/../C_code.c:9614: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); +@ Patches/../C_code.c:9619: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); + ldr r3, .L3981+12 @ tmp174, +@ Patches/../C_code.c:9619: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); lsls r0, r0, #1 @ tmp172, tmp171, -@ Patches/../C_code.c:9614: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); +@ Patches/../C_code.c:9619: PutNumberSmall(gUiTmScratchA + TILEMAP_INDEX(x, y), 0, gStatScreen.unit->statusDuration); adds r0, r0, r3 @ tmp173, tmp172, tmp174 movs r1, #0 @, - ldr r3, .L3978+16 @ tmp175, + ldr r3, .L3981+16 @ tmp175, lsrs r2, r2, #4 @ tmp168, *_6, bl .L14 @ - b .L3965 @ -.L3966: -@ Patches/../C_code.c:9621: struct Unit tmp = *gStatScreen.unit; + b .L3968 @ +.L3969: +@ Patches/../C_code.c:9626: struct Unit tmp = *gStatScreen.unit; movs r2, #72 @, - ldr r3, .L3978+20 @ tmp180, + ldr r3, .L3981+20 @ tmp180, movs r1, r5 @, _1 mov r0, sp @, bl .L14 @ -@ Patches/../C_code.c:9623: tmp.statusIndex = 0; +@ Patches/../C_code.c:9628: tmp.statusIndex = 0; mov r3, sp @ tmp222, mov r2, sp @ tmp223, ldrb r3, [r3, r6] @ tmp.statusIndex, tmp.statusIndex bics r3, r7 @ tmp189, tmp138 strb r3, [r2, r6] @ tmp189, tmp.statusIndex -@ Patches/../C_code.c:9625: if (gStatScreen.unit->statusIndex == UNIT_STATUS_NONE) +@ Patches/../C_code.c:9630: if (gStatScreen.unit->statusIndex == UNIT_STATUS_NONE) ldrb r3, [r5, r6] @ *_1, *_1 -@ Patches/../C_code.c:9627: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(&tmp)); +@ Patches/../C_code.c:9632: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(&tmp)); mov r0, sp @, -@ Patches/../C_code.c:9625: if (gStatScreen.unit->statusIndex == UNIT_STATUS_NONE) +@ Patches/../C_code.c:9630: if (gStatScreen.unit->statusIndex == UNIT_STATUS_NONE) tst r7, r3 @ tmp138, *_1 - bne .L3970 @, -@ Patches/../C_code.c:9627: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(&tmp)); - ldr r3, .L3978+4 @ tmp203, + bne .L3973 @, +@ Patches/../C_code.c:9632: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(&tmp)); + ldr r3, .L3981+4 @ tmp203, bl .L14 @ movs r3, r0 @ _18, tmp215 -@ Patches/../C_code.c:9627: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(&tmp)); +@ Patches/../C_code.c:9632: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 24, blue, GetUnitStatusName(&tmp)); movs r0, r4 @ tmp210, tmp210 movs r2, #2 @, movs r1, #24 @, - ldr r4, .L3978+8 @ tmp205, + ldr r4, .L3981+8 @ tmp205, adds r0, r0, #136 @ tmp210, - bl .L269 @ - b .L3965 @ -.L3970: -@ Patches/../C_code.c:9631: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 22, blue, GetUnitStatusName(&tmp)); - ldr r3, .L3978+4 @ tmp207, + bl .L272 @ + b .L3968 @ +.L3973: +@ Patches/../C_code.c:9636: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 22, blue, GetUnitStatusName(&tmp)); + ldr r3, .L3981+4 @ tmp207, bl .L14 @ movs r3, r0 @ _19, tmp216 -@ Patches/../C_code.c:9631: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 22, blue, GetUnitStatusName(&tmp)); +@ Patches/../C_code.c:9636: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_STATUS], 22, blue, GetUnitStatusName(&tmp)); movs r0, r4 @ tmp210, tmp210 movs r2, #2 @, movs r1, #22 @, - ldr r4, .L3978+8 @ tmp209, + ldr r4, .L3981+8 @ tmp209, adds r0, r0, #136 @ tmp210, - bl .L269 @ -@ Patches/../C_code.c:9634: } - b .L3965 @ -.L3979: + bl .L272 @ +@ Patches/../C_code.c:9639: } + b .L3968 @ +.L3982: .align 2 -.L3978: +.L3981: .word gStatScreen .word GetUnitStatusName .word Text_InsertDrawString @@ -30564,14 +30595,14 @@ GetUnitUnadjustedPow: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9638: return unit->pow; +@ Patches/../C_code.c:9643: return unit->pow; ldrb r0, [r0, #20] @ tmp117, -@ Patches/../C_code.c:9639: } +@ Patches/../C_code.c:9644: } @ sp needed @ -@ Patches/../C_code.c:9638: return unit->pow; +@ Patches/../C_code.c:9643: return unit->pow; lsls r0, r0, #24 @ tmp117, tmp117, asrs r0, r0, #24 @ tmp117, tmp117, -@ Patches/../C_code.c:9639: } +@ Patches/../C_code.c:9644: } bx lr .size GetUnitUnadjustedPow, .-GetUnitUnadjustedPow .align 1 @@ -30586,14 +30617,14 @@ GetUnitUnadjustedSkl: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9642: return unit->skl; +@ Patches/../C_code.c:9647: return unit->skl; ldrb r0, [r0, #21] @ tmp117, -@ Patches/../C_code.c:9643: } +@ Patches/../C_code.c:9648: } @ sp needed @ -@ Patches/../C_code.c:9642: return unit->skl; +@ Patches/../C_code.c:9647: return unit->skl; lsls r0, r0, #24 @ tmp117, tmp117, asrs r0, r0, #24 @ tmp117, tmp117, -@ Patches/../C_code.c:9643: } +@ Patches/../C_code.c:9648: } bx lr .size GetUnitUnadjustedSkl, .-GetUnitUnadjustedSkl .align 1 @@ -30608,14 +30639,14 @@ GetUnitUnadjustedSpd: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9646: return unit->spd; +@ Patches/../C_code.c:9651: return unit->spd; ldrb r0, [r0, #22] @ tmp117, -@ Patches/../C_code.c:9647: } +@ Patches/../C_code.c:9652: } @ sp needed @ -@ Patches/../C_code.c:9646: return unit->spd; +@ Patches/../C_code.c:9651: return unit->spd; lsls r0, r0, #24 @ tmp117, tmp117, asrs r0, r0, #24 @ tmp117, tmp117, -@ Patches/../C_code.c:9647: } +@ Patches/../C_code.c:9652: } bx lr .size GetUnitUnadjustedSpd, .-GetUnitUnadjustedSpd .align 1 @@ -30630,14 +30661,14 @@ GetUnitUnadjustedLck: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9650: return unit->lck; +@ Patches/../C_code.c:9655: return unit->lck; ldrb r0, [r0, #25] @ tmp117, -@ Patches/../C_code.c:9651: } +@ Patches/../C_code.c:9656: } @ sp needed @ -@ Patches/../C_code.c:9650: return unit->lck; +@ Patches/../C_code.c:9655: return unit->lck; lsls r0, r0, #24 @ tmp117, tmp117, asrs r0, r0, #24 @ tmp117, tmp117, -@ Patches/../C_code.c:9651: } +@ Patches/../C_code.c:9656: } bx lr .size GetUnitUnadjustedLck, .-GetUnitUnadjustedLck .align 1 @@ -30652,14 +30683,14 @@ GetUnitUnadjustedDef: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9654: return unit->def; +@ Patches/../C_code.c:9659: return unit->def; ldrb r0, [r0, #23] @ tmp117, -@ Patches/../C_code.c:9655: } +@ Patches/../C_code.c:9660: } @ sp needed @ -@ Patches/../C_code.c:9654: return unit->def; +@ Patches/../C_code.c:9659: return unit->def; lsls r0, r0, #24 @ tmp117, tmp117, asrs r0, r0, #24 @ tmp117, tmp117, -@ Patches/../C_code.c:9655: } +@ Patches/../C_code.c:9660: } bx lr .size GetUnitUnadjustedDef, .-GetUnitUnadjustedDef .align 1 @@ -30674,14 +30705,14 @@ GetUnitUnadjustedRes: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9658: return unit->res; +@ Patches/../C_code.c:9663: return unit->res; ldrb r0, [r0, #24] @ tmp117, -@ Patches/../C_code.c:9659: } +@ Patches/../C_code.c:9664: } @ sp needed @ -@ Patches/../C_code.c:9658: return unit->res; +@ Patches/../C_code.c:9663: return unit->res; lsls r0, r0, #24 @ tmp117, tmp117, asrs r0, r0, #24 @ tmp117, tmp117, -@ Patches/../C_code.c:9659: } +@ Patches/../C_code.c:9664: } bx lr .size GetUnitUnadjustedRes, .-GetUnitUnadjustedRes .align 1 @@ -30713,14 +30744,14 @@ GetUnitUnadjustedMov: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9667: return UNIT_MOV_BASE(unit); +@ Patches/../C_code.c:9672: return UNIT_MOV_BASE(unit); ldr r3, [r0, #4] @ unit_4(D)->pClassData, unit_4(D)->pClassData -@ Patches/../C_code.c:9668: } +@ Patches/../C_code.c:9673: } @ sp needed @ -@ Patches/../C_code.c:9667: return UNIT_MOV_BASE(unit); +@ Patches/../C_code.c:9672: return UNIT_MOV_BASE(unit); movs r0, #18 @ tmp118, ldrsb r0, [r3, r0] @ tmp118, -@ Patches/../C_code.c:9668: } +@ Patches/../C_code.c:9673: } bx lr .size GetUnitUnadjustedMov, .-GetUnitUnadjustedMov .align 1 @@ -30735,7 +30766,7 @@ GetUnitMaxMov: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9672: } +@ Patches/../C_code.c:9677: } movs r0, #15 @, @ sp needed @ bx lr @@ -30752,11 +30783,11 @@ GetUnitUnadjustedCon: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9675: return UNIT_CON_BASE(unit); +@ Patches/../C_code.c:9680: return UNIT_CON_BASE(unit); ldr r3, [r0, #4] @ unit_8(D)->pClassData, unit_8(D)->pClassData -@ Patches/../C_code.c:9676: } +@ Patches/../C_code.c:9681: } @ sp needed @ -@ Patches/../C_code.c:9675: return UNIT_CON_BASE(unit); +@ Patches/../C_code.c:9680: return UNIT_CON_BASE(unit); ldr r2, [r0] @ unit_8(D)->pCharacterData, unit_8(D)->pCharacterData movs r0, #19 @ tmp126, ldrb r3, [r3, #17] @ tmp124, @@ -30764,7 +30795,7 @@ GetUnitUnadjustedCon: lsls r3, r3, #24 @ tmp124, tmp124, asrs r3, r3, #24 @ tmp124, tmp124, adds r0, r3, r0 @ tmp122, tmp124, tmp126 -@ Patches/../C_code.c:9676: } +@ Patches/../C_code.c:9681: } bx lr .size GetUnitUnadjustedCon, .-GetUnitUnadjustedCon .align 1 @@ -30779,52 +30810,52 @@ GetUnitMaxCon: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:9679: return UNIT_CON_MAX(unit); +@ Patches/../C_code.c:9684: return UNIT_CON_MAX(unit); ldr r3, [r0, #4] @ unit_4(D)->pClassData, unit_4(D)->pClassData -@ Patches/../C_code.c:9680: } +@ Patches/../C_code.c:9685: } @ sp needed @ -@ Patches/../C_code.c:9679: return UNIT_CON_MAX(unit); +@ Patches/../C_code.c:9684: return UNIT_CON_MAX(unit); movs r0, #25 @ tmp118, ldrsb r0, [r3, r0] @ tmp118, -@ Patches/../C_code.c:9680: } +@ Patches/../C_code.c:9685: } bx lr .size GetUnitMaxCon, .-GetUnitMaxCon .section .rodata.str1.4 .align 2 -.LC760: +.LC761: .ascii "Mov\000" .align 2 -.LC764: +.LC765: .ascii "HP\000" .align 2 -.LC768: +.LC769: .ascii "Con\000" .align 2 -.LC774: +.LC775: .ascii "Aid\000" .align 2 -.LC780: +.LC781: .ascii "Trv\000" .align 2 -.LC785: +.LC786: .ascii "Affin\000" .align 2 -.LC789: +.LC790: .ascii "Cond\000" .align 2 -.LC793: +.LC794: .ascii "Talk\000" .align 2 -.LC801: +.LC802: .ascii "Skills\000" .align 2 -.LC807: +.LC808: .ascii "Pow\000" .align 2 -.LC810: +.LC811: .ascii "Skl\000" .align 2 -.LC814: +.LC815: .ascii "Lck\000" .text .align 1 @@ -30845,37 +30876,40 @@ DrawStatByID: mov lr, fp @, push {r5, r6, r7, lr} @ sub sp, sp, #20 @,, -@ Patches/../C_code.c:9698: { +@ Patches/../C_code.c:9703: { str r3, [sp, #8] @ tmp801, %sfp -@ Patches/../C_code.c:9699: if (gStatScreenFunction[id].specialCase) - ldr r3, .L4062 @ tmp790, +@ Patches/../C_code.c:9704: if (gStatScreenFunction[id].specialCase) + ldr r3, .L4065 @ tmp790, mov r10, r3 @ tmp790, tmp790 -@ Patches/../C_code.c:9698: { +@ Patches/../C_code.c:9703: { movs r6, r2 @ y, tmp800 -@ Patches/../C_code.c:9699: if (gStatScreenFunction[id].specialCase) +@ Patches/../C_code.c:9704: if (gStatScreenFunction[id].specialCase) mov r2, r10 @ tmp790, tmp790 ldr r3, [sp, #60] @ tmp880, id lsls r4, r3, #2 @ tmp789, tmp880, adds r3, r4, r3 @ tmp349, tmp789, tmp881 lsls r3, r3, #2 @ tmp350, tmp349, ldr r3, [r2, r3] @ _1, gStatScreenFunction[id_264(D)].specialCase -@ Patches/../C_code.c:9698: { +@ Patches/../C_code.c:9703: { mov r9, r0 @ barID, tmp798 movs r5, r1 @ x, tmp799 -@ Patches/../C_code.c:9699: if (gStatScreenFunction[id].specialCase) +@ Patches/../C_code.c:9704: if (gStatScreenFunction[id].specialCase) cmp r3, #0 @ _1, - beq .L3992 @, -@ Patches/../C_code.c:9701: switch (gStatScreenFunction[id].specialCase) + beq .L3995 @, +@ Patches/../C_code.c:9706: switch (gStatScreenFunction[id].specialCase) cmp r3, #17 @ _1, - bhi .L3992 @, - ldr r2, .L4062+4 @ tmp353, + bhi .L3995 @, + ldr r2, .L4065+4 @ tmp353, lsls r3, r3, #2 @ tmp351, _1, ldr r3, [r2, r3] @ tmp354, mov pc, r3 @ tmp354 .section .rodata .align 2 -.L3994: - .word .L3992 +.L3997: + .word .L3995 + .word .L4013 + .word .L4012 + .word .L4011 .word .L4010 .word .L4009 .word .L4008 @@ -30889,55 +30923,52 @@ DrawStatByID: .word .L4000 .word .L3999 .word .L3998 - .word .L3997 .word .L3996 - .word .L3995 - .word .L3993 .text -.L3993: -@ Patches/../C_code.c:9982: gStatScreen.text + STATSCREEN_TEXT_UNUSUED, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +.L3996: +@ Patches/../C_code.c:9987: gStatScreen.text + STATSCREEN_TEXT_UNUSUED, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r3, r6, #5 @ tmp733, y, subs r1, r1, #4 @ tmp734, adds r1, r3, r1 @ tmp735, tmp733, tmp734 -@ Patches/../C_code.c:9981: PutDrawText( - ldr r3, .L4062+8 @ tmp738, -@ Patches/../C_code.c:9982: gStatScreen.text + STATSCREEN_TEXT_UNUSUED, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9986: PutDrawText( + ldr r3, .L4065+8 @ tmp738, +@ Patches/../C_code.c:9987: gStatScreen.text + STATSCREEN_TEXT_UNUSUED, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp736, tmp735, -@ Patches/../C_code.c:9981: PutDrawText( +@ Patches/../C_code.c:9986: PutDrawText( adds r1, r1, r3 @ tmp737, tmp736, tmp738 - ldr r0, .L4062+12 @ tmp739, - ldr r3, .L4062+16 @ tmp740, -.L4057: + ldr r0, .L4065+12 @ tmp739, + ldr r3, .L4065+16 @ tmp740, +.L4060: str r3, [sp, #4] @ tmp740, movs r3, #0 @ tmp741, movs r2, #3 @, str r3, [sp] @ tmp741, - ldr r7, .L4062+20 @ tmp742, + ldr r7, .L4065+20 @ tmp742, bl .L62 @ -.L3992: -@ Patches/../C_code.c:9991: if (gStatScreenFunction[id].GetUnitUnadjustedStat) +.L3995: +@ Patches/../C_code.c:9996: if (gStatScreenFunction[id].GetUnitUnadjustedStat) ldr r3, [sp, #60] @ tmp923, id mov ip, r3 @ tmp923, tmp923 add r4, r4, ip @ tmp788, tmp923 lsls r4, r4, #2 @ tmp747, tmp788, add r4, r4, r10 @ tmp748, tmp790 ldr r3, [r4, #4] @ _232, gStatScreenFunction[id_264(D)].GetUnitUnadjustedStat -@ Patches/../C_code.c:9991: if (gStatScreenFunction[id].GetUnitUnadjustedStat) +@ Patches/../C_code.c:9996: if (gStatScreenFunction[id].GetUnitUnadjustedStat) cmp r3, #0 @ _232, - beq .L4016 @, -@ Patches/../C_code.c:9993: if (disp == 1) + beq .L4019 @, +@ Patches/../C_code.c:9998: if (disp == 1) ldr r2, [sp, #8] @ disp, %sfp cmp r2, #1 @ disp, - beq .L4058 @, -@ Patches/../C_code.c:9999: if (disp == 0) + beq .L4061 @, +@ Patches/../C_code.c:10004: if (disp == 0) ldr r3, [sp, #8] @ disp, %sfp cmp r3, #0 @ disp, - bne .L4012 @, -@ Patches/../C_code.c:10001: DrawGrowthWithDifference( - ldr r3, .L4062+24 @ tmp766, + bne .L4015 @, +@ Patches/../C_code.c:10006: DrawGrowthWithDifference( + ldr r3, .L4065+24 @ tmp766, mov r8, r3 @ tmp766, tmp766 ldr r0, [r3, #12] @ gStatScreen.unit, gStatScreen.unit -.L4052: +.L4055: movs r1, #0 @, ldr r3, [r4, #16] @ gStatScreenFunction[id_264(D)].GetUnitGrowth, gStatScreenFunction[id_264(D)].GetUnitGrowth bl .L14 @ @@ -30947,22 +30978,22 @@ DrawStatByID: ldr r0, [r3, #12] @ gStatScreen.unit, gStatScreen.unit ldr r3, [r4, #16] @ gStatScreenFunction[id_264(D)].GetUnitGrowth, gStatScreenFunction[id_264(D)].GetUnitGrowth bl .L14 @ -@ Patches/../C_code.c:10001: DrawGrowthWithDifference( +@ Patches/../C_code.c:10006: DrawGrowthWithDifference( movs r2, r7 @, _241 -@ Patches/../C_code.c:10001: DrawGrowthWithDifference( +@ Patches/../C_code.c:10006: DrawGrowthWithDifference( movs r3, r0 @ _244, tmp824 -@ Patches/../C_code.c:10001: DrawGrowthWithDifference( +@ Patches/../C_code.c:10006: DrawGrowthWithDifference( movs r1, r6 @, y -@ Patches/../C_code.c:10001: DrawGrowthWithDifference( +@ Patches/../C_code.c:10006: DrawGrowthWithDifference( subs r0, r5, #1 @ tmp786, x, -@ Patches/../C_code.c:10001: DrawGrowthWithDifference( +@ Patches/../C_code.c:10006: DrawGrowthWithDifference( bl DrawGrowthWithDifference @ -.L4012: -@ Patches/../C_code.c:9723: return 1; +.L4015: +@ Patches/../C_code.c:9728: return 1; movs r0, #1 @ , - b .L3991 @ -.L4058: -@ Patches/../C_code.c:9995: NewDrawStatWithBar( + b .L3994 @ +.L4061: +@ Patches/../C_code.c:10000: NewDrawStatWithBar( ldr r0, [sp, #56] @, unit bl .L14 @ ldr r3, [r4, #8] @ gStatScreenFunction[id_264(D)].GetUnitStat, gStatScreenFunction[id_264(D)].GetUnitStat @@ -30973,7 +31004,7 @@ DrawStatByID: ldr r3, [r4, #12] @ gStatScreenFunction[id_264(D)].GetUnitMaxStat, gStatScreenFunction[id_264(D)].GetUnitMaxStat ldr r0, [sp, #56] @, unit bl .L14 @ -@ Patches/../C_code.c:9995: NewDrawStatWithBar( +@ Patches/../C_code.c:10000: NewDrawStatWithBar( mov r3, r8 @ _235, _235 str r0, [sp, #4] @ tmp822, str r3, [sp] @ _235, @@ -30982,84 +31013,84 @@ DrawStatByID: movs r2, r6 @, y movs r1, r5 @, x bl NewDrawStatWithBar @ -@ Patches/../C_code.c:9723: return 1; +@ Patches/../C_code.c:9728: return 1; movs r0, #1 @ , - b .L3991 @ -.L4004: -@ Patches/../C_code.c:9786: ClearText(gStatScreen.text + STATSCREEN_TEXT_ITEM0); // clear wep1 text here - ldr r4, .L4062+28 @ tmp540, - ldr r3, .L4062+32 @ tmp541, + b .L3994 @ +.L4007: +@ Patches/../C_code.c:9791: ClearText(gStatScreen.text + STATSCREEN_TEXT_ITEM0); // clear wep1 text here + ldr r4, .L4065+28 @ tmp540, + ldr r3, .L4065+32 @ tmp541, movs r0, r4 @, tmp540 bl .L14 @ -@ Patches/../C_code.c:9788: int talk_uid = _GetTalkee(unit->pCharacterData->number); +@ Patches/../C_code.c:9793: int talk_uid = _GetTalkee(unit->pCharacterData->number); ldr r3, [sp, #56] @ tmp896, unit ldr r3, [r3] @ unit_282(D)->pCharacterData, unit_282(D)->pCharacterData -@ Patches/../C_code.c:9788: int talk_uid = _GetTalkee(unit->pCharacterData->number); +@ Patches/../C_code.c:9793: int talk_uid = _GetTalkee(unit->pCharacterData->number); ldrb r0, [r3, #4] @ tmp543, bl _GetTalkee @ -@ Patches/../C_code.c:9708: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, +@ Patches/../C_code.c:9713: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, subs r5, r5, #4 @ tmp545, lsls r1, r6, #5 @ tmp544, y, -@ Patches/../C_code.c:9791: PutDrawText( - ldr r3, .L4062+8 @ tmp548, -@ Patches/../C_code.c:9792: gStatScreen.text + STATSCREEN_TEXT_ITEM0, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9796: PutDrawText( + ldr r3, .L4065+8 @ tmp548, +@ Patches/../C_code.c:9797: gStatScreen.text + STATSCREEN_TEXT_ITEM0, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, adds r1, r1, r5 @ tmp546, tmp544, tmp545 -@ Patches/../C_code.c:9792: gStatScreen.text + STATSCREEN_TEXT_ITEM0, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9797: gStatScreen.text + STATSCREEN_TEXT_ITEM0, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp547, tmp546, -@ Patches/../C_code.c:9788: int talk_uid = _GetTalkee(unit->pCharacterData->number); +@ Patches/../C_code.c:9793: int talk_uid = _GetTalkee(unit->pCharacterData->number); movs r7, r0 @ talk_uid, tmp814 -@ Patches/../C_code.c:9791: PutDrawText( +@ Patches/../C_code.c:9796: PutDrawText( adds r1, r1, r3 @ _374, tmp547, tmp548 -@ Patches/../C_code.c:9789: if (talk_uid) +@ Patches/../C_code.c:9794: if (talk_uid) cmp r0, #0 @ talk_uid, - bne .LCB25662 @ - b .L4018 @long jump @ -.LCB25662: -@ Patches/../C_code.c:9791: PutDrawText( - ldr r3, .L4062+36 @ tmp550, + bne .LCB25686 @ + b .L4021 @long jump @ +.LCB25686: +@ Patches/../C_code.c:9796: PutDrawText( + ldr r3, .L4065+36 @ tmp550, str r3, [sp, #4] @ tmp550, movs r3, #0 @ tmp551, movs r2, #3 @, movs r0, r4 @, tmp540 str r3, [sp] @ tmp551, - ldr r5, .L4062+20 @ tmp552, - bl .L608 @ -@ Patches/../C_code.c:9794: talk_uid = GetCharacterData(talk_uid)->nameTextId; - ldr r3, .L4062+40 @ tmp553, + ldr r5, .L4065+20 @ tmp552, + bl .L611 @ +@ Patches/../C_code.c:9799: talk_uid = GetCharacterData(talk_uid)->nameTextId; + ldr r3, .L4065+40 @ tmp553, movs r0, r7 @, talk_uid bl .L14 @ -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r2, .L4062+44 @ tmp554, -@ Patches/../C_code.c:9794: talk_uid = GetCharacterData(talk_uid)->nameTextId; +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r2, .L4065+44 @ tmp554, +@ Patches/../C_code.c:9799: talk_uid = GetCharacterData(talk_uid)->nameTextId; ldrh r3, [r0] @ _105, *_104 -@ Patches/../C_code.c:9794: talk_uid = GetCharacterData(talk_uid)->nameTextId; +@ Patches/../C_code.c:9799: talk_uid = GetCharacterData(talk_uid)->nameTextId; str r3, [r2] @ _105, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r2, .L4062+48 @ tmp557, - ldr r5, .L4062+52 @ tmp555, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r2, .L4065+48 @ tmp557, + ldr r5, .L4065+52 @ tmp555, ldr r2, [r2] @ ggMsgStringTable, ggMsgStringTable lsls r3, r3, #2 @ tmp558, _105, ldr r0, [r3, r2] @ *_350, *_350 movs r1, r5 @, tmp555 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); - ldr r3, .L4062+56 @ tmp561, +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); + ldr r3, .L4065+56 @ tmp561, movs r0, r5 @, tmp555 bl .L14 @ -@ Patches/../C_code.c:9795: Text_InsertDrawString( +@ Patches/../C_code.c:9800: Text_InsertDrawString( movs r3, r5 @, tmp555 -.L4055: -@ Patches/../C_code.c:9757: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_RESCUENAME], 24, blue, GetUnitRescueName(unit)); +.L4058: +@ Patches/../C_code.c:9762: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_RESCUENAME], 24, blue, GetUnitRescueName(unit)); movs r0, r4 @, tmp498 movs r2, #2 @, movs r1, #24 @, - ldr r4, .L4062+60 @ tmp504, - bl .L269 @ -.L4016: -@ Patches/../C_code.c:9749: return 0; + ldr r4, .L4065+60 @ tmp504, + bl .L272 @ +.L4019: +@ Patches/../C_code.c:9754: return 0; movs r0, #0 @ , -.L3991: -@ Patches/../C_code.c:10008: } +.L3994: +@ Patches/../C_code.c:10013: } add sp, sp, #20 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -31070,476 +31101,476 @@ DrawStatByID: pop {r4, r5, r6, r7} pop {r1} bx r1 -.L4003: -@ Patches/../C_code.c:9814: gStatScreen.text + STATSCREEN_TEXT_BWL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +.L4006: +@ Patches/../C_code.c:9819: gStatScreen.text + STATSCREEN_TEXT_BWL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r6, #5 @ tmp572, y, subs r5, r5, #4 @ tmp573, -@ Patches/../C_code.c:9813: PutDrawText( - ldr r3, .L4062+8 @ tmp577, -@ Patches/../C_code.c:9814: gStatScreen.text + STATSCREEN_TEXT_BWL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9818: PutDrawText( + ldr r3, .L4065+8 @ tmp577, +@ Patches/../C_code.c:9819: gStatScreen.text + STATSCREEN_TEXT_BWL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, adds r1, r1, r5 @ tmp574, tmp572, tmp573 -@ Patches/../C_code.c:9814: gStatScreen.text + STATSCREEN_TEXT_BWL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9819: gStatScreen.text + STATSCREEN_TEXT_BWL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp575, tmp574, -@ Patches/../C_code.c:9813: PutDrawText( +@ Patches/../C_code.c:9818: PutDrawText( adds r1, r1, r3 @ tmp576, tmp575, tmp577 - ldr r3, .L4062+64 @ tmp579, + ldr r3, .L4065+64 @ tmp579, str r3, [sp, #4] @ tmp579, movs r3, #0 @ tmp580, movs r2, #3 @, - ldr r0, .L4062+68 @ tmp578, + ldr r0, .L4065+68 @ tmp578, str r3, [sp] @ tmp580, - ldr r4, .L4062+20 @ tmp581, - bl .L269 @ -@ Patches/../C_code.c:9816: return 0; - b .L4016 @ -.L4010: -@ Patches/../C_code.c:9705: if (disp == 1) + ldr r4, .L4065+20 @ tmp581, + bl .L272 @ +@ Patches/../C_code.c:9821: return 0; + b .L4019 @ +.L4013: +@ Patches/../C_code.c:9710: if (disp == 1) ldr r3, [sp, #8] @ disp, %sfp cmp r3, #1 @ disp, - bne .LCB25738 @ - b .L4059 @long jump @ -.LCB25738: -@ Patches/../C_code.c:9714: if (disp == 0) + bne .LCB25762 @ + b .L4062 @long jump @ +.LCB25762: +@ Patches/../C_code.c:9719: if (disp == 0) ldr r2, [sp, #8] @ disp, %sfp cmp r2, #0 @ disp, - beq .LCB25741 @ - b .L4012 @long jump @ -.LCB25741: -@ Patches/../C_code.c:9717: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, + beq .LCB25765 @ + b .L4015 @long jump @ +.LCB25765: +@ Patches/../C_code.c:9722: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, subs r3, r5, #4 @ tmp391, x, lsls r1, r6, #5 @ tmp390, y, adds r1, r1, r3 @ tmp392, tmp390, tmp391 -@ Patches/../C_code.c:9716: PutDrawText( - ldr r3, .L4062+8 @ tmp395, -@ Patches/../C_code.c:9717: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, +@ Patches/../C_code.c:9721: PutDrawText( + ldr r3, .L4065+8 @ tmp395, +@ Patches/../C_code.c:9722: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, lsls r1, r1, #1 @ tmp393, tmp392, -@ Patches/../C_code.c:9716: PutDrawText( +@ Patches/../C_code.c:9721: PutDrawText( adds r1, r1, r3 @ tmp394, tmp393, tmp395 - ldr r3, .L4062+72 @ tmp397, - ldr r0, .L4062+76 @ tmp396, + ldr r3, .L4065+72 @ tmp397, + ldr r0, .L4065+76 @ tmp396, str r3, [sp, #4] @ tmp397, str r2, [sp] @ disp, movs r3, #0 @, - ldr r7, .L4062+20 @ tmp399, + ldr r7, .L4065+20 @ tmp399, adds r2, r2, #3 @, mov fp, r0 @ tmp396, tmp396 bl .L62 @ -@ Patches/../C_code.c:9719: DrawGrowthWithDifference( +@ Patches/../C_code.c:9724: DrawGrowthWithDifference( movs r3, #96 @ tmp400, rsbs r3, r3, #0 @ tmp400, tmp400 mov r8, r3 @ tmp400, tmp400 add r8, r8, fp @ tmp400, tmp396 mov r3, r8 @ tmp400, tmp400 ldr r0, [r3, #12] @ gStatScreen.unit, gStatScreen.unit -@ Patches/../C_code.c:9720: x - 1, y, gStatScreenFunction[id].GetUnitGrowth(gStatScreen.unit, false), +@ Patches/../C_code.c:9725: x - 1, y, gStatScreenFunction[id].GetUnitGrowth(gStatScreen.unit, false), ldr r3, [sp, #60] @ tmp889, id mov ip, r3 @ tmp889, tmp889 add r4, r4, ip @ tmp405, tmp889 lsls r4, r4, #2 @ tmp406, tmp405, add r4, r4, r10 @ tmp407, tmp790 - b .L4052 @ -.L4001: -@ Patches/../C_code.c:9844: u8 * skillID = CallSkill_Getter(unit); - ldr r3, .L4062+80 @ tmp598, + b .L4055 @ +.L4004: +@ Patches/../C_code.c:9849: u8 * skillID = CallSkill_Getter(unit); + ldr r3, .L4065+80 @ tmp598, ldr r0, [sp, #56] @, unit bl .L14 @ -@ Patches/../C_code.c:9860: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9865: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); lsls r6, r6, #5 @ tmp600, y, subs r5, r5, #13 @ tmp599, - ldr r3, .L4062+8 @ tmp603, + ldr r3, .L4065+8 @ tmp603, adds r5, r5, r6 @ tmp601, tmp599, tmp600 lsls r5, r5, #1 @ tmp602, tmp601, - adds r5, r5, r3 @ ivtmp.2184, tmp602, tmp603 -@ Patches/../C_code.c:9860: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); - ldr r3, .L4062+84 @ tmp797, -@ Patches/../C_code.c:9844: u8 * skillID = CallSkill_Getter(unit); + adds r5, r5, r3 @ ivtmp.2189, tmp602, tmp603 +@ Patches/../C_code.c:9865: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); + ldr r3, .L4065+84 @ tmp797, +@ Patches/../C_code.c:9849: u8 * skillID = CallSkill_Getter(unit); movs r7, r0 @ skillID, tmp818 -@ Patches/../C_code.c:9845: for (int i = 0; i < 6; ++i) +@ Patches/../C_code.c:9850: for (int i = 0; i < 6; ++i) movs r4, #0 @ i, -@ Patches/../C_code.c:9860: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9865: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); mov r8, r3 @ tmp797, tmp797 -@ Patches/../C_code.c:9854: if (SkillSysInstalled) - ldr r6, .L4062+88 @ tmp795, -.L4028: -@ Patches/../C_code.c:9847: if (!(*skillID)) +@ Patches/../C_code.c:9859: if (SkillSysInstalled) + ldr r6, .L4065+88 @ tmp795, +.L4031: +@ Patches/../C_code.c:9852: if (!(*skillID)) ldrb r3, [r7, r4] @ _144, MEM[(u8 *)skillID_284 + _478 * 1] -@ Patches/../C_code.c:9847: if (!(*skillID)) +@ Patches/../C_code.c:9852: if (!(*skillID)) cmp r3, #0 @ _144, - beq .L4016 @, -.L4061: -@ Patches/../C_code.c:9852: if (i > 2) + beq .L4019 @, +.L4064: +@ Patches/../C_code.c:9857: if (i > 2) cmp r4, #2 @ i, - bgt .LCB25793 @ - b .L4060 @long jump @ -.LCB25793: -@ Patches/../C_code.c:9854: if (SkillSysInstalled) + bgt .LCB25817 @ + b .L4063 @long jump @ +.LCB25817: +@ Patches/../C_code.c:9859: if (SkillSysInstalled) ldr r2, [r6] @ SkillSysInstalled, SkillSysInstalled cmp r2, #0 @ SkillSysInstalled, - bne .LCB25796 @ - b .L4026 @long jump @ -.LCB25796: -@ Patches/../C_code.c:9856: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), *skillID | 0x100, 0x4000); + bne .LCB25820 @ + b .L4029 @long jump @ +.LCB25820: +@ Patches/../C_code.c:9861: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), *skillID | 0x100, 0x4000); movs r1, #128 @ tmp608, movs r2, #128 @, lsls r1, r1, #1 @ tmp608, tmp608, orrs r1, r3 @ tmp607, _144 - movs r0, r5 @, ivtmp.2184 - ldr r3, .L4062+84 @ tmp609, + movs r0, r5 @, ivtmp.2189 + ldr r3, .L4065+84 @ tmp609, lsls r2, r2, #7 @,, bl .L14 @ -.L4027: -@ Patches/../C_code.c:9845: for (int i = 0; i < 6; ++i) +.L4030: +@ Patches/../C_code.c:9850: for (int i = 0; i < 6; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:9845: for (int i = 0; i < 6; ++i) +@ Patches/../C_code.c:9850: for (int i = 0; i < 6; ++i) cmp r4, #6 @ i, - beq .L4016 @, -@ Patches/../C_code.c:9847: if (!(*skillID)) + beq .L4019 @, +@ Patches/../C_code.c:9852: if (!(*skillID)) ldrb r3, [r7, r4] @ _144, MEM[(u8 *)skillID_284 + _478 * 1] -@ Patches/../C_code.c:9845: for (int i = 0; i < 6; ++i) - adds r5, r5, #6 @ ivtmp.2184, -@ Patches/../C_code.c:9847: if (!(*skillID)) +@ Patches/../C_code.c:9850: for (int i = 0; i < 6; ++i) + adds r5, r5, #6 @ ivtmp.2189, +@ Patches/../C_code.c:9852: if (!(*skillID)) cmp r3, #0 @ _144, - bne .L4061 @, - b .L4016 @ -.L4002: -@ Patches/../C_code.c:9821: u8 * skillID = CallSkill_Getter(unit); - ldr r3, .L4062+80 @ tmp582, + bne .L4064 @, + b .L4019 @ +.L4005: +@ Patches/../C_code.c:9826: u8 * skillID = CallSkill_Getter(unit); + ldr r3, .L4065+80 @ tmp582, ldr r0, [sp, #56] @, unit bl .L14 @ subs r5, r5, #4 @ tmp583, -@ Patches/../C_code.c:9835: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9840: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); lsls r6, r6, #5 @ tmp584, y, adds r4, r5, r6 @ tmp585, tmp583, tmp584 - ldr r3, .L4062+8 @ tmp587, + ldr r3, .L4065+8 @ tmp587, lsls r4, r4, #1 @ tmp586, tmp585, - adds r4, r4, r3 @ ivtmp.2174, tmp586, tmp587 -@ Patches/../C_code.c:9835: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); - ldr r3, .L4062+84 @ tmp794, -@ Patches/../C_code.c:9821: u8 * skillID = CallSkill_Getter(unit); + adds r4, r4, r3 @ ivtmp.2179, tmp586, tmp587 +@ Patches/../C_code.c:9840: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); + ldr r3, .L4065+84 @ tmp794, +@ Patches/../C_code.c:9826: u8 * skillID = CallSkill_Getter(unit); movs r7, r0 @ skillID, tmp817 -@ Patches/../C_code.c:9822: for (int i = 0; i < 3; ++i) +@ Patches/../C_code.c:9827: for (int i = 0; i < 3; ++i) movs r5, #0 @ i, -@ Patches/../C_code.c:9835: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9840: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); mov r8, r3 @ tmp794, tmp794 -@ Patches/../C_code.c:9829: if (SkillSysInstalled) - ldr r6, .L4062+88 @ tmp792, -.L4022: -@ Patches/../C_code.c:9824: if (!(*skillID)) +@ Patches/../C_code.c:9834: if (SkillSysInstalled) + ldr r6, .L4065+88 @ tmp792, +.L4025: +@ Patches/../C_code.c:9829: if (!(*skillID)) ldrb r3, [r7, r5] @ _120, MEM[(u8 *)skillID_290 + _487 * 1] -@ Patches/../C_code.c:9824: if (!(*skillID)) +@ Patches/../C_code.c:9829: if (!(*skillID)) cmp r3, #0 @ _120, - bne .LCB25836 @ - b .L4016 @long jump @ -.LCB25836: -@ Patches/../C_code.c:9829: if (SkillSysInstalled) + bne .LCB25860 @ + b .L4019 @long jump @ +.LCB25860: +@ Patches/../C_code.c:9834: if (SkillSysInstalled) ldr r2, [r6] @ SkillSysInstalled, SkillSysInstalled cmp r2, #0 @ SkillSysInstalled, - bne .LCB25839 @ - b .L4020 @long jump @ -.LCB25839: -@ Patches/../C_code.c:9831: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), *skillID | 0x100, 0x4000); + bne .LCB25863 @ + b .L4023 @long jump @ +.LCB25863: +@ Patches/../C_code.c:9836: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), *skillID | 0x100, 0x4000); movs r1, #128 @ tmp592, movs r2, #128 @, lsls r1, r1, #1 @ tmp592, tmp592, orrs r1, r3 @ tmp591, _120 - movs r0, r4 @, ivtmp.2174 - ldr r3, .L4062+84 @ tmp593, + movs r0, r4 @, ivtmp.2179 + ldr r3, .L4065+84 @ tmp593, lsls r2, r2, #7 @,, bl .L14 @ -.L4021: -@ Patches/../C_code.c:9822: for (int i = 0; i < 3; ++i) +.L4024: +@ Patches/../C_code.c:9827: for (int i = 0; i < 3; ++i) adds r5, r5, #1 @ i, -@ Patches/../C_code.c:9822: for (int i = 0; i < 3; ++i) - adds r4, r4, #6 @ ivtmp.2174, +@ Patches/../C_code.c:9827: for (int i = 0; i < 3; ++i) + adds r4, r4, #6 @ ivtmp.2179, cmp r5, #3 @ i, - bne .L4022 @, - b .L4016 @ -.L3997: -@ Patches/../C_code.c:9945: gStatScreen.text + STATSCREEN_TEXT_LCKLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, + bne .L4025 @, + b .L4019 @ +.L4000: +@ Patches/../C_code.c:9950: gStatScreen.text + STATSCREEN_TEXT_LCKLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r3, r6, #5 @ tmp685, y, subs r1, r1, #4 @ tmp686, adds r1, r3, r1 @ tmp687, tmp685, tmp686 -@ Patches/../C_code.c:9944: PutDrawText( - ldr r3, .L4062+8 @ tmp690, -@ Patches/../C_code.c:9945: gStatScreen.text + STATSCREEN_TEXT_LCKLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9949: PutDrawText( + ldr r3, .L4065+8 @ tmp690, +@ Patches/../C_code.c:9950: gStatScreen.text + STATSCREEN_TEXT_LCKLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp688, tmp687, -@ Patches/../C_code.c:9944: PutDrawText( +@ Patches/../C_code.c:9949: PutDrawText( adds r1, r1, r3 @ tmp689, tmp688, tmp690 - ldr r0, .L4062+92 @ tmp691, - ldr r3, .L4062+96 @ tmp692, - b .L4057 @ -.L3999: -@ Patches/../C_code.c:9921: gStatScreen.text + STATSCREEN_TEXT_SKLLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, + ldr r0, .L4065+92 @ tmp691, + ldr r3, .L4065+96 @ tmp692, + b .L4060 @ +.L4002: +@ Patches/../C_code.c:9926: gStatScreen.text + STATSCREEN_TEXT_SKLLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r3, r6, #5 @ tmp656, y, subs r1, r1, #4 @ tmp657, adds r1, r3, r1 @ tmp658, tmp656, tmp657 -@ Patches/../C_code.c:9920: PutDrawText( - ldr r3, .L4062+8 @ tmp661, -@ Patches/../C_code.c:9921: gStatScreen.text + STATSCREEN_TEXT_SKLLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9925: PutDrawText( + ldr r3, .L4065+8 @ tmp661, +@ Patches/../C_code.c:9926: gStatScreen.text + STATSCREEN_TEXT_SKLLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp659, tmp658, -@ Patches/../C_code.c:9920: PutDrawText( +@ Patches/../C_code.c:9925: PutDrawText( adds r1, r1, r3 @ tmp660, tmp659, tmp661 - ldr r0, .L4062+100 @ tmp662, - ldr r3, .L4062+104 @ tmp663, - b .L4057 @ -.L4000: -@ Patches/../C_code.c:9708: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, + ldr r0, .L4065+100 @ tmp662, + ldr r3, .L4065+104 @ tmp663, + b .L4060 @ +.L4003: +@ Patches/../C_code.c:9713: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, subs r2, r1, #4 @ tmp615, x, lsls r3, r6, #5 @ tmp614, y, -@ Patches/../C_code.c:9879: &gStatScreen.text[STATSCREEN_TEXT_POWLABEL], gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, +@ Patches/../C_code.c:9884: &gStatScreen.text[STATSCREEN_TEXT_POWLABEL], gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, adds r3, r3, r2 @ tmp616, tmp614, tmp615 -@ Patches/../C_code.c:9878: PutDrawText( - ldr r2, .L4062+8 @ tmp618, -@ Patches/../C_code.c:9879: &gStatScreen.text[STATSCREEN_TEXT_POWLABEL], gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, +@ Patches/../C_code.c:9883: PutDrawText( + ldr r2, .L4065+8 @ tmp618, +@ Patches/../C_code.c:9884: &gStatScreen.text[STATSCREEN_TEXT_POWLABEL], gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, lsls r3, r3, #1 @ tmp617, tmp616, -@ Patches/../C_code.c:9878: PutDrawText( +@ Patches/../C_code.c:9883: PutDrawText( adds r3, r3, r2 @ _401, tmp617, tmp618 movs r7, r3 @ _401, _401 -@ Patches/../C_code.c:9870: if (!StrMagInstalled) - ldr r3, .L4062+108 @ tmp619, -@ Patches/../C_code.c:9870: if (!StrMagInstalled) +@ Patches/../C_code.c:9875: if (!StrMagInstalled) + ldr r3, .L4065+108 @ tmp619, +@ Patches/../C_code.c:9875: if (!StrMagInstalled) ldr r2, [r3] @ StrMagInstalled, StrMagInstalled mov fp, r2 @ StrMagInstalled, StrMagInstalled cmp r2, #0 @ StrMagInstalled, - beq .LCB25893 @ - b .L4029 @long jump @ -.LCB25893: -@ Patches/../C_code.c:9872: if (UnitHasMagicRank(gStatScreen.unit)) - ldr r2, .L4062+24 @ tmp621, - ldr r3, .L4062+112 @ tmp623, + beq .LCB25917 @ + b .L4032 @long jump @ +.LCB25917: +@ Patches/../C_code.c:9877: if (UnitHasMagicRank(gStatScreen.unit)) + ldr r2, .L4065+24 @ tmp621, + ldr r3, .L4065+112 @ tmp623, ldr r0, [r2, #12] @ gStatScreen.unit, gStatScreen.unit mov r8, r2 @ tmp621, tmp621 bl .L14 @ str r0, [sp, #12] @ tmp624, %sfp -@ Patches/../C_code.c:9872: if (UnitHasMagicRank(gStatScreen.unit)) +@ Patches/../C_code.c:9877: if (UnitHasMagicRank(gStatScreen.unit)) cmp r0, #0 @ tmp624, - bne .LCB25901 @ - b .L4030 @long jump @ -.LCB25901: -@ Patches/../C_code.c:9878: PutDrawText( - ldr r3, .L4062+16 @ tmp627, + bne .LCB25925 @ + b .L4033 @long jump @ +.LCB25925: +@ Patches/../C_code.c:9883: PutDrawText( + ldr r3, .L4065+16 @ tmp627, mov r2, fp @ StrMagInstalled, StrMagInstalled mov r0, r8 @ tmp621, tmp621 str r3, [sp, #4] @ tmp627, movs r3, #0 @, str r2, [sp] @ StrMagInstalled, adds r0, r0, #48 @ tmp621, -.L4056: -@ Patches/../C_code.c:9901: PutDrawText( +.L4059: +@ Patches/../C_code.c:9906: PutDrawText( movs r1, r7 @, _401 movs r2, #3 @, - ldr r7, .L4062+20 @ tmp655, + ldr r7, .L4065+20 @ tmp655, bl .L62 @ - b .L3992 @ -.L3998: -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r3, .L4062+44 @ tmp666, - ldr r2, .L4062+116 @ tmp667, + b .L3995 @ +.L4001: +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r3, .L4065+44 @ tmp666, + ldr r2, .L4065+116 @ tmp667, str r2, [r3] @ tmp667, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r3, .L4062+52 @ tmp668, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r3, .L4065+52 @ tmp668, mov fp, r3 @ tmp668, tmp668 - ldr r2, .L4062+48 @ tmp670, + ldr r2, .L4065+48 @ tmp670, ldr r1, [r2] @ ggMsgStringTable, ggMsgStringTable - ldr r2, .L4062+120 @ tmp671, - ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.268_362 + 5044B], MEM[(const u8 * * *)ggMsgStringTable.268_362 + 5044B] + ldr r2, .L4065+120 @ tmp671, + ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.269_362 + 5044B], MEM[(const u8 * * *)ggMsgStringTable.269_362 + 5044B] movs r1, r3 @, tmp668 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); mov r0, fp @, tmp668 - ldr r3, .L4062+56 @ tmp674, + ldr r3, .L4065+56 @ tmp674, bl .L14 @ -@ Patches/../C_code.c:9930: gStatScreen.text + STATSCREEN_TEXT_SPDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9935: gStatScreen.text + STATSCREEN_TEXT_SPDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r3, r6, #5 @ tmp675, y, subs r1, r5, #4 @ tmp676, x, adds r1, r3, r1 @ tmp677, tmp675, tmp676 -@ Patches/../C_code.c:9929: PutDrawText( - ldr r3, .L4062+8 @ tmp680, -@ Patches/../C_code.c:9930: gStatScreen.text + STATSCREEN_TEXT_SPDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9934: PutDrawText( + ldr r3, .L4065+8 @ tmp680, +@ Patches/../C_code.c:9935: gStatScreen.text + STATSCREEN_TEXT_SPDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp678, tmp677, -@ Patches/../C_code.c:9929: PutDrawText( +@ Patches/../C_code.c:9934: PutDrawText( adds r1, r1, r3 @ tmp679, tmp678, tmp680 - ldr r0, .L4062+124 @ tmp681, + ldr r0, .L4065+124 @ tmp681, mov r3, fp @ tmp668, tmp668 - b .L4057 @ -.L3995: -@ Patches/../C_code.c:7185: sActiveMsg = index; + b .L4060 @ +.L3998: +@ Patches/../C_code.c:7190: sActiveMsg = index; movs r2, #158 @ tmp715, - ldr r3, .L4062+44 @ tmp714, + ldr r3, .L4065+44 @ tmp714, lsls r2, r2, #3 @ tmp715, tmp715, str r2, [r3] @ tmp715, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r2, .L4062+48 @ tmp718, - ldr r3, .L4062+52 @ tmp716, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r2, .L4065+48 @ tmp718, + ldr r3, .L4065+52 @ tmp716, ldr r1, [r2] @ ggMsgStringTable, ggMsgStringTable movs r2, #158 @ tmp719, mov fp, r3 @ tmp716, tmp716 lsls r2, r2, #5 @ tmp719, tmp719, - ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.268_372 + 5056B], MEM[(const u8 * * *)ggMsgStringTable.268_372 + 5056B] + ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.269_372 + 5056B], MEM[(const u8 * * *)ggMsgStringTable.269_372 + 5056B] movs r1, r3 @, tmp716 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); mov r0, fp @, tmp716 - ldr r3, .L4062+56 @ tmp722, + ldr r3, .L4065+56 @ tmp722, bl .L14 @ -@ Patches/../C_code.c:9967: gStatScreen.text + STATSCREEN_TEXT_RESLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9972: gStatScreen.text + STATSCREEN_TEXT_RESLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r3, r6, #5 @ tmp723, y, subs r1, r5, #4 @ tmp724, x, adds r1, r3, r1 @ tmp725, tmp723, tmp724 -@ Patches/../C_code.c:9966: PutDrawText( - ldr r3, .L4062+8 @ tmp728, -@ Patches/../C_code.c:9967: gStatScreen.text + STATSCREEN_TEXT_RESLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9971: PutDrawText( + ldr r3, .L4065+8 @ tmp728, +@ Patches/../C_code.c:9972: gStatScreen.text + STATSCREEN_TEXT_RESLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp726, tmp725, -@ Patches/../C_code.c:9966: PutDrawText( +@ Patches/../C_code.c:9971: PutDrawText( adds r1, r1, r3 @ tmp727, tmp726, tmp728 - ldr r0, .L4062+128 @ tmp729, + ldr r0, .L4065+128 @ tmp729, mov r3, fp @ tmp716, tmp716 - b .L4057 @ -.L4063: + b .L4060 @ +.L4066: .align 2 -.L4062: +.L4065: .word gStatScreenFunction - .word .L3994 + .word .L3997 .word gUiTmScratchA .word gStatScreen+40 - .word .LC807 + .word .LC808 .word PutDrawText .word gStatScreen .word gStatScreen+144 .word ClearText - .word .LC793 + .word .LC794 .word GetCharacterData .word sActiveMsg .word ggMsgStringTable .word sMsgString .word SetMsgTerminator .word Text_InsertDrawString - .word .LC801 + .word .LC802 .word gStatScreen+296 - .word .LC764 + .word .LC765 .word gStatScreen+96 .word CallSkill_Getter .word DrawIcon .word SkillSysInstalled .word gStatScreen+72 - .word .LC814 + .word .LC815 .word gStatScreen+56 - .word .LC810 + .word .LC811 .word StrMagInstalled .word UnitHasMagicRank .word 1261 .word 5044 .word gStatScreen+64 .word gStatScreen+88 -.L4008: -@ Patches/../C_code.c:9739: int icon = GetUnitAidIconId(UNIT_CATTRIBUTES(gStatScreen.unit)); - ldr r3, .L4064 @ tmp456, +.L4011: +@ Patches/../C_code.c:9744: int icon = GetUnitAidIconId(UNIT_CATTRIBUTES(gStatScreen.unit)); + ldr r3, .L4067 @ tmp456, ldr r3, [r3, #12] @ _39, gStatScreen.unit ldmia r3, {r2, r3} @ _39,, -@ Patches/../C_code.c:9739: int icon = GetUnitAidIconId(UNIT_CATTRIBUTES(gStatScreen.unit)); +@ Patches/../C_code.c:9744: int icon = GetUnitAidIconId(UNIT_CATTRIBUTES(gStatScreen.unit)); ldr r3, [r3, #40] @ _43->attributes, _43->attributes ldr r0, [r2, #40] @ _40->attributes, _40->attributes orrs r0, r3 @ tmp459, _43->attributes - ldr r3, .L4064+4 @ tmp462, + ldr r3, .L4067+4 @ tmp462, bl .L14 @ -@ Patches/../C_code.c:9740: if (SkillSysInstalled) - ldr r3, .L4064+8 @ tmp463, -@ Patches/../C_code.c:9740: if (SkillSysInstalled) +@ Patches/../C_code.c:9745: if (SkillSysInstalled) + ldr r3, .L4067+8 @ tmp463, +@ Patches/../C_code.c:9745: if (SkillSysInstalled) ldr r3, [r3] @ SkillSysInstalled, SkillSysInstalled -@ Patches/../C_code.c:9739: int icon = GetUnitAidIconId(UNIT_CATTRIBUTES(gStatScreen.unit)); +@ Patches/../C_code.c:9744: int icon = GetUnitAidIconId(UNIT_CATTRIBUTES(gStatScreen.unit)); mov r9, r0 @ icon, tmp810 -@ Patches/../C_code.c:9740: if (SkillSysInstalled) +@ Patches/../C_code.c:9745: if (SkillSysInstalled) cmp r3, #0 @ SkillSysInstalled, - beq .L4015 @, -@ Patches/../C_code.c:9742: icon |= IconOrr * 3; - ldr r3, .L4064+12 @ tmp465, + beq .L4018 @, +@ Patches/../C_code.c:9747: icon |= IconOrr * 3; + ldr r3, .L4067+12 @ tmp465, ldr r2, [r3] @ IconOrr, IconOrr lsls r3, r2, #1 @ tmp468, IconOrr, adds r3, r3, r2 @ tmp469, tmp468, IconOrr -@ Patches/../C_code.c:9742: icon |= IconOrr * 3; +@ Patches/../C_code.c:9747: icon |= IconOrr * 3; movs r2, r0 @ icon, icon orrs r2, r3 @ icon, tmp469 mov r9, r2 @ icon, icon -.L4015: -@ Patches/../C_code.c:9744: PutDrawText( - ldr r3, .L4064+16 @ tmp476, +.L4018: +@ Patches/../C_code.c:9749: PutDrawText( + ldr r3, .L4067+16 @ tmp476, str r3, [sp, #4] @ tmp476, movs r3, #0 @ tmp477, -@ Patches/../C_code.c:9745: gStatScreen.text + STATSCREEN_TEXT_AIDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9750: gStatScreen.text + STATSCREEN_TEXT_AIDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r6, r6, #5 @ _49, y, subs r1, r5, #4 @ tmp470, x, -@ Patches/../C_code.c:9744: PutDrawText( - ldr r7, .L4064+20 @ tmp474, -@ Patches/../C_code.c:9745: gStatScreen.text + STATSCREEN_TEXT_AIDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9749: PutDrawText( + ldr r7, .L4067+20 @ tmp474, +@ Patches/../C_code.c:9750: gStatScreen.text + STATSCREEN_TEXT_AIDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, adds r1, r1, r6 @ tmp471, tmp470, _49 -@ Patches/../C_code.c:9745: gStatScreen.text + STATSCREEN_TEXT_AIDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9750: gStatScreen.text + STATSCREEN_TEXT_AIDLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp472, tmp471, -@ Patches/../C_code.c:9744: PutDrawText( +@ Patches/../C_code.c:9749: PutDrawText( adds r1, r1, r7 @ tmp473, tmp472, tmp474 movs r2, #3 @, str r3, [sp] @ tmp477, - ldr r0, .L4064+24 @ tmp475, - ldr r4, .L4064+28 @ tmp478, - bl .L269 @ -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); + ldr r0, .L4067+24 @ tmp475, + ldr r4, .L4067+28 @ tmp478, + bl .L272 @ +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); ldr r0, [sp, #56] @, unit - ldr r3, .L4064+32 @ tmp479, + ldr r3, .L4067+32 @ tmp479, bl .L14 @ -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); adds r3, r6, r5 @ tmp480, _49, x -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); lsls r3, r3, #1 @ tmp481, tmp480, -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); movs r2, r0 @ _60, tmp811 -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); movs r1, #2 @, -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); adds r0, r3, r7 @ tmp482, tmp481, tmp474 -@ Patches/../C_code.c:9747: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); - ldr r3, .L4064+36 @ tmp484, +@ Patches/../C_code.c:9752: PutNumberOrBlank(gUiTmScratchA + TILEMAP_INDEX(x, y), blue, CallprAidGetter(unit)); + ldr r3, .L4067+36 @ tmp484, bl .L14 @ -@ Patches/../C_code.c:9748: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9753: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); movs r2, #160 @, -@ Patches/../C_code.c:9748: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9753: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); adds r5, r5, #1 @ tmp486, adds r3, r5, r6 @ tmp487, tmp486, _49 -@ Patches/../C_code.c:9748: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9753: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); lsls r3, r3, #1 @ tmp488, tmp487, -@ Patches/../C_code.c:9748: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9753: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x + 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); adds r0, r3, r7 @ tmp489, tmp488, tmp474 mov r1, r9 @, icon - ldr r3, .L4064+40 @ tmp491, + ldr r3, .L4067+40 @ tmp491, lsls r2, r2, #7 @,, bl .L14 @ -@ Patches/../C_code.c:9749: return 0; - b .L4016 @ -.L4009: -@ Patches/../C_code.c:9729: gStatScreen.text + STATSCREEN_TEXT_CONLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9754: return 0; + b .L4019 @ +.L4012: +@ Patches/../C_code.c:9734: gStatScreen.text + STATSCREEN_TEXT_CONLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, subs r3, r5, #4 @ tmp422, x, lsls r1, r6, #5 @ tmp421, y, adds r1, r1, r3 @ tmp423, tmp421, tmp422 -@ Patches/../C_code.c:9728: PutDrawText( - ldr r3, .L4064+20 @ tmp426, -@ Patches/../C_code.c:9729: gStatScreen.text + STATSCREEN_TEXT_CONLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9733: PutDrawText( + ldr r3, .L4067+20 @ tmp426, +@ Patches/../C_code.c:9734: gStatScreen.text + STATSCREEN_TEXT_CONLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp424, tmp423, -@ Patches/../C_code.c:9728: PutDrawText( +@ Patches/../C_code.c:9733: PutDrawText( adds r1, r1, r3 @ tmp425, tmp424, tmp426 - ldr r0, .L4064+44 @ tmp427, - ldr r3, .L4064+48 @ tmp428, -.L4053: + ldr r0, .L4067+44 @ tmp427, + ldr r3, .L4067+48 @ tmp428, +.L4056: str r3, [sp, #4] @ tmp428, movs r3, #0 @ tmp429, movs r2, #3 @, str r3, [sp] @ tmp429, - ldr r7, .L4064+28 @ tmp430, + ldr r7, .L4067+28 @ tmp430, bl .L62 @ -@ Patches/../C_code.c:9732: barID, x, y, gStatScreenFunction[id].GetUnitUnadjustedStat(unit), +@ Patches/../C_code.c:9737: barID, x, y, gStatScreenFunction[id].GetUnitUnadjustedStat(unit), ldr r3, [sp, #60] @ tmp892, id mov ip, r3 @ tmp892, tmp892 add r4, r4, ip @ tmp434, tmp892 lsls r4, r4, #2 @ tmp435, tmp434, add r4, r4, r10 @ tmp436, tmp790 -@ Patches/../C_code.c:9731: DrawStatWithBar( +@ Patches/../C_code.c:9736: DrawStatWithBar( ldr r3, [r4, #4] @ gStatScreenFunction[id_264(D)].GetUnitUnadjustedStat, gStatScreenFunction[id_264(D)].GetUnitUnadjustedStat ldr r0, [sp, #56] @, unit bl .L14 @ @@ -31551,241 +31582,241 @@ DrawStatByID: movs r7, r0 @ _36, tmp808 ldr r0, [sp, #56] @, unit bl .L14 @ -@ Patches/../C_code.c:9731: DrawStatWithBar( +@ Patches/../C_code.c:9736: DrawStatWithBar( mov r3, r8 @, _34 str r0, [sp, #4] @ tmp809, movs r2, r6 @, y mov r0, r9 @, barID movs r1, r5 @, x str r7, [sp] @ _36, - ldr r4, .L4064+52 @ tmp455, - bl .L269 @ -@ Patches/../C_code.c:9723: return 1; + ldr r4, .L4067+52 @ tmp455, + bl .L272 @ +@ Patches/../C_code.c:9728: return 1; movs r0, #1 @ , - b .L3991 @ -.L4005: -@ Patches/../C_code.c:9778: gStatScreen.text + STATSCREEN_TEXT_STATUS, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, + b .L3994 @ +.L4008: +@ Patches/../C_code.c:9783: gStatScreen.text + STATSCREEN_TEXT_STATUS, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, subs r3, r5, #4 @ tmp530, x, lsls r1, r6, #5 @ tmp529, y, adds r1, r1, r3 @ tmp531, tmp529, tmp530 -@ Patches/../C_code.c:9777: PutDrawText( - ldr r3, .L4064+20 @ tmp534, -@ Patches/../C_code.c:9778: gStatScreen.text + STATSCREEN_TEXT_STATUS, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9782: PutDrawText( + ldr r3, .L4067+20 @ tmp534, +@ Patches/../C_code.c:9783: gStatScreen.text + STATSCREEN_TEXT_STATUS, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp532, tmp531, -@ Patches/../C_code.c:9777: PutDrawText( +@ Patches/../C_code.c:9782: PutDrawText( adds r1, r1, r3 @ tmp533, tmp532, tmp534 - ldr r3, .L4064+56 @ tmp536, + ldr r3, .L4067+56 @ tmp536, str r3, [sp, #4] @ tmp536, movs r3, #0 @ tmp537, movs r2, #3 @, - ldr r0, .L4064+60 @ tmp535, + ldr r0, .L4067+60 @ tmp535, str r3, [sp] @ tmp537, - ldr r4, .L4064+28 @ tmp538, - bl .L269 @ -@ Patches/../C_code.c:9780: DrawStatus(x + 1, y); + ldr r4, .L4067+28 @ tmp538, + bl .L272 @ +@ Patches/../C_code.c:9785: DrawStatus(x + 1, y); movs r1, r6 @, y adds r0, r5, #1 @ tmp539, x, bl DrawStatus @ -@ Patches/../C_code.c:9781: return 0; - b .L4016 @ -.L4007: -@ Patches/../C_code.c:9755: gStatScreen.text + STATSCREEN_TEXT_RESCUENAME, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9786: return 0; + b .L4019 @ +.L4010: +@ Patches/../C_code.c:9760: gStatScreen.text + STATSCREEN_TEXT_RESCUENAME, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r6, #5 @ tmp492, y, subs r5, r5, #4 @ tmp493, -@ Patches/../C_code.c:9754: PutDrawText( - ldr r3, .L4064+20 @ tmp497, -@ Patches/../C_code.c:9755: gStatScreen.text + STATSCREEN_TEXT_RESCUENAME, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9759: PutDrawText( + ldr r3, .L4067+20 @ tmp497, +@ Patches/../C_code.c:9760: gStatScreen.text + STATSCREEN_TEXT_RESCUENAME, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, adds r1, r1, r5 @ tmp494, tmp492, tmp493 -@ Patches/../C_code.c:9755: gStatScreen.text + STATSCREEN_TEXT_RESCUENAME, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9760: gStatScreen.text + STATSCREEN_TEXT_RESCUENAME, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp495, tmp494, -@ Patches/../C_code.c:9754: PutDrawText( +@ Patches/../C_code.c:9759: PutDrawText( adds r1, r1, r3 @ tmp496, tmp495, tmp497 - ldr r3, .L4064+64 @ tmp499, + ldr r3, .L4067+64 @ tmp499, str r3, [sp, #4] @ tmp499, movs r3, #0 @ tmp500, - ldr r4, .L4064+68 @ tmp498, + ldr r4, .L4067+68 @ tmp498, str r3, [sp] @ tmp500, -.L4054: +.L4057: movs r2, #3 @, movs r0, r4 @, tmp498 - ldr r5, .L4064+28 @ tmp501, - bl .L608 @ -@ Patches/../C_code.c:9757: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_RESCUENAME], 24, blue, GetUnitRescueName(unit)); - ldr r3, .L4064+72 @ tmp502, + ldr r5, .L4067+28 @ tmp501, + bl .L611 @ +@ Patches/../C_code.c:9762: Text_InsertDrawString(&gStatScreen.text[STATSCREEN_TEXT_RESCUENAME], 24, blue, GetUnitRescueName(unit)); + ldr r3, .L4067+72 @ tmp502, ldr r0, [sp, #56] @, unit bl .L14 @ movs r3, r0 @ _72, tmp812 - b .L4055 @ -.L3996: -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r3, .L4064+76 @ tmp695, - ldr r2, .L4064+80 @ tmp696, + b .L4058 @ +.L3999: +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r3, .L4067+76 @ tmp695, + ldr r2, .L4067+80 @ tmp696, str r2, [r3] @ tmp696, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r3, .L4064+84 @ tmp697, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r3, .L4067+84 @ tmp697, mov fp, r3 @ tmp697, tmp697 - ldr r2, .L4064+88 @ tmp699, + ldr r2, .L4067+88 @ tmp699, ldr r1, [r2] @ ggMsgStringTable, ggMsgStringTable - ldr r2, .L4064+92 @ tmp700, - ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.268_367 + 5052B], MEM[(const u8 * * *)ggMsgStringTable.268_367 + 5052B] + ldr r2, .L4067+92 @ tmp700, + ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.269_367 + 5052B], MEM[(const u8 * * *)ggMsgStringTable.269_367 + 5052B] movs r1, r3 @, tmp697 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); mov r0, fp @, tmp697 - ldr r3, .L4064+96 @ tmp703, + ldr r3, .L4067+96 @ tmp703, bl .L14 @ -@ Patches/../C_code.c:9954: gStatScreen.text + STATSCREEN_TEXT_DEFLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9959: gStatScreen.text + STATSCREEN_TEXT_DEFLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r3, r6, #5 @ tmp704, y, subs r1, r5, #4 @ tmp705, x, adds r1, r3, r1 @ tmp706, tmp704, tmp705 -@ Patches/../C_code.c:9953: PutDrawText( - ldr r3, .L4064+20 @ tmp709, -@ Patches/../C_code.c:9954: gStatScreen.text + STATSCREEN_TEXT_DEFLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9958: PutDrawText( + ldr r3, .L4067+20 @ tmp709, +@ Patches/../C_code.c:9959: gStatScreen.text + STATSCREEN_TEXT_DEFLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp707, tmp706, -@ Patches/../C_code.c:9953: PutDrawText( +@ Patches/../C_code.c:9958: PutDrawText( adds r1, r1, r3 @ tmp708, tmp707, tmp709 - ldr r0, .L4064+100 @ tmp710, + ldr r0, .L4067+100 @ tmp710, mov r3, fp @ tmp697, tmp697 - b .L4057 @ -.L4006: -@ Patches/../C_code.c:9763: PutDrawText( - ldr r3, .L4064+104 @ tmp511, - ldr r4, .L4064+108 @ tmp510, + b .L4060 @ +.L4009: +@ Patches/../C_code.c:9768: PutDrawText( + ldr r3, .L4067+104 @ tmp511, + ldr r4, .L4067+108 @ tmp510, str r3, [sp, #4] @ tmp511, movs r3, #0 @ tmp512, mov r9, r4 @ tmp510, tmp510 -@ Patches/../C_code.c:9764: gStatScreen.text + STATSCREEN_TEXT_AFFINLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9769: gStatScreen.text + STATSCREEN_TEXT_AFFINLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r6, r6, #5 @ _73, y, subs r1, r1, #4 @ tmp505, -@ Patches/../C_code.c:9763: PutDrawText( - ldr r7, .L4064+20 @ tmp791, -@ Patches/../C_code.c:9764: gStatScreen.text + STATSCREEN_TEXT_AFFINLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9768: PutDrawText( + ldr r7, .L4067+20 @ tmp791, +@ Patches/../C_code.c:9769: gStatScreen.text + STATSCREEN_TEXT_AFFINLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, adds r1, r1, r6 @ tmp506, tmp505, _73 -@ Patches/../C_code.c:9764: gStatScreen.text + STATSCREEN_TEXT_AFFINLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, +@ Patches/../C_code.c:9769: gStatScreen.text + STATSCREEN_TEXT_AFFINLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, 0, lsls r1, r1, #1 @ tmp507, tmp506, -@ Patches/../C_code.c:9763: PutDrawText( +@ Patches/../C_code.c:9768: PutDrawText( movs r0, r4 @, tmp510 adds r1, r7, r1 @ tmp508, tmp791, tmp507 movs r2, #3 @, str r3, [sp] @ tmp512, - ldr r4, .L4064+28 @ tmp513, - bl .L269 @ -@ Patches/../C_code.c:9766: int icon = GetUnitAffinityIcon(gStatScreen.unit); + ldr r4, .L4067+28 @ tmp513, + bl .L272 @ +@ Patches/../C_code.c:9771: int icon = GetUnitAffinityIcon(gStatScreen.unit); mov r4, r9 @ tmp510, tmp510 subs r4, r4, #128 @ tmp510, - ldr r3, .L4064+112 @ tmp516, + ldr r3, .L4067+112 @ tmp516, ldr r0, [r4, #12] @ gStatScreen.unit, gStatScreen.unit bl .L14 @ -@ Patches/../C_code.c:9767: if (SkillSysInstalled) - ldr r3, .L4064+8 @ tmp517, -@ Patches/../C_code.c:9767: if (SkillSysInstalled) +@ Patches/../C_code.c:9772: if (SkillSysInstalled) + ldr r3, .L4067+8 @ tmp517, +@ Patches/../C_code.c:9772: if (SkillSysInstalled) ldr r3, [r3] @ SkillSysInstalled, SkillSysInstalled -@ Patches/../C_code.c:9766: int icon = GetUnitAffinityIcon(gStatScreen.unit); +@ Patches/../C_code.c:9771: int icon = GetUnitAffinityIcon(gStatScreen.unit); movs r1, r0 @ icon, tmp813 -@ Patches/../C_code.c:9767: if (SkillSysInstalled) +@ Patches/../C_code.c:9772: if (SkillSysInstalled) cmp r3, #0 @ SkillSysInstalled, - beq .L4017 @, -@ Patches/../C_code.c:9769: icon |= IconOrr * 2; - ldr r3, .L4064+12 @ tmp519, + beq .L4020 @, +@ Patches/../C_code.c:9774: icon |= IconOrr * 2; + ldr r3, .L4067+12 @ tmp519, ldr r3, [r3] @ IconOrr, IconOrr lsls r3, r3, #1 @ tmp520, IconOrr, -@ Patches/../C_code.c:9769: icon |= IconOrr * 2; +@ Patches/../C_code.c:9774: icon |= IconOrr * 2; orrs r1, r3 @ icon, tmp520 -.L4017: -@ Patches/../C_code.c:9771: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +.L4020: +@ Patches/../C_code.c:9776: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); movs r2, #160 @, -@ Patches/../C_code.c:9771: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9776: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); subs r5, r5, #1 @ tmp523, adds r3, r5, r6 @ tmp524, tmp523, _73 -@ Patches/../C_code.c:9771: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9776: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); lsls r3, r3, #1 @ tmp525, tmp524, -@ Patches/../C_code.c:9771: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); +@ Patches/../C_code.c:9776: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 1, y), icon, TILEREF(0, STATSCREEN_BGPAL_EXTICONS)); adds r0, r7, r3 @ tmp526, tmp791, tmp525 lsls r2, r2, #7 @,, - ldr r3, .L4064+40 @ tmp528, + ldr r3, .L4067+40 @ tmp528, bl .L14 @ -@ Patches/../C_code.c:9772: return 0; - b .L4016 @ -.L4026: -@ Patches/../C_code.c:9860: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9777: return 0; + b .L4019 @ +.L4029: +@ Patches/../C_code.c:9865: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); movs r2, #128 @, -@ Patches/../C_code.c:9860: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9865: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); lsls r3, r4, #1 @ tmp611, i, -@ Patches/../C_code.c:9860: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); - movs r0, r5 @, ivtmp.2184 +@ Patches/../C_code.c:9865: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + ((i - 3) * 3), y), skillID[i], 0x4000); + movs r0, r5 @, ivtmp.2189 ldrb r1, [r7, r3] @ MEM[(u8 *)skillID_284 + _476 * 1], MEM[(u8 *)skillID_284 + _476 * 1] lsls r2, r2, #7 @,, - bl .L208 @ - b .L4027 @ -.L4060: -@ Patches/../C_code.c:9845: for (int i = 0; i < 6; ++i) + bl .L211 @ + b .L4030 @ +.L4063: +@ Patches/../C_code.c:9850: for (int i = 0; i < 6; ++i) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:9845: for (int i = 0; i < 6; ++i) - adds r5, r5, #6 @ ivtmp.2184, - b .L4028 @ -.L4020: -@ Patches/../C_code.c:9835: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9850: for (int i = 0; i < 6; ++i) + adds r5, r5, #6 @ ivtmp.2189, + b .L4031 @ +.L4023: +@ Patches/../C_code.c:9840: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); movs r2, #128 @, -@ Patches/../C_code.c:9835: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); +@ Patches/../C_code.c:9840: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); lsls r3, r5, #1 @ tmp595, i, -@ Patches/../C_code.c:9835: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); - movs r0, r4 @, ivtmp.2174 +@ Patches/../C_code.c:9840: DrawIcon(gUiTmScratchA + TILEMAP_INDEX(x - 4 + (i * 3), y), skillID[i], 0x4000); + movs r0, r4 @, ivtmp.2179 ldrb r1, [r7, r3] @ MEM[(u8 *)skillID_290 + _490 * 1], MEM[(u8 *)skillID_290 + _490 * 1] lsls r2, r2, #7 @,, - bl .L208 @ - b .L4021 @ -.L4018: -@ Patches/../C_code.c:9801: PutDrawText( - ldr r3, .L4064+64 @ tmp566, + bl .L211 @ + b .L4024 @ +.L4021: +@ Patches/../C_code.c:9806: PutDrawText( + ldr r3, .L4067+64 @ tmp566, str r0, [sp] @ talk_uid, str r3, [sp, #4] @ tmp566, subs r4, r4, #24 @ tmp565, movs r3, #0 @, - b .L4054 @ -.L4029: -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r3, .L4064+76 @ tmp643, - ldr r2, .L4064+116 @ tmp644, + b .L4057 @ +.L4032: +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r3, .L4067+76 @ tmp643, + ldr r2, .L4067+116 @ tmp644, str r2, [r3] @ tmp644, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r3, .L4064+84 @ tmp645, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r3, .L4067+84 @ tmp645, mov fp, r3 @ tmp645, tmp645 - ldr r2, .L4064+88 @ tmp647, + ldr r2, .L4067+88 @ tmp647, ldr r1, [r2] @ ggMsgStringTable, ggMsgStringTable - ldr r2, .L4064+120 @ tmp648, - ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.268_357 + 5112B], MEM[(const u8 * * *)ggMsgStringTable.268_357 + 5112B] + ldr r2, .L4067+120 @ tmp648, + ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.269_357 + 5112B], MEM[(const u8 * * *)ggMsgStringTable.269_357 + 5112B] movs r1, r3 @, tmp645 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); mov r0, fp @, tmp645 - ldr r3, .L4064+96 @ tmp651, + ldr r3, .L4067+96 @ tmp651, bl .L14 @ -@ Patches/../C_code.c:9901: PutDrawText( +@ Patches/../C_code.c:9906: PutDrawText( mov r3, fp @ tmp645, tmp645 str r3, [sp, #4] @ tmp645, movs r3, #0 @ tmp654, - ldr r0, .L4064+124 @ tmp652, + ldr r0, .L4067+124 @ tmp652, str r3, [sp] @ tmp654, - b .L4056 @ -.L4030: -@ Patches/../C_code.c:7185: sActiveMsg = index; - ldr r3, .L4064+76 @ tmp630, - ldr r2, .L4064+116 @ tmp631, + b .L4059 @ +.L4033: +@ Patches/../C_code.c:7190: sActiveMsg = index; + ldr r3, .L4067+76 @ tmp630, + ldr r2, .L4067+116 @ tmp631, str r2, [r3] @ tmp631, sActiveMsg -@ Patches/../C_code.c:7186: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); - ldr r3, .L4064+84 @ tmp632, +@ Patches/../C_code.c:7191: CallARM_DecompText((void *)ggMsgStringTable[index], sMsgString); + ldr r3, .L4067+84 @ tmp632, mov fp, r3 @ tmp632, tmp632 - ldr r2, .L4064+88 @ tmp634, + ldr r2, .L4067+88 @ tmp634, ldr r1, [r2] @ ggMsgStringTable, ggMsgStringTable - ldr r2, .L4064+120 @ tmp635, - ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.268_352 + 5112B], MEM[(const u8 * * *)ggMsgStringTable.268_352 + 5112B] + ldr r2, .L4067+120 @ tmp635, + ldr r0, [r1, r2] @ MEM[(const u8 * * *)ggMsgStringTable.269_352 + 5112B], MEM[(const u8 * * *)ggMsgStringTable.269_352 + 5112B] movs r1, r3 @, tmp632 bl CallARM_DecompText @ -@ Patches/../C_code.c:7188: SetMsgTerminator(sMsgString); +@ Patches/../C_code.c:7193: SetMsgTerminator(sMsgString); mov r0, fp @, tmp632 - ldr r3, .L4064+96 @ tmp638, + ldr r3, .L4067+96 @ tmp638, bl .L14 @ -@ Patches/../C_code.c:9887: PutDrawText( +@ Patches/../C_code.c:9892: PutDrawText( mov r3, fp @ tmp632, tmp632 mov r0, r8 @ tmp621, tmp621 str r3, [sp, #4] @ tmp632, @@ -31793,29 +31824,29 @@ DrawStatByID: adds r0, r0, #48 @ tmp621, str r3, [sp] @ tmp624, movs r3, #0 @, - b .L4056 @ -.L4059: -@ Patches/../C_code.c:9708: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, + b .L4059 @ +.L4062: +@ Patches/../C_code.c:9713: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, subs r3, r5, #4 @ tmp356, x, lsls r1, r6, #5 @ tmp355, y, adds r1, r1, r3 @ tmp357, tmp355, tmp356 -@ Patches/../C_code.c:9707: PutDrawText( - ldr r3, .L4064+20 @ tmp360, -@ Patches/../C_code.c:9708: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, +@ Patches/../C_code.c:9712: PutDrawText( + ldr r3, .L4067+20 @ tmp360, +@ Patches/../C_code.c:9713: gStatScreen.text + STATSCREEN_TEXT_MOVLABEL, gUiTmScratchA + TILEMAP_INDEX(x - 4, y), gold, 0, lsls r1, r1, #1 @ tmp358, tmp357, -@ Patches/../C_code.c:9707: PutDrawText( +@ Patches/../C_code.c:9712: PutDrawText( adds r1, r1, r3 @ tmp359, tmp358, tmp360 - ldr r0, .L4064+128 @ tmp361, - ldr r3, .L4064+132 @ tmp362, - b .L4053 @ -.L4065: + ldr r0, .L4067+128 @ tmp361, + ldr r3, .L4067+132 @ tmp362, + b .L4056 @ +.L4068: .align 2 -.L4064: +.L4067: .word gStatScreen .word GetUnitAidIconId .word SkillSysInstalled .word IconOrr - .word .LC774 + .word .LC775 .word gUiTmScratchA .word gStatScreen+112 .word PutDrawText @@ -31823,11 +31854,11 @@ DrawStatByID: .word PutNumberOrBlank .word DrawIcon .word gStatScreen+104 - .word .LC768 + .word .LC769 .word DrawStatWithBar - .word .LC789 + .word .LC790 .word gStatScreen+136 - .word .LC780 + .word .LC781 .word gStatScreen+120 .word GetUnitRescueName .word sActiveMsg @@ -31837,14 +31868,14 @@ DrawStatByID: .word 5052 .word SetMsgTerminator .word gStatScreen+80 - .word .LC785 + .word .LC786 .word gStatScreen+128 .word GetUnitAffinityIcon .word 1278 .word 5112 .word gStatScreen+48 .word gStatScreen+96 - .word .LC760 + .word .LC761 .size DrawStatByID, .-DrawStatByID .align 1 .p2align 2,,3 @@ -31858,78 +31889,78 @@ GetIconCoordFromStatScreenLayout: @ args = 0, pretend = 0, frame = 8 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:10027: result.y = -1; +@ Patches/../C_code.c:10032: result.y = -1; movs r5, #1 @ result$y, rsbs r5, r5, #0 @ result$y, result$y -@ Patches/../C_code.c:10026: result.x = -1; +@ Patches/../C_code.c:10031: result.x = -1; movs r6, r5 @ result$x, result$y -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) movs r2, #0 @ i, - ldr r1, .L4073 @ ivtmp.2197, -@ Patches/../C_code.c:10024: { - ldr r3, .L4073+4 @ ivtmp.2198, + ldr r1, .L4076 @ ivtmp.2202, +@ Patches/../C_code.c:10029: { + ldr r3, .L4076+4 @ ivtmp.2203, sub sp, sp, #8 @,, -.L4071: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) +.L4074: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r4, [r1] @ MEM[(int *)_3], MEM[(int *)_3] cmp r0, r4 @ id, MEM[(int *)_3] - beq .L4072 @, -.L4067: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4075 @, +.L4070: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp128, lsls r3, r3, #16 @ tmp129, tmp128, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2197, - lsrs r3, r3, #16 @ ivtmp.2198, tmp129, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2202, + lsrs r3, r3, #16 @ ivtmp.2203, tmp129, cmp r2, #16 @ i, - bne .L4071 @, -@ Patches/../C_code.c:10044: return result; + bne .L4074 @, +@ Patches/../C_code.c:10049: return result; lsls r0, r6, #16 @ tmp145, result$x, lsls r5, r5, #16 @ tmp143, result$y, lsrs r0, r0, #16 @ tmp144, tmp145, orrs r0, r5 @ tmp146, tmp143 -@ Patches/../C_code.c:10045: } +@ Patches/../C_code.c:10050: } add sp, sp, #8 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L4072: -@ Patches/../C_code.c:10032: if (i < 8) +.L4075: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4068 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r5, r3 @ tmp125, ivtmp.2198 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4071 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r5, r3 @ tmp125, ivtmp.2203 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp126, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r5, r5, #16 @ tmp125, lsls r5, r5, #16 @ result$y, tmp125, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp127, tmp126, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; movs r6, #13 @ result$x, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r5, r5, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2197, - lsrs r3, r3, #16 @ ivtmp.2198, tmp127, - b .L4071 @ -.L4068: -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); - lsls r5, r3, #16 @ result$y, ivtmp.2198, -@ Patches/../C_code.c:10039: result.x = 0x15; +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2202, + lsrs r3, r3, #16 @ ivtmp.2203, tmp127, + b .L4074 @ +.L4071: +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); + lsls r5, r3, #16 @ result$y, ivtmp.2203, +@ Patches/../C_code.c:10044: result.x = 0x15; movs r6, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r5, r5, #16 @ result$y, result$y, - b .L4067 @ -.L4074: + b .L4070 @ +.L4077: .align 2 -.L4073: +.L4076: .word gStatScreenFunction .word 65523 .size GetIconCoordFromStatScreenLayout, .-GetIconCoordFromStatScreenLayout @@ -31944,144 +31975,144 @@ GetTrvCoordFromStatScreenLayout: @ Function supports interworking. @ args = 0, pretend = 0, frame = 8 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:10027: result.y = -1; +@ Patches/../C_code.c:10032: result.y = -1; movs r0, #1 @ result$y, - ldr r1, .L4099 @ ivtmp.2213, + ldr r1, .L4102 @ ivtmp.2218, rsbs r0, r0, #0 @ result$y, result$y -@ Patches/../C_code.c:10047: { +@ Patches/../C_code.c:10052: { push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) movs r2, #0 @ i, -@ Patches/../C_code.c:10047: { - movs r4, r1 @ ivtmp.2222, ivtmp.2213 -@ Patches/../C_code.c:10026: result.x = -1; +@ Patches/../C_code.c:10052: { + movs r4, r1 @ ivtmp.2227, ivtmp.2218 +@ Patches/../C_code.c:10031: result.x = -1; movs r6, r0 @ result$x, result$y -@ Patches/../C_code.c:10047: { - ldr r3, .L4099+4 @ ivtmp.2223, +@ Patches/../C_code.c:10052: { + ldr r3, .L4102+4 @ ivtmp.2228, sub sp, sp, #8 @,, -.L4080: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) +.L4083: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r5, [r4] @ MEM[(int *)_80], MEM[(int *)_80] cmp r5, #4 @ MEM[(int *)_80], - beq .L4097 @, -.L4076: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4100 @, +.L4079: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp136, lsls r3, r3, #16 @ tmp137, tmp136, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r4, r4, #20 @ ivtmp.2222, - lsrs r3, r3, #16 @ ivtmp.2223, tmp137, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r4, r4, #20 @ ivtmp.2227, + lsrs r3, r3, #16 @ ivtmp.2228, tmp137, cmp r2, #16 @ i, - bne .L4080 @, -@ Patches/../C_code.c:10050: if (result.x == (-1) || result.y == (-1)) + bne .L4083 @, +@ Patches/../C_code.c:10055: if (result.x == (-1) || result.y == (-1)) adds r3, r0, #1 @ tmp182, result$y, - beq .L4087 @, + beq .L4090 @, adds r3, r6, #1 @ tmp183, result$x, - beq .L4087 @, -.L4081: -@ Patches/../C_code.c:10054: return result; + beq .L4090 @, +.L4084: +@ Patches/../C_code.c:10059: return result; lsls r3, r0, #16 @ tmp169, result$y, lsls r0, r6, #16 @ tmp171, result$x, lsrs r0, r0, #16 @ tmp170, tmp171, orrs r0, r3 @ tmp172, tmp169 -@ Patches/../C_code.c:10055: } +@ Patches/../C_code.c:10060: } add sp, sp, #8 @,, @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L4087: +.L4090: movs r0, #1 @ result$y, rsbs r0, r0, #0 @ result$y, result$y movs r6, r0 @ result$x, result$y movs r2, #0 @ i, - ldr r3, .L4099+4 @ ivtmp.2214, -.L4086: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) + ldr r3, .L4102+4 @ ivtmp.2219, +.L4089: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r4, [r1] @ MEM[(int *)_47], MEM[(int *)_47] cmp r4, #7 @ MEM[(int *)_47], - beq .L4098 @, -.L4083: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4101 @, +.L4086: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp154, lsls r3, r3, #16 @ tmp155, tmp154, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2213, - lsrs r3, r3, #16 @ ivtmp.2214, tmp155, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2218, + lsrs r3, r3, #16 @ ivtmp.2219, tmp155, cmp r2, #16 @ i, - beq .L4081 @, -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) + beq .L4084 @, +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r4, [r1] @ MEM[(int *)_47], MEM[(int *)_47] cmp r4, #7 @ MEM[(int *)_47], - bne .L4083 @, -.L4098: -@ Patches/../C_code.c:10032: if (i < 8) + bne .L4086 @, +.L4101: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4084 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r0, r3 @ tmp151, ivtmp.2214 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4087 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r0, r3 @ tmp151, ivtmp.2219 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp152, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r0, r0, #16 @ tmp151, lsls r0, r0, #16 @ result$y, tmp151, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp153, tmp152, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; movs r6, #13 @ result$x, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r0, r0, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2213, - lsrs r3, r3, #16 @ ivtmp.2214, tmp153, - b .L4086 @ -.L4097: -@ Patches/../C_code.c:10032: if (i < 8) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2218, + lsrs r3, r3, #16 @ ivtmp.2219, tmp153, + b .L4089 @ +.L4100: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4077 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r0, r3 @ tmp133, ivtmp.2223 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4080 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r0, r3 @ tmp133, ivtmp.2228 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp134, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r0, r0, #16 @ tmp133, lsls r0, r0, #16 @ result$y, tmp133, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp135, tmp134, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; movs r6, #13 @ result$x, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r0, r0, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r4, r4, #20 @ ivtmp.2222, - lsrs r3, r3, #16 @ ivtmp.2223, tmp135, - b .L4080 @ -.L4077: -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); - lsls r0, r3, #16 @ result$y, ivtmp.2223, -@ Patches/../C_code.c:10039: result.x = 0x15; +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r4, r4, #20 @ ivtmp.2227, + lsrs r3, r3, #16 @ ivtmp.2228, tmp135, + b .L4083 @ +.L4080: +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); + lsls r0, r3, #16 @ result$y, ivtmp.2228, +@ Patches/../C_code.c:10044: result.x = 0x15; movs r6, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r0, r0, #16 @ result$y, result$y, - b .L4076 @ -.L4084: - lsls r0, r3, #16 @ result$y, ivtmp.2214, -@ Patches/../C_code.c:10039: result.x = 0x15; + b .L4079 @ +.L4087: + lsls r0, r3, #16 @ result$y, ivtmp.2219, +@ Patches/../C_code.c:10044: result.x = 0x15; movs r6, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r0, r0, #16 @ result$y, result$y, - b .L4083 @ -.L4100: + b .L4086 @ +.L4103: .align 2 -.L4099: +.L4102: .word gStatScreenFunction .word 65523 .size GetTrvCoordFromStatScreenLayout, .-GetTrvCoordFromStatScreenLayout @@ -32097,78 +32128,78 @@ GetSklCoordFromStatScreenLayout: @ args = 0, pretend = 0, frame = 8 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, lr} @ -@ Patches/../C_code.c:10027: result.y = -1; +@ Patches/../C_code.c:10032: result.y = -1; movs r4, #1 @ result$y, rsbs r4, r4, #0 @ result$y, result$y -@ Patches/../C_code.c:10026: result.x = -1; +@ Patches/../C_code.c:10031: result.x = -1; movs r5, r4 @ result$x, result$y -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) movs r2, #0 @ i, - ldr r1, .L4108 @ ivtmp.2238, -@ Patches/../C_code.c:10057: { - ldr r3, .L4108+4 @ ivtmp.2239, + ldr r1, .L4111 @ ivtmp.2243, +@ Patches/../C_code.c:10062: { + ldr r3, .L4111+4 @ ivtmp.2244, sub sp, sp, #12 @,, -.L4106: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) +.L4109: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r0, [r1] @ MEM[(int *)_6], MEM[(int *)_6] cmp r0, #12 @ MEM[(int *)_6], - beq .L4107 @, -.L4102: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4110 @, +.L4105: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp127, lsls r3, r3, #16 @ tmp128, tmp127, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2238, - lsrs r3, r3, #16 @ ivtmp.2239, tmp128, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2243, + lsrs r3, r3, #16 @ ivtmp.2244, tmp128, cmp r2, #16 @ i, - bne .L4106 @, -@ Patches/../C_code.c:10058: return GetIconCoordFromStatScreenLayout(12); + bne .L4109 @, +@ Patches/../C_code.c:10063: return GetIconCoordFromStatScreenLayout(12); lsls r0, r5, #16 @ tmp144, result$x, lsls r4, r4, #16 @ tmp142, result$y, lsrs r0, r0, #16 @ tmp143, tmp144, orrs r0, r4 @ tmp145, tmp142 -@ Patches/../C_code.c:10059: } +@ Patches/../C_code.c:10064: } add sp, sp, #12 @,, @ sp needed @ pop {r4, r5} pop {r1} bx r1 -.L4107: -@ Patches/../C_code.c:10032: if (i < 8) +.L4110: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4103 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r4, r3 @ tmp124, ivtmp.2239 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4106 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r4, r3 @ tmp124, ivtmp.2244 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp125, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r4, r4, #16 @ tmp124, lsls r4, r4, #16 @ result$y, tmp124, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp126, tmp125, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; movs r5, #13 @ result$x, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r4, r4, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2238, - lsrs r3, r3, #16 @ ivtmp.2239, tmp126, - b .L4106 @ -.L4103: -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); - lsls r4, r3, #16 @ result$y, ivtmp.2239, -@ Patches/../C_code.c:10039: result.x = 0x15; +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2243, + lsrs r3, r3, #16 @ ivtmp.2244, tmp126, + b .L4109 @ +.L4106: +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); + lsls r4, r3, #16 @ result$y, ivtmp.2244, +@ Patches/../C_code.c:10044: result.x = 0x15; movs r5, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r4, r4, #16 @ result$y, result$y, - b .L4102 @ -.L4109: + b .L4105 @ +.L4112: .align 2 -.L4108: +.L4111: .word gStatScreenFunction .word 65523 .size GetSklCoordFromStatScreenLayout, .-GetSklCoordFromStatScreenLayout @@ -32184,78 +32215,78 @@ GetSpdCoordFromStatScreenLayout: @ args = 0, pretend = 0, frame = 8 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, lr} @ -@ Patches/../C_code.c:10027: result.y = -1; +@ Patches/../C_code.c:10032: result.y = -1; movs r4, #1 @ result$y, rsbs r4, r4, #0 @ result$y, result$y -@ Patches/../C_code.c:10026: result.x = -1; +@ Patches/../C_code.c:10031: result.x = -1; movs r5, r4 @ result$x, result$y -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) movs r2, #0 @ i, - ldr r1, .L4117 @ ivtmp.2254, -@ Patches/../C_code.c:10061: { - ldr r3, .L4117+4 @ ivtmp.2255, + ldr r1, .L4120 @ ivtmp.2259, +@ Patches/../C_code.c:10066: { + ldr r3, .L4120+4 @ ivtmp.2260, sub sp, sp, #12 @,, -.L4115: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) +.L4118: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r0, [r1] @ MEM[(int *)_6], MEM[(int *)_6] cmp r0, #13 @ MEM[(int *)_6], - beq .L4116 @, -.L4111: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4119 @, +.L4114: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp127, lsls r3, r3, #16 @ tmp128, tmp127, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2254, - lsrs r3, r3, #16 @ ivtmp.2255, tmp128, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2259, + lsrs r3, r3, #16 @ ivtmp.2260, tmp128, cmp r2, #16 @ i, - bne .L4115 @, -@ Patches/../C_code.c:10062: return GetIconCoordFromStatScreenLayout(13); + bne .L4118 @, +@ Patches/../C_code.c:10067: return GetIconCoordFromStatScreenLayout(13); lsls r0, r5, #16 @ tmp144, result$x, lsls r4, r4, #16 @ tmp142, result$y, lsrs r0, r0, #16 @ tmp143, tmp144, orrs r0, r4 @ tmp145, tmp142 -@ Patches/../C_code.c:10063: } +@ Patches/../C_code.c:10068: } add sp, sp, #12 @,, @ sp needed @ pop {r4, r5} pop {r1} bx r1 -.L4116: -@ Patches/../C_code.c:10032: if (i < 8) +.L4119: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4112 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r4, r3 @ tmp124, ivtmp.2255 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4115 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r4, r3 @ tmp124, ivtmp.2260 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp125, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r4, r4, #16 @ tmp124, lsls r4, r4, #16 @ result$y, tmp124, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp126, tmp125, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; movs r5, #13 @ result$x, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r4, r4, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2254, - lsrs r3, r3, #16 @ ivtmp.2255, tmp126, - b .L4115 @ -.L4112: -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); - lsls r4, r3, #16 @ result$y, ivtmp.2255, -@ Patches/../C_code.c:10039: result.x = 0x15; +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2259, + lsrs r3, r3, #16 @ ivtmp.2260, tmp126, + b .L4118 @ +.L4115: +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); + lsls r4, r3, #16 @ result$y, ivtmp.2260, +@ Patches/../C_code.c:10044: result.x = 0x15; movs r5, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r4, r4, #16 @ result$y, result$y, - b .L4111 @ -.L4118: + b .L4114 @ +.L4121: .align 2 -.L4117: +.L4120: .word gStatScreenFunction .word 65523 .size GetSpdCoordFromStatScreenLayout, .-GetSpdCoordFromStatScreenLayout @@ -32271,168 +32302,168 @@ PageNumCtrl_DisplayBlinkIcons: @ args = 0, pretend = 0, frame = 16 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:10067: s8 displayIcon = (GetGameClock() % 32) < 20; - ldr r3, .L4164 @ tmp194, -@ Patches/../C_code.c:10066: { +@ Patches/../C_code.c:10072: s8 displayIcon = (GetGameClock() % 32) < 20; + ldr r3, .L4167 @ tmp194, +@ Patches/../C_code.c:10071: { sub sp, sp, #28 @,, -@ Patches/../C_code.c:10067: s8 displayIcon = (GetGameClock() % 32) < 20; +@ Patches/../C_code.c:10072: s8 displayIcon = (GetGameClock() % 32) < 20; bl .L14 @ -@ Patches/../C_code.c:10069: u16 palidLut[3] = { 0xC, 0xE, 0xD }; // TODO: palid constants - ldr r3, .L4164+4 @ tmp195, +@ Patches/../C_code.c:10074: u16 palidLut[3] = { 0xC, 0xE, 0xD }; // TODO: palid constants + ldr r3, .L4167+4 @ tmp195, mov r2, sp @ tmp321, str r3, [sp, #16] @ tmp195, MEM [(short unsigned int *)&palidLut] movs r3, #13 @ tmp197, strh r3, [r2, #20] @ tmp197, palidLut[2] -@ Patches/../C_code.c:10071: if (!gStatScreen.inTransition) +@ Patches/../C_code.c:10076: if (!gStatScreen.inTransition) movs r3, #8 @ tmp200, -@ Patches/../C_code.c:10071: if (!gStatScreen.inTransition) - ldr r5, .L4164+8 @ tmp299, -@ Patches/../C_code.c:10071: if (!gStatScreen.inTransition) +@ Patches/../C_code.c:10076: if (!gStatScreen.inTransition) + ldr r5, .L4167+8 @ tmp299, +@ Patches/../C_code.c:10076: if (!gStatScreen.inTransition) ldrsb r3, [r5, r3] @ tmp200, cmp r3, #0 @ tmp200, - bne .L4119 @, -@ Patches/../C_code.c:10067: s8 displayIcon = (GetGameClock() % 32) < 20; + bne .L4122 @, +@ Patches/../C_code.c:10072: s8 displayIcon = (GetGameClock() % 32) < 20; movs r6, #31 @ tmp201, -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) ldrb r2, [r5] @ gStatScreen, gStatScreen -@ Patches/../C_code.c:10067: s8 displayIcon = (GetGameClock() % 32) < 20; +@ Patches/../C_code.c:10072: s8 displayIcon = (GetGameClock() % 32) < 20; ands r6, r0 @ _2, _1 -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) ldr r0, [r5, #12] @ _128, gStatScreen.unit -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) ldr r3, [r0, #12] @ pretmp_146, pretmp_145->state -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) cmp r2, #0 @ gStatScreen, - beq .L4161 @, -.L4122: -@ Patches/../C_code.c:10106: if (displayIcon) + beq .L4164 @, +.L4125: +@ Patches/../C_code.c:10111: if (displayIcon) lsls r3, r3, #26 @ tmp319, pretmp_146, - bpl .L4119 @, + bpl .L4122 @, cmp r6, #19 @ _2, - bls .L4160 @, -.L4119: -@ Patches/../C_code.c:10115: } + bls .L4163 @, +.L4122: +@ Patches/../C_code.c:10120: } add sp, sp, #28 @,, @ sp needed @ pop {r4, r5, r6, r7} pop {r0} bx r0 -.L4161: -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) +.L4164: +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) lsls r2, r3, #27 @ tmp313, pretmp_146, - bpl .L4122 @, -@ Patches/../C_code.c:10027: result.y = -1; + bpl .L4125 @, +@ Patches/../C_code.c:10032: result.y = -1; movs r7, #1 @ result$y, - ldr r4, .L4164+12 @ ivtmp.2272, + ldr r4, .L4167+12 @ ivtmp.2277, rsbs r7, r7, #0 @ result$y, result$y -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) - movs r1, r4 @ ivtmp.2281, ivtmp.2272 -@ Patches/../C_code.c:10026: result.x = -1; +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) + movs r1, r4 @ ivtmp.2286, ivtmp.2277 +@ Patches/../C_code.c:10031: result.x = -1; mov ip, r7 @ result$x, result$y -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) movs r2, #0 @ i, -@ Patches/../C_code.c:10073: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) - ldr r3, .L4164+16 @ ivtmp.2282, -.L4127: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) +@ Patches/../C_code.c:10078: if ((gStatScreen.page == STATSCREEN_PAGE_0) && (gStatScreen.unit->state & US_RESCUING)) + ldr r3, .L4167+16 @ ivtmp.2287, +.L4130: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r0, [r1] @ MEM[(int *)_106], MEM[(int *)_106] cmp r0, #12 @ MEM[(int *)_106], - beq .L4162 @, -.L4123: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4165 @, +.L4126: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp211, lsls r3, r3, #16 @ tmp212, tmp211, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2281, - lsrs r3, r3, #16 @ ivtmp.2282, tmp212, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2286, + lsrs r3, r3, #16 @ ivtmp.2287, tmp212, cmp r2, #16 @ i, - bne .L4127 @, -@ Patches/../C_code.c:10076: if (coord.x != (-1)) + bne .L4130 @, +@ Patches/../C_code.c:10081: if (coord.x != (-1)) mov r3, ip @ result$x, result$x adds r3, r3, #1 @ tmp314, result$x, - beq .L4128 @, -@ Patches/../C_code.c:10078: coord.x = (coord.x + 2) * 8; + beq .L4131 @, +@ Patches/../C_code.c:10083: coord.x = (coord.x + 2) * 8; mov r0, ip @ result$x, result$x -@ Patches/../C_code.c:10079: coord.y = coord.y * 8; +@ Patches/../C_code.c:10084: coord.y = coord.y * 8; lsls r1, r7, #3 @ tmp214, result$y, -@ Patches/../C_code.c:10080: UpdateStatArrowSprites(coord.x, coord.y, 1); +@ Patches/../C_code.c:10085: UpdateStatArrowSprites(coord.x, coord.y, 1); lsls r1, r1, #16 @ tmp215, tmp214, -@ Patches/../C_code.c:10078: coord.x = (coord.x + 2) * 8; +@ Patches/../C_code.c:10083: coord.x = (coord.x + 2) * 8; adds r0, r0, #2 @ result$x, -@ Patches/../C_code.c:10080: UpdateStatArrowSprites(coord.x, coord.y, 1); - ldr r3, .L4164+20 @ tmp220, +@ Patches/../C_code.c:10085: UpdateStatArrowSprites(coord.x, coord.y, 1); + ldr r3, .L4167+20 @ tmp220, asrs r1, r1, #16 @ tmp215, tmp215, lsls r0, r0, #3 @ tmp219, tmp216, subs r2, r2, #15 @, bl .L14 @ -.L4128: -@ Patches/../C_code.c:10027: result.y = -1; +.L4131: +@ Patches/../C_code.c:10032: result.y = -1; movs r0, #1 @ result$y, rsbs r0, r0, #0 @ result$y, result$y -@ Patches/../C_code.c:10026: result.x = -1; +@ Patches/../C_code.c:10031: result.x = -1; movs r7, r0 @ result$x, result$y -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) movs r2, #0 @ i, -@ Patches/../C_code.c:10034: result.x = 0xD; - ldr r3, .L4164+16 @ ivtmp.2273, -.L4133: -@ Patches/../C_code.c:10030: if (gStatScreenFunction[i].specialCase == id) +@ Patches/../C_code.c:10039: result.x = 0xD; + ldr r3, .L4167+16 @ ivtmp.2278, +.L4136: +@ Patches/../C_code.c:10035: if (gStatScreenFunction[i].specialCase == id) ldr r1, [r4] @ MEM[(int *)_109], MEM[(int *)_109] cmp r1, #13 @ MEM[(int *)_109], - beq .L4163 @, -.L4129: -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + beq .L4166 @, +.L4132: +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp225, lsls r3, r3, #16 @ tmp226, tmp225, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r4, r4, #20 @ ivtmp.2272, - lsrs r3, r3, #16 @ ivtmp.2273, tmp226, +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r4, r4, #20 @ ivtmp.2277, + lsrs r3, r3, #16 @ ivtmp.2278, tmp226, cmp r2, #16 @ i, - bne .L4133 @, -@ Patches/../C_code.c:10083: if (coord.x != (-1)) + bne .L4136 @, +@ Patches/../C_code.c:10088: if (coord.x != (-1)) adds r3, r7, #1 @ tmp315, result$x, - beq .L4134 @, -@ Patches/../C_code.c:10086: coord.y = coord.y * 8; + beq .L4137 @, +@ Patches/../C_code.c:10091: coord.y = coord.y * 8; lsls r1, r0, #3 @ tmp228, result$y, -@ Patches/../C_code.c:10087: UpdateStatArrowSprites(coord.x, coord.y, 1); +@ Patches/../C_code.c:10092: UpdateStatArrowSprites(coord.x, coord.y, 1); lsls r1, r1, #16 @ tmp229, tmp228, -@ Patches/../C_code.c:10085: coord.x = (coord.x + 2) * 8; +@ Patches/../C_code.c:10090: coord.x = (coord.x + 2) * 8; adds r7, r7, #2 @ tmp230, -@ Patches/../C_code.c:10087: UpdateStatArrowSprites(coord.x, coord.y, 1); - ldr r3, .L4164+20 @ tmp234, +@ Patches/../C_code.c:10092: UpdateStatArrowSprites(coord.x, coord.y, 1); + ldr r3, .L4167+20 @ tmp234, asrs r1, r1, #16 @ tmp229, tmp229, lsls r0, r7, #3 @ tmp233, tmp230, subs r2, r2, #15 @, bl .L14 @ -.L4134: -@ Patches/../C_code.c:10090: if (displayIcon) +.L4137: +@ Patches/../C_code.c:10095: if (displayIcon) cmp r6, #19 @ _2, - bhi .L4119 @, -@ Patches/../C_code.c:10092: coord = GetTrvCoordFromStatScreenLayout(); + bhi .L4122 @, +@ Patches/../C_code.c:10097: coord = GetTrvCoordFromStatScreenLayout(); bl GetTrvCoordFromStatScreenLayout @ lsls r1, r0, #16 @ coord$x, tmp235, asrs r1, r1, #16 @ coord$x, coord$x, str r0, [sp, #12] @ tmp235, coord asrs r3, r0, #16 @ coord$y, tmp235, -@ Patches/../C_code.c:10104: if (gStatScreen.unit->state & US_RESCUED) +@ Patches/../C_code.c:10109: if (gStatScreen.unit->state & US_RESCUED) ldr r0, [r5, #12] @ _128, gStatScreen.unit -@ Patches/../C_code.c:10093: if (coord.x != (-1)) +@ Patches/../C_code.c:10098: if (coord.x != (-1)) adds r2, r1, #1 @ tmp316, coord$x, - bne .L4136 @, -@ Patches/../C_code.c:10104: if (gStatScreen.unit->state & US_RESCUED) + bne .L4139 @, +@ Patches/../C_code.c:10109: if (gStatScreen.unit->state & US_RESCUED) ldr r3, [r0, #12] @ pretmp_144->state, pretmp_144->state -@ Patches/../C_code.c:10104: if (gStatScreen.unit->state & US_RESCUED) +@ Patches/../C_code.c:10109: if (gStatScreen.unit->state & US_RESCUED) lsls r3, r3, #26 @ tmp317, pretmp_144->state, - bpl .L4119 @, -.L4160: - ldr r4, .L4164+24 @ tmp300, - ldr r6, .L4164+28 @ tmp301, -.L4137: -@ Patches/../C_code.c:10111: 4, 10, 86, gObject_8x8, TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); + bpl .L4122 @, +.L4163: + ldr r4, .L4167+24 @ tmp300, + ldr r6, .L4167+28 @ tmp301, +.L4140: +@ Patches/../C_code.c:10116: 4, 10, 86, gObject_8x8, TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); mov r2, sp @ tmp333, movs r1, #16 @ tmp335, ldrb r3, [r0, #27] @ tmp287, @@ -32440,137 +32471,137 @@ PageNumCtrl_DisplayBlinkIcons: adds r2, r2, r1 @ tmp334, tmp333, tmp335 lsls r3, r3, #1 @ tmp291, tmp289, ldrh r3, [r2, r3] @ tmp292, palidLut -@ Patches/../C_code.c:10110: PutSprite( - ldr r2, .L4164+32 @ tmp336, +@ Patches/../C_code.c:10115: PutSprite( + ldr r2, .L4167+32 @ tmp336, mov ip, r2 @ tmp336, tmp336 -@ Patches/../C_code.c:10111: 4, 10, 86, gObject_8x8, TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); +@ Patches/../C_code.c:10116: 4, 10, 86, gObject_8x8, TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); lsls r3, r3, #28 @ tmp295, tmp292, lsrs r3, r3, #16 @ tmp294, tmp295, -@ Patches/../C_code.c:10110: PutSprite( +@ Patches/../C_code.c:10115: PutSprite( add r3, r3, ip @ tmp296, tmp336 str r3, [sp] @ tmp296, movs r2, #86 @, movs r3, r4 @, tmp300 movs r0, #4 @, subs r1, r1, #6 @, - bl .L143 @ -@ Patches/../C_code.c:10115: } - b .L4119 @ -.L4163: -@ Patches/../C_code.c:10032: if (i < 8) + bl .L146 @ +@ Patches/../C_code.c:10120: } + b .L4122 @ +.L4166: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4130 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r0, r3 @ tmp222, ivtmp.2273 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4133 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r0, r3 @ tmp222, ivtmp.2278 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp223, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r0, r0, #16 @ tmp222, lsls r0, r0, #16 @ result$y, tmp222, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp224, tmp223, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; movs r7, #13 @ result$x, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r0, r0, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r4, r4, #20 @ ivtmp.2272, - lsrs r3, r3, #16 @ ivtmp.2273, tmp224, - b .L4133 @ -.L4162: -@ Patches/../C_code.c:10032: if (i < 8) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r4, r4, #20 @ ivtmp.2277, + lsrs r3, r3, #16 @ ivtmp.2278, tmp224, + b .L4136 @ +.L4165: +@ Patches/../C_code.c:10037: if (i < 8) cmp r2, #7 @ i, - bgt .L4124 @, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); - movs r7, r3 @ tmp208, ivtmp.2282 -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) + bgt .L4127 @, +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); + movs r7, r3 @ tmp208, ivtmp.2287 +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r3, r3, #2 @ tmp209, -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); adds r7, r7, #16 @ tmp208, lsls r7, r7, #16 @ result$y, tmp208, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) lsls r3, r3, #16 @ tmp210, tmp209, -@ Patches/../C_code.c:10034: result.x = 0xD; +@ Patches/../C_code.c:10039: result.x = 0xD; adds r0, r0, #1 @ result$x, mov ip, r0 @ result$x, result$x -@ Patches/../C_code.c:10035: result.y = 3 + (i * 2); +@ Patches/../C_code.c:10040: result.y = 3 + (i * 2); asrs r7, r7, #16 @ result$y, result$y, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) adds r2, r2, #1 @ i, -@ Patches/../C_code.c:10028: for (int i = 0; i < 16; i++) - adds r1, r1, #20 @ ivtmp.2281, - lsrs r3, r3, #16 @ ivtmp.2282, tmp210, - b .L4127 @ -.L4130: -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); - lsls r0, r3, #16 @ result$y, ivtmp.2273, -@ Patches/../C_code.c:10039: result.x = 0x15; +@ Patches/../C_code.c:10033: for (int i = 0; i < 16; i++) + adds r1, r1, #20 @ ivtmp.2286, + lsrs r3, r3, #16 @ ivtmp.2287, tmp210, + b .L4130 @ +.L4133: +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); + lsls r0, r3, #16 @ result$y, ivtmp.2278, +@ Patches/../C_code.c:10044: result.x = 0x15; movs r7, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r0, r0, #16 @ result$y, result$y, - b .L4129 @ -.L4124: -@ Patches/../C_code.c:10039: result.x = 0x15; + b .L4132 @ +.L4127: +@ Patches/../C_code.c:10044: result.x = 0x15; movs r0, #21 @ result$x, -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); - lsls r7, r3, #16 @ result$y, ivtmp.2282, -@ Patches/../C_code.c:10039: result.x = 0x15; +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); + lsls r7, r3, #16 @ result$y, ivtmp.2287, +@ Patches/../C_code.c:10044: result.x = 0x15; mov ip, r0 @ result$x, result$x -@ Patches/../C_code.c:10040: result.y = 3 + ((i - 8) * 2); +@ Patches/../C_code.c:10045: result.y = 3 + ((i - 8) * 2); asrs r7, r7, #16 @ result$y, result$y, - b .L4123 @ -.L4136: -@ Patches/../C_code.c:10096: coord.y = (coord.y * 8) + 6; + b .L4126 @ +.L4139: +@ Patches/../C_code.c:10101: coord.y = (coord.y * 8) + 6; lsls r3, r3, #3 @ tmp246, coord$y, -@ Patches/../C_code.c:10096: coord.y = (coord.y * 8) + 6; +@ Patches/../C_code.c:10101: coord.y = (coord.y * 8) + 6; adds r3, r3, #6 @ tmp248, -@ Patches/../C_code.c:10099: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); +@ Patches/../C_code.c:10104: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); movs r6, #16 @ tmp330, -@ Patches/../C_code.c:10097: PutSprite( +@ Patches/../C_code.c:10102: PutSprite( lsls r2, r3, #16 @ tmp249, tmp248, -@ Patches/../C_code.c:10099: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); +@ Patches/../C_code.c:10104: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); ldrb r3, [r0, #27] @ tmp255, mov r0, sp @ tmp328, lsrs r3, r3, #6 @ tmp257, tmp255, adds r0, r0, r6 @ tmp329, tmp328, tmp330 lsls r3, r3, #1 @ tmp259, tmp257, ldrh r3, [r0, r3] @ tmp260, palidLut -@ Patches/../C_code.c:10097: PutSprite( - ldr r0, .L4164+32 @ tmp331, +@ Patches/../C_code.c:10102: PutSprite( + ldr r0, .L4167+32 @ tmp331, mov ip, r0 @ tmp331, tmp331 -@ Patches/../C_code.c:10095: coord.x = (coord.x + 2) * 8; +@ Patches/../C_code.c:10100: coord.x = (coord.x + 2) * 8; adds r1, r1, #2 @ tmp250, -@ Patches/../C_code.c:10099: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); +@ Patches/../C_code.c:10104: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); lsls r3, r3, #28 @ tmp263, tmp260, -@ Patches/../C_code.c:10097: PutSprite( - ldr r4, .L4164+24 @ tmp300, -@ Patches/../C_code.c:10095: coord.x = (coord.x + 2) * 8; +@ Patches/../C_code.c:10102: PutSprite( + ldr r4, .L4167+24 @ tmp300, +@ Patches/../C_code.c:10100: coord.x = (coord.x + 2) * 8; lsls r1, r1, #3 @ tmp252, tmp250, -@ Patches/../C_code.c:10099: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); +@ Patches/../C_code.c:10104: TILEREF(3, 0xF & palidLut[gStatScreen.unit->rescue >> 6]) + OAM2_LAYER(2)); lsrs r3, r3, #16 @ tmp262, tmp263, -@ Patches/../C_code.c:10097: PutSprite( +@ Patches/../C_code.c:10102: PutSprite( add r3, r3, ip @ tmp264, tmp331 lsls r1, r1, #16 @ tmp253, tmp252, movs r0, #4 @, str r3, [sp] @ tmp264, - ldr r6, .L4164+28 @ tmp301, + ldr r6, .L4167+28 @ tmp301, movs r3, r4 @, tmp300 asrs r2, r2, #16 @ tmp249, tmp249, asrs r1, r1, #16 @ tmp253, tmp253, - bl .L143 @ -@ Patches/../C_code.c:10104: if (gStatScreen.unit->state & US_RESCUED) + bl .L146 @ +@ Patches/../C_code.c:10109: if (gStatScreen.unit->state & US_RESCUED) ldr r0, [r5, #12] @ _128, gStatScreen.unit -@ Patches/../C_code.c:10104: if (gStatScreen.unit->state & US_RESCUED) +@ Patches/../C_code.c:10109: if (gStatScreen.unit->state & US_RESCUED) ldr r3, [r0, #12] @ _97->state, _97->state -@ Patches/../C_code.c:10104: if (gStatScreen.unit->state & US_RESCUED) +@ Patches/../C_code.c:10109: if (gStatScreen.unit->state & US_RESCUED) lsls r3, r3, #26 @ tmp318, _97->state, - bmi .L4137 @, - b .L4119 @ -.L4165: + bmi .L4140 @, + b .L4122 @ +.L4168: .align 2 -.L4164: +.L4167: .word GetGameClock .word 917516 .word gStatScreen @@ -32583,22 +32614,22 @@ PageNumCtrl_DisplayBlinkIcons: .size PageNumCtrl_DisplayBlinkIcons, .-PageNumCtrl_DisplayBlinkIcons .section .rodata.str1.4 .align 2 -.LC835: +.LC836: .ascii "0Seed\000" .align 2 -.LC839: +.LC840: .ascii "1Seed\000" .align 2 -.LC841: +.LC842: .ascii "2Seed\000" .align 2 -.LC843: +.LC844: .ascii "3Seed\000" .align 2 -.LC845: +.LC846: .ascii "4Seed\000" .align 2 -.LC847: +.LC848: .ascii "5Seed\000" .text .align 1 @@ -32612,35 +32643,35 @@ DrawBarsOrGrowths: @ Function supports interworking. @ args = 0, pretend = 0, frame = 8 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:10120: int disp = RandBitflags->disp; - ldr r3, .L4189 @ tmp163, -@ Patches/../C_code.c:10118: { // in 807FDF0 fe7, 806ED34 fe6 +@ Patches/../C_code.c:10125: int disp = RandBitflags->disp; + ldr r3, .L4192 @ tmp163, +@ Patches/../C_code.c:10123: { // in 807FDF0 fe7, 806ED34 fe6 push {r4, r5, r6, r7, lr} @ mov lr, r9 @, mov r7, r8 @, -@ Patches/../C_code.c:10120: int disp = RandBitflags->disp; +@ Patches/../C_code.c:10125: int disp = RandBitflags->disp; ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r5, [r3, #3] @ *RandBitflags.422_1, *RandBitflags.422_1 -@ Patches/../C_code.c:10121: struct Unit * unit = gStatScreen.unit; - ldr r3, .L4189+4 @ tmp170, + ldrb r5, [r3, #3] @ *RandBitflags.423_1, *RandBitflags.423_1 +@ Patches/../C_code.c:10126: struct Unit * unit = gStatScreen.unit; + ldr r3, .L4192+4 @ tmp170, ldr r6, [r3, #12] @ unit, gStatScreen.unit -@ Patches/../C_code.c:10131: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:10136: if (UNIT_FACTION(unit) != FACTION_BLUE) movs r3, #11 @ tmp171, movs r2, #192 @ tmp172, -@ Patches/../C_code.c:10118: { // in 807FDF0 fe7, 806ED34 fe6 +@ Patches/../C_code.c:10123: { // in 807FDF0 fe7, 806ED34 fe6 push {r7, lr} @ -@ Patches/../C_code.c:10131: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:10136: if (UNIT_FACTION(unit) != FACTION_BLUE) ldrsb r3, [r6, r3] @ tmp171, -@ Patches/../C_code.c:10118: { // in 807FDF0 fe7, 806ED34 fe6 +@ Patches/../C_code.c:10123: { // in 807FDF0 fe7, 806ED34 fe6 sub sp, sp, #20 @,, -@ Patches/../C_code.c:10120: int disp = RandBitflags->disp; - lsrs r5, r5, #7 @ _2, *RandBitflags.422_1, -@ Patches/../C_code.c:10131: if (UNIT_FACTION(unit) != FACTION_BLUE) +@ Patches/../C_code.c:10125: int disp = RandBitflags->disp; + lsrs r5, r5, #7 @ _2, *RandBitflags.423_1, +@ Patches/../C_code.c:10136: if (UNIT_FACTION(unit) != FACTION_BLUE) tst r2, r3 @ tmp172, tmp171 - beq .L4167 @, + beq .L4170 @, movs r5, #1 @ _2, -.L4167: -@ Patches/../C_code.c:10136: barCount += DrawStatByID(barCount, 5, 1, disp, unit, 0); +.L4170: +@ Patches/../C_code.c:10141: barCount += DrawStatByID(barCount, 5, 1, disp, unit, 0); movs r3, #0 @ tmp174, movs r2, #1 @, movs r1, #5 @, @@ -32649,22 +32680,22 @@ DrawBarsOrGrowths: movs r3, r5 @, _2 str r6, [sp] @ unit, bl DrawStatByID @ -@ Patches/../C_code.c:10137: barCount += DrawStatByID(barCount, 5, 3, disp, unit, 1); +@ Patches/../C_code.c:10142: barCount += DrawStatByID(barCount, 5, 3, disp, unit, 1); movs r3, #1 @ tmp175, movs r2, #3 @, movs r1, #5 @, str r3, [sp, #4] @ tmp175, str r6, [sp] @ unit, movs r3, r5 @, _2 -@ Patches/../C_code.c:10136: barCount += DrawStatByID(barCount, 5, 1, disp, unit, 0); +@ Patches/../C_code.c:10141: barCount += DrawStatByID(barCount, 5, 1, disp, unit, 0); movs r4, r0 @ _20, tmp249 -@ Patches/../C_code.c:10137: barCount += DrawStatByID(barCount, 5, 3, disp, unit, 1); +@ Patches/../C_code.c:10142: barCount += DrawStatByID(barCount, 5, 3, disp, unit, 1); bl DrawStatByID @ -@ Patches/../C_code.c:10138: barCount += DrawStatByID(barCount, 5, 5, disp, unit, 2); +@ Patches/../C_code.c:10143: barCount += DrawStatByID(barCount, 5, 5, disp, unit, 2); movs r3, #2 @ tmp176, -@ Patches/../C_code.c:10137: barCount += DrawStatByID(barCount, 5, 3, disp, unit, 1); +@ Patches/../C_code.c:10142: barCount += DrawStatByID(barCount, 5, 3, disp, unit, 1); adds r4, r4, r0 @ barCount, _20, tmp250 -@ Patches/../C_code.c:10138: barCount += DrawStatByID(barCount, 5, 5, disp, unit, 2); +@ Patches/../C_code.c:10143: barCount += DrawStatByID(barCount, 5, 5, disp, unit, 2); movs r2, #5 @, movs r1, #5 @, movs r0, r4 @, barCount @@ -32672,11 +32703,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10139: barCount += DrawStatByID(barCount, 5, 7, disp, unit, 3); +@ Patches/../C_code.c:10144: barCount += DrawStatByID(barCount, 5, 7, disp, unit, 3); movs r3, #3 @ tmp177, -@ Patches/../C_code.c:10138: barCount += DrawStatByID(barCount, 5, 5, disp, unit, 2); +@ Patches/../C_code.c:10143: barCount += DrawStatByID(barCount, 5, 5, disp, unit, 2); adds r4, r4, r0 @ barCount, barCount, tmp251 -@ Patches/../C_code.c:10139: barCount += DrawStatByID(barCount, 5, 7, disp, unit, 3); +@ Patches/../C_code.c:10144: barCount += DrawStatByID(barCount, 5, 7, disp, unit, 3); movs r2, #7 @, movs r1, #5 @, movs r0, r4 @, barCount @@ -32684,11 +32715,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10140: barCount += DrawStatByID(barCount, 5, 9, disp, unit, 4); +@ Patches/../C_code.c:10145: barCount += DrawStatByID(barCount, 5, 9, disp, unit, 4); movs r3, #4 @ tmp178, -@ Patches/../C_code.c:10139: barCount += DrawStatByID(barCount, 5, 7, disp, unit, 3); +@ Patches/../C_code.c:10144: barCount += DrawStatByID(barCount, 5, 7, disp, unit, 3); adds r4, r4, r0 @ barCount, barCount, tmp252 -@ Patches/../C_code.c:10140: barCount += DrawStatByID(barCount, 5, 9, disp, unit, 4); +@ Patches/../C_code.c:10145: barCount += DrawStatByID(barCount, 5, 9, disp, unit, 4); movs r2, #9 @, movs r1, #5 @, movs r0, r4 @, barCount @@ -32696,11 +32727,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10141: barCount += DrawStatByID(barCount, 5, 11, disp, unit, 5); +@ Patches/../C_code.c:10146: barCount += DrawStatByID(barCount, 5, 11, disp, unit, 5); movs r3, #5 @ tmp179, -@ Patches/../C_code.c:10140: barCount += DrawStatByID(barCount, 5, 9, disp, unit, 4); +@ Patches/../C_code.c:10145: barCount += DrawStatByID(barCount, 5, 9, disp, unit, 4); adds r4, r4, r0 @ barCount, barCount, tmp253 -@ Patches/../C_code.c:10141: barCount += DrawStatByID(barCount, 5, 11, disp, unit, 5); +@ Patches/../C_code.c:10146: barCount += DrawStatByID(barCount, 5, 11, disp, unit, 5); movs r2, #11 @, movs r1, #5 @, movs r0, r4 @, barCount @@ -32708,11 +32739,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10142: barCount += DrawStatByID(barCount, 5, 13, disp, unit, 6); +@ Patches/../C_code.c:10147: barCount += DrawStatByID(barCount, 5, 13, disp, unit, 6); movs r3, #6 @ tmp180, -@ Patches/../C_code.c:10141: barCount += DrawStatByID(barCount, 5, 11, disp, unit, 5); +@ Patches/../C_code.c:10146: barCount += DrawStatByID(barCount, 5, 11, disp, unit, 5); adds r4, r4, r0 @ barCount, barCount, tmp254 -@ Patches/../C_code.c:10142: barCount += DrawStatByID(barCount, 5, 13, disp, unit, 6); +@ Patches/../C_code.c:10147: barCount += DrawStatByID(barCount, 5, 13, disp, unit, 6); movs r2, #13 @, movs r1, #5 @, movs r0, r4 @, barCount @@ -32720,11 +32751,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10143: barCount += DrawStatByID(barCount, 5, 15, disp, unit, 7); +@ Patches/../C_code.c:10148: barCount += DrawStatByID(barCount, 5, 15, disp, unit, 7); movs r3, #7 @ tmp181, -@ Patches/../C_code.c:10142: barCount += DrawStatByID(barCount, 5, 13, disp, unit, 6); +@ Patches/../C_code.c:10147: barCount += DrawStatByID(barCount, 5, 13, disp, unit, 6); adds r4, r4, r0 @ barCount, barCount, tmp255 -@ Patches/../C_code.c:10143: barCount += DrawStatByID(barCount, 5, 15, disp, unit, 7); +@ Patches/../C_code.c:10148: barCount += DrawStatByID(barCount, 5, 15, disp, unit, 7); movs r2, #15 @, movs r1, #5 @, movs r0, r4 @, barCount @@ -32732,11 +32763,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10144: barCount += DrawStatByID(barCount, 13, 1, disp, unit, 8); +@ Patches/../C_code.c:10149: barCount += DrawStatByID(barCount, 13, 1, disp, unit, 8); movs r3, #8 @ tmp182, -@ Patches/../C_code.c:10143: barCount += DrawStatByID(barCount, 5, 15, disp, unit, 7); +@ Patches/../C_code.c:10148: barCount += DrawStatByID(barCount, 5, 15, disp, unit, 7); adds r4, r4, r0 @ barCount, barCount, tmp256 -@ Patches/../C_code.c:10144: barCount += DrawStatByID(barCount, 13, 1, disp, unit, 8); +@ Patches/../C_code.c:10149: barCount += DrawStatByID(barCount, 13, 1, disp, unit, 8); movs r2, #1 @, movs r1, #13 @, movs r0, r4 @, barCount @@ -32744,11 +32775,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10145: barCount += DrawStatByID(barCount, 13, 3, disp, unit, 9); +@ Patches/../C_code.c:10150: barCount += DrawStatByID(barCount, 13, 3, disp, unit, 9); movs r3, #9 @ tmp183, -@ Patches/../C_code.c:10144: barCount += DrawStatByID(barCount, 13, 1, disp, unit, 8); +@ Patches/../C_code.c:10149: barCount += DrawStatByID(barCount, 13, 1, disp, unit, 8); adds r4, r4, r0 @ barCount, barCount, tmp257 -@ Patches/../C_code.c:10145: barCount += DrawStatByID(barCount, 13, 3, disp, unit, 9); +@ Patches/../C_code.c:10150: barCount += DrawStatByID(barCount, 13, 3, disp, unit, 9); movs r2, #3 @, movs r1, #13 @, movs r0, r4 @, barCount @@ -32756,11 +32787,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10146: barCount += DrawStatByID(barCount, 13, 5, disp, unit, 10); +@ Patches/../C_code.c:10151: barCount += DrawStatByID(barCount, 13, 5, disp, unit, 10); movs r3, #10 @ tmp184, -@ Patches/../C_code.c:10145: barCount += DrawStatByID(barCount, 13, 3, disp, unit, 9); +@ Patches/../C_code.c:10150: barCount += DrawStatByID(barCount, 13, 3, disp, unit, 9); adds r4, r4, r0 @ barCount, barCount, tmp258 -@ Patches/../C_code.c:10146: barCount += DrawStatByID(barCount, 13, 5, disp, unit, 10); +@ Patches/../C_code.c:10151: barCount += DrawStatByID(barCount, 13, 5, disp, unit, 10); movs r2, #5 @, movs r1, #13 @, movs r0, r4 @, barCount @@ -32768,11 +32799,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10147: barCount += DrawStatByID(barCount, 13, 7, disp, unit, 11); +@ Patches/../C_code.c:10152: barCount += DrawStatByID(barCount, 13, 7, disp, unit, 11); movs r3, #11 @ tmp185, -@ Patches/../C_code.c:10146: barCount += DrawStatByID(barCount, 13, 5, disp, unit, 10); +@ Patches/../C_code.c:10151: barCount += DrawStatByID(barCount, 13, 5, disp, unit, 10); adds r4, r4, r0 @ barCount, barCount, tmp259 -@ Patches/../C_code.c:10147: barCount += DrawStatByID(barCount, 13, 7, disp, unit, 11); +@ Patches/../C_code.c:10152: barCount += DrawStatByID(barCount, 13, 7, disp, unit, 11); movs r2, #7 @, movs r1, #13 @, movs r0, r4 @, barCount @@ -32780,11 +32811,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10148: barCount += DrawStatByID(barCount, 13, 9, disp, unit, 12); +@ Patches/../C_code.c:10153: barCount += DrawStatByID(barCount, 13, 9, disp, unit, 12); movs r3, #12 @ tmp186, -@ Patches/../C_code.c:10147: barCount += DrawStatByID(barCount, 13, 7, disp, unit, 11); +@ Patches/../C_code.c:10152: barCount += DrawStatByID(barCount, 13, 7, disp, unit, 11); adds r4, r4, r0 @ barCount, barCount, tmp260 -@ Patches/../C_code.c:10148: barCount += DrawStatByID(barCount, 13, 9, disp, unit, 12); +@ Patches/../C_code.c:10153: barCount += DrawStatByID(barCount, 13, 9, disp, unit, 12); movs r2, #9 @, movs r1, #13 @, movs r0, r4 @, barCount @@ -32792,11 +32823,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10149: barCount += DrawStatByID(barCount, 13, 11, disp, unit, 13); +@ Patches/../C_code.c:10154: barCount += DrawStatByID(barCount, 13, 11, disp, unit, 13); movs r3, #13 @ tmp187, -@ Patches/../C_code.c:10148: barCount += DrawStatByID(barCount, 13, 9, disp, unit, 12); +@ Patches/../C_code.c:10153: barCount += DrawStatByID(barCount, 13, 9, disp, unit, 12); adds r4, r4, r0 @ barCount, barCount, tmp261 -@ Patches/../C_code.c:10149: barCount += DrawStatByID(barCount, 13, 11, disp, unit, 13); +@ Patches/../C_code.c:10154: barCount += DrawStatByID(barCount, 13, 11, disp, unit, 13); movs r2, #11 @, movs r1, #13 @, movs r0, r4 @, barCount @@ -32804,11 +32835,11 @@ DrawBarsOrGrowths: str r6, [sp] @ unit, movs r3, r5 @, _2 bl DrawStatByID @ -@ Patches/../C_code.c:10150: barCount += DrawStatByID(barCount, 13, 13, disp, unit, 14); +@ Patches/../C_code.c:10155: barCount += DrawStatByID(barCount, 13, 13, disp, unit, 14); movs r3, #14 @ tmp188, -@ Patches/../C_code.c:10149: barCount += DrawStatByID(barCount, 13, 11, disp, unit, 13); +@ Patches/../C_code.c:10154: barCount += DrawStatByID(barCount, 13, 11, disp, unit, 13); adds r4, r4, r0 @ barCount, barCount, tmp262 -@ Patches/../C_code.c:10150: barCount += DrawStatByID(barCount, 13, 13, disp, unit, 14); +@ Patches/../C_code.c:10155: barCount += DrawStatByID(barCount, 13, 13, disp, unit, 14); movs r2, #13 @, movs r1, #13 @, str r3, [sp, #4] @ tmp188, @@ -32816,24 +32847,24 @@ DrawBarsOrGrowths: movs r3, r5 @, _2 str r6, [sp] @ unit, bl DrawStatByID @ -@ Patches/../C_code.c:10151: barCount += DrawStatByID(barCount, 13, 15, disp, unit, 15); +@ Patches/../C_code.c:10156: barCount += DrawStatByID(barCount, 13, 15, disp, unit, 15); movs r3, #15 @ tmp190, movs r2, #15 @, movs r1, #13 @, str r3, [sp, #4] @ tmp190, str r6, [sp] @ unit, movs r3, r5 @, _2 -@ Patches/../C_code.c:10150: barCount += DrawStatByID(barCount, 13, 13, disp, unit, 14); +@ Patches/../C_code.c:10155: barCount += DrawStatByID(barCount, 13, 13, disp, unit, 14); adds r0, r4, r0 @ barCount, barCount, tmp263 -@ Patches/../C_code.c:10151: barCount += DrawStatByID(barCount, 13, 15, disp, unit, 15); +@ Patches/../C_code.c:10156: barCount += DrawStatByID(barCount, 13, 15, disp, unit, 15); bl DrawStatByID @ -@ Patches/../C_code.c:10172: if (IsAnythingRandomized()) +@ Patches/../C_code.c:10177: if (IsAnythingRandomized()) bl IsAnythingRandomized @ -@ Patches/../C_code.c:10172: if (IsAnythingRandomized()) +@ Patches/../C_code.c:10177: if (IsAnythingRandomized()) cmp r0, #0 @ tmp264, - bne .L4188 @, -.L4166: -@ Patches/../C_code.c:10216: } + bne .L4191 @, +.L4169: +@ Patches/../C_code.c:10221: } add sp, sp, #20 @,, @ sp needed @ pop {r6, r7} @@ -32842,147 +32873,147 @@ DrawBarsOrGrowths: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L4188: -@ Patches/../C_code.c:10179: SetupDebugFontForBG(0, VramDest_DebugFont); - ldr r3, .L4189+8 @ tmp191, +.L4191: +@ Patches/../C_code.c:10184: SetupDebugFontForBG(0, VramDest_DebugFont); + ldr r3, .L4192+8 @ tmp191, movs r0, #0 @, ldr r1, [r3] @ VramDest_DebugFont, VramDest_DebugFont - ldr r3, .L4189+12 @ tmp193, + ldr r3, .L4192+12 @ tmp193, bl .L14 @ -@ Patches/../C_code.c:10180: switch (RecruitValues->recruitment) - ldr r3, .L4189+16 @ tmp195, +@ Patches/../C_code.c:10185: switch (RecruitValues->recruitment) + ldr r3, .L4192+16 @ tmp195, ldr r3, [r3] @ RecruitValues, RecruitValues - ldrb r3, [r3] @ *RecruitValues.424_8, *RecruitValues.424_8 - lsls r3, r3, #29 @ tmp200, *RecruitValues.424_8, -@ Patches/../C_code.c:10180: switch (RecruitValues->recruitment) + ldrb r3, [r3] @ *RecruitValues.425_8, *RecruitValues.425_8 + lsls r3, r3, #29 @ tmp200, *RecruitValues.425_8, +@ Patches/../C_code.c:10185: switch (RecruitValues->recruitment) lsrs r3, r3, #29 @ tmp203, tmp200, cmp r3, #5 @ tmp203, - bhi .L4169 @, - ldr r2, .L4189+20 @ tmp209, + bhi .L4172 @, + ldr r2, .L4192+20 @ tmp209, lsls r3, r3, #2 @ tmp207, tmp203, ldr r3, [r2, r3] @ tmp210, mov pc, r3 @ tmp210 .section .rodata .align 2 -.L4171: +.L4174: + .word .L4179 + .word .L4178 + .word .L4177 .word .L4176 .word .L4175 - .word .L4174 .word .L4173 - .word .L4172 - .word .L4170 .text -.L4170: -@ Patches/../C_code.c:10209: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "5Seed"); - ldr r1, .L4189+24 @ tmp226, - ldr r0, .L4189+28 @ tmp227, - ldr r7, .L4189+32 @ tmp247, +.L4173: +@ Patches/../C_code.c:10214: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "5Seed"); + ldr r1, .L4192+24 @ tmp226, + ldr r0, .L4192+28 @ tmp227, + ldr r7, .L4192+32 @ tmp247, bl .L62 @ -.L4169: -@ Patches/../C_code.c:10214: PrintDebugNumberToBG(0, 11, 0x13, RandValues->seed); - ldr r3, .L4189+36 @ tmp230, +.L4172: +@ Patches/../C_code.c:10219: PrintDebugNumberToBG(0, 11, 0x13, RandValues->seed); + ldr r3, .L4192+36 @ tmp230, ldr r3, [r3] @ RandValues, RandValues - ldr r3, [r3] @ *RandValues.425_10, *RandValues.425_10 - lsls r3, r3, #12 @ tmp232, *RandValues.425_10, + ldr r3, [r3] @ *RandValues.426_10, *RandValues.426_10 + lsls r3, r3, #12 @ tmp232, *RandValues.426_10, lsrs r4, r3, #12 @ n, tmp232, -@ Patches/../C_code.c:9105: while (n != 0) +@ Patches/../C_code.c:9110: while (n != 0) cmp r3, #0 @ tmp232, - beq .L4166 @, - ldr r3, .L4189+40 @ tmp245, + beq .L4169 @, + ldr r3, .L4192+40 @ tmp245, mov r9, r3 @ tmp245, tmp245 - ldr r3, .L4189+44 @ tmp246, + ldr r3, .L4192+44 @ tmp246, movs r5, #14 @ tmp248, mov r8, r3 @ tmp246, tmp246 - ldr r6, .L4189+48 @ ivtmp.2293, - ldr r7, .L4189+32 @ tmp247, + ldr r6, .L4192+48 @ ivtmp.2298, + ldr r7, .L4192+32 @ tmp247, add r5, r5, sp @ tmp248, -.L4177: -@ Patches/../C_code.c:9107: u16 c = '0' + Mod(n, 10); +.L4180: +@ Patches/../C_code.c:9112: u16 c = '0' + Mod(n, 10); movs r1, #10 @, movs r0, r4 @, n - bl .L397 @ -@ Patches/../C_code.c:9107: u16 c = '0' + Mod(n, 10); + bl .L400 @ +@ Patches/../C_code.c:9112: u16 c = '0' + Mod(n, 10); adds r0, r0, #48 @ tmp236, -@ Patches/../C_code.c:9109: n /= 10; +@ Patches/../C_code.c:9114: n /= 10; movs r1, #10 @, -@ Patches/../C_code.c:9107: u16 c = '0' + Mod(n, 10); +@ Patches/../C_code.c:9112: u16 c = '0' + Mod(n, 10); strh r0, [r5] @ tmp236, c -@ Patches/../C_code.c:9109: n /= 10; +@ Patches/../C_code.c:9114: n /= 10; movs r0, r4 @, n - bl .L208 @ -@ Patches/../C_code.c:9110: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); + bl .L211 @ +@ Patches/../C_code.c:9115: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); movs r1, r5 @, tmp248 -@ Patches/../C_code.c:9109: n /= 10; +@ Patches/../C_code.c:9114: n /= 10; movs r4, r0 @ n, tmp266 -@ Patches/../C_code.c:9110: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); - movs r0, r6 @, ivtmp.2293 +@ Patches/../C_code.c:9115: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(x, y), (char *)&c); + movs r0, r6 @, ivtmp.2298 bl .L62 @ -@ Patches/../C_code.c:9105: while (n != 0) - subs r6, r6, #2 @ ivtmp.2293, +@ Patches/../C_code.c:9110: while (n != 0) + subs r6, r6, #2 @ ivtmp.2298, cmp r4, #0 @ n, - bne .L4177 @, - b .L4166 @ -.L4172: -@ Patches/../C_code.c:10204: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "4Seed"); - ldr r1, .L4189+52 @ tmp223, - ldr r0, .L4189+28 @ tmp224, - ldr r7, .L4189+32 @ tmp247, - bl .L62 @ -@ Patches/../C_code.c:10205: break; - b .L4169 @ -.L4176: -@ Patches/../C_code.c:10184: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "0Seed"); - ldr r1, .L4189+56 @ tmp211, - ldr r0, .L4189+28 @ tmp212, - ldr r7, .L4189+32 @ tmp247, - bl .L62 @ -@ Patches/../C_code.c:10185: break; + bne .L4180 @, b .L4169 @ .L4175: -@ Patches/../C_code.c:10189: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "1Seed"); - ldr r1, .L4189+60 @ tmp214, - ldr r0, .L4189+28 @ tmp215, - ldr r7, .L4189+32 @ tmp247, +@ Patches/../C_code.c:10209: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "4Seed"); + ldr r1, .L4192+52 @ tmp223, + ldr r0, .L4192+28 @ tmp224, + ldr r7, .L4192+32 @ tmp247, + bl .L62 @ +@ Patches/../C_code.c:10210: break; + b .L4172 @ +.L4179: +@ Patches/../C_code.c:10189: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "0Seed"); + ldr r1, .L4192+56 @ tmp211, + ldr r0, .L4192+28 @ tmp212, + ldr r7, .L4192+32 @ tmp247, bl .L62 @ @ Patches/../C_code.c:10190: break; - b .L4169 @ -.L4174: -@ Patches/../C_code.c:10194: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "2Seed"); - ldr r1, .L4189+64 @ tmp217, - ldr r0, .L4189+28 @ tmp218, - ldr r7, .L4189+32 @ tmp247, + b .L4172 @ +.L4178: +@ Patches/../C_code.c:10194: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "1Seed"); + ldr r1, .L4192+60 @ tmp214, + ldr r0, .L4192+28 @ tmp215, + ldr r7, .L4192+32 @ tmp247, bl .L62 @ @ Patches/../C_code.c:10195: break; - b .L4169 @ -.L4173: -@ Patches/../C_code.c:10199: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "3Seed"); - ldr r1, .L4189+68 @ tmp220, - ldr r0, .L4189+28 @ tmp221, - ldr r7, .L4189+32 @ tmp247, + b .L4172 @ +.L4177: +@ Patches/../C_code.c:10199: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "2Seed"); + ldr r1, .L4192+64 @ tmp217, + ldr r0, .L4192+28 @ tmp218, + ldr r7, .L4192+32 @ tmp247, bl .L62 @ @ Patches/../C_code.c:10200: break; - b .L4169 @ -.L4190: + b .L4172 @ +.L4176: +@ Patches/../C_code.c:10204: PrintDebugStringToBG(gBG0TilemapBuffer + TILEMAP_INDEX(0, 0x13), "3Seed"); + ldr r1, .L4192+68 @ tmp220, + ldr r0, .L4192+28 @ tmp221, + ldr r7, .L4192+32 @ tmp247, + bl .L62 @ +@ Patches/../C_code.c:10205: break; + b .L4172 @ +.L4193: .align 2 -.L4189: +.L4192: .word RandBitflags .word gStatScreen .word VramDest_DebugFont .word SetupDebugFontForBG .word RecruitValues - .word .L4171 - .word .LC847 + .word .L4174 + .word .LC848 .word gBG0TilemapBuffer+1216 .word PrintDebugStringToBG .word RandValues .word Mod .word __aeabi_idiv .word gBG0TilemapBuffer+1238 - .word .LC845 - .word .LC835 - .word .LC839 - .word .LC841 - .word .LC843 + .word .LC846 + .word .LC836 + .word .LC840 + .word .LC842 + .word .LC844 .size DrawBarsOrGrowths, .-DrawBarsOrGrowths .align 1 .p2align 2,,3 @@ -32996,45 +33027,45 @@ NewDisplayPage0: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:10236: ResetText(); - ldr r3, .L4197 @ tmp115, +@ Patches/../C_code.c:10241: ResetText(); + ldr r3, .L4200 @ tmp115, bl .L14 @ -@ Patches/../C_code.c:10237: ResetIconGraphics_(); - ldr r3, .L4197+4 @ tmp116, +@ Patches/../C_code.c:10242: ResetIconGraphics_(); + ldr r3, .L4200+4 @ tmp116, bl .L14 @ -@ Patches/../C_code.c:10238: InitTexts(); - ldr r3, .L4197+8 @ tmp117, +@ Patches/../C_code.c:10243: InitTexts(); + ldr r3, .L4200+8 @ tmp117, bl .L14 @ -@ Patches/../C_code.c:10239: DisplayLeftPanel(); - ldr r3, .L4197+12 @ tmp118, +@ Patches/../C_code.c:10244: DisplayLeftPanel(); + ldr r3, .L4200+12 @ tmp118, bl .L14 @ -@ Patches/../C_code.c:10245: DisplayTexts(sPage0TextInfo); - ldr r3, .L4197+16 @ tmp120, - ldr r0, .L4197+20 @ tmp119, +@ Patches/../C_code.c:10250: DisplayTexts(sPage0TextInfo); + ldr r3, .L4200+16 @ tmp120, + ldr r0, .L4200+20 @ tmp119, bl .L14 @ -@ Patches/../C_code.c:10246: DrawBarsOrGrowths(); +@ Patches/../C_code.c:10251: DrawBarsOrGrowths(); bl DrawBarsOrGrowths @ -@ Patches/../C_code.c:10260: if (SS_EnableBWL) - ldr r3, .L4197+24 @ tmp121, -@ Patches/../C_code.c:10260: if (SS_EnableBWL) +@ Patches/../C_code.c:10265: if (SS_EnableBWL) + ldr r3, .L4200+24 @ tmp121, +@ Patches/../C_code.c:10265: if (SS_EnableBWL) ldr r3, [r3] @ SS_EnableBWL, SS_EnableBWL cmp r3, #0 @ SS_EnableBWL, - bne .L4196 @, -.L4191: -@ Patches/../C_code.c:10264: } + bne .L4199 @, +.L4194: +@ Patches/../C_code.c:10269: } @ sp needed @ pop {r4} pop {r0} bx r0 -.L4196: -@ Patches/../C_code.c:10262: DisplayBwl(); - ldr r3, .L4197+28 @ tmp123, +.L4199: +@ Patches/../C_code.c:10267: DisplayBwl(); + ldr r3, .L4200+28 @ tmp123, bl .L14 @ -@ Patches/../C_code.c:10264: } - b .L4191 @ -.L4198: +@ Patches/../C_code.c:10269: } + b .L4194 @ +.L4201: .align 2 -.L4197: +.L4200: .word ResetText .word ResetIconGraphics_ .word InitTexts @@ -33063,139 +33094,139 @@ StartShopScreen: push {r5, r6, r7, lr} @ movs r6, r3 @ parent, tmp272 sub sp, sp, #44 @,, -@ Patches/../C_code.c:10307: EndPlayerPhaseSideWindows(); - ldr r3, .L4256 @ tmp162, -@ Patches/../C_code.c:10302: { +@ Patches/../C_code.c:10312: EndPlayerPhaseSideWindows(); + ldr r3, .L4259 @ tmp162, +@ Patches/../C_code.c:10307: { movs r7, r0 @ unit, tmp269 movs r5, r1 @ inventory, tmp270 movs r4, r2 @ shopType, tmp271 -@ Patches/../C_code.c:10307: EndPlayerPhaseSideWindows(); +@ Patches/../C_code.c:10312: EndPlayerPhaseSideWindows(); bl .L14 @ -@ Patches/../C_code.c:10311: proc = Proc_StartBlocking(gProcScr_Shop, parent); - ldr r0, .L4256+4 @ tmp163, -@ Patches/../C_code.c:10309: if (parent != 0) +@ Patches/../C_code.c:10316: proc = Proc_StartBlocking(gProcScr_Shop, parent); + ldr r0, .L4259+4 @ tmp163, +@ Patches/../C_code.c:10314: if (parent != 0) cmp r6, #0 @ parent, - bne .LCB27397 @ - b .L4200 @long jump @ -.LCB27397: -@ Patches/../C_code.c:10311: proc = Proc_StartBlocking(gProcScr_Shop, parent); + bne .LCB27421 @ + b .L4203 @long jump @ +.LCB27421: +@ Patches/../C_code.c:10316: proc = Proc_StartBlocking(gProcScr_Shop, parent); movs r1, r6 @, parent - ldr r3, .L4256+8 @ tmp164, + ldr r3, .L4259+8 @ tmp164, bl .L14 @ mov r10, r0 @ proc, tmp273 -.L4201: +.L4204: movs r3, r4 @ _1, shopType -@ Patches/../C_code.c:10319: if (shopType > 9) +@ Patches/../C_code.c:10324: if (shopType > 9) cmp r4, #9 @ shopType, - bls .L4202 @, -@ Patches/../C_code.c:10321: proc->shopType -= 10; + bls .L4205 @, +@ Patches/../C_code.c:10326: proc->shopType -= 10; subs r3, r3, #10 @ tmp169, lsls r3, r3, #24 @ tmp170, tmp169, lsrs r3, r3, #24 @ _1, tmp170, -.L4202: -@ Patches/../C_code.c:10318: proc->shopType = shopType; +.L4205: +@ Patches/../C_code.c:10323: proc->shopType = shopType; mov r1, r10 @ proc, proc movs r2, #97 @ tmp171, strb r3, [r1, r2] @ _1, proc_27->shopType -@ Patches/../C_code.c:10323: proc->unit = unit; +@ Patches/../C_code.c:10328: proc->unit = unit; str r7, [r1, #44] @ unit, proc_27->unit -@ Patches/../C_code.c:10326: if (inventory != 0) +@ Patches/../C_code.c:10331: if (inventory != 0) cmp r5, #0 @ inventory, - bne .LCB27417 @ - b .L4224 @long jump @ -.LCB27417: -@ Patches/../C_code.c:10374: u16 itemId = *shopItems++; + bne .LCB27441 @ + b .L4227 @long jump @ +.LCB27441: +@ Patches/../C_code.c:10379: u16 itemId = *shopItems++; ldrh r6, [r5] @ prephitmp_13, MEM[(const u16 *)inventory_59(D)] -.L4203: -@ Patches/../C_code.c:10331: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) - ldr r3, .L4256+12 @ tmp174, +.L4206: +@ Patches/../C_code.c:10336: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) + ldr r3, .L4259+12 @ tmp174, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.427_2, *RandBitflags.427_2 -@ Patches/../C_code.c:10331: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) - lsls r3, r3, #28 @ tmp289, *RandBitflags.427_2, - bmi .LCB27429 @ - b .L4226 @long jump @ -.LCB27429: -@ Patches/../C_code.c:10331: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) + ldrb r3, [r3, #1] @ *RandBitflags.428_2, *RandBitflags.428_2 +@ Patches/../C_code.c:10336: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) + lsls r3, r3, #28 @ tmp289, *RandBitflags.428_2, + bmi .LCB27453 @ + b .L4229 @long jump @ +.LCB27453: +@ Patches/../C_code.c:10336: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) cmp r4, #9 @ shopType, - bhi .L4205 @, -@ Patches/../C_code.c:10334: int noise[4] = { 0, 0, 0, 0 }; - ldr r3, .L4256+16 @ tmp189, + bhi .L4208 @, +@ Patches/../C_code.c:10339: int noise[4] = { 0, 0, 0, 0 }; + ldr r3, .L4259+16 @ tmp189, movs r2, #8 @, movs r1, #0 @, add r0, sp, #32 @,, bl .L14 @ add r3, sp, #24 @ tmp254,, mov fp, r3 @ tmp254, tmp254 -.L4206: -@ Patches/../C_code.c:10339: noise[0] = gCh; - ldr r3, .L4256+20 @ tmp201, +.L4209: +@ Patches/../C_code.c:10344: noise[0] = gCh; + ldr r3, .L4259+20 @ tmp201, ldrb r3, [r3] @ gCh, gCh -@ Patches/../C_code.c:10340: noise[1] = proc->shopType; +@ Patches/../C_code.c:10345: noise[1] = proc->shopType; mov r2, r10 @ proc, proc -@ Patches/../C_code.c:10339: noise[0] = gCh; +@ Patches/../C_code.c:10344: noise[0] = gCh; str r3, [sp, #24] @ gCh, noise[0] -@ Patches/../C_code.c:10340: noise[1] = proc->shopType; +@ Patches/../C_code.c:10345: noise[1] = proc->shopType; movs r3, #97 @ tmp204, ldrb r3, [r2, r3] @ tmp205, mov r2, fp @ tmp254, tmp254 str r3, [r2, #4] @ tmp205, noise[1] -@ Patches/../C_code.c:10338: varyByCh = true; +@ Patches/../C_code.c:10343: varyByCh = true; movs r3, #1 @ varyByCh, str r3, [sp, #20] @ varyByCh, %sfp -.L4207: - mov r3, fp @ ivtmp.2330, tmp254 - add r1, sp, #40 @ _31,, .L4210: -@ Patches/../C_code.c:2363: if (!noise[i]) + mov r3, fp @ ivtmp.2335, tmp254 + add r1, sp, #40 @ _31,, +.L4213: +@ Patches/../C_code.c:2368: if (!noise[i]) ldr r2, [r3] @ MEM[(int *)_90], MEM[(int *)_90] cmp r2, #0 @ MEM[(int *)_90], - bne .LCB27459 @ - b .L4252 @long jump @ -.LCB27459: -@ Patches/../C_code.c:2361: for (i = 0; i < 4; i++) - adds r3, r3, #4 @ ivtmp.2330, - cmp r1, r3 @ _31, ivtmp.2330 - bne .L4210 @, -.L4209: -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); + bne .LCB27483 @ + b .L4255 @long jump @ +.LCB27483: +@ Patches/../C_code.c:2366: for (i = 0; i < 4; i++) + adds r3, r3, #4 @ ivtmp.2335, + cmp r1, r3 @ _31, ivtmp.2335 + bne .L4213 @, +.L4212: +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); movs r3, #3 @, mov r2, fp @, tmp254 movs r1, #5 @, movs r0, #10 @, bl HashByte_Global @ -@ Patches/../C_code.c:10343: int term = false; +@ Patches/../C_code.c:10348: int term = false; movs r3, #0 @ term, - mov r7, r10 @ ivtmp.2321, proc + mov r7, r10 @ ivtmp.2326, proc mov r8, r3 @ term, term mov r9, r3 @ tmp266, tmp266 -@ Patches/../C_code.c:10358: if ((i == rareItemSlot) && (RareItemTableSize)) - ldr r3, .L4256+24 @ tmp267, +@ Patches/../C_code.c:10363: if ((i == rareItemSlot) && (RareItemTableSize)) + ldr r3, .L4259+24 @ tmp267, str r3, [sp, #16] @ tmp267, %sfp ldr r3, [sp, #20] @ varyByCh, %sfp -@ Patches/../C_code.c:2369: return HashByte_Global(number, max, noise, offset); +@ Patches/../C_code.c:2374: return HashByte_Global(number, max, noise, offset); str r0, [sp, #12] @ tmp275, %sfp -@ Patches/../C_code.c:10345: for (i = 0; i < 20; i++) +@ Patches/../C_code.c:10350: for (i = 0; i < 20; i++) movs r4, #0 @ i, -@ Patches/../C_code.c:10358: if ((i == rareItemSlot) && (RareItemTableSize)) +@ Patches/../C_code.c:10363: if ((i == rareItemSlot) && (RareItemTableSize)) movs r0, r6 @ prephitmp_13, prephitmp_13 - adds r7, r7, #48 @ ivtmp.2321, + adds r7, r7, #48 @ ivtmp.2326, mov r6, r8 @ term, term mov r8, r3 @ varyByCh, varyByCh - b .L4220 @ -.L4228: + b .L4223 @ +.L4231: movs r0, r4 @ _127, i -@ Patches/../C_code.c:10350: term = true; +@ Patches/../C_code.c:10355: term = true; movs r6, #1 @ term, -.L4211: -@ Patches/../C_code.c:10358: if ((i == rareItemSlot) && (RareItemTableSize)) +.L4214: +@ Patches/../C_code.c:10363: if ((i == rareItemSlot) && (RareItemTableSize)) ldr r3, [sp, #12] @ tmp210, %sfp cmp r3, r4 @ tmp210, i - beq .L4253 @, -.L4217: -@ Patches/../C_code.c:3182: if (!item) + beq .L4256 @, +.L4220: +@ Patches/../C_code.c:3187: if (!item) cmp r0, #0 @ _127, - beq .L4232 @, + beq .L4235 @, mov r3, r9 @ tmp266, tmp266 str r3, [sp, #4] @ tmp266, mov r3, r8 @ varyByCh, varyByCh @@ -33204,66 +33235,66 @@ StartShopScreen: mov r1, fp @, tmp254 movs r3, #1 @, bl RandNewItem.part.0 @ -@ Patches/../C_code.c:10364: itemId = RandNewItem(itemId, noise, i, true, varyByCh, false); +@ Patches/../C_code.c:10369: itemId = RandNewItem(itemId, noise, i, true, varyByCh, false); lsls r0, r0, #16 @ tmp246, tmp277, lsrs r0, r0, #16 @ itemId, tmp246, -.L4218: -@ Patches/../C_code.c:10345: for (i = 0; i < 20; i++) +.L4221: +@ Patches/../C_code.c:10350: for (i = 0; i < 20; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:10367: proc->shopItems[i] = itemId; +@ Patches/../C_code.c:10372: proc->shopItems[i] = itemId; strh r0, [r7] @ itemId, MEM[(short unsigned int *)_44] -@ Patches/../C_code.c:10345: for (i = 0; i < 20; i++) - adds r7, r7, #2 @ ivtmp.2321, +@ Patches/../C_code.c:10350: for (i = 0; i < 20; i++) + adds r7, r7, #2 @ ivtmp.2326, cmp r4, #20 @ i, - beq .L4221 @, -.L4254: -@ Patches/../C_code.c:10347: u16 itemId = *shopItems++; + beq .L4224 @, +.L4257: +@ Patches/../C_code.c:10352: u16 itemId = *shopItems++; ldrh r0, [r5] @ prephitmp_13, MEM[(const u16 *)shopItems_66] -.L4220: -@ Patches/../C_code.c:10347: u16 itemId = *shopItems++; +.L4223: +@ Patches/../C_code.c:10352: u16 itemId = *shopItems++; adds r5, r5, #2 @ inventory, -@ Patches/../C_code.c:10348: if ((!itemId) && (i < 5)) +@ Patches/../C_code.c:10353: if ((!itemId) && (i < 5)) cmp r0, #0 @ prephitmp_13, - bne .L4233 @, -@ Patches/../C_code.c:10348: if ((!itemId) && (i < 5)) + bne .L4236 @, +@ Patches/../C_code.c:10353: if ((!itemId) && (i < 5)) movs r2, #4 @ tmp219, mov r1, r9 @ tmp266, tmp266 lsrs r3, r4, #31 @ tmp220, i, cmp r2, r4 @ tmp219, i adcs r3, r3, r1 @ tmp218, tmp220, tmp266 -@ Patches/../C_code.c:10348: if ((!itemId) && (i < 5)) +@ Patches/../C_code.c:10353: if ((!itemId) && (i < 5)) lsls r3, r3, #24 @ tmp223, tmp218, - bne .L4228 @, -.L4233: -@ Patches/../C_code.c:10353: if ((i >= 5) && (term)) + bne .L4231 @, +.L4236: +@ Patches/../C_code.c:10358: if ((i >= 5) && (term)) movs r3, #1 @ tmp224, cmp r4, #4 @ i, - bgt .L4214 @, + bgt .L4217 @, movs r3, #0 @ tmp224, -.L4214: -@ Patches/../C_code.c:10353: if ((i >= 5) && (term)) +.L4217: +@ Patches/../C_code.c:10358: if ((i >= 5) && (term)) lsls r3, r3, #24 @ tmp229, tmp224, - beq .L4211 @, + beq .L4214 @, cmp r6, #0 @ term, - beq .L4211 @, -@ Patches/../C_code.c:10358: if ((i == rareItemSlot) && (RareItemTableSize)) + beq .L4214 @, +@ Patches/../C_code.c:10363: if ((i == rareItemSlot) && (RareItemTableSize)) movs r0, #0 @ itemId, -@ Patches/../C_code.c:10345: for (i = 0; i < 20; i++) +@ Patches/../C_code.c:10350: for (i = 0; i < 20; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:10367: proc->shopItems[i] = itemId; +@ Patches/../C_code.c:10372: proc->shopItems[i] = itemId; strh r0, [r7] @ itemId, MEM[(short unsigned int *)_44] -@ Patches/../C_code.c:10358: if ((i == rareItemSlot) && (RareItemTableSize)) +@ Patches/../C_code.c:10363: if ((i == rareItemSlot) && (RareItemTableSize)) movs r6, #1 @ term, -@ Patches/../C_code.c:10345: for (i = 0; i < 20; i++) - adds r7, r7, #2 @ ivtmp.2321, +@ Patches/../C_code.c:10350: for (i = 0; i < 20; i++) + adds r7, r7, #2 @ ivtmp.2326, cmp r4, #20 @ i, - bne .L4254 @, -.L4221: -@ Patches/../C_code.c:10380: UpdateShopItemCounts(proc); + bne .L4257 @, +.L4224: +@ Patches/../C_code.c:10385: UpdateShopItemCounts(proc); mov r0, r10 @, proc - ldr r3, .L4256+28 @ tmp252, + ldr r3, .L4259+28 @ tmp252, bl .L14 @ -@ Patches/../C_code.c:10383: } +@ Patches/../C_code.c:10388: } add sp, sp, #44 @,, @ sp needed @ pop {r4, r5, r6, r7} @@ -33274,88 +33305,88 @@ StartShopScreen: pop {r4, r5, r6, r7} pop {r0} bx r0 -.L4205: -@ Patches/../C_code.c:10331: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) - ldr r3, .L4256+32 @ tmp192, +.L4208: +@ Patches/../C_code.c:10336: if ((RandBitflags->shopItems) && ((shopType < 10) || (RandomizePrepShop))) + ldr r3, .L4259+32 @ tmp192, ldr r3, [r3] @ RandomizePrepShop, RandomizePrepShop cmp r3, #0 @ RandomizePrepShop, - bne .L4255 @, -.L4226: + bne .L4258 @, +.L4229: mov r7, r10 @ tmp255, proc - movs r4, #0 @ ivtmp.2334, - ldr r6, .L4256+36 @ tmp253, + movs r4, #0 @ ivtmp.2339, + ldr r6, .L4259+36 @ tmp253, adds r7, r7, #48 @ tmp255, -.L4222: -@ Patches/../C_code.c:10376: proc->shopItems[i] = MakeNewItem(itemId); - ldrh r0, [r5, r4] @ MEM[(const u16 *)shopItems_28 + ivtmp.2334_30 * 1], MEM[(const u16 *)shopItems_28 + ivtmp.2334_30 * 1] - bl .L143 @ -@ Patches/../C_code.c:10376: proc->shopItems[i] = MakeNewItem(itemId); - strh r0, [r7, r4] @ tmp278, MEM[(short unsigned int *)_23 + ivtmp.2334_30 * 1] -@ Patches/../C_code.c:10372: for (i = 0; i < 20; i++) - adds r4, r4, #2 @ ivtmp.2334, - cmp r4, #40 @ ivtmp.2334, - bne .L4222 @, - b .L4221 @ -.L4253: -@ Patches/../C_code.c:10358: if ((i == rareItemSlot) && (RareItemTableSize)) +.L4225: +@ Patches/../C_code.c:10381: proc->shopItems[i] = MakeNewItem(itemId); + ldrh r0, [r5, r4] @ MEM[(const u16 *)shopItems_28 + ivtmp.2339_30 * 1], MEM[(const u16 *)shopItems_28 + ivtmp.2339_30 * 1] + bl .L146 @ +@ Patches/../C_code.c:10381: proc->shopItems[i] = MakeNewItem(itemId); + strh r0, [r7, r4] @ tmp278, MEM[(short unsigned int *)_23 + ivtmp.2339_30 * 1] +@ Patches/../C_code.c:10377: for (i = 0; i < 20; i++) + adds r4, r4, #2 @ ivtmp.2339, + cmp r4, #40 @ ivtmp.2339, + bne .L4225 @, + b .L4224 @ +.L4256: +@ Patches/../C_code.c:10363: if ((i == rareItemSlot) && (RareItemTableSize)) ldr r3, [sp, #16] @ tmp267, %sfp ldr r3, [r3] @ RareItemTableSize, RareItemTableSize cmp r3, #0 @ RareItemTableSize, - beq .L4217 @, -@ Patches/../C_code.c:3140: if (!item) + beq .L4220 @, +@ Patches/../C_code.c:3145: if (!item) cmp r0, #0 @ _127, - beq .L4232 @, + beq .L4235 @, mov r3, r8 @, varyByCh mov r1, fp @, tmp254 ldr r2, [sp, #12] @, %sfp bl RandRareItem.part.0 @ -@ Patches/../C_code.c:10360: itemId = RandRareItem(itemId, noise, i, true, varyByCh); +@ Patches/../C_code.c:10365: itemId = RandRareItem(itemId, noise, i, true, varyByCh); lsls r0, r0, #16 @ tmp243, tmp276, lsrs r0, r0, #16 @ itemId, tmp243, - b .L4218 @ -.L4232: + b .L4221 @ +.L4235: movs r0, #0 @ itemId, - b .L4218 @ -.L4224: + b .L4221 @ +.L4227: movs r6, #108 @ prephitmp_13, -@ Patches/../C_code.c:10325: shopItems = gDefaultShopInventory; - ldr r5, .L4256+40 @ inventory, - b .L4203 @ -.L4200: -@ Patches/../C_code.c:10315: proc = Proc_Start(gProcScr_Shop, PROC_TREE_3); +@ Patches/../C_code.c:10330: shopItems = gDefaultShopInventory; + ldr r5, .L4259+40 @ inventory, + b .L4206 @ +.L4203: +@ Patches/../C_code.c:10320: proc = Proc_Start(gProcScr_Shop, PROC_TREE_3); movs r1, #3 @, - ldr r3, .L4256+44 @ tmp166, + ldr r3, .L4259+44 @ tmp166, bl .L14 @ mov r10, r0 @ proc, tmp274 - b .L4201 @ -.L4255: -@ Patches/../C_code.c:10334: int noise[4] = { 0, 0, 0, 0 }; + b .L4204 @ +.L4258: +@ Patches/../C_code.c:10339: int noise[4] = { 0, 0, 0, 0 }; add r3, sp, #24 @ tmp254,, movs r0, r3 @, tmp254 mov fp, r3 @ tmp254, tmp254 movs r2, #16 @, - ldr r3, .L4256+16 @ tmp197, + ldr r3, .L4259+16 @ tmp197, movs r1, #0 @, bl .L14 @ -@ Patches/../C_code.c:10335: int varyByCh = false; // prep armoury only +@ Patches/../C_code.c:10340: int varyByCh = false; // prep armoury only movs r3, #0 @ varyByCh, str r3, [sp, #20] @ varyByCh, %sfp -@ Patches/../C_code.c:10336: if ((shopType < 10) || (!unit)) +@ Patches/../C_code.c:10341: if ((shopType < 10) || (!unit)) cmp r7, #0 @ unit, - beq .LCB27645 @ - b .L4207 @long jump @ -.LCB27645: - b .L4206 @ -.L4252: -@ Patches/../C_code.c:2365: noise[i] = gCh; - ldr r2, .L4256+20 @ tmp207, + beq .LCB27669 @ + b .L4210 @long jump @ +.LCB27669: + b .L4209 @ +.L4255: +@ Patches/../C_code.c:2370: noise[i] = gCh; + ldr r2, .L4259+20 @ tmp207, ldrb r2, [r2] @ gCh, gCh str r2, [r3] @ gCh, *_90 -@ Patches/../C_code.c:2366: break; - b .L4209 @ -.L4257: +@ Patches/../C_code.c:2371: break; + b .L4212 @ +.L4260: .align 2 -.L4256: +.L4259: .word EndPlayerPhaseSideWindows .word gProcScr_Shop .word Proc_StartBlocking @@ -33381,15 +33412,15 @@ StartBlockingPrepShop: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:10387: { +@ Patches/../C_code.c:10392: { movs r3, r1 @ parent, tmp117 -@ Patches/../C_code.c:10389: } +@ Patches/../C_code.c:10394: } @ sp needed @ -@ Patches/../C_code.c:10388: StartShopScreen(unit, 0, 10, parent); +@ Patches/../C_code.c:10393: StartShopScreen(unit, 0, 10, parent); movs r2, #10 @, movs r1, #0 @, bl StartShopScreen @ -@ Patches/../C_code.c:10389: } +@ Patches/../C_code.c:10394: } pop {r4} pop {r0} bx r0 @@ -33406,14 +33437,14 @@ StartBlockingPrepVendor: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:10393: { +@ Patches/../C_code.c:10398: { movs r3, r2 @ parent, tmp119 -@ Patches/../C_code.c:10395: } +@ Patches/../C_code.c:10400: } @ sp needed @ -@ Patches/../C_code.c:10394: StartShopScreen(unit, inventory, 10, parent); +@ Patches/../C_code.c:10399: StartShopScreen(unit, inventory, 10, parent); movs r2, #10 @, bl StartShopScreen @ -@ Patches/../C_code.c:10395: } +@ Patches/../C_code.c:10400: } pop {r4} pop {r0} bx r0 @@ -33430,14 +33461,14 @@ StartBlockingPrepArmory: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:10399: { +@ Patches/../C_code.c:10404: { movs r3, r2 @ parent, tmp119 -@ Patches/../C_code.c:10401: } +@ Patches/../C_code.c:10406: } @ sp needed @ -@ Patches/../C_code.c:10400: StartShopScreen(unit, inventory, 11, parent); +@ Patches/../C_code.c:10405: StartShopScreen(unit, inventory, 11, parent); movs r2, #11 @, bl StartShopScreen @ -@ Patches/../C_code.c:10401: } +@ Patches/../C_code.c:10406: } pop {r4} pop {r0} bx r0 @@ -33454,43 +33485,43 @@ GetUnitDefaultMovementCost: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:10558: if (unit->state & US_IN_BALLISTA) +@ Patches/../C_code.c:10563: if (unit->state & US_IN_BALLISTA) ldr r3, [r0, #12] @ unit_6(D)->state, unit_6(D)->state -@ Patches/../C_code.c:10558: if (unit->state & US_IN_BALLISTA) +@ Patches/../C_code.c:10563: if (unit->state & US_IN_BALLISTA) lsls r3, r3, #20 @ tmp128, unit_6(D)->state, - bmi .L4266 @, -@ Patches/../C_code.c:10564: switch (weatherId) - ldr r3, .L4268 @ tmp123, - ldrb r3, [r3] @ weatherId.433_8, weatherId + bmi .L4269 @, +@ Patches/../C_code.c:10569: switch (weatherId) + ldr r3, .L4271 @ tmp123, + ldrb r3, [r3] @ weatherId.434_8, weatherId ldr r2, [r0, #4] @ _7, MEM[(const struct ClassData * *)unit_6(D) + 4B] - cmp r3, #2 @ weatherId.433_8, - bls .L4267 @, - cmp r3, #4 @ weatherId.433_8, - bne .L4265 @, -@ Patches/../C_code.c:10569: return unit->pClassData->pMovCostTable[1]; + cmp r3, #2 @ weatherId.434_8, + bls .L4270 @, + cmp r3, #4 @ weatherId.434_8, + bne .L4268 @, +@ Patches/../C_code.c:10574: return unit->pClassData->pMovCostTable[1]; ldr r0, [r2, #60] @ , _7->pMovCostTable[1] -.L4261: -@ Patches/../C_code.c:10578: } +.L4264: +@ Patches/../C_code.c:10583: } @ sp needed @ bx lr -.L4267: -@ Patches/../C_code.c:10564: switch (weatherId) - cmp r3, #0 @ weatherId.433_8, - beq .L4265 @, -@ Patches/../C_code.c:10572: return unit->pClassData->pMovCostTable[2]; +.L4270: +@ Patches/../C_code.c:10569: switch (weatherId) + cmp r3, #0 @ weatherId.434_8, + beq .L4268 @, +@ Patches/../C_code.c:10577: return unit->pClassData->pMovCostTable[2]; ldr r0, [r2, #64] @ , _7->pMovCostTable[2] - b .L4261 @ -.L4266: -@ Patches/../C_code.c:10560: return Ballista_TerrainTable; - ldr r0, .L4268+4 @ , - b .L4261 @ -.L4265: -@ Patches/../C_code.c:10577: return unit->pClassData->pMovCostTable[0]; - ldr r0, [r2, #56] @ , _7->pMovCostTable[0] - b .L4261 @ + b .L4264 @ .L4269: - .align 2 +@ Patches/../C_code.c:10565: return Ballista_TerrainTable; + ldr r0, .L4271+4 @ , + b .L4264 @ .L4268: +@ Patches/../C_code.c:10582: return unit->pClassData->pMovCostTable[0]; + ldr r0, [r2, #56] @ , _7->pMovCostTable[0] + b .L4264 @ +.L4272: + .align 2 +.L4271: .word weatherId .word Ballista_TerrainTable .size GetUnitDefaultMovementCost, .-GetUnitDefaultMovementCost @@ -33506,132 +33537,132 @@ IsUnitTrapped: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r3, r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:10589: if (UNIT_FACTION(unit) == FACTION_BLUE) +@ Patches/../C_code.c:10594: if (UNIT_FACTION(unit) == FACTION_BLUE) movs r3, #11 @ tmp146, movs r2, #192 @ tmp147, ldrsb r3, [r0, r3] @ tmp146, -@ Patches/../C_code.c:10589: if (UNIT_FACTION(unit) == FACTION_BLUE) +@ Patches/../C_code.c:10594: if (UNIT_FACTION(unit) == FACTION_BLUE) tst r2, r3 @ tmp147, tmp146 - beq .L4271 @, -@ Patches/../C_code.c:10558: if (unit->state & US_IN_BALLISTA) + beq .L4274 @, +@ Patches/../C_code.c:10563: if (unit->state & US_IN_BALLISTA) ldr r3, [r0, #12] @ unit_30(D)->state, unit_30(D)->state -@ Patches/../C_code.c:10558: if (unit->state & US_IN_BALLISTA) +@ Patches/../C_code.c:10563: if (unit->state & US_IN_BALLISTA) lsls r3, r3, #20 @ tmp184, unit_30(D)->state, - bmi .L4280 @, -@ Patches/../C_code.c:10564: switch (weatherId) - ldr r3, .L4291 @ tmp152, - ldrb r3, [r3] @ weatherId.433_41, weatherId + bmi .L4283 @, +@ Patches/../C_code.c:10569: switch (weatherId) + ldr r3, .L4294 @ tmp152, + ldrb r3, [r3] @ weatherId.434_41, weatherId ldr r2, [r0, #4] @ _40, MEM[(const struct ClassData * *)unit_30(D) + 4B] - cmp r3, #2 @ weatherId.433_41, - bhi .L4273 @, - cmp r3, #0 @ weatherId.433_41, - beq .L4275 @, -@ Patches/../C_code.c:10572: return unit->pClassData->pMovCostTable[2]; + cmp r3, #2 @ weatherId.434_41, + bhi .L4276 @, + cmp r3, #0 @ weatherId.434_41, + beq .L4278 @, +@ Patches/../C_code.c:10577: return unit->pClassData->pMovCostTable[2]; ldr r2, [r2, #64] @ _39, _40->pMovCostTable[2] - b .L4272 @ -.L4271: -@ Patches/../C_code.c:10591: return false; + b .L4275 @ +.L4274: +@ Patches/../C_code.c:10596: return false; movs r0, #0 @ , -.L4270: -@ Patches/../C_code.c:10620: } +.L4273: +@ Patches/../C_code.c:10625: } @ sp needed @ pop {r3, r4, r5, r6, r7} pop {r1} bx r1 -.L4280: -@ Patches/../C_code.c:10560: return Ballista_TerrainTable; - ldr r2, .L4291+4 @ _39, -.L4272: -@ Patches/../C_code.c:10593: int flierCost = GetUnitDefaultMovementCost(unit)[TERRAIN_CLIFF]; +.L4283: +@ Patches/../C_code.c:10565: return Ballista_TerrainTable; + ldr r2, .L4294+4 @ _39, +.L4275: +@ Patches/../C_code.c:10598: int flierCost = GetUnitDefaultMovementCost(unit)[TERRAIN_CLIFF]; movs r3, #38 @ tmp155, ldrsb r3, [r2, r3] @ _5, MEM[(const s8 *)_39 + 38B] -@ Patches/../C_code.c:10594: if ((flierCost >= 0) && (flierCost < unit->pClassData->baseMov)) +@ Patches/../C_code.c:10599: if ((flierCost >= 0) && (flierCost < unit->pClassData->baseMov)) cmp r3, #0 @ _5, - blt .L4276 @, -@ Patches/../C_code.c:10594: if ((flierCost >= 0) && (flierCost < unit->pClassData->baseMov)) + blt .L4279 @, +@ Patches/../C_code.c:10599: if ((flierCost >= 0) && (flierCost < unit->pClassData->baseMov)) ldr r1, [r0, #4] @ unit_30(D)->pClassData, unit_30(D)->pClassData -@ Patches/../C_code.c:10594: if ((flierCost >= 0) && (flierCost < unit->pClassData->baseMov)) +@ Patches/../C_code.c:10599: if ((flierCost >= 0) && (flierCost < unit->pClassData->baseMov)) ldrb r1, [r1, #18] @ tmp160, lsls r1, r1, #24 @ tmp160, tmp160, asrs r1, r1, #24 @ tmp160, tmp160, cmp r1, r3 @ tmp160, _5 - bgt .L4271 @, -.L4276: -@ Patches/../C_code.c:10599: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); + bgt .L4274 @, +.L4279: +@ Patches/../C_code.c:10604: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); movs r1, #17 @ tmp161, -@ Patches/../C_code.c:10601: for (int i = 1; i < 0x40; i++) +@ Patches/../C_code.c:10606: for (int i = 1; i < 0x40; i++) movs r4, #1 @ i, -@ Patches/../C_code.c:10599: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); +@ Patches/../C_code.c:10604: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); ldrsb r1, [r0, r1] @ tmp161, ldrb r0, [r0, #16] @ tmp162, lsls r0, r0, #24 @ tmp162, tmp162, -@ Patches/../C_code.c:10599: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); - ldr r3, .L4291+8 @ tmp163, -@ Patches/../C_code.c:10599: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); +@ Patches/../C_code.c:10604: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); + ldr r3, .L4294+8 @ tmp163, +@ Patches/../C_code.c:10604: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); asrs r0, r0, #24 @ tmp162, tmp162, -@ Patches/../C_code.c:10599: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); - bl .L14 @ -@ Patches/../C_code.c:10608: if (target->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) - ldr r6, .L4291+12 @ tmp180, - ldr r5, .L4291+16 @ tmp179, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) - ldr r7, .L4291+20 @ tmp181, -.L4278: -@ Patches/../C_code.c:10603: target = GetUnit(i); +@ Patches/../C_code.c:10604: GenerateExtendedMovementMap(unit->xPos, unit->yPos, GetUnitDefaultMovementCost(unit)); + bl .L14 @ +@ Patches/../C_code.c:10613: if (target->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) + ldr r6, .L4294+12 @ tmp180, + ldr r5, .L4294+16 @ tmp179, +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) + ldr r7, .L4294+20 @ tmp181, +.L4281: +@ Patches/../C_code.c:10608: target = GetUnit(i); movs r0, r4 @, i - bl .L608 @ -@ Patches/../C_code.c:10604: if (!UNIT_IS_VALID(target)) + bl .L611 @ +@ Patches/../C_code.c:10609: if (!UNIT_IS_VALID(target)) cmp r0, #0 @ target, - beq .L4277 @, -@ Patches/../C_code.c:10604: if (!UNIT_IS_VALID(target)) + beq .L4280 @, +@ Patches/../C_code.c:10609: if (!UNIT_IS_VALID(target)) ldr r3, [r0] @ target_34->pCharacterData, target_34->pCharacterData cmp r3, #0 @ target_34->pCharacterData, - beq .L4277 @, -@ Patches/../C_code.c:10608: if (target->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) + beq .L4280 @, +@ Patches/../C_code.c:10613: if (target->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) ldr r3, [r0, #12] @ target_34->state, target_34->state -@ Patches/../C_code.c:10608: if (target->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) +@ Patches/../C_code.c:10613: if (target->state & (US_DEAD | US_NOT_DEPLOYED | US_BIT16)) tst r3, r6 @ target_34->state, tmp180 - bne .L4277 @, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) + bne .L4280 @, +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) movs r3, #17 @ tmp169, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) movs r2, #16 @ tmp173, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) ldrsb r3, [r0, r3] @ tmp169, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) ldr r1, [r7] @ gBmMapMovement, gBmMapMovement lsls r3, r3, #2 @ tmp172, tmp169, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) ldrsb r2, [r0, r2] @ tmp173, -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) ldr r3, [r3, r1] @ *_19, *_19 -@ Patches/../C_code.c:10612: if (gBmMapMovement[target->yPos][target->xPos] > 120) +@ Patches/../C_code.c:10617: if (gBmMapMovement[target->yPos][target->xPos] > 120) ldrb r3, [r3, r2] @ *_23, *_23 cmp r3, #120 @ *_23, - bls .L4271 @, -.L4277: -@ Patches/../C_code.c:10601: for (int i = 1; i < 0x40; i++) + bls .L4274 @, +.L4280: +@ Patches/../C_code.c:10606: for (int i = 1; i < 0x40; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:10601: for (int i = 1; i < 0x40; i++) +@ Patches/../C_code.c:10606: for (int i = 1; i < 0x40; i++) cmp r4, #64 @ i, - bne .L4278 @, -@ Patches/../C_code.c:10619: return true; + bne .L4281 @, +@ Patches/../C_code.c:10624: return true; movs r0, #1 @ , - b .L4270 @ -.L4273: -@ Patches/../C_code.c:10564: switch (weatherId) - cmp r3, #4 @ weatherId.433_41, - bne .L4275 @, -@ Patches/../C_code.c:10569: return unit->pClassData->pMovCostTable[1]; + b .L4273 @ +.L4276: +@ Patches/../C_code.c:10569: switch (weatherId) + cmp r3, #4 @ weatherId.434_41, + bne .L4278 @, +@ Patches/../C_code.c:10574: return unit->pClassData->pMovCostTable[1]; ldr r2, [r2, #60] @ _39, _40->pMovCostTable[1] - b .L4272 @ -.L4275: -@ Patches/../C_code.c:10577: return unit->pClassData->pMovCostTable[0]; + b .L4275 @ +.L4278: +@ Patches/../C_code.c:10582: return unit->pClassData->pMovCostTable[0]; ldr r2, [r2, #56] @ _39, _40->pMovCostTable[0] - b .L4272 @ -.L4292: + b .L4275 @ +.L4295: .align 2 -.L4291: +.L4294: .word weatherId .word Ballista_TerrainTable .word GenerateExtendedMovementMap @@ -33650,93 +33681,93 @@ IsUnitStuck: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; movs r3, #17 @ tmp142, -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; - ldr r2, .L4311 @ tmp144, +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; + ldr r2, .L4314 @ tmp144, ldr r1, [r2] @ gBmMapTerrain, gBmMapTerrain -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; movs r2, #16 @ tmp146, -@ Patches/../C_code.c:10633: { +@ Patches/../C_code.c:10638: { push {r4, lr} @ -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; ldrsb r3, [r0, r3] @ tmp142, -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; lsls r3, r3, #2 @ tmp145, tmp142, -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; ldr r3, [r3, r1] @ *_5, *_5 -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; ldrsb r2, [r0, r2] @ tmp146, -@ Patches/../C_code.c:10634: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; +@ Patches/../C_code.c:10639: int terrainType = gBmMapTerrain[unit->yPos][unit->xPos]; ldrb r2, [r3, r2] @ _10, *_9 -@ Patches/../C_code.c:10635: if (!(unit->state & US_RESCUED)) +@ Patches/../C_code.c:10640: if (!(unit->state & US_RESCUED)) ldr r3, [r0, #12] @ _11, unit_23(D)->state -@ Patches/../C_code.c:10637: if (terrainType != TERRAIN_VILLAGE_04) +@ Patches/../C_code.c:10642: if (terrainType != TERRAIN_VILLAGE_04) lsls r1, r3, #26 @ tmp182, _11, - bmi .L4294 @, + bmi .L4297 @, cmp r2, #4 @ _10, - beq .L4294 @, -@ Patches/../C_code.c:10558: if (unit->state & US_IN_BALLISTA) + beq .L4297 @, +@ Patches/../C_code.c:10563: if (unit->state & US_IN_BALLISTA) lsls r3, r3, #20 @ tmp183, _11, - bmi .L4300 @, -@ Patches/../C_code.c:10564: switch (weatherId) - ldr r3, .L4311+4 @ tmp167, - ldrb r3, [r3] @ weatherId.433_30, weatherId + bmi .L4303 @, +@ Patches/../C_code.c:10569: switch (weatherId) + ldr r3, .L4314+4 @ tmp167, + ldrb r3, [r3] @ weatherId.434_30, weatherId ldr r1, [r0, #4] @ _29, MEM[(const struct ClassData * *)unit_23(D) + 4B] - cmp r3, #2 @ weatherId.433_30, - bls .L4310 @, - cmp r3, #4 @ weatherId.433_30, - bne .L4298 @, -@ Patches/../C_code.c:10569: return unit->pClassData->pMovCostTable[1]; + cmp r3, #2 @ weatherId.434_30, + bls .L4313 @, + cmp r3, #4 @ weatherId.434_30, + bne .L4301 @, +@ Patches/../C_code.c:10574: return unit->pClassData->pMovCostTable[1]; ldr r3, [r1, #60] @ _28, _29->pMovCostTable[1] -.L4295: -@ Patches/../C_code.c:10639: int tcost = GetUnitDefaultMovementCost(unit)[terrainType]; +.L4298: +@ Patches/../C_code.c:10644: int tcost = GetUnitDefaultMovementCost(unit)[terrainType]; ldrsb r3, [r3, r2] @ _16, *_15 -@ Patches/../C_code.c:10640: if ((tcost < 0) || (tcost > unit->pClassData->baseMov)) +@ Patches/../C_code.c:10645: if ((tcost < 0) || (tcost > unit->pClassData->baseMov)) cmp r3, #0 @ _16, - blt .L4302 @, -@ Patches/../C_code.c:10640: if ((tcost < 0) || (tcost > unit->pClassData->baseMov)) + blt .L4305 @, +@ Patches/../C_code.c:10645: if ((tcost < 0) || (tcost > unit->pClassData->baseMov)) ldr r2, [r0, #4] @ unit_23(D)->pClassData, unit_23(D)->pClassData -@ Patches/../C_code.c:10640: if ((tcost < 0) || (tcost > unit->pClassData->baseMov)) +@ Patches/../C_code.c:10645: if ((tcost < 0) || (tcost > unit->pClassData->baseMov)) ldrb r2, [r2, #18] @ tmp175, lsls r2, r2, #24 @ tmp175, tmp175, asrs r2, r2, #24 @ tmp175, tmp175, cmp r2, r3 @ tmp175, _16 - blt .L4302 @, -.L4294: -@ Patches/../C_code.c:10647: if (IsUnitTrapped(unit)) + blt .L4305 @, +.L4297: +@ Patches/../C_code.c:10652: if (IsUnitTrapped(unit)) bl IsUnitTrapped @ -@ Patches/../C_code.c:10647: if (IsUnitTrapped(unit)) +@ Patches/../C_code.c:10652: if (IsUnitTrapped(unit)) subs r3, r0, #1 @ tmp178, tmp181 sbcs r0, r0, r3 @ , tmp181, tmp178 -.L4293: -@ Patches/../C_code.c:10653: } +.L4296: +@ Patches/../C_code.c:10658: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L4310: -@ Patches/../C_code.c:10564: switch (weatherId) - cmp r3, #0 @ weatherId.433_30, - beq .L4298 @, -@ Patches/../C_code.c:10572: return unit->pClassData->pMovCostTable[2]; +.L4313: +@ Patches/../C_code.c:10569: switch (weatherId) + cmp r3, #0 @ weatherId.434_30, + beq .L4301 @, +@ Patches/../C_code.c:10577: return unit->pClassData->pMovCostTable[2]; ldr r3, [r1, #64] @ _28, _29->pMovCostTable[2] - b .L4295 @ -.L4302: -@ Patches/../C_code.c:10642: return flierMov; + b .L4298 @ +.L4305: +@ Patches/../C_code.c:10647: return flierMov; movs r0, #2 @ , - b .L4293 @ -.L4300: -@ Patches/../C_code.c:10560: return Ballista_TerrainTable; - ldr r3, .L4311+8 @ _28, - b .L4295 @ -.L4298: -@ Patches/../C_code.c:10577: return unit->pClassData->pMovCostTable[0]; + b .L4296 @ +.L4303: +@ Patches/../C_code.c:10565: return Ballista_TerrainTable; + ldr r3, .L4314+8 @ _28, + b .L4298 @ +.L4301: +@ Patches/../C_code.c:10582: return unit->pClassData->pMovCostTable[0]; ldr r3, [r1, #56] @ _28, _29->pMovCostTable[0] - b .L4295 @ -.L4312: + b .L4298 @ +.L4315: .align 2 -.L4311: +.L4314: .word gBmMapTerrain .word weatherId .word Ballista_TerrainTable @@ -33752,151 +33783,151 @@ GetUnitMovementCost: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:10658: if (unit->state & US_IN_BALLISTA) +@ Patches/../C_code.c:10663: if (unit->state & US_IN_BALLISTA) ldr r3, [r0, #12] @ unit_14(D)->state, unit_14(D)->state -@ Patches/../C_code.c:10656: { // 80187d4 +@ Patches/../C_code.c:10661: { // 80187d4 push {r4, lr} @ -@ Patches/../C_code.c:10656: { // 80187d4 +@ Patches/../C_code.c:10661: { // 80187d4 movs r4, r0 @ unit, tmp176 -@ Patches/../C_code.c:10658: if (unit->state & US_IN_BALLISTA) +@ Patches/../C_code.c:10663: if (unit->state & US_IN_BALLISTA) lsls r3, r3, #20 @ tmp182, unit_14(D)->state, - bmi .L4324 @, -@ Patches/../C_code.c:1990: int config = RandBitflags->class; - ldr r3, .L4344 @ tmp145, + bmi .L4327 @, +@ Patches/../C_code.c:1995: int config = RandBitflags->class; + ldr r3, .L4347 @ tmp145, ldr r3, [r3] @ RandBitflags, RandBitflags - ldrb r3, [r3, #1] @ *RandBitflags.65_20, *RandBitflags.65_20 - lsls r3, r3, #29 @ tmp150, *RandBitflags.65_20, -@ Patches/../C_code.c:1990: int config = RandBitflags->class; + ldrb r3, [r3, #1] @ *RandBitflags.66_20, *RandBitflags.66_20 + lsls r3, r3, #29 @ tmp150, *RandBitflags.66_20, +@ Patches/../C_code.c:1995: int config = RandBitflags->class; lsrs r3, r3, #30 @ config, tmp150, -@ Patches/../C_code.c:1991: if (!config) - beq .L4338 @, -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) - cmp r3, #3 @ config, +@ Patches/../C_code.c:1996: if (!config) beq .L4341 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) + cmp r3, #3 @ config, + beq .L4344 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players ldr r2, [r0] @ unit_14(D)->pCharacterData, unit_14(D)->pCharacterData ldrb r2, [r2, #4] @ prephitmp_34, -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) cmp r3, #2 @ config, - beq .L4342 @, -.L4317: -@ Patches/../C_code.c:1977: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; - ldr r3, .L4344+4 @ tmp162, + beq .L4345 @, +.L4320: +@ Patches/../C_code.c:1982: return !CharExceptions[unit->pCharacterData->number].NeverChangeFrom; + ldr r3, .L4347+4 @ tmp162, lsls r2, r2, #1 @ tmp163, prephitmp_34, -@ Patches/../C_code.c:10663: if (ShouldRandomizeClass(unit)) +@ Patches/../C_code.c:10668: if (ShouldRandomizeClass(unit)) ldrb r3, [r2, r3] @ tmp164, CharExceptions cmp r3, #0 @ tmp164, - bne .L4338 @, -@ Patches/../C_code.c:10666: int stuck = IsUnitStuck(unit); + bne .L4341 @, +@ Patches/../C_code.c:10671: int stuck = IsUnitStuck(unit); movs r0, r4 @, unit bl IsUnitStuck @ -@ Patches/../C_code.c:10669: switch (weatherId) - ldr r3, .L4344+8 @ tmp165, -@ Patches/../C_code.c:10667: if (stuck == flierMov) +@ Patches/../C_code.c:10674: switch (weatherId) + ldr r3, .L4347+8 @ tmp165, +@ Patches/../C_code.c:10672: if (stuck == flierMov) cmp r0, #2 @ stuck, - beq .L4343 @, -@ Patches/../C_code.c:10669: switch (weatherId) + beq .L4346 @, +@ Patches/../C_code.c:10674: switch (weatherId) ldrb r2, [r3] @ pretmp_43, weatherId -@ Patches/../C_code.c:10679: if (stuck == waterPeakMov) +@ Patches/../C_code.c:10684: if (stuck == waterPeakMov) cmp r0, #1 @ stuck, - bne .L4315 @, -@ Patches/../C_code.c:10681: switch (weatherId) + bne .L4318 @, +@ Patches/../C_code.c:10686: switch (weatherId) cmp r2, #2 @ pretmp_43, - bhi .L4320 @, + bhi .L4323 @, cmp r2, #0 @ pretmp_43, - bne .L4340 @, -.L4328: - ldr r0, .L4344+12 @ , - b .L4313 @ -.L4342: -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) + bne .L4343 @, +.L4331: + ldr r0, .L4347+12 @ , + b .L4316 @ +.L4345: +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) movs r1, #11 @ tmp157, ldrsb r1, [r0, r1] @ tmp157, adds r3, r3, #190 @ tmp158, ands r3, r1 @ tmp159, tmp157 -@ Patches/../C_code.c:1999: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) +@ Patches/../C_code.c:2004: if ((config == 2) && (UNIT_FACTION(unit) == FACTION_RED)) cmp r3, #128 @ tmp159, - bne .L4317 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + bne .L4320 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players cmp r2, #58 @ prephitmp_34, - bls .L4317 @, -.L4338: - ldr r3, .L4344+8 @ tmp175, -.L4315: -@ Patches/../C_code.c:10694: switch (weatherId) - ldrb r3, [r3] @ weatherId.439_6, weatherId -@ Patches/../C_code.c:10699: return unit->pClassData->pMovCostTable[1]; + bls .L4320 @, +.L4341: + ldr r3, .L4347+8 @ tmp175, +.L4318: +@ Patches/../C_code.c:10699: switch (weatherId) + ldrb r3, [r3] @ weatherId.440_6, weatherId +@ Patches/../C_code.c:10704: return unit->pClassData->pMovCostTable[1]; ldr r2, [r4, #4] @ pretmp_40, unit_14(D)->pClassData -@ Patches/../C_code.c:10694: switch (weatherId) - cmp r3, #2 @ weatherId.439_6, - bhi .L4321 @, - cmp r3, #0 @ weatherId.439_6, - beq .L4323 @, -@ Patches/../C_code.c:10702: return unit->pClassData->pMovCostTable[2]; +@ Patches/../C_code.c:10699: switch (weatherId) + cmp r3, #2 @ weatherId.440_6, + bhi .L4324 @, + cmp r3, #0 @ weatherId.440_6, + beq .L4326 @, +@ Patches/../C_code.c:10707: return unit->pClassData->pMovCostTable[2]; ldr r0, [r2, #64] @ , pretmp_40->pMovCostTable[2] - b .L4313 @ -.L4324: -@ Patches/../C_code.c:10660: return Ballista_TerrainTable; - ldr r0, .L4344+16 @ , -.L4313: -@ Patches/../C_code.c:10707: } + b .L4316 @ +.L4327: +@ Patches/../C_code.c:10665: return Ballista_TerrainTable; + ldr r0, .L4347+16 @ , +.L4316: +@ Patches/../C_code.c:10712: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L4321: -@ Patches/../C_code.c:10694: switch (weatherId) - cmp r3, #4 @ weatherId.439_6, - bne .L4323 @, -@ Patches/../C_code.c:10699: return unit->pClassData->pMovCostTable[1]; +.L4324: +@ Patches/../C_code.c:10699: switch (weatherId) + cmp r3, #4 @ weatherId.440_6, + bne .L4326 @, +@ Patches/../C_code.c:10704: return unit->pClassData->pMovCostTable[1]; ldr r0, [r2, #60] @ , pretmp_40->pMovCostTable[1] - b .L4313 @ -.L4323: -@ Patches/../C_code.c:10706: return unit->pClassData->pMovCostTable[0]; - ldr r0, [r2, #56] @ , pretmp_40->pMovCostTable[0] - b .L4313 @ -.L4343: -@ Patches/../C_code.c:10669: switch (weatherId) - ldrb r3, [r3] @ weatherId.437_4, weatherId - cmp r3, #2 @ weatherId.437_4, - bhi .L4319 @, - cmp r3, #0 @ weatherId.437_4, - bne .L4339 @, + b .L4316 @ .L4326: - ldr r0, .L4344+20 @ , - b .L4313 @ -.L4341: -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:10711: return unit->pClassData->pMovCostTable[0]; + ldr r0, [r2, #56] @ , pretmp_40->pMovCostTable[0] + b .L4316 @ +.L4346: +@ Patches/../C_code.c:10674: switch (weatherId) + ldrb r3, [r3] @ weatherId.438_4, weatherId + cmp r3, #2 @ weatherId.438_4, + bhi .L4322 @, + cmp r3, #0 @ weatherId.438_4, + bne .L4342 @, +.L4329: + ldr r0, .L4347+20 @ , + b .L4316 @ +.L4344: +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) movs r2, #11 @ tmp152, ldrsb r2, [r0, r2] @ tmp152, adds r3, r3, #189 @ tmp153, ands r3, r2 @ tmp154, tmp152 -@ Patches/../C_code.c:1995: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) +@ Patches/../C_code.c:2000: if ((config == 3) && (UNIT_FACTION(unit) != FACTION_RED)) cmp r3, #128 @ tmp154, - bne .L4338 @, -@ Patches/../C_code.c:2005: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players + bne .L4341 @, +@ Patches/../C_code.c:2010: if (unit->pCharacterData->number > 0x3a) // recruitable BWL units as players ldr r3, [r0] @ unit_14(D)->pCharacterData, unit_14(D)->pCharacterData ldrb r2, [r3, #4] @ prephitmp_34, - b .L4317 @ -.L4319: -@ Patches/../C_code.c:10669: switch (weatherId) - cmp r3, #4 @ weatherId.437_4, - bne .L4326 @, -.L4339: -@ Patches/../C_code.c:10674: return TerrainTable_MovCost_StuckRainy; - ldr r0, .L4344+24 @ , - b .L4313 @ -.L4320: -@ Patches/../C_code.c:10681: switch (weatherId) + b .L4320 @ +.L4322: +@ Patches/../C_code.c:10674: switch (weatherId) + cmp r3, #4 @ weatherId.438_4, + bne .L4329 @, +.L4342: +@ Patches/../C_code.c:10679: return TerrainTable_MovCost_StuckRainy; + ldr r0, .L4347+24 @ , + b .L4316 @ +.L4323: +@ Patches/../C_code.c:10686: switch (weatherId) cmp r2, #4 @ pretmp_43, - bne .L4328 @, -.L4340: -@ Patches/../C_code.c:10686: return TerrainTable_MovCost_BerserkerRain; // 880B90C - ldr r0, .L4344+28 @ , - b .L4313 @ -.L4345: + bne .L4331 @, +.L4343: +@ Patches/../C_code.c:10691: return TerrainTable_MovCost_BerserkerRain; // 880B90C + ldr r0, .L4347+28 @ , + b .L4316 @ +.L4348: .align 2 -.L4344: +.L4347: .word RandBitflags .word CharExceptions .word weatherId @@ -33918,26 +33949,26 @@ IsItemADanceRing: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, lr} @ -@ Patches/../C_code.c:10714: switch (GetItemIndex(item)) - ldr r3, .L4347 @ tmp120, -@ Patches/../C_code.c:10731: } +@ Patches/../C_code.c:10719: switch (GetItemIndex(item)) + ldr r3, .L4350 @ tmp120, +@ Patches/../C_code.c:10736: } @ sp needed @ -@ Patches/../C_code.c:10714: switch (GetItemIndex(item)) +@ Patches/../C_code.c:10719: switch (GetItemIndex(item)) bl .L14 @ -@ Patches/../C_code.c:10714: switch (GetItemIndex(item)) +@ Patches/../C_code.c:10719: switch (GetItemIndex(item)) movs r3, #0 @ tmp125, movs r2, #3 @ tmp124, subs r0, r0, #125 @ tmp122, cmp r2, r0 @ tmp124, tmp122 adcs r3, r3, r3 @ tmp123, tmp125, tmp125 -@ Patches/../C_code.c:10731: } +@ Patches/../C_code.c:10736: } movs r0, r3 @ tmp126, tmp123 pop {r4} pop {r1} bx r1 -.L4348: +.L4351: .align 2 -.L4347: +.L4350: .word GetItemIndex .size IsItemADanceRing, .-IsItemADanceRing .align 1 @@ -33952,40 +33983,40 @@ CanUnitTypicallyUseLockpickItem: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 @ link register save eliminated. -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); movs r2, #11 @ tmp127, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); movs r1, #192 @ tmp128, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); ldrsb r2, [r0, r2] @ tmp127, -@ Patches/../C_code.c:10736: { +@ Patches/../C_code.c:10741: { movs r3, r0 @ unit, tmp141 -@ Patches/../C_code.c:10748: return true; +@ Patches/../C_code.c:10753: return true; movs r0, #1 @ , -@ Patches/../C_code.c:10738: if (faction == FACTION_BLUE) +@ Patches/../C_code.c:10743: if (faction == FACTION_BLUE) tst r1, r2 @ tmp128, tmp127 - bne .L4349 @, -@ Patches/../C_code.c:10740: if (OnlyThievesCanUseLockpicks) - ldr r2, .L4354 @ tmp130, -@ Patches/../C_code.c:10740: if (OnlyThievesCanUseLockpicks) + bne .L4352 @, +@ Patches/../C_code.c:10745: if (OnlyThievesCanUseLockpicks) + ldr r2, .L4357 @ tmp130, +@ Patches/../C_code.c:10745: if (OnlyThievesCanUseLockpicks) ldr r2, [r2] @ OnlyThievesCanUseLockpicks, OnlyThievesCanUseLockpicks cmp r2, #0 @ OnlyThievesCanUseLockpicks, - beq .L4349 @, -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) + beq .L4352 @, +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) ldmia r3!, {r1, r2} @,, ldr r3, [r1, #40] @ _9->attributes, _9->attributes ldr r2, [r2, #40] @ _10->attributes, _10->attributes orrs r3, r2 @ tmp134, _10->attributes -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) lsrs r3, r3, #3 @ tmp137, tmp134, ands r0, r3 @ , tmp137 -.L4349: -@ Patches/../C_code.c:10749: } +.L4352: +@ Patches/../C_code.c:10754: } @ sp needed @ bx lr -.L4355: +.L4358: .align 2 -.L4354: +.L4357: .word OnlyThievesCanUseLockpicks .size CanUnitTypicallyUseLockpickItem, .-CanUnitTypicallyUseLockpickItem .align 1 @@ -33999,74 +34030,74 @@ CanUnitUseLockpickItem: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); movs r3, #11 @ tmp130, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); movs r2, #192 @ tmp131, -@ Patches/../C_code.c:10752: { +@ Patches/../C_code.c:10757: { push {r4, lr} @ -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); ldrsb r3, [r0, r3] @ tmp130, -@ Patches/../C_code.c:10752: { +@ Patches/../C_code.c:10757: { movs r4, r0 @ unit, tmp156 -@ Patches/../C_code.c:10738: if (faction == FACTION_BLUE) +@ Patches/../C_code.c:10743: if (faction == FACTION_BLUE) tst r2, r3 @ tmp131, tmp130 - bne .L4357 @, -@ Patches/../C_code.c:10740: if (OnlyThievesCanUseLockpicks) - ldr r3, .L4365 @ tmp133, -@ Patches/../C_code.c:10740: if (OnlyThievesCanUseLockpicks) + bne .L4360 @, +@ Patches/../C_code.c:10745: if (OnlyThievesCanUseLockpicks) + ldr r3, .L4368 @ tmp133, +@ Patches/../C_code.c:10745: if (OnlyThievesCanUseLockpicks) ldr r3, [r3] @ OnlyThievesCanUseLockpicks, OnlyThievesCanUseLockpicks cmp r3, #0 @ OnlyThievesCanUseLockpicks, - beq .L4357 @, -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) + beq .L4360 @, +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) ldr r3, [r0] @ MEM[(const struct CharacterData * *)unit_9(D)], MEM[(const struct CharacterData * *)unit_9(D)] ldr r2, [r0, #4] @ MEM[(const struct ClassData * *)unit_9(D) + 4B], MEM[(const struct ClassData * *)unit_9(D) + 4B] ldr r3, [r3, #40] @ _20->attributes, _20->attributes ldr r2, [r2, #40] @ _21->attributes, _21->attributes orrs r3, r2 @ tmp137, _21->attributes -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) lsls r3, r3, #28 @ tmp160, tmp137, - bpl .L4361 @, -.L4357: -@ Patches/../C_code.c:10758: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) + bpl .L4364 @, +.L4360: +@ Patches/../C_code.c:10763: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) movs r0, r4 @, unit - ldr r3, .L4365+4 @ tmp142, + ldr r3, .L4368+4 @ tmp142, bl .L14 @ -@ Patches/../C_code.c:10758: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) +@ Patches/../C_code.c:10763: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) cmp r0, #0 @ tmp157, - beq .L4359 @, -.L4360: -@ Patches/../C_code.c:10761: return TRUE; + beq .L4362 @, +.L4363: +@ Patches/../C_code.c:10766: return TRUE; movs r0, #1 @ , -.L4358: -@ Patches/../C_code.c:10762: } +.L4361: +@ Patches/../C_code.c:10767: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L4359: -@ Patches/../C_code.c:10758: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) +.L4362: +@ Patches/../C_code.c:10763: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) movs r0, r4 @, unit - ldr r3, .L4365+8 @ tmp145, + ldr r3, .L4368+8 @ tmp145, bl .L14 @ -@ Patches/../C_code.c:10758: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) +@ Patches/../C_code.c:10763: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) cmp r0, #0 @ tmp158, - bne .L4360 @, -@ Patches/../C_code.c:10758: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) - ldr r3, .L4365+12 @ tmp148, + bne .L4363 @, +@ Patches/../C_code.c:10763: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) + ldr r3, .L4368+12 @ tmp148, movs r0, r4 @, unit bl .L14 @ -@ Patches/../C_code.c:10758: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) +@ Patches/../C_code.c:10763: if (!CanUnitUseChestKeyItem(unit) && !CanUnitUseDoorKeyItem(unit) && !CanUnitOpenBridge(unit)) subs r3, r0, #1 @ tmp153, tmp159 sbcs r0, r0, r3 @ , tmp159, tmp153 - b .L4358 @ -.L4361: -@ Patches/../C_code.c:10755: return false; + b .L4361 @ +.L4364: +@ Patches/../C_code.c:10760: return false; movs r0, #0 @ , - b .L4358 @ -.L4366: + b .L4361 @ +.L4369: .align 2 -.L4365: +.L4368: .word OnlyThievesCanUseLockpicks .word CanUnitUseChestKeyItem .word CanUnitUseDoorKeyItem @@ -34084,107 +34115,107 @@ AiGetChestUnlockItemSlot: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, r7, lr} @ -@ Patches/../C_code.c:10768: *out = 0; +@ Patches/../C_code.c:10773: *out = 0; movs r3, #0 @ tmp131, -@ Patches/../C_code.c:10765: { // 8036A8C +@ Patches/../C_code.c:10770: { // 8036A8C mov lr, r8 @, push {lr} @ -@ Patches/../C_code.c:10768: *out = 0; +@ Patches/../C_code.c:10773: *out = 0; strb r3, [r0] @ tmp131, *out_20(D) -@ Patches/../C_code.c:10770: if (GetUnitItemCount(gActiveUnit) == 5) - ldr r3, .L4386 @ tmp158, -@ Patches/../C_code.c:10765: { // 8036A8C +@ Patches/../C_code.c:10775: if (GetUnitItemCount(gActiveUnit) == 5) + ldr r3, .L4389 @ tmp158, +@ Patches/../C_code.c:10770: { // 8036A8C movs r7, r0 @ out, tmp160 -@ Patches/../C_code.c:10770: if (GetUnitItemCount(gActiveUnit) == 5) +@ Patches/../C_code.c:10775: if (GetUnitItemCount(gActiveUnit) == 5) mov r8, r3 @ tmp158, tmp158 ldr r0, [r3] @ gActiveUnit, gActiveUnit - ldr r3, .L4386+4 @ tmp135, + ldr r3, .L4389+4 @ tmp135, bl .L14 @ -@ Patches/../C_code.c:10776: for (i = 0; i < 5; i++) +@ Patches/../C_code.c:10781: for (i = 0; i < 5; i++) movs r4, #0 @ i, -@ Patches/../C_code.c:10770: if (GetUnitItemCount(gActiveUnit) == 5) +@ Patches/../C_code.c:10775: if (GetUnitItemCount(gActiveUnit) == 5) cmp r0, #5 @ tmp161, - beq .L4385 @, -@ Patches/../C_code.c:10787: if (GetItemIndex(item) == CHEST_KEY_A) - ldr r6, .L4386+8 @ tmp159, -.L4368: -@ Patches/../C_code.c:10778: u16 item = gActiveUnit->items[i]; + beq .L4388 @, +@ Patches/../C_code.c:10792: if (GetItemIndex(item) == CHEST_KEY_A) + ldr r6, .L4389+8 @ tmp159, +.L4371: +@ Patches/../C_code.c:10783: u16 item = gActiveUnit->items[i]; mov r3, r8 @ tmp158, tmp158 movs r2, r4 @ tmp145, i ldr r3, [r3] @ gActiveUnit, gActiveUnit adds r2, r2, #12 @ tmp145, lsls r2, r2, #1 @ tmp146, tmp145, adds r3, r3, r2 @ tmp147, gActiveUnit, tmp146 - ldrh r5, [r3, #6] @ item, *gActiveUnit.444_6 -@ Patches/../C_code.c:10780: if (item == 0) + ldrh r5, [r3, #6] @ item, *gActiveUnit.445_6 +@ Patches/../C_code.c:10785: if (item == 0) cmp r5, #0 @ item, - beq .L4369 @, -@ Patches/../C_code.c:10787: if (GetItemIndex(item) == CHEST_KEY_A) + beq .L4372 @, +@ Patches/../C_code.c:10792: if (GetItemIndex(item) == CHEST_KEY_A) movs r0, r5 @, item -@ Patches/../C_code.c:10785: *out = i; +@ Patches/../C_code.c:10790: *out = i; strb r4, [r7] @ i, *out_20(D) -@ Patches/../C_code.c:10787: if (GetItemIndex(item) == CHEST_KEY_A) - bl .L143 @ -@ Patches/../C_code.c:10787: if (GetItemIndex(item) == CHEST_KEY_A) +@ Patches/../C_code.c:10792: if (GetItemIndex(item) == CHEST_KEY_A) + bl .L146 @ +@ Patches/../C_code.c:10792: if (GetItemIndex(item) == CHEST_KEY_A) cmp r0, #105 @ tmp162, - beq .L4373 @, -@ Patches/../C_code.c:10791: if (GetItemIndex(item) == CHEST_KEY_B) + beq .L4376 @, +@ Patches/../C_code.c:10796: if (GetItemIndex(item) == CHEST_KEY_B) movs r0, r5 @, item - bl .L143 @ -@ Patches/../C_code.c:10791: if (GetItemIndex(item) == CHEST_KEY_B) + bl .L146 @ +@ Patches/../C_code.c:10796: if (GetItemIndex(item) == CHEST_KEY_B) cmp r0, #121 @ tmp163, - beq .L4373 @, -@ Patches/../C_code.c:10796: if (GetItemIndex(item) == LOCKPICK) + beq .L4376 @, +@ Patches/../C_code.c:10801: if (GetItemIndex(item) == LOCKPICK) movs r0, r5 @, item - bl .L143 @ -@ Patches/../C_code.c:10796: if (GetItemIndex(item) == LOCKPICK) + bl .L146 @ +@ Patches/../C_code.c:10801: if (GetItemIndex(item) == LOCKPICK) cmp r0, #107 @ tmp164, - beq .L4374 @, -.L4375: -@ Patches/../C_code.c:10776: for (i = 0; i < 5; i++) + beq .L4377 @, +.L4378: +@ Patches/../C_code.c:10781: for (i = 0; i < 5; i++) adds r4, r4, #1 @ i, -@ Patches/../C_code.c:10776: for (i = 0; i < 5; i++) +@ Patches/../C_code.c:10781: for (i = 0; i < 5; i++) cmp r4, #5 @ i, - bne .L4368 @, -.L4369: -@ Patches/../C_code.c:10773: return 0; - movs r0, #0 @ , + bne .L4371 @, .L4372: -@ Patches/../C_code.c:10807: } +@ Patches/../C_code.c:10778: return 0; + movs r0, #0 @ , +.L4375: +@ Patches/../C_code.c:10812: } @ sp needed @ pop {r7} mov r8, r7 pop {r4, r5, r6, r7} pop {r1} bx r1 -.L4374: -@ Patches/../C_code.c:10799: if (CanUnitUseLockpickItem(gActiveUnit)) +.L4377: +@ Patches/../C_code.c:10804: if (CanUnitUseLockpickItem(gActiveUnit)) mov r3, r8 @ tmp158, tmp158 ldr r0, [r3] @ gActiveUnit, gActiveUnit bl CanUnitUseLockpickItem @ -@ Patches/../C_code.c:10799: if (CanUnitUseLockpickItem(gActiveUnit)) +@ Patches/../C_code.c:10804: if (CanUnitUseLockpickItem(gActiveUnit)) cmp r0, #0 @ tmp165, - beq .L4375 @, -.L4373: -@ Patches/../C_code.c:10789: return 1; + beq .L4378 @, +.L4376: +@ Patches/../C_code.c:10794: return 1; movs r0, #1 @ , - b .L4372 @ -.L4385: -@ Patches/../C_code.c:10772: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 + b .L4375 @ +.L4388: +@ Patches/../C_code.c:10777: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 mov r3, r8 @ tmp158, tmp158 -@ Patches/../C_code.c:10772: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 +@ Patches/../C_code.c:10777: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 movs r1, #8 @ tmp137, -@ Patches/../C_code.c:10772: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 - ldr r2, [r3] @ gActiveUnit.442_3, gActiveUnit -@ Patches/../C_code.c:10772: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 +@ Patches/../C_code.c:10777: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 + ldr r2, [r3] @ gActiveUnit.443_3, gActiveUnit +@ Patches/../C_code.c:10777: gActiveUnit->aiFlags |= 1 << 3; // AI_UNIT_FLAG_3 ldrb r3, [r2, #10] @ tmp140, orrs r3, r1 @ tmp141, tmp137 - strb r3, [r2, #10] @ tmp141, gActiveUnit.442_3->aiFlags -@ Patches/../C_code.c:10773: return 0; - b .L4369 @ -.L4387: + strb r3, [r2, #10] @ tmp141, gActiveUnit.443_3->aiFlags +@ Patches/../C_code.c:10778: return 0; + b .L4372 @ +.L4390: .align 2 -.L4386: +.L4389: .word gActiveUnit .word GetUnitItemCount .word GetItemIndex @@ -34201,65 +34232,65 @@ GetUnitKeyItemSlotForTerrain: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:10810: { // 8018524 +@ Patches/../C_code.c:10815: { // 8018524 movs r4, r0 @ unit, tmp127 movs r5, r1 @ terrain, tmp128 -@ Patches/../C_code.c:10813: if (CanUnitUseLockpickItem(unit)) +@ Patches/../C_code.c:10818: if (CanUnitUseLockpickItem(unit)) bl CanUnitUseLockpickItem @ -@ Patches/../C_code.c:10813: if (CanUnitUseLockpickItem(unit)) +@ Patches/../C_code.c:10818: if (CanUnitUseLockpickItem(unit)) cmp r0, #0 @ tmp129, - bne .L4389 @, - ldr r6, .L4398 @ tmp126, -@ Patches/../C_code.c:10821: switch (terrain) + bne .L4392 @, + ldr r6, .L4401 @ tmp126, +@ Patches/../C_code.c:10826: switch (terrain) cmp r5, #30 @ terrain, - beq .L4394 @, -.L4397: -@ Patches/../C_code.c:10811: int slot, item = 0; + beq .L4397 @, +.L4400: +@ Patches/../C_code.c:10816: int slot, item = 0; movs r1, #0 @ item, -@ Patches/../C_code.c:10821: switch (terrain) +@ Patches/../C_code.c:10826: switch (terrain) cmp r5, #33 @ terrain, - beq .L4396 @, -.L4390: -@ Patches/../C_code.c:10838: return GetUnitItemSlot(unit, item); + beq .L4399 @, +.L4393: +@ Patches/../C_code.c:10843: return GetUnitItemSlot(unit, item); movs r0, r4 @, unit - bl .L143 @ -.L4388: -@ Patches/../C_code.c:10839: } + bl .L146 @ +.L4391: +@ Patches/../C_code.c:10844: } @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L4396: -@ Patches/../C_code.c:10825: slot = GetUnitItemSlot(unit, CHEST_KEY_A); +.L4399: +@ Patches/../C_code.c:10830: slot = GetUnitItemSlot(unit, CHEST_KEY_A); movs r1, #105 @, movs r0, r4 @, unit - bl .L143 @ -@ Patches/../C_code.c:10827: if (slot < 0) + bl .L146 @ +@ Patches/../C_code.c:10832: if (slot < 0) cmp r0, #0 @ , - bge .L4388 @, -@ Patches/../C_code.c:10828: slot = GetUnitItemSlot(unit, CHEST_KEY_B); + bge .L4391 @, +@ Patches/../C_code.c:10833: slot = GetUnitItemSlot(unit, CHEST_KEY_B); movs r1, #121 @, movs r0, r4 @, unit - bl .L143 @ - b .L4388 @ -.L4389: -@ Patches/../C_code.c:10815: int slot = GetUnitItemSlot(unit, LOCKPICK); + bl .L146 @ + b .L4391 @ +.L4392: +@ Patches/../C_code.c:10820: int slot = GetUnitItemSlot(unit, LOCKPICK); movs r1, #107 @, movs r0, r4 @, unit - ldr r6, .L4398 @ tmp126, - bl .L143 @ -@ Patches/../C_code.c:10817: if (slot >= 0) + ldr r6, .L4401 @ tmp126, + bl .L146 @ +@ Patches/../C_code.c:10822: if (slot >= 0) cmp r0, #0 @ , - bge .L4388 @, -@ Patches/../C_code.c:10821: switch (terrain) + bge .L4391 @, +@ Patches/../C_code.c:10826: switch (terrain) cmp r5, #30 @ terrain, - bne .L4397 @, -.L4394: + bne .L4400 @, +.L4397: movs r1, #106 @ item, - b .L4390 @ -.L4399: + b .L4393 @ +.L4402: .align 2 -.L4398: +.L4401: .word GetUnitItemSlot .size GetUnitKeyItemSlotForTerrain, .-GetUnitKeyItemSlotForTerrain .align 1 @@ -34274,123 +34305,123 @@ IsItemDisplayUsable: @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 push {r4, r5, r6, lr} @ -@ Patches/../C_code.c:10842: { // 8016AB0 +@ Patches/../C_code.c:10847: { // 8016AB0 movs r5, r0 @ unit, tmp202 -@ Patches/../C_code.c:10843: if (GetItemAttributes(item) & 1) // wep +@ Patches/../C_code.c:10848: if (GetItemAttributes(item) & 1) // wep movs r0, r1 @, item -@ Patches/../C_code.c:10842: { // 8016AB0 +@ Patches/../C_code.c:10847: { // 8016AB0 movs r4, r1 @ item, tmp203 -@ Patches/../C_code.c:10843: if (GetItemAttributes(item) & 1) // wep +@ Patches/../C_code.c:10848: if (GetItemAttributes(item) & 1) // wep bl GetItemAttributes @ -@ Patches/../C_code.c:10843: if (GetItemAttributes(item) & 1) // wep +@ Patches/../C_code.c:10848: if (GetItemAttributes(item) & 1) // wep lsls r0, r0, #31 @ tmp212, tmp204, - bmi .L4416 @, -@ Patches/../C_code.c:10846: if (GetItemAttributes(item) & 4) // staff + bmi .L4419 @, +@ Patches/../C_code.c:10851: if (GetItemAttributes(item) & 4) // staff movs r0, r4 @, item bl GetItemAttributes @ -@ Patches/../C_code.c:10846: if (GetItemAttributes(item) & 4) // staff +@ Patches/../C_code.c:10851: if (GetItemAttributes(item) & 4) // staff lsls r0, r0, #29 @ tmp213, tmp206, - bmi .L4417 @, -@ Patches/../C_code.c:10849: if (GetItemUseEffect(item)) + bmi .L4420 @, +@ Patches/../C_code.c:10854: if (GetItemUseEffect(item)) movs r0, r4 @, item - ldr r3, .L4419 @ tmp158, + ldr r3, .L4422 @ tmp158, bl .L14 @ -@ Patches/../C_code.c:10849: if (GetItemUseEffect(item)) +@ Patches/../C_code.c:10854: if (GetItemUseEffect(item)) cmp r0, #0 @ tmp208, - beq .L4409 @, -@ Patches/../C_code.c:10851: if (unit->statusIndex == UNIT_STATUS_SLEEP) + beq .L4412 @, +@ Patches/../C_code.c:10856: if (unit->statusIndex == UNIT_STATUS_SLEEP) movs r3, #48 @ tmp159, ldrb r2, [r5, r3] @ *unit_25(D), *unit_25(D) subs r3, r3, #33 @ tmp165, ands r3, r2 @ tmp164, *unit_25(D) -@ Patches/../C_code.c:10854: if (unit->statusIndex == UNIT_STATUS_BERSERK) +@ Patches/../C_code.c:10859: if (unit->statusIndex == UNIT_STATUS_BERSERK) movs r2, #253 @ tmp173, -@ Patches/../C_code.c:10851: if (unit->statusIndex == UNIT_STATUS_SLEEP) +@ Patches/../C_code.c:10856: if (unit->statusIndex == UNIT_STATUS_SLEEP) subs r3, r3, #2 @ tmp167, -@ Patches/../C_code.c:10854: if (unit->statusIndex == UNIT_STATUS_BERSERK) +@ Patches/../C_code.c:10859: if (unit->statusIndex == UNIT_STATUS_BERSERK) tst r3, r2 @ tmp167, tmp173 - beq .L4408 @, -@ Patches/../C_code.c:10857: if (GetItemIndex(item) == LOCKPICK) + beq .L4411 @, +@ Patches/../C_code.c:10862: if (GetItemIndex(item) == LOCKPICK) movs r0, r4 @, item - ldr r6, .L4419+4 @ tmp201, - bl .L143 @ -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) + ldr r6, .L4422+4 @ tmp201, + bl .L146 @ +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) ldr r3, [r5] @ MEM[(const struct CharacterData * *)unit_25(D)], MEM[(const struct CharacterData * *)unit_25(D)] ldr r2, [r5, #4] @ MEM[(const struct ClassData * *)unit_25(D) + 4B], MEM[(const struct ClassData * *)unit_25(D) + 4B] ldr r3, [r3, #40] @ pretmp_72->attributes, ldr r2, [r2, #40] @ pretmp_73->attributes, orrs r3, r2 @ _63, pretmp_73->attributes -@ Patches/../C_code.c:10857: if (GetItemIndex(item) == LOCKPICK) +@ Patches/../C_code.c:10862: if (GetItemIndex(item) == LOCKPICK) cmp r0, #107 @ tmp209, - beq .L4406 @, -.L4407: -@ Patches/../C_code.c:10865: if (!(UNIT_CATTRIBUTES(unit) & CA_REFRESHER) && IsItemADanceRing(item)) + beq .L4409 @, +.L4410: +@ Patches/../C_code.c:10870: if (!(UNIT_CATTRIBUTES(unit) & CA_REFRESHER) && IsItemADanceRing(item)) movs r2, #48 @ tmp191, -@ Patches/../C_code.c:10865: if (!(UNIT_CATTRIBUTES(unit) & CA_REFRESHER) && IsItemADanceRing(item)) +@ Patches/../C_code.c:10870: if (!(UNIT_CATTRIBUTES(unit) & CA_REFRESHER) && IsItemADanceRing(item)) tst r2, r3 @ tmp191, _63 - beq .L4418 @, -.L4409: -@ Patches/../C_code.c:10869: return TRUE; + beq .L4421 @, +.L4412: +@ Patches/../C_code.c:10874: return TRUE; movs r0, #1 @ , - b .L4402 @ -.L4417: -@ Patches/../C_code.c:10847: return CanUnitUseStaff(unit, item); + b .L4405 @ +.L4420: +@ Patches/../C_code.c:10852: return CanUnitUseStaff(unit, item); movs r1, r4 @, item movs r0, r5 @, unit - ldr r3, .L4419+8 @ tmp155, + ldr r3, .L4422+8 @ tmp155, bl .L14 @ -.L4402: -@ Patches/../C_code.c:10870: } +.L4405: +@ Patches/../C_code.c:10875: } @ sp needed @ pop {r4, r5, r6} pop {r1} bx r1 -.L4416: -@ Patches/../C_code.c:10844: return CanUnitUseWeapon(unit, item); +.L4419: +@ Patches/../C_code.c:10849: return CanUnitUseWeapon(unit, item); movs r1, r4 @, item movs r0, r5 @, unit - ldr r3, .L4419+12 @ tmp150, + ldr r3, .L4422+12 @ tmp150, bl .L14 @ - b .L4402 @ -.L4406: -@ Patches/../C_code.c:10740: if (OnlyThievesCanUseLockpicks) - ldr r2, .L4419+16 @ tmp183, -@ Patches/../C_code.c:10740: if (OnlyThievesCanUseLockpicks) + b .L4405 @ +.L4409: +@ Patches/../C_code.c:10745: if (OnlyThievesCanUseLockpicks) + ldr r2, .L4422+16 @ tmp183, +@ Patches/../C_code.c:10745: if (OnlyThievesCanUseLockpicks) ldr r2, [r2] @ OnlyThievesCanUseLockpicks, OnlyThievesCanUseLockpicks cmp r2, #0 @ OnlyThievesCanUseLockpicks, - beq .L4407 @, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); + beq .L4410 @, +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); movs r1, #11 @ tmp185, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); movs r2, #192 @ tmp186, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); ldrsb r1, [r5, r1] @ tmp185, -@ Patches/../C_code.c:10737: int faction = UNIT_FACTION(unit); +@ Patches/../C_code.c:10742: int faction = UNIT_FACTION(unit); ands r2, r1 @ faction, tmp185 -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) movs r1, #8 @ tmp188, ands r1, r3 @ tmp189, _63 -@ Patches/../C_code.c:10742: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) +@ Patches/../C_code.c:10747: if (!(UNIT_CATTRIBUTES(unit) & CA_THIEF)) orrs r2, r1 @ tmp190, tmp189 - bne .L4407 @, -.L4408: -@ Patches/../C_code.c:10852: return FALSE; + bne .L4410 @, +.L4411: +@ Patches/../C_code.c:10857: return FALSE; movs r0, #0 @ , - b .L4402 @ -.L4418: -@ Patches/../C_code.c:10714: switch (GetItemIndex(item)) + b .L4405 @ +.L4421: +@ Patches/../C_code.c:10719: switch (GetItemIndex(item)) movs r0, r4 @, item - bl .L143 @ -@ Patches/../C_code.c:10714: switch (GetItemIndex(item)) + bl .L146 @ +@ Patches/../C_code.c:10719: switch (GetItemIndex(item)) movs r3, #3 @ tmp197, subs r0, r0, #125 @ tmp194, cmp r3, r0 @ tmp197, tmp194 sbcs r0, r0, r0 @ tmp211 rsbs r0, r0, #0 @ , tmp211 - b .L4402 @ -.L4420: + b .L4405 @ +.L4423: .align 2 -.L4419: +.L4422: .word GetItemUseEffect .word GetItemIndex .word CanUnitUseStaff @@ -34408,50 +34439,50 @@ ArenaIsUnitAllowed: @ Function supports interworking. @ args = 0, pretend = 0, frame = 0 @ frame_needed = 0, uses_anonymous_args = 0 -@ Patches/../C_code.c:10875: if (unit->statusIndex == UNIT_STATUS_SILENCED) +@ Patches/../C_code.c:10880: if (unit->statusIndex == UNIT_STATUS_SILENCED) movs r3, #48 @ tmp126, ldrb r2, [r0, r3] @ *unit_13(D), *unit_13(D) -@ Patches/../C_code.c:10875: if (unit->statusIndex == UNIT_STATUS_SILENCED) +@ Patches/../C_code.c:10880: if (unit->statusIndex == UNIT_STATUS_SILENCED) subs r3, r3, #33 @ tmp132, -@ Patches/../C_code.c:10874: { +@ Patches/../C_code.c:10879: { push {r4, lr} @ -@ Patches/../C_code.c:10875: if (unit->statusIndex == UNIT_STATUS_SILENCED) +@ Patches/../C_code.c:10880: if (unit->statusIndex == UNIT_STATUS_SILENCED) ands r3, r2 @ tmp133, *unit_13(D) -@ Patches/../C_code.c:10874: { +@ Patches/../C_code.c:10879: { movs r4, r0 @ unit, tmp151 -@ Patches/../C_code.c:10875: if (unit->statusIndex == UNIT_STATUS_SILENCED) +@ Patches/../C_code.c:10880: if (unit->statusIndex == UNIT_STATUS_SILENCED) cmp r3, #3 @ tmp133, - beq .L4424 @, -@ Patches/../C_code.c:10880: if (GetUnitBestWRankType(unit) < 0) - ldr r3, .L4425 @ tmp135, + beq .L4427 @, +@ Patches/../C_code.c:10885: if (GetUnitBestWRankType(unit) < 0) + ldr r3, .L4428 @ tmp135, bl .L14 @ -@ Patches/../C_code.c:10880: if (GetUnitBestWRankType(unit) < 0) +@ Patches/../C_code.c:10885: if (GetUnitBestWRankType(unit) < 0) cmp r0, #0 @ tmp152, - blt .L4424 @, -@ Patches/../C_code.c:10884: if (UNIT_CATTRIBUTES(unit) & CA_LOCK_3) + blt .L4427 @, +@ Patches/../C_code.c:10889: if (UNIT_CATTRIBUTES(unit) & CA_LOCK_3) movs r0, #1 @ tmp142, -@ Patches/../C_code.c:10884: if (UNIT_CATTRIBUTES(unit) & CA_LOCK_3) +@ Patches/../C_code.c:10889: if (UNIT_CATTRIBUTES(unit) & CA_LOCK_3) ldr r3, [r4] @ unit_13(D)->pCharacterData, unit_13(D)->pCharacterData ldr r2, [r4, #4] @ unit_13(D)->pClassData, unit_13(D)->pClassData ldr r3, [r3, #40] @ _4->attributes, _4->attributes ldr r2, [r2, #40] @ _6->attributes, _6->attributes orrs r3, r2 @ tmp138, _6->attributes -@ Patches/../C_code.c:10884: if (UNIT_CATTRIBUTES(unit) & CA_LOCK_3) +@ Patches/../C_code.c:10889: if (UNIT_CATTRIBUTES(unit) & CA_LOCK_3) lsrs r3, r3, #18 @ tmp141, tmp138, bics r0, r3 @ , tmp141 - b .L4423 @ -.L4424: -@ Patches/../C_code.c:10877: return 0; + b .L4426 @ +.L4427: +@ Patches/../C_code.c:10882: return 0; movs r0, #0 @ , -.L4423: -@ Patches/../C_code.c:10890: } +.L4426: +@ Patches/../C_code.c:10895: } @ sp needed @ pop {r4} pop {r1} bx r1 -.L4426: +.L4429: .align 2 -.L4425: +.L4428: .word GetUnitBestWRankType .size ArenaIsUnitAllowed, .-ArenaIsUnitAllowed .global TerrainTable_MovCost_StuckRainy @@ -34527,19 +34558,19 @@ ArenaIsUnitAllowed: .global RecruitmentProcCmd4 .section .rodata.str1.4 .align 2 -.LC910: +.LC911: .ascii "ReorderedRecruitment_Four\000" .global RecruitmentProcCmd3 .align 2 -.LC911: +.LC912: .ascii "ReorderedRecruitment_Three\000" .global RecruitmentProcCmd2 .align 2 -.LC912: +.LC913: .ascii "ReorderedRecruitment_Two\000" .global RecruitmentProcCmd1 .align 2 -.LC913: +.LC914: .ascii "ReorderedRecruitment_One\000" .global sSpecialCharStList .global gBattleTarget @@ -34618,7 +34649,7 @@ RecruitmentProcCmd1: @ dataImm: .short 0 @ dataPtr: - .word .LC913 + .word .LC914 @ opcode: .short 14 @ dataImm: @@ -34645,7 +34676,7 @@ RecruitmentProcCmd2: @ dataImm: .short 0 @ dataPtr: - .word .LC912 + .word .LC913 @ opcode: .short 14 @ dataImm: @@ -34672,7 +34703,7 @@ RecruitmentProcCmd3: @ dataImm: .short 0 @ dataPtr: - .word .LC911 + .word .LC912 @ opcode: .short 14 @ dataImm: @@ -34699,7 +34730,7 @@ RecruitmentProcCmd4: @ dataImm: .short 0 @ dataPtr: - .word .LC910 + .word .LC911 @ opcode: .short 14 @ dataImm: @@ -35624,19 +35655,19 @@ NumberOfCharTables: .align 1 .L14: bx r3 -.L269: +.L272: bx r4 -.L608: +.L611: bx r5 -.L143: +.L146: bx r6 .L62: bx r7 -.L208: +.L211: bx r8 -.L397: +.L400: bx r9 -.L650: +.L653: bx r10 -.L669: +.L672: bx fp diff --git a/Patches/FE8/C_Skillsys_Exclusive/AssembleLyn.bat b/Patches/FE8/C_Skillsys_Exclusive/AssembleLyn.bat new file mode 100644 index 00000000..b78658fe --- /dev/null +++ b/Patches/FE8/C_Skillsys_Exclusive/AssembleLyn.bat @@ -0,0 +1,26 @@ +@echo off + +SET startDir="C:\devkitPro\devkitARM\bin\" +SET as="%startDir%arm-none-eabi-as" +SET LYN="C:\devkitPro\lyn.exe" + +@rem Assemble into an elf +%as% -g -mcpu=arm7tdmi -mthumb-interwork %1 -o "%~n1.elf" + +if exist "Definitions.s" ( + + @rem Assemble definitions into a .elf if exists + %as% -g -mcpu=arm7tdmi -mthumb-interwork "Definitions.s" -o "Definitions.elf" + + @rem Assebmle into a .lyn.event with definitions + %LYN% "%~n1.elf" "Definitions.elf" > "%~n1.lyn.event" + + echo y | del "%~dp0Definitions.elf" +) else ( + @rem Assemble into a .lyn.event + %LYN% "%~n1.elf" > "%~n1.lyn.event" +) + +echo y | del "%~n1.elf" + +pause \ No newline at end of file diff --git a/Patches/FE8/C_Skillsys_Exclusive/Hook.asm b/Patches/FE8/C_Skillsys_Exclusive/Hook.asm new file mode 100644 index 00000000..8a31d673 --- /dev/null +++ b/Patches/FE8/C_Skillsys_Exclusive/Hook.asm @@ -0,0 +1,63 @@ + +.thumb + +.global SkillTester_VeslyHook +.type SkillTester_VeslyHook, %function +SkillTester_VeslyHook: +push {lr} +@ r1 as skillID, r0 as unit struct +cmp r2, #0 +beq .Lend_False +mov r5, r0 +mov r4, r1 + +mov r0, r4 @ required skillID is randomized +mov r1, r5 +bl RandomizeSkill +lsr r1, r4, #8 +lsl r1, #8 +orr r1, r0 @ skillID with original type +@mov r1, r4 @ skillID +b .Lend + +.Lend_False: +mov r0, #0 @ false +pop {r3} @ lr +pop {r4-r5} +pop {r3} +bx r3 +b .Lend +.Lend: +pop {r3} +ldr r3, =0x3003cc8 +bx r3 + +.ltorg + +@ Hooked at 0x80011CC in 800114C FlushBackgrounds +.global RandColoursHook_2 +.type RandColoursHook_2, %function +RandColoursHook_2: +push {lr} +bl EnableRandSkills +ldr r0, =IWRAM_SkillTesterHook +ldr r1, =0x3003CBC @ ldr r1, =0x3003CF4 +mov r2, #6 @ SHORT count (unless bit 26 is set, then it's WORD count) +swi #0xB + + +ldr r0, =0x020228A8 @gPaletteBuffer +mov r1, #0xA0 +lsl r1, #0x13 @ 0x5000000 +mov r2, #0x80 +lsl r2, #0x1 +swi #0xC @ CPUFastSet. +bl MaybeRandomizeColours +@bl MaybeForceHardModeFE8 +pop {r0} +bx r0 + + + + + diff --git a/Patches/FE8/C_Skillsys_Exclusive/Hook.lyn.event b/Patches/FE8/C_Skillsys_Exclusive/Hook.lyn.event new file mode 100644 index 00000000..874e7b8f --- /dev/null +++ b/Patches/FE8/C_Skillsys_Exclusive/Hook.lyn.event @@ -0,0 +1,20 @@ +ALIGN 4 +PUSH +ORG CURRENTOFFSET+$1;SkillTester_VeslyHook: +ORG CURRENTOFFSET+$30;RandColoursHook_2: +POP +WORD $2A00B500 $1C05D009 $1C201C0C +SHORT $1C29 +SHORT ((RandomizeSkill-4-CURRENTOFFSET>>12)&$7FF)|$F000 ((RandomizeSkill-4-CURRENTOFFSET>>1)&$7FF)|$F800 +SHORT $A21 +WORD $43010209 $2000E005 $BC30BC08 $4718BC08 $BC08E7FF $47184B00 $3003CC8 +SHORT $B500 +SHORT ((EnableRandSkills-4-CURRENTOFFSET>>12)&$7FF)|$F000 ((EnableRandSkills-4-CURRENTOFFSET>>1)&$7FF)|$F800 +SHORT $4807 +WORD $22064907 $4807DF0B $4C921A0 $522280 +SHORT $DF0C +SHORT ((MaybeRandomizeColours-4-CURRENTOFFSET>>12)&$7FF)|$F000 ((MaybeRandomizeColours-4-CURRENTOFFSET>>1)&$7FF)|$F800 +SHORT $BC01 +WORD $4700 +POIN IWRAM_SkillTesterHook +WORD $3003CBC $20228A8 diff --git a/Patches/FE8/C_Skillsys_Exclusive/IWRAM_Hook.asm b/Patches/FE8/C_Skillsys_Exclusive/IWRAM_Hook.asm new file mode 100644 index 00000000..6e34854e --- /dev/null +++ b/Patches/FE8/C_Skillsys_Exclusive/IWRAM_Hook.asm @@ -0,0 +1,16 @@ + +.arm +.global IWRAM_SkillTesterHook +.type IWRAM_SkillTesterHook, %function +IWRAM_SkillTesterHook: +ldr r3, =SkillTester_VeslyHook +bx r3 +.ltorg + + + + + + + + diff --git a/Patches/FE8/C_Skillsys_Exclusive/IWRAM_Hook.lyn.event b/Patches/FE8/C_Skillsys_Exclusive/IWRAM_Hook.lyn.event new file mode 100644 index 00000000..564d6142 --- /dev/null +++ b/Patches/FE8/C_Skillsys_Exclusive/IWRAM_Hook.lyn.event @@ -0,0 +1,6 @@ +ALIGN 4 +PUSH +ORG CURRENTOFFSET+$0;IWRAM_SkillTesterHook: +POP +WORD $E51F3000 $E12FFF13 +POIN SkillTester_VeslyHook diff --git a/Patches/FE8/C_Skillsys_Exclusive/Installer.event b/Patches/FE8/C_Skillsys_Exclusive/Installer.event new file mode 100644 index 00000000..9075f832 --- /dev/null +++ b/Patches/FE8/C_Skillsys_Exclusive/Installer.event @@ -0,0 +1,26 @@ + + + +// int GetAlwaysSkill(struct Unit * unit) +// int RandomizeSkill(int id, struct Unit * unit) + +#include "IWRAM_Hook.lyn.event" // jump from IWRAM skill tester to free space +#include "Hook.lyn.event" // jump from free space to RandomizeSkill +// also copy IWRAM_Hook into IWRAM + +PUSH +ORG 0x11CC +callHackNew(RandColoursHook_2) // 2nd version that replaces our old hook +// this version copies data into c skill tester +SHORT 0x46C0 +POP + +// buffs / debuffs: +// in KERNEL_RELOC_START there's +// gpStatDebuffStatusPool which POINs to an allocated ram address +// in this case atm, it's: +// 2028150 +// which is part way through text gUnknown_02026E30 thing +// this is saved on suspend + + diff --git a/Patches/FE8/Installer.event b/Patches/FE8/Installer.event index cba5fe48..e6080390 100644 --- a/Patches/FE8/Installer.event +++ b/Patches/FE8/Installer.event @@ -11,3 +11,4 @@ #include "Reclass/Installer.event" // for our custom classes + diff --git a/RomBuildfile_c_skillsys.event b/RomBuildfile_c_skillsys.event new file mode 100644 index 00000000..bcd1e23c --- /dev/null +++ b/RomBuildfile_c_skillsys.event @@ -0,0 +1,36 @@ + +// #define VeslyBuildfile +// #define Reskin +//#define RepointChMenu + +#define FreeSpace 0x1000000 +ORG FreeSpace + + +#define DoNotUseAutoGetters +#define NoWepLock +#define C_SKILLSYS // don't take over page 1 +#define Reskin + +#ifdef _FE8_ + #ifdef SKILLSYS_INSTALLED + #include ".FE8_WithSkillsys_Installer.event" + #else + #include ".FE8_Installer.event" + #endif + // #include "Patches/FE8/Installer.event" +#endif + + +#ifdef C_SKILLSYS + #include "Patches/FE8/C_Skillsys_Exclusive/Installer.event" +#endif + + +ALIGN 32 +WORD 0 0 0 0 0 0 0 0 + + + + +