From 8372a776ad2e06b99e4704403504ba74932276ec Mon Sep 17 00:00:00 2001 From: nathansmith117 Date: Wed, 13 Mar 2024 12:07:43 -0600 Subject: Made a clicker --- src/gameCommon.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gameCommon.h') diff --git a/src/gameCommon.h b/src/gameCommon.h index d0e8284..eb5ccf7 100644 --- a/src/gameCommon.h +++ b/src/gameCommon.h @@ -10,6 +10,17 @@ #define WINDOW_WIDTH 1280 #define WINDOW_HEIGHT 720 + +// Memory management. +#define YP_MALLOC(size) malloc(size) +#define YP_CALLOC(nmemb, size) calloc(nmemb, size) +#define YP_REALLOC(ptr, size) realloc(ptr, size) +#define YP_REALLOCARRAY(ptr, nmemb, size) reallocarray(ptr, nmemb, size) +//#define YP_REALLOCARRAY(ptr, nmemb, size) realloc(ptr, nmemb * size) +#define YP_FREE(ptr) free(ptr) + +#define ALLOCATION_ERROR TraceLog(LOG_ERROR, "Allocation error in %s:%d", __FILE__, __LINE__) + #ifndef GAME_COMMON_H #define GAME_COMMON_H -- cgit v1.2.3