Crossfire Server, Trunk
land.c File Reference
#include <stdio.h>
#include <stdlib.h>
+ Include dependency graph for land.c:

Go to the source code of this file.

Macros

#define AVG_PT   -10
 
#define BASE_ALT   -100
 
#define MAP_FORMAT   "world_%03d_%03d"
 
#define MAP_SIZE   50
 
#define MAX(x, y)   ((x)>(y)?(x):(y))
 
#define MAX_SIZE   3000
 
#define NUM_PASSES   3
 

Enumerations

enum  Terrain_Types {
  None =0, DeepWater =1, MediumWater =2, ShallowWater =3,
  Swamp =4, DeepSwamp =5, Grass =6, Desert =7,
  Brush =8, EverGreens =9, Jungle =10, Tree1 =11,
  Tree2 =12, Woods1 =13, Woods2 =14, Woods3 =15,
  Hills =16, HillsRocky =17, Steppe =18, Mountain =19,
  HighMountain =20, WasteLand =21, Beach = 22, VeryHighMountain =23
}
 

Functions

 main (int argc, char *argv)
 
void write_crossfire_maps (int mapy, int mapx)
 

Variables

int altitude [MAX_SIZE][MAX_SIZE]
 
int startx =100
 
int starty =100
 
char * Terrain_Names [][2]
 

Macro Definition Documentation

◆ AVG_PT

#define AVG_PT   -10

◆ BASE_ALT

#define BASE_ALT   -100

Definition at line 7 of file land.c.

◆ MAP_FORMAT

#define MAP_FORMAT   "world_%03d_%03d"

Definition at line 17 of file land.c.

◆ MAP_SIZE

#define MAP_SIZE   50

Definition at line 21 of file land.c.

◆ MAX

#define MAX (   x,
 
)    ((x)>(y)?(x):(y))

Definition at line 5 of file land.c.

◆ MAX_SIZE

#define MAX_SIZE   3000

Definition at line 4 of file land.c.

◆ NUM_PASSES

#define NUM_PASSES   3

Enumeration Type Documentation

◆ Terrain_Types

Enumerator
None 
DeepWater 
MediumWater 
ShallowWater 
Swamp 
DeepSwamp 
Grass 
Desert 
Brush 
EverGreens 
Jungle 
Tree1 
Tree2 
Woods1 
Woods2 
Woods3 
Hills 
HillsRocky 
Steppe 
Mountain 
HighMountain 
WasteLand 
Beach 
VeryHighMountain 

Definition at line 36 of file land.c.

Function Documentation

◆ main()

main ( int  argc,
char *  argv 
)

Definition at line 277 of file land.c.

References disinfect::a, altitude, AVG_PT, BASE_ALT, c, banquet::l, MAX_SIZE, NUM_PASSES, ring_occidental_mages::r, startx, starty, write_crossfire_maps(), diamondslots::x, diamondslots::y, and Moving_Fog::z.

+ Here is the call graph for this function:

◆ write_crossfire_maps()

void write_crossfire_maps ( int  mapy,
int  mapx 
)

Definition at line 97 of file land.c.

References altitude, Beach, DeepWater, EverGreens, Grass, HighMountain, Hills, MAP_FORMAT, MAP_SIZE, MediumWater, Mountain, give::name, None, item::q, ShallowWater, startx, starty, Swamp, Terrain_Names, VeryHighMountain, WasteLand, diamondslots::x, and diamondslots::y.

Referenced by main().

+ Here is the caller graph for this function:

Variable Documentation

◆ altitude

int altitude[MAX_SIZE][MAX_SIZE]

Definition at line 10 of file land.c.

Referenced by main(), and write_crossfire_maps().

◆ startx

int startx =100

Definition at line 34 of file land.c.

Referenced by main(), and write_crossfire_maps().

◆ starty

int starty =100

Definition at line 34 of file land.c.

Referenced by main(), and write_crossfire_maps().

◆ Terrain_Names

char* Terrain_Names[][2]
Initial value:
= {
{"None", "0, 0, 0 "},
{"deep_sea", "0 0 127 "},
{"sea", "0 0 192 "},
{"shallow_sea", "0 0 255 "},
{"swamp", "12 161 64 "},
{"deep_swamp", "155 175 164 "},
{"grass", "0 255 0 "},
{"desert", "222 218 135 "},
{"brush", "1 144 1 "},
{"evergreens", "0 128 0 "},
{"jungle_1", "0 176 0 "},
{"tree", "4 133 01 "},
{"evergreen", "20 209 0 "},
{"woods", "4 115 01 "},
{"woods_2", "1 182 02 "},
{"woods_3", "4 153 02 "},
{"hills", "166 160 70 "},
{"hills_rocky", "166 155 70 "},
{"steppe", "150 97 34 "},
{"mountain", "183 190 190 "},
{"mountain2", "191 196 185 "},
{"mountain4", "215 215 215 "},
{"beach", "232 228 165 "},
{"mountain5", "255 255 255 "},
}

Definition at line 63 of file land.c.

Referenced by write_crossfire_maps().