added dedicated server build without irrlicht
[oweals/minetest.git] / src / main.h
1 /*
2 Minetest-c55
3 Copyright (C) 2010 celeron55, Perttu Ahola <celeron55@gmail.com>
4
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
9
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 GNU General Public License for more details.
14
15 You should have received a copy of the GNU General Public License along
16 with this program; if not, write to the Free Software Foundation, Inc.,
17 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
18 */
19
20 #ifndef MAIN_HEADER
21 #define MAIN_HEADER
22
23 #include <string>
24 extern std::string getTimestamp();
25 #define DTIME (getTimestamp()+": ")
26
27 #include <jmutex.h>
28
29 // Settings
30 extern Settings g_settings;
31
32 #include <fstream>
33
34 // Debug streams
35 extern std::ostream *dout_con_ptr;
36 extern std::ostream *derr_con_ptr;
37 extern std::ostream *dout_client_ptr;
38 extern std::ostream *derr_client_ptr;
39 extern std::ostream *dout_server_ptr;
40 extern std::ostream *derr_server_ptr;
41
42 #define dout_con (*dout_con_ptr)
43 #define derr_con (*derr_con_ptr)
44 #define dout_client (*dout_client_ptr)
45 #define derr_client (*derr_client_ptr)
46 #define dout_server (*dout_server_ptr)
47 #define derr_server (*derr_server_ptr)
48
49 #ifndef SERVER
50         #include "utility.h"
51         extern TextureCache g_texturecache;
52 #endif
53
54 extern IrrlichtDevice *g_device;
55
56 #endif
57