diff options
author | Andy <drumsetmonkey@gmail.com> | 2017-01-20 10:37:21 -0500 |
---|---|---|
committer | Andy <drumsetmonkey@gmail.com> | 2017-01-20 10:37:21 -0500 |
commit | 4d8f9974156068e4595bf219cacfd9fcd2fd7174 (patch) | |
tree | f3e938c0e49537a9dea661f46eed6ee74950b48a /include/debug.hpp | |
parent | 1894e311bdeb098c3bef9bd342e0eaf78d197a9b (diff) | |
parent | 1ac412a5496fb6c63c47f199dfc7facd5f4c080a (diff) |
Merge branch 'master' of https://github.com/tcsullivan/gamedev
Diffstat (limited to 'include/debug.hpp')
-rw-r--r-- | include/debug.hpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/include/debug.hpp b/include/debug.hpp new file mode 100644 index 0000000..e773a51 --- /dev/null +++ b/include/debug.hpp @@ -0,0 +1,19 @@ +/** + * @file debug.hpp + * @brief Debugging utilities + */ +#ifndef DEBUG_HPP_ +#define DEBUG_HPP_ + +/** + * Prints a formatted string to the terminal with file and line number, for debugging + */ +#define DEBUG_printf(message, ...) DEBUG_prints(__FILE__, __LINE__, message, __VA_ARGS__) + +/** + * Prints a formatted debug message to the console, along with the callee's file and line + * number. + */ +void DEBUG_prints(const char* file, int line, const char *s,...); + +#endif // DEBUG_HPP_ |