#!/usr/bin/perl -w

# (c) Copyright by Tels 1999-2000. All Rights Reserved.
# file to be called via "perl vtutorial.pl 5"

sub createWorld
  {
  my ($txt,$gf) = @_; # get texture mapping and gamfile as params
  print "Tutorial Section 5\n\n";

  $room = { texture => $txt->texture("wood"), 
            floortexture => $txt->texture('brick'),
            ceilingtexture => $txt->texture('rufgry'),
    };                                                     

  $mydoor = { framethick => 0.25, texture => $txt->texture('wdplank'),
              floortexture => $txt->texture('rooftile'),
              width => 4, height => 8, };                  # line 1

  $room1 = cell ( name => "Room 1", size => 16 );          
  $room2 = cell ( name => "Room 2", size => 16, 
    things => [ openDoor ( aNorth(), $mydoor ), ] );       # line 2

  $lower = cell ( name => "lower part", size => 16, 
   div => inY(),                                           
   cells => [ $room2, emptyCell (16), ], );                

  $world = cell ( name => "Hello World", room => $room, 
    div => inX(),                                          
    cells => [ $room1, $lower, ]);                         

  $world->{debug} = 1;
  $bunch = worldAsBunch ( 0, 0, 0, 32, 32, 16, $world );   

  return $bunch;
  }

# EOF
1;

