From c52ba520cec3c9d3fdf7cb1f70da95e9396c59a9 Mon Sep 17 00:00:00 2001 From: raysan5 Date: Fri, 28 Aug 2015 14:14:29 +0200 Subject: [PATCH] Small tweaks --- src/core.c | 4 ++-- src/raylib.h | 11 ++++++----- src/rlgl.c | 2 +- src/text.c | 8 +++++++- 4 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/core.c b/src/core.c index e3c4e10ba..8d832fd21 100644 --- a/src/core.c +++ b/src/core.c @@ -1007,8 +1007,8 @@ static void InitDisplay(int width, int height) glfwWindowHint(GLFW_RESIZABLE, GL_FALSE); // Avoid window being resizable //glfwWindowHint(GLFW_DECORATED, GL_TRUE); // Border and buttons on Window - //glfwWindowHint(GLFW_RED_BITS, 8); // Color framebuffer red component bits - //glfwWindowHint(GLFW_DEPTH_BITS, 16); // Depth buffer bits (24 by default) + //glfwWindowHint(GLFW_RED_BITS, 8); // Framebuffer red color component bits + //glfwWindowHint(GLFW_DEPTH_BITS, 16); // Depthbuffer bits (24 by default) //glfwWindowHint(GLFW_REFRESH_RATE, 0); // Refresh rate for fullscreen window //glfwWindowHint(GLFW_CLIENT_API, GLFW_OPENGL_API); // Default OpenGL API to use. Alternative: GLFW_OPENGL_ES_API //glfwWindowHint(GLFW_AUX_BUFFERS, 0); // Number of auxiliar buffers diff --git a/src/raylib.h b/src/raylib.h index f5220e2e1..5ceb3fc12 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -517,18 +517,19 @@ float GetGesturePinchAngle(void); // Get gesture pinch ang // Camera System Functions (Module: camera) //------------------------------------------------------------------------------------ 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 //------------------------------------------------------------------------------------ // Basic Shapes Drawing Functions (Module: shapes) diff --git a/src/rlgl.c b/src/rlgl.c index 163fa35a0..6dea10c09 100644 --- a/src/rlgl.c +++ b/src/rlgl.c @@ -858,7 +858,7 @@ void rlglInit(void) // NOTE: We don't need that much data on screen... right now... #if defined(GRAPHICS_API_OPENGL_11) - TraceLog(INFO, "OpenGL 1.1 profile initialized"); + //TraceLog(INFO, "OpenGL 1.1 (or driver default) profile initialized"); #endif #if defined(GRAPHICS_API_OPENGL_33) || defined(GRAPHICS_API_OPENGL_ES2) diff --git a/src/text.c b/src/text.c index 65d52f261..3d866c86a 100644 --- a/src/text.c +++ b/src/text.c @@ -614,8 +614,14 @@ static SpriteFont LoadRBMF(const char *fileName) } // Generate a sprite font from TTF data (font size required) +// NOTE: This function is a mess, it should be completely redone! static SpriteFont LoadTTF(const char *fileName, int fontSize) { + // Steps: + + // 1) Generate sprite sheet image with characters from TTF + // 2) Load image as SpriteFont + SpriteFont font; Image image; @@ -631,7 +637,7 @@ static SpriteFont LoadTTF(const char *fileName, int fontSize) unsigned char *tempBitmap = (unsigned char *)malloc(image.width*image.height*sizeof(unsigned char)); // One channel bitmap returned! - // REFERENCE + // Reference struct /* typedef struct {