mirror of
https://github.com/raysan5/raylib.git
synced 2025-09-15 07:48:15 +00:00
Renamed some functions
This commit is contained in:
43
src/core.c
43
src/core.c
@@ -99,6 +99,8 @@
|
|||||||
//----------------------------------------------------------------------------------
|
//----------------------------------------------------------------------------------
|
||||||
#define MAX_TOUCH_POINTS 256
|
#define MAX_TOUCH_POINTS 256
|
||||||
|
|
||||||
|
// Camera System configuration
|
||||||
|
//----------------------------------------------------------------------------------
|
||||||
// CAMERA_GENERIC
|
// CAMERA_GENERIC
|
||||||
#define CAMERA_SCROLL_SENSITIVITY 1.5
|
#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 Texture2D cursor; // Cursor texture
|
||||||
|
|
||||||
static Vector2 mousePosition;
|
static Vector2 mousePosition;
|
||||||
static bool mouseHidden;
|
static bool cursorHidden;
|
||||||
|
|
||||||
static char previousKeyState[512] = { 0 }; // Required to check if key pressed/released once
|
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
|
static char currentKeyState[512] = { 0 }; // Required to check if key pressed/released once
|
||||||
@@ -864,7 +866,7 @@ int GetMouseWheelMove(void)
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
void HideMouse()
|
void HideCursor()
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
@@ -880,10 +882,10 @@ void HideMouse()
|
|||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_HIDDEN);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
mouseHidden = true;
|
cursorHidden = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ShowMouse()
|
void ShowCursor()
|
||||||
{
|
{
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
#ifdef __linux
|
#ifdef __linux
|
||||||
@@ -892,12 +894,12 @@ void ShowMouse()
|
|||||||
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
glfwSetInputMode(window, GLFW_CURSOR, GLFW_CURSOR_NORMAL);
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
mouseHidden = false;
|
cursorHidden = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool IsMouseHidden()
|
bool IsCursorHidden()
|
||||||
{
|
{
|
||||||
return mouseHidden;
|
return cursorHidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Enable gamepad usage on Rapsberry Pi
|
// TODO: Enable gamepad usage on Rapsberry Pi
|
||||||
@@ -1059,20 +1061,6 @@ Vector2 GetTouchPosition(void)
|
|||||||
}*/
|
}*/
|
||||||
#endif
|
#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)
|
void InitPostShader(void)
|
||||||
{
|
{
|
||||||
rlglInitPostpro();
|
rlglInitPostpro();
|
||||||
@@ -1346,6 +1334,19 @@ static void InitDisplay(int width, int height)
|
|||||||
#endif
|
#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)
|
#if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB)
|
||||||
// GLFW3 Error Callback, runs on GLFW3 error
|
// GLFW3 Error Callback, runs on GLFW3 error
|
||||||
static void ErrorCallback(int error, const char *description)
|
static void ErrorCallback(int error, const char *description)
|
||||||
|
@@ -836,7 +836,7 @@ Model LoadCubicmap(Image cubesmap)
|
|||||||
|
|
||||||
float w = mapCubeSide;
|
float w = mapCubeSide;
|
||||||
float h = 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));
|
Vector3 *mapVertices = (Vector3 *)malloc(maxTriangles * 3 * sizeof(Vector3));
|
||||||
Vector2 *mapTexcoords = (Vector2 *)malloc(maxTriangles * 3 * sizeof(Vector2));
|
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
|
Vector2 GetMousePosition(void); // Returns mouse position XY
|
||||||
void SetMousePosition(Vector2 position); // Set mouse position XY
|
void SetMousePosition(Vector2 position); // Set mouse position XY
|
||||||
int GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
int GetMouseWheelMove(void); // Returns mouse wheel movement Y
|
||||||
void ShowMouse(void); // Shows mouse cursor
|
|
||||||
void HideMouse(void); // Hides mouse cursor
|
void ShowCursor(void); // Shows cursor
|
||||||
bool IsMouseHidden(void); // Returns true if mouse cursor is not visible
|
void HideCursor(void); // Hides cursor
|
||||||
|
bool IsCursorHidden(void); // Returns true if cursor is not visible
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(PLATFORM_DESKTOP)
|
#if defined(PLATFORM_DESKTOP)
|
||||||
|
Reference in New Issue
Block a user