diff options
author | YamaArashi <shadow962@live.com> | 2015-11-13 21:57:22 -0800 |
---|---|---|
committer | YamaArashi <shadow962@live.com> | 2015-11-13 21:57:22 -0800 |
commit | 4c733f3811d2b1bd35bf0474a79490706a4cd845 (patch) | |
tree | 0eea3502ae34b55611a6920490ed32b479f6b244 /tools/gbagfx/global.h | |
parent | 3d1b6597f3fc22547fe2021275b1818a92093ab8 (diff) |
pokemon PNGs and palettes
Diffstat (limited to 'tools/gbagfx/global.h')
-rw-r--r-- | tools/gbagfx/global.h | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/tools/gbagfx/global.h b/tools/gbagfx/global.h new file mode 100644 index 000000000..3ea5966af --- /dev/null +++ b/tools/gbagfx/global.h @@ -0,0 +1,35 @@ +// Copyright (c) 2015 YamaArashi + +#ifndef GLOBAL_H +#define GLOBAL_H + +#include <stdio.h> +#include <stdlib.h> + +#ifdef _MSC_VER + +#define FATAL_ERROR(format, ...) \ +do { \ + fprintf(stderr, format, __VA_ARGS__); \ + exit(1); \ +} while (0) + +#else + +#define FATAL_ERROR(format, ...) \ +do { \ + fprintf(stderr, format, ##__VA_ARGS__); \ + exit(1); \ +} while (0) + +#endif // _MSC_VER + +#define GBAGFX_MAX_PATH 255 + +#define CHECK_PATH_LENGTH(path) \ +do { \ + if (strlen(path) > GBAGFX_MAX_PATH) \ + FATAL_ERROR("\"%s\" is too long a path.\n", path); \ +} while (0) + +#endif // GLOBAL_H |