1 | /* |
1 | /* |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
2 | * This file is part of Deliantra, the Roguelike Realtime MMORPG. |
3 | * |
3 | * |
4 | * Copyright (©) 2005,2006,2007,2008 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
4 | * Copyright (©) 2005,2006,2007,2008,2009,2010 Marc Alexander Lehmann / Robin Redeker / the Deliantra team |
5 | * Copyright (©) 2002,2007 Mark Wedel & Crossfire Development Team |
5 | * Copyright (©) 2002 Mark Wedel & Crossfire Development Team |
6 | * Copyright (©) 1992,2007 Frank Tore Johansen |
6 | * Copyright (©) 1992 Frank Tore Johansen |
7 | * |
7 | * |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
8 | * Deliantra is free software: you can redistribute it and/or modify it under |
9 | * the terms of the Affero GNU General Public License as published by the |
9 | * the terms of the Affero GNU General Public License as published by the |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
10 | * Free Software Foundation, either version 3 of the License, or (at your |
11 | * option) any later version. |
11 | * option) any later version. |
… | |
… | |
72 | NULL, /* argv */ |
72 | NULL, /* argv */ |
73 | CONFDIR, |
73 | CONFDIR, |
74 | DATADIR, |
74 | DATADIR, |
75 | LOCALDIR, |
75 | LOCALDIR, |
76 | PLAYERDIR, MAPDIR, ARCHETYPES, REGIONS, TREASURES, |
76 | PLAYERDIR, MAPDIR, ARCHETYPES, REGIONS, TREASURES, |
77 | UNIQUE_DIR, TEMPLATE_DIR, |
77 | UNIQUE_DIR, "", |
78 | TMPDIR, |
78 | TMPDIR, |
79 | PK_LUCK_PENALTY, |
79 | PK_LUCK_PENALTY, |
80 | STAT_LOSS_ON_DEATH, |
80 | STAT_LOSS_ON_DEATH, |
81 | PERMANENT_EXPERIENCE_RATIO, |
81 | PERMANENT_EXPERIENCE_RATIO, |
82 | DEATH_PENALTY_RATIO, |
82 | DEATH_PENALTY_RATIO, |
… | |
… | |
135 | /* init_environ initialises values from the environmental variables. |
135 | /* init_environ initialises values from the environmental variables. |
136 | * it needs to be called very early, since command line options should |
136 | * it needs to be called very early, since command line options should |
137 | * overwrite these if specified. |
137 | * overwrite these if specified. |
138 | */ |
138 | */ |
139 | void |
139 | void |
140 | init_environ (void) |
140 | init_environ () |
141 | { |
141 | { |
142 | const char *cp; |
142 | const char *cp; |
143 | |
143 | |
144 | if (cp = getenv ("DELIANTRA_CONFDIR" )) settings.confdir = cp; |
144 | if (cp = getenv ("DELIANTRA_CONFDIR" )) settings.confdir = cp; |
145 | if (cp = getenv ("DELIANTRA_LIBDIR" )) settings.datadir = cp; |
145 | if (cp = getenv ("DELIANTRA_LIBDIR" )) settings.datadir = cp; |
… | |
… | |
158 | /* |
158 | /* |
159 | * Initialises all global variables. |
159 | * Initialises all global variables. |
160 | * Might use environment-variables as default for some of them. |
160 | * Might use environment-variables as default for some of them. |
161 | */ |
161 | */ |
162 | void |
162 | void |
163 | init_globals (void) |
163 | init_globals () |
164 | { |
164 | { |
165 | if (settings.logfilename[0] == 0) |
165 | if (settings.logfilename[0] == 0) |
166 | set_logfd (-1); |
166 | set_logfd (-1); |
167 | else |
167 | else |
168 | { |
168 | { |
… | |
… | |
177 | } |
177 | } |
178 | } |
178 | } |
179 | } |
179 | } |
180 | |
180 | |
181 | void |
181 | void |
182 | init_dynamic (void) |
182 | init_dynamic () |
183 | { |
183 | { |
184 | first_map_ext_path = "/start/HallsOfSelection"; |
184 | first_map_ext_path = "/start/HallsOfSelection"; |
185 | first_map_path = "/HallOfSelection"; |
185 | first_map_path = "/HallOfSelection"; |
186 | } |
186 | } |
187 | |
187 | |
… | |
… | |
191 | */ |
191 | */ |
192 | |
192 | |
193 | //attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; |
193 | //attackmess_t attack_mess[NROFATTACKMESS][MAXATTACKMESS]; |
194 | |
194 | |
195 | void |
195 | void |
196 | init_attackmess (void) |
196 | init_attackmess () |
197 | { |
197 | { |
198 | char buf[MAX_BUF]; |
198 | char buf[MAX_BUF]; |
199 | char filename[MAX_BUF]; |
199 | char filename[MAX_BUF]; |
200 | char *cp, *p; |
200 | char *cp, *p; |
201 | FILE *fp; |
201 | FILE *fp; |