ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/tod.h
(Generate patch)

Comparing deliantra/server/include/tod.h (file contents):
Revision 1.1.1.1 by root, Fri Feb 3 07:12:51 2006 UTC vs.
Revision 1.3 by root, Sat Sep 16 22:06:17 2006 UTC

1/*
2 CrossFire, A Multiplayer game for X-windows
3
4 Copyright (C) 2003-2006 Mark Wedel & Crossfire Development Team
1/* Copyright 2000 Tim Rightnour */ 5 Copyright (C) 2000 Tim Rightnour
6 Copyright (C) 1992 Frank Tore Johansen
7
8 This program is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 2 of the License, or
11 (at your option) any later version.
12
13 This program is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program; if not, write to the Free Software
20 Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21
22 The authors can be reached via e-mail at crossfire-devel@real-time.com
23*/
2 24
3#ifndef _TOD_H_ 25#ifndef _TOD_H_
4#define _TOD_H_ 26#define _TOD_H_
5 27
6#define PTICKS_PER_CLOCK 1500 28#define PTICKS_PER_CLOCK 1500
20#define HOURS_PER_YEAR (HOURS_PER_MONTH*MONTHS_PER_YEAR) 42#define HOURS_PER_YEAR (HOURS_PER_MONTH*MONTHS_PER_YEAR)
21 43
22#define LUNAR_DAYS DAYS_PER_MONTH 44#define LUNAR_DAYS DAYS_PER_MONTH
23 45
24typedef struct _timeofday { 46typedef struct _timeofday {
25 int year; 47 int year;
26 int month; 48 int month;
27 int day; 49 int day;
28 int dayofweek; 50 int dayofweek;
29 int hour; 51 int hour;
30 int minute; 52 int minute;
31 int weekofmonth; 53 int weekofmonth;
32 int season; 54 int season;
33} timeofday_t; 55} timeofday_t;
34 56
35/* from common/time.c */ 57/* from common/time.c */
36extern void get_tod(timeofday_t *tod); 58extern void get_tod(timeofday_t *tod);
37 59
80#define SKY_SNOW 14 102#define SKY_SNOW 14
81#define SKY_HEAVY_SNOW 15 103#define SKY_HEAVY_SNOW 15
82#define SKY_BLIZZARD 16 104#define SKY_BLIZZARD 16
83 105
84typedef struct _weather_avoids { 106typedef struct _weather_avoids {
85 const char *name; 107 const char *name;
86 int snow; 108 int snow;
87 archetype *what; /*inited from name, faste to compare arch pointers than strings*/ 109 archetype *what; /*inited from name, faste to compare arch pointers than strings*/
88} weather_avoids_t; 110} weather_avoids_t;
89 111
90typedef struct _weather_replace { 112typedef struct _weather_replace {
91 const char *tile; 113 const char *tile;
92 const char *special_snow; 114 const char *special_snow;
93 const char *doublestack_arch; 115 const char *doublestack_arch;
94 int arch_or_name; 116 int arch_or_name;
95} weather_replace_t; 117} weather_replace_t;
96 118
97typedef struct _weather_grow { 119typedef struct _weather_grow {
98 const char *herb; /* arch name of item to grow */ 120 const char *herb; /* arch name of item to grow */
99 const char *tile; /* arch tile to grow on, NULL if anything */ 121 const char *tile; /* arch tile to grow on, NULL if anything */
100 int random; /* random factor. min 1, higher = lower chance of 122 int random; /* random factor. min 1, higher = lower chance of
101 * appearance */ 123 * appearance */
102 float rfmin; 124 float rfmin;
103 float rfmax; /* rainfall min/max (inches/day) */ 125 float rfmax; /* rainfall min/max (inches/day) */
104 int humin; 126 int humin;
105 int humax; /* humidity min/max */ 127 int humax; /* humidity min/max */
106 int tempmin; 128 int tempmin;
107 int tempmax; /* temp min/max */ 129 int tempmax; /* temp min/max */
108 int elevmin; 130 int elevmin;
109 int elevmax; /* elevation min/max */ 131 int elevmax; /* elevation min/max */
110 int season; /* 0=any or 1-5 */ 132 int season; /* 0=any or 1-5 */
111} weather_grow_t; 133} weather_grow_t;
112 134
113#endif /* _TOD_H_ */ 135#endif /* _TOD_H_ */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines