Freeciv-3.1: /fast/freeciv/nightly/S3_1/server/generator/temperature_map.h Source File

Freeciv-3.1

Loading...
Searching...
No Matches
temperature_map.h
Go to the documentation of this file.
1/***********************************************************************
2 Freeciv - Copyright (C) 2004 - Marcelo J. Burda
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 2, or (at your option)
6 any later version.
7
8 This program is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
12***********************************************************************/
13#ifndef FC__TEMPERATURE_MAP_H
14#define FC__TEMPERATURE_MAP_H
15
16/* utility */
17#include "support.h" /* bool type */
18
19/*
20 * temperature_map[] stores the temperature of each tile
21 * values on tmap can get one of these 4 values
22 * there is 4 extra values as macros combining the 4 basics ones
23 */
24 typedef int temperature_type;
25
26#define TT_FROZEN 1
27#define TT_COLD 2
28#define TT_TEMPERATE 4
29#define TT_TROPICAL 8
30
31#define TT_NFROZEN (TT_COLD | TT_TEMPERATE | TT_TROPICAL)
32#define TT_ALL (TT_FROZEN | TT_NFROZEN)
33#define TT_NHOT (TT_FROZEN | TT_COLD)
34#define TT_HOT (TT_TEMPERATE | TT_TROPICAL)
35
36bool temperature_is_initialized(void);
37bool tmap_is(const struct tile *ptile, temperature_type tt);
38bool is_temperature_type_near(const struct tile *ptile, temperature_type tt);
39void destroy_tmap(void);
40void create_tmap(bool real);
41
42#endif /* FC__TEMPERATURE_MAP_H */
tile
Definition tile.h:49
support.h
temperature_is_initialized
bool temperature_is_initialized(void)
Definition temperature_map.c:77
destroy_tmap
void destroy_tmap(void)
Definition temperature_map.c:107
temperature_type
int temperature_type
Definition temperature_map.h:24
tmap_is
bool tmap_is(const struct tile *ptile, temperature_type tt)
Definition temperature_map.c:85
is_temperature_type_near
bool is_temperature_type_near(const struct tile *ptile, temperature_type tt)
Definition temperature_map.c:93
create_tmap
void create_tmap(bool real)
Definition temperature_map.c:119