| 1 |
(* Copyright (C) 2005-2025 Free Software Foundation, Inc. *) |
| 2 |
(* This file is part of Chisel. |
| 3 |
|
| 4 |
Chisel is free software; you can redistribute it and/or modify it under |
| 5 |
the terms of the GNU General Public License as published by the Free |
| 6 |
Software Foundation; either version 3, or (at your option) any later |
| 7 |
version. |
| 8 |
|
| 9 |
Chisel is distributed in the hope that it will be useful, but WITHOUT ANY |
| 10 |
WARRANTY; without even the implied warranty of MERCHANTABILITY or |
| 11 |
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
| 12 |
for more details. |
| 13 |
|
| 14 |
You should have received a copy of the GNU General Public License along |
| 15 |
with gm2; see the file COPYING. If not, write to the Free Software |
| 16 |
Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *) |
| 17 |
DEFINITION MODULE MakeBoxes ; |
| 18 |
|
| 19 |
(* |
| 20 |
Title : MakeBoxes |
| 21 |
Author : Gaius Mulley |
| 22 |
Date : 15/7/88 |
| 23 |
LastEdit : 15/7/88 |
| 24 |
System : LOGITECH MODULA-2/86 |
| 25 |
Description: Provides a list of all possible box sizes. |
| 26 |
Any number of unique boxes may be requested and deleted. |
| 27 |
*) |
| 28 |
|
| 29 |
EXPORT QUALIFIED InitBoxes, KillBoxes, |
| 30 |
AddBoxes, GetAndDeleteRandomBox ; |
| 31 |
|
| 32 |
|
| 33 |
(* |
| 34 |
InitBoxes - Initializes a list of boxes. |
| 35 |
An index to this box list is returned. |
| 36 |
*) |
| 37 |
|
| 38 |
PROCEDURE InitBoxes () : CARDINAL ; |
| 39 |
|
| 40 |
|
| 41 |
(* |
| 42 |
KillBoxes - Kills a complete box list. |
| 43 |
*) |
| 44 |
|
| 45 |
PROCEDURE KillBoxes (BoxListIndex: CARDINAL) ; |
| 46 |
|
| 47 |
|
| 48 |
(* |
| 49 |
AddBoxes - Adds a list of boxes MinX..MaxX, MinY..MaxY |
| 50 |
to a box list BoxListIndex. |
| 51 |
*) |
| 52 |
|
| 53 |
PROCEDURE AddBoxes (BoxListIndex: CARDINAL; |
| 54 |
MinX, MinY, MaxX, MaxY: CARDINAL) ; |
| 55 |
|
| 56 |
|
| 57 |
(* |
| 58 |
GetAndDeleteRandomBox - Returns a random box from the box list and |
| 59 |
this box is then deleted from the list. |
| 60 |
*) |
| 61 |
|
| 62 |
PROCEDURE GetAndDeleteRandomBox (BoxListIndex: CARDINAL; |
| 63 |
VAR SizeX, SizeY: CARDINAL) ; |
| 64 |
|
| 65 |
|
| 66 |
END MakeBoxes. |