/*
 * 3d world consisting of 5 rooms interconnected by portals.
 * This file contains the main room where players start the
 * game, consisting of 3 interconnected platforms.
 * All distances in millimetres.
 */

max_y -20; /* If player falls below this height, he's dead */

/* Light sources */
light 50000 -50000 -20000  0.65;
light -70000 -20000 10000  0.35;

points "archpoints"
    -180 75 -75   -200 -75 -75	 200 -75 -75
    180 75 -75	 -180 75 75   -200 -75 75
    200 -75 75	 180 75 75;

surfaces "archsurf"
    4  0 1 2 3
    4  7 6 5 4
    4  5 6 2 1
    4  0 3 7 4;

points "arch2points"
    -160 -50 -75   -140 -200 -75   160 200 -75
    10 240 -75	 -160 -50 75   -140 -200 75
    160 200 75	 10 240 75;

object "_arch2" "arch2points" "archsurf"
    NO_MATRIX_MULT
    centre 340 125 0;

object "_arch3" "arch2points" "archsurf"
    centre -340 125 0
    scale -1.0 1.0 -1.0;

points "arch4points"
    -75 -260 -75   75 -300 -75
    75 300 -75	 -75 300 -75   -75 -260 75
    75 -300 75	 75 300 75 -75 300 75;

object "_arch4" "arch4points" "archsurf"
    NO_MATRIX_MULT
    centre 425 625 0;

object "_arch5" "arch4points" "archsurf"
    centre -425 625 0
    scale -1.0 1.0 -1.0;

object "arch" "archpoints" "archsurf"
    scale 5.0 5.0 5.0
    colour "blue" 1.0
    child "_arch2"
    child "_arch3"
    child "_arch4"
    child "_arch5";


object "tree_leaves" "ftpoints" "ftsurf"
    scale 3.0 3.0 3.0
    centre 0 -3500 0
    colour "green" 1.0;

object "tree" "trunkpoints" "bottomandtopless_cubesurf"
    maxdist 20000
    NO_MATRIX_MULT
    colour "brown" 0.7
    child "tree_leaves";


object "ramp" "ramppoints" "squaresurf"
    colour "white" 0.4
    ALWAYS_VISIBLE
    scale 1.0 2.5 10.0;


object "_tee2" "xwallpoints" "squaresurf"
    ALWAYS_VISIBLE
    NO_MATRIX_MULT
    centre 0 0 500;

object "tee" "zwallpoints" "squaresurf"  /* T-shaped enclosure */
    colour "metallic" 0.5
    ALWAYS_VISIBLE
    scale 4.0 4.0 8.0
    child "_tee2";


object "_corner2" "xwallpoints" "squaresurf"
    ALWAYS_VISIBLE
    NO_MATRIX_MULT
    centre -500 0 500;

object "corner" "zwallpoints" "squaresurf"  /* corner enclosure */
    colour "violet" 1.0
    ALWAYS_VISIBLE
    scale 4.0 4.0 4.0
    child "_corner2";


object "arch1"
    inherit "arch"
    centre 0 -4625 10000;

object "arch2"
    inherit "arch"
    centre 0 -4625 -10000;

points "worldpoints"
    20000 0 -20000   -20000 0 -20000   -20000 0 20000	20000 0 20000;


object "platform1" "squarepoints" "squaresurf"
    scale 25.0 1.0 25.0
    ALWAYS_VISIBLE
    colour "brown" 0.9
    centre 0 -2500 34500;

object "platform2" "squarepoints" "squaresurf"
    inherit "platform1"
    centre 0 -2500 -34500;

object "corner1"
    inherit "corner"
    centre -8000 -2000 1000;

object "corner2"
    inherit "corner"
    rotate_y 180.0
    centre 8000 -2000 -1000;

object "tee1"
    inherit "tee"
    rotate_y 180.0
    centre 0 -4500 -25000;

object "tree1"
    inherit "tree"
    centre 0 -4500 39000;

object "tree2"
    inherit "tree"
    centre 0 -4500 -39000;

object "ramp1"
    inherit "ramp"
    centre 0 0 12000;

object "ramp2"
    inherit "ramp"
    centre 0 0 -12000
    rotate_y 180.0;

object "building1" "cubepoints" "bottomandtopless_cubesurf"
    colour "metallic" 0.6
    scale 6.0 4.0 8.0
    centre 0 -4500 30000;


object "portal1"
    inherit "x_portal"
    portal "room2" 8000 -2500 9000
    centre -12300 -4500 39000;

object "portal2"
    inherit "x_portal"
    portal "room3" -8000 -2500 9000
    centre 12300 -4500 39000;

object "portal3"
    inherit "x_portal"
    portal "room4" 8000 -2500 -9000
    centre -12300 -4500 -39000;

object "portal4"
    inherit "x_portal"
    portal "room5" -8000 -2500 -9000
    centre 12300 -4500 -39000;


object "The world" "worldpoints" "squaresurf"  /* Top level object */
    colour "white" 0.7
    DRAW_FIRST
    ALWAYS_VISIBLE
    NO_MATRIX_MULT
    child "tree1"
    child "tree2"
    child "ramp1"
    child "ramp2"
    child "platform1"
    child "platform2"
    child "corner1"
    child "corner2"
    child "tee1"
    child "arch1"
    child "arch2"
    child "portal1"
    child "portal2"
    child "portal3"
    child "portal4"
    child "building1";


world "The world";

