Index: /code/branches/network/CMakeLists.txt
===================================================================
--- /code/branches/network/CMakeLists.txt	(revision 861)
+++ /code/branches/network/CMakeLists.txt	(revision 861)
@@ -0,0 +1,82 @@
+PROJECT(Orxonox)
+#set some global variables, which are used throughout the project
+SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin)
+SET(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/bin/lib)
+
+OPTION(TESTING_ENABLED "Do you want to enable Testing")
+IF (TESTING_ENABLED)
+  ENABLE_TESTING()
+ENDIF(TESTING_ENABLED)
+
+OPTION(NETWORK_TESTING_ENABLED "Do you want to build network testing tools: i.e. chatclient chatserver and alike")
+
+#Create some verbose output
+SET(CMAKE_VERBOSE_MAKEFILE TRUE)
+
+# set boost search path
+SET(Boost_INCLUDE_DIR "/usr/include/boost/")
+
+# force-set the compile on tardis machines, as default points to g++-3.3
+# only run this test on a lunix/unix machine
+IF (UNIX)
+
+  FIND_PROGRAM(UNAME_CMD "uname"
+  PATHS "/usr/bin /bin")
+  IF(NOT UNAME_CMD)
+    MESSAGE(ERROR "Unable to find uname. Tardis-Check cannot be done.")
+  ENDIF(NOT UNAME_CMD)
+
+  # run uname -n to get nodename
+  EXECUTE_PROCESS(
+  COMMAND "${UNAME_CMD}" "-n"
+  RESULT_VARIABLE UNAME_RV
+  ERROR_VARIABLE UNAME_EV
+  OUTPUT_VARIABLE UNAME_OV)
+
+  IF (NOT "${UNAME_RV}" STREQUAL "0")
+    MESSAGE(ERROR "ERROR: uname terminated unclean.")
+  ENDIF (NOT "${UNAME_RV}" STREQUAL "0")
+
+  # check wheter we are on a tardis machine
+  IF ("${UNAME_OV}" MATCHES "tardis")
+    SET (IS_TARDIS ON)
+  ENDIF ("${UNAME_OV}" MATCHES "tardis")
+
+  # if on tardis change compiler
+  IF(IS_TARDIS)
+    MESSAGE("System is a TARDIS: Setting Compiler to g++-4.1.1")
+    SET(CMAKE_CXX_COMPILER "g++-4.1.1")
+    # reset Boost serach path
+    SET(Boost_INCLUDE_DIR "/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include")
+  ENDIF(IS_TARDIS)
+
+ENDIF (UNIX)
+
+# pipe $FLAGS to the compiler, and add some local flags. force -O2!
+SET(CMAKE_C_FLAGS "$ENV{CFLAGS} -O2 -Wall -g -ggdb")
+SET(CMAKE_CXX_FLAGS "$ENV{CXXFLAGS} -O2 -Wall -g -ggdb")
+SET(CMAKE_LD_FLAGS "$ENV{LDFLAGS}")
+
+#This sets where to look for "Find*.cmake" files
+SET(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake)
+#Performs the search and sets the variables
+FIND_PACKAGE(OGRE)
+FIND_PACKAGE(OIS)
+# FIND_PACKAGE(CEGUI)
+# FIND_PACKAGE(CEGUI_OGRE)
+FIND_PACKAGE(ENet)
+FIND_PACKAGE(Boost REQUIRED thread)
+FIND_PACKAGE(OpenAL)
+FIND_PACKAGE(ALUT)
+FIND_PACKAGE(OggVorbis)
+FIND_PACKAGE(ZLIB)
+
+#Sets the search paths for the linking
+LINK_DIRECTORIES(${OGRE_LIB_DIR} ${OIS_LIB_DIR} ${CEGUI_LIB_DIR} ${CEGUI_OGRE_LIB_DIR} ${ENet_LIBRARY} ${Boost_LIBRARY_DIRS} ${Zlib_LIBRARY_DIR} core objects loader network weapon classHierarchy audio)
+#Sets the search path for include files
+INCLUDE_DIRECTORIES(${OGRE_INCLUDE_DIR} ${OIS_INCLUDE_DIR} ${CEGUI_INCLUDE_DIR} ${CEGUI_OGRE_INCLUDE_DIR} ${ENet_INCLUDE_DIR} ${Boost_INCLUDE_DIRS} ${OPENAL_INCLUDE_DIR} ${ALUT_INCLUDE_DIR} ${VORBIS_INCLUDE_DIR} ${OGG_INCLUDE_DIR})
+
+#Set the execution directory
+
+#add main source dir
+ADD_SUBDIRECTORY(src)
Index: /code/branches/network/Doxyfile
===================================================================
--- /code/branches/network/Doxyfile	(revision 861)
+++ /code/branches/network/Doxyfile	(revision 861)
@@ -0,0 +1,280 @@
+# Doxyfile 1.5.1-KDevelop
+
+#---------------------------------------------------------------------------
+# Project related configuration options
+#---------------------------------------------------------------------------
+PROJECT_NAME           = Orxonox
+PROJECT_NUMBER         = 0.1.0 Arcturus
+OUTPUT_DIRECTORY       =
+CREATE_SUBDIRS         = NO
+OUTPUT_LANGUAGE        = English
+BRIEF_MEMBER_DESC      = YES
+REPEAT_BRIEF           = YES
+ABBREVIATE_BRIEF       = "The $name class" \
+                         "The $name widget" \
+                         "The $name file" \
+                         is \
+                         provides \
+                         specifies \
+                         contains \
+                         represents \
+                         a \
+                         an \
+                         the
+ALWAYS_DETAILED_SEC    = NO
+INLINE_INHERITED_MEMB  = NO
+FULL_PATH_NAMES        = YES
+STRIP_FROM_PATH        = /home/nicolasc/
+STRIP_FROM_INC_PATH    =
+SHORT_NAMES            = NO
+JAVADOC_AUTOBRIEF      = NO
+MULTILINE_CPP_IS_BRIEF = NO
+DETAILS_AT_TOP         = NO
+INHERIT_DOCS           = YES
+SEPARATE_MEMBER_PAGES  = NO
+TAB_SIZE               = 8
+ALIASES                =
+OPTIMIZE_OUTPUT_FOR_C  = NO
+OPTIMIZE_OUTPUT_JAVA   = NO
+BUILTIN_STL_SUPPORT    = NO
+DISTRIBUTE_GROUP_DOC   = NO
+SUBGROUPING            = YES
+#---------------------------------------------------------------------------
+# Build related configuration options
+#---------------------------------------------------------------------------
+EXTRACT_ALL            = YES
+EXTRACT_PRIVATE        = NO
+EXTRACT_STATIC         = NO
+EXTRACT_LOCAL_CLASSES  = YES
+EXTRACT_LOCAL_METHODS  = NO
+HIDE_UNDOC_MEMBERS     = NO
+HIDE_UNDOC_CLASSES     = NO
+HIDE_FRIEND_COMPOUNDS  = NO
+HIDE_IN_BODY_DOCS      = NO
+INTERNAL_DOCS          = NO
+CASE_SENSE_NAMES       = YES
+HIDE_SCOPE_NAMES       = NO
+SHOW_INCLUDE_FILES     = YES
+INLINE_INFO            = YES
+SORT_MEMBER_DOCS       = YES
+SORT_BRIEF_DOCS        = NO
+SORT_BY_SCOPE_NAME     = NO
+GENERATE_TODOLIST      = YES
+GENERATE_TESTLIST      = YES
+GENERATE_BUGLIST       = YES
+GENERATE_DEPRECATEDLIST= YES
+ENABLED_SECTIONS       =
+MAX_INITIALIZER_LINES  = 30
+SHOW_USED_FILES        = YES
+SHOW_DIRECTORIES       = NO
+FILE_VERSION_FILTER    =
+#---------------------------------------------------------------------------
+# configuration options related to warning and progress messages
+#---------------------------------------------------------------------------
+QUIET                  = NO
+WARNINGS               = YES
+WARN_IF_UNDOCUMENTED   = YES
+WARN_IF_DOC_ERROR      = YES
+WARN_NO_PARAMDOC       = NO
+WARN_FORMAT            = "$file:$line: $text"
+WARN_LOGFILE           =
+#---------------------------------------------------------------------------
+# configuration options related to the input files
+#---------------------------------------------------------------------------
+INPUT                  = .
+FILE_PATTERNS          = *.c \
+                         *.cc \
+                         *.cxx \
+                         *.cpp \
+                         *.c++ \
+                         *.d \
+                         *.java \
+                         *.ii \
+                         *.ixx \
+                         *.ipp \
+                         *.i++ \
+                         *.inl \
+                         *.h \
+                         *.hh \
+                         *.hxx \
+                         *.hpp \
+                         *.h++ \
+                         *.idl \
+                         *.odl \
+                         *.cs \
+                         *.php \
+                         *.php3 \
+                         *.inc \
+                         *.m \
+                         *.mm \
+                         *.dox \
+                         *.py \
+                         *.C \
+                         *.CC \
+                         *.C++ \
+                         *.II \
+                         *.I++ \
+                         *.H \
+                         *.HH \
+                         *.H++ \
+                         *.CS \
+                         *.PHP \
+                         *.PHP3 \
+                         *.M \
+                         *.MM \
+                         *.PY \
+                         *.C \
+                         *.H \
+                         *.tlh \
+                         *.diff \
+                         *.patch \
+                         *.moc \
+                         *.xpm \
+                         *.dox
+RECURSIVE              = yes
+EXCLUDE                = .svn/
+EXCLUDE_SYMLINKS       = NO
+EXCLUDE_PATTERNS       =
+EXAMPLE_PATH           =
+EXAMPLE_PATTERNS       = *
+EXAMPLE_RECURSIVE      = NO
+IMAGE_PATH             =
+INPUT_FILTER           =
+FILTER_PATTERNS        =
+FILTER_SOURCE_FILES    = NO
+#---------------------------------------------------------------------------
+# configuration options related to source browsing
+#---------------------------------------------------------------------------
+SOURCE_BROWSER         = NO
+INLINE_SOURCES         = NO
+STRIP_CODE_COMMENTS    = YES
+REFERENCED_BY_RELATION = YES
+REFERENCES_RELATION    = YES
+REFERENCES_LINK_SOURCE = YES
+USE_HTAGS              = NO
+VERBATIM_HEADERS       = YES
+#---------------------------------------------------------------------------
+# configuration options related to the alphabetical class index
+#---------------------------------------------------------------------------
+ALPHABETICAL_INDEX     = NO
+COLS_IN_ALPHA_INDEX    = 5
+IGNORE_PREFIX          =
+#---------------------------------------------------------------------------
+# configuration options related to the HTML output
+#---------------------------------------------------------------------------
+GENERATE_HTML          = YES
+HTML_OUTPUT            = html
+HTML_FILE_EXTENSION    = .html
+HTML_HEADER            =
+HTML_FOOTER            =
+HTML_STYLESHEET        =
+HTML_ALIGN_MEMBERS     = YES
+GENERATE_HTMLHELP      = NO
+CHM_FILE               =
+HHC_LOCATION           =
+GENERATE_CHI           = NO
+BINARY_TOC             = NO
+TOC_EXPAND             = NO
+DISABLE_INDEX          = NO
+ENUM_VALUES_PER_LINE   = 4
+GENERATE_TREEVIEW      = NO
+TREEVIEW_WIDTH         = 250
+#---------------------------------------------------------------------------
+# configuration options related to the LaTeX output
+#---------------------------------------------------------------------------
+GENERATE_LATEX         = NO
+LATEX_OUTPUT           = latex
+LATEX_CMD_NAME         = latex
+MAKEINDEX_CMD_NAME     = makeindex
+COMPACT_LATEX          = NO
+PAPER_TYPE             = a4wide
+EXTRA_PACKAGES         =
+LATEX_HEADER           =
+PDF_HYPERLINKS         = NO
+USE_PDFLATEX           = NO
+LATEX_BATCHMODE        = NO
+LATEX_HIDE_INDICES     = NO
+#---------------------------------------------------------------------------
+# configuration options related to the RTF output
+#---------------------------------------------------------------------------
+GENERATE_RTF           = NO
+RTF_OUTPUT             = rtf
+COMPACT_RTF            = NO
+RTF_HYPERLINKS         = NO
+RTF_STYLESHEET_FILE    =
+RTF_EXTENSIONS_FILE    =
+#---------------------------------------------------------------------------
+# configuration options related to the man page output
+#---------------------------------------------------------------------------
+GENERATE_MAN           = NO
+MAN_OUTPUT             = man
+MAN_EXTENSION          = .3
+MAN_LINKS              = NO
+#---------------------------------------------------------------------------
+# configuration options related to the XML output
+#---------------------------------------------------------------------------
+GENERATE_XML           = NO
+XML_OUTPUT             = xml
+XML_SCHEMA             =
+XML_DTD                =
+XML_PROGRAMLISTING     = YES
+#---------------------------------------------------------------------------
+# configuration options for the AutoGen Definitions output
+#---------------------------------------------------------------------------
+GENERATE_AUTOGEN_DEF   = NO
+#---------------------------------------------------------------------------
+# configuration options related to the Perl module output
+#---------------------------------------------------------------------------
+GENERATE_PERLMOD       = NO
+PERLMOD_LATEX          = NO
+PERLMOD_PRETTY         = YES
+PERLMOD_MAKEVAR_PREFIX =
+#---------------------------------------------------------------------------
+# Configuration options related to the preprocessor
+#---------------------------------------------------------------------------
+ENABLE_PREPROCESSING   = YES
+MACRO_EXPANSION        = NO
+EXPAND_ONLY_PREDEF     = NO
+SEARCH_INCLUDES        = YES
+INCLUDE_PATH           =
+INCLUDE_FILE_PATTERNS  =
+PREDEFINED             =
+EXPAND_AS_DEFINED      =
+SKIP_FUNCTION_MACROS   = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to external references
+#---------------------------------------------------------------------------
+TAGFILES               =
+GENERATE_TAGFILE       = Orxonox.tag
+ALLEXTERNALS           = NO
+EXTERNAL_GROUPS        = YES
+PERL_PATH              = /usr/bin/perl
+#---------------------------------------------------------------------------
+# Configuration options related to the dot tool
+#---------------------------------------------------------------------------
+CLASS_DIAGRAMS         = YES
+HIDE_UNDOC_RELATIONS   = YES
+HAVE_DOT               = NO
+CLASS_GRAPH            = YES
+COLLABORATION_GRAPH    = YES
+GROUP_GRAPHS           = YES
+UML_LOOK               = NO
+TEMPLATE_RELATIONS     = NO
+INCLUDE_GRAPH          = YES
+INCLUDED_BY_GRAPH      = YES
+CALL_GRAPH             = NO
+CALLER_GRAPH           = NO
+GRAPHICAL_HIERARCHY    = YES
+DIRECTORY_GRAPH        = YES
+DOT_IMAGE_FORMAT       = png
+DOT_PATH               =
+DOTFILE_DIRS           =
+MAX_DOT_GRAPH_DEPTH    = 1000
+DOT_TRANSPARENT        = NO
+DOT_MULTI_TARGETS      = NO
+GENERATE_LEGEND        = YES
+DOT_CLEANUP            = YES
+#---------------------------------------------------------------------------
+# Configuration::additions related to the search engine
+#---------------------------------------------------------------------------
+SEARCHENGINE           = YES
Index: /code/branches/network/INSTALL
===================================================================
--- /code/branches/network/INSTALL	(revision 861)
+++ /code/branches/network/INSTALL	(revision 861)
@@ -0,0 +1,17 @@
+Here our installing directions
+
+requirements:
+ogre-1.4.5
+ois-1.0
+cegui-0.5.0b
+enet-1.1
+boost-1.34.1
+cmake-2.4.7
+openal-0.0.8
+freealut-1.1.0
+libvorbis-1.2.0
+(all named version were tested. lower version requirement may be possible)
+
+It is assumed, that you have a working graphical environment (i.e X11), including some sort of 3d acceleration (OpenGL, Direct3D)
+
+Further information about installing and running this application can be found on http://www.orxonox.net/wiki/Running
Index: /code/branches/network/LICENSE
===================================================================
--- /code/branches/network/LICENSE	(revision 861)
+++ /code/branches/network/LICENSE	(revision 861)
@@ -0,0 +1,344 @@
+
+        GNU GENERAL PUBLIC LICENSE
+           Version 2, June 1991
+
+ Copyright (C) 1989, 1991 Free Software Foundation, Inc.
+                       51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+          Preamble
+
+  The licenses for most software are designed to take away your
+freedom to share and change it.  By contrast, the GNU General Public
+License is intended to guarantee your freedom to share and change free
+software--to make sure the software is free for all its users.  This
+General Public License applies to most of the Free Software
+Foundation's software and to any other program whose authors commit to
+using it.  (Some other Free Software Foundation software is covered by
+the GNU Library General Public License instead.)  You can apply it to
+your programs, too.
+
+  When we speak of free software, we are referring to freedom, not
+price.  Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+this service if you wish), that you receive source code or can get it
+if you want it, that you can change the software or use pieces of it
+in new free programs; and that you know you can do these things.
+
+  To protect your rights, we need to make restrictions that forbid
+anyone to deny you these rights or to ask you to surrender the rights.
+These restrictions translate to certain responsibilities for you if you
+distribute copies of the software, or if you modify it.
+
+  For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must give the recipients all the rights that
+you have.  You must make sure that they, too, receive or can get the
+source code.  And you must show them these terms so they know their
+rights.
+
+  We protect your rights with two steps: (1) copyright the software, and
+(2) offer you this license which gives you legal permission to copy,
+distribute and/or modify the software.
+
+  Also, for each author's protection and ours, we want to make certain
+that everyone understands that there is no warranty for this free
+software.  If the software is modified by someone else and passed on, we
+want its recipients to know that what they have is not the original, so
+that any problems introduced by others will not reflect on the original
+authors' reputations.
+
+  Finally, any free program is threatened constantly by software
+patents.  We wish to avoid the danger that redistributors of a free
+program will individually obtain patent licenses, in effect making the
+program proprietary.  To prevent this, we have made it clear that any
+patent must be licensed for everyone's free use or not licensed at all.
+
+  The precise terms and conditions for copying, distribution and
+modification follow.
+
+        GNU GENERAL PUBLIC LICENSE
+   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
+
+  0. This License applies to any program or other work which contains
+a notice placed by the copyright holder saying it may be distributed
+under the terms of this General Public License.  The "Program", below,
+refers to any such program or work, and a "work based on the Program"
+means either the Program or any derivative work under copyright law:
+that is to say, a work containing the Program or a portion of it,
+either verbatim or with modifications and/or translated into another
+language.  (Hereinafter, translation is included without limitation in
+the term "modification".)  Each licensee is addressed as "you".
+
+Activities other than copying, distribution and modification are not
+covered by this License; they are outside its scope.  The act of
+running the Program is not restricted, and the output from the Program
+is covered only if its contents constitute a work based on the
+Program (independent of having been made by running the Program).
+Whether that is true depends on what the Program does.
+
+  1. You may copy and distribute verbatim copies of the Program's
+source code as you receive it, in any medium, provided that you
+conspicuously and appropriately publish on each copy an appropriate
+copyright notice and disclaimer of warranty; keep intact all the
+notices that refer to this License and to the absence of any warranty;
+and give any other recipients of the Program a copy of this License
+along with the Program.
+
+You may charge a fee for the physical act of transferring a copy, and
+you may at your option offer warranty protection in exchange for a fee.
+
+  2. You may modify your copy or copies of the Program or any portion
+of it, thus forming a work based on the Program, and copy and
+distribute such modifications or work under the terms of Section 1
+above, provided that you also meet all of these conditions:
+
+    a) You must cause the modified files to carry prominent notices
+    stating that you changed the files and the date of any change.
+
+    b) You must cause any work that you distribute or publish, that in
+    whole or in part contains or is derived from the Program or any
+    part thereof, to be licensed as a whole at no charge to all third
+    parties under the terms of this License.
+
+    c) If the modified program normally reads commands interactively
+    when run, you must cause it, when started running for such
+    interactive use in the most ordinary way, to print or display an
+    announcement including an appropriate copyright notice and a
+    notice that there is no warranty (or else, saying that you provide
+    a warranty) and that users may redistribute the program under
+    these conditions, and telling the user how to view a copy of this
+    License.  (Exception: if the Program itself is interactive but
+    does not normally print such an announcement, your work based on
+    the Program is not required to print an announcement.)
+
+These requirements apply to the modified work as a whole.  If
+identifiable sections of that work are not derived from the Program,
+and can be reasonably considered independent and separate works in
+themselves, then this License, and its terms, do not apply to those
+sections when you distribute them as separate works.  But when you
+distribute the same sections as part of a whole which is a work based
+on the Program, the distribution of the whole must be on the terms of
+this License, whose permissions for other licensees extend to the
+entire whole, and thus to each and every part regardless of who wrote it.
+
+Thus, it is not the intent of this section to claim rights or contest
+your rights to work written entirely by you; rather, the intent is to
+exercise the right to control the distribution of derivative or
+collective works based on the Program.
+
+In addition, mere aggregation of another work not based on the Program
+with the Program (or with a work based on the Program) on a volume of
+a storage or distribution medium does not bring the other work under
+the scope of this License.
+
+  3. You may copy and distribute the Program (or a work based on it,
+under Section 2) in object code or executable form under the terms of
+Sections 1 and 2 above provided that you also do one of the following:
+
+    a) Accompany it with the complete corresponding machine-readable
+    source code, which must be distributed under the terms of Sections
+    1 and 2 above on a medium customarily used for software
+    interchange; or,
+
+    b) Accompany it with a written offer, valid for at least three
+    years, to give any third party, for a charge no more than your
+    cost of physically performing source distribution, a complete
+    machine-readable copy of the corresponding source code, to be
+    distributed under the terms of Sections 1 and 2 above on a medium
+    customarily used for software interchange; or,
+
+    c) Accompany it with the information you received as to the offer
+    to distribute corresponding source code.  (This alternative is
+    allowed only for noncommercial distribution and only if you
+    received the program in object code or executable form with such
+    an offer, in accord with Subsection b above.)
+
+The source code for a work means the preferred form of the work for
+making modifications to it.  For an executable work, complete source
+code means all the source code for all modules it contains, plus any
+associated interface definition files, plus the scripts used to
+control compilation and installation of the executable.  However, as a
+special exception, the source code distributed need not include
+anything that is normally distributed (in either source or binary
+form) with the major components (compiler, kernel, and so on) of the
+operating system on which the executable runs, unless that component
+itself accompanies the executable.
+
+If distribution of executable or object code is made by offering
+access to copy from a designated place, then offering equivalent
+access to copy the source code from the same place counts as
+distribution of the source code, even though third parties are not
+compelled to copy the source along with the object code.
+
+  4. You may not copy, modify, sublicense, or distribute the Program
+except as expressly provided under this License.  Any attempt
+otherwise to copy, modify, sublicense or distribute the Program is
+void, and will automatically terminate your rights under this License.
+However, parties who have received copies, or rights, from you under
+this License will not have their licenses terminated so long as such
+parties remain in full compliance.
+
+  5. You are not required to accept this License, since you have not
+signed it.  However, nothing else grants you permission to modify or
+distribute the Program or its derivative works.  These actions are
+prohibited by law if you do not accept this License.  Therefore, by
+modifying or distributing the Program (or any work based on the
+Program), you indicate your acceptance of this License to do so, and
+all its terms and conditions for copying, distributing or modifying
+the Program or works based on it.
+
+  6. Each time you redistribute the Program (or any work based on the
+Program), the recipient automatically receives a license from the
+original licensor to copy, distribute or modify the Program subject to
+these terms and conditions.  You may not impose any further
+restrictions on the recipients' exercise of the rights granted herein.
+You are not responsible for enforcing compliance by third parties to
+this License.
+
+  7. If, as a consequence of a court judgment or allegation of patent
+infringement or for any other reason (not limited to patent issues),
+conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License.  If you cannot
+distribute so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you
+may not distribute the Program at all.  For example, if a patent
+license would not permit royalty-free redistribution of the Program by
+all those who receive copies directly or indirectly through you, then
+the only way you could satisfy both it and this License would be to
+refrain entirely from distribution of the Program.
+
+If any portion of this section is held invalid or unenforceable under
+any particular circumstance, the balance of the section is intended to
+apply and the section as a whole is intended to apply in other
+circumstances.
+
+It is not the purpose of this section to induce you to infringe any
+patents or other property right claims or to contest validity of any
+such claims; this section has the sole purpose of protecting the
+integrity of the free software distribution system, which is
+implemented by public license practices.  Many people have made
+generous contributions to the wide range of software distributed
+through that system in reliance on consistent application of that
+system; it is up to the author/donor to decide if he or she is willing
+to distribute software through any other system and a licensee cannot
+impose that choice.
+
+This section is intended to make thoroughly clear what is believed to
+be a consequence of the rest of this License.
+
+  8. If the distribution and/or use of the Program is restricted in
+certain countries either by patents or by copyrighted interfaces, the
+original copyright holder who places the Program under this License
+may add an explicit geographical distribution limitation excluding
+those countries, so that distribution is permitted only in or among
+countries not thus excluded.  In such case, this License incorporates
+the limitation as if written in the body of this License.
+
+  9. The Free Software Foundation may publish revised and/or new versions
+of the General Public License from time to time.  Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+Each version is given a distinguishing version number.  If the Program
+specifies a version number of this License which applies to it and
+"any later version", you have the option of following the terms and
+conditions either of that version or of any later version published by
+the Free Software Foundation.  If the Program does not specify a
+version number of this License, you may choose any version ever
+published by the Free Software Foundation.
+
+  10. If you wish to incorporate parts of the Program into other free
+programs whose distribution conditions are different, write to the author
+to ask for permission.  For software which is copyrighted by the Free
+Software Foundation, write to the Free Software Foundation; we sometimes
+make exceptions for this.  Our decision will be guided by the two goals
+of preserving the free status of all derivatives of our free software and
+of promoting the sharing and reuse of software generally.
+
+          NO WARRANTY
+
+  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO
+WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.
+EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR
+OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY
+KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE.  THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE
+PROGRAM IS WITH YOU.  SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME
+THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN
+WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY
+AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU
+FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR
+CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE
+PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
+DAMAGES.
+
+         END OF TERMS AND CONDITIONS
+
+      How to Apply These Terms to Your New Programs
+
+  If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these
+terms.
+
+  To do so, attach the following notices to the program.  It is safest
+to attach them to the start of each source file to most effectively
+convey the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+    <one line to give the program's name and a brief idea of what it does.>
+    Copyright (C) <year>  <name of author>
+
+    This program is free software; you can redistribute it and/or modify
+    it under the terms of the GNU General Public License as published by
+    the Free Software Foundation; either version 2 of the License, or
+    (at your option) any later version.
+
+    This program is distributed in the hope that it will be useful,
+    but WITHOUT ANY WARRANTY; without even the implied warranty of
+    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+    GNU General Public License for more details.
+
+    You should have received a copy of the GNU General Public License
+    along with this program; if not, write to the Free Software
+    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA
+
+
+Also add information on how to contact you by electronic and paper mail.
+
+If the program is interactive, make it output a short notice like this
+when it starts in an interactive mode:
+
+    Gnomovision version 69, Copyright (C) year name of author
+    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+    This is free software, and you are welcome to redistribute it
+    under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License.  Of course, the commands you use may
+be called something other than `show w' and `show c'; they could even be
+mouse-clicks or menu items--whatever suits your program.
+
+You should also get your employer (if you work as a programmer) or your
+school, if any, to sign a "copyright disclaimer" for the program, if
+necessary.  Here is a sample; alter the names:
+
+  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
+  `Gnomovision' (which makes passes at compilers) written by James Hacker.
+
+  <signature of Ty Coon>, 1 April 1989
+  Ty Coon, President of Vice
+
+This General Public License does not permit incorporating your program into
+proprietary programs.  If your program is a subroutine library, you may
+consider it more useful to permit linking proprietary applications with the
+library.  If this is what you want to do, use the GNU Library General
+Public License instead of this License.
Index: /code/branches/network/Media/fonts/read_me.html
===================================================================
--- /code/branches/network/Media/fonts/read_me.html	(revision 861)
+++ /code/branches/network/Media/fonts/read_me.html	(revision 861)
@@ -0,0 +1,2 @@
+<html><head><title>Larabie Fonts "read me" file, license and FAQ</title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta name="keywords" content="typodermic,typo dermic,fonts,Larabie,Larabie Fonts,fontd,fotn,fnots,fons,fots,fnts,font,truetype,typefaces,typeface,logo,ttf,opentype,larbie,laribie,larby,larabee,lairby,larrabie,larraby,laraby,typography,Type1,postscript,macintosh,windows,design,lettering,type"><font face="Georgia"><h3>LARABIE FONTS README.TXT</h3><p>All Larabie Fonts in this file are free to use for personal and/or commercial purposes. No payment is necessary to use these fonts for personal or commercial use. For Software Products who want to include Larabie Fonts see the License Agreement below. You can add this font to a website but do not combine fonts into a single archive or alter them in any way.</p><p>All Larabie Fonts are free for commercial use but a sample of your product would be gratefully appreciated so I can see how the font looks in use. Contact <a href="http://www.larabiefonts.com/donation.html">www.larabiefonts.com/donation.html</a> for mailing information.</p><p>Some Larabie Fonts have enhanced and expanded families available for sale at <a href="http://www.typodermic.com">www.typodermic.com</a>.</p><p>If you'd like to make a voluntary donation to Larabie Fonts for the use of the free fonts in any amount please go to <a href="http://www.larabiefonts.com/donation.html">www.larabiefonts.com/donation.html</a></p><p>I accept CDs, magazines, t-shirts, a sample of your merchandise or anything featuring Larabie Fonts. Please remember to list your item as a gift on the customs form or I will have to pay import duties and taxes on the item. Mailing information is provided at the link above.</p><p>Font installation help is available at <a href="http://www.larabiefonts.com/help.html">www.larabiefonts.com/help.html</a></p><h3>LARABIE FONTS FREQUENTLY ASKED QUESTIONS</h3><ul><li>Q: How do use these fonts in my favourite software?<li>A: In Windows, you take the fonts out of the ZIP archive and place them in your fonts folder which can be found in your Control Panel. The next time you run your software, the font will be available. For example: If you install a new font, the next time you run Microsoft Word, that font will be available in the menu under Format / Font. For anything more complicated, or Mac installation, visit <a href="http://www.larabiefonts.com/help.html">www.larabiefonts.com/help.html</a></ul><ul><li>Q: How can I use this font in <a href="http://www.aol.com/aim/">AOL Instant Messenger</a>, <a href="http://messenger.msn.com/">MSN Messenger</a>, <a href="http://www.microsoft.com/office/outlook/">Outlook</a>, <a href="http://www.microsoft.com/office/outlook/">Outlook Express</a>, <a href="http://www.eudora.com/">Euodora</a> or any other email software?<li>A: At the time of this writing (Feb 2004) you cant. After installing one of my fonts, you may be able to select it in the above applications but the person at the other end wont see that same thing unless they have the font installed. If you really want to use my fonts in these applications, make sure the people at the other end have the same fonts installed.</ul><ul><li>Q: How can I use these fonts on a web page?<li>A: If youre creating a web page using Flash, its easy. Consult your Flash manual. If youre using <a href="http://www.adobe.com/products/acrobat/">Acrobat</a>, make sure the font embedding settings are turned on. Consult your Acrobat manual. For anything else there are limitations: If you want to use one of my fonts as your main, text font youre pretty much out of luck unless you explore a font embedding tool such as <a href="http://www.microsoft.com/typography/web/embedding/weft/">WEFT</a> but I dont recommend it. To use my fonts as headings or titles, use image creation software such as <a href="http://www.gimp.org/">The Gimp</a>, <a href="http://www.adobe.com/products/photoshop/">Photoshop</a>, <a href="http://www.jasc.com/">Paint Shop Pro</a>, <a href="http://www.google.com/search?q=pixia">Pixia</a> etc. Save the images as GIF files and place them on your web page. Theres a lot more to it than can be explained here but there are countless books available on web page design.</ul><ul><li>Q: How can I make these fonts bigger?<li>A: All my fonts are infinitely scalable; the limitations are in your software. A common problem is scaling fonts in Microsoft Word. If you choose Format / Font you can type in any number you like under size.</ul><ul><li>Q: Are these fonts really free?<li>A: Yes they are. Some fonts such as <a href="http://www.typodermic.com/fonts/19.html">Neuropol</a> have expanded font families available for sale at <a href="http://www.typodermic.com">www.typodermic.com</a> but the version you downloaded at Larabie Fonts is free.</ul><ul><li>Q: Your licence agreement states that the fonts cant be altered. Does that mean I cant mess around with your fonts in Photoshop/Illustrator/Publisher etc?<li>A: Those license restrictions refer to altering the actual fonts themselves, not what you make with them. As long as you dont alter the font files in font creation software such as FontLab or Fontographer youre free to create anything you like with them.</ul><ul><li>Q: Can I use your fonts in a logo?<li>A: Yes. But check with a lawyer if youre not sure. Its okay with me if you use it but do so at your own risk.</ul><ul><li>Q: Can I send you a sample of the nifty thing I created with your fonts?<li>A: Of course. Check <a href="http://www.larabiefonts.com/donation.html">www.larabiefonts.com/donation.html</a> for my current email or mailing address.</ul><ul><li>Q: Can you make a custom font for me?<li>A: Possibly. Check <a href="http://typodermic.com/custom.html">typodermic.com/custom.html</a> for details. Keep in mind that making fonts is my full-time job so no freebies.</ul><ul><li>Q: I want to sell software that includes you font files.<li>A: Contact me first at <a href="http://www.larabiefonts.com/email.html">www.larabiefonts.com/email.html</a>.</ul><ul><li>Q: I want to sell rubber stamp alphabets, alphabet punches or stencil alphabets using your font designs.<li>A: Contact me first at <a href="http://www.larabiefonts.com/email.html">www.larabiefonts.com/email.html</a>.</ul><ul><li>Q: My software wont let me embed one of your fonts.<li>A: You may have an old version of one of my fonts. Uninstall it and install a current version on Larabie Fonts.</ul><ul><li>Q: Can you help me find a font?<li>A: I really dont have the time but if you send a donation, I can give it a try. If not. post your question on my font forum: <a href="http://www.larabiefonts.com/info.html">www.larabiefonts.com/info.html</a>.</ul><h3>LARABIE FONTS END-USER LICENSE AGREEMENT FOR SOFTWARE PRODUCTS</h3><h4>SOFTWARE PRODUCT LICENSE</h4><p>The SOFTWARE PRODUCT is protected by copyright laws and International copyright treaties, as well as other intellectual property laws and treaties. The SOFTWARE PRODUCT is licensed, not sold.</p><h5>1. GRANT OF LICENSE. This document grants you the following rights:</h5><p>- Installation and Use. You may install and use an unlimited number of copies of the SOFTWARE PRODUCT.  You may copy and distribute unlimited copies of the SOFTWARE PRODUCT as you receive them, in any medium, provided that you publish on each copy an appropriate copyright notice. Keep intact all the notices that refer to this License and give any other recipients of the fonts a copy of this License along with the fonts.</p><h5>2. DESCRIPTION OF OTHER RIGHTS AND LIMITATIONS.</h5><p>- You may modify your copy or copies of the SOFTWARE PRODUCT or any portion of it, provided that you also meet all of these rules:</p><p>a) Do not alter in any way alphanumeric characters (A-Z, a-z, 1-9) contained in the font. An exception is converting between formats, here is allowed the nominal distortion that occurs during conversion from second order to third order quadratic curves (TrueType to Postscript) and vice versa.</p><p>b) Extra characters may be added; here it is allowed to use curves (shapes) from alphanumeric characters in fonts under same license.</p><p>c) It is allowed to modify and remove analpahbetics (punctuation, special characters, ligatures and symbols).</p><p>d) The original font name must be retained but can be augmented. (ie. a Font named Blue Highway can be renamed Blue Highway Cyrillic or Blue Highway ANSI, etc.)</p><p>e) Character mapping may be altered.</p><p>f) If the kerning information is altered or discarded it must be stated in the user notes or documentation.</p><p>g) All modifications must be released under this license.</p></p>LIMITED WARRANTY NO WARRANTIES. Larabie Fonts expressly disclaims any warranty for the SOFTWARE PRODUCT. The SOFTWARE PRODUCT and any related documentation is provided "as is" without warranty of any kind, either express or implied, including, without limitation, the implied warranties or merchantability, fitness for a particular purpose, or non-infringement. The entire risk arising out of use or performance of the SOFTWARE PRODUCT remains with you.</p><p>NO LIABILITY FOR CONSEQUENTIAL DAMAGES. In no event shall Larabie Fonts be liable for any damages whatsoever (including, without limitation, damages for loss of business profits, business interruption, loss of business information, or any other pecuniary loss) arising out of the use of or inability to use this product, even if Larabie Fonts has been advised of the possibility of such damages.</p><h5>3. MISCELLANEOUS</h5><p>Should you have any questions concerning this document, or if you desire to contact Larabie Fonts for any reason, please email <a href="http://www.larabiefonts.com/email.html">www.larabiefonts.com/email.html</a>.</p></font></BODY></HTML>
+
Index: /code/branches/network/Media/fonts/sample.fontdef
===================================================================
--- /code/branches/network/Media/fonts/sample.fontdef	(revision 861)
+++ /code/branches/network/Media/fonts/sample.fontdef	(revision 861)
@@ -0,0 +1,11 @@
+StarWars
+{
+	// Now this one I agree with ;)
+	// A Star Wars font :)
+	type 		truetype
+	source 		solo5.ttf
+	size 		16
+	resolution 	96
+}
+
+
Index: /code/branches/network/Media/gui/CompositorDemo.layout
===================================================================
--- /code/branches/network/Media/gui/CompositorDemo.layout	(revision 861)
+++ /code/branches/network/Media/gui/CompositorDemo.layout	(revision 861)
@@ -0,0 +1,182 @@
+<?xml version="1.0" ?>
+<GUILayout>
+<Window Type="DefaultGUISheet" Name="root">
+
+	<Window Type="DefaultGUISheet" Name="debug_overlay">
+		<Property Name="AlwaysOnTop" Value="True" />
+		<Property Name="Disabled" Value="True" />
+		
+		<Window Type="TaharezLook/StaticText" Name="Panel 1">
+			<Property Name="UnifiedPosition" Value="{{0,0},{0.83,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.23,0},{0.17,0}}" />
+			<Property Name="TopLeftFrameImage" Value="set:OgreGuiImagery image:BoxTopLeft" />
+			<Property Name="TopRightFrameImage" Value="set:OgreGuiImagery image:BoxTopRight" />
+			<Property Name="BottomLeftFrameImage" Value="set:OgreGuiImagery image:BoxBottomLeft" />
+			<Property Name="BottomRightFrameImage" Value="set:OgreGuiImagery image:BoxBottomRight" />
+			<Property Name="LeftFrameImage" Value="set:OgreGuiImagery image:BoxLeft" />
+			<Property Name="TopFrameImage" Value="set:OgreGuiImagery image:BoxTop" />
+			<Property Name="RightFrameImage" Value="set:OgreGuiImagery image:BoxRight" />
+			<Property Name="BottomFrameImage" Value="set:OgreGuiImagery image:BoxBottom" />
+			<Property Name="BackgroundImage" Value="set:OgreGuiImagery image:BoxBack" />
+			<Property Name="Alpha" Value="0.9" />
+			<Property Name="InheritsAlpha" Value="False" />
+	
+			<Window Type="TaharezLook/StaticText" Name="OPCurrentFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.12,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.85,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
+				<Property Name="HorzFormatting" Value="HorzCentred" />
+				<Property Name="Text" Value="Current FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticImage" Name="OPBar1">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="UnifiedPosition" Value="{{0.2,0},{0.27,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.6,0},{0.025,0}}" />
+				<Property Name="Image" Value="set:OgreGuiImagery image:Bar" />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPAverageFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.32,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Average FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPWorstFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.45,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Worst FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPBestFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.58,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Best FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPTriCount">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.71,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Triangle Count: " />
+			</Window>
+
+		</Window>
+
+		<Window Type="TaharezLook/StaticText" Name="OPDebugMsg">
+			<Property Name="FrameEnabled" Value="False" />
+			<Property Name="BackgroundEnabled" Value="False" />
+			<Property Name="Font" Value="BlueHighway-10" />
+			<Property Name="UnifiedPosition" Value="{{0.25,0},{0.93,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.65,0},{0.07,0}}" />
+			<Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
+			<Property Name="InheritsAlpha" Value="False" />
+			<Property Name="VertFormatting" Value="VertCentred" />
+			<Property Name="HorzFormatting" Value="WordWrapCentred" />
+		</Window>
+
+		<Window Type="TaharezLook/StaticImage" Name="OgreLogo">
+			<Property Name="FrameEnabled" Value="False" />
+			<Property Name="BackgroundEnabled" Value="False" />
+			<Property Name="UnifiedPosition" Value="{{0.9,0},{0.95,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.1,0},{0.05,0}}" />
+			<Property Name="Image" Value="set:OgreGuiImagery image:OgreLogo" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="InheritsAlpha" Value="False" />
+		</Window>
+
+		<Window Type="TaharezLook/StaticImage" Name="CeguiLogo">
+			<Property Name="FrameEnabled" Value="False" />
+			<Property Name="BackgroundEnabled" Value="False" />
+			<Property Name="UnifiedPosition" Value="{{0.9125,0},{0.9115,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.075,0},{0.0385,0}}" />
+			<Property Name="Image" Value="set:OgreGuiImagery image:CeguiLogo" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="InheritsAlpha" Value="False" />
+		</Window>
+
+	</Window>
+
+	<Window Type="DefaultGUISheet" Name="CompositorDemo">
+
+		<Property Name="UnifiedMaxSize" Value="{{1,0},{2,0}}" />
+		<Property Name="UnifiedSize" Value="{{1,0},{2,0}}" />
+
+
+		<Window Type="TaharezLook/StaticText" Name="HelpTxt">
+			<Property Name="UnifiedPosition" Value="{{0.6,0},{0.8,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.5,0},{0.3,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.5,0},{0.3,0}}" />
+			<Property Name="Text" Value="Use the Combo boxes to select a shader and a model" />
+			<Property Name="InheritsAlpha" Value="False" />
+		</Window>
+		
+		<Window Type="TaharezLook/FrameWindow" Name="CompositorSelectorWin">
+			<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.16,0},{0.22,0}}" />
+			<Property Name="UnifiedMaxSize" Value="{{0.16,0},{0.75,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.16,0},{0.3,0}}" />
+			<Property Name="Text" Value="Compositors" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="CloseButtonEnabled" Value="False" />
+
+			<Window Type="TaharezLook/Button" Name="ExitDemoBtn">
+				<Property Name="VerticalAlignment" Value="Bottom" />
+				<Property Name="HorizontalAlignment" Value="Centre" />
+				<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.33,0},{0.03,0}}" />
+				<Property Name="Text" Value="Exit Demo" />
+				<Property Name="InheritsAlpha" Value="False" />
+			</Window>
+
+		</Window>
+		<Window Type="TaharezLook/FrameWindow" Name="DebugRTTs">
+			<Property Name="RollUpState" Value="True" />
+			<Property Name="UnifiedPosition" Value="{{0.70,0},{0,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.3,0},{0.3,0}}" />
+			<Property Name="UnifiedMaxSize" Value="{{0.3,0},{0.3,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.3,0},{0.3,0}}" />
+			<Property Name="Text" Value="Debug RTTs" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="CloseButtonEnabled" Value="False" />
+
+			<Window Type="TaharezLook/Listbox" Name="DebugRTTListbox">
+				<Property Name="UnifiedPosition" Value="{{0.02,0},{0.1,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.1,0},{0.25,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.1,0},{0.25,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.1,0},{0.25,0}}" />
+			</Window>
+			<Window Type="TaharezLook/StaticImage" Name="DebugRTTImage">
+				<Property Name="UnifiedPosition" Value="{{0.36,0},{0.1,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.2,0},{0.25,0}}" />
+			</Window>
+		</Window>
+	</Window>
+
+
+</Window>
+
+</GUILayout>
Index: /code/branches/network/Media/gui/CompositorDemoCegui.config
===================================================================
--- /code/branches/network/Media/gui/CompositorDemoCegui.config	(revision 861)
+++ /code/branches/network/Media/gui/CompositorDemoCegui.config	(revision 861)
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<CEGUIConfig
+	Scheme="TaharezLookSkin.scheme"
+	Layout="CompositorDemo.layout"
+	DefaultFont="BlueHighway-12"
+/>
Index: /code/branches/network/Media/gui/CrowdDemo.layout
===================================================================
--- /code/branches/network/Media/gui/CrowdDemo.layout	(revision 861)
+++ /code/branches/network/Media/gui/CrowdDemo.layout	(revision 861)
@@ -0,0 +1,201 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="root" >
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="DefaultWindow" Name="debug_overlay" >
+            <Property Name="Disabled" Value="True" />
+            <Property Name="AlwaysOnTop" Value="True" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="Panel 1" >
+                <Property Name="Alpha" Value="0.9" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0,0},{0.83,0},{0.23,0},{1,0}}" />
+                <Window Type="TaharezLook/StaticText" Name="OPCurrentFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Current FPS: " />
+                    <Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="HorzFormatting" Value="HorzCentred" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.12,0},{0.925,0},{0.37,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticImage" Name="OPBar1" >
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.27,0},{0.8,0},{0.295,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPAverageFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Average FPS: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.32,0},{1.075,0},{0.57,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPWorstFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Worst FPS: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.45,0},{1.075,0},{0.7,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPBestFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Best FPS: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.58,0},{1.075,0},{0.83,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPTriCount" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Triangle Count: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.71,0},{1.075,0},{0.96,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="OPDebugMsg" >
+                <Property Name="Font" Value="BlueHighway-10" />
+                <Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="WordWrapCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.93,0},{0.9,0},{1,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="OgreLogo" >
+                <Property Name="Alpha" Value="0.75" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.9,0},{0.95,0},{1,0},{1,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="CeguiLogo" >
+                <Property Name="Alpha" Value="0.75" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.9125,0},{0.9115,0},{0.9875,0},{0.95,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+        </Window>
+        <Window Type="DefaultWindow" Name="InstancingDemo" >
+            <Property Name="Font" Value="BlueHighway-8" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+            <Window Type="TaharezLook/FrameWindow" Name="CompositorSelectorWin" >
+                <Property Name="Text" Value="Techniques" />
+                <Property Name="Alpha" Value="0.75" />
+                <Property Name="TitlebarFont" Value="BlueHighway-12" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="TitlebarEnabled" Value="True" />
+                <Property Name="UnifiedAreaRect" Value="{{-0.00292969,0},{0.00381679,1.25081e-037},{0.331094,0},{0.464121,1.25081e-037}}" />
+                <Property Name="CloseButtonEnabled" Value="False" />
+                <Window Type="TaharezLook/RadioButton" Name="tInstancing" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Instancing" />
+                    <Property Name="Selected" Value="True" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.055847,0},{0.10764,0},{0.973986,0},{0.187074,0}}" />
+                </Window>
+                <Window Type="TaharezLook/RadioButton" Name="tIndependantEntities" >
+                    <Property Name="ID" Value="1" />
+                    <Property Name="Font" Value="BlueHighway-12" />
+					<Property Name="Text" Value="Independent Entities" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.055847,0},{0.172136,0},{0.962291,0},{0.265333,0}}" />
+                </Window>
+                <Window Type="TaharezLook/Checkbox" Name="Shadows" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Shadows on/off" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.475788,0},{1.05,0},{0.579744,0}}" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Object Count Text" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Object Count:" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0880073,0},{0.263737,0},{0.382815,0},{0.369793,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Object Count Number" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="160" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.388902,0},{0.277557,0},{0.631087,0},{0.364265,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Object Count" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.39,0},{0.95,0},{0.441213,0}}" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Time Burner Text" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="CPU occupation:" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.59802,0},{0.427339,0},{0.680451,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Time Burner Value" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="0 ms" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.415811,0},{0.599679,0},{0.640395,0},{0.686178,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Time Burner" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.687236,0},{0.95,0},{0.74726,0}}" />
+                </Window>
+                <Window Type="TaharezLook/Checkbox" Name="PostEffect" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Post Effect On/Off" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0470764,0},{0.765568,0},{0.892124,0},{0.82884,0}}" />
+                </Window>
+                <Window Type="TaharezLook/Button" Name="ExitDemoBtn" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Exit Demo" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{-0.0526254,0},{-0.063219,0},{0.277375,0},{-4.06504e-005,0}}" />
+                    <Property Name="VerticalAlignment" Value="Bottom" />
+                    <Property Name="HorizontalAlignment" Value="Centre" />
+                </Window>
+            </Window>
+        </Window>
+    </Window>
+</GUILayout>
Index: /code/branches/network/Media/gui/Falagard.xsd
===================================================================
--- /code/branches/network/Media/gui/Falagard.xsd	(revision 861)
+++ /code/branches/network/Media/gui/Falagard.xsd	(revision 861)
@@ -0,0 +1,391 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+	<xsd:element name="Falagard" type="falagardSpecificationType" />
+	<xsd:complexType name="falagardSpecificationType">
+		<xsd:sequence>
+			<xsd:element name="WidgetLook" type="widgetLookType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="widgetLookType">
+		<xsd:sequence>
+            <xsd:element name="PropertyDefinition" type="propertyDefinitionType" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="PropertyLinkDefinition" type="propertyLinkDefinitionType" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="NamedArea" type="namedAreaType" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Child" type="widgetComponentType" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="ImagerySection" type="imagerySectionType" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="StateImagery" type="stateType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="propertyDefinitionType">
+        <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" />
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" />
+        <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" />
+    </xsd:complexType>
+    <xsd:complexType name="propertyLinkDefinitionType">
+        <xsd:attribute name="type" type="propertyTypeEnum" use="optional" default="Generic" />
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="widget" type="xsd:string" use="required" />
+        <xsd:attribute name="targetProperty" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="initialValue" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="layoutOnWrite" type="xsd:boolean" use="optional" default="false" />
+        <xsd:attribute name="redrawOnWrite" type="xsd:boolean" use="optional" default="false" />
+    </xsd:complexType>
+    <xsd:complexType name="namedAreaType">
+        <xsd:sequence>
+            <xsd:element name="Area" type="componentAreaType" />
+        </xsd:sequence>
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+    </xsd:complexType>
+	<xsd:complexType name="stateType">
+		<xsd:sequence>
+			<xsd:element name="Layer" type="layerType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+        <xsd:attribute name="clipped" type="xsd:boolean" use="optional" default="true" />
+	</xsd:complexType>
+	<xsd:complexType name="layerType">
+		<xsd:sequence>
+			<xsd:element name="Section" type="sectionSpecType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="priority" type="xsd:integer" use="optional" default="0" />
+	</xsd:complexType>
+    <xsd:complexType name="sectionSpecType">
+        <xsd:choice  minOccurs="0" maxOccurs="1">
+            <xsd:element name="Colour" type="colourType" />
+            <xsd:element name="Colours" type="colourRectType" />
+            <xsd:element name="ColourProperty" type="settingByPropertyType" />
+            <xsd:element name="ColourRectProperty" type="settingByPropertyType" />
+        </xsd:choice>
+        <xsd:attribute name="look" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="section" type="xsd:string" use="required" />
+        <xsd:attribute name="controlProperty" type="xsd:string" use="optional" default="" />
+    </xsd:complexType>
+	<xsd:complexType name="imagerySectionType">
+		<xsd:sequence>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="Colour" type="colourType" />
+                <xsd:element name="Colours" type="colourRectType" />
+                <xsd:element name="ColourProperty" type="settingByPropertyType" />
+                <xsd:element name="ColourRectProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:element name="FrameComponent" type="frameComponentType" minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="ImageryComponent" type="imageryComponentType" minOccurs="0" maxOccurs="unbounded" />
+            <xsd:element name="TextComponent" type="textComponentType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="frameComponentType">
+        <xsd:sequence>
+            <xsd:element name="Area" type="componentAreaType" />
+            <xsd:element name="Image" type="frameImageType" minOccurs="0" maxOccurs="9" />
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="Colour" type="colourType" />
+                <xsd:element name="Colours" type="colourRectType" />
+                <xsd:element name="ColourProperty" type="settingByPropertyType" />
+                <xsd:element name="ColourRectProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="VertFormat" type="vertFormatType" />
+                <xsd:element name="VertFormatProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="HorzFormat" type="horzFormatType" />
+                <xsd:element name="HorzFormatProperty" type="settingByPropertyType" />
+            </xsd:choice>
+        </xsd:sequence>
+    </xsd:complexType>
+    <xsd:complexType name="textComponentType">
+        <xsd:sequence>
+            <xsd:element name="Area" type="componentAreaType" />
+            <xsd:element name="Text" type="textStringType" minOccurs="0" maxOccurs="1" />
+            <xsd:element name="TextProperty" type="textPropertyType" minOccurs="0" maxOccurs="1" />
+            <xsd:element name="FontProperty" type="fontPropertyType" minOccurs="0" maxOccurs="1" />
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="Colour" type="colourType" />
+                <xsd:element name="Colours" type="colourRectType" />
+                <xsd:element name="ColourProperty" type="settingByPropertyType" />
+                <xsd:element name="ColourRectProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="VertFormat" type="vertTextFormatType" />
+                <xsd:element name="VertFormatProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="HorzFormat" type="horzTextFormatType" />
+                <xsd:element name="HorzFormatProperty" type="settingByPropertyType" />
+            </xsd:choice>
+        </xsd:sequence>
+    </xsd:complexType>
+	<xsd:complexType name="imageryComponentType">
+		<xsd:sequence>
+			<xsd:element name="Area" type="componentAreaType" />
+            <xsd:choice>
+                <xsd:element name="Image" type="imageType" />
+                <xsd:element name="ImageProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="Colour" type="colourType" />
+                <xsd:element name="Colours" type="colourRectType" />
+                <xsd:element name="ColourProperty" type="settingByPropertyType" />
+                <xsd:element name="ColourRectProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="VertFormat" type="vertFormatType" />
+                <xsd:element name="VertFormatProperty" type="settingByPropertyType" />
+            </xsd:choice>
+            <xsd:choice  minOccurs="0" maxOccurs="1">
+                <xsd:element name="HorzFormat" type="horzFormatType" />
+                <xsd:element name="HorzFormatProperty" type="settingByPropertyType" />
+            </xsd:choice>
+		</xsd:sequence>
+	</xsd:complexType>
+	<xsd:complexType name="widgetComponentType">
+		<xsd:sequence>
+			<xsd:element name="Area" type="componentAreaType" />
+			<xsd:element name="VertAlignment" type="vertAlignmentType" minOccurs="0" maxOccurs="1" />
+			<xsd:element name="HorzAlignment" type="horzAlignmentType" minOccurs="0" maxOccurs="1" />
+			<xsd:element name="Property" type="propertyType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="type" type="xsd:string" use="required" />
+		<xsd:attribute name="nameSuffix" type="xsd:string" use="required" />
+		<xsd:attribute name="renderer" type="xsd:string" use="optional" default="" />
+		<xsd:attribute name="look" type="xsd:string" use="optional" default="" />
+	</xsd:complexType>
+	<xsd:complexType name="horzFormatType">
+		<xsd:attribute name="type" type="horzFormatEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="vertFormatType">
+		<xsd:attribute name="type" type="vertFormatEnum" use="required" />
+	</xsd:complexType>
+        <xsd:complexType name="horzTextFormatType">
+		<xsd:attribute name="type" type="horzTextFormatEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="vertTextFormatType">
+		<xsd:attribute name="type" type="vertTextFormatEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="horzAlignmentType">
+		<xsd:attribute name="type" type="horzAlignmentEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="vertAlignmentType">
+		<xsd:attribute name="type" type="vertAlignmentEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="propertyType">
+		<xsd:attribute name="name" type="xsd:string" use="required" />
+		<xsd:attribute name="value" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="imageType">
+		<xsd:attribute name="imageset" type="xsd:string" use="required" />
+		<xsd:attribute name="image" type="xsd:string" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="frameImageType">
+        <xsd:attribute name="type" type="frameImageComponentEnum" use="required" />
+        <xsd:attribute name="imageset" type="xsd:string" use="required" />
+        <xsd:attribute name="image" type="xsd:string" use="required" />
+    </xsd:complexType>
+	<xsd:complexType name="componentAreaType">
+        <xsd:choice>
+            <xsd:sequence>
+                <xsd:element name="Dim" type="dimensionType" minOccurs="4" maxOccurs="4" />
+            </xsd:sequence>
+            <xsd:element name="AreaProperty" type="settingByPropertyType" />
+        </xsd:choice>
+	</xsd:complexType>
+	<xsd:complexType name="dimensionType">
+		<xsd:choice>
+			<xsd:element name="UnifiedDim" type="unifiedDimType" />
+			<xsd:element name="AbsoluteDim" type="absoluteDimType" />
+			<xsd:element name="ImageDim" type="imageDimType" />
+            <xsd:element name="WidgetDim" type="widgetDimType" />
+            <xsd:element name="FontDim" type="fontDimType" />
+            <xsd:element name="PropertyDim" type="propertyDimType" />
+		</xsd:choice>
+		<xsd:attribute name="type" type="dimensionTypeEnum" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="fontDimType">
+        <xsd:sequence>
+            <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="widget" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="font" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="string" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="type" type="fontMetricTypeEnum" use="required" />
+        <xsd:attribute name="padding" type="xsd:decimal" use="optional" default="0" />
+    </xsd:complexType>
+    <xsd:complexType name="propertyDimType">
+        <xsd:sequence>
+            <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+        <xsd:attribute name="widget" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+    </xsd:complexType>
+	<xsd:complexType name="unifiedDimType">
+        <xsd:sequence>
+            <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+		<xsd:attribute name="scale" type="xsd:decimal" use="optional" default="0" />
+		<xsd:attribute name="offset" type="xsd:integer" use="optional" default="0" />
+		<xsd:attribute name="type" type="dimensionTypeEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="absoluteDimType">
+        <xsd:sequence>
+            <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+		<xsd:attribute name="value" type="xsd:decimal" use="optional" default="0" />
+	</xsd:complexType>
+	<xsd:complexType name="imageDimType">
+        <xsd:sequence>
+            <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+		<xsd:attribute name="imageset" type="xsd:string" use="required" />
+		<xsd:attribute name="image" type="xsd:string" use="required" />
+		<xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="widgetDimType">
+        <xsd:sequence>
+            <xsd:element name="DimOperator" type="dimensionOperatorType" minOccurs="0" maxOccurs="1" />
+        </xsd:sequence>
+		<xsd:attribute name="widget" type="xsd:string" use="optional" default="" />
+		<xsd:attribute name="dimension" type="dimensionTypeEnum" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="settingByPropertyType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+    </xsd:complexType>
+	<xsd:complexType name="colourRectType">
+		<xsd:attribute name="topLeft" type="colourValType" use="required" />
+		<xsd:attribute name="topRight" type="colourValType" use="required" />
+		<xsd:attribute name="bottomLeft" type="colourValType" use="required" />
+		<xsd:attribute name="bottomRight" type="colourValType" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="colourType">
+		<xsd:attribute name="colour" type="colourValType" use="required" />
+	</xsd:complexType>
+	<xsd:simpleType name="colourValType">
+		<xsd:restriction base="xsd:string">
+			<xsd:pattern value="[a-fA-F0-9]{8}" />
+		</xsd:restriction>
+	</xsd:simpleType>
+    <xsd:complexType name="textStringType">
+        <xsd:attribute name="string" type="xsd:string" use="optional" default="" />
+        <xsd:attribute name="font" type="xsd:string" use="optional" default="" />
+    </xsd:complexType>
+    <xsd:complexType name="textPropertyType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+    </xsd:complexType>
+    <xsd:complexType name="fontPropertyType">
+        <xsd:attribute name="name" type="xsd:string" use="required" />
+    </xsd:complexType>
+    <xsd:complexType name="dimensionOperatorType">
+        <xsd:choice>
+            <xsd:element name="UnifiedDim" type="unifiedDimType" />
+            <xsd:element name="AbsoluteDim" type="absoluteDimType" />
+            <xsd:element name="ImageDim" type="imageDimType" />
+            <xsd:element name="WidgetDim" type="widgetDimType" />
+            <xsd:element name="FontDim" type="fontDimType" />
+            <xsd:element name="PropertyDim" type="propertyDimType" />
+        </xsd:choice>
+        <xsd:attribute name="op" type="dimensionOperatorEnum" use="required" />
+    </xsd:complexType>
+	<xsd:simpleType name="dimensionTypeEnum">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="LeftEdge" />
+			<xsd:enumeration value="TopEdge" />
+			<xsd:enumeration value="RightEdge" />
+			<xsd:enumeration value="BottomEdge" />
+			<xsd:enumeration value="XPosition" />
+			<xsd:enumeration value="YPosition" />
+			<xsd:enumeration value="Width" />
+			<xsd:enumeration value="Height" />
+			<xsd:enumeration value="XOffset" />
+			<xsd:enumeration value="YOffset" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="vertFormatEnum">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="TopAligned" />
+			<xsd:enumeration value="CentreAligned" />
+			<xsd:enumeration value="BottomAligned" />
+			<xsd:enumeration value="Stretched" />
+			<xsd:enumeration value="Tiled" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="horzFormatEnum">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="LeftAligned" />
+			<xsd:enumeration value="CentreAligned" />
+			<xsd:enumeration value="RightAligned" />
+			<xsd:enumeration value="Stretched" />
+			<xsd:enumeration value="Tiled" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="vertAlignmentEnum">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="TopAligned" />
+			<xsd:enumeration value="CentreAligned" />
+			<xsd:enumeration value="BottomAligned" />
+		</xsd:restriction>
+	</xsd:simpleType>
+	<xsd:simpleType name="horzAlignmentEnum">
+		<xsd:restriction base="xsd:string">
+			<xsd:enumeration value="LeftAligned" />
+			<xsd:enumeration value="CentreAligned" />
+			<xsd:enumeration value="RightAligned" />
+		</xsd:restriction>
+	</xsd:simpleType>
+    <xsd:simpleType name="horzTextFormatEnum">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="LeftAligned" />
+            <xsd:enumeration value="RightAligned" />
+            <xsd:enumeration value="CentreAligned" />
+            <xsd:enumeration value="Justified" />
+            <xsd:enumeration value="WordWrapLeftAligned" />
+            <xsd:enumeration value="WordWrapRightAligned" />
+            <xsd:enumeration value="WordWrapCentreAligned" />
+            <xsd:enumeration value="WordWrapJustified" />
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:simpleType name="vertTextFormatEnum">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="TopAligned" />
+            <xsd:enumeration value="BottomAligned" />
+            <xsd:enumeration value="CentreAligned" />
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:simpleType name="propertyTypeEnum">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="Generic" />
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:simpleType name="fontMetricTypeEnum">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="LineSpacing" />
+            <xsd:enumeration value="Baseline" />
+            <xsd:enumeration value="HorzExtent" />
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:simpleType name="dimensionOperatorEnum">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="Noop" />
+            <xsd:enumeration value="Add" />
+            <xsd:enumeration value="Subtract" />
+            <xsd:enumeration value="Multiply" />
+            <xsd:enumeration value="Divide" />
+        </xsd:restriction>
+    </xsd:simpleType>
+    <xsd:simpleType name="frameImageComponentEnum">
+        <xsd:restriction base="xsd:string">
+            <xsd:enumeration value="Background" />
+            <xsd:enumeration value="TopLeftCorner" />
+            <xsd:enumeration value="TopRightCorner" />
+            <xsd:enumeration value="BottomLeftCorner" />
+            <xsd:enumeration value="BottomRightCorner" />
+            <xsd:enumeration value="LeftEdge" />
+            <xsd:enumeration value="RightEdge" />
+            <xsd:enumeration value="TopEdge" />
+            <xsd:enumeration value="BottomEdge" />
+        </xsd:restriction>
+    </xsd:simpleType>
+</xsd:schema>
Index: /code/branches/network/Media/gui/Font.xsd
===================================================================
--- /code/branches/network/Media/gui/Font.xsd	(revision 861)
+++ /code/branches/network/Media/gui/Font.xsd	(revision 861)
@@ -0,0 +1,34 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+	<xsd:element name="Font" type="FontType" />
+
+	<xsd:complexType name="FontType">
+		<xsd:sequence>
+			<xsd:element name="Mapping" type="MapType" maxOccurs="unbounded" minOccurs="0" />
+		</xsd:sequence>
+		<xsd:attributeGroup ref="FontAttrs" />
+	</xsd:complexType>
+	<xsd:complexType name="MapType">
+		<xsd:attribute name="Codepoint" type="xsd:nonNegativeInteger" use="required" />
+		<xsd:attribute name="Image" type="xsd:string" use="required" />
+		<xsd:attribute name="HorzAdvance" type="xsd:integer" use="optional" default="-1" />
+	</xsd:complexType>
+	<xsd:attributeGroup name="FontAttrs">
+		<xsd:attribute name="Name" type="xsd:string" use="required" />
+		<xsd:attribute name="Filename" type="xsd:string" use="required" />
+		<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+		<xsd:attribute name="Type" use="required">
+			<xsd:simpleType>
+				<xsd:restriction base="xsd:string">
+					<xsd:enumeration value="FreeType" />
+					<xsd:enumeration value="Pixmap" />
+				</xsd:restriction>
+			</xsd:simpleType>
+		</xsd:attribute>
+		<xsd:attribute name="Size" type="xsd:nonNegativeInteger" use="optional" default="12" />
+		<xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" />
+		<xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" />
+		<xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" />
+		<xsd:attribute name="AntiAlias" type="xsd:boolean" use="optional" default="true" />
+	</xsd:attributeGroup>
+</xsd:schema>
Index: /code/branches/network/Media/gui/GUILayout.xsd
===================================================================
--- /code/branches/network/Media/gui/GUILayout.xsd	(revision 861)
+++ /code/branches/network/Media/gui/GUILayout.xsd	(revision 861)
@@ -0,0 +1,63 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+	<xsd:element name="GUILayout" type="GUILayoutType"/>
+	
+	<xsd:complexType name="GUILayoutType">
+		<xsd:sequence>
+			<xsd:element name="Window" type="WindowType" />
+		</xsd:sequence>
+		<xsd:attribute name="Parent" type="xsd:string" use="optional" default=""/>
+	</xsd:complexType>
+	
+	<xsd:complexType name="WindowType">
+		<xsd:sequence>
+			<xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element name="Window" type="WindowType" />
+				<xsd:element name="AutoWindow" type="AutoWindowType" />
+			</xsd:choice>
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="Type" type="xsd:string" use="required"/>
+		<xsd:attribute name="Name" type="xsd:string" use="optional" default="" />
+	</xsd:complexType>
+
+	<xsd:complexType name="AutoWindowType">
+		<xsd:sequence>
+			<xsd:element name="LayoutImport" type="LayoutImportType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:element name="Event" type="EventType"  minOccurs="0" maxOccurs="unbounded" />
+			<xsd:choice minOccurs="0" maxOccurs="unbounded">
+				<xsd:element name="Window" type="WindowType" />
+				<xsd:element name="AutoWindow" type="AutoWindowType" />
+			</xsd:choice>
+			<xsd:element name="Property" type="PropertyType"  minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="NameSuffix" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+	<xsd:complexType name="PropertyType">
+		<xsd:simpleContent>
+			<xsd:extension base="xsd:string">
+				<xsd:attribute name="Name" type="xsd:string" use="required"/>
+				<xsd:attribute name="Value" type="xsd:string" use="optional"/>
+			</xsd:extension>
+		</xsd:simpleContent> 
+	</xsd:complexType>
+
+	<xsd:complexType name="LayoutImportType">
+		<xsd:attribute name="Filename" type="xsd:string" use="required"/>
+		<xsd:attribute name="Prefix" type="xsd:string" use="optional" default="" />
+		<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+	</xsd:complexType>
+
+	<xsd:complexType name="EventType">
+		<xsd:attribute name="Name" type="xsd:string" use="required"/>
+		<xsd:attribute name="Function" type="xsd:string" use="required"/>
+	</xsd:complexType>
+
+</xsd:schema>
+
Index: /code/branches/network/Media/gui/GUIScheme.xsd
===================================================================
--- /code/branches/network/Media/gui/GUIScheme.xsd	(revision 861)
+++ /code/branches/network/Media/gui/GUIScheme.xsd	(revision 861)
@@ -0,0 +1,54 @@
+<?xml version="1.0" ?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+	<xsd:element name="GUIScheme" type="SchemeType" />
+	<xsd:complexType name="SchemeType">
+        <xsd:choice minOccurs="0" maxOccurs="unbounded">
+			<xsd:element name="Imageset" type="NamedDataType" />
+            <xsd:element name="ImagesetFromImage" type="NamedDataType" />
+			<xsd:element name="Font" type="NamedDataType" />
+            <xsd:element name="LookNFeel" type="FileDataType" />
+			<xsd:element name="WindowSet" type="WindowSetType" />
+			<xsd:element name="WindowRendererSet" type="WindowRendererSetType" />
+			<xsd:element name="WindowAlias" type="WindowAliasType" />
+            <xsd:element name="FalagardMapping" type="FalagardMapType" />
+		</xsd:choice>
+		<xsd:attribute name="Name" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowSetType">
+		<xsd:sequence>
+            <xsd:element name="WindowFactory" type="WindowFactoryType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="Filename" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowRendererSetType">
+		<xsd:sequence>
+            <xsd:element name="WindowRendererFactory" type="WindowRendererFactoryType" minOccurs="0" maxOccurs="unbounded" />
+		</xsd:sequence>
+		<xsd:attribute name="Filename" type="xsd:string" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="FileDataType">
+        <xsd:attribute name="Filename" type="xsd:string" use="required" />
+        <xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+    </xsd:complexType>
+	<xsd:complexType name="NamedDataType">
+		<xsd:attribute name="Name" type="xsd:string" use="required" />
+		<xsd:attribute name="Filename" type="xsd:string" use="required" />
+		<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowFactoryType">
+		<xsd:attribute name="Name" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowRendererFactoryType">
+		<xsd:attribute name="Name" type="xsd:string" use="required" />
+	</xsd:complexType>
+	<xsd:complexType name="WindowAliasType">
+		<xsd:attribute name="Alias" type="xsd:string" use="required" />
+		<xsd:attribute name="Target" type="xsd:string" use="required" />
+	</xsd:complexType>
+    <xsd:complexType name="FalagardMapType">
+        <xsd:attribute name="WindowType" type="xsd:string" use="required" />
+        <xsd:attribute name="TargetType" type="xsd:string" use="required" />
+		<xsd:attribute name="Renderer" type="xsd:string" use="required" />
+        <xsd:attribute name="LookNFeel" type="xsd:string" use="required" />
+    </xsd:complexType>
+</xsd:schema>
Index: /code/branches/network/Media/gui/Imageset.xsd
===================================================================
--- /code/branches/network/Media/gui/Imageset.xsd	(revision 861)
+++ /code/branches/network/Media/gui/Imageset.xsd	(revision 861)
@@ -0,0 +1,28 @@
+<?xml version="1.0"?>
+<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified">
+
+	<xsd:element name="Imageset" type="ImagesetType"/>
+	
+	<xsd:complexType name="ImagesetType">
+		<xsd:sequence>
+			<xsd:element name="Image" type="ImageType" maxOccurs="unbounded"/>
+		</xsd:sequence>
+		<xsd:attribute name="Imagefile" type="xsd:string" use="required"/>
+		<xsd:attribute name="ResourceGroup" type="xsd:string" use="optional"  default="" />
+		<xsd:attribute name="Name" type="xsd:string" use="required"/>
+		<xsd:attribute name="NativeHorzRes" type="xsd:nonNegativeInteger" use="optional" default="640" />
+		<xsd:attribute name="NativeVertRes" type="xsd:nonNegativeInteger" use="optional" default="480" />
+		<xsd:attribute name="AutoScaled" type="xsd:boolean" use="optional" default="false" />
+	</xsd:complexType>
+	
+	<xsd:complexType name="ImageType">
+		<xsd:attribute name="Name" type="xsd:string" use="required"/>
+		<xsd:attribute name="XPos" type="xsd:nonNegativeInteger" use="required"/>
+		<xsd:attribute name="YPos" type="xsd:nonNegativeInteger" use="required"/>
+		<xsd:attribute name="Width" type="xsd:nonNegativeInteger" use="required"/>
+		<xsd:attribute name="Height" type="xsd:nonNegativeInteger" use="required"/>
+		<xsd:attribute name="XOffset" type="xsd:integer" use="optional" default="0"/>
+		<xsd:attribute name="YOffset" type="xsd:integer" use="optional" default="0"/>						
+	</xsd:complexType>
+
+</xsd:schema>
Index: /code/branches/network/Media/gui/InstancingDemo.layout
===================================================================
--- /code/branches/network/Media/gui/InstancingDemo.layout	(revision 861)
+++ /code/branches/network/Media/gui/InstancingDemo.layout	(revision 861)
@@ -0,0 +1,214 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="root" >
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="DefaultWindow" Name="debug_overlay" >
+            <Property Name="Disabled" Value="True" />
+            <Property Name="AlwaysOnTop" Value="True" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+            <Window Type="TaharezLook/StaticText" Name="Panel 1" >
+                <Property Name="Alpha" Value="0.9" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0,0},{0.83,0},{0.23,0},{1,0}}" />
+                <Window Type="TaharezLook/StaticText" Name="OPCurrentFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Current FPS: " />
+                    <Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="HorzFormatting" Value="HorzCentred" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.12,0},{0.925,0},{0.37,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticImage" Name="OPBar1" >
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.2,0},{0.27,0},{0.8,0},{0.295,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPAverageFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Average FPS: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.32,0},{1.075,0},{0.57,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPWorstFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Worst FPS: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.45,0},{1.075,0},{0.7,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPBestFPS" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Best FPS: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.58,0},{1.075,0},{0.83,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="OPTriCount" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="Triangle Count: " />
+                    <Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.075,0},{0.71,0},{1.075,0},{0.96,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="OPDebugMsg" >
+                <Property Name="Font" Value="BlueHighway-10" />
+                <Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="WordWrapCentred" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.25,0},{0.93,0},{0.9,0},{1,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="OgreLogo" >
+                <Property Name="Alpha" Value="0.75" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.9,0},{0.95,0},{1,0},{1,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="CeguiLogo" >
+                <Property Name="Alpha" Value="0.75" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.9125,0},{0.9115,0},{0.9875,0},{0.95,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+        </Window>
+        <Window Type="DefaultWindow" Name="InstancingDemo" >
+            <Property Name="Font" Value="BlueHighway-12" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{2,0}}" />
+            <Window Type="TaharezLook/FrameWindow" Name="CompositorSelectorWin" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Techniques" />
+                <Property Name="Alpha" Value="0.75" />
+                <Property Name="TitlebarFont" Value="BlueHighway-12" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="TitlebarEnabled" Value="True" />
+                <Property Name="UnifiedAreaRect" Value="{{0,0},{0.00508906,0},{0.237344,0},{0.487022,0}}" />
+                <Property Name="CloseButtonEnabled" Value="False" />
+                <Window Type="TaharezLook/RadioButton" Name="tInstancing" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Instancing" />
+                    <Property Name="Selected" Value="True" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.0592397,0},{1.05,0},{0.140919,0}}" />
+                </Window>
+                <Window Type="TaharezLook/RadioButton" Name="tStaticGeometry" >
+                    <Property Name="ID" Value="1" />
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Static Geometry" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.118479,0},{1.05,0},{0.198839,0}}" />
+                </Window>
+                <Window Type="TaharezLook/RadioButton" Name="tIndependantEntities" >
+                    <Property Name="ID" Value="2" />
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Independant Entities" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.180359,0},{1.05,0},{0.260718,0}}" />
+                </Window>
+                <Window Type="TaharezLook/Checkbox" Name="Shadows" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Shadows on/off" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.458078,0},{1.05,0},{0.545613,0}}" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Object Count Text" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Object Count:" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0458855,0},{0.242239,0},{0.480053,0},{0.324677,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Object Count Number" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="160" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.475313,0},{0.245588,0},{0.679954,0},{0.327894,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/Combobox" Name="Objects" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Choose an object" />
+                    <Property Name="ReadOnly" Value="True" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0541145,0},{0.561555,0},{0.954114,0},{0.821555,0}}" />
+                    <Property Name="MaxEditTextLength" Value="1073741823" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Object Count" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.06,0},{0.33,0},{0.96,0},{0.382246,0}}" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Time Burner Text" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="CPU occupation:" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0664582,0},{0.650819,0},{0.571251,0},{0.750819,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Time Burner Value" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="0 ms" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.616458,0},{0.650819,0},{0.905365,0},{0.750819,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Time Burner" >
+                    <Property Name="PageSize" Value="0" />
+                    <Property Name="StepSize" Value="1" />
+                    <Property Name="OverlapSize" Value="0" />
+                    <Property Name="DocumentSize" Value="1" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.75,0},{0.962344,0},{0.804855,0}}" />
+                </Window>
+                <Window Type="TaharezLook/Checkbox" Name="PostEffect" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Post Effect On/Off" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.05,0},{0.813539,0},{0.918334,0},{0.895712,0}}" />
+                </Window>
+                <Window Type="TaharezLook/Button" Name="ExitDemoBtn" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Exit Demo" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{-0.0325521,0},{-0.0135575,0},{0.48346,0},{0.0739895,0}}" />
+                    <Property Name="VerticalAlignment" Value="Bottom" />
+                    <Property Name="HorizontalAlignment" Value="Centre" />
+                </Window>
+            </Window>
+        </Window>
+    </Window>
+</GUILayout>
Index: /code/branches/network/Media/gui/OceanDemoCegui.config
===================================================================
--- /code/branches/network/Media/gui/OceanDemoCegui.config	(revision 861)
+++ /code/branches/network/Media/gui/OceanDemoCegui.config	(revision 861)
@@ -0,0 +1,6 @@
+<?xml version="1.0" ?>
+<CEGUIConfig
+	Scheme="TaharezLookSkin.scheme"
+	Layout="OceanDemoLayout.xml"
+	DefaultFont="BlueHighway-12"
+/>
Index: /code/branches/network/Media/gui/OceanDemoLayout.xml
===================================================================
--- /code/branches/network/Media/gui/OceanDemoLayout.xml	(revision 861)
+++ /code/branches/network/Media/gui/OceanDemoLayout.xml	(revision 861)
@@ -0,0 +1,264 @@
+<?xml version="1.0" ?>
+<GUILayout>
+<Window Type="DefaultGUISheet" Name="root">
+
+	<Window Type="DefaultGUISheet" Name="debug_overlay">
+		<Property Name="AlwaysOnTop" Value="True" />
+		<Property Name="Disabled" Value="True" />
+		
+		<Window Type="TaharezLook/StaticText" Name="Panel 1">
+			<Property Name="UnifiedPosition" Value="{{0,0},{0.83,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.23,0},{0.17,0}}" />
+			<Property Name="Alpha" Value="0.9" />
+			<Property Name="InheritsAlpha" Value="False" />
+	
+			<Window Type="TaharezLook/StaticText" Name="OPCurrentFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.12,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.85,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FF4FF06F tr:FF4FF06F bl:FF4FF06F br:FF4FF06F" />
+				<Property Name="HorzFormatting" Value="HorzCentred" />
+				<Property Name="Text" Value="Current FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticImage" Name="OPBar1">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="UnifiedPosition" Value="{{0.2,0},{0.27,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.6,0},{0.025,0}}" />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPAverageFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.32,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Average FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPWorstFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.45,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Worst FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPBestFPS">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.58,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Best FPS: " />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="OPTriCount">
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="Font" Value="BlueHighway-10" />
+				<Property Name="UnifiedPosition" Value="{{0.075,0},{0.71,0}}" />
+				<Property Name="UnifiedSize" Value="{{1.0,0},{0.25,0}}" />
+				<Property Name="TextColours" Value="tl:FFFFF5F0 tr:FFFFF5F0 bl:FFFFF510 br:FFFFF5F0" />
+				<Property Name="Text" Value="Triangle Count: " />
+			</Window>
+
+		</Window>
+
+		<Window Type="TaharezLook/StaticText" Name="OPDebugMsg">
+			<Property Name="FrameEnabled" Value="False" />
+			<Property Name="BackgroundEnabled" Value="False" />
+			<Property Name="Font" Value="BlueHighway-10" />
+			<Property Name="UnifiedPosition" Value="{{0.25,0},{0.93,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.65,0},{0.07,0}}" />
+			<Property Name="TextColours" Value="tl:A0FFFFFF tr:A0FFFFFF bl:A0FFFFFF br:A0FFFFFF" />
+			<Property Name="InheritsAlpha" Value="False" />
+			<Property Name="VertFormatting" Value="VertCentred" />
+			<Property Name="HorzFormatting" Value="WordWrapCentred" />
+		</Window>
+
+		<Window Type="TaharezLook/StaticImage" Name="OgreLogo">
+			<Property Name="FrameEnabled" Value="False" />
+			<Property Name="BackgroundEnabled" Value="False" />
+			<Property Name="UnifiedPosition" Value="{{0.9,0},{0.95,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.1,0},{0.05,0}}" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="InheritsAlpha" Value="False" />
+		</Window>
+
+		<Window Type="TaharezLook/StaticImage" Name="CeguiLogo">
+			<Property Name="FrameEnabled" Value="False" />
+			<Property Name="BackgroundEnabled" Value="False" />
+			<Property Name="UnifiedPosition" Value="{{0.9125,0},{0.9115,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.075,0},{0.0385,0}}" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="InheritsAlpha" Value="False" />
+		</Window>
+
+	</Window>
+
+	<Window Type="DefaultGUISheet" Name="OceanDemo">
+
+		<Property Name="UnifiedMaxSize" Value="{{1,0},{2,0}}" />
+		<Property Name="UnifiedSize" Value="{{1,0},{2,0}}" />
+
+
+		<Window Type="TaharezLook/StaticText" Name="HelpTxt">
+			<Property Name="UnifiedPosition" Value="{{0.6,0},{0.8,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.5,0},{0.3,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.5,0},{0.3,0}}" />
+			<Property Name="Text" Value="Use the Combo boxes to select a shader and a model" />
+			<Property Name="InheritsAlpha" Value="False" />
+		</Window>
+		
+		<Window Type="TaharezLook/FrameWindow" Name="OceanDemo/MainWin">
+			<Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
+			<Property Name="UnifiedMaxSize" Value="{{0.23,0},{0.23,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.23,0},{0.23,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.23,0},{0.23,0}}" />
+			<Property Name="Text" Value="Selector" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="CloseButtonEnabled" Value="False" />
+
+			<Window Type="TaharezLook/StaticText" Name="ShaderTxt">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.10,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.3,0},{0.06,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.3,0},{0.06,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.3,0},{0.06,0}}" />
+				<Property Name="HorzFormatting" Value="LeftAligned" />
+				<Property Name="Text" Value="Active Material" />
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="InheritsAlpha" Value="False" />
+			</Window>
+
+			<Window Type="TaharezLook/Combobox" Name="ShaderCombos">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.27,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="InheritsAlpha" Value="False" />
+				<Property Name="ReadOnly" Value="True" />
+				<Property Name="ClippedByParent" Value="False" />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="ModelTxt">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.40,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.3,0},{0.06,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.3,0},{0.06,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.3,0},{0.06,0}}" />
+				<Property Name="HorzFormatting" Value="LeftAligned" />
+				<Property Name="Text" Value="Active Model" />
+				<Property Name="FrameEnabled" Value="False" />
+				<Property Name="BackgroundEnabled" Value="False" />
+				<Property Name="InheritsAlpha" Value="False" />
+			</Window>
+
+			<Window Type="TaharezLook/Combobox" Name="ModelCombos">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.57,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.2,0},{0.25,0}}" />
+				<Property Name="InheritsAlpha" Value="False" />
+				<Property Name="ReadOnly" Value="True" />
+				<Property Name="ClippedByParent" Value="False" />
+			</Window>
+
+			<Window Type="TaharezLook/Button" Name="ExitDemoBtn">
+				<Property Name="UnifiedPosition" Value="{{0.25,0},{0.79,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.04,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.04,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.33,0},{0.04,0}}" />
+				<Property Name="Text" Value="Exit Demo" />
+				<Property Name="InheritsAlpha" Value="False" />
+			</Window>
+
+
+		</Window>
+
+
+		<Window Type="TaharezLook/FrameWindow" Name="ShaderControlsWin">
+			<Property Name="UnifiedPosition" Value="{{0.50,0},{0,0}}" />
+			<Property Name="UnifiedMaxSize" Value="{{0.5,0},{0.22,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.5,0},{0.22,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.5,0},{0.22,0}}" />
+			<Property Name="Text" Value="Shader Controls" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="CloseButtonEnabled" Value="False" />
+			
+			<Window Type="TaharezLook/VerticalScrollbar" Name="VerticalScroll">
+				<Property Name="UnifiedPosition" Value="{{0.94,0},{0.2,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.04,0},{0.75,0}}" />
+				<Property Name="DocumentSize" Value="1" />
+				<Property Name="PageSize" Value="1" />
+				<Property Name="StepSize" Value="0.01" />
+				<Property Name="OverlapSize" Value="0.5" />
+			</Window>
+			
+		</Window>
+
+		<Window Type="TaharezLook/FrameWindow" Name="MovementControlsWin">
+			<Property Name="UnifiedPosition" Value="{{0.0,0},{0.2,0}}" />
+			<Property Name="UnifiedMaxSize" Value="{{0.15,0},{0.22,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0.15,0},{0.22,0}}" />
+			<Property Name="UnifiedSize" Value="{{0.15,0},{0.22,0}}" />
+			<Property Name="Text" Value="Movement" />
+			<Property Name="Alpha" Value="0.75" />
+			<Property Name="CloseButtonEnabled" Value="False" />
+			
+			<Window Type="TaharezLook/RadioButton" Name="CameraRBtn">
+				<Property Name="UnifiedPosition" Value="{{0.1,0},{0.2,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.33,0},{0.03,0}}" />
+				<Property Name="Text" Value="Camera" />
+				<Property Name="InheritsAlpha" Value="False" />
+				<Property Name="Selected" Value="true" />
+				<Property Name="ID" Value="0" />
+			
+			</Window>
+
+			<Window Type="TaharezLook/RadioButton" Name="ModelRBtn">
+				<Property Name="UnifiedPosition" Value="{{0.1,0},{0.4,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.33,0},{0.03,0}}" />
+				<Property Name="Text" Value="Model" />
+				<Property Name="InheritsAlpha" Value="False" />
+				<Property Name="Selected" Value="False" />
+				<Property Name="ID" Value="1" />
+			
+			</Window>
+			
+			<Window Type="TaharezLook/Checkbox" Name="ModelSpinCB">
+				<Property Name="UnifiedPosition" Value="{{0.2,0},{0.53,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="InheritsAlpha" Value="False" />
+				<Property Name="Text" Value="Spin" />
+				<Property Name="Selected" Value="True" />
+			</Window>
+
+			<Window Type="TaharezLook/Checkbox" Name="LightSpinCB">
+				<Property Name="UnifiedPosition" Value="{{0.1,0},{0.7,0}}" />
+				<Property Name="UnifiedMaxSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedMinSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.12,0},{0.03,0}}" />
+				<Property Name="InheritsAlpha" Value="False" />
+				<Property Name="Text" Value="Spin Light" />
+				<Property Name="Selected" Value="False" />
+			</Window>
+		</Window>
+	</Window>
+
+</Window>
+
+</GUILayout>
Index: /code/branches/network/Media/gui/TaharezLook.imageset
===================================================================
--- /code/branches/network/Media/gui/TaharezLook.imageset	(revision 861)
+++ /code/branches/network/Media/gui/TaharezLook.imageset	(revision 861)
@@ -0,0 +1,242 @@
+<?xml version="1.0" ?>
+<Imageset Name="TaharezLook" Imagefile="TaharezLook.tga" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true">
+	<Image Name="ClientBrush" XPos="2" YPos="2" Width="64" Height="64" />
+	<Image Name="WindowLeftEdge" XPos="6" YPos="95" Width="1" Height="22" XOffset="4" />
+	<Image Name="WindowRightEdge" XPos="34" YPos="95" Width="1" Height="22" XOffset="-5" />
+	<Image Name="WindowTopEdge" XPos="9" YPos="68" Width="23" Height="1" />
+	<Image Name="WindowBottomEdge" XPos="9" YPos="143" Width="23" Height="1" />
+	<Image Name="WindowTopLeft" XPos="2" YPos="68" Width="5" Height="24" />
+	<Image Name="WindowTopRight" XPos="34" YPos="68" Width="5" Height="24" />
+	<Image Name="WindowBottomLeft" XPos="2" YPos="120" Width="5" Height="24" />
+	<Image Name="WindowBottomRight" XPos="34" YPos="120" Width="5" Height="24" />
+	<Image Name="ButtonLeftNormal" XPos="68" YPos="20" Width="12" Height="16" />
+	<Image Name="ButtonMiddleNormal" XPos="82" YPos="20" Width="12" Height="16" />
+	<Image Name="ButtonRightNormal" XPos="96" YPos="20" Width="12" Height="16" />
+	<Image Name="ButtonLeftPushed" XPos="68" YPos="38" Width="12" Height="16" />
+	<Image Name="ButtonMiddlePushed" XPos="82" YPos="38" Width="12" Height="16" />
+	<Image Name="ButtonRightPushed" XPos="96" YPos="38" Width="12" Height="16" />
+	<Image Name="ButtonLeftHighlight" XPos="68" YPos="56" Width="12" Height="16" />
+	<Image Name="ButtonMiddleHighlight" XPos="82" YPos="56" Width="12" Height="16" />
+	<Image Name="ButtonRightHighlight" XPos="96" YPos="56" Width="12" Height="16" />
+	<Image Name="CheckboxNormal" XPos="110" YPos="2" Width="12" Height="12" />
+	<Image Name="CheckboxHover" XPos="110" YPos="30" Width="12" Height="12" />
+	<Image Name="CheckboxMark" XPos="110" YPos="16" Width="12" Height="12" />
+	<Image Name="RadioButtonNormal" XPos="124" YPos="2" Width="12" Height="12" />
+	<Image Name="RadioButtonHover" XPos="124" YPos="30" Width="12" Height="12" />
+	<Image Name="RadioButtonMark" XPos="124" YPos="16" Width="12" Height="12" />
+	<Image Name="TitlebarLeft" XPos="68" YPos="2" Width="8" Height="16" />
+	<Image Name="TitlebarMiddle" XPos="78" YPos="2" Width="8" Height="16" />
+	<Image Name="TitlebarRight" XPos="88" YPos="2" Width="8" Height="16" />
+	<Image Name="NewTitlebarLeft" XPos="61" YPos="127" Width="13" Height="16" />
+	<Image Name="NewTitlebarMiddle" XPos="77" YPos="127" Width="12" Height="16" />
+	<Image Name="NewTitlebarRight" XPos="92" YPos="127" Width="12" Height="16" />
+	<Image Name="SysAreaMiddle" XPos="107" YPos="127" Width="12" Height="16" />
+	<Image Name="SysAreaRight" XPos="122" YPos="127" Width="13" Height="16" />
+	<Image Name="StaticLeft" XPos="41" YPos="89" Width="6" Height="6" />
+	<Image Name="StaticRight" XPos="63" YPos="89" Width="6" Height="6" />
+	<Image Name="StaticTop" XPos="52" YPos="78" Width="6" Height="6" />
+	<Image Name="StaticBottom" XPos="52" YPos="100" Width="6" Height="6" />
+	<Image Name="StaticTopLeft" XPos="41" YPos="78" Width="6" Height="6" />
+	<Image Name="StaticTopRight" XPos="63" YPos="78" Width="6" Height="6" />
+	<Image Name="StaticBottomLeft" XPos="41" YPos="100" Width="6" Height="6" />
+	<Image Name="StaticBottomRight" XPos="63" YPos="100" Width="6" Height="6" />
+	<Image Name="StaticBackdrop" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="ProgressBarLeft" XPos="71" YPos="74" Width="7" Height="12" />
+	<Image Name="ProgressBarMiddle" XPos="80" YPos="74" Width="6" Height="12" />
+	<Image Name="ProgressBarRight" XPos="88" YPos="74" Width="6" Height="12" />
+	<Image Name="ProgressBarDimSegment" XPos="96" YPos="74" Width="8" Height="12" />
+	<Image Name="ProgressBarLitSegment" XPos="106" YPos="74" Width="8" Height="12" />
+	<Image Name="EditBoxLeft" XPos="41" YPos="108" Width="4" Height="18" />
+	<Image Name="EditBoxMiddle" XPos="47" YPos="108" Width="4" Height="18" />
+	<Image Name="EditBoxRight" XPos="53" YPos="108" Width="4" Height="18" />
+	<Image Name="EditBoxCarat" XPos="60" YPos="108" Width="4" Height="18" />
+	<Image Name="SpinnerUpNormal" XPos="68" YPos="110" Width="10" Height="6" />
+	<Image Name="SpinnerDownNormal" XPos="68" YPos="118" Width="10" Height="6" />
+	<Image Name="SpinnerUpHover" XPos="82" YPos="110" Width="10" Height="6" />
+	<Image Name="SpinnerDownHover" XPos="82" YPos="118" Width="10" Height="6" />
+	<Image Name="TextSelectionBrush" XPos="8" YPos="70" Width="16" Height="16" />
+	<Image Name="VertScrollTop" XPos="182" YPos="2" Width="20" Height="8" />
+	<Image Name="VertScrollMiddle" XPos="182" YPos="12" Width="20" Height="8" />
+	<Image Name="VertScrollBottom" XPos="182" YPos="22" Width="20" Height="8" />
+	<Image Name="VertScrollBarSegment" XPos="206" YPos="2" Width="4" Height="10" />
+	<Image Name="VertScrollThumbNormal" XPos="214" YPos="2" Width="8" Height="24" />
+	<Image Name="VertScrollThumbHover" XPos="224" YPos="2" Width="8" Height="24" />
+	<Image Name="VertScrollUpNormal" XPos="196" YPos="32" Width="12" Height="12" />
+	<Image Name="VertScrollDownNormal" XPos="182" YPos="32" Width="12" Height="12" />
+	<Image Name="VertScrollUpHover" XPos="196" YPos="46" Width="12" Height="12" />
+	<Image Name="VertScrollDownHover" XPos="182" YPos="46" Width="12" Height="12" />
+	<Image Name="MiniVertScrollBarSegment" XPos="207" YPos="60" Width="4" Height="10" />
+	<Image Name="MiniVertScrollThumbNormal" XPos="214" YPos="59" Width="7" Height="22" />
+	<Image Name="MiniVertScrollThumbTopNormal" XPos="214" YPos="59" Width="7" Height="5" />
+	<Image Name="MiniVertScrollThumbMiddleNormal" XPos="214" YPos="65" Width="7" Height="5" />
+	<Image Name="MiniVertScrollThumbBottomNormal" XPos="214" YPos="76" Width="7" Height="5" />
+	<Image Name="MiniVertScrollThumbTopHover" XPos="223" YPos="59" Width="7" Height="5" />
+	<Image Name="MiniVertScrollThumbMiddleHover" XPos="223" YPos="65" Width="7" Height="5" />
+	<Image Name="MiniVertScrollThumbBottomHover" XPos="223" YPos="76" Width="7" Height="5" />
+	<Image Name="MiniVertScrollThumbHover" XPos="223" YPos="59" Width="7" Height="22" />
+	<Image Name="MiniVertScrollUpNormal" XPos="194" YPos="60" Width="10" Height="9" />
+	<Image Name="MiniVertScrollDownNormal" XPos="182" YPos="59" Width="10" Height="9" />
+	<Image Name="MiniVertScrollUpHover" XPos="194" YPos="70" Width="10" Height="9" />
+	<Image Name="MiniVertScrollDownHover" XPos="182" YPos="69" Width="10" Height="9" />
+	<Image Name="VertSliderBody" XPos="234" YPos="2" Width="9" Height="48" />
+	<Image Name="VertSliderThumbNormal" XPos="217" YPos="28" Width="15" Height="6" />
+	<Image Name="VertSliderThumbHover" XPos="217" YPos="36" Width="15" Height="6" />
+	<Image Name="MiniHorzScrollBarSegment" XPos="244" YPos="80" Width="10" Height="4" />
+	<Image Name="MiniHorzScrollThumbNormal" XPos="233" YPos="87" Width="22" Height="7" />
+	<Image Name="MiniHorzScrollThumbLeftNormal" XPos="233" YPos="87" Width="5" Height="7" />
+	<Image Name="MiniHorzScrollThumbMiddleNormal" XPos="239" YPos="87" Width="5" Height="7" />
+	<Image Name="MiniHorzScrollThumbRightNormal" XPos="250" YPos="87" Width="5" Height="7" />
+	<Image Name="MiniHorzScrollThumbHover" XPos="233" YPos="96" Width="22" Height="7" />
+	<Image Name="MiniHorzScrollThumbLeftHover" XPos="233" YPos="96" Width="5" Height="7" />
+	<Image Name="MiniHorzScrollThumbMiddleHover" XPos="239" YPos="96" Width="5" Height="7" />
+	<Image Name="MiniHorzScrollThumbRightHover" XPos="250" YPos="96" Width="5" Height="7" />
+	<Image Name="MiniHorzScrollLeftNormal" XPos="246" YPos="55" Width="9" Height="10" />
+	<Image Name="MiniHorzScrollRightNormal" XPos="245" YPos="67" Width="9" Height="10" />
+	<Image Name="MiniHorzScrollLeftHover" XPos="236" YPos="55" Width="9" Height="10" />
+	<Image Name="MiniHorzScrollRightHover" XPos="235" YPos="67" Width="9" Height="10" />
+	<Image Name="ListboxLeft" XPos="41" YPos="89" Width="7" Height="6" />
+	<Image Name="ListboxRight" XPos="62" YPos="89" Width="7" Height="6" />
+	<Image Name="ListboxTop" XPos="52" YPos="78" Width="6" Height="7" />
+	<Image Name="ListboxBottom" XPos="52" YPos="99" Width="6" Height="7" />
+	<Image Name="ListboxTopLeft" XPos="41" YPos="78" Width="7" Height="7" />
+	<Image Name="ListboxTopRight" XPos="62" YPos="78" Width="7" Height="7" />
+	<Image Name="ListboxBottomLeft" XPos="41" YPos="99" Width="7" Height="7" />
+	<Image Name="ListboxBottomRight" XPos="62" YPos="99" Width="7" Height="7" />
+	<Image Name="ListboxBackdrop" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="ListboxSelectionBrush" XPos="8" YPos="70" Width="16" Height="16" />
+	<Image Name="ComboboxEditLeft" XPos="138" YPos="2" Width="8" Height="16" />
+	<Image Name="ComboboxEditMiddle" XPos="148" YPos="2" Width="8" Height="16" />
+	<Image Name="ComboboxListButtonNormal" XPos="158" YPos="2" Width="16" Height="16" />
+	<Image Name="ComboboxListButtonHover" XPos="158" YPos="20" Width="16" Height="16" />
+	<Image Name="ComboboxListLeft" XPos="138" YPos="48" Width="8" Height="8" />
+	<Image Name="ComboboxListRight" XPos="158" YPos="48" Width="8" Height="8" />
+	<Image Name="ComboboxListTop" XPos="148" YPos="48" Width="8" Height="8" />
+	<Image Name="ComboboxListBottom" XPos="148" YPos="58" Width="8" Height="8" />
+	<Image Name="ComboboxListTopLeft" XPos="138" YPos="38" Width="8" Height="8" />
+	<Image Name="ComboboxListTopRight" XPos="158" YPos="38" Width="8" Height="8" />
+	<Image Name="ComboboxListBottomLeft" XPos="138" YPos="58" Width="8" Height="8" />
+	<Image Name="ComboboxListBottomRight" XPos="158" YPos="58" Width="8" Height="8" />
+	<Image Name="ComboboxListBackdrop" XPos="148" YPos="48" Width="8" Height="8" />
+	<Image Name="ComboboxSelectionBrush" XPos="8" YPos="70" Width="16" Height="16" />
+	<Image Name="ComboboxDividerLeft" XPos="138" YPos="68" Width="14" Height="1" />
+	<Image Name="ComboboxDividerMiddle" XPos="154" YPos="68" Width="8" Height="1" />
+	<Image Name="ComboboxDividerRight" XPos="164" YPos="68" Width="14" Height="1" />
+	<Image Name="HeaderBarBackdropNormal" XPos="230" YPos="163" Width="10" Height="12" />
+	<Image Name="HeaderBarBackdropHover" XPos="230" YPos="163" Width="10" Height="12" />
+	<Image Name="HeaderBarSplitterNormal" XPos="225" YPos="92" Width="3" Height="16" />
+	<Image Name="HeaderBarSplitterHover" XPos="200" YPos="92" Width="3" Height="16" />
+	<Image Name="HeaderBarSortUp" XPos="233" YPos="178" Width="8" Height="8" />
+	<Image Name="HeaderBarSortDown" XPos="244" YPos="178" Width="8" Height="8" />
+	<Image Name="MultiListLeft" XPos="170" YPos="92" Width="7" Height="6" />
+	<Image Name="MultiListRight" XPos="191" YPos="92" Width="7" Height="6" />
+	<Image Name="MultiListTop" XPos="181" YPos="81" Width="6" Height="7" />
+	<Image Name="MultiListBottom" XPos="181" YPos="102" Width="6" Height="7" />
+	<Image Name="MultiListTopLeft" XPos="170" YPos="81" Width="7" Height="7" />
+	<Image Name="MultiListTopRight" XPos="191" YPos="81" Width="7" Height="7" />
+	<Image Name="MultiListBottomLeft" XPos="170" YPos="102" Width="7" Height="7" />
+	<Image Name="MultiListBottomRight" XPos="191" YPos="102" Width="7" Height="7" />
+	<Image Name="MultiListBackdrop" XPos="181" YPos="92" Width="6" Height="6" />
+	<Image Name="MultiListSelectionBrush" XPos="9" YPos="71" Width="14" Height="14" />
+	<Image Name="AltProgressLeft" XPos="71" YPos="88" Width="8" Height="12" />
+	<Image Name="AltProgressMiddle" XPos="81" YPos="88" Width="8" Height="12" />
+	<Image Name="AltProgressRight" XPos="91" YPos="88" Width="8" Height="12" />
+	<Image Name="AltProgressQuarter" XPos="102" YPos="89" Width="3" Height="4" />
+	<Image Name="AltProgressHalf" XPos="109" YPos="89" Width="4" Height="5" />
+	<Image Name="AltProgressLight1" XPos="100" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight2" XPos="106" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight3" XPos="112" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight4" XPos="118" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight5" XPos="124" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight6" XPos="130" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight7" XPos="136" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight8" XPos="142" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight9" XPos="148" YPos="97" Width="4" Height="8" />
+	<Image Name="AltProgressLight10" XPos="154" YPos="97" Width="4" Height="8" />
+	<Image Name="CloseButtonNormal" XPos="41" YPos="128" Width="16" Height="16" />
+	<Image Name="CloseButtonHover" XPos="41" YPos="146" Width="16" Height="16" />
+	<Image Name="CloseButtonPressed" XPos="41" YPos="164" Width="16" Height="16" />
+	<Image Name="NewCloseButtonNormal" XPos="90" YPos="146" Width="10" Height="10" />
+	<Image Name="NewCloseButtonHover" XPos="90" YPos="146" Width="10" Height="10" />
+	<Image Name="NewCloseButtonPressed" XPos="90" YPos="146" Width="10" Height="10" />
+	<Image Name="MultiLineEditboxLeft" XPos="41" YPos="89" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxRight" XPos="63" YPos="89" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxTop" XPos="52" YPos="78" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxBottom" XPos="52" YPos="100" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxTopLeft" XPos="41" YPos="78" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxTopRight" XPos="63" YPos="78" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxBottomLeft" XPos="41" YPos="100" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxBottomRight" XPos="63" YPos="100" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxBackdrop" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="MultiLineEditboxSelectionBrush" XPos="9" YPos="71" Width="14" Height="14" />
+	<Image Name="MouseTarget" XPos="182" YPos="127" Width="17" Height="17" XOffset="-8" YOffset="-8" />
+	<Image Name="MouseArrow" XPos="138" YPos="127" Width="31" Height="25" XOffset="0" YOffset="0" />
+	<Image Name="MouseMoveCursor" XPos="201" YPos="127" Width="18" Height="18" XOffset="-8" YOffset="-8" />
+	<Image Name="MouseNoSoCursor" XPos="221" YPos="127" Width="8" Height="18" XOffset="-3" YOffset="-8" />
+	<Image Name="MouseEsWeCursor" XPos="182" YPos="150" Width="18" Height="8" XOffset="-8" YOffset="-3" />
+	<Image Name="MouseNeSwCursor" XPos="201" YPos="147" Width="14" Height="14" XOffset="-7" YOffset="-7" />
+	<Image Name="MouseNwSeCursor" XPos="230" YPos="126" Width="14" Height="14" XOffset="-7" YOffset="-7" />
+	<Image Name="MouseTextBar" XPos="173" YPos="127" Width="7" Height="18" XOffset="-2" YOffset="-9" />
+	<Image Name="TabHorizontalFiller" XPos="197" YPos="201" Width="7" Height="1" />
+	<Image Name="TabContentPaneUpperLeft" XPos="41" YPos="78" Width="7" Height="7" />
+	<Image Name="TabContentPaneUpper" XPos="52" YPos="78" Width="6" Height="7" />
+	<Image Name="TabContentPaneUpperRight" XPos="62" YPos="78" Width="7" Height="7" />
+	<Image Name="TabContentPaneLeft" XPos="41" YPos="89" Width="7" Height="6" />
+	<Image Name="TabContentPaneRight" XPos="62" YPos="89" Width="7" Height="6" />
+	<Image Name="TabContentPaneLower" XPos="52" YPos="99" Width="6" Height="7" />
+	<Image Name="TabContentPaneLowerLeft" XPos="41" YPos="99" Width="7" Height="7" />
+	<Image Name="TabContentPaneLowerRight" XPos="62" YPos="99" Width="7" Height="7" />
+	<Image Name="TabContentPaneMiddle" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="TabButtonScrollLeftNormal" XPos="97" YPos="108" Width="16" Height="17" />
+	<Image Name="TabButtonScrollRightNormal" XPos="112" YPos="108" Width="16" Height="17" />
+	<Image Name="TabButtonScrollLeftHover" XPos="127" YPos="108" Width="16" Height="17" />
+	<Image Name="TabButtonScrollRightHover" XPos="142" YPos="108" Width="16" Height="17" />
+	<Image Name="TabButtonLeftNormal" XPos="41" YPos="89" Width="7" Height="6" />
+	<Image Name="TabButtonRightNormal" XPos="62" YPos="89" Width="7" Height="6" />
+	<Image Name="TabButtonUpperNormal" XPos="52" YPos="78" Width="6" Height="7" />
+	<Image Name="TabButtonLowerNormal" XPos="52" YPos="99" Width="6" Height="7" />
+	<Image Name="TabButtonUpperLeftNormal" XPos="41" YPos="78" Width="7" Height="7" />
+	<Image Name="TabButtonUpperLeft2Normal" XPos="186" YPos="164" Width="7" Height="7" />
+	<Image Name="TabButtonUpperRightNormal" XPos="62" YPos="78" Width="7" Height="7" />
+	<Image Name="TabButtonLowerLeftNormal" XPos="41" YPos="99" Width="7" Height="7" />
+	<Image Name="TabButtonLowerRightNormal" XPos="62" YPos="99" Width="7" Height="7" />
+	<Image Name="TabButtonLowerRight2Normal" XPos="187" YPos="195" Width="7" Height="7" />
+	<Image Name="TabButtonMiddleNormal" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="TabButtonLeftSelected" XPos="41" YPos="89" Width="7" Height="6" />
+	<Image Name="TabButtonRightSelected" XPos="62" YPos="89" Width="7" Height="6" />
+	<Image Name="TabButtonUpperSelected" XPos="52" YPos="78" Width="6" Height="7" />
+	<Image Name="TabButtonLowerSelected" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="TabButtonUpperLeftSelected" XPos="41" YPos="78" Width="7" Height="7" />
+	<Image Name="TabButtonUpperRightSelected" XPos="62" YPos="78" Width="7" Height="7" />
+	<Image Name="TabButtonLowerLeftSelected" XPos="41" YPos="99" Width="7" Height="7" />
+	<Image Name="TabButtonLowerRightSelected" XPos="62" YPos="99" Width="7" Height="7" />
+	<Image Name="TabButtonMiddleSelected" XPos="52" YPos="89" Width="6" Height="6" />
+	<Image Name="TooltipTopLeft" XPos="61" YPos="160" Width="4" Height="4" />
+	<Image Name="TooltipTopRight" XPos="85" YPos="160" Width="5" Height="4" />
+	<Image Name="TooltipBottomLeft" XPos="61" YPos="184" Width="4" Height="5" />
+	<Image Name="TooltipBottomRight" XPos="85" YPos="184" Width="5" Height="5" />
+	<Image Name="TooltipLeftEdge" XPos="61" YPos="171" Width="4" Height="6" />
+	<Image Name="TooltipRightEdge" XPos="85" YPos="171" Width="5" Height="6" />
+	<Image Name="TooltipTopEdge" XPos="72" YPos="160" Width="6" Height="4" />
+	<Image Name="TooltipBottomEdge" XPos="72" YPos="184" Width="6" Height="5" />
+	<Image Name="TooltipMiddle" XPos="72" YPos="171" Width="6" Height="6" />
+	<Image Name="MenuTopLeft" XPos="166" YPos="204" Width="2" Height="2" />
+	<Image Name="MenuTopRight" XPos="175" YPos="204" Width="3" Height="2" />
+	<Image Name="MenuBottomLeft" XPos="166" YPos="213" Width="2" Height="3" />
+	<Image Name="MenuBottomRight" XPos="175" YPos="213" Width="3" Height="3" />
+	<Image Name="MenuLeft" XPos="166" YPos="209" Width="2" Height="1" />
+	<Image Name="MenuRight" XPos="175" YPos="209" Width="3" Height="1" />
+	<Image Name="MenuTop" XPos="171" YPos="204" Width="1" Height="2" />
+	<Image Name="MenuBottom" XPos="171" YPos="213" Width="1" Height="3" />
+	<Image Name="MenuMiddle" XPos="171" YPos="209" Width="1" Height="1" />
+	<Image Name="PopupMenuFrameTopLeft" XPos="186" YPos="204" Width="2" Height="2" />
+	<Image Name="PopupMenuFrameTopRight" XPos="195" YPos="204" Width="4" Height="2" />
+	<Image Name="PopupMenuFrameBottomLeft" XPos="186" YPos="213" Width="2" Height="4" />
+	<Image Name="PopupMenuFrameBottomRight" XPos="195" YPos="213" Width="4" Height="4" />
+	<Image Name="PopupMenuFrameLeft" XPos="186" YPos="209" Width="2" Height="1" />
+	<Image Name="PopupMenuFrameRight" XPos="195" YPos="209" Width="4" Height="1" />
+	<Image Name="PopupMenuFrameTop" XPos="191" YPos="204" Width="1" Height="2" />
+	<Image Name="PopupMenuFrameBottom" XPos="191" YPos="213" Width="1" Height="4" />
+	<Image Name="PopupMenuMiddle" XPos="191" YPos="209" Width="1" Height="1" />
+	<Image Name="PopupMenuArrowRight" XPos="179" YPos="204" Width="5" Height="5" />
+	<Image Name="PopupMenuArrowLeft" XPos="179" YPos="210" Width="5" Height="5" />
+</Imageset>
Index: /code/branches/network/Media/gui/TaharezLook.looknfeel
===================================================================
--- /code/branches/network/Media/gui/TaharezLook.looknfeel	(revision 861)
+++ /code/branches/network/Media/gui/TaharezLook.looknfeel	(revision 861)
@@ -0,0 +1,4315 @@
+<?xml version="1.0" ?>
+<Falagard>
+    <!--
+    ***************************************************
+        TaharezLook/Button
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Button">
+        <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledTextColour" initialValue="FF7F7F7F" redrawOnWrite="true" />
+        <PropertyDefinition name="VertLabelFormatting" initialValue="CentreAligned" />
+        <PropertyDefinition name="HorzLabelFormatting" initialValue="CentreAligned" />
+        <PropertyDefinition name="NormalImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="VertImageFormatting" initialValue="Stretched" redrawOnWrite="true" />
+        <PropertyDefinition name="HorzImageFormatting" initialValue="Stretched" redrawOnWrite="true" />
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <VertFormatProperty name="VertLabelFormatting" />
+                <HorzFormatProperty name="HorzLabelFormatting" />
+            </TextComponent>
+        </ImagerySection>
+        <ImagerySection name="normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width"><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height"><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftNormal" />
+                <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightNormal" />
+                <Image type="Background" imageset="TaharezLook" image="ButtonMiddleNormal" />
+            </FrameComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="NormalImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftHighlight" />
+                <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightHighlight" />
+                <Image type="Background" imageset="TaharezLook" image="ButtonMiddleHighlight" />
+            </FrameComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="HoverImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="pushed">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="ButtonLeftPushed" />
+                <Image type="RightEdge" imageset="TaharezLook" image="ButtonRightPushed" />
+                <Image type="Background" imageset="TaharezLook" image="ButtonMiddlePushed" />
+            </FrameComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="PushedImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Pushed">
+            <Layer>
+                <Section section="pushed" />
+                <Section section="label">
+                    <ColourProperty name="PushedTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="PushedOff">
+            <Layer>
+                <Section section="hover" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/RadioButton
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/RadioButton">
+		<PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledTextColour" initialValue="FF7F7F7F" redrawOnWrite="true" />
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" >
+                        <ImageDim imageset="TaharezLook" image="RadioButtonNormal" dimension="Width">
+                            <DimOperator op="Add">
+                                <AbsoluteDim value="3" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <ImagerySection name="normal">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="RadioButtonNormal" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="RadioButtonHover" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="select_mark">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="RadioButtonMark" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SelectedNormal">
+            <Layer>
+                <Section section="normal" />
+                <Section section="select_mark" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SelectedHover">
+            <Layer>
+                <Section section="hover" />
+                <Section section="select_mark" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SelectedDisabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="select_mark">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Checkbox
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Checkbox">
+		<PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledTextColour" initialValue="FF7F7F7F" redrawOnWrite="true" />
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" >
+                        <ImageDim imageset="TaharezLook" image="CheckboxNormal" dimension="Width">
+                            <DimOperator op="Add">
+                                <AbsoluteDim value="3" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <ImagerySection name="normal">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="CheckboxNormal" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="CheckboxHover" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="select_mark">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="CheckboxMark" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SelectedNormal">
+            <Layer>
+                <Section section="normal" />
+                <Section section="select_mark" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SelectedHover">
+            <Layer>
+                <Section section="hover" />
+                <Section section="select_mark" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SelectedDisabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="select_mark">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Editbox
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Editbox">
+        <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="SelectedTextColour" initialValue="FF000000" redrawOnWrite="true" />
+        <PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" />
+        <PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" />
+        <Property name="MouseCursorImage" value="set:TaharezLook image:MouseTextBar" />
+        <NamedArea name="TextArea">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="5" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="5" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" offset="-5" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1.0" offset="-5" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="container_normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="EditBoxLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="EditBoxRight" />
+                <Image type="Background" imageset="TaharezLook" image="EditBoxMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="selection">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="TextSelectionBrush" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="Carat">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><ImageDim imageset="TaharezLook" image="EditBoxCarat" dimension="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="EditBoxCarat" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="container_normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ReadOnly">
+            <Layer>
+                <Section section="container_normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="container_normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ActiveSelection">
+            <Layer>
+                <Section section="selection">
+                    <ColourProperty name="ActiveSelectionColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="InactiveSelection">
+            <Layer>
+                <Section section="selection">
+                    <ColourProperty name="InactiveSelectionColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Titlebar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Titlebar">
+        <PropertyDefinition name="CaptionColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <ImagerySection name="main">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="NewTitlebarLeft" />
+                <VertFormat type="Stretched" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width">
+                                    <DimOperator op="Add">
+                                        <ImageDim imageset="TaharezLook" image="SysAreaMiddle" dimension="Width" />
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="NewTitlebarRight" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="SysAreaMiddle" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="SysAreaRight" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="NewTitlebarLeft" dimension="Width" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width">
+                                    <DimOperator op="Add">
+                                        <ImageDim imageset="TaharezLook" image="SysAreaMiddle" dimension="Width">
+                                            <DimOperator op="Add">
+                                                <ImageDim imageset="TaharezLook" image="NewTitlebarRight" dimension="Width" />
+                                            </DimOperator>
+                                        </ImageDim>
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="NewTitlebarMiddle" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="caption">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="NewTitlebarLeft" dimension="Width" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" offset="-75" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ColourProperty name="CaptionColour" />
+                <VertFormat type="CentreAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <StateImagery name="Active">
+            <Layer>
+                <Section section="main" />
+                <Section section="caption" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Inactive">
+            <Layer>
+                <Section section="main" />
+                <Section section="caption" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="caption">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/FrameWindow
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/FrameWindow">
+        <PropertyLinkDefinition name="CaptionColour" widget="__auto_titlebar__" targetProperty="CaptionColour" initialValue="FFFFFFFF" />
+        <PropertyLinkDefinition name="TitlebarFont" widget="__auto_titlebar__" targetProperty="Font" />
+        <Property name="NSSizingCursorImage" value="set:TaharezLook image:MouseNoSoCursor" />
+        <Property name="EWSizingCursorImage" value="set:TaharezLook image:MouseEsWeCursor" />
+        <Property name="NWSESizingCursorImage" value="set:TaharezLook image:MouseNwSeCursor" />
+        <Property name="NESWSizingCursorImage" value="set:TaharezLook image:MouseNeSwCursor" />
+        <NamedArea name="ClientWithTitleWithFrame">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="WindowTopLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="WindowTopRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="WindowBottomEdge" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ClientWithTitleNoFrame">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="BottomEdge" ><WidgetDim dimension="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ClientNoTitleWithFrame">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="WindowTopLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="WindowTopEdge" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="WindowTopRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="WindowBottomEdge" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ClientNoTitleNoFrame">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+        </NamedArea>
+        <Child type="TaharezLook/Titlebar" nameSuffix="__auto_titlebar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="Height" ><FontDim type="LineSpacing" padding="8" /></Dim>
+            </Area>
+            <Property name="AlwaysOnTop" value="False" />
+        </Child>
+        <Child type="TaharezLook/SystemButton" nameSuffix="__auto_closebutton__">
+            <Area>
+                <Dim type="LeftEdge" >
+                    <UnifiedDim scale="1" type="LeftEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="SysAreaRight" dimension="Width">
+                                <DimOperator op="Add">
+                                    <ImageDim imageset="TaharezLook" image="SysAreaMiddle" dimension="Width" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="TopEdge" >
+                    <AbsoluteDim value="0.5">
+                        <DimOperator op="Multiply">
+                            <WidgetDim widget="__auto_titlebar__" dimension="Height">
+                                <DimOperator op="Subtract">
+                                    <ImageDim imageset="TaharezLook" image="NewCloseButtonNormal" dimension="Width" />
+                                </DimOperator>
+                            </WidgetDim>
+                        </DimOperator>
+                    </AbsoluteDim>
+                </Dim>
+                <Dim type="Width" ><ImageDim imageset="TaharezLook" image="NewCloseButtonNormal" dimension="Width" /></Dim>
+                <Dim type="Height" ><ImageDim imageset="TaharezLook" image="NewCloseButtonNormal" dimension="Width" /></Dim>
+            </Area>
+            <Property name="AlwaysOnTop" value="True" />
+            <Property name="NormalImage" value="set:TaharezLook image:NewCloseButtonNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:NewCloseButtonHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:NewCloseButtonPressed" />
+        </Child>
+        <ImagerySection name="withtitle_frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="BottomEdge" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
+                </Area>
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="WindowBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="WindowBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="WindowLeftEdge" />
+                <Image type="RightEdge" imageset="TaharezLook" image="WindowRightEdge" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="WindowBottomEdge" />
+                <Image type="Background" imageset="TaharezLook" image="ClientBrush" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Tiled" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="notitle_frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="WindowTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="WindowTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="WindowBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="WindowBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="WindowLeftEdge" />
+                <Image type="RightEdge" imageset="TaharezLook" image="WindowRightEdge" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="WindowBottomEdge" />
+                <Image type="Background" imageset="TaharezLook" image="ClientBrush" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Tiled" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="withtitle_noframe_client_area">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><WidgetDim widget="__auto_titlebar__" dimension="Height" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="ClientBrush" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="notitle_noframe_client_area">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="ClientBrush" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="ActiveWithTitleWithFrame">
+            <Layer>
+                <Section section="withtitle_frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="InactiveWithTitleWithFrame">
+            <Layer>
+                <Section section="withtitle_frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledWithTitleWithFrame">
+            <Layer>
+                <Section section="withtitle_frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ActiveWithTitleNoFrame">
+            <Layer>
+                <Section section="withtitle_noframe_client_area" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="InactiveWithTitleNoFrame">
+            <Layer>
+                <Section section="withtitle_noframe_client_area" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledWithTitleNoFrame">
+            <Layer>
+                <Section section="withtitle_noframe_client_area">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ActiveNoTitleWithFrame">
+            <Layer>
+                <Section section="notitle_frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="InactiveNoTitleWithFrame">
+            <Layer>
+                <Section section="notitle_frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledNoTitleWithFrame">
+            <Layer>
+                <Section section="notitle_frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ActiveNoTitleNoFrame">
+            <Layer>
+                <Section section="notitle_noframe_client_area" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="InactiveNoTitleNoFrame">
+            <Layer>
+                <Section section="notitle_noframe_client_area" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledNoTitleNoFrame">
+            <Layer>
+                <Section section="notitle_noframe_client_area">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/ProgressBar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ProgressBar">
+        <NamedArea name="ProgressArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ProgressBarLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ProgressBarRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="ProgressBarLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="ProgressBarRight" />
+                <Image type="Background" imageset="TaharezLook" image="ProgressBarMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="progress_lights" >
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="ProgressBarLitSegment" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="EnabledProgress">
+            <Layer>
+                <Section section="progress_lights" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledProgress">
+            <Layer>
+                <Section section="progress_lights">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/AlternateProgressBar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/AltProgressBar">
+        <NamedArea name="ProgressArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="AltProgressLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="2" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="AltProgressRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" offset="-4" type="Height" /></Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="AltProgressLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="AltProgressRight" />
+                <Image type="Background" imageset="TaharezLook" image="AltProgressMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="progress_lights" >
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight1" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.1" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight2" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.2" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight3" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.3" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight4" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.4" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight5" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.5" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight6" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.6" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight7" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.7" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight8" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.8" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight9" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.9" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="AltProgressLight10" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Tiled" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="EnabledProgress">
+            <Layer>
+                <Section section="progress_lights" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledProgress">
+            <Layer>
+                <Section section="progress_lights">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/VUMeter (progress bar)
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/VUMeter">
+        <Property name="VerticalProgress" value="True" />
+        <NamedArea name="ProgressArea">
+            <Area>
+                <Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></Dim>
+                <Dim type="TopEdge" ><UnifiedDim scale="0" type="TopEdge" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="progress_lights" >
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><UnifiedDim scale="0.5" type="TopEdge" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="0.5" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="TextSelectionBrush" />
+                <Colours topLeft="FF00FF00" topRight="FF00FF00" bottomLeft="FF00FF00" bottomRight="FF00FF00" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><UnifiedDim scale="0.2" type="TopEdge" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="0.3" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="TextSelectionBrush" />
+                <Colours topLeft="FFFFFF00" topRight="FFFFFF00" bottomLeft="FFFFFF00" bottomRight="FFFFFF00" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" ><UnifiedDim scale="0" type="TopEdge" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="0.2" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="TextSelectionBrush" />
+                <Colours topLeft="FFFF0000" topRight="FFFF0000" bottomLeft="FFFF0000" bottomRight="FFFF0000" />
+                <VertFormat type="Tiled" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+        </StateImagery>
+        <StateImagery name="Disabled">
+        </StateImagery>
+        <StateImagery name="EnabledProgress">
+            <Layer>
+                <Section section="progress_lights" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledProgress">
+            <Layer>
+                <Section section="progress_lights">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/SliderThumb
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/SliderThumb">
+        <Property name="VertFree" value="True" />
+        <ImagerySection name="normal">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="VertSliderThumbNormal" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="VertSliderThumbHover" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Pushed">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Slider
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Slider">
+        <Property name="VerticalSlider" value="True" />
+        <Property name="MouseButtonDownAutoRepeat" value="True" />
+        <Property name="WantsMultiClickEvents" value="False" />
+        <NamedArea name="ThumbTrackArea">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/SliderThumb" nameSuffix="__auto_thumb__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                <Dim type="Height" ><ImageDim imageset="TaharezLook" image="VertSliderThumbNormal" dimension="Height" /></Dim>
+            </Area>
+        </Child>
+        <ImagerySection name="main">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="3" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" offset="-6" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="VertSliderBody" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/HorizontalScrollbarThumb
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/HorizontalScrollbarThumb">
+        <Property name="HorzFree" value="True" />
+        <ImagerySection name="normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="MiniHorzScrollThumbLeftNormal" />
+                <Image type="RightEdge" imageset="TaharezLook" image="MiniHorzScrollThumbRightNormal" />
+                <Image type="Background" imageset="TaharezLook" image="MiniHorzScrollThumbMiddleNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="MiniHorzScrollThumbLeftHover" />
+                <Image type="RightEdge" imageset="TaharezLook" image="MiniHorzScrollThumbRightHover" />
+                <Image type="Background" imageset="TaharezLook" image="MiniHorzScrollThumbMiddleHover" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Pushed">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/HorizontalScrollbar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/HorizontalScrollbar">
+        <NamedArea name="ThumbTrackArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MiniHorzScrollLeftNormal" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1.0" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MiniHorzScrollRightNormal" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_incbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><ImageDim imageset="TaharezLook" image="MiniHorzScrollRightNormal" dimension="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+            <Property name="NormalImage" value="set:TaharezLook image:MiniHorzScrollRightNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:MiniHorzScrollRightHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:MiniHorzScrollRightNormal" />
+        </Child>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_decbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><ImageDim imageset="TaharezLook" image="MiniHorzScrollLeftNormal" dimension="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+            <Property name="NormalImage" value="set:TaharezLook image:MiniHorzScrollLeftNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:MiniHorzScrollLeftHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:MiniHorzScrollLeftNormal" />
+        </Child>
+        <Child  type="TaharezLook/HorizontalScrollbarThumb" nameSuffix="__auto_thumb__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="0.1" type="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+            <Property name="UnifiedMinSize" value="{{0,25},{0,0}}" />
+        </Child>
+        <ImagerySection name="main">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MiniHorzScrollLeftNormal" dimension="Width" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1.0" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="MiniHorzScrollRightNormal" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="MiniHorzScrollBarSegment" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/VerticalScrollbarThumb
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/VerticalScrollbarThumb">
+        <Property name="VertFree" value="True" />
+        <ImagerySection name="normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image type="TopEdge" imageset="TaharezLook" image="MiniVertScrollThumbTopNormal" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="MiniVertScrollThumbBottomNormal" />
+                <Image type="Background" imageset="TaharezLook" image="MiniVertScrollThumbMiddleNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image type="TopEdge" imageset="TaharezLook" image="MiniVertScrollThumbTopHover" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="MiniVertScrollThumbBottomHover" />
+                <Image type="Background" imageset="TaharezLook" image="MiniVertScrollThumbMiddleHover" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Pushed">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/VerticalScrollbar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/VerticalScrollbar">
+        <Property name="VerticalScrollbar" value="True" />
+        <NamedArea name="ThumbTrackArea">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MiniVertScrollUpNormal" dimension="Height" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1.0" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MiniVertScrollDownNormal" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_incbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="Height" ><ImageDim imageset="TaharezLook" image="MiniVertScrollDownNormal" dimension="Height" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+            <Property name="NormalImage" value="set:TaharezLook image:MiniVertScrollDownNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:MiniVertScrollDownHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:MiniVertScrollDownNormal" />
+        </Child>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_decbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="Height" ><ImageDim imageset="TaharezLook" image="MiniVertScrollUpNormal" dimension="Height" /></Dim>
+            </Area>
+            <Property name="NormalImage" value="set:TaharezLook image:MiniVertScrollUpNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:MiniVertScrollUpHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:MiniVertScrollUpNormal" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbarThumb" nameSuffix="__auto_thumb__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="0.1" type="Height" /></Dim>
+            </Area>
+            <Property name="UnifiedMinSize" value="{{0,0},{0,25}}" />
+        </Child>
+        <ImagerySection name="main">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MiniVertScrollUpNormal" dimension="Height" /></Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1.0" type="BottomEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="MiniVertScrollDownNormal" dimension="Height" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="MiniVertScrollBarSegment" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="CentreAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Listbox
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Listbox">
+        <NamedArea name="ItemRenderingArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ListboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ListboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ListboxRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ListboxBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ListboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ListboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ListboxRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ListboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ListboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ListboxBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ListboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ListboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
+                <Dim type="Height" ><AbsoluteDim value="12" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><AbsoluteDim value="12" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+        </Child>
+        <ImagerySection name="main">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="ListboxTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="ListboxTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="ListboxBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="ListboxBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="ListboxLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="ListboxRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="ListboxTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="ListboxBottom" />
+                <Image type="Background" imageset="TaharezLook" image="ListboxBackdrop" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/ComboDropList
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ComboDropList">
+        <NamedArea name="ItemRenderingArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ComboboxListRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ComboboxListBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ComboboxListRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="ComboboxListBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="ComboboxListTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
+                <Dim type="Height" ><AbsoluteDim value="12" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><AbsoluteDim value="12" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+        </Child>
+        <ImagerySection name="main">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="ComboboxListTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="ComboboxListTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="ComboboxListBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="ComboboxListBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="ComboboxListLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="ComboboxListRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="ComboboxListTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="ComboboxListBottom" />
+                <Image type="Background" imageset="TaharezLook" image="ComboboxListBackdrop" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/ComboEditbox
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ComboEditbox">
+        <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="SelectedTextColour" initialValue="FF000000" redrawOnWrite="true" />
+        <PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" />
+        <PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" />
+        <Property name="MouseCursorImage" value="set:TaharezLook image:MouseTextBar" />
+        <NamedArea name="TextArea">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="5" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="5" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" offset="-5" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1.0" offset="-5" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="container_normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="ComboboxEditLeft" />
+                <Image type="Background" imageset="TaharezLook" image="ComboboxEditMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="selection">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="TextSelectionBrush" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="Carat">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><ImageDim imageset="TaharezLook" image="EditBoxCarat" dimension="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="EditBoxCarat" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="container_normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ReadOnly">
+            <Layer>
+                <Section section="container_normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="container_normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ActiveSelection">
+            <Layer>
+                <Section section="selection">
+                    <ColourProperty name="ActiveSelectionColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="InactiveSelection">
+            <Layer>
+                <Section section="selection">
+                    <ColourProperty name="InactiveSelectionColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Combobox
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Combobox">
+        <PropertyLinkDefinition name="NormalEditTextColour" widget="__auto_editbox__" targetProperty="NormalTextColour" initialValue="FFFFFFFF" />
+        <PropertyLinkDefinition name="SelectedEditTextColour" widget="__auto_editbox__" targetProperty="SelectedTextColour" initialValue="FF000000" />
+        <PropertyLinkDefinition name="ActiveEditSelectionColour" widget="__auto_editbox__" targetProperty="ActiveSelectionColour" initialValue="FF6060FF" />
+        <PropertyLinkDefinition name="InactiveEditSelectionColour" widget="__auto_editbox__" targetProperty="InactiveSelectionColour" initialValue="FF808080" />
+        <Child  type="TaharezLook/ComboEditbox" nameSuffix="__auto_editbox__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <FontDim type="LineSpacing">
+                                <DimOperator op="Multiply">
+                                    <AbsoluteDim value="1.5" />
+                                </DimOperator>
+                            </FontDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="Height" >
+                    <FontDim type="LineSpacing">
+                        <DimOperator op="Multiply">
+                            <AbsoluteDim value="1.5" />
+                        </DimOperator>
+                    </FontDim>
+                </Dim>
+            </Area>
+        </Child>
+        <Child  type="TaharezLook/ComboDropList" nameSuffix="__auto_droplist__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_editbox__" dimension="BottomEdge" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
+            </Area>
+        </Child>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_button__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><WidgetDim widget="__auto_editbox__" dimension="Height" /></Dim>
+                <Dim type="Height" ><WidgetDim widget="__auto_editbox__" dimension="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+            <Property name="NormalImage" value="set:TaharezLook image:ComboboxListButtonNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:ComboboxListButtonHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:ComboboxListButtonNormal" />
+        </Child>
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Spinner
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Spinner">
+        <Child  type="TaharezLook/Editbox" nameSuffix="__auto_editbox__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+            </Area>
+        </Child>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_incbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="0.5" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+            <Property name="NormalImage" value="set:TaharezLook image:VertScrollUpNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:VertScrollUpHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:VertScrollUpNormal" />
+        </Child>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_decbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><UnifiedDim scale="0.5" type="TopEdge" /></Dim>
+                <Dim type="Width" ><ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Width" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="0.5" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+            <Property name="NormalImage" value="set:TaharezLook image:VertScrollDownNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:VertScrollDownHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:VertScrollDownNormal" />
+        </Child>
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/StaticShared
+        (Shared imagery components for static widgets)
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/StaticShared">
+        <ImagerySection name="frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="StaticTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="StaticTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="StaticBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="StaticBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="StaticLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="StaticRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="StaticTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="StaticBottom" />
+                <ColourRectProperty name="FrameColours" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="background">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="StaticLeft" dimension="Width" /></Dim>
+                    <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="StaticTop" dimension="Height" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="StaticRight" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1" type="BottomEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="StaticBottom" dimension="Height" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="StaticBackdrop" />
+                <!--<ColourRectProperty name="BackgroundColours" />-->
+                <Colours topLeft="FFFFFFFF" topRight="FFFFFFFF" bottomLeft="FFFFFFFF" bottomRight="FFFFFFFF" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="background_noframe">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge"><UnifiedDim scale="1" type="RightEdge" /></Dim>
+                    <Dim type="BottomEdge"><UnifiedDim scale="1" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="StaticBackdrop" />
+                <!--<ColourRectProperty name="BackgroundColours" />-->
+                <Colours topLeft="FFFFFFFF" topRight="FFFFFFFF" bottomLeft="FFFFFFFF" bottomRight="FFFFFFFF" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/StaticImage
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/StaticImage">
+		<PropertyDefinition name="ImageColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+		<PropertyDefinition name="FrameColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+		<PropertyDefinition name="BackgroundColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="VertFormatting" initialValue="Stretched" redrawOnWrite="true" />
+        <PropertyDefinition name="HorzFormatting" initialValue="Stretched" redrawOnWrite="true" />
+        <Property name="BackgroundEnabled" value="True" />
+        <Property name="FrameEnabled" value="True" />
+        <ImagerySection name="image_withframe">
+            <ImageryComponent>
+                <Area>
+					<Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="StaticLeft" dimension="Width" /></Dim>
+					<Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="StaticTop" dimension="Height" /></Dim>
+					<Dim type="RightEdge" >
+						<UnifiedDim scale="1" type="RightEdge">
+							<DimOperator op="Subtract">
+								<ImageDim imageset="TaharezLook" image="StaticRight" dimension="Width" />
+							</DimOperator>
+						</UnifiedDim>
+					</Dim>
+					<Dim type="BottomEdge" >
+						<UnifiedDim scale="1" type="BottomEdge">
+							<DimOperator op="Subtract">
+								<ImageDim imageset="TaharezLook" image="StaticBottom" dimension="Height" />
+							</DimOperator>
+						</UnifiedDim>
+					</Dim>
+				</Area>
+                <ImageProperty name="Image" />
+                <ColourRectProperty name="ImageColours" />
+                <VertFormatProperty name="VertFormatting" />
+                <HorzFormatProperty name="HorzFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="image_noframe">
+            <ImageryComponent>
+                <Area>
+					<Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+					<Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+					<Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+					<Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+				</Area>
+                <ImageProperty name="Image" />
+                <ColourRectProperty name="ImageColours" />
+                <VertFormatProperty name="VertFormatting" />
+                <HorzFormatProperty name="HorzFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+        <StateImagery name="EnabledFrame">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledFrame">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="WithFrameEnabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="WithFrameDisabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="NoFrameEnabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background_noframe" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="NoFrameDisabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background_noframe" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="WithFrameImage">
+            <Layer>
+                <Section section="image_withframe" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="NoFrameImage">
+            <Layer>
+                <Section section="image_noframe" />
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/StaticText
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/StaticText">
+		<PropertyDefinition name="FrameColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+		<PropertyDefinition name="BackgroundColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+        <Property name="FrameEnabled" value="True" />
+        <Property name="BackgroundEnabled" value="True" />
+        <NamedArea name="WithFrameTextRenderArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="StaticLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="StaticTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="StaticRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="StaticBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="WithFrameTextRenderAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="StaticLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="StaticTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="StaticRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="WithFrameTextRenderAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="StaticLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="StaticTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="StaticBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="WithFrameTextRenderAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="StaticLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="StaticTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="NoFrameTextRenderArea">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="NoFrameTextRenderAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="NoFrameTextRenderAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="NoFrameTextRenderAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
+                <Dim type="Height" ><AbsoluteDim value="12" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><AbsoluteDim value="12" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+        </Child>
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+        <StateImagery name="EnabledFrame">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledFrame">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="frame" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="WithFrameEnabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="WithFrameDisabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="NoFrameEnabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background_noframe" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="NoFrameDisabledBackground">
+            <Layer>
+                <Section look="TaharezLook/StaticShared" section="background_noframe" />
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/ListHeaderSegment
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ListHeaderSegment">
+        <Property name="SizingCursorImage" value="set:TaharezLook image:MouseEsWeCursor" />
+        <Property name="MovingCursorImage" value="set:TaharezLook image:MouseMoveCursor" />
+        <ImagerySection name="segment_normal">
+            <Colours topLeft="FFDDDDDD" topRight="FFDDDDDD" bottomLeft="FFDDDDDD" bottomRight="FFDDDDDD" />
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="HeaderBarSplitterNormal" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="HeaderBarBackdropNormal" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="segment_hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="HeaderBarSplitterNormal" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="HeaderBarBackdropHover" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="splitter_normal">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="HeaderBarSplitterNormal" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="splitter_hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="HeaderBarSplitterHover" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="ascend_icon">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="3" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="3" /></Dim>
+                    <Dim type="Width" ><ImageDim imageset="TaharezLook" image="HeaderBarSortUp" dimension="Width" /></Dim>
+                    <Dim type="Height" ><ImageDim imageset="TaharezLook" image="HeaderBarSortUp" dimension="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="HeaderBarSortUp" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="descend_icon">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="3" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="3" /></Dim>
+                    <Dim type="Width" ><ImageDim imageset="TaharezLook" image="HeaderBarSortDown" dimension="Width" /></Dim>
+                    <Dim type="Height" ><ImageDim imageset="TaharezLook" image="HeaderBarSortDown" dimension="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="HeaderBarSortDown" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" >
+                        <ImageDim imageset="TaharezLook" image="HeaderBarSortUp" dimension="Width">
+                            <DimOperator op="Add">
+                                <AbsoluteDim value="5" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1" type="RightEdge" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <VertFormat type="CentreAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="segment_normal" />
+                <Section section="splitter_normal" />
+                <Section section="label" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="segment_hover" />
+                <Section section="splitter_normal" />
+                <Section section="label" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="SplitterHover">
+            <Layer>
+                <Section section="segment_normal" />
+                <Section section="splitter_hover" />
+                <Section section="label" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DragGhost" clipped="false" >
+            <Layer priority="1" >
+                <Section section="segment_normal">
+                    <Colours topLeft="90FFFFFF" topRight="90FFFFFF" bottomLeft="90FFFFFF" bottomRight="90FFFFFF" />
+                </Section>
+                <Section section="splitter_normal">
+                    <Colours topLeft="90FFFFFF" topRight="90FFFFFF" bottomLeft="90FFFFFF" bottomRight="90FFFFFF" />
+                </Section>
+                <Section section="label">
+                    <Colours topLeft="90FFFFFF" topRight="90FFFFFF" bottomLeft="90FFFFFF" bottomRight="90FFFFFF" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="AscendingSortIcon">
+            <Layer>
+                <Section section="ascend_icon" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DescendingSortIcon">
+            <Layer>
+                <Section section="descend_icon" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="GhostAscendingSortIcon" clipped="false">
+            <Layer priority="1" >
+                <Section section="ascend_icon">
+                    <Colours topLeft="90FFFFFF" topRight="90FFFFFF" bottomLeft="90FFFFFF" bottomRight="90FFFFFF" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="GhostDescendingSortIcon" clipped="false">
+            <Layer priority="1" >
+                <Section section="descend_icon">
+                    <Colours topLeft="90FFFFFF" topRight="90FFFFFF" bottomLeft="90FFFFFF" bottomRight="90FFFFFF" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="segment_normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="splitter_normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/ListHeader
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ListHeader">
+        <Property name="SegmentWidgetType" value="TaharezLook/ListHeaderSegment" />
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/MultiColumnList
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/MultiColumnList">
+        <NamedArea name="ItemRenderingArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_listheader__" dimension="BottomEdge" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiListRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiListBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_listheader__" dimension="BottomEdge" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiListRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_listheader__" dimension="BottomEdge" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiListBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ItemRenderingAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiListLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_listheader__" dimension="BottomEdge" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/ListHeader" nameSuffix="__auto_listheader__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="2" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="2" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1" offset="-2" type="RightEdge" /></Dim>
+                <Dim type="Height" >
+                    <FontDim type="LineSpacing">
+                        <DimOperator op="Multiply">
+                            <AbsoluteDim value="1.5" />
+                        </DimOperator>
+                    </FontDim>
+                </Dim>
+            </Area>
+        </Child>
+        <Child  type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
+                <Dim type="Height" ><AbsoluteDim value="12" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><WidgetDim widget="__auto_listheader__" dimension="BottomEdge" /></Dim>
+                <Dim type="Width" ><AbsoluteDim value="12" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1" offset="-12" type="BottomEdge" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+        </Child>
+        <ImagerySection name="main">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="MultiListTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="MultiListTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="MultiListBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="MultiListBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="MultiListLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="MultiListRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="MultiListTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="MultiListBottom" />
+                <Image type="Background" imageset="TaharezLook" image="MultiListBackdrop" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/MultiLineEditbox
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/MultiLineEditbox">
+        <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="SelectedTextColour" initialValue="FF000000" redrawOnWrite="true" />
+        <PropertyDefinition name="ActiveSelectionColour" initialValue="FF607FFF" redrawOnWrite="true" />
+        <PropertyDefinition name="InactiveSelectionColour" initialValue="FF808080" redrawOnWrite="true" />
+        <Property name="MouseCursorImage" value="set:TaharezLook image:MouseTextBar" />
+        <Property name="SelectionBrushImage" value="set:TaharezLook image:MultiLineEditboxSelectionBrush" />
+        <NamedArea name="TextArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiLineEditboxRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiLineEditboxBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="TextAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiLineEditboxRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="TextAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="MultiLineEditboxBottom" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="TextAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxLeft" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MultiLineEditboxTop" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
+                <Dim type="Height" ><AbsoluteDim value="12" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><AbsoluteDim value="12" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+        </Child>
+        <ImagerySection name="main">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="MultiLineEditboxTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="MultiLineEditboxTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="MultiLineEditboxBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="MultiLineEditboxBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="MultiLineEditboxLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="MultiLineEditboxRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="MultiLineEditboxTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="MultiLineEditboxBottom" />
+                <Image type="Background" imageset="TaharezLook" image="MultiLineEditboxBackdrop" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="Carat">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><ImageDim imageset="TaharezLook" image="EditBoxCarat" dimension="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="EditBoxCarat" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="ReadOnly">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/Tooltip
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Tooltip">
+        <NamedArea name="TextArea">
+            <Area>
+                <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="TooltipLeftEdge" dimension="Width" /></Dim>
+                <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="TooltipTopEdge" dimension="Height" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="TooltipRightEdge" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="TooltipBottomEdge" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="main">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TooltipTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TooltipTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TooltipBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TooltipBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="TooltipLeftEdge" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TooltipRightEdge" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TooltipTopEdge" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TooltipBottomEdge" />
+                <Image type="Background" imageset="TaharezLook" image="TooltipMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="TooltipLeftEdge" dimension="Width" /></Dim>
+                    <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="TooltipTopEdge" dimension="Height" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="TooltipRightEdge" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1" type="BottomEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="TooltipBottomEdge" dimension="Height" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+                <Colours topLeft="FF000000" topRight="FF000000" bottomLeft="FF000000" bottomRight="FF000000" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="CentreAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+                <Section section="label" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main" />
+                <Section section="label" />
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/ScrollablePane
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ScrollablePane">
+        <NamedArea name="ViewableArea">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ViewableAreaHScroll">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ViewableAreaVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" ><UnifiedDim scale="1.0" type="BottomEdge" /></Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="ViewableAreaHVScroll">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_vscrollbar__" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_hscrollbar__" dimension="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/HorizontalScrollbar" nameSuffix="__auto_hscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="1" offset="-12" type="Width" /></Dim>
+                <Dim type="Height" ><AbsoluteDim value="12" /></Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+        </Child>
+        <Child  type="TaharezLook/VerticalScrollbar" nameSuffix="__auto_vscrollbar__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><AbsoluteDim value="12" /></Dim>
+                <Dim type="Height" ><UnifiedDim scale="1" offset="-12" type="Height" /></Dim>
+            </Area>
+            <HorzAlignment type="RightAligned" />
+        </Child>
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/TabButton
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/TabButton">
+        <PropertyDefinition name="NormalTextColour" initialValue="FFC0C0C0" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverTextColour" initialValue="FFE0E0E0" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="SelectedTextColour" initialValue="FFE0E0E0" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledTextColour" initialValue="FF7F7F7F" redrawOnWrite="true" />
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="CentreAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <ImagerySection name="top_normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TabButtonUpperLeftNormal" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TabButtonUpperRightNormal" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TabButtonLowerLeftNormal" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TabButtonLowerRight2Normal" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabButtonLeftNormal" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabButtonRightNormal" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TabButtonUpperNormal" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabButtonLowerNormal" />
+                <Image type="Background" imageset="TaharezLook" image="TabButtonMiddleNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="bot_normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TabButtonUpperLeft2Normal" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TabButtonUpperRightNormal" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TabButtonLowerLeftNormal" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TabButtonLowerRightNormal" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabButtonLeftNormal" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabButtonRightNormal" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TabButtonUpperNormal" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabButtonLowerNormal" />
+                <Image type="Background" imageset="TaharezLook" image="TabButtonMiddleNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="top_hover">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TabButtonUpperLeftNormal" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TabButtonUpperRightNormal" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TabButtonLowerLeftNormal" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TabButtonLowerRight2Normal" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabButtonLeftNormal" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabButtonRightNormal" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TabButtonUpperNormal" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabButtonLowerNormal" />
+                <Image type="Background" imageset="TaharezLook" image="TabButtonMiddleNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="bot_hover">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TabButtonUpperLeft2Normal" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TabButtonUpperRightNormal" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TabButtonLowerLeftNormal" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TabButtonLowerRightNormal" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabButtonLeftNormal" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabButtonRightNormal" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TabButtonUpperNormal" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabButtonLowerNormal" />
+                <Image type="Background" imageset="TaharezLook" image="TabButtonMiddleNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="top_selected">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TabButtonUpperLeftSelected" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TabButtonUpperSelected" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TabButtonUpperRightSelected" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabButtonLeftSelected" />
+                <Image type="Background" imageset="TaharezLook" image="TabButtonMiddleSelected" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabButtonRightSelected" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="bot_selected">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabButtonLeftSelected" />
+                <Image type="Background" imageset="TaharezLook" image="TabButtonMiddleSelected" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabButtonRightSelected" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TabButtonLowerLeftNormal" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabButtonLowerNormal" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TabButtonLowerRightNormal" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="TopNormal">
+            <Layer>
+                <Section section="top_normal" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="BottomNormal">
+            <Layer>
+                <Section section="bot_normal" />
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="TopHover">
+            <Layer>
+                <Section section="top_hover" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="BottomHover">
+            <Layer>
+                <Section section="bot_hover" />
+                <Section section="label">
+                    <ColourProperty name="HoverTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="TopSelected">
+            <Layer>
+                <Section section="top_selected" />
+                <Section section="label">
+                    <ColourProperty name="SelectedTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="BottomSelected">
+            <Layer>
+                <Section section="bot_selected" />
+                <Section section="label">
+                    <ColourProperty name="SelectedTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="TopPushed">
+            <Layer>
+                <Section section="top_normal" />
+                <Section section="label">
+                    <ColourProperty name="PushedTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="BottomPushed">
+            <Layer>
+                <Section section="bot_normal" />
+                <Section section="label">
+                    <ColourProperty name="PushedTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="TopDisabled">
+            <Layer>
+                <Section section="top_normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="BottomDisabled">
+            <Layer>
+                <Section section="bot_normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/TabContentPane
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/TabContentPane">
+        <PropertyDefinition name="EnableTop" initialValue="0" redrawOnWrite="true" layoutOnwrite="true" />
+        <PropertyDefinition name="EnableBottom" initialValue="0" redrawOnWrite="true" layoutOnwrite="true" />
+        <ImagerySection name="normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" >
+                        <ImageDim imageset="TaharezLook" image="TabContentPaneUpperLeft" dimension="Height">
+                            <DimOperator op="Multiply">
+                                <PropertyDim name="EnableTop" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="TabContentPaneUpperLeft" />
+                <Image type="TopEdge" imageset="TaharezLook" image="TabContentPaneUpper" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="TabContentPaneUpperRight" />
+            </FrameComponent>
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" >
+                        <ImageDim imageset="TaharezLook" image="TabContentPaneUpperLeft" dimension="Height">
+                            <DimOperator op="Multiply">
+                                <PropertyDim name="EnableTop" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1" type="Height">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="TabContentPaneLowerLeft" dimension="Height">
+                                    <DimOperator op="Multiply">
+                                        <PropertyDim name="EnableBottom" />
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+                <Image type="LeftEdge" imageset="TaharezLook" image="TabContentPaneLeft" />
+                <Image type="Background" imageset="TaharezLook" image="TabContentPaneMiddle" />
+                <Image type="RightEdge" imageset="TaharezLook" image="TabContentPaneRight" />
+            </FrameComponent>
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" >
+                        <UnifiedDim scale="1" type="Height">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="TabContentPaneLowerLeft" dimension="Height">
+                                    <DimOperator op="Multiply">
+                                        <PropertyDim name="EnableBottom" />
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="TabContentPaneLowerLeft" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabContentPaneLower" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="TabContentPaneLowerRight" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/TabButtonPane
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/TabButtonPane">
+        <PropertyDefinition name="EnableTop" initialValue="1" redrawOnWrite="true" layoutOnwrite="true" />
+        <PropertyDefinition name="EnableBottom" initialValue="1" redrawOnWrite="true" layoutOnwrite="true" />
+        <ImagerySection name="normal">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" >
+                        <ImageDim imageset="TaharezLook" image="TabHorizontalFiller" dimension="Height">
+                            <DimOperator op="Multiply">
+                                <PropertyDim name="EnableTop" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                </Area>
+                <Image type="TopEdge" imageset="TaharezLook" image="TabHorizontalFiller" />
+            </FrameComponent>
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" >
+                        <ImageDim imageset="TaharezLook" image="TabHorizontalFiller" dimension="Height">
+                            <DimOperator op="Multiply">
+                                <PropertyDim name="EnableTop" />
+                            </DimOperator>
+                        </ImageDim>
+                    </Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1" type="Height">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="TabHorizontalFiller" dimension="Height">
+                                    <DimOperator op="Multiply">
+                                        <PropertyDim name="EnableBottom" />
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+            </FrameComponent>
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" >
+                        <UnifiedDim scale="1" type="Height">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="TabHorizontalFiller" dimension="Height">
+                                    <DimOperator op="Multiply">
+                                        <PropertyDim name="EnableBottom" />
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="BottomEdge" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="BottomEdge" imageset="TaharezLook" image="TabHorizontalFiller" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/TabControl
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/TabControl">
+        <Property name="TabButtonType" value="TaharezLook/TabButton" />
+        <Property name="TabTextPadding" value="{0,6}" />
+        <Child type="TaharezLook/TabContentPane" nameSuffix="__auto_TabPane__">
+            <Area>
+                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge"><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="TopEdge">
+                    <PropertyDim widget="__auto_TabPane__" name="EnableBottom">
+                        <DimOperator op="Multiply">
+                            <PropertyDim name="TabHeight" type="Height" />
+                        </DimOperator>
+                    </PropertyDim>
+                </Dim>
+                <Dim type="Height">
+                    <UnifiedDim scale="1" type="Height">
+                        <DimOperator op="Subtract">
+                            <PropertyDim name="TabHeight" type="Height" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </Child>
+        <Child  type="TaharezLook/TabButtonPane" nameSuffix="__auto_TabPane__Buttons">
+            <Area>
+                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="RightEdge"><UnifiedDim scale="1" type="Width" /></Dim>
+                <Dim type="TopEdge">
+                    <PropertyDim widget="__auto_TabPane__Buttons" name="EnableTop">
+                        <DimOperator op="Multiply">
+                            <UnifiedDim scale="1" type="Height">
+                                <DimOperator op="Subtract">
+                                    <PropertyDim name="TabHeight" type="Height" />
+                                </DimOperator>
+                            </UnifiedDim>
+                        </DimOperator>
+                    </PropertyDim>
+                </Dim>
+                <Dim type="Height"><PropertyDim name="TabHeight" type="Height" /></Dim>
+            </Area>
+        </Child>
+        <Child type="TaharezLook/SystemButton" nameSuffix="__auto_TabPane__ScrollLeft">
+            <Area>
+                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge">
+                    <WidgetDim widget="__auto_TabPane__Buttons" dimension="TopEdge" />
+                </Dim>
+                <Dim type="Width">
+                    <WidgetDim widget="__auto_TabPane__Buttons" dimension="Height">
+                        <DimOperator op="Multiply">
+                            <ImageDim imageset="TaharezLook" image="TabButtonScrollLeftNormal" dimension="Width">
+                                <DimOperator op="Divide">
+                                    <ImageDim imageset="TaharezLook" image="TabButtonScrollLeftNormal" dimension="Height" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </WidgetDim>
+                </Dim>
+                <Dim type="BottomEdge">
+                    <WidgetDim widget="__auto_TabPane__Buttons" dimension="BottomEdge" />
+                </Dim>
+            </Area>
+            <Property name="AlwaysOnTop" value="True" />
+            <Property name="NormalImage" value="set:TaharezLook image:TabButtonScrollLeftNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:TabButtonScrollLeftHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:TabButtonScrollLeftHover" />
+        </Child>
+        <Child type="TaharezLook/SystemButton" nameSuffix="__auto_TabPane__ScrollRight">
+            <Area>
+                <Dim type="Width">
+                    <WidgetDim widget="__auto_TabPane__Buttons" dimension="Height">
+                        <DimOperator op="Multiply">
+                            <ImageDim imageset="TaharezLook" image="TabButtonScrollRightNormal" dimension="Width">
+                                <DimOperator op="Divide">
+                                    <ImageDim imageset="TaharezLook" image="TabButtonScrollRightNormal" dimension="Height" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </WidgetDim>
+                </Dim>
+                <Dim type="LeftEdge">
+                    <UnifiedDim scale="1" type="Width">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_TabPane__ScrollRight" dimension="Width" />
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="TopEdge">
+                    <WidgetDim widget="__auto_TabPane__Buttons" dimension="TopEdge" />
+                </Dim>
+                <Dim type="Height"><AbsoluteDim value="0" />
+                    <WidgetDim widget="__auto_TabPane__Buttons" dimension="Height" />
+                </Dim>
+            </Area>
+            <Property name="AlwaysOnTop" value="True" />
+            <Property name="NormalImage" value="set:TaharezLook image:TabButtonScrollRightNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:TabButtonScrollRightHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:TabButtonScrollRightHover" />
+        </Child>
+        <StateImagery name="Enabled" />
+        <StateImagery name="Disabled" />
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/MenuItem
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/MenuItem">
+        <PropertyDefinition name="NormalTextColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledTextColour" initialValue="FF7F7F7F" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="OpenedColour" initialValue="FFFFFFFF" redrawOnWrite="true" />
+        <Property name="WantsMultiClickEvents" value="False" />
+        <NamedArea name="ContentSize">
+            <Area>
+                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width">
+                    <FontDim type="HorzExtent">
+                        <DimOperator op="Add">
+                            <ImageDim imageset="TaharezLook" image="MenuLeft" dimension="Width">
+                                <DimOperator op="Add">
+                                    <ImageDim imageset="TaharezLook" image="MenuRight" dimension="Width" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </FontDim>
+                </Dim>
+                <Dim type="Height">
+                    <FontDim type="LineSpacing">
+                        <DimOperator op="Add">
+                            <ImageDim imageset="TaharezLook" image="MenuTop" dimension="Height">
+                                <DimOperator op="Add">
+                                    <ImageDim imageset="TaharezLook" image="MenuBottom" dimension="Height" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </FontDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <NamedArea name="HasPopupContentSize">
+            <Area>
+                <Dim type="LeftEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge"><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width">
+                    <FontDim type="HorzExtent">
+                        <DimOperator op="Add">
+                            <ImageDim imageset="TaharezLook" image="MenuLeft" dimension="Width">
+                                <DimOperator op="Add">
+                                    <ImageDim imageset="TaharezLook" image="MenuRight" dimension="Width">
+                                        <DimOperator op="Add">
+                                            <ImageDim imageset="TaharezLook" image="PopupMenuArrowLeft" dimension="Width">
+                                                <DimOperator op="Multiply">
+                                                    <AbsoluteDim value="3" />
+                                                </DimOperator>
+                                            </ImageDim>
+                                        </DimOperator>
+                                    </ImageDim>
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </FontDim>
+                </Dim>
+                <Dim type="Height">
+                    <FontDim type="LineSpacing">
+                        <DimOperator op="Add">
+                            <ImageDim imageset="TaharezLook" image="MenuTop" dimension="Height">
+                                <DimOperator op="Add">
+                                    <ImageDim imageset="TaharezLook" image="MenuBottom" dimension="Height" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </FontDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="label">
+            <TextComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><ImageDim imageset="TaharezLook" image="MenuLeft" dimension="Width" /></Dim>
+                    <Dim type="TopEdge" ><ImageDim imageset="TaharezLook" image="MenuTop" dimension="Height" /></Dim>
+                    <Dim type="RightEdge" >
+                        <UnifiedDim scale="1" type="RightEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="MenuRight" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1" type="BottomEdge">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="MenuBottom" dimension="Height" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="LeftAligned" />
+            </TextComponent>
+        </ImagerySection>
+        <ImagerySection name="frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="MenuTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="MenuTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="MenuBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="MenuBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="MenuLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="MenuRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="MenuTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="MenuBottom" />
+                <Image type="Background" imageset="TaharezLook" image="MenuMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <ImagerySection name="popup_arrow_right">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" >
+                        <UnifiedDim scale="1" type="Width">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="PopupMenuArrowRight" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="PopupMenuArrowRight" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="popup_arrow_left">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" >
+                        <UnifiedDim scale="1" type="Width">
+                            <DimOperator op="Subtract">
+                                <ImageDim imageset="TaharezLook" image="PopupMenuArrowLeft" dimension="Width" />
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="PopupMenuArrowLeft" />
+                <VertFormat type="CentreAligned" />
+                <HorzFormat type="RightAligned" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="EnabledNormal">
+            <Layer>
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="EnabledHover">
+            <Layer>
+                <Section section="frame">
+                    <ColourProperty name="HoverColour" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="EnabledPushed">
+            <Layer>
+                <Section section="frame">
+                    <ColourProperty name="PushedColour" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="EnabledPopupOpen">
+            <Layer>
+                <Section section="frame">
+                    <ColourProperty name="OpenedColour" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="NormalTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledNormal">
+            <Layer>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledHover">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledPushed">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="DisabledPopupOpen">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+                <Section section="label">
+                    <ColourProperty name="DisabledTextColour" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="PopupClosedIcon">
+            <Layer>
+                <Section section="popup_arrow_right" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="PopupOpenIcon">
+            <Layer>
+                <Section section="popup_arrow_left" />
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/PopupMenu
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/PopupMenu">
+        <PropertyDefinition name="BackgroundColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="BorderWidth" initialValue="0" layoutOnWrite="true" />
+        <NamedArea name="ItemRenderArea">
+            <Area>
+                <Dim type="LeftEdge" >
+                    <ImageDim imageset="TaharezLook" image="PopupMenuFrameLeft" dimension="Width">
+                        <DimOperator op="Add">
+                            <PropertyDim name="BorderWidth" />
+                        </DimOperator>
+                    </ImageDim>
+                </Dim>
+                <Dim type="TopEdge" >
+                    <ImageDim imageset="TaharezLook" image="PopupMenuFrameTop" dimension="Height">
+                        <DimOperator op="Add">
+                            <PropertyDim name="BorderWidth" />
+                        </DimOperator>
+                    </ImageDim>
+                </Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="PopupMenuFrameRight" dimension="Width">
+                                <DimOperator op="Add">
+                                    <PropertyDim name="BorderWidth" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="PopupMenuFrameBottom" dimension="Height">
+                                <DimOperator op="Add">
+                                    <PropertyDim name="BorderWidth" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="PopupMenuFrameTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="PopupMenuFrameTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="PopupMenuFrameBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="PopupMenuFrameBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="PopupMenuFrameLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="PopupMenuFrameRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="PopupMenuFrameTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="PopupMenuFrameBottom" />
+                <Image type="Background" imageset="TaharezLook" image="PopupMenuMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="frame">
+                    <ColourRectProperty name="BackgroundColours" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    
+    <!--
+    ***************************************************
+        TaharezLook/Menubar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/Menubar">
+        <PropertyDefinition name="BackgroundColours" initialValue="tl:FFFFFFFF tr:FFFFFFFF bl:FFFFFFFF br:FFFFFFFF" redrawOnWrite="true" />
+        <PropertyDefinition name="BorderWidth" initialValue="5" layoutOnWrite="true" />
+        <NamedArea name="ItemRenderArea">
+            <Area>
+                <Dim type="LeftEdge" >
+                    <ImageDim imageset="TaharezLook" image="PopupMenuFrameLeft" dimension="Width">
+                        <DimOperator op="Add">
+                            <PropertyDim name="BorderWidth" />
+                        </DimOperator>
+                    </ImageDim>
+                </Dim>
+                <Dim type="TopEdge" >
+                    <ImageDim imageset="TaharezLook" image="PopupMenuFrameTop" dimension="Height">
+                        <DimOperator op="Add">
+                            <PropertyDim name="BorderWidth" />
+                        </DimOperator>
+                    </ImageDim>
+                </Dim>
+                <Dim type="RightEdge" >
+                    <UnifiedDim scale="1" type="RightEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="PopupMenuFrameRight" dimension="Width">
+                                <DimOperator op="Add">
+                                    <PropertyDim name="BorderWidth" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <ImageDim imageset="TaharezLook" image="PopupMenuFrameBottom" dimension="Height">
+                                <DimOperator op="Add">
+                                    <PropertyDim name="BorderWidth" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <ImagerySection name="frame">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopLeftCorner" imageset="TaharezLook" image="PopupMenuFrameTopLeft" />
+                <Image type="TopRightCorner" imageset="TaharezLook" image="PopupMenuFrameTopRight" />
+                <Image type="BottomLeftCorner" imageset="TaharezLook" image="PopupMenuFrameBottomLeft" />
+                <Image type="BottomRightCorner" imageset="TaharezLook" image="PopupMenuFrameBottomRight" />
+                <Image type="LeftEdge" imageset="TaharezLook" image="PopupMenuFrameLeft" />
+                <Image type="RightEdge" imageset="TaharezLook" image="PopupMenuFrameRight" />
+                <Image type="TopEdge" imageset="TaharezLook" image="PopupMenuFrameTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="PopupMenuFrameBottom" />
+                <Image type="Background" imageset="TaharezLook" image="PopupMenuMiddle" />
+            </FrameComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="frame">
+                    <ColourRectProperty name="BackgroundColours" />
+                </Section>
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="frame">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/LargeVerticalScrollbarThumb
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/LargeVerticalScrollbarThumb">
+        <Property name="VertFree" value="True" />
+        <ImagerySection name="normal">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="VertScrollThumbNormal" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1.0" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1.0" type="Height" /></Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="VertScrollThumbHover" />
+                <VertFormat type="Stretched" />
+                <HorzFormat type="Stretched" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Pushed">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="normal">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+    
+    <!--
+    ***************************************************
+        TaharezLook/LargeVerticalScrollbar
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/LargeVerticalScrollbar">
+        <Property name="VerticalScrollbar" value="True" />
+        <NamedArea name="ThumbTrackArea">
+            <Area>
+                <Dim type="LeftEdge" ><UnifiedDim scale="0.325" type="LeftEdge" /></Dim>
+                <Dim type="TopEdge" >
+                    <WidgetDim widget="__auto_decbtn__" dimension="Height">
+                        <DimOperator op="Add">
+                            <ImageDim imageset="TaharezLook" image="VertScrollTop" dimension="Height">
+                                <DimOperator op="Multiply">
+                                    <AbsoluteDim value="0.5" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </WidgetDim>
+                </Dim>
+                <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                <Dim type="BottomEdge" >
+                    <UnifiedDim scale="1.0" type="BottomEdge">
+                        <DimOperator op="Subtract">
+                            <WidgetDim widget="__auto_decbtn__" dimension="Height">
+                                <DimOperator op="Add">
+                                    <ImageDim imageset="TaharezLook" image="VertScrollTop" dimension="Height">
+                                        <DimOperator op="Multiply">
+                                            <AbsoluteDim value="0.5" />
+                                        </DimOperator>
+                                    </ImageDim>
+                                </DimOperator>
+                            </WidgetDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </NamedArea>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_incbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><UnifiedDim scale="0.25" type="LeftEdge" /></Dim>
+                <Dim type="TopEdge" >
+                    <AbsoluteDim value="-1">
+                        <DimOperator op="Multiply">
+                            <ImageDim imageset="TaharezLook" image="VertScrollTop" dimension="Height">
+                                <DimOperator op="Multiply">
+                                    <AbsoluteDim value="0.5" />
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </AbsoluteDim>
+                </Dim>
+                <Dim type="Width" ><UnifiedDim scale="0.6" type="Width" /></Dim>
+                <Dim type="Height" >
+                    <UnifiedDim scale="0.6" type="Width">
+                        <DimOperator op="Multiply">
+                            <ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Width">
+                                <DimOperator op="Divide">
+                                    <ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Height"/>
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+            <VertAlignment type="BottomAligned" />
+            <Property name="NormalImage" value="set:TaharezLook image:VertScrollDownNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:VertScrollDownHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:VertScrollDownNormal" />
+        </Child>
+        <Child  type="TaharezLook/ImageButton" nameSuffix="__auto_decbtn__">
+            <Area>
+                <Dim type="LeftEdge" ><UnifiedDim scale="0.25" type="LeftEdge" /></Dim>
+                <Dim type="TopEdge">
+                    <ImageDim imageset="TaharezLook" image="VertScrollTop" dimension="Height">
+                        <DimOperator op="Multiply">
+                            <AbsoluteDim value="0.5" />
+                        </DimOperator>
+                    </ImageDim>
+                </Dim>
+                <Dim type="Width" ><UnifiedDim scale="0.6" type="Width" /></Dim>
+                <Dim type="Height" >
+                    <UnifiedDim scale="0.6" type="Width">
+                        <DimOperator op="Multiply">
+                            <ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Width">
+                                <DimOperator op="Divide">
+                                    <ImageDim imageset="TaharezLook" image="VertScrollUpNormal" dimension="Height"/>
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+            <Property name="NormalImage" value="set:TaharezLook image:VertScrollUpNormal" />
+            <Property name="HoverImage" value="set:TaharezLook image:VertScrollUpHover" />
+            <Property name="PushedImage" value="set:TaharezLook image:VertScrollUpNormal" />
+        </Child>
+        <Child  type="TaharezLook/LargeVerticalScrollbarThumb" nameSuffix="__auto_thumb__">
+            <Area>
+                <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                <Dim type="Width" ><UnifiedDim scale="0.4" type="Width" /></Dim>
+                <Dim type="Height" >
+                    <UnifiedDim scale="0.4" type="Width">
+                        <DimOperator op="Multiply">
+                            <ImageDim imageset="TaharezLook" image="VertScrollThumbNormal" dimension="Height">
+                                <DimOperator op="Divide">
+                                    <ImageDim imageset="TaharezLook" image="VertScrollThumbNormal" dimension="Width"/>
+                                </DimOperator>
+                            </ImageDim>
+                        </DimOperator>
+                    </UnifiedDim>
+                </Dim>
+            </Area>
+        </Child>
+        <ImagerySection name="main">
+            <FrameComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <Image type="TopEdge" imageset="TaharezLook" image="VertScrollTop" />
+                <Image type="BottomEdge" imageset="TaharezLook" image="VertScrollBottom" />
+                <Image type="Background" imageset="TaharezLook" image="VertScrollMiddle" />
+            </FrameComponent>
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><UnifiedDim scale="0.45" type="LeftEdge" /></Dim>
+                    <Dim type="TopEdge" >
+                        <WidgetDim widget="__auto_decbtn__" dimension="Height">
+                            <DimOperator op="Add">
+                                <ImageDim imageset="TaharezLook" image="VertScrollTop" dimension="Height">
+                                    <DimOperator op="Multiply">
+                                        <AbsoluteDim value="0.5" />
+                                    </DimOperator>
+                                </ImageDim>
+                            </DimOperator>
+                        </WidgetDim>
+                    </Dim>
+                    <Dim type="RightEdge" ><UnifiedDim scale="1.0" type="RightEdge" /></Dim>
+                    <Dim type="BottomEdge" >
+                        <UnifiedDim scale="1.0" type="BottomEdge">
+                            <DimOperator op="Subtract">
+                                <WidgetDim widget="__auto_decbtn__" dimension="Height">
+                                    <DimOperator op="Add">
+                                        <ImageDim imageset="TaharezLook" image="VertScrollTop" dimension="Height">
+                                            <DimOperator op="Multiply">
+                                                <AbsoluteDim value="0.5" />
+                                            </DimOperator>
+                                        </ImageDim>
+                                    </DimOperator>
+                                </WidgetDim>
+                            </DimOperator>
+                        </UnifiedDim>
+                    </Dim>
+                </Area>
+                <Image imageset="TaharezLook" image="VertScrollBarSegment" />
+                <VertFormat type="Tiled" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Enabled">
+            <Layer>
+                <Section section="main" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="main">
+                    <Colours topLeft="FF7F7F7F" topRight="FF7F7F7F" bottomLeft="FF7F7F7F" bottomRight="FF7F7F7F" />
+                </Section>
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+
+    <!--
+    ***************************************************
+        TaharezLook/ImageButton
+    ***************************************************
+    -->
+    <WidgetLook name="TaharezLook/ImageButton">
+        <PropertyDefinition name="NormalImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="HoverImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="PushedImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="DisabledImage" initialValue="" redrawOnWrite="true" />
+        <PropertyDefinition name="VertImageFormatting" initialValue="Stretched" redrawOnWrite="true" />
+        <PropertyDefinition name="HorzImageFormatting" initialValue="Stretched" redrawOnWrite="true" />
+        <ImagerySection name="normal">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="NormalImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="hover">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="HoverImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="pushed">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="PushedImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <ImagerySection name="disabled">
+            <ImageryComponent>
+                <Area>
+                    <Dim type="LeftEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="TopEdge" ><AbsoluteDim value="0" /></Dim>
+                    <Dim type="Width" ><UnifiedDim scale="1" type="Width" /></Dim>
+                    <Dim type="Height" ><UnifiedDim scale="1" type="Height" /></Dim>
+                </Area>
+                <ImageProperty name="DisabledImage" />
+                <VertFormatProperty name="VertImageFormatting" />
+                <HorzFormatProperty name="HorzImageFormatting" />
+            </ImageryComponent>
+        </ImagerySection>
+        <StateImagery name="Normal">
+            <Layer>
+                <Section section="normal" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Hover">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Pushed">
+            <Layer>
+                <Section section="pushed" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="PushedOff">
+            <Layer>
+                <Section section="hover" />
+            </Layer>
+        </StateImagery>
+        <StateImagery name="Disabled">
+            <Layer>
+                <Section section="disabled" />
+            </Layer>
+        </StateImagery>
+    </WidgetLook>
+
+</Falagard>
+
Index: /code/branches/network/Media/gui/TaharezLookSkin.scheme
===================================================================
--- /code/branches/network/Media/gui/TaharezLookSkin.scheme	(revision 861)
+++ /code/branches/network/Media/gui/TaharezLookSkin.scheme	(revision 861)
@@ -0,0 +1,48 @@
+<?xml version="1.0" ?>
+<GUIScheme Name="TaharezLook">
+	<Imageset Name="TaharezLook" Filename="TaharezLook.imageset" />
+    <Font Name="BlueHighway-12" Filename="bluehighway-12.font" />
+    <Font Name="BlueHighway-10" Filename="bluehighway-10.font" />
+    <Font Name="BlueHighway-8" Filename="bluehighway-8.font" />
+	<LookNFeel Filename="TaharezLook.looknfeel" />
+	<WindowRendererSet Filename="CEGUIFalagardWRBase" />
+	<FalagardMapping WindowType="TaharezLook/Button"      TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="TaharezLook/Button" />
+	<FalagardMapping WindowType="TaharezLook/Checkbox"    TargetType="CEGUI/Checkbox"    Renderer="Falagard/ToggleButton" LookNFeel="TaharezLook/Checkbox" />
+	<FalagardMapping WindowType="TaharezLook/ImageButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/Button"       LookNFeel="TaharezLook/ImageButton" />
+	<FalagardMapping WindowType="TaharezLook/RadioButton" TargetType="CEGUI/RadioButton" Renderer="Falagard/ToggleButton" LookNFeel="TaharezLook/RadioButton" />
+	<FalagardMapping WindowType="TaharezLook/FrameWindow"  TargetType="CEGUI/FrameWindow" Renderer="Falagard/FrameWindow"  LookNFeel="TaharezLook/FrameWindow" />
+	<FalagardMapping WindowType="TaharezLook/Titlebar"     TargetType="CEGUI/Titlebar"    Renderer="Falagard/Titlebar"     LookNFeel="TaharezLook/Titlebar" />
+	<FalagardMapping WindowType="TaharezLook/SystemButton" TargetType="CEGUI/PushButton"  Renderer="Falagard/SystemButton" LookNFeel="TaharezLook/Button" />
+	<FalagardMapping WindowType="TaharezLook/Editbox"          TargetType="CEGUI/Editbox"          Renderer="Falagard/Editbox"          LookNFeel="TaharezLook/Editbox" />
+	<FalagardMapping WindowType="TaharezLook/MultiLineEditbox" TargetType="CEGUI/MultiLineEditbox" Renderer="Falagard/MultiLineEditbox" LookNFeel="TaharezLook/MultiLineEditbox" />
+	<FalagardMapping WindowType="TaharezLook/Menubar"   TargetType="CEGUI/Menubar"   Renderer="Falagard/Menubar"   LookNFeel="TaharezLook/Menubar" />
+	<FalagardMapping WindowType="TaharezLook/PopupMenu" TargetType="CEGUI/PopupMenu" Renderer="Falagard/PopupMenu" LookNFeel="TaharezLook/PopupMenu" />
+	<FalagardMapping WindowType="TaharezLook/MenuItem"  TargetType="CEGUI/MenuItem"  Renderer="Falagard/MenuItem"  LookNFeel="TaharezLook/MenuItem" />
+	<FalagardMapping WindowType="TaharezLook/AlternateProgressBar" TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/AltProgressBar" />
+	<FalagardMapping WindowType="TaharezLook/ProgressBar"          TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/ProgressBar" />
+	<FalagardMapping WindowType="TaharezLook/VUMeter"              TargetType="CEGUI/ProgressBar" Renderer="Falagard/ProgressBar" LookNFeel="TaharezLook/VUMeter" />
+	<FalagardMapping WindowType="TaharezLook/VerticalScrollbar"   TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="TaharezLook/VerticalScrollbar" />
+	<FalagardMapping WindowType="TaharezLook/HorizontalScrollbar" TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="TaharezLook/HorizontalScrollbar" />
+	<FalagardMapping WindowType="TaharezLook/VerticalScrollbarThumb"   TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="TaharezLook/VerticalScrollbarThumb" />
+	<FalagardMapping WindowType="TaharezLook/HorizontalScrollbarThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button" LookNFeel="TaharezLook/HorizontalScrollbarThumb" />
+	<FalagardMapping WindowType="TaharezLook/LargeVerticalScrollbar"      TargetType="CEGUI/Scrollbar" Renderer="Falagard/Scrollbar" LookNFeel="TaharezLook/LargeVerticalScrollbar" />
+	<FalagardMapping WindowType="TaharezLook/LargeVerticalScrollbarThumb" TargetType="CEGUI/Thumb"     Renderer="Falagard/Button"    LookNFeel="TaharezLook/LargeVerticalScrollbarThumb" />
+	<FalagardMapping WindowType="TaharezLook/TabButton"  TargetType="CEGUI/TabButton"  Renderer="Falagard/TabButton"  LookNFeel="TaharezLook/TabButton" />
+	<FalagardMapping WindowType="TaharezLook/TabControl" TargetType="CEGUI/TabControl" Renderer="Falagard/TabControl" LookNFeel="TaharezLook/TabControl" />
+	<FalagardMapping WindowType="TaharezLook/TabContentPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="TaharezLook/TabContentPane" />
+	<FalagardMapping WindowType="TaharezLook/TabButtonPane"    TargetType="DefaultWindow"    Renderer="Falagard/Default"    LookNFeel="TaharezLook/TabButtonPane" />
+	<FalagardMapping WindowType="TaharezLook/ComboDropList" TargetType="CEGUI/ComboDropList" Renderer="Falagard/Listbox" LookNFeel="TaharezLook/ComboDropList" />
+	<FalagardMapping WindowType="TaharezLook/ComboEditbox"  TargetType="CEGUI/Editbox"	 Renderer="Falagard/Editbox" LookNFeel="TaharezLook/ComboEditbox" />
+	<FalagardMapping WindowType="TaharezLook/Combobox"	TargetType="CEGUI/Combobox"	 Renderer="Falagard/Default" LookNFeel="TaharezLook/Combobox" />
+	<FalagardMapping WindowType="TaharezLook/Listbox"           TargetType="CEGUI/Listbox"           Renderer="Falagard/Listbox"           LookNFeel="TaharezLook/Listbox" />
+	<FalagardMapping WindowType="TaharezLook/ListHeader"        TargetType="CEGUI/ListHeader"        Renderer="Falagard/ListHeader"        LookNFeel="TaharezLook/ListHeader" />
+	<FalagardMapping WindowType="TaharezLook/ListHeaderSegment" TargetType="CEGUI/ListHeaderSegment" Renderer="Falagard/ListHeaderSegment" LookNFeel="TaharezLook/ListHeaderSegment" />
+	<FalagardMapping WindowType="TaharezLook/MultiColumnList"   TargetType="CEGUI/MultiColumnList"   Renderer="Falagard/MultiColumnList"   LookNFeel="TaharezLook/MultiColumnList" />
+	<FalagardMapping WindowType="TaharezLook/Slider"      TargetType="CEGUI/Slider"      Renderer="Falagard/Slider"  LookNFeel="TaharezLook/Slider" />
+	<FalagardMapping WindowType="TaharezLook/SliderThumb" TargetType="CEGUI/Thumb" Renderer="Falagard/Button"  LookNFeel="TaharezLook/SliderThumb" />
+	<FalagardMapping WindowType="TaharezLook/ScrollablePane" TargetType="CEGUI/ScrollablePane" Renderer="Falagard/ScrollablePane" LookNFeel="TaharezLook/ScrollablePane" />
+	<FalagardMapping WindowType="TaharezLook/Spinner" TargetType="CEGUI/Spinner" Renderer="Falagard/Default" LookNFeel="TaharezLook/Spinner" />
+	<FalagardMapping WindowType="TaharezLook/Tooltip" TargetType="CEGUI/Tooltip" Renderer="Falagard/Tooltip" LookNFeel="TaharezLook/Tooltip" />
+	<FalagardMapping WindowType="TaharezLook/StaticImage" TargetType="DefaultWindow" Renderer="Falagard/StaticImage" LookNFeel="TaharezLook/StaticImage" />
+	<FalagardMapping WindowType="TaharezLook/StaticText"  TargetType="DefaultWindow" Renderer="Falagard/StaticText"  LookNFeel="TaharezLook/StaticText" />
+</GUIScheme>
Index: /code/branches/network/Media/gui/TaharezLookWidgetAliases.scheme
===================================================================
--- /code/branches/network/Media/gui/TaharezLookWidgetAliases.scheme	(revision 861)
+++ /code/branches/network/Media/gui/TaharezLookWidgetAliases.scheme	(revision 861)
@@ -0,0 +1,34 @@
+<?xml version="1.0" ?>
+<GUIScheme Name="TaharezLookWidgetAliases">
+	<WindowAlias Alias="Taharez AltProgressBar" Target="TaharezLook/AlternateProgressBar" />
+	<WindowAlias Alias="Taharez Button" Target="TaharezLook/Button" />
+	<WindowAlias Alias="Taharez Checkbox" Target="TaharezLook/Checkbox" />
+	<WindowAlias Alias="Taharez Close Button" Target="TaharezLook/CloseButton" />
+	<WindowAlias Alias="Taharez Combobox" Target="TaharezLook/Combobox" />
+	<WindowAlias Alias="Taharez ComboDropList" Target="TaharezLook/ComboDropList" />
+	<WindowAlias Alias="Taharez ComboEditbox" Target="TaharezLook/ComboEditbox" />
+	<WindowAlias Alias="Taharez Editbox" Target="TaharezLook/Editbox" />
+	<WindowAlias Alias="Taharez Frame Window" Target="TaharezLook/FrameWindow" />
+	<WindowAlias Alias="Taharez Listbox" Target="TaharezLook/Listbox" />
+	<WindowAlias Alias="Taharez ListHeader" Target="TaharezLook/ListHeader" />
+	<WindowAlias Alias="Taharez ListHeaderSegment" Target="TaharezLook/ListHeaderSegment" />
+	<WindowAlias Alias="Taharez MiniHorzScrollbar" Target="TaharezLook/HorizontalScrollbar" />
+	<WindowAlias Alias="Taharez MiniHorzScrollbarThumb" Target="TaharezLook/HorizontalScrollbarThumb" />
+	<WindowAlias Alias="Taharez MiniVertScrollbar" Target="TaharezLook/VerticalScrollbar" />
+	<WindowAlias Alias="Taharez MiniVertScrollbarThumb" Target="TaharezLook/VerticalScrollbarThumb" />
+	<WindowAlias Alias="Taharez MultiColumnList" Target="TaharezLook/MultiColumnList" />
+	<WindowAlias Alias="Taharez MultiLineEditbox" Target="TaharezLook/MultiLineEditbox" />
+	<WindowAlias Alias="Taharez ProgressBar" Target="TaharezLook/ProgressBar" />
+	<WindowAlias Alias="Taharez RadioButton" Target="TaharezLook/RadioButton" />
+	<WindowAlias Alias="Taharez Slider" Target="TaharezLook/Slider" />
+	<WindowAlias Alias="Taharez Slider Thumb" Target="TaharezLook/SliderThumb" />
+	<WindowAlias Alias="Taharez StaticImage" Target="TaharezLook/StaticImage" />
+	<WindowAlias Alias="Taharez StaticText" Target="TaharezLook/StaticText" />
+	<WindowAlias Alias="Taharez Tab Button" Target="TaharezLook/TabButton" />
+	<WindowAlias Alias="Taharez Tab Pane" Target="TaharezLook/TabPane" />
+	<WindowAlias Alias="Taharez Tab Control" Target="TaharezLook/TabControl" />
+	<WindowAlias Alias="Taharez Titlebar" Target="TaharezLook/Titlebar" />
+	<WindowAlias Alias="Taharez VertScrollbar" Target="TaharezLook/LargeVerticalScrollbar" />
+	<WindowAlias Alias="Taharez VertScrollbarThumb" Target="TaharezLook/LargeVerticalScrollbarThumb" />
+</GUIScheme>
+
Index: /code/branches/network/Media/gui/bluehighway-10.font
===================================================================
--- /code/branches/network/Media/gui/bluehighway-10.font	(revision 861)
+++ /code/branches/network/Media/gui/bluehighway-10.font	(revision 861)
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<Font Name="BlueHighway-10" Filename="bluehigh.ttf" Type="FreeType" Size="10" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="false" AntiAlias="true" />
Index: /code/branches/network/Media/gui/bluehighway-12.font
===================================================================
--- /code/branches/network/Media/gui/bluehighway-12.font	(revision 861)
+++ /code/branches/network/Media/gui/bluehighway-12.font	(revision 861)
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<Font Name="BlueHighway-12" Filename="bluehigh.ttf" Type="FreeType" Size="12" NativeHorzRes="800" NativeVertRes="600" AutoScaled="true"/>
Index: /code/branches/network/Media/gui/bluehighway-8.font
===================================================================
--- /code/branches/network/Media/gui/bluehighway-8.font	(revision 861)
+++ /code/branches/network/Media/gui/bluehighway-8.font	(revision 861)
@@ -0,0 +1,2 @@
+<?xml version="1.0" ?>
+<Font Name="BlueHighway-8" Filename="bluehigh.ttf" Type="FreeType" Size="8" NativeHorzRes="1024" NativeVertRes="768" AutoScaled="true" AntiAlias="true" />
Index: /code/branches/network/Media/gui/cegui8.layout
===================================================================
--- /code/branches/network/Media/gui/cegui8.layout	(revision 861)
+++ /code/branches/network/Media/gui/cegui8.layout	(revision 861)
@@ -0,0 +1,130 @@
+<?xml version="1.0" ?>
+<!-- Layout file from CEGUI Demo8 -->
+<GUILayout>
+<Window Type="DefaultGUISheet" Name="demo_root">
+
+	<Window Type="DefaultGUISheet" Name="Demo8">
+
+		<Property Name="UnifiedMaxSize" Value="{{1,0},{2,0}}" />
+		<Property Name="UnifiedSize" Value="{{1,0},{2,0}}"  />
+
+		<Window Type="TaharezLook/VerticalScrollbar" Name="Demo8/ViewScroll">
+			<Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}"  />
+			<Property Name="UnifiedSize" Value="{{0.03,0},{0.75,0}}"  />
+			<Property Name="DocumentSize" Value="2" />
+			<Property Name="PageSize" Value="1" />
+			<Property Name="StepSize" Value="0.01" />
+			<Property Name="OverlapSize" Value="0.5" />
+		</Window>
+
+        <Window Type="TaharezLook/FrameWindow" Name="Demo8/Window1">
+			<Property Name="UnifiedPosition" Value="{{0.05,0},{0.1,0}}"  />
+			<Property Name="UnifiedMaxSize" Value="{{0.5,0},{1,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0,128},{0,128}}" />
+			<Property Name="UnifiedSize" Value="{{0.4,0},{0.35,0}}"  />
+			<Property Name="Text" Value="Demo 8 - Listbox Demo" />
+
+			<Window Type="TaharezLook/Listbox" Name="Demo8/Window1/Listbox">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.1,0}}"  />
+				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.9,0},{0.33,0}}"  />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="Demo8/Window1/Controls">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.45,0}}"  />
+				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.9,0},{0.5,0}}"  />
+
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Demo8/Window1/Controls/Red">
+					<Property Name="UnifiedPosition" Value="{{0.05,0},{0.05,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.9,0},{0.06,0}}"  />
+					<Property Name="DocumentSize" Value="255" />
+					<Property Name="PageSize" Value="16" />
+					<Property Name="StepSize" Value="1" />
+					<Property Name="OverlapSize" Value="1" />
+				</Window>
+
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Demo8/Window1/Controls/Green">
+					<Property Name="UnifiedPosition" Value="{{0.05,0},{0.12,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.9,0},{0.06,0}}"  />
+					<Property Name="DocumentSize" Value="256" />
+					<Property Name="PageSize" Value="16" />
+					<Property Name="StepSize" Value="1" />
+					<Property Name="OverlapSize" Value="1" />
+				</Window>
+
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Demo8/Window1/Controls/Blue">
+					<Property Name="UnifiedPosition" Value="{{0.05,0},{0.19,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.9,0},{0.06,0}}"  />
+					<Property Name="DocumentSize" Value="255" />
+					<Property Name="PageSize" Value="16" />
+					<Property Name="StepSize" Value="1" />
+					<Property Name="OverlapSize" Value="1" />
+				</Window>
+
+				<Window Type="TaharezLook/StaticImage" Name="Demo8/Window1/Controls/ColourSample">
+					<Property Name="UnifiedPosition" Value="{{0.05,0},{0.26,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.9,0},{0.1,0}}"  />
+					<Property Name="Image" Value="set:TaharezLook image:ListboxSelectionBrush" />
+					<Property Name="ImageColours" Value="tl:0 tr:0 bl:0 br:0" />
+				</Window>
+
+				<Window Type="TaharezLook/Editbox" Name="Demo8/Window1/Controls/Editbox">
+					<Property Name="UnifiedPosition" Value="{{0.05,0},{0.38,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.6,0},{0.15,0}}"  />
+				</Window>
+
+                <Window Type="TaharezLook/Button" Name="Demo8/Window1/Controls/Add">
+					<Property Name="UnifiedPosition" Value="{{0.68,0},{0.38,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.3,0},{0.15,0}}"  />
+					<Property Name="Text" Value="Add" />
+				</Window>
+
+                <Window Type="TaharezLook/StaticText" Name="Demo8/Window1/Controls/ins1">
+					<Property Name="UnifiedPosition" Value="{{0.05,0},{0.55,0}}"  />
+					<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedSize" Value="{{0.9,0},{0.4,0}}"  />
+					<Property Name="HorzFormatting" Value="WordWrapCentred" />
+					<Property Name="Text" Value="Use this panel to add items.  The scrollbars change the selection colour." />
+				</Window>
+
+			</Window>
+			
+		</Window>
+
+        <Window Type="TaharezLook/FrameWindow" Name="Demo8/Window2">
+			<Property Name="UnifiedPosition" Value="{{0.55,0},{0.1,0}}"  />
+			<Property Name="UnifiedMaxSize" Value="{{0.5,0},{1,0}}" />
+			<Property Name="UnifiedMinSize" Value="{{0,128},{0,128}}" />
+			<Property Name="UnifiedSize" Value="{{0.4,0},{0.3,0}}"  />
+			<Property Name="Text" Value="Demo 8 - Information Window" />
+
+            <Window Type="TaharezLook/StaticText" Name="Demo8/Window2/Info">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.1,0}}"  />
+				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.9,0},{0.3,0}}"  />
+				<Property Name="HorzFormatting" Value="WordWrapCentred" />
+				<Property Name="Text" Value="The panel below gives some information about the item under the mouse." />
+			</Window>
+	
+            <Window Type="TaharezLook/StaticText" Name="Demo8/Window2/Tips">
+				<Property Name="UnifiedPosition" Value="{{0.05,0},{0.5,0}}"  />
+				<Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+				<Property Name="UnifiedSize" Value="{{0.9,0},{0.4,0}}"  />
+				<Property Name="HorzFormatting" Value="WordWrapCentred" />
+			</Window>
+
+		</Window>
+
+
+	</Window>
+
+</Window>
+
+</GUILayout>
Index: /code/branches/network/Media/gui/facial.layout
===================================================================
--- /code/branches/network/Media/gui/facial.layout	(revision 861)
+++ /code/branches/network/Media/gui/facial.layout	(revision 861)
@@ -0,0 +1,379 @@
+<?xml version="1.0" ?>
+<GUILayout>
+<Window Type="DefaultGUISheet" Name="root">
+    <Window Type="DefaultGUISheet" Name="FacialDemo">
+		<Property Name="UnifiedSize" Value="{{0.25,0},{1,0}}" />
+
+		<Window Type="TaharezLook/FrameWindow" Name="OgreGuiDemo/WindowPropertiesWindow">
+
+			<Property Name="UnifiedSize" Value="{{0,200},{0,400}}" />
+            <Property Name="UnifiedPosition" Value="{{0,0},{0,0.52}}" />
+            <Property Name="TitlebarEnabled" Value="false" />
+            <Property Name="CloseButtonEnabled" Value="false" />
+			<Property Name="Text" Value="Editor Window" />
+			<Window Type="TaharezLook/RadioButton" Name="Facial/Radio/Play">
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,15},{0,5}}" />
+				<Property Name="UnifiedSize" Value="{{0,90},{0,40}}" />
+                <Property Name="Text" Value="Animation" />
+            </Window>
+			<Window Type="TaharezLook/RadioButton" Name="Facial/Radio/Manual">
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,110},{0,5}}" />
+				<Property Name="UnifiedSize" Value="{{0,90},{0,40}}" />
+                <Property Name="Text" Value="Manual" />
+			</Window>				
+			<Window Type="TaharezLook/StaticText" Name="Facial/Expressions">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,5},{0,35}}" />
+				<Property Name="UnifiedSize" Value="{{0,190},{0,40}}" />
+                <Property Name="Text" Value="Expressions" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/Happy_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,5},{0,55}}" />
+				<Property Name="UnifiedSize" Value="{{0,60},{0,40}}" />
+                <Property Name="Text" Value="Happy" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/Happy_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,75}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/Sad_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,5},{0,70}}" />
+				<Property Name="UnifiedSize" Value="{{0,60},{0,40}}" />
+                <Property Name="Text" Value="Sad" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/Sad_Scroll">
+
+				<Property Name="UnifiedPosition" Value="{{0,60},{0,90}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/Angry_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,5},{0,85}}" />
+				<Property Name="UnifiedSize" Value="{{0,60},{0,40}}" />
+                <Property Name="Text" Value="Angry" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/Angry_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,105}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+			</Window>
+
+			<Window Type="TaharezLook/StaticText" Name="Facial/MouthShapes">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,5},{0,110}}" />
+				<Property Name="UnifiedSize" Value="{{0,150},{0,40}}" />
+                <Property Name="Text" Value="Mouth Shapes" />
+            </Window>
+
+			<Window Type="TaharezLook/StaticText" Name="Facial/A_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,135}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="A" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/A_Scroll">
+
+				<Property Name="UnifiedPosition" Value="{{0,60},{0,150}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/E_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,25},{0,150}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="E" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/E_Scroll">
+
+				<Property Name="UnifiedPosition" Value="{{0,60},{0,165}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/I_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,165}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="I" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/I_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,180}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/O_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,25},{0,180}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="O" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/O_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,195}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/U_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,195}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="U" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/U_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,210}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/C_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,210}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="C" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/C_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,225}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+			</Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/W_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+				<Property Name="UnifiedPosition" Value="{{0,25},{0,225}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="W" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/W_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,240}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/M_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,240}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="M" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/M_Scroll">
+
+				<Property Name="UnifiedPosition" Value="{{0,60},{0,255}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/L_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,255}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="L" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/L_Scroll">
+
+				<Property Name="UnifiedPosition" Value="{{0,60},{0,270}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/F_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,270}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="F" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/F_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,285}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/T_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,285}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="T" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/T_Scroll">
+
+				<Property Name="UnifiedPosition" Value="{{0,60},{0,300}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/P_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,300}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="P" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/P_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,315}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/R_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,315}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="R" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/R_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,330}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/S_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,330}}" />
+				<Property Name="UnifiedSize" Value="{{0,30},{0,40}}" />
+                <Property Name="Text" Value="S" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/S_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,345}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			<Window Type="TaharezLook/StaticText" Name="Facial/TH_Label">
+				<Property Name="FrameEnabled" Value="False"/>
+				<Property Name="BackgroundEnabled" Value="False"/>
+				<Property Name="Font" Value="BlueHighway-12"/>
+
+                <Property Name="UnifiedPosition" Value="{{0,25},{0,345}}" />
+				<Property Name="UnifiedSize" Value="{{0,35},{0,40}}" />
+                <Property Name="Text" Value="TH" />
+            </Window>
+			<Window Type="TaharezLook/HorizontalScrollbar" Name="Facial/TH_Scroll">
+
+                <Property Name="UnifiedPosition" Value="{{0,60},{0,360}}" />
+				<Property Name="UnifiedSize" Value="{{0,120},{0,10}}" />
+				<Property Name="DocumentSize" Value="1.1" />
+				<Property Name="PageSize" Value="0.1" />
+				<Property Name="StepSize" Value="0.05" />
+				<Property Name="OverlapSize" Value="0.05" />
+            </Window>
+			
+			<!-- A, U, O, E, I, C, W, M, L, F, T, P, R, S, TH -->
+
+        </Window>
+	</Window>
+</Window>
+
+</GUILayout>
Index: /code/branches/network/Media/gui/ogregui.layout
===================================================================
--- /code/branches/network/Media/gui/ogregui.layout	(revision 861)
+++ /code/branches/network/Media/gui/ogregui.layout	(revision 861)
@@ -0,0 +1,79 @@
+<?xml version="1.0" ?>
+<GUILayout>
+<Window Type="DefaultGUISheet" Name="root">
+    <Window Type="DefaultGUISheet" Name="OgreGuiDemo">
+		<Property Name="UnifiedSize" Value="{{0.25,0},{1,0}}" />
+
+        <Window Type="TaharezLook/TabControl" Name="OgreGuiDemo/TabCtrl">
+            <Property Name="UnifiedPosition" Value="{{0.0,0},{0.0,0}}" />
+            <Property Name="UnifiedSize" Value="{{1,0},{0.5,0}}" />
+
+            <Window Type="DefaultGUISheet" Name="OgreGuiDemo/TabCtrl/Page1">
+                <Property Name="Text" Value="File" />
+                <Window Type="TaharezLook/Button" Name="OgreGuiDemo/TabCtrl/Page1/NewButton">
+                    <Property Name="UnifiedPosition" Value="{{0.1,0},{0.1,0}}" />
+                    <Property Name="UnifiedSize" Value="{{0.8,0},{0.07,0}}" />
+                    <Property Name="Text" Value="New" />
+                </Window>
+                <Window Type="TaharezLook/Button" Name="OgreGuiDemo/TabCtrl/Page1/LoadButton">
+                    <Property Name="UnifiedPosition" Value="{{0.1,0},{0.2,0}}" />
+                    <Property Name="UnifiedSize" Value="{{0.8,0},{0.07,0}}" />
+                    <Property Name="Text" Value="Load Test Layout" />
+                </Window>
+                <Window Type="TaharezLook/Button" Name="OgreGuiDemo/TabCtrl/Page1/QuitButton">
+                    <Property Name="UnifiedPosition" Value="{{0.1,0},{0.3,0}}" />
+                    <Property Name="UnifiedSize" Value="{{0.8,0},{0.07,0}}" />
+                    <Property Name="Text" Value="Quit" />
+                </Window>
+            </Window>
+            <Window Type="DefaultGUISheet" Name="OgreGuiDemo/TabCtrl/Page2">
+                <Property Name="Text" Value="Objects" />
+                <Window Type="TaharezLook/Combobox" Name="OgreGuiDemo/TabCtrl/Page2/ObjectTypeList">
+                    <Property Name="UnifiedPosition" Value="{{0.1,0},{0.1,0}}" />
+                    <Property Name="UnifiedSize" Value="{{0.8,0},{0.5,0}}" />
+                    <Property Name="Text" Value="Select Type" />
+                    <Property Name="ClippedByParent" Value="false" />
+                    <Property Name="ReadOnly" Value="true" />
+                </Window>
+            </Window>
+        </Window>
+        <!--<Window Type="TaharezLook/FrameWindow" Name="OgreGuiDemo/WindowPropertiesWindow">
+            <Property Name="UnifiedSize" Value="{{1,0},{0.3,0}}" />
+            <Property Name="UnifiedPosition" Value="{{0,0},{0.52,0}}" />
+            <Property Name="TitlebarEnabled" Value="false" />
+            <Property Name="CloseButtonEnabled" Value="false" />
+            <Property Name="Visible" Value="false" />
+            <Property Name="Text" Value="Editor Window" />
+            <Window Type="TaharezLook/StaticText" Name="OgreGuiDemo/WindowProperties/NameText">
+                <Property Name="UnifiedPosition" Value="{{0.05,0},{0.2,0}}" />
+                <Property Name="UnifiedSize" Value="{{0.9,0},{0.4,0}}" />
+                <Property Name="Text" Value="Name:" />
+            </Window>
+
+            <Window Type="TaharezLook/Button" Name="OgreGuiDemo/WindowPropertiesWindow/OKButton">
+                <Property Name="UnifiedPosition" Value="{{0.15,0},{0.8,0}}" />
+                <Property Name="UnifiedSize" Value="{{0.3,0},{0.1,0}}" />
+                <Property Name="Text" Value="OK" />
+            </Window>
+            <Window Type="TaharezLook/Button" Name="OgreGuiDemo/WindowPropertiesWindow/CancelButton">
+                <Property Name="UnifiedPosition" Value="{{0.55,0},{0.8,0}}" />
+                <Property Name="UnifiedSize" Value="{{0.3,0},{0.1,0}}" />
+                <Property Name="Text" Value="Cancel" />
+            </Window>
+        </Window>-->
+	</Window>
+    <Window Type="DefaultGUISheet" Name="OgreGuiDemo2">
+		<Property Name="UnifiedSize" Value="{{0.75,0},{1,0}}" />
+		<Property Name="UnifiedPosition" Value="{{0.25,0},{0,0}}" />
+        <Window Type="TaharezLook/FrameWindow" Name="OgreGuiDemo2/MainWindow">
+            <Property Name="UnifiedSize" Value="{{1,0},{1,0}}" />
+            <Property Name="UnifiedPosition" Value="{{0,0},{0,0}}" />
+            <Property Name="DragMovingEnabled" Value="false" />
+            <Property Name="RollUpEnabled" Value="false" />
+            <Property Name="CloseButtonEnabled" Value="false" />
+            <Property Name="Text" Value="Editor Window" />
+        </Window>
+    </Window>
+</Window>
+
+</GUILayout>
Index: /code/branches/network/Media/gui/shadows.layout
===================================================================
--- /code/branches/network/Media/gui/shadows.layout	(revision 861)
+++ /code/branches/network/Media/gui/shadows.layout	(revision 861)
@@ -0,0 +1,247 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<GUILayout >
+    <Window Type="DefaultWindow" Name="Shadows" >
+        <Property Name="InheritsAlpha" Value="False" />
+        <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+        <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" />
+        <Window Type="TaharezLook/FrameWindow" Name="Shadows/Main" >
+            <Property Name="Font" Value="BlueHighway-12" />
+            <Property Name="Alpha" Value="0.5" />
+            <Property Name="FrameEnabled" Value="False" />
+            <Property Name="TitlebarFont" Value="BlueHighway-12" />
+            <Property Name="SizingEnabled" Value="False" />
+            <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+            <Property Name="TitlebarEnabled" Value="False" />
+            <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0.797107,0},{0.148408,0}}" />
+            <Property Name="DragMovingEnabled" Value="False" />
+            <Property Name="CloseButtonEnabled" Value="False" />
+            <Window Type="TaharezLook/RadioButton" Name="Shadows/Stencil" >
+                <Property Name="ID" Value="1" />
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Stencil shadows" />
+                <Property Name="GroupID" Value="1" />
+                <Property Name="Tooltip" Value="Stencil Shadows: Geometric shadow volumes are generated from mesh silhouettes and extruded, shadowed areas calculated in the stencil buffer. Good on lower end hardware but cannot handle alpha or vertex programs that deform shape, and is too expensive at high poly counts. Sharp edged shadows." />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.00465426,0},{0.167892,0},{0.192628,0},{0.344774,0}}" />
+            </Window>
+            <Window Type="TaharezLook/RadioButton" Name="Shadows/Texture" >
+                <Property Name="ID" Value="2" />
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Texture shadows" />
+                <Property Name="GroupID" Value="1" />
+                <Property Name="Tooltip" Value="Texture Shadows: Shadow casters are rendered to a texture and this is later projected onto shadow receivers. More flexible,  handles alpha and deforming vertex programs, and texture shadow can be used in shaders for more advanced effects. Uses more GPU memory and fixed size can cause aliasing (but see projection options)" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.00531136,0},{0.362541,0},{0.194019,0},{0.529099,0}}" />
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="Shadows/Label2" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Lighting:" />
+                <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.19234,0},{-0.0189824,0},{0.303863,0},{0.18662,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="Shadows/Label1" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Technique:" />
+                <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.00658522,0},{-0.00904641,0},{0.160622,0},{0.186908,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+            </Window>
+            <Window Type="TaharezLook/RadioButton" Name="Shadows/Additive" >
+                <Property Name="ID" Value="3" />
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Additive" />
+                <Property Name="GroupID" Value="2" />
+                <Property Name="Tooltip" Value="Additive Lighting: Light is built up incrementally in the scene, and areas of shadow are masked out per light during the process. Much more realistic lighting model, taking into account multiple coloured lights and ambient contribution well, but more expensive since it can take more passes to render." />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.196723,0},{0.174711,0},{0.327724,0},{0.348675,0}}" />
+            </Window>
+            <Window Type="TaharezLook/RadioButton" Name="Shadows/Modulative" >
+                <Property Name="ID" Value="4" />
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="Text" Value="Modulative" />
+                <Property Name="GroupID" Value="2" />
+                <Property Name="Tooltip" Value="Modulative shadows: Shadowed areas are uniformly darkened by a shadow colour after rendering the scene normally. A simple but inaccurate model, it works best when there is one dominant light source (e.g. outdoor daylight). Multiple lights exhibit overdarkening artefacts." />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.195901,0},{0.36936,0},{0.334983,0},{0.532604,0}}" />
+            </Window>
+            <Window Type="TaharezLook/StaticText" Name="Shadows/Desc" >
+                <Property Name="Font" Value="BlueHighway-10" />
+                <Property Name="Text" >
+</Property>
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="InheritsAlpha" Value="False" />
+                <Property Name="HorzFormatting" Value="WordWrapLeftAligned" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="VertFormatting" Value="TopAligned" />
+                <Property Name="UnifiedAreaRect" Value="{{-0.00124776,0},{0.534509,0},{0.998327,0},{1.00537,0}}" />
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="Shadows/ProjectionGroup" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.318294,0},{0.0269328,0},{0.547929,0},{0.488323,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+                <Window Type="TaharezLook/StaticText" Name="Shadows/Label21" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Projection:" />
+                    <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0242767,0},{-0.00538364,0},{0.514109,0},{0.300338,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/Combobox" Name="Shadows/Projection" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Tooltip" Value="Projection: This is the basis for the shadow projection. A uniform projection is the simplest but can also cause aliasing close to the camera due to the finite resolution of the shadow texture. You can plug new ShadowCameraSetup classes to change the projection basis and distribute the shadow texture differently to compensate for this." />
+                    <Property Name="ReadOnly" Value="True" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.0215161,0},{0.406132,0},{1.00682,0},{4,0}}" />
+                    <Property Name="MaxEditTextLength" Value="1073741823" />
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="Shadows/MaterialGroup" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.554514,0},{0.0286934,0},{0.927227,0},{0.490084,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+                <Window Type="TaharezLook/StaticText" Name="Shadows/Label211" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Text" Value="Material Setup:" />
+                    <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.021516,0},{-0.158454,0},{0.862772,0},{0.387132,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/Combobox" Name="Shadows/Material" >
+                    <Property Name="Font" Value="BlueHighway-12" />
+                    <Property Name="Tooltip" Value="Material setup: You can customise materials texture shadows with material; you can modify the standard shadow passes, which are separate from the normal render, or you can use &apos;custom sequence&apos; shadows which allow you to incorporate shadow textures directly in your own materials, thus gaining complete control. Both can use shaders for effects like PCF / depth shadowmapping." />
+                    <Property Name="ReadOnly" Value="True" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.021516,0},{0.406132,0},{0.731289,0},{4,0}}" />
+                    <Property Name="MaxEditTextLength" Value="1073741823" />
+                </Window>
+            </Window>
+            <Window Type="TaharezLook/StaticImage" Name="Shadows/DepthShadowTweakGroup" >
+                <Property Name="Font" Value="BlueHighway-12" />
+                <Property Name="FrameEnabled" Value="False" />
+                <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                <Property Name="UnifiedAreaRect" Value="{{0.825038,0},{0.0186838,0},{0.999281,0},{0.548657,0}}" />
+                <Property Name="BackgroundEnabled" Value="False" />
+                <Window Type="TaharezLook/StaticText" Name="Shadows/DepthShadowTweakGroup/FixedBiasLabel" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="FixedBias:" />
+                    <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+					<Property Name="UnifiedAreaRect" Value="{{0.0316741,0},{0.0,0},{0.373716,0},{0.2,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Shadows/DepthShadowTweakGroup/FixedBias" >
+                    <Property Name="PageSize" Value="0.001" />
+                    <Property Name="StepSize" Value="0.0005" />
+                    <Property Name="OverlapSize" Value="0.0005" />
+                    <Property Name="DocumentSize" Value="0.021" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+					<Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.0,0},{1,0},{0.15,0}}" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Shadows/DepthShadowTweakGroup/FixedBiasText" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+					<Property Name="Text" Value="" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedAreaRect" Value="{{0.70,0},{0.125,0},{0.943746,0},{0.3,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/StaticText" Name="Shadows/DepthShadowTweakGroup/SlopeBiasLabel" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+                    <Property Name="Text" Value="SlopeBias:" />
+                    <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+					<Property Name="UnifiedAreaRect" Value="{{0.0316741,0},{0.35,0},{0.373716,0},{0.55,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Shadows/DepthShadowTweakGroup/SlopeBias" >
+                    <Property Name="PageSize" Value="0.1" />
+                    <Property Name="StepSize" Value="0.05" />
+                    <Property Name="OverlapSize" Value="0.05" />
+                    <Property Name="DocumentSize" Value="2.1" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+                    <Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.35,0},{1,0},{0.5,0}}" />
+                </Window>
+				<Window Type="TaharezLook/StaticText" Name="Shadows/DepthShadowTweakGroup/SlopeBiasText" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+					<Property Name="Text" Value="" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedAreaRect" Value="{{0.70,0},{0.475,0},{0.943746,0},{0.675,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+				<Window Type="TaharezLook/StaticText" Name="Shadows/DepthShadowTweakGroup/SlopeClampLabel" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+					<Property Name="Text" Value="Clamp:" />
+                    <Property Name="TextColours" Value="tl:FFFFFF00 tr:FFFFFF00 bl:FFFFFF00 br:FFFFFF00" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+					<Property Name="UnifiedAreaRect" Value="{{0.0316741,0},{0.675,0},{0.472153,0},{0.85,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+                <Window Type="TaharezLook/HorizontalScrollbar" Name="Shadows/DepthShadowTweakGroup/SlopeClamp" >
+                    <Property Name="PageSize" Value="0.01" />
+                    <Property Name="StepSize" Value="0.005" />
+                    <Property Name="OverlapSize" Value="0.005" />
+                    <Property Name="DocumentSize" Value="0.11" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="ScrollPosition" Value="0" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+                    <Property Name="ClippedByParent" Value="False" />
+					<Property Name="UnifiedAreaRect" Value="{{0.4,0},{0.7,0},{1,0},{0.85,0}}" />
+                </Window>
+				<Window Type="TaharezLook/StaticText" Name="Shadows/DepthShadowTweakGroup/SlopeClampText" >
+                    <Property Name="Font" Value="BlueHighway-10" />
+					<Property Name="Text" Value="" />
+                    <Property Name="FrameEnabled" Value="False" />
+                    <Property Name="InheritsAlpha" Value="False" />
+                    <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" />
+					<Property Name="UnifiedAreaRect" Value="{{0.70,0},{0.825,0},{0.943746,0},{0.99,0}}" />
+                    <Property Name="BackgroundEnabled" Value="False" />
+                </Window>
+            </Window>
+        </Window>
+    </Window>
+</GUILayout>
Index: /code/branches/network/Media/materials/scripts/Example.material
===================================================================
--- /code/branches/network/Media/materials/scripts/Example.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/Example.material	(revision 861)
@@ -0,0 +1,1044 @@
+
+material Examples/EnvMappedRustySteel
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture RustySteel.jpg
+			}
+
+			texture_unit
+			{
+				texture spheremap.png
+				colour_op_ex add src_texture src_current
+				colour_op_multipass_fallback one one
+				env_map spherical
+			}
+		}
+	}
+}
+material Examples/OgreLogo
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.8 0.8 0.8
+
+			texture_unit
+			{
+				texture ogrelogo.png
+			}
+		}
+	}
+}
+material Examples/DarkMaterial
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.1 0.1 0.1
+
+			texture_unit
+			{
+				texture BeachStones.jpg
+			}
+		}
+	}
+}
+material Examples/SpaceSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture stevecube.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+material Examples/SceneSkyBox1
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture cubemap_fr.jpg cubemap_bk.jpg cubemap_lf.jpg cubemap_rt.jpg cubemap_up.jpg cubemap_dn.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+material Examples/SceneCubeMap1
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+
+			texture_unit
+			{
+				cubic_texture cubemap.jpg combinedUVW
+				tex_address_mode clamp
+				env_map cubic_reflection
+			}
+		}
+	}
+}
+material Examples/SceneSkyBox2
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture cubescene_fr.jpg cubescene_bk.jpg cubescene_lf.jpg cubescene_rt.jpg cubescene_up.jpg cubescene_dn.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+material Examples/SceneCubeMap2
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+
+			texture_unit
+			{
+				cubic_texture cubescene.jpg combinedUVW
+				tex_address_mode clamp
+				env_map cubic_reflection
+			}
+		}
+	}
+}
+
+material Examples/CloudyNoonSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture cloudy_noon.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+material Examples/StormySkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture stormy.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+
+fragment_program Examples/MorningSkyBoxHDRfp cg
+{
+	source hdr.cg
+	entry_point morningskybox_fp
+	profiles ps_2_0 arbfp1
+
+}
+material Examples/MorningSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture morning.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+
+	// HDR technique (fake)
+	technique
+	{
+		scheme HDR
+
+		pass
+		{
+			lighting off
+			depth_write off
+
+			vertex_program_ref Ogre/BasicVertexPrograms/AmbientOneTexture
+			{
+				param_named_auto worldViewProj worldviewproj_matrix
+				param_named ambient float4 1 1 1 1
+			}
+			fragment_program_ref Examples/MorningSkyBoxHDRfp
+			{
+			}
+
+			texture_unit
+			{
+				cubic_texture morning.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+fragment_program Examples/MorningCubeMapHDRfp cg
+{
+	source hdr.cg
+	entry_point morningcubemap_fp
+	profiles ps_2_0 arbfp1
+
+}
+material Examples/MorningCubeMap
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+
+			texture_unit
+			{
+				cubic_texture morning.jpg combinedUVW
+				tex_address_mode clamp
+				env_map cubic_reflection
+			}
+		}
+	}
+	// HDR technique (fake)
+	technique
+	{
+		scheme HDR
+
+		pass
+		{
+			lighting off
+
+			fragment_program_ref Examples/MorningCubeMapHDRfp
+			{
+			}
+			texture_unit
+			{
+				cubic_texture morning.jpg combinedUVW
+				tex_address_mode clamp
+				env_map cubic_reflection
+			}
+		}
+	}
+}
+
+
+material Examples/EveningSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture evening.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+material Examples/CloudySky
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				texture clouds.jpg
+				scroll_anim 0.15 0
+			}
+		}
+	}
+}
+material Examples/RustySteel
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture RustySteel.jpg
+			}
+		}
+	}
+}
+material Examples/Chrome
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture Chrome.jpg
+				env_map spherical
+			}
+		}
+	}
+}
+material Examples/SpaceSkyPlane
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			fog_override true none
+
+			texture_unit
+			{
+				texture spacesky.jpg
+			}
+		}
+	}
+}
+material Examples/TextureEffect1
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.75 0.75 0.75
+			cull_hardware none
+			cull_software none
+
+			texture_unit
+			{
+				texture BumpyMetal.jpg
+				rotate_anim 0.2
+				wave_xform scale_x sine 1 0.1 0 5
+				wave_xform scale_y sine 0.5 0.2 0.5 3
+			}
+		}
+	}
+}
+material Examples/TextureEffect2
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture Water02.jpg
+				scroll_anim 0.5 0
+			}
+		}
+	}
+}
+material Examples/TextureEffect3
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.7 0.7 0.7
+			cull_hardware none
+			cull_software none
+
+			texture_unit
+			{
+				texture Water01.jpg
+				scroll_anim -0.25 0.1
+			}
+
+			texture_unit
+			{
+				texture Water01.jpg
+				colour_op_ex add src_texture src_current
+				colour_op_multipass_fallback one one
+				scroll_anim -0.1 0.25
+			}
+		}
+	}
+}
+material Examples/TextureEffect4
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.3 0.3 0.3
+			scene_blend colour_blend
+			cull_hardware none
+			cull_software none
+
+			texture_unit
+			{
+				texture Water02.jpg
+				scroll_anim 0.01 0.01
+			}
+		}
+	}
+}
+material Examples/BumpyMetal
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.75 0.75 0.75
+			cull_hardware none
+			cull_software none
+
+			texture_unit
+			{
+				texture BumpyMetal.jpg
+			}
+		}
+	}
+}
+material Examples/TransparentTest
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.2 0.2 0.2
+			scene_blend add
+			depth_write off
+
+			texture_unit
+			{
+				texture Water01.jpg
+				scroll_anim 0.25 0
+			}
+
+			texture_unit
+			{
+				texture Water01.jpg
+				wave_xform scroll_y sine 0 0.1 0 0.5
+			}
+		}
+	}
+}
+material Examples/Flare
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend add
+			depth_write off
+
+			texture_unit
+			{
+				texture flare.png
+			}
+		}
+	}
+}
+material Examples/Flare2
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend add
+			depth_write off
+
+			texture_unit
+			{
+				texture flaretrail.png
+			}
+		}
+	}
+}
+material Examples/FlarePointSprite
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend add
+			depth_write off
+
+			point_sprites on
+			point_size 2
+			point_size_attenuation on
+
+			texture_unit
+			{
+				texture flare.png
+			}
+		}
+	}
+}
+
+material Examples/Droplet
+{
+	technique
+	{
+		pass
+		{
+			scene_blend colour_blend
+			depth_write off
+
+			texture_unit
+			{
+				texture basic_droplet.png
+			}
+		}
+	}
+}
+material Examples/Hilite/Yellow
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture dkyellow.png
+			}
+		}
+	}
+}
+material Examples/Rocky
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.2 0.2 0.2
+
+			texture_unit
+			{
+				texture egyptrockyfull.jpg
+			}
+		}
+	}
+}
+material Examples/10PointBlock
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture 10points.png
+			}
+		}
+	}
+}
+material Material__25
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture texmap2.jpg
+			}
+		}
+	}
+}
+material 2 - Default
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture MtlPlat2.jpg
+			}
+		}
+	}
+}
+material Material #8
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture BODY.jpg
+			}
+		}
+	}
+}
+material Material #3
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture HEAD4.jpg
+			}
+		}
+	}
+}
+material Material #9
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture LEGS.jpg
+			}
+		}
+	}
+}
+
+material Examples/Fish
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture steelhead.png
+			}
+		}
+	}
+}
+material Examples/Ninja
+{
+	technique
+	{
+		pass
+		{
+		
+			texture_unit
+			{
+				texture nskingr.jpg
+			}
+		}
+	}
+}
+
+material Examples/Robot
+{
+	// Hardware skinning techniique
+	technique
+	{
+		pass
+		{
+			vertex_program_ref Ogre/HardwareSkinningOneWeight
+			{
+				param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+				param_named_auto viewProjectionMatrix viewproj_matrix
+				param_named_auto lightPos[0] light_position 0
+				param_named_auto lightPos[1] light_position 1
+				param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
+				param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
+				param_named_auto ambient ambient_light_colour
+			
+			}
+			// alternate shadow caster program
+			shadow_caster_vertex_program_ref Ogre/HardwareSkinningOneWeightShadowCaster
+			{
+				param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+				param_named_auto viewProjectionMatrix viewproj_matrix
+				param_named_auto ambient ambient_light_colour
+			
+			}
+
+			texture_unit
+			{
+				texture r2skin.jpg
+			}
+		}
+	}
+
+	// Software blending technique
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture r2skin.jpg
+			}
+		}
+	}
+}
+
+material Examples/GrassFloor
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture grass_1024.jpg
+			}
+		}
+	}
+}
+
+vertex_program Examples/GrassWaverVp cg
+{
+	source Grass.cg
+	entry_point grass_vp
+	profiles vs_1_1 arbvp1
+}
+
+material Examples/GrassBlades
+{
+	// Vertex program waving grass
+    technique
+    {
+        pass
+        {
+			vertex_program_ref Examples/GrassWaverVp
+			{
+				param_named_auto worldViewProj worldviewproj_matrix
+				param_named_auto ambient ambient_light_colour
+				param_named_auto objSpaceLight light_position_object_space 0
+				param_named_auto lightColour light_diffuse_colour 0
+				param_named_auto offset custom 999
+			}
+			alpha_rejection greater 150 
+			scene_blend alpha_blend
+		    cull_hardware none
+            cull_software none
+            texture_unit
+            {
+                texture gras_02.png 
+            }
+        }
+    }
+
+	// Non-vertex program technique (no waving)
+	technique
+    {
+        pass
+        {
+			alpha_rejection greater 150 
+			scene_blend alpha_blend
+		    cull_hardware none
+            cull_software none
+            texture_unit
+            {
+                texture gras_02.png 
+            }
+        }
+    }
+}
+
+material Examples/Rockwall
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture rockwall.tga
+			}
+		}
+	}
+}
+
+material Examples/Aureola
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_write off
+			cull_hardware none
+
+			texture_unit
+			{
+				texture aureola.png PF_BYTE_LA
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+// Test hardware morph animation
+material Examples/HardwareMorphAnimation
+{
+	technique
+	{
+		pass
+		{
+			
+			vertex_program_ref Ogre/HardwareMorphAnimation
+			{
+				// all default
+			}
+
+			texture_unit
+			{
+				tex_coord_set 0
+				colour_op_ex source1 src_current src_current
+			}
+			// need to define these texture units otherwise GL won't use the uv sets			
+			texture_unit
+			{
+				tex_coord_set 1
+				// also need to set blending to ignore texture which is GL warning texture
+				colour_op_ex source1 src_current src_current
+			}
+			texture_unit
+			{
+				tex_coord_set 2
+				colour_op_ex source1 src_current src_current
+			}
+		
+		}
+	}
+}
+
+// Test hardware pose animation
+material Examples/HardwarePoseAnimation
+{
+	technique
+	{
+		pass
+		{
+			
+			vertex_program_ref Ogre/HardwarePoseAnimation
+			{
+				// all default
+			}
+			texture_unit
+			{
+				tex_coord_set 0
+				colour_op_ex source1 src_current src_current
+			}
+			// need to define these texture units otherwise GL won't use the uv sets			
+			texture_unit
+			{
+				tex_coord_set 1
+				// also need to set blending to ignore texture which is GL warning texture
+				colour_op_ex source1 src_current src_current
+			}
+			texture_unit
+			{
+				tex_coord_set 2
+				colour_op_ex source1 src_current src_current
+			}
+
+		
+		}
+	}
+}
+
+material RustyBarrel
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.5 0.5 0.5 1.0
+			diffuse 1.0 1.0 1.0 1.0
+			specular 0.0 0.0 0.0 1.0 12.5
+			emissive 0.0 0.0 0.0 1.0
+			texture_unit
+			{
+				texture RustyBarrel.png
+				filtering trilinear
+			}
+		}
+	}
+}
+
+material WoodPallet
+{
+	receive_shadows on
+	technique
+	{
+		pass
+		{
+			ambient 0.5 0.5 0.5 1.0
+			diffuse 1.0 1.0 1.0 1.0
+			specular 0.0 0.0 0.0 1.0 12.5
+
+			texture_unit
+			{
+				texture WoodPallet.png
+				filtering trilinear
+			}
+		}
+	}
+}
+
+material Examples/LightRibbonTrail
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend add
+			depth_write off
+
+			texture_unit
+			{
+				texture ribbonband.png 1d
+				tex_address_mode clamp
+				filtering none
+			}
+		}
+	}
+}
+
+material Examples/TudorHouse
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture fw12b.jpg
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+material jaiqua
+{
+	// Hardware skinning techniique
+	technique
+	{
+		pass
+		{
+			vertex_program_ref Ogre/HardwareSkinningTwoWeights
+			{
+			
+			}
+			// alternate shadow caster program
+			shadow_caster_vertex_program_ref Ogre/HardwareSkinningTwoWeightsShadowCaster
+			{
+				param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+				param_named_auto viewProjectionMatrix viewproj_matrix
+				param_named_auto ambient ambient_light_colour
+			
+			}
+
+			texture_unit
+			{
+				texture blue_jaiqua.jpg
+				tex_address_mode clamp
+			}
+		}
+	}
+
+	// Software blending technique
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture blue_jaiqua.jpg
+				tex_address_mode clamp
+			}
+		}
+	}
+	
+}
+
+
+material Examples/Plane/IntegratedShadows
+{
+	technique
+	{
+		pass
+		{
+			// Single-pass shadowing
+			texture_unit
+			{
+				texture MtlPlat2.jpg
+			}
+			texture_unit
+			{
+				// standard modulation blend
+				content_type shadow
+				tex_address_mode clamp
+			}
+		}
+	}
+	
+}
Index: /code/branches/network/Media/materials/scripts/Examples.compositor
===================================================================
--- /code/branches/network/Media/materials/scripts/Examples.compositor	(revision 861)
+++ /code/branches/network/Media/materials/scripts/Examples.compositor	(revision 861)
@@ -0,0 +1,592 @@
+// Manuel's bloom
+// Needs a scene-sized rtt, but does only one render of the scene
+compositor Bloom
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 128 128 PF_A8R8G8B8
+        texture rt1 128 128 PF_A8R8G8B8
+
+        target rt1
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target rt0
+        {
+            // Start with clear texture
+            input none
+            // Vertical blur pass
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Blur0
+                input 0 rt1
+            }
+        }
+
+        target rt1
+        {
+            // Start with clear texture
+            input none
+            // Horizontal blur pass
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Blur1
+                input 0 rt0
+            }
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input previous
+            // Draw a fullscreen quad
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/BloomBlend
+                input 0 rt1
+            }
+        }
+    }
+}
+
+compositor Glass
+{
+    technique
+    {
+        texture rt0 target_width target_height PF_R8G8B8
+
+        target rt0 { input previous }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+
+            pass render_quad
+            {
+                material Ogre/Compositor/GlassPass
+                input 0 rt0
+            }
+        }
+    }
+}
+
+compositor "Old TV"
+{
+    technique
+    {
+        texture rt0 target_width target_height PF_R8G8B8
+
+        // render scene to a texture
+        target rt0 { input previous }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+
+            pass render_quad
+            {
+                // convert the previous render target to a black and white image, add some noise, distort it,
+                // then render to scene aligned quad
+                material Ogre/Compositor/OldTV
+                input 0 rt0
+            }
+        }
+    }
+}
+
+
+// Black and white effect
+compositor B&W
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/BlackAndWhite
+                input 0 rt0
+            }
+        }
+    }
+}
+
+//compositor DOF // based on Blur but final pass does depth of field
+//{
+//    technique
+//    {
+//        // Temporary textures
+//        texture rt0 target_width target_height PF_A8R8G8B8
+//        texture rt1 target_width target_height PF_A8R8G8B8
+//
+//        target rt1
+//        {
+//            // Render output from previous compositor (or original scene)
+//            input previous
+//        }
+//
+//        target rt0
+//        {
+//            // Start with clear texture
+//            input none
+//            // Vertical blur pass
+//            pass render_quad
+//            {
+//                // Renders a fullscreen quad with a material
+//                material Ogre/Compositor/DOF_Blur0
+//                input 0 rt1
+//            }
+//        }
+//
+//        target rt1
+//        {
+//            // Start with clear texture
+//            input none
+//            // Horizontal blur pass
+//            pass render_quad
+//            {
+//                // Renders a fullscreen quad with a material
+//                material Ogre/Compositor/DOF_Blur1
+//                input 0 rt0
+//            }
+//        }
+//
+//        target_output
+//        {
+//            // Start with clear output
+//            input none
+//            // Draw a fullscreen quad
+//            pass render_quad
+//            {
+//                // Renders a fullscreen quad with a material
+//                material Ogre/Compositor/DOF_Blend
+//                input 0 rt0
+//                input 1 rt1
+//            }
+//        }
+//    }
+//}
+
+// Embossed (fake bump) effect
+compositor Embossed
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Embossed
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// SharpenEdges
+compositor Sharpen Edges
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/SharpenEdges
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Invert
+compositor Invert
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Invert
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Posterize
+compositor Posterize
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Posterize
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Laplace
+compositor Laplace
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Laplace
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Tiling
+compositor Tiling
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/Tiling
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// Old Movie
+compositor Old Movie
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target_output
+        {
+            // Start with clear output
+            input none
+            // Draw a fullscreen quad with the black and white image
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+                material Ogre/Compositor/OldMovie
+                input 0 rt0
+            }
+        }
+    }
+}
+
+// HDR
+compositor HDR
+{
+	// floating point only for now
+	technique
+	{
+        // Temporary textures
+		// Fullsize HDR render target, used as tone mapping source
+        texture rt_full target_width target_height PF_FLOAT16_RGB
+		// Targets used for luminance evaluation (3x3 downsample, point filtering)
+		texture rt_lum0 1 1 PF_FLOAT16_RGB
+		texture rt_lum1 4 4 PF_FLOAT16_RGB
+		texture rt_lum2 16 16 PF_FLOAT16_RGB
+		texture rt_lum3 64 64 PF_FLOAT16_RGB
+		texture rt_lum4 128 128 PF_FLOAT16_RGB
+		// Bright-pass filtered target (tone mapped)
+		texture rt_brightpass 128 128 PF_R8G8B8
+		// Bloom filter targets
+		texture rt_bloom0 128 128 PF_R8G8B8
+		texture rt_bloom1 128 128 PF_R8G8B8
+
+
+		target rt_full
+		{
+			// No input, render differently
+			input none
+
+			// Use float target HDR material scheme (unclamped shaders)
+			material_scheme HDR
+
+			pass clear
+			{
+			}
+
+			pass render_scene
+			{
+			}
+
+		}
+
+		// Downsample the original HDR scene to extract luminence value
+		target rt_lum4
+		{
+            input none
+            pass render_quad
+            {
+                // Downsample using a 2x2 filter and convert to greyscale
+                material Ogre/Compositor/HDR/Downsample2x2Luminence
+                input 0 rt_full
+                identifier 994
+            }
+		}
+		target rt_lum3
+		{
+            input none
+            pass render_quad
+            {
+				// Downsample using a 3x3 filter
+                material Ogre/Compositor/HDR/Downsample3x3
+                input 0 rt_lum4
+                identifier 993
+            }
+		}
+		target rt_lum2
+		{
+            input none
+            pass render_quad
+            {
+                // Downsample using a 3x3 filter
+                material Ogre/Compositor/HDR/Downsample3x3
+                input 0 rt_lum3
+                identifier 992
+            }
+		}
+		target rt_lum1
+		{
+            input none
+            pass render_quad
+            {
+                // Downsample using a 3x3 filter
+                material Ogre/Compositor/HDR/Downsample3x3
+                input 0 rt_lum2
+                identifier 991
+            }
+		}
+		target rt_lum0
+		{
+            input none
+            pass render_quad
+            {
+                // Downsample using a 3x3 filter
+                material Ogre/Compositor/HDR/Downsample3x3
+                input 0 rt_lum1
+                identifier 990
+            }
+		}
+
+
+		target rt_brightpass
+		{
+            input none
+            pass render_quad
+            {
+                // Downsample using a 3x3 filter, hi-pass and tone map
+                material Ogre/Compositor/HDR/Downsample3x3Brightpass
+                input 0 rt_full
+		        input 1 rt_lum0
+				identifier 800
+            }
+		}
+
+		target rt_bloom1
+		{
+			input none
+			pass render_quad
+			{
+				// Blur horizontally
+				material Ogre/Compositor/HDR/GaussianBloom
+				input 0 rt_brightpass
+				identifier 701
+			}
+		}
+		target rt_bloom0
+		{
+			input none
+			pass render_quad
+			{
+				// Blur horizontally
+				material Ogre/Compositor/HDR/GaussianBloom
+				input 0 rt_bloom1
+				identifier 700
+			}
+		}
+
+
+		// Final output combines tone mapping of the original scene, with an
+		// exposure setting passed in as a GPU parameter, and an additive bloom
+		// effect
+		target_output
+		{
+			input none
+			pass render_quad
+			{
+				material Ogre/Compositor/HDR/ToneMapping
+				input 0 rt_full
+				input 1 rt_bloom0
+				input 2 rt_lum0
+			}
+		}
+
+
+	}
+
+}
+
+
+// Gaussian blur effect
+compositor Gaussian Blur
+{
+    technique
+    {
+        // Temporary textures
+        texture rt0 target_width target_height PF_A8R8G8B8
+        texture rt1 target_width target_height PF_A8R8G8B8
+
+        target rt0
+        {
+            // Render output from previous compositor (or original scene)
+            input previous
+        }
+
+        target rt1
+        {
+            // Blur horizontally
+            input none
+			pass render_quad
+			{
+				material Ogre/Compositor/HDR/GaussianBloom
+				input 0 rt0
+				identifier 700
+			}
+        }
+
+		target_output
+        {
+            // Start with clear output
+            input none
+            // Blur vertically
+            pass render_quad
+            {
+                // Renders a fullscreen quad with a material
+				material Ogre/Compositor/HDR/GaussianBloom
+                input 0 rt1
+				identifier 701
+            }
+        }
+    }
+}
+
Index: /code/branches/network/Media/materials/scripts/Examples.program
===================================================================
--- /code/branches/network/Media/materials/scripts/Examples.program	(revision 861)
+++ /code/branches/network/Media/materials/scripts/Examples.program	(revision 861)
@@ -0,0 +1,158 @@
+//---------------------------------------------------
+// This file includes a number of basic GPU programs
+// for use in many materials. 
+//---------------------------------------------------
+
+
+// A really basic ambient pass program, support for one texture coodinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTexture cg
+{
+	source Example_Basic.cg
+	entry_point ambientOneTexture_vp
+	profiles vs_1_1 arbvp1
+
+	default_params
+	{
+		param_named_auto worldViewProj worldviewproj_matrix
+		param_named_auto ambient ambient_light_colour
+	}
+	
+}
+// A really basic ambient pass program, support for one texture coodinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureHLSL hlsl
+{
+	source Example_Basic.hlsl
+	entry_point ambientOneTexture_vp
+	target vs_1_1
+
+	default_params
+	{
+		param_named_auto worldViewProj worldviewproj_matrix
+		param_named_auto ambient ambient_light_colour
+	}
+}
+// A really basic ambient pass program, support for one texture coodinate set
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureGLSL glsl
+{
+	source AmbientOneTexture.glsl
+
+	default_params
+	{
+		param_named_auto ambient ambient_light_colour
+	}
+}
+
+vertex_program Ogre/BasicVertexPrograms/AmbientOneTextureUnified unified
+{
+	delegate Ogre/BasicVertexPrograms/AmbientOneTextureGLSL
+	delegate Ogre/BasicVertexPrograms/AmbientOneTextureHLSL
+}
+
+
+// Same as below, but for use when rendering texture shadows
+vertex_program Ogre/HardwareSkinningOneWeightShadowCaster cg
+{
+	source Example_Basic.cg
+	entry_point hardwareSkinningOneWeightCaster_vp
+	profiles vs_1_1 arbvp1
+	includes_skeletal_animation true
+}
+// Basic hardware skinning using one indexed weight per vertex
+vertex_program Ogre/HardwareSkinningOneWeight cg
+{
+   source Example_Basic.cg
+   entry_point hardwareSkinningOneWeight_vp
+   profiles vs_1_1 arbvp1
+   includes_skeletal_animation true   
+}
+// Same as below, but for use when rendering texture shadows
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterCg cg
+{
+	source Example_Basic.cg
+	entry_point hardwareSkinningTwoWeightsCaster_vp
+	profiles vs_1_1 arbvp1
+	includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL glsl
+{
+	source skinningTwoWeightsShadowCasterVp.glsl
+	includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsShadowCaster unified
+{
+	delegate Ogre/HardwareSkinningTwoWeightsShadowCasterGLSL
+	delegate Ogre/HardwareSkinningTwoWeightsShadowCasterCg
+}
+
+// Basic hardware skinning using two indexed weights per vertex
+vertex_program Ogre/HardwareSkinningTwoWeightsCg cg
+{
+   source Example_Basic.cg
+   entry_point hardwareSkinningTwoWeights_vp
+   profiles vs_1_1 arbvp1
+   includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeightsGLSL glsl
+{
+   source skinningTwoWeightsVp.glsl
+   includes_skeletal_animation true
+}
+
+vertex_program Ogre/HardwareSkinningTwoWeights unified
+{
+	delegate Ogre/HardwareSkinningTwoWeightsGLSL
+	delegate Ogre/HardwareSkinningTwoWeightsCg
+	
+   default_params
+   {
+   		param_named_auto worldMatrix3x4Array world_matrix_array_3x4
+		param_named_auto viewProjectionMatrix viewproj_matrix
+		param_named_auto lightPos[0] light_position 0
+		param_named_auto lightPos[1] light_position 1
+		param_named_auto lightDiffuseColour[0] light_diffuse_colour 0
+		param_named_auto lightDiffuseColour[1] light_diffuse_colour 1
+   }
+}
+
+// Basic hardware skinning using four indexed weights per vertex
+vertex_program Ogre/HardwareSkinningFourWeights cg
+{
+   source Example_Basic.cg
+   entry_point hardwareSkinningFourWeights_vp
+   profiles vs_1_1 arbvp1
+   includes_skeletal_animation true
+
+}
+// Basic hardware morph animation 
+vertex_program Ogre/HardwareMorphAnimation cg
+{
+	source Example_Basic.cg
+	entry_point hardwareMorphAnimation
+	profiles vs_1_1 arbvp1
+
+	includes_morph_animation true
+	default_params
+	{
+		param_named_auto worldViewProj worldviewproj_matrix
+		param_named_auto anim_t animation_parametric
+	}
+}
+// Basic hardware pose animation supporting 2 active poses
+vertex_program Ogre/HardwarePoseAnimation cg
+{
+	source Example_Basic.cg
+	entry_point hardwarePoseAnimation
+	profiles vs_1_1 arbvp1
+
+	includes_pose_animation 2
+	default_params
+	{
+		param_named_auto worldViewProj worldviewproj_matrix
+		param_named_auto anim_t animation_parametric
+	}
+}
+
+
Index: /code/branches/network/Media/materials/scripts/Ogre.material
===================================================================
--- /code/branches/network/Media/materials/scripts/Ogre.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/Ogre.material	(revision 861)
@@ -0,0 +1,122 @@
+
+material Ogre/Earring
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.5 0.5 0
+			diffuse 1 1 0
+
+			texture_unit
+			{
+				texture spheremap.png
+				colour_op_ex add src_texture src_current
+				colour_op_multipass_fallback one one
+				env_map spherical
+			}
+		}
+	}
+}
+material Ogre/Skin
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.7 0.7 0.7
+			cull_hardware none
+
+			texture_unit
+			{
+				texture GreenSkin.jpg
+				tex_address_mode mirror
+			}
+		}
+	}
+}
+material Ogre/Tusks
+{
+	technique
+	{
+		pass
+		{
+			ambient 0.5 0.5 0.4
+			diffuse 1 1 0.8
+
+			texture_unit
+			{
+				texture dirt01.jpg
+				colour_op_ex add src_texture src_current
+				colour_op_multipass_fallback one one
+			}
+		}
+	}
+}
+material Ogre/Eyes
+{
+	technique
+	{
+		pass
+		{
+
+			texture_unit
+			{
+				texture WeirdEye.png
+			}
+		}
+	}
+}
+material Cursor/default
+{
+	technique
+	{
+		pass
+		{
+			scene_blend alpha_blend
+
+			texture_unit
+			{
+				texture cursor.png
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+material Core/StatsBlockBorder/Down
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ogreborder.png
+			}
+		}
+	}
+}
+material Core/StatsBlockBorder/Up
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ogreborderUp.png
+			}
+		}
+	}
+}
+
+
+
Index: /code/branches/network/Media/materials/scripts/Orxonox.material
===================================================================
--- /code/branches/network/Media/materials/scripts/Orxonox.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/Orxonox.material	(revision 861)
@@ -0,0 +1,421 @@
+
+
+material Orxonox/Shot
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture shot.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/Red
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_check off
+			scene_blend 0.5 0.5
+			ambient 0 0 0 0.5
+
+			texture_unit
+			{
+				texture OrxonoxRED.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/Black
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_check off
+			scene_blend 0.5 0.5
+			ambient 0 0 0 0.5
+
+			texture_unit
+			{
+				texture OrxonoxBlack.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/BackGround
+{
+	technique
+	{
+		pass
+		{
+
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+			texture_unit
+			{
+				texture backGround.png
+			}
+		}
+	}
+}
+
+material Orxonox/EnergyBackground
+{
+	technique
+	{
+		pass
+		{
+
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+			texture_unit
+			{
+				texture EnergyBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/Clock
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture clock.png
+			}
+		}
+	}
+}
+
+material Orxonox/Gun
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture gun.png
+			}
+		}
+	}
+}
+
+material Orxonox/Man
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture man.png
+			}
+		}
+	}
+}
+
+material Orxonox/MapBackGround
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture MapBackGround.png
+			}
+		}
+	}
+}
+
+material Orxonox/MyShip
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture MyShip.png
+			}
+		}
+	}
+}
+
+material Orxonox/RacketBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture RacketBackground.png
+			}
+		}
+	}
+}
+
+
+material Orxonox/TargetBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture TargetBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/PrimarBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture PrimarBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/PrimarSample
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture PrimarSample.png
+			}
+		}
+	}
+}
+
+material Orxonox/PrimarChoice
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture PrimarChoice.png
+			}
+		}
+	}
+}
+
+material Orxonox/RedPoint
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture RedPoint.png
+			}
+		}
+	}
+}
+
+material Orxonox/EnergyDistrBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture EnergyDistrBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/shieldLeftTop
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShieldLeftTop.png
+			}
+		}
+	}
+}
+
+material Orxonox/shieldRightTop
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShieldRightTop.png
+			}
+		}
+	}
+}
+
+material Orxonox/shieldLeftBottom
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShieldLeftBottom.png
+			}
+		}
+	}
+}
+
+material Orxonox/shieldRightBottom
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture ShieldRightBottom.png
+			}
+		}
+	}
+}
+
+material Orxonox/TimeBackground
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend alpha_blend
+			depth_check off
+
+			texture_unit
+			{
+				texture TimeBackground.png
+			}
+		}
+	}
+}
+
+material Orxonox/Crosshair
+{
+  technique
+  {
+    pass
+    {
+      lighting off
+      scene_blend alpha_blend
+      depth_check off
+
+      texture_unit
+      {
+        texture crosshair.png
+      }
+    }
+  }
+}
Index: /code/branches/network/Media/materials/scripts/OrxonoxSky.material
===================================================================
--- /code/branches/network/Media/materials/scripts/OrxonoxSky.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/OrxonoxSky.material	(revision 861)
@@ -0,0 +1,70 @@
+material Orxonox/StarSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture stars.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+material Orxonox/BlueStarSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture bluestar.png separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+material Orxonox/StarfieldSkyBox
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+
+			texture_unit
+			{
+				cubic_texture starfield.jpg separateUV
+				tex_address_mode clamp
+			}
+		}
+	}
+}
+
+material Orxonox/LoadingScreenSample
+{
+   technique
+   {
+      pass
+      {
+         
+         depth_writing off
+
+         texture_unit
+         {
+            texture sample_loading.jpg
+         }
+      }
+   }
+} 
Index: /code/branches/network/Media/materials/scripts/PE_materials.material
===================================================================
--- /code/branches/network/Media/materials/scripts/PE_materials.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/PE_materials.material	(revision 861)
@@ -0,0 +1,143 @@
+material PE/lensflare
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend add
+
+			texture_unit
+			{
+				texture flare.png
+			}
+		}
+	}
+}
+
+material PE/bigFlame
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend add
+
+			texture_unit
+			{
+				texture bigflame.png
+			}
+		}
+	}
+}
+
+material PE/smoke
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend alpha_blend
+
+			texture_unit
+			{
+				texture smoke.png
+			}
+		}
+	}
+}
+
+material PE/explosion
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend add
+
+			texture_unit
+			{
+				texture explosion.png
+			}
+		}
+	}
+}
+
+material PE/ringflare
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend add
+
+			texture_unit
+			{
+				texture ring_flare.png
+			}
+		}
+	}
+}
+
+material PE/ringflare2
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend add
+
+			texture_unit
+			{
+				texture ring_flare2.png
+			}
+		}
+	}
+}
+
+material PE/Flare
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			scene_blend add
+			depth_write off
+
+			texture_unit
+			{
+				texture flaretrail.png
+			}
+		}
+	}
+}
+
+material PE/Streak
+{
+	technique
+	{
+		pass
+		{
+			lighting off
+			depth_write off
+			scene_blend add
+
+			texture_unit
+			{
+				texture streak.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/assf.material
===================================================================
--- /code/branches/network/Media/materials/scripts/assf.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/assf.material	(revision 861)
@@ -0,0 +1,15 @@
+material Material/SOLID/TEX/human_assf.png/VertCol
+{
+	technique
+	{
+		pass
+		{
+			diffuse vertexcolour
+			specular 0.500000 0.500000 0.500000 12.500000
+			texture_unit
+			{
+				texture human_assf.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/assf5.material
===================================================================
--- /code/branches/network/Media/materials/scripts/assf5.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/assf5.material	(revision 861)
@@ -0,0 +1,15 @@
+material Material/SOLID/TEX/human_assf5.png/VertCol
+{
+	technique
+	{
+		pass
+		{
+			diffuse vertexcolour
+			specular 0.500000 0.500000 0.500000 12.500000
+			texture_unit
+			{
+				texture human_assf5.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/ast.material
===================================================================
--- /code/branches/network/Media/materials/scripts/ast.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/ast.material	(revision 861)
@@ -0,0 +1,14 @@
+material rock/SOLID/TEX/rock.png
+{
+	technique
+	{
+		pass
+		{
+			specular 0.000000 0.000000 0.000000 12.500000
+			texture_unit
+			{
+				texture rock.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/drone.material
===================================================================
--- /code/branches/network/Media/materials/scripts/drone.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/drone.material	(revision 861)
@@ -0,0 +1,13 @@
+material SOLID/TEX/TextureDrone.jpg
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture drone.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/hoover.material
===================================================================
--- /code/branches/network/Media/materials/scripts/hoover.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/hoover.material	(revision 861)
@@ -0,0 +1,39 @@
+material SOLID/TEX/hoover_turbine.png
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture hoover_turbine.png
+			}
+		}
+	}
+}
+material SOLID/TEX/hoover_gear.png
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture hoover_gear.png
+			}
+		}
+	}
+}
+material SOLID/TEX/hoover_body.png
+{
+	technique
+	{
+		pass
+		{
+			texture_unit
+			{
+				texture hoover_body.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/spacecruiser.material
===================================================================
--- /code/branches/network/Media/materials/scripts/spacecruiser.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/spacecruiser.material	(revision 861)
@@ -0,0 +1,15 @@
+material Material/SOLID/TEX/spacesruiser.png
+{
+	technique
+	{
+		pass
+		{
+			diffuse 0.800000 0.800000 0.800000
+			specular 0.500000 0.500000 0.500000 12.500000
+			texture_unit
+			{
+				texture spacesruiser.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/materials/scripts/starship.material
===================================================================
--- /code/branches/network/Media/materials/scripts/starship.material	(revision 861)
+++ /code/branches/network/Media/materials/scripts/starship.material	(revision 861)
@@ -0,0 +1,14 @@
+material Material/SOLID/TEX/starship.png
+{
+	technique
+	{
+		pass
+		{
+			specular 0.500000 0.500000 0.500000 12.500000
+			texture_unit
+			{
+				texture starship.png
+			}
+		}
+	}
+}
Index: /code/branches/network/Media/overlay/OrxonoxHUD1.2.overlay
===================================================================
--- /code/branches/network/Media/overlay/OrxonoxHUD1.2.overlay	(revision 861)
+++ /code/branches/network/Media/overlay/OrxonoxHUD1.2.overlay	(revision 861)
@@ -0,0 +1,456 @@
+Orxonox/HUD1.2
+{
+	zorder 500
+	// Stats block
+
+
+	
+
+
+
+	container Panel(Orxonox/HUD1.2/MapBackGround)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align center
+		left -75
+		top -160
+		width 150
+		height 150
+		material Orxonox/MapBackGround
+	}
+
+	container Panel(Orxonox/HUD1.2/MyShip)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align center
+		left 100
+		top -140
+		width 100
+		height 100
+		material Orxonox/MyShip
+		
+		container Panel(Orxonox/HUD1.2/shieldLeftTop)
+		{
+			metrics_mode pixels
+			left -5
+			top 0
+			width 30
+			height 30
+			material Orxonox/shieldLeftTop
+		}
+
+		container Panel(Orxonox/HUD1.2/shieldRightTop)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 0
+			width 30
+			height 30
+			material Orxonox/shieldRightTop
+		}
+
+		container Panel(Orxonox/HUD1.2/shieldLeftBottom)
+		{
+			metrics_mode pixels
+			vert_align bottom
+			left -5
+			top -30
+			width 30
+			height 30
+			material Orxonox/shieldLeftBottom
+		}
+
+		container Panel(Orxonox/HUD1.2/shieldRightBottom)
+		{
+			metrics_mode pixels
+			vert_align bottom
+			horz_align right
+			left -30
+			top -30
+			width 30
+			height 30
+			material Orxonox/shieldRightBottom
+		}
+		
+	}
+
+
+	container Panel(Orxonox/HUD1.2/PrimarBackground)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -180
+		top -180
+		width 150
+		height 50
+		material Orxonox/PrimarBackground
+
+		container Panel(Orxonox/HUD1.2/PrimarSample1)
+		{
+			metrics_mode pixels
+			left 0
+			top 0
+			width 50
+			height 50
+			material Orxonox/PrimarSample
+		}
+
+		container Panel(Orxonox/HUD1.2/PrimarSample2)
+		{
+			metrics_mode pixels
+			left 50
+			top 0
+			width 50
+			height 50
+			material Orxonox/PrimarSample
+		}
+
+		container Panel(Orxonox/HUD1.2/PrimarSample3)
+		{
+			metrics_mode pixels
+			left 100
+			top 0
+			width 50
+			height 50
+			material Orxonox/PrimarSample
+		}
+
+		container Panel(Orxonox/HUD1.2/PrimarChoice)
+		{
+			metrics_mode pixels
+			left 2
+			top 2
+			width 48
+			height 46
+			material Orxonox/PrimarChoice
+		}
+
+
+
+
+	}
+	
+	container Panel(Orxonox/HUD1.2/RacketBackground)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -180
+		top -130
+		width 150
+		height 100
+		material Orxonox/RacketBackground
+
+		element TextArea(Orxonox/HUD1.2/Rocket1)
+		{
+			metrics_mode pixels
+			left 10
+			top 7
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket1
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/Rocket2)
+		{
+			metrics_mode pixels
+			left 10
+			top 29
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket2
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/Rocket3)
+		{
+			metrics_mode pixels
+			left 10
+			top 51
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket3
+			colour_top 0 1 0 
+		}
+	
+		element TextArea(Orxonox/HUD1.2/Rocket4)
+		{
+			metrics_mode pixels
+			left 10
+			top 74
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Rocket4
+			colour_top 0 1 0 
+		}
+
+
+		element TextArea(Orxonox/HUD1.2/RocketNum1)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 7
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 20
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/RocketNum2)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 29
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 99
+			colour_top 0 1 0 
+		}	
+
+		element TextArea(Orxonox/HUD1.2/RocketNum3)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 51
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 01
+			colour_top 0 1 0 
+		}
+	
+		element TextArea(Orxonox/HUD1.2/RocketNum4)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -30
+			top 74
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 55
+			colour_top 0 1 0 
+		}	
+	
+		
+	
+
+
+	}
+
+
+	container Panel(Orxonox/HUD1.2/Energy)
+	{
+		metrics_mode pixels
+		vert_align top
+		horz_align center
+		left -100
+		top 20
+		width 200
+		height 20
+
+		container Panel(Orxonox/HUD1.2/EnergyBackground)
+		{
+			metrics_mode pixels
+			width 200
+			height 20
+			material Orxonox/EnergyBackground
+		}
+		
+		element TextArea(Orxonox/HUD1.2/EnergyText)
+		{
+			metrics_mode pixels
+			horz_align center
+			left -20
+			top 2
+			width 200
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Energy
+			colour_top 1 1 0 
+		}
+	}
+
+	container Panel(Orxonox/HUD1.2/TargetWindow)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align left
+		left 40
+		top -130
+		width 150
+		height 100
+		material Orxonox/TargetBackground
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/Name)
+		{
+			metrics_mode pixels
+			left 20
+			top 5
+			width 200
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption Moesonator
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/Distance)
+		{
+			metrics_mode pixels
+			left 9
+			top 35
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Distance
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/Status)
+		{
+			metrics_mode pixels
+			left 7
+			top 55
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Status
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/HitRating)
+		{
+			metrics_mode pixels
+			left 7
+			top 75
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption Hit Rating
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/DistanceText)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -50
+			top 35
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption 50km
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/StatusText)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -50
+			top 55
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption huhu
+			colour_top 0 1 0 
+		}
+
+		element TextArea(Orxonox/HUD1.2/TargetWindow/HitRatingText)
+		{
+			metrics_mode pixels
+			horz_align right
+			left -50
+			top 75
+			width 150
+			height 20
+			font_name BlueHighway
+			char_height 20
+			caption 50%
+			colour_top 0 1 0 
+		}
+
+
+
+	}
+
+
+
+
+	container Panel(Orxonox/HUD1.2/EnergyDistrWindow)
+	{
+		metrics_mode pixels
+		vert_align bottom
+		horz_align right
+		left -150
+		top -300
+		width 100
+		height 86
+		material Orxonox/EnergyDistrBackground
+
+		container Panel(Orxonox/HUD1.2/EnergyDistrPoint)
+		{
+			metrics_mode pixels
+			left 40
+			top 36
+			width 7
+			height 7
+			material Orxonox/RedPoint
+		}
+	}
+
+	container Panel(Orxonox/HUD1.2/Time)
+	{
+		metrics_mode pixels
+		vert_align top
+		horz_align left
+		left 30
+		top 10
+		width 60
+		height 30
+
+		
+		element TextArea(Orxonox/HUD1.2/Time/Text)
+		{
+			metrics_mode pixels
+			horz_align left
+			left 10
+			top 5
+			width 100
+			height 20
+			font_name BlueHighway
+			char_height 25
+			caption 99:99
+			colour_top 0 1 0 
+		}
+
+}
Index: /code/branches/network/Media/overlay/OrxonoxLoading.overlay
===================================================================
--- /code/branches/network/Media/overlay/OrxonoxLoading.overlay	(revision 861)
+++ /code/branches/network/Media/overlay/OrxonoxLoading.overlay	(revision 861)
@@ -0,0 +1,13 @@
+Orxonox/LoadingScreenSample
+{
+   container Panel(Orxonox/LoadingScreenSample)
+   {
+      metrics_mode pixels
+      vert_align top
+      left 12
+      top 12
+      width 300
+      height 300
+      material Orxonox/LoadingScreenSample
+   }
+} 
Index: /code/branches/network/Media/particle/Example-Water.particle
===================================================================
--- /code/branches/network/Media/particle/Example-Water.particle	(revision 861)
+++ /code/branches/network/Media/particle/Example-Water.particle	(revision 861)
@@ -0,0 +1,35 @@
+Examples/Water/Rain
+{
+    material        Examples/Droplet
+    particle_width  100
+    particle_height 300
+    cull_each       true
+    quota           100
+    // Make common direction straight down (faster than self oriented)
+    billboard_type  oriented_common
+    common_direction 0 -1 0
+    
+    // Area emitter
+    emitter Box
+    {
+        angle           0
+        emission_rate   20
+        time_to_live    5
+        direction       0 -1 0
+        velocity    	1000
+        colour_range_start  0.3 1 0.3
+        colour_range_end    0.7 1 0.7
+        width           3000
+        height          3000
+        depth           0
+    }
+
+    // Gravity
+    affector LinearForce
+    {
+        force_vector      0 -1000 0
+        force_application add
+    }
+
+}
+
Index: /code/branches/network/Media/particle/Example.particle
===================================================================
--- /code/branches/network/Media/particle/Example.particle	(revision 861)
+++ /code/branches/network/Media/particle/Example.particle	(revision 861)
@@ -0,0 +1,395 @@
+// Example particle systems
+
+// Exudes greeny particles which float upwards
+Examples/GreenyNimbus
+{
+    material        Examples/FlarePointSprite
+	point_rendering	true
+	// point rendering means size is controlled by material
+	// provide fallback sizes for hardware that doesn't support point sprite
+    particle_width  30
+    particle_height 30
+    cull_each       false
+	cull_each       false
+    quota           10000
+    billboard_type  point
+    
+    // Area emitter
+    emitter Box
+    {
+        angle           30
+        emission_rate   30
+        time_to_live    5
+        direction       0 1 0
+        velocity    	0
+        colour_range_start  1 1 0
+        colour_range_end    0.3 1 0.3
+        width           60
+        height          60
+        depth           60
+    }
+
+    // Make em float upwards
+    affector LinearForce
+    {
+        force_vector      0 100 0
+        force_application add
+    }
+
+    // Fader
+    affector ColourFader
+    {
+        red -0.25
+        green -0.25
+        blue -0.25
+    }
+
+
+}
+
+// A sparkly purple fountain
+Examples/PurpleFountain
+{
+    material        Examples/Flare2
+    particle_width  20
+    particle_height 40
+    cull_each       false
+    quota           10000
+    billboard_type  oriented_self
+    
+    // Area emitter
+    emitter Point
+    {
+        angle           15
+        emission_rate   75
+        time_to_live    3
+        direction       0 1 0
+        velocity_min    250
+        velocity_max    300
+        colour_range_start  0 0 0
+        colour_range_end    1 1 1
+    }
+
+    // Gravity
+    affector LinearForce
+    {
+        force_vector      0 -100 0
+        force_application add
+    }
+
+    // Fader
+    affector ColourFader
+    {
+        red -0.25
+        green -0.25
+        blue -0.25
+    }
+}
+
+
+// A downpour
+Examples/Rain
+{
+    material        Examples/Droplet
+    particle_width  20
+    particle_height 100
+    cull_each       true
+    quota           10000
+    // Make common direction straight down (faster than self oriented)
+    billboard_type  oriented_common
+    common_direction 0 -1 0
+    
+    // Area emitter
+    emitter Box
+    {
+        angle           0
+        emission_rate   100
+        time_to_live    5
+        direction       0 -1 0
+        velocity    	50
+        colour_range_start  0.3 1 0.3
+        colour_range_end    0.7 1 0.7
+        width           1000
+        height          1000
+        depth           0
+    }
+
+    // Gravity
+    affector LinearForce
+    {
+        force_vector      0 -200 0
+        force_application add
+    }
+
+}
+
+// A jet engine (of sorts)
+Examples/JetEngine1
+{
+	material 		Examples/Flare
+	particle_width 	25
+	particle_height	25
+	cull_each		false
+	quota			200
+	billboard_type	point
+
+	emitter Point
+	{
+		angle 5
+		emission_rate 100
+        time_to_live    1
+        direction       0 -1 0
+        velocity_min    250
+        velocity_max    300
+        colour_range_start  1 1 0.5
+        colour_range_end    1 0.8 0.3
+		
+	}
+	affector ColourFader
+	{
+		red -0.25
+		green -1
+		blue -1
+	}
+	
+}
+Examples/JetEngine2
+{
+	material 		Examples/Flare
+	particle_width 	15
+	particle_height	15
+	cull_each		false
+	quota			200
+	billboard_type	point
+
+	emitter Point
+	{
+		angle 3
+		emission_rate 100
+        time_to_live    1
+        direction       0 -1 0
+        velocity_min    350
+        velocity_max    400
+        colour_range_start  0.5 1 1
+        colour_range_end    0.3 0.8 1
+		
+	}
+	affector ColourFader
+	{
+		red -1
+		green -1
+		blue -0.5
+	}
+	
+}
+
+// Exudes aureola particles which around the model float upwards
+Examples/Aureola
+{
+    material        Examples/Aureola
+    particle_width  200
+    particle_height 200
+    cull_each       false
+    quota           100
+    billboard_type  perpendicular_common
+    common_direction 0 1 0
+    common_up_vector 0 0 1
+
+    // Area emitter
+    emitter Box
+    {
+        angle           30
+        emission_rate   4
+        time_to_live    5
+        position        0 -100 0
+        direction       0 1 0
+        velocity_min  	0
+        velocity_max  	30
+        colour_range_start  0.3 0.3 0.3 0.0
+        colour_range_end    0.8 0.8 0.8 0.0
+        width           10
+        height          10
+        depth           30
+    }
+
+    // Make em float upwards
+    affector LinearForce
+    {
+        force_vector      0 70 0
+        force_application add
+    }
+
+    // Fader
+    affector ColourFader2
+    {
+        red1 +0.4
+        green1 +0.4
+        blue1 +0.4
+        alpha1 +0.7
+
+        red2 -0.25
+        green2 -0.25
+        blue2 -0.25
+        alpha2 -0.3333
+
+        state_change 3.5
+    }
+
+    // Rotater
+    affector Rotator
+    {
+        rotation_range_start 0
+        rotation_range_end 360
+        rotation_speed_range_start 0
+        rotation_speed_range_end 180
+    }
+}
+
+
+Examples/Swarm
+{
+	quota	3000
+	material	Examples/Flare2
+	particle_width	12
+	particle_height	24
+	cull_each	true
+	renderer	billboard
+	sorted	true
+	local_space	false
+	billboard_type	oriented_self
+
+	emitter Box
+	{
+		angle	180
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 1 0
+		emission_rate	30
+		position	0 0 0
+		velocity	50
+		velocity_min	50
+		velocity_max	1
+		time_to_live	20
+		time_to_live_min	20
+		time_to_live_max	20
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	80
+		height	80
+		depth	80
+	}
+
+	affector ColourFader
+	{
+		red	-0.05
+		green	0
+		blue	0
+		alpha	0
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 -50 0
+		plane_normal	0 1 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 50 0
+		plane_normal	0 -1 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	50 0 0
+		plane_normal	-1 0 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	-50 0 0
+		plane_normal	1 0 0
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 0 50
+		plane_normal	0 0 -1
+		bounce	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 0 -50
+		plane_normal	0 0 1
+		bounce	1
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness	60
+	}
+}
+
+
+Examples/Snow
+{
+	quota	2000
+	material	Examples/Flare
+	particle_width	4
+	particle_height	4
+	cull_each	true
+	renderer	billboard
+	sorted	true
+	local_space	false
+	billboard_type	point
+
+	emitter Box
+	{
+		angle	0
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 -1 0
+		emission_rate	100
+		position	0 200 0
+		velocity	20
+		velocity_min	20
+		velocity_max	20
+		time_to_live	20
+		time_to_live_min	20
+		time_to_live_max	20
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	200
+		height	200
+		depth	1
+	}
+
+	affector DeflectorPlane
+	{
+		plane_point	0 0 0
+		plane_normal	0 1 0
+		bounce	0
+	}
+
+	affector DirectionRandomiser
+	{
+		randomness	10
+	}
+}
+
+
Index: /code/branches/network/Media/particle/emitted_emitter.particle
===================================================================
--- /code/branches/network/Media/particle/emitted_emitter.particle	(revision 861)
+++ /code/branches/network/Media/particle/emitted_emitter.particle	(revision 861)
@@ -0,0 +1,112 @@
+// Example emitted emitters
+
+Examples/Fireworks
+
+{
+
+    material Examples/Flare
+
+    point_rendering            false
+
+    particle_width             10
+
+    particle_height            10
+
+    cull_each                  false
+
+    quota                      1000
+
+    emit_emitter_quota         10
+
+    billboard_type             point
+
+    
+
+    // Emitter that emits multiple Point emitters with name 'explosion'
+
+    emitter Box
+
+    {
+
+        name                    mainEmitter
+
+        emit_emitter            explosion
+
+        angle                   30
+
+        emission_rate           1000
+
+        time_to_live            3
+
+        direction               0 1 0
+
+        velocity                200
+
+    }
+
+
+
+    // This Point emitter is emitted by the Box emitter and emits billboard particles itself
+
+    emitter Point
+
+    {
+
+        name                    explosion
+
+        angle                   360
+
+        emission_rate           1000
+
+        time_to_live            2
+
+        direction               0 1 0
+
+        velocity                80
+
+        duration                0.1
+
+        repeat_delay_min        2
+
+        repeat_delay_max        3
+
+    }
+
+
+
+    // Make em float downwards
+
+    affector LinearForce
+
+    {
+
+        force_vector            0 -100 0
+
+        force_application       add
+
+    }
+
+
+
+    // Give em some nice colours
+
+    affector ColourInterpolator
+
+    {
+
+        time0                   0
+
+        colour0                 1 1 0
+
+        time1                   0.5
+
+        colour1                 1 0 0
+
+        time2                   0.9
+
+        colour2                 0 0 1
+
+    }
+
+}
+
Index: /code/branches/network/Media/particle/engineglow.particle
===================================================================
--- /code/branches/network/Media/particle/engineglow.particle	(revision 861)
+++ /code/branches/network/Media/particle/engineglow.particle	(revision 861)
@@ -0,0 +1,40 @@
+
+Orxonox/engineglow
+{
+	quota	200
+	material	PE/bigFlame
+	particle_width	12
+	particle_height	12
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter HollowEllipsoid
+	{
+		angle	0
+		colour	0.46875 0.8125 0.93359375 1
+		colour_range_start	.6640625 .91796875 .92578125 1
+		colour_range_end	.08203125 .7578125 .98046875 1
+		direction	0 1 0
+		emission_rate	45
+		position	0 0 0
+		velocity	5
+		velocity_min	4
+		velocity_max	6
+		time_to_live	0.5
+		time_to_live_min	0.2
+		time_to_live_max	0.9
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	4
+		height	2.5
+		depth	1.3
+		inner_width	0.5
+		inner_height	0.3
+		inner_depth	0.2
+	}
+}
Index: /code/branches/network/Media/particle/rauch.particle
===================================================================
--- /code/branches/network/Media/particle/rauch.particle	(revision 861)
+++ /code/branches/network/Media/particle/rauch.particle	(revision 861)
@@ -0,0 +1,51 @@
+
+Orxonox/rauch
+{
+	quota	1000
+	material	PE/smoke
+	particle_width	4
+	particle_height	4
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Ellipsoid
+	{
+		angle	150
+		colour	0.0547945 0.0547945 0.0547945 0.9
+		colour_range_start	0.0547945 0.0547945 0.0547945 0.9
+		colour_range_end	0.0547945 0.0547945 0.0547945 0.9
+		direction	0 1 0
+		emission_rate	40
+		position	0 0 0
+		velocity	2
+		velocity_min	2
+		velocity_max	2
+		time_to_live	3
+		time_to_live_min	3
+		time_to_live_max	5
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	0.2
+		height	0.2
+		depth	0.2
+	}
+
+	affector ColourFader
+	{
+		red	0.3
+		green	0.3
+		blue	0.3
+		alpha	-0.35
+	}
+
+	affector LinearForce
+	{
+		force_vector	10 0 0
+		force_application	add
+	}
+}
Index: /code/branches/network/Media/particle/schuss.particle
===================================================================
--- /code/branches/network/Media/particle/schuss.particle	(revision 861)
+++ /code/branches/network/Media/particle/schuss.particle	(revision 861)
@@ -0,0 +1,36 @@
+Orxonox/schuss
+{
+	quota	5000
+	material	PE/lensflare
+	particle_width	3
+	particle_height	3
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Cylinder
+	{
+		angle	0
+		colour	1 1 0 1
+		colour_range_start	1 1 0 1
+		colour_range_end	0.3 1 0.3 1
+		direction	0 1 0
+		emission_rate	260.9
+		position	0 0 0
+		velocity	120
+		velocity_min	120
+		velocity_max	120
+		time_to_live	2
+		time_to_live_min	2
+		time_to_live_max	2
+		duration	0.1
+		duration_min	0.1
+		duration_max	0.1
+		repeat_delay	0.5
+		repeat_delay_min	0.5
+		repeat_delay_max	0.5
+		width	0.5
+		height	0.5
+		depth	5
+	}
+}
Index: /code/branches/network/Media/particle/smoke.particle
===================================================================
--- /code/branches/network/Media/particle/smoke.particle	(revision 861)
+++ /code/branches/network/Media/particle/smoke.particle	(revision 861)
@@ -0,0 +1,43 @@
+// Example particle systems
+
+// smoke
+Examples/Smoke
+{
+    	material        	Examples/Smoke
+    	particle_width  	55
+    	particle_height 	55
+    	cull_each       	true
+    	quota           	500
+    	billboard_type  	point
+		sorted				true
+    
+    	// Area emitter
+    	emitter Point
+    	{
+		angle               		11
+        	emission_rate       		15
+        	time_to_live        		4
+        	direction           		0 1 0
+        	velocity_min        		150
+        	velocity_max        		240    	
+	}
+
+	affector ColourImage
+	{
+		image		smokecolors.png
+	}
+
+   	affector Rotator
+   	{
+        	rotation_range_start  		0
+        	rotation_range_end   	 	360
+        	rotation_speed_range_start  	-60
+        	rotation_speed_range_end    	200
+   	}
+
+   	affector Scaler
+   	{
+       	rate 	100
+   	}
+
+}
Index: /code/branches/network/Media/particle/strahl.particle
===================================================================
--- /code/branches/network/Media/particle/strahl.particle	(revision 861)
+++ /code/branches/network/Media/particle/strahl.particle	(revision 861)
@@ -0,0 +1,30 @@
+
+Orxonox/strahl
+{
+	quota	1000
+	material	PE/lensflare
+	particle_width	4
+	particle_height	4
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Point
+	{
+		angle	0
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 1 0
+		emission_rate	100
+		position	0 0 0
+		velocity	50
+		time_to_live	8
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+	}
+}
Index: /code/branches/network/Media/particle/strahl2.particle
===================================================================
--- /code/branches/network/Media/particle/strahl2.particle	(revision 861)
+++ /code/branches/network/Media/particle/strahl2.particle	(revision 861)
@@ -0,0 +1,38 @@
+
+Orxonox/strahl2
+{
+	quota	1200
+	material	PE/lensflare
+	particle_width	4
+	particle_height	4
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter Ring
+	{
+		angle	0
+		colour	1 1 1 1
+		colour_range_start	1 1 1 1
+		colour_range_end	1 1 1 1
+		direction	0 1 0
+		emission_rate	7
+		position	0 0 0
+		velocity	20
+		velocity_min	20
+		velocity_max	50
+		time_to_live	10
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	15
+		height	15
+		depth	15
+		inner_width	0.5
+		inner_height	0.5
+	}
+
+}
Index: /code/branches/network/Media/particle/treibwerk.particle
===================================================================
--- /code/branches/network/Media/particle/treibwerk.particle	(revision 861)
+++ /code/branches/network/Media/particle/treibwerk.particle	(revision 861)
@@ -0,0 +1,54 @@
+
+Orxonox/treibwerk
+{
+	quota	1000
+	material	PE/bigFlame
+	particle_width	20
+	particle_height	20
+	cull_each	false
+	renderer	billboard
+	billboard_type	point
+
+	emitter HollowEllipsoid
+	{
+		angle	0
+		colour	0.493151 0.246575 0.0410959 1
+		colour_range_start	0.493151 0.246575 0.0410959 1
+		colour_range_end	0.684932 0.547945 0.315068 1
+		direction	0 1 0
+		emission_rate	130.4
+		position	0 0 0
+		velocity	18
+		velocity_min	18
+		velocity_max	30
+		time_to_live	0.9
+		time_to_live_min	0.9
+		time_to_live_max	2
+		duration	0
+		duration_min	0
+		duration_max	0
+		repeat_delay	0
+		repeat_delay_min	0
+		repeat_delay_max	0
+		width	20
+		height	20
+		depth	2.8
+		inner_width	0.8
+		inner_height	0.8
+		inner_depth	0.8
+	}
+
+
+	affector ColourFader2
+	{
+		red1	0
+		green1	0
+		blue1	0
+		alpha1	0
+		red2	-0.2
+		green2	-0.4
+		blue2	-0.4
+		alpha2	0
+		state_change	0.9
+	}
+}
Index: /code/branches/network/README
===================================================================
--- /code/branches/network/README	(revision 861)
+++ /code/branches/network/README	(revision 861)
@@ -0,0 +1,20 @@
+Hi there,
+
+We are proud to present you Orxonox - the most ferious 3D space shooter ever to exist.
+
+This game is free, if you have paid for this, get your money back! The source code of this game is licensed under the GPL (GNU General Public License). 
+The game content is licensed under the Creative Commons Attribution-Sharealike 2.5 license. For more information read LICENSE in the same folder you found this file.
+
+For directions to install this game, please check out the file INSTALL or http://www.orxonox.net/wiki/Running
+
+This application uses the Ogre Graphics Engine (http://www.ogre3d.org), if you haven't already downloaded a precompiled version of Ogre with this package. Visit our webpage to get your Orxonox compatible version of the Ogre libraries.
+
+This is an open source game. If you want to contribute check out http://www.orxonox.net/wiki/development to find more information how you could help us making the game better. We are always looking for programmers and content designers, who like to contribute.
+
+We hope you have fun playing the game. Check out http://www.orxonox.net for news and newer versions of the game.
+
+Please contact us in our forum ( http://forum.orxonox.net ) or check out our contact page ( http://www.orxonox.net/wiki/about#Contact ). We hope to hear from you and are looking forward to your feedback.
+
+
+Cheers,
+The Orxonox Development Team
Index: /code/branches/network/bin/audio/sounds/.dolphinview
===================================================================
--- /code/branches/network/bin/audio/sounds/.dolphinview	(revision 861)
+++ /code/branches/network/bin/audio/sounds/.dolphinview	(revision 861)
@@ -0,0 +1,1 @@
+V0110200712051747220A0
Index: /code/branches/network/bin/levels/sample.oxw
===================================================================
--- /code/branches/network/bin/levels/sample.oxw	(revision 861)
+++ /code/branches/network/bin/levels/sample.oxw	(revision 861)
@@ -0,0 +1,290 @@
+<?xml version="1.0"?>
+<orxonoxworld name="Orxonox sample level" image="textures/menu/moonstation_512x512.jpg">
+  <description>
+    This is an orxonox sample level.
+  </description>
+
+  <loading>
+    <background color="000000" image="textures/load_screens/ambush.png" />
+    <bar top="200" left="50" width="300" height="20" image="textures/load_screens/ambush-loadbar.png" />
+  </loading>
+
+
+
+ <audio>
+		<ambient>
+			<ogg src="allgorythm-lift_up" />
+			<ogg src="allgorythm-resonance_blaster" />
+			<ogg src="luke_grey_-_hypermode" />
+			<ogg src="task_horizon_-_menu1" />
+			<ogg src="tha_silent_partner_-_void" />
+		</ambient>
+  </audio>
+
+  <!-- Keep a minimum distance of >100 to the object, otherwise the camara thinks it's in the object -->
+  <!-- the value has to negative, as we want the camara behind the object -->
+<!--
+    <Camera name="Camera" pos="0,50,-150" lookat="0,20,0" node="2OgreHeadNode" />
+    <SpaceShip camera="true" position="0,0,0" scale="10" yaw="-90" pitch="-90" mesh="assf3.mesh"  forward="250" rotateupdown="100" rotaterightleft="100" looprightleft="100" />
+-->
+  <world>
+    <Ambient colourvalue="1,1,1" />
+    <Skybox src="Orxonox/StarSkyBox" />
+
+    <!--Fighter camera="true" position="0,0,0" scale="10" yaw="-90" pitch="-90" mesh="assf3.mesh"  forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /-->
+    <SpaceShip camera="true" position="0,0,0" scale="10" yaw="-90" pitch="-90" mesh="assf5.mesh" maxSpeed="500" maxSideAndBackSpeed="50" maxRotation="1.0" transAcc="200" rotAcc="3.0" transDamp="75" rotDamp="1.0" />
+
+    <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
+    <NPC position="0,100,400" scale="1" mesh="razor.mesh"/>
+    <NPC position="0,-100,500" scale="1" mesh="razor.mesh"/>
+    <NPC position="0,-200,450" scale="1" mesh="razor.mesh"/>
+    <NPC position="100,0,400" scale="1" mesh="razor.mesh"/>
+
+    <Model position="200,0,500" scale="10" mesh="starship.mesh" yaw="-90" pitch="-90" />
+    <Model position="-200,0,500" scale="10" mesh="drone.mesh" yaw="-90" pitch="-90" />
+
+    <Model position="-200,1000,500" scale="10" mesh="hoover_body.mesh" yaw="-90" pitch="-90" />
+    <Model position="-200,1000,500" scale="10" mesh="hoover_gear0.mesh" yaw="-90" pitch="-90" />
+    <Model position="-200,1000,500" scale="10" mesh="hoover_gear1.mesh" yaw="-90" pitch="-90" />
+    <Model position="-200,1000,500" scale="10" mesh="hoover_gear2.mesh" yaw="-90" pitch="-90" />
+    <Model position="-200,1000,500" scale="10" mesh="hoover_turbine.mesh" yaw="-90" pitch="-90" />
+
+
+    <Model position="-16779,42,11043" scale="95" mesh="ast2.mesh" rotationAxis="0.281711,0.152518,0" rotationRate="27" />
+    <Model position="12893,-1583,-17939" scale="48" mesh="ast1.mesh" rotationAxis="0.0597998,0.923364,0" rotationRate="36" />
+    <Model position="-2107,259,-19814" scale="29" mesh="ast4.mesh" rotationAxis="0.298639,0.96907,0" rotationRate="32" />
+    <Model position="-9583,-2284,-19904" scale="33" mesh="ast5.mesh" rotationAxis="0,0.675659,0.0196445" rotationRate="44" />
+    <Model position="-19597,-15494,3163" scale="37" mesh="ast5.mesh" rotationAxis="0.477996,0,0.048639" rotationRate="23" />
+    <Model position="-182,6442,-4496" scale="25" mesh="ast5.mesh" rotationAxis="0.142225,0,0.154393" rotationRate="37" />
+    <Model position="1004,-19639,-13744" scale="21" mesh="ast1.mesh" rotationAxis="0.974865,0.299775,0" rotationRate="29" />
+    <Model position="-13204,-10191,-1555" scale="31" mesh="ast1.mesh" rotationAxis="0.41675,0,0.385001" rotationRate="42" />
+    <Model position="-1843,12203,2346" scale="81" mesh="ast5.mesh" rotationAxis="0.221171,0,0.331917" rotationRate="41" />
+    <Model position="-1560,-1443,-17416" scale="68" mesh="ast1.mesh" rotationAxis="0.653787,0.00935241,0" rotationRate="44" />
+    <Model position="-7723,18661,3363" scale="94" mesh="ast5.mesh" rotationAxis="0.450345,0,0.417313" rotationRate="29" />
+    <Model position="-8122,5764,16342" scale="45" mesh="ast4.mesh" rotationAxis="0.268558,0,0.089161" rotationRate="30" />
+    <Model position="17575,-14054,-16710" scale="80" mesh="ast1.mesh" rotationAxis="0,0.615899,0.571064" rotationRate="18" />
+    <Model position="-15304,-17381,4149" scale="32" mesh="ast6.mesh" rotationAxis="0.015051,0,0.764924" rotationRate="10" />
+    <Model position="5587,2382,-13876" scale="49" mesh="ast4.mesh" rotationAxis="0.501173,0.208012,0" rotationRate="27" />
+    <Model position="12167,-12466,-3364" scale="29" mesh="ast3.mesh" rotationAxis="0.897424,0.896971,0" rotationRate="21" />
+    <Model position="3157,12173,4070" scale="78" mesh="ast2.mesh" rotationAxis="0.496178,0.760223,0" rotationRate="36" />
+    <Model position="-13948,-6497,18368" scale="96" mesh="ast3.mesh" rotationAxis="0,0.0655793,0.17843" rotationRate="47" />
+    <Model position="9304,-16367,-8429" scale="112" mesh="ast3.mesh" rotationAxis="0,0.220054,0.123838" rotationRate="10" />
+    <Model position="-19293,9147,5573" scale="97" mesh="ast6.mesh" rotationAxis="0,0.0590435,0.200379" rotationRate="27" />
+    <Model position="-13022,13902,19960" scale="67" mesh="ast6.mesh" rotationAxis="0,0.637161,0.286825" rotationRate="22" />
+    <Model position="16898,12368,4477" scale="41" mesh="ast3.mesh" rotationAxis="0.962958,0,0.0295571" rotationRate="30" />
+    <Model position="6687,12586,-11721" scale="33" mesh="ast2.mesh" rotationAxis="0.596958,0.326804,0" rotationRate="24" />
+    <Model position="15066,11759,5229" scale="47" mesh="ast5.mesh" rotationAxis="0,0.993547,0.7269" rotationRate="45" />
+    <Model position="7329,-9876,2203" scale="78" mesh="ast4.mesh" rotationAxis="0,0.170628,0.522448" rotationRate="31" />
+    <Model position="-9132,9542,-14753" scale="20" mesh="ast6.mesh" rotationAxis="0.578006,0.738023,0" rotationRate="47" />
+    <Model position="12958,2638,9476" scale="107" mesh="ast2.mesh" rotationAxis="0.815402,0.549519,0" rotationRate="42" />
+    <Model position="3327,-10549,9196" scale="102" mesh="ast3.mesh" rotationAxis="0.403431,0,0.392179" rotationRate="43" />
+    <Model position="-8947,15802,-16153" scale="72" mesh="ast3.mesh" rotationAxis="0,0.863891,0.789231" rotationRate="28" />
+    <Model position="-5340,12944,14528" scale="108" mesh="ast2.mesh" rotationAxis="0.91406,0.865657,0" rotationRate="34" />
+    <Model position="5107,5365,-5004" scale="75" mesh="ast6.mesh" rotationAxis="0,0.663461,0.406224" rotationRate="13" />
+    <Model position="-6998,18403,8238" scale="70" mesh="ast6.mesh" rotationAxis="0.550689,0,0.834949" rotationRate="41" />
+    <Model position="-9089,7495,-15512" scale="59" mesh="ast6.mesh" rotationAxis="0.0784585,0,0.580422" rotationRate="16" />
+    <Model position="-6698,19465,14091" scale="70" mesh="ast5.mesh" rotationAxis="0,0.0536133,0.663091" rotationRate="48" />
+    <Model position="-9943,9390,19361" scale="115" mesh="ast3.mesh" rotationAxis="0.745415,0.302601,0" rotationRate="25" />
+    <Model position="9341,-6947,7223" scale="49" mesh="ast1.mesh" rotationAxis="0.0217983,0.829754,0" rotationRate="40" />
+    <Model position="10259,8970,-7673" scale="70" mesh="ast3.mesh" rotationAxis="0,0.705347,0.0544375" rotationRate="30" />
+    <Model position="4538,-17169,-15829" scale="119" mesh="ast4.mesh" rotationAxis="0.659901,0,0.6408" rotationRate="42" />
+    <Model position="7746,-9746,14917" scale="89" mesh="ast4.mesh" rotationAxis="0.579678,0,0.632015" rotationRate="46" />
+    <Model position="-4550,1554,11166" scale="49" mesh="ast1.mesh" rotationAxis="0.805799,0.905452,0" rotationRate="25" />
+    <Model position="-4571,-14392,14887" scale="20" mesh="ast2.mesh" rotationAxis="0.163796,0.62884,0" rotationRate="38" />
+    <Model position="18390,-19165,-6118" scale="28" mesh="ast2.mesh" rotationAxis="0.386394,0,0.290423" rotationRate="39" />
+    <Model position="-19119,8707,-11377" scale="119" mesh="ast1.mesh" rotationAxis="0.912683,0,0.722097" rotationRate="17" />
+    <Model position="-15827,6956,-3785" scale="32" mesh="ast1.mesh" rotationAxis="0.901503,0,0.548708" rotationRate="29" />
+    <Model position="1956,-13954,18055" scale="59" mesh="ast1.mesh" rotationAxis="0,0.0523992,0.756846" rotationRate="15" />
+    <Model position="2197,-13870,-11528" scale="92" mesh="ast2.mesh" rotationAxis="0.469413,0,0.742143" rotationRate="13" />
+    <Model position="7377,6656,5591" scale="64" mesh="ast6.mesh" rotationAxis="0,0.599119,0.890718" rotationRate="36" />
+    <Model position="16123,8784,-7928" scale="50" mesh="ast6.mesh" rotationAxis="0.648018,0,0.522075" rotationRate="41" />
+    <Model position="-12751,-2191,-11527" scale="94" mesh="ast2.mesh" rotationAxis="0,0.715065,0.332238" rotationRate="36" />
+    <Model position="18020,-16499,18874" scale="31" mesh="ast6.mesh" rotationAxis="0,0.0608362,0.523216" rotationRate="13" />
+    <Model position="-15807,-7678,16780" scale="37" mesh="ast1.mesh" rotationAxis="0,0.658659,0.0366738" rotationRate="18" />
+    <Model position="-17711,-14807,13817" scale="82" mesh="ast6.mesh" rotationAxis="0.16894,0,0.131653" rotationRate="10" />
+    <Model position="-4428,5259,9741" scale="66" mesh="ast6.mesh" rotationAxis="0.424995,0.0971331,0" rotationRate="39" />
+    <Model position="1682,8250,263" scale="34" mesh="ast2.mesh" rotationAxis="0,0.509205,0.22658" rotationRate="35" />
+    <Model position="13624,-5594,12058" scale="61" mesh="ast5.mesh" rotationAxis="0,0.786326,0.21092" rotationRate="41" />
+    <Model position="-5772,8251,15090" scale="89" mesh="ast6.mesh" rotationAxis="0.446662,0,0.039521" rotationRate="46" />
+    <Model position="18732,8386,-17834" scale="115" mesh="ast3.mesh" rotationAxis="0.484641,0.0994628,0" rotationRate="29" />
+    <Model position="-4662,-13023,1337" scale="116" mesh="ast3.mesh" rotationAxis="0.575875,0.380544,0" rotationRate="34" />
+    <Model position="3193,-18575,-13293" scale="55" mesh="ast3.mesh" rotationAxis="0,0.562414,0.669598" rotationRate="23" />
+    <Model position="-18127,15281,-9961" scale="59" mesh="ast5.mesh" rotationAxis="0,0.430401,0.690096" rotationRate="20" />
+    <Model position="-3978,-10245,108" scale="80" mesh="ast4.mesh" rotationAxis="0,0.0821224,0.236512" rotationRate="25" />
+    <Model position="-11319,-12567,5192" scale="109" mesh="ast2.mesh" rotationAxis="0.39942,0,0.537407" rotationRate="24" />
+    <Model position="-4977,-3230,-7025" scale="34" mesh="ast2.mesh" rotationAxis="0,0.464353,0.474219" rotationRate="31" />
+    <Model position="10069,-14931,15176" scale="97" mesh="ast6.mesh" rotationAxis="0.173174,0.520451,0" rotationRate="26" />
+    <Model position="2766,-16062,-10919" scale="78" mesh="ast4.mesh" rotationAxis="0.521386,0,0.717508" rotationRate="36" />
+    <Model position="-9128,12247,2916" scale="67" mesh="ast2.mesh" rotationAxis="0.347868,0.717047,0" rotationRate="28" />
+    <Model position="6440,-16563,-18432" scale="36" mesh="ast5.mesh" rotationAxis="0.265539,0,0.71717" rotationRate="35" />
+    <Model position="12669,-1534,2196" scale="71" mesh="ast2.mesh" rotationAxis="0,0.472099,0.464159" rotationRate="40" />
+    <Model position="172,-18075,11429" scale="108" mesh="ast5.mesh" rotationAxis="0.0320382,0.32207,0" rotationRate="16" />
+    <Model position="2426,8901,-3677" scale="114" mesh="ast5.mesh" rotationAxis="0.778803,0.0691138,0" rotationRate="46" />
+    <Model position="-4576,-13668,14863" scale="40" mesh="ast6.mesh" rotationAxis="0.979052,0.428032,0" rotationRate="30" />
+    <Model position="9222,-15457,4825" scale="24" mesh="ast6.mesh" rotationAxis="0,0.106496,0.409635" rotationRate="38" />
+    <Model position="-3613,-4696,-13838" scale="82" mesh="ast4.mesh" rotationAxis="0.676407,0,0.69673" rotationRate="16" />
+    <Model position="12743,-1674,8050" scale="78" mesh="ast3.mesh" rotationAxis="0.161952,0.389888,0" rotationRate="19" />
+    <Model position="3398,-19196,10512" scale="96" mesh="ast1.mesh" rotationAxis="0,0.799917,0.520012" rotationRate="38" />
+    <Model position="-2837,-9264,-11236" scale="97" mesh="ast4.mesh" rotationAxis="0.892116,0,0.048004" rotationRate="22" />
+    <Model position="13220,-13790,-9710" scale="90" mesh="ast5.mesh" rotationAxis="0,0.931551,0.148539" rotationRate="19" />
+    <Model position="-9560,19189,2493" scale="24" mesh="ast2.mesh" rotationAxis="0.169182,0.962125,0" rotationRate="22" />
+    <Model position="-18545,-13577,5941" scale="92" mesh="ast4.mesh" rotationAxis="0,0.145122,0.499773" rotationRate="24" />
+    <Model position="-12874,-481,7016" scale="89" mesh="ast4.mesh" rotationAxis="0,0.878644,0.744372" rotationRate="31" />
+    <Model position="5290,-11553,-15958" scale="103" mesh="ast4.mesh" rotationAxis="0,0.0858311,0.860834" rotationRate="26" />
+    <Model position="-18189,19019,16471" scale="72" mesh="ast4.mesh" rotationAxis="0,0.206421,0.423981" rotationRate="33" />
+    <Model position="13736,17565,-4338" scale="72" mesh="ast1.mesh" rotationAxis="0.647033,0,0.0993164" rotationRate="26" />
+    <Model position="-11103,-18306,17096" scale="112" mesh="ast6.mesh" rotationAxis="0.938456,0.184833,0" rotationRate="17" />
+    <Model position="16665,322,-13614" scale="57" mesh="ast5.mesh" rotationAxis="0,0.850806,0.942188" rotationRate="30" />
+    <Model position="-13234,-5004,-19934" scale="100" mesh="ast6.mesh" rotationAxis="0.712244,0.214422,0" rotationRate="30" />
+    <Model position="2334,-2954,-17614" scale="50" mesh="ast5.mesh" rotationAxis="0.62725,0,0.646295" rotationRate="22" />
+    <Model position="16214,-12149,-6186" scale="72" mesh="ast1.mesh" rotationAxis="0,0.6434,0.0914027" rotationRate="40" />
+    <Model position="-11746,15630,-12814" scale="92" mesh="ast1.mesh" rotationAxis="0.0516508,0,0.534206" rotationRate="31" />
+    <Model position="19389,-8340,17620" scale="96" mesh="ast5.mesh" rotationAxis="0.806963,0.925497,0" rotationRate="19" />
+    <Model position="12269,18075,5380" scale="103" mesh="ast6.mesh" rotationAxis="0,0.685539,0.0816417" rotationRate="38" />
+    <Model position="16499,13080,-14830" scale="58" mesh="ast3.mesh" rotationAxis="0.776935,0.430662,0" rotationRate="21" />
+    <Model position="14398,-9629,16663" scale="90" mesh="ast2.mesh" rotationAxis="0.405098,0.0716397,0" rotationRate="31" />
+    <Model position="16021,-8497,-11384" scale="73" mesh="ast1.mesh" rotationAxis="0.284874,0.262371,0" rotationRate="22" />
+    <Model position="-12197,19157,-5268" scale="46" mesh="ast6.mesh" rotationAxis="0.301399,0,0.852104" rotationRate="42" />
+    <Model position="3523,-10238,-17036" scale="58" mesh="ast3.mesh" rotationAxis="0.408875,0,0.896493" rotationRate="32" />
+    <Model position="-9942,2328,437" scale="47" mesh="ast6.mesh" rotationAxis="0.391488,0.552897,0" rotationRate="18" />
+    <Model position="-5089,13146,2485" scale="115" mesh="ast3.mesh" rotationAxis="0,0.77605,0.0301674" rotationRate="46" />
+    <Model position="-3325,16428,-42" scale="59" mesh="ast4.mesh" rotationAxis="0.80208,0.306772,0" rotationRate="11" />
+    <Model position="-8399,370,12441" scale="58" mesh="ast4.mesh" rotationAxis="0,0.673135,0.940884" rotationRate="46" />
+    <Model position="12101,13398,-15098" scale="58" mesh="ast2.mesh" rotationAxis="0.168778,0,0.0517661" rotationRate="38" />
+    <Model position="-2875,-11869,11008" scale="55" mesh="ast3.mesh" rotationAxis="0,0.248125,0.642059" rotationRate="40" />
+    <Model position="1690,-9053,14913" scale="52" mesh="ast4.mesh" rotationAxis="0.454649,0.81489,0" rotationRate="23" />
+    <Model position="17507,7536,-8757" scale="29" mesh="ast3.mesh" rotationAxis="0.947894,0,0.283392" rotationRate="41" />
+    <Model position="-1623,-12605,-14277" scale="58" mesh="ast3.mesh" rotationAxis="0,0.253805,0.162647" rotationRate="46" />
+    <Model position="-4045,-535,-14585" scale="88" mesh="ast4.mesh" rotationAxis="0.257327,0,0.894532" rotationRate="24" />
+    <Model position="-9199,715,4150" scale="117" mesh="ast5.mesh" rotationAxis="0.359984,0,0.231855" rotationRate="18" />
+    <Model position="3202,-6145,19403" scale="97" mesh="ast6.mesh" rotationAxis="0,0.470211,0.784929" rotationRate="11" />
+    <Model position="127,-9694,1418" scale="62" mesh="ast1.mesh" rotationAxis="0.0974775,0.108828,0" rotationRate="33" />
+    <Model position="-1033,-8523,14218" scale="89" mesh="ast1.mesh" rotationAxis="0.483568,0,0.581196" rotationRate="14" />
+    <Model position="-28,-1140,7779" scale="47" mesh="ast2.mesh" rotationAxis="0.0572967,0.588805,0" rotationRate="25" />
+    <Model position="-2434,-17785,-6679" scale="104" mesh="ast2.mesh" rotationAxis="0,0.458048,0.639973" rotationRate="37" />
+    <Model position="4260,8520,-1144" scale="51" mesh="ast3.mesh" rotationAxis="0.403191,0,0.167267" rotationRate="33" />
+    <Model position="-3288,-10630,-16957" scale="111" mesh="ast4.mesh" rotationAxis="0.451879,0.909329,0" rotationRate="34" />
+    <Model position="9481,13063,8871" scale="74" mesh="ast6.mesh" rotationAxis="0.962342,0,0.728256" rotationRate="12" />
+    <Model position="-13869,-19298,8075" scale="107" mesh="ast4.mesh" rotationAxis="0.989258,0,0.644457" rotationRate="38" />
+    <Model position="946,11917,5191" scale="109" mesh="ast5.mesh" rotationAxis="0.495949,0,0.243745" rotationRate="20" />
+    <Model position="7633,-4709,8785" scale="77" mesh="ast2.mesh" rotationAxis="0.167179,0,0.393167" rotationRate="10" />
+    <Model position="-19647,-5229,19334" scale="48" mesh="ast6.mesh" rotationAxis="0.358825,0.560023,0" rotationRate="20" />
+    <Model position="-17999,8929,-15681" scale="112" mesh="ast3.mesh" rotationAxis="0,0.243106,0.553743" rotationRate="37" />
+    <Model position="8866,-1606,7639" scale="23" mesh="ast4.mesh" rotationAxis="0,0.605223,0.587725" rotationRate="31" />
+    <Model position="-11575,15941,-9048" scale="32" mesh="ast4.mesh" rotationAxis="0.0341828,0.453673,0" rotationRate="45" />
+    <Model position="13969,15246,-7756" scale="109" mesh="ast5.mesh" rotationAxis="0.755033,0,0.296033" rotationRate="20" />
+    <Model position="-2325,19875,-19124" scale="86" mesh="ast2.mesh" rotationAxis="0.966503,0.242477,0" rotationRate="12" />
+    <Model position="10304,19403,4335" scale="77" mesh="ast4.mesh" rotationAxis="0,0.00236773,0.681625" rotationRate="47" />
+    <Model position="18514,-3055,13163" scale="78" mesh="ast5.mesh" rotationAxis="0,0.515333,0.653287" rotationRate="43" />
+    <Model position="5789,11308,15861" scale="37" mesh="ast5.mesh" rotationAxis="0,0.382628,0.808718" rotationRate="45" />
+    <Model position="-2178,6872,18230" scale="77" mesh="ast2.mesh" rotationAxis="0.297912,0,0.219303" rotationRate="31" />
+    <Model position="7070,-4542,19838" scale="105" mesh="ast5.mesh" rotationAxis="0.687377,0.740396,0" rotationRate="22" />
+    <Model position="-12823,16872,9832" scale="58" mesh="ast1.mesh" rotationAxis="0.58246,0,0.787929" rotationRate="20" />
+    <Model position="2918,6409,8922" scale="68" mesh="ast1.mesh" rotationAxis="0.17433,0,0.826748" rotationRate="39" />
+    <Model position="-8622,5979,-8353" scale="36" mesh="ast5.mesh" rotationAxis="0.0687289,0.268192,0" rotationRate="46" />
+    <Model position="5979,-7415,3301" scale="31" mesh="ast6.mesh" rotationAxis="0,0.0143773,0.425826" rotationRate="46" />
+    <Model position="-7788,19257,6317" scale="106" mesh="ast2.mesh" rotationAxis="0,0.266194,0.403447" rotationRate="39" />
+    <Model position="12192,-12550,8480" scale="60" mesh="ast1.mesh" rotationAxis="0,0.734682,0.846663" rotationRate="25" />
+    <Model position="440,17184,-7600" scale="113" mesh="ast4.mesh" rotationAxis="0.449652,0,0.149964" rotationRate="24" />
+    <Model position="-12127,-16899,-8417" scale="110" mesh="ast6.mesh" rotationAxis="0,0.650716,0.368006" rotationRate="11" />
+    <Model position="-9670,-7112,18003" scale="30" mesh="ast5.mesh" rotationAxis="0,0.139076,0.954704" rotationRate="14" />
+    <Model position="-12697,177,7300" scale="75" mesh="ast3.mesh" rotationAxis="0.266301,0.479015,0" rotationRate="42" />
+    <Model position="8585,-11163,10773" scale="88" mesh="ast4.mesh" rotationAxis="0.466253,0,0.430903" rotationRate="47" />
+    <Model position="11710,-10481,-1554" scale="86" mesh="ast1.mesh" rotationAxis="0,0.964012,0.587305" rotationRate="35" />
+    <Model position="-2643,-17331,-997" scale="77" mesh="ast1.mesh" rotationAxis="0.156293,0,0.663295" rotationRate="39" />
+    <Model position="19531,-19531,-12541" scale="24" mesh="ast2.mesh" rotationAxis="0,0.848482,0.338155" rotationRate="17" />
+    <Model position="7408,8762,3078" scale="26" mesh="ast5.mesh" rotationAxis="0.993064,0.489089,0" rotationRate="21" />
+    <Model position="-14555,8711,8121" scale="20" mesh="ast6.mesh" rotationAxis="0.831339,0,0.151149" rotationRate="32" />
+    <Model position="13295,-1765,5131" scale="26" mesh="ast1.mesh" rotationAxis="0,0.357794,0.743133" rotationRate="30" />
+    <Model position="-19884,7732,-1186" scale="115" mesh="ast3.mesh" rotationAxis="0.958775,0,0.669833" rotationRate="23" />
+    <Model position="18179,-17940,-19923" scale="20" mesh="ast5.mesh" rotationAxis="0.878644,0,0.217331" rotationRate="44" />
+    <Model position="300,-9529,2789" scale="51" mesh="ast3.mesh" rotationAxis="0.54208,0,0.14456" rotationRate="37" />
+    <Model position="14279,-9293,-11689" scale="114" mesh="ast3.mesh" rotationAxis="0,0.601114,0.645571" rotationRate="33" />
+    <Model position="-14721,-14492,-18237" scale="76" mesh="ast3.mesh" rotationAxis="0.261656,0.207217,0" rotationRate="28" />
+    <Model position="-1436,16914,6450" scale="73" mesh="ast1.mesh" rotationAxis="0.0323497,0,0.291569" rotationRate="28" />
+    <Model position="19533,5238,-16963" scale="65" mesh="ast5.mesh" rotationAxis="0.0116926,0.373665,0" rotationRate="18" />
+    <Model position="13828,8837,-12011" scale="111" mesh="ast5.mesh" rotationAxis="0,0.153227,0.382767" rotationRate="22" />
+    <Model position="-18321,8723,2799" scale="49" mesh="ast6.mesh" rotationAxis="0.96622,0.89771,0" rotationRate="30" />
+    <Model position="-15854,16336,11058" scale="103" mesh="ast2.mesh" rotationAxis="0.0964953,0,0.375937" rotationRate="27" />
+    <Model position="-18187,-9952,-18073" scale="22" mesh="ast6.mesh" rotationAxis="0.61819,0.17807,0" rotationRate="33" />
+    <Model position="-15558,-3796,17538" scale="113" mesh="ast2.mesh" rotationAxis="0.384199,0,0.383805" rotationRate="15" />
+    <Model position="1366,12633,14581" scale="97" mesh="ast6.mesh" rotationAxis="0.930072,0,0.824122" rotationRate="22" />
+    <Model position="-17562,12612,-2860" scale="85" mesh="ast1.mesh" rotationAxis="0.872863,0,0.10971" rotationRate="45" />
+    <Model position="-6467,11186,272" scale="43" mesh="ast4.mesh" rotationAxis="0,0.12058,0.8878" rotationRate="32" />
+    <Model position="-9182,-5778,-18432" scale="72" mesh="ast4.mesh" rotationAxis="0,0.317,0.972754" rotationRate="28" />
+    <Model position="-2685,2227,-7017" scale="75" mesh="ast1.mesh" rotationAxis="0.00795897,0.859802,0" rotationRate="13" />
+    <Model position="202,2704,7869" scale="94" mesh="ast5.mesh" rotationAxis="0,0.0867517,0.971227" rotationRate="49" />
+    <Model position="3157,2393,4862" scale="45" mesh="ast2.mesh" rotationAxis="0.143034,0,0.945654" rotationRate="46" />
+    <Model position="17734,11752,-2817" scale="37" mesh="ast3.mesh" rotationAxis="0.380276,0,0.284309" rotationRate="16" />
+    <Model position="5533,9168,-2009" scale="23" mesh="ast5.mesh" rotationAxis="0,0.59324,0.275897" rotationRate="28" />
+    <Model position="-5583,14555,-13629" scale="99" mesh="ast2.mesh" rotationAxis="0.246217,0,0.279914" rotationRate="12" />
+    <Model position="5755,18319,-13966" scale="111" mesh="ast1.mesh" rotationAxis="0.945343,0.981593,0" rotationRate="19" />
+    <Model position="-506,19330,10258" scale="57" mesh="ast2.mesh" rotationAxis="0.156282,0.449472,0" rotationRate="28" />
+    <Model position="-18180,10800,-19387" scale="111" mesh="ast4.mesh" rotationAxis="0,0.138856,0.558955" rotationRate="46" />
+    <Model position="-19442,9153,6667" scale="65" mesh="ast3.mesh" rotationAxis="0.496782,0,0.891285" rotationRate="18" />
+    <Model position="-1991,12109,-18981" scale="39" mesh="ast1.mesh" rotationAxis="0.251609,0.291046,0" rotationRate="16" />
+    <Model position="3016,6118,758" scale="102" mesh="ast4.mesh" rotationAxis="0.0817345,0.394506,0" rotationRate="36" />
+    <Model position="-5930,6728,8780" scale="57" mesh="ast6.mesh" rotationAxis="0.266048,0.376193,0" rotationRate="19" />
+    <Model position="-747,-11495,13870" scale="44" mesh="ast3.mesh" rotationAxis="0.414018,0,0.750772" rotationRate="21" />
+    <Model position="305,-7504,9849" scale="83" mesh="ast1.mesh" rotationAxis="0.984976,0,0.0811671" rotationRate="25" />
+    <Model position="4685,-10642,-2497" scale="85" mesh="ast6.mesh" rotationAxis="0.415558,0.751553,0" rotationRate="27" />
+    <Model position="17354,16699,2394" scale="44" mesh="ast1.mesh" rotationAxis="0.693572,0.147356,0" rotationRate="35" />
+    <Model position="9192,-17477,-14279" scale="61" mesh="ast2.mesh" rotationAxis="0.461486,0,0.928585" rotationRate="41" />
+    <Model position="8023,-15706,-19451" scale="98" mesh="ast6.mesh" rotationAxis="0,0.000410601,0.90886" rotationRate="23" />
+    <Model position="-4958,16296,-4095" scale="109" mesh="ast1.mesh" rotationAxis="0.533062,0,0.249216" rotationRate="47" />
+    <Model position="843,16586,-13247" scale="36" mesh="ast6.mesh" rotationAxis="0,0.594639,0.732396" rotationRate="38" />
+    <Model position="19074,8315,17723" scale="95" mesh="ast2.mesh" rotationAxis="0.966402,0,0.119558" rotationRate="44" />
+    <Model position="-12490,734,18210" scale="35" mesh="ast4.mesh" rotationAxis="0.0976298,0.455641,0" rotationRate="24" />
+    <Model position="-11940,6896,-17968" scale="33" mesh="ast1.mesh" rotationAxis="0,0.77757,0.432964" rotationRate="39" />
+    <Model position="-2941,-2680,-17184" scale="54" mesh="ast2.mesh" rotationAxis="0.350042,0,0.659718" rotationRate="22" />
+    <Model position="-9114,5177,-14254" scale="69" mesh="ast1.mesh" rotationAxis="0.65862,0.380363,0" rotationRate="27" />
+    <Model position="-7909,1216,-6815" scale="44" mesh="ast2.mesh" rotationAxis="0,0.031546,0.392351" rotationRate="31" />
+    <Model position="1091,-3609,53" scale="27" mesh="ast1.mesh" rotationAxis="0.702045,0.669888,0" rotationRate="17" />
+    <Model position="8211,-10441,-7536" scale="30" mesh="ast3.mesh" rotationAxis="0,0.792689,0.311823" rotationRate="17" />
+    <Model position="1533,8849,17655" scale="38" mesh="ast6.mesh" rotationAxis="0,0.742122,0.71549" rotationRate="49" />
+    <Model position="6546,-5931,9791" scale="71" mesh="ast1.mesh" rotationAxis="0.373001,0,0.854548" rotationRate="47" />
+    <Model position="14884,-14921,13589" scale="20" mesh="ast4.mesh" rotationAxis="0,0.874073,0.518839" rotationRate="28" />
+    <Model position="-4888,1727,-581" scale="40" mesh="ast1.mesh" rotationAxis="0,0.612156,0.58926" rotationRate="49" />
+    <Model position="16617,1806,15260" scale="28" mesh="ast1.mesh" rotationAxis="0.437493,0,0.353516" rotationRate="27" />
+    <Model position="17792,4774,-5272" scale="101" mesh="ast3.mesh" rotationAxis="0,0.916476,0.853167" rotationRate="46" />
+    <Model position="12856,255,-5396" scale="47" mesh="ast6.mesh" rotationAxis="0,0.18605,0.637593" rotationRate="26" />
+    <Model position="-17573,-12764,13494" scale="107" mesh="ast5.mesh" rotationAxis="0.573851,0,0.982895" rotationRate="16" />
+    <Model position="19722,-1137,-18060" scale="71" mesh="ast5.mesh" rotationAxis="0.273151,0.392637,0" rotationRate="34" />
+    <Model position="12155,-1739,-17329" scale="31" mesh="ast2.mesh" rotationAxis="0,0.891737,0.832436" rotationRate="22" />
+    <Model position="-4996,-11586,-15279" scale="119" mesh="ast2.mesh" rotationAxis="0,0.123074,0.209338" rotationRate="16" />
+    <Model position="-13104,865,-611" scale="57" mesh="ast3.mesh" rotationAxis="0.393178,0,0.345322" rotationRate="18" />
+    <Model position="15005,-9877,15622" scale="97" mesh="ast1.mesh" rotationAxis="0,0.152896,0.0210835" rotationRate="25" />
+    <Model position="17583,9888,16829" scale="76" mesh="ast2.mesh" rotationAxis="0,0.947973,0.28026" rotationRate="15" />
+    <Model position="-5279,15909,15382" scale="82" mesh="ast1.mesh" rotationAxis="0,0.499884,0.773145" rotationRate="18" />
+    <Model position="-5938,14646,17243" scale="56" mesh="ast6.mesh" rotationAxis="0,0.0967167,0.348338" rotationRate="16" />
+    <Model position="19518,17215,-1274" scale="119" mesh="ast1.mesh" rotationAxis="0.223859,0,0.252346" rotationRate="44" />
+    <Model position="-16237,-17619,-6745" scale="65" mesh="ast6.mesh" rotationAxis="0.0241466,0.491285,0" rotationRate="39" />
+    <Model position="12763,1468,-3165" scale="78" mesh="ast3.mesh" rotationAxis="0.800474,0.278164,0" rotationRate="37" />
+    <Model position="13946,-7517,13683" scale="92" mesh="ast1.mesh" rotationAxis="0.142206,0.894399,0" rotationRate="40" />
+    <Model position="-5491,-1084,-11117" scale="84" mesh="ast2.mesh" rotationAxis="0.174864,0,0.298694" rotationRate="14" />
+    <Model position="2799,9189,7344" scale="54" mesh="ast3.mesh" rotationAxis="0.330476,0.71494,0" rotationRate="31" />
+    <Model position="-18445,-17042,3296" scale="110" mesh="ast6.mesh" rotationAxis="0,0.320011,0.644437" rotationRate="20" />
+    <Model position="-15377,5559,-12082" scale="26" mesh="ast4.mesh" rotationAxis="0,0.451157,0.102375" rotationRate="20" />
+    <Model position="-2331,-14260,17200" scale="85" mesh="ast5.mesh" rotationAxis="0.0446891,0.515642,0" rotationRate="37" />
+    <Model position="-9613,-4258,4537" scale="103" mesh="ast1.mesh" rotationAxis="0.820812,0.60695,0" rotationRate="13" />
+    <Model position="-6169,19264,-4878" scale="69" mesh="ast3.mesh" rotationAxis="0,0.585115,0.235653" rotationRate="32" />
+    <Model position="8717,-16685,9115" scale="37" mesh="ast4.mesh" rotationAxis="0.0512168,0.899599,0" rotationRate="15" />
+    <Model position="18826,17155,4947" scale="84" mesh="ast4.mesh" rotationAxis="0.204495,0,0.838098" rotationRate="48" />
+    <Model position="7971,3645,-9858" scale="65" mesh="ast3.mesh" rotationAxis="0.348379,0,0.384062" rotationRate="19" />
+    <Model position="9202,8689,-6795" scale="37" mesh="ast4.mesh" rotationAxis="0.826781,0,0.641626" rotationRate="40" />
+    <Model position="-12115,6664,5786" scale="105" mesh="ast1.mesh" rotationAxis="0.794331,0.43244,0" rotationRate="40" />
+    <Model position="17142,15709,-8725" scale="57" mesh="ast5.mesh" rotationAxis="0,0.561188,0.300935" rotationRate="36" />
+    <Model position="1991,-11949,-15733" scale="68" mesh="ast1.mesh" rotationAxis="0,0.390655,0.623811" rotationRate="41" />
+    <Model position="-6787,1792,287" scale="71" mesh="ast6.mesh" rotationAxis="0.161019,0.130015,0" rotationRate="36" />
+    <Model position="-7223,-13574,-11873" scale="24" mesh="ast4.mesh" rotationAxis="0.792203,0,0.177188" rotationRate="38" />
+
+
+  </world>
+
+  <!-- Unused at the moment -->
+<!--  <SpaceshipSteeringObject node="OgreHeadNode" forward="500" rotateupdown="200" rotaterightleft="200" looprightleft="200" /> -->
+
+  <scripts>
+    <script file="intro.lua" />
+  </scripts>
+</orxonoxworld>
Index: /code/branches/network/bin/media.cfg
===================================================================
--- /code/branches/network/bin/media.cfg	(revision 861)
+++ /code/branches/network/bin/media.cfg	(revision 861)
@@ -0,0 +1,16 @@
+Mesh=ogrehead.mesh
+Mesh=geosphere4500.mesh
+Mesh=razor.mesh
+Mesh=knot.mesh
+Mesh=RZR-002.mesh
+Mesh=geosphere8000.mesh
+Mesh=sphere.mesh
+
+CubeMap=cubescene.jpg
+CubeMap=early_morning.jpg
+CubeMap=cubemap.jpg
+CubeMap=morning.jpg
+CubeMap=cloudy_noon.jpg
+CubeMap=evening.jpg
+CubeMap=stormy.jpg
+CubeMap=stevecube.jpg
Index: /code/branches/network/bin/ogre.cfg-init
===================================================================
--- /code/branches/network/bin/ogre.cfg-init	(revision 861)
+++ /code/branches/network/bin/ogre.cfg-init	(revision 861)
@@ -0,0 +1,7 @@
+Render System=OpenGL Rendering Subsystem
+
+[OpenGL Rendering Subsystem]
+FSAA=0
+Full Screen=No
+RTT Preferred Mode=PBuffer
+Video Mode=1024 x 768
Index: /code/branches/network/bin/orxonox.bat
===================================================================
--- /code/branches/network/bin/orxonox.bat	(revision 861)
+++ /code/branches/network/bin/orxonox.bat	(revision 861)
@@ -0,0 +1,4 @@
+title Orxonox
+path lib;%path%
+orxonox.exe
+pause
Index: /code/branches/network/bin/plugins.cfg-init
===================================================================
--- /code/branches/network/bin/plugins.cfg-init	(revision 861)
+++ /code/branches/network/bin/plugins.cfg-init	(revision 861)
@@ -0,0 +1,14 @@
+# Defines plugins to load
+
+# Define plugin folder
+PluginFolder=/usr/lib/OGRE
+
+# Define plugins
+#Plugin=RenderSystem_Direct3D9
+Plugin=RenderSystem_GL
+Plugin=Plugin_ParticleFX
+Plugin=Plugin_BSPSceneManager
+Plugin=Plugin_OctreeSceneManager
+#Plugin=Plugin_CgProgramManager
+
+
Index: /code/branches/network/bin/quake3settings.cfg
===================================================================
--- /code/branches/network/bin/quake3settings.cfg	(revision 861)
+++ /code/branches/network/bin/quake3settings.cfg	(revision 861)
@@ -0,0 +1,3 @@
+Pak0Location: f:\quake3levels\chiropteraDM.pk3
+Map: maps/chiropteradm.bsp
+
Index: /code/branches/network/bin/resources.cfg
===================================================================
--- /code/branches/network/bin/resources.cfg	(revision 861)
+++ /code/branches/network/bin/resources.cfg	(revision 861)
@@ -0,0 +1,25 @@
+# Resource locations to be added to the 'boostrap' path
+# This also contains the minimum you need to use the Ogre example framework
+[Bootstrap]
+Zip=../Media/packs/OgreCore.zip
+
+# Resource locations to be added to the default path
+[General]
+FileSystem=../Media
+FileSystem=../Media/fonts
+#FileSystem=../Media/materials/programs
+FileSystem=../Media/materials/scripts
+FileSystem=../Media/materials/textures
+FileSystem=../Media/models
+FileSystem=../Media/overlay
+FileSystem=../Media/particle
+FileSystem=../Media/gui
+#FileSystem=../Media/levels
+#FileSystem=../Media/audio
+Zip=../Media/packs/cubemap.zip
+#Zip=../Media/packs/cubemapsJS.zip
+#Zip=../Media/packs/dragon.zip
+#Zip=../Media/packs/fresneldemo.zip
+#Zip=../Media/packs/ogretestmap.zip
+Zip=../Media/packs/skybox.zip
+
Index: /code/branches/network/bin/run-script
===================================================================
--- /code/branches/network/bin/run-script	(revision 861)
+++ /code/branches/network/bin/run-script	(revision 861)
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+if [[ !  -f orxonox ]] ; then
+	echo "orxonox does not exist"
+	echo "did you compile it?"
+
+	exit 1
+fi
+
+if [[ ! -f orge.cfg ]] ; then
+	cp ogre.cfg-init ogre.cfg
+fi
+
+# check if plugins.cfg exists, and of not create it
+# and modify 
+if [[ ! -f plugins.cfg ]] ; then 
+	if uname -n | grep "tardis" > /dev/null ; then
+		sed -e 's:PluginFolder=/usr/lib/OGRE:PluginFolder=/usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/OGRE/:' \
+		-e 's:#Plugin=Plugin_CgProgramManager:Plugin=Plugin_CgProgramManager:' plugins.cfg-init > plugins.cfg
+	else
+                cp plugins.cfg-init plugins.cfg
+	fi
+fi
+exec ./orxonox $@
Index: /code/branches/network/bin/translation_german.lang
===================================================================
--- /code/branches/network/bin/translation_german.lang	(revision 861)
+++ /code/branches/network/bin/translation_german.lang	(revision 861)
@@ -0,0 +1,7 @@
+ConfigValueDescription::DebugLevel::softDebugLevelConsole_=Der maximale Output-Level, der in der Konsole ausgegeben wird
+ConfigValueDescription::DebugLevel::softDebugLevelLogfile_=Der maximale Output-Level, der im Logfile gespeichert wird
+ConfigValueDescription::DebugLevel::softDebugLevelShell_=Der maximale Output-Level, der in der ingame-Shell angezeigt wird
+ConfigValueDescription::Projectile::lifetime_=Die die das Projektil am Leben bleibt in Sekunden
+ConfigValueDescription::Projectile::speed_=Die Geschwindigkeit des Projektils in Units pro Sekunde
+ConfigValueDescription::SpaceShip::bInvertYAxis_=Falls dies true ist, verhält sich die Maus wie ein Joystick (Maus hoch = Schiff runter)
+ConfigValueDescription::SpaceShip::reloadTime_=Die Nachladezeit der Waffe in Sekunden
Index: /code/branches/network/cmake/FindALUT.cmake
===================================================================
--- /code/branches/network/cmake/FindALUT.cmake	(revision 861)
+++ /code/branches/network/cmake/FindALUT.cmake	(revision 861)
@@ -0,0 +1,90 @@
+# - Locate FreeAlut
+# This module defines
+#  ALUT_LIBRARY
+#  ALUT_FOUND, if false, do not try to link to Alut
+#  ALUT_INCLUDE_DIR, where to find the headers
+#
+# $ALUTDIR is an environment variable that would
+# correspond to the ./configure --prefix=$ALUTDIR
+# used in building Alut.
+#
+# Created by Eric Wing. This was influenced by the FindSDL.cmake module.
+# On OSX, this will prefer the Framework version (if found) over others.
+# People will have to manually change the cache values of
+# ALUT_LIBRARY to override this selection.
+# Tiger will include OpenAL as part of the System.
+# But for now, we have to look around.
+# Other (Unix) systems should be able to utilize the non-framework paths.
+FIND_PATH(ALUT_INCLUDE_DIR AL/alut.h
+  $ENV{ALUTDIR}/include
+  ~/Library/Frameworks/OpenAL.framework/Headers
+  /Library/Frameworks/OpenAL.framework/Headers
+  /System/Library/Frameworks/OpenAL.framework/Headers # Tiger
+  /usr/pack/openal-0.0.8-cl/include # Tardis specific hack
+  /usr/local/include/
+  /usr/local/include/OpenAL
+  /usr/local/include
+  /usr/include/
+  /usr/include/OpenAL
+  /usr/include
+  /sw/include/ # Fink
+  /sw/include/OpenAL
+  /sw/include
+  /opt/local/include/AL # DarwinPorts
+  /opt/local/include/OpenAL
+  /opt/local/include
+  /opt/csw/include/ # Blastwave
+  /opt/csw/include/OpenAL
+  /opt/csw/include
+  /opt/include/
+  /opt/include/OpenAL
+  /opt/include
+  ../libs/freealut-1.1.0/include
+  )
+# I'm not sure if I should do a special casing for Apple. It is
+# unlikely that other Unix systems will find the framework path.
+# But if they do ([Next|Open|GNU]Step?),
+# do they want the -framework option also?
+IF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
+  STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" ALUT_FRAMEWORK_PATH_TMP ${ALUT_INCLUDE_DIR})
+  IF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
+      OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
+      )
+    # String is in default search path, don't need to use -F
+    SET (ALUT_LIBRARY "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
+  ELSE("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
+      OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
+      )
+    # String is not /Library/Frameworks, need to use -F
+    SET(ALUT_LIBRARY "-F${ALUT_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
+  ENDIF("${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
+    OR "${ALUT_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
+    )
+  # Clear the temp variable so nobody can see it
+  SET(ALUT_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "")
+
+ELSE(${ALUT_INCLUDE_DIR} MATCHES ".framework")
+  FIND_LIBRARY(ALUT_LIBRARY
+    NAMES alut
+    PATHS
+    $ENV{ALUTDIR}/lib
+    $ENV{ALUTDIR}/libs
+    /usr/pack/openal-0.0.8-cl/i686-debian-linux3.1/lib
+    /usr/local/lib
+    /usr/lib
+    /sw/lib
+    /opt/local/lib
+    /opt/csw/lib
+    /opt/lib
+    ../libs/freealut-1.1.0/src/.libs
+    ../libs/freealut-1.1.0/lib
+    )
+ENDIF(${ALUT_INCLUDE_DIR} MATCHES ".framework")
+
+SET(ALUT_FOUND "NO")
+IF(ALUT_LIBRARY)
+  SET(ALUT_FOUND "YES")
+	MESSAGE(STATUS "FreeAlut was found")
+ENDIF(ALUT_LIBRARY)
+
+
Index: /code/branches/network/cmake/FindBoost.cmake
===================================================================
--- /code/branches/network/cmake/FindBoost.cmake	(revision 861)
+++ /code/branches/network/cmake/FindBoost.cmake	(revision 861)
@@ -0,0 +1,293 @@
+# THIS FILE HAS BEEN MODIFIED TO WORK ON THE TARDIS INFRASTURUCTURE of THE ETH.
+# use with cation
+# Nicolas Schlumberger <nico AT orxonx DOT net> (C) 2007
+#
+# - Find the Boost includes and libraries.
+# The following variables are set if Boost is found.  If Boost is not
+# found, Boost_FOUND is set to false.
+#  Boost_FOUND                  - True when the Boost include directory is found.
+#  Boost_INCLUDE_DIRS           - the path to where the boost include files are.
+#  Boost_LIBRARY_DIRS           - The path to where the boost library files are.
+#  Boost_LIB_DIAGNOSTIC_DEFINITIONS - Only set if using Windows.
+#  Boost_<library>_FOUND        - True if the Boost <library> is found.
+#  Boost_<library>_INCLUDE_DIRS - The include path for Boost <library>.
+#  Boost_<library>_LIBRARIES    - The libraries to link to to use Boost <library>.
+#  Boost_LIBRARIES              - The libraries to link to to use all Boost libraries.
+#
+# The following variables can be set to configure how Boost is found:
+#  Boost_LIB_PREFIX             - Look for Boost libraries prefixed with this, e.g. "lib"
+#  Boost_LIB_SUFFIX             - Look for Boost libraries ending with this, e.g. "vc80-mt"
+#  Boost_LIB_SUFFIX_DEBUG       - As for Boost_LIB_SUFFIX but for debug builds, e.g. "vs80-mt-gd"
+
+# ----------------------------------------------------------------------------
+# If you have installed Boost in a non-standard location or you have
+# just staged the boost files using bjam then you have three
+# options. In the following comments, it is assumed that <Your Path>
+# points to the root directory of the include directory of Boost. e.g
+# If you have put boost in C:\development\Boost then <Your Path> is
+# "C:/development/Boost" and in this directory there will be two
+# directories called "include" and "lib".
+# 1) After CMake runs, set Boost_INCLUDE_DIR to <Your Path>/include/boost<-version>
+# 2) Use CMAKE_INCLUDE_PATH to set a path to <Your Path>/include. This will allow FIND_PATH()
+#    to locate Boost_INCLUDE_DIR by utilizing the PATH_SUFFIXES option. e.g.
+#    SET(CMAKE_INCLUDE_PATH ${CMAKE_INCLUDE_PATH} "<Your Path>/include")
+# 3) Set an environment variable called ${BOOST_ROOT} that points to the root of where you have
+#    installed Boost, e.g. <Your Path>. It is assumed that there is at least a subdirectory called
+#    include in this path.
+#
+# Note:
+#  1) If you are just using the boost headers, then you do not need to use
+#     Boost_LIBRARY_DIRS in your CMakeLists.txt file.
+#  2) If Boost has not been installed, then when setting Boost_LIBRARY_DIRS
+#     the script will look for /lib first and, if this fails, then for /stage/lib.
+#
+# Usage:
+# In your CMakeLists.txt file do something like this:
+# ...
+# # Boost
+# FIND_PACKAGE(Boost)
+# ...
+# INCLUDE_DIRECTORIES(${Boost_INCLUDE_DIRS})
+# LINK_DIRECTORIES(${Boost_LIBRARY_DIRS})
+#
+# In Windows, we make the assumption that, if the Boost files are installed, the default directory
+# will be C:\boost.
+
+#
+# TODO:
+#
+# 1) Automatically find the Boost library files and eliminate the need
+#    to use Link Directories.
+#
+
+IF(WIN32)
+# In windows, automatic linking is performed, so you do not have to specify the libraries.
+# If you are linking to a dynamic runtime, then you can choose to link to either a static or a
+# dynamic Boost library, the default is to do a static link.  You can alter this for a specific
+# library "whatever" by defining BOOST_WHATEVER_DYN_LINK to force Boost library "whatever" to
+# be linked dynamically.  Alternatively you can force all Boost libraries to dynamic link by
+# defining BOOST_ALL_DYN_LINK.
+
+# This feature can be disabled for Boost library "whatever" by defining BOOST_WHATEVER_NO_LIB,
+# or for all of Boost by defining BOOST_ALL_NO_LIB.
+
+# If you want to observe which libraries are being linked against then defining
+# BOOST_LIB_DIAGNOSTIC will cause the auto-linking code to emit a #pragma message each time
+# a library is selected for linking.
+  SET(Boost_LIB_DIAGNOSTIC_DEFINITIONS "-DBOOST_LIB_DIAGNOSTIC")
+#  SET(Boost_LIB_PREFIX "lib")
+#  SET(Boost_LIB_SUFFIX "gcc-mt-1_33_1.lib")
+ENDIF(WIN32)
+
+
+SET(BOOST_INCLUDE_PATH_DESCRIPTION "directory containing the boost include files. E.g /usr/local/include/boost-1_33_1 or c:\\boost\\include\\boost-1_33_1")
+
+SET(BOOST_DIR_MESSAGE "Set the Boost_INCLUDE_DIR cmake cache entry to the ${BOOST_INCLUDE_PATH_DESCRIPTION}")
+
+SET(BOOST_DIR_SEARCH $ENV{BOOST_ROOT})
+IF(BOOST_DIR_SEARCH)
+  FILE(TO_CMAKE_PATH ${BOOST_DIR_SEARCH} BOOST_DIR_SEARCH)
+  SET(BOOST_DIR_SEARCH ${BOOST_DIR_SEARCH}/include)
+ENDIF(BOOST_DIR_SEARCH)
+
+IF(WIN32)
+  SET(BOOST_DIR_SEARCH
+    ${BOOST_DIR_SEARCH}
+    C:/boost/include
+    D:/boost/include
+  )
+ENDIF(WIN32)
+
+# Add in some path suffixes. These will have to be updated whenever a new Boost version comes out.
+SET(SUFFIX_FOR_PATH
+ boost-1_34_1
+ boost-1_34_0
+ boost-1_34
+ boost-1_33_1
+ boost-1_33_0
+)
+
+#
+# Look for an installation.
+#
+IF(WIN32)
+  SET(Boost_INCLUDE_DIR ../libs/boost_1_33_1)
+ELSE(WIN32)
+  FIND_PATH(Boost_INCLUDE_DIR NAMES boost/config.hpp PATH_SUFFIXES ${SUFFIX_FOR_PATH} PATHS
+
+# Look in other places.
+    ${BOOST_DIR_SEARCH}
+
+# Help the user find it if we cannot.
+    DOC "The ${BOOST_INCLUDE_PATH_DESCRIPTION}"
+  )
+ENDIF(WIN32)
+
+# Assume we didn't find it.
+SET(Boost_FOUND 0)
+
+# Now try to get the include and library path.
+IF(Boost_INCLUDE_DIR)
+
+# Look for the boost library path.
+# Note that the user may not have installed any libraries
+# so it is quite possible the Boost_LIBRARY_PATH may not exist.
+  SET(Boost_LIBRARY_DIR ${Boost_INCLUDE_DIR})
+
+  IF("${Boost_LIBRARY_DIR}" MATCHES "boost-[0-9]+")
+    GET_FILENAME_COMPONENT(Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR} PATH)
+  ENDIF ("${Boost_LIBRARY_DIR}" MATCHES "boost-[0-9]+")
+
+  IF("${Boost_LIBRARY_DIR}" MATCHES "/include$")
+# Strip off the trailing "/include" in the path.
+    GET_FILENAME_COMPONENT(Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR} PATH)
+  ENDIF("${Boost_LIBRARY_DIR}" MATCHES "/include$")
+
+  IF(EXISTS "${Boost_LIBRARY_DIR}/lib")
+    SET (Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR}/lib)
+  ELSEIF(EXISTS "${Boost_LIBRARY_DIR}/bin/boost/libs/thread/build/boost_thread.dll/gcc/release/threading-multi")
+    SET (Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR}/bin/boost/libs/thread/build/boost_thread.dll/gcc/release/threading-multi)
+  ELSE(EXISTS "${Boost_LIBRARY_DIR}/lib")
+    IF(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
+      SET(Boost_LIBRARY_DIR ${Boost_LIBRARY_DIR}/stage/lib)
+    ELSE(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
+      IF(EXISTS "${Boost_LIBRARY_DIR}/../../lib")
+        SET(Boost_LIBRARY_DIR "${Boost_LIBRARY_DIR}/../../lib")
+      ELSE(EXISTS "${Boost_LIBRARY_DIR}/../../lib")
+        SET(Boost_LIBRARY_DIR "")
+      ENDIF(EXISTS "${Boost_LIBRARY_DIR}/../../lib")
+    ENDIF(EXISTS "${Boost_LIBRARY_DIR}/stage/lib")
+  ENDIF(EXISTS "${Boost_LIBRARY_DIR}/lib")
+
+
+  IF(EXISTS "${Boost_INCLUDE_DIR}")
+    SET(Boost_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
+# We have found boost. It is possible that the user has not
+# compiled any libraries so we set Boost_FOUND to be true here.
+    SET(Boost_FOUND 1)
+    MARK_AS_ADVANCED(Boost_INCLUDE_DIR)
+  ENDIF(EXISTS "${Boost_INCLUDE_DIR}")
+
+  IF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
+    SET(Boost_LIBRARY_DIRS ${Boost_LIBRARY_DIR})
+  ENDIF(Boost_LIBRARY_DIR AND EXISTS "${Boost_LIBRARY_DIR}")
+ENDIF(Boost_INCLUDE_DIR)
+
+
+#
+# Find boost libraries
+#
+
+# List of library suffixes to search, e.g. libboost_date_time-gcc
+SET(BOOST_SUFFIX_SEARCH
+  mt
+  gcc41-mt
+  gcc
+  il
+  gcc-1_33_1
+  gcc-mt-1_33_1
+)
+
+# List of all boost libraries
+SET(BOOST_ALL_LIBRARIES
+  date_time
+  filesystem
+  graph
+  iostreams
+  program_options
+  regex
+  serialization
+  signals
+  unit_test_framework
+  thread
+  wave
+)
+
+# Macro to find boost library called name
+MACRO(BOOST_FIND_LIBRARY name)
+
+# User can specify a particular build variant via the variables:
+#   Boost_LIB_PREFIX, Boost_LIB_SUFFIX, Boost_LIB_SUFFIX_DEBUG
+# otherwise we'll search the BOOST_SUFFIX_SEARCH list
+
+  SET(BOOST_LIB_NAMES ${Boost_LIB_PREFIX}boost_${name}-${Boost_LIB_SUFFIX})
+  IF(NOT Boost_LIB_SUFFIX)
+    FOREACH(suffix ${BOOST_SUFFIX_SEARCH})
+      SET(BOOST_LIB_NAMES ${BOOST_LIB_NAMES} ${Boost_LIB_PREFIX}boost_${name}-${suffix})
+    ENDFOREACH(suffix)
+  ENDIF(NOT Boost_LIB_SUFFIX)
+
+# Find the library in the Boost_LIBRARY_DIRS
+  FIND_LIBRARY(Boost_${name}_LIBRARY
+    NAMES ${BOOST_LIB_NAMES}
+    PATHS ${Boost_LIBRARY_DIRS})
+
+# For MSVC builds find debug library
+  IF(WIN32 AND MSVC AND Boost_${name}_LIBRARY)
+    FIND_LIBRARY(Boost_${name}_LIBRARY_DEBUG ${Boost_LIB_PREFIX}boost_${name}-${Boost_LIB_SUFFIX_DEBUG})
+
+    IF(MSVC_IDE)
+      IF(Boost_${name}_LIBRARY AND Boost_${name}_LIBRARY_DEBUG)
+        SET(Boost_${name}_LIBRARIES debug ${Boost_${name}_LIBRARY_DEBUG} optimized ${Boost_${name}_LIBRARY})
+      ELSE(Boost_${name}_LIBRARY AND Boost_${name}_LIBRARY_DEBUG)
+        MESSAGE(FATAL_ERROR "Could not find the debug and release version of Boost ${name} library.")
+      ENDIF(Boost_${name}_LIBRARY AND Boost_${name}_LIBRARY_DEBUG)
+    ELSE(MSVC_IDE)
+      STRING(TOLOWER ${CMAKE_BUILD_TYPE} CMAKE_BUILD_TYPE_TOLOWER)
+      IF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+        SET(Boost_${name}_LIBRARIES ${Boost_${name}_LIBRARY_DEBUG})
+      ELSE(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+        SET(Boost_${name}_LIBRARIES ${Boost_${name}_LIBRARY})
+      ENDIF(CMAKE_BUILD_TYPE_TOLOWER MATCHES debug)
+    ENDIF(MSVC_IDE)
+  ELSE(WIN32 AND MSVC AND Boost_${name}_LIBRARY)
+    SET(Boost_${name}_LIBRARIES ${Boost_${name}_LIBRARY})
+  ENDIF(WIN32 AND MSVC AND Boost_${name}_LIBRARY)
+
+# If we've got it setup appropriate variables or issue error message
+  IF(Boost_${name}_LIBRARY)
+    SET(Boost_${name}_FOUND 1)
+    SET(Boost_${name}_INCLUDE_DIRS ${Boost_INCLUDE_DIR})
+    MARK_AS_ADVANCED(Boost_${name}_LIBRARY Boost_${name}_LIBRARY_DEBUG)
+  ELSE(Boost_${name}_LIBRARY)
+    MESSAGE(STATUS "sdfds")
+    IF(NOT Boost_FIND_QUIETLY)
+      MESSAGE(STATUS "Boost ${name} library was not found.")
+    ELSE(NOT Boost_FIND_QUIETLY)
+      IF(Boost_FIND_REQUIRED_${name})
+        MESSAGE(FATAL_ERROR "Could NOT find required Boost ${name} library.")
+      ENDIF(Boost_FIND_REQUIRED_${name})
+    ENDIF(NOT Boost_FIND_QUIETLY)
+  ENDIF(Boost_${name}_LIBRARY)
+ENDMACRO(BOOST_FIND_LIBRARY)
+
+IF(Boost_LIBRARY_DIRS)
+
+# If the user specified required components e.g. via
+# FIND_PACKAGE(Boost REQUIRED date_time regex)
+# find (just) those libraries. Otherwise find all libraries.
+  IF(Boost_FIND_COMPONENTS)
+    SET(Boost_FIND_LIBRARIES ${Boost_FIND_COMPONENTS})
+  ELSE(Boost_FIND_COMPONENTS)
+    SET(Boost_FIND_LIBRARIES ${BOOST_ALL_LIBRARIES})
+  ENDIF(Boost_FIND_COMPONENTS)
+
+  SET(Boost_LIBRARIES)
+  FOREACH(library ${Boost_FIND_LIBRARIES})
+    BOOST_FIND_LIBRARY(${library})
+    IF(Boost_${library}_FOUND)
+      SET(Boost_LIBRARIES ${Boost_LIBRARIES} ${Boost_${library}_LIBRARIES})
+      MESSAGE(STATUS "Found BoostLibrary: ${library}")
+    ENDIF(Boost_${library}_FOUND)
+  ENDFOREACH(library)
+ENDIF(Boost_LIBRARY_DIRS)
+
+IF(NOT Boost_FOUND)
+  IF(NOT Boost_FIND_QUIETLY)
+    MESSAGE(STATUS "Boost was not found. ${BOOST_DIR_MESSAGE}")
+  ELSE(NOT Boost_FIND_QUIETLY)
+    IF(Boost_FIND_REQUIRED)
+      MESSAGE(FATAL_ERROR "Boost was not found. ${BOOST_DIR_MESSAGE}")
+    ENDIF(Boost_FIND_REQUIRED)
+  ENDIF(NOT Boost_FIND_QUIETLY)
+ENDIF(NOT Boost_FOUND)
Index: /code/branches/network/cmake/FindCEGUI.cmake
===================================================================
--- /code/branches/network/cmake/FindCEGUI.cmake	(revision 861)
+++ /code/branches/network/cmake/FindCEGUI.cmake	(revision 861)
@@ -0,0 +1,56 @@
+# Find CEGUI includes and library
+#
+# This module defines
+#  CEGUI_INCLUDE_DIR
+#  CEGUI_LIBRARIES, the libraries to link against to use CEGUI.
+#  CEGUI_LIB_DIR, the location of the libraries
+#  CEGUI_FOUND, If false, do not try to use CEGUI
+#
+# Created by Matt Williams to find OGRE libraries
+# Copyright © 2007, Matt Williams
+#
+# Modified by Nicolas Schlumberger to find CEGUI libraries
+# and make it run on the Tardis-Infrastucture of the ETH Zurich
+# Copyright 2007, Nicolas Schlumberger
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+IF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR)
+    SET(CEGUI_FIND_QUIETLY TRUE) # Already in cache, be silent
+ENDIF (CEGUI_LIBRARIES AND CEGUI_INCLUDE_DIR)
+
+IF (WIN32) #Windows
+    MESSAGE(STATUS "Looking for CEGUI")
+    SET(CEGUI_INCLUDE_DIR ../libs/ogre/Dependencies/include/CEGUI)
+    SET(CEGUI_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release/lib)
+    SET(CEGUI_LIBRARIES debug CEGUIBase_d optimized CEGUIBase)
+ELSE (WIN32) #Unix
+    FIND_PACKAGE(PkgConfig)
+    PKG_SEARCH_MODULE(CEGUI CEGUI /usr/pack/cegui-0.5.0-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI.pc) # tardis specific hack
+    SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIRS})
+    SET(CEGUI_LIB_DIR ${CEGUI_LIBDIR})
+    SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
+ENDIF (WIN32)
+
+#Do some preparation
+SEPARATE_ARGUMENTS(CEGUI_INCLUDE_DIR)
+SEPARATE_ARGUMENTS(CEGUI_LIBRARIES)
+
+SET(CEGUI_INCLUDE_DIR ${CEGUI_INCLUDE_DIR} CACHE PATH "")
+SET(CEGUI_LIBRARIES ${CEGUI_LIBRARIES} CACHE STRING "")
+SET(CEGUI_LIB_DIR ${CEGUI_LIB_DIR} CACHE PATH "")
+
+IF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES)
+    SET(CEGUI_FOUND TRUE)
+ENDIF (CEGUI_INCLUDE_DIR AND CEGUI_LIBRARIES)
+
+IF (CEGUI_FOUND)
+    IF (NOT CEGUI_FIND_QUIETLY)
+        MESSAGE(STATUS "  libraries : ${CEGUI_LIBRARIES} from ${CEGUI_LIB_DIR}")
+        MESSAGE(STATUS "  includes  : ${CEGUI_INCLUDE_DIR}")
+    ENDIF (NOT CEGUI_FIND_QUIETLY)
+ELSE (CEGUI_FOUND)
+    IF (CEGUI_FIND_REQUIRED)
+        MESSAGE(FATAL_ERROR "Could not find CEGUI")
+    ENDIF (CEGUI_FIND_REQUIRED)
+ENDIF (CEGUI_FOUND)
Index: /code/branches/network/cmake/FindCEGUI_OGRE.cmake
===================================================================
--- /code/branches/network/cmake/FindCEGUI_OGRE.cmake	(revision 861)
+++ /code/branches/network/cmake/FindCEGUI_OGRE.cmake	(revision 861)
@@ -0,0 +1,56 @@
+# Find CEGUI_OGRE includes and library
+#
+# This module defines
+#  CEGUI_OGRE_INCLUDE_DIR
+#  CEGUI_OGRE_LIBRARIES, the libraries to link against to use CEGUI_OGRE.
+#  CEGUI_OGRE_LIB_DIR, the location of the libraries
+#  CEGUI_OGRE_FOUND, If false, do not try to use CEGUI_OGRE
+#
+# Created by Matt Williams to find OGRE libraries
+# Copyright © 2007, Matt Williams
+#
+# Modified by Nicolas Schlumberger to find CEGUI-OGRE libraries
+# and make it run on the Tardis-Infrastucture of the ETH Zurich
+# Copyright 2007, Nicolas Schlumberger
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+IF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR)
+    SET(CEGUI_OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
+ENDIF (CEGUI_OGRE_LIBRARIES AND CEGUI_OGRE_INCLUDE_DIR)
+
+IF (WIN32) #Windows
+    MESSAGE(STATUS "Looking for CEGUI_OGRE")
+    SET(CEGUI_OGRE_INCLUDE_DIR ../libs/ogre/Samples/Common/CEGUIRenderer/include)
+    SET(CEGUI_OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release/lib)
+    SET(CEGUI_OGRE_LIBRARIES debug OgreGUIRenderer_d optimized OgreGUIRenderer)
+ELSE (WIN32) #Unix
+    FIND_PACKAGE(PkgConfig)
+    PKG_SEARCH_MODULE(CEGUI_OGRE CEGUI-OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/CEGUI-OGRE.pc) # tardis specific hack
+    SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIRS})
+    SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIBDIR})
+    SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "")
+ENDIF (WIN32)
+
+#Do some preparation
+SEPARATE_ARGUMENTS(CEGUI_OGRE_INCLUDE_DIR)
+SEPARATE_ARGUMENTS(CEGUI_OGRE_LIBRARIES)
+
+SET(CEGUI_OGRE_INCLUDE_DIR ${CEGUI_OGRE_INCLUDE_DIR} CACHE PATH "")
+SET(CEGUI_OGRE_LIBRARIES ${CEGUI_OGRE_LIBRARIES} CACHE STRING "")
+SET(CEGUI_OGRE_LIB_DIR ${CEGUI_OGRE_LIB_DIR} CACHE PATH "")
+
+IF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES)
+    SET(CEGUI_OGRE_FOUND TRUE)
+ENDIF (CEGUI_OGRE_INCLUDE_DIR AND CEGUI_OGRE_LIBRARIES)
+
+IF (CEGUI_OGRE_FOUND)
+    IF (NOT CEGUI_OGRE_FIND_QUIETLY)
+        MESSAGE(STATUS "  libraries : ${CEGUI_OGRE_LIBRARIES} from ${CEGUI_OGRE_LIB_DIR}")
+        MESSAGE(STATUS "  includes  : ${CEGUI_OGRE_INCLUDE_DIR}")
+    ENDIF (NOT CEGUI_OGRE_FIND_QUIETLY)
+ELSE (CEGUI_OGRE_FOUND)
+    IF (CEGUI_OGRE_FIND_REQUIRED)
+        MESSAGE(FATAL_ERROR "Could not find CEGUI_OGRE")
+    ENDIF (CEGUI_OGRE_FIND_REQUIRED)
+ENDIF (CEGUI_OGRE_FOUND)
Index: /code/branches/network/cmake/FindENet.cmake
===================================================================
--- /code/branches/network/cmake/FindENet.cmake	(revision 861)
+++ /code/branches/network/cmake/FindENet.cmake	(revision 861)
@@ -0,0 +1,53 @@
+# - Try to find enet
+# Once done this will define
+#
+#  ENET_FOUND - system has enet
+#  ENET_INCLUDE_DIR - the enet include directory
+#  ENET_LIBRARIES - the libraries needed to use enet
+#  ENET_DEFINITIONS - Compiler switches required for using enet
+#
+#  Borrowed from The Mana World
+#  http://themanaworld.org/
+#
+
+IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+   SET(ENet_FIND_QUIETLY TRUE)
+ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+
+FIND_PATH(ENet_INCLUDE_DIR enet/enet.h
+    /usr/include
+    /usr/local/include
+    /usr/pack/enet-2007-sd/include
+    ../libs/enet-1.1/include
+    )
+
+FIND_LIBRARY(ENet_LIBRARY
+    NAMES enet
+    PATHS /usr/lib /usr/local/lib /usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/
+    ../libs/enet-1.1
+    )
+
+IF(WIN32)
+  SET(WINDOWS_ENET_DEPENDENCIES "ws2_32;winmm")
+  SET(ENet_LIBRARY ${ENet_LIBRARY} ${WINDOWS_ENET_DEPENDENCIES})
+ENDIF(WIN32)
+
+IF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+    SET(ENET_FOUND TRUE)
+    SET(ENET_INCLUDE_DIR ${ENet_INCLUDE_DIR})
+    SET(ENET_LIBRARIES ${ENet_LIBRARY})
+ELSE (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+    SET(ENET_FOUND FALSE)
+ENDIF (ENet_INCLUDE_DIR AND ENet_LIBRARY)
+
+IF (ENET_FOUND)
+    IF (NOT ENet_FIND_QUIETLY)
+        MESSAGE(STATUS "Found enet: ${ENet_LIBRARY}")
+    ENDIF (NOT ENet_FIND_QUIETLY)
+ELSE (ENET_FOUND)
+    IF (ENet_FIND_REQUIRED)
+        MESSAGE(FATAL_ERROR "Could NOT find enet")
+    ENDIF (ENet_FIND_REQUIRED)
+ENDIF (ENET_FOUND)
+
+MARK_AS_ADVANCED(ENet_INCLUDE_DIR ENet_LIBRARY)
Index: /code/branches/network/cmake/FindODE.cmake
===================================================================
--- /code/branches/network/cmake/FindODE.cmake	(revision 861)
+++ /code/branches/network/cmake/FindODE.cmake	(revision 861)
@@ -0,0 +1,46 @@
+# find ODE (Open Dynamics Engine) includes and library
+#
+# ODE_INCLUDE_DIR - where the directory containing the ODE headers can be
+#                   found
+# ODE_LIBRARY     - full path to the ODE library
+# ODE_FOUND       - TRUE if ODE was found
+
+IF (NOT ODE_FOUND)
+
+  FIND_PATH(ODE_INCLUDE_DIR ode/ode.h
+    /usr/include
+    /usr/local/include
+    $ENV{OGRE_HOME}/include # OGRE SDK on WIN32
+    $ENV{INCLUDE}
+  )
+  FIND_LIBRARY(ODE_LIBRARY
+    NAMES ode
+    PATHS
+    /usr/lib
+    /usr/local/lib
+    $ENV{OGRE_HOME}/lib # OGRE SDK on WIN32
+  )
+
+  IF(ODE_INCLUDE_DIR)
+    MESSAGE(STATUS "Found ODE include dir: ${ODE_INCLUDE_DIR}")
+  ELSE(ODE_INCLUDE_DIR)
+    MESSAGE(STATUS "Could NOT find ODE headers.")
+  ENDIF(ODE_INCLUDE_DIR)
+
+  IF(ODE_LIBRARY)
+    MESSAGE(STATUS "Found ODE library: ${ODE_LIBRARY}")
+  ELSE(ODE_LIBRARY)
+    MESSAGE(STATUS "Could NOT find ODE library.")
+  ENDIF(ODE_LIBRARY)
+
+  IF(ODE_INCLUDE_DIR AND ODE_LIBRARY)
+     SET(ODE_FOUND TRUE CACHE STRING "Whether ODE was found or not")
+   ELSE(ODE_INCLUDE_DIR AND ODE_LIBRARY)
+     SET(ODE_FOUND FALSE)
+     IF(ODE_FIND_REQUIRED)
+       MESSAGE(FATAL_ERROR "Could not find ODE. Please install ODE (http://www.ode.org)")
+     ENDIF(ODE_FIND_REQUIRED)
+   ENDIF(ODE_INCLUDE_DIR AND ODE_LIBRARY)
+ENDIF (NOT ODE_FOUND)
+
+# vim: et sw=4 ts=4
Index: /code/branches/network/cmake/FindOGRE.cmake
===================================================================
--- /code/branches/network/cmake/FindOGRE.cmake	(revision 861)
+++ /code/branches/network/cmake/FindOGRE.cmake	(revision 861)
@@ -0,0 +1,52 @@
+# Find OGRE includes and library
+#
+# This module defines
+#  OGRE_INCLUDE_DIR
+#  OGRE_LIBRARIES, the libraries to link against to use OGRE.
+#  OGRE_LIB_DIR, the location of the libraries
+#  OGRE_FOUND, If false, do not try to use OGRE
+#
+# Copyright © 2007, Matt Williams
+# Modified by Nicolas Schlumberger to make it work on the Tardis-Infrastucture of the ETH Zurich
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+IF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR)
+    SET(OGRE_FIND_QUIETLY TRUE) # Already in cache, be silent
+ENDIF (OGRE_LIBRARIES AND OGRE_INCLUDE_DIR)
+
+IF (WIN32) #Windows
+    MESSAGE(STATUS "Looking for OGRE")
+    SET(OGRE_INCLUDE_DIR ../libs/ogre/OgreMain/include)
+    SET(OGRE_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release)
+    SET(OGRE_LIBRARIES debug OgreMain_d optimized OgreMain)
+ELSE (WIN32) #Unix
+    FIND_PACKAGE(PkgConfig)
+    PKG_SEARCH_MODULE(OGRE OGRE /usr/pack/ogre-1.4.5-sd/i686-debian-linux3.1/lib/pkgconfig/OGRE.pc) # tardis specific hack
+    SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIRS})
+    SET(OGRE_LIB_DIR ${OGRE_LIBDIR})
+    SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
+ENDIF (WIN32)
+
+#Do some preparation
+SEPARATE_ARGUMENTS(OGRE_INCLUDE_DIR)
+SEPARATE_ARGUMENTS(OGRE_LIBRARIES)
+
+SET(OGRE_INCLUDE_DIR ${OGRE_INCLUDE_DIR} CACHE PATH "")
+SET(OGRE_LIBRARIES ${OGRE_LIBRARIES} CACHE STRING "")
+SET(OGRE_LIB_DIR ${OGRE_LIB_DIR} CACHE PATH "")
+
+IF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES)
+    SET(OGRE_FOUND TRUE)
+ENDIF (OGRE_INCLUDE_DIR AND OGRE_LIBRARIES)
+
+IF (OGRE_FOUND)
+    IF (NOT OGRE_FIND_QUIETLY)
+        MESSAGE(STATUS "  libraries : ${OGRE_LIBRARIES} from ${OGRE_LIB_DIR}")
+        MESSAGE(STATUS "  includes  : ${OGRE_INCLUDE_DIR}")
+    ENDIF (NOT OGRE_FIND_QUIETLY)
+ELSE (OGRE_FOUND)
+    IF (OGRE_FIND_REQUIRED)
+        MESSAGE(FATAL_ERROR "Could not find OGRE")
+    ENDIF (OGRE_FIND_REQUIRED)
+ENDIF (OGRE_FOUND)
Index: /code/branches/network/cmake/FindOIS.cmake
===================================================================
--- /code/branches/network/cmake/FindOIS.cmake	(revision 861)
+++ /code/branches/network/cmake/FindOIS.cmake	(revision 861)
@@ -0,0 +1,56 @@
+# Find OIS includes and library
+#
+# This module defines
+#  OIS_INCLUDE_DIR
+#  OIS_LIBRARIES, the libraries to link against to use OIS.
+#  OIS_LIB_DIR, the location of the libraries
+#  OIS_FOUND, If false, do not try to use OIS
+#
+# Created by Matt Williams to find OGRE libraries
+# Copyright © 2007, Matt Williams
+#
+# Modified by Nicolas Schlumberger to find OIS libraries
+# and make it run on the Tardis-Infrastucture of the ETH Zurich
+# Copyright 2007, Nicolas Schlumberger
+#
+# Redistribution and use is allowed according to the terms of the BSD license.
+
+IF (OIS_LIBRARIES AND OIS_INCLUDE_DIR)
+    SET(OIS_FIND_QUIETLY TRUE) # Already in cache, be silent
+ENDIF (OIS_LIBRARIES AND OIS_INCLUDE_DIR)
+
+IF (WIN32) #Windows
+    MESSAGE(STATUS "Looking for OIS")
+    SET(OIS_INCLUDE_DIR ../libs/ogre/Dependencies/include)
+    SET(OIS_LIB_DIR ${CMAKE_CURRENT_SOURCE_DIR}/../libs/ogre/Samples/Common/bin/Release)
+    SET(OIS_LIBRARIES debug OIS_d optimized OIS)
+ELSE (WIN32) #Unix
+    FIND_PACKAGE(PkgConfig)
+    PKG_SEARCH_MODULE(OIS OIS /usr/pack/ois-1.0-sd/i686-debian-linux3.1/lib/pkgconfig/OIS.pc) # tardis specific hack
+    SET(OIS_INCLUDE_DIR ${OIS_INCLUDE_DIRS})
+    SET(OIS_LIB_DIR ${OIS_LIBDIR})
+    SET(OIS_LIBRARIES ${OIS_LIBRARIES} CACHE STRING "")
+ENDIF (WIN32)
+
+#Do some preparation
+SEPARATE_ARGUMENTS(OIS_INCLUDE_DIR)
+SEPARATE_ARGUMENTS(OIS_LIBRARIES)
+
+SET(OIS_INCLUDE_DIR ${OIS_INCLUDE_DIR} CACHE PATH "")
+SET(OIS_LIBRARIES ${OIS_LIBRARIES} CACHE STRING "")
+SET(OIS_LIB_DIR ${OIS_LIB_DIR} CACHE PATH "")
+
+IF (OIS_INCLUDE_DIR AND OIS_LIBRARIES)
+    SET(OIS_FOUND TRUE)
+ENDIF (OIS_INCLUDE_DIR AND OIS_LIBRARIES)
+
+IF (OIS_FOUND)
+    IF (NOT OIS_FIND_QUIETLY)
+        MESSAGE(STATUS "  libraries : ${OIS_LIBRARIES} from ${OIS_LIB_DIR}")
+        MESSAGE(STATUS "  includes  : ${OIS_INCLUDE_DIR}")
+    ENDIF (NOT OIS_FIND_QUIETLY)
+ELSE (OIS_FOUND)
+    IF (OIS_FIND_REQUIRED)
+        MESSAGE(FATAL_ERROR "Could not find OIS")
+    ENDIF (OIS_FIND_REQUIRED)
+ENDIF (OIS_FOUND)
Index: /code/branches/network/cmake/FindOggVorbis.cmake
===================================================================
--- /code/branches/network/cmake/FindOggVorbis.cmake	(revision 861)
+++ /code/branches/network/cmake/FindOggVorbis.cmake	(revision 861)
@@ -0,0 +1,101 @@
+
+#SET(OGGVORBIS_LIBRARY_DIR "/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/lib")
+#SET(OGGVORBIS_LIBRARY "-L ${OGGVORBIS_LIBRARY_DIR} -lvorbisenc -lvorbisfile -logg -lvorbis ")
+#SET(OGGVORBIS_INCLUDE_DIR "/usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include")
+
+#
+# Includes
+#
+
+FIND_PATH(OGG_INCLUDE_DIR ogg/ogg.h
+  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include 		# Tardis specific hack
+  /usr/local/include
+  /usr/include
+  /sw/include
+  /opt/local/include
+  /opt/csw/include
+  /opt/csw/include
+  /opt/include
+  ../libs/libogg-1.1.3/include
+  )
+
+FIND_PATH(VORBIS_INCLUDE_DIR vorbis/codec.h
+  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.0/include 		# Tardis specific hack
+  /usr/local/include
+  /usr/include
+  /sw/include
+  /opt/local/include
+  /opt/csw/include
+  /opt/csw/include
+  /opt/include
+  ../libs/libvorbis-1.2.0/include
+  )
+
+#
+# Libs
+#
+
+FIND_LIBRARY(OGG_LIBRARY
+  NAMES ogg
+  PATHS
+  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
+  /usr/local/lib
+  /usr/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  ../libs/libogg-1.1.3/src/.libs
+  )
+
+FIND_LIBRARY(VORBIS_LIBRARY
+  NAMES vorbis
+  PATHS
+  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
+  /usr/local/lib
+  /usr/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  ../libs/libvorbis-1.2.0/lib/.libs
+  )
+
+FIND_LIBRARY(VORBISENC_LIBRARY
+  NAMES vorbisenc
+  PATHS
+  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
+  /usr/local/lib
+  /usr/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  ../libs/libvorbis-1.2.0/lib/.libs
+  )
+
+FIND_LIBRARY(VORBISFILE_LIBRARY
+  NAMES vorbisfile
+  PATHS
+  /usr/pack/oggvorbis-1.0-ds/i686-debian-linux3.1/lib
+  /usr/local/lib
+  /usr/lib
+  /sw/lib
+  /opt/local/lib
+  /opt/csw/lib
+  /opt/lib
+  ../libs/libvorbis-1.2.0/lib/.libs
+  )
+
+SET(OGG_FOUND "NO")
+IF(OGG_LIBRARY)
+  SET(OGG_FOUND "YES")
+	MESSAGE(STATUS "Ogg was found.")
+ENDIF(OGG_LIBRARY)
+
+SET(VORBIS_FOUND "NO")
+IF(VORBIS_LIBRARY)
+  SET(VORBIS_FOUND "YES")
+	MESSAGE(STATUS "Vorbis was found.")
+ENDIF(VORBIS_LIBRARY)
+
Index: /code/branches/network/cmake/FindOpenAL.cmake
===================================================================
--- /code/branches/network/cmake/FindOpenAL.cmake	(revision 861)
+++ /code/branches/network/cmake/FindOpenAL.cmake	(revision 861)
@@ -0,0 +1,90 @@
+# - Locate OpenAL
+# This module defines
+#  OPENAL_LIBRARY
+#  OPENAL_FOUND, if false, do not try to link to OpenAL
+#  OPENAL_INCLUDE_DIR, where to find the headers
+#
+# $OPENALDIR is an environment variable that would
+# correspond to the ./configure --prefix=$OPENALDIR
+# used in building OpenAL.
+#
+
+# Created by Eric Wing. This was influenced by the FindSDL.cmake module.
+# On OSX, this will prefer the Framework version (if found) over others.
+# People will have to manually change the cache values of
+# OPENAL_LIBRARY to override this selection.
+# Tiger will include OpenAL as part of the System.
+# But for now, we have to look around.
+# Other (Unix) systems should be able to utilize the non-framework paths.
+FIND_PATH(OPENAL_INCLUDE_DIR AL/al.h
+  $ENV{OPENALDIR}/include
+  ~/Library/Frameworks/OpenAL.framework/Headers
+  /Library/Frameworks/OpenAL.framework/Headers
+  /System/Library/Frameworks/OpenAL.framework/Headers # Tiger
+  /usr/pack/openal-0.0.8-cl/include # Tardis specific hack
+  /usr/local/include/
+  /usr/local/include/OpenAL
+  /usr/local/include
+  /usr/include/
+  /usr/include/OpenAL
+  /usr/include
+  /sw/include # Fink
+  /sw/include/OpenAL
+  /sw/include
+  /opt/local/include # DarwinPorts
+  /opt/local/include/OpenAL
+  /opt/local/include
+  /opt/csw/include # Blastwave
+  /opt/csw/include/OpenAL
+  /opt/csw/include
+  /opt/include
+  /opt/include/OpenAL
+  /opt/include
+  ../libs/openal-0.0.8/common/include
+  )
+# I'm not sure if I should do a special casing for Apple. It is
+# unlikely that other Unix systems will find the framework path.
+# But if they do ([Next|Open|GNU]Step?),
+# do they want the -framework option also?
+IF(${OPENAL_INCLUDE_DIR} MATCHES ".framework")
+  STRING(REGEX REPLACE "(.*)/.*\\.framework/.*" "\\1" OPENAL_FRAMEWORK_PATH_TMP ${OPENAL_INCLUDE_DIR})
+  IF("${OPENAL_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
+      OR "${OPENAL_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
+      )
+    # String is in default search path, don't need to use -F
+    SET (OPENAL_LIBRARY "-framework OpenAL" CACHE STRING "OpenAL framework for OSX")
+  ELSE("${OPENAL_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
+      OR "${OPENAL_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
+      )
+    # String is not /Library/Frameworks, need to use -F
+    SET(OPENAL_LIBRARY "-F${OPENAL_FRAMEWORK_PATH_TMP} -framework OpenAL" CACHE STRING "OpenAL framework for OSX")
+  ENDIF("${OPENAL_FRAMEWORK_PATH_TMP}" STREQUAL "/Library/Frameworks"
+    OR "${OPENAL_FRAMEWORK_PATH_TMP}" STREQUAL "/System/Library/Frameworks"
+    )
+  # Clear the temp variable so nobody can see it
+  SET(OPENAL_FRAMEWORK_PATH_TMP "" CACHE INTERNAL "")
+
+ELSE(${OPENAL_INCLUDE_DIR} MATCHES ".framework")
+  FIND_LIBRARY(OPENAL_LIBRARY
+    NAMES openal al OpenAL32
+    PATHS
+    $ENV{OPENALDIR}/lib
+    $ENV{OPENALDIR}/libs
+    /usr/pack/openal-0.0.8-cl/i686-debian-linux3.1/lib
+    /usr/local/lib
+    /usr/lib
+    /sw/lib
+    /opt/local/lib
+    /opt/csw/lib
+    /opt/lib
+    ../libs/openal-0.0.8/src/.libs
+    )
+ENDIF(${OPENAL_INCLUDE_DIR} MATCHES ".framework")
+
+SET(OPENAL_FOUND "NO")
+IF(OPENAL_LIBRARY)
+  SET(OPENAL_FOUND "YES")
+	MESSAGE(STATUS "OpenAL was found.")
+ENDIF(OPENAL_LIBRARY)
+
+
Index: /code/branches/network/cmake/FindPkgConfig.cmake
===================================================================
--- /code/branches/network/cmake/FindPkgConfig.cmake	(revision 861)
+++ /code/branches/network/cmake/FindPkgConfig.cmake	(revision 861)
@@ -0,0 +1,360 @@
+# - a pkg-config module for CMake
+#
+# Usage:
+#   pkg_check_modules(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
+#     checks for all the given modules
+#
+#   pkg_search_module(<PREFIX> [REQUIRED] <MODULE> [<MODULE>]*)
+#     checks for given modules and uses the first working one
+#
+# When the 'REQUIRED' argument was set, macros will fail with an error
+# when module(s) could not be found
+#
+# It sets the following variables:
+#   PKG_CONFIG_FOUND         ... true iff pkg-config works on the system
+#   PKG_CONFIG_EXECUTABLE    ... pathname of the pkg-config program
+#   <PREFIX>_FOUND           ... set to 1 iff module(s) exist
+#
+# For the following variables two sets of values exist; first one is the
+# common one and has the given PREFIX. The second set contains flags
+# which are given out when pkgconfig was called with the '--static'
+# option.
+#   <XPREFIX>_LIBRARIES      ... only the libraries (w/o the '-l')
+#   <XPREFIX>_LIBRARY_DIRS   ... the paths of the libraries (w/o the '-L')
+#   <XPREFIX>_LDFLAGS        ... all required linker flags
+#   <XPREFIX>_LDFLAGS_OTHERS ... all other linker flags
+#   <XPREFIX>_INCLUDE_DIRS   ... the '-I' preprocessor flags (w/o the '-I')
+#   <XPREFIX>_CFLAGS         ... all required cflags
+#   <XPREFIX>_CFLAGS_OTHERS  ... the other compiler flags
+#
+#   <XPREFIX> = <PREFIX>        for common case
+#   <XPREFIX> = <PREFIX>_STATIC for static linking
+#
+# There are some special variables whose prefix depends on the count
+# of given modules. When there is only one module, <PREFIX> stays
+# unchanged. When there are multiple modules, the prefix will be
+# changed to <PREFIX>_<MODNAME>:
+#   <XPREFIX>_VERSION    ... version of the module
+#   <XPREFIX>_PREFIX     ... prefix-directory of the module
+#   <XPREFIX>_INCLUDEDIR ... include-dir of the module
+#   <XPREFIX>_LIBDIR     ... lib-dir of the module
+#
+#   <XPREFIX> = <PREFIX>  when |MODULES| == 1, else
+#   <XPREFIX> = <PREFIX>_<MODNAME>
+#
+# A <MODULE> parameter can have the following formats:
+#   {MODNAME}            ... matches any version
+#   {MODNAME}>={VERSION} ... at least version <VERSION> is required
+#   {MODNAME}={VERSION}  ... exactly version <VERSION> is required
+#   {MODNAME}<={VERSION} ... modules must not be newer than <VERSION>
+#
+# Examples
+#   pkg_check_modules (GLIB2   glib-2.0)
+#
+#   pkg_check_modules (GLIB2   glib-2.0>=2.10)
+#     requires at least version 2.10 of glib2 and defines e.g.
+#       GLIB2_VERSION=2.10.3
+#
+#   pkg_check_modules (FOO     glib-2.0>=2.10 gtk+-2.0)
+#     requires both glib2 and gtk2, and defines e.g.
+#       FOO_glib-2.0_VERSION=2.10.3
+#       FOO_gtk+-2.0_VERSION=2.8.20
+#
+#   pkg_check_modules (XRENDER REQUIRED xrender)
+#     defines e.g.:
+#       XRENDER_LIBRARIES=Xrender;X11
+#       XRENDER_STATIC_LIBRARIES=Xrender;X11;pthread;Xau;Xdmcp
+#
+#   pkg_search_module (BAR     libxml-2.0 libxml2 libxml>=2)
+
+
+# Copyright (C) 2006 Enrico Scholz <enrico.scholz@informatik.tu-chemnitz.de>
+#
+# Redistribution and use, with or without modification, are permitted
+# provided that the following conditions are met:
+# 
+#    1. Redistributions must retain the above copyright notice, this
+#       list of conditions and the following disclaimer.
+#    2. The name of the author may not be used to endorse or promote
+#       products derived from this software without specific prior
+#       written permission.
+# 
+# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
+# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+# WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
+# DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
+# GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER
+# IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN
+# IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+### Common stuff ####
+set(PKG_CONFIG_VERSION 1)
+set(PKG_CONFIG_FOUND   0)
+
+find_program(PKG_CONFIG_EXECUTABLE NAMES pkg-config DOC "pkg-config executable")
+mark_as_advanced(PKG_CONFIG_EXECUTABLE)
+
+if(PKG_CONFIG_EXECUTABLE)
+  set(PKG_CONFIG_FOUND 1)
+endif(PKG_CONFIG_EXECUTABLE)
+
+
+# Unsets the given variables
+macro(_pkgconfig_unset var)
+  set(${var} "" CACHE INTERNAL "")
+endmacro(_pkgconfig_unset)
+
+macro(_pkgconfig_set var value)
+  set(${var} ${value} CACHE INTERNAL "")
+endmacro(_pkgconfig_set)
+
+# Invokes pkgconfig, cleans up the result and sets variables
+macro(_pkgconfig_invoke _pkglist _prefix _varname _regexp)
+  set(_pkgconfig_invoke_result)
+
+  execute_process(
+    COMMAND ${PKG_CONFIG_EXECUTABLE} ${ARGN} ${_pkglist}
+    OUTPUT_VARIABLE _pkgconfig_invoke_result
+    RESULT_VARIABLE _pkgconfig_failed)
+
+  if (_pkgconfig_failed)
+    set(_pkgconfig_${_varname} "")
+    _pkgconfig_unset(${_prefix}_${_varname})
+  else(_pkgconfig_failed)
+    string(REGEX REPLACE "[\r\n]"                  " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
+    string(REGEX REPLACE " +$"                     ""  _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
+
+    if (NOT ${_regexp} STREQUAL "")
+      string(REGEX REPLACE "${_regexp}" " " _pkgconfig_invoke_result "${_pkgconfig_invoke_result}")
+    endif(NOT ${_regexp} STREQUAL "")
+
+    separate_arguments(_pkgconfig_invoke_result)
+
+    #message(STATUS "  ${_varname} ... ${_pkgconfig_invoke_result}")
+    set(_pkgconfig_${_varname} ${_pkgconfig_invoke_result})
+    _pkgconfig_set(${_prefix}_${_varname} "${_pkgconfig_invoke_result}")
+  endif(_pkgconfig_failed)
+endmacro(_pkgconfig_invoke)
+
+# Invokes pkgconfig two times; once without '--static' and once with
+# '--static'
+macro(_pkgconfig_invoke_dyn _pkglist _prefix _varname cleanup_regexp)
+  _pkgconfig_invoke("${_pkglist}" ${_prefix}        ${_varname} "${cleanup_regexp}" ${ARGN})
+  _pkgconfig_invoke("${_pkglist}" ${_prefix} STATIC_${_varname} "${cleanup_regexp}" --static  ${ARGN})
+endmacro(_pkgconfig_invoke_dyn)
+
+# Splits given arguments into options and a package list
+macro(_pkgconfig_parse_options _result _is_req)
+  set(${_is_req} 0)
+  
+  foreach(_pkg ${ARGN})
+    if (_pkg STREQUAL "REQUIRED")
+      set(${_is_req} 1)
+    endif (_pkg STREQUAL "REQUIRED")
+  endforeach(_pkg ${ARGN})
+
+  set(${_result} ${ARGN})
+  list(REMOVE_ITEM ${_result} "REQUIRED")
+endmacro(_pkgconfig_parse_options)
+
+###
+macro(_pkg_check_modules_internal _is_required _is_silent _prefix)
+  _pkgconfig_unset(${_prefix}_FOUND)
+  _pkgconfig_unset(${_prefix}_VERSION)
+  _pkgconfig_unset(${_prefix}_PREFIX)
+  _pkgconfig_unset(${_prefix}_INCLUDEDIR)
+  _pkgconfig_unset(${_prefix}_LIBDIR)
+  _pkgconfig_unset(${_prefix}_LIBS)
+  _pkgconfig_unset(${_prefix}_LIBS_L)
+  _pkgconfig_unset(${_prefix}_LIBS_PATHS)
+  _pkgconfig_unset(${_prefix}_LIBS_OTHER)
+  _pkgconfig_unset(${_prefix}_CFLAGS)
+  _pkgconfig_unset(${_prefix}_CFLAGS_I)
+  _pkgconfig_unset(${_prefix}_CFLAGS_OTHER)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBDIR)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBS)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBS_L)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBS_PATHS)
+  _pkgconfig_unset(${_prefix}_STATIC_LIBS_OTHER)
+  _pkgconfig_unset(${_prefix}_STATIC_CFLAGS)
+  _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_I)
+  _pkgconfig_unset(${_prefix}_STATIC_CFLAGS_OTHER)
+
+  # create a better addressable variable of the modules and calculate its size
+  set(_pkg_check_modules_list ${ARGN})
+  list(LENGTH _pkg_check_modules_list _pkg_check_modules_cnt)
+
+  if(PKG_CONFIG_EXECUTABLE)
+    # give out status message telling checked module
+    if (NOT ${_is_silent})
+      if (_pkg_check_modules_cnt EQUAL 1)
+        message(STATUS "checking for module '${_pkg_check_modules_list}'")
+      else(_pkg_check_modules_cnt EQUAL 1)
+        message(STATUS "checking for modules '${_pkg_check_modules_list}'")
+      endif(_pkg_check_modules_cnt EQUAL 1)
+    endif(NOT ${_is_silent})
+    
+    set(_pkg_check_modules_packages)
+    set(_pkg_check_modules_failed)
+
+    # iterate through module list and check whether they exist and match the required version
+    foreach (_pkg_check_modules_pkg ${_pkg_check_modules_list})
+      set(_pkg_check_modules_exist_query)
+
+      # check whether version is given
+      if (_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*")
+        string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\1" _pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}")
+        string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\2" _pkg_check_modules_pkg_op   "${_pkg_check_modules_pkg}")
+        string(REGEX REPLACE "(.*[^><])(>=|=|<=)(.*)" "\\3" _pkg_check_modules_pkg_ver  "${_pkg_check_modules_pkg}")
+      else(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*")
+        set(_pkg_check_modules_pkg_name "${_pkg_check_modules_pkg}")
+        set(_pkg_check_modules_pkg_op)
+        set(_pkg_check_modules_pkg_ver)
+      endif(_pkg_check_modules_pkg MATCHES ".*(>=|=|<=).*")
+
+      # handle the operands
+      if (_pkg_check_modules_pkg_op STREQUAL ">=")
+        list(APPEND _pkg_check_modules_exist_query --atleast-version)
+      endif(_pkg_check_modules_pkg_op STREQUAL ">=")
+
+      if (_pkg_check_modules_pkg_op STREQUAL "=")
+        list(APPEND _pkg_check_modules_exist_query --exact-version)
+      endif(_pkg_check_modules_pkg_op STREQUAL "=")
+      
+      if (_pkg_check_modules_pkg_op STREQUAL "<=")
+        list(APPEND _pkg_check_modules_exist_query --max-version)
+      endif(_pkg_check_modules_pkg_op STREQUAL "<=")
+
+      # create the final query which is of the format:
+      # * --atleast-version <version> <pkg-name>
+      # * --exact-version <version> <pkg-name>      
+      # * --max-version <version> <pkg-name>
+      # * --exists <pkg-name>
+      if (_pkg_check_modules_pkg_op)
+        list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_ver}")
+      else(_pkg_check_modules_pkg_op)
+        list(APPEND _pkg_check_modules_exist_query --exists)
+      endif(_pkg_check_modules_pkg_op)
+
+      _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_VERSION)
+      _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_PREFIX)
+      _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_INCLUDEDIR)
+      _pkgconfig_unset(${_prefix}_${_pkg_check_modules_pkg_name}_LIBDIR)
+
+      list(APPEND _pkg_check_modules_exist_query "${_pkg_check_modules_pkg_name}")
+      list(APPEND _pkg_check_modules_packages    "${_pkg_check_modules_pkg_name}")
+
+      # execute the query
+      execute_process(
+        COMMAND ${PKG_CONFIG_EXECUTABLE} ${_pkg_check_modules_exist_query}
+        RESULT_VARIABLE _pkgconfig_retval)
+
+      # evaluate result and tell failures
+      if (_pkgconfig_retval)
+        if(NOT ${_is_silent})
+          message(STATUS "  package '${_pkg_check_modules_pkg}' not found")
+        endif(NOT ${_is_silent})
+
+        set(_pkg_check_modules_failed 1)
+      endif(_pkgconfig_retval)
+    endforeach(_pkg_check_modules_pkg)
+
+    if(_pkg_check_modules_failed)
+      # fail when requested
+      if (${_is_required})
+        message(SEND_ERROR "A required package was not found")
+      endif (${_is_required})
+    else(_pkg_check_modules_failed)
+      # when we are here, we checked whether requested modules
+      # exist. Now, go through them and set variables
+      
+      _pkgconfig_set(${_prefix}_FOUND 1)
+      list(LENGTH _pkg_check_modules_packages pkg_count)
+
+      # iterate through all modules again and set individual variables
+      foreach (_pkg_check_modules_pkg ${_pkg_check_modules_packages})
+        # handle case when there is only one package required
+        if (pkg_count EQUAL 1)
+          set(_pkg_check_prefix "${_prefix}")
+        else(pkg_count EQUAL 1)
+          set(_pkg_check_prefix "${_prefix}_${_pkg_check_modules_pkg}")
+        endif(pkg_count EQUAL 1)
+        
+        _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" VERSION    ""   --modversion )
+        _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" PREFIX     ""   --variable=prefix )
+        _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" INCLUDEDIR ""   --variable=includedir )
+        _pkgconfig_invoke(${_pkg_check_modules_pkg} "${_pkg_check_prefix}" LIBDIR     ""   --variable=libdir )
+
+        message(STATUS "  found ${_pkg_check_modules_pkg}, version ${_pkgconfig_VERSION}")
+      endforeach(_pkg_check_modules_pkg)
+
+      # set variables which are combined for multiple modules
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARIES           "(^| )-l" --libs-only-l )
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LIBRARY_DIRS        "(^| )-L" --libs-only-L )
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS             ""        --libs )
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" LDFLAGS_OTHER       ""        --libs-only-other )
+
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" INCLUDE_DIRS        "(^| )-I" --cflags-only-I )
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS              ""        --cflags )
+      _pkgconfig_invoke_dyn("${_pkg_check_modules_packages}" "${_prefix}" CFLAGS_OTHER        ""        --cflags-only-other )
+    endif(_pkg_check_modules_failed)
+  else(PKG_CONFIG_EXECUTABLE)
+    if (${_is_required})
+      message(SEND_ERROR "pkg-config tool not found")
+    endif (${_is_required})
+  endif(PKG_CONFIG_EXECUTABLE)
+endmacro(_pkg_check_modules_internal)
+
+###
+### User visible macros start here
+###
+
+###
+macro(pkg_check_modules _prefix _module0)
+  # check cached value
+  if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION})
+    _pkgconfig_parse_options   (_pkg_modules _pkg_is_required "${_module0}" ${ARGN})
+    _pkg_check_modules_internal("${_pkg_is_required}" 0 "${_prefix}" ${_pkg_modules})
+
+    _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
+  endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION})
+endmacro(pkg_check_modules)
+
+###
+macro(pkg_search_module _prefix _module0)
+  # check cached value
+  if (NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION})
+    set(_pkg_modules_found 0)
+    _pkgconfig_parse_options(_pkg_modules_alt _pkg_is_required "${_module0}" ${ARGN})
+
+    message(STATUS "checking for one of the modules '${_pkg_modules_alt}'")
+
+    # iterate through all modules and stop at the first working one.
+    foreach(_pkg_alt ${_pkg_modules_alt})
+      if(NOT _pkg_modules_found)
+        _pkg_check_modules_internal(0 1 "${_prefix}" "${_pkg_alt}")
+      endif(NOT _pkg_modules_found)
+
+      if (${_prefix}_FOUND)
+        set(_pkg_modules_found 1)
+      endif(${_prefix}_FOUND)
+    endforeach(_pkg_alt)
+
+    if (NOT ${_prefix}_FOUND)
+      if(${_pkg_is_required})
+        message(SEND_ERROR "None of the required '${_pkg_modules_alt}' found")
+      endif(${_pkg_is_required})
+    endif(NOT ${_prefix}_FOUND)
+    
+    _pkgconfig_set(__pkg_config_checked_${_prefix} ${PKG_CONFIG_VERSION})
+  endif(NOT DEFINED __pkg_config_checked_${_prefix} OR __pkg_config_checked_${_prefix} LESS ${PKG_CONFIG_VERSION})  
+endmacro(pkg_search_module)
+
+### Local Variables:
+### mode: cmake
+### End:
Index: /code/branches/network/cmake/FindZLIB.cmake
===================================================================
--- /code/branches/network/cmake/FindZLIB.cmake	(revision 861)
+++ /code/branches/network/cmake/FindZLIB.cmake	(revision 861)
@@ -0,0 +1,70 @@
+# - Find zlib
+# Find the native ZLIB includes and library
+#
+#  ZLIB_INCLUDE_DIR - where to find zlib.h, etc.
+#  ZLIB_LIBRARIES   - List of libraries when using zlib.
+#  ZLIB_FOUND       - True if zlib found.
+#
+#  Modified by Nicolas Schlumberger, (c) 2007
+#  to make it work on the Tardis Infrastucture of the ETH Zurich
+#
+
+IF(UNIX)
+  IF (ZLIB_INCLUDE_DIR)
+  # Already in cache, be silent
+    SET(ZLIB_FIND_QUIETLY TRUE)
+  ENDIF (ZLIB_INCLUDE_DIR)
+
+  FIND_PATH(ZLIB_INCLUDE_DIR zlib.h
+    /usr/pack/zziplib-0.13.49-sd/include/
+    /usr/local/include
+    /usr/include
+  )
+
+  SET(ZLIB_NAMES z zlib zdll)
+  FIND_LIBRARY(ZLIB_LIBRARY
+    NAMES ${ZLIB_NAMES}
+    PATHS /usr/pack/zziplib-0.13.49-sd/i686-debian-linux3.1/lib/ /usr/lib /usr/local/lib
+  )
+
+  IF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
+    SET(ZLIB_FOUND TRUE)
+      SET( ZLIB_LIBRARIES ${ZLIB_LIBRARY} )
+  ELSE (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
+    SET(ZLIB_FOUND FALSE)
+    SET( ZLIB_LIBRARIES )
+  ENDIF (ZLIB_INCLUDE_DIR AND ZLIB_LIBRARY)
+
+  IF (ZLIB_FOUND)
+    IF (NOT ZLIB_FIND_QUIETLY)
+      MESSAGE(STATUS "Found ZLIB: ${ZLIB_LIBRARY}")
+    ENDIF (NOT ZLIB_FIND_QUIETLY)
+  ELSE (ZLIB_FOUND)
+    IF (ZLIB_FIND_REQUIRED)
+        MESSAGE(STATUS "Looked for Z libraries named ${ZLIBS_NAMES}.")
+        MESSAGE(FATAL_ERROR "Could NOT find z library")
+    ENDIF (ZLIB_FIND_REQUIRED)
+  ENDIF (ZLIB_FOUND)
+
+  MARK_AS_ADVANCED(
+    ZLIB_LIBRARY
+    ZLIB_INCLUDE_DIR
+  )
+ENDIF(UNIX)
+
+IF(WIN32)
+  IF(EXISTS "../libs/ogre/Dependencies/lib/Release")
+    SET (ZLIB_LIBRARY_DIR "../libs/ogre/Dependencies/lib/Release")
+  ENDIF(EXISTS "../libs/ogre/Dependencies/lib/Release")
+
+  FIND_LIBRARY(ZLIB_LIBRARY
+    NAMES zlib
+    PATHS ${ZLIB_LIBRARY_DIR}
+  )
+
+  IF(ZLIB_LIBRARY)
+    MESSAGE(STATUS "Zlib was found.")
+  ELSE(ZLIB_LIBRARY)
+    MESSAGE(FATAL_ERROR "Zlib was NOT found.")
+  ENDIF(ZLIB_LIBRARY)
+ENDIF(WIN32)
Index: /code/branches/network/cmakeclearcache
===================================================================
--- /code/branches/network/cmakeclearcache	(revision 861)
+++ /code/branches/network/cmakeclearcache	(revision 861)
@@ -0,0 +1,11 @@
+#!/bin/bash
+# Clears the cmake cache
+# Author: Nicolas Perrenoud <nicolape@ee.ethz.ch>
+# Co-Author: Nicolas Schlumberger <nico_at_orxonox.net>
+
+find . -name "CMakeCache.txt" -exec rm -f {} \;
+find . -name "cmake_install.camke" -exec rm -f {} \;
+find . -name "CMakeFiles" -exec rm -fr {} \;
+find . -name "Makefile" -exec rm -fr {} \;
+
+echo "Cmake Cache cleared!"
Index: /code/branches/network/run
===================================================================
--- /code/branches/network/run	(revision 861)
+++ /code/branches/network/run	(revision 861)
@@ -0,0 +1,4 @@
+#!/bin/bash
+cd bin
+./run-script $@
+cd ..
Index: /code/branches/network/src/CMakeLists.txt
===================================================================
--- /code/branches/network/src/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/CMakeLists.txt	(revision 861)
@@ -0,0 +1,9 @@
+INCLUDE_DIRECTORIES(.)
+INCLUDE_DIRECTORIES(orxonox)
+
+ADD_SUBDIRECTORY(util)
+ADD_SUBDIRECTORY(orxonox/core)
+ADD_SUBDIRECTORY(audio)
+ADD_SUBDIRECTORY(network)
+ADD_SUBDIRECTORY(loader)
+ADD_SUBDIRECTORY(orxonox)
Index: /code/branches/network/src/audio/AudioBuffer.cc
===================================================================
--- /code/branches/network/src/audio/AudioBuffer.cc	(revision 861)
+++ /code/branches/network/src/audio/AudioBuffer.cc	(revision 861)
@@ -0,0 +1,57 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Nicolas Perrenoud <nicolape@ee.ethz.ch>
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "AudioBuffer.h"
+
+namespace audio
+{
+	AudioBuffer::AudioBuffer(std::string fileName)
+	{
+		// Load wav data into buffers.
+		alGenBuffers(1, &buffer);
+
+		if(alGetError() != AL_NO_ERROR)
+			loaded=AL_FALSE;
+
+    //FIXME deprecated; seems unneeded
+// 		alutLoadWAVFile((ALbyte*)fileName.c_str(), &format, &data, &size, &freq, &loop);
+		alBufferData(buffer, format, data, size, freq);
+    //FIXME deprecated; seems unneeded
+// 		alutUnloadWAV(format, data, size, freq);
+
+		// Do another error check and return.
+		if(alGetError() != AL_NO_ERROR)
+			loaded=AL_FALSE;
+    else
+		  loaded=AL_TRUE;
+	}
+
+	AudioBuffer::~AudioBuffer()
+	{
+
+	}
+}
Index: /code/branches/network/src/audio/AudioBuffer.h
===================================================================
--- /code/branches/network/src/audio/AudioBuffer.h	(revision 861)
+++ /code/branches/network/src/audio/AudioBuffer.h	(revision 861)
@@ -0,0 +1,31 @@
+#ifndef _AudioBuffer_H__
+#define _AudioBuffer_H__
+
+#include "AudioIncludes.h"
+
+#include "AudioPrereqs.h"
+
+namespace audio
+{
+	class _AudioExport AudioBuffer
+	{
+	public:
+		AudioBuffer(std::string fileName);
+		~AudioBuffer();
+	private:
+		// Buffers hold sound data.
+		ALuint buffer;
+		// Identifier
+		std::string name;
+		// True if AL was able to load data
+		ALboolean loaded;
+		
+		ALenum format;
+		ALsizei size;
+		ALvoid* data;
+		ALsizei freq;
+		ALboolean loop;
+	};
+}
+
+#endif /* _AudioBuffer_H__ */
Index: /code/branches/network/src/audio/AudioIncludes.h
===================================================================
--- /code/branches/network/src/audio/AudioIncludes.h	(revision 861)
+++ /code/branches/network/src/audio/AudioIncludes.h	(revision 861)
@@ -0,0 +1,13 @@
+#include <iostream>
+#include <vector>
+#include <string>
+
+#include <AL/al.h>
+#include <AL/alc.h>
+#include <AL/alut.h>
+#include <ogg/ogg.h>
+#include <vorbis/codec.h>
+#include <vorbis/vorbisenc.h>
+#include <vorbis/vorbisfile.h>
+
+#include "core/Error.h"
Index: /code/branches/network/src/audio/AudioManager.cc
===================================================================
--- /code/branches/network/src/audio/AudioManager.cc	(revision 861)
+++ /code/branches/network/src/audio/AudioManager.cc	(revision 861)
@@ -0,0 +1,140 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Nicolas Perrenoud <nicolape@ee.ethz.ch>
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "AudioManager.h"
+#include "core/Debug.h"
+
+namespace audio
+{
+	AudioManager::AudioManager()
+	{
+    ambientPath = "audio/ambient";
+
+    alutInit(NULL, 0);
+
+
+	}
+
+	AudioManager::~AudioManager()
+	{
+		for (unsigned int i=0;i<=bgSounds.size();i++)
+		{
+			bgSounds[i].release();
+		}
+		alutExit();
+	}
+
+	void AudioManager::ambientStart()
+	{
+// 		currentBgSound = 0;
+    currentBgSound = rand() % bgSounds.size();
+		if (bgSounds.size() > 0)
+		{
+			if(!bgSounds[currentBgSound].playback())
+			{
+    		orxonox::Error("Ogg refused to play.");
+			}
+			else
+			{
+				COUT(3) << "Info: Started playing background sound" << std::endl;
+			}
+		}
+
+	}
+
+	void AudioManager::ambientStop()
+	{
+		COUT(3) << "Info: Stopped playing background sound" << std::endl;
+	}
+
+	void AudioManager::ambientAdd(std::string file)
+	{
+    std::string path = ambientPath + "/" + file + ".ogg";
+		AudioStream tmp(path);
+		tmp.open();
+		if (tmp.isLoaded())
+		{
+			bgSounds.push_back(tmp);
+			COUT(3) << "Info: Added background sound " << file << std::endl;
+		}
+	}
+
+	void AudioManager::update()
+	{
+		if (bgSounds.size() > 0)
+		{
+			if (bgSounds[currentBgSound].isLoaded())
+			{
+				bool playing = bgSounds[currentBgSound].update();
+		    if(!bgSounds[currentBgSound].playing() && playing)
+		    {
+		        if(!bgSounds[currentBgSound].playback())
+		            orxonox::Error("Ogg abruptly stopped.");
+		        else
+		            orxonox::Error("Ogg stream was interrupted.");
+
+		    }
+				if (!playing)
+				{
+// 					if (currentBgSound < bgSounds.size()-1)
+// 					{
+// 						currentBgSound++;
+// 					}
+// 					else
+// 					{
+// 						currentBgSound=0;
+// 					}
+          // switch to next sound in list/array
+          currentBgSound = ++currentBgSound % bgSounds.size();
+
+					if (!bgSounds[currentBgSound].isLoaded())
+					{
+						bgSounds[currentBgSound].release();
+						bgSounds[currentBgSound].open();
+					}
+					bgSounds[currentBgSound].playback();
+					COUT(3) << "Info: Playing next background sound" << std::endl;
+				}
+			}
+		}
+	}
+
+	void AudioManager::setPos(std::vector<float> newPosition)
+	{
+
+	}
+
+	void AudioManager::setSpeed(std::vector<float> newSpeed)
+	{
+
+	}
+
+	void AudioManager::setOri(std::vector<float> at, std::vector<float> up)
+	{
+
+	}
+}
Index: /code/branches/network/src/audio/AudioManager.h
===================================================================
--- /code/branches/network/src/audio/AudioManager.h	(revision 861)
+++ /code/branches/network/src/audio/AudioManager.h	(revision 861)
@@ -0,0 +1,69 @@
+#ifndef _AudioManager_H__
+#define _AudioManager_H__
+
+#include "AudioIncludes.h"
+
+#include "AudioPrereqs.h"
+
+#include "AudioBuffer.h"
+#include "AudioSource.h"
+#include "AudioStream.h"
+
+namespace audio
+{
+	class _AudioExport AudioManager
+	{
+	public:
+
+		// Init audio 
+		AudioManager();
+
+		// Kill audio and set buffers, sources and memory free
+		~AudioManager();
+
+		// Set listener position
+		void setPos(std::vector<float> newPosition);
+
+		// Set listener speed
+		void setSpeed(std::vector<float> newSpeed);
+
+		// Set listener orientation (first is direction
+		// the listener looks at, the second is the direction
+		// upwards the listener)
+		void setOri(std::vector<float> at, std::vector<float> up);
+
+		// Parses given xml string
+		void loadParams();
+
+		// Update
+		void update();
+
+		void ambientAdd(std::string file);
+		void ambientStart();
+		void ambientStop();
+
+	private:
+
+		// Background sound
+    std::vector<AudioStream> bgSounds;
+		int currentBgSound;
+
+
+
+		std::string ambientPath;
+	
+		// Vector containing all audio files
+		std::vector<AudioBuffer> buffers;
+		// Vector containing all audio sources which referer to one buffer
+		std::vector<AudioSource> sources;
+		// The ambient background sound 	
+		AudioSource ambient;
+		
+		std::vector<float> listenerPosition;
+		std::vector<float> listenerSpeed;
+		std::vector<float> listenerAt;
+		std::vector<float> listenerup;		
+	};	
+}
+
+#endif /* _AudioManager_H__ */
Index: /code/branches/network/src/audio/AudioPrereqs.h
===================================================================
--- /code/branches/network/src/audio/AudioPrereqs.h	(revision 861)
+++ /code/branches/network/src/audio/AudioPrereqs.h	(revision 861)
@@ -0,0 +1,69 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  AudioPrereqs.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _AudioPrereqs_H__
+#define _AudioPrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( AUDIO_STATIC_BUILD )
+#  ifdef AUDIO_SHARED_BUILD
+#    define _AudioExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _AudioExport
+#    else
+#      define _AudioExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _AudioExport  __attribute__ ((visibility("default")))
+#else
+#  define _AudioExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+namespace audio
+{
+  class AudioBuffer;
+  class AudioManager;
+  class AudioSource;
+  class AudioStream;
+}
+
+#endif /* _AudioPrereqs_H__ */
Index: /code/branches/network/src/audio/AudioSource.cc
===================================================================
--- /code/branches/network/src/audio/AudioSource.cc	(revision 861)
+++ /code/branches/network/src/audio/AudioSource.cc	(revision 861)
@@ -0,0 +1,41 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "AudioSource.h"
+
+namespace audio
+{
+	AudioSource::AudioSource()
+	{
+
+	}
+
+	AudioSource::~AudioSource()
+	{
+
+	}
+}
Index: /code/branches/network/src/audio/AudioSource.h
===================================================================
--- /code/branches/network/src/audio/AudioSource.h	(revision 861)
+++ /code/branches/network/src/audio/AudioSource.h	(revision 861)
@@ -0,0 +1,20 @@
+#ifndef _AudioSource_H__
+#define _AudioSource_H__
+
+#include "AudioIncludes.h"
+
+#include "AudioPrereqs.h"
+
+namespace audio
+{
+	class _AudioExport AudioSource
+	{
+	public:
+		AudioSource();
+		~AudioSource();
+	private:
+
+	};
+}
+
+#endif /* _AudioSource_H__ */
Index: /code/branches/network/src/audio/AudioStream.cc
===================================================================
--- /code/branches/network/src/audio/AudioStream.cc	(revision 861)
+++ /code/branches/network/src/audio/AudioStream.cc	(revision 861)
@@ -0,0 +1,276 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <string>
+
+#include "AudioStream.h"
+#include "../orxonox/core/Debug.h"
+
+namespace audio
+{
+  AudioStream::AudioStream(std::string path)
+	{
+		this->path = path;
+		loaded = false;
+	}
+
+	void AudioStream::open()
+	{
+	    int result;
+
+
+	    if(!(oggFile = fopen(path.c_str(), "rb")))
+			{
+	    	orxonox::Error("Could not open Ogg file "+path);
+				return;
+			}
+
+	    if((result = ov_open(oggFile, &oggStream, NULL, 0)) < 0)
+	    {
+        fclose(oggFile);
+	      orxonox::Error("Could not open Ogg stream. " + errorString(result));
+				return;
+	    }
+
+			loaded = true;
+
+	    vorbisInfo = ov_info(&oggStream, -1);
+	    vorbisComment = ov_comment(&oggStream, -1);
+
+	    if(vorbisInfo->channels == 1)
+	        format = AL_FORMAT_MONO16;
+	    else
+	        format = AL_FORMAT_STEREO16;
+
+
+	    alGenBuffers(2, buffers);
+	    check();
+	    alGenSources(1, &source);
+	    check();
+
+	    alSource3f(source, AL_POSITION,        0.0, 0.0, 0.0);
+	    alSource3f(source, AL_VELOCITY,        0.0, 0.0, 0.0);
+	    alSource3f(source, AL_DIRECTION,       0.0, 0.0, 0.0);
+	    alSourcef (source, AL_ROLLOFF_FACTOR,  0.0          );
+	    alSourcei (source, AL_SOURCE_RELATIVE, AL_FALSE      );
+	}
+
+
+
+
+	void AudioStream::release()
+	{
+
+	    alSourceStop(source);
+	    empty();
+	    alDeleteSources(1, &source);
+	    check();
+	    alDeleteBuffers(1, buffers);
+	    check();
+
+	    ov_clear(&oggStream);
+			loaded = false;
+
+	}
+
+
+
+
+	void AudioStream::display()
+	{
+		if (loaded)
+		{
+	    COUT(3)
+	        << "version         " << vorbisInfo->version         << std::endl
+	        << "channels        " << vorbisInfo->channels        << std::endl
+	        << "rate (hz)       " << vorbisInfo->rate            << std::endl
+	        << "bitrate upper   " << vorbisInfo->bitrate_upper   << std::endl
+	        << "bitrate nominal " << vorbisInfo->bitrate_nominal << std::endl
+	        << "bitrate lower   " << vorbisInfo->bitrate_lower   << std::endl
+	        << "bitrate window  " << vorbisInfo->bitrate_window  << std::endl
+	        << std::endl
+	        << "vendor " << vorbisComment->vendor << std::endl;
+
+	    for(int i = 0; i < vorbisComment->comments; i++)
+	        COUT(3) << "   " << vorbisComment->user_comments[i] << std::endl;
+
+	    COUT(3) << std::endl;
+		}
+	}
+
+
+
+
+	bool AudioStream::playback()
+	{
+		if (!loaded)
+		{
+			return false;
+		}
+
+	    if(playing())
+	        return true;
+
+	    if(!stream(buffers[0]))
+	        return false;
+
+	    if(!stream(buffers[1]))
+	        return false;
+
+	    alSourceQueueBuffers(source, 2, buffers);
+	    alSourcePlay(source);
+
+	    return true;
+	}
+
+
+
+
+	bool AudioStream::playing()
+	{
+		if (!loaded)
+		{
+			return false;
+		}
+
+	    ALenum state;
+	    alGetSourcei(source, AL_SOURCE_STATE, &state);
+	    return (state == AL_PLAYING);
+	}
+
+
+
+
+	bool AudioStream::update()
+	{
+	    int processed;
+	    bool active = true;
+
+	    alGetSourcei(source, AL_BUFFERS_PROCESSED, &processed);
+
+	    while(processed--)
+	    {
+	        ALuint buffer;
+
+	        alSourceUnqueueBuffers(source, 1, &buffer);
+	        check();
+
+	        active = stream(buffer);
+
+	        alSourceQueueBuffers(source, 1, &buffer);
+	        check();
+	    }
+
+			if (active==false)
+			{
+				loaded = false;
+			}
+	    return active;
+	}
+
+
+
+
+	bool AudioStream::stream(ALuint buffer)
+	{
+	    char pcm[BUFFER_SIZE];
+	    int  size = 0;
+	    int  section;
+	    int  result;
+
+	    while(size < BUFFER_SIZE)
+	    {
+	        result = ov_read(&oggStream, pcm + size, BUFFER_SIZE - size, 0, 2, 1, &section);
+
+	        if(result > 0)
+	            size += result;
+	        else
+	            if(result < 0)
+	                orxonox::Error(errorString(result));
+	            else
+	                break;
+	    }
+
+	    if(size == 0)
+	        return false;
+
+	    alBufferData(buffer, format, pcm, size, vorbisInfo->rate);
+	    check();
+
+	    return true;
+	}
+
+
+
+	void AudioStream::empty()
+	{
+	    int queued;
+
+	    alGetSourcei(source, AL_BUFFERS_QUEUED, &queued);
+
+	    while(queued--)
+	    {
+	        ALuint buffer;
+
+	        alSourceUnqueueBuffers(source, 1, &buffer);
+	        check();
+	    }
+	}
+
+
+
+
+	void AudioStream::check()
+	{
+		int error = alGetError();
+
+		if(error != AL_NO_ERROR)
+			orxonox::Error("OpenAL error was raised.");
+	}
+
+
+
+	std::string AudioStream::errorString(int code)
+	{
+	    switch(code)
+	    {
+	        case OV_EREAD:
+	            return std::string("Read from media.");
+	        case OV_ENOTVORBIS:
+	            return std::string("Not Vorbis data.");
+	        case OV_EVERSION:
+	            return std::string("Vorbis version mismatch.");
+	        case OV_EBADHEADER:
+	            return std::string("Invalid Vorbis header.");
+	        case OV_EFAULT:
+	            return std::string("Internal logic fault (bug or heap/stack corruption.");
+	        default:
+	            return std::string("Unknown Ogg error.");
+	    }
+	}
+}
+
Index: /code/branches/network/src/audio/AudioStream.h
===================================================================
--- /code/branches/network/src/audio/AudioStream.h	(revision 861)
+++ /code/branches/network/src/audio/AudioStream.h	(revision 861)
@@ -0,0 +1,45 @@
+#ifndef _AudioStream_H__
+#define _AudioStream_H__
+
+#include "AudioIncludes.h"
+
+#include "AudioPrereqs.h"
+
+namespace audio
+{
+  #define BUFFER_SIZE (4096 * 4)
+
+  class _AudioExport AudioStream
+  {
+    public:
+      AudioStream(std::string path);
+      void open();
+      void release();
+      void display();
+      bool playback();
+      bool playing();
+      bool update();
+      inline bool isLoaded() { return loaded; }
+
+    protected:
+      bool stream(ALuint buffer);
+      void empty();
+      void check();
+      std::string errorString(int code);
+
+    private:
+      std::string path;
+
+      FILE*           oggFile;
+      OggVorbis_File  oggStream;
+      vorbis_info*    vorbisInfo;
+      vorbis_comment* vorbisComment;
+      bool loaded;
+
+      ALuint buffers[2];
+      ALuint source;
+      ALenum format;
+  };
+}
+
+#endif /* _AudioStream_H__ */
Index: /code/branches/network/src/audio/CMakeLists.txt
===================================================================
--- /code/branches/network/src/audio/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/audio/CMakeLists.txt	(revision 861)
@@ -0,0 +1,25 @@
+SET ( AUDIO_SRC_FILES
+  AudioManager.cc
+  AudioBuffer.cc
+  AudioSource.cc
+  AudioStream.cc
+)
+
+IF (WIN32)
+  ADD_LIBRARY( audio ${AUDIO_SRC_FILES} )
+ELSE (WIN32)
+  ADD_LIBRARY( audio SHARED ${AUDIO_SRC_FILES})
+ENDIF (WIN32)
+
+SET_TARGET_PROPERTIES( audio PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( audio
+  ${OPENAL_LIBRARY}
+  ${ALUT_LIBRARY}
+  ${VORBISFILE_LIBRARY}
+  ${VORBIS_LIBRARY}
+  ${OGG_LIBRARY}
+  core
+)
+
+
Index: /code/branches/network/src/audio/_AudioObject.cc
===================================================================
--- /code/branches/network/src/audio/_AudioObject.cc	(revision 861)
+++ /code/branches/network/src/audio/_AudioObject.cc	(revision 861)
@@ -0,0 +1,142 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+
+#include <iostream>
+#include <string>
+
+#include "core/Debug.h"
+#include "AudioObject.h"
+
+namespace audio
+{
+  AudioObject::AudioObject(std::string audioFile)
+  {
+    audioFile_ = audioFile;
+    SourcePos[0]=0;
+    SourcePos[1]=0;
+    SourcePos[2]=0;
+
+    SourceVel[0]=0;
+    SourceVel[1]=0;
+    SourceVel[2]=0;
+
+    ListenerPos[0]=0;
+    ListenerPos[1]=0;
+    ListenerPos[2]=0;
+
+    ListenerVel[0]=0;
+    ListenerVel[1]=0;
+    ListenerVel[2]=0;
+
+    ListenerOri[0]=0;
+    ListenerOri[1]=0;
+    ListenerOri[2]=-1;
+    ListenerOri[3]=0;
+    ListenerOri[4]=1;
+    ListenerOri[5]=0;
+
+
+    // Initialize OpenAL and clear the error bit.
+
+    alutInit(NULL, 0);
+    alGetError();
+
+    // Load the wav data.
+
+    if(LoadALData() == AL_FALSE)
+    {
+      printf("Error loading sound data.");
+
+    }
+
+    SetListenerValues();
+    COUT(3) << "Info: Play sone ambient background sound";
+  }
+
+  AudioObject::~AudioObject()
+  {
+    KillALData();
+  }
+
+  ALboolean AudioObject::LoadALData()
+  {
+    ALenum format;
+    ALsizei size;
+    ALvoid* data;
+    ALsizei freq;
+    ALboolean loop;
+
+
+    alGenBuffers(1, &Buffer);
+
+    if(alGetError() != AL_NO_ERROR)
+      return AL_FALSE;
+
+    alutLoadWAVFile((ALbyte*)audioFile_.c_str(), &format, &data, &size, &freq, &loop);
+    alBufferData(Buffer, format, data, size, freq);
+    alutUnloadWAV(format, data, size, freq);
+
+    alGenSources(1, &Source);
+
+    if(alGetError() != AL_NO_ERROR)
+      return AL_FALSE;
+
+    alSourcei (Source, AL_BUFFER,   Buffer   );
+    alSourcef (Source, AL_PITCH,    1.0      );
+    alSourcef (Source, AL_GAIN,     1.0      );
+    alSourcefv(Source, AL_POSITION, SourcePos);
+    alSourcefv(Source, AL_VELOCITY, SourceVel);
+    alSourcei (Source, AL_LOOPING,  loop     );
+
+    if(alGetError() == AL_NO_ERROR)
+      return AL_TRUE;
+
+
+    return AL_FALSE;
+  }
+
+  void AudioObject::SetListenerValues()
+  {
+    alListenerfv(AL_POSITION,    ListenerPos);
+    alListenerfv(AL_VELOCITY,    ListenerVel);
+    alListenerfv(AL_ORIENTATION, ListenerOri);
+  }
+
+  void AudioObject::KillALData()
+  {
+    alDeleteBuffers(1, &Buffer);
+    alDeleteSources(1, &Source);
+    alutExit();
+  }
+
+  void AudioObject::play()
+  {
+    alSourcePlay(Source);
+  }
+
+}
Index: /code/branches/network/src/loader/CMakeLists.txt
===================================================================
--- /code/branches/network/src/loader/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/loader/CMakeLists.txt	(revision 861)
@@ -0,0 +1,15 @@
+SET( LOADER_SRC_FILES
+  LevelLoader.cc
+)
+
+IF (WIN32)
+  ADD_LIBRARY( loader ${LOADER_SRC_FILES} )
+ELSE (WIN32)
+  ADD_LIBRARY( loader SHARED ${LOADER_SRC_FILES})
+ENDIF (WIN32)
+
+SET_TARGET_PROPERTIES( loader PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( loader
+  util
+)
Index: /code/branches/network/src/loader/LevelLoader.cc
===================================================================
--- /code/branches/network/src/loader/LevelLoader.cc	(revision 861)
+++ /code/branches/network/src/loader/LevelLoader.cc	(revision 861)
@@ -0,0 +1,213 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*     Nicolas Perrenoud <nicolape@ee.ethz.ch>
+*   Co-authors:
+*      ...
+*
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreOverlay.h>
+#include <OgreOverlayManager.h>
+
+#include "core/Error.h"
+#include "core/Debug.h"
+#include "core/CoreIncludes.h"
+
+#include "audio/AudioManager.h"
+#include "core/BaseObject.h"
+#include "orxonox/Orxonox.h"
+
+#include "LevelLoader.h"
+
+namespace loader
+{
+
+  LevelLoader::LevelLoader(std::string file, std::string path)
+  {
+    valid_ = false;
+
+    // Load XML level file
+    path.append("/");
+    path.append(file);
+
+    // Open xml file
+    doc_.LoadFile(path.c_str());
+
+    // Check if file was loaded
+    if (doc_.LoadFile())
+    {
+      TiXmlHandle hDoc(&doc_);
+      TiXmlHandle hRoot(0);
+      TiXmlElement* pElem;
+
+      // Check for root element
+      pElem = hDoc.FirstChildElement("orxonoxworld").Element();
+      if (pElem)
+      {
+        // Set root element
+        hRoot = TiXmlHandle(pElem);
+        rootElement_ = hRoot.Element();
+
+        // Set level description
+        pElem = hRoot.FirstChild("description").Element();
+        if (pElem)
+        {
+          description_ = pElem->GetText();
+        }
+
+        // Set level name
+        name_ = rootElement_->Attribute("name");
+        image_ = rootElement_->Attribute("image");
+
+        valid_ = true;
+      }
+      else
+      {
+        orxonox::Error("Level file has no valid root node");
+      }
+    }
+    else
+    {
+      orxonox::Error("Could not load level file ");
+    }
+  }
+
+  void LevelLoader::loadLevel()
+  {
+    if (valid_)
+    {
+      TiXmlElement* loadElem;
+      TiXmlElement* audioElem;
+      TiXmlElement* worldElem;
+      TiXmlElement* tElem;
+      TiXmlNode* tNode;
+
+      Ogre::OverlayManager& omgr = Ogre::OverlayManager::getSingleton();
+      Ogre::Overlay* mLoadOverlay; // FIXME: may be uninitialized
+
+      // Set loading screen
+      loadElem = rootElement_->FirstChildElement("loading");
+      if (loadElem)
+      {
+        // Set background
+        tElem = loadElem->FirstChildElement("background");
+        if (tElem)
+        {
+          loadingBackgroundColor_ = tElem->Attribute("color");
+          loadingBackgroundImage_ = tElem->Attribute("image");
+        }
+        // Set bar
+        tElem = loadElem->FirstChildElement("bar");
+        if (tElem)
+        {
+          loadingBarImage_ = tElem->Attribute("image");;
+          loadingBarTop_ = tElem->Attribute("top");
+          loadingBarLeft_ = tElem->Attribute("left");
+          loadingBarWidth_ = tElem->Attribute("width");
+          loadingBarHeight_ = tElem->Attribute("height");
+        }
+
+
+        mLoadOverlay = (Ogre::Overlay*)omgr.getByName("Orxonox/LoadingScreenSample");
+        mLoadOverlay->show();
+
+        COUT(0) << "This is Orxonox" << std::endl;
+        COUT(0) << "the hottest 3D action shooter ever to exist" << std::endl;
+        COUT(0) << "Level: " << name() << std::endl << "Description:" << description() << std::endl << "Image:" << image() << std::endl;
+        COUT(4) << "Backgroundcolor: " << loadingBackgroundColor_ << std::endl << "Backgroundimage:" << loadingBackgroundImage_ << std::endl;
+
+      }
+
+      // Load audio
+      audio::AudioManager* auMan = orxonox::Orxonox::getSingleton()->getAudioManagerPointer();
+      audioElem = rootElement_->FirstChildElement("audio");
+
+      if (audioElem)
+      {
+        audioElem = audioElem->FirstChildElement("ambient");
+        if (audioElem)
+        {
+          tNode = 0;
+          //FIXME something is wrong, probably missing ==
+          while( tNode = audioElem->IterateChildren( tNode ) )
+          {
+            if (tNode->Type() == TiXmlNode::ELEMENT)
+            {
+
+              tElem = tNode->ToElement();
+              std::string elemVal = tElem->Value();
+              if (elemVal == "ogg")
+              {
+                COUT(3) << "Adding sound "<< tElem->Attribute("src") << std::endl;
+
+                auMan->ambientAdd(tElem->Attribute("src"));
+              }
+            }
+          }
+          auMan->ambientStart();
+        }
+      }
+
+      // Load world
+      worldElem = rootElement_->FirstChildElement("world");
+      if (worldElem)
+      {
+        tNode = 0;
+        //FIXME something is wrong, probably missing ==
+        while (tNode = worldElem->IterateChildren(tNode))
+        {
+          if (tNode->Type() == TiXmlNode::ELEMENT)
+          {
+            tElem = tNode->ToElement();
+            orxonox::Identifier* id = ID(tElem->Value());
+            if (id)
+            {
+              orxonox::BaseObject* obj = id->fabricate();
+              obj->loadParams(tElem);
+            }
+            else
+            {
+              COUT(2) << "Warning: '"<< tElem->Value() <<"' is not a valid classname." << std::endl;
+            }
+          }
+        }
+      }
+
+      if (loadElem)
+      {
+        // FIXME: check for potential initialisation of mLoadOverlay
+        mLoadOverlay->hide();
+      }
+
+
+      COUT(0) << "Loading finished!" << std::endl << std::endl;
+    }
+  }
+
+  LevelLoader::~LevelLoader()
+  {
+
+  }
+
+}
Index: /code/branches/network/src/loader/LevelLoader.h
===================================================================
--- /code/branches/network/src/loader/LevelLoader.h	(revision 861)
+++ /code/branches/network/src/loader/LevelLoader.h	(revision 861)
@@ -0,0 +1,57 @@
+/**
+* Orxonox - www.orxonox.net
+* Level Loader class
+*
+* @author Nicolas Perrenoud <nicolape@ee.ethz.ch>
+*/
+
+#ifndef _LevelLoader_H__
+#define _LevelLoader_H__
+
+#include <string>
+
+#include "LoaderPrereqs.h"
+#include "util/tinyxml/tinyxml.h"
+
+class TiXmlDocument;   // Forward declaration
+class TiXmlElement;    // Forward declaration
+
+namespace loader
+{
+  class _LoaderExport LevelLoader
+  {
+  public:
+    // Constructors, loads the level file and some information data
+    LevelLoader(std::string file, std::string dir = "levels");
+    // Destructor
+    virtual ~LevelLoader();
+    // Loads all level data
+    void loadLevel();
+
+    // Getters
+    inline std::string name() {return name_; };
+    inline std::string description() {return description_; };
+    inline std::string image() {return image_; };
+  private:
+    //! Level information
+    std::string name_;
+    std::string description_;
+    std::string image_;
+    std::string loadingBackgroundColor_;
+    std::string loadingBackgroundImage_;
+    std::string loadingBarImage_;
+    std::string loadingBarTop_;
+    std::string loadingBarLeft_;
+    std::string loadingBarWidth_;
+    std::string loadingBarHeight_;
+
+    //! Set to true if it was possible to load the level file
+    bool valid_;
+
+    // Xml-Stuff
+    TiXmlDocument doc_;
+    TiXmlElement *rootElement_;
+  };
+}
+
+#endif /* _LevelLoader_H__ */
Index: /code/branches/network/src/loader/LoaderPrereqs.h
===================================================================
--- /code/branches/network/src/loader/LoaderPrereqs.h	(revision 861)
+++ /code/branches/network/src/loader/LoaderPrereqs.h	(revision 861)
@@ -0,0 +1,70 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  OrxonoxPrereq.cc
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _LoaderPrereqs_H__
+#define _LoaderPrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+// Compile loader directly in orxonox executable, if on Visual Studio platform
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC && defined(ORXONOX_SHARED_BUILD)
+#  define LOADER_SHARED_BUILD
+#endif
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( LOADER_STATIC_BUILD )
+#  ifdef LOADER_SHARED_BUILD
+#    define _LoaderExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _LoaderExport
+#    else
+#      define _LoaderExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _LoaderExport  __attribute__ ((visibility("default")))
+#else
+#  define _LoaderExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+namespace loader {
+  class LevelLoader;
+}
+
+#endif /* _LoaderPrereqs_H__ */
Index: /code/branches/network/src/network/CMakeLists.txt
===================================================================
--- /code/branches/network/src/network/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/network/CMakeLists.txt	(revision 861)
@@ -0,0 +1,98 @@
+SET( NETWORK_SRC_FILES
+  Client.cc
+  ClientConnection.cc
+  ClientInformation.cc
+  ConnectionManager.cc
+  GameStateManager.cc
+  GameStateClient.cc
+  PacketBuffer.cc
+  PacketDecoder.cc
+  PacketGenerator.cc
+  Server.cc
+  Synchronisable.cc
+  dummyserver3.cc
+)
+
+IF(WIN32)
+  ADD_LIBRARY( network ${NETWORK_SRC_FILES})
+ELSE(WIN32)
+  ADD_LIBRARY( network SHARED ${NETWORK_SRC_FILES})
+ENDIF(WIN32)
+
+SET_TARGET_PROPERTIES( network PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( network
+  ${ZLIB_LIBRARY}
+  ${ENet_LIBRARY}
+  ${Boost_thread_LIBRARIES}
+  core
+)
+
+# build those parts only on request.
+IF(NETWORK_TESTING_ENABLED)
+  SET( CHATCLIENT_SRC_FILES
+    ClientConnection.cc
+    Client.cc
+    PacketBuffer.cc
+    PacketDecoder.cc
+    PacketGenerator.cc
+    dummyclient3.cc
+  )
+
+  SET( CHATSERVER_SRC_FILES
+    ConnectionManager.cc
+    GameStateManager.cc
+    PacketBuffer.cc
+    PacketDecoder.cc
+    PacketGenerator.cc
+    dummyserver3.cc
+  )
+
+  # chatserver for testing purposes
+  ADD_EXECUTABLE(chatserver ${CHATSERVER_SRC_FILES})
+  TARGET_LINK_LIBRARIES( chatserver
+    ${OGRE_LIBRARIES}
+    network
+    core
+    #objects
+    ${ENet_LIBRARY}
+    ${ZLIB_LIBRARY}
+    ${WINDOWS_ENET_DEPENDENCIES}
+  )
+
+  # chatclient for testing purpose
+  ADD_EXECUTABLE(chatclient ${CHATCLIENT_SRC_FILES})
+  TARGET_LINK_LIBRARIES( chatclient
+    ${OGRE_LIBRARIES}
+    network
+    core
+    #objects
+    ${ENet_LIBRARY}
+    ${ZLIB_LIBRARY}
+    ${WINDOWS_ENET_DEPENDENCIES}
+  )
+
+  # client for testing purpose
+  ADD_EXECUTABLE(client dummyclient2.cc)
+  TARGET_LINK_LIBRARIES( client
+    ${OGRE_LIBRARIES}
+    network
+    core
+    #objects
+    ${ENet_LIBRARY}
+    ${ZLIB_LIBRARY}
+    ${WINDOWS_ENET_DEPENDENCIES}
+  )
+
+  # server for testing purpose
+  ADD_EXECUTABLE(server dummyserver.cc)
+  TARGET_LINK_LIBRARIES( server
+    ${OGRE_LIBRARIES}
+    network
+    core
+    #objects
+    ${ENet_LIBRARY}
+    ${ZLIB_LIBRARY}
+    ${WINDOWS_ENET_DEPENDENCIES}
+  )
+ENDIF(NETWORK_TESTING_ENABLED)
Index: /code/branches/network/src/network/Client.cc
===================================================================
--- /code/branches/network/src/network/Client.cc	(revision 861)
+++ /code/branches/network/src/network/Client.cc	(revision 861)
@@ -0,0 +1,212 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// C++ Implementation: Client
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include "core/CoreIncludes.h"
+#include "Client.h"
+
+namespace network
+{
+  /**
+  * Constructor for the Client class
+  * initializes the address and the port to default localhost:NETWORK_PORT
+  */
+  Client::Client(): client_connection(NETWORK_PORT,"127.0.0.1"){
+    // set server address to localhost
+    isConnected=false;
+  }
+
+  /**
+  * Constructor for the Client class
+  * @param address the server address
+  * @param port port of the application on the server
+  */
+  Client::Client(std::string address, int port) : client_connection(port, address){
+    isConnected=false;
+  }
+
+  /**
+  * Constructor for the Client class
+  * @param address the server address
+  * @param port port of the application on the server
+  */
+  Client::Client(const char *address, int port) : client_connection(port, address){
+    isConnected=false;
+  }
+
+  /**
+  * Establish the Connection to the Server
+  * @return true/false
+  */
+  bool Client::establishConnection(){
+    isConnected=client_connection.createConnection();
+    return isConnected;
+  }
+
+  /**
+  * closes the Connection to the Server
+  * @return true/false
+  */
+  bool Client::closeConnection(){
+    isConnected=false;
+    return client_connection.closeConnection();
+  }
+
+  /**
+  * submits a MouseAction to the server
+  * @param x x Coordinate
+  * @param y y Coordinate
+  * @return true/false
+  */
+  bool Client::sendMouse(double x, double y){
+    // generate packet and add it to the queue
+    if(!isConnected)
+      return false;
+    if(!client_connection.addPacket(pck_gen.mousem(x, y)))
+      return false;
+    // send packets
+    return client_connection.sendPackets();
+  }
+
+  /**
+  * submits a Keystrike to the server
+  * @param key_code code to submit
+  * @return true/false
+  */
+  bool Client::sendKeyboard(char key_code){
+    // generate packet and add it to queue
+    if(!isConnected)
+      return false;
+    if(!client_connection.addPacket(pck_gen.keystrike(key_code)))
+      return false;
+    // send packets
+    return client_connection.sendPackets();
+  }
+
+  /**
+  * submits a chat message to the server
+  * @param message message to send
+  * @return true/false
+  */
+  bool Client::sendChat( std::string message ){
+    // generate packet and add it to queue
+    if(!isConnected)
+      return false;
+    if(client_connection.addPacket(pck_gen.chatMessage( message.c_str() )))
+      return client_connection.sendPackets();
+    // send packets
+    return false;
+  }
+
+  /**
+  * Adds a MouseAction to the PacketQueue
+  * @param x x Coordinate
+  * @param y y Coordinate
+  * @return true/false
+  */
+  bool Client::addMouse(double x, double y){
+    // generate packet and add it to the queue
+    if(client_connection.addPacket(pck_gen.mousem(x, y)))
+      return true;
+    else
+      return false;
+  }
+
+  /**
+  * Adds a Keystrike to the PacketQueue
+  * @param key_code
+  * @return true/false
+  */
+  bool Client::addKeyboard(char key_code){
+    // generate packet and add it to queue
+    if(client_connection.addPacket(pck_gen.keystrike(key_code)))
+      return true;
+    else
+      return false;
+  }
+
+  /**
+  * Sends out all the packets queued by addXXX
+  */
+  bool Client::sendPackets(){
+    if(!isConnected)
+      return false;
+    ENetEvent event;
+    // send packets
+    client_connection.sendPackets(&event);
+    if(event.type==ENET_EVENT_TYPE_NONE)
+      return true;
+    else
+      return false;
+  }
+
+  /**
+  * Performs a GameState update
+  */
+  void Client::tick(float time){
+    ENetPacket *packet;
+    // stop if the packet queue is empty
+    while(!(client_connection.queueEmpty())){
+      packet = client_connection.getPacket();
+      //std::cout << "tick packet size " << packet->dataLength << std::endl;
+      elaborate(packet, 0); // ================= i guess we got to change this .... (client_ID is always same = server)
+    }
+    return;
+  }
+
+  void Client::processGamestate( GameStateCompressed *data){
+    gamestate.pushGameState(data);
+    std::cout << "received gamestate id: " << data->id << std::endl;
+    client_connection.addPacket(pck_gen.acknowledgement(data->id));
+    client_connection.sendPackets();
+    return;
+  }
+
+  void Client::processClassid(classid *clid){
+    orxonox::Identifier *id;
+    id=ID(std::string(clid->message));
+    if(id!=NULL)
+      id->setNetworkID(clid->clid);
+    return;
+  }
+
+  void Client::processChat( chat *data){
+    std::cout << "Server: " << data->message << std::endl;
+  }
+
+}
Index: /code/branches/network/src/network/Client.h
===================================================================
--- /code/branches/network/src/network/Client.h	(revision 861)
+++ /code/branches/network/src/network/Client.h	(revision 861)
@@ -0,0 +1,69 @@
+//
+// C++ Interface: Client
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef _Client_H__
+#define _Client_H__
+
+#include <string>
+
+#include "NetworkPrereqs.h"
+#include "ClientConnection.h"
+#include "PacketManager.h"
+#include "GameStateClient.h"
+//#include "NetworkFrameListener.h"
+
+
+namespace network
+{
+  /**
+  network::Client *client;
+  * The network/Client class
+  * This class implements all necessary function for the network communication
+  * It is the root class of the network module
+  *
+  */
+  class _NetworkExport Client : PacketDecoder{
+  public:
+    Client();
+    Client(std::string address, int port);
+    Client(const char *address, int port);
+
+    bool establishConnection();
+    bool closeConnection();
+
+    bool sendMouse(double x, double y);
+    bool sendKeyboard(char key_code);
+    bool sendChat( std::string message );
+
+    bool addMouse(double x, double y);
+    bool addKeyboard(char key_code);
+
+    bool sendPackets();
+
+    void tick(float time);
+
+  private:
+    ClientConnection client_connection;
+    PacketGenerator pck_gen;
+    GameStateClient gamestate;
+    bool isConnected;
+
+    // implement data processing functions of PacketDecoder
+    void processGamestate( GameStateCompressed *data);
+    void processClassid(classid *clid);
+    void processChat( chat *data);
+  };
+
+
+}
+
+#endif /* _Client_H__ */
Index: /code/branches/network/src/network/ClientConnection.cc
===================================================================
--- /code/branches/network/src/network/ClientConnection.cc	(revision 861)
+++ /code/branches/network/src/network/ClientConnection.cc	(revision 861)
@@ -0,0 +1,223 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// C++ Interface: ClientConnection
+//
+// Description: The Class ClientConnection manages the servers conenctions to the clients.
+// each connection is provided by a new process. communication between master process and
+// connection processes is provided by ...
+//
+//
+// Author:  Oliver Scheuss
+//
+
+#include <iostream>
+// boost.thread library for multithreading support
+#include <boost/thread/thread.hpp>
+#include <boost/bind.hpp>
+
+#include "util/Sleep.h"
+#include "ClientConnection.h"
+
+namespace network
+{
+  static boost::thread_group network_threads;
+
+  ClientConnection::ClientConnection(int port, std::string address) {
+    quit=false;
+    server=NULL;
+    enet_address_set_host(&serverAddress, address.c_str());
+    serverAddress.port = NETWORK_PORT;
+    established=false;
+  }
+
+  ClientConnection::ClientConnection(int port, const char *address) {
+    quit=false;
+    server=NULL;
+    enet_address_set_host(&serverAddress, address);
+    serverAddress.port = NETWORK_PORT;
+    established=false;
+  }
+
+  bool ClientConnection::waitEstablished(int milisec) {
+    for(int i=0; i<=milisec && !established; i++)
+      usleep(1000);
+
+    return established;
+  }
+
+
+  ENetPacket *ClientConnection::getPacket(ENetAddress &address) {
+    if(!buffer.isEmpty()) {
+      //std::cout << "###BUFFER IS NOT EMPTY###" << std::endl;
+      return buffer.pop(address);
+    }
+    else{
+      return NULL;
+    }
+  }
+
+  ENetPacket *ClientConnection::getPacket() {
+    ENetAddress address;
+    return getPacket(address);
+  }
+
+  bool ClientConnection::queueEmpty() {
+    return buffer.isEmpty();
+  }
+
+  bool ClientConnection::createConnection() {
+    network_threads.create_thread(boost::bind(boost::mem_fn(&ClientConnection::receiverThread), this));
+    // wait 10 seconds for the connection to be established
+    return waitEstablished(10000);
+  }
+
+  bool ClientConnection::closeConnection() {
+    quit=true;
+    network_threads.join_all();
+    established=false;
+    return true;
+  }
+
+
+  bool ClientConnection::addPacket(ENetPacket *packet) {
+    if(server==NULL)
+      return false;
+    if(enet_peer_send(server, 1, packet)!=0)
+      return false;
+    return true;
+  }
+
+  bool ClientConnection::sendPackets(ENetEvent *event) {
+    if(server==NULL)
+      return false;
+    if(enet_host_service(client, event, NETWORK_SEND_WAIT)>=0){
+      return true;}
+    else
+      return false;
+  }
+
+  bool ClientConnection::sendPackets() {
+    ENetEvent event;
+    if(server==NULL)
+      return false;
+    if(enet_host_service(client, &event, NETWORK_SEND_WAIT)>=0){
+      return true;}
+    else
+      return false;
+  }
+
+  void ClientConnection::receiverThread() {
+    // what about some error-handling here ?
+    enet_initialize();
+    atexit(enet_deinitialize);
+    ENetEvent event;
+    client = enet_host_create(NULL, NETWORK_CLIENT_MAX_CONNECTIONS, 0, 0);
+    if(client==NULL)
+      // add some error handling here ==========================
+      quit=true;
+    //connect to the server
+    if(!establishConnection()){
+      quit=true;
+      return;
+    }
+    //main loop
+    while(!quit){
+      //std::cout << "connection loop" << std::endl;
+      if(enet_host_service(client, &event, NETWORK_CLIENT_TIMEOUT)<0){
+        // we should never reach this point
+        quit=true;
+        // add some error handling here ========================
+      }
+      switch(event.type){
+        // log handling ================
+      case ENET_EVENT_TYPE_CONNECT:
+      case ENET_EVENT_TYPE_RECEIVE:
+        //std::cout << "got packet" << std::endl;
+        processData(&event);
+        break;
+      case ENET_EVENT_TYPE_DISCONNECT:
+        quit=true;
+        // server closed the connection
+        return;
+        break;
+      case ENET_EVENT_TYPE_NONE:
+        continue;
+      }
+    }
+    // now disconnect
+
+    if(!disconnectConnection())
+      // if disconnecting failed destroy conn.
+      enet_peer_reset(server);
+    return;
+  }
+
+  bool ClientConnection::disconnectConnection() {
+    ENetEvent event;
+    enet_peer_disconnect(server, 0);
+    while(enet_host_service(client, &event, NETWORK_CLIENT_TIMEOUT) > 0){
+      switch (event.type)
+      {
+      case ENET_EVENT_TYPE_NONE:
+      case ENET_EVENT_TYPE_CONNECT:
+      case ENET_EVENT_TYPE_RECEIVE:
+        enet_packet_destroy(event.packet);
+        break;
+      case ENET_EVENT_TYPE_DISCONNECT:
+        return true;
+      }
+    }
+    enet_peer_reset(server);
+    return false;
+  }
+
+  bool ClientConnection::establishConnection() {
+    ENetEvent event;
+    // connect to peer
+    server = enet_host_connect(client, &serverAddress, NETWORK_CLIENT_CHANNELS);
+    if(server==NULL)
+      // error handling
+      return false;
+    // handshake
+    if(enet_host_service(client, &event, NETWORK_CLIENT_TIMEOUT)>0 && event.type == ENET_EVENT_TYPE_CONNECT){
+      established=true;
+      return true;
+    }
+    else
+      return false;
+  }
+
+  bool ClientConnection::processData(ENetEvent *event) {
+    //std::cout << "got packet, pushing to queue" << std::endl;
+    // just add packet to the buffer
+    // this can be extended with some preprocessing
+    return buffer.push(event);
+  }
+
+}
Index: /code/branches/network/src/network/ClientConnection.h
===================================================================
--- /code/branches/network/src/network/ClientConnection.h	(revision 861)
+++ /code/branches/network/src/network/ClientConnection.h	(revision 861)
@@ -0,0 +1,76 @@
+//
+// C++ Interface: ClientConnection
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef _ClientConnection_H__
+#define _ClientConnection_H__
+
+#include <string>
+#include <enet/enet.h>
+
+#include "NetworkPrereqs.h"
+#include "PacketBuffer.h"
+
+namespace network
+{
+
+#define NETWORK_PORT 55556
+#define NETWORK_CLIENT_MAX_CONNECTIONS 5
+#define NETWORK_CLIENT_TIMEOUT 10
+#define NETWORK_SEND_WAIT 5
+#define NETWORK_CLIENT_CHANNELS 2
+
+
+  class ClientConnection{
+  public:
+    ClientConnection(int port, std::string address);
+    ClientConnection(int port, const char* address);
+    ENetPacket *getPacket(ENetAddress &address); // thread1
+    ENetPacket *getPacket(); // thread1
+    // check wheter the packet queue is empty
+    bool queueEmpty();
+    // create a new listener thread
+    bool createConnection();
+    bool closeConnection();
+    // add a packet to queue for the server
+    bool addPacket(ENetPacket *packet);
+    // send out all queued packets
+    bool sendPackets();
+    // send out all queued packets and save result in event
+    bool sendPackets(ENetEvent *event);
+    bool waitEstablished(int milisec);
+  private:
+    bool processData(ENetEvent *event);
+    // implementation of the listener
+    void receiverThread(); //thread2
+    //packetbuffer
+    bool establishConnection();
+    bool disconnectConnection();
+    PacketBuffer buffer;
+    // enet stuff
+    ENetHost *client;
+    ENetAddress serverAddress;
+    // quit-variable (communication with threads)
+    bool quit;
+    bool established;
+    // clientlist
+    ENetPeer *server;
+  };
+
+
+
+
+
+
+
+
+}
+
+#endif /* _ClientConnection_H__ */
Index: /code/branches/network/src/network/ClientInformation.cc
===================================================================
--- /code/branches/network/src/network/ClientInformation.cc	(revision 861)
+++ /code/branches/network/src/network/ClientInformation.cc	(revision 861)
@@ -0,0 +1,233 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// C++ Implementation: ClientInformation
+//
+// Description:
+//
+//
+// Author:  <>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include <iostream> //debug
+
+#include "ClientInformation.h"
+
+namespace network
+{
+  ClientInformation::ClientInformation() {
+    gamestateID_=GAMESTATEID_INITIAL;
+    preve=0;
+    nexte=0;
+    this->head=false;
+    synched_=false;
+  }
+
+  ClientInformation::ClientInformation(bool head) {
+    gamestateID_=GAMESTATEID_INITIAL;
+    preve=0;
+    nexte=0;
+    this->head=head;
+    synched_=false;
+  }
+
+  // ClientInformation::ClientInformation(ClientInformation *prev) {
+  //   if(prev->next()!=0){
+  //     this->nexte=prev->next();
+  //     this->nexte->setPrev(this);
+  //   }
+  //   else
+  //     this->nexte = 0;
+  //   prev->setNext(this);
+  //   this->preve = pref;
+  // }
+  //
+  // ClientInformation::ClientInformation(ClientInformation *prev, ClientInformation *next){
+  //   this->nexte = next;
+  //   this->preve = prev;
+  //   this->preve->setNext(this);
+  //   this->nexte->setPrev(this);
+  // }
+
+  ClientInformation::~ClientInformation() {
+    if(preve!=0)
+      preve->setNext(this->nexte);
+    if(nexte!=0)
+      nexte->setPrev(this->preve);
+  }
+
+  ClientInformation *ClientInformation::next() {
+    if(this!=0)
+      return this->nexte;
+    else
+      return 0;
+  }
+  ClientInformation *ClientInformation::prev() {
+    if(this!=0)
+      return this->preve;
+    else
+      return 0;
+  }
+
+  bool ClientInformation::setPrev(ClientInformation *prev) {
+    if(!head)
+      this->preve = prev;
+    else
+      return false;
+    return true;
+  }
+
+  bool ClientInformation::setNext(ClientInformation *next) {
+    this->nexte = next;
+    return true;
+  }
+
+  ClientInformation *ClientInformation::insertAfter(ClientInformation *ins) {
+    this->nexte->setPrev(ins);
+    ins->setNext(this->nexte);
+    ins->setPrev(this);
+    this->nexte = ins;
+    return ins;
+  }
+
+  ClientInformation *ClientInformation::insertBefore(ClientInformation *ins){
+    this->prev()->setNext(ins);
+    ins->setPrev(this->preve);
+    this->preve=ins;
+    ins->setNext(this);
+    return ins;
+  }
+
+  void ClientInformation::setID(int clientID){
+    clientID_ = clientID;
+  }
+
+  void ClientInformation::setPeer(ENetPeer *peer){
+    peer_ = peer;
+  }
+
+  void ClientInformation::setGamestateID(int id){
+    gamestateID_=id;
+  }
+
+  int ClientInformation::getID() {
+    return clientID_;
+  }
+
+  ENetPeer *ClientInformation::getPeer() {
+    return peer_;
+  }
+
+  int ClientInformation::getGamestateID() {
+    return gamestateID_;
+  }
+
+  ClientInformation *ClientInformation::insertBack(ClientInformation *ins) {
+    ClientInformation *temp = this;
+    while(temp->next()!=0){
+      temp = temp->next();
+    }
+    temp->setNext(ins);
+    ins->setPrev(temp);
+    return ins;
+  }
+
+  bool ClientInformation::removeClient(int clientID) {
+    ClientInformation *temp = this;
+    while(temp!=0 && temp->getID()!=clientID)
+      temp = temp->next();
+    if(temp==0)
+      return false;
+    delete temp;
+    return true;
+  }
+
+  bool ClientInformation::removeClient(ENetPeer *peer) {
+    ClientInformation *temp = this;
+    while(temp!=0){
+      if(!temp->head)
+        if(temp->getPeer()->address.host==peer->address.host && temp->getPeer()->address.port==peer->address.port)
+          break;
+      temp = temp->next();
+    }
+    if(temp==0)
+      return false;
+    delete temp;
+    return true;
+  }
+
+  /**
+  * This function goes forward through the list and looks for an element with clientID
+  * This function should only be applied to the head of the list
+  * @param clientID id to look for
+  * @return pointer to the element in the list or 0 if the search was unsuccessfull
+  */
+  ClientInformation *ClientInformation::findClient(int clientID, bool look_backwards) {
+    ClientInformation *temp = this;
+    if (temp->head)
+      temp=temp->next();
+    while(temp!=0 && temp->getID()!=clientID){
+      temp = temp->next();
+    }
+    // returns 0 if nothing has been found
+    return temp;
+  }
+
+  /**
+  * This function goes forward through the list and looks for an element with clientID
+  * This function should only be applied to the head of the list
+  * @param peer peer to look for
+  * @return pointer to the element in the list
+  */
+  ClientInformation *ClientInformation::findClient(ENetAddress *address, bool look_backwards) {
+    ClientInformation *temp = this;
+    while(temp!=0){
+      if(temp->head){
+        temp = temp->next();
+        continue;
+      }
+      if(temp->getPeer()->address.host==address->host && temp->getPeer()->address.port == address->port)
+        break;
+      temp = temp->next();
+    }
+    // returns 0 if nothing has been found
+    return temp;
+  }
+
+  void ClientInformation::setSynched(bool s) {
+    synched_=s;
+  }
+
+  bool ClientInformation::getSynched() {
+    return synched_;
+  }
+
+}
Index: /code/branches/network/src/network/ClientInformation.h
===================================================================
--- /code/branches/network/src/network/ClientInformation.h	(revision 861)
+++ /code/branches/network/src/network/ClientInformation.h	(revision 861)
@@ -0,0 +1,69 @@
+//
+// C++ Interface: ClientInformation
+//
+// Description: 
+//
+//
+// Author:  <>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef _ClientInformation_H__
+#define _ClientInformation_H__
+
+#include <enet/enet.h>
+
+#include "NetworkPrereqs.h"
+
+#define GAMESTATEID_INITIAL -1
+
+namespace network
+{
+  /**
+  * This class implements a list for client informations
+  * @author Oliver Scheuss
+  */
+  class ClientInformation{
+  public:
+    ClientInformation();
+    ClientInformation(bool head);
+    //   ClientInformation(ClientInformation *prev, ClientInformation *next);
+    //   ClientInformation(ClientInformation *prev);
+    ~ClientInformation();
+    ClientInformation *next();
+    ClientInformation *prev();
+    bool setNext(ClientInformation *next);
+    bool setPrev(ClientInformation *prev);
+    ClientInformation *insertAfter(ClientInformation *ins);
+    ClientInformation *insertBefore(ClientInformation *ins);
+    ClientInformation *insertBack(ClientInformation *ins);
+    void setID(int clientID);
+    void setPeer(ENetPeer *peer);
+    void setGamestateID(int id);
+    int getID();
+    ENetPeer *getPeer();
+    int getGamestateID();
+    bool removeClient(int clientID);
+    bool removeClient(ENetPeer *peer);
+    ClientInformation *findClient(int clientID, bool look_backwards=false);
+    ClientInformation *findClient(ENetAddress *address, bool look_backwards=false);
+
+    void setSynched(bool s);
+    bool getSynched();
+
+    bool head;
+
+  private:
+    ClientInformation *preve;
+    ClientInformation *nexte;
+    //actual information:
+    ENetPeer *peer_;
+    int clientID_;
+    int gamestateID_;
+    bool synched_;
+  };
+
+}
+
+#endif /* _ClientInformation_H__ */
Index: /code/branches/network/src/network/ConnectionManager.cc
===================================================================
--- /code/branches/network/src/network/ConnectionManager.cc	(revision 861)
+++ /code/branches/network/src/network/ConnectionManager.cc	(revision 861)
@@ -0,0 +1,283 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// C++ Interface: ConnectionManager
+//
+// Description: The Class ConnectionManager manages the servers conenctions to the clients.
+// each connection is provided by a new process. communication between master process and
+// connection processes is provided by ...
+//
+//
+// Author:  Oliver Scheuss
+//
+
+#include <iostream>
+// boost.thread library for multithreading support
+#include <boost/thread/thread.hpp>
+#include <boost/bind.hpp>
+
+#include "core/CoreIncludes.h"
+#include "ClientInformation.h"
+#include "ConnectionManager.h"
+
+namespace std
+{
+  bool operator< (ENetAddress a, ENetAddress b) {
+    if(a.host <= b.host)
+      return true;
+    else
+      return false;
+  }
+}
+
+namespace network
+{
+  boost::thread_group network_threads;
+
+  ConnectionManager::ConnectionManager(ClientInformation *head) {
+    quit=false;
+    bindAddress.host = ENET_HOST_ANY;
+    bindAddress.port = NETWORK_PORT;
+    head_ = head;
+  }
+
+  ConnectionManager::ConnectionManager(int port, std::string address, ClientInformation *head) {
+    quit=false;
+    enet_address_set_host (& bindAddress, address.c_str());
+    bindAddress.port = NETWORK_PORT;
+    head_ = head;
+  }
+
+  ConnectionManager::ConnectionManager(int port, const char *address, ClientInformation *head) {
+    quit=false;
+    enet_address_set_host (& bindAddress, address);
+    bindAddress.port = NETWORK_PORT;
+    head_ = head;
+  }
+
+  ENetPacket *ConnectionManager::getPacket(ENetAddress &address) {
+    if(!buffer.isEmpty())
+      return buffer.pop(address);
+    else
+      return NULL;
+  }
+
+  ENetPacket *ConnectionManager::getPacket(int &clientID) {
+    ENetAddress address;
+    ENetPacket *packet=getPacket(address);
+    ClientInformation *temp =head_->findClient(&address);
+    clientID=temp->getID();
+    return packet;
+  }
+
+  bool ConnectionManager::queueEmpty() {
+    return buffer.isEmpty();
+  }
+
+  void ConnectionManager::createListener() {
+    network_threads.create_thread(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
+    //     boost::thread thr(boost::bind(boost::mem_fn(&ConnectionManager::receiverThread), this));
+    return;
+  }
+
+  bool ConnectionManager::quitListener() {
+    quit=true;
+    network_threads.join_all();
+    return true;
+  }
+
+  bool ConnectionManager::addPacket(ENetPacket *packet, ENetPeer *peer) {
+    if(enet_peer_send(peer, head_->findClient(&(peer->address))->getID() , packet)!=0)
+      return false;
+    return true;
+  }
+
+  bool ConnectionManager::addPacket(ENetPacket *packet, int clientID) {
+    if(enet_peer_send(head_->findClient(clientID)->getPeer(), clientID, packet)!=0)
+      return false;
+    return true;
+  }
+
+  bool ConnectionManager::addPacketAll(ENetPacket *packet) {
+    for(ClientInformation *i=head_->next(); i!=0; i=i->next()){
+      if(enet_peer_send(i->getPeer(), i->getID(), packet)!=0)
+        return false;
+    }
+    return true;
+  }
+
+  bool ConnectionManager::sendPackets(ENetEvent *event) {
+    if(server==NULL)
+      return false;
+    if(enet_host_service(server, event, NETWORK_SEND_WAIT)>=0)
+      return true;
+    else
+      return false;
+  }
+
+  bool ConnectionManager::sendPackets() {
+    ENetEvent event;
+    if(server==NULL)
+      return false;
+    if(enet_host_service(server, &event, NETWORK_SEND_WAIT)>=0)
+      return true;
+    else
+      return false;
+  }
+
+  void ConnectionManager::receiverThread() {
+    // what about some error-handling here ?
+    enet_initialize();
+    atexit(enet_deinitialize);
+    ENetEvent event;
+    server = enet_host_create(&bindAddress, NETWORK_MAX_CONNECTIONS, 0, 0);
+    if(server==NULL){
+      // add some error handling here ==========================
+      quit=true;
+      return;
+    }
+
+    while(!quit){
+      if(enet_host_service(server, &event, NETWORK_WAIT_TIMEOUT)<0){
+        // we should never reach this point
+        quit=true;
+        // add some error handling here ========================
+      }
+      switch(event.type){
+        // log handling ================
+        case ENET_EVENT_TYPE_CONNECT:
+          addClient(&event);
+          break;
+        case ENET_EVENT_TYPE_RECEIVE:
+          //std::cout << "received data" << std::endl;
+          processData(&event);
+          break;
+        case ENET_EVENT_TYPE_DISCONNECT:
+          // add some error/log handling here
+          clientDisconnect(event.peer);
+          break;
+        case ENET_EVENT_TYPE_NONE:
+          break;
+      }
+    }
+    disconnectClients();
+    // if we're finishied, destroy server
+    enet_host_destroy(server);
+  }
+
+  void ConnectionManager::disconnectClients() {
+    ENetEvent event;
+    ClientInformation *temp = head_->next();
+    while(temp!=0){
+      enet_peer_disconnect(temp->getPeer(), 0);
+      temp = temp->next();
+    }
+    temp = temp->next();
+    while( temp!=0 && enet_host_service(server, &event, NETWORK_WAIT_TIMEOUT) > 0){
+      switch (event.type)
+      {
+      case ENET_EVENT_TYPE_NONE:
+      case ENET_EVENT_TYPE_CONNECT:
+      case ENET_EVENT_TYPE_RECEIVE:
+        enet_packet_destroy(event.packet);
+        break;
+      case ENET_EVENT_TYPE_DISCONNECT:
+        std::cout << "disconnecting client" << std::endl;
+        delete head_->findClient(&(event.peer->address));
+        temp = temp->next();
+        break;
+      }
+    }
+    return;
+  }
+
+  bool ConnectionManager::processData(ENetEvent *event) {
+    // just add packet to the buffer
+    // this can be extended with some preprocessing
+    return buffer.push(event);
+  }
+
+  //bool ConnectionManager::clientDisconnect(ENetPeer *peer) {
+  //  return clientDisconnect(*peer);
+  //}
+
+  bool ConnectionManager::clientDisconnect(ENetPeer *peer) {
+    return head_->removeClient(peer);
+  }
+
+  bool ConnectionManager::addClient(ENetEvent *event) {
+    ClientInformation *temp = head_->insertBack(new ClientInformation);
+    if(temp->prev()->head)
+      temp->setID(1);
+    else
+      temp->setID(temp->prev()->getID()+1);
+    temp->setPeer(event->peer);
+    std::cout << "added client id: " << temp->getID() << std::endl;
+    syncClassid(temp->getID());
+    temp->setSynched(true);
+    return true;
+  }
+
+  int ConnectionManager::getClientID(ENetPeer peer) {
+    return getClientID(peer.address);
+  }
+
+  int ConnectionManager::getClientID(ENetAddress address) {
+    return head_->findClient(&address)->getID();
+  }
+
+  ENetPeer *ConnectionManager::getClientPeer(int clientID) {
+    return head_->findClient(clientID)->getPeer();
+  }
+
+  void ConnectionManager::syncClassid(int clientID) {
+    int i=0;
+    std::string classname;
+    bool abort=false;
+    orxonox::Identifier *id;
+    while(!abort){
+      id = ID(i);
+      std::cout << "syncid: " << i << ", ID(id): " << id << std::endl;
+      if(id == NULL){
+        if(i!=0)
+          abort=true;
+        else{
+          ++i;
+          continue;
+        }
+      }
+      else{
+        classname = id->getName();
+        addPacket(packet_gen.clid( i, classname ),clientID);
+      }
+      ++i;
+    }
+    sendPackets();
+  }
+
+}
Index: /code/branches/network/src/network/ConnectionManager.h
===================================================================
--- /code/branches/network/src/network/ConnectionManager.h	(revision 861)
+++ /code/branches/network/src/network/ConnectionManager.h	(revision 861)
@@ -0,0 +1,86 @@
+//
+// C++ Interface: ConnectionManager
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef _ConnectionManager_H__
+#define _ConnectionManager_H__
+
+#include <string>
+// enet library for networking support
+#include <enet/enet.h>
+
+#include "NetworkPrereqs.h"
+#include "PacketBuffer.h"
+#include "PacketManager.h"
+
+namespace std
+{
+  bool operator<(ENetAddress a, ENetAddress b);
+}
+
+namespace network
+{
+#define NETWORK_PORT 55556
+#define NETWORK_MAX_CONNECTIONS 50
+#define NETWORK_WAIT_TIMEOUT 5000
+#define NETWORK_SEND_WAIT 5
+
+  struct ClientList{
+    ENetEvent *event;
+    int ID;
+    ClientList *next;
+  };
+
+  class ConnectionManager{
+  public:
+    ConnectionManager(ClientInformation *head);
+    ConnectionManager(int port, const char *address, ClientInformation *head);
+    ConnectionManager(int port, std::string address, ClientInformation *head);
+    ENetPacket *getPacket(ENetAddress &address); // thread1
+    ENetPacket *getPacket(int &clientID);
+    bool queueEmpty();
+    void createListener();
+    bool quitListener();
+    bool addPacket(ENetPacket *packet, ENetPeer *peer);
+    bool addPacket(ENetPacket *packet, int ID);
+    bool addPacketAll(ENetPacket *packet);
+    bool sendPackets(ENetEvent *event);
+    bool sendPackets();
+  private:
+    bool clientDisconnect(ENetPeer *peer);
+    //bool clientDisconnect(ENetPeer peer);
+    bool processData(ENetEvent *event);
+    bool addClient(ENetEvent *event);
+    void receiverThread();
+    void disconnectClients();
+    int getClientID(ENetPeer peer);
+    int getClientID(ENetAddress address);
+    void syncClassid(int clientID);
+    ENetPeer *getClientPeer(int clientID);
+    PacketBuffer buffer;
+    PacketGenerator packet_gen;
+
+    ENetHost *server;
+    ENetAddress bindAddress;
+
+    bool quit; // quit-variable (communication with threads)
+    ClientInformation *head_;
+  };
+
+
+
+
+
+
+
+
+}
+
+#endif /* _ConnectionManager_H__ */
Index: /code/branches/network/src/network/GameStateClient.cc
===================================================================
--- /code/branches/network/src/network/GameStateClient.cc	(revision 861)
+++ /code/branches/network/src/network/GameStateClient.cc	(revision 861)
@@ -0,0 +1,184 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+#include <zlib.h>
+
+#include "core/CoreIncludes.h"
+#include "Synchronisable.h"
+#include "GameStateClient.h"
+
+namespace network
+{
+  GameStateClient::GameStateClient() {
+  }
+
+  GameStateClient::~GameStateClient() {
+  }
+
+  bool GameStateClient::pushGameState(GameStateCompressed *compstate) {
+    if(compstate->diffed)
+      return loadSnapshot(decode(reference, *compstate));
+    else
+      return loadSnapshot(decode(*compstate));
+  }
+
+  /**
+  * This function removes a Synchronisable out of the universe
+  * @param it iterator of the list pointing to the object
+  * @return iterator pointing to the next object in the list
+  */
+  void GameStateClient::removeObject(orxonox::Iterator<Synchronisable> &it) {
+    orxonox::Iterator<Synchronisable> temp=it;
+    ++it;
+    delete  *temp;
+  }
+
+  /**
+  * This function loads a Snapshort of the gamestate into the universe
+  * @param state a GameState struct containing the size of the gamestate and a pointer linking to a flat list (returned by getSnapshot)
+  */
+  bool GameStateClient::loadSnapshot(GameState state) {
+    unsigned char *data=state.data;
+    std::cout << "loadSnapshot: loading gs: " << state.id << std::endl;
+    // get the start of the Synchronisable list
+    orxonox::Iterator<Synchronisable> it=orxonox::ObjectList<Synchronisable>::start();
+    syncData sync;
+    // loop as long as we have some data ;)
+    while(data < state.data+state.size){
+      // prepare the syncData struct
+      sync.length = (int)*data;
+      data+=sizeof(int);
+      sync.objectID = (int)*data;
+      data+=sizeof(int);
+      sync.classID = (int)*data;
+      data+=sizeof(int);
+      sync.data = data;
+      data+=sync.length;
+
+      if(it->objectID!=sync.objectID){
+        // bad luck ;)
+        // delete the synchronisable (obviously seems to be deleted on the server)
+        while(it != 0 && it->objectID!=sync.objectID){
+          removeObject(it);
+        }
+        if(it==0){
+          std::cout << "classid: " << sync.classID << ", name: " << ID(sync.classID)->getName() << std::endl;
+          Synchronisable *no = (Synchronisable*)(ID(sync.classID)->fabricate());
+          no->objectID=sync.objectID;
+          no->classID=sync.classID;
+          it=orxonox::ObjectList<Synchronisable>::end();
+          // update data and create object/entity...
+          if( !no->updateData(sync) && !no->create() )
+            COUT(0) << "We couldn't create/update the object: " << sync.objectID << std::endl;
+          ++it;
+        }
+      } else {
+        // we have our object
+        if(! it->updateData(sync))
+          std::cout << "We couldn't update objectID: " \
+          << sync.objectID << "; classID: " << sync.classID << std::endl;
+      }
+      ++it;
+    }
+
+    return true;
+  }
+
+  GameState GameStateClient::diff(GameState a, GameState b) {
+    unsigned char *ap = a.data, *bp = b.data;
+    int of=0; // pointers offset
+    int dest_length=0;
+    if(a.size>=b.size)
+      dest_length=a.size;
+    else
+      dest_length=b.size;
+    unsigned char *dp = (unsigned char *)malloc(dest_length*sizeof(unsigned char));
+    while(of<a.size && of<b.size){
+      *(dp+of)=*(ap+of)^*(bp+of); // do the xor
+      ++of;
+    }
+    if(a.size!=b.size){ // do we have to fill up ?
+      unsigned char n=0;
+      if(a.size<b.size){
+        while(of<dest_length){
+          *(dp+of)=n^*(bp+of);
+          of++;
+        }
+      } else{
+        while(of<dest_length){
+          *(dp+of)=*(ap+of)^n;
+          of++;
+        }
+      }
+    }
+    // should be finished now
+    // FIXME: is it true or false now? (struct has changed, producing warnings)
+    GameState r = {b.id, dest_length, true, dp};
+    return r;
+  }
+
+  GameState GameStateClient::decompress(GameStateCompressed a) {
+    int normsize = a.normsize;
+    int compsize = a.compsize;
+    int bufsize;
+    if(normsize < compsize)
+      bufsize = compsize;
+    else
+      bufsize = normsize;
+    unsigned char* dest = (unsigned char*)malloc( bufsize );
+    int retval;
+    uLongf length=normsize;
+    //std::cout << "gamestateclient" << std::endl;
+    //std::cout << "normsize " << a.normsize << " compsize " << a.compsize << " " << bufsize << std::endl;
+    retval = uncompress( dest, &length, a.data, (uLong)compsize );
+    //std::cout << "length " << length << std::endl;
+    switch ( retval ) {
+      case Z_OK: std::cout << "successfully decompressed" << std::endl; break;
+      case Z_MEM_ERROR: std::cout << "not enough memory available" << std::endl; break;
+      case Z_BUF_ERROR: std::cout << "not enough memory available in the buffer" << std::endl; break;
+      case Z_DATA_ERROR: std::cout << "data corrupted" << std::endl; break;
+    }
+
+    GameState gamestate;
+    gamestate.id = a.id;
+    gamestate.size = normsize;
+    gamestate.data = dest;
+    gamestate.diffed = a.diffed;
+
+    return gamestate;
+  }
+
+  GameState GameStateClient::decode(GameState a, GameStateCompressed x) {
+    GameState t = decompress(x);
+    return diff(a, t);
+  }
+
+  GameState GameStateClient::decode(GameStateCompressed x) {
+    GameState t = decompress(x);
+    return t;
+  }
+
+}
Index: /code/branches/network/src/network/GameStateClient.h
===================================================================
--- /code/branches/network/src/network/GameStateClient.h	(revision 861)
+++ /code/branches/network/src/network/GameStateClient.h	(revision 861)
@@ -0,0 +1,39 @@
+//
+// C++ Interface: GameStateClient
+//
+// Description:
+//
+//
+// Author:  <>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef _GameStateClient_H__
+#define _GameStateClient_H__
+
+#include "NetworkPrereqs.h"
+#include "GameStateManager.h"
+
+namespace network
+{
+  class GameStateClient
+  {
+  public:
+    GameStateClient();
+    ~GameStateClient();
+    bool pushGameState(GameStateCompressed *compstate);
+  private:
+    bool loadSnapshot(GameState state);
+    GameState diff(GameState a, GameState b);
+    GameState decompress(GameStateCompressed a);
+    GameState decode(GameState a, GameStateCompressed x);
+    GameState decode(GameStateCompressed x);
+    void removeObject(orxonox::Iterator<Synchronisable> &it);
+
+    GameState reference;
+  };
+
+}
+
+#endif /* _GameStateClient_H__ */
Index: /code/branches/network/src/network/GameStateManager.cc
===================================================================
--- /code/branches/network/src/network/GameStateManager.cc	(revision 861)
+++ /code/branches/network/src/network/GameStateManager.cc	(revision 861)
@@ -0,0 +1,243 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// C++ Implementation: GameStateManager
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include <utility>
+#include <iostream>
+#include <zlib.h>
+
+#include "core/CoreIncludes.h"
+#include "ClientInformation.h"
+#include "Synchronisable.h"
+#include "GameStateManager.h"
+
+namespace network
+{
+  GameStateManager::GameStateManager(ClientInformation *head) {
+    id=0;
+    head_=head;
+  }
+
+  GameStateManager::~GameStateManager() {
+  }
+
+  void GameStateManager::update(){
+    reference = getSnapshot(id);
+    gameStateMap.insert(std::pair<int, GameState*>(id, reference));
+    gameStateUsed[id]=0;
+    ++id;
+    return;
+  }
+
+  GameStateCompressed GameStateManager::popGameState(int clientID) {
+    int gID = head_->findClient(clientID)->getGamestateID();
+    std::cout << "popgamestate: sending gstate id: " << id << "diffed from: " << gID << std::endl;
+    if(gID!=GAMESTATEID_INITIAL){
+      GameState *client = gameStateMap[gID];
+      GameState *server = reference;
+      //head_->findClient(clientID)->setGamestateID(id);
+      return encode(client, server);
+    } else {
+      GameState *server = reference;
+      //head_->findClient(clientID)->setGamestateID(id);
+      return encode(server);
+      // return an undiffed gamestate and set appropriate flags
+    }
+  }
+
+  /**
+  * This function goes through the whole list of synchronisables and
+  * saves all the synchronisables to a flat "list".
+  * @return struct of type gamestate containing the size of the whole gamestate and a pointer linking to the flat list
+  */
+  GameState *GameStateManager::getSnapshot(int id)
+  {
+    //the size of the gamestate
+    int totalsize=0;
+    int memsize=1000;
+    //the size of one specific synchronisable
+    int tempsize=0;
+    // get the start of the Synchronisable list
+    orxonox::Iterator<Synchronisable> it;
+    // struct for return value of Synchronisable::getData()
+    syncData sync;
+
+    GameState *retval=new GameState; //return value
+    retval->id=id++;
+    std::cout << "producing gamestate with id: " << retval->id << std::endl;
+    // reserve a little memory and increase it later on
+    //COUT(2) << "mallocing" << std::endl;
+    retval->data = (unsigned char*)malloc(memsize);
+    //COUT(2) << "malloced" << std::endl;
+
+    // offset of memory functions
+    int offset=0;
+    // go through all Synchronisables
+    for(it = orxonox::ObjectList<Synchronisable>::start(); it != 0; ++it){
+      //std::cout << "gamestatemanager: in for loop" << std::endl;
+      //get size of the synchronisable
+      tempsize=it->getSize();
+      //std::cout << "size of temp gamestate: " << tempsize << std::endl;
+      //COUT(2) << "size of synchronisable: " << tempsize << std::endl;
+      // add place for data and 3 ints (length,classid,objectid)
+      totalsize+=tempsize+3*sizeof(int);
+      //std::cout << "totalsize: " << totalsize << std::endl;
+      // allocate additional space
+      if(totalsize+tempsize>memsize){
+        if(tempsize<1000){
+          retval->data = (unsigned char *)realloc((void *)retval->data, totalsize+1000);
+          memsize+=1000;
+        } else {
+          retval->data = (unsigned char *)realloc((void *)retval->data, totalsize+1000);
+          memsize+=tempsize+1000;
+        }
+      }
+
+      // run Synchronisable::getData with offset and additional place for 3 ints in between (for ids and length)
+      sync=it->getData((retval->data)+offset+3*sizeof(int));
+      *(retval->data+offset)=sync.length;
+      *(retval->data+offset+sizeof(int))=sync.objectID;
+      *(retval->data+offset+2*sizeof(int))=sync.classID;
+      // increase data pointer
+      offset+=tempsize+3*sizeof(int);
+    }
+    retval->size=totalsize;
+    return retval;
+  }
+
+  GameStateCompressed GameStateManager::encode(GameState *a, GameState *b) {
+    //GameState r = diff(a,b);
+    //r.diffed = true;
+    GameState r = *b;
+    r.diffed = false;
+    return compress_(&r);
+  }
+
+  GameStateCompressed GameStateManager::encode(GameState *a) {
+    a->diffed=false;
+    return compress_(a);
+  }
+
+  GameState GameStateManager::diff(GameState *a, GameState *b) {
+    unsigned char *ap = a->data, *bp = b->data;
+    int of=0; // pointers offset
+    int dest_length=0;
+    if(a->size>=b->size)
+      dest_length=a->size;
+    else
+      dest_length=b->size;
+    unsigned char *dp = (unsigned char *)malloc(dest_length*sizeof(unsigned char));
+    while(of<a->size && of<b->size){
+      *(dp+of)=*(ap+of)^*(bp+of); // do the xor
+      ++of;
+    }
+    if(a->size!=b->size){ // do we have to fill up ?
+      unsigned char n=0;
+      if(a->size<b->size){
+        while(of<dest_length){
+          *(dp+of)=n^*(bp+of);
+          of++;
+        }
+      } else{
+        while(of<dest_length){
+          *(dp+of)=*(ap+of)^n;
+          of++;
+        }
+      }
+    }
+    // should be finished now
+    // FIXME: is it true or false now? (struct has changed, producing warnings)
+    GameState r = {b->id, dest_length, true, dp};
+    return r;
+  }
+
+  GameStateCompressed GameStateManager::compress_(GameState *a) {
+    //COUT(2) << "compressing gamestate" << std::endl;
+    int size = a->size;
+    uLongf buffer = (uLongf)((a->size + 12)*1.01)+1;
+    unsigned char* dest = (unsigned char*)malloc( buffer );
+    int retval;
+    //std::cout << "before ziped " << buffer << std::endl;
+    retval = compress( dest, &buffer, a->data, (uLong)size );
+    //std::cout << "after ziped " << buffer << std::endl;
+
+    switch ( retval ) {
+      case Z_OK: std::cout << "successfully compressed" << std::endl; break;
+      case Z_MEM_ERROR: std::cout << "not enough memory available" << std::endl; break;
+      case Z_BUF_ERROR: std::cout << "not enough memory available in the buffer" << std::endl; break;
+      case Z_DATA_ERROR: std::cout << "decompress: data corrupted" << std::endl; break;
+    }
+
+    GameStateCompressed compressedGamestate;
+    compressedGamestate.compsize = buffer;
+    //std::cout << "compressedGamestate.compsize = buffer; " << buffer << std::endl;
+    compressedGamestate.normsize = size;
+    //std::cout << "compressedGamestate.normsize = size; " << size << std::endl;
+    compressedGamestate.id = a->id;
+    compressedGamestate.data = dest;
+    compressedGamestate.diffed = a->diffed;
+
+    return compressedGamestate;
+  }
+
+  void GameStateManager::ackGameState(int clientID, int gamestateID) {
+    ClientInformation *temp = head_->findClient(clientID);
+    int curid = temp->getID();
+    // decrease usage of gamestate and save it
+    deleteUnusedGameState(curid);
+    //increase gamestateused
+    ++gameStateUsed.find(gamestateID)->second;
+    temp->setGamestateID(gamestateID);
+    /*
+    GameState *old = clientGameState[clientID];
+    deleteUnusedGameState(old);
+    clientGameState[clientID]=idGameState[gamestateID];*/
+  }
+
+  bool GameStateManager::deleteUnusedGameState(int gamestateID) {
+    int used = --(gameStateUsed.find(gamestateID)->second);
+    if(id-gamestateID>KEEP_GAMESTATES && used==0){
+      // delete gamestate
+      delete gameStateMap.find(gamestateID)->second;
+      gameStateMap.erase(gamestateID);
+      return true;
+    }
+    return false;
+  }
+
+}
Index: /code/branches/network/src/network/GameStateManager.h
===================================================================
--- /code/branches/network/src/network/GameStateManager.h	(revision 861)
+++ /code/branches/network/src/network/GameStateManager.h	(revision 861)
@@ -0,0 +1,64 @@
+//
+// C++ Interface: GameStateManager
+//
+// Description: 
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef _GameStateManager_H__
+#define _GameStateManager_H__
+
+#include <map>
+
+#include "NetworkPrereqs.h"
+#include "PacketTypes.h"
+
+namespace network
+{
+
+#define KEEP_GAMESTATES 20
+
+  /**
+  * This Class implements a manager for gamestates:
+  * - creating snapshots of gamestates
+  * - writing gamestates to universe
+  * - diffing gamestates ?
+  * 
+  * EN/DECODATION:
+  * a: last Gamestate a client has received
+  * b: new Gamestate
+  * x: diffed and compressed gamestate
+  * x=(a^b)
+  * b=(a^x)
+  * diff(a,diff(a,x))=x (hope this is correct)
+  * @author Oliver Scheuss
+  */
+  class GameStateManager{
+  public:
+    GameStateManager(ClientInformation *head);
+    ~GameStateManager();
+    void update();
+    GameStateCompressed popGameState(int clientID);
+    void ackGameState(int clientID, int gamestateID);
+    int id;
+  private:
+    GameState *getSnapshot(int id);
+    GameStateCompressed encode(GameState *a, GameState *b);
+    GameStateCompressed encode(GameState *a);
+    GameState diff(GameState *a, GameState *b);
+    GameStateCompressed compress_(GameState *a);
+    bool deleteUnusedGameState(int gamestateID);
+
+    std::map<int, GameState*> gameStateMap; //map gsID to gamestate*
+    std::map<int, int> gameStateUsed; // save the number of clients, that use the specific gamestate
+    GameState *reference;
+    ClientInformation *head_;
+  };
+
+}
+
+#endif /* _GameStateManager_H__ */
Index: /code/branches/network/src/network/Makefile.norm
===================================================================
--- /code/branches/network/src/network/Makefile.norm	(revision 861)
+++ /code/branches/network/src/network/Makefile.norm	(revision 861)
@@ -0,0 +1,40 @@
+CC=g++
+MAIN_INC=..
+INC=-I ${MAIN_INC}
+
+all: server client
+
+# Link command:
+server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o
+	${CC} PacketDecoder.o PacketGenerator.o ConnectionManager.o dummyserver.o PacketBuffer.o -o server -lenet -lboost_thread -g
+
+dummyserver.o: dummyserver.cc
+	${CC} -c dummyserver.cc -o dummyserver.o -g ${INC}
+# Compilation commands:
+ConnectionManager.o: ConnectionManager.cc ConnectionManager.h
+	${CC} -c ConnectionManager.cc -o ConnectionManager.o -g ${INC}
+ClientConnection.o: ClientConnection.cc ClientConnection.h
+	${CC} -c ClientConnection.cc -o ClientConnection.o -g ${INC}
+
+PacketBuffer.o: PacketBuffer.cc
+	${CC} -c PacketBuffer.cc -o PacketBuffer.o -g ${INC}
+PacketGenerator.o: PacketGenerator.cc
+	${CC} -c PacketGenerator.cc -o PacketGenerator.o -g ${INC}
+PacketDecoder.o: PacketDecoder.cc
+	${CC} -c PacketDecoder.cc -o PacketDecoder.o -g ${INC}
+Client.o: Client.cc
+	${CC} -c Client.cc -g ${INC}
+Server.o: Server.cc
+	${CC} -c Server.cc -g ${INC}
+Synchronisable.o: Synchronisable.cc
+	${CC} -c Synchronisable.cc -g ${INC}
+GameStateManager.o: GameStateManager.cc
+	${CC} -c GameStateManager.cc -g ${INC}
+
+clean:
+	rm -rf *.o
+
+client_old: PacketGenerator.o dummyclient.cc
+	${CC} dummyclient.cc PacketGenerator.o -o client -lenet -g ${INC}
+client: PacketGenerator.o ClientConnection.o PacketBuffer.o dummyclient2.cc 
+	${CC} dummyclient2.cc PacketGenerator.o PacketBuffer.o ClientConnection.o -o client -lenet -lboost_thread -g ${INC}
Index: /code/branches/network/src/network/Makefile.tardis
===================================================================
--- /code/branches/network/src/network/Makefile.tardis	(revision 861)
+++ /code/branches/network/src/network/Makefile.tardis	(revision 861)
@@ -0,0 +1,39 @@
+all: server client
+
+CC=g++-4.1.1
+
+BOOST_INC=/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/include/boost-1_34_1/
+BOOST_LIB=/usr/pack/boost-1.34.1-sd/i686-debian-linux3.1/lib/
+MAIN_INC=..
+ENET_INC=/usr/pack/enet-2007-sd/include/
+ENET_LIB=/usr/pack/enet-2007-sd/i686-debian-linux3.1/lib/
+INC=-I ${BOOST_INC} -I ${MAIN_INC} -I ${ENET_INC}
+LIB=-L ${BOOST_LIB} -L ${ENET_LIB}
+
+# Link command:
+server: clean PacketBuffer.o ConnectionManager.o dummyserver.o PacketGenerator.o PacketDecoder.o
+	${CC} ConnectionManager.o dummyserver.o PacketBuffer.o PacketDecoder.o PacketGenerator.o -o server -lenet -lboost_thread-gcc41-mt -g ${INC} ${LIB} -Wl,-rpath,${BOOST_LIB} -Wl,-rpath,${ENET_LIB}
+
+dummyserver.o:
+	${CC} -c dummyserver.cc -o dummyserver.o -g ${INC}
+# Compilation commands:
+
+ConnectionManager.o:
+	${CC} -c ConnectionManager.cc -o ConnectionManager.o -g ${INC}
+
+PacketBuffer.o: 
+	${CC} -c PacketBuffer.cc -o PacketBuffer.o -g ${INC}
+PacketGenerator.o: PacketGenerator.cc
+	${CC} -c PacketGenerator.cc -o PacketGenerator.o -g ${INC}
+PacketDecoder.o: PacketDecoder.cc
+	${CC} -c PacketDecoder.cc -o PacketDecoder.o -g ${INC}
+Synchronisable.o: Synchronisable.cc
+	${CC} -c Synchronisable.cc -g ${INC}
+GameStateManager.o: GameStateManager.cc
+	${CC} -c GameStateManager.cc -g ${INC}
+
+clean:
+	rm -rf *.o
+
+client: dummyclient.cc PacketDecoder.o PacketGenerator.o
+	${CC} PacketGenerator.o PacketDecoder.o dummyclient.cc -o client -lenet ${LIB} ${INC} -Wl,-rpath,${BOOST_LIB}
Index: /code/branches/network/src/network/Makefile.test
===================================================================
--- /code/branches/network/src/network/Makefile.test	(revision 861)
+++ /code/branches/network/src/network/Makefile.test	(revision 861)
@@ -0,0 +1,45 @@
+CC=g++
+MAIN_INC=..
+INC=-I ${MAIN_INC} -I..
+
+all: server client
+
+# Link command:
+server: PacketBuffer.o ConnectionManager.o dummyserver.o PacketDecoder.o PacketGenerator.o ClientInformation.o
+	${CC} PacketDecoder.o PacketGenerator.o ClientInformation.o ConnectionManager.o dummyserver.o PacketBuffer.o -o server -lenet -lboost_thread -g
+
+dummyserver.o: dummyserver.cc
+	${CC} -c dummyserver.cc -o dummyserver.o -g ${INC}
+# Compilation commands:
+ConnectionManager.o: ConnectionManager.cc ConnectionManager.h
+	${CC} -c ConnectionManager.cc -o ConnectionManager.o -g ${INC}
+ClientConnection.o: ClientConnection.cc ClientConnection.h
+	${CC} -c ClientConnection.cc -o ClientConnection.o -g ${INC}
+
+PacketBuffer.o: PacketBuffer.cc
+	${CC} -c PacketBuffer.cc -o PacketBuffer.o -g ${INC}
+PacketGenerator.o: PacketGenerator.cc
+	${CC} -c PacketGenerator.cc -o PacketGenerator.o -g ${INC}
+PacketDecoder.o: PacketDecoder.cc
+	${CC} -c PacketDecoder.cc -o PacketDecoder.o -g ${INC}
+Client.o: Client.cc
+	${CC} -c Client.cc -g ${INC}
+Server.o: Server.cc
+	${CC} -c Server.cc -g ${INC}
+Synchronisable.o: Synchronisable.cc
+	${CC} -c Synchronisable.cc -g ${INC}
+GameStateManager.o: GameStateManager.cc
+	${CC} -c GameStateManager.cc -g ${INC}
+ClientInformation.o: ClientInformation.cc
+	${CC} -c ClientInformation.cc -g ${INC}
+
+clean:
+	rm -rf *.o
+
+client_old: PacketGenerator.o dummyclient.cc
+	${CC} dummyclient.cc PacketGenerator.o -o client -lenet -g ${INC}
+client: PacketGenerator.o ClientConnection.o PacketBuffer.o dummyclient2.cc 
+	${CC} dummyclient2.cc PacketGenerator.o PacketBuffer.o ClientConnection.o -o client -lenet -lboost_thread -g ${INC}
+
+chatserver: Server.o ConnectionManager.o PacketGenerator.o PacketDecoder.o PacketBuffer.o ClientInformation.o GameStateManager.o
+	${CC} dummyserver3.cc Server.o ConnectionManager.o PacketGenerator.o PacketBuffer.o GameStateManager.o ClientInformation.o -o chatserver -lenet -lboost_thread -g ${INC}
Index: /code/branches/network/src/network/NetworkFrameListener.h
===================================================================
--- /code/branches/network/src/network/NetworkFrameListener.h	(revision 861)
+++ /code/branches/network/src/network/NetworkFrameListener.h	(revision 861)
@@ -0,0 +1,49 @@
+//
+// C++ Interface: NetworkFrameListener
+//
+// Description: 
+//
+//
+// Author:  <>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef _NetworkFrameListener_H__
+#define _NetworkFrameListener_H__
+
+#include <OgreFrameListener.h>
+
+#include "NetworkPrereqs.h"
+#include "Server.h"
+#include "Client.h"
+
+network::Server *server_g;
+network::Client *client_g;
+
+namespace network
+{
+  class ServerFrameListener : public Ogre::FrameListener{
+  private:
+    bool frameStarted(const Ogre::FrameEvent &evt){
+      server_g->tick(evt.timeSinceLastFrame);
+      return FrameListener::frameStarted(evt);
+    }
+  };
+
+  class ClientFrameListener : public Ogre::FrameListener{
+  private:
+    bool frameStarted(const Ogre::FrameEvent &evt){
+      //std::cout << "framelistener" << std::endl;
+      client_g->tick(evt.timeSinceLastFrame);
+      return FrameListener::frameStarted(evt);
+    }
+  };
+
+
+
+
+}
+
+#endif /* _NetworkFrameListener_H__ */
Index: /code/branches/network/src/network/NetworkPrereqs.h
===================================================================
--- /code/branches/network/src/network/NetworkPrereqs.h	(revision 861)
+++ /code/branches/network/src/network/NetworkPrereqs.h	(revision 861)
@@ -0,0 +1,90 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  NetworkPrereqs.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _NetworkPrereqs_H__
+#define _NetworkPrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( NETWORK_STATIC_BUILD )
+#  ifdef NETWORK_SHARED_BUILD
+#    define _NetworkExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _NetworkExport
+#    else
+#      define _NetworkExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _NetworkExport  __attribute__ ((visibility("default")))
+#else
+#  define _NetworkExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+namespace network
+{
+  class Client;
+  class ClientConnection;
+  class ClientFrameListener;
+  class ClientInformation;
+  class ConnectionManager;
+  class GameStateClient;
+  class GameStateManager;
+  class PacketBuffer;
+  class PacketDecoder;
+  class PacketGenerator;
+  class Server;
+  class ServerFrameListener;
+  class Synchronisable;
+  struct ack;
+  struct chat;
+  struct classid;
+  struct ClientList;
+  struct GameState;
+  struct GameStateCompressed;
+  struct keyboard;
+  struct mouse;
+  struct PacketEnvelope;
+  struct QueueItem;
+  struct synchData;
+  struct synchronisableVariable;
+}
+
+#endif /* _NetworkPrereqs_H__ */
Index: /code/branches/network/src/network/PacketBuffer.cc
===================================================================
--- /code/branches/network/src/network/PacketBuffer.cc	(revision 861)
+++ /code/branches/network/src/network/PacketBuffer.cc	(revision 861)
@@ -0,0 +1,136 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+// C++ PacketBuffer
+// d
+// Author Oliver Scheuss
+
+#include <iostream>
+#include <queue>
+#include <string>
+#include <boost/bind.hpp>
+#include <boost/thread/mutex.hpp>
+
+#include "PacketBuffer.h"
+
+namespace network
+{
+  boost::mutex networkPacketBufferMutex;
+
+  PacketBuffer::PacketBuffer() {
+    closed=false;
+    first=NULL;
+    last=NULL;
+  }
+  //this is needed in order to make the packetbuffer threadsafe
+
+
+  bool PacketBuffer::push(ENetEvent *ev) {
+    boost::mutex::scoped_lock lock(networkPacketBufferMutex);
+    //std::cout << "event size inside packetbuffer " << ev->packet->dataLength << std::endl;
+    //   if(closed)
+    //     return false;
+    // first element?
+    if(first==NULL){
+      first=new QueueItem;
+      last=first;
+      last->next=NULL;
+      // change this!!!!!!!
+      last->packet = ev->packet;
+      last->address = ev->peer->address;
+    } else {
+      //insert a new element at the bottom
+      last->next = new QueueItem;
+      last=last->next;
+      // initialize last->next
+      last->next=NULL;
+      // save the packet to the new element
+      last->packet = ev->packet;
+      last->address = ev->peer->address;
+    }
+    return true;
+  }
+
+  ENetPacket *PacketBuffer::pop() {
+    boost::mutex::scoped_lock lock(networkPacketBufferMutex);
+    //std::cout << "packetbuffer pop" << std::endl;
+    if(first!=NULL /*&& !closed*/){
+      QueueItem *temp = first;
+      // get packet
+      ENetPacket *pck=first->packet;
+      // remove first element
+      first = first->next;
+      delete temp;
+      //std::cout << "pop size of packet " << pck->dataLength << std::endl;
+      return pck;
+    } else{
+      //std::cout << "nothing to return" << std::endl;
+      return NULL;
+    }
+  }
+
+  ENetPacket *PacketBuffer::pop(ENetAddress &address) {
+    boost::mutex::scoped_lock lock(networkPacketBufferMutex);
+    //std::cout << "packetbuffer pop(address)" << std::endl;
+    if(first!=NULL /*&& !closed*/){
+      QueueItem *temp = first;
+      // get packet
+      ENetPacket *pck=first->packet;
+      address = first->address;
+      // remove first element
+      first = first->next;
+      delete temp;
+      //std::cout << "pop(address) size of packet " << pck->dataLength << std::endl;
+      return pck;
+    } else{
+      return NULL;
+    }
+  }
+
+  bool PacketBuffer::isEmpty() {
+    return (first==NULL);
+  }
+
+  void PacketBuffer::print() {
+    QueueItem *temp=first;
+    while(temp!=NULL){
+      //    std::cout << temp->packet->data << std::endl;
+      temp=temp->next;
+    }
+
+  }
+
+  bool PacketBuffer::isClosed() {
+    return closed;
+  }
+
+  void PacketBuffer::setClosed(bool value){
+    closed=value;
+    return;
+  }
+
+} // namespace network
Index: /code/branches/network/src/network/PacketBuffer.h
===================================================================
--- /code/branches/network/src/network/PacketBuffer.h	(revision 861)
+++ /code/branches/network/src/network/PacketBuffer.h	(revision 861)
@@ -0,0 +1,54 @@
+//
+// C++ Interface: PacketBuffer
+//
+// Description: 
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef _PacketBuffer_H__ 
+#define _PacketBuffer_H__
+
+#include <enet/enet.h>
+
+#include "NetworkPrereqs.h"
+
+namespace network
+{
+  struct PacketEnvelope{
+    int length;
+    int data;
+  };
+
+  struct QueueItem{
+    ENetPacket *packet;
+    ENetAddress address;
+    QueueItem *next;
+  };
+
+  class PacketBuffer{
+  public:
+    PacketBuffer();
+    bool isEmpty();
+    bool isClosed();
+    void setClosed(bool value);
+    void print();
+    // pops a packet from the queue
+    ENetPacket *pop();
+    ENetPacket *pop(ENetAddress &address);
+    // pushs a packet to the queue
+    bool push(ENetEvent *ev);
+
+  private:
+    QueueItem *first;
+    QueueItem *last;
+    bool closed;
+
+  };
+
+} //namespace
+#endif /* _PacketBuffer_H__ */
Index: /code/branches/network/src/network/PacketBufferTestExt.cc
===================================================================
--- /code/branches/network/src/network/PacketBufferTestExt.cc	(revision 861)
+++ /code/branches/network/src/network/PacketBufferTestExt.cc	(revision 861)
@@ -0,0 +1,81 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+#include <string>
+#include <iostream>
+#include <enet/enet.h>
+#include <boost/thread/thread.hpp>
+
+#include "util/Sleep.h"
+#include "PacketBuffer.h"
+#include "PacketBuffer.cc"
+
+using namespace network;
+
+void write(PacketBuffer *test){
+  ENetEvent event;
+  ENetPacket *packet;
+  if(test->isEmpty())
+    std::cout << "empty buffer" << std::endl;
+  for(int i=0; i<10; i++){
+    std::string temp = "packet ";
+    packet = enet_packet_create("packet", strlen("packet ")+1,
+      ENET_PACKET_FLAG_RELIABLE);
+    std::cout << i << ": pushing " << packet->data << std::endl;
+    event.packet=packet;
+    test->push(&event);
+    if(i==5)
+      usleep(200000);
+  }
+  test->setClosed(true);
+  return;
+}
+
+void read(PacketBuffer *test){
+  //test->print();
+  // exit if the queue is closed and empty
+  while(!test->isClosed() || !test->isEmpty()){
+    // only pop if the queue isn't empty
+    while(!test->isEmpty()){
+      std::cout << "We popped the value " << test->pop()->data << std::endl;
+    }
+  }
+  return;
+}
+
+
+int main(int argc, char **argv[]){
+  PacketBuffer test = PacketBuffer();
+  boost::thread thrd1(boost::bind(&write, &test));
+  boost::thread thrd2(boost::bind(&read, &test));
+
+  thrd1.join();
+  thrd2.join();
+
+  return 0;
+}
+
Index: /code/branches/network/src/network/PacketDecoder.cc
===================================================================
--- /code/branches/network/src/network/PacketDecoder.cc	(revision 861)
+++ /code/branches/network/src/network/PacketDecoder.cc	(revision 861)
@@ -0,0 +1,263 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Dumeni Manatschal, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+/*
+* Class contains functions to determine and decode incomming packages
+* ->don't read this without the class PacketGenerator, since they belong together
+*
+* Autor: Dumeni Manatschal
+*
+*/
+
+#include <iostream>
+
+#include "PacketTypes.h"
+#include "PacketManager.h"
+
+namespace network
+{
+  using namespace std;
+
+  PacketDecoder::PacketDecoder(){}
+
+  PacketDecoder::~PacketDecoder(){}
+
+  //call this function out of an instance of PacketDecoder
+  //it will determine the type id and call the right decode function
+  bool PacketDecoder::elaborate( ENetPacket* packet, int clientId )
+  {
+    int client = clientId;
+    cout << "clientId: " << client << endl; //control cout, not important, just debugging info
+    int id = (int)*packet->data; //the first 4 bytes are always the enet packet id
+    std::cout << "packet id: " << id << std::endl;
+    std::cout << "packet size inside packetdecoder: " << packet->dataLength << std::endl;
+    switch( id ) {
+  case ACK:
+    acknowledgement( packet, clientId );
+    return true;
+    break;
+  case MOUSE:
+    mousem( packet, clientId );
+    return true;
+    break;
+  case KEYBOARD:
+    keystrike( packet, clientId );
+    return true;
+    break;
+  case CHAT:
+    chatMessage( packet, clientId );
+    return true;
+    break;
+  case GAMESTATE:
+    gstate( packet );
+    return true;
+    break;
+  case CLASSID:
+    clid(packet);
+    return true;
+    break;
+    }
+    return false;
+  }
+
+  //following are the decode functions for the data of the packets
+
+  void PacketDecoder::acknowledgement( ENetPacket* packet, int clientId )
+  {
+    ack* a = new ack;
+    *a = *(ack*)packet->data; //press pattern of ack on new data
+
+
+    std::cout << "got ack id: " << a->id << std::endl;
+    processAck( a, clientId ); //debug info
+
+    //clean memory
+    enet_packet_destroy( packet );
+  }
+
+  void PacketDecoder::mousem( ENetPacket* packet, int clientId )
+  {
+    mouse* mouseMove = new mouse;
+    //copy data of packet->data to new struct
+    *mouseMove = *(mouse*)packet->data;
+
+    //clean memory
+    enet_packet_destroy( packet );
+
+    printMouse( mouseMove ); //debug info
+  }
+
+  void PacketDecoder::keystrike( ENetPacket* packet, int clientId )
+  {
+    keyboard* key = new keyboard;
+    *key = *(keyboard*)packet->data; //see above
+
+    //clean memory
+    enet_packet_destroy( packet );
+
+    printKey( key ); //debug info
+
+  }
+
+  void PacketDecoder::chatMessage( ENetPacket* packet, int clientId )
+  {
+    chat* chatting = new chat;
+    chatting->id = (int)*packet->data; //first copy id into new struct
+    //since the chat message is a char*, allocate the memory needed
+    char* reserve = new char[packet->dataLength-4];
+    //copy the transmitted bytestream into the new generated char*,
+    //note the lenght of the message is represented as "packet->dataLength-sizeof( int )"
+    memcpy( &reserve[0], packet->data+sizeof(int), packet->dataLength-sizeof(int) );
+    //put pointer of chatting struct to the begining of the new generated char*
+    chatting->message = reserve;
+
+    //clean memory
+    enet_packet_destroy( packet );
+
+    processChat( chatting, clientId ); //debug info
+  }
+
+  void PacketDecoder::gstate( ENetPacket* packet )
+  {
+    GameStateCompressed* currentState = new GameStateCompressed;
+    //since it's not alowed to use void* for pointer arithmetic
+    unsigned char* data = (unsigned char*)packet->data;
+    //copy the GameStateCompressed id into the struct, which is located at second place data+sizeof( int )
+    //memcpy( (void*)&(currentState->id), (const void*)(data+sizeof( int )), sizeof( int ) );
+    currentState->id = (int)*(data+sizeof(int));
+    std::cout << "id: " << currentState->id << std::endl;
+    //copy the size of the GameStateCompressed compressed data into the new GameStateCompressed struct, located at 3th
+    //position of the data stream, data+2*sizeof( int )
+    memcpy( (void*)&(currentState->compsize), (const void*)(data+2*sizeof( int )), sizeof( int) );
+    //currentState->compsize = (int)*(data+2*sizeof(int));
+    std::cout << "compsize: " << currentState->compsize << std::endl;
+    //size of uncompressed data
+    memcpy( (void*)&(currentState->normsize), (const void*)(data+3*sizeof( int )), sizeof( int ) );
+    //currentState->normsize = (int)*(data+3*sizeof(int));
+    std::cout << "normsize. " << currentState->normsize << std::endl;
+    //since the packetgenerator was changed, due to a new parameter, change this function too
+    memcpy( (void*)&(currentState->diffed), (const void*)(data+4*sizeof(int)), sizeof(bool));
+    //currentState->diffed = (bool)*(data+4*sizeof(int));
+    std::cout << "diffed: " << currentState->diffed << std::endl;
+    //since data is not allocated, because it's just a pointer, allocate it with size of gamestatedatastream
+    currentState->data = (unsigned char*)(malloc( currentState->compsize ));
+    if(currentState->data==NULL)
+      std::cout << "memory leak" << std::endl;
+    //copy the GameStateCompressed data
+    //std::cout << "packet size (enet): " << packet->dataLength << std::endl;
+    //std::cout << "totallen: " << 4*sizeof(int)+sizeof(bool)+currentState->compsize << std::endl;
+    memcpy( (void*)(currentState->data), (const void*)(data+4*sizeof( int ) + sizeof(bool)), currentState->compsize );
+
+    //clean memory
+    enet_packet_destroy( packet );
+    //run processGameStateCompressed
+    //TODO: not yet implemented!
+    processGamestate(currentState);
+  }
+
+  void PacketDecoder::clid( ENetPacket *packet)
+  {
+    classid* cid = new classid;
+    cid->length = ((classid*)(packet->data))->length;
+    cid->id = ((classid *)(packet->data))->id;
+    cid->clid = ((classid *)(packet->data))->clid;
+    cid->message = (const char *)malloc(cid->length);
+    void *data  = (void *)cid->message;
+    memcpy(data, (const void*)(packet->data+3*sizeof(int)), cid->length);
+    std::cout << "classid: " << cid->clid << ", name: " << cid->message << std::endl;
+    enet_packet_destroy( packet );
+    processClassid(cid);
+  }
+
+
+  // now the data processing functions:
+
+  void PacketDecoder::processChat( chat *data, int clientId)
+  {
+    printChat(data, clientId);
+  }
+
+  void PacketDecoder::processGamestate( GameStateCompressed *state )
+  {
+  }
+
+  void PacketDecoder::processClassid( classid *cid)
+  {
+    printClassid(cid);
+    return;
+  }
+
+  void PacketDecoder::processAck( ack *data, int clientID)
+  {
+    printAck(data);
+    return;
+  }
+
+
+  //these are some print functions for test stuff
+
+  void PacketDecoder::printAck( ack* data )
+  {
+    cout << "data id: " << data->id << endl;
+    cout << "data:    " << data->a << endl;
+  }
+
+  void PacketDecoder::printMouse( mouse* data )
+  {
+    cout << "data id: " << data->id << endl;
+    cout << "data:    " << data->x << " " << data->y << endl;
+  }
+
+  void PacketDecoder::printKey( keyboard* data )
+  {
+    cout << "data id: " << data->id << endl;
+    cout << "data:    " << (char)data->press << endl;
+  }
+
+  void PacketDecoder::printChat( chat* data, int clientId )
+  {
+    if(clientId!=CLIENTID_CLIENT)
+      cout << "client: " << clientId << endl;
+    cout << "data id: " << data->id << endl;
+    cout << "data:    " << data->message << endl;
+  }
+
+  void PacketDecoder::printGamestate( GameStateCompressed* data )
+  {
+    cout << "id of GameStateCompressed:   " << data->id << endl;
+    cout << "size of GameStateCompressed: " << data->compsize << endl;
+  }
+
+  void PacketDecoder::printClassid( classid *cid)
+  {
+    cout << "id of classid:    " << cid->id << endl;
+    cout << "size of classid:  " << cid->length << endl;
+    cout << "ID of classid:    " << cid->clid <<endl;
+    cout << "data of classid:  " << cid->message <<endl;
+  }
+
+}
Index: /code/branches/network/src/network/PacketGenerator.cc
===================================================================
--- /code/branches/network/src/network/PacketGenerator.cc	(revision 861)
+++ /code/branches/network/src/network/PacketGenerator.cc	(revision 861)
@@ -0,0 +1,144 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Dumeni Manatschal, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+/*
+* Class generates packets that can be send by enet
+* ->don't read this without the class PacketDecoder, since they belong together
+*
+* Autor: Dumeni Manatschal
+*
+*/
+
+#include <iostream>
+#include <list>
+#include <string>
+#include <cstring>
+
+#include "PacketTypes.h"
+#include "PacketManager.h"
+
+namespace network
+{
+  PacketGenerator::PacketGenerator() { }
+
+  //following functions create a packet in form of bytestream
+
+  ENetPacket* PacketGenerator::acknowledgement( int state, int reliable )
+  {
+    std::cout << "generating new acknowledgement, id: " << state << std::endl;
+    ack* ackreq = new ack;
+    ackreq->id = ACK;
+    ackreq->a = state;
+
+    ENetPacket *packet = enet_packet_create( ackreq , sizeof( *ackreq ), reliable );
+
+    return packet;
+  }
+
+  /*### mouseupdates */
+  ENetPacket* PacketGenerator::mousem( double x, double y, int reliable )
+  {
+    std::cout << "generating new mouse" << std::endl;
+    mouse* mousemove = new mouse;
+    mousemove->id = MOUSE;
+    mousemove->x = x;
+    mousemove->y = y;
+
+    ENetPacket *packet = enet_packet_create( mousemove , sizeof( *mousemove ), reliable );
+
+    return packet;
+  }
+
+  /*### keystrikes updates */
+  ENetPacket* PacketGenerator::keystrike( char press, int reliable )
+  {
+    std::cout << "generating new keyboard" << std::endl;
+    keyboard* key = new keyboard;
+    key->id = KEYBOARD;
+    key->press = press;
+
+    ENetPacket *packet = enet_packet_create( key , sizeof( *key ), reliable );
+
+    return packet;
+  }
+
+  /*### chat messages packet */
+  ENetPacket* PacketGenerator::chatMessage( const char* message, int reliable )
+  {
+    int* trans = new int[sizeof(int) + strlen(message) + 1];
+    *trans = CHAT;
+    //be carefull here, don't forget to allocate the space before using it ;-)
+    memcpy( &trans[1], (const void*)message, strlen( message ) + 1);
+    ENetPacket *packet = enet_packet_create( trans , sizeof( int ) + strlen( message ) + 1, reliable );
+
+    return packet;
+  }
+
+  /*### gamestate packet */
+  ENetPacket* PacketGenerator::gstate( GameStateCompressed* states, int reliable )
+  {
+    //std::cout << "packetgenerator" << std::endl;
+    //std::cout << "states->normsize " << states->normsize << std::endl;
+    //std::cout << "states->compsize " << states->compsize << std::endl;
+    int gid = GAMESTATE; //first assign the correct enet id
+    int totalLen = 4*sizeof( int ) + sizeof(bool) + states->compsize; //calculate the total size of the datastream memory
+    //std::cout << "totalLen " << totalLen << std::endl;
+    unsigned char *data = (unsigned char*)malloc( totalLen ); //allocate the memory for datastream
+    memcpy( (void*)(data), (const void*)&gid, sizeof( int ) ); //this is the enet id
+    memcpy( (void*)(data+sizeof(int)), (const void*)&(states->id), sizeof(int) ); //the GameStateCompressed id
+    memcpy( (void*)(data+2*sizeof(int)), (const void*)&(states->compsize), sizeof(int));
+    memcpy( (void*)(data+3*sizeof(int)), (const void*)&(states->normsize), sizeof(int));
+    memcpy( (void*)(data+4*sizeof(int)), (const void*)&(states->diffed), sizeof(bool));
+    /*(int)*(data) = gid;
+    (int)*(data+sizeof(int)) = states->id;
+    //this is the compressed size of the GameStateCompressed data, place at 3th position of the enet datastream
+    (int)*(data+2*sizeof(int)) = states->compsize;
+    //this is the uncompressed size of GameStateCompressed data
+    (int)*(data+3*sizeof(int)) = states->normsize;
+    //since there is a new parameter inside GameStateCompressed, change this function to create packet
+    (bool)*(data+4*sizeof(int)) = states->diffed;*/
+    //place the GameStateCompressed data at the end of the enet datastream
+    memcpy( (void*)(data+4*sizeof( int ) + sizeof(bool)), (const void*)states->data, states->compsize );
+    //create an enet packet with the generated bytestream
+    ENetPacket *packet = enet_packet_create( data , totalLen, reliable );
+    //delete data;
+    return packet;
+  }
+
+  ENetPacket* PacketGenerator::clid( int classid, std::string classname, int reliable )
+  {
+    unsigned char* data = (unsigned char *)malloc(3*sizeof(int)+classname.length()+1);
+    std::cout << "classid: " << classid << ", name: " << classname << std::endl;
+    *(int *)data = CLASSID;
+    *((int *)data+1) = classname.length()+1;
+    *((int *)data+2) = classid;
+    memcpy( (void *)(data+3*sizeof(int)), classname.c_str(), classname.length()+1);
+    ENetPacket *packet = enet_packet_create( data , 3*sizeof(int)+classname.length()+1, reliable );
+    return packet;
+  }
+
+}
Index: /code/branches/network/src/network/PacketManager.h
===================================================================
--- /code/branches/network/src/network/PacketManager.h	(revision 861)
+++ /code/branches/network/src/network/PacketManager.h	(revision 861)
@@ -0,0 +1,80 @@
+#ifndef _PacketManager_H__
+#define _PacketManager_H__
+
+#include <string>
+#include <enet/enet.h>
+
+#include "NetworkPrereqs.h"
+
+#define CLIENTID_CLIENT -1
+
+//enum netowk generally used to set the type ID of a packet
+namespace network
+{
+  /*
+  * class to generate packets
+  * 
+  * @autor: Dumeni Manatschal
+  * 
+  */ 
+  class PacketGenerator
+  {
+  public:
+    PacketGenerator();
+    //call one of this functions out of an instance of PacketGenerator to create a packet
+    ENetPacket* acknowledgement( int state, int reliable = ENET_PACKET_FLAG_RELIABLE );
+    ENetPacket* mousem( double x, double y, int reliable = ENET_PACKET_FLAG_RELIABLE );
+    ENetPacket* keystrike( char press, int reliable = ENET_PACKET_FLAG_RELIABLE );
+    ENetPacket* chatMessage( const char* message, int reliable = ENET_PACKET_FLAG_RELIABLE );
+    ENetPacket* gstate( GameStateCompressed *states, int reliable = ENET_PACKET_FLAG_RELIABLE );
+    ENetPacket* clid( int classid, std::string classname, int reliable = ENET_PACKET_FLAG_RELIABLE );
+  private:
+  };
+
+  /*
+  * class used to decode incoming packets
+  * 
+  * @autor: Dumeni Manatschal
+  * 
+  */
+  class _NetworkExport PacketDecoder
+  {
+  public:
+    PacketDecoder();
+    virtual ~PacketDecoder();
+    //call this function to decode, it calls the right decoding function below
+    bool elaborate( ENetPacket* packet, int clientId );
+  protected:
+
+    virtual void processChat( chat *data, int clientId);
+
+
+  private:
+
+
+
+    void acknowledgement( ENetPacket* packet, int clientId = CLIENTID_CLIENT );
+    void mousem( ENetPacket* packet, int clientId = CLIENTID_CLIENT );
+    void keystrike( ENetPacket* packet, int clientId = CLIENTID_CLIENT );
+    void chatMessage( ENetPacket* packet, int clientId = CLIENTID_CLIENT);
+    void gstate( ENetPacket* packet );
+    void clid( ENetPacket *packet);
+
+    //process data
+    //two functions are note yet implemented!
+    virtual void processGamestate(GameStateCompressed *state);
+    virtual void processAck( ack *data, int clientID);
+    void processClassid( classid *cid);
+    //virtual void processAck( ack *data);
+
+    //print functions
+    void printAck( ack* data );
+    void printMouse( mouse* data );
+    void printKey( keyboard* data );
+    void printChat( chat* data, int clientId );
+    void printGamestate( GameStateCompressed *data );
+    void printClassid( classid *cid);
+  };
+}
+
+#endif /* _PacketManager_H__ */
Index: /code/branches/network/src/network/PacketTypes.h
===================================================================
--- /code/branches/network/src/network/PacketTypes.h	(revision 861)
+++ /code/branches/network/src/network/PacketTypes.h	(revision 861)
@@ -0,0 +1,90 @@
+//
+// C++ Interface: PacketTypes
+//
+// Description:
+//
+//
+// Author:  <>, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef _PacketTypes_H__
+#define _PacketTypes_H__
+
+#include "NetworkPrereqs.h"
+
+namespace network
+{
+  enum packet_id {
+    ACK,
+    MOUSE,
+    KEYBOARD,
+    CHAT,
+    GAMESTATE ,
+    CLASSID
+  };
+
+
+  /**
+  * This struct defines a gamestate:
+  * size: total size of the data in *data
+  * data: pointer to the data allocated in the memory
+  */
+  struct GameState{
+    int id;
+    int size;                       //!< total size of data
+    // new ---- change functions
+    bool diffed;
+    unsigned char *data;            //!< pointer to data
+  };
+
+  /**
+  * this struct defines a gamestate:
+  * compsize is the size of the compressed data
+  * normsize is the size of the uncompressed data
+  * data are the gamestates
+  */
+  struct GameStateCompressed{
+    int id;
+    int compsize;                   //!< size of compressed data
+    int normsize;                   //!< size of uncompressed data
+    // new ----- change functions
+    bool diffed;
+    unsigned char *data;            //!< gamestate data
+  };
+
+  struct classid{
+    int id;
+    int length;
+    int clid;
+    const char *message;
+  };
+
+
+  struct ack {
+    int id;
+    int a;
+  };
+
+  struct mouse {
+    int id;
+    double x;
+    double y;
+  };
+
+  struct keyboard {
+    int id;
+    char press;
+  };
+  //only in this class, not PacketGenerator, used as pattern to put incoming
+  //bytes inside
+  struct chat {
+    int id;
+    const char* message;
+  };
+
+}
+
+#endif /* _PacketTypes_H__ */
Index: /code/branches/network/src/network/Server.cc
===================================================================
--- /code/branches/network/src/network/Server.cc	(revision 861)
+++ /code/branches/network/src/network/Server.cc	(revision 861)
@@ -0,0 +1,178 @@
+//
+// C++ Implementation: Server
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#include <iostream>
+
+#include "ConnectionManager.h"
+#include "PacketTypes.h"
+#include "GameStateManager.h"
+#include "ClientInformation.h"
+//#include "NetworkFrameListener.h"
+#include "Server.h"
+
+
+namespace network
+{
+  /**
+  * Constructor for default values (bindaddress is set to ENET_HOST_ANY
+  *
+  */
+  Server::Server() {
+    packet_gen = PacketGenerator();
+    clients = new ClientInformation(true);
+    connection = new ConnectionManager(clients);
+    gamestates = new GameStateManager(clients);
+  }
+
+  /**
+  * Constructor
+  * @param port Port to listen on
+  * @param bindAddress Address to listen on
+  */
+  Server::Server(int port, std::string bindAddress) {
+    packet_gen = PacketGenerator();
+    clients = new ClientInformation();
+    connection = new ConnectionManager(port, bindAddress, clients);
+    gamestates = new GameStateManager(clients);
+  }
+
+  /**
+  * Constructor
+  * @param port Port to listen on
+  * @param bindAddress Address to listen on
+  */
+  Server::Server(int port, const char *bindAddress) {
+    packet_gen = PacketGenerator();
+    clients = new ClientInformation();
+    connection = new ConnectionManager(port, bindAddress, clients);
+    gamestates = new GameStateManager(clients);
+  }
+
+  /**
+  * This function opens the server by creating the listener thread
+  */
+  void Server::open() {
+    connection->createListener();
+    return;
+  }
+
+  /**
+  * This function closes the server
+  */
+  void Server::close() {
+    connection->quitListener();
+    return;
+  }
+
+  /**
+  * This function sends out a message to all clients
+  * @param msg message
+  * @return true/false
+  */
+  bool Server::sendMSG(std::string msg) {
+    ENetPacket *packet = packet_gen.chatMessage(msg.c_str());
+    //std::cout <<"adding packets" << std::endl;
+    connection->addPacketAll(packet);
+    //std::cout <<"added packets" << std::endl;
+    return connection->sendPackets();
+  }
+
+  /**
+  * This function sends out a message to all clients
+  * @param msg message
+  * @return true/false
+  */
+  bool Server::sendMSG(const char *msg) {
+    ENetPacket *packet = packet_gen.chatMessage(msg);
+    std::cout <<"adding Packets" << std::endl;
+    connection->addPacketAll(packet);
+    //std::cout <<"added packets" << std::endl;
+    if (connection->sendPackets()){
+      std::cout << "Sucessfully" << std::endl;
+      return true;
+    }
+    return false;
+  }
+
+  /**
+  * Run this function once every tick
+  * calls processQueue and updateGamestate
+  * @param time time since last tick
+  */
+  void Server::tick(float time) {
+    processQueue();
+    updateGamestate();
+    return;
+  }
+
+  /**
+  * processes all the packets waiting in the queue
+  */
+  void Server::processQueue() {
+    ENetPacket *packet;
+    int clientID=-1;
+    while(!connection->queueEmpty()){
+      //std::cout << "Client " << clientID << " sent: " << std::endl;
+      packet = connection->getPacket(clientID);
+      elaborate(packet, clientID);
+    }
+  }
+
+  /**
+  * takes a new snapshot of the gamestate and sends it to the clients
+  */
+  void Server::updateGamestate() {
+    gamestates->update();
+    //std::cout << "updated gamestate, sending it" << std::endl;
+    sendGameState();
+    //std::cout << "sent gamestate" << std::endl;
+  }
+
+  /**
+  * sends the gamestate
+  */
+  bool Server::sendGameState() {
+    std::cout << "starting gamestate" << std::endl;
+    ClientInformation *temp = clients;
+    bool added=false;
+    while(temp!=NULL){
+      if(temp->head){
+        temp=temp->next();
+        continue;
+      }
+      if( !(temp->getSynched()) ){
+        std::cout << "not sending gamestate" << std::endl;
+        temp=temp->next();
+        continue;
+      }
+      std::cout << "doing gamestate" << std::endl;
+      int gid = temp->getGamestateID();
+      int cid = temp->getID();
+      std::cout << "server, got acked ID: " << gid << std::endl;
+      GameStateCompressed *gs = &(gamestates->popGameState(cid)); // FIXME: taking address of temporary, check if correct
+      //std::cout << "adding gamestate" << std::endl;
+      connection->addPacket(packet_gen.gstate(gs), cid);
+      //std::cout << "added gamestate" << std::endl;
+      added=true;
+      temp=temp->next();
+    }
+    if(added)
+      return connection->sendPackets();
+    else
+      return false;
+  }
+
+  void Server::processAck( ack *data, int clientID) {
+    clients->findClient(clientID)->setGamestateID(data->a);
+  }
+
+}
Index: /code/branches/network/src/network/Server.h
===================================================================
--- /code/branches/network/src/network/Server.h	(revision 861)
+++ /code/branches/network/src/network/Server.h	(revision 861)
@@ -0,0 +1,55 @@
+//
+// C++ Interface: Server
+//
+// Description:
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+
+#ifndef _Server_H__
+#define _Server_H__
+
+#include <string>
+
+#include "PacketManager.h"
+#include "NetworkPrereqs.h"
+
+namespace network
+{
+  /**
+  * This class is the root class of the network module for a server.
+  * It implements all functions necessary for a Server
+  */
+  class _NetworkExport Server : public PacketDecoder{
+  public:
+    Server();
+    Server(int port, std::string bindAddress);
+    Server(int port, const char *bindAddress);
+    void open();
+    void close();
+    bool sendMSG(std::string msg);
+    bool sendMSG(const char *msg);
+    void tick(float time);
+  protected:
+    void processQueue();
+    void updateGamestate();
+  private:
+    bool sendGameState();
+    void processAck( ack *data, int clientID);
+    ConnectionManager *connection;
+    GameStateManager *gamestates;
+    PacketGenerator packet_gen;
+
+    ClientInformation *clients;
+  };
+
+
+
+
+}
+
+#endif /* _Server_H__ */
Index: /code/branches/network/src/network/Synchronisable.cc
===================================================================
--- /code/branches/network/src/network/Synchronisable.cc	(revision 861)
+++ /code/branches/network/src/network/Synchronisable.cc	(revision 861)
@@ -0,0 +1,183 @@
+//
+// C++ Implementation: synchronisable
+//
+// Description:
+//
+//
+// Author:  Dumeni, Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+
+#include <string>
+#include <iostream>
+
+#include "Synchronisable.h"
+
+namespace network
+{
+  /**
+  * Constructor:
+  * calls registarAllVariables, that has to be implemented by the inheriting classID
+  */
+  Synchronisable::Synchronisable(){
+    RegisterRootObject(Synchronisable);
+    static int idCounter=0;
+    datasize=0;
+    objectID=idCounter++;
+    //registerAllVariables();
+  }
+
+  Synchronisable::~Synchronisable(){
+  }
+
+  /**
+  * This function is used to register a variable to be synchronized
+  * also counts the total datasize needed to save the variables
+  * @param var pointer to the variable
+  * @param size size of the datatype the variable consists of
+  */
+  void Synchronisable::registerVar(const void *var, int size, variableType t){
+    // create temporary synch.Var struct
+    synchronisableVariable temp={size, var, t};
+    // increase datasize
+    datasize+=sizeof(int)+size;
+    // push temp to syncList (at the bottom)
+    syncList.push_back(temp);
+  }
+
+  /**
+  * note: only use this function for debug use, because it's inefficient (in order to produce a gamestate, you have to copy the whole data again to another memory location after this process)
+  * This function takes all SynchronisableVariables out of the Synchronisable and saves it into a syncData struct
+  * structure of the bitstream:
+  * (var1_size,var1,var2_size,var2,...)
+  * varx_size: size = sizeof(int)
+  * varx: size = varx_size
+  * @return data containing all variables and their sizes
+  */
+  // syncData Synchronisable::getData(){
+  //   std::list<synchronisableVariable>::iterator i;
+  //   int totalsize=0;
+  //   //figure out size of data to be allocated
+  //   for(i=syncList.begin(); i!=syncList.end(); i++){
+  //     // increase size (size of variable and size of size of variable ;)
+  //     if(i->type == STRING)
+  //       totalsize+=sizeof(int)+((std::string *)i->var)->length()+1;
+  //     else
+  //       totalsize+=sizeof(int)+i->size;
+  //   }
+  //   syncData retVal;
+  //   retVal.objectID=this->objectID;
+  //   retVal.classID=this->classID;
+  //   retVal.length=totalsize;
+  //   // allocate memory
+  //   retVal.data = (unsigned char *)malloc(totalsize);
+  //   // copy to location
+  //   //CHANGED: REMOVED DECLARATION int n=0 FROM LOOP
+  //   int n=0;
+  //   for(i=syncList.begin(); n<totalsize && i!=syncList.end(); i++){
+  //     std::memcpy(retVal.data+n, (const void*)(i->size), sizeof(int));
+  //     n+=sizeof(int);
+  //     switch(i->type){
+  //     case STRING:
+  //       std::memcpy(retVal.data+n, (const void *)(((std::string *)i->var)->c_str()), ((std::string *)i->var)->length()+1);
+  //       n+=((std::string *)i->var)->length()+1;
+  //       break;
+  //     case DATA:
+  //       std::memcpy(retVal.data+n, ((const void*)i->var), i->size);
+  //       n+=i->size;
+  //       break;
+  //     }
+  //   }
+  //   return retVal;
+  // }
+  /**
+  * This function takes all SynchronisableVariables out of the Synchronisable and saves it into a syncData struct
+  * Difference to the above function:
+  * takes a pointer to already allocated memory (must have at least getSize bytes length)
+  * structure of the bitstream:
+  * (var1_size,var1,var2_size,var2,...)
+  * varx_size: size = sizeof(int)
+  * varx: size = varx_size
+  * @return data containing all variables and their sizes
+  */
+  syncData Synchronisable::getData(unsigned char *mem){
+    std::list<synchronisableVariable>::iterator i;
+    syncData retVal;
+    retVal.objectID=this->objectID;
+    retVal.classID=this->classID;
+    retVal.length=getSize();
+    retVal.data=mem;
+    // copy to location
+    int n=0;
+    for(i=syncList.begin(); n<datasize && i!=syncList.end(); ++i){
+      //COUT(2) << "size of variable: " << i->size << std::endl;
+      //(std::memcpy(retVal.data+n, (const void*)(&(i->size)), sizeof(int));
+      memcpy( (void *)(retVal.data+n), (const void*)&(i->size), sizeof(int) );
+      n+=sizeof(int);
+      switch(i->type){
+      case DATA:
+        std::memcpy( (void *)(retVal.data+n), (const void*)(i->var), i->size);
+        n+=i->size;
+        break;
+      case STRING:
+        std::memcpy( retVal.data+n, (const void*)( ( (std::string *) i->var)->c_str()), ( (std::string *)i->var )->length()+1);
+        n+=((std::string *) i->var)->length()+1;
+        break;
+      }
+    }
+    return retVal;
+  }
+
+  /**
+  * This function takes a syncData struct and takes it to update the variables
+  * @param vars data of the variables
+  * @return true/false
+  */
+  bool Synchronisable::updateData(syncData vars){
+    unsigned char *data=vars.data;
+    std::list<synchronisableVariable>::iterator i;
+    for(i=syncList.begin(); i!=syncList.end(); i++){
+      if((int)*data==i->size || i->type==STRING){
+        switch(i->type){
+      case DATA:
+        data+=sizeof(int);
+        memcpy((void*)i->var, data, i->size);
+        data+=i->size;
+        break;
+      case STRING:
+        i->size = (int)*data;
+        data+=sizeof(int);
+        *((std::string *)i->var) = std::string((const char*)data);
+        data += i->size;
+        break;
+        }
+      } else
+        return false; //there was some problem with registerVar
+    }
+    return true;
+  }
+
+  /**
+  * This function returns the total amount of bytes needed by getData to save the whole content of the variables
+  * @return amount of bytes
+  */
+  int Synchronisable::getSize(){
+    int tsize=0;
+    std::list<synchronisableVariable>::iterator i;
+    for(i=syncList.begin(); i!=syncList.end(); i++){
+      switch(i->type){
+    case DATA:
+      tsize+=sizeof(int);
+      tsize+=i->size;
+      break;
+    case STRING:
+      tsize+=sizeof(int);
+      tsize+=((std::string *)i->var)->length()+1;
+      break;
+      }
+    }
+    return tsize;
+  }
+
+}
Index: /code/branches/network/src/network/Synchronisable.h
===================================================================
--- /code/branches/network/src/network/Synchronisable.h	(revision 861)
+++ /code/branches/network/src/network/Synchronisable.h	(revision 861)
@@ -0,0 +1,77 @@
+//
+// C++ Interface: synchronisable
+//
+// Description: 
+//
+//
+// Author:  Oliver Scheuss, (C) 2007
+//
+// Copyright: See COPYING file that comes with this distribution
+//
+//
+#ifndef _Synchronisable_H__
+#define _Synchronisable_H__
+
+#include <list>
+
+#include "NetworkPrereqs.h"
+#include "core/CoreIncludes.h"
+
+namespace network
+{
+  enum variableType{
+    DATA,
+    STRING,
+  };
+
+  struct syncData{
+    int length;
+    int objectID;
+    int classID;
+    unsigned char *data;
+  };
+
+  typedef struct synchronisableVariable{
+    int size;
+    const void *var;
+    variableType type;
+  }SYNCVAR;
+
+
+  /**
+  * This class is the base class of all the Objects in the universe that need to be synchronised over the network
+  * Every class, that inherits from this class has to link the DATA THAT NEEDS TO BE SYNCHRONISED into the linked list. Additionally it also has to provide a Constructor, that takes exactly the variables in this linked list.
+  * @author Oliver Scheuss
+  */
+  class _NetworkExport Synchronisable : virtual public orxonox::OrxonoxClass{
+  public:
+
+    virtual ~Synchronisable();
+    int objectID;
+    int classID;
+
+    void registerVar(const void *var, int size, variableType t);
+    //  syncData getData();
+    syncData getData(unsigned char *mem);
+    int getSize();
+    bool updateData(syncData vars);
+    void registerAllVariables();
+    virtual bool create()=0;
+  protected:
+    Synchronisable();
+  private:
+    /*  bool removeObject(Iterator<Synchronisable> it);*/
+
+    std::list<SYNCVAR> syncList;
+    int datasize;
+  };
+
+}
+
+namespace orxonox
+{
+  template class _NetworkExport ClassIdentifier<network::Synchronisable>;
+  template class _NetworkExport ObjectList<network::Synchronisable>;
+}
+
+#endif /* _Synchronisable_H__ */
Index: /code/branches/network/src/network/TODO
===================================================================
--- /code/branches/network/src/network/TODO	(revision 861)
+++ /code/branches/network/src/network/TODO	(revision 861)
@@ -0,0 +1,15 @@
+TODO:
+
+- change ConnectionManager clientlist [done]
+- change gamestatemanager clientlist [done]
+- put them together into ClientInformation [done]
+
+- do better gamestate-update/snapshot-handling [partially done]
+- integrate ClientInformation into gamestatemanager [done]
+
+- write dummyserver and dummyclient (chat system) [done]
+
+- include GameStateClient into Client and write processGamestate (also packetdecoder (virtual))
+- create object with worldentity .....
+
+- try and error ;)
Index: /code/branches/network/src/network/dummyclient.cc
===================================================================
--- /code/branches/network/src/network/dummyclient.cc	(revision 861)
+++ /code/branches/network/src/network/dummyclient.cc	(revision 861)
@@ -0,0 +1,123 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//o
+// Dummy client to test ConnectionManager and PacketBuffer classes
+//
+// Author: Oliver Scheuss
+
+#include <iostream>
+#include <string>
+#include <enet/enet.h>
+
+#include "util/Sleep.h"
+#include "PacketManager.h"
+#include "PacketTypes.h"
+
+using namespace std;
+
+int main(){
+  ENetHost * client;
+  ENetAddress address;
+  ENetEvent event;
+  ENetPeer *peer;
+  network::PacketGenerator pck;
+
+  enet_initialize();
+  atexit(enet_deinitialize);
+
+  cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << endl;
+  string str;
+  getline(cin, str);
+  cout << "You entered: " << str << endl;
+  if(str.compare("")==0)
+    str="127.0.0.1";
+
+  enet_address_set_host(&address, str.c_str());
+  address.port = 55556;
+
+  // create client object
+  client = enet_host_create(NULL, 2, 0, 0);
+
+  if(client==NULL){
+    fprintf(stderr, "An error occured");
+    exit(EXIT_FAILURE);
+  }
+  // connect peer
+  peer = enet_host_connect(client, &address, 2);
+  if(peer==NULL){
+    fprintf(stderr, "Peer establishing error");
+    exit(EXIT_FAILURE);
+  }
+  // wait 5 seconds for the connection attempt to succeed
+  if(enet_host_service(client, &event, 5000) > 0 && event.type == ENET_EVENT_TYPE_CONNECT){
+    cout << "Connection to " << str << " succeeded." << endl;
+    //puts("Connection to localhost:5555 succeeded.");
+  }else{
+    enet_peer_reset(peer);
+    cout << "Connection to " << str << " failed." << endl;
+    //puts("Connection to localhost:5555 failed.");
+    exit(EXIT_FAILURE);
+  }
+
+  for(int i=0; i<10; i++){
+    // weihnachtsmann bringt packete
+    //ENetPacket *packet = enet_packet_create ("packet1234", strlen("packet1234") + 1, ENET_PACKET_FLAG_RELIABLE);
+    // extend the packet and append the string foo to it
+    // send packet to peer on channel id 0
+    enet_peer_send(peer, 1, pck.chatMessage("test2"));
+    // keep the timeout very small for low delay
+    if(enet_host_service(client, &event, 1)==0){
+      cout << "successfully sent: " << event.type << endl;
+    }else{
+      cout << "failed sending" << endl;
+    }
+    usleep(1000000);
+  }
+
+  // now disconnect
+  //   enet_peer_disconnect (peer);
+  enet_peer_disconnect (peer, 0);
+  // 3 seconds timeout
+  while(enet_host_service(client, &event, 3000) > 0){
+    switch (event.type)
+    {
+    case ENET_EVENT_TYPE_RECEIVE:
+      enet_packet_destroy(event.packet);
+      break;
+    case ENET_EVENT_TYPE_DISCONNECT:
+      puts("Disconnection succeeded.");
+      return 0;
+    }
+  }
+  // if disconnect failed
+  enet_peer_reset(peer);
+
+
+
+  return 0;
+}
Index: /code/branches/network/src/network/dummyclient2.cc
===================================================================
--- /code/branches/network/src/network/dummyclient2.cc	(revision 861)
+++ /code/branches/network/src/network/dummyclient2.cc	(revision 861)
@@ -0,0 +1,91 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// Dummy client to test ConnectionManager, PacketBuffer, ClientConnection and other classes
+//
+// Author: Oliver Scheuss
+
+#include <iostream>
+#include <string>
+#include <enet/enet.h>
+
+#include "util/Sleep.h"
+#include "PacketManager.h"
+#include "PacketTypes.h"
+#include "ClientConnection.h"
+
+using namespace network;
+
+int main(){
+  network::PacketGenerator pck;
+
+  std::cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl;
+  std::string str;
+  std::getline(std::cin, str);
+  std::cout << "You entered: " << str << std::endl;
+  if(str.compare("")==0)
+    str="127.0.0.1";
+
+  ClientConnection client = ClientConnection(55556, str);
+
+  client.createConnection();
+
+  if(client.waitEstablished(10000))
+    std::cout << "Connection established" << std::endl;
+  else
+    std::cout << "Connection failed" << std::endl;
+
+  ENetPacket *packet;  //FIXME: unused var!
+  ENetEvent event;
+
+
+
+  for(int i=0; i<10; i++){
+    // weihnachtsmann bringt packete
+    // extend the packet and append the string foo to it
+    // send packet to peer on channel id 0
+    client.addPacket(pck.chatMessage("test"));
+    // keep the timeout very small for low delay
+    if(client.sendPackets(&event)){
+      std::cout << "successfully sent: " << event.type << std::endl;
+    }else{
+      std::cout << "failed sending" << std::endl;
+    }
+    //    usleep(1000000);
+  }
+  usleep(1000000);
+  // now disconnect
+  if(client.closeConnection())
+    std::cout << "Connection successfully closed" << std::endl;
+  else
+    std::cout << "Connection closing failed" << std::endl;
+
+  // 3 seconds timeout
+  return 0;
+}
+
Index: /code/branches/network/src/network/dummyclient3.cc
===================================================================
--- /code/branches/network/src/network/dummyclient3.cc	(revision 861)
+++ /code/branches/network/src/network/dummyclient3.cc	(revision 861)
@@ -0,0 +1,81 @@
+#include <iostream>
+#include <string>
+
+#include "util/Sleep.h"
+#include "PacketManager.h"
+#include "PacketTypes.h"
+#include "Client.h"
+
+using namespace network;
+
+void sender(){
+
+  network::PacketGenerator pck;
+  const int PORT = 55556;
+  std::cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl;
+  std::string str;
+  std::getline(std::cin, str);
+  std::cout << "You entered: " << str << std::endl;
+  if(str.compare("")==0)
+    str="127.0.0.1";
+
+  Client client( str, PORT );
+  if ( client.establishConnection() )
+    std::cout << "connection established" << std::endl;
+  else std::cout << "problems establishing connection" << std::endl;
+  char message[10000];
+  char signs[] = "abcdefghijklmnopqrstuvwxy";
+  while (true) {
+    client.tick(0);
+
+    std::cout << "your message2: ";
+    for ( int i=0; i<9999; i++ ) {
+      message[i] = signs[0];
+    }
+    message[9999] = 'z';
+    std::string str( message );
+    client.sendChat( str );
+    std::cout << str << std::endl;
+    std::cin.get(); std::cin.get();
+  }
+
+
+
+}
+
+void listener(){
+
+  const int PORT = 55556;
+  std::cout << "Enter address of the server xxx.xxx.xxx.xxx (enter for localhost)" << std::endl;
+  std::string str;
+  std::getline(std::cin, str);
+  std::cout << "You entered: " << str << std::endl;
+  if(str.compare("")==0)
+    str="127.0.0.1";
+
+  Client client( str, PORT );
+  if ( client.establishConnection() )
+    std::cout << "connection established" << std::endl;
+  else std::cout << "problems establishing connection" << std::endl;
+
+  while (true) {
+    client.tick(0);
+    usleep(100);
+  }
+
+
+
+}
+
+
+int main(int argc, char **argv[]){
+  std::string in;
+  std::cout << "Please choose: sender(s) oder listener(l)" << std::endl;
+  std::getline(std::cin, in);
+  if(in.compare("l")==0)
+    listener();
+  else if(in.compare("s")==0)
+    sender();
+  else
+    std::cout << "wrong answer" << std::endl;
+}
Index: /code/branches/network/src/network/dummyserver.cc
===================================================================
--- /code/branches/network/src/network/dummyserver.cc	(revision 861)
+++ /code/branches/network/src/network/dummyserver.cc	(revision 861)
@@ -0,0 +1,73 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Oliver Scheuss, (C) 2007
+*   Co-authors:
+*      ...
+*
+*/
+
+//
+// Dummy server to test ConnectionManager and PacketBuffer classes
+//
+// Author: Oliver Scheuss
+
+#include <iostream>
+#include <enet/enet.h>
+
+#include "util/Sleep.h"
+#include "ConnectionManager.h"
+#include "PacketManager.h"
+#include "PacketTypes.h"
+#include "ClientInformation.h"
+
+using namespace network;
+
+int main(){
+  bool quit=false;
+  ENetPacket *packet;
+  ClientInformation clients;
+  ConnectionManager server = ConnectionManager(&clients);
+  server.createListener();
+
+  PacketDecoder dec;
+
+  while(!quit){
+    if(server.queueEmpty())
+      // Warning: usleep(100) is Sleep(100/1000) = Sleep(0), which is nothing!
+      usleep(1);
+    else{
+      ENetAddress addr;
+      packet=server.getPacket(addr);
+      if(packet==NULL){
+        // there was some error
+        //std::cout << "null pointer" << std::endl;
+        quit=true;
+      }
+      else{
+        //std::cout << "We received: " << packet->data << std::endl;
+        dec.elaborate(packet, 1);
+      }
+    }
+  }
+  server.quitListener();
+  return 0;
+}
Index: /code/branches/network/src/network/dummyserver3.cc
===================================================================
--- /code/branches/network/src/network/dummyserver3.cc	(revision 861)
+++ /code/branches/network/src/network/dummyserver3.cc	(revision 861)
@@ -0,0 +1,52 @@
+#include <iostream>
+
+#include "util/Sleep.h"
+#include "PacketManager.h"
+#include "PacketTypes.h"
+#include "Server.h"
+
+namespace network
+{
+
+  class dummyserver3 : public Server
+  {
+  public:
+    dummyserver3();
+    ~dummyserver3();
+    void loop();
+  private:
+    void tick();
+    void processChat( chat *data, int clientId);
+
+
+  };
+
+  dummyserver3::dummyserver3(){
+  }
+  dummyserver3::~dummyserver3(){
+  }
+
+  void dummyserver3::loop(){
+    open();
+    while(true){
+      tick();
+      usleep(100);
+    }
+  }
+
+  void dummyserver3::processChat( chat *data, int clientId){
+    std::cout << "Client " << clientId << " sent: " << data->message << std::endl;
+    sendMSG(data->message);
+  }
+
+  void dummyserver3::tick(){
+    processQueue();
+  }
+
+}
+
+int main(int argc, char **argv[]){
+  network::dummyserver3 server;
+  server.loop();
+  return 0;  
+}
Index: /code/branches/network/src/orxonox/AIClass.h
===================================================================
--- /code/branches/network/src/orxonox/AIClass.h	(revision 861)
+++ /code/branches/network/src/orxonox/AIClass.h	(revision 861)
@@ -0,0 +1,95 @@
+#ifndef _AIClass_H__
+#define _AIClass_H__
+
+#include "util/Vector3.h"
+
+namespace orxonox
+{
+  class AIPilot
+  {
+
+
+    /*
+    TASKS:                                                                         Requirements:
+
+    - Change actual Speed to required Speed                                          - Speed as Vector3 , spaceship(?) -> pilot attached to it or vice versa (?)
+    - Open fire, if allowed                                                          - Status of the fleet commander -> allowed to fire , fly etc.
+    - differ friend, ally and enemy                                                  - Lists of ships + who controls them
+    - report ship status to fleet commander                                          - Call own ship status -> ammo, damage etc.
+
+
+
+    */
+
+  public:
+    Vector3 speed;
+
+
+
+    //default constructor
+    AIPilot() {
+      speed = (1,0,0);
+    }
+
+    Vector3 steer(Vector3 reqSpeed) {
+      Quaternion sRotation = speed.getRotationTo(reqSpeed);
+      Radian rollarc = sRotation.getRoll();
+      Radian pitcharc = sRotation.getPitch();
+      Radian yawarc = sRotation.getYaw();
+      return Vector3((float)rollarc.valueRadians(), (float)pitcharc.valueRadians(), (float)yawarc.valueRadians());
+    }
+
+
+  };
+
+  class AIFleetCommander : public  AIPilot {
+
+
+    /*
+    TASKS:                                                                       Requirements:
+
+    - Same tasks as AI_Pilot (only if shipcontrol)                                   - Same as AI_Pilot
+    - Calculate required Speed for any ship in Fleet                                 - Knows all calculation functions
+    - Request fleet status and report to commander                                   - Better list of all ships -> more data for fleet ships
+
+
+
+    */
+
+  public:
+
+
+    //default constructor
+    AIFleetCommander() {
+
+    }
+
+
+
+  };
+
+  class AICommander : public  AIFleetCommander
+  {
+
+
+    /*
+    TASKS:                                                                     Requirements:
+
+    - Decide on general tactics                                                      - List of general fleet status + all possible information on enemies
+    - Save and load tactical data (?)                                                - files with tactical data, e.g. success of strategy etc.
+
+
+
+    */
+
+    //default constructor
+    AICommander() {
+
+    }
+
+
+  };
+
+}
+
+#endif /* _AIClass_H__ */
Index: /code/branches/network/src/orxonox/Arrival.h
===================================================================
--- /code/branches/network/src/orxonox/Arrival.h	(revision 861)
+++ /code/branches/network/src/orxonox/Arrival.h	(revision 861)
@@ -0,0 +1,82 @@
+
+// Arrival Class
+
+
+#ifndef _Arrival_H__
+#define _Arrival_H__
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+  class Arrival
+  {
+  public:
+    Vector3 location;           //!< locationvector of the element
+    Vector3 speed;              //!< speedvector of the element
+    Vector3 acceleration;       //!< accelerationvector of the element
+    Vector3 target;             //!< target to arrive
+    int accelerationForwards;   //!< from steering-interface
+    int MaxSpeed;               //!< from steering-interface
+
+
+    Arrival() {
+      acceleration = (0,0,0);
+      speed = (0,0,0);
+      location = (0,0,0);
+      target = (0,0,0);
+    }
+
+    Arrival(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      target = target_;
+    }
+
+    void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, Vector3 target_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      target = target_;
+    }
+
+    void setTarget(Vector3 target_) {
+      setValues(this->location, this->speed, this->acceleration, target_);
+    }
+
+    Vector3 getDirection() {
+      Vector3 direction = target-location;
+    }
+
+    double relativeDirectApproach() {
+      // Maxspeed / accelerationForwards = time needed to break with max acceleration
+      // 2*getDistance()length/(MaxSpeed/accelerationForwards)^2 = required acceleration to arrive at the target with speed = 0
+      return (accelerationForwards / (2*getDirection().length() / ((MaxSpeed/accelerationForwards)*(MaxSpeed/accelerationForwards))) );
+    }
+
+    void Approach() {
+      Quaternion rotation = Quaternion(0,0,0,0);
+      if (relativeDirectApproach() > 1)
+      {
+        float length = speed.length();
+        speed = (speed+getDirection());
+        speed.normalise();
+        speed = speed*length;
+        if (relativeDirectApproach() > 4)
+        {
+          //accelerate
+        }
+        else
+        {
+          // speed will stay constant
+        }
+      }
+      else {
+      }
+    }
+
+  };
+}
+
+#endif /* _Arrival_H__ */
Index: /code/branches/network/src/orxonox/CMakeLists.txt
===================================================================
--- /code/branches/network/src/orxonox/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/orxonox/CMakeLists.txt	(revision 861)
@@ -0,0 +1,46 @@
+SET( ORXONOX_SRC_FILES
+  GraphicsEngine.cc
+  Main.cc
+  Orxonox.cc
+  SpaceshipSteering.cc
+  hud/HUD.cc
+  particle/ParticleInterface.cc
+  tools/BillboardSet.cc
+  tools/Light.cc
+  tools/Mesh.cc
+  objects/Ambient.cc
+  objects/Camera.cc
+  objects/Explosion.cc
+  objects/Fighter.cc
+  objects/Model.cc
+  objects/NPC.cc
+  objects/Projectile.cc
+  objects/Skybox.cc
+  objects/SpaceShip.cc
+# objects/SpaceshipSteeringObject.cc
+# objects/test1.cc
+# objects/test2.cc
+# objects/test3.cc
+  objects/WorldEntity.cc
+  objects/weapon/AmmunitionDump.cc
+  objects/weapon/BarrelGun.cc
+  objects/weapon/BaseWeapon.cc
+  objects/weapon/Bullet.cc
+  objects/weapon/BulletManager.cc
+  objects/weapon/WeaponStation.cc
+)
+
+ADD_EXECUTABLE( orxonox ${ORXONOX_SRC_FILES} )
+
+SET_TARGET_PROPERTIES( orxonox PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( orxonox
+  ${OGRE_LIBRARIES}
+  ${OIS_LIBRARIES}
+  util
+  core
+  audio
+  network
+  loader
+)
+
Index: /code/branches/network/src/orxonox/Flocking.h
===================================================================
--- /code/branches/network/src/orxonox/Flocking.h	(revision 861)
+++ /code/branches/network/src/orxonox/Flocking.h	(revision 861)
@@ -0,0 +1,140 @@
+
+//Headerfile: Flocking.h
+
+#ifndef _Flocking_H__
+#define _Flocking_H__
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+  class Element // An element that flocks
+  {
+
+  public:
+    Vector3 location;                       //!< locationvector of the element
+    Vector3 speed;                          //!< speedvector of the element
+    Vector3 acceleration;                   //!< accelerationvector of the element
+    bool movable;                                 //!< movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation
+    static int const SEPERATIONDISTANCE = 300;    //!< detectionradius of seperation
+    static int const ALIGNMENTDISTANCE = 300;     //!< detectionradius of alignment
+    static int const COHESIONDISTANCE = 5000;     //!< detectionradius of cohesion
+    static int const ANZELEMENTS = 9;             //!< number of elements
+
+    //! default constructor
+    Element() {
+      acceleration = Vector3(0,0,0);
+      speed = Vector3(0,0,0);
+      location = Vector3(0,0,0);
+      movable = true;
+    }
+
+    /** constructor
+    *  @param location_ sets locationvector of the element
+    *  @param speed_ sets speedvector of the element
+    *  @param acceleration_ sets accelerationvector of the element
+    *  @param movable_ sets movability of the element
+    */
+    Element(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      movable = movable_;
+    }
+
+    //! function to chance values of an element
+    void setValues(Vector3 location_, Vector3 speed_, Vector3 acceleration_, bool movable_) {
+      acceleration = acceleration_;
+      speed = speed_;
+      location = location_;
+      movable = movable_;
+    }
+
+    /** calculates the distance between the element and an other point given by temp
+    * @param e remote object to calculate distance to
+    */
+    float getDistance(Element e) {
+      Vector3 distance = e.location - location;
+      return distance.length();
+    }
+
+    //! updates the data of an element
+    void update(Element arrayOfElements[]) {
+      if (this->movable == true) {calculateAcceleration(arrayOfElements);} //if element is movable, calculate acceleration
+    }
+
+    //! calculates the new acceleration of an element
+    void calculateAcceleration(Element arrayOfElements[]) {
+      acceleration = separation(arrayOfElements) + alignment(arrayOfElements) + cohesion(arrayOfElements);  //acceleration consisting of flocking-functions
+    }
+
+    //! separation-function (keep elements separated, avoid crashs)
+    Vector3 separation(Element arrayOfElements[]) {
+      using namespace Ogre;
+      Vector3 steering = Vector3(0,0,0); //steeringvector
+      Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
+      int numberOfNeighbour = 0;  //number of observed neighbours
+      float distance = 0;  // distance to the actual element
+      for(int i=0; i<ANZELEMENTS; i++) {  //go through all elements
+        Element actual = arrayOfElements[i];  //get the actual element
+        distance = getDistance(actual);  //get distance between this and actual
+        if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
+          inverseDistance = (0,0,0);
+          inverseDistance = location-actual.location;  //calculate the distancevector heading towards this
+          //adaptation of the inverseDistance to the distance
+          if ((distance < 200) && (distance >= 120)) {inverseDistance = 2*inverseDistance;}
+          if ((distance < 120) && (distance >= 80)) {inverseDistance = 5*inverseDistance;}
+          if ((distance < 80) && (distance >= 40)) {inverseDistance = 10*inverseDistance;}
+          if ((distance < 40) && (distance > 0)) {inverseDistance = 10*inverseDistance;}
+          steering = steering + inverseDistance;  //add up all significant steeringvectors
+          numberOfNeighbour++;  //counts the elements inside the detectionradius
+        }
+      }
+      if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
+      return steering;
+    }
+
+    //! alignment-function (lead elements to the same heading)
+    Vector3 alignment(Element arrayOfElements[]) {
+      using namespace Ogre;
+      Vector3 steering = Vector3(0,0,0); //steeringvector
+      int numberOfNeighbour = 0;  //number of observed neighbours
+      float distance = 0;
+      //go through all elements
+      for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
+        Element actual = arrayOfElements[i];  //get the actual element
+        float distance = getDistance(actual);  //get distance between this and actual
+        if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
+          steering = steering + actual.speed;  //add up all speedvectors inside the detectionradius
+          numberOfNeighbour++;  //counts the elements inside the detectionradius
+        }
+      }
+      if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
+      return steering;
+    }
+
+    //! cohseion-function (keep elements close to each other)
+    Vector3 cohesion(Element arrayOfElements[]) {
+      using namespace Ogre;
+      Vector3 steering = Vector3(0,0,0); //steeringvector
+      int numberOfNeighbour = 0;  //number of observed neighbours
+      float distance = 0;
+      //go through all elements
+      for(int i=0; i<ANZELEMENTS; i++) {  //just working with 3 elements at the moment
+        Element actual = arrayOfElements[i];  //get the actual element
+        float distance = getDistance(actual);  //get distance between this and actual
+        if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
+          steering = steering + actual.location;  //add up all locations of elements inside the detectionradius
+          numberOfNeighbour++;  //counts the elements inside the detectionradius
+        }
+      }
+      if(numberOfNeighbour > 0) {
+        steering = steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
+        steering = steering - this->location;  //transform the vector for the ship
+      }
+      return steering;
+    }
+  };     //End of class Element
+}
+
+#endif /* _Flocking_H__*/
Index: /code/branches/network/src/orxonox/GraphicsEngine.cc
===================================================================
--- /code/branches/network/src/orxonox/GraphicsEngine.cc	(revision 861)
+++ /code/branches/network/src/orxonox/GraphicsEngine.cc	(revision 861)
@@ -0,0 +1,134 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+ /**
+    @file orxonox.cc
+    @brief Orxonox class
+  */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreRoot.h>
+#include <OgreConfigFile.h>
+#include <OgreTextureManager.h>
+
+#include "core/Debug.h"
+#include "GraphicsEngine.h"
+
+
+namespace orxonox {
+
+  using namespace Ogre;
+
+  GraphicsEngine::GraphicsEngine()
+  {
+    // set to standard values
+    this->configPath_ = "";
+    this->dataPath_ = "";
+    scene_ = NULL;
+  }
+
+
+  GraphicsEngine::~GraphicsEngine()
+  {
+  }
+
+  void GraphicsEngine::setup()
+  {
+    //TODO: Check if file exists (maybe not here)
+/*#ifndef OGRE_STATIC_LIB
+    root_ = new Root(configPath_ + "plugins.cfg", configPath_ + "ogre.cfg",
+                     configPath_ + "Ogre.log");
+#else
+    root_ = new Root(NULL, configPath_ + "ogre.cfg", configPath_ + "Ogre.log");
+#endif*/
+#if defined(_DEBUG) && defined(WIN32)
+    std::string plugin_filename = "plugins_d.cfg";
+#else
+    std::string plugin_filename = "plugins.cfg";
+#endif
+    root_ = new Root(plugin_filename);
+  }
+
+  /**
+   * @return scene manager
+   */
+  SceneManager* GraphicsEngine::getSceneManager()
+  {
+    if(!scene_)
+    {
+      scene_ = root_->createSceneManager(ST_GENERIC, "Default SceneManager");
+      COUT(3) << "Info: Created SceneMan: " << scene_ << std::endl;
+    }
+    return scene_;
+  }
+
+  bool GraphicsEngine::load()
+  {
+    loadRessourceLocations(this->dataPath_);
+    if (!root_->restoreConfig() && !root_->showConfigDialog())
+      return false;
+    return true;
+  }
+
+  void GraphicsEngine::startRender()
+  {
+    root_->initialise(true, "OrxonoxV2");
+    TextureManager::getSingleton().setDefaultNumMipmaps(5);
+    ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+  }
+
+  void GraphicsEngine::loadRessourceLocations(std::string dataPath)
+  {
+    //TODO: Specify layout of data file and maybe use xml-loader
+    //TODO: Work with ressource groups (should be generated by a special loader)
+    // Load resource paths from data file using configfile ressource type
+    ConfigFile cf;
+    cf.load(dataPath + "resources.cfg");
+
+    // Go through all sections & settings in the file
+    ConfigFile::SectionIterator seci = cf.getSectionIterator();
+
+    std::string secName, typeName, archName;
+    while (seci.hasMoreElements())
+    {
+      secName = seci.peekNextKey();
+      ConfigFile::SettingsMultiMap *settings = seci.getNext();
+      ConfigFile::SettingsMultiMap::iterator i;
+      for (i = settings->begin(); i != settings->end(); ++i)
+      {
+        typeName = i->first; // for instance "FileSystem" or "Zip"
+        archName = i->second; // name (and location) of archive
+
+        ResourceGroupManager::getSingleton().addResourceLocation(
+                                           std::string(dataPath + archName),
+                                           typeName, secName);
+      }
+    }
+  }
+
+
+}
Index: /code/branches/network/src/orxonox/GraphicsEngine.h
===================================================================
--- /code/branches/network/src/orxonox/GraphicsEngine.h	(revision 861)
+++ /code/branches/network/src/orxonox/GraphicsEngine.h	(revision 861)
@@ -0,0 +1,46 @@
+/**
+  @file GraphicsEngine.h
+  @brief Graphics Engine
+  @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _GraphicsEngine_H__
+#define _GraphicsEngine_H__
+
+#include <string>
+
+#include <OgreRoot.h>
+#include <OgreSceneManager.h>
+
+#include "OrxonoxPrereqs.h"
+
+
+namespace orxonox {
+
+/**
+   * graphics engine manager class
+ */
+  class _OrxonoxExport GraphicsEngine {
+    public:
+      GraphicsEngine();
+      inline void setConfigPath(std::string path) { this->configPath_ = path; };
+      // find a better way for this
+      inline Ogre::Root* getRoot() { return root_; };
+      void setup();
+      bool load();
+      void loadRessourceLocations(std::string path);
+      Ogre::SceneManager* getSceneManager();
+      void startRender();
+
+      virtual ~GraphicsEngine();
+    private:
+      Ogre::Root*         root_;        //!< Ogre's root
+      std::string         configPath_;  //!< path to config file
+      std::string         dataPath_;    //!< path to data file
+      Ogre::SceneManager* scene_;       //!< scene manager of the game
+
+  };
+
+}
+
+#endif /* _GraphicsEngine_H__ */
Index: /code/branches/network/src/orxonox/InputManager.cc
===================================================================
--- /code/branches/network/src/orxonox/InputManager.cc	(revision 861)
+++ /code/branches/network/src/orxonox/InputManager.cc	(revision 861)
@@ -0,0 +1,390 @@
+#include "OrxonoxStableHeaders.h"
+
+#include "InputManager.h"
+
+InputManager *InputManager::mInputManager;
+
+InputManager::InputManager( void ) :
+    mMouse( 0 ), mKeyboard( 0 ), mInputSystem( 0 ) {}
+
+InputManager::~InputManager( void ) {
+  if( mInputSystem ) {
+    if( mMouse ) {
+      mInputSystem->destroyInputObject( mMouse );
+      mMouse = 0;
+    }
+
+    if( mKeyboard ) {
+      mInputSystem->destroyInputObject( mKeyboard );
+      mKeyboard = 0;
+    }
+
+    if( mJoysticks.size() > 0 ) {
+      itJoystick    = mJoysticks.begin();
+      itJoystickEnd = mJoysticks.end();
+      for(; itJoystick != itJoystickEnd; ++itJoystick ) {
+        mInputSystem->destroyInputObject( *itJoystick );
+      }
+
+      mJoysticks.clear();
+    }
+
+        // If you use OIS1.0RC1 or above, uncomment this line
+        // and comment the line below it
+    mInputSystem->destroyInputSystem( mInputSystem );
+        //mInputSystem->destroyInputSystem();
+    mInputSystem = 0;
+
+        // Clear Listeners
+    mKeyListeners.clear();
+    mMouseListeners.clear();
+    mJoystickListeners.clear();
+  }
+}
+
+void InputManager::initialise( Ogre::RenderWindow *renderWindow ) {
+  if( !mInputSystem ) {
+        // Setup basic variables
+    OIS::ParamList paramList;
+    size_t windowHnd = 0;
+    std::ostringstream windowHndStr;
+
+        // Get window handle
+    renderWindow->getCustomAttribute( "WINDOW", &windowHnd );
+
+        // Fill parameter list
+    windowHndStr << (unsigned int) windowHnd;
+    paramList.insert( std::make_pair( std::string( "WINDOW" ), windowHndStr.str() ) );
+
+        // Create inputsystem
+    mInputSystem = OIS::InputManager::createInputSystem( paramList );
+
+        // If possible create a buffered keyboard
+        // (note: if below line doesn't compile, try:  if (mInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0) {
+      if( mInputSystem->numKeyboards() > 0 ) {
+//     if (mInputSystem->getNumberOfDevices(OIS::OISKeyboard) > 0) {
+      mKeyboard = static_cast<OIS::Keyboard*>( mInputSystem->createInputObject( OIS::OISKeyboard, true ) );
+      mKeyboard->setEventCallback( this );
+    }
+
+        // If possible create a buffered mouse
+        // (note: if below line doesn't compile, try:  if (mInputSystem->getNumberOfDevices(OIS::OISMouse) > 0) {
+      if( mInputSystem->numMice() > 0 ) {
+//     if (mInputSystem->getNumberOfDevices(OIS::OISMouse) > 0) {
+      mMouse = static_cast<OIS::Mouse*>( mInputSystem->createInputObject( OIS::OISMouse, true ) );
+      mMouse->setEventCallback( this );
+
+            // Get window size
+      unsigned int width, height, depth;
+      int left, top;
+      renderWindow->getMetrics( width, height, depth, left, top );
+
+            // Set mouse region
+      this->setWindowExtents( width, height );
+    }
+
+        // If possible create all joysticks in buffered mode
+        // (note: if below line doesn't compile, try:  if (mInputSystem->getNumberOfDevices(OIS::OISJoyStick) > 0) {
+    if( mInputSystem->numJoySticks() > 0 ) {
+//     if (mInputSystem->getNumberOfDevices(OIS::OISJoyStick) > 0) {
+       mJoysticks.resize( mInputSystem->numJoySticks() );
+//       mJoysticks.resize( mInputSystem->getNumberOfDevices(OIS::OISJoyStick) );
+
+      itJoystick    = mJoysticks.begin();
+      itJoystickEnd = mJoysticks.end();
+      for(; itJoystick != itJoystickEnd; ++itJoystick ) {
+        (*itJoystick) = static_cast<OIS::JoyStick*>( mInputSystem->createInputObject( OIS::OISJoyStick, true ) );
+        (*itJoystick)->setEventCallback( this );
+      }
+    }
+  }
+}
+
+void InputManager::capture( void ) {
+    // Need to capture / update each device every frame
+  if( mMouse ) {
+    mMouse->capture();
+  }
+
+  if( mKeyboard ) {
+    mKeyboard->capture();
+  }
+
+  if( mJoysticks.size() > 0 ) {
+    itJoystick    = mJoysticks.begin();
+    itJoystickEnd = mJoysticks.end();
+    for(; itJoystick != itJoystickEnd; ++itJoystick ) {
+      (*itJoystick)->capture();
+    }
+  }
+}
+
+void InputManager::addKeyListener( OIS::KeyListener *keyListener, const std::string& instanceName ) {
+  if( mKeyboard ) {
+        // Check for duplicate items
+    itKeyListener = mKeyListeners.find( instanceName );
+    if( itKeyListener == mKeyListeners.end() ) {
+      mKeyListeners[ instanceName ] = keyListener;
+    }
+    else {
+            // Duplicate Item
+    }
+  }
+}
+
+void InputManager::addMouseListener( OIS::MouseListener *mouseListener, const std::string& instanceName ) {
+  if( mMouse ) {
+        // Check for duplicate items
+    itMouseListener = mMouseListeners.find( instanceName );
+    if( itMouseListener == mMouseListeners.end() ) {
+      mMouseListeners[ instanceName ] = mouseListener;
+    }
+    else {
+            // Duplicate Item
+    }
+  }
+}
+
+void InputManager::addJoystickListener( OIS::JoyStickListener *joystickListener, const std::string& instanceName ) {
+  if( mJoysticks.size() > 0 ) {
+        // Check for duplicate items
+    itJoystickListener = mJoystickListeners.find( instanceName );
+    if( itJoystickListener == mJoystickListeners.end() ) {
+      mJoystickListeners[ instanceName ] = joystickListener;
+    }
+    else {
+            // Duplicate Item
+    }
+  }
+}
+
+void InputManager::removeKeyListener( const std::string& instanceName ) {
+    // Check if item exists
+  itKeyListener = mKeyListeners.find( instanceName );
+  if( itKeyListener != mKeyListeners.end() ) {
+    mKeyListeners.erase( itKeyListener );
+  }
+  else {
+        // Doesn't Exist
+  }
+}
+
+void InputManager::removeMouseListener( const std::string& instanceName ) {
+    // Check if item exists
+  itMouseListener = mMouseListeners.find( instanceName );
+  if( itMouseListener != mMouseListeners.end() ) {
+    mMouseListeners.erase( itMouseListener );
+  }
+  else {
+        // Doesn't Exist
+  }
+}
+
+void InputManager::removeJoystickListener( const std::string& instanceName ) {
+    // Check if item exists
+  itJoystickListener = mJoystickListeners.find( instanceName );
+  if( itJoystickListener != mJoystickListeners.end() ) {
+    mJoystickListeners.erase( itJoystickListener );
+  }
+  else {
+        // Doesn't Exist
+  }
+}
+
+void InputManager::removeKeyListener( OIS::KeyListener *keyListener ) {
+  itKeyListener    = mKeyListeners.begin();
+  itKeyListenerEnd = mKeyListeners.end();
+  for(; itKeyListener != itKeyListenerEnd; ++itKeyListener ) {
+    if( itKeyListener->second == keyListener ) {
+      mKeyListeners.erase( itKeyListener );
+      break;
+    }
+  }
+}
+
+void InputManager::removeMouseListener( OIS::MouseListener *mouseListener ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if( itMouseListener->second == mouseListener ) {
+      mMouseListeners.erase( itMouseListener );
+      break;
+    }
+  }
+}
+
+void InputManager::removeJoystickListener( OIS::JoyStickListener *joystickListener ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if( itJoystickListener->second == joystickListener ) {
+      mJoystickListeners.erase( itJoystickListener );
+      break;
+    }
+  }
+}
+
+void InputManager::removeAllListeners( void ) {
+  mKeyListeners.clear();
+  mMouseListeners.clear();
+  mJoystickListeners.clear();
+}
+
+void InputManager::removeAllKeyListeners( void ) {
+  mKeyListeners.clear();
+}
+
+void InputManager::removeAllMouseListeners( void ) {
+  mMouseListeners.clear();
+}
+
+void InputManager::removeAllJoystickListeners( void ) {
+  mJoystickListeners.clear();
+}
+
+void InputManager::setWindowExtents( int width, int height ) {
+    // Set mouse region (if window resizes, we should alter this to reflect as well)
+  const OIS::MouseState &mouseState = mMouse->getMouseState();
+  mouseState.width  = width;
+  mouseState.height = height;
+}
+
+OIS::Mouse* InputManager::getMouse( void ) {
+  return mMouse;
+}
+
+OIS::Keyboard* InputManager::getKeyboard( void ) {
+  return mKeyboard;
+}
+
+OIS::JoyStick* InputManager::getJoystick( unsigned int index ) {
+    // Make sure it's a valid index
+  if( index < mJoysticks.size() ) {
+    return mJoysticks[ index ];
+  }
+
+  return 0;
+}
+
+int InputManager::getNumOfJoysticks( void ) {
+    // Cast to keep compiler happy ^^
+  return (int) mJoysticks.size();
+}
+
+bool InputManager::keyPressed( const OIS::KeyEvent &e ) {
+  itKeyListener    = mKeyListeners.begin();
+  itKeyListenerEnd = mKeyListeners.end();
+  for(; itKeyListener != itKeyListenerEnd; ++itKeyListener ) {
+    if(!itKeyListener->second->keyPressed( e ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::keyReleased( const OIS::KeyEvent &e ) {
+  itKeyListener    = mKeyListeners.begin();
+  itKeyListenerEnd = mKeyListeners.end();
+  for(; itKeyListener != itKeyListenerEnd; ++itKeyListener ) {
+    if(!itKeyListener->second->keyReleased( e ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::mouseMoved( const OIS::MouseEvent &e ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if(!itMouseListener->second->mouseMoved( e ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::mousePressed( const OIS::MouseEvent &e, OIS::MouseButtonID id ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if(!itMouseListener->second->mousePressed( e, id ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::mouseReleased( const OIS::MouseEvent &e, OIS::MouseButtonID id ) {
+  itMouseListener    = mMouseListeners.begin();
+  itMouseListenerEnd = mMouseListeners.end();
+  for(; itMouseListener != itMouseListenerEnd; ++itMouseListener ) {
+    if(!itMouseListener->second->mouseReleased( e, id ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::povMoved( const OIS::JoyStickEvent &e, int pov ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->povMoved( e, pov ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::axisMoved( const OIS::JoyStickEvent &e, int axis ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->axisMoved( e, axis ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::sliderMoved( const OIS::JoyStickEvent &e, int sliderID ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->sliderMoved( e, sliderID ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::buttonPressed( const OIS::JoyStickEvent &e, int button ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->buttonPressed( e, button ))
+      break;
+  }
+
+  return true;
+}
+
+bool InputManager::buttonReleased( const OIS::JoyStickEvent &e, int button ) {
+  itJoystickListener    = mJoystickListeners.begin();
+  itJoystickListenerEnd = mJoystickListeners.end();
+  for(; itJoystickListener != itJoystickListenerEnd; ++itJoystickListener ) {
+    if(!itJoystickListener->second->buttonReleased( e, button ))
+      break;
+  }
+
+  return true;
+}
+
+InputManager* InputManager::getSingletonPtr( void ) {
+  if( !mInputManager ) {
+    mInputManager = new InputManager();
+  }
+
+  return mInputManager;
+}
Index: /code/branches/network/src/orxonox/InputManager.h
===================================================================
--- /code/branches/network/src/orxonox/InputManager.h	(revision 861)
+++ /code/branches/network/src/orxonox/InputManager.h	(revision 861)
@@ -0,0 +1,93 @@
+#ifndef _InputManager_H__
+#define _InputManager_H__
+
+#ifdef WIN32
+#include <OIS/OISMouse.h>
+#include <OIS/OISKeyboard.h>
+#include <OIS/OISJoyStick.h>
+#include <OIS/OISInputManager.h>
+#else
+#include <OISMouse.h>
+#include <OISKeyboard.h>
+#include <OISJoyStick.h>
+#include <OISInputManager.h>
+#endif
+
+#include <OgreRenderWindow.h>
+
+#include "OrxonoxPrereqs.h"
+
+class _OrxonoxExport InputManager : public OIS::KeyListener, public OIS::MouseListener, public OIS::JoyStickListener {
+  public:
+    virtual ~InputManager( void );
+
+    void initialise( Ogre::RenderWindow *renderWindow );
+    void capture( void );
+
+    void addKeyListener( OIS::KeyListener *keyListener, const std::string& instanceName );
+    void addMouseListener( OIS::MouseListener *mouseListener, const std::string& instanceName );
+    void addJoystickListener( OIS::JoyStickListener *joystickListener, const std::string& instanceName );
+
+    void removeKeyListener( const std::string& instanceName );
+    void removeMouseListener( const std::string& instanceName );
+    void removeJoystickListener( const std::string& instanceName );
+
+    void removeKeyListener( OIS::KeyListener *keyListener );
+    void removeMouseListener( OIS::MouseListener *mouseListener );
+    void removeJoystickListener( OIS::JoyStickListener *joystickListener );
+
+    void removeAllListeners( void );
+    void removeAllKeyListeners( void );
+    void removeAllMouseListeners( void );
+    void removeAllJoystickListeners( void );
+
+    void setWindowExtents( int width, int height );
+
+    OIS::Mouse*    getMouse( void );
+    OIS::Keyboard* getKeyboard( void );
+    OIS::JoyStick* getJoystick( unsigned int index );
+
+    int getNumOfJoysticks( void );
+
+    static InputManager* getSingletonPtr( void );
+  private:
+    InputManager( void );
+    InputManager( const InputManager& ) { }
+    InputManager & operator = ( const InputManager& );
+
+    bool keyPressed( const OIS::KeyEvent &e );
+    bool keyReleased( const OIS::KeyEvent &e );
+
+    bool mouseMoved( const OIS::MouseEvent &e );
+    bool mousePressed( const OIS::MouseEvent &e, OIS::MouseButtonID id );
+    bool mouseReleased( const OIS::MouseEvent &e, OIS::MouseButtonID id );
+
+    bool povMoved( const OIS::JoyStickEvent &e, int pov );
+    bool axisMoved( const OIS::JoyStickEvent &e, int axis );
+    bool sliderMoved( const OIS::JoyStickEvent &e, int sliderID );
+    bool buttonPressed( const OIS::JoyStickEvent &e, int button );
+    bool buttonReleased( const OIS::JoyStickEvent &e, int button );
+
+    OIS::Mouse        *mMouse;
+    OIS::Keyboard     *mKeyboard;
+    OIS::InputManager *mInputSystem;
+
+    std::vector<OIS::JoyStick*> mJoysticks;
+    std::vector<OIS::JoyStick*>::iterator itJoystick;
+    std::vector<OIS::JoyStick*>::iterator itJoystickEnd;
+
+    std::map<std::string, OIS::KeyListener*> mKeyListeners;
+    std::map<std::string, OIS::MouseListener*> mMouseListeners;
+    std::map<std::string, OIS::JoyStickListener*> mJoystickListeners;
+
+    std::map<std::string, OIS::KeyListener*>::iterator itKeyListener;
+    std::map<std::string, OIS::MouseListener*>::iterator itMouseListener;
+    std::map<std::string, OIS::JoyStickListener*>::iterator itJoystickListener;
+
+    std::map<std::string, OIS::KeyListener*>::iterator itKeyListenerEnd;
+    std::map<std::string, OIS::MouseListener*>::iterator itMouseListenerEnd;
+    std::map<std::string, OIS::JoyStickListener*>::iterator itJoystickListenerEnd;
+
+    static InputManager *mInputManager;
+};
+#endif /* _InputManager_H__ */
Index: /code/branches/network/src/orxonox/Main.cc
===================================================================
--- /code/branches/network/src/orxonox/Main.cc	(revision 861)
+++ /code/branches/network/src/orxonox/Main.cc	(revision 861)
@@ -0,0 +1,209 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+ /**
+ @file  Main.cc
+ @brief main file handling most of the machine specific code
+  */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgrePlatform.h>
+#include <OgreException.h>
+
+
+#include "core/SignalHandler.h"
+#include "Orxonox.h"
+
+using namespace orxonox;
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+#include <CoreFoundation/CoreFoundation.h>
+
+// This function will locate the path to our application on OS X,
+// unlike windows you can not rely on the curent working directory
+// for locating your configuration files and resources.
+             std::string macBundlePath()
+{
+  char path[1024];
+  CFBundleRef mainBundle = CFBundleGetMainBundle();
+  assert(mainBundle);
+
+  CFURLRef mainBundleURL = CFBundleCopyBundleURL(mainBundle);
+  assert(mainBundleURL);
+
+  CFStringRef cfStringRef = CFURLCopyFileSystemPath( mainBundleURL, kCFURLPOSIXPathStyle);
+  assert(cfStringRef);
+
+  CFStringGetCString(cfStringRef, path, 1024, kCFStringEncodingASCII);
+
+  CFRelease(mainBundleURL);
+  CFRelease(cfStringRef);
+
+  return std::string(path);
+}
+#endif
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined( __MINGW32__ )
+#ifndef WIN32_LEAN_AND_MEAN
+#define WIN32_LEAN_AND_MEAN
+#endif
+#include "windows.h"
+  INT WINAPI WinMain(HINSTANCE hInst, HINSTANCE, LPSTR strCmdLine, INT)
+  {
+    // something like this would be less hacky
+    // maybe one can work with trailing '\0'
+    // or maybe use string based functions
+    // I was unable to test it without working windows version
+    char* cmd = strCmdLine;
+    int argc = 2;
+    int i;
+    int j;
+    for(i = 0; cmd[i] != NULL; i++)
+    {
+      if(cmd[i] == ' ') argc++;
+    }
+    char **argv = new char*[argc];
+    for (j = 0; j < argc; j++)
+    {
+      argv[j] = new char[i];
+    }
+    j = 1;
+    int k = 0;
+    for(int i = 0; cmd[i] != NULL; i++)
+    {
+      if(cmd[i] != ' ') {
+        argv[j][k] = cmd[i];
+        k++;
+      }
+      else {
+        argv[j][k] = '\0';
+        k = 0;
+        j++;
+      }
+    }
+    argv[j][k] = '\0';
+    argv[0] = "BeniXonox.exe";
+    //char *argv[2];
+    //argv[0] = "asdfProgram";
+    //argv[1] =  strCmdLine;
+    //int argc = 2;
+#else
+  int main(int argc, char **argv)
+  {
+#endif
+    try {
+      srand(time(0));  //initaialize RNG; TODO check if it works on win
+      SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
+      Orxonox* orx = Orxonox::getSingleton();
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+      orx->init(argc, argv, macBundlePath());
+      orx->start();
+#else
+/*
+for (int i = 0; i < 500; i++)
+{
+int x = rand() % 40000 - 20000;
+int y = rand() % 40000 - 20000;
+int z = rand() % 40000 - 20000;
+
+int scale = rand() % 100 + 20;
+
+int version = rand() % 6 + 1;
+
+float rotx = float(rand()) / RAND_MAX;
+float roty = float(rand()) / RAND_MAX;
+float rotz = float(rand()) / RAND_MAX;
+
+int axis = rand() % 3 + 1;
+
+if (axis == 1)
+  rotx = 0;
+if (axis == 2)
+  roty = 0;
+if (axis == 3)
+  rotz = 0;
+
+int rotation = rand() % 40 + 10;
+
+//    <Model position="1000,1500,0" scale="50" mesh="ast1.mesh" rotationAxis="0,1.25,0" rotationRate="70" />
+std::cout << "    <Model position=\"" << x << "," << y << "," << z << "\" scale=\"" << scale << "\" mesh=\"ast" << version << ".mesh\" rotationAxis=\"" << rotx << "," << roty << "," << rotz << "\" rotationRate=\"" << rotation << "\" />" << std::endl;
+
+
+}
+*/
+      orx->init(argc, argv, "");
+      orx->start();
+#endif
+    }
+    catch (Ogre::Exception& e) {
+#if OGRE_PLATFORM == OGRE_PLATFORM_WIN32 && !defined( __MINGW32__ )
+      MessageBoxA(NULL, e.getFullDescription().c_str(),
+            "An exception has occured!", MB_OK | MB_ICONERROR | MB_TASKMODAL);
+#else
+      std::cerr << "Exception:\n";
+      std::cerr << e.getFullDescription().c_str() << "\n";
+#endif
+      return 1;
+    }
+    return 0;
+  }
+
+#ifdef __cplusplus
+}
+#endif
+
+
+/*int main(int argc, char **argv)
+{
+  try
+  {
+    SignalHandler::getInstance()->doCatch(argv[0], "orxonox.log");
+    Orxonox* orx = Orxonox::getSingleton();
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+    orx->init(argc, argv, macBundlePath());
+    orx->start();
+#else
+    orx->init(argc, argv, "");
+    orx->start();
+#endif
+
+  }
+  catch(Ogre::Exception& e)
+  {
+    fprintf(stderr, "An exception has occurred: %s\n",
+            e.getFullDescription().c_str());
+    return 1;
+  }
+
+  return 0;
+}
+
+*/
Index: /code/branches/network/src/orxonox/Orxonox.cc
===================================================================
--- /code/branches/network/src/orxonox/Orxonox.cc	(revision 861)
+++ /code/branches/network/src/orxonox/Orxonox.cc	(revision 861)
@@ -0,0 +1,481 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  Orxonox.cc
+ @brief Orxonox Main Class
+ */
+
+// Precompiled Headers
+#include "OrxonoxStableHeaders.h"
+
+//****** OGRE ******
+#include <OgreException.h>
+#include <OgreRoot.h>
+#include <OgreFrameListener.h>
+#include <OgreRenderWindow.h>
+#include <OgreTextureManager.h>
+#include <OgreResourceGroupManager.h>
+#include <OgreConfigFile.h>
+#include <OgreOverlay.h>
+#include <OgreOverlayManager.h>
+
+//****** OIS *******
+#include <OIS/OIS.h>
+
+//****** STD *******
+#include <iostream>
+#include <exception>
+
+//***** ORXONOX ****
+//misc
+#include "util/Sleep.h"
+
+// loader and audio
+#include "loader/LevelLoader.h"
+#include "audio/AudioManager.h"
+
+// network
+#include "network/Server.h"
+#include "network/Client.h"
+#include "network/NetworkFrameListener.h"
+
+// objects
+#include "objects/Tickable.h"
+#include "tools/Timer.h"
+#include "objects/NPC.h"
+#include "core/ArgReader.h"
+#include "core/Factory.h"
+#include "core/Debug.h"
+#include "hud/HUD.h"
+#include "objects/weapon/BulletManager.h"
+#include "GraphicsEngine.h"
+
+#include "Orxonox.h"
+
+namespace orxonox
+{
+   // put this in a seperate Class or solve the problem in another fashion
+  class OrxListener : public Ogre::FrameListener
+  {
+    public:
+      OrxListener(OIS::Keyboard *keyboard, audio::AudioManager*  auMan, gameMode mode)
+      {
+        mKeyboard = keyboard;
+        mode_=mode;
+        auMan_ = auMan;
+      }
+
+      bool frameStarted(const Ogre::FrameEvent& evt)
+      {
+        auMan_->update();
+        updateAI();
+
+        if(mode_ == PRESENTATION)
+          server_g->tick(evt.timeSinceLastFrame);
+        else if(mode_ == CLIENT)
+          client_g->tick(evt.timeSinceLastFrame);
+
+        usleep(10);
+
+        mKeyboard->capture();
+        return !mKeyboard->isKeyDown(OIS::KC_ESCAPE);
+      }
+
+      void updateAI()
+      {
+        for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it)
+        {
+          it->update();
+        }
+      }
+
+    private:
+      gameMode mode_;
+      OIS::Keyboard *mKeyboard;
+      audio::AudioManager*  auMan_;
+  };
+
+  // init static singleton reference of Orxonox
+  Orxonox* Orxonox::singletonRef_ = NULL;
+
+  /**
+   * create a new instance of Orxonox
+   */
+  Orxonox::Orxonox()
+  {
+    this->ogre_ = new GraphicsEngine();
+    this->dataPath_ = "";
+    this->loader_ = 0;
+    this->auMan_ = 0;
+    this->singletonRef_ = 0;
+    this->keyboard_ = 0;
+    this->mouse_ = 0;
+    this->inputManager_ = 0;
+    this->frameListener_ = 0;
+    this->root_ = 0;
+  }
+
+  /**
+   * destruct Orxonox
+   */
+  Orxonox::~Orxonox()
+  {
+    // nothing to delete as for now
+  }
+
+  /**
+   * initialization of Orxonox object
+   * @param argc argument counter
+   * @param argv list of arguments
+   * @param path path to config (in home dir or something)
+   */
+  void Orxonox::init(int argc, char **argv, std::string path)
+  {
+    //TODO: find config file (assuming executable directory)
+    //TODO: read config file
+    //TODO: give config file to Ogre
+    std::string mode;
+//     if(argc>=2)
+//       mode = std::string(argv[1]);
+//     else
+//       mode = "";
+    ArgReader ar = ArgReader(argc, argv);
+    ar.checkArgument("mode", mode, false);
+    ar.checkArgument("data", this->dataPath_, false);
+    ar.checkArgument("ip", serverIp_, false);
+    //mode = "presentation";
+    if(ar.errorHandling()) die();
+    if(mode == std::string("server"))
+    {
+      serverInit(path);
+      mode_ = SERVER;
+    }
+    else if(mode == std::string("client"))
+    {
+      clientInit(path);
+      mode_ = CLIENT;
+    }
+    else if(mode == std::string("presentation"))
+    {
+      serverInit(path);
+      mode_ = PRESENTATION;
+    }
+    else{
+      standaloneInit(path);
+      mode_ = STANDALONE;
+    }
+  }
+
+  /**
+   * start modules
+   */
+  void Orxonox::start()
+  {
+    //TODO: start modules
+    ogre_->startRender();
+    //TODO: run engine
+    Factory::createClassHierarchy();
+    createScene();
+    setupScene();
+    setupInputSystem();
+    if(mode_!=CLIENT){ // remove this in future ---- presentation hack
+    }
+    else
+      std::cout << "client here" << std::endl;
+    createFrameListener();
+    switch(mode_){
+    case PRESENTATION:
+      //ogre_->getRoot()->addFrameListener(new network::ServerFrameListener());
+      //std::cout << "could not add framelistener" << std::endl;
+      server_g->open();
+      break;
+    case CLIENT:
+      client_g->establishConnection();
+      break;
+    case SERVER:
+    case STANDALONE:
+    default:
+      break;
+    }
+    startRenderLoop();
+  }
+
+  /**
+   * @return singleton object
+   */
+  Orxonox* Orxonox::getSingleton()
+  {
+    if (!singletonRef_)
+      singletonRef_ = new Orxonox();
+    return singletonRef_;
+  }
+
+  /**
+   * error kills orxonox
+   */
+  void Orxonox::die(/* some error code */)
+  {
+    //TODO: destroy and destruct everything and print nice error msg
+    delete this;
+  }
+
+  void Orxonox::standaloneInit(std::string path)
+  {
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    root_ = ogre_->getRoot();
+    if(!ogre_->load()) die(/* unable to load */);
+
+    //defineResources();
+    //setupRenderSystem();
+    //createRenderWindow();
+    //initializeResourceGroups();
+    /*createScene();
+    setupScene();
+    setupInputSystem();
+    createFrameListener();
+    Factory::createClassHierarchy();
+    startRenderLoop();*/
+  }
+
+  void Orxonox::playableServer(std::string path)
+  {
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    root_ = ogre_->getRoot();
+    defineResources();
+    setupRenderSystem();
+    createRenderWindow();
+    initializeResourceGroups();
+    setupInputSystem();
+    Factory::createClassHierarchy();
+    createScene();
+    setupScene();
+    createFrameListener();
+    try{
+      server_g = new network::Server(); //!< add port and bindadress
+      server_g->open(); //!< open server and create listener thread
+      if(ogre_ && ogre_->getRoot())
+        ogre_->getRoot()->addFrameListener(new network::ServerFrameListener()); // adds a framelistener for the server
+      COUT(3) << "Info: network framelistener added" << std::endl;
+    }
+    catch(...)
+    {
+      COUT(1) << "Error: There was a problem initialising the server :(" << std::endl;
+    }
+    startRenderLoop();
+  }
+
+  void Orxonox::standalone(){
+
+
+
+  }
+
+  void Orxonox::serverInit(std::string path)
+  {
+    COUT(2) << "initialising server" << std::endl;
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    server_g = new network::Server(); // FIXME add some settings if wanted
+    if(!ogre_->load()) die(/* unable to load */);
+    // FIXME add network framelistener
+  }
+
+  void Orxonox::clientInit(std::string path)
+  {
+    COUT(2) << "initialising client" << std::endl;
+    ogre_->setConfigPath(path);
+    ogre_->setup();
+    if(serverIp_.compare("")==0)
+      client_g = new network::Client();
+    else
+      client_g = new network::Client(serverIp_, 55556);
+    if(!ogre_->load()) die(/* unable to load */);
+    ogre_->getRoot()->addFrameListener(new network::ClientFrameListener());
+  }
+
+  void Orxonox::defineResources()
+  {
+    std::string secName, typeName, archName;
+    Ogre::ConfigFile cf;
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+    cf.load(macBundlePath() + "/Contents/Resources/resources.cfg");
+#else
+    cf.load(dataPath_ + "resources.cfg");
+#endif
+
+    Ogre::ConfigFile::SectionIterator seci = cf.getSectionIterator();
+    while (seci.hasMoreElements())
+    {
+      secName = seci.peekNextKey();
+      Ogre::ConfigFile::SettingsMultiMap *settings = seci.getNext();
+      Ogre::ConfigFile::SettingsMultiMap::iterator i;
+      for (i = settings->begin(); i != settings->end(); ++i)
+      {
+        typeName = i->first;
+        archName = i->second;
+#if OGRE_PLATFORM == OGRE_PLATFORM_APPLE
+        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( std::string(macBundlePath() + "/" + archName), typeName, secName);
+#else
+        Ogre::ResourceGroupManager::getSingleton().addResourceLocation( archName, typeName, secName);
+#endif
+      }
+    }
+  }
+
+  void Orxonox::setupRenderSystem()
+  {
+    if (!root_->restoreConfig() && !root_->showConfigDialog())
+      throw Ogre::Exception(52, "User canceled the config dialog!", "OrxApplication::setupRenderSystem()");
+  }
+
+  void Orxonox::createRenderWindow()
+  {
+    root_->initialise(true, "OrxonoxV2");
+  }
+
+  void Orxonox::initializeResourceGroups()
+  {
+    Ogre::TextureManager::getSingleton().setDefaultNumMipmaps(5);
+    Ogre::ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
+  }
+
+  /**
+   *
+   * @param
+   */
+  void Orxonox::createScene(void)
+  {
+	// Init audio
+    auMan_ = new audio::AudioManager();
+
+    bulletMgr_ = new BulletManager();
+
+    // load this file from config
+    loader_ = new loader::LevelLoader("sample.oxw");
+    loader_->loadLevel();
+
+    Ogre::Overlay* hudOverlay = Ogre::OverlayManager::getSingleton().getByName("Orxonox/HUD1.2");
+    HUD* orxonoxHud;
+    orxonoxHud = new HUD();
+    orxonoxHud->setEnergyValue(20);
+    orxonoxHud->setEnergyDistr(20,20,60);
+    hudOverlay->show();
+
+	/*
+    auMan_->ambientAdd("a1");
+    auMan_->ambientAdd("a2");
+    auMan_->ambientAdd("a3");
+                                //auMan->ambientAdd("ambient1");
+    auMan_->ambientStart();*/
+  }
+
+
+  /**
+   *
+   */
+  void Orxonox::setupScene()
+  {
+//    SceneManager *mgr = ogre_->getSceneManager();
+
+
+//    SceneNode* node = (SceneNode*)mgr->getRootSceneNode()->getChild("OgreHeadNode");
+//     SceneNode *node = mgr->getRootSceneNode()->createChildSceneNode("OgreHeadNode", Vector3(0,0,0));
+
+
+/*
+    particle::ParticleInterface *e = new particle::ParticleInterface(mgr,"engine","Orxonox/strahl");
+    e->particleSystem_->setParameter("local_space","true");
+    e->setPositionOfEmitter(0, Vector3(0,-10,0));
+    e->setDirection(Vector3(0,0,-1));
+    e->addToSceneNode(node);
+*/
+  }
+
+
+  void Orxonox::setupInputSystem()
+  {
+    size_t windowHnd = 0;
+    std::ostringstream windowHndStr;
+    OIS::ParamList pl;
+
+    // fixes auto repeat problem
+    #if defined OIS_LINUX_PLATFORM
+      pl.insert(std::make_pair(std::string("XAutoRepeatOn"), std::string("true")));
+    #endif
+
+      Ogre::RenderWindow *win = ogre_->getRoot()->getAutoCreatedWindow();
+    win->getCustomAttribute("WINDOW", &windowHnd);
+    windowHndStr << windowHnd;
+    pl.insert(std::make_pair(std::string("WINDOW"), windowHndStr.str()));
+    inputManager_ = OIS::InputManager::createInputSystem(pl);
+
+    try
+    {
+      keyboard_ = static_cast<OIS::Keyboard*>(inputManager_->createInputObject(OIS::OISKeyboard, false));
+      mouse_ = static_cast<OIS::Mouse*>(inputManager_->createInputObject(OIS::OISMouse, true));
+    }
+    catch (const OIS::Exception &e)
+    {
+      throw new Ogre::Exception(42, e.eText, "OrxApplication::setupInputSystem");
+    }
+  }
+
+  // FIXME we actually want to do this differently...
+  void Orxonox::createFrameListener()
+  {
+    TickFrameListener* TickFL = new TickFrameListener();
+    ogre_->getRoot()->addFrameListener(TickFL);
+
+    TimerFrameListener* TimerFL = new TimerFrameListener();
+    ogre_->getRoot()->addFrameListener(TimerFL);
+
+    //if(mode_!=CLIENT) // FIXME just a hack ------- remove this in future
+      frameListener_ = new OrxListener(keyboard_, auMan_, mode_);
+    ogre_->getRoot()->addFrameListener(frameListener_);
+  }
+
+  void Orxonox::startRenderLoop()
+  {
+    // FIXME
+    // this is a hack!!!
+    // the call to reset the mouse clipping size should probably be somewhere
+    // else, however this works for the moment.
+    unsigned int width, height, depth;
+    int left, top;
+    ogre_->getRoot()->getAutoCreatedWindow()->getMetrics(width, height, depth, left, top);
+
+    if(mode_!=CLIENT){
+      const OIS::MouseState &ms = mouse_->getMouseState();
+      ms.width = width;
+      ms.height = height;
+    }
+    ogre_->getRoot()->startRendering();
+  }
+}
Index: /code/branches/network/src/orxonox/Orxonox.h
===================================================================
--- /code/branches/network/src/orxonox/Orxonox.h	(revision 861)
+++ /code/branches/network/src/orxonox/Orxonox.h	(revision 861)
@@ -0,0 +1,86 @@
+/**
+ @file  Orxonox.h
+ @brief Main Orxonox Class File
+ @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _Orxonox_H__
+#define _Orxonox_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+#include <OIS/OISPrereqs.h>
+
+#include "OrxonoxPrereqs.h"
+#include "loader/LoaderPrereqs.h"
+#include "audio/AudioPrereqs.h"
+
+#include "GraphicsEngine.h"
+
+
+// TODO: Orxonox should maybe derive from BaseObject
+//! Orxonox singleton class
+namespace orxonox {
+
+  enum gameMode{
+    STANDALONE,
+    SERVER,
+    CLIENT,
+    PRESENTATION
+  };
+
+  class _OrxonoxExport Orxonox
+  {
+    public:
+      void init(int argc, char **argv, std::string path);
+      void start();
+      // not sure if this should be private
+      void die(/* some error code */);
+      static Orxonox* getSingleton();
+      inline Ogre::SceneManager* getSceneManager()         { return ogre_->getSceneManager(); };
+      inline GraphicsEngine* getOgrePointer()              { return ogre_; };
+      inline audio::AudioManager* getAudioManagerPointer() { return auMan_; };
+      inline OIS::Keyboard* getKeyboard()                  { return this->keyboard_; }
+      inline OIS::Mouse* getMouse()                        { return this->mouse_; }
+      inline BulletManager* getBulletMgr()                 { return this->bulletMgr_; }
+
+    private:
+      Orxonox();
+      virtual ~Orxonox();
+      // init functions
+      void serverInit(std::string path);
+      void clientInit(std::string path);
+      void standaloneInit(std::string path);
+      // run functions
+      void playableServer(std::string path);
+      void standalone();
+      void defineResources();
+      void setupRenderSystem();
+      void createRenderWindow();
+      void initializeResourceGroups();
+      void createScene(void);
+      void setupScene();
+      void setupInputSystem();
+      void createFrameListener();
+      void startRenderLoop();
+
+    private:
+      GraphicsEngine*       ogre_;          //!< our dearest graphics engine <3
+      std::string           dataPath_;      //!< path to data
+      loader::LevelLoader*  loader_;        //!< level loader builds the scene
+      audio::AudioManager*  auMan_;         //!< audio manager
+      BulletManager*        bulletMgr_;     //!< Keeps track of the thrown bullets
+      static Orxonox*       singletonRef_;
+      OIS::Keyboard*        keyboard_;
+      OIS::Mouse*           mouse_;
+      OIS::InputManager*    inputManager_;
+      OrxListener*          frameListener_;
+      Ogre::Root*           root_;
+
+      // this is used to identify the mode (server/client/...) we're in
+      gameMode              mode_;
+      std::string           serverIp_;
+  };
+}
+#endif /* _Orxonox_H__ */
Index: /code/branches/network/src/orxonox/OrxonoxPlatform.h
===================================================================
--- /code/branches/network/src/orxonox/OrxonoxPlatform.h	(revision 861)
+++ /code/branches/network/src/orxonox/OrxonoxPlatform.h	(revision 861)
@@ -0,0 +1,255 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      An unknown man from the Ogre development crew
+ *   Co-authors:
+ *      Reto Grieder (OGRE --> ORXONOX)
+ *
+ */
+
+/**
+ @file  OrxonoxPlatform.h
+ @brief Various constants for compiler, architecture and platform. It's a mere
+        copy of the file found in the Ogre source code (OgrePlatform.h).
+ */
+
+#ifndef _OrxonoxPlatform_H__
+#define _OrxonoxPlatform_H__
+
+namespace orxonox {
+/* Initial platform/compiler-related stuff to set.
+*/
+#define ORXONOX_PLATFORM_WIN32 1
+#define ORXONOX_PLATFORM_LINUX 2
+#define ORXONOX_PLATFORM_APPLE 3
+
+#define ORXONOX_COMPILER_MSVC 1
+#define ORXONOX_COMPILER_GNUC 2
+#define ORXONOX_COMPILER_BORL 3
+
+#define ORXONOX_ENDIAN_LITTLE 1
+#define ORXONOX_ENDIAN_BIG 2
+
+#define ORXONOX_ARCHITECTURE_32 1
+#define ORXONOX_ARCHITECTURE_64 2
+
+/* Finds the compiler type and version.
+*/
+#if defined( _MSC_VER )
+#  define ORXONOX_COMPILER ORXONOX_COMPILER_MSVC
+#  define ORXONOX_COMP_VER _MSC_VER
+
+#elif defined( __GNUC__ )
+#  define ORXONOX_COMPILER ORXONOX_COMPILER_GNUC
+#  define ORXONOX_COMP_VER (((__GNUC__)*100) + \
+        (__GNUC_MINOR__*10) + \
+        __GNUC_PATCHLEVEL__)
+
+#elif defined( __BORLANDC__ )
+#  define ORXONOX_COMPILER ORXONOX_COMPILER_BORL
+#  define ORXONOX_COMP_VER __BCPLUSPLUS__
+
+#else
+#  pragma error "No known compiler. Abort! Abort!"
+
+#endif
+
+/* See if we can use __forceinline or if we need to use __inline instead */
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+#  if ORXONOX_COMP_VER >= 1200
+#    define FORCEINLINE __forceinline
+#  endif
+#elif defined(__MINGW32__)
+#  if !defined(FORCEINLINE)
+#    define FORCEINLINE __inline
+#  endif
+#else
+#  define FORCEINLINE __inline
+#endif
+
+/* Finds the current platform */
+
+#if defined( __WIN32__ ) || defined( _WIN32 )
+#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_WIN32
+
+#elif defined( __APPLE_CC__)
+#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_APPLE
+
+#else
+#  define ORXONOX_PLATFORM ORXONOX_PLATFORM_LINUX
+#endif
+
+    /* Find the arch type */
+#if defined(__x86_64__) || defined(_M_X64) || defined(__powerpc64__) || defined(__alpha__) || defined(__ia64__) || defined(__s390__) || defined(__s390x__)
+#  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_64
+#else
+#  define ORXONOX_ARCH_TYPE ORXONOX_ARCHITECTURE_32
+#endif
+
+// For generating compiler warnings - should work on any compiler
+// As a side note, if you start your message with 'Warning: ', the MSVC
+// IDE actually does catch a warning :)
+#define ORXONOX_QUOTE_INPLACE(x) # x
+#define ORXONOX_QUOTE(x) ORXONOX_QUOTE_INPLACE(x)
+#define ORXONOX_WARN( x )  message( __FILE__ "(" QUOTE( __LINE__ ) ") : " x "\n" )
+
+//----------------------------------------------------------------------------
+// Windows Settings
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32
+
+// Win32 compilers use _DEBUG for specifying debug builds.
+#  ifdef _DEBUG
+#    define ORXONOX_DEBUG_MODE 1
+#  else
+#    define ORXONOX_DEBUG_MODE 0
+#  endif
+
+// Disable unicode support on MingW at the moment, poorly supported in stdlibc++
+// STLPORT fixes this though so allow if found
+// MinGW C++ Toolkit supports unicode and sets the define __MINGW32_TOOLKIT_UNICODE__ in _mingw.h
+#  if defined( __MINGW32__ ) && !defined(_STLPORT_VERSION)
+#    include<_mingw.h>
+#    if defined(__MINGW32_TOOLBOX_UNICODE__)
+#      define ORXONOX_UNICODE_SUPPORT 1
+#    else
+#      define ORXONOX_UNICODE_SUPPORT 0
+#    endif
+#  else
+#    define ORXONOX_UNICODE_SUPPORT 1
+#  endif
+
+#endif
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// Linux/Apple Settings
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_LINUX || ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+
+
+// A quick define to overcome different names for the same function
+#  define stricmp strcasecmp
+
+// Unlike the Win32 compilers, Linux compilers seem to use DEBUG for when
+// specifying a debug build.
+// (??? this is wrong, on Linux debug builds aren't marked in any way unless
+// you mark it yourself any way you like it -- zap ???)
+#  ifdef DEBUG
+#    define ORXONOX_DEBUG_MODE 1
+#  else
+#    define ORXONOX_DEBUG_MODE 0
+#  endif
+
+/* FIXME: Check what this actually is and whether we need it or not
+#  if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+#    define ORXONOX_PLATFORM_LIB "OrxonoxPlatform.bundle"
+#  else
+// ORXONOX_PLATFORM_LINUX
+#    define ORXONOX_PLATFORM_LIB "libOrxonoxPlatform.so"
+#  endif
+*/
+
+// Always enable unicode support for the moment
+// Perhaps disable in old versions of gcc if necessary
+#  define ORXONOX_UNICODE_SUPPORT 1
+
+#endif
+
+//For apple, we always have a custom config.h file
+#if ORXONOX_PLATFORM == ORXONOX_PLATFORM_APPLE
+#  include "config.h"
+#endif
+
+//----------------------------------------------------------------------------
+
+//----------------------------------------------------------------------------
+// Endian Settings
+// check for BIG_ENDIAN config flag, set ORXONOX_ENDIAN correctly
+#ifdef ORXONOX_CONFIG_BIG_ENDIAN
+#  define ORXONOX_ENDIAN ORXONOX_ENDIAN_BIG
+#else
+#  define ORXONOX_ENDIAN ORXONOX_ENDIAN_LITTLE
+#endif
+
+// Integer formats of fixed bit width
+typedef unsigned int uint32;
+typedef unsigned short uint16;
+typedef unsigned char uint8;
+
+#ifdef ORXONOX_DOUBLE_PRECISION
+typedef double Real;
+#else
+typedef float Real;
+#endif
+
+
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+// Turn off warnings generated by long std templates
+// This warns about truncation to 255 characters in debug/browse info
+//#   pragma warning (disable : 4786)
+
+// Turn off warnings generated by long std templates
+// This warns about truncation to 255 characters in debug/browse info
+//#   pragma warning (disable : 4503)
+
+// disable: "conversion from 'double' to 'float', possible loss of data
+//#   pragma warning (disable : 4244)
+
+// disable: "conversion from 'size_t' to 'unsigned int', possible loss of data
+//#   pragma warning (disable : 4267)
+
+// disable: "truncation from 'double' to 'float'
+//#   pragma warning (disable : 4305)
+
+// disable: "<type> needs to have dll-interface to be used by clients'
+// Happens on STL member variables which are not public therefore is ok
+//#   pragma warning (disable : 4251)
+
+// disable: "non dll-interface class used as base for dll-interface class"
+// Happens when deriving from Singleton because bug in compiler ignores
+// template export
+//#   pragma warning (disable : 4275)
+
+// disable: "C++ Exception Specification ignored"
+// This is because MSVC 6 did not implement all the C++ exception
+// specifications in the ANSI C++ draft.
+//#   pragma warning( disable : 4290 )
+
+// disable: "no suitable definition provided for explicit template
+// instantiation request" Occurs in VC7 for no justifiable reason on all
+// #includes of Singleton
+//#   pragma warning( disable: 4661)
+
+// disable: deprecation warnings when using CRT calls in VC8
+// These show up on all C runtime lib code in VC8, disable since they clutter
+// the warnings with things we may not be able to do anything about (e.g.
+// generated code from nvparse etc). I doubt very much that these calls
+// will ever be actually removed from VC anyway, it would break too much code.
+//#	pragma warning( disable: 4996)
+
+// disable: "conditional expression constant", always occurs on 
+// ORXONOX_MUTEX_CONDITIONAL when no threading enabled
+//#   pragma warning (disable : 201)
+
+#endif
+
+} /* namespace orxonox */
+
+#endif /* _OrxonoxPlatform_H__ */
Index: /code/branches/network/src/orxonox/OrxonoxPrereqs.h
===================================================================
--- /code/branches/network/src/orxonox/OrxonoxPrereqs.h	(revision 861)
+++ /code/branches/network/src/orxonox/OrxonoxPrereqs.h	(revision 861)
@@ -0,0 +1,97 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  OrxonoxPrereqs.h
+ @brief Contains all the necessary forward declarations for all classes and structs.
+ */
+
+#ifndef _OrxonoxPrereqs_H__
+#define _OrxonoxPrereqs_H__
+
+#include "OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !(defined(ORXONOX_STATIC_BUILD) || defined(ORXONOX_NO_EXPORTS))
+#  ifdef ORXONOX_SHARED_BUILD
+#    define _OrxonoxExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _OrxonoxExport
+#    else
+#      define _OrxonoxExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _OrxonoxExport  __attribute__ ((visibility("default")))
+#else
+#  define _OrxonoxExport
+#endif
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+// classes that have not yet been put into a namespace
+class InputManager;
+class SpaceShipSteering;
+
+namespace orxonox {
+  class Ambient;
+  class BaseObject;
+  class Camera;
+  class GraphicsEngine;
+  class Mesh;
+  class Model;
+  class NPC;
+  class OrxListener;
+  class Orxonox;
+  class Skybox;
+  class SpaceShip;
+  class Tickable;
+  class TickFrameListener;
+  template <class T>
+  class Timer;
+  class TimerBase;
+  class TimerFrameListener;
+  class WorldEntity;
+
+  class AmmunitionDump;
+  class Bullet;
+  class BulletManager;
+  class BaseWeapon;
+  class BarrelGun;
+  class WeaponStation;
+
+  class ParticleInterface;
+  class HUD;
+}
+
+
+#endif /* _OrxonoxPrereqs_H__ */
Index: /code/branches/network/src/orxonox/OrxonoxStableHeaders.h
===================================================================
--- /code/branches/network/src/orxonox/OrxonoxStableHeaders.h	(revision 861)
+++ /code/branches/network/src/orxonox/OrxonoxStableHeaders.h	(revision 861)
@@ -0,0 +1,122 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  OrxonoxStableHeaders.h
+ @brief Contains the bigger (or smaller) header files in order to precompile them with MSVC
+ */
+
+#ifndef _OrxonoxStableHeaders_H__
+#define _OrxonoxStableHeaders_H__
+
+#include "OrxonoxPlatform.h"
+
+#if ORXONOX_COMPILER == ORXONOX_COMPILER_MSVC
+
+// including std headers here is useless since they're already precompiled
+
+// not including the entire Ogre.h doesn't exceed the default heap size for pch
+//#include <Ogre.h>
+#include <OgreBillboardSet.h>
+#include <OgreCamera.h>
+#include <OgreConfigFile.h>
+#include <OgreEntity.h>
+#include <OgreException.h>
+#include <OgreFrameListener.h>
+#include <OgreLight.h>
+#include <OgreOverlay.h>
+#include <OgreOverlayElement.h>
+#include <OgreOverlayManager.h>
+#include <OgreParticleEmitter.h>
+#include <OgreParticleSystem.h>
+#include <OgrePlatform.h>
+#include <OgrePrerequisites.h>
+#include <OgreRenderWindow.h>
+#include <OgreRoot.h>
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreStringConverter.h>
+#include <OgreTextureManager.h>
+#include <OgreViewport.h>
+
+#include <OIS/OIS.h>
+
+/**
+* Some of the not so stable header files.
+* But it's not very useful to include them anyway..
+**/
+
+//#include "audio/AudioManager.h"
+
+#include "core/CoreIncludes.h"
+#include "core/BaseObject.h"
+//#include "core/ArgReader.h"
+#include "core/Error.h"
+
+#include "network/Synchronisable.h"
+//#include "network/Server.h"
+//#include "network/Client.h"
+
+#include "util/Math.h"
+#include "util/Convert.h"
+#include "util/Sleep.h"
+#include "util/String2Number.h"
+#include "util/Tokenizer.h"
+#include "util/tinyxml/ticpp.h"
+#include "util/tinyxml/tinyxml.h"
+
+//#include "hud/HUD.h"
+//#include "loader/LevelLoader.h"
+//#include "objects/weapon/AmmunitionDump.h"
+//#include "objects/weapon/BarrelGun.h"
+//#include "objects/weapon/Bullet.h"
+//#include "objects/weapon/BulletManager.h"
+//#include "objects/weapon/WeaponStation.h"
+//#include "objects/Ambient.h"
+//#include "objects/Camera.h"
+//#include "objects/Explosion.h"
+//#include "objects/Fighter.h"
+#include "objects/Model.h"
+//#include "objects/NPC.h"
+//#include "objects/Projectile.h"
+//#include "objects/Skybox.h"
+//#include "objects/SpaceShipSteeringObject.h"
+#include "objects/Tickable.h"
+#include "objects/WorldEntity.h"
+//#include "particle/ParticleInterface.h"
+//#include "tools/BillboardSet.h"
+//#include "tools/Light.h"
+//#include "tools/Mesh.h"
+//#include "tools/Timer.h"
+//#include "GraphicsEngine.h"
+//#include "InputManager.h"
+//#include "Orxonox.h"
+//#include "SpaceshipSteering.h"
+
+#endif
+
+#endif /* _OrxonoxStableHeaders_H__ */
Index: /code/branches/network/src/orxonox/PrecompiledHeaderFiles.cc
===================================================================
--- /code/branches/network/src/orxonox/PrecompiledHeaderFiles.cc	(revision 861)
+++ /code/branches/network/src/orxonox/PrecompiledHeaderFiles.cc	(revision 861)
@@ -0,0 +1,33 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  PrecompiledHeaderFiles.cc
+ @brief This file actually generates the precompiled header file
+ */
+
+#include "OrxonoxStableHeaders.h"
Index: /code/branches/network/src/orxonox/SpaceshipSteering.cc
===================================================================
--- /code/branches/network/src/orxonox/SpaceshipSteering.cc	(revision 861)
+++ /code/branches/network/src/orxonox/SpaceshipSteering.cc	(revision 861)
@@ -0,0 +1,233 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreNode.h>
+#include <OgreSceneNode.h>
+
+#include "core/Debug.h"
+#include "util/Math.h"
+#include "SpaceshipSteering.h"
+
+namespace orxonox
+{
+
+  SpaceshipSteering::SpaceshipSteering(float maxSpeedForward, float
+    maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float
+    maxSpeedLoopRightLeft)
+  {
+
+      COUT(3) << "Info: Steering was loaded" << std::endl;
+      moveForward_ = 0;
+      rotateUp_ = 0;
+      rotateDown_ = 0;
+      rotateRight_ = 0;
+      rotateLeft_ = 0;
+      loopRight_ = 0;
+      loopLeft_ = 0;
+      brakeForward_ = 0;
+      brakeRotate_ = 0;
+      brakeLoop_ = 0;
+      speedForward_ = 0;
+      speedRotateUpDown_ = 0;
+      speedRotateRightLeft_ = 0;
+      speedLoopRightLeft_ = 0;
+      maxSpeedForward_ = maxSpeedForward;
+      maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+      maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+      maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+      accelerationForward_ = 0;
+      accelerationRotateUpDown_ = 0;
+      accelerationRotateRightLeft_ = 0;
+      accelerationLoopRightLeft_ = 0;
+  }
+
+  void SpaceshipSteering::tick(float time)
+  {
+
+    if(moveForward_ > 0) {
+      accelerationForward_ = moveForward_;
+      if(speedForward_ < maxSpeedForward_)
+        speedForward_ += accelerationForward_*time;
+      if(speedForward_ > maxSpeedForward_)
+        speedForward_ = maxSpeedForward_;
+    }
+    if(moveForward_ <= 0) {
+      accelerationForward_ = brakeForward_;
+      if(speedForward_ > 0)
+        speedForward_ -= accelerationForward_*time;
+      if(speedForward_ < 0)
+        speedForward_ = 0;
+    }
+
+    if(rotateUp_ > 0) {
+      accelerationRotateUpDown_ = rotateUp_;
+      if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+        speedRotateUpDown_ += accelerationRotateUpDown_*time;
+      if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+        speedRotateUpDown_ = maxSpeedRotateUpDown_;
+    }
+    if(rotateDown_ > 0) {
+      accelerationRotateUpDown_ = rotateDown_;
+      if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+        speedRotateUpDown_ -= accelerationRotateUpDown_*time;
+      if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+        speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+    }
+    if(rotateUp_ == 0 && rotateDown_ == 0) {
+      accelerationRotateUpDown_ = brakeRotate_;
+      if(speedRotateUpDown_ > 0)
+        speedRotateUpDown_ -= accelerationRotateUpDown_*time;
+      if(speedRotateUpDown_ < 0)
+        speedRotateUpDown_ += accelerationRotateUpDown_*time;
+      if(fabsf(speedRotateUpDown_)<accelerationRotateUpDown_*time)
+        speedRotateUpDown_ = 0;
+    }
+
+    if(rotateRight_ > 0) {
+      accelerationRotateRightLeft_ = rotateRight_;
+      if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
+      if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+    }
+    if(rotateLeft_ > 0) {
+      accelerationRotateRightLeft_ = rotateLeft_;
+      if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
+      if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+        speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+    }
+    if(rotateRight_ == 0 && rotateLeft_ == 0) {
+      accelerationRotateRightLeft_ = brakeRotate_;
+      if(speedRotateRightLeft_ > 0)
+        speedRotateRightLeft_ -= accelerationRotateRightLeft_*time;
+      if(speedRotateRightLeft_ < 0)
+        speedRotateRightLeft_ += accelerationRotateRightLeft_*time;
+      if(fabsf(speedRotateRightLeft_)<accelerationRotateRightLeft_*time)
+        speedRotateRightLeft_ = 0;
+    }
+
+    if(loopRight_ > 0) {
+      accelerationLoopRightLeft_ = loopRight_;
+      if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
+      if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+    }
+    if(loopLeft_ > 0) {
+      accelerationLoopRightLeft_ = loopLeft_;
+      if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
+      if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+        speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+    }
+    if(loopLeft_ == 0 && loopRight_ == 0) {
+      accelerationLoopRightLeft_ = brakeLoop_;
+      if(speedLoopRightLeft_ > 0)
+        speedLoopRightLeft_ -= accelerationLoopRightLeft_*time;
+      if(speedLoopRightLeft_ < 0)
+        speedLoopRightLeft_ += accelerationLoopRightLeft_*time;
+      if(fabsf(speedLoopRightLeft_)<accelerationLoopRightLeft_*time)
+        speedLoopRightLeft_ = 0;
+    }
+
+    Vector3 transVector = Vector3::ZERO;
+    transVector.z = 1;
+    steeringNode_->translate(transVector*speedForward_*time,
+      Ogre::SceneNode::TS_LOCAL);
+    steeringNode_->pitch(Degree(speedRotateUpDown_*time),
+      Ogre::SceneNode::TS_LOCAL);
+    steeringNode_->yaw(Degree(speedRotateRightLeft_*time),
+      Ogre::SceneNode::TS_LOCAL);
+    steeringNode_->roll(Degree(speedLoopRightLeft_*time),
+      Ogre::SceneNode::TS_LOCAL);
+
+  }
+
+  void SpaceshipSteering::moveForward(float moveForward) {
+    moveForward_ = moveForward;
+  }
+
+  void SpaceshipSteering::rotateUp(float rotateUp) {
+    rotateUp_ = rotateUp;
+  }
+
+  void SpaceshipSteering::rotateDown(float rotateDown) {
+    rotateDown_ = rotateDown;
+  }
+
+  void SpaceshipSteering::rotateLeft(float rotateLeft) {
+    rotateLeft_ = rotateLeft;
+  }
+
+  void SpaceshipSteering::rotateRight(float rotateRight) {
+    rotateRight_ = rotateRight;
+  }
+
+  void SpaceshipSteering::loopLeft(float loopLeft) {
+    loopLeft_ = loopLeft;
+  }
+
+  void SpaceshipSteering::loopRight(float loopRight) {
+    loopRight_ = loopRight;
+  }
+
+  void SpaceshipSteering::brakeForward(float brakeForward) {
+    brakeForward_ = brakeForward;
+  }
+
+  void SpaceshipSteering::brakeRotate(float brakeRotate) {
+    brakeRotate_ = brakeRotate;
+  }
+
+  void SpaceshipSteering::brakeLoop(float brakeLoop) {
+    brakeLoop_ = brakeLoop;
+  }
+
+  void SpaceshipSteering::maxSpeedForward(float maxSpeedForward) {
+    maxSpeedForward_ = maxSpeedForward;
+  }
+
+  void SpaceshipSteering::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+    maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+  }
+
+  void SpaceshipSteering::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+    maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+  }
+
+  void SpaceshipSteering::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+    maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+  }
+
+  void SpaceshipSteering::addNode(Ogre::SceneNode *steeringNode) {
+    steeringNode_ = steeringNode;
+  }
+
+}
Index: /code/branches/network/src/orxonox/SpaceshipSteering.h
===================================================================
--- /code/branches/network/src/orxonox/SpaceshipSteering.h	(revision 861)
+++ /code/branches/network/src/orxonox/SpaceshipSteering.h	(revision 861)
@@ -0,0 +1,66 @@
+#ifndef _SpaceShipSteering_H__
+#define _SpaceShipSteering_H__
+
+#include <OgrePrerequisites.h>
+
+#include "OrxonoxPrereqs.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport SpaceshipSteering
+  {
+  public:
+    SpaceshipSteering(float maxSpeedForward, float maxSpeedRotateUpDown,
+      float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
+    void tick(float time);
+    void moveForward(float moveForward);
+    void rotateUp(float rotateUp);
+    void rotateDown(float rotateDown);
+    void rotateRight(float rotateRight);
+    void rotateLeft(float rotateLeft);
+    void loopRight(float loopRight);
+    void loopLeft(float loopLeft);
+    void brakeForward(float brakeForward);
+    void brakeRotate(float brakeRotate);
+    void brakeLoop(float brakeLoop);
+    void maxSpeedForward(float maxSpeedForward);
+    void maxSpeedRotateUpDown(float maxSpeedRotateUpDown);
+    void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft);
+    void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft);
+    void addNode(Ogre::SceneNode *steeringNode);
+
+  protected:
+    Ogre::SceneNode *steeringNode_;
+
+  private:
+    float moveForward_;
+    float rotateUp_;
+    float rotateDown_;
+    float rotateRight_;
+    float rotateLeft_;
+    float loopRight_;
+    float loopLeft_;
+    float brakeForward_;
+    float brakeRotate_;
+    float brakeLoop_;
+
+    float speedForward_;
+    float speedRotateUpDown_;
+    float speedRotateRightLeft_;
+    float speedLoopRightLeft_;
+
+    float maxSpeedForward_;
+    float maxSpeedRotateUpDown_;
+    float maxSpeedRotateRightLeft_;
+    float maxSpeedLoopRightLeft_;
+
+    float accelerationForward_;
+    float accelerationRotateUpDown_;
+    float accelerationRotateRightLeft_;
+    float accelerationLoopRightLeft_;
+
+  };
+}
+
+
+#endif /* _SpaceShipSteering_H__ */
Index: /code/branches/network/src/orxonox/core/ArgReader.cc
===================================================================
--- /code/branches/network/src/orxonox/core/ArgReader.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/ArgReader.cc	(revision 861)
@@ -0,0 +1,113 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht <beni_at_orxonox.net>, (C) 2007
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  ArgReader.cc
+ @brief Argument Reader
+ */
+
+#include <iostream>
+
+#include "ArgReader.h"
+
+namespace orxonox {
+
+  ArgReader::ArgReader(int argc, char** argv)
+  {
+    counter_ = argc;
+    arguments_ = argv;
+    fail_ = false;
+    errorStr_ = "";
+  }
+
+  void ArgReader::checkArgument(std::string option, std::string &string, bool must)
+  {
+    int argpos = checkOption(option) + 1;
+    if(argpos != 0)
+    {
+      string = arguments_[argpos];
+    }
+    else
+    {
+      if(must) {
+        errorStr_ = errorStr_ + "Cannot find mandatory argument \"" + option + "\"\n";
+        fail_ = true;
+      }
+    }
+
+  }
+
+  void ArgReader::checkArgument(std::string option, int &integer, bool must)
+  {
+    int argpos = checkOption(option) + 1;
+    if(argpos != 0)
+    {
+      integer = atoi(arguments_[argpos]);
+    }
+    else
+    {
+      if(must) {
+        errorStr_ = errorStr_ + "Cannot find mandatory argument \"" + option + "\"\n";
+        fail_ = true;
+      }
+    }
+  }
+
+  void ArgReader::checkArgument(std::string option, float &floating, bool must)
+  {
+    int argpos = checkOption(option) + 1;
+    if(argpos != 0)
+    {
+      floating = (float)atof(arguments_[argpos]);
+    }
+    else
+    {
+      if(must) {
+        errorStr_ = errorStr_ + "Cannot find mandatory argument \"" + option + "\"\n";
+        fail_ = true;
+      }
+    }
+  }
+
+  int ArgReader::checkOption(std::string option)
+  {
+    for(int i = 1; i < counter_; i++)
+    {
+      if(arguments_[i] == "--" + option)
+          return i;
+    }
+    return -1;
+  }
+
+  bool ArgReader::errorHandling()
+  {
+    if(fail_)
+      std::cout << errorStr_;
+    return fail_;
+  }
+}
+
Index: /code/branches/network/src/orxonox/core/ArgReader.h
===================================================================
--- /code/branches/network/src/orxonox/core/ArgReader.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/ArgReader.h	(revision 861)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht <beni_at_orxonox.net>
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  Argreader.h
+ @brief reads arguments
+ @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _ArgReader_H__
+#define _ArgReader_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox {
+
+  class _CoreExport ArgReader
+  {
+    public:
+      ArgReader(int argc, char **argv);
+      void checkArgument(std::string option, std::string& string, bool must=false);
+      void checkArgument(std::string option, int& integer, bool must=false);
+      void checkArgument(std::string option, float& floating, bool must=false);
+      bool errorHandling();
+    private:
+      int checkOption(std::string option);
+
+    private:
+      int counter_;
+      char **arguments_;
+      bool fail_;
+      std::string errorStr_;
+  };
+
+}
+#endif /* _ArgReader_H__ */
Index: /code/branches/network/src/orxonox/core/BaseObject.cc
===================================================================
--- /code/branches/network/src/orxonox/core/BaseObject.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/BaseObject.cc	(revision 861)
@@ -0,0 +1,66 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file BaseObject.cc
+    @brief Implementation of the BaseObject class.
+*/
+
+#include "util/tinyxml/tinyxml.h"
+
+#include "BaseObject.h"
+
+namespace orxonox
+{
+    CreateFactory(BaseObject);
+
+    /**
+        @brief Constructor: Registers the object in the BaseObject-list.
+    */
+    BaseObject::BaseObject()
+    {
+        RegisterRootObject(BaseObject);
+    }
+
+    /**
+        @brief Destructor
+    */
+    BaseObject::~BaseObject()
+    {
+    }
+
+    /**
+        @brief load general xml paramters
+    */
+    void BaseObject::loadParams(TiXmlElement* xmlElem)
+    {
+        if (xmlElem->Attribute("name"))
+        {
+            this->setName(xmlElem->Attribute("name"));
+        }
+    }
+}
Index: /code/branches/network/src/orxonox/core/BaseObject.h
===================================================================
--- /code/branches/network/src/orxonox/core/BaseObject.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/BaseObject.h	(revision 861)
@@ -0,0 +1,29 @@
+/*!
+    @file BaseObject.h
+    @brief Definition of the BaseObject class.
+
+    The BaseObject is the parent of all classes representing an instance in the game.
+*/
+
+#ifndef _BaseObject_H__
+#define _BaseObject_H__
+
+#include "CorePrereqs.h"
+#include "util/tinyxml/TinyXMLPrereqs.h"
+
+#include "CoreIncludes.h"
+
+namespace orxonox
+{
+    //! The BaseObject is the parent of all classes representing an instance in the game.
+    class _CoreExport BaseObject : virtual public OrxonoxClass
+    {
+        public:
+            BaseObject();
+            virtual ~BaseObject();
+            virtual void loadParams(TiXmlElement* xmlElem);
+    };
+    ExportClass(BaseObject, Core);
+}
+
+#endif /* _BaseObject_H__ */
Index: /code/branches/network/src/orxonox/core/CMakeLists.txt
===================================================================
--- /code/branches/network/src/orxonox/core/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/orxonox/core/CMakeLists.txt	(revision 861)
@@ -0,0 +1,22 @@
+SET( CORE_SRC_FILES
+  BaseObject.cc
+  Factory.cc
+  IdentifierList.cc
+  Identifier.cc
+  MetaObjectList.cc
+  OrxonoxClass.cc
+  ConfigValueContainer.cc
+  Error.cc
+  SignalHandler.cc
+  ArgReader.cc
+  DebugLevel.cc
+  OutputHandler.cc
+  Language.cc
+)
+
+ADD_LIBRARY( core SHARED ${CORE_SRC_FILES})
+SET_TARGET_PROPERTIES( core PROPERTIES LINK_FLAGS "--no-undefined" )
+
+TARGET_LINK_LIBRARIES( core
+  util
+)
Index: /code/branches/network/src/orxonox/core/ClassFactory.h
===================================================================
--- /code/branches/network/src/orxonox/core/ClassFactory.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/ClassFactory.h	(revision 861)
@@ -0,0 +1,102 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file ClassFactory.h
+    @brief Definition and implementation of the ClassFactory class
+
+    The ClassFactory is able to create new objects of a specific class.
+*/
+
+#ifndef _ClassFactory_H__
+#define _ClassFactory_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+
+#include "Factory.h"
+#include "Identifier.h"
+#include "Debug.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###      ClassFactory       ###
+    // ###############################
+    //! The ClassFactory is able to create new objects of a specific class.
+    template <class T>
+    class ClassFactory : public BaseFactory
+    {
+        public:
+            static bool create(const std::string& name);
+            BaseObject* fabricate();
+
+        private:
+            ClassFactory() {}                               // Don't create
+            ClassFactory(const ClassFactory& factory) {}    // Don't copy
+            virtual ~ClassFactory() {}                      // Don't delete
+
+            static T* createNewObject();
+    };
+
+    /**
+        @brief Adds the ClassFactory to the Identifier of the same type and the Identifier to the Factory.
+        @return Always true (this is needed because the compiler only allows assignments before main())
+    */
+    template <class T>
+    bool ClassFactory<T>::create(const std::string& name)
+    {
+        COUT(4) << "*** Create entry for " << name << " in Factory." << std::endl;
+        ClassIdentifier<T>::getIdentifier()->addFactory(new ClassFactory<T>);
+        Factory::add(name, ClassIdentifier<T>::getIdentifier());
+
+        return true;
+    }
+
+    /**
+        @brief Creates and returns a new object of class T.
+        @return The new object
+    */
+    template <class T>
+    BaseObject* ClassFactory<T>::fabricate()
+    {
+        return ClassFactory<T>::createNewObject();
+    }
+
+    /**
+        @brief Creates and returns a new object of class T; this is a wrapper for the new operator.
+        @return The new object
+    */
+    template <class T>
+    T* ClassFactory<T>::createNewObject()
+    {
+        return new T;
+    }
+}
+
+#endif /* _ClassFactory_H__ */
Index: /code/branches/network/src/orxonox/core/ConfigValueContainer.cc
===================================================================
--- /code/branches/network/src/orxonox/core/ConfigValueContainer.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/ConfigValueContainer.cc	(revision 861)
@@ -0,0 +1,954 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <fstream>
+
+#include "util/Tokenizer.h"
+#include "util/Convert.h"
+#include "ConfigValueContainer.h"
+
+#define CONFIGFILEPATH "orxonox.ini"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Int;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0"));           // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_uInt;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0"));           // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Char;
+
+        ConvertValue(&this->defvalueString_, (int)defvalue, std::string("0"));      // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_uChar;
+
+        ConvertValue(&this->defvalueString_, (unsigned int)defvalue, std::string("0"));     // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Float;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Double;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_LongDouble;
+
+        ConvertValue(&this->defvalueString_, defvalue, std::string("0.000000"));    // Try to convert the default-value to a string
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Bool;
+
+        // Convert the default-value from bool to string
+        if (defvalue)
+            this->defvalueString_ = "true";
+        else
+            this->defvalueString_ = "false";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_String;
+
+        this->defvalueString_ = "\"" + defvalue + "\"";                             // Convert the string to a "config-file-string" with quotes
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_ConstChar;
+
+        this->defvalueString_ = "\"" + std::string(defvalue) + "\"";                // Convert the string to a "config-file-string" with quotes
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString(false);                    // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Vector2;
+
+        // Try to convert the default-value from Vector2 to string
+        std::ostringstream ostream;
+        if (ostream << "(" << defvalue.x << "," << defvalue.y << ")")
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0)";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_Vector3;
+
+        // Try to convert the default-value from Vector3 to string
+        std::ostringstream ostream;
+        if (ostream << "(" << defvalue.x << "," << defvalue.y << "," << defvalue.z << ")")
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0,0)";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Constructor: Converts the default-value to a string, checks the config-file for a changed value, sets the intern value variable.
+        @param value This is only needed to determine the right type.
+        @param classname The name of the class the variable belongs to
+        @param varname The name of the variable
+        @param defvalue The default-value
+    */
+    ConfigValueContainer::ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue)
+    {
+        this->bAddedDescription_ = false;
+        this->classname_ = classname;
+        this->varname_ = varname;
+        this->type_ = VT_ColourValue;
+
+        // Try to convert the default-value from ColourValue to string
+        std::ostringstream ostream;
+        if (ostream << "(" << defvalue.r << "," << defvalue.g << "," << defvalue.b << "," << defvalue.a << ")")
+            this->defvalueString_ = ostream.str();
+        else
+            this->defvalueString_ = "(0,0,0,0)";
+
+        this->searchConfigFileLine();                                               // Search the entry in the config-file
+        std::string valueString = this->parseValueString();                         // Parses the value string from the config-file-entry
+        if (!this->parseSting(valueString, defvalue))                               // Try to convert the string to a value
+            this->resetConfigFileEntry();                                           // The conversion failed
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type of the associated variable and assigns it.
+        @param input The string to convert
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input)
+    {
+        if (this->type_ == ConfigValueContainer::VT_Int)
+            return this->parseSting(input, this->value_.value_int_);
+        else if (this->type_ == ConfigValueContainer::VT_uInt)
+            return this->parseSting(input, this->value_.value_uint_);
+        else if (this->type_ == ConfigValueContainer::VT_Char)
+            return this->parseSting(input, this->value_.value_char_);
+        else if (this->type_ == ConfigValueContainer::VT_uChar)
+            return this->parseSting(input, this->value_.value_uchar_);
+        else if (this->type_ == ConfigValueContainer::VT_Float)
+            return this->parseSting(input, this->value_.value_float_);
+        else if (this->type_ == ConfigValueContainer::VT_Double)
+            return this->parseSting(input, this->value_.value_double_);
+        else if (this->type_ == ConfigValueContainer::VT_LongDouble)
+            return this->parseSting(input, this->value_.value_long_double_);
+        else if (this->type_ == ConfigValueContainer::VT_Bool)
+            return this->parseSting(input, this->value_.value_bool_);
+        else if (this->type_ == ConfigValueContainer::VT_String)
+            return this->parseSting(input, this->value_string_);
+        else if (this->type_ == ConfigValueContainer::VT_ConstChar)
+            return this->parseSting(input, this->value_string_);
+        else if (this->type_ == ConfigValueContainer::VT_Vector2)
+            return this->parseSting(input, this->value_vector2_);
+        else if (this->type_ == ConfigValueContainer::VT_Vector3)
+            return this->parseSting(input, this->value_vector3_);
+        else if (this->type_ == ConfigValueContainer::VT_ColourValue)
+            return this->parseSting(input, this->value_colourvalue_);
+
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, int defvalue)
+    {
+        return ConvertValue(&this->value_.value_int_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type unsigned int and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, unsigned int defvalue)
+    {
+        return ConvertValue(&this->value_.value_uint_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, char defvalue)
+    {
+        // I used value_int_ instead of value_char_ to avoid number <-> char confusion in the config-file
+        return ConvertValue(&this->value_.value_int_, input, (int)defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type unsigned char and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, unsigned char defvalue)
+    {
+        // I used value_uint_ instead of value_uchar_ to avoid number <-> char confusion in the config-file
+        return ConvertValue(&this->value_.value_uint_, input, (unsigned int)defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type float and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, float defvalue)
+    {
+        return ConvertValue(&this->value_.value_float_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, double defvalue)
+    {
+        return ConvertValue(&this->value_.value_double_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type long double and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, long double defvalue)
+    {
+        return ConvertValue(&this->value_.value_long_double_, input, defvalue);
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type bool and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, bool defvalue)
+    {
+        // Try to parse the value-string - is it a word?
+        if (input.find("true") < input.size()
+         || input.find("True") < input.size()
+         || input.find("yes") < input.size()
+         || input.find("Yes") < input.size())
+            this->value_.value_bool_ = true;
+        else if (input.find("false") < input.size()
+              || input.find("False") < input.size()
+              || input.find("no") < input.size()
+              || input.find("No") < input.size())
+            this->value_.value_bool_ = false;
+        else
+        {
+            // Its not a known word - is it a number?
+            return ConvertValue(&this->value_.value_bool_, input, defvalue);
+        }
+
+        return true;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type std::string and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const std::string& defvalue)
+    {
+        // Strip the quotes
+        unsigned int pos1 = input.find("\"") + 1;
+        unsigned int pos2 = input.find("\"", pos1);
+
+        // Check if the entry was correctly quoted
+        if (pos1 < input.length() && pos2 < input.length() && !(input.find("\"", pos2 + 1) < input.length()))
+        {
+            // It was - get the string between the quotes
+            this->value_string_ = input.substr(pos1, pos2 - pos1);
+            return true;
+        }
+
+        // It wasn't - use the default-value and restore the entry in the config-file.
+        this->value_string_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type const char* and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const char* defvalue)
+    {
+        // Strip the quotes
+        unsigned int pos1 = input.find("\"") + 1;
+        unsigned int pos2 = input.find("\"", pos1);
+
+        // Check if the entry was correctly quoted
+        if (pos1 < input.length() && pos2 < input.length() && !(input.find("\"", pos2 + 1) < input.length()))
+        {
+            // It was - get the string between the quotes
+            this->value_string_ = input.substr(pos1, pos2 - pos1);
+            return true;
+        }
+
+        // It wasn't - use the default-value and restore the entry in the config-file.
+        this->value_string_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type _Vector2 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const Vector2& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector2
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_vector2_.x, tokens[0]))
+            {
+                this->value_vector2_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_vector2_.y, tokens[1]))
+            {
+                this->value_vector2_ = defvalue;
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_vector2_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type Vector3 and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const Vector3& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector3
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_vector3_.x, tokens[0]))
+            {
+                this->value_vector3_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_vector3_.y, tokens[1]))
+            {
+                this->value_vector3_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_vector3_.z, tokens[2]))
+            {
+                this->value_vector3_ = defvalue;
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_vector3_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Parses a given std::string into a value of the type ColourValue and assigns it to the right variable. If the conversion failed, the default-value gets assigned.
+        @param input The string to convert
+        @param defvalue The default-value
+        @return True if the string was successfully parsed
+    */
+    bool ConfigValueContainer::parseSting(const std::string& input, const ColourValue& defvalue)
+    {
+        // Strip the value-string
+        unsigned int pos1 = input.find("(") + 1;
+        unsigned int pos2 = input.find(")", pos1);
+
+        // Try to convert the stripped value-string to Vector3
+        if (pos1 < input.length() && pos2 < input.length() && pos1 < pos2)
+        {
+            std::vector<std::string> tokens = tokenize(input.substr(pos1, pos2 - pos1), ",");
+            if (!ConvertValue(&this->value_colourvalue_.r, tokens[0]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_colourvalue_.g, tokens[1]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_colourvalue_.b, tokens[2]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+            if (!ConvertValue(&this->value_colourvalue_.a, tokens[3]))
+            {
+                this->value_colourvalue_ = defvalue;
+                return false;
+            }
+
+            return true;
+        }
+
+        this->value_colourvalue_ = defvalue;
+        return false;
+    }
+
+    /**
+        @brief Sets the corresponding entry in the config-file back to the default value.
+    */
+    void ConfigValueContainer::resetConfigFileEntry()
+    {
+        (*this->configFileLine_) = this->varname_ + "=" + this->defvalueString_;
+        ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+    }
+
+    /**
+        @brief Sets the value of the variable back to the default value and resets the config-file entry.
+    */
+    void ConfigValueContainer::resetConfigValue()
+    {
+        this->parseSting(this->defvalueString_);
+        this->resetConfigFileEntry();
+    }
+
+    /**
+        @brief Searches the corresponding entry in the config-file and creates it, if there is no entry.
+    */
+    void ConfigValueContainer::searchConfigFileLine()
+    {
+        // Read the file if needed
+        if (!ConfigValueContainer::finishedReadingConfigFile())
+            ConfigValueContainer::readConfigFile(CONFIGFILEPATH);
+
+        // The string of the section we're searching
+        std::string section = "";
+        section.append("[");
+        section.append(this->classname_);
+        section.append("]");
+
+        // Iterate through all config-file-lines
+        bool success = false;
+        std::list<std::string>::iterator it1;
+        for(it1 = ConfigValueContainer::getConfigFileLines().begin(); it1 != ConfigValueContainer::getConfigFileLines().end(); ++it1)
+        {
+            // Don't try to parse comments
+            if (this->isComment(*it1))
+                continue;
+
+            if ((*it1).find(section) < (*it1).length())
+            {
+                // We found the right section
+                bool bLineIsEmpty = false;
+                std::list<std::string>::iterator positionToPutNewLineAt;
+
+                // Iterate through all lines in the section
+                std::list<std::string>::iterator it2;
+                for(it2 = ++it1; it2 != ConfigValueContainer::getConfigFileLines().end(); ++it2)
+                {
+                    // Don't try to parse comments
+                    if (this->isComment(*it2))
+                        continue;
+
+                    // This if-else block is used to write a new line right after the last line of the
+                    // section but in front of the following empty lines before the next section.
+                    // (So this helps to keep a nice formatting with empty-lines between sections in the config-file)
+                    if (this->isEmpty(*it2))
+                    {
+                        if (!bLineIsEmpty)
+                        {
+                            bLineIsEmpty = true;
+                            positionToPutNewLineAt = it2;
+                        }
+                    }
+                    else
+                    {
+                        if (!bLineIsEmpty)
+                            positionToPutNewLineAt = it2;
+
+                        bLineIsEmpty = false;
+                    }
+
+                    // Look out for the beginning of the next section
+                    unsigned int open = (*it2).find("[");
+                    unsigned int close = (*it2).find("]");
+                    if ((open < (*it2).length()) && (close < (*it2).length()) && (open < close))
+                    {
+                        // The next section startet, so our line isn't yet in the file - now we add it and safe the file
+                        this->configFileLine_ = this->getConfigFileLines().insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
+                        ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+                        success = true;
+                        break;
+                    }
+
+                    // Look out for the variable-name
+                    if ((*it2).find(this->varname_) < (*it2).length())
+                    {
+                        // We found the right line - safe it and return
+                        this->configFileLine_ = it2;
+                        success = true;
+                        break;
+                    }
+                }
+
+                // Check if we succeeded
+                if (!success)
+                {
+                    // Looks like we found the right section, but the file ended without containing our variable - so we add it and safe the file
+                    this->configFileLine_ = this->getConfigFileLines().insert(positionToPutNewLineAt, this->varname_ + "=" + this->defvalueString_);
+                    ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);
+                    success = true;
+                }
+                break;
+            }
+        }
+
+        // Check if we succeeded
+        if (!success)
+        {
+            // We obviously didn't found the right section, so we'll create it
+            this->getConfigFileLines().push_back("[" + this->classname_ + "]");                   // Create the section
+            this->getConfigFileLines().push_back(this->varname_ + "=" + this->defvalueString_);   // Create the line
+            this->configFileLine_ = --this->getConfigFileLines().end();                           // Set the pointer to the last element
+            success = true;
+            this->getConfigFileLines().push_back("");                                             // Add an empty line - this is needed for the algorithm in the searchConfigFileLine-function
+            ConfigValueContainer::writeConfigFile(CONFIGFILEPATH);                              // Save the changed config-file
+        }
+    }
+
+    /**
+        @brief Determines if a line in the config-file is a comment.
+        @param line The line to check
+        @return True = it's a comment
+    */
+    bool ConfigValueContainer::isComment(const std::string& line)
+    {
+        // Strip the line, whitespaces are disturbing
+        std::string teststring = getStrippedLine(line);
+
+        // There are four possible comment-symbols:
+        //  1) #comment in script-language style
+        //  2) %comment in matlab style
+        //  3) ;comment in unreal tournament config-file style
+        //  4) //comment in code style
+        if (teststring[0] == '#' || teststring[0] == '%' || teststring[0] == ';' || (teststring[0] == '/' && teststring[0] == '/'))
+            return true;
+
+        return false;
+    }
+
+    /**
+        @brief Determines if a line in the config-file is empty (contains only whitespaces).
+        @param line The line to check
+        @return True = it's empty
+    */
+    bool ConfigValueContainer::isEmpty(const std::string& line)
+    {
+        return getStrippedLine(line) == "";
+    }
+
+    /**
+        @brief Removes all whitespaces from a line.
+        @param line The line to strip
+        @return The stripped line
+    */
+    std::string ConfigValueContainer::getStrippedLine(const std::string& line)
+    {
+        std::string output = line;
+        unsigned int pos;
+        while ((pos = output.find(" ")) < output.length())
+            output.erase(pos, 1);
+        while ((pos = output.find("\t")) < output.length())
+            output.erase(pos, 1);
+
+        return output;
+    }
+
+    /**
+        @brief Returns the part in the corresponding config-file-entry of the container that defines the value.
+        @param bStripped True = strip the value-string
+        @return The value-string
+    */
+    std::string ConfigValueContainer::parseValueString(bool bStripped)
+    {
+        std::string output;
+        if (bStripped)
+            output = this->getStrippedLine(*this->configFileLine_);
+        else
+            output = *this->configFileLine_;
+
+        return output.substr(output.find("=") + 1);
+    }
+
+    /**
+        @returns a list, containing all entrys in the config-file.
+    */
+    std::list<std::string>& ConfigValueContainer::getConfigFileLines()
+    {
+        // This is done to avoid problems while executing this code before main()
+        static std::list<std::string> configFileLinesStaticReference = std::list<std::string>();
+        return configFileLinesStaticReference;
+    }
+
+    /**
+        @brief Returns true if the ConfigFile is read and stored into the ConfigFile-lines-list.
+        @param finished This is used to change the state
+        @return True if the ConfigFile is read and stored into the ConfigFile-lines-list
+    */
+    bool ConfigValueContainer::finishedReadingConfigFile(bool finished)
+    {
+        // This is done to avoid problems while executing this code before main()
+        static bool finishedReadingConfigFileStaticVariable = false;
+
+        if (finished)
+            finishedReadingConfigFileStaticVariable = true;
+
+        return finishedReadingConfigFileStaticVariable;
+    }
+
+    /**
+        @brief Reads the config-file and stores the lines in a list.
+        @param filename The name of the config-file
+    */
+    void ConfigValueContainer::readConfigFile(const std::string& filename)
+    {
+        // This creates the file if it's not existing
+        std::ofstream createFile;
+        createFile.open(filename.c_str(), std::fstream::app);
+        createFile.close();
+
+        // Open the file
+        std::ifstream file;
+        file.open(filename.c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open config-file " << filename << " to read the config values!" << std::endl;
+            return;
+        }
+
+        char line[1024];
+
+        // Iterate through the file and add the lines into the list
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            ConfigValueContainer::getConfigFileLines().push_back(line);
+//            std::cout << "### ->" << line << "<- : empty: " << isEmpty(line) << " comment: " << isComment(line) << std::endl;
+        }
+
+        // The last line is useless
+        ConfigValueContainer::getConfigFileLines().pop_back();
+
+        // Add an empty line to the end of the file if needed
+        // this is needed for the algorithm in the searchConfigFileLine-function
+        if ((ConfigValueContainer::getConfigFileLines().size() > 0) && !isEmpty(*ConfigValueContainer::getConfigFileLines().rbegin()))
+        {
+//            std::cout << "### newline added" << std::endl;
+            ConfigValueContainer::getConfigFileLines().push_back("");
+        }
+
+        file.close();
+
+        ConfigValueContainer::finishedReadingConfigFile(true);
+    }
+
+    /**
+        @brief Writes the content of the list, containing all lines of the config-file, into the config-file.
+        @param filename The name of the config-file
+    */
+    void ConfigValueContainer::writeConfigFile(const std::string& filename)
+    {
+        // Make sure we stored the config-file in the list
+        if (!ConfigValueContainer::finishedReadingConfigFile())
+            ConfigValueContainer::readConfigFile(filename);
+
+        // Open the file
+        std::ofstream file;
+        file.open(filename.c_str(), std::fstream::out);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open config-file " << filename << " to write the config values!" << std::endl;
+            return;
+        }
+
+        // Iterate through the list an write the lines into the file
+        std::list<std::string>::iterator it;
+        for (it = ConfigValueContainer::getConfigFileLines().begin(); it != ConfigValueContainer::getConfigFileLines().end(); ++it)
+        {
+            file << (*it) << std::endl;
+        }
+
+        file.close();
+    }
+
+    /**
+        @brief Adds a description to the config-value.
+        @param description The description
+    */
+    void ConfigValueContainer::description(const std::string& description)
+    {
+        if (!this->bAddedDescription_)
+        {
+            this->description_ = std::string("ConfigValueDescription::" + this->classname_ + "::" + this->varname_);
+            Language::getLanguage().addEntry(this->description_, description);
+            this->bAddedDescription_ = true;
+        }
+    }
+}
Index: /code/branches/network/src/orxonox/core/ConfigValueContainer.h
===================================================================
--- /code/branches/network/src/orxonox/core/ConfigValueContainer.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/ConfigValueContainer.h	(revision 861)
@@ -0,0 +1,194 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file ConfigValueContainer.h
+    @brief Definition of the ConfigValueContainer class.
+
+    The ConfigValueContainer class contains all needed informations about a configurable variable:
+     - the name of the variable
+     - the name of the class the variable belongs to
+     - the default value
+     - the user-specified value
+     - a pointer to the entry in the config-file
+
+    This is needed to assign the configured values to all newly created objects.
+*/
+
+#ifndef _ConfigValueContainer_H__
+#define _ConfigValueContainer_H__
+
+#include <list>
+#include <string>
+
+#include "CorePrereqs.h"
+
+#include "util/Math.h"
+#include "Language.h"
+
+namespace orxonox
+{
+    //! The ConfigValuecontainer contains all needed informations about a configurable variable.
+    /**
+        The ConfigValueContainer class contains all needed informations about a configurable variable:
+         - the name of the variable
+         - the name of the class the variable belongs to
+         - the default value
+         - the user-specified value
+         - a pointer to the entry in the config-file
+
+        This is needed to assign the configured values to all newly created objects.
+
+        The container searches for the entry in the config file.
+        If there is an entry, it parses the specified value and assigns it to the variable of the right type.
+        If there is no entry, it adds the entry with the default-value to the section of the variables class.
+        If there is no section, the section and the entry are added to the end of the config-file.
+    */
+    class _CoreExport ConfigValueContainer
+    {
+        public:
+            enum VariableType
+            {
+                VT_Int,
+                VT_uInt,
+                VT_Char,
+                VT_uChar,
+                VT_Float,
+                VT_Double,
+                VT_LongDouble,
+                VT_Bool,
+                VT_ConstChar,
+                VT_String,
+                VT_Vector2,
+                VT_Vector3,
+                VT_ColourValue
+            };
+
+            ConfigValueContainer(const std::string& classname, const std::string& varname, int defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned int defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, char defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, unsigned char defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, float defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, double defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, long double defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, bool defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, const std::string& defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, const char* defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector2 defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, Vector3 defvalue);
+            ConfigValueContainer(const std::string& classname, const std::string& varname, ColourValue defvalue);
+
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(int& value)                           { value = this->value_.value_int_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(unsigned int& value)                  { value = this->value_.value_uint_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(char& value)                          { value = this->value_.value_char_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(unsigned char& value)                 { value = this->value_.value_uchar_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(float& value)                         { value = this->value_.value_float_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(double& value)                        { value = this->value_.value_double_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(long double& value)                   { value = this->value_.value_long_double_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(bool& value)                          { value = this->value_.value_bool_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(std::string& value)                   { value = this->value_string_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(const char* value)                    { value = this->value_string_.c_str(); return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(Vector2& value)                       { value = this->value_vector2_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(Vector3& value)                       { value = this->value_vector3_; return *this; }
+            /** @returns the value. @param value This is only needed to determine the right type. */
+            inline ConfigValueContainer& getValue(ColourValue& value)                   { value = this->value_colourvalue_; return *this; }
+
+            void description(const std::string& description);
+
+            bool parseSting(const std::string& input);
+            void resetConfigFileEntry();
+            void resetConfigValue();
+
+            static std::string getStrippedLine(const std::string& line);
+            static bool isEmpty(const std::string& line);
+            static bool isComment(const std::string& line);
+
+        private:
+            bool parseSting(const std::string& input, int defvalue);
+            bool parseSting(const std::string& input, unsigned int defvalue);
+            bool parseSting(const std::string& input, char defvalue);
+            bool parseSting(const std::string& input, unsigned char defvalue);
+            bool parseSting(const std::string& input, float defvalue);
+            bool parseSting(const std::string& input, double defvalue);
+            bool parseSting(const std::string& input, long double defvalue);
+            bool parseSting(const std::string& input, bool defvalue);
+            bool parseSting(const std::string& input, const std::string& defvalue);
+            bool parseSting(const std::string& input, const char* defvalue);
+            bool parseSting(const std::string& input, const Vector2& defvalue);
+            bool parseSting(const std::string& input, const Vector3& defvalue);
+            bool parseSting(const std::string& input, const ColourValue& defvalue);
+
+            static std::list<std::string>& getConfigFileLines();
+            static bool finishedReadingConfigFile(bool finished = false);
+            void searchConfigFileLine();
+            std::string parseValueString(bool bStripped = true);
+
+            static void readConfigFile(const std::string& filename);
+            static void writeConfigFile(const std::string& filename);
+
+            std::string         classname_;                     //!< The name of the class the variable belongs to
+            std::string         varname_;                       //!< The name of the variable
+            std::string         defvalueString_;                //!< The string of the default-variable
+
+            union MultiType
+            {
+                int                 value_int_;                 //!< The value, if the variable is of the type int
+                unsigned int        value_uint_;                //!< The value, if the variable is of the type unsigned int
+                char                value_char_;                //!< The value, if the variable is of the type char
+                unsigned char       value_uchar_;               //!< The value, if the variable is of the type unsigned char
+                float               value_float_;               //!< The value, if the variable is of the type float
+                double              value_double_;              //!< The value, if the variable is of the type double
+                long double         value_long_double_;         //!< The value, if the variable is of the type long double
+                bool                value_bool_;                //!< The value, if the variable is of the type bool
+            } value_;                                           //!< The value of the variable
+
+            std::string         value_string_;                  //!< The value, if the variable is of the type string
+            Vector2             value_vector2_;                 //!< The value, if the variable is of the type Vector2
+            Vector3             value_vector3_;                 //!< The value, if the variable is of the type Vector3
+            ColourValue         value_colourvalue_;             //!< The value, if the variable is of the type ColourValue
+
+            std::list<std::string>::iterator configFileLine_;   //!< An iterator, pointing to the entry of the variable in the config-file
+
+            VariableType type_;                                 //!< The type of the variable
+            bool bAddedDescription_;                            //!< True if a description was added
+            LanguageEntryName description_;                     //!< The description
+    };
+}
+
+#endif /* _ConfigValueContainer_H__ */
Index: /code/branches/network/src/orxonox/core/CoreIncludes.h
===================================================================
--- /code/branches/network/src/orxonox/core/CoreIncludes.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/CoreIncludes.h	(revision 861)
@@ -0,0 +1,157 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+    @file CoreIncludes.h
+    @brief Definition of macros and typedefs.
+
+    Every class needs the RegisterObject(class) macro in its constructor. If the class is an interface
+    or the BaseObject itself, it needs the macro RegisterRootObject(class) instead.
+
+    To allow the object being created through the factory, use the CreateFactory(class) macro outside
+    the of the class implementation, so it gets executed before main().
+*/
+
+#ifndef _CoreIncludes_H__
+#define _CoreIncludes_H__
+
+#include "CorePrereqs.h"
+
+// All needed header-files
+#include "Identifier.h"
+#include "Factory.h"
+#include "ClassFactory.h"
+#include "Iterator.h"
+#include "OrxonoxClass.h"
+#include "ConfigValueContainer.h"
+#include "Debug.h"
+
+/**
+    @brief Intern macro, containing the common parts of RegisterObject and RegisterRootObject.
+    @param ClassName The name of the class
+    @param bRootClass True if the class is directly derived from OrxonoxClass
+*/
+#define InternRegisterObject(ClassName, bRootClass) \
+    this->setIdentifier(orxonox::ClassIdentifier<ClassName>::registerClass(this->getParents(), #ClassName, bRootClass)); \
+    if (orxonox::Identifier::isCreatingHierarchy() && this->getParents()) \
+        this->getParents()->add(this->getIdentifier()); \
+    orxonox::ClassIdentifier<ClassName>::addObject(this)
+
+/**
+    @brief Intern macro, containing the specific part of RegisterRootObject.
+    @param ClassName The name of the class
+*/
+#define InternRegisterRootObject(ClassName) \
+    if (orxonox::Identifier::isCreatingHierarchy() && !this->getParents()) \
+        this->setParents(new orxonox::IdentifierList()); \
+    InternRegisterObject(ClassName, true)
+
+/**
+    @brief RegisterObject - with and without debug output.
+    @param ClassName The name of the class
+*/
+#define RegisterObject(ClassName) \
+    COUT(4) << "*** Register Object: " << #ClassName << std::endl; \
+    InternRegisterObject(ClassName, false)
+
+/**
+    @brief RegisterRootObject - with and without debug output.
+    @param ClassName The name of the class
+*/
+#define RegisterRootObject(ClassName) \
+    COUT(4) << "*** Register Root-Object: " << #ClassName << std::endl; \
+    InternRegisterRootObject(ClassName)
+
+/**
+    @brief Exports the necessary templates in order to make them available to all libraries.
+    @param ClassName The name of the Class
+    @param LibraryName The name of the Library
+*/
+#define ExportClass(ClassName, LibraryName) \
+    template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
+    template class _##LibraryName##Export orxonox::ObjectList<ClassName>; \
+    template class _##LibraryName##Export orxonox::ClassFactory<ClassName>
+
+/**
+    @brief Exports the necessary templates in order to make them available to all libraries.
+    @param ClassName The name of the Class
+    @param LibraryName The name of the Library
+*/
+#define ExportAbstractClass(ClassName, LibraryName) \
+    template class _##LibraryName##Export orxonox::ClassIdentifier<ClassName>; \
+    template class _##LibraryName##Export orxonox::ObjectList<ClassName>
+
+/**
+    @brief Returns the Identifier of the given class.
+    @param ClassName The name of the class
+*/
+#define Class(ClassName) \
+    ClassIdentifier<ClassName>::getIdentifier()
+
+/**
+    @brief Creates the entry in the Factory.
+    @param ClassName The name of the class
+*/
+#define CreateFactory(ClassName) \
+    bool bCreated##ClassName##Factory = orxonox::ClassFactory<ClassName>::create(#ClassName)
+
+/**
+    @brief Returns the Identifier with either a given name or a given network ID through the factory.
+    @param StringOrInt The name or the network ID of the class
+*/
+#define ID(StringOrInt) \
+    orxonox::Factory::getIdentifier(StringOrInt)
+
+/**
+    @brief Assigns the value, defined in the config-file, to the variable (or the default-value, if there is no entry in the file).
+    @param varname The name of the variable
+    @param defvalue The default-value of the variable
+*/
+#define SetConfigValue(varname, defvalue) \
+    orxonox::ConfigValueContainer* container##varname = this->getIdentifier()->getConfigValueContainer(#varname); \
+    if (!container##varname) \
+    { \
+        container##varname = new orxonox::ConfigValueContainer(this->getIdentifier()->getName(), #varname, varname = defvalue); \
+        this->getIdentifier()->setConfigValueContainer(#varname, container##varname); \
+    } \
+    container##varname->getValue(varname)
+
+/**
+    @brief Sets the variable and the config-file entry back to the previously defined default-value.
+    @param varname The name of the variable
+*/
+#define ResetConfigValue(varname) \
+    orxonox::ConfigValueContainer* container##varname##reset = this->getIdentifier()->getConfigValueContainer(#varname); \
+    if (container##varname##reset) \
+    { \
+        container##varname##reset->resetConfigValue(); \
+        container##varname##reset->getValue(varname); \
+    } \
+    else \
+        COUT(2) << "Warning: Couldn't reset variable " << #varname << ", corresponding container doesn't exist." << std::endl
+
+#endif /* _CoreIncludes_H__ */
Index: /code/branches/network/src/orxonox/core/CorePrereqs.h
===================================================================
--- /code/branches/network/src/orxonox/core/CorePrereqs.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/CorePrereqs.h	(revision 861)
@@ -0,0 +1,97 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  OrxonoxPrereq.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _CorePrereqs_H__
+#define _CorePrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( CORE_STATIC_BUILD )
+#  ifdef CORE_SHARED_BUILD
+#    define _CoreExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _CoreExport
+#    else
+#      define _CoreExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _CoreExport  __attribute__ ((visibility("default")))
+#else
+#  define _CoreExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+class SignalHandler;
+
+namespace orxonox
+{
+  class ArgReader;
+  class BaseFactory;
+  class BaseMetaObjectListElement;
+  template <class T>
+  class ClassFactory;
+  template <class T>
+  class ClassIdentifier;
+  class ConfigValueContainer;
+  class DebugLevel;
+  class Error;
+  class Factory;
+  class Identifier;
+  class IdentifierList;
+  class IdentifierListElement;
+  template <class T>
+  class Iterator;
+  class Language;
+  class LanguageEntry;
+  class Loader;
+  class MetaObjectList;
+  template <class T>
+  class MetaObjectListElement;
+  template <class T>
+  class ObjectList;
+  template <class T>
+  class ObjectListElement;
+  class OrxonoxClass;
+  class OutputHandler;
+  template <class T>
+  class SubclassIdentifier;
+}
+
+#endif /* _CorePrereqs_H__ */
Index: /code/branches/network/src/orxonox/core/Debug.h
===================================================================
--- /code/branches/network/src/orxonox/core/Debug.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/Debug.h	(revision 861)
@@ -0,0 +1,261 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Grauer
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ *
+ */
+
+/*!
+ * @file Debug.h
+ * @brief Handles the output for different verbose-modes.
+ *
+ * There are two modes: HARD and SOFT. HARD is precessed during compiletime, while SOFT is for runtime.
+ */
+
+#ifndef _Debug_H__
+#define _Debug_H__
+
+#include <stdio.h>
+
+#include "CorePrereqs.h"
+
+#include "OutputHandler.h"
+
+extern "C" _CoreExport int getSoftDebugLevel();
+
+// DEFINE ERROR MODES
+#define ORX_NONE            0
+#define ORX_ERROR           1
+#define ORX_WARNING         2
+#define ORX_INFO            3
+#define ORX_DEBUG           4
+#define ORX_vDEBUG          5
+
+//definitions
+#define ORX_PRINT_DEBUG_OUTPUT 1 // <-- fix that! should be a configurable setting
+
+#define ORX_HARD_DEBUG_LEVEL ORX_DEBUG
+//#define ORX_SOFT_DEBUG_LEVEL ORX_WARNING // <-- fix that! should be a configurable setting
+
+///////////////////////////////////////////////////
+/// PRINTF: prints with filename and linenumber ///
+///////////////////////////////////////////////////
+#define PRINTFORX_NONE    PRINTF0
+#define PRINTFORX_ERROR   PRINTF1
+#define PRINTFORX_WARNING PRINTF2
+#define PRINTFORX_INFO    PRINTF3
+#define PRINTFORX_DEBUG   PRINTF4
+#define PRINTFORX_vDEBUG  PRINTF5
+
+#define PRINT_EXEC  printf
+#define COUT_EXEC(x) \
+  orxonox::OutputHandler::getOutStream().setOutputLevel(x)
+
+#ifndef PRINTF
+ #if ORX_PRINT_DEBUG_OUTPUT
+
+  #define PRINTF(x) \
+   PRINTF ## x
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR
+   #define PRINTF1 \
+    if (getSoftDebugLevel() >= ORX_ERROR) \
+     printf("Error (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF1 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING
+   #define PRINTF2 \
+    if (getSoftDebugLevel() >= ORX_WARNING) \
+     printf("Warning (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF2 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO
+   #define PRINTF3 \
+    if (getSoftDebugLevel() >= ORX_INFO) \
+     printf("Info (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF3 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG
+   #define PRINTF4 \
+    if (getSoftDebugLevel() >= ORX_DEBUG) \
+     printf("Debug (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF4 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG
+   #define PRINTF5 \
+    if (getSoftDebugLevel() >= ORX_vDEBUG) \
+     printf("vDebug (in %s, line %d): ", __FILE__, __LINE__), PRINT_EXEC
+  #else
+   #define PRINTF5 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+ #else /* if ORX_PRINT_DEBUG_OUTPUT */
+  #define PRINTF(x) if (ORX_NONE) PRINT_EXEC
+ #endif /* if ORX_PRINT_DEBUG_OUTPUT */
+
+ #define PRINTF0 \
+  PRINT_EXEC
+#endif /* ifndef PRINTF */
+
+///////////////////////////////////////////////////
+///  PRINT: just prints output as is            ///
+///////////////////////////////////////////////////
+#define PRINTORX_NONE    PRINT0
+#define PRINTORX_ERROR   PRINT1
+#define PRINTORX_WARNING PRINT2
+#define PRINTORX_INFO    PRINT3
+#define PRINTORX_DEBUG   PRINT4
+#define PRINTORX_vDEBUG  PRINT5
+
+#ifndef PRINT
+ #if ORX_PRINT_DEBUG_OUTPUT
+  #define PRINT(x) \
+   PRINT ## x
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR
+   #define PRINT1  \
+    if (getSoftDebugLevel() >= ORX_ERROR)  \
+     PRINT_EXEC
+  #else
+   #define PRINT1 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING
+   #define PRINT2 \
+    if (getSoftDebugLevel() >= ORX_WARNING) \
+     PRINT_EXEC
+  #else
+   #define PRINT2 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO
+   #define PRINT3 \
+    if (getSoftDebugLevel() >= ORX_INFO) \
+     PRINT_EXEC
+  #else
+   #define PRINT3 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG
+   #define PRINT4 \
+    if (getSoftDebugLevel() >= ORX_DEBUG) \
+     PRINT_EXEC
+  #else
+   #define PRINT4 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG
+   #define PRINT5 \
+    if (getSoftDebugLevel() >= ORX_vDEBUG) \
+     PRINT_EXEC
+  #else
+   #define PRINT5 if (ORX_NONE) PRINT_EXEC
+  #endif
+
+ #else /* if ORX_PRINT_DEBUG_OUTPUT */
+  #define PRINT(x) if (ORX_NONE) PRINT_EXEC
+ #endif /* if ORX_PRINT_DEBUG_OUTPUT */
+
+ #define PRINT0 \
+  PRINT_EXEC
+#endif /* ifndef PRINT */
+
+
+////////////////////////////////////////////////////////
+///  COUT: just prints output as is with std::cout   ///
+////////////////////////////////////////////////////////
+#define COUTORX_NONE    COUT0
+#define COUTORX_ERROR   COUT1
+#define COUTORX_WARNING COUT2
+#define COUTORX_INFO    COUT3
+#define COUTORX_DEBUG   COUT4
+#define COUTORX_vDEBUG  COUT5
+
+#ifndef COUT
+ #if ORX_PRINT_DEBUG_OUTPUT
+  #define COUT(x) \
+   COUT ## x
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_ERROR
+   #define COUT1  \
+    if (getSoftDebugLevel() >= ORX_ERROR)  \
+     COUT_EXEC(1)
+  #else
+   #define COUT1 if (ORX_NONE)\
+    COUT_EXEC(1)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_WARNING
+   #define COUT2 \
+    if (getSoftDebugLevel() >= ORX_WARNING) \
+     COUT_EXEC(2)
+  #else
+   #define COUT2 if (ORX_NONE) \
+    COUT_EXEC(2)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_INFO
+   #define COUT3 \
+    if (getSoftDebugLevel() >= ORX_INFO) \
+     COUT_EXEC(3)
+  #else
+   #define COUT3 if (ORX_NONE) \
+    COUT_EXEC(3)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_DEBUG
+   #define COUT4 \
+    if (getSoftDebugLevel() >= ORX_DEBUG) \
+     COUT_EXEC(4)
+  #else
+   #define COUT4 if (ORX_NONE) \
+    COUT_EXEC(4)
+  #endif
+
+  #if ORX_HARD_DEBUG_LEVEL >= ORX_vDEBUG
+   #define COUT5 \
+    if (getSoftDebugLevel() >= ORX_vDEBUG) \
+     COUT_EXEC(5)
+  #else
+   #define COUT5 if (ORX_NONE) \
+    COUT_EXEC(5)
+  #endif
+
+ #else /* if ORX_PRINT_DEBUG_OUTPUT */
+  #define COUT(x) if (ORX_NONE) \
+   COUT_EXEC(5)
+ #endif /* if ORX_PRINT_DEBUG_OUTPUT */
+
+ #define COUT0 \
+  COUT_EXEC(0)
+#endif /* ifndef COUT */
+
+#endif /* _Debug_H__ */
Index: /code/branches/network/src/orxonox/core/DebugLevel.cc
===================================================================
--- /code/branches/network/src/orxonox/core/DebugLevel.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/DebugLevel.cc	(revision 861)
@@ -0,0 +1,106 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file DebugLevel.cc
+    @brief Implementation of the DebugLevel class.
+*/
+
+#include "DebugLevel.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Registers the object and sets the debug level.
+        @param A reference to a global variable, used to avoid an infinite recursion in getSoftDebugLevel()
+    */
+    DebugLevel::DebugLevel(bool& bReturnSoftDebugLevel)
+    {
+        RegisterRootObject(DebugLevel);
+        this->setConfigValues();
+        bReturnSoftDebugLevel = true;
+    }
+
+    /**
+        @brief Function to collect the SetConfigValue-macro calls.
+    */
+    void DebugLevel::setConfigValues()
+    {
+        SetConfigValue(softDebugLevelConsole_, 3).description("The maximal level of debug output shown in the console");
+        SetConfigValue(softDebugLevelLogfile_, 3).description("The maximal level of debug output shown in the logfile");
+        SetConfigValue(softDebugLevelShell_, 1).description("The maximal level of debug output shown in the ingame shell");
+
+        // softDebugLevel_ is the maximum of the 3 variables
+        this->softDebugLevel_ = this->softDebugLevelConsole_;
+        if (this->softDebugLevelLogfile_ > this->softDebugLevel_)
+            this->softDebugLevel_ = this->softDebugLevelLogfile_;
+        if (this->softDebugLevelShell_ > this->softDebugLevel_)
+            this->softDebugLevel_ = this->softDebugLevelShell_;
+    }
+
+    /**
+        @brief Static function that holds the singleton.
+    */
+    int DebugLevel::getSoftDebugLevel(OutputHandler::OutputDevice device)
+    {
+        static bool bCreatingSoftDebugLevelObject = true;   // Static variable - used to enhance the performance
+        static bool bReturnSoftDebugLevel = false;          // Static variable - used to avoid an infinite recursion
+        static DebugLevel* theOnlyDebugLevelObject = 0;     // Static variable - will contain a pointer to the only instance of the DebugLevel class
+
+        // If bReturnSoftDebugLevel is true, the instance of DebugLevel was created (it's set to true at the end of the constructor, call by reference)
+        if (bReturnSoftDebugLevel)
+        {
+            if (device == OutputHandler::LD_All)
+                return theOnlyDebugLevelObject->softDebugLevel_;
+            else if (device == OutputHandler::LD_Console)
+                return theOnlyDebugLevelObject->softDebugLevelConsole_;
+            else if (device == OutputHandler::LD_Logfile)
+                return theOnlyDebugLevelObject->softDebugLevelLogfile_;
+            else if (device == OutputHandler::LD_Shell)
+                return theOnlyDebugLevelObject->softDebugLevelShell_;
+        }
+
+        // If bCreatingSoftDebugLevelObject is true, we're just about to create an instance of the DebugLevel class
+        if (bCreatingSoftDebugLevelObject)
+        {
+            bCreatingSoftDebugLevelObject = false;
+            theOnlyDebugLevelObject = new DebugLevel(bReturnSoftDebugLevel);
+            return getSoftDebugLevel(device);
+        }
+
+        // Return a constant value while we're creating the object
+        return 4;
+    }
+}
+
+/**
+    @returns the soft debug level, stored in the only existing instance of the DebugLevel class, configured in the config-file.
+*/
+int getSoftDebugLevel()
+{
+    return orxonox::DebugLevel::getSoftDebugLevel();
+}
Index: /code/branches/network/src/orxonox/core/DebugLevel.h
===================================================================
--- /code/branches/network/src/orxonox/core/DebugLevel.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/DebugLevel.h	(revision 861)
@@ -0,0 +1,71 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file DebugLevel.h
+    @brief Definition of the DebugLevel class.
+
+    The DebugLevel class is a singleton, only used to configure the amount of debug
+    output (see Debug.h) into the console and the logfile (see OutputHandler.h).
+*/
+
+#ifndef _DebugLevel_H__
+#define _DebugLevel_H__
+
+#include "CorePrereqs.h"
+
+#include "OrxonoxClass.h"
+#include "OutputHandler.h"
+#include "CoreIncludes.h"
+
+namespace orxonox
+{
+    //! The DebugLevel class is a singleton, only used to configure the amount of debug output.
+    class _CoreExport DebugLevel : public OrxonoxClass
+    {
+        template <class T>
+        friend class ClassIdentifier; // forward declaration because of the private destructor
+
+        public:
+            static int getSoftDebugLevel(OutputHandler::OutputDevice device = OutputHandler::LD_All);
+            void setConfigValues();
+
+        private:
+            explicit DebugLevel(bool& bReturnSoftDebugLevel);
+            DebugLevel(const DebugLevel& dl) {} // don't copy
+            virtual ~DebugLevel() {}            // don't delete
+
+            int softDebugLevel_;                            //!< The debug level
+            int softDebugLevelConsole_;                     //!< The debug level for the console
+            int softDebugLevelLogfile_;                     //!< The debug level for the logfile
+            int softDebugLevelShell_;                       //!< The debug level for the ingame shell
+            ConfigValueContainer* softDebugLevelContainer_; //!< The config value container for the debug level
+    };
+    ExportAbstractClass(DebugLevel, Core);
+}
+
+#endif /* _DebugLevel_H__ */
Index: /code/branches/network/src/orxonox/core/Error.cc
===================================================================
--- /code/branches/network/src/orxonox/core/Error.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/Error.cc	(revision 861)
@@ -0,0 +1,63 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Nicolas Perrenoud
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "Debug.h"
+#include "Error.h"
+
+namespace orxonox
+{
+	Error::Error()
+	{
+		Error(0,"");
+	}
+
+	Error::Error(std::string errorMsg, int errorCode)
+	{
+		Error(errorCode, errorMsg);
+	}
+
+	Error::Error(int errorCode, std::string errorMsg)
+	{
+		COUT(1) << "############################ "<< std::endl
+							<< "#         Error "<<errorCode<< "          #"<< std::endl
+							<< "############################ "<< std::endl
+							<< "An error occured in Orxonox: "<< std::endl;
+
+		if (errorMsg=="")
+		{
+			switch (errorCode)
+			{
+				case 1:
+					errorMsg = "Some error!";
+					break;
+				default:
+					errorMsg = "Unknown error!";
+			}
+		}
+		COUT(1) << errorMsg << std::endl<< std::endl;
+	}
+}
Index: /code/branches/network/src/orxonox/core/Error.h
===================================================================
--- /code/branches/network/src/orxonox/core/Error.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/Error.h	(revision 861)
@@ -0,0 +1,48 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Nicolas Perrenoud
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Error_H__
+#define _Error_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+	class _CoreExport Error
+	{
+	public:
+		Error();
+		Error(std::string errorMsg, int errorCode = 0);
+		Error(int errorCode, std::string errorMsg = "");
+	private:
+
+	};
+}
+
+#endif /* _Error_H__ */
Index: /code/branches/network/src/orxonox/core/Factory.cc
===================================================================
--- /code/branches/network/src/orxonox/core/Factory.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/Factory.cc	(revision 861)
@@ -0,0 +1,109 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Factory.cc
+    @brief Implementation of the Factory class.
+*/
+
+#include "Identifier.h"
+#include "Debug.h"
+#include "BaseObject.h"
+#include "Factory.h"
+
+namespace orxonox
+{
+    /**
+        @returns the Identifier with a given name.
+        @param name The name of the wanted Identifier
+    */
+    Identifier* Factory::getIdentifier(const std::string& name)
+    {
+        return getFactoryPointer()->identifierStringMap_[name];
+    }
+
+    /**
+        @returns the Identifier with a given network ID.
+        @param id The network ID of the wanted Identifier
+    */
+    Identifier* Factory::getIdentifier(const unsigned int id)
+    {
+        return getFactoryPointer()->identifierNetworkIDMap_[id];
+    }
+
+    /**
+        @brief Adds a new Identifier to both maps.
+        @param name The name of the identifier
+        @param identifier The identifier to add
+    */
+    void Factory::add(const std::string& name, Identifier* identifier)
+    {
+        getFactoryPointer()->identifierStringMap_[name] = identifier;
+        getFactoryPointer()->identifierNetworkIDMap_[identifier->getNetworkID()] = identifier;
+    }
+
+    /**
+        @brief Removes the entry with the old network ID and adds a new one.
+        @param identifier The identifier to change
+        @param oldID The old networkID
+        @param newID The new networkID
+    */
+    void Factory::changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID)
+    {
+        getFactoryPointer()->identifierNetworkIDMap_.erase(oldID);
+        getFactoryPointer()->identifierNetworkIDMap_[newID] = identifier;
+    }
+
+    /**
+        @brief Creates the class-hierarchy by creating and destroying one object of each type.
+    */
+    void Factory::createClassHierarchy()
+    {
+        COUT(3) << "*** Factory -> Create class-hierarchy" << std::endl;
+        std::map<std::string, Identifier*>::iterator it;
+        it = getFactoryPointer()->identifierStringMap_.begin();
+        (*getFactoryPointer()->identifierStringMap_.begin()).second->startCreatingHierarchy();
+        for (it = getFactoryPointer()->identifierStringMap_.begin(); it != getFactoryPointer()->identifierStringMap_.end(); ++it)
+        {
+            // To create the new branch of the class-hierarchy, we create a new object and delete it afterwards.
+            BaseObject* temp = (*it).second->fabricate();
+            delete temp;
+        }
+        (*getFactoryPointer()->identifierStringMap_.begin()).second->stopCreatingHierarchy();
+        COUT(3) << "*** Factory -> Finished class-hierarchy creation" << std::endl;
+    }
+
+    /**
+        @brief Ensures the Factory gets created in the right moment.
+        @return The Factory.
+    */
+    Factory* Factory::getFactoryPointer()
+    {
+      static Factory theOneAndOnlyFactoryInstance = Factory();
+      return &theOneAndOnlyFactoryInstance;
+    }
+}
Index: /code/branches/network/src/orxonox/core/Factory.h
===================================================================
--- /code/branches/network/src/orxonox/core/Factory.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/Factory.h	(revision 861)
@@ -0,0 +1,91 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Factory.h
+    @brief Definition of the Factory and the BaseFactory class.
+
+    The Factory is a singleton, containing two maps to map either the name or the network ID
+    of a class with the corresponding Identifier.
+
+    Usage:
+    ID(classname) or ID(networkID) returns the corresponding Identifier.
+
+
+    BaseObject is the parent of ClassFactory which is defined in ClassFactory.h.
+    It can't be defined in ClassFactory.h, because of circular dependencies.
+*/
+
+#ifndef _Factory_H__
+#define _Factory_H__
+
+#include <map>
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    class BaseObject; // Forward declaration
+
+    // ###############################
+    // ###         Factory         ###
+    // ###############################
+    //! The Factory is used to map the name or the network ID of a class with its Identifier.
+    class _CoreExport Factory
+    {
+        public:
+            static Identifier* getIdentifier(const std::string& name);
+            static Identifier* getIdentifier(const unsigned int id);
+            static void add(const std::string& name, Identifier* identifier);
+            static void changeNetworkID(Identifier* identifier, const unsigned int oldID, const unsigned int newID);
+            static void createClassHierarchy();
+
+            static Factory* getFactoryPointer();    // avoid overriding order problem in the static intialisation process
+
+        private:
+            Factory() {}                            // don't create
+            Factory(const Factory& factory) {}      // don't copy
+            ~Factory() {}                           // don't delete
+
+            std::map<std::string, Identifier*> identifierStringMap_;            //!< The map, mapping the name with the Identifier
+            std::map<unsigned int, Identifier*> identifierNetworkIDMap_;        //!< The map, mapping the network ID with the Identifier
+    };
+
+    // ###############################
+    // ###       BaseFactory       ###
+    // ###############################
+    //! Base-class of ClassFactory. Has to be defined separate because of circular dependencies.
+    class _CoreExport BaseFactory
+    {
+        public:
+            virtual BaseObject* fabricate() = 0;
+            virtual ~BaseFactory() {};
+    };
+}
+
+#endif /* _Factory_H__ */
Index: /code/branches/network/src/orxonox/core/Identifier.cc
===================================================================
--- /code/branches/network/src/orxonox/core/Identifier.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/Identifier.cc	(revision 861)
@@ -0,0 +1,162 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Identifier.cc
+    @brief Implementation of the Identifier class.
+*/
+
+#include "Identifier.h"
+#include "Factory.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###       Identifier        ###
+    // ###############################
+    int Identifier::hierarchyCreatingCounter_s = 0; // Set the static member variable hierarchyCreatingCounter_s to zero (this static member variable is ok: it's used in main(), not before)
+
+    /**
+        @brief Constructor: No factory, no object created, new ObjectList and a unique networkID.
+    */
+    Identifier::Identifier()
+    {
+        this->bCreatedOneObject_ = false;
+        this->factory_ = 0;
+
+        this->children_ = new IdentifierList;
+
+        // Use a static variable because the classID gets created before main() and that's why we should avoid static member variables
+        static unsigned int classIDcounter_s = 0;
+        this->classID_ = classIDcounter_s++;
+    }
+
+    /**
+        @brief Destructor: Deletes the IdentifierList containing the children.
+    */
+    Identifier::~Identifier()
+    {
+        delete this->children_;
+    }
+
+    /**
+        @brief Initializes the Identifier with an IdentifierList containing all parents of the class the Identifier belongs to.
+        @param parents The IdentifierList containing all parents
+    */
+    void Identifier::initialize(const IdentifierList* parents)
+    {
+        COUT(4) << "*** Initialize " << this->name_ << "-Singleton." << std::endl;
+        this->bCreatedOneObject_ = true;
+
+        if (parents)
+        {
+            IdentifierListElement* temp1 = parents->first_;
+            while (temp1)
+            {
+                this->parents_.add(temp1->identifier_);
+                temp1->identifier_->getChildren().add(this); // We're a child of our parents
+
+                temp1 = temp1->next_;
+            }
+        }
+    }
+
+    /**
+        @brief Creates an object of the type the Identifier belongs to.
+        @return The new object
+    */
+    BaseObject* Identifier::fabricate()
+    {
+        if (this->factory_)
+        {
+            return this->factory_->fabricate(); // We have to return a BaseObject, because we don't know the exact type.
+        }
+        else
+        {
+            // Abstract classes don't have a factory and therefore can't create new objects
+            COUT(1) << "Error: Cannot create an object of type '" << this->name_ << "'. Class is abstract." << std::endl;
+            COUT(1) << "Aborting..." << std::endl;
+            abort();
+            return NULL;
+        }
+    }
+
+    /**
+        @brief Sets the network ID to a new value and changes the entry in the Factory.
+        @param id The new network ID
+    */
+    void Identifier::setNetworkID(unsigned int id)
+    {
+        Factory::changeNetworkID(this, this->classID_, id);
+        this->classID_ = id;
+    }
+
+    /**
+        @returns a reference to the Identifier map, containing all Identifiers.
+    */
+    std::map<std::string, Identifier*>& Identifier::getIdentifierMap()
+    {
+        static std::map<std::string, Identifier*> identifierMapStaticReference = std::map<std::string, Identifier*>();
+        return identifierMapStaticReference;
+    }
+
+    /**
+        @returns true, if the Identifier is at least of the given type.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isA(const Identifier* identifier) const
+    {
+        return (identifier == this || this->parents_.isInList(identifier));
+    }
+
+    /**
+        @returns true, if the Identifier is exactly of the given type.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isDirectlyA(const Identifier* identifier) const
+    {
+        return (identifier == this);
+    }
+
+    /**
+        @returns true, if the assigned identifier is a child of the given identifier.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isChildOf(const Identifier* identifier) const
+    {
+        return this->parents_.isInList(identifier);
+    }
+
+    /**
+        @returns true, if the assigned identifier is a parent of the given identifier.
+        @param identifier The identifier to compare with
+    */
+    bool Identifier::isParentOf(const Identifier* identifier) const
+    {
+        return this->children_->isInList(identifier);
+    }
+}
Index: /code/branches/network/src/orxonox/core/Identifier.h
===================================================================
--- /code/branches/network/src/orxonox/core/Identifier.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/Identifier.h	(revision 861)
@@ -0,0 +1,413 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Identifier.h
+    @brief Definition of the Identifier, ClassIdentifier and SubclassIdentifier classes, implementation of the ClassIdentifier and SubclassIdentifier classes.
+
+    The Identifier contains all needed informations about the class it belongs to:
+     - the name
+     - a list with all objects
+     - parents and childs
+     - the factory (if available)
+     - the networkID that can be synchronised with the server
+     - all configurable variables (if available)
+
+    Every object has a pointer to the Identifier of its class. This allows the use isA(...),
+    isDirectlyA(...), isChildOf(...) and isParentOf(...).
+
+    To create the class-hierarchy, the Identifier has some intern functions and variables.
+
+    Every Identifier is in fact a ClassIdentifier, but they are derived from Identifier.
+
+    SubclassIdentifier is a separated class, acting like an Identifier, but has a given class.
+    You can only assign Identifiers of exactly the given class or of a derivative to a SubclassIdentifier.
+*/
+
+#ifndef _Identifier_H__
+#define _Identifier_H__
+
+#include <map>
+#include <string>
+#include <utility>
+
+#include "CorePrereqs.h"
+
+#include "ObjectList.h"
+#include "IdentifierList.h"
+#include "Debug.h"
+#include "Iterator.h"
+
+namespace orxonox
+{
+    class BaseFactory; // Forward declaration
+    class BaseObject;  // Forward declaration
+
+    // ###############################
+    // ###       Identifier        ###
+    // ###############################
+    //! The Identifier is used to identify the class of an object and to store informations about the class.
+    /**
+        The Identifier contains all needed informations about the class it belongs to:
+         - the name
+         - a list with all objects
+         - parents and childs
+         - the factory (if available)
+         - the networkID that can be synchronised with the server
+         - all configurable variables (if available)
+
+        Every object has a pointer to the Identifier of its class. This allows the use isA(...),
+        isDirectlyA(...), isChildOf(...) and isParentOf(...).
+
+        You can't directly create an Identifier, it's just the base-class for ClassIdentifier.
+    */
+    class _CoreExport Identifier
+    {
+        template <class T>
+        friend class ClassIdentifier; // Forward declaration
+
+        template <class T>
+        friend class SubclassIdentifier; // Forward declaration
+
+        friend class Factory; // Forward declaration
+
+        public:
+            /** @brief Sets the Factory. @param factory The factory to assign */
+            inline void addFactory(BaseFactory* factory) { this->factory_ = factory; }
+
+            BaseObject* fabricate();
+            bool isA(const Identifier* identifier) const;
+            bool isDirectlyA(const Identifier* identifier) const;
+            bool isChildOf(const Identifier* identifier) const;
+            bool isParentOf(const Identifier* identifier) const;
+
+            static std::map<std::string, Identifier*>& getIdentifierMap();
+
+            /** @brief Removes all objects of the corresponding class. */
+            virtual void removeObjects() const = 0;
+
+            /** @returns the name of the class the Identifier belongs to. */
+            inline const std::string& getName() const { return this->name_; }
+
+            /** @returns the parents of the class the Identifier belongs to. */
+            inline const IdentifierList& getParents() const { return this->parents_; }
+
+            /** @returns the children of the class the Identifier belongs to. */
+            inline IdentifierList& getChildren() const { return *this->children_; }
+
+            /** @returns true, if a branch of the class-hierarchy is being created, causing all new objects to store their parents. */
+            inline static bool isCreatingHierarchy() { return (hierarchyCreatingCounter_s > 0); }
+
+            /** @returns the network ID to identify a class through the network. */
+            inline const unsigned int getNetworkID() const { return this->classID_; }
+
+            /** @brief Sets the network ID to a new value. @param id The new value */
+            void setNetworkID(unsigned int id);
+
+            /** @returns the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variable */
+            inline ConfigValueContainer* getConfigValueContainer(const std::string& varname)
+                { return this->configValues_[varname]; }
+
+            /** @brief Sets the ConfigValueContainer of a variable, given by the string of its name. @param varname The name of the variablee @param container The container */
+            inline void setConfigValueContainer(const std::string& varname, ConfigValueContainer* container)
+                { this->configValues_[varname] = container; }
+
+        private:
+            Identifier();
+            Identifier(const Identifier& identifier) {} // don't copy
+            virtual ~Identifier();
+            void initialize(const IdentifierList* parents);
+
+            /**
+                @brief Increases the hierarchyCreatingCounter_s variable, causing all new objects to store their parents.
+            */
+            inline static void startCreatingHierarchy()
+            {
+                hierarchyCreatingCounter_s++;
+                COUT(4) << "*** Increased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
+            }
+
+            /**
+                @brief Decreases the hierarchyCreatingCounter_s variable, causing the objects to stop storing their parents.
+            */
+            inline static void stopCreatingHierarchy()
+            {
+                hierarchyCreatingCounter_s--;
+                COUT(4) << "*** Decreased Hierarchy-Creating-Counter to " << hierarchyCreatingCounter_s << std::endl;
+            }
+
+            IdentifierList parents_;                                    //!< The Parents of the class the Identifier belongs to
+            IdentifierList* children_;                                  //!< The Children of the class the Identifier belongs to
+
+            std::string name_;                                          //!< The name of the class the Identifier belongs to
+
+            BaseFactory* factory_;                                      //!< The Factory, able to create new objects of the given class (if available)
+            bool bCreatedOneObject_;                                    //!< True if at least one object of the given type was created (used to determine the need of storing the parents)
+            static int hierarchyCreatingCounter_s;                      //!< Bigger than zero if at least one Identifier stores its parents (its an int instead of a bool to avoid conflicts with multithreading)
+            unsigned int classID_;                                      //!< The network ID to identify a class through the network
+            std::map<std::string, ConfigValueContainer*> configValues_; //!< A map to link the string of configurable variables with their ConfigValueContainer
+    };
+
+
+    // ###############################
+    // ###     ClassIdentifier     ###
+    // ###############################
+    //! The ClassIdentifier is derived from Identifier and holds all class-specific functions and variables the Identifier cannot have.
+    /**
+        ClassIdentifier is a Singleton, which means that only one object of a given type T exists.
+        This makes it possible to store informations about a class, sharing them with all
+        objects of that class without defining static variables in every class.
+    */
+    template <class T>
+    class ClassIdentifier : public Identifier
+    {
+        public:
+            static ClassIdentifier<T>* registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass);
+            static void addObject(T* object);
+            static ClassIdentifier<T>* getIdentifier();
+            void removeObjects() const;
+            void setName(const std::string& name);
+
+        private:
+            ClassIdentifier();
+            ClassIdentifier(const ClassIdentifier<T>& identifier) {}    // don't copy
+            ~ClassIdentifier() {}                                       // don't delete
+
+            ObjectList<T>* objects_;    //!< The ObjectList, containing all objects of type T
+            bool bSetName_;             //!< True if the name is set
+    };
+
+    /**
+        @brief Constructor: Creates the ObjectList.
+    */
+    template <class T>
+    ClassIdentifier<T>::ClassIdentifier()
+    {
+        this->objects_ = ObjectList<T>::getList();
+        this->bSetName_ = false;
+    }
+
+    /**
+        @brief Registers a class, which means that the name and the parents get stored.
+        @param parents An IdentifierList, containing the Identifiers of all parents of the class
+        @param name A string, containing exactly the name of the class
+        @param bRootClass True if the class is either an Interface or the BaseObject itself
+        @return The ClassIdentifier itself
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::registerClass(const IdentifierList* parents, const std::string& name, bool bRootClass)
+    {
+        COUT(4) << "*** Register Class in " << name << "-Singleton." << std::endl;
+
+        // Check if at least one object of the given type was created
+        if (!getIdentifier()->bCreatedOneObject_)
+        {
+            // If no: We have to store the informations and initialize the Identifier
+            getIdentifier()->setName(name);
+
+            COUT(4) << "*** Register Class in " << name << "-Singleton -> Initialize Singleton." << std::endl;
+            if (bRootClass)
+                getIdentifier()->initialize(NULL); // If a class is derived from two interfaces, the second interface might think it's derived from the first because of the order of constructor-calls. Thats why we set parents to zero in that case.
+            else
+                getIdentifier()->initialize(parents);
+        }
+
+        return getIdentifier();
+    }
+
+    /**
+        @brief Creates the only instance of this class for the template class T.
+        @return The Identifier itself
+    */
+    template <class T>
+    ClassIdentifier<T>* ClassIdentifier<T>::getIdentifier()
+    {
+        static ClassIdentifier<T> theOneAndOnlyInstance = ClassIdentifier<T>();
+        static bool bIdentifierCreated = false;
+
+        if (!bIdentifierCreated)
+        {
+            COUT(4) << "*** Create Identifier Singleton." << std::endl;
+            bIdentifierCreated = true;
+        }
+
+        return &theOneAndOnlyInstance;
+    }
+
+    /**
+        @brief Sets the name of the class.
+        @param name The name
+    */
+    template <class T>
+    void ClassIdentifier<T>::setName(const std::string& name)
+    {
+        // Make sure we didn't already set the name, to avoid duplicate entries in the Identifier map
+        if (!this->bSetName_)
+        {
+            this->name_ = name;
+            this->getIdentifierMap().insert(std::pair<std::string, Identifier*>(name, this));
+            this->bSetName_ = true;
+        }
+    }
+
+    /**
+        @brief Adds an object of the given type to the ObjectList.
+        @param object The object to add
+    */
+    template <class T>
+    void ClassIdentifier<T>::addObject(T* object)
+    {
+        COUT(4) << "*** Added object to " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl;
+        object->getMetaList().add(ClassIdentifier<T>::getIdentifier()->objects_, ClassIdentifier<T>::getIdentifier()->objects_->add(object));
+    }
+
+    /**
+        @brief Removes all objects of the corresponding class.
+    */
+    template <class T>
+    void ClassIdentifier<T>::removeObjects() const
+    {
+        for (Iterator<T> it = ObjectList<T>::start(); it;)
+            delete *(it++);
+    }
+
+    // ###############################
+    // ###   SubclassIdentifier    ###
+    // ###############################
+    //! The SubclassIdentifier acts almost like an Identifier, but has some prerequisites.
+    /**
+        You can only assign an Identifier that belongs to a class T (or derived) to a SubclassIdentifier<T>.
+        If you assign something else, the program aborts.
+        Because we know the minimal type, a dynamic_cast is done, which makes it easier to create a new object.
+    */
+    template <class T>
+    class SubclassIdentifier
+    {
+        public:
+            /**
+                @brief Constructor: Automaticaly assigns the Identifier of the given class.
+            */
+            SubclassIdentifier()
+            {
+                this->identifier_ = ClassIdentifier<T>::getIdentifier();
+            }
+
+            /**
+                @brief Overloading of the = operator: assigns the identifier and checks its type.
+                @param identifier The Identifier to assign
+                @return The SubclassIdentifier itself
+            */
+            SubclassIdentifier<T>& operator=(Identifier* identifier)
+            {
+                if (!identifier->isA(ClassIdentifier<T>::getIdentifier()))
+                {
+                    COUT(1) << "Error: Class " << identifier->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
+                    COUT(1) << "Error: SubclassIdentifier<" << ClassIdentifier<T>::getIdentifier()->getName() << "> = Class(" << identifier->getName() << ") is forbidden." << std::endl;
+                    COUT(1) << "Aborting..." << std::endl;
+                    abort();
+                }
+                this->identifier_ = identifier;
+                return *this;
+            }
+
+            /**
+                @brief Overloading of the * operator: returns the assigned identifier.
+                @return The assigned identifier
+            */
+            Identifier* operator*()
+            {
+                return this->identifier_;
+            }
+
+            /**
+                @brief Overloading of the -> operator: returns the assigned identifier.
+                @return The assigned identifier
+            */
+            Identifier* operator->() const
+            {
+                return this->identifier_;
+            }
+
+            /**
+                @brief Creates a new object of the type of the assigned Identifier and dynamic_casts it to the minimal type given by T.
+                @return The new object
+            */
+            T* fabricate()
+            {
+                BaseObject* newObject = this->identifier_->fabricate();
+
+                // Check if the creation was successful
+                if (newObject)
+                {
+                    // Do a dynamic_cast, because an object of type T is much better than of type BaseObject
+                    return (T*)(newObject);
+                }
+                else
+                {
+                    // Something went terribly wrong
+                    if (this->identifier_)
+                    {
+                        COUT(1) << "Error: Class " << this->identifier_->getName() << " is not a " << ClassIdentifier<T>::getIdentifier()->getName() << "!" << std::endl;
+                        COUT(1) << "Error: Couldn't fabricate a new Object." << std::endl;
+                        COUT(1) << "Aborting..." << std::endl;
+                    }
+                    else
+                    {
+                        COUT(1) << "Error: Couldn't fabricate a new Object - Identifier is undefined." << std::endl;
+                        COUT(1) << "Aborting..." << std::endl;
+                    }
+
+                    abort();
+                }
+            }
+
+            /** @returns the assigned identifier. */
+            inline const Identifier* getIdentifier() const
+                { return this->identifier_; }
+
+            /** @returns true, if the assigned identifier is at least of the given type. @param identifier The identifier to compare with */
+            inline bool isA(const Identifier* identifier) const
+                { return this->identifier_->isA(identifier); }
+
+            /** @returns true, if the assigned identifier is exactly of the given type. @param identifier The identifier to compare with */
+            inline bool isDirectlyA(const Identifier* identifier) const
+                { return this->identifier_->isDirectlyA(identifier); }
+
+            /** @returns true, if the assigned identifier is a child of the given identifier. @param identifier The identifier to compare with */
+            inline bool isChildOf(const Identifier* identifier) const
+                { return this->identifier_->isChildOf(identifier); }
+
+            /** @returns true, if the assigned identifier is a parent of the given identifier. @param identifier The identifier to compare with */
+            inline bool isParentOf(const Identifier* identifier) const
+                { return this->identifier_->isParentOf(identifier); }
+
+        private:
+            Identifier* identifier_;        //!< The assigned identifier
+    };
+}
+
+#endif /* _Identifier_H__ */
Index: /code/branches/network/src/orxonox/core/IdentifierList.cc
===================================================================
--- /code/branches/network/src/orxonox/core/IdentifierList.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/IdentifierList.cc	(revision 861)
@@ -0,0 +1,161 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file IdentifierList.cc
+    @brief Implementation of the IdentifierList class.
+*/
+
+#include "Identifier.h"
+#include "IdentifierList.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###     IdentifierList      ###
+    // ###############################
+    /**
+        @brief Constructor: Sets first_ to zero.
+    */
+    IdentifierList::IdentifierList()
+    {
+        this->first_ = 0;
+    }
+
+    /**
+        @brief Destructor: Deletes all elements in the list, but NOT THE IDENTIFIERS.
+    */
+    IdentifierList::~IdentifierList()
+    {
+        IdentifierListElement* temp;
+        while (this->first_)
+        {
+            temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+        }
+    }
+
+    /**
+        @brief Adds an Identifier to the list.
+        @param identifier The Identifier to add
+    */
+    void IdentifierList::add(const Identifier* identifier)
+    {
+        IdentifierListElement* temp = this->first_;
+        this->first_ = new IdentifierListElement(identifier);
+        this->first_->next_ = temp;
+    }
+
+    /**
+        @brief Removes an Identifier from the list.
+        @param identifier The Identifier to remove
+    */
+    void IdentifierList::remove(const Identifier* identifier)
+    {
+        if (!identifier)
+            return;
+
+        // Check if we have to delete the first element
+        if (this->first_->identifier_ == identifier)
+        {
+            IdentifierListElement* temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+
+            return;
+        }
+
+        // Iterate through the list
+        IdentifierListElement* temp = this->first_;
+        while (temp->next_)
+        {
+            if (temp->next_->identifier_ == identifier)
+            {
+                IdentifierListElement* temp2 = temp->next_->next_;
+                delete temp->next_;
+                temp->next_ = temp2;
+
+                return;
+            }
+
+            temp = temp->next_;
+        }
+    }
+
+    /**
+        @brief Checks if a given Identifier is in the list and returns true if yes.
+        @param identifier The Identifier to check
+        @return True if the Identifier is in the list
+    */
+    bool IdentifierList::isInList(const Identifier* identifier) const
+    {
+        IdentifierListElement* temp = this->first_;
+        while (temp)
+        {
+            if (temp->identifier_ == identifier)
+                return true;
+
+            temp = temp->next_;
+        }
+
+        return false;
+    }
+
+    /**
+        @returns a string, containing a list of the names of all Identifiers in the list.
+    */
+    std::string IdentifierList::toString() const
+    {
+        IdentifierListElement* temp = this->first_;
+        std::string output = "";
+
+        while (temp)
+        {
+            output += temp->identifier_->getName();
+            output += " ";
+
+            temp = temp->next_;
+        }
+
+        return output;
+    }
+
+
+    // ###############################
+    // ###  IdentifierListElement  ###
+    // ###############################
+    /**
+        @brief Constructor: Creates the list-element with a given identifier.
+        @param identifier The Identifier to store
+    */
+    IdentifierListElement::IdentifierListElement(const Identifier* identifier)
+    {
+        this->identifier_ = identifier;
+        this->next_ = 0;
+    }
+}
Index: /code/branches/network/src/orxonox/core/IdentifierList.h
===================================================================
--- /code/branches/network/src/orxonox/core/IdentifierList.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/IdentifierList.h	(revision 861)
@@ -0,0 +1,70 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file IdentifierList.h
+    @brief Definition of the IdentifierList class
+
+    The IdentifierList is a single-linked list, containing Identifiers.
+    The IdentifierList is used to store parents and childs of each Identifier.
+*/
+
+#ifndef _IdentifierList_H__
+#define _IdentifierList_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    //! The list-element of the IdentifierList
+    class IdentifierListElement
+    {
+        public:
+            IdentifierListElement(const Identifier* identifier);
+
+            const Identifier* identifier_;      //!< The identifier
+            IdentifierListElement* next_;       //!< The next element in the list
+    };
+
+    //! The IdentifierList contains Identifiers
+    class _CoreExport IdentifierList
+    {
+        public:
+            IdentifierList();
+            ~IdentifierList();
+            void add(const Identifier* identifier);
+            void remove(const Identifier* identifier);
+            bool isInList(const Identifier* identifier) const;
+            std::string toString() const;
+
+            IdentifierListElement* first_;      //!< The first element in the list
+    };
+}
+
+#endif /* _IdentifierList_H__ */
Index: /code/branches/network/src/orxonox/core/Iterator.h
===================================================================
--- /code/branches/network/src/orxonox/core/Iterator.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/Iterator.h	(revision 861)
@@ -0,0 +1,166 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Iterator.h
+    @brief Definition and implementation of the Iterator class.
+
+    The Iterator of a given class allows to iterate through an ObjectList, containing all objects of that type.
+    This is the only way to access the objects stored in an ObjectList.
+
+    Usage:
+    for (Iterator<class> it = ObjectList<class>::start(); it != 0; ++it)
+    {
+        it->someFunction(...);
+        class* myObject = *it;
+    }
+
+    Warning: Don't delete objects directly through the iterator.
+*/
+
+#ifndef _Iterator_H__
+#define _Iterator_H__
+
+#include "CorePrereqs.h"
+
+#include "ObjectList.h"
+#include "Debug.h"
+
+namespace orxonox
+{
+    //! The iterator allows to iterate through an ObjectList of a given class.
+    template <class T>
+    class Iterator
+    {
+        public:
+            /**
+                @brief Constructor: Sets the element, whereon the iterator points, to zero.
+            */
+            Iterator()
+            {
+                this->element_ = 0;
+            }
+
+            /**
+                @brief Constructor: Sets the element, whereon the iterator points, to a given element.
+                @param element The element to start with
+            */
+            Iterator(ObjectListElement<T>* element)
+            {
+                this->element_ = element;
+            }
+
+            /**
+                @brief Overloading of the ++it operator: Iterator points to the next object in the list.
+                @return The Iterator itself
+            */
+            Iterator<T> operator++()
+            {
+                this->element_ = this->element_->next_;
+                return *this;
+            }
+
+            /**
+                @brief Overloading of the it++ operator: Iterator points to the next object in the list.
+                @return The Iterator itself
+            */
+            Iterator<T> operator++(int i)
+            {
+                Iterator<T> copy = *this;
+                this->element_ = this->element_->next_;
+                return copy;
+            }
+
+            /**
+                @brief Overloading of the --it operator: Iterator points to the previous object in the list.
+                @return The Iterator itself
+            */
+            Iterator<T> operator--()
+            {
+                this->element_ = this->element_->prev_;
+                return *this;
+            }
+
+            /**
+                @brief Overloading of the it-- operator: Iterator points to the previous object in the list.
+                @return The Iterator itself
+            */
+            Iterator<T> operator--(int i)
+            {
+                Iterator<T> copy = *this;
+                this->element_ = this->element_->prev_;
+                return copy;
+            }
+
+            /**
+                @brief Overloading of the *it operator: returns the pointer to the object.
+                @return The object the Iterator points at
+            */
+            T* operator*()
+            {
+                return this->element_->object_;
+            }
+
+            /**
+                @brief Overloading of the it-> operator: returns the pointer to the object.
+                @return The object the Iterator points at
+            */
+            T* operator->() const
+            {
+                return this->element_->object_;
+
+            }
+
+            /**
+                @brief Overloading of the typecast-operator to bool: returns true if the iterator points to an existing object.
+                @return True if the iterator points to an existing object.
+            */
+            operator bool()
+            {
+                return (this->element_ != 0);
+            }
+
+            /**
+                @brief Overloading of the (it != int) operator: Used for (it != 0) instead of typecast-operator to bool.
+                @param compare The integer (must be zero, everything else makes no sense).
+                @return True if the iterator points to an existing object.
+            */
+            bool operator!=(int compare)
+            {
+                // Comparing with anything except zero makes no sense
+                if (compare != 0)
+                    COUT(2) << "Warning: Comparing the " << ClassIdentifier<T>::getIdentifier()->getName() << "-List-Iterator with " << compare << " has no effect. Only comparison with 0 works." << std::endl;
+
+                return (this->element_ != 0);
+            }
+
+        private:
+            ObjectListElement<T>* element_;     //!< The element the Iterator points at
+    };
+}
+
+#endif /* _Iterator_H__ */
Index: /code/branches/network/src/orxonox/core/Language.cc
===================================================================
--- /code/branches/network/src/orxonox/core/Language.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/Language.cc	(revision 861)
@@ -0,0 +1,336 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Language.cc
+    @brief Implementation of the Language and the LanguageEntry class.
+*/
+
+#include <fstream>
+
+#include "CoreIncludes.h"
+#include "Language.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###      LanguageEntry      ###
+    // ###############################
+    /**
+        @brief Constructor: Sets the default entry.
+        @param fallbackEntry The default entry
+    */
+    LanguageEntry::LanguageEntry(const std::string& fallbackEntry)
+    {
+        RegisterRootObject(LanguageEntry);
+
+        this->fallbackEntry_ = fallbackEntry;
+        this->translatedEntry_ = fallbackEntry; // Set the translation to the fallback entry, for the case that no translation gets assigned
+        this->bTranslationSet_ = false;
+    }
+
+    /**
+        @brief Sets the translation of the entry.
+        @param translation The translation
+    */
+    void LanguageEntry::setTranslation(const std::string& translation)
+    {
+        // Check if the translation is more than just an empty string
+        if (translation.compare("") != 0)
+        {
+            this->translatedEntry_ = translation;
+            this->bTranslationSet_ = true;
+        }
+        else
+            this->translatedEntry_ = this->fallbackEntry_;
+    }
+
+    /**
+        @brief Sets the default entry.
+        @param fallbackEntry The default entry
+    */
+    void LanguageEntry::setDefault(const std::string& fallbackEntry)
+    {
+        // If the default entry changes and the translation wasn't set yet, use the new default entry as translation
+        if (!this->bTranslationSet_)
+            this->translatedEntry_ = fallbackEntry;
+
+        this->fallbackEntry_ = fallbackEntry;
+    }
+
+    // ###############################
+    // ###        Language         ###
+    // ###############################
+    /**
+        @brief Constructor: Reads the default language file and sets some values.
+    */
+    Language::Language()
+    {
+        RegisterRootObject(Language);
+
+        this->defaultLanguage_ = "default";
+        this->defaultTranslation_ = "ERROR: LANGUAGE ENTRY DOESN'T EXIST!";
+
+        // Read the default language file to create all known LanguageEntry objects
+        this->readDefaultLanguageFile();
+    }
+
+    /**
+        @brief Function to collect the SetConfigValue-macro calls.
+    */
+    void Language::setConfigValues()
+    {
+        SetConfigValue(language_, this->defaultLanguage_).description("The language of the ingame text");
+
+        // Read the translation file after the language was configured
+        this->readTranslatedLanguageFile();
+    }
+
+    /**
+        @brief Returns a reference to the only existing instance of the Language class and calls the setConfigValues() function.
+        @return The reference to the only existing instance
+    */
+    Language& Language::getLanguage()
+    {
+        // Use static variables to avoid conflicts while executing this code before main()
+        static Language theOnlyLanguageObject = Language();
+        static bool bCreatingTheOnlyLanguageObject = true;
+
+        // This workaround is used to set a description of the own config value without creating an infinite recursion
+        if (bCreatingTheOnlyLanguageObject)
+        {
+            bCreatingTheOnlyLanguageObject = false;
+            theOnlyLanguageObject.setConfigValues();
+        }
+
+        return theOnlyLanguageObject;
+    }
+
+    /**
+        @brief Creates a new LanguageEntry with a given name and a given default entry.
+        @param name The name of the entry
+        @param entry The default entry
+        @return The created LanguageEntry object
+    */
+    LanguageEntry* Language::createEntry(const LanguageEntryName& name, const std::string& entry)
+    {
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+
+        // Make sure we don't create a duplicate entry
+        if (it == this->languageEntries_.end())
+        {
+            LanguageEntry* newEntry = new LanguageEntry(entry);
+            newEntry->setName(name);
+            this->languageEntries_[name] = newEntry;
+            return newEntry;
+        }
+
+        COUT(2) << "Warning: Language entry " << name << " is duplicate in " << getFileName(this->defaultLanguage_) << "!" << std::endl;
+        return it->second;
+    }
+
+    /**
+        @brief Adds a new LanguageEntry, if it's not already existing.
+        @param name The name of the entry
+        @param entry The default entry
+    */
+    void Language::addEntry(const LanguageEntryName& name, const std::string& entry)
+    {
+        COUT(5) << "Called addEntry with\n  name: " << name << "\n  entry: " <<  entry << std::endl;
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+        if (it == this->languageEntries_.end())
+        {
+            // The entry isn't available yet, meaning it's new, so create it
+            this->createEntry(name, entry);
+        }
+        else if (it->second->getDefault().compare(entry) == 0)
+        {
+            // The entry is available and the default string is the same, so return because everything is fine
+            return;
+        }
+        else
+        {
+            // The defined default entry is not the same as in the default language file - change it to the new entry
+            it->second->setDefault(entry);
+        }
+
+        // Write the default language file because either a new entry was created or an existing entry has changed
+        this->writeDefaultLanguageFile();
+
+    }
+
+    /**
+        @brief Returns the translation of a given entry.
+        @param name The name of the entry
+        @return The translation
+    */
+    const std::string& Language::getTranslation(const LanguageEntryName& name) const
+    {
+        std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(name);
+        if (it != this->languageEntries_.end())
+            return it->second->getTranslation();
+        else
+        {
+            // Uh, oh, an undefined entry was requested: return the default string
+            COUT(2) << "Error: Language entry \"" << name << "\" not found!" << std::endl;
+            return this->defaultTranslation_;
+        }
+    }
+
+    /**
+        @brief Creates the name of the language file out of the languages name.
+        @param language The name of the language
+        @return The filename
+    */
+    const std::string Language::getFileName(const std::string& language)
+    {
+        return std::string("translation_" + language + ".lang");
+    }
+
+    /**
+        @brief Reads the default language file and creates a LanguageEntry objects for every entry.
+    */
+    void Language::readDefaultLanguageFile()
+    {
+        COUT(4) << "Read default language file." << std::endl;
+
+        // This creates the file if it's not existing
+        std::ofstream createFile;
+        createFile.open(getFileName(this->defaultLanguage_).c_str(), std::fstream::app);
+        createFile.close();
+
+        // Open the file
+        std::ifstream file;
+        file.open(getFileName(this->defaultLanguage_).c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open file " << getFileName(this->defaultLanguage_) << " to read the default language entries!" << std::endl;
+            return;
+        }
+
+        char line[1024];
+
+        // Iterate through the file and create the LanguageEntries
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            std::string lineString = std::string(line);
+
+            // Check if the line is empty
+            if (lineString.compare("") != 0)
+            {
+                unsigned int pos = lineString.find('=');
+
+                // Check if the length is at least 3 and if there's an entry before and behind the =
+                if (pos > 0 && pos < (lineString.size() - 1) && lineString.size() >= 3)
+                    this->createEntry(lineString.substr(0, pos), lineString.substr(pos + 1));
+                else
+                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFileName(this->defaultLanguage_) << std::endl;
+            }
+        }
+
+        file.close();
+    }
+
+    /**
+        @brief Reads the language file of the configured language and assigns the translations to the corresponding LanguageEntry object.
+    */
+    void Language::readTranslatedLanguageFile()
+    {
+        COUT(4) << "Read translated language file (" << this->language_ << ")." << std::endl;
+
+        // Open the file
+        std::ifstream file;
+        file.open(getFileName(this->language_).c_str(), std::fstream::in);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open file " << getFileName(this->language_) << " to read the translated language entries!" << std::endl;
+            ResetConfigValue(language_);
+            COUT(3) << "Info: Reset language to " << this->defaultLanguage_ << "." << std::endl;
+            return;
+        }
+
+        char line[1024];
+
+        // Iterate through the file and create the LanguageEntries
+        while (file.good() && !file.eof())
+        {
+            file.getline(line, 1024);
+            std::string lineString = std::string(line);
+
+            // Check if the line is empty
+            if (lineString.compare("") != 0)
+            {
+                unsigned int pos = lineString.find('=');
+
+                // Check if the length is at least 3 and if there's an entry before and behind the =
+                if (pos > 0 && pos < (lineString.size() - 1) && lineString.size() >= 3)
+                {
+                    std::map<std::string, LanguageEntry*>::const_iterator it = this->languageEntries_.find(lineString.substr(0, pos));
+
+                    // Check if the entry exists
+                    if (it != this->languageEntries_.end())
+                        it->second->setTranslation(lineString.substr(pos + 1));
+                    else
+                        this->createEntry(lineString.substr(0, pos), this->defaultTranslation_)->setTranslation(lineString.substr(pos + 1));
+                }
+                else
+                    COUT(2) << "Warning: Invalid language entry \"" << lineString << "\" in " << getFileName(this->language_) << std::endl;
+            }
+        }
+
+        file.close();
+    }
+
+    /**
+        @brief Writes all default entries to the default language file.
+    */
+    void Language::writeDefaultLanguageFile() const
+    {
+        COUT(4) << "Write default language file." << std::endl;
+
+        // Open the file
+        std::ofstream file;
+        file.open(getFileName(this->defaultLanguage_).c_str(), std::fstream::out);
+
+        if (!file.is_open())
+        {
+            COUT(1) << "Error: Couldn't open file " << getFileName(this->defaultLanguage_) << " to write the default language entries!" << std::endl;
+            return;
+        }
+
+        // Iterate through the list an write the lines into the file
+        for (Iterator<LanguageEntry> it = ObjectList<LanguageEntry>::start(); it; ++it)
+        {
+            file << it->getName() << "=" << it->getDefault() << std::endl;
+        }
+
+        file.close();
+    }
+}
Index: /code/branches/network/src/orxonox/core/Language.h
===================================================================
--- /code/branches/network/src/orxonox/core/Language.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/Language.h	(revision 861)
@@ -0,0 +1,119 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Language.h
+    @brief Definition of the Language and the LanguageEntry class.
+
+    The Language class is used, to get a translation of a string in the configured language.
+    The string is identified by another string, the name of the entry.
+    If the translation in the configured language isn't available, the default entry, defined in the code, is used.
+
+    Usage:
+     - Set the entry with the default string:
+       Language::getLanguage()->addEntry("name of the entry", "the string to translate");
+
+     - Get the translation of the entry in the configured language:
+       std::cout << Language::getLanguage()->getTranslation("name of the entry") << std::endl;
+*/
+
+#ifndef _Language_H__
+#define _Language_H__
+
+#include <map>
+#include <string>
+
+#include "CorePrereqs.h"
+#include "OrxonoxClass.h"
+
+namespace orxonox
+{
+    typedef std::string LanguageEntryName;
+
+    //! The LanguageEntry class stores the default- and the translated string of a given entry in the language file.
+    class _CoreExport LanguageEntry : public OrxonoxClass
+    {
+        public:
+            explicit LanguageEntry(const std::string& fallbackEntry);
+            void setTranslation(const std::string& translation);
+            void setDefault(const std::string& fallbackEntry);
+
+            /**
+              @brief Returns the translated entry in the configured language.
+              @return The translated entry
+            */
+            inline const std::string& getTranslation()
+                { return this->translatedEntry_; }
+
+            /**
+              @brief Returns the default entry.
+              @return The default entry
+            */
+            inline const std::string& getDefault()
+                { return this->fallbackEntry_; }
+
+        private:
+            std::string fallbackEntry_;                             //!< The default entry: Used, if no translation is available or no language configured
+            std::string translatedEntry_;                           //!< The translated entry in the configured language
+            bool bTranslationSet_;                                  //!< True if the translation was set
+    };
+    template class _CoreExport orxonox::ClassIdentifier<LanguageEntry>;
+    template class _CoreExport orxonox::ObjectList<LanguageEntry>;
+
+    //! The Language class manges the language files and entries and stores the LanguageEntry objects in a map.
+    class _CoreExport Language : public OrxonoxClass
+    {
+        template <class T>
+        friend class ClassIdentifier; // forward declaration because of the private destructor
+
+        public:
+            static Language& getLanguage();
+            void setConfigValues();
+            void addEntry(const LanguageEntryName& name, const std::string& entry);
+            const std::string& getTranslation(const LanguageEntryName& name) const;
+
+        private:
+            Language();
+            Language(const Language& language) {}   // don't copy
+            virtual ~Language() {};                 // don't delete
+
+            void readDefaultLanguageFile();
+            void readTranslatedLanguageFile();
+            void writeDefaultLanguageFile() const;
+            static const std::string getFileName(const std::string& language);
+            LanguageEntry* createEntry(const LanguageEntryName& name, const std::string& entry);
+
+            std::string language_;                                  //!< The configured language
+            std::string defaultLanguage_;                           //!< The default language
+            std::string defaultTranslation_;                        //!< The returned string, if an entry unavailable entry is requested
+            std::map<std::string, LanguageEntry*> languageEntries_; //!< A map to store all LanguageEntry objects and their name
+    };
+    template class _CoreExport orxonox::ClassIdentifier<Language>;
+    template class _CoreExport orxonox::ObjectList<Language>;
+}
+
+#endif /* _Language_H__ */
Index: /code/branches/network/src/orxonox/core/MetaObjectList.cc
===================================================================
--- /code/branches/network/src/orxonox/core/MetaObjectList.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/MetaObjectList.cc	(revision 861)
@@ -0,0 +1,58 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file MetaObjectList.cc
+    @brief Implementation of the MetaObjectList class.
+*/
+
+#include "MetaObjectList.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Sets first_ to zero.
+    */
+    MetaObjectList::MetaObjectList()
+    {
+        this->first_ = 0;
+    }
+
+    /**
+        @brief Destructor: Removes all elements from the list, causing them to remove the stored ObjectListElement from the ObjectList.
+    */
+    MetaObjectList::~MetaObjectList()
+    {
+        BaseMetaObjectListElement* temp;
+        while (this->first_)
+        {
+            temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+        }
+    }
+}
Index: /code/branches/network/src/orxonox/core/MetaObjectList.h
===================================================================
--- /code/branches/network/src/orxonox/core/MetaObjectList.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/MetaObjectList.h	(revision 861)
@@ -0,0 +1,140 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file MetaObjectList.h
+    @brief Definition of the MetaObjectList class.
+
+    The MetaObjectList is a single-linked list, containing all list-elements and their
+    lists wherein the object, owning the MetaObjectList, is registered.
+    This allows much faster deletion of objects because no iteration is needed.
+*/
+
+#ifndef _MetaObjectList_H__
+#define _MetaObjectList_H__
+
+#include "CorePrereqs.h"
+
+#include "ObjectList.h"
+#include "Identifier.h"
+#include "Debug.h"
+
+namespace orxonox
+{
+    //! Base-class of MetaObjectListElement, because those is a template
+    class BaseMetaObjectListElement
+    {
+        public:
+            /** @brief Default destructor */
+            virtual ~BaseMetaObjectListElement() {};
+
+            BaseMetaObjectListElement* next_;       //!< The next Element in the list
+    };
+
+    // ###############################
+    // ###  MetaObjectListElement  ###
+    // ###############################
+    //! The list-element of the MetaObjectList
+    template <class T>
+    class MetaObjectListElement : public BaseMetaObjectListElement
+    {
+        public:
+            MetaObjectListElement(ObjectList<T>* list, ObjectListElement<T>* element);
+            virtual ~MetaObjectListElement();
+
+            ObjectListElement<T>* element_;         //!< The list element, containing the object
+            ObjectList<T>* list_;                   //!< The list, containing the element
+    };
+
+    /**
+        @brief Constructor: Creates the list-element with given list and element.
+    */
+    template <class T>
+    MetaObjectListElement<T>::MetaObjectListElement(ObjectList<T>* list, ObjectListElement<T>* element)
+    {
+        this->element_ = element;
+        this->list_ = list;
+        this->next_ = 0;
+    }
+
+    /**
+        @brief Destructor: Removes the ObjectListElement from the ObjectList by linking next_ and prev_ of the ObjectListElement.
+    */
+    template <class T>
+    MetaObjectListElement<T>::~MetaObjectListElement()
+    {
+        if (this->element_->next_)
+            this->element_->next_->prev_ = this->element_->prev_;
+        else
+            this->list_->last_ = this->element_->prev_; // If there is no next_, we deleted the last object and have to update the last_ pointer of the list
+
+        if (this->element_->prev_)
+            this->element_->prev_->next_ = this->element_->next_;
+        else
+            this->list_->first_ = this->element_->next_; // If there is no prev_, we deleted the first object and have to update the first_ pointer of the list
+
+
+        COUT(4) << "*** Removing Object from " << ClassIdentifier<T>::getIdentifier()->getName() << "-list." << std::endl;
+        delete this->element_;
+    }
+
+
+    // ###############################
+    // ###       ObjectList        ###
+    // ###############################
+    //!  The MetaObjectList contains ObjectListElements and their ObjectLists.
+    /**
+        The MetaObjectList is a single-linked list, containing all list-elements and their
+        lists wherein the object that owns the MetaObjectList is registered.
+        This allows much faster deletion of objects because no iteration is needed.
+    */
+    class MetaObjectList
+    {
+        public:
+            MetaObjectList();
+            ~MetaObjectList();
+            template <class T>
+            void add(ObjectList<T>* list, ObjectListElement<T>* element);
+
+            BaseMetaObjectListElement* first_;      //!< The first element in the list
+    };
+
+    /**
+        @brief Adds an ObjectList and an element of that list to the MetaObjectList.
+        @param list The ObjectList wherein the element is
+        @param element The element wherein the object is
+    */
+    template <class T>
+    void MetaObjectList::add(ObjectList<T>* list, ObjectListElement<T>* element)
+    {
+        BaseMetaObjectListElement* temp = this->first_;
+        this->first_ = new MetaObjectListElement<T>(list, element);
+        this->first_->next_ = temp;
+    }
+}
+
+#endif /* _MetaObjectList_H__ */
Index: /code/branches/network/src/orxonox/core/ObjectList.h
===================================================================
--- /code/branches/network/src/orxonox/core/ObjectList.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/ObjectList.h	(revision 861)
@@ -0,0 +1,272 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file ObjectList.h
+    @brief Definition and implementation of the ObjectList class.
+
+    The ObjectList is a double-linked list, used by Identifiers to store all objects of a given class.
+    Newly created objects are added through the RegisterObject-macro in its constructor.
+    Use Iterator<class> to iterate through all objects of the class.
+*/
+
+#ifndef _ObjectList_H__
+#define _ObjectList_H__
+
+#include "CorePrereqs.h"
+#include "Iterator.h"
+
+namespace orxonox
+{
+    // ###############################
+    // ###    ObjectListElement    ###
+    // ###############################
+    //! The list-element of the ObjectList
+    template <class T>
+    class ObjectListElement
+    {
+        public:
+            ObjectListElement(T* object);
+
+            T* object_;                     //!< The object
+            ObjectListElement* next_;       //!< The next element in the list
+            ObjectListElement* prev_;       //!< The previous element in the list
+    };
+
+    /**
+        @brief Constructor: Creates the list-element with an object.
+        @param object The object to store
+    */
+    template <class T>
+    ObjectListElement<T>::ObjectListElement(T* object)
+    {
+        this->object_ = object;
+        this->next_ = 0;
+        this->prev_ = 0;
+    }
+
+
+    // ###############################
+    // ###       ObjectList        ###
+    // ###############################
+    //! The ObjectList contains all objects of a given class.
+    /**
+        The ObjectList is used by Identifiers to store all objects of a given class.
+        Use Iterator<class> to iterate through all objects in the list.
+    */
+    template <class T>
+    class ObjectList
+    {
+        public:
+            static ObjectList<T>* getList();
+
+            ObjectListElement<T>* add(T* object);
+//            void remove(OrxonoxClass* object, bool bIterateForwards = true);
+
+            /** @returns the first element in the list */
+            inline static Iterator<T> start()
+                { return Iterator<T>(getList()->first_); }
+
+            /** @returns the first element in the list */
+            inline static Iterator<T> begin()
+                { return Iterator<T>(getList()->first_); }
+
+            /** @returns the last element in the list */
+            inline static Iterator<T> end()
+                { return Iterator<T>(getList()->last_); }
+
+            ObjectListElement<T>* first_;       //!< The first element in the list
+            ObjectListElement<T>* last_;        //!< The last element in the list
+
+        private:
+            ObjectList();
+            ~ObjectList();
+    };
+
+    /**
+        @brief Constructor: Sets default values.
+    */
+    template <class T>
+    ObjectList<T>::ObjectList()
+    {
+        this->first_ = 0;
+        this->last_ = 0;
+    }
+
+    /**
+        @brief Destructor: Deletes all list-elements, but NOT THE OBJECTS.
+    */
+    template <class T>
+    ObjectList<T>::~ObjectList()
+    {
+        ObjectListElement<T>* temp;
+        while (this->first_)
+        {
+            temp = this->first_->next_;
+            delete this->first_;
+            this->first_ = temp;
+        }
+    }
+
+    /**
+        @returns a pointer to the only existing instance for the given class T.
+    */
+    template <class T>
+    ObjectList<T>* ObjectList<T>::getList()
+    {
+        static ObjectList<T> theOnlyObjectListObjectForClassT = ObjectList<T>();
+        return &theOnlyObjectListObjectForClassT;
+    }
+
+    /**
+        @brief Adds a new object to the end of the list.
+        @param object The object to add
+        @return The pointer to the new ObjectListElement, needed by the MetaObjectList of the added object
+    */
+    template <class T>
+    ObjectListElement<T>* ObjectList<T>::add(T* object)
+    {
+        if (!this->last_)
+        {
+            // If the list is empty
+            this->last_ = new ObjectListElement<T>(object);
+            this->first_ = this->last_; // There's only one object in the list now
+        }
+        else
+        {
+            // If the list isn't empty
+            ObjectListElement<T>* temp = this->last_;
+            this->last_ = new ObjectListElement<T>(object);
+            this->last_->prev_ = temp;
+            temp->next_ = this->last_;
+        }
+
+        return this->last_;
+    }
+
+
+//    /**
+//        @brief Removes an object from the list.
+//        @param object The object to remove
+//        @param bIterateForwards If true: Start searching the object at the beginning of the list
+//    */
+    /*
+    template <class T>
+    void ObjectList<T>::remove(OrxonoxClass* object, bool bIterateForwards)
+    {
+        if (!object || !this->first_ || !this->last_)
+            return;
+
+        // If there's only one object in the list, we have to set first_ and last_ to zero
+        if (this->first_ == this->last_)
+        {
+            if (this->first_->object_ == object)
+            {
+                delete this->first_;
+                this->first_ = 0;
+                this->last_ = 0;
+            }
+
+            return;
+        }
+
+        // Now we are sure we have more than one element in the list
+        if (bIterateForwards)
+        {
+            // Start at the beginning of the list
+
+            // Check if it's the first object
+            if (this->first_->object_ == object)
+            {
+                ObjectListElement<T>* temp = this->first_->next_;
+                delete this->first_;
+                this->first_ = temp;
+                this->first_->prev_ = 0;
+
+                return;
+            }
+
+            // Iterate through the whole list
+            ObjectListElement<T>* temp = this->first_;
+            while (temp->next_)
+            {
+                if (temp->next_->object_ == object)
+                {
+                    ObjectListElement<T>* temp2 = temp->next_->next_;
+                    delete temp->next_;
+                    temp->next_ = temp2;
+                    if (temp2)
+                        temp2->prev_ = temp;
+                    else
+                        this->last_ = temp; // If there is no next_, we deleted the last element and have to update the last_ pointer.
+
+                    return;
+                }
+
+                temp = temp->next_;
+            }
+        }
+        else
+        {
+            // Start at the end of the list
+
+            // Check if it's the last object
+            if (this->last_->object_ == object)
+            {
+                ObjectListElement<T>* temp = this->last_->prev_;
+                delete this->last_;
+                this->last_ = temp;
+                this->last_->next_ = 0;
+
+                return;
+            }
+
+            // Iterate through the whole list
+            ObjectListElement<T>* temp = this->last_;
+            while (temp->prev_)
+            {
+                if (temp->prev_->object_ == object)
+                {
+                    ObjectListElement<T>* temp2 = temp->prev_->prev_;
+                    delete temp->prev_;
+                    temp->prev_ = temp2;
+                    if (temp2)
+                        temp2->next_ = temp;
+                    else
+                        this->first_ = temp; // If there is no prev_, we deleted the first element and have to update the first_ pointer.
+
+                    return;
+                }
+
+                temp = temp->prev_;
+            }
+        }
+    }
+    */
+}
+
+#endif /* _ObjectList_H__ */
Index: /code/branches/network/src/orxonox/core/OrxonoxClass.cc
===================================================================
--- /code/branches/network/src/orxonox/core/OrxonoxClass.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/OrxonoxClass.cc	(revision 861)
@@ -0,0 +1,56 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file OrxonoxClass.cc
+    @brief Implementation of the OrxonoxClass Class.
+*/
+
+#include "OrxonoxClass.h"
+
+namespace orxonox
+{
+    /** @brief Constructor: Sets the default values. */
+    OrxonoxClass::OrxonoxClass()
+    {
+        this->setConfigValues();
+
+        this->identifier_ = 0;
+        this->parents_ = 0;
+
+        this->bActive_ = true;
+        this->bVisible_ = true;
+    }
+
+    /** @brief Destructor: Deletes, if existing, the list of the parents. */
+    OrxonoxClass::~OrxonoxClass()
+    {
+        // parents_ exists only if isCreatingHierarchy() of the associated Identifier returned true while creating the class
+        if (this->parents_)
+            delete this->parents_;
+    }
+}
Index: /code/branches/network/src/orxonox/core/OrxonoxClass.h
===================================================================
--- /code/branches/network/src/orxonox/core/OrxonoxClass.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/OrxonoxClass.h	(revision 861)
@@ -0,0 +1,164 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file OrxonoxClass.h
+    @brief Definition of the OrxonoxClass Class.
+
+    All objects and interfaces of the game-logic (not the engine) are derived from OrxonoxClass.
+    It stores the Identifier and the MetaObjectList and has all needed functions to create and use the class-hierarchy.
+*/
+
+#ifndef _OrxonoxClass_H__
+#define _OrxonoxClass_H__
+
+#include <string>
+
+#include "CorePrereqs.h"
+#include "MetaObjectList.h"
+#include "Iterator.h"
+
+namespace orxonox
+{
+    //! The class all objects and interfaces of the game-logic (not the engine) are derived from.
+    /**
+        The BaseObject and Interaces are derived with 'virtual public OrxonoxClass' from OrxonoxClass.
+        OrxonoxClass is needed to create the class-hierarchy at startup and to store the Identifier and the MetaObjectList.
+    */
+    class _CoreExport OrxonoxClass
+    {
+        public:
+            OrxonoxClass();
+            virtual ~OrxonoxClass();
+
+            /** @brief Function to collect the SetConfigValue-macro calls. */
+            void setConfigValues() {};
+
+            /** @returns the Identifier of the object */
+            inline Identifier* getIdentifier() const { return this->identifier_; }
+
+            /** @brief Sets the Identifier of the object. Used by the RegisterObject-macro. */
+            inline void setIdentifier(Identifier* identifier) { this->identifier_ = identifier; }
+
+            /** @returns the list of all parents of the object */
+            inline IdentifierList* getParents() const { return this->parents_; }
+
+            /** @brief Sets the Parents of the object. Used by the RegisterObject-macro. */
+            inline void setParents(IdentifierList* parents) { this->parents_ = parents; }
+
+            /** @returns the MetaObjectList of the object, containing a link to all ObjectLists and ObjectListElements the object is registered in. */
+            inline MetaObjectList& getMetaList() { return this->metaList_; }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const Identifier* identifier)
+                { return this->getIdentifier()->isA(identifier); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const Identifier* identifier)
+                { return this->getIdentifier()->isDirectlyA(identifier); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const Identifier* identifier)
+                { return this->getIdentifier()->isChildOf(identifier); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const Identifier* identifier)
+                { return this->getIdentifier()->isParentOf(identifier); }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isA(identifier->getIdentifier()); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isDirectlyA(identifier->getIdentifier()); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isChildOf(identifier->getIdentifier()); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const SubclassIdentifier<class B>* identifier)
+                { return this->getIdentifier()->isParentOf(identifier->getIdentifier()); }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isA(identifier.getIdentifier()); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isDirectlyA(identifier.getIdentifier()); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isChildOf(identifier.getIdentifier()); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const SubclassIdentifier<class B> identifier)
+                { return this->getIdentifier()->isParentOf(identifier.getIdentifier()); }
+
+
+            /** @returns true if the objects class is of the given type or a derivative. */
+            inline bool isA(const OrxonoxClass* object)
+                { return this->getIdentifier()->isA(object->getIdentifier()); }
+            /** @returns true if the objects class is exactly of the given type. */
+            inline bool isDirectlyA(const OrxonoxClass* object)
+                { return this->getIdentifier()->isDirectlyA(object->getIdentifier()); }
+            /** @returns true if the objects class is a child of the given type. */
+            inline bool isChildOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isChildOf(object->getIdentifier()); }
+            /** @returns true if the objects class is a parent of the given type. */
+            inline bool isParentOf(const OrxonoxClass* object)
+                { return this->getIdentifier()->isParentOf(object->getIdentifier()); }
+
+
+            /** @brief Sets the name of the object. @param name The name */
+            inline virtual void setName(const std::string& name) { this->name_ = name; }
+
+            /** @returns the name of the object. */
+            inline const std::string& getName() const { return this->name_; }
+
+            /** @brief Sets the state of the objects activity. @param bActive True = active */
+            inline virtual void setActive(bool bActive) { this->bActive_ = bActive; }
+
+            /** @returns the state of the objects activity. */
+            inline const bool isActive() const { return this->bActive_; }
+
+            /** @brief Sets the state of the objects visibility. @param bVisible True = visible */
+            inline virtual void setVisible(bool bVisible) { this->bVisible_ = bVisible; }
+
+            /** @returns the state of the objects visibility. */
+            inline const bool isVisible() const { return this->bVisible_; }
+
+        private:
+            Identifier* identifier_;        //!< The Identifier of the object
+            IdentifierList* parents_;       //!< List of all parents of the object
+            MetaObjectList metaList_;       //!< MetaObjectList, containing all ObjectLists and ObjectListElements the object is registered in
+
+            std::string name_;              //!< The name of the object
+            bool bActive_;                  //!< True = the object is active
+            bool bVisible_;                 //!< True = the object is visible
+    };
+    template class _CoreExport orxonox::ClassIdentifier<OrxonoxClass>;
+    template class _CoreExport orxonox::ObjectList<OrxonoxClass>;
+}
+
+#endif /* _OrxonoxClass_H__ */
Index: /code/branches/network/src/orxonox/core/OutputHandler.cc
===================================================================
--- /code/branches/network/src/orxonox/core/OutputHandler.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/OutputHandler.cc	(revision 861)
@@ -0,0 +1,148 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "DebugLevel.h"
+#include "OutputHandler.h"
+
+namespace orxonox
+{
+    /**
+        @brief Constructor: Opens the logfile and writes the first line.
+        @param logfilename The name of the logfile
+    */
+    OutputHandler::OutputHandler(const std::string& logfilename)
+    {
+        this->logfilename_ = logfilename;
+        this->logfile_.open(this->logfilename_.c_str(), std::fstream::out);
+        this->logfile_ << "Started log" << std::endl;
+        this->logfile_.flush();
+    }
+
+    /**
+        @brief Destructor: Writes the last line to the logfile and closes it.
+    */
+    OutputHandler::~OutputHandler()
+    {
+        this->logfile_ << "Closed log" << std::endl;
+        this->logfile_.close();
+    }
+
+    /**
+        @returns a reference to the only existing instance of the OutputHandler class.
+    */
+    OutputHandler& OutputHandler::getOutStream()
+    {
+        static OutputHandler orxout("orxonox.log");
+        return orxout;
+    }
+
+    /**
+        @brief Returns the soft debug level for a given output device.
+        @param device The output device
+        @return The debug level
+    */
+    int OutputHandler::getSoftDebugLevel(OutputHandler::OutputDevice device)
+    {
+        return DebugLevel::getSoftDebugLevel(device);
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param sb The streambuffer that should be shown in the console
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::streambuf* sb)
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            std::cout << sb;
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            this->logfile_ << sb;
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param manipulator A function, manipulating the outstream.
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::ostream& (*manipulator)(std::ostream&))
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            manipulator(std::cout);
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            manipulator(this->logfile_);
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param manipulator A function, manipulating the outstream.
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::ios& (*manipulator)(std::ios&))
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            manipulator(std::cout);
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            manipulator(this->logfile_);
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloaded << operator, redirects the output to the console and the logfile.
+        @param manipulator A function, manipulating the outstream.
+        @return A reference to the OutputHandler itself
+    */
+    OutputHandler& OutputHandler::operator<<(std::ios_base& (*manipulator)(std::ios_base&))
+    {
+        if (getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            manipulator(std::cout);
+
+        if (getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            manipulator(this->logfile_);
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+}
Index: /code/branches/network/src/orxonox/core/OutputHandler.h
===================================================================
--- /code/branches/network/src/orxonox/core/OutputHandler.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/OutputHandler.h	(revision 861)
@@ -0,0 +1,161 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file OutputHandler.h
+    @brief Definition of the OutputHandler class.
+
+    The OutputHandler acts like std::cout, but output isn't only shown in the console,
+    but also written to the logfile.
+*/
+
+#ifndef _OutputHandler_H__
+#define _OutputHandler_H__
+
+#include <iostream>
+#include <fstream>
+#include <string>
+
+#include "CorePrereqs.h"
+
+namespace orxonox
+{
+    //! The OutputHandler acts like std::cout, but redirects output to the console AND the logfile.
+    class _CoreExport OutputHandler
+    {
+        public:
+            enum OutputDevice
+            {
+                LD_All,
+                LD_Console,
+                LD_Logfile,
+                LD_Shell
+            };
+
+            static OutputHandler& getOutStream();
+
+            /** @returns a reference to the logfile. */
+            inline std::ofstream& getLogfile()
+                { return this->logfile_; }
+
+            /** @brief Sets the level of the incoming output. @param level The level of the incoming output @return The OutputHandler itself */
+            inline OutputHandler& setOutputLevel(int level)
+                { this->outputLevel_ = level; return *this; }
+
+            /** @returns the level of the incoming output. */
+            inline int getOutputLevel() const
+                { return this->outputLevel_; }
+
+            static int getSoftDebugLevel(OutputHandler::OutputDevice device);
+
+            template <class T>
+            OutputHandler& output(const T& output);
+
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned char val)   { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(short val)           { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned short val)  { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(int val)             { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned int val)    { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(long val)            { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(unsigned long val)   { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(float val)           { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(double val)          { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(long double val)     { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(const void* val)     { return this->output(val); }
+            /** @brief Overloaded << operator, redirects the output to the console and the logfile. @param val The value that should be shown in the console @return A reference to the OutputHandler itself */
+            inline OutputHandler& operator<<(bool val)            { return this->output(val); }
+
+            OutputHandler& operator<<(std::streambuf* sb);
+
+            OutputHandler& operator<<(std::ostream& (*manipulator)(std::ostream&));
+            OutputHandler& operator<<(std::ios& (*manipulator)(std::ios&));
+            OutputHandler& operator<<(std::ios_base& (*manipulator)(std::ios_base&));
+
+        private:
+            explicit OutputHandler(const std::string& logfilename);
+            OutputHandler(const OutputHandler& oh) {}; // don't copy
+            virtual ~OutputHandler();
+            std::ofstream logfile_;     //!< The logfile where the output is logged
+            std::string logfilename_;   //!< The name of the logfile
+            int outputLevel_;           //!< The level of the incoming output
+    };
+
+    /**
+        @brief Redirects the output to the console and the logfile.
+        @param output The value that should be shown in the console
+        @return A reference to the OutputHandler itself
+    */
+    template<class T>
+    OutputHandler& OutputHandler::output(const T& output)
+    {
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= this->outputLevel_)
+            std::cout << output;
+
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Logfile) >= this->outputLevel_)
+        {
+            this->logfile_ << output;
+            this->logfile_.flush();
+        }
+
+        return *this;
+    }
+
+    /**
+        @brief Overloading of the non-member << operator to redirect the output of classes with self defined '<< to std::ostream' operators to the console and the logfile.
+        @param out The OutputHandler itself
+        @param output The class that should be shown in the console
+        @return The OutputHandler itself
+    */
+    template<class T>
+    OutputHandler& operator<<(OutputHandler& out, const T& output)
+    {
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Console) >= out.getOutputLevel())
+            std::cout << output;
+
+        if (OutputHandler::getSoftDebugLevel(OutputHandler::LD_Logfile) >= out.getOutputLevel())
+        {
+            out.getLogfile() << output;
+            out.getLogfile().flush();
+        }
+
+        return out;
+    }
+
+}
+
+#endif /* _OutputHandler_H__ */
Index: /code/branches/network/src/orxonox/core/SignalHandler.cc
===================================================================
--- /code/branches/network/src/orxonox/core/SignalHandler.cc	(revision 861)
+++ /code/branches/network/src/orxonox/core/SignalHandler.cc	(revision 861)
@@ -0,0 +1,310 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christoph Renner
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include <assert.h>
+
+#include "Debug.h"
+#include "SignalHandler.h"
+
+SignalHandler * SignalHandler::singletonRef = NULL;
+
+#ifndef __WIN32__
+
+#include <wait.h>
+
+SignalHandler::SignalHandler()
+{
+}
+
+/**
+ * register signal handlers for SIGSEGV and SIGABRT
+ * @param appName path to executable eg argv[0]
+ * @param fileName filename to append backtrace to
+ */
+void SignalHandler::doCatch( const std::string & appName, const std::string & fileName )
+{
+  this->appName = appName;
+  this->fileName = fileName;
+
+  // make sure doCatch is only called once without calling dontCatch
+  assert( sigRecList.size() == 0 );
+
+  catchSignal( SIGSEGV );
+  catchSignal( SIGABRT );
+  catchSignal( SIGILL );
+}
+
+/**
+ * restore previous signal handlers
+ */
+void SignalHandler::dontCatch()
+{
+  for ( SignalRecList::iterator it = sigRecList.begin(); it != sigRecList.end(); it++ )
+  {
+    signal( it->signal, it->handler );
+  }
+
+  sigRecList.clear();
+}
+
+/**
+ * catch signal sig
+ * @param sig signal to catch
+ */
+void SignalHandler::catchSignal( int sig )
+{
+  sig_t handler = signal( sig, SignalHandler::sigHandler );
+
+  assert( handler != SIG_ERR );
+
+  SignalRec rec;
+  rec.signal = sig;
+  rec.handler = handler;
+
+  sigRecList.push_front( rec );
+}
+
+/**
+ * sigHandler is called when receiving signals
+ * @param sig
+ */
+void SignalHandler::sigHandler( int sig )
+{
+  for ( SignalCallbackList::iterator it = SignalHandler::getInstance()->callbackList.begin(); it != SignalHandler::getInstance()->callbackList.end(); it++  )
+  {
+    (*(it->cb))( it->someData );
+  }
+
+  std::string sigName = "UNKNOWN";
+
+  switch ( sig )
+  {
+    case SIGSEGV:
+      sigName = "SIGSEGV";
+      break;
+    case SIGABRT:
+      sigName = "SIGABRT";
+      break;
+    case SIGILL:
+      sigName = "SIGILL";
+      break;
+  }
+
+  PRINTF(0)( "recieved signal %s\ntry to write backtrace to file orxonox.log\n", sigName.c_str() );
+
+  int sigPipe[2];
+  if ( pipe(sigPipe) == -1 )
+  {
+    perror("pipe failed!\n");
+    exit(EXIT_FAILURE);
+  }
+
+  int sigPid = fork();
+
+  if ( sigPid == -1 )
+  {
+    perror("fork failed!\n");
+    exit(EXIT_FAILURE);
+  }
+
+  // gdb will be attached to this process
+  if ( sigPid == 0 )
+  {
+    getInstance()->dontCatch();
+    // wait for message from parent when it has attached gdb
+    int someData;
+
+    read( sigPipe[0], &someData, sizeof(someData) );
+
+    if ( someData != 0x12345678 )
+    {
+      PRINTF(0)("something went wrong :(\n");
+    }
+
+    return;
+  }
+
+  int gdbIn[2];
+  int gdbOut[2];
+  int gdbErr[2];
+
+  if ( pipe(gdbIn) == -1 || pipe(gdbOut) == -1 || pipe(gdbErr) == -1 )
+  {
+    perror("pipe failed!\n");
+    kill( sigPid, SIGTERM );
+    waitpid( sigPid, NULL, 0 );
+    exit(EXIT_FAILURE);
+  }
+
+  int gdbPid = fork();
+  // this process will run gdb
+
+  if ( gdbPid == -1 )
+  {
+    perror("fork failed\n");
+    kill( sigPid, SIGTERM );
+    waitpid( sigPid, NULL, 0 );
+    exit(EXIT_FAILURE);
+  }
+
+  if ( gdbPid == 0 )
+  {
+    // start gdb
+
+    close(gdbIn[1]);
+    close(gdbOut[0]);
+    close(gdbErr[0]);
+
+    dup2( gdbIn[0], STDIN_FILENO );
+    dup2( gdbOut[1], STDOUT_FILENO );
+    dup2( gdbErr[1], STDERR_FILENO );
+
+    execlp( "sh", "sh", "-c", "gdb", (void*)NULL);
+  }
+
+  char cmd[256];
+  snprintf( cmd, 256, "file %s\nattach %d\nc\n", getInstance()->appName.c_str(), sigPid );
+  write( gdbIn[1], cmd, strlen(cmd) );
+
+  int charsFound = 0;
+  int promptFound = 0;
+  char byte;
+  while ( read( gdbOut[0], &byte, 1 ) == 1 )
+  {
+    if (
+      charsFound == 0 && byte == '(' ||
+      charsFound == 1 && byte == 'g' ||
+      charsFound == 2 && byte == 'd' ||
+      charsFound == 3 && byte == 'b' ||
+      charsFound == 4 && byte == ')' ||
+      charsFound == 5 && byte == ' '
+        )
+          charsFound++;
+    else
+      charsFound = 0;
+
+    if ( charsFound == 6 )
+    {
+      promptFound++;
+      charsFound = 0;
+    }
+
+    if ( promptFound == 3 )
+    {
+      break;
+    }
+  }
+
+  int someData = 0x12345678;
+  write( sigPipe[1], &someData, sizeof(someData) );
+
+  write( gdbIn[1], "bt\nk\nq\n", 7 );
+
+
+  charsFound = 0;
+  promptFound = 0;
+  std::string bt;
+  while ( read( gdbOut[0], &byte, 1 ) == 1 )
+  {
+    bt += std::string( &byte, 1 );
+
+    if (
+      charsFound == 0 && byte == '(' ||
+      charsFound == 1 && byte == 'g' ||
+      charsFound == 2 && byte == 'd' ||
+      charsFound == 3 && byte == 'b' ||
+      charsFound == 4 && byte == ')' ||
+      charsFound == 5 && byte == ' '
+        )
+          charsFound++;
+    else
+      charsFound = 0;
+
+    if ( charsFound == 6 )
+    {
+      promptFound++;
+      charsFound = 0;
+      bt += "\n";
+    }
+
+    if ( promptFound == 3 )
+    {
+      break;
+    }
+  }
+
+
+  waitpid( sigPid, NULL, 0 );
+  waitpid( gdbPid, NULL, 0 );
+
+  int wsRemoved = 0;
+
+  while ( wsRemoved < 2 && bt.length() > 0 )
+  {
+    if ( bt[1] == '\n' )
+      wsRemoved++;
+    bt.erase(0, 1);
+  }
+
+  if ( bt.length() > 0 )
+    bt.erase(0, 1);
+
+  time_t now = time(NULL);
+
+  std::string timeString = "\n\n\n\n"
+	                   "=======================================================\n"
+	                   "= time: " + std::string(ctime(&now)) +
+			   "=======================================================\n";
+  bt.insert(0, timeString);
+
+  FILE * f = fopen( getInstance()->fileName.c_str(), "a" );
+
+  if ( !f )
+  {
+    perror( ( std::string( "could not append to " ) + getInstance()->fileName ).c_str() );
+    exit(EXIT_FAILURE);
+  }
+
+  if ( fwrite( bt.c_str(), 1, bt.length(), f ) != bt.length() )
+  {
+    PRINTF(0)( ( std::string("could not write %d byte to ") + getInstance()->fileName ).c_str(), bt.length());
+    exit(EXIT_FAILURE);
+  }
+
+  exit(EXIT_FAILURE);
+}
+
+void SignalHandler::registerCallback( SignalCallback cb, void * someData )
+{
+  SignalCallbackRec rec;
+  rec.cb = cb;
+  rec.someData = someData;
+
+  callbackList.push_back(rec);
+}
+
+#endif /* __WIN32__ */
Index: /code/branches/network/src/orxonox/core/SignalHandler.h
===================================================================
--- /code/branches/network/src/orxonox/core/SignalHandler.h	(revision 861)
+++ /code/branches/network/src/orxonox/core/SignalHandler.h	(revision 861)
@@ -0,0 +1,103 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christoph Renner
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+ * @file SignalHandler.h
+ */
+
+#ifndef _SignalHandler_H__
+#define _SignalHandler_H__
+
+#include <list>
+#include <string>
+
+#include "CorePrereqs.h"
+
+typedef int (*SignalCallback)( void * someData );
+
+#ifndef __WIN32__
+#include <signal.h>
+
+struct SignalRec
+{
+  int signal;
+  sig_t handler;
+};
+
+struct SignalCallbackRec
+{
+  SignalCallback cb;
+  void * someData;
+};
+
+
+typedef std::list<SignalRec> SignalRecList;
+typedef std::list<SignalCallbackRec> SignalCallbackList;
+
+class SignalHandler
+{
+  private:
+    SignalHandler();
+  public:
+    inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; }
+    ~SignalHandler(){ SignalHandler::singletonRef = NULL; }
+
+    void registerCallback( SignalCallback cb, void * someData );
+
+    void doCatch( const std::string & appName, const std::string & fileName );
+    void dontCatch();
+
+  private:
+    static void sigHandler( int sig );
+
+    void catchSignal( int sig );
+    SignalRecList sigRecList;
+
+    SignalCallbackList callbackList;
+
+    static SignalHandler * singletonRef;
+
+    std::string appName;
+    std::string fileName;
+};
+
+#else /* #ifndef __WIN32__ */
+
+class _CoreExport SignalHandler
+{
+ public:
+   inline static SignalHandler* getInstance() { if (!SignalHandler::singletonRef) SignalHandler::singletonRef = new SignalHandler(); return SignalHandler::singletonRef; };
+   void doCatch( const std::string & appName, const std::string & fileName ) {};
+  void dontCatch() {};
+  void registerCallback( SignalCallback cb, void * someData ) {};
+
+ private:
+    static SignalHandler * singletonRef;
+};
+#endif /* #ifndef __WIN32__ */
+
+#endif /* _SignalHandler_H__ */
Index: /code/branches/network/src/orxonox/hud/HUD.cc
===================================================================
--- /code/branches/network/src/orxonox/hud/HUD.cc	(revision 861)
+++ /code/branches/network/src/orxonox/hud/HUD.cc	(revision 861)
@@ -0,0 +1,218 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Yuning Chai
+*   Co-authors:
+*      ...
+*
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreOverlayManager.h>
+#include <OgreOverlayElement.h>
+#include <OgreStringConverter.h>
+
+#include "HUD.h"
+
+
+namespace orxonox
+{
+  using namespace Ogre;
+
+  HUD::HUD(void)
+  {
+    init();
+
+    setTime(99,55);
+
+    setTargetWindowName("HURRA");
+    setTargetWindowDistance(12);
+    setTargetWindowStatus("Dead");
+    setTargetWindowDistance(30);
+
+    setEnergyValue(60.0);
+
+    setShieldLeftTopValue(true);
+    setShieldRightTopValue(false);
+    setShieldLeftBottomValue(false);
+    setShieldRightBottomValue(true);
+
+    setRocket1(11);
+    setRocket2(22);
+    setRocket3(33);
+    setRocket4(44);
+
+    setEnergyDistr(33,33,34);
+
+    setPrimar(3);
+
+    energyDistrPixelX_ = 100;
+    energyDistrPixelY_ = 86;
+
+  }
+
+
+  HUD::~HUD( void ){
+
+  }
+
+  void HUD::setTime(int i, int j){
+    timeMin_=i;
+    timeSec_=j;
+    timeText_->setCaption(StringConverter::toString(timeMin_) + ":" + StringConverter::toString(timeSec_));
+  }
+
+  void HUD::setTargetWindowName(std::string i){
+    targetWindowName_=i;
+    targetWindowNameText_->setCaption( targetWindowName_ );
+  }
+
+  void HUD::setTargetWindowStatus(std::string i){
+    targetWindowStatus_=i;
+    targetWindowStatusText_->setCaption( targetWindowStatus_ );
+  }
+
+  void HUD::setTargetWindowDistance(int i){
+    targetWindowDistance_=i;
+    targetWindowDistanceText_->setCaption(StringConverter::toString(targetWindowDistance_) + "km" );
+  }
+
+  void HUD::setTargetWindowHitRating(int i){
+    targetWindowHitRating_=i;
+    targetWindowHitRatingText_->setCaption(StringConverter::toString(targetWindowHitRating_) + "%" );
+  }
+
+  void HUD::setEnergyValue(int i){
+    energyValue_=i;
+    energyLength_->setWidth((int)((float)energyValue_/(float)100*200));
+  }
+
+  void HUD::setShieldLeftTopValue(bool i){
+    shieldLeftTopValue_=i;
+    if (shieldLeftTopValue_) shieldLeftTop_->show();
+    else shieldLeftTop_->hide();
+  }
+
+  void HUD::setShieldRightTopValue(bool i){
+    shieldRightTopValue_=i;
+    if (shieldRightTopValue_) shieldRightTop_->show();
+    else shieldRightTop_->hide();
+  }
+
+  void HUD::setShieldLeftBottomValue(bool i){
+    shieldLeftBottomValue_=i;
+    if (shieldLeftBottomValue_) shieldLeftBottom_->show();
+    else shieldLeftBottom_->hide();
+  }
+
+  void HUD::setShieldRightBottomValue(bool i){
+    shieldRightBottomValue_=i;
+    if (shieldRightBottomValue_) shieldRightBottom_->show();
+    else shieldRightBottom_->hide();
+  }
+
+  void HUD::setRocket1(int i){
+    rocket1_=i;
+    rocketNum1_->setCaption(StringConverter::toString(rocket1_));
+  }
+
+  void HUD::setRocket2(int i){
+    rocket2_=i;
+    rocketNum2_->setCaption(StringConverter::toString(rocket2_));
+  }
+
+  void HUD::setRocket3(int i){
+    rocket3_=i;
+    rocketNum3_->setCaption(StringConverter::toString(rocket3_));
+  }
+
+  void HUD::setRocket4(int i){
+    rocket4_=i;
+    rocketNum4_->setCaption(StringConverter::toString(rocket4_));
+  }
+
+  void HUD::setEnergyDistr(float s, float e, float l){
+    energyDistrShield_=s;
+    energyDistrEngine_=e;
+    energyDistrLaser_=l;
+
+    float energyDistrShieldInv_ = 100 - energyDistrShield_;
+    float energyDistrEngineInv_ = 100 - energyDistrEngine_;
+    float energyDistrLaserInv_ = 100 - energyDistrLaser_;
+
+    float energyDistrT_ = -energyDistrPixelX_/((energyDistrPixelX_-energyDistrPixelX_/2*energyDistrShieldInv_/(energyDistrShieldInv_+energyDistrEngineInv_))*energyDistrLaserInv_*(energyDistrShieldInv_+energyDistrEngineInv_)/energyDistrShieldInv_/(energyDistrLaserInv_+energyDistrEngineInv_)+energyDistrPixelX_/2+energyDistrPixelX_/2*energyDistrEngineInv_/(energyDistrEngineInv_+energyDistrLaserInv_));
+    float energyDistrX_ = (-energyDistrPixelX_/2-energyDistrPixelX_/2*energyDistrEngineInv_/(energyDistrEngineInv_+energyDistrLaserInv_))*energyDistrT_;
+    float energyDistrY_ = energyDistrPixelY_+energyDistrPixelY_*energyDistrLaserInv_/(energyDistrLaserInv_+energyDistrEngineInv_)*energyDistrT_;
+
+    energyDistrPoint_->setLeft((int)energyDistrX_-3);
+    energyDistrPoint_->setTop((int)energyDistrY_-3);
+
+  }
+
+  void HUD::setPrimar(int i){
+    primarValue_=i;
+    if(i==1){
+      primarChoice_->setLeft(2);
+      primarChoice_->setWidth(48);
+    }
+    if(i==2){
+      primarChoice_->setLeft(51);
+      primarChoice_->setWidth(49);
+    }
+    else{
+      primarChoice_->setLeft(101);
+      primarChoice_->setWidth(48);
+    }
+  }
+
+
+
+  void HUD::init(void)
+  {
+    timeText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/Time/Text");
+
+    targetWindowNameText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/Name");
+    targetWindowDistanceText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/DistanceText");
+    targetWindowStatusText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/StatusText");
+    targetWindowHitRatingText_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/TargetWindow/HitRatingText");
+
+    energyLength_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyBackground");
+
+    shieldLeftTop_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldLeftTop");
+    shieldRightTop_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldRightTop");
+    shieldLeftBottom_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldLeftBottom");
+    shieldRightBottom_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/shieldRightBottom");
+
+    rocketNum1_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum1");
+    rocketNum2_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum2");
+    rocketNum3_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum3");
+    rocketNum4_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/RocketNum4");
+
+    // FIXME: unused vars!
+    float energyDistrPixelX_ = 100;
+    float energyDistrPixelY_ = 86;
+    energyDistrPoint_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/EnergyDistrPoint");
+
+    primarChoice_ = OverlayManager::getSingleton().getOverlayElement("Orxonox/HUD1.2/PrimarChoice");
+  }
+
+}
Index: /code/branches/network/src/orxonox/hud/HUD.h
===================================================================
--- /code/branches/network/src/orxonox/hud/HUD.h	(revision 861)
+++ /code/branches/network/src/orxonox/hud/HUD.h	(revision 861)
@@ -0,0 +1,114 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      Yuning Chai
+*   Co-authors:
+*      ...
+*
+*/
+
+#ifndef _HUD_H__
+#define _HUD_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+
+#include "../OrxonoxPrereqs.h"
+
+
+namespace orxonox
+{
+  class _OrxonoxExport HUD
+  {
+  private:
+    Ogre::OverlayElement* timeText_;
+    Ogre::OverlayElement* targetWindowNameText_;
+    Ogre::OverlayElement* targetWindowStatusText_;
+    Ogre::OverlayElement* targetWindowDistanceText_;
+    Ogre::OverlayElement* targetWindowHitRatingText_;
+    Ogre::OverlayElement* energyLength_;
+    Ogre::OverlayElement* shieldLeftTop_;
+    Ogre::OverlayElement* shieldRightTop_;
+    Ogre::OverlayElement* shieldLeftBottom_;
+    Ogre::OverlayElement* shieldRightBottom_;
+    Ogre::OverlayElement* rocketNum1_;
+    Ogre::OverlayElement* rocketNum2_;
+    Ogre::OverlayElement* rocketNum3_;
+    Ogre::OverlayElement* rocketNum4_;
+    Ogre::OverlayElement* energyDistrPoint_;
+    Ogre::OverlayElement* primarChoice_;
+
+    int timeMin_;
+    int timeSec_;
+
+    std::string targetWindowName_;
+    std::string targetWindowStatus_;
+    int targetWindowDistance_;
+    int targetWindowHitRating_;
+
+    int energyValue_;
+
+    bool shieldLeftTopValue_;
+    bool shieldRightTopValue_;
+    bool shieldLeftBottomValue_;
+    bool shieldRightBottomValue_;
+
+    int rocket1_;
+    int rocket2_;
+    int rocket3_;
+    int rocket4_;
+
+    float energyDistrShield_;
+    float energyDistrEngine_;
+    float energyDistrLaser_;
+
+    float energyDistrPixelX_;
+    float energyDistrPixelY_;
+
+    int primarValue_;
+
+  public:
+    HUD( void );
+    ~HUD( void );
+    void init( void );
+
+    void setTime(int i, int j);
+    void setTargetWindowName(std::string i);
+    void setTargetWindowStatus(std::string i);
+    void setTargetWindowDistance(int i);
+    void setTargetWindowHitRating(int i);
+    void setEnergyValue(int i);
+    void setShieldLeftTopValue(bool i);
+    void setShieldRightTopValue(bool i);
+    void setShieldLeftBottomValue(bool i);
+    void setShieldRightBottomValue(bool i);
+    void setRocket1(int i);
+    void setRocket2(int i);
+    void setRocket3(int i);
+    void setRocket4(int i);
+    void setEnergyDistr(float s, float e, float l);
+    void setPrimar(int i);
+
+  };
+}
+
+#endif /* _HUD_H__ */
Index: /code/branches/network/src/orxonox/objects/Ambient.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Ambient.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Ambient.cc	(revision 861)
@@ -0,0 +1,79 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <vector>
+#include <string>
+
+#include <OgreSceneManager.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "util/Math.h"
+#include "../core/Debug.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+
+#include "Ambient.h"
+
+namespace orxonox
+{
+    // create a template instantiations
+    //template class _OrxonoxExport ClassIdentifier<Ambient>;
+
+    CreateFactory(Ambient);
+
+    Ambient::Ambient()
+    {
+        RegisterObject(Ambient);
+    }
+
+    Ambient::~Ambient()
+    {
+    }
+
+    void Ambient::loadParams(TiXmlElement* xmlElem)
+    {
+    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+    	if (xmlElem->Attribute("colourvalue"))
+    	{
+
+	    	std::vector<std::string> colourvalues = tokenize(xmlElem->Attribute("colourvalue"),",");
+	    	float r, g, b;
+    	 	String2Number<float>(r, colourvalues[0]);
+	    	String2Number<float>(g, colourvalues[1]);
+	    	String2Number<float>(b, colourvalues[2]);
+
+	    	mgr->setAmbientLight(ColourValue(r,g,b));
+
+	    	COUT(4) << "Loader: Set ambient light: "<<r<<" " << g << " " << b  << std::endl << std::endl;
+    	}
+   }
+}
Index: /code/branches/network/src/orxonox/objects/Ambient.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Ambient.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Ambient.h	(revision 861)
@@ -0,0 +1,26 @@
+#ifndef _Ambient_H__
+#define _Ambient_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Ambient : public BaseObject
+    {
+        public:
+            Ambient();
+            virtual ~Ambient();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+    ExportClass(Ambient, Orxonox);
+}
+
+#endif /* _Ambient_H__ */
Index: /code/branches/network/src/orxonox/objects/Camera.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Camera.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Camera.cc	(revision 861)
@@ -0,0 +1,77 @@
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreRoot.h>
+#include <OgreRenderWindow.h>
+#include <OgreViewport.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "util/Math.h"
+#include "../core/Debug.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+#include "../GraphicsEngine.h"
+
+#include "Camera.h"
+
+namespace orxonox
+{
+    CreateFactory(Camera);
+
+    Camera::Camera()
+    {
+        RegisterObject(Camera);
+    }
+
+    Camera::~Camera()
+    {
+    }
+
+    void Camera::loadParams(TiXmlElement* xmlElem)
+    {
+      Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+      if (xmlElem->Attribute("name") && xmlElem->Attribute("pos") && xmlElem->Attribute("lookat") && xmlElem->Attribute("node"))
+      {
+        //    <Camera name="Camera" pos="0,0,-250" lookat="0,0,0" />
+
+        std::string name = xmlElem->Attribute("name");
+        std::string pos = xmlElem->Attribute("pos");
+        std::string lookat = xmlElem->Attribute("lookat");
+
+        Ogre::Camera *cam = mgr->createCamera(name);
+
+        float x, y, z;
+        std::vector<std::string> posVec = tokenize(xmlElem->Attribute("pos"),",");
+        String2Number<float>(x, posVec[0]);
+        String2Number<float>(y, posVec[1]);
+        String2Number<float>(z, posVec[2]);
+
+        cam->setPosition(Vector3(x,y,z));
+
+        posVec = tokenize(xmlElem->Attribute("lookat"),",");
+        String2Number<float>(x, posVec[0]);
+        String2Number<float>(y, posVec[1]);
+        String2Number<float>(z, posVec[2]);
+
+        cam->lookAt(Vector3(x,y,z));
+
+        std::string node = xmlElem->Attribute("node");
+
+        Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->createChildSceneNode(node); //getChild(node);
+        sceneNode->attachObject((Ogre::MovableObject*)cam);
+
+        // FIXME: unused var
+        Ogre::Viewport* vp = orxonox::Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+
+
+        COUT(4) << "Loader: Created camera "<< name  << std::endl << std::endl;
+      }
+   }
+}
Index: /code/branches/network/src/orxonox/objects/Camera.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Camera.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Camera.h	(revision 861)
@@ -0,0 +1,26 @@
+#ifndef _Camera_H__
+#define _Camera_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Camera : public BaseObject
+    {
+        public:
+            Camera();
+            virtual ~Camera();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+    ExportClass(Camera, Orxonox);
+}
+
+#endif /* _Camera_H__ */
Index: /code/branches/network/src/orxonox/objects/Explosion.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Explosion.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Explosion.cc	(revision 861)
@@ -0,0 +1,85 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreParticleSystem.h>
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
+#include "../core/CoreIncludes.h"
+#include "util/Math.h"
+#include "../Orxonox.h"
+#include "../particle/ParticleInterface.h"
+
+#include "Explosion.h"
+
+namespace orxonox
+{
+    CreateFactory(Explosion);
+
+    Explosion::Explosion(WorldEntity* owner)
+    {
+        RegisterObject(Explosion);
+
+        this->particle_ = 0;
+        this->lifetime_ = 0.4;
+
+        if (owner)
+        {
+            this->destroyTimer_.setTimer(this->lifetime_, false, this, &Explosion::destroyObject);
+
+            Vector3 position = owner->getNode()->getWorldPosition();
+
+            this->particle_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(), "explosion" + this->getName(), "Orxonox/treibwerk");
+            this->particle_->getParticleSystem()->setParameter("local_space", "true");
+            this->particle_->newEmitter();
+            this->particle_->setPositionOfEmitter(0, Vector3::ZERO);
+            this->particle_->setPositionOfEmitter(1, Vector3::ZERO);
+            this->particle_->setColour(ColourValue(1.0, 0.8, 0.2));
+
+            this->setPosition(position);
+            this->scale(2);
+
+            this->particle_->addToSceneNode(this->getNode());
+        }
+    }
+
+    Explosion::~Explosion()
+    {
+        if (this->particle_)
+        {
+            this->particle_->detachFromSceneNode();
+            delete this->particle_;
+        }
+    };
+
+    void Explosion::destroyObject()
+    {
+        delete this;
+    }
+}
Index: /code/branches/network/src/orxonox/objects/Explosion.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Explosion.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Explosion.h	(revision 861)
@@ -0,0 +1,26 @@
+#ifndef _Explosion_H__
+#define _Explosion_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "../tools/Timer.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Explosion : public WorldEntity
+    {
+        public:
+            Explosion(WorldEntity* owner = 0);
+            virtual ~Explosion();
+            void destroyObject();
+
+        private:
+            Timer<Explosion> destroyTimer_;
+            float lifetime_;
+            ParticleInterface* particle_;
+    };
+    ExportClass(Explosion, Orxonox);
+}
+
+#endif /* _Explosion_H__ */
Index: /code/branches/network/src/orxonox/objects/Fighter.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Fighter.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Fighter.cc	(revision 861)
@@ -0,0 +1,510 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OgreCamera.h>
+#include <OgreRenderWindow.h>
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/String2Number.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+#include "../particle/ParticleInterface.h"
+#include "weapon/AmmunitionDump.h"
+#include "weapon/BarrelGun.h"
+
+#include "Fighter.h"
+
+namespace orxonox
+{
+    CreateFactory(Fighter);
+
+    Fighter::Fighter()
+    {
+        RegisterObject(Fighter);
+
+        this->setConfigValues();
+
+        this->setMouseEventCallback_ = false;
+
+        this->w = NULL;
+        this->tt = NULL;
+        this->ammoDump_ = NULL;
+        this->mainWeapon_ = NULL;
+        this->rightButtonPressed_ = false;
+        this->leftButtonPressed_ = false;
+
+        this->moveForward_ = 0;
+        this->rotateUp_ = 0;
+        this->rotateDown_ = 0;
+        this->rotateRight_ = 0;
+        this->rotateLeft_ = 0;
+        this->loopRight_ = 0;
+        this->loopLeft_ = 0;
+        this->brakeForward_ = 0;
+        this->brakeRotate_ = 0;
+        this->brakeLoop_ = 0;
+        this->speedForward_ = 0;
+        this->speedRotateUpDown_ = 0;
+        this->speedRotateRightLeft_ = 0;
+        this->speedLoopRightLeft_ = 0;
+        this->maxSpeedForward_ = 0;
+        this->maxSpeedRotateUpDown_ = 0;
+        this->maxSpeedRotateRightLeft_ = 0;
+        this->maxSpeedLoopRightLeft_ = 0;
+        this->accelerationForward_ = 0;
+        this->accelerationRotateUpDown_ = 0;
+        this->accelerationRotateRightLeft_ = 0;
+        this->accelerationLoopRightLeft_ = 0;
+
+        this->speed = 250;
+        this->loop = 100;
+        this->rotate = 10;
+        this->mouseX = 0;
+        this->mouseY = 0;
+        this->maxMouseX = 0;
+        this->minMouseX = 0;
+        this->moved = false;
+
+        this->brakeRotate(rotate*10);
+        this->brakeLoop(loop);
+
+        COUT(3) << "Info: Fighter was loaded" << std::endl;
+    }
+
+    Fighter::~Fighter()
+    {
+        if (w)
+            delete w;
+        if (tt)
+            delete tt;
+    }
+
+    void Fighter::setConfigValues()
+    {
+        SetConfigValue(bInvertMouse_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+    }
+
+    void Fighter::setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft)
+    {
+        this->maxSpeedForward_ = maxSpeedForward;
+        this->maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+        this->maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+        this->maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+    }
+
+    void Fighter::loadParams(TiXmlElement* xmlElem)
+    {
+        Model::loadParams(xmlElem);
+
+#if 0
+        w = new particle::ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"schuss" + this->getName(),"Orxonox/schuss");
+        w->getParticleSystem()->setParameter("local_space","true");
+        w->newEmitter();
+/*
+        w->setDirection(Vector3(0,0,1));
+        w->setPositionOfEmitter(0, Vector3(10,10,0));
+        w->setPositionOfEmitter(1, Vector3(-10,10,0));
+*/
+        w->setDirection(Vector3(1,0,0));
+        w->setPositionOfEmitter(0, Vector3(0,10,10));
+        w->setPositionOfEmitter(1, Vector3(0,-10,10));
+
+        emitterRate_ = w->getRate();
+
+        Ogre::SceneNode* node1 = this->getNode()->createChildSceneNode(this->getName() + "particle1");
+        node1->setInheritScale(false);
+        w->addToSceneNode(node1);
+#endif
+
+        tt = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
+        tt->getParticleSystem()->setParameter("local_space","true");
+        tt->newEmitter();
+/*
+        tt->setDirection(Vector3(0,0,1));
+        tt->setPositionOfEmitter(0, Vector3(20,-1,-15));
+        tt->setPositionOfEmitter(1, Vector3(-20,-1,-15));
+*/
+        tt->setDirection(Vector3(-1,0,0));
+        tt->setPositionOfEmitter(0, Vector3(-15,20,-1));
+        tt->setPositionOfEmitter(1, Vector3(-15,-20,-1));
+        tt->setVelocity(50);
+
+        Ogre::SceneNode* node2 = this->getNode()->createChildSceneNode(this->getName() + "particle2");
+        node2->setInheritScale(false);
+        tt->addToSceneNode(node2);
+
+        // add weapon
+
+        ammoDump_ = new AmmunitionDump();
+        ammoDump_->setDumpSize("Barrel", 1000);
+        ammoDump_->store("Barrel", 420);
+
+        mainWeapon_ = new BarrelGun();
+        mainWeapon_->setAmmoDump(ammoDump_);
+        Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->removeChild(mainWeapon_->getNode());
+        getNode()->addChild(mainWeapon_->getNode());
+
+        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
+        {
+            std::string forwardStr = xmlElem->Attribute("forward");
+            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
+            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
+            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
+
+            String2Number<float>(this->maxSpeedForward_, forwardStr);
+            String2Number<float>(this->maxSpeedRotateUpDown_, rotateupdownStr);
+            String2Number<float>(this->maxSpeedRotateRightLeft_, rotaterightleftStr);
+            String2Number<float>(this->maxSpeedLoopRightLeft_, looprightleftStr);
+
+            COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl;
+    	}
+
+    	if (xmlElem->Attribute("camera"))
+    	{
+            Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+            Ogre::SceneNode *node = this->getNode()->createChildSceneNode("CamNode");
+/*
+//            node->setInheritOrientation(false);
+            cam->setPosition(Vector3(0,50,-150));
+            cam->lookAt(Vector3(0,20,0));
+            cam->roll(Degree(0));
+*/
+
+            cam->setPosition(Vector3(-150,0,50));
+//            cam->setPosition(Vector3(0,-350,0));
+            cam->lookAt(Vector3(0,0,20));
+            cam->roll(Degree(-90));
+
+            node->attachObject(cam);
+            Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    	}
+    }
+
+    bool Fighter::mouseMoved(const OIS::MouseEvent &e)
+    {
+        this->mouseX += e.state.X.rel;
+        //if (this->bInvertMouse_)
+            //this->mouseY += e.state.Y.rel;
+        //else
+            this->mouseY -= e.state.Y.rel;
+
+//        if(mouseX>maxMouseX) maxMouseX = mouseX;
+//        if(mouseX<minMouseX) minMouseX = mouseX;
+//        cout << "mouseX: " << mouseX << "\tmouseY: " << mouseY << endl;
+
+        this->moved = true;
+
+        return true;
+    }
+
+    bool Fighter::mousePressed(const OIS::MouseEvent &arg, OIS::MouseButtonID id )
+    {
+      if (id == OIS::MB_Left)
+      {
+        this->leftButtonPressed_ = true;
+      }
+      else if (id == OIS::MB_Right)
+        this->rightButtonPressed_ = true;
+      return true;
+    }
+
+    bool Fighter::mouseReleased(const OIS::MouseEvent &arg, OIS::MouseButtonID id )
+    {
+      if (id == OIS::MB_Left)
+      {
+        this->leftButtonPressed_ = false;
+      }
+      else if (id == OIS::MB_Right)
+        this->rightButtonPressed_ = false;
+      return true;
+    }
+
+    void Fighter::tick(float dt)
+    {
+        if (!this->setMouseEventCallback_)
+        {
+            if (Orxonox::getSingleton()->getMouse())
+            {
+                Orxonox::getSingleton()->getMouse()->setEventCallback(this);
+                this->setMouseEventCallback_ = true;
+            }
+        }
+
+        WorldEntity::tick(dt);
+
+        OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();
+        OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();
+
+        mKeyboard->capture();
+        mMouse->capture();
+
+        if (leftButtonPressed_)
+            mainWeapon_->primaryFireRequest();
+        if (rightButtonPressed_)
+            mainWeapon_->secondaryFireRequest();
+
+        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+            this->moveForward(speed);
+        else
+            this->moveForward(0);
+
+        if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+            this->brakeForward(speed);
+        else
+            this->brakeForward(speed/10);
+
+        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+            this->loopRight(loop);
+        else
+            this->loopRight(0);
+
+        if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+            this->loopLeft(loop);
+        else
+            this->loopLeft(0);
+
+        if (mKeyboard->isKeyDown(OIS::KC_G))
+            this->mainWeapon_->addAction(BaseWeapon::RELOAD);
+        else
+            this->loopLeft(0);
+
+        if(moved)
+        {
+            if (mouseY<=0)
+                this->rotateUp(-mouseY*rotate);
+            if (mouseY>0)
+                this->rotateDown(mouseY*rotate);
+            if (mouseX>0)
+                this->rotateRight(mouseX*rotate);
+            if (mouseX<=0)
+                this->rotateLeft(-mouseX*rotate);
+
+            mouseY = 0;
+            mouseX = 0;
+            moved = false;
+        }
+        else
+        {
+            this->rotateUp(0);
+            this->rotateDown(0);
+            this->rotateRight(0);
+            this->rotateLeft(0);
+        }
+
+        if(moveForward_ > 0)
+        {
+            accelerationForward_ = moveForward_;
+            if(speedForward_ < maxSpeedForward_)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ > maxSpeedForward_)
+                speedForward_ = maxSpeedForward_;
+        }
+
+        if(moveForward_ <= 0)
+        {
+            accelerationForward_ = -brakeForward_;
+            if(speedForward_ > 0)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ < 0)
+                speedForward_ = 0;
+        }
+
+        if(rotateUp_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateUp_;
+            if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+            speedRotateUpDown_ = maxSpeedRotateUpDown_;
+        }
+
+        if(rotateDown_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateDown_;
+            if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+        }
+
+        if(rotateUp_ == 0 && rotateDown_ == 0)
+        {
+            accelerationRotateUpDown_ = brakeRotate_;
+            if(speedRotateUpDown_ > 0)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < 0)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(fabs(speedRotateUpDown_) < accelerationRotateUpDown_*dt)
+                speedRotateUpDown_ = 0;
+        }
+
+        if(rotateRight_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateRight_;
+            if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateLeft_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateLeft_;
+            if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateRight_ == 0 && rotateLeft_ == 0)
+        {
+            accelerationRotateRightLeft_ = brakeRotate_;
+            if(speedRotateRightLeft_ > 0)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < 0)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(fabs(speedRotateRightLeft_) < accelerationRotateRightLeft_*dt)
+                speedRotateRightLeft_ = 0;
+        }
+
+        if(loopRight_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopRight_;
+            if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopLeft_;
+            if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ == 0 && loopRight_ == 0)
+        {
+            accelerationLoopRightLeft_ = brakeLoop_;
+            if(speedLoopRightLeft_ > 0)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < 0)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(fabs(speedLoopRightLeft_) < accelerationLoopRightLeft_*dt)
+                speedLoopRightLeft_ = 0;
+        }
+
+        Vector3 transVector = Vector3::ZERO;
+/*
+        transVector.z = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+*/
+
+        transVector.x = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+
+        if (accelerationForward_ > 25.0)
+        {
+          this->tt->setRate(emitterRate_);
+        }
+        else
+        {
+          this->tt->setRate(0);
+        }
+
+    }
+
+    void Fighter::moveForward(float moveForward) {
+        moveForward_ = moveForward;
+    }
+
+    void Fighter::rotateUp(float rotateUp) {
+        rotateUp_ = rotateUp;
+    }
+
+    void Fighter::rotateDown(float rotateDown) {
+        rotateDown_ = rotateDown;
+    }
+
+    void Fighter::rotateLeft(float rotateLeft) {
+        rotateLeft_ = rotateLeft;
+    }
+
+    void Fighter::rotateRight(float rotateRight) {
+        rotateRight_ = rotateRight;
+    }
+
+    void Fighter::loopLeft(float loopLeft) {
+        loopLeft_ = loopLeft;
+    }
+
+    void Fighter::loopRight(float loopRight) {
+        loopRight_ = loopRight;
+    }
+
+    void Fighter::brakeForward(float brakeForward) {
+        brakeForward_ = brakeForward;
+    }
+
+    void Fighter::brakeRotate(float brakeRotate) {
+        brakeRotate_ = brakeRotate;
+    }
+
+    void Fighter::brakeLoop(float brakeLoop) {
+        brakeLoop_ = brakeLoop;
+    }
+
+    void Fighter::maxSpeedForward(float maxSpeedForward) {
+        maxSpeedForward_ = maxSpeedForward;
+    }
+
+    void Fighter::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+        maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+    }
+
+    void Fighter::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+        maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+    }
+
+    void Fighter::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+        maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+    }
+}
Index: /code/branches/network/src/orxonox/objects/Fighter.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Fighter.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Fighter.h	(revision 861)
@@ -0,0 +1,95 @@
+#ifndef _Fighter_H__
+#define _Fighter_H__
+
+#include <OIS/OIS.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox
+{
+    class _OrxonoxExport Fighter : public Model, public OIS::MouseListener
+    {
+        public:
+            Fighter();
+            ~Fighter();
+            void setConfigValues();
+            virtual void loadParams(TiXmlElement* xmlElem);
+            void setMaxSpeedValues(float maxSpeedForward, float maxSpeedRotateUpDown, float maxSpeedRotateRightLeft, float maxSpeedLoopRightLeft);
+            virtual void tick(float dt);
+            void moveForward(float moveForward);
+            void rotateUp(float rotateUp);
+            void rotateDown(float rotateDown);
+            void rotateRight(float rotateRight);
+            void rotateLeft(float rotateLeft);
+            void loopRight(float loopRight);
+            void loopLeft(float loopLeft);
+            void brakeForward(float brakeForward);
+            void brakeRotate(float brakeRotate);
+            void brakeLoop(float brakeLoop);
+            void maxSpeedForward(float maxSpeedForward);
+            void maxSpeedRotateUpDown(float maxSpeedRotateUpDown);
+            void maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft);
+            void maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft);
+            bool mouseMoved(const OIS::MouseEvent &e);
+            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; }
+            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);// { return true; }
+
+
+        private:
+            bool bInvertMouse_;
+            bool setMouseEventCallback_;
+
+            ParticleInterface *w;
+            ParticleInterface *tt;
+
+            AmmunitionDump* ammoDump_;
+            BarrelGun* mainWeapon_;
+
+            bool leftButtonPressed_;
+            bool rightButtonPressed_;
+
+            float moveForward_;
+            float rotateUp_;
+            float rotateDown_;
+            float rotateRight_;
+            float rotateLeft_;
+            float loopRight_;
+            float loopLeft_;
+            float brakeForward_;
+            float brakeRotate_;
+            float brakeLoop_;
+
+            float speedForward_;
+            float speedRotateUpDown_;
+            float speedRotateRightLeft_;
+            float speedLoopRightLeft_;
+
+            float maxSpeedForward_;
+            float maxSpeedRotateUpDown_;
+            float maxSpeedRotateRightLeft_;
+            float maxSpeedLoopRightLeft_;
+
+            float accelerationForward_;
+            float accelerationRotateUpDown_;
+            float accelerationRotateRightLeft_;
+            float accelerationLoopRightLeft_;
+
+            float speed;
+            float rotate;
+            float loop;
+            float mouseY;
+            float mouseX;
+            float maxMouseX;
+            float minMouseX;
+            bool moved;
+
+            int emitterRate_;
+    };
+    ExportClass(Fighter, Orxonox);
+}
+
+#endif /* _Fighter_H__ */
Index: /code/branches/network/src/orxonox/objects/Model.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Model.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Model.cc	(revision 861)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+
+#include "Model.h"
+
+namespace orxonox
+{
+    CreateFactory(Model);
+
+    Model::Model()
+    {
+        RegisterObject(Model);
+    }
+
+    Model::~Model()
+    {
+    }
+
+    void Model::loadParams(TiXmlElement* xmlElem)
+    {
+        WorldEntity::loadParams(xmlElem);
+
+        if (xmlElem->Attribute("mesh"))
+        {
+            meshSrc_ = xmlElem->Attribute("mesh");
+        }
+        create();
+    }
+
+    bool Model::create(){
+      if(meshSrc_.compare("")!=0){
+        this->mesh_.setMesh(meshSrc_);
+        this->attachObject(this->mesh_.getEntity());
+        COUT(4) << "Loader: Created model" << std::endl;
+      }
+      registerAllVariables();
+      return true;
+    }
+
+    void Model::registerAllVariables(){
+      registerVar(&meshSrc_, meshSrc_.length() + 1, network::STRING);
+    }
+}
Index: /code/branches/network/src/orxonox/objects/Model.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Model.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Model.h	(revision 861)
@@ -0,0 +1,30 @@
+#ifndef _Model_H__
+#define _Model_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "../tools/Mesh.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox
+{
+
+    class _OrxonoxExport Model : public WorldEntity
+    {
+        public:
+            Model();
+            virtual ~Model();
+            virtual void loadParams(TiXmlElement* xmlElem);
+            bool create();
+
+        private:
+            std::string meshSrc_;
+            Mesh mesh_;
+            void registerAllVariables();
+    };
+    ExportClass(Model, Orxonox);
+}
+
+#endif /* _Model_H__ */
Index: /code/branches/network/src/orxonox/objects/NPC.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/NPC.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/NPC.cc	(revision 861)
@@ -0,0 +1,172 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Knecht, beni_at_orxonox.net
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "../core/CoreIncludes.h"
+#include "NPC.h"
+
+namespace orxonox {
+
+  CreateFactory(NPC);
+
+  NPC::NPC()
+  {
+    RegisterObject(NPC);
+    movable_ = true;
+  }
+
+  NPC::~NPC()
+  {
+  }
+
+  void NPC::loadParams(TiXmlElement* xmlElem)
+  {
+    Model::loadParams(xmlElem);
+  }
+
+  /**
+   * function to chance values of an element
+   */
+  void NPC::setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable) {
+    this->setAcceleration(acceleration);
+    this->setVelocity(speed);
+    this->translate(location);
+    movable_ = movable;
+  }
+
+  /**
+   * calculates the distance between the element and an other point given by temp
+   */
+  float NPC::getDistance(WorldEntity* temp)
+  {
+    Vector3 distance = temp->getPosition() - this->getPosition();
+    return distance.length();
+  }
+
+  /**
+   * updates the data of an element
+   */
+  void NPC::update()
+  {
+
+    //if element is movable, calculate acceleration
+    if (this->movable_ == true) calculateAcceleration();
+
+  }
+
+  /**
+   * tick this NPC
+   */
+  void NPC::tick(float dt)
+  {
+
+    this->setVelocity(0.995*this->getVelocity() + this->getAcceleration()*dt);
+    this->translate(this->getVelocity()*dt);
+    this->setAcceleration(Vector3(0,0,0));
+  }
+
+  /**
+   * calculates the new acceleration of an element
+   */
+  void NPC::calculateAcceleration()
+  {
+    //acceleration consisting of flocking-functions
+    this->setAcceleration(separation() + alignment() + cohesion());
+  }
+
+  /**
+   * separation-function (keep elements separated, avoid crashs)
+   */
+  Vector3 NPC::separation()
+  {
+    Vector3 steering = Vector3(0,0,0); //steeringvector
+    Vector3 inverseDistance = Vector3(0,0,0);  //vector pointing away from possible collisions
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    float distance = 0;  // distance to the actual element
+    for(Iterator<WorldEntity> it = ObjectList<WorldEntity>::start(); it; ++it) {  //go through all elements
+      distance = getDistance(*it);  //get distance between this and actual
+      if ((distance > 0) && (distance < SEPERATIONDISTANCE)) {  //do only if actual is inside detectionradius
+        inverseDistance = Vector3(0,0,0);
+        inverseDistance = this->getPosition() - it->getPosition();  //calculate the distancevector heading towards this
+        //adaptation of the inverseDistance to the distance
+        if ((distance < 200) && (distance >= 120)) {inverseDistance = 2*inverseDistance;}
+        if ((distance < 120) && (distance >= 80)) {inverseDistance = 5*inverseDistance;}
+        if ((distance < 80) && (distance >= 40)) {inverseDistance = 10*inverseDistance;}
+        if ((distance < 40) && (distance > 0)) {inverseDistance = 10*inverseDistance;}
+        steering = steering + inverseDistance;  //add up all significant steeringvectors
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> separation steeringvector
+    return steering;
+  }
+
+  /**
+   * alignment-function (lead elements to the same heading)
+   */
+  Vector3 NPC::alignment()
+  {
+    Vector3 steering = Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //float distance = 0;
+    //go through all elements
+    for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
+      float distance = getDistance(*it);  //get distance between this and actual
+      if ((distance > 0) && (distance < ALIGNMENTDISTANCE)) {  //check if actual element is inside detectionradius
+        steering = steering + it->getVelocity();  //add up all speedvectors inside the detectionradius
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) { steering = steering / (float)numberOfNeighbour; }  //devide the sum of steeringvectors by the number of elements -> alignment steeringvector
+    return steering;
+  }
+
+  /**
+   * cohseion-function (keep elements close to each other)
+   */
+  Vector3 NPC::cohesion()
+  {
+    Vector3 steering = Vector3(0,0,0); //steeringvector
+    int numberOfNeighbour = 0;  //number of observed neighbours
+    //float distance = 0;
+    //go through all elements
+    for(Iterator<NPC> it = ObjectList<NPC>::start(); it; ++it) {  //just working with 3 elements at the moment
+      float distance = getDistance(*it);  //get distance between this and actual
+      if ((distance > 0) && (distance < COHESIONDISTANCE)) {  //check if actual element is inside detectionradius
+        steering = steering + it->getPosition();  //add up all locations of elements inside the detectionradius
+        numberOfNeighbour++;  //counts the elements inside the detectionradius
+      }
+    }
+    if(numberOfNeighbour > 0) {
+      steering = steering  / (float)numberOfNeighbour;  //devide the sum steeringvector by the number of elements -> cohesion steeringvector
+      steering = steering - this->getPosition();  //transform the vector for the ship
+    }
+    return steering;
+  }
+
+} // end of class NPC
Index: /code/branches/network/src/orxonox/objects/NPC.h
===================================================================
--- /code/branches/network/src/orxonox/objects/NPC.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/NPC.h	(revision 861)
@@ -0,0 +1,49 @@
+/**
+  @file NPC.h
+  @brief AI using WorldEntity
+  @author Benjamin Knecht <beni_at_orxonox.net>
+ */
+
+#ifndef _NPC_H__
+#define _NPC_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox {
+
+  class _OrxonoxExport NPC : public Model
+  {
+    public:
+
+      NPC();
+      virtual ~NPC();
+      virtual void loadParams(TiXmlElement* xmlElem);
+      void tick(float dt);
+      void update();
+      void setValues(Vector3 location, Vector3 speed, Vector3 acceleration, bool movable);
+
+    private:
+      float getDistance(WorldEntity* temp);
+      void calculateAcceleration();
+      Vector3 separation();
+      Vector3 alignment();
+      Vector3 cohesion();
+
+
+    private:
+      bool movable_;  // movability of the element, (false) gives the possiblity that an object can`t be moved by flocking but still gets into the calculation
+
+      // those values should maybe be controlled by a higher power and should maybe be parameters that can be changed
+      static int const SEPERATIONDISTANCE = 300;  //detectionradius of seperation
+      static int const ALIGNMENTDISTANCE = 300;  //detectionradius of alignment
+      static int const COHESIONDISTANCE = 5000;  //detectionradius of cohesion
+      static int const NUMELEMENTS = 9;  //number of elements
+  };
+  ExportClass(NPC, Orxonox);
+
+}
+#endif /* _NPC_H__ */
Index: /code/branches/network/src/orxonox/objects/Projectile.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Projectile.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Projectile.cc	(revision 861)
@@ -0,0 +1,100 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "../core/CoreIncludes.h"
+#include "SpaceShip.h"
+#include "Explosion.h"
+#include "Model.h"
+
+#include "Projectile.h"
+
+namespace orxonox
+{
+    CreateFactory(Projectile);
+
+    Projectile::Projectile(SpaceShip* owner)
+    {
+        RegisterObject(Projectile);
+
+        this->setConfigValues();
+
+        this->owner_ = owner;
+
+        this->billboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 1.0, 0.5), 1);
+        this->attachObject(this->billboard_.getBillboardSet());
+        this->scale(0.5);
+
+        if (this->owner_)
+        {
+            this->setStatic(false);
+            this->setOrientation(this->owner_->getOrientation());
+            this->setPosition(this->owner_->getPosition());
+            this->translate(Vector3(55, 0, 0), Ogre::Node::TS_LOCAL);
+            this->setVelocity(Vector3(1, 0, 0) * this->speed_);
+        }
+
+        this->destroyTimer_.setTimer(this->lifetime_, false, this, &Projectile::destroyObject);
+    }
+
+    Projectile::~Projectile()
+    {
+    }
+
+    void Projectile::setConfigValues()
+    {
+        SetConfigValue(lifetime_, 10.0).description("The time in seconds a projectile stays alive");
+        SetConfigValue(speed_, 2000.0).description("The speed of a projectile in units per second");
+    }
+
+    void Projectile::tick(float dt)
+    {
+        WorldEntity::tick(dt);
+
+        float radius;
+        for (Iterator<Model> it = ObjectList<Model>::start(); it; ++it)
+        {
+            if ((*it) != this->owner_)
+            {
+                radius = it->getScale().x * 3.0;
+
+                if (this->getPosition().squaredDistance(it->getPosition()) <= (radius*radius))
+                {
+                    new Explosion(this);
+                    delete this;
+                    return;
+                }
+            }
+        }
+    }
+
+    void Projectile::destroyObject()
+    {
+        delete this;
+    }
+}
Index: /code/branches/network/src/orxonox/objects/Projectile.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Projectile.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Projectile.h	(revision 861)
@@ -0,0 +1,33 @@
+#ifndef _Projectile_H__
+#define _Projectile_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "WorldEntity.h"
+#include "../tools/BillboardSet.h"
+#include "../tools/Timer.h"
+
+namespace orxonox
+{
+    class SpaceShip; // Forward declaration
+
+    class _OrxonoxExport Projectile : public WorldEntity
+    {
+        public:
+            Projectile(SpaceShip* owner = 0);
+            virtual ~Projectile();
+            void setConfigValues();
+            void destroyObject();
+            virtual void tick(float dt);
+
+        private:
+            SpaceShip* owner_;
+            BillboardSet billboard_;
+            float speed_;
+            float lifetime_;
+            Timer<Projectile> destroyTimer_;
+    };
+    ExportClass(Projectile, Orxonox);
+}
+
+#endif /* _Projectile_H__ */
Index: /code/branches/network/src/orxonox/objects/Skybox.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/Skybox.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Skybox.cc	(revision 861)
@@ -0,0 +1,68 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OgreSceneManager.h>
+
+#include "util/tinyxml/tinyxml.h"
+//#include "util/Tokenizer.h"
+//#include "util/String2Number.h"
+#include "../Orxonox.h"
+#include "../core/CoreIncludes.h"
+#include "../core/Debug.h"
+
+#include "Skybox.h"
+
+namespace orxonox
+{
+    CreateFactory(Skybox);
+
+    Skybox::Skybox()
+    {
+        RegisterObject(Skybox);
+    }
+
+    Skybox::~Skybox()
+    {
+    }
+
+    void Skybox::loadParams(TiXmlElement* xmlElem)
+    {
+    	Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+
+    	if (xmlElem->Attribute("src"))
+    	{
+    		std::string skyboxSrc = xmlElem->Attribute("src");
+	    	mgr->setSkyBox(true, skyboxSrc);
+
+	    	COUT(4) << "Loader: Set skybox: "<< skyboxSrc << std::endl << std::endl;
+    	}
+   }
+}
Index: /code/branches/network/src/orxonox/objects/Skybox.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Skybox.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Skybox.h	(revision 861)
@@ -0,0 +1,28 @@
+#ifndef _Skybox_H__
+#define _Skybox_H__
+
+#include "../OrxonoxPrereqs.h"
+
+#include "core/BaseObject.h"
+
+class TiXmlElement; // Forward declaration
+
+namespace orxonox
+{
+    class _OrxonoxExport Skybox : public BaseObject
+    {
+        public:
+            Skybox();
+            virtual ~Skybox();
+
+            
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            
+
+    };
+    ExportClass(Skybox, Orxonox);
+}
+
+#endif /* _Skybox_H__ */
Index: /code/branches/network/src/orxonox/objects/SpaceShip.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/SpaceShip.cc	(revision 861)
@@ -0,0 +1,714 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+
+#include <OIS/OIS.h>
+#include <OgreCamera.h>
+#include <OgreRenderWindow.h>
+#include <OgreParticleSystem.h>
+#include <OgreSceneNode.h>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/String2Number.h"
+#include "util/Math.h"
+#include "../core/CoreIncludes.h"
+#include "../core/Debug.h"
+#include "../Orxonox.h"
+#include "../particle/ParticleInterface.h"
+#include "Projectile.h"
+
+#include "SpaceShip.h"
+
+namespace orxonox
+{
+    CreateFactory(SpaceShip);
+
+    SpaceShip::SpaceShip()
+    {
+        RegisterObject(SpaceShip);
+
+        this->setConfigValues();
+
+        this->setMouseEventCallback_ = false;
+        this->bLMousePressed_ = false;
+        this->bRMousePressed_ = false;
+        this->mouseX_ = 0;
+        this->mouseY_ = 0;
+
+        this->camNode_ = 0;
+
+        this->tt_ = 0;
+        this->redNode_ = 0;
+        this->greenNode_ = 0;
+        this->blinkTime_ = 0;
+
+        this->timeToReload_ = 0;
+
+        this->maxSpeed_ = 0;
+        this->maxSideAndBackSpeed_ = 0;
+        this->maxRotation_ = 0;
+        this->translationAcceleration_ = 0;
+        this->rotationAcceleration_ = 0;
+        this->translationDamping_ = 0;
+        this->rotationDamping_ = 0;
+
+        this->maxRotationRadian_ = 0;
+        this->rotationAccelerationRadian_ = 0;
+        this->rotationDampingRadian_ = 0;
+        this->zeroRadian_ = Radian(0);
+
+        this->setRotationAxis(1, 0, 0);
+        this->setStatic(false);
+/*
+        this->moveForward_ = 0;
+        this->rotateUp_ = 0;
+        this->rotateDown_ = 0;
+        this->rotateRight_ = 0;
+        this->rotateLeft_ = 0;
+        this->loopRight_ = 0;
+        this->loopLeft_ = 0;
+        this->brakeForward_ = 0;
+        this->brakeRotate_ = 0;
+        this->brakeLoop_ = 0;
+        this->speedForward_ = 0;
+        this->speedRotateUpDown_ = 0;
+        this->speedRotateRightLeft_ = 0;
+        this->speedLoopRightLeft_ = 0;
+        this->maxSpeedForward_ = 0;
+        this->maxSpeedRotateUpDown_ = 0;
+        this->maxSpeedRotateRightLeft_ = 0;
+        this->maxSpeedLoopRightLeft_ = 0;
+        this->accelerationForward_ = 0;
+        this->accelerationRotateUpDown_ = 0;
+        this->accelerationRotateRightLeft_ = 0;
+        this->accelerationLoopRightLeft_ = 0;
+
+        this->speed = 250;
+        this->loop = 100;
+        this->rotate = 10;
+        this->mouseX = 0;
+        this->mouseY = 0;
+        this->maxMouseX = 0;
+        this->minMouseX = 0;
+        this->moved = false;
+
+        this->brakeRotate(rotate*10);
+        this->brakeLoop(loop);
+*/
+        COUT(3) << "Info: SpaceShip was loaded" << std::endl;
+    }
+
+    SpaceShip::~SpaceShip()
+    {
+        if (this->tt_)
+            delete this->tt_;
+    }
+
+    void SpaceShip::setConfigValues()
+    {
+        SetConfigValue(bInvertYAxis_, false).description("Set this to true for joystick-like mouse behaviour (mouse up = ship down).");
+        SetConfigValue(reloadTime_, 0.125).description("The reload time of the weapon in seconds");
+        SetConfigValue(testvector_, Vector3()).description("asdfblah");
+    }
+
+    void SpaceShip::loadParams(TiXmlElement* xmlElem)
+    {
+        Model::loadParams(xmlElem);
+
+
+        // START CREATING THRUSTER
+        this->tt_ = new ParticleInterface(Orxonox::getSingleton()->getSceneManager(),"twinthruster" + this->getName(),"Orxonox/engineglow");
+        this->tt_->getParticleSystem()->setParameter("local_space","true");
+        this->tt_->newEmitter();
+/*
+        this->tt_->setDirection(Vector3(0,0,1));
+        this->tt_->setPositionOfEmitter(0, Vector3(20,-1,-15));
+        this->tt_->setPositionOfEmitter(1, Vector3(-20,-1,-15));
+*/
+        this->tt_->setDirection(Vector3(-1,0,0));
+        this->tt_->setPositionOfEmitter(0, Vector3(-15,20,-1));
+        this->tt_->setPositionOfEmitter(1, Vector3(-15,-20,-1));
+        this->tt_->setVelocity(50);
+
+        emitterRate_ = tt_->getRate();
+
+        Ogre::SceneNode* node2 = this->getNode()->createChildSceneNode(this->getName() + "particle2");
+        node2->setInheritScale(false);
+        tt_->addToSceneNode(node2);
+        // END CREATING THRUSTER
+
+        // START CREATING BLINKING LIGHTS
+        this->redBillboard_.setBillboardSet("Examples/Flare", ColourValue(1.0, 0.0, 0.0), 1);
+        this->greenBillboard_.setBillboardSet("Examples/Flare", ColourValue(0.0, 1.0, 0.0), 1);
+
+        this->redNode_ = this->getNode()->createChildSceneNode(this->getName() + "red", Vector3(0.3, 4.7, -0.3));
+        this->redNode_->setInheritScale(false);
+        this->greenNode_ = this->getNode()->createChildSceneNode(this->getName() + "green", Vector3(0.3, -4.7, -0.3));
+        this->greenNode_->setInheritScale(false);
+
+        this->redNode_->attachObject(this->redBillboard_.getBillboardSet());
+        this->redNode_->setScale(0.3, 0.3, 0.3);
+
+        this->greenNode_->attachObject(this->greenBillboard_.getBillboardSet());
+        this->greenNode_->setScale(0.3, 0.3, 0.3);
+        // END CREATING BLINKING LIGHTS
+
+        // START of testing crosshair
+        this->crosshairNear_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
+        this->crosshairFar_.setBillboardSet("Orxonox/Crosshair", ColourValue(1.0, 1.0, 0.0), 1);
+
+        this->chNearNode_ = this->getNode()->createChildSceneNode(this->getName() + "near", Vector3(50.0, 0.0, 0.0));
+        this->chNearNode_->setInheritScale(false);
+        this->chFarNode_ = this->getNode()->createChildSceneNode(this->getName() + "far", Vector3(200.0, 0.0, 0.0));
+        this->chFarNode_->setInheritScale(false);
+
+        this->chNearNode_->attachObject(this->crosshairNear_.getBillboardSet());
+        this->chNearNode_->setScale(0.2, 0.2, 0.2);
+
+        this->chFarNode_->attachObject(this->crosshairFar_.getBillboardSet());
+        this->chFarNode_->setScale(0.4, 0.4, 0.4);
+
+        // END of testing crosshair
+
+/*
+        if (xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
+        {
+            std::string forwardStr = xmlElem->Attribute("forward");
+            std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
+            std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
+            std::string looprightleftStr = xmlElem->Attribute("looprightleft");
+
+            String2Number<float>(this->maxSpeedForward_, forwardStr);
+            String2Number<float>(this->maxSpeedRotateUpDown_, rotateupdownStr);
+            String2Number<float>(this->maxSpeedRotateRightLeft_, rotaterightleftStr);
+            String2Number<float>(this->maxSpeedLoopRightLeft_, looprightleftStr);
+
+            COUT(4) << "Loader: Initialized spaceship steering with values " << maxSpeedForward_ << " " << maxSpeedRotateUpDown_ << " " << maxSpeedRotateRightLeft_ << " " << maxSpeedLoopRightLeft_ << " " << std::endl;
+    	}
+*/
+        if (xmlElem->Attribute("maxSpeed") && xmlElem->Attribute("maxSideAndBackSpeed") && xmlElem->Attribute("maxRotation") && xmlElem->Attribute("transAcc") && xmlElem->Attribute("rotAcc") && xmlElem->Attribute("transDamp") && xmlElem->Attribute("rotDamp"))
+        {
+
+            std::string msStr = xmlElem->Attribute("maxSpeed");
+            std::string msabsStr = xmlElem->Attribute("maxSideAndBackSpeed");
+            std::string mrStr = xmlElem->Attribute("maxRotation");
+            std::string taStr = xmlElem->Attribute("transAcc");
+            std::string raStr = xmlElem->Attribute("rotAcc");
+            std::string tdStr = xmlElem->Attribute("transDamp");
+            std::string rdStr = xmlElem->Attribute("rotDamp");
+
+            String2Number<float>(this->maxSpeed_, msStr);
+            String2Number<float>(this->maxSideAndBackSpeed_, msabsStr);
+            String2Number<float>(this->maxRotation_, mrStr);
+            String2Number<float>(this->translationAcceleration_, taStr);
+            String2Number<float>(this->rotationAcceleration_, raStr);
+            String2Number<float>(this->translationDamping_, tdStr);
+            String2Number<float>(this->rotationDamping_, rdStr);
+
+            this->maxRotationRadian_ = Radian(this->maxRotation_);
+            this->rotationAccelerationRadian_ = Radian(this->rotationAcceleration_);
+            this->rotationDampingRadian_ = Radian(this->rotationDamping_);
+
+            COUT(4) << "Loader: Initialized SpaceShip" << std::endl;
+    	}
+
+    	if (xmlElem->Attribute("camera"))
+    	{
+            Ogre::Camera *cam = Orxonox::getSingleton()->getSceneManager()->createCamera("ShipCam");
+            this->camNode_ = this->getNode()->createChildSceneNode("CamNode");
+/*
+//            node->setInheritOrientation(false);
+            cam->setPosition(Vector3(0,50,-150));
+            cam->lookAt(Vector3(0,20,0));
+            cam->roll(Degree(0));
+*/
+
+            cam->setPosition(Vector3(-200,0,35));
+//            cam->setPosition(Vector3(0,-350,0));
+            cam->lookAt(Vector3(0,0,35));
+            cam->roll(Degree(-90));
+
+            this->camNode_->attachObject(cam);
+            Orxonox::getSingleton()->getOgrePointer()->getRoot()->getAutoCreatedWindow()->addViewport(cam);
+    	}
+    }
+
+    int sgn(float x)
+    {
+        if (x >= 0)
+            return 1;
+        else
+            return -1;
+    }
+
+    bool SpaceShip::mouseMoved(const OIS::MouseEvent &e)
+    {
+/*
+        this->mouseX += e.state.X.rel;
+        if (this->bInvertMouse_)
+            this->mouseY += e.state.Y.rel;
+        else
+            this->mouseY -= e.state.Y.rel;
+
+//        if(mouseX>maxMouseX) maxMouseX = mouseX;
+//        if(mouseX<minMouseX) minMouseX = mouseX;
+//        cout << "mouseX: " << mouseX << "\tmouseY: " << mouseY << endl;
+
+        this->moved = true;
+*/
+        if (this->bRMousePressed_)
+        {
+            this->camNode_->roll(Degree(-e.state.X.rel * 0.10));
+            this->camNode_->yaw(Degree(e.state.Y.rel * 0.10));
+        }
+        else
+        {
+            float minDimension = e.state.height;
+            if (e.state.width < minDimension)
+                minDimension = e.state.width;
+
+            this->mouseX_ += e.state.X.rel;
+            if (this->mouseX_ < -minDimension)
+                this->mouseX_ = -minDimension;
+            if (this->mouseX_ > minDimension)
+                this->mouseX_ = minDimension;
+
+            this->mouseY_ += e.state.Y.rel;
+            if (this->mouseY_ < -minDimension)
+                this->mouseY_ = -minDimension;
+            if (this->mouseY_ > minDimension)
+                this->mouseY_ = minDimension;
+
+            float xRotation = this->mouseX_ / minDimension;
+            xRotation = xRotation*xRotation * sgn(xRotation);
+            xRotation *= -this->rotationAcceleration_;
+            if (xRotation > this->maxRotation_)
+                xRotation = this->maxRotation_;
+            if (xRotation < -this->maxRotation_)
+                xRotation = -this->maxRotation_;
+            this->mouseXRotation_ = Radian(xRotation);
+
+            float yRotation = this->mouseY_ / minDimension;
+            yRotation = yRotation*yRotation * sgn(yRotation);
+            yRotation *= this->rotationAcceleration_;
+            if (yRotation > this->maxRotation_)
+                yRotation = this->maxRotation_;
+            if (yRotation < -this->maxRotation_)
+                yRotation = -this->maxRotation_;
+            this->mouseYRotation_ = Radian(yRotation);
+        }
+
+        return true;
+    }
+
+    bool SpaceShip::mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+    {
+        if (id == OIS::MB_Left)
+            this->bLMousePressed_ = true;
+        else if (id == OIS::MB_Right)
+            this->bRMousePressed_ = true;
+
+        return true;
+    }
+
+    bool SpaceShip::mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id)
+    {
+        if (id == OIS::MB_Left)
+            this->bLMousePressed_ = false;
+        else if (id == OIS::MB_Right)
+        {
+            this->bRMousePressed_ = false;
+            this->camNode_->resetOrientation();
+        }
+
+        return true;
+    }
+
+    void SpaceShip::tick(float dt)
+    {
+        if (!this->setMouseEventCallback_)
+        {
+            if (Orxonox::getSingleton()->getMouse())
+            {
+                Orxonox::getSingleton()->getMouse()->setEventCallback(this);
+                this->setMouseEventCallback_ = true;
+            }
+        }
+
+        if (this->redNode_ && this->greenNode_)
+        {
+            this->blinkTime_ += dt;
+            float redScale = 0.15 + 0.15 * sin(this->blinkTime_ * 10.0);
+            float greenScale = 0.15 - 0.15 * sin(this->blinkTime_ * 10.0);
+            this->redNode_->setScale(redScale, redScale, redScale);
+            this->greenNode_->setScale(greenScale, greenScale, greenScale);
+        }
+
+        if (this->timeToReload_ > 0)
+            this->timeToReload_ -= dt;
+        else
+            this->timeToReload_ = 0;
+
+        if (this->bLMousePressed_ && this->timeToReload_ <= 0)
+        {
+            new Projectile(this);
+            this->timeToReload_ = this->reloadTime_;
+        }
+
+        OIS::Keyboard* mKeyboard = Orxonox::getSingleton()->getKeyboard();
+        OIS::Mouse* mMouse = Orxonox::getSingleton()->getMouse();
+
+        mKeyboard->capture();
+        mMouse->capture();
+
+
+        // #####################################
+        // ############# STEERING ##############
+        // #####################################
+
+        if (this->velocity_.x > this->maxSpeed_)
+            this->velocity_.x = this->maxSpeed_;
+        if (this->velocity_.x < -this->maxSideAndBackSpeed_)
+            this->velocity_.x = -this->maxSideAndBackSpeed_;
+        if (this->velocity_.y > this->maxSideAndBackSpeed_)
+            this->velocity_.y = this->maxSideAndBackSpeed_;
+        if (this->velocity_.y < -this->maxSideAndBackSpeed_)
+            this->velocity_.y = -this->maxSideAndBackSpeed_;
+        if (this->rotationRate_ > this->maxRotationRadian_)
+            this->rotationRate_ = this->maxRotationRadian_;
+        if (this->rotationRate_ < -this->maxRotationRadian_)
+            this->rotationRate_ = -this->maxRotationRadian_;
+
+        if (this->acceleration_.x == 0)
+        {
+            if (this->velocity_.x > 0)
+            {
+                this->velocity_.x -= (this->translationDamping_ * dt);
+                if (this->velocity_.x < 0)
+                    this->velocity_.x = 0;
+            }
+            else if (this->velocity_.x < 0)
+            {
+                this->velocity_.x += (this->translationDamping_ * dt);
+                if (this->velocity_.x > 0)
+                    this->velocity_.x = 0;
+            }
+        }
+
+        if (this->acceleration_.y == 0)
+        {
+            if (this->velocity_.y > 0)
+            {
+                this->velocity_.y -= (this->translationDamping_ * dt);
+                if (this->velocity_.y < 0)
+                    this->velocity_.y = 0;
+            }
+            else if (this->velocity_.y < 0)
+            {
+                this->velocity_.y += (this->translationDamping_ * dt);
+                if (this->velocity_.y > 0)
+                    this->velocity_.y = 0;
+            }
+        }
+
+        if (this->momentum_ == this->zeroRadian_)
+        {
+            if (this->rotationRate_ > this->zeroRadian_)
+            {
+                this->rotationRate_ -= (this->rotationDampingRadian_ * dt);
+                if (this->rotationRate_ < this->zeroRadian_)
+                    this->rotationRate_ = 0;
+            }
+            else if (this->rotationRate_ < this->zeroRadian_)
+            {
+                this->rotationRate_ += (this->rotationDampingRadian_ * dt);
+                if (this->rotationRate_ > this->zeroRadian_)
+                    this->rotationRate_ = 0;
+            }
+        }
+
+        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+            this->acceleration_.x = this->translationAcceleration_;
+        else if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+            this->acceleration_.x = -this->translationAcceleration_;
+        else
+            this->acceleration_.x = 0;
+
+        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+            this->acceleration_.y = -this->translationAcceleration_;
+        else if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+            this->acceleration_.y = this->translationAcceleration_;
+        else
+            this->acceleration_.y = 0;
+
+        if (mKeyboard->isKeyDown(OIS::KC_DELETE) || mKeyboard->isKeyDown(OIS::KC_Q))
+            this->momentum_ = Radian(-this->rotationAccelerationRadian_);
+        else if (mKeyboard->isKeyDown(OIS::KC_PGDOWN) || mKeyboard->isKeyDown(OIS::KC_E))
+            this->momentum_ = Radian(this->rotationAccelerationRadian_);
+        else
+            this->momentum_ = 0;
+
+        WorldEntity::tick(dt);
+
+        this->roll(this->mouseXRotation_ * dt);
+        if (this->bInvertYAxis_)
+            this->yaw(Radian(-this->mouseYRotation_ * dt));
+        else
+            this->yaw(Radian(this->mouseYRotation_ * dt));
+
+        if (this->acceleration_.x > 0)
+            this->tt_->setRate(emitterRate_);
+        else
+            this->tt_->setRate(0);
+
+/*
+        if (mKeyboard->isKeyDown(OIS::KC_UP) || mKeyboard->isKeyDown(OIS::KC_W))
+            this->moveForward(speed);
+        else
+            this->moveForward(0);
+
+        if(mKeyboard->isKeyDown(OIS::KC_DOWN) || mKeyboard->isKeyDown(OIS::KC_S))
+            this->brakeForward(speed);
+        else
+            this->brakeForward(speed/10);
+
+        if (mKeyboard->isKeyDown(OIS::KC_RIGHT) || mKeyboard->isKeyDown(OIS::KC_D))
+            this->loopRight(loop);
+        else
+            this->loopRight(0);
+
+        if (mKeyboard->isKeyDown(OIS::KC_LEFT) || mKeyboard->isKeyDown(OIS::KC_A))
+            this->loopLeft(loop);
+        else
+            this->loopLeft(0);
+
+        if(moved)
+        {
+            if (mouseY<=0)
+                this->rotateUp(-mouseY*rotate);
+            if (mouseY>0)
+                this->rotateDown(mouseY*rotate);
+            if (mouseX>0)
+                this->rotateRight(mouseX*rotate);
+            if (mouseX<=0)
+                this->rotateLeft(-mouseX*rotate);
+
+            mouseY = 0;
+            mouseX = 0;
+            moved = false;
+        }*/
+/*        else
+        {
+            this->rotateUp(0);
+            this->rotateDown(0);
+            this->rotateRight(0);
+            this->rotateLeft(0);
+        }*/
+/*
+        if(moveForward_ > 0)
+        {
+            accelerationForward_ = moveForward_;
+            if(speedForward_ < maxSpeedForward_)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ > maxSpeedForward_)
+                speedForward_ = maxSpeedForward_;
+        }
+
+        if(moveForward_ <= 0)
+        {
+            accelerationForward_ = -brakeForward_;
+            if(speedForward_ > 0)
+                speedForward_ += accelerationForward_*dt;
+            if(speedForward_ < 0)
+                speedForward_ = 0;
+        }
+
+        if(rotateUp_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateUp_;
+            if(speedRotateUpDown_ < maxSpeedRotateUpDown_)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ > maxSpeedRotateUpDown_)
+            speedRotateUpDown_ = maxSpeedRotateUpDown_;
+        }
+
+        if(rotateDown_ > 0)
+        {
+            accelerationRotateUpDown_ = rotateDown_;
+            if(speedRotateUpDown_ > -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < -maxSpeedRotateUpDown_)
+                speedRotateUpDown_ = -maxSpeedRotateUpDown_;
+        }
+
+        if(rotateUp_ == 0 && rotateDown_ == 0)
+        {
+            accelerationRotateUpDown_ = brakeRotate_;
+            if(speedRotateUpDown_ > 0)
+                speedRotateUpDown_ -= accelerationRotateUpDown_*dt;
+            if(speedRotateUpDown_ < 0)
+                speedRotateUpDown_ += accelerationRotateUpDown_*dt;
+            if(fabs(speedRotateUpDown_) < accelerationRotateUpDown_*dt)
+                speedRotateUpDown_ = 0;
+        }
+
+        if(rotateRight_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateRight_;
+            if(speedRotateRightLeft_ > -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < -maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = -maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateLeft_ > 0)
+        {
+            accelerationRotateRightLeft_ = rotateLeft_;
+            if(speedRotateRightLeft_ < maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ > maxSpeedRotateRightLeft_)
+                speedRotateRightLeft_ = maxSpeedRotateRightLeft_;
+        }
+
+        if(rotateRight_ == 0 && rotateLeft_ == 0)
+        {
+            accelerationRotateRightLeft_ = brakeRotate_;
+            if(speedRotateRightLeft_ > 0)
+                speedRotateRightLeft_ -= accelerationRotateRightLeft_*dt;
+            if(speedRotateRightLeft_ < 0)
+                speedRotateRightLeft_ += accelerationRotateRightLeft_*dt;
+            if(fabs(speedRotateRightLeft_) < accelerationRotateRightLeft_*dt)
+                speedRotateRightLeft_ = 0;
+        }
+
+        if(loopRight_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopRight_;
+            if(speedLoopRightLeft_ < maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ > maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ > 0)
+        {
+            accelerationLoopRightLeft_ = loopLeft_;
+            if(speedLoopRightLeft_ > -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < -maxSpeedLoopRightLeft_)
+                speedLoopRightLeft_ = -maxSpeedLoopRightLeft_;
+        }
+
+        if(loopLeft_ == 0 && loopRight_ == 0)
+        {
+            accelerationLoopRightLeft_ = brakeLoop_;
+            if(speedLoopRightLeft_ > 0)
+                speedLoopRightLeft_ -= accelerationLoopRightLeft_*dt;
+            if(speedLoopRightLeft_ < 0)
+                speedLoopRightLeft_ += accelerationLoopRightLeft_*dt;
+            if(fabs(speedLoopRightLeft_) < accelerationLoopRightLeft_*dt)
+                speedLoopRightLeft_ = 0;
+        }
+
+        Vector3 transVector = Vector3::ZERO;
+*/
+/*
+        transVector.z = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+*/
+/*
+        transVector.x = 1;
+        this->translate(transVector*speedForward_*dt, Ogre::Node::TS_LOCAL);
+        this->yaw(Degree(speedRotateUpDown_*dt), Ogre::Node::TS_LOCAL);
+        this->roll(Degree(speedRotateRightLeft_*dt), Ogre::Node::TS_LOCAL);
+        this->pitch(Degree(speedLoopRightLeft_*dt), Ogre::Node::TS_LOCAL);
+*/
+    }
+/*
+    void SpaceShip::moveForward(float moveForward) {
+        moveForward_ = moveForward;
+    }
+
+    void SpaceShip::rotateUp(float rotateUp) {
+        rotateUp_ = rotateUp;
+    }
+
+    void SpaceShip::rotateDown(float rotateDown) {
+        rotateDown_ = rotateDown;
+    }
+
+    void SpaceShip::rotateLeft(float rotateLeft) {
+        rotateLeft_ = rotateLeft;
+    }
+
+    void SpaceShip::rotateRight(float rotateRight) {
+        rotateRight_ = rotateRight;
+    }
+
+    void SpaceShip::loopLeft(float loopLeft) {
+        loopLeft_ = loopLeft;
+    }
+
+    void SpaceShip::loopRight(float loopRight) {
+        loopRight_ = loopRight;
+    }
+
+    void SpaceShip::brakeForward(float brakeForward) {
+        brakeForward_ = brakeForward;
+    }
+
+    void SpaceShip::brakeRotate(float brakeRotate) {
+        brakeRotate_ = brakeRotate;
+    }
+
+    void SpaceShip::brakeLoop(float brakeLoop) {
+        brakeLoop_ = brakeLoop;
+    }
+
+    void SpaceShip::maxSpeedForward(float maxSpeedForward) {
+        maxSpeedForward_ = maxSpeedForward;
+    }
+
+    void SpaceShip::maxSpeedRotateUpDown(float maxSpeedRotateUpDown) {
+        maxSpeedRotateUpDown_ = maxSpeedRotateUpDown;
+    }
+
+    void SpaceShip::maxSpeedRotateRightLeft(float maxSpeedRotateRightLeft) {
+        maxSpeedRotateRightLeft_ = maxSpeedRotateRightLeft;
+    }
+
+    void SpaceShip::maxSpeedLoopRightLeft(float maxSpeedLoopRightLeft) {
+        maxSpeedLoopRightLeft_ = maxSpeedLoopRightLeft;
+    }
+*/
+}
Index: /code/branches/network/src/orxonox/objects/SpaceShip.h
===================================================================
--- /code/branches/network/src/orxonox/objects/SpaceShip.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/SpaceShip.h	(revision 861)
@@ -0,0 +1,80 @@
+#ifndef _SpaceShip_H__
+#define _SpaceShip_H__
+
+#include <OgrePrerequisites.h>
+#include <OIS/OISMouse.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "Model.h"
+#include "../tools/BillboardSet.h"
+
+class TiXmlElement;          // Forward declaration
+
+namespace orxonox
+{
+    class ParticleInterface; // Forward declaration
+
+    class _OrxonoxExport SpaceShip : public Model, public OIS::MouseListener
+    {
+        public:
+            SpaceShip();
+            ~SpaceShip();
+            void setConfigValues();
+            virtual void loadParams(TiXmlElement* xmlElem);
+            virtual void tick(float dt);
+
+            bool mouseMoved(const OIS::MouseEvent &e);
+            bool mousePressed(const OIS::MouseEvent &e, OIS::MouseButtonID id);
+            bool mouseReleased(const OIS::MouseEvent &e, OIS::MouseButtonID id);
+
+
+        private:
+            Vector3 testvector_;
+            bool bInvertYAxis_;
+            bool setMouseEventCallback_;
+            bool bLMousePressed_;
+            bool bRMousePressed_;
+
+            Ogre::SceneNode* camNode_;
+
+            ParticleInterface* tt_;
+
+            BillboardSet redBillboard_;
+            BillboardSet greenBillboard_;
+            Ogre::SceneNode* redNode_;
+            Ogre::SceneNode* greenNode_;
+            float blinkTime_;
+
+            BillboardSet crosshairNear_;
+            BillboardSet crosshairFar_;
+            Ogre::SceneNode* chNearNode_;
+            Ogre::SceneNode* chFarNode_;
+
+            float timeToReload_;
+            float reloadTime_;
+
+            float maxSideAndBackSpeed_;
+            float maxSpeed_;
+            float maxRotation_;
+            float translationAcceleration_;
+            float rotationAcceleration_;
+            float translationDamping_;
+            float rotationDamping_;
+
+            Radian maxRotationRadian_;
+            Radian rotationAccelerationRadian_;
+            Radian rotationDampingRadian_;
+            Radian zeroRadian_;
+            Radian mouseXRotation_;
+            Radian mouseYRotation_;
+
+            float mouseX_;
+            float mouseY_;
+
+            int emitterRate_;
+    };
+    ExportClass(SpaceShip, Orxonox);
+}
+
+#endif /* _SpaceShip_H__ */
Index: /code/branches/network/src/orxonox/objects/SpaceshipSteeringObject.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/SpaceshipSteeringObject.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/SpaceshipSteeringObject.cc	(revision 861)
@@ -0,0 +1,92 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      ...
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+#include <OgreRoot.h>
+#include <OgreRenderWindow.h>
+
+#include <string>
+
+#include "../Orxonox.h"
+#include "../GraphicsEngine.h"
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "../core/Debug.h"
+
+#include "SpaceshipSteeringObject.h"
+
+#include "../SpaceshipSteering.h"
+
+namespace orxonox
+{
+    CreateFactory(SpaceshipSteeringObject);
+
+    SpaceshipSteeringObject::SpaceshipSteeringObject()
+    {
+        RegisterObject(SpaceshipSteeringObject);
+    }
+
+    SpaceshipSteeringObject::~SpaceshipSteeringObject()
+    {
+    }
+
+    void SpaceshipSteeringObject::loadParams(TiXmlElement* xmlElem)
+    {
+      SpaceshipSteering* steering = orxonox::Orxonox::getSingleton()->getSteeringPointer();
+
+      if (xmlElem->Attribute("node") && xmlElem->Attribute("forward") && xmlElem->Attribute("rotateupdown") && xmlElem->Attribute("rotaterightleft") && xmlElem->Attribute("looprightleft"))
+      {
+        std::string nodeStr = xmlElem->Attribute("node");
+        std::string forwardStr = xmlElem->Attribute("forward");
+        std::string rotateupdownStr = xmlElem->Attribute("rotateupdown");
+        std::string rotaterightleftStr = xmlElem->Attribute("rotaterightleft");
+        std::string looprightleftStr = xmlElem->Attribute("looprightleft");
+
+        float forward, rotateupdown, rotaterightleft, looprightleft;
+        String2Number<float>(forward, forwardStr);
+        String2Number<float>(rotateupdown, rotateupdownStr);
+        String2Number<float>(rotaterightleft, rotaterightleftStr);
+        String2Number<float>(looprightleft, looprightleftStr);
+
+        steering = new SpaceshipSteering(forward, rotateupdown, rotaterightleft, looprightleft);
+
+        Ogre::SceneManager* mgr = orxonox::Orxonox::getSingleton()->getSceneManager();
+        Ogre::SceneNode* sceneNode = (Ogre::SceneNode*)mgr->getRootSceneNode()->getChild(nodeStr);
+
+        steering->addNode(sceneNode);
+
+
+
+
+        COUT(4) << "Loader: Initialized spaceship steering at node " << nodeStr << " values "<< forward << " " << rotateupdown << " "<< rotaterightleft << " "<< looprightleft << " "<< std::endl << std::endl;
+      }
+   }
+}
Index: /code/branches/network/src/orxonox/objects/SpaceshipSteeringObject.h
===================================================================
--- /code/branches/network/src/orxonox/objects/SpaceshipSteeringObject.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/SpaceshipSteeringObject.h	(revision 861)
@@ -0,0 +1,24 @@
+#ifndef _OBJECT_SPACESHIPSTEERING_H__
+#define _OBJECT_SPACESHIPSTEERING_H__
+
+#include "core/BaseObject.h"
+#include "util/tinyxml/tinyxml.h"
+
+namespace orxonox
+{
+    class SpaceshipSteeringObject : public BaseObject
+    {
+        public:
+            SpaceshipSteeringObject();
+            virtual ~SpaceshipSteeringObject();
+
+
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+
+
+    };
+}
+
+#endif
Index: /code/branches/network/src/orxonox/objects/Test.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Test.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Test.h	(revision 861)
@@ -0,0 +1,176 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#ifndef _Test_H__
+#define _Test_H__
+
+#include "core/BaseObject.h"
+#include "../core/CoreIncludes.h"
+
+namespace orxonox
+{
+    class Interface1 : virtual public OrxonoxClass
+    {
+        protected:
+            Interface1() { RegisterRootObject(Interface1); }
+    };
+
+    class Interface2 : virtual public OrxonoxClass
+    {
+        protected:
+            Interface2() { RegisterRootObject(Interface2); }
+    };
+
+    class A1 : public BaseObject
+    {
+        public:
+            A1() { RegisterObject(A1); }
+    };
+
+    class A2 : public BaseObject
+    {
+        public:
+            A2() { RegisterObject(A2); }
+    };
+
+    class A3: public BaseObject, public Interface1
+    {
+        public:
+            A3() { RegisterObject(A3); }
+    };
+
+    class A1B1 : public A1
+    {
+        public:
+            A1B1() { RegisterObject(A1B1); }
+    };
+
+    class A1B2 : public A1
+    {
+        public:
+            A1B2() { RegisterObject(A1B2); }
+    };
+
+    class A2B1 : public A2
+    {
+        public:
+            A2B1() { RegisterObject(A2B1); }
+    };
+
+    class A2B2 : public A2, Interface1
+    {
+        public:
+            A2B2() { RegisterObject(A2B2); }
+    };
+
+    class A3B1 : public A3
+    {
+        public:
+            A3B1() { RegisterObject(A3B1); }
+    };
+
+    class A3B2 : public A3, Interface2
+    {
+        public:
+            A3B2() { RegisterObject(A3B2); }
+    };
+
+    class A1B1C1 : public A1B1
+    {
+        public:
+            A1B1C1() { RegisterObject(A1B1C1); }
+    };
+
+    class A1B1C2 : public A1B1
+    {
+        public:
+            A1B1C2() { RegisterObject(A1B1C2); }
+    };
+
+    class A1B2C1 : public A1B2
+    {
+        public:
+            A1B2C1() { RegisterObject(A1B2C1); }
+    };
+
+    class A2B1C1 : public A2B1, Interface2
+    {
+        public:
+            A2B1C1() { RegisterObject(A2B1C1); }
+    };
+
+    class A2B2C1 : public A2B2
+    {
+        public:
+            A2B2C1() { RegisterObject(A2B2C1); }
+    };
+
+    class A3B1C1 : public A3B1
+    {
+        public:
+            A3B1C1() { RegisterObject(A3B1C1); }
+    };
+
+    class A3B1C2 : public A3B1, Interface2
+    {
+        public:
+            A3B1C2() { RegisterObject(A3B1C2); }
+    };
+
+    class A3B2C1 : public A3B2
+    {
+        public:
+            A3B2C1() { RegisterObject(A3B2C1); }
+    };
+
+    class A3B2C2 : public A3B2
+    {
+        public:
+            A3B2C2() { RegisterObject(A3B2C2); }
+    };
+
+    CreateFactory(A1);
+    CreateFactory(A2);
+    CreateFactory(A3);
+    CreateFactory(A1B1);
+    CreateFactory(A1B2);
+    CreateFactory(A2B1);
+    CreateFactory(A2B2);
+    CreateFactory(A3B1);
+    CreateFactory(A3B2);
+    CreateFactory(A1B1C1);
+    CreateFactory(A1B1C2);
+    CreateFactory(A1B2C1);
+    CreateFactory(A2B1C1);
+    CreateFactory(A2B2C1);
+    CreateFactory(A3B1C1);
+    CreateFactory(A3B1C2);
+    CreateFactory(A3B2C1);
+    CreateFactory(A3B2C2);
+}
+
+#endif
Index: /code/branches/network/src/orxonox/objects/Tickable.h
===================================================================
--- /code/branches/network/src/orxonox/objects/Tickable.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/Tickable.h	(revision 861)
@@ -0,0 +1,87 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Tickable.h
+    @brief Definition of the Tickable interface.
+
+    The Tickable interface provides a tick(dt) function, that gets called every frame.
+    float dt is the time since the last frame in seconds.
+
+    Attention:
+    Classes derived from a Tickable that want to have a tick(dt) function on their part, MUST call the
+    parent::tick(dt) function explicit in their implementation of tick(dt) because it's a virtual function.
+*/
+
+#ifndef _Tickable_H__
+#define _Tickable_H__
+
+#include <OgreFrameListener.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "../core/CoreIncludes.h"
+
+namespace orxonox
+{
+    class TickFrameListener; // Forward declaration
+
+    //! The Tickable interface provides a tick(dt) function, that gets called every frame.
+    class _OrxonoxExport Tickable : virtual public OrxonoxClass
+    {
+        public:
+            /**
+                @brief Gets called every frame.
+                @param dt The time since the last frame in seconds
+            */
+            virtual void tick(float dt) = 0;
+
+        protected:
+            /**
+                @brief Constructor: Registers the object in the Tickable-list
+            */
+            Tickable() { RegisterRootObject(Tickable); }
+    };
+    ExportAbstractClass(Tickable, Orxonox);
+
+    //! The TickFrameListener calls the tick(dt) function of all Tickables every frame.
+    class _OrxonoxExport TickFrameListener : public Ogre::FrameListener
+    {
+        private:
+            /** @brief Gets called before a frame gets rendered. */
+            bool frameStarted(const Ogre::FrameEvent &evt)
+            {
+                // Iterate through all Tickables and call their tick(dt) function
+                for (Iterator<Tickable> it = ObjectList<Tickable>::start(); it; )
+                    (it++)->tick(evt.timeSinceLastFrame);
+
+                return FrameListener::frameStarted(evt);
+            }
+    };
+}
+
+#endif /* _Tickable_H__ */
Index: /code/branches/network/src/orxonox/objects/WorldEntity.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/WorldEntity.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/WorldEntity.cc	(revision 861)
@@ -0,0 +1,185 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <string>
+#include <sstream>
+
+#include "util/tinyxml/tinyxml.h"
+#include "util/Tokenizer.h"
+#include "util/String2Number.h"
+#include "../core/CoreIncludes.h"
+#include "../Orxonox.h"
+#include "WorldEntity.h"
+
+namespace orxonox
+{
+    CreateFactory(WorldEntity);
+
+    unsigned int WorldEntity::worldEntityCounter_s = 0;
+
+    WorldEntity::WorldEntity()
+    {
+        RegisterObject(WorldEntity);
+
+        if (Orxonox::getSingleton()->getSceneManager())
+        {
+            std::ostringstream name;
+            name << (WorldEntity::worldEntityCounter_s++);
+            this->setName("WorldEntity" + name.str());
+            this->node_ = Orxonox::getSingleton()->getSceneManager()->getRootSceneNode()->createChildSceneNode(this->getName());
+        }
+        else
+        {
+            this->node_ = 0;
+        }
+
+        this->bStatic_ = true;
+        this->velocity_ = Vector3(0, 0, 0);
+        this->acceleration_ = Vector3(0, 0, 0);
+        this->rotationAxis_ = Vector3(0, 1, 0);
+        this->rotationRate_ = 0;
+        this->momentum_ = 0;
+    }
+
+    WorldEntity::~WorldEntity()
+    {
+    }
+
+    void WorldEntity::tick(float dt)
+    {
+        if (!this->bStatic_)
+        {
+            this->velocity_ += (dt * this->acceleration_);
+            this->translate(dt * this->velocity_, Ogre::Node::TS_LOCAL);
+
+            this->rotationRate_ += (dt * this->momentum_);
+            this->rotate(this->rotationAxis_, dt * this->rotationRate_);
+        }
+    }
+
+    void WorldEntity::loadParams(TiXmlElement* xmlElem)
+    {
+        BaseObject::loadParams(xmlElem);
+
+        if (xmlElem->Attribute("position"))
+        {
+            std::vector<std::string> pos = tokenize(xmlElem->Attribute("position"),",");
+            float x, y, z;
+            String2Number<float>(x, pos[0]);
+            String2Number<float>(y, pos[1]);
+            String2Number<float>(z, pos[2]);
+            this->setPosition(x, y, z);
+        }
+
+        if (xmlElem->Attribute("direction"))
+        {
+            std::vector<std::string> pos = tokenize(xmlElem->Attribute("direction"),",");
+            float x, y, z;
+            String2Number<float>(x, pos[0]);
+            String2Number<float>(y, pos[1]);
+            String2Number<float>(z, pos[2]);
+            this->setDirection(x, y, z);
+        }
+
+        if (xmlElem->Attribute("yaw") || xmlElem->Attribute("pitch") || xmlElem->Attribute("roll"))
+        {
+            float yaw = 0.0, pitch = 0.0, roll = 0.0;
+            if (xmlElem->Attribute("yaw"))
+                String2Number<float>(yaw,xmlElem->Attribute("yaw"));
+
+            if (xmlElem->Attribute("pitch"))
+                String2Number<float>(pitch,xmlElem->Attribute("pitch"));
+
+            if (xmlElem->Attribute("roll"))
+                String2Number<float>(roll,xmlElem->Attribute("roll"));
+
+            this->yaw(Degree(yaw));
+            this->pitch(Degree(pitch));
+            this->roll(Degree(roll));
+        }
+
+        if (xmlElem->Attribute("scale"))
+        {
+            std::string scaleStr = xmlElem->Attribute("scale");
+            float scale;
+            String2Number<float>(scale, scaleStr);
+            this->setScale(scale);
+        }
+
+        if (xmlElem->Attribute("rotationAxis"))
+        {
+            std::vector<std::string> pos = tokenize(xmlElem->Attribute("rotationAxis"),",");
+            float x, y, z;
+            String2Number<float>(x, pos[0]);
+            String2Number<float>(y, pos[1]);
+            String2Number<float>(z, pos[2]);
+            this->setRotationAxis(x, y, z);
+        }
+
+        if (xmlElem->Attribute("rotationRate"))
+        {
+            float rotationRate;
+            String2Number<float>(rotationRate, xmlElem->Attribute("rotationRate"));
+            this->setRotationRate(Degree(rotationRate));
+            if (rotationRate != 0)
+                this->setStatic(false);
+        }
+
+        create();
+
+    }
+
+    bool WorldEntity::create(){
+      registerAllVariables();
+      return true;
+    }
+
+    void WorldEntity::registerAllVariables()
+    {
+      // register coordinates
+      registerVar( (void*) &(this->getPosition().x), sizeof(this->getPosition().x), network::DATA);
+      registerVar( (void*) &(this->getPosition().y), sizeof(this->getPosition().y), network::DATA);
+      registerVar( (void*) &(this->getPosition().z), sizeof(this->getPosition().z), network::DATA);
+      // register orientation
+      registerVar( (void*) &(this->getOrientation().w), sizeof(this->getOrientation().w), network::DATA);
+      registerVar( (void*) &(this->getOrientation().x), sizeof(this->getOrientation().x), network::DATA);
+      registerVar( (void*) &(this->getOrientation().y), sizeof(this->getOrientation().y), network::DATA);
+      registerVar( (void*) &(this->getOrientation().z), sizeof(this->getOrientation().z), network::DATA);
+      // not needed at the moment, because we don't have prediction yet
+      /*// register velocity_
+      registerVar( (void*) &(this->getVelocity().x), sizeof(this->getVelocity().x), network::DATA);
+      registerVar( (void*) &(this->getVelocity().y), sizeof(this->getVelocity().y), network::DATA);
+      registerVar( (void*) &(this->getVelocity().z), sizeof(this->getVelocity().z), network::DATA);
+      // register rotationAxis/rate
+      registerVar( (void*) &(this->getRotationRate()), sizeof(this->getRotationRate()), network::DATA);
+      registerVar( (void*) &(this->getRotationAxis().x), sizeof(this->getRotationAxis().x), network::DATA);
+      registerVar( (void*) &(this->getRotationAxis().y), sizeof(this->getRotationAxis().y), network::DATA);
+      registerVar( (void*) &(this->getRotationAxis().z), sizeof(this->getRotationAxis().z), network::DATA);*/
+    }
+}
Index: /code/branches/network/src/orxonox/objects/WorldEntity.h
===================================================================
--- /code/branches/network/src/orxonox/objects/WorldEntity.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/WorldEntity.h	(revision 861)
@@ -0,0 +1,152 @@
+#ifndef _WorldEntity_H__
+#define _WorldEntity_H__
+
+#include <OgreSceneManager.h>
+#include <OgreSceneNode.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+#include "network/Synchronisable.h"
+#include "util/tinyxml/tinyxml.h"
+#include "../core/CoreIncludes.h"
+#include "core/BaseObject.h"
+#include "Tickable.h"
+#include "../tools/Mesh.h"
+
+namespace orxonox
+{
+  class _OrxonoxExport WorldEntity : public BaseObject, public Tickable, public network::Synchronisable
+  {
+    public:
+      WorldEntity();
+      virtual ~WorldEntity();
+
+      virtual void tick(float dt);
+      virtual void loadParams(TiXmlElement* xmlElem);
+      bool create();
+
+      inline Ogre::SceneNode* getNode()
+          { return this->node_; }
+
+      inline void setNode(Ogre::SceneNode* node)
+          { this->node_ = node; }
+
+      inline void setPosition(const Vector3& pos)
+          { this->node_->setPosition(pos); }
+      inline void setPosition(Real x, Real y, Real z)
+          { this->node_->setPosition(x, y, z); }
+      inline const Vector3& getPosition() const
+          { return this->node_->getPosition(); }
+
+      inline void translate(const Vector3 &d, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(d, relativeTo); }
+      inline void translate(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(x, y, z, relativeTo); }
+      inline void translate(const Matrix3 &axes, const Vector3 &move, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(axes, move, relativeTo); }
+      inline void translate(const Matrix3 &axes, Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_PARENT)
+          { this->node_->translate(axes, x, y, z, relativeTo); }
+
+      inline void yaw(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->yaw(angle, relativeTo); }
+      inline void pitch(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->pitch(angle, relativeTo); }
+      inline void roll(const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+          { this->node_->roll(angle, relativeTo); }
+
+      inline const Ogre::Quaternion& getOrientation()
+        { return this->node_->getOrientation(); }
+      inline void setOrientation(const Ogre::Quaternion& quat)
+        { this->node_->setOrientation(quat); }
+      inline void rotate(const Vector3 &axis, const Radian &angle, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL)
+        { this->node_->rotate(axis, angle, relativeTo); }
+      inline void setDirection(Real x, Real y, Real z, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+        { this->node_->setDirection(x, y, z, relativeTo, localDirectionVector); }
+      inline void setDirection(const Vector3 &vec, Ogre::Node::TransformSpace relativeTo=Ogre::Node::TS_LOCAL, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+        { this->node_->setDirection(vec, relativeTo, localDirectionVector); }
+      inline void lookAt(const Vector3 &targetPoint, Ogre::Node::TransformSpace relativeTo, const Vector3 &localDirectionVector=Vector3::NEGATIVE_UNIT_Z)
+        { this->node_->lookAt(targetPoint, relativeTo, localDirectionVector); }
+
+      inline void setScale(const Vector3 &scale)
+        { this->node_->setScale(scale); }
+      inline void setScale(Real x, Real y, Real z)
+        { this->node_->setScale(x, y, z); }
+      inline void setScale(Real scale)
+        { this->node_->setScale(scale, scale, scale); }
+      inline const Vector3& getScale(void) const
+        { return this->node_->getScale(); }
+      inline void scale(const Vector3 &scale)
+        { this->node_->scale(scale); }
+      inline void scale(Real x, Real y, Real z)
+        { this->node_->scale(x, y, z); }
+      inline void scale(Real scale)
+        { this->node_->scale(scale, scale, scale); }
+
+      inline void attachObject(Ogre::MovableObject *obj)
+        { this->node_->attachObject(obj); }
+      inline void attachObject(Mesh &mesh)
+        { this->node_->attachObject(mesh.getEntity()); }
+      inline void detachObject(Ogre::MovableObject *obj)
+        { this->node_->detachObject(obj); }
+      inline void detachAllObjects()
+        { this->node_->detachAllObjects(); }
+
+      inline void setVelocity(const Vector3& velocity)
+          { this->velocity_ = velocity; }
+      inline void setVelocity(Real x, Real y, Real z)
+          { this->velocity_.x = x; this->velocity_.y = y; this->velocity_.z = z; }
+      inline const Vector3& getVelocity() const
+          { return this->velocity_; }
+
+      inline void setAcceleration(const Vector3& acceleration)
+          { this->acceleration_ = acceleration; }
+      inline void setAcceleration(Real x, Real y, Real z)
+          { this->acceleration_.x = x; this->acceleration_.y = y; this->acceleration_.z = z; }
+      inline const Vector3& getAcceleration() const
+          { return this->acceleration_; }
+
+      inline void setRotationAxis(const Vector3& axis)
+          { this->rotationAxis_ = axis; }
+      inline void setRotationAxis(Real x, Real y, Real z)
+          { this->rotationAxis_.x = x; this->rotationAxis_.y = y; this->rotationAxis_.z = z; }
+      inline const Vector3& getRotationAxis() const
+          { return this->rotationAxis_; }
+
+      inline void setRotationRate(const Radian& angle)
+          { this->rotationRate_ = angle; }
+      inline void setRotationRate(const Degree& angle)
+          { this->rotationRate_ = angle; }
+      inline const Radian& getRotationRate() const
+          { return this->rotationRate_; }
+
+      inline void setMomentum(const Radian& angle)
+          { this->momentum_ = angle; }
+      inline void setMomentum(const Degree& angle)
+          { this->momentum_ = angle; }
+      inline const Radian& getMomentum() const
+          { return this->momentum_; }
+
+      inline void setStatic(bool bStatic)
+          { this->bStatic_ = bStatic; }
+      inline bool isStatic()
+          { return this->bStatic_; }
+
+    protected:
+      void registerAllVariables();
+
+      Vector3 velocity_;
+      Vector3 acceleration_;
+      Vector3 rotationAxis_;
+      Radian rotationRate_;
+      Radian momentum_;
+
+    private:
+      static unsigned int worldEntityCounter_s;
+      Ogre::SceneNode* node_;
+      bool bStatic_;
+  };
+  ExportClass(WorldEntity, Orxonox);
+}
+
+#endif /* _WorldEntity_H__ */
Index: /code/branches/network/src/orxonox/objects/test1.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/test1.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/test1.cc	(revision 861)
@@ -0,0 +1,105 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
+#include "util/tinyxml/tinyxml.h"
+#include "../Orxonox.h"
+#include <OgreSceneManager.h>
+
+namespace orxonox
+{
+    CreateFactory(Test1);
+
+    Test1::Test1()
+    {
+        RegisterObject(Test1);
+
+        this->usefullClass1_ = Class(Test1);
+        this->usefullClass2_ = Class(Test2);
+        this->usefullClass3_ = Class(Test3);
+    }
+
+    Test1::~Test1()
+    {
+    }
+
+    void Test1::tick(float dt)
+    {
+        std::cout << "Test1: " << this << std::endl;
+    }
+
+    bool Test1::usefullClass1isA(Identifier* identifier)
+    {
+        return this->usefullClass1_->isA(identifier);
+    }
+
+    bool Test1::usefullClass2isA(Identifier* identifier)
+    {
+        return this->usefullClass2_->isA(identifier);
+    }
+
+    bool Test1::usefullClass3isA(Identifier* identifier)
+    {
+        return this->usefullClass3_.isA(identifier);
+    }
+
+    void Test1::setUsefullClass1(Identifier* identifier)
+    {
+        std::cout << std::endl;
+        std::cout << "Test1: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test1: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test1: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
+        this->usefullClass1_ = identifier;
+    }
+
+    void Test1::setUsefullClass2(Identifier* identifier)
+    {
+        std::cout << std::endl;
+        std::cout << "Test1: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test1: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test1: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
+        this->usefullClass2_ = identifier;
+    }
+
+    void Test1::setUsefullClassOfTypeTest3(Identifier* identifier)
+    {
+        std::cout << std::endl;
+        std::cout << "Test1: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test1: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test1: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
+        this->usefullClass3_ = identifier;
+    }
+
+    void Test1::loadParams(TiXmlElement* xmlElem)
+    {
+
+
+
+    }
+}
Index: /code/branches/network/src/orxonox/objects/test1.h
===================================================================
--- /code/branches/network/src/orxonox/objects/test1.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/test1.h	(revision 861)
@@ -0,0 +1,36 @@
+#ifndef _Test1_H__
+#define _Test1_H__
+
+#include "core/BaseObject.h"
+#include "Tickable.h"
+#include "test3.h"
+#include "util/tinyxml/tinyxml.h"
+
+namespace orxonox
+{
+    class Test1 : public BaseObject, public Tickable
+    {
+        public:
+            Test1();
+            virtual ~Test1();
+
+            virtual void tick(float dt);
+
+            bool usefullClass1isA(Identifier* identifier);
+            bool usefullClass2isA(Identifier* identifier);
+            bool usefullClass3isA(Identifier* identifier);
+            void setUsefullClass1(Identifier* identifier);
+            void setUsefullClass2(Identifier* identifier);
+            void setUsefullClassOfTypeTest3(Identifier* identifier);
+
+            void loadParams(TiXmlElement* xmlElem);
+
+        private:
+            Identifier* usefullClass1_;
+            Identifier* usefullClass2_;
+            SubclassIdentifier<Test3> usefullClass3_;
+
+    };
+}
+
+#endif
Index: /code/branches/network/src/orxonox/objects/test2.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/test2.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/test2.cc	(revision 861)
@@ -0,0 +1,109 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
+
+namespace orxonox
+{
+    CreateFactory(Test2);
+
+    Test2::Test2()
+    {
+        RegisterObject(Test2);
+
+        this->usefullClass1_ = Class(Test1);
+        this->usefullClass2_ = Class(Test2);
+        this->usefullClass3_ = Class(Test3);
+
+        timer1.setTimer(1, true, this, &Test2::timerFunction1);
+        timer2.setTimer(5, true, this, &Test2::timerFunction2);
+        timer3.setTimer(10, false, this, &Test2::timerFunction3);
+    }
+
+    Test2::~Test2()
+    {
+    }
+
+    void Test2::timerFunction1()
+    {
+        std::cout << "Test2: 1 Sekunde" << std::endl;
+    }
+
+    void Test2::timerFunction2()
+    {
+        std::cout << "Test2: 5 Sekunden" << std::endl;
+    }
+
+    void Test2::timerFunction3()
+    {
+        std::cout << "Test2: 10 Sekunden sind um!" << std::endl;
+    }
+
+    bool Test2::usefullClass1isA(Identifier* identifier)
+    {
+        return this->usefullClass1_->isA(identifier);
+    }
+
+    bool Test2::usefullClass2isA(Identifier* identifier)
+    {
+        return this->usefullClass2_->isA(identifier);
+    }
+
+    bool Test2::usefullClass3isA(Identifier* identifier)
+    {
+        return this->usefullClass3_.isA(identifier);
+    }
+
+    void Test2::setUsefullClass1(Identifier* identifier)
+    {
+        std::cout << std::endl;
+        std::cout << "Test2: usefullClass1->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test2: usefullClass1->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test2: usefullClass1->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
+        this->usefullClass1_ = identifier;
+    }
+
+    void Test2::setUsefullClass2(Identifier* identifier)
+    {
+        std::cout << std::endl;
+        std::cout << "Test2: usefullClass2->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test2: usefullClass2->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test2: usefullClass2->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
+        this->usefullClass2_ = identifier;
+    }
+
+    void Test2::setUsefullClassOfTypeTest3(Identifier* identifier)
+    {
+        std::cout << std::endl;
+        std::cout << "Test2: usefullClass3->isA(Class(Test1)): " << identifier->isA(Class(Test1)) << std::endl;
+        std::cout << "Test2: usefullClass3->isA(Class(Test2)): " << identifier->isA(Class(Test2)) << std::endl;
+        std::cout << "Test2: usefullClass3->isA(Class(Test3)): " << identifier->isA(Class(Test3)) << std::endl;
+        this->usefullClass3_ = identifier;
+    }
+}
Index: /code/branches/network/src/orxonox/objects/test2.h
===================================================================
--- /code/branches/network/src/orxonox/objects/test2.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/test2.h	(revision 861)
@@ -0,0 +1,39 @@
+#ifndef _Test2_H__
+#define _Test2_H__
+
+#include "core/BaseObject.h"
+#include "../tools/Timer.h"
+
+namespace orxonox
+{
+    class Test3;
+
+    class Test2 : public BaseObject
+    {
+        public:
+            Test2();
+            virtual ~Test2();
+
+            bool usefullClass1isA(Identifier* identifier);
+            bool usefullClass2isA(Identifier* identifier);
+            bool usefullClass3isA(Identifier* identifier);
+            void setUsefullClass1(Identifier* identifier);
+            void setUsefullClass2(Identifier* identifier);
+            void setUsefullClassOfTypeTest3(Identifier* identifier);
+
+            void timerFunction1();
+            void timerFunction2();
+            void timerFunction3();
+
+        private:
+            Identifier* usefullClass1_;
+            Identifier* usefullClass2_;
+            SubclassIdentifier<Test3> usefullClass3_;
+
+            Timer<Test2> timer1;
+            Timer<Test2> timer2;
+            Timer<Test2> timer3;
+    };
+}
+
+#endif
Index: /code/branches/network/src/orxonox/objects/test3.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/test3.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/test3.cc	(revision 861)
@@ -0,0 +1,115 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "test1.h"
+#include "test2.h"
+#include "test3.h"
+
+namespace orxonox
+{
+    CreateFactory(Test3);
+
+    Test3::Test3()
+    {
+        RegisterObject(Test3);
+
+        this->setConfigValues();
+    }
+
+    void Test3::setConfigValues()
+    {
+        SetConfigValue(value_int_, 1);
+        SetConfigValue(value_uint_, 1);
+        SetConfigValue(value_char_, 1);
+        SetConfigValue(value_uchar_, 1);
+        SetConfigValue(value_float_, 1);
+        SetConfigValue(value_double_, 1);
+        SetConfigValue(value_bool_, 1);
+        SetConfigValue(value_string_, "This is a test");
+        SetConfigValue(value_constchar_, "This is another test");
+        SetConfigValue(value_vector2_, Vector2(101, 202));
+        SetConfigValue(value_vector3_, Vector3(13, 26, 39));
+        SetConfigValue(value_colourvalue_, ColourValue(1.0, 0.5, 0.25, 0.887));
+    }
+
+    Test3::~Test3()
+    {
+    }
+
+    void Test3::configOutput()
+    {
+        std::cout << this->value_int_ << std::endl;
+        std::cout << this->value_uint_ << std::endl;
+        std::cout << (int)this->value_char_ << std::endl;
+        std::cout << (int)this->value_uchar_ << std::endl;
+        std::cout << this->value_float_ << std::endl;
+        std::cout << this->value_double_ << std::endl;
+        std::cout << this->value_bool_ << std::endl;
+        std::cout << this->value_string_ << std::endl;
+        std::cout << this->value_constchar_ << std::endl;
+        std::cout << this->value_vector2_ << std::endl;
+        std::cout << this->value_vector3_ << std::endl;
+        std::cout << this->value_colourvalue_ << std::endl;
+    }
+
+    #define testandcout(code) \
+      std::cout << #code << " " << code << std::endl
+
+    void Test3::usefullClassesIsATest(Test1* test1)
+    {
+        std::cout << std::endl;
+        std::cout << "Test1:" << std::endl;
+        testandcout(test1->usefullClass1isA(Class(Test1)));
+        testandcout(test1->usefullClass1isA(Class(Test2)));
+        testandcout(test1->usefullClass1isA(Class(Test3)));
+        std::cout << std::endl;
+        testandcout(test1->usefullClass2isA(Class(Test1)));
+        testandcout(test1->usefullClass2isA(Class(Test2)));
+        testandcout(test1->usefullClass2isA(Class(Test3)));
+        std::cout << std::endl;
+        testandcout(test1->usefullClass3isA(Class(Test1)));
+        testandcout(test1->usefullClass3isA(Class(Test2)));
+        testandcout(test1->usefullClass3isA(Class(Test3)));
+    }
+
+    void Test3::usefullClassesIsATest(Test2* test2)
+    {
+        std::cout << std::endl;
+        std::cout << "Test2:" << std::endl;
+        testandcout(test2->usefullClass1isA(Class(Test1)));
+        testandcout(test2->usefullClass1isA(Class(Test2)));
+        testandcout(test2->usefullClass1isA(Class(Test3)));
+        std::cout << std::endl;
+        testandcout(test2->usefullClass2isA(Class(Test1)));
+        testandcout(test2->usefullClass2isA(Class(Test2)));
+        testandcout(test2->usefullClass2isA(Class(Test3)));
+        std::cout << std::endl;
+        testandcout(test2->usefullClass3isA(Class(Test1)));
+        testandcout(test2->usefullClass3isA(Class(Test2)));
+        testandcout(test2->usefullClass3isA(Class(Test3)));
+    }
+}
Index: /code/branches/network/src/orxonox/objects/test3.h
===================================================================
--- /code/branches/network/src/orxonox/objects/test3.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/test3.h	(revision 861)
@@ -0,0 +1,40 @@
+#ifndef _Test3_H__
+#define _Test3_H__
+
+#include "core/BaseObject.h"
+
+namespace orxonox
+{
+    class Test1;
+    class Test2;
+
+    class Test3 : public BaseObject
+    {
+        public:
+            Test3();
+            virtual ~Test3();
+
+            void setConfigValues();
+
+            void usefullClassesIsATest(Test1* test1);
+            void usefullClassesIsATest(Test2* test2);
+
+            void configOutput();
+
+        private:
+            int                 value_int_;
+            unsigned int        value_uint_;
+            char                value_char_;
+            unsigned char       value_uchar_;
+            float               value_float_;
+            double              value_double_;
+            bool                value_bool_;
+            std::string         value_string_;
+            const char*         value_constchar_;
+            Vector2             value_vector2_;
+            Vector3             value_vector3_;
+            ColourValue         value_colourvalue_;
+    };
+}
+
+#endif
Index: /code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.cc	(revision 861)
@@ -0,0 +1,115 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "orxonox/Orxonox.h"
+#include "BulletManager.h"
+#include "util/tinyxml/tinyxml.h"
+
+#include "AmmunitionDump.h"
+
+
+namespace orxonox {
+  CreateFactory(AmmunitionDump);
+
+  AmmunitionDump::AmmunitionDump()
+    : numberOfAmmos_(Orxonox::getSingleton()->getBulletMgr()->getNumberOfAmmos()),
+      stock_(new int[numberOfAmmos_]),
+      capacity_(new int[numberOfAmmos_])
+  {
+    RegisterObject(AmmunitionDump);
+
+    for (int i = 0; i < numberOfAmmos_; i++)
+    {
+      stock_[i] = 0;
+      capacity_[i] = 0;
+    }
+  }
+
+
+  AmmunitionDump::~AmmunitionDump()
+  {
+    if (stock_)
+      delete stock_;
+    if (capacity_)
+      delete capacity_;
+  }
+
+  void AmmunitionDump::setDumpSize(const std::string &name, int size)
+  {
+    if (size < 0)
+      return;
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return;
+    capacity_[id] = size;
+  }
+
+
+  int AmmunitionDump::store(const std::string &name, int quantity)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return quantity;
+    stock_[id] += quantity;
+    if (stock_[id] > capacity_[id])
+    {
+      quantity = capacity_[id] - stock_[id];
+      stock_[id] = capacity_[id];
+      return quantity;
+    }
+    else
+      return 0;
+  }
+
+
+  int AmmunitionDump::getAmmunition(const std::string &name, int quantity)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    if (id == -1)
+      return 0;
+    if (stock_[id] >= quantity)
+      stock_[id] -= quantity;
+    else
+    {
+      quantity = stock_[id];
+      stock_[id] = 0;
+    }
+    return quantity;
+  }
+
+
+  int AmmunitionDump::getStockSize(const std::string &name)
+  {
+    int id = Orxonox::getSingleton()->getBulletMgr()->getAmmunitionID(name);
+    // FIXME changed = to ==, check if correct
+    if (id == -1)
+      return -1;
+    return stock_[id];
+  }
+}
Index: /code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.h
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/AmmunitionDump.h	(revision 861)
@@ -0,0 +1,71 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _AmmunitionDump_H__
+#define _AmmunitionDump_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+//#include "../core/CoreIncludes.h"
+#include "core/BaseObject.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport AmmunitionDump : public BaseObject, public network::Synchronisable
+  {
+  public:
+    AmmunitionDump();
+	  ~AmmunitionDump();
+
+    void setDumpSize(const std::string &name, int size);
+
+    int store(const std::string &name, int quantiy);
+
+    int getAmmunition(const std::string &name, int quantity);
+
+    int getStockSize(const std::string &name);
+
+    virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
+
+
+  protected:
+    inline bool create() { return true; }
+
+    int numberOfAmmos_;
+    int *stock_;
+    int *capacity_;
+  };
+  ExportClass(AmmunitionDump, Orxonox);
+}
+
+#endif /* _AmmunitionDump_H__ */
Index: /code/branches/network/src/orxonox/objects/weapon/BarrelGun.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/BarrelGun.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/BarrelGun.cc	(revision 861)
@@ -0,0 +1,146 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreStringConverter.h>
+#include <OgreSceneNode.h>
+#include <OgreEntity.h>
+#include <OgreSceneManager.h>
+
+#include "util/Math.h"
+#include "Bullet.h"
+#include "BulletManager.h"
+#include "AmmunitionDump.h"
+#include "BaseWeapon.h"
+
+#include "BarrelGun.h"
+
+
+namespace orxonox {
+  CreateFactory(BarrelGun);
+
+  BarrelGun::BarrelGun()
+  {
+    RegisterObject(BarrelGun);
+
+    primaryFirePower_ = 100;
+    secondaryFirePower_ = 500;
+    primaryFiringRate_ = 1.0/7.0;
+    secondaryFiringRate_ = 1.0/2.0;
+    primaryBulletSpeed_ = 800;
+    secondaryBulletSpeed_ = 500;
+    magazineSize_ = 25;
+  }
+
+
+  BarrelGun::~BarrelGun()
+  {
+  }
+
+
+  void BarrelGun::primaryFire()
+  {
+    if (leftAmmo_ < 1)
+    {
+      currentState_ = IDLE;
+      return;
+    }
+
+    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          getNode()->getWorldPosition(),
+          getNode()->getWorldOrientation());
+
+    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+
+    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
+          .normalisedCopy() * primaryBulletSpeed_;
+    speed += getVelocity();
+
+	  temp->setScale(Vector3(1, 1, 1) * 1.5);
+    temp->roll(Degree(90));
+
+    Bullet* bullet = new Bullet();
+    bullet->setNode(temp);
+    bullet->attachObject(bulletEntity);
+    bullet->setVelocity(speed);
+	  bulletManager_->addBullet(bullet);
+
+    --leftAmmo_;
+  }
+
+
+  void BarrelGun::primaryFiring(float time)
+  {
+    if (time > primaryFiringRate_)
+    {
+      currentState_ = IDLE;
+    }
+  }
+
+
+  void BarrelGun::secondaryFire()
+  {
+    if (leftAmmo_ < 5)
+    {
+      currentState_ = IDLE;
+      return;
+    }
+
+    Ogre::SceneNode *temp = sceneMgr_->getRootSceneNode()->createChildSceneNode(
+          getNode()->getWorldPosition(),
+          getNode()->getWorldOrientation());
+
+    Ogre::Entity* bulletEntity = sceneMgr_->createEntity("BulletEntity"
+      + Ogre::StringConverter::toString(bulletCounter_++), "Barrel.mesh");
+
+    Vector3 speed = (temp->getOrientation() * Vector3(1, 0, 0))
+          .normalisedCopy() * secondaryBulletSpeed_*0.5;
+    speed += getVelocity();
+
+	  temp->setScale(Vector3(1, 1, 1) * 3);
+	  temp->roll(Degree(90));
+
+    Bullet* bullet = new Bullet();
+    bullet->setNode(temp);
+    bullet->attachObject(bulletEntity);
+    bullet->setVelocity(speed);
+	  bulletManager_->addBullet(bullet);
+
+
+    leftAmmo_ -= 5;
+  }
+
+
+  void BarrelGun::secondaryFiring(float time)
+  {
+    if (time > secondaryFiringRate_)
+      currentState_ = IDLE;
+  }
+
+}
Index: /code/branches/network/src/orxonox/objects/weapon/BarrelGun.h
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/BarrelGun.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/BarrelGun.h	(revision 861)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _BarrelGun_H__
+#define _BarrelGun_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "BaseWeapon.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport BarrelGun : public BaseWeapon
+  {
+ public:
+    BarrelGun();
+	  virtual ~BarrelGun();
+
+    //virtual void tick(float dt);
+
+  protected:
+    void primaryFire();
+
+    void primaryFiring(float);
+
+    void secondaryFire();
+
+    void secondaryFiring(float);
+
+  public:
+
+  protected:
+
+  };
+  ExportClass(BarrelGun, Orxonox);
+}
+
+#endif /* _BarrelGun_H__ */
Index: /code/branches/network/src/orxonox/objects/weapon/BaseWeapon.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/BaseWeapon.cc	(revision 861)
@@ -0,0 +1,185 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <OgreStringConverter.h>
+#include <OgreSceneNode.h>
+#include <OgreEntity.h>
+#include <OgreSceneManager.h>
+
+#include "util/Math.h"
+#include "../../Orxonox.h"
+#include "Bullet.h"
+#include "BulletManager.h"
+#include "AmmunitionDump.h"
+
+#include "BaseWeapon.h"
+
+
+namespace orxonox {
+  float BaseWeapon::nextActionValidityPeriod_s = 0.5;
+
+  BaseWeapon::BaseWeapon()
+    : sceneMgr_(Orxonox::getSingleton()->getSceneManager()),
+      bulletCounter_(0),
+      bulletManager_(Orxonox::getSingleton()->getBulletMgr()),
+      ammoDump_(NULL),
+      primaryFireRequest_(false), secondaryFireRequest_(false),
+      totalTime_(0.0f), actionStartTime_(0.0f),
+      currentState_(IDLE), secondaryFired_(false),
+      nextAction_(NOTHING), actionAdded_(false),
+      timeSinceNextActionAdded_(0.0f),
+      leftAmmo_(0)
+  {
+    RegisterObject(BaseWeapon);
+  }
+
+
+  BaseWeapon::~BaseWeapon()
+  {
+  }
+
+
+  bool BaseWeapon::addAction(const Action act)
+  {
+    if (nextAction_ == NOTHING)
+    {
+      nextAction_ = act;
+      actionAdded_ = true;
+      return true;
+    }
+    else
+      return false;
+  }
+
+
+  void BaseWeapon::primaryFireRequest()
+  {
+    primaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::secondaryFireRequest()
+  {
+    secondaryFireRequest_ = true;
+  }
+
+
+  void BaseWeapon::tick(float dt)
+  {
+    totalTime_ += dt;
+    // process action adder
+    if (actionAdded_)
+    {
+      timeSinceNextActionAdded_ = totalTime_;
+      actionAdded_ = false;
+    }
+
+    switch (currentState_)
+    {
+    case IDLE:
+      break;
+
+    case PRIMARY_FIRE:
+      primaryFiring(totalTime_ - actionStartTime_);
+      break;
+
+    case SECONDARY_FIRE:
+      secondaryFiring(totalTime_ - actionStartTime_);
+      break;
+
+    case RELOADING:
+      break;
+
+    case CHANGING_AMMO:
+      break;
+    }
+
+    if (currentState_ == IDLE)
+    {
+      // first, process next action
+      if (nextAction_ != NOTHING)
+      {
+        actionStartTime_ = totalTime_;
+        switch (nextAction_)
+        {
+        case RELOAD:
+          leftAmmo_ += ammoDump_->getAmmunition("Barrel", magazineSize_ - leftAmmo_);
+          break;
+
+        case CHANGE_AMMO:
+          break;
+
+        case SPECIAL:
+          break;
+
+        default:
+          break;
+        }
+
+        // pay attention when multithreaded!
+        nextAction_ = NOTHING;
+      }
+      else
+      {
+        // secondly, execute firing
+        if (primaryFireRequest_ && !(secondaryFired_ && secondaryFireRequest_))
+        {
+          actionStartTime_ = totalTime_;
+          currentState_ = PRIMARY_FIRE;
+          secondaryFired_ = false;
+          primaryFire();
+        }
+        else if (secondaryFireRequest_)
+        {
+          actionStartTime_ = totalTime_;
+          currentState_ = SECONDARY_FIRE;
+          secondaryFired_ = true;
+          secondaryFire();
+        }
+      }
+    }
+
+    primaryFireRequest_ = false;
+    secondaryFireRequest_ = false;
+
+    if (totalTime_ - timeSinceNextActionAdded_ > nextActionValidityPeriod_s)
+      nextAction_ = NOTHING;
+  }
+
+
+  int BaseWeapon::getAmmoState()
+  {
+    return leftAmmo_;
+  }
+
+  void BaseWeapon::setAmmoDump(AmmunitionDump* dump)
+  {
+    this->ammoDump_ = dump;
+  }
+}
Index: /code/branches/network/src/orxonox/objects/weapon/BaseWeapon.h
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/BaseWeapon.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/BaseWeapon.h	(revision 861)
@@ -0,0 +1,127 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _BaseWeapon_H__
+#define _BaseWeapon_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "../Model.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport BaseWeapon : public Model
+  {
+  public:
+    enum Action {
+      NOTHING  = 0,
+      RELOAD   = 1,
+      CHANGE_AMMO  = 2,
+      SPECIAL  = 3
+    };
+
+  protected:
+    enum State {
+      IDLE = 0,
+      PRIMARY_FIRE = 1,
+      SECONDARY_FIRE = 2,
+      RELOADING = 3,
+      CHANGING_AMMO = 4,
+    };
+
+  public:
+    BaseWeapon();
+	  virtual ~BaseWeapon();
+
+    bool addAction(const Action);
+
+    void primaryFireRequest();
+
+    void secondaryFireRequest();
+
+    int getAmmoState();
+
+    void setAmmoDump(AmmunitionDump*);
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
+
+    virtual void tick(float dt);
+
+  protected:
+    virtual void primaryFire() = 0;
+
+    virtual void primaryFiring(float) = 0;
+
+    virtual void secondaryFire() = 0;
+
+    virtual void secondaryFiring(float) = 0;
+
+    virtual void registerAllVariables() { };
+
+  public:
+
+  protected:
+    Ogre::SceneManager *sceneMgr_;
+
+    int bulletCounter_;
+    BulletManager *bulletManager_;
+
+    AmmunitionDump *ammoDump_;
+
+    bool primaryFireRequest_;
+    bool secondaryFireRequest_;
+
+    float totalTime_;
+    float actionStartTime_;
+
+    State currentState_;
+    bool secondaryFired_;
+
+    Action nextAction_;
+    bool actionAdded_;
+    float timeSinceNextActionAdded_;
+    static float nextActionValidityPeriod_s;
+
+    // weapon properties
+    int leftAmmo_;
+    float primaryFirePower_;
+    float secondaryFirePower_;
+    float primaryFiringRate_;
+    float secondaryFiringRate_;
+    Real primaryBulletSpeed_;
+    Real secondaryBulletSpeed_;
+
+    int magazineSize_;
+
+  };
+  ExportAbstractClass(BaseWeapon, Orxonox);
+}
+
+#endif /* _BaseWeapon_H__ */
Index: /code/branches/network/src/orxonox/objects/weapon/Bullet.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/Bullet.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/Bullet.cc	(revision 861)
@@ -0,0 +1,43 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "Bullet.h"
+
+namespace orxonox {
+  CreateFactory(Bullet);
+
+  Bullet::Bullet()
+  {
+    RegisterObject(Bullet);
+  }
+
+  Bullet::~Bullet()
+  {
+  }
+}
Index: /code/branches/network/src/orxonox/objects/weapon/Bullet.h
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/Bullet.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/Bullet.h	(revision 861)
@@ -0,0 +1,52 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _Bullet_H__
+#define _Bullet_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "../Model.h"
+
+namespace orxonox {
+  class _OrxonoxExport Bullet : public Model
+  {
+  public:
+	  Bullet();
+	  ~Bullet();
+
+    virtual void tick(float dt) { }
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { Model::loadParams(xmlElem); };
+ };
+  ExportClass(Bullet, Orxonox);
+}
+
+#endif /* _Bullet_H__ */
Index: /code/branches/network/src/orxonox/objects/weapon/BulletManager.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/BulletManager.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/BulletManager.cc	(revision 861)
@@ -0,0 +1,104 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "BulletManager.h"
+#include "Bullet.h"
+
+
+namespace orxonox {
+  CreateFactory(BulletManager);
+
+  BulletManager::BulletManager() : bulletsSize_(8), bulletsIndex_(0)
+  {
+    RegisterObject(BulletManager);
+    bullets_ = new Bullet*[bulletsSize_];
+  }
+
+
+  BulletManager::~BulletManager()
+  {
+    // clean up the bullet list
+    if (bullets_)
+    {
+      for (int i = 0; i < bulletsIndex_; i++)
+        delete bullets_[i];
+      delete bullets_;
+    }
+  }
+
+
+  void BulletManager::addBullet(Bullet *bullet)
+  {
+    // resize array if neccessary (double the size then)
+    if (bulletsIndex_ >= bulletsSize_)
+    {
+      // redimension the array
+      Bullet **tempArray = new Bullet*[2*bulletsSize_];
+      for (int i = 0; i < bulletsSize_; i++)
+        tempArray[i] = bullets_[i];
+      bulletsSize_ *= 2;
+      delete bullets_;
+      bullets_ = tempArray;
+    }
+
+    // add the bullet to the list
+    bullets_[bulletsIndex_++] = bullet;
+  }
+
+
+  void BulletManager::tick(float dt)
+  {
+    // update the bullet positions
+    for (int i = 0; i < bulletsIndex_; i++)
+    {
+      bullets_[i]->getNode()->translate(bullets_[i]->getVelocity()*dt);
+      //bullets_[i]->getNode()->yaw(Degree(dt*100));
+      //bullets_[i]->getNode()->roll(Degree(dt*300));
+    }
+  }
+
+  int BulletManager::getAmmunitionID(const std::string &ammoName)
+  {
+    std::string ammoTypes[] = { "Energy Cell", "Barrel", "Lead Shot" };
+    int ammoTypesLength = 3;
+
+    for (int i = 0; i < ammoTypesLength; i++)
+    {
+      if (ammoTypes[i] == ammoName)
+        return i;
+    }
+    return -1;
+  }
+
+  int BulletManager::getNumberOfAmmos()
+  {
+    return 3;
+  }
+
+}
Index: /code/branches/network/src/orxonox/objects/weapon/BulletManager.h
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/BulletManager.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/BulletManager.h	(revision 861)
@@ -0,0 +1,72 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _BulletManager_H__
+#define _BulletManager_H__
+
+#include <string>
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+#include "network/Synchronisable.h"
+#include "util/tinyxml/tinyxml.h"
+#include "../../core/CoreIncludes.h"
+#include "core/BaseObject.h"
+#include "../Tickable.h"
+
+namespace orxonox {
+  class _OrxonoxExport BulletManager : public BaseObject, public network::Synchronisable, public Tickable
+  {
+  public:
+    BulletManager();
+	  virtual ~BulletManager();
+
+    void addBullet(Bullet*);
+
+    int getAmmunitionID(const std::string&);
+
+    int getNumberOfAmmos();
+
+    virtual void tick(float dt);
+
+    inline virtual void loadParams(TiXmlElement* xmlElem) { BaseObject::loadParams(xmlElem); };
+
+  protected:
+    inline bool create() { return true; }
+
+    // Bullet array
+	  Bullet **bullets_;
+	  int bulletsSize_;
+	  int bulletsIndex_;
+  };
+  ExportClass(BulletManager, Orxonox);
+}
+
+#endif /* _BulletManager_H__ */
Index: /code/branches/network/src/orxonox/objects/weapon/WeaponStation.cc
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/WeaponStation.cc	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/WeaponStation.cc	(revision 861)
@@ -0,0 +1,70 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include "BaseWeapon.h"
+#include "WeaponStation.h"
+
+
+namespace orxonox {
+  WeaponStation::WeaponStation(int stationSize)
+        : slots_(new BaseWeapon*[stationSize]),
+          lastActiveSlotIndex_(-1), stationSize_(stationSize)
+  {
+  	//slots_ = new BaseWeapon*[stationSize];
+  }
+
+
+  WeaponStation::~WeaponStation()
+  {
+    if (slots_)
+      delete slots_;
+    // when factory available: delete weapons too
+  }
+
+
+  bool WeaponStation::addWeapon(BaseWeapon *weapon)
+  {
+    if (lastActiveSlotIndex_ == stationSize_ - 1)
+      return false;
+
+    // this is ugly, but for the time being, it has to fit.
+    slots_[++lastActiveSlotIndex_] = weapon;
+    selectedSlot_ = slots_ + lastActiveSlotIndex_;
+    return true;
+  }
+
+
+  BaseWeapon* WeaponStation::selectWeapon(int slotNumber)
+  {
+    if (slotNumber < lastActiveSlotIndex_)
+      return NULL;
+    return slots_[slotNumber];
+  }
+
+}
Index: /code/branches/network/src/orxonox/objects/weapon/WeaponStation.h
===================================================================
--- /code/branches/network/src/orxonox/objects/weapon/WeaponStation.h	(revision 861)
+++ /code/branches/network/src/orxonox/objects/weapon/WeaponStation.h	(revision 861)
@@ -0,0 +1,65 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software: you can redistribute it and/or modify
+ *   it under the terms of the GNU General Public License as published by
+ *   the Free Software Foundation, either version 3 of the License, or
+ *   (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>.
+ *
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+
+#ifndef _WeaponStation_H__
+#define _WeaponStation_H__
+
+#include <OgrePrerequisites.h>
+
+#include "../../OrxonoxPrereqs.h"
+
+
+namespace orxonox {
+  class _OrxonoxExport WeaponStation
+  {
+  public:
+    WeaponStation(int slotSize);
+	  ~WeaponStation();
+
+    bool addWeapon(BaseWeapon*);
+
+    //bool removeCurrentWeapon();
+
+    // TODO: access every weapon by name
+    BaseWeapon* selectWeapon(int slotNumber);
+
+  protected:
+
+  public:
+
+  protected:
+    // slot management
+    BaseWeapon **slots_;
+    BaseWeapon **selectedSlot_;
+    int lastActiveSlotIndex_;
+    int stationSize_;
+
+  };
+}
+
+#endif /* _WeaponStation_H__ */
Index: /code/branches/network/src/orxonox/particle/ParticleInterface.cc
===================================================================
--- /code/branches/network/src/orxonox/particle/ParticleInterface.cc	(revision 861)
+++ /code/branches/network/src/orxonox/particle/ParticleInterface.cc	(revision 861)
@@ -0,0 +1,146 @@
+/*
+*   ORXONOX - the hottest 3D action shooter ever to exist
+*
+*
+*   License notice:
+*
+*   This program is free software; you can redistribute it and/or
+*   modify it under the terms of the GNU General Public License
+*   as published by the Free Software Foundation; either version 2
+*   of the License, or (at your option) any later version.
+*
+*   This program is distributed in the hope that it will be useful,
+*   but WITHOUT ANY WARRANTY; without even the implied warranty of
+*   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+*   GNU General Public License for more details.
+*
+*   You should have received a copy of the GNU General Public License
+*   along with this program; if not, write to the Free Software
+*   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+*
+*   Author:
+*      ...
+*   Co-authors:
+*      ...
+*
+*/
+
+/**
+* @file ParticleInterface.cc
+* @brief class to control praticle effects
+*/
+
+#include "OrxonoxStableHeaders.h"
+
+#include "ParticleInterface.h"
+// #include <OgreParticleSystem.h>
+// #include <Ogre.h>
+// #include <OIS/OIS.h>
+// #include <CEGUI/CEGUI.h>
+// #include <CEGUIRenderer.h>
+
+
+
+namespace orxonox {
+  using namespace Ogre;
+
+  ParticleInterface::ParticleInterface( SceneManager *sceneManager, std::string name, std::string templateName )
+  {
+    sceneManager_ = sceneManager;
+    particleSystem_ = sceneManager->createParticleSystem(name, templateName);
+
+    //Variabeln einlesen, Emitter1_ ist Referenz-Emitter
+    velocity_ = particleSystem_->getSpeedFactor();
+    colour_ = particleSystem_->getEmitter(0)->getColour();
+    rate_ = particleSystem_->getEmitter(0)->getEmissionRate();
+    distance_ = particleSystem_->getEmitter(0)->getTimeToLive();
+
+    //Anzahl der Emitter
+    numberOfEmitters_ = particleSystem_->getNumEmitters();
+    standardizeEmitters();
+  }
+
+  ParticleInterface::~ParticleInterface(void)
+  {
+    sceneManager_->destroyParticleSystem(particleSystem_);
+  }
+
+  void ParticleInterface::standardizeEmitters(void)
+  {
+    //Abgleichen der anderen Emitter an die Variabeln
+    for (int i=1; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setColour( colour_ );
+      particleSystem_->getEmitter(i)->setTimeToLive( distance_ );
+      particleSystem_->getEmitter(i)->setEmissionRate( rate_ );
+    }
+
+  }
+
+  void ParticleInterface::setVelocity(Real v)
+  {
+    velocity_ = v;
+    //partikel anpassen
+    particleSystem_->setSpeedFactor(v);
+  }
+
+  void ParticleInterface::setRate(int r)
+  {
+    rate_ = r;
+    //partikel anpassen
+    for (int i=0; i<numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setEmissionRate(rate_);
+    }
+  }
+
+  void ParticleInterface::setDistance(Real d)
+  {
+    distance_ = d;
+    //partikel anpassen
+    for (int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setTimeToLive(distance_);
+    }
+  }
+
+  void ParticleInterface::setColour(ColourValue colour)
+  {
+    colour_ = colour;
+    //partikel anpassen
+    for (int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setColour(colour_);
+    }
+  }
+
+  ParticleEmitter* ParticleInterface::getEmitter( int emitterNr )
+  {
+    if ( (emitterNr >= numberOfEmitters_) || (emitterNr < 0) ) return NULL;
+    return particleSystem_->getEmitter(emitterNr);
+  }
+
+  void ParticleInterface::newEmitter ()
+  {
+    particleSystem_->addEmitter(particleSystem_->getEmitter(0)->getType());
+    particleSystem_->getEmitter(0)->copyParametersTo( particleSystem_->getEmitter(numberOfEmitters_) );
+    numberOfEmitters_++;
+  }
+
+  // TODO check if this really works
+  Vector3 ParticleInterface::getPositionOfEmitter ( int emitterNr )
+  {
+    return particleSystem_->getEmitter(0)->getPosition();
+  }
+
+  void ParticleInterface::setDirection ( Vector3 direction )
+  {
+    for(int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setDirection(direction);
+    }
+  }
+
+  void ParticleInterface::switchEnable(){
+    bool enable=(!(particleSystem_->getEmitter(0)->getEnabled()));
+    for(int i=0; i < numberOfEmitters_; i++) {
+      particleSystem_->getEmitter(i)->setEnabled(enable);
+    }
+  }
+
+}
Index: /code/branches/network/src/orxonox/particle/ParticleInterface.h
===================================================================
--- /code/branches/network/src/orxonox/particle/ParticleInterface.h	(revision 861)
+++ /code/branches/network/src/orxonox/particle/ParticleInterface.h	(revision 861)
@@ -0,0 +1,82 @@
+#ifndef _ParticleInterface_H__
+#define _ParticleInterface_H__
+
+#include <string>
+
+// #include "ParticleInterface.h"
+// #include <Ogre.h>
+// #include <OIS/OIS.h>
+// #include <CEGUI/CEGUI.h>
+// #include <CEGUIRenderer.h>
+#include <OgreParticleSystem.h>
+#include <OgreParticleEmitter.h>
+#include <OgreSceneManager.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+
+
+namespace orxonox
+{
+
+  class _OrxonoxExport ParticleInterface
+  {
+  public:
+
+    ParticleInterface( Ogre::SceneManager *sceneManager, std::string name, std::string templateName );
+    ~ParticleInterface( void );
+
+    inline void addToSceneNode( Ogre::SceneNode* sceneNode )
+        { sceneNode_ = sceneNode; sceneNode_->attachObject(particleSystem_);};
+    inline void detachFromSceneNode( void )
+        { sceneNode_->detachObject(particleSystem_); sceneNode_ = NULL;};
+
+    Ogre::ParticleEmitter* getEmitter ( int emitterNr );
+    void newEmitter ( void );
+
+    Vector3 getPositionOfEmitter ( int emitterNr );
+    inline void setPositionOfEmitter ( int emitterNr, Vector3 position )
+        { particleSystem_->getEmitter(emitterNr)->setPosition(position); };
+
+    inline Vector3 getDirection ( void )
+        { return particleSystem_->getEmitter(0)->getDirection(); };
+    void setDirection ( Vector3 direction );
+
+    inline Real getVelocity()
+        {return velocity_; };
+    void setVelocity( Real v );
+
+    inline int getRate()
+      { return rate_; };
+    void setRate( int r );
+
+    inline Real getDistance()
+        { return distance_; };
+    void setDistance( Real d );
+
+    inline ColourValue getColour( void )
+        {return colour_;};
+    void setColour( ColourValue colour );
+
+    void switchEnable();
+
+    inline Ogre::ParticleSystem* getParticleSystem()
+        { return this->particleSystem_; };
+
+  private:
+    Ogre::SceneNode *sceneNode_;
+    Ogre::SceneManager *sceneManager_;
+    Ogre::ParticleSystem *particleSystem_;
+    Real distance_;
+    Real velocity_;
+    int rate_;
+    ColourValue colour_;
+    int numberOfEmitters_;
+
+    void standardizeEmitters();
+  };
+
+}
+
+#endif /* _ParticleInterface_H__ */
Index: /code/branches/network/src/orxonox/tools/BillboardSet.cc
===================================================================
--- /code/branches/network/src/orxonox/tools/BillboardSet.cc	(revision 861)
+++ /code/branches/network/src/orxonox/tools/BillboardSet.cc	(revision 861)
@@ -0,0 +1,62 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <sstream>
+
+#include <OgreSceneManager.h>
+
+#include "../Orxonox.h"
+#include "util/Math.h"
+
+#include "BillboardSet.h"
+
+namespace orxonox
+{
+    unsigned int BillboardSet::billboardSetCounter_s = 0;
+
+    BillboardSet::BillboardSet()
+    {
+        this->billboardSet_ = 0;
+    }
+
+    void BillboardSet::setBillboardSet(const std::string& file, const ColourValue& colour, int count, const Vector3& position)
+    {
+        std::ostringstream name;
+        name << (BillboardSet::billboardSetCounter_s++);
+        this->billboardSet_ = Orxonox::getSingleton()->getSceneManager()->createBillboardSet("Billboard" + name.str(), count);
+        this->billboardSet_->createBillboard(position, colour);
+        this->billboardSet_->setMaterialName(file);
+    }
+
+    BillboardSet::~BillboardSet()
+    {
+        if (this->billboardSet_)
+            Orxonox::getSingleton()->getSceneManager()->destroyBillboardSet(this->billboardSet_);
+    }
+}
Index: /code/branches/network/src/orxonox/tools/BillboardSet.h
===================================================================
--- /code/branches/network/src/orxonox/tools/BillboardSet.h	(revision 861)
+++ /code/branches/network/src/orxonox/tools/BillboardSet.h	(revision 861)
@@ -0,0 +1,34 @@
+#ifndef _BillboardSet_H__
+#define _BillboardSet_H__
+
+#include <string>
+
+#include <OgreBillboardSet.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "../core/CoreIncludes.h"
+#include "util/Math.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport BillboardSet
+    {
+        public:
+            BillboardSet();
+            ~BillboardSet();
+            void setBillboardSet(const std::string& file, const ColourValue& colour = ColourValue(1.0, 1.0, 1.0), int count = 1, const Vector3& position = Vector3::ZERO);
+
+            inline Ogre::BillboardSet* getBillboardSet()
+                { return this->billboardSet_; }
+
+            inline const std::string& getName() const
+                { return this->billboardSet_->getName(); }
+
+        private:
+            static unsigned int billboardSetCounter_s;
+            Ogre::BillboardSet* billboardSet_;
+    };
+}
+
+#endif /* _BillboardSet_H__ */
Index: /code/branches/network/src/orxonox/tools/Light.cc
===================================================================
--- /code/branches/network/src/orxonox/tools/Light.cc	(revision 861)
+++ /code/branches/network/src/orxonox/tools/Light.cc	(revision 861)
@@ -0,0 +1,35 @@
+#include "OrxonoxStableHeaders.h"
+
+#include <sstream>
+
+#include <OgreSceneManager.h>
+
+#include "../Orxonox.h"
+
+#include "Light.h"
+
+namespace orxonox
+{
+    unsigned int Light::lightCounter_s = 0;
+
+    Light::Light()
+    {
+        this->light_ = 0;
+    }
+
+    void Light::setLight(Ogre::Light::LightTypes type, const ColourValue& diffuse, const ColourValue& specular)
+    {
+        std::ostringstream name;
+        name << (Light::lightCounter_s++);
+        this->light_ = Orxonox::getSingleton()->getSceneManager()->createLight("Light" + name.str());
+        this->light_->setType(type);
+        this->light_->setDiffuseColour(diffuse);
+        this->light_->setSpecularColour(specular);
+    }
+
+    Light::~Light()
+    {
+        if (this->light_)
+            Orxonox::getSingleton()->getSceneManager()->destroyLight(this->light_);
+    }
+}
Index: /code/branches/network/src/orxonox/tools/Light.h
===================================================================
--- /code/branches/network/src/orxonox/tools/Light.h	(revision 861)
+++ /code/branches/network/src/orxonox/tools/Light.h	(revision 861)
@@ -0,0 +1,33 @@
+#ifndef _Light_H__
+#define _Light_H__
+
+#include <string>
+
+#include <OgreLight.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "util/Math.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Light
+    {
+        public:
+            Light();
+            ~Light();
+            void setLight(Ogre::Light::LightTypes type = Ogre::Light::LT_POINT, const ColourValue& diffuse = ColourValue(1.0, 1.0, 1.0), const ColourValue& specular = ColourValue(1.0, 1.0, 1.0));
+
+            inline Ogre::Light* getLight()
+                { return this->light_; }
+
+            inline const std::string& getName() const
+                { return this->light_->getName(); }
+
+        private:
+            static unsigned int lightCounter_s;
+            Ogre::Light* light_;
+    };
+}
+
+#endif /* _Light_H__ */
Index: /code/branches/network/src/orxonox/tools/Mesh.cc
===================================================================
--- /code/branches/network/src/orxonox/tools/Mesh.cc	(revision 861)
+++ /code/branches/network/src/orxonox/tools/Mesh.cc	(revision 861)
@@ -0,0 +1,59 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+#include "OrxonoxStableHeaders.h"
+
+#include <sstream>
+
+#include <OgreSceneManager.h>
+
+#include "../Orxonox.h"
+
+#include "Mesh.h"
+
+namespace orxonox
+{
+    unsigned int Mesh::meshCounter_s = 0;
+
+    Mesh::Mesh()
+    {
+        this->entity_ = 0;
+    }
+
+    void Mesh::setMesh(const std::string& file)
+    {
+        std::ostringstream name;
+        name << (Mesh::meshCounter_s++);
+        this->entity_ = Orxonox::getSingleton()->getSceneManager()->createEntity("Mesh" + name.str(), file);
+    }
+
+    Mesh::~Mesh()
+    {
+        if (this->entity_)
+            Orxonox::getSingleton()->getSceneManager()->destroyEntity(this->entity_);
+    }
+}
Index: /code/branches/network/src/orxonox/tools/Mesh.h
===================================================================
--- /code/branches/network/src/orxonox/tools/Mesh.h	(revision 861)
+++ /code/branches/network/src/orxonox/tools/Mesh.h	(revision 861)
@@ -0,0 +1,31 @@
+#ifndef _Mesh_H__
+#define _Mesh_H__
+
+#include <string>
+
+#include <OgreEntity.h>
+
+#include "../OrxonoxPrereqs.h"
+
+namespace orxonox
+{
+    class _OrxonoxExport Mesh
+    {
+        public:
+            Mesh();
+            ~Mesh();
+            void setMesh(const std::string& file);
+
+            inline Ogre::Entity* getEntity()
+                { return this->entity_; }
+
+            inline const std::string& getName() const
+                { return this->entity_->getName(); }
+
+        private:
+            static unsigned int meshCounter_s;
+            Ogre::Entity* entity_;
+    };
+}
+
+#endif /* _Mesh_H__ */
Index: /code/branches/network/src/orxonox/tools/Timer.h
===================================================================
--- /code/branches/network/src/orxonox/tools/Timer.h	(revision 861)
+++ /code/branches/network/src/orxonox/tools/Timer.h	(revision 861)
@@ -0,0 +1,199 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Fabian 'x3n' Landau
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/*!
+    @file Timer.h
+    @brief Definition and Implementation of the Timer class.
+
+    The Timer is a callback-object, calling a given function after a given time-interval.
+
+    Usage:
+    header.h:
+        class ClassName
+        {
+            public:
+                ClassName();
+                void functionName();
+                Timer<ClassName> myTimer;
+        };
+
+    source.cc:
+        ClassName::ClassName()
+        {
+            myTimer.setTimer(interval_in_seconds, bLoop, this, &ClassName::functionName);
+        }
+
+        void ClassName::functionName()
+        {
+            whateveryouwant();
+            something(else);
+        }
+*/
+
+#ifndef _Timer_H__
+#define _Timer_H__
+
+#include <OgreFrameListener.h>
+
+#include "../OrxonoxPrereqs.h"
+
+#include "../core/CoreIncludes.h"
+
+namespace orxonox
+{
+    //! TimerBase is the parent of the Timer class.
+    class _OrxonoxExport TimerBase : public OrxonoxClass
+    {
+        friend class TimerFrameListener;
+
+        public:
+            /** @brief Constructor: Sets the default-values. */
+            TimerBase()
+            {
+                RegisterRootObject(TimerBase);
+
+                this->interval_ = 0;
+                this->bLoop_ = false;
+                this->bActive_ = false;
+
+                this->time_ = 0;
+            }
+
+            virtual void run() const = 0;
+
+            /** @brief Starts the Timer: Function-call after 'interval' seconds. */
+            inline void startTimer() { this->bActive_ = true; this->time_ = this->interval_; }
+            /** @brief Stops the Timer. */
+            inline void stopTimer() { this->bActive_ = false; this->time_ = this->interval_; }
+            /** @brief Pauses the Timer - it will continue with the actual state if you unpause it. */
+            inline void pauseTimer() { this->bActive_ = false; }
+            /** @brief Unpauses the Timer - continues with the given state. */
+            inline void unpauseTimer() { this->bActive_ = true; }
+            /** @returns true if the Timer is active (= not stoped, not paused). */
+            inline bool isActive() const { return this->bActive_; }
+
+        protected:
+            float interval_;    //!< The time-interval in seconds
+            bool bLoop_;        //!< If true, the function gets called every 'interval' seconds
+            bool bActive_;      //!< If true, the Timer ticks and calls the function if the time's up
+
+            float time_;        //!< Internal variable, counting the time till the next function-call
+    };
+    ExportAbstractClass(TimerBase, Orxonox);
+
+    //! The Timer is a callback-object, calling a given function after a given time-interval.
+    template <class T = BaseObject>
+    class Timer : public TimerBase
+    {
+        public:
+            /** @brief Constructor: Sets the default-values. */
+            Timer()
+            {
+                this->timerFunction_ = 0;
+                this->object_ = 0;
+            }
+
+            /**
+                @brief Constructor: Initializes the Timer with given values.
+                @param interval The timer-interval in seconds
+                @param bLoop If true, the function gets called every 'interval' seconds
+                @param object The object owning the timer and the function
+                @param timerFunction A function pointer to the function to call
+            */
+            Timer(float interval, bool bLoop, T* object, void (T::*timerFunction)())
+            {
+                this->setTimer(interval, bLoop, timerFunction, object);
+            }
+
+            /**
+                @brief Initializes the Timer with given values.
+                @param interval The timer-interval in seconds
+                @param bLoop If true, the function gets called every 'interval' seconds
+                @param object The object owning the timer and the function
+                @param timerFunction A function pointer to the function to call
+            */
+            void setTimer(float interval, bool bLoop, T* object, void (T::*timerFunction)())
+            {
+                this->interval_ = interval;
+                this->bLoop_ = bLoop;
+                this->timerFunction_ = timerFunction;
+                this->object_ = object;
+                this->bActive_ = true;
+
+                this->time_ = interval;
+            }
+
+            /** @brief Calls the given function of the given object. */
+            void run() const
+            {
+                ((*this->object_).*timerFunction_)();
+            }
+
+        private:
+            void (T::*timerFunction_)();
+            T* object_;
+    };
+    ExportAbstractClass(Timer<BaseObject>, Orxonox);
+
+    //! The TimerFrameListener manages all Timers in the game.
+    class TimerFrameListener : public Ogre::FrameListener
+    {
+        private:
+            /** @brief Gets called before a frame gets rendered. */
+            bool frameStarted(const Ogre::FrameEvent &evt)
+            {
+                // Iterate through all Timers
+                for (Iterator<TimerBase> it = ObjectList<TimerBase>::start(); it; )
+                {
+                    if (it->isActive())
+                    {
+                        // If active: Decrease the timer by the duration of the last frame
+                        it->time_ -= evt.timeSinceLastFrame;
+
+                        if (it->time_ <= 0)
+                        {
+                            // It's time to call the function
+                            if (it->bLoop_)
+                                it->time_ += it->interval_; // Q: Why '+=' and not '='? A: Think about it. It's more accurate like that. Seriously.
+                            else
+                                it->stopTimer(); // Stop the timer if we don't want to loop
+
+                            (it++)->run();
+                        }
+                        else
+                            ++it;
+                    }
+                    else
+                        ++it;
+                }
+
+                return FrameListener::frameStarted(evt);
+            }
+    };
+}
+
+#endif /* _Timer_H__ */
Index: /code/branches/network/src/util/CMakeLists.txt
===================================================================
--- /code/branches/network/src/util/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/util/CMakeLists.txt	(revision 861)
@@ -0,0 +1,20 @@
+PROJECT(Orxonox)
+
+AUX_SOURCE_DIRECTORY(tinyxml TINYXML_SRC_FILES)
+
+SET (UTIL_SRC_FILES
+  ${TINYXML_SRC_FILES}
+  substring.cc
+)
+
+IF(WIN32)
+  ADD_LIBRARY( util ${UTIL_SRC_FILES} )
+ELSE(WIN32)
+  ADD_LIBRARY( util SHARED ${UTIL_SRC_FILES} )
+ENDIF(WIN32)
+SET_TARGET_PROPERTIES( util PROPERTIES LINK_FLAGS "--no-undefined" )
+
+
+IF(TESTING_ENABLED)
+  ADD_SUBDIRECTORY(testing)
+ENDIF(TESTING_ENABLED)
Index: /code/branches/network/src/util/Convert.h
===================================================================
--- /code/branches/network/src/util/Convert.h	(revision 861)
+++ /code/branches/network/src/util/Convert.h	(revision 861)
@@ -0,0 +1,103 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Benjamin Grauer
+ *   Co-authors:
+ *      Fabian 'x3n' Landau
+ */
+
+/*!
+    @file Convert.h
+    @brief Definition and Implementation of the Convert class.
+*/
+
+#ifndef _Convert_H__
+#define _Convert_H__
+
+#include <string>
+#include <sstream>
+
+
+// DEFAULT CLASS
+template <typename FromType, typename ToType>
+class Converter
+{
+ public:
+  bool operator()(ToType* output, const FromType& input) const
+  {
+    return false;
+  }
+};
+
+// PARTIAL SPECIALIZATION TO CONVERT TO STRINGS
+template<typename FromType>
+class Converter<FromType, std::string>
+{
+ public:
+  bool operator()(std::string* output, const FromType& input) const
+  {
+    std::ostringstream oss;
+    if (oss << input)
+    {
+      (*output) = oss.str();
+      return true;
+    }
+    else
+      return false;
+  }
+};
+
+// PARTIAL SPECIALIZATION TO CONVERT FROM STRING
+template<typename ToType>
+class Converter<std::string, ToType>
+{
+ public:
+  bool operator()(ToType* output, const std::string& input) const
+  {
+    std::istringstream iss(input);
+    if (iss >> (*output))
+      return true;
+    else
+      return false;
+  }
+};
+
+// FUNCTION SO WE DO NOT HAVE TO TELL THE COMPILER ABOUT THE TYPE
+template<typename FromType, typename ToType>
+static bool ConvertValue(ToType* output, const FromType& input)
+{
+  Converter<FromType, ToType> converter;
+  return converter(output, input);
+}
+
+// THE SAME, BUT WITH DEFAULT VALUE
+template<typename FromType, typename ToType>
+static bool ConvertValue(ToType* output, const FromType& input, const ToType& fallback)
+{
+  Converter<FromType, ToType> converter;
+  if (converter(output, input))
+    return true;
+
+  (*output) = fallback;
+  return false;
+}
+
+#endif /* _Convert_H__ */
Index: /code/branches/network/src/util/Math.h
===================================================================
--- /code/branches/network/src/util/Math.h	(revision 861)
+++ /code/branches/network/src/util/Math.h	(revision 861)
@@ -0,0 +1,19 @@
+#include <OgreMath.h>
+#include <OgreVector2.h>
+#include <OgreVector3.h>
+#include <OgreVector4.h>
+#include <OgreMatrix3.h>
+#include <OgreQuaternion.h>
+#include <OgreColourValue.h>
+
+namespace orxonox
+{
+  typedef Ogre::Radian Radian;
+  typedef Ogre::Degree Degree;
+  typedef Ogre::Vector2 Vector2;
+  typedef Ogre::Vector3 Vector3;
+  typedef Ogre::Vector4 Vector4;
+  typedef Ogre::Matrix3 Matrix3;
+  typedef Ogre::Quaternion Quaternion;
+  typedef Ogre::ColourValue ColourValue;
+}
Index: /code/branches/network/src/util/Sleep.h
===================================================================
--- /code/branches/network/src/util/Sleep.h	(revision 861)
+++ /code/branches/network/src/util/Sleep.h	(revision 861)
@@ -0,0 +1,7 @@
+// hack for the usleep/Sleep problem
+#if defined(WIN32) || defined(_WIN32) || defined(__WIN32__)
+#  include <windows.h>
+#  define usleep(x) Sleep((x)/1000)
+#else
+#  include <unistd.h>
+#endif
Index: /code/branches/network/src/util/String2Number.h
===================================================================
--- /code/branches/network/src/util/String2Number.h	(revision 861)
+++ /code/branches/network/src/util/String2Number.h	(revision 861)
@@ -0,0 +1,51 @@
+#ifndef _String2Number_H__
+#define _String2Number_H__
+
+#include <string>
+#include <sstream>
+#include <iostream>
+
+#include "core/Debug.h"
+
+/**
+ * String to number conversion
+ *
+ * This class converts a number inside a std::string
+ * into a numeric type number (int,float,double)
+ * Number in string can be decimal, hexadecimal or octal
+ *
+ * @author Nicolas Perrenoud<nicolape@ee.ethz.ch>
+ *
+ * @example
+ * float f;
+ * String2Number<float>(f, std::string(" 123.45 "));
+ */
+
+template <class T>
+class String2Number
+{
+  private:
+  bool success_;
+
+  public:
+  /**
+   * Constructor
+   *
+   * First value is the target variable, the second vector is the
+   * string where the number is taken from, the third parameter
+   * should be one of std::hex, std::dec or std::oct (dec is default value)
+   */
+  inline String2Number(T& t, const std::string& s, std::ios_base& (*f)(std::ios_base&) =  std::dec, int haltOnError=1)
+  {
+    std::istringstream iss(s);
+    success_ = !(iss >> f >> t).fail();
+
+    if (!success_ && haltOnError==1)
+    {
+      COUT(1) << "Error: Conversion from string to number in \"" << s << "\" failed." << std::endl;
+      exit(1);
+    }
+  }
+};
+
+#endif /* _String2Number_H__ */
Index: /code/branches/network/src/util/Tokenizer.h
===================================================================
--- /code/branches/network/src/util/Tokenizer.h	(revision 861)
+++ /code/branches/network/src/util/Tokenizer.h	(revision 861)
@@ -0,0 +1,40 @@
+#ifndef _Tokenizer_H__
+#define _Tokenizer_H__
+
+#include <string>
+#include <iostream>
+#include <vector>
+
+/**
+ * String tokenizer
+ *
+ * Splits a given string into several smaller strings
+ * using a delmiter (default is the comma).
+ * Returns the result as a vector<string> object
+ *
+ * @author Nicolas Perrenoud<nicolape@ee.ethz.ch>
+ */
+
+inline std::vector<std::string> tokenize(const std::string& str, const std::string& delimiters = ",")
+{
+  std::vector<std::string> tokens;
+
+  // Skip delimiters at beginning.
+  std::string::size_type lastPos = str.find_first_not_of(delimiters, 0);
+  // Find first "non-delimiter".
+  std::string::size_type pos     = str.find_first_of(delimiters, lastPos);
+
+  while (std::string::npos != pos || std::string::npos != lastPos)
+  {
+      // Found a token, add it to the vector.
+      tokens.push_back(str.substr(lastPos, pos - lastPos));
+      // Skip delimiters.  Note the "not_of"
+      lastPos = str.find_first_not_of(delimiters, pos);
+      // Find next "non-delimiter"
+      pos = str.find_first_of(delimiters, lastPos);
+  }
+  return tokens;
+}
+
+
+#endif /* _Tokenizer_H__ */
Index: /code/branches/network/src/util/substring.cc
===================================================================
--- /code/branches/network/src/util/substring.cc	(revision 861)
+++ /code/branches/network/src/util/substring.cc	(revision 861)
@@ -0,0 +1,466 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christian Meyer
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+//
+//  splitLine
+//  STL string tokenizer
+//
+//  Created by Clemens Wacha.
+//  Version 1.0
+//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
+//
+ */
+
+#include "substring.h"
+
+/**
+ * @brief default constructor
+ */
+SubString::SubString()
+{}
+
+
+/**
+ * @brief create a SubString from
+ * @param string the String to Spilit
+ * @param delimiter the Character at which to split string (delimiter)
+ */
+SubString::SubString(const std::string& string, char delimiter)
+{
+  this->split(string, delimiter);
+}
+
+
+/**
+ * @brief Splits a String into multiple splitters.
+ * @param string the String to split
+ * @param delimiters multiple set of characters at what to split. (delimiters)
+ * @param delimiterNeighbours neighbours of the delimiters, that will be erased only when near a delimiter.
+ * @param emptyEntries If empty entries should be allewed or removed.
+ * @param escapeChar The Escape Character that overrides splitters commends and so on...
+ * @param safemode_char within these characters splitting won't happen
+ * @param comment_char the Comment character.
+ */
+SubString::SubString(const std::string& string,
+                     const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
+                     char escapeChar, char safemode_char, char comment_char)
+{
+  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, comment_char);
+}
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subString the SubString to take a set from.
+ * @param subSetBegin the beginning to the end
+ */
+SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+{
+  for (unsigned int i = subSetBegin; i < subString.size(); i++)
+    this->strings.push_back(subString[i]);
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subString the SubString to take a Set from
+ * @param subSetBegin the beginning to the end
+ * @param subSetEnd the end of the SubSet (max subString.size() will be checked internaly)
+ */
+SubString::SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd)
+{
+  for (unsigned int i = subSetBegin; i < subString.size() || i < subSetEnd; i++)
+    this->strings.push_back(subString[i]);
+}
+
+/**
+ * @brief creates a Substring from a count and values set.
+ * @param argc: the Arguments Count.
+ * @param argv: Argument Values.
+ */
+SubString::SubString(unsigned int argc, const char** argv)
+{
+  for(unsigned int i = 0; i < argc; ++i)
+    this->strings.push_back(std::string(argv[i]));
+}
+
+/**
+ * @brief removes the object from memory
+ */
+SubString::~SubString()
+{ }
+
+/** @brief An empty String */
+// const std::string SubString::emptyString = "";
+/** @brief Helper that gets you a String consisting of all White Spaces */
+const std::string SubString::WhiteSpaces = " \n\t";
+/** @brief Helper that gets you a String consisting of all WhiteSpaces and the Comma */
+const std::string SubString::WhiteSpacesWithComma = " \n\t,";
+/** An Empty SubString */
+const SubString SubString::NullSubString = SubString();
+
+/**
+ * @brief stores the Value of subString in this SubString
+ * @param subString will be copied into this String.
+ * @returns this SubString.
+ */
+SubString& SubString::operator=(const SubString& subString)
+{
+  this->strings = subString.strings;
+  return *this;
+}
+
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::operator==(const SubString& subString) const
+{
+  return (this->strings == subString.strings);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString) const
+{
+  return (*this == subString);
+}
+
+/**
+ * @brief comparator.
+ * @param subString the SubString to compare against this one.
+ * @param length how many entries to compare. (from 0 to length)
+ * @returns true if the Stored Strings match
+ */
+bool SubString::compare(const SubString& subString, unsigned int length) const
+{
+  if (length > this->size() || length > subString.size())
+    return false;
+
+  for (unsigned int i = 0; i < length; i++)
+    if (this->strings[i] != subString.strings[i])
+      return false;
+  return true;
+}
+
+
+/**
+ * @brief append operator
+ * @param subString the String to append.
+ * @returns a SubString where this and subString are appended.
+ */
+SubString SubString::operator+(const SubString& subString) const
+{
+  return SubString(*this) += subString;
+}
+
+
+/**
+ * @brief append operator.
+ * @param subString append subString to this SubString.
+ * @returns this substring appended with subString
+ */
+SubString& SubString::operator+=(const SubString& subString)
+{
+  for (unsigned int i = 0; i < subString.size(); i++)
+    this->strings.push_back(subString[i]);
+  return *this;
+}
+
+
+/**
+ * @brief Split the String at
+ * @param string where to split
+ * @param splitter delimiter.
+ */
+unsigned int SubString::split(const std::string& string, char splitter)
+{
+  this->strings.clear();
+  char split[2];
+  split[0] = splitter;
+  split[1] = '\0';
+  SubString::splitLine(this->strings, string, split);
+  return strings.size();
+}
+
+
+/**
+ * @brief Splits a String into multiple splitters.
+ * @param string the String to split
+ * @param delimiters multiple set of characters at what to split. (delimiters)
+ * @param delimiterNeighbours: Neighbours to the Delimiters that will be erased too.
+ * @param emptyEntries: If empty entries are added to the List of SubStrings
+ * @param escapeChar The Escape Character that overrides splitters commends and so on...
+ * @param safemode_char within these characters splitting won't happen
+ * @param comment_char the Comment character.
+ */
+unsigned int SubString::split(const std::string& string,
+                              const std::string& delimiters, const std::string& delimiterNeighbours, bool emptyEntries,
+                              char escapeChar,char safemode_char, char comment_char)
+{
+  this->strings.clear();
+  SubString::splitLine(this->strings, string, delimiters, delimiterNeighbours, emptyEntries, escapeChar, safemode_char, comment_char);
+  return this->strings.size();
+}
+
+
+/**
+ * @brief joins together all Strings of this Substring.
+ * @param delimiter the String between the subStrings.
+ * @returns the joined String.
+ */
+std::string SubString::join(const std::string& delimiter) const
+{
+  if (!this->strings.empty())
+  {
+    std::string retVal = this->strings[0];
+    for (unsigned int i = 1; i < this->strings.size(); i++)
+      retVal += delimiter + this->strings[i];
+    return retVal;
+  }
+  else
+  {
+    static std::string empty;
+    return empty;
+  }
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subSetBegin the beginning to the end
+ * @returns the SubSet
+ *
+ * This function is added for your convenience, and does the same as
+ * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+ */
+SubString SubString::subSet(unsigned int subSetBegin) const
+{
+  return SubString(*this, subSetBegin);
+}
+
+
+/**
+ * @brief creates a SubSet of a SubString.
+ * @param subSetBegin the beginning to
+ * @param subSetEnd the end of the SubSet to select (if bigger than subString.size() it will be downset.)
+ * @returns the SubSet
+ *
+ * This function is added for your convenience, and does the same as
+ * SubString::SubString(const SubString& subString, unsigned int subSetBegin)
+ */
+SubString SubString::subSet(unsigned int subSetBegin, unsigned int subSetEnd) const
+{
+  return SubString(*this, subSetBegin, subSetEnd);
+}
+
+
+/**
+ * @brief splits line into tokens and stores them in ret.
+ * @param ret the Array, where the Splitted strings will be stored in
+ * to the beginning of the current token is stored
+ * @param line the inputLine to split
+ * @param delimiters a String of Delimiters (here the input will be splitted)
+ * @param delimiterNeighbours Naighbours to the Delimitter, that will be removed if they are to the left or the right of a Delimiter.
+ * @param emptyEntries: if empty Strings are added to the List of Strings.
+ * @param escape_char: Escape carater (escapes splitters)
+ * @param safemode_char: the beginning of the safemode is marked with this
+ * @param comment_char: the beginning of a comment is marked with this: (until the end of a Line)
+ * @param start_state: the Initial state on how to parse the String.
+ * @returns SPLIT_LINE_STATE the parser was in when returning
+ *
+ * This is the Actual Splitting Algorithm from Clemens Wacha
+ * Supports delimiters, escape characters,
+ * ignores special  characters between safemode_char and between comment_char and linend '\n'.
+ */
+SubString::SPLIT_LINE_STATE
+SubString::splitLine(std::vector<std::string>& ret,
+                     const std::string& line,
+                     const std::string& delimiters,
+                     const std::string& delimiterNeighbours,
+                     bool emptyEntries,
+                     char escape_char,
+                     char safemode_char,
+                     char comment_char,
+                     SPLIT_LINE_STATE start_state)
+{
+  SPLIT_LINE_STATE state = start_state;
+  unsigned int i = 0;
+  unsigned int fallBackNeighbours = 0;
+
+  std::string token;
+
+  if(start_state != SL_NORMAL && ret.size() > 0)
+  {
+    token = ret[ret.size()-1];
+    ret.pop_back();
+  }
+
+  while(i < line.size())
+  {
+    switch(state)
+    {
+      case SL_NORMAL:
+        if(line[i] == escape_char)
+        {
+          state = SL_ESCAPE;
+        }
+        else if(line[i] == safemode_char)
+        {
+          state = SL_SAFEMODE;
+        }
+        else if(line[i] == comment_char)
+        {
+          if (fallBackNeighbours > 0)
+            token = token.substr(0, token.size() - fallBackNeighbours);
+          /// FINISH
+          if(emptyEntries || token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          token += line[i];       // EAT
+          state = SL_COMMENT;
+        }
+        else if(delimiters.find(line[i]) != std::string::npos)
+        {
+          // line[i] is a delimiter
+          if (fallBackNeighbours > 0)
+            token = token.substr(0, token.size() - fallBackNeighbours);
+          /// FINISH
+          if(emptyEntries || token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          state = SL_NORMAL;
+        }
+        else
+        {
+          if (delimiterNeighbours.find(line[i]) != std::string::npos)
+          {
+            if (token.size() > 0)
+              ++fallBackNeighbours;
+            else
+            {
+              i++;
+              continue;
+            }
+          }
+          else
+            fallBackNeighbours = 0;
+          token += line[i];       // EAT
+        }
+        break;
+      case SL_ESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_NORMAL;
+        break;
+      case SL_SAFEMODE:
+        if(line[i] == safemode_char)
+        {
+          state = SL_NORMAL;
+        }
+        else if(line[i] == escape_char)
+        {
+          state = SL_SAFEESCAPE;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      case SL_SAFEESCAPE:
+        if(line[i] == 'n') token += '\n';
+        else if(line[i] == 't') token += '\t';
+        else if(line[i] == 'v') token += '\v';
+        else if(line[i] == 'b') token += '\b';
+        else if(line[i] == 'r') token += '\r';
+        else if(line[i] == 'f') token += '\f';
+        else if(line[i] == 'a') token += '\a';
+        else if(line[i] == '?') token += '\?';
+        else token += line[i];  // EAT
+        state = SL_SAFEMODE;
+        break;
+
+      case SL_COMMENT:
+        if(line[i] == '\n')
+        {
+          /// FINISH
+          if(token.size() > 0)
+          {
+            ret.push_back(token);
+            token.clear();
+          }
+          state = SL_NORMAL;
+        }
+        else
+        {
+          token += line[i];       // EAT
+        }
+        break;
+
+      default:
+        // nothing
+        break;
+    }
+    i++;
+  }
+
+  /// FINISH
+  if (fallBackNeighbours > 0)
+    token = token.substr(0, token.size() - fallBackNeighbours);
+  if(emptyEntries || token.size() > 0)
+  {
+    ret.push_back(token);
+    token.clear();
+  }
+  return(state);
+}
+
+
+/**
+ * @brief Some nice debug information about this SubString
+ */
+void SubString::debug() const
+{
+  printf("Substring-information::count=%d ::", this->strings.size());
+  for (unsigned int i = 0; i < this->strings.size(); i++)
+    printf("s%d='%s'::", i, this->strings[i].c_str());
+  printf("\n");
+}
Index: /code/branches/network/src/util/substring.h
===================================================================
--- /code/branches/network/src/util/substring.h	(revision 861)
+++ /code/branches/network/src/util/substring.h	(revision 861)
@@ -0,0 +1,154 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Christian Meyer
+ *   Co-authors:
+ *      Benjamin Grauer
+ *
+//
+//  splitLine
+//  STL string tokenizer
+//
+//  Created by Clemens Wacha.
+//  Version 1.0
+//  Copyright (c) 2005 Clemens Wacha. All rights reserved.
+//
+ */
+
+ /*!
+ * @file substring.h
+ * @brief a small class to get the parts of a string separated by commas
+ *
+ * This class is also identified as a Tokenizer. It splits up one long
+ * String into multiple small ones by a designated Delimiter.
+ *
+ * Substring is Advanced, and it is possible, to split a string by ','
+ * but also removing leading and trailing spaces around the comma.
+ *
+ * @example
+ * Split the String std::string st = "1345, The new empire   , is , orxonox"
+ * is splitted with:
+ * SubString(st, ',', " \n\t")
+ * into
+ * "1345", "The new empire", "is", "orxonox"
+ * As you can see, the useless spaces around ',' were removed.
+ */
+
+#ifndef __SUBSTRING_H__
+#define __SUBSTRING_H__
+
+#include <vector>
+#include <string>
+
+
+//! A class that can load one string and split it in multipe ones
+/**
+ * SubString is a very Powerfull way to create a SubSet from a String
+ * It can be used, to Split strings append them and join them again.
+ */
+class SubString
+{
+public:
+  //! An enumerator for the State the Parser is in
+  typedef enum {
+    SL_NORMAL,            //!< Normal state
+    SL_ESCAPE,            //!< After an escape character
+    SL_SAFEMODE,          //!< In safe mode (between "" mostly).
+    SL_SAFEESCAPE,        //!< In safe mode with the internal escape character, that escapes even the savemode character.
+    SL_COMMENT,           //!< In Comment mode.
+  } SPLIT_LINE_STATE;
+
+
+public:
+  SubString();
+  SubString(const std::string& string, char delimiter = ',');
+  SubString(const std::string& string,
+            const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries=false,
+            char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
+  SubString(unsigned int argc, const char** argv);
+  /** @brief create a Substring as a copy of another one. @param subString the SubString to copy. */
+  SubString(const SubString& subString) { *this = subString; };
+  SubString(const SubString& subString, unsigned int subSetBegin);
+  SubString(const SubString& subString, unsigned int subSetBegin, unsigned int subSetEnd);
+  ~SubString();
+
+  // operate on the SubString
+  SubString& operator=(const SubString& subString);
+  bool operator==(const SubString& subString) const;
+  bool compare(const SubString& subString) const;
+  bool compare(const SubString& subString, unsigned int length) const;
+  SubString operator+(const SubString& subString) const;
+  SubString& operator+=(const SubString& subString);
+  /** @param subString the String to append @returns appended String. @brief added for convenience */
+  SubString& append(const SubString subString) { return (*this += subString); };
+
+  /////////////////////////////////////////
+  // Split and Join the any String. ///////
+  unsigned int split(const std::string& string = "", char delimiter = ',');
+  unsigned int split(const std::string& string,
+                     const std::string& delimiters, const std::string& delimiterNeighbours = "", bool emptyEntries = false,
+                     char escapeChar ='\\', char safemode_char = '"', char comment_char = '\0');
+  std::string join(const std::string& delimiter = " ") const;
+  ////////////////////////////////////////
+
+  // retrieve a SubSet from the String
+  SubString subSet(unsigned int subSetBegin) const;
+  SubString subSet(unsigned int subSetBegin, unsigned int subSetEnd) const;
+
+  // retrieve Information from within
+  /** @returns true if the SubString is empty */
+  inline bool empty() const { return this->strings.empty(); };
+  /** @returns the count of Strings stored in this substring */
+  inline unsigned int size() const { return this->strings.size(); };
+  /** @param i the i'th String @returns the i'th string from the subset of Strings */
+  inline const std::string& operator[](unsigned int i) const { return this->strings[i]; };
+  /** @param i the i'th String @returns the i'th string from the subset of Strings */
+  inline const std::string& getString(unsigned int i) const { return (*this)[i]; };
+  /** @returns the front of the StringList. */
+  inline const std::string& front() const { return this->strings.front(); };
+  /** @returns the back of the StringList. */
+  inline const std::string& back() const { return this->strings.back(); };
+  /** @brief removes the back of the strings list. */
+  inline void pop_back() { this->strings.pop_back(); };
+
+  // the almighty algorithm.
+  static SPLIT_LINE_STATE splitLine(std::vector<std::string>& ret,
+                                    const std::string& line,
+                                    const std::string& delimiters = SubString::WhiteSpaces,
+                                    const std::string& delimiterNeighbours = "",
+                                    bool emptyEntries = false,
+                                    char escape_char = '\\',
+                                    char safemode_char = '"',
+                                    char comment_char = '\0',
+                                    SPLIT_LINE_STATE start_state = SL_NORMAL);
+  // debugging.
+  void debug() const;
+
+public:
+  static const std::string WhiteSpaces;
+  static const std::string WhiteSpacesWithComma;
+  static const SubString   NullSubString;
+
+private:
+  std::vector<std::string>  strings;                      //!< strings produced from a single string splitted in multiple strings
+};
+
+#endif /* __SUBSTRING_H__ */
Index: /code/branches/network/src/util/testing/CMakeLists.txt
===================================================================
--- /code/branches/network/src/util/testing/CMakeLists.txt	(revision 861)
+++ /code/branches/network/src/util/testing/CMakeLists.txt	(revision 861)
@@ -0,0 +1,12 @@
+INCLUDE_DIRECTORIES(${INCLUDE_DIRECTORIES}
+	../
+)
+
+ADD_EXECUTABLE(TestConverter
+ TestConverter.cpp
+)
+
+
+ADD_TEST(TestConverter
+	${EXECUTABLE_OUTPUT_PATH}/TestConverter
+)
Index: /code/branches/network/src/util/testing/TestConverter.cpp
===================================================================
--- /code/branches/network/src/util/testing/TestConverter.cpp	(revision 861)
+++ /code/branches/network/src/util/testing/TestConverter.cpp	(revision 861)
@@ -0,0 +1,17 @@
+#include "Convert.h"
+#include <iostream>
+
+int main(int argc, char** argv)
+{
+  int input = rand();
+  std::string sub;
+  int output = 0;
+
+  ConvertValue(&sub, input);
+  ConvertValue(&output, sub);
+
+  if (input == output)
+    return 0;
+  else
+    return -1;
+}
Index: /code/branches/network/src/util/tinyxml/TinyXMLPrereqs.h
===================================================================
--- /code/branches/network/src/util/tinyxml/TinyXMLPrereqs.h	(revision 861)
+++ /code/branches/network/src/util/tinyxml/TinyXMLPrereqs.h	(revision 861)
@@ -0,0 +1,75 @@
+/*
+ *   ORXONOX - the hottest 3D action shooter ever to exist
+ *
+ *
+ *   License notice:
+ *
+ *   This program is free software; you can redistribute it and/or
+ *   modify it under the terms of the GNU General Public License
+ *   as published by the Free Software Foundation; either version 2
+ *   of the License, or (at your option) any later version.
+ *
+ *   This program is distributed in the hope that it will be useful,
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *   GNU General Public License for more details.
+ *
+ *   You should have received a copy of the GNU General Public License
+ *   along with this program; if not, write to the Free Software
+ *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+ *
+ *   Author:
+ *      Reto Grieder
+ *   Co-authors:
+ *      ...
+ *
+ */
+
+/**
+ @file  OrxonoxPrereq.h
+ @brief Contains all the necessary forward declarations for all classes, structs and enums.
+ */
+
+#ifndef _TinyXMLPrereqs_H__
+#define _TinyXMLPrereqs_H__
+
+#include "orxonox/OrxonoxPlatform.h"
+
+//-----------------------------------------------------------------------
+// Shared library settings
+//-----------------------------------------------------------------------
+#if (ORXONOX_PLATFORM == ORXONOX_PLATFORM_WIN32) && !defined( TINYXML_STATIC_BUILD )
+#  ifdef TINYXML_SHARED_BUILD
+#    define _TinyXMLExport __declspec(dllexport)
+#  else
+#    if defined( __MINGW32__ )
+#      define _TinyXMLExport
+#    else
+#      define _TinyXMLExport __declspec(dllimport)
+#    endif
+#  endif
+#elif defined ( ORXONOX_GCC_VISIBILITY )
+#  define _TinyXMLExport  __attribute__ ((visibility("default")))
+#else
+#  define _TinyXMLExport
+#endif
+
+
+//-----------------------------------------------------------------------
+// Forward declarations
+//-----------------------------------------------------------------------
+
+class TiXmlString;
+class TiXmlOutStream;
+class TiXmlNode;
+class TiXmlHandle;
+class TiXmlDocument;
+class TiXmlElement;
+class TiXmlComment;
+class TiXmlUnknown;
+class TiXmlAttribute;
+class TiXmlText;
+class TiXmlDeclaration;
+class TiXmlParsingData;
+
+#endif /* _TinyXMLPrereqs_H__ */
Index: /code/branches/network/src/util/tinyxml/ticpp.cc
===================================================================
--- /code/branches/network/src/util/tinyxml/ticpp.cc	(revision 861)
+++ /code/branches/network/src/util/tinyxml/ticpp.cc	(revision 861)
@@ -0,0 +1,1129 @@
+/*
+http://code.google.com/p/ticpp/
+Copyright (c) 2006 Ryan Pusztai, Ryan Mulder
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#ifdef TIXML_USE_TICPP
+
+#include "ticpp.h"
+#include "ticpprc.h"
+#include "tinyxml.h"
+#include <sstream>
+
+using namespace ticpp;
+
+// In the following Visitor functions, casting away const should be safe, as the object can only be referred to by a const &
+bool Visitor::VisitEnter( const TiXmlDocument& doc )
+{
+	return VisitEnter( Document( const_cast< TiXmlDocument* >( &doc ) ) );
+}
+
+bool Visitor::VisitExit( const TiXmlDocument& doc )
+{
+	return VisitEnter( Document( const_cast< TiXmlDocument* >( &doc ) ) );
+}
+
+bool Visitor::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute )
+{
+	if ( 0 != firstAttribute )
+	{
+		Attribute attribute( const_cast< TiXmlAttribute* >( firstAttribute ) );
+		return VisitEnter( Element( const_cast< TiXmlElement* >( &element ) ), &attribute );
+	}
+	else
+	{
+		return VisitEnter( Element( const_cast< TiXmlElement* >( &element ) ), 0 );
+	}
+}
+
+bool Visitor::VisitExit( const TiXmlElement& element )
+{
+	return VisitExit( Element( const_cast< TiXmlElement* >( &element ) ) );
+}
+
+bool Visitor::Visit( const TiXmlDeclaration& declaration )
+{
+	return Visit( Declaration( const_cast< TiXmlDeclaration* >( &declaration ) ) );
+}
+
+bool Visitor::Visit( const TiXmlStylesheetReference& stylesheet )
+{
+	return Visit( StylesheetReference( const_cast< TiXmlStylesheetReference* >( &stylesheet ) ) );
+}
+
+bool Visitor::Visit( const TiXmlText& text )
+{
+	return Visit( Text( const_cast< TiXmlText* >( &text ) ) );
+}
+
+bool Visitor::Visit( const TiXmlComment& comment )
+{
+	return Visit( Comment( const_cast< TiXmlComment* >( &comment ) ) );
+}
+
+Attribute::Attribute()
+{
+	SetTiXmlPointer( new TiXmlAttribute() );
+	m_impRC->InitRef();
+}
+
+Attribute::Attribute( TiXmlAttribute* attribute )
+{
+	SetTiXmlPointer( attribute );
+	m_impRC->IncRef();
+}
+
+Attribute::Attribute( const std::string& name, const std::string& value )
+{
+	SetTiXmlPointer( new TiXmlAttribute( name, value ) );
+	m_impRC->InitRef();
+}
+
+void Attribute::operator=( const Attribute& copy )
+{
+	// Dropping the reference to the old object
+	this->m_impRC->DecRef();
+
+	// Pointing to the new Object
+	SetTiXmlPointer( copy.m_tiXmlPointer );
+
+	// The internal tixml pointer changed in the above line
+	this->m_impRC->IncRef();
+}
+
+Attribute::Attribute( const Attribute& copy ) : Base()
+{
+	// Dropping the reference to the old object
+	this->m_impRC->DecRef();
+
+	// Pointing to the new Object
+	SetTiXmlPointer( copy.m_tiXmlPointer );
+
+	// The internal tixml pointer changed in the above line
+	this->m_impRC->IncRef();
+}
+
+Attribute::~Attribute()
+{
+	m_impRC->DecRef();
+}
+
+std::string Attribute::Value() const
+{
+	ValidatePointer();
+	return m_tiXmlPointer->ValueStr();
+}
+
+std::string Attribute::Name() const
+{
+	ValidatePointer();
+	return m_tiXmlPointer->Name();
+}
+
+Attribute* Attribute::Next( bool throwIfNoAttribute ) const
+{
+	ValidatePointer();
+	TiXmlAttribute* attribute = m_tiXmlPointer->Next();
+	if ( 0 == attribute )
+	{
+		if ( throwIfNoAttribute )
+		{
+			TICPPTHROW( "No more attributes found" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Attribute* temp = new Attribute( attribute );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Attribute* Attribute::Previous( bool throwIfNoAttribute ) const
+{
+	ValidatePointer();
+	TiXmlAttribute* attribute = m_tiXmlPointer->Previous();
+	if ( 0 == attribute )
+	{
+		if ( throwIfNoAttribute )
+		{
+			TICPPTHROW( "No more attributes found" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Attribute* temp = new Attribute( attribute );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+void Attribute::IterateNext( const std::string&, Attribute** next ) const
+{
+	*next = Next( false );
+}
+
+void Attribute::IteratePrevious( const std::string&, Attribute** previous ) const
+{
+	*previous = Previous( false );
+}
+
+void Attribute::Print( FILE* file, int depth ) const
+{
+	ValidatePointer();
+	m_tiXmlPointer->Print( file, depth );
+}
+
+void Attribute::SetTiXmlPointer( TiXmlAttribute* newPointer )
+{
+	m_tiXmlPointer = newPointer;
+	SetImpRC( newPointer );
+}
+
+//*****************************************************************************
+
+Node* Node::NodeFactory( TiXmlNode* tiXmlNode, bool throwIfNull, bool rememberSpawnedWrapper ) const
+{
+	if ( 0 == tiXmlNode )
+	{
+		if ( throwIfNull )
+		{
+			TICPPTHROW( "tiXmlNode is NULL" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Node* temp;
+	switch ( tiXmlNode->Type() )
+	{
+		case TiXmlNode::DOCUMENT:
+			temp = new Document( tiXmlNode->ToDocument() );
+			break;
+
+		case TiXmlNode::ELEMENT:
+			temp = new Element( tiXmlNode->ToElement() );
+			break;
+
+		case TiXmlNode::COMMENT:
+			temp = new Comment( tiXmlNode->ToComment() );
+			break;
+
+		case TiXmlNode::TEXT:
+			temp = new Text( tiXmlNode->ToText() );
+			break;
+
+		case TiXmlNode::DECLARATION:
+			temp = new Declaration( tiXmlNode->ToDeclaration() );
+			break;
+
+		case TiXmlNode::STYLESHEETREFERENCE:
+			temp = new StylesheetReference( tiXmlNode->ToStylesheetReference() );
+			break;
+
+		default:
+			TICPPTHROW( "Type is unsupported" )
+	}
+
+	if ( rememberSpawnedWrapper )
+	{
+		m_spawnedWrappers.push_back( temp );
+	}
+	return temp;
+}
+
+
+std::string Node::Value() const
+{
+	return GetTiXmlPointer()->ValueStr();
+}
+
+void Node::Clear()
+{
+	GetTiXmlPointer()->Clear();
+}
+
+Node* Node::Parent( bool throwIfNoParent ) const
+{
+	TiXmlNode* parent = GetTiXmlPointer()->Parent();
+	if ( ( 0 == parent ) && throwIfNoParent )
+	{
+		TICPPTHROW( "No parent exists" );
+	}
+
+	return NodeFactory( parent, false );
+}
+
+Node* Node::FirstChild( bool throwIfNoChildren ) const
+{
+	return FirstChild( "", throwIfNoChildren );
+}
+
+Node* Node::FirstChild( const std::string& value, bool throwIfNoChildren ) const
+{
+	return FirstChild( value.c_str(), throwIfNoChildren );
+}
+
+Node* Node::FirstChild( const char* value, bool throwIfNoChildren ) const
+{
+	TiXmlNode* childNode;
+	if ( 0 == strlen( value ) )
+	{
+		childNode = GetTiXmlPointer()->FirstChild();
+	}
+	else
+	{
+		childNode = GetTiXmlPointer()->FirstChild( value );
+	}
+
+	if ( ( 0 == childNode ) && throwIfNoChildren )
+	{
+		TICPPTHROW( "Child with the value of \"" << value << "\" not found" );
+	}
+
+	return NodeFactory( childNode, false );
+}
+
+Node* Node::LastChild( bool throwIfNoChildren ) const
+{
+	return LastChild( "", throwIfNoChildren );
+}
+
+Node* Node::LastChild( const std::string& value, bool throwIfNoChildren ) const
+{
+	return LastChild( value.c_str(), throwIfNoChildren );
+}
+
+Node* Node::LastChild( const char* value, bool throwIfNoChildren ) const
+{
+	TiXmlNode* childNode;
+	if ( 0 == strlen( value ) )
+	{
+		childNode = GetTiXmlPointer()->LastChild();
+	}
+	else
+	{
+		childNode = GetTiXmlPointer()->LastChild( value );
+	}
+
+	if ( ( 0 == childNode ) && throwIfNoChildren )
+	{
+		TICPPTHROW( "Child with the value of \"" << value << "\" not found" );
+	}
+
+	return NodeFactory( childNode, false );
+}
+
+Node* Node::IterateChildren ( Node* previous ) const
+{
+	TiXmlNode* pointer;
+	if ( 0 == previous )
+	{
+		pointer = GetTiXmlPointer()->IterateChildren( 0 );
+	}
+	else
+	{
+		pointer = GetTiXmlPointer()->IterateChildren( previous->GetTiXmlPointer() );
+	}
+
+	return NodeFactory( pointer, false );
+}
+
+Node* Node::IterateChildren( const std::string& value, Node* previous ) const
+{
+	TiXmlNode* pointer;
+	if ( 0 == previous )
+	{
+		pointer = GetTiXmlPointer()->IterateChildren( value, 0 );
+	}
+	else
+	{
+		pointer = GetTiXmlPointer()->IterateChildren( value, previous->GetTiXmlPointer() );
+	}
+
+	return NodeFactory( pointer, false );
+}
+
+Node* Node::InsertEndChild( Node& addThis )
+{
+	if ( addThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		TICPPTHROW( "Node is a Document and can't be inserted" );
+	}
+
+	// Increment reference count when adding to the tree
+	addThis.m_impRC->IncRef();
+
+	TiXmlNode* pointer = GetTiXmlPointer()->InsertEndChild( *addThis.GetTiXmlPointer() );
+	if ( 0 == pointer )
+	{
+		TICPPTHROW( "Node can't be inserted" );
+	}
+
+	return NodeFactory( pointer );
+}
+
+Node* Node::LinkEndChild( Node* childNode )
+{
+	if ( childNode->Type() == TiXmlNode::DOCUMENT )
+	{
+		TICPPTHROW( "Node is a Document and can't be linked" );
+	}
+
+	// Increment reference count when adding to the tree
+	childNode->m_impRC->IncRef();
+
+	if ( 0 == GetTiXmlPointer()->LinkEndChild( childNode->GetTiXmlPointer() ) )
+	{
+		TICPPTHROW( "Node can't be linked" );
+	}
+
+	return childNode;
+}
+
+Node* Node::InsertBeforeChild( Node* beforeThis, Node& addThis )
+{
+	if ( addThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		TICPPTHROW( "Node is a Document and can't be inserted" );
+	}
+
+	// Increment reference count when adding to the tree
+	addThis.m_impRC->IncRef();
+
+	TiXmlNode* pointer = GetTiXmlPointer()->InsertBeforeChild( beforeThis->GetTiXmlPointer(), *addThis.GetTiXmlPointer() );
+	if ( 0 == pointer )
+	{
+		TICPPTHROW( "Node can't be inserted" );
+	}
+
+	return NodeFactory( pointer );
+}
+
+Node* Node::InsertAfterChild( Node* afterThis, Node& addThis )
+{
+	if ( addThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		TICPPTHROW( "Node is a Document and can't be inserted" );
+	}
+
+	// Increment reference count when adding to the tree
+	addThis.m_impRC->IncRef();
+
+	TiXmlNode* pointer = GetTiXmlPointer()->InsertAfterChild( afterThis->GetTiXmlPointer(), *addThis.GetTiXmlPointer() );
+	if ( 0 == pointer )
+	{
+		TICPPTHROW( "Node can't be inserted" );
+	}
+
+	return NodeFactory( pointer );
+}
+
+Node* Node::ReplaceChild( Node* replaceThis, Node& withThis )
+{
+	if ( withThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		TICPPTHROW( "Node is a Document and can't be inserted" );
+	}
+
+	// Increment reference count when adding to the tree
+	withThis.m_impRC->IncRef();
+
+	TiXmlNode* pointer = GetTiXmlPointer()->ReplaceChild( replaceThis->GetTiXmlPointer(), *withThis.GetTiXmlPointer() );
+	if ( 0 == pointer )
+	{
+		TICPPTHROW( "Node can't be inserted" );
+	}
+
+	return NodeFactory( pointer );
+}
+
+void Node::RemoveChild( Node* removeThis )
+{
+	if  ( !GetTiXmlPointer()->RemoveChild( removeThis->GetTiXmlPointer() ) )
+	{
+		TICPPTHROW( "Node to remove (" << removeThis->Value() << ") is not a child of this Node (" << Value() << ")" )
+	}
+}
+
+Node* Node::PreviousSibling( bool throwIfNoSiblings ) const
+{
+	return PreviousSibling( "", throwIfNoSiblings );
+}
+
+Node* Node::PreviousSibling( const std::string& value, bool throwIfNoSiblings ) const
+{
+	return PreviousSibling( value.c_str(), throwIfNoSiblings );
+}
+
+Node* Node::PreviousSibling( const char* value, bool throwIfNoSiblings ) const
+{
+	TiXmlNode* sibling;
+	if ( 0 == strlen( value ) )
+	{
+		sibling = GetTiXmlPointer()->PreviousSibling();
+	}
+	else
+	{
+		sibling = GetTiXmlPointer()->PreviousSibling( value );
+	}
+
+	if ( ( 0 == sibling ) && throwIfNoSiblings )
+	{
+		TICPPTHROW( "No Siblings found with value, '" << value << "', Prior to this Node (" << Value() << ")" )
+	}
+
+	return NodeFactory( sibling, false );
+}
+
+Node* Node::NextSibling( bool throwIfNoSiblings ) const
+{
+	return NextSibling( "", throwIfNoSiblings );
+}
+
+Node* Node::NextSibling( const std::string& value, bool throwIfNoSiblings ) const
+{
+	return NextSibling( value.c_str(), throwIfNoSiblings );
+}
+
+Node* Node::NextSibling( const char* value, bool throwIfNoSiblings ) const
+{
+	TiXmlNode* sibling;
+	if ( 0 == strlen( value ) )
+	{
+		sibling = GetTiXmlPointer()->NextSibling();
+	}
+	else
+	{
+		sibling = GetTiXmlPointer()->NextSibling( value );
+	}
+
+	if ( ( 0 == sibling ) && throwIfNoSiblings )
+	{
+		TICPPTHROW( "No Siblings found with value, '" << value << "', After this Node (" << Value() << ")" )
+	}
+
+	return NodeFactory( sibling, false );
+}
+
+Element* Node::NextSiblingElement( bool throwIfNoSiblings ) const
+{
+	return NextSiblingElement( "", throwIfNoSiblings );
+}
+
+Element* Node::NextSiblingElement( const std::string& value, bool throwIfNoSiblings ) const
+{
+	return NextSiblingElement( value.c_str(), throwIfNoSiblings );
+}
+
+Element* Node::NextSiblingElement( const char* value, bool throwIfNoSiblings ) const
+{
+	TiXmlElement* sibling;
+	if ( 0 == strlen( value ) )
+	{
+		sibling = GetTiXmlPointer()->NextSiblingElement();
+	}
+	else
+	{
+		sibling = GetTiXmlPointer()->NextSiblingElement( value );
+	}
+
+	if ( 0 == sibling )
+	{
+		if ( throwIfNoSiblings )
+		{
+			TICPPTHROW( "No Element Siblings found with value, '" << value << "', After this Node (" << Value() << ")" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Element* temp = new Element( sibling );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Element* Node::FirstChildElement( bool throwIfNoChildren ) const
+{
+	return FirstChildElement( "", throwIfNoChildren );
+}
+
+Element* Node::FirstChildElement( const std::string& value, bool throwIfNoChildren ) const
+{
+	return FirstChildElement( value.c_str(), throwIfNoChildren );
+}
+
+Element* Node::FirstChildElement( const char* value, bool throwIfNoChildren ) const
+{
+	TiXmlElement* element;
+	if ( 0 == strlen( value ) )
+	{
+		element = GetTiXmlPointer()->FirstChildElement();
+	}
+	else
+	{
+		element = GetTiXmlPointer()->FirstChildElement( value );
+	}
+
+	if ( 0 == element )
+	{
+		if( throwIfNoChildren )
+		{
+			TICPPTHROW( "Element (" << Value() << ") does NOT contain a child with the value of '" << value << "'" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Element* temp = new Element( element );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+int Node::Type() const
+{
+	return GetTiXmlPointer()->Type();
+}
+
+Document* Node::GetDocument( bool throwIfNoDocument ) const
+{
+	TiXmlDocument* doc = GetTiXmlPointer()->GetDocument();
+	if ( 0 == doc )
+	{
+		if( throwIfNoDocument )
+		{
+			TICPPTHROW( "This node (" << Value() << ") is not linked under a document" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+	Document* temp = new Document( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+bool Node::NoChildren() const
+{
+	return GetTiXmlPointer()->NoChildren();
+}
+
+Document* Node::ToDocument() const
+{
+	TiXmlDocument* doc = GetTiXmlPointer()->ToDocument();
+	if ( 0 == doc )
+	{
+		TICPPTHROW( "This node (" << Value() << ") is not a Document" )
+	}
+	Document* temp = new Document( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Element* Node::ToElement() const
+{
+	TiXmlElement* doc = GetTiXmlPointer()->ToElement();
+	if ( 0 == doc )
+	{
+		TICPPTHROW( "This node (" << Value() << ") is not a Element" )
+	}
+	Element* temp = new Element( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Comment* Node::ToComment() const
+{
+	TiXmlComment* doc = GetTiXmlPointer()->ToComment();
+	if ( 0 == doc )
+	{
+		TICPPTHROW( "This node (" << Value() << ") is not a Comment" )
+	}
+	Comment* temp = new Comment( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Text* Node::ToText() const
+{
+	TiXmlText* doc = GetTiXmlPointer()->ToText();
+	if ( 0 == doc )
+	{
+		TICPPTHROW( "This node (" << Value() << ") is not a Text" )
+	}
+	Text* temp = new Text( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Declaration* Node::ToDeclaration() const
+{
+	TiXmlDeclaration* doc = GetTiXmlPointer()->ToDeclaration();
+	if ( 0 == doc )
+	{
+		TICPPTHROW( "This node (" << Value() << ") is not a Declaration" )
+	}
+	Declaration* temp = new Declaration( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+StylesheetReference* Node::ToStylesheetReference() const
+{
+	TiXmlStylesheetReference* doc = GetTiXmlPointer()->ToStylesheetReference();
+	if ( 0 == doc )
+	{
+		TICPPTHROW( "This node (" << Value() << ") is not a StylesheetReference" )
+	}
+	StylesheetReference* temp = new StylesheetReference( doc );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+std::auto_ptr< Node > Node::Clone() const
+{
+	TiXmlNode* node = GetTiXmlPointer()->Clone();
+	if ( 0 == node )
+	{
+		TICPPTHROW( "Node could not be cloned" );
+	}
+	std::auto_ptr< Node > temp( NodeFactory( node, false, false ) );
+
+	// Take ownership of the memory from TiXml
+	temp->m_impRC->InitRef();
+
+	return temp;
+}
+
+bool Node::Accept( TiXmlVisitor* visitor ) const
+{
+	return GetTiXmlPointer()->Accept( visitor );
+}
+
+//*****************************************************************************
+
+Comment::Comment()
+: NodeImp< TiXmlComment >( new TiXmlComment() )
+{
+	m_impRC->InitRef();
+}
+
+Comment::Comment( TiXmlComment* comment )
+: NodeImp< TiXmlComment >( comment )
+{
+}
+
+Comment::Comment( const std::string& comment )
+: NodeImp< TiXmlComment >( new TiXmlComment() )
+{
+	m_impRC->InitRef();
+	m_tiXmlPointer->SetValue( comment );
+}
+
+//*****************************************************************************
+
+Text::Text()
+: NodeImp< TiXmlText >( new TiXmlText("") )
+{
+	m_impRC->InitRef();
+}
+
+
+Text::Text( const std::string& value )
+: NodeImp< TiXmlText >( new TiXmlText( value ) )
+{
+	m_impRC->InitRef();
+}
+
+Text::Text( TiXmlText* text )
+: NodeImp< TiXmlText >( text )
+{
+}
+
+
+//*****************************************************************************
+
+Document::Document()
+: NodeImp< TiXmlDocument >( new TiXmlDocument() )
+{
+	m_impRC->InitRef();
+}
+
+Document::Document( TiXmlDocument* document )
+: NodeImp< TiXmlDocument >( document )
+{
+}
+
+Document::Document( const char* documentName )
+: NodeImp< TiXmlDocument >( new TiXmlDocument( documentName ) )
+{
+	m_impRC->InitRef();
+}
+
+Document::Document( const std::string& documentName )
+: NodeImp< TiXmlDocument >( new TiXmlDocument( documentName ) )
+{
+	m_impRC->InitRef();
+}
+
+void Document::LoadFile( TiXmlEncoding encoding )
+{
+	if ( !m_tiXmlPointer->LoadFile( encoding ) )
+	{
+		TICPPTHROW( "Couldn't load " << m_tiXmlPointer->Value() );
+	}
+}
+
+void Document::SaveFile( void ) const
+{
+	if ( !m_tiXmlPointer->SaveFile() )
+	{
+		TICPPTHROW( "Couldn't save " << m_tiXmlPointer->Value() );
+	}
+}
+
+void Document::LoadFile( const std::string& filename, TiXmlEncoding encoding )
+{
+	if ( !m_tiXmlPointer->LoadFile( filename.c_str(), encoding ) )
+	{
+		TICPPTHROW( "Couldn't load " << filename );
+	}
+}
+
+void Document::LoadFile( const char* filename, TiXmlEncoding encoding )
+{
+	if ( !m_tiXmlPointer->LoadFile( filename, encoding ) )
+	{
+		TICPPTHROW( "Couldn't load " << filename );
+	}
+}
+
+void Document::SaveFile( const std::string& filename ) const
+{
+	if ( !m_tiXmlPointer->SaveFile( filename.c_str() ) )
+	{
+		TICPPTHROW( "Couldn't save " << filename );
+	}
+}
+
+void Document::Parse( const std::string& xml, bool throwIfParseError, TiXmlEncoding encoding )
+{
+	m_tiXmlPointer->Parse( xml.c_str(), 0, encoding );
+	if( throwIfParseError && m_tiXmlPointer->Error() )
+	{
+		TICPPTHROW( "Error parsing xml: " << m_tiXmlPointer->ErrorDesc() );
+	}
+}
+
+//*****************************************************************************
+
+Element::Element()
+: NodeImp< TiXmlElement >( new TiXmlElement( "DefaultValueCausedByCreatingAnElementWithNoParameters" ) )
+{
+	m_impRC->InitRef();
+}
+
+Element::Element( const std::string& value )
+: NodeImp< TiXmlElement >( new TiXmlElement( value ) )
+{
+	m_impRC->InitRef();
+}
+
+Element::Element( const char* value )
+: NodeImp< TiXmlElement >( new TiXmlElement( value ) )
+{
+	m_impRC->InitRef();
+}
+
+Element::Element( TiXmlElement* element )
+: NodeImp< TiXmlElement >( element )
+{
+}
+
+Attribute* Element::FirstAttribute( bool throwIfNoAttributes ) const
+{
+	ValidatePointer();
+	TiXmlAttribute* attribute = m_tiXmlPointer->FirstAttribute();
+	if ( ( 0 == attribute ) && throwIfNoAttributes )
+	{
+		TICPPTHROW( "This Element (" << Value() << ") has no attributes" )
+	}
+
+	if ( 0 == attribute )
+	{
+		if( throwIfNoAttributes )
+		{
+			TICPPTHROW( "Element (" << Value() << ") has no attributes" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Attribute* temp = new Attribute( attribute );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+Attribute* Element::LastAttribute( bool throwIfNoAttributes ) const
+{
+	ValidatePointer();
+	TiXmlAttribute* attribute = m_tiXmlPointer->LastAttribute();
+	if ( ( 0 == attribute ) && throwIfNoAttributes )
+	{
+		TICPPTHROW( "This Element (" << Value() << ") has no attributes" )
+	}
+
+	if ( 0 == attribute )
+	{
+		if( throwIfNoAttributes )
+		{
+			TICPPTHROW( "Element (" << Value() << ") has no attributes" )
+		}
+		else
+		{
+			return 0;
+		}
+	}
+
+	Attribute* temp = new Attribute( attribute );
+	m_spawnedWrappers.push_back( temp );
+
+	return temp;
+}
+
+std::string Element::GetAttributeOrDefault( const std::string& name, const std::string& defaultValue ) const
+{
+	std::string value;
+	if ( !GetAttributeImp( name, &value ) )
+	{
+		return defaultValue;
+	}
+	return value;
+}
+
+std::string Element::GetAttribute( const std::string& name ) const
+{
+	return GetAttributeOrDefault( name, std::string() );
+}
+
+bool Element::GetAttributeImp( const std::string& name, std::string* value ) const
+{
+	ValidatePointer();
+
+	// Get value from TinyXML, if the attribute exists
+	const char* retVal = m_tiXmlPointer->Attribute( name.c_str() );
+
+	// TinyXML returns NULL if the attribute doesn't exist
+	if ( 0 == retVal )
+	{
+		return false;
+	}
+	else
+	{
+		*value = retVal;
+		return true;
+	}
+}
+
+bool Element::GetTextImp( std::string* value ) const
+{
+	ValidatePointer();
+
+	// Get value from TinyXML, if the attribute exists
+	const char* retVal = m_tiXmlPointer->GetText();
+
+	// TinyXML returns NULL if the attribute doesn't exist
+	if ( 0 == retVal )
+	{
+		return false;
+	}
+	else
+	{
+		*value = retVal;
+		return true;
+	}
+}
+
+//*****************************************************************************
+
+Declaration::Declaration()
+: NodeImp< TiXmlDeclaration >( new TiXmlDeclaration() )
+{
+	m_impRC->InitRef();
+}
+
+Declaration::Declaration( TiXmlDeclaration* declaration )
+: NodeImp< TiXmlDeclaration >( declaration )
+{
+}
+
+Declaration::Declaration( const std::string& version, const std::string& encoding, const std::string& standalone )
+: NodeImp< TiXmlDeclaration >( new TiXmlDeclaration( version, encoding, standalone ) )
+{
+	m_impRC->InitRef();
+}
+
+std::string Declaration::Version() const
+{
+	return m_tiXmlPointer->Version();
+}
+
+std::string Declaration::Encoding() const
+{
+	return m_tiXmlPointer->Encoding();
+}
+
+std::string Declaration::Standalone() const
+{
+	return m_tiXmlPointer->Standalone();
+}
+
+//*****************************************************************************
+
+StylesheetReference::StylesheetReference()
+: NodeImp< TiXmlStylesheetReference >( new TiXmlStylesheetReference() )
+{
+	m_impRC->InitRef();
+}
+
+StylesheetReference::StylesheetReference( TiXmlStylesheetReference* stylesheetReference )
+: NodeImp< TiXmlStylesheetReference >( stylesheetReference )
+{
+}
+
+StylesheetReference::StylesheetReference( const std::string& type, const std::string& href )
+: NodeImp< TiXmlStylesheetReference >( new TiXmlStylesheetReference( type, href ) )
+{
+	m_impRC->InitRef();
+}
+
+std::string StylesheetReference::Type() const
+{
+	return m_tiXmlPointer->Type();
+}
+
+std::string StylesheetReference::Href() const
+{
+	return m_tiXmlPointer->Href();
+}
+
+//*****************************************************************************
+
+Exception::Exception(const std::string &details)
+:
+m_details( details )
+{
+
+}
+
+Exception::~Exception() throw()
+{
+}
+
+const char* Exception::what() const throw()
+{
+	return m_details.c_str();
+}
+
+//*****************************************************************************
+
+TiCppRC::TiCppRC()
+{
+	// Spawn reference counter for this object
+	m_tiRC = new TiCppRCImp( this );
+}
+
+TiCppRC::~TiCppRC()
+{
+	// Set pointer held by reference counter to NULL
+	this->m_tiRC->Nullify();
+
+	// Decrement reference - so reference counter will delete itself if necessary
+	this->m_tiRC->DecRef();
+}
+
+//*****************************************************************************
+
+TiCppRCImp::TiCppRCImp( TiCppRC* tiCppRC )
+	: m_count( 1 ), m_tiCppRC ( tiCppRC )
+{
+}
+
+void TiCppRCImp::IncRef()
+{
+	m_count++;
+}
+
+void TiCppRCImp::DecRef()
+{
+	m_count--;
+	if ( 0 == m_count )
+	{
+		delete m_tiCppRC;
+		delete this;
+	}
+}
+
+void TiCppRCImp::InitRef()
+{
+	m_count = 1;
+}
+
+void TiCppRCImp::Nullify()
+{
+	m_tiCppRC = 0;
+}
+
+TiCppRC* TiCppRCImp::Get()
+{
+	return m_tiCppRC;
+}
+
+bool TiCppRCImp::IsNull()
+{
+	return 0 == m_tiCppRC;
+}
+
+#endif // TIXML_USE_TICPP
Index: /code/branches/network/src/util/tinyxml/ticpp.h
===================================================================
--- /code/branches/network/src/util/tinyxml/ticpp.h	(revision 861)
+++ /code/branches/network/src/util/tinyxml/ticpp.h	(revision 861)
@@ -0,0 +1,1806 @@
+/*
+http://code.google.com/p/ticpp/
+Copyright (c) 2006 Ryan Pusztai, Ryan Mulder
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+/**
+@copydoc ticpp
+@file
+@author		Ryan Pusztai
+@author		Ryan Mulder
+@date		04/11/2006
+
+@version	0.04a by edam@waxworlds.org: based Exception based on std::exception; added stream
+					<< and >> support; added Document::Parse(); bug fix; improved THROW() macro.
+@version	0.04 Added NodeImp class. Also made all the classes inherit from NodeImp.
+@version	0.03 Added Declaration class
+@version	0.02 Added Element class
+@version	0.01 Added Exception class, Document class
+
+@todo add UNKNOWN support. See ticpp::NodeFactory.
+@todo add TYPECOUNT support. See ticpp::NodeFactory.
+@todo Add a quick reference
+*/
+#ifdef TIXML_USE_TICPP
+
+#ifndef TICPP_INCLUDED
+#define TICPP_INCLUDED
+
+#include "tinyxml.h"
+#include <sstream>
+#include <vector>
+#include <memory>
+#include <exception>
+
+/**
+@subpage ticpp is a TinyXML wrapper that uses a lot more C++ ideals.
+It throws exceptions, uses templates, is in its own name space, and
+<b>requires</b> STL (Standard Template Library). This is done to ease the use
+of getting values in and out of the xml.
+
+If you don't perfer to use some of the concepts just don't use it.
+It is just a wrapper that extends TinyXML. It doesn't actually change
+any of TinyXML.
+*/
+namespace ticpp
+{
+    /**
+	This is a ticpp exception class
+	*/
+	class Exception : public std::exception
+	{
+	public:
+		/**
+		Construct an exception with a message
+		*/
+		Exception( const std::string& details );
+		~Exception() throw();
+
+		/// Override std::exception::what() to return m_details
+		const char* what() const throw();
+
+		std::string m_details; /**< Exception Details */
+	};
+
+	/**
+	This allows you to stream your exceptions in.
+	It will take care of the conversion	and throwing the exception.
+	*/
+	#define TICPPTHROW( message ) 											\
+	{																		\
+		std::ostringstream full_message;									\
+		std::string file( __FILE__ );										\
+		file = file.substr( file.find_last_of( "\\/" ) + 1 );				\
+		full_message << message << " <" << file << "@" << __LINE__ << ">";	\
+		throw Exception( full_message.str() );								\
+	}
+
+	// Forward Declarations for Visitor, and others.
+	class Document;
+	class Element;
+	class Declaration;
+	class StylesheetReference;
+	class Text;
+	class Comment;
+	class Attribute;
+
+	/** Wrapper around TiXmlVisitor */
+	class Visitor : public TiXmlVisitor
+	{
+	public:
+		// Overload the TiXmlVisitor functions, wrap objects, call ticpp::Visitor functions
+		/// @internal
+		virtual bool VisitEnter( const TiXmlDocument& doc );
+		/// @internal
+		virtual bool VisitExit( const TiXmlDocument& doc );
+		/// @internal
+		virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
+		/// @internal
+		virtual bool VisitExit( const TiXmlElement& element );
+		/// @internal
+		virtual bool Visit( const TiXmlDeclaration& declaration );
+		/// @internal
+		virtual bool Visit( const TiXmlStylesheetReference& stylesheet );
+		/// @internal
+		virtual bool Visit( const TiXmlText& text );
+		/// @internal
+		virtual bool Visit( const TiXmlComment& comment );
+
+	public:
+		/// Visit a document.
+		virtual bool VisitEnter( const Document& /*doc*/ )			{ return true; }
+		/// Visit a document.
+		virtual bool VisitExit( const Document& /*doc*/ )			{ return true; }
+
+		/// Visit an element.
+		virtual bool VisitEnter( const Element& /*element*/, const Attribute* /*firstAttribute*/ )	{ return true; }
+		/// Visit an element.
+		virtual bool VisitExit( const Element& /*element*/ )		{ return true; }
+
+		/// Visit a declaration
+		virtual bool Visit( const Declaration& /*declaration*/ )	{ return true; }
+		/// Visit a stylesheet reference
+		virtual bool Visit( const StylesheetReference& /*stylesheet*/ )	{ return true; }
+		/// Visit a text node
+		virtual bool Visit( const Text& /*text*/ )					{ return true; }
+		/// Visit a comment node
+		virtual bool Visit( const Comment& /*comment*/ )			{ return true; }
+	};
+
+	/** Wrapper around TiXmlBase */
+	class Base
+	{
+	public:
+
+		/**
+		Converts any class with a proper overload of the << opertor to a std::string
+		@param value The value to be converted
+		@throws Exception When value cannot be converted to a std::string
+		*/
+		template < class T >
+			std::string ToString( const T& value ) const
+		{
+			std::stringstream convert;
+			convert << value;
+			if ( convert.fail() )
+			{
+				TICPPTHROW( "Could not convert value to text" );
+			}
+			return convert.str();
+		}
+
+		std::string ToString( const std::string& value ) const
+		{
+			return value;
+		}
+
+		/**
+		Converts a std::string to any class with a proper overload of the >> opertor
+		@param temp			The string to be converted
+		@param out	[OUT]	The container for the returned value
+		@throws Exception When temp cannot be converted to the target type
+		*/
+		template < class T >
+			void FromString( const std::string& temp, T* out ) const
+		{
+			std::istringstream val( temp );
+			val >> *out;
+
+			if ( val.fail() )
+			{
+				TICPPTHROW( "Could not convert \"" << temp << "\" to target type" );
+			}
+		}
+
+		/**
+		Specialization for std::string
+		*/
+		void FromString( const std::string& temp, std::string* out ) const
+		{
+			*out = temp;
+		}
+
+		/**
+		Return the position, in the original source file, of this node or attribute.
+		Wrapper around TiXmlBase::Row()
+		*/
+		int Row() const
+		{
+			return GetBasePointer()->Row();
+		}
+
+		/**
+		Return the position, in the original source file, of this node or attribute.
+		Wrapper around TiXmlBase::Row()
+		*/
+		int Column() const
+		{
+			return GetBasePointer()->Column();
+		}
+
+		/**
+		Destructor
+		*/
+		virtual ~Base()
+		{
+			DeleteSpawnedWrappers();
+		}
+
+	protected:
+		mutable TiCppRCImp* m_impRC;	/**< Holds status of internal TiXmlPointer - use this to determine if object has been deleted already */
+
+		mutable std::vector< Base* > m_spawnedWrappers; /**< Remember all wrappers that we've created with 'new' - ( e.g. NodeFactory, FirstChildElement, etc. )*/
+
+		/**
+		@internal
+		Updates the pointer to the reference counter to point at the counter in the new node.
+
+		@param node TiXmlBase containing the new reference counter
+		*/
+		void SetImpRC( TiXmlBase* node )
+		{
+			m_impRC = node->m_tiRC;
+		}
+
+		void ValidatePointer() const
+		{
+			if ( m_impRC->IsNull() )
+			{
+				TICPPTHROW( "Internal TiXml Pointer is NULL" );
+			}
+		}
+
+		/**
+		@internal
+		Delete all container objects we've spawned with 'new'.
+		*/
+		void DeleteSpawnedWrappers()
+		{
+			std::vector< Base* >::reverse_iterator wrapper;
+			for ( wrapper = m_spawnedWrappers.rbegin(); wrapper != m_spawnedWrappers.rend(); ++wrapper )
+			{
+				delete *wrapper;
+			}
+			m_spawnedWrappers.clear();
+		}
+
+		/**
+		@internal
+		Get internal TiXmlBase*
+		*/
+		virtual TiXmlBase* GetBasePointer() const = 0;
+	};
+
+	/**
+	Wrapper around TiXmlAttribute
+	*/
+	class Attribute : public Base
+	{
+	private:
+		TiXmlAttribute* m_tiXmlPointer;
+		TiXmlBase* GetBasePointer() const
+		{
+			ValidatePointer();
+			return m_tiXmlPointer;
+		}
+
+	public:
+		/**
+		Construct an empty attribute.
+		*/
+		Attribute();
+
+		/**
+		Construct an attribute with @a name and @a value
+
+		@param name The name of the attribute
+		@param value The value of the attribute
+		*/
+		Attribute( const std::string& name, const std::string& value );
+
+		/**
+		@internal
+		Construct an attribute with the internal pointer
+
+		@param attribute The internal pointer
+		*/
+		Attribute( TiXmlAttribute* attribute );
+
+		/**
+		Get the value of this attribute
+		Uses Base::FromString to convert TiXmlAttribute::ValueStr from a std::string,
+		and puts it in the passed pointer.
+
+		@param value [OUT] A pointer to fill with the value
+		*/
+		template < class T >
+			void GetValue( T* value ) const
+		{
+			ValidatePointer();
+			FromString( m_tiXmlPointer->ValueStr(), value );
+		}
+
+		/**
+		Get the value of this attribute.
+		Simple wrapper for TiXmlAttribute::ValueStr.
+
+		@see GetValue
+		*/
+		std::string Value() const;
+
+		/**
+		Set the value of this node.
+		Uses Base::ToString to convert value to a std::string, then calls TiXmlAttribute::SetValue.
+
+		@param value The value to set
+		*/
+		template < class T >
+			void SetValue( const T& value )
+		{
+			ValidatePointer();
+			m_tiXmlPointer->SetValue( ToString( value ) );
+		}
+
+		/**
+		Get the value of this attribute
+		Uses Base::FromString to convert TiXmlAttribute::Name from a std::string,
+		and puts it in the passed pointer.
+
+		@param name [OUT] A pointer to fill with the name
+		*/
+		template < class T >
+			void GetName( T* name ) const
+		{
+			ValidatePointer();
+			FromString( m_tiXmlPointer->Name(), name );
+		}
+
+		/**
+		Get the value of this attribute.
+		Simple wrapper for TiXmlAttribute::Name.
+
+		@see GetName
+		*/
+		std::string Name() const;
+
+		/**
+		Set the value of this attribute.
+		Uses Base::ToString to convert @a name to a std::string, then calls TiXmlAttribute::SetName.
+
+		@param name The name to set
+		*/
+		template < class T >
+			void SetName( const T& name )
+		{
+			ValidatePointer();
+			m_tiXmlPointer->SetName( ToString( name ) );
+		}
+
+		/**
+		@internal
+		Updates the reference count for the old and new pointers.
+		*/
+		void operator=( const Attribute& copy );
+
+		/**
+		@internal
+		Updates the reference count for the old and new pointers.
+		*/
+		Attribute( const Attribute& copy );
+
+		/*
+		Decrements reference count.
+		*/
+		~Attribute();
+
+		/**
+		Get the next sibling attribute in the DOM.
+		*/
+		Attribute* Next( bool throwIfNoAttribute = true ) const;
+
+		/**
+		Get the previous sibling attribute in the DOM.
+		*/
+		Attribute* Previous( bool throwIfNoAttribute = true ) const;
+
+		/**
+		@internal
+		Just for Iterator<>
+
+		@param next [OUT] The pointer to the next valid attribute
+		@return true if there is a next attribute, false if not
+		*/
+		void IterateNext( const std::string&, Attribute** next ) const;
+
+		/**
+		@internal
+		Just for Iterator<>
+
+		@param previous [OUT] The pointer to the previous valid attribute
+		@return true if there is a previous attribute, false if not
+		*/
+		void IteratePrevious( const std::string&, Attribute** previous ) const;
+
+		/**
+		All TinyXml classes can print themselves to a filestream.
+		*/
+		virtual void Print( FILE* file, int depth ) const;
+
+	private:
+
+		/**
+		@internal
+		Sets the internal pointer.
+		Saves a copy of the pointer to the RC object.
+
+		@param newPointer TiXmlAttribute* to set.
+		*/
+		void SetTiXmlPointer( TiXmlAttribute* newPointer );
+	};
+
+	/**
+	Wrapper around TiXmlNode
+	*/
+	class Node : public Base
+	{
+	public:
+
+		/**
+		Get the value of this node
+		Uses Base::FromString to convert TiXmlNode::ValueStr from a std::string,
+		and puts it in the passed pointer.
+
+		@param value [OUT] A pointer to fill with the value
+		*/
+		template < class T >
+			void GetValue( T* value) const
+		{
+			FromString( GetTiXmlPointer()->ValueStr(), value );
+		}
+
+		/**
+		Get the value of this node.
+		Simple wrapper for TiXmlNode::ValueStr.
+
+		@see GetValue
+		*/
+		std::string Value() const;
+
+		/**
+		Set the value of this node.
+		Uses Base::ToString to convert value to a std::string, then calls TiXmlNode::SetValue.
+
+		@param value The value to set
+		*/
+		template < class T >
+			void SetValue( const T& value )
+		{
+			GetTiXmlPointer()->SetValue( ToString( value ) );
+		}
+
+		/**
+		Clear all Nodes below this.
+		Simple wrapper for TiXmlNode::Clear.
+		*/
+		void Clear();
+
+		/**
+		The Parent of this Node.
+		Simple wrapper for TiXmlNode::Parent.
+
+		@param throwIfNoParent [DEF] If true, throws when Parent = NULL.
+		@return The parent of this node, NULL if there is no Parent.
+		@throws Exception When throwIfNoParent is true, and TiXmlNode::Parent returns Null.
+		*/
+		Node* Parent( bool throwIfNoParent = true ) const;
+
+		/**
+		The first child of this node.
+
+		@param throwIfNoChildren [DEF] If true, will throw an exception if there are no children.
+		@return Pointer to child, Null if no children and 'throwIfNoChildren' is false.
+		@throws Exception When throwIfNoChildren is true, and TiXmlNode::FirstChild returns Null.
+
+		@see TiXmlNode::FirstChild
+		*/
+		Node* FirstChild( bool throwIfNoChildren = true ) const;
+
+		/**
+		@internal
+		The first child of this node with the matching @a value.
+
+		@overload
+		@param value				Value to match.
+		@param throwIfNoChildren	[DEF] If true, will throw an exception if there are no children.
+
+		@see FirstChild( bool throwIfNoChildren = true )
+		*/
+		Node* FirstChild( const char* value, bool throwIfNoChildren = true ) const;
+
+		/**
+		The first child of this node with the matching @a value.
+
+		@overload
+		@param value				Value to match.
+		@param throwIfNoChildren	[DEF] If true, will throw an exception if there are no children.
+
+		@see FirstChild( const char* value, bool throwIfNoChildren = true )
+		*/
+		Node* FirstChild( const std::string& value, bool throwIfNoChildren = true ) const;
+
+		/**
+		The last child of this node.
+
+		@param throwIfNoChildren [DEF] If true, will throw an exception if there are no children.
+		@return Pointer to child, Null if no children and 'throwIfNoChildren' is false.
+		@throws Exception When throwIfNoChildren is true, and TiXmlNode::LastChild returns Null.
+
+		@see TiXmlNode::LastChild
+		*/
+		Node* LastChild( bool throwIfNoChildren = true ) const;
+
+		/**
+		@internal
+		The last child of this node with the matching @a value.
+
+		@overload
+		@param value				Value to match.
+		@param throwIfNoChildren	[DEF] If true, will throw an exception if there are no children.
+
+		@see LastChild( bool throwIfNoChildren = true )
+		*/
+		Node* LastChild( const char* value, bool throwIfNoChildren = true ) const;
+
+		/**
+		The last child of this node with the matching @a value.
+
+		@overload
+		@param value				Value to match.
+		@param throwIfNoChildren	[DEF] If true, will throw an exception if there are no children.
+
+		@see LastChild( const char* value, bool throwIfNoChildren = true )
+		*/
+		Node* LastChild( const std::string& value, bool throwIfNoChildren = true ) const;
+
+		/**
+		An alternate way to walk the children of a node.
+		Simple wrapper for TiXmlNode::IterateChildren.
+
+		@param previous The previous Node* that was returned from IterateChildren.
+		@return NULL When there are no more children.
+		*/
+		Node* IterateChildren( Node* previous ) const;
+
+		/**
+		This flavor of IterateChildren searches for children with a particular @a value.
+		Simple wrapper for TiXmlNode::IterateChildren.
+
+		@param value	The value you want to search for.
+		@param previous The previous Node* that was returned from IterateChildren.
+		@return NULL When there are no more children.
+		*/
+		Node* IterateChildren( const std::string& value, Node* previous ) const;
+
+		/**
+		Adds a child past the LastChild.
+		Throws if you try to insert a document.
+
+		@note This takes a copy of @a addThis so it is not as efficiant as LinkEndChild.
+		@param addThis Node to insert.
+		@throws Exception When TiXmlNode::InsertEndChild returns Null
+
+		@see LinkEndChild
+		@see TiXmlNode::InsertEndChild
+		*/
+		Node* InsertEndChild( Node& addThis );
+
+		/**
+		Adds a child past the LastChild.
+		Throws if you try to link a document.
+
+		@param childNode Node to link.
+		@throws Exception When TiXmlNode::LinkEndChild returns Null.
+
+		@see InsertEndChild
+		@see TiXmlNode::LinkEndChild
+		*/
+		Node* LinkEndChild( Node* childNode );
+
+		/**
+		Adds a child before the specified child.
+		Throws if you try to insert a document.
+
+		@param beforeThis	Node that will have @a addThis linked before.
+		@param addThis		Node to insert before.
+		@throws Exception When TiXmlNode::InsertBeforeChild returns Null.
+
+		@see InsertAfterChild
+		@see TiXmlNode::InsertBeforeChild
+		*/
+		Node* InsertBeforeChild( Node* beforeThis, Node& addThis );
+
+		/**
+		Adds a child after the specified child.
+		Throws if you try to insert a document.
+
+		@param afterThis	Node that will have @a addThis linked after.
+		@param addThis		Node to insert after.
+		@throws Exception When TiXmlNode::InsertAfterChild returns Null.
+
+		@see InsertBeforeChild
+		@see TiXmlNode::InsertAfterChild
+		*/
+		Node* InsertAfterChild( Node* afterThis, Node& addThis );
+
+		/**
+		Replace a child of this node.
+		Throws if you try to replace with a document.
+
+		@param replaceThis	Node to replace.
+		@param withThis		Node that is replacing @a replaceThis.
+		@throws Exception When TiXmlNode::ReplaceChild returns Null.
+
+		@see TiXmlNode::ReplaceChild
+		*/
+		Node* ReplaceChild( Node* replaceThis, Node& withThis );
+
+		/**
+		Delete a child of this node.
+
+		@param removeThis Node to delete.
+		@throws Exception When removeThis is not a child of this Node.
+
+		@see TiXmlNode::RemoveChild
+		*/
+		void RemoveChild( Node* removeThis );
+
+		/**
+		Navigate to a sibling node.
+		Wrapper around TiXmlNode::PreviousSibling.
+
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no siblings.
+		@return Pointer to sibling, Null if no siblings and 'throwIfNoSiblings' is false.
+		@throws Exception When TiXmlNode::PreviousSibling returns Null and 'throwIfNoSiblings' is true.
+		*/
+		Node* PreviousSibling( bool throwIfNoSiblings = true ) const;
+
+		/**
+		Navigate to a sibling node with the given @a value.
+
+		@overload
+		@param value The value of the node to look for.
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no siblings.
+
+		@see PreviousSibling( bool throwIfNoSiblings )
+		*/
+		Node* PreviousSibling( const std::string& value, bool throwIfNoSiblings = true ) const;
+
+		/**
+		@internal
+		Navigate to a sibling node with the given @a value.
+
+		@overload
+		@param value The value of the node to look for.
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no siblings.
+
+		@see PreviousSibling( const std::string& value, bool throwIfNoSiblings )
+		*/
+		Node* PreviousSibling( const char* value, bool throwIfNoSiblings = true ) const;
+
+		/**
+		Navigate to a sibling node.
+		Wrapper around TiXmlNode::NextSibling.
+
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no siblings.
+		@return Pointer to sibling, Null if no siblings and 'throwIfNoSiblings' is false.
+		@throws Exception When TiXmlNode::NextSibling returns Null and 'throwIfNoSiblings' is true.
+		*/
+		Node* NextSibling( bool throwIfNoSiblings = true ) const;
+
+		/**
+		Navigate to a sibling node with the given @a value.
+
+		@overload
+		@param value The value of the node to look for.
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no siblings.
+
+		@see NextSibling( bool throwIfNoSiblings )
+		*/
+		Node* NextSibling( const std::string& value, bool throwIfNoSiblings = true ) const;
+
+		/**
+		@internal
+		Navigate to a sibling node with the given @a value.
+
+		@overload
+		@param value The value of the node to look for.
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no siblings.
+
+		@see NextSibling( const std::string& value, bool throwIfNoSiblings )
+		*/
+		Node* NextSibling( const char* value, bool throwIfNoSiblings = true ) const;
+
+		/**
+		@internal
+		Just for Iterator<>
+
+		@param value The value of nodes to iterate through
+		@param next [OUT] The pointer to the first valid node
+		*/
+		template < class T >
+			void IterateFirst( const std::string& value, T** first ) const
+		{
+			*first = 0;
+			for( Node* child = FirstChild( value, false ); child; child = child->NextSibling( value, false ) )
+			{
+				*first = dynamic_cast< T* >( child );
+				if ( 0 != *first )
+				{
+					return;
+				}
+			}
+		}
+
+		virtual	void IterateFirst( const std::string&, Attribute** ) const
+		{
+			TICPPTHROW( "Attributes can only be iterated with Elements." )
+		}
+
+		/**
+		@internal
+		Just for Iterator<>
+
+		@param value The value of nodes to iterate through
+		@param next [OUT] The pointer to the next valid node
+		*/
+		template < class T >
+			void IterateNext( const std::string& value, T** next ) const
+		{
+			Node* sibling = NextSibling( value, false );
+			*next = dynamic_cast< T* >( sibling );
+
+			while ( ( 0 != sibling ) && ( 0 == *next ) )
+			{
+				sibling = sibling->NextSibling( value, false );
+				*next = dynamic_cast< T* >( sibling );
+			}
+		}
+
+		/**
+		@internal
+		Just for Iterator<>
+
+		@param value The value of nodes to iterate through
+		@param previous [OUT] The pointer to the previous valid node
+		*/
+		template < class T >
+			void IteratePrevious( const std::string& value, T** previous  ) const
+		{
+			Node* sibling = PreviousSibling( value, false );
+			*previous = dynamic_cast< T* >( sibling );
+
+			while ( ( 0 != sibling ) && ( 0 == *previous ) )
+			{
+				sibling = sibling->PreviousSibling( value, false );
+				*previous = dynamic_cast< T* >( sibling );
+			}
+		}
+
+		/**
+		Navigate to a sibling element.
+		Wrapper around TiXmlNode::NextSibling.
+
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no sibling element.
+		@return Pointer to sibling, Null if no siblings and 'throwIfNoSiblings' is false.
+		@throws Exception When TiXmlNode::NextSibling returns Null and 'throwIfNoSiblings' is true.
+		*/
+		Element* NextSiblingElement( bool throwIfNoSiblings = true ) const;
+
+		/**
+		Navigate to a sibling element with the given @a value.
+
+		@overload
+		@param value The value of the element to look for.
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no sibling elements.
+		@see NextSiblingElement( bool throwIfNoSiblings )
+		*/
+		Element* NextSiblingElement( const std::string& value, bool throwIfNoSiblings = true ) const;
+
+		/**
+		@internal
+		Navigate to a sibling element with the given @a value.
+
+		@overload
+		@param value The value of the element to look for.
+		@param throwIfNoSiblings [DEF] If true, will throw an exception if there are no sibling elements.
+
+		@see NextSiblingElement( const std::string& value, bool throwIfNoSiblings )
+		*/
+		Element* NextSiblingElement( const char* value, bool throwIfNoSiblings = true ) const;
+
+		/**
+		The first child element of this node.
+
+		@param throwIfNoChildren [DEF] If true, will throw an exception if there are no element children.
+		@return Pointer to child, Null if no element children and 'throwIfNoChildren' is false.
+		@throws Exception When throwIfNoChildren is true, and TiXmlNode::FirstChildElement returns Null.
+
+		@see TiXmlNode::FirstChildElement
+		*/
+		Element* FirstChildElement( bool throwIfNoChildren = true ) const;
+
+		/**
+		@internal
+		The first child element of this node with the matching @a value.
+
+		@overload
+		@param value Value to match.
+		@param throwIfNoChildren [DEF] If true, will throw an exception if there are no element children.
+
+		@see FirstChildElement( bool throwIfNoChildren = true )
+		*/
+		Element* FirstChildElement( const char* value, bool throwIfNoChildren = true ) const;
+
+		/**
+		The first child element of this node with the matching @a value.
+
+		@overload
+		@param value Value to match.
+		@param throwIfNoChildren [DEF] If true, will throw an exception if there are no element children.
+
+		@see FirstChildElement( const char* value, bool throwIfNoChildren = true )
+		*/
+		Element* FirstChildElement( const std::string& value, bool throwIfNoChildren = true ) const;
+
+		/**
+		Query the type (as TiXmlNode::NodeType ) of this node.
+		*/
+		int Type() const;
+
+		/**
+		Return a pointer to the Document this node lives in.
+
+		@param throwIfNoDocument [DEF] If true, will throw an exception if this node is not linked under a Document.
+		@return A pointer to the Document this node lives in, NULL if not linked under a Document, and 'throwIfNoDocument' is false.
+		@throws Exception When this node is not linked under a Document and 'throwIfNoDocument' is true.
+		*/
+		Document* GetDocument( bool throwIfNoDocument = true ) const;
+
+		/**
+		Check if this node has no children.
+
+		@return true if this node has no children.
+		*/
+		bool NoChildren() const;
+
+		/**
+		Pointer conversion ( NOT OBJECT CONVERSION ) - replaces TiXmlNode::ToElement, TiXmlNode::ToDocument, TiXmlNode::ToComment, etc.
+
+		@throws Exception When the target is not an object of class T
+		@warning Some ancient compilers do not support explicit specification of member template arguments, which this depends on ( e.g. VC6 ).
+		*/
+		template < class T >
+			T* To() const
+		{
+			T* pointer = dynamic_cast< T* >( this );
+			if ( 0 == pointer )
+			{
+				std::string thisType = typeid( this ).name();
+				std::string targetType = typeid( T ).name();
+				std::string thatType = typeid( *this ).name();
+				TICPPTHROW( "The " << thisType.substr( 6 ) << " could not be casted to a " << targetType.substr( 6 )
+					<< " *, because the target object is not a " << targetType.substr( 6 ) << ". (It is a " << thatType.substr( 6 ) << ")" );
+			}
+			return pointer;
+		}
+
+		/**
+		Pointer conversion - replaces TiXmlNode::ToDocument.
+
+		@throws Exception When this node is not a Document.
+		*/
+		Document* ToDocument() const;
+
+		/**
+		Pointer conversion - replaces TiXmlNode::ToElement.
+
+		@throws Exception When this node is not a Element.
+		*/
+		Element* ToElement() const;
+
+		/**
+		Pointer conversion - replaces TiXmlNode::ToComment.
+
+		@throws Exception When this node is not a Comment.
+		*/
+		Comment* ToComment() const;
+
+		/**
+		Pointer conversion - replaces TiXmlNode::ToText.
+
+		@throws Exception When this node is not a Text.
+		*/
+		Text* ToText() const;
+
+		/**
+		Pointer conversion - replaces TiXmlNode::ToDeclaration.
+
+		@throws Exception When this node is not a Declaration.
+		*/
+		Declaration* ToDeclaration() const;
+
+		/**
+		Pointer conversion - replaces TiXmlNode::ToStylesheetReference.
+
+		@throws Exception When this node is not a StylesheetReference.
+		*/
+		StylesheetReference* ToStylesheetReference() const;
+
+		/**
+		Create an exact duplicate of this node and return it.
+
+		@note Using auto_ptr to manage the memory declared on the heap by TiXmlNode::Clone.
+		@code
+		// Now using clone
+		ticpp::Document doc( "C:\\Test.xml" );
+		ticpp::Node* sectionToClone;
+		sectionToClone = doc.FirstChild( "settings" );
+		std::auto_ptr< ticpp::Node > clonedNode = sectionToClone->Clone();
+		// Now you can use the clone.
+		ticpp::Node* node2 = clonedNode->FirstChildElement()->FirstChild();
+		...
+		// After the variable clonedNode goes out of scope it will automatically be cleaned up.
+		@endcode
+		@return Pointer the duplicate node.
+		*/
+		std::auto_ptr< Node > Clone() const;
+
+		/**
+		Accept a hierchical visit the nodes in the TinyXML DOM.
+		@return The boolean returned by the visitor.
+		*/
+		bool Accept( TiXmlVisitor* visitor ) const;
+
+		/**
+ 		Stream input operator.
+ 		*/
+ 		friend std::istream& operator >>( std::istream& in, Node& base )
+ 		{
+ 			in >> *base.GetTiXmlPointer();
+ 			return in;
+ 		}
+
+ 		/**
+ 		Stream output operator.
+ 		*/
+ 		friend std::ostream& operator <<( std::ostream& out, Node& base )
+ 		{
+ 			out << *base.GetTiXmlPointer();
+ 			return out;
+ 		}
+
+	protected:
+		/**
+		@internal
+		Allows NodeImp to use Node*'s.
+		*/
+		virtual TiXmlNode* GetTiXmlPointer() const = 0;
+
+		TiXmlBase* GetBasePointer() const
+		{
+			return GetTiXmlPointer();
+		}
+
+		/**
+		@internal
+		Constructs the correct child of Node, based on the Type of the TiXmlNode*.
+		*/
+		Node* NodeFactory( TiXmlNode* tiXmlNode, bool throwIfNull = true, bool rememberSpawnedWrapper = true ) const;
+
+	};
+
+	/** Iterator for conveniently stepping through Nodes and Attributes.
+	TinyXML++ introduces iterators:
+	@code
+	ticpp::Iterator< ticpp::Node > child;
+	for ( child = child.begin( parent ); child != child.end(); child++ )
+	@endcode
+
+	Iterators have the added advantage of filtering by type:
+	@code
+	// Only iterates through Comment nodes
+	ticpp::Iterator< ticpp::Comment > child;
+	for ( child = child.begin( parent ); child != child.end(); child++ )
+	@endcode
+
+	@code
+	// Only iterates through Element nodes with value "ElementValue"
+	ticpp::Iterator< ticpp::Element > child( "ElementValue" );
+	for ( child = child.begin( parent ); child != child.end(); child++ )
+	@endcode
+
+	Finally, Iterators also work with Attributes
+	@code
+	ticpp::Iterator< ticpp::Attribute > attribute;
+	for ( attribute = attribute.begin( element ); attribute != attribute.end(); attribute++ )
+	@endcode
+	*/
+	template < class T = Node >
+		class Iterator
+	{
+	private:
+		T* m_p;					/**< Internal Pointer */
+		std::string m_value;	/**< Value for NextSibling  calls */
+
+	public:
+
+		/**
+		For for loop comparisons.
+		@param parent The parent of the nodes to iterate.
+		@return The first child of type T.
+		@code
+		ticpp::Iterator< ticpp::Node > child;
+		for ( child = child.begin( parent ); child != child.end(); child++ )
+		@endcode
+		*/
+		T* begin( const Node* parent ) const
+		{
+			T* pointer;
+			parent->IterateFirst( m_value, &pointer );
+			return pointer;
+		}
+
+		/**
+		For for loop comparisons.
+		@return NULL
+		@code
+		ticpp::Iterator< ticpp::Node > child;
+		for ( child = child.begin( parent ); child != child.end(); child++ )
+		@endcode
+		*/
+		T* end() const
+		{
+			return 0;
+		}
+
+		/** Constructor.
+		@param value If not empty, this iterator will only visit nodes with matching value.
+		@code
+		// Only iterates through Element nodes with value "ElementValue"
+		ticpp::Iterator< ticpp::Element > child( "ElementValue" );
+		for ( child = child.begin( parent ); child != child.end(); child++ )
+		@endcode
+		*/
+		Iterator( const std::string& value = "" )
+			: m_p( 0 ), m_value( value )
+		{
+		}
+
+		/// Constructor
+		Iterator( T* node, const std::string& value = "" )
+			: m_p( node ), m_value( value )
+		{
+		}
+
+		/// Constructor
+		Iterator( const Iterator& it, const std::string& value  = "" )
+			: m_p( it.m_p ), m_value( value )
+		{
+		}
+
+		/**
+		Gets internal pointer.
+		@return The internal pointer.
+		*/
+		T* Get() const
+		{
+			return m_p;
+		}
+
+		/** Sets internal pointer */
+		Iterator& operator=( const Iterator& it )
+		{
+			m_p = it.m_p;
+			return *this;
+		}
+
+		/** Sets internal pointer */
+		Iterator& operator=( T* p )
+		{
+			m_p = p;
+			return *this;
+		}
+
+		/** Sets internal pointer to the Next Sibling, or Iterator::END, if there are no more siblings */
+		Iterator& operator++()
+		{
+			m_p->IterateNext( m_value, &m_p );
+			return *this;
+		}
+
+		/** Sets internal pointer to the Next Sibling, or Iterator::END, if there are no more siblings */
+		Iterator& operator++(int)
+		{
+			return this->operator ++();
+		}
+
+		/** Sets internal pointer to the Previous Sibling, or Iterator::END, if there are no prior siblings */
+		Iterator& operator--()
+		{
+			m_p->IteratePrevious( m_value, &m_p );
+			return *this;
+		}
+
+		/** Sets internal pointer to the Previous Sibling, or Iterator::END, if there are no prior siblings */
+		Iterator& operator--(int)
+		{
+			return this->operator --();
+		}
+
+		/** Compares internal pointer */
+		bool operator!=( T* p ) const
+		{
+			return m_p != p;
+		}
+
+		/** Compares internal pointer */
+		bool operator!=( const Iterator& it ) const
+		{
+			return m_p != it.m_p;
+		}
+
+		/** Compares internal pointer* */
+		bool operator==( T* p ) const
+		{
+			return m_p == p;
+		}
+
+		/** Compares internal pointer */
+		bool operator==( const Iterator& it ) const
+		{
+			return m_p == it.m_p;
+		}
+
+		/** So Iterator behaves like a STL iterator */
+		T* operator->() const
+		{
+			return m_p;
+		}
+
+		/** So Iterator behaves like a STL iterator */
+		T& operator*() const
+		{
+			return *m_p;
+		}
+	};
+
+	/** Implementation of Node wrapper */
+	template < class T >
+		class NodeImp : public Node
+	{
+	protected:
+
+		T* m_tiXmlPointer;		/**< Internal pointer to the TiXml Class which is being wrapped */
+
+		/**
+		@internal
+		Gets the internal TinyXML pointer.
+
+		@returns The internal TiXmlNode*.
+		*/
+		TiXmlNode* GetTiXmlPointer() const
+		{
+			ValidatePointer();
+			return m_tiXmlPointer;
+		}
+
+		/**
+		@internal
+		Sets the internal pointer.
+		Saves a copy of the pointer to the RC object.
+
+		@param newPointer TiXmlNode* to set.
+		*/
+		void SetTiXmlPointer( T* newPointer )
+		{
+			m_tiXmlPointer = newPointer;
+			SetImpRC( newPointer );
+		}
+
+		/**
+		@internal
+		Constructor used by child classes.
+		*/
+		NodeImp( T* tiXmlPointer )
+		{
+			// Check for NULL pointers
+			if ( 0 == tiXmlPointer )
+			{
+				TICPPTHROW( "Can not create a " << typeid( T ).name() );
+			}
+			SetTiXmlPointer( tiXmlPointer );
+			m_impRC->IncRef();
+		}
+
+		/**
+		@internal
+		Updates the reference count for the old and new pointers.
+		In addition, the spawnedWrappers must be cleared out before a new TiXml object is loaded in.
+		*/
+		virtual void operator=( const NodeImp<T>& copy )
+		{
+			DeleteSpawnedWrappers();
+
+			// Dropping the reference to the old object
+			this->m_impRC->DecRef();
+
+			// Pointing to the new Object
+			SetTiXmlPointer( copy.m_tiXmlPointer );
+
+			// The internal tixml pointer changed in the above line
+			this->m_impRC->IncRef();
+		}
+
+		/**
+		@internal
+		Updates the reference count for the old and new pointers.
+		In addition, the spawnedWrappers must be cleared out before a new TiXml object is loaded in
+		*/
+		NodeImp( const NodeImp<T>& copy ) : Node( copy )
+		{
+			// Pointing to the new Object
+			SetTiXmlPointer( copy.m_tiXmlPointer );
+
+			// The internal tixml pointer changed in the above line
+			this->m_impRC->IncRef();
+		}
+
+	public:
+
+		/*
+		Deletes the spawned wrapper objects.
+		Decrements reference count.
+		*/
+		virtual ~NodeImp()
+		{
+			// The spawnedWrappers need to be deleted before m_tiXmlPointer
+			DeleteSpawnedWrappers();
+			m_impRC->DecRef();
+		}
+	};
+
+	/** Wrapper around TiXmlComment */
+	class Comment : public NodeImp< TiXmlComment >
+	{
+	public:
+
+		/**
+		Constructor.
+		*/
+		Comment();
+
+		/**
+		Constructor.
+		*/
+		Comment( TiXmlComment* comment );
+
+		/**
+		Constructor.
+		*/
+		Comment( const std::string& comment );
+	};
+
+	/** Wrapper around TiXmlText */
+	class Text : public NodeImp< TiXmlText >
+	{
+	public:
+
+		/**
+		Constructor.
+		*/
+		Text();
+
+		/**
+		Constructor.
+		@overload
+		*/
+		Text( TiXmlText* text );
+
+		/**
+		Constructor.
+		@overload
+		*/
+		Text( const std::string& value );
+
+		/**
+		Streams value into a string and creates a Text with it.
+		Uses ToString to covert the parameter to a string.
+
+		@param value The value of the Text node.
+		@throws Exception
+
+		@see TiXmlText
+        */
+		template < class T >
+			Text( const T& value )
+				: NodeImp< TiXmlText >( new TiXmlText( ToString( value ) ) )
+		{
+			m_impRC->InitRef();
+		}
+	};
+
+	/** Wrapper around TiXmlDocument */
+	class Document : public NodeImp< TiXmlDocument >
+	{
+	public:
+		/**
+		Default	Constructor.
+		Create an empty document, that has no name.
+		*/
+		Document();
+
+		/**
+		Constructor.
+		*/
+		Document( TiXmlDocument* document );
+
+		/**
+		Constructor.
+		*/
+		Document( const char* documentName );
+
+		/**
+		Constructor.
+		Create a document with a name. The name of the document is also the filename of the xml.
+
+		@param documentName Name to set in the Document.
+		*/
+		Document( const std::string& documentName );
+
+		/**
+		Load a file using the current document value. Throws if load is unsuccessful.
+
+		@param encoding Sets the documents encoding.
+		@see TiXmlEncoding
+		@throws Exception
+		*/
+		void LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+
+		/**
+		Save a file using the current document value. Throws if it can't save the file.
+
+		@throws Exception
+		*/
+		void SaveFile() const;
+
+		/**
+		Load a file using the given filename. Throws if load is unsuccessful.
+
+		@param filename File to load.
+		@param encoding Sets the documents encoding.
+		@see TiXmlEncoding
+		@throws Exception
+		*/
+		void LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+
+		/**
+		@copydoc Document::LoadFile( const std::string&, TiXmlEncoding )
+		*/
+		void LoadFile( const char* filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+
+		/**
+		Save a file using the given filename. Throws if it can't save the file.
+
+		@param filename File to save.
+		@throws Exception
+		*/
+		void SaveFile( const std::string& filename ) const;
+
+		/**
+		Parse the given xml data.
+
+		@param xml Xml to parse.
+		@param throwIfParseError [DEF] If true, throws when there is a parse error.
+		@param encoding Sets the documents encoding.
+		@throws Exception
+		*/
+		void Parse( const std::string& xml, bool throwIfParseError = true, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+	};
+
+	/** Wrapper around TiXmlElement */
+	class Element : public NodeImp< TiXmlElement >
+	{
+	public:
+		/**
+		Default Constructor.
+		*/
+		Element();
+
+		/**
+		Default	Constructor. Initializes all the variables.
+		@param value The value of the element.
+		*/
+		Element( const std::string& value );
+
+		/**
+		Default	Constructor. Initializes all the variables.
+		@param value The value of the element.
+		*/
+		Element( const char* value );
+
+		/**
+		Constructor.
+		*/
+		Element( TiXmlElement* element );
+
+		/**
+		Constructor that allows you to set the element text
+		@param value The value of the element.
+		@param text The text to set.
+		*/
+		template < class T >
+			Element( const std::string& value, const T& text )
+			: NodeImp< TiXmlElement >( new TiXmlElement( value ) )
+		{
+			m_impRC->InitRef();
+			SetText( text );
+		}
+
+		/**
+		Access the first attribute in this element.
+
+		@param throwIfNoAttributes [DEF] If true, throws when there are no attributes
+		@return The first attribute, NULL if there are none and @a throwIfNoAttributes is true
+		*/
+		Attribute* FirstAttribute( bool throwIfNoAttributes = true ) const;
+
+		/**
+		Access the last attribute in this element.
+
+		@param throwIfNoAttributes [DEF] If true, throws when there are no attributes
+		@return The last attribute, NULL if there are none and @a throwIfNoAttributes is true
+		*/
+		Attribute* LastAttribute( bool throwIfNoAttributes = true ) const;
+
+		/**
+		@internal
+		Just for Iterator<>
+
+		@param value The value of nodes to iterate through
+		@param next [OUT] The pointer to the first valid node
+		*/
+		void IterateFirst( const std::string&, Attribute** first ) const
+		{
+			*first = 0;
+			for( Attribute* child = FirstAttribute( false ); child; child = child->Next( false ) )
+			{
+				*first = dynamic_cast< Attribute* >( child );
+				if ( 0 != *first )
+				{
+					return;
+				}
+			}
+		}
+
+		/**
+		Sets an attribute of name to a given value.
+		The attribute will be created if it does not exist, or changed if it does.
+		Uses ToString to convert the @a value to a string, so there is no need to use any other SetAttribute methods.
+
+		@see GetAttribute
+		*/
+		template < class T >
+			void SetAttribute ( const std::string& name, const T& value )
+		{
+			ValidatePointer();
+			m_tiXmlPointer->SetAttribute( name, ToString( value ) );
+		}
+
+		/**
+		Gets the text of an Element.
+
+		@param throwIfNotFound	[DEF]	If true, will throw an exception if there is no text in this element
+		@note This only works if the Text is the FirstChild node
+		@throws Exception When there is no text and throwIfNotFound is true
+
+		@see GetText( T* value, bool throwIfNotFound = false )
+		@see GetTextOrDefault
+		@see GetTextOrDefault( T* value, const DefaultT& defaultValue )
+		@see TiXmlElement::GetText
+		*/
+		std::string GetText( bool throwIfNotFound = true ) const
+		{
+			// Get the element's text value as a std::string
+			std::string temp;
+			if ( !GetTextImp( &temp ) )
+			{
+				if ( throwIfNotFound )
+				{
+					TICPPTHROW( "Text does not exists in the current element" );
+				}
+			}
+
+			return temp;
+		}
+
+		/**
+		Gets the text of an Element, if it doesn't exist it will return the defaultValue.
+
+		@param defaultValue			What to put in 'value' if there is no text in this element
+		@note This only works if the Text is the FirstChild node
+
+		@see GetText
+		@see GetText( T* value, bool throwIfNotFound = false )
+		@see GetTextOrDefault( T* value, const DefaultT& defaultValue )
+		@see TiXmlElement::GetText
+		*/
+		std::string GetTextOrDefault( const std::string& defaultValue ) const
+		{
+			// Get the element's text value as a std::string
+			std::string temp;
+			if ( !GetTextImp( &temp ) )
+			{
+				return defaultValue;
+			}
+
+			return temp;
+		}
+
+		/**
+		Gets the text value of an Element, if it doesn't exist it will return the defaultValue.
+		Uses FromString to convert the string to the type of choice
+
+		@param value		[OUT]	The container for the returned value
+		@param defaultValue			What to put in 'value' if there is no text in this element
+		@note This is different than GetText() in that it will covert the text to what ever type you want.
+		@note This only works if the Text is the FirstChild node
+
+		@see GetText
+		@see GetText( T* value, bool throwIfNotFound = false )
+		@see GetTextOrDefault( const std::string& defaultValue )
+		@see TiXmlElement::GetText
+		*/
+		template < class T, class DefaultT >
+			void GetTextOrDefault( T* value, const DefaultT& defaultValue ) const
+		{
+			// Get the element's text value as a std::string
+			std::string temp;
+			if ( !GetTextImp( &temp ) )
+			{
+				// The text value does not exist - set value to the default
+				*value = defaultValue;
+				return;
+			}
+
+			// Stream the value from the string to T
+			FromString( temp, value );
+		}
+
+		/**
+		Gets the text of an Element.
+		Uses FromString to convert the string to the type of choice.
+
+		@param value			[OUT]	The container for the returned value
+		@param throwIfNotFound	[DEF]	If true, will throw an exception if there is no text in this element
+		@note This is different than GetText() in that it will covert the text to what ever type you want
+		@note This only works if the Text is the FirstChild node
+		@throws Exception When there is no text and throwIfNotFound is true
+
+		@see GetText
+		@see GetTextOrDefault
+		@see GetTextOrDefault( T* value, const DefaultT& defaultValue )
+		@see TiXmlElement::GetText
+		*/
+		template< class T >
+			void GetText( T* value, bool throwIfNotFound = true ) const
+		{
+			// Get the element's text value as a std::string
+			std::string temp;
+			if ( !GetTextImp( &temp ) )
+			{
+				if ( throwIfNotFound )
+				{
+					TICPPTHROW( "Text does not exists in the current element" );
+				}
+				else
+				{
+					return;
+				}
+			}
+
+			// Stream the value from the string to T
+			FromString( temp, value );
+		}
+
+		/**
+		Convenience function to set the text of an element.
+		Creates a Text node and inserts it as the first child.
+		Uses ToString to convert the parameter to a string.
+
+		@param value The text to set.
+		*/
+		template < class T >
+			void SetText( const T& value )
+		{
+			ValidatePointer();
+			std::string temp = ToString( value );
+
+			if ( m_tiXmlPointer->NoChildren() )
+			{
+				m_tiXmlPointer->LinkEndChild( new TiXmlText( temp ) );
+			}
+			else
+			{
+				if ( 0 == m_tiXmlPointer->GetText() )
+				{
+					m_tiXmlPointer->InsertBeforeChild( m_tiXmlPointer->FirstChild(), TiXmlText( temp ) );
+				}
+				else
+				{
+					// There already is text, so change it
+					m_tiXmlPointer->FirstChild()->SetValue( temp );
+				}
+			}
+		}
+
+		/**
+		Gets an attribute of @a name from an element, if it doesn't exist it will return the defaultValue.
+		Uses FromString to convert the string to the type of choice.
+
+		@param name			The name of the attribute you are querying.
+		@param value		[OUT] The container for the returned value.
+		@param defaultValue	What to put in @a value if there is no attribute in this element.
+		@throws Exception
+
+		@see GetAttribute
+		*/
+		template < class T, class DefaulT >
+			void GetAttributeOrDefault( const std::string& name, T* value, const DefaulT& defaultValue ) const
+		{
+			// Get the attribute's value as a std::string
+			std::string temp;
+			if ( !GetAttributeImp( name, &temp ) )
+			{
+				// The attribute does not exist - set value to the default
+				*value = defaultValue;
+				return;
+			}
+
+			// Stream the value from the string to T
+			FromString( temp, value );
+		}
+
+		/**
+		Gets an attribute of @a name from an element, if it doesn't exist it will return the defaultValue.
+
+		@param name			The name of the attribute you are querying.
+		@param defaultValue	What to put in @a value if there is no attribute in this element.
+
+		@see GetAttribute
+		*/
+		std::string GetAttributeOrDefault( const std::string& name, const std::string& defaultValue ) const;
+
+		/**
+		Gets an attribute of @a name from an element.
+		Uses FromString to convert the string to the type of choice.
+
+		@param name				The name of the attribute you are querying.
+		@param value			[OUT]	The container for the returned value
+		@param throwIfNotFound	[DEF]	If true, will throw an exception if the attribute doesn't exist
+		@throws Exception When the attribute doesn't exist and throwIfNotFound is true
+
+		@see GetAttributeOrDefault
+		*/
+		template< class T >
+			void GetAttribute( const std::string& name, T* value, bool throwIfNotFound = true ) const
+		{
+			// Get the attribute's value as a std::string
+			std::string temp;
+			if ( !GetAttributeImp( name, &temp ) )
+			{
+				if ( throwIfNotFound )
+				{
+					TICPPTHROW( "Attribute does not exist" );
+				}
+				else
+				{
+					return;
+				}
+			}
+
+			// Stream the value from the string to T
+			FromString( temp, value );
+		}
+
+		/**
+		Gets an attribute of @a name from an element.
+		Returns an empty string if the attribute does not exist.
+
+		@param name	The name of the attribute you are querying.
+		@return The value of the attribute, or an empty string if it does not exist.
+
+		@see GetAttributeOrDefault
+		*/
+		std::string GetAttribute( const std::string& name ) const;
+
+	private:
+
+		/**
+		@internal
+		Implimentation of the GetAttribute and GetAttributeOrDefault template methods.
+		*/
+		bool GetAttributeImp( const std::string& name, std::string* value ) const;
+
+		/**
+		@internal
+		Implimentation of the GetText, GetTextOrDefault, GetTextValue, and GetTextValueOrDefault template methods.
+		*/
+		bool GetTextImp( std::string* value ) const;
+	};
+
+	/** Wrapper around TiXmlDeclaration */
+	class Declaration : public NodeImp< TiXmlDeclaration >
+	{
+	public:
+		/**
+		Default	Constructor. Construct an empty declaration.
+		*/
+		Declaration();
+
+		/**
+		Constructor.
+		*/
+		Declaration( TiXmlDeclaration* declaration );
+
+		/**
+		Constructor.
+		*/
+		Declaration( const std::string& version, const std::string& encoding, const std::string& standalone );
+
+		/**
+		Version. Will return an empty string if none was found.
+		*/
+		std::string Version() const;
+
+		/**
+		Encoding. Will return an empty string if none was found.
+		*/
+		std::string Encoding() const;
+
+		/**
+		StandAlone. Is this a standalone document?
+		*/
+		std::string Standalone() const;
+	};
+
+	/** Wrapper around TiXmlStylesheetReference */
+	class StylesheetReference : public NodeImp< TiXmlStylesheetReference >
+	{
+	public:
+		/**
+		Default	Constructor. Construct an empty declaration.
+		*/
+		StylesheetReference();
+
+		/**
+		Constructor.
+		*/
+		StylesheetReference( TiXmlStylesheetReference* stylesheetReference );
+
+		/**
+		Constructor.
+		*/
+		StylesheetReference( const std::string& type, const std::string& href );
+
+		/**
+		Type. Will return an empty string if none was found.
+		*/
+		std::string Type() const;
+
+		/**
+		Href. Will return an empty string if none was found.
+		*/
+		std::string Href() const;
+	};
+}
+
+#endif	// TICPP_INCLUDED
+
+#endif // TIXML_USE_TICPP
Index: /code/branches/network/src/util/tinyxml/ticpprc.h
===================================================================
--- /code/branches/network/src/util/tinyxml/ticpprc.h	(revision 861)
+++ /code/branches/network/src/util/tinyxml/ticpprc.h	(revision 861)
@@ -0,0 +1,114 @@
+/*
+http://code.google.com/p/ticpp/
+Copyright (c) 2006 Ryan Pusztai, Ryan Mulder
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of
+this software and associated documentation files (the "Software"), to deal in
+the Software without restriction, including without limitation the rights to
+use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
+the Software, and to permit persons to whom the Software is furnished to do so,
+subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all
+copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
+FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
+COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
+IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+*/
+
+#ifdef TIXML_USE_TICPP
+
+#ifndef TICPPRC_INCLUDED
+#define TICPPRC_INCLUDED
+
+
+// Forward declare ticpp::Node, so it can be made a friend of TiCppRC
+namespace ticpp
+{
+	class Base;
+}
+
+// Forward declare TiCppRCImp so TiCppRC can hold a pointer to it
+class TiCppRCImp;
+
+/**
+Base class for reference counting functionality
+*/
+class TiCppRC
+{
+	// Allow ticpp::Node to directly modify reference count
+	friend class ticpp::Base;
+
+private:
+
+	TiCppRCImp* m_tiRC; /**< Pointer to reference counter */
+
+public:
+
+	/**
+	Constructor
+	Spawns new reference counter with a pointer to this
+	*/
+	TiCppRC();
+
+	/**
+	Destructor
+	Nullifies the pointer to this held by the reference counter
+	Decrements reference count
+	*/
+	virtual ~TiCppRC();
+};
+
+class TiCppRCImp
+{
+private:
+
+	int m_count;		/**< Holds reference count to me, and to the node I point to */
+
+	TiCppRC* m_tiCppRC;	/**< Holds pointer to an object inheriting TiCppRC */
+
+public:
+
+	/**
+	Initializes m_tiCppRC pointer, and set reference count to 1
+	*/
+	TiCppRCImp( TiCppRC* tiCppRC );
+
+	/**
+	Allows the TiCppRC object to set the pointer to itself ( m_tiCppRc ) to NULL when the TiCppRC object is deleted
+	*/
+	void Nullify();
+
+	/**
+	Increment Reference Count
+	*/
+	void IncRef();
+
+	/**
+	Decrement Reference Count
+	*/
+	void DecRef();
+
+	/**
+	Set Reference Count to 1 - dangerous! - Use only if you are sure of the consequences
+	*/
+	void InitRef();
+
+	/**
+	Get internal pointer to the TiCppRC object - not reference counted, use at your own risk
+	*/
+	TiCppRC* Get();
+
+	/**
+	Returns state of internal pointer - will be null if the object was deleted
+	*/
+	bool IsNull();
+};
+
+#endif // TICPP_INCLUDED
+
+#endif // TIXML_USE_TICPP
Index: /code/branches/network/src/util/tinyxml/tinystr.cc
===================================================================
--- /code/branches/network/src/util/tinyxml/tinystr.cc	(revision 861)
+++ /code/branches/network/src/util/tinyxml/tinystr.cc	(revision 861)
@@ -0,0 +1,116 @@
+/*
+www.sourceforge.net/projects/tinyxml
+Original file by Yves Berquin.
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+*/
+
+/*
+ * THIS FILE WAS ALTERED BY Tyge Løvset, 7. April 2005.
+ */
+
+
+#ifndef TIXML_USE_STL
+
+#include "tinystr.h"
+
+// Error value for find primitive
+const TiXmlString::size_type TiXmlString::npos = static_cast< TiXmlString::size_type >(-1);
+
+
+// Null rep.
+TiXmlString::Rep TiXmlString::nullrep_ = { 0, 0, { '\0' } };
+
+
+void TiXmlString::reserve (size_type cap)
+{
+	if (cap > capacity())
+	{
+		TiXmlString tmp;
+		tmp.init(length(), cap);
+		memcpy(tmp.start(), data(), length());
+		swap(tmp);
+	}
+}
+
+
+TiXmlString& TiXmlString::assign(const char* str, size_type len)
+{
+	size_type cap = capacity();
+	if (len > cap || cap > 3*(len + 8))
+	{
+		TiXmlString tmp;
+		tmp.init(len);
+		memcpy(tmp.start(), str, len);
+		swap(tmp);
+	}
+	else
+	{
+		memmove(start(), str, len);
+		set_size(len);
+	}
+	return *this;
+}
+
+
+TiXmlString& TiXmlString::append(const char* str, size_type len)
+{
+	size_type newsize = length() + len;
+	if (newsize > capacity())
+	{
+		reserve (newsize + capacity());
+	}
+	memmove(finish(), str, len);
+	set_size(newsize);
+	return *this;
+}
+
+
+TiXmlString operator + (const TiXmlString & a, const TiXmlString & b)
+{
+	TiXmlString tmp;
+	tmp.reserve(a.length() + b.length());
+	tmp += a;
+	tmp += b;
+	return tmp;
+}
+
+TiXmlString operator + (const TiXmlString & a, const char* b)
+{
+	TiXmlString tmp;
+	TiXmlString::size_type b_len = static_cast<TiXmlString::size_type>( strlen(b) );
+	tmp.reserve(a.length() + b_len);
+	tmp += a;
+	tmp.append(b, b_len);
+	return tmp;
+}
+
+TiXmlString operator + (const char* a, const TiXmlString & b)
+{
+	TiXmlString tmp;
+	TiXmlString::size_type a_len = static_cast<TiXmlString::size_type>( strlen(a) );
+	tmp.reserve(a_len + b.length());
+	tmp.append(a, a_len);
+	tmp += b;
+	return tmp;
+}
+
+
+#endif	// TIXML_USE_STL
Index: /code/branches/network/src/util/tinyxml/tinystr.h
===================================================================
--- /code/branches/network/src/util/tinyxml/tinystr.h	(revision 861)
+++ /code/branches/network/src/util/tinyxml/tinystr.h	(revision 861)
@@ -0,0 +1,319 @@
+/*
+www.sourceforge.net/projects/tinyxml
+Original file by Yves Berquin.
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+*/
+
+/*
+ * THIS FILE WAS ALTERED BY Tyge Lovset, 7. April 2005.
+ *
+ * - completely rewritten. compact, clean, and fast implementation.
+ * - sizeof(TiXmlString) = pointer size (4 bytes on 32-bit systems)
+ * - fixed reserve() to work as per specification.
+ * - fixed buggy compares operator==(), operator<(), and operator>()
+ * - fixed operator+=() to take a const ref argument, following spec.
+ * - added "copy" constructor with length, and most compare operators.
+ * - added swap(), clear(), size(), capacity(), operator+().
+ */
+
+#ifndef TIXML_USE_STL
+
+#ifndef TIXML_STRING_INCLUDED
+#define TIXML_STRING_INCLUDED
+
+#include <assert.h>
+#include <string.h>
+
+/*	The support for explicit isn't that universal, and it isn't really
+	required - it is used to check that the TiXmlString class isn't incorrectly
+	used. Be nice to old compilers and macro it here:
+*/
+#if defined(_MSC_VER) && (_MSC_VER >= 1200 )
+	// Microsoft visual studio, version 6 and higher.
+	#define TIXML_EXPLICIT explicit
+#elif defined(__GNUC__) && (__GNUC__ >= 3 )
+	// GCC version 3 and higher.s
+	#define TIXML_EXPLICIT explicit
+#else
+	#define TIXML_EXPLICIT
+#endif
+
+
+/*
+   TiXmlString is an emulation of a subset of the std::string template.
+   Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.
+   Only the member functions relevant to the TinyXML project have been implemented.
+   The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase
+   a string and there's no more room, we allocate a buffer twice as big as we need.
+*/
+class TiXmlString
+{
+  public :
+	// The size type used
+  	typedef size_t size_type;
+
+	// Error value for find primitive
+	static const size_type npos; // = -1;
+
+
+	// TiXmlString empty constructor
+	TiXmlString () : rep_(&nullrep_)
+	{
+	}
+
+	// TiXmlString copy constructor
+	TiXmlString ( const TiXmlString & copy) : rep_(0)
+	{
+		init(copy.length());
+		memcpy(start(), copy.data(), length());
+	}
+
+	// TiXmlString constructor, based on a string
+	TIXML_EXPLICIT TiXmlString ( const char * copy) : rep_(0)
+	{
+		init( static_cast<size_type>( strlen(copy) ));
+		memcpy(start(), copy, length());
+	}
+
+	// TiXmlString constructor, based on a string
+	TIXML_EXPLICIT TiXmlString ( const char * str, size_type len) : rep_(0)
+	{
+		init(len);
+		memcpy(start(), str, len);
+	}
+
+	// TiXmlString destructor
+	~TiXmlString ()
+	{
+		quit();
+	}
+
+	// = operator
+	TiXmlString& operator = (const char * copy)
+	{
+		return assign( copy, (size_type)strlen(copy));
+	}
+
+	// = operator
+	TiXmlString& operator = (const TiXmlString & copy)
+	{
+		return assign(copy.start(), copy.length());
+	}
+
+
+	// += operator. Maps to append
+	TiXmlString& operator += (const char * suffix)
+	{
+		return append(suffix, static_cast<size_type>( strlen(suffix) ));
+	}
+
+	// += operator. Maps to append
+	TiXmlString& operator += (char single)
+	{
+		return append(&single, 1);
+	}
+
+	// += operator. Maps to append
+	TiXmlString& operator += (const TiXmlString & suffix)
+	{
+		return append(suffix.data(), suffix.length());
+	}
+
+
+	// Convert a TiXmlString into a null-terminated char *
+	const char * c_str () const { return rep_->str; }
+
+	// Convert a TiXmlString into a char * (need not be null terminated).
+	const char * data () const { return rep_->str; }
+
+	// Return the length of a TiXmlString
+	size_type length () const { return rep_->size; }
+
+	// Alias for length()
+	size_type size () const { return rep_->size; }
+
+	// Checks if a TiXmlString is empty
+	bool empty () const { return rep_->size == 0; }
+
+	// Return capacity of string
+	size_type capacity () const { return rep_->capacity; }
+
+
+	// single char extraction
+	const char& at (size_type index) const
+	{
+		assert( index < length() );
+		return rep_->str[ index ];
+	}
+
+	// [] operator
+	char& operator [] (size_type index) const
+	{
+		assert( index < length() );
+		return rep_->str[ index ];
+	}
+
+	// find a char in a string. Return TiXmlString::npos if not found
+	size_type find (char lookup) const
+	{
+		return find(lookup, 0);
+	}
+
+	// find a char in a string from an offset. Return TiXmlString::npos if not found
+	size_type find (char tofind, size_type offset) const
+	{
+		if (offset >= length()) return npos;
+
+		for (const char* p = c_str() + offset; *p != '\0'; ++p)
+		{
+		   if (*p == tofind) return static_cast< size_type >( p - c_str() );
+		}
+		return npos;
+	}
+
+	void clear ()
+	{
+		//Lee:
+		//The original was just too strange, though correct:
+		//	TiXmlString().swap(*this);
+		//Instead use the quit & re-init:
+		quit();
+		init(0,0);
+	}
+
+	/*	Function to reserve a big amount of data when we know we'll need it. Be aware that this
+		function DOES NOT clear the content of the TiXmlString if any exists.
+	*/
+	void reserve (size_type cap);
+
+	TiXmlString& assign (const char* str, size_type len);
+
+	TiXmlString& append (const char* str, size_type len);
+
+	void swap (TiXmlString& other)
+	{
+		Rep* r = rep_;
+		rep_ = other.rep_;
+		other.rep_ = r;
+	}
+
+  private:
+
+	void init(size_type sz) { init(sz, sz); }
+	void set_size(size_type sz) { rep_->str[ rep_->size = sz ] = '\0'; }
+	char* start() const { return rep_->str; }
+	char* finish() const { return rep_->str + rep_->size; }
+
+	struct Rep
+	{
+		size_type size, capacity;
+		char str[1];
+	};
+
+	void init(size_type sz, size_type cap)
+	{
+		if (cap)
+		{
+			// Lee: the original form:
+			//	rep_ = static_cast<Rep*>(operator new(sizeof(Rep) + cap));
+			// doesn't work in some cases of new being overloaded. Switching
+			// to the normal allocation, although use an 'int' for systems
+			// that are overly picky about structure alignment.
+			const size_type bytesNeeded = sizeof(Rep) + cap;
+			const size_type intsNeeded = ( bytesNeeded + sizeof(int) - 1 ) / sizeof( int ); 
+			rep_ = reinterpret_cast<Rep*>( new int[ intsNeeded ] );
+
+			rep_->str[ rep_->size = sz ] = '\0';
+			rep_->capacity = cap;
+		}
+		else
+		{
+			rep_ = &nullrep_;
+		}
+	}
+
+	void quit()
+	{
+		if (rep_ != &nullrep_)
+		{
+			// The rep_ is really an array of ints. (see the allocator, above).
+			// Cast it back before delete, so the compiler won't incorrectly call destructors.
+			delete [] ( reinterpret_cast<int*>( rep_ ) );
+		}
+	}
+
+	Rep * rep_;
+	static Rep nullrep_;
+
+} ;
+
+
+inline bool operator == (const TiXmlString & a, const TiXmlString & b)
+{
+	return    ( a.length() == b.length() )				// optimization on some platforms
+	       && ( strcmp(a.c_str(), b.c_str()) == 0 );	// actual compare
+}
+inline bool operator < (const TiXmlString & a, const TiXmlString & b)
+{
+	return strcmp(a.c_str(), b.c_str()) < 0;
+}
+
+inline bool operator != (const TiXmlString & a, const TiXmlString & b) { return !(a == b); }
+inline bool operator >  (const TiXmlString & a, const TiXmlString & b) { return b < a; }
+inline bool operator <= (const TiXmlString & a, const TiXmlString & b) { return !(b < a); }
+inline bool operator >= (const TiXmlString & a, const TiXmlString & b) { return !(a < b); }
+
+inline bool operator == (const TiXmlString & a, const char* b) { return strcmp(a.c_str(), b) == 0; }
+inline bool operator == (const char* a, const TiXmlString & b) { return b == a; }
+inline bool operator != (const TiXmlString & a, const char* b) { return !(a == b); }
+inline bool operator != (const char* a, const TiXmlString & b) { return !(b == a); }
+
+TiXmlString operator + (const TiXmlString & a, const TiXmlString & b);
+TiXmlString operator + (const TiXmlString & a, const char* b);
+TiXmlString operator + (const char* a, const TiXmlString & b);
+
+
+/*
+   TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.
+   Only the operators that we need for TinyXML have been developped.
+*/
+class TiXmlOutStream : public TiXmlString
+{
+public :
+
+	// TiXmlOutStream << operator.
+	TiXmlOutStream & operator << (const TiXmlString & in)
+	{
+		*this += in;
+		return *this;
+	}
+
+	// TiXmlOutStream << operator.
+	TiXmlOutStream & operator << (const char * in)
+	{
+		*this += in;
+		return *this;
+	}
+
+} ;
+
+#endif	// TIXML_STRING_INCLUDED
+#endif	// TIXML_USE_STL
Index: /code/branches/network/src/util/tinyxml/tinyxml.cc
===================================================================
--- /code/branches/network/src/util/tinyxml/tinyxml.cc	(revision 861)
+++ /code/branches/network/src/util/tinyxml/tinyxml.cc	(revision 861)
@@ -0,0 +1,1961 @@
+/*
+www.sourceforge.net/projects/tinyxml
+Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+*/
+#include "tinyxml.h"
+
+#include <ctype.h>
+
+#ifdef TIXML_USE_STL
+#include <sstream>
+#include <iostream>
+#endif
+
+
+bool TiXmlBase::condenseWhiteSpace = true;
+
+// Microsoft compiler security
+FILE* TiXmlFOpen( const char* filename, const char* mode )
+{
+	#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
+		FILE* fp = 0;
+		errno_t err = fopen_s( &fp, filename, mode );
+		if ( !err && fp )
+			return fp;
+		return 0;
+	#else
+		return fopen( filename, mode );
+	#endif
+}
+
+void TiXmlBase::EncodeString( const TIXML_STRING& str, TIXML_STRING* outString )
+{
+	int i=0;
+
+	while( i<(int)str.length() )
+	{
+		unsigned char c = (unsigned char) str[i];
+
+		if (    c == '&'
+		     && i < ( (int)str.length() - 2 )
+			 && str[i+1] == '#'
+			 && str[i+2] == 'x' )
+		{
+			// Hexadecimal character reference.
+			// Pass through unchanged.
+			// &#xA9;	-- copyright symbol, for example.
+			//
+			// The -1 is a bug fix from Rob Laveaux. It keeps
+			// an overflow from happening if there is no ';'.
+			// There are actually 2 ways to exit this loop -
+			// while fails (error case) and break (semicolon found).
+			// However, there is no mechanism (currently) for
+			// this function to return an error.
+			while ( i<(int)str.length()-1 )
+			{
+				outString->append( str.c_str() + i, 1 );
+				++i;
+				if ( str[i] == ';' )
+					break;
+			}
+		}
+		else if ( c == '&' )
+		{
+			outString->append( entity[0].str, entity[0].strLength );
+			++i;
+		}
+		else if ( c == '<' )
+		{
+			outString->append( entity[1].str, entity[1].strLength );
+			++i;
+		}
+		else if ( c == '>' )
+		{
+			outString->append( entity[2].str, entity[2].strLength );
+			++i;
+		}
+		else if ( c == '\"' )
+		{
+			outString->append( entity[3].str, entity[3].strLength );
+			++i;
+		}
+		else if ( c == '\'' )
+		{
+			outString->append( entity[4].str, entity[4].strLength );
+			++i;
+		}
+		else if ( c < 32 )
+		{
+			// Easy pass at non-alpha/numeric/symbol
+			// Below 32 is symbolic.
+			char buf[ 32 ];
+
+			#if defined(TIXML_SNPRINTF)
+				TIXML_SNPRINTF( buf, sizeof(buf), "&#x%02X;", (unsigned) ( c & 0xff ) );
+			#else
+				sprintf( buf, "&#x%02X;", (unsigned) ( c & 0xff ) );
+			#endif
+
+			//*ME:	warning C4267: convert 'size_t' to 'int'
+			//*ME:	Int-Cast to make compiler happy ...
+			outString->append( buf, (int)strlen( buf ) );
+			++i;
+		}
+		else
+		{
+			//char realc = (char) c;
+			//outString->append( &realc, 1 );
+			*outString += (char) c;	// somewhat more efficient function call.
+			++i;
+		}
+	}
+}
+
+
+TiXmlNode::TiXmlNode( NodeType _type ) : TiXmlBase()
+{
+	parent = 0;
+	type = _type;
+	firstChild = 0;
+	lastChild = 0;
+	prev = 0;
+	next = 0;
+}
+
+
+TiXmlNode::~TiXmlNode()
+{
+	TiXmlNode* node = firstChild;
+	TiXmlNode* temp = 0;
+
+	while ( node )
+	{
+		temp = node;
+		node = node->next;
+		delete temp;
+	}
+}
+
+
+void TiXmlNode::CopyTo( TiXmlNode* target ) const
+{
+	target->SetValue (value.c_str() );
+	target->userData = userData;
+}
+
+
+void TiXmlNode::Clear()
+{
+	TiXmlNode* node = firstChild;
+	TiXmlNode* temp = 0;
+
+	while ( node )
+	{
+		temp = node;
+		node = node->next;
+		delete temp;
+	}
+
+	firstChild = 0;
+	lastChild = 0;
+}
+
+
+TiXmlNode* TiXmlNode::LinkEndChild( TiXmlNode* node )
+{
+	assert( node->parent == 0 || node->parent == this );
+	assert( node->GetDocument() == 0 || node->GetDocument() == this->GetDocument() );
+
+	if ( node->Type() == TiXmlNode::DOCUMENT )
+	{
+		delete node;
+		if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return 0;
+	}
+
+	node->parent = this;
+
+	node->prev = lastChild;
+	node->next = 0;
+
+	if ( lastChild )
+		lastChild->next = node;
+	else
+		firstChild = node;			// it was an empty list.
+
+	lastChild = node;
+	return node;
+}
+
+
+TiXmlNode* TiXmlNode::InsertEndChild( const TiXmlNode& addThis )
+{
+	if ( addThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return 0;
+	}
+	TiXmlNode* node = addThis.Clone();
+	if ( !node )
+		return 0;
+
+	return LinkEndChild( node );
+}
+
+
+TiXmlNode* TiXmlNode::InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis )
+{
+	if ( !beforeThis || beforeThis->parent != this ) {
+		return 0;
+	}
+	if ( addThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return 0;
+	}
+
+	TiXmlNode* node = addThis.Clone();
+	if ( !node )
+		return 0;
+	node->parent = this;
+
+	node->next = beforeThis;
+	node->prev = beforeThis->prev;
+	if ( beforeThis->prev )
+	{
+		beforeThis->prev->next = node;
+	}
+	else
+	{
+		assert( firstChild == beforeThis );
+		firstChild = node;
+	}
+	beforeThis->prev = node;
+	return node;
+}
+
+
+TiXmlNode* TiXmlNode::InsertAfterChild( TiXmlNode* afterThis, const TiXmlNode& addThis )
+{
+	if ( !afterThis || afterThis->parent != this ) {
+		return 0;
+	}
+	if ( addThis.Type() == TiXmlNode::DOCUMENT )
+	{
+		if ( GetDocument() ) GetDocument()->SetError( TIXML_ERROR_DOCUMENT_TOP_ONLY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return 0;
+	}
+
+	TiXmlNode* node = addThis.Clone();
+	if ( !node )
+		return 0;
+	node->parent = this;
+
+	node->prev = afterThis;
+	node->next = afterThis->next;
+	if ( afterThis->next )
+	{
+		afterThis->next->prev = node;
+	}
+	else
+	{
+		assert( lastChild == afterThis );
+		lastChild = node;
+	}
+	afterThis->next = node;
+	return node;
+}
+
+
+TiXmlNode* TiXmlNode::ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis )
+{
+	if ( replaceThis->parent != this )
+		return 0;
+
+	TiXmlNode* node = withThis.Clone();
+	if ( !node )
+		return 0;
+
+	node->next = replaceThis->next;
+	node->prev = replaceThis->prev;
+
+	if ( replaceThis->next )
+		replaceThis->next->prev = node;
+	else
+		lastChild = node;
+
+	if ( replaceThis->prev )
+		replaceThis->prev->next = node;
+	else
+		firstChild = node;
+
+	delete replaceThis;
+	node->parent = this;
+	return node;
+}
+
+
+bool TiXmlNode::RemoveChild( TiXmlNode* removeThis )
+{
+	if ( removeThis->parent != this )
+	{
+		assert( 0 );
+		return false;
+	}
+
+	if ( removeThis->next )
+		removeThis->next->prev = removeThis->prev;
+	else
+		lastChild = removeThis->prev;
+
+	if ( removeThis->prev )
+		removeThis->prev->next = removeThis->next;
+	else
+		firstChild = removeThis->next;
+
+	delete removeThis;
+	return true;
+}
+
+const TiXmlNode* TiXmlNode::FirstChild( const char * _value ) const
+{
+	const TiXmlNode* node;
+	for ( node = firstChild; node; node = node->next )
+	{
+		if ( strcmp( node->Value(), _value ) == 0 )
+			return node;
+	}
+	return 0;
+}
+
+
+const TiXmlNode* TiXmlNode::LastChild( const char * _value ) const
+{
+	const TiXmlNode* node;
+	for ( node = lastChild; node; node = node->prev )
+	{
+		if ( strcmp( node->Value(), _value ) == 0 )
+			return node;
+	}
+	return 0;
+}
+
+
+const TiXmlNode* TiXmlNode::IterateChildren( const TiXmlNode* previous ) const
+{
+	if ( !previous )
+	{
+		return FirstChild();
+	}
+	else
+	{
+		assert( previous->parent == this );
+		return previous->NextSibling();
+	}
+}
+
+
+const TiXmlNode* TiXmlNode::IterateChildren( const char * val, const TiXmlNode* previous ) const
+{
+	if ( !previous )
+	{
+		return FirstChild( val );
+	}
+	else
+	{
+		assert( previous->parent == this );
+		return previous->NextSibling( val );
+	}
+}
+
+
+const TiXmlNode* TiXmlNode::NextSibling( const char * _value ) const
+{
+	const TiXmlNode* node;
+	for ( node = next; node; node = node->next )
+	{
+		if ( strcmp( node->Value(), _value ) == 0 )
+			return node;
+	}
+	return 0;
+}
+
+
+const TiXmlNode* TiXmlNode::PreviousSibling( const char * _value ) const
+{
+	const TiXmlNode* node;
+	for ( node = prev; node; node = node->prev )
+	{
+		if ( strcmp( node->Value(), _value ) == 0 )
+			return node;
+	}
+	return 0;
+}
+
+
+void TiXmlElement::RemoveAttribute( const char * name )
+{
+    #ifdef TIXML_USE_STL
+	TIXML_STRING str( name );
+	TiXmlAttribute* node = attributeSet.Find( str );
+	#else
+	TiXmlAttribute* node = attributeSet.Find( name );
+	#endif
+	if ( node )
+	{
+		attributeSet.Remove( node );
+		delete node;
+	}
+}
+
+const TiXmlElement* TiXmlNode::FirstChildElement() const
+{
+	const TiXmlNode* node;
+
+	for (	node = FirstChild();
+			node;
+			node = node->NextSibling() )
+	{
+		if ( node->ToElement() )
+			return node->ToElement();
+	}
+	return 0;
+}
+
+
+const TiXmlElement* TiXmlNode::FirstChildElement( const char * _value ) const
+{
+	const TiXmlNode* node;
+
+	for (	node = FirstChild( _value );
+			node;
+			node = node->NextSibling( _value ) )
+	{
+		if ( node->ToElement() )
+			return node->ToElement();
+	}
+	return 0;
+}
+
+
+const TiXmlElement* TiXmlNode::NextSiblingElement() const
+{
+	const TiXmlNode* node;
+
+	for (	node = NextSibling();
+			node;
+			node = node->NextSibling() )
+	{
+		if ( node->ToElement() )
+			return node->ToElement();
+	}
+	return 0;
+}
+
+
+const TiXmlElement* TiXmlNode::NextSiblingElement( const char * _value ) const
+{
+	const TiXmlNode* node;
+
+	for (	node = NextSibling( _value );
+			node;
+			node = node->NextSibling( _value ) )
+	{
+		if ( node->ToElement() )
+			return node->ToElement();
+	}
+	return 0;
+}
+
+
+const TiXmlDocument* TiXmlNode::GetDocument() const
+{
+	const TiXmlNode* node;
+
+	for( node = this; node; node = node->parent )
+	{
+		if ( node->ToDocument() )
+			return node->ToDocument();
+	}
+	return 0;
+}
+
+
+TiXmlElement::TiXmlElement (const char * _value)
+	: TiXmlNode( TiXmlNode::ELEMENT )
+{
+	firstChild = lastChild = 0;
+	value = _value;
+}
+
+
+#ifdef TIXML_USE_STL
+TiXmlElement::TiXmlElement( const std::string& _value )
+	: TiXmlNode( TiXmlNode::ELEMENT )
+{
+	firstChild = lastChild = 0;
+	value = _value;
+}
+#endif
+
+
+TiXmlElement::TiXmlElement( const TiXmlElement& copy)
+	: TiXmlNode( TiXmlNode::ELEMENT )
+{
+	firstChild = lastChild = 0;
+	copy.CopyTo( this );
+}
+
+
+void TiXmlElement::operator=( const TiXmlElement& base )
+{
+	ClearThis();
+	base.CopyTo( this );
+}
+
+
+TiXmlElement::~TiXmlElement()
+{
+	ClearThis();
+}
+
+
+void TiXmlElement::ClearThis()
+{
+	Clear();
+	while( attributeSet.First() )
+	{
+		TiXmlAttribute* node = attributeSet.First();
+		attributeSet.Remove( node );
+		delete node;
+	}
+}
+
+
+const char* TiXmlElement::Attribute( const char* name ) const
+{
+	const TiXmlAttribute* node = attributeSet.Find( name );
+	if ( node )
+		return node->Value();
+	return 0;
+}
+
+
+#ifdef TIXML_USE_STL
+const std::string* TiXmlElement::Attribute( const std::string& name ) const
+{
+	const TiXmlAttribute* node = attributeSet.Find( name );
+	if ( node )
+		return &node->ValueStr();
+	return 0;
+}
+#endif
+
+
+const char* TiXmlElement::Attribute( const char* name, int* i ) const
+{
+	const char* s = Attribute( name );
+	if ( i )
+	{
+		if ( s ) {
+			*i = atoi( s );
+		}
+		else {
+			*i = 0;
+		}
+	}
+	return s;
+}
+
+
+#ifdef TIXML_USE_STL
+const std::string* TiXmlElement::Attribute( const std::string& name, int* i ) const
+{
+	const std::string* s = Attribute( name );
+	if ( i )
+	{
+		if ( s ) {
+			*i = atoi( s->c_str() );
+		}
+		else {
+			*i = 0;
+		}
+	}
+	return s;
+}
+#endif
+
+
+const char* TiXmlElement::Attribute( const char* name, double* d ) const
+{
+	const char* s = Attribute( name );
+	if ( d )
+	{
+		if ( s ) {
+			*d = atof( s );
+		}
+		else {
+			*d = 0;
+		}
+	}
+	return s;
+}
+
+
+#ifdef TIXML_USE_STL
+const std::string* TiXmlElement::Attribute( const std::string& name, double* d ) const
+{
+	const std::string* s = Attribute( name );
+	if ( d )
+	{
+		if ( s ) {
+			*d = atof( s->c_str() );
+		}
+		else {
+			*d = 0;
+		}
+	}
+	return s;
+}
+#endif
+
+
+int TiXmlElement::QueryIntAttribute( const char* name, int* ival ) const
+{
+	const TiXmlAttribute* node = attributeSet.Find( name );
+	if ( !node )
+		return TIXML_NO_ATTRIBUTE;
+	return node->QueryIntValue( ival );
+}
+
+
+#ifdef TIXML_USE_STL
+int TiXmlElement::QueryIntAttribute( const std::string& name, int* ival ) const
+{
+	const TiXmlAttribute* node = attributeSet.Find( name );
+	if ( !node )
+		return TIXML_NO_ATTRIBUTE;
+	return node->QueryIntValue( ival );
+}
+#endif
+
+
+int TiXmlElement::QueryDoubleAttribute( const char* name, double* dval ) const
+{
+	const TiXmlAttribute* node = attributeSet.Find( name );
+	if ( !node )
+		return TIXML_NO_ATTRIBUTE;
+	return node->QueryDoubleValue( dval );
+}
+
+
+#ifdef TIXML_USE_STL
+int TiXmlElement::QueryDoubleAttribute( const std::string& name, double* dval ) const
+{
+	const TiXmlAttribute* node = attributeSet.Find( name );
+	if ( !node )
+		return TIXML_NO_ATTRIBUTE;
+	return node->QueryDoubleValue( dval );
+}
+#endif
+
+
+void TiXmlElement::SetAttribute( const char * name, int val )
+{
+	char buf[64];
+	#if defined(TIXML_SNPRINTF)
+		TIXML_SNPRINTF( buf, sizeof(buf), "%d", val );
+	#else
+		sprintf( buf, "%d", val );
+	#endif
+	SetAttribute( name, buf );
+}
+
+
+#ifdef TIXML_USE_STL
+void TiXmlElement::SetAttribute( const std::string& name, int val )
+{
+   std::ostringstream oss;
+   oss << val;
+   SetAttribute( name, oss.str() );
+}
+#endif
+
+
+void TiXmlElement::SetDoubleAttribute( const char * name, double val )
+{
+	char buf[256];
+	#if defined(TIXML_SNPRINTF)
+		TIXML_SNPRINTF( buf, sizeof(buf), "%f", val );
+	#else
+		sprintf( buf, "%f", val );
+	#endif
+	SetAttribute( name, buf );
+}
+
+
+void TiXmlElement::SetAttribute( const char * cname, const char * cvalue )
+{
+    #ifdef TIXML_USE_STL
+	TIXML_STRING _name( cname );
+	TIXML_STRING _value( cvalue );
+	#else
+	const char* _name = cname;
+	const char* _value = cvalue;
+	#endif
+
+	TiXmlAttribute* node = attributeSet.Find( _name );
+	if ( node )
+	{
+		node->SetValue( _value );
+		return;
+	}
+
+	TiXmlAttribute* attrib = new TiXmlAttribute( cname, cvalue );
+	if ( attrib )
+	{
+		attributeSet.Add( attrib );
+	}
+	else
+	{
+		TiXmlDocument* document = GetDocument();
+		if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );
+	}
+}
+
+
+#ifdef TIXML_USE_STL
+void TiXmlElement::SetAttribute( const std::string& name, const std::string& _value )
+{
+	TiXmlAttribute* node = attributeSet.Find( name );
+	if ( node )
+	{
+		node->SetValue( _value );
+		return;
+	}
+
+	TiXmlAttribute* attrib = new TiXmlAttribute( name, _value );
+	if ( attrib )
+	{
+		attributeSet.Add( attrib );
+	}
+	else
+	{
+		TiXmlDocument* document = GetDocument();
+		if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );
+	}
+}
+#endif
+
+
+void TiXmlElement::Print( FILE* cfile, int depth ) const
+{
+	int i;
+	assert( cfile );
+	for ( i=0; i<depth; i++ ) {
+		fprintf( cfile, "    " );
+	}
+
+	fprintf( cfile, "<%s", value.c_str() );
+
+	const TiXmlAttribute* attrib;
+	for ( attrib = attributeSet.First(); attrib; attrib = attrib->Next() )
+	{
+		fprintf( cfile, " " );
+		attrib->Print( cfile, depth );
+	}
+
+	// There are 3 different formatting approaches:
+	// 1) An element without children is printed as a <foo /> node
+	// 2) An element with only a text child is printed as <foo> text </foo>
+	// 3) An element with children is printed on multiple lines.
+	TiXmlNode* node;
+	if ( !firstChild )
+	{
+		fprintf( cfile, " />" );
+	}
+	else if ( firstChild == lastChild && firstChild->ToText() )
+	{
+		fprintf( cfile, ">" );
+		firstChild->Print( cfile, depth + 1 );
+		fprintf( cfile, "</%s>", value.c_str() );
+	}
+	else
+	{
+		fprintf( cfile, ">" );
+
+		for ( node = firstChild; node; node=node->NextSibling() )
+		{
+			if ( !node->ToText() )
+			{
+				fprintf( cfile, "\n" );
+			}
+			node->Print( cfile, depth+1 );
+		}
+		fprintf( cfile, "\n" );
+		for( i=0; i<depth; ++i ) {
+			fprintf( cfile, "    " );
+		}
+		fprintf( cfile, "</%s>", value.c_str() );
+	}
+}
+
+
+void TiXmlElement::CopyTo( TiXmlElement* target ) const
+{
+	// superclass:
+	TiXmlNode::CopyTo( target );
+
+	// Element class:
+	// Clone the attributes, then clone the children.
+	const TiXmlAttribute* attribute = 0;
+	for(	attribute = attributeSet.First();
+	attribute;
+	attribute = attribute->Next() )
+	{
+		target->SetAttribute( attribute->Name(), attribute->Value() );
+	}
+
+	TiXmlNode* node = 0;
+	for ( node = firstChild; node; node = node->NextSibling() )
+	{
+		target->LinkEndChild( node->Clone() );
+	}
+}
+
+bool TiXmlElement::Accept( TiXmlVisitor* visitor ) const
+{
+	if ( visitor->VisitEnter( *this, attributeSet.First() ) )
+	{
+		for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
+		{
+			if ( !node->Accept( visitor ) )
+				break;
+		}
+	}
+	return visitor->VisitExit( *this );
+}
+
+
+TiXmlNode* TiXmlElement::Clone() const
+{
+	TiXmlElement* clone = new TiXmlElement( Value() );
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+
+const char* TiXmlElement::GetText() const
+{
+	const TiXmlNode* child = this->FirstChild();
+	if ( child ) {
+		const TiXmlText* childText = child->ToText();
+		if ( childText ) {
+			return childText->Value();
+		}
+	}
+	return 0;
+}
+
+
+TiXmlDocument::TiXmlDocument() : TiXmlNode( TiXmlNode::DOCUMENT )
+{
+	tabsize = 4;
+	useMicrosoftBOM = false;
+	ClearError();
+}
+
+TiXmlDocument::TiXmlDocument( const char * documentName ) : TiXmlNode( TiXmlNode::DOCUMENT )
+{
+	tabsize = 4;
+	useMicrosoftBOM = false;
+	value = documentName;
+	ClearError();
+}
+
+
+#ifdef TIXML_USE_STL
+TiXmlDocument::TiXmlDocument( const std::string& documentName ) : TiXmlNode( TiXmlNode::DOCUMENT )
+{
+	tabsize = 4;
+	useMicrosoftBOM = false;
+    value = documentName;
+	ClearError();
+}
+#endif
+
+
+TiXmlDocument::TiXmlDocument( const TiXmlDocument& copy ) : TiXmlNode( TiXmlNode::DOCUMENT )
+{
+	copy.CopyTo( this );
+}
+
+
+void TiXmlDocument::operator=( const TiXmlDocument& copy )
+{
+	Clear();
+	copy.CopyTo( this );
+}
+
+
+bool TiXmlDocument::LoadFile( TiXmlEncoding encoding )
+{
+	// See STL_STRING_BUG below.
+	//StringToBuffer buf( value );
+
+	return LoadFile( Value(), encoding );
+}
+
+
+bool TiXmlDocument::SaveFile() const
+{
+	// See STL_STRING_BUG below.
+//	StringToBuffer buf( value );
+//
+//	if ( buf.buffer && SaveFile( buf.buffer ) )
+//		return true;
+//
+//	return false;
+	return SaveFile( Value() );
+}
+
+bool TiXmlDocument::LoadFile( const char* _filename, TiXmlEncoding encoding )
+{
+	// There was a really terrifying little bug here. The code:
+	//		value = filename
+	// in the STL case, cause the assignment method of the std::string to
+	// be called. What is strange, is that the std::string had the same
+	// address as it's c_str() method, and so bad things happen. Looks
+	// like a bug in the Microsoft STL implementation.
+	// Add an extra string to avoid the crash.
+	TIXML_STRING filename( _filename );
+	value = filename;
+
+	// reading in binary mode so that tinyxml can normalize the EOL
+	FILE* file = TiXmlFOpen( value.c_str (), "rb" );
+
+	if ( file )
+	{
+		bool result = LoadFile( file, encoding );
+		fclose( file );
+		return result;
+	}
+	else
+	{
+		SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return false;
+	}
+}
+
+bool TiXmlDocument::LoadFile( FILE* file, TiXmlEncoding encoding )
+{
+	if ( !file )
+	{
+		SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return false;
+	}
+
+	// Delete the existing data:
+	Clear();
+	location.Clear();
+
+	// Get the file size, so we can pre-allocate the string. HUGE speed impact.
+	long length = 0;
+	fseek( file, 0, SEEK_END );
+	length = ftell( file );
+	fseek( file, 0, SEEK_SET );
+
+	// Strange case, but good to handle up front.
+	if ( length <= 0 )
+	{
+		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return false;
+	}
+
+	// If we have a file, assume it is all one big XML file, and read it in.
+	// The document parser may decide the document ends sooner than the entire file, however.
+	TIXML_STRING data;
+	data.reserve( length );
+
+	// Subtle bug here. TinyXml did use fgets. But from the XML spec:
+	// 2.11 End-of-Line Handling
+	// <snip>
+	// <quote>
+	// ...the XML processor MUST behave as if it normalized all line breaks in external
+	// parsed entities (including the document entity) on input, before parsing, by translating
+	// both the two-character sequence #xD #xA and any #xD that is not followed by #xA to
+	// a single #xA character.
+	// </quote>
+	//
+	// It is not clear fgets does that, and certainly isn't clear it works cross platform.
+	// Generally, you expect fgets to translate from the convention of the OS to the c/unix
+	// convention, and not work generally.
+
+	/*
+	while( fgets( buf, sizeof(buf), file ) )
+	{
+		data += buf;
+	}
+	*/
+
+	char* buf = new char[ length+1 ];
+	buf[0] = 0;
+
+	if ( fread( buf, length, 1, file ) != 1 ) {
+		delete [] buf;
+		SetError( TIXML_ERROR_OPENING_FILE, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return false;
+	}
+
+	const char* lastPos = buf;
+	const char* p = buf;
+
+	buf[length] = 0;
+	while( *p ) {
+		assert( p < (buf+length) );
+		if ( *p == 0xa ) {
+			// Newline character. No special rules for this. Append all the characters
+			// since the last string, and include the newline.
+			data.append( lastPos, (p-lastPos+1) );	// append, include the newline
+			++p;									// move past the newline
+			lastPos = p;							// and point to the new buffer (may be 0)
+			assert( p <= (buf+length) );
+		}
+		else if ( *p == 0xd ) {
+			// Carriage return. Append what we have so far, then
+			// handle moving forward in the buffer.
+			if ( (p-lastPos) > 0 ) {
+				data.append( lastPos, p-lastPos );	// do not add the CR
+			}
+			data += (char)0xa;						// a proper newline
+
+			if ( *(p+1) == 0xa ) {
+				// Carriage return - new line sequence
+				p += 2;
+				lastPos = p;
+				assert( p <= (buf+length) );
+			}
+			else {
+				// it was followed by something else...that is presumably characters again.
+				++p;
+				lastPos = p;
+				assert( p <= (buf+length) );
+			}
+		}
+		else {
+			++p;
+		}
+	}
+	// Handle any left over characters.
+	if ( p-lastPos ) {
+		data.append( lastPos, p-lastPos );
+	}
+	delete [] buf;
+	buf = 0;
+
+	Parse( data.c_str(), 0, encoding );
+
+	if (  Error() )
+        return false;
+    else
+		return true;
+}
+
+
+bool TiXmlDocument::SaveFile( const char * filename ) const
+{
+	// The old c stuff lives on...
+	FILE* fp = TiXmlFOpen( filename, "w" );
+	if ( fp )
+	{
+		bool result = SaveFile( fp );
+		fclose( fp );
+		return result;
+	}
+	return false;
+}
+
+
+bool TiXmlDocument::SaveFile( FILE* fp ) const
+{
+	if ( useMicrosoftBOM )
+	{
+		const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
+		const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
+		const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
+
+		fputc( TIXML_UTF_LEAD_0, fp );
+		fputc( TIXML_UTF_LEAD_1, fp );
+		fputc( TIXML_UTF_LEAD_2, fp );
+	}
+	Print( fp, 0 );
+	return (ferror(fp) == 0);
+}
+
+
+void TiXmlDocument::CopyTo( TiXmlDocument* target ) const
+{
+	TiXmlNode::CopyTo( target );
+
+	target->error = error;
+	target->errorId = errorId;
+	target->errorDesc = errorDesc;
+	target->tabsize = tabsize;
+	target->errorLocation = errorLocation;
+	target->useMicrosoftBOM = useMicrosoftBOM;
+
+	TiXmlNode* node = 0;
+	for ( node = firstChild; node; node = node->NextSibling() )
+	{
+		target->LinkEndChild( node->Clone() );
+	}
+}
+
+
+TiXmlNode* TiXmlDocument::Clone() const
+{
+	TiXmlDocument* clone = new TiXmlDocument();
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+
+void TiXmlDocument::Print( FILE* cfile, int depth ) const
+{
+	assert( cfile );
+	for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
+	{
+		node->Print( cfile, depth );
+		fprintf( cfile, "\n" );
+	}
+}
+
+
+bool TiXmlDocument::Accept( TiXmlVisitor* visitor ) const
+{
+	if ( visitor->VisitEnter( *this ) )
+	{
+		for ( const TiXmlNode* node=FirstChild(); node; node=node->NextSibling() )
+		{
+			if ( !node->Accept( visitor ) )
+				break;
+		}
+	}
+	return visitor->VisitExit( *this );
+}
+
+
+const TiXmlAttribute* TiXmlAttribute::Next() const
+{
+	// We are using knowledge of the sentinel. The sentinel
+	// have a value or name.
+	if ( next->value.empty() && next->name.empty() )
+		return 0;
+	return next;
+}
+
+/*
+TiXmlAttribute* TiXmlAttribute::Next()
+{
+	// We are using knowledge of the sentinel. The sentinel
+	// have a value or name.
+	if ( next->value.empty() && next->name.empty() )
+		return 0;
+	return next;
+}
+*/
+
+const TiXmlAttribute* TiXmlAttribute::Previous() const
+{
+	// We are using knowledge of the sentinel. The sentinel
+	// have a value or name.
+	if ( prev->value.empty() && prev->name.empty() )
+		return 0;
+	return prev;
+}
+
+/*
+TiXmlAttribute* TiXmlAttribute::Previous()
+{
+	// We are using knowledge of the sentinel. The sentinel
+	// have a value or name.
+	if ( prev->value.empty() && prev->name.empty() )
+		return 0;
+	return prev;
+}
+*/
+
+void TiXmlAttribute::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const
+{
+	TIXML_STRING n, v;
+
+	EncodeString( name, &n );
+	EncodeString( value, &v );
+
+	if (value.find ('\"') == TIXML_STRING::npos) {
+		if ( cfile ) {
+		fprintf (cfile, "%s=\"%s\"", n.c_str(), v.c_str() );
+		}
+		if ( str ) {
+			(*str) += n; (*str) += "=\""; (*str) += v; (*str) += "\"";
+		}
+	}
+	else {
+		if ( cfile ) {
+		fprintf (cfile, "%s='%s'", n.c_str(), v.c_str() );
+		}
+		if ( str ) {
+			(*str) += n; (*str) += "='"; (*str) += v; (*str) += "'";
+		}
+	}
+}
+
+
+int TiXmlAttribute::QueryIntValue( int* ival ) const
+{
+	if ( TIXML_SSCANF( value.c_str(), "%d", ival ) == 1 )
+		return TIXML_SUCCESS;
+	return TIXML_WRONG_TYPE;
+}
+
+int TiXmlAttribute::QueryDoubleValue( double* dval ) const
+{
+	if ( TIXML_SSCANF( value.c_str(), "%lf", dval ) == 1 )
+		return TIXML_SUCCESS;
+	return TIXML_WRONG_TYPE;
+}
+
+void TiXmlAttribute::SetIntValue( int _value )
+{
+	char buf [64];
+	#if defined(TIXML_SNPRINTF)
+		TIXML_SNPRINTF(buf, sizeof(buf), "%d", _value);
+	#else
+		sprintf (buf, "%d", _value);
+	#endif
+	SetValue (buf);
+}
+
+void TiXmlAttribute::SetDoubleValue( double _value )
+{
+	char buf [256];
+	#if defined(TIXML_SNPRINTF)
+		TIXML_SNPRINTF( buf, sizeof(buf), "%lf", _value);
+	#else
+		sprintf (buf, "%lf", _value);
+	#endif
+	SetValue (buf);
+}
+
+int TiXmlAttribute::IntValue() const
+{
+	return atoi (value.c_str ());
+}
+
+double  TiXmlAttribute::DoubleValue() const
+{
+	return atof (value.c_str ());
+}
+
+
+TiXmlComment::TiXmlComment( const TiXmlComment& copy ) : TiXmlNode( TiXmlNode::COMMENT )
+{
+	copy.CopyTo( this );
+}
+
+
+void TiXmlComment::operator=( const TiXmlComment& base )
+{
+	Clear();
+	base.CopyTo( this );
+}
+
+
+void TiXmlComment::Print( FILE* cfile, int depth ) const
+{
+	assert( cfile );
+	for ( int i=0; i<depth; i++ )
+	{
+		fprintf( cfile,  "    " );
+	}
+	fprintf( cfile, "<!--%s-->", value.c_str() );
+}
+
+
+void TiXmlComment::CopyTo( TiXmlComment* target ) const
+{
+	TiXmlNode::CopyTo( target );
+}
+
+
+bool TiXmlComment::Accept( TiXmlVisitor* visitor ) const
+{
+	return visitor->Visit( *this );
+}
+
+
+TiXmlNode* TiXmlComment::Clone() const
+{
+	TiXmlComment* clone = new TiXmlComment();
+
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+
+void TiXmlText::Print( FILE* cfile, int depth ) const
+{
+	assert( cfile );
+	if ( cdata )
+	{
+		int i;
+		fprintf( cfile, "\n" );
+		for ( i=0; i<depth; i++ ) {
+			fprintf( cfile, "    " );
+		}
+		fprintf( cfile, "<![CDATA[%s]]>\n", value.c_str() );	// unformatted output
+	}
+	else
+	{
+		TIXML_STRING buffer;
+		EncodeString( value, &buffer );
+		fprintf( cfile, "%s", buffer.c_str() );
+	}
+}
+
+
+void TiXmlText::CopyTo( TiXmlText* target ) const
+{
+	TiXmlNode::CopyTo( target );
+	target->cdata = cdata;
+}
+
+
+bool TiXmlText::Accept( TiXmlVisitor* visitor ) const
+{
+	return visitor->Visit( *this );
+}
+
+
+TiXmlNode* TiXmlText::Clone() const
+{
+	TiXmlText* clone = 0;
+	clone = new TiXmlText( "" );
+
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+
+TiXmlDeclaration::TiXmlDeclaration( const char * _version,
+									const char * _encoding,
+									const char * _standalone )
+	: TiXmlNode( TiXmlNode::DECLARATION )
+{
+	version = _version;
+	encoding = _encoding;
+	standalone = _standalone;
+}
+
+
+#ifdef TIXML_USE_STL
+TiXmlDeclaration::TiXmlDeclaration(	const std::string& _version,
+									const std::string& _encoding,
+									const std::string& _standalone )
+	: TiXmlNode( TiXmlNode::DECLARATION )
+{
+	version = _version;
+	encoding = _encoding;
+	standalone = _standalone;
+}
+#endif
+
+
+TiXmlDeclaration::TiXmlDeclaration( const TiXmlDeclaration& copy )
+	: TiXmlNode( TiXmlNode::DECLARATION )
+{
+	copy.CopyTo( this );
+}
+
+
+void TiXmlDeclaration::operator=( const TiXmlDeclaration& copy )
+{
+	Clear();
+	copy.CopyTo( this );
+}
+
+
+void TiXmlDeclaration::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const
+{
+	if ( cfile ) fprintf( cfile, "<?xml " );
+	if ( str )	 (*str) += "<?xml ";
+
+	if ( !version.empty() ) {
+		if ( cfile ) fprintf (cfile, "version=\"%s\" ", version.c_str ());
+		if ( str ) { (*str) += "version=\""; (*str) += version; (*str) += "\" "; }
+	}
+	if ( !encoding.empty() ) {
+		if ( cfile ) fprintf (cfile, "encoding=\"%s\" ", encoding.c_str ());
+		if ( str ) { (*str) += "encoding=\""; (*str) += encoding; (*str) += "\" "; }
+	}
+	if ( !standalone.empty() ) {
+		if ( cfile ) fprintf (cfile, "standalone=\"%s\" ", standalone.c_str ());
+		if ( str ) { (*str) += "standalone=\""; (*str) += standalone; (*str) += "\" "; }
+	}
+	if ( cfile ) fprintf( cfile, "?>" );
+	if ( str )	 (*str) += "?>";
+}
+
+
+void TiXmlDeclaration::CopyTo( TiXmlDeclaration* target ) const
+{
+	TiXmlNode::CopyTo( target );
+
+	target->version = version;
+	target->encoding = encoding;
+	target->standalone = standalone;
+}
+
+
+bool TiXmlDeclaration::Accept( TiXmlVisitor* visitor ) const
+{
+	return visitor->Visit( *this );
+}
+
+
+TiXmlNode* TiXmlDeclaration::Clone() const
+{
+	TiXmlDeclaration* clone = new TiXmlDeclaration();
+
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+TiXmlStylesheetReference::TiXmlStylesheetReference( const char * _type,
+													const char * _href )
+	: TiXmlNode( TiXmlNode::STYLESHEETREFERENCE )
+{
+	type = _type;
+	href = _href;
+}
+
+
+#ifdef TIXML_USE_STL
+TiXmlStylesheetReference::TiXmlStylesheetReference(	const std::string& _type,
+													const std::string& _href )
+	: TiXmlNode( TiXmlNode::STYLESHEETREFERENCE )
+{
+	type = _type;
+	href = _href;
+}
+#endif
+
+
+TiXmlStylesheetReference::TiXmlStylesheetReference( const TiXmlStylesheetReference& copy )
+	: TiXmlNode( TiXmlNode::STYLESHEETREFERENCE )
+{
+	copy.CopyTo( this );
+}
+
+
+void TiXmlStylesheetReference::operator=( const TiXmlStylesheetReference& copy )
+{
+	Clear();
+	copy.CopyTo( this );
+}
+
+
+void TiXmlStylesheetReference::Print( FILE* cfile, int /*depth*/, TIXML_STRING* str ) const
+{
+	if ( cfile ) fprintf( cfile, "<?xml-stylesheet " );
+	if ( str )	 (*str) += "<?xml-stylesheet ";
+
+	if ( !type.empty() ) {
+		if ( cfile ) fprintf (cfile, "type=\"%s\" ", type.c_str ());
+		if ( str ) { (*str) += "type=\""; (*str) += type; (*str) += "\" "; }
+	}
+	if ( !href.empty() ) {
+		if ( cfile ) fprintf (cfile, "href=\"%s\" ", href.c_str ());
+		if ( str ) { (*str) += "href=\""; (*str) += href; (*str) += "\" "; }
+	}
+	if ( cfile ) fprintf (cfile, "?>");
+	if ( str )	 (*str) += "?>";
+}
+
+void TiXmlStylesheetReference::CopyTo( TiXmlStylesheetReference* target ) const
+{
+	TiXmlNode::CopyTo( target );
+
+	target->type = type;
+	target->href = href;
+}
+
+bool TiXmlStylesheetReference::Accept( TiXmlVisitor* visitor ) const
+{
+	return visitor->Visit( *this );
+}
+
+TiXmlNode* TiXmlStylesheetReference::Clone() const
+{
+	TiXmlStylesheetReference* clone = new TiXmlStylesheetReference();
+
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+void TiXmlUnknown::Print( FILE* cfile, int depth ) const
+{
+	for ( int i=0; i<depth; i++ )
+		fprintf( cfile, "    " );
+	fprintf( cfile, "<%s>", value.c_str() );
+}
+
+
+void TiXmlUnknown::CopyTo( TiXmlUnknown* target ) const
+{
+	TiXmlNode::CopyTo( target );
+}
+
+
+bool TiXmlUnknown::Accept( TiXmlVisitor* visitor ) const
+{
+	return visitor->Visit( *this );
+}
+
+
+TiXmlNode* TiXmlUnknown::Clone() const
+{
+	TiXmlUnknown* clone = new TiXmlUnknown();
+
+	if ( !clone )
+		return 0;
+
+	CopyTo( clone );
+	return clone;
+}
+
+
+TiXmlAttributeSet::TiXmlAttributeSet()
+{
+	sentinel.next = &sentinel;
+	sentinel.prev = &sentinel;
+}
+
+
+TiXmlAttributeSet::~TiXmlAttributeSet()
+{
+	assert( sentinel.next == &sentinel );
+	assert( sentinel.prev == &sentinel );
+}
+
+
+void TiXmlAttributeSet::Add( TiXmlAttribute* addMe )
+{
+    #ifdef TIXML_USE_STL
+	assert( !Find( TIXML_STRING( addMe->Name() ) ) );	// Shouldn't be multiply adding to the set.
+	#else
+	assert( !Find( addMe->Name() ) );	// Shouldn't be multiply adding to the set.
+	#endif
+
+	addMe->next = &sentinel;
+	addMe->prev = sentinel.prev;
+
+	sentinel.prev->next = addMe;
+	sentinel.prev      = addMe;
+}
+
+void TiXmlAttributeSet::Remove( TiXmlAttribute* removeMe )
+{
+	TiXmlAttribute* node;
+
+	for( node = sentinel.next; node != &sentinel; node = node->next )
+	{
+		if ( node == removeMe )
+		{
+			node->prev->next = node->next;
+			node->next->prev = node->prev;
+			node->next = 0;
+			node->prev = 0;
+			return;
+		}
+	}
+	assert( 0 );		// we tried to remove a non-linked attribute.
+}
+
+
+#ifdef TIXML_USE_STL
+const TiXmlAttribute* TiXmlAttributeSet::Find( const std::string& name ) const
+{
+	for( const TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
+	{
+		if ( node->name == name )
+			return node;
+	}
+	return 0;
+}
+
+/*
+TiXmlAttribute*	TiXmlAttributeSet::Find( const std::string& name )
+{
+	for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
+	{
+		if ( node->name == name )
+			return node;
+	}
+	return 0;
+}
+*/
+#endif
+
+
+const TiXmlAttribute* TiXmlAttributeSet::Find( const char* name ) const
+{
+	for( const TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
+	{
+		if ( strcmp( node->name.c_str(), name ) == 0 )
+			return node;
+	}
+	return 0;
+}
+
+/*
+TiXmlAttribute*	TiXmlAttributeSet::Find( const char* name )
+{
+	for( TiXmlAttribute* node = sentinel.next; node != &sentinel; node = node->next )
+	{
+		if ( strcmp( node->name.c_str(), name ) == 0 )
+			return node;
+	}
+	return 0;
+}
+*/
+
+#ifdef TIXML_USE_STL
+std::istream& operator>> (std::istream & in, TiXmlNode & base)
+{
+	TIXML_STRING tag;
+	tag.reserve( 8 * 1000 );
+	base.StreamIn( &in, &tag );
+
+	base.Parse( tag.c_str(), 0, TIXML_DEFAULT_ENCODING );
+	return in;
+}
+#endif
+
+
+#ifdef TIXML_USE_STL
+std::ostream& operator<< (std::ostream & out, const TiXmlNode & base)
+{
+	TiXmlPrinter printer;
+	printer.SetStreamPrinting();
+	base.Accept( &printer );
+	out << printer.Str();
+
+	return out;
+}
+
+
+std::string& operator<< (std::string& out, const TiXmlNode& base )
+{
+	TiXmlPrinter printer;
+	printer.SetStreamPrinting();
+	base.Accept( &printer );
+	out.append( printer.Str() );
+
+	return out;
+}
+#endif
+
+
+TiXmlHandle TiXmlHandle::FirstChild() const
+{
+	if ( node )
+	{
+		TiXmlNode* child = node->FirstChild();
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::FirstChild( const char * value ) const
+{
+	if ( node )
+	{
+		TiXmlNode* child = node->FirstChild( value );
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::FirstChildElement() const
+{
+	if ( node )
+	{
+		TiXmlElement* child = node->FirstChildElement();
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::FirstChildElement( const char * value ) const
+{
+	if ( node )
+	{
+		TiXmlElement* child = node->FirstChildElement( value );
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::Child( int count ) const
+{
+	if ( node )
+	{
+		int i;
+		TiXmlNode* child = node->FirstChild();
+		for (	i=0;
+				child && i<count;
+				child = child->NextSibling(), ++i )
+		{
+			// nothing
+		}
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::Child( const char* value, int count ) const
+{
+	if ( node )
+	{
+		int i;
+		TiXmlNode* child = node->FirstChild( value );
+		for (	i=0;
+				child && i<count;
+				child = child->NextSibling( value ), ++i )
+		{
+			// nothing
+		}
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::ChildElement( int count ) const
+{
+	if ( node )
+	{
+		int i;
+		TiXmlElement* child = node->FirstChildElement();
+		for (	i=0;
+				child && i<count;
+				child = child->NextSiblingElement(), ++i )
+		{
+			// nothing
+		}
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+TiXmlHandle TiXmlHandle::ChildElement( const char* value, int count ) const
+{
+	if ( node )
+	{
+		int i;
+		TiXmlElement* child = node->FirstChildElement( value );
+		for (	i=0;
+				child && i<count;
+				child = child->NextSiblingElement( value ), ++i )
+		{
+			// nothing
+		}
+		if ( child )
+			return TiXmlHandle( child );
+	}
+	return TiXmlHandle( 0 );
+}
+
+
+bool TiXmlPrinter::VisitEnter( const TiXmlDocument& )
+{
+	return true;
+}
+
+bool TiXmlPrinter::VisitExit( const TiXmlDocument& )
+{
+	return true;
+}
+
+bool TiXmlPrinter::VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute )
+{
+	DoIndent();
+	buffer += "<";
+	buffer += element.Value();
+
+	for( const TiXmlAttribute* attrib = firstAttribute; attrib; attrib = attrib->Next() )
+	{
+		buffer += " ";
+		attrib->Print( 0, 0, &buffer );
+	}
+
+	if ( !element.FirstChild() )
+	{
+		buffer += " />";
+		DoLineBreak();
+	}
+	else
+	{
+		buffer += ">";
+		if (    element.FirstChild()->ToText()
+			  && element.LastChild() == element.FirstChild()
+			  && element.FirstChild()->ToText()->CDATA() == false )
+		{
+			simpleTextPrint = true;
+			// no DoLineBreak()!
+		}
+		else
+		{
+			DoLineBreak();
+		}
+	}
+	++depth;
+	return true;
+}
+
+
+bool TiXmlPrinter::VisitExit( const TiXmlElement& element )
+{
+	--depth;
+	if ( !element.FirstChild() )
+	{
+		// nothing.
+	}
+	else
+	{
+		if ( simpleTextPrint )
+		{
+			simpleTextPrint = false;
+		}
+		else
+		{
+			DoIndent();
+		}
+		buffer += "</";
+		buffer += element.Value();
+		buffer += ">";
+		DoLineBreak();
+	}
+	return true;
+}
+
+
+bool TiXmlPrinter::Visit( const TiXmlText& text )
+{
+	if ( text.CDATA() )
+	{
+		DoIndent();
+		buffer += "<![CDATA[";
+		buffer += text.Value();
+		buffer += "]]>";
+		DoLineBreak();
+	}
+	else if ( simpleTextPrint )
+	{
+		TIXML_STRING str;
+		TiXmlBase::EncodeString( text.ValueTStr(), &str );
+		buffer += str;
+	}
+	else
+	{
+		DoIndent();
+		TIXML_STRING str;
+		TiXmlBase::EncodeString( text.ValueTStr(), &str );
+		buffer += str;
+		DoLineBreak();
+	}
+	return true;
+}
+
+
+bool TiXmlPrinter::Visit( const TiXmlDeclaration& declaration )
+{
+	DoIndent();
+	declaration.Print( 0, 0, &buffer );
+	DoLineBreak();
+	return true;
+}
+
+
+bool TiXmlPrinter::Visit( const TiXmlComment& comment )
+{
+	DoIndent();
+	buffer += "<!--";
+	buffer += comment.Value();
+	buffer += "-->";
+	DoLineBreak();
+	return true;
+}
+
+
+bool TiXmlPrinter::Visit( const TiXmlUnknown& unknown )
+{
+	DoIndent();
+	buffer += "<";
+	buffer += unknown.Value();
+	buffer += ">";
+	DoLineBreak();
+	return true;
+}
+
Index: /code/branches/network/src/util/tinyxml/tinyxml.h
===================================================================
--- /code/branches/network/src/util/tinyxml/tinyxml.h	(revision 861)
+++ /code/branches/network/src/util/tinyxml/tinyxml.h	(revision 861)
@@ -0,0 +1,1883 @@
+/*
+www.sourceforge.net/projects/tinyxml
+Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+*/
+
+
+#ifndef TINYXML_INCLUDED
+#define TINYXML_INCLUDED
+
+#ifdef _MSC_VER
+#pragma warning( push )
+#pragma warning( disable : 4530 )
+#pragma warning( disable : 4786 )
+#endif
+
+#include <ctype.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+
+// Help out windows:
+#if defined( _DEBUG ) && !defined( DEBUG )
+#define DEBUG
+#endif
+
+#ifdef TIXML_USE_TICPP
+	#ifndef TIXML_USE_STL
+		#define TIXML_USE_STL
+	#endif
+#endif
+
+#ifdef TIXML_USE_STL
+	#include <string>
+ 	#include <iostream>
+	#include <sstream>
+	#define TIXML_STRING		std::string
+#else
+	#include "tinystr.h"
+	#define TIXML_STRING		TiXmlString
+#endif
+
+// Deprecated library function hell. Compilers want to use the
+// new safe versions. This probably doesn't fully address the problem,
+// but it gets closer. There are too many compilers for me to fully
+// test. If you get compilation troubles, undefine TIXML_SAFE
+#define TIXML_SAFE
+
+#ifdef TIXML_SAFE
+	#if defined(_MSC_VER) && (_MSC_VER >= 1400 )
+		// Microsoft visual studio, version 2005 and higher.
+		#define TIXML_SNPRINTF _snprintf_s
+		#define TIXML_SNSCANF  _snscanf_s
+		#define TIXML_SSCANF   sscanf_s
+	#elif defined(_MSC_VER) && (_MSC_VER >= 1200 )
+		// Microsoft visual studio, version 6 and higher.
+		//#pragma message( "Using _sn* functions." )
+		#define TIXML_SNPRINTF _snprintf
+		#define TIXML_SNSCANF  _snscanf
+		#define TIXML_SSCANF   sscanf
+	#elif defined(__GNUC__) && (__GNUC__ >= 3 )
+		// GCC version 3 and higher.s
+		//#warning( "Using sn* functions." )
+		#define TIXML_SNPRINTF snprintf
+		#define TIXML_SNSCANF  snscanf
+		#define TIXML_SSCANF   sscanf
+	#else
+		#define TIXML_SSCANF   sscanf
+	#endif
+#endif
+
+class TiXmlDocument;
+class TiXmlElement;
+class TiXmlComment;
+class TiXmlUnknown;
+class TiXmlAttribute;
+class TiXmlText;
+class TiXmlDeclaration;
+class TiXmlStylesheetReference;
+class TiXmlParsingData;
+
+const int TIXML_MAJOR_VERSION = 2;
+const int TIXML_MINOR_VERSION = 5;
+const int TIXML_PATCH_VERSION = 3;
+
+/*	Internal structure for tracking location of items
+	in the XML file.
+*/
+struct TiXmlCursor
+{
+	TiXmlCursor()		{ Clear(); }
+	void Clear()		{ row = col = -1; }
+
+	int row;	// 0 based.
+	int col;	// 0 based.
+};
+
+
+/**
+	If you call the Accept() method, it requires being passed a TiXmlVisitor
+	class to handle callbacks. For nodes that contain other nodes (Document, Element)
+	you will get called with a VisitEnter/VisitExit pair. Nodes that are always leaves
+	are simple called with Visit().
+
+	If you return 'true' from a Visit method, recursive parsing will continue. If you return
+	false, <b>no children of this node or its sibilings</b> will be Visited.
+
+	All flavors of Visit methods have a default implementation that returns 'true' (continue
+	visiting). You need to only override methods that are interesting to you.
+
+	Generally Accept() is called on the TiXmlDocument, although all nodes suppert Visiting.
+
+	You should never change the document from a callback.
+
+	@sa TiXmlNode::Accept()
+*/
+class TiXmlVisitor
+{
+public:
+	virtual ~TiXmlVisitor() {}
+
+	/// Visit a document.
+	virtual bool VisitEnter( const TiXmlDocument& /*doc*/ )			{ return true; }
+	/// Visit a document.
+	virtual bool VisitExit( const TiXmlDocument& /*doc*/ )			{ return true; }
+
+	/// Visit an element.
+	virtual bool VisitEnter( const TiXmlElement& /*element*/, const TiXmlAttribute* /*firstAttribute*/ )	{ return true; }
+	/// Visit an element.
+	virtual bool VisitExit( const TiXmlElement& /*element*/ )		{ return true; }
+
+	/// Visit a declaration
+	virtual bool Visit( const TiXmlDeclaration& /*declaration*/ )	{ return true; }
+	/// Visit a stylesheet reference
+	virtual bool Visit( const TiXmlStylesheetReference& /*stylesheet*/ )	{ return true; }
+	/// Visit a text node
+	virtual bool Visit( const TiXmlText& /*text*/ )					{ return true; }
+	/// Visit a comment node
+	virtual bool Visit( const TiXmlComment& /*comment*/ )			{ return true; }
+	/// Visit an unknow node
+	virtual bool Visit( const TiXmlUnknown& /*unknown*/ )			{ return true; }
+};
+
+// Only used by Attribute::Query functions
+enum
+{
+	TIXML_SUCCESS,
+	TIXML_NO_ATTRIBUTE,
+	TIXML_WRONG_TYPE
+};
+
+
+// Used by the parsing routines.
+enum TiXmlEncoding
+{
+	TIXML_ENCODING_UNKNOWN,
+	TIXML_ENCODING_UTF8,
+	TIXML_ENCODING_LEGACY
+};
+
+const TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
+
+/** TiXmlBase is a base class for every class in TinyXml.
+	It does little except to establish that TinyXml classes
+	can be printed and provide some utility functions.
+
+	In XML, the document and elements can contain
+	other elements and other types of nodes.
+
+	@verbatim
+	A Document can contain:	Element	(container or leaf)
+							Comment (leaf)
+							Unknown (leaf)
+							Declaration( leaf )
+
+	An Element can contain:	Element (container or leaf)
+							Text	(leaf)
+							Attributes (not on tree)
+							Comment (leaf)
+							Unknown (leaf)
+
+	A Decleration contains: Attributes (not on tree)
+	@endverbatim
+*/
+#ifdef TIXML_USE_TICPP
+#include "ticpprc.h"
+class TiXmlBase : public TiCppRC
+#else
+class TiXmlBase
+#endif
+{
+	friend class TiXmlNode;
+	friend class TiXmlElement;
+	friend class TiXmlDocument;
+
+public:
+	TiXmlBase()	:	userData(0)		{}
+	virtual ~TiXmlBase()			{}
+
+	/**	All TinyXml classes can print themselves to a filestream
+		or the string class (TiXmlString in non-STL mode, std::string
+		in STL mode.) Either or both cfile and str can be null.
+
+		This is a formatted print, and will insert
+		tabs and newlines.
+
+		(For an unformatted stream, use the << operator.)
+	*/
+	virtual void Print( FILE* cfile, int depth ) const = 0;
+
+	/**	The world does not agree on whether white space should be kept or
+		not. In order to make everyone happy, these global, static functions
+		are provided to set whether or not TinyXml will condense all white space
+		into a single space or not. The default is to condense. Note changing this
+		value is not thread safe.
+	*/
+	static void SetCondenseWhiteSpace( bool condense )		{ condenseWhiteSpace = condense; }
+
+	/// Return the current white space setting.
+	static bool IsWhiteSpaceCondensed()						{ return condenseWhiteSpace; }
+
+	/** Return the position, in the original source file, of this node or attribute.
+		The row and column are 1-based. (That is the first row and first column is
+		1,1). If the returns values are 0 or less, then the parser does not have
+		a row and column value.
+
+		Generally, the row and column value will be set when the TiXmlDocument::Load(),
+		TiXmlDocument::LoadFile(), or any TiXmlNode::Parse() is called. It will NOT be set
+		when the DOM was created from operator>>.
+
+		The values reflect the initial load. Once the DOM is modified programmatically
+		(by adding or changing nodes and attributes) the new values will NOT update to
+		reflect changes in the document.
+
+		There is a minor performance cost to computing the row and column. Computation
+		can be disabled if TiXmlDocument::SetTabSize() is called with 0 as the value.
+
+		@sa TiXmlDocument::SetTabSize()
+	*/
+	int Row() const			{ return location.row + 1; }
+	int Column() const		{ return location.col + 1; }	///< See Row()
+
+	void  SetUserData( void* user )			{ userData = user; }	///< Set a pointer to arbitrary user data.
+	void* GetUserData()						{ return userData; }	///< Get a pointer to arbitrary user data.
+	const void* GetUserData() const 		{ return userData; }	///< Get a pointer to arbitrary user data.
+
+	// Table that returs, for a given lead byte, the total number of bytes
+	// in the UTF-8 sequence.
+	static const int utf8ByteTable[256];
+
+	virtual const char* Parse(	const char* p,
+								TiXmlParsingData* data,
+								TiXmlEncoding encoding /*= TIXML_ENCODING_UNKNOWN */ ) = 0;
+
+	/** Expands entities in a string. Note this should not contian the tag's '<', '>', etc,
+		or they will be transformed into entities!
+	*/
+	static void EncodeString( const TIXML_STRING& str, TIXML_STRING* out );
+
+	enum
+	{
+		TIXML_NO_ERROR = 0,
+		TIXML_ERROR,
+		TIXML_ERROR_OPENING_FILE,
+		TIXML_ERROR_OUT_OF_MEMORY,
+		TIXML_ERROR_PARSING_ELEMENT,
+		TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
+		TIXML_ERROR_READING_ELEMENT_VALUE,
+		TIXML_ERROR_READING_ATTRIBUTES,
+		TIXML_ERROR_PARSING_EMPTY,
+		TIXML_ERROR_READING_END_TAG,
+		TIXML_ERROR_PARSING_UNKNOWN,
+		TIXML_ERROR_PARSING_COMMENT,
+		TIXML_ERROR_PARSING_DECLARATION,
+		TIXML_ERROR_DOCUMENT_EMPTY,
+		TIXML_ERROR_EMBEDDED_NULL,
+		TIXML_ERROR_PARSING_CDATA,
+		TIXML_ERROR_DOCUMENT_TOP_ONLY,
+
+		TIXML_ERROR_STRING_COUNT
+	};
+
+protected:
+
+	static const char* SkipWhiteSpace( const char*, TiXmlEncoding encoding );
+	inline static bool IsWhiteSpace( char c )
+	{
+		return ( isspace( (unsigned char) c ) || c == '\n' || c == '\r' );
+	}
+	inline static bool IsWhiteSpace( int c )
+	{
+		if ( c < 256 )
+			return IsWhiteSpace( (char) c );
+		return false;	// Again, only truly correct for English/Latin...but usually works.
+	}
+
+	#ifdef TIXML_USE_STL
+	static bool	StreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
+	static bool StreamTo( std::istream * in, int character, TIXML_STRING * tag );
+	#endif
+
+	/*	Reads an XML name into the string provided. Returns
+		a pointer just past the last character of the name,
+		or 0 if the function has an error.
+	*/
+	static const char* ReadName( const char* p, TIXML_STRING* name, TiXmlEncoding encoding );
+
+	/*	Reads text. Returns a pointer past the given end tag.
+		Wickedly complex options, but it keeps the (sensitive) code in one place.
+	*/
+	static const char* ReadText(	const char* in,				// where to start
+									TIXML_STRING* text,			// the string read
+									bool ignoreWhiteSpace,		// whether to keep the white space
+									const char* endTag,			// what ends this text
+									bool ignoreCase,			// whether to ignore case in the end tag
+									TiXmlEncoding encoding );	// the current encoding
+
+	// If an entity has been found, transform it into a character.
+	static const char* GetEntity( const char* in, char* value, int* length, TiXmlEncoding encoding );
+
+	// Get a character, while interpreting entities.
+	// The length can be from 0 to 4 bytes.
+	inline static const char* GetChar( const char* p, char* _value, int* length, TiXmlEncoding encoding )
+	{
+		assert( p );
+		if ( encoding == TIXML_ENCODING_UTF8 )
+		{
+			*length = utf8ByteTable[ *((const unsigned char*)p) ];
+			assert( *length >= 0 && *length < 5 );
+		}
+		else
+		{
+			*length = 1;
+		}
+
+		if ( *length == 1 )
+		{
+			if ( *p == '&' )
+				return GetEntity( p, _value, length, encoding );
+			*_value = *p;
+			return p+1;
+		}
+		else if ( *length )
+		{
+			//strncpy( _value, p, *length );	// lots of compilers don't like this function (unsafe),
+												// and the null terminator isn't needed
+			for( int i=0; p[i] && i<*length; ++i ) {
+				_value[i] = p[i];
+			}
+			return p + (*length);
+		}
+		else
+		{
+			// Not valid text.
+			return 0;
+		}
+	}
+
+	// Return true if the next characters in the stream are any of the endTag sequences.
+	// Ignore case only works for english, and should only be relied on when comparing
+	// to English words: StringEqual( p, "version", true ) is fine.
+	static bool StringEqual(	const char* p,
+								const char* endTag,
+								bool ignoreCase,
+								TiXmlEncoding encoding );
+
+	static const char* errorString[ TIXML_ERROR_STRING_COUNT ];
+
+	TiXmlCursor location;
+
+    /// Field containing a generic user pointer
+	void*			userData;
+
+	// None of these methods are reliable for any language except English.
+	// Good for approximation, not great for accuracy.
+	static int IsAlpha( unsigned char anyByte, TiXmlEncoding encoding );
+	static int IsAlphaNum( unsigned char anyByte, TiXmlEncoding encoding );
+	inline static int ToLower( int v, TiXmlEncoding encoding )
+	{
+		if ( encoding == TIXML_ENCODING_UTF8 )
+		{
+			if ( v < 128 ) return tolower( v );
+			return v;
+		}
+		else
+		{
+			return tolower( v );
+		}
+	}
+	static void ConvertUTF32ToUTF8( unsigned long input, char* output, int* length );
+
+private:
+	TiXmlBase( const TiXmlBase& );				// not implemented.
+	void operator=( const TiXmlBase& base );	// not allowed.
+
+	struct Entity
+	{
+		const char*     str;
+		unsigned int	strLength;
+		char		    chr;
+	};
+	enum
+	{
+		NUM_ENTITY = 5,
+		MAX_ENTITY_LENGTH = 6
+
+	};
+	static Entity entity[ NUM_ENTITY ];
+	static bool condenseWhiteSpace;
+};
+
+
+/** The parent class for everything in the Document Object Model.
+	(Except for attributes).
+	Nodes have siblings, a parent, and children. A node can be
+	in a document, or stand on its own. The type of a TiXmlNode
+	can be queried, and it can be cast to its more defined type.
+*/
+class TiXmlNode : public TiXmlBase
+{
+	friend class TiXmlDocument;
+	friend class TiXmlElement;
+
+public:
+	#ifdef TIXML_USE_STL
+
+	    /** An input stream operator, for every class. Tolerant of newlines and
+		    formatting, but doesn't expect them.
+	    */
+	    friend std::istream& operator >> (std::istream& in, TiXmlNode& base);
+
+	    /** An output stream operator, for every class. Note that this outputs
+		    without any newlines or formatting, as opposed to Print(), which
+		    includes tabs and new lines.
+
+		    The operator<< and operator>> are not completely symmetric. Writing
+		    a node to a stream is very well defined. You'll get a nice stream
+		    of output, without any extra whitespace or newlines.
+
+		    But reading is not as well defined. (As it always is.) If you create
+		    a TiXmlElement (for example) and read that from an input stream,
+		    the text needs to define an element or junk will result. This is
+		    true of all input streams, but it's worth keeping in mind.
+
+		    A TiXmlDocument will read nodes until it reads a root element, and
+			all the children of that root element.
+	    */
+	    friend std::ostream& operator<< (std::ostream& out, const TiXmlNode& base);
+
+		/// Appends the XML node or attribute to a std::string.
+		friend std::string& operator<< (std::string& out, const TiXmlNode& base );
+
+	#endif
+
+	/** The types of XML nodes supported by TinyXml. (All the
+			unsupported types are picked up by UNKNOWN.)
+	*/
+	enum NodeType
+	{
+		DOCUMENT,
+		ELEMENT,
+		COMMENT,
+		UNKNOWN,
+		TEXT,
+		DECLARATION,
+		STYLESHEETREFERENCE,
+		TYPECOUNT
+	};
+
+	virtual ~TiXmlNode();
+
+	/** The meaning of 'value' changes for the specific type of
+		TiXmlNode.
+		@verbatim
+		Document:	filename of the xml file
+		Element:	name of the element
+		Comment:	the comment text
+		Unknown:	the tag contents
+		Text:		the text string
+		@endverbatim
+
+		The subclasses will wrap this function.
+	*/
+	const char *Value() const { return value.c_str (); }
+
+    #ifdef TIXML_USE_STL
+	/** Return Value() as a std::string. If you only use STL,
+	    this is more efficient than calling Value().
+		Only available in STL mode.
+	*/
+	const std::string& ValueStr() const { return value; }
+	#endif
+
+	const TIXML_STRING& ValueTStr() const { return value; }
+
+	/** Changes the value of the node. Defined as:
+		@verbatim
+		Document:	filename of the xml file
+		Element:	name of the element
+		Comment:	the comment text
+		Unknown:	the tag contents
+		Text:		the text string
+		@endverbatim
+	*/
+	void SetValue(const char * _value) { value = _value;}
+
+    #ifdef TIXML_USE_STL
+	/// STL std::string form.
+	void SetValue( const std::string& _value )	{ value = _value; }
+	#endif
+
+	/// Delete all the children of this node. Does not affect 'this'.
+	void Clear();
+
+	/// One step up the DOM.
+	TiXmlNode* Parent()							{ return parent; }
+	const TiXmlNode* Parent() const				{ return parent; }
+
+	const TiXmlNode* FirstChild()	const		{ return firstChild; }	///< The first child of this node. Will be null if there are no children.
+	TiXmlNode* FirstChild()						{ return firstChild; }
+	const TiXmlNode* FirstChild( const char * value ) const;			///< The first child of this node with the matching 'value'. Will be null if none found.
+	/// The first child of this node with the matching 'value'. Will be null if none found.
+	TiXmlNode* FirstChild( const char * _value ) {
+		// Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)
+		// call the method, cast the return back to non-const.
+		return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->FirstChild( _value ));
+	}
+	const TiXmlNode* LastChild() const	{ return lastChild; }		/// The last child of this node. Will be null if there are no children.
+	TiXmlNode* LastChild()	{ return lastChild; }
+
+	const TiXmlNode* LastChild( const char * value ) const;			/// The last child of this node matching 'value'. Will be null if there are no children.
+	TiXmlNode* LastChild( const char * _value ) {
+		return const_cast< TiXmlNode* > ((const_cast< const TiXmlNode* >(this))->LastChild( _value ));
+	}
+
+    #ifdef TIXML_USE_STL
+	const TiXmlNode* FirstChild( const std::string& _value ) const	{	return FirstChild (_value.c_str ());	}	///< STL std::string form.
+	TiXmlNode* FirstChild( const std::string& _value )				{	return FirstChild (_value.c_str ());	}	///< STL std::string form.
+	const TiXmlNode* LastChild( const std::string& _value ) const	{	return LastChild (_value.c_str ());	}	///< STL std::string form.
+	TiXmlNode* LastChild( const std::string& _value )				{	return LastChild (_value.c_str ());	}	///< STL std::string form.
+	#endif
+
+	/** An alternate way to walk the children of a node.
+		One way to iterate over nodes is:
+		@verbatim
+			for( child = parent->FirstChild(); child; child = child->NextSibling() )
+		@endverbatim
+
+		IterateChildren does the same thing with the syntax:
+		@verbatim
+			child = 0;
+			while( child = parent->IterateChildren( child ) )
+		@endverbatim
+
+		IterateChildren takes the previous child as input and finds
+		the next one. If the previous child is null, it returns the
+		first. IterateChildren will return null when done.
+	*/
+	const TiXmlNode* IterateChildren( const TiXmlNode* previous ) const;
+	TiXmlNode* IterateChildren( const TiXmlNode* previous ) {
+		return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( previous ) );
+	}
+
+	/// This flavor of IterateChildren searches for children with a particular 'value'
+	const TiXmlNode* IterateChildren( const char * value, const TiXmlNode* previous ) const;
+	TiXmlNode* IterateChildren( const char * _value, const TiXmlNode* previous ) {
+		return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->IterateChildren( _value, previous ) );
+	}
+
+    #ifdef TIXML_USE_STL
+	const TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) const	{	return IterateChildren (_value.c_str (), previous);	}	///< STL std::string form.
+	TiXmlNode* IterateChildren( const std::string& _value, const TiXmlNode* previous ) {	return IterateChildren (_value.c_str (), previous);	}	///< STL std::string form.
+	#endif
+
+	/** Add a new node related to this. Adds a child past the LastChild.
+		Returns a pointer to the new object or NULL if an error occured.
+	*/
+	TiXmlNode* InsertEndChild( const TiXmlNode& addThis );
+
+
+	/** Add a new node related to this. Adds a child past the LastChild.
+
+		NOTE: the node to be added is passed by pointer, and will be
+		henceforth owned (and deleted) by tinyXml. This method is efficient
+		and avoids an extra copy, but should be used with care as it
+		uses a different memory model than the other insert functions.
+
+		@sa InsertEndChild
+	*/
+	TiXmlNode* LinkEndChild( TiXmlNode* addThis );
+
+	/** Add a new node related to this. Adds a child before the specified child.
+		Returns a pointer to the new object or NULL if an error occured.
+	*/
+	TiXmlNode* InsertBeforeChild( TiXmlNode* beforeThis, const TiXmlNode& addThis );
+
+	/** Add a new node related to this. Adds a child after the specified child.
+		Returns a pointer to the new object or NULL if an error occured.
+	*/
+	TiXmlNode* InsertAfterChild(  TiXmlNode* afterThis, const TiXmlNode& addThis );
+
+	/** Replace a child of this node.
+		Returns a pointer to the new object or NULL if an error occured.
+	*/
+	TiXmlNode* ReplaceChild( TiXmlNode* replaceThis, const TiXmlNode& withThis );
+
+	/// Delete a child of this node.
+	bool RemoveChild( TiXmlNode* removeThis );
+
+	/// Navigate to a sibling node.
+	const TiXmlNode* PreviousSibling() const			{ return prev; }
+	TiXmlNode* PreviousSibling()						{ return prev; }
+
+	/// Navigate to a sibling node.
+	const TiXmlNode* PreviousSibling( const char * ) const;
+	TiXmlNode* PreviousSibling( const char *_prev ) {
+		return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->PreviousSibling( _prev ) );
+	}
+
+    #ifdef TIXML_USE_STL
+	const TiXmlNode* PreviousSibling( const std::string& _value ) const	{	return PreviousSibling (_value.c_str ());	}	///< STL std::string form.
+	TiXmlNode* PreviousSibling( const std::string& _value ) 			{	return PreviousSibling (_value.c_str ());	}	///< STL std::string form.
+	const TiXmlNode* NextSibling( const std::string& _value) const		{	return NextSibling (_value.c_str ());	}	///< STL std::string form.
+	TiXmlNode* NextSibling( const std::string& _value) 					{	return NextSibling (_value.c_str ());	}	///< STL std::string form.
+	#endif
+
+	/// Navigate to a sibling node.
+	const TiXmlNode* NextSibling() const				{ return next; }
+	TiXmlNode* NextSibling()							{ return next; }
+
+	/// Navigate to a sibling node with the given 'value'.
+	const TiXmlNode* NextSibling( const char * ) const;
+	TiXmlNode* NextSibling( const char* _next ) {
+		return const_cast< TiXmlNode* >( (const_cast< const TiXmlNode* >(this))->NextSibling( _next ) );
+	}
+
+	/** Convenience function to get through elements.
+		Calls NextSibling and ToElement. Will skip all non-Element
+		nodes. Returns 0 if there is not another element.
+	*/
+	const TiXmlElement* NextSiblingElement() const;
+	TiXmlElement* NextSiblingElement() {
+		return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement() );
+	}
+
+	/** Convenience function to get through elements.
+		Calls NextSibling and ToElement. Will skip all non-Element
+		nodes. Returns 0 if there is not another element.
+	*/
+	const TiXmlElement* NextSiblingElement( const char * ) const;
+	TiXmlElement* NextSiblingElement( const char *_next ) {
+		return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->NextSiblingElement( _next ) );
+	}
+
+    #ifdef TIXML_USE_STL
+	const TiXmlElement* NextSiblingElement( const std::string& _value) const	{	return NextSiblingElement (_value.c_str ());	}	///< STL std::string form.
+	TiXmlElement* NextSiblingElement( const std::string& _value)				{	return NextSiblingElement (_value.c_str ());	}	///< STL std::string form.
+	#endif
+
+	/// Convenience function to get through elements.
+	const TiXmlElement* FirstChildElement()	const;
+	TiXmlElement* FirstChildElement() {
+		return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement() );
+	}
+
+	/// Convenience function to get through elements.
+	const TiXmlElement* FirstChildElement( const char * _value ) const;
+	TiXmlElement* FirstChildElement( const char * _value ) {
+		return const_cast< TiXmlElement* >( (const_cast< const TiXmlNode* >(this))->FirstChildElement( _value ) );
+	}
+
+    #ifdef TIXML_USE_STL
+	const TiXmlElement* FirstChildElement( const std::string& _value ) const	{	return FirstChildElement (_value.c_str ());	}	///< STL std::string form.
+	TiXmlElement* FirstChildElement( const std::string& _value )				{	return FirstChildElement (_value.c_str ());	}	///< STL std::string form.
+	#endif
+
+	/** Query the type (as an enumerated value, above) of this node.
+		The possible types are: DOCUMENT, ELEMENT, COMMENT,
+								UNKNOWN, TEXT, and DECLARATION.
+	*/
+	int Type() const	{ return type; }
+
+	/** Return a pointer to the Document this node lives in.
+		Returns null if not in a document.
+	*/
+	const TiXmlDocument* GetDocument() const;
+	TiXmlDocument* GetDocument() {
+		return const_cast< TiXmlDocument* >( (const_cast< const TiXmlNode* >(this))->GetDocument() );
+	}
+
+	/// Returns true if this node has no children.
+	bool NoChildren() const						{ return !firstChild; }
+
+	virtual const TiXmlDocument*    ToDocument()    const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual const TiXmlElement*     ToElement()     const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual const TiXmlComment*     ToComment()     const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual const TiXmlUnknown*     ToUnknown()     const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual const TiXmlText*        ToText()        const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual const TiXmlDeclaration* ToDeclaration() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual const TiXmlStylesheetReference* ToStylesheetReference() const { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+
+	virtual TiXmlDocument*          ToDocument()    { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual TiXmlElement*           ToElement()	    { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual TiXmlComment*           ToComment()     { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual TiXmlUnknown*           ToUnknown()	    { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual TiXmlText*	            ToText()        { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual TiXmlDeclaration*       ToDeclaration() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+	virtual TiXmlStylesheetReference*       ToStylesheetReference() { return 0; } ///< Cast to a more defined type. Will return null if not of the requested type.
+
+	/** Create an exact duplicate of this node and return it. The memory must be deleted
+		by the caller.
+	*/
+	virtual TiXmlNode* Clone() const = 0;
+
+	/** Accept a hierchical visit the nodes in the TinyXML DOM. Every node in the
+		XML tree will be conditionally visited and the host will be called back
+		via the TiXmlVisitor interface.
+
+		This is essentially a SAX interface for TinyXML. (Note however it doesn't re-parse
+		the XML for the callbacks, so the performance of TinyXML is unchanged by using this
+		interface versus any other.)
+
+		The interface has been based on ideas from:
+
+		- http://www.saxproject.org/
+		- http://c2.com/cgi/wiki?HierarchicalVisitorPattern
+
+		Which are both good references for "visiting".
+
+		An example of using Accept():
+		@verbatim
+		TiXmlPrinter printer;
+		tinyxmlDoc.Accept( &printer );
+		const char* xmlcstr = printer.CStr();
+		@endverbatim
+	*/
+	virtual bool Accept( TiXmlVisitor* visitor ) const = 0;
+
+protected:
+	TiXmlNode( NodeType _type );
+
+	// Copy to the allocated object. Shared functionality between Clone, Copy constructor,
+	// and the assignment operator.
+	void CopyTo( TiXmlNode* target ) const;
+
+	#ifdef TIXML_USE_STL
+	    // The real work of the input operator.
+	virtual void StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
+	#endif
+
+	// Figure out what is at *p, and parse it. Returns null if it is not an xml node.
+	TiXmlNode* Identify( const char* start, TiXmlEncoding encoding );
+
+	TiXmlNode*		parent;
+	NodeType		type;
+
+	TiXmlNode*		firstChild;
+	TiXmlNode*		lastChild;
+
+	TIXML_STRING	value;
+
+	TiXmlNode*		prev;
+	TiXmlNode*		next;
+
+private:
+	TiXmlNode( const TiXmlNode& );				// not implemented.
+	void operator=( const TiXmlNode& base );	// not allowed.
+};
+
+
+/** An attribute is a name-value pair. Elements have an arbitrary
+	number of attributes, each with a unique name.
+
+	@note The attributes are not TiXmlNodes, since they are not
+		  part of the tinyXML document object model. There are other
+		  suggested ways to look at this problem.
+*/
+class TiXmlAttribute : public TiXmlBase
+{
+	friend class TiXmlAttributeSet;
+
+public:
+	/// Construct an empty attribute.
+	TiXmlAttribute() : TiXmlBase()
+	{
+		document = 0;
+		prev = next = 0;
+	}
+
+	#ifdef TIXML_USE_STL
+	/// std::string constructor.
+	TiXmlAttribute( const std::string& _name, const std::string& _value )
+	{
+		name = _name;
+		value = _value;
+		document = 0;
+		prev = next = 0;
+	}
+	#endif
+
+	/// Construct an attribute with a name and value.
+	TiXmlAttribute( const char * _name, const char * _value )
+	{
+		name = _name;
+		value = _value;
+		document = 0;
+		prev = next = 0;
+	}
+
+	const char*		Name()  const		{ return name.c_str(); }		///< Return the name of this attribute.
+	const char*		Value() const		{ return value.c_str(); }		///< Return the value of this attribute.
+	#ifdef TIXML_USE_STL
+	const std::string& ValueStr() const	{ return value; }				///< Return the value of this attribute.
+	#endif
+	int				IntValue() const;									///< Return the value of this attribute, converted to an integer.
+	double			DoubleValue() const;								///< Return the value of this attribute, converted to a double.
+
+	// Get the tinyxml string representation
+	const TIXML_STRING& NameTStr() const { return name; }
+
+	/** QueryIntValue examines the value string. It is an alternative to the
+		IntValue() method with richer error checking.
+		If the value is an integer, it is stored in 'value' and
+		the call returns TIXML_SUCCESS. If it is not
+		an integer, it returns TIXML_WRONG_TYPE.
+
+		A specialized but useful call. Note that for success it returns 0,
+		which is the opposite of almost all other TinyXml calls.
+	*/
+	int QueryIntValue( int* _value ) const;
+	/// QueryDoubleValue examines the value string. See QueryIntValue().
+	int QueryDoubleValue( double* _value ) const;
+
+	void SetName( const char* _name )	{ name = _name; }				///< Set the name of this attribute.
+	void SetValue( const char* _value )	{ value = _value; }				///< Set the value.
+
+	void SetIntValue( int _value );										///< Set the value from an integer.
+	void SetDoubleValue( double _value );								///< Set the value from a double.
+
+    #ifdef TIXML_USE_STL
+	/// STL std::string form.
+	void SetName( const std::string& _name )	{ name = _name; }
+	/// STL std::string form.
+	void SetValue( const std::string& _value )	{ value = _value; }
+	#endif
+
+	/// Get the next sibling attribute in the DOM. Returns null at end.
+	const TiXmlAttribute* Next() const;
+	TiXmlAttribute* Next() {
+		return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Next() );
+	}
+
+	/// Get the previous sibling attribute in the DOM. Returns null at beginning.
+	const TiXmlAttribute* Previous() const;
+	TiXmlAttribute* Previous() {
+		return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttribute* >(this))->Previous() );
+	}
+
+	bool operator==( const TiXmlAttribute& rhs ) const { return rhs.name == name; }
+	bool operator<( const TiXmlAttribute& rhs )	 const { return name < rhs.name; }
+	bool operator>( const TiXmlAttribute& rhs )  const { return name > rhs.name; }
+
+	/*	Attribute parsing starts: first letter of the name
+						 returns: the next char after the value end quote
+	*/
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	// Prints this Attribute to a FILE stream.
+	virtual void Print( FILE* cfile, int depth ) const {
+		Print( cfile, depth, 0 );
+	}
+	void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
+
+	// [internal use]
+	// Set the document pointer so the attribute can report errors.
+	void SetDocument( TiXmlDocument* doc )	{ document = doc; }
+
+private:
+	TiXmlAttribute( const TiXmlAttribute& );				// not implemented.
+	void operator=( const TiXmlAttribute& base );	// not allowed.
+
+	TiXmlDocument*	document;	// A pointer back to a document, for error reporting.
+	TIXML_STRING name;
+	TIXML_STRING value;
+	TiXmlAttribute*	prev;
+	TiXmlAttribute*	next;
+};
+
+
+/*	A class used to manage a group of attributes.
+	It is only used internally, both by the ELEMENT and the DECLARATION.
+
+	The set can be changed transparent to the Element and Declaration
+	classes that use it, but NOT transparent to the Attribute
+	which has to implement a next() and previous() method. Which makes
+	it a bit problematic and prevents the use of STL.
+
+	This version is implemented with circular lists because:
+		- I like circular lists
+		- it demonstrates some independence from the (typical) doubly linked list.
+*/
+class TiXmlAttributeSet
+{
+public:
+	TiXmlAttributeSet();
+	~TiXmlAttributeSet();
+
+	void Add( TiXmlAttribute* attribute );
+	void Remove( TiXmlAttribute* attribute );
+
+	const TiXmlAttribute* First()	const	{ return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
+	TiXmlAttribute* First()					{ return ( sentinel.next == &sentinel ) ? 0 : sentinel.next; }
+	const TiXmlAttribute* Last() const		{ return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
+	TiXmlAttribute* Last()					{ return ( sentinel.prev == &sentinel ) ? 0 : sentinel.prev; }
+
+	const TiXmlAttribute*	Find( const char* _name ) const;
+	TiXmlAttribute*	Find( const char* _name ) {
+		return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) );
+	}
+	#ifdef TIXML_USE_STL
+	const TiXmlAttribute*	Find( const std::string& _name ) const;
+	TiXmlAttribute*	Find( const std::string& _name ) {
+		return const_cast< TiXmlAttribute* >( (const_cast< const TiXmlAttributeSet* >(this))->Find( _name ) );
+	}
+
+	#endif
+
+private:
+	//*ME:	Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),
+	//*ME:	this class must be also use a hidden/disabled copy-constructor !!!
+	TiXmlAttributeSet( const TiXmlAttributeSet& );	// not allowed
+	void operator=( const TiXmlAttributeSet& );	// not allowed (as TiXmlAttribute)
+
+	TiXmlAttribute sentinel;
+};
+
+
+/** The element is a container class. It has a value, the element name,
+	and can contain other elements, text, comments, and unknowns.
+	Elements also contain an arbitrary number of attributes.
+*/
+class TiXmlElement : public TiXmlNode
+{
+public:
+	/// Construct an element.
+	TiXmlElement (const char * in_value);
+
+	#ifdef TIXML_USE_STL
+	/// std::string constructor.
+	TiXmlElement( const std::string& _value );
+	#endif
+
+	TiXmlElement( const TiXmlElement& );
+
+	void operator=( const TiXmlElement& base );
+
+	virtual ~TiXmlElement();
+
+	/** Given an attribute name, Attribute() returns the value
+		for the attribute of that name, or null if none exists.
+	*/
+	const char* Attribute( const char* name ) const;
+
+	/** Given an attribute name, Attribute() returns the value
+		for the attribute of that name, or null if none exists.
+		If the attribute exists and can be converted to an integer,
+		the integer value will be put in the return 'i', if 'i'
+		is non-null.
+	*/
+	const char* Attribute( const char* name, int* i ) const;
+
+	/** Given an attribute name, Attribute() returns the value
+		for the attribute of that name, or null if none exists.
+		If the attribute exists and can be converted to an double,
+		the double value will be put in the return 'd', if 'd'
+		is non-null.
+	*/
+	const char* Attribute( const char* name, double* d ) const;
+
+	/** QueryIntAttribute examines the attribute - it is an alternative to the
+		Attribute() method with richer error checking.
+		If the attribute is an integer, it is stored in 'value' and
+		the call returns TIXML_SUCCESS. If it is not
+		an integer, it returns TIXML_WRONG_TYPE. If the attribute
+		does not exist, then TIXML_NO_ATTRIBUTE is returned.
+	*/
+	int QueryIntAttribute( const char* name, int* _value ) const;
+	/// QueryDoubleAttribute examines the attribute - see QueryIntAttribute().
+	int QueryDoubleAttribute( const char* name, double* _value ) const;
+	/// QueryFloatAttribute examines the attribute - see QueryIntAttribute().
+	int QueryFloatAttribute( const char* name, float* _value ) const {
+		double d;
+		int result = QueryDoubleAttribute( name, &d );
+		if ( result == TIXML_SUCCESS ) {
+			*_value = (float)d;
+		}
+		return result;
+	}
+
+    #ifdef TIXML_USE_STL
+	/** Template form of the attribute query which will try to read the
+		attribute into the specified type. Very easy, very powerful, but
+		be careful to make sure to call this with the correct type.
+
+		NOTE: This method doesn't work correctly for 'string' types.
+
+		@return TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE
+	*/
+	template< typename T > int QueryValueAttribute( const std::string& name, T* outValue ) const
+	{
+		const TiXmlAttribute* node = attributeSet.Find( name );
+		if ( !node )
+			return TIXML_NO_ATTRIBUTE;
+
+		std::stringstream sstream( node->ValueStr() );
+		sstream >> *outValue;
+		if ( !sstream.fail() )
+			return TIXML_SUCCESS;
+		return TIXML_WRONG_TYPE;
+	}
+	/*
+	 This is - in theory - a bug fix for "QueryValueAtribute returns truncated std::string"
+	 but template specialization is hard to get working cross-compiler. Leaving the bug for now.
+
+	// The above will fail for std::string because the space character is used as a seperator.
+	// Specialize for strings. Bug [ 1695429 ] QueryValueAtribute returns truncated std::string
+	template<> int QueryValueAttribute( const std::string& name, std::string* outValue ) const
+	{
+		const TiXmlAttribute* node = attributeSet.Find( name );
+		if ( !node )
+			return TIXML_NO_ATTRIBUTE;
+		*outValue = node->ValueStr();
+		return TIXML_SUCCESS;
+	}
+	*/
+	#endif
+
+	/** Sets an attribute of name to a given value. The attribute
+		will be created if it does not exist, or changed if it does.
+	*/
+	void SetAttribute( const char* name, const char * _value );
+
+    #ifdef TIXML_USE_STL
+	const std::string* Attribute( const std::string& name ) const;
+	const std::string* Attribute( const std::string& name, int* i ) const;
+	const std::string* Attribute( const std::string& name, double* d ) const;
+	int QueryIntAttribute( const std::string& name, int* _value ) const;
+	int QueryDoubleAttribute( const std::string& name, double* _value ) const;
+
+	/// STL std::string form.
+	void SetAttribute( const std::string& name, const std::string& _value );
+	///< STL std::string form.
+	void SetAttribute( const std::string& name, int _value );
+	#endif
+
+	/** Sets an attribute of name to a given value. The attribute
+		will be created if it does not exist, or changed if it does.
+	*/
+	void SetAttribute( const char * name, int value );
+
+	/** Sets an attribute of name to a given value. The attribute
+		will be created if it does not exist, or changed if it does.
+	*/
+	void SetDoubleAttribute( const char * name, double value );
+
+	/** Deletes an attribute with the given name.
+	*/
+	void RemoveAttribute( const char * name );
+    #ifdef TIXML_USE_STL
+	void RemoveAttribute( const std::string& name )	{	RemoveAttribute (name.c_str ());	}	///< STL std::string form.
+	#endif
+
+	const TiXmlAttribute* FirstAttribute() const	{ return attributeSet.First(); }		///< Access the first attribute in this element.
+	TiXmlAttribute* FirstAttribute() 				{ return attributeSet.First(); }
+	const TiXmlAttribute* LastAttribute()	const 	{ return attributeSet.Last(); }		///< Access the last attribute in this element.
+	TiXmlAttribute* LastAttribute()					{ return attributeSet.Last(); }
+
+	/** Convenience function for easy access to the text inside an element. Although easy
+		and concise, GetText() is limited compared to getting the TiXmlText child
+		and accessing it directly.
+
+		If the first child of 'this' is a TiXmlText, the GetText()
+		returns the character string of the Text node, else null is returned.
+
+		This is a convenient method for getting the text of simple contained text:
+		@verbatim
+		<foo>This is text</foo>
+		const char* str = fooElement->GetText();
+		@endverbatim
+
+		'str' will be a pointer to "This is text".
+
+		Note that this function can be misleading. If the element foo was created from
+		this XML:
+		@verbatim
+		<foo><b>This is text</b></foo>
+		@endverbatim
+
+		then the value of str would be null. The first child node isn't a text node, it is
+		another element. From this XML:
+		@verbatim
+		<foo>This is <b>text</b></foo>
+		@endverbatim
+		GetText() will return "This is ".
+
+		WARNING: GetText() accesses a child node - don't become confused with the
+				 similarly named TiXmlHandle::Text() and TiXmlNode::ToText() which are
+				 safe type casts on the referenced node.
+	*/
+	const char* GetText() const;
+
+	/// Creates a new Element and returns it - the returned element is a copy.
+	virtual TiXmlNode* Clone() const;
+	// Print the Element to a FILE stream.
+	virtual void Print( FILE* cfile, int depth ) const;
+
+	/*	Attribtue parsing starts: next char past '<'
+						 returns: next char past '>'
+	*/
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	virtual const TiXmlElement*     ToElement()     const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlElement*           ToElement()	          { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* visitor ) const;
+
+protected:
+
+	void CopyTo( TiXmlElement* target ) const;
+	void ClearThis();	// like clear, but initializes 'this' object as well
+
+	// Used to be public [internal use]
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+	/*	[internal use]
+		Reads the "value" of the element -- another element, or text.
+		This should terminate with the current end tag.
+	*/
+	const char* ReadValue( const char* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
+
+private:
+
+	TiXmlAttributeSet attributeSet;
+};
+
+
+/**	An XML comment.
+*/
+class TiXmlComment : public TiXmlNode
+{
+public:
+	/// Constructs an empty comment.
+	TiXmlComment() : TiXmlNode( TiXmlNode::COMMENT ) {}
+	/// Construct a comment from text.
+	TiXmlComment( const char* _value ) : TiXmlNode( TiXmlNode::COMMENT ) {
+		SetValue( _value );
+	}
+	TiXmlComment( const TiXmlComment& );
+	void operator=( const TiXmlComment& base );
+
+	virtual ~TiXmlComment()	{}
+
+	/// Returns a copy of this Comment.
+	virtual TiXmlNode* Clone() const;
+	// Write this Comment to a FILE stream.
+	virtual void Print( FILE* cfile, int depth ) const;
+
+	/*	Attribtue parsing starts: at the ! of the !--
+						 returns: next char past '>'
+	*/
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	virtual const TiXmlComment*  ToComment() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlComment*  ToComment() { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* visitor ) const;
+
+protected:
+	void CopyTo( TiXmlComment* target ) const;
+
+	// used to be public
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+//	virtual void StreamOut( TIXML_OSTREAM * out ) const;
+
+private:
+
+};
+
+
+/** XML text. A text node can have 2 ways to output the next. "normal" output
+	and CDATA. It will default to the mode it was parsed from the XML file and
+	you generally want to leave it alone, but you can change the output mode with
+	SetCDATA() and query it with CDATA().
+*/
+class TiXmlText : public TiXmlNode
+{
+	friend class TiXmlElement;
+public:
+	/** Constructor for text element. By default, it is treated as
+		normal, encoded text. If you want it be output as a CDATA text
+		element, set the parameter _cdata to 'true'
+	*/
+	TiXmlText (const char * initValue ) : TiXmlNode (TiXmlNode::TEXT)
+	{
+		SetValue( initValue );
+		cdata = false;
+	}
+	virtual ~TiXmlText() {}
+
+	#ifdef TIXML_USE_STL
+	/// Constructor.
+	TiXmlText( const std::string& initValue ) : TiXmlNode (TiXmlNode::TEXT)
+	{
+		SetValue( initValue );
+		cdata = false;
+	}
+	#endif
+
+	TiXmlText( const TiXmlText& copy ) : TiXmlNode( TiXmlNode::TEXT )	{ copy.CopyTo( this ); }
+	void operator=( const TiXmlText& base )							 	{ base.CopyTo( this ); }
+
+	// Write this text object to a FILE stream.
+	virtual void Print( FILE* cfile, int depth ) const;
+
+	/// Queries whether this represents text using a CDATA section.
+	bool CDATA() const				{ return cdata; }
+	/// Turns on or off a CDATA representation of text.
+	void SetCDATA( bool _cdata )	{ cdata = _cdata; }
+
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	virtual const TiXmlText* ToText() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlText*       ToText()       { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* content ) const;
+
+protected :
+	///  [internal use] Creates a new Element and returns it.
+	virtual TiXmlNode* Clone() const;
+	void CopyTo( TiXmlText* target ) const;
+
+	bool Blank() const;	// returns true if all white space and new lines
+	// [internal use]
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+
+private:
+	bool cdata;			// true if this should be input and output as a CDATA style text element
+};
+
+
+/** In correct XML the declaration is the first entry in the file.
+	@verbatim
+		<?xml version="1.0" standalone="yes"?>
+	@endverbatim
+
+	TinyXml will happily read or write files without a declaration,
+	however. There are 3 possible attributes to the declaration:
+	version, encoding, and standalone.
+
+	Note: In this version of the code, the attributes are
+	handled as special cases, not generic attributes, simply
+	because there can only be at most 3 and they are always the same.
+*/
+class TiXmlDeclaration : public TiXmlNode
+{
+public:
+	/// Construct an empty declaration.
+	TiXmlDeclaration()   : TiXmlNode( TiXmlNode::DECLARATION ) {}
+
+#ifdef TIXML_USE_STL
+	/// Constructor.
+	TiXmlDeclaration(	const std::string& _version,
+						const std::string& _encoding,
+						const std::string& _standalone );
+#endif
+
+	/// Construct.
+	TiXmlDeclaration(	const char* _version,
+						const char* _encoding,
+						const char* _standalone );
+
+	TiXmlDeclaration( const TiXmlDeclaration& copy );
+	void operator=( const TiXmlDeclaration& copy );
+
+	virtual ~TiXmlDeclaration()	{}
+
+	/// Version. Will return an empty string if none was found.
+	const char *Version() const			{ return version.c_str (); }
+	/// Encoding. Will return an empty string if none was found.
+	const char *Encoding() const		{ return encoding.c_str (); }
+	/// Is this a standalone document?
+	const char *Standalone() const		{ return standalone.c_str (); }
+
+	/// Creates a copy of this Declaration and returns it.
+	virtual TiXmlNode* Clone() const;
+	// Print this declaration to a FILE stream.
+	virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
+	virtual void Print( FILE* cfile, int depth ) const {
+		Print( cfile, depth, 0 );
+	}
+
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	virtual const TiXmlDeclaration* ToDeclaration() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlDeclaration*       ToDeclaration()       { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* visitor ) const;
+
+protected:
+	void CopyTo( TiXmlDeclaration* target ) const;
+	// used to be public
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+
+private:
+
+	TIXML_STRING version;
+	TIXML_STRING encoding;
+	TIXML_STRING standalone;
+};
+
+/** A stylesheet reference looks like this:
+	@verbatim
+		<?xml-stylesheet type="text/xsl" href="style.xsl"?>
+	@endverbatim
+
+	Note: In this version of the code, the attributes are
+	handled as special cases, not generic attributes, simply
+	because there can only be at most 2 and they are always the same.
+*/
+class TiXmlStylesheetReference : public TiXmlNode
+{
+public:
+	/// Construct an empty declaration.
+	TiXmlStylesheetReference()   : TiXmlNode( TiXmlNode::STYLESHEETREFERENCE ) {}
+
+#ifdef TIXML_USE_STL
+	/// Constructor.
+	TiXmlStylesheetReference(	const std::string& _type,
+								const std::string& _href );
+#endif
+
+	/// Construct.
+	TiXmlStylesheetReference(	const char* _type,
+								const char* _href );
+
+	TiXmlStylesheetReference( const TiXmlStylesheetReference& copy );
+	void operator=( const TiXmlStylesheetReference& copy );
+
+	virtual ~TiXmlStylesheetReference()	{}
+
+	/// Type. Will return an empty string if none was found.
+	const char *Type() const { return type.c_str (); }
+	/// Href. Will return an empty string if none was found.
+	const char *Href() const		{ return href.c_str (); }
+
+	/// Creates a copy of this StylesheetReference and returns it.
+	virtual TiXmlNode* Clone() const;
+	// Print this declaration to a FILE stream.
+	virtual void Print( FILE* cfile, int depth, TIXML_STRING* str ) const;
+	virtual void Print( FILE* cfile, int depth ) const {
+		Print( cfile, depth, 0 );
+	}
+
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	virtual const TiXmlStylesheetReference* ToStylesheetReference() const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlStylesheetReference*       ToStylesheetReference()       { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* visitor ) const;
+
+protected:
+	void CopyTo( TiXmlStylesheetReference* target ) const;
+	// used to be public
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+
+private:
+
+	TIXML_STRING type;
+	TIXML_STRING href;
+};
+
+/** Any tag that tinyXml doesn't recognize is saved as an
+	unknown. It is a tag of text, but should not be modified.
+	It will be written back to the XML, unchanged, when the file
+	is saved.
+
+	DTD tags get thrown into TiXmlUnknowns.
+*/
+class TiXmlUnknown : public TiXmlNode
+{
+public:
+	TiXmlUnknown() : TiXmlNode( TiXmlNode::UNKNOWN )	{}
+	virtual ~TiXmlUnknown() {}
+
+	TiXmlUnknown( const TiXmlUnknown& copy ) : TiXmlNode( TiXmlNode::UNKNOWN )		{ copy.CopyTo( this ); }
+	void operator=( const TiXmlUnknown& copy )										{ copy.CopyTo( this ); }
+
+	/// Creates a copy of this Unknown and returns it.
+	virtual TiXmlNode* Clone() const;
+	// Print this Unknown to a FILE stream.
+	virtual void Print( FILE* cfile, int depth ) const;
+
+	virtual const char* Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+
+	virtual const TiXmlUnknown*     ToUnknown()     const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlUnknown*           ToUnknown()	    { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* content ) const;
+
+protected:
+	void CopyTo( TiXmlUnknown* target ) const;
+
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+
+private:
+
+};
+
+
+/** Always the top level node. A document binds together all the
+	XML pieces. It can be saved, loaded, and printed to the screen.
+	The 'value' of a document node is the xml file name.
+*/
+class TiXmlDocument : public TiXmlNode
+{
+public:
+	/// Create an empty document, that has no name.
+	TiXmlDocument();
+	/// Create a document with a name. The name of the document is also the filename of the xml.
+	TiXmlDocument( const char * documentName );
+
+	#ifdef TIXML_USE_STL
+	/// Constructor.
+	TiXmlDocument( const std::string& documentName );
+	#endif
+
+	TiXmlDocument( const TiXmlDocument& copy );
+	void operator=( const TiXmlDocument& copy );
+
+	virtual ~TiXmlDocument() {}
+
+	/** Load a file using the current document value.
+		Returns true if successful. Will delete any existing
+		document data before loading.
+	*/
+	bool LoadFile( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+	/// Save a file using the current document value. Returns true if successful.
+	bool SaveFile() const;
+	/// Load a file using the given filename. Returns true if successful.
+	bool LoadFile( const char * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+	/// Save a file using the given filename. Returns true if successful.
+	bool SaveFile( const char * filename ) const;
+	/** Load a file using the given FILE*. Returns true if successful. Note that this method
+		doesn't stream - the entire object pointed at by the FILE*
+		will be interpreted as an XML file. TinyXML doesn't stream in XML from the current
+		file location. Streaming may be added in the future.
+	*/
+	bool LoadFile( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+	/// Save a file using the given FILE*. Returns true if successful.
+	bool SaveFile( FILE* ) const;
+
+	#ifdef TIXML_USE_STL
+	bool LoadFile( const std::string& filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )			///< STL std::string version.
+	{
+//		StringToBuffer f( filename );
+//		return ( f.buffer && LoadFile( f.buffer, encoding ));
+		return LoadFile( filename.c_str(), encoding );
+	}
+	bool SaveFile( const std::string& filename ) const		///< STL std::string version.
+	{
+//		StringToBuffer f( filename );
+//		return ( f.buffer && SaveFile( f.buffer ));
+		return SaveFile( filename.c_str() );
+	}
+	#endif
+
+	/** Parse the given null terminated block of xml data. Passing in an encoding to this
+		method (either TIXML_ENCODING_LEGACY or TIXML_ENCODING_UTF8 will force TinyXml
+		to use that encoding, regardless of what TinyXml might otherwise try to detect.
+	*/
+	virtual const char* Parse( const char* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+
+	/** Get the root element -- the only top level element -- of the document.
+		In well formed XML, there should only be one. TinyXml is tolerant of
+		multiple elements at the document level.
+	*/
+	const TiXmlElement* RootElement() const		{ return FirstChildElement(); }
+	TiXmlElement* RootElement()					{ return FirstChildElement(); }
+
+	/** If an error occurs, Error will be set to true. Also,
+		- The ErrorId() will contain the integer identifier of the error (not generally useful)
+		- The ErrorDesc() method will return the name of the error. (very useful)
+		- The ErrorRow() and ErrorCol() will return the location of the error (if known)
+	*/
+	bool Error() const						{ return error; }
+
+	/// Contains a textual (english) description of the error if one occurs.
+	const char * ErrorDesc() const	{ return errorDesc.c_str (); }
+
+	/** Generally, you probably want the error string ( ErrorDesc() ). But if you
+		prefer the ErrorId, this function will fetch it.
+	*/
+	int ErrorId()	const				{ return errorId; }
+
+	/** Returns the location (if known) of the error. The first column is column 1,
+		and the first row is row 1. A value of 0 means the row and column wasn't applicable
+		(memory errors, for example, have no row/column) or the parser lost the error. (An
+		error in the error reporting, in that case.)
+
+		@sa SetTabSize, Row, Column
+	*/
+	int ErrorRow() const	{ return errorLocation.row+1; }
+	int ErrorCol() const	{ return errorLocation.col+1; }	///< The column where the error occured. See ErrorRow()
+
+	/** SetTabSize() allows the error reporting functions (ErrorRow() and ErrorCol())
+		to report the correct values for row and column. It does not change the output
+		or input in any way.
+
+		By calling this method, with a tab size
+		greater than 0, the row and column of each node and attribute is stored
+		when the file is loaded. Very useful for tracking the DOM back in to
+		the source file.
+
+		The tab size is required for calculating the location of nodes. If not
+		set, the default of 4 is used. The tabsize is set per document. Setting
+		the tabsize to 0 disables row/column tracking.
+
+		Note that row and column tracking is not supported when using operator>>.
+
+		The tab size needs to be enabled before the parse or load. Correct usage:
+		@verbatim
+		TiXmlDocument doc;
+		doc.SetTabSize( 8 );
+		doc.Load( "myfile.xml" );
+		@endverbatim
+
+		@sa Row, Column
+	*/
+	void SetTabSize( int _tabsize )		{ tabsize = _tabsize; }
+
+	int TabSize() const	{ return tabsize; }
+
+	/** If you have handled the error, it can be reset with this call. The error
+		state is automatically cleared if you Parse a new XML block.
+	*/
+	void ClearError()						{	error = false;
+												errorId = 0;
+												errorDesc = "";
+												errorLocation.row = errorLocation.col = 0;
+												//errorLocation.last = 0;
+											}
+
+	/** Write the document to standard out using formatted printing ("pretty print"). */
+	void Print() const						{ Print( stdout, 0 ); }
+
+	/* Write the document to a string using formatted printing ("pretty print"). This
+		will allocate a character array (new char[]) and return it as a pointer. The
+		calling code pust call delete[] on the return char* to avoid a memory leak.
+	*/
+	//char* PrintToMemory() const;
+
+	/// Print this Document to a FILE stream.
+	virtual void Print( FILE* cfile, int depth = 0 ) const;
+	// [internal use]
+	void SetError( int err, const char* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
+
+	virtual const TiXmlDocument*    ToDocument()    const { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+	virtual TiXmlDocument*          ToDocument()          { return this; } ///< Cast to a more defined type. Will return null not of the requested type.
+
+	/** Walk the XML tree visiting this node and all of its children.
+	*/
+	virtual bool Accept( TiXmlVisitor* content ) const;
+
+protected :
+	// [internal use]
+	virtual TiXmlNode* Clone() const;
+	#ifdef TIXML_USE_STL
+	virtual void StreamIn( std::istream * in, TIXML_STRING * tag );
+	#endif
+
+private:
+	void CopyTo( TiXmlDocument* target ) const;
+
+	bool error;
+	int  errorId;
+	TIXML_STRING errorDesc;
+	int tabsize;
+	TiXmlCursor errorLocation;
+	bool useMicrosoftBOM;		// the UTF-8 BOM were found when read. Note this, and try to write.
+};
+
+
+/**
+	A TiXmlHandle is a class that wraps a node pointer with null checks; this is
+	an incredibly useful thing. Note that TiXmlHandle is not part of the TinyXml
+	DOM structure. It is a separate utility class.
+
+	Take an example:
+	@verbatim
+	<Document>
+		<Element attributeA = "valueA">
+			<Child attributeB = "value1" />
+			<Child attributeB = "value2" />
+		</Element>
+	<Document>
+	@endverbatim
+
+	Assuming you want the value of "attributeB" in the 2nd "Child" element, it's very
+	easy to write a *lot* of code that looks like:
+
+	@verbatim
+	TiXmlElement* root = document.FirstChildElement( "Document" );
+	if ( root )
+	{
+		TiXmlElement* element = root->FirstChildElement( "Element" );
+		if ( element )
+		{
+			TiXmlElement* child = element->FirstChildElement( "Child" );
+			if ( child )
+			{
+				TiXmlElement* child2 = child->NextSiblingElement( "Child" );
+				if ( child2 )
+				{
+					// Finally do something useful.
+	@endverbatim
+
+	And that doesn't even cover "else" cases. TiXmlHandle addresses the verbosity
+	of such code. A TiXmlHandle checks for null	pointers so it is perfectly safe
+	and correct to use:
+
+	@verbatim
+	TiXmlHandle docHandle( &document );
+	TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement();
+	if ( child2 )
+	{
+		// do something useful
+	@endverbatim
+
+	Which is MUCH more concise and useful.
+
+	It is also safe to copy handles - internally they are nothing more than node pointers.
+	@verbatim
+	TiXmlHandle handleCopy = handle;
+	@endverbatim
+
+	What they should not be used for is iteration:
+
+	@verbatim
+	int i=0;
+	while ( true )
+	{
+		TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement();
+		if ( !child )
+			break;
+		// do something
+		++i;
+	}
+	@endverbatim
+
+	It seems reasonable, but it is in fact two embedded while loops. The Child method is
+	a linear walk to find the element, so this code would iterate much more than it needs
+	to. Instead, prefer:
+
+	@verbatim
+	TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement();
+
+	for( child; child; child=child->NextSiblingElement() )
+	{
+		// do something
+	}
+	@endverbatim
+*/
+class TiXmlHandle
+{
+public:
+	/// Create a handle from any node (at any depth of the tree.) This can be a null pointer.
+	TiXmlHandle( TiXmlNode* _node )					{ this->node = _node; }
+	/// Copy constructor
+	TiXmlHandle( const TiXmlHandle& ref )			{ this->node = ref.node; }
+	TiXmlHandle operator=( const TiXmlHandle& ref ) { this->node = ref.node; return *this; }
+
+	/// Return a handle to the first child node.
+	TiXmlHandle FirstChild() const;
+	/// Return a handle to the first child node with the given name.
+	TiXmlHandle FirstChild( const char * value ) const;
+	/// Return a handle to the first child element.
+	TiXmlHandle FirstChildElement() const;
+	/// Return a handle to the first child element with the given name.
+	TiXmlHandle FirstChildElement( const char * value ) const;
+
+	/** Return a handle to the "index" child with the given name.
+		The first child is 0, the second 1, etc.
+	*/
+	TiXmlHandle Child( const char* value, int index ) const;
+	/** Return a handle to the "index" child.
+		The first child is 0, the second 1, etc.
+	*/
+	TiXmlHandle Child( int index ) const;
+	/** Return a handle to the "index" child element with the given name.
+		The first child element is 0, the second 1, etc. Note that only TiXmlElements
+		are indexed: other types are not counted.
+	*/
+	TiXmlHandle ChildElement( const char* value, int index ) const;
+	/** Return a handle to the "index" child element.
+		The first child element is 0, the second 1, etc. Note that only TiXmlElements
+		are indexed: other types are not counted.
+	*/
+	TiXmlHandle ChildElement( int index ) const;
+
+	#ifdef TIXML_USE_STL
+	TiXmlHandle FirstChild( const std::string& _value ) const				{ return FirstChild( _value.c_str() ); }
+	TiXmlHandle FirstChildElement( const std::string& _value ) const		{ return FirstChildElement( _value.c_str() ); }
+
+	TiXmlHandle Child( const std::string& _value, int index ) const			{ return Child( _value.c_str(), index ); }
+	TiXmlHandle ChildElement( const std::string& _value, int index ) const	{ return ChildElement( _value.c_str(), index ); }
+	#endif
+
+	/** Return the handle as a TiXmlNode. This may return null.
+	*/
+	TiXmlNode* ToNode() const			{ return node; }
+	/** Return the handle as a TiXmlElement. This may return null.
+	*/
+	TiXmlElement* ToElement() const		{ return ( ( node && node->ToElement() ) ? node->ToElement() : 0 ); }
+	/**	Return the handle as a TiXmlText. This may return null.
+	*/
+	TiXmlText* ToText() const			{ return ( ( node && node->ToText() ) ? node->ToText() : 0 ); }
+	/** Return the handle as a TiXmlUnknown. This may return null.
+	*/
+	TiXmlUnknown* ToUnknown() const		{ return ( ( node && node->ToUnknown() ) ? node->ToUnknown() : 0 ); }
+
+	/** @deprecated use ToNode.
+		Return the handle as a TiXmlNode. This may return null.
+	*/
+	TiXmlNode* Node() const			{ return ToNode(); }
+	/** @deprecated use ToElement.
+		Return the handle as a TiXmlElement. This may return null.
+	*/
+	TiXmlElement* Element() const	{ return ToElement(); }
+	/**	@deprecated use ToText()
+		Return the handle as a TiXmlText. This may return null.
+	*/
+	TiXmlText* Text() const			{ return ToText(); }
+	/** @deprecated use ToUnknown()
+		Return the handle as a TiXmlUnknown. This may return null.
+	*/
+	TiXmlUnknown* Unknown() const	{ return ToUnknown(); }
+
+private:
+	TiXmlNode* node;
+};
+
+
+/** Print to memory functionality. The TiXmlPrinter is useful when you need to:
+
+	-# Print to memory (especially in non-STL mode)
+	-# Control formatting (line endings, etc.)
+
+	When constructed, the TiXmlPrinter is in its default "pretty printing" mode.
+	Before calling Accept() you can call methods to control the printing
+	of the XML document. After TiXmlNode::Accept() is called, the printed document can
+	be accessed via the CStr(), Str(), and Size() methods.
+
+	TiXmlPrinter uses the Visitor API.
+	@verbatim
+	TiXmlPrinter printer;
+	printer.SetIndent( "\t" );
+
+	doc.Accept( &printer );
+	fprintf( stdout, "%s", printer.CStr() );
+	@endverbatim
+*/
+class TiXmlPrinter : public TiXmlVisitor
+{
+public:
+	TiXmlPrinter() : depth( 0 ), simpleTextPrint( false ),
+					 buffer(), indent( "    " ), lineBreak( "\n" ) {}
+
+	virtual bool VisitEnter( const TiXmlDocument& doc );
+	virtual bool VisitExit( const TiXmlDocument& doc );
+
+	virtual bool VisitEnter( const TiXmlElement& element, const TiXmlAttribute* firstAttribute );
+	virtual bool VisitExit( const TiXmlElement& element );
+
+	virtual bool Visit( const TiXmlDeclaration& declaration );
+	virtual bool Visit( const TiXmlText& text );
+	virtual bool Visit( const TiXmlComment& comment );
+	virtual bool Visit( const TiXmlUnknown& unknown );
+
+	/** Set the indent characters for printing. By default 4 spaces
+		but tab (\t) is also useful, or null/empty string for no indentation.
+	*/
+	void SetIndent( const char* _indent )			{ indent = _indent ? _indent : "" ; }
+	/// Query the indention string.
+	const char* Indent()							{ return indent.c_str(); }
+	/** Set the line breaking string. By default set to newline (\n).
+		Some operating systems prefer other characters, or can be
+		set to the null/empty string for no indenation.
+	*/
+	void SetLineBreak( const char* _lineBreak )		{ lineBreak = _lineBreak ? _lineBreak : ""; }
+	/// Query the current line breaking string.
+	const char* LineBreak()							{ return lineBreak.c_str(); }
+
+	/** Switch over to "stream printing" which is the most dense formatting without
+		linebreaks. Common when the XML is needed for network transmission.
+	*/
+	void SetStreamPrinting()						{ indent = "";
+													  lineBreak = "";
+													}
+	/// Return the result.
+	const char* CStr()								{ return buffer.c_str(); }
+	/// Return the length of the result string.
+	size_t Size()									{ return buffer.size(); }
+
+	#ifdef TIXML_USE_STL
+	/// Return the result.
+	const std::string& Str()						{ return buffer; }
+	#endif
+
+private:
+	void DoIndent()	{
+		for( int i=0; i<depth; ++i )
+			buffer += indent;
+	}
+	void DoLineBreak() {
+		buffer += lineBreak;
+	}
+
+	int depth;
+	bool simpleTextPrint;
+	TIXML_STRING buffer;
+	TIXML_STRING indent;
+	TIXML_STRING lineBreak;
+};
+
+
+#ifdef _MSC_VER
+#pragma warning( pop )
+#endif
+
+#endif
+
Index: /code/branches/network/src/util/tinyxml/tinyxmlerror.cc
===================================================================
--- /code/branches/network/src/util/tinyxml/tinyxmlerror.cc	(revision 861)
+++ /code/branches/network/src/util/tinyxml/tinyxmlerror.cc	(revision 861)
@@ -0,0 +1,53 @@
+/*
+www.sourceforge.net/projects/tinyxml
+Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)
+
+This software is provided 'as-is', without any express or implied 
+warranty. In no event will the authors be held liable for any 
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any 
+purpose, including commercial applications, and to alter it and 
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+*/
+
+#include "tinyxml.h"
+
+// The goal of the seperate error file is to make the first
+// step towards localization. tinyxml (currently) only supports
+// english error messages, but the could now be translated.
+//
+// It also cleans up the code a bit.
+//
+
+const char* TiXmlBase::errorString[ TIXML_ERROR_STRING_COUNT ] =
+{
+	"No error",
+	"Error",
+	"Failed to open file",
+	"Memory allocation failed.",
+	"Error parsing Element.",
+	"Failed to read Element name",
+	"Error reading Element value.",
+	"Error reading Attributes.",
+	"Error: empty tag.",
+	"Error reading end tag.",
+	"Error parsing Unknown.",
+	"Error parsing Comment.",
+	"Error parsing Declaration.",
+	"Error document empty.",
+	"Error null (0) or unexpected EOF found in input stream.",
+	"Error parsing CDATA.",
+	"Error when TiXmlDocument added to document, because TiXmlDocument can only be at the root.",
+};
Index: /code/branches/network/src/util/tinyxml/tinyxmlparser.cc
===================================================================
--- /code/branches/network/src/util/tinyxml/tinyxmlparser.cc	(revision 861)
+++ /code/branches/network/src/util/tinyxml/tinyxmlparser.cc	(revision 861)
@@ -0,0 +1,1722 @@
+/*
+www.sourceforge.net/projects/tinyxml
+Original code (2.0 and earlier )copyright (c) 2000-2002 Lee Thomason (www.grinninglizard.com)
+
+This software is provided 'as-is', without any express or implied
+warranty. In no event will the authors be held liable for any
+damages arising from the use of this software.
+
+Permission is granted to anyone to use this software for any
+purpose, including commercial applications, and to alter it and
+redistribute it freely, subject to the following restrictions:
+
+1. The origin of this software must not be misrepresented; you must
+not claim that you wrote the original software. If you use this
+software in a product, an acknowledgment in the product documentation
+would be appreciated but is not required.
+
+2. Altered source versions must be plainly marked as such, and
+must not be misrepresented as being the original software.
+
+3. This notice may not be removed or altered from any source
+distribution.
+*/
+
+#include <ctype.h>
+#include <stddef.h>
+
+#include "tinyxml.h"
+
+//#define DEBUG_PARSER
+#if defined( DEBUG_PARSER )
+#	if defined( DEBUG ) && defined( _MSC_VER )
+#		include <windows.h>
+#		define TIXML_LOG OutputDebugString
+#	else
+#		define TIXML_LOG printf
+#	endif
+#endif
+
+// Note tha "PutString" hardcodes the same list. This
+// is less flexible than it appears. Changing the entries
+// or order will break putstring.
+TiXmlBase::Entity TiXmlBase::entity[ NUM_ENTITY ] =
+{
+	{ "&amp;",  5, '&' },
+	{ "&lt;",   4, '<' },
+	{ "&gt;",   4, '>' },
+	{ "&quot;", 6, '\"' },
+	{ "&apos;", 6, '\'' }
+};
+
+// Bunch of unicode info at:
+//		http://www.unicode.org/faq/utf_bom.html
+// Including the basic of this table, which determines the #bytes in the
+// sequence from the lead byte. 1 placed for invalid sequences --
+// although the result will be junk, pass it through as much as possible.
+// Beware of the non-characters in UTF-8:
+//				ef bb bf (Microsoft "lead bytes")
+//				ef bf be
+//				ef bf bf
+
+const unsigned char TIXML_UTF_LEAD_0 = 0xefU;
+const unsigned char TIXML_UTF_LEAD_1 = 0xbbU;
+const unsigned char TIXML_UTF_LEAD_2 = 0xbfU;
+
+const int TiXmlBase::utf8ByteTable[256] =
+{
+	//	0	1	2	3	4	5	6	7	8	9	a	b	c	d	e	f
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x00
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x10
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x20
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x30
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x40
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x50
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x60
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x70	End of ASCII range
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x80 0x80 to 0xc1 invalid
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0x90
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0xa0
+		1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	// 0xb0
+		1,	1,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	// 0xc0 0xc2 to 0xdf 2 byte
+		2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	2,	// 0xd0
+		3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	3,	// 0xe0 0xe0 to 0xef 3 byte
+		4,	4,	4,	4,	4,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1,	1	// 0xf0 0xf0 to 0xf4 4 byte, 0xf5 and higher invalid
+};
+
+
+void TiXmlBase::ConvertUTF32ToUTF8( unsigned long input, char* output, int* length )
+{
+	const unsigned long BYTE_MASK = 0xBF;
+	const unsigned long BYTE_MARK = 0x80;
+	const unsigned long FIRST_BYTE_MARK[7] = { 0x00, 0x00, 0xC0, 0xE0, 0xF0, 0xF8, 0xFC };
+
+	if (input < 0x80)
+		*length = 1;
+	else if ( input < 0x800 )
+		*length = 2;
+	else if ( input < 0x10000 )
+		*length = 3;
+	else if ( input < 0x200000 )
+		*length = 4;
+	else
+		{ *length = 0; return; }	// This code won't covert this correctly anyway.
+
+	output += *length;
+
+	// Scary scary fall throughs.
+	switch (*length)
+	{
+		case 4:
+			--output;
+			*output = (char)((input | BYTE_MARK) & BYTE_MASK);
+			input >>= 6;
+		case 3:
+			--output;
+			*output = (char)((input | BYTE_MARK) & BYTE_MASK);
+			input >>= 6;
+		case 2:
+			--output;
+			*output = (char)((input | BYTE_MARK) & BYTE_MASK);
+			input >>= 6;
+		case 1:
+			--output;
+			*output = (char)(input | FIRST_BYTE_MARK[*length]);
+	}
+}
+
+
+/*static*/ int TiXmlBase::IsAlpha( unsigned char anyByte, TiXmlEncoding /*encoding*/ )
+{
+	// This will only work for low-ascii, everything else is assumed to be a valid
+	// letter. I'm not sure this is the best approach, but it is quite tricky trying
+	// to figure out alhabetical vs. not across encoding. So take a very
+	// conservative approach.
+
+//	if ( encoding == TIXML_ENCODING_UTF8 )
+//	{
+		if ( anyByte < 127 )
+			return isalpha( anyByte );
+		else
+			return 1;	// What else to do? The unicode set is huge...get the english ones right.
+//	}
+//	else
+//	{
+//		return isalpha( anyByte );
+//	}
+}
+
+
+/*static*/ int TiXmlBase::IsAlphaNum( unsigned char anyByte, TiXmlEncoding /*encoding*/ )
+{
+	// This will only work for low-ascii, everything else is assumed to be a valid
+	// letter. I'm not sure this is the best approach, but it is quite tricky trying
+	// to figure out alhabetical vs. not across encoding. So take a very
+	// conservative approach.
+
+//	if ( encoding == TIXML_ENCODING_UTF8 )
+//	{
+		if ( anyByte < 127 )
+			return isalnum( anyByte );
+		else
+			return 1;	// What else to do? The unicode set is huge...get the english ones right.
+//	}
+//	else
+//	{
+//		return isalnum( anyByte );
+//	}
+}
+
+
+class TiXmlParsingData
+{
+	friend class TiXmlDocument;
+  public:
+	void Stamp( const char* now, TiXmlEncoding encoding );
+
+	const TiXmlCursor& Cursor()	{ return cursor; }
+
+  private:
+	// Only used by the document!
+	TiXmlParsingData( const char* start, int _tabsize, int row, int col )
+	{
+		assert( start );
+		stamp = start;
+		tabsize = _tabsize;
+		cursor.row = row;
+		cursor.col = col;
+	}
+
+	TiXmlCursor		cursor;
+	const char*		stamp;
+	int				tabsize;
+};
+
+
+void TiXmlParsingData::Stamp( const char* now, TiXmlEncoding encoding )
+{
+	assert( now );
+
+	// Do nothing if the tabsize is 0.
+	if ( tabsize < 1 )
+	{
+		return;
+	}
+
+	// Get the current row, column.
+	int row = cursor.row;
+	int col = cursor.col;
+	const char* p = stamp;
+	assert( p );
+
+	while ( p < now )
+	{
+		// Treat p as unsigned, so we have a happy compiler.
+		const unsigned char* pU = (const unsigned char*)p;
+
+		// Code contributed by Fletcher Dunn: (modified by lee)
+		switch (*pU) {
+			case 0:
+				// We *should* never get here, but in case we do, don't
+				// advance past the terminating null character, ever
+				return;
+
+			case '\r':
+				// bump down to the next line
+				++row;
+				col = 0;
+				// Eat the character
+				++p;
+
+				// Check for \r\n sequence, and treat this as a single character
+				if (*p == '\n') {
+					++p;
+				}
+				break;
+
+			case '\n':
+				// bump down to the next line
+				++row;
+				col = 0;
+
+				// Eat the character
+				++p;
+
+				// Check for \n\r sequence, and treat this as a single
+				// character.  (Yes, this bizarre thing does occur still
+				// on some arcane platforms...)
+				if (*p == '\r') {
+					++p;
+				}
+				break;
+
+			case '\t':
+				// Eat the character
+				++p;
+
+				// Skip to next tab stop
+				col = (col / tabsize + 1) * tabsize;
+				break;
+
+			case TIXML_UTF_LEAD_0:
+				if ( encoding == TIXML_ENCODING_UTF8 )
+				{
+					if ( *(p+1) && *(p+2) )
+					{
+						// In these cases, don't advance the column. These are
+						// 0-width spaces.
+						if ( *(pU+1)==TIXML_UTF_LEAD_1 && *(pU+2)==TIXML_UTF_LEAD_2 )
+							p += 3;
+						else if ( *(pU+1)==0xbfU && *(pU+2)==0xbeU )
+							p += 3;
+						else if ( *(pU+1)==0xbfU && *(pU+2)==0xbfU )
+							p += 3;
+						else
+							{ p +=3; ++col; }	// A normal character.
+					}
+				}
+				else
+				{
+					++p;
+					++col;
+				}
+				break;
+
+			default:
+				if ( encoding == TIXML_ENCODING_UTF8 )
+				{
+					// Eat the 1 to 4 byte utf8 character.
+					int step = TiXmlBase::utf8ByteTable[*((const unsigned char*)p)];
+					if ( step == 0 )
+						step = 1;		// Error case from bad encoding, but handle gracefully.
+					p += step;
+
+					// Just advance one column, of course.
+					++col;
+				}
+				else
+				{
+					++p;
+					++col;
+				}
+				break;
+		}
+	}
+	cursor.row = row;
+	cursor.col = col;
+	assert( cursor.row >= -1 );
+	assert( cursor.col >= -1 );
+	stamp = p;
+	assert( stamp );
+}
+
+
+const char* TiXmlBase::SkipWhiteSpace( const char* p, TiXmlEncoding encoding )
+{
+	if ( !p || !*p )
+	{
+		return 0;
+	}
+	if ( encoding == TIXML_ENCODING_UTF8 )
+	{
+		while ( *p )
+		{
+			const unsigned char* pU = (const unsigned char*)p;
+
+			// Skip the stupid Microsoft UTF-8 Byte order marks
+			if (	*(pU+0)==TIXML_UTF_LEAD_0
+				 && *(pU+1)==TIXML_UTF_LEAD_1
+				 && *(pU+2)==TIXML_UTF_LEAD_2 )
+			{
+				p += 3;
+				continue;
+			}
+			else if(*(pU+0)==TIXML_UTF_LEAD_0
+				 && *(pU+1)==0xbfU
+				 && *(pU+2)==0xbeU )
+			{
+				p += 3;
+				continue;
+			}
+			else if(*(pU+0)==TIXML_UTF_LEAD_0
+				 && *(pU+1)==0xbfU
+				 && *(pU+2)==0xbfU )
+			{
+				p += 3;
+				continue;
+			}
+
+			if ( IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )		// Still using old rules for white space.
+				++p;
+			else
+				break;
+		}
+	}
+	else
+	{
+		while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )
+			++p;
+	}
+
+	return p;
+}
+
+#ifdef TIXML_USE_STL
+/*static*/ bool TiXmlBase::StreamWhiteSpace( std::istream * in, TIXML_STRING * tag )
+{
+	for( ;; )
+	{
+		if ( !in->good() ) return false;
+
+		int c = in->peek();
+		// At this scope, we can't get to a document. So fail silently.
+		if ( !IsWhiteSpace( c ) || c <= 0 )
+			return true;
+
+		*tag += (char) in->get();
+	}
+}
+
+/*static*/ bool TiXmlBase::StreamTo( std::istream * in, int character, TIXML_STRING * tag )
+{
+	//assert( character > 0 && character < 128 );	// else it won't work in utf-8
+	while ( in->good() )
+	{
+		int c = in->peek();
+		if ( c == character )
+			return true;
+		if ( c <= 0 )		// Silent failure: can't get document at this scope
+			return false;
+
+		in->get();
+		*tag += (char) c;
+	}
+	return false;
+}
+#endif
+
+// One of TinyXML's more performance demanding functions. Try to keep the memory overhead down. The
+// "assign" optimization removes over 10% of the execution time.
+//
+const char* TiXmlBase::ReadName( const char* p, TIXML_STRING * name, TiXmlEncoding encoding )
+{
+	// Oddly, not supported on some comilers,
+	//name->clear();
+	// So use this:
+	*name = "";
+	assert( p );
+
+	// Names start with letters or underscores.
+	// Of course, in unicode, tinyxml has no idea what a letter *is*. The
+	// algorithm is generous.
+	//
+	// After that, they can be letters, underscores, numbers,
+	// hyphens, or colons. (Colons are valid ony for namespaces,
+	// but tinyxml can't tell namespaces from names.)
+	if (    p && *p
+		 && ( IsAlpha( (unsigned char) *p, encoding ) || *p == '_' ) )
+	{
+		const char* start = p;
+		while(		p && *p
+				&&	(		IsAlphaNum( (unsigned char ) *p, encoding )
+						 || *p == '_'
+						 || *p == '-'
+						 || *p == '.'
+						 || *p == ':' ) )
+		{
+			//(*name) += *p; // expensive
+			++p;
+		}
+		if ( p-start > 0 ) {
+			name->assign( start, p-start );
+		}
+		return p;
+	}
+	return 0;
+}
+
+const char* TiXmlBase::GetEntity( const char* p, char* value, int* length, TiXmlEncoding encoding )
+{
+	// Presume an entity, and pull it out.
+    TIXML_STRING ent;
+	int i;
+	*length = 0;
+
+	if ( *(p+1) && *(p+1) == '#' && *(p+2) )
+	{
+		unsigned long ucs = 0;
+		ptrdiff_t delta = 0;
+		unsigned mult = 1;
+
+		if ( *(p+2) == 'x' )
+		{
+			// Hexadecimal.
+			if ( !*(p+3) ) return 0;
+
+			const char* q = p+3;
+			q = strchr( q, ';' );
+
+			if ( !q || !*q ) return 0;
+
+			delta = q-p;
+			--q;
+
+			while ( *q != 'x' )
+			{
+				if ( *q >= '0' && *q <= '9' )
+					ucs += mult * (*q - '0');
+				else if ( *q >= 'a' && *q <= 'f' )
+					ucs += mult * (*q - 'a' + 10);
+				else if ( *q >= 'A' && *q <= 'F' )
+					ucs += mult * (*q - 'A' + 10 );
+				else
+					return 0;
+				mult *= 16;
+				--q;
+			}
+		}
+		else
+		{
+			// Decimal.
+			if ( !*(p+2) ) return 0;
+
+			const char* q = p+2;
+			q = strchr( q, ';' );
+
+			if ( !q || !*q ) return 0;
+
+			delta = q-p;
+			--q;
+
+			while ( *q != '#' )
+			{
+				if ( *q >= '0' && *q <= '9' )
+					ucs += mult * (*q - '0');
+				else
+					return 0;
+				mult *= 10;
+				--q;
+			}
+		}
+		if ( encoding == TIXML_ENCODING_UTF8 )
+		{
+			// convert the UCS to UTF-8
+			ConvertUTF32ToUTF8( ucs, value, length );
+		}
+		else
+		{
+			*value = (char)ucs;
+			*length = 1;
+		}
+		return p + delta + 1;
+	}
+
+	// Now try to match it.
+	for( i=0; i<NUM_ENTITY; ++i )
+	{
+		if ( strncmp( entity[i].str, p, entity[i].strLength ) == 0 )
+		{
+			assert( strlen( entity[i].str ) == entity[i].strLength );
+			*value = entity[i].chr;
+			*length = 1;
+			return ( p + entity[i].strLength );
+		}
+	}
+
+	// So it wasn't an entity, its unrecognized, or something like that.
+	*value = *p;	// Don't put back the last one, since we return it!
+	//*length = 1;	// Leave unrecognized entities - this doesn't really work.
+					// Just writes strange XML.
+	return p+1;
+}
+
+
+bool TiXmlBase::StringEqual( const char* p,
+							 const char* tag,
+							 bool ignoreCase,
+							 TiXmlEncoding encoding )
+{
+	assert( p );
+	assert( tag );
+	if ( !p || !*p )
+	{
+		assert( 0 );
+		return false;
+	}
+
+	const char* q = p;
+
+	if ( ignoreCase )
+	{
+		while ( *q && *tag && ToLower( *q, encoding ) == ToLower( *tag, encoding ) )
+		{
+			++q;
+			++tag;
+		}
+
+		if ( *tag == 0 )
+			return true;
+	}
+	else
+	{
+		while ( *q && *tag && *q == *tag )
+		{
+			++q;
+			++tag;
+		}
+
+		if ( *tag == 0 )		// Have we found the end of the tag, and everything equal?
+			return true;
+	}
+	return false;
+}
+
+const char* TiXmlBase::ReadText(	const char* p,
+									TIXML_STRING * text,
+									bool trimWhiteSpace,
+									const char* endTag,
+									bool caseInsensitive,
+									TiXmlEncoding encoding )
+{
+    *text = "";
+	if (    !trimWhiteSpace			// certain tags always keep whitespace
+		 || !condenseWhiteSpace )	// if true, whitespace is always kept
+	{
+		// Keep all the white space.
+		while (	   p && *p
+				&& !StringEqual( p, endTag, caseInsensitive, encoding )
+			  )
+		{
+			int len;
+			char cArr[4] = { 0, 0, 0, 0 };
+			p = GetChar( p, cArr, &len, encoding );
+			text->append( cArr, len );
+		}
+	}
+	else
+	{
+		bool whitespace = false;
+
+		// Remove leading white space:
+		p = SkipWhiteSpace( p, encoding );
+		while (	   p && *p
+				&& !StringEqual( p, endTag, caseInsensitive, encoding ) )
+		{
+			if ( *p == '\r' || *p == '\n' )
+			{
+				whitespace = true;
+				++p;
+			}
+			else if ( IsWhiteSpace( *p ) )
+			{
+				whitespace = true;
+				++p;
+			}
+			else
+			{
+				// If we've found whitespace, add it before the
+				// new character. Any whitespace just becomes a space.
+				if ( whitespace )
+				{
+					(*text) += ' ';
+					whitespace = false;
+				}
+				int len;
+				char cArr[4] = { 0, 0, 0, 0 };
+				p = GetChar( p, cArr, &len, encoding );
+				if ( len == 1 )
+					(*text) += cArr[0];	// more efficient
+				else
+					text->append( cArr, len );
+			}
+		}
+	}
+	if ( p )
+		p += strlen( endTag );
+	return p;
+}
+
+#ifdef TIXML_USE_STL
+
+void TiXmlDocument::StreamIn( std::istream * in, TIXML_STRING * tag )
+{
+	// The basic issue with a document is that we don't know what we're
+	// streaming. Read something presumed to be a tag (and hope), then
+	// identify it, and call the appropriate stream method on the tag.
+	//
+	// This "pre-streaming" will never read the closing ">" so the
+	// sub-tag can orient itself.
+
+	if ( !StreamTo( in, '<', tag ) )
+	{
+		SetError( TIXML_ERROR_PARSING_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return;
+	}
+
+	while ( in->good() )
+	{
+		int tagIndex = (int) tag->length();
+		while ( in->good() && in->peek() != '>' )
+		{
+			int c = in->get();
+			if ( c <= 0 )
+			{
+				SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+				break;
+			}
+			(*tag) += (char) c;
+		}
+
+		if ( in->good() )
+		{
+			// We now have something we presume to be a node of
+			// some sort. Identify it, and call the node to
+			// continue streaming.
+			TiXmlNode* node = Identify( tag->c_str() + tagIndex, TIXML_DEFAULT_ENCODING );
+
+			if ( node )
+			{
+				node->StreamIn( in, tag );
+				bool isElement = node->ToElement() != 0;
+				delete node;
+				node = 0;
+
+				// If this is the root element, we're done. Parsing will be
+				// done by the >> operator.
+				if ( isElement )
+				{
+					return;
+				}
+			}
+			else
+			{
+				SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );
+				return;
+			}
+		}
+	}
+	// We should have returned sooner.
+	SetError( TIXML_ERROR, 0, 0, TIXML_ENCODING_UNKNOWN );
+}
+
+#endif
+
+const char* TiXmlDocument::Parse( const char* p, TiXmlParsingData* prevData, TiXmlEncoding encoding )
+{
+	ClearError();
+
+	// Parse away, at the document level. Since a document
+	// contains nothing but other tags, most of what happens
+	// here is skipping white space.
+	if ( !p || !*p )
+	{
+		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return 0;
+	}
+
+	// Note that, for a document, this needs to come
+	// before the while space skip, so that parsing
+	// starts from the pointer we are given.
+	location.Clear();
+	if ( prevData )
+	{
+		location.row = prevData->cursor.row;
+		location.col = prevData->cursor.col;
+	}
+	else
+	{
+		location.row = 0;
+		location.col = 0;
+	}
+	TiXmlParsingData data( p, TabSize(), location.row, location.col );
+	location = data.Cursor();
+
+	if ( encoding == TIXML_ENCODING_UNKNOWN )
+	{
+		// Check for the Microsoft UTF-8 lead bytes.
+		const unsigned char* pU = (const unsigned char*)p;
+		if (	*(pU+0) && *(pU+0) == TIXML_UTF_LEAD_0
+			 && *(pU+1) && *(pU+1) == TIXML_UTF_LEAD_1
+			 && *(pU+2) && *(pU+2) == TIXML_UTF_LEAD_2 )
+		{
+			encoding = TIXML_ENCODING_UTF8;
+			useMicrosoftBOM = true;
+		}
+	}
+
+    p = SkipWhiteSpace( p, encoding );
+	if ( !p )
+	{
+		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, TIXML_ENCODING_UNKNOWN );
+		return 0;
+	}
+
+	while ( p && *p )
+	{
+		TiXmlNode* node = Identify( p, encoding );
+		if ( node )
+		{
+			p = node->Parse( p, &data, encoding );
+			LinkEndChild( node );
+		}
+		else
+		{
+			break;
+		}
+
+		// Did we get encoding info?
+		if (    encoding == TIXML_ENCODING_UNKNOWN
+			 && node->ToDeclaration() )
+		{
+			TiXmlDeclaration* dec = node->ToDeclaration();
+			const char* enc = dec->Encoding();
+			assert( enc );
+
+			if ( *enc == 0 )
+				encoding = TIXML_ENCODING_UTF8;
+			else if ( StringEqual( enc, "UTF-8", true, TIXML_ENCODING_UNKNOWN ) )
+				encoding = TIXML_ENCODING_UTF8;
+			else if ( StringEqual( enc, "UTF8", true, TIXML_ENCODING_UNKNOWN ) )
+				encoding = TIXML_ENCODING_UTF8;	// incorrect, but be nice
+			else
+				encoding = TIXML_ENCODING_LEGACY;
+		}
+
+		p = SkipWhiteSpace( p, encoding );
+	}
+
+	// Was this empty?
+	if ( !firstChild ) {
+		SetError( TIXML_ERROR_DOCUMENT_EMPTY, 0, 0, encoding );
+		return 0;
+	}
+
+	// All is well.
+	return p;
+}
+
+void TiXmlDocument::SetError( int err, const char* pError, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	// The first error in a chain is more accurate - don't set again!
+	if ( error )
+		return;
+
+	assert( err > 0 && err < TIXML_ERROR_STRING_COUNT );
+	error   = true;
+	errorId = err;
+	errorDesc = errorString[ errorId ];
+
+	errorLocation.Clear();
+	if ( pError && data )
+	{
+		data->Stamp( pError, encoding );
+		errorLocation = data->Cursor();
+	}
+}
+
+
+TiXmlNode* TiXmlNode::Identify( const char* p, TiXmlEncoding encoding )
+{
+	TiXmlNode* returnNode = 0;
+
+	p = SkipWhiteSpace( p, encoding );
+	if( !p || !*p || *p != '<' )
+	{
+		return 0;
+	}
+
+	TiXmlDocument* doc = GetDocument();
+	p = SkipWhiteSpace( p, encoding );
+
+	if ( !p || !*p )
+	{
+		return 0;
+	}
+
+	// What is this thing?
+	// - Elements start with a letter or underscore, but xml is reserved.
+	// - Comments: <!--
+	// - Decleration: <?xml
+	// - StylesheetReference <?xml-stylesheet
+	// - Everthing else is unknown to tinyxml.
+	//
+
+	const char* xmlHeader = { "<?xml" };
+	const char* xmlSSHeader = { "<?xml-stylesheet" };
+	const char* commentHeader = { "<!--" };
+	const char* dtdHeader = { "<!" };
+	const char* cdataHeader = { "<![CDATA[" };
+
+	if ( StringEqual( p, xmlSSHeader, true, encoding ) )
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing Stylesheet Reference\n" );
+		#endif
+		returnNode = new TiXmlStylesheetReference();
+	}
+	else if ( StringEqual( p, xmlHeader, true, encoding ) )
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing Declaration\n" );
+		#endif
+		returnNode = new TiXmlDeclaration();
+	}
+	else if ( StringEqual( p, commentHeader, false, encoding ) )
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing Comment\n" );
+		#endif
+		returnNode = new TiXmlComment();
+	}
+	else if ( StringEqual( p, cdataHeader, false, encoding ) )
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing CDATA\n" );
+		#endif
+		TiXmlText* text = new TiXmlText( "" );
+		text->SetCDATA( true );
+		returnNode = text;
+	}
+	else if ( StringEqual( p, dtdHeader, false, encoding ) )
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing Unknown(1)\n" );
+		#endif
+		returnNode = new TiXmlUnknown();
+	}
+	else if (    IsAlpha( *(p+1), encoding )
+			  || *(p+1) == '_' )
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing Element\n" );
+		#endif
+		returnNode = new TiXmlElement( "" );
+	}
+	else
+	{
+		#ifdef DEBUG_PARSER
+			TIXML_LOG( "XML parsing Unknown(2)\n" );
+		#endif
+		returnNode = new TiXmlUnknown();
+	}
+
+	if ( returnNode )
+	{
+		// Set the parent, so it can report errors
+		returnNode->parent = this;
+	}
+	else
+	{
+		if ( doc )
+			doc->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, TIXML_ENCODING_UNKNOWN );
+	}
+	return returnNode;
+}
+
+#ifdef TIXML_USE_STL
+
+void TiXmlElement::StreamIn (std::istream * in, TIXML_STRING * tag)
+{
+	// We're called with some amount of pre-parsing. That is, some of "this"
+	// element is in "tag". Go ahead and stream to the closing ">"
+	while( in->good() )
+	{
+		int c = in->get();
+		if ( c <= 0 )
+		{
+			TiXmlDocument* document = GetDocument();
+			if ( document )
+				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+			return;
+		}
+		(*tag) += (char) c ;
+
+		if ( c == '>' )
+			break;
+	}
+
+	if ( tag->length() < 3 ) return;
+
+	// Okay...if we are a "/>" tag, then we're done. We've read a complete tag.
+	// If not, identify and stream.
+
+	if (    tag->at( tag->length() - 1 ) == '>'
+		 && tag->at( tag->length() - 2 ) == '/' )
+	{
+		// All good!
+		return;
+	}
+	else if ( tag->at( tag->length() - 1 ) == '>' )
+	{
+		// There is more. Could be:
+		//		text
+		//		cdata text (which looks like another node)
+		//		closing tag
+		//		another node.
+		for ( ;; )
+		{
+			StreamWhiteSpace( in, tag );
+
+			// Do we have text?
+			if ( in->good() && in->peek() != '<' )
+			{
+				// Yep, text.
+				TiXmlText text( "" );
+				text.StreamIn( in, tag );
+
+				// What follows text is a closing tag or another node.
+				// Go around again and figure it out.
+				continue;
+			}
+
+			// We now have either a closing tag...or another node.
+			// We should be at a "<", regardless.
+			if ( !in->good() ) return;
+			assert( in->peek() == '<' );
+			int tagIndex = (int) tag->length();
+
+			bool closingTag = false;
+			bool firstCharFound = false;
+
+			for( ;; )
+			{
+				if ( !in->good() )
+					return;
+
+				int c = in->peek();
+				if ( c <= 0 )
+				{
+					TiXmlDocument* document = GetDocument();
+					if ( document )
+						document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+					return;
+				}
+
+				if ( c == '>' )
+					break;
+
+				*tag += (char) c;
+				in->get();
+
+				// Early out if we find the CDATA id.
+				if ( c == '[' && tag->size() >= 9 )
+				{
+					size_t len = tag->size();
+					const char* start = tag->c_str() + len - 9;
+					if ( strcmp( start, "<![CDATA[" ) == 0 ) {
+						assert( !closingTag );
+						break;
+					}
+				}
+
+				if ( !firstCharFound && c != '<' && !IsWhiteSpace( c ) )
+				{
+					firstCharFound = true;
+					if ( c == '/' )
+						closingTag = true;
+				}
+			}
+			// If it was a closing tag, then read in the closing '>' to clean up the input stream.
+			// If it was not, the streaming will be done by the tag.
+			if ( closingTag )
+			{
+				if ( !in->good() )
+					return;
+
+				int c = in->get();
+				if ( c <= 0 )
+				{
+					TiXmlDocument* document = GetDocument();
+					if ( document )
+						document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+					return;
+				}
+				assert( c == '>' );
+				*tag += (char) c;
+
+				// We are done, once we've found our closing tag.
+				return;
+			}
+			else
+			{
+				// If not a closing tag, id it, and stream.
+				const char* tagloc = tag->c_str() + tagIndex;
+				TiXmlNode* node = Identify( tagloc, TIXML_DEFAULT_ENCODING );
+				if ( !node )
+					return;
+				node->StreamIn( in, tag );
+				delete node;
+				node = 0;
+
+				// No return: go around from the beginning: text, closing tag, or node.
+			}
+		}
+	}
+}
+#endif
+
+const char* TiXmlElement::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	p = SkipWhiteSpace( p, encoding );
+	TiXmlDocument* document = GetDocument();
+
+	if ( !p || !*p )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, 0, 0, encoding );
+		return 0;
+	}
+
+	if ( data )
+	{
+		data->Stamp( p, encoding );
+		location = data->Cursor();
+	}
+
+	if ( *p != '<' )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, p, data, encoding );
+		return 0;
+	}
+
+	p = SkipWhiteSpace( p+1, encoding );
+
+	// Read the name.
+	const char* pErr = p;
+
+    p = ReadName( p, &value, encoding );
+	if ( !p || !*p )
+	{
+		if ( document )	document->SetError( TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME, pErr, data, encoding );
+		return 0;
+	}
+
+    TIXML_STRING endTag ("</");
+	endTag += value;
+	endTag += ">";
+
+	// Check for and read attributes. Also look for an empty
+	// tag or an end tag.
+	while ( p && *p )
+	{
+		pErr = p;
+		p = SkipWhiteSpace( p, encoding );
+		if ( !p || !*p )
+		{
+			if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );
+			return 0;
+		}
+		if ( *p == '/' )
+		{
+			++p;
+			// Empty tag.
+			if ( *p  != '>' )
+			{
+				if ( document ) document->SetError( TIXML_ERROR_PARSING_EMPTY, p, data, encoding );
+				return 0;
+			}
+			return (p+1);
+		}
+		else if ( *p == '>' )
+		{
+			// Done with attributes (if there were any.)
+			// Read the value -- which can include other
+			// elements -- read the end tag, and return.
+			++p;
+			p = ReadValue( p, data, encoding );		// Note this is an Element method, and will set the error if one happens.
+			if ( !p || !*p ) {
+				// We were looking for the end tag, but found nothing.
+				// Fix for [ 1663758 ] Failure to report error on bad XML
+				if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
+				return 0;
+			}
+
+			// We should find the end tag now
+			if ( StringEqual( p, endTag.c_str(), false, encoding ) )
+			{
+				p += endTag.length();
+				return p;
+			}
+			else
+			{
+				if ( document ) document->SetError( TIXML_ERROR_READING_END_TAG, p, data, encoding );
+				return 0;
+			}
+		}
+		else
+		{
+			// Try to read an attribute:
+			TiXmlAttribute* attrib = new TiXmlAttribute();
+			if ( !attrib )
+			{
+				if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, pErr, data, encoding );
+				return 0;
+			}
+
+			attrib->SetDocument( document );
+			pErr = p;
+			p = attrib->Parse( p, data, encoding );
+
+			if ( !p || !*p )
+			{
+				if ( document ) document->SetError( TIXML_ERROR_PARSING_ELEMENT, pErr, data, encoding );
+				delete attrib;
+				return 0;
+			}
+
+			// Handle the strange case of double attributes:
+			#ifdef TIXML_USE_STL
+			TiXmlAttribute* node = attributeSet.Find( attrib->NameTStr() );
+			#else
+			TiXmlAttribute* node = attributeSet.Find( attrib->Name() );
+			#endif
+			if ( node )
+			{
+				node->SetValue( attrib->Value() );
+				delete attrib;
+				return 0;
+			}
+
+			attributeSet.Add( attrib );
+		}
+	}
+	return p;
+}
+
+
+const char* TiXmlElement::ReadValue( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	TiXmlDocument* document = GetDocument();
+
+	// Read in text and elements in any order.
+	const char* pWithWhiteSpace = p;
+	p = SkipWhiteSpace( p, encoding );
+
+	while ( p && *p )
+	{
+		if ( *p != '<' )
+		{
+			// Take what we have, make a text element.
+			TiXmlText* textNode = new TiXmlText( "" );
+
+			if ( !textNode )
+			{
+				if ( document ) document->SetError( TIXML_ERROR_OUT_OF_MEMORY, 0, 0, encoding );
+				    return 0;
+			}
+
+			if ( TiXmlBase::IsWhiteSpaceCondensed() )
+			{
+				p = textNode->Parse( p, data, encoding );
+			}
+			else
+			{
+				// Special case: we want to keep the white space
+				// so that leading spaces aren't removed.
+				p = textNode->Parse( pWithWhiteSpace, data, encoding );
+			}
+
+			if ( !textNode->Blank() )
+				LinkEndChild( textNode );
+			else
+				delete textNode;
+		}
+		else
+		{
+			// We hit a '<'
+			// Have we hit a new element or an end tag? This could also be
+			// a TiXmlText in the "CDATA" style.
+			if ( StringEqual( p, "</", false, encoding ) )
+			{
+				return p;
+			}
+			else
+			{
+				TiXmlNode* node = Identify( p, encoding );
+				if ( node )
+				{
+					p = node->Parse( p, data, encoding );
+					LinkEndChild( node );
+				}
+				else
+				{
+					return 0;
+				}
+			}
+		}
+		pWithWhiteSpace = p;
+		p = SkipWhiteSpace( p, encoding );
+	}
+
+	if ( !p )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_READING_ELEMENT_VALUE, 0, 0, encoding );
+	}
+	return p;
+}
+
+
+#ifdef TIXML_USE_STL
+void TiXmlUnknown::StreamIn( std::istream * in, TIXML_STRING * tag )
+{
+	while ( in->good() )
+	{
+		int c = in->get();
+		if ( c <= 0 )
+		{
+			TiXmlDocument* document = GetDocument();
+			if ( document )
+				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+			return;
+		}
+		(*tag) += (char) c;
+
+		if ( c == '>' )
+		{
+			// All is well.
+			return;
+		}
+	}
+}
+#endif
+
+
+const char* TiXmlUnknown::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	TiXmlDocument* document = GetDocument();
+	p = SkipWhiteSpace( p, encoding );
+
+	if ( data )
+	{
+		data->Stamp( p, encoding );
+		location = data->Cursor();
+	}
+	if ( !p || !*p || *p != '<' )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_PARSING_UNKNOWN, p, data, encoding );
+		return 0;
+	}
+	++p;
+    value = "";
+
+	while ( p && *p && *p != '>' )
+	{
+		value += *p;
+		++p;
+	}
+
+	if ( !p )
+	{
+		if ( document )	document->SetError( TIXML_ERROR_PARSING_UNKNOWN, 0, 0, encoding );
+	}
+	if ( *p == '>' )
+		return p+1;
+	return p;
+}
+
+#ifdef TIXML_USE_STL
+void TiXmlComment::StreamIn( std::istream * in, TIXML_STRING * tag )
+{
+	while ( in->good() )
+	{
+		int c = in->get();
+		if ( c <= 0 )
+		{
+			TiXmlDocument* document = GetDocument();
+			if ( document )
+				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+			return;
+		}
+
+		(*tag) += (char) c;
+
+		if ( c == '>'
+			 && tag->at( tag->length() - 2 ) == '-'
+			 && tag->at( tag->length() - 3 ) == '-' )
+		{
+			// All is well.
+			return;
+		}
+	}
+}
+#endif
+
+
+const char* TiXmlComment::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	TiXmlDocument* document = GetDocument();
+	value = "";
+
+	p = SkipWhiteSpace( p, encoding );
+
+	if ( data )
+	{
+		data->Stamp( p, encoding );
+		location = data->Cursor();
+	}
+	const char* startTag = "<!--";
+	const char* endTag   = "-->";
+
+	if ( !StringEqual( p, startTag, false, encoding ) )
+	{
+		document->SetError( TIXML_ERROR_PARSING_COMMENT, p, data, encoding );
+		return 0;
+	}
+	p += strlen( startTag );
+
+	// [ 1475201 ] TinyXML parses entities in comments
+	// Oops - ReadText doesn't work, because we don't want to parse the entities.
+	// p = ReadText( p, &value, false, endTag, false, encoding );
+	//
+	// from the XML spec:
+	/*
+	 [Definition: Comments may appear anywhere in a document outside other markup; in addition,
+	              they may appear within the document type declaration at places allowed by the grammar.
+				  They are not part of the document's character data; an XML processor MAY, but need not,
+				  make it possible for an application to retrieve the text of comments. For compatibility,
+				  the string "--" (double-hyphen) MUST NOT occur within comments.] Parameter entity
+				  references MUST NOT be recognized within comments.
+
+				  An example of a comment:
+
+				  <!-- declarations for <head> & <body> -->
+	*/
+
+    value = "";
+	// Keep all the white space.
+	while (	p && *p && !StringEqual( p, endTag, false, encoding ) )
+	{
+		value.append( p, 1 );
+		++p;
+	}
+	if ( p )
+		p += strlen( endTag );
+
+	return p;
+}
+
+
+const char* TiXmlAttribute::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	p = SkipWhiteSpace( p, encoding );
+	if ( !p || !*p ) return 0;
+
+//	int tabsize = 4;
+//	if ( document )
+//		tabsize = document->TabSize();
+
+	if ( data )
+	{
+		data->Stamp( p, encoding );
+		location = data->Cursor();
+	}
+	// Read the name, the '=' and the value.
+	const char* pErr = p;
+	p = ReadName( p, &name, encoding );
+	if ( !p || !*p )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, pErr, data, encoding );
+		return 0;
+	}
+	p = SkipWhiteSpace( p, encoding );
+	if ( !p || !*p || *p != '=' )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
+		return 0;
+	}
+
+	++p;	// skip '='
+	p = SkipWhiteSpace( p, encoding );
+	if ( !p || !*p )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
+		return 0;
+	}
+
+	const char* end;
+	const char SINGLE_QUOTE = '\'';
+	const char DOUBLE_QUOTE = '\"';
+
+	if ( *p == SINGLE_QUOTE )
+	{
+		++p;
+		end = "\'";		// single quote in string
+		p = ReadText( p, &value, false, end, false, encoding );
+	}
+	else if ( *p == DOUBLE_QUOTE )
+	{
+		++p;
+		end = "\"";		// double quote in string
+		p = ReadText( p, &value, false, end, false, encoding );
+	}
+	else
+	{
+		// All attribute values should be in single or double quotes.
+		// But this is such a common error that the parser will try
+		// its best, even without them.
+		value = "";
+		while (    p && *p											// existence
+				&& !IsWhiteSpace( *p ) && *p != '\n' && *p != '\r'	// whitespace
+				&& *p != '/' && *p != '>' )							// tag end
+		{
+			if ( *p == SINGLE_QUOTE || *p == DOUBLE_QUOTE ) {
+				// [ 1451649 ] Attribute values with trailing quotes not handled correctly
+				// We did not have an opening quote but seem to have a
+				// closing one. Give up and throw an error.
+				if ( document ) document->SetError( TIXML_ERROR_READING_ATTRIBUTES, p, data, encoding );
+				return 0;
+			}
+			value += *p;
+			++p;
+		}
+	}
+	return p;
+}
+
+#ifdef TIXML_USE_STL
+void TiXmlText::StreamIn( std::istream * in, TIXML_STRING * tag )
+{
+	while ( in->good() )
+	{
+		int c = in->peek();
+		if ( !cdata && (c == '<' ) )
+		{
+			return;
+		}
+		if ( c <= 0 )
+		{
+			TiXmlDocument* document = GetDocument();
+			if ( document )
+				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+			return;
+		}
+
+		(*tag) += (char) c;
+		in->get();	// "commits" the peek made above
+
+		if ( cdata && c == '>' && tag->size() >= 3 ) {
+			size_t len = tag->size();
+			if ( (*tag)[len-2] == ']' && (*tag)[len-3] == ']' ) {
+				// terminator of cdata.
+				return;
+			}
+		}
+	}
+}
+#endif
+
+const char* TiXmlText::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding encoding )
+{
+	value = "";
+	TiXmlDocument* document = GetDocument();
+
+	if ( data )
+	{
+		data->Stamp( p, encoding );
+		location = data->Cursor();
+	}
+
+	const char* const startTag = "<![CDATA[";
+	const char* const endTag   = "]]>";
+
+	if ( cdata || StringEqual( p, startTag, false, encoding ) )
+	{
+		cdata = true;
+
+		if ( !StringEqual( p, startTag, false, encoding ) )
+		{
+			document->SetError( TIXML_ERROR_PARSING_CDATA, p, data, encoding );
+			return 0;
+		}
+		p += strlen( startTag );
+
+		// Keep all the white space, ignore the encoding, etc.
+		while (	   p && *p
+				&& !StringEqual( p, endTag, false, encoding )
+			  )
+		{
+			value += *p;
+			++p;
+		}
+
+		TIXML_STRING dummy;
+		p = ReadText( p, &dummy, false, endTag, false, encoding );
+		return p;
+	}
+	else
+	{
+		bool ignoreWhite = true;
+
+		const char* end = "<";
+		p = ReadText( p, &value, ignoreWhite, end, false, encoding );
+		if ( p )
+			return p-1;	// don't truncate the '<'
+		return 0;
+	}
+}
+
+#ifdef TIXML_USE_STL
+void TiXmlDeclaration::StreamIn( std::istream * in, TIXML_STRING * tag )
+{
+	while ( in->good() )
+	{
+		int c = in->get();
+		if ( c <= 0 )
+		{
+			TiXmlDocument* document = GetDocument();
+			if ( document )
+				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+			return;
+		}
+		(*tag) += (char) c;
+
+		if ( c == '>' )
+		{
+			// All is well.
+			return;
+		}
+	}
+}
+#endif
+
+const char* TiXmlDeclaration::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding )
+{
+	p = SkipWhiteSpace( p, _encoding );
+	// Find the beginning, find the end, and look for
+	// the stuff in-between.
+	TiXmlDocument* document = GetDocument();
+	if ( !p || !*p || !StringEqual( p, "<?xml", true, _encoding ) )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding );
+		return 0;
+	}
+	if ( data )
+	{
+		data->Stamp( p, _encoding );
+		location = data->Cursor();
+	}
+	p += 5;
+
+	version = "";
+	encoding = "";
+	standalone = "";
+
+	while ( p && *p )
+	{
+		if ( *p == '>' )
+		{
+			++p;
+			return p;
+		}
+
+		p = SkipWhiteSpace( p, _encoding );
+		if ( StringEqual( p, "version", true, _encoding ) )
+		{
+			TiXmlAttribute attrib;
+			p = attrib.Parse( p, data, _encoding );
+			version = attrib.Value();
+		}
+		else if ( StringEqual( p, "encoding", true, _encoding ) )
+		{
+			TiXmlAttribute attrib;
+			p = attrib.Parse( p, data, _encoding );
+			encoding = attrib.Value();
+		}
+		else if ( StringEqual( p, "standalone", true, _encoding ) )
+		{
+			TiXmlAttribute attrib;
+			p = attrib.Parse( p, data, _encoding );
+			standalone = attrib.Value();
+		}
+		else
+		{
+			// Read over whatever it is.
+			while( p && *p && *p != '>' && !IsWhiteSpace( *p ) )
+				++p;
+		}
+	}
+	return 0;
+}
+
+bool TiXmlText::Blank() const
+{
+	for ( unsigned i=0; i<value.length(); i++ )
+		if ( !IsWhiteSpace( value[i] ) )
+			return false;
+	return true;
+}
+
+#ifdef TIXML_USE_STL
+void TiXmlStylesheetReference::StreamIn( std::istream * in, TIXML_STRING * tag )
+{
+	while ( in->good() )
+	{
+		int c = in->get();
+		if ( c <= 0 )
+		{
+			TiXmlDocument* document = GetDocument();
+			if ( document )
+				document->SetError( TIXML_ERROR_EMBEDDED_NULL, 0, 0, TIXML_ENCODING_UNKNOWN );
+			return;
+		}
+		(*tag) += (char) c;
+
+		if ( c == '>' )
+		{
+			// All is well.
+			return;
+		}
+	}
+}
+#endif
+
+const char* TiXmlStylesheetReference::Parse( const char* p, TiXmlParsingData* data, TiXmlEncoding _encoding )
+{
+	p = SkipWhiteSpace( p, _encoding );
+	// Find the beginning, find the end, and look for
+	// the stuff in-between.
+	TiXmlDocument* document = GetDocument();
+	if ( !p || !*p || !StringEqual( p, "<?xml-stylesheet", true, _encoding ) )
+	{
+		if ( document ) document->SetError( TIXML_ERROR_PARSING_DECLARATION, 0, 0, _encoding );
+		return 0;
+	}
+	if ( data )
+	{
+		data->Stamp( p, _encoding );
+		location = data->Cursor();
+	}
+	p += 5;
+
+	type = "";
+	href = "";
+
+	while ( p && *p )
+	{
+		if ( *p == '>' )
+		{
+			++p;
+			return p;
+		}
+
+		p = SkipWhiteSpace( p, _encoding );
+		if ( StringEqual( p, "type", true, _encoding ) )
+		{
+			TiXmlAttribute attrib;
+			p = attrib.Parse( p, data, _encoding );
+			type = attrib.Value();
+		}
+		else if ( StringEqual( p, "href", true, _encoding ) )
+		{
+			TiXmlAttribute attrib;
+			p = attrib.Parse( p, data, _encoding );
+			href = attrib.Value();
+		}
+		else
+		{
+			// Read over whatever it is.
+			while( p && *p && *p != '>' && !IsWhiteSpace( *p ) )
+				++p;
+		}
+	}
+	return 0;
+}
Index: /code/branches/network/visual_studio/audio_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/audio_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/audio_properties.vsprops	(revision 861)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="audio_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="AUDIO_SHARED_BUILD"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		AdditionalDependencies="libvorbisfile$(CSS).lib alut$(CS).lib OpenAL32$(CS).lib"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/base_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/base_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/base_properties.vsprops	(revision 861)
@@ -0,0 +1,45 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		AdditionalIncludeDirectories="&quot;$(RootDir)src&quot;;&quot;$(RootDir)src\orxonox&quot;;&quot;$(DependencyDir)include&quot;"
+		PreprocessorDefinitions="WIN32;__WIN32__;_WIN32;BOOST_ALL_DYN_LINK"
+		WarningLevel="3"
+		DisableSpecificWarnings="4267; 4244; 4251"
+	/>
+	<Tool
+		Name="VCLibrarianTool"
+		OutputFile="$(LibOutDir)$(ProjectName)$(CS).lib"
+		AdditionalLibraryDirectories="$(RootDir)dependencies\lib"
+		IgnoreAllDefaultLibraries="true"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		OutputFile="$(OutDir)$(ProjectName)$(CS).dll"
+		AdditionalLibraryDirectories="$(DependencyDir)lib"
+		SubSystem="2"
+		ImportLibrary="$(LibOutDir)$(TargetName).lib"
+		TargetMachine="1"
+	/>
+	<UserMacro
+		Name="LibOutDir"
+		Value="$(RootDir)lib\"
+	/>
+	<UserMacro
+		Name="DependencyDir"
+		Value="$(RootDir)dependencies\"
+	/>
+	<UserMacro
+		Name="CS"
+		Value=""
+	/>
+	<UserMacro
+		Name="CSS"
+		Value="$(CS)"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/base_properties_debug.vsprops
===================================================================
--- /code/branches/network/visual_studio/base_properties_debug.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/base_properties_debug.vsprops	(revision 861)
@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_properties_debug"
+	InheritedPropertySheets="$(SolutionDir)base_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		Optimization="0"
+		PreprocessorDefinitions="_DEBUG"
+		MinimalRebuild="true"
+		BasicRuntimeChecks="3"
+		RuntimeLibrary="3"
+		DebugInformationFormat="4"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		LinkIncremental="2"
+		GenerateDebugInformation="true"
+	/>
+	<UserMacro
+		Name="CS"
+		Value="_d"
+	/>
+	<UserMacro
+		Name="CSS"
+		Value="$(CS)"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/base_properties_release.vsprops
===================================================================
--- /code/branches/network/visual_studio/base_properties_release.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/base_properties_release.vsprops	(revision 861)
@@ -0,0 +1,31 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_properties_release"
+	InheritedPropertySheets=".\base_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		Optimization="2"
+		WholeProgramOptimization="true"
+		PreprocessorDefinitions="NDEBUG"
+		RuntimeLibrary="2"
+		DebugInformationFormat="0"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		LinkIncremental="1"
+		GenerateDebugInformation="true"
+		OptimizeReferences="2"
+		EnableCOMDATFolding="2"
+	/>
+	<UserMacro
+		Name="CS"
+		Value=""
+	/>
+	<UserMacro
+		Name="CSS"
+		Value="$(CS)"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/base_properties_release_sse.vsprops
===================================================================
--- /code/branches/network/visual_studio/base_properties_release_sse.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/base_properties_release_sse.vsprops	(revision 861)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_properties_release_sse"
+	InheritedPropertySheets=".\base_properties_release.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="NDEBUG"
+		EnableEnhancedInstructionSet="1"
+	/>
+	<UserMacro
+		Name="CS"
+		Value="_sse"
+	/>
+	<UserMacro
+		Name="CSS"
+		Value=""
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/base_properties_release_sse2.vsprops
===================================================================
--- /code/branches/network/visual_studio/base_properties_release_sse2.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/base_properties_release_sse2.vsprops	(revision 861)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="base_properties_release_sse2"
+	InheritedPropertySheets=".\base_properties_release.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		EnableEnhancedInstructionSet="2"
+	/>
+	<UserMacro
+		Name="CS"
+		Value="_sse2"
+	/>
+	<UserMacro
+		Name="CSS"
+		Value=""
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/core_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/core_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/core_properties.vsprops	(revision 861)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="core_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="CORE_SHARED_BUILD"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		AdditionalDependencies="OgreMain$(CS).lib"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/directory_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/directory_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/directory_properties.vsprops	(revision 861)
@@ -0,0 +1,13 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="directory_properties"
+	OutputDirectory="$(RootDir)bin\"
+	IntermediateDirectory="$(RootDir)obj\$(ProjectName)\$(ConfigurationName)"
+	>
+	<UserMacro
+		Name="RootDir"
+		Value="$(SolutionDir)..\"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/loader_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/loader_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/loader_properties.vsprops	(revision 861)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="loader_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="LOADER_SHARED_BUILD"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		AdditionalDependencies="OgreMain$(CS).lib"
+		AdditionalLibraryDirectories="$(OutDir)"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/network_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/network_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/network_properties.vsprops	(revision 861)
@@ -0,0 +1,17 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="network_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="NETWORK_SHARED_BUILD; WIN32_LEAN_AND_MEAN; ZLIB_WINAPI "
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		AdditionalDependencies="enet$(CSS).lib zlib$(CSS).lib"
+		IgnoreDefaultLibraryNames="LIBCMT;LIBCMTD"
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/orxonox_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/orxonox_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/orxonox_properties.vsprops	(revision 861)
@@ -0,0 +1,20 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="orxonox_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+	<Tool
+		Name="VCCLCompilerTool"
+		PreprocessorDefinitions="ORXONOX_SHARED_BUILD; LOADER_STATIC_BUILD"
+		UsePrecompiledHeader="2"
+		PrecompiledHeaderThrough="OrxonoxStableHeaders.h"
+	/>
+	<Tool
+		Name="VCLinkerTool"
+		AdditionalDependencies="OgreMain$(CS).lib OIS$(CSS).lib"
+		OutputFile="$(OutDir)$(ProjectName)$(CS).exe"
+		IgnoreDefaultLibraryNames=""
+	/>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/orxonox_vc8.sln
===================================================================
--- /code/branches/network/visual_studio/orxonox_vc8.sln	(revision 861)
+++ /code/branches/network/visual_studio/orxonox_vc8.sln	(revision 861)
@@ -0,0 +1,125 @@
+Microsoft Visual Studio Solution File, Format Version 9.00
+# Visual Studio 2005
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "audio", "vc8\audio.vcproj", "{4733BD1A-E04C-458D-8BFB-5010250EA497}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "core", "vc8\core.vcproj", "{271715F3-5B90-4110-A552-70C788084A86}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "loader", "vc8\loader.vcproj", "{E283910F-F911-40FB-A09D-D025CA821912}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "network", "vc8\network.vcproj", "{35575B59-E1AE-40E8-89C4-2862B5B09B68}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "orxonox", "vc8\orxonox.vcproj", "{0B6C5CFD-F91B-432A-80A3-2610F61E060B}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+	ProjectSection(ProjectDependencies) = postProject
+		{4733BD1A-E04C-458D-8BFB-5010250EA497} = {4733BD1A-E04C-458D-8BFB-5010250EA497}
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68} = {35575B59-E1AE-40E8-89C4-2862B5B09B68}
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC} = {2240ECD7-2F48-4431-8E1B-25466A384CCC}
+		{271715F3-5B90-4110-A552-70C788084A86} = {271715F3-5B90-4110-A552-70C788084A86}
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "test_proj", "vc8\test_proj.vcproj", "{97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "util", "vc8\util.vcproj", "{2240ECD7-2F48-4431-8E1B-25466A384CCC}"
+	ProjectSection(WebsiteProperties) = preProject
+		Debug.AspNetCompiler.Debug = "True"
+		Release.AspNetCompiler.Debug = "False"
+	EndProjectSection
+EndProject
+Global
+	GlobalSection(SolutionConfigurationPlatforms) = preSolution
+		Debug|Win32 = Debug|Win32
+		Release_SSE|Win32 = Release_SSE|Win32
+		Release_SSE2|Win32 = Release_SSE2|Win32
+		Release|Win32 = Release|Win32
+	EndGlobalSection
+	GlobalSection(ProjectConfigurationPlatforms) = postSolution
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Debug|Win32.ActiveCfg = Debug|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Debug|Win32.Build.0 = Debug|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Release_SSE|Win32.Build.0 = Release_SSE|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Release|Win32.ActiveCfg = Release|Win32
+		{4733BD1A-E04C-458D-8BFB-5010250EA497}.Release|Win32.Build.0 = Release|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Debug|Win32.ActiveCfg = Debug|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Debug|Win32.Build.0 = Debug|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Release_SSE|Win32.Build.0 = Release_SSE|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Release|Win32.ActiveCfg = Release|Win32
+		{271715F3-5B90-4110-A552-70C788084A86}.Release|Win32.Build.0 = Release|Win32
+		{E283910F-F911-40FB-A09D-D025CA821912}.Debug|Win32.ActiveCfg = Debug|Win32
+		{E283910F-F911-40FB-A09D-D025CA821912}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{E283910F-F911-40FB-A09D-D025CA821912}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{E283910F-F911-40FB-A09D-D025CA821912}.Release|Win32.ActiveCfg = Release|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Debug|Win32.ActiveCfg = Debug|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Debug|Win32.Build.0 = Debug|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Release_SSE|Win32.Build.0 = Release_SSE|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Release|Win32.ActiveCfg = Release|Win32
+		{35575B59-E1AE-40E8-89C4-2862B5B09B68}.Release|Win32.Build.0 = Release|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Debug|Win32.ActiveCfg = Debug|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Debug|Win32.Build.0 = Debug|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Release_SSE|Win32.Build.0 = Release_SSE|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Release|Win32.ActiveCfg = Release|Win32
+		{0B6C5CFD-F91B-432A-80A3-2610F61E060B}.Release|Win32.Build.0 = Release|Win32
+		{97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}.Debug|Win32.ActiveCfg = Debug|Win32
+		{97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{97B226C5-8FD9-4A1E-B50B-5CBF79CF46F5}.Release|Win32.ActiveCfg = Release|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Debug|Win32.ActiveCfg = Debug|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Debug|Win32.Build.0 = Debug|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release_SSE|Win32.ActiveCfg = Release_SSE|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release_SSE|Win32.Build.0 = Release_SSE|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release_SSE2|Win32.ActiveCfg = Release_SSE2|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release_SSE2|Win32.Build.0 = Release_SSE2|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release|Win32.ActiveCfg = Release|Win32
+		{2240ECD7-2F48-4431-8E1B-25466A384CCC}.Release|Win32.Build.0 = Release|Win32
+	EndGlobalSection
+	GlobalSection(SolutionProperties) = preSolution
+		HideSolutionNode = FALSE
+	EndGlobalSection
+EndGlobal
Index: /code/branches/network/visual_studio/util_properties.vsprops
===================================================================
--- /code/branches/network/visual_studio/util_properties.vsprops	(revision 861)
+++ /code/branches/network/visual_studio/util_properties.vsprops	(revision 861)
@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioPropertySheet
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="util_properties"
+	InheritedPropertySheets=".\directory_properties.vsprops"
+	>
+</VisualStudioPropertySheet>
Index: /code/branches/network/visual_studio/vc8/audio.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/audio.vcproj	(revision 861)
+++ /code/branches/network/visual_studio/vc8/audio.vcproj	(revision 861)
@@ -0,0 +1,360 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="audio"
+	ProjectGUID="{4733BD1A-E04C-458D-8BFB-5010250EA497}"
+	RootNamespace="FICN"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_debug.vsprops;..\audio_properties.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\audio_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse.vsprops;..\audio_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE2|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse2.vsprops;..\audio_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\audio\_AudioObject.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioBuffer.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioManager.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioSource.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioStream.cc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\audio\AudioBuffer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioIncludes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioPrereqs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioSource.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\audio\AudioStream.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /code/branches/network/visual_studio/vc8/core.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/core.vcproj	(revision 861)
+++ /code/branches/network/visual_studio/vc8/core.vcproj	(revision 861)
@@ -0,0 +1,412 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="core"
+	ProjectGUID="{271715F3-5B90-4110-A552-70C788084A86}"
+	RootNamespace="FICN"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_debug.vsprops;..\core_properties.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\core_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse.vsprops;..\core_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE2|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse2.vsprops;..\core_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\orxonox\core\ArgReader.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\BaseObject.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\ConfigValueContainer.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\DebugLevel.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Error.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Factory.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Identifier.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\IdentifierList.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Language.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\MetaObjectList.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\OrxonoxClass.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\OutputHandler.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\SignalHandler.cc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\orxonox\core\ArgReader.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\BaseObject.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\ClassFactory.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\ConfigValueContainer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\CoreIncludes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\CorePrereqs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Debug.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\DebugLevel.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Error.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Factory.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Identifier.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\IdentifierList.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Iterator.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\Language.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\MetaObjectList.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\ObjectList.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\OrxonoxClass.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\OutputHandler.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\core\SignalHandler.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /code/branches/network/visual_studio/vc8/loader.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/loader.vcproj	(revision 861)
+++ /code/branches/network/visual_studio/vc8/loader.vcproj	(revision 861)
@@ -0,0 +1,296 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="loader"
+	ProjectGUID="{E283910F-F911-40FB-A09D-D025CA821912}"
+	RootNamespace="FICN"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_debug.vsprops;..\loader_properties.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release.vsprops;..\loader_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse.vsprops;..\loader_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE2|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse2.vsprops;..\loader_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\loader\LevelLoader.cc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\loader\LevelLoader.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\loader\LoaderPrereqs.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /code/branches/network/visual_studio/vc8/network.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/network.vcproj	(revision 861)
+++ /code/branches/network/visual_studio/vc8/network.vcproj	(revision 861)
@@ -0,0 +1,596 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="network"
+	ProjectGUID="{35575B59-E1AE-40E8-89C4-2862B5B09B68}"
+	RootNamespace="FICN"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_debug.vsprops;..\network_properties.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\network_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse.vsprops;..\network_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE2|Win32"
+			ConfigurationType="2"
+			InheritedPropertySheets="..\base_properties_release_sse2.vsprops;..\network_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\network\Client.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\ClientConnection.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\ClientInformation.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\ConnectionManager.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\dummyclient.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\network\dummyclient2.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\network\dummyclient3.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\network\dummyserver.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\network\dummyserver3.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\network\GameStateClient.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\GameStateManager.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketBuffer.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketBufferTestExt.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketDecoder.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketGenerator.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\Server.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\Synchronisable.cc"
+				>
+			</File>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\network\Client.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\ClientConnection.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\ClientInformation.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\ConnectionManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\GameStateClient.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\GameStateManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\NetworkFrameListener.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\NetworkPrereqs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketBuffer.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\PacketTypes.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\Server.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\network\Synchronisable.h"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /code/branches/network/visual_studio/vc8/orxonox.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/orxonox.vcproj	(revision 861)
+++ /code/branches/network/visual_studio/vc8/orxonox.vcproj	(revision 861)
@@ -0,0 +1,890 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="orxonox"
+	ProjectGUID="{0B6C5CFD-F91B-432A-80A3-2610F61E060B}"
+	RootNamespace="FICN"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(SolutionDir)base_properties_debug.vsprops;..\orxonox_properties.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/Zm200"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				EntryPointSymbol=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="1"
+			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\orxonox_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/Zm200"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				EntryPointSymbol=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE|Win32"
+			ConfigurationType="1"
+			InheritedPropertySheets="..\base_properties_release_sse.vsprops;..\orxonox_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/Zm200"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				EntryPointSymbol=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE2|Win32"
+			ConfigurationType="1"
+			InheritedPropertySheets="..\base_properties_release_sse2.vsprops;..\orxonox_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+				AdditionalOptions="/Zm200"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLinkerTool"
+				EntryPointSymbol=""
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCManifestTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCAppVerifierTool"
+			/>
+			<Tool
+				Name="VCWebDeploymentTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\orxonox\GraphicsEngine.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\InputManager.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\Main.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\Orxonox.cc"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\PrecompiledHeaderFiles.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+						UsePrecompiledHeader="1"
+					/>
+				</FileConfiguration>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\SpaceshipSteering.cc"
+				>
+				<FileConfiguration
+					Name="Debug|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+				<FileConfiguration
+					Name="Release_SSE2|Win32"
+					ExcludedFromBuild="true"
+					>
+					<Tool
+						Name="VCCLCompilerTool"
+					/>
+				</FileConfiguration>
+			</File>
+			<Filter
+				Name="hud"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\hud\HUD.cc"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="objects"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Ambient.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Camera.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Explosion.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Fighter.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Model.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\NPC.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Projectile.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Skybox.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\SpaceShip.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\SpaceshipSteeringObject.cc"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE2|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\test1.cc"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE2|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\test2.cc"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE2|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\test3.cc"
+					>
+					<FileConfiguration
+						Name="Debug|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+					<FileConfiguration
+						Name="Release_SSE2|Win32"
+						ExcludedFromBuild="true"
+						>
+						<Tool
+							Name="VCCLCompilerTool"
+							UsePrecompiledHeader="0"
+						/>
+					</FileConfiguration>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\WorldEntity.cc"
+					>
+				</File>
+				<Filter
+					Name="weapon"
+					>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\AmmunitionDump.cc"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\BarrelGun.cc"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\BaseWeapon.cc"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\Bullet.cc"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\BulletManager.cc"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\WeaponStation.cc"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="particle"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\particle\ParticleInterface.cc"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="tools"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\tools\BillboardSet.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\tools\Light.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\tools\Mesh.cc"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="loader"
+				>
+				<File
+					RelativePath="..\..\src\loader\LevelLoader.cc"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\orxonox\GraphicsEngine.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\InputManager.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\Orxonox.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\OrxonoxPlatform.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\OrxonoxPrereqs.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\OrxonoxStableHeaders.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\orxonox\SpaceshipSteering.h"
+				>
+			</File>
+			<Filter
+				Name="hud"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\hud\HUD.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="objects"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Ambient.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Camera.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Explosion.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Fighter.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Model.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\NPC.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Projectile.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Skybox.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\SpaceShip.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\SpaceshipSteeringObject.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Test.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\test1.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\test2.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\test3.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\Tickable.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\objects\WorldEntity.h"
+					>
+				</File>
+				<Filter
+					Name="weapon"
+					>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\AmmunitionDump.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\BarrelGun.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\BaseWeapon.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\Bullet.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\BulletManager.h"
+						>
+					</File>
+					<File
+						RelativePath="..\..\src\orxonox\objects\weapon\WeaponStation.h"
+						>
+					</File>
+				</Filter>
+			</Filter>
+			<Filter
+				Name="particle"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\particle\ParticleInterface.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="tools"
+				>
+				<File
+					RelativePath="..\..\src\orxonox\tools\BillboardSet.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\tools\Light.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\tools\Mesh.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\orxonox\tools\Timer.h"
+					>
+				</File>
+			</Filter>
+			<Filter
+				Name="loader"
+				>
+				<File
+					RelativePath="..\..\src\loader\LevelLoader.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\loader\LoaderPrereqs.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Resource Files"
+			Filter="rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav"
+			UniqueIdentifier="{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}"
+			>
+			<File
+				RelativePath="..\..\bin\media.cfg"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\ogre.cfg"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\ogre.cfg-init"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\Ogre.log"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\orxonox.bat"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\orxonox.ini"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\orxonox.log"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\orxonox_d.bat"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\plugins.cfg"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\plugins.cfg-init"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\plugins_d.cfg"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\quake3settings.cfg"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\resources.cfg"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\run-script"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\translation_default.lang"
+				>
+			</File>
+			<File
+				RelativePath="..\..\bin\translation_german.lang"
+				>
+			</File>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
Index: /code/branches/network/visual_studio/vc8/util.vcproj
===================================================================
--- /code/branches/network/visual_studio/vc8/util.vcproj	(revision 861)
+++ /code/branches/network/visual_studio/vc8/util.vcproj	(revision 861)
@@ -0,0 +1,324 @@
+<?xml version="1.0" encoding="Windows-1252"?>
+<VisualStudioProject
+	ProjectType="Visual C++"
+	Version="8.00"
+	Name="util"
+	ProjectGUID="{2240ECD7-2F48-4431-8E1B-25466A384CCC}"
+	RootNamespace="FICN"
+	Keyword="Win32Proj"
+	>
+	<Platforms>
+		<Platform
+			Name="Win32"
+		/>
+	</Platforms>
+	<ToolFiles>
+	</ToolFiles>
+	<Configurations>
+		<Configuration
+			Name="Debug|Win32"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(SolutionDir)base_properties_debug.vsprops;..\util_properties.vsprops"
+			CharacterSet="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release|Win32"
+			ConfigurationType="4"
+			InheritedPropertySheets="$(SolutionDir)base_properties_release.vsprops;..\util_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE|Win32"
+			ConfigurationType="4"
+			InheritedPropertySheets="..\base_properties_release_sse.vsprops;..\util_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+		<Configuration
+			Name="Release_SSE2|Win32"
+			ConfigurationType="4"
+			InheritedPropertySheets="..\base_properties_release_sse2.vsprops;..\util_properties.vsprops"
+			CharacterSet="1"
+			WholeProgramOptimization="1"
+			>
+			<Tool
+				Name="VCPreBuildEventTool"
+			/>
+			<Tool
+				Name="VCCustomBuildTool"
+			/>
+			<Tool
+				Name="VCXMLDataGeneratorTool"
+			/>
+			<Tool
+				Name="VCWebServiceProxyGeneratorTool"
+			/>
+			<Tool
+				Name="VCMIDLTool"
+			/>
+			<Tool
+				Name="VCCLCompilerTool"
+			/>
+			<Tool
+				Name="VCManagedResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCResourceCompilerTool"
+			/>
+			<Tool
+				Name="VCPreLinkEventTool"
+			/>
+			<Tool
+				Name="VCLibrarianTool"
+			/>
+			<Tool
+				Name="VCALinkTool"
+			/>
+			<Tool
+				Name="VCXDCMakeTool"
+			/>
+			<Tool
+				Name="VCBscMakeTool"
+			/>
+			<Tool
+				Name="VCFxCopTool"
+			/>
+			<Tool
+				Name="VCPostBuildEventTool"
+			/>
+		</Configuration>
+	</Configurations>
+	<References>
+	</References>
+	<Files>
+		<Filter
+			Name="Source Files"
+			Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
+			UniqueIdentifier="{4FC737F1-C7A5-4376-A066-2A32D752A2FF}"
+			>
+			<File
+				RelativePath="..\..\src\util\substring.cc"
+				>
+			</File>
+			<Filter
+				Name="tinyxml"
+				>
+				<File
+					RelativePath="..\..\src\util\tinyxml\ticpp.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\tinystr.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\tinyxml.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\tinyxmlerror.cc"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\tinyxmlparser.cc"
+					>
+				</File>
+			</Filter>
+		</Filter>
+		<Filter
+			Name="Header Files"
+			Filter="h;hpp;hxx;hm;inl;inc;xsd"
+			UniqueIdentifier="{93995380-89BD-4b04-88EB-625FBE52EBFB}"
+			>
+			<File
+				RelativePath="..\..\src\util\Convert.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\util\Math.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\util\Sleep.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\util\String2Number.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\util\substring.h"
+				>
+			</File>
+			<File
+				RelativePath="..\..\src\util\Tokenizer.h"
+				>
+			</File>
+			<Filter
+				Name="tinyxml"
+				>
+				<File
+					RelativePath="..\..\src\util\tinyxml\ticpp.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\ticpprc.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\tinystr.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\tinyxml.h"
+					>
+				</File>
+				<File
+					RelativePath="..\..\src\util\tinyxml\TinyXMLPrereqs.h"
+					>
+				</File>
+			</Filter>
+		</Filter>
+	</Files>
+	<Globals>
+	</Globals>
+</VisualStudioProject>
