common.h

changeset 79
f8917e9d07f6
parent 78
c190fe218506
child 97
52bcca21579e
equal deleted inserted replaced
78:c190fe218506 79:f8917e9d07f6
51 #ifdef WIN32 51 #ifdef WIN32
52 #define DIRSLASH "\\" 52 #define DIRSLASH "\\"
53 #else // WIN32 53 #else // WIN32
54 #define DIRSLASH "/" 54 #define DIRSLASH "/"
55 #endif // WIN32 55 #endif // WIN32
56
57 #ifdef RELEASE
58 #define NDEBUG // remove asserts
59 #endif // RELEASE
56 60
57 static const double fMaxCoord = 10000.0; 61 static const double fMaxCoord = 10000.0;
58 static const short dMainColor = 16; 62 static const short dMainColor = 16;
59 static const short dEdgeColor = 24; 63 static const short dEdgeColor = 24;
60 64
110 LOG_Error, 114 LOG_Error,
111 }; 115 };
112 116
113 // Vertex at (0, 0, 0) 117 // Vertex at (0, 0, 0)
114 extern const vertex g_Origin; 118 extern const vertex g_Origin;
119 extern bool g_bApplicationReady;
115 120
116 void logf (const char* fmt, ...) FORMAT_PRINTF (1, 2); 121 void logf (const char* fmt, ...) FORMAT_PRINTF (1, 2);
117 void logf (logtype_e eType, const char* fmt, ...) FORMAT_PRINTF (2, 3); 122 void logf (logtype_e eType, const char* fmt, ...) FORMAT_PRINTF (2, 3);
118 123
124 // -----------------------------------------------------------------------------
125 // Pointer to the OpenFile which is currently being edited by the user.
119 extern OpenFile* g_CurrentFile; 126 extern OpenFile* g_CurrentFile;
127
128 // -----------------------------------------------------------------------------
129 // Pointer to the bounding box.
120 extern bbox g_BBox; 130 extern bbox g_BBox;
121 extern ForgeWindow* g_qWindow; 131
132 // -----------------------------------------------------------------------------
133 // Vector of all currently opened files.
122 extern vector<OpenFile*> g_LoadedFiles; 134 extern vector<OpenFile*> g_LoadedFiles;
135
136 // -----------------------------------------------------------------------------
137 // Pointer to the main application.
123 extern QApplication* g_qMainApp; 138 extern QApplication* g_qMainApp;
124 139
125 #ifndef unix 140 #ifndef unix
126 typedef unsigned int uint; 141 typedef unsigned int uint;
127 typedef unsigned long ulong; 142 typedef unsigned long ulong;
128 #endif // unix 143 #endif // unix
129 144
130 typedef int8_t xchar; 145 // Typedef out the _t suffices :)
131 typedef int16_t xshort; 146 typedef int8_t int8;
132 typedef int32_t xlong; 147 typedef int16_t int16;
133 typedef int64_t xlonglong; 148 typedef int32_t int32;
134 typedef uint8_t xuchar; 149 typedef int64_t int64;
135 typedef uint16_t xushort; 150 typedef uint8_t uint8;
136 typedef uint32_t xulong; 151 typedef uint16_t uint16;
137 typedef uint64_t xulonglong; 152 typedef uint32_t uint32;
153 typedef uint64_t uint64;
138 154
139 #endif 155 #endif

mercurial