From 00a763ea4485bfa00c3b65c500a466c77e2cc170 Mon Sep 17 00:00:00 2001 From: Ray Date: Thu, 23 Sep 2021 00:18:47 +0200 Subject: [PATCH] Reviewed some TODO comments --- src/Makefile | 3 +-- src/raylib.h | 1 + src/rcore.c | 2 +- src/rlgl.h | 2 -- src/rmodels.c | 2 +- src/rtext.c | 3 +-- src/rtextures.c | 2 -- 7 files changed, 5 insertions(+), 10 deletions(-) diff --git a/src/Makefile b/src/Makefile index c759a91c5..40ebfee0c 100644 --- a/src/Makefile +++ b/src/Makefile @@ -80,7 +80,6 @@ RAYLIB_MODULE_RAYGUI_PATH ?= $(RAYLIB_SRC_PATH)/../../raygui/src RAYLIB_MODULE_PHYSAC_PATH ?= $(RAYLIB_SRC_PATH)/extras # Use external GLFW library instead of rglfw module -# TODO: Review usage of examples on Linux. USE_EXTERNAL_GLFW ?= FALSE # Use Wayland display server protocol on Linux desktop @@ -608,7 +607,7 @@ android_native_app_glue.o : $(NATIVE_APP_GLUE)/android_native_app_glue.c # for our -L and -I specification to simplify management of the raylib source package. # Customize these locations if you like but don't forget to pass them to make # for compilation and enable runtime linking with -rpath, LD_LIBRARY_PATH, or ldconfig. -# Hint: add -L$(RAYLIB_INSTALL_PATH) -I$(RAYLIB_H_INSTALL_PATH) to your own makefiles. +# HINT: Add -L$(RAYLIB_INSTALL_PATH) -I$(RAYLIB_H_INSTALL_PATH) to your own makefiles. # See below and ../examples/Makefile for more information. # TODO: Add other platforms. Remove sudo requirement, i.e. add USER mode. diff --git a/src/raylib.h b/src/raylib.h index fd9e4975e..eeaf0c731 100644 --- a/src/raylib.h +++ b/src/raylib.h @@ -1107,6 +1107,7 @@ RLAPI int GetTouchY(void); // Get touch posit RLAPI Vector2 GetTouchPosition(int index); // Get touch position XY for a touch point index (relative to screen size) RLAPI int GetTouchPointId(int index); // Get touch point identifier for given index RLAPI int GetTouchPointCount(void); // Get number of touch points +RLAPI int GetTouchEvent(void); // Get last touch event registered //------------------------------------------------------------------------------------ // Gestures and Touch Handling Functions (Module: rgestures) diff --git a/src/rcore.c b/src/rcore.c index 3b549ca8c..66c734a15 100644 --- a/src/rcore.c +++ b/src/rcore.c @@ -1081,7 +1081,7 @@ bool IsWindowMaximized(void) bool IsWindowFocused(void) { #if defined(PLATFORM_DESKTOP) || defined(PLATFORM_WEB) - return ((CORE.Window.flags & FLAG_WINDOW_UNFOCUSED) == 0); // TODO! + return ((CORE.Window.flags & FLAG_WINDOW_UNFOCUSED) == 0); #else return true; #endif diff --git a/src/rlgl.h b/src/rlgl.h index 0bed58044..2974ee132 100644 --- a/src/rlgl.h +++ b/src/rlgl.h @@ -3028,8 +3028,6 @@ void *rlReadTexturePixels(unsigned int id, int width, int height, int format) // NOTE: This behaviour could be conditioned by graphic driver... unsigned int fboId = rlLoadFramebuffer(width, height); - // TODO: Create depth texture/renderbuffer for fbo? - glBindFramebuffer(GL_FRAMEBUFFER, fboId); glBindTexture(GL_TEXTURE_2D, 0); diff --git a/src/rmodels.c b/src/rmodels.c index a14304174..e834bff6d 100644 --- a/src/rmodels.c +++ b/src/rmodels.c @@ -5741,7 +5741,7 @@ static Model LoadVOX(const char *fileName) memcpy(pmesh->vertices, pvertices, size); // Copy indices - // TODO: compute globals indices array + // TODO: Compute globals indices array size = voxarray.indices.used * sizeof(unsigned short); pmesh->indices = MemAlloc(size); memcpy(pmesh->indices, pindices, size); diff --git a/src/rtext.c b/src/rtext.c index a372ff1f8..d0abacd10 100644 --- a/src/rtext.c +++ b/src/rtext.c @@ -1525,9 +1525,8 @@ int GetCodepointCount(const char *text) // Get next codepoint in a UTF-8 encoded text, scanning until '\0' is found // When a invalid UTF-8 byte is encountered we exit as soon as possible and a '?'(0x3f) codepoint is returned // Total number of bytes processed are returned as a parameter -// NOTE: the standard says U+FFFD should be returned in case of errors +// NOTE: The standard says U+FFFD should be returned in case of errors // but that character is not supported by the default font in raylib -// TODO: Optimize this code for speed!! int GetCodepoint(const char *text, int *bytesProcessed) { /* diff --git a/src/rtextures.c b/src/rtextures.c index 81efec2d7..a55ca43f9 100644 --- a/src/rtextures.c +++ b/src/rtextures.c @@ -871,8 +871,6 @@ Image ImageFromImage(Image image, Rectangle rec) int bytesPerPixel = GetPixelDataSize(1, 1, image.format); - // TODO: Check rec is valid? - result.width = (int)rec.width; result.height = (int)rec.height; result.data = RL_CALLOC((int)(rec.width*rec.height)*bytesPerPixel, 1);