1 (* Copyright (C) 2005-2024 Free Software Foundation, Inc. *)
2 (* This file is part of GNU Modula-2.
4 GNU Modula-2 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
9 GNU Modula-2 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
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 RoomMap ;
24 System : LOGITECH MODULA-2/86
25 Description: Generates rooms from a list of boxes.
28 EXPORT QUALIFIED MaxNoOfRooms,
33 Treasure, TreasureInfo, Door, Line,
37 MaxNoOfRooms = 350 ; (* An upper limit *)
38 WallsPerRoom = 8 ; (* An upper limit *)
39 DoorsPerRoom = 6 ; (* An upper limit *)
40 MaxNoOfTreasures = 15 ; (* An upper limit *)
50 DoorStatus = (Open, Closed, Secret) ;
54 StateOfDoor : DoorStatus ;
63 TreasureName : ARRAY [0..12] OF CHAR
68 NoOfWalls : CARDINAL ;
69 NoOfDoors : CARDINAL ;
70 Walls : ARRAY [1..WallsPerRoom] OF Line ;
71 Doors : ARRAY [1..DoorsPerRoom] OF Door ;
72 (* Treasures : BITSET ; *)
78 NoOfRooms : CARDINAL ;
79 Treasure : ARRAY [1..MaxNoOfTreasures] OF TreasureInfo ;
80 Rooms : ARRAY [1..MaxNoOfRooms] OF Room ;
84 CreateRoomMap - creates rooms from a list of boxes in BoxMap.
87 PROCEDURE CreateRoomMap ;