aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameCommon.h
diff options
context:
space:
mode:
authornathansmith117 <thenathansmithsmith@gmail.com>2024-03-13 18:07:43 +0000
committernathansmith117 <thenathansmithsmith@gmail.com>2024-03-13 18:07:43 +0000
commit8372a776ad2e06b99e4704403504ba74932276ec (patch)
tree1c688217d8420474ad4c8b68c721d1a27d9df43d /src/gameCommon.h
parent694efe00e1e01af8534672b60970a3e0555e5f34 (diff)
downloadPenguinYippies-8372a776ad2e06b99e4704403504ba74932276ec.tar.gz
PenguinYippies-8372a776ad2e06b99e4704403504ba74932276ec.tar.bz2
PenguinYippies-8372a776ad2e06b99e4704403504ba74932276ec.zip
Made a clicker
Diffstat (limited to 'src/gameCommon.h')
-rw-r--r--src/gameCommon.h11
1 files changed, 11 insertions, 0 deletions
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