[Xland was originally created by Dan Bennet. This is a version I hacked ---ts]

Xland is a land creation program for empire version 1.x. It allows a diety
to create a world.  It requires a X terminal which can display at least 5
colors.  (I suspect you could hack it to work with four but less would be a
problem) You may also use monochrome mode by using mxland instead of xland.
(both are made when you compile)

There is one command line argument, the size of the world in the form XxY.
(For example 32x32, 64x64, 128x256, etc). Xland works well up to about 256x256.
After that, the boxes become too small to see, unless you have a very high
resolution screen. (But heck, real men don't play in worlds that big, right?)

The world is initalized to all ocean.  Pressing the left mouse button will
allow a diety to "draw" contents, islands, and ocean. The middle button will
count the size of the island under the mouse. The right button will flood-fill
the current land type onto the current area (maximum of 20 sectors so that
you don't accidentally fill the whole map). 

Ocean		- select ocean as current land type to draw with
Land		- select land as the current land type to draw with
Mountain	- select mountains as current land type to draw with
Clear		- reset the world to ocean
Exact		- make the world the exact shape drawn. The default value
			for this button is on. If this mode is off, the world
			will be close to what you draw but not exactly the same.
			(It will create a lot of 1-2 sector islands, and modify
			a few of the sectors you drew)
UnDo		- undo last fill.
Save		- save the current world to xland.output
Load		- load the map in the file xland.output
Quit		- Make the world with the current map. The output sector file
			will be put in xland.sector.dat. This file can be used
			directly as an EMPIRE sector file.

Once you have made a sector file with xland, you can simply move it into your
empire data directory (rename it to sector, the file empire uses), run ore, and
you're all set. (Ore works properly, since xland sets elevation levels
appropriately for all sectors. Hand designating sectors as the deity does not
set them appropriately, which is why ore does not work on a map such as that.)

One caveat. You MUST run xland on a machine with the same type sizes as the
machine you're running Empire on. If one machine thinks ints are 2 byts and
the other thinks they're 4, you got problems. The easiest way is to run them
on the same machine, or same make of machine, of course. Otherwise, try it
and see...

[The following comments come from Dan Bennet]

FILES
   Graph*   various files for the Graph Widget.  OK OK this was part of my
	    masters thesis and I want to use it wherever I can.

   Makefile (I dont really want to convert this to gnumake)

   xland.c  the program.

I suppose that this belongs to Kent State but you should feel free to 
hack this at will [I did. :-) --ts].  Jeff Bailey is cordinating the KSU
empire stuff so you should probably send worthwhile hacks, bug reports,
and suggestions for improvements back to me or him.  

bennett@mcs.kent.edu
bailey@mcs.kent.edu
doleh@mcs.kent.edu
empire@mcs.kent.edu

Dan Bennett
--------------------------------------------------------------------------------
Dan,

Significant CHANGES from the original:

     Ok. I took out most of the buttons, as I didn't want a thing that made
land kind of like I wanted, I wanted to make land EXACTLY as I wanted. So, there
are now buttons for land, mountain, and ocean. I made a load button, so that
xland can save a map it, and then load it back and work on it again. The exact
button didn't really work before, now it does. The window can now be resized,
and will work correctly, adjusting the size of the boxes for the sectors. 

     Oh, I also took out some of the global arrays to make it compile faster
and smaller, and re-did the commenting style, and I couldn't stand it.
(Commenting styles are very personal... I just happen to use a different one)

     I took out the includes of the empire files, to permit its use on a
machine that doesn't have source on-line. This can be a source of problems,
as the .h files in this directory need to match the .h files in the empire
version you're using. Oh, well, it seemed like a good trade-off.

     BTW, I don't really know much X programming, so most of this is just
hacks... Hopefully I haven't introduced any portability problems (your code
compiled beautifully on my Tek 4317)

Tom

P.S. Things I'd still like to add when I have the time:

1) Make it save in a file of your choice (dialog box)
2) Make it write the sector file in a file of your choice (dialog box)
