Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Multiply:
- /*r4 = base exp..*/
- /*r5 = foe’s level*/
- /*This multiplies the base exp. by the opponent’s level*/
- /*Then it multiplies the result by 20*/
- /*Then it divides the whole thing by 100*/
- /*This is the same as dividing it by 5*/
- /*r0 is the top number, r1 is the bottom number*/
- mul r4, r5
- mov r1, r4 /*r1 is B x L*/
- mov r0, #0x14
- mul r0, r1 /*r0 = B x L*/
- mov r1, #0xFA /*r1 = 100*/
- bl Divide /*divides by 100*/
- mov r3, r0
- LevelStuff:
- /*This multiplies the foe’s level by 2*/
- /*Then adds 10 to the result*/
- /*Then it multiplies that result by itself to square it*/
- /*This is the top part of the level ratio*/
- mov r2, #0x2
- mov r1, r5 /*move foe level to r1*/
- mul r1, r2 /*multiply foe level by 2*/
- mov r2, #0xA
- add r1, r1, r2 /*add 10 to 2 x Foe Level*/
- mul r1, r1 /*multiply (2L+10) by itself*/
- BottomLevel:
- /*r5 = foe’s level*/
- /*r6 = your level*/
- /*This add your level to the opponent’s level*/
- /*Then adds ten to that sum*/
- /*multiplies by itself to square it*/
- add r5, r5, r6
- add r5, r5, r2
- mul r5, r5
- DivideAgain:
- /*r1 = (2L+10)^2*/
- /*r5 = (L+Lp+10)^2*/
- /*r6 = (B x L) / 5*/
- /*Stores answer to r0*/
- /*Then moves answer to r2*/
- mov r0, r1
- mov r1, r5
- mov r6, r3 /*move BL/5 to r6*/
- mov r3, #0x64 /*multiply top by 100*/
- mul r0, r3
- bl Divide /*Divide top by bottom*/
- mov r2, r0
- DivideSomeMore:
- /*r6 = BL/5*/
- /*r2 = Level Ratio*/
- /*Multiplies the 2nd term by 100*/
- /*Then divides whole thing by 100*/
- mul r6, r2 /*multiply BL/5 by (100*2ndTerm)*/
- mov r0, r6
- mov r1, #0xFA
- bl Divide /*Divides (BL/5)*(100*2ndTerm) by 100*/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement