-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* colorpalette just has stlport regswaps now * hdcache work * a buncha fixes * key math attempt * i hate inlines * i hate inlining * tiny tweaks * midiinst work * update samplezone fields * midiinst work * uiproxy nearly done * add binkclip cpp, UIProxy has link issues * binkclip work * binkclip almost done * match binkclip * add binkreader TU * sampledata work * metamusic added * wavefile nearly matched * match wavefile * wavefile and sampledata tweaks
- Loading branch information
Showing
40 changed files
with
1,180 additions
and
129 deletions.
There are no files selected for viewing
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#include "math/Key.h" | ||
#include "math/Vec.h" | ||
|
||
// fn_802E33CC - SplineTangent(const Keys<Vector3, Vector3>&, int, Vector3&) | ||
// https://decomp.me/scratch/uaX0T - retail | ||
// https://decomp.me/scratch/g4W1K - debug (i hate inlining) | ||
void SplineTangent(const Keys<Vector3, Vector3>& keys, int i, Vector3& vout){ | ||
int size = keys.size(); | ||
MILO_ASSERT(size > 1, 0x17); | ||
if(size == 2){ | ||
Subtract(keys[1].value, keys[0].value, vout); | ||
} | ||
else if(i <= 0){ | ||
Subtract(keys[1].value, keys[0].value, vout); | ||
Scale(vout, 1.5f, vout); | ||
Vector3 vtmp; | ||
Subtract(keys[2].value, keys[0].value, vtmp); | ||
Scale(vtmp, 0.25f, vtmp); | ||
Subtract(vout, vtmp, vout); | ||
} | ||
else if(i >= size - 1){ | ||
Subtract(keys[size - 1].value, keys[size - 2].value, vout); | ||
Scale(vout, 1.5f, vout); | ||
Vector3 vtmp; | ||
Subtract(keys[size - 1].value, keys[size - 3].value, vtmp); | ||
Scale(vtmp, 0.25f, vtmp); | ||
Subtract(vout, vtmp, vout); | ||
} | ||
else { | ||
Subtract(keys[i + 1].value, keys[i - 1].value, vout); | ||
Scale(vout, 0.5f, vout); | ||
} | ||
} | ||
|
||
// fn_802E35A8 - InterpTangent(const Vector3&, const Vector3&, const Vector3&, const Vector3&, float, Vector3&) | ||
// i absolutely hate inlines | ||
void InterpTangent(const Vector3& v1, const Vector3& v2, const Vector3& v3, const Vector3& v4, float f, Vector3& vout){ | ||
float scale = f * f; | ||
Scale(v1, scale * 6.0f - f * 6.0f, vout); | ||
Vector3 vtmp; | ||
Scale(v2, -(f * 4.0f - scale * 3.0f) + 1.0f, vtmp); | ||
Add(vout, vtmp, vout); | ||
Scale(v3, scale * -6.0f + f * 6.0f, vtmp); | ||
Add(vout, vtmp, vout); | ||
Scale(v4, -(f * 2.0f - f * 3.0f), vtmp); | ||
Add(vout, vtmp, vout); | ||
} | ||
|
||
// fn_802E36D4 - InterpVector(const Keys<Vector3, Vector3>&, const Key<Vector3>*, const Key<Vector3>*, float, bool, Vector3&, Vector3*) |
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
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
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
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
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
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
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
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
Oops, something went wrong.