Debian Codegraph @

gcc/testsuite/gm2/pim/pass/multtypes.mod

raw
1 (* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc. *)
2 (* This file is part of GNU Modula-2.
3
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 2, or (at your option) any later
7 version.
8
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
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 MODULE multtypes ;
19
20
21 CONST
22 MaxNoOfRooms = 350 ; (* An upper limit *)
23 WallsPerRoom = 8 ; (* An upper limit *)
24 DoorsPerRoom = 6 ; (* An upper limit *)
25 MaxNoOfTreasures = 15 ; (* An upper limit *)
26
27 TYPE
28 Line = RECORD
29 X1 : CARDINAL ;
30 Y1 : CARDINAL ;
31 X2 : CARDINAL ;
32 Y2 : CARDINAL
33 END ;
34
35 DoorStatus = (Open, Closed, Secret) ;
36
37 Door = RECORD
38 Position : Line ;
39 StateOfDoor : DoorStatus ;
40 LeadsTo : CARDINAL
41 END ;
42
43 TreasureInfo = RECORD
44 Xpos : CARDINAL ;
45 Ypos : CARDINAL ;
46 Rm : CARDINAL ;
47 Tweight : CARDINAL ;
48 TreasureName : ARRAY [0..12] OF CHAR
49 END ;
50
51 Room = RECORD
52 RoomNo : CARDINAL ;
53 NoOfWalls : CARDINAL ;
54 NoOfDoors : CARDINAL ;
55 Walls : ARRAY [1..WallsPerRoom] OF Line ;
56 Doors : ARRAY [1..DoorsPerRoom] OF Door ;
57 (* Treasures : BITSET ; *)
58 END ;
59
60
61
62 VAR
63 NoOfRooms : CARDINAL ;
64 Treasure : ARRAY [1..MaxNoOfTreasures] OF TreasureInfo ;
65 Rooms : ARRAY [1..MaxNoOfRooms] OF Room ;
66
67 BEGIN
68 END multtypes.