! Copyright by Rick Dague, [email protected]
!
! CMAP.INF by Rick Dague
!
! This is an Inform 6 game which shows the use of CMAP.H, a header file one
! can use to create game maps. I put a previous version on my web site last
! week; CMAP.H is similar, but a bit neater.
!
! Hopefully, you'll notice that I made a 21-room game with only a 79-line
! source file, and find this interesting. :)
!
constant story "STORY";
constant headline "^";
include "parser.h";
include "verblib.h";

constant cmap_alloc 20;
include "cmap.h";

array cmap_ns -->
       "Marengo"
       "Stratton"
       "Skillen"
       "Garfield"
       "Euclid"
       "Los Robles"
;

array cmap_ew -->
       "Walnut"
       "Ramona"
       "Holly"
       "Union"
       "Colorado"
;

array cmap ->
       51 1 4 5 6
       52 1 4 5
       53 1 4
       54 1 2 3 4 5 6
       sdead 2 3
       55 1 4 5 6
endcmap;

!       +--------+--+--+
!       |        |  |  |
!       +--------+--+  |
!       |        |  |  |
!       +--------+  |  |
!       |        |  |  |
!       +--+--+--+--+--+
!       |  |  |  |  |  |
!       |  +  +  |  |  |
!       |        |  |  |
!       +--------+--+--+

corner PostOffice
with
       short_name "Post Office",
       description [ ;
               print "By the steps of the central Pasadena post office. ";
               cmap_prexits();
       ],
has;

object hammer "hammer"
with
       name "hammer",
has;

[ initialise;
       cmap_check();
       cmap_static(PostOffice,24);
       cmap_create();
       move hammer to cmap_find(2);
       cmapi = 1; location = cmap_find();
       give player light;
];

include "grammar.h";