/*
 *
 *	This file is copyrighted by Juha Pohjalainen in 1995 and distributed under
 *	"Artistic Licence". Read file "ARTISTIC" for more details.
 * 
 */

Crystal Ball Legacy v2.4 - VGA Planets Player Utility
====================================================

Currently following files are read thru DLL:
----------------------------------------------------------
TRUEHULL.DAT    XYPLAN.DAT      GEN?.DAT        MDATA?.DAT
HULLSPEC.DAT    PLANET.NM       SHIPXY?.DAT
ENGSPEC.DAT     PDATA?.DAT      TARGET?.DAT
BEAMSPEC.DAT    BDATA?.DAT      TARGET?.EXT
TORPSPEC.DAT    RACE.NM         SHIP?.DAT

UTIL?.DAT (records 0, 1,2,3,4,5,6,10,11,12,16,18,19,21,26)

Release notes from v. 2.20 to 2.4


Ver. 2.4
- public version of Crystal Ball Legacy - not a BETA
Ver. 2.3.17
- fixed "black planets" bug
Ver. 2.3.16
- now there can be maximum 1000 scripts; scripts are now dynamically
  allocated
- now there can be only one Crystal Ball running; if another one
  is started, then user gets Dialog telling that CB is already running
  (This is done because I think that CBVGAP.DLL can only have one
  dataspace, and if other CB is started, this could cause data
  corruption)
- scripts can now have different levels between 0 and 7; level 0 is
  special level because it is shown always (if User scripts or
  Autoscripts are checked); PENs and BRUSHes should always be on
  level 0, so that there is not going to be any color mistakes
- rules can now have four different patterns instead of just one;
  if there are more than one rule, all rules have to match to
  rule to hit
- added "Polish calculator (like HP)" to message parser, so rules
  can now have weird math behind them; all math should be closed
  between [ and ]; math is long integer only
  currently supported functions are:
  		[	clear stack
		+	add
		-	substract
		*	multiply
		#	square root (truncated down)
		<	less than 
		>	more than
		=	equal (NOTE: this is not SUM!)
		]	SUM

  So math like: [3 6 + #] turns out to be SQRT(3 + 9) =
  and [9 6 > 100 *] turn to ((9 > 6) * 100) = 0 * 100
  And rule for Web could be: CIRCLE X=(x) Y=(y) D=[(units)#] L=4
Ver. 2.3.15
- parser now skips scripts, which don't have X or Y values set
Ver. 2.3.14
- added infodb patches and 2 files (infodb.h  and infodb.cpp) from
  Christoph Quix <quix@picasso.informatik.rwth-aachen.de>
  his modifications are noted as //CQ
  >>> Thank you, Christoph! <<<
- I had to modify infodb little to make it more suitable for CB,
  now call should be LPSTR and ctrl+ENTER should correctly change
  line in Info editor and pure ENTER just exits; also made infodb
  binary, not as text. 
Ver. 2.3.13
- new CBLAUNCH made part of CB distribution; hopefully bye bye hard
  installation
- fixed bug with cbget and planetnames
- bug fix: cbparser caused GPF 
Ver. 2.3.12
- added three new script commands: lflag (left oriented flag), rflag (right
  oriented flag) and omega (circle with one line thru)
- added cbget function in parser, following fields support cbget:
	bid, pid, name, x and y (cbget work only with planets and bases, but
	not with ships or minefields!)
Ver. 2.3.11
- finetunig message parser and autoscripter (RULES.INI in working directory
  now has rules effective for current game; feel free to edit, if you know
  what you are doing)
- there are now 30 fields to use with message parser and autoscipter, and
  the fields are (variables are case sensitive, so lower case only):
        mid			minefield id (1-500)
        sid			ship id (1-500)
        pid			planet id (1-500)
        bid			base id (1-500)
        fcode		friendlycode
        mine		mineral mines
        factory		factories
        defence		defences
        neut		neutronium
        dur			duranium
        trit		tritanium
        moly		molybdenum
        x			x-coordinate
        y           y-coordinate
        unit        minefield units
        name        name (planet/ship/???)
        climate     planet temperature
        clan        clans in planet
        native      natives in planet
		race		race name
		user9		free variables (0-9) for player scripts
        user8
        user7
        user6
        user5
        user4
        user3
		user2
        user1
        user0
- removed explosions from CB; now they can be shown thru autoscripts
- active menu layer should now be saved into CBGAME.INI
Ver. 2.3.10
- TV = ideas from Thomas Voigt
- TV: Crystal Ball is now autoprobing playerfiles, if selected race
  can not be found; from 11 downto 0; if player number becomes zero,
  CB tells in PassWord dialog caption that "Turnfiles not found!"
  otherwise racenumber is shown in caption
- there should now be CRYSBALL.LOG in your working directory with
  various sessions messages; if you can not find it then try following
  from dos:
	CD \
    DIR CRYSBALL.LOG /S
- added version number in CB icon
- first version of message parser + autoscripter started working
Ver. 2.3.9
- RG = ideas from Robert C. Good Jr.
- started using new version numbering from 2.38 we go to 2.3.9; next
  public release is going to be v2.4
- fixed bug with "Destroyed before birth" ships
- fixed "infolist too wide in 640" bug
- RG: added planet list filter; when ever page 2 listfilter is checked, only
  planets owned by someone are shown in Info dialog box; any race can do
  also in filtered view, planets should be sorted by owner
- RG: added ship list filter; when ever page 3 listfilter is checked, only
  ships owned either Player of Follow race are shown in Info dialog box
- continued work with message parser (CBPARSER.CPP)
Ver. 2.38
- started working with new kind of message parser (for CB anyway) there is new
  switch in page 4 of CB display (ParseDump messages) which is first sing of
  this parser (it dumps into MESSAGES.PDM file) and also new temporary file
  SCRIPT.TMP is generated every time CB starts
- CS = bug report from Conrad D. Sirois
- PO = bug report from Pekka Oikari
- RB = bug report and "old and lost" ideas (CB 2.17) from Rea Blossom
- PO: fixed typo "magacredits" in scripts
- PB: added lots of new things into info list dialog
- CS & RB: CB was not updating ship info during same turn, after re-read
Ver. 2.37
- planet coordinates (x,y) and name are now always read thru DLL and not from
  PLANET.DBV (and they are not written there either), so this or later versions
  of CB Legacy are not compatible with previous ones; this version can read old
  format, but older versions are going to complain about PLANETS.DBV is not compatible
  ====================================================================================
  SO USE THIS VERSION ONLY GAMES WHICH YOU DONT WANT VIEW WITH PREVIOUS VERSIONS OF CB
  ====================================================================================
- cargo ships (ships without any weapons) look normal, but warships have third "Y-wing"
  in their picture; hopefully this makes it easier to see which ships are dangerous
- now each race can have its own color; these colors are added to CBGAME.INI (so that
  in different games, with different alliances, can have different colorsettings);
  each race have Race.?=<color number> under [Colors] section; with these settings
  some old colorsettings becomes obsolete
Ver. 2.36
- scripts are now read from different file; file name is SCRIPT.CB and
  should be located at working directory; and no more linenumbers;
  maximum script lines are now 400
- fixed score sorting problem
- added PHost minefield support thru DLL
- CB should now support bigger maps (in range 0-4000)
- added more function into CBVGAP.DLL
Ver. 2.35
- MDATA?.DAT is now working thru DLL
- some variable translations
Ver. 2.34
- GP = bug report and ideas from Gordy Pine
- GP: fixed bug with too big colonist and native populations (it really caused
      big problems)
- GP: TARGET?.EXT is now working thru DLL
- function name changes
Ver. 2.33
- VM = bug report from Valerio Marongiu
- VM: fixed bug with selected ships/planets names in map
- VM: changed feeling % into feeling number and also values below zero are displayed
- VM: changed Reptilian to Reptian
- VM: ship direction should come clean from DLL now
- set maximum script lines up to 400
Ver. 2.32
- fixed bug with scanned planetdata dissapearing
- PHost destroyed ships should now vanish from CB
Ver. 2.31
- SHIP?.DAT is now working thru DLL
Ver. 2.30
- TARGET?.DAT is now working thru DLL
- once again - fixed temperature bug
Ver. 2.29
- increased stacksize to 16k
- new style to use DLL; only once setup paths and player and then you
  you should be able to use all VGAP files; should be working now
Ver. 2.28
- trying to fix DLL problems ...
Ver. 2.27
- CBGAME.INI -> [Files] -> Path -> should be similar to path command in autoexec.bat
  but destination directories should be VGA Planets data directory and
  VGA Planets exe directory
- score is working thru DLL
- turn number is working thru DLL
Ver. 2.26
- move password checking into DLL
Ver. 2.25
- new style to use DLL; only once setup paths and player and then you
  you should be able to use all VGAP files (not yet working properly)
Ver. 2.24
- shipxy is working thru DLL
- this is going to be The Crystal Ball Legacy
Ver. 2.23
- bdata is working thru DLL
Ver. 2.22
- pdata is working thru DLL
Ver. 2.21
- added buffer length parameter at <xxx>Name function call
Ver. 2.20
- started converting Crystal Ball into DLL version
- racenm is working thru DLL
- hull is working thru DLL
- xyplan is working thru DLL

Release notes v. 2.14
    - "possible starbases"; when ever CB realises that there is enough
      everything to build a starbase but no starbase is yet there, half
      a starbase is drawn; NOTE: this is only shown, if all starbases
      are shown
    - added message filter -> now all messages which are show in screen,
      are not displayed anymore, if you don't want to, so you don't have
      to read all those minefield messages
    - added [><] button, which causes CB to move center of a screen into
      xy 2000, 2000 (in case you are lost)
    - added LineStyle switch into "CRYSBALL.INI"; should fix problems if
      there are those invisible PS_DOT or PS_DASH circles or lines
    - fixed message bug, which caused CB to crash if there was more than
      200 messages in MDATA??.DAT
Release notes v. 2.12
    - NOTE: no other documentation than this one has changed since
      version 2.00 (sorry)
	- added stupid windows color showing program called: CBCOLORS.EXE
		- see this one to determine which colors to use in CRYSBALL.INI
	- second official release (and there is no change in those .DBV files)
	- CBGAME.INI can now contain [Files] Working.Directory (CB will now
	  automatically do change directory [cd] into that directory)
	- messages are now displayed as ASCII (not annoying ANSI anymore)
	- added maximum mines, factories and defenceposts in planet dialog
	- now there is possibility to turn on direction line for every ship
		- here is also some bug, which might occurs when angle is 0, 90,
		  180 or 270.
	- when hull type changes, previous waypoints should be deleted
	- added "radar ranges" for own planets, own ships and primary enemy
	  ships
	  	- adds some new color lines into CRYSBALL.INI
			[Colors] Planet.Radar.Range
			[Colors] Ship.Radar.Range
			[Colors] Enemy.Radar.Range
		- adds some new lines into CBGAME.INI (sensor ranges in LYs)
			[General] Planet.Radar.Range
			[General] Ship.Radar.Range
			[General] Enemy.Radar.Range
	- "Sticky"-mode is now first active mode (previously this it was Info)
	- in "Sticky"-mode double-click gives same results as normal Info mode
	- checkboxes are now divided between 4 "layers"; use buttons 1-4 to
      switch
	- layer number is now displayed at top right corner
Release notes v. 2.08
	- first beta release after 2.00
    - verbal native and colonist feelings are now displayed
    - with taxrates also MC's are displayed
    - a new checkbox, where you can select whether show all rawmaterials
      or only rawmaterials on stock
    - fixed "slowness" bug when changing planet owners
    - checkboxes are now divided between 3 "layers"; use buttons 1-3 to
      switch
	- CBGAME.INI can now be told as commandline parameter
    - "Sticky" -mode will now also show ships direction and warp, and also
      traces are shown
    - when some info is not known, ? is displayed instead of -1
    - fixed bug with asking password, when password is NOPASSWORD
    - now planets can be shown as circles instead of "x"
        - CRYSBALL.INI: [General] Planets.As.Circles=1
    - native circles have now native race name with it
    - fixed "unknown race" bug
    - moved scripts behind everything and added BRUSH command
        - TIP: if you want to have different background for whole map,
          use BRUSH something and then do really big circle
    - fixed problem with too small DUMP button (hopefully)
    - last traced ship can now have own different color
        - CRYSBALL.INI: [Colors] LastShip.Trace
    - in minefield, race, ship and planet lists you can now use
      a double-click to go forward
    - zoom-box is now put behind checkbox
    - fixed temperature-100 bug
    - distance line is turned on and off, when selected form checkbox
    - fixed "minefield not updated" -bug (hopefully)
Release notes v. 2.00
    - first real CB release
    - fixed bird man spy mission bug
Release notes v. 1.97b
    - now planets that have some info are not anymore drawn with
      neutral color
    - added turn number error checkin into Caption Bar
    - added starbase info
Release notes v. 1.96b (limited beta distribution)
    - new screen layout
    - minefields now sorted by id
    - fixed (negative sqrt) minefield bug (int -> labs(long))
    - VGA Planets messages can now be viewed using CB
    - in messageview, you can see, which messages have been updated
      into map
    - you can now export messages into text file (MESSAGES.DMP)
Release notes v. 1.93b
    - fixed turn 499 (or turn 9999) bug
    - supplies and money are not anymore counted together
    - material circles are now relative to zoomfactory (log10) (and
	  calculated differently, using quberoot; and because natives circle
	  was so big, it was diveided by 2)
	- added password check, but only once after new password and then
	  it is saved into CBGAME.INI (now program is cruel; if you don't
	  know right password, then off you go)
	- now xyplan.dat and planet.nm are first searched from game directory
	  and only after that from planets directory
	- added new drawing scripts (into CBGAME.INI, edit manually):
		- Pen R=xxx B=xxx G=xxx
        - MoveTo X=xxxx Y=xxxx
		- LineTo X=xxxx Y=xxxx
		- Circle X=xxxx Y=xxxx D=xxx
		- Text X=xxxx Y=xxxx T=..............
	- in shiplist, ships are now sorted by races
	- added ability to read following messages:
		- plunder planet (fascist)
		- super-spy missions (bird men)
		(actually hole messagehandling rewritten)
	- minefields now have their ID number in mapview
	- added hull info into ship dialog
    - there is one DOS program, PLANET.EXE, which dumps your PLANET.DBV.
      (planet.dbv should be in working directory, when this program is
      executed)
    - some other improvements ...

Release notes v. 1.89b
	- new INSTALL.BAT should help you to install this program
    - ships<player>.dbv is now ship.dbv (!rename old one to keep data!)
    - planet<player>.dbv is now planet.dbv (!rename old one to keep data!)
    - mfield<player>.dbv is now mfield.dbv (!rename old one to keep data!)
    - CRYSBALL.INI moved into Windows directory
    - CBGAME.INI should be located at working directory (see later)
    - you can now use different sized Windows with CB (see ScreenSize at
      CRYSBALL.INI)
    - you can now use that other mousekey to center map at that point
    - new HyperWarp Tool should be operating (but not tested thoroughly)
    - CB should restore screen into last position of your last session
    - you can cycle thru Coord/Info/Sticky tool
    - should read following added messages
        - explosions

Release notes v. 1.84b
    - I saw PLAN_MAP_II after I had announced version 1.8 to my TWMA players
      and I was disapointed of my own work
    - should read following messages
		- meteorites
        - mine sweep (own & enemy)
        - mine laying
        - sensorsweeps
        - some exploration messages
        - Dark Sense

Release notes v. 1.8b
    - first beta with more users (TWMA players)

