Difference between revisions of "001b0460 - 001b04d8"
Jump to navigation
Jump to search
(Created page with "001b0460: 3c02801c lui r2,0x801c 001b0464: 84428b70 lh r2,-0x7490(r2) 001b0468: 00000000 nop 001b046c: 00401821 addu r3,r2,r0 001b0470: 28420801 slti r2,r2,0x0801 001b0474: 14...") |
|||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
− | 001b0460: 3c02801c lui r2,0x801c | + | returns a value of r2 based on the current arctan angle mod. |
− | 001b0464: 84428b70 lh r2,-0x7490(r2) | + | 001b0460: 3c02801c lui r2,0x801c |
− | 001b0468: 00000000 nop | + | 001b0464: 84428b70 lh r2,-0x7490(r2) arctan angle mod |
− | 001b046c: 00401821 addu r3,r2,r0 | + | 001b0468: 00000000 nop |
− | 001b0470: 28420801 slti r2,r2,0x0801 | + | 001b046c: 00401821 addu r3,r2,r0 r3 = arctan angle mod |
− | 001b0474: 14400004 bne r2,r0,0x001b0488 | + | 001b0470: 28420801 slti r2,r2,0x0801 set true if <= 800 |
− | 001b0478: 27bdfff0 addiu r29,r29,0xfff0 | + | 001b0474: 14400004 bne r2,r0,0x001b0488 branch if so |
− | 001b047c: 2462f000 addiu r2,r3,0xf000 | + | 001b0478: 27bdfff0 addiu r29,r29,0xfff0 |
− | 001b0480: 3c01801c lui r1,0x801c | + | 001b047c: 2462f000 addiu r2,r3,0xf000 angle - 0x1000 |
− | 001b0484: a4228b70 sh r2,-0x7490(r1) | + | 001b0480: 3c01801c lui r1,0x801c |
− | 001b0488: 3c02801c lui r2,0x801c | + | 001b0484: a4228b70 sh r2,-0x7490(r1) Save angle to new angle mod |
− | 001b048c: 84428b70 lh r2,-0x7490(r2) | + | 001b0488: 3c02801c lui r2,0x801c |
− | 001b0490: 00000000 nop | + | 001b048c: 84428b70 lh r2,-0x7490(r2) load arctan angle mod again |
− | 001b0494: 00401821 addu r3,r2,r0 | + | 001b0490: 00000000 nop |
− | 001b0498: 2842f800 slti r2,r2,-0x0800 | + | 001b0494: 00401821 addu r3,r2,r0 put that shit in r3 |
− | 001b049c: 10400003 beq r2,r0,0x001b04ac | + | 001b0498: 2842f800 slti r2,r2,-0x0800 set if less than -800 |
− | 001b04a0: 24621000 addiu r2,r3,0x1000 | + | 001b049c: 10400003 beq r2,r0,0x001b04ac branch if not the case |
− | 001b04a4: 3c01801c lui r1,0x801c | + | 001b04a0: 24621000 addiu r2,r3,0x1000 arctan angle + 0x1000 |
− | 001b04a8: a4228b70 sh r2,-0x7490(r1) | + | 001b04a4: 3c01801c lui r1,0x801c |
− | 001b04ac: 3c03801c lui r3,0x801c | + | 001b04a8: a4228b70 sh r2,-0x7490(r1) Save new angle |
− | 001b04b0: 84638b70 lh r3,-0x7490(r3) | + | 001b04ac: 3c03801c lui r3,0x801c |
− | 001b04b4: 00000000 nop | + | 001b04b0: 84638b70 lh r3,-0x7490(r3) load arctan angle mod |
− | 001b04b8: 286202ab slti r2,r3,0x02ab | + | 001b04b4: 00000000 nop |
− | 001b04bc: 14400003 bne r2,r0,0x001b04cc | + | 001b04b8: 286202ab slti r2,r3,0x02ab set if less than 0x2ab |
− | 001b04c0: 2862fd56 slti r2,r3,-0x02aa | + | 001b04bc: 14400003 bne r2,r0,0x001b04cc branch if so |
− | 001b04c4: 0806c134 j 0x001b04d0 | + | 001b04c0: 2862fd56 slti r2,r3,-0x02aa set if less than -0x2aa |
− | 001b04c8: 34020002 ori r2,r0,0x0002 | + | 001b04c4: 0806c134 j 0x001b04d0 jump to end |
− | 001b04cc: 38420001 xori r2,r2,0x0001 | + | 001b04c8: 34020002 ori r2,r0,0x0002 r2 = 2 if !< 0x2ab |
− | 001b04d0: 27bd0010 addiu r29,r29,0x0010 | + | 001b04cc: 38420001 xori r2,r2,0x0001 r2 = 1 if > -0x2aa, r2 = 0 if < -0x2aa |
− | 001b04d4: 03e00008 jr r31 | + | 001b04d0: 27bd0010 addiu r29,r29,0x0010 |
− | 001b04d8: 00000000 nop | + | 001b04d4: 03e00008 jr r31 |
+ | 001b04d8: 00000000 nop |
Latest revision as of 02:07, 24 October 2021
returns a value of r2 based on the current arctan angle mod. 001b0460: 3c02801c lui r2,0x801c 001b0464: 84428b70 lh r2,-0x7490(r2) arctan angle mod 001b0468: 00000000 nop 001b046c: 00401821 addu r3,r2,r0 r3 = arctan angle mod 001b0470: 28420801 slti r2,r2,0x0801 set true if <= 800 001b0474: 14400004 bne r2,r0,0x001b0488 branch if so 001b0478: 27bdfff0 addiu r29,r29,0xfff0 001b047c: 2462f000 addiu r2,r3,0xf000 angle - 0x1000 001b0480: 3c01801c lui r1,0x801c 001b0484: a4228b70 sh r2,-0x7490(r1) Save angle to new angle mod 001b0488: 3c02801c lui r2,0x801c 001b048c: 84428b70 lh r2,-0x7490(r2) load arctan angle mod again 001b0490: 00000000 nop 001b0494: 00401821 addu r3,r2,r0 put that shit in r3 001b0498: 2842f800 slti r2,r2,-0x0800 set if less than -800 001b049c: 10400003 beq r2,r0,0x001b04ac branch if not the case 001b04a0: 24621000 addiu r2,r3,0x1000 arctan angle + 0x1000 001b04a4: 3c01801c lui r1,0x801c 001b04a8: a4228b70 sh r2,-0x7490(r1) Save new angle 001b04ac: 3c03801c lui r3,0x801c 001b04b0: 84638b70 lh r3,-0x7490(r3) load arctan angle mod 001b04b4: 00000000 nop 001b04b8: 286202ab slti r2,r3,0x02ab set if less than 0x2ab 001b04bc: 14400003 bne r2,r0,0x001b04cc branch if so 001b04c0: 2862fd56 slti r2,r3,-0x02aa set if less than -0x2aa 001b04c4: 0806c134 j 0x001b04d0 jump to end 001b04c8: 34020002 ori r2,r0,0x0002 r2 = 2 if !< 0x2ab 001b04cc: 38420001 xori r2,r2,0x0001 r2 = 1 if > -0x2aa, r2 = 0 if < -0x2aa 001b04d0: 27bd0010 addiu r29,r29,0x0010 001b04d4: 03e00008 jr r31 001b04d8: 00000000 nop