Renamed some functions
This commit is contained in:
parent
3cb4edcbc3
commit
ee4b553c2a
43
src/core.c
43
src/core.c
@ -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)
|
||||
|
@ -836,7 +836,7 @@ Model LoadCubicmap(Image cubesmap)
|
||||
|
||||
float w = mapCubeSide;
|
||||
float h = mapCubeSide;
|
||||
float h2 = mapCubeSide * 1.5;
|
||||
float h2 = mapCubeSide * 1.5; // TODO: Review walls height...
|
||||
|
||||
Vector3 *mapVertices = (Vector3 *)malloc(maxTriangles * 3 * sizeof(Vector3));
|
||||
Vector2 *mapTexcoords = (Vector2 *)malloc(maxTriangles * 3 * sizeof(Vector2));
|
||||
|
@ -370,9 +370,10 @@ int GetMouseY(void); // Returns mouse positio
|
||||
Vector2 GetMousePosition(void); // Returns mouse position XY
|
||||
void SetMousePosition(Vector2 position); // Set mouse position XY
|
||||
int GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
||||
void ShowMouse(void); // Shows mouse cursor
|
||||
void HideMouse(void); // Hides mouse cursor
|
||||
bool IsMouseHidden(void); // Returns true if mouse cursor is not visible
|
||||
|
||||
void ShowCursor(void); // Shows cursor
|
||||
void HideCursor(void); // Hides cursor
|
||||
bool IsCursorHidden(void); // Returns true if cursor is not visible
|
||||
#endif
|
||||
|
||||
#if defined(PLATFORM_DESKTOP)
|
||||
|
Loading…
Reference in New Issue
Block a user