X-Git-Url: https://git.ucc.asn.au/?a=blobdiff_plain;f=Usermode%2FApplications%2Faxwin3_src%2FWM%2Finclude%2Fcommon.h;h=1f0e749f0771d6e21d4877aa3410c2822f179a09;hb=98bd9c0c8985c50c42231c116a4e18fedd47761e;hp=ffaff330fbdbde9d968ad157f0640ceb137aba14;hpb=21d938f9041683280a2d5ed44ef0bca278210829;p=tpg%2Facess2.git diff --git a/Usermode/Applications/axwin3_src/WM/include/common.h b/Usermode/Applications/axwin3_src/WM/include/common.h index ffaff330..1f0e749f 100644 --- a/Usermode/Applications/axwin3_src/WM/include/common.h +++ b/Usermode/Applications/axwin3_src/WM/include/common.h @@ -8,5 +8,25 @@ #ifndef _COMMON_H_ #define _COMMON_H_ +#ifndef AXWIN_SDL_BUILD +#include +#else +#include +#define _SysDebug(f,a...) fprintf(stderr, f"\n" ,## a) +#endif + +#define TODO(str) + +#define ASSERT(expr) do{if(!(expr)){_SysDebug("%s:%i - ASSERTION FAILED: "#expr, __FILE__, __LINE__);exit(-1);}}while(0) + +#define UNIMPLEMENTED() do{_SysDebug("TODO: Implement %s", __func__); for(;;);}while(0) + +#define AXWIN_VERSION 0x300 + +static inline int MIN(int a, int b) { return (a < b) ? a : b; } +static inline int MAX(int a, int b) { return (a > b) ? a : b; } + +extern int giScreenWidth, giScreenHeight; + #endif