aboutsummaryrefslogtreecommitdiffstats
path: root/src/gameCommon.h
blob: eb5ccf7257de6e82a26a9d2a95e19fafc2c5242e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <string.h>
#include <time.h>

#include <raylib.h>
#include <raymath.h>

#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

typedef struct Game Game;

#endif