Unit Globals

DescriptionUsesClasses, Interfaces, Objects and RecordsFunctions and ProceduresTypesConstantsVariables

Description

**********************************************************

Overview

Classes, Interfaces, Objects and Records

Name Description
packed record tSystem  
record person  
record MarchingOrders  
record Full  
record God  
record Lin  
record Pic  
record Menagerie  

Types

CursorList = ARRAY[iBeamCursor..BlankCursor] OF CursHandle;
PtrInteger = ˆInteger;
PtrString = ˆstr255;
SwellType = (...);
HorizPos = (...);
VertPos = (...);
SmallNumber = -1..1;
chromosome = ARRAY[1..9] OF Integer;
Compass = (...);
CompletenessType = (...);
SpokesType = (...);
FullPtr = ˆFull;
FullHandle = ˆFullPtr;
GodPtr = ˆGod;
GodHandle = ˆGodPtr;
PartOfBox = (...);
LinPtr = ˆLin;
LinHandle = ˆLinPtr;
BaseHandle = ˆPtr;
PointArray = ARRAY[1..4] OF Point;
mode = (...);

Constants

GenesDlogID = 129;
SafetyValve = 20;
CarefulThreshold = 8192;
trickle = 10;
MutSizestart = 10;
iconhalfsize = 128;
ScrollBarWidth = 16;
TopBoxHeight = 10;
MaxGene9 = 12;
MaxAlbum = 100;
MaxBoxes = 100;
StackSize = 100;
GenesHeight = 20;
PicSizeMax = 4095;
WorryMax = 4095;
TickDelay = 20;
MutTypeNo = 7;
MenuCnt = 8;
ApplMenu = 1000;
FileMenu = 1001;
LoadAlbumItem = 1;
LoadFossilsItem = 2;
SaveBiomorphItem = 3;
SaveFossilsItem = 4;
SaveAlbumItem = 5;
CloseAlbumItem = 6;
QuitItem = 7;
EditMenu = 1002;
UndoItem = 1;
CutItem = 3;
Copyitem = 4;
PasteItem = 5;
ClearItem = 6;
HighlightBiomItem = 8;
AddBiomItem = 9;
ShowAlbumItem = 10;
ImportPICTItem = 11;
OperMenu = 1004;
BreedItem = 1;
DriftItem = 2;
EngineeringItem = 3;
HopeMonsterItem = 4;
InitFossRecItem = 5;
PlayFossilItem = 6;
RecordFossilItem = 7;
TriangleItem = 8;
ArrayItem = 9;
BoxMenu = 1005;
MoreRowsItem = 1;
FewerRowsItem = 2;
MoreColumnsItem = 3;
FewerColumnsItem = 4;
SideViewItem = 5;
DriftSweepItem = 6;
TriangleTopItem = 7;
TriangleLeftItem = 8;
TriangleRightItem = 9;
ViewPedigreeItem = 10;
AnimalsMenu = 1006;
CustomiseItem = 1;
SnailItem = 2;
TurritellaItem = 3;
BivalveItem = 4;
AmmoniteItem = 5;
NautilusItem = 6;
BrachiopodItem = 7;
ConeItem = 8;
WhelkItem = 9;
ScallopItem = 10;
EloiseItem = 11;
GallaghersItem = 12;
RapaItem = 13;
LightningItem = 14;
SundialItem = 15;
FigItem = 16;
TunItem = 17;
RazorShellItem = 18;
JapaneseWonderItem = 19;
PedigreeMenu = 1007;
DisplayPedigreeItem = 1;
DrawOutItem = 3;
NoMirrorsItem = 4;
SingleMirrorItem = 5;
DoubleMirrorItem = 6;
MoveItem = 8;
DetachItem = 9;
KillItem = 10;
HelpMenu = 3238;
HelpCurrentItem = 1;
HelpMiscItem = 2;
SpecMenu = 21537;
ClosePlaybackItem = 1;
BreedCurrentItem = 2;
QuitPlaybackItem = 3;
AM = 1;
FM = 2;
EM = 3;
OM = 4;
BM = 5;
MM = 6;
PM = 7;
HM = 8;
DMutsize = 0.01;
SMutSize = 0.1;
TMutSize = 0.1;
PSize = 1;
PascalKind = 32700;
MainID = 1000;
AboutID = 1000;
Text1ID = 1000;
Text2ID = 1001;
Text3ID = 1002;
Text4ID = 21950;
WarnDiscString = 22773;
SaveAlbumString = 4720;
SaveFossilString = 11609;
WarnIconString = 7852;
TooLargeString = 13603;
SaveBiomorphString = 3866;
kAlertStringsID = 128;
kFossilsID = 7;
kAlbumID = 8;
kBiomorphID = 9;
kQuittingID = 10;
kClosingID = 11;
kResettingID = 12;
PlusIconString = 4477;
AsString = 17474;
AlbumPageID = 5102;
ClipID = 2000;
Clip1ID = 2000;
Clip2ID = 2001;
Clip3ID = 2002;
leftCursID = 135;
leftCursor = 5;
rightCursID = 136;
rightCursor = 6;
UpCursId = 137;
UpCursor = 7;
DownCursID = 138;
DownCursor = 8;
EqCursID = 139;
EqCursor = 9;
InjectCursID = 140;
InjectCursor = 10;
QCursID = 141;
QCursor = 11;
BlackCursId = 142;
BlackCursor = 12;
BoxCursID = 143;
BoxCursor = 13;
RandCursID = 144;
RandCursor = 14;
BreedCursID = 145;
BreedCursor = 15;
HandCursID = 146;
HandCursor = 16;
DrawOutCursID = 147;
DrawOutCursor = 17;
ScissorCursId = 148;
ScissorCursor = 18;
GunCursID = 149;
GunCursor = 19;
LensCursID = 150;
LensCursor = 20;
BlankCursID = 151;
BlankCursor = 21;
BSize = 512;
BCount = 256;

Variables

OffCentre: point;
DontDraw: Boolean;
LighterFaster: Boolean;
SideView: Boolean;
MyPat: Pattern;
ShellColour: Pattern;
Finished: Boolean;
DotheSave: Boolean;
LoadingFossils: Boolean;
AlbumChanged: Boolean;
Danger: Boolean;
Pastable: Boolean;
Zoomed: Boolean;
theEvent: EventRecord;
TV: Integer;
TH: Integer;
FossilCounter: LongInt;
SizeWorry: integer;
theScale: real;
DragArea: Rect;
GrowArea: Rect;
ScreenArea: Rect;
CursList: CursorList;
theCursor: Cursor;
MenuList: ARRAY[1..MenuCnt] OF MenuHandle;
SpecialBreedMenu: MenuHandle;
MainPtr: WindowPtr;
MainRec: WindowRecord;
PlayBackPtr: WindowPtr;
PlayBackRecord: WindowRecord;
PlayBackRect: Rect;
MyControl: ControlHandle;
MainPeek: WindowPeek;
ScreenPort: GrafPtr;
frontw: WindowPtr;
AlbumBitMap: ARRAY[0..4] OF BitMap;
mybitmap: bitmap;
MugShot: bitmap;
Mirrorshot: bitmap;
OldBox: Integer;
k: Integer;
NumberInFile: Integer;
MyPenSize: Integer;
CurrentGeneratingCurve: Integer;
MLoc: Point;
MidScreen: Point;
hideInBackGround: Boolean;
WDetails: MarchingOrders;
DDetails: MarchingOrders;
TDetails: MarchingOrders;
DefaultVolume: Str255;
dirID: LongInt;
defaultDir: LongInt;
fileName: Str63;
volRefNum: Integer;
DefaultVolNum: Integer;
MaxPages: Integer;
Slides: Integer;
SizeOfPerson: LongInt;
LastPutFileName: Str255;
LastGetFileName: Str255;
FossilsToSave: Boolean;
FirstTime: Boolean;
ThereAreLines: Boolean;
SweepOn: Boolean;
AlbumEmpty: Boolean;
j: Integer;
NRows: Integer;
Ncols: Integer;
NBoxes: Integer;
NActiveBoxes: Integer;
MidBox: Integer;
special: Integer;
oldspecial: Integer;
width: Integer;
height: Integer;
AlbumNRows: Integer;
AlbumNCols: Integer;
BreedNRows: Integer;
BreedNCols: Integer;
BreedNBoxes: Integer;
RememberSpecial: integer;
margin: Rect;
DamageRect: Rect;
RectOfInterest: Rect;
PRect: Rect;
BusinessPart: Rect;
DummyRect: Rect;
child: ARRAY[1..MaxBoxes] OF person;
box: ARRAY[1..MaxBoxes] OF Rect;
centre: ARRAY[1..MaxBoxes] OF point;
TheMode: mode;
SaveMode: mode;
OldMode: mode;
RememberMode: mode;
GeneBox: ARRAY[1..16] OF Rect;
ClipBoarding: Boolean;
Fossilizing: Boolean;
naive: Boolean;
burst: Boolean;
WarningHasBeenGiven: Boolean;
Midline: Integer;
CurrentPage: Integer;
DelayedDrawing: Boolean;
ZeroMargin: Boolean;
DAon: Boolean;
BrokenOut: Boolean;
MyPic: Pic;
ThisPic: PicHandle;
Mut: ARRAY[1..MutTypeNo] OF Boolean;
DocumentMessage: Integer;
DocumentCount: Integer;
Rays: Integer;
Verdict: Integer;
Album: Menagerie;
ThisMenagerie: Menagerie;
NPages: Integer;
Morph: Integer;
Page: Integer;
BoxNo: Integer;
DriftOne: Integer;
GodCounter: Integer;
PBoxNo: ARRAY[1..4] OF Integer;
MyPicture: PicHandle;
StoreChild: ARRAY[1..MaxBoxes] OF Person;
SomethingToRestore: Boolean;
AlreadyTriangling: Boolean;
SpecialFull: FullHandle;
OldSpecialFull: FullHandle;
RunningFull: FullHandle;
ThatFull: FullHandle;
FullSize: Size;
Region2: RgnHandle;
DestRegion: RgnHandle;
SaveRegion: RgnHandle;
RootGod: GodHandle;
theGod: GodHandle;
SaveGod: GodHandle;
HitListHead: GodHandle;
firstBiomorph: Person;
theBiomorph: Person;
topan: Person;
leftan: Person;
rightan: Person;
copiedanimal: Person;
target: Person;
MidPoint: Point;
incy: real;
MutProb: real;
r1: real;
r2: real;
r3: real;
a: Point;
b: Point;
c: Point;
mous: Point;
LastMouse: Point;
NowMouse: Point;
AsymString: Str255;
BilatString: Str255;
SingleString: Str255;
UpDnString: Str255;
RadialString: Str255;
gSystem: tSystem;
inc: integer;
Threshold: integer;

Description

Types

CursorList = ARRAY[iBeamCursor..BlankCursor] OF CursHandle;
 
PtrInteger = ˆInteger;
 
PtrString = ˆstr255;
 
SwellType = (...);
 
Values
  • Swell:  
  • Same:  
  • Shrink:  
HorizPos = (...);
 
Values
  • LeftThird:  
  • MidThird:  
  • RightThird:  
VertPos = (...);
 
Values
  • TopRung:  
  • MidRung:  
  • BottomRung:  
SmallNumber = -1..1;
 
chromosome = ARRAY[1..9] OF Integer;
 
Compass = (...);
 
Values
  • NorthSouth:  
  • EastWest:  
CompletenessType = (...);
 
Values
  • Single:  
  • Ddouble:  
SpokesType = (...);
 
Values
  • NorthOnly:  
  • NSouth:  
  • Radial:  
FullPtr = ˆFull;
 
FullHandle = ˆFullPtr;
 
GodPtr = ˆGod;
 
GodHandle = ˆGodPtr;
 
PartOfBox = (...);
 
Values
  • MainPart:  
  • MovePart:  
  • GoAwayPart:  
  • AnyPart:  
LinPtr = ˆLin;
 
LinHandle = ˆLinPtr;
 
BaseHandle = ˆPtr;
 
PointArray = ARRAY[1..4] OF Point;
 
mode = (...);
 
Values
  • preliminary:  
  • breeding:  
  • albuming:  
  • phyloging:  
  • killing:  
  • moving:  
  • detaching:  
  • randoming:  
  • engineering:  
  • drifting:  
  • highlighting:  
  • PlayingBack:  
  • triangling:  
  • sweeping:  
  • arraying:  

Constants

GenesDlogID = 129;
 
SafetyValve = 20;
 
CarefulThreshold = 8192;
 
trickle = 10;
 
MutSizestart = 10;
 
iconhalfsize = 128;
 
ScrollBarWidth = 16;
 
TopBoxHeight = 10;
 
MaxGene9 = 12;
 
MaxAlbum = 100;
 
MaxBoxes = 100;

v1.1 was set to 15, but turbo version said 100

StackSize = 100;

v1.1 was set to 50

GenesHeight = 20;
 
PicSizeMax = 4095;
 
WorryMax = 4095;
 
TickDelay = 20;
 
MutTypeNo = 7;
 
MenuCnt = 8;

*** Menu Constants ***

ApplMenu = 1000;
 
FileMenu = 1001;
 
LoadAlbumItem = 1;
 
LoadFossilsItem = 2;

v1.1 added these menu item constants. Life is too hard without them

SaveBiomorphItem = 3;
 
SaveFossilsItem = 4;
 
SaveAlbumItem = 5;
 
CloseAlbumItem = 6;
 
QuitItem = 7;
 
EditMenu = 1002;
 
UndoItem = 1;
 
CutItem = 3;
 
Copyitem = 4;
 
PasteItem = 5;
 
ClearItem = 6;
 
HighlightBiomItem = 8;
 
AddBiomItem = 9;
 
ShowAlbumItem = 10;
 
ImportPICTItem = 11;
 
OperMenu = 1004;
 
BreedItem = 1;
 
DriftItem = 2;
 
EngineeringItem = 3;
 
HopeMonsterItem = 4;
 
InitFossRecItem = 5;
 
PlayFossilItem = 6;
 
RecordFossilItem = 7;
 
TriangleItem = 8;
 
ArrayItem = 9;
 
BoxMenu = 1005;
 
MoreRowsItem = 1;
 
FewerRowsItem = 2;
 
MoreColumnsItem = 3;
 
FewerColumnsItem = 4;
 
SideViewItem = 5;
 
DriftSweepItem = 6;
 
TriangleTopItem = 7;
 
TriangleLeftItem = 8;
 
TriangleRightItem = 9;
 
ViewPedigreeItem = 10;
 
AnimalsMenu = 1006;
 
CustomiseItem = 1;
 
SnailItem = 2;
 
TurritellaItem = 3;
 
BivalveItem = 4;
 
AmmoniteItem = 5;
 
NautilusItem = 6;
 
BrachiopodItem = 7;
 
ConeItem = 8;
 
WhelkItem = 9;
 
ScallopItem = 10;
 
EloiseItem = 11;
 
GallaghersItem = 12;
 
RapaItem = 13;
 
LightningItem = 14;
 
SundialItem = 15;
 
FigItem = 16;
 
TunItem = 17;
 
RazorShellItem = 18;
 
JapaneseWonderItem = 19;
 
PedigreeMenu = 1007;
 
DisplayPedigreeItem = 1;
 
DrawOutItem = 3;
 
NoMirrorsItem = 4;
 
SingleMirrorItem = 5;
 
DoubleMirrorItem = 6;
 
MoveItem = 8;
 
DetachItem = 9;
 
KillItem = 10;
 
HelpMenu = 3238;
 
HelpCurrentItem = 1;
 
HelpMiscItem = 2;
 
SpecMenu = 21537;
 
ClosePlaybackItem = 1;
 
BreedCurrentItem = 2;
 
QuitPlaybackItem = 3;
 
AM = 1;
 
FM = 2;

index into MenuList for Apple Menu

EM = 3;

ditto for File Menu

OM = 4;
 
BM = 5;

ditto for Operation Menu

MM = 6;

ditto for Boxes Menu

PM = 7;

ditto for Mutations Menu

HM = 8;

ditto for Pedigree Menu

DMutsize = 0.01;

W for Window Menu

SMutSize = 0.1;
 
TMutSize = 0.1;
 
PSize = 1;
 
PascalKind = 32700;
 
MainID = 1000;

windowKind of pascal windows

AboutID = 1000;

resource ID for MainWindow

Text1ID = 1000;

resource ID for dialog box

Text2ID = 1001;

resource IDs for 'About...' text

Text3ID = 1002;
 
Text4ID = 21950;
 
WarnDiscString = 22773;
 
SaveAlbumString = 4720;
 
SaveFossilString = 11609;
 
WarnIconString = 7852;
 
TooLargeString = 13603;
 
SaveBiomorphString = 3866;
 
kAlertStringsID = 128;

new STR# IDs for alerts - v1.1

kFossilsID = 7;
 
kAlbumID = 8;
 
kBiomorphID = 9;
 
kQuittingID = 10;
 
kClosingID = 11;
 
kResettingID = 12;
 
PlusIconString = 4477;
 
AsString = 17474;
 
AlbumPageID = 5102;
 
ClipID = 2000;
 
Clip1ID = 2000;
 
Clip2ID = 2001;
 
Clip3ID = 2002;
 
leftCursID = 135;

CURSORS > made these contiguous numbers so that they can be read in a loop and checked - Alun

leftCursor = 5;
 
rightCursID = 136;
 
rightCursor = 6;
 
UpCursId = 137;
 
UpCursor = 7;
 
DownCursID = 138;
 
DownCursor = 8;
 
EqCursID = 139;
 
EqCursor = 9;
 
InjectCursID = 140;
 
InjectCursor = 10;
 
QCursID = 141;
 
QCursor = 11;
 
BlackCursId = 142;
 
BlackCursor = 12;
 
BoxCursID = 143;
 
BoxCursor = 13;
 
RandCursID = 144;
 
RandCursor = 14;
 
BreedCursID = 145;
 
BreedCursor = 15;
 
HandCursID = 146;
 
HandCursor = 16;
 
DrawOutCursID = 147;
 
DrawOutCursor = 17;
 
ScissorCursId = 148;
 
ScissorCursor = 18;
 
GunCursID = 149;
 
GunCursor = 19;
 
LensCursID = 150;
 
LensCursor = 20;
 
BlankCursID = 151;
 
BlankCursor = 21;
 
BSize = 512;
 
BCount = 256;
 

Variables

OffCentre: point;
 
DontDraw: Boolean;
 
LighterFaster: Boolean;
 
SideView: Boolean;
 
MyPat: Pattern;
 
ShellColour: Pattern;
 
Finished: Boolean;
 
DotheSave: Boolean;
 
LoadingFossils: Boolean;
 
AlbumChanged: Boolean;
 
Danger: Boolean;
 
Pastable: Boolean;
 
Zoomed: Boolean;
 
theEvent: EventRecord;
 
TV: Integer;

event passed from operating system

TH: Integer;

event passed from operating system

FossilCounter: LongInt;

location of text

SizeWorry: integer;
 
theScale: real;
 
DragArea: Rect;

******** Screen stuff ************

GrowArea: Rect;

defines area where window can be dragged in

ScreenArea: Rect;

defines area to which a window's size can change

CursList: CursorList;

defines screen dimensions

theCursor: Cursor;

used to hold cursor handles

MenuList: ARRAY[1..MenuCnt] OF MenuHandle;

******** Menu stuff ***************

SpecialBreedMenu: MenuHandle;

holds menu info

MainPtr: WindowPtr;

******** Window stuff ***************

MainRec: WindowRecord;

pointer to main window

PlayBackPtr: WindowPtr;

holds data for main window

PlayBackRecord: WindowRecord;
 
PlayBackRect: Rect;
 
MyControl: ControlHandle;
 
MainPeek: WindowPeek;
 
ScreenPort: GrafPtr;

pointer to MainRec

frontw: WindowPtr;

pointer to entire screen

AlbumBitMap: ARRAY[0..4] OF BitMap;

pointer to active window

mybitmap: bitmap;
 
MugShot: bitmap;
 
Mirrorshot: bitmap;
 
OldBox: Integer;
 
k: Integer;
 
NumberInFile: Integer;
 
MyPenSize: Integer;
 
CurrentGeneratingCurve: Integer;
 
MLoc: Point;
 
MidScreen: Point;
 
hideInBackGround: Boolean;
 
WDetails: MarchingOrders;

added v1.1 if TRUE hide our windows when switched out. Toggled by menu

DDetails: MarchingOrders;

added v1.1 if TRUE hide our windows when switched out. Toggled by menu

TDetails: MarchingOrders;

added v1.1 if TRUE hide our windows when switched out. Toggled by menu

DefaultVolume: Str255;

******** File Stuff **********

dirID: LongInt;

name of disk we are running on

defaultDir: LongInt;

name of disk we are running on

fileName: Str63;

Folder ID for fossil file and app

volRefNum: Integer;

name of fossil file, normally 'Fossil History'

DefaultVolNum: Integer;

name of fossil file, normally 'Fossil History'

MaxPages: Integer;

name of fossil file, normally 'Fossil History'

Slides: Integer;

volRefNum is volume containing fossil file, DefaultVolNum contains app

SizeOfPerson: LongInt;

fileNum of fossil file

LastPutFileName: Str255;

Record size for saving to files.

LastGetFileName: Str255;

Record size for saving to files.

FossilsToSave: Boolean;
 
FirstTime: Boolean;
 
ThereAreLines: Boolean;
 
SweepOn: Boolean;
 
AlbumEmpty: Boolean;
 
j: Integer;
 
NRows: Integer;
 
Ncols: Integer;
 
NBoxes: Integer;
 
NActiveBoxes: Integer;
 
MidBox: Integer;
 
special: Integer;
 
oldspecial: Integer;
 
width: Integer;
 
height: Integer;
 
AlbumNRows: Integer;
 
AlbumNCols: Integer;
 
BreedNRows: Integer;
 
BreedNCols: Integer;
 
BreedNBoxes: Integer;
 
RememberSpecial: integer;
 
margin: Rect;
 
DamageRect: Rect;
 
RectOfInterest: Rect;
 
PRect: Rect;
 
BusinessPart: Rect;
 
DummyRect: Rect;
 
child: ARRAY[1..MaxBoxes] OF person;
 
box: ARRAY[1..MaxBoxes] OF Rect;
 
centre: ARRAY[1..MaxBoxes] OF point;
 
TheMode: mode;
 
SaveMode: mode;
 
OldMode: mode;
 
RememberMode: mode;
 
GeneBox: ARRAY[1..16] OF Rect;
 
ClipBoarding: Boolean;
 
Fossilizing: Boolean;
 
naive: Boolean;
 
burst: Boolean;
 
WarningHasBeenGiven: Boolean;
 
Midline: Integer;
 
CurrentPage: Integer;
 
DelayedDrawing: Boolean;
 
ZeroMargin: Boolean;
 
DAon: Boolean;
 
BrokenOut: Boolean;
 
MyPic: Pic;
 
ThisPic: PicHandle;
 
Mut: ARRAY[1..MutTypeNo] OF Boolean;
 
DocumentMessage: Integer;
 
DocumentCount: Integer;
 
Rays: Integer;
 
Verdict: Integer;
 
Album: Menagerie;
 
ThisMenagerie: Menagerie;
 
NPages: Integer;
 
Morph: Integer;
 
Page: Integer;
 
BoxNo: Integer;
 
DriftOne: Integer;
 
GodCounter: Integer;
 
PBoxNo: ARRAY[1..4] OF Integer;
 
MyPicture: PicHandle;
 
StoreChild: ARRAY[1..MaxBoxes] OF Person;
 
SomethingToRestore: Boolean;
 
AlreadyTriangling: Boolean;
 
SpecialFull: FullHandle;
 
OldSpecialFull: FullHandle;
 
RunningFull: FullHandle;
 
ThatFull: FullHandle;
 
FullSize: Size;
 
Region2: RgnHandle;
 
DestRegion: RgnHandle;
 
SaveRegion: RgnHandle;
 
RootGod: GodHandle;
 
theGod: GodHandle;
 
SaveGod: GodHandle;
 
HitListHead: GodHandle;
 
firstBiomorph: Person;
 
theBiomorph: Person;
 
topan: Person;
 
leftan: Person;
 
rightan: Person;
 
copiedanimal: Person;
 
target: Person;
 
MidPoint: Point;
 
incy: real;
 
MutProb: real;
 
r1: real;
 
r2: real;
 
r3: real;
 
a: Point;
 
b: Point;
 
c: Point;
 
mous: Point;
 
LastMouse: Point;
 
NowMouse: Point;
 
AsymString: Str255;
 
BilatString: Str255;
 
SingleString: Str255;
 
UpDnString: Str255;
 
RadialString: Str255;
 
gSystem: tSystem;
 
inc: integer;

v1.1 A record of info on the capabilities of the current system

Threshold: integer;

v1.1 A record of info on the capabilities of the current system


Generated by PasDoc 0.14.0.