From 9e8cd52238ccf150a46fb5f034a080f4cc854514 Mon Sep 17 00:00:00 2001 From: "Emilia(SleepeeSoftware)" Date: Sat, 31 Jan 2026 19:08:19 +0100 Subject: [PATCH] deleted cheat sheet in main.c and changed makefile to compile under windows --- Makefile | 6 ++++++ source/main.c | 28 ---------------------------- 2 files changed, 6 insertions(+), 28 deletions(-) diff --git a/Makefile b/Makefile index fddcc53..8e5fdd3 100644 --- a/Makefile +++ b/Makefile @@ -5,7 +5,13 @@ OBJ := $(SRC:source/%.c=obj/%.o) CC := gcc CFLAG := -ggdb -Wall -Wextra -Werror -Wpedantic -I include -O0 -std=c99 + +ifeq ($(OS), Windows_NT) +LFLAG := -lraylib -lopengl32 -lgdi32 -lwinmm -lpthread +endif +ifeq ($(shell uname -s), Linux) LFLAG := -lraylib -lGL -lm -lpthread -ldl -lrt -lX11 +endif all: $(NAME) diff --git a/source/main.c b/source/main.c index 1cbbe39..40c79d8 100644 --- a/source/main.c +++ b/source/main.c @@ -1,33 +1,5 @@ #include -/* - // Input-related functions: keyboard - bool IsKeyPressed(int key); // Check if a key has been pressed once - bool IsKeyPressedRepeat(int key); // Check if a key has been pressed again - bool IsKeyDown(int key); // Check if a key is being pressed - bool IsKeyReleased(int key); // Check if a key has been released once - bool IsKeyUp(int key); // Check if a key is NOT being pressed - int GetKeyPressed(void); // Get key pressed (keycode), call it multiple times for keys queued, returns 0 when the queue is empty - int GetCharPressed(void); // Get char pressed (unicode), call it multiple times for chars queued, returns 0 when the queue is empty - void SetExitKey(int key); // Set a custom key to exit program (default is ESC) - - // Input-related functions: mouse - bool IsMouseButtonPressed(int button); // Check if a mouse button has been pressed once - bool IsMouseButtonDown(int button); // Check if a mouse button is being pressed - bool IsMouseButtonReleased(int button); // Check if a mouse button has been released once - bool IsMouseButtonUp(int button); // Check if a mouse button is NOT being pressed - int GetMouseX(void); // Get mouse position X - int GetMouseY(void); // Get mouse position Y - Vector2 GetMousePosition(void); // Get mouse position XY - Vector2 GetMouseDelta(void); // Get mouse delta between frames - void SetMousePosition(int x, int y); // Set mouse position XY - void SetMouseOffset(int offsetX, int offsetY); // Set mouse offset - void SetMouseScale(float scaleX, float scaleY); // Set mouse scaling - float GetMouseWheelMove(void); // Get mouse wheel movement for X or Y, whichever is larger - Vector2 GetMouseWheelMoveV(void); // Get mouse wheel movement for both X and Y - void SetMouseCursor(int cursor); // Set mouse cursor -*/ - void UpdateInput() { const Input input; int key = GetKeyPressed();