… | |
… | |
16 | |
16 | |
17 | You should have received a copy of the GNU General Public License |
17 | You should have received a copy of the GNU General Public License |
18 | along with this program; if not, write to the Free Software |
18 | along with this program; if not, write to the Free Software |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
19 | Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
20 | |
20 | |
21 | The authors can be reached via e-mail at crossfire-devel@real-time.com |
21 | The authors can be reached via e-mail at crossfire@schmorp.de |
22 | */ |
22 | */ |
23 | |
23 | |
24 | /* This file contains various #defines that select various options. |
24 | /* This file contains various #defines that select various options. |
25 | * Some may not be desirable, and some just may not work. |
25 | * Some may not be desirable, and some just may not work. |
26 | * |
26 | * |
… | |
… | |
66 | * DEBUG - more verbose message logging? |
66 | * DEBUG - more verbose message logging? |
67 | * MAP_CLIENT_X, MAP_CLIENT_Y - determines max size client map will receive |
67 | * MAP_CLIENT_X, MAP_CLIENT_Y - determines max size client map will receive |
68 | * MAX_TIME - how long an internal tick is in microseconds |
68 | * MAX_TIME - how long an internal tick is in microseconds |
69 | * MANY_CORES - generate core dumps on gross errors instead of continuing? |
69 | * MANY_CORES - generate core dumps on gross errors instead of continuing? |
70 | * PARTY_KILL_LOG - stores party kill information |
70 | * PARTY_KILL_LOG - stores party kill information |
71 | * WATCHDOG - allows use of an external watchdog program |
|
|
72 | * |
71 | * |
73 | ***********************************************************************/ |
72 | ***********************************************************************/ |
74 | |
73 | |
75 | /* Use a very easy, non-challenging server? |
74 | /* Use a very easy, non-challenging server? |
76 | * Defining the COZY_SERVER will make the server much less challenging: |
75 | * Defining the COZY_SERVER will make the server much less challenging: |
… | |
… | |
132 | #define SIMPLE_EXP TRUE |
131 | #define SIMPLE_EXP TRUE |
133 | #define SPELLPOINT_LEVEL_DEPEND TRUE |
132 | #define SPELLPOINT_LEVEL_DEPEND TRUE |
134 | #define SPELL_ENCUMBRANCE TRUE |
133 | #define SPELL_ENCUMBRANCE TRUE |
135 | #define SPELL_FAILURE_EFFECTS FALSE |
134 | #define SPELL_FAILURE_EFFECTS FALSE |
136 | #define REAL_WIZ TRUE |
135 | #define REAL_WIZ TRUE |
137 | #define RECYCLE_TMP_MAPS FALSE |
|
|
138 | #define RESURRECTION FALSE |
136 | #define RESURRECTION FALSE |
139 | #define SEARCH_ITEMS TRUE |
137 | #define SEARCH_ITEMS TRUE |
140 | #define NOT_PERMADETH TRUE |
138 | #define NOT_PERMADETH TRUE |
141 | #define EXPLORE_MODE FALSE |
139 | #define EXPLORE_MODE FALSE |
142 | #define STAT_LOSS_ON_DEATH FALSE |
140 | #define STAT_LOSS_ON_DEATH FALSE |
… | |
… | |
158 | * and so on.) This can be very useful if you are trying to measure |
156 | * and so on.) This can be very useful if you are trying to measure |
159 | * server/bandwidth usage. It will periodially dump out information |
157 | * server/bandwidth usage. It will periodially dump out information |
160 | * which contains usage stats for the last X amount of time. |
158 | * which contains usage stats for the last X amount of time. |
161 | * CS_LOGTIME is how often it will print out stats. |
159 | * CS_LOGTIME is how often it will print out stats. |
162 | */ |
160 | */ |
163 | #ifndef WIN32 /* ***win32 we set the following stuff in the IDE */ |
|
|
164 | #define CS_LOGSTATS |
161 | #define CS_LOGSTATS |
165 | #endif |
|
|
166 | #ifdef CS_LOGSTATS |
|
|
167 | #define CS_LOGTIME 600 |
162 | #define CS_LOGTIME 600 |
168 | #endif |
|
|
169 | |
163 | |
170 | /* DEBUG generates copious amounts of output. I tend to change the CC options |
164 | /* DEBUG generates copious amounts of output. I tend to change the CC options |
171 | * in the crosssite.def file if I want this. By default, you probably |
165 | * in the crosssite.def file if I want this. By default, you probably |
172 | * dont want this defined. |
166 | * dont want this defined. |
173 | */ |
167 | */ |
174 | #ifndef WIN32 /* ***win32 we set the following stuff in the IDE */ |
|
|
175 | #ifndef DEBUG |
168 | #ifndef DEBUG |
176 | #define DEBUG |
169 | #define DEBUG |
177 | #endif |
|
|
178 | #endif |
170 | #endif |
179 | /* |
171 | /* |
180 | * This option creates more core files. In some areas, there are certain |
172 | * This option creates more core files. In some areas, there are certain |
181 | * checks done to try and make the program more stable (ie, check |
173 | * checks done to try and make the program more stable (ie, check |
182 | * parameter for null, return if it is). These checks are being done |
174 | * parameter for null, return if it is). These checks are being done |
… | |
… | |
259 | /* GD */ |
251 | /* GD */ |
260 | |
252 | |
261 | #define PERM_EXP_GAIN_RATIO 0.10f |
253 | #define PERM_EXP_GAIN_RATIO 0.10f |
262 | #define PERM_EXP_MAX_LOSS_RATIO 0.50f |
254 | #define PERM_EXP_MAX_LOSS_RATIO 0.50f |
263 | |
255 | |
264 | /* |
|
|
265 | * WATCHDOG lets sends datagrams to port 13325 on localhost |
|
|
266 | * in (more-or-less) regular intervals, so an external watchdog |
|
|
267 | * program can kill the server if it hangs (for whatever reason). |
|
|
268 | * It shouldn't hurt anyone if this is defined but you don't |
|
|
269 | * have an watchdog program. |
|
|
270 | */ |
|
|
271 | #ifndef WIN32 /* ***win32 disable watchdog as win32 default */ |
|
|
272 | #define WATCHDOG |
|
|
273 | #endif |
|
|
274 | |
|
|
275 | |
|
|
276 | /* Enable the new material code - it needs some work. You can |
256 | /* Enable the new material code - it needs some work. You can |
277 | * enable this, and things will work, just you'll see a whole |
257 | * enable this, and things will work, just you'll see a whole |
278 | * bunch more materials show up, and thus a whole bunch more materials |
258 | * bunch more materials show up, and thus a whole bunch more materials |
279 | * in your inventory, and the sorting for them isn't really good. |
259 | * in your inventory, and the sorting for them isn't really good. |
280 | */ |
260 | */ |
… | |
… | |
342 | * SHUTDOWN - used when shutting down the server |
322 | * SHUTDOWN - used when shutting down the server |
343 | * SOCKETBUFSIZE - size of buffer used internally by the server for storing |
323 | * SOCKETBUFSIZE - size of buffer used internally by the server for storing |
344 | * backlogged messages. |
324 | * backlogged messages. |
345 | * TMPDIR - directory to use for temp files |
325 | * TMPDIR - directory to use for temp files |
346 | * UNIQUE_DIR - directory to put unique item files into |
326 | * UNIQUE_DIR - directory to put unique item files into |
347 | * USE_CALLOC for some memory requests |
|
|
348 | *********************************************************************** |
327 | *********************************************************************** |
349 | */ |
328 | */ |
350 | |
329 | |
351 | /* |
330 | /* |
352 | * BANFILE - file used to ban certain sites from playing. See the example |
331 | * BANFILE - file used to ban certain sites from playing. See the example |
… | |
… | |
378 | /* LOGFILE specifies which file to log to when playing with the |
357 | /* LOGFILE specifies which file to log to when playing with the |
379 | * -daemon option. |
358 | * -daemon option. |
380 | */ |
359 | */ |
381 | |
360 | |
382 | #ifndef LOGFILE |
361 | #ifndef LOGFILE |
383 | #ifdef WIN32 /* change define path */ |
|
|
384 | #define LOGFILE "var\\crossfire.log" |
|
|
385 | #else |
|
|
386 | #define LOGFILE "/var/log/crossfire/logfile" |
362 | #define LOGFILE "/var/log/crossfire/logfile" |
387 | #endif |
|
|
388 | #endif |
363 | #endif |
389 | |
364 | |
390 | /* |
365 | /* |
391 | * MAP_MAXTIMEOUT tells the maximum of ticks until a map is swapped out |
366 | * MAP_MAXTIMEOUT tells the maximum of ticks until a map is swapped out |
392 | * after a player has left it. If it is set to 0, maps are |
367 | * after a player has left it. If it is set to 0, maps are |
… | |
… | |
541 | * something that is NFS mounted (but performance may suffer as NFS is |
516 | * something that is NFS mounted (but performance may suffer as NFS is |
542 | * slower than local disk) |
517 | * slower than local disk) |
543 | */ |
518 | */ |
544 | |
519 | |
545 | /*#define TMPDIR "/home/hugin/a/crossfire/crossfire/tmp"*/ |
520 | /*#define TMPDIR "/home/hugin/a/crossfire/crossfire/tmp"*/ |
546 | #ifdef WIN32 /* change define path tmp */ |
|
|
547 | #define TMPDIR "tmp" |
|
|
548 | #else |
|
|
549 | #define TMPDIR "/tmp" |
521 | #define TMPDIR "/tmp" |
550 | #endif |
|
|
551 | |
522 | |
552 | |
523 | |
553 | /* Directory to use for unique items. This is placed into the 'lib' |
524 | /* Directory to use for unique items. This is placed into the 'lib' |
554 | * directory. Changing this will cause any old unique items file |
525 | * directory. Changing this will cause any old unique items file |
555 | * not to be used. |
526 | * not to be used. |
556 | */ |
527 | */ |
557 | #define UNIQUE_DIR "unique-items" |
528 | #define UNIQUE_DIR "unique-items" |
558 | |
529 | |
559 | /* |
530 | /* |
560 | * If undefined, malloc is always used. |
|
|
561 | * It looks like this can be oboleted. However, it can be useful to |
|
|
562 | * track down some bugs, as it will make sure that the entire data structure |
|
|
563 | * is set to 0, at the expense of speed. |
|
|
564 | * Rupert Goldie has run Purify against the code, and if this is disabled, |
|
|
565 | * apparantly there are a lot of uninitialized memory reads - I haven't |
|
|
566 | * seen any problem (maybe the memory reads are copies, and the destination |
|
|
567 | * doesn't actually use the garbage values either?), but the impact on speed |
|
|
568 | * of using this probably isn't great, and should make things more stable. |
|
|
569 | * Msw 8-9-97 |
|
|
570 | */ |
|
|
571 | #define USE_CALLOC |
|
|
572 | |
|
|
573 | |
|
|
574 | /* |
|
|
575 | * These define the players starting map and location on that map, and where |
531 | * These define the players starting map and location on that map, and where |
576 | * emergency saves are defined. This should be left as is unless you make |
532 | * emergency saves are defined. This should be left as is unless you make |
577 | * major changes to the map. |
533 | * major changes to the map. |
578 | */ |
534 | */ |
579 | |
535 | |
580 | #ifdef WIN32 /* change define path city */ |
|
|
581 | |
|
|
582 | # define EMERGENCY_MAPPATH "\\city\\city" |
|
|
583 | # define EMERGENCY_X 15 |
|
|
584 | # define EMERGENCY_Y 19 |
|
|
585 | #else |
|
|
586 | # define EMERGENCY_MAPPATH "/city/city" |
536 | #define EMERGENCY_MAPPATH "/city/city" |
587 | # define EMERGENCY_X 15 |
537 | #define EMERGENCY_X 15 |
588 | # define EMERGENCY_Y 19 |
538 | #define EMERGENCY_Y 19 |
589 | #endif |
|
|
590 | |
539 | |
591 | |
540 | |
592 | /* |
541 | /* |
593 | * These defines tells where, relative to LIBDIR, the maps, the map-index, |
542 | * These defines tells where, relative to LIBDIR, the maps, the map-index, |
594 | * archetypes highscore and treaures files and directories can be found. |
543 | * archetypes highscore and treaures files and directories can be found. |