aboutsummaryrefslogtreecommitdiff
path: root/src/camera.c
diff options
context:
space:
mode:
authorraysan5 <raysan5@gmail.com>2015-07-05 18:19:18 +0200
committerraysan5 <raysan5@gmail.com>2015-07-05 18:19:18 +0200
commit2be8753788d99cc089f2f26e19d5dd3159ee431f (patch)
tree1f17e4bbdcf8dde54a28ee1ae15169a71c182629 /src/camera.c
parentcd08ae7b858b62b341aebc86a7a4e915447c9423 (diff)
downloadraylib-2be8753788d99cc089f2f26e19d5dd3159ee431f.tar.gz
raylib-2be8753788d99cc089f2f26e19d5dd3159ee431f.zip
Functions renaming for better consistency
Diffstat (limited to 'src/camera.c')
-rw-r--r--src/camera.c101
1 files changed, 47 insertions, 54 deletions
diff --git a/src/camera.c b/src/camera.c
index cb99ba6b..1aa39ca8 100644
--- a/src/camera.c
+++ b/src/camera.c
@@ -93,15 +93,6 @@ static int cameraMode = CAMERA_CUSTOM;
// Module specific Functions Declaration
//----------------------------------------------------------------------------------
static void ProcessCamera(Camera *camera, Vector3 *playerPosition);
-/*
-static void SetCameraControls(int front, int left, int back, right, up, down);
-static void SetMouseSensitivity(int sensitivity);
-static void SetResetPosition(Vector3 resetPosition);
-static void SetResetControl(int resetKey);
-static void SetPawnControl(int pawnControlKey);
-static void SetFnControl(int fnControlKey);
-static void SetSmoothZoomControl(int smoothZoomControlKey);
-*/
//----------------------------------------------------------------------------------
// Module Functions Definition
@@ -153,6 +144,53 @@ Camera UpdateCamera(Vector3 *position)
return internalCamera;
}
+
+void SetCameraControls(int frontKey, int leftKey, int backKey, int rightKey, int upKey, int downKey)
+{
+ cameraMovementController[0] = frontKey;
+ cameraMovementController[1] = leftKey;
+ cameraMovementController[2] = backKey;
+ cameraMovementController[3] = rightKey;
+ cameraMovementController[4] = upKey;
+ cameraMovementController[5] = downKey;
+}
+
+void SetCameraMouseSensitivity(float sensitivity)
+{
+ mouseSensitivity = (sensitivity / 10000.0);
+}
+
+void SetCameraResetPosition(Vector3 resetPosition)
+{
+ resetingPosition = resetPosition;
+}
+
+void SetCameraResetControl(int resetKey)
+{
+ resetingKey = resetKey;
+}
+
+void SetCameraPawnControl(int pawnControlKey)
+{
+ pawnControllingKey = pawnControlKey;
+}
+
+void SetCameraFnControl(int fnControlKey)
+{
+ fnControllingKey = fnControlKey;
+}
+
+void SetCameraSmoothZoomControl(int smoothZoomControlKey)
+{
+ smoothZoomControllingKey = smoothZoomControlKey;
+}
+
+void SetCameraOrbitalTarget(Vector3 target)
+{
+ internalCamera.target = target;
+}
+
+
//----------------------------------------------------------------------------------
// Module specific Functions Definition
//----------------------------------------------------------------------------------
@@ -408,48 +446,3 @@ static void ProcessCamera(Camera *camera, Vector3 *playerPosition)
}
#endif
}
-
-void SetCameraControls(int frontKey, int leftKey, int backKey, int rightKey, int upKey, int downKey)
-{
- cameraMovementController[0] = frontKey;
- cameraMovementController[1] = leftKey;
- cameraMovementController[2] = backKey;
- cameraMovementController[3] = rightKey;
- cameraMovementController[4] = upKey;
- cameraMovementController[5] = downKey;
-}
-
-void SetMouseSensitivity(float sensitivity)
-{
- mouseSensitivity = (sensitivity / 10000.0);
-}
-
-void SetResetPosition(Vector3 resetPosition)
-{
- resetingPosition = resetPosition;
-}
-
-void SetResetControl(int resetKey)
-{
- resetingKey = resetKey;
-}
-
-void SetPawnControl(int pawnControlKey)
-{
- pawnControllingKey = pawnControlKey;
-}
-
-void SetFnControl(int fnControlKey)
-{
- fnControllingKey = fnControlKey;
-}
-
-void SetSmoothZoomControl(int smoothZoomControlKey)
-{
- smoothZoomControllingKey = smoothZoomControlKey;
-}
-
-void SetOrbitalTarget(Vector3 target)
-{
- internalCamera.target = target;
-}