Fixes for windows.
[Tsunagari.git] / src / config.h
blobba8d4a62687bfc6113694051682d768e6a75c465
1 /******************************
2 ** Tsunagari Tile Engine **
3 ** config.h **
4 ** Copyright 2011 OmegaSDG **
5 ******************************/
7 #ifndef CONFIG_H
8 #define CONFIG_H
10 #define TSUNAGARI_RELEASE_VERSION "Tsunagari Tile Engine AlphaP4 Revision 1"
12 // === Default Configuration Settings ===
13 /* Tsunagari config file. */
14 #define CLIENT_CONF_FILE "./client.ini"
16 /* Tsunagari XML DTD directory. */
17 #define DTD_DIRECTORY "./dtd/"
19 /* Error verbosity level. */
20 #define MESSAGE_MODE MM_DEBUG
22 /* Milliseconds of button down before starting persistent input in
23 roguelike movement mode. -- Move to World Descriptor */
24 #define ROGUELIKE_PERSIST_DELAY_INIT 500
26 /* Milliseconds between persistent input sends in roguelike movement
27 mode. -- Move to World Descriptor */
28 #define ROGUELIKE_PERSIST_DELAY_CONSECUTIVE 100
30 /* Time to live in seconds for empty resource cache entries before they
31 are deleted. */
32 #define CACHE_EMPTY_TTL 300
34 /* Maximum size in megabytes for the resource cache. */
35 #define CACHE_MAX_SIZE 100
36 // ===
38 // === Platform Specifics ===
39 /* Windows check. */
40 #if defined(_Windows) && !defined(_WINDOWS)
41 #define _WINDOWS 1
42 #endif
44 #if defined(_WINDOWS) && !defined(_Windows)
45 #define _Windows 1
46 #endif
48 /* Fix snprintf for VisualC++. */
49 #ifdef _MSC_VER
50 #define snprintf _snprintf
51 #endif
53 /* Fix NAN constant. */
54 #ifdef _MSC_VER
55 #ifndef NAN
56 static const unsigned long __nan[2] = {0xffffffff, 0x7fffffff};
57 #define NAN (*(const float *) __nan)
58 #endif
59 #endif
61 /* Fix PI declaration. */
62 #ifndef M_PI
63 #define M_PI 3.14159265358979323846
64 #define M_PI_2 1.57079632679489661923
65 #endif
66 // ===
68 #endif