summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
diff options
context:
space:
mode:
authorRay <[email protected]>2017-03-09 16:23:36 +0100
committerGitHub <[email protected]>2017-03-09 16:23:36 +0100
commit4ec65c0d25887c960583b996a7468a15712339f4 (patch)
tree8ad385cb7eaccd31ab56646e5a3e72236c9f1117 /src/core.c
parent81897e77715c8d59382fe9d54641081c20e163ea (diff)
downloadraylib-4ec65c0d25887c960583b996a7468a15712339f4.tar.gz
raylib-4ec65c0d25887c960583b996a7468a15712339f4.zip
Corrected issue with reserved words: near, far
Diffstat (limited to 'src/core.c')
-rw-r--r--src/core.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/core.c b/src/core.c
index f955988a..2b16d49e 100644
--- a/src/core.c
+++ b/src/core.c
@@ -291,7 +291,7 @@ static void InitTimer(void); // Initialize timer
static double GetTime(void); // Returns time since InitTimer() was run
static void Wait(float ms); // Wait for some milliseconds (stop program execution)
static bool GetKeyStatus(int key); // Returns if a key has been pressed
-static bool GetMouseButtonStatus(int button); // Returns if a mouse button has been pressed
+static bool ButtonStatus(int button); // Returns if a mouse button has been pressed
static void PollInputEvents(void); // Register user events
static void SwapBuffers(void); // Copy back buffer to front buffers
static void LogoAnimation(void); // Plays raylib logo appearing animation
@@ -1129,16 +1129,16 @@ Ray GetMouseRay(Vector2 mousePosition, Camera camera)
MatrixInvert(&matProjView);
// Calculate far and near points
- Quaternion near = { deviceCoords.x, deviceCoords.y, 0.0f, 1.0f };
- Quaternion far = { deviceCoords.x, deviceCoords.y, 1.0f, 1.0f };
+ Quaternion nearPoint = { deviceCoords.x, deviceCoords.y, 0.0f, 1.0f };
+ Quaternion farPoint = { deviceCoords.x, deviceCoords.y, 1.0f, 1.0f };
// Multiply points by unproject matrix
- QuaternionTransform(&near, matProjView);
- QuaternionTransform(&far, matProjView);
+ QuaternionTransform(&nearPoint, matProjView);
+ QuaternionTransform(&farPoint, matProjView);
// Calculate normalized world points in vectors
- Vector3 nearPoint = { near.x/near.w, near.y/near.w, near.z/near.w};
- Vector3 farPoint = { far.x/far.w, far.y/far.w, far.z/far.w};
+ Vector3 nearPoint = { nearPoint.x/nearPoint.w, nearPoint.y/nearPoint.w, nearPoint.z/nearPoint.w};
+ Vector3 farPoint = { farPoint.x/farPoint.w, farPoint.y/farPoint.w, farPoint.z/farPoint.w};
#endif
// Calculate normalized direction vector