1 (* Copyright (C) 2005, 2006, 2007, 2008, 2009, 2010
2 Free Software Foundation, Inc. *)
3 (* This file is part of Chisel.
5 Chisel is free software; you can redistribute it and/or modify it under
6 the terms of the GNU General Public License as published by the Free
7 Software Foundation; either version 3, or (at your option) any later
10 Chisel is distributed in the hope that it will be useful, but WITHOUT ANY
11 WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
15 You should have received a copy of the GNU General Public License along
16 with gm2; see the file COPYING. If not, write to the Free Software
17 Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. *)
18 DEFINITION MODULE MakeBoxes ;
25 System : LOGITECH MODULA-2/86
26 Description: Provides a list of all possible box sizes.
27 Any number of unique boxes may be requested and deleted.
30 EXPORT QUALIFIED InitBoxes, KillBoxes,
31 AddBoxes, GetAndDeleteRandomBox ;
35 InitBoxes - Initializes a list of boxes.
36 An index to this box list is returned.
39 PROCEDURE InitBoxes () : CARDINAL ;
43 KillBoxes - Kills a complete box list.
46 PROCEDURE KillBoxes (BoxListIndex: CARDINAL) ;
50 AddBoxes - Adds a list of boxes MinX..MaxX, MinY..MaxY
51 to a box list BoxListIndex.
54 PROCEDURE AddBoxes (BoxListIndex: CARDINAL;
55 MinX, MinY, MaxX, MaxY: CARDINAL) ;
59 GetAndDeleteRandomBox - Returns a random box from the box list and
60 this box is then deleted from the list.
63 PROCEDURE GetAndDeleteRandomBox (BoxListIndex: CARDINAL;
64 VAR SizeX, SizeY: CARDINAL) ;