Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions config/373307D9/symbols.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21643,7 +21643,7 @@ lbl_8209D588 = .rdata:0x8209D588; // type:object size:0x18
??_C@_0BE@HGGBKAPA@rndtex?4debug_mirror?$AA@ = .rdata:0x8209D5B8; // type:object size:0x18 scope:global
??_C@_0FP@JLAHJNGD@?$CFs?5could?5not?5do?5mirroring?5becaus@ = .rdata:0x8209D5D0; // type:object size:0x60 scope:global
??_C@_0EM@BMMNJFBC@?$CFs?5could?5not?5find?5mesh?5to?5mirror@ = .rdata:0x8209D630; // type:object size:0x50 scope:global
??_C@_0EL@GLPGHLJM@?$CFs?3?5Cannot?5render?5to?5texture?5?$CI?$CFs@ = .rdata:0x8209D680; // type:object size:0x4C scope:global
??_C@_0EL@GLPGHLJM@?$CFs?3?5Cannot?5render?5to?5texture?5?$CI?$CFs@ = .rdata:0x8209D680; // type:object size:0x4C scope:global data:string
??_C@_0L@OAIJIIOI@pre_render?$AA@ = .rdata:0x8209D6CC; // type:object size:0xC scope:global
??_C@_0BC@LEOPHPGG@?$CFs?5not?5renderable?$AA@ = .rdata:0x8209D6D8; // type:object size:0x18 scope:global
lbl_8209D6F0 = .rdata:0x8209D6F0; // type:object size:0x18
Expand Down Expand Up @@ -22049,7 +22049,7 @@ lbl_8209F850 = .rdata:0x8209F850; // type:object size:0xC align:4 data:float
lbl_8209F85C = .rdata:0x8209F85C; // type:object size:0x8 align:4 data:float
lbl_8209F864 = .rdata:0x8209F864; // type:object size:0x4
__real@c47a0000 = .rdata:0x8209F868; // type:object size:0x4 scope:global align:4 data:float
merged_8209F86C = .rdata:0x8209F86C; // type:object size:0x4 scope:global align:4 data:float
__real@3dcccccd = .rdata:0x8209F86C; // type:object size:0x4 scope:global align:4 data:float
??_C@_0DB@FPOLGBDK@e?3?2lazer_build_gmc1?2system?2src?2r@ = .rdata:0x8209F870; // type:object size:0x38 scope:global
??_C@_0EA@MEKPFPHE@?$CI0?$CJ?5?$DM?$DN?5?$CIiIndex?$CJ?5?$CG?$CG?5?$CIiIndex?$CJ?5?$DM?5?$CI?$CI@ = .rdata:0x8209F8A8; // type:object size:0x40 scope:global data:string
??_C@_0BJ@CAHAJFCE@iStartIndex?5?$DM?$DN?5iEndIndex?$AA@ = .rdata:0x8209F8E8; // type:object size:0x20 scope:global
Expand Down Expand Up @@ -142718,7 +142718,7 @@ __unwind$132752 = .text:0x8261CB94; // type:function size:0x28 scope:global
?clear@?$_List_base@UShaderTree@RndShaderMgr@@V?$StlNodeAlloc@UShaderTree@RndShaderMgr@@@stlpmtx_std@@@stlpmtx_std@@QAAXXZ = .text:0x8261CEF8; // type:function size:0x5C scope:global
?EstimatedCost@DxShader@@UAAXAAM0@Z = .text:0x8261CF58; // type:function size:0xF4 scope:global
merged_8261D050 = .text:0x8261D050; // type:function size:0x8 scope:global
merged_8261D058 = .text:0x8261D058; // type:function size:0x8 scope:global
merged_Get0x48 = .text:0x8261D058; // type:function size:0x8 scope:global
merged_8261D060 = .text:0x8261D060; // type:function size:0x8 scope:global
merged_8261D068 = .text:0x8261D068; // type:function size:0x8 scope:global
merged_8261D070 = .text:0x8261D070; // type:function size:0x5C scope:global
Expand Down Expand Up @@ -171875,8 +171875,8 @@ __unwind$211220 = .text:0x829658EC; // type:function size:0x20 scope:global
?MoveOn@MQSongSortMgr@@UAA?AVSymbol@@XZ = .text:0x82965910; // type:function size:0x78 scope:global
?IsCharacter@MQSongSortMgr@@QBA_NVSymbol@@@Z = .text:0x82965988; // type:function size:0x64 scope:global
??1MQSongSort@@UAA@XZ = .text:0x829659F0; // type:function size:0x1C scope:global
merged_82965A10 = .text:0x82965A10; // type:function size:0x8 scope:global
merged_82965A18 = .text:0x82965A18; // type:function size:0x64 scope:global
??_EMQSongSort@@W3AAPAXI@Z = .text:0x82965A10; // type:function size:0x8 scope:global
??_GMQSongSort@@UAAPAXI@Z = .text:0x82965A18; // type:function size:0x64 scope:global
except_data_82965A88 = .text:0x82965A80; // type:object size:0x8 scope:global
??0MQSongSortByCharacter@@QAA@XZ = .text:0x82965A88; // type:function size:0x78 scope:global
__unwind$214419 = .text:0x82965B00; // type:function size:0x28 scope:global
Expand Down Expand Up @@ -173175,7 +173175,7 @@ except_data_82988BE8 = .text:0x82988BE0; // type:object size:0x8 scope:global
??1NavListFunctionNode@@UAA@XZ = .text:0x82988BE8; // type:function size:0x54 scope:global
__unwind$218791 = .text:0x82988C3C; // type:function size:0x28 scope:global
merged_82988C68 = .text:0x82988C68; // type:function size:0xC scope:global
merged_82988C78 = .text:0x82988C78; // type:function size:0x4C scope:global
??_GNavListFunctionNode@@UAAPAXI@Z = .text:0x82988C78; // type:function size:0x4C scope:global
?DeleteItemList@SongSort@@UAAXXZ = .text:0x82988CC8; // type:function size:0x2C scope:global
?UpdateHighlight@SongSort@@UAAXXZ = .text:0x82988CF8; // type:function size:0x2C scope:global
?OnSelectShortcut@SongSort@@UAAXH@Z = .text:0x82988D28; // type:function size:0x2C scope:global
Expand All @@ -173187,7 +173187,7 @@ merged_82988C78 = .text:0x82988C78; // type:function size:0x4C scope:global
except_data_82989050 = .text:0x82989048; // type:object size:0x8 scope:global
??0NavListFunctionNode@@QAA@PAVNavListItemSortCmp@@VSymbol@@PBD@Z = .text:0x82989050; // type:function size:0x4C scope:global
__unwind$221927 = .text:0x8298909C; // type:function size:0x28 scope:global
merged_829890C8 = .text:0x829890C8; // type:function size:0x58 scope:global
??_GSongFunctionNode@@UAAPAXI@Z = .text:0x829890C8; // type:function size:0x58 scope:global
??0SongSort@@QAA@XZ = .text:0x82989120; // type:function size:0x48 scope:global
except_data_82989170 = .text:0x82989168; // type:object size:0x8 scope:global
?BuildItemList@SongSort@@UAAXXZ = .text:0x82989170; // type:function size:0x4F0 scope:global
Expand Down Expand Up @@ -194789,7 +194789,7 @@ __unwind$155274 = .text:0x82EDCEDC; // type:function size:0x28 scope:global
??__FenterMsg@?BC@??SetMode@GameMode@@QAAXVSymbol@@0@Z@YAXXZ = .text:0x82EE3E30; // type:function size:0x1C scope:global
??__FexitMsg@?5??SetMode@GameMode@@QAAXVSymbol@@0@Z@YAXXZ = .text:0x82EE3E50; // type:function size:0x1C scope:global
??__Fload_game_hud@?1??SetGameplayMode@GameMode@@QAAXVSymbol@@_N@Z@YAXXZ = .text:0x82EE3E70; // type:function size:0x1C scope:global
??__Fsongseq_intro@?DK@??OnSongLoaded@SongSequence@@QAAXXZ@YAXXZ = .text:0x82EE3E90; // type:function size:0x1C scope:global
??__Fsongseq_intro@?DN@??OnSongLoaded@SongSequence@@QAAXXZ@YAXXZ = .text:0x82EE3E90; // type:function size:0x1C scope:global
??__FTheSongSequence@@YAXXZ = .text:0x82EE3EB0; // type:function size:0x3C scope:global
??__FTheHamUI@@YAXXZ = .text:0x82EE3EF0; // type:function size:0xC scope:global
??__Finit@?1??OnMsg@HamUI@@IAA?AVDataNode@@ABVContentReadFailureMsg@@@Z@YAXXZ = .text:0x82EE3F00; // type:function size:0x1C scope:global
Expand Down Expand Up @@ -198434,8 +198434,8 @@ lbl_82F446EC = .data:0x82F446EC; // type:object size:0x2
lbl_82F446EE = .data:0x82F446EE; // type:object size:0xA
lbl_82F446F8 = .data:0x82F446F8; // type:object size:0x4 align:4 data:float
??_R0PAV?$_List_node@VVector3@@@stlpmtx_std@@@8 = .data:0x82F446FC; // type:object size:0x34 scope:global
lbl_82F44730 = .data:0x82F44730; // type:object size:0x4 align:4 data:float
lbl_82F44734 = .data:0x82F44734; // type:object size:0x4 data:4byte
__real@3e4ccccd = .data:0x82F44730; // type:object size:0x4 align:4 data:float
?lock_in_point_req@?1??IsLockedIn@ArcDetector@@QBA_NXZ@4HA = .data:0x82F44734; // type:object size:0x4 data:4byte
??_R0?AVArcDetector@@@8 = .data:0x82F44738; // type:object size:0x1C scope:global
lbl_82F44754 = .data:0x82F44754; // type:object size:0x4 align:4 data:float
lbl_82F44758 = .data:0x82F44758; // type:object size:0x4 align:4 data:float
Expand Down Expand Up @@ -207460,7 +207460,7 @@ lbl_831177B4 = .data:0x831177B4; // type:object size:0x4 data:4byte
lbl_831177BC = .data:0x831177BC; // type:object size:0x4 data:4byte
lbl_831177C0 = .data:0x831177C0; // type:object size:0x4
lbl_831177C4 = .data:0x831177C4; // type:object size:0x4 data:4byte
lbl_831177C8 = .data:0x831177C8; // type:object size:0x8 data:4byte
?songseq_intro@?DN@??OnSongLoaded@SongSequence@@QAAXXZ@4VMessage@@A = .data:0x831177C8; // type:object size:0x8 data:4byte
lbl_831177D0 = .data:0x831177D0; // type:object size:0x4 data:4byte
lbl_831177D4 = .data:0x831177D4; // type:object size:0x4 data:4byte
lbl_831177D8 = .data:0x831177D8; // type:object size:0x4 data:4byte
Expand Down Expand Up @@ -210487,9 +210487,9 @@ lbl_8311B338 = .data:0x8311B338; // type:object size:0x4 data:4byte
lbl_8311B33C = .data:0x8311B33C; // type:object size:0x4
lbl_8311B340 = .data:0x8311B340; // type:object size:0x4 data:4byte
lbl_8311B344 = .data:0x8311B344; // type:object size:0x4 data:4byte
lbl_8311B348 = .data:0x8311B348; // type:object size:0x4 data:4byte
lbl_8311B34C = .data:0x8311B34C; // type:object size:0x4 data:4byte
lbl_8311B350 = .data:0x8311B350; // type:object size:0x4 data:4byte
?$S2@?5??BuildTree@SongSort@@UAAXXZ@4IA = .data:0x8311B348; // type:object size:0x4 data:4byte
?by_song@?5??BuildTree@SongSort@@UAAXXZ@4VSymbol@@A = .data:0x8311B34C; // type:object size:0x4 data:4byte
?by_artist@?5??BuildTree@SongSort@@UAAXXZ@4VSymbol@@A = .data:0x8311B350; // type:object size:0x4 data:4byte
lbl_8311B354 = .data:0x8311B354; // type:object size:0x4 data:4byte
lbl_8311B358 = .data:0x8311B358; // type:object size:0x4 data:4byte
lbl_8311B35C = .data:0x8311B35C; // type:object size:0x4 data:4byte
Expand Down Expand Up @@ -211491,8 +211491,8 @@ lbl_8316B1A8 = .data:0x8316B1A8; // type:object size:0x4 data:4byte
lbl_8316B1AC = .data:0x8316B1AC; // type:object size:0x4 data:4byte
lbl_8316B1B0 = .data:0x8316B1B0; // type:object size:0x8 data:4byte
lbl_8316B1B8 = .data:0x8316B1B8; // type:object size:0x4 data:4byte
lbl_8316B1BC = .data:0x8316B1BC; // type:object size:0x8 data:4byte
lbl_8316B1C4 = .data:0x8316B1C4; // type:object size:0x4 data:4byte
?_dw@?BL@??DrawToTexture@StreamRenderer@@IAAXXZ@4VDebugNotifyOncer@@A = .data:0x8316B1BC; // type:object size:0x8 data:4byte
?$S6@?BL@??DrawToTexture@StreamRenderer@@IAAXXZ@4IA = .data:0x8316B1C4; // type:object size:0x4 data:4byte
?types@?5??SetType@StreamRenderer@@UAAXVSymbol@@@Z@4PAVDataArray@@A = .data:0x8316B1C8; // type:object size:0x4 scope:global data:4byte
??_B?5??SetType@StreamRenderer@@UAAXVSymbol@@@Z@55 = .data:0x8316B1CC; // type:object size:0x4 scope:global data:4byte
?types@?5??SetType@HandsUpGestureFilter@@UAAXVSymbol@@@Z@4PAVDataArray@@A = .data:0x8316B1D0; // type:object size:0x4 scope:global data:4byte
Expand Down
34 changes: 34 additions & 0 deletions src/system/dsp/EQEffect.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@
#include "xdk/xaudio2/xaudio2.h"
#include <cstring>

void EQEffect::Process(float *samples, int sampct, int numChans) {
if (unk2c != 0.0f) {
MILO_ASSERT(numChans <= 2, 120);
if (numChans <= 0)
return;
for (int i = 0; i < sampct; i++) {
}
return;
} else {
MILO_ASSERT(numChans <= 2, 217);
if (numChans <= 0)
return;
for (int i = 0; i < numChans; i++) {
}
}
}

void EQEffect::SetParameter(int idx, float val) {
bool dirty29 = false, dirty30 = false, dirty28 = false, dirty27 = false,
dirty26 = false, dirty25 = false;
Expand Down Expand Up @@ -289,3 +306,20 @@ void EQEffect::SetParameters(const EQEffect::Params &params) {
SetParameter(11, params.lrMode);
SetParameter(12, params.transitionTime);
}

void EQEffect::Reset() {
unkc8 = unkc0 = 0.0f;
for (int i = 0; i < 2; i++) {
}
unk44 = unk40;
unk64 = unk60;
unk80 = unk7c;
unk4c = unk48;
unk6c = unk68;
unk88 = unk84;
if (unk30 != 0.0f) {
unk34 = powf(0.368, 1.0f / (unk30 * 48.0f));
} else {
unk34 = 1.0f;
}
}
18 changes: 17 additions & 1 deletion src/system/dsp/EQEffect.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,23 @@ class EQEffect {
float unkb4;
float unkb8;
float unkbc;
char pad[0x70];
float unkc0;
float unkc4;
float unkc8;
float unkcc;
float unkd0;
float unkd4;
float unkd8;
float unkdc;
float unke0;
float unke4;
float unke8;
float unkec;
float unkf0;
float unkf4;
float unkf8;
float unkfc;
char pad[0x30];
float unk_0x130;
float unk_0x134;
float unk_0x138;
Expand Down
153 changes: 153 additions & 0 deletions src/system/gesture/ArcDetector.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
#include "gesture/ArcDetector.h"
#include "gesture/BaseSkeleton.h"
#include "os/Debug.h"
#include "rndobj/Rnd.h"
#include "utl/Std.h"
#include <stddef.h>

float ArcDetector::_swipeRetentionFactor = 0.5;
float ArcDetector::_acceptablePathErrorRatio = 0.89999998;
Expand All @@ -27,6 +29,58 @@ void ArcDetector::Initialize(
unkc = j2;
}

void ArcDetector::Update(const Skeleton &skel, int playernum) {
if (!unk34) {
MILO_ASSERT(false, 74);
}
if (!skel.IsTracked()) {
Clear();
return;
}
const Vector3 &body_maybe = skel.TrackedJoints()[unkc].mJointPos[0],
&hand_maybe = skel.TrackedJoints()[unk8].mJointPos[0];
float hpos_x = hand_maybe.x - body_maybe.x, hpos_y = hand_maybe.y - body_maybe.y,
hpos_z = hand_maybe.z - body_maybe.z; // why
Vector3 hand_pos(hpos_x, hpos_y, hpos_z); // in body coords? i think
unk40 = hand_pos;
if (mJointPath.empty()) {
TryToStartSwipe(hand_pos, skel);
} else if (unk35) {
Vector3 unk = *mJointPath.begin();
Clear();
mJointPath.insert(mJointPath.begin(), hand_pos);
if (mSide == kSkeletonLeft && hpos_x >= unk.x + 0.01f) {
unk35 = false;
}
if (mSide == kSkeletonRight && hpos_x <= unk.x - 0.01f) {
unk35 = false;
}
} else {
Vector3 v = unk18 = GetCurveStart();
v.x -= hpos_x;
v.y -= hpos_y;
v.z -= hpos_z;
if (LengthSquared(v) > 0.0001f) {
mJointPath.insert(mJointPath.begin(), hand_pos);
}
const Vector3 &body_maybe = skel.TrackedJoints()[unkc].mJointPos[0],
&hand_maybe = skel.TrackedJoints()[unk8].mJointPos[0];
float hpos_x_recalc = hand_maybe.x - body_maybe.x,
hpos_z_recalc = hand_maybe.z - body_maybe.z;
unk28 = (Vector2(hpos_x_recalc, hpos_z_recalc).Length() + unk28) / 2;
}
unk2c = skel.TrackedJoints()[unk8].mJointPos[0].y
- skel.TrackedJoints()[unkc].mJointPos[0].y;
CullPath();
unk38 = Max(unk38, GetSwipeAmount());
if (!IsPathAcceptable()) {
SwipeFailed(skel);
}
if (GetSwipeAmount() < 0.1f) {
unk3c = Max(0, unk3c - playernum);
}
}

Vector3 ArcDetector::GetCurveStart() const {
MILO_ASSERT(!mJointPath.empty(), 0xE9);
return Vector3((mSide)*unk28, unk2c, 0);
Expand Down Expand Up @@ -65,6 +119,11 @@ void ArcDetector::SwipeFailed(const Skeleton &skeleton) {
TryToStartSwipe(vec, skeleton);
}

bool ArcDetector::IsLockedIn() const {
static int lock_in_point_req = 2;
return mJointPath.size() > lock_in_point_req || GetSwipeAmount() > 0.2f;
}

void ArcDetector::CullPath() {
if (!mJointPath.empty()) {
std::list<Vector3> other;
Expand All @@ -81,3 +140,97 @@ void ArcDetector::CullPath() {
mJointPath = other;
}
}

float ArcDetector::GetPathError() const {
if (mJointPath.empty()) {
return 0.0f;
}
float accumulator = 0.0f;
static float unk_static = 2.0f;
float inv_static = 1.0f / unk_static;
FOREACH_CONST (joint, mJointPath) {
Vector3 this_joint = *joint;
// the hand location relative to this joint.
float jointspace_x = unk18.x - this_joint.x;
if (mSide == kSkeletonRight) {
jointspace_x *= -1.0f;
}
float jspace_x_scl = jointspace_x * unk28;
float jointspace_z = unk18.z - this_joint.z;
float sqrt_jspace_x = jspace_x_scl * 2 - (jointspace_x * jointspace_x);
if (sqrt_jspace_x <= 0) {
sqrt_jspace_x = 0;
} else {
sqrt_jspace_x = sqrt(sqrt_jspace_x);
}
jointspace_z -= sqrt_jspace_x;
float jspace_y = this_joint.y - unk2c;
accumulator += LengthSquared(Vector3(0, jointspace_z, jspace_y * inv_static));
}
return accumulator;
}

void ArcDetector::TryToStartSwipe(const Vector3 &startpos, const Skeleton &skel) {
MILO_ASSERT(mJointPath.empty(), 139);
bool joint_not_tracked = true;
if (skel.TrackedJoints()[unk8].mJointConf != kConfidenceTracked
|| skel.TrackedJoints()[unkc].mJointConf != kConfidenceTracked) {
joint_not_tracked = false;
}
if (joint_not_tracked) {
mJointPath.push_front(startpos);
const Vector3 &ucjoint = skel.TrackedJoints()[unkc].mJointPos[0];
const Vector3 &u8joint = skel.TrackedJoints()[unk8].mJointPos[0];
unk28 = Vector2(u8joint.x - ucjoint.x, u8joint.z - ucjoint.z).Length();
}
}

float ArcDetector::UpdateOverlay(RndOverlay *ovl, float f) {
static std::list<Vector3> jointPathCopy;
if (!mJointPath.empty() && mJointPath.size() > 2) {
jointPathCopy.clear();
FOREACH_CONST (orig_joint, mJointPath) {
jointPathCopy.push_front(*orig_joint);
}
}
if (jointPathCopy.empty()) {
return f;
}

Vector2 v(0, f);
Hmx::Color c(1, 1, 1);
TheRnd.DrawStringScreen(MakeString("%f %f"), v, c, true);
return f;
}

void ArcDetector::Draw(const Skeleton &skel, SkeletonViz &viz) {
const size_t joint_ct = mJointPath.size();
if (joint_ct == 0)
return;
{
std::list<Vector3> joints2draw;
Vector3 v;
for (int i = 0; i < 100; i++) {
float f0 = i * unk28 * 0.02f;
float f13 = unk28 * f0;
// next two lines: pretty sure this is some weird intrin stuff
int x = mSide == kSkeletonLeft ? -1 : 1; // why is this an int...?

f13 = f13 * 2.0f - (f0 * f0);
if (f13 <= 0) {
f13 = 0;
} else {
f13 = sqrt(f13);
}
v.z = -f13;
v.y = 0.0f;
v.x = x * f0;
joints2draw.insert(joints2draw.begin(), v);
}
Add(skel.TrackedJoints()[unkc].mJointPos[0], unk18, v);
DrawPath(joints2draw, viz, Hmx::Color(1, 1, 0), v);
}
DrawPath(
mJointPath, viz, Hmx::Color(1, 0, 1), skel.TrackedJoints()[unkc].mJointPos[0]
);
}
4 changes: 3 additions & 1 deletion src/system/gesture/ArcDetector.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ class ArcDetector {
float GetPathError() const;
void SwipeFailed(const Skeleton &);
void CullPath();
void DrawPath(std::list<Vector3>, SkeletonViz &, Hmx::Color, const Vector3 &) const;
bool IsPathAcceptable() const;

static float _swipeRetentionFactor;
static float _acceptablePathErrorRatio;
Expand All @@ -43,5 +45,5 @@ class ArcDetector {
bool unk35;
float unk38;
int unk3c;
Vector3 unk40;
Vector3 unk40; // last frame hand pos?
};
3 changes: 2 additions & 1 deletion src/system/gesture/LiveCameraInput.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,8 @@ class LiveCameraInput : public CameraInput {
static void NuiAudioDataCallback(NUIAUDIO_RESULTS *);
static LiveCameraInput *sInstance;

bool Unk11EA() { return unk11ea; }
bool Unk11E9() const { return unk11e9; }
bool Unk11EA() const { return unk11ea; }

protected:
LiveCameraInput();
Expand Down
Loading
Loading