Last active
July 24, 2022 17:58
-
-
Save Lusamine/4e2eec796f51f7081081a97a17453a11 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__int32 __fastcall Dpr_Battle_Logic_Capture__getBallCaptureRatio( | |
Dpr_Battle_Logic_MainModule_o *mainModule, | |
Dpr_Battle_Logic_BattleEnv_o *battleEnv, | |
Dpr_Battle_Logic_BTL_POKEPARAM_o *userPoke, | |
Dpr_Battle_Logic_BTL_POKEPARAM_o *targetPoke, | |
unsigned __int16 itemID) | |
{ | |
__int32 result; // w0 | |
unsigned __int8 userPoke_level; // w20 | |
unsigned __int8 targetPoke_level; // w0 | |
int userPoke_monsno; // w23 | |
int userPoke_gender; // w20 | |
unsigned __int16 targetPoke_monsno; // w21 | |
int targetPoke_gender; // w0 | |
unsigned __int16 targetPoke_monsno_1; // w0 | |
unsigned __int8 v16; // w0 | |
unsigned __int8 v17; // w19 | |
unsigned __int8 v18; // w20 | |
__int16 targetPokeLevel; // w0 | |
unsigned __int16 level_delta; // w8 | |
float v21; // s1 | |
__int64 v22; // x0 | |
__int32 v23; // w8 | |
_BYTE *enableDarkBall; // x19 | |
unsigned __int32 PeriodOfDay; // w8 | |
__int64 v26; // x0 | |
if ( itemID > 491u ) | |
{ | |
switch ( itemID ) | |
{ | |
case 492u: | |
if ( Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 25) <= 99 )// Fast Ball checks base speed | |
return 0x1000; | |
return 0x4000; | |
case 493u: | |
userPoke_level = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(userPoke, 17); | |
targetPoke_level = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 17); | |
if ( userPoke_level >> 2 >= (unsigned int)targetPoke_level ) | |
return 0x8000; | |
if ( userPoke_level >> 1 >= (unsigned int)targetPoke_level ) | |
return 0x4000; | |
if ( targetPoke_level >= (unsigned int)userPoke_level ) | |
return 0x1000; | |
else | |
return 0x2000; | |
case 494u: | |
if ( !Dpr_Battle_Logic_MainModule__GetSetupStatusFlag(mainModule, 1) )// Lure Ball | |
return 0x1000; | |
return 0x4000; | |
case 495u: | |
case 497u: | |
return 0x1000; // Heavy Ball (handled elsewhere), Friend Ball | |
case 496u: | |
userPoke_monsno = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(userPoke);// Love Ball | |
userPoke_gender = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(userPoke, 20); | |
targetPoke_monsno = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(targetPoke); | |
targetPoke_gender = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 20); | |
if ( userPoke_monsno != targetPoke_monsno || userPoke_gender == targetPoke_gender ) | |
return 0x1000; | |
return 0x8000; | |
case 498u: | |
targetPoke_monsno_1 = Dpr_Battle_Logic_BTL_POKEPARAM__GetMonsNo(targetPoke);// Moon Ball | |
Dpr_Battle_Logic_Capture__checkMoonBallEffective(targetPoke_monsno_1, (unsigned __int8)targetPoke->m_weight[3]); | |
v16 = sub_7100764D90(); | |
if ( !v16 ) | |
return 0x1000; | |
v17 = v16; | |
v18 = 0; | |
break; | |
default: | |
if ( itemID != 576 ) | |
{ | |
if ( itemID != 851 ) | |
return 0x1000; | |
if ( Dpr_Battle_Logic_UltraBeast__IsUltraBeast(targetPoke) ) | |
return 0x5000; | |
else | |
return 0x19A; | |
} | |
if ( !Dpr_Battle_Logic_BTL_POKEPARAM__CheckNemuri(targetPoke, 1) ) | |
return 0x1000; | |
return 0x4000; | |
} | |
do | |
{ | |
if ( (unsigned int)sub_7100764DA0(v18) == 8 && (unsigned __int16)sub_7100764DB0(v18) == 81 ) | |
return 0x4000; // Moon Ball | |
++v18; | |
} | |
while ( v18 < (unsigned int)v17 ); | |
return 0x1000; | |
} | |
else | |
{ | |
result = 0x1800; | |
switch ( itemID ) | |
{ | |
case 2u: | |
return 0x2000; | |
case 3u: | |
return result; | |
case 6u: | |
if ( !Dpr_Battle_Logic_BTL_POKEPARAM__IsMatchType(targetPoke, 10u)// Net Ball | |
&& !Dpr_Battle_Logic_BTL_POKEPARAM__IsMatchType(targetPoke, 6u) ) | |
{ | |
return 0x1000; | |
} | |
goto LABEL_41; | |
case 7u: | |
if ( !Dpr_Battle_Logic_MainModule__GetSetupStatusFlag(mainModule, 1)// Dive Ball | |
&& !Dpr_Battle_Logic_MainModule__GetSetupStatusFlag(mainModule, 2) ) | |
{ | |
return 0x1000; | |
} | |
goto LABEL_41; | |
case 8u: | |
targetPokeLevel = Dpr_Battle_Logic_BTL_POKEPARAM__GetValue(targetPoke, 17);// Nest Ball | |
if ( (targetPokeLevel & 0xFFFEu) > 29 ) | |
return 0x1000; | |
level_delta = 41 - targetPokeLevel; | |
if ( (unsigned __int16)(41 - targetPokeLevel) >= 40u ) | |
level_delta = 40; | |
v21 = 0.5; | |
if ( !level_delta ) | |
v21 = -0.5; | |
return (int)(float)(v21 + (float)(level_delta << 12)) / 10; | |
case 9u: | |
if ( !Dpr_Battle_Logic_MainModule__IsZukanRegistered(mainModule, targetPoke) )// Repeat | |
return 0x1000; | |
LABEL_41: | |
result = 0x3800; | |
break; | |
case 10u: | |
v22 = sub_7100831A90(battleEnv); // Timer Ball | |
v23 = 1229 * Dpr_Battle_Logic_BattleCounter__Get(v22, 0) + 4096; | |
if ( v23 >= 0x4000 ) | |
result = 0x4000; | |
else | |
result = v23; | |
break; | |
case 13u: | |
enableDarkBall = Dpr_Battle_Logic_MainModule__GetFieldSituation(mainModule);// Dusk Ball | |
PeriodOfDay = GameManager__get_currentPeriodOfDay(); | |
result = 0x3000; | |
if ( !*enableDarkBall && PeriodOfDay - 2 >= 3 )// Works for 7 PM to 5 AM | |
return 0x1000; | |
break; | |
case 15u: | |
v26 = sub_7100831A90(battleEnv); // Quick Ball | |
if ( Dpr_Battle_Logic_BattleCounter__Get(v26, 0) ) | |
return 0x1000; | |
result = 0x5000; | |
break; | |
default: | |
return 0x1000; | |
} | |
} | |
return result; | |
} | |
-------- | |
.text:00000071008A75A0 ; __int32 __fastcall Dpr_Battle_Logic_Capture__getBallCaptureRatio(Dpr_Battle_Logic_MainModule_o *mainModule, Dpr_Battle_Logic_BattleEnv_o *battleEnv, Dpr_Battle_Logic_BTL_POKEPARAM_o *userPoke, Dpr_Battle_Logic_BTL_POKEPARAM_o *targetPoke, unsigned __int16 itemID) | |
.text:00000071008A75A0 Dpr.Battle.Logic.Capture$$getBallCaptureRatio | |
.text:00000071008A75A0 ; CODE XREF: Dpr.Battle.Logic.Capture$$calcCaptureIndicator+158↑p | |
.text:00000071008A75A0 ; Dpr.Battle.Logic.Capture$$calcCaptureIndicator+17C↑p | |
.text:00000071008A75A0 | |
.text:00000071008A75A0 var_30 = -0x30 | |
.text:00000071008A75A0 var_20 = -0x20 | |
.text:00000071008A75A0 var_10 = -0x10 | |
.text:00000071008A75A0 var_s0 = 0 | |
.text:00000071008A75A0 | |
.text:00000071008A75A0 STR X23, [SP,#-0x10+var_30]! | |
.text:00000071008A75A4 STP X22, X21, [SP,#0x30+var_20] | |
.text:00000071008A75A8 STP X20, X19, [SP,#0x30+var_10] | |
.text:00000071008A75AC STP X29, X30, [SP,#0x30+var_s0] | |
.text:00000071008A75B0 ADD X29, SP, #0x30 | |
.text:00000071008A75B4 AND W8, W4, #0xFFFF | |
.text:00000071008A75B8 MOV X19, X3 | |
.text:00000071008A75BC MOV X20, X0 | |
.text:00000071008A75C0 CMP W8, #0x1EB | |
.text:00000071008A75C4 B.GT loc_71008A75F4 | |
.text:00000071008A75C8 SUB W8, W8, #2 ; switch 14 cases | |
.text:00000071008A75CC CMP W8, #0xD | |
.text:00000071008A75D0 B.HI def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A75D0 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A75D4 ADRL X9, jpt_71008A75E8 | |
.text:00000071008A75DC MOV W0, #0x1800 | |
.text:00000071008A75E0 LDRSW X8, [X9,X8,LSL#2] | |
.text:00000071008A75E4 ADD X8, X8, X9 | |
.text:00000071008A75E8 BR X8 ; switch jump | |
.text:00000071008A75EC ; --------------------------------------------------------------------------- | |
.text:00000071008A75EC | |
.text:00000071008A75EC loc_71008A75EC ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A75EC ; DATA XREF: .rodata.2:jpt_71008A75E8↓o | |
.text:00000071008A75EC MOV W0, #0x2000 ; jumptable 00000071008A75E8 case 2 | |
.text:00000071008A75F0 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A75F4 ; --------------------------------------------------------------------------- | |
.text:00000071008A75F4 | |
.text:00000071008A75F4 loc_71008A75F4 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+24↑j | |
.text:00000071008A75F4 SUB W9, W8, #0x1EC ; switch 7 cases | |
.text:00000071008A75F8 CMP W9, #6 | |
.text:00000071008A75FC B.HI def_71008A7614 ; jumptable 00000071008A7614 default case | |
.text:00000071008A7600 ADRL X8, jpt_71008A7614 | |
.text:00000071008A7608 MOV X21, X2 | |
.text:00000071008A760C LDRSW X9, [X8,X9,LSL#2] | |
.text:00000071008A7610 ADD X8, X9, X8 | |
.text:00000071008A7614 BR X8 ; switch jump | |
.text:00000071008A7618 ; --------------------------------------------------------------------------- | |
.text:00000071008A7618 | |
.text:00000071008A7618 loc_71008A7618 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+74↑j | |
.text:00000071008A7618 ; DATA XREF: .rodata.2:jpt_71008A7614↓o | |
.text:00000071008A7618 MOV W1, #0x19 ; jumptable 00000071008A7614 case 492 | |
.text:00000071008A761C MOV X0, X19 ; this | |
.text:00000071008A7620 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue | |
.text:00000071008A7624 CMP W0, #0x63 ; 'c' | |
.text:00000071008A7628 B.LE def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A7628 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A762C B loc_71008A78D0 | |
.text:00000071008A7630 ; --------------------------------------------------------------------------- | |
.text:00000071008A7630 | |
.text:00000071008A7630 def_71008A7614 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+5C↑j | |
.text:00000071008A7630 CMP W8, #0x240 ; jumptable 00000071008A7614 default case | |
.text:00000071008A7634 B.EQ loc_71008A78C0 | |
.text:00000071008A7638 CMP W8, #0x353 | |
.text:00000071008A763C B.NE def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A763C ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A7640 MOV X0, X19 ; a1 | |
.text:00000071008A7644 BL Dpr.Battle.Logic.UltraBeast$$IsUltraBeast | |
.text:00000071008A7648 TST W0, #1 | |
.text:00000071008A764C MOV W8, #0x19A | |
.text:00000071008A7650 MOV W9, #0x5000 | |
.text:00000071008A7654 CSEL W0, W9, W8, NE | |
.text:00000071008A7658 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A765C ; --------------------------------------------------------------------------- | |
.text:00000071008A765C | |
.text:00000071008A765C loc_71008A765C ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+74↑j | |
.text:00000071008A765C ; DATA XREF: .rodata.2:000000710204C21C↓o | |
.text:00000071008A765C MOV W22, #0x11 ; jumptable 00000071008A7614 case 493 | |
.text:00000071008A7660 MOV X0, X21 ; this | |
.text:00000071008A7664 MOV W1, W22 ; vid | |
.text:00000071008A7668 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue | |
.text:00000071008A766C MOV W20, W0 | |
.text:00000071008A7670 MOV X0, X19 ; this | |
.text:00000071008A7674 MOV W1, W22 ; vid | |
.text:00000071008A7678 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue | |
.text:00000071008A767C AND W8, W0, #0xFF | |
.text:00000071008A7680 UBFX W9, W20, #2, #6 | |
.text:00000071008A7684 CMP W9, W8 | |
.text:00000071008A7688 B.CS loc_71008A7710 | |
.text:00000071008A768C AND W9, W20, #0xFF | |
.text:00000071008A7690 LSR W9, W9, #1 | |
.text:00000071008A7694 CMP W9, W8 | |
.text:00000071008A7698 B.CS loc_71008A78D0 | |
.text:00000071008A769C AND W8, W0, #0xFF | |
.text:00000071008A76A0 CMP W8, W20,UXTB | |
.text:00000071008A76A4 MOV W8, #0x1000 | |
.text:00000071008A76A8 MOV W9, #0x2000 | |
.text:00000071008A76AC CSEL W0, W9, W8, CC | |
.text:00000071008A76B0 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A76B4 ; --------------------------------------------------------------------------- | |
.text:00000071008A76B4 | |
.text:00000071008A76B4 loc_71008A76B4 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+74↑j | |
.text:00000071008A76B4 ; DATA XREF: .rodata.2:000000710204C220↓o | |
.text:00000071008A76B4 MOV W1, #1 ; jumptable 00000071008A7614 case 494 | |
.text:00000071008A76B8 MOV X0, X20 ; this | |
.text:00000071008A76BC BL Dpr.Battle.Logic.MainModule$$GetSetupStatusFlag | |
.text:00000071008A76C0 TBNZ W0, #0, loc_71008A78D0 | |
.text:00000071008A76C4 B def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A76C4 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A76C8 ; --------------------------------------------------------------------------- | |
.text:00000071008A76C8 | |
.text:00000071008A76C8 loc_71008A76C8 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+74↑j | |
.text:00000071008A76C8 ; DATA XREF: .rodata.2:000000710204C228↓o | |
.text:00000071008A76C8 MOV X0, X21 ; jumptable 00000071008A7614 case 496 | |
.text:00000071008A76CC BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo | |
.text:00000071008A76D0 MOV W22, #0x14 | |
.text:00000071008A76D4 AND W23, W0, #0xFFFF | |
.text:00000071008A76D8 MOV X0, X21 ; this | |
.text:00000071008A76DC MOV W1, W22 ; vid | |
.text:00000071008A76E0 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue | |
.text:00000071008A76E4 MOV W20, W0 | |
.text:00000071008A76E8 MOV X0, X19 ; a1 | |
.text:00000071008A76EC BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo | |
.text:00000071008A76F0 MOV W21, W0 | |
.text:00000071008A76F4 MOV X0, X19 ; this | |
.text:00000071008A76F8 MOV W1, W22 ; vid | |
.text:00000071008A76FC BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue | |
.text:00000071008A7700 CMP W23, W21,UXTH | |
.text:00000071008A7704 B.NE def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A7704 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A7708 CMP W20, W0 | |
.text:00000071008A770C B.EQ def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A770C ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A7710 | |
.text:00000071008A7710 loc_71008A7710 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+E8↑j | |
.text:00000071008A7710 MOV W0, #0x8000 | |
.text:00000071008A7714 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A7718 ; --------------------------------------------------------------------------- | |
.text:00000071008A7718 | |
.text:00000071008A7718 loc_71008A7718 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+74↑j | |
.text:00000071008A7718 ; DATA XREF: .rodata.2:000000710204C230↓o | |
.text:00000071008A7718 MOV X0, X19 ; jumptable 00000071008A7614 case 498 | |
.text:00000071008A771C BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetMonsNo | |
.text:00000071008A7720 LDRB W1, [X19,#0x33D] ; unsigned int | |
.text:00000071008A7724 AND W0, W0, #0xFFFF ; unsigned int | |
.text:00000071008A7728 BL Dpr.Battle.Logic.Capture$$checkMoonBallEffective | |
.text:00000071008A772C BL sub_7100764D90 | |
.text:00000071008A7730 TST W0, #0xFF | |
.text:00000071008A7734 B.EQ def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A7734 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A7738 MOV W19, W0 | |
.text:00000071008A773C MOV W20, WZR | |
.text:00000071008A7740 | |
.text:00000071008A7740 loc_71008A7740 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+1D0↓j | |
.text:00000071008A7740 MOV W0, W20 | |
.text:00000071008A7744 BL sub_7100764DA0 | |
.text:00000071008A7748 CMP W0, #8 | |
.text:00000071008A774C B.NE loc_71008A7764 | |
.text:00000071008A7750 MOV W0, W20 | |
.text:00000071008A7754 BL sub_7100764DB0 | |
.text:00000071008A7758 AND W8, W0, #0xFFFF | |
.text:00000071008A775C CMP W8, #0x51 ; 'Q' | |
.text:00000071008A7760 B.EQ loc_71008A78D0 | |
.text:00000071008A7764 | |
.text:00000071008A7764 loc_71008A7764 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+1AC↑j | |
.text:00000071008A7764 ADD W20, W20, #1 | |
.text:00000071008A7768 AND W8, W20, #0xFF | |
.text:00000071008A776C CMP W8, W19,UXTB | |
.text:00000071008A7770 B.CC loc_71008A7740 | |
.text:00000071008A7774 B def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A7774 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A7778 ; --------------------------------------------------------------------------- | |
.text:00000071008A7778 | |
.text:00000071008A7778 loc_71008A7778 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A7778 ; DATA XREF: .rodata.2:000000710204C1F0↓o | |
.text:00000071008A7778 MOV W1, #0xA ; jumptable 00000071008A75E8 case 6 | |
.text:00000071008A777C MOV X0, X19 ; this | |
.text:00000071008A7780 BL Dpr.Battle.Logic.BTL_POKEPARAM$$IsMatchType | |
.text:00000071008A7784 TBNZ W0, #0, loc_71008A7840 | |
.text:00000071008A7788 MOV W1, #6 ; type | |
.text:00000071008A778C MOV X0, X19 ; this | |
.text:00000071008A7790 BL Dpr.Battle.Logic.BTL_POKEPARAM$$IsMatchType | |
.text:00000071008A7794 TBNZ W0, #0, loc_71008A7840 | |
.text:00000071008A7798 B def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A7798 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A779C ; --------------------------------------------------------------------------- | |
.text:00000071008A779C | |
.text:00000071008A779C loc_71008A779C ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A779C ; DATA XREF: .rodata.2:000000710204C1F4↓o | |
.text:00000071008A779C MOV W1, #1 ; jumptable 00000071008A75E8 case 7 | |
.text:00000071008A77A0 MOV X0, X20 ; this | |
.text:00000071008A77A4 BL Dpr.Battle.Logic.MainModule$$GetSetupStatusFlag | |
.text:00000071008A77A8 TBNZ W0, #0, loc_71008A7840 | |
.text:00000071008A77AC MOV W1, #2 ; flag | |
.text:00000071008A77B0 MOV X0, X20 ; this | |
.text:00000071008A77B4 BL Dpr.Battle.Logic.MainModule$$GetSetupStatusFlag | |
.text:00000071008A77B8 TBNZ W0, #0, loc_71008A7840 | |
.text:00000071008A77BC B def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A77BC ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A77C0 ; --------------------------------------------------------------------------- | |
.text:00000071008A77C0 | |
.text:00000071008A77C0 loc_71008A77C0 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A77C0 ; DATA XREF: .rodata.2:000000710204C1F8↓o | |
.text:00000071008A77C0 MOV W1, #17 ; jumptable 00000071008A75E8 case 8 | |
.text:00000071008A77C4 MOV X0, X19 ; this | |
.text:00000071008A77C8 BL Dpr.Battle.Logic.BTL_POKEPARAM$$GetValue | |
.text:00000071008A77CC AND W8, W0, #0xFFFE | |
.text:00000071008A77D0 CMP W8, #0x1D | |
.text:00000071008A77D4 B.HI def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A77D4 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A77D8 MOV W8, #41 | |
.text:00000071008A77DC SUB W8, W8, W0 | |
.text:00000071008A77E0 AND W9, W8, #0xFFFF | |
.text:00000071008A77E4 CMP W9, #40 | |
.text:00000071008A77E8 MOV W9, #40 | |
.text:00000071008A77EC CSEL W8, W8, W9, CC | |
.text:00000071008A77F0 AND W9, W8, #0xFFFF | |
.text:00000071008A77F4 LSL W9, W9, #12 | |
.text:00000071008A77F8 FMOV S1, #0.5 | |
.text:00000071008A77FC SCVTF S0, W9 | |
.text:00000071008A7800 FMOV S2, #-0.5 | |
.text:00000071008A7804 TST W8, #0xFFFF | |
.text:00000071008A7808 FCSEL S1, S2, S1, EQ | |
.text:00000071008A780C FADD S0, S1, S0 | |
.text:00000071008A7810 FCVTZS W8, S0 | |
.text:00000071008A7814 MOV W9, #0x66666667 | |
.text:00000071008A781C SMULL X8, W8, W9 | |
.text:00000071008A7820 LSR X9, X8, #63 | |
.text:00000071008A7824 ASR X8, X8, #34 | |
.text:00000071008A7828 ADD W0, W8, W9 | |
.text:00000071008A782C B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A7830 ; --------------------------------------------------------------------------- | |
.text:00000071008A7830 | |
.text:00000071008A7830 loc_71008A7830 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A7830 ; DATA XREF: .rodata.2:000000710204C1FC↓o | |
.text:00000071008A7830 MOV X0, X20 ; jumptable 00000071008A75E8 case 9 | |
.text:00000071008A7834 MOV X1, X19 ; Dpr_Battle_Logic_BTL_POKEPARAM_o * | |
.text:00000071008A7838 BL Dpr.Battle.Logic.MainModule$$IsZukanRegistered | |
.text:00000071008A783C TBZ W0, #0, def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A783C ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A7840 | |
.text:00000071008A7840 loc_71008A7840 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+1E4↑j | |
.text:00000071008A7840 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+1F4↑j ... | |
.text:00000071008A7840 MOV W0, #0x3800 | |
.text:00000071008A7844 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A7848 ; --------------------------------------------------------------------------- | |
.text:00000071008A7848 | |
.text:00000071008A7848 loc_71008A7848 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A7848 ; DATA XREF: .rodata.2:000000710204C200↓o | |
.text:00000071008A7848 MOV X0, X1 ; jumptable 00000071008A75E8 case 10 | |
.text:00000071008A784C BL sub_7100831A90 | |
.text:00000071008A7850 MOV W1, WZR ; a2 | |
.text:00000071008A7854 BL Dpr.Battle.Logic.BattleCounter$$Get | |
.text:00000071008A7858 MOV W8, #0x4CD | |
.text:00000071008A785C MOV W9, #0x1000 | |
.text:00000071008A7860 MADD W8, W0, W8, W9 | |
.text:00000071008A7864 MOV W9, #0x4000 | |
.text:00000071008A7868 CMP W8, #4,LSL#12 | |
.text:00000071008A786C CSEL W0, W8, W9, LT | |
.text:00000071008A7870 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A7874 ; --------------------------------------------------------------------------- | |
.text:00000071008A7874 | |
.text:00000071008A7874 loc_71008A7874 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A7874 ; DATA XREF: .rodata.2:000000710204C20C↓o | |
.text:00000071008A7874 MOV X0, X20 ; jumptable 00000071008A75E8 case 13 | |
.text:00000071008A7878 BL Dpr.Battle.Logic.MainModule$$GetFieldSituation | |
.text:00000071008A787C MOV X19, X0 | |
.text:00000071008A7880 BL GameManager$$get_currentPeriodOfDay | |
.text:00000071008A7884 LDRB W9, [X19] | |
.text:00000071008A7888 MOV W8, W0 | |
.text:00000071008A788C MOV W0, #0x3000 | |
.text:00000071008A7890 CBNZ W9, loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A7894 SUB W8, W8, #2 | |
.text:00000071008A7898 CMP W8, #3 | |
.text:00000071008A789C B.CS def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A789C ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A78A0 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A78A4 ; --------------------------------------------------------------------------- | |
.text:00000071008A78A4 | |
.text:00000071008A78A4 loc_71008A78A4 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A78A4 ; DATA XREF: .rodata.2:000000710204C214↓o | |
.text:00000071008A78A4 MOV X0, X1 ; jumptable 00000071008A75E8 case 15 | |
.text:00000071008A78A8 BL sub_7100831A90 | |
.text:00000071008A78AC MOV W1, WZR ; a2 | |
.text:00000071008A78B0 BL Dpr.Battle.Logic.BattleCounter$$Get | |
.text:00000071008A78B4 CBNZ X0, def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A78B4 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A78B8 MOV W0, #0x5000 | |
.text:00000071008A78BC B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A78C0 ; --------------------------------------------------------------------------- | |
.text:00000071008A78C0 | |
.text:00000071008A78C0 loc_71008A78C0 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+94↑j | |
.text:00000071008A78C0 MOV W1, #1 ; checkMode | |
.text:00000071008A78C4 MOV X0, X19 ; this | |
.text:00000071008A78C8 BL Dpr.Battle.Logic.BTL_POKEPARAM$$CheckNemuri | |
.text:00000071008A78CC TBZ W0, #0, def_71008A75E8 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A78CC ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A78D0 | |
.text:00000071008A78D0 loc_71008A78D0 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+8C↑j | |
.text:00000071008A78D0 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+F8↑j ... | |
.text:00000071008A78D0 MOV W0, #0x4000 | |
.text:00000071008A78D4 B loc_71008A78DC ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A78D8 ; --------------------------------------------------------------------------- | |
.text:00000071008A78D8 | |
.text:00000071008A78D8 def_71008A75E8 ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+30↑j | |
.text:00000071008A78D8 ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j ... | |
.text:00000071008A78D8 MOV W0, #0x1000 ; jumptable 00000071008A75E8 default case, cases 4,5,11,12,14 | |
.text:00000071008A78D8 ; jumptable 00000071008A7614 cases 495,497 | |
.text:00000071008A78DC | |
.text:00000071008A78DC loc_71008A78DC ; CODE XREF: Dpr.Battle.Logic.Capture$$getBallCaptureRatio+48↑j | |
.text:00000071008A78DC ; Dpr.Battle.Logic.Capture$$getBallCaptureRatio+50↑j ... | |
.text:00000071008A78DC LDP X29, X30, [SP,#0x30+var_s0] ; jumptable 00000071008A75E8 case 3 | |
.text:00000071008A78E0 LDP X20, X19, [SP,#0x30+var_10] | |
.text:00000071008A78E4 LDP X22, X21, [SP,#0x30+var_20] | |
.text:00000071008A78E8 LDR X23, [SP+0x30+var_30],#0x40 | |
.text:00000071008A78EC RET | |
.text:00000071008A78EC ; End of function Dpr.Battle.Logic.Capture$$getBallCaptureRatio |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment