Unit Ted

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

 

Uses

Overview

Classes, Interfaces, Objects and Records

Name Description
record Atom  

Functions and Procedures

function CountAtoms (which: integer): integer;
procedure NewMinimal;
procedure InitBoneYard;
procedure Breed;
procedure evolve (MLoc: point);
procedure UpDateAnimals;
procedure SaveArthromorph;
procedure LoadArthromorph;
procedure StartDocument;
procedure flipWantColor;
procedure QuitGracefully;
procedure Draw (which: integer; params: CumParams; x, y, xCenter: integer; var ySeg: integer);
procedure DrawInBox (BoxNo: integer);
procedure TellError (what: string);
procedure Tandem (target: integer);

Types

AtomKind = (...);
AtomPtr = ˆAtom;
AtomHdl = ˆAtomPtr;
AtomArray = array[1..Yardsize] of AtomHdl;
SmallAtomArray = array[1..miniSize] of AtomHdl;
AnimalStarts = array[0..MaxBoxes] of integer;
LevelLocs = array[1..10] of integer;
KindsData = array[AtomKind] of integer;
CumParams = array[1..9] of real;

Constants

YardSize = 5000;
miniSize = 200;
scale = 10;

Variables

BoneYard: AtomArray;
MiniYard: SmallAtomArray;
RecordTop: integer;
RecordBottom: integer;
CurrentGenome: integer;
BreedersChoice: AnimalStarts;
NorthPole: integer;
SouthPole: integer;
EastPole: integer;
WestPole: integer;
FreePointer: integer;
MiniFree: integer;
ParamOffset: KindsData;
AnimalPicture: array[0..MaxBoxes] of PicHandle;
Midriff: integer;
SegmentCounter: integer;
SecondSegmentAtomNo: integer;
f: file of Atom;
naive: boolean;
GradientFactor: real;

Description

Functions and Procedures

function CountAtoms (which: integer): integer;
 
procedure NewMinimal;
 
procedure InitBoneYard;
 
procedure Breed;
 
procedure evolve (MLoc: point);
 
procedure UpDateAnimals;

***call this as Evolve(MyPt) from Do_Breeding_Window immediately after defining MyPt

procedure SaveArthromorph;
 
procedure LoadArthromorph;
 
procedure StartDocument;
 
procedure flipWantColor;
 
procedure QuitGracefully;
 
procedure Draw (which: integer; params: CumParams; x, y, xCenter: integer; var ySeg: integer);

Call right at end of whole program

procedure DrawInBox (BoxNo: integer);
 
procedure TellError (what: string);
 
procedure Tandem (target: integer);
 

Types

AtomKind = (...);

2500 would allow 18 Animals with 15 segments each and 4 joints per segment.

Values
  • Free:  
  • AnimalTrunk:  
  • AnimalJoint:  
  • AnimalClaw:  
  • SectionTrunk:  
  • SectionJoint:  
  • SectionClaw:  
  • SegmentTrunk:  
  • SegmentJoint:  
  • SegmentClaw:  
  • Joint:  
  • Claw:  
AtomPtr = ˆAtom;

where to look in the BoneYard for the next atom. 0 means end of chain

AtomHdl = ˆAtomPtr;
 
AtomArray = array[1..Yardsize] of AtomHdl;
 
SmallAtomArray = array[1..miniSize] of AtomHdl;

for the real thing, use 2500

AnimalStarts = array[0..MaxBoxes] of integer;

Just holds one animal, compactly

LevelLocs = array[1..10] of integer;
 
KindsData = array[AtomKind] of integer;

7 SegmentJoint, 8 Joint, 9 Claw, 10 spare

CumParams = array[1..9] of real;

a number for each kind of Atom

Constants

YardSize = 5000;
 
miniSize = 200;
 
scale = 10;
 

Variables

BoneYard: AtomArray;

where the AnimalTrunk.Width is multiplied by SegmentTrunk.Width

MiniYard: SmallAtomArray;

all atoms live here. We index it to look at atoms

RecordTop: integer;
 
RecordBottom: integer;
 
CurrentGenome: integer;
 
BreedersChoice: AnimalStarts;

index of first atom on an Animal

NorthPole: integer;

indexes of starts of all the Animals on the screen

SouthPole: integer;

indexes of starts of all the Animals on the screen

EastPole: integer;

indexes of starts of all the Animals on the screen

WestPole: integer;

indexes of starts of all the Animals on the screen

FreePointer: integer;

indexes of starts of all the Animals on the screen

MiniFree: integer;

indexes of starts of all the Animals on the screen

ParamOffset: KindsData;

start searching from here for free blocks

AnimalPicture: array[0..MaxBoxes] of PicHandle;

Tells where Height, Width, Angle go in a CumParams. see Draw

Midriff: integer;
 
SegmentCounter: integer;
 
SecondSegmentAtomNo: integer;
 
f: file of Atom;
 
naive: boolean;
 
GradientFactor: real;
 

Generated by PasDoc 0.14.0.