home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / Pascal / Snippets / TruchetTiles / Globs.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-08-09  |  2.2 KB  |  85 lines  |  [TEXT/PJMM]

  1. unit globs;
  2. interface
  3.     uses
  4.         PrintTraps, Quickdraw, Picker, Palettes;
  5.  
  6.  
  7. {=======================================================================================    }
  8.     const
  9.         MainWindID = 1000;
  10.  
  11.         AppleMenuID = 1001;
  12.         MenuAbout = 1;
  13.  
  14.         FileMenuID = 1002;
  15.         MenuQuit = 1;
  16.  
  17.         EditMenuID = 1003;
  18.         MenuUndo = 1;
  19.         MenuCut = 3;
  20.         MenuCopy = 4;
  21.         MenuPaste = 5;
  22.         MenuClear = 6;
  23.  
  24.         TileMenuID = 1004;
  25.         MenuDrawEm = 1;
  26.         MenuPrefs = 3;
  27.  
  28.         k_SaveAlrtID = 1001;
  29.         k_ynALRTID = 1006;                {    Yes No type alert                }
  30.         k_yncALRTID = 1007;            {    Yes, No, Cancel type alert    }
  31.  
  32. {•    Low-memory globals:•}
  33.         ROM85 = $28E;
  34.         MBarHeight = $BAA;
  35.  
  36.     type
  37.         TileStyleType = (Arcs, Lines);
  38.  
  39.         GlobalDataRec = record
  40.                 Quitting: boolean;                {    user selected Quit            }
  41.                 Finished: boolean;            {    pgm finished Quit Clean-Up    }
  42.                 Done: boolean;                {    shut down FrameWork        }
  43.                 ErrorFlag: boolean;            {    global error flag                }
  44.                 MenuHeight: integer;            {    menu bar height                }
  45.                 ScreenRect: Rect;            {    screen minus menu bar        }
  46.                 GrowRect: Rect;                {    for GrowWindow                }
  47.                 DragRect: Rect;                {    for DragWindow                }
  48.                 GrowIconRect: Rect;            {    a pseudo grow-icon            }
  49.                 HasColorQD: boolean;        {    can we use color?            }
  50.                 HasCoProcessor: boolean;    {    are we fast?                    }
  51.                 showGroBox: boolean;        {    make grow box (in)visible    }
  52.                 seedRand: longInt;            {    save randSeed                }
  53.                 TileStyle: TileStyleType;    {    what style to use                }
  54.                 TileSize: integer;                {    length of side of a tile        }
  55.                 InvertRendering: boolean;    {    shall we invert?                }
  56.                 showTileBounds: boolean;    {    show tiles' bounding rect    }
  57.                 randomness: integer;        {    degree of randomness        }
  58.             end;
  59.         GlobalDataPtr = ^GlobalDataRec;
  60.         GlobalDataHDL = ^GlobalDataPtr;
  61.  
  62.     var
  63.         anInt: integer;        {global garbage variables…}
  64.         aLong: longInt;
  65.         aReal: real;
  66.         aChar: char;
  67.         aStr: str255;
  68.         aHdl: handle;
  69.         aRect: rect;
  70.  
  71.         gdh: GlobalDataHDL;                    {    our GlobalDataHandle        }
  72.  
  73.         MainWindPtr: WindowPtr;
  74.         mainWindowStorage: WindowRecord;
  75. {•  mainWindPalette: PaletteHandle;  we're not using color in the pgm…}
  76.  
  77.         myMenus: array[AppleMenuID..TileMenuID] of MenuHandle; {all of the menus}
  78.  
  79.         gIBeam: CursHandle;
  80.         gWatch: CursHandle;
  81.         gCrossHairs: CursHandle;
  82.  
  83.         MainEvent: EventRecord;
  84. implementation
  85. end.            {globs Unit}