OpenMoHAA 0.82.0
Loading...
Searching...
No Matches
gsCommon.h
1
3#ifndef __GSCOMMON_H__
4#define __GSCOMMON_H__
5
6// Common is more like "all"
7
8// Build settings (set by developer project)
9//#define GS_MEM_MANAGED // use GameSpy memory manager for SDK allocations
10//#define GS_COMMON_DEBUG // use GameSpy debug utilities for SDK debug output
11//#define GS_WINSOCK2 // use winsock2
12//#define GS_UNICODE // Use widechar (UCS2) SDK interface.
13//#define GS_NO_FILE // disable file storage (on by default for PS2/DS)
14//#define GS_NO_THREAD // no multi-thread support
15//#define GS_PEER // MUST be defined if you are using Peer SDK
16
17
18#ifdef GS_PEER
19 #define UNIQUEID // enable unique id support
20#endif
21
24#include "gsPlatform.h"
25#include "gsPlatformSocket.h"
26#include "gsPlatformThread.h"
27#include "gsPlatformUtil.h"
28
29// platform independent
30#include "gsMemory.h"
31#include "gsDebug.h"
32#include "gsAssert.h"
33#include "gsStringUtil.h"
34
35//#include "md5.h"
36//#include "darray.h"
37//#include "hashtable.h"
38
39
40#define GSI_MIN(a,b) (((a) < (b)?(a):(b)))
41#define GSI_MAX(a,b) (((a) > (b)?(a):(b)))
42#define GSI_LIMIT(x, minx, maxx) (((x) < (minx)? (minx) : ((x) > (maxx)? (maxx) : (x))))
43#define GSI_WRAP(x, minx, maxx) (((x) < (minx)? (maxx-1 ) : ((x) >= (maxx)? (minx) : (x))))
44#define GSI_DIM( x ) ( sizeof( x ) / sizeof((x)[ 0 ]))
45
48#endif // __GSCOMMON_H__