summaryrefslogtreecommitdiff
path: root/src/code/z_lib.c
diff options
context:
space:
mode:
authorfig02 <fig02srl@gmail.com>2023-09-19 21:37:03 -0400
committerGitHub <noreply@github.com>2023-09-19 21:37:03 -0400
commitda3f4718f07bdf5af91ebf3dc5da190245ace2f9 (patch)
tree30b31c839c81540a0647c9ef44753520f1710e1f /src/code/z_lib.c
parent185c9cbf1aed3190f335fe6745cd220d2e0b2b62 (diff)
Player docs: Control Stick Input and Movement (#1539)
* document input stuff and movement speed+yaw * curve -> curved, and other cleanups * fix + format * function declaration * name arguments * add mode descriptions * fix typos * move comment down
Diffstat (limited to 'src/code/z_lib.c')
-rw-r--r--src/code/z_lib.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/code/z_lib.c b/src/code/z_lib.c
index 2e00bcd59..9857097a5 100644
--- a/src/code/z_lib.c
+++ b/src/code/z_lib.c
@@ -219,14 +219,14 @@ s32 Math_AsymStepToF(f32* pValue, f32 target, f32 incrStep, f32 decrStep) {
return 0;
}
-void func_80077D10(f32* arg0, s16* arg1, Input* input) {
+void Lib_GetControlStickData(f32* outMagnitude, s16* outAngle, Input* input) {
f32 relX = input->rel.stick_x;
f32 relY = input->rel.stick_y;
- *arg0 = sqrtf(SQ(relX) + SQ(relY));
- *arg0 = (60.0f < *arg0) ? 60.0f : *arg0;
+ *outMagnitude = sqrtf(SQ(relX) + SQ(relY));
+ *outMagnitude = (60.0f < *outMagnitude) ? 60.0f : *outMagnitude;
- *arg1 = Math_Atan2S(relY, -relX);
+ *outAngle = Math_Atan2S(relY, -relX);
}
s16 Rand_S16Offset(s16 base, s16 range) {