diff options
| author | raysan5 <raysan5@gmail.com> | 2015-02-26 13:52:03 +0100 |
|---|---|---|
| committer | raysan5 <raysan5@gmail.com> | 2015-02-26 13:52:03 +0100 |
| commit | ee4b553c2a7bb0784b53583988c60e023f340220 (patch) | |
| tree | b663fe6891a1e4cb931c2f182fc9208f3ba6e83e /src/core.c | |
| parent | 3cb4edcbc3921b3fe7e3be5b75b49df8b14112a2 (diff) | |
| download | raylib-ee4b553c2a7bb0784b53583988c60e023f340220.tar.gz raylib-ee4b553c2a7bb0784b53583988c60e023f340220.zip | |
Renamed some functions
Diffstat (limited to 'src/core.c')
| -rw-r--r-- | src/core.c | 43 |
1 files changed, 22 insertions, 21 deletions
@@ -99,6 +99,8 @@ //---------------------------------------------------------------------------------- #define MAX_TOUCH_POINTS 256 +// Camera System configuration +//---------------------------------------------------------------------------------- // CAMERA_GENERIC #define CAMERA_SCROLL_SENSITIVITY 1.5 @@ -220,7 +222,7 @@ static bool cursorOnScreen = false; // Tracks if cursor is inside client static Texture2D cursor; // Cursor texture static Vector2 mousePosition; -static bool mouseHidden; +static bool cursorHidden; static char previousKeyState[512] = { 0 }; // Required to check if key pressed/released once static char currentKeyState[512] = { 0 }; // Required to check if key pressed/released once @@ -864,7 +866,7 @@ int GetMouseWheelMove(void) } #endif -void HideMouse() +void HideCursor() { #if defined(PLATFORM_DESKTOP) #ifdef __linux @@ -880,10 +882,10 @@ void HideMouse() glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN); #endif #endif - mouseHidden = true; + cursorHidden = true; } -void ShowMouse() +void ShowCursor() { #if defined(PLATFORM_DESKTOP) #ifdef __linux @@ -892,12 +894,12 @@ void ShowMouse() glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL); #endif #endif - mouseHidden = false; + cursorHidden = false; } -bool IsMouseHidden() +bool IsCursorHidden() { - return mouseHidden; + return cursorHidden; } // TODO: Enable gamepad usage on Rapsberry Pi @@ -1059,20 +1061,6 @@ Vector2 GetTouchPosition(void) }*/ #endif -// Initialize OpenGL graphics -void InitGraphics(void) -{ - rlglInit(); // Init rlgl - - rlglInitGraphics(renderOffsetX, renderOffsetY, renderWidth, renderHeight); // Init graphics (OpenGL stuff) - - ClearBackground(RAYWHITE); // Default background color for raylib games :P - -#if defined(PLATFORM_ANDROID) - windowReady = true; // IMPORTANT! -#endif -} - void InitPostShader(void) { rlglInitPostpro(); @@ -1346,6 +1334,19 @@ static void InitDisplay(int width, int height) #endif } +// Initialize OpenGL graphics +static void InitGraphics(void) +{ + rlglInit(); // Init rlgl + + rlglInitGraphics(renderOffsetX, renderOffsetY, renderWidth, renderHeight); // Init graphics (OpenGL stuff) + + ClearBackground(RAYWHITE); // Default background color for raylib games :P + +#if defined(PLATFORM_ANDROID) + windowReady = true; // IMPORTANT! +#endif +} #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) // GLFW3 Error Callback, runs on GLFW3 error static void ErrorCallback(int error, const char *description) |
