Usermode/AxWin3 - Preparing for SDL build
[tpg/acess2.git] / Usermode / Applications / axwin3_src / WM / include / common.h
1 /*
2  * Acess2 Window Manager v3 (axwin3)
3  * - By John Hodge (thePowersGang)
4  *
5  * include/common.h
6  * - Common definitions and functions
7  */
8 #ifndef _COMMON_H_
9 #define _COMMON_H_
10
11 #ifndef AXWIN_SDL_BUILD
12 #include <acess/sys.h>
13 #else
14 #include <stdio.h>
15 #define _SysDebug(f,a...)       fprintf(stderr, f"\n" ,## a)
16 #endif
17
18 #define TODO(str)       
19
20 #define ASSERT(expr)    do{if(!(expr)){_SysDebug("%s:%i - ASSERTION FAILED: "#expr, __FILE__, __LINE__);exit(-1);}}while(0)
21
22 #define UNIMPLEMENTED() do{_SysDebug("TODO: Implement %s", __func__); for(;;);}while(0)
23
24 #define AXWIN_VERSION   0x300
25
26 static inline int MIN(int a, int b)     { return (a < b) ? a : b; }
27 static inline int MAX(int a, int b)     { return (a > b) ? a : b; }
28
29 extern int      giScreenWidth, giScreenHeight;
30
31 #endif
32

UCC git Repository :: git.ucc.asn.au