Debian Codegraph @

gcc/testsuite/gm2/projects/pim/run/pass/random/RoomMap.def

raw
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
18 DEFINITION MODULE RoomMap ;
19
20 (*
21 Title : RoomMap
22 Author : Gaius Mulley
23 Date : 20/8/88
24 LastEdit : 20/8/88
25 System : LOGITECH MODULA-2/86
26 Description: Generates rooms from a list of boxes.
27 *)
28
29 EXPORT QUALIFIED MaxNoOfRooms,
30 MaxNoOfTreasures,
31 GenNoOfRooms,
32 Rooms,
33 DoorStatus,
34 Treasure, TreasureInfo, Door, Line,
35 CreateRoomMap ;
36
37 CONST
38 MaxNoOfRooms = 350 ;
39 MaxWallsPerRoom = 8 ;
40 MaxDoorsPerRoom = 6 ;
41 MaxNoOfTreasures = 15 ;
42
43 TYPE
44 Line = RECORD
45 X1 : CARDINAL ;
46 Y1 : CARDINAL ;
47 X2 : CARDINAL ;
48 Y2 : CARDINAL
49 END ;
50
51 DoorStatus = (Open, Closed, Secret) ;
52
53 Door = RECORD
54 Position : Line ;
55 StateOfDoor : DoorStatus ;
56 LeadsTo : CARDINAL
57 END ;
58
59 Room = RECORD
60 RoomNo : CARDINAL ;
61 NoOfWalls : CARDINAL ;
62 NoOfDoors : CARDINAL ;
63 Walls : ARRAY [1..MaxWallsPerRoom] OF Line ;
64 Doors : ARRAY [1..MaxDoorsPerRoom] OF Door ;
65 (* Treasures : BITSET ; *)
66 END ;
67
68 TreasureInfo = RECORD
69 Xpos : CARDINAL ;
70 Ypos : CARDINAL ;
71 Rm : CARDINAL ;
72 Tweight : CARDINAL ;
73 TreasureName : ARRAY [0..12] OF CHAR
74 END ;
75
76
77 VAR
78 GenNoOfRooms : CARDINAL ;
79 Rooms : ARRAY [1..MaxNoOfRooms] OF Room ;
80 Treasure : ARRAY [1..MaxNoOfTreasures] OF TreasureInfo ;
81
82
83 (*
84 CreateRoomMap - creates rooms from a list of boxes in BoxMap.
85 *)
86
87 PROCEDURE CreateRoomMap ;
88
89
90 END RoomMap.