Version 4 Map Compiler and Map File Format

The following is part of the source file used to compile a version 4 MAP file.

< : Echo Cluster By Tim Wisseman>
1337 , 2352 , 20 , Ceti Alpha one
2117 , 1269 , 18 , Orionis I
1847 , 1882 , 10 , Wolf 359
2842 , 1642 , 6 , Alioth
1580 , 2627 , 9 , Fussbar
1277 , 2832 , 11 , Cumo
1025 , 1744 , 20 , Mirak
2071 , 2515 , 7 , Izar
2282 , 1558 , 9 , Arcturus
2376 , 2859 , 2 , Perot's World
1969 , 2840 , 2 , Wally World
2003 , 2059 , 3 , Wayne's World
2627 , 2590 , 17 , Disney World
2076 , 2366 , 16 , Camelopardus 345
2628 , 2319 , 15 , Murphrid 432

If the above code was compiled using the version 4 map compiler it would result in a MAP file with 15 planets.
The first line is the header name line. It begins with a "<" and ends with a ">". The text in between is the header name.
The file then consists of up to 10,000 lines of planet system data lines.

X , Y , star , Name

There are 4 data fields seperated by a comma. The first two are x , y corordinatns that can range from 0 to 30000. The
third is a star class that ranges from 1 (Cold) to 20 (Very Hot). The forth and last data field is the name of the system, which
can be up to 40 charactors.

The MAP file structure consists of :

*** LONG = 4 Byte Signed Integer
*** INTEGER = 2 Byte Signed Integer
*** First Byte of file = Byte 1 (Not Byte 0)

'*** V4 Map File ***
'// 1 to 100 Header info First 22 bytes = "VGA Planets 4 Map File"
'// 23 to 100 First 88 charactors given in the header line between the < >
'// 101 LONG Count of Number of Planets
'// 105 ptXYSTAR LONG Pointer to start of (X,Y,STAR)
'// 109 ptNAME LONG Pointer to start of NAME LIST
'//
'// X INTEGER < ptXYSTAR points here
'// Y INTEGER
'// STAR INTEGER
'// X INTEGER < Second record (+ 6 bytes )
'// Y INTEGER
'// STAR INTEGER
'// X INTEGER < Third record (+ 12 bytes )
'// Y INTEGER
'// STAR INTEGER
'// X INTEGER < Forth record (+18 bytes )
'// Y INTEGER
'// STAR INTEGER
'// . . .
'//
'// NAME String * 40 bytes < ptNAME points here
'// NAME String * 40 bytes < second record ( + 40 bytes )
'// NAME String * 40 bytes < third record ( + 80 bytes )
'// NAME String * 40 bytes < forth record ( + 120 bytes )
'// . . .


Download MAPC.ZIP, Complete Basic Source, EXE and example