diff options
author | Ludovic Pouzenc <lpouzenc@gmail.com> | 2013-07-18 20:55:55 +0200 |
---|---|---|
committer | Ludovic Pouzenc <lpouzenc@gmail.com> | 2013-07-18 20:55:55 +0200 |
commit | 2e8fce8250fdfc6c6d644c9354d4a3318975bae8 (patch) | |
tree | 058b876910dfb3353cab52f425f837205ee7843b /src/include/utils.h | |
parent | f02db00ad4f41b4d098557a63461f6c5766c3273 (diff) | |
download | mplemmings-2e8fce8250fdfc6c6d644c9354d4a3318975bae8.tar.gz mplemmings-2e8fce8250fdfc6c6d644c9354d4a3318975bae8.tar.bz2 mplemmings-2e8fce8250fdfc6c6d644c9354d4a3318975bae8.zip |
Fin du codage de testrender.c. Diverses mises au point autour de ca.
Bug connu : la police de grande taille ne se charge pas bien. Texture trop longue ?
Diffstat (limited to 'src/include/utils.h')
-rw-r--r-- | src/include/utils.h | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/include/utils.h b/src/include/utils.h index 7f43d8f..11fdeee 100644 --- a/src/include/utils.h +++ b/src/include/utils.h @@ -1,4 +1,6 @@ +#define MAX_PATH_LEN 255 + /* Macro for error checking and logging */ #define MPL_CHECK(expr, fail_code, priority, ...) \ if (! (expr)) { \ @@ -8,4 +10,10 @@ fail_code; \ } -#define MAX_PATH_LEN 255 +/* Macro that check and set NULL texture pointer when destroying */ +#define DESTROYTEXTURE_SAFE(t) \ +if (t != NULL) { \ + SDL_DestroyTexture(t); \ + t=NULL; \ +} + |