home *** CD-ROM | disk | FTP | other *** search
Text File | 1997-04-16 | 893 b | 55 lines | [TEXT/CWIE] |
- Unit Toolbox;
-
- Interface
-
- Uses
- Windows, Fonts, Dialogs, Processes, ToolUtils, Devices, Resources, Sound,
- Icons, Lists, StandardFile, Folders, QDOffscreen, AppleEvents, SegLoad,
- Aliases, GestaltEqu, Controls;
-
- Type
- str3 = string[3];
- str4 = string[4];
- str5 = string[5];
- str6 = string[6];
- str7 = string[7];
- str8 = string[8];
-
- Procedure InitToolbox;
- Procedure Wait(ticks: longint);
- Function GetRandom(n: integer): integer;
-
- Implementation
-
- Procedure Wait(ticks: longint);
-
- Var
- start: longint;
-
- begin
- start := TickCount;
- while TickCount < start + ticks do;
- end;
-
- Procedure InitToolbox;
-
- begin
- InitGraf(@qd.thePort);
- InitFonts;
- InitWindows;
- InitMenus;
- TEInit;
- InitDialogs(NIL);
- InitCursor;
- MaxApplZone;
- MoreMasters;
- GetDateTime(qd.RandSeed);
- end;
-
- Function GetRandom(n: integer): integer;
-
- begin
- GetRandom := 1 + trunc(unsignedLong(random)/65535 * n);
- end;
-
- End.