Core's version. Proper decompilation by ChocolateFan TODO: Replace with float-based version.
| 830 | // Core's version. Proper decompilation by ChocolateFan |
| 831 | // TODO: Replace with float-based version. |
| 832 | int Spline(int x, int* knots, int nk) |
| 833 | { |
| 834 | int span = x * (nk - 3) >> 16; |
| 835 | if (span >= nk - 3) |
| 836 | span = nk - 4; |
| 837 | |
| 838 | int* k = &knots[span]; |
| 839 | x = x * (nk - 3) - span * 65536; |
| 840 | |
| 841 | int c1 = (k[1] >> 1) - (k[2] >> 1) - k[2] + k[1] + (k[3] >> 1) + ((-k[0] - 1) >> 1); |
| 842 | int c2 = 2 * k[2] - 2 * k[1] - (k[1] >> 1) - (k[3] >> 1) + k[0]; |
| 843 | |
| 844 | return ((__int64)x * (((__int64)x * (((__int64)x * c1 >> 16) + c2) >> 16) + (k[2] >> 1) + ((-k[0] - 1) >> 1)) >> 16) + k[1]; |
| 845 | } |
| 846 | |
| 847 | Pose GetCameraTransform(int sequence, float alpha, bool loop) |
| 848 | { |
no outgoing calls
no test coverage detected