Listing: JamPaint.p
Program JamPaint;
{*************************************************
JamPaint -- the Network Paint Application
*************************************************
Copyright 1988 by Edgar Circenis and Rod Magnuson
All Rights Reserved
*************************************************
Started: 12/26/87 Revision: 5/21/88
*************************************************
Problem areas:
- Do we need to worry about nets as well as nodes?
- How big should PQ be?
- VBLTasks cannot move memory.
- Change xEnqueue and xDequeue to access PQ directly.
- What causes initial LAPWrite error @70 (err = -95)???
- NOTE: if we end up using polling, a queue will be unnecessary.
- use VAR parameters where it will speed things up.
*************************************************}
USES
{$LOAD MacDump}
Memtypes,Quickdraw,OSIntf,ToolIntf,PackIntf,PickerIntf,
Script,
{$LOAD AppleTalkDump}
AppleTalk,
{$LOAD MacPrintDump}
PrintTraps;
CONST
lastMenu = 7;
maxUsers = 8; { User Table size }
OurType = 39; { a random LAP protocol type }
listSize = 550; { incoming packet queue size }
VBLcnt = 2; { myTask.vblCount }
connect = false;
spray = true;
idleTime = 60*60*5; { five minute idle time }
eraseCursor = 128;
splatCursor = 8088; { splatter cursor ID }
{ ---- TOOLS ---- }
Tnone = 0; { no tool, or special tool }
Tspray = 1; { not really a tool! }
TLetters = 2; { letter tool }
Tbrush = 3; { paint brush }
Terase = 4; { eraser }
TRect = 5; { Rectangle }
TFrect = 6; { Filled Rectangle }
TOval = 7; { Oval }
TFOval = 8; { Filled Oval }
TSplatter= 9; { Splatter Tool }
TDisk = 10; { Disk Access }
Tpat = 11; { not a tool }
Tcolor = 12; { not a tool }
{ ---- DEFAULTS ---- }
dSize = 12;
dStyle = [];
dPen = 1; { 1 x 1 pen }
dColor = 1; { black }
dTool = Tbrush;
dMode = connect;
dsplatterCount = 30; { * default spatter speed * }
dsplatRad = 20; { * default splatter radius * }
{ **** make a decision about this and delete it **** }