#!/usr/bin/perl
use lib '.';
require "pagelib.pl";
header();
head();

$dir = "images/echobase";
if(!opendir(DIR,$dir)) {
    print "Internal error locating images!<br>\n";
}
@files = readdir(DIR);
foreach(@files) { push @images,$1 if(/(\w+\d+)\.jpg/); }
%used = ();

print qq`
<br><br><font size=+1><b>Echo Base</b></font><br><br>
After completing my version of a <a href=\"atat.cgi\">Lego AT-AT</a>, I
wanted to complete the Hoth battle scene as best I could. I decided that
a great way to do this might be to build the hangar bay from <i>Empire Strikes
Back</i> to serve as the backdrop to the AT-AT. If you\'d like to see the
complete scene, check out my <a href=\"hoth_brickfest.cgi\">pictures from this event</a>.<br>
<br>
`;

show_images('echobase_01',
	    'echobase_02',
	    'echobase_03',
	    'echobase_04',
	    'echobase_05',
	    'echobase_06',
	    'echobase_07',
	    'echobase_08',
	    'echobase_09',
	    'echobase_10',
	    'echobase_11',
	    'echobase_12',
	    'echobase_13',
	    'echobase_14',
	   );

print qq`
<br>The base itself is made up of 9 sections, weighing in at 157 pounds and an
estimated 24,000 bricks. The sections shown below measure about 5\'0" x 4\'7\"
\(1.5m x 1.4m\).  In order to build it, I used the soundstage design
plans for the hangar in <u>The Art of The Empire Strickes Back</u>. Without
enough bricks to build the <b>entire</b> hangar, I built approximately the
formost third of it, and also the trench and snow-mountain outside of it.<br>
<br>
`;

show_images('echobase_27',
	    'echobase_28',
	    'echobase_29',
	    'echobase_32',
	   );

print qq`
<br>I wanted to add as much detail to the base as possible, but unfortunately
there\'s not much to add with just great heaping mounds of snow. I added what
details I could, but most details were to be added later with scenery, rebel
equipment, figures, and ships. Trying to add detail to the snow itself, I
wanted to add light grey or tan plates here and there to give the impression
of \"dirty\" snow where the rebels had constant foot-traffic. However, this
ended up looking a little <b>too</b> dirty. So in order to break up the flat
snow fields, I added several sets of footprints through the snow close to
the base.<br>
<br>
`;

show_images(
	    'echobase_15',
	    'echobase_16',
	    'echobase_17',
	    'echobase_18',
	    'echobase_19',
	    'echobase_20',
	    'echobase_21',
	    'echobase_24',
	    'echobase_25',
	    'echobase_26',
	   );

print qq`
<br>The details inside \(and outside\) were some of the most important parts.
The actual \'canon\' details are the black radar-dish turret, tauntauns, a
truss \(positioned over the X-wing\), and a small personel transport \(which,
after building, I found out I did incorrectly\). In addition to various other
greebly-bits, I must admit I stole an idea for a small repair droid from someone
on Brickshelf, though I forget who... \(If you\'re reading and see your robot,
email me and get credited here\!\)<br>
<br>
`;

show_images(
	    'blackturret01',
	    'blackturret02',
	    'blackturret03',
	    'truss01',
	    'truss02',
	    'truss03',
	    'tauntauns01',
	    'tauntauns02',
	    'tauntauns04',
	    'cart01',
	    'cart02',
	    'greeblies01',
);

print qq`
<br>So what\'s it look like under all that white? Anything but. For support in the
mountain, and under the snow, I used <b>lots</b> of multi-colored bricks, and
whatever I could to build up space inside and remain sturdy.<br>
<br>
`;

show_images(
	    'echobase_22',
	    'echobase_23',
	    'echobase_34',
	    'echobase_35',
);

print qq`
<br>Although it didn\'t quite fit into the layout, I also constructed a Power
Generator. And unfortunately \(as you can see\) I had to use some of the ugly
UFO hulls for lack of enough \"prettier\" hulls from the Millenium Falcon set.<br>
<br>
`;

show_images(
	    'generator01',
	    'generator05',
	    'generator03',
	    'generator04',
	   );

foot();

sub show_images {
    my(@pics) = @_;
    my($i) = 0;
    print "<table width=100\%><tr>\n";
    foreach(@pics) {
	next if($used{$_});
	$used{$_} = 1;
	if(!($i++%4)) {
	    print "</tr>\n<tr>\n";
	}
	print "<td align=center><a href=\"$dir/$_.jpg\"><img src=\"$dir/$_\_th.jpg\" border=0></a></td>\n";
    }
    print "</tr></table>\n";
}
