From 322ca97c24f214d665cad512a70a696b489ecb52 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Fri, 28 Aug 2015 14:14:12 +0200 Subject: Review camera system --- src/camera.h | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/camera.h') diff --git a/src/camera.h b/src/camera.h index 63d8f786..93929c2a 100644 --- a/src/camera.h +++ b/src/camera.h @@ -76,18 +76,19 @@ extern "C" { // Prevents name mangling of functions // Module Functions Declaration //---------------------------------------------------------------------------------- void SetCameraMode(int mode); // Set camera mode (multiple camera modes available) -Camera UpdateCamera(Vector3 *playerPosition); // Update camera and player position (1st person and 3rd person cameras) +Camera UpdateCamera(Vector3 *position); // Update camera and player position (1st person and 3rd person cameras) -void SetCameraMoveControls(int frontKey, int backKey, - int leftKey, int rightKey, - int upKey, int downKey); // Set camera move controls (1st person and 3rd person cameras) +void SetCameraPosition(Vector3 position); // Set internal camera position +void SetCameraTarget(Vector3 target); // Set internal camera target void SetCameraPanControl(int panKey); // Set camera pan key to combine with mouse movement (free camera) void SetCameraAltControl(int altKey); // Set camera alt key to combine with mouse movement (free camera) void SetCameraSmoothZoomControl(int szKey); // Set camera smooth zoom key to combine with mouse (free camera) +void SetCameraMoveControls(int frontKey, int backKey, + int leftKey, int rightKey, + int upKey, int downKey); // Set camera move controls (1st person and 3rd person cameras) void SetCameraMouseSensitivity(float sensitivity); // Set camera mouse sensitivity (1st person and 3rd person cameras) -void SetCameraTarget(Vector3 target); // Set internal camera target #ifdef __cplusplus } -- cgit v1.2.3 From 535b9e606f6571c5d4163481d077ae3d5a79f1b8 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Sun, 30 Aug 2015 17:46:19 +0200 Subject: Redesigned UpdateCamera() function Splitted into: UpdateCamera() // Update only camera UpdateCameraPlayer() // Update camera and player position --- src/camera.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/camera.h') diff --git a/src/camera.h b/src/camera.h index 93929c2a..ed85320a 100644 --- a/src/camera.h +++ b/src/camera.h @@ -76,7 +76,8 @@ extern "C" { // Prevents name mangling of functions // Module Functions Declaration //---------------------------------------------------------------------------------- void SetCameraMode(int mode); // Set camera mode (multiple camera modes available) -Camera UpdateCamera(Vector3 *position); // Update camera and player position (1st person and 3rd person cameras) +void UpdateCamera(Camera *camera); // Update camera (player position is ignored) +void UpdateCameraPlayer(Camera *camera, Vector3 *position); // Update camera and player position (1st person and 3rd person cameras) void SetCameraPosition(Vector3 position); // Set internal camera position void SetCameraTarget(Vector3 target); // Set internal camera target -- cgit v1.2.3