Seed Entities

The following example shows the BGL file format of seed entities. In the example, database header pointers 26–54 point at seed lists of the latband as shown for level 9 (pointer 30).

;DATABASE HEADER********************************************************
dw0001;00 world set number (not saved to file list)
.
.
ddSYNTH_SEEDS_09;30 seeds level 9
;LEVEL 09------------------------------------------------------------------
SYNTH_SEEDS_09:
rel_base=SYNTH_SEEDS_09
COORD_LATBAND_REL00064,LEVL_09_LAT_00064
COORD_LATBAND_REL00065,LEVL_09_LAT_00065
EOL

LEVL_09_LAT_00065:
SEED_ENTITY00386,seed_green,flat,0,180,1;
SEED_ENTITY00387,seed_crops,ignore,0,180,1;
;&SEED_ENTITY00387,ignore,flat,0,180,1;
;&SEED_ENTITY00388,seed_water*256+seed_crops,112*256+182,0,180,1;
;&SEED_ENTITY00389,seed_water*256+seed_crops,208*256+26,0,180,1;
EOL

LEVL_09_LAT_00064:
SEED_ENTITY00386,seed_green,flat,0,180,1;
SEED_ENTITY00387,seed_green,flat,0,180,1;
;&SEED_ENTITY00388,seed_water*256+seed_crops,204*256+166,0,180,1;
;&SEED_ENTITY00389,seed_crops,flat,0,180,1;
EOL

Important: In the preceding example, rel_base is set to the first latband that the header pointer points to. Also, each seed entity list must end with an EOL.

The following examples illustrate the seed entity formats for single and multiple seed entities; the examples are prefaced by the specifications on which they're based.

Seed Entity (single seed)

SEED_ENTITYFS5.00= 04h

Operation: Define a single seed on the level that the header's seed pointer references.

Bytes: 10

Format:
SEED_ENTITY macro longitude,seedtype1,seedtype2,altM256,altM,altfract
db4;;00 opcode
dwlongitude;;01 longitude coord
db0,0,0,0;;03 4-byte seed code
dbaltfract,altM,altM256;;07 altitude ii.f M
endm

4-byte Seed Code Definition:

byte 3,2

0000h=old
1111h=flat
2222h=Mtn
3333h=Coast outside
4444h=Coast inside
....
aaaah=Swamp
fp11h=priority flat
fp22h=priority mtn
fp33h=priority coast outside
fp44h=priority coast inside
....
aaaah=priority swamp

Where p=priority level, 0=lowest, f=highest

byte 2

spare

byte 1

64km textures
00=water
01=broadleaf
02=needleleaf
03=tropical
04=crops
05=prairie
06=arid
07=desert
08=tundra
09=ice
0a=swamp
16km textures

Seed Band (multiple seeds)

SEED_BANDFS5.00= 05h

Operation: Define a single seed on the level that the header's seed pointer referenced.

Bytes: 5 + (7 * n)

Format:
db 5SEED BAND;00 opcode
dw0;01 longitude left inclusive (seed 1)
dw0;03 longitude right inclusive (seed N)
;Caution: wrapping across prime meridian
;not allowed!
dd0;05 seed1 type
db0,0,0;09 seed1 ii.f altitude
.;12
.
seed type and altitude repeat for seed 2...seed n.
Each seed is defined in source code as a band element.

Macros:

SEED_BAND macro west,east

db 5;;00 opcode
dw west;;01 longitude coord westernmost seed inclusive (seed 1)
dw east;;03 longitude coord easternmost seed inclusive (seed N)
;;;Caution: wrapping across prime meridian
;;;not allowed!
endm

BAND_ELEMENT macro seedtype,altM256,altM,altfract

dbseedtype,0,0,0;;00 seed type
dbaltfract,altM,altM256;;04 altitude ii.f M
endm

Important: You cannot wrap a band across the prime meridian.